@everymatrix/general-input 1.10.0 → 1.10.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.
- package/dist/cjs/checkbox-input_9.cjs.entry.js +27 -90
- package/dist/cjs/general-input.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/checkbox-input/checkbox-input.js +1 -0
- package/dist/collection/components/date-input/date-input.js +3 -30
- package/dist/collection/components/email-input/email-input.js +5 -37
- package/dist/collection/components/number-input/number-input.js +5 -37
- package/dist/collection/components/password-input/password-input.js +1 -0
- package/dist/collection/components/radio-input/radio-input.js +3 -30
- package/dist/collection/components/select-input/select-input.js +3 -33
- package/dist/collection/components/tel-input/tel-input.js +5 -37
- package/dist/collection/components/text-input/text-input.js +1 -0
- package/dist/components/checkbox-input2.js +1 -0
- package/dist/components/date-input2.js +3 -12
- package/dist/components/email-input2.js +5 -19
- package/dist/components/number-input2.js +5 -19
- package/dist/components/password-input2.js +1 -0
- package/dist/components/radio-input2.js +3 -12
- package/dist/components/select-input2.js +3 -15
- package/dist/components/tel-input2.js +5 -19
- package/dist/components/text-input2.js +1 -0
- package/dist/esm/checkbox-input_9.entry.js +27 -90
- package/dist/esm/general-input.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/general-input/general-input.esm.js +1 -1
- package/dist/general-input/p-1703fce3.entry.js +1 -0
- package/dist/types/components/date-input/date-input.d.ts +0 -5
- package/dist/types/components/email-input/email-input.d.ts +0 -5
- package/dist/types/components/number-input/number-input.d.ts +0 -5
- package/dist/types/components/radio-input/radio-input.d.ts +0 -5
- package/dist/types/components/select-input/select-input.d.ts +0 -5
- package/dist/types/components/tel-input/tel-input.d.ts +0 -5
- package/dist/types/components.d.ts +0 -48
- package/package.json +2 -2
- package/dist/general-input/p-c9e79656.entry.js +0 -1
|
@@ -64,6 +64,7 @@ const CheckboxInput = class {
|
|
|
64
64
|
this.errorMessage = this.setErrorMessage();
|
|
65
65
|
this.isValid = this.setValidity();
|
|
66
66
|
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
67
|
+
this.emitValueHandler(true);
|
|
67
68
|
}
|
|
68
69
|
setValidity() {
|
|
69
70
|
return this.inputReference.validity.valid;
|
|
@@ -91,17 +92,8 @@ const DateInput = class {
|
|
|
91
92
|
this.sendValidityState = index.createEvent(this, "sendValidityState", 7);
|
|
92
93
|
this.sendInputValue = index.createEvent(this, "sendInputValue", 7);
|
|
93
94
|
}
|
|
94
|
-
checkValidityHandler(newValue) {
|
|
95
|
-
if (newValue == true) {
|
|
96
|
-
this.isValid = this.setValidity();
|
|
97
|
-
this.errorMessage = this.setErrorMessage();
|
|
98
|
-
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
95
|
validityChanged() {
|
|
102
|
-
|
|
103
|
-
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
104
|
-
}
|
|
96
|
+
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
105
97
|
if (this.emitValue == true) {
|
|
106
98
|
this.valueHandler({ name: this.name, value: this.value });
|
|
107
99
|
}
|
|
@@ -121,6 +113,8 @@ const DateInput = class {
|
|
|
121
113
|
this.value = event.target.value;
|
|
122
114
|
this.errorMessage = this.setErrorMessage();
|
|
123
115
|
this.isValid = this.setValidity();
|
|
116
|
+
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
117
|
+
this.emitValueHandler(true);
|
|
124
118
|
}
|
|
125
119
|
setValidity() {
|
|
126
120
|
return this.inputReference.validity.valid;
|
|
@@ -137,7 +131,6 @@ const DateInput = class {
|
|
|
137
131
|
return index.h("div", { class: 'date__wrapper' }, index.h("input", { id: `${this.name}__input`, type: 'date', class: `date__input`, value: this.defaultValue, placeholder: `${this.displayName} ${this.validation.mandatory ? '*' : ''}`, ref: (el) => this.inputReference = el, required: this.validation.mandatory, max: this.validation.max, min: this.validation.min, onInput: (e) => this.handleInput(e) }), index.h("label", { class: `date__label ${this.validation.mandatory ? 'date__label--required' : ''}}`, htmlFor: `${this.name}__input` }, this.displayName, " ", this.validation.mandatory ? '*' : ''), index.h("small", { class: 'date__error-message' }, this.errorMessage));
|
|
138
132
|
}
|
|
139
133
|
static get watchers() { return {
|
|
140
|
-
"checkValidity": ["checkValidityHandler"],
|
|
141
134
|
"isValid": ["validityChanged"],
|
|
142
135
|
"emitValue": ["emitValueHandler"]
|
|
143
136
|
}; }
|
|
@@ -153,17 +146,8 @@ const EmailInput = class {
|
|
|
153
146
|
this.sendInputValue = index.createEvent(this, "sendInputValue", 7);
|
|
154
147
|
this.validationPattern = '';
|
|
155
148
|
}
|
|
156
|
-
checkValidityHandler(newValue) {
|
|
157
|
-
if (newValue == true) {
|
|
158
|
-
this.isValid = this.setValidity();
|
|
159
|
-
this.errorMessage = this.setErrorMessage();
|
|
160
|
-
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
149
|
validityChanged() {
|
|
164
|
-
|
|
165
|
-
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
166
|
-
}
|
|
150
|
+
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
167
151
|
if (this.emitValue == true) {
|
|
168
152
|
this.valueHandler({ name: this.name, value: this.value });
|
|
169
153
|
}
|
|
@@ -184,13 +168,10 @@ const EmailInput = class {
|
|
|
184
168
|
}
|
|
185
169
|
handleInput(event) {
|
|
186
170
|
this.value = event.target.value;
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
}
|
|
190
|
-
this.
|
|
191
|
-
this.errorMessage = this.setErrorMessage();
|
|
192
|
-
this.isValid = this.setValidity();
|
|
193
|
-
}, 500);
|
|
171
|
+
this.errorMessage = this.setErrorMessage();
|
|
172
|
+
this.isValid = this.setValidity();
|
|
173
|
+
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
174
|
+
this.emitValueHandler(true);
|
|
194
175
|
}
|
|
195
176
|
setValidity() {
|
|
196
177
|
return this.inputReference.validity.valid;
|
|
@@ -216,7 +197,6 @@ const EmailInput = class {
|
|
|
216
197
|
return index.h("div", { class: 'email__wrapper' }, index.h("input", { id: `${this.name}__input`, type: 'email', class: `email__input`, value: this.defaultValue, placeholder: `${this.displayName} ${this.validation.mandatory ? '*' : ''}`, ref: (el) => this.inputReference = el, pattern: this.validationPattern, required: this.validation.mandatory, minlength: this.validation.minLength, maxlength: this.validation.maxLength, onInput: (e) => this.handleInput(e) }), index.h("label", { class: `email__label ${this.validation.mandatory ? 'email__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), index.h("small", { class: 'email__error-message' }, this.errorMessage));
|
|
217
198
|
}
|
|
218
199
|
static get watchers() { return {
|
|
219
|
-
"checkValidity": ["checkValidityHandler"],
|
|
220
200
|
"isValid": ["validityChanged"],
|
|
221
201
|
"emitValue": ["emitValueHandler"]
|
|
222
202
|
}; }
|
|
@@ -231,17 +211,8 @@ const NumberInput = class {
|
|
|
231
211
|
this.sendValidityState = index.createEvent(this, "sendValidityState", 7);
|
|
232
212
|
this.sendInputValue = index.createEvent(this, "sendInputValue", 7);
|
|
233
213
|
}
|
|
234
|
-
checkValidityHandler(newValue) {
|
|
235
|
-
if (newValue == true) {
|
|
236
|
-
this.isValid = this.setValidity();
|
|
237
|
-
this.errorMessage = this.setErrorMessage();
|
|
238
|
-
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
214
|
validityChanged() {
|
|
242
|
-
|
|
243
|
-
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
244
|
-
}
|
|
215
|
+
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
245
216
|
if (this.emitValue == true) {
|
|
246
217
|
this.valueHandler({ name: this.name, value: this.value });
|
|
247
218
|
}
|
|
@@ -259,13 +230,10 @@ const NumberInput = class {
|
|
|
259
230
|
}
|
|
260
231
|
handleInput(event) {
|
|
261
232
|
this.value = event.target.value;
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
}
|
|
265
|
-
this.
|
|
266
|
-
this.errorMessage = this.setErrorMessage();
|
|
267
|
-
this.isValid = this.setValidity();
|
|
268
|
-
}, 500);
|
|
233
|
+
this.errorMessage = this.setErrorMessage();
|
|
234
|
+
this.isValid = this.setValidity();
|
|
235
|
+
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
236
|
+
this.emitValueHandler(true);
|
|
269
237
|
}
|
|
270
238
|
setValidity() {
|
|
271
239
|
return this.inputReference.validity.valid;
|
|
@@ -283,7 +251,6 @@ const NumberInput = class {
|
|
|
283
251
|
return index.h("div", { class: 'number__wrapper' }, index.h("input", { ref: (el) => this.inputReference = el, type: "number", value: this.defaultValue, id: `${this.name}__input`, class: `number__input ${invalidClass}`, placeholder: `${this.displayName} ${this.validation.mandatory ? '*' : ''}`, required: this.validation.mandatory, max: this.validation.max, min: this.validation.min, onInput: (e) => this.handleInput(e) }), index.h("label", { class: `number__label ${this.validation.mandatory ? 'number__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), index.h("small", { class: 'number__error-message' }, this.errorMessage));
|
|
284
252
|
}
|
|
285
253
|
static get watchers() { return {
|
|
286
|
-
"checkValidity": ["checkValidityHandler"],
|
|
287
254
|
"isValid": ["validityChanged"],
|
|
288
255
|
"emitValue": ["emitValueHandler"]
|
|
289
256
|
}; }
|
|
@@ -324,6 +291,7 @@ const PasswordInput = class {
|
|
|
324
291
|
this.errorMessage = this.setErrorMessage();
|
|
325
292
|
this.isValid = this.setValidity();
|
|
326
293
|
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
294
|
+
this.emitValueHandler(true);
|
|
327
295
|
}
|
|
328
296
|
setValidity() {
|
|
329
297
|
return this.inputReference.validity.valid;
|
|
@@ -364,17 +332,8 @@ const RadioInput = class {
|
|
|
364
332
|
this.sendInputValue = index.createEvent(this, "sendInputValue", 7);
|
|
365
333
|
this.sendValidityState = index.createEvent(this, "sendValidityState", 7);
|
|
366
334
|
}
|
|
367
|
-
checkValidityHandler(newValue) {
|
|
368
|
-
if (newValue == true) {
|
|
369
|
-
this.isValid = this.setValidity();
|
|
370
|
-
this.errorMessage = this.setErrorMessage();
|
|
371
|
-
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
372
|
-
}
|
|
373
|
-
}
|
|
374
335
|
validityChanged() {
|
|
375
|
-
|
|
376
|
-
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
377
|
-
}
|
|
336
|
+
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
378
337
|
if (this.emitValue == true) {
|
|
379
338
|
this.valueHandler({ name: this.name, value: this.value });
|
|
380
339
|
}
|
|
@@ -396,6 +355,8 @@ const RadioInput = class {
|
|
|
396
355
|
this.value = event.target.value;
|
|
397
356
|
this.isValid = this.setValidity();
|
|
398
357
|
this.errorMessage = this.setErrorMessage();
|
|
358
|
+
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
359
|
+
this.emitValueHandler(true);
|
|
399
360
|
}
|
|
400
361
|
setValidity() {
|
|
401
362
|
return this.inputReference.validity.valid;
|
|
@@ -409,7 +370,6 @@ const RadioInput = class {
|
|
|
409
370
|
return index.h("fieldset", { class: 'radio__fieldset' }, index.h("legend", { class: 'radio__legend' }, this.displayName, ":"), this.optionsGroup.map(option => index.h("div", { class: 'radio__wrapper' }, index.h("input", { type: "radio", class: 'radio__input', id: `${option.label}__input`, ref: (el) => this.inputReference = el, value: option.value, name: this.name, required: this.validation.mandatory, onClick: (e) => this.handleClick(e) }), index.h("label", { htmlFor: `${option.label}__input` }, option.label))), index.h("small", { class: 'radio__error-message' }, this.errorMessage));
|
|
410
371
|
}
|
|
411
372
|
static get watchers() { return {
|
|
412
|
-
"checkValidity": ["checkValidityHandler"],
|
|
413
373
|
"isValid": ["validityChanged"],
|
|
414
374
|
"emitValue": ["emitValueHandler"]
|
|
415
375
|
}; }
|
|
@@ -428,17 +388,8 @@ const SelectInput = class {
|
|
|
428
388
|
*/
|
|
429
389
|
this.options = [];
|
|
430
390
|
}
|
|
431
|
-
checkValidityHandler(newValue) {
|
|
432
|
-
if (newValue == true) {
|
|
433
|
-
this.isValid = this.setValidity();
|
|
434
|
-
this.errorMessage = this.setErrorMessage();
|
|
435
|
-
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
436
|
-
}
|
|
437
|
-
}
|
|
438
391
|
validityChanged() {
|
|
439
|
-
|
|
440
|
-
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
441
|
-
}
|
|
392
|
+
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
442
393
|
if (this.emitValue == true) {
|
|
443
394
|
this.valueHandler({ name: this.name, value: this.value });
|
|
444
395
|
}
|
|
@@ -456,10 +407,8 @@ const SelectInput = class {
|
|
|
456
407
|
}
|
|
457
408
|
connectedCallback() {
|
|
458
409
|
this.displayedOptions = this.options;
|
|
459
|
-
console.log(this.displayedOptions);
|
|
460
410
|
}
|
|
461
411
|
componentWillLoad() {
|
|
462
|
-
console.log(this.action, this.options);
|
|
463
412
|
if (this.action && !this.options.length) {
|
|
464
413
|
if (this.action.split(" ")[0] == 'GET') {
|
|
465
414
|
return this.getOptions().then((options) => {
|
|
@@ -488,8 +437,9 @@ const SelectInput = class {
|
|
|
488
437
|
this.value = event.target.value;
|
|
489
438
|
this.errorMessage = this.setErrorMessage();
|
|
490
439
|
this.isValid = this.setValidity();
|
|
440
|
+
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
441
|
+
this.emitValueHandler(true);
|
|
491
442
|
this.inputReference.previousElementSibling.classList.remove('select__label--hidden');
|
|
492
|
-
console.log(this.action, this.options);
|
|
493
443
|
}
|
|
494
444
|
setValidity() {
|
|
495
445
|
return this.inputReference.validity.valid;
|
|
@@ -506,7 +456,6 @@ const SelectInput = class {
|
|
|
506
456
|
})), index.h("small", { class: 'select__error-message' }, this.errorMessage));
|
|
507
457
|
}
|
|
508
458
|
static get watchers() { return {
|
|
509
|
-
"checkValidity": ["checkValidityHandler"],
|
|
510
459
|
"isValid": ["validityChanged"],
|
|
511
460
|
"emitValue": ["emitValueHandler"]
|
|
512
461
|
}; }
|
|
@@ -522,17 +471,8 @@ const TelInput = class {
|
|
|
522
471
|
this.sendInputValue = index.createEvent(this, "sendInputValue", 7);
|
|
523
472
|
this.validationPattern = '';
|
|
524
473
|
}
|
|
525
|
-
checkValidityHandler(newValue) {
|
|
526
|
-
if (newValue == true) {
|
|
527
|
-
this.isValid = this.setValidity();
|
|
528
|
-
this.errorMessage = this.setErrorMessage();
|
|
529
|
-
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
530
|
-
}
|
|
531
|
-
}
|
|
532
474
|
validityChanged() {
|
|
533
|
-
|
|
534
|
-
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
535
|
-
}
|
|
475
|
+
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
536
476
|
if (this.emitValue == true) {
|
|
537
477
|
this.valueHandler({ name: this.name, value: this.value });
|
|
538
478
|
}
|
|
@@ -553,13 +493,10 @@ const TelInput = class {
|
|
|
553
493
|
}
|
|
554
494
|
handleInput(event) {
|
|
555
495
|
this.value = event.target.value;
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
}
|
|
559
|
-
this.
|
|
560
|
-
this.errorMessage = this.setErrorMessage();
|
|
561
|
-
this.isValid = this.setValidity();
|
|
562
|
-
}, 500);
|
|
496
|
+
this.errorMessage = this.setErrorMessage();
|
|
497
|
+
this.isValid = this.setValidity();
|
|
498
|
+
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
499
|
+
this.emitValueHandler(true);
|
|
563
500
|
}
|
|
564
501
|
setValidity() {
|
|
565
502
|
return this.inputReference.validity.valid;
|
|
@@ -586,7 +523,6 @@ const TelInput = class {
|
|
|
586
523
|
return index.h("div", { class: 'tel__wrapper' }, index.h("input", { type: "tel", ref: (el) => this.inputReference = el, id: `${this.name}__input`, value: this.defaultValue, class: `tel__input ${invalidClass}`, placeholder: `${this.displayName} ${this.validation.mandatory ? '*' : ''}`, required: this.validation.mandatory, minlength: this.validation.minLength, maxlength: this.validation.maxLength, pattern: this.validationPattern, onInput: (e) => this.handleInput(e) }), index.h("label", { class: `tel__label ${this.validation.mandatory ? 'tel__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), index.h("small", { class: 'tel__error-message' }, this.errorMessage));
|
|
587
524
|
}
|
|
588
525
|
static get watchers() { return {
|
|
589
|
-
"checkValidity": ["checkValidityHandler"],
|
|
590
526
|
"isValid": ["validityChanged"],
|
|
591
527
|
"emitValue": ["emitValueHandler"]
|
|
592
528
|
}; }
|
|
@@ -635,6 +571,7 @@ const TextInput = class {
|
|
|
635
571
|
this.isValid = this.setValidity();
|
|
636
572
|
this.errorMessage = this.setErrorMessage();
|
|
637
573
|
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
574
|
+
this.emitValueHandler(true);
|
|
638
575
|
}
|
|
639
576
|
setValidity() {
|
|
640
577
|
return this.inputReference.validity.valid;
|
|
@@ -15,5 +15,5 @@ const patchBrowser = () => {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(options => {
|
|
18
|
-
return index.bootstrapLazy([["checkbox-input_9.cjs",[[1,"checkbox-input",{"name":[1],"displayName":[1,"display-name"],"validation":[16],"language":[1],"emitValue":[4,"emit-value"],"errorMessage":[32],"isValid":[32]}],[1,"date-input",{"name":[1],"displayName":[1,"display-name"],"validation":[16],"defaultValue":[1,"default-value"],"language":[1],"
|
|
18
|
+
return index.bootstrapLazy([["checkbox-input_9.cjs",[[1,"checkbox-input",{"name":[1],"displayName":[1,"display-name"],"validation":[16],"language":[1],"emitValue":[4,"emit-value"],"errorMessage":[32],"isValid":[32]}],[1,"date-input",{"name":[1],"displayName":[1,"display-name"],"validation":[16],"defaultValue":[1,"default-value"],"language":[1],"emitValue":[4,"emit-value"],"errorMessage":[32],"isValid":[32]}],[1,"email-input",{"name":[1],"displayName":[1,"display-name"],"validation":[16],"defaultValue":[1,"default-value"],"language":[1],"emitValue":[4,"emit-value"],"errorMessage":[32],"isValid":[32]}],[1,"number-input",{"name":[1],"displayName":[1,"display-name"],"validation":[16],"defaultValue":[2,"default-value"],"language":[1],"emitValue":[4,"emit-value"],"errorMessage":[32],"isValid":[32]}],[1,"password-input",{"name":[1],"displayName":[1,"display-name"],"validation":[16],"language":[1],"emitValue":[4,"emit-value"],"isValid":[32],"errorMessage":[32]}],[1,"radio-input",{"name":[1],"displayName":[1,"display-name"],"optionsGroup":[16],"validation":[16],"language":[1],"emitValue":[4,"emit-value"],"errorMessage":[32],"isValid":[32]}],[1,"select-input",{"name":[1],"displayName":[1,"display-name"],"action":[1],"options":[16],"validation":[16],"language":[1],"emitValue":[4,"emit-value"],"errorMessage":[32],"isValid":[32]}],[1,"tel-input",{"name":[1],"displayName":[1,"display-name"],"showLabels":[4,"show-labels"],"action":[1],"validation":[16],"defaultValue":[8,"default-value"],"language":[1],"emitValue":[4,"emit-value"],"isValid":[32],"errorMessage":[32]}],[1,"text-input",{"name":[1025],"displayName":[1,"display-name"],"validation":[16],"defaultValue":[1025,"default-value"],"rules":[1],"language":[1],"checkValidity":[4,"check-validity"],"emitValue":[4,"emit-value"],"isValid":[32],"errorMessage":[32]}]]],["general-input.cjs",[[1,"general-input",{"type":[1],"name":[1],"displayName":[1,"display-name"],"action":[1],"validation":[16],"options":[8],"language":[1],"defaultValue":[8,"default-value"],"emitValue":[4,"emit-value"]}]]]], options);
|
|
19
19
|
});
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["checkbox-input_9.cjs",[[1,"checkbox-input",{"name":[1],"displayName":[1,"display-name"],"validation":[16],"language":[1],"emitValue":[4,"emit-value"],"errorMessage":[32],"isValid":[32]}],[1,"date-input",{"name":[1],"displayName":[1,"display-name"],"validation":[16],"defaultValue":[1,"default-value"],"language":[1],"
|
|
17
|
+
return index.bootstrapLazy([["checkbox-input_9.cjs",[[1,"checkbox-input",{"name":[1],"displayName":[1,"display-name"],"validation":[16],"language":[1],"emitValue":[4,"emit-value"],"errorMessage":[32],"isValid":[32]}],[1,"date-input",{"name":[1],"displayName":[1,"display-name"],"validation":[16],"defaultValue":[1,"default-value"],"language":[1],"emitValue":[4,"emit-value"],"errorMessage":[32],"isValid":[32]}],[1,"email-input",{"name":[1],"displayName":[1,"display-name"],"validation":[16],"defaultValue":[1,"default-value"],"language":[1],"emitValue":[4,"emit-value"],"errorMessage":[32],"isValid":[32]}],[1,"number-input",{"name":[1],"displayName":[1,"display-name"],"validation":[16],"defaultValue":[2,"default-value"],"language":[1],"emitValue":[4,"emit-value"],"errorMessage":[32],"isValid":[32]}],[1,"password-input",{"name":[1],"displayName":[1,"display-name"],"validation":[16],"language":[1],"emitValue":[4,"emit-value"],"isValid":[32],"errorMessage":[32]}],[1,"radio-input",{"name":[1],"displayName":[1,"display-name"],"optionsGroup":[16],"validation":[16],"language":[1],"emitValue":[4,"emit-value"],"errorMessage":[32],"isValid":[32]}],[1,"select-input",{"name":[1],"displayName":[1,"display-name"],"action":[1],"options":[16],"validation":[16],"language":[1],"emitValue":[4,"emit-value"],"errorMessage":[32],"isValid":[32]}],[1,"tel-input",{"name":[1],"displayName":[1,"display-name"],"showLabels":[4,"show-labels"],"action":[1],"validation":[16],"defaultValue":[8,"default-value"],"language":[1],"emitValue":[4,"emit-value"],"isValid":[32],"errorMessage":[32]}],[1,"text-input",{"name":[1025],"displayName":[1,"display-name"],"validation":[16],"defaultValue":[1025,"default-value"],"rules":[1],"language":[1],"checkValidity":[4,"check-validity"],"emitValue":[4,"emit-value"],"isValid":[32],"errorMessage":[32]}]]],["general-input.cjs",[[1,"general-input",{"type":[1],"name":[1],"displayName":[1,"display-name"],"action":[1],"validation":[16],"options":[8],"language":[1],"defaultValue":[8,"default-value"],"emitValue":[4,"emit-value"]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -25,6 +25,7 @@ export class CheckboxInput {
|
|
|
25
25
|
this.errorMessage = this.setErrorMessage();
|
|
26
26
|
this.isValid = this.setValidity();
|
|
27
27
|
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
28
|
+
this.emitValueHandler(true);
|
|
28
29
|
}
|
|
29
30
|
setValidity() {
|
|
30
31
|
return this.inputReference.validity.valid;
|
|
@@ -1,17 +1,8 @@
|
|
|
1
1
|
import { Component, h, State, Prop, Watch, Event } from '@stencil/core';
|
|
2
2
|
import { translate } from '../../utils/locale.utils';
|
|
3
3
|
export class DateInput {
|
|
4
|
-
checkValidityHandler(newValue) {
|
|
5
|
-
if (newValue == true) {
|
|
6
|
-
this.isValid = this.setValidity();
|
|
7
|
-
this.errorMessage = this.setErrorMessage();
|
|
8
|
-
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
4
|
validityChanged() {
|
|
12
|
-
|
|
13
|
-
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
14
|
-
}
|
|
5
|
+
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
15
6
|
if (this.emitValue == true) {
|
|
16
7
|
this.valueHandler({ name: this.name, value: this.value });
|
|
17
8
|
}
|
|
@@ -31,6 +22,8 @@ export class DateInput {
|
|
|
31
22
|
this.value = event.target.value;
|
|
32
23
|
this.errorMessage = this.setErrorMessage();
|
|
33
24
|
this.isValid = this.setValidity();
|
|
25
|
+
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
26
|
+
this.emitValueHandler(true);
|
|
34
27
|
}
|
|
35
28
|
setValidity() {
|
|
36
29
|
return this.inputReference.validity.valid;
|
|
@@ -149,23 +142,6 @@ export class DateInput {
|
|
|
149
142
|
"attribute": "language",
|
|
150
143
|
"reflect": false
|
|
151
144
|
},
|
|
152
|
-
"checkValidity": {
|
|
153
|
-
"type": "boolean",
|
|
154
|
-
"mutable": false,
|
|
155
|
-
"complexType": {
|
|
156
|
-
"original": "boolean",
|
|
157
|
-
"resolved": "boolean",
|
|
158
|
-
"references": {}
|
|
159
|
-
},
|
|
160
|
-
"required": false,
|
|
161
|
-
"optional": false,
|
|
162
|
-
"docs": {
|
|
163
|
-
"tags": [],
|
|
164
|
-
"text": "State passed down from the parent element. Will trigger the input to check for validity."
|
|
165
|
-
},
|
|
166
|
-
"attribute": "check-validity",
|
|
167
|
-
"reflect": false
|
|
168
|
-
},
|
|
169
145
|
"emitValue": {
|
|
170
146
|
"type": "boolean",
|
|
171
147
|
"mutable": false,
|
|
@@ -230,9 +206,6 @@ export class DateInput {
|
|
|
230
206
|
}
|
|
231
207
|
}]; }
|
|
232
208
|
static get watchers() { return [{
|
|
233
|
-
"propName": "checkValidity",
|
|
234
|
-
"methodName": "checkValidityHandler"
|
|
235
|
-
}, {
|
|
236
209
|
"propName": "isValid",
|
|
237
210
|
"methodName": "validityChanged"
|
|
238
211
|
}, {
|
|
@@ -4,17 +4,8 @@ export class EmailInput {
|
|
|
4
4
|
constructor() {
|
|
5
5
|
this.validationPattern = '';
|
|
6
6
|
}
|
|
7
|
-
checkValidityHandler(newValue) {
|
|
8
|
-
if (newValue == true) {
|
|
9
|
-
this.isValid = this.setValidity();
|
|
10
|
-
this.errorMessage = this.setErrorMessage();
|
|
11
|
-
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
7
|
validityChanged() {
|
|
15
|
-
|
|
16
|
-
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
17
|
-
}
|
|
8
|
+
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
18
9
|
if (this.emitValue == true) {
|
|
19
10
|
this.valueHandler({ name: this.name, value: this.value });
|
|
20
11
|
}
|
|
@@ -35,13 +26,10 @@ export class EmailInput {
|
|
|
35
26
|
}
|
|
36
27
|
handleInput(event) {
|
|
37
28
|
this.value = event.target.value;
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
this.
|
|
42
|
-
this.errorMessage = this.setErrorMessage();
|
|
43
|
-
this.isValid = this.setValidity();
|
|
44
|
-
}, 500);
|
|
29
|
+
this.errorMessage = this.setErrorMessage();
|
|
30
|
+
this.isValid = this.setValidity();
|
|
31
|
+
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
32
|
+
this.emitValueHandler(true);
|
|
45
33
|
}
|
|
46
34
|
setValidity() {
|
|
47
35
|
return this.inputReference.validity.valid;
|
|
@@ -182,23 +170,6 @@ export class EmailInput {
|
|
|
182
170
|
},
|
|
183
171
|
"attribute": "emit-value",
|
|
184
172
|
"reflect": false
|
|
185
|
-
},
|
|
186
|
-
"checkValidity": {
|
|
187
|
-
"type": "boolean",
|
|
188
|
-
"mutable": false,
|
|
189
|
-
"complexType": {
|
|
190
|
-
"original": "boolean",
|
|
191
|
-
"resolved": "boolean",
|
|
192
|
-
"references": {}
|
|
193
|
-
},
|
|
194
|
-
"required": false,
|
|
195
|
-
"optional": false,
|
|
196
|
-
"docs": {
|
|
197
|
-
"tags": [],
|
|
198
|
-
"text": "State passed down from the parent element. Will trigger the input to check for validity."
|
|
199
|
-
},
|
|
200
|
-
"attribute": "check-validity",
|
|
201
|
-
"reflect": false
|
|
202
173
|
}
|
|
203
174
|
}; }
|
|
204
175
|
static get states() { return {
|
|
@@ -247,9 +218,6 @@ export class EmailInput {
|
|
|
247
218
|
}
|
|
248
219
|
}]; }
|
|
249
220
|
static get watchers() { return [{
|
|
250
|
-
"propName": "checkValidity",
|
|
251
|
-
"methodName": "checkValidityHandler"
|
|
252
|
-
}, {
|
|
253
221
|
"propName": "isValid",
|
|
254
222
|
"methodName": "validityChanged"
|
|
255
223
|
}, {
|
|
@@ -1,17 +1,8 @@
|
|
|
1
1
|
import { Component, h, Prop, State, Watch, Event } from '@stencil/core';
|
|
2
2
|
import { translate } from '../../utils/locale.utils';
|
|
3
3
|
export class NumberInput {
|
|
4
|
-
checkValidityHandler(newValue) {
|
|
5
|
-
if (newValue == true) {
|
|
6
|
-
this.isValid = this.setValidity();
|
|
7
|
-
this.errorMessage = this.setErrorMessage();
|
|
8
|
-
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
4
|
validityChanged() {
|
|
12
|
-
|
|
13
|
-
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
14
|
-
}
|
|
5
|
+
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
15
6
|
if (this.emitValue == true) {
|
|
16
7
|
this.valueHandler({ name: this.name, value: this.value });
|
|
17
8
|
}
|
|
@@ -29,13 +20,10 @@ export class NumberInput {
|
|
|
29
20
|
}
|
|
30
21
|
handleInput(event) {
|
|
31
22
|
this.value = event.target.value;
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
this.
|
|
36
|
-
this.errorMessage = this.setErrorMessage();
|
|
37
|
-
this.isValid = this.setValidity();
|
|
38
|
-
}, 500);
|
|
23
|
+
this.errorMessage = this.setErrorMessage();
|
|
24
|
+
this.isValid = this.setValidity();
|
|
25
|
+
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
26
|
+
this.emitValueHandler(true);
|
|
39
27
|
}
|
|
40
28
|
setValidity() {
|
|
41
29
|
return this.inputReference.validity.valid;
|
|
@@ -152,23 +140,6 @@ export class NumberInput {
|
|
|
152
140
|
"attribute": "language",
|
|
153
141
|
"reflect": false
|
|
154
142
|
},
|
|
155
|
-
"checkValidity": {
|
|
156
|
-
"type": "boolean",
|
|
157
|
-
"mutable": false,
|
|
158
|
-
"complexType": {
|
|
159
|
-
"original": "boolean",
|
|
160
|
-
"resolved": "boolean",
|
|
161
|
-
"references": {}
|
|
162
|
-
},
|
|
163
|
-
"required": false,
|
|
164
|
-
"optional": false,
|
|
165
|
-
"docs": {
|
|
166
|
-
"tags": [],
|
|
167
|
-
"text": "State passed down from the parent element. Will trigger the input to check for validity."
|
|
168
|
-
},
|
|
169
|
-
"attribute": "check-validity",
|
|
170
|
-
"reflect": false
|
|
171
|
-
},
|
|
172
143
|
"emitValue": {
|
|
173
144
|
"type": "boolean",
|
|
174
145
|
"mutable": false,
|
|
@@ -233,9 +204,6 @@ export class NumberInput {
|
|
|
233
204
|
}
|
|
234
205
|
}]; }
|
|
235
206
|
static get watchers() { return [{
|
|
236
|
-
"propName": "checkValidity",
|
|
237
|
-
"methodName": "checkValidityHandler"
|
|
238
|
-
}, {
|
|
239
207
|
"propName": "isValid",
|
|
240
208
|
"methodName": "validityChanged"
|
|
241
209
|
}, {
|
|
@@ -29,6 +29,7 @@ export class PasswordInput {
|
|
|
29
29
|
this.errorMessage = this.setErrorMessage();
|
|
30
30
|
this.isValid = this.setValidity();
|
|
31
31
|
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
32
|
+
this.emitValueHandler(true);
|
|
32
33
|
}
|
|
33
34
|
setValidity() {
|
|
34
35
|
return this.inputReference.validity.valid;
|
|
@@ -1,17 +1,8 @@
|
|
|
1
1
|
import { Component, h, Prop, State, Watch, Event } from '@stencil/core';
|
|
2
2
|
import { translate } from '../../utils/locale.utils';
|
|
3
3
|
export class RadioInput {
|
|
4
|
-
checkValidityHandler(newValue) {
|
|
5
|
-
if (newValue == true) {
|
|
6
|
-
this.isValid = this.setValidity();
|
|
7
|
-
this.errorMessage = this.setErrorMessage();
|
|
8
|
-
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
4
|
validityChanged() {
|
|
12
|
-
|
|
13
|
-
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
14
|
-
}
|
|
5
|
+
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
15
6
|
if (this.emitValue == true) {
|
|
16
7
|
this.valueHandler({ name: this.name, value: this.value });
|
|
17
8
|
}
|
|
@@ -33,6 +24,8 @@ export class RadioInput {
|
|
|
33
24
|
this.value = event.target.value;
|
|
34
25
|
this.isValid = this.setValidity();
|
|
35
26
|
this.errorMessage = this.setErrorMessage();
|
|
27
|
+
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
28
|
+
this.emitValueHandler(true);
|
|
36
29
|
}
|
|
37
30
|
setValidity() {
|
|
38
31
|
return this.inputReference.validity.valid;
|
|
@@ -152,23 +145,6 @@ export class RadioInput {
|
|
|
152
145
|
"attribute": "language",
|
|
153
146
|
"reflect": false
|
|
154
147
|
},
|
|
155
|
-
"checkValidity": {
|
|
156
|
-
"type": "boolean",
|
|
157
|
-
"mutable": false,
|
|
158
|
-
"complexType": {
|
|
159
|
-
"original": "boolean",
|
|
160
|
-
"resolved": "boolean",
|
|
161
|
-
"references": {}
|
|
162
|
-
},
|
|
163
|
-
"required": false,
|
|
164
|
-
"optional": false,
|
|
165
|
-
"docs": {
|
|
166
|
-
"tags": [],
|
|
167
|
-
"text": "State passed down from the parent element. Will trigger the input to check for validity."
|
|
168
|
-
},
|
|
169
|
-
"attribute": "check-validity",
|
|
170
|
-
"reflect": false
|
|
171
|
-
},
|
|
172
148
|
"emitValue": {
|
|
173
149
|
"type": "boolean",
|
|
174
150
|
"mutable": false,
|
|
@@ -233,9 +209,6 @@ export class RadioInput {
|
|
|
233
209
|
}
|
|
234
210
|
}]; }
|
|
235
211
|
static get watchers() { return [{
|
|
236
|
-
"propName": "checkValidity",
|
|
237
|
-
"methodName": "checkValidityHandler"
|
|
238
|
-
}, {
|
|
239
212
|
"propName": "isValid",
|
|
240
213
|
"methodName": "validityChanged"
|
|
241
214
|
}, {
|