@sankhyalabs/ezui 6.0.1 → 6.1.0-dev.1

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 (827) hide show
  1. package/dist/cjs/FormLayout-18853e70.js +27 -0
  2. package/dist/cjs/{constants-2714478b.js → constants-569271bc.js} +4 -0
  3. package/dist/cjs/ez-actions-button.cjs.entry.js +2 -2
  4. package/dist/cjs/ez-alert-list.cjs.entry.js +1 -1
  5. package/dist/cjs/ez-alert.cjs.entry.js +1 -1
  6. package/dist/cjs/ez-application.cjs.entry.js +1 -1
  7. package/dist/cjs/ez-avatar.cjs.entry.js +50 -0
  8. package/dist/cjs/ez-badge.cjs.entry.js +1 -1
  9. package/dist/cjs/ez-breadcrumb.cjs.entry.js +1 -1
  10. package/dist/cjs/ez-button.cjs.entry.js +1 -1
  11. package/dist/cjs/ez-calendar.cjs.entry.js +1 -1
  12. package/dist/cjs/ez-card-item_2.cjs.entry.js +4 -1218
  13. package/dist/cjs/ez-chart.cjs.entry.js +2 -2
  14. package/dist/cjs/ez-check.cjs.entry.js +19 -11
  15. package/dist/cjs/ez-chip.cjs.entry.js +1 -1
  16. package/dist/cjs/ez-collapsible-box.cjs.entry.js +2 -2
  17. package/dist/cjs/ez-combo-box-list_3.cjs.entry.js +4 -4
  18. package/dist/cjs/ez-combo-box.cjs.entry.js +9 -14
  19. package/dist/cjs/ez-date-input.cjs.entry.js +3 -2
  20. package/dist/cjs/ez-date-time-input.cjs.entry.js +3 -2
  21. package/dist/cjs/ez-dialog.cjs.entry.js +7 -4
  22. package/dist/cjs/ez-double-list.cjs.entry.js +115 -54
  23. package/dist/cjs/{ez-dropdown_2.cjs.entry.js → ez-dropdown.cjs.entry.js} +2 -63
  24. package/dist/cjs/ez-file-item.cjs.entry.js +1 -1
  25. package/dist/cjs/ez-filter-input_2.cjs.entry.js +257 -0
  26. package/dist/cjs/ez-form-view.cjs.entry.js +19 -11
  27. package/dist/cjs/ez-form.cjs.entry.js +87 -6
  28. package/dist/cjs/ez-grid.cjs.entry.js +1042 -145
  29. package/dist/cjs/ez-guide-navigator.cjs.entry.js +1 -1
  30. package/dist/cjs/ez-icon.cjs.entry.js +12 -6
  31. package/dist/cjs/ez-list.cjs.entry.js +3 -3
  32. package/dist/cjs/ez-loading-bar.cjs.entry.js +1 -1
  33. package/dist/cjs/ez-modal-container.cjs.entry.js +8 -4
  34. package/dist/cjs/ez-modal.cjs.entry.js +6 -2
  35. package/dist/cjs/ez-multi-selection-list.cjs.entry.js +1 -1
  36. package/dist/cjs/ez-number-input.cjs.entry.js +3 -2
  37. package/dist/cjs/ez-popover-plus_3.cjs.entry.js +1 -1
  38. package/dist/cjs/ez-popover.cjs.entry.js +1 -1
  39. package/dist/cjs/ez-popup.cjs.entry.js +6 -2
  40. package/dist/cjs/ez-radio-button.cjs.entry.js +1 -1
  41. package/dist/cjs/ez-scroller_2.cjs.entry.js +1 -1
  42. package/dist/cjs/ez-search-plus.cjs.entry.js +397 -0
  43. package/dist/cjs/ez-search-result-list.cjs.entry.js +97 -0
  44. package/dist/cjs/ez-search.cjs.entry.js +5 -4
  45. package/dist/cjs/ez-sidebar-navigator.cjs.entry.js +1 -1
  46. package/dist/cjs/ez-skeleton.cjs.entry.js +149 -0
  47. package/dist/cjs/ez-sortable-list.cjs.entry.js +3510 -0
  48. package/dist/cjs/ez-split-button.cjs.entry.js +16 -7
  49. package/dist/cjs/ez-split-item.cjs.entry.js +2 -2
  50. package/dist/cjs/ez-split-panel.cjs.entry.js +1 -1
  51. package/dist/cjs/ez-tabselector.cjs.entry.js +1 -1
  52. package/dist/cjs/ez-text-area.cjs.entry.js +25 -4
  53. package/dist/cjs/ez-text-input.cjs.entry.js +84 -101
  54. package/dist/cjs/ez-time-input.cjs.entry.js +3 -2
  55. package/dist/cjs/ez-toast.cjs.entry.js +1 -1
  56. package/dist/cjs/ez-tree.cjs.entry.js +1 -1
  57. package/dist/cjs/ez-upload.cjs.entry.js +1 -1
  58. package/dist/cjs/ez-view-stack.cjs.entry.js +1 -1
  59. package/dist/cjs/ezui.cjs.js +2 -2
  60. package/dist/cjs/filter-column.cjs.entry.js +15 -6
  61. package/dist/cjs/floating-ui.dom.esm-017acce4.js +1404 -0
  62. package/dist/cjs/{index-9e5554cb.js → index-a7b0c73d.js} +24 -11
  63. package/dist/cjs/loader.cjs.js +2 -2
  64. package/dist/cjs/{DataBinder-e92314c2.js → search-column-27d1f72f.js} +73 -13
  65. package/dist/collection/collection-manifest.json +14 -0
  66. package/dist/collection/components/ez-avatar/ez-avatar.css +139 -0
  67. package/dist/collection/components/ez-avatar/ez-avatar.js +143 -0
  68. package/dist/collection/components/ez-check/ez-check.css +9 -0
  69. package/dist/collection/components/ez-check/ez-check.js +34 -9
  70. package/dist/collection/components/ez-combo-box/ez-combo-box.js +25 -14
  71. package/dist/collection/components/ez-date-input/ez-date-input.js +19 -1
  72. package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +19 -1
  73. package/dist/collection/components/ez-dialog/ez-dialog.css +24 -21
  74. package/dist/collection/components/ez-dialog/ez-dialog.js +5 -2
  75. package/dist/collection/components/ez-double-list/doubleListHelper.js +9 -10
  76. package/dist/collection/components/ez-double-list/ez-double-list.css +6 -38
  77. package/dist/collection/components/ez-double-list/ez-double-list.js +168 -50
  78. package/dist/collection/components/ez-dropdown/ez-dropdown.js +1 -1
  79. package/dist/collection/components/ez-form/ez-form.js +124 -4
  80. package/dist/collection/components/ez-form-view/ez-form-view.css +8 -0
  81. package/dist/collection/components/ez-form-view/ez-form-view.js +21 -2
  82. package/dist/collection/components/ez-form-view/fieldbuilder/FieldBuilder.js +3 -1
  83. package/dist/collection/components/ez-form-view/fieldbuilder/templates/SearchInputPlus.tpl.js +6 -0
  84. package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +148 -14
  85. package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js +23 -4
  86. package/dist/collection/components/ez-grid/controller/ag-grid/GridEditionManager.js +30 -6
  87. package/dist/collection/components/ez-grid/controller/ag-grid/editor/EzCellEditor.js +2 -0
  88. package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/SearchPlus.tpl.js +15 -0
  89. package/dist/collection/components/ez-grid/ez-grid.css +4 -0
  90. package/dist/collection/components/ez-grid/ez-grid.js +122 -15
  91. package/dist/collection/components/ez-grid/interfaces/IGridMode.js +1 -0
  92. package/dist/collection/components/ez-grid/interfaces/index.js +1 -0
  93. package/dist/collection/components/ez-grid/subcomponents/filter-column.js +14 -5
  94. package/dist/collection/components/ez-icon/ez-icon.js +28 -5
  95. package/dist/collection/components/ez-list/ez-list.js +2 -2
  96. package/dist/collection/components/ez-modal/ez-modal.js +5 -1
  97. package/dist/collection/components/ez-modal-container/ez-modal-container.css +1 -0
  98. package/dist/collection/components/ez-modal-container/ez-modal-container.js +6 -2
  99. package/dist/collection/components/ez-multi-selection-list/interfaces/IStaticOptionsFetchConfig.js +1 -0
  100. package/dist/collection/components/ez-number-input/ez-number-input.js +19 -1
  101. package/dist/collection/components/ez-popup/ez-popup.js +5 -1
  102. package/dist/collection/components/ez-search/ez-search.js +19 -1
  103. package/dist/collection/components/ez-search-plus/ez-search-plus.css +373 -0
  104. package/dist/collection/components/ez-search-plus/ez-search-plus.js +960 -0
  105. package/dist/collection/components/ez-search-plus/subcomponent/ez-search-result-list/ez-search-result-list.css +221 -0
  106. package/dist/collection/components/ez-search-plus/subcomponent/ez-search-result-list/ez-search-result-list.js +278 -0
  107. package/dist/collection/components/ez-skeleton/ez-skeleton.constants.js +25 -1
  108. package/dist/collection/components/ez-skeleton/ez-skeleton.css +122 -80
  109. package/dist/collection/components/ez-skeleton/ez-skeleton.js +210 -46
  110. package/dist/collection/components/ez-sortable-list/ez-sortable-list.css +226 -0
  111. package/dist/collection/components/ez-sortable-list/ez-sortable-list.js +582 -0
  112. package/dist/collection/components/ez-split-button/ez-split-button.css +1 -1
  113. package/dist/collection/components/ez-split-button/ez-split-button.js +87 -10
  114. package/dist/collection/components/ez-text-area/ez-text-area.js +47 -2
  115. package/dist/collection/components/ez-text-input/ez-text-input.css +27 -2
  116. package/dist/collection/components/ez-text-input/ez-text-input.js +124 -73
  117. package/dist/collection/components/ez-time-input/ez-time-input.js +19 -1
  118. package/dist/collection/components/ez-tooltip/ez-tooltip.css +54 -12
  119. package/dist/collection/components/ez-tooltip/ez-tooltip.js +240 -46
  120. package/dist/collection/utils/constants.js +2 -0
  121. package/dist/collection/utils/form/DataBinder.js +43 -14
  122. package/dist/collection/utils/form/interfaces/FormLayout.js +5 -0
  123. package/dist/collection/utils/form/interfaces/index.js +1 -1
  124. package/dist/collection/utils/form/test/DataBinder.test.js +14 -0
  125. package/dist/collection/utils/index.js +3 -0
  126. package/dist/collection/utils/search/types.js +7 -0
  127. package/dist/collection/utils/searchColumn/search-column.js +35 -0
  128. package/dist/custom-elements/index.d.ts +24 -0
  129. package/dist/custom-elements/index.js +6009 -467
  130. package/dist/esm/FormLayout-071d324c.js +27 -0
  131. package/dist/esm/constants-b036528f.js +7 -0
  132. package/dist/esm/ez-actions-button.entry.js +2 -2
  133. package/dist/esm/ez-alert-list.entry.js +1 -1
  134. package/dist/esm/ez-alert.entry.js +1 -1
  135. package/dist/esm/ez-application.entry.js +1 -1
  136. package/dist/esm/ez-avatar.entry.js +46 -0
  137. package/dist/esm/ez-badge.entry.js +1 -1
  138. package/dist/esm/ez-breadcrumb.entry.js +1 -1
  139. package/dist/esm/ez-button.entry.js +1 -1
  140. package/dist/esm/ez-calendar.entry.js +1 -1
  141. package/dist/esm/ez-card-item_2.entry.js +2 -1216
  142. package/dist/esm/ez-chart.entry.js +2 -2
  143. package/dist/esm/ez-check.entry.js +19 -11
  144. package/dist/esm/ez-chip.entry.js +1 -1
  145. package/dist/esm/ez-collapsible-box.entry.js +2 -2
  146. package/dist/esm/ez-combo-box-list_3.entry.js +3 -3
  147. package/dist/esm/ez-combo-box.entry.js +9 -14
  148. package/dist/esm/ez-date-input.entry.js +3 -2
  149. package/dist/esm/ez-date-time-input.entry.js +3 -2
  150. package/dist/esm/ez-dialog.entry.js +7 -4
  151. package/dist/esm/ez-double-list.entry.js +116 -55
  152. package/dist/esm/{ez-dropdown_2.entry.js → ez-dropdown.entry.js} +3 -63
  153. package/dist/esm/ez-file-item.entry.js +1 -1
  154. package/dist/esm/ez-filter-input_2.entry.js +252 -0
  155. package/dist/esm/ez-form-view.entry.js +20 -12
  156. package/dist/esm/ez-form.entry.js +86 -5
  157. package/dist/esm/ez-grid.entry.js +1038 -141
  158. package/dist/esm/ez-guide-navigator.entry.js +1 -1
  159. package/dist/esm/ez-icon.entry.js +12 -6
  160. package/dist/esm/ez-list.entry.js +3 -3
  161. package/dist/esm/ez-loading-bar.entry.js +1 -1
  162. package/dist/esm/ez-modal-container.entry.js +8 -4
  163. package/dist/esm/ez-modal.entry.js +6 -2
  164. package/dist/esm/ez-multi-selection-list.entry.js +1 -1
  165. package/dist/esm/ez-number-input.entry.js +3 -2
  166. package/dist/esm/ez-popover-plus_3.entry.js +1 -1
  167. package/dist/esm/ez-popover.entry.js +1 -1
  168. package/dist/esm/ez-popup.entry.js +6 -2
  169. package/dist/esm/ez-radio-button.entry.js +1 -1
  170. package/dist/esm/ez-scroller_2.entry.js +1 -1
  171. package/dist/esm/ez-search-plus.entry.js +393 -0
  172. package/dist/esm/ez-search-result-list.entry.js +93 -0
  173. package/dist/esm/ez-search.entry.js +5 -4
  174. package/dist/esm/ez-sidebar-navigator.entry.js +1 -1
  175. package/dist/esm/ez-skeleton.entry.js +145 -0
  176. package/dist/esm/ez-sortable-list.entry.js +3506 -0
  177. package/dist/esm/ez-split-button.entry.js +16 -7
  178. package/dist/esm/ez-split-item.entry.js +2 -2
  179. package/dist/esm/ez-split-panel.entry.js +1 -1
  180. package/dist/esm/ez-tabselector.entry.js +1 -1
  181. package/dist/esm/ez-text-area.entry.js +25 -4
  182. package/dist/esm/ez-text-input.entry.js +84 -101
  183. package/dist/esm/ez-time-input.entry.js +3 -2
  184. package/dist/esm/ez-toast.entry.js +1 -1
  185. package/dist/esm/ez-tree.entry.js +1 -1
  186. package/dist/esm/ez-upload.entry.js +1 -1
  187. package/dist/esm/ez-view-stack.entry.js +1 -1
  188. package/dist/esm/ezui.js +3 -3
  189. package/dist/esm/filter-column.entry.js +15 -6
  190. package/dist/esm/floating-ui.dom.esm-5d3da819.js +1398 -0
  191. package/dist/esm/{index-5a720e56.js → index-baa5e267.js} +25 -11
  192. package/dist/esm/loader.js +3 -3
  193. package/dist/esm/{DataBinder-9c877244.js → search-column-e609d513.js} +69 -15
  194. package/dist/ezui/ezui.esm.js +1 -1
  195. package/dist/ezui/{p-e6b38ade.entry.js → p-0306dff7.entry.js} +1 -1
  196. package/dist/ezui/p-07894c4a.entry.js +1 -0
  197. package/dist/ezui/{p-91ccae0c.entry.js → p-09de35a2.entry.js} +1 -1
  198. package/dist/ezui/p-0d9856a4.entry.js +1 -0
  199. package/dist/ezui/{p-87f5a060.entry.js → p-1bcfd88c.entry.js} +1 -1
  200. package/dist/ezui/{p-81461d2f.entry.js → p-1e7a8633.entry.js} +1 -1
  201. package/dist/ezui/{p-866abc8e.entry.js → p-1eb34cad.entry.js} +1 -1
  202. package/dist/ezui/{p-6b51c9cc.entry.js → p-1f50fa05.entry.js} +1 -1
  203. package/dist/ezui/{p-e4c7eb39.js → p-23a36bb6.js} +2 -2
  204. package/dist/ezui/p-26685c50.entry.js +1 -0
  205. package/dist/ezui/{p-06f1b8e4.entry.js → p-288631d1.entry.js} +1 -1
  206. package/dist/ezui/p-2b42abbb.entry.js +1 -0
  207. package/dist/ezui/p-2b4df33d.entry.js +1 -0
  208. package/dist/ezui/p-30ffb9ed.js +1 -0
  209. package/dist/ezui/p-33326ac5.entry.js +1 -0
  210. package/dist/ezui/p-341da682.entry.js +1 -0
  211. package/dist/ezui/p-35115d5d.entry.js +1 -0
  212. package/dist/ezui/p-3ba9565c.entry.js +1 -0
  213. package/dist/ezui/{p-0378416a.entry.js → p-44caad9a.entry.js} +1 -1
  214. package/dist/ezui/p-496f7832.entry.js +1 -0
  215. package/dist/ezui/{p-769632d5.entry.js → p-4b67138e.entry.js} +1 -1
  216. package/dist/ezui/p-4bd6dd6a.entry.js +1 -0
  217. package/dist/ezui/p-4d30b703.entry.js +1 -0
  218. package/dist/ezui/{p-7567ccdd.entry.js → p-555c9018.entry.js} +1 -1
  219. package/dist/ezui/{p-30571aaf.entry.js → p-57363cfd.entry.js} +1 -1
  220. package/dist/ezui/p-58f69d24.entry.js +1 -0
  221. package/dist/ezui/p-59561756.entry.js +7 -0
  222. package/dist/ezui/{p-cedeedf1.entry.js → p-5dde9df3.entry.js} +1 -1
  223. package/dist/ezui/{p-6fc26622.entry.js → p-5ed81457.entry.js} +1 -1
  224. package/dist/ezui/p-5eea9886.js +1 -0
  225. package/dist/ezui/p-63cb493e.entry.js +1 -0
  226. package/dist/ezui/p-69937816.entry.js +1 -0
  227. package/dist/ezui/{p-fc194825.entry.js → p-6e429cff.entry.js} +1 -1
  228. package/dist/ezui/p-7019f782.entry.js +1 -0
  229. package/dist/ezui/{p-11bfeca3.entry.js → p-77a4bd35.entry.js} +1 -1
  230. package/dist/ezui/p-7eae6986.entry.js +1 -0
  231. package/dist/ezui/{p-82fa4b09.entry.js → p-8df1ca33.entry.js} +1 -1
  232. package/dist/ezui/p-9478b13b.entry.js +1 -0
  233. package/dist/ezui/p-9567b31a.entry.js +1 -0
  234. package/dist/ezui/p-97c7cf51.entry.js +1 -0
  235. package/dist/ezui/p-998afb6a.entry.js +1 -0
  236. package/dist/ezui/p-9c5cd3b2.entry.js +1 -0
  237. package/dist/ezui/{p-c2b20f78.entry.js → p-9f5fa3f9.entry.js} +1 -1
  238. package/dist/ezui/p-a148e994.entry.js +1 -0
  239. package/dist/ezui/p-a3bf8cf1.entry.js +1 -0
  240. package/dist/ezui/{p-dfca5946.entry.js → p-a80b1287.entry.js} +1 -1
  241. package/dist/ezui/p-b38411b4.entry.js +309 -0
  242. package/dist/ezui/p-b81881ac.entry.js +1 -0
  243. package/dist/ezui/p-bac0f920.entry.js +1 -0
  244. package/dist/ezui/p-bc2f844e.entry.js +1 -0
  245. package/dist/ezui/p-bff24a7b.js +1 -0
  246. package/dist/ezui/{p-92748142.entry.js → p-c0d9c4f8.entry.js} +1 -1
  247. package/dist/ezui/p-cb75eb46.entry.js +1 -0
  248. package/dist/ezui/p-d47dabdf.entry.js +1 -0
  249. package/dist/ezui/{p-708b196e.entry.js → p-da1b4a38.entry.js} +1 -1
  250. package/dist/ezui/{p-c7035d65.entry.js → p-dc73e1fe.entry.js} +1 -1
  251. package/dist/ezui/{p-2f351332.entry.js → p-e06a9886.entry.js} +1 -1
  252. package/dist/ezui/p-e07e4671.js +1 -0
  253. package/dist/ezui/p-e4528470.entry.js +1 -0
  254. package/dist/ezui/{p-9e95bfeb.entry.js → p-e6a9041d.entry.js} +1 -1
  255. package/dist/ezui/{p-000159dc.entry.js → p-e75c7a23.entry.js} +1 -1
  256. package/dist/ezui/{p-44b39e81.entry.js → p-fa6732f2.entry.js} +1 -1
  257. package/dist/types/components/ez-avatar/ez-avatar.d.ts +24 -0
  258. package/dist/types/components/ez-check/ez-check.d.ts +7 -2
  259. package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +4 -2
  260. package/dist/types/components/ez-date-input/ez-date-input.d.ts +4 -0
  261. package/dist/types/components/ez-date-time-input/ez-date-time-input.d.ts +4 -0
  262. package/dist/types/components/ez-dialog/ez-dialog.d.ts +1 -0
  263. package/dist/types/components/ez-double-list/doubleListHelper.d.ts +4 -2
  264. package/dist/types/components/ez-double-list/ez-double-list.d.ts +60 -24
  265. package/dist/types/components/ez-dropdown/structure/DropdownItem.d.ts +4 -4
  266. package/dist/types/components/ez-form/ez-form.d.ts +23 -1
  267. package/dist/types/components/ez-form-view/ez-form-view.d.ts +4 -0
  268. package/dist/types/components/ez-form-view/fieldbuilder/templates/SearchInputPlus.tpl.d.ts +2 -0
  269. package/dist/types/components/ez-grid/controller/EzGridController.d.ts +9 -1
  270. package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +9 -1
  271. package/dist/types/components/ez-grid/controller/ag-grid/DataSource.d.ts +1 -0
  272. package/dist/types/components/ez-grid/controller/ag-grid/GridEditionManager.d.ts +1 -0
  273. package/dist/types/components/ez-grid/controller/ag-grid/editor/templates/SearchPlus.tpl.d.ts +3 -0
  274. package/dist/types/components/ez-grid/ez-grid.d.ts +17 -1
  275. package/dist/types/components/ez-grid/interfaces/IGridMode.d.ts +1 -0
  276. package/dist/types/components/ez-grid/interfaces/index.d.ts +1 -0
  277. package/dist/types/components/ez-grid/subcomponents/filter-column.d.ts +1 -0
  278. package/dist/types/components/ez-icon/ez-icon.d.ts +5 -0
  279. package/dist/types/components/ez-modal/ez-modal.d.ts +2 -0
  280. package/dist/types/components/ez-modal-container/ez-modal-container.d.ts +2 -0
  281. package/dist/types/components/ez-multi-selection-list/interfaces/IMultiSelectionListDataSource.d.ts +2 -1
  282. package/dist/types/components/ez-multi-selection-list/interfaces/IStaticOptionsFetchConfig.d.ts +3 -0
  283. package/dist/types/components/ez-number-input/ez-number-input.d.ts +4 -0
  284. package/dist/types/components/ez-popup/ez-popup.d.ts +2 -0
  285. package/dist/types/components/ez-search/ez-search.d.ts +4 -0
  286. package/dist/types/components/ez-search-plus/ez-search-plus.d.ts +186 -0
  287. package/dist/types/components/ez-search-plus/subcomponent/ez-search-result-list/ez-search-result-list.d.ts +26 -0
  288. package/dist/types/components/ez-skeleton/ez-skeleton.constants.d.ts +55 -1
  289. package/dist/types/components/ez-skeleton/ez-skeleton.d.ts +50 -22
  290. package/dist/types/components/ez-sortable-list/ez-sortable-list.d.ts +91 -0
  291. package/dist/types/components/ez-split-button/ez-split-button.d.ts +14 -2
  292. package/dist/types/components/ez-text-area/ez-text-area.d.ts +8 -0
  293. package/dist/types/components/ez-text-input/ez-text-input.d.ts +21 -9
  294. package/dist/types/components/ez-time-input/ez-time-input.d.ts +4 -0
  295. package/dist/types/components/ez-tooltip/ez-tooltip.d.ts +41 -5
  296. package/dist/types/components.d.ts +778 -24
  297. package/dist/types/utils/constants.d.ts +2 -0
  298. package/dist/types/utils/form/DataBinder.d.ts +4 -2
  299. package/dist/types/utils/form/interfaces/FormLayout.d.ts +4 -0
  300. package/dist/types/utils/form/interfaces/index.d.ts +1 -0
  301. package/dist/types/utils/index.d.ts +3 -0
  302. package/dist/types/utils/search/types.d.ts +12 -0
  303. package/dist/types/utils/searchColumn/search-column.d.ts +9 -0
  304. package/package.json +7 -2
  305. package/react/components.d.ts +64 -60
  306. package/react/components.js +4 -0
  307. package/react/components.js.map +1 -1
  308. package/react/react-component-lib/createComponent.d.ts +1 -1
  309. package/react/react-component-lib/createComponent.js.map +1 -1
  310. package/react/react-component-lib/createOverlayComponent.js.map +1 -1
  311. package/react/react-component-lib/interfaces.js +1 -0
  312. package/react/react-component-lib/utils/attachProps.d.ts +1 -1
  313. package/react/react-component-lib/utils/attachProps.js.map +1 -1
  314. package/react/react-component-lib/utils/dev.js.map +1 -1
  315. package/react/react-component-lib/utils/index.d.ts +2 -2
  316. package/react/react-component-lib/utils/index.js.map +1 -1
  317. package/dist/cjs/ApplicationUtils-c9d1205c.js.gz +0 -0
  318. package/dist/cjs/CSSVarsUtils-f20973d1.js.gz +0 -0
  319. package/dist/cjs/CheckMode-ecb90b87.js.gz +0 -0
  320. package/dist/cjs/DataBinder-e92314c2.js.gz +0 -0
  321. package/dist/cjs/DialogType-2114c337.js.gz +0 -0
  322. package/dist/cjs/EzScrollDirection-b2c99895.js.gz +0 -0
  323. package/dist/cjs/FocusResolver-885f2173.js.gz +0 -0
  324. package/dist/cjs/ICustomRender-6fafffce.js +0 -13
  325. package/dist/cjs/ICustomRender-6fafffce.js.gz +0 -0
  326. package/dist/cjs/constants-2714478b.js.gz +0 -0
  327. package/dist/cjs/ez-actions-button.cjs.entry.js.gz +0 -0
  328. package/dist/cjs/ez-alert-list.cjs.entry.js.gz +0 -0
  329. package/dist/cjs/ez-alert.cjs.entry.js.gz +0 -0
  330. package/dist/cjs/ez-application.cjs.entry.js.gz +0 -0
  331. package/dist/cjs/ez-badge.cjs.entry.js.gz +0 -0
  332. package/dist/cjs/ez-breadcrumb.cjs.entry.js.gz +0 -0
  333. package/dist/cjs/ez-button.cjs.entry.js.gz +0 -0
  334. package/dist/cjs/ez-calendar.cjs.entry.js.gz +0 -0
  335. package/dist/cjs/ez-card-item_2.cjs.entry.js.gz +0 -0
  336. package/dist/cjs/ez-chart.cjs.entry.js.gz +0 -0
  337. package/dist/cjs/ez-check.cjs.entry.js.gz +0 -0
  338. package/dist/cjs/ez-chip.cjs.entry.js.gz +0 -0
  339. package/dist/cjs/ez-collapsible-box.cjs.entry.js.gz +0 -0
  340. package/dist/cjs/ez-combo-box-list_3.cjs.entry.js.gz +0 -0
  341. package/dist/cjs/ez-combo-box.cjs.entry.js.gz +0 -0
  342. package/dist/cjs/ez-date-input.cjs.entry.js.gz +0 -0
  343. package/dist/cjs/ez-date-time-input.cjs.entry.js.gz +0 -0
  344. package/dist/cjs/ez-dialog.cjs.entry.js.gz +0 -0
  345. package/dist/cjs/ez-double-list.cjs.entry.js.gz +0 -0
  346. package/dist/cjs/ez-dropdown_2.cjs.entry.js.gz +0 -0
  347. package/dist/cjs/ez-file-item.cjs.entry.js.gz +0 -0
  348. package/dist/cjs/ez-filter-input.cjs.entry.js +0 -129
  349. package/dist/cjs/ez-filter-input.cjs.entry.js.gz +0 -0
  350. package/dist/cjs/ez-form-view.cjs.entry.js.gz +0 -0
  351. package/dist/cjs/ez-form.cjs.entry.js.gz +0 -0
  352. package/dist/cjs/ez-grid.cjs.entry.js.gz +0 -0
  353. package/dist/cjs/ez-guide-navigator.cjs.entry.js.gz +0 -0
  354. package/dist/cjs/ez-icon.cjs.entry.js.gz +0 -0
  355. package/dist/cjs/ez-list.cjs.entry.js.gz +0 -0
  356. package/dist/cjs/ez-loading-bar.cjs.entry.js.gz +0 -0
  357. package/dist/cjs/ez-modal-container.cjs.entry.js.gz +0 -0
  358. package/dist/cjs/ez-modal.cjs.entry.js.gz +0 -0
  359. package/dist/cjs/ez-multi-selection-list.cjs.entry.js.gz +0 -0
  360. package/dist/cjs/ez-number-input.cjs.entry.js.gz +0 -0
  361. package/dist/cjs/ez-popover-plus_3.cjs.entry.js.gz +0 -0
  362. package/dist/cjs/ez-popover.cjs.entry.js.gz +0 -0
  363. package/dist/cjs/ez-popup.cjs.entry.js.gz +0 -0
  364. package/dist/cjs/ez-radio-button.cjs.entry.js.gz +0 -0
  365. package/dist/cjs/ez-scroller_2.cjs.entry.js.gz +0 -0
  366. package/dist/cjs/ez-search.cjs.entry.js.gz +0 -0
  367. package/dist/cjs/ez-sidebar-navigator.cjs.entry.js.gz +0 -0
  368. package/dist/cjs/ez-split-button.cjs.entry.js.gz +0 -0
  369. package/dist/cjs/ez-split-item.cjs.entry.js.gz +0 -0
  370. package/dist/cjs/ez-split-panel.cjs.entry.js.gz +0 -0
  371. package/dist/cjs/ez-tabselector.cjs.entry.js.gz +0 -0
  372. package/dist/cjs/ez-text-area.cjs.entry.js.gz +0 -0
  373. package/dist/cjs/ez-text-input.cjs.entry.js.gz +0 -0
  374. package/dist/cjs/ez-time-input.cjs.entry.js.gz +0 -0
  375. package/dist/cjs/ez-toast.cjs.entry.js.gz +0 -0
  376. package/dist/cjs/ez-tooltip.cjs.entry.js +0 -55
  377. package/dist/cjs/ez-tooltip.cjs.entry.js.gz +0 -0
  378. package/dist/cjs/ez-tree.cjs.entry.js.gz +0 -0
  379. package/dist/cjs/ez-upload.cjs.entry.js.gz +0 -0
  380. package/dist/cjs/ez-view-stack.cjs.entry.js.gz +0 -0
  381. package/dist/cjs/ezListHelper-0d3970b4.js.gz +0 -0
  382. package/dist/cjs/ezui.cjs.js.gz +0 -0
  383. package/dist/cjs/filter-column.cjs.entry.js.gz +0 -0
  384. package/dist/cjs/index-9e5554cb.js.gz +0 -0
  385. package/dist/cjs/index.cjs.js.gz +0 -0
  386. package/dist/cjs/loader.cjs.js.gz +0 -0
  387. package/dist/cjs/searchFormatters-b7e1ed1e.js.gz +0 -0
  388. package/dist/collection/components/ez-actions-button/ez-actions-button.css.gz +0 -0
  389. package/dist/collection/components/ez-actions-button/ez-actions-button.js.gz +0 -0
  390. package/dist/collection/components/ez-alert/ez-alert.css.gz +0 -0
  391. package/dist/collection/components/ez-alert/ez-alert.js.gz +0 -0
  392. package/dist/collection/components/ez-alert-list/ez-alert-list.css.gz +0 -0
  393. package/dist/collection/components/ez-alert-list/ez-alert-list.js.gz +0 -0
  394. package/dist/collection/components/ez-application/ez-application.css.gz +0 -0
  395. package/dist/collection/components/ez-application/ez-application.js.gz +0 -0
  396. package/dist/collection/components/ez-badge/enum/sizes.js.gz +0 -0
  397. package/dist/collection/components/ez-badge/ez-badge.css.gz +0 -0
  398. package/dist/collection/components/ez-badge/ez-badge.js.gz +0 -0
  399. package/dist/collection/components/ez-badge/interfaces/IPosition.js.gz +0 -0
  400. package/dist/collection/components/ez-breadcrumb/ez-breadcrumb.css.gz +0 -0
  401. package/dist/collection/components/ez-breadcrumb/ez-breadcrumb.js.gz +0 -0
  402. package/dist/collection/components/ez-breadcrumb/subcomponents/breadcrumb-item.js.gz +0 -0
  403. package/dist/collection/components/ez-button/ez-button.css.gz +0 -0
  404. package/dist/collection/components/ez-button/ez-button.js.gz +0 -0
  405. package/dist/collection/components/ez-calendar/ez-calendar.css.gz +0 -0
  406. package/dist/collection/components/ez-calendar/ez-calendar.js.gz +0 -0
  407. package/dist/collection/components/ez-card-item/ez-card-item.css.gz +0 -0
  408. package/dist/collection/components/ez-card-item/ez-card-item.js.gz +0 -0
  409. package/dist/collection/components/ez-chart/components/BarChart.js.gz +0 -0
  410. package/dist/collection/components/ez-chart/components/ColumnChart.js.gz +0 -0
  411. package/dist/collection/components/ez-chart/components/DonutChart.js.gz +0 -0
  412. package/dist/collection/components/ez-chart/components/LineChart.js.gz +0 -0
  413. package/dist/collection/components/ez-chart/components/PieChart.js.gz +0 -0
  414. package/dist/collection/components/ez-chart/components/index.js.gz +0 -0
  415. package/dist/collection/components/ez-chart/ez-chart.css.gz +0 -0
  416. package/dist/collection/components/ez-chart/ez-chart.js.gz +0 -0
  417. package/dist/collection/components/ez-chart/interfaces/ChartAxis.js.gz +0 -0
  418. package/dist/collection/components/ez-chart/interfaces/ChartContext.js.gz +0 -0
  419. package/dist/collection/components/ez-chart/interfaces/ChartOptions.js.gz +0 -0
  420. package/dist/collection/components/ez-chart/interfaces/ChartSerie.js.gz +0 -0
  421. package/dist/collection/components/ez-chart/interfaces/ChartStrategies.js.gz +0 -0
  422. package/dist/collection/components/ez-chart/interfaces/ChartType.js.gz +0 -0
  423. package/dist/collection/components/ez-chart/interfaces/ChartTypeValue.js.gz +0 -0
  424. package/dist/collection/components/ez-chart/interfaces/index.js.gz +0 -0
  425. package/dist/collection/components/ez-chart/test/mock-chart.js.gz +0 -0
  426. package/dist/collection/components/ez-chart/types/BaseHighChartsRender.js.gz +0 -0
  427. package/dist/collection/components/ez-check/CheckMode.js.gz +0 -0
  428. package/dist/collection/components/ez-check/ez-check.css.gz +0 -0
  429. package/dist/collection/components/ez-check/ez-check.js.gz +0 -0
  430. package/dist/collection/components/ez-chip/ez-chip.css.gz +0 -0
  431. package/dist/collection/components/ez-chip/ez-chip.js.gz +0 -0
  432. package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.css.gz +0 -0
  433. package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.js.gz +0 -0
  434. package/dist/collection/components/ez-combo-box/ez-combo-box-list/ez-combo-box-list.css.gz +0 -0
  435. package/dist/collection/components/ez-combo-box/ez-combo-box-list/ez-combo-box-list.js.gz +0 -0
  436. package/dist/collection/components/ez-combo-box/ez-combo-box.css.gz +0 -0
  437. package/dist/collection/components/ez-combo-box/ez-combo-box.js.gz +0 -0
  438. package/dist/collection/components/ez-date-input/ez-date-input.css.gz +0 -0
  439. package/dist/collection/components/ez-date-input/ez-date-input.js.gz +0 -0
  440. package/dist/collection/components/ez-date-time-input/ez-date-time-input.css.gz +0 -0
  441. package/dist/collection/components/ez-date-time-input/ez-date-time-input.js.gz +0 -0
  442. package/dist/collection/components/ez-dialog/DialogType.js.gz +0 -0
  443. package/dist/collection/components/ez-dialog/ez-dialog.css.gz +0 -0
  444. package/dist/collection/components/ez-dialog/ez-dialog.js.gz +0 -0
  445. package/dist/collection/components/ez-double-list/doubleListHelper.js.gz +0 -0
  446. package/dist/collection/components/ez-double-list/ez-double-list.css.gz +0 -0
  447. package/dist/collection/components/ez-double-list/ez-double-list.js.gz +0 -0
  448. package/dist/collection/components/ez-dropdown/ez-dropdown.css.gz +0 -0
  449. package/dist/collection/components/ez-dropdown/ez-dropdown.js.gz +0 -0
  450. package/dist/collection/components/ez-dropdown/structure/DropdownItem.js.gz +0 -0
  451. package/dist/collection/components/ez-dropdown/structure/SubmenuControl.js.gz +0 -0
  452. package/dist/collection/components/ez-file-item/ez-file-item.css.gz +0 -0
  453. package/dist/collection/components/ez-file-item/ez-file-item.js.gz +0 -0
  454. package/dist/collection/components/ez-filter-input/ez-filter-input.css.gz +0 -0
  455. package/dist/collection/components/ez-filter-input/ez-filter-input.js.gz +0 -0
  456. package/dist/collection/components/ez-form/ez-form.css.gz +0 -0
  457. package/dist/collection/components/ez-form/ez-form.js.gz +0 -0
  458. package/dist/collection/components/ez-form/store/form.slice.js.gz +0 -0
  459. package/dist/collection/components/ez-form-view/custom-input/ez-custom-form-input.js.gz +0 -0
  460. package/dist/collection/components/ez-form-view/ez-form-view.css.gz +0 -0
  461. package/dist/collection/components/ez-form-view/ez-form-view.js.gz +0 -0
  462. package/dist/collection/components/ez-form-view/fieldbuilder/FieldBuilder.js.gz +0 -0
  463. package/dist/collection/components/ez-form-view/fieldbuilder/templates/CheckBox.tpl.js.gz +0 -0
  464. package/dist/collection/components/ez-form-view/fieldbuilder/templates/ComboBox.tpl.js.gz +0 -0
  465. package/dist/collection/components/ez-form-view/fieldbuilder/templates/DateInput.tpl.js.gz +0 -0
  466. package/dist/collection/components/ez-form-view/fieldbuilder/templates/FileInput.tpl.js.gz +0 -0
  467. package/dist/collection/components/ez-form-view/fieldbuilder/templates/NumberInput.tpl.js.gz +0 -0
  468. package/dist/collection/components/ez-form-view/fieldbuilder/templates/SearchInput.tpl.js.gz +0 -0
  469. package/dist/collection/components/ez-form-view/fieldbuilder/templates/TextArea.tpl.js.gz +0 -0
  470. package/dist/collection/components/ez-form-view/fieldbuilder/templates/TextInput.tpl.js.gz +0 -0
  471. package/dist/collection/components/ez-form-view/interfaces/IFormViewField.js.gz +0 -0
  472. package/dist/collection/components/ez-form-view/interfaces/index.js.gz +0 -0
  473. package/dist/collection/components/ez-form-view/structure/index.js.gz +0 -0
  474. package/dist/collection/components/ez-grid/controller/EzGridController.js.gz +0 -0
  475. package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js.gz +0 -0
  476. package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js.gz +0 -0
  477. package/dist/collection/components/ez-grid/controller/ag-grid/DataSourceInterceptor.js.gz +0 -0
  478. package/dist/collection/components/ez-grid/controller/ag-grid/GridEditionManager.js.gz +0 -0
  479. package/dist/collection/components/ez-grid/controller/ag-grid/components/EzGridCustomCellEditor.js.gz +0 -0
  480. package/dist/collection/components/ez-grid/controller/ag-grid/components/EzGridCustomCellRender.js.gz +0 -0
  481. package/dist/collection/components/ez-grid/controller/ag-grid/components/EzGridCustomHeader.js.gz +0 -0
  482. package/dist/collection/components/ez-grid/controller/ag-grid/components/cellRendererStatus.js.gz +0 -0
  483. package/dist/collection/components/ez-grid/controller/ag-grid/components/selectionHeader.js.gz +0 -0
  484. package/dist/collection/components/ez-grid/controller/ag-grid/components/test/constants/EzGridCustomCellEditorConstants.js.gz +0 -0
  485. package/dist/collection/components/ez-grid/controller/ag-grid/components/test/constants/EzGridCustomCellRenderConstants.js.gz +0 -0
  486. package/dist/collection/components/ez-grid/controller/ag-grid/editor/EzCellEditor.js.gz +0 -0
  487. package/dist/collection/components/ez-grid/controller/ag-grid/editor/EzCellRender.js.gz +0 -0
  488. package/dist/collection/components/ez-grid/controller/ag-grid/editor/GridEditorUtils.js.gz +0 -0
  489. package/dist/collection/components/ez-grid/controller/ag-grid/editor/IEditorMetadata.js.gz +0 -0
  490. package/dist/collection/components/ez-grid/controller/ag-grid/editor/IUICellEditor.js.gz +0 -0
  491. package/dist/collection/components/ez-grid/controller/ag-grid/editor/IUICellRender.js.gz +0 -0
  492. package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/ComboBox.tpl.js.gz +0 -0
  493. package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/DateInput.tpl.js.gz +0 -0
  494. package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/NumberInput.tpl.js.gz +0 -0
  495. package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/Search.tpl.js.gz +0 -0
  496. package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/TextInput.tpl.js.gz +0 -0
  497. package/dist/collection/components/ez-grid/controller/ag-grid/i18n/pt-BR.js.gz +0 -0
  498. package/dist/collection/components/ez-grid/controller/ag-grid/mock/Server.js.gz +0 -0
  499. package/dist/collection/components/ez-grid/controller/ag-grid/test/constants/GridEditionMock.js.gz +0 -0
  500. package/dist/collection/components/ez-grid/ez-grid.css.gz +0 -0
  501. package/dist/collection/components/ez-grid/ez-grid.js.gz +0 -0
  502. package/dist/collection/components/ez-grid/interfaces/IColumnFilter.js.gz +0 -0
  503. package/dist/collection/components/ez-grid/interfaces/ICustomFormatter.js.gz +0 -0
  504. package/dist/collection/components/ez-grid/interfaces/ISelection.js.gz +0 -0
  505. package/dist/collection/components/ez-grid/interfaces/ISelectionToastConfig.js.gz +0 -0
  506. package/dist/collection/components/ez-grid/interfaces/index.js.gz +0 -0
  507. package/dist/collection/components/ez-grid/subcomponents/filter-column.css.gz +0 -0
  508. package/dist/collection/components/ez-grid/subcomponents/filter-column.js.gz +0 -0
  509. package/dist/collection/components/ez-grid/subcomponents/selection-counter.js.gz +0 -0
  510. package/dist/collection/components/ez-grid/subcomponents/utils/selectionCounterUtils.js.gz +0 -0
  511. package/dist/collection/components/ez-grid/test/resources/gridDataUnit.js.gz +0 -0
  512. package/dist/collection/components/ez-grid/utils/ColumnFilterManager.js.gz +0 -0
  513. package/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource.js.gz +0 -0
  514. package/dist/collection/components/ez-grid/utils/index.js.gz +0 -0
  515. package/dist/collection/components/ez-guide-navigator/ez-guide-navigator.css.gz +0 -0
  516. package/dist/collection/components/ez-guide-navigator/ez-guide-navigator.js.gz +0 -0
  517. package/dist/collection/components/ez-guide-navigator/interfaces/IGuideItem.js.gz +0 -0
  518. package/dist/collection/components/ez-guide-navigator/interfaces/index.js.gz +0 -0
  519. package/dist/collection/components/ez-icon/ez-icon.css.gz +0 -0
  520. package/dist/collection/components/ez-icon/ez-icon.js.gz +0 -0
  521. package/dist/collection/components/ez-list/ez-list.css.gz +0 -0
  522. package/dist/collection/components/ez-list/ez-list.js.gz +0 -0
  523. package/dist/collection/components/ez-list/ezListHelper.js.gz +0 -0
  524. package/dist/collection/components/ez-loading-bar/ez-loading-bar.css.gz +0 -0
  525. package/dist/collection/components/ez-loading-bar/ez-loading-bar.js.gz +0 -0
  526. package/dist/collection/components/ez-modal/ez-modal.css.gz +0 -0
  527. package/dist/collection/components/ez-modal/ez-modal.js.gz +0 -0
  528. package/dist/collection/components/ez-modal-container/ez-modal-container.css.gz +0 -0
  529. package/dist/collection/components/ez-modal-container/ez-modal-container.js.gz +0 -0
  530. package/dist/collection/components/ez-modal-container/index.js.gz +0 -0
  531. package/dist/collection/components/ez-modal-container/modal-action.js.gz +0 -0
  532. package/dist/collection/components/ez-modal-container/modal-button-status.js.gz +0 -0
  533. package/dist/collection/components/ez-multi-selection-list/ez-multi-selection-list.css.gz +0 -0
  534. package/dist/collection/components/ez-multi-selection-list/ez-multi-selection-list.js.gz +0 -0
  535. package/dist/collection/components/ez-multi-selection-list/interfaces/IMultiSelectionListDataSource.js.gz +0 -0
  536. package/dist/collection/components/ez-multi-selection-list/interfaces/IMultiSelectionOption.js.gz +0 -0
  537. package/dist/collection/components/ez-multi-selection-list/subcomponents/multi-selection-box-message.css.gz +0 -0
  538. package/dist/collection/components/ez-multi-selection-list/subcomponents/multi-selection-box-message.js.gz +0 -0
  539. package/dist/collection/components/ez-number-input/ez-number-input.css.gz +0 -0
  540. package/dist/collection/components/ez-number-input/ez-number-input.js.gz +0 -0
  541. package/dist/collection/components/ez-popover/ez-popover.css.gz +0 -0
  542. package/dist/collection/components/ez-popover/ez-popover.js.gz +0 -0
  543. package/dist/collection/components/ez-popover-plus/ez-popover-plus.css.gz +0 -0
  544. package/dist/collection/components/ez-popover-plus/ez-popover-plus.js.gz +0 -0
  545. package/dist/collection/components/ez-popover-plus/subcomponent/ez-popover-core.css.gz +0 -0
  546. package/dist/collection/components/ez-popover-plus/subcomponent/ez-popover-core.js.gz +0 -0
  547. package/dist/collection/components/ez-popup/ez-popup.css.gz +0 -0
  548. package/dist/collection/components/ez-popup/ez-popup.js.gz +0 -0
  549. package/dist/collection/components/ez-radio-button/ez-radio-button.css.gz +0 -0
  550. package/dist/collection/components/ez-radio-button/ez-radio-button.js.gz +0 -0
  551. package/dist/collection/components/ez-scroller/EzScrollDirection.js.gz +0 -0
  552. package/dist/collection/components/ez-scroller/ez-scroller.css.gz +0 -0
  553. package/dist/collection/components/ez-scroller/ez-scroller.js.gz +0 -0
  554. package/dist/collection/components/ez-search/ez-search.css.gz +0 -0
  555. package/dist/collection/components/ez-search/ez-search.js.gz +0 -0
  556. package/dist/collection/components/ez-search/subcomponent/search-list/search-list.css.gz +0 -0
  557. package/dist/collection/components/ez-search/subcomponent/search-list/search-list.js.gz +0 -0
  558. package/dist/collection/components/ez-search/utils/searchFormatters.js.gz +0 -0
  559. package/dist/collection/components/ez-sidebar-button/ez-sidebar-button.css.gz +0 -0
  560. package/dist/collection/components/ez-sidebar-button/ez-sidebar-button.js.gz +0 -0
  561. package/dist/collection/components/ez-sidebar-navigator/ez-sidebar-navigator.css.gz +0 -0
  562. package/dist/collection/components/ez-sidebar-navigator/ez-sidebar-navigator.js.gz +0 -0
  563. package/dist/collection/components/ez-sidebar-navigator/interfaces/ModeMenuEnum.js.gz +0 -0
  564. package/dist/collection/components/ez-sidebar-navigator/interfaces/SizeMenuEnum.js.gz +0 -0
  565. package/dist/collection/components/ez-sidebar-navigator/interfaces/TypeMenuEnum.js.gz +0 -0
  566. package/dist/collection/components/ez-sidebar-navigator/interfaces/index.js.gz +0 -0
  567. package/dist/collection/components/ez-sidebar-navigator/messages/constants.js.gz +0 -0
  568. package/dist/collection/components/ez-skeleton/ez-skeleton.constants.js.gz +0 -0
  569. package/dist/collection/components/ez-skeleton/ez-skeleton.css.gz +0 -0
  570. package/dist/collection/components/ez-skeleton/ez-skeleton.js.gz +0 -0
  571. package/dist/collection/components/ez-split-button/ez-split-button.css.gz +0 -0
  572. package/dist/collection/components/ez-split-button/ez-split-button.js.gz +0 -0
  573. package/dist/collection/components/ez-split-button/test/dropdownItems.js.gz +0 -0
  574. package/dist/collection/components/ez-split-panel/ez-split-panel.css.gz +0 -0
  575. package/dist/collection/components/ez-split-panel/ez-split-panel.js.gz +0 -0
  576. package/dist/collection/components/ez-split-panel/interfaces/IPanelSizeInfo.js.gz +0 -0
  577. package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.css.gz +0 -0
  578. package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.js.gz +0 -0
  579. package/dist/collection/components/ez-tabselector/ez-tabselector.css.gz +0 -0
  580. package/dist/collection/components/ez-tabselector/ez-tabselector.js.gz +0 -0
  581. package/dist/collection/components/ez-text-area/ez-text-area.css.gz +0 -0
  582. package/dist/collection/components/ez-text-area/ez-text-area.js.gz +0 -0
  583. package/dist/collection/components/ez-text-edit/ez-text-edit.css.gz +0 -0
  584. package/dist/collection/components/ez-text-edit/ez-text-edit.js.gz +0 -0
  585. package/dist/collection/components/ez-text-input/ez-text-input.css.gz +0 -0
  586. package/dist/collection/components/ez-text-input/ez-text-input.js.gz +0 -0
  587. package/dist/collection/components/ez-time-input/ez-time-input.css.gz +0 -0
  588. package/dist/collection/components/ez-time-input/ez-time-input.js.gz +0 -0
  589. package/dist/collection/components/ez-toast/ez-toast.css.gz +0 -0
  590. package/dist/collection/components/ez-toast/ez-toast.js.gz +0 -0
  591. package/dist/collection/components/ez-tooltip/ez-tooltip.css.gz +0 -0
  592. package/dist/collection/components/ez-tooltip/ez-tooltip.js.gz +0 -0
  593. package/dist/collection/components/ez-tree/ez-tree.css.gz +0 -0
  594. package/dist/collection/components/ez-tree/ez-tree.js.gz +0 -0
  595. package/dist/collection/components/ez-tree/interfaces/ITree.js.gz +0 -0
  596. package/dist/collection/components/ez-tree/interfaces/ITreeItem.js.gz +0 -0
  597. package/dist/collection/components/ez-tree/interfaces/ITreeItemBadge.js.gz +0 -0
  598. package/dist/collection/components/ez-tree/subcomponents/DefaultIconResolver.js.gz +0 -0
  599. package/dist/collection/components/ez-tree/subcomponents/DefaultTooltipResolver.js.gz +0 -0
  600. package/dist/collection/components/ez-tree/subcomponents/TreeItem.js.gz +0 -0
  601. package/dist/collection/components/ez-tree/subcomponents/index.js.gz +0 -0
  602. package/dist/collection/components/ez-tree/types/Node.js.gz +0 -0
  603. package/dist/collection/components/ez-tree/types/Tree.js.gz +0 -0
  604. package/dist/collection/components/ez-upload/RemoteFile.js.gz +0 -0
  605. package/dist/collection/components/ez-upload/ez-upload.css.gz +0 -0
  606. package/dist/collection/components/ez-upload/ez-upload.js.gz +0 -0
  607. package/dist/collection/components/ez-view-stack/ez-view-stack.css.gz +0 -0
  608. package/dist/collection/components/ez-view-stack/ez-view-stack.js.gz +0 -0
  609. package/dist/collection/index.js.gz +0 -0
  610. package/dist/collection/servidor.js.gz +0 -0
  611. package/dist/collection/setupTests.js.gz +0 -0
  612. package/dist/collection/sw.js.gz +0 -0
  613. package/dist/collection/utils/ApplicationUtils.js.gz +0 -0
  614. package/dist/collection/utils/AssetsUtils.js.gz +0 -0
  615. package/dist/collection/utils/CSSVarsUtils.js.gz +0 -0
  616. package/dist/collection/utils/FocusResolver.js.gz +0 -0
  617. package/dist/collection/utils/ResponsiveInputUtils.js +0 -26
  618. package/dist/collection/utils/ResponsiveInputUtils.js.gz +0 -0
  619. package/dist/collection/utils/constants.js.gz +0 -0
  620. package/dist/collection/utils/customEditor/interfaces/ICustomEditor.js.gz +0 -0
  621. package/dist/collection/utils/customEditor/interfaces/ICustomEditorInfo.js.gz +0 -0
  622. package/dist/collection/utils/customRender/interfaces/ICustomRender.js.gz +0 -0
  623. package/dist/collection/utils/customRender/interfaces/ICustomRenderInfo.js.gz +0 -0
  624. package/dist/collection/utils/form/DataBinder.js.gz +0 -0
  625. package/dist/collection/utils/form/FormMetadata.js.gz +0 -0
  626. package/dist/collection/utils/form/index.js.gz +0 -0
  627. package/dist/collection/utils/form/interfaces/IDefaultConfig.js.gz +0 -0
  628. package/dist/collection/utils/form/interfaces/IFormCardConfig.js.gz +0 -0
  629. package/dist/collection/utils/form/interfaces/IFormConfig.js.gz +0 -0
  630. package/dist/collection/utils/form/interfaces/IFormSheetMetadata.js.gz +0 -0
  631. package/dist/collection/utils/form/interfaces/ISummaryField.js.gz +0 -0
  632. package/dist/collection/utils/form/interfaces/ITabConfig.js.gz +0 -0
  633. package/dist/collection/utils/form/interfaces/index.js.gz +0 -0
  634. package/dist/collection/utils/form/test/DataBinder.test.js.gz +0 -0
  635. package/dist/collection/utils/form/test/resources/metadataTest.js.gz +0 -0
  636. package/dist/collection/utils/index.js.gz +0 -0
  637. package/dist/collection/utils/interfaces/AbstractFieldMetadata.js.gz +0 -0
  638. package/dist/collection/utils/interfaces/IAction.js.gz +0 -0
  639. package/dist/collection/utils/interfaces/IFieldConfig.js.gz +0 -0
  640. package/dist/collection/utils/mock/ez-upload-mock.js.gz +0 -0
  641. package/dist/collection/utils/utils.js.gz +0 -0
  642. package/dist/collection/utils/validators/recordvalidator/IInvalidCells.js.gz +0 -0
  643. package/dist/collection/utils/validators/recordvalidator/IInvalidField.js.gz +0 -0
  644. package/dist/collection/utils/validators/recordvalidator/IRecordValidator.js.gz +0 -0
  645. package/dist/collection/utils/validators/recordvalidator/IValidationResult.js.gz +0 -0
  646. package/dist/collection/utils/validators/recordvalidator/IValidationSource.js.gz +0 -0
  647. package/dist/collection/utils/validators/recordvalidator/RecordValidationProcessor.js.gz +0 -0
  648. package/dist/custom-elements/index.js.gz +0 -0
  649. package/dist/esm/ApplicationUtils-eaf91331.js.gz +0 -0
  650. package/dist/esm/CSSVarsUtils-acba92d7.js.gz +0 -0
  651. package/dist/esm/CheckMode-bdb2ec19.js.gz +0 -0
  652. package/dist/esm/DataBinder-9c877244.js.gz +0 -0
  653. package/dist/esm/DialogType-54a62731.js.gz +0 -0
  654. package/dist/esm/EzScrollDirection-2df26c93.js.gz +0 -0
  655. package/dist/esm/FocusResolver-1ccbf850.js.gz +0 -0
  656. package/dist/esm/ICustomRender-875b5a40.js +0 -13
  657. package/dist/esm/ICustomRender-875b5a40.js.gz +0 -0
  658. package/dist/esm/constants-4e0d35b7.js +0 -5
  659. package/dist/esm/constants-4e0d35b7.js.gz +0 -0
  660. package/dist/esm/ez-actions-button.entry.js.gz +0 -0
  661. package/dist/esm/ez-alert-list.entry.js.gz +0 -0
  662. package/dist/esm/ez-alert.entry.js.gz +0 -0
  663. package/dist/esm/ez-application.entry.js.gz +0 -0
  664. package/dist/esm/ez-badge.entry.js.gz +0 -0
  665. package/dist/esm/ez-breadcrumb.entry.js.gz +0 -0
  666. package/dist/esm/ez-button.entry.js.gz +0 -0
  667. package/dist/esm/ez-calendar.entry.js.gz +0 -0
  668. package/dist/esm/ez-card-item_2.entry.js.gz +0 -0
  669. package/dist/esm/ez-chart.entry.js.gz +0 -0
  670. package/dist/esm/ez-check.entry.js.gz +0 -0
  671. package/dist/esm/ez-chip.entry.js.gz +0 -0
  672. package/dist/esm/ez-collapsible-box.entry.js.gz +0 -0
  673. package/dist/esm/ez-combo-box-list_3.entry.js.gz +0 -0
  674. package/dist/esm/ez-combo-box.entry.js.gz +0 -0
  675. package/dist/esm/ez-date-input.entry.js.gz +0 -0
  676. package/dist/esm/ez-date-time-input.entry.js.gz +0 -0
  677. package/dist/esm/ez-dialog.entry.js.gz +0 -0
  678. package/dist/esm/ez-double-list.entry.js.gz +0 -0
  679. package/dist/esm/ez-dropdown_2.entry.js.gz +0 -0
  680. package/dist/esm/ez-file-item.entry.js.gz +0 -0
  681. package/dist/esm/ez-filter-input.entry.js +0 -125
  682. package/dist/esm/ez-filter-input.entry.js.gz +0 -0
  683. package/dist/esm/ez-form-view.entry.js.gz +0 -0
  684. package/dist/esm/ez-form.entry.js.gz +0 -0
  685. package/dist/esm/ez-grid.entry.js.gz +0 -0
  686. package/dist/esm/ez-guide-navigator.entry.js.gz +0 -0
  687. package/dist/esm/ez-icon.entry.js.gz +0 -0
  688. package/dist/esm/ez-list.entry.js.gz +0 -0
  689. package/dist/esm/ez-loading-bar.entry.js.gz +0 -0
  690. package/dist/esm/ez-modal-container.entry.js.gz +0 -0
  691. package/dist/esm/ez-modal.entry.js.gz +0 -0
  692. package/dist/esm/ez-multi-selection-list.entry.js.gz +0 -0
  693. package/dist/esm/ez-number-input.entry.js.gz +0 -0
  694. package/dist/esm/ez-popover-plus_3.entry.js.gz +0 -0
  695. package/dist/esm/ez-popover.entry.js.gz +0 -0
  696. package/dist/esm/ez-popup.entry.js.gz +0 -0
  697. package/dist/esm/ez-radio-button.entry.js.gz +0 -0
  698. package/dist/esm/ez-scroller_2.entry.js.gz +0 -0
  699. package/dist/esm/ez-search.entry.js.gz +0 -0
  700. package/dist/esm/ez-sidebar-navigator.entry.js.gz +0 -0
  701. package/dist/esm/ez-split-button.entry.js.gz +0 -0
  702. package/dist/esm/ez-split-item.entry.js.gz +0 -0
  703. package/dist/esm/ez-split-panel.entry.js.gz +0 -0
  704. package/dist/esm/ez-tabselector.entry.js.gz +0 -0
  705. package/dist/esm/ez-text-area.entry.js.gz +0 -0
  706. package/dist/esm/ez-text-input.entry.js.gz +0 -0
  707. package/dist/esm/ez-time-input.entry.js.gz +0 -0
  708. package/dist/esm/ez-toast.entry.js.gz +0 -0
  709. package/dist/esm/ez-tooltip.entry.js +0 -51
  710. package/dist/esm/ez-tooltip.entry.js.gz +0 -0
  711. package/dist/esm/ez-tree.entry.js.gz +0 -0
  712. package/dist/esm/ez-upload.entry.js.gz +0 -0
  713. package/dist/esm/ez-view-stack.entry.js.gz +0 -0
  714. package/dist/esm/ezListHelper-00fb9b8d.js.gz +0 -0
  715. package/dist/esm/ezui.js.gz +0 -0
  716. package/dist/esm/filter-column.entry.js.gz +0 -0
  717. package/dist/esm/index-5a720e56.js.gz +0 -0
  718. package/dist/esm/index.js.gz +0 -0
  719. package/dist/esm/loader.js.gz +0 -0
  720. package/dist/esm/polyfills/core-js.js.gz +0 -0
  721. package/dist/esm/polyfills/css-shim.js.gz +0 -0
  722. package/dist/esm/polyfills/dom.js.gz +0 -0
  723. package/dist/esm/polyfills/es5-html-element.js.gz +0 -0
  724. package/dist/esm/polyfills/index.js.gz +0 -0
  725. package/dist/esm/polyfills/system.js.gz +0 -0
  726. package/dist/esm/searchFormatters-8229207e.js.gz +0 -0
  727. package/dist/ezui/ezui.esm.js.gz +0 -0
  728. package/dist/ezui/index.esm.js.gz +0 -0
  729. package/dist/ezui/p-000159dc.entry.js.gz +0 -0
  730. package/dist/ezui/p-0378416a.entry.js.gz +0 -0
  731. package/dist/ezui/p-05e1f4e7.js +0 -1
  732. package/dist/ezui/p-05e1f4e7.js.gz +0 -0
  733. package/dist/ezui/p-06f1b8e4.entry.js.gz +0 -0
  734. package/dist/ezui/p-0cfbbe82.entry.js +0 -1
  735. package/dist/ezui/p-0cfbbe82.entry.js.gz +0 -0
  736. package/dist/ezui/p-11bfeca3.entry.js.gz +0 -0
  737. package/dist/ezui/p-1bb62d6b.entry.js +0 -1
  738. package/dist/ezui/p-1bb62d6b.entry.js.gz +0 -0
  739. package/dist/ezui/p-2069c78a.entry.js +0 -1
  740. package/dist/ezui/p-2069c78a.entry.js.gz +0 -0
  741. package/dist/ezui/p-2187f86c.js.gz +0 -0
  742. package/dist/ezui/p-23dab72f.entry.js +0 -1
  743. package/dist/ezui/p-23dab72f.entry.js.gz +0 -0
  744. package/dist/ezui/p-24b42f3d.entry.js +0 -1
  745. package/dist/ezui/p-24b42f3d.entry.js.gz +0 -0
  746. package/dist/ezui/p-2f351332.entry.js.gz +0 -0
  747. package/dist/ezui/p-30571aaf.entry.js.gz +0 -0
  748. package/dist/ezui/p-40a60148.js.gz +0 -0
  749. package/dist/ezui/p-41652617.entry.js +0 -1
  750. package/dist/ezui/p-41652617.entry.js.gz +0 -0
  751. package/dist/ezui/p-44b39e81.entry.js.gz +0 -0
  752. package/dist/ezui/p-4607fb89.js +0 -1
  753. package/dist/ezui/p-4607fb89.js.gz +0 -0
  754. package/dist/ezui/p-4818b8ce.entry.js +0 -1
  755. package/dist/ezui/p-4818b8ce.entry.js.gz +0 -0
  756. package/dist/ezui/p-61b4834d.entry.js +0 -309
  757. package/dist/ezui/p-61b4834d.entry.js.gz +0 -0
  758. package/dist/ezui/p-68b2e579.entry.js +0 -1
  759. package/dist/ezui/p-68b2e579.entry.js.gz +0 -0
  760. package/dist/ezui/p-6b51c9cc.entry.js.gz +0 -0
  761. package/dist/ezui/p-6d8b3298.entry.js +0 -1
  762. package/dist/ezui/p-6d8b3298.entry.js.gz +0 -0
  763. package/dist/ezui/p-6ec40dec.entry.js +0 -1
  764. package/dist/ezui/p-6ec40dec.entry.js.gz +0 -0
  765. package/dist/ezui/p-6fc26622.entry.js.gz +0 -0
  766. package/dist/ezui/p-708b196e.entry.js.gz +0 -0
  767. package/dist/ezui/p-7567ccdd.entry.js.gz +0 -0
  768. package/dist/ezui/p-769632d5.entry.js.gz +0 -0
  769. package/dist/ezui/p-7c1b3cef.entry.js +0 -1
  770. package/dist/ezui/p-7c1b3cef.entry.js.gz +0 -0
  771. package/dist/ezui/p-80dfc50b.js.gz +0 -0
  772. package/dist/ezui/p-81461d2f.entry.js.gz +0 -0
  773. package/dist/ezui/p-82fa4b09.entry.js.gz +0 -0
  774. package/dist/ezui/p-866abc8e.entry.js.gz +0 -0
  775. package/dist/ezui/p-87f5a060.entry.js.gz +0 -0
  776. package/dist/ezui/p-88c615f0.entry.js +0 -1
  777. package/dist/ezui/p-88c615f0.entry.js.gz +0 -0
  778. package/dist/ezui/p-8ea07b8c.entry.js +0 -1
  779. package/dist/ezui/p-8ea07b8c.entry.js.gz +0 -0
  780. package/dist/ezui/p-9066b0b0.entry.js +0 -1
  781. package/dist/ezui/p-9066b0b0.entry.js.gz +0 -0
  782. package/dist/ezui/p-91ccae0c.entry.js.gz +0 -0
  783. package/dist/ezui/p-92748142.entry.js.gz +0 -0
  784. package/dist/ezui/p-98bb8b16.js.gz +0 -0
  785. package/dist/ezui/p-9c5a6ec4.entry.js +0 -1
  786. package/dist/ezui/p-9c5a6ec4.entry.js.gz +0 -0
  787. package/dist/ezui/p-9e95bfeb.entry.js.gz +0 -0
  788. package/dist/ezui/p-a0b034cf.entry.js +0 -1
  789. package/dist/ezui/p-a0b034cf.entry.js.gz +0 -0
  790. package/dist/ezui/p-a79f3789.entry.js +0 -1
  791. package/dist/ezui/p-a79f3789.entry.js.gz +0 -0
  792. package/dist/ezui/p-ab574d59.js.gz +0 -0
  793. package/dist/ezui/p-acddfb2e.js +0 -1
  794. package/dist/ezui/p-acddfb2e.js.gz +0 -0
  795. package/dist/ezui/p-b3b5647e.entry.js +0 -1
  796. package/dist/ezui/p-b3b5647e.entry.js.gz +0 -0
  797. package/dist/ezui/p-b853763b.js.gz +0 -0
  798. package/dist/ezui/p-b9282c79.entry.js +0 -1
  799. package/dist/ezui/p-b9282c79.entry.js.gz +0 -0
  800. package/dist/ezui/p-c2b20f78.entry.js.gz +0 -0
  801. package/dist/ezui/p-c7035d65.entry.js.gz +0 -0
  802. package/dist/ezui/p-c96fbbef.entry.js +0 -1
  803. package/dist/ezui/p-c96fbbef.entry.js.gz +0 -0
  804. package/dist/ezui/p-ca8936df.entry.js +0 -1
  805. package/dist/ezui/p-ca8936df.entry.js.gz +0 -0
  806. package/dist/ezui/p-cc4ffa6b.entry.js +0 -1
  807. package/dist/ezui/p-cc4ffa6b.entry.js.gz +0 -0
  808. package/dist/ezui/p-ce7ce731.entry.js +0 -1
  809. package/dist/ezui/p-ce7ce731.entry.js.gz +0 -0
  810. package/dist/ezui/p-cedeedf1.entry.js.gz +0 -0
  811. package/dist/ezui/p-cf33bc48.entry.js +0 -1
  812. package/dist/ezui/p-cf33bc48.entry.js.gz +0 -0
  813. package/dist/ezui/p-dc628ed3.js.gz +0 -0
  814. package/dist/ezui/p-dfca5946.entry.js.gz +0 -0
  815. package/dist/ezui/p-e18d9e6a.entry.js +0 -1
  816. package/dist/ezui/p-e18d9e6a.entry.js.gz +0 -0
  817. package/dist/ezui/p-e3f8660b.entry.js +0 -1
  818. package/dist/ezui/p-e3f8660b.entry.js.gz +0 -0
  819. package/dist/ezui/p-e4c7eb39.js.gz +0 -0
  820. package/dist/ezui/p-e6b38ade.entry.js.gz +0 -0
  821. package/dist/ezui/p-ec7db713.js.gz +0 -0
  822. package/dist/ezui/p-f4da7e1e.entry.js +0 -1
  823. package/dist/ezui/p-f4da7e1e.entry.js.gz +0 -0
  824. package/dist/ezui/p-fc194825.entry.js.gz +0 -0
  825. package/dist/index.cjs.js.gz +0 -0
  826. package/dist/index.js.gz +0 -0
  827. package/dist/types/utils/ResponsiveInputUtils.d.ts +0 -6
@@ -0,0 +1,3506 @@
1
+ import { r as registerInstance, c as createEvent, h, g as getElement } from './index-baa5e267.js';
2
+ import { ArrayUtils } from '@sankhyalabs/core';
3
+
4
+ /**!
5
+ * Sortable 1.15.6
6
+ * @author RubaXa <trash@rubaxa.org>
7
+ * @author owenm <owen23355@gmail.com>
8
+ * @license MIT
9
+ */
10
+ function ownKeys(object, enumerableOnly) {
11
+ var keys = Object.keys(object);
12
+ if (Object.getOwnPropertySymbols) {
13
+ var symbols = Object.getOwnPropertySymbols(object);
14
+ if (enumerableOnly) {
15
+ symbols = symbols.filter(function (sym) {
16
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
17
+ });
18
+ }
19
+ keys.push.apply(keys, symbols);
20
+ }
21
+ return keys;
22
+ }
23
+ function _objectSpread2(target) {
24
+ for (var i = 1; i < arguments.length; i++) {
25
+ var source = arguments[i] != null ? arguments[i] : {};
26
+ if (i % 2) {
27
+ ownKeys(Object(source), true).forEach(function (key) {
28
+ _defineProperty(target, key, source[key]);
29
+ });
30
+ } else if (Object.getOwnPropertyDescriptors) {
31
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
32
+ } else {
33
+ ownKeys(Object(source)).forEach(function (key) {
34
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
35
+ });
36
+ }
37
+ }
38
+ return target;
39
+ }
40
+ function _typeof(obj) {
41
+ "@babel/helpers - typeof";
42
+
43
+ if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
44
+ _typeof = function (obj) {
45
+ return typeof obj;
46
+ };
47
+ } else {
48
+ _typeof = function (obj) {
49
+ return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
50
+ };
51
+ }
52
+ return _typeof(obj);
53
+ }
54
+ function _defineProperty(obj, key, value) {
55
+ if (key in obj) {
56
+ Object.defineProperty(obj, key, {
57
+ value: value,
58
+ enumerable: true,
59
+ configurable: true,
60
+ writable: true
61
+ });
62
+ } else {
63
+ obj[key] = value;
64
+ }
65
+ return obj;
66
+ }
67
+ function _extends() {
68
+ _extends = Object.assign || function (target) {
69
+ for (var i = 1; i < arguments.length; i++) {
70
+ var source = arguments[i];
71
+ for (var key in source) {
72
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
73
+ target[key] = source[key];
74
+ }
75
+ }
76
+ }
77
+ return target;
78
+ };
79
+ return _extends.apply(this, arguments);
80
+ }
81
+ function _objectWithoutPropertiesLoose(source, excluded) {
82
+ if (source == null) return {};
83
+ var target = {};
84
+ var sourceKeys = Object.keys(source);
85
+ var key, i;
86
+ for (i = 0; i < sourceKeys.length; i++) {
87
+ key = sourceKeys[i];
88
+ if (excluded.indexOf(key) >= 0) continue;
89
+ target[key] = source[key];
90
+ }
91
+ return target;
92
+ }
93
+ function _objectWithoutProperties(source, excluded) {
94
+ if (source == null) return {};
95
+ var target = _objectWithoutPropertiesLoose(source, excluded);
96
+ var key, i;
97
+ if (Object.getOwnPropertySymbols) {
98
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
99
+ for (i = 0; i < sourceSymbolKeys.length; i++) {
100
+ key = sourceSymbolKeys[i];
101
+ if (excluded.indexOf(key) >= 0) continue;
102
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
103
+ target[key] = source[key];
104
+ }
105
+ }
106
+ return target;
107
+ }
108
+ function _toConsumableArray(arr) {
109
+ return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
110
+ }
111
+ function _arrayWithoutHoles(arr) {
112
+ if (Array.isArray(arr)) return _arrayLikeToArray(arr);
113
+ }
114
+ function _iterableToArray(iter) {
115
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
116
+ }
117
+ function _unsupportedIterableToArray(o, minLen) {
118
+ if (!o) return;
119
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
120
+ var n = Object.prototype.toString.call(o).slice(8, -1);
121
+ if (n === "Object" && o.constructor) n = o.constructor.name;
122
+ if (n === "Map" || n === "Set") return Array.from(o);
123
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
124
+ }
125
+ function _arrayLikeToArray(arr, len) {
126
+ if (len == null || len > arr.length) len = arr.length;
127
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
128
+ return arr2;
129
+ }
130
+ function _nonIterableSpread() {
131
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
132
+ }
133
+
134
+ var version = "1.15.6";
135
+
136
+ function userAgent(pattern) {
137
+ if (typeof window !== 'undefined' && window.navigator) {
138
+ return !! /*@__PURE__*/navigator.userAgent.match(pattern);
139
+ }
140
+ }
141
+ var IE11OrLess = userAgent(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i);
142
+ var Edge = userAgent(/Edge/i);
143
+ var FireFox = userAgent(/firefox/i);
144
+ var Safari = userAgent(/safari/i) && !userAgent(/chrome/i) && !userAgent(/android/i);
145
+ var IOS = userAgent(/iP(ad|od|hone)/i);
146
+ var ChromeForAndroid = userAgent(/chrome/i) && userAgent(/android/i);
147
+
148
+ var captureMode = {
149
+ capture: false,
150
+ passive: false
151
+ };
152
+ function on(el, event, fn) {
153
+ el.addEventListener(event, fn, !IE11OrLess && captureMode);
154
+ }
155
+ function off(el, event, fn) {
156
+ el.removeEventListener(event, fn, !IE11OrLess && captureMode);
157
+ }
158
+ function matches( /**HTMLElement*/el, /**String*/selector) {
159
+ if (!selector) return;
160
+ selector[0] === '>' && (selector = selector.substring(1));
161
+ if (el) {
162
+ try {
163
+ if (el.matches) {
164
+ return el.matches(selector);
165
+ } else if (el.msMatchesSelector) {
166
+ return el.msMatchesSelector(selector);
167
+ } else if (el.webkitMatchesSelector) {
168
+ return el.webkitMatchesSelector(selector);
169
+ }
170
+ } catch (_) {
171
+ return false;
172
+ }
173
+ }
174
+ return false;
175
+ }
176
+ function getParentOrHost(el) {
177
+ return el.host && el !== document && el.host.nodeType ? el.host : el.parentNode;
178
+ }
179
+ function closest( /**HTMLElement*/el, /**String*/selector, /**HTMLElement*/ctx, includeCTX) {
180
+ if (el) {
181
+ ctx = ctx || document;
182
+ do {
183
+ if (selector != null && (selector[0] === '>' ? el.parentNode === ctx && matches(el, selector) : matches(el, selector)) || includeCTX && el === ctx) {
184
+ return el;
185
+ }
186
+ if (el === ctx) break;
187
+ /* jshint boss:true */
188
+ } while (el = getParentOrHost(el));
189
+ }
190
+ return null;
191
+ }
192
+ var R_SPACE = /\s+/g;
193
+ function toggleClass(el, name, state) {
194
+ if (el && name) {
195
+ if (el.classList) {
196
+ el.classList[state ? 'add' : 'remove'](name);
197
+ } else {
198
+ var className = (' ' + el.className + ' ').replace(R_SPACE, ' ').replace(' ' + name + ' ', ' ');
199
+ el.className = (className + (state ? ' ' + name : '')).replace(R_SPACE, ' ');
200
+ }
201
+ }
202
+ }
203
+ function css(el, prop, val) {
204
+ var style = el && el.style;
205
+ if (style) {
206
+ if (val === void 0) {
207
+ if (document.defaultView && document.defaultView.getComputedStyle) {
208
+ val = document.defaultView.getComputedStyle(el, '');
209
+ } else if (el.currentStyle) {
210
+ val = el.currentStyle;
211
+ }
212
+ return prop === void 0 ? val : val[prop];
213
+ } else {
214
+ if (!(prop in style) && prop.indexOf('webkit') === -1) {
215
+ prop = '-webkit-' + prop;
216
+ }
217
+ style[prop] = val + (typeof val === 'string' ? '' : 'px');
218
+ }
219
+ }
220
+ }
221
+ function matrix(el, selfOnly) {
222
+ var appliedTransforms = '';
223
+ if (typeof el === 'string') {
224
+ appliedTransforms = el;
225
+ } else {
226
+ do {
227
+ var transform = css(el, 'transform');
228
+ if (transform && transform !== 'none') {
229
+ appliedTransforms = transform + ' ' + appliedTransforms;
230
+ }
231
+ /* jshint boss:true */
232
+ } while (!selfOnly && (el = el.parentNode));
233
+ }
234
+ var matrixFn = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
235
+ /*jshint -W056 */
236
+ return matrixFn && new matrixFn(appliedTransforms);
237
+ }
238
+ function find(ctx, tagName, iterator) {
239
+ if (ctx) {
240
+ var list = ctx.getElementsByTagName(tagName),
241
+ i = 0,
242
+ n = list.length;
243
+ if (iterator) {
244
+ for (; i < n; i++) {
245
+ iterator(list[i], i);
246
+ }
247
+ }
248
+ return list;
249
+ }
250
+ return [];
251
+ }
252
+ function getWindowScrollingElement() {
253
+ var scrollingElement = document.scrollingElement;
254
+ if (scrollingElement) {
255
+ return scrollingElement;
256
+ } else {
257
+ return document.documentElement;
258
+ }
259
+ }
260
+
261
+ /**
262
+ * Returns the "bounding client rect" of given element
263
+ * @param {HTMLElement} el The element whose boundingClientRect is wanted
264
+ * @param {[Boolean]} relativeToContainingBlock Whether the rect should be relative to the containing block of (including) the container
265
+ * @param {[Boolean]} relativeToNonStaticParent Whether the rect should be relative to the relative parent of (including) the contaienr
266
+ * @param {[Boolean]} undoScale Whether the container's scale() should be undone
267
+ * @param {[HTMLElement]} container The parent the element will be placed in
268
+ * @return {Object} The boundingClientRect of el, with specified adjustments
269
+ */
270
+ function getRect(el, relativeToContainingBlock, relativeToNonStaticParent, undoScale, container) {
271
+ if (!el.getBoundingClientRect && el !== window) return;
272
+ var elRect, top, left, bottom, right, height, width;
273
+ if (el !== window && el.parentNode && el !== getWindowScrollingElement()) {
274
+ elRect = el.getBoundingClientRect();
275
+ top = elRect.top;
276
+ left = elRect.left;
277
+ bottom = elRect.bottom;
278
+ right = elRect.right;
279
+ height = elRect.height;
280
+ width = elRect.width;
281
+ } else {
282
+ top = 0;
283
+ left = 0;
284
+ bottom = window.innerHeight;
285
+ right = window.innerWidth;
286
+ height = window.innerHeight;
287
+ width = window.innerWidth;
288
+ }
289
+ if ((relativeToContainingBlock || relativeToNonStaticParent) && el !== window) {
290
+ // Adjust for translate()
291
+ container = container || el.parentNode;
292
+
293
+ // solves #1123 (see: https://stackoverflow.com/a/37953806/6088312)
294
+ // Not needed on <= IE11
295
+ if (!IE11OrLess) {
296
+ do {
297
+ if (container && container.getBoundingClientRect && (css(container, 'transform') !== 'none' || relativeToNonStaticParent && css(container, 'position') !== 'static')) {
298
+ var containerRect = container.getBoundingClientRect();
299
+
300
+ // Set relative to edges of padding box of container
301
+ top -= containerRect.top + parseInt(css(container, 'border-top-width'));
302
+ left -= containerRect.left + parseInt(css(container, 'border-left-width'));
303
+ bottom = top + elRect.height;
304
+ right = left + elRect.width;
305
+ break;
306
+ }
307
+ /* jshint boss:true */
308
+ } while (container = container.parentNode);
309
+ }
310
+ }
311
+ if (undoScale && el !== window) {
312
+ // Adjust for scale()
313
+ var elMatrix = matrix(container || el),
314
+ scaleX = elMatrix && elMatrix.a,
315
+ scaleY = elMatrix && elMatrix.d;
316
+ if (elMatrix) {
317
+ top /= scaleY;
318
+ left /= scaleX;
319
+ width /= scaleX;
320
+ height /= scaleY;
321
+ bottom = top + height;
322
+ right = left + width;
323
+ }
324
+ }
325
+ return {
326
+ top: top,
327
+ left: left,
328
+ bottom: bottom,
329
+ right: right,
330
+ width: width,
331
+ height: height
332
+ };
333
+ }
334
+
335
+ /**
336
+ * Checks if a side of an element is scrolled past a side of its parents
337
+ * @param {HTMLElement} el The element who's side being scrolled out of view is in question
338
+ * @param {String} elSide Side of the element in question ('top', 'left', 'right', 'bottom')
339
+ * @param {String} parentSide Side of the parent in question ('top', 'left', 'right', 'bottom')
340
+ * @return {HTMLElement} The parent scroll element that the el's side is scrolled past, or null if there is no such element
341
+ */
342
+ function isScrolledPast(el, elSide, parentSide) {
343
+ var parent = getParentAutoScrollElement(el, true),
344
+ elSideVal = getRect(el)[elSide];
345
+
346
+ /* jshint boss:true */
347
+ while (parent) {
348
+ var parentSideVal = getRect(parent)[parentSide],
349
+ visible = void 0;
350
+ if (parentSide === 'top' || parentSide === 'left') {
351
+ visible = elSideVal >= parentSideVal;
352
+ } else {
353
+ visible = elSideVal <= parentSideVal;
354
+ }
355
+ if (!visible) return parent;
356
+ if (parent === getWindowScrollingElement()) break;
357
+ parent = getParentAutoScrollElement(parent, false);
358
+ }
359
+ return false;
360
+ }
361
+
362
+ /**
363
+ * Gets nth child of el, ignoring hidden children, sortable's elements (does not ignore clone if it's visible)
364
+ * and non-draggable elements
365
+ * @param {HTMLElement} el The parent element
366
+ * @param {Number} childNum The index of the child
367
+ * @param {Object} options Parent Sortable's options
368
+ * @return {HTMLElement} The child at index childNum, or null if not found
369
+ */
370
+ function getChild(el, childNum, options, includeDragEl) {
371
+ var currentChild = 0,
372
+ i = 0,
373
+ children = el.children;
374
+ while (i < children.length) {
375
+ if (children[i].style.display !== 'none' && children[i] !== Sortable.ghost && (includeDragEl || children[i] !== Sortable.dragged) && closest(children[i], options.draggable, el, false)) {
376
+ if (currentChild === childNum) {
377
+ return children[i];
378
+ }
379
+ currentChild++;
380
+ }
381
+ i++;
382
+ }
383
+ return null;
384
+ }
385
+
386
+ /**
387
+ * Gets the last child in the el, ignoring ghostEl or invisible elements (clones)
388
+ * @param {HTMLElement} el Parent element
389
+ * @param {selector} selector Any other elements that should be ignored
390
+ * @return {HTMLElement} The last child, ignoring ghostEl
391
+ */
392
+ function lastChild(el, selector) {
393
+ var last = el.lastElementChild;
394
+ while (last && (last === Sortable.ghost || css(last, 'display') === 'none' || selector && !matches(last, selector))) {
395
+ last = last.previousElementSibling;
396
+ }
397
+ return last || null;
398
+ }
399
+
400
+ /**
401
+ * Returns the index of an element within its parent for a selected set of
402
+ * elements
403
+ * @param {HTMLElement} el
404
+ * @param {selector} selector
405
+ * @return {number}
406
+ */
407
+ function index(el, selector) {
408
+ var index = 0;
409
+ if (!el || !el.parentNode) {
410
+ return -1;
411
+ }
412
+
413
+ /* jshint boss:true */
414
+ while (el = el.previousElementSibling) {
415
+ if (el.nodeName.toUpperCase() !== 'TEMPLATE' && el !== Sortable.clone && (!selector || matches(el, selector))) {
416
+ index++;
417
+ }
418
+ }
419
+ return index;
420
+ }
421
+
422
+ /**
423
+ * Returns the scroll offset of the given element, added with all the scroll offsets of parent elements.
424
+ * The value is returned in real pixels.
425
+ * @param {HTMLElement} el
426
+ * @return {Array} Offsets in the format of [left, top]
427
+ */
428
+ function getRelativeScrollOffset(el) {
429
+ var offsetLeft = 0,
430
+ offsetTop = 0,
431
+ winScroller = getWindowScrollingElement();
432
+ if (el) {
433
+ do {
434
+ var elMatrix = matrix(el),
435
+ scaleX = elMatrix.a,
436
+ scaleY = elMatrix.d;
437
+ offsetLeft += el.scrollLeft * scaleX;
438
+ offsetTop += el.scrollTop * scaleY;
439
+ } while (el !== winScroller && (el = el.parentNode));
440
+ }
441
+ return [offsetLeft, offsetTop];
442
+ }
443
+
444
+ /**
445
+ * Returns the index of the object within the given array
446
+ * @param {Array} arr Array that may or may not hold the object
447
+ * @param {Object} obj An object that has a key-value pair unique to and identical to a key-value pair in the object you want to find
448
+ * @return {Number} The index of the object in the array, or -1
449
+ */
450
+ function indexOfObject(arr, obj) {
451
+ for (var i in arr) {
452
+ if (!arr.hasOwnProperty(i)) continue;
453
+ for (var key in obj) {
454
+ if (obj.hasOwnProperty(key) && obj[key] === arr[i][key]) return Number(i);
455
+ }
456
+ }
457
+ return -1;
458
+ }
459
+ function getParentAutoScrollElement(el, includeSelf) {
460
+ // skip to window
461
+ if (!el || !el.getBoundingClientRect) return getWindowScrollingElement();
462
+ var elem = el;
463
+ var gotSelf = false;
464
+ do {
465
+ // we don't need to get elem css if it isn't even overflowing in the first place (performance)
466
+ if (elem.clientWidth < elem.scrollWidth || elem.clientHeight < elem.scrollHeight) {
467
+ var elemCSS = css(elem);
468
+ if (elem.clientWidth < elem.scrollWidth && (elemCSS.overflowX == 'auto' || elemCSS.overflowX == 'scroll') || elem.clientHeight < elem.scrollHeight && (elemCSS.overflowY == 'auto' || elemCSS.overflowY == 'scroll')) {
469
+ if (!elem.getBoundingClientRect || elem === document.body) return getWindowScrollingElement();
470
+ if (gotSelf || includeSelf) return elem;
471
+ gotSelf = true;
472
+ }
473
+ }
474
+ /* jshint boss:true */
475
+ } while (elem = elem.parentNode);
476
+ return getWindowScrollingElement();
477
+ }
478
+ function extend(dst, src) {
479
+ if (dst && src) {
480
+ for (var key in src) {
481
+ if (src.hasOwnProperty(key)) {
482
+ dst[key] = src[key];
483
+ }
484
+ }
485
+ }
486
+ return dst;
487
+ }
488
+ function isRectEqual(rect1, rect2) {
489
+ return Math.round(rect1.top) === Math.round(rect2.top) && Math.round(rect1.left) === Math.round(rect2.left) && Math.round(rect1.height) === Math.round(rect2.height) && Math.round(rect1.width) === Math.round(rect2.width);
490
+ }
491
+ var _throttleTimeout;
492
+ function throttle(callback, ms) {
493
+ return function () {
494
+ if (!_throttleTimeout) {
495
+ var args = arguments,
496
+ _this = this;
497
+ if (args.length === 1) {
498
+ callback.call(_this, args[0]);
499
+ } else {
500
+ callback.apply(_this, args);
501
+ }
502
+ _throttleTimeout = setTimeout(function () {
503
+ _throttleTimeout = void 0;
504
+ }, ms);
505
+ }
506
+ };
507
+ }
508
+ function cancelThrottle() {
509
+ clearTimeout(_throttleTimeout);
510
+ _throttleTimeout = void 0;
511
+ }
512
+ function scrollBy(el, x, y) {
513
+ el.scrollLeft += x;
514
+ el.scrollTop += y;
515
+ }
516
+ function clone(el) {
517
+ var Polymer = window.Polymer;
518
+ var $ = window.jQuery || window.Zepto;
519
+ if (Polymer && Polymer.dom) {
520
+ return Polymer.dom(el).cloneNode(true);
521
+ } else if ($) {
522
+ return $(el).clone(true)[0];
523
+ } else {
524
+ return el.cloneNode(true);
525
+ }
526
+ }
527
+ function setRect(el, rect) {
528
+ css(el, 'position', 'absolute');
529
+ css(el, 'top', rect.top);
530
+ css(el, 'left', rect.left);
531
+ css(el, 'width', rect.width);
532
+ css(el, 'height', rect.height);
533
+ }
534
+ function unsetRect(el) {
535
+ css(el, 'position', '');
536
+ css(el, 'top', '');
537
+ css(el, 'left', '');
538
+ css(el, 'width', '');
539
+ css(el, 'height', '');
540
+ }
541
+ function getChildContainingRectFromElement(container, options, ghostEl) {
542
+ var rect = {};
543
+ Array.from(container.children).forEach(function (child) {
544
+ var _rect$left, _rect$top, _rect$right, _rect$bottom;
545
+ if (!closest(child, options.draggable, container, false) || child.animated || child === ghostEl) return;
546
+ var childRect = getRect(child);
547
+ rect.left = Math.min((_rect$left = rect.left) !== null && _rect$left !== void 0 ? _rect$left : Infinity, childRect.left);
548
+ rect.top = Math.min((_rect$top = rect.top) !== null && _rect$top !== void 0 ? _rect$top : Infinity, childRect.top);
549
+ rect.right = Math.max((_rect$right = rect.right) !== null && _rect$right !== void 0 ? _rect$right : -Infinity, childRect.right);
550
+ rect.bottom = Math.max((_rect$bottom = rect.bottom) !== null && _rect$bottom !== void 0 ? _rect$bottom : -Infinity, childRect.bottom);
551
+ });
552
+ rect.width = rect.right - rect.left;
553
+ rect.height = rect.bottom - rect.top;
554
+ rect.x = rect.left;
555
+ rect.y = rect.top;
556
+ return rect;
557
+ }
558
+ var expando = 'Sortable' + new Date().getTime();
559
+
560
+ function AnimationStateManager() {
561
+ var animationStates = [],
562
+ animationCallbackId;
563
+ return {
564
+ captureAnimationState: function captureAnimationState() {
565
+ animationStates = [];
566
+ if (!this.options.animation) return;
567
+ var children = [].slice.call(this.el.children);
568
+ children.forEach(function (child) {
569
+ if (css(child, 'display') === 'none' || child === Sortable.ghost) return;
570
+ animationStates.push({
571
+ target: child,
572
+ rect: getRect(child)
573
+ });
574
+ var fromRect = _objectSpread2({}, animationStates[animationStates.length - 1].rect);
575
+
576
+ // If animating: compensate for current animation
577
+ if (child.thisAnimationDuration) {
578
+ var childMatrix = matrix(child, true);
579
+ if (childMatrix) {
580
+ fromRect.top -= childMatrix.f;
581
+ fromRect.left -= childMatrix.e;
582
+ }
583
+ }
584
+ child.fromRect = fromRect;
585
+ });
586
+ },
587
+ addAnimationState: function addAnimationState(state) {
588
+ animationStates.push(state);
589
+ },
590
+ removeAnimationState: function removeAnimationState(target) {
591
+ animationStates.splice(indexOfObject(animationStates, {
592
+ target: target
593
+ }), 1);
594
+ },
595
+ animateAll: function animateAll(callback) {
596
+ var _this = this;
597
+ if (!this.options.animation) {
598
+ clearTimeout(animationCallbackId);
599
+ if (typeof callback === 'function') callback();
600
+ return;
601
+ }
602
+ var animating = false,
603
+ animationTime = 0;
604
+ animationStates.forEach(function (state) {
605
+ var time = 0,
606
+ target = state.target,
607
+ fromRect = target.fromRect,
608
+ toRect = getRect(target),
609
+ prevFromRect = target.prevFromRect,
610
+ prevToRect = target.prevToRect,
611
+ animatingRect = state.rect,
612
+ targetMatrix = matrix(target, true);
613
+ if (targetMatrix) {
614
+ // Compensate for current animation
615
+ toRect.top -= targetMatrix.f;
616
+ toRect.left -= targetMatrix.e;
617
+ }
618
+ target.toRect = toRect;
619
+ if (target.thisAnimationDuration) {
620
+ // Could also check if animatingRect is between fromRect and toRect
621
+ if (isRectEqual(prevFromRect, toRect) && !isRectEqual(fromRect, toRect) &&
622
+ // Make sure animatingRect is on line between toRect & fromRect
623
+ (animatingRect.top - toRect.top) / (animatingRect.left - toRect.left) === (fromRect.top - toRect.top) / (fromRect.left - toRect.left)) {
624
+ // If returning to same place as started from animation and on same axis
625
+ time = calculateRealTime(animatingRect, prevFromRect, prevToRect, _this.options);
626
+ }
627
+ }
628
+
629
+ // if fromRect != toRect: animate
630
+ if (!isRectEqual(toRect, fromRect)) {
631
+ target.prevFromRect = fromRect;
632
+ target.prevToRect = toRect;
633
+ if (!time) {
634
+ time = _this.options.animation;
635
+ }
636
+ _this.animate(target, animatingRect, toRect, time);
637
+ }
638
+ if (time) {
639
+ animating = true;
640
+ animationTime = Math.max(animationTime, time);
641
+ clearTimeout(target.animationResetTimer);
642
+ target.animationResetTimer = setTimeout(function () {
643
+ target.animationTime = 0;
644
+ target.prevFromRect = null;
645
+ target.fromRect = null;
646
+ target.prevToRect = null;
647
+ target.thisAnimationDuration = null;
648
+ }, time);
649
+ target.thisAnimationDuration = time;
650
+ }
651
+ });
652
+ clearTimeout(animationCallbackId);
653
+ if (!animating) {
654
+ if (typeof callback === 'function') callback();
655
+ } else {
656
+ animationCallbackId = setTimeout(function () {
657
+ if (typeof callback === 'function') callback();
658
+ }, animationTime);
659
+ }
660
+ animationStates = [];
661
+ },
662
+ animate: function animate(target, currentRect, toRect, duration) {
663
+ if (duration) {
664
+ css(target, 'transition', '');
665
+ css(target, 'transform', '');
666
+ var elMatrix = matrix(this.el),
667
+ scaleX = elMatrix && elMatrix.a,
668
+ scaleY = elMatrix && elMatrix.d,
669
+ translateX = (currentRect.left - toRect.left) / (scaleX || 1),
670
+ translateY = (currentRect.top - toRect.top) / (scaleY || 1);
671
+ target.animatingX = !!translateX;
672
+ target.animatingY = !!translateY;
673
+ css(target, 'transform', 'translate3d(' + translateX + 'px,' + translateY + 'px,0)');
674
+ this.forRepaintDummy = repaint(target); // repaint
675
+
676
+ css(target, 'transition', 'transform ' + duration + 'ms' + (this.options.easing ? ' ' + this.options.easing : ''));
677
+ css(target, 'transform', 'translate3d(0,0,0)');
678
+ typeof target.animated === 'number' && clearTimeout(target.animated);
679
+ target.animated = setTimeout(function () {
680
+ css(target, 'transition', '');
681
+ css(target, 'transform', '');
682
+ target.animated = false;
683
+ target.animatingX = false;
684
+ target.animatingY = false;
685
+ }, duration);
686
+ }
687
+ }
688
+ };
689
+ }
690
+ function repaint(target) {
691
+ return target.offsetWidth;
692
+ }
693
+ function calculateRealTime(animatingRect, fromRect, toRect, options) {
694
+ return Math.sqrt(Math.pow(fromRect.top - animatingRect.top, 2) + Math.pow(fromRect.left - animatingRect.left, 2)) / Math.sqrt(Math.pow(fromRect.top - toRect.top, 2) + Math.pow(fromRect.left - toRect.left, 2)) * options.animation;
695
+ }
696
+
697
+ var plugins = [];
698
+ var defaults = {
699
+ initializeByDefault: true
700
+ };
701
+ var PluginManager = {
702
+ mount: function mount(plugin) {
703
+ // Set default static properties
704
+ for (var option in defaults) {
705
+ if (defaults.hasOwnProperty(option) && !(option in plugin)) {
706
+ plugin[option] = defaults[option];
707
+ }
708
+ }
709
+ plugins.forEach(function (p) {
710
+ if (p.pluginName === plugin.pluginName) {
711
+ throw "Sortable: Cannot mount plugin ".concat(plugin.pluginName, " more than once");
712
+ }
713
+ });
714
+ plugins.push(plugin);
715
+ },
716
+ pluginEvent: function pluginEvent(eventName, sortable, evt) {
717
+ var _this = this;
718
+ this.eventCanceled = false;
719
+ evt.cancel = function () {
720
+ _this.eventCanceled = true;
721
+ };
722
+ var eventNameGlobal = eventName + 'Global';
723
+ plugins.forEach(function (plugin) {
724
+ if (!sortable[plugin.pluginName]) return;
725
+ // Fire global events if it exists in this sortable
726
+ if (sortable[plugin.pluginName][eventNameGlobal]) {
727
+ sortable[plugin.pluginName][eventNameGlobal](_objectSpread2({
728
+ sortable: sortable
729
+ }, evt));
730
+ }
731
+
732
+ // Only fire plugin event if plugin is enabled in this sortable,
733
+ // and plugin has event defined
734
+ if (sortable.options[plugin.pluginName] && sortable[plugin.pluginName][eventName]) {
735
+ sortable[plugin.pluginName][eventName](_objectSpread2({
736
+ sortable: sortable
737
+ }, evt));
738
+ }
739
+ });
740
+ },
741
+ initializePlugins: function initializePlugins(sortable, el, defaults, options) {
742
+ plugins.forEach(function (plugin) {
743
+ var pluginName = plugin.pluginName;
744
+ if (!sortable.options[pluginName] && !plugin.initializeByDefault) return;
745
+ var initialized = new plugin(sortable, el, sortable.options);
746
+ initialized.sortable = sortable;
747
+ initialized.options = sortable.options;
748
+ sortable[pluginName] = initialized;
749
+
750
+ // Add default options from plugin
751
+ _extends(defaults, initialized.defaults);
752
+ });
753
+ for (var option in sortable.options) {
754
+ if (!sortable.options.hasOwnProperty(option)) continue;
755
+ var modified = this.modifyOption(sortable, option, sortable.options[option]);
756
+ if (typeof modified !== 'undefined') {
757
+ sortable.options[option] = modified;
758
+ }
759
+ }
760
+ },
761
+ getEventProperties: function getEventProperties(name, sortable) {
762
+ var eventProperties = {};
763
+ plugins.forEach(function (plugin) {
764
+ if (typeof plugin.eventProperties !== 'function') return;
765
+ _extends(eventProperties, plugin.eventProperties.call(sortable[plugin.pluginName], name));
766
+ });
767
+ return eventProperties;
768
+ },
769
+ modifyOption: function modifyOption(sortable, name, value) {
770
+ var modifiedValue;
771
+ plugins.forEach(function (plugin) {
772
+ // Plugin must exist on the Sortable
773
+ if (!sortable[plugin.pluginName]) return;
774
+
775
+ // If static option listener exists for this option, call in the context of the Sortable's instance of this plugin
776
+ if (plugin.optionListeners && typeof plugin.optionListeners[name] === 'function') {
777
+ modifiedValue = plugin.optionListeners[name].call(sortable[plugin.pluginName], value);
778
+ }
779
+ });
780
+ return modifiedValue;
781
+ }
782
+ };
783
+
784
+ function dispatchEvent(_ref) {
785
+ var sortable = _ref.sortable,
786
+ rootEl = _ref.rootEl,
787
+ name = _ref.name,
788
+ targetEl = _ref.targetEl,
789
+ cloneEl = _ref.cloneEl,
790
+ toEl = _ref.toEl,
791
+ fromEl = _ref.fromEl,
792
+ oldIndex = _ref.oldIndex,
793
+ newIndex = _ref.newIndex,
794
+ oldDraggableIndex = _ref.oldDraggableIndex,
795
+ newDraggableIndex = _ref.newDraggableIndex,
796
+ originalEvent = _ref.originalEvent,
797
+ putSortable = _ref.putSortable,
798
+ extraEventProperties = _ref.extraEventProperties;
799
+ sortable = sortable || rootEl && rootEl[expando];
800
+ if (!sortable) return;
801
+ var evt,
802
+ options = sortable.options,
803
+ onName = 'on' + name.charAt(0).toUpperCase() + name.substr(1);
804
+ // Support for new CustomEvent feature
805
+ if (window.CustomEvent && !IE11OrLess && !Edge) {
806
+ evt = new CustomEvent(name, {
807
+ bubbles: true,
808
+ cancelable: true
809
+ });
810
+ } else {
811
+ evt = document.createEvent('Event');
812
+ evt.initEvent(name, true, true);
813
+ }
814
+ evt.to = toEl || rootEl;
815
+ evt.from = fromEl || rootEl;
816
+ evt.item = targetEl || rootEl;
817
+ evt.clone = cloneEl;
818
+ evt.oldIndex = oldIndex;
819
+ evt.newIndex = newIndex;
820
+ evt.oldDraggableIndex = oldDraggableIndex;
821
+ evt.newDraggableIndex = newDraggableIndex;
822
+ evt.originalEvent = originalEvent;
823
+ evt.pullMode = putSortable ? putSortable.lastPutMode : undefined;
824
+ var allEventProperties = _objectSpread2(_objectSpread2({}, extraEventProperties), PluginManager.getEventProperties(name, sortable));
825
+ for (var option in allEventProperties) {
826
+ evt[option] = allEventProperties[option];
827
+ }
828
+ if (rootEl) {
829
+ rootEl.dispatchEvent(evt);
830
+ }
831
+ if (options[onName]) {
832
+ options[onName].call(sortable, evt);
833
+ }
834
+ }
835
+
836
+ var _excluded = ["evt"];
837
+ var pluginEvent = function pluginEvent(eventName, sortable) {
838
+ var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
839
+ originalEvent = _ref.evt,
840
+ data = _objectWithoutProperties(_ref, _excluded);
841
+ PluginManager.pluginEvent.bind(Sortable)(eventName, sortable, _objectSpread2({
842
+ dragEl: dragEl,
843
+ parentEl: parentEl,
844
+ ghostEl: ghostEl,
845
+ rootEl: rootEl,
846
+ nextEl: nextEl,
847
+ lastDownEl: lastDownEl,
848
+ cloneEl: cloneEl,
849
+ cloneHidden: cloneHidden,
850
+ dragStarted: moved,
851
+ putSortable: putSortable,
852
+ activeSortable: Sortable.active,
853
+ originalEvent: originalEvent,
854
+ oldIndex: oldIndex,
855
+ oldDraggableIndex: oldDraggableIndex,
856
+ newIndex: newIndex,
857
+ newDraggableIndex: newDraggableIndex,
858
+ hideGhostForTarget: _hideGhostForTarget,
859
+ unhideGhostForTarget: _unhideGhostForTarget,
860
+ cloneNowHidden: function cloneNowHidden() {
861
+ cloneHidden = true;
862
+ },
863
+ cloneNowShown: function cloneNowShown() {
864
+ cloneHidden = false;
865
+ },
866
+ dispatchSortableEvent: function dispatchSortableEvent(name) {
867
+ _dispatchEvent({
868
+ sortable: sortable,
869
+ name: name,
870
+ originalEvent: originalEvent
871
+ });
872
+ }
873
+ }, data));
874
+ };
875
+ function _dispatchEvent(info) {
876
+ dispatchEvent(_objectSpread2({
877
+ putSortable: putSortable,
878
+ cloneEl: cloneEl,
879
+ targetEl: dragEl,
880
+ rootEl: rootEl,
881
+ oldIndex: oldIndex,
882
+ oldDraggableIndex: oldDraggableIndex,
883
+ newIndex: newIndex,
884
+ newDraggableIndex: newDraggableIndex
885
+ }, info));
886
+ }
887
+ var dragEl,
888
+ parentEl,
889
+ ghostEl,
890
+ rootEl,
891
+ nextEl,
892
+ lastDownEl,
893
+ cloneEl,
894
+ cloneHidden,
895
+ oldIndex,
896
+ newIndex,
897
+ oldDraggableIndex,
898
+ newDraggableIndex,
899
+ activeGroup,
900
+ putSortable,
901
+ awaitingDragStarted = false,
902
+ ignoreNextClick = false,
903
+ sortables = [],
904
+ tapEvt,
905
+ touchEvt,
906
+ lastDx,
907
+ lastDy,
908
+ tapDistanceLeft,
909
+ tapDistanceTop,
910
+ moved,
911
+ lastTarget,
912
+ lastDirection,
913
+ pastFirstInvertThresh = false,
914
+ isCircumstantialInvert = false,
915
+ targetMoveDistance,
916
+ // For positioning ghost absolutely
917
+ ghostRelativeParent,
918
+ ghostRelativeParentInitialScroll = [],
919
+ // (left, top)
920
+
921
+ _silent = false,
922
+ savedInputChecked = [];
923
+
924
+ /** @const */
925
+ var documentExists = typeof document !== 'undefined',
926
+ PositionGhostAbsolutely = IOS,
927
+ CSSFloatProperty = Edge || IE11OrLess ? 'cssFloat' : 'float',
928
+ // This will not pass for IE9, because IE9 DnD only works on anchors
929
+ supportDraggable = documentExists && !ChromeForAndroid && !IOS && 'draggable' in document.createElement('div'),
930
+ supportCssPointerEvents = function () {
931
+ if (!documentExists) return;
932
+ // false when <= IE11
933
+ if (IE11OrLess) {
934
+ return false;
935
+ }
936
+ var el = document.createElement('x');
937
+ el.style.cssText = 'pointer-events:auto';
938
+ return el.style.pointerEvents === 'auto';
939
+ }(),
940
+ _detectDirection = function _detectDirection(el, options) {
941
+ var elCSS = css(el),
942
+ elWidth = parseInt(elCSS.width) - parseInt(elCSS.paddingLeft) - parseInt(elCSS.paddingRight) - parseInt(elCSS.borderLeftWidth) - parseInt(elCSS.borderRightWidth),
943
+ child1 = getChild(el, 0, options),
944
+ child2 = getChild(el, 1, options),
945
+ firstChildCSS = child1 && css(child1),
946
+ secondChildCSS = child2 && css(child2),
947
+ firstChildWidth = firstChildCSS && parseInt(firstChildCSS.marginLeft) + parseInt(firstChildCSS.marginRight) + getRect(child1).width,
948
+ secondChildWidth = secondChildCSS && parseInt(secondChildCSS.marginLeft) + parseInt(secondChildCSS.marginRight) + getRect(child2).width;
949
+ if (elCSS.display === 'flex') {
950
+ return elCSS.flexDirection === 'column' || elCSS.flexDirection === 'column-reverse' ? 'vertical' : 'horizontal';
951
+ }
952
+ if (elCSS.display === 'grid') {
953
+ return elCSS.gridTemplateColumns.split(' ').length <= 1 ? 'vertical' : 'horizontal';
954
+ }
955
+ if (child1 && firstChildCSS["float"] && firstChildCSS["float"] !== 'none') {
956
+ var touchingSideChild2 = firstChildCSS["float"] === 'left' ? 'left' : 'right';
957
+ return child2 && (secondChildCSS.clear === 'both' || secondChildCSS.clear === touchingSideChild2) ? 'vertical' : 'horizontal';
958
+ }
959
+ return child1 && (firstChildCSS.display === 'block' || firstChildCSS.display === 'flex' || firstChildCSS.display === 'table' || firstChildCSS.display === 'grid' || firstChildWidth >= elWidth && elCSS[CSSFloatProperty] === 'none' || child2 && elCSS[CSSFloatProperty] === 'none' && firstChildWidth + secondChildWidth > elWidth) ? 'vertical' : 'horizontal';
960
+ },
961
+ _dragElInRowColumn = function _dragElInRowColumn(dragRect, targetRect, vertical) {
962
+ var dragElS1Opp = vertical ? dragRect.left : dragRect.top,
963
+ dragElS2Opp = vertical ? dragRect.right : dragRect.bottom,
964
+ dragElOppLength = vertical ? dragRect.width : dragRect.height,
965
+ targetS1Opp = vertical ? targetRect.left : targetRect.top,
966
+ targetS2Opp = vertical ? targetRect.right : targetRect.bottom,
967
+ targetOppLength = vertical ? targetRect.width : targetRect.height;
968
+ return dragElS1Opp === targetS1Opp || dragElS2Opp === targetS2Opp || dragElS1Opp + dragElOppLength / 2 === targetS1Opp + targetOppLength / 2;
969
+ },
970
+ /**
971
+ * Detects first nearest empty sortable to X and Y position using emptyInsertThreshold.
972
+ * @param {Number} x X position
973
+ * @param {Number} y Y position
974
+ * @return {HTMLElement} Element of the first found nearest Sortable
975
+ */
976
+ _detectNearestEmptySortable = function _detectNearestEmptySortable(x, y) {
977
+ var ret;
978
+ sortables.some(function (sortable) {
979
+ var threshold = sortable[expando].options.emptyInsertThreshold;
980
+ if (!threshold || lastChild(sortable)) return;
981
+ var rect = getRect(sortable),
982
+ insideHorizontally = x >= rect.left - threshold && x <= rect.right + threshold,
983
+ insideVertically = y >= rect.top - threshold && y <= rect.bottom + threshold;
984
+ if (insideHorizontally && insideVertically) {
985
+ return ret = sortable;
986
+ }
987
+ });
988
+ return ret;
989
+ },
990
+ _prepareGroup = function _prepareGroup(options) {
991
+ function toFn(value, pull) {
992
+ return function (to, from, dragEl, evt) {
993
+ var sameGroup = to.options.group.name && from.options.group.name && to.options.group.name === from.options.group.name;
994
+ if (value == null && (pull || sameGroup)) {
995
+ // Default pull value
996
+ // Default pull and put value if same group
997
+ return true;
998
+ } else if (value == null || value === false) {
999
+ return false;
1000
+ } else if (pull && value === 'clone') {
1001
+ return value;
1002
+ } else if (typeof value === 'function') {
1003
+ return toFn(value(to, from, dragEl, evt), pull)(to, from, dragEl, evt);
1004
+ } else {
1005
+ var otherGroup = (pull ? to : from).options.group.name;
1006
+ return value === true || typeof value === 'string' && value === otherGroup || value.join && value.indexOf(otherGroup) > -1;
1007
+ }
1008
+ };
1009
+ }
1010
+ var group = {};
1011
+ var originalGroup = options.group;
1012
+ if (!originalGroup || _typeof(originalGroup) != 'object') {
1013
+ originalGroup = {
1014
+ name: originalGroup
1015
+ };
1016
+ }
1017
+ group.name = originalGroup.name;
1018
+ group.checkPull = toFn(originalGroup.pull, true);
1019
+ group.checkPut = toFn(originalGroup.put);
1020
+ group.revertClone = originalGroup.revertClone;
1021
+ options.group = group;
1022
+ },
1023
+ _hideGhostForTarget = function _hideGhostForTarget() {
1024
+ if (!supportCssPointerEvents && ghostEl) {
1025
+ css(ghostEl, 'display', 'none');
1026
+ }
1027
+ },
1028
+ _unhideGhostForTarget = function _unhideGhostForTarget() {
1029
+ if (!supportCssPointerEvents && ghostEl) {
1030
+ css(ghostEl, 'display', '');
1031
+ }
1032
+ };
1033
+
1034
+ // #1184 fix - Prevent click event on fallback if dragged but item not changed position
1035
+ if (documentExists && !ChromeForAndroid) {
1036
+ document.addEventListener('click', function (evt) {
1037
+ if (ignoreNextClick) {
1038
+ evt.preventDefault();
1039
+ evt.stopPropagation && evt.stopPropagation();
1040
+ evt.stopImmediatePropagation && evt.stopImmediatePropagation();
1041
+ ignoreNextClick = false;
1042
+ return false;
1043
+ }
1044
+ }, true);
1045
+ }
1046
+ var nearestEmptyInsertDetectEvent = function nearestEmptyInsertDetectEvent(evt) {
1047
+ if (dragEl) {
1048
+ evt = evt.touches ? evt.touches[0] : evt;
1049
+ var nearest = _detectNearestEmptySortable(evt.clientX, evt.clientY);
1050
+ if (nearest) {
1051
+ // Create imitation event
1052
+ var event = {};
1053
+ for (var i in evt) {
1054
+ if (evt.hasOwnProperty(i)) {
1055
+ event[i] = evt[i];
1056
+ }
1057
+ }
1058
+ event.target = event.rootEl = nearest;
1059
+ event.preventDefault = void 0;
1060
+ event.stopPropagation = void 0;
1061
+ nearest[expando]._onDragOver(event);
1062
+ }
1063
+ }
1064
+ };
1065
+ var _checkOutsideTargetEl = function _checkOutsideTargetEl(evt) {
1066
+ if (dragEl) {
1067
+ dragEl.parentNode[expando]._isOutsideThisEl(evt.target);
1068
+ }
1069
+ };
1070
+
1071
+ /**
1072
+ * @class Sortable
1073
+ * @param {HTMLElement} el
1074
+ * @param {Object} [options]
1075
+ */
1076
+ function Sortable(el, options) {
1077
+ if (!(el && el.nodeType && el.nodeType === 1)) {
1078
+ throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(el));
1079
+ }
1080
+ this.el = el; // root element
1081
+ this.options = options = _extends({}, options);
1082
+
1083
+ // Export instance
1084
+ el[expando] = this;
1085
+ var defaults = {
1086
+ group: null,
1087
+ sort: true,
1088
+ disabled: false,
1089
+ store: null,
1090
+ handle: null,
1091
+ draggable: /^[uo]l$/i.test(el.nodeName) ? '>li' : '>*',
1092
+ swapThreshold: 1,
1093
+ // percentage; 0 <= x <= 1
1094
+ invertSwap: false,
1095
+ // invert always
1096
+ invertedSwapThreshold: null,
1097
+ // will be set to same as swapThreshold if default
1098
+ removeCloneOnHide: true,
1099
+ direction: function direction() {
1100
+ return _detectDirection(el, this.options);
1101
+ },
1102
+ ghostClass: 'sortable-ghost',
1103
+ chosenClass: 'sortable-chosen',
1104
+ dragClass: 'sortable-drag',
1105
+ ignore: 'a, img',
1106
+ filter: null,
1107
+ preventOnFilter: true,
1108
+ animation: 0,
1109
+ easing: null,
1110
+ setData: function setData(dataTransfer, dragEl) {
1111
+ dataTransfer.setData('Text', dragEl.textContent);
1112
+ },
1113
+ dropBubble: false,
1114
+ dragoverBubble: false,
1115
+ dataIdAttr: 'data-id',
1116
+ delay: 0,
1117
+ delayOnTouchOnly: false,
1118
+ touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1,
1119
+ forceFallback: false,
1120
+ fallbackClass: 'sortable-fallback',
1121
+ fallbackOnBody: false,
1122
+ fallbackTolerance: 0,
1123
+ fallbackOffset: {
1124
+ x: 0,
1125
+ y: 0
1126
+ },
1127
+ // Disabled on Safari: #1571; Enabled on Safari IOS: #2244
1128
+ supportPointer: Sortable.supportPointer !== false && 'PointerEvent' in window && (!Safari || IOS),
1129
+ emptyInsertThreshold: 5
1130
+ };
1131
+ PluginManager.initializePlugins(this, el, defaults);
1132
+
1133
+ // Set default options
1134
+ for (var name in defaults) {
1135
+ !(name in options) && (options[name] = defaults[name]);
1136
+ }
1137
+ _prepareGroup(options);
1138
+
1139
+ // Bind all private methods
1140
+ for (var fn in this) {
1141
+ if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {
1142
+ this[fn] = this[fn].bind(this);
1143
+ }
1144
+ }
1145
+
1146
+ // Setup drag mode
1147
+ this.nativeDraggable = options.forceFallback ? false : supportDraggable;
1148
+ if (this.nativeDraggable) {
1149
+ // Touch start threshold cannot be greater than the native dragstart threshold
1150
+ this.options.touchStartThreshold = 1;
1151
+ }
1152
+
1153
+ // Bind events
1154
+ if (options.supportPointer) {
1155
+ on(el, 'pointerdown', this._onTapStart);
1156
+ } else {
1157
+ on(el, 'mousedown', this._onTapStart);
1158
+ on(el, 'touchstart', this._onTapStart);
1159
+ }
1160
+ if (this.nativeDraggable) {
1161
+ on(el, 'dragover', this);
1162
+ on(el, 'dragenter', this);
1163
+ }
1164
+ sortables.push(this.el);
1165
+
1166
+ // Restore sorting
1167
+ options.store && options.store.get && this.sort(options.store.get(this) || []);
1168
+
1169
+ // Add animation state manager
1170
+ _extends(this, AnimationStateManager());
1171
+ }
1172
+ Sortable.prototype = /** @lends Sortable.prototype */{
1173
+ constructor: Sortable,
1174
+ _isOutsideThisEl: function _isOutsideThisEl(target) {
1175
+ if (!this.el.contains(target) && target !== this.el) {
1176
+ lastTarget = null;
1177
+ }
1178
+ },
1179
+ _getDirection: function _getDirection(evt, target) {
1180
+ return typeof this.options.direction === 'function' ? this.options.direction.call(this, evt, target, dragEl) : this.options.direction;
1181
+ },
1182
+ _onTapStart: function _onTapStart( /** Event|TouchEvent */evt) {
1183
+ if (!evt.cancelable) return;
1184
+ var _this = this,
1185
+ el = this.el,
1186
+ options = this.options,
1187
+ preventOnFilter = options.preventOnFilter,
1188
+ type = evt.type,
1189
+ touch = evt.touches && evt.touches[0] || evt.pointerType && evt.pointerType === 'touch' && evt,
1190
+ target = (touch || evt).target,
1191
+ originalTarget = evt.target.shadowRoot && (evt.path && evt.path[0] || evt.composedPath && evt.composedPath()[0]) || target,
1192
+ filter = options.filter;
1193
+ _saveInputCheckedState(el);
1194
+
1195
+ // Don't trigger start event when an element is been dragged, otherwise the evt.oldindex always wrong when set option.group.
1196
+ if (dragEl) {
1197
+ return;
1198
+ }
1199
+ if (/mousedown|pointerdown/.test(type) && evt.button !== 0 || options.disabled) {
1200
+ return; // only left button and enabled
1201
+ }
1202
+
1203
+ // cancel dnd if original target is content editable
1204
+ if (originalTarget.isContentEditable) {
1205
+ return;
1206
+ }
1207
+
1208
+ // Safari ignores further event handling after mousedown
1209
+ if (!this.nativeDraggable && Safari && target && target.tagName.toUpperCase() === 'SELECT') {
1210
+ return;
1211
+ }
1212
+ target = closest(target, options.draggable, el, false);
1213
+ if (target && target.animated) {
1214
+ return;
1215
+ }
1216
+ if (lastDownEl === target) {
1217
+ // Ignoring duplicate `down`
1218
+ return;
1219
+ }
1220
+
1221
+ // Get the index of the dragged element within its parent
1222
+ oldIndex = index(target);
1223
+ oldDraggableIndex = index(target, options.draggable);
1224
+
1225
+ // Check filter
1226
+ if (typeof filter === 'function') {
1227
+ if (filter.call(this, evt, target, this)) {
1228
+ _dispatchEvent({
1229
+ sortable: _this,
1230
+ rootEl: originalTarget,
1231
+ name: 'filter',
1232
+ targetEl: target,
1233
+ toEl: el,
1234
+ fromEl: el
1235
+ });
1236
+ pluginEvent('filter', _this, {
1237
+ evt: evt
1238
+ });
1239
+ preventOnFilter && evt.preventDefault();
1240
+ return; // cancel dnd
1241
+ }
1242
+ } else if (filter) {
1243
+ filter = filter.split(',').some(function (criteria) {
1244
+ criteria = closest(originalTarget, criteria.trim(), el, false);
1245
+ if (criteria) {
1246
+ _dispatchEvent({
1247
+ sortable: _this,
1248
+ rootEl: criteria,
1249
+ name: 'filter',
1250
+ targetEl: target,
1251
+ fromEl: el,
1252
+ toEl: el
1253
+ });
1254
+ pluginEvent('filter', _this, {
1255
+ evt: evt
1256
+ });
1257
+ return true;
1258
+ }
1259
+ });
1260
+ if (filter) {
1261
+ preventOnFilter && evt.preventDefault();
1262
+ return; // cancel dnd
1263
+ }
1264
+ }
1265
+ if (options.handle && !closest(originalTarget, options.handle, el, false)) {
1266
+ return;
1267
+ }
1268
+
1269
+ // Prepare `dragstart`
1270
+ this._prepareDragStart(evt, touch, target);
1271
+ },
1272
+ _prepareDragStart: function _prepareDragStart( /** Event */evt, /** Touch */touch, /** HTMLElement */target) {
1273
+ var _this = this,
1274
+ el = _this.el,
1275
+ options = _this.options,
1276
+ ownerDocument = el.ownerDocument,
1277
+ dragStartFn;
1278
+ if (target && !dragEl && target.parentNode === el) {
1279
+ var dragRect = getRect(target);
1280
+ rootEl = el;
1281
+ dragEl = target;
1282
+ parentEl = dragEl.parentNode;
1283
+ nextEl = dragEl.nextSibling;
1284
+ lastDownEl = target;
1285
+ activeGroup = options.group;
1286
+ Sortable.dragged = dragEl;
1287
+ tapEvt = {
1288
+ target: dragEl,
1289
+ clientX: (touch || evt).clientX,
1290
+ clientY: (touch || evt).clientY
1291
+ };
1292
+ tapDistanceLeft = tapEvt.clientX - dragRect.left;
1293
+ tapDistanceTop = tapEvt.clientY - dragRect.top;
1294
+ this._lastX = (touch || evt).clientX;
1295
+ this._lastY = (touch || evt).clientY;
1296
+ dragEl.style['will-change'] = 'all';
1297
+ dragStartFn = function dragStartFn() {
1298
+ pluginEvent('delayEnded', _this, {
1299
+ evt: evt
1300
+ });
1301
+ if (Sortable.eventCanceled) {
1302
+ _this._onDrop();
1303
+ return;
1304
+ }
1305
+ // Delayed drag has been triggered
1306
+ // we can re-enable the events: touchmove/mousemove
1307
+ _this._disableDelayedDragEvents();
1308
+ if (!FireFox && _this.nativeDraggable) {
1309
+ dragEl.draggable = true;
1310
+ }
1311
+
1312
+ // Bind the events: dragstart/dragend
1313
+ _this._triggerDragStart(evt, touch);
1314
+
1315
+ // Drag start event
1316
+ _dispatchEvent({
1317
+ sortable: _this,
1318
+ name: 'choose',
1319
+ originalEvent: evt
1320
+ });
1321
+
1322
+ // Chosen item
1323
+ toggleClass(dragEl, options.chosenClass, true);
1324
+ };
1325
+
1326
+ // Disable "draggable"
1327
+ options.ignore.split(',').forEach(function (criteria) {
1328
+ find(dragEl, criteria.trim(), _disableDraggable);
1329
+ });
1330
+ on(ownerDocument, 'dragover', nearestEmptyInsertDetectEvent);
1331
+ on(ownerDocument, 'mousemove', nearestEmptyInsertDetectEvent);
1332
+ on(ownerDocument, 'touchmove', nearestEmptyInsertDetectEvent);
1333
+ if (options.supportPointer) {
1334
+ on(ownerDocument, 'pointerup', _this._onDrop);
1335
+ // Native D&D triggers pointercancel
1336
+ !this.nativeDraggable && on(ownerDocument, 'pointercancel', _this._onDrop);
1337
+ } else {
1338
+ on(ownerDocument, 'mouseup', _this._onDrop);
1339
+ on(ownerDocument, 'touchend', _this._onDrop);
1340
+ on(ownerDocument, 'touchcancel', _this._onDrop);
1341
+ }
1342
+
1343
+ // Make dragEl draggable (must be before delay for FireFox)
1344
+ if (FireFox && this.nativeDraggable) {
1345
+ this.options.touchStartThreshold = 4;
1346
+ dragEl.draggable = true;
1347
+ }
1348
+ pluginEvent('delayStart', this, {
1349
+ evt: evt
1350
+ });
1351
+
1352
+ // Delay is impossible for native DnD in Edge or IE
1353
+ if (options.delay && (!options.delayOnTouchOnly || touch) && (!this.nativeDraggable || !(Edge || IE11OrLess))) {
1354
+ if (Sortable.eventCanceled) {
1355
+ this._onDrop();
1356
+ return;
1357
+ }
1358
+ // If the user moves the pointer or let go the click or touch
1359
+ // before the delay has been reached:
1360
+ // disable the delayed drag
1361
+ if (options.supportPointer) {
1362
+ on(ownerDocument, 'pointerup', _this._disableDelayedDrag);
1363
+ on(ownerDocument, 'pointercancel', _this._disableDelayedDrag);
1364
+ } else {
1365
+ on(ownerDocument, 'mouseup', _this._disableDelayedDrag);
1366
+ on(ownerDocument, 'touchend', _this._disableDelayedDrag);
1367
+ on(ownerDocument, 'touchcancel', _this._disableDelayedDrag);
1368
+ }
1369
+ on(ownerDocument, 'mousemove', _this._delayedDragTouchMoveHandler);
1370
+ on(ownerDocument, 'touchmove', _this._delayedDragTouchMoveHandler);
1371
+ options.supportPointer && on(ownerDocument, 'pointermove', _this._delayedDragTouchMoveHandler);
1372
+ _this._dragStartTimer = setTimeout(dragStartFn, options.delay);
1373
+ } else {
1374
+ dragStartFn();
1375
+ }
1376
+ }
1377
+ },
1378
+ _delayedDragTouchMoveHandler: function _delayedDragTouchMoveHandler( /** TouchEvent|PointerEvent **/e) {
1379
+ var touch = e.touches ? e.touches[0] : e;
1380
+ if (Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1))) {
1381
+ this._disableDelayedDrag();
1382
+ }
1383
+ },
1384
+ _disableDelayedDrag: function _disableDelayedDrag() {
1385
+ dragEl && _disableDraggable(dragEl);
1386
+ clearTimeout(this._dragStartTimer);
1387
+ this._disableDelayedDragEvents();
1388
+ },
1389
+ _disableDelayedDragEvents: function _disableDelayedDragEvents() {
1390
+ var ownerDocument = this.el.ownerDocument;
1391
+ off(ownerDocument, 'mouseup', this._disableDelayedDrag);
1392
+ off(ownerDocument, 'touchend', this._disableDelayedDrag);
1393
+ off(ownerDocument, 'touchcancel', this._disableDelayedDrag);
1394
+ off(ownerDocument, 'pointerup', this._disableDelayedDrag);
1395
+ off(ownerDocument, 'pointercancel', this._disableDelayedDrag);
1396
+ off(ownerDocument, 'mousemove', this._delayedDragTouchMoveHandler);
1397
+ off(ownerDocument, 'touchmove', this._delayedDragTouchMoveHandler);
1398
+ off(ownerDocument, 'pointermove', this._delayedDragTouchMoveHandler);
1399
+ },
1400
+ _triggerDragStart: function _triggerDragStart( /** Event */evt, /** Touch */touch) {
1401
+ touch = touch || evt.pointerType == 'touch' && evt;
1402
+ if (!this.nativeDraggable || touch) {
1403
+ if (this.options.supportPointer) {
1404
+ on(document, 'pointermove', this._onTouchMove);
1405
+ } else if (touch) {
1406
+ on(document, 'touchmove', this._onTouchMove);
1407
+ } else {
1408
+ on(document, 'mousemove', this._onTouchMove);
1409
+ }
1410
+ } else {
1411
+ on(dragEl, 'dragend', this);
1412
+ on(rootEl, 'dragstart', this._onDragStart);
1413
+ }
1414
+ try {
1415
+ if (document.selection) {
1416
+ _nextTick(function () {
1417
+ document.selection.empty();
1418
+ });
1419
+ } else {
1420
+ window.getSelection().removeAllRanges();
1421
+ }
1422
+ } catch (err) {}
1423
+ },
1424
+ _dragStarted: function _dragStarted(fallback, evt) {
1425
+ awaitingDragStarted = false;
1426
+ if (rootEl && dragEl) {
1427
+ pluginEvent('dragStarted', this, {
1428
+ evt: evt
1429
+ });
1430
+ if (this.nativeDraggable) {
1431
+ on(document, 'dragover', _checkOutsideTargetEl);
1432
+ }
1433
+ var options = this.options;
1434
+
1435
+ // Apply effect
1436
+ !fallback && toggleClass(dragEl, options.dragClass, false);
1437
+ toggleClass(dragEl, options.ghostClass, true);
1438
+ Sortable.active = this;
1439
+ fallback && this._appendGhost();
1440
+
1441
+ // Drag start event
1442
+ _dispatchEvent({
1443
+ sortable: this,
1444
+ name: 'start',
1445
+ originalEvent: evt
1446
+ });
1447
+ } else {
1448
+ this._nulling();
1449
+ }
1450
+ },
1451
+ _emulateDragOver: function _emulateDragOver() {
1452
+ if (touchEvt) {
1453
+ this._lastX = touchEvt.clientX;
1454
+ this._lastY = touchEvt.clientY;
1455
+ _hideGhostForTarget();
1456
+ var target = document.elementFromPoint(touchEvt.clientX, touchEvt.clientY);
1457
+ var parent = target;
1458
+ while (target && target.shadowRoot) {
1459
+ target = target.shadowRoot.elementFromPoint(touchEvt.clientX, touchEvt.clientY);
1460
+ if (target === parent) break;
1461
+ parent = target;
1462
+ }
1463
+ dragEl.parentNode[expando]._isOutsideThisEl(target);
1464
+ if (parent) {
1465
+ do {
1466
+ if (parent[expando]) {
1467
+ var inserted = void 0;
1468
+ inserted = parent[expando]._onDragOver({
1469
+ clientX: touchEvt.clientX,
1470
+ clientY: touchEvt.clientY,
1471
+ target: target,
1472
+ rootEl: parent
1473
+ });
1474
+ if (inserted && !this.options.dragoverBubble) {
1475
+ break;
1476
+ }
1477
+ }
1478
+ target = parent; // store last element
1479
+ }
1480
+ /* jshint boss:true */ while (parent = getParentOrHost(parent));
1481
+ }
1482
+ _unhideGhostForTarget();
1483
+ }
1484
+ },
1485
+ _onTouchMove: function _onTouchMove( /**TouchEvent*/evt) {
1486
+ if (tapEvt) {
1487
+ var options = this.options,
1488
+ fallbackTolerance = options.fallbackTolerance,
1489
+ fallbackOffset = options.fallbackOffset,
1490
+ touch = evt.touches ? evt.touches[0] : evt,
1491
+ ghostMatrix = ghostEl && matrix(ghostEl, true),
1492
+ scaleX = ghostEl && ghostMatrix && ghostMatrix.a,
1493
+ scaleY = ghostEl && ghostMatrix && ghostMatrix.d,
1494
+ relativeScrollOffset = PositionGhostAbsolutely && ghostRelativeParent && getRelativeScrollOffset(ghostRelativeParent),
1495
+ dx = (touch.clientX - tapEvt.clientX + fallbackOffset.x) / (scaleX || 1) + (relativeScrollOffset ? relativeScrollOffset[0] - ghostRelativeParentInitialScroll[0] : 0) / (scaleX || 1),
1496
+ dy = (touch.clientY - tapEvt.clientY + fallbackOffset.y) / (scaleY || 1) + (relativeScrollOffset ? relativeScrollOffset[1] - ghostRelativeParentInitialScroll[1] : 0) / (scaleY || 1);
1497
+
1498
+ // only set the status to dragging, when we are actually dragging
1499
+ if (!Sortable.active && !awaitingDragStarted) {
1500
+ if (fallbackTolerance && Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) < fallbackTolerance) {
1501
+ return;
1502
+ }
1503
+ this._onDragStart(evt, true);
1504
+ }
1505
+ if (ghostEl) {
1506
+ if (ghostMatrix) {
1507
+ ghostMatrix.e += dx - (lastDx || 0);
1508
+ ghostMatrix.f += dy - (lastDy || 0);
1509
+ } else {
1510
+ ghostMatrix = {
1511
+ a: 1,
1512
+ b: 0,
1513
+ c: 0,
1514
+ d: 1,
1515
+ e: dx,
1516
+ f: dy
1517
+ };
1518
+ }
1519
+ var cssMatrix = "matrix(".concat(ghostMatrix.a, ",").concat(ghostMatrix.b, ",").concat(ghostMatrix.c, ",").concat(ghostMatrix.d, ",").concat(ghostMatrix.e, ",").concat(ghostMatrix.f, ")");
1520
+ css(ghostEl, 'webkitTransform', cssMatrix);
1521
+ css(ghostEl, 'mozTransform', cssMatrix);
1522
+ css(ghostEl, 'msTransform', cssMatrix);
1523
+ css(ghostEl, 'transform', cssMatrix);
1524
+ lastDx = dx;
1525
+ lastDy = dy;
1526
+ touchEvt = touch;
1527
+ }
1528
+ evt.cancelable && evt.preventDefault();
1529
+ }
1530
+ },
1531
+ _appendGhost: function _appendGhost() {
1532
+ // Bug if using scale(): https://stackoverflow.com/questions/2637058
1533
+ // Not being adjusted for
1534
+ if (!ghostEl) {
1535
+ var container = this.options.fallbackOnBody ? document.body : rootEl,
1536
+ rect = getRect(dragEl, true, PositionGhostAbsolutely, true, container),
1537
+ options = this.options;
1538
+
1539
+ // Position absolutely
1540
+ if (PositionGhostAbsolutely) {
1541
+ // Get relatively positioned parent
1542
+ ghostRelativeParent = container;
1543
+ while (css(ghostRelativeParent, 'position') === 'static' && css(ghostRelativeParent, 'transform') === 'none' && ghostRelativeParent !== document) {
1544
+ ghostRelativeParent = ghostRelativeParent.parentNode;
1545
+ }
1546
+ if (ghostRelativeParent !== document.body && ghostRelativeParent !== document.documentElement) {
1547
+ if (ghostRelativeParent === document) ghostRelativeParent = getWindowScrollingElement();
1548
+ rect.top += ghostRelativeParent.scrollTop;
1549
+ rect.left += ghostRelativeParent.scrollLeft;
1550
+ } else {
1551
+ ghostRelativeParent = getWindowScrollingElement();
1552
+ }
1553
+ ghostRelativeParentInitialScroll = getRelativeScrollOffset(ghostRelativeParent);
1554
+ }
1555
+ ghostEl = dragEl.cloneNode(true);
1556
+ toggleClass(ghostEl, options.ghostClass, false);
1557
+ toggleClass(ghostEl, options.fallbackClass, true);
1558
+ toggleClass(ghostEl, options.dragClass, true);
1559
+ css(ghostEl, 'transition', '');
1560
+ css(ghostEl, 'transform', '');
1561
+ css(ghostEl, 'box-sizing', 'border-box');
1562
+ css(ghostEl, 'margin', 0);
1563
+ css(ghostEl, 'top', rect.top);
1564
+ css(ghostEl, 'left', rect.left);
1565
+ css(ghostEl, 'width', rect.width);
1566
+ css(ghostEl, 'height', rect.height);
1567
+ css(ghostEl, 'opacity', '0.8');
1568
+ css(ghostEl, 'position', PositionGhostAbsolutely ? 'absolute' : 'fixed');
1569
+ css(ghostEl, 'zIndex', '100000');
1570
+ css(ghostEl, 'pointerEvents', 'none');
1571
+ Sortable.ghost = ghostEl;
1572
+ container.appendChild(ghostEl);
1573
+
1574
+ // Set transform-origin
1575
+ css(ghostEl, 'transform-origin', tapDistanceLeft / parseInt(ghostEl.style.width) * 100 + '% ' + tapDistanceTop / parseInt(ghostEl.style.height) * 100 + '%');
1576
+ }
1577
+ },
1578
+ _onDragStart: function _onDragStart( /**Event*/evt, /**boolean*/fallback) {
1579
+ var _this = this;
1580
+ var dataTransfer = evt.dataTransfer;
1581
+ var options = _this.options;
1582
+ pluginEvent('dragStart', this, {
1583
+ evt: evt
1584
+ });
1585
+ if (Sortable.eventCanceled) {
1586
+ this._onDrop();
1587
+ return;
1588
+ }
1589
+ pluginEvent('setupClone', this);
1590
+ if (!Sortable.eventCanceled) {
1591
+ cloneEl = clone(dragEl);
1592
+ cloneEl.removeAttribute("id");
1593
+ cloneEl.draggable = false;
1594
+ cloneEl.style['will-change'] = '';
1595
+ this._hideClone();
1596
+ toggleClass(cloneEl, this.options.chosenClass, false);
1597
+ Sortable.clone = cloneEl;
1598
+ }
1599
+
1600
+ // #1143: IFrame support workaround
1601
+ _this.cloneId = _nextTick(function () {
1602
+ pluginEvent('clone', _this);
1603
+ if (Sortable.eventCanceled) return;
1604
+ if (!_this.options.removeCloneOnHide) {
1605
+ rootEl.insertBefore(cloneEl, dragEl);
1606
+ }
1607
+ _this._hideClone();
1608
+ _dispatchEvent({
1609
+ sortable: _this,
1610
+ name: 'clone'
1611
+ });
1612
+ });
1613
+ !fallback && toggleClass(dragEl, options.dragClass, true);
1614
+
1615
+ // Set proper drop events
1616
+ if (fallback) {
1617
+ ignoreNextClick = true;
1618
+ _this._loopId = setInterval(_this._emulateDragOver, 50);
1619
+ } else {
1620
+ // Undo what was set in _prepareDragStart before drag started
1621
+ off(document, 'mouseup', _this._onDrop);
1622
+ off(document, 'touchend', _this._onDrop);
1623
+ off(document, 'touchcancel', _this._onDrop);
1624
+ if (dataTransfer) {
1625
+ dataTransfer.effectAllowed = 'move';
1626
+ options.setData && options.setData.call(_this, dataTransfer, dragEl);
1627
+ }
1628
+ on(document, 'drop', _this);
1629
+
1630
+ // #1276 fix:
1631
+ css(dragEl, 'transform', 'translateZ(0)');
1632
+ }
1633
+ awaitingDragStarted = true;
1634
+ _this._dragStartId = _nextTick(_this._dragStarted.bind(_this, fallback, evt));
1635
+ on(document, 'selectstart', _this);
1636
+ moved = true;
1637
+ window.getSelection().removeAllRanges();
1638
+ if (Safari) {
1639
+ css(document.body, 'user-select', 'none');
1640
+ }
1641
+ },
1642
+ // Returns true - if no further action is needed (either inserted or another condition)
1643
+ _onDragOver: function _onDragOver( /**Event*/evt) {
1644
+ var el = this.el,
1645
+ target = evt.target,
1646
+ dragRect,
1647
+ targetRect,
1648
+ revert,
1649
+ options = this.options,
1650
+ group = options.group,
1651
+ activeSortable = Sortable.active,
1652
+ isOwner = activeGroup === group,
1653
+ canSort = options.sort,
1654
+ fromSortable = putSortable || activeSortable,
1655
+ vertical,
1656
+ _this = this,
1657
+ completedFired = false;
1658
+ if (_silent) return;
1659
+ function dragOverEvent(name, extra) {
1660
+ pluginEvent(name, _this, _objectSpread2({
1661
+ evt: evt,
1662
+ isOwner: isOwner,
1663
+ axis: vertical ? 'vertical' : 'horizontal',
1664
+ revert: revert,
1665
+ dragRect: dragRect,
1666
+ targetRect: targetRect,
1667
+ canSort: canSort,
1668
+ fromSortable: fromSortable,
1669
+ target: target,
1670
+ completed: completed,
1671
+ onMove: function onMove(target, after) {
1672
+ return _onMove(rootEl, el, dragEl, dragRect, target, getRect(target), evt, after);
1673
+ },
1674
+ changed: changed
1675
+ }, extra));
1676
+ }
1677
+
1678
+ // Capture animation state
1679
+ function capture() {
1680
+ dragOverEvent('dragOverAnimationCapture');
1681
+ _this.captureAnimationState();
1682
+ if (_this !== fromSortable) {
1683
+ fromSortable.captureAnimationState();
1684
+ }
1685
+ }
1686
+
1687
+ // Return invocation when dragEl is inserted (or completed)
1688
+ function completed(insertion) {
1689
+ dragOverEvent('dragOverCompleted', {
1690
+ insertion: insertion
1691
+ });
1692
+ if (insertion) {
1693
+ // Clones must be hidden before folding animation to capture dragRectAbsolute properly
1694
+ if (isOwner) {
1695
+ activeSortable._hideClone();
1696
+ } else {
1697
+ activeSortable._showClone(_this);
1698
+ }
1699
+ if (_this !== fromSortable) {
1700
+ // Set ghost class to new sortable's ghost class
1701
+ toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : activeSortable.options.ghostClass, false);
1702
+ toggleClass(dragEl, options.ghostClass, true);
1703
+ }
1704
+ if (putSortable !== _this && _this !== Sortable.active) {
1705
+ putSortable = _this;
1706
+ } else if (_this === Sortable.active && putSortable) {
1707
+ putSortable = null;
1708
+ }
1709
+
1710
+ // Animation
1711
+ if (fromSortable === _this) {
1712
+ _this._ignoreWhileAnimating = target;
1713
+ }
1714
+ _this.animateAll(function () {
1715
+ dragOverEvent('dragOverAnimationComplete');
1716
+ _this._ignoreWhileAnimating = null;
1717
+ });
1718
+ if (_this !== fromSortable) {
1719
+ fromSortable.animateAll();
1720
+ fromSortable._ignoreWhileAnimating = null;
1721
+ }
1722
+ }
1723
+
1724
+ // Null lastTarget if it is not inside a previously swapped element
1725
+ if (target === dragEl && !dragEl.animated || target === el && !target.animated) {
1726
+ lastTarget = null;
1727
+ }
1728
+
1729
+ // no bubbling and not fallback
1730
+ if (!options.dragoverBubble && !evt.rootEl && target !== document) {
1731
+ dragEl.parentNode[expando]._isOutsideThisEl(evt.target);
1732
+
1733
+ // Do not detect for empty insert if already inserted
1734
+ !insertion && nearestEmptyInsertDetectEvent(evt);
1735
+ }
1736
+ !options.dragoverBubble && evt.stopPropagation && evt.stopPropagation();
1737
+ return completedFired = true;
1738
+ }
1739
+
1740
+ // Call when dragEl has been inserted
1741
+ function changed() {
1742
+ newIndex = index(dragEl);
1743
+ newDraggableIndex = index(dragEl, options.draggable);
1744
+ _dispatchEvent({
1745
+ sortable: _this,
1746
+ name: 'change',
1747
+ toEl: el,
1748
+ newIndex: newIndex,
1749
+ newDraggableIndex: newDraggableIndex,
1750
+ originalEvent: evt
1751
+ });
1752
+ }
1753
+ if (evt.preventDefault !== void 0) {
1754
+ evt.cancelable && evt.preventDefault();
1755
+ }
1756
+ target = closest(target, options.draggable, el, true);
1757
+ dragOverEvent('dragOver');
1758
+ if (Sortable.eventCanceled) return completedFired;
1759
+ if (dragEl.contains(evt.target) || target.animated && target.animatingX && target.animatingY || _this._ignoreWhileAnimating === target) {
1760
+ return completed(false);
1761
+ }
1762
+ ignoreNextClick = false;
1763
+ if (activeSortable && !options.disabled && (isOwner ? canSort || (revert = parentEl !== rootEl) // Reverting item into the original list
1764
+ : putSortable === this || (this.lastPutMode = activeGroup.checkPull(this, activeSortable, dragEl, evt)) && group.checkPut(this, activeSortable, dragEl, evt))) {
1765
+ vertical = this._getDirection(evt, target) === 'vertical';
1766
+ dragRect = getRect(dragEl);
1767
+ dragOverEvent('dragOverValid');
1768
+ if (Sortable.eventCanceled) return completedFired;
1769
+ if (revert) {
1770
+ parentEl = rootEl; // actualization
1771
+ capture();
1772
+ this._hideClone();
1773
+ dragOverEvent('revert');
1774
+ if (!Sortable.eventCanceled) {
1775
+ if (nextEl) {
1776
+ rootEl.insertBefore(dragEl, nextEl);
1777
+ } else {
1778
+ rootEl.appendChild(dragEl);
1779
+ }
1780
+ }
1781
+ return completed(true);
1782
+ }
1783
+ var elLastChild = lastChild(el, options.draggable);
1784
+ if (!elLastChild || _ghostIsLast(evt, vertical, this) && !elLastChild.animated) {
1785
+ // Insert to end of list
1786
+
1787
+ // If already at end of list: Do not insert
1788
+ if (elLastChild === dragEl) {
1789
+ return completed(false);
1790
+ }
1791
+
1792
+ // if there is a last element, it is the target
1793
+ if (elLastChild && el === evt.target) {
1794
+ target = elLastChild;
1795
+ }
1796
+ if (target) {
1797
+ targetRect = getRect(target);
1798
+ }
1799
+ if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, !!target) !== false) {
1800
+ capture();
1801
+ if (elLastChild && elLastChild.nextSibling) {
1802
+ // the last draggable element is not the last node
1803
+ el.insertBefore(dragEl, elLastChild.nextSibling);
1804
+ } else {
1805
+ el.appendChild(dragEl);
1806
+ }
1807
+ parentEl = el; // actualization
1808
+
1809
+ changed();
1810
+ return completed(true);
1811
+ }
1812
+ } else if (elLastChild && _ghostIsFirst(evt, vertical, this)) {
1813
+ // Insert to start of list
1814
+ var firstChild = getChild(el, 0, options, true);
1815
+ if (firstChild === dragEl) {
1816
+ return completed(false);
1817
+ }
1818
+ target = firstChild;
1819
+ targetRect = getRect(target);
1820
+ if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, false) !== false) {
1821
+ capture();
1822
+ el.insertBefore(dragEl, firstChild);
1823
+ parentEl = el; // actualization
1824
+
1825
+ changed();
1826
+ return completed(true);
1827
+ }
1828
+ } else if (target.parentNode === el) {
1829
+ targetRect = getRect(target);
1830
+ var direction = 0,
1831
+ targetBeforeFirstSwap,
1832
+ differentLevel = dragEl.parentNode !== el,
1833
+ differentRowCol = !_dragElInRowColumn(dragEl.animated && dragEl.toRect || dragRect, target.animated && target.toRect || targetRect, vertical),
1834
+ side1 = vertical ? 'top' : 'left',
1835
+ scrolledPastTop = isScrolledPast(target, 'top', 'top') || isScrolledPast(dragEl, 'top', 'top'),
1836
+ scrollBefore = scrolledPastTop ? scrolledPastTop.scrollTop : void 0;
1837
+ if (lastTarget !== target) {
1838
+ targetBeforeFirstSwap = targetRect[side1];
1839
+ pastFirstInvertThresh = false;
1840
+ isCircumstantialInvert = !differentRowCol && options.invertSwap || differentLevel;
1841
+ }
1842
+ direction = _getSwapDirection(evt, target, targetRect, vertical, differentRowCol ? 1 : options.swapThreshold, options.invertedSwapThreshold == null ? options.swapThreshold : options.invertedSwapThreshold, isCircumstantialInvert, lastTarget === target);
1843
+ var sibling;
1844
+ if (direction !== 0) {
1845
+ // Check if target is beside dragEl in respective direction (ignoring hidden elements)
1846
+ var dragIndex = index(dragEl);
1847
+ do {
1848
+ dragIndex -= direction;
1849
+ sibling = parentEl.children[dragIndex];
1850
+ } while (sibling && (css(sibling, 'display') === 'none' || sibling === ghostEl));
1851
+ }
1852
+ // If dragEl is already beside target: Do not insert
1853
+ if (direction === 0 || sibling === target) {
1854
+ return completed(false);
1855
+ }
1856
+ lastTarget = target;
1857
+ lastDirection = direction;
1858
+ var nextSibling = target.nextElementSibling,
1859
+ after = false;
1860
+ after = direction === 1;
1861
+ var moveVector = _onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, after);
1862
+ if (moveVector !== false) {
1863
+ if (moveVector === 1 || moveVector === -1) {
1864
+ after = moveVector === 1;
1865
+ }
1866
+ _silent = true;
1867
+ setTimeout(_unsilent, 30);
1868
+ capture();
1869
+ if (after && !nextSibling) {
1870
+ el.appendChild(dragEl);
1871
+ } else {
1872
+ target.parentNode.insertBefore(dragEl, after ? nextSibling : target);
1873
+ }
1874
+
1875
+ // Undo chrome's scroll adjustment (has no effect on other browsers)
1876
+ if (scrolledPastTop) {
1877
+ scrollBy(scrolledPastTop, 0, scrollBefore - scrolledPastTop.scrollTop);
1878
+ }
1879
+ parentEl = dragEl.parentNode; // actualization
1880
+
1881
+ // must be done before animation
1882
+ if (targetBeforeFirstSwap !== undefined && !isCircumstantialInvert) {
1883
+ targetMoveDistance = Math.abs(targetBeforeFirstSwap - getRect(target)[side1]);
1884
+ }
1885
+ changed();
1886
+ return completed(true);
1887
+ }
1888
+ }
1889
+ if (el.contains(dragEl)) {
1890
+ return completed(false);
1891
+ }
1892
+ }
1893
+ return false;
1894
+ },
1895
+ _ignoreWhileAnimating: null,
1896
+ _offMoveEvents: function _offMoveEvents() {
1897
+ off(document, 'mousemove', this._onTouchMove);
1898
+ off(document, 'touchmove', this._onTouchMove);
1899
+ off(document, 'pointermove', this._onTouchMove);
1900
+ off(document, 'dragover', nearestEmptyInsertDetectEvent);
1901
+ off(document, 'mousemove', nearestEmptyInsertDetectEvent);
1902
+ off(document, 'touchmove', nearestEmptyInsertDetectEvent);
1903
+ },
1904
+ _offUpEvents: function _offUpEvents() {
1905
+ var ownerDocument = this.el.ownerDocument;
1906
+ off(ownerDocument, 'mouseup', this._onDrop);
1907
+ off(ownerDocument, 'touchend', this._onDrop);
1908
+ off(ownerDocument, 'pointerup', this._onDrop);
1909
+ off(ownerDocument, 'pointercancel', this._onDrop);
1910
+ off(ownerDocument, 'touchcancel', this._onDrop);
1911
+ off(document, 'selectstart', this);
1912
+ },
1913
+ _onDrop: function _onDrop( /**Event*/evt) {
1914
+ var el = this.el,
1915
+ options = this.options;
1916
+
1917
+ // Get the index of the dragged element within its parent
1918
+ newIndex = index(dragEl);
1919
+ newDraggableIndex = index(dragEl, options.draggable);
1920
+ pluginEvent('drop', this, {
1921
+ evt: evt
1922
+ });
1923
+ parentEl = dragEl && dragEl.parentNode;
1924
+
1925
+ // Get again after plugin event
1926
+ newIndex = index(dragEl);
1927
+ newDraggableIndex = index(dragEl, options.draggable);
1928
+ if (Sortable.eventCanceled) {
1929
+ this._nulling();
1930
+ return;
1931
+ }
1932
+ awaitingDragStarted = false;
1933
+ isCircumstantialInvert = false;
1934
+ pastFirstInvertThresh = false;
1935
+ clearInterval(this._loopId);
1936
+ clearTimeout(this._dragStartTimer);
1937
+ _cancelNextTick(this.cloneId);
1938
+ _cancelNextTick(this._dragStartId);
1939
+
1940
+ // Unbind events
1941
+ if (this.nativeDraggable) {
1942
+ off(document, 'drop', this);
1943
+ off(el, 'dragstart', this._onDragStart);
1944
+ }
1945
+ this._offMoveEvents();
1946
+ this._offUpEvents();
1947
+ if (Safari) {
1948
+ css(document.body, 'user-select', '');
1949
+ }
1950
+ css(dragEl, 'transform', '');
1951
+ if (evt) {
1952
+ if (moved) {
1953
+ evt.cancelable && evt.preventDefault();
1954
+ !options.dropBubble && evt.stopPropagation();
1955
+ }
1956
+ ghostEl && ghostEl.parentNode && ghostEl.parentNode.removeChild(ghostEl);
1957
+ if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== 'clone') {
1958
+ // Remove clone(s)
1959
+ cloneEl && cloneEl.parentNode && cloneEl.parentNode.removeChild(cloneEl);
1960
+ }
1961
+ if (dragEl) {
1962
+ if (this.nativeDraggable) {
1963
+ off(dragEl, 'dragend', this);
1964
+ }
1965
+ _disableDraggable(dragEl);
1966
+ dragEl.style['will-change'] = '';
1967
+
1968
+ // Remove classes
1969
+ // ghostClass is added in dragStarted
1970
+ if (moved && !awaitingDragStarted) {
1971
+ toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : this.options.ghostClass, false);
1972
+ }
1973
+ toggleClass(dragEl, this.options.chosenClass, false);
1974
+
1975
+ // Drag stop event
1976
+ _dispatchEvent({
1977
+ sortable: this,
1978
+ name: 'unchoose',
1979
+ toEl: parentEl,
1980
+ newIndex: null,
1981
+ newDraggableIndex: null,
1982
+ originalEvent: evt
1983
+ });
1984
+ if (rootEl !== parentEl) {
1985
+ if (newIndex >= 0) {
1986
+ // Add event
1987
+ _dispatchEvent({
1988
+ rootEl: parentEl,
1989
+ name: 'add',
1990
+ toEl: parentEl,
1991
+ fromEl: rootEl,
1992
+ originalEvent: evt
1993
+ });
1994
+
1995
+ // Remove event
1996
+ _dispatchEvent({
1997
+ sortable: this,
1998
+ name: 'remove',
1999
+ toEl: parentEl,
2000
+ originalEvent: evt
2001
+ });
2002
+
2003
+ // drag from one list and drop into another
2004
+ _dispatchEvent({
2005
+ rootEl: parentEl,
2006
+ name: 'sort',
2007
+ toEl: parentEl,
2008
+ fromEl: rootEl,
2009
+ originalEvent: evt
2010
+ });
2011
+ _dispatchEvent({
2012
+ sortable: this,
2013
+ name: 'sort',
2014
+ toEl: parentEl,
2015
+ originalEvent: evt
2016
+ });
2017
+ }
2018
+ putSortable && putSortable.save();
2019
+ } else {
2020
+ if (newIndex !== oldIndex) {
2021
+ if (newIndex >= 0) {
2022
+ // drag & drop within the same list
2023
+ _dispatchEvent({
2024
+ sortable: this,
2025
+ name: 'update',
2026
+ toEl: parentEl,
2027
+ originalEvent: evt
2028
+ });
2029
+ _dispatchEvent({
2030
+ sortable: this,
2031
+ name: 'sort',
2032
+ toEl: parentEl,
2033
+ originalEvent: evt
2034
+ });
2035
+ }
2036
+ }
2037
+ }
2038
+ if (Sortable.active) {
2039
+ /* jshint eqnull:true */
2040
+ if (newIndex == null || newIndex === -1) {
2041
+ newIndex = oldIndex;
2042
+ newDraggableIndex = oldDraggableIndex;
2043
+ }
2044
+ _dispatchEvent({
2045
+ sortable: this,
2046
+ name: 'end',
2047
+ toEl: parentEl,
2048
+ originalEvent: evt
2049
+ });
2050
+
2051
+ // Save sorting
2052
+ this.save();
2053
+ }
2054
+ }
2055
+ }
2056
+ this._nulling();
2057
+ },
2058
+ _nulling: function _nulling() {
2059
+ pluginEvent('nulling', this);
2060
+ rootEl = dragEl = parentEl = ghostEl = nextEl = cloneEl = lastDownEl = cloneHidden = tapEvt = touchEvt = moved = newIndex = newDraggableIndex = oldIndex = oldDraggableIndex = lastTarget = lastDirection = putSortable = activeGroup = Sortable.dragged = Sortable.ghost = Sortable.clone = Sortable.active = null;
2061
+ savedInputChecked.forEach(function (el) {
2062
+ el.checked = true;
2063
+ });
2064
+ savedInputChecked.length = lastDx = lastDy = 0;
2065
+ },
2066
+ handleEvent: function handleEvent( /**Event*/evt) {
2067
+ switch (evt.type) {
2068
+ case 'drop':
2069
+ case 'dragend':
2070
+ this._onDrop(evt);
2071
+ break;
2072
+ case 'dragenter':
2073
+ case 'dragover':
2074
+ if (dragEl) {
2075
+ this._onDragOver(evt);
2076
+ _globalDragOver(evt);
2077
+ }
2078
+ break;
2079
+ case 'selectstart':
2080
+ evt.preventDefault();
2081
+ break;
2082
+ }
2083
+ },
2084
+ /**
2085
+ * Serializes the item into an array of string.
2086
+ * @returns {String[]}
2087
+ */
2088
+ toArray: function toArray() {
2089
+ var order = [],
2090
+ el,
2091
+ children = this.el.children,
2092
+ i = 0,
2093
+ n = children.length,
2094
+ options = this.options;
2095
+ for (; i < n; i++) {
2096
+ el = children[i];
2097
+ if (closest(el, options.draggable, this.el, false)) {
2098
+ order.push(el.getAttribute(options.dataIdAttr) || _generateId(el));
2099
+ }
2100
+ }
2101
+ return order;
2102
+ },
2103
+ /**
2104
+ * Sorts the elements according to the array.
2105
+ * @param {String[]} order order of the items
2106
+ */
2107
+ sort: function sort(order, useAnimation) {
2108
+ var items = {},
2109
+ rootEl = this.el;
2110
+ this.toArray().forEach(function (id, i) {
2111
+ var el = rootEl.children[i];
2112
+ if (closest(el, this.options.draggable, rootEl, false)) {
2113
+ items[id] = el;
2114
+ }
2115
+ }, this);
2116
+ useAnimation && this.captureAnimationState();
2117
+ order.forEach(function (id) {
2118
+ if (items[id]) {
2119
+ rootEl.removeChild(items[id]);
2120
+ rootEl.appendChild(items[id]);
2121
+ }
2122
+ });
2123
+ useAnimation && this.animateAll();
2124
+ },
2125
+ /**
2126
+ * Save the current sorting
2127
+ */
2128
+ save: function save() {
2129
+ var store = this.options.store;
2130
+ store && store.set && store.set(this);
2131
+ },
2132
+ /**
2133
+ * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.
2134
+ * @param {HTMLElement} el
2135
+ * @param {String} [selector] default: `options.draggable`
2136
+ * @returns {HTMLElement|null}
2137
+ */
2138
+ closest: function closest$1(el, selector) {
2139
+ return closest(el, selector || this.options.draggable, this.el, false);
2140
+ },
2141
+ /**
2142
+ * Set/get option
2143
+ * @param {string} name
2144
+ * @param {*} [value]
2145
+ * @returns {*}
2146
+ */
2147
+ option: function option(name, value) {
2148
+ var options = this.options;
2149
+ if (value === void 0) {
2150
+ return options[name];
2151
+ } else {
2152
+ var modifiedValue = PluginManager.modifyOption(this, name, value);
2153
+ if (typeof modifiedValue !== 'undefined') {
2154
+ options[name] = modifiedValue;
2155
+ } else {
2156
+ options[name] = value;
2157
+ }
2158
+ if (name === 'group') {
2159
+ _prepareGroup(options);
2160
+ }
2161
+ }
2162
+ },
2163
+ /**
2164
+ * Destroy
2165
+ */
2166
+ destroy: function destroy() {
2167
+ pluginEvent('destroy', this);
2168
+ var el = this.el;
2169
+ el[expando] = null;
2170
+ off(el, 'mousedown', this._onTapStart);
2171
+ off(el, 'touchstart', this._onTapStart);
2172
+ off(el, 'pointerdown', this._onTapStart);
2173
+ if (this.nativeDraggable) {
2174
+ off(el, 'dragover', this);
2175
+ off(el, 'dragenter', this);
2176
+ }
2177
+ // Remove draggable attributes
2178
+ Array.prototype.forEach.call(el.querySelectorAll('[draggable]'), function (el) {
2179
+ el.removeAttribute('draggable');
2180
+ });
2181
+ this._onDrop();
2182
+ this._disableDelayedDragEvents();
2183
+ sortables.splice(sortables.indexOf(this.el), 1);
2184
+ this.el = el = null;
2185
+ },
2186
+ _hideClone: function _hideClone() {
2187
+ if (!cloneHidden) {
2188
+ pluginEvent('hideClone', this);
2189
+ if (Sortable.eventCanceled) return;
2190
+ css(cloneEl, 'display', 'none');
2191
+ if (this.options.removeCloneOnHide && cloneEl.parentNode) {
2192
+ cloneEl.parentNode.removeChild(cloneEl);
2193
+ }
2194
+ cloneHidden = true;
2195
+ }
2196
+ },
2197
+ _showClone: function _showClone(putSortable) {
2198
+ if (putSortable.lastPutMode !== 'clone') {
2199
+ this._hideClone();
2200
+ return;
2201
+ }
2202
+ if (cloneHidden) {
2203
+ pluginEvent('showClone', this);
2204
+ if (Sortable.eventCanceled) return;
2205
+
2206
+ // show clone at dragEl or original position
2207
+ if (dragEl.parentNode == rootEl && !this.options.group.revertClone) {
2208
+ rootEl.insertBefore(cloneEl, dragEl);
2209
+ } else if (nextEl) {
2210
+ rootEl.insertBefore(cloneEl, nextEl);
2211
+ } else {
2212
+ rootEl.appendChild(cloneEl);
2213
+ }
2214
+ if (this.options.group.revertClone) {
2215
+ this.animate(dragEl, cloneEl);
2216
+ }
2217
+ css(cloneEl, 'display', '');
2218
+ cloneHidden = false;
2219
+ }
2220
+ }
2221
+ };
2222
+ function _globalDragOver( /**Event*/evt) {
2223
+ if (evt.dataTransfer) {
2224
+ evt.dataTransfer.dropEffect = 'move';
2225
+ }
2226
+ evt.cancelable && evt.preventDefault();
2227
+ }
2228
+ function _onMove(fromEl, toEl, dragEl, dragRect, targetEl, targetRect, originalEvent, willInsertAfter) {
2229
+ var evt,
2230
+ sortable = fromEl[expando],
2231
+ onMoveFn = sortable.options.onMove,
2232
+ retVal;
2233
+ // Support for new CustomEvent feature
2234
+ if (window.CustomEvent && !IE11OrLess && !Edge) {
2235
+ evt = new CustomEvent('move', {
2236
+ bubbles: true,
2237
+ cancelable: true
2238
+ });
2239
+ } else {
2240
+ evt = document.createEvent('Event');
2241
+ evt.initEvent('move', true, true);
2242
+ }
2243
+ evt.to = toEl;
2244
+ evt.from = fromEl;
2245
+ evt.dragged = dragEl;
2246
+ evt.draggedRect = dragRect;
2247
+ evt.related = targetEl || toEl;
2248
+ evt.relatedRect = targetRect || getRect(toEl);
2249
+ evt.willInsertAfter = willInsertAfter;
2250
+ evt.originalEvent = originalEvent;
2251
+ fromEl.dispatchEvent(evt);
2252
+ if (onMoveFn) {
2253
+ retVal = onMoveFn.call(sortable, evt, originalEvent);
2254
+ }
2255
+ return retVal;
2256
+ }
2257
+ function _disableDraggable(el) {
2258
+ el.draggable = false;
2259
+ }
2260
+ function _unsilent() {
2261
+ _silent = false;
2262
+ }
2263
+ function _ghostIsFirst(evt, vertical, sortable) {
2264
+ var firstElRect = getRect(getChild(sortable.el, 0, sortable.options, true));
2265
+ var childContainingRect = getChildContainingRectFromElement(sortable.el, sortable.options, ghostEl);
2266
+ var spacer = 10;
2267
+ return vertical ? evt.clientX < childContainingRect.left - spacer || evt.clientY < firstElRect.top && evt.clientX < firstElRect.right : evt.clientY < childContainingRect.top - spacer || evt.clientY < firstElRect.bottom && evt.clientX < firstElRect.left;
2268
+ }
2269
+ function _ghostIsLast(evt, vertical, sortable) {
2270
+ var lastElRect = getRect(lastChild(sortable.el, sortable.options.draggable));
2271
+ var childContainingRect = getChildContainingRectFromElement(sortable.el, sortable.options, ghostEl);
2272
+ var spacer = 10;
2273
+ return vertical ? evt.clientX > childContainingRect.right + spacer || evt.clientY > lastElRect.bottom && evt.clientX > lastElRect.left : evt.clientY > childContainingRect.bottom + spacer || evt.clientX > lastElRect.right && evt.clientY > lastElRect.top;
2274
+ }
2275
+ function _getSwapDirection(evt, target, targetRect, vertical, swapThreshold, invertedSwapThreshold, invertSwap, isLastTarget) {
2276
+ var mouseOnAxis = vertical ? evt.clientY : evt.clientX,
2277
+ targetLength = vertical ? targetRect.height : targetRect.width,
2278
+ targetS1 = vertical ? targetRect.top : targetRect.left,
2279
+ targetS2 = vertical ? targetRect.bottom : targetRect.right,
2280
+ invert = false;
2281
+ if (!invertSwap) {
2282
+ // Never invert or create dragEl shadow when target movemenet causes mouse to move past the end of regular swapThreshold
2283
+ if (isLastTarget && targetMoveDistance < targetLength * swapThreshold) {
2284
+ // multiplied only by swapThreshold because mouse will already be inside target by (1 - threshold) * targetLength / 2
2285
+ // check if past first invert threshold on side opposite of lastDirection
2286
+ if (!pastFirstInvertThresh && (lastDirection === 1 ? mouseOnAxis > targetS1 + targetLength * invertedSwapThreshold / 2 : mouseOnAxis < targetS2 - targetLength * invertedSwapThreshold / 2)) {
2287
+ // past first invert threshold, do not restrict inverted threshold to dragEl shadow
2288
+ pastFirstInvertThresh = true;
2289
+ }
2290
+ if (!pastFirstInvertThresh) {
2291
+ // dragEl shadow (target move distance shadow)
2292
+ if (lastDirection === 1 ? mouseOnAxis < targetS1 + targetMoveDistance // over dragEl shadow
2293
+ : mouseOnAxis > targetS2 - targetMoveDistance) {
2294
+ return -lastDirection;
2295
+ }
2296
+ } else {
2297
+ invert = true;
2298
+ }
2299
+ } else {
2300
+ // Regular
2301
+ if (mouseOnAxis > targetS1 + targetLength * (1 - swapThreshold) / 2 && mouseOnAxis < targetS2 - targetLength * (1 - swapThreshold) / 2) {
2302
+ return _getInsertDirection(target);
2303
+ }
2304
+ }
2305
+ }
2306
+ invert = invert || invertSwap;
2307
+ if (invert) {
2308
+ // Invert of regular
2309
+ if (mouseOnAxis < targetS1 + targetLength * invertedSwapThreshold / 2 || mouseOnAxis > targetS2 - targetLength * invertedSwapThreshold / 2) {
2310
+ return mouseOnAxis > targetS1 + targetLength / 2 ? 1 : -1;
2311
+ }
2312
+ }
2313
+ return 0;
2314
+ }
2315
+
2316
+ /**
2317
+ * Gets the direction dragEl must be swapped relative to target in order to make it
2318
+ * seem that dragEl has been "inserted" into that element's position
2319
+ * @param {HTMLElement} target The target whose position dragEl is being inserted at
2320
+ * @return {Number} Direction dragEl must be swapped
2321
+ */
2322
+ function _getInsertDirection(target) {
2323
+ if (index(dragEl) < index(target)) {
2324
+ return 1;
2325
+ } else {
2326
+ return -1;
2327
+ }
2328
+ }
2329
+
2330
+ /**
2331
+ * Generate id
2332
+ * @param {HTMLElement} el
2333
+ * @returns {String}
2334
+ * @private
2335
+ */
2336
+ function _generateId(el) {
2337
+ var str = el.tagName + el.className + el.src + el.href + el.textContent,
2338
+ i = str.length,
2339
+ sum = 0;
2340
+ while (i--) {
2341
+ sum += str.charCodeAt(i);
2342
+ }
2343
+ return sum.toString(36);
2344
+ }
2345
+ function _saveInputCheckedState(root) {
2346
+ savedInputChecked.length = 0;
2347
+ var inputs = root.getElementsByTagName('input');
2348
+ var idx = inputs.length;
2349
+ while (idx--) {
2350
+ var el = inputs[idx];
2351
+ el.checked && savedInputChecked.push(el);
2352
+ }
2353
+ }
2354
+ function _nextTick(fn) {
2355
+ return setTimeout(fn, 0);
2356
+ }
2357
+ function _cancelNextTick(id) {
2358
+ return clearTimeout(id);
2359
+ }
2360
+
2361
+ // Fixed #973:
2362
+ if (documentExists) {
2363
+ on(document, 'touchmove', function (evt) {
2364
+ if ((Sortable.active || awaitingDragStarted) && evt.cancelable) {
2365
+ evt.preventDefault();
2366
+ }
2367
+ });
2368
+ }
2369
+
2370
+ // Export utils
2371
+ Sortable.utils = {
2372
+ on: on,
2373
+ off: off,
2374
+ css: css,
2375
+ find: find,
2376
+ is: function is(el, selector) {
2377
+ return !!closest(el, selector, el, false);
2378
+ },
2379
+ extend: extend,
2380
+ throttle: throttle,
2381
+ closest: closest,
2382
+ toggleClass: toggleClass,
2383
+ clone: clone,
2384
+ index: index,
2385
+ nextTick: _nextTick,
2386
+ cancelNextTick: _cancelNextTick,
2387
+ detectDirection: _detectDirection,
2388
+ getChild: getChild,
2389
+ expando: expando
2390
+ };
2391
+
2392
+ /**
2393
+ * Get the Sortable instance of an element
2394
+ * @param {HTMLElement} element The element
2395
+ * @return {Sortable|undefined} The instance of Sortable
2396
+ */
2397
+ Sortable.get = function (element) {
2398
+ return element[expando];
2399
+ };
2400
+
2401
+ /**
2402
+ * Mount a plugin to Sortable
2403
+ * @param {...SortablePlugin|SortablePlugin[]} plugins Plugins being mounted
2404
+ */
2405
+ Sortable.mount = function () {
2406
+ for (var _len = arguments.length, plugins = new Array(_len), _key = 0; _key < _len; _key++) {
2407
+ plugins[_key] = arguments[_key];
2408
+ }
2409
+ if (plugins[0].constructor === Array) plugins = plugins[0];
2410
+ plugins.forEach(function (plugin) {
2411
+ if (!plugin.prototype || !plugin.prototype.constructor) {
2412
+ throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(plugin));
2413
+ }
2414
+ if (plugin.utils) Sortable.utils = _objectSpread2(_objectSpread2({}, Sortable.utils), plugin.utils);
2415
+ PluginManager.mount(plugin);
2416
+ });
2417
+ };
2418
+
2419
+ /**
2420
+ * Create sortable instance
2421
+ * @param {HTMLElement} el
2422
+ * @param {Object} [options]
2423
+ */
2424
+ Sortable.create = function (el, options) {
2425
+ return new Sortable(el, options);
2426
+ };
2427
+
2428
+ // Export
2429
+ Sortable.version = version;
2430
+
2431
+ var autoScrolls = [],
2432
+ scrollEl,
2433
+ scrollRootEl,
2434
+ scrolling = false,
2435
+ lastAutoScrollX,
2436
+ lastAutoScrollY,
2437
+ touchEvt$1,
2438
+ pointerElemChangedInterval;
2439
+ function AutoScrollPlugin() {
2440
+ function AutoScroll() {
2441
+ this.defaults = {
2442
+ scroll: true,
2443
+ forceAutoScrollFallback: false,
2444
+ scrollSensitivity: 30,
2445
+ scrollSpeed: 10,
2446
+ bubbleScroll: true
2447
+ };
2448
+
2449
+ // Bind all private methods
2450
+ for (var fn in this) {
2451
+ if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {
2452
+ this[fn] = this[fn].bind(this);
2453
+ }
2454
+ }
2455
+ }
2456
+ AutoScroll.prototype = {
2457
+ dragStarted: function dragStarted(_ref) {
2458
+ var originalEvent = _ref.originalEvent;
2459
+ if (this.sortable.nativeDraggable) {
2460
+ on(document, 'dragover', this._handleAutoScroll);
2461
+ } else {
2462
+ if (this.options.supportPointer) {
2463
+ on(document, 'pointermove', this._handleFallbackAutoScroll);
2464
+ } else if (originalEvent.touches) {
2465
+ on(document, 'touchmove', this._handleFallbackAutoScroll);
2466
+ } else {
2467
+ on(document, 'mousemove', this._handleFallbackAutoScroll);
2468
+ }
2469
+ }
2470
+ },
2471
+ dragOverCompleted: function dragOverCompleted(_ref2) {
2472
+ var originalEvent = _ref2.originalEvent;
2473
+ // For when bubbling is canceled and using fallback (fallback 'touchmove' always reached)
2474
+ if (!this.options.dragOverBubble && !originalEvent.rootEl) {
2475
+ this._handleAutoScroll(originalEvent);
2476
+ }
2477
+ },
2478
+ drop: function drop() {
2479
+ if (this.sortable.nativeDraggable) {
2480
+ off(document, 'dragover', this._handleAutoScroll);
2481
+ } else {
2482
+ off(document, 'pointermove', this._handleFallbackAutoScroll);
2483
+ off(document, 'touchmove', this._handleFallbackAutoScroll);
2484
+ off(document, 'mousemove', this._handleFallbackAutoScroll);
2485
+ }
2486
+ clearPointerElemChangedInterval();
2487
+ clearAutoScrolls();
2488
+ cancelThrottle();
2489
+ },
2490
+ nulling: function nulling() {
2491
+ touchEvt$1 = scrollRootEl = scrollEl = scrolling = pointerElemChangedInterval = lastAutoScrollX = lastAutoScrollY = null;
2492
+ autoScrolls.length = 0;
2493
+ },
2494
+ _handleFallbackAutoScroll: function _handleFallbackAutoScroll(evt) {
2495
+ this._handleAutoScroll(evt, true);
2496
+ },
2497
+ _handleAutoScroll: function _handleAutoScroll(evt, fallback) {
2498
+ var _this = this;
2499
+ var x = (evt.touches ? evt.touches[0] : evt).clientX,
2500
+ y = (evt.touches ? evt.touches[0] : evt).clientY,
2501
+ elem = document.elementFromPoint(x, y);
2502
+ touchEvt$1 = evt;
2503
+
2504
+ // IE does not seem to have native autoscroll,
2505
+ // Edge's autoscroll seems too conditional,
2506
+ // MACOS Safari does not have autoscroll,
2507
+ // Firefox and Chrome are good
2508
+ if (fallback || this.options.forceAutoScrollFallback || Edge || IE11OrLess || Safari) {
2509
+ autoScroll(evt, this.options, elem, fallback);
2510
+
2511
+ // Listener for pointer element change
2512
+ var ogElemScroller = getParentAutoScrollElement(elem, true);
2513
+ if (scrolling && (!pointerElemChangedInterval || x !== lastAutoScrollX || y !== lastAutoScrollY)) {
2514
+ pointerElemChangedInterval && clearPointerElemChangedInterval();
2515
+ // Detect for pointer elem change, emulating native DnD behaviour
2516
+ pointerElemChangedInterval = setInterval(function () {
2517
+ var newElem = getParentAutoScrollElement(document.elementFromPoint(x, y), true);
2518
+ if (newElem !== ogElemScroller) {
2519
+ ogElemScroller = newElem;
2520
+ clearAutoScrolls();
2521
+ }
2522
+ autoScroll(evt, _this.options, newElem, fallback);
2523
+ }, 10);
2524
+ lastAutoScrollX = x;
2525
+ lastAutoScrollY = y;
2526
+ }
2527
+ } else {
2528
+ // if DnD is enabled (and browser has good autoscrolling), first autoscroll will already scroll, so get parent autoscroll of first autoscroll
2529
+ if (!this.options.bubbleScroll || getParentAutoScrollElement(elem, true) === getWindowScrollingElement()) {
2530
+ clearAutoScrolls();
2531
+ return;
2532
+ }
2533
+ autoScroll(evt, this.options, getParentAutoScrollElement(elem, false), false);
2534
+ }
2535
+ }
2536
+ };
2537
+ return _extends(AutoScroll, {
2538
+ pluginName: 'scroll',
2539
+ initializeByDefault: true
2540
+ });
2541
+ }
2542
+ function clearAutoScrolls() {
2543
+ autoScrolls.forEach(function (autoScroll) {
2544
+ clearInterval(autoScroll.pid);
2545
+ });
2546
+ autoScrolls = [];
2547
+ }
2548
+ function clearPointerElemChangedInterval() {
2549
+ clearInterval(pointerElemChangedInterval);
2550
+ }
2551
+ var autoScroll = throttle(function (evt, options, rootEl, isFallback) {
2552
+ // Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=505521
2553
+ if (!options.scroll) return;
2554
+ var x = (evt.touches ? evt.touches[0] : evt).clientX,
2555
+ y = (evt.touches ? evt.touches[0] : evt).clientY,
2556
+ sens = options.scrollSensitivity,
2557
+ speed = options.scrollSpeed,
2558
+ winScroller = getWindowScrollingElement();
2559
+ var scrollThisInstance = false,
2560
+ scrollCustomFn;
2561
+
2562
+ // New scroll root, set scrollEl
2563
+ if (scrollRootEl !== rootEl) {
2564
+ scrollRootEl = rootEl;
2565
+ clearAutoScrolls();
2566
+ scrollEl = options.scroll;
2567
+ scrollCustomFn = options.scrollFn;
2568
+ if (scrollEl === true) {
2569
+ scrollEl = getParentAutoScrollElement(rootEl, true);
2570
+ }
2571
+ }
2572
+ var layersOut = 0;
2573
+ var currentParent = scrollEl;
2574
+ do {
2575
+ var el = currentParent,
2576
+ rect = getRect(el),
2577
+ top = rect.top,
2578
+ bottom = rect.bottom,
2579
+ left = rect.left,
2580
+ right = rect.right,
2581
+ width = rect.width,
2582
+ height = rect.height,
2583
+ canScrollX = void 0,
2584
+ canScrollY = void 0,
2585
+ scrollWidth = el.scrollWidth,
2586
+ scrollHeight = el.scrollHeight,
2587
+ elCSS = css(el),
2588
+ scrollPosX = el.scrollLeft,
2589
+ scrollPosY = el.scrollTop;
2590
+ if (el === winScroller) {
2591
+ canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll' || elCSS.overflowX === 'visible');
2592
+ canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll' || elCSS.overflowY === 'visible');
2593
+ } else {
2594
+ canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll');
2595
+ canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll');
2596
+ }
2597
+ var vx = canScrollX && (Math.abs(right - x) <= sens && scrollPosX + width < scrollWidth) - (Math.abs(left - x) <= sens && !!scrollPosX);
2598
+ var vy = canScrollY && (Math.abs(bottom - y) <= sens && scrollPosY + height < scrollHeight) - (Math.abs(top - y) <= sens && !!scrollPosY);
2599
+ if (!autoScrolls[layersOut]) {
2600
+ for (var i = 0; i <= layersOut; i++) {
2601
+ if (!autoScrolls[i]) {
2602
+ autoScrolls[i] = {};
2603
+ }
2604
+ }
2605
+ }
2606
+ if (autoScrolls[layersOut].vx != vx || autoScrolls[layersOut].vy != vy || autoScrolls[layersOut].el !== el) {
2607
+ autoScrolls[layersOut].el = el;
2608
+ autoScrolls[layersOut].vx = vx;
2609
+ autoScrolls[layersOut].vy = vy;
2610
+ clearInterval(autoScrolls[layersOut].pid);
2611
+ if (vx != 0 || vy != 0) {
2612
+ scrollThisInstance = true;
2613
+ /* jshint loopfunc:true */
2614
+ autoScrolls[layersOut].pid = setInterval(function () {
2615
+ // emulate drag over during autoscroll (fallback), emulating native DnD behaviour
2616
+ if (isFallback && this.layer === 0) {
2617
+ Sortable.active._onTouchMove(touchEvt$1); // To move ghost if it is positioned absolutely
2618
+ }
2619
+ var scrollOffsetY = autoScrolls[this.layer].vy ? autoScrolls[this.layer].vy * speed : 0;
2620
+ var scrollOffsetX = autoScrolls[this.layer].vx ? autoScrolls[this.layer].vx * speed : 0;
2621
+ if (typeof scrollCustomFn === 'function') {
2622
+ if (scrollCustomFn.call(Sortable.dragged.parentNode[expando], scrollOffsetX, scrollOffsetY, evt, touchEvt$1, autoScrolls[this.layer].el) !== 'continue') {
2623
+ return;
2624
+ }
2625
+ }
2626
+ scrollBy(autoScrolls[this.layer].el, scrollOffsetX, scrollOffsetY);
2627
+ }.bind({
2628
+ layer: layersOut
2629
+ }), 24);
2630
+ }
2631
+ }
2632
+ layersOut++;
2633
+ } while (options.bubbleScroll && currentParent !== winScroller && (currentParent = getParentAutoScrollElement(currentParent, false)));
2634
+ scrolling = scrollThisInstance; // in case another function catches scrolling as false in between when it is not
2635
+ }, 30);
2636
+
2637
+ var drop = function drop(_ref) {
2638
+ var originalEvent = _ref.originalEvent,
2639
+ putSortable = _ref.putSortable,
2640
+ dragEl = _ref.dragEl,
2641
+ activeSortable = _ref.activeSortable,
2642
+ dispatchSortableEvent = _ref.dispatchSortableEvent,
2643
+ hideGhostForTarget = _ref.hideGhostForTarget,
2644
+ unhideGhostForTarget = _ref.unhideGhostForTarget;
2645
+ if (!originalEvent) return;
2646
+ var toSortable = putSortable || activeSortable;
2647
+ hideGhostForTarget();
2648
+ var touch = originalEvent.changedTouches && originalEvent.changedTouches.length ? originalEvent.changedTouches[0] : originalEvent;
2649
+ var target = document.elementFromPoint(touch.clientX, touch.clientY);
2650
+ unhideGhostForTarget();
2651
+ if (toSortable && !toSortable.el.contains(target)) {
2652
+ dispatchSortableEvent('spill');
2653
+ this.onSpill({
2654
+ dragEl: dragEl,
2655
+ putSortable: putSortable
2656
+ });
2657
+ }
2658
+ };
2659
+ function Revert() {}
2660
+ Revert.prototype = {
2661
+ startIndex: null,
2662
+ dragStart: function dragStart(_ref2) {
2663
+ var oldDraggableIndex = _ref2.oldDraggableIndex;
2664
+ this.startIndex = oldDraggableIndex;
2665
+ },
2666
+ onSpill: function onSpill(_ref3) {
2667
+ var dragEl = _ref3.dragEl,
2668
+ putSortable = _ref3.putSortable;
2669
+ this.sortable.captureAnimationState();
2670
+ if (putSortable) {
2671
+ putSortable.captureAnimationState();
2672
+ }
2673
+ var nextSibling = getChild(this.sortable.el, this.startIndex, this.options);
2674
+ if (nextSibling) {
2675
+ this.sortable.el.insertBefore(dragEl, nextSibling);
2676
+ } else {
2677
+ this.sortable.el.appendChild(dragEl);
2678
+ }
2679
+ this.sortable.animateAll();
2680
+ if (putSortable) {
2681
+ putSortable.animateAll();
2682
+ }
2683
+ },
2684
+ drop: drop
2685
+ };
2686
+ _extends(Revert, {
2687
+ pluginName: 'revertOnSpill'
2688
+ });
2689
+ function Remove() {}
2690
+ Remove.prototype = {
2691
+ onSpill: function onSpill(_ref4) {
2692
+ var dragEl = _ref4.dragEl,
2693
+ putSortable = _ref4.putSortable;
2694
+ var parentSortable = putSortable || this.sortable;
2695
+ parentSortable.captureAnimationState();
2696
+ dragEl.parentNode && dragEl.parentNode.removeChild(dragEl);
2697
+ parentSortable.animateAll();
2698
+ },
2699
+ drop: drop
2700
+ };
2701
+ _extends(Remove, {
2702
+ pluginName: 'removeOnSpill'
2703
+ });
2704
+
2705
+ var multiDragElements = [],
2706
+ multiDragClones = [],
2707
+ lastMultiDragSelect,
2708
+ // for selection with modifier key down (SHIFT)
2709
+ multiDragSortable,
2710
+ initialFolding = false,
2711
+ // Initial multi-drag fold when drag started
2712
+ folding = false,
2713
+ // Folding any other time
2714
+ dragStarted = false,
2715
+ dragEl$1,
2716
+ clonesFromRect,
2717
+ clonesHidden;
2718
+ function MultiDragPlugin() {
2719
+ function MultiDrag(sortable) {
2720
+ // Bind all private methods
2721
+ for (var fn in this) {
2722
+ if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {
2723
+ this[fn] = this[fn].bind(this);
2724
+ }
2725
+ }
2726
+ if (!sortable.options.avoidImplicitDeselect) {
2727
+ if (sortable.options.supportPointer) {
2728
+ on(document, 'pointerup', this._deselectMultiDrag);
2729
+ } else {
2730
+ on(document, 'mouseup', this._deselectMultiDrag);
2731
+ on(document, 'touchend', this._deselectMultiDrag);
2732
+ }
2733
+ }
2734
+ on(document, 'keydown', this._checkKeyDown);
2735
+ on(document, 'keyup', this._checkKeyUp);
2736
+ this.defaults = {
2737
+ selectedClass: 'sortable-selected',
2738
+ multiDragKey: null,
2739
+ avoidImplicitDeselect: false,
2740
+ setData: function setData(dataTransfer, dragEl) {
2741
+ var data = '';
2742
+ if (multiDragElements.length && multiDragSortable === sortable) {
2743
+ multiDragElements.forEach(function (multiDragElement, i) {
2744
+ data += (!i ? '' : ', ') + multiDragElement.textContent;
2745
+ });
2746
+ } else {
2747
+ data = dragEl.textContent;
2748
+ }
2749
+ dataTransfer.setData('Text', data);
2750
+ }
2751
+ };
2752
+ }
2753
+ MultiDrag.prototype = {
2754
+ multiDragKeyDown: false,
2755
+ isMultiDrag: false,
2756
+ delayStartGlobal: function delayStartGlobal(_ref) {
2757
+ var dragged = _ref.dragEl;
2758
+ dragEl$1 = dragged;
2759
+ },
2760
+ delayEnded: function delayEnded() {
2761
+ this.isMultiDrag = ~multiDragElements.indexOf(dragEl$1);
2762
+ },
2763
+ setupClone: function setupClone(_ref2) {
2764
+ var sortable = _ref2.sortable,
2765
+ cancel = _ref2.cancel;
2766
+ if (!this.isMultiDrag) return;
2767
+ for (var i = 0; i < multiDragElements.length; i++) {
2768
+ multiDragClones.push(clone(multiDragElements[i]));
2769
+ multiDragClones[i].sortableIndex = multiDragElements[i].sortableIndex;
2770
+ multiDragClones[i].draggable = false;
2771
+ multiDragClones[i].style['will-change'] = '';
2772
+ toggleClass(multiDragClones[i], this.options.selectedClass, false);
2773
+ multiDragElements[i] === dragEl$1 && toggleClass(multiDragClones[i], this.options.chosenClass, false);
2774
+ }
2775
+ sortable._hideClone();
2776
+ cancel();
2777
+ },
2778
+ clone: function clone(_ref3) {
2779
+ var sortable = _ref3.sortable,
2780
+ rootEl = _ref3.rootEl,
2781
+ dispatchSortableEvent = _ref3.dispatchSortableEvent,
2782
+ cancel = _ref3.cancel;
2783
+ if (!this.isMultiDrag) return;
2784
+ if (!this.options.removeCloneOnHide) {
2785
+ if (multiDragElements.length && multiDragSortable === sortable) {
2786
+ insertMultiDragClones(true, rootEl);
2787
+ dispatchSortableEvent('clone');
2788
+ cancel();
2789
+ }
2790
+ }
2791
+ },
2792
+ showClone: function showClone(_ref4) {
2793
+ var cloneNowShown = _ref4.cloneNowShown,
2794
+ rootEl = _ref4.rootEl,
2795
+ cancel = _ref4.cancel;
2796
+ if (!this.isMultiDrag) return;
2797
+ insertMultiDragClones(false, rootEl);
2798
+ multiDragClones.forEach(function (clone) {
2799
+ css(clone, 'display', '');
2800
+ });
2801
+ cloneNowShown();
2802
+ clonesHidden = false;
2803
+ cancel();
2804
+ },
2805
+ hideClone: function hideClone(_ref5) {
2806
+ var _this = this;
2807
+ var cloneNowHidden = _ref5.cloneNowHidden,
2808
+ cancel = _ref5.cancel;
2809
+ if (!this.isMultiDrag) return;
2810
+ multiDragClones.forEach(function (clone) {
2811
+ css(clone, 'display', 'none');
2812
+ if (_this.options.removeCloneOnHide && clone.parentNode) {
2813
+ clone.parentNode.removeChild(clone);
2814
+ }
2815
+ });
2816
+ cloneNowHidden();
2817
+ clonesHidden = true;
2818
+ cancel();
2819
+ },
2820
+ dragStartGlobal: function dragStartGlobal(_ref6) {
2821
+ if (!this.isMultiDrag && multiDragSortable) {
2822
+ multiDragSortable.multiDrag._deselectMultiDrag();
2823
+ }
2824
+ multiDragElements.forEach(function (multiDragElement) {
2825
+ multiDragElement.sortableIndex = index(multiDragElement);
2826
+ });
2827
+
2828
+ // Sort multi-drag elements
2829
+ multiDragElements = multiDragElements.sort(function (a, b) {
2830
+ return a.sortableIndex - b.sortableIndex;
2831
+ });
2832
+ dragStarted = true;
2833
+ },
2834
+ dragStarted: function dragStarted(_ref7) {
2835
+ var _this2 = this;
2836
+ var sortable = _ref7.sortable;
2837
+ if (!this.isMultiDrag) return;
2838
+ if (this.options.sort) {
2839
+ // Capture rects,
2840
+ // hide multi drag elements (by positioning them absolute),
2841
+ // set multi drag elements rects to dragRect,
2842
+ // show multi drag elements,
2843
+ // animate to rects,
2844
+ // unset rects & remove from DOM
2845
+
2846
+ sortable.captureAnimationState();
2847
+ if (this.options.animation) {
2848
+ multiDragElements.forEach(function (multiDragElement) {
2849
+ if (multiDragElement === dragEl$1) return;
2850
+ css(multiDragElement, 'position', 'absolute');
2851
+ });
2852
+ var dragRect = getRect(dragEl$1, false, true, true);
2853
+ multiDragElements.forEach(function (multiDragElement) {
2854
+ if (multiDragElement === dragEl$1) return;
2855
+ setRect(multiDragElement, dragRect);
2856
+ });
2857
+ folding = true;
2858
+ initialFolding = true;
2859
+ }
2860
+ }
2861
+ sortable.animateAll(function () {
2862
+ folding = false;
2863
+ initialFolding = false;
2864
+ if (_this2.options.animation) {
2865
+ multiDragElements.forEach(function (multiDragElement) {
2866
+ unsetRect(multiDragElement);
2867
+ });
2868
+ }
2869
+
2870
+ // Remove all auxiliary multidrag items from el, if sorting enabled
2871
+ if (_this2.options.sort) {
2872
+ removeMultiDragElements();
2873
+ }
2874
+ });
2875
+ },
2876
+ dragOver: function dragOver(_ref8) {
2877
+ var target = _ref8.target,
2878
+ completed = _ref8.completed,
2879
+ cancel = _ref8.cancel;
2880
+ if (folding && ~multiDragElements.indexOf(target)) {
2881
+ completed(false);
2882
+ cancel();
2883
+ }
2884
+ },
2885
+ revert: function revert(_ref9) {
2886
+ var fromSortable = _ref9.fromSortable,
2887
+ rootEl = _ref9.rootEl,
2888
+ sortable = _ref9.sortable,
2889
+ dragRect = _ref9.dragRect;
2890
+ if (multiDragElements.length > 1) {
2891
+ // Setup unfold animation
2892
+ multiDragElements.forEach(function (multiDragElement) {
2893
+ sortable.addAnimationState({
2894
+ target: multiDragElement,
2895
+ rect: folding ? getRect(multiDragElement) : dragRect
2896
+ });
2897
+ unsetRect(multiDragElement);
2898
+ multiDragElement.fromRect = dragRect;
2899
+ fromSortable.removeAnimationState(multiDragElement);
2900
+ });
2901
+ folding = false;
2902
+ insertMultiDragElements(!this.options.removeCloneOnHide, rootEl);
2903
+ }
2904
+ },
2905
+ dragOverCompleted: function dragOverCompleted(_ref10) {
2906
+ var sortable = _ref10.sortable,
2907
+ isOwner = _ref10.isOwner,
2908
+ insertion = _ref10.insertion,
2909
+ activeSortable = _ref10.activeSortable,
2910
+ parentEl = _ref10.parentEl,
2911
+ putSortable = _ref10.putSortable;
2912
+ var options = this.options;
2913
+ if (insertion) {
2914
+ // Clones must be hidden before folding animation to capture dragRectAbsolute properly
2915
+ if (isOwner) {
2916
+ activeSortable._hideClone();
2917
+ }
2918
+ initialFolding = false;
2919
+ // If leaving sort:false root, or already folding - Fold to new location
2920
+ if (options.animation && multiDragElements.length > 1 && (folding || !isOwner && !activeSortable.options.sort && !putSortable)) {
2921
+ // Fold: Set all multi drag elements's rects to dragEl's rect when multi-drag elements are invisible
2922
+ var dragRectAbsolute = getRect(dragEl$1, false, true, true);
2923
+ multiDragElements.forEach(function (multiDragElement) {
2924
+ if (multiDragElement === dragEl$1) return;
2925
+ setRect(multiDragElement, dragRectAbsolute);
2926
+
2927
+ // Move element(s) to end of parentEl so that it does not interfere with multi-drag clones insertion if they are inserted
2928
+ // while folding, and so that we can capture them again because old sortable will no longer be fromSortable
2929
+ parentEl.appendChild(multiDragElement);
2930
+ });
2931
+ folding = true;
2932
+ }
2933
+
2934
+ // Clones must be shown (and check to remove multi drags) after folding when interfering multiDragElements are moved out
2935
+ if (!isOwner) {
2936
+ // Only remove if not folding (folding will remove them anyways)
2937
+ if (!folding) {
2938
+ removeMultiDragElements();
2939
+ }
2940
+ if (multiDragElements.length > 1) {
2941
+ var clonesHiddenBefore = clonesHidden;
2942
+ activeSortable._showClone(sortable);
2943
+
2944
+ // Unfold animation for clones if showing from hidden
2945
+ if (activeSortable.options.animation && !clonesHidden && clonesHiddenBefore) {
2946
+ multiDragClones.forEach(function (clone) {
2947
+ activeSortable.addAnimationState({
2948
+ target: clone,
2949
+ rect: clonesFromRect
2950
+ });
2951
+ clone.fromRect = clonesFromRect;
2952
+ clone.thisAnimationDuration = null;
2953
+ });
2954
+ }
2955
+ } else {
2956
+ activeSortable._showClone(sortable);
2957
+ }
2958
+ }
2959
+ }
2960
+ },
2961
+ dragOverAnimationCapture: function dragOverAnimationCapture(_ref11) {
2962
+ var dragRect = _ref11.dragRect,
2963
+ isOwner = _ref11.isOwner,
2964
+ activeSortable = _ref11.activeSortable;
2965
+ multiDragElements.forEach(function (multiDragElement) {
2966
+ multiDragElement.thisAnimationDuration = null;
2967
+ });
2968
+ if (activeSortable.options.animation && !isOwner && activeSortable.multiDrag.isMultiDrag) {
2969
+ clonesFromRect = _extends({}, dragRect);
2970
+ var dragMatrix = matrix(dragEl$1, true);
2971
+ clonesFromRect.top -= dragMatrix.f;
2972
+ clonesFromRect.left -= dragMatrix.e;
2973
+ }
2974
+ },
2975
+ dragOverAnimationComplete: function dragOverAnimationComplete() {
2976
+ if (folding) {
2977
+ folding = false;
2978
+ removeMultiDragElements();
2979
+ }
2980
+ },
2981
+ drop: function drop(_ref12) {
2982
+ var evt = _ref12.originalEvent,
2983
+ rootEl = _ref12.rootEl,
2984
+ parentEl = _ref12.parentEl,
2985
+ sortable = _ref12.sortable,
2986
+ dispatchSortableEvent = _ref12.dispatchSortableEvent,
2987
+ oldIndex = _ref12.oldIndex,
2988
+ putSortable = _ref12.putSortable;
2989
+ var toSortable = putSortable || this.sortable;
2990
+ if (!evt) return;
2991
+ var options = this.options,
2992
+ children = parentEl.children;
2993
+
2994
+ // Multi-drag selection
2995
+ if (!dragStarted) {
2996
+ if (options.multiDragKey && !this.multiDragKeyDown) {
2997
+ this._deselectMultiDrag();
2998
+ }
2999
+ toggleClass(dragEl$1, options.selectedClass, !~multiDragElements.indexOf(dragEl$1));
3000
+ if (!~multiDragElements.indexOf(dragEl$1)) {
3001
+ multiDragElements.push(dragEl$1);
3002
+ dispatchEvent({
3003
+ sortable: sortable,
3004
+ rootEl: rootEl,
3005
+ name: 'select',
3006
+ targetEl: dragEl$1,
3007
+ originalEvent: evt
3008
+ });
3009
+
3010
+ // Modifier activated, select from last to dragEl
3011
+ if (evt.shiftKey && lastMultiDragSelect && sortable.el.contains(lastMultiDragSelect)) {
3012
+ var lastIndex = index(lastMultiDragSelect),
3013
+ currentIndex = index(dragEl$1);
3014
+ if (~lastIndex && ~currentIndex && lastIndex !== currentIndex) {
3015
+ (function () {
3016
+ // Must include lastMultiDragSelect (select it), in case modified selection from no selection
3017
+ // (but previous selection existed)
3018
+ var n, i;
3019
+ if (currentIndex > lastIndex) {
3020
+ i = lastIndex;
3021
+ n = currentIndex;
3022
+ } else {
3023
+ i = currentIndex;
3024
+ n = lastIndex + 1;
3025
+ }
3026
+ var filter = options.filter;
3027
+ for (; i < n; i++) {
3028
+ if (~multiDragElements.indexOf(children[i])) continue;
3029
+ // Check if element is draggable
3030
+ if (!closest(children[i], options.draggable, parentEl, false)) continue;
3031
+ // Check if element is filtered
3032
+ var filtered = filter && (typeof filter === 'function' ? filter.call(sortable, evt, children[i], sortable) : filter.split(',').some(function (criteria) {
3033
+ return closest(children[i], criteria.trim(), parentEl, false);
3034
+ }));
3035
+ if (filtered) continue;
3036
+ toggleClass(children[i], options.selectedClass, true);
3037
+ multiDragElements.push(children[i]);
3038
+ dispatchEvent({
3039
+ sortable: sortable,
3040
+ rootEl: rootEl,
3041
+ name: 'select',
3042
+ targetEl: children[i],
3043
+ originalEvent: evt
3044
+ });
3045
+ }
3046
+ })();
3047
+ }
3048
+ } else {
3049
+ lastMultiDragSelect = dragEl$1;
3050
+ }
3051
+ multiDragSortable = toSortable;
3052
+ } else {
3053
+ multiDragElements.splice(multiDragElements.indexOf(dragEl$1), 1);
3054
+ lastMultiDragSelect = null;
3055
+ dispatchEvent({
3056
+ sortable: sortable,
3057
+ rootEl: rootEl,
3058
+ name: 'deselect',
3059
+ targetEl: dragEl$1,
3060
+ originalEvent: evt
3061
+ });
3062
+ }
3063
+ }
3064
+
3065
+ // Multi-drag drop
3066
+ if (dragStarted && this.isMultiDrag) {
3067
+ folding = false;
3068
+ // Do not "unfold" after around dragEl if reverted
3069
+ if ((parentEl[expando].options.sort || parentEl !== rootEl) && multiDragElements.length > 1) {
3070
+ var dragRect = getRect(dragEl$1),
3071
+ multiDragIndex = index(dragEl$1, ':not(.' + this.options.selectedClass + ')');
3072
+ if (!initialFolding && options.animation) dragEl$1.thisAnimationDuration = null;
3073
+ toSortable.captureAnimationState();
3074
+ if (!initialFolding) {
3075
+ if (options.animation) {
3076
+ dragEl$1.fromRect = dragRect;
3077
+ multiDragElements.forEach(function (multiDragElement) {
3078
+ multiDragElement.thisAnimationDuration = null;
3079
+ if (multiDragElement !== dragEl$1) {
3080
+ var rect = folding ? getRect(multiDragElement) : dragRect;
3081
+ multiDragElement.fromRect = rect;
3082
+
3083
+ // Prepare unfold animation
3084
+ toSortable.addAnimationState({
3085
+ target: multiDragElement,
3086
+ rect: rect
3087
+ });
3088
+ }
3089
+ });
3090
+ }
3091
+
3092
+ // Multi drag elements are not necessarily removed from the DOM on drop, so to reinsert
3093
+ // properly they must all be removed
3094
+ removeMultiDragElements();
3095
+ multiDragElements.forEach(function (multiDragElement) {
3096
+ if (children[multiDragIndex]) {
3097
+ parentEl.insertBefore(multiDragElement, children[multiDragIndex]);
3098
+ } else {
3099
+ parentEl.appendChild(multiDragElement);
3100
+ }
3101
+ multiDragIndex++;
3102
+ });
3103
+
3104
+ // If initial folding is done, the elements may have changed position because they are now
3105
+ // unfolding around dragEl, even though dragEl may not have his index changed, so update event
3106
+ // must be fired here as Sortable will not.
3107
+ if (oldIndex === index(dragEl$1)) {
3108
+ var update = false;
3109
+ multiDragElements.forEach(function (multiDragElement) {
3110
+ if (multiDragElement.sortableIndex !== index(multiDragElement)) {
3111
+ update = true;
3112
+ return;
3113
+ }
3114
+ });
3115
+ if (update) {
3116
+ dispatchSortableEvent('update');
3117
+ dispatchSortableEvent('sort');
3118
+ }
3119
+ }
3120
+ }
3121
+
3122
+ // Must be done after capturing individual rects (scroll bar)
3123
+ multiDragElements.forEach(function (multiDragElement) {
3124
+ unsetRect(multiDragElement);
3125
+ });
3126
+ toSortable.animateAll();
3127
+ }
3128
+ multiDragSortable = toSortable;
3129
+ }
3130
+
3131
+ // Remove clones if necessary
3132
+ if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== 'clone') {
3133
+ multiDragClones.forEach(function (clone) {
3134
+ clone.parentNode && clone.parentNode.removeChild(clone);
3135
+ });
3136
+ }
3137
+ },
3138
+ nullingGlobal: function nullingGlobal() {
3139
+ this.isMultiDrag = dragStarted = false;
3140
+ multiDragClones.length = 0;
3141
+ },
3142
+ destroyGlobal: function destroyGlobal() {
3143
+ this._deselectMultiDrag();
3144
+ off(document, 'pointerup', this._deselectMultiDrag);
3145
+ off(document, 'mouseup', this._deselectMultiDrag);
3146
+ off(document, 'touchend', this._deselectMultiDrag);
3147
+ off(document, 'keydown', this._checkKeyDown);
3148
+ off(document, 'keyup', this._checkKeyUp);
3149
+ },
3150
+ _deselectMultiDrag: function _deselectMultiDrag(evt) {
3151
+ if (typeof dragStarted !== "undefined" && dragStarted) return;
3152
+
3153
+ // Only deselect if selection is in this sortable
3154
+ if (multiDragSortable !== this.sortable) return;
3155
+
3156
+ // Only deselect if target is not item in this sortable
3157
+ if (evt && closest(evt.target, this.options.draggable, this.sortable.el, false)) return;
3158
+
3159
+ // Only deselect if left click
3160
+ if (evt && evt.button !== 0) return;
3161
+ while (multiDragElements.length) {
3162
+ var el = multiDragElements[0];
3163
+ toggleClass(el, this.options.selectedClass, false);
3164
+ multiDragElements.shift();
3165
+ dispatchEvent({
3166
+ sortable: this.sortable,
3167
+ rootEl: this.sortable.el,
3168
+ name: 'deselect',
3169
+ targetEl: el,
3170
+ originalEvent: evt
3171
+ });
3172
+ }
3173
+ },
3174
+ _checkKeyDown: function _checkKeyDown(evt) {
3175
+ if (evt.key === this.options.multiDragKey) {
3176
+ this.multiDragKeyDown = true;
3177
+ }
3178
+ },
3179
+ _checkKeyUp: function _checkKeyUp(evt) {
3180
+ if (evt.key === this.options.multiDragKey) {
3181
+ this.multiDragKeyDown = false;
3182
+ }
3183
+ }
3184
+ };
3185
+ return _extends(MultiDrag, {
3186
+ // Static methods & properties
3187
+ pluginName: 'multiDrag',
3188
+ utils: {
3189
+ /**
3190
+ * Selects the provided multi-drag item
3191
+ * @param {HTMLElement} el The element to be selected
3192
+ */
3193
+ select: function select(el) {
3194
+ var sortable = el.parentNode[expando];
3195
+ if (!sortable || !sortable.options.multiDrag || ~multiDragElements.indexOf(el)) return;
3196
+ if (multiDragSortable && multiDragSortable !== sortable) {
3197
+ multiDragSortable.multiDrag._deselectMultiDrag();
3198
+ multiDragSortable = sortable;
3199
+ }
3200
+ toggleClass(el, sortable.options.selectedClass, true);
3201
+ multiDragElements.push(el);
3202
+ },
3203
+ /**
3204
+ * Deselects the provided multi-drag item
3205
+ * @param {HTMLElement} el The element to be deselected
3206
+ */
3207
+ deselect: function deselect(el) {
3208
+ var sortable = el.parentNode[expando],
3209
+ index = multiDragElements.indexOf(el);
3210
+ if (!sortable || !sortable.options.multiDrag || !~index) return;
3211
+ toggleClass(el, sortable.options.selectedClass, false);
3212
+ multiDragElements.splice(index, 1);
3213
+ }
3214
+ },
3215
+ eventProperties: function eventProperties() {
3216
+ var _this3 = this;
3217
+ var oldIndicies = [],
3218
+ newIndicies = [];
3219
+ multiDragElements.forEach(function (multiDragElement) {
3220
+ oldIndicies.push({
3221
+ multiDragElement: multiDragElement,
3222
+ index: multiDragElement.sortableIndex
3223
+ });
3224
+
3225
+ // multiDragElements will already be sorted if folding
3226
+ var newIndex;
3227
+ if (folding && multiDragElement !== dragEl$1) {
3228
+ newIndex = -1;
3229
+ } else if (folding) {
3230
+ newIndex = index(multiDragElement, ':not(.' + _this3.options.selectedClass + ')');
3231
+ } else {
3232
+ newIndex = index(multiDragElement);
3233
+ }
3234
+ newIndicies.push({
3235
+ multiDragElement: multiDragElement,
3236
+ index: newIndex
3237
+ });
3238
+ });
3239
+ return {
3240
+ items: _toConsumableArray(multiDragElements),
3241
+ clones: [].concat(multiDragClones),
3242
+ oldIndicies: oldIndicies,
3243
+ newIndicies: newIndicies
3244
+ };
3245
+ },
3246
+ optionListeners: {
3247
+ multiDragKey: function multiDragKey(key) {
3248
+ key = key.toLowerCase();
3249
+ if (key === 'ctrl') {
3250
+ key = 'Control';
3251
+ } else if (key.length > 1) {
3252
+ key = key.charAt(0).toUpperCase() + key.substr(1);
3253
+ }
3254
+ return key;
3255
+ }
3256
+ }
3257
+ });
3258
+ }
3259
+ function insertMultiDragElements(clonesInserted, rootEl) {
3260
+ multiDragElements.forEach(function (multiDragElement, i) {
3261
+ var target = rootEl.children[multiDragElement.sortableIndex + (clonesInserted ? Number(i) : 0)];
3262
+ if (target) {
3263
+ rootEl.insertBefore(multiDragElement, target);
3264
+ } else {
3265
+ rootEl.appendChild(multiDragElement);
3266
+ }
3267
+ });
3268
+ }
3269
+
3270
+ /**
3271
+ * Insert multi-drag clones
3272
+ * @param {[Boolean]} elementsInserted Whether the multi-drag elements are inserted
3273
+ * @param {HTMLElement} rootEl
3274
+ */
3275
+ function insertMultiDragClones(elementsInserted, rootEl) {
3276
+ multiDragClones.forEach(function (clone, i) {
3277
+ var target = rootEl.children[clone.sortableIndex + (elementsInserted ? Number(i) : 0)];
3278
+ if (target) {
3279
+ rootEl.insertBefore(clone, target);
3280
+ } else {
3281
+ rootEl.appendChild(clone);
3282
+ }
3283
+ });
3284
+ }
3285
+ function removeMultiDragElements() {
3286
+ multiDragElements.forEach(function (multiDragElement) {
3287
+ if (multiDragElement === dragEl$1) return;
3288
+ multiDragElement.parentNode && multiDragElement.parentNode.removeChild(multiDragElement);
3289
+ });
3290
+ }
3291
+
3292
+ Sortable.mount(new AutoScrollPlugin());
3293
+ Sortable.mount(Remove, Revert);
3294
+
3295
+ const ezSortableListCss = ":host{--ez-sortable-list__host--z-index:var(--visible, 1);--ez-sortable-list__host--border-radius:var(--border--radius-medium, 12px);--ez-sortable-list__host--padding:var(--space--medium, 12px);--ez-sortable-list__item--margin:0 var(--space--small, 6px);--ez-sortable-list__item--padding:var(--space--3xs, 6px);--ez-sortable-list__item--color:var(--title--primary, #2b3a54);--ez-sortable-list__item--font-family:var(--font-pattern, \"Roboto\");--ez-sortable-list__item--font-size:var(--text--medium, 14px);--ez-sortable-list__selected-item--border-radius:var(--border--radius-small, 6px);--ez-sortable-list__selected-item--background-color:var(--color--primary-300, #E2F4EF);--ez-sortable-list__selectable--padding-right:var(--space--small, 6px);--ez-sortable-list__selectable--padding-left:var(--space--small, 6px);--ez-sortable-list__icon--color:#AFB6C0;--ez-sortable-list__draggable-icon--image:url('data:image/svg+xml;utf8,<svg width=\"18\" height=\"18\" viewBox=\"0 0 18 18\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"m 6.75,2.25 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z\"/></svg>');--ez-sortable-list__scrollbar--color-default:var(--scrollbar--default, #626e82);--ez-sortable-list--color-background:var(--scrollbar--background, #E5EAF0);--ez-sortable-list__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--ez-sortable-list__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--ez-sortable-list--border-radius:var(--border--radius-small, 6px);--ez-sortable-list__scrollbar--width:var(--space--small, 6px);max-height:100%;width:100%;background-color:#fff;display:flex;z-index:var(--ez-sortable-list__host--z-index)}.sortable-item{display:flex;justify-content:space-between;font-family:var(--ez-sortable-list__item--font-family);font-size:var(--ez-sortable-list__item--font-size);padding:var(--ez-sortable-list__item--padding) 0px;margin:var(--ez-sortable-list__item--margin)}.hover-feedback:hover{background-color:var(--background--medium);border-radius:var(--border--radius-regular)}.sortable-item.dragging{background:#FFFFFF;border:1px solid #008561;box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122);border-radius:6px}.sortable-list{padding:0;margin:0;width:100%;height:100%;max-height:100%;display:flex;flex-direction:column;overflow-y:auto;overflow-x:hidden;color:var(--text-color);scrollbar-color:var(--ez-sortable-list__scrollbar--color-clicked) var(--ez-sortable-list--color-background)}.sortable-list.empty-content::after{content:attr(data-content);display:block;font-size:16px;font-weight:400;color:#AFB6C0;margin:auto;padding:8px}.list-scroller--fix{scrollbar-width:thin}.list-scroller--hover{scrollbar-width:none}.item-content{display:flex;flex-grow:1;flex-direction:row}.empty-message{font-weight:var(--text-weight--medium);font-size:var(--text--medium);color:var(--text--secondary);margin:auto}.draggable-icon{align-items:flex-start;display:flex;outline:none;border:none;background-color:unset}.draggable-icon::after{content:'';display:flex;width:18px;height:18px;background-color:var(--ez-sortable-list__icon--color);-webkit-mask-image:var(--ez-sortable-list__draggable-icon--image);mask-image:var(--ez-sortable-list__draggable-icon--image)}.selectable{cursor:pointer;padding-right:var(--ez-sortable-list__selectable--padding-right);padding-left:var(--ez-sortable-list__selectable--padding-left)}.selected{background:var(--ez-sortable-list__selected-item--background-color);border-radius:var(--ez-sortable-list__selected-item--border-radius)}.list-fix::-webkit-scrollbar-thumb{background-color:var(--ez-sortable-list__scrollbar--color-default);border-radius:var(--ez-sortable-list--border-radius)}.list-fix::-webkit-scrollbar-thumb:active{background-color:var(--ez-sortable-list__scrollbar--color-clicked)}.list-fix::-webkit-scrollbar{width:var(--ez-sortable-list__scrollbar--width);display:none}.list-hover::-webkit-scrollbar-thumb:hover{background-color:var(--ez-sortable-list__scrollbar--color-hover)}.list-hover:hover{scrollbar-width:thin}.list-hover:hover::-webkit-scrollbar{display:block}.ghost{opacity:.5;background:#589f7b}.sortable-content{display:flex;justify-content:space-between;gap:10px;flex-direction:column;border:var(--border--small) var(--color--strokes);border-radius:var(--border--radius-medium);width:100%;height:400px;min-width:40%}@media (max-height: 630px){.sortable-content{height:290px}}.sortable-header{background:var(--background--body);padding:10px;border-radius:var(--border--radius-medium) var(--border--radius-medium) 0 0}.sortable-label{font-weight:var(--text-weight--large);font-size:var(--text--medium);color:var(--title--primary);margin-bottom:10px;display:block}.sortable-totalizer{padding:5px 10px;background:var(--background--body);font-weight:var(--text-weight--medium);font-size:var(--text--medium);color:var(--text--primary);border-radius:0 0 var(--border--radius-medium) var(--border--radius-medium)}";
3296
+
3297
+ Sortable.mount(new MultiDragPlugin());
3298
+ const EzSortableList = class {
3299
+ constructor(hostRef) {
3300
+ registerInstance(this, hostRef);
3301
+ this.itemsReordered = createEvent(this, "itemsReordered", 7);
3302
+ this.ezSelectItens = createEvent(this, "ezSelectItens", 7);
3303
+ this.ezDoubleClick = createEvent(this, "ezDoubleClick", 7);
3304
+ this.ezChoose = createEvent(this, "ezChoose", 7);
3305
+ this.filterTerm = '';
3306
+ this.title = undefined;
3307
+ this.hideHeader = false;
3308
+ this.hideTotalizer = false;
3309
+ this.group = 'default';
3310
+ this.dataSource = [];
3311
+ this.idSortableList = 'DEFAULT_LIST';
3312
+ this.entityLabel = 'item';
3313
+ this.entityLabelPlural = 'itens';
3314
+ this.emptyMessage = 'Nenhum item na lista';
3315
+ this.hoverFeedback = true;
3316
+ this.enableMultipleSelection = false;
3317
+ this.removeItensMoved = false;
3318
+ this.itemRightSlotBuilder = undefined;
3319
+ this.itemLeftSlotBuilder = undefined;
3320
+ this.selectedItems = new Set();
3321
+ }
3322
+ /** Remove a seleção de todos os itens da lista */
3323
+ async clearSelection() {
3324
+ this.selectedItems.clear();
3325
+ this.dataSource.forEach((item) => {
3326
+ var _a;
3327
+ const element = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(`[data-key="${item.id}"]`);
3328
+ if (!element)
3329
+ return;
3330
+ Sortable.utils.deselect(element);
3331
+ item.selected = false;
3332
+ });
3333
+ this.ezSelectItens.emit([]);
3334
+ }
3335
+ componentDidLoad() {
3336
+ this.initSortable();
3337
+ }
3338
+ componentDidRender() {
3339
+ this.selectPredefinedItens();
3340
+ }
3341
+ initSortable() {
3342
+ if (this._sortableInstance) {
3343
+ this._sortableInstance.destroy();
3344
+ }
3345
+ this._sortableInstance = new Sortable(this.el.shadowRoot.querySelector(`#${this.idSortableList}`), {
3346
+ group: {
3347
+ name: this.group,
3348
+ pull: true,
3349
+ put: true,
3350
+ },
3351
+ ghostClass: 'ghost',
3352
+ dragClass: 'dragging',
3353
+ animation: 15,
3354
+ multiDrag: this.enableMultipleSelection,
3355
+ avoidImplicitDeselect: this.enableMultipleSelection,
3356
+ selectedClass: 'selected',
3357
+ filter: '.filtered',
3358
+ swapThreshold: 0.5,
3359
+ multiDragKey: 'Control',
3360
+ removeCloneOnHide: true,
3361
+ onEnd: (evt) => this.handleReorderEvent(evt),
3362
+ onSelect: (evt) => this.handleSelect(evt),
3363
+ onDeselect: (evt) => this.handleDeselect(evt),
3364
+ onSort: (evt) => this.handleSortItem(evt),
3365
+ onChoose: (evt) => this.ezChoose.emit(evt),
3366
+ });
3367
+ }
3368
+ selectPredefinedItens() {
3369
+ this.dataSource.forEach((item) => {
3370
+ var _a;
3371
+ const element = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(`[data-key="${item.id}"]`);
3372
+ if (!element)
3373
+ return;
3374
+ if (this.selectedItems.has(item.id) || item.selected === true) {
3375
+ Sortable.utils.select(element);
3376
+ }
3377
+ else {
3378
+ Sortable.utils.deselect(element);
3379
+ }
3380
+ });
3381
+ }
3382
+ handleSortItem(evt) {
3383
+ var _a;
3384
+ if (!this.removeItensMoved)
3385
+ return;
3386
+ const fromId = evt.from.getAttribute('id');
3387
+ const toId = evt.to.getAttribute('id');
3388
+ if (toId === fromId) {
3389
+ evt.items = this.removeDuplicateElements(evt.items);
3390
+ return;
3391
+ }
3392
+ const itemsToRemove = ((_a = evt.items) === null || _a === void 0 ? void 0 : _a.length) > 0 ? evt.items : [evt.item];
3393
+ itemsToRemove.forEach(item => item.remove());
3394
+ }
3395
+ removeDuplicateElements(items) {
3396
+ const seenKeys = new Set();
3397
+ return items.filter((el) => {
3398
+ const key = el.getAttribute('data-key');
3399
+ if (key) {
3400
+ if (seenKeys.has(key)) {
3401
+ el.remove();
3402
+ return false;
3403
+ }
3404
+ seenKeys.add(key);
3405
+ }
3406
+ return true;
3407
+ });
3408
+ }
3409
+ handleSelect(evt) {
3410
+ this.updateSelection(evt.item, true);
3411
+ }
3412
+ handleDeselect(evt) {
3413
+ this.updateSelection(evt.item, false);
3414
+ }
3415
+ updateSelection(item, isSelected) {
3416
+ const itemId = item.getAttribute('data-key');
3417
+ if (!itemId)
3418
+ return;
3419
+ const targetItem = this.dataSource.find(item => item.id === itemId);
3420
+ if (!targetItem)
3421
+ return;
3422
+ targetItem.selected = isSelected;
3423
+ if (isSelected) {
3424
+ this.selectedItems.add(itemId);
3425
+ }
3426
+ else {
3427
+ this.selectedItems.delete(itemId);
3428
+ }
3429
+ this.emitSelectedItems();
3430
+ }
3431
+ emitSelectedItems() {
3432
+ this.ezSelectItens.emit(Array.from(this.selectedItems)
3433
+ .map(id => this.dataSource.find(item => item.id === id))
3434
+ .filter(Boolean));
3435
+ }
3436
+ handleReorderEvent(evt) {
3437
+ var _a;
3438
+ const selectedElements = ((_a = evt.items) === null || _a === void 0 ? void 0 : _a.length) > 0 ? evt.items : [evt.item];
3439
+ const selectItens = selectedElements
3440
+ .map(el => el.getAttribute('data-key'))
3441
+ .filter(Boolean);
3442
+ this.itemsReordered.emit({
3443
+ dataSource: this.dataSource,
3444
+ selectItens,
3445
+ from: evt.from,
3446
+ to: evt.to,
3447
+ newIndex: evt.newIndex,
3448
+ newIndicies: evt.newIndicies,
3449
+ });
3450
+ }
3451
+ handleDoubleClick(itemId) {
3452
+ var _a;
3453
+ const itemList = this.dataSource.find(item => item.id === itemId);
3454
+ if (itemList) {
3455
+ (_a = this.ezDoubleClick) === null || _a === void 0 ? void 0 : _a.emit(itemList);
3456
+ }
3457
+ }
3458
+ getContainerItemBuilder(slotPosition, item, className) {
3459
+ var _a, _b;
3460
+ const customContent = slotPosition === 'left' ? (_a = this.itemLeftSlotBuilder) === null || _a === void 0 ? void 0 : _a.call(this, item) : (_b = this.itemRightSlotBuilder) === null || _b === void 0 ? void 0 : _b.call(this, item);
3461
+ if (customContent == undefined)
3462
+ return;
3463
+ if (typeof customContent !== 'string') {
3464
+ return h("div", { class: className }, customContent);
3465
+ }
3466
+ return h("div", { class: className, innerHTML: customContent });
3467
+ }
3468
+ disconnectedCallback() {
3469
+ if (this._sortableInstance) {
3470
+ this._sortableInstance.destroy();
3471
+ this._sortableInstance = null;
3472
+ }
3473
+ }
3474
+ buildTotalizer() {
3475
+ return `Total de ${this.dataSource.length} ${this.dataSource.length === 1 ? this.entityLabel : this.entityLabelPlural}`;
3476
+ }
3477
+ renderItems() {
3478
+ const itemsToRender = ArrayUtils.applyStringFilter(this.filterTerm, this.dataSource);
3479
+ return itemsToRender.map((item) => (h("div", { id: `ID_${item.id}`, key: `KEY_${item.id}`, class: {
3480
+ 'sortable-item': true,
3481
+ 'hover-feedback': this.hoverFeedback,
3482
+ }, "data-key": item.id, onDblClick: () => this.handleDoubleClick(item.id) }, !!this.itemLeftSlotBuilder && this.getContainerItemBuilder('left', item), h("div", { class: "item-content" }, h("span", { class: "draggable-icon" }), item.label), !!this.itemRightSlotBuilder && this.getContainerItemBuilder('right', item))));
3483
+ }
3484
+ handleFilterChanged(evt) {
3485
+ evt.stopPropagation();
3486
+ evt.preventDefault();
3487
+ this.filterTerm = evt.detail;
3488
+ }
3489
+ renderTotalizer() {
3490
+ if (this.hideTotalizer)
3491
+ return;
3492
+ return (h("div", { class: 'sortable-totalizer' }, this.buildTotalizer()));
3493
+ }
3494
+ renderHeader() {
3495
+ if (this.hideHeader)
3496
+ return;
3497
+ return (h("div", { class: 'sortable-header' }, h("span", { class: 'sortable-label' }, this.title), h("ez-filter-input", { label: `Buscar ${this.entityLabel}`, mode: "slim", onEzChange: evt => this.handleFilterChanged(evt) })));
3498
+ }
3499
+ render() {
3500
+ return (h("div", { class: 'sortable-content' }, this.renderHeader(), h("div", { class: `sortable-list ${this.dataSource.length < 1 ? 'empty-content' : ''} list-scroller--fix`, "data-content": this.emptyMessage, style: { '--empty-content': `"${this.emptyMessage}"` }, id: this.idSortableList, key: this.idSortableList }, this.renderItems()), this.renderTotalizer()));
3501
+ }
3502
+ get el() { return getElement(this); }
3503
+ };
3504
+ EzSortableList.style = ezSortableListCss;
3505
+
3506
+ export { EzSortableList as ez_sortable_list };