@openg2p/registry-widgets 1.1.1 → 1.1.2-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/dist/hooks/useBaseWidget.d.ts.map +1 -1
- package/dist/hooks/useGeoWidgetCascade.d.ts.map +1 -1
- package/dist/index.d.ts +33 -2
- package/dist/index.esm.js +530 -305
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +539 -304
- package/dist/index.js.map +1 -1
- package/dist/utils/dataSource.d.ts.map +1 -1
- package/dist/utils/geoHierarchy.d.ts +23 -0
- package/dist/utils/geoHierarchy.d.ts.map +1 -1
- package/dist/utils/numberInput.d.ts +1 -0
- package/dist/utils/numberInput.d.ts.map +1 -1
- package/dist/utils/pathUtils.d.ts +5 -0
- package/dist/utils/pathUtils.d.ts.map +1 -1
- package/dist/widgets/NumberInputWidget.d.ts +2 -0
- package/dist/widgets/NumberInputWidget.d.ts.map +1 -1
- package/dist/widgets/TableWidget.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -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;AAMD,eAAO,MAAM,aAAa,GAAI,SAAS,oBAAoB;;;;;;;;;yBAuN5C,GAAG,aAAY,OAAO;;uBAyUd,MAAM,EAAE;;;;;;;0BA9MpB,MAAM;;;CAmNhB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useGeoWidgetCascade.d.ts","sourceRoot":"","sources":["../../src/hooks/useGeoWidgetCascade.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,
|
|
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;AAgBtE,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;AAKD;;;GAGG;AACH,eAAO,MAAM,mBAAmB,GAAI,SAAS,0BAA0B,SAuPtE,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -906,6 +906,7 @@ declare const TextInputWidget: ({ config }: TextInputWidgetProps) => react_jsx_r
|
|
|
906
906
|
* - Value range validation (min/max)
|
|
907
907
|
* - Regular expression validation with custom messages
|
|
908
908
|
* - Maximum character limit
|
|
909
|
+
* - Default value (numeric, applied when field has no existing data)
|
|
909
910
|
* - Numeric masking and formatting (thousand/decimal separators)
|
|
910
911
|
* - Text alignment (right by default, configurable)
|
|
911
912
|
* - Key input restrictions
|
|
@@ -933,6 +934,7 @@ declare const TextInputWidget: ({ config }: TextInputWidgetProps) => react_jsx_r
|
|
|
933
934
|
* "pattern": "^[0-9]+(\\.[0-9]{1,2})?$",
|
|
934
935
|
* "patternMessage": "Invalid number format"
|
|
935
936
|
* },
|
|
937
|
+
* "widget-data-default": 0,
|
|
936
938
|
* "widget-required": true,
|
|
937
939
|
* "widget-data-placeholder": "Enter amount"
|
|
938
940
|
* }
|
|
@@ -1533,6 +1535,11 @@ declare const parseDataPath: (dataPath: string | Record<string, string> | undefi
|
|
|
1533
1535
|
/**
|
|
1534
1536
|
* Get value from widget state using data path
|
|
1535
1537
|
*/
|
|
1538
|
+
/**
|
|
1539
|
+
* Resolve a widget-id reference in Redux values.
|
|
1540
|
+
* Supports namespaced ids (e.g. "rv-section-0__region_code" when ref is "region_code").
|
|
1541
|
+
*/
|
|
1542
|
+
declare const resolveWidgetIdValue: (values: Record<string, any>, ref: string) => any;
|
|
1536
1543
|
declare const getWidgetValue: (values: Record<string, any>, dataPath: string | Record<string, string> | undefined, widgetId: string) => any;
|
|
1537
1544
|
/**
|
|
1538
1545
|
* Set value in widget state using data path
|
|
@@ -1664,6 +1671,7 @@ declare const isAllowedKey: (key: string, format: WidgetFormat | undefined, curr
|
|
|
1664
1671
|
* Calculate character count including separators and sign
|
|
1665
1672
|
*/
|
|
1666
1673
|
declare const getFormattedNumberLength: (value: number | string | null, format: WidgetFormat | undefined) => number;
|
|
1674
|
+
declare const normalizeNumericDefault: (defaultValue: unknown, format: WidgetFormat | undefined) => number | null | undefined;
|
|
1667
1675
|
|
|
1668
1676
|
/**
|
|
1669
1677
|
* Geo Hierarchy Builder
|
|
@@ -1674,6 +1682,19 @@ interface GeoLevelData {
|
|
|
1674
1682
|
level_value_id: string;
|
|
1675
1683
|
level_value_mnemonic: string;
|
|
1676
1684
|
}
|
|
1685
|
+
interface GeoLevelConfig {
|
|
1686
|
+
level: string;
|
|
1687
|
+
}
|
|
1688
|
+
/**
|
|
1689
|
+
* Resolve the display value for a geo level widget.
|
|
1690
|
+
* When widgetId is explicitly set in Redux (including cleared undefined/null), do not
|
|
1691
|
+
* fall back to shared hierarchy dataPath — that stale path was keeping grandchildren visible.
|
|
1692
|
+
*/
|
|
1693
|
+
declare function resolveGeoWidgetLevelValue(values: Record<string, any>, widgetId: string, dataPath: string | Record<string, string> | undefined, geoConfig: GeoLevelConfig): any;
|
|
1694
|
+
/**
|
|
1695
|
+
* Write the in-memory geo hierarchy builder state into Redux at the shared dataPath.
|
|
1696
|
+
*/
|
|
1697
|
+
declare function applySharedGeoHierarchyToValues(baseValues: Record<string, any>, groupId: string, dataPath: string | Record<string, string> | undefined, widgetId: string): Record<string, any>;
|
|
1677
1698
|
declare class GeoHierarchyBuilder {
|
|
1678
1699
|
private hierarchies;
|
|
1679
1700
|
/**
|
|
@@ -1716,6 +1737,16 @@ declare class GeoHierarchyBuilder {
|
|
|
1716
1737
|
getLevels(groupId?: string): GeoLevelData[];
|
|
1717
1738
|
}
|
|
1718
1739
|
declare const geoHierarchyBuilder: GeoHierarchyBuilder;
|
|
1740
|
+
/** Sentinel written to Redux when a geo level is cleared by cascade (distinct from "never set"). */
|
|
1741
|
+
declare const GEO_LEVEL_CLEARED: null;
|
|
1742
|
+
declare function registerGeoWidgetParent(widgetId: string, parentWidgetId: string | null): void;
|
|
1743
|
+
declare function unregisterGeoWidgetParent(widgetId: string): void;
|
|
1744
|
+
/** True when changedWidgetId is any upstream geo parent of widgetId (not only immediate parent). */
|
|
1745
|
+
declare function isUpstreamGeoAncestor(changedWidgetId: string, widgetId: string, immediateParentWidgetId: string | null): boolean;
|
|
1746
|
+
/** Seed in-memory builder from persisted hierarchy JSON (edit-mode rehydration). */
|
|
1747
|
+
declare function seedGeoHierarchyFromValues(values: Record<string, any>, dataPath: string | Record<string, string> | undefined, widgetId: string, groupId: string): void;
|
|
1748
|
+
/** Force-clear builder for a group, then seed from Redux/schema values (e.g. after Cancel). */
|
|
1749
|
+
declare function resetAndSeedGeoHierarchyFromValues(values: Record<string, any>, dataPath: string, widgetId: string, groupId: string): void;
|
|
1719
1750
|
|
|
1720
1751
|
type ResolvedTheme = ReturnType<typeof resolveTheme>;
|
|
1721
1752
|
/**
|
|
@@ -1785,5 +1816,5 @@ declare const translatePanelConfig: (panel: PanelConfig, translate: (key: string
|
|
|
1785
1816
|
*/
|
|
1786
1817
|
declare const translateUISchema: (schema: UISchema, translate: (key: string, options?: any) => string) => UISchema;
|
|
1787
1818
|
|
|
1788
|
-
export { ArrayWidget, BooleanWidget, CheckboxWidget, CurrencyInputWidget, DateInputWidget, DateTimeInputWidget, DialogTableWidget, DisplayWidget, FileInputWidget, HeaderSectionWidget, IdAuthenticationWidget, IterableAccordionWidget, JSONEditorPanel, NumberInputWidget, PanelRenderer, PhoneInputWidget, ProfileWidget, PropertyEditor, RadioWidget, ScoresDisplayWidget, SectionBuilder, SectionRenderer, SectionTree, SectionsContainer, SelectWidget, SimpleTableWidget, TableWidget, TextAreaWidget, TextInputWidget, VisualBuilderPanel, WidgetEventBus, WidgetProvider, WidgetRenderer, applyCaseControl, applyDecimalPrecision, applyMask, createWidgetStore, createZodSchema, defaultTheme, evaluateCondition, filterByCharacterType, formatCurrency, formatDate, formatNumber, formatPhone, formatValue, geoHierarchyBuilder, getApiDataSource, getFormattedNumberLength, getSchemaDataSource, getStaticDataSource, getValueByPath, getWidgetValue, initI18n, isAllowedKey, parseDataPath, parseNumber, registerDefaultWidgets, removeMask, resetAll, resetWidget, resolveTheme, setDataSource, setError, setLoading, setTouched, setValue, setValueByPath, setValues, setWidgetValue, shouldEnableWidget, shouldShowWidget, transformDataSourceOptions, translatePanelConfig, translateUISchema, translateWidgetConfig, useBaseWidget, useGeoWidgetCascade, useWidgetCascade, useWidgetContext, useWidgetEventBus, useWidgetTheme, useWidgetTranslation, validateNumericValue, validateWidget, widgetRegistry };
|
|
1789
|
-
export type { ApiAdapter, ApiDataSource, BaseWidgetConfig, BooleanControlType, BooleanRepresentation, CaseControl, CharacterType, ConditionOperator, DataSource, DataSourceRequestHandler, DataSourceType, GeoLevelData, InputMask, NumericType, PanelConfig, RoundingMode, SchemaDataSource, SectionBuilderProps, SectionChanges, SectionConfig, SectionMode, SectionRendererProps, SectionsContainerProps, SectionsFormHandle, StaticDataSource, SupportingDocumentConfig, TextAlign, TreeNode, TreeNodeType, UISchema, UseBaseWidgetOptions, ValidationType, WidgetCascadeConfig, WidgetCondition, WidgetContextValue, WidgetDataPath, WidgetDispatch, WidgetEvent, WidgetEventType, WidgetFormat, WidgetGeoConfig, WidgetOptions, WidgetRegistryEntry, WidgetRenderFunction, WidgetRootState, WidgetState, WidgetStore, WidgetTheme, WidgetThemeButton, WidgetThemeColors, WidgetThemePanel, WidgetThemeSection, WidgetThemeWidget, WidgetValidation, WidgetValue };
|
|
1819
|
+
export { ArrayWidget, BooleanWidget, CheckboxWidget, CurrencyInputWidget, DateInputWidget, DateTimeInputWidget, DialogTableWidget, DisplayWidget, FileInputWidget, GEO_LEVEL_CLEARED, HeaderSectionWidget, IdAuthenticationWidget, IterableAccordionWidget, JSONEditorPanel, NumberInputWidget, PanelRenderer, PhoneInputWidget, ProfileWidget, PropertyEditor, RadioWidget, ScoresDisplayWidget, SectionBuilder, SectionRenderer, SectionTree, SectionsContainer, SelectWidget, SimpleTableWidget, TableWidget, TextAreaWidget, TextInputWidget, VisualBuilderPanel, WidgetEventBus, WidgetProvider, WidgetRenderer, applyCaseControl, applyDecimalPrecision, applyMask, applySharedGeoHierarchyToValues, createWidgetStore, createZodSchema, defaultTheme, evaluateCondition, filterByCharacterType, formatCurrency, formatDate, formatNumber, formatPhone, formatValue, geoHierarchyBuilder, getApiDataSource, getFormattedNumberLength, getSchemaDataSource, getStaticDataSource, getValueByPath, getWidgetValue, initI18n, isAllowedKey, isUpstreamGeoAncestor, normalizeNumericDefault, parseDataPath, parseNumber, registerDefaultWidgets, registerGeoWidgetParent, removeMask, resetAll, resetAndSeedGeoHierarchyFromValues, resetWidget, resolveGeoWidgetLevelValue, resolveTheme, resolveWidgetIdValue, seedGeoHierarchyFromValues, setDataSource, setError, setLoading, setTouched, setValue, setValueByPath, setValues, setWidgetValue, shouldEnableWidget, shouldShowWidget, transformDataSourceOptions, translatePanelConfig, translateUISchema, translateWidgetConfig, unregisterGeoWidgetParent, useBaseWidget, useGeoWidgetCascade, useWidgetCascade, useWidgetContext, useWidgetEventBus, useWidgetTheme, useWidgetTranslation, validateNumericValue, validateWidget, widgetRegistry };
|
|
1820
|
+
export type { ApiAdapter, 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, WidgetContextValue, WidgetDataPath, WidgetDispatch, WidgetEvent, WidgetEventType, WidgetFormat, WidgetGeoConfig, WidgetOptions, WidgetRegistryEntry, WidgetRenderFunction, WidgetRootState, WidgetState, WidgetStore, WidgetTheme, WidgetThemeButton, WidgetThemeColors, WidgetThemePanel, WidgetThemeSection, WidgetThemeWidget, WidgetValidation, WidgetValue };
|