@openg2p/registry-widgets 1.1.3-dev.1 → 1.1.4-dev.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.
- package/README.md +100 -0
- package/dist/components/FilePreviewModal.d.ts +2 -4
- package/dist/components/FilePreviewModal.d.ts.map +1 -1
- package/dist/components/PanelRenderer.d.ts +0 -7
- package/dist/components/PanelRenderer.d.ts.map +1 -1
- package/dist/components/SectionBuilder/JSONEditorPanel.d.ts.map +1 -1
- package/dist/components/SectionBuilder/schemas.d.ts +5 -5
- package/dist/components/SectionBuilder/schemas.d.ts.map +1 -1
- package/dist/components/SectionRenderer/SectionRenderer.d.ts +3 -0
- package/dist/components/SectionRenderer/SectionRenderer.d.ts.map +1 -0
- package/dist/components/SectionRenderer/components/CRViewFooter.d.ts +8 -0
- package/dist/components/SectionRenderer/components/CRViewFooter.d.ts.map +1 -0
- package/dist/components/SectionRenderer/components/EditSectionPortal.d.ts +30 -0
- package/dist/components/SectionRenderer/components/EditSectionPortal.d.ts.map +1 -0
- package/dist/components/SectionRenderer/components/IntakeFormLayout.d.ts +23 -0
- package/dist/components/SectionRenderer/components/IntakeFormLayout.d.ts.map +1 -0
- package/dist/components/SectionRenderer/components/PanelGrid.d.ts +17 -0
- package/dist/components/SectionRenderer/components/PanelGrid.d.ts.map +1 -0
- package/dist/components/SectionRenderer/components/RegistryViewLayout.d.ts +26 -0
- package/dist/components/SectionRenderer/components/RegistryViewLayout.d.ts.map +1 -0
- package/dist/components/SectionRenderer/components/SectionEditControls.d.ts +7 -0
- package/dist/components/SectionRenderer/components/SectionEditControls.d.ts.map +1 -0
- package/dist/components/SectionRenderer/components/SectionStyles.d.ts +11 -0
- package/dist/components/SectionRenderer/components/SectionStyles.d.ts.map +1 -0
- package/dist/components/SectionRenderer/components/SupportingDocuments.d.ts +13 -0
- package/dist/components/SectionRenderer/components/SupportingDocuments.d.ts.map +1 -0
- package/dist/components/SectionRenderer/components/index.d.ts +9 -0
- package/dist/components/SectionRenderer/components/index.d.ts.map +1 -0
- package/dist/components/SectionRenderer/hooks/index.d.ts +6 -0
- package/dist/components/SectionRenderer/hooks/index.d.ts.map +1 -0
- package/dist/components/SectionRenderer/hooks/useCrViewData.d.ts +8 -0
- package/dist/components/SectionRenderer/hooks/useCrViewData.d.ts.map +1 -0
- package/dist/components/SectionRenderer/hooks/useIntakeFormAccordion.d.ts +6 -0
- package/dist/components/SectionRenderer/hooks/useIntakeFormAccordion.d.ts.map +1 -0
- package/dist/components/SectionRenderer/hooks/useSectionActions.d.ts +34 -0
- package/dist/components/SectionRenderer/hooks/useSectionActions.d.ts.map +1 -0
- package/dist/components/SectionRenderer/hooks/useSectionDirty.d.ts +25 -0
- package/dist/components/SectionRenderer/hooks/useSectionDirty.d.ts.map +1 -0
- package/dist/components/SectionRenderer/hooks/useSectionEditPortal.d.ts +15 -0
- package/dist/components/SectionRenderer/hooks/useSectionEditPortal.d.ts.map +1 -0
- package/dist/components/SectionRenderer/index.d.ts +3 -0
- package/dist/components/SectionRenderer/index.d.ts.map +1 -0
- package/dist/components/SectionRenderer/types/index.d.ts +3 -0
- package/dist/components/SectionRenderer/types/index.d.ts.map +1 -0
- package/dist/components/SectionRenderer/types/sectionChanges.d.ts +8 -0
- package/dist/components/SectionRenderer/types/sectionChanges.d.ts.map +1 -0
- package/dist/components/SectionRenderer/types/sectionRendererProps.d.ts +30 -0
- package/dist/components/SectionRenderer/types/sectionRendererProps.d.ts.map +1 -0
- package/dist/components/SectionRenderer/utils/documentWidgetConfig.d.ts +17 -0
- package/dist/components/SectionRenderer/utils/documentWidgetConfig.d.ts.map +1 -0
- package/dist/components/SectionRenderer/utils/executeSectionSave.d.ts +24 -0
- package/dist/components/SectionRenderer/utils/executeSectionSave.d.ts.map +1 -0
- package/dist/components/SectionRenderer/utils/index.d.ts +10 -0
- package/dist/components/SectionRenderer/utils/index.d.ts.map +1 -0
- package/dist/components/SectionRenderer/utils/makePanelsEditable.d.ts +4 -0
- package/dist/components/SectionRenderer/utils/makePanelsEditable.d.ts.map +1 -0
- package/dist/components/SectionRenderer/utils/panelLayout.d.ts +10 -0
- package/dist/components/SectionRenderer/utils/panelLayout.d.ts.map +1 -0
- package/dist/components/SectionRenderer/utils/readonlyStyles.d.ts +9 -0
- package/dist/components/SectionRenderer/utils/readonlyStyles.d.ts.map +1 -0
- package/dist/components/SectionRenderer/utils/revertSectionValues.d.ts +16 -0
- package/dist/components/SectionRenderer/utils/revertSectionValues.d.ts.map +1 -0
- package/dist/components/SectionRenderer/utils/sectionSnapshot.d.ts +25 -0
- package/dist/components/SectionRenderer/utils/sectionSnapshot.d.ts.map +1 -0
- package/dist/components/SectionsContainer.d.ts +1 -23
- package/dist/components/SectionsContainer.d.ts.map +1 -1
- package/dist/components/WidgetFieldLabel.d.ts +2 -5
- package/dist/components/WidgetFieldLabel.d.ts.map +1 -1
- package/dist/components/WidgetProvider.d.ts +4 -5
- package/dist/components/WidgetProvider.d.ts.map +1 -1
- package/dist/components/WidgetRenderer.d.ts +2 -2
- package/dist/components/WidgetRenderer.d.ts.map +1 -1
- package/dist/events/WidgetEventBus.d.ts +0 -22
- package/dist/events/WidgetEventBus.d.ts.map +1 -1
- package/dist/hooks/useBaseWidget.d.ts +0 -1
- package/dist/hooks/useBaseWidget.d.ts.map +1 -1
- package/dist/hooks/useGeoHierarchy.d.ts +47 -0
- package/dist/hooks/useGeoHierarchy.d.ts.map +1 -0
- package/dist/hooks/useWidgetCascade.d.ts.map +1 -1
- package/dist/hooks/useWidgetEventBus.d.ts +0 -3
- package/dist/hooks/useWidgetEventBus.d.ts.map +1 -1
- package/dist/hooks/useWidgetTheme.d.ts +0 -8
- package/dist/hooks/useWidgetTheme.d.ts.map +1 -1
- package/dist/index.d.ts +83 -1102
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +4280 -5834
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +4280 -5858
- package/dist/index.js.map +1 -1
- package/dist/registry/WidgetRegistry.d.ts +0 -24
- package/dist/registry/WidgetRegistry.d.ts.map +1 -1
- package/dist/registry/defaultWidgets.d.ts +0 -4
- package/dist/registry/defaultWidgets.d.ts.map +1 -1
- package/dist/store/index.d.ts.map +1 -1
- package/dist/store/widgetSlice.d.ts.map +1 -1
- package/dist/theme/index.d.ts +3 -51
- package/dist/theme/index.d.ts.map +1 -1
- package/dist/types/index.d.ts +50 -118
- package/dist/types/index.d.ts.map +1 -1
- package/dist/utils/dataSource.d.ts +2 -8
- package/dist/utils/dataSource.d.ts.map +1 -1
- package/dist/utils/dateInput.d.ts +0 -33
- package/dist/utils/dateInput.d.ts.map +1 -1
- package/dist/utils/datetimeInput.d.ts +1 -28
- package/dist/utils/datetimeInput.d.ts.map +1 -1
- package/dist/utils/extractTableRecordsFromSnapshot.d.ts.map +1 -1
- package/dist/utils/filePreview.d.ts +0 -6
- package/dist/utils/filePreview.d.ts.map +1 -1
- package/dist/utils/fileSerialization.d.ts +1 -25
- package/dist/utils/fileSerialization.d.ts.map +1 -1
- package/dist/utils/formatting.d.ts +0 -12
- package/dist/utils/formatting.d.ts.map +1 -1
- package/dist/utils/geoHierarchy.d.ts +67 -109
- package/dist/utils/geoHierarchy.d.ts.map +1 -1
- package/dist/utils/numberInput.d.ts +0 -18
- package/dist/utils/numberInput.d.ts.map +1 -1
- package/dist/utils/pathUtils.d.ts +0 -7
- package/dist/utils/pathUtils.d.ts.map +1 -1
- package/dist/utils/schemaTranslation.d.ts +0 -18
- package/dist/utils/schemaTranslation.d.ts.map +1 -1
- package/dist/utils/sectionRevert.d.ts +0 -6
- package/dist/utils/sectionRevert.d.ts.map +1 -1
- package/dist/utils/sectionValidate.d.ts +4 -8
- package/dist/utils/sectionValidate.d.ts.map +1 -1
- package/dist/utils/tSchema.d.ts +5 -0
- package/dist/utils/tSchema.d.ts.map +1 -0
- package/dist/utils/textInput.d.ts +0 -12
- package/dist/utils/textInput.d.ts.map +1 -1
- package/dist/utils/validation.d.ts +2 -8
- package/dist/utils/validation.d.ts.map +1 -1
- package/dist/utils/validationPatterns.d.ts +0 -10
- package/dist/utils/validationPatterns.d.ts.map +1 -1
- package/dist/widgets/BooleanWidget.d.ts +0 -28
- package/dist/widgets/BooleanWidget.d.ts.map +1 -1
- package/dist/widgets/CheckboxWidget.d.ts +0 -49
- package/dist/widgets/CheckboxWidget.d.ts.map +1 -1
- package/dist/widgets/DateInputWidget.d.ts +0 -40
- package/dist/widgets/DateInputWidget.d.ts.map +1 -1
- package/dist/widgets/DateTimeInputWidget.d.ts +0 -35
- package/dist/widgets/DateTimeInputWidget.d.ts.map +1 -1
- package/dist/widgets/DialogTableWidget.d.ts.map +1 -1
- package/dist/widgets/DisplayWidget.d.ts +0 -4
- package/dist/widgets/DisplayWidget.d.ts.map +1 -1
- package/dist/widgets/DocsWidget.d.ts +15 -0
- package/dist/widgets/DocsWidget.d.ts.map +1 -0
- package/dist/widgets/FileInputWidget.d.ts +0 -17
- package/dist/widgets/FileInputWidget.d.ts.map +1 -1
- package/dist/widgets/GeoHierarchyWidget.d.ts +7 -0
- package/dist/widgets/GeoHierarchyWidget.d.ts.map +1 -0
- package/dist/widgets/HeaderSectionWidget.d.ts.map +1 -1
- package/dist/widgets/IdAuthenticationWidget.d.ts.map +1 -1
- package/dist/widgets/MultiSelectWidget.d.ts.map +1 -1
- package/dist/widgets/NumberInputWidget.d.ts +0 -42
- package/dist/widgets/NumberInputWidget.d.ts.map +1 -1
- package/dist/widgets/PhoneInputWidget.d.ts +0 -15
- package/dist/widgets/PhoneInputWidget.d.ts.map +1 -1
- package/dist/widgets/ProfileWidget.d.ts +0 -43
- package/dist/widgets/ProfileWidget.d.ts.map +1 -1
- package/dist/widgets/RadioWidget.d.ts +0 -37
- package/dist/widgets/RadioWidget.d.ts.map +1 -1
- package/dist/widgets/RegisterLookupWidget.d.ts.map +1 -1
- package/dist/widgets/ScoresDisplayWidget.d.ts +0 -11
- package/dist/widgets/ScoresDisplayWidget.d.ts.map +1 -1
- package/dist/widgets/SelectWidget.d.ts +0 -16
- package/dist/widgets/SelectWidget.d.ts.map +1 -1
- package/dist/widgets/TableWidget.d.ts +0 -39
- package/dist/widgets/TableWidget.d.ts.map +1 -1
- package/dist/widgets/TextAreaWidget.d.ts +0 -33
- package/dist/widgets/TextAreaWidget.d.ts.map +1 -1
- package/dist/widgets/TextInputWidget.d.ts +0 -41
- package/dist/widgets/TextInputWidget.d.ts.map +1 -1
- package/dist/widgets/index.d.ts +2 -4
- package/dist/widgets/index.d.ts.map +1 -1
- package/package.json +11 -14
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sectionRendererProps.d.ts","sourceRoot":"","sources":["../../../../src/components/SectionRenderer/types/sectionRendererProps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,aAAa,CAAC;IACvB,wBAAwB,CAAC,EAAE,oBAAoB,CAAC,0BAA0B,CAAC,CAAC;IAC5E,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,iBAAiB,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC;IAClC,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,oBAAoB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACrE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oBAAoB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,oBAAoB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/C,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,gBAAgB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACjE,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SupportingDocumentConfig } from '../../../types';
|
|
2
|
+
import { SectionMode } from '../../SectionsContainer';
|
|
3
|
+
export declare const createDocumentWidgetConfig: (doc: SupportingDocumentConfig, sectionId: string, index: number, mode: SectionMode, isDraft?: boolean) => {
|
|
4
|
+
widget: string;
|
|
5
|
+
'widget-type': "input";
|
|
6
|
+
'widget-label': string;
|
|
7
|
+
'widget-id': string;
|
|
8
|
+
'widget-data-path': string;
|
|
9
|
+
'widget-required': boolean;
|
|
10
|
+
'widget-readonly': boolean;
|
|
11
|
+
'widget-data-options': {
|
|
12
|
+
accept: string;
|
|
13
|
+
multiple: boolean;
|
|
14
|
+
maxSize: number | undefined;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=documentWidgetConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"documentWidgetConfig.d.ts","sourceRoot":"","sources":["../../../../src/components/SectionRenderer/utils/documentWidgetConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,eAAO,MAAM,0BAA0B,GACrC,KAAK,wBAAwB,EAC7B,WAAW,MAAM,EACjB,OAAO,MAAM,EACb,MAAM,WAAW,EACjB,UAAU,OAAO;;;;;;;;;;;;;CA4BlB,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Dispatch } from '@reduxjs/toolkit';
|
|
2
|
+
import { SectionConfig } from '../../../types';
|
|
3
|
+
import { SectionChanges } from '../types';
|
|
4
|
+
export interface ExecuteSectionSaveParams {
|
|
5
|
+
store: {
|
|
6
|
+
getState: () => unknown;
|
|
7
|
+
};
|
|
8
|
+
dispatch: Dispatch;
|
|
9
|
+
section: SectionConfig;
|
|
10
|
+
schemaData?: Record<string, unknown>;
|
|
11
|
+
contextSchemaData?: Record<string, unknown>;
|
|
12
|
+
hasSupportingDocuments: boolean;
|
|
13
|
+
dbSectionId?: string;
|
|
14
|
+
sectionRegisterId?: string;
|
|
15
|
+
onSectionSave?: (changes: SectionChanges) => Promise<void> | void;
|
|
16
|
+
}
|
|
17
|
+
export interface ExecuteSectionSaveResult {
|
|
18
|
+
validated: boolean;
|
|
19
|
+
saved: boolean;
|
|
20
|
+
saveFailed?: boolean;
|
|
21
|
+
currentSchemaData: Record<string, unknown>;
|
|
22
|
+
}
|
|
23
|
+
export declare const executeSectionSave: ({ store, dispatch, section, schemaData, contextSchemaData, hasSupportingDocuments, dbSectionId, sectionRegisterId, onSectionSave, }: ExecuteSectionSaveParams) => Promise<ExecuteSectionSaveResult>;
|
|
24
|
+
//# sourceMappingURL=executeSectionSave.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"executeSectionSave.d.ts","sourceRoot":"","sources":["../../../../src/components/SectionRenderer/utils/executeSectionSave.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAO/C,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAG1C,MAAM,WAAW,wBAAwB;IACvC,KAAK,EAAE;QAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;KAAE,CAAC;IACnC,QAAQ,EAAE,QAAQ,CAAC;IACnB,OAAO,EAAE,aAAa,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC5C,sBAAsB,EAAE,OAAO,CAAC;IAChC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;CACnE;AAED,MAAM,WAAW,wBAAwB;IACvC,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,OAAO,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC5C;AAwGD,eAAO,MAAM,kBAAkB,GAAU,qIAUtC,wBAAwB,KAAG,OAAO,CAAC,wBAAwB,CAwD7D,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { countVerticalPanels, hasTableWidget, getTableWidgetColumnSpan, resolveSectionColumnSpan, } from './panelLayout';
|
|
2
|
+
export { READONLY_VALUE_ROW_ROOT_CLASSES, READONLY_SINGLE_LINE_VALUE_ROW_CLASSES, scopedClassSelectors, buildReadonlyStyleSelectors, } from './readonlyStyles';
|
|
3
|
+
export { makePanelsEditable, buildEditableSection } from './makePanelsEditable';
|
|
4
|
+
export { createDocumentWidgetConfig } from './documentWidgetConfig';
|
|
5
|
+
export { trackSectionChanges, buildSectionSnapshot, buildSectionChanges, buildSectionRecords } from './sectionSnapshot';
|
|
6
|
+
export type { BuildSectionRecordsOptions, SectionRecordsEditAction, SectionRecordsWhenEmpty } from './sectionSnapshot';
|
|
7
|
+
export { revertSectionValues } from './revertSectionValues';
|
|
8
|
+
export { executeSectionSave } from './executeSectionSave';
|
|
9
|
+
export type { ExecuteSectionSaveParams, ExecuteSectionSaveResult } from './executeSectionSave';
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/SectionRenderer/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,wBAAwB,EACxB,wBAAwB,GACzB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,+BAA+B,EAC/B,sCAAsC,EACtC,oBAAoB,EACpB,2BAA2B,GAC5B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAChF,OAAO,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxH,YAAY,EAAE,0BAA0B,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AACvH,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,YAAY,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { PanelConfig, SectionConfig } from '../../../types';
|
|
2
|
+
export declare const makePanelsEditable: (panels: PanelConfig[], editable: boolean, sectionEditable: boolean) => PanelConfig[];
|
|
3
|
+
export declare const buildEditableSection: (section: SectionConfig, widgetsEditable: boolean) => SectionConfig;
|
|
4
|
+
//# sourceMappingURL=makePanelsEditable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"makePanelsEditable.d.ts","sourceRoot":"","sources":["../../../../src/components/SectionRenderer/utils/makePanelsEditable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE5D,eAAO,MAAM,kBAAkB,GAC7B,QAAQ,WAAW,EAAE,EACrB,UAAU,OAAO,EACjB,iBAAiB,OAAO,KACvB,WAAW,EAcT,CAAC;AAEN,eAAO,MAAM,oBAAoB,GAC/B,SAAS,aAAa,EACtB,iBAAiB,OAAO,KACvB,aAOD,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { PanelConfig } from '../../../types';
|
|
2
|
+
export declare const countVerticalPanels: (panels: PanelConfig[]) => number;
|
|
3
|
+
export declare const hasTableWidget: (panels: PanelConfig[], includeDialogTable?: boolean) => boolean;
|
|
4
|
+
export declare const getTableWidgetColumnSpan: (panels: PanelConfig[]) => number | null;
|
|
5
|
+
export declare const resolveSectionColumnSpan: (panels: PanelConfig[], gridColumnSpan?: number) => {
|
|
6
|
+
columnSpan: number;
|
|
7
|
+
hasTable: boolean;
|
|
8
|
+
hasExplicitTableSpan: boolean;
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=panelLayout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"panelLayout.d.ts","sourceRoot":"","sources":["../../../../src/components/SectionRenderer/utils/panelLayout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,eAAO,MAAM,mBAAmB,GAAI,QAAQ,WAAW,EAAE,KAAG,MAgB3D,CAAC;AAEF,eAAO,MAAM,cAAc,GACzB,QAAQ,WAAW,EAAE,EACrB,4BAA0B,KACzB,OAkBF,CAAC;AAEF,eAAO,MAAM,wBAAwB,GAAI,QAAQ,WAAW,EAAE,KAAG,MAAM,GAAG,IAiBzE,CAAC;AAEF,eAAO,MAAM,wBAAwB,GACnC,QAAQ,WAAW,EAAE,EACrB,iBAAiB,MAAM,KACtB;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAC;IAAC,oBAAoB,EAAE,OAAO,CAAA;CAiBxE,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const READONLY_VALUE_ROW_ROOT_CLASSES: readonly ["TextDisplayWidget", "TextAreaDisplayWidget", "SelectDisplayWidget", "PhoneDisplayWidget", "NumberDisplayWidget", "CurrencyDisplayWidget", "RadioDisplayWidget", "DateDisplayWidget", "DateTimeDisplayWidget", "CheckboxDisplayWidget", "BooleanDisplayWidget", "FileDisplayWidget", "DisplayFieldWidget"];
|
|
2
|
+
export declare const READONLY_SINGLE_LINE_VALUE_ROW_CLASSES: readonly ["TextDisplayWidget", "SelectDisplayWidget", "PhoneDisplayWidget", "NumberDisplayWidget", "CurrencyDisplayWidget", "RadioDisplayWidget", "DateDisplayWidget", "DateTimeDisplayWidget", "CheckboxDisplayWidget", "BooleanDisplayWidget", "DisplayFieldWidget"];
|
|
3
|
+
export declare const scopedClassSelectors: (sectionClassId: string, classNames: readonly string[]) => string;
|
|
4
|
+
export declare const buildReadonlyStyleSelectors: (sectionClassId: string) => {
|
|
5
|
+
readonlyValueRowRootsCss: string;
|
|
6
|
+
readonlyValueRowFlex1Css: string;
|
|
7
|
+
readonlySingleLineValueTextCss: string;
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=readonlyStyles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readonlyStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/SectionRenderer/utils/readonlyStyles.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,+BAA+B,sTAclC,CAAC;AAEX,eAAO,MAAM,sCAAsC,wQAYzC,CAAC;AAEX,eAAO,MAAM,oBAAoB,GAC/B,gBAAgB,MAAM,EACtB,YAAY,SAAS,MAAM,EAAE,KAC5B,MAA+E,CAAC;AAEnF,eAAO,MAAM,2BAA2B,GAAI,gBAAgB,MAAM;;;;CAWhE,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Dispatch } from '@reduxjs/toolkit';
|
|
2
|
+
import { SectionConfig } from '../../../types';
|
|
3
|
+
import { SectionEditSnapshot } from '../../../utils/sectionRevert';
|
|
4
|
+
export declare const revertSectionValues: ({ section, store, dispatch, schemaData, contextSchemaData, hasSupportingDocuments, sectionId, editEntrySnapshot, }: {
|
|
5
|
+
section: SectionConfig;
|
|
6
|
+
store: {
|
|
7
|
+
getState: () => unknown;
|
|
8
|
+
};
|
|
9
|
+
dispatch: Dispatch;
|
|
10
|
+
schemaData?: Record<string, unknown>;
|
|
11
|
+
contextSchemaData?: Record<string, unknown>;
|
|
12
|
+
hasSupportingDocuments: boolean;
|
|
13
|
+
sectionId: string;
|
|
14
|
+
editEntrySnapshot: SectionEditSnapshot | null;
|
|
15
|
+
}) => void;
|
|
16
|
+
//# sourceMappingURL=revertSectionValues.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"revertSectionValues.d.ts","sourceRoot":"","sources":["../../../../src/components/SectionRenderer/utils/revertSectionValues.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAG/C,OAAO,EAA4B,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAI7F,eAAO,MAAM,mBAAmB,GAAI,oHASjC;IACD,OAAO,EAAE,aAAa,CAAC;IACvB,KAAK,EAAE;QAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;KAAE,CAAC;IACnC,QAAQ,EAAE,QAAQ,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC5C,sBAAsB,EAAE,OAAO,CAAC;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB,EAAE,mBAAmB,GAAG,IAAI,CAAC;CAC/C,SA4DA,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { BaseWidgetConfig, SectionConfig } from '../../../types';
|
|
2
|
+
import { collectWidgets } from '../../../utils/sectionValidate';
|
|
3
|
+
import { SectionChanges } from '../types';
|
|
4
|
+
export type SectionRecordsEditAction = 'always' | 'when-register-id';
|
|
5
|
+
export type SectionRecordsWhenEmpty = 'empty-array' | 'single-record' | 'raw-snapshot';
|
|
6
|
+
export interface BuildSectionRecordsOptions {
|
|
7
|
+
sectionRegisterId?: string;
|
|
8
|
+
editAction?: SectionRecordsEditAction;
|
|
9
|
+
whenEmpty?: SectionRecordsWhenEmpty;
|
|
10
|
+
}
|
|
11
|
+
export declare const buildSectionRecords: (widgets: BaseWidgetConfig[], sourceData: Record<string, unknown>, { sectionRegisterId, editAction, whenEmpty, }?: BuildSectionRecordsOptions) => unknown[];
|
|
12
|
+
export declare const collectSectionSupportingFiles: (section: SectionConfig, sourceData: Record<string, unknown>) => unknown[];
|
|
13
|
+
/** Save flow: records for change detection and onSectionSave payloads. */
|
|
14
|
+
export declare const trackSectionChanges: (widgets: ReturnType<typeof collectWidgets>, sourceData: Record<string, unknown>, sectionRegisterId?: string) => unknown[];
|
|
15
|
+
/** Dirty-state baseline: records + supporting-document files. */
|
|
16
|
+
export declare const buildSectionSnapshot: (section: SectionConfig, sourceData: Record<string, unknown>, hasSupportingDocuments: boolean, sectionRegisterId?: string) => {
|
|
17
|
+
records: unknown[];
|
|
18
|
+
files: unknown[];
|
|
19
|
+
};
|
|
20
|
+
/** Form submit / draft: full SectionChanges payload for one section. */
|
|
21
|
+
export declare function buildSectionChanges(section: SectionConfig, storeValues: Record<string, unknown>, options?: {
|
|
22
|
+
dbSectionId?: string;
|
|
23
|
+
sectionRegisterId?: string;
|
|
24
|
+
}): SectionChanges;
|
|
25
|
+
//# sourceMappingURL=sectionSnapshot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sectionSnapshot.d.ts","sourceRoot":"","sources":["../../../../src/components/SectionRenderer/utils/sectionSnapshot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEjE,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAKhE,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C,MAAM,MAAM,wBAAwB,GAAG,QAAQ,GAAG,kBAAkB,CAAC;AACrE,MAAM,MAAM,uBAAuB,GAAG,aAAa,GAAG,eAAe,GAAG,cAAc,CAAC;AAEvF,MAAM,WAAW,0BAA0B;IACzC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,UAAU,CAAC,EAAE,wBAAwB,CAAC;IACtC,SAAS,CAAC,EAAE,uBAAuB,CAAC;CACrC;AAuCD,eAAO,MAAM,mBAAmB,GAC9B,SAAS,gBAAgB,EAAE,EAC3B,YAAY,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACnC,gDAIG,0BAA+B,KACjC,OAAO,EA4CT,CAAC;AAEF,eAAO,MAAM,6BAA6B,GACxC,SAAS,aAAa,EACtB,YAAY,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAClC,OAAO,EAUT,CAAC;AAEF,0EAA0E;AAC1E,eAAO,MAAM,mBAAmB,GAC9B,SAAS,UAAU,CAAC,OAAO,cAAc,CAAC,EAC1C,YAAY,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACnC,oBAAoB,MAAM,KACzB,OAAO,EAKN,CAAC;AAEL,iEAAiE;AACjE,eAAO,MAAM,oBAAoB,GAC/B,SAAS,aAAa,EACtB,YAAY,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACnC,wBAAwB,OAAO,EAC/B,oBAAoB,MAAM,KACzB;IAAE,OAAO,EAAE,OAAO,EAAE,CAAC;IAAC,KAAK,EAAE,OAAO,EAAE,CAAA;CAmBxC,CAAC;AAEF,wEAAwE;AACxE,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,aAAa,EACtB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACpC,OAAO,CAAC,EAAE;IAAE,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,iBAAiB,CAAC,EAAE,MAAM,CAAA;CAAE,GAC7D,cAAc,CAkBhB"}
|
|
@@ -2,18 +2,10 @@ import { SectionConfig, DataSourceRequestHandler } from '../types';
|
|
|
2
2
|
import { UseBaseWidgetOptions } from '../hooks/useBaseWidget';
|
|
3
3
|
import { SectionChanges } from './SectionRenderer';
|
|
4
4
|
export type SectionMode = 'RegistryView' | 'CRView' | 'IntakeForm';
|
|
5
|
-
/** Form controls passed to host via onFormReady. Allows host to validate and get all section data (e.g. on Submit). */
|
|
6
5
|
export interface SectionsFormHandle {
|
|
7
|
-
/** Validate all sections. Returns true if valid, false otherwise. */
|
|
8
6
|
validate(): Promise<boolean>;
|
|
9
|
-
/** Get raw form data from store for all sections (no validation). */
|
|
10
7
|
getFormData(): Record<string, unknown>;
|
|
11
|
-
/** Validate all sections. If valid, returns SectionChanges[]; if invalid, throws. */
|
|
12
8
|
validateAndGetData(): Promise<SectionChanges[]>;
|
|
13
|
-
/**
|
|
14
|
-
* Used for form save-draft functionality.
|
|
15
|
-
* Retrieves record and file changes without validation.
|
|
16
|
-
*/
|
|
17
9
|
getStructuredData(): SectionChanges[];
|
|
18
10
|
}
|
|
19
11
|
export interface SectionsContainerProps {
|
|
@@ -25,23 +17,9 @@ export interface SectionsContainerProps {
|
|
|
25
17
|
onSectionSave?: (changes: SectionChanges) => Promise<void> | void;
|
|
26
18
|
hideEditButton?: boolean;
|
|
27
19
|
mode?: SectionMode;
|
|
28
|
-
/** IntakeForm mode: when true or undefined, sections are editable; when false, sections are readonly */
|
|
29
20
|
isDraft?: boolean;
|
|
30
|
-
namespace?: string | ((sectionId: string, index: number) => string);
|
|
31
|
-
/** Called when a section's dirty (has unsaved changes) status changes. Only fires while the section is in edit mode. */
|
|
32
21
|
onSectionDirtyChange?: (sectionId: string, isDirty: boolean) => void;
|
|
33
|
-
/** Called when the form is ready. Passes form controls (validate, getFormData, validateAndGetData) so the host can trigger submit from its own button. */
|
|
34
22
|
onFormReady?: (handle: SectionsFormHandle) => void;
|
|
35
23
|
}
|
|
36
|
-
|
|
37
|
-
* Container component that renders multiple sections
|
|
38
|
-
*
|
|
39
|
-
* Layout behavior:
|
|
40
|
-
* - Uses CSS Grid for proper alignment
|
|
41
|
-
* - Each grid column = 200px (one vertical panel width)
|
|
42
|
-
* - Sections span columns based on their total vertical panel count
|
|
43
|
-
* - All sections align to the same grid, ensuring right-side alignment
|
|
44
|
-
* - Handles nested structure: multiple horizontal panels, each with multiple vertical panels
|
|
45
|
-
*/
|
|
46
|
-
export declare const SectionsContainer: ({ sections, dataSourceRequestHandler: propDataSourceRequestHandler, schemaData, onValueChange, className, onSectionSave, hideEditButton, mode, isDraft, namespace, onSectionDirtyChange, onFormReady, }: SectionsContainerProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export declare const SectionsContainer: ({ sections, dataSourceRequestHandler: propDataSourceRequestHandler, schemaData, onValueChange, className, onSectionSave, hideEditButton, mode, isDraft, onSectionDirtyChange, onFormReady, }: SectionsContainerProps) => import("react/jsx-runtime").JSX.Element;
|
|
47
25
|
//# sourceMappingURL=SectionsContainer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SectionsContainer.d.ts","sourceRoot":"","sources":["../../src/components/SectionsContainer.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAmB,cAAc,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"SectionsContainer.d.ts","sourceRoot":"","sources":["../../src/components/SectionsContainer.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAmB,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAKpE,MAAM,MAAM,WAAW,GAAG,cAAc,GAAG,QAAQ,GAAG,YAAY,CAAC;AAEnE,MAAM,WAAW,kBAAkB;IACjC,QAAQ,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IAC7B,WAAW,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACvC,kBAAkB,IAAI,OAAO,CAAC,cAAc,EAAE,CAAC,CAAC;IAChD,iBAAiB,IAAI,cAAc,EAAE,CAAC;CACvC;AAED,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,aAAa,EAAE,CAAC;IAC1B,wBAAwB,CAAC,EAAE,wBAAwB,CAAC;IACpD,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,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,oBAAoB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACrE,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,IAAI,CAAC;CACpD;AAOD,eAAO,MAAM,iBAAiB,GAAI,8LAY/B,sBAAsB,4CA4QxB,CAAC"}
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
export interface WidgetFieldLabelProps {
|
|
2
|
-
label
|
|
2
|
+
label?: string | null;
|
|
3
3
|
required?: boolean;
|
|
4
4
|
className?: string;
|
|
5
|
-
title?: string;
|
|
5
|
+
title?: string | null;
|
|
6
6
|
}
|
|
7
|
-
/**
|
|
8
|
-
* Field label: long text truncates with ellipsis; required asterisk always stays visible.
|
|
9
|
-
*/
|
|
10
7
|
export declare const WidgetFieldLabel: ({ label, required, className, title, }: WidgetFieldLabelProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
8
|
//# sourceMappingURL=WidgetFieldLabel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WidgetFieldLabel.d.ts","sourceRoot":"","sources":["../../src/components/WidgetFieldLabel.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WidgetFieldLabel.d.ts","sourceRoot":"","sources":["../../src/components/WidgetFieldLabel.tsx"],"names":[],"mappings":"AAGA,MAAM,WAAW,qBAAqB;IACpC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AAED,eAAO,MAAM,gBAAgB,GAAI,wCAK9B,qBAAqB,4CAevB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
2
|
import { DataSourceRequestHandler } from '../types';
|
|
3
3
|
import { WidgetStore } from '../store';
|
|
4
4
|
import { WidgetTheme } from '../theme';
|
|
@@ -6,15 +6,14 @@ export interface WidgetProviderProps {
|
|
|
6
6
|
store?: WidgetStore;
|
|
7
7
|
dataSourceRequestHandler?: DataSourceRequestHandler;
|
|
8
8
|
schemaData?: Record<string, any>;
|
|
9
|
-
|
|
10
|
-
/** Optional theme object to override default colors and styles across all widgets. */
|
|
9
|
+
t?: (key: string, options?: any) => string;
|
|
11
10
|
theme?: WidgetTheme;
|
|
12
11
|
children: ReactNode;
|
|
13
12
|
}
|
|
14
13
|
export declare const useWidgetContext: () => {
|
|
15
14
|
dataSourceRequestHandler?: DataSourceRequestHandler;
|
|
16
15
|
schemaData?: Record<string, any>;
|
|
17
|
-
|
|
16
|
+
t?: (key: string, options?: any) => string;
|
|
18
17
|
};
|
|
19
|
-
export declare const WidgetProvider: ({ store, dataSourceRequestHandler, schemaData,
|
|
18
|
+
export declare const WidgetProvider: ({ store, dataSourceRequestHandler, schemaData, t, theme, children, }: WidgetProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
19
|
//# sourceMappingURL=WidgetProvider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WidgetProvider.d.ts","sourceRoot":"","sources":["../../src/components/WidgetProvider.tsx"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"WidgetProvider.d.ts","sourceRoot":"","sources":["../../src/components/WidgetProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA6B,KAAK,SAAS,EAAsB,MAAM,OAAO,CAAC;AAEtF,OAAO,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,EAAqB,WAAW,EAAE,MAAM,UAAU,CAAC;AAI1D,OAAO,EAAE,WAAW,EAAqC,MAAM,UAAU,CAAC;AAG1E,MAAM,WAAW,mBAAmB;IAClC,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,wBAAwB,CAAC,EAAE,wBAAwB,CAAC;IACpD,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACjC,CAAC,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,KAAK,MAAM,CAAC;IAC3C,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAYD,eAAO,MAAM,gBAAgB;+BATA,wBAAwB;iBACtC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;QAC5B,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,KAAK,MAAM;CAS3C,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,sEAO5B,mBAAmB,4CAmDrB,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { ComponentType } from 'react';
|
|
2
2
|
import { BaseWidgetConfig } from '../types';
|
|
3
3
|
import { UseBaseWidgetOptions } from '../hooks/useBaseWidget';
|
|
4
4
|
export interface WidgetRendererProps extends Omit<UseBaseWidgetOptions, 'config'> {
|
|
5
5
|
config: BaseWidgetConfig;
|
|
6
|
-
defaultComponent?:
|
|
6
|
+
defaultComponent?: ComponentType<any>;
|
|
7
7
|
}
|
|
8
8
|
export declare const WidgetRenderer: ({ config, dataSourceRequestHandler: propDataSourceRequestHandler, schemaData: propSchemaData, onValueChange, defaultComponent, }: WidgetRendererProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
9
9
|
//# sourceMappingURL=WidgetRenderer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WidgetRenderer.d.ts","sourceRoot":"","sources":["../../src/components/WidgetRenderer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"WidgetRenderer.d.ts","sourceRoot":"","sources":["../../src/components/WidgetRenderer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAiB,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAM7E,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAAC,oBAAoB,EAAE,QAAQ,CAAC;IAC/E,MAAM,EAAE,gBAAgB,CAAC;IACzB,gBAAgB,CAAC,EAAE,aAAa,CAAC,GAAG,CAAC,CAAC;CACvC;AAED,eAAO,MAAM,cAAc,GAAI,kIAM5B,mBAAmB,mDA0CrB,CAAC"}
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Widget Event Bus
|
|
3
|
-
* Provides a publish/subscribe mechanism for widget communication
|
|
4
|
-
* Supports debounce and throttle for performance optimization
|
|
5
|
-
*/
|
|
6
1
|
export type WidgetEventType = 'widget:change' | 'widget:blur' | 'widget:focus' | 'widget:reload' | 'widget:clear';
|
|
7
2
|
export interface WidgetEvent {
|
|
8
3
|
type: WidgetEventType;
|
|
@@ -14,29 +9,12 @@ type EventHandler = (event: WidgetEvent) => void | Promise<void>;
|
|
|
14
9
|
export declare class WidgetEventBus {
|
|
15
10
|
private subscriptions;
|
|
16
11
|
private throttleTimers;
|
|
17
|
-
/**
|
|
18
|
-
* Subscribe to an event type
|
|
19
|
-
* @param eventType The type of event to listen to
|
|
20
|
-
* @param handler The handler function
|
|
21
|
-
* @param options Debounce/throttle options
|
|
22
|
-
* @returns Unsubscribe function
|
|
23
|
-
*/
|
|
24
12
|
subscribe(eventType: WidgetEventType, handler: EventHandler, options?: {
|
|
25
13
|
debounce?: number;
|
|
26
14
|
throttle?: number;
|
|
27
15
|
}): () => void;
|
|
28
|
-
/**
|
|
29
|
-
* Publish an event
|
|
30
|
-
* @param event The event to publish
|
|
31
|
-
*/
|
|
32
16
|
publish(event: WidgetEvent): void;
|
|
33
|
-
/**
|
|
34
|
-
* Execute handler with debounce/throttle support
|
|
35
|
-
*/
|
|
36
17
|
private executeHandler;
|
|
37
|
-
/**
|
|
38
|
-
* Clear all subscriptions
|
|
39
|
-
*/
|
|
40
18
|
clear(): void;
|
|
41
19
|
}
|
|
42
20
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WidgetEventBus.d.ts","sourceRoot":"","sources":["../../src/events/WidgetEventBus.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"WidgetEventBus.d.ts","sourceRoot":"","sources":["../../src/events/WidgetEventBus.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GACvB,eAAe,GACf,aAAa,GACb,cAAc,GACd,eAAe,GACf,cAAc,CAAC;AAEnB,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,eAAe,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,KAAK,YAAY,GAAG,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AAUjE,qBAAa,cAAc;IACzB,OAAO,CAAC,aAAa,CAAgE;IACrF,OAAO,CAAC,cAAc,CAAyD;IAE/E,SAAS,CACP,SAAS,EAAE,eAAe,EAC1B,OAAO,EAAE,YAAY,EACrB,OAAO,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,GACjD,MAAM,IAAI;IAgCb,OAAO,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI;IAajC,OAAO,CAAC,cAAc;IA0CtB,KAAK,IAAI,IAAI;CAed"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useBaseWidget.d.ts","sourceRoot":"","sources":["../../src/hooks/useBaseWidget.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"useBaseWidget.d.ts","sourceRoot":"","sources":["../../src/hooks/useBaseWidget.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAiBtE,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,gBAAgB,CAAC;IACzB,wBAAwB,CAAC,EAAE,wBAAwB,CAAC;IACpD,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACjC,aAAa,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;CACxD;AAKD,eAAO,MAAM,aAAa,GAAI,SAAS,oBAAoB;;;;;;;;;;yBAqJ5C,GAAG,aAAY,OAAO;;uBA4Rd,MAAM,EAAE;;;;;;;0BA1LpB,MAAM;;;CA+LhB,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { BaseWidgetConfig } from '../types';
|
|
2
|
+
import { GeoLevel, GeoSelectOption, formatLevelLabel } from '../utils/geoHierarchy';
|
|
3
|
+
interface UseGeoHierarchyOptions {
|
|
4
|
+
config: BaseWidgetConfig;
|
|
5
|
+
}
|
|
6
|
+
export declare function useGeoHierarchy({ config }: UseGeoHierarchyOptions): {
|
|
7
|
+
levels: GeoLevel[];
|
|
8
|
+
selectedValues: Record<string, string>;
|
|
9
|
+
options: Record<string, GeoSelectOption[]>;
|
|
10
|
+
resolvedLabels: Record<string, string>;
|
|
11
|
+
columnCounts: number[];
|
|
12
|
+
columnSpan: number;
|
|
13
|
+
visibleColumns: {
|
|
14
|
+
index: number;
|
|
15
|
+
levels: GeoLevel[];
|
|
16
|
+
}[];
|
|
17
|
+
loadingLevels: boolean;
|
|
18
|
+
loadingLevelId: string | null;
|
|
19
|
+
geoError: string | null;
|
|
20
|
+
readonlyPath: string;
|
|
21
|
+
handleLevelChange: (levelIndex: number, nextValue: string | undefined) => Promise<void>;
|
|
22
|
+
isLevelEnabled: (levelIndex: number) => boolean;
|
|
23
|
+
formatLevelLabel: typeof formatLevelLabel;
|
|
24
|
+
widgetId: string;
|
|
25
|
+
value: any;
|
|
26
|
+
formattedValue: any;
|
|
27
|
+
error: string[];
|
|
28
|
+
touched: boolean;
|
|
29
|
+
loading: boolean;
|
|
30
|
+
isVisible: boolean;
|
|
31
|
+
isEnabled: boolean;
|
|
32
|
+
isRequired: boolean;
|
|
33
|
+
onChange: (newValue: any, validate?: boolean) => void;
|
|
34
|
+
onBlur: () => void;
|
|
35
|
+
setError: (errors: string[]) => {
|
|
36
|
+
payload: {
|
|
37
|
+
widgetId: string;
|
|
38
|
+
errors: string[];
|
|
39
|
+
};
|
|
40
|
+
type: "widget/setError";
|
|
41
|
+
};
|
|
42
|
+
getFieldValue: (path: string) => any;
|
|
43
|
+
dataSourceOptions: any[];
|
|
44
|
+
config: BaseWidgetConfig;
|
|
45
|
+
};
|
|
46
|
+
export {};
|
|
47
|
+
//# sourceMappingURL=useGeoHierarchy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useGeoHierarchy.d.ts","sourceRoot":"","sources":["../../src/hooks/useGeoHierarchy.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAA4B,MAAM,UAAU,CAAC;AAKtE,OAAO,EACL,QAAQ,EAER,eAAe,EAQf,gBAAgB,EASjB,MAAM,uBAAuB,CAAC;AAE/B,UAAU,sBAAsB;IAC9B,MAAM,EAAE,gBAAgB,CAAC;CAC1B;AA+BD,wBAAgB,eAAe,CAAC,EAAE,MAAM,EAAE,EAAE,sBAAsB;;;;;;;;;;;;;;;oCA0V3C,MAAM,aAAa,MAAM,GAAG,SAAS;iCAuF3B,MAAM;;;;;;;;;;;;;;;;;;;;;;;EAGtC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useWidgetCascade.d.ts","sourceRoot":"","sources":["../../src/hooks/useWidgetCascade.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,
|
|
1
|
+
{"version":3,"file":"useWidgetCascade.d.ts","sourceRoot":"","sources":["../../src/hooks/useWidgetCascade.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAKtE,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,gBAAgB,CAAC;IACzB,wBAAwB,CAAC,EAAE,wBAAwB,CAAC;IACpD,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC7B;AAED;;;GAGG;AACH,eAAO,MAAM,gBAAgB,GAAI,SAAS,uBAAuB,SAiEhE,CAAC"}
|
|
@@ -2,8 +2,5 @@ import React from 'react';
|
|
|
2
2
|
import { WidgetEventBus } from '../events/WidgetEventBus';
|
|
3
3
|
declare const WidgetEventBusContext: React.Context<WidgetEventBus | null>;
|
|
4
4
|
export { WidgetEventBusContext };
|
|
5
|
-
/**
|
|
6
|
-
* Hook to access the widget event bus from context
|
|
7
|
-
*/
|
|
8
5
|
export declare const useWidgetEventBus: () => WidgetEventBus | null;
|
|
9
6
|
//# sourceMappingURL=useWidgetEventBus.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useWidgetEventBus.d.ts","sourceRoot":"","sources":["../../src/hooks/useWidgetEventBus.ts"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE1D,QAAA,MAAM,qBAAqB,sCAAmD,CAAC;
|
|
1
|
+
{"version":3,"file":"useWidgetEventBus.d.ts","sourceRoot":"","sources":["../../src/hooks/useWidgetEventBus.ts"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE1D,QAAA,MAAM,qBAAqB,sCAAmD,CAAC;AAE/E,OAAO,EAAE,qBAAqB,EAAE,CAAC;AAEjC,eAAO,MAAM,iBAAiB,QAAO,cAAc,GAAG,IAErD,CAAC"}
|
|
@@ -7,13 +7,5 @@ export declare const ThemeContext: import("react").Context<Required<{
|
|
|
7
7
|
button: Required<import("../theme").WidgetThemeButton>;
|
|
8
8
|
widget: Required<import("../theme").WidgetThemeWidget>;
|
|
9
9
|
}>>;
|
|
10
|
-
/**
|
|
11
|
-
* Access the resolved widget theme from any component inside `<WidgetProvider>`.
|
|
12
|
-
*
|
|
13
|
-
* ```tsx
|
|
14
|
-
* const theme = useWidgetTheme();
|
|
15
|
-
* // theme.colors.primary, theme.section.dividerColor, etc.
|
|
16
|
-
* ```
|
|
17
|
-
*/
|
|
18
10
|
export declare function useWidgetTheme(): ResolvedTheme;
|
|
19
11
|
//# sourceMappingURL=useWidgetTheme.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useWidgetTheme.d.ts","sourceRoot":"","sources":["../../src/hooks/useWidgetTheme.ts"],"names":[],"mappings":"AACA,OAAO,EAAgB,YAAY,EAAE,MAAM,UAAU,CAAC;AAEtD,MAAM,MAAM,aAAa,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC;AAE5D,eAAO,MAAM,YAAY;;;;;;GAA6C,CAAC;AAEvE
|
|
1
|
+
{"version":3,"file":"useWidgetTheme.d.ts","sourceRoot":"","sources":["../../src/hooks/useWidgetTheme.ts"],"names":[],"mappings":"AACA,OAAO,EAAgB,YAAY,EAAE,MAAM,UAAU,CAAC;AAEtD,MAAM,MAAM,aAAa,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC;AAE5D,eAAO,MAAM,YAAY;;;;;;GAA6C,CAAC;AAEvE,wBAAgB,cAAc,IAAI,aAAa,CAE9C"}
|