tom-select-rails 2.3.1 → 2.4.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (278) 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.d.ts +12 -0
  4. data/vendor/assets/javascripts/tom-select-rails/cjs/constants.js +16 -0
  5. data/vendor/assets/javascripts/tom-select-rails/cjs/constants.js.map +1 -0
  6. data/vendor/assets/javascripts/tom-select-rails/cjs/contrib/highlight.d.ts +13 -0
  7. data/vendor/assets/javascripts/tom-select-rails/cjs/contrib/highlight.js +69 -0
  8. data/vendor/assets/javascripts/tom-select-rails/cjs/contrib/highlight.js.map +1 -0
  9. data/vendor/assets/javascripts/tom-select-rails/cjs/contrib/microevent.d.ts +20 -0
  10. data/vendor/assets/javascripts/tom-select-rails/cjs/contrib/microevent.js +64 -0
  11. data/vendor/assets/javascripts/tom-select-rails/cjs/contrib/microevent.js.map +1 -0
  12. data/vendor/assets/javascripts/tom-select-rails/cjs/contrib/microplugin.d.ts +71 -0
  13. data/vendor/assets/javascripts/tom-select-rails/cjs/contrib/microplugin.js +112 -0
  14. data/vendor/assets/javascripts/tom-select-rails/cjs/contrib/microplugin.js.map +1 -0
  15. data/vendor/assets/javascripts/tom-select-rails/cjs/defaults.d.ts +52 -0
  16. data/vendor/assets/javascripts/tom-select-rails/cjs/defaults.js +84 -0
  17. data/vendor/assets/javascripts/tom-select-rails/cjs/defaults.js.map +1 -0
  18. data/vendor/assets/javascripts/tom-select-rails/cjs/getSettings.d.ts +3 -0
  19. data/vendor/assets/javascripts/tom-select-rails/cjs/getSettings.js +146 -0
  20. data/vendor/assets/javascripts/tom-select-rails/cjs/getSettings.js.map +1 -0
  21. data/vendor/assets/javascripts/tom-select-rails/cjs/package.json +1 -0
  22. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/caret_position/plugin.d.ts +16 -0
  23. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/caret_position/plugin.js +66 -0
  24. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/caret_position/plugin.js.map +1 -0
  25. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/change_listener/plugin.d.ts +16 -0
  26. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/change_listener/plugin.js +25 -0
  27. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/change_listener/plugin.js.map +1 -0
  28. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/checkbox_options/plugin.d.ts +17 -0
  29. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/checkbox_options/plugin.js +108 -0
  30. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/checkbox_options/plugin.js.map +1 -0
  31. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/checkbox_options/types.d.ts +14 -0
  32. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/checkbox_options/types.js +3 -0
  33. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/checkbox_options/types.js.map +1 -0
  34. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/clear_button/plugin.d.ts +17 -0
  35. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/clear_button/plugin.js +44 -0
  36. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/clear_button/plugin.js.map +1 -0
  37. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/clear_button/types.d.ts +5 -0
  38. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/clear_button/types.js +3 -0
  39. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/clear_button/types.js.map +1 -0
  40. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/drag_drop/plugin.d.ts +16 -0
  41. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/drag_drop/plugin.js +117 -0
  42. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/drag_drop/plugin.js.map +1 -0
  43. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/dropdown_header/plugin.d.ts +17 -0
  44. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/dropdown_header/plugin.js +50 -0
  45. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/dropdown_header/plugin.js.map +1 -0
  46. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/dropdown_header/types.d.ts +8 -0
  47. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/dropdown_header/types.js +3 -0
  48. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/dropdown_header/types.js.map +1 -0
  49. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/dropdown_input/plugin.d.ts +16 -0
  50. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/dropdown_input/plugin.js +77 -0
  51. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/dropdown_input/plugin.js.map +1 -0
  52. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/input_autogrow/plugin.d.ts +15 -0
  53. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/input_autogrow/plugin.js +47 -0
  54. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/input_autogrow/plugin.js.map +1 -0
  55. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/no_active_items/plugin.d.ts +15 -0
  56. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/no_active_items/plugin.js +22 -0
  57. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/no_active_items/plugin.js.map +1 -0
  58. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/no_backspace_delete/plugin.d.ts +15 -0
  59. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/no_backspace_delete/plugin.js +28 -0
  60. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/no_backspace_delete/plugin.js.map +1 -0
  61. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/optgroup_columns/plugin.d.ts +16 -0
  62. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/optgroup_columns/plugin.js +51 -0
  63. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/optgroup_columns/plugin.js.map +1 -0
  64. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/remove_button/plugin.d.ts +17 -0
  65. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/remove_button/plugin.js +61 -0
  66. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/remove_button/plugin.js.map +1 -0
  67. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/remove_button/types.d.ts +6 -0
  68. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/remove_button/types.js +3 -0
  69. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/remove_button/types.js.map +1 -0
  70. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/restore_on_backspace/plugin.d.ts +21 -0
  71. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/restore_on_backspace/plugin.js +24 -0
  72. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/restore_on_backspace/plugin.js.map +1 -0
  73. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/virtual_scroll/plugin.d.ts +16 -0
  74. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/virtual_scroll/plugin.js +170 -0
  75. data/vendor/assets/javascripts/tom-select-rails/cjs/plugins/virtual_scroll/plugin.js.map +1 -0
  76. data/vendor/assets/javascripts/tom-select-rails/cjs/tom-select.complete.d.ts +2 -0
  77. data/vendor/assets/javascripts/tom-select-rails/cjs/tom-select.complete.js +33 -5291
  78. data/vendor/assets/javascripts/tom-select-rails/cjs/tom-select.complete.js.map +1 -1
  79. data/vendor/assets/javascripts/tom-select-rails/cjs/tom-select.d.ts +594 -0
  80. data/vendor/assets/javascripts/tom-select-rails/cjs/tom-select.js +2121 -4255
  81. data/vendor/assets/javascripts/tom-select-rails/cjs/tom-select.js.map +1 -1
  82. data/vendor/assets/javascripts/tom-select-rails/cjs/tom-select.popular.d.ts +2 -0
  83. data/vendor/assets/javascripts/tom-select-rails/cjs/tom-select.popular.js +15 -4665
  84. data/vendor/assets/javascripts/tom-select-rails/cjs/tom-select.popular.js.map +1 -1
  85. data/vendor/assets/javascripts/tom-select-rails/cjs/types/core.d.ts +49 -0
  86. data/vendor/assets/javascripts/tom-select-rails/cjs/types/core.js +3 -0
  87. data/vendor/assets/javascripts/tom-select-rails/cjs/types/core.js.map +1 -0
  88. data/vendor/assets/javascripts/tom-select-rails/cjs/types/index.d.ts +2 -0
  89. data/vendor/assets/javascripts/tom-select-rails/cjs/types/index.js +19 -0
  90. data/vendor/assets/javascripts/tom-select-rails/cjs/types/index.js.map +1 -0
  91. data/vendor/assets/javascripts/tom-select-rails/cjs/types/settings.d.ts +79 -0
  92. data/vendor/assets/javascripts/tom-select-rails/cjs/types/settings.js +3 -0
  93. data/vendor/assets/javascripts/tom-select-rails/cjs/types/settings.js.map +1 -0
  94. data/vendor/assets/javascripts/tom-select-rails/cjs/utils.d.ts +95 -0
  95. data/vendor/assets/javascripts/tom-select-rails/cjs/utils.js +124 -112
  96. data/vendor/assets/javascripts/tom-select-rails/cjs/utils.js.map +1 -1
  97. data/vendor/assets/javascripts/tom-select-rails/cjs/vanilla.d.ts +76 -0
  98. data/vendor/assets/javascripts/tom-select-rails/cjs/vanilla.js +190 -0
  99. data/vendor/assets/javascripts/tom-select-rails/cjs/vanilla.js.map +1 -0
  100. data/vendor/assets/javascripts/tom-select-rails/esm/constants.d.ts +12 -0
  101. data/vendor/assets/javascripts/tom-select-rails/esm/constants.js +13 -0
  102. data/vendor/assets/javascripts/tom-select-rails/esm/constants.js.map +1 -0
  103. data/vendor/assets/javascripts/tom-select-rails/esm/contrib/highlight.d.ts +13 -0
  104. data/vendor/assets/javascripts/tom-select-rails/esm/contrib/highlight.js +64 -0
  105. data/vendor/assets/javascripts/tom-select-rails/esm/contrib/highlight.js.map +1 -0
  106. data/vendor/assets/javascripts/tom-select-rails/esm/contrib/microevent.d.ts +20 -0
  107. data/vendor/assets/javascripts/tom-select-rails/esm/contrib/microevent.js +61 -0
  108. data/vendor/assets/javascripts/tom-select-rails/esm/contrib/microevent.js.map +1 -0
  109. data/vendor/assets/javascripts/tom-select-rails/esm/contrib/microplugin.d.ts +71 -0
  110. data/vendor/assets/javascripts/tom-select-rails/esm/contrib/microplugin.js +109 -0
  111. data/vendor/assets/javascripts/tom-select-rails/esm/contrib/microplugin.js.map +1 -0
  112. data/vendor/assets/javascripts/tom-select-rails/esm/defaults.d.ts +52 -0
  113. data/vendor/assets/javascripts/tom-select-rails/esm/defaults.js +82 -0
  114. data/vendor/assets/javascripts/tom-select-rails/esm/defaults.js.map +1 -0
  115. data/vendor/assets/javascripts/tom-select-rails/esm/getSettings.d.ts +3 -0
  116. data/vendor/assets/javascripts/tom-select-rails/esm/getSettings.js +143 -0
  117. data/vendor/assets/javascripts/tom-select-rails/esm/getSettings.js.map +1 -0
  118. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/caret_position/plugin.d.ts +16 -0
  119. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/caret_position/plugin.js +16 -63
  120. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/caret_position/plugin.js.map +1 -1
  121. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/change_listener/plugin.d.ts +16 -0
  122. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/change_listener/plugin.js +1 -1
  123. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/change_listener/plugin.js.map +1 -1
  124. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/checkbox_options/plugin.d.ts +17 -0
  125. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/checkbox_options/plugin.js +1 -63
  126. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/checkbox_options/plugin.js.map +1 -1
  127. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/checkbox_options/types.d.ts +14 -0
  128. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/checkbox_options/types.js +2 -0
  129. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/checkbox_options/types.js.map +1 -0
  130. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/clear_button/plugin.d.ts +17 -0
  131. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/clear_button/plugin.js +1 -63
  132. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/clear_button/plugin.js.map +1 -1
  133. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/clear_button/types.d.ts +5 -0
  134. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/clear_button/types.js +2 -0
  135. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/clear_button/types.js.map +1 -0
  136. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/drag_drop/plugin.d.ts +16 -0
  137. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/drag_drop/plugin.js +1 -63
  138. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/drag_drop/plugin.js.map +1 -1
  139. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/dropdown_header/plugin.d.ts +17 -0
  140. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/dropdown_header/plugin.js +26 -88
  141. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/dropdown_header/plugin.js.map +1 -1
  142. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/dropdown_header/types.d.ts +8 -0
  143. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/dropdown_header/types.js +2 -0
  144. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/dropdown_header/types.js.map +1 -0
  145. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/dropdown_input/plugin.d.ts +16 -0
  146. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/dropdown_input/plugin.js +34 -96
  147. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/dropdown_input/plugin.js.map +1 -1
  148. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/input_autogrow/plugin.d.ts +15 -0
  149. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/input_autogrow/plugin.js +1 -1
  150. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/input_autogrow/plugin.js.map +1 -1
  151. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/no_active_items/plugin.d.ts +15 -0
  152. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/no_active_items/plugin.js +1 -1
  153. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/no_active_items/plugin.js.map +1 -1
  154. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/no_backspace_delete/plugin.d.ts +15 -0
  155. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/no_backspace_delete/plugin.js +1 -1
  156. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/no_backspace_delete/plugin.js.map +1 -1
  157. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/optgroup_columns/plugin.d.ts +16 -0
  158. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/optgroup_columns/plugin.js +1 -66
  159. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/optgroup_columns/plugin.js.map +1 -1
  160. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/remove_button/plugin.d.ts +17 -0
  161. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/remove_button/plugin.js +28 -90
  162. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/remove_button/plugin.js.map +1 -1
  163. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/remove_button/types.d.ts +6 -0
  164. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/remove_button/types.js +2 -0
  165. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/remove_button/types.js.map +1 -0
  166. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/restore_on_backspace/plugin.d.ts +21 -0
  167. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/restore_on_backspace/plugin.js +1 -1
  168. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/restore_on_backspace/plugin.js.map +1 -1
  169. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/virtual_scroll/plugin.d.ts +16 -0
  170. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/virtual_scroll/plugin.js +16 -63
  171. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/virtual_scroll/plugin.js.map +1 -1
  172. data/vendor/assets/javascripts/tom-select-rails/esm/tom-select.complete.d.ts +2 -0
  173. data/vendor/assets/javascripts/tom-select-rails/esm/tom-select.complete.js +17 -5275
  174. data/vendor/assets/javascripts/tom-select-rails/esm/tom-select.complete.js.map +1 -1
  175. data/vendor/assets/javascripts/tom-select-rails/esm/tom-select.d.ts +594 -0
  176. data/vendor/assets/javascripts/tom-select-rails/esm/tom-select.js +2116 -4251
  177. data/vendor/assets/javascripts/tom-select-rails/esm/tom-select.js.map +1 -1
  178. data/vendor/assets/javascripts/tom-select-rails/esm/tom-select.popular.d.ts +2 -0
  179. data/vendor/assets/javascripts/tom-select-rails/esm/tom-select.popular.js +8 -4658
  180. data/vendor/assets/javascripts/tom-select-rails/esm/tom-select.popular.js.map +1 -1
  181. data/vendor/assets/javascripts/tom-select-rails/esm/types/core.d.ts +49 -0
  182. data/vendor/assets/javascripts/tom-select-rails/esm/types/core.js +2 -0
  183. data/vendor/assets/javascripts/tom-select-rails/esm/types/core.js.map +1 -0
  184. data/vendor/assets/javascripts/tom-select-rails/esm/types/index.d.ts +2 -0
  185. data/vendor/assets/javascripts/tom-select-rails/esm/types/index.js +3 -0
  186. data/vendor/assets/javascripts/tom-select-rails/esm/types/index.js.map +1 -0
  187. data/vendor/assets/javascripts/tom-select-rails/esm/types/settings.d.ts +79 -0
  188. data/vendor/assets/javascripts/tom-select-rails/esm/types/settings.js +2 -0
  189. data/vendor/assets/javascripts/tom-select-rails/esm/types/settings.js.map +1 -0
  190. data/vendor/assets/javascripts/tom-select-rails/esm/utils.d.ts +95 -0
  191. data/vendor/assets/javascripts/tom-select-rails/esm/utils.js +116 -107
  192. data/vendor/assets/javascripts/tom-select-rails/esm/utils.js.map +1 -1
  193. data/vendor/assets/javascripts/tom-select-rails/esm/vanilla.d.ts +76 -0
  194. data/vendor/assets/javascripts/tom-select-rails/esm/vanilla.js +172 -0
  195. data/vendor/assets/javascripts/tom-select-rails/esm/vanilla.js.map +1 -0
  196. data/vendor/assets/javascripts/tom-select-rails/js/package.json +1 -0
  197. data/vendor/assets/javascripts/tom-select-rails/js/plugins/caret_position.js +161 -208
  198. data/vendor/assets/javascripts/tom-select-rails/js/plugins/caret_position.js.map +1 -1
  199. data/vendor/assets/javascripts/tom-select-rails/js/plugins/change_listener.js +1 -1
  200. data/vendor/assets/javascripts/tom-select-rails/js/plugins/change_listener.js.map +1 -1
  201. data/vendor/assets/javascripts/tom-select-rails/js/plugins/checkbox_options.js +1 -63
  202. data/vendor/assets/javascripts/tom-select-rails/js/plugins/checkbox_options.js.map +1 -1
  203. data/vendor/assets/javascripts/tom-select-rails/js/plugins/clear_button.js +68 -130
  204. data/vendor/assets/javascripts/tom-select-rails/js/plugins/clear_button.js.map +1 -1
  205. data/vendor/assets/javascripts/tom-select-rails/js/plugins/drag_drop.js +1 -63
  206. data/vendor/assets/javascripts/tom-select-rails/js/plugins/drag_drop.js.map +1 -1
  207. data/vendor/assets/javascripts/tom-select-rails/js/plugins/dropdown_header.js +95 -157
  208. data/vendor/assets/javascripts/tom-select-rails/js/plugins/dropdown_header.js.map +1 -1
  209. data/vendor/assets/javascripts/tom-select-rails/js/plugins/dropdown_input.js +212 -274
  210. data/vendor/assets/javascripts/tom-select-rails/js/plugins/dropdown_input.js.map +1 -1
  211. data/vendor/assets/javascripts/tom-select-rails/js/plugins/input_autogrow.js +1 -1
  212. data/vendor/assets/javascripts/tom-select-rails/js/plugins/input_autogrow.js.map +1 -1
  213. data/vendor/assets/javascripts/tom-select-rails/js/plugins/no_active_items.js +1 -1
  214. data/vendor/assets/javascripts/tom-select-rails/js/plugins/no_active_items.js.map +1 -1
  215. data/vendor/assets/javascripts/tom-select-rails/js/plugins/no_backspace_delete.js +1 -1
  216. data/vendor/assets/javascripts/tom-select-rails/js/plugins/no_backspace_delete.js.map +1 -1
  217. data/vendor/assets/javascripts/tom-select-rails/js/plugins/optgroup_columns.js +79 -144
  218. data/vendor/assets/javascripts/tom-select-rails/js/plugins/optgroup_columns.js.map +1 -1
  219. data/vendor/assets/javascripts/tom-select-rails/js/plugins/remove_button.js +132 -194
  220. data/vendor/assets/javascripts/tom-select-rails/js/plugins/remove_button.js.map +1 -1
  221. data/vendor/assets/javascripts/tom-select-rails/js/plugins/restore_on_backspace.js +1 -1
  222. data/vendor/assets/javascripts/tom-select-rails/js/plugins/restore_on_backspace.js.map +1 -1
  223. data/vendor/assets/javascripts/tom-select-rails/js/plugins/virtual_scroll.js +248 -295
  224. data/vendor/assets/javascripts/tom-select-rails/js/plugins/virtual_scroll.js.map +1 -1
  225. data/vendor/assets/javascripts/tom-select-rails/js/tom-select.base.js +818 -1095
  226. data/vendor/assets/javascripts/tom-select-rails/js/tom-select.base.js.map +1 -1
  227. data/vendor/assets/javascripts/tom-select-rails/js/tom-select.base.min.js +158 -154
  228. data/vendor/assets/javascripts/tom-select-rails/js/tom-select.base.min.js.map +1 -1
  229. data/vendor/assets/javascripts/tom-select-rails/js/tom-select.complete.js +818 -1095
  230. data/vendor/assets/javascripts/tom-select-rails/js/tom-select.complete.js.map +1 -1
  231. data/vendor/assets/javascripts/tom-select-rails/js/tom-select.complete.min.js +351 -347
  232. data/vendor/assets/javascripts/tom-select-rails/js/tom-select.complete.min.js.map +1 -1
  233. data/vendor/assets/javascripts/tom-select-rails/js/tom-select.popular.js +818 -1095
  234. data/vendor/assets/javascripts/tom-select-rails/js/tom-select.popular.js.map +1 -1
  235. data/vendor/assets/javascripts/tom-select-rails/js/tom-select.popular.min.js +336 -332
  236. data/vendor/assets/javascripts/tom-select-rails/js/tom-select.popular.min.js.map +1 -1
  237. data/vendor/assets/javascripts/tom-select-rails/types/getSettings.d.ts +2 -2
  238. data/vendor/assets/javascripts/tom-select-rails/types/plugins/caret_position/plugin.d.ts +1 -1
  239. data/vendor/assets/javascripts/tom-select-rails/types/plugins/change_listener/plugin.d.ts +1 -1
  240. data/vendor/assets/javascripts/tom-select-rails/types/plugins/checkbox_options/plugin.d.ts +2 -2
  241. data/vendor/assets/javascripts/tom-select-rails/types/plugins/clear_button/plugin.d.ts +2 -2
  242. data/vendor/assets/javascripts/tom-select-rails/types/plugins/drag_drop/plugin.d.ts +1 -1
  243. data/vendor/assets/javascripts/tom-select-rails/types/plugins/dropdown_header/plugin.d.ts +2 -2
  244. data/vendor/assets/javascripts/tom-select-rails/types/plugins/dropdown_input/plugin.d.ts +1 -1
  245. data/vendor/assets/javascripts/tom-select-rails/types/plugins/input_autogrow/plugin.d.ts +1 -1
  246. data/vendor/assets/javascripts/tom-select-rails/types/plugins/no_active_items/plugin.d.ts +1 -1
  247. data/vendor/assets/javascripts/tom-select-rails/types/plugins/no_backspace_delete/plugin.d.ts +1 -1
  248. data/vendor/assets/javascripts/tom-select-rails/types/plugins/optgroup_columns/plugin.d.ts +1 -1
  249. data/vendor/assets/javascripts/tom-select-rails/types/plugins/remove_button/plugin.d.ts +2 -2
  250. data/vendor/assets/javascripts/tom-select-rails/types/plugins/restore_on_backspace/plugin.d.ts +2 -2
  251. data/vendor/assets/javascripts/tom-select-rails/types/plugins/virtual_scroll/plugin.d.ts +1 -1
  252. data/vendor/assets/javascripts/tom-select-rails/types/tom-select.complete.d.ts +1 -1
  253. data/vendor/assets/javascripts/tom-select-rails/types/tom-select.d.ts +3 -3
  254. data/vendor/assets/javascripts/tom-select-rails/types/tom-select.popular.d.ts +1 -1
  255. data/vendor/assets/javascripts/tom-select-rails/types/types/core.d.ts +2 -2
  256. data/vendor/assets/javascripts/tom-select-rails/types/types/index.d.ts +2 -2
  257. data/vendor/assets/javascripts/tom-select-rails/types/types/settings.d.ts +4 -4
  258. data/vendor/assets/javascripts/tom-select-rails/types/utils.d.ts +16 -4
  259. data/vendor/assets/javascripts/tom-select-rails/types/vanilla.d.ts +1 -1
  260. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.bootstrap4.css +9 -9
  261. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.bootstrap4.css.map +1 -1
  262. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.bootstrap4.min.css +1 -1
  263. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.bootstrap4.min.css.map +1 -1
  264. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.bootstrap5.css +6 -6
  265. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.bootstrap5.css.map +1 -1
  266. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.bootstrap5.min.css +1 -1
  267. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.bootstrap5.min.css.map +1 -1
  268. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.css +4 -4
  269. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.css.map +1 -1
  270. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.default.css +3 -3
  271. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.default.css.map +1 -1
  272. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.default.min.css +1 -1
  273. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.default.min.css.map +1 -1
  274. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.min.css +1 -1
  275. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.min.css.map +1 -1
  276. data/vendor/assets/stylesheets/tom-select-rails/scss/_items.scss +5 -4
  277. data/vendor/assets/stylesheets/tom-select-rails/scss/tom-select.scss +3 -3
  278. metadata +153 -7
@@ -0,0 +1,49 @@
1
+ import type TomSelect from '../tom-select.ts';
2
+ import { escape_html } from '../utils.ts';
3
+ export interface TomInput extends HTMLElement {
4
+ tomselect?: TomSelect;
5
+ disabled: boolean;
6
+ readOnly?: boolean;
7
+ required: boolean;
8
+ value: string;
9
+ type: string;
10
+ validity: ValidityState;
11
+ }
12
+ export type TomArgObject = {
13
+ silent?: boolean;
14
+ };
15
+ export type TomOption = {
16
+ [key: string]: any;
17
+ };
18
+ export type TomOptions = {
19
+ [key: string]: TomOption;
20
+ };
21
+ export type TomCreateFilter = (input: string) => boolean;
22
+ export type TomCreateCallback = (data?: TomOption) => void;
23
+ export type TomCreate = (input: string, create: TomCreateCallback) => boolean;
24
+ export interface TomItem extends HTMLElement {
25
+ dataset: {
26
+ value: string;
27
+ };
28
+ }
29
+ export type TomLoadCallback = TomSelect['loadCallback'];
30
+ export type TomTemplate = (data: TomOption, escape: typeof escape_html) => string | HTMLElement;
31
+ export type TomTemplateNull = (data: TomOption, escape: typeof escape_html) => null | string | HTMLElement;
32
+ export type TomTemplates = {
33
+ 'dropdown': TomTemplate;
34
+ 'optgroup': TomTemplate;
35
+ 'optgroup_header': TomTemplate;
36
+ 'option': TomTemplate;
37
+ 'item': TomTemplate;
38
+ 'option_create': TomTemplate;
39
+ 'no_results': TomTemplate;
40
+ 'loading': TomTemplate;
41
+ 'not_loading': TomTemplateNull;
42
+ 'loading_more': TomTemplateNull;
43
+ 'no_more_results': TomTemplateNull;
44
+ };
45
+ export type TomTemplateNames = keyof TomTemplates;
46
+ export type TomClearFilter = (option: TomOption, value: string) => boolean;
47
+ export type RecursivePartial<T> = {
48
+ [P in keyof T]?: T[P] extends (infer U)[] ? RecursivePartial<U>[] : T[P] extends object | undefined ? RecursivePartial<T[P]> : T[P];
49
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=core.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"core.js","sourceRoot":"","sources":["../../../src/types/core.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export * from './core.ts';
2
+ export * from './settings.ts';
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./core.js"), exports);
18
+ __exportStar(require("./settings.js"), exports);
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AACA,4CAA0B;AAC1B,gDAA8B"}
@@ -0,0 +1,79 @@
1
+ import { TomCreateFilter, TomCreate, TomLoadCallback, TomTemplates, TomOption } from './index.ts';
2
+ import { TPluginItem, TPluginHash } from '../contrib/microplugin.ts';
3
+ import { type Sort as SifterSort, type SortFn as SifterSortFn } from '@orchidjs/sifter';
4
+ export type TomSettings = {
5
+ options?: any[];
6
+ optgroups?: any[];
7
+ items?: string[];
8
+ plugins: string[] | TPluginItem[] | TPluginHash;
9
+ delimiter: string;
10
+ splitOn: RegExp | string;
11
+ persist: boolean;
12
+ diacritics: boolean;
13
+ create: boolean | TomCreate;
14
+ createOnBlur: boolean;
15
+ createFilter: RegExp | string | TomCreateFilter;
16
+ highlight: boolean;
17
+ openOnFocus: boolean;
18
+ shouldOpen: boolean;
19
+ maxOptions: number;
20
+ maxItems: null | number;
21
+ hideSelected: boolean;
22
+ duplicates: boolean;
23
+ addPrecedence: boolean;
24
+ selectOnTab: boolean;
25
+ preload: boolean | string;
26
+ allowEmptyOption: boolean;
27
+ closeAfterSelect: boolean;
28
+ refreshThrottle: number;
29
+ loadThrottle: number;
30
+ loadingClass: string;
31
+ dataAttr: string;
32
+ optgroupField: string;
33
+ valueField: string;
34
+ labelField: string;
35
+ disabledField: string;
36
+ optgroupLabelField: string;
37
+ optgroupValueField: string;
38
+ lockOptgroupOrder: boolean;
39
+ sortField: string | SifterSort[] | SifterSortFn;
40
+ searchField: string[];
41
+ searchConjunction: string;
42
+ nesting: boolean;
43
+ mode: string;
44
+ wrapperClass: string;
45
+ controlClass: string;
46
+ dropdownClass: string;
47
+ dropdownContentClass: string;
48
+ itemClass: string;
49
+ optionClass: string;
50
+ dropdownParent: string;
51
+ controlInput: string | HTMLInputElement;
52
+ copyClassesToDropdown: boolean;
53
+ placeholder: string;
54
+ hidePlaceholder: boolean;
55
+ load: (value: string, callback: TomLoadCallback) => void;
56
+ score?: (query: string) => () => any;
57
+ shouldLoad: (query: string) => boolean;
58
+ onInitialize: () => void;
59
+ onChange: (value: string | number) => void;
60
+ onItemAdd: (value: string | number, item: HTMLDivElement) => void;
61
+ onItemRemove: (value: string | number, item: HTMLDivElement) => void;
62
+ onClear: () => void;
63
+ onOptionAdd: (value: string | number, data: TomOption) => void;
64
+ onOptionRemove: (value: string | number) => void;
65
+ onOptionClear: () => void;
66
+ onOptionGroupAdd: (value: string | number, data: TomOption) => void;
67
+ onOptionGroupRemove: (value: string | number) => void;
68
+ onOptionGroupClear: () => void;
69
+ onDropdownOpen: (dropdown: HTMLDivElement) => void;
70
+ onDropdownClose: (dropdown: HTMLDivElement) => void;
71
+ onType: (str: string) => void;
72
+ onLoad: (options: TomOption[], optgroups: TomOption[]) => void;
73
+ onFocus: () => void;
74
+ onBlur: () => void;
75
+ onDelete: (values: string[], evt: KeyboardEvent | MouseEvent) => boolean;
76
+ render: TomTemplates;
77
+ firstUrl: (query: string) => any;
78
+ shouldLoadMore: () => boolean;
79
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=settings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settings.js","sourceRoot":"","sources":["../../../src/types/settings.ts"],"names":[],"mappings":""}
@@ -0,0 +1,95 @@
1
+ import type TomSelect from './tom-select.ts';
2
+ import { TomLoadCallback } from './types/index.ts';
3
+ /**
4
+ * Converts a scalar to its best string representation
5
+ * for hash keys and HTML attribute values.
6
+ *
7
+ * Transformations:
8
+ * 'str' -> 'str'
9
+ * null -> ''
10
+ * undefined -> ''
11
+ * true -> '1'
12
+ * false -> '0'
13
+ * 0 -> '0'
14
+ * 1 -> '1'
15
+ *
16
+ */
17
+ export declare const hash_key: (value: undefined | null | boolean | string | number) => string | null;
18
+ export declare const get_hash: (value: boolean | string | number) => string;
19
+ /**
20
+ * Escapes a string for use within HTML.
21
+ *
22
+ */
23
+ export declare const escape_html: (str: string) => string;
24
+ /**
25
+ * use setTimeout if timeout > 0
26
+ */
27
+ export declare const timeout: (fn: () => void, timeout: number) => number | null;
28
+ /**
29
+ * Debounce the user provided load function
30
+ *
31
+ */
32
+ export declare const loadDebounce: (fn: (value: string, callback: TomLoadCallback) => void, delay: number) => (this: TomSelect, value: string, callback: TomLoadCallback) => void;
33
+ /**
34
+ * Debounce all fired events types listed in `types`
35
+ * while executing the provided `fn`.
36
+ *
37
+ */
38
+ export declare const debounce_events: (self: TomSelect, types: string[], fn: () => void) => void;
39
+ /**
40
+ * Determines the current selection within a text input control.
41
+ * Returns an object containing:
42
+ * - start
43
+ * - length
44
+ *
45
+ * Note: "selectionStart, selectionEnd ... apply only to inputs of types text, search, URL, tel and password"
46
+ * - https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setSelectionRange
47
+ */
48
+ export declare const getSelection: (input: HTMLInputElement) => {
49
+ start: number;
50
+ length: number;
51
+ };
52
+ /**
53
+ * Prevent default
54
+ *
55
+ */
56
+ export declare const preventDefault: (evt?: Event, stop?: boolean) => void;
57
+ /**
58
+ * Add event helper
59
+ *
60
+ */
61
+ export declare const addEvent: (target: EventTarget, type: string, callback: EventListenerOrEventListenerObject, options?: object) => void;
62
+ /**
63
+ * Return true if the requested key is down
64
+ * Will return false if more than one control character is pressed ( when [ctrl+shift+a] != [ctrl+a] )
65
+ * The current evt may not always set ( eg calling advanceSelection() )
66
+ *
67
+ */
68
+ export declare const isKeyDown: (key_name: keyof (KeyboardEvent | MouseEvent), evt?: KeyboardEvent | MouseEvent) => boolean;
69
+ /**
70
+ * Get the id of an element
71
+ * If the id attribute is not set, set the attribute with the given id
72
+ *
73
+ */
74
+ export declare const getId: (el: Element, id: string) => string;
75
+ /**
76
+ * Returns a string with backslashes added before characters that need to be escaped.
77
+ */
78
+ export declare const addSlashes: (str: string) => string;
79
+ /**
80
+ *
81
+ */
82
+ export declare const append: (parent: Element | DocumentFragment, node: string | Node | null | undefined) => void;
83
+ /**
84
+ * Iterates over arrays and hashes.
85
+ *
86
+ * ```
87
+ * iterate(this.items, function(item, id) {
88
+ * // invoked for each item
89
+ * });
90
+ * ```
91
+ *
92
+ */
93
+ export declare const iterate: (object: [] | {
94
+ [key: string]: any;
95
+ }, callback: (value: any, key: any) => any) => void;
@@ -1,10 +1,6 @@
1
- /**
2
- * Tom Select v2.3.1
3
- * Licensed under the Apache License, Version 2.0 (the "License");
4
- */
5
-
6
- 'use strict';
7
-
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.iterate = exports.append = exports.addSlashes = exports.getId = exports.isKeyDown = exports.addEvent = exports.preventDefault = exports.getSelection = exports.debounce_events = exports.loadDebounce = exports.timeout = exports.escape_html = exports.get_hash = exports.hash_key = void 0;
8
4
  /**
9
5
  * Converts a scalar to its best string representation
10
6
  * for hash keys and HTML attribute values.
@@ -19,86 +15,91 @@
19
15
  * 1 -> '1'
20
16
  *
21
17
  */
22
- const hash_key = value => {
23
- if (typeof value === 'undefined' || value === null) return null;
24
- return get_hash(value);
18
+ const hash_key = (value) => {
19
+ if (typeof value === 'undefined' || value === null)
20
+ return null;
21
+ return (0, exports.get_hash)(value);
25
22
  };
26
- const get_hash = value => {
27
- if (typeof value === 'boolean') return value ? '1' : '0';
28
- return value + '';
23
+ exports.hash_key = hash_key;
24
+ const get_hash = (value) => {
25
+ if (typeof value === 'boolean')
26
+ return value ? '1' : '0';
27
+ return value + '';
29
28
  };
30
-
29
+ exports.get_hash = get_hash;
31
30
  /**
32
31
  * Escapes a string for use within HTML.
33
32
  *
34
33
  */
35
- const escape_html = str => {
36
- return (str + '').replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;');
34
+ const escape_html = (str) => {
35
+ return (str + '')
36
+ .replace(/&/g, '&amp;')
37
+ .replace(/</g, '&lt;')
38
+ .replace(/>/g, '&gt;')
39
+ .replace(/"/g, '&quot;');
37
40
  };
38
-
41
+ exports.escape_html = escape_html;
39
42
  /**
40
- * use setTimeout if timeout > 0
43
+ * use setTimeout if timeout > 0
41
44
  */
42
45
  const timeout = (fn, timeout) => {
43
- if (timeout > 0) {
44
- return setTimeout(fn, timeout);
45
- }
46
- fn.call(null);
47
- return null;
46
+ if (timeout > 0) {
47
+ return window.setTimeout(fn, timeout);
48
+ }
49
+ fn.call(null);
50
+ return null;
48
51
  };
49
-
52
+ exports.timeout = timeout;
50
53
  /**
51
54
  * Debounce the user provided load function
52
55
  *
53
56
  */
54
57
  const loadDebounce = (fn, delay) => {
55
- var timeout;
56
- return function (value, callback) {
57
- var self = this;
58
- if (timeout) {
59
- self.loading = Math.max(self.loading - 1, 0);
60
- clearTimeout(timeout);
61
- }
62
- timeout = setTimeout(function () {
63
- timeout = null;
64
- self.loadedSearches[value] = true;
65
- fn.call(self, value, callback);
66
- }, delay);
67
- };
58
+ var timeout;
59
+ return function (value, callback) {
60
+ var self = this;
61
+ if (timeout) {
62
+ self.loading = Math.max(self.loading - 1, 0);
63
+ clearTimeout(timeout);
64
+ }
65
+ timeout = setTimeout(function () {
66
+ timeout = null;
67
+ self.loadedSearches[value] = true;
68
+ fn.call(self, value, callback);
69
+ }, delay);
70
+ };
68
71
  };
69
-
72
+ exports.loadDebounce = loadDebounce;
70
73
  /**
71
74
  * Debounce all fired events types listed in `types`
72
75
  * while executing the provided `fn`.
73
76
  *
74
77
  */
75
78
  const debounce_events = (self, types, fn) => {
76
- var type;
77
- var trigger = self.trigger;
78
- var event_args = {};
79
-
80
- // override trigger method
81
- self.trigger = function () {
82
- var type = arguments[0];
83
- if (types.indexOf(type) !== -1) {
84
- event_args[type] = arguments;
85
- } else {
86
- return trigger.apply(self, arguments);
79
+ var type;
80
+ var trigger = self.trigger;
81
+ var event_args = {};
82
+ // override trigger method
83
+ self.trigger = function () {
84
+ var type = arguments[0];
85
+ if (types.indexOf(type) !== -1) {
86
+ event_args[type] = arguments;
87
+ }
88
+ else {
89
+ return trigger.apply(self, arguments);
90
+ }
91
+ };
92
+ // invoke provided function
93
+ fn.apply(self, []);
94
+ self.trigger = trigger;
95
+ // trigger queued events
96
+ for (type of types) {
97
+ if (type in event_args) {
98
+ trigger.apply(self, event_args[type]);
99
+ }
87
100
  }
88
- };
89
-
90
- // invoke provided function
91
- fn.apply(self, []);
92
- self.trigger = trigger;
93
-
94
- // trigger queued events
95
- for (type of types) {
96
- if (type in event_args) {
97
- trigger.apply(self, event_args[type]);
98
- }
99
- }
100
101
  };
101
-
102
+ exports.debounce_events = debounce_events;
102
103
  /**
103
104
  * Determines the current selection within a text input control.
104
105
  * Returns an object containing:
@@ -108,34 +109,34 @@ const debounce_events = (self, types, fn) => {
108
109
  * Note: "selectionStart, selectionEnd ... apply only to inputs of types text, search, URL, tel and password"
109
110
  * - https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setSelectionRange
110
111
  */
111
- const getSelection = input => {
112
- return {
113
- start: input.selectionStart || 0,
114
- length: (input.selectionEnd || 0) - (input.selectionStart || 0)
115
- };
112
+ const getSelection = (input) => {
113
+ return {
114
+ start: input.selectionStart || 0,
115
+ length: (input.selectionEnd || 0) - (input.selectionStart || 0),
116
+ };
116
117
  };
117
-
118
+ exports.getSelection = getSelection;
118
119
  /**
119
120
  * Prevent default
120
121
  *
121
122
  */
122
123
  const preventDefault = (evt, stop = false) => {
123
- if (evt) {
124
- evt.preventDefault();
125
- if (stop) {
126
- evt.stopPropagation();
124
+ if (evt) {
125
+ evt.preventDefault();
126
+ if (stop) {
127
+ evt.stopPropagation();
128
+ }
127
129
  }
128
- }
129
130
  };
130
-
131
+ exports.preventDefault = preventDefault;
131
132
  /**
132
133
  * Add event helper
133
134
  *
134
135
  */
135
136
  const addEvent = (target, type, callback, options) => {
136
- target.addEventListener(type, callback, options);
137
+ target.addEventListener(type, callback, options);
137
138
  };
138
-
139
+ exports.addEvent = addEvent;
139
140
  /**
140
141
  * Return true if the requested key is down
141
142
  * Will return false if more than one control character is pressed ( when [ctrl+shift+a] != [ctrl+a] )
@@ -143,58 +144,69 @@ const addEvent = (target, type, callback, options) => {
143
144
  *
144
145
  */
145
146
  const isKeyDown = (key_name, evt) => {
146
- if (!evt) {
147
- return false;
148
- }
149
- if (!evt[key_name]) {
147
+ if (!evt) {
148
+ return false;
149
+ }
150
+ if (!evt[key_name]) {
151
+ return false;
152
+ }
153
+ var count = (evt.altKey ? 1 : 0) + (evt.ctrlKey ? 1 : 0) + (evt.shiftKey ? 1 : 0) + (evt.metaKey ? 1 : 0);
154
+ if (count === 1) {
155
+ return true;
156
+ }
150
157
  return false;
151
- }
152
- var count = (evt.altKey ? 1 : 0) + (evt.ctrlKey ? 1 : 0) + (evt.shiftKey ? 1 : 0) + (evt.metaKey ? 1 : 0);
153
- if (count === 1) {
154
- return true;
155
- }
156
- return false;
157
158
  };
158
-
159
+ exports.isKeyDown = isKeyDown;
159
160
  /**
160
161
  * Get the id of an element
161
162
  * If the id attribute is not set, set the attribute with the given id
162
163
  *
163
164
  */
164
165
  const getId = (el, id) => {
165
- const existing_id = el.getAttribute('id');
166
- if (existing_id) {
167
- return existing_id;
168
- }
169
- el.setAttribute('id', id);
170
- return id;
166
+ const existing_id = el.getAttribute('id');
167
+ if (existing_id) {
168
+ return existing_id;
169
+ }
170
+ el.setAttribute('id', id);
171
+ return id;
171
172
  };
172
-
173
+ exports.getId = getId;
173
174
  /**
174
175
  * Returns a string with backslashes added before characters that need to be escaped.
175
176
  */
176
- const addSlashes = str => {
177
- return str.replace(/[\\"']/g, '\\$&');
177
+ const addSlashes = (str) => {
178
+ return str.replace(/[\\"']/g, '\\$&');
178
179
  };
179
-
180
+ exports.addSlashes = addSlashes;
180
181
  /**
181
182
  *
182
183
  */
183
184
  const append = (parent, node) => {
184
- if (node) parent.append(node);
185
+ if (node)
186
+ parent.append(node);
185
187
  };
186
-
187
- exports.addEvent = addEvent;
188
- exports.addSlashes = addSlashes;
189
188
  exports.append = append;
190
- exports.debounce_events = debounce_events;
191
- exports.escape_html = escape_html;
192
- exports.getId = getId;
193
- exports.getSelection = getSelection;
194
- exports.get_hash = get_hash;
195
- exports.hash_key = hash_key;
196
- exports.isKeyDown = isKeyDown;
197
- exports.loadDebounce = loadDebounce;
198
- exports.preventDefault = preventDefault;
199
- exports.timeout = timeout;
200
- //# sourceMappingURL=utils.js.map
189
+ /**
190
+ * Iterates over arrays and hashes.
191
+ *
192
+ * ```
193
+ * iterate(this.items, function(item, id) {
194
+ * // invoked for each item
195
+ * });
196
+ * ```
197
+ *
198
+ */
199
+ const iterate = (object, callback) => {
200
+ if (Array.isArray(object)) {
201
+ object.forEach(callback);
202
+ }
203
+ else {
204
+ for (var key in object) {
205
+ if (object.hasOwnProperty(key)) {
206
+ callback(object[key], key);
207
+ }
208
+ }
209
+ }
210
+ };
211
+ exports.iterate = iterate;
212
+ //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sources":["../../src/utils.ts"],"sourcesContent":["\nimport TomSelect from './tom-select';\nimport { TomLoadCallback } from './types/index';\n\n\n/**\n * Converts a scalar to its best string representation\n * for hash keys and HTML attribute values.\n *\n * Transformations:\n * 'str' -> 'str'\n * null -> ''\n * undefined -> ''\n * true -> '1'\n * false -> '0'\n * 0 -> '0'\n * 1 -> '1'\n *\n */\nexport const hash_key = (value:undefined|null|boolean|string|number):string|null => {\n\tif (typeof value === 'undefined' || value === null) return null;\n\treturn get_hash(value);\n};\n\nexport const get_hash = (value:boolean|string|number):string => {\n\tif (typeof value === 'boolean') return value ? '1' : '0';\n\treturn value + '';\n};\n\n/**\n * Escapes a string for use within HTML.\n *\n */\nexport const escape_html = (str:string):string => {\n\treturn (str + '')\n\t\t.replace(/&/g, '&amp;')\n\t\t.replace(/</g, '&lt;')\n\t\t.replace(/>/g, '&gt;')\n\t\t.replace(/\"/g, '&quot;');\n};\n\n\n/**\n * use setTimeout if timeout > 0 \n */\nexport const timeout = (fn:()=>void,timeout:number) => {\n\tif( timeout > 0 ){\n\t\treturn setTimeout(fn,timeout);\n\t}\n\n\tfn.call(null);\n\treturn null;\n}\n\n/**\n * Debounce the user provided load function\n *\n */\nexport const loadDebounce = (fn:(value:string,callback:TomLoadCallback) => void,delay:number) => {\n\tvar timeout: null|ReturnType<typeof setTimeout>;\n\treturn function(this:TomSelect, value:string,callback:TomLoadCallback) {\n\t\tvar self = this;\n\n\t\tif( timeout ){\n\t\t\tself.loading = Math.max(self.loading - 1, 0);\n\t\t\tclearTimeout(timeout);\n\t\t}\n\t\ttimeout = setTimeout(function() {\n\t\t\ttimeout = null;\n\t\t\tself.loadedSearches[value] = true;\n\t\t\tfn.call(self, value, callback);\n\n\t\t}, delay);\n\t};\n};\n\n\n/**\n * Debounce all fired events types listed in `types`\n * while executing the provided `fn`.\n *\n */\nexport const debounce_events = ( self:TomSelect, types:string[], fn:() => void ) => {\n\tvar type:string;\n\tvar trigger = self.trigger;\n\tvar event_args:{ [key: string]: any } = {};\n\n\t// override trigger method\n\tself.trigger = function(){\n\t\tvar type = arguments[0];\n\t\tif (types.indexOf(type) !== -1) {\n\t\t\tevent_args[type] = arguments;\n\t\t} else {\n\t\t\treturn trigger.apply(self, arguments);\n\t\t}\n\t};\n\n\t// invoke provided function\n\tfn.apply(self, []);\n\tself.trigger = trigger;\n\n\t// trigger queued events\n\tfor( type of types ){\n\t\tif( type in event_args ){\n\t\t\ttrigger.apply(self, event_args[type]);\n\t\t}\n\t}\n};\n\n\n/**\n * Determines the current selection within a text input control.\n * Returns an object containing:\n * - start\n * - length\n *\n * Note: \"selectionStart, selectionEnd ... apply only to inputs of types text, search, URL, tel and password\"\n * \t- https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setSelectionRange\n */\nexport const getSelection = (input:HTMLInputElement):{ start: number; length: number } => {\n\treturn {\n\t\tstart\t: input.selectionStart || 0,\n\t\tlength\t: (input.selectionEnd||0) - (input.selectionStart||0),\n\t};\n};\n\n\n/**\n * Prevent default\n *\n */\nexport const preventDefault = (evt?:Event, stop:boolean=false):void => {\n\tif( evt ){\n\t\tevt.preventDefault();\n\t\tif( stop ){\n\t\t\tevt.stopPropagation();\n\t\t}\n\t}\n}\n\n\n/**\n * Add event helper\n *\n */\nexport const addEvent = (target:EventTarget, type:string, callback:EventListenerOrEventListenerObject, options?:object):void => {\n\ttarget.addEventListener(type,callback,options);\n};\n\n\n/**\n * Return true if the requested key is down\n * Will return false if more than one control character is pressed ( when [ctrl+shift+a] != [ctrl+a] )\n * The current evt may not always set ( eg calling advanceSelection() )\n *\n */\nexport const isKeyDown = ( key_name:keyof (KeyboardEvent|MouseEvent), evt?:KeyboardEvent|MouseEvent ) => {\n\n\tif( !evt ){\n\t\treturn false;\n\t}\n\n\tif( !evt[key_name] ){\n\t\treturn false;\n\t}\n\n\tvar count = (evt.altKey?1:0) + (evt.ctrlKey?1:0) + (evt.shiftKey?1:0) + (evt.metaKey?1:0);\n\n\tif( count === 1 ){\n\t\treturn true;\n\t}\n\n\treturn false;\n};\n\n\n/**\n * Get the id of an element\n * If the id attribute is not set, set the attribute with the given id\n *\n */\nexport const getId = (el:Element,id:string) => {\n\tconst existing_id = el.getAttribute('id');\n\tif( existing_id ){\n\t\treturn existing_id;\n\t}\n\n\tel.setAttribute('id',id);\n\treturn id;\n};\n\n\n/**\n * Returns a string with backslashes added before characters that need to be escaped.\n */\nexport const addSlashes = (str:string):string => {\n\treturn str.replace(/[\\\\\"']/g, '\\\\$&');\n};\n\n/**\n *\n */\nexport const append = ( parent:Element|DocumentFragment, node: string|Node|null|undefined ):void =>{\n\tif( node ) parent.append(node);\n};\n"],"names":["hash_key","value","get_hash","escape_html","str","replace","timeout","fn","setTimeout","call","loadDebounce","delay","callback","self","loading","Math","max","clearTimeout","loadedSearches","debounce_events","types","type","trigger","event_args","arguments","indexOf","apply","getSelection","input","start","selectionStart","length","selectionEnd","preventDefault","evt","stop","stopPropagation","addEvent","target","options","addEventListener","isKeyDown","key_name","count","altKey","ctrlKey","shiftKey","metaKey","getId","el","id","existing_id","getAttribute","setAttribute","addSlashes","append","parent","node"],"mappings":";;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACaA,MAAAA,QAAQ,GAAIC,KAA0C,IAAiB;EACnF,IAAI,OAAOA,KAAK,KAAK,WAAW,IAAIA,KAAK,KAAK,IAAI,EAAE,OAAO,IAAI,CAAA;EAC/D,OAAOC,QAAQ,CAACD,KAAK,CAAC,CAAA;AACvB,EAAC;AAEYC,MAAAA,QAAQ,GAAID,KAA2B,IAAY;EAC/D,IAAI,OAAOA,KAAK,KAAK,SAAS,EAAE,OAAOA,KAAK,GAAG,GAAG,GAAG,GAAG,CAAA;EACxD,OAAOA,KAAK,GAAG,EAAE,CAAA;AAClB,EAAC;;AAED;AACA;AACA;AACA;AACaE,MAAAA,WAAW,GAAIC,GAAU,IAAY;AACjD,EAAA,OAAO,CAACA,GAAG,GAAG,EAAE,EACdC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CACtBA,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CACrBA,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CACrBA,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAA;AAC1B,EAAC;;AAGD;AACA;AACA;MACaC,OAAO,GAAGA,CAACC,EAAW,EAACD,OAAc,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