@openg2p/registry-widgets 1.1.2-dev.8 → 1.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/SectionRenderer.d.ts.map +1 -1
- package/dist/hooks/useBaseWidget.d.ts.map +1 -1
- package/dist/hooks/useGeoWidgetCascade.d.ts.map +1 -1
- package/dist/index.d.ts +35 -15
- package/dist/index.esm.js +313 -172
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +319 -170
- package/dist/index.js.map +1 -1
- package/dist/utils/geoHierarchy.d.ts +33 -0
- package/dist/utils/geoHierarchy.d.ts.map +1 -1
- package/dist/widgets/DialogTableWidget.d.ts +0 -13
- package/dist/widgets/DialogTableWidget.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -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;AAQ9D,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,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;AAQ9D,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAuDlD,MAAM,WAAW,cAAc;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,OAAO,EAAE,OAAO,EAAE,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC;IAClB,KAAK,CAAC,EAAE,IAAI,GAAG,IAAI,CA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;;OAIG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB,0HAA0H;IAC1H,gBAAgB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACjE,iGAAiG;IACjG,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAGD;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,GAAI,saAyB7B,oBAAoB,4CAqlDtB,CAAC"}
|
|
@@ -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;AAwBtE,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;AAMD,eAAO,MAAM,aAAa,GAAI,SAAS,oBAAoB;;;;;;;;;;;yBAyO5C,GAAG,aAAY,OAAO;;
|
|
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;AAwBtE,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;AAMD,eAAO,MAAM,aAAa,GAAI,SAAS,oBAAoB;;;;;;;;;;;yBAyO5C,GAAG,aAAY,OAAO;;uBAwWd,MAAM,EAAE;;;;;;;0BAhPpB,MAAM;;;CAqPhB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useGeoWidgetCascade.d.ts","sourceRoot":"","sources":["../../src/hooks/useGeoWidgetCascade.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"useGeoWidgetCascade.d.ts","sourceRoot":"","sources":["../../src/hooks/useGeoWidgetCascade.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAmBtE,MAAM,WAAW,0BAA0B;IACzC,MAAM,EAAE,gBAAgB,CAAC;IACzB,wBAAwB,CAAC,EAAE,wBAAwB,CAAC;IACpD,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC7B;AAGD;;;GAGG;AACH,eAAO,MAAM,mBAAmB,GAAI,SAAS,0BAA0B,SAwMtE,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1400,19 +1400,6 @@ interface DialogTableWidgetProps {
|
|
|
1400
1400
|
* Dialog table widget:
|
|
1401
1401
|
* - Table displays a subset of columns (n out of x)
|
|
1402
1402
|
* - Add/Edit happens in a modal dialog that shows ALL columns as a form
|
|
1403
|
-
*
|
|
1404
|
-
* Usage in schema:
|
|
1405
|
-
* {
|
|
1406
|
-
* "widget": "dialog-table",
|
|
1407
|
-
* "widget-type": "table",
|
|
1408
|
-
* "widget-label": "Household Members",
|
|
1409
|
-
* "widget-id": "householdMembers",
|
|
1410
|
-
* "widget-data-path": "household.members",
|
|
1411
|
-
* "widget-data-columns": [ ...all columns... ],
|
|
1412
|
-
* "widget-data-visible-columns": ["firstName", "lastName", "dob"], // optional override; default = by column flag
|
|
1413
|
-
* // Per-column control (recommended): set "column-visible-in-table": false to hide it in the table
|
|
1414
|
-
* "widget-data-operations": { "add": true, "edit": true, "remove": true }
|
|
1415
|
-
* }
|
|
1416
1403
|
*/
|
|
1417
1404
|
declare const DialogTableWidget: ({ config }: DialogTableWidgetProps) => react_jsx_runtime.JSX.Element;
|
|
1418
1405
|
|
|
@@ -1771,8 +1758,41 @@ declare class GeoHierarchyBuilder {
|
|
|
1771
1758
|
declare const geoHierarchyBuilder: GeoHierarchyBuilder;
|
|
1772
1759
|
/** Sentinel written to Redux when a geo level is cleared by cascade (distinct from "never set"). */
|
|
1773
1760
|
declare const GEO_LEVEL_CLEARED: null;
|
|
1761
|
+
interface GeoWidgetRegistration {
|
|
1762
|
+
widgetId: string;
|
|
1763
|
+
parentWidgetId: string | null;
|
|
1764
|
+
level: string;
|
|
1765
|
+
geoConfig: GeoLevelConfig;
|
|
1766
|
+
dataPath: string;
|
|
1767
|
+
groupId: string;
|
|
1768
|
+
}
|
|
1774
1769
|
declare function registerGeoWidgetParent(widgetId: string, parentWidgetId: string | null): void;
|
|
1775
1770
|
declare function unregisterGeoWidgetParent(widgetId: string): void;
|
|
1771
|
+
declare function registerGeoWidget(widgetId: string, geoConfig: GeoLevelConfig & {
|
|
1772
|
+
parentWidgetId?: string | null;
|
|
1773
|
+
}, dataPath: string): void;
|
|
1774
|
+
declare function unregisterGeoWidget(widgetId: string): void;
|
|
1775
|
+
declare function orderGeoWidgetRegistrations(registrations: GeoWidgetRegistration[]): GeoWidgetRegistration[];
|
|
1776
|
+
/** Resolve display mnemonic from cached dropdown options, then stored hierarchy. */
|
|
1777
|
+
declare function createGeoLevelMnemonicResolver(values: Record<string, any>, dataSources: Record<string, Array<{
|
|
1778
|
+
value: any;
|
|
1779
|
+
label: string;
|
|
1780
|
+
}>>): (registration: GeoWidgetRegistration, valueId: string) => string | undefined;
|
|
1781
|
+
/** Rebuild group hierarchy from widget values in parent→child order; stop at first missing level. */
|
|
1782
|
+
declare function rebuildGeoHierarchyFromRegistrations(groupId: string, values: Record<string, any>, registrations: GeoWidgetRegistration[], resolveMnemonic?: (registration: GeoWidgetRegistration, valueId: string) => string | undefined): boolean;
|
|
1783
|
+
declare function collectGeoWidgetRegistrationsFromWidgets(widgets: Array<{
|
|
1784
|
+
'widget-id': string;
|
|
1785
|
+
'widget-data-path'?: string | Record<string, string>;
|
|
1786
|
+
'widget-geo-config'?: GeoLevelConfig & {
|
|
1787
|
+
parentWidgetId?: string | null;
|
|
1788
|
+
};
|
|
1789
|
+
}>, namespace?: string): GeoWidgetRegistration[];
|
|
1790
|
+
/** Reconcile all geo groups in section values before save. */
|
|
1791
|
+
declare function reconcileGeoHierarchiesInValues(values: Record<string, any>, registrations: GeoWidgetRegistration[], dataSources?: Record<string, Array<{
|
|
1792
|
+
value: any;
|
|
1793
|
+
label: string;
|
|
1794
|
+
}>>): Record<string, any>;
|
|
1795
|
+
declare function getGeoWidgetRegistrationsInGroup(groupId: string): GeoWidgetRegistration[];
|
|
1776
1796
|
/** True when changedWidgetId is any upstream geo parent of widgetId (not only immediate parent). */
|
|
1777
1797
|
declare function isUpstreamGeoAncestor(changedWidgetId: string, widgetId: string, immediateParentWidgetId: string | null): boolean;
|
|
1778
1798
|
/** Group id for geo widgets sharing the same register prefix (e.g. `{registerId}`). */
|
|
@@ -1857,5 +1877,5 @@ declare const translatePanelConfig: (panel: PanelConfig, translate: (key: string
|
|
|
1857
1877
|
*/
|
|
1858
1878
|
declare const translateUISchema: (schema: UISchema, translate: (key: string, options?: any) => string) => UISchema;
|
|
1859
1879
|
|
|
1860
|
-
export { ArrayWidget, BooleanWidget, CheckboxWidget, CurrencyInputWidget, DateInputWidget, DateTimeInputWidget, DialogTableWidget, DisplayWidget, FileInputWidget, GEO_LEVEL_CLEARED, HeaderSectionWidget, IdAuthenticationWidget, IterableAccordionWidget, JSONEditorPanel, MultiSelectWidget, NumberInputWidget, PanelRenderer, PhoneInputWidget, ProfileWidget, PropertyEditor, RadioWidget, RegisterLookupWidget, ScoresDisplayWidget, SectionBuilder, SectionRenderer, SectionTree, SectionsContainer, SelectWidget, SimpleTableWidget, TableWidget, TextAreaWidget, TextInputWidget, VisualBuilderPanel, WidgetEventBus, WidgetProvider, WidgetRenderer, applyCaseControl, applyDecimalPrecision, applyMask, applySharedGeoHierarchyToValues, createWidgetStore, createZodSchema, defaultTheme, evaluateCondition, evaluateWidgetConditions, filterByCharacterType, formatCurrency, formatDate, formatNumber, formatPhone, formatValue, geoHierarchyBuilder, getApiDataSource, getCachedApiDataSource, getFormattedNumberLength, getGeoDescendantWidgetIds, getGeoGroupId, getSchemaDataSource, getStaticDataSource, getValueByPath, getWidgetValue, hasVisibilityRules, initI18n, isAllowedKey, isUpstreamGeoAncestor, normalizeNumericDefault, normalizeOptionRules, parseDataPath, parseNumber, registerDefaultWidgets, registerGeoWidgetParent, removeMask, resetAll, resetAndSeedGeoHierarchyFromValues, resetWidget, resolveGeoWidgetLevelLabel, resolveGeoWidgetLevelValue, resolveTheme, resolveWidgetIdValue, seedGeoHierarchyFromValues, setDataSource, setError, setLoading, setTouched, setValue, setValueByPath, setValues, setWidgetValue, shouldEnableWidget, shouldRequireWidget, shouldShowWidget, transformDataSourceOptions, translatePanelConfig, translateUISchema, translateWidgetConfig, unregisterGeoWidgetParent, useBaseWidget, useGeoWidgetCascade, useWidgetCascade, useWidgetContext, useWidgetEventBus, useWidgetTheme, useWidgetTranslation, validateNumericValue, validateWidget, widgetRegistry };
|
|
1861
|
-
export type { ApiAdapter, ApiDataSource$1 as ApiDataSource, BaseWidgetConfig, BooleanControlType, BooleanRepresentation, CaseControl, CharacterType, ConditionOperator, DataSource, DataSourceRequestHandler, DataSourceType, GeoLevelConfig, GeoLevelData, InputMask, NumericType, PanelConfig, RoundingMode, SchemaDataSource, SectionBuilderProps, SectionChanges, SectionConfig, SectionMode, SectionRendererProps, SectionsContainerProps, SectionsFormHandle, StaticDataSource, SupportingDocumentConfig, TextAlign, TreeNode, TreeNodeType, UISchema, UseBaseWidgetOptions, ValidationType, WidgetCascadeConfig, WidgetCondition, WidgetConditionState, WidgetContextValue, WidgetDataPath, WidgetDispatch, WidgetEvent, WidgetEventType, WidgetFormat, WidgetGeoConfig, WidgetOptionRule, WidgetOptions, WidgetRegistryEntry, WidgetRenderFunction, WidgetRootState, WidgetState, WidgetStore, WidgetTheme, WidgetThemeButton, WidgetThemeColors, WidgetThemePanel, WidgetThemeSection, WidgetThemeWidget, WidgetValidation, WidgetValue };
|
|
1880
|
+
export { ArrayWidget, BooleanWidget, CheckboxWidget, CurrencyInputWidget, DateInputWidget, DateTimeInputWidget, DialogTableWidget, DisplayWidget, FileInputWidget, GEO_LEVEL_CLEARED, HeaderSectionWidget, IdAuthenticationWidget, IterableAccordionWidget, JSONEditorPanel, MultiSelectWidget, NumberInputWidget, PanelRenderer, PhoneInputWidget, ProfileWidget, PropertyEditor, RadioWidget, RegisterLookupWidget, ScoresDisplayWidget, SectionBuilder, SectionRenderer, SectionTree, SectionsContainer, SelectWidget, SimpleTableWidget, TableWidget, TextAreaWidget, TextInputWidget, VisualBuilderPanel, WidgetEventBus, WidgetProvider, WidgetRenderer, applyCaseControl, applyDecimalPrecision, applyMask, applySharedGeoHierarchyToValues, collectGeoWidgetRegistrationsFromWidgets, createGeoLevelMnemonicResolver, createWidgetStore, createZodSchema, defaultTheme, evaluateCondition, evaluateWidgetConditions, filterByCharacterType, formatCurrency, formatDate, formatNumber, formatPhone, formatValue, geoHierarchyBuilder, getApiDataSource, getCachedApiDataSource, getFormattedNumberLength, getGeoDescendantWidgetIds, getGeoGroupId, getGeoWidgetRegistrationsInGroup, getSchemaDataSource, getStaticDataSource, getValueByPath, getWidgetValue, hasVisibilityRules, initI18n, isAllowedKey, isUpstreamGeoAncestor, normalizeNumericDefault, normalizeOptionRules, orderGeoWidgetRegistrations, parseDataPath, parseNumber, rebuildGeoHierarchyFromRegistrations, reconcileGeoHierarchiesInValues, registerDefaultWidgets, registerGeoWidget, registerGeoWidgetParent, removeMask, resetAll, resetAndSeedGeoHierarchyFromValues, resetWidget, resolveGeoWidgetLevelLabel, resolveGeoWidgetLevelValue, resolveTheme, resolveWidgetIdValue, seedGeoHierarchyFromValues, setDataSource, setError, setLoading, setTouched, setValue, setValueByPath, setValues, setWidgetValue, shouldEnableWidget, shouldRequireWidget, shouldShowWidget, transformDataSourceOptions, translatePanelConfig, translateUISchema, translateWidgetConfig, unregisterGeoWidget, unregisterGeoWidgetParent, useBaseWidget, useGeoWidgetCascade, useWidgetCascade, useWidgetContext, useWidgetEventBus, useWidgetTheme, useWidgetTranslation, validateNumericValue, validateWidget, widgetRegistry };
|
|
1881
|
+
export type { ApiAdapter, ApiDataSource$1 as ApiDataSource, BaseWidgetConfig, BooleanControlType, BooleanRepresentation, CaseControl, CharacterType, ConditionOperator, DataSource, DataSourceRequestHandler, DataSourceType, GeoLevelConfig, GeoLevelData, GeoWidgetRegistration, InputMask, NumericType, PanelConfig, RoundingMode, SchemaDataSource, SectionBuilderProps, SectionChanges, SectionConfig, SectionMode, SectionRendererProps, SectionsContainerProps, SectionsFormHandle, StaticDataSource, SupportingDocumentConfig, TextAlign, TreeNode, TreeNodeType, UISchema, UseBaseWidgetOptions, ValidationType, WidgetCascadeConfig, WidgetCondition, WidgetConditionState, WidgetContextValue, WidgetDataPath, WidgetDispatch, WidgetEvent, WidgetEventType, WidgetFormat, WidgetGeoConfig, WidgetOptionRule, WidgetOptions, WidgetRegistryEntry, WidgetRenderFunction, WidgetRootState, WidgetState, WidgetStore, WidgetTheme, WidgetThemeButton, WidgetThemeColors, WidgetThemePanel, WidgetThemeSection, WidgetThemeWidget, WidgetValidation, WidgetValue };
|