@genesislcap/foundation-forms 14.30.2-bny.1 → 14.30.3
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.
- package/dist/custom-elements.json +2 -18
- package/dist/dts/form.d.ts +0 -1
- package/dist/dts/form.d.ts.map +1 -1
- package/dist/dts/form.styles.d.ts +0 -1
- package/dist/dts/form.styles.d.ts.map +1 -1
- package/dist/dts/form.template.d.ts +0 -1
- package/dist/dts/form.template.d.ts.map +1 -1
- package/dist/dts/index.d.ts +0 -2
- package/dist/dts/index.d.ts.map +1 -1
- package/dist/dts/jsonforms/renderers/LayoutVertical2ColumnsRenderer.d.ts.map +1 -1
- package/dist/dts/jsonforms/renderers/NumberControlRenderer.d.ts.map +1 -1
- package/dist/dts/jsonforms/renderers/StringControlRenderer.d.ts.map +1 -1
- package/dist/dts/types.d.ts +0 -1
- package/dist/dts/types.d.ts.map +1 -1
- package/dist/esm/form.js +0 -8
- package/dist/esm/form.styles.js +2 -4
- package/dist/esm/form.template.js +2 -3
- package/dist/esm/index.js +0 -2
- package/dist/esm/jsonforms/renderers/ConnectedSelectControlRenderer.js +1 -1
- package/dist/esm/jsonforms/renderers/LayoutVertical2ColumnsRenderer.js +2 -1
- package/dist/esm/jsonforms/renderers/NumberControlRenderer.js +1 -2
- package/dist/esm/jsonforms/renderers/StringControlRenderer.js +5 -2
- package/dist/foundation-forms.api.json +1 -101
- package/dist/foundation-forms.d.ts +0 -9
- package/docs/api/foundation-forms.form.md +0 -1
- package/docs/api/foundation-forms.md +0 -2
- package/docs/api/foundation-forms.uischemaelement.md +0 -1
- package/docs/api-report.md +1 -11
- package/package.json +8 -8
- package/docs/api/foundation-forms.form.connectedcallback.md +0 -18
- package/docs/api/foundation-forms.foundationformstyles.md +0 -15
- package/docs/api/foundation-forms.foundationformtemplate.md +0 -15
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
{
|
|
30
30
|
"kind": "variable",
|
|
31
31
|
"name": "foundationFormTemplate",
|
|
32
|
-
"default": "html<Form>`\n <template>\n <json-forms\n ?readonly=${(x) => x.readonly}\n ?submitted=${(x) => x.submitted}\n :renderers=${(x) => x.renderers}\n :uischema=${(x) => x.uischema}\n :schema=${(x) => x.jsonSchema}\n :data=${(x) => x.data}\n @data-change=${(x, c) => x.onChange(c.event as CustomEvent)}\n ></json-forms>\n ${when(\n (x) => !x.readonly,\n html<Form>`\n <
|
|
32
|
+
"default": "html<Form>`\n <template>\n <json-forms\n ?readonly=${(x) => x.readonly}\n ?submitted=${(x) => x.submitted}\n :renderers=${(x) => x.renderers}\n :uischema=${(x) => x.uischema}\n :schema=${(x) => x.jsonSchema}\n :data=${(x) => x.data}\n @data-change=${(x, c) => x.onChange(c.event as CustomEvent)}\n ></json-forms>\n ${when(\n (x) => !x.readonly,\n html<Form>`\n <div class=\"actions\">\n <fast-button\n @click=\"${(x) => x._submit()}\"\n ?disable=${(x) => !x.submitting}\n class=\"submit-button\"\n appearance=\"accent\"\n >\n Submit\n </fast-button>\n </div>\n `\n )}\n </template>\n`"
|
|
33
33
|
}
|
|
34
34
|
],
|
|
35
35
|
"exports": [
|
|
@@ -338,22 +338,6 @@
|
|
|
338
338
|
"package": "./form"
|
|
339
339
|
}
|
|
340
340
|
},
|
|
341
|
-
{
|
|
342
|
-
"kind": "js",
|
|
343
|
-
"name": "*",
|
|
344
|
-
"declaration": {
|
|
345
|
-
"name": "*",
|
|
346
|
-
"package": "./form.styles"
|
|
347
|
-
}
|
|
348
|
-
},
|
|
349
|
-
{
|
|
350
|
-
"kind": "js",
|
|
351
|
-
"name": "*",
|
|
352
|
-
"declaration": {
|
|
353
|
-
"name": "*",
|
|
354
|
-
"package": "./form.template"
|
|
355
|
-
}
|
|
356
|
-
},
|
|
357
341
|
{
|
|
358
342
|
"kind": "js",
|
|
359
343
|
"name": "*",
|
|
@@ -1809,7 +1793,7 @@
|
|
|
1809
1793
|
{
|
|
1810
1794
|
"kind": "variable",
|
|
1811
1795
|
"name": "LayoutVertical2ColumnsRendererTemplate",
|
|
1812
|
-
"default": "html`\n <template>\n <div\n style=\"display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n justify-content: space-between;\"\n >\n ${repeat(\n (x) => x.control.uischema.elements,\n html`\n <div style=\"width: 49%\">\n <dispatch-renderer\n ?submitted=${(x, ctx) => ctx.parent.submitted}\n :dispatch=${(x, ctx) => ctx.parent.dispatch}\n :jsonforms=${(x, ctx) => ctx.parent.jsonforms}\n :props=${(x, ctx) => ({\n uischema: x,\n schema: ctx.parent.control.schema,\n renderers: ctx.parent.control.renderers,\n path: ctx.parent.control.path,\n enabled: ctx.parent.control.enabled,\n })}\n ></dispatch-renderer>\n </div>\n `\n )}\n </div>\n </template>\n`"
|
|
1796
|
+
"default": "html`\n <template>\n <div\n style=\"max-width:600px;\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n justify-content: space-between;\"\n >\n ${repeat(\n (x) => x.control.uischema.elements,\n html`\n <div style=\"width: 49%\">\n <dispatch-renderer\n ?submitted=${(x, ctx) => ctx.parent.submitted}\n :dispatch=${(x, ctx) => ctx.parent.dispatch}\n :jsonforms=${(x, ctx) => ctx.parent.jsonforms}\n :props=${(x, ctx) => ({\n uischema: x,\n schema: ctx.parent.control.schema,\n renderers: ctx.parent.control.renderers,\n path: ctx.parent.control.path,\n enabled: ctx.parent.control.enabled,\n })}\n ></dispatch-renderer>\n </div>\n `\n )}\n </div>\n </template>\n`"
|
|
1813
1797
|
},
|
|
1814
1798
|
{
|
|
1815
1799
|
"kind": "variable",
|
package/dist/dts/form.d.ts
CHANGED
package/dist/dts/form.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../src/form.ts"],"names":[],"mappings":"AAEA,OAAO,EAKL,eAAe,EAChB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE/D,OAAO,EAAE,WAAW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AmB;IAQjC,OAAO,CAAC,oBAAoB;IA0B5B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAqCG;IACS,QAAQ,EAAE,eAAe,CAAC;IACtC;;;OAGG;IACS,SAAS,EAAE,aAAa,EAAE,CAAa;IACnD;;;;;;OAMG;IACS,UAAU,EAAE,WAAW,CAAC;IAEpC,OAAO,CAAC,MAAM,CAAqB;IAC1B,OAAO,CAAC,OAAO,CAAW;IACnC;;;OAGG;IACS,IAAI,EAAE,GAAG,CAAM;IAE3B;;OAEG;IACS,UAAU,EAAE,OAAO,CAAC;IAChC;;OAEG;IACS,SAAS,EAAE,OAAO,CAAC;IAEJ,QAAQ,EAAE,OAAO,CAAC;IAE7C;;OAEG;IACG,OAAO;IAwBb;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,WAAW;IAQ3B,oBAAoB;IAKpB;;;OAGG;IACH,KAAK;CAIN"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form.styles.d.ts","sourceRoot":"","sources":["../../src/form.styles.ts"],"names":[],"mappings":"AAKA,
|
|
1
|
+
{"version":3,"file":"form.styles.d.ts","sourceRoot":"","sources":["../../src/form.styles.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,oBAAoB,iDAoDhC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form.template.d.ts","sourceRoot":"","sources":["../../src/form.template.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAanC,
|
|
1
|
+
{"version":3,"file":"form.template.d.ts","sourceRoot":"","sources":["../../src/form.template.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAanC,eAAO,MAAM,sBAAsB,2DA2BlC,CAAC"}
|
package/dist/dts/index.d.ts
CHANGED
package/dist/dts/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LayoutVertical2ColumnsRenderer.d.ts","sourceRoot":"","sources":["../../../../src/jsonforms/renderers/LayoutVertical2ColumnsRenderer.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,sCAAsC,
|
|
1
|
+
{"version":3,"file":"LayoutVertical2ColumnsRenderer.d.ts","sourceRoot":"","sources":["../../../../src/jsonforms/renderers/LayoutVertical2ColumnsRenderer.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,sCAAsC,0DA8BlD,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,GAIzC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NumberControlRenderer.d.ts","sourceRoot":"","sources":["../../../../src/jsonforms/renderers/NumberControlRenderer.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,6BAA6B,YAAY,MAAM,
|
|
1
|
+
{"version":3,"file":"NumberControlRenderer.d.ts","sourceRoot":"","sources":["../../../../src/jsonforms/renderers/NumberControlRenderer.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,6BAA6B,YAAY,MAAM,6DAyB3D,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,GAMxC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StringControlRenderer.d.ts","sourceRoot":"","sources":["../../../../src/jsonforms/renderers/StringControlRenderer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAIvD,eAAO,MAAM,gCAAgC,YAAY,MAAM,
|
|
1
|
+
{"version":3,"file":"StringControlRenderer.d.ts","sourceRoot":"","sources":["../../../../src/jsonforms/renderers/StringControlRenderer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAIvD,eAAO,MAAM,gCAAgC,YAAY,MAAM,0EAwB9D,CAAC;AACF,eAAO,MAAM,6BAA6B,uEAEzC,CAAC"}
|
package/dist/dts/types.d.ts
CHANGED
package/dist/dts/types.d.ts.map
CHANGED
|
@@ -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,EACL,cAAc,EACd,iBAAiB,EACjB,YAAY,EACZ,mBAAmB,EACpB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,KAAK,CAAC;AAClC,OAAO,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AAE3E,cAAc;AACd,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG,gBAAgB,GAAG,GAAG,CAAC;AAErE,cAAc;AACd,MAAM,MAAM,sBAAsB,GAAG;IACnC,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,gBAAgB,CAAC,EAAE,iBAAiB,CAAC;IACrC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,WAAW,EAAE,CAAC;IACvE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ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QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;IACb,aAAa,CAAC,EAAE,QAAQ,CAAC;IACzB,aAAa,CAAC,EAAE,QAAQ,EAAE,CAAC;IAC3B,IAAI,CAAC,EAAE;QACL,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;KACpB,CAAC;CACH,CAAC;AAEF,cAAc;AACd,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,mBAAmB,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,sBAAsB,CAAC;CAClC,CAAC;AAEF,cAAc;AACd,MAAM,MAAM,QAAQ,GAAG;IACrB,IAAI,EAAE,mBAAmB,CAAC;IAC1B,QAAQ,EAAE,eAAe,EAAE,CAAC;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,cAAc;AACd,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,EAAE,YAAY,CAAC,gBAAgB,EAAE,GAAG,CAAC,CAAC;IAC9C,MAAM,EAAE,YAAY,CAAC;IACrB,MAAM,EAAE,CAAC,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,iBAAiB,KAAK,mBAAmB,CAAC;CACrF,CAAC"}
|
package/dist/esm/form.js
CHANGED
|
@@ -106,9 +106,6 @@ let Form = class Form extends FoundationElement {
|
|
|
106
106
|
*/
|
|
107
107
|
_submit() {
|
|
108
108
|
return __awaiter(this, void 0, void 0, function* () {
|
|
109
|
-
if (this.submitting) {
|
|
110
|
-
return;
|
|
111
|
-
}
|
|
112
109
|
if (this.removeDataProperties()) {
|
|
113
110
|
yield DOM.nextUpdate();
|
|
114
111
|
}
|
|
@@ -139,13 +136,8 @@ let Form = class Form extends FoundationElement {
|
|
|
139
136
|
this.errors = event.detail.errors;
|
|
140
137
|
}
|
|
141
138
|
}
|
|
142
|
-
connectedCallback() {
|
|
143
|
-
super.connectedCallback();
|
|
144
|
-
this.addEventListener('submit-button-clicked', this._submit);
|
|
145
|
-
}
|
|
146
139
|
disconnectedCallback() {
|
|
147
140
|
super.disconnectedCallback();
|
|
148
|
-
this.removeEventListener('submit-button-clicked', this._submit);
|
|
149
141
|
this.reset();
|
|
150
142
|
}
|
|
151
143
|
/**
|
package/dist/esm/form.styles.js
CHANGED
|
@@ -2,7 +2,6 @@ import { controlCornerRadius, designUnit, strokeWidth } from '@microsoft/fast-co
|
|
|
2
2
|
import { css } from '@microsoft/fast-element';
|
|
3
3
|
import { forcedColorsStylesheetBehavior } from '@microsoft/fast-foundation';
|
|
4
4
|
import { SystemColors } from '@microsoft/fast-web-utilities';
|
|
5
|
-
/** @beta */
|
|
6
5
|
export const foundationFormStyles = css `
|
|
7
6
|
:host {
|
|
8
7
|
border: calc(${strokeWidth} * 1px) solid transparent;
|
|
@@ -35,11 +34,10 @@ export const foundationFormStyles = css `
|
|
|
35
34
|
|
|
36
35
|
.actions {
|
|
37
36
|
display: flex;
|
|
38
|
-
flex-direction:
|
|
37
|
+
flex-direction: column;
|
|
39
38
|
align-items: flex-end;
|
|
40
|
-
justify-content:
|
|
39
|
+
justify-content: center;
|
|
41
40
|
padding: calc(${designUnit} * 2px);
|
|
42
|
-
gap: 10px;
|
|
43
41
|
}
|
|
44
42
|
|
|
45
43
|
.error {
|
|
@@ -9,7 +9,6 @@ ArrayListWrapper;
|
|
|
9
9
|
CategorizationWrapper;
|
|
10
10
|
ControlWrapper;
|
|
11
11
|
DispatchRenderer;
|
|
12
|
-
/** @beta */
|
|
13
12
|
export const foundationFormTemplate = html `
|
|
14
13
|
<template>
|
|
15
14
|
<json-forms
|
|
@@ -22,7 +21,7 @@ export const foundationFormTemplate = html `
|
|
|
22
21
|
@data-change=${(x, c) => x.onChange(c.event)}
|
|
23
22
|
></json-forms>
|
|
24
23
|
${when((x) => !x.readonly, html `
|
|
25
|
-
<
|
|
24
|
+
<div class="actions">
|
|
26
25
|
<fast-button
|
|
27
26
|
@click="${(x) => x._submit()}"
|
|
28
27
|
?disable=${(x) => !x.submitting}
|
|
@@ -31,7 +30,7 @@ export const foundationFormTemplate = html `
|
|
|
31
30
|
>
|
|
32
31
|
Submit
|
|
33
32
|
</fast-button>
|
|
34
|
-
</
|
|
33
|
+
</div>
|
|
35
34
|
`)}
|
|
36
35
|
</template>
|
|
37
36
|
`;
|
package/dist/esm/index.js
CHANGED
|
@@ -13,7 +13,7 @@ export const ConnectedSelectControlRendererTemplate = (prefix = 'zero') => html
|
|
|
13
13
|
>
|
|
14
14
|
<${prefix}-combobox
|
|
15
15
|
style="width: 100%"
|
|
16
|
-
placeholder=${(x) => x.control.
|
|
16
|
+
placeholder=${(x) => x.control.label}
|
|
17
17
|
?disabled=${(x) => !x.control.enabled}
|
|
18
18
|
@value-change=${(x, c) => {
|
|
19
19
|
var _a;
|
|
@@ -4,7 +4,8 @@ import { LAYOUT2COLUMNS_RANK } from './RenderersRanks';
|
|
|
4
4
|
export const LayoutVertical2ColumnsRendererTemplate = html `
|
|
5
5
|
<template>
|
|
6
6
|
<div
|
|
7
|
-
style="
|
|
7
|
+
style="max-width:600px;
|
|
8
|
+
display: flex;
|
|
8
9
|
flex-direction: row;
|
|
9
10
|
flex-wrap: wrap;
|
|
10
11
|
justify-content: space-between;"
|
|
@@ -10,13 +10,12 @@ export const NumberControlRendererTemplate = (prefix = 'zero') => html `
|
|
|
10
10
|
?submitted=${(x) => x.submitted}
|
|
11
11
|
>
|
|
12
12
|
<${prefix}-number-field
|
|
13
|
-
:options=${(x) => { var _a; return (_a = x.control.uischema.options) === null || _a === void 0 ? void 0 : _a.formatOptions; }}
|
|
14
13
|
:value=${(x) => (x.control.data === undefined ? '' : String(x.control.data))}
|
|
15
14
|
@change=${(x, c) => {
|
|
16
15
|
const value = parseFloat(c.event.target.value.replace(/,/g, ''));
|
|
17
16
|
return x.control.handleChange(x.control.path, !isNaN(value) ? value : undefined);
|
|
18
17
|
}}
|
|
19
|
-
placeholder=${(x) => x.control.
|
|
18
|
+
placeholder=${(x) => x.control.label}
|
|
20
19
|
id=${(x) => x.control.path}
|
|
21
20
|
data-test-id=${(x) => x.control.path}
|
|
22
21
|
?required=${(x) => x.control.required}
|
|
@@ -10,8 +10,11 @@ export const getStringControlRendererTemplate = (prefix = 'zero') => html `
|
|
|
10
10
|
<${prefix}-text-field
|
|
11
11
|
type=${(x) => { var _a, _b; return (((_b = (_a = x.control.uischema) === null || _a === void 0 ? void 0 : _a.options) === null || _b === void 0 ? void 0 : _b.isPassword) ? 'password' : 'text'); }}
|
|
12
12
|
:value=${(x) => x.control.data || ''}
|
|
13
|
-
@change=${(x, c) =>
|
|
14
|
-
|
|
13
|
+
@change=${(x, c) => {
|
|
14
|
+
const inputValue = c.event.target.value;
|
|
15
|
+
x.control.handleChange(x.control.path, inputValue === '' ? null : inputValue);
|
|
16
|
+
}}
|
|
17
|
+
placeholder=${(x) => x.control.label}
|
|
15
18
|
id=${(x) => x.control.path}
|
|
16
19
|
data-test-id=${(x) => x.control.path}
|
|
17
20
|
?required=${(x) => x.control.required}
|
|
@@ -560,37 +560,6 @@
|
|
|
560
560
|
"name": "Form",
|
|
561
561
|
"preserveMemberOrder": false,
|
|
562
562
|
"members": [
|
|
563
|
-
{
|
|
564
|
-
"kind": "Method",
|
|
565
|
-
"canonicalReference": "@genesislcap/foundation-forms!Form#connectedCallback:member(1)",
|
|
566
|
-
"docComment": "",
|
|
567
|
-
"excerptTokens": [
|
|
568
|
-
{
|
|
569
|
-
"kind": "Content",
|
|
570
|
-
"text": "connectedCallback(): "
|
|
571
|
-
},
|
|
572
|
-
{
|
|
573
|
-
"kind": "Content",
|
|
574
|
-
"text": "void"
|
|
575
|
-
},
|
|
576
|
-
{
|
|
577
|
-
"kind": "Content",
|
|
578
|
-
"text": ";"
|
|
579
|
-
}
|
|
580
|
-
],
|
|
581
|
-
"isStatic": false,
|
|
582
|
-
"returnTypeTokenRange": {
|
|
583
|
-
"startIndex": 1,
|
|
584
|
-
"endIndex": 2
|
|
585
|
-
},
|
|
586
|
-
"releaseTag": "Beta",
|
|
587
|
-
"isProtected": false,
|
|
588
|
-
"overloadIndex": 1,
|
|
589
|
-
"parameters": [],
|
|
590
|
-
"isOptional": false,
|
|
591
|
-
"isAbstract": false,
|
|
592
|
-
"name": "connectedCallback"
|
|
593
|
-
},
|
|
594
563
|
{
|
|
595
564
|
"kind": "Property",
|
|
596
565
|
"canonicalReference": "@genesislcap/foundation-forms!Form#data:member",
|
|
@@ -847,75 +816,6 @@
|
|
|
847
816
|
},
|
|
848
817
|
"implementsTokenRanges": []
|
|
849
818
|
},
|
|
850
|
-
{
|
|
851
|
-
"kind": "Variable",
|
|
852
|
-
"canonicalReference": "@genesislcap/foundation-forms!foundationFormStyles:var",
|
|
853
|
-
"docComment": "/**\n * @beta\n */\n",
|
|
854
|
-
"excerptTokens": [
|
|
855
|
-
{
|
|
856
|
-
"kind": "Content",
|
|
857
|
-
"text": "foundationFormStyles: "
|
|
858
|
-
},
|
|
859
|
-
{
|
|
860
|
-
"kind": "Content",
|
|
861
|
-
"text": "import(\"@microsoft/fast-element\")."
|
|
862
|
-
},
|
|
863
|
-
{
|
|
864
|
-
"kind": "Reference",
|
|
865
|
-
"text": "ElementStyles",
|
|
866
|
-
"canonicalReference": "@microsoft/fast-element!ElementStyles:class"
|
|
867
|
-
}
|
|
868
|
-
],
|
|
869
|
-
"fileUrlPath": "src/form.styles.ts",
|
|
870
|
-
"isReadonly": true,
|
|
871
|
-
"releaseTag": "Beta",
|
|
872
|
-
"name": "foundationFormStyles",
|
|
873
|
-
"variableTypeTokenRange": {
|
|
874
|
-
"startIndex": 1,
|
|
875
|
-
"endIndex": 3
|
|
876
|
-
}
|
|
877
|
-
},
|
|
878
|
-
{
|
|
879
|
-
"kind": "Variable",
|
|
880
|
-
"canonicalReference": "@genesislcap/foundation-forms!foundationFormTemplate:var",
|
|
881
|
-
"docComment": "/**\n * @beta\n */\n",
|
|
882
|
-
"excerptTokens": [
|
|
883
|
-
{
|
|
884
|
-
"kind": "Content",
|
|
885
|
-
"text": "foundationFormTemplate: "
|
|
886
|
-
},
|
|
887
|
-
{
|
|
888
|
-
"kind": "Content",
|
|
889
|
-
"text": "import(\"@microsoft/fast-element\")."
|
|
890
|
-
},
|
|
891
|
-
{
|
|
892
|
-
"kind": "Reference",
|
|
893
|
-
"text": "ViewTemplate",
|
|
894
|
-
"canonicalReference": "@microsoft/fast-element!ViewTemplate:class"
|
|
895
|
-
},
|
|
896
|
-
{
|
|
897
|
-
"kind": "Content",
|
|
898
|
-
"text": "<"
|
|
899
|
-
},
|
|
900
|
-
{
|
|
901
|
-
"kind": "Reference",
|
|
902
|
-
"text": "Form",
|
|
903
|
-
"canonicalReference": "@genesislcap/foundation-forms!Form:class"
|
|
904
|
-
},
|
|
905
|
-
{
|
|
906
|
-
"kind": "Content",
|
|
907
|
-
"text": ", any>"
|
|
908
|
-
}
|
|
909
|
-
],
|
|
910
|
-
"fileUrlPath": "src/form.template.ts",
|
|
911
|
-
"isReadonly": true,
|
|
912
|
-
"releaseTag": "Beta",
|
|
913
|
-
"name": "foundationFormTemplate",
|
|
914
|
-
"variableTypeTokenRange": {
|
|
915
|
-
"startIndex": 1,
|
|
916
|
-
"endIndex": 6
|
|
917
|
-
}
|
|
918
|
-
},
|
|
919
819
|
{
|
|
920
820
|
"kind": "Variable",
|
|
921
821
|
"canonicalReference": "@genesislcap/foundation-forms!genesisErrorTranslator:var",
|
|
@@ -1130,7 +1030,7 @@
|
|
|
1130
1030
|
},
|
|
1131
1031
|
{
|
|
1132
1032
|
"kind": "Content",
|
|
1133
|
-
"text": ";\n scope: string;\n label?: string;\n
|
|
1033
|
+
"text": ";\n scope: string;\n label?: string;\n options?: "
|
|
1134
1034
|
},
|
|
1135
1035
|
{
|
|
1136
1036
|
"kind": "Reference",
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { DatasourceOptions } from '@genesislcap/foundation-comms';
|
|
2
|
-
import { ElementStyles } from '@microsoft/fast-element';
|
|
3
2
|
import { ErrorObject } from 'ajv';
|
|
4
3
|
import { ErrorTranslator } from '@jsonforms/core';
|
|
5
4
|
import { Expression } from '@genesislcap/foundation-criteria';
|
|
@@ -231,7 +230,6 @@ export declare class Form extends FoundationElement {
|
|
|
231
230
|
* @internal
|
|
232
231
|
*/
|
|
233
232
|
onChange(event: CustomEvent): void;
|
|
234
|
-
connectedCallback(): void;
|
|
235
233
|
disconnectedCallback(): void;
|
|
236
234
|
/**
|
|
237
235
|
* Reset the form state
|
|
@@ -240,12 +238,6 @@ export declare class Form extends FoundationElement {
|
|
|
240
238
|
reset(): void;
|
|
241
239
|
}
|
|
242
240
|
|
|
243
|
-
/** @beta */
|
|
244
|
-
export declare const foundationFormStyles: ElementStyles;
|
|
245
|
-
|
|
246
|
-
/** @beta */
|
|
247
|
-
export declare const foundationFormTemplate: ViewTemplate<Form, any>;
|
|
248
|
-
|
|
249
241
|
/** @public */
|
|
250
242
|
export declare const genesisErrorTranslator: ErrorTranslator;
|
|
251
243
|
|
|
@@ -288,7 +280,6 @@ export declare type UiSchemaElement = {
|
|
|
288
280
|
type: UiSchemaElementType;
|
|
289
281
|
scope: string;
|
|
290
282
|
label?: string;
|
|
291
|
-
placeholder?: string;
|
|
292
283
|
options?: UiSchemaElementOptions;
|
|
293
284
|
};
|
|
294
285
|
|
|
@@ -31,7 +31,6 @@ export declare class Form extends FoundationElement
|
|
|
31
31
|
|
|
32
32
|
| Method | Modifiers | Description |
|
|
33
33
|
| --- | --- | --- |
|
|
34
|
-
| [connectedCallback()](./foundation-forms.form.connectedcallback.md) | | **_(BETA)_** |
|
|
35
34
|
| [disconnectedCallback()](./foundation-forms.form.disconnectedcallback.md) | | **_(BETA)_** |
|
|
36
35
|
| [reset()](./foundation-forms.form.reset.md) | | Reset the form state |
|
|
37
36
|
|
|
@@ -17,8 +17,6 @@
|
|
|
17
17
|
| --- | --- |
|
|
18
18
|
| [createExpressions](./foundation-forms.createexpressions.md) | Creates a expressions/criteria from given payload |
|
|
19
19
|
| [filtersRenderers](./foundation-forms.filtersrenderers.md) | |
|
|
20
|
-
| [foundationFormStyles](./foundation-forms.foundationformstyles.md) | **_(BETA)_** |
|
|
21
|
-
| [foundationFormTemplate](./foundation-forms.foundationformtemplate.md) | **_(BETA)_** |
|
|
22
20
|
| [genesisErrorTranslator](./foundation-forms.genesiserrortranslator.md) | |
|
|
23
21
|
| [mustMatch](./foundation-forms.mustmatch.md) | Ensures the value of the current field (the one the validator is on) matches the one of the target field. |
|
|
24
22
|
| [renderers](./foundation-forms.renderers.md) | |
|
package/docs/api-report.md
CHANGED
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
```ts
|
|
6
6
|
|
|
7
7
|
import { DatasourceOptions } from '@genesislcap/foundation-comms';
|
|
8
|
-
import { ElementStyles } from '@microsoft/fast-element';
|
|
9
8
|
import { ErrorObject } from 'ajv';
|
|
10
9
|
import { ErrorTranslator } from '@jsonforms/core';
|
|
11
10
|
import { Expression } from '@genesislcap/foundation-criteria';
|
|
@@ -61,8 +60,6 @@ export const filtersRenderers: any[];
|
|
|
61
60
|
|
|
62
61
|
// @beta
|
|
63
62
|
export class Form extends FoundationElement {
|
|
64
|
-
// (undocumented)
|
|
65
|
-
connectedCallback(): void;
|
|
66
63
|
// @public
|
|
67
64
|
data: any;
|
|
68
65
|
// (undocumented)
|
|
@@ -89,12 +86,6 @@ export class Form extends FoundationElement {
|
|
|
89
86
|
uischema: UISchemaElement;
|
|
90
87
|
}
|
|
91
88
|
|
|
92
|
-
// @beta (undocumented)
|
|
93
|
-
export const foundationFormStyles: ElementStyles;
|
|
94
|
-
|
|
95
|
-
// @beta (undocumented)
|
|
96
|
-
export const foundationFormTemplate: ViewTemplate<Form, any>;
|
|
97
|
-
|
|
98
89
|
// @public (undocumented)
|
|
99
90
|
export const genesisErrorTranslator: ErrorTranslator;
|
|
100
91
|
|
|
@@ -134,7 +125,6 @@ export type UiSchemaElement = {
|
|
|
134
125
|
type: UiSchemaElementType;
|
|
135
126
|
scope: string;
|
|
136
127
|
label?: string;
|
|
137
|
-
placeholder?: string;
|
|
138
128
|
options?: UiSchemaElementOptions;
|
|
139
129
|
};
|
|
140
130
|
|
|
@@ -161,7 +151,7 @@ export type UiSchemaElementType = 'Control' | 'VerticalLayout' | any;
|
|
|
161
151
|
|
|
162
152
|
// Warnings were encountered during analysis:
|
|
163
153
|
//
|
|
164
|
-
// src/types.ts:
|
|
154
|
+
// src/types.ts:50:3 - (ae-forgotten-export) The symbol "DispatchRenderer" needs to be exported by the entry point index.d.ts
|
|
165
155
|
|
|
166
156
|
// (No @packageDocumentation comment for this package)
|
|
167
157
|
|
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.30.
|
|
4
|
+
"version": "14.30.3",
|
|
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.30.
|
|
47
|
-
"@genesislcap/genx": "14.30.
|
|
46
|
+
"@genesislcap/foundation-testing": "^14.30.3",
|
|
47
|
+
"@genesislcap/genx": "^14.30.3",
|
|
48
48
|
"@playwright/test": "^1.18.1",
|
|
49
49
|
"@types/json-schema": "^7.0.11",
|
|
50
50
|
"@types/ua-parser-js": "^0.7.36",
|
|
@@ -59,10 +59,10 @@
|
|
|
59
59
|
"watchlist": "^0.3.1"
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"@genesislcap/foundation-comms": "14.30.
|
|
63
|
-
"@genesislcap/foundation-criteria": "14.30.
|
|
64
|
-
"@genesislcap/foundation-ui": "14.30.
|
|
65
|
-
"@genesislcap/foundation-utils": "14.30.
|
|
62
|
+
"@genesislcap/foundation-comms": "^14.30.3",
|
|
63
|
+
"@genesislcap/foundation-criteria": "^14.30.3",
|
|
64
|
+
"@genesislcap/foundation-ui": "^14.30.3",
|
|
65
|
+
"@genesislcap/foundation-utils": "^14.30.3",
|
|
66
66
|
"@jsonforms/core": "^3.0.0",
|
|
67
67
|
"@microsoft/fast-components": "^2.21.3",
|
|
68
68
|
"@microsoft/fast-element": "^1.7.0",
|
|
@@ -83,5 +83,5 @@
|
|
|
83
83
|
"access": "public"
|
|
84
84
|
},
|
|
85
85
|
"customElements": "dist/custom-elements.json",
|
|
86
|
-
"gitHead": "
|
|
86
|
+
"gitHead": "5f2858b6708b64c5ed6378fc54e09629539a563a"
|
|
87
87
|
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@genesislcap/foundation-forms](./foundation-forms.md) > [Form](./foundation-forms.form.md) > [connectedCallback](./foundation-forms.form.connectedcallback.md)
|
|
4
|
-
|
|
5
|
-
## Form.connectedCallback() method
|
|
6
|
-
|
|
7
|
-
> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
|
|
8
|
-
>
|
|
9
|
-
|
|
10
|
-
**Signature:**
|
|
11
|
-
|
|
12
|
-
```typescript
|
|
13
|
-
connectedCallback(): void;
|
|
14
|
-
```
|
|
15
|
-
**Returns:**
|
|
16
|
-
|
|
17
|
-
void
|
|
18
|
-
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@genesislcap/foundation-forms](./foundation-forms.md) > [foundationFormStyles](./foundation-forms.foundationformstyles.md)
|
|
4
|
-
|
|
5
|
-
## foundationFormStyles variable
|
|
6
|
-
|
|
7
|
-
> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
|
|
8
|
-
>
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
**Signature:**
|
|
12
|
-
|
|
13
|
-
```typescript
|
|
14
|
-
foundationFormStyles: import("@microsoft/fast-element").ElementStyles
|
|
15
|
-
```
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@genesislcap/foundation-forms](./foundation-forms.md) > [foundationFormTemplate](./foundation-forms.foundationformtemplate.md)
|
|
4
|
-
|
|
5
|
-
## foundationFormTemplate variable
|
|
6
|
-
|
|
7
|
-
> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
|
|
8
|
-
>
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
**Signature:**
|
|
12
|
-
|
|
13
|
-
```typescript
|
|
14
|
-
foundationFormTemplate: import("@microsoft/fast-element").ViewTemplate<Form, any>
|
|
15
|
-
```
|