tom-select-rails 2.2.1 → 2.2.2
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.
- checksums.yaml +4 -4
- data/lib/tom-select-rails/version.rb +1 -1
- data/vendor/assets/javascripts/tom-select-rails/cjs/tom-select.complete.js +77 -39
- data/vendor/assets/javascripts/tom-select-rails/cjs/tom-select.complete.js.map +1 -1
- data/vendor/assets/javascripts/tom-select-rails/cjs/tom-select.js +77 -39
- data/vendor/assets/javascripts/tom-select-rails/cjs/tom-select.js.map +1 -1
- data/vendor/assets/javascripts/tom-select-rails/cjs/tom-select.popular.js +77 -39
- data/vendor/assets/javascripts/tom-select-rails/cjs/tom-select.popular.js.map +1 -1
- data/vendor/assets/javascripts/tom-select-rails/cjs/utils.js +2 -2
- data/vendor/assets/javascripts/tom-select-rails/cjs/utils.js.map +1 -1
- data/vendor/assets/javascripts/tom-select-rails/esm/plugins/caret_position/plugin.js +57 -8
- data/vendor/assets/javascripts/tom-select-rails/esm/plugins/caret_position/plugin.js.map +1 -1
- data/vendor/assets/javascripts/tom-select-rails/esm/plugins/change_listener/plugin.js +2 -2
- data/vendor/assets/javascripts/tom-select-rails/esm/plugins/change_listener/plugin.js.map +1 -1
- data/vendor/assets/javascripts/tom-select-rails/esm/plugins/checkbox_options/plugin.js +57 -8
- data/vendor/assets/javascripts/tom-select-rails/esm/plugins/checkbox_options/plugin.js.map +1 -1
- data/vendor/assets/javascripts/tom-select-rails/esm/plugins/clear_button/plugin.js +57 -8
- data/vendor/assets/javascripts/tom-select-rails/esm/plugins/clear_button/plugin.js.map +1 -1
- data/vendor/assets/javascripts/tom-select-rails/esm/plugins/drag_drop/plugin.js +1 -1
- data/vendor/assets/javascripts/tom-select-rails/esm/plugins/dropdown_header/plugin.js +57 -8
- data/vendor/assets/javascripts/tom-select-rails/esm/plugins/dropdown_header/plugin.js.map +1 -1
- data/vendor/assets/javascripts/tom-select-rails/esm/plugins/dropdown_input/plugin.js +58 -9
- data/vendor/assets/javascripts/tom-select-rails/esm/plugins/dropdown_input/plugin.js.map +1 -1
- data/vendor/assets/javascripts/tom-select-rails/esm/plugins/input_autogrow/plugin.js +2 -2
- data/vendor/assets/javascripts/tom-select-rails/esm/plugins/input_autogrow/plugin.js.map +1 -1
- data/vendor/assets/javascripts/tom-select-rails/esm/plugins/no_active_items/plugin.js +1 -1
- data/vendor/assets/javascripts/tom-select-rails/esm/plugins/no_backspace_delete/plugin.js +1 -1
- data/vendor/assets/javascripts/tom-select-rails/esm/plugins/optgroup_columns/plugin.js +57 -8
- data/vendor/assets/javascripts/tom-select-rails/esm/plugins/optgroup_columns/plugin.js.map +1 -1
- data/vendor/assets/javascripts/tom-select-rails/esm/plugins/remove_button/plugin.js +58 -9
- data/vendor/assets/javascripts/tom-select-rails/esm/plugins/remove_button/plugin.js.map +1 -1
- data/vendor/assets/javascripts/tom-select-rails/esm/plugins/restore_on_backspace/plugin.js +1 -1
- data/vendor/assets/javascripts/tom-select-rails/esm/plugins/virtual_scroll/plugin.js +57 -8
- data/vendor/assets/javascripts/tom-select-rails/esm/plugins/virtual_scroll/plugin.js.map +1 -1
- data/vendor/assets/javascripts/tom-select-rails/esm/tom-select.complete.js +77 -39
- data/vendor/assets/javascripts/tom-select-rails/esm/tom-select.complete.js.map +1 -1
- data/vendor/assets/javascripts/tom-select-rails/esm/tom-select.js +77 -39
- data/vendor/assets/javascripts/tom-select-rails/esm/tom-select.js.map +1 -1
- data/vendor/assets/javascripts/tom-select-rails/esm/tom-select.popular.js +77 -39
- data/vendor/assets/javascripts/tom-select-rails/esm/tom-select.popular.js.map +1 -1
- data/vendor/assets/javascripts/tom-select-rails/esm/utils.js +2 -2
- data/vendor/assets/javascripts/tom-select-rails/esm/utils.js.map +1 -1
- data/vendor/assets/javascripts/tom-select-rails/js/plugins/caret_position.js +57 -8
- data/vendor/assets/javascripts/tom-select-rails/js/plugins/caret_position.js.map +1 -1
- data/vendor/assets/javascripts/tom-select-rails/js/plugins/change_listener.js +2 -2
- data/vendor/assets/javascripts/tom-select-rails/js/plugins/change_listener.js.map +1 -1
- data/vendor/assets/javascripts/tom-select-rails/js/plugins/checkbox_options.js +57 -8
- data/vendor/assets/javascripts/tom-select-rails/js/plugins/checkbox_options.js.map +1 -1
- data/vendor/assets/javascripts/tom-select-rails/js/plugins/clear_button.js +57 -8
- data/vendor/assets/javascripts/tom-select-rails/js/plugins/clear_button.js.map +1 -1
- data/vendor/assets/javascripts/tom-select-rails/js/plugins/drag_drop.js +1 -1
- data/vendor/assets/javascripts/tom-select-rails/js/plugins/dropdown_header.js +57 -8
- data/vendor/assets/javascripts/tom-select-rails/js/plugins/dropdown_header.js.map +1 -1
- data/vendor/assets/javascripts/tom-select-rails/js/plugins/dropdown_input.js +58 -9
- data/vendor/assets/javascripts/tom-select-rails/js/plugins/dropdown_input.js.map +1 -1
- data/vendor/assets/javascripts/tom-select-rails/js/plugins/input_autogrow.js +2 -2
- data/vendor/assets/javascripts/tom-select-rails/js/plugins/input_autogrow.js.map +1 -1
- data/vendor/assets/javascripts/tom-select-rails/js/plugins/no_active_items.js +1 -1
- data/vendor/assets/javascripts/tom-select-rails/js/plugins/no_backspace_delete.js +1 -1
- data/vendor/assets/javascripts/tom-select-rails/js/plugins/optgroup_columns.js +57 -8
- data/vendor/assets/javascripts/tom-select-rails/js/plugins/optgroup_columns.js.map +1 -1
- data/vendor/assets/javascripts/tom-select-rails/js/plugins/remove_button.js +58 -9
- data/vendor/assets/javascripts/tom-select-rails/js/plugins/remove_button.js.map +1 -1
- data/vendor/assets/javascripts/tom-select-rails/js/plugins/restore_on_backspace.js +1 -1
- data/vendor/assets/javascripts/tom-select-rails/js/plugins/virtual_scroll.js +57 -8
- data/vendor/assets/javascripts/tom-select-rails/js/plugins/virtual_scroll.js.map +1 -1
- data/vendor/assets/javascripts/tom-select-rails/js/tom-select.base.js +77 -39
- data/vendor/assets/javascripts/tom-select-rails/js/tom-select.base.js.map +1 -1
- data/vendor/assets/javascripts/tom-select-rails/js/tom-select.base.min.js +132 -133
- data/vendor/assets/javascripts/tom-select-rails/js/tom-select.base.min.js.map +1 -1
- data/vendor/assets/javascripts/tom-select-rails/js/tom-select.complete.js +77 -39
- data/vendor/assets/javascripts/tom-select-rails/js/tom-select.complete.js.map +1 -1
- data/vendor/assets/javascripts/tom-select-rails/js/tom-select.complete.min.js +157 -158
- data/vendor/assets/javascripts/tom-select-rails/js/tom-select.complete.min.js.map +1 -1
- data/vendor/assets/javascripts/tom-select-rails/js/tom-select.popular.js +77 -39
- data/vendor/assets/javascripts/tom-select-rails/js/tom-select.popular.js.map +1 -1
- data/vendor/assets/javascripts/tom-select-rails/js/tom-select.popular.min.js +144 -145
- data/vendor/assets/javascripts/tom-select-rails/js/tom-select.popular.min.js.map +1 -1
- data/vendor/assets/javascripts/tom-select-rails/types/getSettings.d.ts +2 -2
- data/vendor/assets/javascripts/tom-select-rails/types/tom-select.d.ts +2 -2
- data/vendor/assets/javascripts/tom-select-rails/types/types/core.d.ts +3 -0
- data/vendor/assets/javascripts/tom-select-rails/types/utils.d.ts +1 -1
- data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.bootstrap4.css +1 -1
- data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.bootstrap5.css +1 -1
- data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.css +1 -1
- data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.default.css +1 -1
- data/vendor/assets/stylesheets/tom-select-rails/scss/tom-select.scss +1 -1
- metadata +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Tom Select v2.2.
|
|
2
|
+
* Tom Select v2.2.2
|
|
3
3
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -337,8 +337,7 @@
|
|
|
337
337
|
/** @type {TCodePoints} */
|
|
338
338
|
|
|
339
339
|
const code_points = [[0, 65535]];
|
|
340
|
-
const accent_pat = '[\u0300-\u036F\u{b7}\u{2be}
|
|
341
|
-
|
|
340
|
+
const accent_pat = '[\u0300-\u036F\u{b7}\u{2be}\u{2bc}]';
|
|
342
341
|
/** @type {TUnicodeMap} */
|
|
343
342
|
|
|
344
343
|
let unicode_map;
|
|
@@ -348,13 +347,62 @@
|
|
|
348
347
|
const max_char_length = 3;
|
|
349
348
|
/** @type {TUnicodeMap} */
|
|
350
349
|
|
|
351
|
-
const latin_convert = {
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
'
|
|
356
|
-
'
|
|
350
|
+
const latin_convert = {};
|
|
351
|
+
/** @type {TUnicodeMap} */
|
|
352
|
+
|
|
353
|
+
const latin_condensed = {
|
|
354
|
+
'/': '⁄∕',
|
|
355
|
+
'0': '߀',
|
|
356
|
+
"a": "ⱥɐɑ",
|
|
357
|
+
"aa": "ꜳ",
|
|
358
|
+
"ae": "æǽǣ",
|
|
359
|
+
"ao": "ꜵ",
|
|
360
|
+
"au": "ꜷ",
|
|
361
|
+
"av": "ꜹꜻ",
|
|
362
|
+
"ay": "ꜽ",
|
|
363
|
+
"b": "ƀɓƃ",
|
|
364
|
+
"c": "ꜿƈȼↄ",
|
|
365
|
+
"d": "đɗɖᴅƌꮷԁɦ",
|
|
366
|
+
"e": "ɛǝᴇɇ",
|
|
367
|
+
"f": "ꝼƒ",
|
|
368
|
+
"g": "ǥɠꞡᵹꝿɢ",
|
|
369
|
+
"h": "ħⱨⱶɥ",
|
|
370
|
+
"i": "ɨı",
|
|
371
|
+
"j": "ɉȷ",
|
|
372
|
+
"k": "ƙⱪꝁꝃꝅꞣ",
|
|
373
|
+
"l": "łƚɫⱡꝉꝇꞁɭ",
|
|
374
|
+
"m": "ɱɯϻ",
|
|
375
|
+
"n": "ꞥƞɲꞑᴎлԉ",
|
|
376
|
+
"o": "øǿɔɵꝋꝍᴑ",
|
|
377
|
+
"oe": "œ",
|
|
378
|
+
"oi": "ƣ",
|
|
379
|
+
"oo": "ꝏ",
|
|
380
|
+
"ou": "ȣ",
|
|
381
|
+
"p": "ƥᵽꝑꝓꝕρ",
|
|
382
|
+
"q": "ꝗꝙɋ",
|
|
383
|
+
"r": "ɍɽꝛꞧꞃ",
|
|
384
|
+
"s": "ßȿꞩꞅʂ",
|
|
385
|
+
"t": "ŧƭʈⱦꞇ",
|
|
386
|
+
"th": "þ",
|
|
387
|
+
"tz": "ꜩ",
|
|
388
|
+
"u": "ʉ",
|
|
389
|
+
"v": "ʋꝟʌ",
|
|
390
|
+
"vy": "ꝡ",
|
|
391
|
+
"w": "ⱳ",
|
|
392
|
+
"y": "ƴɏỿ",
|
|
393
|
+
"z": "ƶȥɀⱬꝣ",
|
|
394
|
+
"hv": "ƕ"
|
|
357
395
|
};
|
|
396
|
+
|
|
397
|
+
for (let latin in latin_condensed) {
|
|
398
|
+
let unicode = latin_condensed[latin] || '';
|
|
399
|
+
|
|
400
|
+
for (let i = 0; i < unicode.length; i++) {
|
|
401
|
+
let char = unicode.substring(i, i + 1);
|
|
402
|
+
latin_convert[char] = latin;
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
|
|
358
406
|
const convert_pat = new RegExp(Object.keys(latin_convert).join('|') + '|' + accent_pat, 'gu');
|
|
359
407
|
/**
|
|
360
408
|
* Initialize the unicode_map from the give code point ranges
|
|
@@ -375,38 +423,36 @@
|
|
|
375
423
|
|
|
376
424
|
const normalize = (str, form = 'NFKD') => str.normalize(form);
|
|
377
425
|
/**
|
|
378
|
-
*
|
|
426
|
+
* Remove accents without reordering string
|
|
379
427
|
* calling str.normalize('NFKD') on \u{594}\u{595}\u{596} becomes \u{596}\u{594}\u{595}
|
|
428
|
+
* via https://github.com/krisk/Fuse/issues/133#issuecomment-318692703
|
|
380
429
|
* @param {string} str
|
|
430
|
+
* @return {string}
|
|
381
431
|
*/
|
|
382
432
|
|
|
383
|
-
const
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
}, '');
|
|
393
|
-
}
|
|
394
|
-
|
|
395
|
-
return normalize(str);
|
|
433
|
+
const asciifold = str => {
|
|
434
|
+
return toArray(str).reduce(
|
|
435
|
+
/**
|
|
436
|
+
* @param {string} result
|
|
437
|
+
* @param {string} char
|
|
438
|
+
*/
|
|
439
|
+
(result, char) => {
|
|
440
|
+
return result + _asciifold(char);
|
|
441
|
+
}, '');
|
|
396
442
|
};
|
|
397
443
|
/**
|
|
398
|
-
* Remove accents
|
|
399
|
-
* via https://github.com/krisk/Fuse/issues/133#issuecomment-318692703
|
|
400
444
|
* @param {string} str
|
|
401
445
|
* @return {string}
|
|
402
446
|
*/
|
|
403
447
|
|
|
404
|
-
const
|
|
405
|
-
|
|
448
|
+
const _asciifold = str => {
|
|
449
|
+
str = normalize(str).toLowerCase().replace(convert_pat, (
|
|
406
450
|
/** @type {string} */
|
|
407
451
|
char) => {
|
|
408
452
|
return latin_convert[char] || '';
|
|
409
|
-
});
|
|
453
|
+
}); //return str;
|
|
454
|
+
|
|
455
|
+
return normalize(str, 'NFC');
|
|
410
456
|
};
|
|
411
457
|
/**
|
|
412
458
|
* Generate a list of unicode variants from the list of code points
|
|
@@ -437,13 +483,6 @@
|
|
|
437
483
|
continue;
|
|
438
484
|
}
|
|
439
485
|
|
|
440
|
-
let decomposed = normalize(composed);
|
|
441
|
-
let recomposed = normalize(decomposed, 'NFC');
|
|
442
|
-
|
|
443
|
-
if (recomposed === composed && folded === decomposed) {
|
|
444
|
-
continue;
|
|
445
|
-
}
|
|
446
|
-
|
|
447
486
|
yield {
|
|
448
487
|
folded: folded,
|
|
449
488
|
composed: composed,
|
|
@@ -1764,7 +1803,7 @@
|
|
|
1764
1803
|
}
|
|
1765
1804
|
};
|
|
1766
1805
|
/**
|
|
1767
|
-
*
|
|
1806
|
+
* Add event helper
|
|
1768
1807
|
*
|
|
1769
1808
|
*/
|
|
1770
1809
|
|
|
@@ -2242,7 +2281,6 @@
|
|
|
2242
2281
|
|
|
2243
2282
|
addEvent(control_input, 'keypress', e => self.onKeyPress(e));
|
|
2244
2283
|
addEvent(control_input, 'input', e => self.onInput(e));
|
|
2245
|
-
addEvent(focus_node, 'resize', () => self.positionDropdown(), passive_event);
|
|
2246
2284
|
addEvent(focus_node, 'blur', e => self.onBlur(e));
|
|
2247
2285
|
addEvent(focus_node, 'focus', e => self.onFocus(e));
|
|
2248
2286
|
addEvent(control_input, 'paste', e => self.onPaste(e));
|
|
@@ -4501,8 +4539,8 @@
|
|
|
4501
4539
|
|
|
4502
4540
|
html = self.settings.render[templateName].call(this, data, escape_html);
|
|
4503
4541
|
|
|
4504
|
-
if (html
|
|
4505
|
-
return
|
|
4542
|
+
if (!html) {
|
|
4543
|
+
return null;
|
|
4506
4544
|
}
|
|
4507
4545
|
|
|
4508
4546
|
html = getDom(html); // add mandatory attributes
|