@smilodon/svelte 1.10.0 → 2.0.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/COMPLETE-GUIDE.md +2 -0
- package/README.md +6 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +575 -532
- package/dist/index.mjs.map +1 -1
- package/dist/svelte.css +0 -0
- package/dist/types/index.d.ts +3 -0
- package/package.json +5 -5
package/dist/index.mjs
CHANGED
|
@@ -1,122 +1,62 @@
|
|
|
1
1
|
import { configureSelect, resetSelectConfig, selectConfig } from "@smilodon/core";
|
|
2
|
-
import {
|
|
2
|
+
import { createClassComponent } from "svelte/legacy";
|
|
3
|
+
import "svelte/internal/disclose-version";
|
|
4
|
+
import "svelte/internal/flags/legacy";
|
|
5
|
+
import * as $ from "svelte/internal/client";
|
|
3
6
|
import { createEventDispatcher, onMount } from "svelte";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
(
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
let
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
enhanced_select,
|
|
52
|
-
"style",
|
|
53
|
-
/*style*/
|
|
54
|
-
ctx2[1]
|
|
55
|
-
);
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
|
-
i: noop,
|
|
59
|
-
o: noop,
|
|
60
|
-
d(detaching) {
|
|
61
|
-
if (detaching) {
|
|
62
|
-
detach(enhanced_select);
|
|
63
|
-
}
|
|
64
|
-
ctx[64](null);
|
|
65
|
-
mounted = false;
|
|
66
|
-
dispose();
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
function instance($$self, $$props, $$invalidate) {
|
|
71
|
-
let isControlled;
|
|
72
|
-
let currentValue;
|
|
73
|
-
let { items = [] } = $$props;
|
|
74
|
-
let { groupedItems = void 0 } = $$props;
|
|
75
|
-
let { value = void 0 } = $$props;
|
|
76
|
-
let { defaultValue = void 0 } = $$props;
|
|
77
|
-
let { multiple = false } = $$props;
|
|
78
|
-
let { searchable = false } = $$props;
|
|
79
|
-
let { placeholder = "" } = $$props;
|
|
80
|
-
let { disabled = false } = $$props;
|
|
81
|
-
let { required = false } = $$props;
|
|
82
|
-
let { error = false } = $$props;
|
|
83
|
-
let { infiniteScroll = false } = $$props;
|
|
84
|
-
let { pageSize = 50 } = $$props;
|
|
85
|
-
let { virtualized = true } = $$props;
|
|
86
|
-
let { maxSelections = void 0 } = $$props;
|
|
87
|
-
let { selectionConfig = void 0 } = $$props;
|
|
88
|
-
let { multiSelectDisplay = void 0 } = $$props;
|
|
89
|
-
let { scrollToSelected = void 0 } = $$props;
|
|
90
|
-
let { styles = void 0 } = $$props;
|
|
91
|
-
let { config = void 0 } = $$props;
|
|
92
|
-
let { removeButtonIcon = void 0 } = $$props;
|
|
93
|
-
let { disabledOptionBehavior = void 0 } = $$props;
|
|
94
|
-
let { showSelectedIndicator = true } = $$props;
|
|
95
|
-
let { direction = void 0 } = $$props;
|
|
96
|
-
let { placement = "auto" } = $$props;
|
|
97
|
-
let { className = "" } = $$props;
|
|
98
|
-
let { style = "" } = $$props;
|
|
99
|
-
let { classMap = void 0 } = $$props;
|
|
100
|
-
let { clearable = false } = $$props;
|
|
101
|
-
let { clearSelectionOnClear = true } = $$props;
|
|
102
|
-
let { clearSearchOnClear = true } = $$props;
|
|
103
|
-
let { clearAriaLabel = "Clear selection and search" } = $$props;
|
|
104
|
-
let { clearIcon = "×" } = $$props;
|
|
105
|
-
let { optionRenderer = void 0 } = $$props;
|
|
106
|
-
let { trackingEnabled = false } = $$props;
|
|
107
|
-
let { trackEvents = true } = $$props;
|
|
108
|
-
let { trackStyling = true } = $$props;
|
|
109
|
-
let { trackLimitations = true } = $$props;
|
|
110
|
-
let { emitDiagnostics = false } = $$props;
|
|
111
|
-
let { trackingMaxEntries = 200 } = $$props;
|
|
112
|
-
let { limitationPolicies = void 0 } = $$props;
|
|
113
|
-
let { autoMitigateRuntimeModeSwitch = true } = $$props;
|
|
7
|
+
var root = $.from_html(`<enhanced-select></enhanced-select>`, 2);
|
|
8
|
+
function Select($$anchor, $$props) {
|
|
9
|
+
if (new.target) return createClassComponent({ component: Select, ...$$anchor });
|
|
10
|
+
$.push($$props, false);
|
|
11
|
+
const isControlled = $.mutable_source();
|
|
12
|
+
const currentValue = $.mutable_source();
|
|
13
|
+
let items = $.prop($$props, "items", 28, () => []);
|
|
14
|
+
let groupedItems = $.prop($$props, "groupedItems", 12, void 0);
|
|
15
|
+
let value = $.prop($$props, "value", 12, void 0);
|
|
16
|
+
let defaultValue = $.prop($$props, "defaultValue", 12, void 0);
|
|
17
|
+
let multiple = $.prop($$props, "multiple", 12, false);
|
|
18
|
+
let searchable = $.prop($$props, "searchable", 12, false);
|
|
19
|
+
let placeholder = $.prop($$props, "placeholder", 12, "");
|
|
20
|
+
let disabled = $.prop($$props, "disabled", 12, false);
|
|
21
|
+
let required = $.prop($$props, "required", 12, false);
|
|
22
|
+
let error = $.prop($$props, "error", 12, false);
|
|
23
|
+
let infiniteScroll = $.prop($$props, "infiniteScroll", 12, false);
|
|
24
|
+
let pageSize = $.prop($$props, "pageSize", 12, 50);
|
|
25
|
+
let virtualized = $.prop($$props, "virtualized", 12, true);
|
|
26
|
+
let maxSelections = $.prop($$props, "maxSelections", 12, void 0);
|
|
27
|
+
let selectionConfig = $.prop($$props, "selectionConfig", 12, void 0);
|
|
28
|
+
let multiSelectDisplay = $.prop($$props, "multiSelectDisplay", 12, void 0);
|
|
29
|
+
let scrollToSelected = $.prop($$props, "scrollToSelected", 12, void 0);
|
|
30
|
+
let styles = $.prop($$props, "styles", 12, void 0);
|
|
31
|
+
let config = $.prop($$props, "config", 12, void 0);
|
|
32
|
+
let removeButtonIcon = $.prop($$props, "removeButtonIcon", 12, void 0);
|
|
33
|
+
let disabledOptionBehavior = $.prop($$props, "disabledOptionBehavior", 12, void 0);
|
|
34
|
+
let showSelectedIndicator = $.prop($$props, "showSelectedIndicator", 12, true);
|
|
35
|
+
let direction = $.prop($$props, "direction", 12, void 0);
|
|
36
|
+
let placement = $.prop($$props, "placement", 12, "auto");
|
|
37
|
+
let className = $.prop($$props, "className", 12, "");
|
|
38
|
+
let style = $.prop($$props, "style", 12, "");
|
|
39
|
+
let classMap = $.prop($$props, "classMap", 12, void 0);
|
|
40
|
+
let clearable = $.prop($$props, "clearable", 12, false);
|
|
41
|
+
let clearSelectionOnClear = $.prop($$props, "clearSelectionOnClear", 12, true);
|
|
42
|
+
let clearSearchOnClear = $.prop($$props, "clearSearchOnClear", 12, true);
|
|
43
|
+
let clearAriaLabel = $.prop($$props, "clearAriaLabel", 12, "Clear selection and search");
|
|
44
|
+
let clearIcon = $.prop($$props, "clearIcon", 12, "×");
|
|
45
|
+
let optionRenderer = $.prop($$props, "optionRenderer", 12, void 0);
|
|
46
|
+
let trackingEnabled = $.prop($$props, "trackingEnabled", 12, false);
|
|
47
|
+
let trackEvents = $.prop($$props, "trackEvents", 12, true);
|
|
48
|
+
let trackStyling = $.prop($$props, "trackStyling", 12, true);
|
|
49
|
+
let trackLimitations = $.prop($$props, "trackLimitations", 12, true);
|
|
50
|
+
let emitDiagnostics = $.prop($$props, "emitDiagnostics", 12, false);
|
|
51
|
+
let trackingMaxEntries = $.prop($$props, "trackingMaxEntries", 12, 200);
|
|
52
|
+
let limitationPolicies = $.prop($$props, "limitationPolicies", 12, void 0);
|
|
53
|
+
let autoMitigateRuntimeModeSwitch = $.prop($$props, "autoMitigateRuntimeModeSwitch", 12, true);
|
|
114
54
|
const dispatch = createEventDispatcher();
|
|
115
|
-
let selectRef;
|
|
116
|
-
let nativeListenersReady = false;
|
|
117
|
-
let internalValue = defaultValue;
|
|
55
|
+
let selectRef = $.mutable_source();
|
|
56
|
+
let nativeListenersReady = $.mutable_source(false);
|
|
57
|
+
let internalValue = $.mutable_source(defaultValue());
|
|
118
58
|
const resolvedOptionRenderer = (item, index, helpers) => {
|
|
119
|
-
return optionRenderer ? optionRenderer(item, index, helpers) : document.createElement("div");
|
|
59
|
+
return optionRenderer() ? optionRenderer()(item, index, helpers) : document.createElement("div");
|
|
120
60
|
};
|
|
121
61
|
function handleSelect(e) {
|
|
122
62
|
const customEvent = e;
|
|
@@ -127,11 +67,14 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
127
67
|
const customEvent = e;
|
|
128
68
|
const { selectedItems, selectedValues } = customEvent.detail;
|
|
129
69
|
const values = selectedValues;
|
|
130
|
-
if (
|
|
131
|
-
|
|
70
|
+
if (!$.get(isControlled)) {
|
|
71
|
+
$.set(internalValue, multiple() ? values : values[0]);
|
|
132
72
|
}
|
|
133
|
-
const newValue = multiple ? values : values[0];
|
|
134
|
-
|
|
73
|
+
const newValue = multiple() ? values : values[0];
|
|
74
|
+
value(
|
|
75
|
+
newValue
|
|
76
|
+
// Update binding
|
|
77
|
+
);
|
|
135
78
|
dispatch("change", { value: newValue, selectedItems });
|
|
136
79
|
}
|
|
137
80
|
function handleOpen() {
|
|
@@ -163,378 +106,292 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
163
106
|
const customEvent = e;
|
|
164
107
|
dispatch("diagnostic", customEvent.detail);
|
|
165
108
|
}
|
|
166
|
-
function listenForSelectEvents(
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
109
|
+
function listenForSelectEvents(element) {
|
|
110
|
+
$.set(selectRef, element);
|
|
111
|
+
element.addEventListener("select", handleSelect);
|
|
112
|
+
element.addEventListener("change", handleChange);
|
|
113
|
+
element.addEventListener("open", handleOpen);
|
|
114
|
+
element.addEventListener("close", handleClose);
|
|
115
|
+
element.addEventListener("search", handleSearch);
|
|
116
|
+
element.addEventListener("loadMore", handleLoadMore);
|
|
117
|
+
element.addEventListener("create", handleCreate);
|
|
118
|
+
element.addEventListener("clear", handleClear);
|
|
119
|
+
element.addEventListener("diagnostic", handleDiagnostic);
|
|
120
|
+
$.set(nativeListenersReady, true);
|
|
178
121
|
return {
|
|
179
122
|
destroy() {
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
if (selectRef ===
|
|
190
|
-
|
|
123
|
+
element.removeEventListener("select", handleSelect);
|
|
124
|
+
element.removeEventListener("change", handleChange);
|
|
125
|
+
element.removeEventListener("open", handleOpen);
|
|
126
|
+
element.removeEventListener("close", handleClose);
|
|
127
|
+
element.removeEventListener("search", handleSearch);
|
|
128
|
+
element.removeEventListener("loadMore", handleLoadMore);
|
|
129
|
+
element.removeEventListener("create", handleCreate);
|
|
130
|
+
element.removeEventListener("clear", handleClear);
|
|
131
|
+
element.removeEventListener("diagnostic", handleDiagnostic);
|
|
132
|
+
if ($.get(selectRef) === element) $.set(selectRef, void 0);
|
|
133
|
+
$.set(nativeListenersReady, false);
|
|
191
134
|
}
|
|
192
135
|
};
|
|
193
136
|
}
|
|
194
137
|
function updateConfig() {
|
|
195
|
-
var _a, _b;
|
|
196
|
-
if (
|
|
197
|
-
(_a = selectRef.updateConfig) == null ? void 0 :
|
|
198
|
-
searchable,
|
|
199
|
-
placeholder,
|
|
200
|
-
enabled: !disabled,
|
|
201
|
-
direction,
|
|
202
|
-
dropdownPlacement: { mode: placement },
|
|
138
|
+
var _a, _b, _c, _d;
|
|
139
|
+
if (!$.get(selectRef)) return;
|
|
140
|
+
(_b = (_a = $.get(selectRef)).updateConfig) == null ? void 0 : _b.call(_a, {
|
|
141
|
+
searchable: searchable(),
|
|
142
|
+
placeholder: placeholder(),
|
|
143
|
+
enabled: !disabled(),
|
|
144
|
+
direction: direction(),
|
|
145
|
+
dropdownPlacement: { mode: placement() },
|
|
203
146
|
selection: {
|
|
204
|
-
...selectionConfig,
|
|
205
|
-
mode: multiple ? "multi" : "single",
|
|
206
|
-
maxSelections,
|
|
207
|
-
removeButtonIcon,
|
|
208
|
-
disabledOptionBehavior,
|
|
209
|
-
showSelectedIndicator
|
|
147
|
+
...selectionConfig(),
|
|
148
|
+
mode: multiple() ? "multi" : "single",
|
|
149
|
+
maxSelections: maxSelections(),
|
|
150
|
+
removeButtonIcon: removeButtonIcon(),
|
|
151
|
+
disabledOptionBehavior: disabledOptionBehavior(),
|
|
152
|
+
showSelectedIndicator: showSelectedIndicator()
|
|
210
153
|
},
|
|
211
|
-
multiSelectDisplay,
|
|
212
|
-
infiniteScroll: { enabled: infiniteScroll, pageSize },
|
|
213
|
-
scrollToSelected: { enabled: true, ...scrollToSelected },
|
|
214
|
-
styles,
|
|
154
|
+
multiSelectDisplay: multiSelectDisplay(),
|
|
155
|
+
infiniteScroll: { enabled: infiniteScroll(), pageSize: pageSize() },
|
|
156
|
+
scrollToSelected: { enabled: true, ...scrollToSelected() },
|
|
157
|
+
styles: styles(),
|
|
215
158
|
clearControl: {
|
|
216
|
-
enabled: clearable,
|
|
217
|
-
clearSelection: clearSelectionOnClear,
|
|
218
|
-
clearSearch: clearSearchOnClear,
|
|
219
|
-
ariaLabel: clearAriaLabel,
|
|
220
|
-
icon: clearIcon
|
|
159
|
+
enabled: clearable(),
|
|
160
|
+
clearSelection: clearSelectionOnClear(),
|
|
161
|
+
clearSearch: clearSearchOnClear(),
|
|
162
|
+
ariaLabel: clearAriaLabel(),
|
|
163
|
+
icon: clearIcon()
|
|
221
164
|
},
|
|
222
165
|
tracking: {
|
|
223
|
-
enabled: trackingEnabled,
|
|
224
|
-
events: trackEvents,
|
|
225
|
-
styling: trackStyling,
|
|
226
|
-
limitations: trackLimitations,
|
|
227
|
-
emitDiagnostics,
|
|
228
|
-
maxEntries: trackingMaxEntries
|
|
166
|
+
enabled: trackingEnabled(),
|
|
167
|
+
events: trackEvents(),
|
|
168
|
+
styling: trackStyling(),
|
|
169
|
+
limitations: trackLimitations(),
|
|
170
|
+
emitDiagnostics: emitDiagnostics(),
|
|
171
|
+
maxEntries: trackingMaxEntries()
|
|
229
172
|
},
|
|
230
173
|
limitations: {
|
|
231
|
-
policies: limitationPolicies,
|
|
232
|
-
autoMitigateRuntimeModeSwitch
|
|
174
|
+
policies: limitationPolicies(),
|
|
175
|
+
autoMitigateRuntimeModeSwitch: autoMitigateRuntimeModeSwitch()
|
|
233
176
|
}
|
|
234
177
|
});
|
|
235
|
-
if (config) {
|
|
236
|
-
(
|
|
178
|
+
if (config()) {
|
|
179
|
+
(_d = (_c = $.get(selectRef)).updateConfig) == null ? void 0 : _d.call(_c, config());
|
|
237
180
|
}
|
|
238
181
|
}
|
|
239
182
|
onMount(async () => {
|
|
240
|
-
|
|
183
|
+
var _a, _b;
|
|
184
|
+
if (!$.get(selectRef)) return;
|
|
241
185
|
await customElements.whenDefined("enhanced-select");
|
|
242
|
-
if (
|
|
243
|
-
const
|
|
244
|
-
if (placeholder)
|
|
245
|
-
if (disabled)
|
|
246
|
-
if (required)
|
|
247
|
-
if (error)
|
|
248
|
-
if (searchable)
|
|
249
|
-
if (multiple)
|
|
250
|
-
if (virtualized)
|
|
251
|
-
if (infiniteScroll)
|
|
252
|
-
if (pageSize)
|
|
253
|
-
if (maxSelections)
|
|
254
|
-
if (placement)
|
|
255
|
-
if (direction)
|
|
256
|
-
if (optionRenderer) {
|
|
257
|
-
|
|
186
|
+
if (!$.get(selectRef)) return;
|
|
187
|
+
const element = $.get(selectRef);
|
|
188
|
+
if (placeholder()) element.setAttribute("placeholder", placeholder());
|
|
189
|
+
if (disabled()) element.setAttribute("disabled", "");
|
|
190
|
+
if (required()) element.setAttribute("required", "");
|
|
191
|
+
if (error()) element.setAttribute("error", "");
|
|
192
|
+
if (searchable()) element.setAttribute("searchable", "");
|
|
193
|
+
if (multiple()) element.setAttribute("multiple", "");
|
|
194
|
+
if (virtualized()) element.setAttribute("virtualized", "");
|
|
195
|
+
if (infiniteScroll()) element.setAttribute("infinite-scroll", "");
|
|
196
|
+
if (pageSize()) element.setAttribute("page-size", String(pageSize()));
|
|
197
|
+
if (maxSelections()) element.setAttribute("max-selections", String(maxSelections()));
|
|
198
|
+
if (placement()) element.setAttribute("placement", placement());
|
|
199
|
+
if (direction()) element.setAttribute("dir", direction());
|
|
200
|
+
if (optionRenderer()) {
|
|
201
|
+
element.optionRenderer = resolvedOptionRenderer;
|
|
258
202
|
}
|
|
259
|
-
if (items == null ? void 0 :
|
|
260
|
-
const first = items[0];
|
|
203
|
+
if ((_a = items()) == null ? void 0 : _a.length) {
|
|
204
|
+
const first = items()[0];
|
|
261
205
|
if (first && first.group !== void 0) {
|
|
262
206
|
const map = /* @__PURE__ */ new Map();
|
|
263
|
-
items.forEach((it) => {
|
|
207
|
+
items().forEach((it) => {
|
|
264
208
|
const g = it.group ?? "Ungrouped";
|
|
265
209
|
if (!map.has(g)) map.set(g, []);
|
|
266
210
|
map.get(g).push(it);
|
|
267
211
|
});
|
|
268
212
|
const groups = Array.from(map.entries()).map(([label, options]) => ({ label, options }));
|
|
269
|
-
|
|
213
|
+
element.setGroupedItems(groups);
|
|
270
214
|
} else {
|
|
271
|
-
|
|
215
|
+
element.setItems(items());
|
|
272
216
|
}
|
|
273
217
|
}
|
|
274
|
-
if (groupedItems == null ? void 0 :
|
|
275
|
-
|
|
218
|
+
if ((_b = groupedItems()) == null ? void 0 : _b.length) {
|
|
219
|
+
element.setGroupedItems(groupedItems());
|
|
276
220
|
}
|
|
277
|
-
if (currentValue !== void 0) {
|
|
278
|
-
const values = Array.isArray(currentValue) ? currentValue : [currentValue];
|
|
279
|
-
|
|
221
|
+
if ($.get(currentValue) !== void 0) {
|
|
222
|
+
const values = Array.isArray($.get(currentValue)) ? $.get(currentValue) : [$.get(currentValue)];
|
|
223
|
+
element.setSelectedValues(values);
|
|
280
224
|
}
|
|
281
225
|
updateConfig();
|
|
282
226
|
});
|
|
283
227
|
function open() {
|
|
284
|
-
|
|
285
|
-
|
|
228
|
+
var _a;
|
|
229
|
+
if (typeof ((_a = $.get(selectRef)) == null ? void 0 : _a.open) === "function") {
|
|
230
|
+
$.get(selectRef).open();
|
|
286
231
|
}
|
|
287
232
|
}
|
|
288
233
|
function close() {
|
|
289
|
-
|
|
290
|
-
|
|
234
|
+
var _a;
|
|
235
|
+
if (typeof ((_a = $.get(selectRef)) == null ? void 0 : _a.close) === "function") {
|
|
236
|
+
$.get(selectRef).close();
|
|
291
237
|
}
|
|
292
238
|
}
|
|
293
239
|
function focus() {
|
|
294
|
-
|
|
295
|
-
|
|
240
|
+
var _a;
|
|
241
|
+
if (typeof ((_a = $.get(selectRef)) == null ? void 0 : _a.focus) === "function") {
|
|
242
|
+
$.get(selectRef).focus();
|
|
296
243
|
}
|
|
297
244
|
}
|
|
298
245
|
function setItems(newItems) {
|
|
299
|
-
|
|
246
|
+
var _a;
|
|
247
|
+
(_a = $.get(selectRef)) == null ? void 0 : _a.setItems(newItems);
|
|
300
248
|
}
|
|
301
249
|
function setGroupedItems(groups) {
|
|
302
|
-
|
|
250
|
+
var _a;
|
|
251
|
+
(_a = $.get(selectRef)) == null ? void 0 : _a.setGroupedItems(groups);
|
|
303
252
|
}
|
|
304
253
|
function clear() {
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
254
|
+
var _a;
|
|
255
|
+
(_a = $.get(selectRef)) == null ? void 0 : _a.setSelectedValues([]);
|
|
256
|
+
if (!$.get(isControlled)) {
|
|
257
|
+
$.set(internalValue, multiple() ? [] : void 0);
|
|
308
258
|
}
|
|
309
|
-
const newValue = multiple ? [] : "";
|
|
310
|
-
|
|
259
|
+
const newValue = multiple() ? [] : "";
|
|
260
|
+
value(newValue);
|
|
311
261
|
dispatch("change", { value: newValue, selectedItems: [] });
|
|
312
262
|
}
|
|
313
263
|
function clearSearch() {
|
|
314
|
-
var _a;
|
|
315
|
-
(_a = selectRef == null ? void 0 :
|
|
264
|
+
var _a, _b;
|
|
265
|
+
(_b = (_a = $.get(selectRef)) == null ? void 0 : _a.clearSearch) == null ? void 0 : _b.call(_a);
|
|
316
266
|
}
|
|
317
267
|
function updateCoreConfig(nextConfig) {
|
|
318
|
-
var _a;
|
|
319
|
-
(_a = selectRef == null ? void 0 :
|
|
268
|
+
var _a, _b;
|
|
269
|
+
(_b = (_a = $.get(selectRef)) == null ? void 0 : _a.updateConfig) == null ? void 0 : _b.call(_a, nextConfig);
|
|
320
270
|
}
|
|
321
271
|
function setError(message) {
|
|
322
|
-
var _a;
|
|
323
|
-
(_a = selectRef == null ? void 0 :
|
|
272
|
+
var _a, _b;
|
|
273
|
+
(_b = (_a = $.get(selectRef)) == null ? void 0 : _a.setError) == null ? void 0 : _b.call(_a, message);
|
|
324
274
|
}
|
|
325
275
|
function clearError() {
|
|
326
|
-
var _a;
|
|
327
|
-
(_a = selectRef == null ? void 0 :
|
|
276
|
+
var _a, _b;
|
|
277
|
+
(_b = (_a = $.get(selectRef)) == null ? void 0 : _a.clearError) == null ? void 0 : _b.call(_a);
|
|
328
278
|
}
|
|
329
279
|
function setRequiredState(isRequired) {
|
|
330
|
-
var _a;
|
|
331
|
-
(_a = selectRef == null ? void 0 :
|
|
280
|
+
var _a, _b;
|
|
281
|
+
(_b = (_a = $.get(selectRef)) == null ? void 0 : _a.setRequired) == null ? void 0 : _b.call(_a, isRequired);
|
|
332
282
|
}
|
|
333
283
|
function validate() {
|
|
334
|
-
var _a;
|
|
335
|
-
return ((_a = selectRef == null ? void 0 :
|
|
284
|
+
var _a, _b;
|
|
285
|
+
return ((_b = (_a = $.get(selectRef)) == null ? void 0 : _a.validate) == null ? void 0 : _b.call(_a)) ?? true;
|
|
336
286
|
}
|
|
337
287
|
function getCapabilities() {
|
|
338
|
-
var _a;
|
|
339
|
-
return (_a = selectRef == null ? void 0 :
|
|
288
|
+
var _a, _b;
|
|
289
|
+
return (_b = (_a = $.get(selectRef)) == null ? void 0 : _a.getCapabilities) == null ? void 0 : _b.call(_a);
|
|
340
290
|
}
|
|
341
291
|
function getKnownLimitations() {
|
|
342
|
-
var _a;
|
|
343
|
-
return ((_a = selectRef == null ? void 0 :
|
|
292
|
+
var _a, _b;
|
|
293
|
+
return ((_b = (_a = $.get(selectRef)) == null ? void 0 : _a.getKnownLimitations) == null ? void 0 : _b.call(_a)) || [];
|
|
344
294
|
}
|
|
345
295
|
function getTrackingSnapshot() {
|
|
346
|
-
var _a;
|
|
347
|
-
return ((_a = selectRef == null ? void 0 :
|
|
296
|
+
var _a, _b;
|
|
297
|
+
return ((_b = (_a = $.get(selectRef)) == null ? void 0 : _a.getTrackingSnapshot) == null ? void 0 : _b.call(_a)) || { events: [], styles: [], limitations: [] };
|
|
348
298
|
}
|
|
349
299
|
function clearTracking(source) {
|
|
350
|
-
var _a;
|
|
351
|
-
(_a = selectRef == null ? void 0 :
|
|
300
|
+
var _a, _b;
|
|
301
|
+
(_b = (_a = $.get(selectRef)) == null ? void 0 : _a.clearTracking) == null ? void 0 : _b.call(_a, source);
|
|
352
302
|
}
|
|
353
303
|
function setLimitationPolicies(policies) {
|
|
354
|
-
var _a;
|
|
355
|
-
(_a = selectRef == null ? void 0 :
|
|
356
|
-
}
|
|
357
|
-
function enhanced_select_binding($$value) {
|
|
358
|
-
binding_callbacks[$$value ? "unshift" : "push"](() => {
|
|
359
|
-
selectRef = $$value;
|
|
360
|
-
$$invalidate(2, selectRef), $$invalidate(60, nativeListenersReady), $$invalidate(10, placeholder), $$invalidate(11, disabled), $$invalidate(9, searchable), $$invalidate(26, direction), $$invalidate(8, multiple), $$invalidate(16, virtualized), $$invalidate(34, optionRenderer), $$invalidate(28, classMap);
|
|
361
|
-
});
|
|
304
|
+
var _a, _b;
|
|
305
|
+
(_b = (_a = $.get(selectRef)) == null ? void 0 : _a.setLimitationPolicies) == null ? void 0 : _b.call(_a, policies);
|
|
362
306
|
}
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
if ("scrollToSelected" in $$props2) $$invalidate(20, scrollToSelected = $$props2.scrollToSelected);
|
|
381
|
-
if ("styles" in $$props2) $$invalidate(21, styles = $$props2.styles);
|
|
382
|
-
if ("config" in $$props2) $$invalidate(22, config = $$props2.config);
|
|
383
|
-
if ("removeButtonIcon" in $$props2) $$invalidate(23, removeButtonIcon = $$props2.removeButtonIcon);
|
|
384
|
-
if ("disabledOptionBehavior" in $$props2) $$invalidate(24, disabledOptionBehavior = $$props2.disabledOptionBehavior);
|
|
385
|
-
if ("showSelectedIndicator" in $$props2) $$invalidate(25, showSelectedIndicator = $$props2.showSelectedIndicator);
|
|
386
|
-
if ("direction" in $$props2) $$invalidate(26, direction = $$props2.direction);
|
|
387
|
-
if ("placement" in $$props2) $$invalidate(27, placement = $$props2.placement);
|
|
388
|
-
if ("className" in $$props2) $$invalidate(0, className = $$props2.className);
|
|
389
|
-
if ("style" in $$props2) $$invalidate(1, style = $$props2.style);
|
|
390
|
-
if ("classMap" in $$props2) $$invalidate(28, classMap = $$props2.classMap);
|
|
391
|
-
if ("clearable" in $$props2) $$invalidate(29, clearable = $$props2.clearable);
|
|
392
|
-
if ("clearSelectionOnClear" in $$props2) $$invalidate(30, clearSelectionOnClear = $$props2.clearSelectionOnClear);
|
|
393
|
-
if ("clearSearchOnClear" in $$props2) $$invalidate(31, clearSearchOnClear = $$props2.clearSearchOnClear);
|
|
394
|
-
if ("clearAriaLabel" in $$props2) $$invalidate(32, clearAriaLabel = $$props2.clearAriaLabel);
|
|
395
|
-
if ("clearIcon" in $$props2) $$invalidate(33, clearIcon = $$props2.clearIcon);
|
|
396
|
-
if ("optionRenderer" in $$props2) $$invalidate(34, optionRenderer = $$props2.optionRenderer);
|
|
397
|
-
if ("trackingEnabled" in $$props2) $$invalidate(35, trackingEnabled = $$props2.trackingEnabled);
|
|
398
|
-
if ("trackEvents" in $$props2) $$invalidate(36, trackEvents = $$props2.trackEvents);
|
|
399
|
-
if ("trackStyling" in $$props2) $$invalidate(37, trackStyling = $$props2.trackStyling);
|
|
400
|
-
if ("trackLimitations" in $$props2) $$invalidate(38, trackLimitations = $$props2.trackLimitations);
|
|
401
|
-
if ("emitDiagnostics" in $$props2) $$invalidate(39, emitDiagnostics = $$props2.emitDiagnostics);
|
|
402
|
-
if ("trackingMaxEntries" in $$props2) $$invalidate(40, trackingMaxEntries = $$props2.trackingMaxEntries);
|
|
403
|
-
if ("limitationPolicies" in $$props2) $$invalidate(41, limitationPolicies = $$props2.limitationPolicies);
|
|
404
|
-
if ("autoMitigateRuntimeModeSwitch" in $$props2) $$invalidate(42, autoMitigateRuntimeModeSwitch = $$props2.autoMitigateRuntimeModeSwitch);
|
|
405
|
-
};
|
|
406
|
-
$$self.$$.update = () => {
|
|
407
|
-
if ($$self.$$.dirty[0] & /*value*/
|
|
408
|
-
16) {
|
|
409
|
-
$$invalidate(62, isControlled = value !== void 0);
|
|
307
|
+
$.legacy_pre_effect(() => $.deep_read_state(value()), () => {
|
|
308
|
+
$.set(isControlled, value() !== void 0);
|
|
309
|
+
});
|
|
310
|
+
$.legacy_pre_effect(
|
|
311
|
+
() => ($.get(isControlled), $.deep_read_state(value()), $.get(internalValue)),
|
|
312
|
+
() => {
|
|
313
|
+
$.set(currentValue, $.get(isControlled) ? value() : $.get(internalValue));
|
|
314
|
+
}
|
|
315
|
+
);
|
|
316
|
+
$.legacy_pre_effect(
|
|
317
|
+
() => ($.get(nativeListenersReady), $.get(selectRef), $.deep_read_state(items())),
|
|
318
|
+
() => {
|
|
319
|
+
if ($.get(nativeListenersReady) && $.get(selectRef) && items()) {
|
|
320
|
+
if (typeof $.get(selectRef).setItems === "function") {
|
|
321
|
+
$.get(selectRef).setItems(items());
|
|
322
|
+
}
|
|
323
|
+
}
|
|
410
324
|
}
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
325
|
+
);
|
|
326
|
+
$.legacy_pre_effect(
|
|
327
|
+
() => ($.get(nativeListenersReady), $.get(selectRef), $.deep_read_state(groupedItems())),
|
|
328
|
+
() => {
|
|
329
|
+
if ($.get(nativeListenersReady) && $.get(selectRef) && groupedItems()) {
|
|
330
|
+
if (typeof $.get(selectRef).setGroupedItems === "function") {
|
|
331
|
+
$.get(selectRef).setGroupedItems(groupedItems());
|
|
332
|
+
}
|
|
333
|
+
}
|
|
416
334
|
}
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
if (
|
|
423
|
-
|
|
335
|
+
);
|
|
336
|
+
$.legacy_pre_effect(
|
|
337
|
+
() => ($.get(nativeListenersReady), $.get(selectRef), $.get(currentValue)),
|
|
338
|
+
() => {
|
|
339
|
+
if ($.get(nativeListenersReady) && $.get(selectRef) && $.get(currentValue) !== void 0) {
|
|
340
|
+
if (typeof $.get(selectRef).setSelectedValues === "function") {
|
|
341
|
+
const values = Array.isArray($.get(currentValue)) ? $.get(currentValue) : [$.get(currentValue)];
|
|
342
|
+
$.get(selectRef).setSelectedValues(values);
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
);
|
|
347
|
+
$.legacy_pre_effect(
|
|
348
|
+
() => ($.get(nativeListenersReady), $.get(selectRef), $.deep_read_state(placeholder()), $.deep_read_state(disabled()), $.deep_read_state(searchable()), $.deep_read_state(direction()), $.deep_read_state(multiple()), $.deep_read_state(virtualized()), $.deep_read_state(optionRenderer()), $.deep_read_state(classMap())),
|
|
349
|
+
() => {
|
|
350
|
+
if ($.get(nativeListenersReady) && $.get(selectRef)) {
|
|
351
|
+
if (placeholder()) $.get(selectRef).setAttribute("placeholder", placeholder());
|
|
352
|
+
if (disabled()) {
|
|
353
|
+
$.get(selectRef).setAttribute("disabled", "");
|
|
424
354
|
} else {
|
|
425
|
-
selectRef.removeAttribute("disabled");
|
|
355
|
+
$.get(selectRef).removeAttribute("disabled");
|
|
426
356
|
}
|
|
427
|
-
if (searchable) {
|
|
428
|
-
selectRef.setAttribute("searchable", "");
|
|
357
|
+
if (searchable()) {
|
|
358
|
+
$.get(selectRef).setAttribute("searchable", "");
|
|
429
359
|
} else {
|
|
430
|
-
selectRef.removeAttribute("searchable");
|
|
360
|
+
$.get(selectRef).removeAttribute("searchable");
|
|
431
361
|
}
|
|
432
|
-
if (direction) {
|
|
433
|
-
selectRef.setAttribute("dir", direction);
|
|
362
|
+
if (direction()) {
|
|
363
|
+
$.get(selectRef).setAttribute("dir", direction());
|
|
434
364
|
} else {
|
|
435
|
-
selectRef.removeAttribute("dir");
|
|
365
|
+
$.get(selectRef).removeAttribute("dir");
|
|
436
366
|
}
|
|
437
|
-
if (multiple) {
|
|
438
|
-
selectRef.setAttribute("multiple", "");
|
|
367
|
+
if (multiple()) {
|
|
368
|
+
$.get(selectRef).setAttribute("multiple", "");
|
|
439
369
|
} else {
|
|
440
|
-
selectRef.removeAttribute("multiple");
|
|
370
|
+
$.get(selectRef).removeAttribute("multiple");
|
|
441
371
|
}
|
|
442
|
-
if (virtualized) {
|
|
443
|
-
selectRef.setAttribute("virtualized", "");
|
|
372
|
+
if (virtualized()) {
|
|
373
|
+
$.get(selectRef).setAttribute("virtualized", "");
|
|
444
374
|
} else {
|
|
445
|
-
selectRef.removeAttribute("virtualized");
|
|
375
|
+
$.get(selectRef).removeAttribute("virtualized");
|
|
446
376
|
}
|
|
447
|
-
if (optionRenderer) {
|
|
448
|
-
if (selectRef.optionRenderer !== resolvedOptionRenderer) {
|
|
449
|
-
|
|
377
|
+
if (optionRenderer()) {
|
|
378
|
+
if ($.get(selectRef).optionRenderer !== resolvedOptionRenderer) {
|
|
379
|
+
$.mutate(selectRef, $.get(selectRef).optionRenderer = resolvedOptionRenderer);
|
|
450
380
|
}
|
|
451
|
-
} else if (selectRef.optionRenderer === resolvedOptionRenderer) {
|
|
452
|
-
|
|
381
|
+
} else if ($.get(selectRef).optionRenderer === resolvedOptionRenderer) {
|
|
382
|
+
$.mutate(selectRef, $.get(selectRef).optionRenderer = void 0);
|
|
453
383
|
}
|
|
454
|
-
|
|
384
|
+
$.mutate(selectRef, $.get(selectRef).classMap = classMap());
|
|
455
385
|
}
|
|
456
386
|
}
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
if (typeof selectRef.setItems === "function") {
|
|
462
|
-
selectRef.setItems(items);
|
|
463
|
-
}
|
|
464
|
-
}
|
|
387
|
+
);
|
|
388
|
+
$.legacy_pre_effect(() => ($.get(nativeListenersReady), $.get(selectRef)), () => {
|
|
389
|
+
if ($.get(nativeListenersReady) && $.get(selectRef)) {
|
|
390
|
+
updateConfig();
|
|
465
391
|
}
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
if (nativeListenersReady && selectRef && groupedItems) {
|
|
470
|
-
if (typeof selectRef.setGroupedItems === "function") {
|
|
471
|
-
selectRef.setGroupedItems(groupedItems);
|
|
472
|
-
}
|
|
473
|
-
}
|
|
474
|
-
}
|
|
475
|
-
if ($$self.$$.dirty[0] & /*selectRef*/
|
|
476
|
-
4 | $$self.$$.dirty[1] & /*nativeListenersReady*/
|
|
477
|
-
536870912 | $$self.$$.dirty[2] & /*currentValue*/
|
|
478
|
-
2) {
|
|
479
|
-
if (nativeListenersReady && selectRef && currentValue !== void 0) {
|
|
480
|
-
if (typeof selectRef.setSelectedValues === "function") {
|
|
481
|
-
const values = Array.isArray(currentValue) ? currentValue : [currentValue];
|
|
482
|
-
selectRef.setSelectedValues(values);
|
|
483
|
-
}
|
|
484
|
-
}
|
|
485
|
-
}
|
|
486
|
-
if ($$self.$$.dirty[0] & /*selectRef*/
|
|
487
|
-
4 | $$self.$$.dirty[1] & /*nativeListenersReady*/
|
|
488
|
-
536870912) {
|
|
489
|
-
if (nativeListenersReady && selectRef) {
|
|
490
|
-
updateConfig();
|
|
491
|
-
}
|
|
492
|
-
}
|
|
493
|
-
};
|
|
494
|
-
return [
|
|
495
|
-
className,
|
|
496
|
-
style,
|
|
497
|
-
selectRef,
|
|
498
|
-
listenForSelectEvents,
|
|
499
|
-
value,
|
|
500
|
-
items,
|
|
501
|
-
groupedItems,
|
|
502
|
-
defaultValue,
|
|
503
|
-
multiple,
|
|
504
|
-
searchable,
|
|
505
|
-
placeholder,
|
|
506
|
-
disabled,
|
|
507
|
-
required,
|
|
508
|
-
error,
|
|
509
|
-
infiniteScroll,
|
|
510
|
-
pageSize,
|
|
511
|
-
virtualized,
|
|
512
|
-
maxSelections,
|
|
513
|
-
selectionConfig,
|
|
514
|
-
multiSelectDisplay,
|
|
515
|
-
scrollToSelected,
|
|
516
|
-
styles,
|
|
517
|
-
config,
|
|
518
|
-
removeButtonIcon,
|
|
519
|
-
disabledOptionBehavior,
|
|
520
|
-
showSelectedIndicator,
|
|
521
|
-
direction,
|
|
522
|
-
placement,
|
|
523
|
-
classMap,
|
|
524
|
-
clearable,
|
|
525
|
-
clearSelectionOnClear,
|
|
526
|
-
clearSearchOnClear,
|
|
527
|
-
clearAriaLabel,
|
|
528
|
-
clearIcon,
|
|
529
|
-
optionRenderer,
|
|
530
|
-
trackingEnabled,
|
|
531
|
-
trackEvents,
|
|
532
|
-
trackStyling,
|
|
533
|
-
trackLimitations,
|
|
534
|
-
emitDiagnostics,
|
|
535
|
-
trackingMaxEntries,
|
|
536
|
-
limitationPolicies,
|
|
537
|
-
autoMitigateRuntimeModeSwitch,
|
|
392
|
+
});
|
|
393
|
+
$.legacy_pre_effect_reset();
|
|
394
|
+
var $$exports = {
|
|
538
395
|
open,
|
|
539
396
|
close,
|
|
540
397
|
focus,
|
|
@@ -552,137 +409,323 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
552
409
|
getTrackingSnapshot,
|
|
553
410
|
clearTracking,
|
|
554
411
|
setLimitationPolicies,
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
}
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
412
|
+
get items() {
|
|
413
|
+
return items();
|
|
414
|
+
},
|
|
415
|
+
set items($$value) {
|
|
416
|
+
items($$value);
|
|
417
|
+
$.flush();
|
|
418
|
+
},
|
|
419
|
+
get groupedItems() {
|
|
420
|
+
return groupedItems();
|
|
421
|
+
},
|
|
422
|
+
set groupedItems($$value) {
|
|
423
|
+
groupedItems($$value);
|
|
424
|
+
$.flush();
|
|
425
|
+
},
|
|
426
|
+
get value() {
|
|
427
|
+
return value();
|
|
428
|
+
},
|
|
429
|
+
set value($$value) {
|
|
430
|
+
value($$value);
|
|
431
|
+
$.flush();
|
|
432
|
+
},
|
|
433
|
+
get defaultValue() {
|
|
434
|
+
return defaultValue();
|
|
435
|
+
},
|
|
436
|
+
set defaultValue($$value) {
|
|
437
|
+
defaultValue($$value);
|
|
438
|
+
$.flush();
|
|
439
|
+
},
|
|
440
|
+
get multiple() {
|
|
441
|
+
return multiple();
|
|
442
|
+
},
|
|
443
|
+
set multiple($$value) {
|
|
444
|
+
multiple($$value);
|
|
445
|
+
$.flush();
|
|
446
|
+
},
|
|
447
|
+
get searchable() {
|
|
448
|
+
return searchable();
|
|
449
|
+
},
|
|
450
|
+
set searchable($$value) {
|
|
451
|
+
searchable($$value);
|
|
452
|
+
$.flush();
|
|
453
|
+
},
|
|
454
|
+
get placeholder() {
|
|
455
|
+
return placeholder();
|
|
456
|
+
},
|
|
457
|
+
set placeholder($$value) {
|
|
458
|
+
placeholder($$value);
|
|
459
|
+
$.flush();
|
|
460
|
+
},
|
|
461
|
+
get disabled() {
|
|
462
|
+
return disabled();
|
|
463
|
+
},
|
|
464
|
+
set disabled($$value) {
|
|
465
|
+
disabled($$value);
|
|
466
|
+
$.flush();
|
|
467
|
+
},
|
|
468
|
+
get required() {
|
|
469
|
+
return required();
|
|
470
|
+
},
|
|
471
|
+
set required($$value) {
|
|
472
|
+
required($$value);
|
|
473
|
+
$.flush();
|
|
474
|
+
},
|
|
475
|
+
get error() {
|
|
476
|
+
return error();
|
|
477
|
+
},
|
|
478
|
+
set error($$value) {
|
|
479
|
+
error($$value);
|
|
480
|
+
$.flush();
|
|
481
|
+
},
|
|
482
|
+
get infiniteScroll() {
|
|
483
|
+
return infiniteScroll();
|
|
484
|
+
},
|
|
485
|
+
set infiniteScroll($$value) {
|
|
486
|
+
infiniteScroll($$value);
|
|
487
|
+
$.flush();
|
|
488
|
+
},
|
|
489
|
+
get pageSize() {
|
|
490
|
+
return pageSize();
|
|
491
|
+
},
|
|
492
|
+
set pageSize($$value) {
|
|
493
|
+
pageSize($$value);
|
|
494
|
+
$.flush();
|
|
495
|
+
},
|
|
496
|
+
get virtualized() {
|
|
497
|
+
return virtualized();
|
|
498
|
+
},
|
|
499
|
+
set virtualized($$value) {
|
|
500
|
+
virtualized($$value);
|
|
501
|
+
$.flush();
|
|
502
|
+
},
|
|
503
|
+
get maxSelections() {
|
|
504
|
+
return maxSelections();
|
|
505
|
+
},
|
|
506
|
+
set maxSelections($$value) {
|
|
507
|
+
maxSelections($$value);
|
|
508
|
+
$.flush();
|
|
509
|
+
},
|
|
510
|
+
get selectionConfig() {
|
|
511
|
+
return selectionConfig();
|
|
512
|
+
},
|
|
513
|
+
set selectionConfig($$value) {
|
|
514
|
+
selectionConfig($$value);
|
|
515
|
+
$.flush();
|
|
516
|
+
},
|
|
517
|
+
get multiSelectDisplay() {
|
|
518
|
+
return multiSelectDisplay();
|
|
519
|
+
},
|
|
520
|
+
set multiSelectDisplay($$value) {
|
|
521
|
+
multiSelectDisplay($$value);
|
|
522
|
+
$.flush();
|
|
523
|
+
},
|
|
524
|
+
get scrollToSelected() {
|
|
525
|
+
return scrollToSelected();
|
|
526
|
+
},
|
|
527
|
+
set scrollToSelected($$value) {
|
|
528
|
+
scrollToSelected($$value);
|
|
529
|
+
$.flush();
|
|
530
|
+
},
|
|
531
|
+
get styles() {
|
|
532
|
+
return styles();
|
|
533
|
+
},
|
|
534
|
+
set styles($$value) {
|
|
535
|
+
styles($$value);
|
|
536
|
+
$.flush();
|
|
537
|
+
},
|
|
538
|
+
get config() {
|
|
539
|
+
return config();
|
|
540
|
+
},
|
|
541
|
+
set config($$value) {
|
|
542
|
+
config($$value);
|
|
543
|
+
$.flush();
|
|
544
|
+
},
|
|
545
|
+
get removeButtonIcon() {
|
|
546
|
+
return removeButtonIcon();
|
|
547
|
+
},
|
|
548
|
+
set removeButtonIcon($$value) {
|
|
549
|
+
removeButtonIcon($$value);
|
|
550
|
+
$.flush();
|
|
551
|
+
},
|
|
552
|
+
get disabledOptionBehavior() {
|
|
553
|
+
return disabledOptionBehavior();
|
|
554
|
+
},
|
|
555
|
+
set disabledOptionBehavior($$value) {
|
|
556
|
+
disabledOptionBehavior($$value);
|
|
557
|
+
$.flush();
|
|
558
|
+
},
|
|
559
|
+
get showSelectedIndicator() {
|
|
560
|
+
return showSelectedIndicator();
|
|
561
|
+
},
|
|
562
|
+
set showSelectedIndicator($$value) {
|
|
563
|
+
showSelectedIndicator($$value);
|
|
564
|
+
$.flush();
|
|
565
|
+
},
|
|
566
|
+
get direction() {
|
|
567
|
+
return direction();
|
|
568
|
+
},
|
|
569
|
+
set direction($$value) {
|
|
570
|
+
direction($$value);
|
|
571
|
+
$.flush();
|
|
572
|
+
},
|
|
573
|
+
get placement() {
|
|
574
|
+
return placement();
|
|
575
|
+
},
|
|
576
|
+
set placement($$value) {
|
|
577
|
+
placement($$value);
|
|
578
|
+
$.flush();
|
|
579
|
+
},
|
|
580
|
+
get className() {
|
|
581
|
+
return className();
|
|
582
|
+
},
|
|
583
|
+
set className($$value) {
|
|
584
|
+
className($$value);
|
|
585
|
+
$.flush();
|
|
586
|
+
},
|
|
587
|
+
get style() {
|
|
588
|
+
return style();
|
|
589
|
+
},
|
|
590
|
+
set style($$value) {
|
|
591
|
+
style($$value);
|
|
592
|
+
$.flush();
|
|
593
|
+
},
|
|
594
|
+
get classMap() {
|
|
595
|
+
return classMap();
|
|
596
|
+
},
|
|
597
|
+
set classMap($$value) {
|
|
598
|
+
classMap($$value);
|
|
599
|
+
$.flush();
|
|
600
|
+
},
|
|
601
|
+
get clearable() {
|
|
602
|
+
return clearable();
|
|
603
|
+
},
|
|
604
|
+
set clearable($$value) {
|
|
605
|
+
clearable($$value);
|
|
606
|
+
$.flush();
|
|
607
|
+
},
|
|
608
|
+
get clearSelectionOnClear() {
|
|
609
|
+
return clearSelectionOnClear();
|
|
610
|
+
},
|
|
611
|
+
set clearSelectionOnClear($$value) {
|
|
612
|
+
clearSelectionOnClear($$value);
|
|
613
|
+
$.flush();
|
|
614
|
+
},
|
|
615
|
+
get clearSearchOnClear() {
|
|
616
|
+
return clearSearchOnClear();
|
|
617
|
+
},
|
|
618
|
+
set clearSearchOnClear($$value) {
|
|
619
|
+
clearSearchOnClear($$value);
|
|
620
|
+
$.flush();
|
|
621
|
+
},
|
|
622
|
+
get clearAriaLabel() {
|
|
623
|
+
return clearAriaLabel();
|
|
624
|
+
},
|
|
625
|
+
set clearAriaLabel($$value) {
|
|
626
|
+
clearAriaLabel($$value);
|
|
627
|
+
$.flush();
|
|
628
|
+
},
|
|
629
|
+
get clearIcon() {
|
|
630
|
+
return clearIcon();
|
|
631
|
+
},
|
|
632
|
+
set clearIcon($$value) {
|
|
633
|
+
clearIcon($$value);
|
|
634
|
+
$.flush();
|
|
635
|
+
},
|
|
636
|
+
get optionRenderer() {
|
|
637
|
+
return optionRenderer();
|
|
638
|
+
},
|
|
639
|
+
set optionRenderer($$value) {
|
|
640
|
+
optionRenderer($$value);
|
|
641
|
+
$.flush();
|
|
642
|
+
},
|
|
643
|
+
get trackingEnabled() {
|
|
644
|
+
return trackingEnabled();
|
|
645
|
+
},
|
|
646
|
+
set trackingEnabled($$value) {
|
|
647
|
+
trackingEnabled($$value);
|
|
648
|
+
$.flush();
|
|
649
|
+
},
|
|
650
|
+
get trackEvents() {
|
|
651
|
+
return trackEvents();
|
|
652
|
+
},
|
|
653
|
+
set trackEvents($$value) {
|
|
654
|
+
trackEvents($$value);
|
|
655
|
+
$.flush();
|
|
656
|
+
},
|
|
657
|
+
get trackStyling() {
|
|
658
|
+
return trackStyling();
|
|
659
|
+
},
|
|
660
|
+
set trackStyling($$value) {
|
|
661
|
+
trackStyling($$value);
|
|
662
|
+
$.flush();
|
|
663
|
+
},
|
|
664
|
+
get trackLimitations() {
|
|
665
|
+
return trackLimitations();
|
|
666
|
+
},
|
|
667
|
+
set trackLimitations($$value) {
|
|
668
|
+
trackLimitations($$value);
|
|
669
|
+
$.flush();
|
|
670
|
+
},
|
|
671
|
+
get emitDiagnostics() {
|
|
672
|
+
return emitDiagnostics();
|
|
673
|
+
},
|
|
674
|
+
set emitDiagnostics($$value) {
|
|
675
|
+
emitDiagnostics($$value);
|
|
676
|
+
$.flush();
|
|
677
|
+
},
|
|
678
|
+
get trackingMaxEntries() {
|
|
679
|
+
return trackingMaxEntries();
|
|
680
|
+
},
|
|
681
|
+
set trackingMaxEntries($$value) {
|
|
682
|
+
trackingMaxEntries($$value);
|
|
683
|
+
$.flush();
|
|
684
|
+
},
|
|
685
|
+
get limitationPolicies() {
|
|
686
|
+
return limitationPolicies();
|
|
687
|
+
},
|
|
688
|
+
set limitationPolicies($$value) {
|
|
689
|
+
limitationPolicies($$value);
|
|
690
|
+
$.flush();
|
|
691
|
+
},
|
|
692
|
+
get autoMitigateRuntimeModeSwitch() {
|
|
693
|
+
return autoMitigateRuntimeModeSwitch();
|
|
694
|
+
},
|
|
695
|
+
set autoMitigateRuntimeModeSwitch($$value) {
|
|
696
|
+
autoMitigateRuntimeModeSwitch($$value);
|
|
697
|
+
$.flush();
|
|
698
|
+
},
|
|
699
|
+
$set: $.update_legacy_props,
|
|
700
|
+
$on: ($$event_name, $$event_cb) => $.add_legacy_event_listener($$props, $$event_name, $$event_cb)
|
|
701
|
+
};
|
|
702
|
+
$.init();
|
|
703
|
+
var enhanced_select = root();
|
|
704
|
+
$.action(enhanced_select, ($$node) => listenForSelectEvents == null ? void 0 : listenForSelectEvents($$node));
|
|
705
|
+
$.bind_this(enhanced_select, ($$value) => $.set(selectRef, $$value), () => $.get(selectRef));
|
|
706
|
+
$.template_effect(() => {
|
|
707
|
+
$.set_class(enhanced_select, 1, $.clsx(className()));
|
|
708
|
+
$.set_style(enhanced_select, style());
|
|
709
|
+
});
|
|
710
|
+
$.append($$anchor, enhanced_select);
|
|
711
|
+
$.bind_prop($$props, "open", open);
|
|
712
|
+
$.bind_prop($$props, "close", close);
|
|
713
|
+
$.bind_prop($$props, "focus", focus);
|
|
714
|
+
$.bind_prop($$props, "setItems", setItems);
|
|
715
|
+
$.bind_prop($$props, "setGroupedItems", setGroupedItems);
|
|
716
|
+
$.bind_prop($$props, "clear", clear);
|
|
717
|
+
$.bind_prop($$props, "clearSearch", clearSearch);
|
|
718
|
+
$.bind_prop($$props, "updateCoreConfig", updateCoreConfig);
|
|
719
|
+
$.bind_prop($$props, "setError", setError);
|
|
720
|
+
$.bind_prop($$props, "clearError", clearError);
|
|
721
|
+
$.bind_prop($$props, "setRequiredState", setRequiredState);
|
|
722
|
+
$.bind_prop($$props, "validate", validate);
|
|
723
|
+
$.bind_prop($$props, "getCapabilities", getCapabilities);
|
|
724
|
+
$.bind_prop($$props, "getKnownLimitations", getKnownLimitations);
|
|
725
|
+
$.bind_prop($$props, "getTrackingSnapshot", getTrackingSnapshot);
|
|
726
|
+
$.bind_prop($$props, "clearTracking", clearTracking);
|
|
727
|
+
$.bind_prop($$props, "setLimitationPolicies", setLimitationPolicies);
|
|
728
|
+
return $.pop($$exports);
|
|
686
729
|
}
|
|
687
730
|
export {
|
|
688
731
|
Select,
|