@everymatrix/general-input 1.56.0 → 1.56.2

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 (54) hide show
  1. package/dist/cjs/checkbox-group-input_10.cjs.entry.js +419 -380
  2. package/dist/cjs/general-input.cjs.entry.js +18 -17
  3. package/dist/cjs/general-input.cjs.js +3 -3
  4. package/dist/cjs/{index-a91d7bcb.js → index-bce82d29.js} +76 -211
  5. package/dist/cjs/loader.cjs.js +2 -2
  6. package/dist/cjs/toggle-checkbox-input.cjs.entry.js +25 -14
  7. package/dist/collection/collection-manifest.json +2 -2
  8. package/dist/collection/components/checkbox-group-input/checkbox-group-input.js +26 -35
  9. package/dist/collection/components/checkbox-input/checkbox-input.js +23 -31
  10. package/dist/collection/components/date-input/date-input.js +26 -37
  11. package/dist/collection/components/email-input/email-input.js +25 -31
  12. package/dist/collection/components/general-input/general-input.js +18 -51
  13. package/dist/collection/components/number-input/number-input.js +24 -29
  14. package/dist/collection/components/password-input/password-input.js +28 -36
  15. package/dist/collection/components/radio-input/radio-input.js +23 -26
  16. package/dist/collection/components/select-input/select-input.js +26 -41
  17. package/dist/collection/components/tel-input/tel-input.js +26 -33
  18. package/dist/collection/components/text-input/text-input.js +26 -38
  19. package/dist/collection/components/toggle-checkbox-input/toggle-checkbox-input.js +29 -35
  20. package/dist/esm/checkbox-group-input_10.entry.js +419 -380
  21. package/dist/esm/general-input.entry.js +18 -17
  22. package/dist/esm/general-input.js +4 -4
  23. package/dist/esm/{index-3bab966c.js → index-34f25346.js} +76 -211
  24. package/dist/esm/loader.js +3 -3
  25. package/dist/esm/toggle-checkbox-input.entry.js +25 -14
  26. package/dist/general-input/general-input.esm.js +1 -1
  27. package/dist/general-input/{p-a708ec0e.entry.js → p-063fdb7d.entry.js} +186 -188
  28. package/dist/general-input/p-261db8d1.entry.js +1 -0
  29. package/dist/general-input/p-8b2b0da7.js +2 -0
  30. package/dist/general-input/p-e2eb81ed.entry.js +1 -0
  31. package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/general-input/.stencil/packages/stencil/general-input/stencil.config.d.ts +2 -0
  32. package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/general-input/.stencil/packages/stencil/general-input/stencil.config.dev.d.ts +2 -0
  33. package/dist/types/components/checkbox-group-input/checkbox-group-input.d.ts +1 -0
  34. package/dist/types/components/checkbox-input/checkbox-input.d.ts +1 -0
  35. package/dist/types/components/date-input/date-input.d.ts +1 -0
  36. package/dist/types/components/email-input/email-input.d.ts +1 -0
  37. package/dist/types/components/number-input/number-input.d.ts +1 -0
  38. package/dist/types/components/password-input/password-input.d.ts +1 -0
  39. package/dist/types/components/radio-input/radio-input.d.ts +1 -0
  40. package/dist/types/components/select-input/select-input.d.ts +1 -0
  41. package/dist/types/components/tel-input/tel-input.d.ts +1 -0
  42. package/dist/types/components/text-input/text-input.d.ts +1 -0
  43. package/dist/types/components/toggle-checkbox-input/toggle-checkbox-input.d.ts +1 -0
  44. package/dist/types/stencil-public-runtime.d.ts +0 -6
  45. package/package.json +1 -1
  46. package/dist/general-input/p-5ab8d194.js +0 -2
  47. package/dist/general-input/p-8ce07665.entry.js +0 -1
  48. package/dist/general-input/p-9ad71153.entry.js +0 -1
  49. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/general-input/.stencil/packages/stencil/general-input/stencil.config.d.ts +0 -2
  50. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/general-input/.stencil/packages/stencil/general-input/stencil.config.dev.d.ts +0 -2
  51. /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/general-input/.stencil/tools/plugins/index.d.ts +0 -0
  52. /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/general-input/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +0 -0
  53. /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/general-input/.stencil/tools/plugins/vite-chunk-plugin.d.ts +0 -0
  54. /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/general-input/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +0 -0
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-a91d7bcb.js');
5
+ const index = require('./index-bce82d29.js');
6
6
  const locale_utils = require('./locale.utils-345d0792.js');
7
7
  const tooltipIcon = require('./tooltipIcon-7e9ee226.js');
8
8
 
@@ -14,23 +14,31 @@ const ToggleCheckboxInput = class {
14
14
  index.registerInstance(this, hostRef);
15
15
  this.sendValidityState = index.createEvent(this, "sendValidityState", 7);
16
16
  this.sendInputValue = index.createEvent(this, "sendInputValue", 7);
17
- /**
18
- * Default value for the input.
19
- */
20
- this.defaultValue = '';
21
- /**
22
- * Client custom styling via inline style
23
- */
24
- this.clientStyling = '';
25
- this.limitStylingAppends = false;
26
- this.showTooltip = false;
27
- this.showFields = this.defaultValue === 'true';
28
17
  this.value = '';
29
18
  this.setClientStyling = () => {
30
19
  let sheet = document.createElement('style');
31
20
  sheet.innerHTML = this.clientStyling;
32
21
  this.stylingContainer.prepend(sheet);
33
22
  };
23
+ this.name = undefined;
24
+ this.displayName = undefined;
25
+ this.defaultValue = '';
26
+ this.options = undefined;
27
+ this.autofilled = undefined;
28
+ this.tooltip = undefined;
29
+ this.validation = undefined;
30
+ this.language = undefined;
31
+ this.emitValue = undefined;
32
+ this.clientStyling = '';
33
+ this.errorMessage = undefined;
34
+ this.isValid = undefined;
35
+ this.limitStylingAppends = false;
36
+ this.showTooltip = false;
37
+ this.showFields = this.defaultValue === 'true';
38
+ }
39
+ handleStylingChange(newValue, oldValue) {
40
+ if (newValue !== oldValue)
41
+ this.setClientStyling();
34
42
  }
35
43
  validityStateHandler(inputStateEvent) {
36
44
  this.sendValidityState.emit(inputStateEvent);
@@ -77,11 +85,14 @@ const ToggleCheckboxInput = class {
77
85
  return null;
78
86
  }
79
87
  render() {
80
- return index.h("div", { key: '8c8e9bb2ae7feadf3a5fc38b9913e38d7ccb9aed', class: `togglecheckbox__wrapper ${this.name}__input`, ref: el => this.stylingContainer = el }, index.h("div", { key: '18e2ec43ff98738323ddab1e134d6d215978e1c7', class: 'togglecheckbox__wrapper--flex' }, index.h("input", { key: '640b3ba4fd34bd813239533236e51f452e735409', class: 'togglecheckbox__input', type: "checkbox", id: `${this.name}__input`, ref: (el) => this.checkboxReference = el, name: this.name, checked: this.defaultValue === "true", readOnly: this.autofilled, required: this.validation.mandatory, value: this.value, onClick: () => this.handleClick() }), this.renderLabel()), index.h("small", { key: 'efd70a691559cfa98e93561dd945a0fe92909718', class: 'togglecheckbox__error-message' }, this.errorMessage), index.h("div", { key: 'e56a8fafa17da25d01f894fe6e6c143c318d2aab', class: 'togglecheckbox__wrapper--relative' }, this.tooltip &&
81
- index.h("img", { key: '8b59366827b8f4f8ca5581203a2dca44ae8132d5', class: 'togglecheckbox__tooltip-icon', src: tooltipIcon.tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip()), index.h("div", { key: '475e27345b51396c36e78b5a1e06edd980bc3ae1', class: `togglecheckbox__fields-wrapper ${this.showFields ? '' : 'hidden'}` }, this.options.map(subfield => {
88
+ return index.h("div", { key: 'e8be91ce94cf76ebecc58a433ab567ab549f4692', class: `togglecheckbox__wrapper ${this.name}__input`, ref: el => this.stylingContainer = el }, index.h("div", { key: 'dd42a6316cda06e357843165329de7525a24e3d5', class: 'togglecheckbox__wrapper--flex' }, index.h("input", { key: '932a6f8caeafa0d006f636484e33dda246c314d0', class: 'togglecheckbox__input', type: "checkbox", id: `${this.name}__input`, ref: (el) => this.checkboxReference = el, name: this.name, checked: this.defaultValue === "true", readOnly: this.autofilled, required: this.validation.mandatory, value: this.value, onClick: () => this.handleClick() }), this.renderLabel()), index.h("small", { key: 'cbc789c8a5c21debc05971ff347371fbc25d4975', class: 'togglecheckbox__error-message' }, this.errorMessage), index.h("div", { key: 'a5ce470c985829eb1f5a0567bb974cc15e3d0d64', class: 'togglecheckbox__wrapper--relative' }, this.tooltip &&
89
+ index.h("img", { key: 'faef05dd9341ffe44b6833ca8f4c86b85ed61956', class: 'togglecheckbox__tooltip-icon', src: tooltipIcon.tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip()), index.h("div", { key: '89fed5f103acecca78fa53eea64d57574ef42727', class: `togglecheckbox__fields-wrapper ${this.showFields ? '' : 'hidden'}` }, this.options.map(subfield => {
82
90
  return index.h("general-input", { type: subfield.inputType, name: subfield.name, displayName: subfield.displayName, validation: subfield.validate, action: subfield.action || null, defaultValue: subfield.defaultValue, autofilled: subfield.autofill, emitValue: this.emitValue, language: this.language, "client-styling": this.clientStyling, tooltip: subfield.tooltip, placeholder: subfield.placeholder == null ? '' : subfield.placeholder });
83
91
  })));
84
92
  }
93
+ static get watchers() { return {
94
+ "clientStyling": ["handleStylingChange"]
95
+ }; }
85
96
  };
86
97
  ToggleCheckboxInput.style = ToggleCheckboxInputStyle0;
87
98
 
@@ -15,8 +15,8 @@
15
15
  ],
16
16
  "compiler": {
17
17
  "name": "@stencil/core",
18
- "version": "4.26.0",
19
- "typescriptVersion": "5.5.4"
18
+ "version": "4.19.2",
19
+ "typescriptVersion": "5.4.5"
20
20
  },
21
21
  "collections": [],
22
22
  "bundles": []
@@ -5,23 +5,31 @@ import "@vaadin/checkbox";
5
5
  import "@vaadin/checkbox-group";
6
6
  export class CheckboxGroupInput {
7
7
  constructor() {
8
- /**
9
- * Default value for the input.
10
- */
11
- this.defaultValue = '';
12
- /**
13
- * Client custom styling via inline style
14
- */
15
- this.clientStyling = '';
16
- this.limitStylingAppends = false;
17
- this.showTooltip = false;
18
- this.selectedValues = [];
19
8
  this.value = null;
20
9
  this.setClientStyling = () => {
21
10
  let sheet = document.createElement('style');
22
11
  sheet.innerHTML = this.clientStyling;
23
12
  this.stylingContainer.prepend(sheet);
24
13
  };
14
+ this.name = undefined;
15
+ this.displayName = undefined;
16
+ this.defaultValue = '';
17
+ this.autofilled = undefined;
18
+ this.tooltip = undefined;
19
+ this.options = undefined;
20
+ this.validation = undefined;
21
+ this.language = undefined;
22
+ this.emitValue = undefined;
23
+ this.clientStyling = '';
24
+ this.errorMessage = undefined;
25
+ this.isValid = undefined;
26
+ this.limitStylingAppends = false;
27
+ this.showTooltip = false;
28
+ this.selectedValues = [];
29
+ }
30
+ handleStylingChange(newValue, oldValue) {
31
+ if (newValue !== oldValue)
32
+ this.setClientStyling();
25
33
  }
26
34
  validityChanged() {
27
35
  this.validityStateHandler({ valid: this.isValid, name: this.name });
@@ -97,8 +105,8 @@ export class CheckboxGroupInput {
97
105
  return (h("label", { class: 'checkbox__label', htmlFor: `${this.name}__input`, slot: 'label' }, h("div", { class: 'checkbox__label-text', innerHTML: `${this.displayName} ${this.validation.mandatory ? '*' : ''}` })));
98
106
  }
99
107
  render() {
100
- return h("div", { key: 'fa45026502fd8d46aa537aee03210ad68d30e577', class: `checkboxgroup__wrapper ${this.name}__input`, ref: el => this.stylingContainer = el }, h("div", { key: '15ded4fd896920c6244806e49f300c124c27186d', class: 'checkboxgroup__wrapper--flex' }, h("vaadin-checkbox", { key: 'd7eaa205877f8f12c9ef7d4f77018665806f5c7c', class: 'checkbox__input', checked: this.selectedValues.length === this.options.length || this.defaultValue === 'true', indeterminate: this.selectedValues.length > 0 && this.selectedValues.length < this.options.length, onChange: (e) => this.handleParentCheckbox(e) }, this.renderLabel()), this.tooltip &&
101
- h("img", { key: 'aca39ed398415a6e2cef861be40dad33e0398759', class: 'checkboxgroup__tooltip-icon', src: tooltipIcon, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip()), h("small", { key: 'a1a6e1c3c02edcca572b8826ffba06835ca451c3', class: 'checkboxgroup__error-message' }, this.errorMessage), h("vaadin-checkbox-group", { key: '9f5f8a945e4ba13d7d0da6d362c15d00a7796b71', theme: "vertical", value: this.selectedValues, "on-value-changed": (event) => {
108
+ return h("div", { key: 'c25b0a1ac187ea0abf1fe8c69d584eee00568177', class: `checkboxgroup__wrapper ${this.name}__input`, ref: el => this.stylingContainer = el }, h("div", { key: 'daf512e7f98d20bae65e43ab869e45babc008e90', class: 'checkboxgroup__wrapper--flex' }, h("vaadin-checkbox", { key: '08e31269cf2ace61c4c929a6a597486555667197', class: 'checkbox__input', checked: this.selectedValues.length === this.options.length || this.defaultValue === 'true', indeterminate: this.selectedValues.length > 0 && this.selectedValues.length < this.options.length, onChange: (e) => this.handleParentCheckbox(e) }, this.renderLabel()), this.tooltip &&
109
+ h("img", { key: 'ed4c3efd6b7e30ae0b68de11093b8faf2cb0a845', class: 'checkboxgroup__tooltip-icon', src: tooltipIcon, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip()), h("small", { key: '5b95c4059a2de898c04bf147e89c5a2ad035dddf', class: 'checkboxgroup__error-message' }, this.errorMessage), h("vaadin-checkbox-group", { key: '2b73ac73d52c6185358e50eda4c9706643f55384', theme: "vertical", value: this.selectedValues, "on-value-changed": (event) => {
102
110
  this.selectedValues = event.detail.value;
103
111
  } }, this.options.map((checkbox) => h("vaadin-checkbox", { class: 'checkbox__input', name: checkbox.name, value: checkbox.name, label: checkbox.displayName }))));
104
112
  }
@@ -130,8 +138,6 @@ export class CheckboxGroupInput {
130
138
  "tags": [],
131
139
  "text": "Name of the input."
132
140
  },
133
- "getter": false,
134
- "setter": false,
135
141
  "attribute": "name",
136
142
  "reflect": true
137
143
  },
@@ -149,8 +155,6 @@ export class CheckboxGroupInput {
149
155
  "tags": [],
150
156
  "text": "Name of input to be shown to the user."
151
157
  },
152
- "getter": false,
153
- "setter": false,
154
158
  "attribute": "display-name",
155
159
  "reflect": true
156
160
  },
@@ -168,8 +172,6 @@ export class CheckboxGroupInput {
168
172
  "tags": [],
169
173
  "text": "Default value for the input."
170
174
  },
171
- "getter": false,
172
- "setter": false,
173
175
  "attribute": "default-value",
174
176
  "reflect": true,
175
177
  "defaultValue": "''"
@@ -188,8 +190,6 @@ export class CheckboxGroupInput {
188
190
  "tags": [],
189
191
  "text": "Boolean. Determines if input should be readonly."
190
192
  },
191
- "getter": false,
192
- "setter": false,
193
193
  "attribute": "autofilled",
194
194
  "reflect": true
195
195
  },
@@ -207,8 +207,6 @@ export class CheckboxGroupInput {
207
207
  "tags": [],
208
208
  "text": "Tooltip text."
209
209
  },
210
- "getter": false,
211
- "setter": false,
212
210
  "attribute": "tooltip",
213
211
  "reflect": true
214
212
  },
@@ -231,9 +229,7 @@ export class CheckboxGroupInput {
231
229
  "docs": {
232
230
  "tags": [],
233
231
  "text": "Options of the input."
234
- },
235
- "getter": false,
236
- "setter": false
232
+ }
237
233
  },
238
234
  "validation": {
239
235
  "type": "unknown",
@@ -254,9 +250,7 @@ export class CheckboxGroupInput {
254
250
  "docs": {
255
251
  "tags": [],
256
252
  "text": "Object of validation rules for the input."
257
- },
258
- "getter": false,
259
- "setter": false
253
+ }
260
254
  },
261
255
  "language": {
262
256
  "type": "string",
@@ -272,8 +266,6 @@ export class CheckboxGroupInput {
272
266
  "tags": [],
273
267
  "text": "Currently selected language."
274
268
  },
275
- "getter": false,
276
- "setter": false,
277
269
  "attribute": "language",
278
270
  "reflect": true
279
271
  },
@@ -291,8 +283,6 @@ export class CheckboxGroupInput {
291
283
  "tags": [],
292
284
  "text": "State passed down from the parent element. Will trigger the input to send it's value through an event."
293
285
  },
294
- "getter": false,
295
- "setter": false,
296
286
  "attribute": "emit-value",
297
287
  "reflect": true
298
288
  },
@@ -310,8 +300,6 @@ export class CheckboxGroupInput {
310
300
  "tags": [],
311
301
  "text": "Client custom styling via inline style"
312
302
  },
313
- "getter": false,
314
- "setter": false,
315
303
  "attribute": "client-styling",
316
304
  "reflect": true,
317
305
  "defaultValue": "''"
@@ -375,6 +363,9 @@ export class CheckboxGroupInput {
375
363
  static get elementRef() { return "element"; }
376
364
  static get watchers() {
377
365
  return [{
366
+ "propName": "clientStyling",
367
+ "methodName": "handleStylingChange"
368
+ }, {
378
369
  "propName": "isValid",
379
370
  "methodName": "validityChanged"
380
371
  }, {
@@ -3,22 +3,29 @@ import { translate } from "../../utils/locale.utils";
3
3
  import tooltipIcon from "../../utils/tooltipIcon.svg";
4
4
  export class CheckboxInput {
5
5
  constructor() {
6
- /**
7
- * Default value for the input.
8
- */
9
- this.defaultValue = '';
10
- /**
11
- * Client custom styling via inline style
12
- */
13
- this.clientStyling = '';
14
- this.limitStylingAppends = false;
15
- this.showTooltip = false;
16
6
  this.value = '';
17
7
  this.setClientStyling = () => {
18
8
  let sheet = document.createElement('style');
19
9
  sheet.innerHTML = this.clientStyling;
20
10
  this.stylingContainer.prepend(sheet);
21
11
  };
12
+ this.name = undefined;
13
+ this.displayName = undefined;
14
+ this.defaultValue = '';
15
+ this.autofilled = undefined;
16
+ this.tooltip = undefined;
17
+ this.validation = undefined;
18
+ this.language = undefined;
19
+ this.emitValue = undefined;
20
+ this.clientStyling = '';
21
+ this.errorMessage = undefined;
22
+ this.isValid = undefined;
23
+ this.limitStylingAppends = false;
24
+ this.showTooltip = false;
25
+ }
26
+ handleStylingChange(newValue, oldValue) {
27
+ if (newValue !== oldValue)
28
+ this.setClientStyling();
22
29
  }
23
30
  validityChanged() {
24
31
  this.validityStateHandler({ valid: this.isValid, name: this.name });
@@ -82,8 +89,8 @@ export class CheckboxInput {
82
89
  return null;
83
90
  }
84
91
  render() {
85
- return h("div", { key: '0aae00d291d1da02adae1bc91e79ccd579aa5c7f', class: `checkbox__wrapper ${this.name}__input`, ref: el => this.stylingContainer = el }, h("input", { key: '4b8c61d322b5065d8abe4e2687e270511fadc97f', class: 'checkbox__input', type: "checkbox", id: `${this.name}__input`, ref: (el) => this.inputReference = el, name: this.name, checked: this.defaultValue === "true", readOnly: this.autofilled, required: this.validation.mandatory, value: this.value, onClick: () => this.handleClick() }), this.renderLabel(), h("small", { key: '934263cb58a0d379e8b7dc1f5004ad7e61c63ce0', class: 'checkbox__error-message' }, this.errorMessage), h("div", { key: '88cc71329d88b6325d792226e64ff7f93e940178', class: 'checkbox__wrapper--relative' }, this.tooltip &&
86
- h("img", { key: '3708dc613dc920bac6557f2a8020bbafd97d9127', class: 'checkbox__tooltip-icon', src: tooltipIcon, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip()));
92
+ return h("div", { key: '8c80c955bb052558165a4c5b1020d0582ed0af36', class: `checkbox__wrapper ${this.name}__input`, ref: el => this.stylingContainer = el }, h("input", { key: '89401d543cb30b72ec614b0cd4e95b2e82b2522d', class: 'checkbox__input', type: "checkbox", id: `${this.name}__input`, ref: (el) => this.inputReference = el, name: this.name, checked: this.defaultValue === "true", readOnly: this.autofilled, required: this.validation.mandatory, value: this.value, onClick: () => this.handleClick() }), this.renderLabel(), h("small", { key: 'd007d8c02dd014a363e2fcc1a0e8df6ffda34bcb', class: 'checkbox__error-message' }, this.errorMessage), h("div", { key: 'c511c07684173359663d4907371efb82289f0433', class: 'checkbox__wrapper--relative' }, this.tooltip &&
93
+ h("img", { key: 'dd263ce86efd89f34078f3cc24729f43f40e89a6', class: 'checkbox__tooltip-icon', src: tooltipIcon, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip()));
87
94
  }
88
95
  static get is() { return "checkbox-input"; }
89
96
  static get encapsulation() { return "shadow"; }
@@ -113,8 +120,6 @@ export class CheckboxInput {
113
120
  "tags": [],
114
121
  "text": "Name of the input."
115
122
  },
116
- "getter": false,
117
- "setter": false,
118
123
  "attribute": "name",
119
124
  "reflect": true
120
125
  },
@@ -132,8 +137,6 @@ export class CheckboxInput {
132
137
  "tags": [],
133
138
  "text": "Name of input to be shown to the user."
134
139
  },
135
- "getter": false,
136
- "setter": false,
137
140
  "attribute": "display-name",
138
141
  "reflect": true
139
142
  },
@@ -151,8 +154,6 @@ export class CheckboxInput {
151
154
  "tags": [],
152
155
  "text": "Default value for the input."
153
156
  },
154
- "getter": false,
155
- "setter": false,
156
157
  "attribute": "default-value",
157
158
  "reflect": true,
158
159
  "defaultValue": "''"
@@ -171,8 +172,6 @@ export class CheckboxInput {
171
172
  "tags": [],
172
173
  "text": "Boolean. Determines if input should be readonly."
173
174
  },
174
- "getter": false,
175
- "setter": false,
176
175
  "attribute": "autofilled",
177
176
  "reflect": true
178
177
  },
@@ -190,8 +189,6 @@ export class CheckboxInput {
190
189
  "tags": [],
191
190
  "text": "Tooltip text."
192
191
  },
193
- "getter": false,
194
- "setter": false,
195
192
  "attribute": "tooltip",
196
193
  "reflect": true
197
194
  },
@@ -214,9 +211,7 @@ export class CheckboxInput {
214
211
  "docs": {
215
212
  "tags": [],
216
213
  "text": "Object of validation rules for the input."
217
- },
218
- "getter": false,
219
- "setter": false
214
+ }
220
215
  },
221
216
  "language": {
222
217
  "type": "string",
@@ -232,8 +227,6 @@ export class CheckboxInput {
232
227
  "tags": [],
233
228
  "text": "Currently selected language."
234
229
  },
235
- "getter": false,
236
- "setter": false,
237
230
  "attribute": "language",
238
231
  "reflect": true
239
232
  },
@@ -251,8 +244,6 @@ export class CheckboxInput {
251
244
  "tags": [],
252
245
  "text": "State passed down from the parent element. Will trigger the input to send it's value through an event."
253
246
  },
254
- "getter": false,
255
- "setter": false,
256
247
  "attribute": "emit-value",
257
248
  "reflect": true
258
249
  },
@@ -270,8 +261,6 @@ export class CheckboxInput {
270
261
  "tags": [],
271
262
  "text": "Client custom styling via inline style"
272
263
  },
273
- "getter": false,
274
- "setter": false,
275
264
  "attribute": "client-styling",
276
265
  "reflect": true,
277
266
  "defaultValue": "''"
@@ -333,6 +322,9 @@ export class CheckboxInput {
333
322
  }
334
323
  static get watchers() {
335
324
  return [{
325
+ "propName": "clientStyling",
326
+ "methodName": "handleStylingChange"
327
+ }, {
336
328
  "propName": "isValid",
337
329
  "methodName": "validityChanged"
338
330
  }, {
@@ -7,16 +7,6 @@ import dateFnsParse from "date-fns/parse";
7
7
  import { isBefore, isAfter } from "date-fns";
8
8
  export class DateInput {
9
9
  constructor() {
10
- /**
11
- * Client custom styling via inline style
12
- */
13
- this.clientStyling = '';
14
- /**
15
- * Emit event on click
16
- */
17
- this.emitOnClick = false;
18
- this.limitStylingAppends = false;
19
- this.showTooltip = false;
20
10
  this.touched = false;
21
11
  this.formatDate = (dateParts) => {
22
12
  const { year, month, day } = dateParts;
@@ -37,6 +27,26 @@ export class DateInput {
37
27
  sheet.innerHTML = this.clientStyling;
38
28
  this.stylingContainer.prepend(sheet);
39
29
  };
30
+ this.name = undefined;
31
+ this.displayName = undefined;
32
+ this.placeholder = undefined;
33
+ this.validation = undefined;
34
+ this.defaultValue = undefined;
35
+ this.autofilled = undefined;
36
+ this.tooltip = undefined;
37
+ this.language = undefined;
38
+ this.emitValue = undefined;
39
+ this.clientStyling = '';
40
+ this.dateFormat = undefined;
41
+ this.emitOnClick = false;
42
+ this.errorMessage = undefined;
43
+ this.isValid = undefined;
44
+ this.limitStylingAppends = false;
45
+ this.showTooltip = false;
46
+ }
47
+ handleStylingChange(newValue, oldValue) {
48
+ if (newValue !== oldValue)
49
+ this.setClientStyling();
40
50
  }
41
51
  validityChanged() {
42
52
  this.validityStateHandler({ valid: this.isValid, name: this.name });
@@ -134,8 +144,8 @@ export class DateInput {
134
144
  if (this.touched) {
135
145
  invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
136
146
  }
137
- return h("div", { key: 'fc9cd0a618c7b6e62962c0800399a470fffa1fc4', class: `date__wrapper ${this.autofilled ? 'date__wrapper--autofilled' : ''} ${this.name}__input`, ref: el => this.stylingContainer = el }, h("label", { key: 'abc7c1715dd2d0c60dd2ac6d028355de910be501', class: `date__label ${this.validation.mandatory ? 'date__label--required' : ''}}`, htmlFor: `${this.name}__input` }, this.displayName, " ", this.validation.mandatory ? '*' : ''), h("vaadin-date-picker", { key: 'a6b40a978b573d41490457d708f9a7ac78622a6f', id: `${this.name}__input`, type: 'date', class: `date__input ${invalidClass}`, value: this.defaultValue, readOnly: this.autofilled, placeholder: `${this.placeholder}`, required: this.validation.mandatory, max: this.validation.max, min: this.validation.min, onChange: (e) => this.handleInput(e), onBlur: this.handleBlur }), h("small", { key: 'd802ea7b25a64802aca3a7491107fcee7af2a23c', class: 'date__error-message' }, this.errorMessage), this.tooltip &&
138
- h("img", { key: '46edd200a9ce9eba27414a6434c6b3d5e9dc9964', class: 'date__tooltip-icon', src: tooltipIcon, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip());
147
+ return h("div", { key: 'ad6360e0afb065a91f860574f5e3c08f5bdb2534', class: `date__wrapper ${this.autofilled ? 'date__wrapper--autofilled' : ''} ${this.name}__input`, ref: el => this.stylingContainer = el }, h("label", { key: '3e8d26e0c8ae0983997b84e95cb34887df1f5fe5', class: `date__label ${this.validation.mandatory ? 'date__label--required' : ''}}`, htmlFor: `${this.name}__input` }, this.displayName, " ", this.validation.mandatory ? '*' : ''), h("vaadin-date-picker", { key: '62ee430506c2ab1a5ebb632d72e84ef905296888', id: `${this.name}__input`, type: 'date', class: `date__input ${invalidClass}`, value: this.defaultValue, readOnly: this.autofilled, placeholder: `${this.placeholder}`, required: this.validation.mandatory, max: this.validation.max, min: this.validation.min, onChange: (e) => this.handleInput(e), onBlur: this.handleBlur }), h("small", { key: '6b7c0e9c3437b484bd534060f93ad4fcd9eaeb60', class: 'date__error-message' }, this.errorMessage), this.tooltip &&
148
+ h("img", { key: '6479b29563710abfe1be584c9de110fafe69ca3d', class: 'date__tooltip-icon', src: tooltipIcon, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip());
139
149
  }
140
150
  static get is() { return "date-input"; }
141
151
  static get encapsulation() { return "shadow"; }
@@ -165,8 +175,6 @@ export class DateInput {
165
175
  "tags": [],
166
176
  "text": "Name of the input."
167
177
  },
168
- "getter": false,
169
- "setter": false,
170
178
  "attribute": "name",
171
179
  "reflect": true
172
180
  },
@@ -184,8 +192,6 @@ export class DateInput {
184
192
  "tags": [],
185
193
  "text": "Name of input to be shown to the user."
186
194
  },
187
- "getter": false,
188
- "setter": false,
189
195
  "attribute": "display-name",
190
196
  "reflect": true
191
197
  },
@@ -203,8 +209,6 @@ export class DateInput {
203
209
  "tags": [],
204
210
  "text": "Placeholder text to be shown."
205
211
  },
206
- "getter": false,
207
- "setter": false,
208
212
  "attribute": "placeholder",
209
213
  "reflect": true
210
214
  },
@@ -227,9 +231,7 @@ export class DateInput {
227
231
  "docs": {
228
232
  "tags": [],
229
233
  "text": "Object of validation rules for the input."
230
- },
231
- "getter": false,
232
- "setter": false
234
+ }
233
235
  },
234
236
  "defaultValue": {
235
237
  "type": "string",
@@ -245,8 +247,6 @@ export class DateInput {
245
247
  "tags": [],
246
248
  "text": "Default value for the input."
247
249
  },
248
- "getter": false,
249
- "setter": false,
250
250
  "attribute": "default-value",
251
251
  "reflect": true
252
252
  },
@@ -264,8 +264,6 @@ export class DateInput {
264
264
  "tags": [],
265
265
  "text": "Boolean. Determines if input should be readonly."
266
266
  },
267
- "getter": false,
268
- "setter": false,
269
267
  "attribute": "autofilled",
270
268
  "reflect": true
271
269
  },
@@ -283,8 +281,6 @@ export class DateInput {
283
281
  "tags": [],
284
282
  "text": "Tooltip text."
285
283
  },
286
- "getter": false,
287
- "setter": false,
288
284
  "attribute": "tooltip",
289
285
  "reflect": true
290
286
  },
@@ -302,8 +298,6 @@ export class DateInput {
302
298
  "tags": [],
303
299
  "text": "Currently selected language."
304
300
  },
305
- "getter": false,
306
- "setter": false,
307
301
  "attribute": "language",
308
302
  "reflect": true
309
303
  },
@@ -321,8 +315,6 @@ export class DateInput {
321
315
  "tags": [],
322
316
  "text": "State passed down from the parent element. Will trigger the input to send it's value through an event."
323
317
  },
324
- "getter": false,
325
- "setter": false,
326
318
  "attribute": "emit-value",
327
319
  "reflect": true
328
320
  },
@@ -340,8 +332,6 @@ export class DateInput {
340
332
  "tags": [],
341
333
  "text": "Client custom styling via inline style"
342
334
  },
343
- "getter": false,
344
- "setter": false,
345
335
  "attribute": "client-styling",
346
336
  "reflect": true,
347
337
  "defaultValue": "''"
@@ -360,8 +350,6 @@ export class DateInput {
360
350
  "tags": [],
361
351
  "text": "Date format for date picker."
362
352
  },
363
- "getter": false,
364
- "setter": false,
365
353
  "attribute": "date-format",
366
354
  "reflect": true
367
355
  },
@@ -379,8 +367,6 @@ export class DateInput {
379
367
  "tags": [],
380
368
  "text": "Emit event on click"
381
369
  },
382
- "getter": false,
383
- "setter": false,
384
370
  "attribute": "emit-on-click",
385
371
  "reflect": true,
386
372
  "defaultValue": "false"
@@ -443,6 +429,9 @@ export class DateInput {
443
429
  static get elementRef() { return "element"; }
444
430
  static get watchers() {
445
431
  return [{
432
+ "propName": "clientStyling",
433
+ "methodName": "handleStylingChange"
434
+ }, {
446
435
  "propName": "isValid",
447
436
  "methodName": "validityChanged"
448
437
  }, {