buefy 0.7.9 → 0.8.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 (347) hide show
  1. package/CHANGELOG.md +82 -0
  2. package/dist/buefy.css +13759 -8263
  3. package/dist/buefy.js +9073 -14866
  4. package/dist/buefy.min.css +1 -5
  5. package/dist/buefy.min.js +2 -2
  6. package/dist/cjs/autocomplete.js +22 -0
  7. package/dist/cjs/button.js +106 -0
  8. package/dist/cjs/checkbox.js +135 -0
  9. package/dist/cjs/chunk-07fe6fc0.js +247 -0
  10. package/dist/cjs/chunk-0af453a7.js +105 -0
  11. package/dist/cjs/chunk-0e89e51b.js +394 -0
  12. package/dist/cjs/chunk-13e039f5.js +104 -0
  13. package/dist/cjs/chunk-143d9e6d.js +404 -0
  14. package/dist/cjs/chunk-19ebd649.js +114 -0
  15. package/dist/cjs/chunk-1b1231ce.js +94 -0
  16. package/dist/cjs/chunk-1e6abfcf.js +94 -0
  17. package/dist/cjs/chunk-28d164b1.js +172 -0
  18. package/dist/cjs/chunk-3396605d.js +394 -0
  19. package/dist/cjs/chunk-364a37a0.js +404 -0
  20. package/dist/cjs/chunk-3b066933.js +103 -0
  21. package/dist/cjs/chunk-3dffe6e7.js +54 -0
  22. package/dist/cjs/chunk-4a03b064.js +199 -0
  23. package/dist/cjs/chunk-50b06939.js +153 -0
  24. package/dist/cjs/chunk-52623128.js +105 -0
  25. package/dist/cjs/chunk-53d4f332.js +94 -0
  26. package/dist/cjs/chunk-544a95da.js +404 -0
  27. package/dist/cjs/chunk-545f01b1.js +49 -0
  28. package/dist/cjs/chunk-59b91990.js +64 -0
  29. package/dist/cjs/chunk-5b2a3329.js +394 -0
  30. package/dist/cjs/chunk-60061aa8.js +172 -0
  31. package/dist/cjs/chunk-67658e54.js +404 -0
  32. package/dist/cjs/chunk-6963026a.js +86 -0
  33. package/dist/cjs/chunk-6cece6b7.js +140 -0
  34. package/dist/cjs/chunk-6d6465c1.js +140 -0
  35. package/dist/cjs/chunk-6e9c0aca.js +94 -0
  36. package/dist/cjs/chunk-77f69fca.js +106 -0
  37. package/dist/cjs/chunk-7a25d736.js +114 -0
  38. package/dist/cjs/chunk-876befa8.js +247 -0
  39. package/dist/cjs/chunk-8985ffff.js +105 -0
  40. package/dist/cjs/chunk-8a05c8c9.js +207 -0
  41. package/dist/cjs/chunk-90407463.js +258 -0
  42. package/dist/cjs/chunk-956525c9.js +106 -0
  43. package/dist/cjs/chunk-96ce35a2.js +114 -0
  44. package/dist/cjs/chunk-9da1d120.js +86 -0
  45. package/dist/cjs/chunk-9f6a8079.js +54 -0
  46. package/dist/cjs/chunk-a60dc21d.js +281 -0
  47. package/dist/cjs/chunk-b628277d.js +199 -0
  48. package/dist/cjs/chunk-c146745e.js +153 -0
  49. package/dist/cjs/chunk-c2aec7a9.js +547 -0
  50. package/dist/cjs/chunk-c9641331.js +86 -0
  51. package/dist/cjs/chunk-d492406b.js +172 -0
  52. package/dist/cjs/chunk-e0aa62a0.js +404 -0
  53. package/dist/cjs/chunk-e45e0329.js +48 -0
  54. package/dist/cjs/chunk-e5de6583.js +207 -0
  55. package/dist/cjs/chunk-e85cceb6.js +258 -0
  56. package/dist/cjs/chunk-ed5addd6.js +547 -0
  57. package/dist/cjs/chunk-ef4753d5.js +283 -0
  58. package/dist/cjs/chunk-f0c597f9.js +199 -0
  59. package/dist/cjs/chunk-f1df1c63.js +9 -0
  60. package/dist/cjs/chunk-f1ee2f5c.js +207 -0
  61. package/dist/cjs/chunk-fbd4d545.js +247 -0
  62. package/dist/cjs/clockpicker.js +447 -0
  63. package/dist/cjs/collapse.js +102 -0
  64. package/dist/cjs/datepicker.js +1281 -0
  65. package/dist/cjs/dialog.js +237 -0
  66. package/dist/cjs/dropdown.js +19 -0
  67. package/dist/cjs/field.js +18 -0
  68. package/dist/cjs/icon.js +17 -0
  69. package/dist/cjs/index.js +164 -0
  70. package/dist/cjs/input.js +20 -0
  71. package/dist/cjs/loading.js +166 -0
  72. package/dist/cjs/menu.js +231 -0
  73. package/dist/cjs/message.js +65 -0
  74. package/dist/cjs/modal.js +48 -0
  75. package/dist/cjs/navbar.js +258 -0
  76. package/dist/cjs/notification.js +142 -0
  77. package/dist/cjs/numberinput.js +191 -0
  78. package/dist/cjs/pagination.js +19 -0
  79. package/dist/cjs/progress.js +151 -0
  80. package/dist/cjs/radio.js +224 -0
  81. package/dist/cjs/select.js +20 -0
  82. package/dist/cjs/slider.js +511 -0
  83. package/dist/cjs/snackbar.js +114 -0
  84. package/dist/cjs/steps.js +352 -0
  85. package/dist/cjs/switch.js +144 -0
  86. package/dist/cjs/table.js +877 -0
  87. package/dist/cjs/tabs.js +258 -0
  88. package/dist/cjs/tag.js +63 -0
  89. package/dist/cjs/taginput.js +297 -0
  90. package/dist/cjs/timepicker.js +75 -0
  91. package/dist/cjs/toast.js +89 -0
  92. package/dist/cjs/tooltip.js +17 -0
  93. package/dist/cjs/upload.js +210 -0
  94. package/dist/components/autocomplete/index.js +1084 -2
  95. package/dist/components/autocomplete/index.min.js +2 -0
  96. package/dist/components/button/index.js +425 -2
  97. package/dist/components/button/index.min.js +2 -0
  98. package/dist/components/checkbox/index.js +342 -2
  99. package/dist/components/checkbox/index.min.js +2 -0
  100. package/dist/components/clockpicker/index.js +2340 -2
  101. package/dist/components/clockpicker/index.min.js +2 -0
  102. package/dist/components/collapse/index.js +201 -2
  103. package/dist/components/collapse/index.min.js +2 -0
  104. package/dist/components/datepicker/index.js +2720 -2
  105. package/dist/components/datepicker/index.min.js +2 -0
  106. package/dist/components/dialog/index.js +768 -2
  107. package/dist/components/dialog/index.min.js +2 -0
  108. package/dist/components/dropdown/index.js +555 -2
  109. package/dist/components/dropdown/index.min.js +2 -0
  110. package/dist/components/field/index.js +447 -2
  111. package/dist/components/field/index.min.js +2 -0
  112. package/dist/components/icon/index.js +322 -2
  113. package/dist/components/icon/index.min.js +2 -0
  114. package/dist/components/input/index.js +675 -2
  115. package/dist/components/input/index.min.js +2 -0
  116. package/dist/components/loading/index.js +282 -2
  117. package/dist/components/loading/index.min.js +2 -0
  118. package/dist/components/menu/index.js +550 -2
  119. package/dist/components/menu/index.min.js +2 -0
  120. package/dist/components/message/index.js +482 -2
  121. package/dist/components/message/index.min.js +2 -0
  122. package/dist/components/modal/index.js +400 -2
  123. package/dist/components/modal/index.min.js +2 -0
  124. package/dist/components/navbar/index.js +371 -0
  125. package/dist/components/navbar/index.min.js +2 -0
  126. package/dist/components/notification/index.js +705 -2
  127. package/dist/components/notification/index.min.js +2 -0
  128. package/dist/components/numberinput/index.js +846 -2
  129. package/dist/components/numberinput/index.min.js +2 -0
  130. package/dist/components/pagination/index.js +577 -2
  131. package/dist/components/pagination/index.min.js +2 -0
  132. package/dist/components/progress/index.js +250 -0
  133. package/dist/components/progress/index.min.js +2 -0
  134. package/dist/components/radio/index.js +323 -2
  135. package/dist/components/radio/index.min.js +2 -0
  136. package/dist/components/select/index.js +571 -2
  137. package/dist/components/select/index.min.js +2 -0
  138. package/dist/components/slider/index.js +764 -0
  139. package/dist/components/slider/index.min.js +2 -0
  140. package/dist/components/snackbar/index.js +397 -2
  141. package/dist/components/snackbar/index.min.js +2 -0
  142. package/dist/components/steps/index.js +721 -2
  143. package/dist/components/steps/index.min.js +2 -0
  144. package/dist/components/switch/index.js +243 -2
  145. package/dist/components/switch/index.min.js +2 -0
  146. package/dist/components/table/index.js +1870 -2
  147. package/dist/components/table/index.min.js +2 -0
  148. package/dist/components/tabs/index.js +627 -2
  149. package/dist/components/tabs/index.min.js +2 -0
  150. package/dist/components/tag/index.js +262 -2
  151. package/dist/components/tag/index.min.js +2 -0
  152. package/dist/components/taginput/index.js +1459 -2
  153. package/dist/components/taginput/index.min.js +2 -0
  154. package/dist/components/timepicker/index.js +2053 -2
  155. package/dist/components/timepicker/index.min.js +2 -0
  156. package/dist/components/toast/index.js +372 -2
  157. package/dist/components/toast/index.min.js +2 -0
  158. package/dist/components/tooltip/index.js +236 -2
  159. package/dist/components/tooltip/index.min.js +2 -0
  160. package/dist/components/upload/index.js +501 -2
  161. package/dist/components/upload/index.min.js +2 -0
  162. package/dist/esm/autocomplete.js +18 -0
  163. package/dist/esm/button.js +102 -0
  164. package/dist/esm/checkbox.js +131 -0
  165. package/dist/esm/chunk-00e3e67f.js +401 -0
  166. package/dist/esm/chunk-051f8b06.js +105 -0
  167. package/dist/esm/chunk-0566c90d.js +152 -0
  168. package/dist/esm/chunk-07e19446.js +545 -0
  169. package/dist/esm/chunk-085a700d.js +7 -0
  170. package/dist/esm/chunk-0ad6938a.js +53 -0
  171. package/dist/esm/chunk-0e3f4fb5.js +52 -0
  172. package/dist/esm/chunk-10c85529.js +151 -0
  173. package/dist/esm/chunk-121b1efa.js +197 -0
  174. package/dist/esm/chunk-19dad95e.js +256 -0
  175. package/dist/esm/chunk-231b6066.js +113 -0
  176. package/dist/esm/chunk-24d1a01f.js +279 -0
  177. package/dist/esm/chunk-297bff6b.js +393 -0
  178. package/dist/esm/chunk-2b2ae5c6.js +245 -0
  179. package/dist/esm/chunk-2cb6f867.js +46 -0
  180. package/dist/esm/chunk-33717194.js +392 -0
  181. package/dist/esm/chunk-3b811b77.js +139 -0
  182. package/dist/esm/chunk-3e47308f.js +104 -0
  183. package/dist/esm/chunk-411d6eea.js +84 -0
  184. package/dist/esm/chunk-4535dec5.js +92 -0
  185. package/dist/esm/chunk-47a5f3a1.js +103 -0
  186. package/dist/esm/chunk-4a5384da.js +205 -0
  187. package/dist/esm/chunk-4b663574.js +112 -0
  188. package/dist/esm/chunk-4d393f09.js +170 -0
  189. package/dist/esm/chunk-4d695899.js +257 -0
  190. package/dist/esm/chunk-4f508891.js +171 -0
  191. package/dist/esm/chunk-531b8274.js +281 -0
  192. package/dist/esm/chunk-591ee4a2.js +151 -0
  193. package/dist/esm/chunk-5d3bf82e.js +170 -0
  194. package/dist/esm/chunk-5e0b0665.js +104 -0
  195. package/dist/esm/chunk-648b9aa4.js +45 -0
  196. package/dist/esm/chunk-666940cf.js +546 -0
  197. package/dist/esm/chunk-67c97e13.js +246 -0
  198. package/dist/esm/chunk-6844653e.js +401 -0
  199. package/dist/esm/chunk-699b7cb4.js +245 -0
  200. package/dist/esm/chunk-6f881e7d.js +51 -0
  201. package/dist/esm/chunk-7123d158.js +256 -0
  202. package/dist/esm/chunk-7cf87590.js +60 -0
  203. package/dist/esm/chunk-823177ac.js +545 -0
  204. package/dist/esm/chunk-8838757a.js +401 -0
  205. package/dist/esm/chunk-8ca878c0.js +198 -0
  206. package/dist/esm/chunk-8fc2e874.js +85 -0
  207. package/dist/esm/chunk-912ed715.js +92 -0
  208. package/dist/esm/chunk-92acc21f.js +392 -0
  209. package/dist/esm/chunk-98e86f40.js +197 -0
  210. package/dist/esm/chunk-99a1f9df.js +92 -0
  211. package/dist/esm/chunk-9a776697.js +112 -0
  212. package/dist/esm/chunk-9e3207cc.js +46 -0
  213. package/dist/esm/chunk-9ec14e09.js +112 -0
  214. package/dist/esm/chunk-a5ea70d0.js +205 -0
  215. package/dist/esm/chunk-ac3f4847.js +138 -0
  216. package/dist/esm/chunk-b5376f3e.js +92 -0
  217. package/dist/esm/chunk-b56eb2c8.js +197 -0
  218. package/dist/esm/chunk-b796d1b2.js +392 -0
  219. package/dist/esm/chunk-b822a5db.js +205 -0
  220. package/dist/esm/chunk-b9bdb0e4.js +6 -0
  221. package/dist/esm/chunk-bfe15983.js +401 -0
  222. package/dist/esm/chunk-c9039f68.js +104 -0
  223. package/dist/esm/chunk-cc718c15.js +245 -0
  224. package/dist/esm/chunk-cca88db8.js +99 -0
  225. package/dist/esm/chunk-d6200087.js +50 -0
  226. package/dist/esm/chunk-daeac852.js +138 -0
  227. package/dist/esm/chunk-db31c548.js +103 -0
  228. package/dist/esm/chunk-e5568f45.js +84 -0
  229. package/dist/esm/chunk-e5fce48f.js +59 -0
  230. package/dist/esm/chunk-e84b4047.js +170 -0
  231. package/dist/esm/chunk-e8d90b72.js +98 -0
  232. package/dist/esm/chunk-e932bb68.js +206 -0
  233. package/dist/esm/chunk-edd8ff91.js +103 -0
  234. package/dist/esm/chunk-f0465d8d.js +84 -0
  235. package/dist/esm/chunk-f743d154.js +93 -0
  236. package/dist/esm/chunk-f8036b32.js +402 -0
  237. package/dist/esm/chunk-f984748f.js +401 -0
  238. package/dist/esm/chunk-fd5b0e1e.js +99 -0
  239. package/dist/esm/clockpicker.js +443 -0
  240. package/dist/esm/collapse.js +98 -0
  241. package/dist/esm/datepicker.js +1277 -0
  242. package/dist/esm/dialog.js +231 -0
  243. package/dist/esm/dropdown.js +14 -0
  244. package/dist/esm/field.js +14 -0
  245. package/dist/esm/icon.js +13 -0
  246. package/dist/esm/index.js +154 -0
  247. package/dist/esm/input.js +16 -0
  248. package/dist/esm/loading.js +159 -0
  249. package/dist/esm/menu.js +225 -0
  250. package/dist/esm/message.js +61 -0
  251. package/dist/esm/modal.js +42 -0
  252. package/dist/esm/navbar.js +253 -0
  253. package/dist/esm/notification.js +135 -0
  254. package/dist/esm/numberinput.js +187 -0
  255. package/dist/esm/pagination.js +15 -0
  256. package/dist/esm/progress.js +147 -0
  257. package/dist/esm/radio.js +219 -0
  258. package/dist/esm/select.js +16 -0
  259. package/dist/esm/slider.js +506 -0
  260. package/dist/esm/snackbar.js +108 -0
  261. package/dist/esm/steps.js +347 -0
  262. package/dist/esm/switch.js +140 -0
  263. package/dist/esm/table.js +872 -0
  264. package/dist/esm/tabs.js +253 -0
  265. package/dist/esm/tag.js +59 -0
  266. package/dist/esm/taginput.js +293 -0
  267. package/dist/esm/timepicker.js +71 -0
  268. package/dist/esm/toast.js +83 -0
  269. package/dist/esm/tooltip.js +13 -0
  270. package/dist/esm/upload.js +206 -0
  271. package/package.json +26 -4
  272. package/src/components/checkbox/Checkbox.vue +12 -4
  273. package/src/components/checkbox/CheckboxButton.vue +10 -2
  274. package/src/components/clockpicker/Clockpicker.vue +0 -5
  275. package/src/components/datepicker/Datepicker.spec.js +60 -0
  276. package/src/components/datepicker/Datepicker.vue +46 -19
  277. package/src/components/datepicker/DatepickerTable.spec.js +107 -2
  278. package/src/components/datepicker/DatepickerTable.vue +73 -4
  279. package/src/components/datepicker/DatepickerTableRow.spec.js +127 -17
  280. package/src/components/datepicker/DatepickerTableRow.vue +103 -4
  281. package/src/components/dialog/Dialog.vue +5 -3
  282. package/src/components/dialog/index.js +2 -2
  283. package/src/components/dropdown/Dropdown.vue +1 -4
  284. package/src/components/dropdown/DropdownItem.vue +7 -3
  285. package/src/components/field/Field.spec.js +18 -0
  286. package/src/components/field/Field.vue +21 -2
  287. package/src/components/index.js +6 -0
  288. package/src/components/input/Input.vue +2 -2
  289. package/src/components/loading/index.js +1 -1
  290. package/src/components/modal/index.js +1 -1
  291. package/src/components/navbar/NavBar.spec.js +76 -0
  292. package/src/components/navbar/Navbar.vue +127 -0
  293. package/src/components/navbar/NavbarBurger.vue +25 -0
  294. package/src/components/navbar/NavbarItem.vue +21 -0
  295. package/src/components/navbar/index.js +20 -0
  296. package/src/components/notification/index.js +1 -1
  297. package/src/components/pagination/Pagination.vue +28 -6
  298. package/src/components/progress/Progress.spec.js +77 -0
  299. package/src/components/progress/Progress.vue +108 -0
  300. package/src/components/progress/__snapshots__/Progress.spec.js.snap +7 -0
  301. package/src/components/progress/index.js +17 -0
  302. package/src/components/radio/Radio.spec.js +18 -1
  303. package/src/components/radio/Radio.vue +11 -5
  304. package/src/components/radio/RadioButton.spec.js +18 -1
  305. package/src/components/radio/RadioButton.vue +20 -8
  306. package/src/components/select/Select.spec.js +22 -1
  307. package/src/components/select/Select.vue +2 -1
  308. package/src/components/select/__snapshots__/Select.spec.js.snap +7 -0
  309. package/src/components/slider/Slider.spec.js +10 -0
  310. package/src/components/slider/Slider.vue +240 -0
  311. package/src/components/slider/SliderThumb.vue +188 -0
  312. package/src/components/slider/SliderTick.vue +43 -0
  313. package/src/components/slider/index.js +20 -0
  314. package/src/components/snackbar/index.js +2 -2
  315. package/src/components/steps/StepItem.vue +2 -3
  316. package/src/components/steps/Steps.vue +7 -5
  317. package/src/components/switch/Switch.spec.js +29 -0
  318. package/src/components/switch/Switch.vue +29 -5
  319. package/src/components/switch/__snapshots__/Switch.spec.js.snap +3 -0
  320. package/src/components/table/Table.vue +30 -8
  321. package/src/components/table/TableColumn.vue +2 -2
  322. package/src/components/tag/Tag.vue +4 -1
  323. package/src/components/taginput/Taginput.spec.js +10 -0
  324. package/src/components/taginput/Taginput.vue +8 -3
  325. package/src/components/toast/index.js +2 -2
  326. package/src/components/tooltip/Tooltip.vue +5 -5
  327. package/src/components/upload/Upload.vue +15 -8
  328. package/src/index.js +11 -4
  329. package/src/scss/buefy-build.scss +3 -3
  330. package/src/scss/buefy.scss +4 -0
  331. package/src/scss/components/_datepicker.scss +40 -1
  332. package/src/scss/components/_form.scss +52 -1
  333. package/src/scss/components/_progress.scss +45 -0
  334. package/src/scss/components/_radio.scss +14 -14
  335. package/src/scss/components/_slider.scss +138 -0
  336. package/src/scss/components/_steps.scss +4 -4
  337. package/src/scss/components/_switch.scss +54 -2
  338. package/src/scss/components/_taginput.scss +3 -0
  339. package/src/scss/components/_upload.scss +1 -3
  340. package/src/utils/SlotComponent.js +9 -2
  341. package/src/utils/TimepickerMixin.js +17 -6
  342. package/src/utils/config.js +4 -1
  343. package/src/utils/helpers.spec.js +67 -0
  344. package/src/utils/plugins.js +2 -1
  345. package/types/components.d.ts +3 -3
  346. package/types/index.d.ts +24 -11
  347. package/dist/components/index.js +0 -2
@@ -0,0 +1,872 @@
1
+ import { _ as _defineProperty, b as _toConsumableArray } from './chunk-d6200087.js';
2
+ import { g as getValueByPath, a as indexOf } from './chunk-e5fce48f.js';
3
+ import './chunk-9e3207cc.js';
4
+ import './chunk-10c85529.js';
5
+ import { I as Icon } from './chunk-e84b4047.js';
6
+ import { _ as __vue_normalize__, r as registerComponent, u as use } from './chunk-cca88db8.js';
7
+ import { C as Checkbox } from './chunk-9a776697.js';
8
+ import { S as Select } from './chunk-912ed715.js';
9
+ import { P as Pagination } from './chunk-cc718c15.js';
10
+ import { S as SlotComponent } from './chunk-0e3f4fb5.js';
11
+
12
+ var _components;
13
+ var script = {
14
+ name: 'BTableMobileSort',
15
+ components: (_components = {}, _defineProperty(_components, Select.name, Select), _defineProperty(_components, Icon.name, Icon), _components),
16
+ props: {
17
+ currentSortColumn: Object,
18
+ isAsc: Boolean,
19
+ columns: Array,
20
+ placeholder: String
21
+ },
22
+ data: function data() {
23
+ return {
24
+ mobileSort: this.currentSortColumn
25
+ };
26
+ },
27
+ computed: {
28
+ showPlaceholder: function showPlaceholder() {
29
+ var _this = this;
30
+
31
+ return !this.columns || !this.columns.some(function (column) {
32
+ return column === _this.mobileSort;
33
+ });
34
+ }
35
+ },
36
+ watch: {
37
+ mobileSort: function mobileSort(column) {
38
+ if (this.currentSortColumn === column) return;
39
+ this.$emit('sort', column);
40
+ },
41
+ currentSortColumn: function currentSortColumn(column) {
42
+ this.mobileSort = column;
43
+ }
44
+ },
45
+ methods: {
46
+ sort: function sort() {
47
+ this.$emit('sort', this.mobileSort);
48
+ }
49
+ }
50
+ };
51
+
52
+ /* script */
53
+ const __vue_script__ = script;
54
+
55
+ /* template */
56
+ var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"field table-mobile-sort"},[_c('div',{staticClass:"field has-addons"},[_c('b-select',{attrs:{"expanded":""},model:{value:(_vm.mobileSort),callback:function ($$v) {_vm.mobileSort=$$v;},expression:"mobileSort"}},[(_vm.placeholder)?[_c('option',{directives:[{name:"show",rawName:"v-show",value:(_vm.showPlaceholder),expression:"showPlaceholder"}],attrs:{"selected":"","disabled":"","hidden":""},domProps:{"value":{}}},[_vm._v("\n "+_vm._s(_vm.placeholder)+"\n ")])]:_vm._e(),_vm._v(" "),_vm._l((_vm.columns),function(column,index){return (column.sortable)?_c('option',{key:index,domProps:{"value":column}},[_vm._v("\n "+_vm._s(column.label)+"\n ")]):_vm._e()})],2),_vm._v(" "),_c('div',{staticClass:"control"},[_c('button',{staticClass:"button is-primary",on:{"click":_vm.sort}},[_c('b-icon',{directives:[{name:"show",rawName:"v-show",value:(_vm.currentSortColumn === _vm.mobileSort),expression:"currentSortColumn === mobileSort"}],class:{ 'is-desc': !_vm.isAsc },attrs:{"icon":"arrow-up","size":"is-small","both":""}})],1)])],1)])};
57
+ var __vue_staticRenderFns__ = [];
58
+
59
+ /* style */
60
+ const __vue_inject_styles__ = undefined;
61
+ /* scoped */
62
+ const __vue_scope_id__ = undefined;
63
+ /* module identifier */
64
+ const __vue_module_identifier__ = undefined;
65
+ /* functional template */
66
+ const __vue_is_functional_template__ = false;
67
+ /* style inject */
68
+
69
+ /* style inject SSR */
70
+
71
+
72
+
73
+ var TableMobileSort = __vue_normalize__(
74
+ { render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
75
+ __vue_inject_styles__,
76
+ __vue_script__,
77
+ __vue_scope_id__,
78
+ __vue_is_functional_template__,
79
+ __vue_module_identifier__,
80
+ undefined,
81
+ undefined
82
+ );
83
+
84
+ //
85
+ //
86
+ //
87
+ //
88
+ //
89
+ //
90
+ //
91
+ //
92
+ //
93
+ var script$1 = {
94
+ name: 'BTableColumn',
95
+ props: {
96
+ label: String,
97
+ customKey: [String, Number],
98
+ field: String,
99
+ meta: [String, Number, Boolean, Function, Object, Array],
100
+ width: [Number, String],
101
+ numeric: Boolean,
102
+ centered: Boolean,
103
+ sortable: Boolean,
104
+ visible: {
105
+ type: Boolean,
106
+ default: true
107
+ },
108
+ customSort: Function,
109
+ internal: Boolean // Used internally by Table
110
+
111
+ },
112
+ data: function data() {
113
+ return {
114
+ newKey: this.customKey || this.label
115
+ };
116
+ },
117
+ computed: {
118
+ rootClasses: function rootClasses() {
119
+ return {
120
+ 'has-text-right': this.numeric && !this.centered,
121
+ 'has-text-centered': this.centered
122
+ };
123
+ }
124
+ },
125
+ methods: {
126
+ addRefToTable: function addRefToTable() {
127
+ var _this = this;
128
+
129
+ if (!this.$parent.$data._isTable) {
130
+ this.$destroy();
131
+ throw new Error('You should wrap bTableColumn on a bTable');
132
+ }
133
+
134
+ if (this.internal) return; // Since we're using scoped prop the columns gonna be multiplied,
135
+ // this finds when to stop based on the newKey property.
136
+
137
+ var repeated = this.$parent.newColumns.some(function (column) {
138
+ return column.newKey === _this.newKey;
139
+ });
140
+ !repeated && this.$parent.newColumns.push(this);
141
+ }
142
+ },
143
+ beforeMount: function beforeMount() {
144
+ this.addRefToTable();
145
+ },
146
+ beforeUpdate: function beforeUpdate() {
147
+ this.addRefToTable();
148
+ },
149
+ beforeDestroy: function beforeDestroy() {
150
+ var index = this.$parent.newColumns.map(function (column) {
151
+ return column.newKey;
152
+ }).indexOf(this.newKey);
153
+
154
+ if (index >= 0) {
155
+ this.$parent.newColumns.splice(index, 1);
156
+ }
157
+ }
158
+ };
159
+
160
+ /* script */
161
+ const __vue_script__$1 = script$1;
162
+
163
+ /* template */
164
+ var __vue_render__$1 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.visible)?_c('td',{class:_vm.rootClasses,attrs:{"data-label":_vm.label}},[_vm._t("default")],2):_vm._e()};
165
+ var __vue_staticRenderFns__$1 = [];
166
+
167
+ /* style */
168
+ const __vue_inject_styles__$1 = undefined;
169
+ /* scoped */
170
+ const __vue_scope_id__$1 = undefined;
171
+ /* module identifier */
172
+ const __vue_module_identifier__$1 = undefined;
173
+ /* functional template */
174
+ const __vue_is_functional_template__$1 = false;
175
+ /* style inject */
176
+
177
+ /* style inject SSR */
178
+
179
+
180
+
181
+ var TableColumn = __vue_normalize__(
182
+ { render: __vue_render__$1, staticRenderFns: __vue_staticRenderFns__$1 },
183
+ __vue_inject_styles__$1,
184
+ __vue_script__$1,
185
+ __vue_scope_id__$1,
186
+ __vue_is_functional_template__$1,
187
+ __vue_module_identifier__$1,
188
+ undefined,
189
+ undefined
190
+ );
191
+
192
+ var _components$1;
193
+ var script$2 = {
194
+ name: 'BTable',
195
+ components: (_components$1 = {}, _defineProperty(_components$1, Checkbox.name, Checkbox), _defineProperty(_components$1, Icon.name, Icon), _defineProperty(_components$1, Pagination.name, Pagination), _defineProperty(_components$1, SlotComponent.name, SlotComponent), _defineProperty(_components$1, TableMobileSort.name, TableMobileSort), _defineProperty(_components$1, TableColumn.name, TableColumn), _components$1),
196
+ props: {
197
+ data: {
198
+ type: Array,
199
+ default: function _default() {
200
+ return [];
201
+ }
202
+ },
203
+ columns: {
204
+ type: Array,
205
+ default: function _default() {
206
+ return [];
207
+ }
208
+ },
209
+ bordered: Boolean,
210
+ striped: Boolean,
211
+ narrowed: Boolean,
212
+ hoverable: Boolean,
213
+ loading: Boolean,
214
+ detailed: Boolean,
215
+ checkable: Boolean,
216
+ headerCheckable: {
217
+ type: Boolean,
218
+ default: true
219
+ },
220
+ checkboxPosition: {
221
+ type: String,
222
+ default: 'left',
223
+ validator: function validator(value) {
224
+ return ['left', 'right'].indexOf(value) >= 0;
225
+ }
226
+ },
227
+ selected: Object,
228
+ focusable: Boolean,
229
+ customIsChecked: Function,
230
+ isRowCheckable: {
231
+ type: Function,
232
+ default: function _default() {
233
+ return true;
234
+ }
235
+ },
236
+ checkedRows: {
237
+ type: Array,
238
+ default: function _default() {
239
+ return [];
240
+ }
241
+ },
242
+ mobileCards: {
243
+ type: Boolean,
244
+ default: true
245
+ },
246
+ defaultSort: [String, Array],
247
+ defaultSortDirection: {
248
+ type: String,
249
+ default: 'asc'
250
+ },
251
+ sortIcon: {
252
+ type: String,
253
+ default: 'arrow-up'
254
+ },
255
+ sortIconSize: {
256
+ type: String,
257
+ default: 'is-small'
258
+ },
259
+ paginated: Boolean,
260
+ currentPage: {
261
+ type: Number,
262
+ default: 1
263
+ },
264
+ perPage: {
265
+ type: [Number, String],
266
+ default: 20
267
+ },
268
+ showDetailIcon: {
269
+ type: Boolean,
270
+ default: true
271
+ },
272
+ paginationSimple: Boolean,
273
+ paginationSize: String,
274
+ paginationPosition: {
275
+ type: String,
276
+ default: 'bottom',
277
+ validator: function validator(value) {
278
+ return ['bottom', 'top', 'both'].indexOf(value) >= 0;
279
+ }
280
+ },
281
+ backendSorting: Boolean,
282
+ rowClass: {
283
+ type: Function,
284
+ default: function _default() {
285
+ return '';
286
+ }
287
+ },
288
+ openedDetailed: {
289
+ type: Array,
290
+ default: function _default() {
291
+ return [];
292
+ }
293
+ },
294
+ hasDetailedVisible: {
295
+ type: Function,
296
+ default: function _default() {
297
+ return true;
298
+ }
299
+ },
300
+ detailKey: {
301
+ type: String,
302
+ default: ''
303
+ },
304
+ customDetailRow: {
305
+ type: Boolean,
306
+ default: false
307
+ },
308
+ backendPagination: Boolean,
309
+ total: {
310
+ type: [Number, String],
311
+ default: 0
312
+ },
313
+ iconPack: String,
314
+ mobileSortPlaceholder: String,
315
+ customRowKey: String,
316
+ draggable: {
317
+ type: Boolean,
318
+ defualt: false
319
+ },
320
+ ariaNextLabel: String,
321
+ ariaPreviousLabel: String,
322
+ ariaPageLabel: String,
323
+ ariaCurrentLabel: String
324
+ },
325
+ data: function data() {
326
+ return {
327
+ getValueByPath: getValueByPath,
328
+ newColumns: _toConsumableArray(this.columns),
329
+ visibleDetailRows: this.openedDetailed,
330
+ newData: this.data,
331
+ newDataTotal: this.backendPagination ? this.total : this.data.length,
332
+ newCheckedRows: _toConsumableArray(this.checkedRows),
333
+ newCurrentPage: this.currentPage,
334
+ currentSortColumn: {},
335
+ isAsc: true,
336
+ firstTimeSort: true,
337
+ // Used by first time initSort
338
+ _isTable: true // Used by TableColumn
339
+
340
+ };
341
+ },
342
+ computed: {
343
+ /**
344
+ * return if detailed row tabled
345
+ * will be with chevron column & icon or not
346
+ */
347
+ showDetailRowIcon: function showDetailRowIcon() {
348
+ return this.detailed && this.showDetailIcon;
349
+ },
350
+ tableClasses: function tableClasses() {
351
+ return {
352
+ 'is-bordered': this.bordered,
353
+ 'is-striped': this.striped,
354
+ 'is-narrow': this.narrowed,
355
+ 'has-mobile-cards': this.mobileCards,
356
+ 'is-hoverable': (this.hoverable || this.focusable) && this.visibleData.length
357
+ };
358
+ },
359
+
360
+ /**
361
+ * Splitted data based on the pagination.
362
+ */
363
+ visibleData: function visibleData() {
364
+ if (!this.paginated) return this.newData;
365
+ var currentPage = this.newCurrentPage;
366
+ var perPage = this.perPage;
367
+
368
+ if (this.newData.length <= perPage) {
369
+ return this.newData;
370
+ } else {
371
+ var start = (currentPage - 1) * perPage;
372
+ var end = parseInt(start, 10) + parseInt(perPage, 10);
373
+ return this.newData.slice(start, end);
374
+ }
375
+ },
376
+ visibleColumns: function visibleColumns() {
377
+ if (!this.newColumns) return this.newColumns;
378
+ return this.newColumns.filter(function (column) {
379
+ return column.visible || column.visible === undefined;
380
+ });
381
+ },
382
+
383
+ /**
384
+ * Check if all rows in the page are checked.
385
+ */
386
+ isAllChecked: function isAllChecked() {
387
+ var _this = this;
388
+
389
+ var validVisibleData = this.visibleData.filter(function (row) {
390
+ return _this.isRowCheckable(row);
391
+ });
392
+ if (validVisibleData.length === 0) return false;
393
+ var isAllChecked = validVisibleData.some(function (currentVisibleRow) {
394
+ return indexOf(_this.newCheckedRows, currentVisibleRow, _this.customIsChecked) < 0;
395
+ });
396
+ return !isAllChecked;
397
+ },
398
+
399
+ /**
400
+ * Check if all rows in the page are checkable.
401
+ */
402
+ isAllUncheckable: function isAllUncheckable() {
403
+ var _this2 = this;
404
+
405
+ var validVisibleData = this.visibleData.filter(function (row) {
406
+ return _this2.isRowCheckable(row);
407
+ });
408
+ return validVisibleData.length === 0;
409
+ },
410
+
411
+ /**
412
+ * Check if has any sortable column.
413
+ */
414
+ hasSortablenewColumns: function hasSortablenewColumns() {
415
+ return this.newColumns.some(function (column) {
416
+ return column.sortable;
417
+ });
418
+ },
419
+
420
+ /**
421
+ * Return total column count based if it's checkable or expanded
422
+ */
423
+ columnCount: function columnCount() {
424
+ var count = this.newColumns.length;
425
+ count += this.checkable ? 1 : 0;
426
+ count += this.detailed ? 1 : 0;
427
+ return count;
428
+ }
429
+ },
430
+ watch: {
431
+ /**
432
+ * When data prop change:
433
+ * 1. Update internal value.
434
+ * 2. Reset newColumns (thead), in case it's on a v-for loop.
435
+ * 3. Sort again if it's not backend-sort.
436
+ * 4. Set new total if it's not backend-paginated.
437
+ */
438
+ data: function data(value) {
439
+ var _this3 = this;
440
+
441
+ // Save newColumns before resetting
442
+ var newColumns = this.newColumns;
443
+ this.newColumns = [];
444
+ this.newData = value; // Prevent table from being headless, data could change and created hook
445
+ // on column might not trigger
446
+
447
+ this.$nextTick(function () {
448
+ if (!_this3.newColumns.length) _this3.newColumns = newColumns;
449
+ });
450
+
451
+ if (!this.backendSorting) {
452
+ this.sort(this.currentSortColumn, true);
453
+ }
454
+
455
+ if (!this.backendPagination) {
456
+ this.newDataTotal = value.length;
457
+ }
458
+ },
459
+
460
+ /**
461
+ * When Pagination total change, update internal total
462
+ * only if it's backend-paginated.
463
+ */
464
+ total: function total(newTotal) {
465
+ if (!this.backendPagination) return;
466
+ this.newDataTotal = newTotal;
467
+ },
468
+
469
+ /**
470
+ * When checkedRows prop change, update internal value without
471
+ * mutating original data.
472
+ */
473
+ checkedRows: function checkedRows(rows) {
474
+ this.newCheckedRows = _toConsumableArray(rows);
475
+ },
476
+ columns: function columns(value) {
477
+ this.newColumns = _toConsumableArray(value);
478
+ },
479
+ newColumns: function newColumns(value) {
480
+ this.checkSort();
481
+ },
482
+
483
+ /**
484
+ * When the user wants to control the detailed rows via props.
485
+ * Or wants to open the details of certain row with the router for example.
486
+ */
487
+ openedDetailed: function openedDetailed(expandedRows) {
488
+ this.visibleDetailRows = expandedRows;
489
+ },
490
+ currentPage: function currentPage(newVal) {
491
+ this.newCurrentPage = newVal;
492
+ }
493
+ },
494
+ methods: {
495
+ /**
496
+ * Sort an array by key without mutating original data.
497
+ * Call the user sort function if it was passed.
498
+ */
499
+ sortBy: function sortBy(array, key, fn, isAsc) {
500
+ var sorted = []; // Sorting without mutating original data
501
+
502
+ if (fn && typeof fn === 'function') {
503
+ sorted = _toConsumableArray(array).sort(function (a, b) {
504
+ return fn(a, b, isAsc);
505
+ });
506
+ } else {
507
+ sorted = _toConsumableArray(array).sort(function (a, b) {
508
+ // Get nested values from objects
509
+ var newA = getValueByPath(a, key);
510
+ var newB = getValueByPath(b, key); // sort boolean type
511
+
512
+ if (typeof newA === 'boolean' && typeof newB === 'boolean') {
513
+ return isAsc ? newA - newB : newB - newA;
514
+ }
515
+
516
+ if (!newA && newA !== 0) return 1;
517
+ if (!newB && newB !== 0) return -1;
518
+ if (newA === newB) return 0;
519
+ newA = typeof newA === 'string' ? newA.toUpperCase() : newA;
520
+ newB = typeof newB === 'string' ? newB.toUpperCase() : newB;
521
+ return isAsc ? newA > newB ? 1 : -1 : newA > newB ? -1 : 1;
522
+ });
523
+ }
524
+
525
+ return sorted;
526
+ },
527
+
528
+ /**
529
+ * Sort the column.
530
+ * Toggle current direction on column if it's sortable
531
+ * and not just updating the prop.
532
+ */
533
+ sort: function sort(column) {
534
+ var updatingData = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
535
+ if (!column || !column.sortable) return;
536
+
537
+ if (!updatingData) {
538
+ this.isAsc = column === this.currentSortColumn ? !this.isAsc : this.defaultSortDirection.toLowerCase() !== 'desc';
539
+ }
540
+
541
+ if (!this.firstTimeSort) {
542
+ this.$emit('sort', column.field, this.isAsc ? 'asc' : 'desc');
543
+ }
544
+
545
+ if (!this.backendSorting) {
546
+ this.newData = this.sortBy(this.newData, column.field, column.customSort, this.isAsc);
547
+ }
548
+
549
+ this.currentSortColumn = column;
550
+ },
551
+
552
+ /**
553
+ * Check if the row is checked (is added to the array).
554
+ */
555
+ isRowChecked: function isRowChecked(row) {
556
+ return indexOf(this.newCheckedRows, row, this.customIsChecked) >= 0;
557
+ },
558
+
559
+ /**
560
+ * Remove a checked row from the array.
561
+ */
562
+ removeCheckedRow: function removeCheckedRow(row) {
563
+ var index = indexOf(this.newCheckedRows, row, this.customIsChecked);
564
+
565
+ if (index >= 0) {
566
+ this.newCheckedRows.splice(index, 1);
567
+ }
568
+ },
569
+
570
+ /**
571
+ * Header checkbox click listener.
572
+ * Add or remove all rows in current page.
573
+ */
574
+ checkAll: function checkAll() {
575
+ var _this4 = this;
576
+
577
+ var isAllChecked = this.isAllChecked;
578
+ this.visibleData.forEach(function (currentRow) {
579
+ _this4.removeCheckedRow(currentRow);
580
+
581
+ if (!isAllChecked) {
582
+ if (_this4.isRowCheckable(currentRow)) {
583
+ _this4.newCheckedRows.push(currentRow);
584
+ }
585
+ }
586
+ });
587
+ this.$emit('check', this.newCheckedRows);
588
+ this.$emit('check-all', this.newCheckedRows); // Emit checked rows to update user variable
589
+
590
+ this.$emit('update:checkedRows', this.newCheckedRows);
591
+ },
592
+
593
+ /**
594
+ * Row checkbox click listener.
595
+ * Add or remove a single row.
596
+ */
597
+ checkRow: function checkRow(row) {
598
+ if (!this.isRowChecked(row)) {
599
+ this.newCheckedRows.push(row);
600
+ } else {
601
+ this.removeCheckedRow(row);
602
+ }
603
+
604
+ this.$emit('check', this.newCheckedRows, row); // Emit checked rows to update user variable
605
+
606
+ this.$emit('update:checkedRows', this.newCheckedRows);
607
+ },
608
+
609
+ /**
610
+ * Row click listener.
611
+ * Emit all necessary events.
612
+ */
613
+ selectRow: function selectRow(row, index) {
614
+ this.$emit('click', row);
615
+ if (this.selected === row) return; // Emit new and old row
616
+
617
+ this.$emit('select', row, this.selected); // Emit new row to update user variable
618
+
619
+ this.$emit('update:selected', row);
620
+ },
621
+
622
+ /**
623
+ * Paginator change listener.
624
+ */
625
+ pageChanged: function pageChanged(page) {
626
+ this.newCurrentPage = page > 0 ? page : 1;
627
+ this.$emit('page-change', this.newCurrentPage);
628
+ this.$emit('update:currentPage', this.newCurrentPage);
629
+ },
630
+
631
+ /**
632
+ * Toggle to show/hide details slot
633
+ */
634
+ toggleDetails: function toggleDetails(obj) {
635
+ var found = this.isVisibleDetailRow(obj);
636
+
637
+ if (found) {
638
+ this.closeDetailRow(obj);
639
+ this.$emit('details-close', obj);
640
+ } else {
641
+ this.openDetailRow(obj);
642
+ this.$emit('details-open', obj);
643
+ } // Syncs the detailed rows with the parent component
644
+
645
+
646
+ this.$emit('update:openedDetailed', this.visibleDetailRows);
647
+ },
648
+ openDetailRow: function openDetailRow(obj) {
649
+ var index = this.handleDetailKey(obj);
650
+ this.visibleDetailRows.push(index);
651
+ },
652
+ closeDetailRow: function closeDetailRow(obj) {
653
+ var index = this.handleDetailKey(obj);
654
+ var i = this.visibleDetailRows.indexOf(index);
655
+ this.visibleDetailRows.splice(i, 1);
656
+ },
657
+ isVisibleDetailRow: function isVisibleDetailRow(obj) {
658
+ var index = this.handleDetailKey(obj);
659
+ var result = this.visibleDetailRows.indexOf(index) >= 0;
660
+ return result;
661
+ },
662
+ isActiveDetailRow: function isActiveDetailRow(row) {
663
+ return this.detailed && !this.customDetailRow && this.isVisibleDetailRow(row);
664
+ },
665
+ isActiveCustomDetailRow: function isActiveCustomDetailRow(row) {
666
+ return this.detailed && this.customDetailRow && this.isVisibleDetailRow(row);
667
+ },
668
+
669
+ /**
670
+ * When the detailKey is defined we use the object[detailKey] as index.
671
+ * If not, use the object reference by default.
672
+ */
673
+ handleDetailKey: function handleDetailKey(index) {
674
+ var key = this.detailKey;
675
+ return !key.length ? index : index[key];
676
+ },
677
+ checkPredefinedDetailedRows: function checkPredefinedDetailedRows() {
678
+ var defaultExpandedRowsDefined = this.openedDetailed.length > 0;
679
+
680
+ if (defaultExpandedRowsDefined && !this.detailKey.length) {
681
+ throw new Error('If you set a predefined opened-detailed, you must provide a unique key using the prop "detail-key"');
682
+ }
683
+ },
684
+
685
+ /**
686
+ * Call initSort only first time (For example async data).
687
+ */
688
+ checkSort: function checkSort() {
689
+ if (this.newColumns.length && this.firstTimeSort) {
690
+ this.initSort();
691
+ this.firstTimeSort = false;
692
+ } else if (this.newColumns.length) {
693
+ if (this.currentSortColumn.field) {
694
+ for (var i = 0; i < this.newColumns.length; i++) {
695
+ if (this.newColumns[i].field === this.currentSortColumn.field) {
696
+ this.currentSortColumn = this.newColumns[i];
697
+ break;
698
+ }
699
+ }
700
+ }
701
+ }
702
+ },
703
+
704
+ /**
705
+ * Check if footer slot has custom content.
706
+ */
707
+ hasCustomFooterSlot: function hasCustomFooterSlot() {
708
+ if (this.$slots.footer.length > 1) return true;
709
+ var tag = this.$slots.footer[0].tag;
710
+ if (tag !== 'th' && tag !== 'td') return false;
711
+ return true;
712
+ },
713
+
714
+ /**
715
+ * Check if bottom-left slot exists.
716
+ */
717
+ hasBottomLeftSlot: function hasBottomLeftSlot() {
718
+ return typeof this.$slots['bottom-left'] !== 'undefined';
719
+ },
720
+
721
+ /**
722
+ * Table arrow keys listener, change selection.
723
+ */
724
+ pressedArrow: function pressedArrow(pos) {
725
+ if (!this.visibleData.length) return;
726
+ var index = this.visibleData.indexOf(this.selected) + pos; // Prevent from going up from first and down from last
727
+
728
+ index = index < 0 ? 0 : index > this.visibleData.length - 1 ? this.visibleData.length - 1 : index;
729
+ this.selectRow(this.visibleData[index]);
730
+ },
731
+
732
+ /**
733
+ * Focus table element if has selected prop.
734
+ */
735
+ focus: function focus() {
736
+ if (!this.focusable) return;
737
+ this.$el.querySelector('table').focus();
738
+ },
739
+
740
+ /**
741
+ * Initial sorted column based on the default-sort prop.
742
+ */
743
+ initSort: function initSort() {
744
+ var _this5 = this;
745
+
746
+ if (!this.defaultSort) return;
747
+ var sortField = '';
748
+ var sortDirection = this.defaultSortDirection;
749
+
750
+ if (Array.isArray(this.defaultSort)) {
751
+ sortField = this.defaultSort[0];
752
+
753
+ if (this.defaultSort[1]) {
754
+ sortDirection = this.defaultSort[1];
755
+ }
756
+ } else {
757
+ sortField = this.defaultSort;
758
+ }
759
+
760
+ this.newColumns.forEach(function (column) {
761
+ if (column.field === sortField) {
762
+ _this5.isAsc = sortDirection.toLowerCase() !== 'desc';
763
+
764
+ _this5.sort(column, true);
765
+ }
766
+ });
767
+ },
768
+
769
+ /**
770
+ * Emits drag start event
771
+ */
772
+ handleDragStart: function handleDragStart(event, row, index) {
773
+ this.$emit('dragstart', {
774
+ event: event,
775
+ row: row,
776
+ index: index
777
+ });
778
+ },
779
+
780
+ /**
781
+ * Emits drop event
782
+ */
783
+ handleDrop: function handleDrop(event, row, index) {
784
+ this.$emit('drop', {
785
+ event: event,
786
+ row: row,
787
+ index: index
788
+ });
789
+ },
790
+
791
+ /**
792
+ * Emits drag over event
793
+ */
794
+ handleDragOver: function handleDragOver(event, row, index) {
795
+ this.$emit('dragover', {
796
+ event: event,
797
+ row: row,
798
+ index: index
799
+ });
800
+ },
801
+
802
+ /**
803
+ * Emits drag leave event
804
+ */
805
+ handleDragLeave: function handleDragLeave(event, row, index) {
806
+ this.$emit('dragleave', {
807
+ event: event,
808
+ row: row,
809
+ index: index
810
+ });
811
+ }
812
+ },
813
+ mounted: function mounted() {
814
+ this.checkPredefinedDetailedRows();
815
+ this.checkSort();
816
+ }
817
+ };
818
+
819
+ /* script */
820
+ const __vue_script__$2 = script$2;
821
+
822
+ /* template */
823
+ var __vue_render__$2 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"b-table",class:{ 'is-loading': _vm.loading }},[(_vm.mobileCards && _vm.hasSortablenewColumns)?_c('b-table-mobile-sort',{attrs:{"current-sort-column":_vm.currentSortColumn,"is-asc":_vm.isAsc,"columns":_vm.newColumns,"placeholder":_vm.mobileSortPlaceholder},on:{"sort":function (column) { return _vm.sort(column); }}}):_vm._e(),_vm._v(" "),(_vm.paginated && (_vm.paginationPosition === 'top' || _vm.paginationPosition === 'both'))?_c('div',{staticClass:"top level"},[_c('div',{staticClass:"level-left"},[_vm._t("top-left")],2),_vm._v(" "),_c('div',{staticClass:"level-right"},[(_vm.paginated)?_c('div',{staticClass:"level-item"},[_c('b-pagination',{attrs:{"icon-pack":_vm.iconPack,"total":_vm.newDataTotal,"per-page":_vm.perPage,"simple":_vm.paginationSimple,"size":_vm.paginationSize,"current":_vm.newCurrentPage,"aria-next-label":_vm.ariaNextLabel,"aria-previous-label":_vm.ariaPreviousLabel,"aria-page-label":_vm.ariaPageLabel,"aria-current-label":_vm.ariaCurrentLabel},on:{"change":_vm.pageChanged}})],1):_vm._e()])]):_vm._e(),_vm._v(" "),_c('div',{staticClass:"table-wrapper"},[_c('table',{staticClass:"table",class:_vm.tableClasses,attrs:{"tabindex":!_vm.focusable ? false : 0},on:{"keydown":[function($event){if(!('button' in $event)&&_vm._k($event.keyCode,"up",38,$event.key)){ return null; }if($event.target !== $event.currentTarget){ return null; }$event.preventDefault();_vm.pressedArrow(-1);},function($event){if(!('button' in $event)&&_vm._k($event.keyCode,"down",40,$event.key)){ return null; }if($event.target !== $event.currentTarget){ return null; }$event.preventDefault();_vm.pressedArrow(1);}]}},[(_vm.newColumns.length)?_c('thead',[_c('tr',[(_vm.showDetailRowIcon)?_c('th',{attrs:{"width":"40px"}}):_vm._e(),_vm._v(" "),(_vm.checkable && _vm.checkboxPosition === 'left')?_c('th',{staticClass:"checkbox-cell"},[(_vm.headerCheckable)?[_c('b-checkbox',{attrs:{"value":_vm.isAllChecked,"disabled":_vm.isAllUncheckable},nativeOn:{"change":function($event){_vm.checkAll($event);}}})]:_vm._e()],2):_vm._e(),_vm._v(" "),_vm._l((_vm.visibleColumns),function(column,index){return _c('th',{key:index,class:{
824
+ 'is-current-sort': _vm.currentSortColumn === column,
825
+ 'is-sortable': column.sortable
826
+ },style:({
827
+ width: column.width === undefined ? null : column.width + 'px'
828
+ }),on:{"click":function($event){$event.stopPropagation();_vm.sort(column);}}},[_c('div',{staticClass:"th-wrap",class:{
829
+ 'is-numeric': column.numeric,
830
+ 'is-centered': column.centered
831
+ }},[(column.$scopedSlots && column.$scopedSlots.header)?[_c('b-slot-component',{attrs:{"component":column,"scoped":true,"name":"header","tag":"span","props":{ column: column, index: index }}})]:(_vm.$scopedSlots.header)?[_vm._t("header",null,{column:column,index:index})]:[_vm._v(_vm._s(column.label))],_vm._v(" "),_c('b-icon',{directives:[{name:"show",rawName:"v-show",value:(_vm.currentSortColumn === column),expression:"currentSortColumn === column"}],class:{ 'is-desc': !_vm.isAsc },attrs:{"icon":_vm.sortIcon,"pack":_vm.iconPack,"both":"","size":_vm.sortIconSize}})],2)])}),_vm._v(" "),(_vm.checkable && _vm.checkboxPosition === 'right')?_c('th',{staticClass:"checkbox-cell"},[(_vm.headerCheckable)?[_c('b-checkbox',{attrs:{"value":_vm.isAllChecked,"disabled":_vm.isAllUncheckable},nativeOn:{"change":function($event){_vm.checkAll($event);}}})]:_vm._e()],2):_vm._e()],2)]):_vm._e(),_vm._v(" "),(_vm.visibleData.length)?_c('tbody',[_vm._l((_vm.visibleData),function(row,index){return [_c('tr',{key:_vm.customRowKey ? row[_vm.customRowKey] : index,class:[_vm.rowClass(row, index), {
832
+ 'is-selected': row === _vm.selected,
833
+ 'is-checked': _vm.isRowChecked(row),
834
+ }],attrs:{"draggable":_vm.draggable},on:{"click":function($event){_vm.selectRow(row);},"dblclick":function($event){_vm.$emit('dblclick', row);},"mouseenter":function($event){_vm.$emit('mouseenter', row);},"mouseleave":function($event){_vm.$emit('mouseleave', row);},"contextmenu":function($event){_vm.$emit('contextmenu', row, $event);},"dragstart":function($event){_vm.handleDragStart($event, row, index);},"drop":function($event){_vm.handleDrop($event, row, index);},"dragover":function($event){_vm.handleDragOver($event, row, index);},"dragleave":function($event){_vm.handleDragLeave($event, row, index);}}},[(_vm.showDetailRowIcon)?_c('td',{staticClass:"chevron-cell"},[(_vm.hasDetailedVisible(row))?_c('a',{attrs:{"role":"button"},on:{"click":function($event){$event.stopPropagation();_vm.toggleDetails(row);}}},[_c('b-icon',{class:{'is-expanded': _vm.isVisibleDetailRow(row)},attrs:{"icon":"chevron-right","pack":_vm.iconPack,"both":""}})],1):_vm._e()]):_vm._e(),_vm._v(" "),(_vm.checkable && _vm.checkboxPosition === 'left')?_c('td',{staticClass:"checkbox-cell"},[_c('b-checkbox',{attrs:{"disabled":!_vm.isRowCheckable(row),"value":_vm.isRowChecked(row)},nativeOn:{"change":function($event){_vm.checkRow(row);},"click":function($event){$event.stopPropagation();}}})],1):_vm._e(),_vm._v(" "),(_vm.$scopedSlots.default)?_vm._t("default",null,{row:row,index:index}):_vm._l((_vm.newColumns),function(column){return _c('BTableColumn',_vm._b({key:column.field,attrs:{"internal":""}},'BTableColumn',column,false),[(column.renderHtml)?_c('span',{domProps:{"innerHTML":_vm._s(_vm.getValueByPath(row, column.field))}}):[_vm._v("\n "+_vm._s(_vm.getValueByPath(row, column.field))+"\n ")]],2)}),_vm._v(" "),(_vm.checkable && _vm.checkboxPosition === 'right')?_c('td',{staticClass:"checkbox-cell"},[_c('b-checkbox',{attrs:{"disabled":!_vm.isRowCheckable(row),"value":_vm.isRowChecked(row)},nativeOn:{"change":function($event){_vm.checkRow(row);},"click":function($event){$event.stopPropagation();}}})],1):_vm._e()],2),_vm._v(" "),(_vm.isActiveDetailRow(row))?_c('tr',{staticClass:"detail"},[_c('td',{attrs:{"colspan":_vm.columnCount}},[_c('div',{staticClass:"detail-container"},[_vm._t("detail",null,{row:row,index:index})],2)])]):_vm._e(),_vm._v(" "),(_vm.isActiveCustomDetailRow(row))?_vm._t("detail",null,{row:row,index:index}):_vm._e()]})],2):_c('tbody',[_c('tr',{staticClass:"is-empty"},[_c('td',{attrs:{"colspan":_vm.columnCount}},[_vm._t("empty")],2)])]),_vm._v(" "),(_vm.$slots.footer !== undefined)?_c('tfoot',[_c('tr',{staticClass:"table-footer"},[(_vm.hasCustomFooterSlot())?_vm._t("footer"):_c('th',{attrs:{"colspan":_vm.columnCount}},[_vm._t("footer")],2)],2)]):_vm._e()])]),_vm._v(" "),((_vm.checkable && _vm.hasBottomLeftSlot()) ||
835
+ (_vm.paginated && (_vm.paginationPosition === 'bottom' || _vm.paginationPosition === 'both')))?_c('div',{staticClass:"level"},[_c('div',{staticClass:"level-left"},[_vm._t("bottom-left")],2),_vm._v(" "),_c('div',{staticClass:"level-right"},[(_vm.paginated)?_c('div',{staticClass:"level-item"},[_c('b-pagination',{attrs:{"icon-pack":_vm.iconPack,"total":_vm.newDataTotal,"per-page":_vm.perPage,"simple":_vm.paginationSimple,"size":_vm.paginationSize,"current":_vm.newCurrentPage,"aria-next-label":_vm.ariaNextLabel,"aria-previous-label":_vm.ariaPreviousLabel,"aria-page-label":_vm.ariaPageLabel,"aria-current-label":_vm.ariaCurrentLabel},on:{"change":_vm.pageChanged}})],1):_vm._e()])]):_vm._e()],1)};
836
+ var __vue_staticRenderFns__$2 = [];
837
+
838
+ /* style */
839
+ const __vue_inject_styles__$2 = undefined;
840
+ /* scoped */
841
+ const __vue_scope_id__$2 = undefined;
842
+ /* module identifier */
843
+ const __vue_module_identifier__$2 = undefined;
844
+ /* functional template */
845
+ const __vue_is_functional_template__$2 = false;
846
+ /* style inject */
847
+
848
+ /* style inject SSR */
849
+
850
+
851
+
852
+ var Table = __vue_normalize__(
853
+ { render: __vue_render__$2, staticRenderFns: __vue_staticRenderFns__$2 },
854
+ __vue_inject_styles__$2,
855
+ __vue_script__$2,
856
+ __vue_scope_id__$2,
857
+ __vue_is_functional_template__$2,
858
+ __vue_module_identifier__$2,
859
+ undefined,
860
+ undefined
861
+ );
862
+
863
+ var Plugin = {
864
+ install: function install(Vue) {
865
+ registerComponent(Vue, Table);
866
+ registerComponent(Vue, TableColumn);
867
+ }
868
+ };
869
+ use(Plugin);
870
+
871
+ export default Plugin;
872
+ export { Table, TableColumn };