@everymatrix/general-input 1.31.1 → 1.32.4

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 (136) hide show
  1. package/LICENSE +21 -0
  2. package/package.json +3 -2
  3. package/dist/cjs/checkbox-group-input_10.cjs.entry.js +0 -36077
  4. package/dist/cjs/general-input.cjs.entry.js +0 -75
  5. package/dist/cjs/general-input.cjs.js +0 -19
  6. package/dist/cjs/index-132a0774.js +0 -1327
  7. package/dist/cjs/index.cjs.js +0 -18
  8. package/dist/cjs/loader.cjs.js +0 -21
  9. package/dist/cjs/locale.utils-cef1d3b6.js +0 -128
  10. package/dist/cjs/toggle-checkbox-input.cjs.entry.js +0 -85
  11. package/dist/cjs/tooltipIcon-092a795f.js +0 -5
  12. package/dist/collection/collection-manifest.json +0 -23
  13. package/dist/collection/components/checkbox-group-input/checkbox-group-input.css +0 -82
  14. package/dist/collection/components/checkbox-group-input/checkbox-group-input.js +0 -366
  15. package/dist/collection/components/checkbox-input/checkbox-input.css +0 -68
  16. package/dist/collection/components/checkbox-input/checkbox-input.js +0 -324
  17. package/dist/collection/components/date-input/date-input.css +0 -101
  18. package/dist/collection/components/date-input/date-input.js +0 -396
  19. package/dist/collection/components/email-input/email-input.css +0 -95
  20. package/dist/collection/components/email-input/email-input.js +0 -403
  21. package/dist/collection/components/general-input/general-input.css +0 -4
  22. package/dist/collection/components/general-input/general-input.js +0 -373
  23. package/dist/collection/components/number-input/number-input.css +0 -102
  24. package/dist/collection/components/number-input/number-input.js +0 -368
  25. package/dist/collection/components/password-input/password-input.css +0 -182
  26. package/dist/collection/components/password-input/password-input.js +0 -527
  27. package/dist/collection/components/radio-input/radio-input.css +0 -43
  28. package/dist/collection/components/radio-input/radio-input.js +0 -297
  29. package/dist/collection/components/select-input/select-input.css +0 -122
  30. package/dist/collection/components/select-input/select-input.js +0 -429
  31. package/dist/collection/components/tel-input/tel-input.css +0 -145
  32. package/dist/collection/components/tel-input/tel-input.js +0 -440
  33. package/dist/collection/components/text-input/text-input.css +0 -98
  34. package/dist/collection/components/text-input/text-input.js +0 -448
  35. package/dist/collection/components/toggle-checkbox-input/toggle-checkbox-input.css +0 -82
  36. package/dist/collection/components/toggle-checkbox-input/toggle-checkbox-input.js +0 -324
  37. package/dist/collection/index.js +0 -17
  38. package/dist/collection/utils/locale.utils.js +0 -123
  39. package/dist/collection/utils/tooltipIcon.svg +0 -5
  40. package/dist/collection/utils/types.js +0 -1
  41. package/dist/collection/utils/utils.js +0 -5
  42. package/dist/components/active-mixin.js +0 -975
  43. package/dist/components/checkbox-group-input.d.ts +0 -11
  44. package/dist/components/checkbox-group-input.js +0 -6
  45. package/dist/components/checkbox-group-input2.js +0 -1078
  46. package/dist/components/checkbox-input.d.ts +0 -11
  47. package/dist/components/checkbox-input.js +0 -6
  48. package/dist/components/checkbox-input2.js +0 -129
  49. package/dist/components/date-input.d.ts +0 -11
  50. package/dist/components/date-input.js +0 -6
  51. package/dist/components/date-input2.js +0 -11556
  52. package/dist/components/email-input.d.ts +0 -11
  53. package/dist/components/email-input.js +0 -6
  54. package/dist/components/email-input2.js +0 -171
  55. package/dist/components/field-mixin.js +0 -12426
  56. package/dist/components/general-input.d.ts +0 -11
  57. package/dist/components/general-input.js +0 -6
  58. package/dist/components/general-input2.js +0 -341
  59. package/dist/components/index.d.ts +0 -26
  60. package/dist/components/index.js +0 -18
  61. package/dist/components/input-field-shared-styles.js +0 -1211
  62. package/dist/components/number-input.d.ts +0 -11
  63. package/dist/components/number-input.js +0 -6
  64. package/dist/components/number-input2.js +0 -158
  65. package/dist/components/password-input.d.ts +0 -11
  66. package/dist/components/password-input.js +0 -6
  67. package/dist/components/password-input2.js +0 -1041
  68. package/dist/components/radio-input.d.ts +0 -11
  69. package/dist/components/radio-input.js +0 -6
  70. package/dist/components/radio-input2.js +0 -114
  71. package/dist/components/select-input.d.ts +0 -11
  72. package/dist/components/select-input.js +0 -6
  73. package/dist/components/select-input2.js +0 -183
  74. package/dist/components/tel-input.d.ts +0 -11
  75. package/dist/components/tel-input.js +0 -6
  76. package/dist/components/tel-input2.js +0 -197
  77. package/dist/components/text-input.d.ts +0 -11
  78. package/dist/components/text-input.js +0 -6
  79. package/dist/components/text-input2.js +0 -199
  80. package/dist/components/toggle-checkbox-input.d.ts +0 -11
  81. package/dist/components/toggle-checkbox-input.js +0 -6
  82. package/dist/components/tooltipIcon.js +0 -127
  83. package/dist/components/vaadin-button.js +0 -490
  84. package/dist/components/vaadin-combo-box.js +0 -4512
  85. package/dist/components/virtual-keyboard-controller.js +0 -2001
  86. package/dist/esm/checkbox-group-input_10.entry.js +0 -36064
  87. package/dist/esm/general-input.entry.js +0 -71
  88. package/dist/esm/general-input.js +0 -17
  89. package/dist/esm/index-db76d5b5.js +0 -1299
  90. package/dist/esm/index.js +0 -16
  91. package/dist/esm/loader.js +0 -17
  92. package/dist/esm/locale.utils-de759721.js +0 -125
  93. package/dist/esm/polyfills/core-js.js +0 -11
  94. package/dist/esm/polyfills/css-shim.js +0 -1
  95. package/dist/esm/polyfills/dom.js +0 -79
  96. package/dist/esm/polyfills/es5-html-element.js +0 -1
  97. package/dist/esm/polyfills/index.js +0 -34
  98. package/dist/esm/polyfills/system.js +0 -6
  99. package/dist/esm/toggle-checkbox-input.entry.js +0 -81
  100. package/dist/esm/tooltipIcon-99c1c7b7.js +0 -3
  101. package/dist/general-input/general-input.esm.js +0 -1
  102. package/dist/general-input/index.esm.js +0 -1
  103. package/dist/general-input/p-10efdf3f.js +0 -1
  104. package/dist/general-input/p-613c3e00.entry.js +0 -1
  105. package/dist/general-input/p-660bcdd1.entry.js +0 -1
  106. package/dist/general-input/p-9b6b0396.entry.js +0 -3646
  107. package/dist/general-input/p-b408093e.js +0 -1
  108. package/dist/general-input/p-f4f4ccda.js +0 -1
  109. package/dist/index.cjs.js +0 -1
  110. package/dist/index.js +0 -1
  111. package/dist/stencil.config.js +0 -22
  112. package/dist/types/Users/sebastian.strulea/Documents/work/widgets-stencil/packages/general-input/.stencil/packages/general-input/stencil.config.d.ts +0 -2
  113. package/dist/types/components/checkbox-group-input/checkbox-group-input.d.ts +0 -74
  114. package/dist/types/components/checkbox-input/checkbox-input.d.ts +0 -65
  115. package/dist/types/components/date-input/date-input.d.ts +0 -84
  116. package/dist/types/components/email-input/email-input.d.ts +0 -80
  117. package/dist/types/components/general-input/general-input.d.ts +0 -75
  118. package/dist/types/components/number-input/number-input.d.ts +0 -74
  119. package/dist/types/components/password-input/password-input.d.ts +0 -91
  120. package/dist/types/components/radio-input/radio-input.d.ts +0 -59
  121. package/dist/types/components/select-input/select-input.d.ts +0 -83
  122. package/dist/types/components/tel-input/tel-input.d.ts +0 -89
  123. package/dist/types/components/text-input/text-input.d.ts +0 -84
  124. package/dist/types/components/toggle-checkbox-input/toggle-checkbox-input.d.ts +0 -67
  125. package/dist/types/components.d.ts +0 -1268
  126. package/dist/types/index.d.ts +0 -1
  127. package/dist/types/stencil-public-runtime.d.ts +0 -1565
  128. package/dist/types/utils/locale.utils.d.ts +0 -17
  129. package/dist/types/utils/types.d.ts +0 -87
  130. package/dist/types/utils/utils.d.ts +0 -1
  131. package/loader/cdn.js +0 -3
  132. package/loader/index.cjs.js +0 -3
  133. package/loader/index.d.ts +0 -12
  134. package/loader/index.es2017.js +0 -3
  135. package/loader/index.js +0 -4
  136. package/loader/package.json +0 -10
@@ -1,403 +0,0 @@
1
- import { Component, h, Prop, State, Watch, Event, Listen } from '@stencil/core';
2
- import { translate } from '../../utils/locale.utils';
3
- import tooltipIcon from '../../utils/tooltipIcon.svg';
4
- export class EmailInput {
5
- constructor() {
6
- /**
7
- * Client custom styling via inline style
8
- */
9
- this.clientStyling = '';
10
- this.limitStylingAppends = false;
11
- this.showTooltip = false;
12
- this.validationPattern = '';
13
- this.touched = false;
14
- this.handleInput = (event) => {
15
- this.value = event.target.value;
16
- this.touched = true;
17
- if (this.debounceTime) {
18
- clearTimeout(this.debounceTime);
19
- }
20
- this.debounceTime = setTimeout(() => {
21
- this.isValid = this.setValidity();
22
- this.errorMessage = this.setErrorMessage();
23
- this.emitValueHandler(true);
24
- }, 500);
25
- };
26
- this.handleBlur = () => {
27
- this.isValid = this.setValidity();
28
- this.errorMessage = this.setErrorMessage();
29
- this.touched = true;
30
- };
31
- this.setClientStyling = () => {
32
- let sheet = document.createElement('style');
33
- sheet.innerHTML = this.clientStyling;
34
- this.stylingContainer.prepend(sheet);
35
- };
36
- }
37
- validityChanged() {
38
- this.validityStateHandler({ valid: this.isValid, name: this.name });
39
- if (this.emitValue == true) {
40
- this.valueHandler({ name: this.name, value: this.value });
41
- }
42
- }
43
- emitValueHandler(newValue) {
44
- if (newValue == true && this.isValid) {
45
- this.valueHandler({ name: this.name, value: this.value });
46
- }
47
- }
48
- validityStateHandler(inputStateEvent) {
49
- this.sendValidityState.emit(inputStateEvent);
50
- }
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
- valueChangedHandler(event) {
61
- if (this.isDuplicateInput) {
62
- if (this.name === event.detail.name + 'Duplicate') {
63
- this.duplicateInputValue = event.detail.value;
64
- }
65
- }
66
- }
67
- connectedCallback() {
68
- this.validationPattern = this.setPattern();
69
- }
70
- componentDidRender() {
71
- // start custom styling area
72
- if (!this.limitStylingAppends && this.stylingContainer) {
73
- if (this.clientStyling)
74
- this.setClientStyling();
75
- this.limitStylingAppends = true;
76
- }
77
- // end custom styling area
78
- }
79
- componentDidLoad() {
80
- this.isValid = this.setValidity();
81
- if (this.defaultValue) {
82
- this.value = this.defaultValue;
83
- this.valueHandler({ name: this.name, value: this.value });
84
- }
85
- }
86
- setValidity() {
87
- return this.inputReference.validity.valid;
88
- }
89
- setPattern() {
90
- var _a, _b;
91
- if (((_a = this.validation.custom) === null || _a === void 0 ? void 0 : _a.length) > 0) {
92
- return (_b = this.validation.custom.find(customValidation => customValidation.rule === 'regex')) === null || _b === void 0 ? void 0 : _b.pattern;
93
- }
94
- }
95
- setErrorMessage() {
96
- var _a, _b, _c, _d;
97
- if (this.inputReference.validity.patternMismatch) {
98
- const errorCode = (_a = this.validation.custom.find(customValidation => customValidation.rule === 'regex')) === null || _a === void 0 ? void 0 : _a.errorKey;
99
- const errorMessage = (_b = this.validation.custom.find(customValidation => customValidation.rule === 'regex')) === null || _b === void 0 ? void 0 : _b.errorMessage;
100
- return translate(`${errorCode}`, this.language) ? translate(`${errorCode}`, this.language) : errorMessage;
101
- }
102
- if (this.inputReference.validity.tooShort || this.inputReference.validity.tooLong) {
103
- return translate('lengthError', this.language, { values: { minLength: this.validation.minLength, maxLength: this.validation.maxLength } });
104
- }
105
- if (this.inputReference.validity.valueMissing) {
106
- return translate('requiredError', this.language);
107
- }
108
- if (this.isDuplicateInput && this.duplicateInputValue !== this.value) {
109
- const errorCode = (_c = this.validation.custom.find(customRule => customRule.rule === 'duplicate-input')) === null || _c === void 0 ? void 0 : _c.errorKey;
110
- const errorMessage = (_d = this.validation.custom.find(customRule => customRule.rule === 'duplicate-input')) === null || _d === void 0 ? void 0 : _d.errorMessage;
111
- return translate(`${errorCode}`, this.language) ? translate(`${errorCode}`, this.language) : errorMessage;
112
- }
113
- }
114
- renderTooltip() {
115
- if (this.showTooltip) {
116
- return (h("div", { class: `email__tooltip ${this.showTooltip ? 'visible' : ''}`, ref: (el) => this.tooltipReference = el, innerHTML: this.tooltip }));
117
- }
118
- return null;
119
- }
120
- render() {
121
- let invalidClass = '';
122
- if (this.touched) {
123
- invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
124
- }
125
- return h("div", { class: `email__wrapper ${this.autofilled ? 'number__wrapper--autofilled' : ''} ${this.name}__input`, ref: el => this.stylingContainer = el },
126
- h("div", { class: 'email__wrapper--flex' },
127
- h("label", { class: `email__label ${this.validation.mandatory ? 'email__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName),
128
- h("div", { class: 'email__wrapper--relative' },
129
- this.tooltip &&
130
- h("img", { class: 'email__tooltip-icon', src: tooltipIcon, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }),
131
- this.renderTooltip())),
132
- h("input", { id: `${this.name}__input`, type: 'email', class: `email__input ${invalidClass}`, value: this.defaultValue, readOnly: this.autofilled, placeholder: `${this.placeholder}`, ref: (el) => this.inputReference = el, pattern: this.validationPattern, required: this.validation.mandatory, minlength: this.validation.minLength, maxlength: this.validation.maxLength, onInput: this.handleInput, onBlur: this.handleBlur }),
133
- h("small", { class: 'email__error-message' }, this.errorMessage));
134
- }
135
- static get is() { return "email-input"; }
136
- static get encapsulation() { return "shadow"; }
137
- static get originalStyleUrls() { return {
138
- "$": ["email-input.scss"]
139
- }; }
140
- static get styleUrls() { return {
141
- "$": ["email-input.css"]
142
- }; }
143
- static get properties() { return {
144
- "name": {
145
- "type": "string",
146
- "mutable": false,
147
- "complexType": {
148
- "original": "string",
149
- "resolved": "string",
150
- "references": {}
151
- },
152
- "required": false,
153
- "optional": false,
154
- "docs": {
155
- "tags": [],
156
- "text": "Name of the input."
157
- },
158
- "attribute": "name",
159
- "reflect": true
160
- },
161
- "displayName": {
162
- "type": "string",
163
- "mutable": false,
164
- "complexType": {
165
- "original": "string",
166
- "resolved": "string",
167
- "references": {}
168
- },
169
- "required": false,
170
- "optional": false,
171
- "docs": {
172
- "tags": [],
173
- "text": "Name of input to be shown to the user."
174
- },
175
- "attribute": "display-name",
176
- "reflect": true
177
- },
178
- "placeholder": {
179
- "type": "string",
180
- "mutable": false,
181
- "complexType": {
182
- "original": "string",
183
- "resolved": "string",
184
- "references": {}
185
- },
186
- "required": false,
187
- "optional": false,
188
- "docs": {
189
- "tags": [],
190
- "text": "Placeholder text to be shown."
191
- },
192
- "attribute": "placeholder",
193
- "reflect": true
194
- },
195
- "validation": {
196
- "type": "unknown",
197
- "mutable": false,
198
- "complexType": {
199
- "original": "ValidationSchema",
200
- "resolved": "ValidationSchema",
201
- "references": {
202
- "ValidationSchema": {
203
- "location": "import",
204
- "path": "../../utils/types"
205
- }
206
- }
207
- },
208
- "required": false,
209
- "optional": false,
210
- "docs": {
211
- "tags": [],
212
- "text": "Object of validation rules for the input."
213
- }
214
- },
215
- "defaultValue": {
216
- "type": "string",
217
- "mutable": false,
218
- "complexType": {
219
- "original": "string",
220
- "resolved": "string",
221
- "references": {}
222
- },
223
- "required": false,
224
- "optional": false,
225
- "docs": {
226
- "tags": [],
227
- "text": "Default value for the input."
228
- },
229
- "attribute": "default-value",
230
- "reflect": true
231
- },
232
- "autofilled": {
233
- "type": "boolean",
234
- "mutable": false,
235
- "complexType": {
236
- "original": "boolean",
237
- "resolved": "boolean",
238
- "references": {}
239
- },
240
- "required": false,
241
- "optional": false,
242
- "docs": {
243
- "tags": [],
244
- "text": "Boolean. Determines if input should be readonly."
245
- },
246
- "attribute": "autofilled",
247
- "reflect": true
248
- },
249
- "tooltip": {
250
- "type": "string",
251
- "mutable": false,
252
- "complexType": {
253
- "original": "string",
254
- "resolved": "string",
255
- "references": {}
256
- },
257
- "required": false,
258
- "optional": false,
259
- "docs": {
260
- "tags": [],
261
- "text": "Tooltip text."
262
- },
263
- "attribute": "tooltip",
264
- "reflect": true
265
- },
266
- "language": {
267
- "type": "string",
268
- "mutable": false,
269
- "complexType": {
270
- "original": "string",
271
- "resolved": "string",
272
- "references": {}
273
- },
274
- "required": false,
275
- "optional": false,
276
- "docs": {
277
- "tags": [],
278
- "text": "Currently selected language."
279
- },
280
- "attribute": "language",
281
- "reflect": true
282
- },
283
- "emitValue": {
284
- "type": "boolean",
285
- "mutable": false,
286
- "complexType": {
287
- "original": "boolean",
288
- "resolved": "boolean",
289
- "references": {}
290
- },
291
- "required": false,
292
- "optional": false,
293
- "docs": {
294
- "tags": [],
295
- "text": "State passed down from the parent element. Will trigger the input to send it's value through an event."
296
- },
297
- "attribute": "emit-value",
298
- "reflect": true
299
- },
300
- "isDuplicateInput": {
301
- "type": "boolean",
302
- "mutable": false,
303
- "complexType": {
304
- "original": "boolean",
305
- "resolved": "boolean",
306
- "references": {}
307
- },
308
- "required": false,
309
- "optional": false,
310
- "docs": {
311
- "tags": [],
312
- "text": "Flag for duplicate inputs, it sets up the input for certain validation rules."
313
- },
314
- "attribute": "is-duplicate-input",
315
- "reflect": true
316
- },
317
- "clientStyling": {
318
- "type": "string",
319
- "mutable": false,
320
- "complexType": {
321
- "original": "string",
322
- "resolved": "string",
323
- "references": {}
324
- },
325
- "required": false,
326
- "optional": false,
327
- "docs": {
328
- "tags": [],
329
- "text": "Client custom styling via inline style"
330
- },
331
- "attribute": "client-styling",
332
- "reflect": true,
333
- "defaultValue": "''"
334
- }
335
- }; }
336
- static get states() { return {
337
- "errorMessage": {},
338
- "isValid": {},
339
- "limitStylingAppends": {},
340
- "showTooltip": {}
341
- }; }
342
- static get events() { return [{
343
- "method": "sendValidityState",
344
- "name": "sendValidityState",
345
- "bubbles": true,
346
- "cancelable": true,
347
- "composed": true,
348
- "docs": {
349
- "tags": [],
350
- "text": ""
351
- },
352
- "complexType": {
353
- "original": "InputStateEvent",
354
- "resolved": "InputStateEvent",
355
- "references": {
356
- "InputStateEvent": {
357
- "location": "import",
358
- "path": "../../utils/types"
359
- }
360
- }
361
- }
362
- }, {
363
- "method": "sendInputValue",
364
- "name": "sendInputValue",
365
- "bubbles": true,
366
- "cancelable": true,
367
- "composed": true,
368
- "docs": {
369
- "tags": [],
370
- "text": ""
371
- },
372
- "complexType": {
373
- "original": "InputValueEvent",
374
- "resolved": "InputValueEvent",
375
- "references": {
376
- "InputValueEvent": {
377
- "location": "import",
378
- "path": "../../utils/types"
379
- }
380
- }
381
- }
382
- }]; }
383
- static get watchers() { return [{
384
- "propName": "isValid",
385
- "methodName": "validityChanged"
386
- }, {
387
- "propName": "emitValue",
388
- "methodName": "emitValueHandler"
389
- }]; }
390
- static get listeners() { return [{
391
- "name": "click",
392
- "method": "handleClickOutside",
393
- "target": "document",
394
- "capture": false,
395
- "passive": false
396
- }, {
397
- "name": "sendInputValue",
398
- "method": "valueChangedHandler",
399
- "target": "body",
400
- "capture": false,
401
- "passive": false
402
- }]; }
403
- }
@@ -1,4 +0,0 @@
1
- :host {
2
- display: block;
3
- height: 100%;
4
- }