@openg2p/registry-widgets 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/dist/components/PanelRenderer.d.ts.map +1 -1
  2. package/dist/components/SectionBuilder/JSONEditorPanel.d.ts +13 -0
  3. package/dist/components/SectionBuilder/JSONEditorPanel.d.ts.map +1 -0
  4. package/dist/components/SectionBuilder/PropertyEditor.d.ts +15 -0
  5. package/dist/components/SectionBuilder/PropertyEditor.d.ts.map +1 -0
  6. package/dist/components/SectionBuilder/SectionBuilder.d.ts +13 -0
  7. package/dist/components/SectionBuilder/SectionBuilder.d.ts.map +1 -0
  8. package/dist/components/SectionBuilder/SectionTree.d.ts +26 -0
  9. package/dist/components/SectionBuilder/SectionTree.d.ts.map +1 -0
  10. package/dist/components/SectionBuilder/VisualBuilderPanel.d.ts +19 -0
  11. package/dist/components/SectionBuilder/VisualBuilderPanel.d.ts.map +1 -0
  12. package/dist/components/SectionBuilder/index.d.ts +9 -0
  13. package/dist/components/SectionBuilder/index.d.ts.map +1 -0
  14. package/dist/components/SectionBuilder/schemas.d.ts +1947 -0
  15. package/dist/components/SectionBuilder/schemas.d.ts.map +1 -0
  16. package/dist/components/SectionRenderer.d.ts +4 -4
  17. package/dist/components/SectionRenderer.d.ts.map +1 -1
  18. package/dist/components/SectionsContainer.d.ts +2 -1
  19. package/dist/components/SectionsContainer.d.ts.map +1 -1
  20. package/dist/index.d.ts +6 -5
  21. package/dist/index.esm.js +558 -173
  22. package/dist/index.esm.js.map +1 -1
  23. package/dist/index.js +558 -173
  24. package/dist/index.js.map +1 -1
  25. package/dist/utils/schemaNamespace.d.ts +12 -0
  26. package/dist/utils/schemaNamespace.d.ts.map +1 -0
  27. package/dist/widgets/RadioWidget.d.ts.map +1 -1
  28. package/dist/widgets/SelectWidget.d.ts.map +1 -1
  29. package/dist/widgets/TableWidget.d.ts.map +1 -1
  30. package/package.json +11 -11
@@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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4CzB,CAAC;AAEF;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,SAAS,GAAG,OAAO,GAAG,QAAQ,GAAG,GAAG,CAWhF"}
@@ -3,9 +3,8 @@ import { UseBaseWidgetOptions } from '../hooks/useBaseWidget';
3
3
  import { SectionMode } from './SectionsContainer';
4
4
  export interface SectionChanges {
5
5
  section_id: string;
6
- section_schema: SectionConfig;
7
- old_section_value: unknown;
8
- new_section_value: unknown;
6
+ records: unknown[];
7
+ files?: unknown[];
9
8
  }
10
9
  export interface SectionRendererProps {
11
10
  section: SectionConfig;
@@ -16,6 +15,7 @@ export interface SectionRendererProps {
16
15
  onSectionSave?: (changes: SectionChanges) => Promise<void> | void;
17
16
  hideEditButton?: boolean;
18
17
  mode?: SectionMode;
18
+ namespace?: string;
19
19
  }
20
20
  /**
21
21
  * Renders a section with its panels
@@ -25,5 +25,5 @@ export interface SectionRendererProps {
25
25
  * - Panels wrap when they exceed available width
26
26
  * - Sections can sit side-by-side if there's space
27
27
  */
28
- export declare const SectionRenderer: ({ section, apiAdapter, schemaData, onValueChange, gridColumnSpan, onSectionSave, hideEditButton, mode, }: SectionRendererProps) => import("react/jsx-runtime").JSX.Element;
28
+ export declare const SectionRenderer: ({ section, apiAdapter, schemaData, onValueChange, gridColumnSpan, onSectionSave, hideEditButton, mode, namespace, }: SectionRendererProps) => import("react/jsx-runtime").JSX.Element;
29
29
  //# sourceMappingURL=SectionRenderer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SectionRenderer.d.ts","sourceRoot":"","sources":["../../src/components/SectionRenderer.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAyC,MAAM,UAAU,CAAC;AAChF,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAM9D,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAGlD,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,aAAa,CAAC;IAC9B,iBAAiB,EAAE,OAAO,CAAC;IAC3B,iBAAiB,EAAE,OAAO,CAAC;CAC5B;AAED,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,aAAa,CAAC;IACvB,UAAU,CAAC,EAAE,oBAAoB,CAAC,YAAY,CAAC,CAAC;IAChD,UAAU,CAAC,EAAE,oBAAoB,CAAC,YAAY,CAAC,CAAC;IAChD,aAAa,CAAC,EAAE,oBAAoB,CAAC,eAAe,CAAC,CAAC;IACtD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAClE,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,IAAI,CAAC,EAAE,WAAW,CAAC;CAEpB;AAGD;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,GAAI,0GAS7B,oBAAoB,4CA6zBtB,CAAC"}
1
+ {"version":3,"file":"SectionRenderer.d.ts","sourceRoot":"","sources":["../../src/components/SectionRenderer.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAyC,MAAM,UAAU,CAAC;AAChF,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAM9D,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAIlD,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,OAAO,EAAE,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC;CACnB;AAED,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,aAAa,CAAC;IACvB,UAAU,CAAC,EAAE,oBAAoB,CAAC,YAAY,CAAC,CAAC;IAChD,UAAU,CAAC,EAAE,oBAAoB,CAAC,YAAY,CAAC,CAAC;IAChD,aAAa,CAAC,EAAE,oBAAoB,CAAC,eAAe,CAAC,CAAC;IACtD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAClE,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CAEpB;AAGD;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,GAAI,qHAU7B,oBAAoB,4CAs7BtB,CAAC"}
@@ -11,6 +11,7 @@ export interface SectionsContainerProps {
11
11
  onSectionSave?: (changes: SectionChanges) => Promise<void> | void;
12
12
  hideEditButton?: boolean;
13
13
  mode?: SectionMode;
14
+ namespace?: string | ((sectionId: string, index: number) => string);
14
15
  }
15
16
  /**
16
17
  * Container component that renders multiple sections
@@ -22,5 +23,5 @@ export interface SectionsContainerProps {
22
23
  * - All sections align to the same grid, ensuring right-side alignment
23
24
  * - Handles nested structure: multiple horizontal panels, each with multiple vertical panels
24
25
  */
25
- export declare const SectionsContainer: ({ sections, apiAdapter, schemaData, onValueChange, className, onSectionSave, hideEditButton, mode, }: SectionsContainerProps) => import("react/jsx-runtime").JSX.Element;
26
+ export declare const SectionsContainer: ({ sections, apiAdapter, schemaData, onValueChange, className, onSectionSave, hideEditButton, mode, namespace, }: SectionsContainerProps) => import("react/jsx-runtime").JSX.Element;
26
27
  //# sourceMappingURL=SectionsContainer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SectionsContainer.d.ts","sourceRoot":"","sources":["../../src/components/SectionsContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAmB,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEpE,MAAM,MAAM,WAAW,GAAG,cAAc,GAAG,QAAQ,CAAC;AAEpD,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,aAAa,EAAE,CAAC;IAC1B,UAAU,CAAC,EAAE,oBAAoB,CAAC,YAAY,CAAC,CAAC;IAChD,UAAU,CAAC,EAAE,oBAAoB,CAAC,YAAY,CAAC,CAAC;IAChD,aAAa,CAAC,EAAE,oBAAoB,CAAC,eAAe,CAAC,CAAC;IACtD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAClE,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,IAAI,CAAC,EAAE,WAAW,CAAC;CAEpB;AA0ED;;;;;;;;;GASG;AACH,eAAO,MAAM,iBAAiB,GAAI,sGAS/B,sBAAsB,4CAiGxB,CAAC"}
1
+ {"version":3,"file":"SectionsContainer.d.ts","sourceRoot":"","sources":["../../src/components/SectionsContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAmB,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEpE,MAAM,MAAM,WAAW,GAAG,cAAc,GAAG,QAAQ,CAAC;AAEpD,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,aAAa,EAAE,CAAC;IAC1B,UAAU,CAAC,EAAE,oBAAoB,CAAC,YAAY,CAAC,CAAC;IAChD,UAAU,CAAC,EAAE,oBAAoB,CAAC,YAAY,CAAC,CAAC;IAChD,aAAa,CAAC,EAAE,oBAAoB,CAAC,eAAe,CAAC,CAAC;IACtD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAClE,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC,CAAC;CAErE;AA4ED;;;;;;;;;GASG;AACH,eAAO,MAAM,iBAAiB,GAAI,iHAU/B,sBAAsB,4CAwGxB,CAAC"}
package/dist/index.d.ts CHANGED
@@ -410,6 +410,7 @@ interface SectionsContainerProps {
410
410
  onSectionSave?: (changes: SectionChanges) => Promise<void> | void;
411
411
  hideEditButton?: boolean;
412
412
  mode?: SectionMode;
413
+ namespace?: string | ((sectionId: string, index: number) => string);
413
414
  }
414
415
  /**
415
416
  * Container component that renders multiple sections
@@ -421,13 +422,12 @@ interface SectionsContainerProps {
421
422
  * - All sections align to the same grid, ensuring right-side alignment
422
423
  * - Handles nested structure: multiple horizontal panels, each with multiple vertical panels
423
424
  */
424
- declare const SectionsContainer: ({ sections, apiAdapter, schemaData, onValueChange, className, onSectionSave, hideEditButton, mode, }: SectionsContainerProps) => react_jsx_runtime.JSX.Element;
425
+ declare const SectionsContainer: ({ sections, apiAdapter, schemaData, onValueChange, className, onSectionSave, hideEditButton, mode, namespace, }: SectionsContainerProps) => react_jsx_runtime.JSX.Element;
425
426
 
426
427
  interface SectionChanges {
427
428
  section_id: string;
428
- section_schema: SectionConfig;
429
- old_section_value: unknown;
430
- new_section_value: unknown;
429
+ records: unknown[];
430
+ files?: unknown[];
431
431
  }
432
432
  interface SectionRendererProps {
433
433
  section: SectionConfig;
@@ -438,6 +438,7 @@ interface SectionRendererProps {
438
438
  onSectionSave?: (changes: SectionChanges) => Promise<void> | void;
439
439
  hideEditButton?: boolean;
440
440
  mode?: SectionMode;
441
+ namespace?: string;
441
442
  }
442
443
  /**
443
444
  * Renders a section with its panels
@@ -447,7 +448,7 @@ interface SectionRendererProps {
447
448
  * - Panels wrap when they exceed available width
448
449
  * - Sections can sit side-by-side if there's space
449
450
  */
450
- declare const SectionRenderer: ({ section, apiAdapter, schemaData, onValueChange, gridColumnSpan, onSectionSave, hideEditButton, mode, }: SectionRendererProps) => react_jsx_runtime.JSX.Element;
451
+ declare const SectionRenderer: ({ section, apiAdapter, schemaData, onValueChange, gridColumnSpan, onSectionSave, hideEditButton, mode, namespace, }: SectionRendererProps) => react_jsx_runtime.JSX.Element;
451
452
 
452
453
  /**
453
454
  * Register all default/generic widgets