@genesislcap/foundation-forms 14.163.0 → 14.164.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.
- package/dist/custom-elements.json +78 -6
- package/dist/dts/jsonforms/renderers/BooleanControlRenderer.d.ts.map +1 -1
- package/dist/dts/jsonforms/renderers/ControlWrapperRenderer.d.ts +2 -1
- package/dist/dts/jsonforms/renderers/ControlWrapperRenderer.d.ts.map +1 -1
- package/dist/dts/jsonforms/renderers/LayoutGroupRenderer.d.ts.map +1 -1
- package/dist/dts/jsonforms/renderers/LayoutHorizontalRenderer.d.ts.map +1 -1
- package/dist/dts/jsonforms/renderers/LayoutRenderer.d.ts +5 -0
- package/dist/dts/jsonforms/renderers/LayoutRenderer.d.ts.map +1 -1
- package/dist/dts/jsonforms/renderers/LayoutVertical2ColumnsRenderer.d.ts.map +1 -1
- package/dist/dts/types.d.ts +11 -0
- package/dist/dts/types.d.ts.map +1 -1
- package/dist/esm/jsonforms/renderers/BooleanControlRenderer.js +2 -1
- package/dist/esm/jsonforms/renderers/ControlWrapperRenderer.js +15 -6
- package/dist/esm/jsonforms/renderers/LayoutGroupRenderer.js +21 -19
- package/dist/esm/jsonforms/renderers/LayoutHorizontalRenderer.js +17 -13
- package/dist/esm/jsonforms/renderers/LayoutRenderer.js +41 -12
- package/dist/esm/jsonforms/renderers/LayoutVertical2ColumnsRenderer.js +23 -19
- package/dist/foundation-forms.api.json +10 -1
- package/dist/foundation-forms.d.ts +12 -0
- package/docs/api/foundation-forms.uischemaelement.md +1 -0
- package/docs/api-report.md +5 -1
- package/package.json +14 -14
|
@@ -1439,7 +1439,7 @@
|
|
|
1439
1439
|
{
|
|
1440
1440
|
"kind": "variable",
|
|
1441
1441
|
"name": "ControlWrapperRendererTemplate",
|
|
1442
|
-
"default": "html`\n <template>\n ${when(\n (x) => x.control?.visible,\n html`\n <div\n class=\"wrapperRoot\"\n id=${(x) => x.control.path + '-wrapper'}\n data-test-id=${(x) => x.control.path + '-wrapper'}\n >\n <div for=\"${(x) => x.control.path + '-wrapper'}\" class=\"label\">\n
|
|
1442
|
+
"default": "html`\n <template>\n ${when(\n (x) => x.control?.visible,\n html`\n <div\n class=\"wrapperRoot\"\n id=${(x) => x.control.path + '-wrapper'}\n data-test-id=${(x) => x.control.path + '-wrapper'}\n >\n ${when(\n (x) => !x.hideLabel,\n html`\n <div for=\"${(x) => x.control.path + '-wrapper'}\" class=\"label\">\n ${(x) => x.computedLabel}\n </div>\n `,\n )}\n\n <div class=\"wrapper\">\n <slot></slot>\n </div>\n <div class=\"${(x) => (x.control.errors && x.touched ? 'error' : 'description')}\">\n ${(x) =>\n x.control.errors && x.touched\n ? x.control.errors\n : x.showDescription\n ? x.control.description\n : ''}\n </div>\n </div>\n `,\n )}\n </template>\n`"
|
|
1443
1443
|
},
|
|
1444
1444
|
{
|
|
1445
1445
|
"kind": "class",
|
|
@@ -1452,7 +1452,18 @@
|
|
|
1452
1452
|
},
|
|
1453
1453
|
{
|
|
1454
1454
|
"kind": "field",
|
|
1455
|
-
"name": "touched"
|
|
1455
|
+
"name": "touched",
|
|
1456
|
+
"type": {
|
|
1457
|
+
"text": "boolean"
|
|
1458
|
+
}
|
|
1459
|
+
},
|
|
1460
|
+
{
|
|
1461
|
+
"kind": "field",
|
|
1462
|
+
"name": "hideLabel",
|
|
1463
|
+
"type": {
|
|
1464
|
+
"text": "boolean"
|
|
1465
|
+
},
|
|
1466
|
+
"default": "false"
|
|
1456
1467
|
},
|
|
1457
1468
|
{
|
|
1458
1469
|
"kind": "field",
|
|
@@ -1465,6 +1476,16 @@
|
|
|
1465
1476
|
"readonly": true
|
|
1466
1477
|
}
|
|
1467
1478
|
],
|
|
1479
|
+
"attributes": [
|
|
1480
|
+
{
|
|
1481
|
+
"name": "hide-label",
|
|
1482
|
+
"type": {
|
|
1483
|
+
"text": "boolean"
|
|
1484
|
+
},
|
|
1485
|
+
"default": "false",
|
|
1486
|
+
"fieldName": "hideLabel"
|
|
1487
|
+
}
|
|
1488
|
+
],
|
|
1468
1489
|
"superclass": {
|
|
1469
1490
|
"name": "FASTElement",
|
|
1470
1491
|
"package": "@microsoft/fast-element"
|
|
@@ -1829,7 +1850,7 @@
|
|
|
1829
1850
|
{
|
|
1830
1851
|
"kind": "variable",
|
|
1831
1852
|
"name": "LayoutGroupRendererTemplate",
|
|
1832
|
-
"default": "html`\n <template>\n <div>\n
|
|
1853
|
+
"default": "html`\n <template>\n <layout-wrapper :control=${(x) => x.control} hide-label>\n <div>\n ${when(\n (x) => x.control.label,\n html`\n <div\n for=\"${(x) => x.control.path + '-wrapper'}\"\n style=\"color: rgb(135, 155, 166);\n margin-bottom: 4px;\n display: flex;\n justify-content: space-between;\"\n >\n ${(x) => x.control.label}\n </div>\n `,\n )}\n ${repeat(\n (x) => x.control.uischema.options.childElements,\n html`\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 :prefix=${(x, ctx) => ctx.parent.prefix}\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 `,\n )}\n </div>\n </layout-wrapper>\n </template>\n`"
|
|
1833
1854
|
},
|
|
1834
1855
|
{
|
|
1835
1856
|
"kind": "variable",
|
|
@@ -1866,7 +1887,7 @@
|
|
|
1866
1887
|
{
|
|
1867
1888
|
"kind": "variable",
|
|
1868
1889
|
"name": "LayoutHorizontalRendererTemplate",
|
|
1869
|
-
"default": "html`\n <template>\n <div\n
|
|
1890
|
+
"default": "html`\n <template>\n <layout-wrapper :control=${(x) => x.control}>\n <div\n style=\"\n display: flex;\n flex-direction: row;\n gap: 10px\"\n >\n ${repeat(\n (x) => x.control.uischema.elements,\n html`\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 :prefix=${(x, ctx) => ctx.parent.prefix}\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 `,\n )}\n </div>\n </layout-wrapper>\n </template>\n`"
|
|
1870
1891
|
},
|
|
1871
1892
|
{
|
|
1872
1893
|
"kind": "variable",
|
|
@@ -1900,10 +1921,45 @@
|
|
|
1900
1921
|
"kind": "javascript-module",
|
|
1901
1922
|
"path": "src/jsonforms/renderers/LayoutRenderer.ts",
|
|
1902
1923
|
"declarations": [
|
|
1924
|
+
{
|
|
1925
|
+
"kind": "class",
|
|
1926
|
+
"description": "",
|
|
1927
|
+
"name": "LayoutWrapper",
|
|
1928
|
+
"members": [
|
|
1929
|
+
{
|
|
1930
|
+
"kind": "field",
|
|
1931
|
+
"name": "control"
|
|
1932
|
+
},
|
|
1933
|
+
{
|
|
1934
|
+
"kind": "field",
|
|
1935
|
+
"name": "hideLabel",
|
|
1936
|
+
"type": {
|
|
1937
|
+
"text": "boolean"
|
|
1938
|
+
},
|
|
1939
|
+
"default": "false"
|
|
1940
|
+
}
|
|
1941
|
+
],
|
|
1942
|
+
"attributes": [
|
|
1943
|
+
{
|
|
1944
|
+
"name": "hide-label",
|
|
1945
|
+
"type": {
|
|
1946
|
+
"text": "boolean"
|
|
1947
|
+
},
|
|
1948
|
+
"default": "false",
|
|
1949
|
+
"fieldName": "hideLabel"
|
|
1950
|
+
}
|
|
1951
|
+
],
|
|
1952
|
+
"superclass": {
|
|
1953
|
+
"name": "FASTElement",
|
|
1954
|
+
"package": "@microsoft/fast-element"
|
|
1955
|
+
},
|
|
1956
|
+
"tagName": "layout-wrapper",
|
|
1957
|
+
"customElement": true
|
|
1958
|
+
},
|
|
1903
1959
|
{
|
|
1904
1960
|
"kind": "variable",
|
|
1905
1961
|
"name": "LayoutRendererTemplate",
|
|
1906
|
-
"default": "html`\n <template>\n <div>\n
|
|
1962
|
+
"default": "html`\n <template>\n <layout-wrapper :control=${(x) => x.control}>\n <div>\n ${repeat(\n (x) => x.control.uischema.elements,\n html`\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 :prefix=${(x, ctx) => ctx.parent.prefix}\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 `,\n )}\n </div>\n </layout-wrapper>\n </template>\n`"
|
|
1907
1963
|
},
|
|
1908
1964
|
{
|
|
1909
1965
|
"kind": "variable",
|
|
@@ -1915,6 +1971,22 @@
|
|
|
1915
1971
|
}
|
|
1916
1972
|
],
|
|
1917
1973
|
"exports": [
|
|
1974
|
+
{
|
|
1975
|
+
"kind": "js",
|
|
1976
|
+
"name": "LayoutWrapper",
|
|
1977
|
+
"declaration": {
|
|
1978
|
+
"name": "LayoutWrapper",
|
|
1979
|
+
"module": "src/jsonforms/renderers/LayoutRenderer.ts"
|
|
1980
|
+
}
|
|
1981
|
+
},
|
|
1982
|
+
{
|
|
1983
|
+
"kind": "custom-element-definition",
|
|
1984
|
+
"name": "layout-wrapper",
|
|
1985
|
+
"declaration": {
|
|
1986
|
+
"name": "LayoutWrapper",
|
|
1987
|
+
"module": "src/jsonforms/renderers/LayoutRenderer.ts"
|
|
1988
|
+
}
|
|
1989
|
+
},
|
|
1918
1990
|
{
|
|
1919
1991
|
"kind": "js",
|
|
1920
1992
|
"name": "LayoutRendererTemplate",
|
|
@@ -1977,7 +2049,7 @@
|
|
|
1977
2049
|
{
|
|
1978
2050
|
"kind": "variable",
|
|
1979
2051
|
"name": "LayoutVertical2ColumnsRendererTemplate",
|
|
1980
|
-
"default": "html`\n <template>\n <div\n
|
|
2052
|
+
"default": "html`\n <template>\n <layout-wrapper :control=${(x) => x.control}>\n <div\n style=\"\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 :prefix=${(x, ctx) => ctx.parent.prefix}\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 </div>\n `,\n )}\n </layout-wrapper>\n </template>\n`"
|
|
1981
2053
|
},
|
|
1982
2054
|
{
|
|
1983
2055
|
"kind": "variable",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BooleanControlRenderer.d.ts","sourceRoot":"","sources":["../../../../src/jsonforms/renderers/BooleanControlRenderer.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAGvD,eAAO,MAAM,8BAA8B,YAAY,MAAM,
|
|
1
|
+
{"version":3,"file":"BooleanControlRenderer.d.ts","sourceRoot":"","sources":["../../../../src/jsonforms/renderers/BooleanControlRenderer.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAGvD,eAAO,MAAM,8BAA8B,YAAY,MAAM,0EAsB5D,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,aAMjC,CAAC"}
|
|
@@ -2,7 +2,8 @@ import { FASTElement } from '@microsoft/fast-element';
|
|
|
2
2
|
export declare const ControlWrapperRendererTemplate: import("@microsoft/fast-element").ViewTemplate<any, any>;
|
|
3
3
|
export declare class ControlWrapper extends FASTElement {
|
|
4
4
|
control: any;
|
|
5
|
-
touched:
|
|
5
|
+
touched: boolean;
|
|
6
|
+
hideLabel: boolean;
|
|
6
7
|
get showDescription(): boolean;
|
|
7
8
|
get computedLabel(): string;
|
|
8
9
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ControlWrapperRenderer.d.ts","sourceRoot":"","sources":["../../../../src/jsonforms/renderers/ControlWrapperRenderer.ts"],"names":[],"mappings":"AACA,OAAO,EAML,WAAW,
|
|
1
|
+
{"version":3,"file":"ControlWrapperRenderer.d.ts","sourceRoot":"","sources":["../../../../src/jsonforms/renderers/ControlWrapperRenderer.ts"],"names":[],"mappings":"AACA,OAAO,EAML,WAAW,EAGZ,MAAM,yBAAyB,CAAC;AAEjC,eAAO,MAAM,8BAA8B,0DAkC1C,CAAC;AA0BF,qBAKa,cAAe,SAAQ,WAAW;IACjC,OAAO,MAAC;IACR,OAAO,EAAE,OAAO,CAAC;IACuB,SAAS,EAAE,OAAO,CAAS;IAE/E,IACI,eAAe,YAOlB;IAED,IACI,aAAa,WAMhB;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LayoutGroupRenderer.d.ts","sourceRoot":"","sources":["../../../../src/jsonforms/renderers/LayoutGroupRenderer.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,2BAA2B,
|
|
1
|
+
{"version":3,"file":"LayoutGroupRenderer.d.ts","sourceRoot":"","sources":["../../../../src/jsonforms/renderers/LayoutGroupRenderer.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,2BAA2B,0DAuCvC,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,GAItC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LayoutHorizontalRenderer.d.ts","sourceRoot":"","sources":["../../../../src/jsonforms/renderers/LayoutHorizontalRenderer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LayoutHorizontalRenderer.d.ts","sourceRoot":"","sources":["../../../../src/jsonforms/renderers/LayoutHorizontalRenderer.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,gCAAgC,0DA8B5C,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,GAInC,CAAC"}
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
import { FASTElement } from '@microsoft/fast-element';
|
|
2
|
+
export declare class LayoutWrapper extends FASTElement {
|
|
3
|
+
control: any;
|
|
4
|
+
hideLabel: boolean;
|
|
5
|
+
}
|
|
1
6
|
export declare const LayoutRendererTemplate: import("@microsoft/fast-element").ViewTemplate<any, any>;
|
|
2
7
|
export declare const LayoutRendererEntry: any;
|
|
3
8
|
//# sourceMappingURL=LayoutRenderer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LayoutRenderer.d.ts","sourceRoot":"","sources":["../../../../src/jsonforms/renderers/LayoutRenderer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LayoutRenderer.d.ts","sourceRoot":"","sources":["../../../../src/jsonforms/renderers/LayoutRenderer.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,WAAW,EAKZ,MAAM,yBAAyB,CAAC;AAGjC,qBAiBa,aAAc,SAAQ,WAAW;IAChC,OAAO,MAAC;IACgC,SAAS,EAAE,OAAO,CAAS;CAChF;AAED,eAAO,MAAM,sBAAsB,0DAyBlC,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,GAIjC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LayoutVertical2ColumnsRenderer.d.ts","sourceRoot":"","sources":["../../../../src/jsonforms/renderers/LayoutVertical2ColumnsRenderer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LayoutVertical2ColumnsRenderer.d.ts","sourceRoot":"","sources":["../../../../src/jsonforms/renderers/LayoutVertical2ColumnsRenderer.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,sCAAsC,0DAiClD,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,GAIzC,CAAC"}
|
package/dist/dts/types.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { DatasourceOptions } from '@genesislcap/foundation-comms';
|
|
2
2
|
import { JsonFormsState, OwnPropsOfControl, RankedTester, StatePropsOfControl } from '@jsonforms/core';
|
|
3
|
+
import { RuleEffect, SchemaBasedCondition } from '@jsonforms/core';
|
|
3
4
|
import { ViewTemplate } from '@microsoft/fast-element';
|
|
4
5
|
import { ErrorObject } from 'ajv';
|
|
5
6
|
import { DispatchRenderer } from './jsonforms/renderers/dispatch-renderer';
|
|
@@ -164,6 +165,15 @@ export type UiSchemaElement = {
|
|
|
164
165
|
* @public
|
|
165
166
|
*/
|
|
166
167
|
options?: UiSchemaElementOptions;
|
|
168
|
+
/**
|
|
169
|
+
* Rule with effect and condition {@link https://jsonforms.io/docs/uischema/rules}
|
|
170
|
+
* @public
|
|
171
|
+
*/
|
|
172
|
+
rule?: Rule;
|
|
173
|
+
};
|
|
174
|
+
type Rule = {
|
|
175
|
+
condition: SchemaBasedCondition;
|
|
176
|
+
effect: RuleEffect;
|
|
167
177
|
};
|
|
168
178
|
/**
|
|
169
179
|
* The UI schema, which is passed to JSON Forms, describes the general layout of a form and is just a regular JSON object.
|
|
@@ -194,4 +204,5 @@ export type RendererEntry = {
|
|
|
194
204
|
tester: RankedTester;
|
|
195
205
|
mapper: (state: JsonFormsState, ownProps: OwnPropsOfControl) => StatePropsOfControl;
|
|
196
206
|
};
|
|
207
|
+
export {};
|
|
197
208
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/dts/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/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AE,eAAe,EAAE,CAAC;IAC5B;;;OAGG;IACH,OAAO,CAAC,EAAE,yBAAyB,CAAC;CACrC,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"}
|
|
@@ -8,6 +8,7 @@ export const BooleanControlRendererTemplate = (prefix = 'zero') => html `
|
|
|
8
8
|
:control=${(x) => x.control}
|
|
9
9
|
:touched=${(x) => x.touched}
|
|
10
10
|
?submitted=${(x) => x.submitted}
|
|
11
|
+
hide-label
|
|
11
12
|
>
|
|
12
13
|
<${prefix}-checkbox
|
|
13
14
|
?checked=${(x) => x.control.data}
|
|
@@ -20,7 +21,7 @@ export const BooleanControlRendererTemplate = (prefix = 'zero') => html `
|
|
|
20
21
|
}}
|
|
21
22
|
id=${(x) => x.control.path}
|
|
22
23
|
data-test-id=${(x) => x.control.path}
|
|
23
|
-
|
|
24
|
+
>${(x) => x.control.label}</${prefix}-checkbox>
|
|
24
25
|
</control-wrapper>
|
|
25
26
|
</template>
|
|
26
27
|
`;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
2
|
import { computeLabel, isDescriptionHidden } from '@jsonforms/core';
|
|
3
|
-
import { html, css, when, observable, customElement, FASTElement, volatile, } from '@microsoft/fast-element';
|
|
3
|
+
import { html, css, when, observable, customElement, FASTElement, volatile, attr, } from '@microsoft/fast-element';
|
|
4
4
|
export const ControlWrapperRendererTemplate = html `
|
|
5
5
|
<template>
|
|
6
6
|
${when((x) => { var _a; return (_a = x.control) === null || _a === void 0 ? void 0 : _a.visible; }, html `
|
|
@@ -9,9 +9,12 @@ export const ControlWrapperRendererTemplate = html `
|
|
|
9
9
|
id=${(x) => x.control.path + '-wrapper'}
|
|
10
10
|
data-test-id=${(x) => x.control.path + '-wrapper'}
|
|
11
11
|
>
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
${when((x) => !x.hideLabel, html `
|
|
13
|
+
<div for="${(x) => x.control.path + '-wrapper'}" class="label">
|
|
14
|
+
${(x) => x.computedLabel}
|
|
15
|
+
</div>
|
|
16
|
+
`)}
|
|
17
|
+
|
|
15
18
|
<div class="wrapper">
|
|
16
19
|
<slot></slot>
|
|
17
20
|
</div>
|
|
@@ -30,9 +33,8 @@ const styles = css `
|
|
|
30
33
|
.wrapperRoot {
|
|
31
34
|
margin-bottom: calc(var(--design-unit) * 4px);
|
|
32
35
|
}
|
|
33
|
-
|
|
34
36
|
.label {
|
|
35
|
-
color:
|
|
37
|
+
color: var(--neutral-foreground-hint);
|
|
36
38
|
margin-bottom: calc(var(--design-unit) * 1px);
|
|
37
39
|
display: flex;
|
|
38
40
|
justify-content: space-between;
|
|
@@ -51,6 +53,10 @@ const styles = css `
|
|
|
51
53
|
}
|
|
52
54
|
`;
|
|
53
55
|
let ControlWrapper = class ControlWrapper extends FASTElement {
|
|
56
|
+
constructor() {
|
|
57
|
+
super(...arguments);
|
|
58
|
+
this.hideLabel = false;
|
|
59
|
+
}
|
|
54
60
|
get showDescription() {
|
|
55
61
|
return !isDescriptionHidden(this.control.visible, this.control.description, this.control.isFocused, !!this.control.config.showUnfocusedDescription);
|
|
56
62
|
}
|
|
@@ -64,6 +70,9 @@ __decorate([
|
|
|
64
70
|
__decorate([
|
|
65
71
|
observable
|
|
66
72
|
], ControlWrapper.prototype, "touched", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
attr({ mode: 'boolean', attribute: 'hide-label' })
|
|
75
|
+
], ControlWrapper.prototype, "hideLabel", void 0);
|
|
67
76
|
__decorate([
|
|
68
77
|
volatile
|
|
69
78
|
], ControlWrapper.prototype, "showDescription", null);
|
|
@@ -3,34 +3,36 @@ import { html, repeat, when } from '@microsoft/fast-element';
|
|
|
3
3
|
import { LAYOUT_GROUP_RANK } from './RenderersRanks';
|
|
4
4
|
export const LayoutGroupRendererTemplate = html `
|
|
5
5
|
<template>
|
|
6
|
-
<
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
<layout-wrapper :control=${(x) => x.control} hide-label>
|
|
7
|
+
<div>
|
|
8
|
+
${when((x) => x.control.label, html `
|
|
9
|
+
<div
|
|
10
|
+
for="${(x) => x.control.path + '-wrapper'}"
|
|
11
|
+
style="color: rgb(135, 155, 166);
|
|
11
12
|
margin-bottom: 4px;
|
|
12
13
|
display: flex;
|
|
13
14
|
justify-content: space-between;"
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
15
|
+
>
|
|
16
|
+
${(x) => x.control.label}
|
|
17
|
+
</div>
|
|
18
|
+
`)}
|
|
19
|
+
${repeat((x) => x.control.uischema.options.childElements, html `
|
|
20
|
+
<dispatch-renderer
|
|
21
|
+
?submitted=${(x, ctx) => ctx.parent.submitted}
|
|
22
|
+
:dispatch=${(x, ctx) => ctx.parent.dispatch}
|
|
23
|
+
:jsonforms=${(x, ctx) => ctx.parent.jsonforms}
|
|
24
|
+
:prefix=${(x, ctx) => ctx.parent.prefix}
|
|
25
|
+
:props=${(x, ctx) => ({
|
|
25
26
|
uischema: x,
|
|
26
27
|
schema: ctx.parent.control.schema,
|
|
27
28
|
renderers: ctx.parent.control.renderers,
|
|
28
29
|
path: ctx.parent.control.path,
|
|
29
30
|
enabled: ctx.parent.control.enabled,
|
|
30
31
|
})}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
></dispatch-renderer>
|
|
33
|
+
`)}
|
|
34
|
+
</div>
|
|
35
|
+
</layout-wrapper>
|
|
34
36
|
</template>
|
|
35
37
|
`;
|
|
36
38
|
export const LayoutGroupRendererEntry = {
|
|
@@ -1,30 +1,34 @@
|
|
|
1
1
|
import { mapStateToLayoutProps, rankWith } from '@jsonforms/core';
|
|
2
2
|
import { html, repeat } from '@microsoft/fast-element';
|
|
3
|
+
import { LayoutWrapper } from './LayoutRenderer';
|
|
3
4
|
import { LAYOUT_HORIZONTAL_RANK } from './RenderersRanks';
|
|
5
|
+
LayoutWrapper;
|
|
4
6
|
export const LayoutHorizontalRendererTemplate = html `
|
|
5
7
|
<template>
|
|
6
|
-
<
|
|
7
|
-
|
|
8
|
+
<layout-wrapper :control=${(x) => x.control}>
|
|
9
|
+
<div
|
|
10
|
+
style="
|
|
8
11
|
display: flex;
|
|
9
12
|
flex-direction: row;
|
|
10
13
|
gap: 10px"
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
>
|
|
15
|
+
${repeat((x) => x.control.uischema.elements, html `
|
|
16
|
+
<dispatch-renderer
|
|
17
|
+
?submitted=${(x, ctx) => ctx.parent.submitted}
|
|
18
|
+
:dispatch=${(x, ctx) => ctx.parent.dispatch}
|
|
19
|
+
:jsonforms=${(x, ctx) => ctx.parent.jsonforms}
|
|
20
|
+
:prefix=${(x, ctx) => ctx.parent.prefix}
|
|
21
|
+
:props=${(x, ctx) => ({
|
|
19
22
|
uischema: x,
|
|
20
23
|
schema: ctx.parent.control.schema,
|
|
21
24
|
renderers: ctx.parent.control.renderers,
|
|
22
25
|
path: ctx.parent.control.path,
|
|
23
26
|
enabled: ctx.parent.control.enabled,
|
|
24
27
|
})}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
+
></dispatch-renderer>
|
|
29
|
+
`)}
|
|
30
|
+
</div>
|
|
31
|
+
</layout-wrapper>
|
|
28
32
|
</template>
|
|
29
33
|
`;
|
|
30
34
|
export const LayoutHorizontalEntry = {
|
|
@@ -1,25 +1,54 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
1
2
|
import { isLayout, mapStateToLayoutProps, rankWith } from '@jsonforms/core';
|
|
2
|
-
import { html, repeat } from '@microsoft/fast-element';
|
|
3
|
+
import { attr, customElement, FASTElement, html, observable, repeat, when, } from '@microsoft/fast-element';
|
|
3
4
|
import { LAYOUT_RANK } from './RenderersRanks';
|
|
5
|
+
let LayoutWrapper = class LayoutWrapper extends FASTElement {
|
|
6
|
+
constructor() {
|
|
7
|
+
super(...arguments);
|
|
8
|
+
this.hideLabel = false;
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
__decorate([
|
|
12
|
+
observable
|
|
13
|
+
], LayoutWrapper.prototype, "control", void 0);
|
|
14
|
+
__decorate([
|
|
15
|
+
attr({ mode: 'boolean', attribute: 'hide-label' })
|
|
16
|
+
], LayoutWrapper.prototype, "hideLabel", void 0);
|
|
17
|
+
LayoutWrapper = __decorate([
|
|
18
|
+
customElement({
|
|
19
|
+
name: 'layout-wrapper',
|
|
20
|
+
template: html `
|
|
21
|
+
${when((x) => x.control.label && !x.hideLabel, html `
|
|
22
|
+
<div style="color: var(--neutral-foreground-hint);">${(x) => x.control.label}</div>
|
|
23
|
+
`)}
|
|
24
|
+
${when((x) => { var _a; return (_a = x.control) === null || _a === void 0 ? void 0 : _a.visible; }, html `
|
|
25
|
+
<slot></slot>
|
|
26
|
+
`)}
|
|
27
|
+
`,
|
|
28
|
+
})
|
|
29
|
+
], LayoutWrapper);
|
|
30
|
+
export { LayoutWrapper };
|
|
4
31
|
export const LayoutRendererTemplate = html `
|
|
5
32
|
<template>
|
|
6
|
-
<
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
33
|
+
<layout-wrapper :control=${(x) => x.control}>
|
|
34
|
+
<div>
|
|
35
|
+
${repeat((x) => x.control.uischema.elements, html `
|
|
36
|
+
<dispatch-renderer
|
|
37
|
+
?submitted=${(x, ctx) => ctx.parent.submitted}
|
|
38
|
+
:dispatch=${(x, ctx) => ctx.parent.dispatch}
|
|
39
|
+
:jsonforms=${(x, ctx) => ctx.parent.jsonforms}
|
|
40
|
+
:prefix=${(x, ctx) => ctx.parent.prefix}
|
|
41
|
+
:props=${(x, ctx) => ({
|
|
14
42
|
uischema: x,
|
|
15
43
|
schema: ctx.parent.control.schema,
|
|
16
44
|
renderers: ctx.parent.control.renderers,
|
|
17
45
|
path: ctx.parent.control.path,
|
|
18
46
|
enabled: ctx.parent.control.enabled,
|
|
19
47
|
})}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
48
|
+
></dispatch-renderer>
|
|
49
|
+
`)}
|
|
50
|
+
</div>
|
|
51
|
+
</layout-wrapper>
|
|
23
52
|
</template>
|
|
24
53
|
`;
|
|
25
54
|
export const LayoutRendererEntry = {
|
|
@@ -1,33 +1,37 @@
|
|
|
1
1
|
import { mapStateToLayoutProps, rankWith } from '@jsonforms/core';
|
|
2
2
|
import { html, repeat } from '@microsoft/fast-element';
|
|
3
|
+
import { LayoutWrapper } from './LayoutRenderer';
|
|
3
4
|
import { LAYOUT2COLUMNS_RANK } from './RenderersRanks';
|
|
5
|
+
LayoutWrapper;
|
|
4
6
|
export const LayoutVertical2ColumnsRendererTemplate = html `
|
|
5
7
|
<template>
|
|
6
|
-
<
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
8
|
+
<layout-wrapper :control=${(x) => x.control}>
|
|
9
|
+
<div
|
|
10
|
+
style="
|
|
11
|
+
display: flex;
|
|
12
|
+
flex-direction: row;
|
|
13
|
+
flex-wrap: wrap;
|
|
14
|
+
justify-content: space-between;"
|
|
15
|
+
>
|
|
16
|
+
${repeat((x) => x.control.uischema.elements, html `
|
|
17
|
+
<div style="width: 49%">
|
|
18
|
+
<dispatch-renderer
|
|
19
|
+
?submitted=${(x, ctx) => ctx.parent.submitted}
|
|
20
|
+
:dispatch=${(x, ctx) => ctx.parent.dispatch}
|
|
21
|
+
:jsonforms=${(x, ctx) => ctx.parent.jsonforms}
|
|
22
|
+
:prefix=${(x, ctx) => ctx.parent.prefix}
|
|
23
|
+
:props=${(x, ctx) => ({
|
|
21
24
|
uischema: x,
|
|
22
25
|
schema: ctx.parent.control.schema,
|
|
23
26
|
renderers: ctx.parent.control.renderers,
|
|
24
27
|
path: ctx.parent.control.path,
|
|
25
28
|
enabled: ctx.parent.control.enabled,
|
|
26
29
|
})}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
30
|
+
></dispatch-renderer>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
`)}
|
|
34
|
+
</layout-wrapper>
|
|
31
35
|
</template>
|
|
32
36
|
`;
|
|
33
37
|
export const LayoutVertical2ColumnsEntry = {
|
|
@@ -1434,6 +1434,15 @@
|
|
|
1434
1434
|
"text": "UiSchemaElementOptions",
|
|
1435
1435
|
"canonicalReference": "@genesislcap/foundation-forms!UiSchemaElementOptions:type"
|
|
1436
1436
|
},
|
|
1437
|
+
{
|
|
1438
|
+
"kind": "Content",
|
|
1439
|
+
"text": ";\n rule?: "
|
|
1440
|
+
},
|
|
1441
|
+
{
|
|
1442
|
+
"kind": "Reference",
|
|
1443
|
+
"text": "Rule",
|
|
1444
|
+
"canonicalReference": "@genesislcap/foundation-forms!~Rule:type"
|
|
1445
|
+
},
|
|
1437
1446
|
{
|
|
1438
1447
|
"kind": "Content",
|
|
1439
1448
|
"text": ";\n}"
|
|
@@ -1448,7 +1457,7 @@
|
|
|
1448
1457
|
"name": "UiSchemaElement",
|
|
1449
1458
|
"typeTokenRange": {
|
|
1450
1459
|
"startIndex": 1,
|
|
1451
|
-
"endIndex":
|
|
1460
|
+
"endIndex": 8
|
|
1452
1461
|
}
|
|
1453
1462
|
},
|
|
1454
1463
|
{
|
|
@@ -14,6 +14,8 @@ import { LayoutCacheContainer } from '@genesislcap/foundation-utils';
|
|
|
14
14
|
import { Logger } from '@genesislcap/foundation-logger';
|
|
15
15
|
import { OwnPropsOfControl } from '@jsonforms/core';
|
|
16
16
|
import { RankedTester } from '@jsonforms/core';
|
|
17
|
+
import { RuleEffect } from '@jsonforms/core';
|
|
18
|
+
import { SchemaBasedCondition } from '@jsonforms/core';
|
|
17
19
|
import { StatePropsOfControl } from '@jsonforms/core';
|
|
18
20
|
import { UISchemaElement } from '@jsonforms/core';
|
|
19
21
|
import { ViewTemplate } from '@microsoft/fast-element';
|
|
@@ -729,6 +731,11 @@ export declare type RendererEntry = {
|
|
|
729
731
|
/** @public */
|
|
730
732
|
export declare const renderers: any[];
|
|
731
733
|
|
|
734
|
+
declare type Rule = {
|
|
735
|
+
condition: SchemaBasedCondition;
|
|
736
|
+
effect: RuleEffect;
|
|
737
|
+
};
|
|
738
|
+
|
|
732
739
|
/**
|
|
733
740
|
* Standard configuration options available for all renderers.
|
|
734
741
|
* @public
|
|
@@ -845,6 +852,11 @@ export declare type UiSchemaElement = {
|
|
|
845
852
|
* @public
|
|
846
853
|
*/
|
|
847
854
|
options?: UiSchemaElementOptions;
|
|
855
|
+
/**
|
|
856
|
+
* Rule with effect and condition {@link https://jsonforms.io/docs/uischema/rules}
|
|
857
|
+
* @public
|
|
858
|
+
*/
|
|
859
|
+
rule?: Rule;
|
|
848
860
|
};
|
|
849
861
|
|
|
850
862
|
/**
|
|
@@ -15,6 +15,7 @@ export type UiSchemaElement = {
|
|
|
15
15
|
label?: string;
|
|
16
16
|
placeholder?: string;
|
|
17
17
|
options?: UiSchemaElementOptions;
|
|
18
|
+
rule?: Rule;
|
|
18
19
|
};
|
|
19
20
|
```
|
|
20
21
|
**References:** [UiSchemaElementType](./foundation-forms.uischemaelementtype.md)<!-- -->, [UiSchemaElementOptions](./foundation-forms.uischemaelementoptions.md)
|
package/docs/api-report.md
CHANGED
|
@@ -20,6 +20,8 @@ import { LayoutCacheContainer } from '@genesislcap/foundation-utils';
|
|
|
20
20
|
import { Logger } from '@genesislcap/foundation-logger';
|
|
21
21
|
import { OwnPropsOfControl } from '@jsonforms/core';
|
|
22
22
|
import { RankedTester } from '@jsonforms/core';
|
|
23
|
+
import { RuleEffect } from '@jsonforms/core';
|
|
24
|
+
import { SchemaBasedCondition } from '@jsonforms/core';
|
|
23
25
|
import { StatePropsOfControl } from '@jsonforms/core';
|
|
24
26
|
import { UISchemaElement } from '@jsonforms/core';
|
|
25
27
|
import { ViewTemplate } from '@microsoft/fast-element';
|
|
@@ -208,6 +210,7 @@ export type UiSchemaElement = {
|
|
|
208
210
|
label?: string;
|
|
209
211
|
placeholder?: string;
|
|
210
212
|
options?: UiSchemaElementOptions;
|
|
213
|
+
rule?: Rule;
|
|
211
214
|
};
|
|
212
215
|
|
|
213
216
|
// @public
|
|
@@ -218,7 +221,8 @@ export type UiSchemaElementType = 'Control' | 'VerticalLayout' | 'LayoutVertical
|
|
|
218
221
|
|
|
219
222
|
// Warnings were encountered during analysis:
|
|
220
223
|
//
|
|
221
|
-
// src/types.ts:
|
|
224
|
+
// src/types.ts:203:3 - (ae-forgotten-export) The symbol "Rule" needs to be exported by the entry point index.d.ts
|
|
225
|
+
// src/types.ts:237:3 - (ae-forgotten-export) The symbol "DispatchRenderer" needs to be exported by the entry point index.d.ts
|
|
222
226
|
|
|
223
227
|
// (No @packageDocumentation comment for this package)
|
|
224
228
|
|
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.
|
|
4
|
+
"version": "14.164.1",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"license": "SEE LICENSE IN license.txt",
|
|
7
7
|
"main": "dist/esm/index.js",
|
|
@@ -40,22 +40,22 @@
|
|
|
40
40
|
"test:debug": "genx test --debug"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@genesislcap/foundation-testing": "14.
|
|
44
|
-
"@genesislcap/genx": "14.
|
|
45
|
-
"@genesislcap/rollup-builder": "14.
|
|
46
|
-
"@genesislcap/ts-builder": "14.
|
|
47
|
-
"@genesislcap/uvu-playwright-builder": "14.
|
|
48
|
-
"@genesislcap/vite-builder": "14.
|
|
49
|
-
"@genesislcap/webpack-builder": "14.
|
|
43
|
+
"@genesislcap/foundation-testing": "14.164.1",
|
|
44
|
+
"@genesislcap/genx": "14.164.1",
|
|
45
|
+
"@genesislcap/rollup-builder": "14.164.1",
|
|
46
|
+
"@genesislcap/ts-builder": "14.164.1",
|
|
47
|
+
"@genesislcap/uvu-playwright-builder": "14.164.1",
|
|
48
|
+
"@genesislcap/vite-builder": "14.164.1",
|
|
49
|
+
"@genesislcap/webpack-builder": "14.164.1",
|
|
50
50
|
"@types/json-schema": "^7.0.11",
|
|
51
51
|
"rimraf": "^3.0.2"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@genesislcap/foundation-comms": "14.
|
|
55
|
-
"@genesislcap/foundation-criteria": "14.
|
|
56
|
-
"@genesislcap/foundation-logger": "14.
|
|
57
|
-
"@genesislcap/foundation-ui": "14.
|
|
58
|
-
"@genesislcap/foundation-utils": "14.
|
|
54
|
+
"@genesislcap/foundation-comms": "14.164.1",
|
|
55
|
+
"@genesislcap/foundation-criteria": "14.164.1",
|
|
56
|
+
"@genesislcap/foundation-logger": "14.164.1",
|
|
57
|
+
"@genesislcap/foundation-ui": "14.164.1",
|
|
58
|
+
"@genesislcap/foundation-utils": "14.164.1",
|
|
59
59
|
"@json-schema-tools/dereferencer": "^1.6.1",
|
|
60
60
|
"@jsonforms/core": "^3.2.1",
|
|
61
61
|
"@microsoft/fast-components": "^2.30.6",
|
|
@@ -76,5 +76,5 @@
|
|
|
76
76
|
"access": "public"
|
|
77
77
|
},
|
|
78
78
|
"customElements": "dist/custom-elements.json",
|
|
79
|
-
"gitHead": "
|
|
79
|
+
"gitHead": "d175a3b7a55dd99fd709201d0212253a1c93c9f4"
|
|
80
80
|
}
|