@openg2p/registry-widgets 0.1.0 → 0.1.2
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.
- package/dist/components/PanelRenderer.d.ts +3 -3
- package/dist/components/PanelRenderer.d.ts.map +1 -1
- package/dist/components/SectionBuilder/JSONEditorPanel.d.ts +15 -0
- package/dist/components/SectionBuilder/JSONEditorPanel.d.ts.map +1 -0
- package/dist/components/SectionBuilder/PropertyEditor.d.ts +15 -0
- package/dist/components/SectionBuilder/PropertyEditor.d.ts.map +1 -0
- package/dist/components/SectionBuilder/SectionBuilder.d.ts +13 -0
- package/dist/components/SectionBuilder/SectionBuilder.d.ts.map +1 -0
- package/dist/components/SectionBuilder/SectionTree.d.ts +26 -0
- package/dist/components/SectionBuilder/SectionTree.d.ts.map +1 -0
- package/dist/components/SectionBuilder/VisualBuilderPanel.d.ts +22 -0
- package/dist/components/SectionBuilder/VisualBuilderPanel.d.ts.map +1 -0
- package/dist/components/SectionBuilder/index.d.ts +9 -0
- package/dist/components/SectionBuilder/index.d.ts.map +1 -0
- package/dist/components/SectionBuilder/schemas.d.ts +1947 -0
- package/dist/components/SectionBuilder/schemas.d.ts.map +1 -0
- package/dist/components/SectionRenderer.d.ts +5 -5
- package/dist/components/SectionRenderer.d.ts.map +1 -1
- package/dist/components/SectionsContainer.d.ts +4 -3
- package/dist/components/SectionsContainer.d.ts.map +1 -1
- package/dist/components/WidgetProvider.d.ts +4 -4
- package/dist/components/WidgetProvider.d.ts.map +1 -1
- package/dist/components/WidgetRenderer.d.ts +1 -1
- package/dist/components/WidgetRenderer.d.ts.map +1 -1
- package/dist/events/WidgetEventBus.d.ts +43 -0
- package/dist/events/WidgetEventBus.d.ts.map +1 -0
- package/dist/events/types.d.ts +27 -0
- package/dist/events/types.d.ts.map +1 -0
- package/dist/hooks/useBaseWidget.d.ts +2 -2
- package/dist/hooks/useBaseWidget.d.ts.map +1 -1
- package/dist/hooks/useGeoWidgetCascade.d.ts +12 -0
- package/dist/hooks/useGeoWidgetCascade.d.ts.map +1 -0
- package/dist/hooks/useWidgetCascade.d.ts +12 -0
- package/dist/hooks/useWidgetCascade.d.ts.map +1 -0
- package/dist/hooks/useWidgetEventBus.d.ts +9 -0
- package/dist/hooks/useWidgetEventBus.d.ts.map +1 -0
- package/dist/index.d.ts +253 -20
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +3154 -336
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +3162 -334
- package/dist/index.js.map +1 -1
- package/dist/store/widgetSlice.d.ts.map +1 -1
- package/dist/types/index.d.ts +38 -3
- package/dist/types/index.d.ts.map +1 -1
- package/dist/utils/dataSource.d.ts +3 -2
- package/dist/utils/dataSource.d.ts.map +1 -1
- package/dist/utils/geoHierarchy.d.ts +53 -0
- package/dist/utils/geoHierarchy.d.ts.map +1 -0
- package/dist/utils/schemaNamespace.d.ts +12 -0
- package/dist/utils/schemaNamespace.d.ts.map +1 -0
- package/dist/widgets/SelectWidget.d.ts.map +1 -1
- package/dist/widgets/TableWidget.d.ts.map +1 -1
- package/package.json +20 -12
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { PanelConfig } from '../types';
|
|
1
|
+
import { PanelConfig, DataSourceRequestHandler } from '../types';
|
|
2
2
|
import { UseBaseWidgetOptions } from '../hooks/useBaseWidget';
|
|
3
3
|
export interface PanelRendererProps {
|
|
4
4
|
panel: PanelConfig;
|
|
5
|
-
|
|
5
|
+
dataSourceRequestHandler?: DataSourceRequestHandler;
|
|
6
6
|
schemaData?: UseBaseWidgetOptions['schemaData'];
|
|
7
7
|
onValueChange?: UseBaseWidgetOptions['onValueChange'];
|
|
8
8
|
isEditMode?: boolean;
|
|
@@ -14,5 +14,5 @@ export interface PanelRendererProps {
|
|
|
14
14
|
* - Nested panels (for layout composition)
|
|
15
15
|
* - Widgets (for actual form inputs/controls)
|
|
16
16
|
*/
|
|
17
|
-
export declare const PanelRenderer: ({ panel,
|
|
17
|
+
export declare const PanelRenderer: ({ panel, dataSourceRequestHandler, schemaData, onValueChange, isEditMode, }: PanelRendererProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
18
|
//# sourceMappingURL=PanelRenderer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PanelRenderer.d.ts","sourceRoot":"","sources":["../../src/components/PanelRenderer.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"PanelRenderer.d.ts","sourceRoot":"","sources":["../../src/components/PanelRenderer.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAI9D,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,WAAW,CAAC;IACnB,wBAAwB,CAAC,EAAE,wBAAwB,CAAC;IACpD,UAAU,CAAC,EAAE,oBAAoB,CAAC,YAAY,CAAC,CAAC;IAChD,aAAa,CAAC,EAAE,oBAAoB,CAAC,eAAe,CAAC,CAAC;IACtD,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,aAAa,GAAI,6EAM3B,kBAAkB,4CAuKpB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SectionConfig } from '../../types';
|
|
3
|
+
interface JSONEditorPanelProps {
|
|
4
|
+
section: SectionConfig;
|
|
5
|
+
onChange: (section: SectionConfig) => void;
|
|
6
|
+
onReset?: () => void;
|
|
7
|
+
onSelectNode?: (nodeId: string, nodeType: 'section' | 'panel' | 'widget') => void;
|
|
8
|
+
context?: 'section' | 'panel' | 'widget';
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* JSON Editor Panel - Left side of Section Builder
|
|
12
|
+
*/
|
|
13
|
+
export declare const JSONEditorPanel: React.FC<JSONEditorPanelProps>;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=JSONEditorPanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"JSONEditorPanel.d.ts","sourceRoot":"","sources":["../../../src/components/SectionBuilder/JSONEditorPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAIjF,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAgD5C,UAAU,oBAAoB;IAC5B,OAAO,EAAE,aAAa,CAAC;IACvB,QAAQ,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,IAAI,CAAC;IAC3C,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,GAAG,OAAO,GAAG,QAAQ,KAAK,IAAI,CAAC;IAClF,OAAO,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,QAAQ,CAAC;CAC1C;AAED;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAiyB1D,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SectionConfig, PanelConfig, BaseWidgetConfig } from '../../types';
|
|
3
|
+
import { TreeNode } from './SectionTree';
|
|
4
|
+
interface PropertyEditorProps {
|
|
5
|
+
node: TreeNode | null;
|
|
6
|
+
onChange: (node: TreeNode, updates: Partial<SectionConfig | PanelConfig | BaseWidgetConfig>) => void;
|
|
7
|
+
onDelete: (node: TreeNode) => void;
|
|
8
|
+
onDuplicate: (node: TreeNode) => void;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Property editor component for editing selected node properties
|
|
12
|
+
*/
|
|
13
|
+
export declare const PropertyEditor: React.FC<PropertyEditorProps>;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=PropertyEditor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PropertyEditor.d.ts","sourceRoot":"","sources":["../../../src/components/SectionBuilder/PropertyEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,gBAAgB,EAAiB,MAAM,aAAa,CAAC;AAC1F,OAAO,EAAE,QAAQ,EAAgB,MAAM,eAAe,CAAC;AAGvD,UAAU,mBAAmB;IAC3B,IAAI,EAAE,QAAQ,GAAG,IAAI,CAAC;IACtB,QAAQ,EAAE,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAC,aAAa,GAAG,WAAW,GAAG,gBAAgB,CAAC,KAAK,IAAI,CAAC;IACrG,QAAQ,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;IACnC,WAAW,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;CACvC;AAED;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA6uBxD,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SectionConfig } from '../../types';
|
|
3
|
+
export interface SectionBuilderProps {
|
|
4
|
+
initialSection?: SectionConfig;
|
|
5
|
+
onChange?: (section: SectionConfig) => void;
|
|
6
|
+
onSave?: (section: SectionConfig) => void;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Main Section Builder Component
|
|
10
|
+
* Provides dual-panel interface for editing section JSON
|
|
11
|
+
*/
|
|
12
|
+
export declare const SectionBuilder: React.FC<SectionBuilderProps>;
|
|
13
|
+
//# sourceMappingURL=SectionBuilder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SectionBuilder.d.ts","sourceRoot":"","sources":["../../../src/components/SectionBuilder/SectionBuilder.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAC;AACxE,OAAO,EAAE,aAAa,EAAiC,MAAM,aAAa,CAAC;AAK3E,MAAM,WAAW,mBAAmB;IAClC,cAAc,CAAC,EAAE,aAAa,CAAC;IAC/B,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,IAAI,CAAC;IAC5C,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,IAAI,CAAC;CAC3C;AAED;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA6YxD,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SectionConfig, PanelConfig, BaseWidgetConfig } from '../../types';
|
|
3
|
+
export type TreeNodeType = 'section' | 'panel' | 'widget';
|
|
4
|
+
export interface TreeNode {
|
|
5
|
+
type: TreeNodeType;
|
|
6
|
+
id: string;
|
|
7
|
+
label: string;
|
|
8
|
+
data: SectionConfig | PanelConfig | BaseWidgetConfig;
|
|
9
|
+
children?: TreeNode[];
|
|
10
|
+
parent?: TreeNode;
|
|
11
|
+
}
|
|
12
|
+
interface SectionTreeProps {
|
|
13
|
+
section: SectionConfig;
|
|
14
|
+
selectedNode?: TreeNode | null;
|
|
15
|
+
onSelectNode: (node: TreeNode | null) => void;
|
|
16
|
+
onAddPanel: (parentId: string, parentType: TreeNodeType) => void;
|
|
17
|
+
onAddWidget: (parentId: string) => void;
|
|
18
|
+
onDeleteNode: (node: TreeNode) => void;
|
|
19
|
+
onDuplicateNode: (node: TreeNode) => void;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Tree view component for section structure
|
|
23
|
+
*/
|
|
24
|
+
export declare const SectionTree: React.FC<SectionTreeProps>;
|
|
25
|
+
export {};
|
|
26
|
+
//# sourceMappingURL=SectionTree.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SectionTree.d.ts","sourceRoot":"","sources":["../../../src/components/SectionBuilder/SectionTree.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE3E,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,OAAO,GAAG,QAAQ,CAAC;AAE1D,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,YAAY,CAAC;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,aAAa,GAAG,WAAW,GAAG,gBAAgB,CAAC;IACrD,QAAQ,CAAC,EAAE,QAAQ,EAAE,CAAC;IACtB,MAAM,CAAC,EAAE,QAAQ,CAAC;CACnB;AAED,UAAU,gBAAgB;IACxB,OAAO,EAAE,aAAa,CAAC;IACvB,YAAY,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;IAC/B,YAAY,EAAE,CAAC,IAAI,EAAE,QAAQ,GAAG,IAAI,KAAK,IAAI,CAAC;IAC9C,UAAU,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,YAAY,KAAK,IAAI,CAAC;IACjE,WAAW,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,YAAY,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;IACvC,eAAe,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;CAC3C;AA+CD;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CA8MlD,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SectionConfig } from '../../types';
|
|
3
|
+
import { TreeNode } from './SectionTree';
|
|
4
|
+
interface VisualBuilderPanelProps {
|
|
5
|
+
section: SectionConfig;
|
|
6
|
+
selectedNode: TreeNode | null;
|
|
7
|
+
onSelectNode: (node: TreeNode | null) => void;
|
|
8
|
+
onSectionChange: (section: SectionConfig) => void;
|
|
9
|
+
onAddPanel: (parentId: string, parentType: 'section' | 'panel' | 'widget') => void;
|
|
10
|
+
onAddWidget: (parentId: string) => void;
|
|
11
|
+
onDeleteNode: (node: TreeNode) => void;
|
|
12
|
+
onDuplicateNode: (node: TreeNode) => void;
|
|
13
|
+
onSave?: (section: SectionConfig) => void;
|
|
14
|
+
isMaximized?: boolean;
|
|
15
|
+
onToggleMaximize?: () => void;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Visual Builder Panel - Right side of Section Builder
|
|
19
|
+
*/
|
|
20
|
+
export declare const VisualBuilderPanel: React.FC<VisualBuilderPanelProps>;
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=VisualBuilderPanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VisualBuilderPanel.d.ts","sourceRoot":"","sources":["../../../src/components/SectionBuilder/VisualBuilderPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAiC,MAAM,aAAa,CAAC;AAC3E,OAAO,EAAe,QAAQ,EAAE,MAAM,eAAe,CAAC;AAGtD,UAAU,uBAAuB;IAC/B,OAAO,EAAE,aAAa,CAAC;IACvB,YAAY,EAAE,QAAQ,GAAG,IAAI,CAAC;IAC9B,YAAY,EAAE,CAAC,IAAI,EAAE,QAAQ,GAAG,IAAI,KAAK,IAAI,CAAC;IAC9C,eAAe,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,IAAI,CAAC;IAClD,UAAU,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,GAAG,OAAO,GAAG,QAAQ,KAAK,IAAI,CAAC;IACnF,WAAW,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,YAAY,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;IACvC,eAAe,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;IAC1C,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,IAAI,CAAC;IAC1C,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;CAC/B;AAED;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAiVhE,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { SectionBuilder } from './SectionBuilder';
|
|
2
|
+
export type { SectionBuilderProps } from './SectionBuilder';
|
|
3
|
+
export { JSONEditorPanel } from './JSONEditorPanel';
|
|
4
|
+
export { VisualBuilderPanel } from './VisualBuilderPanel';
|
|
5
|
+
export { SectionTree } from './SectionTree';
|
|
6
|
+
export type { TreeNode, TreeNodeType } from './SectionTree';
|
|
7
|
+
export { PropertyEditor } from './PropertyEditor';
|
|
8
|
+
export * from './schemas';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/SectionBuilder/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,YAAY,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,cAAc,WAAW,CAAC"}
|