@genesislcap/foundation-forms 14.219.0 → 14.219.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":"StringArrayControlRenderer.d.ts","sourceRoot":"","sources":["../../../../src/jsonforms/renderers/StringArrayControlRenderer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"StringArrayControlRenderer.d.ts","sourceRoot":"","sources":["../../../../src/jsonforms/renderers/StringArrayControlRenderer.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAuBvD,eAAO,MAAM,qCAAqC,YACxC,MAAM,0EAuBf,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,aAM9B,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { mapStateToControlProps
|
|
1
|
+
import { mapStateToControlProps } from '@jsonforms/core';
|
|
2
|
+
import { rankWith } from '@jsonforms/core';
|
|
2
3
|
import { html } from '@microsoft/fast-element';
|
|
3
4
|
import { isArray } from '../testers/isArray';
|
|
4
5
|
import { ARRAY_CONTROL_RANK } from './RenderersRanks';
|
|
@@ -6,6 +7,16 @@ function changeHandler(x, c) {
|
|
|
6
7
|
const inputValue = c.event.target.value;
|
|
7
8
|
x.control.handleChange(x.control.path, inputValue === '' ? [] : inputValue.split(',').map((item) => item.trimStart()));
|
|
8
9
|
}
|
|
10
|
+
const setValue = (dispatchRenderer) => {
|
|
11
|
+
var _a;
|
|
12
|
+
const data = dispatchRenderer.control.data;
|
|
13
|
+
// there is an inconsistency for array of strings type where DATA_SERVER would provide
|
|
14
|
+
// data as string but event handler would expect an array
|
|
15
|
+
if (typeof data === 'string') {
|
|
16
|
+
dispatchRenderer.control.handleChange(dispatchRenderer.control.path, data.split(','));
|
|
17
|
+
}
|
|
18
|
+
return ((_a = dispatchRenderer.control.data) === null || _a === void 0 ? void 0 : _a.toString()) || '';
|
|
19
|
+
};
|
|
9
20
|
export const getStringArrayControlRendererTemplate = (prefix = 'zero') => html `
|
|
10
21
|
<template>
|
|
11
22
|
<control-wrapper
|
|
@@ -16,7 +27,7 @@ export const getStringArrayControlRendererTemplate = (prefix = 'zero') => html `
|
|
|
16
27
|
prefix="${prefix}"
|
|
17
28
|
>
|
|
18
29
|
<${prefix}-text-field
|
|
19
|
-
:value=${(x) =>
|
|
30
|
+
:value=${(x) => setValue(x)}
|
|
20
31
|
@change=${changeHandler}
|
|
21
32
|
placeholder=${(x) => x.control.uischema.placeholder || x.control.label}
|
|
22
33
|
id=${(x) => x.control.path}
|
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.219.
|
|
4
|
+
"version": "14.219.1",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"license": "SEE LICENSE IN license.txt",
|
|
7
7
|
"main": "dist/esm/index.js",
|
|
@@ -48,22 +48,22 @@
|
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@genesislcap/foundation-testing": "14.219.
|
|
52
|
-
"@genesislcap/genx": "14.219.
|
|
53
|
-
"@genesislcap/rollup-builder": "14.219.
|
|
54
|
-
"@genesislcap/ts-builder": "14.219.
|
|
55
|
-
"@genesislcap/uvu-playwright-builder": "14.219.
|
|
56
|
-
"@genesislcap/vite-builder": "14.219.
|
|
57
|
-
"@genesislcap/webpack-builder": "14.219.
|
|
51
|
+
"@genesislcap/foundation-testing": "14.219.1",
|
|
52
|
+
"@genesislcap/genx": "14.219.1",
|
|
53
|
+
"@genesislcap/rollup-builder": "14.219.1",
|
|
54
|
+
"@genesislcap/ts-builder": "14.219.1",
|
|
55
|
+
"@genesislcap/uvu-playwright-builder": "14.219.1",
|
|
56
|
+
"@genesislcap/vite-builder": "14.219.1",
|
|
57
|
+
"@genesislcap/webpack-builder": "14.219.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.219.
|
|
63
|
-
"@genesislcap/foundation-criteria": "14.219.
|
|
64
|
-
"@genesislcap/foundation-logger": "14.219.
|
|
65
|
-
"@genesislcap/foundation-ui": "14.219.
|
|
66
|
-
"@genesislcap/foundation-utils": "14.219.
|
|
62
|
+
"@genesislcap/foundation-comms": "14.219.1",
|
|
63
|
+
"@genesislcap/foundation-criteria": "14.219.1",
|
|
64
|
+
"@genesislcap/foundation-logger": "14.219.1",
|
|
65
|
+
"@genesislcap/foundation-ui": "14.219.1",
|
|
66
|
+
"@genesislcap/foundation-utils": "14.219.1",
|
|
67
67
|
"@json-schema-tools/dereferencer": "^1.6.1",
|
|
68
68
|
"@jsonforms/core": "^3.2.1",
|
|
69
69
|
"@microsoft/fast-components": "^2.30.6",
|
|
@@ -85,5 +85,5 @@
|
|
|
85
85
|
"access": "public"
|
|
86
86
|
},
|
|
87
87
|
"customElements": "dist/custom-elements.json",
|
|
88
|
-
"gitHead": "
|
|
88
|
+
"gitHead": "2d9851b8d1b8457a36d8416cde2e7c4e13a159f1"
|
|
89
89
|
}
|