@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
|
@@ -2,37 +2,13 @@ import { BaseWidgetConfig, WidgetRegistryEntry } from '../types';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
declare class WidgetRegistry {
|
|
4
4
|
private widgets;
|
|
5
|
-
/**
|
|
6
|
-
* Register a widget
|
|
7
|
-
*/
|
|
8
5
|
register(entry: WidgetRegistryEntry): void;
|
|
9
|
-
/**
|
|
10
|
-
* Register multiple widgets
|
|
11
|
-
*/
|
|
12
6
|
registerMany(entries: WidgetRegistryEntry[]): void;
|
|
13
|
-
/**
|
|
14
|
-
* Get widget entry
|
|
15
|
-
*/
|
|
16
7
|
get(widgetName: string): WidgetRegistryEntry | undefined;
|
|
17
|
-
/**
|
|
18
|
-
* Check if widget is registered
|
|
19
|
-
*/
|
|
20
8
|
has(widgetName: string): boolean;
|
|
21
|
-
/**
|
|
22
|
-
* Get all registered widgets
|
|
23
|
-
*/
|
|
24
9
|
getAll(): WidgetRegistryEntry[];
|
|
25
|
-
/**
|
|
26
|
-
* Unregister a widget
|
|
27
|
-
*/
|
|
28
10
|
unregister(widgetName: string): boolean;
|
|
29
|
-
/**
|
|
30
|
-
* Clear all widgets
|
|
31
|
-
*/
|
|
32
11
|
clear(): void;
|
|
33
|
-
/**
|
|
34
|
-
* Render widget component
|
|
35
|
-
*/
|
|
36
12
|
render(config: BaseWidgetConfig, context: any, defaultComponent?: React.ComponentType<any>): React.ReactNode;
|
|
37
13
|
}
|
|
38
14
|
export declare const widgetRegistry: WidgetRegistry;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WidgetRegistry.d.ts","sourceRoot":"","sources":["../../src/registry/WidgetRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAwB,MAAM,UAAU,CAAC;AACvF,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,cAAM,cAAc;IAClB,OAAO,CAAC,OAAO,CAA+C;IAE9D
|
|
1
|
+
{"version":3,"file":"WidgetRegistry.d.ts","sourceRoot":"","sources":["../../src/registry/WidgetRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAwB,MAAM,UAAU,CAAC;AACvF,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,cAAM,cAAc;IAClB,OAAO,CAAC,OAAO,CAA+C;IAE9D,QAAQ,CAAC,KAAK,EAAE,mBAAmB,GAAG,IAAI;IAI1C,YAAY,CAAC,OAAO,EAAE,mBAAmB,EAAE,GAAG,IAAI;IAIlD,GAAG,CAAC,UAAU,EAAE,MAAM,GAAG,mBAAmB,GAAG,SAAS;IAIxD,GAAG,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO;IAIhC,MAAM,IAAI,mBAAmB,EAAE;IAI/B,UAAU,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO;IAIvC,KAAK,IAAI,IAAI;IAIb,MAAM,CACJ,MAAM,EAAE,gBAAgB,EACxB,OAAO,EAAE,GAAG,EACZ,gBAAgB,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,GAC1C,KAAK,CAAC,SAAS;CA2BnB;AAED,eAAO,MAAM,cAAc,gBAAuB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaultWidgets.d.ts","sourceRoot":"","sources":["../../src/registry/defaultWidgets.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"defaultWidgets.d.ts","sourceRoot":"","sources":["../../src/registry/defaultWidgets.ts"],"names":[],"mappings":"AA0BA,eAAO,MAAM,sBAAsB,YAuBlC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/store/index.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,iBAAiB;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/store/index.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,iBAAiB;;;;;;oCAa7B,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC/D,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC,CAAC;AAClE,MAAM,MAAM,cAAc,GAAG,WAAW,CAAC,UAAU,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"widgetSlice.d.ts","sourceRoot":"","sources":["../../src/store/widgetSlice.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"widgetSlice.d.ts","sourceRoot":"","sources":["../../src/store/widgetSlice.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAmGpD,eAAO,MACL,QAAQ;cAlF8B,MAAM;WAAS,WAAW;uBAmFhE,SAAS,gGACT,QAAQ;cAzC8B,MAAM;YAAU,MAAM,EAAE;uBA0C9D,UAAU;cAhC4B,MAAM;aAAW,OAAO;yBAiC9D,UAAU;cA3B4B,MAAM;aAAW,OAAO;yBA4B9D,aAAa;cAtByB,MAAM;UAAQ,GAAG,EAAE;4BAuBzD,WAAW,qFACX,QAAQ,2EACa,CAAC;;AAExB,wBAAmC"}
|
package/dist/theme/index.d.ts
CHANGED
|
@@ -1,46 +1,21 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* Theme color tokens for the widget library.
|
|
4
|
-
* All properties are optional — omitted values fall back to built-in defaults.
|
|
5
|
-
*
|
|
6
|
-
* Default palette derived from OpenG2P brand colours:
|
|
7
|
-
* Gold #F5BB1A · Orange #F07B1A · Purple #88498F
|
|
8
|
-
* Grey #C4C4C4 · Dark Navy #011627 · Light Grey #F6F6F6
|
|
9
|
-
*/
|
|
10
2
|
export interface WidgetThemeColors {
|
|
11
|
-
/** Main brand colour (default: #F5BB1A — Gold) */
|
|
12
3
|
primary?: string;
|
|
13
|
-
/** Darker brand accent (default: #F07B1A — Orange) */
|
|
14
4
|
primaryDark?: string;
|
|
15
|
-
/** Light brand tint for backgrounds (default: #FBE6AA — Gold +62.5%) */
|
|
16
5
|
primaryLight?: string;
|
|
17
|
-
/** Secondary accent used in edit-mode borders (default: #EE7C22 — Orange 0% shade) */
|
|
18
6
|
primaryAccent?: string;
|
|
19
|
-
/** Standard border colour (default: #C4C4C4 — Grey) */
|
|
20
7
|
border?: string;
|
|
21
|
-
/** Lighter border colour (default: #E4E4E4 — Grey +62.5%) */
|
|
22
8
|
borderLight?: string;
|
|
23
|
-
/** Default background (default: #FFFFFF) */
|
|
24
9
|
background?: string;
|
|
25
|
-
/** Alternate/muted background (default: #F6F6F6 — Light Grey) */
|
|
26
10
|
backgroundAlt?: string;
|
|
27
|
-
/** Primary text colour (default: #011627 — Dark Navy) */
|
|
28
11
|
text?: string;
|
|
29
|
-
/** Secondary / muted text colour (default: #727474 — Grey -37.5%) */
|
|
30
12
|
textMuted?: string;
|
|
31
|
-
/** Success green (default: #16A34A) */
|
|
32
13
|
success?: string;
|
|
33
|
-
/** Success dark green (default: #047857) */
|
|
34
14
|
successDark?: string;
|
|
35
|
-
/** Light success surface for badges / highlights (default: #D1FAE5) */
|
|
36
15
|
successLight?: string;
|
|
37
|
-
/** Error / danger red (default: #B91C1C) */
|
|
38
16
|
error?: string;
|
|
39
|
-
/** Light error surface for badges / highlights (default: #FEE2E2) */
|
|
40
17
|
errorLight?: string;
|
|
41
|
-
/** Warning amber (default: #F59E0B) */
|
|
42
18
|
warning?: string;
|
|
43
|
-
/** Info / link blue (default: #2563EB) */
|
|
44
19
|
info?: string;
|
|
45
20
|
}
|
|
46
21
|
export interface WidgetThemeSection {
|
|
@@ -48,11 +23,9 @@ export interface WidgetThemeSection {
|
|
|
48
23
|
borderColor?: string;
|
|
49
24
|
backgroundColor?: string;
|
|
50
25
|
titleColor?: string;
|
|
51
|
-
/** Horizontal-rule / divider colour between panels (default: primary) */
|
|
52
26
|
dividerColor?: string;
|
|
53
27
|
}
|
|
54
28
|
export interface WidgetThemePanel {
|
|
55
|
-
/** Vertical divider colour between side-by-side panels */
|
|
56
29
|
dividerColor?: string;
|
|
57
30
|
backgroundColor?: string;
|
|
58
31
|
}
|
|
@@ -72,29 +45,17 @@ export interface WidgetThemeWidget {
|
|
|
72
45
|
inputBackground?: string;
|
|
73
46
|
errorColor?: string;
|
|
74
47
|
helpTextColor?: string;
|
|
75
|
-
/** Table: header row background (default: #F6F6F6) */
|
|
76
48
|
tableHeaderBg?: string;
|
|
77
|
-
/** Table: header text colour (default: #727474) */
|
|
78
49
|
tableHeaderColor?: string;
|
|
79
|
-
/** Table: body / cell background (default: #FFFFFF) */
|
|
80
50
|
tableBodyBg?: string;
|
|
81
|
-
/** Table: outer border colour (default: #C4C4C4) */
|
|
82
51
|
tableBorderColor?: string;
|
|
83
|
-
/** Table: row divider lines (default: #E4E4E4) */
|
|
84
52
|
tableRowDividerColor?: string;
|
|
85
|
-
/** Table: background of a row being edited (default: #FBE6AA) */
|
|
86
53
|
tableEditingRowBg?: string;
|
|
87
|
-
/** Table: background of a row marked for deletion (default: #FEE2E2) */
|
|
88
54
|
tableDeletedRowBg?: string;
|
|
89
|
-
/** Table: empty-state text colour (default: #727474) */
|
|
90
55
|
tableEmptyTextColor?: string;
|
|
91
|
-
/** Table: container border radius (default: 15px) */
|
|
92
56
|
tableBorderRadius?: string;
|
|
93
57
|
}
|
|
94
|
-
/**
|
|
95
|
-
* Top-level theme object accepted by `<WidgetProvider theme={…}>`.
|
|
96
|
-
* Every field is optional — only supply what you want to override.
|
|
97
|
-
*/
|
|
58
|
+
/** Top-level theme object accepted by `<WidgetProvider theme={…}>`. */
|
|
98
59
|
export interface WidgetTheme {
|
|
99
60
|
colors?: WidgetThemeColors;
|
|
100
61
|
section?: WidgetThemeSection;
|
|
@@ -102,9 +63,6 @@ export interface WidgetTheme {
|
|
|
102
63
|
button?: WidgetThemeButton;
|
|
103
64
|
widget?: WidgetThemeWidget;
|
|
104
65
|
}
|
|
105
|
-
/**
|
|
106
|
-
* Built-in default values (matches the original hardcoded colours).
|
|
107
|
-
*/
|
|
108
66
|
export declare const defaultTheme: Required<{
|
|
109
67
|
colors: Required<WidgetThemeColors>;
|
|
110
68
|
section: Required<WidgetThemeSection>;
|
|
@@ -112,16 +70,10 @@ export declare const defaultTheme: Required<{
|
|
|
112
70
|
button: Required<WidgetThemeButton>;
|
|
113
71
|
widget: Required<WidgetThemeWidget>;
|
|
114
72
|
}>;
|
|
115
|
-
/**
|
|
116
|
-
* Merge a user-supplied (partial) theme with the built-in defaults.
|
|
117
|
-
*/
|
|
118
73
|
export declare function resolveTheme(theme?: WidgetTheme): typeof defaultTheme;
|
|
119
74
|
/**
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
* reference them with `var(--owt-…)`.
|
|
123
|
-
*
|
|
124
|
-
* Prefix: `--owt-` (OpenG2P Widget Theme).
|
|
75
|
+
* Maps a resolved theme to CSS custom properties (`--owt-*`, OpenG2P Widget Theme)
|
|
76
|
+
* on the provider wrapper for use via `var(--owt-…)`.
|
|
125
77
|
*/
|
|
126
78
|
export declare function themeToCSSVariables(resolved: ReturnType<typeof resolveTheme>): React.CSSProperties;
|
|
127
79
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/theme/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/theme/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,WAAW,iBAAiB;IAChC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,kBAAkB;IACjC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,gBAAgB;IAC/B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,iBAAiB;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB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Q,CAAC,gBAAgB,CAAC,CAAC;IAClC,MAAM,EAAE,QAAQ,CAAC,iBAAiB,CAAC,CAAC;IACpC,MAAM,EAAE,QAAQ,CAAC,iBAAiB,CAAC,CAAC;CACrC,CAyDA,CAAC;AAEF,wBAAgB,YAAY,CAAC,KAAK,CAAC,EAAE,WAAW,GAAG,OAAO,YAAY,CASrE;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,UAAU,CAAC,OAAO,YAAY,CAAC,GACxC,KAAK,CAAC,aAAa,CAiDrB"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,15 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
/**
|
|
3
|
-
* Widget data path can be a string (single path) or object (multi-path)
|
|
4
|
-
*/
|
|
5
2
|
export type WidgetDataPath = string | Record<string, string>;
|
|
6
|
-
/**
|
|
7
|
-
* Data source types
|
|
8
|
-
*/
|
|
9
3
|
export type DataSourceType = 'static' | 'api' | 'schema';
|
|
10
|
-
/**
|
|
11
|
-
* Static data source configuration
|
|
12
|
-
*/
|
|
13
4
|
export interface StaticDataSource {
|
|
14
5
|
type: 'static';
|
|
15
6
|
options: Array<{
|
|
@@ -17,20 +8,10 @@ export interface StaticDataSource {
|
|
|
17
8
|
label: string;
|
|
18
9
|
}>;
|
|
19
10
|
}
|
|
20
|
-
/**
|
|
21
|
-
|
|
22
|
-
* Host application handles all API calls, formatting, CORS, auth, etc.
|
|
23
|
-
*/
|
|
24
|
-
export type DataSourceRequestHandler = (service: string, // Service mnemonic (e.g., "master-data", "geo-service")
|
|
25
|
-
endpoint: string, // Endpoint/operation name (e.g., "get_g2p_geo_level_values", "get_g2p_programs")
|
|
26
|
-
method: string, // HTTP method ("GET", "POST", etc.)
|
|
27
|
-
params: Record<string, any>, // Request parameters (level_id, parent_level_value_id, etc.)
|
|
28
|
-
options?: {
|
|
11
|
+
/** Called by widgets to request data; the host app handles API calls, formatting, CORS, and auth. */
|
|
12
|
+
export type DataSourceRequestHandler = (service: string, endpoint: string, method: string, params: Record<string, any>, options?: {
|
|
29
13
|
headers?: Record<string, string>;
|
|
30
14
|
}) => Promise<any>;
|
|
31
|
-
/**
|
|
32
|
-
* API data source configuration
|
|
33
|
-
*/
|
|
34
15
|
export interface ApiDataSource {
|
|
35
16
|
type: 'api';
|
|
36
17
|
service: string;
|
|
@@ -41,44 +22,63 @@ export interface ApiDataSource {
|
|
|
41
22
|
labelKey?: string;
|
|
42
23
|
params?: Record<string, any>;
|
|
43
24
|
[key: string]: any;
|
|
25
|
+
/** @deprecated Use `service` + `endpoint` instead. */
|
|
44
26
|
url?: string;
|
|
45
27
|
}
|
|
46
|
-
/**
|
|
47
|
-
* Schema reference data source configuration
|
|
48
|
-
*/
|
|
49
28
|
export interface SchemaDataSource {
|
|
50
29
|
type: 'schema';
|
|
51
30
|
path: string;
|
|
52
31
|
valueKey?: string;
|
|
53
32
|
labelKey?: string;
|
|
54
33
|
}
|
|
34
|
+
export interface GeoHierarchyDataSource {
|
|
35
|
+
type: 'api';
|
|
36
|
+
service: string;
|
|
37
|
+
method?: 'POST';
|
|
38
|
+
/** e.g. get-all-g2p-geo-levels (matches /api/master-data/...) */
|
|
39
|
+
levelsEndpoint: string;
|
|
40
|
+
/** e.g. geo-level-values (matches /api/master-data/...) */
|
|
41
|
+
valuesEndpoint: string;
|
|
42
|
+
}
|
|
55
43
|
export type DataSource = StaticDataSource | ApiDataSource | SchemaDataSource;
|
|
56
|
-
/**
|
|
57
|
-
|
|
58
|
-
|
|
44
|
+
/** Configuration for a single upload slot inside a `docs` widget. */
|
|
45
|
+
export interface DocsWidgetDocumentConfig {
|
|
46
|
+
'document-key': string;
|
|
47
|
+
'document-label': string;
|
|
48
|
+
'document-required'?: boolean;
|
|
49
|
+
'document-accept': string;
|
|
50
|
+
'document-max-size': number;
|
|
51
|
+
}
|
|
52
|
+
export interface GeoHierarchyLayout {
|
|
53
|
+
distribution?: 'fixed';
|
|
54
|
+
/** Explicit levels-per-column counts, e.g. [3, 3] for a 6-level hierarchy in 2 columns. */
|
|
55
|
+
columns?: number[];
|
|
56
|
+
/**
|
|
57
|
+
* How many section columns this hierarchy occupies (1–3), matching panel-column-span.
|
|
58
|
+
* Levels are distributed evenly across these columns.
|
|
59
|
+
* When omitted, derived from level count: ≤3 → 1, 4–5 → 2, ≥6 → 3.
|
|
60
|
+
*/
|
|
61
|
+
columnSpan?: number;
|
|
62
|
+
columnIndex?: number;
|
|
63
|
+
}
|
|
64
|
+
/** Optional read path for edit-mode hydration (defaults from widget-data-path). */
|
|
65
|
+
export type GeoHierarchyDataPath = string | {
|
|
66
|
+
value: string;
|
|
67
|
+
hierarchy: string;
|
|
68
|
+
};
|
|
69
|
+
export declare function isGeoHierarchyDataSource(dataSource: unknown): dataSource is GeoHierarchyDataSource;
|
|
59
70
|
export type CharacterType = 'any' | 'alphabetic' | 'alphanumeric' | 'numeric' | 'numeric-decimal' | 'custom';
|
|
60
|
-
/**
|
|
61
|
-
* Case control options
|
|
62
|
-
*/
|
|
63
71
|
export type CaseControl = 'none' | 'lowercase' | 'uppercase' | 'capitalize';
|
|
64
|
-
/**
|
|
65
|
-
* Input mask configuration
|
|
66
|
-
*/
|
|
67
72
|
export interface InputMask {
|
|
68
73
|
pattern: string;
|
|
69
74
|
type?: 'static' | 'phone' | 'national-id' | 'custom';
|
|
70
75
|
placeholder?: string;
|
|
71
76
|
}
|
|
72
|
-
/**
|
|
73
|
-
* Validation type options for common patterns
|
|
74
|
-
*/
|
|
75
77
|
export type ValidationType = 'email' | 'phone' | 'url';
|
|
76
|
-
/**
|
|
77
|
-
* Validation configuration
|
|
78
|
-
*/
|
|
79
78
|
export interface WidgetValidation {
|
|
80
79
|
required?: boolean;
|
|
81
80
|
validationType?: ValidationType;
|
|
81
|
+
/** Pattern takes precedence over `validationType` when both are set. */
|
|
82
82
|
pattern?: string;
|
|
83
83
|
patternMessage?: string;
|
|
84
84
|
minLength?: number;
|
|
@@ -88,29 +88,11 @@ export interface WidgetValidation {
|
|
|
88
88
|
custom?: string;
|
|
89
89
|
zodSchema?: z.ZodSchema;
|
|
90
90
|
}
|
|
91
|
-
/**
|
|
92
|
-
* Numeric type options
|
|
93
|
-
*/
|
|
94
91
|
export type NumericType = 'integer' | 'decimal';
|
|
95
|
-
/**
|
|
96
|
-
* Rounding mode for decimal numbers
|
|
97
|
-
*/
|
|
98
92
|
export type RoundingMode = 'round' | 'truncate';
|
|
99
|
-
/**
|
|
100
|
-
* Text alignment options
|
|
101
|
-
*/
|
|
102
93
|
export type TextAlign = 'left' | 'right';
|
|
103
|
-
/**
|
|
104
|
-
* Boolean representation options
|
|
105
|
-
*/
|
|
106
94
|
export type BooleanRepresentation = 'true-false' | 'yes-no' | 'on-off' | 'custom';
|
|
107
|
-
/**
|
|
108
|
-
* Boolean control type options
|
|
109
|
-
*/
|
|
110
95
|
export type BooleanControlType = 'checkbox' | 'radio' | 'toggle';
|
|
111
|
-
/**
|
|
112
|
-
* Format configuration
|
|
113
|
-
*/
|
|
114
96
|
export interface WidgetFormat {
|
|
115
97
|
dateFormat?: string;
|
|
116
98
|
currency?: string;
|
|
@@ -136,7 +118,6 @@ export interface WidgetFormat {
|
|
|
136
118
|
booleanControlType?: BooleanControlType;
|
|
137
119
|
booleanTrueLabel?: string;
|
|
138
120
|
booleanFalseLabel?: string;
|
|
139
|
-
/** Label for null/unset when allowUnset (radio, toggle); defaults to "Not set" */
|
|
140
121
|
booleanUnsetLabel?: string;
|
|
141
122
|
allowUnset?: boolean;
|
|
142
123
|
layout?: 'vertical' | 'horizontal' | 'grid';
|
|
@@ -146,33 +127,21 @@ export interface WidgetFormat {
|
|
|
146
127
|
dateTimeFormat?: string;
|
|
147
128
|
dateTimeConstraint?: 'any' | 'past-only' | 'future-only';
|
|
148
129
|
}
|
|
149
|
-
/**
|
|
150
|
-
* Condition operators
|
|
151
|
-
*/
|
|
152
130
|
export type ConditionOperator = 'equals' | 'notEquals' | 'notEmpty' | 'empty' | 'greaterThan' | 'lessThan' | 'contains' | 'notContains';
|
|
153
|
-
/**
|
|
154
|
-
* Condition configuration
|
|
155
|
-
*/
|
|
156
131
|
export interface WidgetCondition {
|
|
157
132
|
field: string;
|
|
158
133
|
operator: ConditionOperator;
|
|
159
134
|
value?: any;
|
|
160
135
|
}
|
|
161
|
-
/**
|
|
162
|
-
* Single conditional action rule (used in widget-data-options.actions list)
|
|
163
|
-
*/
|
|
164
136
|
export interface WidgetOptionRule {
|
|
165
137
|
action: 'show' | 'hide' | 'enable' | 'disable' | 'require';
|
|
166
138
|
condition?: WidgetCondition;
|
|
167
139
|
}
|
|
168
|
-
/**
|
|
169
|
-
* Widget options for conditional behavior
|
|
170
|
-
*/
|
|
171
140
|
export interface WidgetOptions {
|
|
172
|
-
|
|
141
|
+
/**`actions` for multiple sequential rules. */
|
|
173
142
|
action?: 'show' | 'hide' | 'enable' | 'disable' | 'require';
|
|
174
143
|
condition?: WidgetCondition;
|
|
175
|
-
/**
|
|
144
|
+
/** Apply enable/disable/show/hide first, then require. */
|
|
176
145
|
actions?: WidgetOptionRule[];
|
|
177
146
|
minDate?: string;
|
|
178
147
|
maxDate?: string;
|
|
@@ -183,9 +152,6 @@ export interface WidgetOptions {
|
|
|
183
152
|
showCalendar?: boolean;
|
|
184
153
|
[key: string]: any;
|
|
185
154
|
}
|
|
186
|
-
/**
|
|
187
|
-
* Widget cascade configuration
|
|
188
|
-
*/
|
|
189
155
|
export interface WidgetCascadeConfig {
|
|
190
156
|
listenTo: string[];
|
|
191
157
|
onEvent?: 'widget:change' | 'widget:blur' | 'widget:focus' | 'widget:reload' | 'widget:clear';
|
|
@@ -194,18 +160,6 @@ export interface WidgetCascadeConfig {
|
|
|
194
160
|
debounce?: number;
|
|
195
161
|
throttle?: number;
|
|
196
162
|
}
|
|
197
|
-
/**
|
|
198
|
-
* Widget geo configuration
|
|
199
|
-
*/
|
|
200
|
-
export interface WidgetGeoConfig {
|
|
201
|
-
level: string;
|
|
202
|
-
isLastLevel: boolean;
|
|
203
|
-
parentWidgetId: string | null;
|
|
204
|
-
levelMnemonic?: string;
|
|
205
|
-
}
|
|
206
|
-
/**
|
|
207
|
-
* Base widget configuration
|
|
208
|
-
*/
|
|
209
163
|
export interface BaseWidgetConfig {
|
|
210
164
|
widget: string;
|
|
211
165
|
'widget-type'?: 'input' | 'layout' | 'table' | 'group';
|
|
@@ -224,7 +178,13 @@ export interface BaseWidgetConfig {
|
|
|
224
178
|
'widget-data-helptext'?: string;
|
|
225
179
|
'widget-data-tooltip'?: string;
|
|
226
180
|
'widget-cascade'?: WidgetCascadeConfig;
|
|
227
|
-
|
|
181
|
+
/** Column layout for geo-hierarchy widget (e.g. 3 levels per column). */
|
|
182
|
+
'widget-geo-layout'?: GeoHierarchyLayout;
|
|
183
|
+
/**
|
|
184
|
+
* Read path for geo_code_hierarchy_json (hydrate/display).
|
|
185
|
+
* To also persist draft hierarchy on edit/save, use object widget-data-path with a hierarchy key.
|
|
186
|
+
*/
|
|
187
|
+
'widget-geo-hierarchy-path'?: string;
|
|
228
188
|
widgets?: BaseWidgetConfig[];
|
|
229
189
|
'widget-item'?: BaseWidgetConfig;
|
|
230
190
|
'widget-data-columns'?: Array<{
|
|
@@ -250,12 +210,11 @@ export interface BaseWidgetConfig {
|
|
|
250
210
|
'widget-data-add-label'?: string;
|
|
251
211
|
'widget-data-collapsed'?: boolean;
|
|
252
212
|
'widget-column-span'?: number;
|
|
213
|
+
'widget-total-docs'?: number;
|
|
214
|
+
documents?: DocsWidgetDocumentConfig[];
|
|
253
215
|
_comment?: string;
|
|
254
216
|
[key: string]: any;
|
|
255
217
|
}
|
|
256
|
-
/**
|
|
257
|
-
* Panel configuration - a layout container that can contain nested panels or widgets
|
|
258
|
-
*/
|
|
259
218
|
export interface PanelConfig {
|
|
260
219
|
'panel-id': string;
|
|
261
220
|
'panel-orientation'?: 'horizontal' | 'vertical';
|
|
@@ -263,9 +222,6 @@ export interface PanelConfig {
|
|
|
263
222
|
panels?: PanelConfig[];
|
|
264
223
|
widgets?: BaseWidgetConfig[];
|
|
265
224
|
}
|
|
266
|
-
/**
|
|
267
|
-
* Supporting document configuration
|
|
268
|
-
*/
|
|
269
225
|
export interface SupportingDocumentConfig {
|
|
270
226
|
'document-data-path': string;
|
|
271
227
|
'document-type'?: string;
|
|
@@ -274,9 +230,6 @@ export interface SupportingDocumentConfig {
|
|
|
274
230
|
'document-accept'?: string;
|
|
275
231
|
'document-max-size'?: number;
|
|
276
232
|
}
|
|
277
|
-
/**
|
|
278
|
-
* Section configuration
|
|
279
|
-
*/
|
|
280
233
|
export interface SectionConfig {
|
|
281
234
|
'section-id': string;
|
|
282
235
|
'section-title'?: string;
|
|
@@ -287,19 +240,10 @@ export interface SectionConfig {
|
|
|
287
240
|
'section-supporting-documents'?: SupportingDocumentConfig[];
|
|
288
241
|
panels: PanelConfig[];
|
|
289
242
|
}
|
|
290
|
-
/**
|
|
291
|
-
* UI Schema structure
|
|
292
|
-
*/
|
|
293
243
|
export interface UISchema {
|
|
294
244
|
sections: SectionConfig[];
|
|
295
245
|
}
|
|
296
|
-
/**
|
|
297
|
-
* Widget value type
|
|
298
|
-
*/
|
|
299
246
|
export type WidgetValue = any;
|
|
300
|
-
/**
|
|
301
|
-
* Widget state in Redux store
|
|
302
|
-
*/
|
|
303
247
|
export interface WidgetState {
|
|
304
248
|
values: Record<string, WidgetValue>;
|
|
305
249
|
errors: Record<string, string[]>;
|
|
@@ -307,9 +251,6 @@ export interface WidgetState {
|
|
|
307
251
|
loading: Record<string, boolean>;
|
|
308
252
|
dataSources: Record<string, any[]>;
|
|
309
253
|
}
|
|
310
|
-
/**
|
|
311
|
-
* Widget context value
|
|
312
|
-
*/
|
|
313
254
|
export interface WidgetContextValue {
|
|
314
255
|
widgetId: string;
|
|
315
256
|
value: WidgetValue;
|
|
@@ -322,21 +263,12 @@ export interface WidgetContextValue {
|
|
|
322
263
|
getFieldValue: (path: string) => any;
|
|
323
264
|
getDataSource: (widgetId: string) => any[];
|
|
324
265
|
}
|
|
325
|
-
/**
|
|
326
|
-
* Custom widget render function
|
|
327
|
-
*/
|
|
328
266
|
export type WidgetRenderFunction = (config: BaseWidgetConfig, context: WidgetContextValue) => React.ReactNode;
|
|
329
|
-
/**
|
|
330
|
-
* Widget registry entry
|
|
331
|
-
*/
|
|
332
267
|
export interface WidgetRegistryEntry {
|
|
333
268
|
widget: string;
|
|
334
269
|
component: React.ComponentType<any> | WidgetRenderFunction;
|
|
335
270
|
defaultProps?: Record<string, any>;
|
|
336
271
|
}
|
|
337
|
-
/**
|
|
338
|
-
* API adapter function type
|
|
339
|
-
*/
|
|
340
272
|
export type ApiAdapter = (url: string, options: {
|
|
341
273
|
method?: string;
|
|
342
274
|
headers?: Record<string, string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAE7D,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,KAAK,GAAG,QAAQ,CAAC;AAEzD,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,QAAQ,CAAC;IACf,OAAO,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC3D;AAED,qGAAqG;AACrG,MAAM,MAAM,wBAAwB,GAAG,CACrC,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,CAAC,MAAM,E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|
|
4
4
|
}>;
|
|
5
5
|
/** Return cached API options when already fetched (e.g. duplicate table cells). */
|
|
6
|
-
export declare function getCachedApiDataSource(dataSource: ApiDataSource, allValues: Record<string, any
|
|
6
|
+
export declare function getCachedApiDataSource(dataSource: ApiDataSource, allValues: Record<string, any>): any[] | undefined;
|
|
7
7
|
/**
|
|
8
8
|
* Get static data source options
|
|
9
9
|
*/
|
|
@@ -16,16 +16,10 @@ export declare const getStaticDataSource: (dataSource: Extract<DataSource, {
|
|
|
16
16
|
*/
|
|
17
17
|
export declare const getApiDataSource: (dataSource: Extract<DataSource, {
|
|
18
18
|
type: "api";
|
|
19
|
-
}>, allValues: Record<string, any>, dataSourceRequestHandler: DataSourceRequestHandler
|
|
20
|
-
/**
|
|
21
|
-
* Get schema reference data source options
|
|
22
|
-
*/
|
|
19
|
+
}>, allValues: Record<string, any>, dataSourceRequestHandler: DataSourceRequestHandler) => Promise<any[]>;
|
|
23
20
|
export declare const getSchemaDataSource: (dataSource: Extract<DataSource, {
|
|
24
21
|
type: "schema";
|
|
25
22
|
}>, schemaData: Record<string, any>) => any[];
|
|
26
|
-
/**
|
|
27
|
-
* Transform data source options to { value, label } format
|
|
28
|
-
*/
|
|
29
23
|
export declare const transformDataSourceOptions: (data: any[], valueKey?: string, labelKey?: string) => Array<{
|
|
30
24
|
value: any;
|
|
31
25
|
label: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dataSource.d.ts","sourceRoot":"","sources":["../../src/utils/dataSource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAGhE,KAAK,aAAa,GAAG,OAAO,CAAC,UAAU,EAAE;IAAE,IAAI,EAAE,KAAK,CAAA;CAAE,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"dataSource.d.ts","sourceRoot":"","sources":["../../src/utils/dataSource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAGhE,KAAK,aAAa,GAAG,OAAO,CAAC,UAAU,EAAE;IAAE,IAAI,EAAE,KAAK,CAAA;CAAE,CAAC,CAAC;AA+D1D,mFAAmF;AACnF,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,aAAa,EACzB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAC7B,GAAG,EAAE,GAAG,SAAS,CAYnB;AAED;;GAEG;AACH,eAAO,MAAM,mBAAmB,GAAI,YAAY,OAAO,CAAC,UAAU,EAAE;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,CAAC,KAAG,GAAG,EAE5F,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,gBAAgB,GAC3B,YAAY,OAAO,CAAC,UAAU,EAAE;IAAE,IAAI,EAAE,KAAK,CAAA;CAAE,CAAC,EAChD,WAAW,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC9B,0BAA0B,wBAAwB,KACjD,OAAO,CAAC,GAAG,EAAE,CAgDf,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAC9B,YAAY,OAAO,CAAC,UAAU,EAAE;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,CAAC,EACnD,YAAY,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAC9B,GAAG,EAGL,CAAC;AAGF,eAAO,MAAM,0BAA0B,GACrC,MAAM,GAAG,EAAE,EACX,WAAW,MAAM,EACjB,WAAW,MAAM,KAChB,KAAK,CAAC;IAAE,KAAK,EAAE,GAAG,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAerC,CAAC"}
|
|
@@ -1,45 +1,12 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Date input utilities for parsing, formatting, and validation
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* Parse date string in various formats to Date object
|
|
6
|
-
*/
|
|
7
1
|
export declare const parseDate: (dateString: string) => Date | null;
|
|
8
|
-
/**
|
|
9
|
-
* Format date to ISO string (YYYY-MM-DD) for storage
|
|
10
|
-
*/
|
|
11
2
|
export declare const formatDateToISO: (date: Date | string | null | undefined) => string;
|
|
12
|
-
/**
|
|
13
|
-
* Format date to custom format string
|
|
14
|
-
*/
|
|
15
3
|
export declare const formatDateToString: (date: Date | string | null | undefined, format: string) => string;
|
|
16
|
-
/**
|
|
17
|
-
* Parse custom format string to Date object
|
|
18
|
-
*/
|
|
19
4
|
export declare const parseDateFromFormat: (dateString: string, format: string) => Date | null;
|
|
20
|
-
/**
|
|
21
|
-
* Resolve a stored date value (ISO or parseable string) to YYYY-MM-DD for comparisons.
|
|
22
|
-
*/
|
|
23
5
|
export declare const resolveDateBoundFromFieldValue: (fieldValue: unknown) => string | undefined;
|
|
24
|
-
/**
|
|
25
|
-
* Pick the stricter (later) minimum when combining static and field-based bounds.
|
|
26
|
-
*/
|
|
27
6
|
export declare const mergeMinDateBounds: (boundA: string | undefined, boundB: string | undefined) => string | undefined;
|
|
28
|
-
/**
|
|
29
|
-
* Pick the stricter (earlier) maximum when combining static and field-based bounds.
|
|
30
|
-
*/
|
|
31
7
|
export declare const mergeMaxDateBounds: (boundA: string | undefined, boundB: string | undefined) => string | undefined;
|
|
32
|
-
/**
|
|
33
|
-
* Get min date based on constraint type
|
|
34
|
-
*/
|
|
35
8
|
export declare const getMinDate: (constraint: string | undefined, minDate: string | undefined) => string | undefined;
|
|
36
|
-
/**
|
|
37
|
-
* Get max date based on constraint type
|
|
38
|
-
*/
|
|
39
9
|
export declare const getMaxDate: (constraint: string | undefined, maxDate: string | undefined) => string | undefined;
|
|
40
|
-
/**
|
|
41
|
-
* Validate date constraints
|
|
42
|
-
*/
|
|
43
10
|
export interface DateConstraintMessages {
|
|
44
11
|
minDateMessage?: string;
|
|
45
12
|
maxDateMessage?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dateInput.d.ts","sourceRoot":"","sources":["../../src/utils/dateInput.ts"],"names":[],"mappings":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