@openg2p/registry-widgets 1.1.3-dev.1 → 1.1.3

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.
Files changed (194) hide show
  1. package/README.md +100 -0
  2. package/dist/components/FilePreviewModal.d.ts +2 -4
  3. package/dist/components/FilePreviewModal.d.ts.map +1 -1
  4. package/dist/components/PanelRenderer.d.ts +0 -7
  5. package/dist/components/PanelRenderer.d.ts.map +1 -1
  6. package/dist/components/SectionBuilder/JSONEditorPanel.d.ts.map +1 -1
  7. package/dist/components/SectionBuilder/schemas.d.ts +5 -5
  8. package/dist/components/SectionBuilder/schemas.d.ts.map +1 -1
  9. package/dist/components/SectionRenderer/SectionRenderer.d.ts +3 -0
  10. package/dist/components/SectionRenderer/SectionRenderer.d.ts.map +1 -0
  11. package/dist/components/SectionRenderer/components/CRViewFooter.d.ts +8 -0
  12. package/dist/components/SectionRenderer/components/CRViewFooter.d.ts.map +1 -0
  13. package/dist/components/SectionRenderer/components/EditSectionPortal.d.ts +30 -0
  14. package/dist/components/SectionRenderer/components/EditSectionPortal.d.ts.map +1 -0
  15. package/dist/components/SectionRenderer/components/IntakeFormLayout.d.ts +23 -0
  16. package/dist/components/SectionRenderer/components/IntakeFormLayout.d.ts.map +1 -0
  17. package/dist/components/SectionRenderer/components/PanelGrid.d.ts +17 -0
  18. package/dist/components/SectionRenderer/components/PanelGrid.d.ts.map +1 -0
  19. package/dist/components/SectionRenderer/components/RegistryViewLayout.d.ts +26 -0
  20. package/dist/components/SectionRenderer/components/RegistryViewLayout.d.ts.map +1 -0
  21. package/dist/components/SectionRenderer/components/SectionEditControls.d.ts +7 -0
  22. package/dist/components/SectionRenderer/components/SectionEditControls.d.ts.map +1 -0
  23. package/dist/components/SectionRenderer/components/SectionStyles.d.ts +11 -0
  24. package/dist/components/SectionRenderer/components/SectionStyles.d.ts.map +1 -0
  25. package/dist/components/SectionRenderer/components/SupportingDocuments.d.ts +13 -0
  26. package/dist/components/SectionRenderer/components/SupportingDocuments.d.ts.map +1 -0
  27. package/dist/components/SectionRenderer/components/index.d.ts +9 -0
  28. package/dist/components/SectionRenderer/components/index.d.ts.map +1 -0
  29. package/dist/components/SectionRenderer/hooks/index.d.ts +6 -0
  30. package/dist/components/SectionRenderer/hooks/index.d.ts.map +1 -0
  31. package/dist/components/SectionRenderer/hooks/useCrViewData.d.ts +8 -0
  32. package/dist/components/SectionRenderer/hooks/useCrViewData.d.ts.map +1 -0
  33. package/dist/components/SectionRenderer/hooks/useIntakeFormAccordion.d.ts +6 -0
  34. package/dist/components/SectionRenderer/hooks/useIntakeFormAccordion.d.ts.map +1 -0
  35. package/dist/components/SectionRenderer/hooks/useSectionActions.d.ts +34 -0
  36. package/dist/components/SectionRenderer/hooks/useSectionActions.d.ts.map +1 -0
  37. package/dist/components/SectionRenderer/hooks/useSectionDirty.d.ts +25 -0
  38. package/dist/components/SectionRenderer/hooks/useSectionDirty.d.ts.map +1 -0
  39. package/dist/components/SectionRenderer/hooks/useSectionEditPortal.d.ts +15 -0
  40. package/dist/components/SectionRenderer/hooks/useSectionEditPortal.d.ts.map +1 -0
  41. package/dist/components/SectionRenderer/index.d.ts +3 -0
  42. package/dist/components/SectionRenderer/index.d.ts.map +1 -0
  43. package/dist/components/SectionRenderer/types/index.d.ts +3 -0
  44. package/dist/components/SectionRenderer/types/index.d.ts.map +1 -0
  45. package/dist/components/SectionRenderer/types/sectionChanges.d.ts +8 -0
  46. package/dist/components/SectionRenderer/types/sectionChanges.d.ts.map +1 -0
  47. package/dist/components/SectionRenderer/types/sectionRendererProps.d.ts +30 -0
  48. package/dist/components/SectionRenderer/types/sectionRendererProps.d.ts.map +1 -0
  49. package/dist/components/SectionRenderer/utils/documentWidgetConfig.d.ts +17 -0
  50. package/dist/components/SectionRenderer/utils/documentWidgetConfig.d.ts.map +1 -0
  51. package/dist/components/SectionRenderer/utils/executeSectionSave.d.ts +24 -0
  52. package/dist/components/SectionRenderer/utils/executeSectionSave.d.ts.map +1 -0
  53. package/dist/components/SectionRenderer/utils/index.d.ts +10 -0
  54. package/dist/components/SectionRenderer/utils/index.d.ts.map +1 -0
  55. package/dist/components/SectionRenderer/utils/makePanelsEditable.d.ts +4 -0
  56. package/dist/components/SectionRenderer/utils/makePanelsEditable.d.ts.map +1 -0
  57. package/dist/components/SectionRenderer/utils/panelLayout.d.ts +10 -0
  58. package/dist/components/SectionRenderer/utils/panelLayout.d.ts.map +1 -0
  59. package/dist/components/SectionRenderer/utils/readonlyStyles.d.ts +9 -0
  60. package/dist/components/SectionRenderer/utils/readonlyStyles.d.ts.map +1 -0
  61. package/dist/components/SectionRenderer/utils/revertSectionValues.d.ts +16 -0
  62. package/dist/components/SectionRenderer/utils/revertSectionValues.d.ts.map +1 -0
  63. package/dist/components/SectionRenderer/utils/sectionSnapshot.d.ts +25 -0
  64. package/dist/components/SectionRenderer/utils/sectionSnapshot.d.ts.map +1 -0
  65. package/dist/components/SectionsContainer.d.ts +1 -23
  66. package/dist/components/SectionsContainer.d.ts.map +1 -1
  67. package/dist/components/WidgetFieldLabel.d.ts +2 -5
  68. package/dist/components/WidgetFieldLabel.d.ts.map +1 -1
  69. package/dist/components/WidgetProvider.d.ts +4 -5
  70. package/dist/components/WidgetProvider.d.ts.map +1 -1
  71. package/dist/components/WidgetRenderer.d.ts +2 -2
  72. package/dist/components/WidgetRenderer.d.ts.map +1 -1
  73. package/dist/events/WidgetEventBus.d.ts +0 -22
  74. package/dist/events/WidgetEventBus.d.ts.map +1 -1
  75. package/dist/hooks/useBaseWidget.d.ts +0 -1
  76. package/dist/hooks/useBaseWidget.d.ts.map +1 -1
  77. package/dist/hooks/useGeoHierarchy.d.ts +46 -0
  78. package/dist/hooks/useGeoHierarchy.d.ts.map +1 -0
  79. package/dist/hooks/useWidgetCascade.d.ts.map +1 -1
  80. package/dist/hooks/useWidgetEventBus.d.ts +0 -3
  81. package/dist/hooks/useWidgetEventBus.d.ts.map +1 -1
  82. package/dist/hooks/useWidgetTheme.d.ts +0 -8
  83. package/dist/hooks/useWidgetTheme.d.ts.map +1 -1
  84. package/dist/index.d.ts +75 -1102
  85. package/dist/index.d.ts.map +1 -1
  86. package/dist/index.esm.js +4898 -6568
  87. package/dist/index.esm.js.map +1 -1
  88. package/dist/index.js +4898 -6592
  89. package/dist/index.js.map +1 -1
  90. package/dist/registry/WidgetRegistry.d.ts +0 -24
  91. package/dist/registry/WidgetRegistry.d.ts.map +1 -1
  92. package/dist/registry/defaultWidgets.d.ts +0 -4
  93. package/dist/registry/defaultWidgets.d.ts.map +1 -1
  94. package/dist/store/index.d.ts.map +1 -1
  95. package/dist/store/widgetSlice.d.ts.map +1 -1
  96. package/dist/theme/index.d.ts +3 -51
  97. package/dist/theme/index.d.ts.map +1 -1
  98. package/dist/types/index.d.ts +42 -118
  99. package/dist/types/index.d.ts.map +1 -1
  100. package/dist/utils/dataSource.d.ts +2 -8
  101. package/dist/utils/dataSource.d.ts.map +1 -1
  102. package/dist/utils/dateInput.d.ts +0 -33
  103. package/dist/utils/dateInput.d.ts.map +1 -1
  104. package/dist/utils/datetimeInput.d.ts +1 -28
  105. package/dist/utils/datetimeInput.d.ts.map +1 -1
  106. package/dist/utils/extractTableRecordsFromSnapshot.d.ts.map +1 -1
  107. package/dist/utils/filePreview.d.ts +0 -6
  108. package/dist/utils/filePreview.d.ts.map +1 -1
  109. package/dist/utils/fileSerialization.d.ts +1 -25
  110. package/dist/utils/fileSerialization.d.ts.map +1 -1
  111. package/dist/utils/formatting.d.ts +0 -12
  112. package/dist/utils/formatting.d.ts.map +1 -1
  113. package/dist/utils/geoHierarchy.d.ts +56 -111
  114. package/dist/utils/geoHierarchy.d.ts.map +1 -1
  115. package/dist/utils/numberInput.d.ts +0 -18
  116. package/dist/utils/numberInput.d.ts.map +1 -1
  117. package/dist/utils/pathUtils.d.ts +0 -7
  118. package/dist/utils/pathUtils.d.ts.map +1 -1
  119. package/dist/utils/schemaTranslation.d.ts +0 -18
  120. package/dist/utils/schemaTranslation.d.ts.map +1 -1
  121. package/dist/utils/sectionRevert.d.ts +0 -6
  122. package/dist/utils/sectionRevert.d.ts.map +1 -1
  123. package/dist/utils/sectionValidate.d.ts +4 -8
  124. package/dist/utils/sectionValidate.d.ts.map +1 -1
  125. package/dist/utils/tSchema.d.ts +5 -0
  126. package/dist/utils/tSchema.d.ts.map +1 -0
  127. package/dist/utils/textInput.d.ts +0 -12
  128. package/dist/utils/textInput.d.ts.map +1 -1
  129. package/dist/utils/validation.d.ts +2 -8
  130. package/dist/utils/validation.d.ts.map +1 -1
  131. package/dist/utils/validationPatterns.d.ts +0 -10
  132. package/dist/utils/validationPatterns.d.ts.map +1 -1
  133. package/dist/widgets/BooleanWidget.d.ts +0 -28
  134. package/dist/widgets/BooleanWidget.d.ts.map +1 -1
  135. package/dist/widgets/CheckboxWidget.d.ts +0 -49
  136. package/dist/widgets/CheckboxWidget.d.ts.map +1 -1
  137. package/dist/widgets/DateInputWidget.d.ts +0 -40
  138. package/dist/widgets/DateInputWidget.d.ts.map +1 -1
  139. package/dist/widgets/DateTimeInputWidget.d.ts +0 -35
  140. package/dist/widgets/DateTimeInputWidget.d.ts.map +1 -1
  141. package/dist/widgets/DialogTableWidget.d.ts.map +1 -1
  142. package/dist/widgets/DisplayWidget.d.ts +0 -4
  143. package/dist/widgets/DisplayWidget.d.ts.map +1 -1
  144. package/dist/widgets/DocsWidget.d.ts +15 -0
  145. package/dist/widgets/DocsWidget.d.ts.map +1 -0
  146. package/dist/widgets/FileInputWidget.d.ts +0 -17
  147. package/dist/widgets/FileInputWidget.d.ts.map +1 -1
  148. package/dist/widgets/GeoHierarchyWidget.d.ts +7 -0
  149. package/dist/widgets/GeoHierarchyWidget.d.ts.map +1 -0
  150. package/dist/widgets/HeaderSectionWidget.d.ts.map +1 -1
  151. package/dist/widgets/IdAuthenticationWidget.d.ts.map +1 -1
  152. package/dist/widgets/MultiSelectWidget.d.ts.map +1 -1
  153. package/dist/widgets/NumberInputWidget.d.ts +0 -42
  154. package/dist/widgets/NumberInputWidget.d.ts.map +1 -1
  155. package/dist/widgets/PhoneInputWidget.d.ts +0 -15
  156. package/dist/widgets/PhoneInputWidget.d.ts.map +1 -1
  157. package/dist/widgets/ProfileWidget.d.ts +0 -43
  158. package/dist/widgets/ProfileWidget.d.ts.map +1 -1
  159. package/dist/widgets/RadioWidget.d.ts +0 -37
  160. package/dist/widgets/RadioWidget.d.ts.map +1 -1
  161. package/dist/widgets/RegisterLookupWidget.d.ts.map +1 -1
  162. package/dist/widgets/ScoresDisplayWidget.d.ts +0 -11
  163. package/dist/widgets/ScoresDisplayWidget.d.ts.map +1 -1
  164. package/dist/widgets/SelectWidget.d.ts +0 -16
  165. package/dist/widgets/SelectWidget.d.ts.map +1 -1
  166. package/dist/widgets/TableWidget.d.ts +0 -39
  167. package/dist/widgets/TableWidget.d.ts.map +1 -1
  168. package/dist/widgets/TextAreaWidget.d.ts +0 -33
  169. package/dist/widgets/TextAreaWidget.d.ts.map +1 -1
  170. package/dist/widgets/TextInputWidget.d.ts +0 -41
  171. package/dist/widgets/TextInputWidget.d.ts.map +1 -1
  172. package/dist/widgets/index.d.ts +2 -4
  173. package/dist/widgets/index.d.ts.map +1 -1
  174. package/package.json +11 -14
  175. package/dist/components/SectionRenderer.d.ts +0 -61
  176. package/dist/components/SectionRenderer.d.ts.map +0 -1
  177. package/dist/hooks/useGeoWidgetCascade.d.ts +0 -12
  178. package/dist/hooks/useGeoWidgetCascade.d.ts.map +0 -1
  179. package/dist/hooks/useWidgetTranslation.d.ts +0 -16
  180. package/dist/hooks/useWidgetTranslation.d.ts.map +0 -1
  181. package/dist/i18n/config.d.ts +0 -21
  182. package/dist/i18n/config.d.ts.map +0 -1
  183. package/dist/utils/buildSectionChanges.d.ts +0 -11
  184. package/dist/utils/buildSectionChanges.d.ts.map +0 -1
  185. package/dist/utils/schemaNamespace.d.ts +0 -12
  186. package/dist/utils/schemaNamespace.d.ts.map +0 -1
  187. package/dist/widgets/ArrayWidget.d.ts +0 -29
  188. package/dist/widgets/ArrayWidget.d.ts.map +0 -1
  189. package/dist/widgets/CurrencyInputWidget.d.ts +0 -24
  190. package/dist/widgets/CurrencyInputWidget.d.ts.map +0 -1
  191. package/dist/widgets/IterableAccordionWidget.d.ts +0 -30
  192. package/dist/widgets/IterableAccordionWidget.d.ts.map +0 -1
  193. package/dist/widgets/SimpleTableWidget.d.ts +0 -32
  194. package/dist/widgets/SimpleTableWidget.d.ts.map +0 -1
package/dist/index.d.ts CHANGED
@@ -3,22 +3,10 @@ import * as _reduxjs_toolkit from '@reduxjs/toolkit';
3
3
  import * as redux_thunk from 'redux-thunk';
4
4
  import * as redux from 'redux';
5
5
  import * as react_jsx_runtime from 'react/jsx-runtime';
6
- import React$1, { ReactNode } from 'react';
7
- import * as i18next from 'i18next';
8
- import i18next__default from 'i18next';
9
- export { default as i18n } from 'i18next';
6
+ import React$1, { ComponentType, ReactNode } from 'react';
10
7
 
11
- /**
12
- * Widget data path can be a string (single path) or object (multi-path)
13
- */
14
8
  type WidgetDataPath = string | Record<string, string>;
15
- /**
16
- * Data source types
17
- */
18
9
  type DataSourceType = 'static' | 'api' | 'schema';
19
- /**
20
- * Static data source configuration
21
- */
22
10
  interface StaticDataSource {
23
11
  type: 'static';
24
12
  options: Array<{
@@ -26,20 +14,10 @@ interface StaticDataSource {
26
14
  label: string;
27
15
  }>;
28
16
  }
29
- /**
30
- * Data source request handler - called by widgets to request data from host application
31
- * Host application handles all API calls, formatting, CORS, auth, etc.
32
- */
33
- type DataSourceRequestHandler = (service: string, // Service mnemonic (e.g., "master-data", "geo-service")
34
- endpoint: string, // Endpoint/operation name (e.g., "get_g2p_geo_level_values", "get_g2p_programs")
35
- method: string, // HTTP method ("GET", "POST", etc.)
36
- params: Record<string, any>, // Request parameters (level_id, parent_level_value_id, etc.)
37
- options?: {
17
+ /** Called by widgets to request data; the host app handles API calls, formatting, CORS, and auth. */
18
+ type DataSourceRequestHandler = (service: string, endpoint: string, method: string, params: Record<string, any>, options?: {
38
19
  headers?: Record<string, string>;
39
20
  }) => Promise<any>;
40
- /**
41
- * API data source configuration
42
- */
43
21
  interface ApiDataSource$1 {
44
22
  type: 'api';
45
23
  service: string;
@@ -50,44 +28,56 @@ interface ApiDataSource$1 {
50
28
  labelKey?: string;
51
29
  params?: Record<string, any>;
52
30
  [key: string]: any;
31
+ /** @deprecated Use `service` + `endpoint` instead. */
53
32
  url?: string;
54
33
  }
55
- /**
56
- * Schema reference data source configuration
57
- */
58
34
  interface SchemaDataSource {
59
35
  type: 'schema';
60
36
  path: string;
61
37
  valueKey?: string;
62
38
  labelKey?: string;
63
39
  }
40
+ interface GeoHierarchyDataSource {
41
+ type: 'api';
42
+ service: string;
43
+ method?: 'POST';
44
+ /** e.g. get-all-g2p-geo-levels (matches /api/master-data/...) */
45
+ levelsEndpoint: string;
46
+ /** e.g. geo-level-values (matches /api/master-data/...) */
47
+ valuesEndpoint: string;
48
+ }
64
49
  type DataSource = StaticDataSource | ApiDataSource$1 | SchemaDataSource;
65
- /**
66
- * Allowed character types for text input
67
- */
50
+ /** Configuration for a single upload slot inside a `docs` widget. */
51
+ interface DocsWidgetDocumentConfig {
52
+ 'document-key': string;
53
+ 'document-label': string;
54
+ 'document-required'?: boolean;
55
+ 'document-accept': string;
56
+ 'document-max-size': number;
57
+ }
58
+ interface GeoHierarchyLayout {
59
+ distribution?: 'fixed';
60
+ columns?: number[];
61
+ columnIndex?: number;
62
+ }
63
+ /** Optional read path for edit-mode hydration (defaults from widget-data-path). */
64
+ type GeoHierarchyDataPath = string | {
65
+ value: string;
66
+ hierarchy: string;
67
+ };
68
+ declare function isGeoHierarchyDataSource(dataSource: unknown): dataSource is GeoHierarchyDataSource;
68
69
  type CharacterType = 'any' | 'alphabetic' | 'alphanumeric' | 'numeric' | 'numeric-decimal' | 'custom';
69
- /**
70
- * Case control options
71
- */
72
70
  type CaseControl = 'none' | 'lowercase' | 'uppercase' | 'capitalize';
73
- /**
74
- * Input mask configuration
75
- */
76
71
  interface InputMask {
77
72
  pattern: string;
78
73
  type?: 'static' | 'phone' | 'national-id' | 'custom';
79
74
  placeholder?: string;
80
75
  }
81
- /**
82
- * Validation type options for common patterns
83
- */
84
76
  type ValidationType = 'email' | 'phone' | 'url';
85
- /**
86
- * Validation configuration
87
- */
88
77
  interface WidgetValidation {
89
78
  required?: boolean;
90
79
  validationType?: ValidationType;
80
+ /** Pattern takes precedence over `validationType` when both are set. */
91
81
  pattern?: string;
92
82
  patternMessage?: string;
93
83
  minLength?: number;
@@ -97,29 +87,11 @@ interface WidgetValidation {
97
87
  custom?: string;
98
88
  zodSchema?: z.ZodSchema;
99
89
  }
100
- /**
101
- * Numeric type options
102
- */
103
90
  type NumericType = 'integer' | 'decimal';
104
- /**
105
- * Rounding mode for decimal numbers
106
- */
107
91
  type RoundingMode = 'round' | 'truncate';
108
- /**
109
- * Text alignment options
110
- */
111
92
  type TextAlign = 'left' | 'right';
112
- /**
113
- * Boolean representation options
114
- */
115
93
  type BooleanRepresentation = 'true-false' | 'yes-no' | 'on-off' | 'custom';
116
- /**
117
- * Boolean control type options
118
- */
119
94
  type BooleanControlType = 'checkbox' | 'radio' | 'toggle';
120
- /**
121
- * Format configuration
122
- */
123
95
  interface WidgetFormat {
124
96
  dateFormat?: string;
125
97
  currency?: string;
@@ -145,7 +117,6 @@ interface WidgetFormat {
145
117
  booleanControlType?: BooleanControlType;
146
118
  booleanTrueLabel?: string;
147
119
  booleanFalseLabel?: string;
148
- /** Label for null/unset when allowUnset (radio, toggle); defaults to "Not set" */
149
120
  booleanUnsetLabel?: string;
150
121
  allowUnset?: boolean;
151
122
  layout?: 'vertical' | 'horizontal' | 'grid';
@@ -155,33 +126,21 @@ interface WidgetFormat {
155
126
  dateTimeFormat?: string;
156
127
  dateTimeConstraint?: 'any' | 'past-only' | 'future-only';
157
128
  }
158
- /**
159
- * Condition operators
160
- */
161
129
  type ConditionOperator = 'equals' | 'notEquals' | 'notEmpty' | 'empty' | 'greaterThan' | 'lessThan' | 'contains' | 'notContains';
162
- /**
163
- * Condition configuration
164
- */
165
130
  interface WidgetCondition {
166
131
  field: string;
167
132
  operator: ConditionOperator;
168
133
  value?: any;
169
134
  }
170
- /**
171
- * Single conditional action rule (used in widget-data-options.actions list)
172
- */
173
135
  interface WidgetOptionRule {
174
136
  action: 'show' | 'hide' | 'enable' | 'disable' | 'require';
175
137
  condition?: WidgetCondition;
176
138
  }
177
- /**
178
- * Widget options for conditional behavior
179
- */
180
139
  interface WidgetOptions {
181
- /** @deprecated Prefer `actions` for multiple sequential rules */
140
+ /**`actions` for multiple sequential rules. */
182
141
  action?: 'show' | 'hide' | 'enable' | 'disable' | 'require';
183
142
  condition?: WidgetCondition;
184
- /** Sequential rules: enable/disable/show/hide first, then require */
143
+ /** Apply enable/disable/show/hide first, then require. */
185
144
  actions?: WidgetOptionRule[];
186
145
  minDate?: string;
187
146
  maxDate?: string;
@@ -192,9 +151,6 @@ interface WidgetOptions {
192
151
  showCalendar?: boolean;
193
152
  [key: string]: any;
194
153
  }
195
- /**
196
- * Widget cascade configuration
197
- */
198
154
  interface WidgetCascadeConfig {
199
155
  listenTo: string[];
200
156
  onEvent?: 'widget:change' | 'widget:blur' | 'widget:focus' | 'widget:reload' | 'widget:clear';
@@ -203,18 +159,6 @@ interface WidgetCascadeConfig {
203
159
  debounce?: number;
204
160
  throttle?: number;
205
161
  }
206
- /**
207
- * Widget geo configuration
208
- */
209
- interface WidgetGeoConfig {
210
- level: string;
211
- isLastLevel: boolean;
212
- parentWidgetId: string | null;
213
- levelMnemonic?: string;
214
- }
215
- /**
216
- * Base widget configuration
217
- */
218
162
  interface BaseWidgetConfig {
219
163
  widget: string;
220
164
  'widget-type'?: 'input' | 'layout' | 'table' | 'group';
@@ -233,7 +177,12 @@ interface BaseWidgetConfig {
233
177
  'widget-data-helptext'?: string;
234
178
  'widget-data-tooltip'?: string;
235
179
  'widget-cascade'?: WidgetCascadeConfig;
236
- 'widget-geo-config'?: WidgetGeoConfig;
180
+ /** Column layout for geo-hierarchy widget (e.g. 3 levels per column). */
181
+ 'widget-geo-layout'?: GeoHierarchyLayout;
182
+ /**
183
+ * Read path for geo_code_hierarchy_json (geo-hierarchy widget, edit-mode hydrate).
184
+ */
185
+ 'widget-geo-hierarchy-path'?: string;
237
186
  widgets?: BaseWidgetConfig[];
238
187
  'widget-item'?: BaseWidgetConfig;
239
188
  'widget-data-columns'?: Array<{
@@ -259,12 +208,11 @@ interface BaseWidgetConfig {
259
208
  'widget-data-add-label'?: string;
260
209
  'widget-data-collapsed'?: boolean;
261
210
  'widget-column-span'?: number;
211
+ 'widget-total-docs'?: number;
212
+ documents?: DocsWidgetDocumentConfig[];
262
213
  _comment?: string;
263
214
  [key: string]: any;
264
215
  }
265
- /**
266
- * Panel configuration - a layout container that can contain nested panels or widgets
267
- */
268
216
  interface PanelConfig {
269
217
  'panel-id': string;
270
218
  'panel-orientation'?: 'horizontal' | 'vertical';
@@ -272,9 +220,6 @@ interface PanelConfig {
272
220
  panels?: PanelConfig[];
273
221
  widgets?: BaseWidgetConfig[];
274
222
  }
275
- /**
276
- * Supporting document configuration
277
- */
278
223
  interface SupportingDocumentConfig {
279
224
  'document-data-path': string;
280
225
  'document-type'?: string;
@@ -283,9 +228,6 @@ interface SupportingDocumentConfig {
283
228
  'document-accept'?: string;
284
229
  'document-max-size'?: number;
285
230
  }
286
- /**
287
- * Section configuration
288
- */
289
231
  interface SectionConfig {
290
232
  'section-id': string;
291
233
  'section-title'?: string;
@@ -296,19 +238,10 @@ interface SectionConfig {
296
238
  'section-supporting-documents'?: SupportingDocumentConfig[];
297
239
  panels: PanelConfig[];
298
240
  }
299
- /**
300
- * UI Schema structure
301
- */
302
241
  interface UISchema {
303
242
  sections: SectionConfig[];
304
243
  }
305
- /**
306
- * Widget value type
307
- */
308
244
  type WidgetValue = any;
309
- /**
310
- * Widget state in Redux store
311
- */
312
245
  interface WidgetState {
313
246
  values: Record<string, WidgetValue>;
314
247
  errors: Record<string, string[]>;
@@ -316,9 +249,6 @@ interface WidgetState {
316
249
  loading: Record<string, boolean>;
317
250
  dataSources: Record<string, any[]>;
318
251
  }
319
- /**
320
- * Widget context value
321
- */
322
252
  interface WidgetContextValue {
323
253
  widgetId: string;
324
254
  value: WidgetValue;
@@ -331,21 +261,12 @@ interface WidgetContextValue {
331
261
  getFieldValue: (path: string) => any;
332
262
  getDataSource: (widgetId: string) => any[];
333
263
  }
334
- /**
335
- * Custom widget render function
336
- */
337
264
  type WidgetRenderFunction = (config: BaseWidgetConfig, context: WidgetContextValue) => React.ReactNode;
338
- /**
339
- * Widget registry entry
340
- */
341
265
  interface WidgetRegistryEntry {
342
266
  widget: string;
343
267
  component: React.ComponentType<any> | WidgetRenderFunction;
344
268
  defaultProps?: Record<string, any>;
345
269
  }
346
- /**
347
- * API adapter function type
348
- */
349
270
  type ApiAdapter = (url: string, options: {
350
271
  method?: string;
351
272
  headers?: Record<string, string>;
@@ -397,7 +318,6 @@ interface UseBaseWidgetOptions {
397
318
  declare const useBaseWidget: (options: UseBaseWidgetOptions) => {
398
319
  widgetId: string;
399
320
  value: any;
400
- geoDisplayLabel: string | undefined;
401
321
  formattedValue: any;
402
322
  error: string[];
403
323
  touched: boolean;
@@ -419,11 +339,6 @@ declare const useBaseWidget: (options: UseBaseWidgetOptions) => {
419
339
  config: BaseWidgetConfig;
420
340
  };
421
341
 
422
- /**
423
- * Widget Event Bus
424
- * Provides a publish/subscribe mechanism for widget communication
425
- * Supports debounce and throttle for performance optimization
426
- */
427
342
  type WidgetEventType = 'widget:change' | 'widget:blur' | 'widget:focus' | 'widget:reload' | 'widget:clear';
428
343
  interface WidgetEvent {
429
344
  type: WidgetEventType;
@@ -435,35 +350,15 @@ type EventHandler = (event: WidgetEvent) => void | Promise<void>;
435
350
  declare class WidgetEventBus {
436
351
  private subscriptions;
437
352
  private throttleTimers;
438
- /**
439
- * Subscribe to an event type
440
- * @param eventType The type of event to listen to
441
- * @param handler The handler function
442
- * @param options Debounce/throttle options
443
- * @returns Unsubscribe function
444
- */
445
353
  subscribe(eventType: WidgetEventType, handler: EventHandler, options?: {
446
354
  debounce?: number;
447
355
  throttle?: number;
448
356
  }): () => void;
449
- /**
450
- * Publish an event
451
- * @param event The event to publish
452
- */
453
357
  publish(event: WidgetEvent): void;
454
- /**
455
- * Execute handler with debounce/throttle support
456
- */
457
358
  private executeHandler;
458
- /**
459
- * Clear all subscriptions
460
- */
461
359
  clear(): void;
462
360
  }
463
361
 
464
- /**
465
- * Hook to access the widget event bus from context
466
- */
467
362
  declare const useWidgetEventBus: () => WidgetEventBus | null;
468
363
 
469
364
  interface UseWidgetCascadeOptions {
@@ -477,65 +372,29 @@ interface UseWidgetCascadeOptions {
477
372
  */
478
373
  declare const useWidgetCascade: (options: UseWidgetCascadeOptions) => void;
479
374
 
480
- interface UseGeoWidgetCascadeOptions {
481
- config: BaseWidgetConfig;
482
- dataSourceRequestHandler?: DataSourceRequestHandler;
483
- values: Record<string, any>;
484
- }
485
- /**
486
- * Hook for geo widget cascade functionality
487
- * Handles geo hierarchy building and cascade behavior
488
- */
489
- declare const useGeoWidgetCascade: (options: UseGeoWidgetCascadeOptions) => void;
490
-
491
375
  interface WidgetRendererProps extends Omit<UseBaseWidgetOptions, 'config'> {
492
376
  config: BaseWidgetConfig;
493
- defaultComponent?: React$1.ComponentType<any>;
377
+ defaultComponent?: ComponentType<any>;
494
378
  }
495
379
  declare const WidgetRenderer: ({ config, dataSourceRequestHandler: propDataSourceRequestHandler, schemaData: propSchemaData, onValueChange, defaultComponent, }: WidgetRendererProps) => react_jsx_runtime.JSX.Element | null;
496
380
 
497
- /**
498
- * Theme color tokens for the widget library.
499
- * All properties are optional — omitted values fall back to built-in defaults.
500
- *
501
- * Default palette derived from OpenG2P brand colours:
502
- * Gold #F5BB1A · Orange #F07B1A · Purple #88498F
503
- * Grey #C4C4C4 · Dark Navy #011627 · Light Grey #F6F6F6
504
- */
505
381
  interface WidgetThemeColors {
506
- /** Main brand colour (default: #F5BB1A — Gold) */
507
382
  primary?: string;
508
- /** Darker brand accent (default: #F07B1A — Orange) */
509
383
  primaryDark?: string;
510
- /** Light brand tint for backgrounds (default: #FBE6AA — Gold +62.5%) */
511
384
  primaryLight?: string;
512
- /** Secondary accent used in edit-mode borders (default: #EE7C22 — Orange 0% shade) */
513
385
  primaryAccent?: string;
514
- /** Standard border colour (default: #C4C4C4 — Grey) */
515
386
  border?: string;
516
- /** Lighter border colour (default: #E4E4E4 — Grey +62.5%) */
517
387
  borderLight?: string;
518
- /** Default background (default: #FFFFFF) */
519
388
  background?: string;
520
- /** Alternate/muted background (default: #F6F6F6 — Light Grey) */
521
389
  backgroundAlt?: string;
522
- /** Primary text colour (default: #011627 — Dark Navy) */
523
390
  text?: string;
524
- /** Secondary / muted text colour (default: #727474 — Grey -37.5%) */
525
391
  textMuted?: string;
526
- /** Success green (default: #16A34A) */
527
392
  success?: string;
528
- /** Success dark green (default: #047857) */
529
393
  successDark?: string;
530
- /** Light success surface for badges / highlights (default: #D1FAE5) */
531
394
  successLight?: string;
532
- /** Error / danger red (default: #B91C1C) */
533
395
  error?: string;
534
- /** Light error surface for badges / highlights (default: #FEE2E2) */
535
396
  errorLight?: string;
536
- /** Warning amber (default: #F59E0B) */
537
397
  warning?: string;
538
- /** Info / link blue (default: #2563EB) */
539
398
  info?: string;
540
399
  }
541
400
  interface WidgetThemeSection {
@@ -543,11 +402,9 @@ interface WidgetThemeSection {
543
402
  borderColor?: string;
544
403
  backgroundColor?: string;
545
404
  titleColor?: string;
546
- /** Horizontal-rule / divider colour between panels (default: primary) */
547
405
  dividerColor?: string;
548
406
  }
549
407
  interface WidgetThemePanel {
550
- /** Vertical divider colour between side-by-side panels */
551
408
  dividerColor?: string;
552
409
  backgroundColor?: string;
553
410
  }
@@ -567,29 +424,17 @@ interface WidgetThemeWidget {
567
424
  inputBackground?: string;
568
425
  errorColor?: string;
569
426
  helpTextColor?: string;
570
- /** Table: header row background (default: #F6F6F6) */
571
427
  tableHeaderBg?: string;
572
- /** Table: header text colour (default: #727474) */
573
428
  tableHeaderColor?: string;
574
- /** Table: body / cell background (default: #FFFFFF) */
575
429
  tableBodyBg?: string;
576
- /** Table: outer border colour (default: #C4C4C4) */
577
430
  tableBorderColor?: string;
578
- /** Table: row divider lines (default: #E4E4E4) */
579
431
  tableRowDividerColor?: string;
580
- /** Table: background of a row being edited (default: #FBE6AA) */
581
432
  tableEditingRowBg?: string;
582
- /** Table: background of a row marked for deletion (default: #FEE2E2) */
583
433
  tableDeletedRowBg?: string;
584
- /** Table: empty-state text colour (default: #727474) */
585
434
  tableEmptyTextColor?: string;
586
- /** Table: container border radius (default: 15px) */
587
435
  tableBorderRadius?: string;
588
436
  }
589
- /**
590
- * Top-level theme object accepted by `<WidgetProvider theme={…}>`.
591
- * Every field is optional — only supply what you want to override.
592
- */
437
+ /** Top-level theme object accepted by `<WidgetProvider theme={…}>`. */
593
438
  interface WidgetTheme {
594
439
  colors?: WidgetThemeColors;
595
440
  section?: WidgetThemeSection;
@@ -597,9 +442,6 @@ interface WidgetTheme {
597
442
  button?: WidgetThemeButton;
598
443
  widget?: WidgetThemeWidget;
599
444
  }
600
- /**
601
- * Built-in default values (matches the original hardcoded colours).
602
- */
603
445
  declare const defaultTheme: Required<{
604
446
  colors: Required<WidgetThemeColors>;
605
447
  section: Required<WidgetThemeSection>;
@@ -607,26 +449,22 @@ declare const defaultTheme: Required<{
607
449
  button: Required<WidgetThemeButton>;
608
450
  widget: Required<WidgetThemeWidget>;
609
451
  }>;
610
- /**
611
- * Merge a user-supplied (partial) theme with the built-in defaults.
612
- */
613
452
  declare function resolveTheme(theme?: WidgetTheme): typeof defaultTheme;
614
453
 
615
454
  interface WidgetProviderProps {
616
455
  store?: WidgetStore;
617
456
  dataSourceRequestHandler?: DataSourceRequestHandler;
618
457
  schemaData?: Record<string, any>;
619
- translate?: (key: string, options?: any) => string;
620
- /** Optional theme object to override default colors and styles across all widgets. */
458
+ t?: (key: string, options?: any) => string;
621
459
  theme?: WidgetTheme;
622
460
  children: ReactNode;
623
461
  }
624
462
  declare const useWidgetContext: () => {
625
463
  dataSourceRequestHandler?: DataSourceRequestHandler;
626
464
  schemaData?: Record<string, any>;
627
- translate?: (key: string, options?: any) => string;
465
+ t?: (key: string, options?: any) => string;
628
466
  };
629
- declare const WidgetProvider: ({ store, dataSourceRequestHandler, schemaData, translate, theme, children, }: WidgetProviderProps) => react_jsx_runtime.JSX.Element;
467
+ declare const WidgetProvider: ({ store, dataSourceRequestHandler, schemaData, t, theme, children, }: WidgetProviderProps) => react_jsx_runtime.JSX.Element;
630
468
 
631
469
  interface PanelRendererProps {
632
470
  panel: PanelConfig;
@@ -635,28 +473,21 @@ interface PanelRendererProps {
635
473
  onValueChange?: UseBaseWidgetOptions['onValueChange'];
636
474
  isEditMode?: boolean;
637
475
  }
638
- /**
639
- * Renders a panel with its nested panels or widgets
640
- *
641
- * Panels can contain:
642
- * - Nested panels (for layout composition)
643
- * - Widgets (for actual form inputs/controls)
644
- */
645
476
  declare const PanelRenderer: ({ panel, dataSourceRequestHandler, schemaData, onValueChange, isEditMode, }: PanelRendererProps) => react_jsx_runtime.JSX.Element;
646
477
 
478
+ interface SectionChanges {
479
+ section_id?: string;
480
+ section_register_id?: string;
481
+ records: unknown[];
482
+ files?: unknown[];
483
+ image?: File | null;
484
+ }
485
+
647
486
  type SectionMode = 'RegistryView' | 'CRView' | 'IntakeForm';
648
- /** Form controls passed to host via onFormReady. Allows host to validate and get all section data (e.g. on Submit). */
649
487
  interface SectionsFormHandle {
650
- /** Validate all sections. Returns true if valid, false otherwise. */
651
488
  validate(): Promise<boolean>;
652
- /** Get raw form data from store for all sections (no validation). */
653
489
  getFormData(): Record<string, unknown>;
654
- /** Validate all sections. If valid, returns SectionChanges[]; if invalid, throws. */
655
490
  validateAndGetData(): Promise<SectionChanges[]>;
656
- /**
657
- * Used for form save-draft functionality.
658
- * Retrieves record and file changes without validation.
659
- */
660
491
  getStructuredData(): SectionChanges[];
661
492
  }
662
493
  interface SectionsContainerProps {
@@ -668,33 +499,12 @@ interface SectionsContainerProps {
668
499
  onSectionSave?: (changes: SectionChanges) => Promise<void> | void;
669
500
  hideEditButton?: boolean;
670
501
  mode?: SectionMode;
671
- /** IntakeForm mode: when true or undefined, sections are editable; when false, sections are readonly */
672
502
  isDraft?: boolean;
673
- namespace?: string | ((sectionId: string, index: number) => string);
674
- /** Called when a section's dirty (has unsaved changes) status changes. Only fires while the section is in edit mode. */
675
503
  onSectionDirtyChange?: (sectionId: string, isDirty: boolean) => void;
676
- /** Called when the form is ready. Passes form controls (validate, getFormData, validateAndGetData) so the host can trigger submit from its own button. */
677
504
  onFormReady?: (handle: SectionsFormHandle) => void;
678
505
  }
679
- /**
680
- * Container component that renders multiple sections
681
- *
682
- * Layout behavior:
683
- * - Uses CSS Grid for proper alignment
684
- * - Each grid column = 200px (one vertical panel width)
685
- * - Sections span columns based on their total vertical panel count
686
- * - All sections align to the same grid, ensuring right-side alignment
687
- * - Handles nested structure: multiple horizontal panels, each with multiple vertical panels
688
- */
689
- declare const SectionsContainer: ({ sections, dataSourceRequestHandler: propDataSourceRequestHandler, schemaData, onValueChange, className, onSectionSave, hideEditButton, mode, isDraft, namespace, onSectionDirtyChange, onFormReady, }: SectionsContainerProps) => react_jsx_runtime.JSX.Element;
506
+ declare const SectionsContainer: ({ sections, dataSourceRequestHandler: propDataSourceRequestHandler, schemaData, onValueChange, className, onSectionSave, hideEditButton, mode, isDraft, onSectionDirtyChange, onFormReady, }: SectionsContainerProps) => react_jsx_runtime.JSX.Element;
690
507
 
691
- interface SectionChanges {
692
- section_id?: string;
693
- section_register_id?: string;
694
- records: unknown[];
695
- files?: unknown[];
696
- image?: File | null;
697
- }
698
508
  interface SectionRendererProps {
699
509
  section: SectionConfig;
700
510
  dataSourceRequestHandler?: UseBaseWidgetOptions['dataSourceRequestHandler'];
@@ -704,47 +514,24 @@ interface SectionRendererProps {
704
514
  onSectionSave?: (changes: SectionChanges) => Promise<void> | void;
705
515
  hideEditButton?: boolean;
706
516
  mode?: SectionMode;
707
- namespace?: string;
708
517
  changeRequestType?: 'new' | 'old';
709
518
  showChangeRequestLabel?: boolean;
710
519
  dbSectionId?: string;
711
520
  sectionRegisterId?: string;
712
- /** Called when the section's dirty (has unsaved changes) status changes. Only fires while in edit mode. */
713
521
  onSectionDirtyChange?: (sectionId: string, isDirty: boolean) => void;
714
- /** IntakeForm mode: 0-based index of this section within the form */
715
522
  sectionIndex?: number;
716
- /** IntakeForm mode: total number of sections in the form */
717
523
  sectionCount?: number;
718
- /** IntakeForm mode: index of the currently expanded section (null = all collapsed) */
719
524
  expandedSectionIndex?: number | null;
720
- /** IntakeForm mode: called when user requests to expand a section (e.g. clicks accordion header) */
721
525
  onExpandSection?: (index: number) => void;
722
- /** IntakeForm mode: called when section save completes successfully (collapse current, expand next) */
723
526
  onSectionSaveSuccess?: (index: number) => void;
724
- /** IntakeForm mode: called when user clicks Previous (collapse current, expand previous) */
725
527
  onPreviousSection?: (index: number) => void;
726
- /** IntakeForm mode: when true or undefined, sections are editable; when false, sections are readonly */
727
528
  isDraft?: boolean;
728
- /**
729
- * IntakeForm mode: when true the accordion header is clickable so the user can open/close this
730
- * section freely. False (default) locks the header — navigation is only via Next/Previous.
731
- * SectionsContainer sets this to true for every visited section plus the one immediately after.
732
- */
733
529
  isAccessible?: boolean;
734
- /** RegistryView: called when this section enters or exits edit mode. Used by SectionsContainer to enforce single-edit. */
735
530
  onEditModeChange?: (sectionId: string, editing: boolean) => void;
736
- /** RegistryView: when true, forces this section out of edit mode (another section took over). */
737
531
  forceExitEdit?: boolean;
738
532
  }
739
- /**
740
- * Renders a section with its panels
741
- *
742
- * Layout behavior:
743
- * - Section width is based on max 3 panels (or more on high resolution)
744
- * - Panels wrap when they exceed available width
745
- * - Sections can sit side-by-side if there's space
746
- */
747
- declare const SectionRenderer: ({ section, dataSourceRequestHandler: propDataSourceRequestHandler, schemaData, onValueChange, gridColumnSpan, onSectionSave, hideEditButton, mode, namespace, changeRequestType, showChangeRequestLabel, dbSectionId, sectionRegisterId, onSectionDirtyChange, sectionIndex, sectionCount, expandedSectionIndex, onExpandSection, onSectionSaveSuccess, onPreviousSection, isDraft, isAccessible, onEditModeChange, forceExitEdit, }: SectionRendererProps) => react_jsx_runtime.JSX.Element;
533
+
534
+ declare const SectionRenderer: ({ section, dataSourceRequestHandler: propDataSourceRequestHandler, schemaData, onValueChange, gridColumnSpan, onSectionSave, hideEditButton, mode, changeRequestType, showChangeRequestLabel, dbSectionId, sectionRegisterId, onSectionDirtyChange, sectionIndex, expandedSectionIndex, onExpandSection, onSectionSaveSuccess, onPreviousSection, isDraft, isAccessible, onEditModeChange, forceExitEdit, }: SectionRendererProps) => react_jsx_runtime.JSX.Element;
748
535
 
749
536
  interface SectionBuilderProps {
750
537
  initialSection?: SectionConfig;
@@ -820,574 +607,76 @@ interface PropertyEditorProps {
820
607
  */
821
608
  declare const PropertyEditor: React$1.FC<PropertyEditorProps>;
822
609
 
823
- /**
824
- * Register all default/generic widgets
825
- * This is called automatically when the package is imported
826
- */
827
610
  declare const registerDefaultWidgets: () => void;
828
611
 
829
612
  declare class WidgetRegistry {
830
613
  private widgets;
831
- /**
832
- * Register a widget
833
- */
834
614
  register(entry: WidgetRegistryEntry): void;
835
- /**
836
- * Register multiple widgets
837
- */
838
615
  registerMany(entries: WidgetRegistryEntry[]): void;
839
- /**
840
- * Get widget entry
841
- */
842
616
  get(widgetName: string): WidgetRegistryEntry | undefined;
843
- /**
844
- * Check if widget is registered
845
- */
846
617
  has(widgetName: string): boolean;
847
- /**
848
- * Get all registered widgets
849
- */
850
618
  getAll(): WidgetRegistryEntry[];
851
- /**
852
- * Unregister a widget
853
- */
854
619
  unregister(widgetName: string): boolean;
855
- /**
856
- * Clear all widgets
857
- */
858
620
  clear(): void;
859
- /**
860
- * Render widget component
861
- */
862
621
  render(config: BaseWidgetConfig, context: any, defaultComponent?: React$1.ComponentType<any>): React$1.ReactNode;
863
622
  }
864
623
  declare const widgetRegistry: WidgetRegistry;
865
624
 
866
- /**
867
- * Generic text input widget with advanced features
868
- * Supports all text-based inputs via configuration (text, email, password, number, tel, url, etc.)
869
- *
870
- * Features:
871
- * - Allowed character types (any, alphabetic, alphanumeric, numeric, numeric-decimal, custom)
872
- * - Case control (none, lowercase, uppercase, capitalize)
873
- * - Length constraints with live character counter
874
- * - Regular expression validation with custom messages
875
- * - Input masking (static and dynamic)
876
- * - Placeholder text with i18n support
877
- *
878
- * Usage in schema:
879
- * {
880
- * "widget": "text",
881
- * "widget-type": "input",
882
- * "widget-label": "Field Label",
883
- * "widget-id": "fieldId",
884
- * "widget-data-path": "person.name",
885
- * "widget-data-format": {
886
- * "inputType": "email",
887
- * "characterType": "alphanumeric",
888
- * "caseControl": "lowercase",
889
- * "mask": {
890
- * "pattern": "XXX-XXX-XXXX",
891
- * "type": "static"
892
- * },
893
- * "showCharCounter": true
894
- * },
895
- * "widget-data-validation": {
896
- * "validationType": "email", // Predefined type: "email", "phone", or "url"
897
- * // OR use custom pattern:
898
- * // "pattern": "^[a-z0-9]+$",
899
- * // "patternMessage": "Only lowercase alphanumeric characters allowed",
900
- * "minLength": 5,
901
- * "maxLength": 20
902
- * },
903
- * "widget-required": true,
904
- * "widget-data-placeholder": "Enter your value"
905
- * }
906
- */
907
625
  interface TextInputWidgetProps {
908
626
  config: BaseWidgetConfig;
909
627
  }
910
628
  declare const TextInputWidget: ({ config }: TextInputWidgetProps) => react_jsx_runtime.JSX.Element;
911
629
 
912
- /**
913
- * Number input widget with advanced numeric features
914
- *
915
- * Features:
916
- * - Numeric type (integer/decimal, signed/unsigned)
917
- * - Decimal precision control (0-6 places, rounding/truncation)
918
- * - Value range validation (min/max)
919
- * - Regular expression validation with custom messages
920
- * - Maximum character limit
921
- * - Default value (numeric, applied when field has no existing data)
922
- * - Numeric masking and formatting (thousand/decimal separators)
923
- * - Text alignment (right by default, configurable)
924
- * - Key input restrictions
925
- *
926
- * Usage in schema:
927
- * {
928
- * "widget": "number",
929
- * "widget-type": "input",
930
- * "widget-label": "Amount",
931
- * "widget-id": "amount",
932
- * "widget-data-path": "transaction.amount",
933
- * "widget-data-format": {
934
- * "numericType": "decimal",
935
- * "decimalPlaces": 2,
936
- * "roundingMode": "round",
937
- * "thousandSeparator": ",",
938
- * "decimalSeparator": ".",
939
- * "textAlign": "right",
940
- * "allowSigned": true,
941
- * "formatOnBlur": true
942
- * },
943
- * "widget-data-validation": {
944
- * "min": 0,
945
- * "max": 10000,
946
- * "pattern": "^[0-9]+(\\.[0-9]{1,2})?$",
947
- * "patternMessage": "Invalid number format"
948
- * },
949
- * "widget-data-default": 0,
950
- * "widget-required": true,
951
- * "widget-data-placeholder": "Enter amount"
952
- * }
953
- */
954
630
  interface NumberInputWidgetProps {
955
631
  config: BaseWidgetConfig;
956
632
  }
957
633
  declare const NumberInputWidget: ({ config }: NumberInputWidgetProps) => react_jsx_runtime.JSX.Element;
958
634
 
959
- /**
960
- * Boolean widget with advanced features
961
- *
962
- * Features:
963
- * - Boolean representation (true/false, yes/no, on/off, custom labels)
964
- * - Control type (checkbox, radio buttons, toggle/switch)
965
- * - Default value (true, false, unset/null)
966
- * - Required vs optional
967
- * - Layout options (horizontal/vertical)
968
- *
969
- * Usage in schema:
970
- * {
971
- * "widget": "boolean",
972
- * "widget-type": "input",
973
- * "widget-label": "Is Married",
974
- * "widget-id": "married",
975
- * "widget-data-path": "person.married",
976
- * "widget-data-default": false,
977
- * "widget-data-format": {
978
- * "booleanRepresentation": "yes-no",
979
- * "booleanControlType": "radio",
980
- * "allowUnset": true
981
- * },
982
- * "widget-data-validation": {},
983
- * "widget-required": false,
984
- * "widget-orientation": "horizontal"
985
- * }
986
- */
987
635
  interface BooleanWidgetProps {
988
636
  config: BaseWidgetConfig;
989
637
  }
990
638
  declare const BooleanWidget: ({ config }: BooleanWidgetProps) => react_jsx_runtime.JSX.Element;
991
639
 
992
- /**
993
- * Date input widget with advanced features
994
- *
995
- * Features:
996
- * - Configurable date format (DD/MM/YYYY, MM/DD/YYYY, YYYY-MM-DD, etc.)
997
- * - Default value (none / today)
998
- * - Date constraints (minDate, maxDate, any/past only/future only)
999
- * - Relative bounds via minDateField / maxDateField (e.g. end date >= start date)
1000
- * - Required vs optional
1001
- * - Input method (date picker / manual / hybrid)
1002
- * - Placeholder text
1003
- * - Read-only & disabled
1004
- * - Canonical stored format (ISO 8601)
1005
- *
1006
- * Usage in schema:
1007
- * {
1008
- * "widget": "date",
1009
- * "widget-type": "input",
1010
- * "widget-label": "Date of Birth",
1011
- * "widget-id": "dob",
1012
- * "widget-data-path": "person.dob",
1013
- * "widget-data-default": "today",
1014
- * "widget-data-format": {
1015
- * "dateFormat": "DD/MM/YYYY",
1016
- * "inputMethod": "hybrid",
1017
- * "dateConstraint": "past-only"
1018
- * },
1019
- * "widget-data-options": {
1020
- * "minDate": "1900-01-01",
1021
- * "maxDate": "today"
1022
- * "minDateField": "register.start_date",
1023
- * "minDateMessage": "Date of birth must be on or after 1900-01-01"
1024
- * "maxDateField": "register.end_date",
1025
- * "maxDateMessage": "Date of birth must be on or before today"
1026
- * },
1027
- * "widget-data-validation": {},
1028
- * "widget-required": true,
1029
- * "widget-data-placeholder": "DD/MM/YYYY"
1030
- * }
1031
- */
1032
640
  interface DateInputWidgetProps {
1033
641
  config: BaseWidgetConfig;
1034
642
  }
1035
643
  declare const DateInputWidget: ({ config }: DateInputWidgetProps) => react_jsx_runtime.JSX.Element;
1036
644
 
1037
- /**
1038
- * DateTime input widget with advanced features
1039
- *
1040
- * Features:
1041
- * - Configurable datetime format (DD/MM/YYYY HH:mm, MM/DD/YYYY HH:mm:ss, etc.)
1042
- * - Default value (none / now)
1043
- * - DateTime constraints (minDateTime, maxDateTime, any/past only/future only)
1044
- * - Required vs optional
1045
- * - Input method (datetime picker / manual / hybrid)
1046
- * - Placeholder text
1047
- * - Read-only & disabled
1048
- * - Canonical stored format (ISO 8601 with time)
1049
- *
1050
- * Usage in schema:
1051
- * {
1052
- * "widget": "datetime",
1053
- * "widget-type": "input",
1054
- * "widget-label": "Appointment Time",
1055
- * "widget-id": "appointment",
1056
- * "widget-data-path": "appointment.datetime",
1057
- * "widget-data-default": "now",
1058
- * "widget-data-format": {
1059
- * "dateTimeFormat": "DD/MM/YYYY HH:mm",
1060
- * "inputMethod": "picker",
1061
- * "dateTimeConstraint": "future-only"
1062
- * },
1063
- * "widget-data-options": {
1064
- * "minDateTime": "2024-01-01T00:00",
1065
- * "maxDateTime": "now"
1066
- * },
1067
- * "widget-data-validation": {},
1068
- * "widget-required": true,
1069
- * "widget-data-placeholder": "DD/MM/YYYY HH:mm"
1070
- * }
1071
- */
1072
645
  interface DateTimeInputWidgetProps {
1073
646
  config: BaseWidgetConfig;
1074
647
  }
1075
648
  declare const DateTimeInputWidget: ({ config }: DateTimeInputWidgetProps) => react_jsx_runtime.JSX.Element;
1076
649
 
1077
- /**
1078
- * Select/Dropdown widget with data source support
1079
- *
1080
- * Usage in schema:
1081
- * {
1082
- * "widget": "select",
1083
- * "widget-type": "input",
1084
- * "widget-label": "Country",
1085
- * "widget-id": "country",
1086
- * "widget-data-path": "address.country",
1087
- * "widget-data-source": {
1088
- * "type": "static" | "api" | "schema",
1089
- * ...
1090
- * }
1091
- * }
1092
- */
1093
650
  interface SelectWidgetProps {
1094
651
  config: BaseWidgetConfig;
1095
652
  }
1096
653
  declare const SelectWidget: ({ config }: SelectWidgetProps) => react_jsx_runtime.JSX.Element;
1097
654
 
1098
- /**
1099
- * Radio button widget with advanced features
1100
- *
1101
- * Features:
1102
- * - Static list of options
1103
- * - Dynamic options (from API / dataset)
1104
- * - Ordered options (preserve order or sort)
1105
- * - Option label & value separation
1106
- * - Display label
1107
- * - Stored value
1108
- * - Default selection (pre-selected option or unset)
1109
- * - Required vs optional
1110
- * - Layout options (vertical, horizontal, grid)
1111
- *
1112
- * Usage in schema:
1113
- * {
1114
- * "widget": "radio",
1115
- * "widget-type": "input",
1116
- * "widget-label": "Gender",
1117
- * "widget-id": "gender",
1118
- * "widget-data-path": "person.gender",
1119
- * "widget-data-default": "male",
1120
- * "widget-data-source": {
1121
- * "type": "static",
1122
- * "options": [
1123
- * { "value": "male", "label": "Male" },
1124
- * { "value": "female", "label": "Female" },
1125
- * { "value": "other", "label": "Other" }
1126
- * ]
1127
- * },
1128
- * "widget-data-format": {
1129
- * "layout": "vertical",
1130
- * "sortOptions": false
1131
- * },
1132
- * "widget-required": true
1133
- * }
1134
- */
1135
655
  interface RadioWidgetProps {
1136
656
  config: BaseWidgetConfig;
1137
657
  }
1138
658
  declare const RadioWidget: ({ config }: RadioWidgetProps) => react_jsx_runtime.JSX.Element;
1139
659
 
1140
- /**
1141
- * Checkbox widget with advanced features
1142
- *
1143
- * Features:
1144
- * - Single checkbox (boolean) - when no data source
1145
- * - Multiple checkboxes (array) - when data source provided
1146
- * - Static list of options
1147
- * - Dynamic options (from API / dataset)
1148
- * - Ordered options (preserve order or sort)
1149
- * - Option label & value separation
1150
- * - Display label
1151
- * - Stored value (array for multi-select)
1152
- * - Default selection (pre-selected options or empty array)
1153
- * - Required vs optional (at least one must be selected if required)
1154
- * - Layout options (vertical, horizontal, grid)
1155
- *
1156
- * Usage in schema (single checkbox):
1157
- * {
1158
- * "widget": "checkbox",
1159
- * "widget-type": "input",
1160
- * "widget-label": "I agree to terms",
1161
- * "widget-id": "agree",
1162
- * "widget-data-path": "form.agree",
1163
- * "widget-data-default": false
1164
- * }
1165
- *
1166
- * Usage in schema (multiple checkboxes):
1167
- * {
1168
- * "widget": "checkbox",
1169
- * "widget-type": "input",
1170
- * "widget-label": "Interests",
1171
- * "widget-id": "interests",
1172
- * "widget-data-path": "person.interests",
1173
- * "widget-data-default": ["sports"],
1174
- * "widget-data-source": {
1175
- * "type": "static",
1176
- * "options": [
1177
- * { "value": "sports", "label": "Sports" },
1178
- * { "value": "music", "label": "Music" },
1179
- * { "value": "reading", "label": "Reading" }
1180
- * ]
1181
- * },
1182
- * "widget-data-format": {
1183
- * "layout": "vertical",
1184
- * "sortOptions": false
1185
- * },
1186
- * "widget-required": true
1187
- * }
1188
- */
1189
660
  interface CheckboxWidgetProps {
1190
661
  config: BaseWidgetConfig;
1191
662
  }
1192
663
  declare const CheckboxWidget: ({ config }: CheckboxWidgetProps) => react_jsx_runtime.JSX.Element;
1193
664
 
1194
- /**
1195
- * File input widget
1196
- *
1197
- * Usage in schema:
1198
- * {
1199
- * "widget": "file",
1200
- * "widget-type": "input",
1201
- * "widget-label": "Upload Document",
1202
- * "widget-id": "document",
1203
- * "widget-data-path": "form.document",
1204
- * "widget-data-options": {
1205
- * "accept": ".pdf,.doc,.docx",
1206
- * "multiple": false,
1207
- * "maxSize": 5242880 // 5MB in bytes
1208
- * }
1209
- * }
1210
- */
1211
665
  interface FileInputWidgetProps {
1212
666
  config: BaseWidgetConfig;
1213
667
  }
1214
668
  declare const FileInputWidget: ({ config }: FileInputWidgetProps) => react_jsx_runtime.JSX.Element;
1215
669
 
1216
- /**
1217
- * Simple table widget for structured data
1218
- *
1219
- * Usage in schema:
1220
- * {
1221
- * "widget": "simple-table",
1222
- * "widget-type": "table",
1223
- * "widget-label": "Education History",
1224
- * "widget-id": "educationHistory",
1225
- * "widget-data-path": "education.history",
1226
- * "widget-data-columns": [
1227
- * {
1228
- * "column-key": "degree",
1229
- * "widget-label": "Degree",
1230
- * "widget": "text",
1231
- * "widget-data-path": "degree"
1232
- * }
1233
- * ],
1234
- * "widget-data-operations": {
1235
- * "add": true,
1236
- * "remove": true,
1237
- * "edit": true
1238
- * }
1239
- * }
1240
- */
1241
- interface SimpleTableWidgetProps {
1242
- config: BaseWidgetConfig;
1243
- }
1244
- declare const SimpleTableWidget: ({ config }: SimpleTableWidgetProps) => react_jsx_runtime.JSX.Element;
1245
-
1246
- /**
1247
- * Array widget for simple repeating values
1248
- *
1249
- * Usage in schema:
1250
- * {
1251
- * "widget": "array-widget",
1252
- * "widget-type": "group",
1253
- * "widget-label": "Skills",
1254
- * "widget-id": "skills",
1255
- * "widget-data-path": "person.skills",
1256
- * "widget-item": {
1257
- * "widget": "text",
1258
- * "widget-type": "input",
1259
- * "widget-label": "Skill"
1260
- * },
1261
- * "widget-data-add-label": "Add Skill",
1262
- * "widget-data-operations": {
1263
- * "add": true,
1264
- * "remove": true
1265
- * }
1266
- * }
1267
- */
1268
- interface ArrayWidgetProps {
1269
- config: BaseWidgetConfig;
1270
- }
1271
- declare const ArrayWidget: ({ config }: ArrayWidgetProps) => react_jsx_runtime.JSX.Element | null;
1272
-
1273
- /**
1274
- * Iterable accordion widget - expandable/collapsible container for widgets
1275
- *
1276
- * Usage in schema:
1277
- * {
1278
- * "widget": "iterable-accordion",
1279
- * "widget-type": "group",
1280
- * "widget-label": "Advanced Options",
1281
- * "widget-id": "advancedOptions",
1282
- * "widget-data-path": "person.notes",
1283
- * "widget-data-collapsed": true,
1284
- * "widget-item": {
1285
- * "widget": "text",
1286
- * "widget-type": "input",
1287
- * "widget-label": "Additional Notes",
1288
- * "widget-id": "notes",
1289
- * ...
1290
- * }
1291
- * }
1292
- *
1293
- * Note: widget-item can be any widget config. If it has nested widgets property,
1294
- * those will be rendered as well.
1295
- */
1296
- interface IterableAccordionWidgetProps {
1297
- config: BaseWidgetConfig;
1298
- }
1299
- declare const IterableAccordionWidget: ({ config }: IterableAccordionWidgetProps) => react_jsx_runtime.JSX.Element | null;
1300
-
1301
- /**
1302
- * Phone input widget with formatting
1303
- *
1304
- * Usage in schema:
1305
- * {
1306
- * "widget": "phone",
1307
- * "widget-type": "input",
1308
- * "widget-label": "Phone",
1309
- * "widget-id": "phone",
1310
- * "widget-data-path": "person.phone",
1311
- * "widget-data-format": {
1312
- * "pattern": "(XXX) XXX-XXXX"
1313
- * }
1314
- * }
1315
- */
1316
670
  interface PhoneInputWidgetProps {
1317
671
  config: BaseWidgetConfig;
1318
672
  }
1319
673
  declare const PhoneInputWidget: ({ config }: PhoneInputWidgetProps) => react_jsx_runtime.JSX.Element;
1320
674
 
1321
- /**
1322
- * Currency input widget with formatting
1323
- *
1324
- * Usage in schema:
1325
- * {
1326
- * "widget": "currency",
1327
- * "widget-type": "input",
1328
- * "widget-label": "Salary",
1329
- * "widget-id": "salary",
1330
- * "widget-data-path": "person.salary",
1331
- * "widget-data-format": {
1332
- * "currency": "USD",
1333
- * "locale": "en-US",
1334
- * "decimals": 2
1335
- * }
1336
- * }
1337
- */
1338
- interface CurrencyInputWidgetProps {
1339
- config: BaseWidgetConfig;
1340
- }
1341
- declare const CurrencyInputWidget: ({ config }: CurrencyInputWidgetProps) => react_jsx_runtime.JSX.Element;
1342
-
1343
- /**
1344
- * Display widget for readonly text display
1345
- * Used for displaying information in a card layout
1346
- */
1347
675
  interface DisplayWidgetProps {
1348
676
  config: BaseWidgetConfig;
1349
677
  }
1350
678
  declare const DisplayWidget: ({ config }: DisplayWidgetProps) => react_jsx_runtime.JSX.Element;
1351
679
 
1352
- /**
1353
- * Table widget with record-level inline editing
1354
- *
1355
- * Usage in schema:
1356
- * {
1357
- * "widget": "table",
1358
- * "widget-type": "table",
1359
- * "widget-label": "Education History",
1360
- * "widget-id": "educationHistory",
1361
- * "widget-data-path": "education.history",
1362
- * "widget-data-columns": [
1363
- * {
1364
- * "column-key": "degree",
1365
- * "widget-label": "Degree",
1366
- * "widget": "text",
1367
- * "widget-type": "input",
1368
- * "widget-data-path": "degree",
1369
- * "widget-data-format": {...}
1370
- * },
1371
- * {
1372
- * "column-key": "year",
1373
- * "widget-label": "Year",
1374
- * "widget": "number",
1375
- * "widget-type": "input",
1376
- * "widget-data-path": "year"
1377
- * }
1378
- * ],
1379
- * "widget-data-operations": {
1380
- * "add": true,
1381
- * "remove": true,
1382
- * "edit": true
1383
- * },
1384
- * "widget-data-api": {
1385
- * "add": { "url": "/api/records", "method": "POST" },
1386
- * "edit": { "url": "/api/records/{id}", "method": "PUT" },
1387
- * "delete": { "url": "/api/records/{id}", "method": "DELETE" }
1388
- * }
1389
- * }
1390
- */
1391
680
  interface TableWidgetProps {
1392
681
  config: BaseWidgetConfig;
1393
682
  }
@@ -1403,87 +692,11 @@ interface DialogTableWidgetProps {
1403
692
  */
1404
693
  declare const DialogTableWidget: ({ config }: DialogTableWidgetProps) => react_jsx_runtime.JSX.Element;
1405
694
 
1406
- /**
1407
- * Profile widget for displaying user identity information
1408
- * Displays an image/avatar, display name, and ID in a vertical layout
1409
- *
1410
- * This is a display widget that groups related profile fields together.
1411
- * Recommended widget-type: 'group' (groups related data fields)
1412
- * Alternative: 'layout' (for display-only, no value storage)
1413
- *
1414
- * Configuration (Recommended - Multi-path data binding):
1415
- *
1416
- * - widget-data-path: Object with keys 'image', 'name', 'id' mapping to data paths
1417
- * Example: { "image": "person.photo", "name": "person.name", "id": "person.id" }
1418
- *
1419
- * Alternative (Individual path properties - fallback):
1420
- * - widget-image-path?: string - Data path for the image/photo (e.g., "person.photo")
1421
- * - widget-name-path?: string - Data path for the display name (e.g., "person.name")
1422
- * - widget-id-path?: string - Data path for the ID (e.g., "person.id")
1423
- *
1424
- * Format options:
1425
- * - widget-data-format: Optional format configuration
1426
- * - imageSize?: number - Size of the avatar image in pixels (default: 80)
1427
- * - nameColor?: string - Color for the name text (default: '#F07B1A')
1428
- * - showIdLabel?: boolean - Whether to show "ID :" label (default: true)
1429
- *
1430
- * Example usage (Recommended):
1431
- * ```json
1432
- * {
1433
- * "widget": "profile",
1434
- * "widget-type": "group",
1435
- * "widget-id": "user-profile",
1436
- * "widget-data-path": {
1437
- * "image": "photo",
1438
- * "name": "display_name",
1439
- * "id": "national_id"
1440
- * },
1441
- * "widget-data-format": {
1442
- * "imageSize": 80,
1443
- * "nameColor": "#F07B1A",
1444
- * "showIdLabel": true
1445
- * }
1446
- * }
1447
- * ```
1448
- */
1449
695
  interface ProfileWidgetProps {
1450
696
  config: BaseWidgetConfig;
1451
697
  }
1452
698
  declare const ProfileWidget: ({ config }: ProfileWidgetProps) => react_jsx_runtime.JSX.Element;
1453
699
 
1454
- /**
1455
- * TextArea widget for multi-line text input
1456
- * Supports 2 rows by default with configurable rows
1457
- *
1458
- * Features:
1459
- * - Multi-line text input
1460
- * - Character type filtering (any, alphabetic, alphanumeric, numeric, etc.)
1461
- * - Case control (none, lowercase, uppercase, capitalize)
1462
- * - Length constraints with live character counter
1463
- * - Regular expression validation with custom messages
1464
- * - Placeholder text with i18n support
1465
- *
1466
- * Usage in schema:
1467
- * {
1468
- * "widget": "textarea",
1469
- * "widget-type": "input",
1470
- * "widget-label": "Description",
1471
- * "widget-id": "description",
1472
- * "widget-data-path": "person.description",
1473
- * "widget-data-format": {
1474
- * "characterType": "any",
1475
- * "caseControl": "none",
1476
- * "showCharCounter": true,
1477
- * "rows": 2
1478
- * },
1479
- * "widget-data-validation": {
1480
- * "minLength": 10,
1481
- * "maxLength": 500
1482
- * },
1483
- * "widget-required": true,
1484
- * "widget-data-placeholder": "Enter description"
1485
- * }
1486
- */
1487
700
  interface TextAreaWidgetProps {
1488
701
  config: BaseWidgetConfig;
1489
702
  }
@@ -1498,17 +711,6 @@ interface ScoresDisplayWidgetProps {
1498
711
  config: BaseWidgetConfig;
1499
712
  schemaData?: Record<string, unknown>;
1500
713
  }
1501
- /**
1502
- * Scores Display Widget - full-width, view-only widget (list)
1503
- *
1504
- * Expected config (reference):
1505
- * {
1506
- * "widget": "scores-display",
1507
- * "widget-type": "group",
1508
- * "widget-id": "record-scores",
1509
- * "widget-data-path": "scores"
1510
- * }
1511
- */
1512
714
  declare const ScoresDisplayWidget: ({ config, schemaData: propSchemaData, }: ScoresDisplayWidgetProps) => react_jsx_runtime.JSX.Element;
1513
715
 
1514
716
  interface IdAuthenticationWidgetProps {
@@ -1526,6 +728,16 @@ interface MultiSelectWidgetProps {
1526
728
  }
1527
729
  declare const MultiSelectWidget: ({ config }: MultiSelectWidgetProps) => react_jsx_runtime.JSX.Element;
1528
730
 
731
+ interface GeoHierarchyWidgetProps {
732
+ config: BaseWidgetConfig;
733
+ }
734
+ declare const GeoHierarchyWidget: ({ config }: GeoHierarchyWidgetProps) => react_jsx_runtime.JSX.Element;
735
+
736
+ interface DocsWidgetProps {
737
+ config: BaseWidgetConfig;
738
+ }
739
+ declare const DocsWidget: ({ config }: DocsWidgetProps) => react_jsx_runtime.JSX.Element;
740
+
1529
741
  /**
1530
742
  * Get value from object using dot notation path
1531
743
  * Safely handles nested paths like "person.name" or "address.street.number"
@@ -1540,13 +752,6 @@ declare const setValueByPath: (obj: any, path: string, value: any) => any;
1540
752
  * Parse widget data path (can be string or object)
1541
753
  */
1542
754
  declare const parseDataPath: (dataPath: string | Record<string, string> | undefined) => string | Record<string, string> | null;
1543
- /**
1544
- * Get value from widget state using data path
1545
- */
1546
- /**
1547
- * Resolve a widget-id reference in Redux values.
1548
- * Supports namespaced ids (e.g. "rv-section-0__region_code" when ref is "region_code").
1549
- */
1550
755
  declare const resolveWidgetIdValue: (values: Record<string, any>, ref: string) => any;
1551
756
  declare const getWidgetValue: (values: Record<string, any>, dataPath: string | Record<string, string> | undefined, widgetId: string) => any;
1552
757
  /**
@@ -1555,33 +760,15 @@ declare const getWidgetValue: (values: Record<string, any>, dataPath: string | R
1555
760
  declare const setWidgetValue: (currentValues: Record<string, any>, dataPath: string | Record<string, string> | undefined, widgetId: string, value: any) => Record<string, any>;
1556
761
 
1557
762
  /**
1558
- * Validate value against validation rules.
1559
- *
1560
- * @param skipRequired - When true, required-field checks are skipped (used by
1561
- * per-section Save/Next buttons so the user can move between sections without
1562
- * filling every mandatory field; only format/range checks still run).
763
+ * @param skipRequired - Skip required checks for per-section Save/Next navigation;
764
+ * format and range validation still run.
1563
765
  */
1564
766
  declare const validateWidget: (value: any, validation: WidgetValidation | undefined, required?: boolean, skipRequired?: boolean) => string[];
1565
- /**
1566
- * Create Zod schema from validation config
1567
- */
1568
767
  declare const createZodSchema: (validation: WidgetValidation | undefined, required?: boolean) => z.ZodSchema | null;
1569
768
 
1570
- /**
1571
- * Format date value
1572
- */
1573
769
  declare const formatDate: (value: any, format: WidgetFormat | undefined) => string;
1574
- /**
1575
- * Format currency value
1576
- */
1577
770
  declare const formatCurrency: (value: any, format: WidgetFormat | undefined) => string;
1578
- /**
1579
- * Format phone number
1580
- */
1581
771
  declare const formatPhone: (value: any, format: WidgetFormat | undefined) => string;
1582
- /**
1583
- * Format value based on widget format config
1584
- */
1585
772
  declare const formatValue: (value: any, format: WidgetFormat | undefined, widgetType?: string) => string;
1586
773
 
1587
774
  /**
@@ -1613,7 +800,7 @@ type ApiDataSource = Extract<DataSource, {
1613
800
  type: 'api';
1614
801
  }>;
1615
802
  /** Return cached API options when already fetched (e.g. duplicate table cells). */
1616
- declare function getCachedApiDataSource(dataSource: ApiDataSource, allValues: Record<string, any>, levelId?: string): any[] | undefined;
803
+ declare function getCachedApiDataSource(dataSource: ApiDataSource, allValues: Record<string, any>): any[] | undefined;
1617
804
  /**
1618
805
  * Get static data source options
1619
806
  */
@@ -1626,256 +813,42 @@ declare const getStaticDataSource: (dataSource: Extract<DataSource, {
1626
813
  */
1627
814
  declare const getApiDataSource: (dataSource: Extract<DataSource, {
1628
815
  type: "api";
1629
- }>, allValues: Record<string, any>, dataSourceRequestHandler: DataSourceRequestHandler, levelId?: string) => Promise<any[]>;
1630
- /**
1631
- * Get schema reference data source options
1632
- */
816
+ }>, allValues: Record<string, any>, dataSourceRequestHandler: DataSourceRequestHandler) => Promise<any[]>;
1633
817
  declare const getSchemaDataSource: (dataSource: Extract<DataSource, {
1634
818
  type: "schema";
1635
819
  }>, schemaData: Record<string, any>) => any[];
1636
- /**
1637
- * Transform data source options to { value, label } format
1638
- */
1639
820
  declare const transformDataSourceOptions: (data: any[], valueKey?: string, labelKey?: string) => Array<{
1640
821
  value: any;
1641
822
  label: string;
1642
823
  }>;
1643
824
 
1644
- /**
1645
- * Filter input value based on allowed character type
1646
- */
1647
825
  declare const filterByCharacterType: (value: string, characterType?: CharacterType, customCharset?: string) => string;
1648
- /**
1649
- * Apply case transformation to text
1650
- */
1651
826
  declare const applyCaseControl: (value: string, caseControl?: CaseControl) => string;
1652
- /**
1653
- * Apply input mask to value
1654
- */
1655
827
  declare const applyMask: (value: string, mask: InputMask) => {
1656
828
  displayValue: string;
1657
829
  rawValue: string;
1658
830
  };
1659
- /**
1660
- * Remove mask from value to get raw value
1661
- */
1662
831
  declare const removeMask: (value: string, mask: InputMask) => string;
1663
832
 
1664
- /**
1665
- * Format number with thousand and decimal separators
1666
- */
1667
833
  declare const formatNumber: (value: number | string, format: WidgetFormat | undefined) => string;
1668
- /**
1669
- * Parse formatted number string to number
1670
- */
1671
834
  declare const parseNumber: (value: string, format: WidgetFormat | undefined) => number | null;
1672
- /**
1673
- * Apply decimal precision with rounding or truncation
1674
- */
1675
835
  declare const applyDecimalPrecision: (value: number, format: WidgetFormat | undefined) => number;
1676
- /**
1677
- * Validate numeric value against constraints
1678
- */
1679
836
  declare const validateNumericValue: (value: number | null, format: WidgetFormat | undefined, validation?: {
1680
837
  min?: number;
1681
838
  max?: number;
1682
839
  pattern?: string;
1683
840
  patternMessage?: string;
1684
841
  }) => string[];
1685
- /**
1686
- * Check if a key is allowed for numeric input
1687
- */
1688
842
  declare const isAllowedKey: (key: string, format: WidgetFormat | undefined, currentValue: string, event?: React.KeyboardEvent<HTMLInputElement>) => boolean;
1689
- /**
1690
- * Calculate character count including separators and sign
1691
- */
1692
843
  declare const getFormattedNumberLength: (value: number | string | null, format: WidgetFormat | undefined) => number;
1693
844
  declare const normalizeNumericDefault: (defaultValue: unknown, format: WidgetFormat | undefined) => number | null | undefined;
1694
845
 
1695
- /**
1696
- * Geo Hierarchy Builder
1697
- * Manages geo hierarchy state and builds hierarchy JSON structure
1698
- */
1699
- interface GeoLevelData {
1700
- level: string;
1701
- level_value_id: string;
1702
- level_value_mnemonic: string;
1703
- }
1704
- interface GeoLevelConfig {
1705
- level: string;
1706
- }
1707
- /**
1708
- * Resolve the display value for a geo level widget.
1709
- * When widgetId is explicitly set in Redux (including cleared undefined/null), do not
1710
- * fall back to shared hierarchy dataPath — that stale path was keeping grandchildren visible.
1711
- */
1712
- declare function resolveGeoWidgetLevelValue(values: Record<string, any>, widgetId: string, dataPath: string | Record<string, string> | undefined, geoConfig: GeoLevelConfig): any;
1713
- /**
1714
- * Write the in-memory geo hierarchy builder state into Redux at the shared dataPath.
1715
- */
1716
- declare function applySharedGeoHierarchyToValues(baseValues: Record<string, any>, groupId: string, dataPath: string | Record<string, string> | undefined, widgetId: string): Record<string, any>;
1717
- declare class GeoHierarchyBuilder {
1718
- private hierarchies;
1719
- /**
1720
- * Get or create hierarchy state for a group
1721
- */
1722
- private getHierarchy;
1723
- /**
1724
- * Add a level to the hierarchy
1725
- */
1726
- addLevel(level: string, level_value_id: string, level_value_mnemonic: string, groupId?: string): void;
1727
- /**
1728
- * Remove a level and all levels below it
1729
- */
1730
- removeLevelAndBelow(level: string, groupId?: string): void;
1731
- /**
1732
- * Build hierarchy JSON structure
1733
- */
1734
- buildHierarchyJson(groupId?: string): {
1735
- geo_lowest_level_value_id: string;
1736
- geo_code_hierarchy_json: {
1737
- hierarchy: Array<{
1738
- level: string;
1739
- level_value_id: string;
1740
- level_value_mnemonic: string;
1741
- }>;
1742
- lowest_level_value_id: string;
1743
- };
1744
- } | null;
1745
- /**
1746
- * Clear hierarchy for a group
1747
- */
1748
- clear(groupId?: string): void;
1749
- /**
1750
- * Clear all hierarchies
1751
- */
1752
- clearAll(): void;
1753
- /**
1754
- * Get current levels for a group
1755
- */
1756
- getLevels(groupId?: string): GeoLevelData[];
1757
- }
1758
- declare const geoHierarchyBuilder: GeoHierarchyBuilder;
1759
- /** Sentinel written to Redux when a geo level is cleared by cascade (distinct from "never set"). */
1760
- declare const GEO_LEVEL_CLEARED: null;
1761
- interface GeoWidgetRegistration {
1762
- widgetId: string;
1763
- parentWidgetId: string | null;
1764
- level: string;
1765
- geoConfig: GeoLevelConfig;
1766
- dataPath: string;
1767
- groupId: string;
1768
- }
1769
- declare function registerGeoWidgetParent(widgetId: string, parentWidgetId: string | null): void;
1770
- declare function unregisterGeoWidgetParent(widgetId: string): void;
1771
- declare function registerGeoWidget(widgetId: string, geoConfig: GeoLevelConfig & {
1772
- parentWidgetId?: string | null;
1773
- }, dataPath: string): void;
1774
- declare function unregisterGeoWidget(widgetId: string): void;
1775
- declare function orderGeoWidgetRegistrations(registrations: GeoWidgetRegistration[]): GeoWidgetRegistration[];
1776
- /** Resolve display mnemonic from cached dropdown options, then stored hierarchy. */
1777
- declare function createGeoLevelMnemonicResolver(values: Record<string, any>, dataSources: Record<string, Array<{
1778
- value: any;
1779
- label: string;
1780
- }>>): (registration: GeoWidgetRegistration, valueId: string) => string | undefined;
1781
- /** Rebuild group hierarchy from widget values in parent→child order; stop at first missing level. */
1782
- declare function rebuildGeoHierarchyFromRegistrations(groupId: string, values: Record<string, any>, registrations: GeoWidgetRegistration[], resolveMnemonic?: (registration: GeoWidgetRegistration, valueId: string) => string | undefined): boolean;
1783
- declare function collectGeoWidgetRegistrationsFromWidgets(widgets: Array<{
1784
- 'widget-id': string;
1785
- 'widget-data-path'?: string | Record<string, string>;
1786
- 'widget-geo-config'?: GeoLevelConfig & {
1787
- parentWidgetId?: string | null;
1788
- };
1789
- }>, namespace?: string): GeoWidgetRegistration[];
1790
- /** Reconcile all geo groups in section values before save. */
1791
- declare function reconcileGeoHierarchiesInValues(values: Record<string, any>, registrations: GeoWidgetRegistration[], dataSources?: Record<string, Array<{
1792
- value: any;
1793
- label: string;
1794
- }>>): Record<string, any>;
1795
- declare function getGeoWidgetRegistrationsInGroup(groupId: string): GeoWidgetRegistration[];
1796
- /** True when changedWidgetId is any upstream geo parent of widgetId (not only immediate parent). */
1797
- declare function isUpstreamGeoAncestor(changedWidgetId: string, widgetId: string, immediateParentWidgetId: string | null): boolean;
1798
- /** Group id for geo widgets sharing the same register prefix (e.g. `{registerId}`). */
1799
- declare function getGeoGroupId(dataPath: string | Record<string, string> | undefined): string;
1800
- /**
1801
- * Resolve the human-readable label for a geo level from persisted hierarchy JSON.
1802
- * Used in readonly mode when API options are not loaded.
1803
- */
1804
- declare function resolveGeoWidgetLevelLabel(values: Record<string, any>, widgetId: string, dataPath: string | Record<string, string> | undefined, geoConfig: GeoLevelConfig): string | undefined;
1805
- /** All registered geo widgets that are descendants of ancestorWidgetId. */
1806
- declare function getGeoDescendantWidgetIds(ancestorWidgetId: string): string[];
1807
- /** Seed in-memory builder from persisted hierarchy JSON (edit-mode rehydration). */
1808
- declare function seedGeoHierarchyFromValues(values: Record<string, any>, dataPath: string | Record<string, string> | undefined, widgetId: string, groupId: string): void;
1809
- /** Force-clear builder for a group, then seed from Redux/schema values (e.g. after Cancel). */
1810
- declare function resetAndSeedGeoHierarchyFromValues(values: Record<string, any>, dataPath: string, widgetId: string, groupId: string): void;
1811
-
1812
846
  type ResolvedTheme = ReturnType<typeof resolveTheme>;
1813
- /**
1814
- * Access the resolved widget theme from any component inside `<WidgetProvider>`.
1815
- *
1816
- * ```tsx
1817
- * const theme = useWidgetTheme();
1818
- * // theme.colors.primary, theme.section.dividerColor, etc.
1819
- * ```
1820
- */
1821
847
  declare function useWidgetTheme(): ResolvedTheme;
1822
848
 
1823
- /**
1824
- * Initialize i18n for the widget library
1825
- * Can be customized by passing custom resources or configuration
1826
- *
1827
- * If no resources are provided, it will attempt to automatically load translations
1828
- * from the consuming project's locale directory.
1829
- *
1830
- * If options are provided and the default instance is already initialized,
1831
- * creates a new i18n instance to avoid reinitialization issues.
1832
- */
1833
- declare const initI18n: (options?: {
1834
- resources?: Record<string, any>;
1835
- lng?: string;
1836
- fallbackLng?: string;
1837
- debug?: boolean;
1838
- loadPath?: string | string[];
1839
- autoLoad?: boolean;
1840
- }) => Promise<i18next.i18n>;
1841
-
1842
- /**
1843
- * Custom hook for widget translations
1844
- * Provides translation function with widget-specific namespace and fallback support
1845
- */
1846
- declare const useWidgetTranslation: () => {
1847
- t: (keyOrString: string | undefined | null, options?: {
1848
- defaultValue?: string;
1849
- [key: string]: any;
1850
- }) => string;
1851
- translate: (keyOrString: string | undefined | null, options?: {
1852
- defaultValue?: string;
1853
- [key: string]: any;
1854
- }) => string;
1855
- translateConfig: (value: string | undefined | null, fallback?: string) => string;
1856
- };
1857
-
1858
- /**
1859
- * Recursively translate widget configuration using translation keys
1860
- * This utility helps transform a schema with translation keys into translated strings
1861
- *
1862
- * @param widgetConfig - Widget configuration that may contain translation keys
1863
- * @param translate - Translation function (from useWidgetTranslation or i18next)
1864
- * @returns Translated widget configuration
1865
- */
1866
849
  declare const translateWidgetConfig: (widgetConfig: BaseWidgetConfig, translate: (key: string, options?: any) => string) => BaseWidgetConfig;
1867
- /**
1868
- * Recursively translate panel configuration
1869
- */
1870
850
  declare const translatePanelConfig: (panel: PanelConfig, translate: (key: string, options?: any) => string) => PanelConfig;
1871
- /**
1872
- * Translate entire UI Schema
1873
- *
1874
- * @param schema - UI Schema with potential translation keys
1875
- * @param translate - Translation function
1876
- * @returns Translated UI Schema
1877
- */
1878
851
  declare const translateUISchema: (schema: UISchema, translate: (key: string, options?: any) => string) => UISchema;
1879
852
 
1880
- export { ArrayWidget, BooleanWidget, CheckboxWidget, CurrencyInputWidget, DateInputWidget, DateTimeInputWidget, DialogTableWidget, DisplayWidget, FileInputWidget, GEO_LEVEL_CLEARED, HeaderSectionWidget, IdAuthenticationWidget, IterableAccordionWidget, JSONEditorPanel, MultiSelectWidget, NumberInputWidget, PanelRenderer, PhoneInputWidget, ProfileWidget, PropertyEditor, RadioWidget, RegisterLookupWidget, ScoresDisplayWidget, SectionBuilder, SectionRenderer, SectionTree, SectionsContainer, SelectWidget, SimpleTableWidget, TableWidget, TextAreaWidget, TextInputWidget, VisualBuilderPanel, WidgetEventBus, WidgetProvider, WidgetRenderer, applyCaseControl, applyDecimalPrecision, applyMask, applySharedGeoHierarchyToValues, collectGeoWidgetRegistrationsFromWidgets, createGeoLevelMnemonicResolver, createWidgetStore, createZodSchema, defaultTheme, evaluateCondition, evaluateWidgetConditions, filterByCharacterType, formatCurrency, formatDate, formatNumber, formatPhone, formatValue, geoHierarchyBuilder, getApiDataSource, getCachedApiDataSource, getFormattedNumberLength, getGeoDescendantWidgetIds, getGeoGroupId, getGeoWidgetRegistrationsInGroup, getSchemaDataSource, getStaticDataSource, getValueByPath, getWidgetValue, hasVisibilityRules, initI18n, isAllowedKey, isUpstreamGeoAncestor, normalizeNumericDefault, normalizeOptionRules, orderGeoWidgetRegistrations, parseDataPath, parseNumber, rebuildGeoHierarchyFromRegistrations, reconcileGeoHierarchiesInValues, registerDefaultWidgets, registerGeoWidget, registerGeoWidgetParent, removeMask, resetAll, resetAndSeedGeoHierarchyFromValues, resetWidget, resolveGeoWidgetLevelLabel, resolveGeoWidgetLevelValue, resolveTheme, resolveWidgetIdValue, seedGeoHierarchyFromValues, setDataSource, setError, setLoading, setTouched, setValue, setValueByPath, setValues, setWidgetValue, shouldEnableWidget, shouldRequireWidget, shouldShowWidget, transformDataSourceOptions, translatePanelConfig, translateUISchema, translateWidgetConfig, unregisterGeoWidget, unregisterGeoWidgetParent, useBaseWidget, useGeoWidgetCascade, useWidgetCascade, useWidgetContext, useWidgetEventBus, useWidgetTheme, useWidgetTranslation, validateNumericValue, validateWidget, widgetRegistry };
1881
- export type { ApiAdapter, ApiDataSource$1 as ApiDataSource, BaseWidgetConfig, BooleanControlType, BooleanRepresentation, CaseControl, CharacterType, ConditionOperator, DataSource, DataSourceRequestHandler, DataSourceType, GeoLevelConfig, GeoLevelData, GeoWidgetRegistration, InputMask, NumericType, PanelConfig, RoundingMode, SchemaDataSource, SectionBuilderProps, SectionChanges, SectionConfig, SectionMode, SectionRendererProps, SectionsContainerProps, SectionsFormHandle, StaticDataSource, SupportingDocumentConfig, TextAlign, TreeNode, TreeNodeType, UISchema, UseBaseWidgetOptions, ValidationType, WidgetCascadeConfig, WidgetCondition, WidgetConditionState, WidgetContextValue, WidgetDataPath, WidgetDispatch, WidgetEvent, WidgetEventType, WidgetFormat, WidgetGeoConfig, WidgetOptionRule, WidgetOptions, WidgetRegistryEntry, WidgetRenderFunction, WidgetRootState, WidgetState, WidgetStore, WidgetTheme, WidgetThemeButton, WidgetThemeColors, WidgetThemePanel, WidgetThemeSection, WidgetThemeWidget, WidgetValidation, WidgetValue };
853
+ export { BooleanWidget, CheckboxWidget, DateInputWidget, DateTimeInputWidget, DialogTableWidget, DisplayWidget, DocsWidget, FileInputWidget, GeoHierarchyWidget, HeaderSectionWidget, IdAuthenticationWidget, JSONEditorPanel, MultiSelectWidget, NumberInputWidget, PanelRenderer, PhoneInputWidget, ProfileWidget, PropertyEditor, RadioWidget, RegisterLookupWidget, ScoresDisplayWidget, SectionBuilder, SectionRenderer, SectionTree, SectionsContainer, SelectWidget, TableWidget, TextAreaWidget, TextInputWidget, VisualBuilderPanel, WidgetEventBus, WidgetProvider, WidgetRenderer, applyCaseControl, applyDecimalPrecision, applyMask, createWidgetStore, createZodSchema, defaultTheme, evaluateCondition, evaluateWidgetConditions, filterByCharacterType, formatCurrency, formatDate, formatNumber, formatPhone, formatValue, getApiDataSource, getCachedApiDataSource, getFormattedNumberLength, getSchemaDataSource, getStaticDataSource, getValueByPath, getWidgetValue, hasVisibilityRules, isAllowedKey, isGeoHierarchyDataSource, normalizeNumericDefault, normalizeOptionRules, parseDataPath, parseNumber, registerDefaultWidgets, removeMask, resetAll, resetWidget, resolveTheme, resolveWidgetIdValue, setDataSource, setError, setLoading, setTouched, setValue, setValueByPath, setValues, setWidgetValue, shouldEnableWidget, shouldRequireWidget, shouldShowWidget, transformDataSourceOptions, translatePanelConfig, translateUISchema, translateWidgetConfig, useBaseWidget, useWidgetCascade, useWidgetContext, useWidgetEventBus, useWidgetTheme, validateNumericValue, validateWidget, widgetRegistry };
854
+ export type { ApiAdapter, ApiDataSource$1 as ApiDataSource, BaseWidgetConfig, BooleanControlType, BooleanRepresentation, CaseControl, CharacterType, ConditionOperator, DataSource, DataSourceRequestHandler, DataSourceType, DocsWidgetDocumentConfig, GeoHierarchyDataPath, GeoHierarchyDataSource, GeoHierarchyLayout, InputMask, NumericType, PanelConfig, RoundingMode, SchemaDataSource, SectionBuilderProps, SectionChanges, SectionConfig, SectionMode, SectionRendererProps, SectionsContainerProps, SectionsFormHandle, StaticDataSource, SupportingDocumentConfig, TextAlign, TreeNode, TreeNodeType, UISchema, UseBaseWidgetOptions, ValidationType, WidgetCascadeConfig, WidgetCondition, WidgetConditionState, WidgetContextValue, WidgetDataPath, WidgetDispatch, WidgetEvent, WidgetEventType, WidgetFormat, WidgetOptionRule, WidgetOptions, WidgetRegistryEntry, WidgetRenderFunction, WidgetRootState, WidgetState, WidgetStore, WidgetTheme, WidgetThemeButton, WidgetThemeColors, WidgetThemePanel, WidgetThemeSection, WidgetThemeWidget, WidgetValidation, WidgetValue };