buefy 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (588) hide show
  1. package/LICENSE.md +21 -0
  2. package/README.md +242 -0
  3. package/dist/buefy.css +15895 -0
  4. package/dist/buefy.d.ts +11706 -0
  5. package/dist/buefy.esm.js +21082 -0
  6. package/dist/buefy.esm.min.js +2 -0
  7. package/dist/buefy.js +21227 -0
  8. package/dist/buefy.min.css +1 -0
  9. package/dist/buefy.min.js +2 -0
  10. package/dist/cjs/Autocomplete-BMmOsPiK.js +864 -0
  11. package/dist/cjs/Button-Cq7yqI8p.js +118 -0
  12. package/dist/cjs/CheckRadioMixin-CDu0SN3g.js +58 -0
  13. package/dist/cjs/Checkbox-GPzAMQqM.js +85 -0
  14. package/dist/cjs/CompatFallthroughMixin-hhK0Gkhr.js +48 -0
  15. package/dist/cjs/Datepicker-B-9ReBe6.js +2120 -0
  16. package/dist/cjs/Dropdown-DtpKU9qf.js +470 -0
  17. package/dist/cjs/DropdownItem-IMOKyRGV.js +110 -0
  18. package/dist/cjs/Field-19ZCJFF8.js +405 -0
  19. package/dist/cjs/FormElementMixin-DavX4iOv.js +170 -0
  20. package/dist/cjs/Icon-lsDKE2wQ.js +184 -0
  21. package/dist/cjs/Image-CocPwU3n.js +356 -0
  22. package/dist/cjs/InjectedChildMixin-CUKn09dB.js +150 -0
  23. package/dist/cjs/Input-BcloGeZ3.js +350 -0
  24. package/dist/cjs/Loading-GqqqjipO.js +145 -0
  25. package/dist/cjs/MessageMixin-bGuuzfev.js +136 -0
  26. package/dist/cjs/Modal-CYpSQe2Q.js +315 -0
  27. package/dist/cjs/NoticeMixin--3RjH43z.js +163 -0
  28. package/dist/cjs/Pagination-D1MVdiLp.js +547 -0
  29. package/dist/cjs/Progress-DT9Qc8Id.js +177 -0
  30. package/dist/cjs/Select-DayPKwCY.js +147 -0
  31. package/dist/cjs/SlotComponent-BruGdRW3.js +41 -0
  32. package/dist/cjs/TabbedChildMixin-B3JUUwcf.js +211 -0
  33. package/dist/cjs/Tag-BprnwJJ1.js +167 -0
  34. package/dist/cjs/Timepicker-CDZ3V-2J.js +283 -0
  35. package/dist/cjs/TimepickerMixin-C9WVvcUL.js +666 -0
  36. package/dist/cjs/Tooltip-Cgighv0j.js +393 -0
  37. package/dist/cjs/_plugin-vue_export-helper-Die8u8yB.js +11 -0
  38. package/dist/cjs/autocomplete.js +23 -0
  39. package/dist/cjs/breadcrumb.js +107 -0
  40. package/dist/cjs/button.js +20 -0
  41. package/dist/cjs/carousel.js +825 -0
  42. package/dist/cjs/checkbox.js +88 -0
  43. package/dist/cjs/clockpicker.js +668 -0
  44. package/dist/cjs/collapse.js +99 -0
  45. package/dist/cjs/colorpicker.js +25 -0
  46. package/dist/cjs/config-DR826Ki2.js +103 -0
  47. package/dist/cjs/config.js +18 -0
  48. package/dist/cjs/datepicker.js +28 -0
  49. package/dist/cjs/datetimepicker.js +483 -0
  50. package/dist/cjs/dialog.js +506 -0
  51. package/dist/cjs/dropdown.js +23 -0
  52. package/dist/cjs/field.js +19 -0
  53. package/dist/cjs/helpers.js +276 -0
  54. package/dist/cjs/icon.js +19 -0
  55. package/dist/cjs/image.js +19 -0
  56. package/dist/cjs/index-DiQy3SCb.js +1942 -0
  57. package/dist/cjs/index.js +274 -0
  58. package/dist/cjs/input.js +22 -0
  59. package/dist/cjs/loading.js +87 -0
  60. package/dist/cjs/menu.js +340 -0
  61. package/dist/cjs/message.js +119 -0
  62. package/dist/cjs/modal.js +103 -0
  63. package/dist/cjs/navbar.js +572 -0
  64. package/dist/cjs/notification.js +281 -0
  65. package/dist/cjs/numberinput.js +386 -0
  66. package/dist/cjs/pagination.js +22 -0
  67. package/dist/cjs/plugins-DbyYGVpp.js +16 -0
  68. package/dist/cjs/progress.js +91 -0
  69. package/dist/cjs/radio.js +137 -0
  70. package/dist/cjs/rate.js +197 -0
  71. package/dist/cjs/select.js +22 -0
  72. package/dist/cjs/sidebar.js +309 -0
  73. package/dist/cjs/skeleton.js +78 -0
  74. package/dist/cjs/slider.js +699 -0
  75. package/dist/cjs/snackbar.js +224 -0
  76. package/dist/cjs/ssr-DVRFTu_P.js +8 -0
  77. package/dist/cjs/steps.js +347 -0
  78. package/dist/cjs/switch.js +161 -0
  79. package/dist/cjs/table.js +2391 -0
  80. package/dist/cjs/tabs.js +258 -0
  81. package/dist/cjs/tag.js +44 -0
  82. package/dist/cjs/taginput.js +425 -0
  83. package/dist/cjs/timepicker.js +29 -0
  84. package/dist/cjs/toast.js +162 -0
  85. package/dist/cjs/tooltip.js +19 -0
  86. package/dist/cjs/trapFocus-BlX6xykt.js +53 -0
  87. package/dist/cjs/upload.js +195 -0
  88. package/dist/components/autocomplete/index.js +1647 -0
  89. package/dist/components/autocomplete/index.min.js +2 -0
  90. package/dist/components/breadcrumb/index.js +173 -0
  91. package/dist/components/breadcrumb/index.min.js +2 -0
  92. package/dist/components/button/index.js +334 -0
  93. package/dist/components/button/index.min.js +2 -0
  94. package/dist/components/carousel/index.js +1534 -0
  95. package/dist/components/carousel/index.min.js +2 -0
  96. package/dist/components/checkbox/index.js +236 -0
  97. package/dist/components/checkbox/index.min.js +2 -0
  98. package/dist/components/clockpicker/index.js +2636 -0
  99. package/dist/components/clockpicker/index.min.js +2 -0
  100. package/dist/components/collapse/index.js +111 -0
  101. package/dist/components/collapse/index.min.js +2 -0
  102. package/dist/components/colorpicker/index.js +4251 -0
  103. package/dist/components/colorpicker/index.min.js +2 -0
  104. package/dist/components/datepicker/index.js +4110 -0
  105. package/dist/components/datepicker/index.min.js +2 -0
  106. package/dist/components/datetimepicker/index.js +5479 -0
  107. package/dist/components/datetimepicker/index.min.js +2 -0
  108. package/dist/components/dialog/index.js +1202 -0
  109. package/dist/components/dialog/index.min.js +2 -0
  110. package/dist/components/dropdown/index.js +680 -0
  111. package/dist/components/dropdown/index.min.js +2 -0
  112. package/dist/components/field/index.js +439 -0
  113. package/dist/components/field/index.min.js +2 -0
  114. package/dist/components/icon/index.js +212 -0
  115. package/dist/components/icon/index.min.js +2 -0
  116. package/dist/components/image/index.js +396 -0
  117. package/dist/components/image/index.min.js +2 -0
  118. package/dist/components/input/index.js +764 -0
  119. package/dist/components/input/index.min.js +2 -0
  120. package/dist/components/loading/index.js +280 -0
  121. package/dist/components/loading/index.min.js +2 -0
  122. package/dist/components/menu/index.js +586 -0
  123. package/dist/components/menu/index.min.js +2 -0
  124. package/dist/components/message/index.js +611 -0
  125. package/dist/components/message/index.min.js +2 -0
  126. package/dist/components/modal/index.js +516 -0
  127. package/dist/components/modal/index.min.js +2 -0
  128. package/dist/components/navbar/index.js +634 -0
  129. package/dist/components/navbar/index.min.js +2 -0
  130. package/dist/components/notification/index.js +976 -0
  131. package/dist/components/notification/index.min.js +2 -0
  132. package/dist/components/numberinput/index.js +1128 -0
  133. package/dist/components/numberinput/index.min.js +2 -0
  134. package/dist/components/pagination/index.js +764 -0
  135. package/dist/components/pagination/index.min.js +2 -0
  136. package/dist/components/progress/index.js +280 -0
  137. package/dist/components/progress/index.min.js +2 -0
  138. package/dist/components/radio/index.js +208 -0
  139. package/dist/components/radio/index.min.js +2 -0
  140. package/dist/components/rate/index.js +391 -0
  141. package/dist/components/rate/index.min.js +2 -0
  142. package/dist/components/select/index.js +560 -0
  143. package/dist/components/select/index.min.js +2 -0
  144. package/dist/components/sidebar/index.js +337 -0
  145. package/dist/components/sidebar/index.min.js +2 -0
  146. package/dist/components/skeleton/index.js +87 -0
  147. package/dist/components/skeleton/index.min.js +2 -0
  148. package/dist/components/slider/index.js +1171 -0
  149. package/dist/components/slider/index.min.js +2 -0
  150. package/dist/components/snackbar/index.js +439 -0
  151. package/dist/components/snackbar/index.min.js +2 -0
  152. package/dist/components/steps/index.js +925 -0
  153. package/dist/components/steps/index.min.js +2 -0
  154. package/dist/components/switch/index.js +182 -0
  155. package/dist/components/switch/index.min.js +2 -0
  156. package/dist/components/table/index.js +4208 -0
  157. package/dist/components/table/index.min.js +2 -0
  158. package/dist/components/tabs/index.js +837 -0
  159. package/dist/components/tabs/index.min.js +2 -0
  160. package/dist/components/tag/index.js +396 -0
  161. package/dist/components/tag/index.min.js +2 -0
  162. package/dist/components/taginput/index.js +2209 -0
  163. package/dist/components/taginput/index.min.js +2 -0
  164. package/dist/components/timepicker/index.js +2906 -0
  165. package/dist/components/timepicker/index.min.js +2 -0
  166. package/dist/components/toast/index.js +377 -0
  167. package/dist/components/toast/index.min.js +2 -0
  168. package/dist/components/tooltip/index.js +445 -0
  169. package/dist/components/tooltip/index.min.js +2 -0
  170. package/dist/components/upload/index.js +426 -0
  171. package/dist/components/upload/index.min.js +2 -0
  172. package/dist/esm/Autocomplete-CjbTh9D8.js +862 -0
  173. package/dist/esm/Button-DyUYShTZ.js +116 -0
  174. package/dist/esm/CheckRadioMixin-DSD_rjC8.js +56 -0
  175. package/dist/esm/Checkbox-KUMz0sfA.js +83 -0
  176. package/dist/esm/CompatFallthroughMixin-C8LPuwDr.js +46 -0
  177. package/dist/esm/Datepicker-Bl8Wfdkn.js +2118 -0
  178. package/dist/esm/Dropdown-CGTYVyoL.js +467 -0
  179. package/dist/esm/DropdownItem-Cn3nM0A3.js +108 -0
  180. package/dist/esm/Field-B7bX_uUg.js +403 -0
  181. package/dist/esm/FormElementMixin-Dd_wkBN5.js +168 -0
  182. package/dist/esm/Icon-DPyGDeRK.js +182 -0
  183. package/dist/esm/Image-DhX-4hlV.js +354 -0
  184. package/dist/esm/InjectedChildMixin-D2K-FwuO.js +145 -0
  185. package/dist/esm/Input-C4L520az.js +348 -0
  186. package/dist/esm/Loading-tuQoo6TU.js +143 -0
  187. package/dist/esm/MessageMixin-CQ7LIdvq.js +134 -0
  188. package/dist/esm/Modal-tfvyhxw_.js +313 -0
  189. package/dist/esm/NoticeMixin-ByNlva3T.js +161 -0
  190. package/dist/esm/Pagination-B-LAJQay.js +543 -0
  191. package/dist/esm/Progress-BPGTVZgr.js +174 -0
  192. package/dist/esm/Select-bl4qUzij.js +145 -0
  193. package/dist/esm/SlotComponent-BwNpVnfH.js +39 -0
  194. package/dist/esm/TabbedChildMixin-C4i6WP9j.js +208 -0
  195. package/dist/esm/Tag-jS5Bcj6N.js +165 -0
  196. package/dist/esm/Timepicker-DnkqnOBT.js +281 -0
  197. package/dist/esm/TimepickerMixin-Bikh6_Fg.js +664 -0
  198. package/dist/esm/Tooltip-CtDSXAqa.js +391 -0
  199. package/dist/esm/_plugin-vue_export-helper-OJRSZE6i.js +9 -0
  200. package/dist/esm/autocomplete.js +18 -0
  201. package/dist/esm/breadcrumb.js +101 -0
  202. package/dist/esm/button.js +15 -0
  203. package/dist/esm/carousel.js +818 -0
  204. package/dist/esm/checkbox.js +82 -0
  205. package/dist/esm/clockpicker.js +663 -0
  206. package/dist/esm/collapse.js +94 -0
  207. package/dist/esm/colorpicker.js +16 -0
  208. package/dist/esm/config-CKuo-p6e.js +100 -0
  209. package/dist/esm/config.js +14 -0
  210. package/dist/esm/datepicker.js +23 -0
  211. package/dist/esm/datetimepicker.js +478 -0
  212. package/dist/esm/dialog.js +500 -0
  213. package/dist/esm/dropdown.js +17 -0
  214. package/dist/esm/field.js +14 -0
  215. package/dist/esm/helpers.js +247 -0
  216. package/dist/esm/icon.js +14 -0
  217. package/dist/esm/image.js +14 -0
  218. package/dist/esm/index-CQegEsxK.js +1938 -0
  219. package/dist/esm/index.js +164 -0
  220. package/dist/esm/input.js +17 -0
  221. package/dist/esm/loading.js +81 -0
  222. package/dist/esm/menu.js +333 -0
  223. package/dist/esm/message.js +114 -0
  224. package/dist/esm/modal.js +97 -0
  225. package/dist/esm/navbar.js +565 -0
  226. package/dist/esm/notification.js +275 -0
  227. package/dist/esm/numberinput.js +381 -0
  228. package/dist/esm/pagination.js +16 -0
  229. package/dist/esm/plugins-B172kuKE.js +13 -0
  230. package/dist/esm/progress.js +85 -0
  231. package/dist/esm/radio.js +131 -0
  232. package/dist/esm/rate.js +192 -0
  233. package/dist/esm/select.js +17 -0
  234. package/dist/esm/sidebar.js +304 -0
  235. package/dist/esm/skeleton.js +73 -0
  236. package/dist/esm/slider.js +693 -0
  237. package/dist/esm/snackbar.js +218 -0
  238. package/dist/esm/ssr-C7yEpGLm.js +5 -0
  239. package/dist/esm/steps.js +341 -0
  240. package/dist/esm/switch.js +156 -0
  241. package/dist/esm/table.js +2385 -0
  242. package/dist/esm/tabs.js +252 -0
  243. package/dist/esm/tag.js +38 -0
  244. package/dist/esm/taginput.js +420 -0
  245. package/dist/esm/timepicker.js +24 -0
  246. package/dist/esm/toast.js +156 -0
  247. package/dist/esm/tooltip.js +14 -0
  248. package/dist/esm/trapFocus-KHP_kCNE.js +51 -0
  249. package/dist/esm/upload.js +190 -0
  250. package/dist/tsdoc-metadata.json +11 -0
  251. package/package.json +73 -6
  252. package/src/components/autocomplete/Autocomplete.spec.ts +783 -0
  253. package/src/components/autocomplete/Autocomplete.vue +966 -0
  254. package/src/components/autocomplete/__snapshots__/Autocomplete.spec.ts.snap +21 -0
  255. package/src/components/autocomplete/index.ts +16 -0
  256. package/src/components/breadcrumb/Breadcrumb.spec.ts +65 -0
  257. package/src/components/breadcrumb/Breadcrumb.vue +42 -0
  258. package/src/components/breadcrumb/BreadcrumbItem.spec.ts +74 -0
  259. package/src/components/breadcrumb/BreadcrumbItem.vue +34 -0
  260. package/src/components/breadcrumb/__snapshots__/Breadcrumb.spec.ts.snap +7 -0
  261. package/src/components/breadcrumb/__snapshots__/BreadcrumbItem.spec.ts.snap +3 -0
  262. package/src/components/breadcrumb/index.ts +19 -0
  263. package/src/components/button/Button.spec.ts +117 -0
  264. package/src/components/button/Button.vue +112 -0
  265. package/src/components/button/__snapshots__/Button.spec.ts.snap +9 -0
  266. package/src/components/button/index.ts +16 -0
  267. package/src/components/carousel/Carousel.spec.ts +304 -0
  268. package/src/components/carousel/Carousel.vue +389 -0
  269. package/src/components/carousel/CarouselItem.spec.ts +105 -0
  270. package/src/components/carousel/CarouselItem.vue +38 -0
  271. package/src/components/carousel/CarouselList.spec.ts +172 -0
  272. package/src/components/carousel/CarouselList.vue +364 -0
  273. package/src/components/carousel/__snapshots__/Carousel.spec.ts.snap +19 -0
  274. package/src/components/carousel/__snapshots__/CarouselItem.spec.ts.snap +7 -0
  275. package/src/components/carousel/__snapshots__/CarouselList.spec.ts.snap +36 -0
  276. package/src/components/carousel/index.ts +23 -0
  277. package/src/components/carousel/types.ts +17 -0
  278. package/src/components/checkbox/Checkbox.spec.ts +40 -0
  279. package/src/components/checkbox/Checkbox.vue +63 -0
  280. package/src/components/checkbox/CheckboxButton.spec.ts +46 -0
  281. package/src/components/checkbox/CheckboxButton.vue +59 -0
  282. package/src/components/checkbox/__snapshots__/Checkbox.spec.ts.snap +9 -0
  283. package/src/components/checkbox/__snapshots__/CheckboxButton.spec.ts.snap +3 -0
  284. package/src/components/checkbox/index.ts +20 -0
  285. package/src/components/clockpicker/Clockpicker.spec.ts +161 -0
  286. package/src/components/clockpicker/Clockpicker.vue +311 -0
  287. package/src/components/clockpicker/ClockpickerFace.spec.ts +99 -0
  288. package/src/components/clockpicker/ClockpickerFace.vue +272 -0
  289. package/src/components/clockpicker/__snapshots__/Clockpicker.spec.ts.snap +36 -0
  290. package/src/components/clockpicker/__snapshots__/ClockpickerFace.spec.ts.snap +9 -0
  291. package/src/components/clockpicker/index.ts +16 -0
  292. package/src/components/collapse/Collapse.spec.ts +106 -0
  293. package/src/components/collapse/Collapse.vue +98 -0
  294. package/src/components/collapse/__snapshots__/Collapse.spec.ts.snap +10 -0
  295. package/src/components/collapse/index.ts +16 -0
  296. package/src/components/colorpicker/Colorpicker.spec.ts +22 -0
  297. package/src/components/colorpicker/Colorpicker.vue +416 -0
  298. package/src/components/colorpicker/ColorpickerAlphaSlider.spec.ts +17 -0
  299. package/src/components/colorpicker/ColorpickerAlphaSlider.vue +205 -0
  300. package/src/components/colorpicker/ColorpickerHSLRepresentationSquare.spec.ts +23 -0
  301. package/src/components/colorpicker/ColorpickerHSLRepresentationSquare.vue +380 -0
  302. package/src/components/colorpicker/ColorpickerHSLRepresentationTriangle.spec.ts +23 -0
  303. package/src/components/colorpicker/ColorpickerHSLRepresentationTriangle.vue +456 -0
  304. package/src/components/colorpicker/__snapshots__/Colorpicker.spec.ts.snap +77 -0
  305. package/src/components/colorpicker/__snapshots__/ColorpickerAlphaSlider.spec.ts.snap +9 -0
  306. package/src/components/colorpicker/__snapshots__/ColorpickerHSLRepresentationSquare.spec.ts.snap +12 -0
  307. package/src/components/colorpicker/__snapshots__/ColorpickerHSLRepresentationTriangle.spec.ts.snap +36 -0
  308. package/src/components/colorpicker/index.ts +16 -0
  309. package/src/components/datepicker/Datepicker.spec.ts +482 -0
  310. package/src/components/datepicker/Datepicker.vue +908 -0
  311. package/src/components/datepicker/DatepickerMonth.spec.ts +346 -0
  312. package/src/components/datepicker/DatepickerMonth.vue +444 -0
  313. package/src/components/datepicker/DatepickerTable.spec.ts +290 -0
  314. package/src/components/datepicker/DatepickerTable.vue +398 -0
  315. package/src/components/datepicker/DatepickerTableRow.spec.ts +300 -0
  316. package/src/components/datepicker/DatepickerTableRow.vue +416 -0
  317. package/src/components/datepicker/__snapshots__/Datepicker.spec.ts.snap +54 -0
  318. package/src/components/datepicker/__snapshots__/DatepickerMonth.spec.ts.snap +33 -0
  319. package/src/components/datepicker/__snapshots__/DatepickerTable.spec.ts.snap +16 -0
  320. package/src/components/datepicker/__snapshots__/DatepickerTableRow.spec.ts.snap +23 -0
  321. package/src/components/datepicker/index.ts +17 -0
  322. package/src/components/datepicker/types.ts +41 -0
  323. package/src/components/datetimepicker/Datetimepicker.spec.ts +132 -0
  324. package/src/components/datetimepicker/Datetimepicker.vue +491 -0
  325. package/src/components/datetimepicker/index.ts +16 -0
  326. package/src/components/dialog/Dialog.spec.ts +108 -0
  327. package/src/components/dialog/Dialog.vue +300 -0
  328. package/src/components/dialog/index.ts +169 -0
  329. package/src/components/dropdown/Dropdown.spec.ts +229 -0
  330. package/src/components/dropdown/Dropdown.vue +491 -0
  331. package/src/components/dropdown/DropdownItem.spec.ts +78 -0
  332. package/src/components/dropdown/DropdownItem.vue +112 -0
  333. package/src/components/dropdown/__snapshots__/Dropdown.spec.ts.snap +15 -0
  334. package/src/components/dropdown/__snapshots__/DropdownItem.spec.ts.snap +3 -0
  335. package/src/components/dropdown/index.ts +20 -0
  336. package/src/components/field/Field.spec.ts +324 -0
  337. package/src/components/field/Field.vue +316 -0
  338. package/src/components/field/FieldBody.spec.ts +96 -0
  339. package/src/components/field/FieldBody.vue +74 -0
  340. package/src/components/field/__snapshots__/Field.spec.ts.snap +8 -0
  341. package/src/components/field/__snapshots__/FieldBody.spec.ts.snap +3 -0
  342. package/src/components/field/index.ts +16 -0
  343. package/src/components/icon/Icon.spec.ts +142 -0
  344. package/src/components/icon/Icon.vue +120 -0
  345. package/src/components/icon/__snapshots__/Icon.spec.ts.snap +3 -0
  346. package/src/components/icon/index.ts +17 -0
  347. package/src/components/image/Image.spec.ts +218 -0
  348. package/src/components/image/Image.vue +358 -0
  349. package/src/components/image/__snapshots__/Image.spec.ts.snap +37 -0
  350. package/src/components/image/index.ts +16 -0
  351. package/src/components/index.ts +179 -0
  352. package/src/components/input/Input.spec.ts +396 -0
  353. package/src/components/input/Input.vue +335 -0
  354. package/src/components/input/__snapshots__/Input.spec.ts.snap +9 -0
  355. package/src/components/input/index.ts +17 -0
  356. package/src/components/loading/Loading.spec.ts +151 -0
  357. package/src/components/loading/Loading.vue +135 -0
  358. package/src/components/loading/__snapshots__/Loading.spec.ts.snap +10 -0
  359. package/src/components/loading/index.ts +91 -0
  360. package/src/components/menu/Menu.spec.ts +21 -0
  361. package/src/components/menu/Menu.vue +31 -0
  362. package/src/components/menu/MenuItem.spec.ts +92 -0
  363. package/src/components/menu/MenuItem.vue +168 -0
  364. package/src/components/menu/MenuItemContainerMixin.ts +72 -0
  365. package/src/components/menu/MenuList.spec.ts +35 -0
  366. package/src/components/menu/MenuList.vue +47 -0
  367. package/src/components/menu/__snapshots__/Menu.spec.ts.snap +3 -0
  368. package/src/components/menu/__snapshots__/MenuItem.spec.ts.snap +9 -0
  369. package/src/components/menu/__snapshots__/MenuList.spec.ts.snap +8 -0
  370. package/src/components/menu/index.ts +25 -0
  371. package/src/components/message/Message.spec.ts +30 -0
  372. package/src/components/message/Message.vue +73 -0
  373. package/src/components/message/__snapshots__/Message.spec.ts.snap +11 -0
  374. package/src/components/message/index.ts +15 -0
  375. package/src/components/modal/Modal.spec.ts +167 -0
  376. package/src/components/modal/Modal.vue +335 -0
  377. package/src/components/modal/__snapshots__/Modal.spec.ts.snap +10 -0
  378. package/src/components/modal/index.ts +107 -0
  379. package/src/components/navbar/NavBar.spec.ts +78 -0
  380. package/src/components/navbar/NavBarBurger.spec.ts +30 -0
  381. package/src/components/navbar/NavBarItem.spec.ts +92 -0
  382. package/src/components/navbar/Navbar.vue +274 -0
  383. package/src/components/navbar/NavbarBurger.vue +29 -0
  384. package/src/components/navbar/NavbarDropdown.spec.ts +84 -0
  385. package/src/components/navbar/NavbarDropdown.vue +115 -0
  386. package/src/components/navbar/NavbarItem.vue +97 -0
  387. package/src/components/navbar/__snapshots__/NavBar.spec.ts.snap +11 -0
  388. package/src/components/navbar/__snapshots__/NavBarBurger.spec.ts.snap +3 -0
  389. package/src/components/navbar/__snapshots__/NavBarItem.spec.ts.snap +3 -0
  390. package/src/components/navbar/__snapshots__/NavbarDropdown.spec.ts.snap +7 -0
  391. package/src/components/navbar/index.ts +22 -0
  392. package/src/components/notification/Notification.spec.ts +21 -0
  393. package/src/components/notification/Notification.vue +77 -0
  394. package/src/components/notification/NotificationNotice.vue +76 -0
  395. package/src/components/notification/__snapshots__/Notification.spec.ts.snap +10 -0
  396. package/src/components/notification/index.ts +121 -0
  397. package/src/components/numberinput/Numberinput.spec.ts +445 -0
  398. package/src/components/numberinput/Numberinput.vue +372 -0
  399. package/src/components/numberinput/index.ts +16 -0
  400. package/src/components/pagination/Pagination.spec.ts +94 -0
  401. package/src/components/pagination/Pagination.vue +434 -0
  402. package/src/components/pagination/PaginationButton.spec.ts +42 -0
  403. package/src/components/pagination/PaginationButton.vue +59 -0
  404. package/src/components/pagination/__snapshots__/Pagination.spec.ts.snap +22 -0
  405. package/src/components/pagination/__snapshots__/PaginationButton.spec.ts.snap +3 -0
  406. package/src/components/pagination/index.ts +19 -0
  407. package/src/components/pagination/types.ts +11 -0
  408. package/src/components/progress/Progress.spec.ts +81 -0
  409. package/src/components/progress/Progress.vue +168 -0
  410. package/src/components/progress/ProgressBar.spec.ts +45 -0
  411. package/src/components/progress/ProgressBar.vue +74 -0
  412. package/src/components/progress/__snapshots__/Progress.spec.ts.snap +7 -0
  413. package/src/components/progress/__snapshots__/ProgressBar.spec.ts.snap +7 -0
  414. package/src/components/progress/index.ts +18 -0
  415. package/src/components/radio/Radio.spec.ts +40 -0
  416. package/src/components/radio/Radio.vue +35 -0
  417. package/src/components/radio/RadioButton.spec.ts +40 -0
  418. package/src/components/radio/RadioButton.vue +69 -0
  419. package/src/components/radio/__snapshots__/Radio.spec.ts.snap +3 -0
  420. package/src/components/radio/__snapshots__/RadioButton.spec.ts.snap +3 -0
  421. package/src/components/radio/index.ts +18 -0
  422. package/src/components/rate/Rate.spec.ts +90 -0
  423. package/src/components/rate/Rate.vue +158 -0
  424. package/src/components/rate/index.ts +15 -0
  425. package/src/components/select/Select.spec.ts +74 -0
  426. package/src/components/select/Select.vue +118 -0
  427. package/src/components/select/__snapshots__/Select.spec.ts.snap +7 -0
  428. package/src/components/select/index.ts +16 -0
  429. package/src/components/sidebar/Sidebar.spec.ts +107 -0
  430. package/src/components/sidebar/Sidebar.vue +316 -0
  431. package/src/components/sidebar/__snapshots__/Sidebar.spec.ts.snap +25 -0
  432. package/src/components/sidebar/index.ts +16 -0
  433. package/src/components/skeleton/Skeleton.spec.ts +16 -0
  434. package/src/components/skeleton/Skeleton.vue +98 -0
  435. package/src/components/skeleton/__snapshots__/Skeleton.spec.ts.snap +7 -0
  436. package/src/components/skeleton/index.ts +18 -0
  437. package/src/components/slider/Slider.spec.ts +115 -0
  438. package/src/components/slider/Slider.vue +374 -0
  439. package/src/components/slider/SliderThumb.spec.ts +176 -0
  440. package/src/components/slider/SliderThumb.vue +251 -0
  441. package/src/components/slider/SliderTick.spec.ts +33 -0
  442. package/src/components/slider/SliderTick.vue +50 -0
  443. package/src/components/slider/__snapshots__/Slider.spec.ts.snap +12 -0
  444. package/src/components/slider/__snapshots__/SliderThumb.spec.ts.snap +16 -0
  445. package/src/components/slider/__snapshots__/SliderTick.spec.ts.snap +7 -0
  446. package/src/components/slider/index.ts +19 -0
  447. package/src/components/slider/types.ts +34 -0
  448. package/src/components/snackbar/Snackbar.spec.ts +35 -0
  449. package/src/components/snackbar/Snackbar.vue +88 -0
  450. package/src/components/snackbar/__snapshots__/Snackbar.spec.ts.snap +12 -0
  451. package/src/components/snackbar/index.ts +118 -0
  452. package/src/components/steps/StepItem.spec.ts +114 -0
  453. package/src/components/steps/StepItem.vue +26 -0
  454. package/src/components/steps/Steps.spec.ts +125 -0
  455. package/src/components/steps/Steps.vue +273 -0
  456. package/src/components/steps/__snapshots__/StepItem.spec.ts.snap +7 -0
  457. package/src/components/steps/__snapshots__/Steps.spec.ts.snap +40 -0
  458. package/src/components/steps/index.ts +19 -0
  459. package/src/components/switch/Switch.spec.ts +74 -0
  460. package/src/components/switch/Switch.vue +146 -0
  461. package/src/components/switch/__snapshots__/Switch.spec.ts.snap +3 -0
  462. package/src/components/switch/index.ts +16 -0
  463. package/src/components/table/Table.spec.ts +622 -0
  464. package/src/components/table/Table.vue +1770 -0
  465. package/src/components/table/TableColumn.spec.ts +85 -0
  466. package/src/components/table/TableColumn.vue +140 -0
  467. package/src/components/table/TableMobileSort.spec.ts +47 -0
  468. package/src/components/table/TableMobileSort.vue +236 -0
  469. package/src/components/table/TablePagination.vue +86 -0
  470. package/src/components/table/__snapshots__/Table.spec.ts.snap +24 -0
  471. package/src/components/table/__snapshots__/TableMobileSort.spec.ts.snap +12 -0
  472. package/src/components/table/index.ts +32 -0
  473. package/src/components/table/mockTableColumn.ts +110 -0
  474. package/src/components/table/types.ts +110 -0
  475. package/src/components/tabs/TabItem.spec.ts +203 -0
  476. package/src/components/tabs/TabItem.vue +19 -0
  477. package/src/components/tabs/Tabs.spec.ts +122 -0
  478. package/src/components/tabs/Tabs.vue +204 -0
  479. package/src/components/tabs/__snapshots__/TabItem.spec.ts.snap +7 -0
  480. package/src/components/tabs/__snapshots__/Tabs.spec.ts.snap +33 -0
  481. package/src/components/tabs/index.ts +19 -0
  482. package/src/components/tag/Tag.spec.ts +32 -0
  483. package/src/components/tag/Tag.vue +132 -0
  484. package/src/components/tag/Taglist.spec.ts +21 -0
  485. package/src/components/tag/Taglist.vue +16 -0
  486. package/src/components/tag/__snapshots__/Tag.spec.ts.snap +6 -0
  487. package/src/components/tag/__snapshots__/Taglist.spec.ts.snap +3 -0
  488. package/src/components/tag/index.ts +19 -0
  489. package/src/components/taginput/Taginput.spec.ts +132 -0
  490. package/src/components/taginput/Taginput.vue +415 -0
  491. package/src/components/taginput/__snapshots__/Taginput.spec.ts.snap +10 -0
  492. package/src/components/taginput/index.ts +16 -0
  493. package/src/components/timepicker/Timepicker.spec.ts +108 -0
  494. package/src/components/timepicker/Timepicker.vue +183 -0
  495. package/src/components/timepicker/__snapshots__/Timepicker.spec.ts.snap +41 -0
  496. package/src/components/timepicker/index.ts +17 -0
  497. package/src/components/toast/Toast.spec.ts +74 -0
  498. package/src/components/toast/Toast.vue +46 -0
  499. package/src/components/toast/__snapshots__/Toast.spec.ts.snap +10 -0
  500. package/src/components/toast/index.ts +120 -0
  501. package/src/components/tooltip/Tooltip.spec.ts +64 -0
  502. package/src/components/tooltip/Tooltip.vue +393 -0
  503. package/src/components/tooltip/__snapshots__/Tooltip.spec.ts.snap +12 -0
  504. package/src/components/tooltip/index.ts +16 -0
  505. package/src/components/upload/Upload.spec.ts +62 -0
  506. package/src/components/upload/Upload.vue +188 -0
  507. package/src/components/upload/__snapshots__/Upload.spec.ts.snap +3 -0
  508. package/src/components/upload/index.ts +15 -0
  509. package/src/directives/clickOutside.ts +113 -0
  510. package/src/directives/trapFocus.ts +61 -0
  511. package/src/index.ts +43 -0
  512. package/src/scss/buefy-build.scss +6 -0
  513. package/src/scss/buefy.scss +39 -0
  514. package/src/scss/components/_autocomplete.scss +39 -0
  515. package/src/scss/components/_carousel.scss +204 -0
  516. package/src/scss/components/_checkbox.scss +106 -0
  517. package/src/scss/components/_clockpicker.scss +283 -0
  518. package/src/scss/components/_collapse.scss +9 -0
  519. package/src/scss/components/_colorpicker.scss +283 -0
  520. package/src/scss/components/_datepicker.scss +220 -0
  521. package/src/scss/components/_dialog.scss +54 -0
  522. package/src/scss/components/_dropdown.scss +143 -0
  523. package/src/scss/components/_form.scss +309 -0
  524. package/src/scss/components/_icon.scss +16 -0
  525. package/src/scss/components/_image.scss +20 -0
  526. package/src/scss/components/_loading.scss +45 -0
  527. package/src/scss/components/_menu.scss +11 -0
  528. package/src/scss/components/_message.scss +16 -0
  529. package/src/scss/components/_modal.scss +37 -0
  530. package/src/scss/components/_navbar.scss +22 -0
  531. package/src/scss/components/_notices.scss +144 -0
  532. package/src/scss/components/_notification.scss +8 -0
  533. package/src/scss/components/_numberinput.scss +33 -0
  534. package/src/scss/components/_pagination.scss +63 -0
  535. package/src/scss/components/_progress.scss +105 -0
  536. package/src/scss/components/_radio.scss +123 -0
  537. package/src/scss/components/_rate.scss +72 -0
  538. package/src/scss/components/_select.scss +38 -0
  539. package/src/scss/components/_sidebar.scss +107 -0
  540. package/src/scss/components/_skeleton.scss +66 -0
  541. package/src/scss/components/_slider.scss +162 -0
  542. package/src/scss/components/_steps.scss +491 -0
  543. package/src/scss/components/_switch.scss +214 -0
  544. package/src/scss/components/_table.scss +322 -0
  545. package/src/scss/components/_tabs.scss +197 -0
  546. package/src/scss/components/_tag.scss +36 -0
  547. package/src/scss/components/_taginput.scss +73 -0
  548. package/src/scss/components/_timepicker.scss +73 -0
  549. package/src/scss/components/_tooltip.scss +192 -0
  550. package/src/scss/components/_upload.scss +62 -0
  551. package/src/scss/utils/_all.scss +4 -0
  552. package/src/scss/utils/_animations.scss +183 -0
  553. package/src/scss/utils/_functions.scss +49 -0
  554. package/src/scss/utils/_helpers.scss +6 -0
  555. package/src/scss/utils/_variables-ext.scss +2 -0
  556. package/src/scss/utils/_variables.scss +16 -0
  557. package/src/utils/CheckRadioMixin.spec.ts +28 -0
  558. package/src/utils/CheckRadioMixin.ts +61 -0
  559. package/src/utils/CompatFallthroughMixin.ts +34 -0
  560. package/src/utils/ConfigComponent.ts +12 -0
  561. package/src/utils/FormElementMixin.spec.ts +41 -0
  562. package/src/utils/FormElementMixin.ts +206 -0
  563. package/src/utils/InjectedChildMixin.ts +139 -0
  564. package/src/utils/MessageMixin.spec.ts +51 -0
  565. package/src/utils/MessageMixin.ts +138 -0
  566. package/src/utils/NoticeMixin.spec.ts +55 -0
  567. package/src/utils/NoticeMixin.ts +181 -0
  568. package/src/utils/ProvideInjectTypes.ts +20 -0
  569. package/src/utils/ProviderParentMixin.ts +105 -0
  570. package/src/utils/SlotComponent.spec.ts +55 -0
  571. package/src/utils/SlotComponent.ts +38 -0
  572. package/src/utils/TabbedChildMixin.ts +96 -0
  573. package/src/utils/TabbedMixin.ts +166 -0
  574. package/src/utils/TabbedTypes.ts +33 -0
  575. package/src/utils/TimepickerMixin.spec.ts +75 -0
  576. package/src/utils/TimepickerMixin.ts +767 -0
  577. package/src/utils/color.spec.ts +55 -0
  578. package/src/utils/color.ts +507 -0
  579. package/src/utils/config.spec.ts +11 -0
  580. package/src/utils/config.ts +619 -0
  581. package/src/utils/debounce.spec.ts +52 -0
  582. package/src/utils/debounce.ts +20 -0
  583. package/src/utils/helpers.spec.ts +257 -0
  584. package/src/utils/helpers.ts +527 -0
  585. package/src/utils/icons.ts +73 -0
  586. package/src/utils/plugins.ts +20 -0
  587. package/src/utils/ssr.ts +6 -0
  588. package/src/utils/vue-augmentation.ts +35 -0
@@ -0,0 +1,2385 @@
1
+ import { defineComponent, resolveComponent, createElementBlock, openBlock, createElementVNode, createBlock, withCtx, Fragment, renderList, createTextVNode, createCommentVNode, toDisplayString, withDirectives, vShow, createVNode, normalizeClass, renderSlot, h, toRaw, mergeProps, normalizeStyle, withKeys, withModifiers, toHandlerKey, Transition } from 'vue';
2
+ import { getValueByPath, toCssWidth, removeElement, translateTouchAsDragEvent, isFragment, escapeRegExpChars, removeDiacriticsFromString, indexOf, multiColumnSort, isNil, createAbsoluteElement } from './helpers.js';
3
+ import { B as BPagination, d as debounce } from './Pagination-B-LAJQay.js';
4
+ import { C as CompatFallthroughMixin } from './CompatFallthroughMixin-C8LPuwDr.js';
5
+ import { B as BCheckbox } from './Checkbox-KUMz0sfA.js';
6
+ import { B as BIcon } from './Icon-DPyGDeRK.js';
7
+ import { B as BInput } from './Input-C4L520az.js';
8
+ import { B as BLoading } from './Loading-tuQoo6TU.js';
9
+ import { B as BSlotComponent } from './SlotComponent-BwNpVnfH.js';
10
+ import { B as BSelect } from './Select-bl4qUzij.js';
11
+ import { _ as _export_sfc } from './_plugin-vue_export-helper-OJRSZE6i.js';
12
+ import { a as registerComponent } from './plugins-B172kuKE.js';
13
+ import './config-CKuo-p6e.js';
14
+ import './CheckRadioMixin-DSD_rjC8.js';
15
+ import './FormElementMixin-Dd_wkBN5.js';
16
+ import './ssr-C7yEpGLm.js';
17
+
18
+ var _sfc_main$3 = defineComponent({
19
+ name: "BTableMobileSort",
20
+ components: {
21
+ BSelect,
22
+ BIcon
23
+ },
24
+ props: {
25
+ currentSortColumn: Object,
26
+ sortMultipleData: Array,
27
+ isAsc: Boolean,
28
+ columns: Array,
29
+ placeholder: String,
30
+ iconPack: String,
31
+ sortIcon: {
32
+ type: String,
33
+ default: "arrow-up"
34
+ },
35
+ sortIconSize: {
36
+ type: String,
37
+ default: "is-small"
38
+ },
39
+ sortMultiple: {
40
+ type: Boolean,
41
+ default: false
42
+ }
43
+ },
44
+ emits: {
45
+ /* eslint-disable @typescript-eslint/no-unused-vars */
46
+ removePriority: (_column) => true,
47
+ sort: (_column, _event) => true
48
+ /* eslint-enable @typescript-eslint/no-unused-vars */
49
+ },
50
+ data() {
51
+ return {
52
+ sortMultipleSelect: null,
53
+ sortMultipleSelectIndex: -1,
54
+ mobileSort: this.currentSortColumn,
55
+ mobileSortIndex: this.columns ? this.columns.indexOf(this.currentSortColumn) : -1,
56
+ defaultEvent: {
57
+ shiftKey: true,
58
+ altKey: true,
59
+ ctrlKey: true
60
+ },
61
+ ignoreSort: false
62
+ };
63
+ },
64
+ computed: {
65
+ showPlaceholder() {
66
+ return !this.columns || !this.columns.some((column) => column === this.mobileSort);
67
+ },
68
+ sortableColumns() {
69
+ return this.columns && this.columns.filter((column) => column.sortable);
70
+ }
71
+ },
72
+ watch: {
73
+ sortMultipleSelect(column) {
74
+ if (this.ignoreSort) {
75
+ this.ignoreSort = false;
76
+ } else {
77
+ this.$emit("sort", column, this.defaultEvent);
78
+ }
79
+ },
80
+ sortMultipleSelectIndex(index) {
81
+ if (index !== -1) {
82
+ this.sortMultipleSelect = this.columns[index];
83
+ } else {
84
+ this.sortMultipleSelect = null;
85
+ }
86
+ },
87
+ mobileSort(column) {
88
+ if (this.currentSortColumn === column) return;
89
+ this.$emit("sort", column, this.defaultEvent);
90
+ },
91
+ mobileSortIndex(index) {
92
+ if (index !== -1) {
93
+ this.mobileSort = this.columns[index];
94
+ }
95
+ },
96
+ currentSortColumn(column) {
97
+ this.mobileSort = column;
98
+ this.mobileSortIndex = this.columns ? this.columns.indexOf(column) : -1;
99
+ },
100
+ columns(newColumns) {
101
+ if (this.sortMultiple) {
102
+ this.sortMultipleSelectIndex = newColumns.indexOf(
103
+ this.sortMultipleSelect
104
+ );
105
+ } else {
106
+ this.mobileSortIndex = newColumns.indexOf(this.mobileSort);
107
+ }
108
+ }
109
+ },
110
+ methods: {
111
+ removePriority() {
112
+ this.$emit("removePriority", this.sortMultipleSelect);
113
+ this.ignoreSort = true;
114
+ const remainingFields = this.sortMultipleData.filter((data) => data.field !== this.sortMultipleSelect.field).map((data) => data.field);
115
+ this.sortMultipleSelectIndex = this.columns.findIndex((column) => remainingFields.includes(column.field));
116
+ },
117
+ getSortingObjectOfColumn(column) {
118
+ return this.sortMultipleData.filter((i) => i.field === column.field)[0];
119
+ },
120
+ columnIsDesc(column) {
121
+ const sortingObject = column && this.getSortingObjectOfColumn(column);
122
+ if (sortingObject) {
123
+ return !!(sortingObject.order && sortingObject.order === "desc");
124
+ }
125
+ return true;
126
+ },
127
+ getLabel(column) {
128
+ const sortingObject = this.getSortingObjectOfColumn(column);
129
+ if (sortingObject) {
130
+ return column.label + "(" + (this.sortMultipleData.indexOf(sortingObject) + 1) + ")";
131
+ }
132
+ return column.label;
133
+ },
134
+ sort() {
135
+ this.$emit("sort", this.sortMultiple ? this.sortMultipleSelect : this.mobileSort, this.defaultEvent);
136
+ }
137
+ }
138
+ });
139
+
140
+ const _hoisted_1$2 = { class: "field table-mobile-sort" };
141
+ const _hoisted_2$2 = { class: "field has-addons" };
142
+ const _hoisted_3$2 = ["value"];
143
+ const _hoisted_4$2 = ["value"];
144
+ const _hoisted_5$1 = { class: "control" };
145
+ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
146
+ const _component_b_select = resolveComponent("b-select");
147
+ const _component_b_icon = resolveComponent("b-icon");
148
+ return openBlock(), createElementBlock("div", _hoisted_1$2, [
149
+ createElementVNode("div", _hoisted_2$2, [
150
+ _ctx.sortMultiple ? (openBlock(), createBlock(_component_b_select, {
151
+ key: 0,
152
+ modelValue: _ctx.sortMultipleSelectIndex,
153
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.sortMultipleSelectIndex = $event),
154
+ expanded: ""
155
+ }, {
156
+ default: withCtx(() => [
157
+ (openBlock(true), createElementBlock(
158
+ Fragment,
159
+ null,
160
+ renderList(_ctx.sortableColumns, (column, index) => {
161
+ return openBlock(), createElementBlock("option", {
162
+ key: index,
163
+ value: index
164
+ }, [
165
+ createTextVNode(
166
+ toDisplayString(_ctx.getLabel(column)) + " ",
167
+ 1
168
+ /* TEXT */
169
+ ),
170
+ _ctx.getSortingObjectOfColumn(column) ? (openBlock(), createElementBlock(
171
+ Fragment,
172
+ { key: 0 },
173
+ [
174
+ _ctx.columnIsDesc(column) ? (openBlock(), createElementBlock(
175
+ Fragment,
176
+ { key: 0 },
177
+ [
178
+ createTextVNode(" ↓ ")
179
+ ],
180
+ 64
181
+ /* STABLE_FRAGMENT */
182
+ )) : (openBlock(), createElementBlock(
183
+ Fragment,
184
+ { key: 1 },
185
+ [
186
+ createTextVNode(" ↑ ")
187
+ ],
188
+ 64
189
+ /* STABLE_FRAGMENT */
190
+ ))
191
+ ],
192
+ 64
193
+ /* STABLE_FRAGMENT */
194
+ )) : createCommentVNode("v-if", true)
195
+ ], 8, _hoisted_3$2);
196
+ }),
197
+ 128
198
+ /* KEYED_FRAGMENT */
199
+ ))
200
+ ]),
201
+ _: 1
202
+ /* STABLE */
203
+ }, 8, ["modelValue"])) : (openBlock(), createBlock(_component_b_select, {
204
+ key: 1,
205
+ modelValue: _ctx.mobileSortIndex,
206
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.mobileSortIndex = $event),
207
+ expanded: ""
208
+ }, {
209
+ default: withCtx(() => [
210
+ _ctx.placeholder ? withDirectives((openBlock(), createElementBlock(
211
+ "option",
212
+ {
213
+ key: 0,
214
+ value: {},
215
+ selected: "",
216
+ disabled: "",
217
+ hidden: ""
218
+ },
219
+ toDisplayString(_ctx.placeholder),
220
+ 513
221
+ /* TEXT, NEED_PATCH */
222
+ )), [
223
+ [vShow, _ctx.showPlaceholder]
224
+ ]) : createCommentVNode("v-if", true),
225
+ (openBlock(true), createElementBlock(
226
+ Fragment,
227
+ null,
228
+ renderList(_ctx.sortableColumns, (column, index) => {
229
+ return openBlock(), createElementBlock("option", {
230
+ key: index,
231
+ value: index
232
+ }, toDisplayString(column.label), 9, _hoisted_4$2);
233
+ }),
234
+ 128
235
+ /* KEYED_FRAGMENT */
236
+ ))
237
+ ]),
238
+ _: 1
239
+ /* STABLE */
240
+ }, 8, ["modelValue"])),
241
+ createElementVNode("div", _hoisted_5$1, [
242
+ _ctx.sortMultiple && _ctx.sortMultipleData.length > 0 ? (openBlock(), createElementBlock(
243
+ Fragment,
244
+ { key: 0 },
245
+ [
246
+ createElementVNode("button", {
247
+ class: "button is-primary",
248
+ onClick: _cache[2] || (_cache[2] = (...args) => _ctx.sort && _ctx.sort(...args))
249
+ }, [
250
+ createVNode(_component_b_icon, {
251
+ class: normalizeClass({ "is-desc": _ctx.columnIsDesc(_ctx.sortMultipleSelect) }),
252
+ icon: _ctx.sortIcon,
253
+ pack: _ctx.iconPack,
254
+ size: _ctx.sortIconSize,
255
+ both: ""
256
+ }, null, 8, ["class", "icon", "pack", "size"])
257
+ ]),
258
+ createElementVNode("button", {
259
+ class: "button is-primary",
260
+ onClick: _cache[3] || (_cache[3] = (...args) => _ctx.removePriority && _ctx.removePriority(...args))
261
+ }, [
262
+ createVNode(_component_b_icon, {
263
+ icon: "delete",
264
+ size: _ctx.sortIconSize,
265
+ both: ""
266
+ }, null, 8, ["size"])
267
+ ])
268
+ ],
269
+ 64
270
+ /* STABLE_FRAGMENT */
271
+ )) : !_ctx.sortMultiple ? (openBlock(), createElementBlock("button", {
272
+ key: 1,
273
+ class: "button is-primary",
274
+ onClick: _cache[4] || (_cache[4] = (...args) => _ctx.sort && _ctx.sort(...args))
275
+ }, [
276
+ withDirectives(createVNode(_component_b_icon, {
277
+ class: normalizeClass({ "is-desc": !_ctx.isAsc }),
278
+ icon: _ctx.sortIcon,
279
+ pack: _ctx.iconPack,
280
+ size: _ctx.sortIconSize,
281
+ both: ""
282
+ }, null, 8, ["class", "icon", "pack", "size"]), [
283
+ [vShow, _ctx.currentSortColumn === _ctx.mobileSort]
284
+ ])
285
+ ])) : createCommentVNode("v-if", true)
286
+ ])
287
+ ])
288
+ ]);
289
+ }
290
+ var BTableMobileSort = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$2]]);
291
+
292
+ var _sfc_main$2 = defineComponent({
293
+ name: "BTablePagination",
294
+ components: {
295
+ BPagination
296
+ },
297
+ props: {
298
+ paginated: Boolean,
299
+ total: [Number, String],
300
+ perPage: [Number, String],
301
+ currentPage: [Number, String],
302
+ paginationSimple: Boolean,
303
+ paginationSize: String,
304
+ rounded: Boolean,
305
+ iconPack: String,
306
+ ariaNextLabel: String,
307
+ ariaPreviousLabel: String,
308
+ ariaPageLabel: String,
309
+ ariaCurrentLabel: String,
310
+ pageInput: Boolean,
311
+ paginationOrder: String,
312
+ pageInputPosition: String,
313
+ debouncePageInput: [Number, String]
314
+ },
315
+ emits: {
316
+ /* eslint-disable @typescript-eslint/no-unused-vars */
317
+ "page-change": (_page) => true,
318
+ "update:currentPage": (_page) => true
319
+ /* eslint-enable @typescript-eslint/no-unused-vars */
320
+ },
321
+ data() {
322
+ return {
323
+ newCurrentPage: this.currentPage
324
+ };
325
+ },
326
+ watch: {
327
+ currentPage(newVal) {
328
+ this.newCurrentPage = newVal;
329
+ }
330
+ },
331
+ methods: {
332
+ /*
333
+ * Paginator change listener.
334
+ */
335
+ pageChanged(page) {
336
+ this.newCurrentPage = page > 0 ? page : 1;
337
+ this.$emit("update:currentPage", this.newCurrentPage);
338
+ this.$emit("page-change", this.newCurrentPage);
339
+ }
340
+ }
341
+ });
342
+
343
+ const _hoisted_1$1 = { class: "top level" };
344
+ const _hoisted_2$1 = { class: "level-left" };
345
+ const _hoisted_3$1 = { class: "level-right" };
346
+ const _hoisted_4$1 = {
347
+ key: 0,
348
+ class: "level-item"
349
+ };
350
+ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
351
+ const _component_b_pagination = resolveComponent("b-pagination");
352
+ return openBlock(), createElementBlock("div", _hoisted_1$1, [
353
+ createElementVNode("div", _hoisted_2$1, [
354
+ renderSlot(_ctx.$slots, "default")
355
+ ]),
356
+ createElementVNode("div", _hoisted_3$1, [
357
+ _ctx.paginated ? (openBlock(), createElementBlock("div", _hoisted_4$1, [
358
+ createVNode(_component_b_pagination, {
359
+ "icon-pack": _ctx.iconPack,
360
+ total: _ctx.total,
361
+ "per-page": _ctx.perPage,
362
+ simple: _ctx.paginationSimple,
363
+ size: _ctx.paginationSize,
364
+ "model-value": _ctx.newCurrentPage,
365
+ rounded: _ctx.rounded,
366
+ onChange: _ctx.pageChanged,
367
+ "aria-next-label": _ctx.ariaNextLabel,
368
+ "aria-previous-label": _ctx.ariaPreviousLabel,
369
+ "aria-page-label": _ctx.ariaPageLabel,
370
+ "aria-current-label": _ctx.ariaCurrentLabel,
371
+ "page-input": _ctx.pageInput,
372
+ order: _ctx.paginationOrder,
373
+ "page-input-position": _ctx.pageInputPosition,
374
+ "debounce-page-input": _ctx.debouncePageInput
375
+ }, null, 8, ["icon-pack", "total", "per-page", "simple", "size", "model-value", "rounded", "onChange", "aria-next-label", "aria-previous-label", "aria-page-label", "aria-current-label", "page-input", "order", "page-input-position", "debounce-page-input"])
376
+ ])) : createCommentVNode("v-if", true)
377
+ ])
378
+ ]);
379
+ }
380
+ var BTablePagination = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$1]]);
381
+
382
+ var __defProp = Object.defineProperty;
383
+ var __defProps = Object.defineProperties;
384
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
385
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
386
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
387
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
388
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
389
+ var __spreadValues = (a, b) => {
390
+ for (var prop in b || (b = {}))
391
+ if (__hasOwnProp.call(b, prop))
392
+ __defNormalProp(a, prop, b[prop]);
393
+ if (__getOwnPropSymbols)
394
+ for (var prop of __getOwnPropSymbols(b)) {
395
+ if (__propIsEnum.call(b, prop))
396
+ __defNormalProp(a, prop, b[prop]);
397
+ }
398
+ return a;
399
+ };
400
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
401
+ function mockTableColumn(table, column) {
402
+ const defaultProps = {
403
+ label: void 0,
404
+ customKey: void 0,
405
+ field: void 0,
406
+ meta: void 0,
407
+ width: void 0,
408
+ numeric: void 0,
409
+ centered: void 0,
410
+ searchable: void 0,
411
+ sortable: void 0,
412
+ visible: true,
413
+ subheading: void 0,
414
+ customSort: void 0,
415
+ customSearch: void 0,
416
+ sticky: void 0,
417
+ headerSelectable: void 0,
418
+ headerClass: void 0,
419
+ /* eslint-disable @typescript-eslint/no-explicit-any */
420
+ thAttrs: () => ({}),
421
+ tdAttrs: () => ({})
422
+ /* eslint-enable @typescript-eslint/no-explicit-any */
423
+ };
424
+ return __spreadProps(__spreadValues(__spreadValues({}, defaultProps), column), {
425
+ // data
426
+ newKey: column.customKey || column.label,
427
+ _isTableColumn: true,
428
+ // public computed
429
+ get thClasses() {
430
+ const attrs = this.thAttrs(this);
431
+ const classes = [this.headerClass, {
432
+ "is-sortable": this.sortable,
433
+ "is-sticky": this.sticky,
434
+ "is-unselectable": this.isHeaderUnSelectable
435
+ }];
436
+ if (attrs && attrs.class) {
437
+ classes.push(attrs.class);
438
+ }
439
+ return classes;
440
+ },
441
+ get thStyle() {
442
+ const attrs = this.thAttrs(this);
443
+ const style = [this.style];
444
+ if (attrs && attrs.style) {
445
+ style.push(attrs.style);
446
+ }
447
+ return style;
448
+ },
449
+ get thWrapStyle() {
450
+ return this.style;
451
+ },
452
+ get style() {
453
+ var _a;
454
+ return {
455
+ width: (_a = toCssWidth(this.width)) != null ? _a : void 0
456
+ // null → undefined to satisfy StyleValue
457
+ };
458
+ },
459
+ getRootClasses(row) {
460
+ const attrs = this.tdAttrs(row, this);
461
+ const classes = [this.rootClasses];
462
+ if (attrs && attrs.class) {
463
+ classes.push(attrs.class);
464
+ }
465
+ return classes;
466
+ },
467
+ getRootStyle(row) {
468
+ const attrs = this.tdAttrs(row, this);
469
+ const style = [];
470
+ if (attrs && attrs.style) {
471
+ style.push(attrs.style);
472
+ }
473
+ return style;
474
+ },
475
+ $slots: {
476
+ default: (props) => {
477
+ const vnode = h("span", {
478
+ innerHTML: getValueByPath(props.row, column.field)
479
+ });
480
+ return [vnode];
481
+ }
482
+ },
483
+ // private properties
484
+ get rootClasses() {
485
+ return [this.cellClass, {
486
+ "has-text-right": this.numeric && !this.centered,
487
+ "has-text-centered": this.centered,
488
+ "is-sticky": this.sticky
489
+ }];
490
+ },
491
+ get isHeaderUnSelectable() {
492
+ return !this.headerSelectable && !!this.sortable;
493
+ }
494
+ });
495
+ }
496
+
497
+ const BLANK_COLUMN = {
498
+ thAttrs: () => ({}),
499
+ tdAttrs: () => ({}),
500
+ getRootClasses: () => [],
501
+ getRootStyle: () => void 0,
502
+ $slots: {}
503
+ };
504
+ var _sfc_main$1 = defineComponent({
505
+ name: "BTable",
506
+ components: {
507
+ BCheckbox,
508
+ BIcon,
509
+ BInput,
510
+ BLoading,
511
+ BSlotComponent,
512
+ BTableMobileSort,
513
+ BTablePagination
514
+ },
515
+ mixins: [CompatFallthroughMixin],
516
+ provide() {
517
+ return {
518
+ $table: this
519
+ };
520
+ },
521
+ props: {
522
+ data: {
523
+ type: Array,
524
+ default: () => []
525
+ },
526
+ columns: {
527
+ type: Array,
528
+ default: () => []
529
+ },
530
+ bordered: Boolean,
531
+ striped: Boolean,
532
+ narrowed: Boolean,
533
+ hoverable: Boolean,
534
+ loading: Boolean,
535
+ detailed: Boolean,
536
+ checkable: Boolean,
537
+ headerCheckable: {
538
+ type: Boolean,
539
+ default: true
540
+ },
541
+ checkboxType: {
542
+ type: String,
543
+ default: "is-primary"
544
+ },
545
+ checkboxPosition: {
546
+ type: String,
547
+ default: "left",
548
+ validator: (value) => {
549
+ return [
550
+ "left",
551
+ "right"
552
+ ].indexOf(value) >= 0;
553
+ }
554
+ },
555
+ stickyCheckbox: {
556
+ type: Boolean,
557
+ default: false
558
+ },
559
+ selected: Object,
560
+ isRowSelectable: {
561
+ type: Function,
562
+ default: () => true
563
+ },
564
+ focusable: Boolean,
565
+ customIsChecked: Function,
566
+ isRowCheckable: {
567
+ type: Function,
568
+ default: () => true
569
+ },
570
+ checkedRows: {
571
+ type: Array,
572
+ default: () => []
573
+ },
574
+ mobileCards: {
575
+ type: Boolean,
576
+ default: true
577
+ },
578
+ defaultSort: [String, Array],
579
+ defaultSortDirection: {
580
+ type: String,
581
+ default: "asc"
582
+ },
583
+ sortIcon: {
584
+ type: String,
585
+ default: "arrow-up"
586
+ },
587
+ sortIconSize: {
588
+ type: String,
589
+ default: "is-small"
590
+ },
591
+ sortMultiple: {
592
+ type: Boolean,
593
+ default: false
594
+ },
595
+ sortMultipleData: {
596
+ type: Array,
597
+ default: () => []
598
+ },
599
+ sortMultipleKey: {
600
+ type: String,
601
+ default: null
602
+ },
603
+ paginated: Boolean,
604
+ currentPage: {
605
+ type: Number,
606
+ default: 1
607
+ },
608
+ perPage: {
609
+ type: [Number, String],
610
+ default: 20
611
+ },
612
+ showDetailIcon: {
613
+ type: Boolean,
614
+ default: true
615
+ },
616
+ detailIcon: {
617
+ type: String,
618
+ default: "chevron-right"
619
+ },
620
+ paginationPosition: {
621
+ type: String,
622
+ default: "bottom",
623
+ validator: (value) => {
624
+ return [
625
+ "bottom",
626
+ "top",
627
+ "both"
628
+ ].indexOf(value) >= 0;
629
+ }
630
+ },
631
+ paginationRounded: Boolean,
632
+ backendSorting: Boolean,
633
+ backendFiltering: Boolean,
634
+ rowClass: {
635
+ type: Function,
636
+ default: () => ""
637
+ },
638
+ openedDetailed: {
639
+ type: Array,
640
+ default: () => []
641
+ },
642
+ hasDetailedVisible: {
643
+ type: Function,
644
+ default: () => true
645
+ },
646
+ detailKey: {
647
+ type: String,
648
+ default: ""
649
+ },
650
+ detailTransition: {
651
+ type: String,
652
+ default: ""
653
+ },
654
+ customDetailRow: {
655
+ type: Boolean,
656
+ default: false
657
+ },
658
+ backendPagination: Boolean,
659
+ total: {
660
+ type: [Number, String],
661
+ default: 0
662
+ },
663
+ iconPack: String,
664
+ mobileSortPlaceholder: String,
665
+ customRowKey: String,
666
+ draggable: {
667
+ type: Boolean,
668
+ default: false
669
+ },
670
+ draggableColumn: {
671
+ type: Boolean,
672
+ default: false
673
+ },
674
+ scrollable: Boolean,
675
+ ariaNextLabel: String,
676
+ ariaPreviousLabel: String,
677
+ ariaPageLabel: String,
678
+ ariaCurrentLabel: String,
679
+ stickyHeader: Boolean,
680
+ height: [Number, String],
681
+ filtersEvent: {
682
+ type: String,
683
+ default: ""
684
+ },
685
+ cardLayout: Boolean,
686
+ showHeader: {
687
+ type: Boolean,
688
+ default: true
689
+ },
690
+ debounceSearch: Number,
691
+ caption: String,
692
+ showCaption: {
693
+ type: Boolean,
694
+ default: true
695
+ },
696
+ pageInput: {
697
+ type: Boolean,
698
+ default: false
699
+ },
700
+ paginationOrder: String,
701
+ pageInputPosition: String,
702
+ debouncePageInput: [Number, String]
703
+ },
704
+ emits: {
705
+ /* eslint-disable @typescript-eslint/no-unused-vars */
706
+ cellclick: (_row, _column, _rowIndex, _colIndex) => true,
707
+ check: (_checkedRows, _row) => true,
708
+ "check-all": (_rows) => true,
709
+ click: (_row) => true,
710
+ columndragend: (_event) => true,
711
+ columndragleave: (_event) => true,
712
+ columndragover: (_event) => true,
713
+ columndragstart: (_event) => true,
714
+ columndrop: (_event) => true,
715
+ contextmenu: (_row, _event) => true,
716
+ dblclick: (_row) => true,
717
+ "details-close": (_row) => true,
718
+ "details-open": (_row) => true,
719
+ dragend: (_event) => true,
720
+ dragleave: (_event) => true,
721
+ dragover: (_event) => true,
722
+ dragstart: (_event) => true,
723
+ drop: (_event) => true,
724
+ "filters-change": (_value) => true,
725
+ "page-change": (_page) => true,
726
+ select: (_new, _old) => true,
727
+ sort: (_field, _order, _event) => true,
728
+ "sorting-priority-removed": (_field) => true,
729
+ "update:checkedRows": (_rows) => true,
730
+ "update:currentPage": (_page) => true,
731
+ "update:openedDetailed": (_rows) => true,
732
+ "update:selected": (_row) => true
733
+ /* eslint-enable @typescript-eslint/no-unused-vars */
734
+ },
735
+ data() {
736
+ return {
737
+ sortMultipleDataLocal: [],
738
+ getValueByPath,
739
+ visibleDetailRows: this.openedDetailed,
740
+ newData: this.data,
741
+ newDataTotal: this.backendPagination ? this.total : this.data.length,
742
+ newCheckedRows: [...this.checkedRows],
743
+ lastCheckedRowIndex: null,
744
+ newCurrentPage: this.currentPage,
745
+ currentSortColumn: {},
746
+ isAsc: true,
747
+ filters: {},
748
+ defaultSlots: [],
749
+ firstTimeSort: true,
750
+ // Used by first time initSort
751
+ isDraggingRow: false,
752
+ isDraggingColumn: false,
753
+ debouncedHandleFiltersChange: void 0,
754
+ // for touch-enabled devices
755
+ _selectedRow: null,
756
+ mayBeTouchDragging: false,
757
+ touchDragoverTarget: null,
758
+ _draggedCellEl: void 0,
759
+ draggedCellContent: ""
760
+ };
761
+ },
762
+ computed: {
763
+ sortMultipleDataComputed() {
764
+ return this.backendSorting ? this.sortMultipleData : this.sortMultipleDataLocal;
765
+ },
766
+ tableClasses() {
767
+ return {
768
+ "is-bordered": this.bordered,
769
+ "is-striped": this.striped,
770
+ "is-narrow": this.narrowed,
771
+ "is-hoverable": (this.hoverable || this.focusable) && this.visibleData.length
772
+ };
773
+ },
774
+ tableWrapperClasses() {
775
+ return {
776
+ "has-mobile-cards": this.mobileCards,
777
+ "has-sticky-header": this.stickyHeader,
778
+ "is-card-list": this.cardLayout,
779
+ "table-container": this.isScrollable
780
+ };
781
+ },
782
+ tableStyle() {
783
+ return {
784
+ height: toCssWidth(this.height)
785
+ };
786
+ },
787
+ touchDraggedCellClasses() {
788
+ return {
789
+ "has-mobile-cards": this.mobileCards
790
+ };
791
+ },
792
+ /*
793
+ * Splitted data based on the pagination.
794
+ */
795
+ visibleData() {
796
+ if (!this.paginated) return this.newData;
797
+ const currentPage = this.newCurrentPage;
798
+ const perPage = +this.perPage;
799
+ if (this.newData.length <= perPage) {
800
+ return this.newData;
801
+ } else {
802
+ const start = (currentPage - 1) * perPage;
803
+ const end = parseInt(start + "", 10) + parseInt(perPage + "", 10);
804
+ return this.newData.slice(start, end);
805
+ }
806
+ },
807
+ visibleColumns() {
808
+ if (!this.newColumns) return this.newColumns;
809
+ return this.newColumns.filter((column) => {
810
+ return column.visible || column.visible === void 0;
811
+ });
812
+ },
813
+ /*
814
+ * Check if all rows in the page are checked.
815
+ */
816
+ isAllChecked() {
817
+ const validVisibleData = this.visibleData.filter(
818
+ (row) => this.isRowCheckable(row)
819
+ );
820
+ if (validVisibleData.length === 0) return false;
821
+ const isAllChecked = validVisibleData.some((currentVisibleRow) => {
822
+ return indexOf(this.newCheckedRows, currentVisibleRow, this.customIsChecked) < 0;
823
+ });
824
+ return !isAllChecked;
825
+ },
826
+ /*
827
+ * Check if all rows in the page are checkable.
828
+ */
829
+ isAllUncheckable() {
830
+ const validVisibleData = this.visibleData.filter(
831
+ (row) => this.isRowCheckable(row)
832
+ );
833
+ return validVisibleData.length === 0;
834
+ },
835
+ /*
836
+ * Check if has any sortable column.
837
+ */
838
+ hasSortablenewColumns() {
839
+ return this.newColumns.some((column) => {
840
+ return column.sortable;
841
+ });
842
+ },
843
+ /*
844
+ * Check if has any searchable column.
845
+ */
846
+ hasSearchablenewColumns() {
847
+ return this.newColumns.some((column) => {
848
+ return column.searchable;
849
+ });
850
+ },
851
+ /*
852
+ * Check if has any column using subheading.
853
+ */
854
+ hasCustomSubheadings() {
855
+ if (this.$slots && this.$slots.subheading) return true;
856
+ return this.newColumns.some((column) => {
857
+ return column.subheading || column.$slots.subheading;
858
+ });
859
+ },
860
+ /*
861
+ * Return total column count based if it's checkable or expanded
862
+ */
863
+ columnCount() {
864
+ let count = this.visibleColumns.length;
865
+ count += this.checkable ? 1 : 0;
866
+ count += this.detailed && this.showDetailIcon ? 1 : 0;
867
+ return count;
868
+ },
869
+ /*
870
+ * return if detailed row tabled
871
+ * will be with chevron column & icon or not
872
+ */
873
+ showDetailRowIcon() {
874
+ return this.detailed && this.showDetailIcon;
875
+ },
876
+ /*
877
+ * return if scrollable table
878
+ */
879
+ isScrollable() {
880
+ if (this.scrollable) return true;
881
+ if (!this.newColumns) return false;
882
+ return this.newColumns.some((column) => {
883
+ return column.sticky;
884
+ });
885
+ },
886
+ newColumns() {
887
+ if (this.columns && this.columns.length) {
888
+ return this.columns.map((column) => {
889
+ return mockTableColumn(this, column);
890
+ });
891
+ }
892
+ return this.defaultSlots;
893
+ },
894
+ canDragRow() {
895
+ return this.draggable && !this.isDraggingColumn;
896
+ },
897
+ canDragColumn() {
898
+ return this.draggableColumn && !this.isDraggingRow;
899
+ }
900
+ },
901
+ watch: {
902
+ /*
903
+ * When data prop change:
904
+ * 1. Update internal value.
905
+ * 2. Filter data if it's not backend-filtered.
906
+ * 3. Sort again if it's not backend-sorted.
907
+ * 4. Set new total if it's not backend-paginated.
908
+ */
909
+ data(value) {
910
+ this.newData = value;
911
+ if (!this.backendFiltering) {
912
+ this.newData = value.filter(
913
+ (row) => this.isRowFiltered(row)
914
+ );
915
+ }
916
+ if (!this.backendSorting) {
917
+ this.sort(this.currentSortColumn, true);
918
+ }
919
+ if (!this.backendPagination) {
920
+ this.newDataTotal = this.newData.length;
921
+ }
922
+ },
923
+ /*
924
+ * When Pagination total change, update internal total
925
+ * only if it's backend-paginated.
926
+ */
927
+ total(newTotal) {
928
+ if (!this.backendPagination) return;
929
+ this.newDataTotal = newTotal;
930
+ },
931
+ currentPage(newVal) {
932
+ this.newCurrentPage = newVal;
933
+ },
934
+ newCurrentPage(newVal) {
935
+ this.$emit("update:currentPage", newVal);
936
+ },
937
+ /*
938
+ * When checkedRows prop change, update internal value without
939
+ * mutating original data.
940
+ */
941
+ checkedRows(rows) {
942
+ this.newCheckedRows = [...rows];
943
+ },
944
+ debounceSearch: {
945
+ handler(value) {
946
+ this.debouncedHandleFiltersChange = debounce(this.handleFiltersChange, value);
947
+ },
948
+ immediate: true
949
+ },
950
+ filters: {
951
+ handler(value) {
952
+ if (this.debounceSearch) {
953
+ this.debouncedHandleFiltersChange(value);
954
+ } else {
955
+ this.handleFiltersChange(value);
956
+ }
957
+ },
958
+ deep: true
959
+ },
960
+ /*
961
+ * When the user wants to control the detailed rows via props.
962
+ * Or wants to open the details of certain row with the router for example.
963
+ */
964
+ openedDetailed(expandedRows) {
965
+ this.visibleDetailRows = expandedRows;
966
+ }
967
+ },
968
+ methods: {
969
+ onFiltersEvent(event) {
970
+ this.$emit(`filters-event-${this.filtersEvent}`, { event, filters: this.filters });
971
+ },
972
+ handleFiltersChange(value) {
973
+ if (this.backendFiltering) {
974
+ this.$emit("filters-change", value);
975
+ } else {
976
+ this.newData = this.data.filter(
977
+ (row) => this.isRowFiltered(row)
978
+ );
979
+ if (!this.backendPagination) {
980
+ this.newDataTotal = this.newData.length;
981
+ }
982
+ if (!this.backendSorting) {
983
+ if (this.sortMultiple && this.sortMultipleDataLocal && this.sortMultipleDataLocal.length > 0) {
984
+ this.doSortMultiColumn();
985
+ } else if (Object.keys(this.currentSortColumn).length > 0) {
986
+ this.doSortSingleColumn(this.currentSortColumn);
987
+ }
988
+ }
989
+ }
990
+ },
991
+ findIndexOfSortData(column) {
992
+ const sortObj = this.sortMultipleDataComputed.filter((i) => i.field === column.field)[0];
993
+ return this.sortMultipleDataComputed.indexOf(sortObj) + 1;
994
+ },
995
+ removeSortingPriority(column) {
996
+ if (this.backendSorting) {
997
+ this.$emit("sorting-priority-removed", column.field);
998
+ } else {
999
+ this.sortMultipleDataLocal = this.sortMultipleDataLocal.filter(
1000
+ (priority) => priority.field !== column.field
1001
+ );
1002
+ if (this.sortMultipleDataLocal.length === 0) {
1003
+ this.resetMultiSorting();
1004
+ } else {
1005
+ this.newData = multiColumnSort(this.newData, this.sortMultipleDataLocal);
1006
+ }
1007
+ }
1008
+ },
1009
+ resetMultiSorting() {
1010
+ this.sortMultipleDataLocal = [];
1011
+ this.currentSortColumn = BLANK_COLUMN;
1012
+ this.newData = this.data;
1013
+ },
1014
+ /*
1015
+ * Sort an array by key without mutating original data.
1016
+ * Call the user sort function if it was passed.
1017
+ */
1018
+ sortBy(array, key, fn, isAsc) {
1019
+ let sorted = [];
1020
+ if (fn && typeof fn === "function") {
1021
+ sorted = [...array].sort((a, b) => fn(a, b, isAsc));
1022
+ } else {
1023
+ sorted = [...array].sort((a, b) => {
1024
+ let newA = getValueByPath(a, key);
1025
+ let newB = getValueByPath(b, key);
1026
+ if (typeof newA === "boolean" && typeof newB === "boolean") {
1027
+ return isAsc ? +newA - +newB : +newB - +newA;
1028
+ }
1029
+ if (!isNil(newB) && isNil(newA)) return isAsc ? 1 : -1;
1030
+ if (!isNil(newA) && isNil(newB)) return isAsc ? -1 : 1;
1031
+ if (newA === newB) return 0;
1032
+ newA = typeof newA === "string" ? newA.toUpperCase() : newA;
1033
+ newB = typeof newB === "string" ? newB.toUpperCase() : newB;
1034
+ return isAsc ? newA > newB ? 1 : -1 : newA > newB ? -1 : 1;
1035
+ });
1036
+ }
1037
+ return sorted;
1038
+ },
1039
+ sortMultiColumn(column) {
1040
+ this.currentSortColumn = BLANK_COLUMN;
1041
+ if (!this.backendSorting) {
1042
+ const existingPriority = this.sortMultipleDataLocal.filter((i) => i.field === column.field)[0];
1043
+ if (existingPriority) {
1044
+ existingPriority.order = existingPriority.order === "desc" ? "asc" : "desc";
1045
+ } else {
1046
+ this.sortMultipleDataLocal.push({
1047
+ field: column.field,
1048
+ order: this.isAsc ? "asc" : "desc",
1049
+ customSort: column.customSort
1050
+ });
1051
+ }
1052
+ this.doSortMultiColumn();
1053
+ }
1054
+ },
1055
+ doSortMultiColumn() {
1056
+ this.newData = multiColumnSort(this.newData, this.sortMultipleDataLocal);
1057
+ },
1058
+ /*
1059
+ * Sort the column.
1060
+ * Toggle current direction on column if it's sortable
1061
+ * and not just updating the prop.
1062
+ */
1063
+ sort(column, updatingData = false, event = null) {
1064
+ if (!column || !column.sortable) return;
1065
+ if (
1066
+ // if backend sorting is enabled, just emit the sort press like usual
1067
+ // if the correct key combination isnt pressed, sort like usual
1068
+ !this.backendSorting && this.sortMultiple && (this.sortMultipleKey && event[this.sortMultipleKey] || !this.sortMultipleKey)
1069
+ ) {
1070
+ if (updatingData) {
1071
+ this.doSortMultiColumn();
1072
+ } else {
1073
+ this.sortMultiColumn(column);
1074
+ }
1075
+ } else {
1076
+ if (this.sortMultiple) {
1077
+ this.sortMultipleDataLocal = [];
1078
+ }
1079
+ if (!updatingData) {
1080
+ this.isAsc = toRaw(column) === toRaw(this.currentSortColumn) ? !this.isAsc : this.defaultSortDirection.toLowerCase() !== "desc";
1081
+ }
1082
+ if (!this.firstTimeSort) {
1083
+ this.$emit("sort", column.field, this.isAsc ? "asc" : "desc", event);
1084
+ }
1085
+ if (!this.backendSorting) {
1086
+ this.doSortSingleColumn(column);
1087
+ }
1088
+ this.currentSortColumn = column;
1089
+ }
1090
+ },
1091
+ doSortSingleColumn(column) {
1092
+ this.newData = this.sortBy(
1093
+ this.newData,
1094
+ column.field,
1095
+ column.customSort,
1096
+ this.isAsc
1097
+ );
1098
+ },
1099
+ isRowSelected(row, selected) {
1100
+ if (!selected) {
1101
+ return false;
1102
+ }
1103
+ if (this.customRowKey) {
1104
+ return row[this.customRowKey] === selected[this.customRowKey];
1105
+ }
1106
+ return row === selected;
1107
+ },
1108
+ /*
1109
+ * Check if the row is checked (is added to the array).
1110
+ */
1111
+ isRowChecked(row) {
1112
+ return indexOf(this.newCheckedRows, row, this.customIsChecked) >= 0;
1113
+ },
1114
+ /*
1115
+ * Remove a checked row from the array.
1116
+ */
1117
+ removeCheckedRow(row) {
1118
+ const index = indexOf(this.newCheckedRows, row, this.customIsChecked);
1119
+ if (index >= 0) {
1120
+ this.newCheckedRows.splice(index, 1);
1121
+ }
1122
+ },
1123
+ /*
1124
+ * Header checkbox click listener.
1125
+ * Add or remove all rows in current page.
1126
+ */
1127
+ checkAll() {
1128
+ const isAllChecked = this.isAllChecked;
1129
+ this.visibleData.forEach((currentRow) => {
1130
+ if (this.isRowCheckable(currentRow)) {
1131
+ this.removeCheckedRow(currentRow);
1132
+ }
1133
+ if (!isAllChecked) {
1134
+ if (this.isRowCheckable(currentRow)) {
1135
+ this.newCheckedRows.push(currentRow);
1136
+ }
1137
+ }
1138
+ });
1139
+ this.$emit("check", this.newCheckedRows);
1140
+ this.$emit("check-all", this.newCheckedRows);
1141
+ this.$emit("update:checkedRows", this.newCheckedRows);
1142
+ },
1143
+ /*
1144
+ * Row checkbox click listener.
1145
+ */
1146
+ checkRow(row, index, event) {
1147
+ if (!this.isRowCheckable(row)) return;
1148
+ const lastIndex = this.lastCheckedRowIndex;
1149
+ this.lastCheckedRowIndex = index;
1150
+ if (event.shiftKey && lastIndex !== null && index !== lastIndex) {
1151
+ this.shiftCheckRow(row, index, lastIndex);
1152
+ } else if (!this.isRowChecked(row)) {
1153
+ this.newCheckedRows.push(row);
1154
+ } else {
1155
+ this.removeCheckedRow(row);
1156
+ }
1157
+ this.$emit("check", this.newCheckedRows, row);
1158
+ this.$emit("update:checkedRows", this.newCheckedRows);
1159
+ },
1160
+ /*
1161
+ * Check row when shift is pressed.
1162
+ */
1163
+ shiftCheckRow(row, index, lastCheckedRowIndex) {
1164
+ const subset = this.visibleData.slice(
1165
+ Math.min(index, lastCheckedRowIndex),
1166
+ Math.max(index, lastCheckedRowIndex) + 1
1167
+ );
1168
+ const shouldCheck = !this.isRowChecked(row);
1169
+ subset.forEach((item) => {
1170
+ this.removeCheckedRow(item);
1171
+ if (shouldCheck && this.isRowCheckable(item)) {
1172
+ this.newCheckedRows.push(item);
1173
+ }
1174
+ });
1175
+ },
1176
+ /*
1177
+ * Row click listener.
1178
+ * Emit all necessary events.
1179
+ */
1180
+ selectRow(row) {
1181
+ this.$emit("click", row);
1182
+ this._selectedRow = row;
1183
+ if (this.selected === row) return;
1184
+ if (!this.isRowSelectable(row)) return;
1185
+ this.$emit("select", row, this.selected);
1186
+ this.$emit("update:selected", row);
1187
+ },
1188
+ /*
1189
+ * Toggle to show/hide details slot
1190
+ */
1191
+ toggleDetails(obj) {
1192
+ const found = this.isVisibleDetailRow(obj);
1193
+ if (found) {
1194
+ this.closeDetailRow(obj);
1195
+ this.$emit("details-close", obj);
1196
+ } else {
1197
+ this.openDetailRow(obj);
1198
+ this.$emit("details-open", obj);
1199
+ }
1200
+ this.$emit("update:openedDetailed", this.visibleDetailRows);
1201
+ },
1202
+ openDetailRow(obj) {
1203
+ const index = this.handleDetailKey(obj);
1204
+ this.visibleDetailRows.push(index);
1205
+ },
1206
+ closeDetailRow(obj) {
1207
+ const index = this.handleDetailKey(obj);
1208
+ const i = this.visibleDetailRows.indexOf(index);
1209
+ if (i >= 0) {
1210
+ this.visibleDetailRows.splice(i, 1);
1211
+ }
1212
+ },
1213
+ isVisibleDetailRow(obj) {
1214
+ const index = this.handleDetailKey(obj);
1215
+ return this.visibleDetailRows.indexOf(index) >= 0;
1216
+ },
1217
+ isActiveDetailRow(row) {
1218
+ return this.detailed && !this.customDetailRow && this.isVisibleDetailRow(row);
1219
+ },
1220
+ isActiveCustomDetailRow(row) {
1221
+ return this.detailed && this.customDetailRow && this.isVisibleDetailRow(row);
1222
+ },
1223
+ isRowFiltered(row) {
1224
+ for (const key in this.filters) {
1225
+ if (!this.filters[key]) continue;
1226
+ const input = this.filters[key];
1227
+ const column = this.newColumns.filter((c) => c.field === key)[0];
1228
+ if (column && column.customSearch && typeof column.customSearch === "function") {
1229
+ if (!column.customSearch(row, input)) return false;
1230
+ } else {
1231
+ const value = this.getValueByPath(row, key);
1232
+ if (value == null) return false;
1233
+ if (Number.isInteger(value)) {
1234
+ if (value !== Number(input)) return false;
1235
+ } else {
1236
+ const re = new RegExp(escapeRegExpChars(input + ""), "i");
1237
+ if (Array.isArray(value)) {
1238
+ const valid = value.some(
1239
+ (val) => re.test(removeDiacriticsFromString(val)) || re.test(val)
1240
+ );
1241
+ if (!valid) return false;
1242
+ } else {
1243
+ if (!re.test(removeDiacriticsFromString(value)) && !re.test(value)) {
1244
+ return false;
1245
+ }
1246
+ }
1247
+ }
1248
+ }
1249
+ }
1250
+ return true;
1251
+ },
1252
+ /*
1253
+ * When the detailKey is defined we use the object[detailKey] as index.
1254
+ * If not, use the object reference by default.
1255
+ */
1256
+ handleDetailKey(index) {
1257
+ const key = this.detailKey;
1258
+ return !key.length || !index ? index : index[key];
1259
+ },
1260
+ checkPredefinedDetailedRows() {
1261
+ const defaultExpandedRowsDefined = this.openedDetailed.length > 0;
1262
+ if (defaultExpandedRowsDefined && !this.detailKey.length) {
1263
+ throw new Error('If you set a predefined opened-detailed, you must provide a unique key using the prop "detail-key"');
1264
+ }
1265
+ },
1266
+ /*
1267
+ * Call initSort only first time (For example async data).
1268
+ */
1269
+ checkSort() {
1270
+ if (this.newColumns.length && this.firstTimeSort) {
1271
+ this.initSort();
1272
+ this.firstTimeSort = false;
1273
+ } else if (this.newColumns.length) {
1274
+ if (toRaw(this.currentSortColumn) !== BLANK_COLUMN) {
1275
+ for (let i = 0; i < this.newColumns.length; i++) {
1276
+ if (this.newColumns[i].field === this.currentSortColumn.field) {
1277
+ this.currentSortColumn = this.newColumns[i];
1278
+ break;
1279
+ }
1280
+ }
1281
+ }
1282
+ }
1283
+ },
1284
+ /*
1285
+ * Check if footer slot has custom content.
1286
+ *
1287
+ * Assumes that `$slots.footer` is specified.
1288
+ */
1289
+ hasCustomFooterSlot() {
1290
+ var _a;
1291
+ const footer = this.$slots.footer();
1292
+ if (footer.length > 1) return true;
1293
+ if (isFragment(footer[0])) return true;
1294
+ const tag = (_a = footer[0].el) == null ? void 0 : _a.tag;
1295
+ if (tag !== "th" && tag !== "td") return false;
1296
+ return true;
1297
+ },
1298
+ /*
1299
+ * Check if bottom-left slot exists.
1300
+ */
1301
+ hasBottomLeftSlot() {
1302
+ return typeof this.$slots["bottom-left"] !== "undefined";
1303
+ },
1304
+ /*
1305
+ * Table arrow keys listener, change selection.
1306
+ */
1307
+ pressedArrow(pos) {
1308
+ if (!this.visibleData.length) return;
1309
+ let index = this.visibleData.indexOf(this.selected) + pos;
1310
+ index = index < 0 ? 0 : index > this.visibleData.length - 1 ? this.visibleData.length - 1 : index;
1311
+ const row = this.visibleData[index];
1312
+ if (!this.isRowSelectable(row)) {
1313
+ let newIndex = null;
1314
+ if (pos > 0) {
1315
+ for (let i = index; i < this.visibleData.length && newIndex === null; i++) {
1316
+ if (this.isRowSelectable(this.visibleData[i])) newIndex = i;
1317
+ }
1318
+ } else {
1319
+ for (let i = index; i >= 0 && newIndex === null; i--) {
1320
+ if (this.isRowSelectable(this.visibleData[i])) newIndex = i;
1321
+ }
1322
+ }
1323
+ if (newIndex >= 0) {
1324
+ this.selectRow(this.visibleData[newIndex]);
1325
+ }
1326
+ } else {
1327
+ this.selectRow(row);
1328
+ }
1329
+ },
1330
+ /*
1331
+ * Focus table element if has selected prop.
1332
+ */
1333
+ focus() {
1334
+ if (!this.focusable) return;
1335
+ this.$el.querySelector("table").focus();
1336
+ },
1337
+ /*
1338
+ * Initial sorted column based on the default-sort prop.
1339
+ */
1340
+ initSort() {
1341
+ if (this.sortMultiple && this.sortMultipleData) {
1342
+ this.sortMultipleData.forEach((column) => {
1343
+ this.sortMultiColumn(column);
1344
+ });
1345
+ } else {
1346
+ if (!this.defaultSort) return;
1347
+ let sortField = "";
1348
+ let sortDirection = this.defaultSortDirection;
1349
+ if (Array.isArray(this.defaultSort)) {
1350
+ sortField = this.defaultSort[0];
1351
+ if (this.defaultSort[1]) {
1352
+ sortDirection = this.defaultSort[1];
1353
+ }
1354
+ } else {
1355
+ sortField = this.defaultSort;
1356
+ }
1357
+ const sortColumn = this.newColumns.filter(
1358
+ (column) => column.field === sortField
1359
+ )[0];
1360
+ if (sortColumn) {
1361
+ this.isAsc = sortDirection.toLowerCase() !== "desc";
1362
+ this.sort(sortColumn, true);
1363
+ }
1364
+ }
1365
+ },
1366
+ /*
1367
+ * Emits drag start event (row)
1368
+ */
1369
+ handleDragStart(event, row, index) {
1370
+ if (!this.canDragRow) return;
1371
+ this.isDraggingRow = true;
1372
+ this.$emit("dragstart", { event, row, index });
1373
+ },
1374
+ /*
1375
+ * Emits drag leave event (row)
1376
+ */
1377
+ handleDragEnd(event, row, index) {
1378
+ if (!this.canDragRow) return;
1379
+ this.isDraggingRow = false;
1380
+ this.$emit("dragend", { event, row, index });
1381
+ },
1382
+ /*
1383
+ * Emits drop event (row)
1384
+ */
1385
+ handleDrop(event, row, index) {
1386
+ if (!this.canDragRow) return;
1387
+ this.$emit("drop", { event, row, index });
1388
+ },
1389
+ /*
1390
+ * Emits drag over event (row)
1391
+ */
1392
+ handleDragOver(event, row, index) {
1393
+ if (!this.canDragRow) return;
1394
+ this.$emit("dragover", { event, row, index });
1395
+ },
1396
+ /*
1397
+ * Emits drag leave event (row)
1398
+ */
1399
+ handleDragLeave(event, row, index) {
1400
+ if (!this.canDragRow) return;
1401
+ this.$emit("dragleave", { event, row, index });
1402
+ },
1403
+ // FIXME: this method may emit events not listed in `emits`.
1404
+ // I decided not to list them to check if event listeners are actually
1405
+ // set in `$attrs`. The original idea of this method was to address
1406
+ // some performance issues and introduced at the commit:
1407
+ // https://github.com/ntohq/buefy-next/commit/e38726497785145195e9605840e33980fd4ae9e0
1408
+ // I am not sure whether the justification at https://github.com/buefy/buefy/pull/2150
1409
+ // is still relevant with Vue 3.
1410
+ emitEventForRow(eventName, event, row) {
1411
+ return this.$attrs[`on${eventName}`] ? this.$emit(eventName, row, event) : null;
1412
+ },
1413
+ /*
1414
+ * Emits drag start event (column)
1415
+ */
1416
+ handleColumnDragStart(event, column, index) {
1417
+ if (!this.canDragColumn) return;
1418
+ this.isDraggingColumn = true;
1419
+ this.$emit("columndragstart", { event, column, index });
1420
+ },
1421
+ /*
1422
+ * Emits drag leave event (column)
1423
+ */
1424
+ handleColumnDragEnd(event, column, index) {
1425
+ if (!this.canDragColumn) return;
1426
+ this.isDraggingColumn = false;
1427
+ this.$emit("columndragend", { event, column, index });
1428
+ },
1429
+ /*
1430
+ * Emits drop event (column)
1431
+ */
1432
+ handleColumnDrop(event, column, index) {
1433
+ if (!this.canDragColumn) return;
1434
+ this.$emit("columndrop", { event, column, index });
1435
+ },
1436
+ /*
1437
+ * Emits drag over event (column)
1438
+ */
1439
+ handleColumnDragOver(event, column, index) {
1440
+ if (!this.canDragColumn) return;
1441
+ this.$emit("columndragover", { event, column, index });
1442
+ },
1443
+ /*
1444
+ * Emits drag leave event (column)
1445
+ */
1446
+ handleColumnDragLeave(event, column, index) {
1447
+ if (!this.canDragColumn) return;
1448
+ this.$emit("columndragleave", { event, column, index });
1449
+ },
1450
+ /*
1451
+ * Starts monitoring drag-by-touch events (row on touch-enabled devices)
1452
+ */
1453
+ handleTouchStart(event, row) {
1454
+ if (!this.canDragRow) return;
1455
+ if (this.isDraggingColumn) return;
1456
+ if (this._selectedRow !== row) return;
1457
+ event.preventDefault();
1458
+ this.mayBeTouchDragging = true;
1459
+ },
1460
+ /*
1461
+ * Emits dragover and dragleave events (row on touch-enabled devices)
1462
+ *
1463
+ * Emits also dragstart if this is the first touchmove after touchstart.
1464
+ */
1465
+ handleTouchMove(event) {
1466
+ if (!this.canDragRow) return;
1467
+ if (!this.mayBeTouchDragging) return;
1468
+ if (!this.isDraggingRow) {
1469
+ const eventTarget = event.target;
1470
+ const tr = eventTarget.closest("tr");
1471
+ this.draggedCellContent = tr ? `<table class="table"><tr>${tr.innerHTML}</tr></table>` : eventTarget.innerHTML;
1472
+ this.$refs.draggedCell.style.width = tr ? `${tr.offsetWidth}px` : `${eventTarget.offsetWidth}px`;
1473
+ eventTarget.dispatchEvent(translateTouchAsDragEvent(event, {
1474
+ type: "dragstart"
1475
+ }));
1476
+ }
1477
+ const touch = event.touches[0];
1478
+ const target = document.elementFromPoint(touch.clientX, touch.clientY);
1479
+ if (target != null) {
1480
+ if (target !== this.touchDragoverTarget) {
1481
+ if (this.touchDragoverTarget != null) {
1482
+ this.touchDragoverTarget.dispatchEvent(
1483
+ translateTouchAsDragEvent(event, {
1484
+ type: "dragleave",
1485
+ target: this.touchDragoverTarget
1486
+ })
1487
+ );
1488
+ }
1489
+ this.touchDragoverTarget = target;
1490
+ target.dispatchEvent(
1491
+ translateTouchAsDragEvent(event, {
1492
+ type: "dragover",
1493
+ target
1494
+ })
1495
+ );
1496
+ }
1497
+ } else if (this.touchDragoverTarget != null) {
1498
+ this.touchDragoverTarget.dispatchEvent(
1499
+ translateTouchAsDragEvent(event, {
1500
+ type: "dragleave",
1501
+ target: this.touchDragoverTarget
1502
+ })
1503
+ );
1504
+ this.touchDragoverTarget = null;
1505
+ }
1506
+ this.updateDraggedCell(touch);
1507
+ },
1508
+ /*
1509
+ * Emits drop and dragend events (row on touch-enabled devices)
1510
+ */
1511
+ handleTouchEnd(event) {
1512
+ if (!this.canDragRow) return;
1513
+ if (this.isDraggingRow) {
1514
+ const touch = event.changedTouches[0];
1515
+ const target = document.elementFromPoint(touch.clientX, touch.clientY);
1516
+ if (target != null) {
1517
+ target.dispatchEvent(translateTouchAsDragEvent(event, {
1518
+ type: "drop",
1519
+ target
1520
+ }));
1521
+ }
1522
+ event.target.dispatchEvent(translateTouchAsDragEvent(event, {
1523
+ type: "dragend"
1524
+ }));
1525
+ this._selectedRow = null;
1526
+ }
1527
+ this.mayBeTouchDragging = false;
1528
+ },
1529
+ /*
1530
+ * Starts monitoring drag-by-touch events (column on touch-enabled devices)
1531
+ */
1532
+ handleColumnTouchStart(event) {
1533
+ if (!this.canDragColumn) return;
1534
+ if (this.isDraggingRow) return;
1535
+ event.preventDefault();
1536
+ this.mayBeTouchDragging = true;
1537
+ },
1538
+ /*
1539
+ * Emits dragover and dragleave events (column on touch-enabled devices)
1540
+ *
1541
+ * Also emits dragstart if this is the first touchmove after touchstart.
1542
+ */
1543
+ handleColumnTouchMove(event) {
1544
+ if (!this.canDragColumn) return;
1545
+ if (!this.mayBeTouchDragging) return;
1546
+ if (!this.isDraggingColumn) {
1547
+ const eventTarget = event.target;
1548
+ this.draggedCellContent = eventTarget.innerHTML;
1549
+ this.$refs.draggedCell.style.width = `${eventTarget.offsetWidth}px`;
1550
+ eventTarget.dispatchEvent(translateTouchAsDragEvent(event, {
1551
+ type: "dragstart"
1552
+ }));
1553
+ }
1554
+ const touch = event.touches[0];
1555
+ const target = document.elementFromPoint(touch.clientX, touch.clientY);
1556
+ if (target != null) {
1557
+ if (target !== this.touchDragoverTarget) {
1558
+ if (this.touchDragoverTarget != null) {
1559
+ this.touchDragoverTarget.dispatchEvent(
1560
+ translateTouchAsDragEvent(event, {
1561
+ type: "dragleave",
1562
+ target: this.touchDragoverTarget
1563
+ })
1564
+ );
1565
+ }
1566
+ this.touchDragoverTarget = target;
1567
+ target.dispatchEvent(
1568
+ translateTouchAsDragEvent(event, {
1569
+ type: "dragover",
1570
+ target
1571
+ })
1572
+ );
1573
+ }
1574
+ } else if (this.touchDragoverTarget != null) {
1575
+ this.touchDragoverTarget.dispatchEvent(
1576
+ translateTouchAsDragEvent(event, {
1577
+ type: "dragleave",
1578
+ target: this.touchDragoverTarget
1579
+ })
1580
+ );
1581
+ this.touchDragoverTarget = null;
1582
+ }
1583
+ this.updateDraggedCell(touch);
1584
+ },
1585
+ /*
1586
+ * Emits drop and dragend events (column on touch-enabled devices)
1587
+ */
1588
+ handleColumnTouchEnd(event) {
1589
+ if (!this.canDragColumn) return;
1590
+ if (this.isDraggingColumn) {
1591
+ const touch = event.changedTouches[0];
1592
+ const target = document.elementFromPoint(touch.clientX, touch.clientY);
1593
+ if (target != null) {
1594
+ target.dispatchEvent(translateTouchAsDragEvent(event, {
1595
+ type: "drop",
1596
+ target
1597
+ }));
1598
+ }
1599
+ event.target.dispatchEvent(translateTouchAsDragEvent(event, {
1600
+ type: "dragend"
1601
+ }));
1602
+ }
1603
+ this.mayBeTouchDragging = false;
1604
+ },
1605
+ updateDraggedCell({ clientX, clientY }) {
1606
+ const cellRect = this.$refs.draggedCell.getBoundingClientRect();
1607
+ const top = clientY + window.scrollY - cellRect.height / 2;
1608
+ const left = clientX + window.scrollX - cellRect.width / 2;
1609
+ this.$refs.draggedCell.style.top = `calc(${top}px)`;
1610
+ this.$refs.draggedCell.style.left = `calc(${left}px)`;
1611
+ },
1612
+ _registerTableColumn(column) {
1613
+ if (column._isTableColumn) {
1614
+ this.defaultSlots.push(column);
1615
+ }
1616
+ },
1617
+ _unregisterTableColumn(column) {
1618
+ const index = this.defaultSlots.indexOf(column);
1619
+ if (index !== -1) {
1620
+ this.defaultSlots.splice(index, 1);
1621
+ }
1622
+ }
1623
+ },
1624
+ mounted() {
1625
+ this.checkPredefinedDetailedRows();
1626
+ this.checkSort();
1627
+ const prepareDraggedCell = (isDraggable) => {
1628
+ if (isDraggable && this.$data._draggedCellEl == null) {
1629
+ this.$data._draggedCellEl = createAbsoluteElement(this.$refs.draggedCell);
1630
+ }
1631
+ };
1632
+ this.$watch("draggable", prepareDraggedCell, { immediate: true });
1633
+ this.$watch("draggableColumn", prepareDraggedCell, { immediate: true });
1634
+ },
1635
+ beforeUnmount() {
1636
+ if (this.$data._draggedCellEl) {
1637
+ removeElement(this.$data._draggedCellEl);
1638
+ }
1639
+ }
1640
+ });
1641
+
1642
+ const _hoisted_1 = ["tabindex"];
1643
+ const _hoisted_2 = { key: 1 };
1644
+ const _hoisted_3 = {
1645
+ key: 0,
1646
+ width: "40px"
1647
+ };
1648
+ const _hoisted_4 = ["onClick", "draggable", "onDragstart", "onDragend", "onDrop", "onDragover", "onDragleave"];
1649
+ const _hoisted_5 = {
1650
+ key: 0,
1651
+ class: "multi-sort-icons"
1652
+ };
1653
+ const _hoisted_6 = ["onClick"];
1654
+ const _hoisted_7 = {
1655
+ key: 0,
1656
+ class: "is-subheading"
1657
+ };
1658
+ const _hoisted_8 = {
1659
+ key: 0,
1660
+ width: "40px"
1661
+ };
1662
+ const _hoisted_9 = { key: 1 };
1663
+ const _hoisted_10 = { key: 2 };
1664
+ const _hoisted_11 = { key: 1 };
1665
+ const _hoisted_12 = {
1666
+ key: 0,
1667
+ width: "40px"
1668
+ };
1669
+ const _hoisted_13 = { key: 1 };
1670
+ const _hoisted_14 = { key: 2 };
1671
+ const _hoisted_15 = ["onClick", "onDblclick", "onMouseenter", "onMouseleave", "onContextmenu", "draggable", "onDragstart", "onDragend", "onDrop", "onDragover", "onDragleave", "onTouchstart"];
1672
+ const _hoisted_16 = {
1673
+ key: 0,
1674
+ class: "chevron-cell"
1675
+ };
1676
+ const _hoisted_17 = ["onClick"];
1677
+ const _hoisted_18 = {
1678
+ key: 0,
1679
+ class: "detail"
1680
+ };
1681
+ const _hoisted_19 = ["colspan"];
1682
+ const _hoisted_20 = { class: "detail-container" };
1683
+ const _hoisted_21 = {
1684
+ key: 0,
1685
+ class: "is-empty"
1686
+ };
1687
+ const _hoisted_22 = ["colspan"];
1688
+ const _hoisted_23 = { key: 2 };
1689
+ const _hoisted_24 = { class: "table-footer" };
1690
+ const _hoisted_25 = ["colspan"];
1691
+ const _hoisted_26 = ["innerHTML"];
1692
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
1693
+ const _component_b_table_mobile_sort = resolveComponent("b-table-mobile-sort");
1694
+ const _component_b_table_pagination = resolveComponent("b-table-pagination");
1695
+ const _component_b_checkbox = resolveComponent("b-checkbox");
1696
+ const _component_b_slot_component = resolveComponent("b-slot-component");
1697
+ const _component_b_icon = resolveComponent("b-icon");
1698
+ const _component_b_input = resolveComponent("b-input");
1699
+ const _component_b_loading = resolveComponent("b-loading");
1700
+ return openBlock(), createElementBlock(
1701
+ "div",
1702
+ mergeProps({ class: "b-table" }, _ctx.rootAttrs),
1703
+ [
1704
+ renderSlot(_ctx.$slots, "default"),
1705
+ _ctx.mobileCards && _ctx.hasSortablenewColumns ? (openBlock(), createBlock(_component_b_table_mobile_sort, {
1706
+ key: 0,
1707
+ "current-sort-column": _ctx.currentSortColumn,
1708
+ "sort-multiple": _ctx.sortMultiple,
1709
+ "sort-multiple-data": _ctx.sortMultipleDataComputed,
1710
+ "is-asc": _ctx.isAsc,
1711
+ columns: _ctx.newColumns,
1712
+ placeholder: _ctx.mobileSortPlaceholder,
1713
+ "icon-pack": _ctx.iconPack,
1714
+ "sort-icon": _ctx.sortIcon,
1715
+ "sort-icon-size": _ctx.sortIconSize,
1716
+ onSort: _cache[0] || (_cache[0] = (column, event) => _ctx.sort(column, null, event)),
1717
+ onRemovePriority: _cache[1] || (_cache[1] = (column) => _ctx.removeSortingPriority(column))
1718
+ }, null, 8, ["current-sort-column", "sort-multiple", "sort-multiple-data", "is-asc", "columns", "placeholder", "icon-pack", "sort-icon", "sort-icon-size"])) : createCommentVNode("v-if", true),
1719
+ _ctx.paginated && (_ctx.paginationPosition === "top" || _ctx.paginationPosition === "both") ? renderSlot(_ctx.$slots, "pagination", { key: 1 }, () => [
1720
+ createVNode(_component_b_table_pagination, mergeProps(_ctx.fallthroughAttrs, {
1721
+ "per-page": _ctx.perPage,
1722
+ paginated: _ctx.paginated,
1723
+ rounded: _ctx.paginationRounded,
1724
+ "icon-pack": _ctx.iconPack,
1725
+ total: _ctx.newDataTotal,
1726
+ "current-page": _ctx.newCurrentPage,
1727
+ "onUpdate:currentPage": _cache[2] || (_cache[2] = ($event) => _ctx.newCurrentPage = $event),
1728
+ "aria-next-label": _ctx.ariaNextLabel,
1729
+ "aria-previous-label": _ctx.ariaPreviousLabel,
1730
+ "aria-page-label": _ctx.ariaPageLabel,
1731
+ "aria-current-label": _ctx.ariaCurrentLabel,
1732
+ onPageChange: _cache[3] || (_cache[3] = (event) => _ctx.$emit("page-change", event)),
1733
+ "page-input": _ctx.pageInput,
1734
+ "pagination-order": _ctx.paginationOrder,
1735
+ "page-input-position": _ctx.pageInputPosition,
1736
+ "debounce-page-input": _ctx.debouncePageInput
1737
+ }), {
1738
+ default: withCtx(() => [
1739
+ renderSlot(_ctx.$slots, "top-left")
1740
+ ]),
1741
+ _: 3
1742
+ /* FORWARDED */
1743
+ }, 16, ["per-page", "paginated", "rounded", "icon-pack", "total", "current-page", "aria-next-label", "aria-previous-label", "aria-page-label", "aria-current-label", "page-input", "pagination-order", "page-input-position", "debounce-page-input"])
1744
+ ]) : createCommentVNode("v-if", true),
1745
+ createElementVNode(
1746
+ "div",
1747
+ {
1748
+ class: normalizeClass(["table-wrapper", _ctx.tableWrapperClasses]),
1749
+ style: normalizeStyle(_ctx.tableStyle)
1750
+ },
1751
+ [
1752
+ createElementVNode("table", {
1753
+ class: normalizeClass(["table", _ctx.tableClasses]),
1754
+ tabindex: !_ctx.focusable ? void 0 : 0,
1755
+ onKeydown: [
1756
+ _cache[9] || (_cache[9] = withKeys(withModifiers(($event) => _ctx.pressedArrow(-1), ["self", "prevent"]), ["up"])),
1757
+ _cache[10] || (_cache[10] = withKeys(withModifiers(($event) => _ctx.pressedArrow(1), ["self", "prevent"]), ["down"]))
1758
+ ]
1759
+ }, [
1760
+ _ctx.caption ? withDirectives((openBlock(), createElementBlock(
1761
+ "caption",
1762
+ { key: 0 },
1763
+ toDisplayString(_ctx.caption),
1764
+ 513
1765
+ /* TEXT, NEED_PATCH */
1766
+ )), [
1767
+ [vShow, _ctx.showCaption]
1768
+ ]) : createCommentVNode("v-if", true),
1769
+ _ctx.newColumns.length && _ctx.showHeader ? (openBlock(), createElementBlock("thead", _hoisted_2, [
1770
+ createElementVNode("tr", null, [
1771
+ _ctx.showDetailRowIcon ? (openBlock(), createElementBlock("th", _hoisted_3)) : createCommentVNode("v-if", true),
1772
+ _ctx.checkable && _ctx.checkboxPosition === "left" ? (openBlock(), createElementBlock(
1773
+ "th",
1774
+ {
1775
+ key: 1,
1776
+ class: normalizeClass(["checkbox-cell", { "is-sticky": _ctx.stickyCheckbox }])
1777
+ },
1778
+ [
1779
+ _ctx.headerCheckable ? renderSlot(_ctx.$slots, "check-all", {
1780
+ key: 0,
1781
+ isAllChecked: _ctx.isAllChecked,
1782
+ isAllUncheckable: _ctx.isAllUncheckable,
1783
+ checkAll: _ctx.checkAll
1784
+ }, () => [
1785
+ createVNode(_component_b_checkbox, {
1786
+ autocomplete: "off",
1787
+ "model-value": _ctx.isAllChecked,
1788
+ type: _ctx.checkboxType,
1789
+ disabled: _ctx.isAllUncheckable,
1790
+ onChange: _ctx.checkAll
1791
+ }, null, 8, ["model-value", "type", "disabled", "onChange"])
1792
+ ]) : createCommentVNode("v-if", true)
1793
+ ],
1794
+ 2
1795
+ /* CLASS */
1796
+ )) : createCommentVNode("v-if", true),
1797
+ (openBlock(true), createElementBlock(
1798
+ Fragment,
1799
+ null,
1800
+ renderList(_ctx.visibleColumns, (column, index) => {
1801
+ return openBlock(), createElementBlock("th", mergeProps({
1802
+ key: column.newKey + ":" + index + "header"
1803
+ }, column.thAttrs(column), {
1804
+ class: [column.thClasses, {
1805
+ "is-current-sort": !_ctx.sortMultiple && _ctx.currentSortColumn === column
1806
+ }],
1807
+ style: column.thStyle,
1808
+ onClick: withModifiers(($event) => _ctx.sort(column, null, $event), ["stop"]),
1809
+ draggable: _ctx.canDragColumn,
1810
+ onDragstart: ($event) => _ctx.handleColumnDragStart($event, column, index),
1811
+ onDragend: ($event) => _ctx.handleColumnDragEnd($event, column, index),
1812
+ onDrop: ($event) => _ctx.handleColumnDrop($event, column, index),
1813
+ onDragover: ($event) => _ctx.handleColumnDragOver($event, column, index),
1814
+ onDragleave: ($event) => _ctx.handleColumnDragLeave($event, column, index),
1815
+ onTouchstart: _cache[4] || (_cache[4] = ($event) => _ctx.handleColumnTouchStart($event)),
1816
+ onTouchmove: _cache[5] || (_cache[5] = ($event) => _ctx.handleColumnTouchMove($event)),
1817
+ onTouchend: _cache[6] || (_cache[6] = ($event) => _ctx.handleColumnTouchEnd($event))
1818
+ }), [
1819
+ createElementVNode(
1820
+ "div",
1821
+ {
1822
+ class: normalizeClass(["th-wrap is-relative", {
1823
+ "is-numeric": column.numeric,
1824
+ "is-centered": column.centered
1825
+ }]),
1826
+ style: normalizeStyle(column.thWrapStyle)
1827
+ },
1828
+ [
1829
+ column.$slots.header ? (openBlock(), createBlock(_component_b_slot_component, {
1830
+ key: 0,
1831
+ component: column,
1832
+ scoped: "",
1833
+ name: "header",
1834
+ tag: "span",
1835
+ props: { column, index }
1836
+ }, null, 8, ["component", "props"])) : (openBlock(), createElementBlock(
1837
+ Fragment,
1838
+ { key: 1 },
1839
+ [
1840
+ createTextVNode(
1841
+ toDisplayString(column.label) + " ",
1842
+ 1
1843
+ /* TEXT */
1844
+ ),
1845
+ _ctx.sortMultiple && _ctx.sortMultipleDataComputed && _ctx.sortMultipleDataComputed.length > 0 && _ctx.sortMultipleDataComputed.filter((i) => i.field === column.field).length > 0 ? (openBlock(), createElementBlock("span", _hoisted_5, [
1846
+ createVNode(_component_b_icon, {
1847
+ icon: _ctx.sortIcon,
1848
+ pack: _ctx.iconPack,
1849
+ both: "",
1850
+ size: _ctx.sortIconSize,
1851
+ class: normalizeClass({
1852
+ "is-desc": _ctx.sortMultipleDataComputed.filter((i) => i.field === column.field)[0].order === "desc"
1853
+ })
1854
+ }, null, 8, ["icon", "pack", "size", "class"]),
1855
+ createTextVNode(
1856
+ " " + toDisplayString(_ctx.findIndexOfSortData(column)) + " ",
1857
+ 1
1858
+ /* TEXT */
1859
+ ),
1860
+ createElementVNode("button", {
1861
+ class: "delete is-small multi-sort-cancel-icon",
1862
+ type: "button",
1863
+ onClick: withModifiers(($event) => _ctx.removeSortingPriority(column), ["stop"])
1864
+ }, null, 8, _hoisted_6)
1865
+ ])) : (openBlock(), createBlock(_component_b_icon, {
1866
+ key: 1,
1867
+ icon: _ctx.sortIcon,
1868
+ pack: _ctx.iconPack,
1869
+ both: "",
1870
+ size: _ctx.sortIconSize,
1871
+ class: normalizeClass(["sort-icon", {
1872
+ "is-desc": !_ctx.isAsc,
1873
+ "is-invisible": _ctx.currentSortColumn !== column
1874
+ }])
1875
+ }, null, 8, ["icon", "pack", "size", "class"]))
1876
+ ],
1877
+ 64
1878
+ /* STABLE_FRAGMENT */
1879
+ ))
1880
+ ],
1881
+ 6
1882
+ /* CLASS, STYLE */
1883
+ )
1884
+ ], 16, _hoisted_4);
1885
+ }),
1886
+ 128
1887
+ /* KEYED_FRAGMENT */
1888
+ )),
1889
+ _ctx.checkable && _ctx.checkboxPosition === "right" ? (openBlock(), createElementBlock(
1890
+ "th",
1891
+ {
1892
+ key: 2,
1893
+ class: normalizeClass(["checkbox-cell", { "is-sticky": _ctx.stickyCheckbox }])
1894
+ },
1895
+ [
1896
+ _ctx.headerCheckable ? renderSlot(_ctx.$slots, "check-all", {
1897
+ key: 0,
1898
+ isAllChecked: _ctx.isAllChecked,
1899
+ isAllUncheckable: _ctx.isAllUncheckable,
1900
+ checkAll: _ctx.checkAll
1901
+ }, () => [
1902
+ createVNode(_component_b_checkbox, {
1903
+ autocomplete: "off",
1904
+ "model-value": _ctx.isAllChecked,
1905
+ type: _ctx.checkboxType,
1906
+ disabled: _ctx.isAllUncheckable,
1907
+ onChange: _ctx.checkAll
1908
+ }, null, 8, ["model-value", "type", "disabled", "onChange"])
1909
+ ]) : createCommentVNode("v-if", true)
1910
+ ],
1911
+ 2
1912
+ /* CLASS */
1913
+ )) : createCommentVNode("v-if", true)
1914
+ ]),
1915
+ _ctx.hasCustomSubheadings ? (openBlock(), createElementBlock("tr", _hoisted_7, [
1916
+ _ctx.showDetailRowIcon ? (openBlock(), createElementBlock("th", _hoisted_8)) : createCommentVNode("v-if", true),
1917
+ _ctx.checkable && _ctx.checkboxPosition === "left" ? (openBlock(), createElementBlock("th", _hoisted_9)) : createCommentVNode("v-if", true),
1918
+ (openBlock(true), createElementBlock(
1919
+ Fragment,
1920
+ null,
1921
+ renderList(_ctx.visibleColumns, (column, index) => {
1922
+ return openBlock(), createElementBlock(
1923
+ "th",
1924
+ {
1925
+ key: column.newKey + ":" + index + "subheading",
1926
+ style: normalizeStyle(column.style)
1927
+ },
1928
+ [
1929
+ createElementVNode(
1930
+ "div",
1931
+ {
1932
+ class: normalizeClass(["th-wrap", {
1933
+ "is-numeric": column.numeric,
1934
+ "is-centered": column.centered
1935
+ }]),
1936
+ style: normalizeStyle(column.thWrapStyle)
1937
+ },
1938
+ [
1939
+ column.$slots.subheading ? (openBlock(), createBlock(_component_b_slot_component, {
1940
+ key: 0,
1941
+ component: column,
1942
+ scoped: "",
1943
+ name: "subheading",
1944
+ tag: "span",
1945
+ props: { column, index }
1946
+ }, null, 8, ["component", "props"])) : (openBlock(), createElementBlock(
1947
+ Fragment,
1948
+ { key: 1 },
1949
+ [
1950
+ createTextVNode(
1951
+ toDisplayString(column.subheading),
1952
+ 1
1953
+ /* TEXT */
1954
+ )
1955
+ ],
1956
+ 64
1957
+ /* STABLE_FRAGMENT */
1958
+ ))
1959
+ ],
1960
+ 6
1961
+ /* CLASS, STYLE */
1962
+ )
1963
+ ],
1964
+ 4
1965
+ /* STYLE */
1966
+ );
1967
+ }),
1968
+ 128
1969
+ /* KEYED_FRAGMENT */
1970
+ )),
1971
+ _ctx.checkable && _ctx.checkboxPosition === "right" ? (openBlock(), createElementBlock("th", _hoisted_10)) : createCommentVNode("v-if", true)
1972
+ ])) : createCommentVNode("v-if", true),
1973
+ _ctx.hasSearchablenewColumns ? (openBlock(), createElementBlock("tr", _hoisted_11, [
1974
+ _ctx.showDetailRowIcon ? (openBlock(), createElementBlock("th", _hoisted_12)) : createCommentVNode("v-if", true),
1975
+ _ctx.checkable && _ctx.checkboxPosition === "left" ? (openBlock(), createElementBlock("th", _hoisted_13)) : createCommentVNode("v-if", true),
1976
+ (openBlock(true), createElementBlock(
1977
+ Fragment,
1978
+ null,
1979
+ renderList(_ctx.visibleColumns, (column, index) => {
1980
+ return openBlock(), createElementBlock(
1981
+ "th",
1982
+ mergeProps({
1983
+ key: column.newKey + ":" + index + "searchable"
1984
+ }, column.thAttrs(column), {
1985
+ style: column.thStyle,
1986
+ class: { "is-sticky": column.sticky }
1987
+ }),
1988
+ [
1989
+ createElementVNode(
1990
+ "div",
1991
+ {
1992
+ class: "th-wrap",
1993
+ style: normalizeStyle(column.thWrapStyle)
1994
+ },
1995
+ [
1996
+ column.searchable ? (openBlock(), createElementBlock(
1997
+ Fragment,
1998
+ { key: 0 },
1999
+ [
2000
+ column.$slots.searchable ? (openBlock(), createBlock(_component_b_slot_component, {
2001
+ key: 0,
2002
+ component: column,
2003
+ scoped: true,
2004
+ name: "searchable",
2005
+ tag: "span",
2006
+ props: { column, filters: _ctx.filters }
2007
+ }, null, 8, ["component", "props"])) : (openBlock(), createBlock(_component_b_input, mergeProps({
2008
+ key: 1,
2009
+ [toHandlerKey(_ctx.filtersEvent)]: _ctx.onFiltersEvent
2010
+ }, {
2011
+ modelValue: _ctx.filters[column.field],
2012
+ "onUpdate:modelValue": ($event) => _ctx.filters[column.field] = $event,
2013
+ type: column.numeric ? "number" : "text"
2014
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "type"]))
2015
+ ],
2016
+ 64
2017
+ /* STABLE_FRAGMENT */
2018
+ )) : createCommentVNode("v-if", true)
2019
+ ],
2020
+ 4
2021
+ /* STYLE */
2022
+ )
2023
+ ],
2024
+ 16
2025
+ /* FULL_PROPS */
2026
+ );
2027
+ }),
2028
+ 128
2029
+ /* KEYED_FRAGMENT */
2030
+ )),
2031
+ _ctx.checkable && _ctx.checkboxPosition === "right" ? (openBlock(), createElementBlock("th", _hoisted_14)) : createCommentVNode("v-if", true)
2032
+ ])) : createCommentVNode("v-if", true)
2033
+ ])) : createCommentVNode("v-if", true),
2034
+ createElementVNode("tbody", null, [
2035
+ (openBlock(true), createElementBlock(
2036
+ Fragment,
2037
+ null,
2038
+ renderList(_ctx.visibleData, (row, index) => {
2039
+ return openBlock(), createElementBlock(
2040
+ Fragment,
2041
+ {
2042
+ key: _ctx.customRowKey ? row[_ctx.customRowKey] : index
2043
+ },
2044
+ [
2045
+ createElementVNode("tr", {
2046
+ class: normalizeClass([_ctx.rowClass(row, index), {
2047
+ "is-selected": _ctx.isRowSelected(row, _ctx.selected),
2048
+ "is-checked": _ctx.isRowChecked(row)
2049
+ }]),
2050
+ onClick: ($event) => _ctx.selectRow(row),
2051
+ onDblclick: ($event) => _ctx.$emit("dblclick", row),
2052
+ onMouseenter: ($event) => _ctx.emitEventForRow("mouseenter", $event, row),
2053
+ onMouseleave: ($event) => _ctx.emitEventForRow("mouseleave", $event, row),
2054
+ onContextmenu: ($event) => _ctx.$emit("contextmenu", row, $event),
2055
+ draggable: _ctx.canDragRow,
2056
+ onDragstart: ($event) => _ctx.handleDragStart($event, row, index),
2057
+ onDragend: ($event) => _ctx.handleDragEnd($event, row, index),
2058
+ onDrop: ($event) => _ctx.handleDrop($event, row, index),
2059
+ onDragover: ($event) => _ctx.handleDragOver($event, row, index),
2060
+ onDragleave: ($event) => _ctx.handleDragLeave($event, row, index),
2061
+ onTouchstart: ($event) => _ctx.handleTouchStart($event, row),
2062
+ onTouchmove: _cache[7] || (_cache[7] = ($event) => _ctx.handleTouchMove($event)),
2063
+ onTouchend: _cache[8] || (_cache[8] = ($event) => _ctx.handleTouchEnd($event))
2064
+ }, [
2065
+ _ctx.showDetailRowIcon ? (openBlock(), createElementBlock("td", _hoisted_16, [
2066
+ _ctx.hasDetailedVisible(row) ? (openBlock(), createElementBlock("a", {
2067
+ key: 0,
2068
+ role: "button",
2069
+ onClick: withModifiers(($event) => _ctx.toggleDetails(row), ["stop"])
2070
+ }, [
2071
+ createVNode(_component_b_icon, {
2072
+ icon: _ctx.detailIcon,
2073
+ pack: _ctx.iconPack,
2074
+ both: "",
2075
+ class: normalizeClass({ "is-expanded": _ctx.isVisibleDetailRow(row) })
2076
+ }, null, 8, ["icon", "pack", "class"])
2077
+ ], 8, _hoisted_17)) : createCommentVNode("v-if", true)
2078
+ ])) : createCommentVNode("v-if", true),
2079
+ _ctx.checkable && _ctx.checkboxPosition === "left" ? (openBlock(), createElementBlock(
2080
+ "td",
2081
+ {
2082
+ key: 1,
2083
+ class: normalizeClass(["checkbox-cell", { "is-sticky": _ctx.stickyCheckbox }])
2084
+ },
2085
+ [
2086
+ createVNode(_component_b_checkbox, {
2087
+ autocomplete: "off",
2088
+ "model-value": _ctx.isRowChecked(row),
2089
+ type: _ctx.checkboxType,
2090
+ disabled: !_ctx.isRowCheckable(row),
2091
+ onClick: withModifiers(($event) => _ctx.checkRow(row, index, $event), ["prevent", "stop"])
2092
+ }, null, 8, ["model-value", "type", "disabled", "onClick"])
2093
+ ],
2094
+ 2
2095
+ /* CLASS */
2096
+ )) : createCommentVNode("v-if", true),
2097
+ (openBlock(true), createElementBlock(
2098
+ Fragment,
2099
+ null,
2100
+ renderList(_ctx.visibleColumns, (column, colindex) => {
2101
+ return openBlock(), createElementBlock(
2102
+ Fragment,
2103
+ {
2104
+ key: column.newKey + ":" + index + ":" + colindex
2105
+ },
2106
+ [
2107
+ column.$slots.default ? (openBlock(), createBlock(_component_b_slot_component, mergeProps({
2108
+ key: 0,
2109
+ component: column
2110
+ }, column.tdAttrs(row, column), {
2111
+ scoped: "",
2112
+ name: "default",
2113
+ tag: "td",
2114
+ class: column.getRootClasses(row),
2115
+ style: column.getRootStyle(row),
2116
+ "data-label": column.label,
2117
+ props: {
2118
+ row,
2119
+ column,
2120
+ index,
2121
+ colindex,
2122
+ toggleDetails: _ctx.toggleDetails,
2123
+ isActiveDetailRow: _ctx.isActiveDetailRow
2124
+ },
2125
+ onClick: ($event) => _ctx.$emit("cellclick", row, column, index, colindex)
2126
+ }), null, 16, ["component", "class", "style", "data-label", "props", "onClick"])) : createCommentVNode("v-if", true)
2127
+ ],
2128
+ 64
2129
+ /* STABLE_FRAGMENT */
2130
+ );
2131
+ }),
2132
+ 128
2133
+ /* KEYED_FRAGMENT */
2134
+ )),
2135
+ _ctx.checkable && _ctx.checkboxPosition === "right" ? (openBlock(), createElementBlock(
2136
+ "td",
2137
+ {
2138
+ key: 2,
2139
+ class: normalizeClass(["checkbox-cell", { "is-sticky": _ctx.stickyCheckbox }])
2140
+ },
2141
+ [
2142
+ createVNode(_component_b_checkbox, {
2143
+ autocomplete: "off",
2144
+ "model-value": _ctx.isRowChecked(row),
2145
+ type: _ctx.checkboxType,
2146
+ disabled: !_ctx.isRowCheckable(row),
2147
+ onClick: withModifiers(($event) => _ctx.checkRow(row, index, $event), ["prevent", "stop"])
2148
+ }, null, 8, ["model-value", "type", "disabled", "onClick"])
2149
+ ],
2150
+ 2
2151
+ /* CLASS */
2152
+ )) : createCommentVNode("v-if", true)
2153
+ ], 42, _hoisted_15),
2154
+ createVNode(Transition, { name: _ctx.detailTransition }, {
2155
+ default: withCtx(() => [
2156
+ _ctx.isActiveDetailRow(row) ? (openBlock(), createElementBlock("tr", _hoisted_18, [
2157
+ createElementVNode("td", { colspan: _ctx.columnCount }, [
2158
+ createElementVNode("div", _hoisted_20, [
2159
+ renderSlot(_ctx.$slots, "detail", {
2160
+ row,
2161
+ index
2162
+ })
2163
+ ])
2164
+ ], 8, _hoisted_19)
2165
+ ])) : createCommentVNode("v-if", true)
2166
+ ]),
2167
+ _: 2
2168
+ /* DYNAMIC */
2169
+ }, 1032, ["name"]),
2170
+ _ctx.isActiveCustomDetailRow(row) ? renderSlot(_ctx.$slots, "detail", {
2171
+ key: 0,
2172
+ row,
2173
+ index
2174
+ }) : createCommentVNode("v-if", true)
2175
+ ],
2176
+ 64
2177
+ /* STABLE_FRAGMENT */
2178
+ );
2179
+ }),
2180
+ 128
2181
+ /* KEYED_FRAGMENT */
2182
+ )),
2183
+ !_ctx.visibleData.length ? (openBlock(), createElementBlock("tr", _hoisted_21, [
2184
+ createElementVNode("td", { colspan: _ctx.columnCount }, [
2185
+ renderSlot(_ctx.$slots, "empty")
2186
+ ], 8, _hoisted_22)
2187
+ ])) : createCommentVNode("v-if", true)
2188
+ ]),
2189
+ _ctx.$slots.footer !== void 0 ? (openBlock(), createElementBlock("tfoot", _hoisted_23, [
2190
+ createElementVNode("tr", _hoisted_24, [
2191
+ _ctx.hasCustomFooterSlot() ? renderSlot(_ctx.$slots, "footer", { key: 0 }) : (openBlock(), createElementBlock("th", {
2192
+ key: 1,
2193
+ colspan: _ctx.columnCount
2194
+ }, [
2195
+ renderSlot(_ctx.$slots, "footer")
2196
+ ], 8, _hoisted_25))
2197
+ ])
2198
+ ])) : createCommentVNode("v-if", true)
2199
+ ], 42, _hoisted_1),
2200
+ _ctx.loading ? renderSlot(_ctx.$slots, "loading", { key: 0 }, () => [
2201
+ createVNode(_component_b_loading, {
2202
+ "is-full-page": false,
2203
+ "model-value": _ctx.loading
2204
+ }, null, 8, ["model-value"])
2205
+ ]) : createCommentVNode("v-if", true)
2206
+ ],
2207
+ 6
2208
+ /* CLASS, STYLE */
2209
+ ),
2210
+ _ctx.checkable && _ctx.hasBottomLeftSlot() || _ctx.paginated && (_ctx.paginationPosition === "bottom" || _ctx.paginationPosition === "both") ? renderSlot(_ctx.$slots, "pagination", { key: 2 }, () => [
2211
+ createVNode(_component_b_table_pagination, mergeProps(_ctx.fallthroughAttrs, {
2212
+ "per-page": _ctx.perPage,
2213
+ paginated: _ctx.paginated,
2214
+ rounded: _ctx.paginationRounded,
2215
+ "icon-pack": _ctx.iconPack,
2216
+ total: _ctx.newDataTotal,
2217
+ "current-page": _ctx.newCurrentPage,
2218
+ "onUpdate:currentPage": _cache[11] || (_cache[11] = ($event) => _ctx.newCurrentPage = $event),
2219
+ "aria-next-label": _ctx.ariaNextLabel,
2220
+ "aria-previous-label": _ctx.ariaPreviousLabel,
2221
+ "aria-page-label": _ctx.ariaPageLabel,
2222
+ "aria-current-label": _ctx.ariaCurrentLabel,
2223
+ onPageChange: _cache[12] || (_cache[12] = (event) => _ctx.$emit("page-change", event)),
2224
+ "page-input": _ctx.pageInput,
2225
+ "pagination-order": _ctx.paginationOrder,
2226
+ "page-input-position": _ctx.pageInputPosition,
2227
+ "debounce-page-input": _ctx.debouncePageInput
2228
+ }), {
2229
+ default: withCtx(() => [
2230
+ renderSlot(_ctx.$slots, "bottom-left")
2231
+ ]),
2232
+ _: 3
2233
+ /* FORWARDED */
2234
+ }, 16, ["per-page", "paginated", "rounded", "icon-pack", "total", "current-page", "aria-next-label", "aria-previous-label", "aria-page-label", "aria-current-label", "page-input", "pagination-order", "page-input-position", "debounce-page-input"])
2235
+ ]) : createCommentVNode("v-if", true),
2236
+ createCommentVNode(" eslint-disable vue/no-v-html "),
2237
+ withDirectives(createElementVNode("div", {
2238
+ ref: "draggedCell",
2239
+ class: normalizeClass(["touch-dragged-cell", _ctx.touchDraggedCellClasses]),
2240
+ innerHTML: _ctx.draggedCellContent
2241
+ }, null, 10, _hoisted_26), [
2242
+ [vShow, _ctx.mayBeTouchDragging && (_ctx.isDraggingRow || _ctx.isDraggingColumn)]
2243
+ ]),
2244
+ createCommentVNode(" eslint-enable vue/no-v-html ")
2245
+ ],
2246
+ 16
2247
+ /* FULL_PROPS */
2248
+ );
2249
+ }
2250
+ var Table = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render]]);
2251
+
2252
+ var _sfc_main = defineComponent({
2253
+ name: "BTableColumn",
2254
+ inject: {
2255
+ $table: { name: "$table", default: false }
2256
+ },
2257
+ props: {
2258
+ label: String,
2259
+ customKey: [String, Number],
2260
+ field: String,
2261
+ meta: [String, Number, Boolean, Function, Object, Array],
2262
+ width: [Number, String],
2263
+ numeric: Boolean,
2264
+ centered: Boolean,
2265
+ searchable: Boolean,
2266
+ sortable: Boolean,
2267
+ visible: {
2268
+ type: Boolean,
2269
+ default: true
2270
+ },
2271
+ subheading: [String, Number],
2272
+ customSort: Function,
2273
+ customSearch: Function,
2274
+ sticky: Boolean,
2275
+ headerSelectable: Boolean,
2276
+ headerClass: String,
2277
+ cellClass: String,
2278
+ thAttrs: {
2279
+ type: Function,
2280
+ default: () => ({})
2281
+ },
2282
+ tdAttrs: {
2283
+ type: Function,
2284
+ default: () => ({})
2285
+ }
2286
+ },
2287
+ data() {
2288
+ return {
2289
+ newKey: this.customKey || this.label,
2290
+ _isTableColumn: true
2291
+ };
2292
+ },
2293
+ computed: {
2294
+ thClasses() {
2295
+ const attrs = this.thAttrs(this);
2296
+ const classes = [this.headerClass, {
2297
+ "is-sortable": this.sortable,
2298
+ "is-sticky": this.sticky,
2299
+ "is-unselectable": this.isHeaderUnSelectable
2300
+ }];
2301
+ if (attrs && attrs.class) {
2302
+ classes.push(attrs.class);
2303
+ }
2304
+ return classes;
2305
+ },
2306
+ thStyle() {
2307
+ const attrs = this.thAttrs(this);
2308
+ const style = [this.style];
2309
+ if (attrs && attrs.style) {
2310
+ style.push(attrs.style);
2311
+ }
2312
+ return style;
2313
+ },
2314
+ thWrapStyle() {
2315
+ const width = toCssWidth(this.width);
2316
+ if (width != null && !width.trim().endsWith("%")) {
2317
+ return { width };
2318
+ } else {
2319
+ return {};
2320
+ }
2321
+ },
2322
+ rootClasses() {
2323
+ return [this.cellClass, {
2324
+ "has-text-right": this.numeric && !this.centered,
2325
+ "has-text-centered": this.centered,
2326
+ "is-sticky": this.sticky
2327
+ }];
2328
+ },
2329
+ style() {
2330
+ var _a;
2331
+ return {
2332
+ width: (_a = toCssWidth(this.width)) != null ? _a : void 0
2333
+ // null → undefined to satisfy StyleValue
2334
+ };
2335
+ },
2336
+ hasDefaultSlot() {
2337
+ return !!this.$slots.default;
2338
+ },
2339
+ /*
2340
+ * Return if column header is un-selectable
2341
+ */
2342
+ isHeaderUnSelectable() {
2343
+ return !this.headerSelectable && this.sortable;
2344
+ }
2345
+ },
2346
+ methods: {
2347
+ getRootClasses(row) {
2348
+ const attrs = this.tdAttrs(row, this);
2349
+ const classes = [this.rootClasses];
2350
+ if (attrs && attrs.class) {
2351
+ classes.push(attrs.class);
2352
+ }
2353
+ return classes;
2354
+ },
2355
+ getRootStyle(row) {
2356
+ const attrs = this.tdAttrs(row, this);
2357
+ const style = [];
2358
+ if (attrs && attrs.style) {
2359
+ style.push(attrs.style);
2360
+ }
2361
+ return style;
2362
+ }
2363
+ },
2364
+ created() {
2365
+ if (!this.$table) {
2366
+ throw new Error("You should wrap bTableColumn on a bTable");
2367
+ }
2368
+ this.$table._registerTableColumn(this);
2369
+ },
2370
+ beforeUnmount() {
2371
+ this.$table._unregisterTableColumn(this);
2372
+ },
2373
+ render() {
2374
+ return null;
2375
+ }
2376
+ });
2377
+
2378
+ const Plugin = {
2379
+ install(Vue) {
2380
+ registerComponent(Vue, Table);
2381
+ registerComponent(Vue, _sfc_main);
2382
+ }
2383
+ };
2384
+
2385
+ export { Table as BTable, _sfc_main as BTableColumn, Plugin as default };