@descope/web-components-ui 1.0.377 → 1.0.379
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/index.cjs.js +3169 -1262
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.esm.js +4737 -2827
- package/dist/index.esm.js.map +1 -1
- package/dist/umd/1224.js +1 -1
- package/dist/umd/1438.js +3 -3
- package/dist/umd/1612.js +1 -1
- package/dist/umd/2773.js +4 -4
- package/dist/umd/3830.js +1 -1
- package/dist/umd/3951.js +1 -1
- package/dist/umd/3966.js +319 -0
- package/dist/umd/4024.js +1 -1
- package/dist/umd/4052.js +1 -1
- package/dist/umd/4392.js +1 -1
- package/dist/umd/4525.js +1 -1
- package/dist/umd/4978.js +1 -1
- package/dist/umd/5135.js +2 -2
- package/dist/umd/5517.js +1 -1
- package/dist/umd/5778.js +275 -0
- package/dist/umd/5806.js +1 -1
- package/dist/umd/5977.js +140 -0
- package/dist/umd/5977.js.LICENSE.txt +29 -0
- package/dist/umd/63.js +4 -4
- package/dist/umd/6770.js +1 -1
- package/dist/umd/7056.js +3 -3
- package/dist/umd/7284.js +1 -1
- package/dist/umd/7541.js +449 -0
- package/dist/umd/7541.js.LICENSE.txt +17 -0
- package/dist/umd/7911.js +2 -2
- package/dist/umd/{4028.js → 8060.js} +3 -3
- package/dist/umd/8137.js +1 -1
- package/dist/umd/8191.js +2 -2
- package/dist/umd/8655.js +123 -0
- package/dist/umd/9314.js +2 -2
- package/dist/umd/9423.js +6 -6
- package/dist/umd/9562.js +1 -1
- package/dist/umd/DescopeDev.js +1 -1
- package/dist/umd/descope-apps-list-index-js.js +1 -1
- package/dist/umd/descope-avatar-index-js.js +1 -1
- package/dist/umd/descope-button-index-js.js +1 -1
- package/dist/umd/descope-combo-box-index-js.js +5 -5
- package/dist/umd/descope-date-field-descope-calendar-index-js.js +1 -0
- package/dist/umd/descope-date-field-index-js.js +1 -0
- package/dist/umd/descope-email-field-index-js.js +1 -1
- package/dist/umd/descope-enriched-text-index-js.js +1 -1
- package/dist/umd/descope-grid-descope-grid-custom-column-index-js.js +2 -2
- package/dist/umd/descope-grid-descope-grid-item-details-column-index-js.js +2 -2
- package/dist/umd/descope-grid-descope-grid-selection-column-index-js.js +1 -1
- package/dist/umd/descope-grid-descope-grid-text-column-index-js.js +4 -4
- package/dist/umd/descope-new-password-index-js.js +1 -1
- package/dist/umd/descope-number-field-index-js.js +1 -1
- package/dist/umd/descope-passcode-index-js.js +1 -1
- package/dist/umd/descope-radio-group-index-js.js +1 -1
- package/dist/umd/descope-text-field-index-js.js +1 -1
- package/dist/umd/index.js +1 -1
- package/dist/umd/mapping-fields-descope-mappings-field-index-js.js +1 -1
- package/dist/umd/phone-fields-descope-phone-field-descope-phone-field-internal-index-js.js +1 -1
- package/dist/umd/phone-fields-descope-phone-field-index-js.js +1 -1
- package/dist/umd/phone-fields-descope-phone-input-box-field-descope-phone-input-box-internal-index-js.js +1 -1
- package/dist/umd/phone-fields-descope-phone-input-box-field-index-js.js +1 -1
- package/package.json +11 -5
- package/src/components/descope-combo-box/ComboBoxClass.js +7 -1
- package/src/components/descope-date-field/DateCounterClass.js +83 -0
- package/src/components/descope-date-field/DateFieldClass.js +675 -0
- package/src/components/descope-date-field/consts.js +55 -0
- package/src/components/descope-date-field/descope-calendar/CalendarClass.js +666 -0
- package/src/components/descope-date-field/descope-calendar/helpers.js +186 -0
- package/src/components/descope-date-field/descope-calendar/index.js +9 -0
- package/src/components/descope-date-field/formats.js +49 -0
- package/src/components/descope-date-field/helpers.js +72 -0
- package/src/components/descope-date-field/icons.js +14 -0
- package/src/components/descope-date-field/index.js +10 -0
- package/src/components/descope-enriched-text/EnrichedTextClass.js +3 -5
- package/src/components/descope-text-field/textFieldMappings.js +2 -0
- package/src/index.cjs.js +2 -0
- package/src/index.d.ts +2 -0
- package/src/index.js +2 -1
- package/src/mixins/inputValidationMixin.js +8 -2
- package/src/mixins/portalMixin.js +6 -3
- package/src/theme/components/calendar.js +94 -0
- package/src/theme/components/dateField.js +63 -0
- package/src/theme/components/index.js +4 -0
- package/src/theme/components/inputWrapper.js +6 -0
- package/src/theme/components/textField.js +1 -0
- package/dist/umd/4746.js +0 -124
- package/dist/umd/7531.js +0 -319
- package/dist/umd/8866.js +0 -275
- package/dist/umd/9092.js +0 -1086
- package/dist/umd/9092.js.LICENSE.txt +0 -27
- package/dist/umd/descope-date-picker-index-js.js +0 -1
- package/src/components/descope-date-picker/index.js +0 -20
- /package/dist/umd/{7531.js.LICENSE.txt → 3966.js.LICENSE.txt} +0 -0
- /package/dist/umd/{8866.js.LICENSE.txt → 5778.js.LICENSE.txt} +0 -0
- /package/dist/umd/{4028.js.LICENSE.txt → 8060.js.LICENSE.txt} +0 -0
- /package/dist/umd/{4746.js.LICENSE.txt → 8655.js.LICENSE.txt} +0 -0
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@descope/web-components-ui",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.379",
|
4
4
|
"description": "",
|
5
5
|
"main": "dist/cjs/index.cjs.js",
|
6
6
|
"module": "dist/index.esm.js",
|
@@ -72,6 +72,7 @@
|
|
72
72
|
"husky": "^9.0.0",
|
73
73
|
"jest": "^29.5.0",
|
74
74
|
"jest-environment-jsdom": "^29.5.0",
|
75
|
+
"lint-staged": "^15.0.0",
|
75
76
|
"patch-package": "^8.0.0",
|
76
77
|
"prettier": "^3.0.2",
|
77
78
|
"rollup": "^3.21.4",
|
@@ -88,7 +89,6 @@
|
|
88
89
|
"@vaadin/checkbox": "24.3.4",
|
89
90
|
"@vaadin/combo-box": "24.3.4",
|
90
91
|
"@vaadin/custom-field": "24.3.4",
|
91
|
-
"@vaadin/date-picker": "24.3.4",
|
92
92
|
"@vaadin/dialog": "24.3.4",
|
93
93
|
"@vaadin/email-field": "24.3.4",
|
94
94
|
"@vaadin/grid": "24.3.4",
|
@@ -98,6 +98,7 @@
|
|
98
98
|
"@vaadin/notification": "24.3.4",
|
99
99
|
"@vaadin/number-field": "24.3.4",
|
100
100
|
"@vaadin/password-field": "24.3.4",
|
101
|
+
"@vaadin/popover": "24.5.0",
|
101
102
|
"@vaadin/radio-group": "24.3.4",
|
102
103
|
"@vaadin/text-area": "24.3.4",
|
103
104
|
"@vaadin/text-field": "24.3.4",
|
@@ -106,7 +107,6 @@
|
|
106
107
|
"element-internals-polyfill": "^1.3.9",
|
107
108
|
"highlight.js": "^11.9.0",
|
108
109
|
"libphonenumber-js": "^1.11.12",
|
109
|
-
"lint-staged": "^15.0.0",
|
110
110
|
"lodash.debounce": "4.0.8",
|
111
111
|
"lodash.merge": "4.6.2",
|
112
112
|
"markdown-it": "14.1.0"
|
@@ -117,7 +117,6 @@
|
|
117
117
|
"@vaadin/checkbox": "24.3.4",
|
118
118
|
"@vaadin/combo-box": "24.3.4",
|
119
119
|
"@vaadin/custom-field": "24.3.4",
|
120
|
-
"@vaadin/date-picker": "24.3.4",
|
121
120
|
"@vaadin/dialog": "24.3.4",
|
122
121
|
"@vaadin/email-field": "24.3.4",
|
123
122
|
"@vaadin/grid": "24.3.4",
|
@@ -126,9 +125,16 @@
|
|
126
125
|
"@vaadin/multi-select-combo-box": "24.3.4",
|
127
126
|
"@vaadin/notification": "24.3.4",
|
128
127
|
"@vaadin/number-field": "24.3.4",
|
128
|
+
"@vaadin/component-base": "24.3.4",
|
129
129
|
"@vaadin/password-field": "24.3.4",
|
130
130
|
"@vaadin/text-area": "24.3.4",
|
131
|
-
"@vaadin/text-field": "24.3.4"
|
131
|
+
"@vaadin/text-field": "24.3.4",
|
132
|
+
"@vaadin/overlay": "24.3.4",
|
133
|
+
"@vaadin/vaadin-lumo-styles": "24.3.4",
|
134
|
+
"@vaadin/vaadin-material-styles": "24.3.4",
|
135
|
+
"@vaadin/vaadin-themable-mixin": "24.3.4",
|
136
|
+
"@vaadin/a11y-base": "24.3.4",
|
137
|
+
"@vaadin/tooltip": "24.3.4"
|
132
138
|
},
|
133
139
|
"vaadin": {
|
134
140
|
"disableUsageStatistics": true
|
@@ -268,7 +268,13 @@ const ComboBoxMixin = (superclass) =>
|
|
268
268
|
}
|
269
269
|
|
270
270
|
get value() {
|
271
|
-
return this.baseElement.selectedItem?.['data-id'] ||
|
271
|
+
return this.baseElement.selectedItem?.['data-id'] || this.allowCustomValue
|
272
|
+
? this.baseElement.__data.value || ''
|
273
|
+
: '';
|
274
|
+
}
|
275
|
+
|
276
|
+
get allowCustomValue() {
|
277
|
+
return this.getAttribute('allow-custom-value') === 'true';
|
272
278
|
}
|
273
279
|
};
|
274
280
|
|
@@ -0,0 +1,83 @@
|
|
1
|
+
// DateCounterClass allows us to add several counters to the input, and use them seperately.
|
2
|
+
// For examele, we have a DayCounter, MonthCounter and YearCounter, which can each separately navigate
|
3
|
+
// between different ranges.
|
4
|
+
export class DateCounter {
|
5
|
+
constructor({ id, min, max, placeholder }) {
|
6
|
+
this.id = id;
|
7
|
+
this.data = [];
|
8
|
+
this.min = min;
|
9
|
+
this.max = max;
|
10
|
+
this.placeholder = placeholder;
|
11
|
+
}
|
12
|
+
|
13
|
+
get #initialNumValue() {
|
14
|
+
return this.data.length ? this.numberValue : 0;
|
15
|
+
}
|
16
|
+
|
17
|
+
get numberValue() {
|
18
|
+
return Number(this.stringValue);
|
19
|
+
}
|
20
|
+
|
21
|
+
get stringValue() {
|
22
|
+
return (this.data.join('') || this.placeholder).padStart(this.length, '0');
|
23
|
+
}
|
24
|
+
|
25
|
+
get isFull() {
|
26
|
+
return this.numberValue * 10 > this.max || this.data.length === this.length;
|
27
|
+
}
|
28
|
+
|
29
|
+
get isEmpty() {
|
30
|
+
return this.stringValue === this.placeholder;
|
31
|
+
}
|
32
|
+
|
33
|
+
get length() {
|
34
|
+
return this.max.toString().length;
|
35
|
+
}
|
36
|
+
|
37
|
+
set(val) {
|
38
|
+
this.data = val.toString().split('');
|
39
|
+
}
|
40
|
+
|
41
|
+
add(num) {
|
42
|
+
this.data.push(num);
|
43
|
+
|
44
|
+
if (this.numberValue > this.max) {
|
45
|
+
this.data.length = 0;
|
46
|
+
this.data.push(num);
|
47
|
+
} else if (this.length < this.data.length) {
|
48
|
+
this.data.shift();
|
49
|
+
}
|
50
|
+
|
51
|
+
return num;
|
52
|
+
}
|
53
|
+
|
54
|
+
del() {
|
55
|
+
if (!this.data.filter((d) => d !== '0').filter(Boolean).length) {
|
56
|
+
this.data.length = 0;
|
57
|
+
} else {
|
58
|
+
this.data.pop();
|
59
|
+
}
|
60
|
+
}
|
61
|
+
|
62
|
+
clear() {
|
63
|
+
this.data = [];
|
64
|
+
}
|
65
|
+
|
66
|
+
inc(gap) {
|
67
|
+
this.replaceValue(this.#initialNumValue + (gap || 1));
|
68
|
+
}
|
69
|
+
|
70
|
+
dec(gap) {
|
71
|
+
this.replaceValue(this.#initialNumValue - (gap || 1));
|
72
|
+
}
|
73
|
+
|
74
|
+
isInRange(val) {
|
75
|
+
return val >= this.min && val <= this.max;
|
76
|
+
}
|
77
|
+
|
78
|
+
replaceValue(val) {
|
79
|
+
if (this.isInRange(val)) {
|
80
|
+
this.data = val.toString().padStart(this.length, 0).split('');
|
81
|
+
}
|
82
|
+
}
|
83
|
+
}
|