@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,366 +0,0 @@
1
- import { Component, h, Prop, State, Event, Listen, Element, Watch } 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
- export class CheckboxGroupInput {
7
- constructor() {
8
- /**
9
- * Default value for the input.
10
- */
11
- this.defaultValue = '';
12
- /**
13
- * Client custom styling via inline style
14
- */
15
- this.clientStyling = '';
16
- this.limitStylingAppends = false;
17
- this.showTooltip = false;
18
- this.selectedValues = [];
19
- this.value = null;
20
- this.setClientStyling = () => {
21
- let sheet = document.createElement('style');
22
- sheet.innerHTML = this.clientStyling;
23
- this.stylingContainer.prepend(sheet);
24
- };
25
- }
26
- validityChanged() {
27
- this.validityStateHandler({ valid: this.isValid, name: this.name });
28
- if (this.emitValue == true) {
29
- this.valueHandler({ name: this.name, value: this.value, type: 'checkboxgroup' });
30
- }
31
- }
32
- setValue() {
33
- this.value = this.options.reduce((acc, option) => {
34
- acc[option.name] = this.selectedValues.includes(option.name);
35
- return acc;
36
- }, {});
37
- this.emitValueHandler(true);
38
- }
39
- validityStateHandler(inputStateEvent) {
40
- this.sendValidityState.emit(inputStateEvent);
41
- }
42
- emitValueHandler(newValue) {
43
- if (newValue == true && this.isValid) {
44
- this.valueHandler({ name: this.name, value: this.value, type: 'checkboxgroup' });
45
- }
46
- }
47
- valueHandler(inputValueEvent) {
48
- this.sendInputValue.emit(inputValueEvent);
49
- }
50
- handleClickOutside(event) {
51
- if (event.composedPath()[0] === this.tooltipIconReference)
52
- return;
53
- if (event.composedPath()[0] !== this.tooltipReference)
54
- this.showTooltip = false;
55
- }
56
- componentDidRender() {
57
- // start custom styling area
58
- if (!this.limitStylingAppends && this.stylingContainer) {
59
- if (this.clientStyling)
60
- this.setClientStyling();
61
- this.limitStylingAppends = true;
62
- }
63
- // end custom styling area
64
- }
65
- componentDidLoad() {
66
- this.inputReference = this.element.shadowRoot.querySelector('input');
67
- // For now this input has no validation. Send isValid as true immediately.
68
- //@TODO: add validation logic to it, if business reason arises.
69
- this.isValid = this.setValidity();
70
- if (this.defaultValue) {
71
- this.selectedValues = this.options.map((checkbox) => checkbox.name);
72
- this.value = this.defaultValue;
73
- this.valueHandler({ name: this.name, value: this.value });
74
- }
75
- }
76
- setValidity() {
77
- return this.inputReference.validity.valid;
78
- }
79
- setErrorMessage() {
80
- if (this.inputReference.validity.valueMissing) {
81
- return translate('requiredError', this.language);
82
- }
83
- }
84
- renderTooltip() {
85
- if (this.showTooltip) {
86
- return (h("div", { class: `checkboxgroup__tooltip ${this.showTooltip ? 'visible' : ''}`, ref: (el) => this.tooltipReference = el, innerHTML: this.tooltip }));
87
- }
88
- return null;
89
- }
90
- handleParentCheckbox(e) {
91
- // Logic for toggling the children checkboxes.
92
- this.selectedValues = e.target.checked
93
- ? this.options.map((checkbox) => checkbox.name)
94
- : [];
95
- }
96
- renderLabel() {
97
- return (h("label", { class: 'checkbox__label', htmlFor: `${this.name}__input`, slot: 'label' },
98
- h("div", { class: 'checkbox__label-text', innerHTML: `${this.displayName} ${this.validation.mandatory ? '*' : ''}` })));
99
- }
100
- render() {
101
- return h("div", { class: `checkboxgroup__wrapper ${this.name}__input`, ref: el => this.stylingContainer = el },
102
- h("div", { class: 'checkboxgroup__wrapper--flex' },
103
- h("vaadin-checkbox", { 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()),
104
- this.tooltip &&
105
- h("img", { class: 'checkboxgroup__tooltip-icon', src: tooltipIcon, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }),
106
- this.renderTooltip()),
107
- h("small", { class: 'checkboxgroup__error-message' }, this.errorMessage),
108
- h("vaadin-checkbox-group", { theme: "vertical", value: this.selectedValues, "on-value-changed": (event) => {
109
- this.selectedValues = event.detail.value;
110
- } }, this.options.map((checkbox) => h("vaadin-checkbox", { class: 'checkbox__input', name: checkbox.name, value: checkbox.name, label: checkbox.displayName }))));
111
- }
112
- static get is() { return "checkbox-group-input"; }
113
- static get encapsulation() { return "shadow"; }
114
- static get originalStyleUrls() { return {
115
- "$": ["checkbox-group-input.scss"]
116
- }; }
117
- static get styleUrls() { return {
118
- "$": ["checkbox-group-input.css"]
119
- }; }
120
- static get properties() { return {
121
- "name": {
122
- "type": "string",
123
- "mutable": false,
124
- "complexType": {
125
- "original": "string",
126
- "resolved": "string",
127
- "references": {}
128
- },
129
- "required": false,
130
- "optional": false,
131
- "docs": {
132
- "tags": [],
133
- "text": "Name of the input."
134
- },
135
- "attribute": "name",
136
- "reflect": true
137
- },
138
- "displayName": {
139
- "type": "string",
140
- "mutable": false,
141
- "complexType": {
142
- "original": "string",
143
- "resolved": "string",
144
- "references": {}
145
- },
146
- "required": false,
147
- "optional": false,
148
- "docs": {
149
- "tags": [],
150
- "text": "Name of input to be shown to the user."
151
- },
152
- "attribute": "display-name",
153
- "reflect": true
154
- },
155
- "defaultValue": {
156
- "type": "string",
157
- "mutable": false,
158
- "complexType": {
159
- "original": "string",
160
- "resolved": "string",
161
- "references": {}
162
- },
163
- "required": false,
164
- "optional": false,
165
- "docs": {
166
- "tags": [],
167
- "text": "Default value for the input."
168
- },
169
- "attribute": "default-value",
170
- "reflect": true,
171
- "defaultValue": "''"
172
- },
173
- "autofilled": {
174
- "type": "boolean",
175
- "mutable": false,
176
- "complexType": {
177
- "original": "boolean",
178
- "resolved": "boolean",
179
- "references": {}
180
- },
181
- "required": false,
182
- "optional": false,
183
- "docs": {
184
- "tags": [],
185
- "text": "Boolean. Determines if input should be readonly."
186
- },
187
- "attribute": "autofilled",
188
- "reflect": true
189
- },
190
- "tooltip": {
191
- "type": "string",
192
- "mutable": false,
193
- "complexType": {
194
- "original": "string",
195
- "resolved": "string",
196
- "references": {}
197
- },
198
- "required": false,
199
- "optional": false,
200
- "docs": {
201
- "tags": [],
202
- "text": "Tooltip text."
203
- },
204
- "attribute": "tooltip",
205
- "reflect": true
206
- },
207
- "options": {
208
- "type": "unknown",
209
- "mutable": false,
210
- "complexType": {
211
- "original": "RegCfgContentField[]",
212
- "resolved": "RegCfgContentField[]",
213
- "references": {
214
- "RegCfgContentField": {
215
- "location": "import",
216
- "path": "../../utils/types"
217
- }
218
- }
219
- },
220
- "required": false,
221
- "optional": false,
222
- "docs": {
223
- "tags": [],
224
- "text": "Options of the input."
225
- }
226
- },
227
- "validation": {
228
- "type": "unknown",
229
- "mutable": false,
230
- "complexType": {
231
- "original": "ValidationSchema",
232
- "resolved": "ValidationSchema",
233
- "references": {
234
- "ValidationSchema": {
235
- "location": "import",
236
- "path": "../../utils/types"
237
- }
238
- }
239
- },
240
- "required": false,
241
- "optional": false,
242
- "docs": {
243
- "tags": [],
244
- "text": "Object of validation rules for the input."
245
- }
246
- },
247
- "language": {
248
- "type": "string",
249
- "mutable": false,
250
- "complexType": {
251
- "original": "string",
252
- "resolved": "string",
253
- "references": {}
254
- },
255
- "required": false,
256
- "optional": false,
257
- "docs": {
258
- "tags": [],
259
- "text": "Currently selected language."
260
- },
261
- "attribute": "language",
262
- "reflect": true
263
- },
264
- "emitValue": {
265
- "type": "boolean",
266
- "mutable": false,
267
- "complexType": {
268
- "original": "boolean",
269
- "resolved": "boolean",
270
- "references": {}
271
- },
272
- "required": false,
273
- "optional": false,
274
- "docs": {
275
- "tags": [],
276
- "text": "State passed down from the parent element. Will trigger the input to send it's value through an event."
277
- },
278
- "attribute": "emit-value",
279
- "reflect": true
280
- },
281
- "clientStyling": {
282
- "type": "string",
283
- "mutable": false,
284
- "complexType": {
285
- "original": "string",
286
- "resolved": "string",
287
- "references": {}
288
- },
289
- "required": false,
290
- "optional": false,
291
- "docs": {
292
- "tags": [],
293
- "text": "Client custom styling via inline style"
294
- },
295
- "attribute": "client-styling",
296
- "reflect": true,
297
- "defaultValue": "''"
298
- }
299
- }; }
300
- static get states() { return {
301
- "errorMessage": {},
302
- "isValid": {},
303
- "limitStylingAppends": {},
304
- "showTooltip": {},
305
- "selectedValues": {}
306
- }; }
307
- static get events() { return [{
308
- "method": "sendValidityState",
309
- "name": "sendValidityState",
310
- "bubbles": true,
311
- "cancelable": true,
312
- "composed": true,
313
- "docs": {
314
- "tags": [],
315
- "text": ""
316
- },
317
- "complexType": {
318
- "original": "InputStateEvent",
319
- "resolved": "InputStateEvent",
320
- "references": {
321
- "InputStateEvent": {
322
- "location": "import",
323
- "path": "../../utils/types"
324
- }
325
- }
326
- }
327
- }, {
328
- "method": "sendInputValue",
329
- "name": "sendInputValue",
330
- "bubbles": true,
331
- "cancelable": true,
332
- "composed": true,
333
- "docs": {
334
- "tags": [],
335
- "text": ""
336
- },
337
- "complexType": {
338
- "original": "InputValueEvent",
339
- "resolved": "InputValueEvent",
340
- "references": {
341
- "InputValueEvent": {
342
- "location": "import",
343
- "path": "../../utils/types"
344
- }
345
- }
346
- }
347
- }]; }
348
- static get elementRef() { return "element"; }
349
- static get watchers() { return [{
350
- "propName": "isValid",
351
- "methodName": "validityChanged"
352
- }, {
353
- "propName": "selectedValues",
354
- "methodName": "setValue"
355
- }, {
356
- "propName": "emitValue",
357
- "methodName": "emitValueHandler"
358
- }]; }
359
- static get listeners() { return [{
360
- "name": "click",
361
- "method": "handleClickOutside",
362
- "target": "document",
363
- "capture": false,
364
- "passive": false
365
- }]; }
366
- }
@@ -1,68 +0,0 @@
1
- *,
2
- *::before,
3
- *::after {
4
- padding: 0;
5
- margin: 0;
6
- box-sizing: border-box;
7
- }
8
-
9
- .checkbox {
10
- font-family: "Roboto";
11
- font-style: normal;
12
- }
13
- .checkbox__wrapper {
14
- display: flex;
15
- gap: 10px;
16
- position: relative;
17
- align-items: baseline;
18
- }
19
- .checkbox__wrapper--relative {
20
- position: relative;
21
- }
22
- .checkbox__input {
23
- transform: scale(1.307, 1.307);
24
- margin-left: 2px;
25
- accent-color: var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C));
26
- }
27
- .checkbox__label {
28
- font-style: inherit;
29
- font-family: inherit;
30
- font-weight: 400;
31
- font-size: 16px;
32
- color: var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));
33
- line-height: 1.5;
34
- cursor: pointer;
35
- padding: 0;
36
- }
37
- .checkbox__label-text {
38
- font-size: 16px;
39
- }
40
- .checkbox__label a {
41
- color: var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C));
42
- }
43
- .checkbox__error-message {
44
- position: absolute;
45
- top: calc(100% + 5px);
46
- left: 0;
47
- color: var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909));
48
- }
49
- .checkbox__tooltip-icon {
50
- width: 16px;
51
- height: auto;
52
- }
53
- .checkbox__tooltip {
54
- position: absolute;
55
- top: 0;
56
- right: 20px;
57
- background-color: var(--emfe-w-color-white, #FFFFFF);
58
- border: 1px solid var(--emfe-w-color-gray-100, #E6E6E6);
59
- color: var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));
60
- padding: 10px;
61
- border-radius: 5px;
62
- opacity: 0;
63
- transition: opacity 0.3s ease-in-out;
64
- z-index: 10;
65
- }
66
- .checkbox__tooltip.visible {
67
- opacity: 1;
68
- }