@openg2p/registry-widgets 1.1.3-dev.1 → 1.1.4-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +100 -0
- package/dist/components/FilePreviewModal.d.ts +2 -4
- package/dist/components/FilePreviewModal.d.ts.map +1 -1
- package/dist/components/PanelRenderer.d.ts +0 -7
- package/dist/components/PanelRenderer.d.ts.map +1 -1
- package/dist/components/SectionBuilder/JSONEditorPanel.d.ts.map +1 -1
- package/dist/components/SectionBuilder/schemas.d.ts +5 -5
- package/dist/components/SectionBuilder/schemas.d.ts.map +1 -1
- package/dist/components/SectionRenderer/SectionRenderer.d.ts +3 -0
- package/dist/components/SectionRenderer/SectionRenderer.d.ts.map +1 -0
- package/dist/components/SectionRenderer/components/CRViewFooter.d.ts +8 -0
- package/dist/components/SectionRenderer/components/CRViewFooter.d.ts.map +1 -0
- package/dist/components/SectionRenderer/components/EditSectionPortal.d.ts +30 -0
- package/dist/components/SectionRenderer/components/EditSectionPortal.d.ts.map +1 -0
- package/dist/components/SectionRenderer/components/IntakeFormLayout.d.ts +23 -0
- package/dist/components/SectionRenderer/components/IntakeFormLayout.d.ts.map +1 -0
- package/dist/components/SectionRenderer/components/PanelGrid.d.ts +17 -0
- package/dist/components/SectionRenderer/components/PanelGrid.d.ts.map +1 -0
- package/dist/components/SectionRenderer/components/RegistryViewLayout.d.ts +26 -0
- package/dist/components/SectionRenderer/components/RegistryViewLayout.d.ts.map +1 -0
- package/dist/components/SectionRenderer/components/SectionEditControls.d.ts +7 -0
- package/dist/components/SectionRenderer/components/SectionEditControls.d.ts.map +1 -0
- package/dist/components/SectionRenderer/components/SectionStyles.d.ts +11 -0
- package/dist/components/SectionRenderer/components/SectionStyles.d.ts.map +1 -0
- package/dist/components/SectionRenderer/components/SupportingDocuments.d.ts +13 -0
- package/dist/components/SectionRenderer/components/SupportingDocuments.d.ts.map +1 -0
- package/dist/components/SectionRenderer/components/index.d.ts +9 -0
- package/dist/components/SectionRenderer/components/index.d.ts.map +1 -0
- package/dist/components/SectionRenderer/hooks/index.d.ts +6 -0
- package/dist/components/SectionRenderer/hooks/index.d.ts.map +1 -0
- package/dist/components/SectionRenderer/hooks/useCrViewData.d.ts +8 -0
- package/dist/components/SectionRenderer/hooks/useCrViewData.d.ts.map +1 -0
- package/dist/components/SectionRenderer/hooks/useIntakeFormAccordion.d.ts +6 -0
- package/dist/components/SectionRenderer/hooks/useIntakeFormAccordion.d.ts.map +1 -0
- package/dist/components/SectionRenderer/hooks/useSectionActions.d.ts +34 -0
- package/dist/components/SectionRenderer/hooks/useSectionActions.d.ts.map +1 -0
- package/dist/components/SectionRenderer/hooks/useSectionDirty.d.ts +25 -0
- package/dist/components/SectionRenderer/hooks/useSectionDirty.d.ts.map +1 -0
- package/dist/components/SectionRenderer/hooks/useSectionEditPortal.d.ts +15 -0
- package/dist/components/SectionRenderer/hooks/useSectionEditPortal.d.ts.map +1 -0
- package/dist/components/SectionRenderer/index.d.ts +3 -0
- package/dist/components/SectionRenderer/index.d.ts.map +1 -0
- package/dist/components/SectionRenderer/types/index.d.ts +3 -0
- package/dist/components/SectionRenderer/types/index.d.ts.map +1 -0
- package/dist/components/SectionRenderer/types/sectionChanges.d.ts +8 -0
- package/dist/components/SectionRenderer/types/sectionChanges.d.ts.map +1 -0
- package/dist/components/SectionRenderer/types/sectionRendererProps.d.ts +30 -0
- package/dist/components/SectionRenderer/types/sectionRendererProps.d.ts.map +1 -0
- package/dist/components/SectionRenderer/utils/documentWidgetConfig.d.ts +17 -0
- package/dist/components/SectionRenderer/utils/documentWidgetConfig.d.ts.map +1 -0
- package/dist/components/SectionRenderer/utils/executeSectionSave.d.ts +24 -0
- package/dist/components/SectionRenderer/utils/executeSectionSave.d.ts.map +1 -0
- package/dist/components/SectionRenderer/utils/index.d.ts +10 -0
- package/dist/components/SectionRenderer/utils/index.d.ts.map +1 -0
- package/dist/components/SectionRenderer/utils/makePanelsEditable.d.ts +4 -0
- package/dist/components/SectionRenderer/utils/makePanelsEditable.d.ts.map +1 -0
- package/dist/components/SectionRenderer/utils/panelLayout.d.ts +10 -0
- package/dist/components/SectionRenderer/utils/panelLayout.d.ts.map +1 -0
- package/dist/components/SectionRenderer/utils/readonlyStyles.d.ts +9 -0
- package/dist/components/SectionRenderer/utils/readonlyStyles.d.ts.map +1 -0
- package/dist/components/SectionRenderer/utils/revertSectionValues.d.ts +16 -0
- package/dist/components/SectionRenderer/utils/revertSectionValues.d.ts.map +1 -0
- package/dist/components/SectionRenderer/utils/sectionSnapshot.d.ts +25 -0
- package/dist/components/SectionRenderer/utils/sectionSnapshot.d.ts.map +1 -0
- package/dist/components/SectionsContainer.d.ts +1 -23
- package/dist/components/SectionsContainer.d.ts.map +1 -1
- package/dist/components/WidgetFieldLabel.d.ts +2 -5
- package/dist/components/WidgetFieldLabel.d.ts.map +1 -1
- package/dist/components/WidgetProvider.d.ts +4 -5
- package/dist/components/WidgetProvider.d.ts.map +1 -1
- package/dist/components/WidgetRenderer.d.ts +2 -2
- package/dist/components/WidgetRenderer.d.ts.map +1 -1
- package/dist/events/WidgetEventBus.d.ts +0 -22
- package/dist/events/WidgetEventBus.d.ts.map +1 -1
- package/dist/hooks/useBaseWidget.d.ts +0 -1
- package/dist/hooks/useBaseWidget.d.ts.map +1 -1
- package/dist/hooks/useGeoHierarchy.d.ts +47 -0
- package/dist/hooks/useGeoHierarchy.d.ts.map +1 -0
- package/dist/hooks/useWidgetCascade.d.ts.map +1 -1
- package/dist/hooks/useWidgetEventBus.d.ts +0 -3
- package/dist/hooks/useWidgetEventBus.d.ts.map +1 -1
- package/dist/hooks/useWidgetTheme.d.ts +0 -8
- package/dist/hooks/useWidgetTheme.d.ts.map +1 -1
- package/dist/index.d.ts +83 -1102
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +4280 -5834
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +4280 -5858
- package/dist/index.js.map +1 -1
- package/dist/registry/WidgetRegistry.d.ts +0 -24
- package/dist/registry/WidgetRegistry.d.ts.map +1 -1
- package/dist/registry/defaultWidgets.d.ts +0 -4
- package/dist/registry/defaultWidgets.d.ts.map +1 -1
- package/dist/store/index.d.ts.map +1 -1
- package/dist/store/widgetSlice.d.ts.map +1 -1
- package/dist/theme/index.d.ts +3 -51
- package/dist/theme/index.d.ts.map +1 -1
- package/dist/types/index.d.ts +50 -118
- package/dist/types/index.d.ts.map +1 -1
- package/dist/utils/dataSource.d.ts +2 -8
- package/dist/utils/dataSource.d.ts.map +1 -1
- package/dist/utils/dateInput.d.ts +0 -33
- package/dist/utils/dateInput.d.ts.map +1 -1
- package/dist/utils/datetimeInput.d.ts +1 -28
- package/dist/utils/datetimeInput.d.ts.map +1 -1
- package/dist/utils/extractTableRecordsFromSnapshot.d.ts.map +1 -1
- package/dist/utils/filePreview.d.ts +0 -6
- package/dist/utils/filePreview.d.ts.map +1 -1
- package/dist/utils/fileSerialization.d.ts +1 -25
- package/dist/utils/fileSerialization.d.ts.map +1 -1
- package/dist/utils/formatting.d.ts +0 -12
- package/dist/utils/formatting.d.ts.map +1 -1
- package/dist/utils/geoHierarchy.d.ts +67 -109
- package/dist/utils/geoHierarchy.d.ts.map +1 -1
- package/dist/utils/numberInput.d.ts +0 -18
- package/dist/utils/numberInput.d.ts.map +1 -1
- package/dist/utils/pathUtils.d.ts +0 -7
- package/dist/utils/pathUtils.d.ts.map +1 -1
- package/dist/utils/schemaTranslation.d.ts +0 -18
- package/dist/utils/schemaTranslation.d.ts.map +1 -1
- package/dist/utils/sectionRevert.d.ts +0 -6
- package/dist/utils/sectionRevert.d.ts.map +1 -1
- package/dist/utils/sectionValidate.d.ts +4 -8
- package/dist/utils/sectionValidate.d.ts.map +1 -1
- package/dist/utils/tSchema.d.ts +5 -0
- package/dist/utils/tSchema.d.ts.map +1 -0
- package/dist/utils/textInput.d.ts +0 -12
- package/dist/utils/textInput.d.ts.map +1 -1
- package/dist/utils/validation.d.ts +2 -8
- package/dist/utils/validation.d.ts.map +1 -1
- package/dist/utils/validationPatterns.d.ts +0 -10
- package/dist/utils/validationPatterns.d.ts.map +1 -1
- package/dist/widgets/BooleanWidget.d.ts +0 -28
- package/dist/widgets/BooleanWidget.d.ts.map +1 -1
- package/dist/widgets/CheckboxWidget.d.ts +0 -49
- package/dist/widgets/CheckboxWidget.d.ts.map +1 -1
- package/dist/widgets/DateInputWidget.d.ts +0 -40
- package/dist/widgets/DateInputWidget.d.ts.map +1 -1
- package/dist/widgets/DateTimeInputWidget.d.ts +0 -35
- package/dist/widgets/DateTimeInputWidget.d.ts.map +1 -1
- package/dist/widgets/DialogTableWidget.d.ts.map +1 -1
- package/dist/widgets/DisplayWidget.d.ts +0 -4
- package/dist/widgets/DisplayWidget.d.ts.map +1 -1
- package/dist/widgets/DocsWidget.d.ts +15 -0
- package/dist/widgets/DocsWidget.d.ts.map +1 -0
- package/dist/widgets/FileInputWidget.d.ts +0 -17
- package/dist/widgets/FileInputWidget.d.ts.map +1 -1
- package/dist/widgets/GeoHierarchyWidget.d.ts +7 -0
- package/dist/widgets/GeoHierarchyWidget.d.ts.map +1 -0
- package/dist/widgets/HeaderSectionWidget.d.ts.map +1 -1
- package/dist/widgets/IdAuthenticationWidget.d.ts.map +1 -1
- package/dist/widgets/MultiSelectWidget.d.ts.map +1 -1
- package/dist/widgets/NumberInputWidget.d.ts +0 -42
- package/dist/widgets/NumberInputWidget.d.ts.map +1 -1
- package/dist/widgets/PhoneInputWidget.d.ts +0 -15
- package/dist/widgets/PhoneInputWidget.d.ts.map +1 -1
- package/dist/widgets/ProfileWidget.d.ts +0 -43
- package/dist/widgets/ProfileWidget.d.ts.map +1 -1
- package/dist/widgets/RadioWidget.d.ts +0 -37
- package/dist/widgets/RadioWidget.d.ts.map +1 -1
- package/dist/widgets/RegisterLookupWidget.d.ts.map +1 -1
- package/dist/widgets/ScoresDisplayWidget.d.ts +0 -11
- package/dist/widgets/ScoresDisplayWidget.d.ts.map +1 -1
- package/dist/widgets/SelectWidget.d.ts +0 -16
- package/dist/widgets/SelectWidget.d.ts.map +1 -1
- package/dist/widgets/TableWidget.d.ts +0 -39
- package/dist/widgets/TableWidget.d.ts.map +1 -1
- package/dist/widgets/TextAreaWidget.d.ts +0 -33
- package/dist/widgets/TextAreaWidget.d.ts.map +1 -1
- package/dist/widgets/TextInputWidget.d.ts +0 -41
- package/dist/widgets/TextInputWidget.d.ts.map +1 -1
- package/dist/widgets/index.d.ts +2 -4
- package/dist/widgets/index.d.ts.map +1 -1
- package/package.json +11 -14
|
@@ -1,37 +1,10 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* DateTime input utilities for parsing, formatting, and validation
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* Parse datetime string in various formats to Date object
|
|
6
|
-
*/
|
|
7
1
|
export declare const parseDateTime: (dateTimeString: string) => Date | null;
|
|
8
|
-
/**
|
|
9
|
-
* Format datetime to ISO string (YYYY-MM-DDTHH:mm:ss) for storage
|
|
10
|
-
*/
|
|
11
2
|
export declare const formatDateTimeToISO: (date: Date | string | null | undefined) => string;
|
|
12
|
-
/**
|
|
13
|
-
* Format datetime to ISO string for HTML datetime-local input (YYYY-MM-DDTHH:mm)
|
|
14
|
-
*/
|
|
3
|
+
/** Format for HTML `datetime-local` inputs (`YYYY-MM-DDTHH:mm`). */
|
|
15
4
|
export declare const formatDateTimeToLocalISO: (date: Date | string | null | undefined) => string;
|
|
16
|
-
/**
|
|
17
|
-
* Format datetime to custom format string
|
|
18
|
-
* Supports: DD, MM, YYYY, YY, HH, mm, ss
|
|
19
|
-
*/
|
|
20
5
|
export declare const formatDateTimeToString: (date: Date | string | null | undefined, format: string) => string;
|
|
21
|
-
/**
|
|
22
|
-
* Parse custom format string to Date object
|
|
23
|
-
*/
|
|
24
6
|
export declare const parseDateTimeFromFormat: (dateTimeString: string, format: string) => Date | null;
|
|
25
|
-
/**
|
|
26
|
-
* Get min datetime based on constraint type
|
|
27
|
-
*/
|
|
28
7
|
export declare const getMinDateTime: (constraint: string | undefined, minDateTime: string | undefined) => string | undefined;
|
|
29
|
-
/**
|
|
30
|
-
* Get max datetime based on constraint type
|
|
31
|
-
*/
|
|
32
8
|
export declare const getMaxDateTime: (constraint: string | undefined, maxDateTime: string | undefined) => string | undefined;
|
|
33
|
-
/**
|
|
34
|
-
* Validate datetime constraints
|
|
35
|
-
*/
|
|
36
9
|
export declare const validateDateTimeConstraints: (date: Date | string | null | undefined, minDateTime: string | undefined, maxDateTime: string | undefined, constraint: string | undefined) => string | null;
|
|
37
10
|
//# sourceMappingURL=datetimeInput.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"datetimeInput.d.ts","sourceRoot":"","sources":["../../src/utils/datetimeInput.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"datetimeInput.d.ts","sourceRoot":"","sources":["../../src/utils/datetimeInput.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,GAAI,gBAAgB,MAAM,KAAG,IAAI,GAAG,IAuC7D,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,MAAM,IAAI,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,KAAG,MAwB5E,CAAC;AAEF,oEAAoE;AACpE,eAAO,MAAM,wBAAwB,GAAI,MAAM,IAAI,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,KAAG,MAuBjF,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAI,MAAM,IAAI,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,QAAQ,MAAM,KAAG,MAgC/F,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAAI,gBAAgB,MAAM,EAAE,QAAQ,MAAM,KAAG,IAAI,GAAG,IAuEvF,CAAC;AAEF,eAAO,MAAM,cAAc,GACzB,YAAY,MAAM,GAAG,SAAS,EAC9B,aAAa,MAAM,GAAG,SAAS,KAC9B,MAAM,GAAG,SAiBX,CAAC;AAEF,eAAO,MAAM,cAAc,GACzB,YAAY,MAAM,GAAG,SAAS,EAC9B,aAAa,MAAM,GAAG,SAAS,KAC9B,MAAM,GAAG,SAiBX,CAAC;AAEF,eAAO,MAAM,2BAA2B,GACtC,MAAM,IAAI,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,EACtC,aAAa,MAAM,GAAG,SAAS,EAC/B,aAAa,MAAM,GAAG,SAAS,EAC/B,YAAY,MAAM,GAAG,SAAS,KAC7B,MAAM,GAAG,IA8BX,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extractTableRecordsFromSnapshot.d.ts","sourceRoot":"","sources":["../../src/utils/extractTableRecordsFromSnapshot.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEjD,4EAA4E;AAC5E,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,gBAAgB,GAAG,OAAO,
|
|
1
|
+
{"version":3,"file":"extractTableRecordsFromSnapshot.d.ts","sourceRoot":"","sources":["../../src/utils/extractTableRecordsFromSnapshot.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEjD,4EAA4E;AAC5E,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAQnE;AAED;;;;;GAKG;AACH,wBAAgB,+BAA+B,CAC7C,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACjC,cAAc,EAAE,gBAAgB,EAAE,GACjC,OAAO,EAAE,CA6BX"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filePreview.d.ts","sourceRoot":"","sources":["../../src/utils/filePreview.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"filePreview.d.ts","sourceRoot":"","sources":["../../src/utils/filePreview.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,GAAI,MAAM,IAAI,GAAG,MAAM,KAAG,OA4BrD,CAAC"}
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Utility functions for serializing File objects to/from Redux state
|
|
3
|
-
* File objects cannot be stored directly in Redux as they are not serializable
|
|
4
|
-
*/
|
|
1
|
+
/** JSON-safe `File` representation for Redux (native `File` is not serializable). */
|
|
5
2
|
export interface SerializedFile {
|
|
6
3
|
__type: 'File';
|
|
7
4
|
name: string;
|
|
@@ -10,31 +7,10 @@ export interface SerializedFile {
|
|
|
10
7
|
lastModified: number;
|
|
11
8
|
data: string;
|
|
12
9
|
}
|
|
13
|
-
/**
|
|
14
|
-
* Check if a value is a File object
|
|
15
|
-
*/
|
|
16
10
|
export declare const isFile: (value: any) => value is File;
|
|
17
|
-
/**
|
|
18
|
-
* Check if a value is a serialized file
|
|
19
|
-
*/
|
|
20
11
|
export declare const isSerializedFile: (value: any) => value is SerializedFile;
|
|
21
|
-
/**
|
|
22
|
-
* Convert File object to a serializable format
|
|
23
|
-
* Returns a promise that resolves to a SerializedFile
|
|
24
|
-
*/
|
|
25
12
|
export declare const serializeFile: (file: File) => Promise<SerializedFile>;
|
|
26
|
-
/**
|
|
27
|
-
* Convert serialized file back to File object
|
|
28
|
-
*/
|
|
29
13
|
export declare const deserializeFile: (serialized: SerializedFile) => File;
|
|
30
|
-
/**
|
|
31
|
-
* Serialize a value that may contain File objects
|
|
32
|
-
* Handles File objects, arrays of Files, and nested objects
|
|
33
|
-
*/
|
|
34
14
|
export declare const serializeValue: (value: any) => Promise<any>;
|
|
35
|
-
/**
|
|
36
|
-
* Deserialize a value that may contain serialized File objects
|
|
37
|
-
* Handles SerializedFile objects, arrays of SerializedFiles, and nested objects
|
|
38
|
-
*/
|
|
39
15
|
export declare const deserializeValue: (value: any) => any;
|
|
40
16
|
//# sourceMappingURL=fileSerialization.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fileSerialization.d.ts","sourceRoot":"","sources":["../../src/utils/fileSerialization.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"fileSerialization.d.ts","sourceRoot":"","sources":["../../src/utils/fileSerialization.ts"],"names":[],"mappings":"AAAA,qFAAqF;AACrF,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,eAAO,MAAM,MAAM,GAAI,OAAO,GAAG,KAAG,KAAK,IAAI,IAE5C,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,OAAO,GAAG,KAAG,KAAK,IAAI,cAEtD,CAAC;AAEF,eAAO,MAAM,aAAa,GAAU,MAAM,IAAI,KAAG,OAAO,CAAC,cAAc,CAiBtE,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,YAAY,cAAc,KAAG,IAa5D,CAAC;AAEF,eAAO,MAAM,cAAc,GAAU,OAAO,GAAG,KAAG,OAAO,CAAC,GAAG,CAsB5D,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,OAAO,GAAG,KAAG,GAkB7C,CAAC"}
|
|
@@ -1,18 +1,6 @@
|
|
|
1
1
|
import { WidgetFormat } from '../types';
|
|
2
|
-
/**
|
|
3
|
-
* Format date value
|
|
4
|
-
*/
|
|
5
2
|
export declare const formatDate: (value: any, format: WidgetFormat | undefined) => string;
|
|
6
|
-
/**
|
|
7
|
-
* Format currency value
|
|
8
|
-
*/
|
|
9
3
|
export declare const formatCurrency: (value: any, format: WidgetFormat | undefined) => string;
|
|
10
|
-
/**
|
|
11
|
-
* Format phone number
|
|
12
|
-
*/
|
|
13
4
|
export declare const formatPhone: (value: any, format: WidgetFormat | undefined) => string;
|
|
14
|
-
/**
|
|
15
|
-
* Format value based on widget format config
|
|
16
|
-
*/
|
|
17
5
|
export declare const formatValue: (value: any, format: WidgetFormat | undefined, widgetType?: string) => string;
|
|
18
6
|
//# sourceMappingURL=formatting.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatting.d.ts","sourceRoot":"","sources":["../../src/utils/formatting.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAIxC
|
|
1
|
+
{"version":3,"file":"formatting.d.ts","sourceRoot":"","sources":["../../src/utils/formatting.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAIxC,eAAO,MAAM,UAAU,GAAI,OAAO,GAAG,EAAE,QAAQ,YAAY,GAAG,SAAS,KAAG,MAyBzE,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,OAAO,GAAG,EAAE,QAAQ,YAAY,GAAG,SAAS,KAAG,MAwB7E,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,OAAO,GAAG,EAAE,QAAQ,YAAY,GAAG,SAAS,KAAG,MAmB1E,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,OAAO,GAAG,EAAE,QAAQ,YAAY,GAAG,SAAS,EAAE,aAAa,MAAM,KAAG,MAsB/F,CAAC"}
|
|
@@ -1,118 +1,76 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
export interface GeoLevel {
|
|
2
|
+
level_id: string;
|
|
3
|
+
level_mnemonic: string;
|
|
4
|
+
parent_level_id: string | null;
|
|
5
|
+
}
|
|
6
|
+
export interface GeoLevelValue {
|
|
7
7
|
level_value_id: string;
|
|
8
|
+
level_id: string;
|
|
8
9
|
level_value_mnemonic: string;
|
|
10
|
+
parent_level_value_id: string | null;
|
|
9
11
|
}
|
|
10
|
-
export interface
|
|
11
|
-
|
|
12
|
+
export interface GeoSelectOption {
|
|
13
|
+
value: string;
|
|
14
|
+
label: string;
|
|
12
15
|
}
|
|
16
|
+
export declare function normalizeApiPayload(response: unknown): unknown[];
|
|
17
|
+
/** Order flat levels root → leaf using parent_level_id. */
|
|
18
|
+
export declare function buildOrderedLevels(flat: GeoLevel[]): GeoLevel[];
|
|
19
|
+
export declare const GEO_SECTION_COLUMN_SLOTS = 3;
|
|
13
20
|
/**
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* fall back to shared hierarchy dataPath — that stale path was keeping grandchildren visible.
|
|
17
|
-
*/
|
|
18
|
-
export declare function resolveGeoWidgetLevelValue(values: Record<string, any>, widgetId: string, dataPath: string | Record<string, string> | undefined, geoConfig: GeoLevelConfig): any;
|
|
19
|
-
/**
|
|
20
|
-
* Write the in-memory geo hierarchy builder state into Redux at the shared dataPath.
|
|
21
|
+
* Suggested panel/widget column span from hierarchy depth:
|
|
22
|
+
* ≤3 levels → 1, 4–5 → 2, ≥6 → 3.
|
|
21
23
|
*/
|
|
22
|
-
export declare function
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
level_value_mnemonic: string;
|
|
47
|
-
}>;
|
|
48
|
-
lowest_level_value_id: string;
|
|
49
|
-
};
|
|
50
|
-
} | null;
|
|
51
|
-
/**
|
|
52
|
-
* Clear hierarchy for a group
|
|
53
|
-
*/
|
|
54
|
-
clear(groupId?: string): void;
|
|
55
|
-
/**
|
|
56
|
-
* Clear all hierarchies
|
|
57
|
-
*/
|
|
58
|
-
clearAll(): void;
|
|
59
|
-
/**
|
|
60
|
-
* Get current levels for a group
|
|
61
|
-
*/
|
|
62
|
-
getLevels(groupId?: string): GeoLevelData[];
|
|
24
|
+
export declare function suggestedGeoColumnSpan(levelCount: number): number;
|
|
25
|
+
/** Clamp span to 1…GEO_SECTION_COLUMN_SLOTS and at most the level count. */
|
|
26
|
+
export declare function resolveGeoColumnSpan(levelCount: number, explicitSpan?: number): number;
|
|
27
|
+
/** Slice ordered levels into section columns per counts, e.g. [3, 2, 0]. */
|
|
28
|
+
export declare function distributeLevelsToColumns(levels: GeoLevel[], columnCounts: number[]): GeoLevel[][];
|
|
29
|
+
export declare function distributeLevelsContiguous(levels: GeoLevel[], columnCount: number): GeoLevel[][];
|
|
30
|
+
export declare function resolveGeoLevelColumns(levels: GeoLevel[], layout?: {
|
|
31
|
+
distribution?: 'fixed';
|
|
32
|
+
columns?: number[];
|
|
33
|
+
columnSpan?: number;
|
|
34
|
+
}): {
|
|
35
|
+
columnCounts: number[];
|
|
36
|
+
columns: GeoLevel[][];
|
|
37
|
+
columnSpan: number;
|
|
38
|
+
};
|
|
39
|
+
export declare function formatLevelLabel(mnemonic: string): string;
|
|
40
|
+
export declare function transformGeoValueOptions(values: GeoLevelValue[]): GeoSelectOption[];
|
|
41
|
+
export interface GeoHierarchyJsonEntry {
|
|
42
|
+
level_id?: string;
|
|
43
|
+
/** Alias of level_mnemonic on some backend payloads. */
|
|
44
|
+
level?: string;
|
|
45
|
+
level_mnemonic?: string;
|
|
46
|
+
level_value_id: string;
|
|
47
|
+
level_value_mnemonic?: string;
|
|
63
48
|
}
|
|
64
|
-
export
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
export interface GeoWidgetRegistration {
|
|
68
|
-
widgetId: string;
|
|
69
|
-
parentWidgetId: string | null;
|
|
70
|
-
level: string;
|
|
71
|
-
geoConfig: GeoLevelConfig;
|
|
72
|
-
dataPath: string;
|
|
73
|
-
groupId: string;
|
|
49
|
+
export interface GeoHierarchyJson {
|
|
50
|
+
hierarchy?: GeoHierarchyJsonEntry[];
|
|
51
|
+
lowest_level_value_id?: string;
|
|
74
52
|
}
|
|
75
|
-
|
|
76
|
-
export declare function
|
|
77
|
-
export declare function
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
export declare function
|
|
82
|
-
/**
|
|
83
|
-
export declare function
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
export declare function
|
|
89
|
-
export declare function
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
export declare function
|
|
98
|
-
value: any;
|
|
99
|
-
label: string;
|
|
100
|
-
}>>): Record<string, any>;
|
|
101
|
-
export declare function getGeoWidgetRegistrationsInGroup(groupId: string): GeoWidgetRegistration[];
|
|
102
|
-
/** True when changedWidgetId is any upstream geo parent of widgetId (not only immediate parent). */
|
|
103
|
-
export declare function isUpstreamGeoAncestor(changedWidgetId: string, widgetId: string, immediateParentWidgetId: string | null): boolean;
|
|
104
|
-
/** Group id for geo widgets sharing the same register prefix (e.g. `{registerId}`). */
|
|
105
|
-
export declare function getGeoGroupId(dataPath: string | Record<string, string> | undefined): string;
|
|
106
|
-
/**
|
|
107
|
-
* Resolve the human-readable label for a geo level from persisted hierarchy JSON.
|
|
108
|
-
* Used in readonly mode when API options are not loaded.
|
|
109
|
-
*/
|
|
110
|
-
export declare function resolveGeoWidgetLevelLabel(values: Record<string, any>, widgetId: string, dataPath: string | Record<string, string> | undefined, geoConfig: GeoLevelConfig): string | undefined;
|
|
111
|
-
/** All registered geo widgets that are descendants of ancestorWidgetId. */
|
|
112
|
-
export declare function getGeoDescendantWidgetIds(ancestorWidgetId: string): string[];
|
|
113
|
-
/** Seed in-memory builder from persisted hierarchy JSON (edit-mode rehydration). */
|
|
114
|
-
export declare function seedGeoHierarchyFromValues(values: Record<string, any>, dataPath: string | Record<string, string> | undefined, widgetId: string, groupId: string): void;
|
|
115
|
-
/** Force-clear builder for a group, then seed from Redux/schema values (e.g. after Cancel). */
|
|
116
|
-
export declare function resetAndSeedGeoHierarchyFromValues(values: Record<string, any>, dataPath: string, widgetId: string, groupId: string): void;
|
|
117
|
-
export {};
|
|
53
|
+
/** Read path for geo_code_hierarchy_json from explicit widget config only. */
|
|
54
|
+
export declare function resolveHierarchyJsonPath(dataPath: string | Record<string, string> | undefined, hierarchyPath?: string): string | null;
|
|
55
|
+
export declare function parseHierarchyJson(raw: unknown): GeoHierarchyJsonEntry[];
|
|
56
|
+
export declare function normalizeGeoId(id: string): string;
|
|
57
|
+
export declare function geoIdsMatch(left: string | undefined, right: string | undefined): boolean;
|
|
58
|
+
/** Map geo_code_hierarchy_json entries onto ordered API levels (root → leaf). */
|
|
59
|
+
export declare function mapHierarchyToChain(orderedLevels: GeoLevel[], hierarchy: GeoHierarchyJsonEntry[]): GeoLevelValue[];
|
|
60
|
+
/** True when the resolved chain matches the stored leaf id (or hierarchy lowest_level_value_id). */
|
|
61
|
+
export declare function chainMatchesStoredValue(chain: GeoLevelValue[], levelValueId: string, hierarchyRaw?: unknown): boolean;
|
|
62
|
+
export declare function getDeepestSelectedValue(orderedLevels: GeoLevel[], selectedValues: Record<string, string>): string | null;
|
|
63
|
+
/** Build geo_code_hierarchy_json document from current selections (for save payload). */
|
|
64
|
+
export declare function buildHierarchyJson(orderedLevels: GeoLevel[], selectedValues: Record<string, string>, options: Record<string, GeoSelectOption[]>, resolvedLabels?: Record<string, string>): GeoHierarchyJson | null;
|
|
65
|
+
/** Preserve string vs object storage shape used by the existing hierarchy field. */
|
|
66
|
+
export declare function formatHierarchyForPersist(document: GeoHierarchyJson | null, previous: unknown): unknown;
|
|
67
|
+
export declare function clearDescendants(orderedLevels: GeoLevel[], fromIndex: number, selectedValues: Record<string, string>, options: Record<string, GeoSelectOption[]>): {
|
|
68
|
+
selectedValues: Record<string, string>;
|
|
69
|
+
options: Record<string, GeoSelectOption[]>;
|
|
70
|
+
};
|
|
71
|
+
/** Level is enabled when it is the root, or its parent already has a selection. */
|
|
72
|
+
export declare function isLevelEnabled(orderedLevels: GeoLevel[], levelIndex: number, selectedValues: Record<string, string>): boolean;
|
|
73
|
+
/** Map a root→leaf chain onto level_id → level_value_id selections. */
|
|
74
|
+
export declare function mapChainToSelections(orderedLevels: GeoLevel[], chain: GeoLevelValue[]): Record<string, string>;
|
|
75
|
+
export declare function buildReadonlyPath(orderedLevels: GeoLevel[], selectedValues: Record<string, string>, options: Record<string, GeoSelectOption[]>, resolvedLabels: Record<string, string>): string;
|
|
118
76
|
//# sourceMappingURL=geoHierarchy.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geoHierarchy.d.ts","sourceRoot":"","sources":["../../src/utils/geoHierarchy.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"geoHierarchy.d.ts","sourceRoot":"","sources":["../../src/utils/geoHierarchy.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,QAAQ;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC;AAED,MAAM,WAAW,aAAa;IAC5B,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,qBAAqB,EAAE,MAAM,GAAG,IAAI,CAAC;CACtC;AAED,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAED,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,OAAO,GAAG,OAAO,EAAE,CAiBhE;AAED,2DAA2D;AAC3D,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,QAAQ,EAAE,GAAG,QAAQ,EAAE,CAmC/D;AAED,eAAO,MAAM,wBAAwB,IAAI,CAAC;AAE1C;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAWjE;AAED,4EAA4E;AAC5E,wBAAgB,oBAAoB,CAClC,UAAU,EAAE,MAAM,EAClB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AAM,CAAC,MAAM,EAAE,eAAe,EAAE,CAAC,GACzC;IACD,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACvC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,EAAE,CAAC,CAAC;CAC5C,CAWA;AAED,mFAAmF;AACnF,wBAAgB,cAAc,CAC5B,aAAa,EAAE,QAAQ,EAAE,EACzB,UAAU,EAAE,MAAM,EAClB,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GACrC,OAAO,CAMT;AAED,uEAAuE;AACvE,wBAAgB,oBAAoB,CAClC,aAAa,EAAE,QAAQ,EAAE,EACzB,KAAK,EAAE,aAAa,EAAE,GACrB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAWxB;AAED,wBAAgB,iBAAiB,CAC/B,aAAa,EAAE,QAAQ,EAAE,EACzB,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EACtC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,EAAE,CAAC,EAC1C,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GACrC,MAAM,CAaR"}
|
|
@@ -1,32 +1,14 @@
|
|
|
1
1
|
import { WidgetFormat } from '../types';
|
|
2
|
-
/**
|
|
3
|
-
* Format number with thousand and decimal separators
|
|
4
|
-
*/
|
|
5
2
|
export declare const formatNumber: (value: number | string, format: WidgetFormat | undefined) => string;
|
|
6
|
-
/**
|
|
7
|
-
* Parse formatted number string to number
|
|
8
|
-
*/
|
|
9
3
|
export declare const parseNumber: (value: string, format: WidgetFormat | undefined) => number | null;
|
|
10
|
-
/**
|
|
11
|
-
* Apply decimal precision with rounding or truncation
|
|
12
|
-
*/
|
|
13
4
|
export declare const applyDecimalPrecision: (value: number, format: WidgetFormat | undefined) => number;
|
|
14
|
-
/**
|
|
15
|
-
* Validate numeric value against constraints
|
|
16
|
-
*/
|
|
17
5
|
export declare const validateNumericValue: (value: number | null, format: WidgetFormat | undefined, validation?: {
|
|
18
6
|
min?: number;
|
|
19
7
|
max?: number;
|
|
20
8
|
pattern?: string;
|
|
21
9
|
patternMessage?: string;
|
|
22
10
|
}) => string[];
|
|
23
|
-
/**
|
|
24
|
-
* Check if a key is allowed for numeric input
|
|
25
|
-
*/
|
|
26
11
|
export declare const isAllowedKey: (key: string, format: WidgetFormat | undefined, currentValue: string, event?: React.KeyboardEvent<HTMLInputElement>) => boolean;
|
|
27
|
-
/**
|
|
28
|
-
* Calculate character count including separators and sign
|
|
29
|
-
*/
|
|
30
12
|
export declare const getFormattedNumberLength: (value: number | string | null, format: WidgetFormat | undefined) => number;
|
|
31
13
|
export declare const normalizeNumericDefault: (defaultValue: unknown, format: WidgetFormat | undefined) => number | null | undefined;
|
|
32
14
|
//# sourceMappingURL=numberInput.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"numberInput.d.ts","sourceRoot":"","sources":["../../src/utils/numberInput.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,
|
|
1
|
+
{"version":3,"file":"numberInput.d.ts","sourceRoot":"","sources":["../../src/utils/numberInput.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExC,eAAO,MAAM,YAAY,GACvB,OAAO,MAAM,GAAG,MAAM,EACtB,QAAQ,YAAY,GAAG,SAAS,KAC/B,MA6BF,CAAC;AAsCF,eAAO,MAAM,WAAW,GACtB,OAAO,MAAM,EACb,QAAQ,YAAY,GAAG,SAAS,KAC/B,MAAM,GAAG,IAqBX,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAChC,OAAO,MAAM,EACb,QAAQ,YAAY,GAAG,SAAS,KAC/B,MAcF,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAC/B,OAAO,MAAM,GAAG,IAAI,EACpB,QAAQ,YAAY,GAAG,SAAS,EAChC,aAAa;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,cAAc,CAAC,EAAE,MAAM,CAAA;CAAE,KACrF,MAAM,EA4CR,CAAC;AAEF,eAAO,MAAM,YAAY,GACvB,KAAK,MAAM,EACX,QAAQ,YAAY,GAAG,SAAS,EAChC,cAAc,MAAM,EACpB,QAAQ,KAAK,CAAC,aAAa,CAAC,gBAAgB,CAAC,KAC5C,OA2CF,CAAC;AAEF,eAAO,MAAM,wBAAwB,GACnC,OAAO,MAAM,GAAG,MAAM,GAAG,IAAI,EAC7B,QAAQ,YAAY,GAAG,SAAS,KAC/B,MAUF,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAClC,cAAc,OAAO,EACrB,QAAQ,YAAY,GAAG,SAAS,KAC/B,MAAM,GAAG,IAAI,GAAG,SAkBlB,CAAC"}
|
|
@@ -12,13 +12,6 @@ export declare const setValueByPath: (obj: any, path: string, value: any) => any
|
|
|
12
12
|
* Parse widget data path (can be string or object)
|
|
13
13
|
*/
|
|
14
14
|
export declare const parseDataPath: (dataPath: string | Record<string, string> | undefined) => string | Record<string, string> | null;
|
|
15
|
-
/**
|
|
16
|
-
* Get value from widget state using data path
|
|
17
|
-
*/
|
|
18
|
-
/**
|
|
19
|
-
* Resolve a widget-id reference in Redux values.
|
|
20
|
-
* Supports namespaced ids (e.g. "rv-section-0__region_code" when ref is "region_code").
|
|
21
|
-
*/
|
|
22
15
|
export declare const resolveWidgetIdValue: (values: Record<string, any>, ref: string) => any;
|
|
23
16
|
export declare const getWidgetValue: (values: Record<string, any>, dataPath: string | Record<string, string> | undefined, widgetId: string) => any;
|
|
24
17
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pathUtils.d.ts","sourceRoot":"","sources":["../../src/utils/pathUtils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,cAAc,GAAI,KAAK,GAAG,EAAE,MAAM,MAAM,K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AG,SAAS,EACrD,UAAU,MAAM,EAChB,OAAO,GAAG,KACT,MAAM,CAAC,MAAM,EAAE,GAAG,CAgBpB,CAAC"}
|
|
@@ -1,23 +1,5 @@
|
|
|
1
1
|
import { UISchema, PanelConfig, BaseWidgetConfig } from '../types';
|
|
2
|
-
/**
|
|
3
|
-
* Recursively translate widget configuration using translation keys
|
|
4
|
-
* This utility helps transform a schema with translation keys into translated strings
|
|
5
|
-
*
|
|
6
|
-
* @param widgetConfig - Widget configuration that may contain translation keys
|
|
7
|
-
* @param translate - Translation function (from useWidgetTranslation or i18next)
|
|
8
|
-
* @returns Translated widget configuration
|
|
9
|
-
*/
|
|
10
2
|
export declare const translateWidgetConfig: (widgetConfig: BaseWidgetConfig, translate: (key: string, options?: any) => string) => BaseWidgetConfig;
|
|
11
|
-
/**
|
|
12
|
-
* Recursively translate panel configuration
|
|
13
|
-
*/
|
|
14
3
|
export declare const translatePanelConfig: (panel: PanelConfig, translate: (key: string, options?: any) => string) => PanelConfig;
|
|
15
|
-
/**
|
|
16
|
-
* Translate entire UI Schema
|
|
17
|
-
*
|
|
18
|
-
* @param schema - UI Schema with potential translation keys
|
|
19
|
-
* @param translate - Translation function
|
|
20
|
-
* @returns Translated UI Schema
|
|
21
|
-
*/
|
|
22
4
|
export declare const translateUISchema: (schema: UISchema, translate: (key: string, options?: any) => string) => UISchema;
|
|
23
5
|
//# sourceMappingURL=schemaTranslation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemaTranslation.d.ts","sourceRoot":"","sources":["../../src/utils/schemaTranslation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAiB,WAAW,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAElF
|
|
1
|
+
{"version":3,"file":"schemaTranslation.d.ts","sourceRoot":"","sources":["../../src/utils/schemaTranslation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAiB,WAAW,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAElF,eAAO,MAAM,qBAAqB,GAChC,cAAc,gBAAgB,EAC9B,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,KAAK,MAAM,KAChD,gBAsFF,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAC/B,OAAO,WAAW,EAClB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,KAAK,MAAM,KAChD,WAcF,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAC5B,QAAQ,QAAQ,EAChB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,KAAK,MAAM,KAChD,QAsBF,CAAC"}
|
|
@@ -10,15 +10,9 @@ export interface SectionEditSnapshot {
|
|
|
10
10
|
}>;
|
|
11
11
|
widgetIds: Record<string, SectionWidgetIdSnapshot>;
|
|
12
12
|
}
|
|
13
|
-
/**
|
|
14
|
-
* Capture Redux widget values for a section at edit entry.
|
|
15
|
-
* Used to restore exact pre-edit state on Cancel (schemaData may be stale or shared with Redux).
|
|
16
|
-
*/
|
|
17
13
|
export declare function captureSectionEditSnapshot(values: Record<string, any>, section: SectionConfig, options?: {
|
|
18
|
-
namespace?: string;
|
|
19
14
|
sectionId?: string;
|
|
20
15
|
supportingDocuments?: SupportingDocumentConfig[];
|
|
21
16
|
}): SectionEditSnapshot;
|
|
22
|
-
/** Apply a section edit snapshot back onto the full Redux values object. */
|
|
23
17
|
export declare function applySectionEditSnapshot(currentValues: Record<string, any>, snapshot: SectionEditSnapshot): Record<string, any>;
|
|
24
18
|
//# sourceMappingURL=sectionRevert.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sectionRevert.d.ts","sourceRoot":"","sources":["../../src/utils/sectionRevert.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAInE,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,GAAG,CAAC;CACb;AAED,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,GAAG,CAAA;KAAE,CAAC,CAAC;IAC/C,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,uBAAuB,CAAC,CAAC;CACpD;
|
|
1
|
+
{"version":3,"file":"sectionRevert.d.ts","sourceRoot":"","sources":["../../src/utils/sectionRevert.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAInE,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,GAAG,CAAC;CACb;AAED,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,GAAG,CAAA;KAAE,CAAC,CAAC;IAC/C,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,uBAAuB,CAAC,CAAC;CACpD;AAaD,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC3B,OAAO,EAAE,aAAa,EACtB,OAAO,CAAC,EAAE;IACR,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mBAAmB,CAAC,EAAE,wBAAwB,EAAE,CAAC;CAClD,GACA,mBAAmB,CAsDrB;AAED,wBAAgB,wBAAwB,CACtC,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAClC,QAAQ,EAAE,mBAAmB,GAC5B,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAiBrB"}
|
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
import { WidgetDispatch } from
|
|
2
|
-
import { SectionConfig, PanelConfig, BaseWidgetConfig } from
|
|
1
|
+
import { WidgetDispatch } from '../store';
|
|
2
|
+
import { SectionConfig, PanelConfig, BaseWidgetConfig } from '../types';
|
|
3
3
|
export declare const collectWidgets: (panels: PanelConfig[]) => BaseWidgetConfig[];
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* @param skipRequired - When true, required-field checks (widget-required,
|
|
8
|
-
* validation.required, document-required) are skipped. Use this for
|
|
9
|
-
* per-section Save/Next navigation so the user can advance without filling
|
|
10
|
-
* every mandatory field; only format/range errors are reported.
|
|
5
|
+
* @param skipRequired - Skip required checks for per-section Save/Next navigation;
|
|
6
|
+
* format and range validation still run.
|
|
11
7
|
*/
|
|
12
8
|
export declare const sectionValidate: (section: SectionConfig, currentSchemaData: Record<string, any>, dispatch: WidgetDispatch, skipRequired?: boolean) => boolean;
|
|
13
9
|
//# sourceMappingURL=sectionValidate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sectionValidate.d.ts","sourceRoot":"","sources":["../../src/utils/sectionValidate.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"sectionValidate.d.ts","sourceRoot":"","sources":["../../src/utils/sectionValidate.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EACL,aAAa,EACb,WAAW,EACX,gBAAgB,EACjB,MAAM,UAAU,CAAC;AA+FlB,eAAO,MAAM,cAAc,GAAI,QAAQ,WAAW,EAAE,KAAG,gBAAgB,EAWtE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,eAAe,GAC1B,SAAS,aAAa,EACtB,mBAAmB,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACtC,UAAU,cAAc,EACxB,eAAc,OAAe,KAC5B,OAwFF,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
type TFn = (key: string, options?: Record<string, unknown>) => string;
|
|
2
|
+
/** Schema string: translation key when present, otherwise the literal value. */
|
|
3
|
+
export declare function tSchema(t: TFn | undefined, value?: string | null): string;
|
|
4
|
+
export {};
|
|
5
|
+
//# sourceMappingURL=tSchema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tSchema.d.ts","sourceRoot":"","sources":["../../src/utils/tSchema.ts"],"names":[],"mappings":"AAAA,KAAK,GAAG,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,MAAM,CAAC;AAEtE,gFAAgF;AAChF,wBAAgB,OAAO,CAAC,CAAC,EAAE,GAAG,GAAG,SAAS,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAMzE"}
|
|
@@ -1,21 +1,9 @@
|
|
|
1
1
|
import { CharacterType, CaseControl, InputMask } from '../types';
|
|
2
|
-
/**
|
|
3
|
-
* Filter input value based on allowed character type
|
|
4
|
-
*/
|
|
5
2
|
export declare const filterByCharacterType: (value: string, characterType?: CharacterType, customCharset?: string) => string;
|
|
6
|
-
/**
|
|
7
|
-
* Apply case transformation to text
|
|
8
|
-
*/
|
|
9
3
|
export declare const applyCaseControl: (value: string, caseControl?: CaseControl) => string;
|
|
10
|
-
/**
|
|
11
|
-
* Apply input mask to value
|
|
12
|
-
*/
|
|
13
4
|
export declare const applyMask: (value: string, mask: InputMask) => {
|
|
14
5
|
displayValue: string;
|
|
15
6
|
rawValue: string;
|
|
16
7
|
};
|
|
17
|
-
/**
|
|
18
|
-
* Remove mask from value to get raw value
|
|
19
|
-
*/
|
|
20
8
|
export declare const removeMask: (value: string, mask: InputMask) => string;
|
|
21
9
|
//# sourceMappingURL=textInput.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textInput.d.ts","sourceRoot":"","sources":["../../src/utils/textInput.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAEjE
|
|
1
|
+
{"version":3,"file":"textInput.d.ts","sourceRoot":"","sources":["../../src/utils/textInput.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAEjE,eAAO,MAAM,qBAAqB,GAChC,OAAO,MAAM,EACb,gBAAe,aAAqB,EACpC,gBAAgB,MAAM,KACrB,MAuCF,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAC3B,OAAO,MAAM,EACb,cAAa,WAAoB,KAChC,MAeF,CAAC;AAEF,eAAO,MAAM,SAAS,GACpB,OAAO,MAAM,EACb,MAAM,SAAS,KACd;IAAE,YAAY,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAc1C,CAAC;AAoFF,eAAO,MAAM,UAAU,GAAI,OAAO,MAAM,EAAE,MAAM,SAAS,KAAG,MA2C3D,CAAC"}
|
|
@@ -1,15 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { WidgetValidation } from '../types';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* @param skipRequired - When true, required-field checks are skipped (used by
|
|
7
|
-
* per-section Save/Next buttons so the user can move between sections without
|
|
8
|
-
* filling every mandatory field; only format/range checks still run).
|
|
4
|
+
* @param skipRequired - Skip required checks for per-section Save/Next navigation;
|
|
5
|
+
* format and range validation still run.
|
|
9
6
|
*/
|
|
10
7
|
export declare const validateWidget: (value: any, validation: WidgetValidation | undefined, required?: boolean, skipRequired?: boolean) => string[];
|
|
11
|
-
/**
|
|
12
|
-
* Create Zod schema from validation config
|
|
13
|
-
*/
|
|
14
8
|
export declare const createZodSchema: (validation: WidgetValidation | undefined, required?: boolean) => z.ZodSchema | null;
|
|
15
9
|
//# sourceMappingURL=validation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../src/utils/validation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,
|
|
1
|
+
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../src/utils/validation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAG5C;;;GAGG;AACH,eAAO,MAAM,cAAc,GACzB,OAAO,GAAG,EACV,YAAY,gBAAgB,GAAG,SAAS,EACxC,WAAU,OAAe,EACzB,eAAc,OAAe,KAC5B,MAAM,EAyER,CAAC;AAEF,eAAO,MAAM,eAAe,GAC1B,YAAY,gBAAgB,GAAG,SAAS,EACxC,WAAU,OAAe,KACxB,CAAC,CAAC,SAAS,GAAG,IAmDhB,CAAC"}
|
|
@@ -1,17 +1,7 @@
|
|
|
1
1
|
import { ValidationType } from '../types';
|
|
2
|
-
/**
|
|
3
|
-
* Get validation pattern and message for a given validation type
|
|
4
|
-
* @param validationType - The validation type (email, phone, url, etc.)
|
|
5
|
-
* @returns Object with pattern (RegExp) and message, or null if type not found
|
|
6
|
-
*/
|
|
7
2
|
export declare const getValidationPattern: (validationType: ValidationType) => {
|
|
8
3
|
pattern: RegExp;
|
|
9
4
|
message: string;
|
|
10
5
|
} | null;
|
|
11
|
-
/**
|
|
12
|
-
* Get validation pattern string for a given validation type
|
|
13
|
-
* @param validationType - The validation type (email, phone, url, etc.)
|
|
14
|
-
* @returns Regex pattern string, or null if type not found
|
|
15
|
-
*/
|
|
16
6
|
export declare const getValidationPatternString: (validationType: ValidationType) => string | null;
|
|
17
7
|
//# sourceMappingURL=validationPatterns.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validationPatterns.d.ts","sourceRoot":"","sources":["../../src/utils/validationPatterns.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"validationPatterns.d.ts","sourceRoot":"","sources":["../../src/utils/validationPatterns.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAiB1C,eAAO,MAAM,oBAAoB,GAC/B,gBAAgB,cAAc,KAC7B;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAAG,IAEzC,CAAC;AAEF,eAAO,MAAM,0BAA0B,GAAI,gBAAgB,cAAc,KAAG,MAAM,GAAG,IAGpF,CAAC"}
|