@everymatrix/general-input 1.75.1 → 1.76.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/cjs/checkbox-group-input_13.cjs.entry.js +503 -2401
  2. package/dist/cjs/general-input.cjs.js +2 -2
  3. package/dist/cjs/{index-9179e91b.js → index-3b546c2c.js} +2 -2
  4. package/dist/cjs/loader.cjs.js +2 -2
  5. package/dist/collection/components/checkbox-group-input/checkbox-group-input.js +7 -7
  6. package/dist/collection/components/checkbox-input/checkbox-input.js +6 -6
  7. package/dist/collection/components/date-input/date-input.js +8 -8
  8. package/dist/collection/components/email-input/email-input.js +7 -7
  9. package/dist/collection/components/general-input/general-input.js +21 -2
  10. package/dist/collection/components/number-input/number-input.js +7 -7
  11. package/dist/collection/components/password-input/password-input.js +33 -7
  12. package/dist/collection/components/radio-input/radio-input.js +7 -7
  13. package/dist/collection/components/select-input/select-input.js +10 -10
  14. package/dist/collection/components/tel-input/tel-input.js +7 -7
  15. package/dist/collection/components/text-input/text-input.js +7 -7
  16. package/dist/collection/components/toggle-checkbox-input/toggle-checkbox-input.js +7 -7
  17. package/dist/collection/components/twofa-input/twofa-input.js +7 -7
  18. package/dist/esm/checkbox-group-input_13.entry.js +503 -2401
  19. package/dist/esm/general-input.js +3 -3
  20. package/dist/esm/{index-ed8fc8f4.js → index-ca174b7a.js} +2 -2
  21. package/dist/esm/loader.js +3 -3
  22. package/dist/general-input/checkbox-group-input_13.entry.js +449 -2378
  23. package/dist/general-input/general-input.esm.js +1 -1
  24. package/dist/general-input/{index-ed8fc8f4.js → index-ca174b7a.js} +1 -1
  25. package/dist/types/components/general-input/general-input.d.ts +4 -0
  26. package/dist/types/components/password-input/password-input.d.ts +4 -0
  27. package/dist/types/components.d.ts +16 -0
  28. package/package.json +1 -1
  29. /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop/Widgets & Template}/widgets-monorepo/packages/stencil/general-input/.stencil/libs/common/src/storybook/storybook-utils.d.ts +0 -0
  30. /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop/Widgets & Template}/widgets-monorepo/packages/stencil/general-input/.stencil/packages/stencil/general-input/stencil.config.d.ts +0 -0
  31. /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop/Widgets & Template}/widgets-monorepo/packages/stencil/general-input/.stencil/packages/stencil/general-input/stencil.config.dev.d.ts +0 -0
  32. /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop/Widgets & Template}/widgets-monorepo/packages/stencil/general-input/.stencil/packages/stencil/general-input/storybook/main.d.ts +0 -0
  33. /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop/Widgets & Template}/widgets-monorepo/packages/stencil/general-input/.stencil/packages/stencil/general-input/storybook/preview.d.ts +0 -0
  34. /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop/Widgets & Template}/widgets-monorepo/packages/stencil/general-input/.stencil/tools/plugins/index.d.ts +0 -0
  35. /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop/Widgets & Template}/widgets-monorepo/packages/stencil/general-input/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +0 -0
  36. /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop/Widgets & Template}/widgets-monorepo/packages/stencil/general-input/.stencil/tools/plugins/vite-chunk-plugin.d.ts +0 -0
  37. /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop/Widgets & Template}/widgets-monorepo/packages/stencil/general-input/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +0 -0
@@ -81,10 +81,10 @@ export class SelectInput {
81
81
  this.sendInputValue.emit(inputValueEvent);
82
82
  }
83
83
  handleClickOutside(event) {
84
- if (event.composedPath()[0] === this.tooltipIconReference)
85
- return;
86
- if (event.composedPath()[0] !== this.tooltipReference)
84
+ const path = event.composedPath();
85
+ if (!path.includes(this.tooltipIconReference) && !path.includes(this.tooltipReference)) {
87
86
  this.showTooltip = false;
87
+ }
88
88
  }
89
89
  connectedCallback() {
90
90
  var _a;
@@ -92,7 +92,7 @@ export class SelectInput {
92
92
  label: option.label,
93
93
  value: option.value
94
94
  }));
95
- // Use the searchable select if there are more then 6 values
95
+ // Use the searchable select if there are more then 6 values
96
96
  this.isComboBox = ((_a = this.displayedOptions) === null || _a === void 0 ? void 0 : _a.length) > 6;
97
97
  }
98
98
  componentWillLoad() {
@@ -105,7 +105,7 @@ export class SelectInput {
105
105
  this.displayedOptions = options[firstKey].map(option => {
106
106
  return { label: option.Name, value: option.Alpha2Code };
107
107
  });
108
- // Use the searchable select if there are more then 6 values
108
+ // Use the searchable select if there are more then 6 values
109
109
  this.isComboBox = ((_a = this.displayedOptions) === null || _a === void 0 ? void 0 : _a.length) > 6;
110
110
  });
111
111
  }
@@ -184,10 +184,10 @@ export class SelectInput {
184
184
  if (this.touched) {
185
185
  invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
186
186
  }
187
- return h("div", { key: '7e90e23b53a72cda885485ccf4110631cede2b8f', class: `select__wrapper ${this.autofilled ? 'select__wrapper--autofilled' : ''} ${this.name}__input`, ref: el => this.stylingContainer = el }, h("div", { key: '9a841ccebeb828fc75ed1f708a4a43d4fc7a193f', class: 'select__wrapper--flex' }, h("label", { key: '92c70fa56518d6d015d756b693306dab80ab0f57', class: 'select__label', htmlFor: `${this.name}__input` }, `${this.displayName} ${this.validation.mandatory ? '*' : ''}`), h("div", { key: 'cfbeb4b4969adc1f9944eb60291d8f586dcc29db', class: 'select__wrapper--relative' }, this.tooltip &&
188
- h("img", { key: '13a340313095bc653a1741115bae128d538dcf30', class: 'select__tooltip-icon', src: tooltipIcon, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), this.isComboBox ? h("vaadin-combo-box", { name: this.name, id: `${this.name}__input`, class: `select__input ${invalidClass} ${this.autofilled ? 'select__input--autofilled' : ''}`, "item-label-path": "label", "item-value-path": "value", ref: (el) => this.vaadinCombo = el, readOnly: this.autofilled, required: (_a = this.validation) === null || _a === void 0 ? void 0 : _a.mandatory, value: this.value, placeholder: `${this.placeholder}`, items: this.displayedOptions, onChange: this.handleComboChange, onBlur: this.handleBlur })
187
+ return h("div", { key: '59052813b3e88f4bb39a3e76a8bef78543f56952', class: `select__wrapper ${this.autofilled ? 'select__wrapper--autofilled' : ''} ${this.name}__input`, ref: el => this.stylingContainer = el }, h("div", { key: 'fa921b9c76a4cc143488e1c493fea5e7b648aff6', class: 'select__wrapper--flex' }, h("label", { key: 'f85dc5333f10edc8a3b2acefe57a6fbf599d4266', class: 'select__label', htmlFor: `${this.name}__input` }, `${this.displayName} ${this.validation.mandatory ? '*' : ''}`), h("div", { key: '6f275104b0b6a3fd650b33766209277a83338fcc', class: 'select__wrapper--relative' }, this.tooltip &&
188
+ h("img", { key: 'fab2ce08a9722d3bd1df5067fd1c458c0449d0b1', class: 'select__tooltip-icon', src: tooltipIcon, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), this.isComboBox ? h("vaadin-combo-box", { name: this.name, id: `${this.name}__input`, class: `select__input ${invalidClass} ${this.autofilled ? 'select__input--autofilled' : ''}`, "item-label-path": "label", "item-value-path": "value", ref: (el) => this.vaadinCombo = el, readOnly: this.autofilled, required: (_a = this.validation) === null || _a === void 0 ? void 0 : _a.mandatory, value: this.value, placeholder: `${this.placeholder}`, items: this.displayedOptions, onChange: this.handleComboChange, onBlur: this.handleBlur })
189
189
  :
190
- h("vaadin-select", { name: this.name, popover: false, id: `${this.name}__input`, class: `select__input ${invalidClass} ${this.autofilled ? 'select__input--autofilled' : ''}`, "item-label-path": "label", "item-value-path": "value", ref: (el) => this.vaadinCombo = el, readOnly: this.autofilled, required: (_b = this.validation) === null || _b === void 0 ? void 0 : _b.mandatory, value: this.value, placeholder: `${this.placeholder}`, items: this.displayedOptions, onChange: this.handleSelectChange, "no-vertical-overlap": true, noVerticalOverlap: true }), h("small", { key: '6ffb5459f648208106c6bfc8a78f5cf379f7f11b', class: 'select__error-message' }, this.errorMessage));
190
+ h("vaadin-select", { name: this.name, popover: false, id: `${this.name}__input`, class: `select__input ${invalidClass} ${this.autofilled ? 'select__input--autofilled' : ''}`, "item-label-path": "label", "item-value-path": "value", ref: (el) => this.vaadinCombo = el, readOnly: this.autofilled, required: (_b = this.validation) === null || _b === void 0 ? void 0 : _b.mandatory, value: this.value, placeholder: `${this.placeholder}`, items: this.displayedOptions, onChange: this.handleSelectChange, "no-vertical-overlap": true, noVerticalOverlap: true }), h("small", { key: '3b6eb1c212308f9a3b88d6c0fd03ae08633317a2', class: 'select__error-message' }, this.errorMessage));
191
191
  }
192
192
  static get is() { return "select-input"; }
193
193
  static get encapsulation() { return "shadow"; }
@@ -489,8 +489,8 @@ export class SelectInput {
489
489
  return [{
490
490
  "name": "click",
491
491
  "method": "handleClickOutside",
492
- "target": "document",
493
- "capture": false,
492
+ "target": "window",
493
+ "capture": true,
494
494
  "passive": false
495
495
  }];
496
496
  }
@@ -69,10 +69,10 @@ export class TelInput {
69
69
  this.sendInputValue.emit(inputValueEvent);
70
70
  }
71
71
  handleClickOutside(event) {
72
- if (event.composedPath()[0] === this.tooltipIconReference)
73
- return;
74
- if (event.composedPath()[0] !== this.tooltipReference)
72
+ const path = event.composedPath();
73
+ if (!path.includes(this.tooltipIconReference) && !path.includes(this.tooltipReference)) {
75
74
  this.showTooltip = false;
75
+ }
76
76
  }
77
77
  connectedCallback() {
78
78
  this.validationPattern = this.setPattern();
@@ -163,8 +163,8 @@ export class TelInput {
163
163
  if (this.touched) {
164
164
  invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
165
165
  }
166
- return h("div", { key: '07279e9146394ad96ca0ce1b3e059f09fce2937a', class: `tel__wrapper ${this.autofilled ? 'tel__wrapper--autofilled' : ''} ${this.name}__input`, ref: el => this.stylingContainer = el }, h("div", { key: 'c4eedb1dba6a3fabd4dcc95e767813f95b83346a', class: 'tel__wrapper--flex-label' }, h("label", { key: '093a445bc6a9144673386abf92263faa2f33a62a', class: `tel__label ${this.validation.mandatory ? 'tel__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), h("div", { key: '76abd68488a0f78e3fbd46328fa338d8c05b9601', class: 'tel__wrapper--relative' }, this.tooltip &&
167
- h("img", { key: '8238860af5dbc417c2cd853b55fd79f67f51649d', class: 'tel__tooltip-icon', src: tooltipIcon, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), h("div", { key: '235b2146fc4c70107d5c077071e1fa52ac1c56d3', class: `tel__wrapper--flex ${invalidClass}` }, h("vaadin-combo-box", { key: '73e51576aad82c2bc6895a62b0c19351a1eb917b', class: 'tel__prefix', items: this.phoneCodesOptions, value: this.prefixValue, readOnly: this.autofilled, onChange: (e) => this.handlePrefixInput(e) }), h("input", { key: 'd714d757cd08e3d700cec86f9d6ce4ff680dd2e9', type: "tel", ref: (el) => this.inputReference = el, id: `${this.name}__input`, readOnly: this.autofilled, class: `tel__input`, value: this.phoneValue, placeholder: `${this.placeholder}`, required: this.validation.mandatory, minlength: this.validation.minLength, maxlength: this.validation.maxLength, pattern: this.validationPattern, onInput: this.handleInput, onBlur: this.handleBlur })), h("small", { key: 'f6ced1b252990cd3ecc18c9c5ad3546654006dcc', class: 'tel__error-message' }, this.errorMessage));
166
+ return h("div", { key: '794ad1ad72a5c558b359e003d880170679145a83', class: `tel__wrapper ${this.autofilled ? 'tel__wrapper--autofilled' : ''} ${this.name}__input`, ref: el => this.stylingContainer = el }, h("div", { key: '60c48397f996eaf2c7df516b42a58e295954ce11', class: 'tel__wrapper--flex-label' }, h("label", { key: '114a11bd08658aba467d8bff220bdbda7c8a635f', class: `tel__label ${this.validation.mandatory ? 'tel__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), h("div", { key: '879297d9f5b68b64a2329717d81eae4fbb9e5f1a', class: 'tel__wrapper--relative' }, this.tooltip &&
167
+ h("img", { key: 'b5e3ec5f52fc4cc36ba7e252a63cc1d4aed92858', class: 'tel__tooltip-icon', src: tooltipIcon, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), h("div", { key: '7fdfce487a763c54a96ff2b541dcf5ea34d1808e', class: `tel__wrapper--flex ${invalidClass}` }, h("vaadin-combo-box", { key: 'e79a8c63f3b3ec22ecf47b0cb0b0aa89075c5f4d', class: 'tel__prefix', items: this.phoneCodesOptions, value: this.prefixValue, readOnly: this.autofilled, onChange: (e) => this.handlePrefixInput(e) }), h("input", { key: '8ed28d4ce9e68c8f941d898f1429c2b0077d5aa6', type: "tel", ref: (el) => this.inputReference = el, id: `${this.name}__input`, readOnly: this.autofilled, class: `tel__input`, value: this.phoneValue, placeholder: `${this.placeholder}`, required: this.validation.mandatory, minlength: this.validation.minLength, maxlength: this.validation.maxLength, pattern: this.validationPattern, onInput: this.handleInput, onBlur: this.handleBlur })), h("small", { key: '315c8e7d6158e963502f37046c8a2f2928873ee6', class: 'tel__error-message' }, this.errorMessage));
168
168
  }
169
169
  static get is() { return "tel-input"; }
170
170
  static get encapsulation() { return "shadow"; }
@@ -460,8 +460,8 @@ export class TelInput {
460
460
  return [{
461
461
  "name": "click",
462
462
  "method": "handleClickOutside",
463
- "target": "document",
464
- "capture": false,
463
+ "target": "window",
464
+ "capture": true,
465
465
  "passive": false
466
466
  }];
467
467
  }
@@ -71,10 +71,10 @@ export class TextInput {
71
71
  this.sendInputValue.emit(inputValueEvent);
72
72
  }
73
73
  handleClickOutside(event) {
74
- if (event.composedPath()[0] === this.tooltipIconReference)
75
- return;
76
- if (event.composedPath()[0] !== this.tooltipReference)
74
+ const path = event.composedPath();
75
+ if (!path.includes(this.tooltipIconReference) && !path.includes(this.tooltipReference)) {
77
76
  this.showTooltip = false;
77
+ }
78
78
  }
79
79
  valueChangedHandler(event) {
80
80
  if (this.isDuplicateInput && this.name === event.detail.name + 'Duplicate') {
@@ -171,8 +171,8 @@ export class TextInput {
171
171
  if (this.touched) {
172
172
  invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
173
173
  }
174
- return h("div", { key: '37c7509b46ab92149c3c11365cf5061bb1bbb01a', class: `text__wrapper ${this.name}__input ${this.autofilled ? 'text__wrapper--autofilled' : ''}`, ref: el => this.stylingContainer = el }, h("div", { key: '737873a059749dc050a8efa6ffb09a1b2ee9f95c', class: 'text__wrapper--flex' }, h("label", { key: '1d921faece6c293c7e3c95d34bedd0d399c7be9e', class: `text__label ${this.validation.mandatory ? 'text__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), h("div", { key: 'e1e59c85912cf7c3dbd1e61bba829ae2b0192a18', class: 'text__wrapper--relative' }, this.tooltip &&
175
- h("img", { key: '73513026eebcc809edef481d5cd7b885e5f20f03', class: 'text__tooltip-icon', src: tooltipIcon, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), h("input", { key: 'a73e2c2430e6fbc778e1fd6b5fcfb298cf01b5c5', name: this.name, id: `${this.name}__input`, value: this.defaultValue, type: 'text', class: `text__input ${invalidClass}`, placeholder: `${this.placeholder}`, ref: (el) => this.inputReference = el, readOnly: this.autofilled, required: this.validation.mandatory, minlength: this.validation.minLength, maxlength: this.validation.maxLength, onInput: this.handleInput, onBlur: this.handleBlur }), h("small", { key: '11cb376081cb05651c60c3e1ac8a41f9751ca16c', class: 'text__error-message' }, this.errorMessage));
174
+ return h("div", { key: 'a769be49d47bf5eac45467f9355aa2d51cb1ff81', class: `text__wrapper ${this.name}__input ${this.autofilled ? 'text__wrapper--autofilled' : ''}`, ref: el => this.stylingContainer = el }, h("div", { key: '3885727132e83f4381c455ec04fe49bb3feb58a2', class: 'text__wrapper--flex' }, h("label", { key: '36132d614d6f921af8dda5fef9466fdbc8b83f2f', class: `text__label ${this.validation.mandatory ? 'text__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), h("div", { key: 'ac112a8be59094ee2c347c1853e1f36781246831', class: 'text__wrapper--relative' }, this.tooltip &&
175
+ h("img", { key: '31d5bc82b517facc92cc84e4191bc33946bbc06c', class: 'text__tooltip-icon', src: tooltipIcon, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), h("input", { key: '3bea6c3cbd01c55ac8e120078afdb784b5d65aee', name: this.name, id: `${this.name}__input`, value: this.defaultValue, type: 'text', class: `text__input ${invalidClass}`, placeholder: `${this.placeholder}`, ref: (el) => this.inputReference = el, readOnly: this.autofilled, required: this.validation.mandatory, minlength: this.validation.minLength, maxlength: this.validation.maxLength, onInput: this.handleInput, onBlur: this.handleBlur }), h("small", { key: '6139392a22701626a0001d41c558593be83aabf2', class: 'text__error-message' }, this.errorMessage));
176
176
  }
177
177
  static get is() { return "text-input"; }
178
178
  static get encapsulation() { return "shadow"; }
@@ -469,8 +469,8 @@ export class TextInput {
469
469
  return [{
470
470
  "name": "click",
471
471
  "method": "handleClickOutside",
472
- "target": "document",
473
- "capture": false,
472
+ "target": "window",
473
+ "capture": true,
474
474
  "passive": false
475
475
  }, {
476
476
  "name": "sendInputValue",
@@ -42,10 +42,10 @@ export class ToggleCheckboxInput {
42
42
  this.sendInputValue.emit(inputValueEvent);
43
43
  }
44
44
  handleClickOutside(event) {
45
- if (event.composedPath()[0] === this.tooltipIconReference)
46
- return;
47
- if (event.composedPath()[0] !== this.tooltipReference)
45
+ const path = event.composedPath();
46
+ if (!path.includes(this.tooltipIconReference) && !path.includes(this.tooltipReference)) {
48
47
  this.showTooltip = false;
48
+ }
49
49
  }
50
50
  componentDidRender() {
51
51
  // start custom styling area
@@ -93,8 +93,8 @@ export class ToggleCheckboxInput {
93
93
  return null;
94
94
  }
95
95
  render() {
96
- return h("div", { key: '6315588766319c4ac7a88646b01bc577858ad718', class: `togglecheckbox__wrapper ${this.name}__input`, ref: el => this.stylingContainer = el }, h("div", { key: '20d6999aaf0499b8b840a28dab89242953b4610d', class: 'togglecheckbox__wrapper--flex' }, h("input", { key: '73b699abf4904e4f2133e30d8dea250c9fe13ac3', 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: '4d10247f1dae300d0f5133accdd544a90fa4d5a7', class: 'togglecheckbox__error-message' }, this.errorMessage), h("div", { key: '9c95cef35e58875b96710d3b64b9af1be27204c5', class: 'togglecheckbox__wrapper--relative' }, this.tooltip &&
97
- h("img", { key: '9774edae6bad4715fd20798a7be25eb71c3c4cf0', class: 'togglecheckbox__tooltip-icon', src: tooltipIcon, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip()), h("div", { key: '70ad3ec894a32439e2dcea617e2a5b773c5456b1', class: `togglecheckbox__fields-wrapper ${this.showFields ? '' : 'hidden'}` }, this.options.map(subfield => {
96
+ return h("div", { key: '355926a9da2977c88b7ae205ddd6468d1a86e2d2', class: `togglecheckbox__wrapper ${this.name}__input`, ref: el => this.stylingContainer = el }, h("div", { key: '3bbf491f4fdf22800ad091de584bcac3c2018308', class: 'togglecheckbox__wrapper--flex' }, h("input", { key: '14654df4ce258c95c7bc23ffd2420c5f0d5eb65e', 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: 'db4624ed73f644db0a8f0b92738497fca64ea035', class: 'togglecheckbox__error-message' }, this.errorMessage), h("div", { key: '898d353c570f9ce19c758585f721f6cb50c35fb0', class: 'togglecheckbox__wrapper--relative' }, this.tooltip &&
97
+ h("img", { key: '1007896417922d0e2bcaaf4c65a5f362e5e3bb49', class: 'togglecheckbox__tooltip-icon', src: tooltipIcon, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip()), h("div", { key: '260480a129168c8868ae0539ba9f9edbec35f87b', class: `togglecheckbox__fields-wrapper ${this.showFields ? '' : 'hidden'}` }, this.options.map(subfield => {
98
98
  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, ref: el => this.subFieldsObject[subfield.name] = el });
99
99
  })));
100
100
  }
@@ -358,8 +358,8 @@ export class ToggleCheckboxInput {
358
358
  return [{
359
359
  "name": "click",
360
360
  "method": "handleClickOutside",
361
- "target": "document",
362
- "capture": false,
361
+ "target": "window",
362
+ "capture": true,
363
363
  "passive": false
364
364
  }];
365
365
  }
@@ -109,10 +109,10 @@ export class TwofaInput {
109
109
  this.sendInputValue.emit(inputValueEvent);
110
110
  }
111
111
  handleClickOutside(event) {
112
- if (event.composedPath()[0] === this.tooltipIconReference)
113
- return;
114
- if (event.composedPath()[0] !== this.tooltipReference)
112
+ const path = event.composedPath();
113
+ if (!path.includes(this.tooltipIconReference) && !path.includes(this.tooltipReference)) {
115
114
  this.showTooltip = false;
115
+ }
116
116
  }
117
117
  connectedCallback() {
118
118
  this.validationPattern = this.setPattern();
@@ -195,9 +195,9 @@ export class TwofaInput {
195
195
  return null;
196
196
  }
197
197
  render() {
198
- return (h("div", { key: '97c1955fececc6f3998375f4c8176ceaed66856a', class: "twofa" }, h("div", { key: 'ee2243931d8e5c6a5aadf1e78d1851449806d2b2', class: 'twofa__error-message' }, h("p", { key: '20a8ccad2e6501c73e3672f6ae325f8539e2d21a' }, this.errorMessage)), h("div", { key: 'bb33610a8be04b86378026c02099620749b81a4b', class: "twofa__description", innerHTML: translate('twofaDescription', this.language, { values: { destination: this.destination } }) }), h("div", { key: 'af3ea38ed6468eb2de66aed810ba50a850bf21a9', class: "twofa__input-wrapper", ref: this.setContainerRef }, this.code.map((char, idx) => {
198
+ return (h("div", { key: '0f7d2f80e6335fcb08b1c61f6e52f51205a30092', class: "twofa" }, h("div", { key: 'd23240ccceb2ac4af5c5a2a1800eccd6013271e3', class: 'twofa__error-message' }, h("p", { key: '72fafd1608f5ae7402be900800100a141fefb72a' }, this.errorMessage)), h("div", { key: '98f5a5614fb895672a175d0415f66b5849b82f85', class: "twofa__description", innerHTML: translate('twofaDescription', this.language, { values: { destination: this.destination } }) }), h("div", { key: '5fd4f8999dc44e372369f03223d53c1d56a1eab4', class: "twofa__input-wrapper", ref: this.setContainerRef }, this.code.map((char, idx) => {
199
199
  return (h("input", { key: idx, ref: el => this.setInputRef(el, idx), id: `otp-input-${idx}`, type: "text", maxLength: 2, value: char, onInput: (event) => this.handleInput(event, idx), onKeyDown: (event) => this.handleKeyDown(event, idx), onPaste: (event) => this.handlePaste(event) }));
200
- })), h("div", { key: 'f385bd6dc93896d918a5cc1365b59bedd47d5bb0', class: "twofa__button-wrapper" }, h("p", { key: '3623f0391e0e5923cd6b3bfd74d203905486209f', class: "twofa__resend-message" }, translate('twofaResendMessage', this.language)), h("button", { key: '497660604f87dbf4ce1ce51ecd041e82ab5dd33a', class: "twofa__resend-button", onClick: this.resendCodeHandler, disabled: !this.isResendButtonAvailable }, this.isResendButtonAvailable
200
+ })), h("div", { key: 'b6e5b2ba4e10cbbd092aaef4d13e0f6a640b3c29', class: "twofa__button-wrapper" }, h("p", { key: 'eba4ae1393d89db6729cfff7d5bc4eb5a4ab0b43', class: "twofa__resend-message" }, translate('twofaResendMessage', this.language)), h("button", { key: '58069e9cb76ecf1776f0733a9f8bc20387e71ad3', class: "twofa__resend-button", onClick: this.resendCodeHandler, disabled: !this.isResendButtonAvailable }, this.isResendButtonAvailable
201
201
  ? translate('twofaResendButton', this.language)
202
202
  : this.formatTime()))));
203
203
  }
@@ -487,8 +487,8 @@ export class TwofaInput {
487
487
  return [{
488
488
  "name": "click",
489
489
  "method": "handleClickOutside",
490
- "target": "document",
491
- "capture": false,
490
+ "target": "window",
491
+ "capture": true,
492
492
  "passive": false
493
493
  }];
494
494
  }