@everymatrix/general-input 0.0.1 → 1.0.69

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 (141) hide show
  1. package/dist/cjs/app-globals-3a1e7e63.js +5 -0
  2. package/dist/cjs/checkbox-group-input_10.cjs.entry.js +20007 -16663
  3. package/dist/cjs/general-input.cjs.entry.js +67 -40
  4. package/dist/cjs/general-input.cjs.js +17 -11
  5. package/dist/cjs/index-8cb018cb.js +1316 -0
  6. package/dist/cjs/index.cjs.js +16 -0
  7. package/dist/cjs/loader.cjs.js +7 -13
  8. package/dist/cjs/locale.utils-7a3dfe2f.js +128 -0
  9. package/dist/cjs/toggle-checkbox-input.cjs.entry.js +91 -0
  10. package/dist/cjs/tooltipIcon-7e9ee226.js +5 -0
  11. package/dist/collection/collection-manifest.json +14 -13
  12. package/dist/collection/components/checkbox-group-input/checkbox-group-input.css +26 -6
  13. package/dist/collection/components/checkbox-group-input/checkbox-group-input.js +372 -335
  14. package/dist/collection/components/checkbox-input/checkbox-input.css +16 -10
  15. package/dist/collection/components/checkbox-input/checkbox-input.js +325 -310
  16. package/dist/collection/components/date-input/date-input.css +35 -19
  17. package/dist/collection/components/date-input/date-input.js +401 -328
  18. package/dist/collection/components/email-input/email-input.css +30 -18
  19. package/dist/collection/components/email-input/email-input.js +405 -365
  20. package/dist/collection/components/general-input/general-input.css +1 -0
  21. package/dist/collection/components/general-input/general-input.js +374 -291
  22. package/dist/collection/components/general-input/index.js +1 -0
  23. package/dist/collection/components/number-input/number-input.css +28 -16
  24. package/dist/collection/components/number-input/number-input.js +371 -334
  25. package/dist/collection/components/password-input/password-input.css +105 -11
  26. package/dist/collection/components/password-input/password-input.js +518 -378
  27. package/dist/collection/components/radio-input/radio-input.css +4 -4
  28. package/dist/collection/components/radio-input/radio-input.js +301 -287
  29. package/dist/collection/components/select-input/select-input.css +47 -19
  30. package/dist/collection/components/select-input/select-input.js +428 -398
  31. package/dist/collection/components/tel-input/tel-input.css +52 -23
  32. package/dist/collection/components/tel-input/tel-input.js +441 -404
  33. package/dist/collection/components/text-input/text-input.css +33 -18
  34. package/dist/collection/components/text-input/text-input.js +446 -389
  35. package/dist/collection/components/toggle-checkbox-input/toggle-checkbox-input.css +82 -0
  36. package/dist/collection/components/toggle-checkbox-input/toggle-checkbox-input.js +336 -0
  37. package/dist/collection/index.js +16 -0
  38. package/dist/collection/utils/locale.utils.js +118 -21
  39. package/dist/collection/utils/tooltipIcon.svg +4 -4
  40. package/dist/collection/utils/utils.js +3 -3
  41. package/dist/esm/app-globals-0f993ce5.js +3 -0
  42. package/dist/esm/checkbox-group-input_10.entry.js +20007 -16663
  43. package/dist/esm/general-input.entry.js +67 -40
  44. package/dist/esm/general-input.js +14 -11
  45. package/dist/esm/index-514fda47.js +1287 -0
  46. package/dist/esm/index.js +16 -1
  47. package/dist/esm/loader.js +7 -13
  48. package/dist/esm/locale.utils-21605050.js +125 -0
  49. package/dist/esm/toggle-checkbox-input.entry.js +87 -0
  50. package/dist/esm/tooltipIcon-0a5a06a2.js +3 -0
  51. package/dist/general-input/general-input.esm.js +1 -1
  52. package/dist/general-input/index.esm.js +1 -0
  53. package/dist/general-input/p-03e81c11.js +2 -0
  54. package/dist/general-input/p-2dccd0bf.js +1 -0
  55. package/dist/general-input/p-34939f14.entry.js +1 -0
  56. package/dist/general-input/p-b32f19c2.entry.js +5430 -0
  57. package/dist/general-input/p-c43bb82e.entry.js +1 -0
  58. package/dist/general-input/p-cfe9eb31.js +1 -0
  59. package/dist/general-input/p-e1255160.js +1 -0
  60. package/dist/stencil.config.dev.js +17 -0
  61. package/dist/stencil.config.js +14 -19
  62. package/dist/types/Users/raul.vasile/workspace/everymatrix/widgets-monorepo/packages/stencil/general-input/.stencil/packages/stencil/general-input/stencil.config.d.ts +2 -0
  63. package/dist/types/Users/raul.vasile/workspace/everymatrix/widgets-monorepo/packages/stencil/general-input/.stencil/packages/stencil/general-input/stencil.config.dev.d.ts +2 -0
  64. package/dist/types/components/checkbox-group-input/checkbox-group-input.d.ts +69 -67
  65. package/dist/types/components/checkbox-input/checkbox-input.d.ts +61 -60
  66. package/dist/types/components/date-input/date-input.d.ts +79 -65
  67. package/dist/types/components/email-input/email-input.d.ts +76 -73
  68. package/dist/types/components/general-input/general-input.d.ts +72 -57
  69. package/dist/types/components/general-input/index.d.ts +1 -0
  70. package/dist/types/components/number-input/number-input.d.ts +70 -66
  71. package/dist/types/components/password-input/password-input.d.ts +87 -75
  72. package/dist/types/components/radio-input/radio-input.d.ts +55 -55
  73. package/dist/types/components/select-input/select-input.d.ts +78 -77
  74. package/dist/types/components/tel-input/tel-input.d.ts +84 -80
  75. package/dist/types/components/text-input/text-input.d.ts +81 -78
  76. package/dist/types/components/toggle-checkbox-input/toggle-checkbox-input.d.ts +67 -0
  77. package/dist/types/components.d.ts +331 -25
  78. package/dist/types/stencil-public-runtime.d.ts +142 -33
  79. package/dist/types/utils/locale.utils.d.ts +13 -1
  80. package/dist/types/utils/types.d.ts +58 -47
  81. package/loader/cdn.js +1 -3
  82. package/loader/index.cjs.js +1 -3
  83. package/loader/index.d.ts +13 -1
  84. package/loader/index.es2017.js +1 -3
  85. package/loader/index.js +1 -3
  86. package/loader/package.json +1 -0
  87. package/package.json +9 -9
  88. package/dist/cjs/index-1768513d.js +0 -1286
  89. package/dist/components/active-mixin.js +0 -975
  90. package/dist/components/checkbox-group-input.d.ts +0 -11
  91. package/dist/components/checkbox-group-input.js +0 -6
  92. package/dist/components/checkbox-group-input2.js +0 -5793
  93. package/dist/components/checkbox-input.d.ts +0 -11
  94. package/dist/components/checkbox-input.js +0 -6
  95. package/dist/components/checkbox-input2.js +0 -127
  96. package/dist/components/date-input.d.ts +0 -11
  97. package/dist/components/date-input.js +0 -6
  98. package/dist/components/date-input2.js +0 -5182
  99. package/dist/components/email-input.d.ts +0 -11
  100. package/dist/components/email-input.js +0 -6
  101. package/dist/components/email-input2.js +0 -150
  102. package/dist/components/field-mixin.js +0 -12712
  103. package/dist/components/general-input.d.ts +0 -11
  104. package/dist/components/general-input.js +0 -140
  105. package/dist/components/index.d.ts +0 -26
  106. package/dist/components/index.js +0 -1
  107. package/dist/components/input-field-shared-styles.js +0 -1067
  108. package/dist/components/number-input.d.ts +0 -11
  109. package/dist/components/number-input.js +0 -6
  110. package/dist/components/number-input2.js +0 -139
  111. package/dist/components/password-input.d.ts +0 -11
  112. package/dist/components/password-input.js +0 -6
  113. package/dist/components/password-input2.js +0 -879
  114. package/dist/components/pattern-mixin.js +0 -85
  115. package/dist/components/radio-input.d.ts +0 -11
  116. package/dist/components/radio-input.js +0 -6
  117. package/dist/components/radio-input2.js +0 -115
  118. package/dist/components/select-input.d.ts +0 -11
  119. package/dist/components/select-input.js +0 -6
  120. package/dist/components/select-input2.js +0 -166
  121. package/dist/components/tel-input.d.ts +0 -11
  122. package/dist/components/tel-input.js +0 -6
  123. package/dist/components/tel-input2.js +0 -178
  124. package/dist/components/text-input.d.ts +0 -11
  125. package/dist/components/text-input.js +0 -6
  126. package/dist/components/text-input2.js +0 -157
  127. package/dist/components/tooltipIcon.js +0 -30
  128. package/dist/components/vaadin-button.js +0 -461
  129. package/dist/components/vaadin-combo-box.js +0 -4329
  130. package/dist/components/virtual-keyboard-controller.js +0 -2693
  131. package/dist/esm/index-7e24a6f1.js +0 -1259
  132. package/dist/esm/polyfills/core-js.js +0 -11
  133. package/dist/esm/polyfills/css-shim.js +0 -1
  134. package/dist/esm/polyfills/dom.js +0 -79
  135. package/dist/esm/polyfills/es5-html-element.js +0 -1
  136. package/dist/esm/polyfills/index.js +0 -34
  137. package/dist/esm/polyfills/system.js +0 -6
  138. package/dist/general-input/p-61d76ec3.entry.js +0 -1
  139. package/dist/general-input/p-a79eb0a3.entry.js +0 -4413
  140. package/dist/general-input/p-fb647820.js +0 -1
  141. package/dist/types/Users/adrian.pripon/Documents/Work/stencil/widgets-stencil/packages/general-input/.stencil/packages/general-input/stencil.config.d.ts +0 -2
@@ -1,344 +1,381 @@
1
- import { Component, h, Prop, State, Event, Listen, Element } from '@stencil/core';
2
- import { translate } from '../../utils/locale.utils';
3
- import tooltipIcon from '../../utils/tooltipIcon.svg';
4
- import '@vaadin/checkbox';
5
- import '@vaadin/checkbox-group';
1
+ import { h } from "@stencil/core";
2
+ import { translate } from "../../utils/locale.utils";
3
+ import tooltipIcon from "../../utils/tooltipIcon.svg";
4
+ import "@vaadin/checkbox";
5
+ import "@vaadin/checkbox-group";
6
6
  export class CheckboxGroupInput {
7
- constructor() {
8
- /**
9
- * Default value for the input.
10
- */
11
- this.defaultValue = '';
12
- /**
13
- * Options of the input.
14
- */
15
- this.options = [];
16
- /**
17
- * Client custom styling via inline style
18
- */
19
- this.clientStyling = '';
20
- this.limitStylingAppends = false;
21
- this.showTooltip = false;
22
- this.selectedValues = [];
23
- this.values = [];
24
- this.setClientStyling = () => {
25
- let sheet = document.createElement('style');
26
- sheet.innerHTML = this.clientStyling;
27
- this.stylingContainer.prepend(sheet);
28
- };
29
- }
30
- validityStateHandler(inputStateEvent) {
31
- this.sendValidityState.emit(inputStateEvent);
32
- }
33
- valueHandler(inputValueEvent) {
34
- this.sendInputValue.emit(inputValueEvent);
35
- }
36
- handleClickOutside(event) {
37
- if (event.composedPath()[0] === this.tooltipIconReference)
38
- return;
39
- if (event.composedPath()[0] !== this.tooltipReference)
40
- this.showTooltip = false;
41
- }
42
- connectedCallback() {
43
- console.log(this.validation);
44
- }
45
- componentDidRender() {
46
- // start custom styling area
47
- if (!this.limitStylingAppends && this.stylingContainer) {
48
- if (this.clientStyling)
49
- this.setClientStyling();
50
- this.limitStylingAppends = true;
7
+ constructor() {
8
+ this.value = null;
9
+ this.setClientStyling = () => {
10
+ let sheet = document.createElement('style');
11
+ sheet.innerHTML = this.clientStyling;
12
+ this.stylingContainer.prepend(sheet);
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 = [];
51
29
  }
52
- // end custom styling area
53
- // if(this.defaultValue) {
54
- // this.value = this.defaultValue;
55
- // this.valueHandler({name: this.name, value: this.value});
56
- // }
57
- }
58
- componentDidLoad() {
59
- this.inputReference = this.element.shadowRoot.querySelector('input');
60
- console.log(this.inputReference.required = this.validation.mandatory);
61
- }
62
- handleClick() {
63
- // this.value = this.inputReference.checked.toString();
64
- // this.errorMessage = this.setErrorMessage();
65
- // this.isValid = this.setValidity();
66
- // this.validityStateHandler({valid: this.isValid, name: this.name});
67
- // this.emitValueHandler(true);
68
- }
69
- setValidity() {
70
- return this.inputReference.validity.valid;
71
- }
72
- setErrorMessage() {
73
- if (this.inputReference.validity.valueMissing) {
74
- return translate('requiredError', this.language);
30
+ validityChanged() {
31
+ this.validityStateHandler({ valid: this.isValid, name: this.name });
32
+ if (this.emitValue == true) {
33
+ this.valueHandler({ name: this.name, value: this.value, type: 'checkboxgroup' });
34
+ }
35
+ }
36
+ setValue() {
37
+ this.value = this.options.reduce((acc, option) => {
38
+ acc[option.name] = this.selectedValues.includes(option.name);
39
+ return acc;
40
+ }, {});
41
+ this.emitValueHandler(true);
75
42
  }
76
- }
77
- renderTooltip() {
78
- if (this.showTooltip) {
79
- return (h("div", { class: `checkboxgroup__tooltip ${this.showTooltip ? 'visible' : ''}`, ref: (el) => this.tooltipReference = el, innerHTML: this.tooltip }));
43
+ validityStateHandler(inputStateEvent) {
44
+ this.sendValidityState.emit(inputStateEvent);
80
45
  }
81
- return null;
82
- }
83
- handleParentCheckbox(e) {
84
- // Logic for toggling the children checkboxes.
85
- this.selectedValues = e.target.checked
86
- ? this.options.map((checkbox) => String(checkbox.name))
87
- : [];
88
- console.log(this.inputReference.required);
89
- }
90
- render() {
91
- return h("div", { class: 'checkboxgroup__wrapper', ref: el => this.stylingContainer = el },
92
- h("div", { class: 'checkboxgroup__wrapper--flex' },
93
- h("vaadin-checkbox", { label: `${this.displayName} ${this.validation.mandatory ? '*' : ''}`, checked: this.selectedValues.length === this.options.length, indeterminate: this.selectedValues.length > 0 && this.selectedValues.length < this.options.length, required: this.validation.mandatory, onChange: (e) => this.handleParentCheckbox(e) }),
94
- this.tooltip &&
95
- h("img", { class: 'checkboxgroup__tooltip-icon', src: tooltipIcon, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }),
96
- this.renderTooltip()),
97
- h("small", { class: 'checkboxgroup__error-message' }, this.errorMessage),
98
- h("vaadin-checkbox-group", { theme: "vertical", value: this.selectedValues, "on-value-changed": (event) => {
99
- this.selectedValues = event.detail.value;
100
- } }, this.options.map((checkbox) => h("vaadin-checkbox", { name: checkbox.name, value: checkbox.name, label: checkbox.displayName }))));
101
- }
102
- static get is() { return "checkbox-group-input"; }
103
- static get encapsulation() { return "shadow"; }
104
- static get originalStyleUrls() { return {
105
- "$": ["checkbox-group-input.scss"]
106
- }; }
107
- static get styleUrls() { return {
108
- "$": ["checkbox-group-input.css"]
109
- }; }
110
- static get properties() { return {
111
- "name": {
112
- "type": "string",
113
- "mutable": false,
114
- "complexType": {
115
- "original": "string",
116
- "resolved": "string",
117
- "references": {}
118
- },
119
- "required": false,
120
- "optional": false,
121
- "docs": {
122
- "tags": [],
123
- "text": "Name of the input."
124
- },
125
- "attribute": "name",
126
- "reflect": true
127
- },
128
- "displayName": {
129
- "type": "string",
130
- "mutable": false,
131
- "complexType": {
132
- "original": "string",
133
- "resolved": "string",
134
- "references": {}
135
- },
136
- "required": false,
137
- "optional": false,
138
- "docs": {
139
- "tags": [],
140
- "text": "Name of input to be shown to the user."
141
- },
142
- "attribute": "display-name",
143
- "reflect": true
144
- },
145
- "defaultValue": {
146
- "type": "string",
147
- "mutable": false,
148
- "complexType": {
149
- "original": "string",
150
- "resolved": "string",
151
- "references": {}
152
- },
153
- "required": false,
154
- "optional": false,
155
- "docs": {
156
- "tags": [],
157
- "text": "Default value for the input."
158
- },
159
- "attribute": "default-value",
160
- "reflect": true,
161
- "defaultValue": "''"
162
- },
163
- "autofilled": {
164
- "type": "boolean",
165
- "mutable": false,
166
- "complexType": {
167
- "original": "boolean",
168
- "resolved": "boolean",
169
- "references": {}
170
- },
171
- "required": false,
172
- "optional": false,
173
- "docs": {
174
- "tags": [],
175
- "text": "Boolean. Determines if input should be readonly."
176
- },
177
- "attribute": "autofilled",
178
- "reflect": true
179
- },
180
- "tooltip": {
181
- "type": "string",
182
- "mutable": false,
183
- "complexType": {
184
- "original": "string",
185
- "resolved": "string",
186
- "references": {}
187
- },
188
- "required": false,
189
- "optional": false,
190
- "docs": {
191
- "tags": [],
192
- "text": "Tooltip text."
193
- },
194
- "attribute": "tooltip",
195
- "reflect": true
196
- },
197
- "options": {
198
- "type": "any",
199
- "mutable": false,
200
- "complexType": {
201
- "original": "any",
202
- "resolved": "any",
203
- "references": {}
204
- },
205
- "required": false,
206
- "optional": false,
207
- "docs": {
208
- "tags": [],
209
- "text": "Options of the input."
210
- },
211
- "attribute": "options",
212
- "reflect": true,
213
- "defaultValue": "[]"
214
- },
215
- "validation": {
216
- "type": "unknown",
217
- "mutable": false,
218
- "complexType": {
219
- "original": "ValidationSchema",
220
- "resolved": "ValidationSchema",
221
- "references": {
222
- "ValidationSchema": {
223
- "location": "import",
224
- "path": "../../utils/types"
225
- }
46
+ emitValueHandler(newValue) {
47
+ if (newValue == true && this.isValid) {
48
+ this.valueHandler({ name: this.name, value: this.value, type: 'checkboxgroup' });
226
49
  }
227
- },
228
- "required": false,
229
- "optional": false,
230
- "docs": {
231
- "tags": [],
232
- "text": "Object of validation rules for the input."
233
- }
234
- },
235
- "language": {
236
- "type": "string",
237
- "mutable": false,
238
- "complexType": {
239
- "original": "string",
240
- "resolved": "string",
241
- "references": {}
242
- },
243
- "required": false,
244
- "optional": false,
245
- "docs": {
246
- "tags": [],
247
- "text": "Currently selected language."
248
- },
249
- "attribute": "language",
250
- "reflect": true
251
- },
252
- "emitValue": {
253
- "type": "boolean",
254
- "mutable": false,
255
- "complexType": {
256
- "original": "boolean",
257
- "resolved": "boolean",
258
- "references": {}
259
- },
260
- "required": false,
261
- "optional": false,
262
- "docs": {
263
- "tags": [],
264
- "text": "State passed down from the parent element. Will trigger the input to send it's value through an event."
265
- },
266
- "attribute": "emit-value",
267
- "reflect": true
268
- },
269
- "clientStyling": {
270
- "type": "string",
271
- "mutable": false,
272
- "complexType": {
273
- "original": "string",
274
- "resolved": "string",
275
- "references": {}
276
- },
277
- "required": false,
278
- "optional": false,
279
- "docs": {
280
- "tags": [],
281
- "text": "Client custom styling via inline style"
282
- },
283
- "attribute": "client-styling",
284
- "reflect": true,
285
- "defaultValue": "''"
286
50
  }
287
- }; }
288
- static get states() { return {
289
- "errorMessage": {},
290
- "isValid": {},
291
- "limitStylingAppends": {},
292
- "showTooltip": {},
293
- "selectedValues": {}
294
- }; }
295
- static get events() { return [{
296
- "method": "sendValidityState",
297
- "name": "sendValidityState",
298
- "bubbles": true,
299
- "cancelable": true,
300
- "composed": true,
301
- "docs": {
302
- "tags": [],
303
- "text": ""
304
- },
305
- "complexType": {
306
- "original": "InputStateEvent",
307
- "resolved": "InputStateEvent",
308
- "references": {
309
- "InputStateEvent": {
310
- "location": "import",
311
- "path": "../../utils/types"
312
- }
51
+ valueHandler(inputValueEvent) {
52
+ this.sendInputValue.emit(inputValueEvent);
53
+ }
54
+ handleClickOutside(event) {
55
+ if (event.composedPath()[0] === this.tooltipIconReference)
56
+ return;
57
+ if (event.composedPath()[0] !== this.tooltipReference)
58
+ this.showTooltip = false;
59
+ }
60
+ componentDidRender() {
61
+ // start custom styling area
62
+ if (!this.limitStylingAppends && this.stylingContainer) {
63
+ if (this.clientStyling)
64
+ this.setClientStyling();
65
+ this.limitStylingAppends = true;
313
66
  }
314
- }
315
- }, {
316
- "method": "sendInputValue",
317
- "name": "sendInputValue",
318
- "bubbles": true,
319
- "cancelable": true,
320
- "composed": true,
321
- "docs": {
322
- "tags": [],
323
- "text": ""
324
- },
325
- "complexType": {
326
- "original": "InputValueEvent",
327
- "resolved": "InputValueEvent",
328
- "references": {
329
- "InputValueEvent": {
330
- "location": "import",
331
- "path": "../../utils/types"
332
- }
67
+ // end custom styling area
68
+ }
69
+ componentDidLoad() {
70
+ this.inputReference = this.element.shadowRoot.querySelector('input');
71
+ // For now this input has no validation. Send isValid as true immediately.
72
+ //@TODO: add validation logic to it, if business reason arises.
73
+ this.isValid = this.setValidity();
74
+ if (this.defaultValue) {
75
+ this.selectedValues = this.options.map((checkbox) => checkbox.name);
76
+ this.value = this.defaultValue;
77
+ this.valueHandler({ name: this.name, value: this.value });
333
78
  }
334
- }
335
- }]; }
336
- static get elementRef() { return "element"; }
337
- static get listeners() { return [{
338
- "name": "click",
339
- "method": "handleClickOutside",
340
- "target": "document",
341
- "capture": false,
342
- "passive": false
343
- }]; }
79
+ }
80
+ setValidity() {
81
+ return this.inputReference.validity.valid;
82
+ }
83
+ setErrorMessage() {
84
+ if (this.inputReference.validity.valueMissing) {
85
+ return translate('requiredError', this.language);
86
+ }
87
+ }
88
+ renderTooltip() {
89
+ if (this.showTooltip) {
90
+ return (h("div", { class: `checkboxgroup__tooltip ${this.showTooltip ? 'visible' : ''}`, ref: (el) => this.tooltipReference = el, innerHTML: this.tooltip }));
91
+ }
92
+ return null;
93
+ }
94
+ handleParentCheckbox(e) {
95
+ // Logic for toggling the children checkboxes.
96
+ this.selectedValues = e.target.checked
97
+ ? this.options.map((checkbox) => checkbox.name)
98
+ : [];
99
+ }
100
+ renderLabel() {
101
+ return (h("label", { class: 'checkbox__label', htmlFor: `${this.name}__input`, slot: 'label' }, h("div", { class: 'checkbox__label-text', innerHTML: `${this.displayName} ${this.validation.mandatory ? '*' : ''}` })));
102
+ }
103
+ render() {
104
+ 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 &&
105
+ 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) => {
106
+ this.selectedValues = event.detail.value;
107
+ } }, this.options.map((checkbox) => h("vaadin-checkbox", { class: 'checkbox__input', name: checkbox.name, value: checkbox.name, label: checkbox.displayName }))));
108
+ }
109
+ static get is() { return "checkbox-group-input"; }
110
+ static get encapsulation() { return "shadow"; }
111
+ static get originalStyleUrls() {
112
+ return {
113
+ "$": ["checkbox-group-input.scss"]
114
+ };
115
+ }
116
+ static get styleUrls() {
117
+ return {
118
+ "$": ["checkbox-group-input.css"]
119
+ };
120
+ }
121
+ static get properties() {
122
+ return {
123
+ "name": {
124
+ "type": "string",
125
+ "mutable": false,
126
+ "complexType": {
127
+ "original": "string",
128
+ "resolved": "string",
129
+ "references": {}
130
+ },
131
+ "required": false,
132
+ "optional": false,
133
+ "docs": {
134
+ "tags": [],
135
+ "text": "Name of the input."
136
+ },
137
+ "attribute": "name",
138
+ "reflect": true
139
+ },
140
+ "displayName": {
141
+ "type": "string",
142
+ "mutable": false,
143
+ "complexType": {
144
+ "original": "string",
145
+ "resolved": "string",
146
+ "references": {}
147
+ },
148
+ "required": false,
149
+ "optional": false,
150
+ "docs": {
151
+ "tags": [],
152
+ "text": "Name of input to be shown to the user."
153
+ },
154
+ "attribute": "display-name",
155
+ "reflect": true
156
+ },
157
+ "defaultValue": {
158
+ "type": "string",
159
+ "mutable": false,
160
+ "complexType": {
161
+ "original": "string",
162
+ "resolved": "string",
163
+ "references": {}
164
+ },
165
+ "required": false,
166
+ "optional": false,
167
+ "docs": {
168
+ "tags": [],
169
+ "text": "Default value for the input."
170
+ },
171
+ "attribute": "default-value",
172
+ "reflect": true,
173
+ "defaultValue": "''"
174
+ },
175
+ "autofilled": {
176
+ "type": "boolean",
177
+ "mutable": false,
178
+ "complexType": {
179
+ "original": "boolean",
180
+ "resolved": "boolean",
181
+ "references": {}
182
+ },
183
+ "required": false,
184
+ "optional": false,
185
+ "docs": {
186
+ "tags": [],
187
+ "text": "Boolean. Determines if input should be readonly."
188
+ },
189
+ "attribute": "autofilled",
190
+ "reflect": true
191
+ },
192
+ "tooltip": {
193
+ "type": "string",
194
+ "mutable": false,
195
+ "complexType": {
196
+ "original": "string",
197
+ "resolved": "string",
198
+ "references": {}
199
+ },
200
+ "required": false,
201
+ "optional": false,
202
+ "docs": {
203
+ "tags": [],
204
+ "text": "Tooltip text."
205
+ },
206
+ "attribute": "tooltip",
207
+ "reflect": true
208
+ },
209
+ "options": {
210
+ "type": "unknown",
211
+ "mutable": false,
212
+ "complexType": {
213
+ "original": "RegCfgContentField[]",
214
+ "resolved": "RegCfgContentField[]",
215
+ "references": {
216
+ "RegCfgContentField": {
217
+ "location": "import",
218
+ "path": "../../utils/types",
219
+ "id": "../../../../packages/stencil/general-input/src/utils/types.ts::RegCfgContentField"
220
+ }
221
+ }
222
+ },
223
+ "required": false,
224
+ "optional": false,
225
+ "docs": {
226
+ "tags": [],
227
+ "text": "Options of the input."
228
+ }
229
+ },
230
+ "validation": {
231
+ "type": "unknown",
232
+ "mutable": false,
233
+ "complexType": {
234
+ "original": "ValidationSchema",
235
+ "resolved": "ValidationSchema",
236
+ "references": {
237
+ "ValidationSchema": {
238
+ "location": "import",
239
+ "path": "../../utils/types",
240
+ "id": "../../../../packages/stencil/general-input/src/utils/types.ts::ValidationSchema"
241
+ }
242
+ }
243
+ },
244
+ "required": false,
245
+ "optional": false,
246
+ "docs": {
247
+ "tags": [],
248
+ "text": "Object of validation rules for the input."
249
+ }
250
+ },
251
+ "language": {
252
+ "type": "string",
253
+ "mutable": false,
254
+ "complexType": {
255
+ "original": "string",
256
+ "resolved": "string",
257
+ "references": {}
258
+ },
259
+ "required": false,
260
+ "optional": false,
261
+ "docs": {
262
+ "tags": [],
263
+ "text": "Currently selected language."
264
+ },
265
+ "attribute": "language",
266
+ "reflect": true
267
+ },
268
+ "emitValue": {
269
+ "type": "boolean",
270
+ "mutable": false,
271
+ "complexType": {
272
+ "original": "boolean",
273
+ "resolved": "boolean",
274
+ "references": {}
275
+ },
276
+ "required": false,
277
+ "optional": false,
278
+ "docs": {
279
+ "tags": [],
280
+ "text": "State passed down from the parent element. Will trigger the input to send it's value through an event."
281
+ },
282
+ "attribute": "emit-value",
283
+ "reflect": true
284
+ },
285
+ "clientStyling": {
286
+ "type": "string",
287
+ "mutable": false,
288
+ "complexType": {
289
+ "original": "string",
290
+ "resolved": "string",
291
+ "references": {}
292
+ },
293
+ "required": false,
294
+ "optional": false,
295
+ "docs": {
296
+ "tags": [],
297
+ "text": "Client custom styling via inline style"
298
+ },
299
+ "attribute": "client-styling",
300
+ "reflect": true,
301
+ "defaultValue": "''"
302
+ }
303
+ };
304
+ }
305
+ static get states() {
306
+ return {
307
+ "errorMessage": {},
308
+ "isValid": {},
309
+ "limitStylingAppends": {},
310
+ "showTooltip": {},
311
+ "selectedValues": {}
312
+ };
313
+ }
314
+ static get events() {
315
+ return [{
316
+ "method": "sendValidityState",
317
+ "name": "sendValidityState",
318
+ "bubbles": true,
319
+ "cancelable": true,
320
+ "composed": true,
321
+ "docs": {
322
+ "tags": [],
323
+ "text": ""
324
+ },
325
+ "complexType": {
326
+ "original": "InputStateEvent",
327
+ "resolved": "InputStateEvent",
328
+ "references": {
329
+ "InputStateEvent": {
330
+ "location": "import",
331
+ "path": "../../utils/types",
332
+ "id": "../../../../packages/stencil/general-input/src/utils/types.ts::InputStateEvent"
333
+ }
334
+ }
335
+ }
336
+ }, {
337
+ "method": "sendInputValue",
338
+ "name": "sendInputValue",
339
+ "bubbles": true,
340
+ "cancelable": true,
341
+ "composed": true,
342
+ "docs": {
343
+ "tags": [],
344
+ "text": ""
345
+ },
346
+ "complexType": {
347
+ "original": "InputValueEvent",
348
+ "resolved": "InputValueEvent",
349
+ "references": {
350
+ "InputValueEvent": {
351
+ "location": "import",
352
+ "path": "../../utils/types",
353
+ "id": "../../../../packages/stencil/general-input/src/utils/types.ts::InputValueEvent"
354
+ }
355
+ }
356
+ }
357
+ }];
358
+ }
359
+ static get elementRef() { return "element"; }
360
+ static get watchers() {
361
+ return [{
362
+ "propName": "isValid",
363
+ "methodName": "validityChanged"
364
+ }, {
365
+ "propName": "selectedValues",
366
+ "methodName": "setValue"
367
+ }, {
368
+ "propName": "emitValue",
369
+ "methodName": "emitValueHandler"
370
+ }];
371
+ }
372
+ static get listeners() {
373
+ return [{
374
+ "name": "click",
375
+ "method": "handleClickOutside",
376
+ "target": "document",
377
+ "capture": false,
378
+ "passive": false
379
+ }];
380
+ }
344
381
  }