@genesislcap/foundation-forms 14.44.0 → 14.45.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.
@@ -5,43 +5,14 @@
5
5
  {
6
6
  "kind": "javascript-module",
7
7
  "path": "src/form.styles.ts",
8
- "declarations": [
9
- {
10
- "kind": "variable",
11
- "name": "foundationFormStyles"
12
- }
13
- ],
14
- "exports": [
15
- {
16
- "kind": "js",
17
- "name": "foundationFormStyles",
18
- "declaration": {
19
- "name": "foundationFormStyles",
20
- "module": "src/form.styles.ts"
21
- }
22
- }
23
- ]
8
+ "declarations": [],
9
+ "exports": []
24
10
  },
25
11
  {
26
12
  "kind": "javascript-module",
27
13
  "path": "src/form.template.ts",
28
- "declarations": [
29
- {
30
- "kind": "variable",
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`"
33
- }
34
- ],
35
- "exports": [
36
- {
37
- "kind": "js",
38
- "name": "foundationFormTemplate",
39
- "declaration": {
40
- "name": "foundationFormTemplate",
41
- "module": "src/form.template.ts"
42
- }
43
- }
44
- ]
14
+ "declarations": [],
15
+ "exports": []
45
16
  },
46
17
  {
47
18
  "kind": "javascript-module",
@@ -227,6 +198,22 @@
227
198
  "package": "./form"
228
199
  }
229
200
  },
201
+ {
202
+ "kind": "js",
203
+ "name": "*",
204
+ "declaration": {
205
+ "name": "*",
206
+ "package": "./form.styles"
207
+ }
208
+ },
209
+ {
210
+ "kind": "js",
211
+ "name": "*",
212
+ "declaration": {
213
+ "name": "*",
214
+ "package": "./form.template"
215
+ }
216
+ },
230
217
  {
231
218
  "kind": "js",
232
219
  "name": "*",
@@ -1571,7 +1558,7 @@
1571
1558
  {
1572
1559
  "kind": "variable",
1573
1560
  "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`"
1561
+ "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 :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
1562
  },
1576
1563
  {
1577
1564
  "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,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAkB1C,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAExC,gBAAgB;AAChB,eAAO,MAAM,MAAM,gDAAkC,CAAC;AActD,cAAc;AACd,eAAO,MAAM,SAAS,OAgBrB,CAAC;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;IAwBb;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,WAAW;IAQ3B,oBAAoB;IAKpB;;;OAGG;IACH,KAAK;CAIN"}
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,EAAE,MAAM,aAAa,CAAC;AAkB1C,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAExC,gBAAgB;AAChB,eAAO,MAAM,MAAM,gDAAkC,CAAC;AActD,cAAc;AACd,eAAO,MAAM,SAAS,OAgBrB,CAAC;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
+ /** @internal */
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,gBAAgB;AAChB,eAAO,MAAM,oBAAoB,iDAqDhC,CAAC"}
@@ -1,3 +1,4 @@
1
1
  import type { Form } from './form';
2
+ /** @internal */
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,gBAAgB;AAChB,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"}
@@ -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,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,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"}
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,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,WAAW,CAAC,EAAE,MAAM,CAAC;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
+ /** @internal */
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
+ /** @internal */
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,7 +4,7 @@ import { LAYOUT2COLUMNS_RANK } from './RenderersRanks';
4
4
  export const LayoutVertical2ColumnsRendererTemplate = html `
5
5
  <template>
6
6
  <div
7
- style="max-width:600px;
7
+ style="
8
8
  display: flex;
9
9
  flex-direction: row;
10
10
  flex-wrap: wrap;
@@ -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%"
@@ -14,7 +14,7 @@ export const getStringControlRendererTemplate = (prefix = 'zero') => html `
14
14
  const inputValue = c.event.target.value;
15
15
  x.control.handleChange(x.control.path, inputValue === '' ? null : inputValue);
16
16
  }}
17
- placeholder=${(x) => x.control.label}
17
+ placeholder=${(x) => x.control.uischema.placeholder || x.control.label}
18
18
  id=${(x) => x.control.path}
19
19
  data-test-id=${(x) => x.control.path}
20
20
  ?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",
@@ -1030,7 +1061,7 @@
1030
1061
  },
1031
1062
  {
1032
1063
  "kind": "Content",
1033
- "text": ";\n scope: string;\n label?: string;\n options?: "
1064
+ "text": ";\n scope: string;\n label?: string;\n placeholder?: string;\n options?: "
1034
1065
  },
1035
1066
  {
1036
1067
  "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
+ /** @internal */
244
+ export declare const foundationFormStyles: ElementStyles;
245
+
246
+ /** @internal */
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
 
@@ -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,16 @@ export class Form extends FoundationElement {
86
89
  uischema: UISchemaElement;
87
90
  }
88
91
 
92
+ // Warning: (ae-internal-missing-underscore) The name "foundationFormStyles" should be prefixed with an underscore because the declaration is marked as @internal
93
+ //
94
+ // @internal (undocumented)
95
+ export const foundationFormStyles: ElementStyles;
96
+
97
+ // Warning: (ae-internal-missing-underscore) The name "foundationFormTemplate" should be prefixed with an underscore because the declaration is marked as @internal
98
+ //
99
+ // @internal (undocumented)
100
+ export const foundationFormTemplate: ViewTemplate<Form, any>;
101
+
89
102
  // @public (undocumented)
90
103
  export const genesisErrorTranslator: ErrorTranslator;
91
104
 
@@ -125,6 +138,7 @@ export type UiSchemaElement = {
125
138
  type: UiSchemaElementType;
126
139
  scope: string;
127
140
  label?: string;
141
+ placeholder?: string;
128
142
  options?: UiSchemaElementOptions;
129
143
  };
130
144
 
@@ -151,7 +165,7 @@ export type UiSchemaElementType = 'Control' | 'VerticalLayout' | any;
151
165
 
152
166
  // Warnings were encountered during analysis:
153
167
  //
154
- // src/types.ts:50:3 - (ae-forgotten-export) The symbol "DispatchRenderer" needs to be exported by the entry point index.d.ts
168
+ // src/types.ts:51:3 - (ae-forgotten-export) The symbol "DispatchRenderer" needs to be exported by the entry point index.d.ts
155
169
 
156
170
  // (No @packageDocumentation comment for this package)
157
171
 
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.44.0",
4
+ "version": "14.45.0",
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.44.0",
44
- "@genesislcap/genx": "^14.44.0",
43
+ "@genesislcap/foundation-testing": "^14.45.0",
44
+ "@genesislcap/genx": "^14.45.0",
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.44.0",
51
- "@genesislcap/foundation-criteria": "^14.44.0",
52
- "@genesislcap/foundation-ui": "^14.44.0",
53
- "@genesislcap/foundation-utils": "^14.44.0",
50
+ "@genesislcap/foundation-comms": "^14.45.0",
51
+ "@genesislcap/foundation-criteria": "^14.45.0",
52
+ "@genesislcap/foundation-ui": "^14.45.0",
53
+ "@genesislcap/foundation-utils": "^14.45.0",
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": "077e749b309b7cce6982ec9c85255036e5f254dc"
74
+ "gitHead": "f4b5cf86b3f9a49530ba9a15ca5db0df4d2e2e36"
75
75
  }