tom-select-rails 2.3.1 → 2.4.5

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.
Files changed (259) hide show
  1. checksums.yaml +4 -4
  2. data/lib/tom-select-rails/version.rb +1 -1
  3. data/vendor/assets/javascripts/tom-select-rails/cjs/constants.js +16 -0
  4. data/vendor/assets/javascripts/tom-select-rails/cjs/constants.js.map +1 -0
  5. data/vendor/assets/javascripts/tom-select-rails/cjs/contrib/highlight.js +69 -0
  6. data/vendor/assets/javascripts/tom-select-rails/cjs/contrib/highlight.js.map +1 -0
  7. data/vendor/assets/javascripts/tom-select-rails/cjs/contrib/microevent.js +64 -0
  8. data/vendor/assets/javascripts/tom-select-rails/cjs/contrib/microevent.js.map +1 -0
  9. data/vendor/assets/javascripts/tom-select-rails/cjs/contrib/microplugin.js +112 -0
  10. data/vendor/assets/javascripts/tom-select-rails/cjs/contrib/microplugin.js.map +1 -0
  11. data/vendor/assets/javascripts/tom-select-rails/cjs/defaults.js +84 -0
  12. data/vendor/assets/javascripts/tom-select-rails/cjs/defaults.js.map +1 -0
  13. data/vendor/assets/javascripts/tom-select-rails/{types → cjs}/getSettings.d.ts +2 -2
  14. data/vendor/assets/javascripts/tom-select-rails/cjs/getSettings.js +146 -0
  15. data/vendor/assets/javascripts/tom-select-rails/cjs/getSettings.js.map +1 -0
  16. data/vendor/assets/javascripts/tom-select-rails/cjs/package.json +1 -0
  17. data/vendor/assets/javascripts/tom-select-rails/{types → cjs}/plugins/caret_position/plugin.d.ts +1 -1
  18. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/caret_position/plugin.js +66 -0
  19. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/caret_position/plugin.js.map +1 -0
  20. data/vendor/assets/javascripts/tom-select-rails/{types → cjs}/plugins/change_listener/plugin.d.ts +1 -1
  21. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/change_listener/plugin.js +25 -0
  22. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/change_listener/plugin.js.map +1 -0
  23. data/vendor/assets/javascripts/tom-select-rails/{types → cjs}/plugins/checkbox_options/plugin.d.ts +2 -2
  24. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/checkbox_options/plugin.js +108 -0
  25. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/checkbox_options/plugin.js.map +1 -0
  26. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/checkbox_options/types.js +3 -0
  27. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/checkbox_options/types.js.map +1 -0
  28. data/vendor/assets/javascripts/tom-select-rails/{types → cjs}/plugins/clear_button/plugin.d.ts +2 -2
  29. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/clear_button/plugin.js +46 -0
  30. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/clear_button/plugin.js.map +1 -0
  31. data/vendor/assets/javascripts/tom-select-rails/{types → cjs}/plugins/clear_button/types.d.ts +2 -0
  32. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/clear_button/types.js +3 -0
  33. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/clear_button/types.js.map +1 -0
  34. data/vendor/assets/javascripts/tom-select-rails/{types → cjs}/plugins/drag_drop/plugin.d.ts +1 -1
  35. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/drag_drop/plugin.js +117 -0
  36. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/drag_drop/plugin.js.map +1 -0
  37. data/vendor/assets/javascripts/tom-select-rails/{types → cjs}/plugins/dropdown_header/plugin.d.ts +2 -2
  38. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/dropdown_header/plugin.js +50 -0
  39. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/dropdown_header/plugin.js.map +1 -0
  40. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/dropdown_header/types.js +3 -0
  41. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/dropdown_header/types.js.map +1 -0
  42. data/vendor/assets/javascripts/tom-select-rails/{types → cjs}/plugins/dropdown_input/plugin.d.ts +1 -1
  43. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/dropdown_input/plugin.js +77 -0
  44. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/dropdown_input/plugin.js.map +1 -0
  45. data/vendor/assets/javascripts/tom-select-rails/{types/plugins/no_backspace_delete → cjs/plugins/input_autogrow}/plugin.d.ts +1 -1
  46. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/input_autogrow/plugin.js +47 -0
  47. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/input_autogrow/plugin.js.map +1 -0
  48. data/vendor/assets/javascripts/tom-select-rails/{types → cjs}/plugins/no_active_items/plugin.d.ts +1 -1
  49. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/no_active_items/plugin.js +22 -0
  50. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/no_active_items/plugin.js.map +1 -0
  51. data/vendor/assets/javascripts/tom-select-rails/{types/plugins/input_autogrow → cjs/plugins/no_backspace_delete}/plugin.d.ts +1 -1
  52. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/no_backspace_delete/plugin.js +28 -0
  53. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/no_backspace_delete/plugin.js.map +1 -0
  54. data/vendor/assets/javascripts/tom-select-rails/{types → cjs}/plugins/optgroup_columns/plugin.d.ts +1 -1
  55. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/optgroup_columns/plugin.js +51 -0
  56. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/optgroup_columns/plugin.js.map +1 -0
  57. data/vendor/assets/javascripts/tom-select-rails/{types → cjs}/plugins/remove_button/plugin.d.ts +2 -2
  58. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/remove_button/plugin.js +61 -0
  59. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/remove_button/plugin.js.map +1 -0
  60. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/remove_button/types.js +3 -0
  61. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/remove_button/types.js.map +1 -0
  62. data/vendor/assets/javascripts/tom-select-rails/{types → cjs}/plugins/restore_on_backspace/plugin.d.ts +2 -2
  63. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/restore_on_backspace/plugin.js +24 -0
  64. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/restore_on_backspace/plugin.js.map +1 -0
  65. data/vendor/assets/javascripts/tom-select-rails/{types → cjs}/plugins/virtual_scroll/plugin.d.ts +1 -1
  66. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/virtual_scroll/plugin.js +170 -0
  67. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/virtual_scroll/plugin.js.map +1 -0
  68. data/vendor/assets/javascripts/tom-select-rails/cjs/tom-select.complete.d.ts +2 -0
  69. data/vendor/assets/javascripts/tom-select-rails/cjs/tom-select.complete.js +33 -5291
  70. data/vendor/assets/javascripts/tom-select-rails/cjs/tom-select.complete.js.map +1 -1
  71. data/vendor/assets/javascripts/tom-select-rails/{types → cjs}/tom-select.d.ts +3 -3
  72. data/vendor/assets/javascripts/tom-select-rails/cjs/tom-select.js +2128 -4255
  73. data/vendor/assets/javascripts/tom-select-rails/cjs/tom-select.js.map +1 -1
  74. data/vendor/assets/javascripts/tom-select-rails/cjs/tom-select.popular.d.ts +2 -0
  75. data/vendor/assets/javascripts/tom-select-rails/cjs/tom-select.popular.js +15 -4665
  76. data/vendor/assets/javascripts/tom-select-rails/cjs/tom-select.popular.js.map +1 -1
  77. data/vendor/assets/javascripts/tom-select-rails/{types → cjs}/types/core.d.ts +2 -2
  78. data/vendor/assets/javascripts/tom-select-rails/cjs/types/core.js +3 -0
  79. data/vendor/assets/javascripts/tom-select-rails/cjs/types/core.js.map +1 -0
  80. data/vendor/assets/javascripts/tom-select-rails/cjs/types/index.d.ts +2 -0
  81. data/vendor/assets/javascripts/tom-select-rails/cjs/types/index.js +19 -0
  82. data/vendor/assets/javascripts/tom-select-rails/cjs/types/index.js.map +1 -0
  83. data/vendor/assets/javascripts/tom-select-rails/{types → cjs}/types/settings.d.ts +4 -4
  84. data/vendor/assets/javascripts/tom-select-rails/cjs/types/settings.js +3 -0
  85. data/vendor/assets/javascripts/tom-select-rails/cjs/types/settings.js.map +1 -0
  86. data/vendor/assets/javascripts/tom-select-rails/{types → cjs}/utils.d.ts +16 -4
  87. data/vendor/assets/javascripts/tom-select-rails/cjs/utils.js +124 -112
  88. data/vendor/assets/javascripts/tom-select-rails/cjs/utils.js.map +1 -1
  89. data/vendor/assets/javascripts/tom-select-rails/{types → cjs}/vanilla.d.ts +1 -1
  90. data/vendor/assets/javascripts/tom-select-rails/cjs/vanilla.js +190 -0
  91. data/vendor/assets/javascripts/tom-select-rails/cjs/vanilla.js.map +1 -0
  92. data/vendor/assets/javascripts/tom-select-rails/esm/constants.d.ts +12 -0
  93. data/vendor/assets/javascripts/tom-select-rails/esm/constants.js +13 -0
  94. data/vendor/assets/javascripts/tom-select-rails/esm/constants.js.map +1 -0
  95. data/vendor/assets/javascripts/tom-select-rails/esm/contrib/highlight.d.ts +13 -0
  96. data/vendor/assets/javascripts/tom-select-rails/esm/contrib/highlight.js +64 -0
  97. data/vendor/assets/javascripts/tom-select-rails/esm/contrib/highlight.js.map +1 -0
  98. data/vendor/assets/javascripts/tom-select-rails/esm/contrib/microevent.d.ts +20 -0
  99. data/vendor/assets/javascripts/tom-select-rails/esm/contrib/microevent.js +61 -0
  100. data/vendor/assets/javascripts/tom-select-rails/esm/contrib/microevent.js.map +1 -0
  101. data/vendor/assets/javascripts/tom-select-rails/esm/contrib/microplugin.d.ts +71 -0
  102. data/vendor/assets/javascripts/tom-select-rails/esm/contrib/microplugin.js +109 -0
  103. data/vendor/assets/javascripts/tom-select-rails/esm/contrib/microplugin.js.map +1 -0
  104. data/vendor/assets/javascripts/tom-select-rails/esm/defaults.d.ts +52 -0
  105. data/vendor/assets/javascripts/tom-select-rails/esm/defaults.js +82 -0
  106. data/vendor/assets/javascripts/tom-select-rails/esm/defaults.js.map +1 -0
  107. data/vendor/assets/javascripts/tom-select-rails/esm/getSettings.d.ts +3 -0
  108. data/vendor/assets/javascripts/tom-select-rails/esm/getSettings.js +143 -0
  109. data/vendor/assets/javascripts/tom-select-rails/esm/getSettings.js.map +1 -0
  110. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/caret_position/plugin.d.ts +16 -0
  111. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/caret_position/plugin.js +16 -63
  112. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/caret_position/plugin.js.map +1 -1
  113. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/change_listener/plugin.d.ts +16 -0
  114. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/change_listener/plugin.js +1 -1
  115. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/change_listener/plugin.js.map +1 -1
  116. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/checkbox_options/plugin.d.ts +17 -0
  117. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/checkbox_options/plugin.js +1 -63
  118. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/checkbox_options/plugin.js.map +1 -1
  119. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/checkbox_options/types.d.ts +14 -0
  120. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/checkbox_options/types.js +2 -0
  121. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/checkbox_options/types.js.map +1 -0
  122. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/clear_button/plugin.d.ts +17 -0
  123. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/clear_button/plugin.js +4 -64
  124. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/clear_button/plugin.js.map +1 -1
  125. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/clear_button/types.d.ts +7 -0
  126. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/clear_button/types.js +2 -0
  127. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/clear_button/types.js.map +1 -0
  128. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/drag_drop/plugin.d.ts +16 -0
  129. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/drag_drop/plugin.js +1 -63
  130. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/drag_drop/plugin.js.map +1 -1
  131. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/dropdown_header/plugin.d.ts +17 -0
  132. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/dropdown_header/plugin.js +26 -88
  133. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/dropdown_header/plugin.js.map +1 -1
  134. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/dropdown_header/types.d.ts +8 -0
  135. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/dropdown_header/types.js +2 -0
  136. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/dropdown_header/types.js.map +1 -0
  137. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/dropdown_input/plugin.d.ts +16 -0
  138. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/dropdown_input/plugin.js +34 -96
  139. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/dropdown_input/plugin.js.map +1 -1
  140. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/input_autogrow/plugin.d.ts +15 -0
  141. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/input_autogrow/plugin.js +1 -1
  142. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/input_autogrow/plugin.js.map +1 -1
  143. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/no_active_items/plugin.d.ts +15 -0
  144. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/no_active_items/plugin.js +1 -1
  145. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/no_active_items/plugin.js.map +1 -1
  146. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/no_backspace_delete/plugin.d.ts +15 -0
  147. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/no_backspace_delete/plugin.js +1 -1
  148. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/no_backspace_delete/plugin.js.map +1 -1
  149. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/optgroup_columns/plugin.d.ts +16 -0
  150. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/optgroup_columns/plugin.js +1 -66
  151. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/optgroup_columns/plugin.js.map +1 -1
  152. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/remove_button/plugin.d.ts +17 -0
  153. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/remove_button/plugin.js +28 -90
  154. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/remove_button/plugin.js.map +1 -1
  155. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/remove_button/types.d.ts +6 -0
  156. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/remove_button/types.js +2 -0
  157. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/remove_button/types.js.map +1 -0
  158. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/restore_on_backspace/plugin.d.ts +21 -0
  159. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/restore_on_backspace/plugin.js +1 -1
  160. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/restore_on_backspace/plugin.js.map +1 -1
  161. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/virtual_scroll/plugin.d.ts +16 -0
  162. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/virtual_scroll/plugin.js +16 -63
  163. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/virtual_scroll/plugin.js.map +1 -1
  164. data/vendor/assets/javascripts/tom-select-rails/esm/tom-select.complete.d.ts +2 -0
  165. data/vendor/assets/javascripts/tom-select-rails/esm/tom-select.complete.js +17 -5275
  166. data/vendor/assets/javascripts/tom-select-rails/esm/tom-select.complete.js.map +1 -1
  167. data/vendor/assets/javascripts/tom-select-rails/esm/tom-select.d.ts +594 -0
  168. data/vendor/assets/javascripts/tom-select-rails/esm/tom-select.js +2123 -4251
  169. data/vendor/assets/javascripts/tom-select-rails/esm/tom-select.js.map +1 -1
  170. data/vendor/assets/javascripts/tom-select-rails/esm/tom-select.popular.d.ts +2 -0
  171. data/vendor/assets/javascripts/tom-select-rails/esm/tom-select.popular.js +8 -4658
  172. data/vendor/assets/javascripts/tom-select-rails/esm/tom-select.popular.js.map +1 -1
  173. data/vendor/assets/javascripts/tom-select-rails/esm/types/core.d.ts +49 -0
  174. data/vendor/assets/javascripts/tom-select-rails/esm/types/core.js +2 -0
  175. data/vendor/assets/javascripts/tom-select-rails/esm/types/core.js.map +1 -0
  176. data/vendor/assets/javascripts/tom-select-rails/esm/types/index.d.ts +2 -0
  177. data/vendor/assets/javascripts/tom-select-rails/esm/types/index.js +3 -0
  178. data/vendor/assets/javascripts/tom-select-rails/esm/types/index.js.map +1 -0
  179. data/vendor/assets/javascripts/tom-select-rails/esm/types/settings.d.ts +79 -0
  180. data/vendor/assets/javascripts/tom-select-rails/esm/types/settings.js +2 -0
  181. data/vendor/assets/javascripts/tom-select-rails/esm/types/settings.js.map +1 -0
  182. data/vendor/assets/javascripts/tom-select-rails/esm/utils.d.ts +95 -0
  183. data/vendor/assets/javascripts/tom-select-rails/esm/utils.js +116 -107
  184. data/vendor/assets/javascripts/tom-select-rails/esm/utils.js.map +1 -1
  185. data/vendor/assets/javascripts/tom-select-rails/esm/vanilla.d.ts +76 -0
  186. data/vendor/assets/javascripts/tom-select-rails/esm/vanilla.js +172 -0
  187. data/vendor/assets/javascripts/tom-select-rails/esm/vanilla.js.map +1 -0
  188. data/vendor/assets/javascripts/tom-select-rails/js/package.json +1 -0
  189. data/vendor/assets/javascripts/tom-select-rails/js/plugins/caret_position.js +161 -208
  190. data/vendor/assets/javascripts/tom-select-rails/js/plugins/caret_position.js.map +1 -1
  191. data/vendor/assets/javascripts/tom-select-rails/js/plugins/change_listener.js +1 -1
  192. data/vendor/assets/javascripts/tom-select-rails/js/plugins/change_listener.js.map +1 -1
  193. data/vendor/assets/javascripts/tom-select-rails/js/plugins/checkbox_options.js +1 -63
  194. data/vendor/assets/javascripts/tom-select-rails/js/plugins/checkbox_options.js.map +1 -1
  195. data/vendor/assets/javascripts/tom-select-rails/js/plugins/clear_button.js +70 -130
  196. data/vendor/assets/javascripts/tom-select-rails/js/plugins/clear_button.js.map +1 -1
  197. data/vendor/assets/javascripts/tom-select-rails/js/plugins/drag_drop.js +1 -63
  198. data/vendor/assets/javascripts/tom-select-rails/js/plugins/drag_drop.js.map +1 -1
  199. data/vendor/assets/javascripts/tom-select-rails/js/plugins/dropdown_header.js +95 -157
  200. data/vendor/assets/javascripts/tom-select-rails/js/plugins/dropdown_header.js.map +1 -1
  201. data/vendor/assets/javascripts/tom-select-rails/js/plugins/dropdown_input.js +212 -274
  202. data/vendor/assets/javascripts/tom-select-rails/js/plugins/dropdown_input.js.map +1 -1
  203. data/vendor/assets/javascripts/tom-select-rails/js/plugins/input_autogrow.js +1 -1
  204. data/vendor/assets/javascripts/tom-select-rails/js/plugins/input_autogrow.js.map +1 -1
  205. data/vendor/assets/javascripts/tom-select-rails/js/plugins/no_active_items.js +1 -1
  206. data/vendor/assets/javascripts/tom-select-rails/js/plugins/no_active_items.js.map +1 -1
  207. data/vendor/assets/javascripts/tom-select-rails/js/plugins/no_backspace_delete.js +1 -1
  208. data/vendor/assets/javascripts/tom-select-rails/js/plugins/no_backspace_delete.js.map +1 -1
  209. data/vendor/assets/javascripts/tom-select-rails/js/plugins/optgroup_columns.js +79 -144
  210. data/vendor/assets/javascripts/tom-select-rails/js/plugins/optgroup_columns.js.map +1 -1
  211. data/vendor/assets/javascripts/tom-select-rails/js/plugins/remove_button.js +132 -194
  212. data/vendor/assets/javascripts/tom-select-rails/js/plugins/remove_button.js.map +1 -1
  213. data/vendor/assets/javascripts/tom-select-rails/js/plugins/restore_on_backspace.js +1 -1
  214. data/vendor/assets/javascripts/tom-select-rails/js/plugins/restore_on_backspace.js.map +1 -1
  215. data/vendor/assets/javascripts/tom-select-rails/js/plugins/virtual_scroll.js +248 -295
  216. data/vendor/assets/javascripts/tom-select-rails/js/plugins/virtual_scroll.js.map +1 -1
  217. data/vendor/assets/javascripts/tom-select-rails/js/tom-select.base.js +835 -1106
  218. data/vendor/assets/javascripts/tom-select-rails/js/tom-select.base.js.map +1 -1
  219. data/vendor/assets/javascripts/tom-select-rails/js/tom-select.base.min.js +176 -173
  220. data/vendor/assets/javascripts/tom-select-rails/js/tom-select.base.min.js.map +1 -1
  221. data/vendor/assets/javascripts/tom-select-rails/js/tom-select.complete.js +838 -1107
  222. data/vendor/assets/javascripts/tom-select-rails/js/tom-select.complete.js.map +1 -1
  223. data/vendor/assets/javascripts/tom-select-rails/js/tom-select.complete.min.js +357 -354
  224. data/vendor/assets/javascripts/tom-select-rails/js/tom-select.complete.min.js.map +1 -1
  225. data/vendor/assets/javascripts/tom-select-rails/js/tom-select.popular.js +835 -1106
  226. data/vendor/assets/javascripts/tom-select-rails/js/tom-select.popular.js.map +1 -1
  227. data/vendor/assets/javascripts/tom-select-rails/js/tom-select.popular.min.js +336 -333
  228. data/vendor/assets/javascripts/tom-select-rails/js/tom-select.popular.min.js.map +1 -1
  229. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.bootstrap4.css +16 -13
  230. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.bootstrap4.css.map +1 -1
  231. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.bootstrap4.min.css +1 -1
  232. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.bootstrap4.min.css.map +1 -1
  233. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.bootstrap5.css +15 -12
  234. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.bootstrap5.css.map +1 -1
  235. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.bootstrap5.min.css +1 -1
  236. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.bootstrap5.min.css.map +1 -1
  237. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.css +11 -10
  238. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.css.map +1 -1
  239. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.default.css +7 -6
  240. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.default.css.map +1 -1
  241. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.default.min.css +1 -1
  242. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.default.min.css.map +1 -1
  243. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.min.css +1 -1
  244. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.min.css.map +1 -1
  245. data/vendor/assets/stylesheets/tom-select-rails/scss/_items.scss +6 -4
  246. data/vendor/assets/stylesheets/tom-select-rails/scss/tom-select.default.scss +1 -1
  247. data/vendor/assets/stylesheets/tom-select-rails/scss/tom-select.scss +6 -6
  248. metadata +153 -39
  249. data/vendor/assets/javascripts/tom-select-rails/types/tom-select.complete.d.ts +0 -2
  250. data/vendor/assets/javascripts/tom-select-rails/types/tom-select.popular.d.ts +0 -2
  251. data/vendor/assets/javascripts/tom-select-rails/types/types/index.d.ts +0 -2
  252. /data/vendor/assets/javascripts/tom-select-rails/{types → cjs}/constants.d.ts +0 -0
  253. /data/vendor/assets/javascripts/tom-select-rails/{types → cjs}/contrib/highlight.d.ts +0 -0
  254. /data/vendor/assets/javascripts/tom-select-rails/{types → cjs}/contrib/microevent.d.ts +0 -0
  255. /data/vendor/assets/javascripts/tom-select-rails/{types → cjs}/contrib/microplugin.d.ts +0 -0
  256. /data/vendor/assets/javascripts/tom-select-rails/{types → cjs}/defaults.d.ts +0 -0
  257. /data/vendor/assets/javascripts/tom-select-rails/{types → cjs}/plugins/checkbox_options/types.d.ts +0 -0
  258. /data/vendor/assets/javascripts/tom-select-rails/{types → cjs}/plugins/dropdown_header/types.d.ts +0 -0
  259. /data/vendor/assets/javascripts/tom-select-rails/{types → cjs}/plugins/remove_button/types.d.ts +0 -0
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ /**
3
+ * Plugin: "change_listener" (Tom Select)
4
+ * Copyright (c) contributors
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
7
+ * file except in compliance with the License. You may obtain a copy of the License at:
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software distributed under
11
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
12
+ * ANY KIND, either express or implied. See the License for the specific language
13
+ * governing permissions and limitations under the License.
14
+ *
15
+ */
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.default = default_1;
18
+ const utils_ts_1 = require("../../utils.js");
19
+ function default_1() {
20
+ (0, utils_ts_1.addEvent)(this.input, 'change', () => {
21
+ this.sync();
22
+ });
23
+ }
24
+ ;
25
+ //# sourceMappingURL=plugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../../../src/plugins/change_listener/plugin.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;GAaG;;AAKH,4BAIC;AAND,6CAA0C;AAE1C;IACC,IAAA,mBAAQ,EAAC,IAAI,CAAC,KAAK,EAAC,QAAQ,EAAC,GAAE,EAAE;QAChC,IAAI,CAAC,IAAI,EAAE,CAAC;IACb,CAAC,CAAC,CAAC;AACJ,CAAC;AAAA,CAAC"}
@@ -12,6 +12,6 @@
12
12
  * governing permissions and limitations under the License.
13
13
  *
14
14
  */
15
- import TomSelect from '../../tom-select';
16
- import { CBOptions } from './types';
15
+ import type TomSelect from '../../tom-select.ts';
16
+ import { CBOptions } from './types.ts';
17
17
  export default function (this: TomSelect, userOptions: CBOptions): void;
@@ -0,0 +1,108 @@
1
+ "use strict";
2
+ /**
3
+ * Plugin: "checkbox_options" (Tom Select)
4
+ * Copyright (c) contributors
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
7
+ * file except in compliance with the License. You may obtain a copy of the License at:
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software distributed under
11
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
12
+ * ANY KIND, either express or implied. See the License for the specific language
13
+ * governing permissions and limitations under the License.
14
+ *
15
+ */
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.default = default_1;
18
+ const utils_ts_1 = require("../../utils.js");
19
+ const vanilla_ts_1 = require("../../vanilla.js");
20
+ function default_1(userOptions) {
21
+ var self = this;
22
+ var orig_onOptionSelect = self.onOptionSelect;
23
+ self.settings.hideSelected = false;
24
+ const cbOptions = Object.assign({
25
+ // so that the user may add different ones as well
26
+ className: "tomselect-checkbox",
27
+ // the following default to the historic plugin's values
28
+ checkedClassNames: undefined,
29
+ uncheckedClassNames: undefined,
30
+ }, userOptions);
31
+ var UpdateChecked = function (checkbox, toCheck) {
32
+ if (toCheck) {
33
+ checkbox.checked = true;
34
+ if (cbOptions.uncheckedClassNames) {
35
+ checkbox.classList.remove(...cbOptions.uncheckedClassNames);
36
+ }
37
+ if (cbOptions.checkedClassNames) {
38
+ checkbox.classList.add(...cbOptions.checkedClassNames);
39
+ }
40
+ }
41
+ else {
42
+ checkbox.checked = false;
43
+ if (cbOptions.checkedClassNames) {
44
+ checkbox.classList.remove(...cbOptions.checkedClassNames);
45
+ }
46
+ if (cbOptions.uncheckedClassNames) {
47
+ checkbox.classList.add(...cbOptions.uncheckedClassNames);
48
+ }
49
+ }
50
+ };
51
+ // update the checkbox for an option
52
+ var UpdateCheckbox = function (option) {
53
+ setTimeout(() => {
54
+ var checkbox = option.querySelector('input.' + cbOptions.className);
55
+ if (checkbox instanceof HTMLInputElement) {
56
+ UpdateChecked(checkbox, option.classList.contains('selected'));
57
+ }
58
+ }, 1);
59
+ };
60
+ // add checkbox to option template
61
+ self.hook('after', 'setupTemplates', () => {
62
+ var orig_render_option = self.settings.render.option;
63
+ self.settings.render.option = ((data, escape_html) => {
64
+ var rendered = (0, vanilla_ts_1.getDom)(orig_render_option.call(self, data, escape_html));
65
+ var checkbox = document.createElement('input');
66
+ if (cbOptions.className) {
67
+ checkbox.classList.add(cbOptions.className);
68
+ }
69
+ checkbox.addEventListener('click', function (evt) {
70
+ (0, utils_ts_1.preventDefault)(evt);
71
+ });
72
+ checkbox.type = 'checkbox';
73
+ const hashed = (0, utils_ts_1.hash_key)(data[self.settings.valueField]);
74
+ UpdateChecked(checkbox, !!(hashed && self.items.indexOf(hashed) > -1));
75
+ rendered.prepend(checkbox);
76
+ return rendered;
77
+ });
78
+ });
79
+ // uncheck when item removed
80
+ self.on('item_remove', (value) => {
81
+ var option = self.getOption(value);
82
+ if (option) { // if dropdown hasn't been opened yet, the option won't exist
83
+ option.classList.remove('selected'); // selected class won't be removed yet
84
+ UpdateCheckbox(option);
85
+ }
86
+ });
87
+ // check when item added
88
+ self.on('item_add', (value) => {
89
+ var option = self.getOption(value);
90
+ if (option) { // if dropdown hasn't been opened yet, the option won't exist
91
+ UpdateCheckbox(option);
92
+ }
93
+ });
94
+ // remove items when selected option is clicked
95
+ self.hook('instead', 'onOptionSelect', (evt, option) => {
96
+ if (option.classList.contains('selected')) {
97
+ option.classList.remove('selected');
98
+ self.removeItem(option.dataset.value);
99
+ self.refreshOptions();
100
+ (0, utils_ts_1.preventDefault)(evt, true);
101
+ return;
102
+ }
103
+ orig_onOptionSelect.call(self, evt, option);
104
+ UpdateCheckbox(option);
105
+ });
106
+ }
107
+ ;
108
+ //# sourceMappingURL=plugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../../../src/plugins/checkbox_options/plugin.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;GAaG;;AASH,4BA2GC;AAhHD,6CAA0D;AAC1D,iDAA0C;AAI1C,mBAAwC,WAAqB;IAC5D,IA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AAE,MAAM,CAAC,CAAC;QAE5C,cAAc,CAAC,MAAM,CAAC,CAAC;IACxB,CAAC,CAAC,CAAC;AAEJ,CAAC;AAAA,CAAC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/plugins/checkbox_options/types.ts"],"names":[],"mappings":""}
@@ -12,6 +12,6 @@
12
12
  * governing permissions and limitations under the License.
13
13
  *
14
14
  */
15
- import TomSelect from '../../tom-select';
16
- import { CBOptions } from './types';
15
+ import type TomSelect from '../../tom-select.ts';
16
+ import { CBOptions } from './types.ts';
17
17
  export default function (this: TomSelect, userOptions: CBOptions): void;
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ /**
3
+ * Plugin: "dropdown_header" (Tom Select)
4
+ * Copyright (c) contributors
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
7
+ * file except in compliance with the License. You may obtain a copy of the License at:
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software distributed under
11
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
12
+ * ANY KIND, either express or implied. See the License for the specific language
13
+ * governing permissions and limitations under the License.
14
+ *
15
+ */
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.default = default_1;
18
+ const vanilla_ts_1 = require("../../vanilla.js");
19
+ function default_1(userOptions) {
20
+ const self = this;
21
+ const options = Object.assign({
22
+ className: 'clear-button',
23
+ title: 'Clear All',
24
+ role: 'button',
25
+ tabindex: 0,
26
+ html: (data) => {
27
+ return `<div class="${data.className}" title="${data.title}" role="${data.role}" tabindex="${data.tabindex}">&times;</div>`;
28
+ }
29
+ }, userOptions);
30
+ self.on('initialize', () => {
31
+ var button = (0, vanilla_ts_1.getDom)(options.html(options));
32
+ button.addEventListener('click', (evt) => {
33
+ if (self.isLocked)
34
+ return;
35
+ self.clear();
36
+ if (self.settings.mode === 'single' && self.settings.allowEmptyOption) {
37
+ self.addItem('');
38
+ }
39
+ evt.preventDefault();
40
+ evt.stopPropagation();
41
+ });
42
+ self.control.appendChild(button);
43
+ });
44
+ }
45
+ ;
46
+ //# sourceMappingURL=plugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../../../src/plugins/clear_button/plugin.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;GAaG;;AAMH,4BAgCC;AAnCD,iDAA0C;AAG1C,mBAAwC,WAAqB;IAC5D,MAAM,IAAI,GAAG,IAAI,CAAC;IAElB,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC;QAC7B,SAAS,EAAE,cAAc;QACzB,KAAK,EAAE,WAAW;QAClB,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,CAAC;QACX,IAAI,EAAE,CAAC,IAAc,EAAE,EAAE;YAEzB,OAAO,eAAe,IAAI,CAAC,SAAS,YAAY,IAAI,CAAC,KAAK,WAAW,IAAI,CAAC,IAAI,eAAe,IAAI,CAAC,QAAQ,iBAAiB,CAAC;QAC5H,CAAC;KACD,EAAE,WAAW,CAAC,CAAC;IAEhB,IAAI,CAAC,EAAE,CAAC,YAAY,EAAC,GAAE,EAAE;QACxB,IAAI,MAAM,GAAG,IAAA,mBAAM,EAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;QAC3C,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAC,CAAC,GAAG,EAAC,EAAE;YAEtC,IAAI,IAAI,CAAC,QAAQ;gBAAG,OAAO;YAE3B,IAAI,CAAC,KAAK,EAAE,CAAC;YAEb,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC,gBAAgB,EAAE,CAAC;gBACvE,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;YAClB,CAAC;YAED,GAAG,CAAC,cAAc,EAAE,CAAC;YACrB,GAAG,CAAC,eAAe,EAAE,CAAC;QACvB,CAAC,CAAC,CAAC;QACH,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IAClC,CAAC,CAAC,CAAC;AAEJ,CAAC;AAAA,CAAC"}
@@ -1,5 +1,7 @@
1
1
  export type CBOptions = {
2
2
  className?: string;
3
3
  title?: string;
4
+ role?: string;
5
+ tabindex?: number;
4
6
  html?: (data: CBOptions) => string;
5
7
  };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/plugins/clear_button/types.ts"],"names":[],"mappings":""}
@@ -12,5 +12,5 @@
12
12
  * governing permissions and limitations under the License.
13
13
  *
14
14
  */
15
- import TomSelect from '../../tom-select';
15
+ import type TomSelect from '../../tom-select.ts';
16
16
  export default function (this: TomSelect): void;
@@ -0,0 +1,117 @@
1
+ "use strict";
2
+ /**
3
+ * Plugin: "drag_drop" (Tom Select)
4
+ * Copyright (c) contributors
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
7
+ * file except in compliance with the License. You may obtain a copy of the License at:
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software distributed under
11
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
12
+ * ANY KIND, either express or implied. See the License for the specific language
13
+ * governing permissions and limitations under the License.
14
+ *
15
+ */
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.default = default_1;
18
+ const utils_ts_1 = require("../../utils.js");
19
+ const vanilla_ts_1 = require("../../vanilla.js");
20
+ const insertAfter = (referenceNode, newNode) => {
21
+ var _a;
22
+ (_a = referenceNode.parentNode) === null || _a === void 0 ? void 0 : _a.insertBefore(newNode, referenceNode.nextSibling);
23
+ };
24
+ const insertBefore = (referenceNode, newNode) => {
25
+ var _a;
26
+ (_a = referenceNode.parentNode) === null || _a === void 0 ? void 0 : _a.insertBefore(newNode, referenceNode);
27
+ };
28
+ const isBefore = (referenceNode, newNode) => {
29
+ do {
30
+ newNode = newNode === null || newNode === void 0 ? void 0 : newNode.previousElementSibling;
31
+ if (referenceNode == newNode) {
32
+ return true;
33
+ }
34
+ } while (newNode && newNode.previousElementSibling);
35
+ return false;
36
+ };
37
+ function default_1() {
38
+ var self = this;
39
+ if (self.settings.mode !== 'multi')
40
+ return;
41
+ var orig_lock = self.lock;
42
+ var orig_unlock = self.unlock;
43
+ let sortable = true;
44
+ let drag_item;
45
+ /**
46
+ * Add draggable attribute to item
47
+ */
48
+ self.hook('after', 'setupTemplates', () => {
49
+ var orig_render_item = self.settings.render.item;
50
+ self.settings.render.item = (data, escape) => {
51
+ const item = (0, vanilla_ts_1.getDom)(orig_render_item.call(self, data, escape));
52
+ (0, vanilla_ts_1.setAttr)(item, { 'draggable': 'true' });
53
+ // prevent doc_mousedown (see tom-select.ts)
54
+ const mousedown = (evt) => {
55
+ if (!sortable)
56
+ (0, utils_ts_1.preventDefault)(evt);
57
+ evt.stopPropagation();
58
+ };
59
+ const dragStart = (evt) => {
60
+ drag_item = item;
61
+ setTimeout(() => {
62
+ item.classList.add('ts-dragging');
63
+ }, 0);
64
+ };
65
+ const dragOver = (evt) => {
66
+ evt.preventDefault();
67
+ item.classList.add('ts-drag-over');
68
+ moveitem(item, drag_item);
69
+ };
70
+ const dragLeave = () => {
71
+ item.classList.remove('ts-drag-over');
72
+ };
73
+ const moveitem = (targetitem, dragitem) => {
74
+ if (dragitem === undefined)
75
+ return;
76
+ if (isBefore(dragitem, item)) {
77
+ insertAfter(targetitem, dragitem);
78
+ }
79
+ else {
80
+ insertBefore(targetitem, dragitem);
81
+ }
82
+ };
83
+ const dragend = () => {
84
+ document.querySelectorAll('.ts-drag-over').forEach(el => el.classList.remove('ts-drag-over'));
85
+ drag_item === null || drag_item === void 0 ? void 0 : drag_item.classList.remove('ts-dragging');
86
+ drag_item = undefined;
87
+ var values = [];
88
+ self.control.querySelectorAll(`[data-value]`).forEach((el) => {
89
+ if (el.dataset.value) {
90
+ let value = el.dataset.value;
91
+ if (value) {
92
+ values.push(value);
93
+ }
94
+ }
95
+ });
96
+ self.setValue(values);
97
+ };
98
+ (0, utils_ts_1.addEvent)(item, 'mousedown', mousedown);
99
+ (0, utils_ts_1.addEvent)(item, 'dragstart', dragStart);
100
+ (0, utils_ts_1.addEvent)(item, 'dragenter', dragOver);
101
+ (0, utils_ts_1.addEvent)(item, 'dragover', dragOver);
102
+ (0, utils_ts_1.addEvent)(item, 'dragleave', dragLeave);
103
+ (0, utils_ts_1.addEvent)(item, 'dragend', dragend);
104
+ return item;
105
+ };
106
+ });
107
+ self.hook('instead', 'lock', () => {
108
+ sortable = false;
109
+ return orig_lock.call(self);
110
+ });
111
+ self.hook('instead', 'unlock', () => {
112
+ sortable = true;
113
+ return orig_unlock.call(self);
114
+ });
115
+ }
116
+ ;
117
+ //# sourceMappingURL=plugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../../../src/plugins/drag_drop/plugin.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;GAaG;;AA8BH,4BAmGC;AA7HD,6CAAuE;AACvE,iDAAmD;AAGnD,MAAM,WAAW,GAAG,CAAC,aAAqB,EAAE,OAAe,EAAE,EAAE;;IAC9D,MAAA,aAAa,CAAC,UAAU,0CAAE,YAAY,CAAC,OAAO,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC;AAC5E,CAAC,CAAA;AAED,MAAM,YAAY,GAAG,CAAC,aAAqB,EAAE,OAAe,EAAE,EAAE;;IAC/D,MAAA,aAAa,CAAC,UAAU,0CAAE,YAAY,CAAC,OAAO,EAAE,aAAa,CA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C,IAAI,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC,CAAC,CAAC;AAEJ,CAAC;AAAA,CAAC"}
@@ -12,6 +12,6 @@
12
12
  * governing permissions and limitations under the License.
13
13
  *
14
14
  */
15
- import TomSelect from '../../tom-select';
16
- import { DHOptions } from './types';
15
+ import type TomSelect from '../../tom-select.ts';
16
+ import { DHOptions } from './types.ts';
17
17
  export default function (this: TomSelect, userOptions: DHOptions): void;
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ /**
3
+ * Plugin: "dropdown_header" (Tom Select)
4
+ * Copyright (c) contributors
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
7
+ * file except in compliance with the License. You may obtain a copy of the License at:
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software distributed under
11
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
12
+ * ANY KIND, either express or implied. See the License for the specific language
13
+ * governing permissions and limitations under the License.
14
+ *
15
+ */
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.default = default_1;
18
+ const vanilla_ts_1 = require("../../vanilla.js");
19
+ const utils_ts_1 = require("../../utils.js");
20
+ function default_1(userOptions) {
21
+ const self = this;
22
+ const options = Object.assign({
23
+ title: 'Untitled',
24
+ headerClass: 'dropdown-header',
25
+ titleRowClass: 'dropdown-header-title',
26
+ labelClass: 'dropdown-header-label',
27
+ closeClass: 'dropdown-header-close',
28
+ html: (data) => {
29
+ return ('<div class="' + data.headerClass + '">' +
30
+ '<div class="' + data.titleRowClass + '">' +
31
+ '<span class="' + data.labelClass + '">' + data.title + '</span>' +
32
+ '<a class="' + data.closeClass + '">&times;</a>' +
33
+ '</div>' +
34
+ '</div>');
35
+ }
36
+ }, userOptions);
37
+ self.on('initialize', () => {
38
+ var header = (0, vanilla_ts_1.getDom)(options.html(options));
39
+ var close_link = header.querySelector('.' + options.closeClass);
40
+ if (close_link) {
41
+ close_link.addEventListener('click', (evt) => {
42
+ (0, utils_ts_1.preventDefault)(evt, true);
43
+ self.close();
44
+ });
45
+ }
46
+ self.dropdown.insertBefore(header, self.dropdown.firstChild);
47
+ });
48
+ }
49
+ ;
50
+ //# sourceMappingURL=plugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../../../src/plugins/dropdown_header/plugin.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;GAaG;;AAOH,4BAoCC;AAxCD,iDAA0C;AAC1C,6CAAgD;AAGhD,mBAAwC,WAAqB;IAC5D,MAAM,IAAI,GAAG,IAAI,CAAC;IAElB,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC;QAC7B,KAAK,EAAW,UAAU;QAC1B,WAAW,EAAK,iBAAiB;QACjC,aAAa,EAAG,uBAAuB;QACvC,UAAU,EAAM,uBAAuB;QACvC,UAAU,EAAM,uBAAuB;QAEvC,IAAI,EAAE,CAAC,IAAc,EAAE,EAAE;YACxB,OAAO,CACN,cAAc,GAAG,IAAI,CAAC,WAAW,GAAG,IAAI;gBACvC,cAAc,GAAG,IAAI,CAAC,aAAa,GAAG,IAAI;gBACzC,eAAe,GAAG,IAAI,CAAC,UAAU,GAAG,IAAI,GAAG,IAAI,CAAC,KAAK,GAAG,SAAS;gBACjE,YAAY,GAAG,IAAI,CAAC,UAAU,GAAG,eAAe;gBACjD,QAAQ;gBACT,QAAQ,CACR,CAAC;QACH,CAAC;KACD,EAAE,WAAW,CAAC,CAAC;IAEhB,IAAI,CAAC,EAAE,CAAC,YAAY,EAAC,GAAE,EAAE;QACxB,IAAI,MAAM,GAAG,IAAA,mBAAM,EAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;QAE3C,IAAI,UAAU,GAAG,MAAM,CAAC,aAAa,CAAC,GAAG,GAAC,OAAO,CAAC,UAAU,CAAC,CAAC;QAC9D,IAAI,UAAU,EAAE,CAAC;YAChB,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAC,CAAC,GAAG,EAAC,EAAE;gBAC1C,IAAA,yBAAc,EAAC,GAAG,EAAC,IAAI,CAAC,CAAC;gBACzB,IAAI,CAAC,KAAK,EAAE,CAAC;YACd,CAAC,CAAC,CAAC;QACJ,CAAC;QAED,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;IAC9D,CAAC,CAAC,CAAC;AAEJ,CAAC;AAAA,CAAC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/plugins/dropdown_header/types.ts"],"names":[],"mappings":""}
@@ -12,5 +12,5 @@
12
12
  * governing permissions and limitations under the License.
13
13
  *
14
14
  */
15
- import TomSelect from '../../tom-select';
15
+ import type TomSelect from '../../tom-select.ts';
16
16
  export default function (this: TomSelect): void;
@@ -0,0 +1,77 @@
1
+ "use strict";
2
+ /**
3
+ * Plugin: "dropdown_input" (Tom Select)
4
+ * Copyright (c) contributors
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
7
+ * file except in compliance with the License. You may obtain a copy of the License at:
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software distributed under
11
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
12
+ * ANY KIND, either express or implied. See the License for the specific language
13
+ * governing permissions and limitations under the License.
14
+ *
15
+ */
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.default = default_1;
18
+ const constants = require("../../constants.js");
19
+ const vanilla_ts_1 = require("../../vanilla.js");
20
+ const utils_ts_1 = require("../../utils.js");
21
+ function default_1() {
22
+ const self = this;
23
+ self.settings.shouldOpen = true; // make sure the input is shown even if there are no options to display in the dropdown
24
+ self.hook('before', 'setup', () => {
25
+ self.focus_node = self.control;
26
+ (0, vanilla_ts_1.addClasses)(self.control_input, 'dropdown-input');
27
+ const div = (0, vanilla_ts_1.getDom)('<div class="dropdown-input-wrap">');
28
+ div.append(self.control_input);
29
+ self.dropdown.insertBefore(div, self.dropdown.firstChild);
30
+ // set a placeholder in the select control
31
+ const placeholder = (0, vanilla_ts_1.getDom)('<input class="items-placeholder" tabindex="-1" />');
32
+ placeholder.placeholder = self.settings.placeholder || '';
33
+ self.control.append(placeholder);
34
+ });
35
+ self.on('initialize', () => {
36
+ // set tabIndex on control to -1, otherwise [shift+tab] will put focus right back on control_input
37
+ self.control_input.addEventListener('keydown', (evt) => {
38
+ //addEvent(self.control_input,'keydown' as const,(evt:KeyboardEvent) =>{
39
+ switch (evt.keyCode) {
40
+ case constants.KEY_ESC:
41
+ if (self.isOpen) {
42
+ (0, utils_ts_1.preventDefault)(evt, true);
43
+ self.close();
44
+ }
45
+ self.clearActiveItems();
46
+ return;
47
+ case constants.KEY_TAB:
48
+ self.focus_node.tabIndex = -1;
49
+ break;
50
+ }
51
+ return self.onKeyDown.call(self, evt);
52
+ });
53
+ self.on('blur', () => {
54
+ self.focus_node.tabIndex = self.isDisabled ? -1 : self.tabIndex;
55
+ });
56
+ // give the control_input focus when the dropdown is open
57
+ self.on('dropdown_open', () => {
58
+ self.control_input.focus();
59
+ });
60
+ // prevent onBlur from closing when focus is on the control_input
61
+ const orig_onBlur = self.onBlur;
62
+ self.hook('instead', 'onBlur', (evt) => {
63
+ if (evt && evt.relatedTarget == self.control_input)
64
+ return;
65
+ return orig_onBlur.call(self);
66
+ });
67
+ (0, utils_ts_1.addEvent)(self.control_input, 'blur', () => self.onBlur());
68
+ // return focus to control to allow further keyboard input
69
+ self.hook('before', 'close', () => {
70
+ if (!self.isOpen)
71
+ return;
72
+ self.focus_node.focus({ preventScroll: true });
73
+ });
74
+ });
75
+ }
76
+ ;
77
+ //#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,QAAQ,EAAC,OAAO,EAAC,GAAG,EAAE;YAE/B,IAAI,CAAC,IAAI,CAAC,MAAM;gBAAG,OAAO;YAC1B,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,EAAC,aAAa,EAAE,IAAI,EAAC,CAAC,CAAC;QAC9C,CAAC,CAAC,CAAC;IAEJ,CAAC,CAAC,CAAC;AAEJ,CAAC;AAAA,CAAC"}
@@ -11,5 +11,5 @@
11
11
  * governing permissions and limitations under the License.
12
12
  *
13
13
  */
14
- import TomSelect from '../../tom-select';
14
+ import type TomSelect from '../../tom-select.ts';
15
15
  export default function (this: TomSelect): void;
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ /**
3
+ * Plugin: "input_autogrow" (Tom Select)
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
6
+ * file except in compliance with the License. You may obtain a copy of the License at:
7
+ * http://www.apache.org/licenses/LICENSE-2.0
8
+ *
9
+ * Unless required by applicable law or agreed to in writing, software distributed under
10
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
11
+ * ANY KIND, either express or implied. See the License for the specific language
12
+ * governing permissions and limitations under the License.
13
+ *
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.default = default_1;
17
+ const utils_ts_1 = require("../../utils.js");
18
+ function default_1() {
19
+ var self = this;
20
+ self.on('initialize', () => {
21
+ var test_input = document.createElement('span');
22
+ var control = self.control_input;
23
+ test_input.style.cssText = 'position:absolute; top:-99999px; left:-99999px; width:auto; padding:0; white-space:pre; ';
24
+ self.wrapper.appendChild(test_input);
25
+ var transfer_styles = ['letterSpacing', 'fontSize', 'fontFamily', 'fontWeight', 'textTransform'];
26
+ for (const style_name of transfer_styles) {
27
+ // @ts-ignore TS7015 https://stackoverflow.com/a/50506154/697576
28
+ test_input.style[style_name] = control.style[style_name];
29
+ }
30
+ /**
31
+ * Set the control width
32
+ *
33
+ */
34
+ var resize = () => {
35
+ test_input.textContent = control.value;
36
+ control.style.width = test_input.clientWidth + 'px';
37
+ };
38
+ resize();
39
+ self.on('update item_add item_remove', resize);
40
+ (0, utils_ts_1.addEvent)(control, 'input', resize);
41
+ (0, utils_ts_1.addEvent)(control, 'keyup', resize);
42
+ (0, utils_ts_1.addEvent)(control, 'blur', resize);
43
+ (0, utils_ts_1.addEvent)(control, 'update', resize);
44
+ });
45
+ }
46
+ ;
47
+ //# sourceMappingURL=plugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../../../src/plugins/input_autogrow/plugin.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;GAYG;;AAKH,4BAsCC;AAxCD,6CAA0C;AAE1C;IACC,IAAI,IAAI,GAAO,IAAI,CAAC;IAEpB,IAAI,CAAC,EAAE,CAAC,YAAY,EAAC,GAAE,EAAE;QAGxB,IAAI,UAAU,GAAM,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;QACnD,IAAI,OAAO,GAAO,IAAI,CAAC,aAAa,CAAC;QACrC,UAAU,CAAC,KAAK,CAAC,OAAO,GAAG,0FAA0F,CAAC;QAEtH,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;QAGrC,IAAI,eAAe,GAAK,CAAE,eAAe,EAAE,UAAU,EAAE,YAAY,EAAE,YAAY,EAAE,eAAe,CAAE,CAAC;QAErG,KAAK,MAAM,UAAU,IAAI,eAAe,EAAE,CAAC;YAC1C,gEAAgE;YAChE,UAAU,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;QAC1D,CAAC;QAGD;;;WAGG;QACH,IAAI,MAAM,GAAG,GAAE,EAAE;YAChB,UAAU,CAAC,WAAW,GAAG,OAAO,CAAC,KAAK,CAAC;YACvC,OAAO,CAAC,KAAK,CAAC,KAAK,GAAI,UAAU,CAAC,WAAW,GAAC,IAAI,CAAC;QACpD,CAAC,CAAC;QAEF,MAAM,EAAE,CAAC;QACT,IAAI,CAAC,EAAE,CAAC,6BAA6B,EAAC,MAAM,CAAC,CAAC;QAC9C,IAAA,mBAAQ,EAAC,OAAO,EAAC,OAAO,EAAE,MAAM,CAAE,CAAC;QACnC,IAAA,mBAAQ,EAAC,OAAO,EAAC,OAAO,EAAE,MAAM,CAAE,CAAC;QACnC,IAAA,mBAAQ,EAAC,OAAO,EAAC,MAAM,EAAE,MAAM,CAAE,CAAC;QAClC,IAAA,mBAAQ,EAAC,OAAO,EAAC,QAAQ,EAAE,MAAM,CAAE,CAAC;IACrC,CAAC,CAAC,CAAC;AAEJ,CAAC;AAAA,CAAC"}
@@ -11,5 +11,5 @@
11
11
  * governing permissions and limitations under the License.
12
12
  *
13
13
  */
14
- import TomSelect from '../../tom-select';
14
+ import type TomSelect from '../../tom-select.ts';
15
15
  export default function (this: TomSelect): void;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ /**
3
+ * Plugin: "no_active_items" (Tom Select)
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
6
+ * file except in compliance with the License. You may obtain a copy of the License at:
7
+ * http://www.apache.org/licenses/LICENSE-2.0
8
+ *
9
+ * Unless required by applicable law or agreed to in writing, software distributed under
10
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
11
+ * ANY KIND, either express or implied. See the License for the specific language
12
+ * governing permissions and limitations under the License.
13
+ *
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.default = default_1;
17
+ function default_1() {
18
+ this.hook('instead', 'setActiveItem', () => { });
19
+ this.hook('instead', 'selectAll', () => { });
20
+ }
21
+ ;
22
+ //# sourceMappingURL=plugin.js.map