@openg2p/registry-widgets 1.1.2-dev.6 → 1.1.2-dev.8
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/SectionBuilder/schemas.d.ts +112 -0
- package/dist/components/SectionBuilder/schemas.d.ts.map +1 -1
- package/dist/components/SectionRenderer.d.ts.map +1 -1
- package/dist/components/WidgetFieldLabel.d.ts +11 -0
- package/dist/components/WidgetFieldLabel.d.ts.map +1 -0
- package/dist/hooks/useBaseWidget.d.ts +2 -0
- package/dist/hooks/useBaseWidget.d.ts.map +1 -1
- package/dist/index.d.ts +52 -15
- package/dist/index.esm.js +1038 -414
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +1046 -413
- package/dist/index.js.map +1 -1
- package/dist/registry/defaultWidgets.d.ts.map +1 -1
- package/dist/types/index.d.ts +11 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/utils/conditions.d.ts +17 -11
- package/dist/utils/conditions.d.ts.map +1 -1
- package/dist/utils/dataSource.d.ts +6 -0
- package/dist/utils/dataSource.d.ts.map +1 -1
- package/dist/utils/geoHierarchy.d.ts +9 -0
- package/dist/utils/geoHierarchy.d.ts.map +1 -1
- package/dist/utils/schemaNamespace.d.ts.map +1 -1
- package/dist/utils/schemaTranslation.d.ts.map +1 -1
- package/dist/utils/sectionRevert.d.ts +24 -0
- package/dist/utils/sectionRevert.d.ts.map +1 -0
- package/dist/utils/sectionValidate.d.ts.map +1 -1
- package/dist/widgets/ArrayWidget.d.ts.map +1 -1
- package/dist/widgets/BooleanWidget.d.ts.map +1 -1
- package/dist/widgets/CheckboxWidget.d.ts.map +1 -1
- package/dist/widgets/CurrencyInputWidget.d.ts.map +1 -1
- package/dist/widgets/DateInputWidget.d.ts.map +1 -1
- package/dist/widgets/DateTimeInputWidget.d.ts.map +1 -1
- package/dist/widgets/DialogTableWidget.d.ts.map +1 -1
- package/dist/widgets/FileInputWidget.d.ts.map +1 -1
- package/dist/widgets/IterableAccordionWidget.d.ts.map +1 -1
- package/dist/widgets/MultiSelectWidget.d.ts +7 -0
- package/dist/widgets/MultiSelectWidget.d.ts.map +1 -0
- package/dist/widgets/NumberInputWidget.d.ts.map +1 -1
- package/dist/widgets/PhoneInputWidget.d.ts.map +1 -1
- package/dist/widgets/RadioWidget.d.ts.map +1 -1
- package/dist/widgets/RegisterLookupWidget.d.ts.map +1 -1
- package/dist/widgets/SelectWidget.d.ts.map +1 -1
- package/dist/widgets/TableWidget.d.ts.map +1 -1
- package/dist/widgets/TextAreaWidget.d.ts.map +1 -1
- package/dist/widgets/TextInputWidget.d.ts.map +1 -1
- package/dist/widgets/index.d.ts +1 -0
- package/dist/widgets/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -351,6 +351,34 @@ export declare const panelSchema: {
|
|
|
351
351
|
type: "string";
|
|
352
352
|
enum: string[];
|
|
353
353
|
};
|
|
354
|
+
actions: {
|
|
355
|
+
type: "array";
|
|
356
|
+
description: string;
|
|
357
|
+
items: {
|
|
358
|
+
type: "object";
|
|
359
|
+
properties: {
|
|
360
|
+
action: {
|
|
361
|
+
type: "string";
|
|
362
|
+
enum: string[];
|
|
363
|
+
};
|
|
364
|
+
condition: {
|
|
365
|
+
type: "object";
|
|
366
|
+
properties: {
|
|
367
|
+
field: {
|
|
368
|
+
type: "string";
|
|
369
|
+
};
|
|
370
|
+
operator: {
|
|
371
|
+
type: "string";
|
|
372
|
+
enum: readonly ["equals", "notEquals", "notEmpty", "empty", "greaterThan", "lessThan", "contains", "notContains"];
|
|
373
|
+
};
|
|
374
|
+
value: {};
|
|
375
|
+
};
|
|
376
|
+
required: string[];
|
|
377
|
+
};
|
|
378
|
+
};
|
|
379
|
+
required: string[];
|
|
380
|
+
};
|
|
381
|
+
};
|
|
354
382
|
condition: {
|
|
355
383
|
type: "object";
|
|
356
384
|
properties: {
|
|
@@ -850,6 +878,34 @@ export declare const panelSchema: {
|
|
|
850
878
|
type: "string";
|
|
851
879
|
enum: string[];
|
|
852
880
|
};
|
|
881
|
+
actions: {
|
|
882
|
+
type: "array";
|
|
883
|
+
description: string;
|
|
884
|
+
items: {
|
|
885
|
+
type: "object";
|
|
886
|
+
properties: {
|
|
887
|
+
action: {
|
|
888
|
+
type: "string";
|
|
889
|
+
enum: string[];
|
|
890
|
+
};
|
|
891
|
+
condition: {
|
|
892
|
+
type: "object";
|
|
893
|
+
properties: {
|
|
894
|
+
field: {
|
|
895
|
+
type: "string";
|
|
896
|
+
};
|
|
897
|
+
operator: {
|
|
898
|
+
type: "string";
|
|
899
|
+
enum: readonly ["equals", "notEquals", "notEmpty", "empty", "greaterThan", "lessThan", "contains", "notContains"];
|
|
900
|
+
};
|
|
901
|
+
value: {};
|
|
902
|
+
};
|
|
903
|
+
required: string[];
|
|
904
|
+
};
|
|
905
|
+
};
|
|
906
|
+
required: string[];
|
|
907
|
+
};
|
|
908
|
+
};
|
|
853
909
|
condition: {
|
|
854
910
|
type: "object";
|
|
855
911
|
properties: {
|
|
@@ -1412,6 +1468,34 @@ export declare const sectionSchema: {
|
|
|
1412
1468
|
type: "string";
|
|
1413
1469
|
enum: string[];
|
|
1414
1470
|
};
|
|
1471
|
+
actions: {
|
|
1472
|
+
type: "array";
|
|
1473
|
+
description: string;
|
|
1474
|
+
items: {
|
|
1475
|
+
type: "object";
|
|
1476
|
+
properties: {
|
|
1477
|
+
action: {
|
|
1478
|
+
type: "string";
|
|
1479
|
+
enum: string[];
|
|
1480
|
+
};
|
|
1481
|
+
condition: {
|
|
1482
|
+
type: "object";
|
|
1483
|
+
properties: {
|
|
1484
|
+
field: {
|
|
1485
|
+
type: "string";
|
|
1486
|
+
};
|
|
1487
|
+
operator: {
|
|
1488
|
+
type: "string";
|
|
1489
|
+
enum: readonly ["equals", "notEquals", "notEmpty", "empty", "greaterThan", "lessThan", "contains", "notContains"];
|
|
1490
|
+
};
|
|
1491
|
+
value: {};
|
|
1492
|
+
};
|
|
1493
|
+
required: string[];
|
|
1494
|
+
};
|
|
1495
|
+
};
|
|
1496
|
+
required: string[];
|
|
1497
|
+
};
|
|
1498
|
+
};
|
|
1415
1499
|
condition: {
|
|
1416
1500
|
type: "object";
|
|
1417
1501
|
properties: {
|
|
@@ -1911,6 +1995,34 @@ export declare const sectionSchema: {
|
|
|
1911
1995
|
type: "string";
|
|
1912
1996
|
enum: string[];
|
|
1913
1997
|
};
|
|
1998
|
+
actions: {
|
|
1999
|
+
type: "array";
|
|
2000
|
+
description: string;
|
|
2001
|
+
items: {
|
|
2002
|
+
type: "object";
|
|
2003
|
+
properties: {
|
|
2004
|
+
action: {
|
|
2005
|
+
type: "string";
|
|
2006
|
+
enum: string[];
|
|
2007
|
+
};
|
|
2008
|
+
condition: {
|
|
2009
|
+
type: "object";
|
|
2010
|
+
properties: {
|
|
2011
|
+
field: {
|
|
2012
|
+
type: "string";
|
|
2013
|
+
};
|
|
2014
|
+
operator: {
|
|
2015
|
+
type: "string";
|
|
2016
|
+
enum: readonly ["equals", "notEquals", "notEmpty", "empty", "greaterThan", "lessThan", "contains", "notContains"];
|
|
2017
|
+
};
|
|
2018
|
+
value: {};
|
|
2019
|
+
};
|
|
2020
|
+
required: string[];
|
|
2021
|
+
};
|
|
2022
|
+
};
|
|
2023
|
+
required: string[];
|
|
2024
|
+
};
|
|
2025
|
+
};
|
|
1914
2026
|
condition: {
|
|
1915
2027
|
type: "object";
|
|
1916
2028
|
properties: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/components/SectionBuilder/schemas.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,YAAY,yNAmBf,CAAC;AAEX,eAAO,MAAM,YAAY,qCAAsC,CAAC;AAEhE,eAAO,MAAM,mBAAmB,6GAStB,CAAC;AAEX,eAAO,MAAM,iBAAiB,sCAAuC,CAAC;AAEtE,eAAO,MAAM,gBAAgB,oCAAqC,CAAC;AAEnE,eAAO,MAAM,eAAe,wFAOl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AC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAErE,qEAAqE;IACrE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,4DAA4D;IAC5D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,sFAAsF;IACtF,oBAAoB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,oGAAoG;IACpG,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,uGAAuG;IACvG,oBAAoB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/C,4FAA4F;IAC5F,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,wGAAwG;IACxG,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;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,4CAikDtB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface WidgetFieldLabelProps {
|
|
2
|
+
label: string;
|
|
3
|
+
required?: boolean;
|
|
4
|
+
className?: string;
|
|
5
|
+
title?: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Field label: long text truncates with ellipsis; required asterisk always stays visible.
|
|
9
|
+
*/
|
|
10
|
+
export declare const WidgetFieldLabel: ({ label, required, className, title, }: WidgetFieldLabelProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
//# sourceMappingURL=WidgetFieldLabel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WidgetFieldLabel.d.ts","sourceRoot":"","sources":["../../src/components/WidgetFieldLabel.tsx"],"names":[],"mappings":"AAEA,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,eAAO,MAAM,gBAAgB,GAAI,wCAK9B,qBAAqB,4CAevB,CAAC"}
|
|
@@ -8,12 +8,14 @@ export interface UseBaseWidgetOptions {
|
|
|
8
8
|
export declare const useBaseWidget: (options: UseBaseWidgetOptions) => {
|
|
9
9
|
widgetId: string;
|
|
10
10
|
value: any;
|
|
11
|
+
geoDisplayLabel: string | undefined;
|
|
11
12
|
formattedValue: any;
|
|
12
13
|
error: string[];
|
|
13
14
|
touched: boolean;
|
|
14
15
|
loading: boolean;
|
|
15
16
|
isVisible: boolean;
|
|
16
17
|
isEnabled: boolean;
|
|
18
|
+
isRequired: boolean;
|
|
17
19
|
onChange: (newValue: any, validate?: boolean) => void;
|
|
18
20
|
onBlur: () => void;
|
|
19
21
|
setError: (errors: string[]) => {
|
|
@@ -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;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;;uBAkWd,MAAM,EAAE;;;;;;;0BA1OpB,MAAM;;;CA+OhB,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -40,7 +40,7 @@ options?: {
|
|
|
40
40
|
/**
|
|
41
41
|
* API data source configuration
|
|
42
42
|
*/
|
|
43
|
-
interface ApiDataSource {
|
|
43
|
+
interface ApiDataSource$1 {
|
|
44
44
|
type: 'api';
|
|
45
45
|
service: string;
|
|
46
46
|
endpoint: string;
|
|
@@ -61,7 +61,7 @@ interface SchemaDataSource {
|
|
|
61
61
|
valueKey?: string;
|
|
62
62
|
labelKey?: string;
|
|
63
63
|
}
|
|
64
|
-
type DataSource = StaticDataSource | ApiDataSource | SchemaDataSource;
|
|
64
|
+
type DataSource = StaticDataSource | ApiDataSource$1 | SchemaDataSource;
|
|
65
65
|
/**
|
|
66
66
|
* Allowed character types for text input
|
|
67
67
|
*/
|
|
@@ -167,12 +167,22 @@ interface WidgetCondition {
|
|
|
167
167
|
operator: ConditionOperator;
|
|
168
168
|
value?: any;
|
|
169
169
|
}
|
|
170
|
+
/**
|
|
171
|
+
* Single conditional action rule (used in widget-data-options.actions list)
|
|
172
|
+
*/
|
|
173
|
+
interface WidgetOptionRule {
|
|
174
|
+
action: 'show' | 'hide' | 'enable' | 'disable' | 'require';
|
|
175
|
+
condition?: WidgetCondition;
|
|
176
|
+
}
|
|
170
177
|
/**
|
|
171
178
|
* Widget options for conditional behavior
|
|
172
179
|
*/
|
|
173
180
|
interface WidgetOptions {
|
|
174
|
-
|
|
181
|
+
/** @deprecated Prefer `actions` for multiple sequential rules */
|
|
182
|
+
action?: 'show' | 'hide' | 'enable' | 'disable' | 'require';
|
|
175
183
|
condition?: WidgetCondition;
|
|
184
|
+
/** Sequential rules: enable/disable/show/hide first, then require */
|
|
185
|
+
actions?: WidgetOptionRule[];
|
|
176
186
|
minDate?: string;
|
|
177
187
|
maxDate?: string;
|
|
178
188
|
minDateField?: string;
|
|
@@ -387,12 +397,14 @@ interface UseBaseWidgetOptions {
|
|
|
387
397
|
declare const useBaseWidget: (options: UseBaseWidgetOptions) => {
|
|
388
398
|
widgetId: string;
|
|
389
399
|
value: any;
|
|
400
|
+
geoDisplayLabel: string | undefined;
|
|
390
401
|
formattedValue: any;
|
|
391
402
|
error: string[];
|
|
392
403
|
touched: boolean;
|
|
393
404
|
loading: boolean;
|
|
394
405
|
isVisible: boolean;
|
|
395
406
|
isEnabled: boolean;
|
|
407
|
+
isRequired: boolean;
|
|
396
408
|
onChange: (newValue: any, validate?: boolean) => void;
|
|
397
409
|
onBlur: () => void;
|
|
398
410
|
setError: (errors: string[]) => {
|
|
@@ -1522,6 +1534,11 @@ declare const RegisterLookupWidget: ({ config }: {
|
|
|
1522
1534
|
config: BaseWidgetConfig;
|
|
1523
1535
|
}) => react_jsx_runtime.JSX.Element;
|
|
1524
1536
|
|
|
1537
|
+
interface MultiSelectWidgetProps {
|
|
1538
|
+
config: BaseWidgetConfig;
|
|
1539
|
+
}
|
|
1540
|
+
declare const MultiSelectWidget: ({ config }: MultiSelectWidgetProps) => react_jsx_runtime.JSX.Element;
|
|
1541
|
+
|
|
1525
1542
|
/**
|
|
1526
1543
|
* Get value from object using dot notation path
|
|
1527
1544
|
* Safely handles nested paths like "person.name" or "address.street.number"
|
|
@@ -1585,20 +1602,31 @@ declare const formatValue: (value: any, format: WidgetFormat | undefined, widget
|
|
|
1585
1602
|
*/
|
|
1586
1603
|
declare const evaluateCondition: (condition: WidgetCondition, allValues: Record<string, any>) => boolean;
|
|
1587
1604
|
/**
|
|
1588
|
-
*
|
|
1605
|
+
* Normalize widget-data-options into a sequential list of action rules.
|
|
1606
|
+
* Supports legacy single { action, condition } and new { actions: [...] }.
|
|
1589
1607
|
*/
|
|
1590
|
-
declare const
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1608
|
+
declare const normalizeOptionRules: (options?: WidgetOptions) => WidgetOptionRule[];
|
|
1609
|
+
declare const hasVisibilityRules: (options?: WidgetOptions) => boolean;
|
|
1610
|
+
interface WidgetConditionState {
|
|
1611
|
+
visible: boolean;
|
|
1612
|
+
enabled: boolean;
|
|
1613
|
+
required: boolean;
|
|
1614
|
+
}
|
|
1594
1615
|
/**
|
|
1595
|
-
*
|
|
1616
|
+
* Evaluate widget-data-options rules sequentially.
|
|
1617
|
+
* show/hide and enable/disable only affect visibility and enabled state.
|
|
1618
|
+
* require is independent: required = widget-required OR require-condition-match.
|
|
1596
1619
|
*/
|
|
1597
|
-
declare const
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1620
|
+
declare const evaluateWidgetConditions: (options: WidgetOptions | undefined, allValues: Record<string, any>, baseRequired?: boolean) => WidgetConditionState;
|
|
1621
|
+
declare const shouldShowWidget: (options: WidgetOptions | undefined, allValues: Record<string, any>) => boolean;
|
|
1622
|
+
declare const shouldEnableWidget: (options: WidgetOptions | undefined, allValues: Record<string, any>) => boolean;
|
|
1623
|
+
declare const shouldRequireWidget: (options: WidgetOptions | undefined, allValues: Record<string, any>, baseRequired?: boolean) => boolean;
|
|
1601
1624
|
|
|
1625
|
+
type ApiDataSource = Extract<DataSource, {
|
|
1626
|
+
type: 'api';
|
|
1627
|
+
}>;
|
|
1628
|
+
/** Return cached API options when already fetched (e.g. duplicate table cells). */
|
|
1629
|
+
declare function getCachedApiDataSource(dataSource: ApiDataSource, allValues: Record<string, any>, levelId?: string): any[] | undefined;
|
|
1602
1630
|
/**
|
|
1603
1631
|
* Get static data source options
|
|
1604
1632
|
*/
|
|
@@ -1747,6 +1775,15 @@ declare function registerGeoWidgetParent(widgetId: string, parentWidgetId: strin
|
|
|
1747
1775
|
declare function unregisterGeoWidgetParent(widgetId: string): void;
|
|
1748
1776
|
/** True when changedWidgetId is any upstream geo parent of widgetId (not only immediate parent). */
|
|
1749
1777
|
declare function isUpstreamGeoAncestor(changedWidgetId: string, widgetId: string, immediateParentWidgetId: string | null): boolean;
|
|
1778
|
+
/** Group id for geo widgets sharing the same register prefix (e.g. `{registerId}`). */
|
|
1779
|
+
declare function getGeoGroupId(dataPath: string | Record<string, string> | undefined): string;
|
|
1780
|
+
/**
|
|
1781
|
+
* Resolve the human-readable label for a geo level from persisted hierarchy JSON.
|
|
1782
|
+
* Used in readonly mode when API options are not loaded.
|
|
1783
|
+
*/
|
|
1784
|
+
declare function resolveGeoWidgetLevelLabel(values: Record<string, any>, widgetId: string, dataPath: string | Record<string, string> | undefined, geoConfig: GeoLevelConfig): string | undefined;
|
|
1785
|
+
/** All registered geo widgets that are descendants of ancestorWidgetId. */
|
|
1786
|
+
declare function getGeoDescendantWidgetIds(ancestorWidgetId: string): string[];
|
|
1750
1787
|
/** Seed in-memory builder from persisted hierarchy JSON (edit-mode rehydration). */
|
|
1751
1788
|
declare function seedGeoHierarchyFromValues(values: Record<string, any>, dataPath: string | Record<string, string> | undefined, widgetId: string, groupId: string): void;
|
|
1752
1789
|
/** Force-clear builder for a group, then seed from Redux/schema values (e.g. after Cancel). */
|
|
@@ -1820,5 +1857,5 @@ declare const translatePanelConfig: (panel: PanelConfig, translate: (key: string
|
|
|
1820
1857
|
*/
|
|
1821
1858
|
declare const translateUISchema: (schema: UISchema, translate: (key: string, options?: any) => string) => UISchema;
|
|
1822
1859
|
|
|
1823
|
-
export { ArrayWidget, BooleanWidget, CheckboxWidget, CurrencyInputWidget, DateInputWidget, DateTimeInputWidget, DialogTableWidget, DisplayWidget, FileInputWidget, GEO_LEVEL_CLEARED, HeaderSectionWidget, IdAuthenticationWidget, IterableAccordionWidget, JSONEditorPanel, 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, 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 };
|
|
1824
|
-
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 };
|
|
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 };
|