@genesislcap/foundation-forms 14.284.6-alpha-e61fffd.0 → 14.285.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"ConnectedSelectControlRenderer.d.ts","sourceRoot":"","sources":["../../../../src/jsonforms/renderers/ConnectedSelectControlRenderer.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAIvD,eAAO,MAAM,sCAAsC,YACzC,MAAM,0EAsCf,CAAC;AAEF,eAAO,MAAM,mCAAmC,EAAE,GAMjD,CAAC"}
1
+ {"version":3,"file":"ConnectedSelectControlRenderer.d.ts","sourceRoot":"","sources":["../../../../src/jsonforms/renderers/ConnectedSelectControlRenderer.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAmBvD,eAAO,MAAM,sCAAsC,YACzC,MAAM,0EAuCf,CAAC;AAEF,eAAO,MAAM,mCAAmC,EAAE,GAMjD,CAAC"}
@@ -5,6 +5,20 @@ import { comboboxRendererStyles } from '../../form.styles';
5
5
  import { optionIs } from '../testers/optionIs';
6
6
  import { SELECT_CONTROL_RANK } from './RenderersRanks';
7
7
  OptionsDatasource;
8
+ /**
9
+ * Gets the display value for the connected select control
10
+ * @param dispatchRenderer - The dispatch renderer instance
11
+ * @returns The label for the current value or empty string if no value
12
+ */
13
+ const getConnectedSelectDisplayValue = (dispatchRenderer) => {
14
+ var _a;
15
+ const currentValue = dispatchRenderer.control.data;
16
+ if (!currentValue)
17
+ return '';
18
+ const options = ((_a = dispatchRenderer.control.uischema.options) === null || _a === void 0 ? void 0 : _a.data) || [];
19
+ const option = options.find((opt) => opt.value === currentValue);
20
+ return String((option === null || option === void 0 ? void 0 : option.label) || currentValue);
21
+ };
8
22
  export const ConnectedSelectControlRendererTemplate = (prefix = 'zero') => html `
9
23
  <template>
10
24
  <style>${comboboxRendererStyles(prefix)}</style>
@@ -21,6 +35,7 @@ export const ConnectedSelectControlRendererTemplate = (prefix = 'zero') => html
21
35
  placeholder=${(x) => x.control.uischema.placeholder || x.control.label}
22
36
  autocomplete="both"
23
37
  ?disabled=${(x) => !x.control.enabled}
38
+ :value=${(x) => getConnectedSelectDisplayValue(x)}
24
39
  @value-change=${(x, c) => {
25
40
  var _a;
26
41
  const value = (_a = c.event.detail) === null || _a === void 0 ? void 0 : _a.value;
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.284.6-alpha-e61fffd.0",
4
+ "version": "14.285.1",
5
5
  "sideEffects": false,
6
6
  "license": "SEE LICENSE IN license.txt",
7
7
  "main": "dist/esm/index.js",
@@ -48,23 +48,23 @@
48
48
  }
49
49
  },
50
50
  "devDependencies": {
51
- "@genesislcap/foundation-testing": "14.284.6-alpha-e61fffd.0",
52
- "@genesislcap/genx": "14.284.6-alpha-e61fffd.0",
53
- "@genesislcap/rollup-builder": "14.284.6-alpha-e61fffd.0",
54
- "@genesislcap/ts-builder": "14.284.6-alpha-e61fffd.0",
55
- "@genesislcap/uvu-playwright-builder": "14.284.6-alpha-e61fffd.0",
56
- "@genesislcap/vite-builder": "14.284.6-alpha-e61fffd.0",
57
- "@genesislcap/webpack-builder": "14.284.6-alpha-e61fffd.0",
51
+ "@genesislcap/foundation-testing": "14.285.1",
52
+ "@genesislcap/genx": "14.285.1",
53
+ "@genesislcap/rollup-builder": "14.285.1",
54
+ "@genesislcap/ts-builder": "14.285.1",
55
+ "@genesislcap/uvu-playwright-builder": "14.285.1",
56
+ "@genesislcap/vite-builder": "14.285.1",
57
+ "@genesislcap/webpack-builder": "14.285.1",
58
58
  "@types/json-schema": "^7.0.11",
59
59
  "rimraf": "^5.0.0"
60
60
  },
61
61
  "dependencies": {
62
- "@genesislcap/foundation-comms": "14.284.6-alpha-e61fffd.0",
63
- "@genesislcap/foundation-criteria": "14.284.6-alpha-e61fffd.0",
64
- "@genesislcap/foundation-logger": "14.284.6-alpha-e61fffd.0",
65
- "@genesislcap/foundation-notifications": "14.284.6-alpha-e61fffd.0",
66
- "@genesislcap/foundation-ui": "14.284.6-alpha-e61fffd.0",
67
- "@genesislcap/foundation-utils": "14.284.6-alpha-e61fffd.0",
62
+ "@genesislcap/foundation-comms": "14.285.1",
63
+ "@genesislcap/foundation-criteria": "14.285.1",
64
+ "@genesislcap/foundation-logger": "14.285.1",
65
+ "@genesislcap/foundation-notifications": "14.285.1",
66
+ "@genesislcap/foundation-ui": "14.285.1",
67
+ "@genesislcap/foundation-utils": "14.285.1",
68
68
  "@json-schema-tools/dereferencer": "^1.6.1",
69
69
  "@jsonforms/core": "^3.2.1",
70
70
  "@microsoft/fast-components": "2.30.6",
@@ -86,5 +86,5 @@
86
86
  "access": "public"
87
87
  },
88
88
  "customElements": "dist/custom-elements.json",
89
- "gitHead": "9eeb87ef061eecb53a722ebf98c7d012bb060de0"
89
+ "gitHead": "6d060a7642ec87b7c2bb4c992cb3c98ef6bc52a1"
90
90
  }