@openg2p/registry-widgets 1.1.4-dev.3 → 1.1.4-dev.4

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.
@@ -0,0 +1,11 @@
1
+ import { SectionConfig } from '../types';
2
+ import type { SectionChanges } from '../components/SectionRenderer';
3
+ /**
4
+ * Build SectionChanges from section config and current store values.
5
+ * Works for intake forms (no sectionRegisterId) and edit flows (with sectionRegisterId).
6
+ */
7
+ export declare function buildSectionChanges(section: SectionConfig, storeValues: Record<string, unknown>, namespace?: string, options?: {
8
+ dbSectionId?: string;
9
+ sectionRegisterId?: string;
10
+ }): SectionChanges;
11
+ //# sourceMappingURL=buildSectionChanges.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"buildSectionChanges.d.ts","sourceRoot":"","sources":["../../src/utils/buildSectionChanges.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAGzC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAGpE;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,aAAa,EACtB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACpC,SAAS,CAAC,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE;IAAE,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,iBAAiB,CAAC,EAAE,MAAM,CAAA;CAAE,GAC7D,cAAc,CAuEhB"}
@@ -0,0 +1,12 @@
1
+ import { SectionConfig } from '../types';
2
+ /**
3
+ * Namespace widget IDs and data paths in a section configuration
4
+ * This ensures unique widget IDs and data paths when the same section is rendered multiple times
5
+ * (e.g., in CRView mode showing old and new records side by side)
6
+ *
7
+ * @param section - Section configuration to namespace
8
+ * @param namespace - Namespace prefix to add to widget IDs and data paths (e.g., "old", "new", "instance-1")
9
+ * @returns Namespaced section configuration
10
+ */
11
+ export declare const namespaceSectionConfig: (section: SectionConfig, namespace: string) => SectionConfig;
12
+ //# sourceMappingURL=schemaNamespace.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemaNamespace.d.ts","sourceRoot":"","sources":["../../src/utils/schemaNamespace.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAiC,MAAM,UAAU,CAAC;AAkHxE;;;;;;;;GAQG;AACH,eAAO,MAAM,sBAAsB,GACjC,SAAS,aAAa,EACtB,WAAW,MAAM,KAChB,aA0BF,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;AAK5C;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,UAAU,gBAAgB;IACxB,MAAM,EAAE,gBAAgB,CAAC;CAC1B;AAED,eAAO,MAAM,WAAW,GAAI,YAAY,gBAAgB,mDAyHvD,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;AAI5C;;;;;;;;;;;;;;;;GAgBG;AACH,UAAU,wBAAwB;IAChC,MAAM,EAAE,gBAAgB,CAAC;CAC1B;AAED,eAAO,MAAM,mBAAmB,GAAI,YAAY,wBAAwB,4CAmGvE,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;AAK5C;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,UAAU,4BAA4B;IACpC,MAAM,EAAE,gBAAgB,CAAC;CAC1B;AAED,eAAO,MAAM,uBAAuB,GAAI,YAAY,4BAA4B,mDAmO/E,CAAC"}
@@ -0,0 +1,32 @@
1
+ import { BaseWidgetConfig } from '../types';
2
+ /**
3
+ * Simple table widget for structured data
4
+ *
5
+ * Usage in schema:
6
+ * {
7
+ * "widget": "simple-table",
8
+ * "widget-type": "table",
9
+ * "widget-label": "Education History",
10
+ * "widget-id": "educationHistory",
11
+ * "widget-data-path": "education.history",
12
+ * "widget-data-columns": [
13
+ * {
14
+ * "column-key": "degree",
15
+ * "widget-label": "Degree",
16
+ * "widget": "text",
17
+ * "widget-data-path": "degree"
18
+ * }
19
+ * ],
20
+ * "widget-data-operations": {
21
+ * "add": true,
22
+ * "remove": true,
23
+ * "edit": true
24
+ * }
25
+ * }
26
+ */
27
+ interface SimpleTableWidgetProps {
28
+ config: BaseWidgetConfig;
29
+ }
30
+ export declare const SimpleTableWidget: ({ config }: SimpleTableWidgetProps) => import("react/jsx-runtime").JSX.Element;
31
+ export {};
32
+ //# sourceMappingURL=SimpleTableWidget.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SimpleTableWidget.d.ts","sourceRoot":"","sources":["../../src/widgets/SimpleTableWidget.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAI5C;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,UAAU,sBAAsB;IAC9B,MAAM,EAAE,gBAAgB,CAAC;CAC1B;AAED,eAAO,MAAM,iBAAiB,GAAI,YAAY,sBAAsB,4CAwJnE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openg2p/registry-widgets",
3
- "version": "1.1.4-dev.3",
3
+ "version": "1.1.4-dev.4",
4
4
  "type": "module",
5
5
  "description": "Complete React widget library with generic form widgets, data binding, validation, and conditional logic",
6
6
  "main": "dist/index.js",