@everymatrix/general-input 1.44.0 → 1.45.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 (139) hide show
  1. package/dist/cjs/app-globals-3a1e7e63.js +5 -0
  2. package/dist/cjs/checkbox-group-input_10.cjs.entry.js +3873 -1756
  3. package/dist/cjs/general-input.cjs.entry.js +65 -63
  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 +13 -13
  7. package/dist/cjs/loader.cjs.js +7 -13
  8. package/dist/cjs/locale.utils-76c75c40.js +147 -0
  9. package/dist/cjs/toggle-checkbox-input.cjs.entry.js +77 -78
  10. package/dist/collection/collection-manifest.json +14 -14
  11. package/dist/collection/components/checkbox-group-input/checkbox-group-input.js +368 -353
  12. package/dist/collection/components/checkbox-input/checkbox-input.js +325 -315
  13. package/dist/collection/components/date-input/date-input.css +2 -2
  14. package/dist/collection/components/date-input/date-input.js +397 -376
  15. package/dist/collection/components/email-input/email-input.css +7 -11
  16. package/dist/collection/components/email-input/email-input.js +404 -385
  17. package/dist/collection/components/general-input/general-input.js +373 -368
  18. package/dist/collection/components/general-input/index.js +1 -0
  19. package/dist/collection/components/number-input/number-input.js +370 -352
  20. package/dist/collection/components/password-input/password-input.css +2 -4
  21. package/dist/collection/components/password-input/password-input.js +513 -540
  22. package/dist/collection/components/radio-input/radio-input.js +301 -286
  23. package/dist/collection/components/select-input/select-input.css +8 -9
  24. package/dist/collection/components/select-input/select-input.js +427 -414
  25. package/dist/collection/components/tel-input/tel-input.css +1 -1
  26. package/dist/collection/components/tel-input/tel-input.js +440 -422
  27. package/dist/collection/components/text-input/text-input.css +0 -1
  28. package/dist/collection/components/text-input/text-input.js +444 -429
  29. package/dist/collection/components/toggle-checkbox-input/toggle-checkbox-input.js +327 -340
  30. package/dist/collection/index.js +13 -13
  31. package/dist/collection/utils/locale.utils.js +133 -133
  32. package/dist/collection/utils/utils.js +3 -3
  33. package/dist/esm/app-globals-0f993ce5.js +3 -0
  34. package/dist/esm/checkbox-group-input_10.entry.js +3873 -1756
  35. package/dist/esm/general-input.entry.js +65 -63
  36. package/dist/esm/general-input.js +14 -11
  37. package/dist/esm/index-514fda47.js +1287 -0
  38. package/dist/esm/index.js +13 -13
  39. package/dist/esm/loader.js +7 -13
  40. package/dist/esm/locale.utils-ca41bf95.js +144 -0
  41. package/dist/esm/toggle-checkbox-input.entry.js +77 -78
  42. package/dist/general-input/general-input.esm.js +1 -1
  43. package/dist/general-input/p-03e81c11.js +2 -0
  44. package/dist/general-input/p-aec71434.js +1 -0
  45. package/dist/general-input/p-e1255160.js +1 -0
  46. package/dist/general-input/p-eb454344.entry.js +1 -0
  47. package/dist/general-input/p-ecdc294b.entry.js +5430 -0
  48. package/dist/general-input/p-f92ab852.entry.js +1 -0
  49. package/dist/stencil.config.dev.js +17 -0
  50. package/dist/stencil.config.js +14 -19
  51. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/general-input/.stencil/packages/stencil/general-input/stencil.config.d.ts +2 -0
  52. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/general-input/.stencil/packages/stencil/general-input/stencil.config.dev.d.ts +2 -0
  53. package/dist/types/components/checkbox-group-input/checkbox-group-input.d.ts +68 -68
  54. package/dist/types/components/checkbox-input/checkbox-input.d.ts +61 -62
  55. package/dist/types/components/date-input/date-input.d.ts +78 -78
  56. package/dist/types/components/email-input/email-input.d.ts +77 -77
  57. package/dist/types/components/general-input/general-input.d.ts +72 -72
  58. package/dist/types/components/general-input/index.d.ts +1 -0
  59. package/dist/types/components/number-input/number-input.d.ts +71 -71
  60. package/dist/types/components/password-input/password-input.d.ts +87 -92
  61. package/dist/types/components/radio-input/radio-input.d.ts +55 -55
  62. package/dist/types/components/select-input/select-input.d.ts +79 -79
  63. package/dist/types/components/tel-input/tel-input.d.ts +85 -85
  64. package/dist/types/components/text-input/text-input.d.ts +81 -81
  65. package/dist/types/components/toggle-checkbox-input/toggle-checkbox-input.d.ts +63 -68
  66. package/dist/types/components.d.ts +201 -39
  67. package/dist/types/stencil-public-runtime.d.ts +142 -33
  68. package/dist/types/utils/locale.utils.d.ts +8 -8
  69. package/dist/types/utils/types.d.ts +54 -54
  70. package/loader/cdn.js +1 -3
  71. package/loader/index.cjs.js +1 -3
  72. package/loader/index.d.ts +13 -1
  73. package/loader/index.es2017.js +1 -3
  74. package/loader/index.js +1 -3
  75. package/loader/package.json +1 -0
  76. package/package.json +8 -1
  77. package/dist/cjs/index-132a0774.js +0 -1327
  78. package/dist/cjs/locale.utils-2fa6f747.js +0 -147
  79. package/dist/components/active-mixin.js +0 -975
  80. package/dist/components/checkbox-group-input.d.ts +0 -11
  81. package/dist/components/checkbox-group-input.js +0 -6
  82. package/dist/components/checkbox-group-input2.js +0 -1078
  83. package/dist/components/checkbox-input.d.ts +0 -11
  84. package/dist/components/checkbox-input.js +0 -6
  85. package/dist/components/checkbox-input2.js +0 -132
  86. package/dist/components/date-input.d.ts +0 -11
  87. package/dist/components/date-input.js +0 -6
  88. package/dist/components/date-input2.js +0 -11556
  89. package/dist/components/email-input.d.ts +0 -11
  90. package/dist/components/email-input.js +0 -6
  91. package/dist/components/email-input2.js +0 -171
  92. package/dist/components/field-mixin.js +0 -12426
  93. package/dist/components/general-input.d.ts +0 -11
  94. package/dist/components/general-input.js +0 -6
  95. package/dist/components/general-input2.js +0 -350
  96. package/dist/components/index.d.ts +0 -26
  97. package/dist/components/index.js +0 -18
  98. package/dist/components/input-field-shared-styles.js +0 -1211
  99. package/dist/components/number-input.d.ts +0 -11
  100. package/dist/components/number-input.js +0 -6
  101. package/dist/components/number-input2.js +0 -158
  102. package/dist/components/password-input.d.ts +0 -11
  103. package/dist/components/password-input.js +0 -6
  104. package/dist/components/password-input2.js +0 -1059
  105. package/dist/components/radio-input.d.ts +0 -11
  106. package/dist/components/radio-input.js +0 -6
  107. package/dist/components/radio-input2.js +0 -114
  108. package/dist/components/select-input.d.ts +0 -11
  109. package/dist/components/select-input.js +0 -6
  110. package/dist/components/select-input2.js +0 -183
  111. package/dist/components/tel-input.d.ts +0 -11
  112. package/dist/components/tel-input.js +0 -6
  113. package/dist/components/tel-input2.js +0 -197
  114. package/dist/components/text-input.d.ts +0 -11
  115. package/dist/components/text-input.js +0 -6
  116. package/dist/components/text-input2.js +0 -199
  117. package/dist/components/toggle-checkbox-input.d.ts +0 -11
  118. package/dist/components/toggle-checkbox-input.js +0 -6
  119. package/dist/components/tooltipIcon.js +0 -146
  120. package/dist/components/vaadin-button.js +0 -490
  121. package/dist/components/vaadin-combo-box.js +0 -4512
  122. package/dist/components/virtual-keyboard-controller.js +0 -2001
  123. package/dist/esm/index-db76d5b5.js +0 -1299
  124. package/dist/esm/locale.utils-30fb5289.js +0 -144
  125. package/dist/esm/polyfills/core-js.js +0 -11
  126. package/dist/esm/polyfills/css-shim.js +0 -1
  127. package/dist/esm/polyfills/dom.js +0 -79
  128. package/dist/esm/polyfills/es5-html-element.js +0 -1
  129. package/dist/esm/polyfills/index.js +0 -34
  130. package/dist/esm/polyfills/system.js +0 -6
  131. package/dist/general-input/p-04d4b145.js +0 -1
  132. package/dist/general-input/p-a8221ce9.entry.js +0 -1
  133. package/dist/general-input/p-b408093e.js +0 -1
  134. package/dist/general-input/p-b64caafa.entry.js +0 -3646
  135. package/dist/general-input/p-c85c0e4d.entry.js +0 -1
  136. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/general-input/.stencil/packages/general-input/stencil.config.d.ts +0 -2
  137. /package/dist/cjs/{tooltipIcon-092a795f.js → tooltipIcon-7e9ee226.js} +0 -0
  138. /package/dist/esm/{tooltipIcon-99c1c7b7.js → tooltipIcon-0a5a06a2.js} +0 -0
  139. /package/dist/general-input/{p-f4f4ccda.js → p-2dccd0bf.js} +0 -0
@@ -1,11 +0,0 @@
1
- import type { Components, JSX } from "../types/components";
2
-
3
- interface GeneralInput extends Components.GeneralInput, HTMLElement {}
4
- export const GeneralInput: {
5
- prototype: GeneralInput;
6
- new (): GeneralInput;
7
- };
8
- /**
9
- * Used to define this component and all nested components recursively.
10
- */
11
- export const defineCustomElement: () => void;
@@ -1,6 +0,0 @@
1
- import { G as GeneralInput$1, d as defineCustomElement$1 } from './general-input2.js';
2
-
3
- const GeneralInput = GeneralInput$1;
4
- const defineCustomElement = defineCustomElement$1;
5
-
6
- export { GeneralInput, defineCustomElement };
@@ -1,350 +0,0 @@
1
- import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
- import { t as translate, a as tooltipIconSvg, g as getTranslations } from './tooltipIcon.js';
3
- import { d as defineCustomElement$b } from './checkbox-group-input2.js';
4
- import { d as defineCustomElement$a } from './checkbox-input2.js';
5
- import { d as defineCustomElement$9 } from './date-input2.js';
6
- import { d as defineCustomElement$8 } from './email-input2.js';
7
- import { d as defineCustomElement$7 } from './number-input2.js';
8
- import { d as defineCustomElement$6 } from './password-input2.js';
9
- import { d as defineCustomElement$5 } from './radio-input2.js';
10
- import { d as defineCustomElement$4 } from './select-input2.js';
11
- import { d as defineCustomElement$3 } from './tel-input2.js';
12
- import { d as defineCustomElement$2 } from './text-input2.js';
13
-
14
- const toggleCheckboxInputCss = "*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.togglecheckbox{font-family:\"Roboto\";font-style:normal;font-size:15px}.togglecheckbox__wrapper{position:relative}.togglecheckbox__wrapper--flex{display:flex;gap:10px;align-items:baseline}.togglecheckbox__wrapper--relative{position:relative;display:inline}.togglecheckbox__input{transform:scale(1.307, 1.307);margin-left:2px;accent-color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C))}.togglecheckbox__label{font-style:inherit;font-family:inherit;font-weight:400;font-size:16px;color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));line-height:1.5;cursor:pointer;padding:0}.togglecheckbox__label-text{font-size:16px}.togglecheckbox__label a{color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C))}.togglecheckbox__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.togglecheckbox__tooltip-icon{width:16px;height:auto}.togglecheckbox__tooltip{position:absolute;top:0;right:0;background-color:var(--emfe-w-color-white, #FFFFFF);border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.togglecheckbox__tooltip.visible{opacity:1}.togglecheckbox__fields-wrapper{margin-top:40px;display:flex;flex-direction:column;gap:40px}.hidden{display:none}";
15
-
16
- const ToggleCheckboxInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
17
- constructor() {
18
- super();
19
- this.__registerHost();
20
- this.__attachShadow();
21
- this.sendValidityState = createEvent(this, "sendValidityState", 7);
22
- this.sendInputValue = createEvent(this, "sendInputValue", 7);
23
- /**
24
- * Default value for the input.
25
- */
26
- this.defaultValue = '';
27
- /**
28
- * Client custom styling via inline style
29
- */
30
- this.clientStyling = '';
31
- /**
32
- * Emit event on click
33
- */
34
- this.emitOnClick = false;
35
- this.limitStylingAppends = false;
36
- this.showTooltip = false;
37
- this.value = '';
38
- this.setClientStyling = () => {
39
- let sheet = document.createElement('style');
40
- sheet.innerHTML = this.clientStyling;
41
- this.stylingContainer.prepend(sheet);
42
- };
43
- this.handleLabelClick = (event) => {
44
- event.stopPropagation();
45
- };
46
- }
47
- validityStateHandler(inputStateEvent) {
48
- this.sendValidityState.emit(inputStateEvent);
49
- }
50
- valueHandler(inputValueEvent) {
51
- this.sendInputValue.emit(inputValueEvent);
52
- }
53
- handleClickOutside(event) {
54
- if (event.composedPath()[0] === this.tooltipIconReference)
55
- return;
56
- if (event.composedPath()[0] !== this.tooltipReference)
57
- this.showTooltip = false;
58
- }
59
- componentDidRender() {
60
- // start custom styling area
61
- if (!this.limitStylingAppends && this.stylingContainer) {
62
- if (this.clientStyling)
63
- this.setClientStyling();
64
- this.limitStylingAppends = true;
65
- }
66
- // end custom styling area
67
- }
68
- handleClick() {
69
- this.showFields = this.checkboxReference.checked;
70
- this.errorMessage = this.setErrorMessage();
71
- this.isValid = this.setValidity();
72
- }
73
- setValidity() {
74
- return this.checkboxReference.validity.valid;
75
- }
76
- setErrorMessage() {
77
- if (this.checkboxReference.validity.valueMissing) {
78
- return translate('requiredError', this.language);
79
- }
80
- }
81
- renderLabel() {
82
- return (h("label", { class: 'togglecheckbox__label', htmlFor: `${this.name}__input`, onClick: this.handleLabelClick }, h("div", { class: 'togglecheckbox__label-text', innerHTML: `${this.displayName} ${this.validation.mandatory ? '*' : ''}` })));
83
- }
84
- renderTooltip() {
85
- if (this.showTooltip) {
86
- return (h("div", { class: `togglecheckbox__tooltip ${this.showTooltip ? 'visible' : ''}`, ref: (el) => this.tooltipReference = el, innerHTML: this.tooltip }));
87
- }
88
- return null;
89
- }
90
- render() {
91
- return h("div", { class: `togglecheckbox__wrapper ${this.name}__input`, ref: el => this.stylingContainer = el }, h("div", { class: 'togglecheckbox__wrapper--flex' }, h("input", { 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", { class: 'togglecheckbox__error-message' }, this.errorMessage), h("div", { class: 'togglecheckbox__wrapper--relative' }, this.tooltip &&
92
- h("img", { class: 'togglecheckbox__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip()), h("div", { class: `togglecheckbox__fields-wrapper ${this.showFields ? '' : 'hidden'}` }, this.options.map(subfield => {
93
- 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, emitOnClick: this.emitOnClick });
94
- })));
95
- }
96
- static get style() { return toggleCheckboxInputCss; }
97
- }, [1, "toggle-checkbox-input", {
98
- "name": [513],
99
- "displayName": [513, "display-name"],
100
- "defaultValue": [513, "default-value"],
101
- "options": [16],
102
- "autofilled": [516],
103
- "tooltip": [513],
104
- "validation": [16],
105
- "language": [513],
106
- "emitValue": [516, "emit-value"],
107
- "clientStyling": [513, "client-styling"],
108
- "emitOnClick": [516, "emit-on-click"],
109
- "errorMessage": [32],
110
- "isValid": [32],
111
- "limitStylingAppends": [32],
112
- "showTooltip": [32],
113
- "showFields": [32]
114
- }, [[4, "click", "handleClickOutside"]]]);
115
- function defineCustomElement$1() {
116
- if (typeof customElements === "undefined") {
117
- return;
118
- }
119
- const components = ["toggle-checkbox-input", "checkbox-group-input", "checkbox-input", "date-input", "email-input", "general-input", "number-input", "password-input", "radio-input", "select-input", "tel-input", "text-input", "toggle-checkbox-input"];
120
- components.forEach(tagName => { switch (tagName) {
121
- case "toggle-checkbox-input":
122
- if (!customElements.get(tagName)) {
123
- customElements.define(tagName, ToggleCheckboxInput);
124
- }
125
- break;
126
- case "checkbox-group-input":
127
- if (!customElements.get(tagName)) {
128
- defineCustomElement$b();
129
- }
130
- break;
131
- case "checkbox-input":
132
- if (!customElements.get(tagName)) {
133
- defineCustomElement$a();
134
- }
135
- break;
136
- case "date-input":
137
- if (!customElements.get(tagName)) {
138
- defineCustomElement$9();
139
- }
140
- break;
141
- case "email-input":
142
- if (!customElements.get(tagName)) {
143
- defineCustomElement$8();
144
- }
145
- break;
146
- case "general-input":
147
- if (!customElements.get(tagName)) {
148
- defineCustomElement();
149
- }
150
- break;
151
- case "number-input":
152
- if (!customElements.get(tagName)) {
153
- defineCustomElement$7();
154
- }
155
- break;
156
- case "password-input":
157
- if (!customElements.get(tagName)) {
158
- defineCustomElement$6();
159
- }
160
- break;
161
- case "radio-input":
162
- if (!customElements.get(tagName)) {
163
- defineCustomElement$5();
164
- }
165
- break;
166
- case "select-input":
167
- if (!customElements.get(tagName)) {
168
- defineCustomElement$4();
169
- }
170
- break;
171
- case "tel-input":
172
- if (!customElements.get(tagName)) {
173
- defineCustomElement$3();
174
- }
175
- break;
176
- case "text-input":
177
- if (!customElements.get(tagName)) {
178
- defineCustomElement$2();
179
- }
180
- break;
181
- case "toggle-checkbox-input":
182
- if (!customElements.get(tagName)) {
183
- defineCustomElement$1();
184
- }
185
- break;
186
- } });
187
- }
188
-
189
- const generalInputCss = ":host{display:block;height:100%}";
190
-
191
- const GeneralInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
192
- constructor() {
193
- super();
194
- this.__registerHost();
195
- this.__attachShadow();
196
- /**
197
- * Type the general-input should take. Can take the default HTML input values.
198
- */
199
- this.type = 'text';
200
- /**
201
- * Client custom styling via inline style
202
- */
203
- this.clientStyling = '';
204
- /**
205
- * Translations via URL
206
- */
207
- this.translationUrl = '';
208
- /**
209
- * Emit event on click
210
- */
211
- this.emitOnClick = false;
212
- this.handleClick = (event) => {
213
- if (this.emitOnClick) {
214
- event.stopPropagation();
215
- window.postMessage({ type: `registration${this.name}Clicked` }, window.location.href);
216
- }
217
- };
218
- }
219
- connectedCallback() {
220
- if (this.translationUrl) {
221
- getTranslations(this.translationUrl);
222
- }
223
- }
224
- renderInput() {
225
- var _a;
226
- switch ((_a = this.type) === null || _a === void 0 ? void 0 : _a.toLowerCase()) {
227
- case 'text':
228
- return h("text-input", { name: this.name, displayName: this.displayName, validation: this.validation, defaultValue: this.defaultValue, autofilled: this.autofilled, emitValue: this.emitValue, language: this.language, isDuplicateInput: this.isDuplicateInput, "client-styling": this.clientStyling, tooltip: this.tooltip, placeholder: this.placeholder });
229
- case 'email':
230
- return h("email-input", { name: this.name, displayName: this.displayName, validation: this.validation, defaultValue: this.defaultValue, autofilled: this.autofilled, emitValue: this.emitValue, language: this.language, isDuplicateInput: this.isDuplicateInput, "client-styling": this.clientStyling, tooltip: this.tooltip, placeholder: this.placeholder });
231
- case 'number':
232
- return h("number-input", { name: this.name, displayName: this.displayName, validation: this.validation, defaultValue: this.defaultValue, autofilled: this.autofilled, emitValue: this.emitValue, language: this.language, "client-styling": this.clientStyling, tooltip: this.tooltip, placeholder: this.placeholder });
233
- case 'checkbox':
234
- return h("checkbox-input", { name: this.name, displayName: this.displayName, validation: this.validation, emitValue: this.emitValue, defaultValue: this.defaultValue, autofilled: this.autofilled, language: this.language, "client-styling": this.clientStyling, tooltip: this.tooltip });
235
- case 'checkboxgroup':
236
- return h("checkbox-group-input", { name: this.name, displayName: this.displayName, validation: this.validation, defaultValue: this.defaultValue, autofilled: this.autofilled, emitValue: this.emitValue, language: this.language, "client-styling": this.clientStyling, tooltip: this.tooltip, options: this.options });
237
- case 'togglecheckbox':
238
- return h("toggle-checkbox-input", { name: this.name, displayName: this.displayName, validation: this.validation, defaultValue: this.defaultValue, autofilled: this.autofilled, emitValue: this.emitValue, language: this.language, "client-styling": this.clientStyling, tooltip: this.tooltip, options: this.options, emitOnClick: this.emitOnClick });
239
- case 'datetime':
240
- return h("date-input", { name: this.name, displayName: this.displayName, validation: this.validation, defaultValue: this.defaultValue, autofilled: this.autofilled, emitValue: this.emitValue, language: this.language, "client-styling": this.clientStyling, tooltip: this.tooltip, placeholder: this.placeholder, dateFormat: this.dateFormat });
241
- case 'password':
242
- return h("password-input", { name: this.name, displayName: this.displayName, validation: this.validation, defaultValue: this.defaultValue, autofilled: this.autofilled, emitValue: this.emitValue, language: this.language, isDuplicateInput: this.isDuplicateInput, "client-styling": this.clientStyling, tooltip: this.tooltip, placeholder: this.placeholder });
243
- case 'radio':
244
- return h("radio-input", { name: this.name, displayName: this.displayName, optionsGroup: this.options, validation: this.validation, emitValue: this.emitValue, language: this.language, "client-styling": this.clientStyling });
245
- case 'tel':
246
- return h("tel-input", { name: this.name, action: this.action, displayName: this.displayName, validation: this.validation, defaultValue: this.defaultValue, emitValue: this.emitValue, language: this.language, autofilled: this.autofilled, "client-styling": this.clientStyling, tooltip: this.tooltip, placeholder: this.placeholder });
247
- case 'dropdown':
248
- return h("select-input", { name: this.name, action: this.action, defaultValue: this.defaultValue, displayName: this.displayName, options: this.options, validation: this.validation, emitValue: this.emitValue, autofilled: this.autofilled, language: this.language, "client-styling": this.clientStyling, tooltip: this.tooltip, placeholder: this.placeholder });
249
- default:
250
- return h("p", null, "The ", this.type, " input type is not valid");
251
- }
252
- }
253
- render() {
254
- return (h(Host, { class: `general-input--${this.name}`, onClick: this.handleClick }, this.renderInput()));
255
- }
256
- static get style() { return generalInputCss; }
257
- }, [1, "general-input", {
258
- "type": [513],
259
- "name": [513],
260
- "displayName": [513, "display-name"],
261
- "placeholder": [513],
262
- "action": [513],
263
- "validation": [16],
264
- "options": [520],
265
- "language": [513],
266
- "autofilled": [516],
267
- "tooltip": [513],
268
- "defaultValue": [520, "default-value"],
269
- "emitValue": [516, "emit-value"],
270
- "isDuplicateInput": [516, "is-duplicate-input"],
271
- "clientStyling": [520, "client-styling"],
272
- "dateFormat": [513, "date-format"],
273
- "translationUrl": [513, "translation-url"],
274
- "emitOnClick": [516, "emit-on-click"]
275
- }]);
276
- function defineCustomElement() {
277
- if (typeof customElements === "undefined") {
278
- return;
279
- }
280
- const components = ["general-input", "checkbox-group-input", "checkbox-input", "date-input", "email-input", "general-input", "number-input", "password-input", "radio-input", "select-input", "tel-input", "text-input", "toggle-checkbox-input"];
281
- components.forEach(tagName => { switch (tagName) {
282
- case "general-input":
283
- if (!customElements.get(tagName)) {
284
- customElements.define(tagName, GeneralInput);
285
- }
286
- break;
287
- case "checkbox-group-input":
288
- if (!customElements.get(tagName)) {
289
- defineCustomElement$b();
290
- }
291
- break;
292
- case "checkbox-input":
293
- if (!customElements.get(tagName)) {
294
- defineCustomElement$a();
295
- }
296
- break;
297
- case "date-input":
298
- if (!customElements.get(tagName)) {
299
- defineCustomElement$9();
300
- }
301
- break;
302
- case "email-input":
303
- if (!customElements.get(tagName)) {
304
- defineCustomElement$8();
305
- }
306
- break;
307
- case "general-input":
308
- if (!customElements.get(tagName)) {
309
- defineCustomElement();
310
- }
311
- break;
312
- case "number-input":
313
- if (!customElements.get(tagName)) {
314
- defineCustomElement$7();
315
- }
316
- break;
317
- case "password-input":
318
- if (!customElements.get(tagName)) {
319
- defineCustomElement$6();
320
- }
321
- break;
322
- case "radio-input":
323
- if (!customElements.get(tagName)) {
324
- defineCustomElement$5();
325
- }
326
- break;
327
- case "select-input":
328
- if (!customElements.get(tagName)) {
329
- defineCustomElement$4();
330
- }
331
- break;
332
- case "tel-input":
333
- if (!customElements.get(tagName)) {
334
- defineCustomElement$3();
335
- }
336
- break;
337
- case "text-input":
338
- if (!customElements.get(tagName)) {
339
- defineCustomElement$2();
340
- }
341
- break;
342
- case "toggle-checkbox-input":
343
- if (!customElements.get(tagName)) {
344
- defineCustomElement$1();
345
- }
346
- break;
347
- } });
348
- }
349
-
350
- export { GeneralInput as G, ToggleCheckboxInput as T, defineCustomElement$1 as a, defineCustomElement as d };
@@ -1,26 +0,0 @@
1
- /* GeneralInput custom elements */
2
-
3
- import type { Components, JSX } from "../types/components";
4
-
5
- /**
6
- * Used to manually set the base path where assets can be found.
7
- * If the script is used as "module", it's recommended to use "import.meta.url",
8
- * such as "setAssetPath(import.meta.url)". Other options include
9
- * "setAssetPath(document.currentScript.src)", or using a bundler's replace plugin to
10
- * dynamically set the path at build time, such as "setAssetPath(process.env.ASSET_PATH)".
11
- * But do note that this configuration depends on how your script is bundled, or lack of
12
- * bundling, and where your assets can be loaded from. Additionally custom bundling
13
- * will have to ensure the static assets are copied to its build directory.
14
- */
15
- export declare const setAssetPath: (path: string) => void;
16
-
17
- export interface SetPlatformOptions {
18
- raf?: (c: FrameRequestCallback) => number;
19
- ael?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
20
- rel?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
21
- }
22
- export declare const setPlatformOptions: (opts: SetPlatformOptions) => void;
23
-
24
- export type { Components, JSX };
25
-
26
- export * from '../types';
@@ -1,18 +0,0 @@
1
- export { setAssetPath, setPlatformOptions } from '@stencil/core/internal/client';
2
-
3
- function safeDecorator(fn) {
4
- // eslint-disable-next-line func-names
5
- return function (...args) {
6
- try {
7
- return fn.apply(this, args);
8
- }
9
- catch (error) {
10
- if (error instanceof DOMException &&
11
- error.message.includes('has already been used with this registry') || error.message.includes('Cannot define multiple custom elements with the same tag name')) {
12
- return false;
13
- }
14
- throw error;
15
- }
16
- };
17
- }
18
- customElements.define = safeDecorator(customElements.define);