@vonage/vivid 3.51.0 → 3.52.0
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/alert/index.cjs +1 -1
- package/alert/index.js +1 -1
- package/appearance-ui/index.cjs +19 -11
- package/appearance-ui/index.js +19 -11
- package/audio-player/index.cjs +2 -1
- package/audio-player/index.js +2 -1
- package/card/index.cjs +1 -1
- package/card/index.js +1 -1
- package/combobox/index.cjs +2 -5
- package/combobox/index.js +2 -5
- package/custom-elements.json +1357 -529
- package/date-picker/index.cjs +3 -6
- package/date-picker/index.js +3 -6
- package/date-range-picker/index.cjs +2 -5
- package/date-range-picker/index.js +2 -5
- package/dialog/index.cjs +1 -1
- package/dialog/index.js +1 -1
- package/elevation/index.cjs +1 -1
- package/elevation/index.js +1 -1
- package/file-picker/index.cjs +0 -2
- package/file-picker/index.js +0 -2
- package/header/index.cjs +1 -1
- package/header/index.js +1 -1
- package/index.cjs +60 -58
- package/index.js +22 -23
- package/lib/avatar/definition.d.ts +1 -1
- package/lib/button/button.d.ts +1 -0
- package/lib/button/definition.d.ts +1 -1
- package/lib/calendar-event/definition.d.ts +1 -1
- package/lib/components.d.ts +1 -0
- package/lib/layout/definition.d.ts +1 -1
- package/lib/menu-item/menu-item.d.ts +3 -0
- package/lib/range-slider/definition.d.ts +3 -0
- package/lib/range-slider/locale.d.ts +4 -0
- package/lib/range-slider/range-slider.d.ts +32 -0
- package/lib/range-slider/range-slider.form-associated.d.ts +10 -0
- package/lib/range-slider/range-slider.template.d.ts +4 -0
- package/lib/range-slider/utils/lerp.d.ts +2 -0
- package/lib/range-slider/utils/roundToStepValue.d.ts +1 -0
- package/lib/slider/slider.template.d.ts +1 -0
- package/lib/split-button/definition.d.ts +1 -1
- package/listbox/index.cjs +23 -22
- package/listbox/index.js +23 -22
- package/locales/en-GB.cjs +4 -0
- package/locales/en-GB.js +4 -0
- package/locales/en-US.cjs +4 -0
- package/locales/en-US.js +4 -0
- package/locales/ja-JP.cjs +5 -1
- package/locales/ja-JP.js +5 -1
- package/locales/zh-CN.cjs +4 -0
- package/locales/zh-CN.js +4 -0
- package/menu/index.cjs +3 -3
- package/menu/index.js +3 -3
- package/menu-item/index.cjs +2 -2
- package/menu-item/index.js +2 -2
- package/number-field/index.cjs +0 -2
- package/number-field/index.js +0 -2
- package/package.json +34 -34
- package/popup/index.cjs +2 -2
- package/popup/index.js +2 -2
- package/range-slider/index.cjs +22 -0
- package/range-slider/index.js +20 -0
- package/select/index.cjs +3 -3
- package/select/index.js +3 -3
- package/selectable-box/index.cjs +1 -1
- package/selectable-box/index.js +1 -1
- package/shared/Reflector.cjs +5 -1
- package/shared/Reflector.js +5 -1
- package/shared/affix.cjs +11 -4
- package/shared/affix.js +12 -4
- package/shared/anchored.cjs +8 -2
- package/shared/anchored.js +8 -2
- package/shared/definition.cjs +8 -3
- package/shared/definition.js +8 -3
- package/shared/definition10.cjs +5 -5
- package/shared/definition10.js +5 -5
- package/shared/definition11.cjs +75 -47
- package/shared/definition11.js +76 -48
- package/shared/definition12.cjs +12 -14
- package/shared/definition12.js +12 -14
- package/shared/definition13.cjs +118 -75
- package/shared/definition13.js +118 -75
- package/shared/definition14.cjs +33 -32
- package/shared/definition14.js +33 -32
- package/shared/definition15.cjs +20 -7
- package/shared/definition15.js +20 -7
- package/shared/definition16.cjs +37 -42
- package/shared/definition16.js +36 -41
- package/shared/definition17.cjs +125 -65
- package/shared/definition17.js +126 -66
- package/shared/definition18.cjs +30 -14
- package/shared/definition18.js +30 -14
- package/shared/definition19.cjs +116 -80
- package/shared/definition19.js +116 -80
- package/shared/definition2.cjs +10 -5
- package/shared/definition2.js +10 -5
- package/shared/definition20.cjs +16 -15
- package/shared/definition20.js +16 -15
- package/shared/definition21.cjs +6 -10
- package/shared/definition21.js +6 -10
- package/shared/definition22.cjs +14 -18
- package/shared/definition22.js +14 -18
- package/shared/definition23.cjs +34 -35
- package/shared/definition23.js +34 -35
- package/shared/definition24.cjs +116 -69
- package/shared/definition24.js +116 -69
- package/shared/definition25.cjs +2 -4
- package/shared/definition25.js +2 -4
- package/shared/definition26.cjs +9 -8
- package/shared/definition26.js +9 -8
- package/shared/definition27.cjs +7 -5
- package/shared/definition27.js +7 -5
- package/shared/definition28.cjs +209 -143
- package/shared/definition28.js +209 -143
- package/shared/definition29.cjs +10 -4
- package/shared/definition29.js +10 -4
- package/shared/definition3.cjs +7 -10
- package/shared/definition3.js +7 -10
- package/shared/definition30.cjs +7 -5
- package/shared/definition30.js +7 -5
- package/shared/definition31.cjs +2 -4
- package/shared/definition31.js +2 -4
- package/shared/definition32.cjs +1 -3
- package/shared/definition32.js +1 -3
- package/shared/definition33.cjs +7 -10
- package/shared/definition33.js +7 -10
- package/shared/definition34.cjs +76 -59
- package/shared/definition34.js +76 -59
- package/shared/definition35.cjs +19 -20
- package/shared/definition35.js +19 -20
- package/shared/definition36.cjs +30 -14
- package/shared/definition36.js +30 -14
- package/shared/definition37.cjs +33 -46
- package/shared/definition37.js +33 -46
- package/shared/definition38.cjs +31 -33
- package/shared/definition38.js +31 -33
- package/shared/definition39.cjs +13 -4
- package/shared/definition39.js +13 -4
- package/shared/definition4.cjs +23 -11
- package/shared/definition4.js +23 -11
- package/shared/definition40.cjs +19 -14
- package/shared/definition40.js +19 -14
- package/shared/definition41.cjs +534 -635
- package/shared/definition41.js +534 -635
- package/shared/definition42.cjs +674 -106
- package/shared/definition42.js +673 -105
- package/shared/definition43.cjs +122 -79
- package/shared/definition43.js +120 -77
- package/shared/definition44.cjs +72 -567
- package/shared/definition44.js +71 -565
- package/shared/definition45.cjs +520 -118
- package/shared/definition45.js +518 -117
- package/shared/definition46.cjs +117 -130
- package/shared/definition46.js +116 -129
- package/shared/definition47.cjs +152 -18
- package/shared/definition47.js +151 -17
- package/shared/definition48.cjs +20 -77
- package/shared/definition48.js +19 -76
- package/shared/definition49.cjs +52 -495
- package/shared/definition49.js +51 -494
- package/shared/definition5.cjs +20 -17
- package/shared/definition5.js +20 -17
- package/shared/definition50.cjs +525 -24
- package/shared/definition50.js +524 -23
- package/shared/definition51.cjs +28 -119
- package/shared/definition51.js +26 -118
- package/shared/definition52.cjs +113 -266
- package/shared/definition52.js +113 -265
- package/shared/definition53.cjs +285 -245
- package/shared/definition53.js +285 -245
- package/shared/definition54.cjs +285 -751
- package/shared/definition54.js +284 -750
- package/shared/definition55.cjs +828 -99
- package/shared/definition55.js +827 -98
- package/shared/definition56.cjs +126 -77
- package/shared/definition56.js +125 -76
- package/shared/definition57.cjs +125 -71
- package/shared/definition57.js +124 -70
- package/shared/definition58.cjs +73 -287
- package/shared/definition58.js +74 -288
- package/shared/definition59.cjs +298 -40
- package/shared/definition59.js +297 -39
- package/shared/definition6.cjs +3 -4
- package/shared/definition6.js +3 -4
- package/shared/definition60.cjs +24 -1784
- package/shared/definition60.js +23 -1783
- package/shared/definition61.cjs +1819 -11
- package/shared/definition61.js +1818 -11
- package/shared/definition7.cjs +6 -4
- package/shared/definition7.js +6 -4
- package/shared/definition8.cjs +25 -18
- package/shared/definition8.js +25 -18
- package/shared/definition9.cjs +6 -9
- package/shared/definition9.js +6 -9
- package/shared/icon.cjs +7 -2
- package/shared/icon.js +7 -2
- package/shared/index2.cjs +1 -1
- package/shared/index2.js +1 -1
- package/shared/key-codes2.cjs +8 -0
- package/shared/key-codes2.js +5 -1
- package/shared/localization/Locale.d.ts +2 -0
- package/shared/patterns/index.d.ts +0 -1
- package/shared/presentationDate.cjs +126 -78
- package/shared/presentationDate.js +126 -78
- package/shared/slider.template.cjs +71 -0
- package/shared/slider.template.js +67 -0
- package/shared/text-anchor.template.cjs +30 -35
- package/shared/text-anchor.template.js +30 -35
- package/shared/text-field.cjs +1 -1
- package/shared/text-field.js +1 -1
- package/side-drawer/index.cjs +1 -1
- package/side-drawer/index.js +1 -1
- package/slider/index.cjs +2 -1
- package/slider/index.js +2 -1
- package/split-button/index.cjs +1 -1
- package/split-button/index.js +1 -1
- package/styles/core/all.css +1 -1
- package/styles/core/theme.css +1 -1
- package/styles/core/typography.css +1 -1
- package/styles/fonts/spezia-variable.css +39 -13
- package/styles/tokens/theme-dark.css +4 -4
- package/styles/tokens/theme-light.css +4 -4
- package/styles/tokens/vivid-2-compat.css +4 -2
- package/switch/index.cjs +1 -1
- package/switch/index.js +1 -1
- package/tab/index.cjs +1 -1
- package/tab/index.js +1 -1
- package/tab-panel/index.cjs +1 -1
- package/tab-panel/index.js +1 -1
- package/tabs/index.cjs +3 -3
- package/tabs/index.js +3 -3
- package/tag/index.cjs +1 -1
- package/tag/index.js +1 -1
- package/tag-group/index.cjs +1 -1
- package/tag-group/index.js +1 -1
- package/text-area/index.cjs +1 -1
- package/text-area/index.js +1 -1
- package/text-field/index.cjs +1 -4
- package/text-field/index.js +1 -4
- package/time-picker/index.cjs +4 -7
- package/time-picker/index.js +4 -7
- package/toggletip/index.cjs +3 -3
- package/toggletip/index.js +3 -3
- package/tooltip/index.cjs +3 -3
- package/tooltip/index.js +3 -3
- package/tree-item/index.cjs +1 -1
- package/tree-item/index.js +1 -1
- package/tree-view/index.cjs +1 -1
- package/tree-view/index.js +1 -1
- package/vivid.api.json +117 -1
- package/focus/index.cjs +0 -7
- package/focus/index.js +0 -5
- package/lib/focus/definition.d.ts +0 -3
- package/lib/focus/focus.d.ts +0 -3
- package/lib/focus/focus.template.d.ts +0 -4
- package/lib/popup/popup.d.ts +0 -21
- package/shared/focus.cjs +0 -8
- package/shared/focus.js +0 -6
- package/shared/focus2.cjs +0 -11
- package/shared/focus2.js +0 -9
- package/shared/patterns/focus.d.ts +0 -3
package/shared/definition19.cjs
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
const index = require('./index.cjs');
|
|
4
4
|
const definition = require('./definition11.cjs');
|
|
5
|
-
const definition$1 = require('./
|
|
6
|
-
const definition$2 = require('./
|
|
5
|
+
const definition$1 = require('./definition61.cjs');
|
|
6
|
+
const definition$2 = require('./definition54.cjs');
|
|
7
7
|
const definition$3 = require('./definition21.cjs');
|
|
8
8
|
const presentationDate = require('./presentationDate.cjs');
|
|
9
9
|
require('./affix.cjs');
|
|
@@ -13,14 +13,19 @@ const formatRange = (from, to) => {
|
|
|
13
13
|
return `${from} – ${to}`;
|
|
14
14
|
};
|
|
15
15
|
const formatPresentationDateRange = (dateRange, locale) => {
|
|
16
|
-
return formatRange(
|
|
16
|
+
return formatRange(
|
|
17
|
+
presentationDate.formatPresentationDate(dateRange.start, locale),
|
|
18
|
+
presentationDate.formatPresentationDate(dateRange.end, locale)
|
|
19
|
+
);
|
|
17
20
|
};
|
|
18
21
|
const parsePresentationDateRange = (presentationDateRange, locale) => {
|
|
19
22
|
const fragments = presentationDateRange.trim().split(/[\s—–-]+/);
|
|
20
23
|
if (fragments.length !== 2) {
|
|
21
24
|
throw new Error(`Invalid date range: ${presentationDateRange}`);
|
|
22
25
|
}
|
|
23
|
-
const [start, end] = fragments.map(
|
|
26
|
+
const [start, end] = fragments.map(
|
|
27
|
+
(fragment) => presentationDate.parsePresentationDate(fragment, locale)
|
|
28
|
+
);
|
|
24
29
|
return { start, end };
|
|
25
30
|
};
|
|
26
31
|
|
|
@@ -35,6 +40,29 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
35
40
|
__defProp(target, key, result);
|
|
36
41
|
return result;
|
|
37
42
|
};
|
|
43
|
+
var __accessCheck = (obj, member, msg) => {
|
|
44
|
+
if (!member.has(obj))
|
|
45
|
+
throw TypeError("Cannot " + msg);
|
|
46
|
+
};
|
|
47
|
+
var __privateGet = (obj, member, getter) => {
|
|
48
|
+
__accessCheck(obj, member, "read from private field");
|
|
49
|
+
return getter ? getter.call(obj) : member.get(obj);
|
|
50
|
+
};
|
|
51
|
+
var __privateAdd = (obj, member, value) => {
|
|
52
|
+
if (member.has(obj))
|
|
53
|
+
throw TypeError("Cannot add the same private member more than once");
|
|
54
|
+
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
55
|
+
};
|
|
56
|
+
var __privateSet = (obj, member, value, setter) => {
|
|
57
|
+
__accessCheck(obj, member, "write to private field");
|
|
58
|
+
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
59
|
+
return value;
|
|
60
|
+
};
|
|
61
|
+
var __privateMethod = (obj, member, method) => {
|
|
62
|
+
__accessCheck(obj, member, "access private method");
|
|
63
|
+
return method;
|
|
64
|
+
};
|
|
65
|
+
var _isInternalValueUpdate, _updateValues, updateValues_fn, _handleChangedValues, handleChangedValues_fn, _updateFormValue, updateFormValue_fn, _getVisibleRange, getVisibleRange_fn;
|
|
38
66
|
const isFormAssociatedTryingToSetFormValue = (value) => typeof value === "string";
|
|
39
67
|
function isDefined(value) {
|
|
40
68
|
return !!value;
|
|
@@ -42,9 +70,13 @@ function isDefined(value) {
|
|
|
42
70
|
let DateRangePicker = class extends presentationDate.DatePickerBase {
|
|
43
71
|
constructor() {
|
|
44
72
|
super(...arguments);
|
|
73
|
+
__privateAdd(this, _updateValues);
|
|
74
|
+
__privateAdd(this, _handleChangedValues);
|
|
75
|
+
__privateAdd(this, _updateFormValue);
|
|
76
|
+
__privateAdd(this, _getVisibleRange);
|
|
45
77
|
this.initialStart = "";
|
|
46
78
|
this.initialEnd = "";
|
|
47
|
-
this
|
|
79
|
+
__privateAdd(this, _isInternalValueUpdate, false);
|
|
48
80
|
this.start = "";
|
|
49
81
|
this.end = "";
|
|
50
82
|
this.setFormValue = (value, state) => {
|
|
@@ -81,7 +113,6 @@ let DateRangePicker = class extends presentationDate.DatePickerBase {
|
|
|
81
113
|
this.dirtyValue = false;
|
|
82
114
|
}
|
|
83
115
|
}
|
|
84
|
-
#isInternalValueUpdate;
|
|
85
116
|
/**
|
|
86
117
|
* @internal
|
|
87
118
|
*/
|
|
@@ -92,8 +123,8 @@ let DateRangePicker = class extends presentationDate.DatePickerBase {
|
|
|
92
123
|
}
|
|
93
124
|
this.currentStart = this.start;
|
|
94
125
|
this.dirtyValue = true;
|
|
95
|
-
if (!this
|
|
96
|
-
this
|
|
126
|
+
if (!__privateGet(this, _isInternalValueUpdate)) {
|
|
127
|
+
__privateMethod(this, _handleChangedValues, handleChangedValues_fn).call(this);
|
|
97
128
|
}
|
|
98
129
|
}
|
|
99
130
|
/**
|
|
@@ -106,8 +137,8 @@ let DateRangePicker = class extends presentationDate.DatePickerBase {
|
|
|
106
137
|
}
|
|
107
138
|
this.currentEnd = this.end;
|
|
108
139
|
this.dirtyValue = true;
|
|
109
|
-
if (!this
|
|
110
|
-
this
|
|
140
|
+
if (!__privateGet(this, _isInternalValueUpdate)) {
|
|
141
|
+
__privateMethod(this, _handleChangedValues, handleChangedValues_fn).call(this);
|
|
111
142
|
}
|
|
112
143
|
}
|
|
113
144
|
/**
|
|
@@ -122,61 +153,12 @@ let DateRangePicker = class extends presentationDate.DatePickerBase {
|
|
|
122
153
|
currentEndChanged() {
|
|
123
154
|
this.end = this.currentEnd;
|
|
124
155
|
}
|
|
125
|
-
#updateValues(range) {
|
|
126
|
-
this.#isInternalValueUpdate = true;
|
|
127
|
-
if (range.start !== void 0) {
|
|
128
|
-
this.start = range.start;
|
|
129
|
-
this.$emit("input:start");
|
|
130
|
-
}
|
|
131
|
-
if (range.end !== void 0) {
|
|
132
|
-
this.end = range.end;
|
|
133
|
-
this.$emit("input:end");
|
|
134
|
-
}
|
|
135
|
-
this.#isInternalValueUpdate = false;
|
|
136
|
-
this.$emit("input");
|
|
137
|
-
this.$emit("change");
|
|
138
|
-
this.#handleChangedValues();
|
|
139
|
-
}
|
|
140
|
-
#handleChangedValues() {
|
|
141
|
-
if (this.start && this.end) {
|
|
142
|
-
if (presentationDate.compareDateStr(this.start, this.end) > 0) {
|
|
143
|
-
this.#updateValues({ start: this.end, end: this.start });
|
|
144
|
-
return;
|
|
145
|
-
}
|
|
146
|
-
this._presentationValue = formatPresentationDateRange(
|
|
147
|
-
{
|
|
148
|
-
start: this.start,
|
|
149
|
-
end: this.end
|
|
150
|
-
},
|
|
151
|
-
this.locale.datePicker
|
|
152
|
-
);
|
|
153
|
-
this.value = formatRange(this.start, this.end);
|
|
154
|
-
} else {
|
|
155
|
-
this.value = "";
|
|
156
|
-
this._presentationValue = "";
|
|
157
|
-
}
|
|
158
|
-
const dateToEnsureVisibilityOf = this.start || this.end;
|
|
159
|
-
if (dateToEnsureVisibilityOf) {
|
|
160
|
-
this._adjustSelectedMonthToEnsureVisibilityOf(dateToEnsureVisibilityOf);
|
|
161
|
-
}
|
|
162
|
-
this.#updateFormValue();
|
|
163
|
-
}
|
|
164
156
|
/**
|
|
165
157
|
* @internal
|
|
166
158
|
*/
|
|
167
159
|
nameChanged(previous, next) {
|
|
168
160
|
super.nameChanged(previous, next);
|
|
169
|
-
this
|
|
170
|
-
}
|
|
171
|
-
#updateFormValue() {
|
|
172
|
-
if (!this.name || !this.start || !this.end) {
|
|
173
|
-
this.setFormValue(null);
|
|
174
|
-
} else {
|
|
175
|
-
const formData = new FormData();
|
|
176
|
-
formData.append(this.name, this.start);
|
|
177
|
-
formData.append(this.name, this.end);
|
|
178
|
-
this.setFormValue(formData);
|
|
179
|
-
}
|
|
161
|
+
__privateMethod(this, _updateFormValue, updateFormValue_fn).call(this);
|
|
180
162
|
}
|
|
181
163
|
connectedCallback() {
|
|
182
164
|
super.connectedCallback();
|
|
@@ -187,15 +169,6 @@ let DateRangePicker = class extends presentationDate.DatePickerBase {
|
|
|
187
169
|
this.end = this.initialEnd;
|
|
188
170
|
}
|
|
189
171
|
}
|
|
190
|
-
#getVisibleRange() {
|
|
191
|
-
const candidates = [this.start, this.end].filter(isDefined);
|
|
192
|
-
const isPartialRange = candidates.length === 1;
|
|
193
|
-
if (this._hoverDate && isPartialRange) {
|
|
194
|
-
candidates.push(this._hoverDate);
|
|
195
|
-
}
|
|
196
|
-
const [start, end] = candidates.sort(presentationDate.compareDateStr);
|
|
197
|
-
return { start, end };
|
|
198
|
-
}
|
|
199
172
|
/**
|
|
200
173
|
* @internal
|
|
201
174
|
*/
|
|
@@ -206,7 +179,7 @@ let DateRangePicker = class extends presentationDate.DatePickerBase {
|
|
|
206
179
|
* @internal
|
|
207
180
|
*/
|
|
208
181
|
_isDateInSelectedRange(date) {
|
|
209
|
-
const { start, end } = this
|
|
182
|
+
const { start, end } = __privateMethod(this, _getVisibleRange, getVisibleRange_fn).call(this);
|
|
210
183
|
if (start && end) {
|
|
211
184
|
return presentationDate.compareDateStr(date, start) >= 0 && presentationDate.compareDateStr(date, end) <= 0;
|
|
212
185
|
}
|
|
@@ -216,13 +189,13 @@ let DateRangePicker = class extends presentationDate.DatePickerBase {
|
|
|
216
189
|
* @internal
|
|
217
190
|
*/
|
|
218
191
|
_isDateRangeStart(date) {
|
|
219
|
-
return date === this
|
|
192
|
+
return date === __privateMethod(this, _getVisibleRange, getVisibleRange_fn).call(this).start;
|
|
220
193
|
}
|
|
221
194
|
/**
|
|
222
195
|
* @internal
|
|
223
196
|
*/
|
|
224
197
|
_isDateRangeEnd(date) {
|
|
225
|
-
return date === this
|
|
198
|
+
return date === __privateMethod(this, _getVisibleRange, getVisibleRange_fn).call(this).end;
|
|
226
199
|
}
|
|
227
200
|
/**
|
|
228
201
|
* @internal
|
|
@@ -242,15 +215,15 @@ let DateRangePicker = class extends presentationDate.DatePickerBase {
|
|
|
242
215
|
*/
|
|
243
216
|
_onDateClick(date) {
|
|
244
217
|
if (this.start && this.end) {
|
|
245
|
-
this
|
|
218
|
+
__privateMethod(this, _updateValues, updateValues_fn).call(this, { start: date, end: "" });
|
|
246
219
|
} else if (this.start) {
|
|
247
|
-
this
|
|
220
|
+
__privateMethod(this, _updateValues, updateValues_fn).call(this, { end: date });
|
|
248
221
|
this._closePopup();
|
|
249
222
|
} else if (this.end) {
|
|
250
|
-
this
|
|
223
|
+
__privateMethod(this, _updateValues, updateValues_fn).call(this, { start: date });
|
|
251
224
|
this._closePopup();
|
|
252
225
|
} else {
|
|
253
|
-
this
|
|
226
|
+
__privateMethod(this, _updateValues, updateValues_fn).call(this, { start: date });
|
|
254
227
|
}
|
|
255
228
|
}
|
|
256
229
|
/**
|
|
@@ -267,7 +240,7 @@ let DateRangePicker = class extends presentationDate.DatePickerBase {
|
|
|
267
240
|
*/
|
|
268
241
|
_onTextFieldChange() {
|
|
269
242
|
if (this._presentationValue === "") {
|
|
270
|
-
this
|
|
243
|
+
__privateMethod(this, _updateValues, updateValues_fn).call(this, { start: "", end: "" });
|
|
271
244
|
return;
|
|
272
245
|
}
|
|
273
246
|
try {
|
|
@@ -275,7 +248,7 @@ let DateRangePicker = class extends presentationDate.DatePickerBase {
|
|
|
275
248
|
this._presentationValue,
|
|
276
249
|
this.locale.datePicker
|
|
277
250
|
);
|
|
278
|
-
this
|
|
251
|
+
__privateMethod(this, _updateValues, updateValues_fn).call(this, { start, end });
|
|
279
252
|
} catch (_) {
|
|
280
253
|
return;
|
|
281
254
|
}
|
|
@@ -332,14 +305,14 @@ let DateRangePicker = class extends presentationDate.DatePickerBase {
|
|
|
332
305
|
* @internal
|
|
333
306
|
*/
|
|
334
307
|
_onClearClick() {
|
|
335
|
-
this
|
|
308
|
+
__privateMethod(this, _updateValues, updateValues_fn).call(this, { start: "", end: "" });
|
|
336
309
|
super._onClearClick();
|
|
337
310
|
}
|
|
338
311
|
/**
|
|
339
312
|
* @internal
|
|
340
313
|
*/
|
|
341
314
|
formResetCallback() {
|
|
342
|
-
this
|
|
315
|
+
__privateMethod(this, _updateValues, updateValues_fn).call(this, { start: this.initialStart, end: this.initialEnd });
|
|
343
316
|
super.formResetCallback();
|
|
344
317
|
}
|
|
345
318
|
get _calendarButtonLabel() {
|
|
@@ -358,6 +331,69 @@ let DateRangePicker = class extends presentationDate.DatePickerBase {
|
|
|
358
331
|
}
|
|
359
332
|
}
|
|
360
333
|
};
|
|
334
|
+
_isInternalValueUpdate = new WeakMap();
|
|
335
|
+
_updateValues = new WeakSet();
|
|
336
|
+
updateValues_fn = function(range) {
|
|
337
|
+
__privateSet(this, _isInternalValueUpdate, true);
|
|
338
|
+
if (range.start !== void 0) {
|
|
339
|
+
this.start = range.start;
|
|
340
|
+
this.$emit("input:start");
|
|
341
|
+
}
|
|
342
|
+
if (range.end !== void 0) {
|
|
343
|
+
this.end = range.end;
|
|
344
|
+
this.$emit("input:end");
|
|
345
|
+
}
|
|
346
|
+
__privateSet(this, _isInternalValueUpdate, false);
|
|
347
|
+
this.$emit("input");
|
|
348
|
+
this.$emit("change");
|
|
349
|
+
__privateMethod(this, _handleChangedValues, handleChangedValues_fn).call(this);
|
|
350
|
+
};
|
|
351
|
+
_handleChangedValues = new WeakSet();
|
|
352
|
+
handleChangedValues_fn = function() {
|
|
353
|
+
if (this.start && this.end) {
|
|
354
|
+
if (presentationDate.compareDateStr(this.start, this.end) > 0) {
|
|
355
|
+
__privateMethod(this, _updateValues, updateValues_fn).call(this, { start: this.end, end: this.start });
|
|
356
|
+
return;
|
|
357
|
+
}
|
|
358
|
+
this._presentationValue = formatPresentationDateRange(
|
|
359
|
+
{
|
|
360
|
+
start: this.start,
|
|
361
|
+
end: this.end
|
|
362
|
+
},
|
|
363
|
+
this.locale.datePicker
|
|
364
|
+
);
|
|
365
|
+
this.value = formatRange(this.start, this.end);
|
|
366
|
+
} else {
|
|
367
|
+
this.value = "";
|
|
368
|
+
this._presentationValue = "";
|
|
369
|
+
}
|
|
370
|
+
const dateToEnsureVisibilityOf = this.start || this.end;
|
|
371
|
+
if (dateToEnsureVisibilityOf) {
|
|
372
|
+
this._adjustSelectedMonthToEnsureVisibilityOf(dateToEnsureVisibilityOf);
|
|
373
|
+
}
|
|
374
|
+
__privateMethod(this, _updateFormValue, updateFormValue_fn).call(this);
|
|
375
|
+
};
|
|
376
|
+
_updateFormValue = new WeakSet();
|
|
377
|
+
updateFormValue_fn = function() {
|
|
378
|
+
if (!this.name || !this.start || !this.end) {
|
|
379
|
+
this.setFormValue(null);
|
|
380
|
+
} else {
|
|
381
|
+
const formData = new FormData();
|
|
382
|
+
formData.append(this.name, this.start);
|
|
383
|
+
formData.append(this.name, this.end);
|
|
384
|
+
this.setFormValue(formData);
|
|
385
|
+
}
|
|
386
|
+
};
|
|
387
|
+
_getVisibleRange = new WeakSet();
|
|
388
|
+
getVisibleRange_fn = function() {
|
|
389
|
+
const candidates = [this.start, this.end].filter(isDefined);
|
|
390
|
+
const isPartialRange = candidates.length === 1;
|
|
391
|
+
if (this._hoverDate && isPartialRange) {
|
|
392
|
+
candidates.push(this._hoverDate);
|
|
393
|
+
}
|
|
394
|
+
const [start, end] = candidates.sort(presentationDate.compareDateStr);
|
|
395
|
+
return { start, end };
|
|
396
|
+
};
|
|
361
397
|
__decorateClass([
|
|
362
398
|
index.attr({ mode: "fromView", attribute: "start" })
|
|
363
399
|
], DateRangePicker.prototype, "initialStart", 2);
|
package/shared/definition19.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as attr, o as observable, v as volatile, r as registerFactory } from './index.js';
|
|
2
2
|
import { a as buttonRegistries } from './definition11.js';
|
|
3
|
-
import { p as popupRegistries } from './
|
|
4
|
-
import { a as textFieldRegistries } from './
|
|
3
|
+
import { p as popupRegistries } from './definition61.js';
|
|
4
|
+
import { a as textFieldRegistries } from './definition54.js';
|
|
5
5
|
import { a as dividerRegistries } from './definition21.js';
|
|
6
6
|
import { f as formatPresentationDate, p as parsePresentationDate, D as DatePickerBase, i as isValidDateStr, c as compareDateStr, a as DatePickerBaseTemplate, s as styles } from './presentationDate.js';
|
|
7
7
|
import './affix.js';
|
|
@@ -11,14 +11,19 @@ const formatRange = (from, to) => {
|
|
|
11
11
|
return `${from} – ${to}`;
|
|
12
12
|
};
|
|
13
13
|
const formatPresentationDateRange = (dateRange, locale) => {
|
|
14
|
-
return formatRange(
|
|
14
|
+
return formatRange(
|
|
15
|
+
formatPresentationDate(dateRange.start, locale),
|
|
16
|
+
formatPresentationDate(dateRange.end, locale)
|
|
17
|
+
);
|
|
15
18
|
};
|
|
16
19
|
const parsePresentationDateRange = (presentationDateRange, locale) => {
|
|
17
20
|
const fragments = presentationDateRange.trim().split(/[\s—–-]+/);
|
|
18
21
|
if (fragments.length !== 2) {
|
|
19
22
|
throw new Error(`Invalid date range: ${presentationDateRange}`);
|
|
20
23
|
}
|
|
21
|
-
const [start, end] = fragments.map(
|
|
24
|
+
const [start, end] = fragments.map(
|
|
25
|
+
(fragment) => parsePresentationDate(fragment, locale)
|
|
26
|
+
);
|
|
22
27
|
return { start, end };
|
|
23
28
|
};
|
|
24
29
|
|
|
@@ -33,6 +38,29 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
33
38
|
__defProp(target, key, result);
|
|
34
39
|
return result;
|
|
35
40
|
};
|
|
41
|
+
var __accessCheck = (obj, member, msg) => {
|
|
42
|
+
if (!member.has(obj))
|
|
43
|
+
throw TypeError("Cannot " + msg);
|
|
44
|
+
};
|
|
45
|
+
var __privateGet = (obj, member, getter) => {
|
|
46
|
+
__accessCheck(obj, member, "read from private field");
|
|
47
|
+
return getter ? getter.call(obj) : member.get(obj);
|
|
48
|
+
};
|
|
49
|
+
var __privateAdd = (obj, member, value) => {
|
|
50
|
+
if (member.has(obj))
|
|
51
|
+
throw TypeError("Cannot add the same private member more than once");
|
|
52
|
+
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
53
|
+
};
|
|
54
|
+
var __privateSet = (obj, member, value, setter) => {
|
|
55
|
+
__accessCheck(obj, member, "write to private field");
|
|
56
|
+
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
57
|
+
return value;
|
|
58
|
+
};
|
|
59
|
+
var __privateMethod = (obj, member, method) => {
|
|
60
|
+
__accessCheck(obj, member, "access private method");
|
|
61
|
+
return method;
|
|
62
|
+
};
|
|
63
|
+
var _isInternalValueUpdate, _updateValues, updateValues_fn, _handleChangedValues, handleChangedValues_fn, _updateFormValue, updateFormValue_fn, _getVisibleRange, getVisibleRange_fn;
|
|
36
64
|
const isFormAssociatedTryingToSetFormValue = (value) => typeof value === "string";
|
|
37
65
|
function isDefined(value) {
|
|
38
66
|
return !!value;
|
|
@@ -40,9 +68,13 @@ function isDefined(value) {
|
|
|
40
68
|
let DateRangePicker = class extends DatePickerBase {
|
|
41
69
|
constructor() {
|
|
42
70
|
super(...arguments);
|
|
71
|
+
__privateAdd(this, _updateValues);
|
|
72
|
+
__privateAdd(this, _handleChangedValues);
|
|
73
|
+
__privateAdd(this, _updateFormValue);
|
|
74
|
+
__privateAdd(this, _getVisibleRange);
|
|
43
75
|
this.initialStart = "";
|
|
44
76
|
this.initialEnd = "";
|
|
45
|
-
this
|
|
77
|
+
__privateAdd(this, _isInternalValueUpdate, false);
|
|
46
78
|
this.start = "";
|
|
47
79
|
this.end = "";
|
|
48
80
|
this.setFormValue = (value, state) => {
|
|
@@ -79,7 +111,6 @@ let DateRangePicker = class extends DatePickerBase {
|
|
|
79
111
|
this.dirtyValue = false;
|
|
80
112
|
}
|
|
81
113
|
}
|
|
82
|
-
#isInternalValueUpdate;
|
|
83
114
|
/**
|
|
84
115
|
* @internal
|
|
85
116
|
*/
|
|
@@ -90,8 +121,8 @@ let DateRangePicker = class extends DatePickerBase {
|
|
|
90
121
|
}
|
|
91
122
|
this.currentStart = this.start;
|
|
92
123
|
this.dirtyValue = true;
|
|
93
|
-
if (!this
|
|
94
|
-
this
|
|
124
|
+
if (!__privateGet(this, _isInternalValueUpdate)) {
|
|
125
|
+
__privateMethod(this, _handleChangedValues, handleChangedValues_fn).call(this);
|
|
95
126
|
}
|
|
96
127
|
}
|
|
97
128
|
/**
|
|
@@ -104,8 +135,8 @@ let DateRangePicker = class extends DatePickerBase {
|
|
|
104
135
|
}
|
|
105
136
|
this.currentEnd = this.end;
|
|
106
137
|
this.dirtyValue = true;
|
|
107
|
-
if (!this
|
|
108
|
-
this
|
|
138
|
+
if (!__privateGet(this, _isInternalValueUpdate)) {
|
|
139
|
+
__privateMethod(this, _handleChangedValues, handleChangedValues_fn).call(this);
|
|
109
140
|
}
|
|
110
141
|
}
|
|
111
142
|
/**
|
|
@@ -120,61 +151,12 @@ let DateRangePicker = class extends DatePickerBase {
|
|
|
120
151
|
currentEndChanged() {
|
|
121
152
|
this.end = this.currentEnd;
|
|
122
153
|
}
|
|
123
|
-
#updateValues(range) {
|
|
124
|
-
this.#isInternalValueUpdate = true;
|
|
125
|
-
if (range.start !== void 0) {
|
|
126
|
-
this.start = range.start;
|
|
127
|
-
this.$emit("input:start");
|
|
128
|
-
}
|
|
129
|
-
if (range.end !== void 0) {
|
|
130
|
-
this.end = range.end;
|
|
131
|
-
this.$emit("input:end");
|
|
132
|
-
}
|
|
133
|
-
this.#isInternalValueUpdate = false;
|
|
134
|
-
this.$emit("input");
|
|
135
|
-
this.$emit("change");
|
|
136
|
-
this.#handleChangedValues();
|
|
137
|
-
}
|
|
138
|
-
#handleChangedValues() {
|
|
139
|
-
if (this.start && this.end) {
|
|
140
|
-
if (compareDateStr(this.start, this.end) > 0) {
|
|
141
|
-
this.#updateValues({ start: this.end, end: this.start });
|
|
142
|
-
return;
|
|
143
|
-
}
|
|
144
|
-
this._presentationValue = formatPresentationDateRange(
|
|
145
|
-
{
|
|
146
|
-
start: this.start,
|
|
147
|
-
end: this.end
|
|
148
|
-
},
|
|
149
|
-
this.locale.datePicker
|
|
150
|
-
);
|
|
151
|
-
this.value = formatRange(this.start, this.end);
|
|
152
|
-
} else {
|
|
153
|
-
this.value = "";
|
|
154
|
-
this._presentationValue = "";
|
|
155
|
-
}
|
|
156
|
-
const dateToEnsureVisibilityOf = this.start || this.end;
|
|
157
|
-
if (dateToEnsureVisibilityOf) {
|
|
158
|
-
this._adjustSelectedMonthToEnsureVisibilityOf(dateToEnsureVisibilityOf);
|
|
159
|
-
}
|
|
160
|
-
this.#updateFormValue();
|
|
161
|
-
}
|
|
162
154
|
/**
|
|
163
155
|
* @internal
|
|
164
156
|
*/
|
|
165
157
|
nameChanged(previous, next) {
|
|
166
158
|
super.nameChanged(previous, next);
|
|
167
|
-
this
|
|
168
|
-
}
|
|
169
|
-
#updateFormValue() {
|
|
170
|
-
if (!this.name || !this.start || !this.end) {
|
|
171
|
-
this.setFormValue(null);
|
|
172
|
-
} else {
|
|
173
|
-
const formData = new FormData();
|
|
174
|
-
formData.append(this.name, this.start);
|
|
175
|
-
formData.append(this.name, this.end);
|
|
176
|
-
this.setFormValue(formData);
|
|
177
|
-
}
|
|
159
|
+
__privateMethod(this, _updateFormValue, updateFormValue_fn).call(this);
|
|
178
160
|
}
|
|
179
161
|
connectedCallback() {
|
|
180
162
|
super.connectedCallback();
|
|
@@ -185,15 +167,6 @@ let DateRangePicker = class extends DatePickerBase {
|
|
|
185
167
|
this.end = this.initialEnd;
|
|
186
168
|
}
|
|
187
169
|
}
|
|
188
|
-
#getVisibleRange() {
|
|
189
|
-
const candidates = [this.start, this.end].filter(isDefined);
|
|
190
|
-
const isPartialRange = candidates.length === 1;
|
|
191
|
-
if (this._hoverDate && isPartialRange) {
|
|
192
|
-
candidates.push(this._hoverDate);
|
|
193
|
-
}
|
|
194
|
-
const [start, end] = candidates.sort(compareDateStr);
|
|
195
|
-
return { start, end };
|
|
196
|
-
}
|
|
197
170
|
/**
|
|
198
171
|
* @internal
|
|
199
172
|
*/
|
|
@@ -204,7 +177,7 @@ let DateRangePicker = class extends DatePickerBase {
|
|
|
204
177
|
* @internal
|
|
205
178
|
*/
|
|
206
179
|
_isDateInSelectedRange(date) {
|
|
207
|
-
const { start, end } = this
|
|
180
|
+
const { start, end } = __privateMethod(this, _getVisibleRange, getVisibleRange_fn).call(this);
|
|
208
181
|
if (start && end) {
|
|
209
182
|
return compareDateStr(date, start) >= 0 && compareDateStr(date, end) <= 0;
|
|
210
183
|
}
|
|
@@ -214,13 +187,13 @@ let DateRangePicker = class extends DatePickerBase {
|
|
|
214
187
|
* @internal
|
|
215
188
|
*/
|
|
216
189
|
_isDateRangeStart(date) {
|
|
217
|
-
return date === this
|
|
190
|
+
return date === __privateMethod(this, _getVisibleRange, getVisibleRange_fn).call(this).start;
|
|
218
191
|
}
|
|
219
192
|
/**
|
|
220
193
|
* @internal
|
|
221
194
|
*/
|
|
222
195
|
_isDateRangeEnd(date) {
|
|
223
|
-
return date === this
|
|
196
|
+
return date === __privateMethod(this, _getVisibleRange, getVisibleRange_fn).call(this).end;
|
|
224
197
|
}
|
|
225
198
|
/**
|
|
226
199
|
* @internal
|
|
@@ -240,15 +213,15 @@ let DateRangePicker = class extends DatePickerBase {
|
|
|
240
213
|
*/
|
|
241
214
|
_onDateClick(date) {
|
|
242
215
|
if (this.start && this.end) {
|
|
243
|
-
this
|
|
216
|
+
__privateMethod(this, _updateValues, updateValues_fn).call(this, { start: date, end: "" });
|
|
244
217
|
} else if (this.start) {
|
|
245
|
-
this
|
|
218
|
+
__privateMethod(this, _updateValues, updateValues_fn).call(this, { end: date });
|
|
246
219
|
this._closePopup();
|
|
247
220
|
} else if (this.end) {
|
|
248
|
-
this
|
|
221
|
+
__privateMethod(this, _updateValues, updateValues_fn).call(this, { start: date });
|
|
249
222
|
this._closePopup();
|
|
250
223
|
} else {
|
|
251
|
-
this
|
|
224
|
+
__privateMethod(this, _updateValues, updateValues_fn).call(this, { start: date });
|
|
252
225
|
}
|
|
253
226
|
}
|
|
254
227
|
/**
|
|
@@ -265,7 +238,7 @@ let DateRangePicker = class extends DatePickerBase {
|
|
|
265
238
|
*/
|
|
266
239
|
_onTextFieldChange() {
|
|
267
240
|
if (this._presentationValue === "") {
|
|
268
|
-
this
|
|
241
|
+
__privateMethod(this, _updateValues, updateValues_fn).call(this, { start: "", end: "" });
|
|
269
242
|
return;
|
|
270
243
|
}
|
|
271
244
|
try {
|
|
@@ -273,7 +246,7 @@ let DateRangePicker = class extends DatePickerBase {
|
|
|
273
246
|
this._presentationValue,
|
|
274
247
|
this.locale.datePicker
|
|
275
248
|
);
|
|
276
|
-
this
|
|
249
|
+
__privateMethod(this, _updateValues, updateValues_fn).call(this, { start, end });
|
|
277
250
|
} catch (_) {
|
|
278
251
|
return;
|
|
279
252
|
}
|
|
@@ -330,14 +303,14 @@ let DateRangePicker = class extends DatePickerBase {
|
|
|
330
303
|
* @internal
|
|
331
304
|
*/
|
|
332
305
|
_onClearClick() {
|
|
333
|
-
this
|
|
306
|
+
__privateMethod(this, _updateValues, updateValues_fn).call(this, { start: "", end: "" });
|
|
334
307
|
super._onClearClick();
|
|
335
308
|
}
|
|
336
309
|
/**
|
|
337
310
|
* @internal
|
|
338
311
|
*/
|
|
339
312
|
formResetCallback() {
|
|
340
|
-
this
|
|
313
|
+
__privateMethod(this, _updateValues, updateValues_fn).call(this, { start: this.initialStart, end: this.initialEnd });
|
|
341
314
|
super.formResetCallback();
|
|
342
315
|
}
|
|
343
316
|
get _calendarButtonLabel() {
|
|
@@ -356,6 +329,69 @@ let DateRangePicker = class extends DatePickerBase {
|
|
|
356
329
|
}
|
|
357
330
|
}
|
|
358
331
|
};
|
|
332
|
+
_isInternalValueUpdate = new WeakMap();
|
|
333
|
+
_updateValues = new WeakSet();
|
|
334
|
+
updateValues_fn = function(range) {
|
|
335
|
+
__privateSet(this, _isInternalValueUpdate, true);
|
|
336
|
+
if (range.start !== void 0) {
|
|
337
|
+
this.start = range.start;
|
|
338
|
+
this.$emit("input:start");
|
|
339
|
+
}
|
|
340
|
+
if (range.end !== void 0) {
|
|
341
|
+
this.end = range.end;
|
|
342
|
+
this.$emit("input:end");
|
|
343
|
+
}
|
|
344
|
+
__privateSet(this, _isInternalValueUpdate, false);
|
|
345
|
+
this.$emit("input");
|
|
346
|
+
this.$emit("change");
|
|
347
|
+
__privateMethod(this, _handleChangedValues, handleChangedValues_fn).call(this);
|
|
348
|
+
};
|
|
349
|
+
_handleChangedValues = new WeakSet();
|
|
350
|
+
handleChangedValues_fn = function() {
|
|
351
|
+
if (this.start && this.end) {
|
|
352
|
+
if (compareDateStr(this.start, this.end) > 0) {
|
|
353
|
+
__privateMethod(this, _updateValues, updateValues_fn).call(this, { start: this.end, end: this.start });
|
|
354
|
+
return;
|
|
355
|
+
}
|
|
356
|
+
this._presentationValue = formatPresentationDateRange(
|
|
357
|
+
{
|
|
358
|
+
start: this.start,
|
|
359
|
+
end: this.end
|
|
360
|
+
},
|
|
361
|
+
this.locale.datePicker
|
|
362
|
+
);
|
|
363
|
+
this.value = formatRange(this.start, this.end);
|
|
364
|
+
} else {
|
|
365
|
+
this.value = "";
|
|
366
|
+
this._presentationValue = "";
|
|
367
|
+
}
|
|
368
|
+
const dateToEnsureVisibilityOf = this.start || this.end;
|
|
369
|
+
if (dateToEnsureVisibilityOf) {
|
|
370
|
+
this._adjustSelectedMonthToEnsureVisibilityOf(dateToEnsureVisibilityOf);
|
|
371
|
+
}
|
|
372
|
+
__privateMethod(this, _updateFormValue, updateFormValue_fn).call(this);
|
|
373
|
+
};
|
|
374
|
+
_updateFormValue = new WeakSet();
|
|
375
|
+
updateFormValue_fn = function() {
|
|
376
|
+
if (!this.name || !this.start || !this.end) {
|
|
377
|
+
this.setFormValue(null);
|
|
378
|
+
} else {
|
|
379
|
+
const formData = new FormData();
|
|
380
|
+
formData.append(this.name, this.start);
|
|
381
|
+
formData.append(this.name, this.end);
|
|
382
|
+
this.setFormValue(formData);
|
|
383
|
+
}
|
|
384
|
+
};
|
|
385
|
+
_getVisibleRange = new WeakSet();
|
|
386
|
+
getVisibleRange_fn = function() {
|
|
387
|
+
const candidates = [this.start, this.end].filter(isDefined);
|
|
388
|
+
const isPartialRange = candidates.length === 1;
|
|
389
|
+
if (this._hoverDate && isPartialRange) {
|
|
390
|
+
candidates.push(this._hoverDate);
|
|
391
|
+
}
|
|
392
|
+
const [start, end] = candidates.sort(compareDateStr);
|
|
393
|
+
return { start, end };
|
|
394
|
+
};
|
|
359
395
|
__decorateClass([
|
|
360
396
|
attr({ mode: "fromView", attribute: "start" })
|
|
361
397
|
], DateRangePicker.prototype, "initialStart", 2);
|
package/shared/definition2.cjs
CHANGED
|
@@ -214,17 +214,22 @@ class Accordion extends Accordion$1 {
|
|
|
214
214
|
|
|
215
215
|
const getClasses = (_) => classNames.classNames("base");
|
|
216
216
|
const AccordionTemplate = () => index.html`
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
217
|
+
<div class="${getClasses}">
|
|
218
|
+
<slot
|
|
219
|
+
${slotted.slotted({ property: "accordionItems", filter: slotted.elements() })}
|
|
220
|
+
></slot>
|
|
221
|
+
</div>
|
|
222
|
+
`;
|
|
221
223
|
|
|
222
224
|
const accordionDefinition = Accordion.compose({
|
|
223
225
|
baseName: "accordion",
|
|
224
226
|
template: AccordionTemplate,
|
|
225
227
|
styles
|
|
226
228
|
});
|
|
227
|
-
const accordionRegistries = [
|
|
229
|
+
const accordionRegistries = [
|
|
230
|
+
accordionDefinition(),
|
|
231
|
+
...definition.accordionItemRegistries
|
|
232
|
+
];
|
|
228
233
|
const registerAccordion = index.registerFactory(accordionRegistries);
|
|
229
234
|
|
|
230
235
|
exports.accordionDefinition = accordionDefinition;
|