@genesislcap/foundation-forms 14.163.0 → 14.164.0

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.
@@ -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 ${(x) => x.computedLabel}\n </div>\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`"
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"
@@ -1866,7 +1887,7 @@
1866
1887
  {
1867
1888
  "kind": "variable",
1868
1889
  "name": "LayoutHorizontalRendererTemplate",
1869
- "default": "html`\n <template>\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 </template>\n`"
1890
+ "default": "html`\n <template>\n ${layoutLabelTemplate}\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 </template>\n`"
1870
1891
  },
1871
1892
  {
1872
1893
  "kind": "variable",
@@ -1900,10 +1921,15 @@
1900
1921
  "kind": "javascript-module",
1901
1922
  "path": "src/jsonforms/renderers/LayoutRenderer.ts",
1902
1923
  "declarations": [
1924
+ {
1925
+ "kind": "variable",
1926
+ "name": "layoutLabelTemplate",
1927
+ "default": "html`\n ${when(\n (x) => x.control.label,\n html`\n <div style=\"color: var(--neutral-foreground-hint);\">${(x) => x.control.label}</div>\n `,\n )}\n`"
1928
+ },
1903
1929
  {
1904
1930
  "kind": "variable",
1905
1931
  "name": "LayoutRendererTemplate",
1906
- "default": "html`\n <template>\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 </template>\n`"
1932
+ "default": "html`\n <template>\n <div>\n ${layoutLabelTemplate}\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 </template>\n`"
1907
1933
  },
1908
1934
  {
1909
1935
  "kind": "variable",
@@ -1915,6 +1941,14 @@
1915
1941
  }
1916
1942
  ],
1917
1943
  "exports": [
1944
+ {
1945
+ "kind": "js",
1946
+ "name": "layoutLabelTemplate",
1947
+ "declaration": {
1948
+ "name": "layoutLabelTemplate",
1949
+ "module": "src/jsonforms/renderers/LayoutRenderer.ts"
1950
+ }
1951
+ },
1918
1952
  {
1919
1953
  "kind": "js",
1920
1954
  "name": "LayoutRendererTemplate",
@@ -1977,7 +2011,7 @@
1977
2011
  {
1978
2012
  "kind": "variable",
1979
2013
  "name": "LayoutVertical2ColumnsRendererTemplate",
1980
- "default": "html`\n <template>\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 `,\n )}\n </div>\n </template>\n`"
2014
+ "default": "html`\n <template>\n ${layoutLabelTemplate}\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 `,\n )}\n </div>\n </template>\n`"
1981
2015
  },
1982
2016
  {
1983
2017
  "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,0EAqB5D,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,aAMjC,CAAC"}
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: any;
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,EAEZ,MAAM,yBAAyB,CAAC;AAEjC,eAAO,MAAM,8BAA8B,0DA4B1C,CAAC;AA2BF,qBAKa,cAAe,SAAQ,WAAW;IACjC,OAAO,MAAC;IACR,OAAO,MAAC;IAEpB,IACI,eAAe,YAOlB;IAED,IACI,aAAa,WAMhB;CACF"}
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":"LayoutHorizontalRenderer.d.ts","sourceRoot":"","sources":["../../../../src/jsonforms/renderers/LayoutHorizontalRenderer.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,gCAAgC,0DA4B5C,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,GAInC,CAAC"}
1
+ {"version":3,"file":"LayoutHorizontalRenderer.d.ts","sourceRoot":"","sources":["../../../../src/jsonforms/renderers/LayoutHorizontalRenderer.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,gCAAgC,0DA6B5C,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,GAInC,CAAC"}
@@ -1,3 +1,4 @@
1
+ export declare const layoutLabelTemplate: import("@microsoft/fast-element").ViewTemplate<any, any>;
1
2
  export declare const LayoutRendererTemplate: import("@microsoft/fast-element").ViewTemplate<any, any>;
2
3
  export declare const LayoutRendererEntry: any;
3
4
  //# sourceMappingURL=LayoutRenderer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"LayoutRenderer.d.ts","sourceRoot":"","sources":["../../../../src/jsonforms/renderers/LayoutRenderer.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,sBAAsB,0DAuBlC,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,GAIjC,CAAC"}
1
+ {"version":3,"file":"LayoutRenderer.d.ts","sourceRoot":"","sources":["../../../../src/jsonforms/renderers/LayoutRenderer.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,mBAAmB,0DAO/B,CAAC;AAEF,eAAO,MAAM,sBAAsB,0DAwBlC,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":"AAIA,eAAO,MAAM,sCAAsC,0DA+BlD,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,GAIzC,CAAC"}
1
+ {"version":3,"file":"LayoutVertical2ColumnsRenderer.d.ts","sourceRoot":"","sources":["../../../../src/jsonforms/renderers/LayoutVertical2ColumnsRenderer.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,sCAAsC,0DAgClD,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,GAIzC,CAAC"}
@@ -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
@@ -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;;;KAGK;AACL,MAAM,MAAM,mBAAmB,GAC3B,SAAS,GACT,gBAAgB,GAChB,wBAAwB,GACxB,gBAAgB,GAChB,OAAO,GACP,SAAS,GACT,kBAAkB,CAAC;AAEvB;;;GAGG;AACH,MAAM,MAAM,sBAAsB,GAAG,UAAU,GAAG,YAAY,CAAC;AAE/D;;;GAGG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;OAGG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC;;;OAGG;IACH,gBAAgB,CAAC,EAAE,iBAAiB,CAAC;IACrC;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;CACd,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC;;;;OAIG;IACH,aAAa,CAAC,EAAE,QAAQ,CAAC;CAC1B,CAAC;AAEF;;;G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,GAC9B,yBAAyB,GACzB,oBAAoB,GACpB,6BAA6B,GAC7B,oBAAoB,GACpB,sBAAsB,GACtB,qBAAqB,GACrB,uBAAuB,CAAC;AAE5B;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B;;;SAGK;IACL,IAAI,EAAE,mBAAmB,CAAC;IAC1B;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,OAAO,CAAC,EAAE,sBAAsB,CAAC;IACjC;;;OAGG;IACH,IAAI,CAAC,EAAE,IAAI,CAAC;CACb,CAAC;AAEF,KAAK,IAAI,GAAG;IACV,SAAS,EAAE,oBAAoB,CAAC;IAChC,MAAM,EAAE,UAAU,CAAC;CACpB,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,QAAQ,GAAG;IACrB;;;SAGK;IACL,IAAI,EAAE,mBAAmB,CAAC;IAC1B;;;;OAIG;IACH,QAAQ,EAAE,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
- ></${prefix}-checkbox>
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
- <div for="${(x) => x.control.path + '-wrapper'}" class="label">
13
- ${(x) => x.computedLabel}
14
- </div>
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: rgb(135, 155, 166);
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);
@@ -1,8 +1,10 @@
1
1
  import { mapStateToLayoutProps, rankWith } from '@jsonforms/core';
2
2
  import { html, repeat } from '@microsoft/fast-element';
3
+ import { layoutLabelTemplate } from './LayoutRenderer';
3
4
  import { LAYOUT_HORIZONTAL_RANK } from './RenderersRanks';
4
5
  export const LayoutHorizontalRendererTemplate = html `
5
6
  <template>
7
+ ${layoutLabelTemplate}
6
8
  <div
7
9
  style="
8
10
  display: flex;
@@ -1,9 +1,15 @@
1
1
  import { isLayout, mapStateToLayoutProps, rankWith } from '@jsonforms/core';
2
- import { html, repeat } from '@microsoft/fast-element';
2
+ import { html, repeat, when } from '@microsoft/fast-element';
3
3
  import { LAYOUT_RANK } from './RenderersRanks';
4
+ export const layoutLabelTemplate = html `
5
+ ${when((x) => x.control.label, html `
6
+ <div style="color: var(--neutral-foreground-hint);">${(x) => x.control.label}</div>
7
+ `)}
8
+ `;
4
9
  export const LayoutRendererTemplate = html `
5
10
  <template>
6
11
  <div>
12
+ ${layoutLabelTemplate}
7
13
  ${repeat((x) => x.control.uischema.elements, html `
8
14
  <dispatch-renderer
9
15
  ?submitted=${(x, ctx) => ctx.parent.submitted}
@@ -1,8 +1,10 @@
1
1
  import { mapStateToLayoutProps, rankWith } from '@jsonforms/core';
2
2
  import { html, repeat } from '@microsoft/fast-element';
3
+ import { layoutLabelTemplate } from './LayoutRenderer';
3
4
  import { LAYOUT2COLUMNS_RANK } from './RenderersRanks';
4
5
  export const LayoutVertical2ColumnsRendererTemplate = html `
5
6
  <template>
7
+ ${layoutLabelTemplate}
6
8
  <div
7
9
  style="
8
10
  display: flex;
@@ -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": 6
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)
@@ -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:226:3 - (ae-forgotten-export) The symbol "DispatchRenderer" needs to be exported by the entry point index.d.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.163.0",
4
+ "version": "14.164.0",
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.163.0",
44
- "@genesislcap/genx": "14.163.0",
45
- "@genesislcap/rollup-builder": "14.163.0",
46
- "@genesislcap/ts-builder": "14.163.0",
47
- "@genesislcap/uvu-playwright-builder": "14.163.0",
48
- "@genesislcap/vite-builder": "14.163.0",
49
- "@genesislcap/webpack-builder": "14.163.0",
43
+ "@genesislcap/foundation-testing": "14.164.0",
44
+ "@genesislcap/genx": "14.164.0",
45
+ "@genesislcap/rollup-builder": "14.164.0",
46
+ "@genesislcap/ts-builder": "14.164.0",
47
+ "@genesislcap/uvu-playwright-builder": "14.164.0",
48
+ "@genesislcap/vite-builder": "14.164.0",
49
+ "@genesislcap/webpack-builder": "14.164.0",
50
50
  "@types/json-schema": "^7.0.11",
51
51
  "rimraf": "^3.0.2"
52
52
  },
53
53
  "dependencies": {
54
- "@genesislcap/foundation-comms": "14.163.0",
55
- "@genesislcap/foundation-criteria": "14.163.0",
56
- "@genesislcap/foundation-logger": "14.163.0",
57
- "@genesislcap/foundation-ui": "14.163.0",
58
- "@genesislcap/foundation-utils": "14.163.0",
54
+ "@genesislcap/foundation-comms": "14.164.0",
55
+ "@genesislcap/foundation-criteria": "14.164.0",
56
+ "@genesislcap/foundation-logger": "14.164.0",
57
+ "@genesislcap/foundation-ui": "14.164.0",
58
+ "@genesislcap/foundation-utils": "14.164.0",
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": "e141f8ae65838f2eb2f88f47da9d738566c2eda7"
79
+ "gitHead": "01048301d213303cb5ac16796191bb9903c890d5"
80
80
  }