@genesislcap/foundation-forms 14.412.0 → 14.413.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.
@@ -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]",
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]",
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,14 @@
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"
3166
3221
  }
3167
3222
  ],
3168
3223
  "exports": [
@@ -3317,6 +3372,14 @@
3317
3372
  "name": "DIVIDER_CONTROL_RANK",
3318
3373
  "module": "src/jsonforms/renderers/RenderersRanks.ts"
3319
3374
  }
3375
+ },
3376
+ {
3377
+ "kind": "js",
3378
+ "name": "ENUM_RADIO_GROUP_CONTROL_RANK",
3379
+ "declaration": {
3380
+ "name": "ENUM_RADIO_GROUP_CONTROL_RANK",
3381
+ "module": "src/jsonforms/renderers/RenderersRanks.ts"
3382
+ }
3320
3383
  }
3321
3384
  ]
3322
3385
  },
@@ -350,7 +350,9 @@ declare const Form_base: (new (...args: any[]) => {
350
350
  onsuspend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
351
351
  ontimeupdate: ((this: GlobalEventHandlers, ev: Event) => any) | null;
352
352
  ontoggle: ((this: GlobalEventHandlers, ev: ToggleEvent) => any) | null;
353
- ontouchcancel?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
353
+ ontouchcancel? /**
354
+ * @internal
355
+ */: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
354
356
  ontouchend?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
355
357
  ontouchmove?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
356
358
  ontouchstart?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
@@ -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;AAuB1C,OAAO,EAAE,aAAa,EAAmC,aAAa,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAyBlG;;;GAGG;AACH,eAAO,MAAM,SAAS,OAqBrB,CAAC;;;;;;;kBAnCQ,CAAC;;;;;;;;8BA2DW,CAAC,cAAe,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBAwBK,CAAC;4IAQxB,CAAC;wFAE2C,CAAC;+IAS5D,CAAC;2FAIkB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAwCe,CAAC;;;;;;;;;;;;;;;;;;;;;;;mBA2ET,CAAC;;;;;;;;;;;;;6BAgCc,CAAC;8BAK5C,CAAD;kBAGiB,CAAA;;oBAA8F,CAAC;;sBAC5B,CAAC;oBACnF,CAAC;;;;;;;;gDASqC,CAAC;;;;;;;;;;;;;;;;;;uBAgCzC,CAAH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;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,5 @@ 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;
20
21
  //# 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"}
@@ -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
@@ -414,7 +447,7 @@ export type StandardRendererOptions = {
414
447
  * All configuration options that are available.
415
448
  * @public
416
449
  */
417
- export type UiSchemaElementOptions = ConnectedRenderersOptions | NumberRendererOptions | ArrayRendererOptions | CategorizationRendererOptions | GroupRendererOptions | StepperRendererOptions | StringRendererOptions | StandardRendererOptions;
450
+ export type UiSchemaElementOptions = ConnectedRenderersOptions | NumberRendererOptions | ArrayRendererOptions | CategorizationRendererOptions | GroupRendererOptions | StepperRendererOptions | StringRendererOptions | RadioGroupRendererOptions | StandardRendererOptions;
418
451
  /**
419
452
  * A UiSchemaElement that displays property values in a user interface element.
420
453
  * @public
@@ -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,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,KAAK,CAAC;AAClC,OAAO,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AAE3E,YAAY,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAE/D;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAC3B,SAAS,GACT,gBAAgB,GAChB,wBAAwB,GACxB,gBAAgB,GAChB,gBAAgB,GAChB,OAAO,GACP,SAAS,GACT,kBAAkB,CAAC;AAEvB;;;GAGG;AACH,MAAM,MAAM,sBAAsB,GAAG,UAAU,GAAG,YAAY,CAAC;AAE/D;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG,KAAK,G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,EAAE,MAAM,CAAC;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';
@@ -60,6 +61,7 @@ export const renderers = [
60
61
  NumberControlRendererEntry,
61
62
  ConnectedMultiselectControlRendererEntry,
62
63
  EnumControlRendererEntry,
64
+ EnumRadioGroupControlRendererEntry,
63
65
  ConnectedSelectControlRendererEntry,
64
66
  DateControlRendererEntry,
65
67
  InvisibleControlEntry,
@@ -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,4 @@ 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;
@@ -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",
@@ -3214,6 +3275,15 @@
3214
3275
  "kind": "Content",
3215
3276
  "text": " | "
3216
3277
  },
3278
+ {
3279
+ "kind": "Reference",
3280
+ "text": "RadioGroupRendererOptions",
3281
+ "canonicalReference": "@genesislcap/foundation-forms!RadioGroupRendererOptions:type"
3282
+ },
3283
+ {
3284
+ "kind": "Content",
3285
+ "text": " | "
3286
+ },
3217
3287
  {
3218
3288
  "kind": "Reference",
3219
3289
  "text": "StandardRendererOptions",
@@ -3229,7 +3299,7 @@
3229
3299
  "name": "UiSchemaElementOptions",
3230
3300
  "typeTokenRange": {
3231
3301
  "startIndex": 1,
3232
- "endIndex": 16
3302
+ "endIndex": 18
3233
3303
  }
3234
3304
  },
3235
3305
  {
@@ -1553,7 +1553,9 @@ declare const Form_base: (new (...args: any[]) => {
1553
1553
  onsuspend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
1554
1554
  ontimeupdate: ((this: GlobalEventHandlers, ev: Event) => any) | null;
1555
1555
  ontoggle: ((this: GlobalEventHandlers, ev: ToggleEvent) => any) | null;
1556
- ontouchcancel?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
1556
+ ontouchcancel? /**
1557
+ * @internal
1558
+ */: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
1557
1559
  ontouchend?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
1558
1560
  ontouchmove?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
1559
1561
  ontouchstart?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
@@ -1806,6 +1808,41 @@ export declare type NumberRendererOptions = {
1806
1808
  */
1807
1809
  export declare function parseCsv(content: string): CsvParseResult;
1808
1810
 
1811
+ /**
1812
+ * Configuration options available for the enum radio-group renderer.
1813
+ * Activated when `options.radio` is `true` on a Control element.
1814
+ * @public
1815
+ */
1816
+ export declare type RadioGroupRendererOptions = {
1817
+ /**
1818
+ * Must be `true` to activate this renderer.
1819
+ * @public
1820
+ */
1821
+ radio: true;
1822
+ /**
1823
+ * The list of options to render as radio buttons.
1824
+ * @public
1825
+ */
1826
+ data: RadioOption[];
1827
+ /**
1828
+ * Layout orientation of the radio buttons.
1829
+ * Defaults to `'horizontal'`.
1830
+ * @public
1831
+ */
1832
+ orientation?: 'horizontal' | 'vertical';
1833
+ };
1834
+
1835
+ /**
1836
+ * A single option item supplied to the radio group renderer.
1837
+ * @public
1838
+ */
1839
+ export declare type RadioOption = {
1840
+ /** The value written to the JSON Forms data model on selection. */
1841
+ value: string;
1842
+ /** The human-readable label shown alongside the radio button. */
1843
+ label: string;
1844
+ };
1845
+
1809
1846
  /**
1810
1847
  * Defines a renderer configuration in JSON forms.
1811
1848
  * Allows to specify the renderer component,
@@ -2004,7 +2041,7 @@ export declare type UiSchemaElement = {
2004
2041
  * All configuration options that are available.
2005
2042
  * @public
2006
2043
  */
2007
- export declare type UiSchemaElementOptions = ConnectedRenderersOptions | NumberRendererOptions | ArrayRendererOptions | CategorizationRendererOptions | GroupRendererOptions | StepperRendererOptions | StringRendererOptions | StandardRendererOptions;
2044
+ export declare type UiSchemaElementOptions = ConnectedRenderersOptions | NumberRendererOptions | ArrayRendererOptions | CategorizationRendererOptions | GroupRendererOptions | StepperRendererOptions | StringRendererOptions | RadioGroupRendererOptions | StandardRendererOptions;
2008
2045
 
2009
2046
  /**
2010
2047
  * 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.412.0",
4
+ "version": "14.413.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.412.0",
54
- "@genesislcap/genx": "14.412.0",
55
- "@genesislcap/rollup-builder": "14.412.0",
56
- "@genesislcap/ts-builder": "14.412.0",
57
- "@genesislcap/uvu-playwright-builder": "14.412.0",
58
- "@genesislcap/vite-builder": "14.412.0",
59
- "@genesislcap/webpack-builder": "14.412.0",
53
+ "@genesislcap/foundation-testing": "14.413.0",
54
+ "@genesislcap/genx": "14.413.0",
55
+ "@genesislcap/rollup-builder": "14.413.0",
56
+ "@genesislcap/ts-builder": "14.413.0",
57
+ "@genesislcap/uvu-playwright-builder": "14.413.0",
58
+ "@genesislcap/vite-builder": "14.413.0",
59
+ "@genesislcap/webpack-builder": "14.413.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.412.0",
65
- "@genesislcap/foundation-criteria": "14.412.0",
66
- "@genesislcap/foundation-logger": "14.412.0",
67
- "@genesislcap/foundation-notifications": "14.412.0",
68
- "@genesislcap/foundation-ui": "14.412.0",
69
- "@genesislcap/foundation-utils": "14.412.0",
64
+ "@genesislcap/foundation-comms": "14.413.0",
65
+ "@genesislcap/foundation-criteria": "14.413.0",
66
+ "@genesislcap/foundation-logger": "14.413.0",
67
+ "@genesislcap/foundation-notifications": "14.413.0",
68
+ "@genesislcap/foundation-ui": "14.413.0",
69
+ "@genesislcap/foundation-utils": "14.413.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": "b759370097c295bea2a87d6f3a132ec6dba807ca"
91
+ "gitHead": "63a1d5ed29bdffacfde372a0f5a1fca715bfbb51"
92
92
  }