@everymatrix/general-registration 1.10.11 → 1.10.13
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 +211 -22
- 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 +23 -2
- package/dist/components/email-input2.js +23 -2
- package/dist/components/general-input2.js +31 -10
- package/dist/components/general-registration.js +5 -4
- package/dist/components/number-input2.js +23 -2
- package/dist/components/password-input2.js +23 -2
- package/dist/components/radio-input2.js +22 -3
- package/dist/components/select-input2.js +23 -2
- package/dist/components/tel-input2.js +23 -2
- package/dist/components/text-input2.js +23 -2
- package/dist/esm/checkbox-input_11.entry.js +211 -22
- 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-c7e0b72f.entry.js} +16 -16
- 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
|
@@ -14,7 +14,17 @@ const CheckboxInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
14
14
|
* Default value for the input.
|
|
15
15
|
*/
|
|
16
16
|
this.defaultValue = '';
|
|
17
|
+
/**
|
|
18
|
+
* Client custom styling via inline style
|
|
19
|
+
*/
|
|
20
|
+
this.clientStyling = '';
|
|
21
|
+
this.limitStylingAppends = false;
|
|
17
22
|
this.value = '';
|
|
23
|
+
this.setClientStyling = () => {
|
|
24
|
+
let sheet = document.createElement('style');
|
|
25
|
+
sheet.innerHTML = this.clientStyling;
|
|
26
|
+
this.stylingContainer.prepend(sheet);
|
|
27
|
+
};
|
|
18
28
|
}
|
|
19
29
|
validityChanged() {
|
|
20
30
|
if (this.emitValue == true) {
|
|
@@ -32,6 +42,15 @@ const CheckboxInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
32
42
|
valueHandler(inputValueEvent) {
|
|
33
43
|
this.sendInputValue.emit(inputValueEvent);
|
|
34
44
|
}
|
|
45
|
+
componentDidRender() {
|
|
46
|
+
// start custom styling area
|
|
47
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
48
|
+
if (this.clientStyling)
|
|
49
|
+
this.setClientStyling();
|
|
50
|
+
this.limitStylingAppends = true;
|
|
51
|
+
}
|
|
52
|
+
// end custom styling area
|
|
53
|
+
}
|
|
35
54
|
componentDidLoad() {
|
|
36
55
|
if (this.defaultValue) {
|
|
37
56
|
this.value = this.defaultValue;
|
|
@@ -54,7 +73,7 @@ const CheckboxInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
54
73
|
}
|
|
55
74
|
}
|
|
56
75
|
render() {
|
|
57
|
-
return h("div", { class: 'checkbox__wrapper' }, h("input", { type: "checkbox", id: `${this.name}__input`, ref: (el) => this.inputReference = el, name: this.name, checked: !!this.defaultValue, readOnly: this.autofilled, required: this.validation.mandatory, value: this.value, onClick: () => this.handleClick() }), h("label", { class: 'checkbox__label', htmlFor: `${this.name}__input` }, this.displayName, " ", this.validation.mandatory ? '*' : ''), h("small", { class: 'checkbox__error-message' }, this.errorMessage));
|
|
76
|
+
return h("div", { class: 'checkbox__wrapper', ref: el => this.stylingContainer = el }, h("input", { type: "checkbox", id: `${this.name}__input`, ref: (el) => this.inputReference = el, name: this.name, checked: !!this.defaultValue, readOnly: this.autofilled, required: this.validation.mandatory, value: this.value, onClick: () => this.handleClick() }), h("label", { class: 'checkbox__label', htmlFor: `${this.name}__input` }, this.displayName, " ", this.validation.mandatory ? '*' : ''), h("small", { class: 'checkbox__error-message' }, this.errorMessage));
|
|
58
77
|
}
|
|
59
78
|
static get watchers() { return {
|
|
60
79
|
"isValid": ["validityChanged"],
|
|
@@ -69,8 +88,10 @@ const CheckboxInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
69
88
|
"validation": [16],
|
|
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") {
|
|
@@ -5061,6 +5061,16 @@ const DateInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
5061
5061
|
this.__attachShadow();
|
|
5062
5062
|
this.sendValidityState = createEvent(this, "sendValidityState", 7);
|
|
5063
5063
|
this.sendInputValue = createEvent(this, "sendInputValue", 7);
|
|
5064
|
+
/**
|
|
5065
|
+
* Client custom styling via inline style
|
|
5066
|
+
*/
|
|
5067
|
+
this.clientStyling = '';
|
|
5068
|
+
this.limitStylingAppends = false;
|
|
5069
|
+
this.setClientStyling = () => {
|
|
5070
|
+
let sheet = document.createElement('style');
|
|
5071
|
+
sheet.innerHTML = this.clientStyling;
|
|
5072
|
+
this.stylingContainer.prepend(sheet);
|
|
5073
|
+
};
|
|
5064
5074
|
}
|
|
5065
5075
|
validityChanged() {
|
|
5066
5076
|
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
@@ -5079,6 +5089,15 @@ const DateInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
5079
5089
|
valueHandler(inputValueEvent) {
|
|
5080
5090
|
this.sendInputValue.emit(inputValueEvent);
|
|
5081
5091
|
}
|
|
5092
|
+
componentDidRender() {
|
|
5093
|
+
// start custom styling area
|
|
5094
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
5095
|
+
if (this.clientStyling)
|
|
5096
|
+
this.setClientStyling();
|
|
5097
|
+
this.limitStylingAppends = true;
|
|
5098
|
+
}
|
|
5099
|
+
// end custom styling area
|
|
5100
|
+
}
|
|
5082
5101
|
componentDidLoad() {
|
|
5083
5102
|
this.inputReference = this.element.shadowRoot.querySelector('input');
|
|
5084
5103
|
if (this.defaultValue) {
|
|
@@ -5106,7 +5125,7 @@ const DateInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
5106
5125
|
}
|
|
5107
5126
|
render() {
|
|
5108
5127
|
const invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'date__input--invalid';
|
|
5109
|
-
return h("div", { class: 'date__wrapper' }, h("label", { class: `date__label ${this.validation.mandatory ? 'date__label--required' : ''}}`, htmlFor: `${this.name}__input` }, this.displayName, " ", this.validation.mandatory ? '*' : ''), h("vaadin-date-picker", { id: `${this.name}__input`, type: 'date', class: `date__input ${invalidClass}`, value: this.defaultValue, readOnly: this.autofilled, placeholder: `${this.displayName} ${this.validation.mandatory ? '*' : ''}`, required: this.validation.mandatory, max: this.validation.max, min: this.validation.min, onBlur: (e) => this.handleInput(e) }), h("small", { class: 'date__error-message' }, this.errorMessage));
|
|
5128
|
+
return h("div", { class: 'date__wrapper', ref: el => this.stylingContainer = el }, h("label", { class: `date__label ${this.validation.mandatory ? 'date__label--required' : ''}}`, htmlFor: `${this.name}__input` }, this.displayName, " ", this.validation.mandatory ? '*' : ''), h("vaadin-date-picker", { id: `${this.name}__input`, type: 'date', class: `date__input ${invalidClass}`, value: this.defaultValue, readOnly: this.autofilled, placeholder: `${this.displayName} ${this.validation.mandatory ? '*' : ''}`, required: this.validation.mandatory, max: this.validation.max, min: this.validation.min, onBlur: (e) => this.handleInput(e) }), h("small", { class: 'date__error-message' }, this.errorMessage));
|
|
5110
5129
|
}
|
|
5111
5130
|
get element() { return this; }
|
|
5112
5131
|
static get watchers() { return {
|
|
@@ -5122,8 +5141,10 @@ const DateInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
5122
5141
|
"autofilled": [4],
|
|
5123
5142
|
"language": [1],
|
|
5124
5143
|
"emitValue": [4, "emit-value"],
|
|
5144
|
+
"clientStyling": [1, "client-styling"],
|
|
5125
5145
|
"errorMessage": [32],
|
|
5126
|
-
"isValid": [32]
|
|
5146
|
+
"isValid": [32],
|
|
5147
|
+
"limitStylingAppends": [32]
|
|
5127
5148
|
}]);
|
|
5128
5149
|
function defineCustomElement() {
|
|
5129
5150
|
if (typeof customElements === "undefined") {
|
|
@@ -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") {
|
|
@@ -21,27 +21,46 @@ const GeneralInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
21
21
|
* Type the general-input should take. Can take the default HTML input values.
|
|
22
22
|
*/
|
|
23
23
|
this.type = 'text';
|
|
24
|
+
/**
|
|
25
|
+
* Client custom styling via inline style
|
|
26
|
+
*/
|
|
27
|
+
this.clientStyling = '';
|
|
28
|
+
this.limitStylingAppends = false;
|
|
29
|
+
this.setClientStyling = () => {
|
|
30
|
+
let sheet = document.createElement('style');
|
|
31
|
+
sheet.innerHTML = this.clientStyling;
|
|
32
|
+
this.stylingContainer.prepend(sheet);
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
componentDidRender() {
|
|
36
|
+
// start custom styling area
|
|
37
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
38
|
+
if (this.clientStyling)
|
|
39
|
+
this.setClientStyling();
|
|
40
|
+
this.limitStylingAppends = true;
|
|
41
|
+
}
|
|
42
|
+
// end custom styling area
|
|
24
43
|
}
|
|
25
44
|
render() {
|
|
26
45
|
switch (this.type.toLowerCase()) {
|
|
27
46
|
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 });
|
|
47
|
+
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
48
|
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 });
|
|
49
|
+
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
50
|
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 });
|
|
51
|
+
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
52
|
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 });
|
|
53
|
+
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
54
|
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 });
|
|
55
|
+
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
56
|
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 });
|
|
57
|
+
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
58
|
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 });
|
|
59
|
+
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
60
|
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 });
|
|
61
|
+
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
62
|
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 });
|
|
63
|
+
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
64
|
default:
|
|
46
65
|
return h("p", null, "The ", this.type, " input type is not valid");
|
|
47
66
|
}
|
|
@@ -58,7 +77,9 @@ const GeneralInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
58
77
|
"autofilled": [4],
|
|
59
78
|
"defaultValue": [8, "default-value"],
|
|
60
79
|
"emitValue": [4, "emit-value"],
|
|
61
|
-
"isDuplicateInput": [4, "is-duplicate-input"]
|
|
80
|
+
"isDuplicateInput": [4, "is-duplicate-input"],
|
|
81
|
+
"clientStyling": [1, "client-styling"],
|
|
82
|
+
"limitStylingAppends": [32]
|
|
62
83
|
}]);
|
|
63
84
|
function defineCustomElement() {
|
|
64
85
|
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") {
|
|
@@ -731,8 +731,18 @@ const PasswordInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
731
731
|
* Default value for the input.
|
|
732
732
|
*/
|
|
733
733
|
this.defaultValue = '';
|
|
734
|
+
/**
|
|
735
|
+
* Client custom styling via inline style
|
|
736
|
+
*/
|
|
737
|
+
this.clientStyling = '';
|
|
738
|
+
this.limitStylingAppends = false;
|
|
734
739
|
this.value = '';
|
|
735
740
|
this.validationPattern = '';
|
|
741
|
+
this.setClientStyling = () => {
|
|
742
|
+
let sheet = document.createElement('style');
|
|
743
|
+
sheet.innerHTML = this.clientStyling;
|
|
744
|
+
this.stylingContainer.prepend(sheet);
|
|
745
|
+
};
|
|
736
746
|
}
|
|
737
747
|
validityChanged() {
|
|
738
748
|
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
@@ -761,6 +771,15 @@ const PasswordInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
761
771
|
connectedCallback() {
|
|
762
772
|
this.validationPattern = this.setPattern();
|
|
763
773
|
}
|
|
774
|
+
componentDidRender() {
|
|
775
|
+
// start custom styling area
|
|
776
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
777
|
+
if (this.clientStyling)
|
|
778
|
+
this.setClientStyling();
|
|
779
|
+
this.limitStylingAppends = true;
|
|
780
|
+
}
|
|
781
|
+
// end custom styling area
|
|
782
|
+
}
|
|
764
783
|
componentDidLoad() {
|
|
765
784
|
this.inputReference = this.element.shadowRoot.querySelector('input');
|
|
766
785
|
if (this.defaultValue) {
|
|
@@ -801,7 +820,7 @@ const PasswordInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
801
820
|
}
|
|
802
821
|
render() {
|
|
803
822
|
const invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'password__input--invalid';
|
|
804
|
-
return h("div", { class: 'password__wrapper' }, h("vaadin-password-field", { type: "password", id: `${this.name}__input`, class: `password__input ${invalidClass}`, name: this.name, readOnly: this.autofilled, value: this.defaultValue,
|
|
823
|
+
return h("div", { class: 'password__wrapper', ref: el => this.stylingContainer = el }, h("vaadin-password-field", { type: "password", id: `${this.name}__input`, class: `password__input ${invalidClass}`, name: this.name, readOnly: this.autofilled, value: this.defaultValue,
|
|
805
824
|
// ref={(el) => this.inputReference = el as HTMLInputElement}
|
|
806
825
|
required: this.validation.mandatory, maxlength: this.validation.maxLength, minlength: this.validation.minLength, pattern: this.validationPattern, placeholder: `${this.displayName} ${this.validation.mandatory ? '*' : ''}`, onBlur: (e) => this.handleInput(e) }), h("label", { class: `password__label ${this.validation.mandatory ? 'password__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), h("small", { class: 'password__error-message' }, this.errorMessage));
|
|
807
826
|
}
|
|
@@ -820,8 +839,10 @@ const PasswordInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
820
839
|
"language": [1],
|
|
821
840
|
"emitValue": [4, "emit-value"],
|
|
822
841
|
"isDuplicateInput": [4, "is-duplicate-input"],
|
|
842
|
+
"clientStyling": [1, "client-styling"],
|
|
823
843
|
"isValid": [32],
|
|
824
|
-
"errorMessage": [32]
|
|
844
|
+
"errorMessage": [32],
|
|
845
|
+
"limitStylingAppends": [32]
|
|
825
846
|
}, [[16, "sendInputValue", "valueChangedHandler"]]]);
|
|
826
847
|
function defineCustomElement() {
|
|
827
848
|
if (typeof customElements === "undefined") {
|
|
@@ -10,6 +10,16 @@ const RadioInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
10
10
|
this.__attachShadow();
|
|
11
11
|
this.sendInputValue = createEvent(this, "sendInputValue", 7);
|
|
12
12
|
this.sendValidityState = createEvent(this, "sendValidityState", 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,7 +38,14 @@ const RadioInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
28
38
|
validityStateHandler(inputStateEvent) {
|
|
29
39
|
this.sendValidityState.emit(inputStateEvent);
|
|
30
40
|
}
|
|
31
|
-
|
|
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
|
|
32
49
|
}
|
|
33
50
|
handleClick(event) {
|
|
34
51
|
this.value = event.target.value;
|
|
@@ -46,7 +63,7 @@ const RadioInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
46
63
|
}
|
|
47
64
|
}
|
|
48
65
|
render() {
|
|
49
|
-
return h("fieldset", { class: 'radio__fieldset' }, h("legend", { class: 'radio__legend' }, this.displayName, ":"), this.optionsGroup.map(option => h("div", { class: 'radio__wrapper' }, 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) }), h("label", { htmlFor: `${option.label}__input` }, option.label))), h("small", { class: 'radio__error-message' }, this.errorMessage));
|
|
66
|
+
return h("fieldset", { class: 'radio__fieldset', ref: el => this.stylingContainer = el }, h("legend", { class: 'radio__legend' }, this.displayName, ":"), this.optionsGroup.map(option => h("div", { class: 'radio__wrapper' }, 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) }), h("label", { htmlFor: `${option.label}__input` }, option.label))), h("small", { class: 'radio__error-message' }, this.errorMessage));
|
|
50
67
|
}
|
|
51
68
|
static get watchers() { return {
|
|
52
69
|
"isValid": ["validityChanged"],
|
|
@@ -60,8 +77,10 @@ const RadioInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
60
77
|
"validation": [16],
|
|
61
78
|
"language": [1],
|
|
62
79
|
"emitValue": [4, "emit-value"],
|
|
80
|
+
"clientStyling": [1, "client-styling"],
|
|
63
81
|
"errorMessage": [32],
|
|
64
|
-
"isValid": [32]
|
|
82
|
+
"isValid": [32],
|
|
83
|
+
"limitStylingAppends": [32]
|
|
65
84
|
}]);
|
|
66
85
|
function defineCustomElement() {
|
|
67
86
|
if (typeof customElements === "undefined") {
|
|
@@ -20,6 +20,16 @@ const SelectInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
20
20
|
* Options of the input.
|
|
21
21
|
*/
|
|
22
22
|
this.options = [];
|
|
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
|
+
};
|
|
23
33
|
}
|
|
24
34
|
validityChanged() {
|
|
25
35
|
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
@@ -52,6 +62,15 @@ const SelectInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
52
62
|
}
|
|
53
63
|
}
|
|
54
64
|
}
|
|
65
|
+
componentDidRender() {
|
|
66
|
+
// start custom styling area
|
|
67
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
68
|
+
if (this.clientStyling)
|
|
69
|
+
this.setClientStyling();
|
|
70
|
+
this.limitStylingAppends = true;
|
|
71
|
+
}
|
|
72
|
+
// end custom styling area
|
|
73
|
+
}
|
|
55
74
|
componentDidLoad() {
|
|
56
75
|
this.inputReference = this.element.shadowRoot.querySelector('input');
|
|
57
76
|
if (this.defaultValue) {
|
|
@@ -90,7 +109,7 @@ const SelectInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
90
109
|
}
|
|
91
110
|
render() {
|
|
92
111
|
const invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'select__input--invalid';
|
|
93
|
-
return h("div", { class: 'select__wrapper' }, h("label", { class: 'select__label', htmlFor: `${this.name}__input` }, `${this.displayName} ${this.validation.mandatory ? '*' : ''}`), h("vaadin-combo-box", { name: this.name, id: `${this.name}__input`, class: `select__input ${invalidClass}`, "item-label-path": "label", "item-value-path": "value", readOnly: this.autofilled, required: this.validation.mandatory, value: this.defaultValue, placeholder: `${this.displayName} ${this.validation.mandatory ? '*' : ''}`, items: this.displayedOptions, onBlur: (e) => this.handleChange(e) }), h("small", { class: 'select__error-message' }, this.errorMessage));
|
|
112
|
+
return h("div", { class: 'select__wrapper', ref: el => this.stylingContainer = el }, h("label", { class: 'select__label', htmlFor: `${this.name}__input` }, `${this.displayName} ${this.validation.mandatory ? '*' : ''}`), h("vaadin-combo-box", { name: this.name, id: `${this.name}__input`, class: `select__input ${invalidClass}`, "item-label-path": "label", "item-value-path": "value", readOnly: this.autofilled, required: this.validation.mandatory, value: this.defaultValue, placeholder: `${this.displayName} ${this.validation.mandatory ? '*' : ''}`, items: this.displayedOptions, onBlur: (e) => this.handleChange(e) }), h("small", { class: 'select__error-message' }, this.errorMessage));
|
|
94
113
|
}
|
|
95
114
|
get element() { return this; }
|
|
96
115
|
static get watchers() { return {
|
|
@@ -108,8 +127,10 @@ const SelectInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
108
127
|
"validation": [16],
|
|
109
128
|
"language": [1],
|
|
110
129
|
"emitValue": [4, "emit-value"],
|
|
130
|
+
"clientStyling": [1, "client-styling"],
|
|
111
131
|
"errorMessage": [32],
|
|
112
|
-
"isValid": [32]
|
|
132
|
+
"isValid": [32],
|
|
133
|
+
"limitStylingAppends": [32]
|
|
113
134
|
}]);
|
|
114
135
|
function defineCustomElement() {
|
|
115
136
|
if (typeof customElements === "undefined") {
|
|
@@ -12,7 +12,17 @@ const TelInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
12
12
|
this.__attachShadow();
|
|
13
13
|
this.sendValidityState = createEvent(this, "sendValidityState", 7);
|
|
14
14
|
this.sendInputValue = createEvent(this, "sendInputValue", 7);
|
|
15
|
+
/**
|
|
16
|
+
* Client custom styling via inline style
|
|
17
|
+
*/
|
|
18
|
+
this.clientStyling = '';
|
|
19
|
+
this.limitStylingAppends = false;
|
|
15
20
|
this.validationPattern = '';
|
|
21
|
+
this.setClientStyling = () => {
|
|
22
|
+
let sheet = document.createElement('style');
|
|
23
|
+
sheet.innerHTML = this.clientStyling;
|
|
24
|
+
this.stylingContainer.prepend(sheet);
|
|
25
|
+
};
|
|
16
26
|
}
|
|
17
27
|
validityChanged() {
|
|
18
28
|
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
@@ -49,6 +59,15 @@ const TelInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
49
59
|
}
|
|
50
60
|
}
|
|
51
61
|
}
|
|
62
|
+
componentDidRender() {
|
|
63
|
+
// start custom styling area
|
|
64
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
65
|
+
if (this.clientStyling)
|
|
66
|
+
this.setClientStyling();
|
|
67
|
+
this.limitStylingAppends = true;
|
|
68
|
+
}
|
|
69
|
+
// end custom styling area
|
|
70
|
+
}
|
|
52
71
|
componentDidLoad() {
|
|
53
72
|
if (this.defaultValue) {
|
|
54
73
|
this.value = `${this.prefixValue}|${this.phoneValue}`;
|
|
@@ -100,7 +119,7 @@ const TelInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
100
119
|
}
|
|
101
120
|
render() {
|
|
102
121
|
const invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'tel__wrapper--flex--invalid';
|
|
103
|
-
return h("div", { class: 'tel__wrapper' }, h("div", { class: `tel__wrapper--flex ${invalidClass}` }, h("vaadin-combo-box", { class: 'tel__prefix', items: this.phoneCodesOptions, value: this.prefixValue, readOnly: this.autofilled, onBlur: (e) => this.prefixValue = e.target.value }), h("input", { type: "tel", ref: (el) => this.inputReference = el, id: `${this.name}__input`, readOnly: this.autofilled, class: `tel__input`, value: this.phoneValue, placeholder: `${this.displayName} ${this.validation.mandatory ? '*' : ''}`, required: this.validation.mandatory, minlength: this.validation.minLength, maxlength: this.validation.maxLength, pattern: this.validationPattern, onBlur: (e) => this.handleInput(e) })), h("label", { class: `tel__label ${this.validation.mandatory ? 'tel__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), h("small", { class: 'tel__error-message' }, this.errorMessage));
|
|
122
|
+
return h("div", { class: 'tel__wrapper', ref: el => this.stylingContainer = el }, h("div", { class: `tel__wrapper--flex ${invalidClass}` }, h("vaadin-combo-box", { class: 'tel__prefix', items: this.phoneCodesOptions, value: this.prefixValue, readOnly: this.autofilled, onBlur: (e) => this.prefixValue = e.target.value }), h("input", { type: "tel", ref: (el) => this.inputReference = el, id: `${this.name}__input`, readOnly: this.autofilled, class: `tel__input`, value: this.phoneValue, placeholder: `${this.displayName} ${this.validation.mandatory ? '*' : ''}`, required: this.validation.mandatory, minlength: this.validation.minLength, maxlength: this.validation.maxLength, pattern: this.validationPattern, onBlur: (e) => this.handleInput(e) })), h("label", { class: `tel__label ${this.validation.mandatory ? 'tel__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), h("small", { class: 'tel__error-message' }, this.errorMessage));
|
|
104
123
|
}
|
|
105
124
|
static get watchers() { return {
|
|
106
125
|
"isValid": ["validityChanged"],
|
|
@@ -117,8 +136,10 @@ const TelInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
117
136
|
"autofilled": [4],
|
|
118
137
|
"language": [1],
|
|
119
138
|
"emitValue": [4, "emit-value"],
|
|
139
|
+
"clientStyling": [1, "client-styling"],
|
|
120
140
|
"isValid": [32],
|
|
121
|
-
"errorMessage": [32]
|
|
141
|
+
"errorMessage": [32],
|
|
142
|
+
"limitStylingAppends": [32]
|
|
122
143
|
}]);
|
|
123
144
|
function defineCustomElement() {
|
|
124
145
|
if (typeof customElements === "undefined") {
|
|
@@ -14,10 +14,20 @@ const TextInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
14
14
|
* Default value for the input.
|
|
15
15
|
*/
|
|
16
16
|
this.defaultValue = '';
|
|
17
|
+
/**
|
|
18
|
+
* Client custom styling via inline style
|
|
19
|
+
*/
|
|
20
|
+
this.clientStyling = '';
|
|
17
21
|
this.errorMessage = '';
|
|
22
|
+
this.limitStylingAppends = false;
|
|
18
23
|
this.value = '';
|
|
19
24
|
this.customRules = [];
|
|
20
25
|
this.validationPattern = '';
|
|
26
|
+
this.setClientStyling = () => {
|
|
27
|
+
let sheet = document.createElement('style');
|
|
28
|
+
sheet.innerHTML = this.clientStyling;
|
|
29
|
+
this.stylingContainer.prepend(sheet);
|
|
30
|
+
};
|
|
21
31
|
}
|
|
22
32
|
validityChanged() {
|
|
23
33
|
if (this.emitValue == true) {
|
|
@@ -45,6 +55,15 @@ const TextInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
45
55
|
connectedCallback() {
|
|
46
56
|
this.validationPattern = this.setPattern();
|
|
47
57
|
}
|
|
58
|
+
componentDidRender() {
|
|
59
|
+
// start custom styling area
|
|
60
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
61
|
+
if (this.clientStyling)
|
|
62
|
+
this.setClientStyling();
|
|
63
|
+
this.limitStylingAppends = true;
|
|
64
|
+
}
|
|
65
|
+
// end custom styling area
|
|
66
|
+
}
|
|
48
67
|
componentDidLoad() {
|
|
49
68
|
if (this.defaultValue) {
|
|
50
69
|
this.value = this.defaultValue;
|
|
@@ -84,7 +103,7 @@ const TextInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
84
103
|
}
|
|
85
104
|
render() {
|
|
86
105
|
const invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
|
|
87
|
-
return h("div", { class: 'text__wrapper' }, h("label", { class: `text__label ${this.validation.mandatory ? 'text__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), h("input", { name: this.name, id: `${this.name}__input`, value: this.defaultValue, type: 'text', class: `text__input ${invalidClass}`, placeholder: `${this.displayName} ${this.validation.mandatory ? '*' : ''}`, ref: (el) => this.inputReference = el, readOnly: this.autofilled, pattern: this.validationPattern, required: this.validation.mandatory, minlength: this.validation.minLength, maxlength: this.validation.maxLength, onBlur: (e) => { this.handleInput(e); } }), h("small", { class: 'text__error-message' }, this.errorMessage));
|
|
106
|
+
return h("div", { class: 'text__wrapper', ref: el => this.stylingContainer = el }, h("label", { class: `text__label ${this.validation.mandatory ? 'text__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), h("input", { name: this.name, id: `${this.name}__input`, value: this.defaultValue, type: 'text', class: `text__input ${invalidClass}`, placeholder: `${this.displayName} ${this.validation.mandatory ? '*' : ''}`, ref: (el) => this.inputReference = el, readOnly: this.autofilled, pattern: this.validationPattern, required: this.validation.mandatory, minlength: this.validation.minLength, maxlength: this.validation.maxLength, onBlur: (e) => { this.handleInput(e); } }), h("small", { class: 'text__error-message' }, this.errorMessage));
|
|
88
107
|
}
|
|
89
108
|
static get watchers() { return {
|
|
90
109
|
"isValid": ["validityChanged"],
|
|
@@ -102,8 +121,10 @@ const TextInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
102
121
|
"checkValidity": [4, "check-validity"],
|
|
103
122
|
"emitValue": [4, "emit-value"],
|
|
104
123
|
"isDuplicateInput": [4, "is-duplicate-input"],
|
|
124
|
+
"clientStyling": [1, "client-styling"],
|
|
105
125
|
"isValid": [32],
|
|
106
|
-
"errorMessage": [32]
|
|
126
|
+
"errorMessage": [32],
|
|
127
|
+
"limitStylingAppends": [32]
|
|
107
128
|
}, [[16, "sendInputValue", "valueChangedHandler"]]]);
|
|
108
129
|
function defineCustomElement() {
|
|
109
130
|
if (typeof customElements === "undefined") {
|