@genesislcap/foundation-forms 14.412.0 → 14.414.0
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/custom-elements.json +126 -2
- package/dist/dts/form.d.ts +4 -1
- package/dist/dts/form.d.ts.map +1 -1
- package/dist/dts/jsonforms/renderers/EnumRadioGroupControlRenderer.d.ts +30 -0
- package/dist/dts/jsonforms/renderers/EnumRadioGroupControlRenderer.d.ts.map +1 -0
- package/dist/dts/jsonforms/renderers/RenderersRanks.d.ts +2 -0
- package/dist/dts/jsonforms/renderers/RenderersRanks.d.ts.map +1 -1
- package/dist/dts/jsonforms/renderers/SegmentedControlRenderer.d.ts +5 -0
- package/dist/dts/jsonforms/renderers/SegmentedControlRenderer.d.ts.map +1 -0
- package/dist/dts/types.d.ts +58 -1
- package/dist/dts/types.d.ts.map +1 -1
- package/dist/esm/form.js +4 -0
- package/dist/esm/jsonforms/renderers/EnumRadioGroupControlRenderer.js +85 -0
- package/dist/esm/jsonforms/renderers/RenderersRanks.js +2 -0
- package/dist/esm/jsonforms/renderers/SegmentedControlRenderer.js +57 -0
- package/dist/foundation-forms.api.json +111 -1
- package/dist/foundation-forms.d.ts +65 -2
- package/package.json +15 -15
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"type": {
|
|
25
25
|
"text": "array"
|
|
26
26
|
},
|
|
27
|
-
"default": "[\n fallbackEntry,\n stringEntry,\n BooleanControlEntry,\n StringArrayEntry,\n LayoutArrayRendererEntry,\n LayoutCategorizationRendererEntry,\n LayoutGroupRendererEntry,\n LayoutHorizontalEntry,\n LayoutFormGridEntry,\n LayoutVertical2ColumnsEntry,\n LayoutRendererEntry,\n LayoutStepperRendererEntry,\n NumberControlRendererEntry,\n ConnectedMultiselectControlRendererEntry,\n EnumControlRendererEntry,\n ConnectedSelectControlRendererEntry,\n DateControlRendererEntry,\n InvisibleControlEntry,\n DividerControlRenderer,\n MulticolumnDropdownControlRendererEntry,\n]",
|
|
27
|
+
"default": "[\n fallbackEntry,\n stringEntry,\n BooleanControlEntry,\n StringArrayEntry,\n LayoutArrayRendererEntry,\n LayoutCategorizationRendererEntry,\n LayoutGroupRendererEntry,\n LayoutHorizontalEntry,\n LayoutFormGridEntry,\n LayoutVertical2ColumnsEntry,\n LayoutRendererEntry,\n LayoutStepperRendererEntry,\n NumberControlRendererEntry,\n ConnectedMultiselectControlRendererEntry,\n EnumControlRendererEntry,\n EnumRadioGroupControlRendererEntry,\n ConnectedSelectControlRendererEntry,\n DateControlRendererEntry,\n InvisibleControlEntry,\n DividerControlRenderer,\n MulticolumnDropdownControlRendererEntry,\n SegmentedControlRendererEntry,\n]",
|
|
28
28
|
"description": "Set of default renderers used by the foundation-forms.",
|
|
29
29
|
"privacy": "public"
|
|
30
30
|
},
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
"type": {
|
|
101
101
|
"text": "RendererEntry[]"
|
|
102
102
|
},
|
|
103
|
-
"default": "[\n fallbackEntry,\n stringEntry,\n BooleanControlEntry,\n StringArrayEntry,\n LayoutArrayRendererEntry,\n LayoutCategorizationRendererEntry,\n LayoutGroupRendererEntry,\n LayoutHorizontalEntry,\n LayoutFormGridEntry,\n LayoutVertical2ColumnsEntry,\n LayoutRendererEntry,\n LayoutStepperRendererEntry,\n NumberControlRendererEntry,\n ConnectedMultiselectControlRendererEntry,\n EnumControlRendererEntry,\n ConnectedSelectControlRendererEntry,\n DateControlRendererEntry,\n InvisibleControlEntry,\n DividerControlRenderer,\n MulticolumnDropdownControlRendererEntry,\n]",
|
|
103
|
+
"default": "[\n fallbackEntry,\n stringEntry,\n BooleanControlEntry,\n StringArrayEntry,\n LayoutArrayRendererEntry,\n LayoutCategorizationRendererEntry,\n LayoutGroupRendererEntry,\n LayoutHorizontalEntry,\n LayoutFormGridEntry,\n LayoutVertical2ColumnsEntry,\n LayoutRendererEntry,\n LayoutStepperRendererEntry,\n NumberControlRendererEntry,\n ConnectedMultiselectControlRendererEntry,\n EnumControlRendererEntry,\n EnumRadioGroupControlRendererEntry,\n ConnectedSelectControlRendererEntry,\n DateControlRendererEntry,\n InvisibleControlEntry,\n DividerControlRenderer,\n MulticolumnDropdownControlRendererEntry,\n SegmentedControlRendererEntry,\n]",
|
|
104
104
|
"description": "Allows to provide the main set of renderers used by the form. If not provided, the built-in renderers will be used by default.",
|
|
105
105
|
"privacy": "public"
|
|
106
106
|
},
|
|
@@ -2399,6 +2399,53 @@
|
|
|
2399
2399
|
}
|
|
2400
2400
|
]
|
|
2401
2401
|
},
|
|
2402
|
+
{
|
|
2403
|
+
"kind": "javascript-module",
|
|
2404
|
+
"path": "src/jsonforms/renderers/EnumRadioGroupControlRenderer.ts",
|
|
2405
|
+
"declarations": [
|
|
2406
|
+
{
|
|
2407
|
+
"kind": "function",
|
|
2408
|
+
"name": "EnumRadioGroupControlRendererTemplate",
|
|
2409
|
+
"parameters": [
|
|
2410
|
+
{
|
|
2411
|
+
"name": "prefix",
|
|
2412
|
+
"default": "'zero'",
|
|
2413
|
+
"type": {
|
|
2414
|
+
"text": "string"
|
|
2415
|
+
}
|
|
2416
|
+
}
|
|
2417
|
+
]
|
|
2418
|
+
},
|
|
2419
|
+
{
|
|
2420
|
+
"kind": "variable",
|
|
2421
|
+
"name": "EnumRadioGroupControlRendererEntry",
|
|
2422
|
+
"type": {
|
|
2423
|
+
"text": "RendererEntry"
|
|
2424
|
+
},
|
|
2425
|
+
"default": "{\n renderer: html<DispatchRenderer>`\n ${(x) => EnumRadioGroupControlRendererTemplate(x.prefix)}\n `,\n tester: rankWith(ENUM_RADIO_GROUP_CONTROL_RANK, optionIs('radio')),\n mapper: mapStateToControlProps,\n}",
|
|
2426
|
+
"description": "A JSON Forms renderer that renders enum options as a radio-group.\n\nActivated when the uischema element has `options.radio: true`.\nTakes precedence over other enum renderers due to its higher rank.\n\nOptions are typed via RadioGroupRendererOptions.",
|
|
2427
|
+
"privacy": "public"
|
|
2428
|
+
}
|
|
2429
|
+
],
|
|
2430
|
+
"exports": [
|
|
2431
|
+
{
|
|
2432
|
+
"kind": "js",
|
|
2433
|
+
"name": "EnumRadioGroupControlRendererTemplate",
|
|
2434
|
+
"declaration": {
|
|
2435
|
+
"name": "EnumRadioGroupControlRendererTemplate",
|
|
2436
|
+
"module": "src/jsonforms/renderers/EnumRadioGroupControlRenderer.ts"
|
|
2437
|
+
}
|
|
2438
|
+
},
|
|
2439
|
+
{
|
|
2440
|
+
"kind": "js",
|
|
2441
|
+
"name": "EnumRadioGroupControlRendererEntry",
|
|
2442
|
+
"declaration": {
|
|
2443
|
+
"name": "EnumRadioGroupControlRendererEntry",
|
|
2444
|
+
"module": "src/jsonforms/renderers/EnumRadioGroupControlRenderer.ts"
|
|
2445
|
+
}
|
|
2446
|
+
}
|
|
2447
|
+
]
|
|
2448
|
+
},
|
|
2402
2449
|
{
|
|
2403
2450
|
"kind": "javascript-module",
|
|
2404
2451
|
"path": "src/jsonforms/renderers/FilterDateControlRenderer.ts",
|
|
@@ -3163,6 +3210,22 @@
|
|
|
3163
3210
|
"text": "number"
|
|
3164
3211
|
},
|
|
3165
3212
|
"default": "5"
|
|
3213
|
+
},
|
|
3214
|
+
{
|
|
3215
|
+
"kind": "variable",
|
|
3216
|
+
"name": "ENUM_RADIO_GROUP_CONTROL_RANK",
|
|
3217
|
+
"type": {
|
|
3218
|
+
"text": "number"
|
|
3219
|
+
},
|
|
3220
|
+
"default": "10"
|
|
3221
|
+
},
|
|
3222
|
+
{
|
|
3223
|
+
"kind": "variable",
|
|
3224
|
+
"name": "SEGMENTED_CONTROL_RANK",
|
|
3225
|
+
"type": {
|
|
3226
|
+
"text": "number"
|
|
3227
|
+
},
|
|
3228
|
+
"default": "5"
|
|
3166
3229
|
}
|
|
3167
3230
|
],
|
|
3168
3231
|
"exports": [
|
|
@@ -3317,6 +3380,67 @@
|
|
|
3317
3380
|
"name": "DIVIDER_CONTROL_RANK",
|
|
3318
3381
|
"module": "src/jsonforms/renderers/RenderersRanks.ts"
|
|
3319
3382
|
}
|
|
3383
|
+
},
|
|
3384
|
+
{
|
|
3385
|
+
"kind": "js",
|
|
3386
|
+
"name": "ENUM_RADIO_GROUP_CONTROL_RANK",
|
|
3387
|
+
"declaration": {
|
|
3388
|
+
"name": "ENUM_RADIO_GROUP_CONTROL_RANK",
|
|
3389
|
+
"module": "src/jsonforms/renderers/RenderersRanks.ts"
|
|
3390
|
+
}
|
|
3391
|
+
},
|
|
3392
|
+
{
|
|
3393
|
+
"kind": "js",
|
|
3394
|
+
"name": "SEGMENTED_CONTROL_RANK",
|
|
3395
|
+
"declaration": {
|
|
3396
|
+
"name": "SEGMENTED_CONTROL_RANK",
|
|
3397
|
+
"module": "src/jsonforms/renderers/RenderersRanks.ts"
|
|
3398
|
+
}
|
|
3399
|
+
}
|
|
3400
|
+
]
|
|
3401
|
+
},
|
|
3402
|
+
{
|
|
3403
|
+
"kind": "javascript-module",
|
|
3404
|
+
"path": "src/jsonforms/renderers/SegmentedControlRenderer.ts",
|
|
3405
|
+
"declarations": [
|
|
3406
|
+
{
|
|
3407
|
+
"kind": "function",
|
|
3408
|
+
"name": "SegmentedControlRendererTemplate",
|
|
3409
|
+
"parameters": [
|
|
3410
|
+
{
|
|
3411
|
+
"name": "prefix",
|
|
3412
|
+
"default": "'zero'",
|
|
3413
|
+
"type": {
|
|
3414
|
+
"text": "string"
|
|
3415
|
+
}
|
|
3416
|
+
}
|
|
3417
|
+
]
|
|
3418
|
+
},
|
|
3419
|
+
{
|
|
3420
|
+
"kind": "variable",
|
|
3421
|
+
"name": "SegmentedControlRendererEntry",
|
|
3422
|
+
"type": {
|
|
3423
|
+
"text": "RendererEntry"
|
|
3424
|
+
},
|
|
3425
|
+
"default": "{\n renderer: html<DispatchRenderer>`\n ${(x) => SegmentedControlRendererTemplate(x.prefix)}\n `,\n tester: rankWith(SEGMENTED_CONTROL_RANK, optionIs('segmented')),\n mapper: mapStateToControlProps,\n}"
|
|
3426
|
+
}
|
|
3427
|
+
],
|
|
3428
|
+
"exports": [
|
|
3429
|
+
{
|
|
3430
|
+
"kind": "js",
|
|
3431
|
+
"name": "SegmentedControlRendererTemplate",
|
|
3432
|
+
"declaration": {
|
|
3433
|
+
"name": "SegmentedControlRendererTemplate",
|
|
3434
|
+
"module": "src/jsonforms/renderers/SegmentedControlRenderer.ts"
|
|
3435
|
+
}
|
|
3436
|
+
},
|
|
3437
|
+
{
|
|
3438
|
+
"kind": "js",
|
|
3439
|
+
"name": "SegmentedControlRendererEntry",
|
|
3440
|
+
"declaration": {
|
|
3441
|
+
"name": "SegmentedControlRendererEntry",
|
|
3442
|
+
"module": "src/jsonforms/renderers/SegmentedControlRenderer.ts"
|
|
3443
|
+
}
|
|
3320
3444
|
}
|
|
3321
3445
|
]
|
|
3322
3446
|
},
|
package/dist/dts/form.d.ts
CHANGED
|
@@ -119,7 +119,10 @@ declare const Form_base: (new (...args: any[]) => {
|
|
|
119
119
|
removeAttributeNode(attr: Attr): Attr;
|
|
120
120
|
requestFullscreen(options?: FullscreenOptions): Promise<void>;
|
|
121
121
|
requestPointerLock(options?: PointerLockOptions): Promise<void>;
|
|
122
|
-
scroll(options
|
|
122
|
+
scroll(options? /**
|
|
123
|
+
* Allows to provide set of additional renderers used by the form.
|
|
124
|
+
* @public
|
|
125
|
+
*/: ScrollToOptions): void;
|
|
123
126
|
scroll(x: number, y: number): void;
|
|
124
127
|
scrollBy(options?: ScrollToOptions): void;
|
|
125
128
|
scrollBy(x: number, y: number): void;
|
package/dist/dts/form.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../src/form.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE/D,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../src/form.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,iBAAiB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GG;IACH,OAAO,CAAC,qBAAqB,CAA0B;IAEvD;;;OAGG;IACH,OAAO,CAAC,oBAAoB,CAAuB;IAEnD;;;;OAIG;IACS,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,CAAa;IAEtE;;OAEG;IACG,OAAO;IAiEb;;;;OAIG;YACW,WAAW;IAsGzB;;;;;OAKG;IACH,OAAO,CAAC,eAAe;IAQvB;;;OAGG;IACH,sBAAsB;IAItB;;;;;OAKG;IACG,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAiDnD;;;;;;OAMG;IACH,OAAO,CAAC,oBAAoB;IAwB5B;;;OAGG;IACH,OAAO,CAAC,kBAAkB;IAU1B;;;OAGG;IACH,IAAc,cAAc,YAM3B;IAED;;OAEG;IACM,SAAS,IAAI,IAAI;IAW1B;;OAEG;IACH,UAAU,CAAC,KAAK,EAAE,WAAW;IAI7B;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,WAAW;IAe3B;;OAEG;IACH,oBAAoB;IAKpB;;;OAGG;IACH,KAAK,CAAC,SAAS,UAAO;IAQtB;;;OAGG;IACH,OAAO,CAAC,iBAAiB;IAOzB;;;OAGG;IACH,kBAAkB;IAQlB;;;OAGG;IACG,kBAAkB;IA+BxB;;;;;OAKG;IACG,qBAAqB,CAAC,KAAK,EAAE,KAAK;IAyFxC;;;OAGG;IACH,OAAO,CAAC,iBAAiB;IAMzB;;;;;OAKG;IACH,mBAAmB;CA2BpB"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { RendererEntry } from '../../types';
|
|
2
|
+
import { DispatchRenderer } from './dispatch-renderer';
|
|
3
|
+
export declare const EnumRadioGroupControlRendererTemplate: (prefix?: string) => import("@microsoft/fast-element").ViewTemplate<DispatchRenderer, any>;
|
|
4
|
+
/**
|
|
5
|
+
* A JSON Forms renderer that renders enum options as a radio-group.
|
|
6
|
+
*
|
|
7
|
+
* Activated when the uischema element has `options.radio: true`.
|
|
8
|
+
* Takes precedence over other enum renderers due to its higher rank.
|
|
9
|
+
*
|
|
10
|
+
* Options are typed via {@link RadioGroupRendererOptions}.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* {
|
|
15
|
+
* type: 'Control',
|
|
16
|
+
* scope: '#/properties/status',
|
|
17
|
+
* options: {
|
|
18
|
+
* radio: true,
|
|
19
|
+
* orientation: 'vertical',
|
|
20
|
+
* data: [
|
|
21
|
+
* { value: 'active', label: 'Active' },
|
|
22
|
+
* { value: 'inactive', label: 'Inactive' },
|
|
23
|
+
* ],
|
|
24
|
+
* },
|
|
25
|
+
* }
|
|
26
|
+
* ```
|
|
27
|
+
* @public
|
|
28
|
+
*/
|
|
29
|
+
export declare const EnumRadioGroupControlRendererEntry: RendererEntry;
|
|
30
|
+
//# sourceMappingURL=EnumRadioGroupControlRenderer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EnumRadioGroupControlRenderer.d.ts","sourceRoot":"","sources":["../../../../src/jsonforms/renderers/EnumRadioGroupControlRenderer.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAoBvD,eAAO,MAAM,qCAAqC,GAAI,SAAQ,MAAe,0EAmC1E,CAAC;AAEJ;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,kCAAkC,EAAE,aAMhD,CAAC"}
|
|
@@ -17,4 +17,6 @@ export declare const LAYOUT_FORM_GRID_RANK = 2;
|
|
|
17
17
|
export declare const MULTICOLUMN_DROPDOWN_CONTROL_RANK = 5;
|
|
18
18
|
export declare const INVISIBLE_CONTROL_RANK = 5;
|
|
19
19
|
export declare const DIVIDER_CONTROL_RANK = 5;
|
|
20
|
+
export declare const ENUM_RADIO_GROUP_CONTROL_RANK = 10;
|
|
21
|
+
export declare const SEGMENTED_CONTROL_RANK = 5;
|
|
20
22
|
//# sourceMappingURL=RenderersRanks.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RenderersRanks.d.ts","sourceRoot":"","sources":["../../../../src/jsonforms/renderers/RenderersRanks.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,IAAI,CAAC;AACrC,eAAO,MAAM,oBAAoB,IAAI,CAAC;AACtC,eAAO,MAAM,kBAAkB,IAAI,CAAC;AACpC,eAAO,MAAM,wBAAwB,IAAI,CAAC;AAC1C,eAAO,MAAM,iBAAiB,IAAI,CAAC;AACnC,eAAO,MAAM,mBAAmB,IAAI,CAAC;AACrC,eAAO,MAAM,iBAAiB,IAAI,CAAC;AACnC,eAAO,MAAM,iBAAiB,IAAI,CAAC;AACnC,eAAO,MAAM,WAAW,IAAI,CAAC;AAC7B,eAAO,MAAM,iBAAiB,IAAI,CAAC;AACnC,eAAO,MAAM,0BAA0B,IAAI,CAAC;AAC5C,eAAO,MAAM,iBAAiB,IAAI,CAAC;AACnC,eAAO,MAAM,sBAAsB,IAAI,CAAC;AACxC,eAAO,MAAM,mBAAmB,IAAI,CAAC;AACrC,eAAO,MAAM,mBAAmB,IAAI,CAAC;AACrC,eAAO,MAAM,qBAAqB,IAAI,CAAC;AACvC,eAAO,MAAM,iCAAiC,IAAI,CAAC;AACnD,eAAO,MAAM,sBAAsB,IAAI,CAAC;AACxC,eAAO,MAAM,oBAAoB,IAAI,CAAC"}
|
|
1
|
+
{"version":3,"file":"RenderersRanks.d.ts","sourceRoot":"","sources":["../../../../src/jsonforms/renderers/RenderersRanks.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,IAAI,CAAC;AACrC,eAAO,MAAM,oBAAoB,IAAI,CAAC;AACtC,eAAO,MAAM,kBAAkB,IAAI,CAAC;AACpC,eAAO,MAAM,wBAAwB,IAAI,CAAC;AAC1C,eAAO,MAAM,iBAAiB,IAAI,CAAC;AACnC,eAAO,MAAM,mBAAmB,IAAI,CAAC;AACrC,eAAO,MAAM,iBAAiB,IAAI,CAAC;AACnC,eAAO,MAAM,iBAAiB,IAAI,CAAC;AACnC,eAAO,MAAM,WAAW,IAAI,CAAC;AAC7B,eAAO,MAAM,iBAAiB,IAAI,CAAC;AACnC,eAAO,MAAM,0BAA0B,IAAI,CAAC;AAC5C,eAAO,MAAM,iBAAiB,IAAI,CAAC;AACnC,eAAO,MAAM,sBAAsB,IAAI,CAAC;AACxC,eAAO,MAAM,mBAAmB,IAAI,CAAC;AACrC,eAAO,MAAM,mBAAmB,IAAI,CAAC;AACrC,eAAO,MAAM,qBAAqB,IAAI,CAAC;AACvC,eAAO,MAAM,iCAAiC,IAAI,CAAC;AACnD,eAAO,MAAM,sBAAsB,IAAI,CAAC;AACxC,eAAO,MAAM,oBAAoB,IAAI,CAAC;AACtC,eAAO,MAAM,6BAA6B,KAAK,CAAC;AAChD,eAAO,MAAM,sBAAsB,IAAI,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { RendererEntry } from '../../types';
|
|
2
|
+
import { DispatchRenderer } from './dispatch-renderer';
|
|
3
|
+
export declare const SegmentedControlRendererTemplate: (prefix?: string) => import("@microsoft/fast-element").ViewTemplate<DispatchRenderer, any>;
|
|
4
|
+
export declare const SegmentedControlRendererEntry: RendererEntry;
|
|
5
|
+
//# sourceMappingURL=SegmentedControlRenderer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SegmentedControlRenderer.d.ts","sourceRoot":"","sources":["../../../../src/jsonforms/renderers/SegmentedControlRenderer.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAKvD,eAAO,MAAM,gCAAgC,GAAI,SAAQ,MAAe,0EAmDvE,CAAC;AAEF,eAAO,MAAM,6BAA6B,EAAE,aAM3C,CAAC"}
|
package/dist/dts/types.d.ts
CHANGED
|
@@ -353,6 +353,39 @@ export type StringRendererOptions = {
|
|
|
353
353
|
*/
|
|
354
354
|
hideAffixFromScreenReader?: boolean;
|
|
355
355
|
};
|
|
356
|
+
/**
|
|
357
|
+
* A single option item supplied to the radio group renderer.
|
|
358
|
+
* @public
|
|
359
|
+
*/
|
|
360
|
+
export type RadioOption = {
|
|
361
|
+
/** The value written to the JSON Forms data model on selection. */
|
|
362
|
+
value: string;
|
|
363
|
+
/** The human-readable label shown alongside the radio button. */
|
|
364
|
+
label: string;
|
|
365
|
+
};
|
|
366
|
+
/**
|
|
367
|
+
* Configuration options available for the enum radio-group renderer.
|
|
368
|
+
* Activated when `options.radio` is `true` on a Control element.
|
|
369
|
+
* @public
|
|
370
|
+
*/
|
|
371
|
+
export type RadioGroupRendererOptions = {
|
|
372
|
+
/**
|
|
373
|
+
* Must be `true` to activate this renderer.
|
|
374
|
+
* @public
|
|
375
|
+
*/
|
|
376
|
+
radio: true;
|
|
377
|
+
/**
|
|
378
|
+
* The list of options to render as radio buttons.
|
|
379
|
+
* @public
|
|
380
|
+
*/
|
|
381
|
+
data: RadioOption[];
|
|
382
|
+
/**
|
|
383
|
+
* Layout orientation of the radio buttons.
|
|
384
|
+
* Defaults to `'horizontal'`.
|
|
385
|
+
* @public
|
|
386
|
+
*/
|
|
387
|
+
orientation?: 'horizontal' | 'vertical';
|
|
388
|
+
};
|
|
356
389
|
/**
|
|
357
390
|
* Configuration options available for number renderer.
|
|
358
391
|
* @public
|
|
@@ -410,11 +443,35 @@ export type StandardRendererOptions = {
|
|
|
410
443
|
*/
|
|
411
444
|
tabIndex?: number;
|
|
412
445
|
};
|
|
446
|
+
/**
|
|
447
|
+
* Configuration options for the segmented control renderer.
|
|
448
|
+
* Activated when `segmented: true` is set on a UI schema element's options.
|
|
449
|
+
* @public
|
|
450
|
+
*/
|
|
451
|
+
export type SegmentedRendererOptions = StandardRendererOptions & {
|
|
452
|
+
/**
|
|
453
|
+
* Enables the segmented control renderer for this element.
|
|
454
|
+
* @public
|
|
455
|
+
*/
|
|
456
|
+
segmented: true;
|
|
457
|
+
/**
|
|
458
|
+
* The list of options to display as segmented items.
|
|
459
|
+
* Each entry must have a `value` (the data value) and a `label` (the display text).
|
|
460
|
+
* Optionally supply a `color` (any valid CSS color) to override the background of
|
|
461
|
+
* that item when it is selected. The foreground will automatically be set to white.
|
|
462
|
+
* @public
|
|
463
|
+
*/
|
|
464
|
+
data: {
|
|
465
|
+
value: string;
|
|
466
|
+
label: string;
|
|
467
|
+
color?: string;
|
|
468
|
+
}[];
|
|
469
|
+
};
|
|
413
470
|
/**
|
|
414
471
|
* All configuration options that are available.
|
|
415
472
|
* @public
|
|
416
473
|
*/
|
|
417
|
-
export type UiSchemaElementOptions = ConnectedRenderersOptions | NumberRendererOptions | ArrayRendererOptions | CategorizationRendererOptions | GroupRendererOptions | StepperRendererOptions | StringRendererOptions | StandardRendererOptions;
|
|
474
|
+
export type UiSchemaElementOptions = ConnectedRenderersOptions | NumberRendererOptions | ArrayRendererOptions | CategorizationRendererOptions | GroupRendererOptions | StepperRendererOptions | StringRendererOptions | RadioGroupRendererOptions | StandardRendererOptions | SegmentedRendererOptions;
|
|
418
475
|
/**
|
|
419
476
|
* A UiSchemaElement that displays property values in a user interface element.
|
|
420
477
|
* @public
|
package/dist/dts/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,YAAY,EACZ,mBAAmB,EACpB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAE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AAC;IACd;;OAEG;IACH,MAAM,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC/C,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;OAEG;IACH,UAAU,EAAE,qBAAqB,EAAE,CAAC;IACpC;;OAEG;IACH,MAAM,EAAE,oBAAoB,EAAE,CAAC;CAChC,CAAC"}
|
package/dist/esm/form.js
CHANGED
|
@@ -13,6 +13,7 @@ import { ConnectedSelectControlRendererEntry } from './jsonforms/renderers/Conne
|
|
|
13
13
|
import { DateControlRendererEntry } from './jsonforms/renderers/DateControlRenderer';
|
|
14
14
|
import { DividerControlRenderer } from './jsonforms/renderers/DividerRenderer';
|
|
15
15
|
import { EnumControlRendererEntry } from './jsonforms/renderers/EnumControlRenderer';
|
|
16
|
+
import { EnumRadioGroupControlRendererEntry } from './jsonforms/renderers/EnumRadioGroupControlRenderer';
|
|
16
17
|
import { InvisibleControlEntry } from './jsonforms/renderers/InvisibleControlRenderer';
|
|
17
18
|
import { LayoutArrayRendererEntry } from './jsonforms/renderers/LayoutArrayRenderer';
|
|
18
19
|
import { LayoutCategorizationRendererEntry } from './jsonforms/renderers/LayoutCategorizationRenderer';
|
|
@@ -24,6 +25,7 @@ import { LayoutStepperRendererEntry } from './jsonforms/renderers/LayoutStepperR
|
|
|
24
25
|
import { LayoutVertical2ColumnsEntry } from './jsonforms/renderers/LayoutVertical2ColumnsRenderer';
|
|
25
26
|
import { MulticolumnDropdownControlRendererEntry } from './jsonforms/renderers/MulticolumnDropdownControlRenderer';
|
|
26
27
|
import { NumberControlRendererEntry } from './jsonforms/renderers/NumberControlRenderer';
|
|
28
|
+
import { SegmentedControlRendererEntry } from './jsonforms/renderers/SegmentedControlRenderer';
|
|
27
29
|
import { StringArrayEntry } from './jsonforms/renderers/StringArrayControlRenderer';
|
|
28
30
|
import { StringControlRendererTemplate } from './jsonforms/renderers/StringControlRenderer';
|
|
29
31
|
import { downloadCsvTemplate as downloadCsvFile, extractFieldsFromUiSchema, generateCsvTemplate, logger, mapCsvToSchema, parseCsv, } from './utils';
|
|
@@ -60,11 +62,13 @@ export const renderers = [
|
|
|
60
62
|
NumberControlRendererEntry,
|
|
61
63
|
ConnectedMultiselectControlRendererEntry,
|
|
62
64
|
EnumControlRendererEntry,
|
|
65
|
+
EnumRadioGroupControlRendererEntry,
|
|
63
66
|
ConnectedSelectControlRendererEntry,
|
|
64
67
|
DateControlRendererEntry,
|
|
65
68
|
InvisibleControlEntry,
|
|
66
69
|
DividerControlRenderer,
|
|
67
70
|
MulticolumnDropdownControlRendererEntry,
|
|
71
|
+
SegmentedControlRendererEntry,
|
|
68
72
|
];
|
|
69
73
|
/**
|
|
70
74
|
* Foundation form component for automatically generated forms based on json schema
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { mapStateToControlProps, rankWith } from '@jsonforms/core';
|
|
2
|
+
import { html, repeat } from '@microsoft/fast-element';
|
|
3
|
+
import { optionIs } from '../testers/optionIs';
|
|
4
|
+
import { ENUM_RADIO_GROUP_CONTROL_RANK } from './RenderersRanks';
|
|
5
|
+
const radioGroupStyles = (prefix) => `
|
|
6
|
+
${prefix}-radio-group {
|
|
7
|
+
display: block;
|
|
8
|
+
width: 100%;
|
|
9
|
+
}
|
|
10
|
+
${prefix}-radio-group::part(positioning-region) {
|
|
11
|
+
display: flex;
|
|
12
|
+
flex-wrap: wrap;
|
|
13
|
+
align-items: center;
|
|
14
|
+
gap: calc(var(--design-unit, 4) * 3px);
|
|
15
|
+
}
|
|
16
|
+
${prefix}-radio-group[orientation="vertical"]::part(positioning-region) {
|
|
17
|
+
flex-direction: column;
|
|
18
|
+
align-items: flex-start;
|
|
19
|
+
}
|
|
20
|
+
`;
|
|
21
|
+
export const EnumRadioGroupControlRendererTemplate = (prefix = 'zero') => html `
|
|
22
|
+
<template>
|
|
23
|
+
<style>
|
|
24
|
+
${radioGroupStyles(prefix)}
|
|
25
|
+
</style>
|
|
26
|
+
<control-wrapper
|
|
27
|
+
:control=${(x) => x.control}
|
|
28
|
+
:jsonForms=${(x) => x.jsonforms}
|
|
29
|
+
:touched=${(x) => x.touched}
|
|
30
|
+
?submitted=${(x) => x.submitted}
|
|
31
|
+
prefix="${prefix}"
|
|
32
|
+
>
|
|
33
|
+
<${prefix}-radio-group
|
|
34
|
+
orientation="${(x) => { var _a, _b, _c; return (_c = (_b = (_a = x.control.uischema) === null || _a === void 0 ? void 0 : _a.options) === null || _b === void 0 ? void 0 : _b.orientation) !== null && _c !== void 0 ? _c : 'horizontal'; }}"
|
|
35
|
+
value=${(x) => { var _a; return (_a = x.control.data) !== null && _a !== void 0 ? _a : ''; }}
|
|
36
|
+
?disabled=${(x) => !x.control.enabled}
|
|
37
|
+
id=${(x) => x.control.path}
|
|
38
|
+
data-test-id=${(x) => x.control.path}
|
|
39
|
+
@change=${(x, c) => {
|
|
40
|
+
var _a;
|
|
41
|
+
const target = c.event.currentTarget;
|
|
42
|
+
const value = (_a = target.value) !== null && _a !== void 0 ? _a : '';
|
|
43
|
+
x.control.handleChange(x.control.path, value === '' ? null : value);
|
|
44
|
+
x.onBlur();
|
|
45
|
+
}}
|
|
46
|
+
>
|
|
47
|
+
${repeat((x) => { var _a, _b, _c, _d; return (_d = (_c = (_b = (_a = x.control) === null || _a === void 0 ? void 0 : _a.uischema) === null || _b === void 0 ? void 0 : _b.options) === null || _c === void 0 ? void 0 : _c.data) !== null && _d !== void 0 ? _d : []; }, html `
|
|
48
|
+
<${prefix}-radio value=${(opt) => opt.value}>${(opt) => opt.label}</${prefix}-radio>
|
|
49
|
+
`)}
|
|
50
|
+
</${prefix}-radio-group>
|
|
51
|
+
</control-wrapper>
|
|
52
|
+
</template>
|
|
53
|
+
`;
|
|
54
|
+
/**
|
|
55
|
+
* A JSON Forms renderer that renders enum options as a radio-group.
|
|
56
|
+
*
|
|
57
|
+
* Activated when the uischema element has `options.radio: true`.
|
|
58
|
+
* Takes precedence over other enum renderers due to its higher rank.
|
|
59
|
+
*
|
|
60
|
+
* Options are typed via {@link RadioGroupRendererOptions}.
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* ```ts
|
|
64
|
+
* {
|
|
65
|
+
* type: 'Control',
|
|
66
|
+
* scope: '#/properties/status',
|
|
67
|
+
* options: {
|
|
68
|
+
* radio: true,
|
|
69
|
+
* orientation: 'vertical',
|
|
70
|
+
* data: [
|
|
71
|
+
* { value: 'active', label: 'Active' },
|
|
72
|
+
* { value: 'inactive', label: 'Inactive' },
|
|
73
|
+
* ],
|
|
74
|
+
* },
|
|
75
|
+
* }
|
|
76
|
+
* ```
|
|
77
|
+
* @public
|
|
78
|
+
*/
|
|
79
|
+
export const EnumRadioGroupControlRendererEntry = {
|
|
80
|
+
renderer: html `
|
|
81
|
+
${(x) => EnumRadioGroupControlRendererTemplate(x.prefix)}
|
|
82
|
+
`,
|
|
83
|
+
tester: rankWith(ENUM_RADIO_GROUP_CONTROL_RANK, optionIs('radio')),
|
|
84
|
+
mapper: mapStateToControlProps,
|
|
85
|
+
};
|
|
@@ -17,3 +17,5 @@ export const LAYOUT_FORM_GRID_RANK = 2;
|
|
|
17
17
|
export const MULTICOLUMN_DROPDOWN_CONTROL_RANK = 5;
|
|
18
18
|
export const INVISIBLE_CONTROL_RANK = 5;
|
|
19
19
|
export const DIVIDER_CONTROL_RANK = 5;
|
|
20
|
+
export const ENUM_RADIO_GROUP_CONTROL_RANK = 10;
|
|
21
|
+
export const SEGMENTED_CONTROL_RANK = 5;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { mapStateToControlProps, rankWith } from '@jsonforms/core';
|
|
2
|
+
import { html, repeat } from '@microsoft/fast-element';
|
|
3
|
+
import { optionIs } from '../testers/optionIs';
|
|
4
|
+
import { SEGMENTED_CONTROL_RANK } from './RenderersRanks';
|
|
5
|
+
export const SegmentedControlRendererTemplate = (prefix = 'zero') => html `
|
|
6
|
+
<template>
|
|
7
|
+
<style>
|
|
8
|
+
${prefix}-segmented-control {
|
|
9
|
+
width: 100%;
|
|
10
|
+
display: block;
|
|
11
|
+
}
|
|
12
|
+
${prefix}-segmented-item {
|
|
13
|
+
flex: 1;
|
|
14
|
+
text-align: center;
|
|
15
|
+
justify-content: center;
|
|
16
|
+
}
|
|
17
|
+
${prefix}-segmented-item[aria-checked='true'],
|
|
18
|
+
${prefix}-segmented-item[aria-selected='true'] {
|
|
19
|
+
background: var(--segmented-item-selected-bg);
|
|
20
|
+
}
|
|
21
|
+
</style>
|
|
22
|
+
<control-wrapper
|
|
23
|
+
:control=${(x) => x.control}
|
|
24
|
+
:jsonForms=${(x) => x.jsonforms}
|
|
25
|
+
:touched=${(x) => x.touched}
|
|
26
|
+
?submitted=${(x) => x.submitted}
|
|
27
|
+
prefix="${prefix}"
|
|
28
|
+
>
|
|
29
|
+
<${prefix}-segmented-control
|
|
30
|
+
value=${(x) => { var _a; return (_a = x.control.data) !== null && _a !== void 0 ? _a : ''; }}
|
|
31
|
+
?disabled=${(x) => !x.control.enabled}
|
|
32
|
+
id=${(x) => x.control.path}
|
|
33
|
+
data-test-id=${(x) => x.control.path}
|
|
34
|
+
@change=${(x, c) => {
|
|
35
|
+
x.control.handleChange(x.control.path, c.event.target.value);
|
|
36
|
+
x.onBlur();
|
|
37
|
+
}}
|
|
38
|
+
>
|
|
39
|
+
${repeat((x) => { var _a, _b, _c; return (_c = (_b = (_a = x.control.uischema) === null || _a === void 0 ? void 0 : _a.options) === null || _b === void 0 ? void 0 : _b.data) !== null && _c !== void 0 ? _c : []; }, html `
|
|
40
|
+
<${prefix}-segmented-item
|
|
41
|
+
value=${(x) => x.value}
|
|
42
|
+
style=${(x) => { var _a; return `--segmented-item-selected-bg: ${(_a = x.color) !== null && _a !== void 0 ? _a : 'var(--neutral-fill-rest)'}`; }}
|
|
43
|
+
>
|
|
44
|
+
${(x) => x.label}
|
|
45
|
+
</${prefix}-segmented-item>
|
|
46
|
+
`)}
|
|
47
|
+
</${prefix}-segmented-control>
|
|
48
|
+
</control-wrapper>
|
|
49
|
+
</template>
|
|
50
|
+
`;
|
|
51
|
+
export const SegmentedControlRendererEntry = {
|
|
52
|
+
renderer: html `
|
|
53
|
+
${(x) => SegmentedControlRendererTemplate(x.prefix)}
|
|
54
|
+
`,
|
|
55
|
+
tester: rankWith(SEGMENTED_CONTROL_RANK, optionIs('segmented')),
|
|
56
|
+
mapper: mapStateToControlProps,
|
|
57
|
+
};
|
|
@@ -2784,6 +2784,67 @@
|
|
|
2784
2784
|
],
|
|
2785
2785
|
"name": "parseCsv"
|
|
2786
2786
|
},
|
|
2787
|
+
{
|
|
2788
|
+
"kind": "TypeAlias",
|
|
2789
|
+
"canonicalReference": "@genesislcap/foundation-forms!RadioGroupRendererOptions:type",
|
|
2790
|
+
"docComment": "/**\n * Configuration options available for the enum radio-group renderer. Activated when `options.radio` is `true` on a Control element.\n *\n * @public\n */\n",
|
|
2791
|
+
"excerptTokens": [
|
|
2792
|
+
{
|
|
2793
|
+
"kind": "Content",
|
|
2794
|
+
"text": "export type RadioGroupRendererOptions = "
|
|
2795
|
+
},
|
|
2796
|
+
{
|
|
2797
|
+
"kind": "Content",
|
|
2798
|
+
"text": "{\n radio: true;\n data: "
|
|
2799
|
+
},
|
|
2800
|
+
{
|
|
2801
|
+
"kind": "Reference",
|
|
2802
|
+
"text": "RadioOption",
|
|
2803
|
+
"canonicalReference": "@genesislcap/foundation-forms!RadioOption:type"
|
|
2804
|
+
},
|
|
2805
|
+
{
|
|
2806
|
+
"kind": "Content",
|
|
2807
|
+
"text": "[];\n orientation?: 'horizontal' | 'vertical';\n}"
|
|
2808
|
+
},
|
|
2809
|
+
{
|
|
2810
|
+
"kind": "Content",
|
|
2811
|
+
"text": ";"
|
|
2812
|
+
}
|
|
2813
|
+
],
|
|
2814
|
+
"fileUrlPath": "src/types.ts",
|
|
2815
|
+
"releaseTag": "Public",
|
|
2816
|
+
"name": "RadioGroupRendererOptions",
|
|
2817
|
+
"typeTokenRange": {
|
|
2818
|
+
"startIndex": 1,
|
|
2819
|
+
"endIndex": 4
|
|
2820
|
+
}
|
|
2821
|
+
},
|
|
2822
|
+
{
|
|
2823
|
+
"kind": "TypeAlias",
|
|
2824
|
+
"canonicalReference": "@genesislcap/foundation-forms!RadioOption:type",
|
|
2825
|
+
"docComment": "/**\n * A single option item supplied to the radio group renderer.\n *\n * @public\n */\n",
|
|
2826
|
+
"excerptTokens": [
|
|
2827
|
+
{
|
|
2828
|
+
"kind": "Content",
|
|
2829
|
+
"text": "export type RadioOption = "
|
|
2830
|
+
},
|
|
2831
|
+
{
|
|
2832
|
+
"kind": "Content",
|
|
2833
|
+
"text": "{\n value: string;\n label: string;\n}"
|
|
2834
|
+
},
|
|
2835
|
+
{
|
|
2836
|
+
"kind": "Content",
|
|
2837
|
+
"text": ";"
|
|
2838
|
+
}
|
|
2839
|
+
],
|
|
2840
|
+
"fileUrlPath": "src/types.ts",
|
|
2841
|
+
"releaseTag": "Public",
|
|
2842
|
+
"name": "RadioOption",
|
|
2843
|
+
"typeTokenRange": {
|
|
2844
|
+
"startIndex": 1,
|
|
2845
|
+
"endIndex": 2
|
|
2846
|
+
}
|
|
2847
|
+
},
|
|
2787
2848
|
{
|
|
2788
2849
|
"kind": "TypeAlias",
|
|
2789
2850
|
"canonicalReference": "@genesislcap/foundation-forms!RendererEntry:type",
|
|
@@ -2887,6 +2948,37 @@
|
|
|
2887
2948
|
"endIndex": 2
|
|
2888
2949
|
}
|
|
2889
2950
|
},
|
|
2951
|
+
{
|
|
2952
|
+
"kind": "TypeAlias",
|
|
2953
|
+
"canonicalReference": "@genesislcap/foundation-forms!SegmentedRendererOptions:type",
|
|
2954
|
+
"docComment": "/**\n * Configuration options for the segmented control renderer. Activated when `segmented: true` is set on a UI schema element's options.\n *\n * @public\n */\n",
|
|
2955
|
+
"excerptTokens": [
|
|
2956
|
+
{
|
|
2957
|
+
"kind": "Content",
|
|
2958
|
+
"text": "export type SegmentedRendererOptions = "
|
|
2959
|
+
},
|
|
2960
|
+
{
|
|
2961
|
+
"kind": "Reference",
|
|
2962
|
+
"text": "StandardRendererOptions",
|
|
2963
|
+
"canonicalReference": "@genesislcap/foundation-forms!StandardRendererOptions:type"
|
|
2964
|
+
},
|
|
2965
|
+
{
|
|
2966
|
+
"kind": "Content",
|
|
2967
|
+
"text": " & {\n segmented: true;\n data: {\n value: string;\n label: string;\n color?: string;\n }[];\n}"
|
|
2968
|
+
},
|
|
2969
|
+
{
|
|
2970
|
+
"kind": "Content",
|
|
2971
|
+
"text": ";"
|
|
2972
|
+
}
|
|
2973
|
+
],
|
|
2974
|
+
"fileUrlPath": "src/types.ts",
|
|
2975
|
+
"releaseTag": "Public",
|
|
2976
|
+
"name": "SegmentedRendererOptions",
|
|
2977
|
+
"typeTokenRange": {
|
|
2978
|
+
"startIndex": 1,
|
|
2979
|
+
"endIndex": 3
|
|
2980
|
+
}
|
|
2981
|
+
},
|
|
2890
2982
|
{
|
|
2891
2983
|
"kind": "TypeAlias",
|
|
2892
2984
|
"canonicalReference": "@genesislcap/foundation-forms!StandardRendererOptions:type",
|
|
@@ -3214,11 +3306,29 @@
|
|
|
3214
3306
|
"kind": "Content",
|
|
3215
3307
|
"text": " | "
|
|
3216
3308
|
},
|
|
3309
|
+
{
|
|
3310
|
+
"kind": "Reference",
|
|
3311
|
+
"text": "RadioGroupRendererOptions",
|
|
3312
|
+
"canonicalReference": "@genesislcap/foundation-forms!RadioGroupRendererOptions:type"
|
|
3313
|
+
},
|
|
3314
|
+
{
|
|
3315
|
+
"kind": "Content",
|
|
3316
|
+
"text": " | "
|
|
3317
|
+
},
|
|
3217
3318
|
{
|
|
3218
3319
|
"kind": "Reference",
|
|
3219
3320
|
"text": "StandardRendererOptions",
|
|
3220
3321
|
"canonicalReference": "@genesislcap/foundation-forms!StandardRendererOptions:type"
|
|
3221
3322
|
},
|
|
3323
|
+
{
|
|
3324
|
+
"kind": "Content",
|
|
3325
|
+
"text": " | "
|
|
3326
|
+
},
|
|
3327
|
+
{
|
|
3328
|
+
"kind": "Reference",
|
|
3329
|
+
"text": "SegmentedRendererOptions",
|
|
3330
|
+
"canonicalReference": "@genesislcap/foundation-forms!SegmentedRendererOptions:type"
|
|
3331
|
+
},
|
|
3222
3332
|
{
|
|
3223
3333
|
"kind": "Content",
|
|
3224
3334
|
"text": ";"
|
|
@@ -3229,7 +3339,7 @@
|
|
|
3229
3339
|
"name": "UiSchemaElementOptions",
|
|
3230
3340
|
"typeTokenRange": {
|
|
3231
3341
|
"startIndex": 1,
|
|
3232
|
-
"endIndex":
|
|
3342
|
+
"endIndex": 20
|
|
3233
3343
|
}
|
|
3234
3344
|
},
|
|
3235
3345
|
{
|
|
@@ -1322,7 +1322,10 @@ declare const Form_base: (new (...args: any[]) => {
|
|
|
1322
1322
|
removeAttributeNode(attr: Attr): Attr;
|
|
1323
1323
|
requestFullscreen(options?: FullscreenOptions): Promise<void>;
|
|
1324
1324
|
requestPointerLock(options?: PointerLockOptions): Promise<void>;
|
|
1325
|
-
scroll(options
|
|
1325
|
+
scroll(options? /**
|
|
1326
|
+
* Allows to provide set of additional renderers used by the form.
|
|
1327
|
+
* @public
|
|
1328
|
+
*/: ScrollToOptions): void;
|
|
1326
1329
|
scroll(x: number, y: number): void;
|
|
1327
1330
|
scrollBy(options?: ScrollToOptions): void;
|
|
1328
1331
|
scrollBy(x: number, y: number): void;
|
|
@@ -1806,6 +1809,41 @@ export declare type NumberRendererOptions = {
|
|
|
1806
1809
|
*/
|
|
1807
1810
|
export declare function parseCsv(content: string): CsvParseResult;
|
|
1808
1811
|
|
|
1812
|
+
/**
|
|
1813
|
+
* Configuration options available for the enum radio-group renderer.
|
|
1814
|
+
* Activated when `options.radio` is `true` on a Control element.
|
|
1815
|
+
* @public
|
|
1816
|
+
*/
|
|
1817
|
+
export declare type RadioGroupRendererOptions = {
|
|
1818
|
+
/**
|
|
1819
|
+
* Must be `true` to activate this renderer.
|
|
1820
|
+
* @public
|
|
1821
|
+
*/
|
|
1822
|
+
radio: true;
|
|
1823
|
+
/**
|
|
1824
|
+
* The list of options to render as radio buttons.
|
|
1825
|
+
* @public
|
|
1826
|
+
*/
|
|
1827
|
+
data: RadioOption[];
|
|
1828
|
+
/**
|
|
1829
|
+
* Layout orientation of the radio buttons.
|
|
1830
|
+
* Defaults to `'horizontal'`.
|
|
1831
|
+
* @public
|
|
1832
|
+
*/
|
|
1833
|
+
orientation?: 'horizontal' | 'vertical';
|
|
1834
|
+
};
|
|
1835
|
+
|
|
1836
|
+
/**
|
|
1837
|
+
* A single option item supplied to the radio group renderer.
|
|
1838
|
+
* @public
|
|
1839
|
+
*/
|
|
1840
|
+
export declare type RadioOption = {
|
|
1841
|
+
/** The value written to the JSON Forms data model on selection. */
|
|
1842
|
+
value: string;
|
|
1843
|
+
/** The human-readable label shown alongside the radio button. */
|
|
1844
|
+
label: string;
|
|
1845
|
+
};
|
|
1846
|
+
|
|
1809
1847
|
/**
|
|
1810
1848
|
* Defines a renderer configuration in JSON forms.
|
|
1811
1849
|
* Allows to specify the renderer component,
|
|
@@ -1840,6 +1878,31 @@ declare type Rule = {
|
|
|
1840
1878
|
effect: RuleEffect;
|
|
1841
1879
|
};
|
|
1842
1880
|
|
|
1881
|
+
/**
|
|
1882
|
+
* Configuration options for the segmented control renderer.
|
|
1883
|
+
* Activated when `segmented: true` is set on a UI schema element's options.
|
|
1884
|
+
* @public
|
|
1885
|
+
*/
|
|
1886
|
+
export declare type SegmentedRendererOptions = StandardRendererOptions & {
|
|
1887
|
+
/**
|
|
1888
|
+
* Enables the segmented control renderer for this element.
|
|
1889
|
+
* @public
|
|
1890
|
+
*/
|
|
1891
|
+
segmented: true;
|
|
1892
|
+
/**
|
|
1893
|
+
* The list of options to display as segmented items.
|
|
1894
|
+
* Each entry must have a `value` (the data value) and a `label` (the display text).
|
|
1895
|
+
* Optionally supply a `color` (any valid CSS color) to override the background of
|
|
1896
|
+
* that item when it is selected. The foreground will automatically be set to white.
|
|
1897
|
+
* @public
|
|
1898
|
+
*/
|
|
1899
|
+
data: {
|
|
1900
|
+
value: string;
|
|
1901
|
+
label: string;
|
|
1902
|
+
color?: string;
|
|
1903
|
+
}[];
|
|
1904
|
+
};
|
|
1905
|
+
|
|
1843
1906
|
/**
|
|
1844
1907
|
* Standard configuration options available for all renderers.
|
|
1845
1908
|
* @public
|
|
@@ -2004,7 +2067,7 @@ export declare type UiSchemaElement = {
|
|
|
2004
2067
|
* All configuration options that are available.
|
|
2005
2068
|
* @public
|
|
2006
2069
|
*/
|
|
2007
|
-
export declare type UiSchemaElementOptions = ConnectedRenderersOptions | NumberRendererOptions | ArrayRendererOptions | CategorizationRendererOptions | GroupRendererOptions | StepperRendererOptions | StringRendererOptions | StandardRendererOptions;
|
|
2070
|
+
export declare type UiSchemaElementOptions = ConnectedRenderersOptions | NumberRendererOptions | ArrayRendererOptions | CategorizationRendererOptions | GroupRendererOptions | StepperRendererOptions | StringRendererOptions | RadioGroupRendererOptions | StandardRendererOptions | SegmentedRendererOptions;
|
|
2008
2071
|
|
|
2009
2072
|
/**
|
|
2010
2073
|
* The layouts and control types, which allow you to customize the arrangement of forms.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@genesislcap/foundation-forms",
|
|
3
3
|
"description": "Genesis Foundation Forms",
|
|
4
|
-
"version": "14.
|
|
4
|
+
"version": "14.414.0",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"license": "SEE LICENSE IN license.txt",
|
|
7
7
|
"main": "dist/esm/index.js",
|
|
@@ -50,23 +50,23 @@
|
|
|
50
50
|
}
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@genesislcap/foundation-testing": "14.
|
|
54
|
-
"@genesislcap/genx": "14.
|
|
55
|
-
"@genesislcap/rollup-builder": "14.
|
|
56
|
-
"@genesislcap/ts-builder": "14.
|
|
57
|
-
"@genesislcap/uvu-playwright-builder": "14.
|
|
58
|
-
"@genesislcap/vite-builder": "14.
|
|
59
|
-
"@genesislcap/webpack-builder": "14.
|
|
53
|
+
"@genesislcap/foundation-testing": "14.414.0",
|
|
54
|
+
"@genesislcap/genx": "14.414.0",
|
|
55
|
+
"@genesislcap/rollup-builder": "14.414.0",
|
|
56
|
+
"@genesislcap/ts-builder": "14.414.0",
|
|
57
|
+
"@genesislcap/uvu-playwright-builder": "14.414.0",
|
|
58
|
+
"@genesislcap/vite-builder": "14.414.0",
|
|
59
|
+
"@genesislcap/webpack-builder": "14.414.0",
|
|
60
60
|
"@types/json-schema": "^7.0.11",
|
|
61
61
|
"@types/papaparse": "^5.3.14"
|
|
62
62
|
},
|
|
63
63
|
"dependencies": {
|
|
64
|
-
"@genesislcap/foundation-comms": "14.
|
|
65
|
-
"@genesislcap/foundation-criteria": "14.
|
|
66
|
-
"@genesislcap/foundation-logger": "14.
|
|
67
|
-
"@genesislcap/foundation-notifications": "14.
|
|
68
|
-
"@genesislcap/foundation-ui": "14.
|
|
69
|
-
"@genesislcap/foundation-utils": "14.
|
|
64
|
+
"@genesislcap/foundation-comms": "14.414.0",
|
|
65
|
+
"@genesislcap/foundation-criteria": "14.414.0",
|
|
66
|
+
"@genesislcap/foundation-logger": "14.414.0",
|
|
67
|
+
"@genesislcap/foundation-notifications": "14.414.0",
|
|
68
|
+
"@genesislcap/foundation-ui": "14.414.0",
|
|
69
|
+
"@genesislcap/foundation-utils": "14.414.0",
|
|
70
70
|
"@json-schema-tools/dereferencer": "^1.6.1",
|
|
71
71
|
"@jsonforms/core": "^3.2.1",
|
|
72
72
|
"@microsoft/fast-components": "2.30.6",
|
|
@@ -88,5 +88,5 @@
|
|
|
88
88
|
"access": "public"
|
|
89
89
|
},
|
|
90
90
|
"customElements": "dist/custom-elements.json",
|
|
91
|
-
"gitHead": "
|
|
91
|
+
"gitHead": "1773c265a5c49119bbf46847678b3eb155f67eb6"
|
|
92
92
|
}
|