@genesislcap/foundation-forms 14.413.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.
@@ -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 EnumRadioGroupControlRendererEntry,\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 EnumRadioGroupControlRendererEntry,\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
  },
@@ -3218,6 +3218,14 @@
3218
3218
  "text": "number"
3219
3219
  },
3220
3220
  "default": "10"
3221
+ },
3222
+ {
3223
+ "kind": "variable",
3224
+ "name": "SEGMENTED_CONTROL_RANK",
3225
+ "type": {
3226
+ "text": "number"
3227
+ },
3228
+ "default": "5"
3221
3229
  }
3222
3230
  ],
3223
3231
  "exports": [
@@ -3380,6 +3388,59 @@
3380
3388
  "name": "ENUM_RADIO_GROUP_CONTROL_RANK",
3381
3389
  "module": "src/jsonforms/renderers/RenderersRanks.ts"
3382
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
+ }
3383
3444
  }
3384
3445
  ]
3385
3446
  },
@@ -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?: ScrollToOptions): void;
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;
@@ -350,9 +353,7 @@ declare const Form_base: (new (...args: any[]) => {
350
353
  onsuspend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
351
354
  ontimeupdate: ((this: GlobalEventHandlers, ev: Event) => any) | null;
352
355
  ontoggle: ((this: GlobalEventHandlers, ev: ToggleEvent) => any) | null;
353
- ontouchcancel? /**
354
- * @internal
355
- */: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
356
+ ontouchcancel?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
356
357
  ontouchend?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
357
358
  ontouchmove?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
358
359
  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;AAwB1C,OAAO,EAAE,aAAa,EAAmC,aAAa,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAyBlG;;;GAGG;AACH,eAAO,MAAM,SAAS,OAsBrB,CAAC;;;;;;;kBAxC4D,CAAC;;;;;;;;8BA2DZ,CAAC,cAC/C,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBAwBe,CAAC;4IAMb,CAAR;wFAMa,CAAC;+IAIN,CAAP;2FAMsE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BA2CzD,CAAC;;;;;;;;;;;;;;;;;;;;;;;mBAwEP,CAAC;;;;;;;;;;;;;6BAgCR,CAAA;8BAE6D,CAAC;kBAG5B,CAAC;;oBAKvB,CAAC;;sBAGsD,CAAC;oBAC5D,CAAC;;;;;;;;gDAMqD,C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IAQlB;;;OAGG;IACG,kBAAkB;IA+BxB;;;;;OAKG;IACG,qBAAqB,CAAC,KAAK,EAAE,KAAK;IAyFxC;;;OAGG;IACH,OAAO,CAAC,iBAAiB;IAMzB;;;;;OAKG;IACH,mBAAmB;CA2BpB"}
@@ -18,4 +18,5 @@ 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
20
  export declare const ENUM_RADIO_GROUP_CONTROL_RANK = 10;
21
+ export declare const SEGMENTED_CONTROL_RANK = 5;
21
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;AACtC,eAAO,MAAM,6BAA6B,KAAK,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"}
@@ -443,11 +443,35 @@ export type StandardRendererOptions = {
443
443
  */
444
444
  tabIndex?: number;
445
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
+ };
446
470
  /**
447
471
  * All configuration options that are available.
448
472
  * @public
449
473
  */
450
- export type UiSchemaElementOptions = ConnectedRenderersOptions | NumberRendererOptions | ArrayRendererOptions | CategorizationRendererOptions | GroupRendererOptions | StepperRendererOptions | StringRendererOptions | RadioGroupRendererOptions | StandardRendererOptions;
474
+ export type UiSchemaElementOptions = ConnectedRenderersOptions | NumberRendererOptions | ArrayRendererOptions | CategorizationRendererOptions | GroupRendererOptions | StepperRendererOptions | StringRendererOptions | RadioGroupRendererOptions | StandardRendererOptions | SegmentedRendererOptions;
451
475
  /**
452
476
  * A UiSchemaElement that displays property values in a user interface element.
453
477
  * @public
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","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ACV;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,QAAQ,EAAE,GAAG,CAAC;CACf,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC;;OAEG;IACH,IAAI,EAAE,GAAG,CAAC;IACV;;OAEG;IACH,KAAK,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
@@ -25,6 +25,7 @@ import { LayoutStepperRendererEntry } from './jsonforms/renderers/LayoutStepperR
25
25
  import { LayoutVertical2ColumnsEntry } from './jsonforms/renderers/LayoutVertical2ColumnsRenderer';
26
26
  import { MulticolumnDropdownControlRendererEntry } from './jsonforms/renderers/MulticolumnDropdownControlRenderer';
27
27
  import { NumberControlRendererEntry } from './jsonforms/renderers/NumberControlRenderer';
28
+ import { SegmentedControlRendererEntry } from './jsonforms/renderers/SegmentedControlRenderer';
28
29
  import { StringArrayEntry } from './jsonforms/renderers/StringArrayControlRenderer';
29
30
  import { StringControlRendererTemplate } from './jsonforms/renderers/StringControlRenderer';
30
31
  import { downloadCsvTemplate as downloadCsvFile, extractFieldsFromUiSchema, generateCsvTemplate, logger, mapCsvToSchema, parseCsv, } from './utils';
@@ -67,6 +68,7 @@ export const renderers = [
67
68
  InvisibleControlEntry,
68
69
  DividerControlRenderer,
69
70
  MulticolumnDropdownControlRendererEntry,
71
+ SegmentedControlRendererEntry,
70
72
  ];
71
73
  /**
72
74
  * Foundation form component for automatically generated forms based on json schema
@@ -18,3 +18,4 @@ export const MULTICOLUMN_DROPDOWN_CONTROL_RANK = 5;
18
18
  export const INVISIBLE_CONTROL_RANK = 5;
19
19
  export const DIVIDER_CONTROL_RANK = 5;
20
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
+ };
@@ -2948,6 +2948,37 @@
2948
2948
  "endIndex": 2
2949
2949
  }
2950
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
+ },
2951
2982
  {
2952
2983
  "kind": "TypeAlias",
2953
2984
  "canonicalReference": "@genesislcap/foundation-forms!StandardRendererOptions:type",
@@ -3289,6 +3320,15 @@
3289
3320
  "text": "StandardRendererOptions",
3290
3321
  "canonicalReference": "@genesislcap/foundation-forms!StandardRendererOptions:type"
3291
3322
  },
3323
+ {
3324
+ "kind": "Content",
3325
+ "text": " | "
3326
+ },
3327
+ {
3328
+ "kind": "Reference",
3329
+ "text": "SegmentedRendererOptions",
3330
+ "canonicalReference": "@genesislcap/foundation-forms!SegmentedRendererOptions:type"
3331
+ },
3292
3332
  {
3293
3333
  "kind": "Content",
3294
3334
  "text": ";"
@@ -3299,7 +3339,7 @@
3299
3339
  "name": "UiSchemaElementOptions",
3300
3340
  "typeTokenRange": {
3301
3341
  "startIndex": 1,
3302
- "endIndex": 18
3342
+ "endIndex": 20
3303
3343
  }
3304
3344
  },
3305
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?: ScrollToOptions): void;
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;
@@ -1553,9 +1556,7 @@ declare const Form_base: (new (...args: any[]) => {
1553
1556
  onsuspend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
1554
1557
  ontimeupdate: ((this: GlobalEventHandlers, ev: Event) => any) | null;
1555
1558
  ontoggle: ((this: GlobalEventHandlers, ev: ToggleEvent) => any) | null;
1556
- ontouchcancel? /**
1557
- * @internal
1558
- */: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
1559
+ ontouchcancel?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
1559
1560
  ontouchend?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
1560
1561
  ontouchmove?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
1561
1562
  ontouchstart?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
@@ -1877,6 +1878,31 @@ declare type Rule = {
1877
1878
  effect: RuleEffect;
1878
1879
  };
1879
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
+
1880
1906
  /**
1881
1907
  * Standard configuration options available for all renderers.
1882
1908
  * @public
@@ -2041,7 +2067,7 @@ export declare type UiSchemaElement = {
2041
2067
  * All configuration options that are available.
2042
2068
  * @public
2043
2069
  */
2044
- export declare type UiSchemaElementOptions = ConnectedRenderersOptions | NumberRendererOptions | ArrayRendererOptions | CategorizationRendererOptions | GroupRendererOptions | StepperRendererOptions | StringRendererOptions | RadioGroupRendererOptions | StandardRendererOptions;
2070
+ export declare type UiSchemaElementOptions = ConnectedRenderersOptions | NumberRendererOptions | ArrayRendererOptions | CategorizationRendererOptions | GroupRendererOptions | StepperRendererOptions | StringRendererOptions | RadioGroupRendererOptions | StandardRendererOptions | SegmentedRendererOptions;
2045
2071
 
2046
2072
  /**
2047
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.413.0",
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.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",
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.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",
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": "63a1d5ed29bdffacfde372a0f5a1fca715bfbb51"
91
+ "gitHead": "1773c265a5c49119bbf46847678b3eb155f67eb6"
92
92
  }