@gitlab/ui 131.3.0 → 131.3.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 (384) hide show
  1. package/package.json +4 -4
  2. package/src/components/utilities/truncate/truncate.scss +3 -1
  3. package/src/scss/mixins.scss +3 -1
  4. package/src/vendor/bootstrap-vue/src/components/tooltip/tooltip.js +86 -25
  5. package/tailwind.defaults.js +10 -1
  6. package/dist/charts.js +0 -13
  7. package/dist/components/base/accordion/accordion.js +0 -69
  8. package/dist/components/base/accordion/accordion_item.js +0 -160
  9. package/dist/components/base/accordion/constants.js +0 -3
  10. package/dist/components/base/alert/alert.js +0 -263
  11. package/dist/components/base/animated_icon/animated_chevron_down_up_icon.js +0 -45
  12. package/dist/components/base/animated_icon/animated_chevron_lg_down_up_icon.js +0 -45
  13. package/dist/components/base/animated_icon/animated_chevron_lg_right_down_icon.js +0 -45
  14. package/dist/components/base/animated_icon/animated_chevron_right_down_icon.js +0 -45
  15. package/dist/components/base/animated_icon/animated_duo_chat_icon.js +0 -45
  16. package/dist/components/base/animated_icon/animated_loader_icon.js +0 -45
  17. package/dist/components/base/animated_icon/animated_notifications_icon.js +0 -45
  18. package/dist/components/base/animated_icon/animated_sidebar_icon.js +0 -45
  19. package/dist/components/base/animated_icon/animated_smile_icon.js +0 -45
  20. package/dist/components/base/animated_icon/animated_sort_icon.js +0 -45
  21. package/dist/components/base/animated_icon/animated_star_icon.js +0 -45
  22. package/dist/components/base/animated_icon/animated_todo_icon.js +0 -45
  23. package/dist/components/base/animated_icon/animated_upload_icon.js +0 -45
  24. package/dist/components/base/animated_icon/base_animated_icon.js +0 -77
  25. package/dist/components/base/attribute_list/attribute_list.js +0 -100
  26. package/dist/components/base/avatar/avatar.js +0 -175
  27. package/dist/components/base/avatar/utils.js +0 -17
  28. package/dist/components/base/avatar_labeled/avatar_labeled.js +0 -198
  29. package/dist/components/base/avatar_link/avatar_link.js +0 -47
  30. package/dist/components/base/avatars_inline/avatars_inline.js +0 -139
  31. package/dist/components/base/badge/badge.js +0 -197
  32. package/dist/components/base/banner/banner.js +0 -149
  33. package/dist/components/base/breadcrumb/breadcrumb.js +0 -282
  34. package/dist/components/base/breadcrumb/breadcrumb_item.js +0 -96
  35. package/dist/components/base/broadcast_message/broadcast_message.js +0 -113
  36. package/dist/components/base/broadcast_message/constants.js +0 -5
  37. package/dist/components/base/button/button.js +0 -419
  38. package/dist/components/base/button_group/button_group.js +0 -53
  39. package/dist/components/base/card/card.js +0 -69
  40. package/dist/components/base/collapse/collapse.js +0 -163
  41. package/dist/components/base/color_mode_toggle/color_mode_toggle.js +0 -92
  42. package/dist/components/base/datepicker/datepicker.js +0 -475
  43. package/dist/components/base/daterange_picker/daterange_picker.js +0 -394
  44. package/dist/components/base/drawer/drawer.js +0 -156
  45. package/dist/components/base/dropdown/dropdown.js +0 -330
  46. package/dist/components/base/dropdown/dropdown_divider.js +0 -48
  47. package/dist/components/base/dropdown/dropdown_form.js +0 -48
  48. package/dist/components/base/dropdown/dropdown_item.js +0 -175
  49. package/dist/components/base/dropdown/dropdown_section_header.js +0 -48
  50. package/dist/components/base/dropdown/dropdown_text.js +0 -48
  51. package/dist/components/base/filtered_search/common_story_options.js +0 -14
  52. package/dist/components/base/filtered_search/filtered_search.js +0 -428
  53. package/dist/components/base/filtered_search/filtered_search_suggestion.js +0 -95
  54. package/dist/components/base/filtered_search/filtered_search_suggestion_list.js +0 -139
  55. package/dist/components/base/filtered_search/filtered_search_term.js +0 -217
  56. package/dist/components/base/filtered_search/filtered_search_token.js +0 -383
  57. package/dist/components/base/filtered_search/filtered_search_token_segment.js +0 -444
  58. package/dist/components/base/filtered_search/filtered_search_utils.js +0 -241
  59. package/dist/components/base/form/form.js +0 -43
  60. package/dist/components/base/form/form_character_count/form_character_count.js +0 -107
  61. package/dist/components/base/form/form_checkbox/form_checkbox.js +0 -342
  62. package/dist/components/base/form/form_checkbox/form_checkbox_group.js +0 -186
  63. package/dist/components/base/form/form_combobox/constants.js +0 -55
  64. package/dist/components/base/form/form_combobox/form_combobox.js +0 -239
  65. package/dist/components/base/form/form_date/form_date.js +0 -143
  66. package/dist/components/base/form/form_fields/form_field_validator.js +0 -93
  67. package/dist/components/base/form/form_fields/form_fields.js +0 -289
  68. package/dist/components/base/form/form_fields/form_fields_loop.js +0 -75
  69. package/dist/components/base/form/form_fields/mappers.js +0 -13
  70. package/dist/components/base/form/form_fields/validators.js +0 -48
  71. package/dist/components/base/form/form_group/form_group.js +0 -119
  72. package/dist/components/base/form/form_input/form_input.js +0 -695
  73. package/dist/components/base/form/form_input_group/form_input_group.js +0 -120
  74. package/dist/components/base/form/form_input_group/form_input_group_mixin.js +0 -41
  75. package/dist/components/base/form/form_radio/form_radio.js +0 -259
  76. package/dist/components/base/form/form_radio_group/form_radio_group.js +0 -187
  77. package/dist/components/base/form/form_select/constants.js +0 -12
  78. package/dist/components/base/form/form_select/form_select.js +0 -96
  79. package/dist/components/base/form/form_textarea/form_textarea.js +0 -166
  80. package/dist/components/base/form/input_group_text/input_group_text.js +0 -43
  81. package/dist/components/base/icon/icon.js +0 -113
  82. package/dist/components/base/illustration/illustration.js +0 -80
  83. package/dist/components/base/infinite_scroll/infinite_scroll.js +0 -196
  84. package/dist/components/base/keyset_pagination/keyset_pagination.js +0 -152
  85. package/dist/components/base/label/label.js +0 -174
  86. package/dist/components/base/link/link.js +0 -332
  87. package/dist/components/base/loading_icon/loading_icon.js +0 -120
  88. package/dist/components/base/markdown/markdown.js +0 -50
  89. package/dist/components/base/modal/modal.js +0 -259
  90. package/dist/components/base/new_dropdowns/base_dropdown/base_dropdown.js +0 -716
  91. package/dist/components/base/new_dropdowns/base_dropdown/constants.js +0 -5
  92. package/dist/components/base/new_dropdowns/base_dropdown/dropdown_container.js +0 -32
  93. package/dist/components/base/new_dropdowns/constants.js +0 -24
  94. package/dist/components/base/new_dropdowns/disclosure/constants.js +0 -8
  95. package/dist/components/base/new_dropdowns/disclosure/disclosure_dropdown.js +0 -400
  96. package/dist/components/base/new_dropdowns/disclosure/disclosure_dropdown_group.js +0 -112
  97. package/dist/components/base/new_dropdowns/disclosure/disclosure_dropdown_item.js +0 -196
  98. package/dist/components/base/new_dropdowns/disclosure/mock_data.js +0 -168
  99. package/dist/components/base/new_dropdowns/disclosure/utils.js +0 -84
  100. package/dist/components/base/new_dropdowns/listbox/listbox.js +0 -997
  101. package/dist/components/base/new_dropdowns/listbox/listbox_group.js +0 -58
  102. package/dist/components/base/new_dropdowns/listbox/listbox_item.js +0 -112
  103. package/dist/components/base/new_dropdowns/listbox/listbox_search_input.js +0 -94
  104. package/dist/components/base/new_dropdowns/listbox/mock_data.js +0 -131
  105. package/dist/components/base/new_dropdowns/listbox/utils.js +0 -33
  106. package/dist/components/base/pagination/pagination.js +0 -397
  107. package/dist/components/base/path/data.js +0 -34
  108. package/dist/components/base/path/path.js +0 -177
  109. package/dist/components/base/popover/popover.js +0 -142
  110. package/dist/components/base/progress_bar/progress_bar.js +0 -117
  111. package/dist/components/base/search_box_by_click/search_box_by_click.js +0 -245
  112. package/dist/components/base/search_box_by_type/search_box_by_type.js +0 -187
  113. package/dist/components/base/segmented_control/segmented_control.js +0 -73
  114. package/dist/components/base/skeleton_loader/skeleton_loader.js +0 -232
  115. package/dist/components/base/sorting/sorting.js +0 -180
  116. package/dist/components/base/table/constants.js +0 -5
  117. package/dist/components/base/table/table.js +0 -187
  118. package/dist/components/base/table_lite/table_lite.js +0 -80
  119. package/dist/components/base/tabs/constants.js +0 -3
  120. package/dist/components/base/tabs/tab/tab.js +0 -113
  121. package/dist/components/base/tabs/tabs/scrollable_tabs.js +0 -162
  122. package/dist/components/base/tabs/tabs/tabs.js +0 -223
  123. package/dist/components/base/toast/index.js +0 -66
  124. package/dist/components/base/toast/toast.js +0 -125
  125. package/dist/components/base/toast/toaster.js +0 -87
  126. package/dist/components/base/toggle/toggle.js +0 -178
  127. package/dist/components/base/token/token.js +0 -97
  128. package/dist/components/base/token_selector/helpers.js +0 -5
  129. package/dist/components/base/token_selector/token_container.js +0 -160
  130. package/dist/components/base/token_selector/token_selector.js +0 -454
  131. package/dist/components/base/token_selector/token_selector_dropdown.js +0 -223
  132. package/dist/components/base/tooltip/tooltip.js +0 -54
  133. package/dist/components/charts/area/area.js +0 -329
  134. package/dist/components/charts/bar/bar.js +0 -207
  135. package/dist/components/charts/chart/chart.js +0 -215
  136. package/dist/components/charts/column/column.js +0 -221
  137. package/dist/components/charts/discrete_scatter/discrete_scatter.js +0 -199
  138. package/dist/components/charts/gauge/gauge.js +0 -205
  139. package/dist/components/charts/heatmap/heatmap.js +0 -299
  140. package/dist/components/charts/heatmap/index.js +0 -2
  141. package/dist/components/charts/legend/legend.js +0 -245
  142. package/dist/components/charts/line/line.js +0 -340
  143. package/dist/components/charts/series_label/series_label.js +0 -101
  144. package/dist/components/charts/shared/tooltip/tooltip.js +0 -369
  145. package/dist/components/charts/shared/tooltip/tooltip_default_format/tooltip_default_format.js +0 -53
  146. package/dist/components/charts/single_stat/single_stat.js +0 -164
  147. package/dist/components/charts/sparkline/sparkline.js +0 -299
  148. package/dist/components/charts/stacked_column/stacked_column.js +0 -380
  149. package/dist/components/dashboards/dashboard_layout/dashboard_layout.js +0 -125
  150. package/dist/components/dashboards/dashboard_layout/grid_layout/grid_layout.js +0 -326
  151. package/dist/components/dashboards/dashboard_layout/validators.js +0 -14
  152. package/dist/components/dashboards/dashboard_panel/dashboard_panel.js +0 -236
  153. package/dist/components/dashboards/mock_data.js +0 -49
  154. package/dist/components/experimental/experiment_badge/constants.js +0 -4
  155. package/dist/components/experimental/experiment_badge/experiment_badge.js +0 -102
  156. package/dist/components/extended/multi_step_form_template/multi_step_form_template.js +0 -87
  157. package/dist/components/index.js +0 -107
  158. package/dist/components/mixins/button_mixin.js +0 -11
  159. package/dist/components/mixins/safe_link_mixin.js +0 -30
  160. package/dist/components/mixins/tooltip_mixin.js +0 -21
  161. package/dist/components/regions/dashboard_skeleton/dashboard_skeleton.js +0 -53
  162. package/dist/components/regions/empty_state/empty_state.js +0 -181
  163. package/dist/components/shared_components/clear_icon_button/clear_icon_button.js +0 -64
  164. package/dist/components/shared_components/clipboard_button/clipboard_button.js +0 -100
  165. package/dist/components/shared_components/close_button/close_button.js +0 -55
  166. package/dist/components/utilities/animated_number/animated_number.js +0 -131
  167. package/dist/components/utilities/friendly_wrap/friendly_wrap.js +0 -75
  168. package/dist/components/utilities/intersection_observer/intersection_observer.js +0 -88
  169. package/dist/components/utilities/intersperse/intersperse.js +0 -104
  170. package/dist/components/utilities/sprintf/sprintf.js +0 -171
  171. package/dist/components/utilities/truncate/constants.js +0 -8
  172. package/dist/components/utilities/truncate/truncate.js +0 -154
  173. package/dist/components/utilities/truncate_text/constants.js +0 -7
  174. package/dist/components/utilities/truncate_text/truncate_text.js +0 -146
  175. package/dist/config.js +0 -53
  176. package/dist/directives/hover_load/hover_load.js +0 -45
  177. package/dist/directives/index.js +0 -8
  178. package/dist/directives/modal.js +0 -1
  179. package/dist/directives/outside/outside.js +0 -149
  180. package/dist/directives/resize_observer/resize_observer.js +0 -58
  181. package/dist/directives/safe_html/constants.js +0 -6
  182. package/dist/directives/safe_html/safe_html.js +0 -39
  183. package/dist/directives/safe_link/mock_data.js +0 -10
  184. package/dist/directives/safe_link/safe_link.js +0 -67
  185. package/dist/directives/tooltip/container.js +0 -7
  186. package/dist/directives/tooltip/tooltip.js +0 -18
  187. package/dist/index.css +0 -7
  188. package/dist/index.css.map +0 -1
  189. package/dist/index.js +0 -2
  190. package/dist/tailwind.css +0 -2
  191. package/dist/tailwind.css.map +0 -1
  192. package/dist/tokens/build/js/tokens.dark.js +0 -1410
  193. package/dist/tokens/build/js/tokens.js +0 -1410
  194. package/dist/tokens/common_story_options.js +0 -29
  195. package/dist/tokens/tokens_story.js +0 -76
  196. package/dist/utils/breakpoints.js +0 -20
  197. package/dist/utils/charts/config.js +0 -616
  198. package/dist/utils/charts/constants.js +0 -69
  199. package/dist/utils/charts/mock_data.js +0 -191
  200. package/dist/utils/charts/story_config.js +0 -24
  201. package/dist/utils/charts/theme.js +0 -200
  202. package/dist/utils/charts/utils.js +0 -54
  203. package/dist/utils/constants.js +0 -333
  204. package/dist/utils/data_utils.js +0 -19
  205. package/dist/utils/datetime_utility.js +0 -61
  206. package/dist/utils/equality_utils.js +0 -84
  207. package/dist/utils/i18n.js +0 -65
  208. package/dist/utils/is_slot_empty.js +0 -34
  209. package/dist/utils/number_utils.js +0 -132
  210. package/dist/utils/play_utils.js +0 -11
  211. package/dist/utils/set_utils.js +0 -25
  212. package/dist/utils/stories_constants.js +0 -29
  213. package/dist/utils/stories_utils.js +0 -62
  214. package/dist/utils/story_decorators/container.js +0 -19
  215. package/dist/utils/string_utils.js +0 -69
  216. package/dist/utils/svgs/svg_paths.js +0 -7
  217. package/dist/utils/test_utils.js +0 -33
  218. package/dist/utils/use_fake_date.js +0 -29
  219. package/dist/utils/use_mock_intersection_observer.js +0 -105
  220. package/dist/utils/utils.js +0 -205
  221. package/dist/utils.js +0 -5
  222. package/dist/vendor/bootstrap-vue/src/bv-config.js +0 -8
  223. package/dist/vendor/bootstrap-vue/src/components/button/button-close.js +0 -81
  224. package/dist/vendor/bootstrap-vue/src/components/button/button.js +0 -204
  225. package/dist/vendor/bootstrap-vue/src/components/button/index.js +0 -2
  226. package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-divider.js +0 -41
  227. package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-form.js +0 -52
  228. package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-group.js +0 -75
  229. package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-header.js +0 -52
  230. package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-item-button.js +0 -85
  231. package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-item.js +0 -97
  232. package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-text.js +0 -60
  233. package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown.js +0 -271
  234. package/dist/vendor/bootstrap-vue/src/components/dropdown/index.js +0 -8
  235. package/dist/vendor/bootstrap-vue/src/components/form/form-invalid-feedback.js +0 -53
  236. package/dist/vendor/bootstrap-vue/src/components/form/form-text.js +0 -55
  237. package/dist/vendor/bootstrap-vue/src/components/form/form-valid-feedback.js +0 -53
  238. package/dist/vendor/bootstrap-vue/src/components/form/form.js +0 -56
  239. package/dist/vendor/bootstrap-vue/src/components/form/index.js +0 -4
  240. package/dist/vendor/bootstrap-vue/src/components/form-group/form-group.js +0 -348
  241. package/dist/vendor/bootstrap-vue/src/components/form-group/index.js +0 -1
  242. package/dist/vendor/bootstrap-vue/src/components/form-select/form-select-option-group.js +0 -54
  243. package/dist/vendor/bootstrap-vue/src/components/form-select/form-select-option.js +0 -41
  244. package/dist/vendor/bootstrap-vue/src/components/form-select/form-select.js +0 -143
  245. package/dist/vendor/bootstrap-vue/src/components/form-select/helpers/mixin-options.js +0 -56
  246. package/dist/vendor/bootstrap-vue/src/components/form-select/index.js +0 -3
  247. package/dist/vendor/bootstrap-vue/src/components/form-textarea/form-textarea.js +0 -217
  248. package/dist/vendor/bootstrap-vue/src/components/form-textarea/index.js +0 -1
  249. package/dist/vendor/bootstrap-vue/src/components/layout/col.js +0 -156
  250. package/dist/vendor/bootstrap-vue/src/components/layout/form-row.js +0 -34
  251. package/dist/vendor/bootstrap-vue/src/components/layout/index.js +0 -2
  252. package/dist/vendor/bootstrap-vue/src/components/link/index.js +0 -1
  253. package/dist/vendor/bootstrap-vue/src/components/link/link.js +0 -283
  254. package/dist/vendor/bootstrap-vue/src/components/modal/helpers/bv-modal-event.class.js +0 -21
  255. package/dist/vendor/bootstrap-vue/src/components/modal/helpers/modal-manager.js +0 -212
  256. package/dist/vendor/bootstrap-vue/src/components/modal/index.js +0 -1
  257. package/dist/vendor/bootstrap-vue/src/components/modal/modal.js +0 -887
  258. package/dist/vendor/bootstrap-vue/src/components/popover/helpers/bv-popover-template.js +0 -55
  259. package/dist/vendor/bootstrap-vue/src/components/popover/helpers/bv-popover.js +0 -31
  260. package/dist/vendor/bootstrap-vue/src/components/popover/index.js +0 -1
  261. package/dist/vendor/bootstrap-vue/src/components/popover/popover.js +0 -49
  262. package/dist/vendor/bootstrap-vue/src/components/table/helpers/constants.js +0 -22
  263. package/dist/vendor/bootstrap-vue/src/components/table/helpers/default-sort-compare.js +0 -64
  264. package/dist/vendor/bootstrap-vue/src/components/table/helpers/filter-event.js +0 -40
  265. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-bottom-row.js +0 -43
  266. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-busy.js +0 -83
  267. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-caption.js +0 -50
  268. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-colgroup.js +0 -32
  269. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-empty.js +0 -82
  270. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-filtering.js +0 -274
  271. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-items.js +0 -154
  272. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-pagination.js +0 -44
  273. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-provider.js +0 -191
  274. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-selectable.js +0 -213
  275. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-sorting.js +0 -275
  276. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-stacked.js +0 -39
  277. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-table-renderer.js +0 -186
  278. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-tbody-row.js +0 -338
  279. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-tbody.js +0 -243
  280. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-tfoot.js +0 -50
  281. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-thead.js +0 -218
  282. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-top-row.js +0 -42
  283. package/dist/vendor/bootstrap-vue/src/components/table/helpers/normalize-fields.js +0 -86
  284. package/dist/vendor/bootstrap-vue/src/components/table/helpers/sanitize-row.js +0 -32
  285. package/dist/vendor/bootstrap-vue/src/components/table/helpers/stringify-record-values.js +0 -11
  286. package/dist/vendor/bootstrap-vue/src/components/table/helpers/text-selection-active.js +0 -14
  287. package/dist/vendor/bootstrap-vue/src/components/table/index.js +0 -9
  288. package/dist/vendor/bootstrap-vue/src/components/table/table-lite.js +0 -51
  289. package/dist/vendor/bootstrap-vue/src/components/table/table-simple.js +0 -44
  290. package/dist/vendor/bootstrap-vue/src/components/table/table.js +0 -67
  291. package/dist/vendor/bootstrap-vue/src/components/table/tbody.js +0 -116
  292. package/dist/vendor/bootstrap-vue/src/components/table/td.js +0 -204
  293. package/dist/vendor/bootstrap-vue/src/components/table/tfoot.js +0 -96
  294. package/dist/vendor/bootstrap-vue/src/components/table/th.js +0 -26
  295. package/dist/vendor/bootstrap-vue/src/components/table/thead.js +0 -99
  296. package/dist/vendor/bootstrap-vue/src/components/table/tr.js +0 -121
  297. package/dist/vendor/bootstrap-vue/src/components/tabs/index.js +0 -2
  298. package/dist/vendor/bootstrap-vue/src/components/tabs/tab.js +0 -238
  299. package/dist/vendor/bootstrap-vue/src/components/tabs/tabs.js +0 -601
  300. package/dist/vendor/bootstrap-vue/src/components/tooltip/helpers/bv-popper.js +0 -251
  301. package/dist/vendor/bootstrap-vue/src/components/tooltip/helpers/bv-tooltip-template.js +0 -118
  302. package/dist/vendor/bootstrap-vue/src/components/tooltip/helpers/bv-tooltip.js +0 -932
  303. package/dist/vendor/bootstrap-vue/src/components/tooltip/index.js +0 -1
  304. package/dist/vendor/bootstrap-vue/src/components/tooltip/tooltip.js +0 -269
  305. package/dist/vendor/bootstrap-vue/src/components/transition/bv-transition.js +0 -103
  306. package/dist/vendor/bootstrap-vue/src/components/transporter/transporter.js +0 -205
  307. package/dist/vendor/bootstrap-vue/src/constants/components.js +0 -55
  308. package/dist/vendor/bootstrap-vue/src/constants/config.js +0 -11
  309. package/dist/vendor/bootstrap-vue/src/constants/env.js +0 -36
  310. package/dist/vendor/bootstrap-vue/src/constants/events.js +0 -56
  311. package/dist/vendor/bootstrap-vue/src/constants/key-codes.js +0 -11
  312. package/dist/vendor/bootstrap-vue/src/constants/popper.js +0 -10
  313. package/dist/vendor/bootstrap-vue/src/constants/props.js +0 -24
  314. package/dist/vendor/bootstrap-vue/src/constants/regex.js +0 -35
  315. package/dist/vendor/bootstrap-vue/src/constants/safe-types.js +0 -15
  316. package/dist/vendor/bootstrap-vue/src/constants/slots.js +0 -36
  317. package/dist/vendor/bootstrap-vue/src/directives/modal/index.js +0 -1
  318. package/dist/vendor/bootstrap-vue/src/directives/modal/modal.js +0 -112
  319. package/dist/vendor/bootstrap-vue/src/directives/tooltip/index.js +0 -1
  320. package/dist/vendor/bootstrap-vue/src/directives/tooltip/tooltip.js +0 -265
  321. package/dist/vendor/bootstrap-vue/src/directives/visible/index.js +0 -1
  322. package/dist/vendor/bootstrap-vue/src/directives/visible/visible.js +0 -187
  323. package/dist/vendor/bootstrap-vue/src/mixins/attrs.js +0 -5
  324. package/dist/vendor/bootstrap-vue/src/mixins/click-out.js +0 -54
  325. package/dist/vendor/bootstrap-vue/src/mixins/dropdown.js +0 -470
  326. package/dist/vendor/bootstrap-vue/src/mixins/focus-in.js +0 -46
  327. package/dist/vendor/bootstrap-vue/src/mixins/form-control.js +0 -73
  328. package/dist/vendor/bootstrap-vue/src/mixins/form-custom.js +0 -26
  329. package/dist/vendor/bootstrap-vue/src/mixins/form-options.js +0 -91
  330. package/dist/vendor/bootstrap-vue/src/mixins/form-selection.js +0 -62
  331. package/dist/vendor/bootstrap-vue/src/mixins/form-size.js +0 -26
  332. package/dist/vendor/bootstrap-vue/src/mixins/form-state.js +0 -50
  333. package/dist/vendor/bootstrap-vue/src/mixins/form-text.js +0 -293
  334. package/dist/vendor/bootstrap-vue/src/mixins/form-validity.js +0 -50
  335. package/dist/vendor/bootstrap-vue/src/mixins/has-listener.js +0 -29
  336. package/dist/vendor/bootstrap-vue/src/mixins/id.js +0 -57
  337. package/dist/vendor/bootstrap-vue/src/mixins/listen-on-document.js +0 -63
  338. package/dist/vendor/bootstrap-vue/src/mixins/listen-on-root.js +0 -121
  339. package/dist/vendor/bootstrap-vue/src/mixins/listen-on-window.js +0 -63
  340. package/dist/vendor/bootstrap-vue/src/mixins/listeners.js +0 -25
  341. package/dist/vendor/bootstrap-vue/src/mixins/model.js +0 -10
  342. package/dist/vendor/bootstrap-vue/src/mixins/normalize-slot.js +0 -30
  343. package/dist/vendor/bootstrap-vue/src/mixins/scoped-style.js +0 -18
  344. package/dist/vendor/bootstrap-vue/src/mixins/use-parent.js +0 -14
  345. package/dist/vendor/bootstrap-vue/src/utils/array.js +0 -28
  346. package/dist/vendor/bootstrap-vue/src/utils/bv-event.class.js +0 -60
  347. package/dist/vendor/bootstrap-vue/src/utils/cache.js +0 -60
  348. package/dist/vendor/bootstrap-vue/src/utils/clone-deep.js +0 -18
  349. package/dist/vendor/bootstrap-vue/src/utils/config-set.js +0 -86
  350. package/dist/vendor/bootstrap-vue/src/utils/config.js +0 -71
  351. package/dist/vendor/bootstrap-vue/src/utils/create-new-child-component.js +0 -133
  352. package/dist/vendor/bootstrap-vue/src/utils/css-escape.js +0 -70
  353. package/dist/vendor/bootstrap-vue/src/utils/dom.js +0 -298
  354. package/dist/vendor/bootstrap-vue/src/utils/element-to-vue-instance-registry.js +0 -28
  355. package/dist/vendor/bootstrap-vue/src/utils/env.js +0 -16
  356. package/dist/vendor/bootstrap-vue/src/utils/events.js +0 -78
  357. package/dist/vendor/bootstrap-vue/src/utils/get-event-root.js +0 -5
  358. package/dist/vendor/bootstrap-vue/src/utils/get-instance-from-directive.js +0 -3
  359. package/dist/vendor/bootstrap-vue/src/utils/get-scope-id.js +0 -9
  360. package/dist/vendor/bootstrap-vue/src/utils/get.js +0 -63
  361. package/dist/vendor/bootstrap-vue/src/utils/html.js +0 -16
  362. package/dist/vendor/bootstrap-vue/src/utils/identity.js +0 -3
  363. package/dist/vendor/bootstrap-vue/src/utils/inspect.js +0 -35
  364. package/dist/vendor/bootstrap-vue/src/utils/locale.js +0 -19
  365. package/dist/vendor/bootstrap-vue/src/utils/loose-equal.js +0 -59
  366. package/dist/vendor/bootstrap-vue/src/utils/loose-index-of.js +0 -13
  367. package/dist/vendor/bootstrap-vue/src/utils/math.js +0 -9
  368. package/dist/vendor/bootstrap-vue/src/utils/memoize.js +0 -14
  369. package/dist/vendor/bootstrap-vue/src/utils/model.js +0 -33
  370. package/dist/vendor/bootstrap-vue/src/utils/noop.js +0 -3
  371. package/dist/vendor/bootstrap-vue/src/utils/normalize-slot.js +0 -51
  372. package/dist/vendor/bootstrap-vue/src/utils/number.js +0 -23
  373. package/dist/vendor/bootstrap-vue/src/utils/object.js +0 -72
  374. package/dist/vendor/bootstrap-vue/src/utils/observe-dom.js +0 -76
  375. package/dist/vendor/bootstrap-vue/src/utils/on-instance-destroy.js +0 -22
  376. package/dist/vendor/bootstrap-vue/src/utils/plugins.js +0 -124
  377. package/dist/vendor/bootstrap-vue/src/utils/props.js +0 -67
  378. package/dist/vendor/bootstrap-vue/src/utils/router.js +0 -150
  379. package/dist/vendor/bootstrap-vue/src/utils/safe-vue-instance.js +0 -14
  380. package/dist/vendor/bootstrap-vue/src/utils/stable-sort.js +0 -28
  381. package/dist/vendor/bootstrap-vue/src/utils/string.js +0 -47
  382. package/dist/vendor/bootstrap-vue/src/utils/stringify-object-values.js +0 -31
  383. package/dist/vendor/bootstrap-vue/src/utils/warn.js +0 -45
  384. package/dist/vendor/bootstrap-vue/src/vue.js +0 -55
@@ -1,186 +0,0 @@
1
- import { extend } from '../../../vue';
2
- import { PROP_TYPE_BOOLEAN, PROP_TYPE_BOOLEAN_STRING, PROP_TYPE_ARRAY_OBJECT_STRING, PROP_TYPE_STRING } from '../../../constants/props';
3
- import { identity } from '../../../utils/identity';
4
- import { isBoolean } from '../../../utils/inspect';
5
- import { makeProp } from '../../../utils/props';
6
- import { safeVueInstance } from '../../../utils/safe-vue-instance';
7
- import { toString } from '../../../utils/string';
8
- import { attrsMixin } from '../../../mixins/attrs';
9
-
10
- // Main `<table>` render mixin
11
- // Includes all main table styling options
12
-
13
- // --- Props ---
14
-
15
- const props = {
16
- bordered: makeProp(PROP_TYPE_BOOLEAN, false),
17
- borderless: makeProp(PROP_TYPE_BOOLEAN, false),
18
- captionTop: makeProp(PROP_TYPE_BOOLEAN, false),
19
- dark: makeProp(PROP_TYPE_BOOLEAN, false),
20
- fixed: makeProp(PROP_TYPE_BOOLEAN, false),
21
- hover: makeProp(PROP_TYPE_BOOLEAN, false),
22
- noBorderCollapse: makeProp(PROP_TYPE_BOOLEAN, false),
23
- outlined: makeProp(PROP_TYPE_BOOLEAN, false),
24
- responsive: makeProp(PROP_TYPE_BOOLEAN_STRING, false),
25
- small: makeProp(PROP_TYPE_BOOLEAN, false),
26
- // If a string, it is assumed to be the table `max-height` value
27
- stickyHeader: makeProp(PROP_TYPE_BOOLEAN_STRING, false),
28
- striped: makeProp(PROP_TYPE_BOOLEAN, false),
29
- tableClass: makeProp(PROP_TYPE_ARRAY_OBJECT_STRING),
30
- tableVariant: makeProp(PROP_TYPE_STRING)
31
- };
32
-
33
- // --- Mixin ---
34
-
35
- // @vue/component
36
- const tableRendererMixin = extend({
37
- mixins: [attrsMixin],
38
- provide() {
39
- return {
40
- getBvTable: () => this
41
- };
42
- },
43
- // Don't place attributes on root element automatically,
44
- // as table could be wrapped in responsive `<div>`
45
- inheritAttrs: false,
46
- props,
47
- computed: {
48
- isTableSimple() {
49
- return false;
50
- },
51
- // Layout related computed props
52
- isResponsive() {
53
- const {
54
- responsive
55
- } = this;
56
- return responsive === '' ? true : responsive;
57
- },
58
- isStickyHeader() {
59
- let {
60
- stickyHeader
61
- } = this;
62
- stickyHeader = stickyHeader === '' ? true : stickyHeader;
63
- return this.isStacked ? false : stickyHeader;
64
- },
65
- wrapperClasses() {
66
- const {
67
- isResponsive
68
- } = this;
69
- return [this.isStickyHeader ? 'b-table-sticky-header' : '', isResponsive === true ? 'table-responsive' : isResponsive ? `table-responsive table-responsive-${this.responsive}` : ''].filter(identity);
70
- },
71
- wrapperStyles() {
72
- const {
73
- isStickyHeader
74
- } = this;
75
- return isStickyHeader && !isBoolean(isStickyHeader) ? {
76
- maxHeight: isStickyHeader
77
- } : {};
78
- },
79
- tableClasses() {
80
- let {
81
- hover,
82
- tableVariant,
83
- selectableTableClasses,
84
- stackedTableClasses,
85
- tableClass,
86
- computedBusy
87
- } = safeVueInstance(this);
88
- hover = this.isTableSimple ? hover : hover && this.computedItems.length > 0 && !computedBusy;
89
- return [
90
- // User supplied classes
91
- tableClass,
92
- // Styling classes
93
- {
94
- 'table-striped': this.striped,
95
- 'table-hover': hover,
96
- 'table-dark': this.dark,
97
- 'table-bordered': this.bordered,
98
- 'table-borderless': this.borderless,
99
- 'table-sm': this.small,
100
- // The following are b-table custom styles
101
- 'gl-border': this.outlined,
102
- 'b-table-fixed': this.fixed,
103
- 'b-table-caption-top': this.captionTop,
104
- 'b-table-no-border-collapse': this.noBorderCollapse
105
- }, tableVariant ? `${this.dark ? 'bg' : 'table'}-${tableVariant}` : '',
106
- // Stacked table classes
107
- stackedTableClasses,
108
- // Selectable classes
109
- selectableTableClasses];
110
- },
111
- tableAttrs() {
112
- const {
113
- computedItems: items,
114
- filteredItems,
115
- computedFields: fields,
116
- selectableTableAttrs,
117
- computedBusy
118
- } = safeVueInstance(this);
119
- const ariaAttrs = this.isTableSimple ? {} : {
120
- 'aria-busy': toString(computedBusy),
121
- 'aria-colcount': toString(fields.length),
122
- // Preserve user supplied `aria-describedby`, if provided
123
- 'aria-describedby': this.bvAttrs['aria-describedby'] || this.$refs.caption ? this.captionId : null
124
- };
125
- const rowCount = items && filteredItems && filteredItems.length > items.length ? toString(filteredItems.length) : null;
126
- return {
127
- // We set `aria-rowcount` before merging in `$attrs`,
128
- // in case user has supplied their own
129
- 'aria-rowcount': rowCount,
130
- // Merge in user supplied `$attrs` if any
131
- ...this.bvAttrs,
132
- // Now we can override any `$attrs` here
133
- id: this.safeId(),
134
- role: this.bvAttrs.role || 'table',
135
- ...ariaAttrs,
136
- ...selectableTableAttrs
137
- };
138
- }
139
- },
140
- render(h) {
141
- const {
142
- wrapperClasses,
143
- renderCaption,
144
- renderColgroup,
145
- renderThead,
146
- renderTbody,
147
- renderTfoot
148
- } = safeVueInstance(this);
149
- const $content = [];
150
- if (this.isTableSimple) {
151
- $content.push(this.normalizeSlot());
152
- } else {
153
- // Build the `<caption>` (from caption mixin)
154
- $content.push(renderCaption ? renderCaption() : null);
155
-
156
- // Build the `<colgroup>`
157
- $content.push(renderColgroup ? renderColgroup() : null);
158
-
159
- // Build the `<thead>`
160
- $content.push(renderThead ? renderThead() : null);
161
-
162
- // Build the `<tbody>`
163
- $content.push(renderTbody ? renderTbody() : null);
164
-
165
- // Build the `<tfoot>`
166
- $content.push(renderTfoot ? renderTfoot() : null);
167
- }
168
-
169
- // Assemble `<table>`
170
- const $table = h('table', {
171
- staticClass: 'table b-table',
172
- class: this.tableClasses,
173
- attrs: this.tableAttrs,
174
- key: 'b-table'
175
- }, $content.filter(identity));
176
-
177
- // Add responsive/sticky wrapper if needed and return table
178
- return wrapperClasses.length > 0 ? h('div', {
179
- class: wrapperClasses,
180
- style: this.wrapperStyles,
181
- key: 'wrap'
182
- }, [$table]) : $table;
183
- }
184
- });
185
-
186
- export { props, tableRendererMixin };
@@ -1,338 +0,0 @@
1
- import { extend, REF_FOR_KEY } from '../../../vue';
2
- import { EVENT_NAME_ROW_HOVERED, EVENT_NAME_ROW_UNHOVERED, EVENT_NAME_ROW_CLICKED } from '../../../constants/events';
3
- import { PROP_TYPE_ARRAY_OBJECT_STRING, PROP_TYPE_OBJECT_FUNCTION, PROP_TYPE_FUNCTION } from '../../../constants/props';
4
- import { SLOT_NAME_ROW_DETAILS } from '../../../constants/slots';
5
- import { useParentMixin } from '../../../mixins/use-parent';
6
- import { get } from '../../../utils/get';
7
- import { isFunction, isString, isUndefinedOrNull } from '../../../utils/inspect';
8
- import { makeProp } from '../../../utils/props';
9
- import { safeVueInstance } from '../../../utils/safe-vue-instance';
10
- import { toString } from '../../../utils/string';
11
- import { BTr } from '../tr';
12
- import { BTd } from '../td';
13
- import { BTh } from '../th';
14
- import { FIELD_KEY_SHOW_DETAILS, FIELD_KEY_CELL_VARIANT, FIELD_KEY_ROW_VARIANT } from './constants';
15
-
16
- // --- Props ---
17
-
18
- const props = {
19
- detailsTdClass: makeProp(PROP_TYPE_ARRAY_OBJECT_STRING),
20
- tbodyTrAttr: makeProp(PROP_TYPE_OBJECT_FUNCTION),
21
- tbodyTrClass: makeProp([...PROP_TYPE_ARRAY_OBJECT_STRING, PROP_TYPE_FUNCTION])
22
- };
23
-
24
- // --- Mixin ---
25
-
26
- // @vue/component
27
- const tbodyRowMixin = extend({
28
- mixins: [useParentMixin],
29
- props,
30
- methods: {
31
- // Methods for computing classes, attributes and styles for table cells
32
- getTdValues(item, key, tdValue, defaultValue) {
33
- const {
34
- bvParent
35
- } = this;
36
- if (tdValue) {
37
- const value = get(item, key, '');
38
- if (isFunction(tdValue)) {
39
- return tdValue(value, key, item);
40
- } else if (isString(tdValue) && isFunction(bvParent[tdValue])) {
41
- return bvParent[tdValue](value, key, item);
42
- }
43
- return tdValue;
44
- }
45
- return defaultValue;
46
- },
47
- getThValues(item, key, thValue, type, defaultValue) {
48
- const {
49
- bvParent
50
- } = this;
51
- if (thValue) {
52
- const value = get(item, key, '');
53
- if (isFunction(thValue)) {
54
- return thValue(value, key, item, type);
55
- } else if (isString(thValue) && isFunction(bvParent[thValue])) {
56
- return bvParent[thValue](value, key, item, type);
57
- }
58
- return thValue;
59
- }
60
- return defaultValue;
61
- },
62
- // Method to get the value for a field
63
- getFormattedValue(item, field) {
64
- const {
65
- key
66
- } = field;
67
- const formatter = this.getFieldFormatter(key);
68
- let value = get(item, key, null);
69
- if (isFunction(formatter)) {
70
- value = formatter(value, key, item);
71
- }
72
- return isUndefinedOrNull(value) ? '' : value;
73
- },
74
- // Factory function methods
75
- toggleDetailsFactory(hasDetailsSlot, item) {
76
- // Returns a function to toggle a row's details slot
77
- return () => {
78
- if (hasDetailsSlot) {
79
- this.$set(item, FIELD_KEY_SHOW_DETAILS, !item[FIELD_KEY_SHOW_DETAILS]);
80
- }
81
- };
82
- },
83
- // Row event handlers
84
- rowHovered(event) {
85
- // `mouseenter` handler (non-bubbling)
86
- // `this.tbodyRowEventStopped` from tbody mixin
87
- if (!this.tbodyRowEventStopped(event)) {
88
- // `this.emitTbodyRowEvent` from tbody mixin
89
- this.emitTbodyRowEvent(EVENT_NAME_ROW_HOVERED, event);
90
- }
91
- },
92
- rowUnhovered(event) {
93
- // `mouseleave` handler (non-bubbling)
94
- // `this.tbodyRowEventStopped` from tbody mixin
95
- if (!this.tbodyRowEventStopped(event)) {
96
- // `this.emitTbodyRowEvent` from tbody mixin
97
- this.emitTbodyRowEvent(EVENT_NAME_ROW_UNHOVERED, event);
98
- }
99
- },
100
- // Renders a TD or TH for a row's field
101
- renderTbodyRowCell(field, colIndex, item, rowIndex) {
102
- const {
103
- isStacked
104
- } = this;
105
- const {
106
- key,
107
- label,
108
- isRowHeader
109
- } = field;
110
- const h = this.$createElement;
111
- const hasDetailsSlot = this.hasNormalizedSlot(SLOT_NAME_ROW_DETAILS);
112
- const formatted = this.getFormattedValue(item, field);
113
- const stickyColumn = !isStacked && (this.isResponsive || this.stickyHeader) && field.stickyColumn;
114
- // We only uses the helper components for sticky columns to
115
- // improve performance of BTable/BTableLite by reducing the
116
- // total number of vue instances created during render
117
- const cellTag = stickyColumn ? isRowHeader ? BTh : BTd : isRowHeader ? 'th' : 'td';
118
- const cellVariant = item[FIELD_KEY_CELL_VARIANT] && item[FIELD_KEY_CELL_VARIANT][key] ? item[FIELD_KEY_CELL_VARIANT][key] : field.variant || null;
119
- const data = {
120
- // For the Vue key, we concatenate the column index and
121
- // field key (as field keys could be duplicated)
122
- // TODO: Although we do prevent duplicate field keys...
123
- // So we could change this to: `row-${rowIndex}-cell-${key}`
124
- class: [field.class ? field.class : '', this.getTdValues(item, key, field.tdClass, '')],
125
- props: {},
126
- attrs: {
127
- 'aria-colindex': String(colIndex + 1),
128
- ...(isRowHeader ? this.getThValues(item, key, field.thAttr, 'row', {}) : this.getTdValues(item, key, field.tdAttr, {}))
129
- },
130
- key: `row-${rowIndex}-cell-${colIndex}-${key}`
131
- };
132
- if (stickyColumn) {
133
- // We are using the helper BTd or BTh
134
- data.props = {
135
- stackedHeading: isStacked ? label : null,
136
- stickyColumn: true,
137
- variant: cellVariant
138
- };
139
- } else {
140
- // Using native TD or TH element, so we need to
141
- // add in the attributes and variant class
142
- data.attrs['data-label'] = isStacked && !isUndefinedOrNull(label) ? toString(label) : null;
143
- data.attrs.role = isRowHeader ? 'rowheader' : 'cell';
144
- data.attrs.scope = isRowHeader ? 'row' : null;
145
- // Add in the variant class
146
- if (cellVariant) {
147
- data.class.push(`${this.dark ? 'bg' : 'table'}-${cellVariant}`);
148
- }
149
- }
150
- const slotScope = {
151
- item,
152
- index: rowIndex,
153
- field,
154
- unformatted: get(item, key, ''),
155
- value: formatted,
156
- toggleDetails: this.toggleDetailsFactory(hasDetailsSlot, item),
157
- detailsShowing: Boolean(item[FIELD_KEY_SHOW_DETAILS])
158
- };
159
- // If table supports selectable mode, then add in the following scope
160
- // this.supportsSelectableRows will be undefined if mixin isn't loaded
161
- if (safeVueInstance(this).supportsSelectableRows) {
162
- slotScope.rowSelected = this.isRowSelected(rowIndex);
163
- slotScope.selectRow = () => this.selectRow(rowIndex);
164
- slotScope.unselectRow = () => this.unselectRow(rowIndex);
165
- }
166
-
167
- // The new `v-slot` syntax doesn't like a slot name starting with
168
- // a square bracket and if using in-document HTML templates, the
169
- // v-slot attributes are lower-cased by the browser.
170
- // Switched to round bracket syntax to prevent confusion with
171
- // dynamic slot name syntax.
172
- // We look for slots in this order: `cell(${key})`, `cell(${key.toLowerCase()})`, 'cell()'
173
- // Slot names are now cached by mixin tbody in `this.$_bodyFieldSlotNameCache`
174
- // Will be `null` if no slot (or fallback slot) exists
175
- const slotName = this.$_bodyFieldSlotNameCache[key];
176
- let $childNodes = slotName ? this.normalizeSlot(slotName, slotScope) : toString(formatted);
177
- if (this.isStacked) {
178
- // We wrap in a DIV to ensure rendered as a single cell when visually stacked!
179
- $childNodes = [h('div', [$childNodes])];
180
- }
181
-
182
- // Render either a td or th cell
183
- return h(cellTag, data, [$childNodes]);
184
- },
185
- // Renders an item's row (or rows if details supported)
186
- renderTbodyRow(item, rowIndex) {
187
- const {
188
- computedFields: fields,
189
- striped,
190
- primaryKey,
191
- currentPage,
192
- perPage,
193
- tbodyTrClass,
194
- tbodyTrAttr,
195
- hasSelectableRowClick
196
- } = safeVueInstance(this);
197
- const h = this.$createElement;
198
- const hasDetailsSlot = this.hasNormalizedSlot(SLOT_NAME_ROW_DETAILS);
199
- const rowShowDetails = item[FIELD_KEY_SHOW_DETAILS] && hasDetailsSlot;
200
- const hasRowClickHandler = this.$listeners[EVENT_NAME_ROW_CLICKED] || hasSelectableRowClick;
201
-
202
- // We can return more than one TR if rowDetails enabled
203
- const $rows = [];
204
-
205
- // Details ID needed for `aria-details` when details showing
206
- // We set it to `null` when not showing so that attribute
207
- // does not appear on the element
208
- const detailsId = rowShowDetails ? this.safeId(`_details_${rowIndex}_`) : null;
209
-
210
- // For each item data field in row
211
- const $tds = fields.map((field, colIndex) => {
212
- return this.renderTbodyRowCell(field, colIndex, item, rowIndex);
213
- });
214
-
215
- // Calculate the row number in the dataset (indexed from 1)
216
- let ariaRowIndex = null;
217
- if (currentPage && perPage && perPage > 0) {
218
- ariaRowIndex = String((currentPage - 1) * perPage + rowIndex + 1);
219
- }
220
-
221
- // Create a unique :key to help ensure that sub components are re-rendered rather than
222
- // re-used, which can cause issues. If a primary key is not provided we use the rendered
223
- // rows index within the tbody.
224
- // See: https://github.com/bootstrap-vue/bootstrap-vue/issues/2410
225
- const primaryKeyValue = toString(get(item, primaryKey)) || null;
226
- const rowKey = primaryKeyValue || toString(rowIndex);
227
-
228
- // If primary key is provided, use it to generate a unique ID on each tbody > tr
229
- // In the format of '{tableId}__row_{primaryKeyValue}'
230
- const rowId = primaryKeyValue ? this.safeId(`_row_${primaryKeyValue}`) : null;
231
-
232
- // Selectable classes and attributes
233
- const selectableClasses = safeVueInstance(this).selectableRowClasses ? this.selectableRowClasses(rowIndex) : {};
234
- const selectableAttrs = safeVueInstance(this).selectableRowAttrs ? this.selectableRowAttrs(rowIndex) : {};
235
-
236
- // Additional classes and attributes
237
- const userTrClasses = isFunction(tbodyTrClass) ? tbodyTrClass(item, 'row') : tbodyTrClass;
238
- const userTrAttrs = isFunction(tbodyTrAttr) ? /* istanbul ignore next */tbodyTrAttr(item, 'row') : tbodyTrAttr;
239
-
240
- // Add the item row
241
- $rows.push(h(BTr, {
242
- class: [userTrClasses, selectableClasses, rowShowDetails ? 'b-table-has-details' : ''],
243
- props: {
244
- variant: item[FIELD_KEY_ROW_VARIANT] || null
245
- },
246
- attrs: {
247
- id: rowId,
248
- ...userTrAttrs,
249
- // Users cannot override the following attributes
250
- tabindex: hasRowClickHandler ? '0' : null,
251
- 'data-pk': primaryKeyValue || null,
252
- 'aria-details': detailsId,
253
- 'aria-owns': detailsId,
254
- 'aria-rowindex': ariaRowIndex,
255
- ...selectableAttrs
256
- },
257
- on: {
258
- // Note: These events are not A11Y friendly!
259
- mouseenter: this.rowHovered,
260
- mouseleave: this.rowUnhovered
261
- },
262
- key: `__b-table-row-${rowKey}__`,
263
- ref: 'item-rows',
264
- [REF_FOR_KEY]: true
265
- }, $tds));
266
-
267
- // Row Details slot
268
- if (rowShowDetails) {
269
- const detailsScope = {
270
- item,
271
- index: rowIndex,
272
- fields,
273
- toggleDetails: this.toggleDetailsFactory(hasDetailsSlot, item)
274
- };
275
- // If table supports selectable mode, then add in the following scope
276
- // this.supportsSelectableRows will be undefined if mixin isn't loaded
277
- if (safeVueInstance(this).supportsSelectableRows) {
278
- detailsScope.rowSelected = this.isRowSelected(rowIndex);
279
- detailsScope.selectRow = () => this.selectRow(rowIndex);
280
- detailsScope.unselectRow = () => this.unselectRow(rowIndex);
281
- }
282
-
283
- // Render the details slot in a TD
284
- const $details = h(BTd, {
285
- props: {
286
- colspan: fields.length
287
- },
288
- class: this.detailsTdClass
289
- }, [this.normalizeSlot(SLOT_NAME_ROW_DETAILS, detailsScope)]);
290
-
291
- // Add a hidden row to keep table row striping consistent when details showing
292
- // Only added if the table is striped
293
- if (striped) {
294
- $rows.push(
295
- // We don't use `BTr` here as we don't need the extra functionality
296
- h('tr', {
297
- staticClass: 'd-none',
298
- attrs: {
299
- 'aria-hidden': 'true',
300
- role: 'presentation'
301
- },
302
- key: `__b-table-details-stripe__${rowKey}`
303
- }));
304
- }
305
-
306
- // Add the actual details row
307
- const userDetailsTrClasses = isFunction(this.tbodyTrClass) ? /* istanbul ignore next */this.tbodyTrClass(item, SLOT_NAME_ROW_DETAILS) : this.tbodyTrClass;
308
- const userDetailsTrAttrs = isFunction(this.tbodyTrAttr) ? /* istanbul ignore next */this.tbodyTrAttr(item, SLOT_NAME_ROW_DETAILS) : this.tbodyTrAttr;
309
- $rows.push(h(BTr, {
310
- staticClass: 'b-table-details',
311
- class: [userDetailsTrClasses],
312
- props: {
313
- variant: item[FIELD_KEY_ROW_VARIANT] || null
314
- },
315
- attrs: {
316
- ...userDetailsTrAttrs,
317
- // Users cannot override the following attributes
318
- id: detailsId,
319
- tabindex: '-1'
320
- },
321
- key: `__b-table-details__${rowKey}`
322
- }, [$details]));
323
- } else if (hasDetailsSlot) {
324
- // Only add the placeholder if a the table has a row-details slot defined (but not shown)
325
- $rows.push(h());
326
- if (striped) {
327
- // Add extra placeholder if table is striped
328
- $rows.push(h());
329
- }
330
- }
331
-
332
- // Return the row(s)
333
- return $rows;
334
- }
335
- }
336
- });
337
-
338
- export { props, tbodyRowMixin };