@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 @@
1
+ {"version":3,"file":"numberInput.d.ts","sourceRoot":"","sources":["../../src/utils/numberInput.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAA6B,MAAM,UAAU,CAAC;AAEnE;;GAEG;AACH,eAAO,MAAM,YAAY,GACvB,OAAO,MAAM,GAAG,MAAM,EACtB,QAAQ,YAAY,GAAG,SAAS,KAC/B,MAmCF,CAAC;AA4CF;;GAEG;AACH,eAAO,MAAM,WAAW,GACtB,OAAO,MAAM,EACb,QAAQ,YAAY,GAAG,SAAS,KAC/B,MAAM,GAAG,IAwBX,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,qBAAqB,GAChC,OAAO,MAAM,EACb,QAAQ,YAAY,GAAG,SAAS,KAC/B,MAeF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,GAC/B,OAAO,MAAM,GAAG,IAAI,EACpB,QAAQ,YAAY,GAAG,SAAS,EAChC,aAAa;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,cAAc,CAAC,EAAE,MAAM,CAAA;CAAE,KACrF,MAAM,EAiDR,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY,GACvB,KAAK,MAAM,EACX,QAAQ,YAAY,GAAG,SAAS,EAChC,cAAc,MAAM,EACpB,QAAQ,KAAK,CAAC,aAAa,CAAC,gBAAgB,CAAC,KAC5C,OAsDF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,wBAAwB,GACnC,OAAO,MAAM,GAAG,MAAM,GAAG,IAAI,EAC7B,QAAQ,YAAY,GAAG,SAAS,KAC/B,MAUF,CAAC"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Get value from object using dot notation path
3
+ * Safely handles nested paths like "person.name" or "address.street.number"
4
+ */
5
+ export declare const getValueByPath: (obj: any, path: string) => any;
6
+ /**
7
+ * Set value in object using dot notation path
8
+ * Safely creates nested objects as needed
9
+ */
10
+ export declare const setValueByPath: (obj: any, path: string, value: any) => any;
11
+ /**
12
+ * Parse widget data path (can be string or object)
13
+ */
14
+ export declare const parseDataPath: (dataPath: string | Record<string, string> | undefined) => string | Record<string, string> | null;
15
+ /**
16
+ * Get value from widget state using data path
17
+ */
18
+ export declare const getWidgetValue: (values: Record<string, any>, dataPath: string | Record<string, string> | undefined, widgetId: string) => any;
19
+ /**
20
+ * Set value in widget state using data path
21
+ */
22
+ export declare const setWidgetValue: (currentValues: Record<string, any>, dataPath: string | Record<string, string> | undefined, widgetId: string, value: any) => Record<string, any>;
23
+ //# sourceMappingURL=pathUtils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pathUtils.d.ts","sourceRoot":"","sources":["../../src/utils/pathUtils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,cAAc,GAAI,KAAK,GAAG,EAAE,MAAM,MAAM,KAAG,GAcvD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,GAAI,KAAK,GAAG,EAAE,MAAM,MAAM,EAAE,OAAO,GAAG,KAAG,GAuBnE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa,GACxB,UAAU,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,KACpD,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAGpC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc,GACzB,QAAQ,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC3B,UAAU,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,EACrD,UAAU,MAAM,KACf,GAmBF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc,GACzB,eAAe,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAClC,UAAU,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,EACrD,UAAU,MAAM,EAChB,OAAO,GAAG,KACT,MAAM,CAAC,MAAM,EAAE,GAAG,CAkBpB,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { UISchema, PanelConfig, BaseWidgetConfig } from '../types';
2
+ /**
3
+ * Recursively translate widget configuration using translation keys
4
+ * This utility helps transform a schema with translation keys into translated strings
5
+ *
6
+ * @param widgetConfig - Widget configuration that may contain translation keys
7
+ * @param translate - Translation function (from useWidgetTranslation or i18next)
8
+ * @returns Translated widget configuration
9
+ */
10
+ export declare const translateWidgetConfig: (widgetConfig: BaseWidgetConfig, translate: (key: string, options?: any) => string) => BaseWidgetConfig;
11
+ /**
12
+ * Recursively translate panel configuration
13
+ */
14
+ export declare const translatePanelConfig: (panel: PanelConfig, translate: (key: string, options?: any) => string) => PanelConfig;
15
+ /**
16
+ * Translate entire UI Schema
17
+ *
18
+ * @param schema - UI Schema with potential translation keys
19
+ * @param translate - Translation function
20
+ * @returns Translated UI Schema
21
+ */
22
+ export declare const translateUISchema: (schema: UISchema, translate: (key: string, options?: any) => string) => UISchema;
23
+ //# sourceMappingURL=schemaTranslation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemaTranslation.d.ts","sourceRoot":"","sources":["../../src/utils/schemaTranslation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAiB,WAAW,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAElF;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,GAChC,cAAc,gBAAgB,EAC9B,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,KAAK,MAAM,KAChD,gBAqGF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,GAC/B,OAAO,WAAW,EAClB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,KAAK,MAAM,KAChD,WAgBF,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,GAC5B,QAAQ,QAAQ,EAChB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,KAAK,MAAM,KAChD,QAyBF,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { CharacterType, CaseControl, InputMask } from '../types';
2
+ /**
3
+ * Filter input value based on allowed character type
4
+ */
5
+ export declare const filterByCharacterType: (value: string, characterType?: CharacterType, customCharset?: string) => string;
6
+ /**
7
+ * Apply case transformation to text
8
+ */
9
+ export declare const applyCaseControl: (value: string, caseControl?: CaseControl) => string;
10
+ /**
11
+ * Apply input mask to value
12
+ */
13
+ export declare const applyMask: (value: string, mask: InputMask) => {
14
+ displayValue: string;
15
+ rawValue: string;
16
+ };
17
+ /**
18
+ * Remove mask from value to get raw value
19
+ */
20
+ export declare const removeMask: (value: string, mask: InputMask) => string;
21
+ //# sourceMappingURL=textInput.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"textInput.d.ts","sourceRoot":"","sources":["../../src/utils/textInput.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAEjE;;GAEG;AACH,eAAO,MAAM,qBAAqB,GAChC,OAAO,MAAM,EACb,gBAAe,aAAqB,EACpC,gBAAgB,MAAM,KACrB,MAyCF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,GAC3B,OAAO,MAAM,EACb,cAAa,WAAoB,KAChC,MAgBF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,SAAS,GACpB,OAAO,MAAM,EACb,MAAM,SAAS,KACd;IAAE,YAAY,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAgB1C,CAAC;AA4GF;;GAEG;AACH,eAAO,MAAM,UAAU,GAAI,OAAO,MAAM,EAAE,MAAM,SAAS,KAAG,MAwD3D,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { z } from 'zod';
2
+ import { WidgetValidation } from '../types';
3
+ /**
4
+ * Validate value against validation rules
5
+ */
6
+ export declare const validateWidget: (value: any, validation: WidgetValidation | undefined, required?: boolean) => string[];
7
+ /**
8
+ * Create Zod schema from validation config
9
+ */
10
+ export declare const createZodSchema: (validation: WidgetValidation | undefined, required?: boolean) => z.ZodSchema | null;
11
+ //# sourceMappingURL=validation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../src/utils/validation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAkB,MAAM,UAAU,CAAC;AAG5D;;GAEG;AACH,eAAO,MAAM,cAAc,GACzB,OAAO,GAAG,EACV,YAAY,gBAAgB,GAAG,SAAS,EACxC,WAAU,OAAe,KACxB,MAAM,EAoFR,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,GAC1B,YAAY,gBAAgB,GAAG,SAAS,EACxC,WAAU,OAAe,KACxB,CAAC,CAAC,SAAS,GAAG,IAyDhB,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { ValidationType } from '../types';
2
+ /**
3
+ * Get validation pattern and message for a given validation type
4
+ * @param validationType - The validation type (email, phone, url, etc.)
5
+ * @returns Object with pattern (RegExp) and message, or null if type not found
6
+ */
7
+ export declare const getValidationPattern: (validationType: ValidationType) => {
8
+ pattern: RegExp;
9
+ message: string;
10
+ } | null;
11
+ /**
12
+ * Get validation pattern string for a given validation type
13
+ * @param validationType - The validation type (email, phone, url, etc.)
14
+ * @returns Regex pattern string, or null if type not found
15
+ */
16
+ export declare const getValidationPatternString: (validationType: ValidationType) => string | null;
17
+ //# sourceMappingURL=validationPatterns.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validationPatterns.d.ts","sourceRoot":"","sources":["../../src/utils/validationPatterns.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAyB1C;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,GAC/B,gBAAgB,cAAc,KAC7B;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAAG,IAEzC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,GAAI,gBAAgB,cAAc,KAAG,MAAM,GAAG,IAGpF,CAAC"}
@@ -0,0 +1,29 @@
1
+ import { BaseWidgetConfig } from '../types';
2
+ /**
3
+ * Array widget for simple repeating values
4
+ *
5
+ * Usage in schema:
6
+ * {
7
+ * "widget": "array-widget",
8
+ * "widget-type": "group",
9
+ * "widget-label": "Skills",
10
+ * "widget-id": "skills",
11
+ * "widget-data-path": "person.skills",
12
+ * "widget-item": {
13
+ * "widget": "text",
14
+ * "widget-type": "input",
15
+ * "widget-label": "Skill"
16
+ * },
17
+ * "widget-data-add-label": "Add Skill",
18
+ * "widget-data-operations": {
19
+ * "add": true,
20
+ * "remove": true
21
+ * }
22
+ * }
23
+ */
24
+ interface ArrayWidgetProps {
25
+ config: BaseWidgetConfig;
26
+ }
27
+ export declare const ArrayWidget: ({ config }: ArrayWidgetProps) => import("react/jsx-runtime").JSX.Element | null;
28
+ export {};
29
+ //# sourceMappingURL=ArrayWidget.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ArrayWidget.d.ts","sourceRoot":"","sources":["../../src/widgets/ArrayWidget.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAI5C;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,UAAU,gBAAgB;IACxB,MAAM,EAAE,gBAAgB,CAAC;CAC1B;AAED,eAAO,MAAM,WAAW,GAAI,YAAY,gBAAgB,mDAyHvD,CAAC"}
@@ -0,0 +1,35 @@
1
+ import { BaseWidgetConfig } from '../types';
2
+ /**
3
+ * Boolean widget with advanced features
4
+ *
5
+ * Features:
6
+ * - Boolean representation (true/false, yes/no, on/off, custom labels)
7
+ * - Control type (checkbox, radio buttons, toggle/switch)
8
+ * - Default value (true, false, unset/null)
9
+ * - Required vs optional
10
+ * - Layout options (horizontal/vertical)
11
+ *
12
+ * Usage in schema:
13
+ * {
14
+ * "widget": "boolean",
15
+ * "widget-type": "input",
16
+ * "widget-label": "Is Married",
17
+ * "widget-id": "married",
18
+ * "widget-data-path": "person.married",
19
+ * "widget-data-default": false,
20
+ * "widget-data-format": {
21
+ * "booleanRepresentation": "yes-no",
22
+ * "booleanControlType": "radio",
23
+ * "allowUnset": true
24
+ * },
25
+ * "widget-data-validation": {},
26
+ * "widget-required": false,
27
+ * "widget-orientation": "horizontal"
28
+ * }
29
+ */
30
+ interface BooleanWidgetProps {
31
+ config: BaseWidgetConfig;
32
+ }
33
+ export declare const BooleanWidget: ({ config }: BooleanWidgetProps) => import("react/jsx-runtime").JSX.Element;
34
+ export {};
35
+ //# sourceMappingURL=BooleanWidget.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BooleanWidget.d.ts","sourceRoot":"","sources":["../../src/widgets/BooleanWidget.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAA6C,MAAM,UAAU,CAAC;AAGvF;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,UAAU,kBAAkB;IAC1B,MAAM,EAAE,gBAAgB,CAAC;CAC1B;AAED,eAAO,MAAM,aAAa,GAAI,YAAY,kBAAkB,4CAwR3D,CAAC"}
@@ -0,0 +1,56 @@
1
+ import { BaseWidgetConfig } from '../types';
2
+ /**
3
+ * Checkbox widget with advanced features
4
+ *
5
+ * Features:
6
+ * - Single checkbox (boolean) - when no data source
7
+ * - Multiple checkboxes (array) - when data source provided
8
+ * - Static list of options
9
+ * - Dynamic options (from API / dataset)
10
+ * - Ordered options (preserve order or sort)
11
+ * - Option label & value separation
12
+ * - Display label
13
+ * - Stored value (array for multi-select)
14
+ * - Default selection (pre-selected options or empty array)
15
+ * - Required vs optional (at least one must be selected if required)
16
+ * - Layout options (vertical, horizontal, grid)
17
+ *
18
+ * Usage in schema (single checkbox):
19
+ * {
20
+ * "widget": "checkbox",
21
+ * "widget-type": "input",
22
+ * "widget-label": "I agree to terms",
23
+ * "widget-id": "agree",
24
+ * "widget-data-path": "form.agree",
25
+ * "widget-data-default": false
26
+ * }
27
+ *
28
+ * Usage in schema (multiple checkboxes):
29
+ * {
30
+ * "widget": "checkbox",
31
+ * "widget-type": "input",
32
+ * "widget-label": "Interests",
33
+ * "widget-id": "interests",
34
+ * "widget-data-path": "person.interests",
35
+ * "widget-data-default": ["sports"],
36
+ * "widget-data-source": {
37
+ * "type": "static",
38
+ * "options": [
39
+ * { "value": "sports", "label": "Sports" },
40
+ * { "value": "music", "label": "Music" },
41
+ * { "value": "reading", "label": "Reading" }
42
+ * ]
43
+ * },
44
+ * "widget-data-format": {
45
+ * "layout": "vertical",
46
+ * "sortOptions": false
47
+ * },
48
+ * "widget-required": true
49
+ * }
50
+ */
51
+ interface CheckboxWidgetProps {
52
+ config: BaseWidgetConfig;
53
+ }
54
+ export declare const CheckboxWidget: ({ config }: CheckboxWidgetProps) => import("react/jsx-runtime").JSX.Element;
55
+ export {};
56
+ //# sourceMappingURL=CheckboxWidget.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CheckboxWidget.d.ts","sourceRoot":"","sources":["../../src/widgets/CheckboxWidget.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAG5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,UAAU,mBAAmB;IAC3B,MAAM,EAAE,gBAAgB,CAAC;CAC1B;AAED,eAAO,MAAM,cAAc,GAAI,YAAY,mBAAmB,4CAkO7D,CAAC"}
@@ -0,0 +1,24 @@
1
+ import { BaseWidgetConfig } from '../types';
2
+ /**
3
+ * Currency input widget with formatting
4
+ *
5
+ * Usage in schema:
6
+ * {
7
+ * "widget": "currency",
8
+ * "widget-type": "input",
9
+ * "widget-label": "Salary",
10
+ * "widget-id": "salary",
11
+ * "widget-data-path": "person.salary",
12
+ * "widget-data-format": {
13
+ * "currency": "USD",
14
+ * "locale": "en-US",
15
+ * "decimals": 2
16
+ * }
17
+ * }
18
+ */
19
+ interface CurrencyInputWidgetProps {
20
+ config: BaseWidgetConfig;
21
+ }
22
+ export declare const CurrencyInputWidget: ({ config }: CurrencyInputWidgetProps) => import("react/jsx-runtime").JSX.Element;
23
+ export {};
24
+ //# sourceMappingURL=CurrencyInputWidget.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CurrencyInputWidget.d.ts","sourceRoot":"","sources":["../../src/widgets/CurrencyInputWidget.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAG5C;;;;;;;;;;;;;;;;GAgBG;AACH,UAAU,wBAAwB;IAChC,MAAM,EAAE,gBAAgB,CAAC;CAC1B;AAED,eAAO,MAAM,mBAAmB,GAAI,YAAY,wBAAwB,4CAmGvE,CAAC"}
@@ -0,0 +1,42 @@
1
+ import { BaseWidgetConfig } from '../types';
2
+ /**
3
+ * Date input widget with advanced features
4
+ *
5
+ * Features:
6
+ * - Configurable date format (DD/MM/YYYY, MM/DD/YYYY, YYYY-MM-DD, etc.)
7
+ * - Default value (none / today)
8
+ * - Date constraints (minDate, maxDate, any/past only/future only)
9
+ * - Required vs optional
10
+ * - Input method (date picker / manual / hybrid)
11
+ * - Placeholder text
12
+ * - Read-only & disabled
13
+ * - Canonical stored format (ISO 8601)
14
+ *
15
+ * Usage in schema:
16
+ * {
17
+ * "widget": "date",
18
+ * "widget-type": "input",
19
+ * "widget-label": "Date of Birth",
20
+ * "widget-id": "dob",
21
+ * "widget-data-path": "person.dob",
22
+ * "widget-data-default": "today",
23
+ * "widget-data-format": {
24
+ * "dateFormat": "DD/MM/YYYY",
25
+ * "inputMethod": "hybrid",
26
+ * "dateConstraint": "past-only"
27
+ * },
28
+ * "widget-data-options": {
29
+ * "minDate": "1900-01-01",
30
+ * "maxDate": "today"
31
+ * },
32
+ * "widget-data-validation": {},
33
+ * "widget-required": true,
34
+ * "widget-data-placeholder": "DD/MM/YYYY"
35
+ * }
36
+ */
37
+ interface DateInputWidgetProps {
38
+ config: BaseWidgetConfig;
39
+ }
40
+ export declare const DateInputWidget: ({ config }: DateInputWidgetProps) => import("react/jsx-runtime").JSX.Element;
41
+ export {};
42
+ //# sourceMappingURL=DateInputWidget.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DateInputWidget.d.ts","sourceRoot":"","sources":["../../src/widgets/DateInputWidget.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAY5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,UAAU,oBAAoB;IAC5B,MAAM,EAAE,gBAAgB,CAAC;CAC1B;AAED,eAAO,MAAM,eAAe,GAAI,YAAY,oBAAoB,4CAgP/D,CAAC"}
@@ -0,0 +1,42 @@
1
+ import { BaseWidgetConfig } from '../types';
2
+ /**
3
+ * DateTime input widget with advanced features
4
+ *
5
+ * Features:
6
+ * - Configurable datetime format (DD/MM/YYYY HH:mm, MM/DD/YYYY HH:mm:ss, etc.)
7
+ * - Default value (none / now)
8
+ * - DateTime constraints (minDateTime, maxDateTime, any/past only/future only)
9
+ * - Required vs optional
10
+ * - Input method (datetime picker / manual / hybrid)
11
+ * - Placeholder text
12
+ * - Read-only & disabled
13
+ * - Canonical stored format (ISO 8601 with time)
14
+ *
15
+ * Usage in schema:
16
+ * {
17
+ * "widget": "datetime",
18
+ * "widget-type": "input",
19
+ * "widget-label": "Appointment Time",
20
+ * "widget-id": "appointment",
21
+ * "widget-data-path": "appointment.datetime",
22
+ * "widget-data-default": "now",
23
+ * "widget-data-format": {
24
+ * "dateTimeFormat": "DD/MM/YYYY HH:mm",
25
+ * "inputMethod": "picker",
26
+ * "dateTimeConstraint": "future-only"
27
+ * },
28
+ * "widget-data-options": {
29
+ * "minDateTime": "2024-01-01T00:00",
30
+ * "maxDateTime": "now"
31
+ * },
32
+ * "widget-data-validation": {},
33
+ * "widget-required": true,
34
+ * "widget-data-placeholder": "DD/MM/YYYY HH:mm"
35
+ * }
36
+ */
37
+ interface DateTimeInputWidgetProps {
38
+ config: BaseWidgetConfig;
39
+ }
40
+ export declare const DateTimeInputWidget: ({ config }: DateTimeInputWidgetProps) => import("react/jsx-runtime").JSX.Element;
41
+ export {};
42
+ //# sourceMappingURL=DateTimeInputWidget.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DateTimeInputWidget.d.ts","sourceRoot":"","sources":["../../src/widgets/DateTimeInputWidget.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAa5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,UAAU,wBAAwB;IAChC,MAAM,EAAE,gBAAgB,CAAC;CAC1B;AAED,eAAO,MAAM,mBAAmB,GAAI,YAAY,wBAAwB,4CAgPvE,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { BaseWidgetConfig } from '../types';
2
+ /**
3
+ * Display widget for readonly text display
4
+ * Used for displaying information in a card layout
5
+ */
6
+ interface DisplayWidgetProps {
7
+ config: BaseWidgetConfig;
8
+ }
9
+ export declare const DisplayWidget: ({ config }: DisplayWidgetProps) => import("react/jsx-runtime").JSX.Element;
10
+ export {};
11
+ //# sourceMappingURL=DisplayWidget.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DisplayWidget.d.ts","sourceRoot":"","sources":["../../src/widgets/DisplayWidget.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAG5C;;;GAGG;AACH,UAAU,kBAAkB;IAC1B,MAAM,EAAE,gBAAgB,CAAC;CAC1B;AAED,eAAO,MAAM,aAAa,GAAI,YAAY,kBAAkB,4CAiC3D,CAAC"}
@@ -0,0 +1,24 @@
1
+ import { BaseWidgetConfig } from '../types';
2
+ /**
3
+ * File input widget
4
+ *
5
+ * Usage in schema:
6
+ * {
7
+ * "widget": "file",
8
+ * "widget-type": "input",
9
+ * "widget-label": "Upload Document",
10
+ * "widget-id": "document",
11
+ * "widget-data-path": "form.document",
12
+ * "widget-data-options": {
13
+ * "accept": ".pdf,.doc,.docx",
14
+ * "multiple": false,
15
+ * "maxSize": 5242880 // 5MB in bytes
16
+ * }
17
+ * }
18
+ */
19
+ interface FileInputWidgetProps {
20
+ config: BaseWidgetConfig;
21
+ }
22
+ export declare const FileInputWidget: ({ config }: FileInputWidgetProps) => import("react/jsx-runtime").JSX.Element;
23
+ export {};
24
+ //# sourceMappingURL=FileInputWidget.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FileInputWidget.d.ts","sourceRoot":"","sources":["../../src/widgets/FileInputWidget.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAQ5C;;;;;;;;;;;;;;;;GAgBG;AACH,UAAU,oBAAoB;IAC5B,MAAM,EAAE,gBAAgB,CAAC;CAC1B;AAED,eAAO,MAAM,eAAe,GAAI,YAAY,oBAAoB,4CAsb/D,CAAC"}
@@ -0,0 +1,30 @@
1
+ import { BaseWidgetConfig } from '../types';
2
+ /**
3
+ * Iterable accordion widget - expandable/collapsible container for widgets
4
+ *
5
+ * Usage in schema:
6
+ * {
7
+ * "widget": "iterable-accordion",
8
+ * "widget-type": "group",
9
+ * "widget-label": "Advanced Options",
10
+ * "widget-id": "advancedOptions",
11
+ * "widget-data-path": "person.notes",
12
+ * "widget-data-collapsed": true,
13
+ * "widget-item": {
14
+ * "widget": "text",
15
+ * "widget-type": "input",
16
+ * "widget-label": "Additional Notes",
17
+ * "widget-id": "notes",
18
+ * ...
19
+ * }
20
+ * }
21
+ *
22
+ * Note: widget-item can be any widget config. If it has nested widgets property,
23
+ * those will be rendered as well.
24
+ */
25
+ interface IterableAccordionWidgetProps {
26
+ config: BaseWidgetConfig;
27
+ }
28
+ export declare const IterableAccordionWidget: ({ config }: IterableAccordionWidgetProps) => import("react/jsx-runtime").JSX.Element | null;
29
+ export {};
30
+ //# sourceMappingURL=IterableAccordionWidget.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IterableAccordionWidget.d.ts","sourceRoot":"","sources":["../../src/widgets/IterableAccordionWidget.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAI5C;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,UAAU,4BAA4B;IACpC,MAAM,EAAE,gBAAgB,CAAC;CAC1B;AAED,eAAO,MAAM,uBAAuB,GAAI,YAAY,4BAA4B,mDAmO/E,CAAC"}
@@ -0,0 +1,47 @@
1
+ import { BaseWidgetConfig } from '../types';
2
+ /**
3
+ * Number input widget with advanced numeric features
4
+ *
5
+ * Features:
6
+ * - Numeric type (integer/decimal, signed/unsigned)
7
+ * - Decimal precision control (0-6 places, rounding/truncation)
8
+ * - Value range validation (min/max)
9
+ * - Regular expression validation with custom messages
10
+ * - Maximum character limit
11
+ * - Numeric masking and formatting (thousand/decimal separators)
12
+ * - Text alignment (right by default, configurable)
13
+ * - Key input restrictions
14
+ *
15
+ * Usage in schema:
16
+ * {
17
+ * "widget": "number",
18
+ * "widget-type": "input",
19
+ * "widget-label": "Amount",
20
+ * "widget-id": "amount",
21
+ * "widget-data-path": "transaction.amount",
22
+ * "widget-data-format": {
23
+ * "numericType": "decimal",
24
+ * "decimalPlaces": 2,
25
+ * "roundingMode": "round",
26
+ * "thousandSeparator": ",",
27
+ * "decimalSeparator": ".",
28
+ * "textAlign": "right",
29
+ * "allowSigned": true,
30
+ * "formatOnBlur": true
31
+ * },
32
+ * "widget-data-validation": {
33
+ * "min": 0,
34
+ * "max": 10000,
35
+ * "pattern": "^[0-9]+(\\.[0-9]{1,2})?$",
36
+ * "patternMessage": "Invalid number format"
37
+ * },
38
+ * "widget-required": true,
39
+ * "widget-data-placeholder": "Enter amount"
40
+ * }
41
+ */
42
+ interface NumberInputWidgetProps {
43
+ config: BaseWidgetConfig;
44
+ }
45
+ export declare const NumberInputWidget: ({ config }: NumberInputWidgetProps) => import("react/jsx-runtime").JSX.Element;
46
+ export {};
47
+ //# sourceMappingURL=NumberInputWidget.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NumberInputWidget.d.ts","sourceRoot":"","sources":["../../src/widgets/NumberInputWidget.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAW5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,UAAU,sBAAsB;IAC9B,MAAM,EAAE,gBAAgB,CAAC;CAC1B;AAED,eAAO,MAAM,iBAAiB,GAAI,YAAY,sBAAsB,4CA2OnE,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { BaseWidgetConfig } from '../types';
2
+ /**
3
+ * Phone input widget with formatting
4
+ *
5
+ * Usage in schema:
6
+ * {
7
+ * "widget": "phone",
8
+ * "widget-type": "input",
9
+ * "widget-label": "Phone",
10
+ * "widget-id": "phone",
11
+ * "widget-data-path": "person.phone",
12
+ * "widget-data-format": {
13
+ * "pattern": "(XXX) XXX-XXXX"
14
+ * }
15
+ * }
16
+ */
17
+ interface PhoneInputWidgetProps {
18
+ config: BaseWidgetConfig;
19
+ }
20
+ export declare const PhoneInputWidget: ({ config }: PhoneInputWidgetProps) => import("react/jsx-runtime").JSX.Element;
21
+ export {};
22
+ //# sourceMappingURL=PhoneInputWidget.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PhoneInputWidget.d.ts","sourceRoot":"","sources":["../../src/widgets/PhoneInputWidget.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAG5C;;;;;;;;;;;;;;GAcG;AACH,UAAU,qBAAqB;IAC7B,MAAM,EAAE,gBAAgB,CAAC;CAC1B;AAED,eAAO,MAAM,gBAAgB,GAAI,YAAY,qBAAqB,4CAgFjE,CAAC"}
@@ -0,0 +1,50 @@
1
+ import { BaseWidgetConfig } from '../types';
2
+ /**
3
+ * Profile widget for displaying user identity information
4
+ * Displays an image/avatar, display name, and ID in a vertical layout
5
+ *
6
+ * This is a display widget that groups related profile fields together.
7
+ * Recommended widget-type: 'group' (groups related data fields)
8
+ * Alternative: 'layout' (for display-only, no value storage)
9
+ *
10
+ * Configuration (Recommended - Multi-path data binding):
11
+ *
12
+ * - widget-data-path: Object with keys 'image', 'name', 'id' mapping to data paths
13
+ * Example: { "image": "person.photo", "name": "person.name", "id": "person.id" }
14
+ *
15
+ * Alternative (Individual path properties - fallback):
16
+ * - widget-image-path?: string - Data path for the image/photo (e.g., "person.photo")
17
+ * - widget-name-path?: string - Data path for the display name (e.g., "person.name")
18
+ * - widget-id-path?: string - Data path for the ID (e.g., "person.id")
19
+ *
20
+ * Format options:
21
+ * - widget-data-format: Optional format configuration
22
+ * - imageSize?: number - Size of the avatar image in pixels (default: 80)
23
+ * - nameColor?: string - Color for the name text (default: '#ED7C22')
24
+ * - showIdLabel?: boolean - Whether to show "ID :" label (default: true)
25
+ *
26
+ * Example usage (Recommended):
27
+ * ```json
28
+ * {
29
+ * "widget": "profile",
30
+ * "widget-type": "group",
31
+ * "widget-id": "user-profile",
32
+ * "widget-data-path": {
33
+ * "image": "photo",
34
+ * "name": "display_name",
35
+ * "id": "national_id"
36
+ * },
37
+ * "widget-data-format": {
38
+ * "imageSize": 80,
39
+ * "nameColor": "#ED7C22",
40
+ * "showIdLabel": true
41
+ * }
42
+ * }
43
+ * ```
44
+ */
45
+ interface ProfileWidgetProps {
46
+ config: BaseWidgetConfig;
47
+ }
48
+ export declare const ProfileWidget: ({ config }: ProfileWidgetProps) => import("react/jsx-runtime").JSX.Element;
49
+ export {};
50
+ //# sourceMappingURL=ProfileWidget.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProfileWidget.d.ts","sourceRoot":"","sources":["../../src/widgets/ProfileWidget.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAM5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,UAAU,kBAAkB;IAC1B,MAAM,EAAE,gBAAgB,CAAC;CAC1B;AAED,eAAO,MAAM,aAAa,GAAI,YAAY,kBAAkB,4CAsP3D,CAAC"}
@@ -0,0 +1,44 @@
1
+ import { BaseWidgetConfig } from '../types';
2
+ /**
3
+ * Radio button widget with advanced features
4
+ *
5
+ * Features:
6
+ * - Static list of options
7
+ * - Dynamic options (from API / dataset)
8
+ * - Ordered options (preserve order or sort)
9
+ * - Option label & value separation
10
+ * - Display label
11
+ * - Stored value
12
+ * - Default selection (pre-selected option or unset)
13
+ * - Required vs optional
14
+ * - Layout options (vertical, horizontal, grid)
15
+ *
16
+ * Usage in schema:
17
+ * {
18
+ * "widget": "radio",
19
+ * "widget-type": "input",
20
+ * "widget-label": "Gender",
21
+ * "widget-id": "gender",
22
+ * "widget-data-path": "person.gender",
23
+ * "widget-data-default": "male",
24
+ * "widget-data-source": {
25
+ * "type": "static",
26
+ * "options": [
27
+ * { "value": "male", "label": "Male" },
28
+ * { "value": "female", "label": "Female" },
29
+ * { "value": "other", "label": "Other" }
30
+ * ]
31
+ * },
32
+ * "widget-data-format": {
33
+ * "layout": "vertical",
34
+ * "sortOptions": false
35
+ * },
36
+ * "widget-required": true
37
+ * }
38
+ */
39
+ interface RadioWidgetProps {
40
+ config: BaseWidgetConfig;
41
+ }
42
+ export declare const RadioWidget: ({ config }: RadioWidgetProps) => import("react/jsx-runtime").JSX.Element;
43
+ export {};
44
+ //# sourceMappingURL=RadioWidget.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RadioWidget.d.ts","sourceRoot":"","sources":["../../src/widgets/RadioWidget.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAG5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,UAAU,gBAAgB;IACxB,MAAM,EAAE,gBAAgB,CAAC;CAC1B;AAED,eAAO,MAAM,WAAW,GAAI,YAAY,gBAAgB,4CA+KvD,CAAC"}