@everymatrix/general-registration 1.10.11 → 1.10.12
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_11.cjs.entry.js +336 -5338
- package/dist/cjs/general-registration.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/general-registration/general-registration.js +7 -6
- package/dist/components/checkbox-input2.js +23 -2
- package/dist/components/date-input2.js +20873 -3018
- package/dist/components/email-input2.js +23 -2
- package/dist/components/general-input2.js +31 -11
- package/dist/components/general-registration.js +5 -4
- package/dist/components/number-input2.js +23 -2
- package/dist/components/password-input2.js +24 -719
- package/dist/components/radio-input2.js +22 -3
- package/dist/components/select-input2.js +24 -4
- package/dist/components/tel-input2.js +24 -4
- package/dist/components/text-input2.js +23 -2
- package/dist/esm/checkbox-input_11.entry.js +336 -5338
- package/dist/esm/general-registration.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/general-registration/general-registration.esm.js +1 -1
- package/dist/general-registration/{p-b5f7ebdd.entry.js → p-3700b17b.entry.js} +99 -548
- package/dist/types/components/general-registration/general-registration.d.ts +2 -2
- package/dist/types/components.d.ts +4 -4
- package/package.json +1 -1
- package/dist/components/input-field-shared-styles.js +0 -13776
- package/dist/components/pattern-mixin.js +0 -84
- package/dist/components/vaadin-button.js +0 -1432
- package/dist/components/vaadin-combo-box.js +0 -4344
- package/dist/components/virtual-keyboard-controller.js +0 -2693
|
@@ -10,7 +10,17 @@ const EmailInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
10
10
|
this.__attachShadow();
|
|
11
11
|
this.sendValidityState = createEvent(this, "sendValidityState", 7);
|
|
12
12
|
this.sendInputValue = createEvent(this, "sendInputValue", 7);
|
|
13
|
+
/**
|
|
14
|
+
* Client custom styling via inline style
|
|
15
|
+
*/
|
|
16
|
+
this.clientStyling = '';
|
|
17
|
+
this.limitStylingAppends = false;
|
|
13
18
|
this.validationPattern = '';
|
|
19
|
+
this.setClientStyling = () => {
|
|
20
|
+
let sheet = document.createElement('style');
|
|
21
|
+
sheet.innerHTML = this.clientStyling;
|
|
22
|
+
this.stylingContainer.prepend(sheet);
|
|
23
|
+
};
|
|
14
24
|
}
|
|
15
25
|
validityChanged() {
|
|
16
26
|
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
@@ -39,6 +49,15 @@ const EmailInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
39
49
|
connectedCallback() {
|
|
40
50
|
this.validationPattern = this.setPattern();
|
|
41
51
|
}
|
|
52
|
+
componentDidRender() {
|
|
53
|
+
// start custom styling area
|
|
54
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
55
|
+
if (this.clientStyling)
|
|
56
|
+
this.setClientStyling();
|
|
57
|
+
this.limitStylingAppends = true;
|
|
58
|
+
}
|
|
59
|
+
// end custom styling area
|
|
60
|
+
}
|
|
42
61
|
componentDidLoad() {
|
|
43
62
|
if (this.defaultValue) {
|
|
44
63
|
this.value = this.defaultValue;
|
|
@@ -78,7 +97,7 @@ const EmailInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
78
97
|
}
|
|
79
98
|
render() {
|
|
80
99
|
const invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'email__input--invalid';
|
|
81
|
-
return h("div", { class: 'email__wrapper' }, h("input", { id: `${this.name}__input`, type: 'email', class: `email__input ${invalidClass}`, value: this.defaultValue, readOnly: this.autofilled, 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, onBlur: (e) => this.handleInput(e) }), h("label", { class: `email__label ${this.validation.mandatory ? 'email__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), h("small", { class: 'email__error-message' }, this.errorMessage));
|
|
100
|
+
return h("div", { class: 'email__wrapper', ref: el => this.stylingContainer = el }, h("input", { id: `${this.name}__input`, type: 'email', class: `email__input ${invalidClass}`, value: this.defaultValue, readOnly: this.autofilled, 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, onBlur: (e) => this.handleInput(e) }), h("label", { class: `email__label ${this.validation.mandatory ? 'email__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), h("small", { class: 'email__error-message' }, this.errorMessage));
|
|
82
101
|
}
|
|
83
102
|
static get watchers() { return {
|
|
84
103
|
"isValid": ["validityChanged"],
|
|
@@ -94,8 +113,10 @@ const EmailInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
94
113
|
"language": [1],
|
|
95
114
|
"emitValue": [4, "emit-value"],
|
|
96
115
|
"isDuplicateInput": [4, "is-duplicate-input"],
|
|
116
|
+
"clientStyling": [1, "client-styling"],
|
|
97
117
|
"errorMessage": [32],
|
|
98
|
-
"isValid": [32]
|
|
118
|
+
"isValid": [32],
|
|
119
|
+
"limitStylingAppends": [32]
|
|
99
120
|
}, [[16, "sendInputValue", "valueChangedHandler"]]]);
|
|
100
121
|
function defineCustomElement() {
|
|
101
122
|
if (typeof customElements === "undefined") {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
|
-
import './input-field-shared-styles.js';
|
|
3
2
|
import { d as defineCustomElement$8 } from './date-input2.js';
|
|
4
3
|
import { d as defineCustomElement$9 } from './checkbox-input2.js';
|
|
5
4
|
import { d as defineCustomElement$7 } from './email-input2.js';
|
|
@@ -21,27 +20,46 @@ const GeneralInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
21
20
|
* Type the general-input should take. Can take the default HTML input values.
|
|
22
21
|
*/
|
|
23
22
|
this.type = 'text';
|
|
23
|
+
/**
|
|
24
|
+
* Client custom styling via inline style
|
|
25
|
+
*/
|
|
26
|
+
this.clientStyling = '';
|
|
27
|
+
this.limitStylingAppends = false;
|
|
28
|
+
this.setClientStyling = () => {
|
|
29
|
+
let sheet = document.createElement('style');
|
|
30
|
+
sheet.innerHTML = this.clientStyling;
|
|
31
|
+
this.stylingContainer.prepend(sheet);
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
componentDidRender() {
|
|
35
|
+
// start custom styling area
|
|
36
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
37
|
+
if (this.clientStyling)
|
|
38
|
+
this.setClientStyling();
|
|
39
|
+
this.limitStylingAppends = true;
|
|
40
|
+
}
|
|
41
|
+
// end custom styling area
|
|
24
42
|
}
|
|
25
43
|
render() {
|
|
26
44
|
switch (this.type.toLowerCase()) {
|
|
27
45
|
case 'text':
|
|
28
|
-
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 });
|
|
46
|
+
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 });
|
|
29
47
|
case 'email':
|
|
30
|
-
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 });
|
|
48
|
+
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 });
|
|
31
49
|
case 'number':
|
|
32
|
-
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 });
|
|
50
|
+
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 });
|
|
33
51
|
case 'checkbox':
|
|
34
|
-
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 });
|
|
52
|
+
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 });
|
|
35
53
|
case 'datetime':
|
|
36
|
-
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 });
|
|
54
|
+
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 });
|
|
37
55
|
case 'password':
|
|
38
|
-
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 });
|
|
56
|
+
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 });
|
|
39
57
|
case 'radio':
|
|
40
|
-
return h("radio-input", { name: this.name, displayName: this.displayName, optionsGroup: this.options, validation: this.validation, emitValue: this.emitValue, language: this.language });
|
|
58
|
+
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 });
|
|
41
59
|
case 'tel':
|
|
42
|
-
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 });
|
|
60
|
+
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 });
|
|
43
61
|
case 'dropdown':
|
|
44
|
-
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 });
|
|
62
|
+
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 });
|
|
45
63
|
default:
|
|
46
64
|
return h("p", null, "The ", this.type, " input type is not valid");
|
|
47
65
|
}
|
|
@@ -58,7 +76,9 @@ const GeneralInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
58
76
|
"autofilled": [4],
|
|
59
77
|
"defaultValue": [8, "default-value"],
|
|
60
78
|
"emitValue": [4, "emit-value"],
|
|
61
|
-
"isDuplicateInput": [4, "is-duplicate-input"]
|
|
79
|
+
"isDuplicateInput": [4, "is-duplicate-input"],
|
|
80
|
+
"clientStyling": [1, "client-styling"],
|
|
81
|
+
"limitStylingAppends": [32]
|
|
62
82
|
}]);
|
|
63
83
|
function defineCustomElement() {
|
|
64
84
|
if (typeof customElements === "undefined") {
|
|
@@ -53,11 +53,11 @@ const GeneralRegistration$1 = /*@__PURE__*/ proxyCustomElement(class extends HTM
|
|
|
53
53
|
*/
|
|
54
54
|
this.language = 'en';
|
|
55
55
|
/**
|
|
56
|
-
* Client custom styling via
|
|
56
|
+
* Client custom styling via inline styles
|
|
57
57
|
*/
|
|
58
58
|
this.clientStyling = '';
|
|
59
59
|
/**
|
|
60
|
-
* Client custom styling via url
|
|
60
|
+
* Client custom styling via url
|
|
61
61
|
*/
|
|
62
62
|
this.clientStylingUrl = '';
|
|
63
63
|
this.emitValue = false;
|
|
@@ -82,6 +82,7 @@ const GeneralRegistration$1 = /*@__PURE__*/ proxyCustomElement(class extends HTM
|
|
|
82
82
|
.then((res) => res.text())
|
|
83
83
|
.then((data) => {
|
|
84
84
|
cssFile.innerHTML = data;
|
|
85
|
+
this.clientStyling = data;
|
|
85
86
|
setTimeout(() => { this.stylingContainer.prepend(cssFile); }, 1);
|
|
86
87
|
});
|
|
87
88
|
};
|
|
@@ -344,7 +345,7 @@ const GeneralRegistration$1 = /*@__PURE__*/ proxyCustomElement(class extends HTM
|
|
|
344
345
|
return listOfInputs.filter(input => input.isValid == false).length > 0;
|
|
345
346
|
}
|
|
346
347
|
renderInputs() {
|
|
347
|
-
return (this.listOfInputs.map(input => h("general-input", { type: input.inputType, name: input.name, displayName: input.displayName, validation: input.validate, action: input.action || null, options: input.data ? input.data.values : [], defaultValue: input.defaultValue, autofilled: input.autofill, emitValue: this.emitValue, language: this.language, isDuplicateInput: input.isDuplicateInput })));
|
|
348
|
+
return (this.listOfInputs.map(input => h("general-input", { type: input.inputType, name: input.name, displayName: input.displayName, validation: input.validate, action: input.action || null, options: input.data ? input.data.values : [], defaultValue: input.defaultValue, autofilled: input.autofill, emitValue: this.emitValue, language: this.language, isDuplicateInput: input.isDuplicateInput, "client-styling": this.clientStyling })));
|
|
348
349
|
}
|
|
349
350
|
;
|
|
350
351
|
renderButtons() {
|
|
@@ -363,7 +364,7 @@ const GeneralRegistration$1 = /*@__PURE__*/ proxyCustomElement(class extends HTM
|
|
|
363
364
|
}, [1, "general-registration", {
|
|
364
365
|
"endpoint": [1],
|
|
365
366
|
"language": [1],
|
|
366
|
-
"clientStyling": [
|
|
367
|
+
"clientStyling": [1025, "client-styling"],
|
|
367
368
|
"clientStylingUrl": [1, "client-styling-url"],
|
|
368
369
|
"errorMessage": [32],
|
|
369
370
|
"emitValue": [32],
|
|
@@ -10,6 +10,16 @@ const NumberInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
10
10
|
this.__attachShadow();
|
|
11
11
|
this.sendValidityState = createEvent(this, "sendValidityState", 7);
|
|
12
12
|
this.sendInputValue = createEvent(this, "sendInputValue", 7);
|
|
13
|
+
/**
|
|
14
|
+
* Client custom styling via inline style
|
|
15
|
+
*/
|
|
16
|
+
this.clientStyling = '';
|
|
17
|
+
this.limitStylingAppends = false;
|
|
18
|
+
this.setClientStyling = () => {
|
|
19
|
+
let sheet = document.createElement('style');
|
|
20
|
+
sheet.innerHTML = this.clientStyling;
|
|
21
|
+
this.stylingContainer.prepend(sheet);
|
|
22
|
+
};
|
|
13
23
|
}
|
|
14
24
|
validityChanged() {
|
|
15
25
|
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
@@ -28,6 +38,15 @@ const NumberInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
28
38
|
valueHandler(inputValueEvent) {
|
|
29
39
|
this.sendInputValue.emit(inputValueEvent);
|
|
30
40
|
}
|
|
41
|
+
componentDidRender() {
|
|
42
|
+
// start custom styling area
|
|
43
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
44
|
+
if (this.clientStyling)
|
|
45
|
+
this.setClientStyling();
|
|
46
|
+
this.limitStylingAppends = true;
|
|
47
|
+
}
|
|
48
|
+
// end custom styling area
|
|
49
|
+
}
|
|
31
50
|
componentDidLoad() {
|
|
32
51
|
if (this.defaultValue) {
|
|
33
52
|
this.value = this.defaultValue;
|
|
@@ -54,7 +73,7 @@ const NumberInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
54
73
|
}
|
|
55
74
|
render() {
|
|
56
75
|
const invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'number__input--invalid';
|
|
57
|
-
return h("div", { class: 'number__wrapper' }, h("input", { ref: (el) => this.inputReference = el, type: "number", value: this.defaultValue, readOnly: this.autofilled, 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, onBlur: (e) => this.handleInput(e) }), h("label", { class: `number__label ${this.validation.mandatory ? 'number__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), h("small", { class: 'number__error-message' }, this.errorMessage));
|
|
76
|
+
return h("div", { class: 'number__wrapper', ref: el => this.stylingContainer = el }, h("input", { ref: (el) => this.inputReference = el, type: "number", value: this.defaultValue, readOnly: this.autofilled, 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, onBlur: (e) => this.handleInput(e) }), h("label", { class: `number__label ${this.validation.mandatory ? 'number__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), h("small", { class: 'number__error-message' }, this.errorMessage));
|
|
58
77
|
}
|
|
59
78
|
static get watchers() { return {
|
|
60
79
|
"isValid": ["validityChanged"],
|
|
@@ -69,8 +88,10 @@ const NumberInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
69
88
|
"autofilled": [4],
|
|
70
89
|
"language": [1],
|
|
71
90
|
"emitValue": [4, "emit-value"],
|
|
91
|
+
"clientStyling": [1, "client-styling"],
|
|
72
92
|
"errorMessage": [32],
|
|
73
|
-
"isValid": [32]
|
|
93
|
+
"isValid": [32],
|
|
94
|
+
"limitStylingAppends": [32]
|
|
74
95
|
}]);
|
|
75
96
|
function defineCustomElement() {
|
|
76
97
|
if (typeof customElements === "undefined") {
|