@openg2p/registry-widgets 0.1.0

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 (103) hide show
  1. package/LICENSE +373 -0
  2. package/README.md +294 -0
  3. package/dist/components/FilePreviewModal.d.ts +9 -0
  4. package/dist/components/FilePreviewModal.d.ts.map +1 -0
  5. package/dist/components/PanelRenderer.d.ts +18 -0
  6. package/dist/components/PanelRenderer.d.ts.map +1 -0
  7. package/dist/components/SectionRenderer.d.ts +29 -0
  8. package/dist/components/SectionRenderer.d.ts.map +1 -0
  9. package/dist/components/SectionsContainer.d.ts +26 -0
  10. package/dist/components/SectionsContainer.d.ts.map +1 -0
  11. package/dist/components/WidgetProvider.d.ts +17 -0
  12. package/dist/components/WidgetProvider.d.ts.map +1 -0
  13. package/dist/components/WidgetRenderer.d.ts +9 -0
  14. package/dist/components/WidgetRenderer.d.ts.map +1 -0
  15. package/dist/hooks/useBaseWidget.d.ts +30 -0
  16. package/dist/hooks/useBaseWidget.d.ts.map +1 -0
  17. package/dist/hooks/useWidgetTranslation.d.ts +16 -0
  18. package/dist/hooks/useWidgetTranslation.d.ts.map +1 -0
  19. package/dist/i18n/config.d.ts +21 -0
  20. package/dist/i18n/config.d.ts.map +1 -0
  21. package/dist/index.css +4 -0
  22. package/dist/index.css.map +1 -0
  23. package/dist/index.d.ts +1306 -0
  24. package/dist/index.d.ts.map +1 -0
  25. package/dist/index.esm.js +5930 -0
  26. package/dist/index.esm.js.map +1 -0
  27. package/dist/index.js +6000 -0
  28. package/dist/index.js.map +1 -0
  29. package/dist/registry/WidgetRegistry.d.ts +40 -0
  30. package/dist/registry/WidgetRegistry.d.ts.map +1 -0
  31. package/dist/registry/defaultWidgets.d.ts +6 -0
  32. package/dist/registry/defaultWidgets.d.ts.map +1 -0
  33. package/dist/store/index.d.ts +11 -0
  34. package/dist/store/index.d.ts.map +1 -0
  35. package/dist/store/widgetSlice.d.ts +20 -0
  36. package/dist/store/widgetSlice.d.ts.map +1 -0
  37. package/dist/types/index.d.ts +293 -0
  38. package/dist/types/index.d.ts.map +1 -0
  39. package/dist/utils/conditions.d.ts +20 -0
  40. package/dist/utils/conditions.d.ts.map +1 -0
  41. package/dist/utils/dataSource.d.ts +27 -0
  42. package/dist/utils/dataSource.d.ts.map +1 -0
  43. package/dist/utils/dateInput.d.ts +32 -0
  44. package/dist/utils/dateInput.d.ts.map +1 -0
  45. package/dist/utils/datetimeInput.d.ts +37 -0
  46. package/dist/utils/datetimeInput.d.ts.map +1 -0
  47. package/dist/utils/filePreview.d.ts +8 -0
  48. package/dist/utils/filePreview.d.ts.map +1 -0
  49. package/dist/utils/fileSerialization.d.ts +40 -0
  50. package/dist/utils/fileSerialization.d.ts.map +1 -0
  51. package/dist/utils/formatting.d.ts +18 -0
  52. package/dist/utils/formatting.d.ts.map +1 -0
  53. package/dist/utils/numberInput.d.ts +31 -0
  54. package/dist/utils/numberInput.d.ts.map +1 -0
  55. package/dist/utils/pathUtils.d.ts +23 -0
  56. package/dist/utils/pathUtils.d.ts.map +1 -0
  57. package/dist/utils/schemaTranslation.d.ts +23 -0
  58. package/dist/utils/schemaTranslation.d.ts.map +1 -0
  59. package/dist/utils/textInput.d.ts +21 -0
  60. package/dist/utils/textInput.d.ts.map +1 -0
  61. package/dist/utils/validation.d.ts +11 -0
  62. package/dist/utils/validation.d.ts.map +1 -0
  63. package/dist/utils/validationPatterns.d.ts +17 -0
  64. package/dist/utils/validationPatterns.d.ts.map +1 -0
  65. package/dist/widgets/ArrayWidget.d.ts +29 -0
  66. package/dist/widgets/ArrayWidget.d.ts.map +1 -0
  67. package/dist/widgets/BooleanWidget.d.ts +35 -0
  68. package/dist/widgets/BooleanWidget.d.ts.map +1 -0
  69. package/dist/widgets/CheckboxWidget.d.ts +56 -0
  70. package/dist/widgets/CheckboxWidget.d.ts.map +1 -0
  71. package/dist/widgets/CurrencyInputWidget.d.ts +24 -0
  72. package/dist/widgets/CurrencyInputWidget.d.ts.map +1 -0
  73. package/dist/widgets/DateInputWidget.d.ts +42 -0
  74. package/dist/widgets/DateInputWidget.d.ts.map +1 -0
  75. package/dist/widgets/DateTimeInputWidget.d.ts +42 -0
  76. package/dist/widgets/DateTimeInputWidget.d.ts.map +1 -0
  77. package/dist/widgets/DisplayWidget.d.ts +11 -0
  78. package/dist/widgets/DisplayWidget.d.ts.map +1 -0
  79. package/dist/widgets/FileInputWidget.d.ts +24 -0
  80. package/dist/widgets/FileInputWidget.d.ts.map +1 -0
  81. package/dist/widgets/IterableAccordionWidget.d.ts +30 -0
  82. package/dist/widgets/IterableAccordionWidget.d.ts.map +1 -0
  83. package/dist/widgets/NumberInputWidget.d.ts +47 -0
  84. package/dist/widgets/NumberInputWidget.d.ts.map +1 -0
  85. package/dist/widgets/PhoneInputWidget.d.ts +22 -0
  86. package/dist/widgets/PhoneInputWidget.d.ts.map +1 -0
  87. package/dist/widgets/ProfileWidget.d.ts +50 -0
  88. package/dist/widgets/ProfileWidget.d.ts.map +1 -0
  89. package/dist/widgets/RadioWidget.d.ts +44 -0
  90. package/dist/widgets/RadioWidget.d.ts.map +1 -0
  91. package/dist/widgets/SelectWidget.d.ts +23 -0
  92. package/dist/widgets/SelectWidget.d.ts.map +1 -0
  93. package/dist/widgets/SimpleTableWidget.d.ts +32 -0
  94. package/dist/widgets/SimpleTableWidget.d.ts.map +1 -0
  95. package/dist/widgets/TableWidget.d.ts +46 -0
  96. package/dist/widgets/TableWidget.d.ts.map +1 -0
  97. package/dist/widgets/TextAreaWidget.d.ts +40 -0
  98. package/dist/widgets/TextAreaWidget.d.ts.map +1 -0
  99. package/dist/widgets/TextInputWidget.d.ts +48 -0
  100. package/dist/widgets/TextInputWidget.d.ts.map +1 -0
  101. package/dist/widgets/index.d.ts +19 -0
  102. package/dist/widgets/index.d.ts.map +1 -0
  103. package/package.json +67 -0
@@ -0,0 +1,40 @@
1
+ import { BaseWidgetConfig, WidgetRegistryEntry } from '../types';
2
+ import React from 'react';
3
+ declare class WidgetRegistry {
4
+ private widgets;
5
+ /**
6
+ * Register a widget
7
+ */
8
+ register(entry: WidgetRegistryEntry): void;
9
+ /**
10
+ * Register multiple widgets
11
+ */
12
+ registerMany(entries: WidgetRegistryEntry[]): void;
13
+ /**
14
+ * Get widget entry
15
+ */
16
+ get(widgetName: string): WidgetRegistryEntry | undefined;
17
+ /**
18
+ * Check if widget is registered
19
+ */
20
+ has(widgetName: string): boolean;
21
+ /**
22
+ * Get all registered widgets
23
+ */
24
+ getAll(): WidgetRegistryEntry[];
25
+ /**
26
+ * Unregister a widget
27
+ */
28
+ unregister(widgetName: string): boolean;
29
+ /**
30
+ * Clear all widgets
31
+ */
32
+ clear(): void;
33
+ /**
34
+ * Render widget component
35
+ */
36
+ render(config: BaseWidgetConfig, context: any, defaultComponent?: React.ComponentType<any>): React.ReactNode;
37
+ }
38
+ export declare const widgetRegistry: WidgetRegistry;
39
+ export {};
40
+ //# sourceMappingURL=WidgetRegistry.d.ts.map
@@ -0,0 +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;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,mBAAmB,GAAG,IAAI;IAI1C;;OAEG;IACH,YAAY,CAAC,OAAO,EAAE,mBAAmB,EAAE,GAAG,IAAI;IAIlD;;OAEG;IACH,GAAG,CAAC,UAAU,EAAE,MAAM,GAAG,mBAAmB,GAAG,SAAS;IAIxD;;OAEG;IACH,GAAG,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO;IAIhC;;OAEG;IACH,MAAM,IAAI,mBAAmB,EAAE;IAI/B;;OAEG;IACH,UAAU,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO;IAIvC;;OAEG;IACH,KAAK,IAAI,IAAI;IAIb;;OAEG;IACH,MAAM,CACJ,MAAM,EAAE,gBAAgB,EACxB,OAAO,EAAE,GAAG,EACZ,gBAAgB,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,GAC1C,KAAK,CAAC,SAAS;CA6BnB;AAGD,eAAO,MAAM,cAAc,gBAAuB,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Register all default/generic widgets
3
+ * This is called automatically when the package is imported
4
+ */
5
+ export declare const registerDefaultWidgets: () => void;
6
+ //# sourceMappingURL=defaultWidgets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defaultWidgets.d.ts","sourceRoot":"","sources":["../../src/registry/defaultWidgets.ts"],"names":[],"mappings":"AAsBA;;;GAGG;AACH,eAAO,MAAM,sBAAsB,YAiDlC,CAAC"}
@@ -0,0 +1,11 @@
1
+ export declare const createWidgetStore: () => import("@reduxjs/toolkit").EnhancedStore<{
2
+ widget: import("..").WidgetState;
3
+ }, import("redux").UnknownAction, import("@reduxjs/toolkit").Tuple<[import("redux").StoreEnhancer<{
4
+ dispatch: import("redux-thunk").ThunkDispatch<{
5
+ widget: import("..").WidgetState;
6
+ }, undefined, import("redux").UnknownAction>;
7
+ }>, import("redux").StoreEnhancer]>>;
8
+ export type WidgetStore = ReturnType<typeof createWidgetStore>;
9
+ export type WidgetRootState = ReturnType<WidgetStore['getState']>;
10
+ export type WidgetDispatch = WidgetStore['dispatch'];
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/store/index.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,iBAAiB;;;;;;oCAgB7B,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"}
@@ -0,0 +1,20 @@
1
+ import { WidgetState, WidgetValue } from '../types';
2
+ export declare const setValue: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
3
+ widgetId: string;
4
+ value: WidgetValue;
5
+ }, "widget/setValue">, setValues: import("@reduxjs/toolkit").ActionCreatorWithPayload<Record<string, any>, "widget/setValues">, setError: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
6
+ widgetId: string;
7
+ errors: string[];
8
+ }, "widget/setError">, setTouched: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
9
+ widgetId: string;
10
+ touched: boolean;
11
+ }, "widget/setTouched">, setLoading: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
12
+ widgetId: string;
13
+ loading: boolean;
14
+ }, "widget/setLoading">, setDataSource: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
15
+ widgetId: string;
16
+ data: any[];
17
+ }, "widget/setDataSource">, resetWidget: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "widget/resetWidget">, resetAll: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"widget/resetAll">;
18
+ declare const _default: import("redux").Reducer<WidgetState>;
19
+ export default _default;
20
+ //# sourceMappingURL=widgetSlice.d.ts.map
@@ -0,0 +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;AAmEpD,eAAO,MACL,QAAQ;cApD8B,MAAM;WAAS,WAAW;uBAqDhE,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"}
@@ -0,0 +1,293 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Widget data path can be a string (single path) or object (multi-path)
4
+ */
5
+ export type WidgetDataPath = string | Record<string, string>;
6
+ /**
7
+ * Data source types
8
+ */
9
+ export type DataSourceType = 'static' | 'api' | 'schema';
10
+ /**
11
+ * Static data source configuration
12
+ */
13
+ export interface StaticDataSource {
14
+ type: 'static';
15
+ options: Array<{
16
+ value: string | number;
17
+ label: string;
18
+ }>;
19
+ }
20
+ /**
21
+ * API data source configuration
22
+ */
23
+ export interface ApiDataSource {
24
+ type: 'api';
25
+ url: string;
26
+ method?: 'GET' | 'POST' | 'PUT' | 'DELETE';
27
+ dependsOn?: string;
28
+ valueKey?: string;
29
+ labelKey?: string;
30
+ headers?: Record<string, string>;
31
+ body?: Record<string, any>;
32
+ }
33
+ /**
34
+ * Schema reference data source configuration
35
+ */
36
+ export interface SchemaDataSource {
37
+ type: 'schema';
38
+ path: string;
39
+ valueKey?: string;
40
+ labelKey?: string;
41
+ }
42
+ export type DataSource = StaticDataSource | ApiDataSource | SchemaDataSource;
43
+ /**
44
+ * Allowed character types for text input
45
+ */
46
+ export type CharacterType = 'any' | 'alphabetic' | 'alphanumeric' | 'numeric' | 'numeric-decimal' | 'custom';
47
+ /**
48
+ * Case control options
49
+ */
50
+ export type CaseControl = 'none' | 'lowercase' | 'uppercase' | 'capitalize';
51
+ /**
52
+ * Input mask configuration
53
+ */
54
+ export interface InputMask {
55
+ pattern: string;
56
+ type?: 'static' | 'phone' | 'national-id' | 'custom';
57
+ placeholder?: string;
58
+ }
59
+ /**
60
+ * Validation type options for common patterns
61
+ */
62
+ export type ValidationType = 'email' | 'phone' | 'url';
63
+ /**
64
+ * Validation configuration
65
+ */
66
+ export interface WidgetValidation {
67
+ required?: boolean;
68
+ validationType?: ValidationType;
69
+ pattern?: string;
70
+ patternMessage?: string;
71
+ minLength?: number;
72
+ maxLength?: number;
73
+ min?: number;
74
+ max?: number;
75
+ custom?: string;
76
+ zodSchema?: z.ZodSchema;
77
+ }
78
+ /**
79
+ * Numeric type options
80
+ */
81
+ export type NumericType = 'integer' | 'decimal';
82
+ /**
83
+ * Rounding mode for decimal numbers
84
+ */
85
+ export type RoundingMode = 'round' | 'truncate';
86
+ /**
87
+ * Text alignment options
88
+ */
89
+ export type TextAlign = 'left' | 'right';
90
+ /**
91
+ * Boolean representation options
92
+ */
93
+ export type BooleanRepresentation = 'true-false' | 'yes-no' | 'on-off' | 'custom';
94
+ /**
95
+ * Boolean control type options
96
+ */
97
+ export type BooleanControlType = 'checkbox' | 'radio' | 'toggle';
98
+ /**
99
+ * Format configuration
100
+ */
101
+ export interface WidgetFormat {
102
+ dateFormat?: string;
103
+ currency?: string;
104
+ locale?: string;
105
+ decimals?: number;
106
+ pattern?: string;
107
+ inputType?: 'text' | 'email' | 'password' | 'number' | 'tel' | 'url' | 'search' | 'file';
108
+ characterType?: CharacterType;
109
+ customCharset?: string;
110
+ caseControl?: CaseControl;
111
+ mask?: InputMask;
112
+ showCharCounter?: boolean;
113
+ rows?: number;
114
+ numericType?: NumericType;
115
+ decimalPlaces?: number;
116
+ roundingMode?: RoundingMode;
117
+ thousandSeparator?: string;
118
+ decimalSeparator?: string;
119
+ textAlign?: TextAlign;
120
+ allowSigned?: boolean;
121
+ formatOnBlur?: boolean;
122
+ booleanRepresentation?: BooleanRepresentation;
123
+ booleanControlType?: BooleanControlType;
124
+ booleanTrueLabel?: string;
125
+ booleanFalseLabel?: string;
126
+ allowUnset?: boolean;
127
+ layout?: 'vertical' | 'horizontal' | 'grid';
128
+ sortOptions?: boolean;
129
+ inputMethod?: 'picker' | 'manual' | 'hybrid';
130
+ dateConstraint?: 'any' | 'past-only' | 'future-only';
131
+ dateTimeFormat?: string;
132
+ dateTimeConstraint?: 'any' | 'past-only' | 'future-only';
133
+ }
134
+ /**
135
+ * Condition operators
136
+ */
137
+ export type ConditionOperator = 'equals' | 'notEquals' | 'notEmpty' | 'empty' | 'greaterThan' | 'lessThan' | 'contains' | 'notContains';
138
+ /**
139
+ * Condition configuration
140
+ */
141
+ export interface WidgetCondition {
142
+ field: string;
143
+ operator: ConditionOperator;
144
+ value?: any;
145
+ }
146
+ /**
147
+ * Widget options for conditional behavior
148
+ */
149
+ export interface WidgetOptions {
150
+ action?: 'show' | 'hide' | 'enable' | 'disable';
151
+ condition?: WidgetCondition;
152
+ minDate?: string;
153
+ maxDate?: string;
154
+ showCalendar?: boolean;
155
+ [key: string]: any;
156
+ }
157
+ /**
158
+ * Base widget configuration
159
+ */
160
+ export interface BaseWidgetConfig {
161
+ widget: string;
162
+ 'widget-type'?: 'input' | 'layout' | 'table' | 'group';
163
+ 'widget-label'?: string;
164
+ 'widget-id': string;
165
+ 'widget-orientation'?: 'horizontal' | 'vertical';
166
+ 'widget-data-path'?: WidgetDataPath;
167
+ 'widget-data-default'?: any;
168
+ 'widget-required'?: boolean;
169
+ 'widget-readonly'?: boolean;
170
+ 'widget-data-validation'?: WidgetValidation;
171
+ 'widget-data-format'?: WidgetFormat;
172
+ 'widget-data-source'?: DataSource;
173
+ 'widget-data-options'?: WidgetOptions;
174
+ 'widget-data-placeholder'?: string;
175
+ 'widget-data-helptext'?: string;
176
+ 'widget-data-tooltip'?: string;
177
+ widgets?: BaseWidgetConfig[];
178
+ 'widget-item'?: BaseWidgetConfig;
179
+ 'widget-data-columns'?: Array<{
180
+ 'column-key': string;
181
+ 'widget-label': string;
182
+ widget?: string;
183
+ 'widget-type'?: string;
184
+ 'widget-data-path'?: string;
185
+ 'widget-data-default'?: any;
186
+ 'widget-data-format'?: WidgetFormat;
187
+ 'widget-data-validation'?: WidgetValidation;
188
+ 'widget-data-source'?: DataSource;
189
+ 'widget-data-placeholder'?: string;
190
+ 'widget-required'?: boolean;
191
+ 'widget-readonly'?: boolean;
192
+ [key: string]: any;
193
+ }>;
194
+ 'widget-data-operations'?: {
195
+ add?: boolean;
196
+ remove?: boolean;
197
+ edit?: boolean;
198
+ };
199
+ 'widget-data-add-label'?: string;
200
+ 'widget-data-collapsed'?: boolean;
201
+ 'widget-column-span'?: number;
202
+ _comment?: string;
203
+ [key: string]: any;
204
+ }
205
+ /**
206
+ * Panel configuration - a layout container that can contain nested panels or widgets
207
+ */
208
+ export interface PanelConfig {
209
+ 'panel-id': string;
210
+ 'panel-orientation'?: 'horizontal' | 'vertical';
211
+ 'panel-column-span'?: number;
212
+ panels?: PanelConfig[];
213
+ widgets?: BaseWidgetConfig[];
214
+ }
215
+ /**
216
+ * Supporting document configuration
217
+ */
218
+ export interface SupportingDocumentConfig {
219
+ 'document-data-path': string;
220
+ 'document-type'?: string;
221
+ 'document-required'?: boolean;
222
+ 'document-label'?: string;
223
+ 'document-accept'?: string;
224
+ 'document-max-size'?: number;
225
+ }
226
+ /**
227
+ * Section configuration
228
+ */
229
+ export interface SectionConfig {
230
+ 'section-id': string;
231
+ 'section-title'?: string;
232
+ 'section-editable'?: boolean;
233
+ 'section-column-span'?: number;
234
+ 'section-supporting-documents'?: SupportingDocumentConfig[];
235
+ panels: PanelConfig[];
236
+ }
237
+ /**
238
+ * UI Schema structure
239
+ */
240
+ export interface UISchema {
241
+ sections: SectionConfig[];
242
+ }
243
+ /**
244
+ * Widget value type
245
+ */
246
+ export type WidgetValue = any;
247
+ /**
248
+ * Widget state in Redux store
249
+ */
250
+ export interface WidgetState {
251
+ values: Record<string, WidgetValue>;
252
+ errors: Record<string, string[]>;
253
+ touched: Record<string, boolean>;
254
+ loading: Record<string, boolean>;
255
+ dataSources: Record<string, any[]>;
256
+ }
257
+ /**
258
+ * Widget context value
259
+ */
260
+ export interface WidgetContextValue {
261
+ widgetId: string;
262
+ value: WidgetValue;
263
+ error: string[];
264
+ touched: boolean;
265
+ loading: boolean;
266
+ onChange: (value: WidgetValue) => void;
267
+ onBlur: () => void;
268
+ setError: (errors: string[]) => void;
269
+ getFieldValue: (path: string) => any;
270
+ getDataSource: (widgetId: string) => any[];
271
+ }
272
+ /**
273
+ * Custom widget render function
274
+ */
275
+ export type WidgetRenderFunction = (config: BaseWidgetConfig, context: WidgetContextValue) => React.ReactNode;
276
+ /**
277
+ * Widget registry entry
278
+ */
279
+ export interface WidgetRegistryEntry {
280
+ widget: string;
281
+ component: React.ComponentType<any> | WidgetRenderFunction;
282
+ defaultProps?: Record<string, any>;
283
+ }
284
+ /**
285
+ * API adapter function type
286
+ */
287
+ export type ApiAdapter = (url: string, options: {
288
+ method?: string;
289
+ headers?: Record<string, string>;
290
+ body?: any;
291
+ params?: Record<string, any>;
292
+ }) => Promise<any>;
293
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +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;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAE7D;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,KAAK,GAAG,QAAQ,CAAC;AAEzD;;GAEG;AACH,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;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,KAAK,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,CAAC;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CA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AACH,MAAM,MAAM,UAAU,GAAG,CACvB,GAAG,EAAE,MAAM,EACX,OAAO,EAAE;IACP,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC9B,KACE,OAAO,CAAC,GAAG,CAAC,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { WidgetCondition } from '../types';
2
+ /**
3
+ * Evaluate condition against field value
4
+ */
5
+ export declare const evaluateCondition: (condition: WidgetCondition, allValues: Record<string, any>) => boolean;
6
+ /**
7
+ * Check if widget should be visible based on conditions
8
+ */
9
+ export declare const shouldShowWidget: (options: {
10
+ action?: string;
11
+ condition?: WidgetCondition;
12
+ } | undefined, allValues: Record<string, any>) => boolean;
13
+ /**
14
+ * Check if widget should be enabled based on conditions
15
+ */
16
+ export declare const shouldEnableWidget: (options: {
17
+ action?: string;
18
+ condition?: WidgetCondition;
19
+ } | undefined, allValues: Record<string, any>) => boolean;
20
+ //# sourceMappingURL=conditions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conditions.d.ts","sourceRoot":"","sources":["../../src/utils/conditions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAqB,MAAM,UAAU,CAAC;AAG9D;;GAEG;AACH,eAAO,MAAM,iBAAiB,GAC5B,WAAW,eAAe,EAC1B,WAAW,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAC7B,OAoCF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,GAC3B,SAAS;IAAE,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,eAAe,CAAA;CAAE,GAAG,SAAS,EACrE,WAAW,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAC7B,OAgBF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,GAC7B,SAAS;IAAE,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,eAAe,CAAA;CAAE,GAAG,SAAS,EACrE,WAAW,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAC7B,OAgBF,CAAC"}
@@ -0,0 +1,27 @@
1
+ import { DataSource, ApiAdapter } from '../types';
2
+ /**
3
+ * Get static data source options
4
+ */
5
+ export declare const getStaticDataSource: (dataSource: Extract<DataSource, {
6
+ type: "static";
7
+ }>) => any[];
8
+ /**
9
+ * Get API data source options
10
+ */
11
+ export declare const getApiDataSource: (dataSource: Extract<DataSource, {
12
+ type: "api";
13
+ }>, allValues: Record<string, any>, apiAdapter: ApiAdapter | undefined) => Promise<any[]>;
14
+ /**
15
+ * Get schema reference data source options
16
+ */
17
+ export declare const getSchemaDataSource: (dataSource: Extract<DataSource, {
18
+ type: "schema";
19
+ }>, schemaData: Record<string, any>) => any[];
20
+ /**
21
+ * Transform data source options to { value, label } format
22
+ */
23
+ export declare const transformDataSourceOptions: (data: any[], valueKey?: string, labelKey?: string) => Array<{
24
+ value: any;
25
+ label: string;
26
+ }>;
27
+ //# sourceMappingURL=dataSource.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dataSource.d.ts","sourceRoot":"","sources":["../../src/utils/dataSource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAGlD;;GAEG;AACH,eAAO,MAAM,mBAAmB,GAAI,YAAY,OAAO,CAAC,UAAU,EAAE;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,CAAC,KAAG,GAAG,EAE5F,CAAC;AAEF;;GAEG;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,YAAY,UAAU,GAAG,SAAS,KACjC,OAAO,CAAC,GAAG,EAAE,CA8Cf,CAAC;AAEF;;GAEG;AACH,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;AAEF;;GAEG;AACH,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"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Date input utilities for parsing, formatting, and validation
3
+ */
4
+ /**
5
+ * Parse date string in various formats to Date object
6
+ */
7
+ export declare const parseDate: (dateString: string) => Date | null;
8
+ /**
9
+ * Format date to ISO string (YYYY-MM-DD) for storage
10
+ */
11
+ export declare const formatDateToISO: (date: Date | string | null | undefined) => string;
12
+ /**
13
+ * Format date to custom format string
14
+ */
15
+ export declare const formatDateToString: (date: Date | string | null | undefined, format: string) => string;
16
+ /**
17
+ * Parse custom format string to Date object
18
+ */
19
+ export declare const parseDateFromFormat: (dateString: string, format: string) => Date | null;
20
+ /**
21
+ * Get min date based on constraint type
22
+ */
23
+ export declare const getMinDate: (constraint: string | undefined, minDate: string | undefined) => string | undefined;
24
+ /**
25
+ * Get max date based on constraint type
26
+ */
27
+ export declare const getMaxDate: (constraint: string | undefined, maxDate: string | undefined) => string | undefined;
28
+ /**
29
+ * Validate date constraints
30
+ */
31
+ export declare const validateDateConstraints: (date: Date | string | null | undefined, minDate: string | undefined, maxDate: string | undefined, constraint: string | undefined) => string | null;
32
+ //# sourceMappingURL=dateInput.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dateInput.d.ts","sourceRoot":"","sources":["../../src/utils/dateInput.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,eAAO,MAAM,SAAS,GAAI,YAAY,MAAM,KAAG,IAAI,GAAG,IAmBrD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,GAAI,MAAM,IAAI,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,KAAG,MAqBxE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,GAAI,MAAM,IAAI,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,QAAQ,MAAM,KAAG,MA0B3F,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB,GAAI,YAAY,MAAM,EAAE,QAAQ,MAAM,KAAG,IAAI,GAAG,IAsD/E,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU,GACrB,YAAY,MAAM,GAAG,SAAS,EAC9B,SAAS,MAAM,GAAG,SAAS,KAC1B,MAAM,GAAG,SAoBX,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU,GACrB,YAAY,MAAM,GAAG,SAAS,EAC9B,SAAS,MAAM,GAAG,SAAS,KAC1B,MAAM,GAAG,SAoBX,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,uBAAuB,GAClC,MAAM,IAAI,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,EACtC,SAAS,MAAM,GAAG,SAAS,EAC3B,SAAS,MAAM,GAAG,SAAS,EAC3B,YAAY,MAAM,GAAG,SAAS,KAC7B,MAAM,GAAG,IAiCX,CAAC"}
@@ -0,0 +1,37 @@
1
+ /**
2
+ * DateTime input utilities for parsing, formatting, and validation
3
+ */
4
+ /**
5
+ * Parse datetime string in various formats to Date object
6
+ */
7
+ export declare const parseDateTime: (dateTimeString: string) => Date | null;
8
+ /**
9
+ * Format datetime to ISO string (YYYY-MM-DDTHH:mm:ss) for storage
10
+ */
11
+ export declare const formatDateTimeToISO: (date: Date | string | null | undefined) => string;
12
+ /**
13
+ * Format datetime to ISO string for HTML datetime-local input (YYYY-MM-DDTHH:mm)
14
+ */
15
+ export declare const formatDateTimeToLocalISO: (date: Date | string | null | undefined) => string;
16
+ /**
17
+ * Format datetime to custom format string
18
+ * Supports: DD, MM, YYYY, YY, HH, mm, ss
19
+ */
20
+ export declare const formatDateTimeToString: (date: Date | string | null | undefined, format: string) => string;
21
+ /**
22
+ * Parse custom format string to Date object
23
+ */
24
+ export declare const parseDateTimeFromFormat: (dateTimeString: string, format: string) => Date | null;
25
+ /**
26
+ * Get min datetime based on constraint type
27
+ */
28
+ export declare const getMinDateTime: (constraint: string | undefined, minDateTime: string | undefined) => string | undefined;
29
+ /**
30
+ * Get max datetime based on constraint type
31
+ */
32
+ export declare const getMaxDateTime: (constraint: string | undefined, maxDateTime: string | undefined) => string | undefined;
33
+ /**
34
+ * Validate datetime constraints
35
+ */
36
+ export declare const validateDateTimeConstraints: (date: Date | string | null | undefined, minDateTime: string | undefined, maxDateTime: string | undefined, constraint: string | undefined) => string | null;
37
+ //# sourceMappingURL=datetimeInput.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"datetimeInput.d.ts","sourceRoot":"","sources":["../../src/utils/datetimeInput.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,eAAO,MAAM,aAAa,GAAI,gBAAgB,MAAM,KAAG,IAAI,GAAG,IA0C7D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB,GAAI,MAAM,IAAI,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,KAAG,MAwB5E,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,wBAAwB,GAAI,MAAM,IAAI,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,KAAG,MAuBjF,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,sBAAsB,GAAI,MAAM,IAAI,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,QAAQ,MAAM,KAAG,MAgC/F,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,uBAAuB,GAAI,gBAAgB,MAAM,EAAE,QAAQ,MAAM,KAAG,IAAI,GAAG,IA6EvF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc,GACzB,YAAY,MAAM,GAAG,SAAS,EAC9B,aAAa,MAAM,GAAG,SAAS,KAC9B,MAAM,GAAG,SAoBX,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc,GACzB,YAAY,MAAM,GAAG,SAAS,EAC9B,aAAa,MAAM,GAAG,SAAS,KAC9B,MAAM,GAAG,SAoBX,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,2BAA2B,GACtC,MAAM,IAAI,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,EACtC,aAAa,MAAM,GAAG,SAAS,EAC/B,aAAa,MAAM,GAAG,SAAS,EAC/B,YAAY,MAAM,GAAG,SAAS,KAC7B,MAAM,GAAG,IAiCX,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Utility functions for file preview functionality
3
+ */
4
+ /**
5
+ * Determines if a file type can be previewed in the web browser
6
+ */
7
+ export declare const canPreviewInWeb: (file: File | string) => boolean;
8
+ //# sourceMappingURL=filePreview.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filePreview.d.ts","sourceRoot":"","sources":["../../src/utils/filePreview.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,eAAO,MAAM,eAAe,GAAI,MAAM,IAAI,GAAG,MAAM,KAAG,OAkCrD,CAAC"}
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Utility functions for serializing File objects to/from Redux state
3
+ * File objects cannot be stored directly in Redux as they are not serializable
4
+ */
5
+ export interface SerializedFile {
6
+ __type: 'File';
7
+ name: string;
8
+ type: string;
9
+ size: number;
10
+ lastModified: number;
11
+ data: string;
12
+ }
13
+ /**
14
+ * Check if a value is a File object
15
+ */
16
+ export declare const isFile: (value: any) => value is File;
17
+ /**
18
+ * Check if a value is a serialized file
19
+ */
20
+ export declare const isSerializedFile: (value: any) => value is SerializedFile;
21
+ /**
22
+ * Convert File object to a serializable format
23
+ * Returns a promise that resolves to a SerializedFile
24
+ */
25
+ export declare const serializeFile: (file: File) => Promise<SerializedFile>;
26
+ /**
27
+ * Convert serialized file back to File object
28
+ */
29
+ export declare const deserializeFile: (serialized: SerializedFile) => File;
30
+ /**
31
+ * Serialize a value that may contain File objects
32
+ * Handles File objects, arrays of Files, and nested objects
33
+ */
34
+ export declare const serializeValue: (value: any) => Promise<any>;
35
+ /**
36
+ * Deserialize a value that may contain serialized File objects
37
+ * Handles SerializedFile objects, arrays of SerializedFiles, and nested objects
38
+ */
39
+ export declare const deserializeValue: (value: any) => any;
40
+ //# sourceMappingURL=fileSerialization.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fileSerialization.d.ts","sourceRoot":"","sources":["../../src/utils/fileSerialization.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,eAAO,MAAM,MAAM,GAAI,OAAO,GAAG,KAAG,KAAK,IAAI,IAE5C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,GAAI,OAAO,GAAG,KAAG,KAAK,IAAI,cAEtD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,aAAa,GAAU,MAAM,IAAI,KAAG,OAAO,CAAC,cAAc,CAiBtE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,GAAI,YAAY,cAAc,KAAG,IAe5D,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,GAAU,OAAO,GAAG,KAAG,OAAO,CAAC,GAAG,CAuB5D,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,gBAAgB,GAAI,OAAO,GAAG,KAAG,GAkB7C,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { WidgetFormat } from '../types';
2
+ /**
3
+ * Format date value
4
+ */
5
+ export declare const formatDate: (value: any, format: WidgetFormat | undefined) => string;
6
+ /**
7
+ * Format currency value
8
+ */
9
+ export declare const formatCurrency: (value: any, format: WidgetFormat | undefined) => string;
10
+ /**
11
+ * Format phone number
12
+ */
13
+ export declare const formatPhone: (value: any, format: WidgetFormat | undefined) => string;
14
+ /**
15
+ * Format value based on widget format config
16
+ */
17
+ export declare const formatValue: (value: any, format: WidgetFormat | undefined, widgetType?: string) => string;
18
+ //# sourceMappingURL=formatting.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formatting.d.ts","sourceRoot":"","sources":["../../src/utils/formatting.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAGxC;;GAEG;AACH,eAAO,MAAM,UAAU,GAAI,OAAO,GAAG,EAAE,QAAQ,YAAY,GAAG,SAAS,KAAG,MAwBzE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc,GAAI,OAAO,GAAG,EAAE,QAAQ,YAAY,GAAG,SAAS,KAAG,MAwB7E,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,GAAI,OAAO,GAAG,EAAE,QAAQ,YAAY,GAAG,SAAS,KAAG,MAoB1E,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,GAAI,OAAO,GAAG,EAAE,QAAQ,YAAY,GAAG,SAAS,EAAE,aAAa,MAAM,KAAG,MAwB/F,CAAC"}
@@ -0,0 +1,31 @@
1
+ import { WidgetFormat } from '../types';
2
+ /**
3
+ * Format number with thousand and decimal separators
4
+ */
5
+ export declare const formatNumber: (value: number | string, format: WidgetFormat | undefined) => string;
6
+ /**
7
+ * Parse formatted number string to number
8
+ */
9
+ export declare const parseNumber: (value: string, format: WidgetFormat | undefined) => number | null;
10
+ /**
11
+ * Apply decimal precision with rounding or truncation
12
+ */
13
+ export declare const applyDecimalPrecision: (value: number, format: WidgetFormat | undefined) => number;
14
+ /**
15
+ * Validate numeric value against constraints
16
+ */
17
+ export declare const validateNumericValue: (value: number | null, format: WidgetFormat | undefined, validation?: {
18
+ min?: number;
19
+ max?: number;
20
+ pattern?: string;
21
+ patternMessage?: string;
22
+ }) => string[];
23
+ /**
24
+ * Check if a key is allowed for numeric input
25
+ */
26
+ export declare const isAllowedKey: (key: string, format: WidgetFormat | undefined, currentValue: string, event?: React.KeyboardEvent<HTMLInputElement>) => boolean;
27
+ /**
28
+ * Calculate character count including separators and sign
29
+ */
30
+ export declare const getFormattedNumberLength: (value: number | string | null, format: WidgetFormat | undefined) => number;
31
+ //# sourceMappingURL=numberInput.d.ts.map