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