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