@everymatrix/general-input 1.32.4 → 1.33.1
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-group-input_10.cjs.entry.js +36077 -0
- package/dist/cjs/general-input.cjs.entry.js +75 -0
- package/dist/cjs/general-input.cjs.js +19 -0
- package/dist/cjs/index-132a0774.js +1327 -0
- package/dist/cjs/index.cjs.js +18 -0
- package/dist/cjs/loader.cjs.js +21 -0
- package/dist/cjs/locale.utils-cef1d3b6.js +128 -0
- package/dist/cjs/toggle-checkbox-input.cjs.entry.js +85 -0
- package/dist/cjs/tooltipIcon-092a795f.js +5 -0
- package/dist/collection/collection-manifest.json +23 -0
- package/dist/collection/components/checkbox-group-input/checkbox-group-input.css +82 -0
- package/dist/collection/components/checkbox-group-input/checkbox-group-input.js +366 -0
- package/dist/collection/components/checkbox-input/checkbox-input.css +68 -0
- package/dist/collection/components/checkbox-input/checkbox-input.js +324 -0
- package/dist/collection/components/date-input/date-input.css +101 -0
- package/dist/collection/components/date-input/date-input.js +396 -0
- package/dist/collection/components/email-input/email-input.css +95 -0
- package/dist/collection/components/email-input/email-input.js +403 -0
- package/dist/collection/components/general-input/general-input.css +4 -0
- package/dist/collection/components/general-input/general-input.js +373 -0
- package/dist/collection/components/number-input/number-input.css +102 -0
- package/dist/collection/components/number-input/number-input.js +368 -0
- package/dist/collection/components/password-input/password-input.css +182 -0
- package/dist/collection/components/password-input/password-input.js +527 -0
- package/dist/collection/components/radio-input/radio-input.css +43 -0
- package/dist/collection/components/radio-input/radio-input.js +297 -0
- package/dist/collection/components/select-input/select-input.css +122 -0
- package/dist/collection/components/select-input/select-input.js +429 -0
- package/dist/collection/components/tel-input/tel-input.css +145 -0
- package/dist/collection/components/tel-input/tel-input.js +440 -0
- package/dist/collection/components/text-input/text-input.css +98 -0
- package/dist/collection/components/text-input/text-input.js +448 -0
- package/dist/collection/components/toggle-checkbox-input/toggle-checkbox-input.css +82 -0
- package/dist/collection/components/toggle-checkbox-input/toggle-checkbox-input.js +324 -0
- package/dist/collection/index.js +17 -0
- package/dist/collection/utils/locale.utils.js +123 -0
- package/dist/collection/utils/tooltipIcon.svg +5 -0
- package/dist/collection/utils/types.js +1 -0
- package/dist/collection/utils/utils.js +5 -0
- package/dist/components/active-mixin.js +975 -0
- package/dist/components/checkbox-group-input.d.ts +11 -0
- package/dist/components/checkbox-group-input.js +6 -0
- package/dist/components/checkbox-group-input2.js +1078 -0
- package/dist/components/checkbox-input.d.ts +11 -0
- package/dist/components/checkbox-input.js +6 -0
- package/dist/components/checkbox-input2.js +129 -0
- package/dist/components/date-input.d.ts +11 -0
- package/dist/components/date-input.js +6 -0
- package/dist/components/date-input2.js +11556 -0
- package/dist/components/email-input.d.ts +11 -0
- package/dist/components/email-input.js +6 -0
- package/dist/components/email-input2.js +171 -0
- package/dist/components/field-mixin.js +12426 -0
- package/dist/components/general-input.d.ts +11 -0
- package/dist/components/general-input.js +6 -0
- package/dist/components/general-input2.js +341 -0
- package/dist/components/index.d.ts +26 -0
- package/dist/components/index.js +18 -0
- package/dist/components/input-field-shared-styles.js +1211 -0
- package/dist/components/number-input.d.ts +11 -0
- package/dist/components/number-input.js +6 -0
- package/dist/components/number-input2.js +158 -0
- package/dist/components/password-input.d.ts +11 -0
- package/dist/components/password-input.js +6 -0
- package/dist/components/password-input2.js +1041 -0
- package/dist/components/radio-input.d.ts +11 -0
- package/dist/components/radio-input.js +6 -0
- package/dist/components/radio-input2.js +114 -0
- package/dist/components/select-input.d.ts +11 -0
- package/dist/components/select-input.js +6 -0
- package/dist/components/select-input2.js +183 -0
- package/dist/components/tel-input.d.ts +11 -0
- package/dist/components/tel-input.js +6 -0
- package/dist/components/tel-input2.js +197 -0
- package/dist/components/text-input.d.ts +11 -0
- package/dist/components/text-input.js +6 -0
- package/dist/components/text-input2.js +199 -0
- package/dist/components/toggle-checkbox-input.d.ts +11 -0
- package/dist/components/toggle-checkbox-input.js +6 -0
- package/dist/components/tooltipIcon.js +127 -0
- package/dist/components/vaadin-button.js +490 -0
- package/dist/components/vaadin-combo-box.js +4512 -0
- package/dist/components/virtual-keyboard-controller.js +2001 -0
- package/dist/esm/checkbox-group-input_10.entry.js +36064 -0
- package/dist/esm/general-input.entry.js +71 -0
- package/dist/esm/general-input.js +17 -0
- package/dist/esm/index-db76d5b5.js +1299 -0
- package/dist/esm/index.js +16 -0
- package/dist/esm/loader.js +17 -0
- package/dist/esm/locale.utils-de759721.js +125 -0
- package/dist/esm/polyfills/core-js.js +11 -0
- package/dist/esm/polyfills/css-shim.js +1 -0
- package/dist/esm/polyfills/dom.js +79 -0
- package/dist/esm/polyfills/es5-html-element.js +1 -0
- package/dist/esm/polyfills/index.js +34 -0
- package/dist/esm/polyfills/system.js +6 -0
- package/dist/esm/toggle-checkbox-input.entry.js +81 -0
- package/dist/esm/tooltipIcon-99c1c7b7.js +3 -0
- package/dist/general-input/general-input.esm.js +1 -0
- package/dist/general-input/index.esm.js +1 -0
- package/dist/general-input/p-10efdf3f.js +1 -0
- package/dist/general-input/p-613c3e00.entry.js +1 -0
- package/dist/general-input/p-660bcdd1.entry.js +1 -0
- package/dist/general-input/p-9b6b0396.entry.js +3646 -0
- package/dist/general-input/p-b408093e.js +1 -0
- package/dist/general-input/p-f4f4ccda.js +1 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/stencil.config.js +22 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/general-input/.stencil/packages/general-input/stencil.config.d.ts +2 -0
- package/dist/types/components/checkbox-group-input/checkbox-group-input.d.ts +74 -0
- package/dist/types/components/checkbox-input/checkbox-input.d.ts +65 -0
- package/dist/types/components/date-input/date-input.d.ts +84 -0
- package/dist/types/components/email-input/email-input.d.ts +80 -0
- package/dist/types/components/general-input/general-input.d.ts +75 -0
- package/dist/types/components/number-input/number-input.d.ts +74 -0
- package/dist/types/components/password-input/password-input.d.ts +91 -0
- package/dist/types/components/radio-input/radio-input.d.ts +59 -0
- package/dist/types/components/select-input/select-input.d.ts +83 -0
- package/dist/types/components/tel-input/tel-input.d.ts +89 -0
- package/dist/types/components/text-input/text-input.d.ts +84 -0
- package/dist/types/components/toggle-checkbox-input/toggle-checkbox-input.d.ts +67 -0
- package/dist/types/components.d.ts +1268 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/stencil-public-runtime.d.ts +1565 -0
- package/dist/types/utils/locale.utils.d.ts +17 -0
- package/dist/types/utils/types.d.ts +87 -0
- package/dist/types/utils/utils.d.ts +1 -0
- package/loader/cdn.js +3 -0
- package/loader/index.cjs.js +3 -0
- package/loader/index.d.ts +12 -0
- package/loader/index.es2017.js +3 -0
- package/loader/index.js +4 -0
- package/loader/package.json +10 -0
- package/package.json +2 -3
- package/LICENSE +0 -21
|
@@ -0,0 +1,527 @@
|
|
|
1
|
+
import { Component, h, Prop, State, Watch, Event, Listen, Element } from '@stencil/core';
|
|
2
|
+
import { translate } from '../../utils/locale.utils';
|
|
3
|
+
import '@vaadin/password-field';
|
|
4
|
+
import tooltipIcon from '../../utils/tooltipIcon.svg';
|
|
5
|
+
export class PasswordInput {
|
|
6
|
+
constructor() {
|
|
7
|
+
/**
|
|
8
|
+
* Default value for the input.
|
|
9
|
+
*/
|
|
10
|
+
this.defaultValue = '';
|
|
11
|
+
/**
|
|
12
|
+
* Client custom styling via inline style
|
|
13
|
+
*/
|
|
14
|
+
this.clientStyling = '';
|
|
15
|
+
this.limitStylingAppends = false;
|
|
16
|
+
this.showTooltip = false;
|
|
17
|
+
this.value = '';
|
|
18
|
+
this.touched = false;
|
|
19
|
+
this.originalValid = false;
|
|
20
|
+
this.validationPattern = '';
|
|
21
|
+
this.duplicateInputValue = null;
|
|
22
|
+
this.handleInput = (event) => {
|
|
23
|
+
this.value = event.target.value;
|
|
24
|
+
this.calculateComplexity(this.value);
|
|
25
|
+
this.showPopup = true;
|
|
26
|
+
this.touched = true;
|
|
27
|
+
if (this.debounceTime) {
|
|
28
|
+
clearTimeout(this.debounceTime);
|
|
29
|
+
}
|
|
30
|
+
this.debounceTime = setTimeout(() => {
|
|
31
|
+
this.isValid = this.setValidity();
|
|
32
|
+
this.errorMessage = this.setErrorMessage();
|
|
33
|
+
this.emitValueHandler(true);
|
|
34
|
+
}, 500);
|
|
35
|
+
};
|
|
36
|
+
this.handleBlur = (event) => {
|
|
37
|
+
this.value = event.target.value;
|
|
38
|
+
this.showPopup = false;
|
|
39
|
+
this.touched = true;
|
|
40
|
+
this.isValid = this.setValidity();
|
|
41
|
+
this.errorMessage = this.setErrorMessage();
|
|
42
|
+
};
|
|
43
|
+
this.handleFocus = () => {
|
|
44
|
+
this.showPopup = true;
|
|
45
|
+
this.calculateComplexity(this.value);
|
|
46
|
+
};
|
|
47
|
+
this.setClientStyling = () => {
|
|
48
|
+
let sheet = document.createElement('style');
|
|
49
|
+
sheet.innerHTML = this.clientStyling;
|
|
50
|
+
this.stylingContainer.prepend(sheet);
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
validityChanged() {
|
|
54
|
+
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
55
|
+
if (this.emitValue == true) {
|
|
56
|
+
this.valueHandler({ name: this.name, value: this.value });
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
valueChanged() {
|
|
60
|
+
if (!this.isDuplicateInput) {
|
|
61
|
+
// recalculate complexity immediately in order to send the correct validity to the duplicate
|
|
62
|
+
this.calculateComplexity(this.value);
|
|
63
|
+
this.sendOriginalValidityState.emit({ name: this.name, valid: this.setValidity() });
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
emitValueHandler(newValue) {
|
|
67
|
+
if (newValue == true && this.isValid) {
|
|
68
|
+
this.valueHandler({ name: this.name, value: this.value, type: 'duplicate' });
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
validityStateHandler(inputStateEvent) {
|
|
72
|
+
this.sendValidityState.emit(inputStateEvent);
|
|
73
|
+
}
|
|
74
|
+
valueHandler(inputValueEvent) {
|
|
75
|
+
this.sendInputValue.emit(inputValueEvent);
|
|
76
|
+
}
|
|
77
|
+
originalValidityChangedHandler(event) {
|
|
78
|
+
if (this.isDuplicateInput) {
|
|
79
|
+
if (event.detail.valid) {
|
|
80
|
+
this.originalValid = true;
|
|
81
|
+
this.isValid = this.setValidity();
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
this.originalValid = false;
|
|
85
|
+
this.isValid = false;
|
|
86
|
+
// only show error if the user has touched the input, in order to not show errors on empty inputs
|
|
87
|
+
this.value !== '' && (this.errorMessage = this.setErrorMessage());
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
valueChangedHandler(event) {
|
|
92
|
+
if (this.isDuplicateInput && this.name === event.detail.name + 'Duplicate') {
|
|
93
|
+
this.duplicateInputValue = event.detail.value;
|
|
94
|
+
if (this.touched) {
|
|
95
|
+
this.isValid = this.setValidity();
|
|
96
|
+
this.errorMessage = this.setErrorMessage();
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
if (this.name === event.detail.name + 'Duplicate'
|
|
100
|
+
&& this.name.replace('Duplicate', '') === event.detail.name
|
|
101
|
+
&& this.touched === true) {
|
|
102
|
+
this.isValid = this.setValidity();
|
|
103
|
+
this.errorMessage = this.setErrorMessage();
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
handleClickOutside(event) {
|
|
107
|
+
if (event.composedPath()[0] === this.tooltipIconReference)
|
|
108
|
+
return;
|
|
109
|
+
if (event.composedPath()[0] !== this.tooltipReference)
|
|
110
|
+
this.showTooltip = false;
|
|
111
|
+
}
|
|
112
|
+
componentDidRender() {
|
|
113
|
+
// start custom styling area
|
|
114
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
115
|
+
if (this.clientStyling)
|
|
116
|
+
this.setClientStyling();
|
|
117
|
+
this.limitStylingAppends = true;
|
|
118
|
+
}
|
|
119
|
+
// end custom styling area
|
|
120
|
+
}
|
|
121
|
+
componentDidLoad() {
|
|
122
|
+
this.inputReference = this.element.shadowRoot.querySelector('input');
|
|
123
|
+
this.passwordButton = this.element.shadowRoot.querySelector('vaadin-password-field-button');
|
|
124
|
+
this.passwordButton.tabIndex = -1;
|
|
125
|
+
if (this.defaultValue) {
|
|
126
|
+
this.value = this.defaultValue;
|
|
127
|
+
this.calculateComplexity(this.value);
|
|
128
|
+
this.valueHandler({ name: this.name, value: this.value });
|
|
129
|
+
if (this.isDuplicateInput) {
|
|
130
|
+
this.duplicateInputValue = this.defaultValue;
|
|
131
|
+
this.touched = true;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
this.isValid = this.setValidity();
|
|
135
|
+
}
|
|
136
|
+
calculateComplexity(password) {
|
|
137
|
+
this.passwordComplexity = this.validation.custom
|
|
138
|
+
.filter(rule => rule.rule === 'regex')
|
|
139
|
+
.map(rule => {
|
|
140
|
+
const ruleRegex = new RegExp(rule.pattern);
|
|
141
|
+
const passed = ruleRegex.test(password);
|
|
142
|
+
return { rule: rule.displayName, ruleKey: rule.errorKey, passed };
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
setValidity() {
|
|
146
|
+
var _a, _b;
|
|
147
|
+
if (this.isDuplicateInput && this.duplicateInputValue !== this.value) {
|
|
148
|
+
return false;
|
|
149
|
+
}
|
|
150
|
+
else if (!((_a = this.passwordComplexity) === null || _a === void 0 ? void 0 : _a.every(complexity => complexity.passed))) {
|
|
151
|
+
return false;
|
|
152
|
+
}
|
|
153
|
+
else {
|
|
154
|
+
return (_b = this.inputReference) === null || _b === void 0 ? void 0 : _b.validity.valid;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
setPattern() {
|
|
158
|
+
var _a, _b;
|
|
159
|
+
if (((_a = this.validation.custom) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
160
|
+
return (_b = this.validation.custom.find(customValidation => customValidation.rule === 'regex')) === null || _b === void 0 ? void 0 : _b.pattern;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
setErrorMessage() {
|
|
164
|
+
var _a, _b, _c, _d;
|
|
165
|
+
if (this.isDuplicateInput && !this.originalValid) {
|
|
166
|
+
return translate('invalidOriginalPasswordError', this.language);
|
|
167
|
+
}
|
|
168
|
+
if (this.inputReference.validity.patternMismatch) {
|
|
169
|
+
const errorCode = (_a = this.validation.custom.find(customValidation => customValidation.rule === 'regex')) === null || _a === void 0 ? void 0 : _a.errorKey;
|
|
170
|
+
const errorMessage = (_b = this.validation.custom.find(customValidation => customValidation.rule === 'regex')) === null || _b === void 0 ? void 0 : _b.errorMessage;
|
|
171
|
+
return translate(`${errorCode}`, this.language) ? translate(`${errorCode}`, this.language) : errorMessage;
|
|
172
|
+
}
|
|
173
|
+
if (this.inputReference.validity.tooShort || this.inputReference.validity.tooLong) {
|
|
174
|
+
return translate('lengthError', this.language, { values: { minLength: this.validation.minLength, maxLength: this.validation.maxLength } });
|
|
175
|
+
}
|
|
176
|
+
if (this.inputReference.validity.valueMissing) {
|
|
177
|
+
return translate('requiredError', this.language);
|
|
178
|
+
}
|
|
179
|
+
if (this.isDuplicateInput && this.duplicateInputValue !== this.value) {
|
|
180
|
+
const errorCode = (_c = this.validation.custom.find(customRule => customRule.rule === 'duplicate-input')) === null || _c === void 0 ? void 0 : _c.errorKey;
|
|
181
|
+
const errorMessage = (_d = this.validation.custom.find(customRule => customRule.rule === 'duplicate-input')) === null || _d === void 0 ? void 0 : _d.errorMessage;
|
|
182
|
+
return translate(`${errorCode}`, this.language) ? translate(`${errorCode}`, this.language) : errorMessage;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
renderTooltip() {
|
|
186
|
+
if (this.showTooltip) {
|
|
187
|
+
return (h("div", { class: `password__tooltip ${this.showTooltip ? 'visible' : ''}`, ref: (el) => this.tooltipReference = el, innerHTML: this.tooltip }));
|
|
188
|
+
}
|
|
189
|
+
return null;
|
|
190
|
+
}
|
|
191
|
+
renderComplexityPopup() {
|
|
192
|
+
const totalRules = this.passwordComplexity.length;
|
|
193
|
+
const passedRules = this.passwordComplexity.filter(complexity => complexity.passed).length;
|
|
194
|
+
const meterValue = passedRules / totalRules;
|
|
195
|
+
const allRulesPassed = this.passwordComplexity.every(complexity => complexity.passed);
|
|
196
|
+
return (h("div", { class: `password__complexity ${!this.showPopup ? 'password__complexity--hidden' : ''}` },
|
|
197
|
+
h("div", { class: 'password__complexity--strength' },
|
|
198
|
+
h("p", { class: 'password__complexity--text' },
|
|
199
|
+
translate('passwordStrength', this.language),
|
|
200
|
+
"\u00A0",
|
|
201
|
+
h("span", { class: 'password__complexity--text-bold' }, translate(`${allRulesPassed ? 'passwordStrengthStrong' : 'passwordStrengthWeak'}`, this.language))),
|
|
202
|
+
h("meter", { value: meterValue, min: "0", max: "1" })),
|
|
203
|
+
h("div", null, this.passwordComplexity.map((complexity, index) => {
|
|
204
|
+
return (h("div", { key: index },
|
|
205
|
+
h("input", { class: 'password__complexity--checkbox', type: "checkbox", checked: complexity.passed, disabled: true }),
|
|
206
|
+
h("span", null, translate(`${complexity.ruleKey}`, this.language) ? translate(`${complexity.ruleKey}`, this.language) : complexity.rule)));
|
|
207
|
+
}))));
|
|
208
|
+
}
|
|
209
|
+
render() {
|
|
210
|
+
let invalidClass = '';
|
|
211
|
+
if (this.touched) {
|
|
212
|
+
invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
|
|
213
|
+
}
|
|
214
|
+
return h("div", { class: `password__wrapper ${this.autofilled ? 'password__wrapper--autofilled' : ''} ${this.name}__input`, ref: el => this.stylingContainer = el },
|
|
215
|
+
h("div", { class: 'password__wrapper--flex' },
|
|
216
|
+
h("label", { class: `password__label ${this.validation.mandatory ? 'password__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName),
|
|
217
|
+
h("div", { class: 'password__wrapper--relative' },
|
|
218
|
+
this.tooltip &&
|
|
219
|
+
h("img", { class: 'password__tooltip-icon', src: tooltipIcon, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }),
|
|
220
|
+
this.renderTooltip())),
|
|
221
|
+
h("vaadin-password-field", { type: "password", id: `${this.name}__input`, class: `password__input ${invalidClass}`, name: this.name, readOnly: this.autofilled, value: this.defaultValue, required: this.validation.mandatory, maxlength: this.validation.maxLength, minlength: this.validation.minLength, pattern: this.validationPattern, placeholder: `${this.placeholder}`, onInput: this.handleInput, onBlur: this.handleBlur, onFocus: this.handleFocus }),
|
|
222
|
+
h("small", { class: 'password__error-message' }, this.errorMessage),
|
|
223
|
+
this.passwordComplexity && this.showPopup && !this.isDuplicateInput && this.renderComplexityPopup());
|
|
224
|
+
}
|
|
225
|
+
static get is() { return "password-input"; }
|
|
226
|
+
static get encapsulation() { return "shadow"; }
|
|
227
|
+
static get originalStyleUrls() { return {
|
|
228
|
+
"$": ["password-input.scss"]
|
|
229
|
+
}; }
|
|
230
|
+
static get styleUrls() { return {
|
|
231
|
+
"$": ["password-input.css"]
|
|
232
|
+
}; }
|
|
233
|
+
static get properties() { return {
|
|
234
|
+
"name": {
|
|
235
|
+
"type": "string",
|
|
236
|
+
"mutable": false,
|
|
237
|
+
"complexType": {
|
|
238
|
+
"original": "string",
|
|
239
|
+
"resolved": "string",
|
|
240
|
+
"references": {}
|
|
241
|
+
},
|
|
242
|
+
"required": false,
|
|
243
|
+
"optional": false,
|
|
244
|
+
"docs": {
|
|
245
|
+
"tags": [],
|
|
246
|
+
"text": "Name of the input."
|
|
247
|
+
},
|
|
248
|
+
"attribute": "name",
|
|
249
|
+
"reflect": true
|
|
250
|
+
},
|
|
251
|
+
"displayName": {
|
|
252
|
+
"type": "string",
|
|
253
|
+
"mutable": false,
|
|
254
|
+
"complexType": {
|
|
255
|
+
"original": "string",
|
|
256
|
+
"resolved": "string",
|
|
257
|
+
"references": {}
|
|
258
|
+
},
|
|
259
|
+
"required": false,
|
|
260
|
+
"optional": false,
|
|
261
|
+
"docs": {
|
|
262
|
+
"tags": [],
|
|
263
|
+
"text": "Name of input to be shown to the user."
|
|
264
|
+
},
|
|
265
|
+
"attribute": "display-name",
|
|
266
|
+
"reflect": true
|
|
267
|
+
},
|
|
268
|
+
"placeholder": {
|
|
269
|
+
"type": "string",
|
|
270
|
+
"mutable": false,
|
|
271
|
+
"complexType": {
|
|
272
|
+
"original": "string",
|
|
273
|
+
"resolved": "string",
|
|
274
|
+
"references": {}
|
|
275
|
+
},
|
|
276
|
+
"required": false,
|
|
277
|
+
"optional": false,
|
|
278
|
+
"docs": {
|
|
279
|
+
"tags": [],
|
|
280
|
+
"text": "Placeholder text to be shown."
|
|
281
|
+
},
|
|
282
|
+
"attribute": "placeholder",
|
|
283
|
+
"reflect": true
|
|
284
|
+
},
|
|
285
|
+
"defaultValue": {
|
|
286
|
+
"type": "string",
|
|
287
|
+
"mutable": false,
|
|
288
|
+
"complexType": {
|
|
289
|
+
"original": "string",
|
|
290
|
+
"resolved": "string",
|
|
291
|
+
"references": {}
|
|
292
|
+
},
|
|
293
|
+
"required": false,
|
|
294
|
+
"optional": false,
|
|
295
|
+
"docs": {
|
|
296
|
+
"tags": [],
|
|
297
|
+
"text": "Default value for the input."
|
|
298
|
+
},
|
|
299
|
+
"attribute": "default-value",
|
|
300
|
+
"reflect": true,
|
|
301
|
+
"defaultValue": "''"
|
|
302
|
+
},
|
|
303
|
+
"autofilled": {
|
|
304
|
+
"type": "boolean",
|
|
305
|
+
"mutable": false,
|
|
306
|
+
"complexType": {
|
|
307
|
+
"original": "boolean",
|
|
308
|
+
"resolved": "boolean",
|
|
309
|
+
"references": {}
|
|
310
|
+
},
|
|
311
|
+
"required": false,
|
|
312
|
+
"optional": false,
|
|
313
|
+
"docs": {
|
|
314
|
+
"tags": [],
|
|
315
|
+
"text": "Boolean. Determines if input should be readonly."
|
|
316
|
+
},
|
|
317
|
+
"attribute": "autofilled",
|
|
318
|
+
"reflect": true
|
|
319
|
+
},
|
|
320
|
+
"tooltip": {
|
|
321
|
+
"type": "string",
|
|
322
|
+
"mutable": false,
|
|
323
|
+
"complexType": {
|
|
324
|
+
"original": "string",
|
|
325
|
+
"resolved": "string",
|
|
326
|
+
"references": {}
|
|
327
|
+
},
|
|
328
|
+
"required": false,
|
|
329
|
+
"optional": false,
|
|
330
|
+
"docs": {
|
|
331
|
+
"tags": [],
|
|
332
|
+
"text": "Tooltip text."
|
|
333
|
+
},
|
|
334
|
+
"attribute": "tooltip",
|
|
335
|
+
"reflect": true
|
|
336
|
+
},
|
|
337
|
+
"validation": {
|
|
338
|
+
"type": "unknown",
|
|
339
|
+
"mutable": false,
|
|
340
|
+
"complexType": {
|
|
341
|
+
"original": "ValidationSchema",
|
|
342
|
+
"resolved": "ValidationSchema",
|
|
343
|
+
"references": {
|
|
344
|
+
"ValidationSchema": {
|
|
345
|
+
"location": "import",
|
|
346
|
+
"path": "../../utils/types"
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
},
|
|
350
|
+
"required": false,
|
|
351
|
+
"optional": false,
|
|
352
|
+
"docs": {
|
|
353
|
+
"tags": [],
|
|
354
|
+
"text": "Object of validation rules for the input."
|
|
355
|
+
}
|
|
356
|
+
},
|
|
357
|
+
"language": {
|
|
358
|
+
"type": "string",
|
|
359
|
+
"mutable": false,
|
|
360
|
+
"complexType": {
|
|
361
|
+
"original": "string",
|
|
362
|
+
"resolved": "string",
|
|
363
|
+
"references": {}
|
|
364
|
+
},
|
|
365
|
+
"required": false,
|
|
366
|
+
"optional": false,
|
|
367
|
+
"docs": {
|
|
368
|
+
"tags": [],
|
|
369
|
+
"text": "Currently selected language."
|
|
370
|
+
},
|
|
371
|
+
"attribute": "language",
|
|
372
|
+
"reflect": true
|
|
373
|
+
},
|
|
374
|
+
"emitValue": {
|
|
375
|
+
"type": "boolean",
|
|
376
|
+
"mutable": false,
|
|
377
|
+
"complexType": {
|
|
378
|
+
"original": "boolean",
|
|
379
|
+
"resolved": "boolean",
|
|
380
|
+
"references": {}
|
|
381
|
+
},
|
|
382
|
+
"required": false,
|
|
383
|
+
"optional": false,
|
|
384
|
+
"docs": {
|
|
385
|
+
"tags": [],
|
|
386
|
+
"text": "State passed down from the parent element. Will trigger the input to send it's value through an event."
|
|
387
|
+
},
|
|
388
|
+
"attribute": "emit-value",
|
|
389
|
+
"reflect": true
|
|
390
|
+
},
|
|
391
|
+
"isDuplicateInput": {
|
|
392
|
+
"type": "boolean",
|
|
393
|
+
"mutable": false,
|
|
394
|
+
"complexType": {
|
|
395
|
+
"original": "boolean",
|
|
396
|
+
"resolved": "boolean",
|
|
397
|
+
"references": {}
|
|
398
|
+
},
|
|
399
|
+
"required": false,
|
|
400
|
+
"optional": false,
|
|
401
|
+
"docs": {
|
|
402
|
+
"tags": [],
|
|
403
|
+
"text": "Flag for duplicate inputs, it sets up the input for certain validation rules."
|
|
404
|
+
},
|
|
405
|
+
"attribute": "is-duplicate-input",
|
|
406
|
+
"reflect": true
|
|
407
|
+
},
|
|
408
|
+
"clientStyling": {
|
|
409
|
+
"type": "string",
|
|
410
|
+
"mutable": false,
|
|
411
|
+
"complexType": {
|
|
412
|
+
"original": "string",
|
|
413
|
+
"resolved": "string",
|
|
414
|
+
"references": {}
|
|
415
|
+
},
|
|
416
|
+
"required": false,
|
|
417
|
+
"optional": false,
|
|
418
|
+
"docs": {
|
|
419
|
+
"tags": [],
|
|
420
|
+
"text": "Client custom styling via inline style"
|
|
421
|
+
},
|
|
422
|
+
"attribute": "client-styling",
|
|
423
|
+
"reflect": true,
|
|
424
|
+
"defaultValue": "''"
|
|
425
|
+
}
|
|
426
|
+
}; }
|
|
427
|
+
static get states() { return {
|
|
428
|
+
"isValid": {},
|
|
429
|
+
"errorMessage": {},
|
|
430
|
+
"limitStylingAppends": {},
|
|
431
|
+
"showTooltip": {},
|
|
432
|
+
"passwordComplexity": {},
|
|
433
|
+
"showPopup": {},
|
|
434
|
+
"value": {}
|
|
435
|
+
}; }
|
|
436
|
+
static get events() { return [{
|
|
437
|
+
"method": "sendOriginalValidityState",
|
|
438
|
+
"name": "sendOriginalValidityState",
|
|
439
|
+
"bubbles": true,
|
|
440
|
+
"cancelable": true,
|
|
441
|
+
"composed": true,
|
|
442
|
+
"docs": {
|
|
443
|
+
"tags": [],
|
|
444
|
+
"text": ""
|
|
445
|
+
},
|
|
446
|
+
"complexType": {
|
|
447
|
+
"original": "InputStateEvent",
|
|
448
|
+
"resolved": "InputStateEvent",
|
|
449
|
+
"references": {
|
|
450
|
+
"InputStateEvent": {
|
|
451
|
+
"location": "import",
|
|
452
|
+
"path": "../../utils/types"
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
}, {
|
|
457
|
+
"method": "sendValidityState",
|
|
458
|
+
"name": "sendValidityState",
|
|
459
|
+
"bubbles": true,
|
|
460
|
+
"cancelable": true,
|
|
461
|
+
"composed": true,
|
|
462
|
+
"docs": {
|
|
463
|
+
"tags": [],
|
|
464
|
+
"text": ""
|
|
465
|
+
},
|
|
466
|
+
"complexType": {
|
|
467
|
+
"original": "InputStateEvent",
|
|
468
|
+
"resolved": "InputStateEvent",
|
|
469
|
+
"references": {
|
|
470
|
+
"InputStateEvent": {
|
|
471
|
+
"location": "import",
|
|
472
|
+
"path": "../../utils/types"
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
}, {
|
|
477
|
+
"method": "sendInputValue",
|
|
478
|
+
"name": "sendInputValue",
|
|
479
|
+
"bubbles": true,
|
|
480
|
+
"cancelable": true,
|
|
481
|
+
"composed": true,
|
|
482
|
+
"docs": {
|
|
483
|
+
"tags": [],
|
|
484
|
+
"text": ""
|
|
485
|
+
},
|
|
486
|
+
"complexType": {
|
|
487
|
+
"original": "InputValueEvent",
|
|
488
|
+
"resolved": "InputValueEvent",
|
|
489
|
+
"references": {
|
|
490
|
+
"InputValueEvent": {
|
|
491
|
+
"location": "import",
|
|
492
|
+
"path": "../../utils/types"
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
}]; }
|
|
497
|
+
static get elementRef() { return "element"; }
|
|
498
|
+
static get watchers() { return [{
|
|
499
|
+
"propName": "isValid",
|
|
500
|
+
"methodName": "validityChanged"
|
|
501
|
+
}, {
|
|
502
|
+
"propName": "value",
|
|
503
|
+
"methodName": "valueChanged"
|
|
504
|
+
}, {
|
|
505
|
+
"propName": "emitValue",
|
|
506
|
+
"methodName": "emitValueHandler"
|
|
507
|
+
}]; }
|
|
508
|
+
static get listeners() { return [{
|
|
509
|
+
"name": "sendOriginalValidityState",
|
|
510
|
+
"method": "originalValidityChangedHandler",
|
|
511
|
+
"target": "body",
|
|
512
|
+
"capture": false,
|
|
513
|
+
"passive": false
|
|
514
|
+
}, {
|
|
515
|
+
"name": "sendInputValue",
|
|
516
|
+
"method": "valueChangedHandler",
|
|
517
|
+
"target": "body",
|
|
518
|
+
"capture": false,
|
|
519
|
+
"passive": false
|
|
520
|
+
}, {
|
|
521
|
+
"name": "click",
|
|
522
|
+
"method": "handleClickOutside",
|
|
523
|
+
"target": "document",
|
|
524
|
+
"capture": false,
|
|
525
|
+
"passive": false
|
|
526
|
+
}]; }
|
|
527
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
*,
|
|
2
|
+
*::before,
|
|
3
|
+
*::after {
|
|
4
|
+
padding: 0;
|
|
5
|
+
margin: 0;
|
|
6
|
+
box-sizing: border-box;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.radio__fieldset {
|
|
10
|
+
border: none;
|
|
11
|
+
position: relative;
|
|
12
|
+
}
|
|
13
|
+
.radio__wrapper {
|
|
14
|
+
display: flex;
|
|
15
|
+
gap: 5px;
|
|
16
|
+
}
|
|
17
|
+
.radio__error-message {
|
|
18
|
+
position: absolute;
|
|
19
|
+
top: calc(100% + 5px);
|
|
20
|
+
left: 0;
|
|
21
|
+
color: var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909));
|
|
22
|
+
}
|
|
23
|
+
.radio__tooltip-icon {
|
|
24
|
+
position: absolute;
|
|
25
|
+
right: 0;
|
|
26
|
+
bottom: 10px;
|
|
27
|
+
}
|
|
28
|
+
.radio__tooltip {
|
|
29
|
+
position: absolute;
|
|
30
|
+
bottom: 35px;
|
|
31
|
+
right: 10px;
|
|
32
|
+
background-color: var(--emfe-w-color-white, #FFFFFF);
|
|
33
|
+
border: 1px solid var(--emfe-w-color-gray-100, #E6E6E6);
|
|
34
|
+
color: var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));
|
|
35
|
+
padding: 10px;
|
|
36
|
+
border-radius: 5px;
|
|
37
|
+
opacity: 0;
|
|
38
|
+
transition: opacity 0.3s ease-in-out;
|
|
39
|
+
z-index: 10;
|
|
40
|
+
}
|
|
41
|
+
.radio__tooltip.visible {
|
|
42
|
+
opacity: 1;
|
|
43
|
+
}
|