@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
@@ -3,23 +3,31 @@ import { translate } from "../../utils/locale.utils";
3
3
  import tooltipIcon from "../../utils/tooltipIcon.svg";
4
4
  export class ToggleCheckboxInput {
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
- this.showFields = this.defaultValue === 'true';
17
6
  this.value = '';
18
7
  this.setClientStyling = () => {
19
8
  let sheet = document.createElement('style');
20
9
  sheet.innerHTML = this.clientStyling;
21
10
  this.stylingContainer.prepend(sheet);
22
11
  };
12
+ this.name = undefined;
13
+ this.displayName = undefined;
14
+ this.defaultValue = '';
15
+ this.options = undefined;
16
+ this.autofilled = undefined;
17
+ this.tooltip = undefined;
18
+ this.validation = undefined;
19
+ this.language = undefined;
20
+ this.emitValue = undefined;
21
+ this.clientStyling = '';
22
+ this.errorMessage = undefined;
23
+ this.isValid = undefined;
24
+ this.limitStylingAppends = false;
25
+ this.showTooltip = false;
26
+ this.showFields = this.defaultValue === 'true';
27
+ }
28
+ handleStylingChange(newValue, oldValue) {
29
+ if (newValue !== oldValue)
30
+ this.setClientStyling();
23
31
  }
24
32
  validityStateHandler(inputStateEvent) {
25
33
  this.sendValidityState.emit(inputStateEvent);
@@ -66,8 +74,8 @@ export class ToggleCheckboxInput {
66
74
  return null;
67
75
  }
68
76
  render() {
69
- return h("div", { key: '8c8e9bb2ae7feadf3a5fc38b9913e38d7ccb9aed', class: `togglecheckbox__wrapper ${this.name}__input`, ref: el => this.stylingContainer = el }, h("div", { key: '18e2ec43ff98738323ddab1e134d6d215978e1c7', class: 'togglecheckbox__wrapper--flex' }, 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()), h("small", { key: 'efd70a691559cfa98e93561dd945a0fe92909718', class: 'togglecheckbox__error-message' }, this.errorMessage), h("div", { key: 'e56a8fafa17da25d01f894fe6e6c143c318d2aab', class: 'togglecheckbox__wrapper--relative' }, this.tooltip &&
70
- h("img", { key: '8b59366827b8f4f8ca5581203a2dca44ae8132d5', class: 'togglecheckbox__tooltip-icon', src: tooltipIcon, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip()), h("div", { key: '475e27345b51396c36e78b5a1e06edd980bc3ae1', class: `togglecheckbox__fields-wrapper ${this.showFields ? '' : 'hidden'}` }, this.options.map(subfield => {
77
+ return h("div", { key: 'e8be91ce94cf76ebecc58a433ab567ab549f4692', class: `togglecheckbox__wrapper ${this.name}__input`, ref: el => this.stylingContainer = el }, h("div", { key: 'dd42a6316cda06e357843165329de7525a24e3d5', class: 'togglecheckbox__wrapper--flex' }, 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()), h("small", { key: 'cbc789c8a5c21debc05971ff347371fbc25d4975', class: 'togglecheckbox__error-message' }, this.errorMessage), h("div", { key: 'a5ce470c985829eb1f5a0567bb974cc15e3d0d64', class: 'togglecheckbox__wrapper--relative' }, this.tooltip &&
78
+ h("img", { key: 'faef05dd9341ffe44b6833ca8f4c86b85ed61956', class: 'togglecheckbox__tooltip-icon', src: tooltipIcon, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip()), h("div", { key: '89fed5f103acecca78fa53eea64d57574ef42727', class: `togglecheckbox__fields-wrapper ${this.showFields ? '' : 'hidden'}` }, this.options.map(subfield => {
71
79
  return 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 });
72
80
  })));
73
81
  }
@@ -99,8 +107,6 @@ export class ToggleCheckboxInput {
99
107
  "tags": [],
100
108
  "text": "Name of the input."
101
109
  },
102
- "getter": false,
103
- "setter": false,
104
110
  "attribute": "name",
105
111
  "reflect": true
106
112
  },
@@ -118,8 +124,6 @@ export class ToggleCheckboxInput {
118
124
  "tags": [],
119
125
  "text": "Name of input to be shown to the user."
120
126
  },
121
- "getter": false,
122
- "setter": false,
123
127
  "attribute": "display-name",
124
128
  "reflect": true
125
129
  },
@@ -137,8 +141,6 @@ export class ToggleCheckboxInput {
137
141
  "tags": [],
138
142
  "text": "Default value for the input."
139
143
  },
140
- "getter": false,
141
- "setter": false,
142
144
  "attribute": "default-value",
143
145
  "reflect": true,
144
146
  "defaultValue": "''"
@@ -162,9 +164,7 @@ export class ToggleCheckboxInput {
162
164
  "docs": {
163
165
  "tags": [],
164
166
  "text": "Options of the input."
165
- },
166
- "getter": false,
167
- "setter": false
167
+ }
168
168
  },
169
169
  "autofilled": {
170
170
  "type": "boolean",
@@ -180,8 +180,6 @@ export class ToggleCheckboxInput {
180
180
  "tags": [],
181
181
  "text": "Boolean. Determines if input should be readonly."
182
182
  },
183
- "getter": false,
184
- "setter": false,
185
183
  "attribute": "autofilled",
186
184
  "reflect": true
187
185
  },
@@ -199,8 +197,6 @@ export class ToggleCheckboxInput {
199
197
  "tags": [],
200
198
  "text": "Tooltip text."
201
199
  },
202
- "getter": false,
203
- "setter": false,
204
200
  "attribute": "tooltip",
205
201
  "reflect": true
206
202
  },
@@ -223,9 +219,7 @@ export class ToggleCheckboxInput {
223
219
  "docs": {
224
220
  "tags": [],
225
221
  "text": "Object of validation rules for the input."
226
- },
227
- "getter": false,
228
- "setter": false
222
+ }
229
223
  },
230
224
  "language": {
231
225
  "type": "string",
@@ -241,8 +235,6 @@ export class ToggleCheckboxInput {
241
235
  "tags": [],
242
236
  "text": "Currently selected language."
243
237
  },
244
- "getter": false,
245
- "setter": false,
246
238
  "attribute": "language",
247
239
  "reflect": true
248
240
  },
@@ -260,8 +252,6 @@ export class ToggleCheckboxInput {
260
252
  "tags": [],
261
253
  "text": "State passed down from the parent element. Will trigger the input to send it's value through an event."
262
254
  },
263
- "getter": false,
264
- "setter": false,
265
255
  "attribute": "emit-value",
266
256
  "reflect": true
267
257
  },
@@ -279,8 +269,6 @@ export class ToggleCheckboxInput {
279
269
  "tags": [],
280
270
  "text": "Client custom styling via inline style"
281
271
  },
282
- "getter": false,
283
- "setter": false,
284
272
  "attribute": "client-styling",
285
273
  "reflect": true,
286
274
  "defaultValue": "''"
@@ -341,6 +329,12 @@ export class ToggleCheckboxInput {
341
329
  }
342
330
  }];
343
331
  }
332
+ static get watchers() {
333
+ return [{
334
+ "propName": "clientStyling",
335
+ "methodName": "handleStylingChange"
336
+ }];
337
+ }
344
338
  static get listeners() {
345
339
  return [{
346
340
  "name": "click",