Skip to content

reportConfigSchema

Déclaration
reportConfigSchema = defineWidgetConfig({
i18n: i18nSchemaFrom(reportTranslation),
title: {
fr: 'Créer un rapport',
nl: 'NL - Créer un rapport',
},
icon: {
lucide: 'ClipboardList',
},
inToolbar: inToolbarSchemaFrom({
type: 'button',
}),
onActivate: {
deactivate: {
classes: ['Identify', 'AddData', 'Draw', 'MeasureDistance', 'MeasureSurface', 'AdvancedSearch', 'Export'],
},
},
config: z
.object({
selectionTypes: z
.array(z.enum(SelectionType))
.default([SelectionType.POINT, SelectionType.LINE, SelectionType.POLYGON, SelectionType.CADMAP]),
templateName: z.string().default('REPORT'),
identifyTolerance: z.number().default(10),
closestAddressBuffer: z.number().default(10),
defaultSymbols: drawFeatureSymbolsSchema.prefault({
polygon: {
color: hexToRgb(defaultSymbolColor, 0),
},
}),
})
.prefault({}),
})