@genesislcap/foundation-forms 14.41.0 → 14.41.2-bny.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.
Files changed (31) hide show
  1. package/dist/custom-elements.json +18 -2
  2. package/dist/dts/form.d.ts +1 -0
  3. package/dist/dts/form.d.ts.map +1 -1
  4. package/dist/dts/form.styles.d.ts +1 -0
  5. package/dist/dts/form.styles.d.ts.map +1 -1
  6. package/dist/dts/form.template.d.ts +1 -0
  7. package/dist/dts/form.template.d.ts.map +1 -1
  8. package/dist/dts/index.d.ts +2 -0
  9. package/dist/dts/index.d.ts.map +1 -1
  10. package/dist/dts/jsonforms/renderers/LayoutVertical2ColumnsRenderer.d.ts.map +1 -1
  11. package/dist/dts/jsonforms/renderers/StringControlRenderer.d.ts.map +1 -1
  12. package/dist/dts/types.d.ts +1 -0
  13. package/dist/dts/types.d.ts.map +1 -1
  14. package/dist/esm/form.js +8 -0
  15. package/dist/esm/form.styles.js +4 -2
  16. package/dist/esm/form.template.js +3 -2
  17. package/dist/esm/index.js +2 -0
  18. package/dist/esm/jsonforms/renderers/ConnectedSelectControlRenderer.js +1 -1
  19. package/dist/esm/jsonforms/renderers/LayoutVertical2ColumnsRenderer.js +1 -2
  20. package/dist/esm/jsonforms/renderers/NumberControlRenderer.js +2 -2
  21. package/dist/esm/jsonforms/renderers/StringControlRenderer.js +2 -5
  22. package/dist/foundation-forms.api.json +101 -1
  23. package/dist/foundation-forms.d.ts +9 -0
  24. package/docs/api/foundation-forms.form.connectedcallback.md +18 -0
  25. package/docs/api/foundation-forms.form.md +1 -0
  26. package/docs/api/foundation-forms.foundationformstyles.md +15 -0
  27. package/docs/api/foundation-forms.foundationformtemplate.md +15 -0
  28. package/docs/api/foundation-forms.md +2 -0
  29. package/docs/api/foundation-forms.uischemaelement.md +1 -0
  30. package/docs/api-report.md +11 -1
  31. package/package.json +8 -8
@@ -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 <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`"
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 <slot name=\"userActions\" part=\"userActions\" 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 </slot>\n `\n )}\n </template>\n`"
33
33
  }
34
34
  ],
35
35
  "exports": [
@@ -227,6 +227,22 @@
227
227
  "package": "./form"
228
228
  }
229
229
  },
230
+ {
231
+ "kind": "js",
232
+ "name": "*",
233
+ "declaration": {
234
+ "name": "*",
235
+ "package": "./form.styles"
236
+ }
237
+ },
238
+ {
239
+ "kind": "js",
240
+ "name": "*",
241
+ "declaration": {
242
+ "name": "*",
243
+ "package": "./form.template"
244
+ }
245
+ },
230
246
  {
231
247
  "kind": "js",
232
248
  "name": "*",
@@ -1571,7 +1587,7 @@
1571
1587
  {
1572
1588
  "kind": "variable",
1573
1589
  "name": "LayoutVertical2ColumnsRendererTemplate",
1574
- "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`"
1590
+ "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`"
1575
1591
  },
1576
1592
  {
1577
1593
  "kind": "variable",
@@ -97,6 +97,7 @@ export declare class Form extends FoundationElement {
97
97
  * @internal
98
98
  */
99
99
  onChange(event: CustomEvent): void;
100
+ connectedCallback(): void;
100
101
  disconnectedCallback(): void;
101
102
  /**
102
103
  * Reset the form state
@@ -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,E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AACF;;;;;GAKG;AAEH,qBAKa,IAAK,SAAQ,iBAAiB;IACzC;;;;OAIG;IACG,YAAY,EAAE,MAAM,CAAC;YACb,mBAAmB;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;IA2Bb;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,WAAW;IAQ3B,iBAAiB,IAAI,IAAI;IAKzB,oBAAoB;IAMpB;;;OAGG;IACH,KAAK;CAIN"}
@@ -1,2 +1,3 @@
1
+ /** @beta */
1
2
  export declare const foundationFormStyles: import("@microsoft/fast-element").ElementStyles;
2
3
  //# sourceMappingURL=form.styles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"form.styles.d.ts","sourceRoot":"","sources":["../../src/form.styles.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,oBAAoB,iDAoDhC,CAAC"}
1
+ {"version":3,"file":"form.styles.d.ts","sourceRoot":"","sources":["../../src/form.styles.ts"],"names":[],"mappings":"AAKA,YAAY;AACZ,eAAO,MAAM,oBAAoB,iDAqDhC,CAAC"}
@@ -1,3 +1,4 @@
1
1
  import type { Form } from './form';
2
+ /** @beta */
2
3
  export declare const foundationFormTemplate: import("@microsoft/fast-element").ViewTemplate<Form, any>;
3
4
  //# sourceMappingURL=form.template.d.ts.map
@@ -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,eAAO,MAAM,sBAAsB,2DA2BlC,CAAC"}
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,YAAY;AACZ,eAAO,MAAM,sBAAsB,2DA2BlC,CAAC"}
@@ -1,5 +1,7 @@
1
1
  export * from './filters';
2
2
  export * from './form';
3
+ export * from './form.styles';
4
+ export * from './form.template';
3
5
  export * from './types';
4
6
  export * from './utils';
5
7
  //# sourceMappingURL=index.d.ts.map
@@ -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,SAAS,CAAC;AACxB,cAAc,SAAS,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,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,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,0DA8BlD,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,GAIzC,CAAC"}
1
+ {"version":3,"file":"LayoutVertical2ColumnsRenderer.d.ts","sourceRoot":"","sources":["../../../../src/jsonforms/renderers/LayoutVertical2ColumnsRenderer.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,sCAAsC,0DA6BlD,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,GAIzC,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,0EAwB9D,CAAC;AACF,eAAO,MAAM,6BAA6B,uEAEzC,CAAC"}
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,0EAqB9D,CAAC;AACF,eAAO,MAAM,6BAA6B,uEAEzC,CAAC"}
@@ -27,6 +27,7 @@ export type UiSchemaElement = {
27
27
  type: UiSchemaElementType;
28
28
  scope: string;
29
29
  label?: string;
30
+ placeholder?: string;
30
31
  options?: UiSchemaElementOptions;
31
32
  };
32
33
  /** @public */
@@ -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,sBA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IACrB,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,6 +106,9 @@ 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
+ }
109
112
  if (this.removeDataProperties()) {
110
113
  yield DOM.nextUpdate();
111
114
  }
@@ -136,8 +139,13 @@ let Form = class Form extends FoundationElement {
136
139
  this.errors = event.detail.errors;
137
140
  }
138
141
  }
142
+ connectedCallback() {
143
+ super.connectedCallback();
144
+ this.addEventListener('submit-button-clicked', this._submit);
145
+ }
139
146
  disconnectedCallback() {
140
147
  super.disconnectedCallback();
148
+ this.removeEventListener('submit-button-clicked', this._submit);
141
149
  this.reset();
142
150
  }
143
151
  /**
@@ -2,6 +2,7 @@ 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 */
5
6
  export const foundationFormStyles = css `
6
7
  :host {
7
8
  border: calc(${strokeWidth} * 1px) solid transparent;
@@ -34,10 +35,11 @@ export const foundationFormStyles = css `
34
35
 
35
36
  .actions {
36
37
  display: flex;
37
- flex-direction: column;
38
+ flex-direction: row;
38
39
  align-items: flex-end;
39
- justify-content: center;
40
+ justify-content: flex-end;
40
41
  padding: calc(${designUnit} * 2px);
42
+ gap: 10px;
41
43
  }
42
44
 
43
45
  .error {
@@ -9,6 +9,7 @@ ArrayListWrapper;
9
9
  CategorizationWrapper;
10
10
  ControlWrapper;
11
11
  DispatchRenderer;
12
+ /** @beta */
12
13
  export const foundationFormTemplate = html `
13
14
  <template>
14
15
  <json-forms
@@ -21,7 +22,7 @@ export const foundationFormTemplate = html `
21
22
  @data-change=${(x, c) => x.onChange(c.event)}
22
23
  ></json-forms>
23
24
  ${when((x) => !x.readonly, html `
24
- <div class="actions">
25
+ <slot name="userActions" part="userActions" class="actions">
25
26
  <fast-button
26
27
  @click="${(x) => x._submit()}"
27
28
  ?disable=${(x) => !x.submitting}
@@ -30,7 +31,7 @@ export const foundationFormTemplate = html `
30
31
  >
31
32
  Submit
32
33
  </fast-button>
33
- </div>
34
+ </slot>
34
35
  `)}
35
36
  </template>
36
37
  `;
package/dist/esm/index.js CHANGED
@@ -1,4 +1,6 @@
1
1
  export * from './filters';
2
2
  export * from './form';
3
+ export * from './form.styles';
4
+ export * from './form.template';
3
5
  export * from './types';
4
6
  export * from './utils';
@@ -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.label}
16
+ placeholder=${(x) => x.control.uischema.placeholder || x.control.label}
17
17
  ?disabled=${(x) => !x.control.enabled}
18
18
  @value-change=${(x, c) => {
19
19
  var _a;
@@ -4,8 +4,7 @@ import { LAYOUT2COLUMNS_RANK } from './RenderersRanks';
4
4
  export const LayoutVertical2ColumnsRendererTemplate = html `
5
5
  <template>
6
6
  <div
7
- style="max-width:600px;
8
- display: flex;
7
+ style="display: flex;
9
8
  flex-direction: row;
10
9
  flex-wrap: wrap;
11
10
  justify-content: space-between;"
@@ -10,18 +10,18 @@ export const NumberControlRendererTemplate = (prefix = 'zero') => html `
10
10
  ?submitted=${(x) => x.submitted}
11
11
  >
12
12
  <${prefix}-number-field
13
+ withFormatting=${(x) => { var _a; return (((_a = x.control.uischema.options) === null || _a === void 0 ? void 0 : _a.withoutFormatting) ? false : true); }}
13
14
  :options=${(x) => { var _a; return (_a = x.control.uischema.options) === null || _a === void 0 ? void 0 : _a.formatOptions; }}
14
15
  :value=${(x) => (x.control.data === undefined ? '' : String(x.control.data))}
15
16
  @change=${(x, c) => {
16
17
  const value = parseFloat(c.event.target.value);
17
18
  return x.control.handleChange(x.control.path, !isNaN(value) ? value : undefined);
18
19
  }}
19
- placeholder=${(x) => x.control.label}
20
+ placeholder=${(x) => x.control.uischema.placeholder || x.control.label}
20
21
  id=${(x) => x.control.path}
21
22
  data-test-id=${(x) => x.control.path}
22
23
  ?required=${(x) => x.control.required}
23
24
  ?disabled=${(x) => !x.control.enabled}
24
- withFormatting
25
25
  hideStep
26
26
  @blur=${(x) => x.onBlur()}
27
27
  style="width: 100%"
@@ -10,11 +10,8 @@ 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
- const inputValue = c.event.target.value;
15
- x.control.handleChange(x.control.path, inputValue === '' ? null : inputValue);
16
- }}
17
- placeholder=${(x) => x.control.label}
13
+ @change=${(x, c) => x.control.handleChange(x.control.path, c.event.target.value)}
14
+ placeholder=${(x) => x.control.uischema.placeholder || x.control.label}
18
15
  id=${(x) => x.control.path}
19
16
  data-test-id=${(x) => x.control.path}
20
17
  ?required=${(x) => x.control.required}
@@ -560,6 +560,37 @@
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
+ },
563
594
  {
564
595
  "kind": "Property",
565
596
  "canonicalReference": "@genesislcap/foundation-forms!Form#data:member",
@@ -816,6 +847,75 @@
816
847
  },
817
848
  "implementsTokenRanges": []
818
849
  },
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
+ },
819
919
  {
820
920
  "kind": "Variable",
821
921
  "canonicalReference": "@genesislcap/foundation-forms!genesisErrorTranslator:var",
@@ -1030,7 +1130,7 @@
1030
1130
  },
1031
1131
  {
1032
1132
  "kind": "Content",
1033
- "text": ";\n scope: string;\n label?: string;\n options?: "
1133
+ "text": ";\n scope: string;\n label?: string;\n placeholder?: string;\n options?: "
1034
1134
  },
1035
1135
  {
1036
1136
  "kind": "Reference",
@@ -1,4 +1,5 @@
1
1
  import { DatasourceOptions } from '@genesislcap/foundation-comms';
2
+ import { ElementStyles } from '@microsoft/fast-element';
2
3
  import { ErrorObject } from 'ajv';
3
4
  import { ErrorTranslator } from '@jsonforms/core';
4
5
  import { Expression } from '@genesislcap/foundation-criteria';
@@ -230,6 +231,7 @@ export declare class Form extends FoundationElement {
230
231
  * @internal
231
232
  */
232
233
  onChange(event: CustomEvent): void;
234
+ connectedCallback(): void;
233
235
  disconnectedCallback(): void;
234
236
  /**
235
237
  * Reset the form state
@@ -238,6 +240,12 @@ export declare class Form extends FoundationElement {
238
240
  reset(): void;
239
241
  }
240
242
 
243
+ /** @beta */
244
+ export declare const foundationFormStyles: ElementStyles;
245
+
246
+ /** @beta */
247
+ export declare const foundationFormTemplate: ViewTemplate<Form, any>;
248
+
241
249
  /** @public */
242
250
  export declare const genesisErrorTranslator: ErrorTranslator;
243
251
 
@@ -280,6 +288,7 @@ export declare type UiSchemaElement = {
280
288
  type: UiSchemaElementType;
281
289
  scope: string;
282
290
  label?: string;
291
+ placeholder?: string;
283
292
  options?: UiSchemaElementOptions;
284
293
  };
285
294
 
@@ -0,0 +1,18 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@genesislcap/foundation-forms](./foundation-forms.md) &gt; [Form](./foundation-forms.form.md) &gt; [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
+
@@ -31,6 +31,7 @@ export declare class Form extends FoundationElement
31
31
 
32
32
  | Method | Modifiers | Description |
33
33
  | --- | --- | --- |
34
+ | [connectedCallback()](./foundation-forms.form.connectedcallback.md) | | **_(BETA)_** |
34
35
  | [disconnectedCallback()](./foundation-forms.form.disconnectedcallback.md) | | **_(BETA)_** |
35
36
  | [reset()](./foundation-forms.form.reset.md) | | Reset the form state |
36
37
 
@@ -0,0 +1,15 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@genesislcap/foundation-forms](./foundation-forms.md) &gt; [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
+ ```
@@ -0,0 +1,15 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@genesislcap/foundation-forms](./foundation-forms.md) &gt; [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
+ ```
@@ -17,6 +17,8 @@
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)_** |
20
22
  | [genesisErrorTranslator](./foundation-forms.genesiserrortranslator.md) | |
21
23
  | [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. |
22
24
  | [renderers](./foundation-forms.renderers.md) | |
@@ -12,6 +12,7 @@ export type UiSchemaElement = {
12
12
  type: UiSchemaElementType;
13
13
  scope: string;
14
14
  label?: string;
15
+ placeholder?: string;
15
16
  options?: UiSchemaElementOptions;
16
17
  };
17
18
  ```
@@ -5,6 +5,7 @@
5
5
  ```ts
6
6
 
7
7
  import { DatasourceOptions } from '@genesislcap/foundation-comms';
8
+ import { ElementStyles } from '@microsoft/fast-element';
8
9
  import { ErrorObject } from 'ajv';
9
10
  import { ErrorTranslator } from '@jsonforms/core';
10
11
  import { Expression } from '@genesislcap/foundation-criteria';
@@ -60,6 +61,8 @@ export const filtersRenderers: any[];
60
61
 
61
62
  // @beta
62
63
  export class Form extends FoundationElement {
64
+ // (undocumented)
65
+ connectedCallback(): void;
63
66
  // @public
64
67
  data: any;
65
68
  // (undocumented)
@@ -86,6 +89,12 @@ export class Form extends FoundationElement {
86
89
  uischema: UISchemaElement;
87
90
  }
88
91
 
92
+ // @beta (undocumented)
93
+ export const foundationFormStyles: ElementStyles;
94
+
95
+ // @beta (undocumented)
96
+ export const foundationFormTemplate: ViewTemplate<Form, any>;
97
+
89
98
  // @public (undocumented)
90
99
  export const genesisErrorTranslator: ErrorTranslator;
91
100
 
@@ -125,6 +134,7 @@ export type UiSchemaElement = {
125
134
  type: UiSchemaElementType;
126
135
  scope: string;
127
136
  label?: string;
137
+ placeholder?: string;
128
138
  options?: UiSchemaElementOptions;
129
139
  };
130
140
 
@@ -151,7 +161,7 @@ export type UiSchemaElementType = 'Control' | 'VerticalLayout' | any;
151
161
 
152
162
  // Warnings were encountered during analysis:
153
163
  //
154
- // src/types.ts:50:3 - (ae-forgotten-export) The symbol "DispatchRenderer" needs to be exported by the entry point index.d.ts
164
+ // src/types.ts:51:3 - (ae-forgotten-export) The symbol "DispatchRenderer" needs to be exported by the entry point index.d.ts
155
165
 
156
166
  // (No @packageDocumentation comment for this package)
157
167
 
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.41.0",
4
+ "version": "14.41.2-bny.1",
5
5
  "sideEffects": false,
6
6
  "license": "SEE LICENSE IN license.txt",
7
7
  "main": "dist/esm/index.js",
@@ -40,17 +40,17 @@
40
40
  "test:debug": "genx test --debug"
41
41
  },
42
42
  "devDependencies": {
43
- "@genesislcap/foundation-testing": "^14.41.0",
44
- "@genesislcap/genx": "^14.41.0",
43
+ "@genesislcap/foundation-testing": "14.41.2-bny.1",
44
+ "@genesislcap/genx": "14.41.2-bny.1",
45
45
  "@types/json-schema": "^7.0.11",
46
46
  "@types/ua-parser-js": "^0.7.36",
47
47
  "analytics": "^0.8.0"
48
48
  },
49
49
  "dependencies": {
50
- "@genesislcap/foundation-comms": "^14.41.0",
51
- "@genesislcap/foundation-criteria": "^14.41.0",
52
- "@genesislcap/foundation-ui": "^14.41.0",
53
- "@genesislcap/foundation-utils": "^14.41.0",
50
+ "@genesislcap/foundation-comms": "14.41.2-bny.1",
51
+ "@genesislcap/foundation-criteria": "14.41.2-bny.1",
52
+ "@genesislcap/foundation-ui": "14.41.2-bny.1",
53
+ "@genesislcap/foundation-utils": "14.41.2-bny.1",
54
54
  "@jsonforms/core": "^3.0.0",
55
55
  "@microsoft/fast-components": "^2.21.3",
56
56
  "@microsoft/fast-element": "^1.7.0",
@@ -71,5 +71,5 @@
71
71
  "access": "public"
72
72
  },
73
73
  "customElements": "dist/custom-elements.json",
74
- "gitHead": "98799a829ab05cf534ddcfac6e41b0244538d0ab"
74
+ "gitHead": "4892bb140cea556c54d4a816abe774da574e9eb1"
75
75
  }