@genesislcap/foundation-forms 14.24.1 → 14.24.2
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.
|
@@ -988,9 +988,17 @@
|
|
|
988
988
|
"path": "src/jsonforms/renderers/ArrayListWrapperRenderer.ts",
|
|
989
989
|
"declarations": [
|
|
990
990
|
{
|
|
991
|
-
"kind": "
|
|
991
|
+
"kind": "function",
|
|
992
992
|
"name": "ArrayListWrapperRendererTemplate",
|
|
993
|
-
"
|
|
993
|
+
"parameters": [
|
|
994
|
+
{
|
|
995
|
+
"name": "prefix",
|
|
996
|
+
"default": "'zero'",
|
|
997
|
+
"type": {
|
|
998
|
+
"text": "string"
|
|
999
|
+
}
|
|
1000
|
+
}
|
|
1001
|
+
]
|
|
994
1002
|
},
|
|
995
1003
|
{
|
|
996
1004
|
"kind": "class",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FASTElement } from '@microsoft/fast-element';
|
|
2
|
-
export declare const ArrayListWrapperRendererTemplate: import("@microsoft/fast-element").ViewTemplate<any, any>;
|
|
2
|
+
export declare const ArrayListWrapperRendererTemplate: (prefix?: string) => import("@microsoft/fast-element").ViewTemplate<any, any>;
|
|
3
3
|
export declare class ArrayListWrapper extends FASTElement {
|
|
4
4
|
form: any;
|
|
5
5
|
control: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArrayListWrapperRenderer.d.ts","sourceRoot":"","sources":["../../../../src/jsonforms/renderers/ArrayListWrapperRenderer.ts"],"names":[],"mappings":"AACA,OAAO,EAAwC,WAAW,EAAU,MAAM,yBAAyB,CAAC;AAEpG,eAAO,MAAM,gCAAgC,
|
|
1
|
+
{"version":3,"file":"ArrayListWrapperRenderer.d.ts","sourceRoot":"","sources":["../../../../src/jsonforms/renderers/ArrayListWrapperRenderer.ts"],"names":[],"mappings":"AACA,OAAO,EAAwC,WAAW,EAAU,MAAM,yBAAyB,CAAC;AAEpG,eAAO,MAAM,gCAAgC,YAAY,MAAM,6DAyC9D,CAAC;AAiBF,qBAOa,gBAAiB,SAAQ,WAAW;IACnC,IAAI,MAAC;IACL,OAAO,MAAC;IACR,QAAQ,MAAC;IACT,MAAM,MAAC;IACP,QAAQ,MAAC;IAErB,cAAc;IAed,OAAO;IAaP,UAAU,CAAC,KAAK,EAAE,MAAM;CAWzB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
2
|
import { Generate, composePaths } from '@jsonforms/core';
|
|
3
3
|
import { html, css, observable, customElement, FASTElement, repeat } from '@microsoft/fast-element';
|
|
4
|
-
export const ArrayListWrapperRendererTemplate = html `
|
|
4
|
+
export const ArrayListWrapperRendererTemplate = (prefix = 'zero') => html `
|
|
5
5
|
<template>
|
|
6
6
|
${repeat((x) => x.control.data[x.pathName], html `
|
|
7
7
|
<div class="array-list">
|
|
@@ -16,26 +16,27 @@ export const ArrayListWrapperRendererTemplate = html `
|
|
|
16
16
|
path: composePaths(ctx.parent.pathName, `${ctx.index}`),
|
|
17
17
|
enabled: ctx.parent.control.enabled,
|
|
18
18
|
})}
|
|
19
|
+
:prefix=${(x, ctx) => ctx.parent.form.jsonforms.core.uischema.dsPrefix}
|
|
19
20
|
></dispatch-renderer>
|
|
20
|
-
|
|
21
|
+
<${prefix}-button
|
|
21
22
|
appearance="lightweight"
|
|
22
23
|
class="item-control-btn"
|
|
23
24
|
data-test-id=${(x, ctx) => `${ctx.parent.pathName}-${ctx.index}-delete-item`}
|
|
24
25
|
@click=${(x, ctx) => ctx.parent.deleteItem(ctx.index)}
|
|
25
26
|
>
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
<${prefix}-icon name="trash"></${prefix}-icon>
|
|
28
|
+
</${prefix}-button>
|
|
28
29
|
</div>
|
|
29
30
|
`, { positioning: true })}
|
|
30
|
-
|
|
31
|
+
<${prefix}-button
|
|
31
32
|
appearance="lightweight"
|
|
32
33
|
class="item-control-btn"
|
|
33
34
|
data-test-id=${(x) => `${x.pathName}-add-item`}
|
|
34
35
|
@click=${(x) => x.addItem()}
|
|
35
36
|
>
|
|
36
|
-
|
|
37
|
+
<${prefix}-icon name="plus"></${prefix}-icon>
|
|
37
38
|
Add another
|
|
38
|
-
|
|
39
|
+
</${prefix}-button>
|
|
39
40
|
</template>
|
|
40
41
|
`;
|
|
41
42
|
const styles = css `
|
|
@@ -102,7 +103,9 @@ ArrayListWrapper = __decorate([
|
|
|
102
103
|
customElement({
|
|
103
104
|
name: 'array-list-wrapper',
|
|
104
105
|
styles,
|
|
105
|
-
template:
|
|
106
|
+
template: html `
|
|
107
|
+
${(x) => ArrayListWrapperRendererTemplate(x.form.jsonforms.core.uischema.dsPrefix)}
|
|
108
|
+
`,
|
|
106
109
|
})
|
|
107
110
|
], ArrayListWrapper);
|
|
108
111
|
export { ArrayListWrapper };
|
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.24.
|
|
4
|
+
"version": "14.24.2",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"license": "SEE LICENSE IN license.txt",
|
|
7
7
|
"main": "dist/esm/index.js",
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
"test:unit:watch": "watchlist src test -- npm run test:unit"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@genesislcap/foundation-testing": "^14.24.
|
|
47
|
-
"@genesislcap/genx": "^14.24.
|
|
46
|
+
"@genesislcap/foundation-testing": "^14.24.2",
|
|
47
|
+
"@genesislcap/genx": "^14.24.2",
|
|
48
48
|
"@module-federation/dashboard-plugin": "2.3.0",
|
|
49
49
|
"@playwright/test": "^1.18.1",
|
|
50
50
|
"@types/json-schema": "^7.0.11",
|
|
@@ -84,9 +84,9 @@
|
|
|
84
84
|
"webpack-merge": "^5.7.3"
|
|
85
85
|
},
|
|
86
86
|
"dependencies": {
|
|
87
|
-
"@genesislcap/foundation-comms": "^14.24.
|
|
88
|
-
"@genesislcap/foundation-criteria": "^14.24.
|
|
89
|
-
"@genesislcap/foundation-utils": "^14.24.
|
|
87
|
+
"@genesislcap/foundation-comms": "^14.24.2",
|
|
88
|
+
"@genesislcap/foundation-criteria": "^14.24.2",
|
|
89
|
+
"@genesislcap/foundation-utils": "^14.24.2",
|
|
90
90
|
"@jsonforms/core": "^3.0.0",
|
|
91
91
|
"@microsoft/fast-components": "^2.21.3",
|
|
92
92
|
"@microsoft/fast-element": "^1.7.0",
|
|
@@ -107,5 +107,5 @@
|
|
|
107
107
|
"access": "public"
|
|
108
108
|
},
|
|
109
109
|
"customElements": "dist/custom-elements.json",
|
|
110
|
-
"gitHead": "
|
|
110
|
+
"gitHead": "a4cd30274c02f59472b48654d8e749c2e2b28f1d"
|
|
111
111
|
}
|