@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,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") {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
2
|
import { t as translate } from './locale.utils.js';
|
|
3
|
-
import '
|
|
4
|
-
import './vaadin-combo-box.js';
|
|
3
|
+
import '@vaadin/combo-box';
|
|
5
4
|
|
|
6
5
|
const selectInputCss = "*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.select{font-family:\"Roboto\";font-style:normal}.select__wrapper{position:relative;width:100%;padding-top:26px}.select__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:#1F1F1F;position:absolute;top:0;left:0}.select__label--required::after{content:\"*\";font-family:inherit;color:#1F1F1F;margin-left:2px}.select__input{border:none;width:inherit;position:relative}.select__input[focused]::part(input-field){border-color:#3E3E3E}.select__input[invalid]::part(input-field){border-color:#cc0000b3}.select__input vaadin-date-picker-overlay-content>vaadin-button{color:#1F1F1F}.select__input vaadin-month-calendar::part(selected date){background-color:red}.select__input::part(input-field){border-radius:4px;background-color:#FFFFFF;border:2px solid #DEE1EE;color:#2A2E3F;border-radius:4px;background-color:transparent;font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:19px}.select__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}";
|
|
7
6
|
|
|
@@ -20,6 +19,16 @@ const SelectInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
20
19
|
* Options of the input.
|
|
21
20
|
*/
|
|
22
21
|
this.options = [];
|
|
22
|
+
/**
|
|
23
|
+
* Client custom styling via inline style
|
|
24
|
+
*/
|
|
25
|
+
this.clientStyling = '';
|
|
26
|
+
this.limitStylingAppends = false;
|
|
27
|
+
this.setClientStyling = () => {
|
|
28
|
+
let sheet = document.createElement('style');
|
|
29
|
+
sheet.innerHTML = this.clientStyling;
|
|
30
|
+
this.stylingContainer.prepend(sheet);
|
|
31
|
+
};
|
|
23
32
|
}
|
|
24
33
|
validityChanged() {
|
|
25
34
|
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
@@ -52,6 +61,15 @@ const SelectInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
52
61
|
}
|
|
53
62
|
}
|
|
54
63
|
}
|
|
64
|
+
componentDidRender() {
|
|
65
|
+
// start custom styling area
|
|
66
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
67
|
+
if (this.clientStyling)
|
|
68
|
+
this.setClientStyling();
|
|
69
|
+
this.limitStylingAppends = true;
|
|
70
|
+
}
|
|
71
|
+
// end custom styling area
|
|
72
|
+
}
|
|
55
73
|
componentDidLoad() {
|
|
56
74
|
this.inputReference = this.element.shadowRoot.querySelector('input');
|
|
57
75
|
if (this.defaultValue) {
|
|
@@ -90,7 +108,7 @@ const SelectInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
90
108
|
}
|
|
91
109
|
render() {
|
|
92
110
|
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));
|
|
111
|
+
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
112
|
}
|
|
95
113
|
get element() { return this; }
|
|
96
114
|
static get watchers() { return {
|
|
@@ -108,8 +126,10 @@ const SelectInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
108
126
|
"validation": [16],
|
|
109
127
|
"language": [1],
|
|
110
128
|
"emitValue": [4, "emit-value"],
|
|
129
|
+
"clientStyling": [1, "client-styling"],
|
|
111
130
|
"errorMessage": [32],
|
|
112
|
-
"isValid": [32]
|
|
131
|
+
"isValid": [32],
|
|
132
|
+
"limitStylingAppends": [32]
|
|
113
133
|
}]);
|
|
114
134
|
function defineCustomElement() {
|
|
115
135
|
if (typeof customElements === "undefined") {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
2
|
import { t as translate } from './locale.utils.js';
|
|
3
|
-
import '
|
|
4
|
-
import './vaadin-combo-box.js';
|
|
3
|
+
import '@vaadin/combo-box';
|
|
5
4
|
|
|
6
5
|
const telInputCss = "*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.tel{font-family:\"Roboto\";font-style:normal}.tel__wrapper{position:relative;width:100%;padding-top:26px}.tel__wrapper--flex{width:inherit;display:flex;align-items:stretch;border-radius:4px;border:2px solid #DEE1EE}.tel__wrapper--flex:focus-within{border:2px solid #3E3E3E}.tel__wrapper--flex--invalid{border:2px solid #cc0000b3}.tel__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:#1F1F1F;position:absolute;top:0;left:0}.tel__label--required::after{content:\"*\";font-family:inherit;color:#1F1F1F;margin-left:2px}.tel__prefix{width:120px}.tel__prefix[focus]{outline:none}.tel__prefix::part(input-field){border-radius:0 4px 4px 0;background-color:#DEE1EE;color:#1F1F1F;font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:19px}.tel__input{border-radius:4px;background-color:transparent;font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:19px;color:#2A2E3F;border:none;padding:8px 20px;width:inherit;position:relative;-moz-appearance:textfield;}.tel__input:focus{outline:none}.tel__input::-webkit-outer-spin-button,.tel__input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.tel__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}";
|
|
7
6
|
|
|
@@ -12,7 +11,17 @@ const TelInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
12
11
|
this.__attachShadow();
|
|
13
12
|
this.sendValidityState = createEvent(this, "sendValidityState", 7);
|
|
14
13
|
this.sendInputValue = createEvent(this, "sendInputValue", 7);
|
|
14
|
+
/**
|
|
15
|
+
* Client custom styling via inline style
|
|
16
|
+
*/
|
|
17
|
+
this.clientStyling = '';
|
|
18
|
+
this.limitStylingAppends = false;
|
|
15
19
|
this.validationPattern = '';
|
|
20
|
+
this.setClientStyling = () => {
|
|
21
|
+
let sheet = document.createElement('style');
|
|
22
|
+
sheet.innerHTML = this.clientStyling;
|
|
23
|
+
this.stylingContainer.prepend(sheet);
|
|
24
|
+
};
|
|
16
25
|
}
|
|
17
26
|
validityChanged() {
|
|
18
27
|
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
@@ -49,6 +58,15 @@ const TelInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
49
58
|
}
|
|
50
59
|
}
|
|
51
60
|
}
|
|
61
|
+
componentDidRender() {
|
|
62
|
+
// start custom styling area
|
|
63
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
64
|
+
if (this.clientStyling)
|
|
65
|
+
this.setClientStyling();
|
|
66
|
+
this.limitStylingAppends = true;
|
|
67
|
+
}
|
|
68
|
+
// end custom styling area
|
|
69
|
+
}
|
|
52
70
|
componentDidLoad() {
|
|
53
71
|
if (this.defaultValue) {
|
|
54
72
|
this.value = `${this.prefixValue}|${this.phoneValue}`;
|
|
@@ -100,7 +118,7 @@ const TelInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
100
118
|
}
|
|
101
119
|
render() {
|
|
102
120
|
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));
|
|
121
|
+
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
122
|
}
|
|
105
123
|
static get watchers() { return {
|
|
106
124
|
"isValid": ["validityChanged"],
|
|
@@ -117,8 +135,10 @@ const TelInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
117
135
|
"autofilled": [4],
|
|
118
136
|
"language": [1],
|
|
119
137
|
"emitValue": [4, "emit-value"],
|
|
138
|
+
"clientStyling": [1, "client-styling"],
|
|
120
139
|
"isValid": [32],
|
|
121
|
-
"errorMessage": [32]
|
|
140
|
+
"errorMessage": [32],
|
|
141
|
+
"limitStylingAppends": [32]
|
|
122
142
|
}]);
|
|
123
143
|
function defineCustomElement() {
|
|
124
144
|
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") {
|