@everymatrix/general-input 1.44.0 → 1.45.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/app-globals-3a1e7e63.js +5 -0
- package/dist/cjs/checkbox-group-input_10.cjs.entry.js +3873 -1756
- package/dist/cjs/general-input.cjs.entry.js +65 -63
- package/dist/cjs/general-input.cjs.js +17 -11
- package/dist/cjs/index-8cb018cb.js +1316 -0
- package/dist/cjs/index.cjs.js +13 -13
- package/dist/cjs/loader.cjs.js +7 -13
- package/dist/cjs/locale.utils-76c75c40.js +147 -0
- package/dist/cjs/toggle-checkbox-input.cjs.entry.js +77 -78
- package/dist/collection/collection-manifest.json +14 -14
- package/dist/collection/components/checkbox-group-input/checkbox-group-input.js +368 -353
- package/dist/collection/components/checkbox-input/checkbox-input.js +325 -315
- package/dist/collection/components/date-input/date-input.css +2 -2
- package/dist/collection/components/date-input/date-input.js +397 -376
- package/dist/collection/components/email-input/email-input.css +7 -11
- package/dist/collection/components/email-input/email-input.js +404 -385
- package/dist/collection/components/general-input/general-input.js +373 -368
- package/dist/collection/components/general-input/index.js +1 -0
- package/dist/collection/components/number-input/number-input.js +370 -352
- package/dist/collection/components/password-input/password-input.css +2 -4
- package/dist/collection/components/password-input/password-input.js +513 -540
- package/dist/collection/components/radio-input/radio-input.js +301 -286
- package/dist/collection/components/select-input/select-input.css +8 -9
- package/dist/collection/components/select-input/select-input.js +427 -414
- package/dist/collection/components/tel-input/tel-input.css +1 -1
- package/dist/collection/components/tel-input/tel-input.js +440 -422
- package/dist/collection/components/text-input/text-input.css +0 -1
- package/dist/collection/components/text-input/text-input.js +444 -429
- package/dist/collection/components/toggle-checkbox-input/toggle-checkbox-input.js +327 -340
- package/dist/collection/index.js +13 -13
- package/dist/collection/utils/locale.utils.js +133 -133
- package/dist/collection/utils/utils.js +3 -3
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/checkbox-group-input_10.entry.js +3873 -1756
- package/dist/esm/general-input.entry.js +65 -63
- package/dist/esm/general-input.js +14 -11
- package/dist/esm/index-514fda47.js +1287 -0
- package/dist/esm/index.js +13 -13
- package/dist/esm/loader.js +7 -13
- package/dist/esm/locale.utils-ca41bf95.js +144 -0
- package/dist/esm/toggle-checkbox-input.entry.js +77 -78
- package/dist/general-input/general-input.esm.js +1 -1
- package/dist/general-input/p-03e81c11.js +2 -0
- package/dist/general-input/p-aec71434.js +1 -0
- package/dist/general-input/p-e1255160.js +1 -0
- package/dist/general-input/p-eb454344.entry.js +1 -0
- package/dist/general-input/p-ecdc294b.entry.js +5430 -0
- package/dist/general-input/p-f92ab852.entry.js +1 -0
- package/dist/stencil.config.dev.js +17 -0
- package/dist/stencil.config.js +14 -19
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/general-input/.stencil/packages/stencil/general-input/stencil.config.d.ts +2 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/general-input/.stencil/packages/stencil/general-input/stencil.config.dev.d.ts +2 -0
- package/dist/types/components/checkbox-group-input/checkbox-group-input.d.ts +68 -68
- package/dist/types/components/checkbox-input/checkbox-input.d.ts +61 -62
- package/dist/types/components/date-input/date-input.d.ts +78 -78
- package/dist/types/components/email-input/email-input.d.ts +77 -77
- package/dist/types/components/general-input/general-input.d.ts +72 -72
- package/dist/types/components/general-input/index.d.ts +1 -0
- package/dist/types/components/number-input/number-input.d.ts +71 -71
- package/dist/types/components/password-input/password-input.d.ts +87 -92
- package/dist/types/components/radio-input/radio-input.d.ts +55 -55
- package/dist/types/components/select-input/select-input.d.ts +79 -79
- package/dist/types/components/tel-input/tel-input.d.ts +85 -85
- package/dist/types/components/text-input/text-input.d.ts +81 -81
- package/dist/types/components/toggle-checkbox-input/toggle-checkbox-input.d.ts +63 -68
- package/dist/types/components.d.ts +201 -39
- package/dist/types/stencil-public-runtime.d.ts +142 -33
- package/dist/types/utils/locale.utils.d.ts +8 -8
- package/dist/types/utils/types.d.ts +54 -54
- package/loader/cdn.js +1 -3
- package/loader/index.cjs.js +1 -3
- package/loader/index.d.ts +13 -1
- package/loader/index.es2017.js +1 -3
- package/loader/index.js +1 -3
- package/loader/package.json +1 -0
- package/package.json +8 -1
- package/dist/cjs/index-132a0774.js +0 -1327
- package/dist/cjs/locale.utils-2fa6f747.js +0 -147
- package/dist/components/active-mixin.js +0 -975
- package/dist/components/checkbox-group-input.d.ts +0 -11
- package/dist/components/checkbox-group-input.js +0 -6
- package/dist/components/checkbox-group-input2.js +0 -1078
- package/dist/components/checkbox-input.d.ts +0 -11
- package/dist/components/checkbox-input.js +0 -6
- package/dist/components/checkbox-input2.js +0 -132
- package/dist/components/date-input.d.ts +0 -11
- package/dist/components/date-input.js +0 -6
- package/dist/components/date-input2.js +0 -11556
- package/dist/components/email-input.d.ts +0 -11
- package/dist/components/email-input.js +0 -6
- package/dist/components/email-input2.js +0 -171
- package/dist/components/field-mixin.js +0 -12426
- package/dist/components/general-input.d.ts +0 -11
- package/dist/components/general-input.js +0 -6
- package/dist/components/general-input2.js +0 -350
- package/dist/components/index.d.ts +0 -26
- package/dist/components/index.js +0 -18
- package/dist/components/input-field-shared-styles.js +0 -1211
- package/dist/components/number-input.d.ts +0 -11
- package/dist/components/number-input.js +0 -6
- package/dist/components/number-input2.js +0 -158
- package/dist/components/password-input.d.ts +0 -11
- package/dist/components/password-input.js +0 -6
- package/dist/components/password-input2.js +0 -1059
- package/dist/components/radio-input.d.ts +0 -11
- package/dist/components/radio-input.js +0 -6
- package/dist/components/radio-input2.js +0 -114
- package/dist/components/select-input.d.ts +0 -11
- package/dist/components/select-input.js +0 -6
- package/dist/components/select-input2.js +0 -183
- package/dist/components/tel-input.d.ts +0 -11
- package/dist/components/tel-input.js +0 -6
- package/dist/components/tel-input2.js +0 -197
- package/dist/components/text-input.d.ts +0 -11
- package/dist/components/text-input.js +0 -6
- package/dist/components/text-input2.js +0 -199
- package/dist/components/toggle-checkbox-input.d.ts +0 -11
- package/dist/components/toggle-checkbox-input.js +0 -6
- package/dist/components/tooltipIcon.js +0 -146
- package/dist/components/vaadin-button.js +0 -490
- package/dist/components/vaadin-combo-box.js +0 -4512
- package/dist/components/virtual-keyboard-controller.js +0 -2001
- package/dist/esm/index-db76d5b5.js +0 -1299
- package/dist/esm/locale.utils-30fb5289.js +0 -144
- package/dist/esm/polyfills/core-js.js +0 -11
- package/dist/esm/polyfills/css-shim.js +0 -1
- package/dist/esm/polyfills/dom.js +0 -79
- package/dist/esm/polyfills/es5-html-element.js +0 -1
- package/dist/esm/polyfills/index.js +0 -34
- package/dist/esm/polyfills/system.js +0 -6
- package/dist/general-input/p-04d4b145.js +0 -1
- package/dist/general-input/p-a8221ce9.entry.js +0 -1
- package/dist/general-input/p-b408093e.js +0 -1
- package/dist/general-input/p-b64caafa.entry.js +0 -3646
- package/dist/general-input/p-c85c0e4d.entry.js +0 -1
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/general-input/.stencil/packages/general-input/stencil.config.d.ts +0 -2
- /package/dist/cjs/{tooltipIcon-092a795f.js → tooltipIcon-7e9ee226.js} +0 -0
- /package/dist/esm/{tooltipIcon-99c1c7b7.js → tooltipIcon-0a5a06a2.js} +0 -0
- /package/dist/general-input/{p-f4f4ccda.js → p-2dccd0bf.js} +0 -0
|
@@ -1,327 +1,337 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { translate } from
|
|
3
|
-
import tooltipIcon from
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
import { translate } from "../../utils/locale.utils";
|
|
3
|
+
import tooltipIcon from "../../utils/tooltipIcon.svg";
|
|
4
4
|
export class CheckboxInput {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
validityChanged() {
|
|
27
|
-
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
28
|
-
if (this.emitValue == true) {
|
|
29
|
-
this.valueHandler({ name: this.name, value: this.value });
|
|
5
|
+
constructor() {
|
|
6
|
+
this.value = '';
|
|
7
|
+
this.setClientStyling = () => {
|
|
8
|
+
let sheet = document.createElement('style');
|
|
9
|
+
sheet.innerHTML = this.clientStyling;
|
|
10
|
+
this.stylingContainer.prepend(sheet);
|
|
11
|
+
};
|
|
12
|
+
this.name = undefined;
|
|
13
|
+
this.displayName = undefined;
|
|
14
|
+
this.defaultValue = '';
|
|
15
|
+
this.autofilled = undefined;
|
|
16
|
+
this.tooltip = undefined;
|
|
17
|
+
this.validation = undefined;
|
|
18
|
+
this.language = undefined;
|
|
19
|
+
this.emitValue = undefined;
|
|
20
|
+
this.clientStyling = '';
|
|
21
|
+
this.errorMessage = undefined;
|
|
22
|
+
this.isValid = undefined;
|
|
23
|
+
this.limitStylingAppends = false;
|
|
24
|
+
this.showTooltip = false;
|
|
30
25
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
if (newValue == true && this.isValid) {
|
|
37
|
-
this.valueHandler({ name: this.name, value: this.value });
|
|
26
|
+
validityChanged() {
|
|
27
|
+
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
28
|
+
if (this.emitValue == true) {
|
|
29
|
+
this.valueHandler({ name: this.name, value: this.value });
|
|
30
|
+
}
|
|
38
31
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
this.sendInputValue.emit(inputValueEvent);
|
|
42
|
-
}
|
|
43
|
-
handleClickOutside(event) {
|
|
44
|
-
if (event.composedPath()[0] === this.tooltipIconReference)
|
|
45
|
-
return;
|
|
46
|
-
if (event.composedPath()[0] !== this.tooltipReference)
|
|
47
|
-
this.showTooltip = false;
|
|
48
|
-
}
|
|
49
|
-
componentDidRender() {
|
|
50
|
-
// start custom styling area
|
|
51
|
-
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
52
|
-
if (this.clientStyling)
|
|
53
|
-
this.setClientStyling();
|
|
54
|
-
this.limitStylingAppends = true;
|
|
32
|
+
validityStateHandler(inputStateEvent) {
|
|
33
|
+
this.sendValidityState.emit(inputStateEvent);
|
|
55
34
|
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
this.value = this.defaultValue;
|
|
61
|
-
this.valueHandler({ name: this.name, value: this.value });
|
|
35
|
+
emitValueHandler(newValue) {
|
|
36
|
+
if (newValue == true && this.isValid) {
|
|
37
|
+
this.valueHandler({ name: this.name, value: this.value });
|
|
38
|
+
}
|
|
62
39
|
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
this.value = this.inputReference.checked.toString();
|
|
66
|
-
this.errorMessage = this.setErrorMessage();
|
|
67
|
-
this.isValid = this.setValidity();
|
|
68
|
-
this.emitValueHandler(true);
|
|
69
|
-
}
|
|
70
|
-
setValidity() {
|
|
71
|
-
return this.inputReference.validity.valid;
|
|
72
|
-
}
|
|
73
|
-
setErrorMessage() {
|
|
74
|
-
if (this.inputReference.validity.valueMissing) {
|
|
75
|
-
return translate('requiredError', this.language);
|
|
40
|
+
valueHandler(inputValueEvent) {
|
|
41
|
+
this.sendInputValue.emit(inputValueEvent);
|
|
76
42
|
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
renderTooltip() {
|
|
83
|
-
if (this.showTooltip) {
|
|
84
|
-
return (h("div", { class: `checkbox__tooltip ${this.showTooltip ? 'visible' : ''}`, ref: (el) => this.tooltipReference = el, innerHTML: this.tooltip }));
|
|
43
|
+
handleClickOutside(event) {
|
|
44
|
+
if (event.composedPath()[0] === this.tooltipIconReference)
|
|
45
|
+
return;
|
|
46
|
+
if (event.composedPath()[0] !== this.tooltipReference)
|
|
47
|
+
this.showTooltip = false;
|
|
85
48
|
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
h("small", { class: 'checkbox__error-message' }, this.errorMessage),
|
|
93
|
-
h("div", { class: 'checkbox__wrapper--relative' },
|
|
94
|
-
this.tooltip &&
|
|
95
|
-
h("img", { class: 'checkbox__tooltip-icon', src: tooltipIcon, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }),
|
|
96
|
-
this.renderTooltip()));
|
|
97
|
-
}
|
|
98
|
-
static get is() { return "checkbox-input"; }
|
|
99
|
-
static get encapsulation() { return "shadow"; }
|
|
100
|
-
static get originalStyleUrls() { return {
|
|
101
|
-
"$": ["checkbox-input.scss"]
|
|
102
|
-
}; }
|
|
103
|
-
static get styleUrls() { return {
|
|
104
|
-
"$": ["checkbox-input.css"]
|
|
105
|
-
}; }
|
|
106
|
-
static get properties() { return {
|
|
107
|
-
"name": {
|
|
108
|
-
"type": "string",
|
|
109
|
-
"mutable": false,
|
|
110
|
-
"complexType": {
|
|
111
|
-
"original": "string",
|
|
112
|
-
"resolved": "string",
|
|
113
|
-
"references": {}
|
|
114
|
-
},
|
|
115
|
-
"required": false,
|
|
116
|
-
"optional": false,
|
|
117
|
-
"docs": {
|
|
118
|
-
"tags": [],
|
|
119
|
-
"text": "Name of the input."
|
|
120
|
-
},
|
|
121
|
-
"attribute": "name",
|
|
122
|
-
"reflect": true
|
|
123
|
-
},
|
|
124
|
-
"displayName": {
|
|
125
|
-
"type": "string",
|
|
126
|
-
"mutable": false,
|
|
127
|
-
"complexType": {
|
|
128
|
-
"original": "string",
|
|
129
|
-
"resolved": "string",
|
|
130
|
-
"references": {}
|
|
131
|
-
},
|
|
132
|
-
"required": false,
|
|
133
|
-
"optional": false,
|
|
134
|
-
"docs": {
|
|
135
|
-
"tags": [],
|
|
136
|
-
"text": "Name of input to be shown to the user."
|
|
137
|
-
},
|
|
138
|
-
"attribute": "display-name",
|
|
139
|
-
"reflect": true
|
|
140
|
-
},
|
|
141
|
-
"defaultValue": {
|
|
142
|
-
"type": "string",
|
|
143
|
-
"mutable": false,
|
|
144
|
-
"complexType": {
|
|
145
|
-
"original": "string",
|
|
146
|
-
"resolved": "string",
|
|
147
|
-
"references": {}
|
|
148
|
-
},
|
|
149
|
-
"required": false,
|
|
150
|
-
"optional": false,
|
|
151
|
-
"docs": {
|
|
152
|
-
"tags": [],
|
|
153
|
-
"text": "Default value for the input."
|
|
154
|
-
},
|
|
155
|
-
"attribute": "default-value",
|
|
156
|
-
"reflect": true,
|
|
157
|
-
"defaultValue": "''"
|
|
158
|
-
},
|
|
159
|
-
"autofilled": {
|
|
160
|
-
"type": "boolean",
|
|
161
|
-
"mutable": false,
|
|
162
|
-
"complexType": {
|
|
163
|
-
"original": "boolean",
|
|
164
|
-
"resolved": "boolean",
|
|
165
|
-
"references": {}
|
|
166
|
-
},
|
|
167
|
-
"required": false,
|
|
168
|
-
"optional": false,
|
|
169
|
-
"docs": {
|
|
170
|
-
"tags": [],
|
|
171
|
-
"text": "Boolean. Determines if input should be readonly."
|
|
172
|
-
},
|
|
173
|
-
"attribute": "autofilled",
|
|
174
|
-
"reflect": true
|
|
175
|
-
},
|
|
176
|
-
"tooltip": {
|
|
177
|
-
"type": "string",
|
|
178
|
-
"mutable": false,
|
|
179
|
-
"complexType": {
|
|
180
|
-
"original": "string",
|
|
181
|
-
"resolved": "string",
|
|
182
|
-
"references": {}
|
|
183
|
-
},
|
|
184
|
-
"required": false,
|
|
185
|
-
"optional": false,
|
|
186
|
-
"docs": {
|
|
187
|
-
"tags": [],
|
|
188
|
-
"text": "Tooltip text."
|
|
189
|
-
},
|
|
190
|
-
"attribute": "tooltip",
|
|
191
|
-
"reflect": true
|
|
192
|
-
},
|
|
193
|
-
"validation": {
|
|
194
|
-
"type": "unknown",
|
|
195
|
-
"mutable": false,
|
|
196
|
-
"complexType": {
|
|
197
|
-
"original": "ValidationSchema",
|
|
198
|
-
"resolved": "ValidationSchema",
|
|
199
|
-
"references": {
|
|
200
|
-
"ValidationSchema": {
|
|
201
|
-
"location": "import",
|
|
202
|
-
"path": "../../utils/types"
|
|
203
|
-
}
|
|
49
|
+
componentDidRender() {
|
|
50
|
+
// start custom styling area
|
|
51
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
52
|
+
if (this.clientStyling)
|
|
53
|
+
this.setClientStyling();
|
|
54
|
+
this.limitStylingAppends = true;
|
|
204
55
|
}
|
|
205
|
-
|
|
206
|
-
"required": false,
|
|
207
|
-
"optional": false,
|
|
208
|
-
"docs": {
|
|
209
|
-
"tags": [],
|
|
210
|
-
"text": "Object of validation rules for the input."
|
|
211
|
-
}
|
|
212
|
-
},
|
|
213
|
-
"language": {
|
|
214
|
-
"type": "string",
|
|
215
|
-
"mutable": false,
|
|
216
|
-
"complexType": {
|
|
217
|
-
"original": "string",
|
|
218
|
-
"resolved": "string",
|
|
219
|
-
"references": {}
|
|
220
|
-
},
|
|
221
|
-
"required": false,
|
|
222
|
-
"optional": false,
|
|
223
|
-
"docs": {
|
|
224
|
-
"tags": [],
|
|
225
|
-
"text": "Currently selected language."
|
|
226
|
-
},
|
|
227
|
-
"attribute": "language",
|
|
228
|
-
"reflect": true
|
|
229
|
-
},
|
|
230
|
-
"emitValue": {
|
|
231
|
-
"type": "boolean",
|
|
232
|
-
"mutable": false,
|
|
233
|
-
"complexType": {
|
|
234
|
-
"original": "boolean",
|
|
235
|
-
"resolved": "boolean",
|
|
236
|
-
"references": {}
|
|
237
|
-
},
|
|
238
|
-
"required": false,
|
|
239
|
-
"optional": false,
|
|
240
|
-
"docs": {
|
|
241
|
-
"tags": [],
|
|
242
|
-
"text": "State passed down from the parent element. Will trigger the input to send it's value through an event."
|
|
243
|
-
},
|
|
244
|
-
"attribute": "emit-value",
|
|
245
|
-
"reflect": true
|
|
246
|
-
},
|
|
247
|
-
"clientStyling": {
|
|
248
|
-
"type": "string",
|
|
249
|
-
"mutable": false,
|
|
250
|
-
"complexType": {
|
|
251
|
-
"original": "string",
|
|
252
|
-
"resolved": "string",
|
|
253
|
-
"references": {}
|
|
254
|
-
},
|
|
255
|
-
"required": false,
|
|
256
|
-
"optional": false,
|
|
257
|
-
"docs": {
|
|
258
|
-
"tags": [],
|
|
259
|
-
"text": "Client custom styling via inline style"
|
|
260
|
-
},
|
|
261
|
-
"attribute": "client-styling",
|
|
262
|
-
"reflect": true,
|
|
263
|
-
"defaultValue": "''"
|
|
56
|
+
// end custom styling area
|
|
264
57
|
}
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
"limitStylingAppends": {},
|
|
270
|
-
"showTooltip": {}
|
|
271
|
-
}; }
|
|
272
|
-
static get events() { return [{
|
|
273
|
-
"method": "sendValidityState",
|
|
274
|
-
"name": "sendValidityState",
|
|
275
|
-
"bubbles": true,
|
|
276
|
-
"cancelable": true,
|
|
277
|
-
"composed": true,
|
|
278
|
-
"docs": {
|
|
279
|
-
"tags": [],
|
|
280
|
-
"text": ""
|
|
281
|
-
},
|
|
282
|
-
"complexType": {
|
|
283
|
-
"original": "InputStateEvent",
|
|
284
|
-
"resolved": "InputStateEvent",
|
|
285
|
-
"references": {
|
|
286
|
-
"InputStateEvent": {
|
|
287
|
-
"location": "import",
|
|
288
|
-
"path": "../../utils/types"
|
|
289
|
-
}
|
|
58
|
+
componentDidLoad() {
|
|
59
|
+
if (this.defaultValue) {
|
|
60
|
+
this.value = this.defaultValue;
|
|
61
|
+
this.valueHandler({ name: this.name, value: this.value });
|
|
290
62
|
}
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
"resolved": "InputValueEvent",
|
|
305
|
-
"references": {
|
|
306
|
-
"InputValueEvent": {
|
|
307
|
-
"location": "import",
|
|
308
|
-
"path": "../../utils/types"
|
|
309
|
-
}
|
|
63
|
+
}
|
|
64
|
+
handleClick() {
|
|
65
|
+
this.value = this.inputReference.checked.toString();
|
|
66
|
+
this.errorMessage = this.setErrorMessage();
|
|
67
|
+
this.isValid = this.setValidity();
|
|
68
|
+
this.emitValueHandler(true);
|
|
69
|
+
}
|
|
70
|
+
setValidity() {
|
|
71
|
+
return this.inputReference.validity.valid;
|
|
72
|
+
}
|
|
73
|
+
setErrorMessage() {
|
|
74
|
+
if (this.inputReference.validity.valueMissing) {
|
|
75
|
+
return translate('requiredError', this.language);
|
|
310
76
|
}
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
77
|
+
}
|
|
78
|
+
renderLabel() {
|
|
79
|
+
return (h("label", { class: 'checkbox__label', htmlFor: `${this.name}__input` }, h("div", { class: 'checkbox__label-text', innerHTML: `${this.displayName} ${this.validation.mandatory ? '*' : ''}` })));
|
|
80
|
+
}
|
|
81
|
+
renderTooltip() {
|
|
82
|
+
if (this.showTooltip) {
|
|
83
|
+
return (h("div", { class: `checkbox__tooltip ${this.showTooltip ? 'visible' : ''}`, ref: (el) => this.tooltipReference = el, innerHTML: this.tooltip }));
|
|
84
|
+
}
|
|
85
|
+
return null;
|
|
86
|
+
}
|
|
87
|
+
render() {
|
|
88
|
+
return h("div", { key: '0aae00d291d1da02adae1bc91e79ccd579aa5c7f', class: `checkbox__wrapper ${this.name}__input`, ref: el => this.stylingContainer = el }, h("input", { key: '4b8c61d322b5065d8abe4e2687e270511fadc97f', class: 'checkbox__input', type: "checkbox", id: `${this.name}__input`, ref: (el) => this.inputReference = el, name: this.name, checked: this.defaultValue === "true", readOnly: this.autofilled, required: this.validation.mandatory, value: this.value, onClick: () => this.handleClick() }), this.renderLabel(), h("small", { key: '934263cb58a0d379e8b7dc1f5004ad7e61c63ce0', class: 'checkbox__error-message' }, this.errorMessage), h("div", { key: '88cc71329d88b6325d792226e64ff7f93e940178', class: 'checkbox__wrapper--relative' }, this.tooltip &&
|
|
89
|
+
h("img", { key: '3708dc613dc920bac6557f2a8020bbafd97d9127', class: 'checkbox__tooltip-icon', src: tooltipIcon, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip()));
|
|
90
|
+
}
|
|
91
|
+
static get is() { return "checkbox-input"; }
|
|
92
|
+
static get encapsulation() { return "shadow"; }
|
|
93
|
+
static get originalStyleUrls() {
|
|
94
|
+
return {
|
|
95
|
+
"$": ["checkbox-input.scss"]
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
static get styleUrls() {
|
|
99
|
+
return {
|
|
100
|
+
"$": ["checkbox-input.css"]
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
static get properties() {
|
|
104
|
+
return {
|
|
105
|
+
"name": {
|
|
106
|
+
"type": "string",
|
|
107
|
+
"mutable": false,
|
|
108
|
+
"complexType": {
|
|
109
|
+
"original": "string",
|
|
110
|
+
"resolved": "string",
|
|
111
|
+
"references": {}
|
|
112
|
+
},
|
|
113
|
+
"required": false,
|
|
114
|
+
"optional": false,
|
|
115
|
+
"docs": {
|
|
116
|
+
"tags": [],
|
|
117
|
+
"text": "Name of the input."
|
|
118
|
+
},
|
|
119
|
+
"attribute": "name",
|
|
120
|
+
"reflect": true
|
|
121
|
+
},
|
|
122
|
+
"displayName": {
|
|
123
|
+
"type": "string",
|
|
124
|
+
"mutable": false,
|
|
125
|
+
"complexType": {
|
|
126
|
+
"original": "string",
|
|
127
|
+
"resolved": "string",
|
|
128
|
+
"references": {}
|
|
129
|
+
},
|
|
130
|
+
"required": false,
|
|
131
|
+
"optional": false,
|
|
132
|
+
"docs": {
|
|
133
|
+
"tags": [],
|
|
134
|
+
"text": "Name of input to be shown to the user."
|
|
135
|
+
},
|
|
136
|
+
"attribute": "display-name",
|
|
137
|
+
"reflect": true
|
|
138
|
+
},
|
|
139
|
+
"defaultValue": {
|
|
140
|
+
"type": "string",
|
|
141
|
+
"mutable": false,
|
|
142
|
+
"complexType": {
|
|
143
|
+
"original": "string",
|
|
144
|
+
"resolved": "string",
|
|
145
|
+
"references": {}
|
|
146
|
+
},
|
|
147
|
+
"required": false,
|
|
148
|
+
"optional": false,
|
|
149
|
+
"docs": {
|
|
150
|
+
"tags": [],
|
|
151
|
+
"text": "Default value for the input."
|
|
152
|
+
},
|
|
153
|
+
"attribute": "default-value",
|
|
154
|
+
"reflect": true,
|
|
155
|
+
"defaultValue": "''"
|
|
156
|
+
},
|
|
157
|
+
"autofilled": {
|
|
158
|
+
"type": "boolean",
|
|
159
|
+
"mutable": false,
|
|
160
|
+
"complexType": {
|
|
161
|
+
"original": "boolean",
|
|
162
|
+
"resolved": "boolean",
|
|
163
|
+
"references": {}
|
|
164
|
+
},
|
|
165
|
+
"required": false,
|
|
166
|
+
"optional": false,
|
|
167
|
+
"docs": {
|
|
168
|
+
"tags": [],
|
|
169
|
+
"text": "Boolean. Determines if input should be readonly."
|
|
170
|
+
},
|
|
171
|
+
"attribute": "autofilled",
|
|
172
|
+
"reflect": true
|
|
173
|
+
},
|
|
174
|
+
"tooltip": {
|
|
175
|
+
"type": "string",
|
|
176
|
+
"mutable": false,
|
|
177
|
+
"complexType": {
|
|
178
|
+
"original": "string",
|
|
179
|
+
"resolved": "string",
|
|
180
|
+
"references": {}
|
|
181
|
+
},
|
|
182
|
+
"required": false,
|
|
183
|
+
"optional": false,
|
|
184
|
+
"docs": {
|
|
185
|
+
"tags": [],
|
|
186
|
+
"text": "Tooltip text."
|
|
187
|
+
},
|
|
188
|
+
"attribute": "tooltip",
|
|
189
|
+
"reflect": true
|
|
190
|
+
},
|
|
191
|
+
"validation": {
|
|
192
|
+
"type": "unknown",
|
|
193
|
+
"mutable": false,
|
|
194
|
+
"complexType": {
|
|
195
|
+
"original": "ValidationSchema",
|
|
196
|
+
"resolved": "ValidationSchema",
|
|
197
|
+
"references": {
|
|
198
|
+
"ValidationSchema": {
|
|
199
|
+
"location": "import",
|
|
200
|
+
"path": "../../utils/types",
|
|
201
|
+
"id": "../../../../packages/stencil/general-input/src/utils/types.ts::ValidationSchema"
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
"required": false,
|
|
206
|
+
"optional": false,
|
|
207
|
+
"docs": {
|
|
208
|
+
"tags": [],
|
|
209
|
+
"text": "Object of validation rules for the input."
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
"language": {
|
|
213
|
+
"type": "string",
|
|
214
|
+
"mutable": false,
|
|
215
|
+
"complexType": {
|
|
216
|
+
"original": "string",
|
|
217
|
+
"resolved": "string",
|
|
218
|
+
"references": {}
|
|
219
|
+
},
|
|
220
|
+
"required": false,
|
|
221
|
+
"optional": false,
|
|
222
|
+
"docs": {
|
|
223
|
+
"tags": [],
|
|
224
|
+
"text": "Currently selected language."
|
|
225
|
+
},
|
|
226
|
+
"attribute": "language",
|
|
227
|
+
"reflect": true
|
|
228
|
+
},
|
|
229
|
+
"emitValue": {
|
|
230
|
+
"type": "boolean",
|
|
231
|
+
"mutable": false,
|
|
232
|
+
"complexType": {
|
|
233
|
+
"original": "boolean",
|
|
234
|
+
"resolved": "boolean",
|
|
235
|
+
"references": {}
|
|
236
|
+
},
|
|
237
|
+
"required": false,
|
|
238
|
+
"optional": false,
|
|
239
|
+
"docs": {
|
|
240
|
+
"tags": [],
|
|
241
|
+
"text": "State passed down from the parent element. Will trigger the input to send it's value through an event."
|
|
242
|
+
},
|
|
243
|
+
"attribute": "emit-value",
|
|
244
|
+
"reflect": true
|
|
245
|
+
},
|
|
246
|
+
"clientStyling": {
|
|
247
|
+
"type": "string",
|
|
248
|
+
"mutable": false,
|
|
249
|
+
"complexType": {
|
|
250
|
+
"original": "string",
|
|
251
|
+
"resolved": "string",
|
|
252
|
+
"references": {}
|
|
253
|
+
},
|
|
254
|
+
"required": false,
|
|
255
|
+
"optional": false,
|
|
256
|
+
"docs": {
|
|
257
|
+
"tags": [],
|
|
258
|
+
"text": "Client custom styling via inline style"
|
|
259
|
+
},
|
|
260
|
+
"attribute": "client-styling",
|
|
261
|
+
"reflect": true,
|
|
262
|
+
"defaultValue": "''"
|
|
263
|
+
}
|
|
264
|
+
};
|
|
265
|
+
}
|
|
266
|
+
static get states() {
|
|
267
|
+
return {
|
|
268
|
+
"errorMessage": {},
|
|
269
|
+
"isValid": {},
|
|
270
|
+
"limitStylingAppends": {},
|
|
271
|
+
"showTooltip": {}
|
|
272
|
+
};
|
|
273
|
+
}
|
|
274
|
+
static get events() {
|
|
275
|
+
return [{
|
|
276
|
+
"method": "sendValidityState",
|
|
277
|
+
"name": "sendValidityState",
|
|
278
|
+
"bubbles": true,
|
|
279
|
+
"cancelable": true,
|
|
280
|
+
"composed": true,
|
|
281
|
+
"docs": {
|
|
282
|
+
"tags": [],
|
|
283
|
+
"text": ""
|
|
284
|
+
},
|
|
285
|
+
"complexType": {
|
|
286
|
+
"original": "InputStateEvent",
|
|
287
|
+
"resolved": "InputStateEvent",
|
|
288
|
+
"references": {
|
|
289
|
+
"InputStateEvent": {
|
|
290
|
+
"location": "import",
|
|
291
|
+
"path": "../../utils/types",
|
|
292
|
+
"id": "../../../../packages/stencil/general-input/src/utils/types.ts::InputStateEvent"
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
}, {
|
|
297
|
+
"method": "sendInputValue",
|
|
298
|
+
"name": "sendInputValue",
|
|
299
|
+
"bubbles": true,
|
|
300
|
+
"cancelable": true,
|
|
301
|
+
"composed": true,
|
|
302
|
+
"docs": {
|
|
303
|
+
"tags": [],
|
|
304
|
+
"text": ""
|
|
305
|
+
},
|
|
306
|
+
"complexType": {
|
|
307
|
+
"original": "InputValueEvent",
|
|
308
|
+
"resolved": "InputValueEvent",
|
|
309
|
+
"references": {
|
|
310
|
+
"InputValueEvent": {
|
|
311
|
+
"location": "import",
|
|
312
|
+
"path": "../../utils/types",
|
|
313
|
+
"id": "../../../../packages/stencil/general-input/src/utils/types.ts::InputValueEvent"
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
}];
|
|
318
|
+
}
|
|
319
|
+
static get watchers() {
|
|
320
|
+
return [{
|
|
321
|
+
"propName": "isValid",
|
|
322
|
+
"methodName": "validityChanged"
|
|
323
|
+
}, {
|
|
324
|
+
"propName": "emitValue",
|
|
325
|
+
"methodName": "emitValueHandler"
|
|
326
|
+
}];
|
|
327
|
+
}
|
|
328
|
+
static get listeners() {
|
|
329
|
+
return [{
|
|
330
|
+
"name": "click",
|
|
331
|
+
"method": "handleClickOutside",
|
|
332
|
+
"target": "document",
|
|
333
|
+
"capture": false,
|
|
334
|
+
"passive": false
|
|
335
|
+
}];
|
|
336
|
+
}
|
|
327
337
|
}
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
position: relative;
|
|
48
48
|
}
|
|
49
49
|
.date__input[focused]::part(input-field) {
|
|
50
|
-
border:
|
|
50
|
+
border-color: var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C));
|
|
51
51
|
}
|
|
52
52
|
.date__input[invalid]::part(input-field) {
|
|
53
53
|
border: 1px solid var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909));
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
position: absolute;
|
|
77
77
|
top: calc(100% + 5px);
|
|
78
78
|
left: 0;
|
|
79
|
-
color:
|
|
79
|
+
color: rgba(204, 0, 0, 0.7019607843);
|
|
80
80
|
}
|
|
81
81
|
.date__tooltip-icon {
|
|
82
82
|
position: absolute;
|