@symfony/ux-autocomplete 2.23.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/LICENSE ADDED
@@ -0,0 +1,19 @@
1
+ Copyright (c) 2020-present Fabien Potencier
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is furnished
8
+ to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in all
11
+ copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,14 @@
1
+ # @symfony/ux-autocomplete
2
+
3
+ Javascript-powered auto-completion functionality for your Symfony forms!
4
+
5
+ **ℹ️ Direct installation of this package is for advanced users only.** We strongly recommend installing it through the PHP package [symfony/ux-autocomplete](https://packagist.org/packages/symfony/ux-autocomplete) in a Symfony application with Flex enabled.
6
+
7
+ If you still want to install this package directly, **make sure its version exactly matches [symfony/ux-autocomplete](https://packagist.org/packages/symfony/ux-autocomplete) PHP package version.**
8
+
9
+ ## Resources
10
+
11
+ - [Documentation](https://symfony.com/bundles/ux-autocomplete/current/index.html)
12
+ - [Report issues](https://github.com/symfony/ux/issues) and
13
+ [send Pull Requests](https://github.com/symfony/ux/pulls)
14
+ in the [main Symfony UX repository](https://github.com/symfony/ux)
@@ -0,0 +1,56 @@
1
+ import { Controller } from '@hotwired/stimulus';
2
+ import TomSelect from 'tom-select';
3
+ export interface AutocompletePreConnectOptions {
4
+ options: any;
5
+ }
6
+ export interface AutocompleteConnectOptions {
7
+ tomSelect: TomSelect;
8
+ options: any;
9
+ }
10
+ export default class extends Controller {
11
+ #private;
12
+ static values: {
13
+ url: StringConstructor;
14
+ optionsAsHtml: BooleanConstructor;
15
+ loadingMoreText: StringConstructor;
16
+ noResultsFoundText: StringConstructor;
17
+ noMoreResultsText: StringConstructor;
18
+ createOptionText: StringConstructor;
19
+ minCharacters: NumberConstructor;
20
+ tomSelectOptions: ObjectConstructor;
21
+ preload: StringConstructor;
22
+ };
23
+ readonly urlValue: string;
24
+ readonly optionsAsHtmlValue: boolean;
25
+ readonly loadingMoreTextValue: string;
26
+ readonly noMoreResultsTextValue: string;
27
+ readonly noResultsFoundTextValue: string;
28
+ readonly createOptionTextValue: string;
29
+ readonly minCharactersValue: number;
30
+ readonly hasMinCharactersValue: boolean;
31
+ readonly tomSelectOptionsValue: object;
32
+ readonly hasPreloadValue: boolean;
33
+ readonly preloadValue: string;
34
+ tomSelect: TomSelect;
35
+ private mutationObserver;
36
+ private isObserving;
37
+ private hasLoadedChoicesPreviously;
38
+ private originalOptions;
39
+ initialize(): void;
40
+ connect(): void;
41
+ initializeTomSelect(): void;
42
+ disconnect(): void;
43
+ urlValueChanged(): void;
44
+ private getMaxOptions;
45
+ get selectElement(): HTMLSelectElement | null;
46
+ get formElement(): HTMLInputElement | HTMLSelectElement;
47
+ private dispatchEvent;
48
+ get preload(): string | boolean;
49
+ private resetTomSelect;
50
+ private changeTomSelectDisabledState;
51
+ private startMutationObserver;
52
+ private stopMutationObserver;
53
+ private onMutations;
54
+ private createOptionsDataStructure;
55
+ private areOptionsEquivalent;
56
+ }
@@ -0,0 +1,389 @@
1
+ import { Controller } from '@hotwired/stimulus';
2
+ import TomSelect from 'tom-select';
3
+
4
+ /******************************************************************************
5
+ Copyright (c) Microsoft Corporation.
6
+
7
+ Permission to use, copy, modify, and/or distribute this software for any
8
+ purpose with or without fee is hereby granted.
9
+
10
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
11
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
12
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
13
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
14
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
15
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16
+ PERFORMANCE OF THIS SOFTWARE.
17
+ ***************************************************************************** */
18
+ /* global Reflect, Promise, SuppressedError, Symbol */
19
+
20
+
21
+ function __classPrivateFieldGet(receiver, state, kind, f) {
22
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
23
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
24
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
25
+ }
26
+
27
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
28
+ var e = new Error(message);
29
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
30
+ };
31
+
32
+ var _default_1_instances, _default_1_getCommonConfig, _default_1_createAutocomplete, _default_1_createAutocompleteWithHtmlContents, _default_1_createAutocompleteWithRemoteData, _default_1_stripTags, _default_1_mergeObjects, _default_1_createTomSelect;
33
+ class default_1 extends Controller {
34
+ constructor() {
35
+ super(...arguments);
36
+ _default_1_instances.add(this);
37
+ this.isObserving = false;
38
+ this.hasLoadedChoicesPreviously = false;
39
+ this.originalOptions = [];
40
+ }
41
+ initialize() {
42
+ if (!this.mutationObserver) {
43
+ this.mutationObserver = new MutationObserver((mutations) => {
44
+ this.onMutations(mutations);
45
+ });
46
+ }
47
+ }
48
+ connect() {
49
+ if (this.selectElement) {
50
+ this.originalOptions = this.createOptionsDataStructure(this.selectElement);
51
+ }
52
+ this.initializeTomSelect();
53
+ }
54
+ initializeTomSelect() {
55
+ if (this.selectElement) {
56
+ this.selectElement.setAttribute('data-skip-morph', '');
57
+ }
58
+ if (this.urlValue) {
59
+ this.tomSelect = __classPrivateFieldGet(this, _default_1_instances, "m", _default_1_createAutocompleteWithRemoteData).call(this, this.urlValue, this.hasMinCharactersValue ? this.minCharactersValue : null);
60
+ return;
61
+ }
62
+ if (this.optionsAsHtmlValue) {
63
+ this.tomSelect = __classPrivateFieldGet(this, _default_1_instances, "m", _default_1_createAutocompleteWithHtmlContents).call(this);
64
+ return;
65
+ }
66
+ this.tomSelect = __classPrivateFieldGet(this, _default_1_instances, "m", _default_1_createAutocomplete).call(this);
67
+ this.startMutationObserver();
68
+ }
69
+ disconnect() {
70
+ this.stopMutationObserver();
71
+ let currentSelectedValues = [];
72
+ if (this.selectElement) {
73
+ if (this.selectElement.multiple) {
74
+ currentSelectedValues = Array.from(this.selectElement.options)
75
+ .filter((option) => option.selected)
76
+ .map((option) => option.value);
77
+ }
78
+ else {
79
+ currentSelectedValues = [this.selectElement.value];
80
+ }
81
+ }
82
+ this.tomSelect.destroy();
83
+ if (this.selectElement) {
84
+ if (this.selectElement.multiple) {
85
+ Array.from(this.selectElement.options).forEach((option) => {
86
+ option.selected = currentSelectedValues.includes(option.value);
87
+ });
88
+ }
89
+ else {
90
+ this.selectElement.value = currentSelectedValues[0];
91
+ }
92
+ }
93
+ }
94
+ urlValueChanged() {
95
+ this.resetTomSelect();
96
+ }
97
+ getMaxOptions() {
98
+ return this.selectElement ? this.selectElement.options.length : 50;
99
+ }
100
+ get selectElement() {
101
+ if (!(this.element instanceof HTMLSelectElement)) {
102
+ return null;
103
+ }
104
+ return this.element;
105
+ }
106
+ get formElement() {
107
+ if (!(this.element instanceof HTMLInputElement) && !(this.element instanceof HTMLSelectElement)) {
108
+ throw new Error('Autocomplete Stimulus controller can only be used on an <input> or <select>.');
109
+ }
110
+ return this.element;
111
+ }
112
+ dispatchEvent(name, payload) {
113
+ this.dispatch(name, { detail: payload, prefix: 'autocomplete' });
114
+ }
115
+ get preload() {
116
+ if (!this.hasPreloadValue) {
117
+ return 'focus';
118
+ }
119
+ if (this.preloadValue === 'false') {
120
+ return false;
121
+ }
122
+ if (this.preloadValue === 'true') {
123
+ return true;
124
+ }
125
+ return this.preloadValue;
126
+ }
127
+ resetTomSelect() {
128
+ if (this.tomSelect) {
129
+ this.dispatchEvent('before-reset', { tomSelect: this.tomSelect });
130
+ this.stopMutationObserver();
131
+ const currentHtml = this.element.innerHTML;
132
+ const currentValue = this.tomSelect.getValue();
133
+ this.tomSelect.destroy();
134
+ this.element.innerHTML = currentHtml;
135
+ this.initializeTomSelect();
136
+ this.tomSelect.setValue(currentValue);
137
+ }
138
+ }
139
+ changeTomSelectDisabledState(isDisabled) {
140
+ this.stopMutationObserver();
141
+ if (isDisabled) {
142
+ this.tomSelect.disable();
143
+ }
144
+ else {
145
+ this.tomSelect.enable();
146
+ }
147
+ this.startMutationObserver();
148
+ }
149
+ startMutationObserver() {
150
+ if (!this.isObserving && this.mutationObserver) {
151
+ this.mutationObserver.observe(this.element, {
152
+ childList: true,
153
+ subtree: true,
154
+ attributes: true,
155
+ characterData: true,
156
+ attributeOldValue: true,
157
+ });
158
+ this.isObserving = true;
159
+ }
160
+ }
161
+ stopMutationObserver() {
162
+ if (this.isObserving && this.mutationObserver) {
163
+ this.mutationObserver.disconnect();
164
+ this.isObserving = false;
165
+ }
166
+ }
167
+ onMutations(mutations) {
168
+ let changeDisabledState = false;
169
+ let requireReset = false;
170
+ mutations.forEach((mutation) => {
171
+ switch (mutation.type) {
172
+ case 'attributes':
173
+ if (mutation.target === this.element && mutation.attributeName === 'disabled') {
174
+ changeDisabledState = true;
175
+ break;
176
+ }
177
+ if (mutation.target === this.element && mutation.attributeName === 'multiple') {
178
+ const isNowMultiple = this.element.hasAttribute('multiple');
179
+ const wasMultiple = mutation.oldValue === 'multiple';
180
+ if (isNowMultiple !== wasMultiple) {
181
+ requireReset = true;
182
+ }
183
+ break;
184
+ }
185
+ break;
186
+ }
187
+ });
188
+ const newOptions = this.selectElement ? this.createOptionsDataStructure(this.selectElement) : [];
189
+ const areOptionsEquivalent = this.areOptionsEquivalent(newOptions);
190
+ if (!areOptionsEquivalent || requireReset) {
191
+ this.originalOptions = newOptions;
192
+ this.resetTomSelect();
193
+ }
194
+ if (changeDisabledState) {
195
+ this.changeTomSelectDisabledState(this.formElement.disabled);
196
+ }
197
+ }
198
+ createOptionsDataStructure(selectElement) {
199
+ return Array.from(selectElement.options).map((option) => {
200
+ return {
201
+ value: option.value,
202
+ text: option.text,
203
+ };
204
+ });
205
+ }
206
+ areOptionsEquivalent(newOptions) {
207
+ const filteredOriginalOptions = this.originalOptions.filter((option) => option.value !== '');
208
+ const filteredNewOptions = newOptions.filter((option) => option.value !== '');
209
+ const originalPlaceholderOption = this.originalOptions.find((option) => option.value === '');
210
+ const newPlaceholderOption = newOptions.find((option) => option.value === '');
211
+ if (originalPlaceholderOption &&
212
+ newPlaceholderOption &&
213
+ originalPlaceholderOption.text !== newPlaceholderOption.text) {
214
+ return false;
215
+ }
216
+ if (filteredOriginalOptions.length !== filteredNewOptions.length) {
217
+ return false;
218
+ }
219
+ const normalizeOption = (option) => `${option.value}-${option.text}`;
220
+ const originalOptionsSet = new Set(filteredOriginalOptions.map(normalizeOption));
221
+ const newOptionsSet = new Set(filteredNewOptions.map(normalizeOption));
222
+ return (originalOptionsSet.size === newOptionsSet.size &&
223
+ [...originalOptionsSet].every((option) => newOptionsSet.has(option)));
224
+ }
225
+ }
226
+ _default_1_instances = new WeakSet(), _default_1_getCommonConfig = function _default_1_getCommonConfig() {
227
+ const plugins = {};
228
+ const isMultiple = !this.selectElement || this.selectElement.multiple;
229
+ if (!this.formElement.disabled && !isMultiple) {
230
+ plugins.clear_button = { title: '' };
231
+ }
232
+ if (isMultiple) {
233
+ plugins.remove_button = { title: '' };
234
+ }
235
+ if (this.urlValue) {
236
+ plugins.virtual_scroll = {};
237
+ }
238
+ const render = {
239
+ no_results: () => {
240
+ return `<div class="no-results">${this.noResultsFoundTextValue}</div>`;
241
+ },
242
+ option_create: (data, escapeData) => {
243
+ return `<div class="create">${this.createOptionTextValue.replace('%placeholder%', `<strong>${escapeData(data.input)}</strong>`)}</div>`;
244
+ },
245
+ };
246
+ const config = {
247
+ render,
248
+ plugins,
249
+ onItemAdd: () => {
250
+ this.tomSelect.setTextboxValue('');
251
+ },
252
+ closeAfterSelect: true,
253
+ onOptionAdd: (value, data) => {
254
+ let parentElement = this.tomSelect.input;
255
+ let optgroupData = null;
256
+ const optgroup = data[this.tomSelect.settings.optgroupField];
257
+ if (optgroup && this.tomSelect.optgroups) {
258
+ optgroupData = this.tomSelect.optgroups[optgroup];
259
+ if (optgroupData) {
260
+ const optgroupElement = parentElement.querySelector(`optgroup[label="${optgroupData.label}"]`);
261
+ if (optgroupElement) {
262
+ parentElement = optgroupElement;
263
+ }
264
+ }
265
+ }
266
+ const optionElement = document.createElement('option');
267
+ optionElement.value = value;
268
+ optionElement.text = data[this.tomSelect.settings.labelField];
269
+ const optionOrder = data.$order;
270
+ let orderedOption = null;
271
+ for (const [, tomSelectOption] of Object.entries(this.tomSelect.options)) {
272
+ if (tomSelectOption.$order === optionOrder) {
273
+ orderedOption = parentElement.querySelector(`:scope > option[value="${tomSelectOption[this.tomSelect.settings.valueField]}"]`);
274
+ break;
275
+ }
276
+ }
277
+ if (orderedOption) {
278
+ orderedOption.insertAdjacentElement('afterend', optionElement);
279
+ }
280
+ else if (optionOrder >= 0) {
281
+ parentElement.append(optionElement);
282
+ }
283
+ else {
284
+ parentElement.prepend(optionElement);
285
+ }
286
+ },
287
+ };
288
+ if (!this.selectElement && !this.urlValue) {
289
+ config.shouldLoad = () => false;
290
+ }
291
+ return __classPrivateFieldGet(this, _default_1_instances, "m", _default_1_mergeObjects).call(this, config, this.tomSelectOptionsValue);
292
+ }, _default_1_createAutocomplete = function _default_1_createAutocomplete() {
293
+ const config = __classPrivateFieldGet(this, _default_1_instances, "m", _default_1_mergeObjects).call(this, __classPrivateFieldGet(this, _default_1_instances, "m", _default_1_getCommonConfig).call(this), {
294
+ maxOptions: this.getMaxOptions(),
295
+ });
296
+ return __classPrivateFieldGet(this, _default_1_instances, "m", _default_1_createTomSelect).call(this, config);
297
+ }, _default_1_createAutocompleteWithHtmlContents = function _default_1_createAutocompleteWithHtmlContents() {
298
+ const commonConfig = __classPrivateFieldGet(this, _default_1_instances, "m", _default_1_getCommonConfig).call(this);
299
+ const labelField = commonConfig.labelField ?? 'text';
300
+ const config = __classPrivateFieldGet(this, _default_1_instances, "m", _default_1_mergeObjects).call(this, commonConfig, {
301
+ maxOptions: this.getMaxOptions(),
302
+ score: (search) => {
303
+ const scoringFunction = this.tomSelect.getScoreFunction(search);
304
+ return (item) => {
305
+ return scoringFunction({ ...item, text: __classPrivateFieldGet(this, _default_1_instances, "m", _default_1_stripTags).call(this, item[labelField]) });
306
+ };
307
+ },
308
+ render: {
309
+ item: (item) => `<div>${item[labelField]}</div>`,
310
+ option: (item) => `<div>${item[labelField]}</div>`,
311
+ },
312
+ });
313
+ return __classPrivateFieldGet(this, _default_1_instances, "m", _default_1_createTomSelect).call(this, config);
314
+ }, _default_1_createAutocompleteWithRemoteData = function _default_1_createAutocompleteWithRemoteData(autocompleteEndpointUrl, minCharacterLength) {
315
+ const commonConfig = __classPrivateFieldGet(this, _default_1_instances, "m", _default_1_getCommonConfig).call(this);
316
+ const labelField = commonConfig.labelField ?? 'text';
317
+ const config = __classPrivateFieldGet(this, _default_1_instances, "m", _default_1_mergeObjects).call(this, commonConfig, {
318
+ firstUrl: (query) => {
319
+ const separator = autocompleteEndpointUrl.includes('?') ? '&' : '?';
320
+ return `${autocompleteEndpointUrl}${separator}query=${encodeURIComponent(query)}`;
321
+ },
322
+ load: function (query, callback) {
323
+ const url = this.getUrl(query);
324
+ fetch(url)
325
+ .then((response) => response.json())
326
+ .then((json) => {
327
+ this.setNextUrl(query, json.next_page);
328
+ callback(json.results.options || json.results, json.results.optgroups || []);
329
+ })
330
+ .catch(() => callback([], []));
331
+ },
332
+ shouldLoad: (query) => {
333
+ if (null !== minCharacterLength) {
334
+ return query.length >= minCharacterLength;
335
+ }
336
+ if (this.hasLoadedChoicesPreviously) {
337
+ return true;
338
+ }
339
+ if (query.length > 0) {
340
+ this.hasLoadedChoicesPreviously = true;
341
+ }
342
+ return query.length >= 3;
343
+ },
344
+ optgroupField: 'group_by',
345
+ score: (search) => (item) => 1,
346
+ render: {
347
+ option: (item) => `<div>${item[labelField]}</div>`,
348
+ item: (item) => `<div>${item[labelField]}</div>`,
349
+ loading_more: () => {
350
+ return `<div class="loading-more-results">${this.loadingMoreTextValue}</div>`;
351
+ },
352
+ no_more_results: () => {
353
+ return `<div class="no-more-results">${this.noMoreResultsTextValue}</div>`;
354
+ },
355
+ no_results: () => {
356
+ return `<div class="no-results">${this.noResultsFoundTextValue}</div>`;
357
+ },
358
+ option_create: (data, escapeData) => {
359
+ return `<div class="create">${this.createOptionTextValue.replace('%placeholder%', `<strong>${escapeData(data.input)}</strong>`)}</div>`;
360
+ },
361
+ },
362
+ preload: this.preload,
363
+ });
364
+ return __classPrivateFieldGet(this, _default_1_instances, "m", _default_1_createTomSelect).call(this, config);
365
+ }, _default_1_stripTags = function _default_1_stripTags(string) {
366
+ return string.replace(/(<([^>]+)>)/gi, '');
367
+ }, _default_1_mergeObjects = function _default_1_mergeObjects(object1, object2) {
368
+ return { ...object1, ...object2 };
369
+ }, _default_1_createTomSelect = function _default_1_createTomSelect(options) {
370
+ const preConnectPayload = { options };
371
+ this.dispatchEvent('pre-connect', preConnectPayload);
372
+ const tomSelect = new TomSelect(this.formElement, options);
373
+ const connectPayload = { tomSelect, options };
374
+ this.dispatchEvent('connect', connectPayload);
375
+ return tomSelect;
376
+ };
377
+ default_1.values = {
378
+ url: String,
379
+ optionsAsHtml: Boolean,
380
+ loadingMoreText: String,
381
+ noResultsFoundText: String,
382
+ noMoreResultsText: String,
383
+ createOptionText: String,
384
+ minCharacters: Number,
385
+ tomSelectOptions: Object,
386
+ preload: String,
387
+ };
388
+
389
+ export { default_1 as default };
package/package.json ADDED
@@ -0,0 +1,52 @@
1
+ {
2
+ "name": "@symfony/ux-autocomplete",
3
+ "description": "JavaScript Autocomplete functionality for Symfony",
4
+ "license": "MIT",
5
+ "version": "2.23.0",
6
+ "keywords": [
7
+ "symfony-ux"
8
+ ],
9
+ "homepage": "https://ux.symfony.com/autocomplete",
10
+ "repository": "https://github.com/symfony/ux-autocomplete",
11
+ "type": "module",
12
+ "files": [
13
+ "dist"
14
+ ],
15
+ "main": "dist/controller.js",
16
+ "types": "dist/controller.d.ts",
17
+ "scripts": {
18
+ "build": "node ../../../bin/build_package.js .",
19
+ "watch": "node ../../../bin/build_package.js . --watch",
20
+ "test": "../../../bin/test_package.sh .",
21
+ "check": "biome check",
22
+ "ci": "biome ci"
23
+ },
24
+ "symfony": {
25
+ "controllers": {
26
+ "autocomplete": {
27
+ "main": "dist/controller.js",
28
+ "webpackMode": "eager",
29
+ "fetch": "eager",
30
+ "enabled": true,
31
+ "autoimport": {
32
+ "tom-select/dist/css/tom-select.default.css": true,
33
+ "tom-select/dist/css/tom-select.bootstrap4.css": false,
34
+ "tom-select/dist/css/tom-select.bootstrap5.css": false
35
+ }
36
+ }
37
+ },
38
+ "importmap": {
39
+ "@hotwired/stimulus": "^3.0.0",
40
+ "tom-select": "^2.2.2"
41
+ }
42
+ },
43
+ "peerDependencies": {
44
+ "@hotwired/stimulus": "^3.0.0",
45
+ "tom-select": "^2.2.2"
46
+ },
47
+ "devDependencies": {
48
+ "@hotwired/stimulus": "^3.0.0",
49
+ "tom-select": "^2.2.2",
50
+ "vitest-fetch-mock": "^0.2.2"
51
+ }
52
+ }