Skip to content

addDataConfigSchema

Déclaration
addDataConfigSchema = defineWidgetConfig({
i18n: i18nSchemaFrom(addDataI18n),
title: addDataI18n['add-data-title'],
icon: {
geoviewer: 'add-layer',
},
inToolbar: inToolbarSchemaFrom({
type: 'button',
}),
container: {
id: 'dialog',
overlay: true,
draggable: true,
width: '40vw',
minWidth: '650px',
maxHeight: '85vh',
y: '30px',
center: true,
},
onActivate: {
deactivate: {
classes: ['Draw', 'MeasureSurface', 'MeasureDistance', 'Export', 'Report', 'AdvancedSearch'],
},
},
config: z
.object({
addDataPopularsConfig: addDataPopularsConfigSchema,
addDataAdvancedOptionsConfig: addDataAdvancedOptionsConfigSchema,
addDataCatalogConfig: addDataCatalogConfigSchema,
addDataSearchConfig: addDataSearchConfigSchema,
categories: z.array(addDataCategorySchema).optional().default(DEFAULT_ADD_DATA_CATEGORIES),
timeTravelSeries: z.array(addDataCategorySchema).optional().default(DEFAULT_TIME_TRAVEL_SERIES),
metawalConfig: addDataMetawalApiParamsSchema.optional().default(addDataMetawalApiParamsSchema.parse({})),
closeOnMapServiceAdded: z.boolean().default(true),
openTocOnMapServiceAdded: z.boolean().default(true),
visibleTabs: z
.object({
populars: z.boolean().default(true),
categories: z.boolean().default(true),
predefinedViews: z.boolean().default(true),
advancedOptions: z.boolean().default(true),
catalog: z.boolean().default(false),
})
.prefault({}),
})
.prefault({}),
})