@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,243 +0,0 @@
1
- import { extend } from '../../../vue';
2
- import { EVENT_NAME_ROW_CLICKED, EVENT_NAME_ROW_MIDDLE_CLICKED, EVENT_NAME_ROW_CONTEXTMENU, EVENT_NAME_ROW_DBLCLICKED } from '../../../constants/events';
3
- import { CODE_ENTER, CODE_SPACE, CODE_UP, CODE_DOWN, CODE_HOME, CODE_END } from '../../../constants/key-codes';
4
- import { PROP_TYPE_ARRAY_OBJECT_STRING } from '../../../constants/props';
5
- import { from, arrayIncludes } from '../../../utils/array';
6
- import { isElement, closest, isActiveElement, attemptFocus } from '../../../utils/dom';
7
- import { safeVueInstance } from '../../../utils/safe-vue-instance';
8
- import { stopEvent } from '../../../utils/events';
9
- import { sortKeys } from '../../../utils/object';
10
- import { makeProp, pluckProps } from '../../../utils/props';
11
- import { props as props$1, BTbody } from '../tbody';
12
- import { filterEvent } from './filter-event';
13
- import { textSelectionActive } from './text-selection-active';
14
- import { props as props$2, tbodyRowMixin } from './mixin-tbody-row';
15
-
16
- // --- Helper methods ---
17
-
18
- const getCellSlotName = value => `cell(${value || ''})`;
19
-
20
- // --- Props ---
21
-
22
- const props = sortKeys({
23
- ...props$1,
24
- ...props$2,
25
- tbodyClass: makeProp(PROP_TYPE_ARRAY_OBJECT_STRING)
26
- });
27
-
28
- // --- Mixin ---
29
-
30
- // @vue/component
31
- const tbodyMixin = extend({
32
- mixins: [tbodyRowMixin],
33
- props,
34
- beforeDestroy() {
35
- this.$_bodyFieldSlotNameCache = null;
36
- },
37
- methods: {
38
- // Returns all the item TR elements (excludes detail and spacer rows)
39
- // `this.$refs['item-rows']` is an array of item TR components/elements
40
- // Rows should all be `<b-tr>` components, but we map to TR elements
41
- // Also note that `this.$refs['item-rows']` may not always be in document order
42
- getTbodyTrs() {
43
- const {
44
- $refs
45
- } = this;
46
- const tbody = $refs.tbody ? $refs.tbody.$el || $refs.tbody : null;
47
- const trs = ($refs['item-rows'] || []).map(tr => tr.$el || tr);
48
- return tbody && tbody.children && tbody.children.length > 0 && trs && trs.length > 0 ? from(tbody.children).filter(tr => arrayIncludes(trs, tr)) : /* istanbul ignore next */[];
49
- },
50
- // Returns index of a particular TBODY item TR
51
- // We set `true` on closest to include self in result
52
- getTbodyTrIndex(el) {
53
- /* istanbul ignore next: should not normally happen */
54
- if (!isElement(el)) {
55
- return -1;
56
- }
57
- const tr = el.tagName === 'TR' ? el : closest('tr', el, true);
58
- return tr ? this.getTbodyTrs().indexOf(tr) : -1;
59
- },
60
- // Emits a row event, with the item object, row index and original event
61
- emitTbodyRowEvent(type, event) {
62
- if (type && event && event.target) {
63
- const rowIndex = this.getTbodyTrIndex(event.target);
64
- if (rowIndex > -1) {
65
- // The array of TRs correlate to the `computedItems` array
66
- const item = this.computedItems[rowIndex];
67
- if (this.hasListener(type)) {
68
- this.$emit(type, item, rowIndex, event);
69
- }
70
- // Call selectionHandler directly if selectable (defined in mixin-selectable.js)
71
- if (type === EVENT_NAME_ROW_CLICKED && this.hasSelectableRowClick) {
72
- this.selectionHandler(item, rowIndex, event);
73
- }
74
- }
75
- }
76
- },
77
- tbodyRowEventStopped(event) {
78
- return this.stopIfBusy && this.stopIfBusy(event);
79
- },
80
- // Delegated row event handlers
81
- onTbodyRowKeydown(event) {
82
- // Keyboard navigation and row click emulation
83
- const {
84
- target,
85
- keyCode
86
- } = event;
87
- if (this.tbodyRowEventStopped(event) || target.tagName !== 'TR' || !isActiveElement(target) || target.tabIndex !== 0) {
88
- // Early exit if not an item row TR
89
- return;
90
- }
91
- if (arrayIncludes([CODE_ENTER, CODE_SPACE], keyCode)) {
92
- // Emulated click for keyboard users, transfer to click handler
93
- stopEvent(event);
94
- this.onTBodyRowClicked(event);
95
- } else if (arrayIncludes([CODE_UP, CODE_DOWN, CODE_HOME, CODE_END], keyCode)) {
96
- // Keyboard navigation
97
- const rowIndex = this.getTbodyTrIndex(target);
98
- if (rowIndex > -1) {
99
- stopEvent(event);
100
- const trs = this.getTbodyTrs();
101
- const shift = event.shiftKey;
102
- if (keyCode === CODE_HOME || shift && keyCode === CODE_UP) {
103
- // Focus first row
104
- attemptFocus(trs[0]);
105
- } else if (keyCode === CODE_END || shift && keyCode === CODE_DOWN) {
106
- // Focus last row
107
- attemptFocus(trs[trs.length - 1]);
108
- } else if (keyCode === CODE_UP && rowIndex > 0) {
109
- // Focus previous row
110
- attemptFocus(trs[rowIndex - 1]);
111
- } else if (keyCode === CODE_DOWN && rowIndex < trs.length - 1) {
112
- // Focus next row
113
- attemptFocus(trs[rowIndex + 1]);
114
- }
115
- }
116
- }
117
- },
118
- onTBodyRowClicked(event) {
119
- const {
120
- $refs
121
- } = this;
122
- const tbody = $refs.tbody ? $refs.tbody.$el || $refs.tbody : null;
123
- // Don't emit event when the table is busy, the user clicked
124
- // on a non-disabled control or is selecting text
125
- if (this.tbodyRowEventStopped(event) || filterEvent(event) || textSelectionActive(tbody || this.$el)) {
126
- return;
127
- }
128
- this.emitTbodyRowEvent(EVENT_NAME_ROW_CLICKED, event);
129
- },
130
- onTbodyRowMiddleMouseRowClicked(event) {
131
- if (!this.tbodyRowEventStopped(event) && event.which === 2) {
132
- this.emitTbodyRowEvent(EVENT_NAME_ROW_MIDDLE_CLICKED, event);
133
- }
134
- },
135
- onTbodyRowContextmenu(event) {
136
- if (!this.tbodyRowEventStopped(event)) {
137
- this.emitTbodyRowEvent(EVENT_NAME_ROW_CONTEXTMENU, event);
138
- }
139
- },
140
- onTbodyRowDblClicked(event) {
141
- if (!this.tbodyRowEventStopped(event) && !filterEvent(event)) {
142
- this.emitTbodyRowEvent(EVENT_NAME_ROW_DBLCLICKED, event);
143
- }
144
- },
145
- // Render the tbody element and children
146
- // Note:
147
- // Row hover handlers are handled by the tbody-row mixin
148
- // As mouseenter/mouseleave events do not bubble
149
- renderTbody() {
150
- const {
151
- computedItems: items,
152
- renderBusy,
153
- renderTopRow,
154
- renderEmpty,
155
- renderBottomRow,
156
- hasSelectableRowClick
157
- } = safeVueInstance(this);
158
- const h = this.$createElement;
159
- const hasRowClickHandler = this.hasListener(EVENT_NAME_ROW_CLICKED) || hasSelectableRowClick;
160
-
161
- // Prepare the tbody rows
162
- const $rows = [];
163
-
164
- // Add the item data rows or the busy slot
165
- const $busy = renderBusy ? renderBusy() : null;
166
- if ($busy) {
167
- // If table is busy and a busy slot, then return only the busy "row" indicator
168
- $rows.push($busy);
169
- } else {
170
- // Table isn't busy, or we don't have a busy slot
171
-
172
- // Create a slot cache for improved performance when looking up cell slot names
173
- // Values will be keyed by the field's `key` and will store the slot's name
174
- // Slots could be dynamic (i.e. `v-if`), so we must compute on each render
175
- // Used by tbody-row mixin render helper
176
- const cache = {};
177
- let defaultSlotName = getCellSlotName();
178
- defaultSlotName = this.hasNormalizedSlot(defaultSlotName) ? defaultSlotName : null;
179
- this.computedFields.forEach(field => {
180
- const {
181
- key
182
- } = field;
183
- const slotName = getCellSlotName(key);
184
- const lowercaseSlotName = getCellSlotName(key.toLowerCase());
185
- cache[key] = this.hasNormalizedSlot(slotName) ? slotName : this.hasNormalizedSlot(lowercaseSlotName) ? /* istanbul ignore next */lowercaseSlotName : defaultSlotName;
186
- });
187
- // Created as a non-reactive property so to not trigger component updates
188
- // Must be a fresh object each render
189
- this.$_bodyFieldSlotNameCache = cache;
190
-
191
- // Add static top row slot (hidden in visibly stacked mode
192
- // as we can't control `data-label` attr)
193
- $rows.push(renderTopRow ? renderTopRow() : h());
194
-
195
- // Render the rows
196
- items.forEach((item, rowIndex) => {
197
- // Render the individual item row (rows if details slot)
198
- $rows.push(this.renderTbodyRow(item, rowIndex));
199
- });
200
-
201
- // Empty items / empty filtered row slot (only shows if `items.length < 1`)
202
- $rows.push(renderEmpty ? renderEmpty() : h());
203
-
204
- // Static bottom row slot (hidden in visibly stacked mode
205
- // as we can't control `data-label` attr)
206
- $rows.push(renderBottomRow ? renderBottomRow() : h());
207
- }
208
-
209
- // Note: these events will only emit if a listener is registered
210
- const handlers = {
211
- auxclick: this.onTbodyRowMiddleMouseRowClicked,
212
- // TODO:
213
- // Perhaps we do want to automatically prevent the
214
- // default context menu from showing if there is a
215
- // `row-contextmenu` listener registered
216
- contextmenu: this.onTbodyRowContextmenu,
217
- // The following event(s) is not considered A11Y friendly
218
- dblclick: this.onTbodyRowDblClicked
219
- // Hover events (`mouseenter`/`mouseleave`) are handled by `tbody-row` mixin
220
- };
221
- // Add in click/keydown listeners if needed
222
- if (hasRowClickHandler) {
223
- handlers.click = this.onTBodyRowClicked;
224
- handlers.keydown = this.onTbodyRowKeydown;
225
- }
226
-
227
- // Assemble rows into the tbody
228
- const $tbody = h(BTbody, {
229
- class: this.tbodyClass || null,
230
- props: pluckProps(props$1, this.$props),
231
- // BTbody transfers all native event listeners to the root element
232
- // TODO: Only set the handlers if the table is not busy
233
- on: handlers,
234
- ref: 'tbody'
235
- }, $rows);
236
-
237
- // Return the assembled tbody
238
- return $tbody;
239
- }
240
- }
241
- });
242
-
243
- export { props, tbodyMixin };
@@ -1,50 +0,0 @@
1
- import { extend } from '../../../vue';
2
- import { PROP_TYPE_BOOLEAN, PROP_TYPE_STRING, PROP_TYPE_ARRAY_OBJECT_STRING } from '../../../constants/props';
3
- import { SLOT_NAME_CUSTOM_FOOT } from '../../../constants/slots';
4
- import { makeProp } from '../../../utils/props';
5
- import { BTfoot } from '../tfoot';
6
-
7
- // --- Props ---
8
-
9
- const props = {
10
- footClone: makeProp(PROP_TYPE_BOOLEAN, false),
11
- // Any Bootstrap theme variant (or custom)
12
- // Falls back to `headRowVariant`
13
- footRowVariant: makeProp(PROP_TYPE_STRING),
14
- // 'dark', 'light', or `null` (or custom)
15
- footVariant: makeProp(PROP_TYPE_STRING),
16
- tfootClass: makeProp(PROP_TYPE_ARRAY_OBJECT_STRING),
17
- tfootTrClass: makeProp(PROP_TYPE_ARRAY_OBJECT_STRING)
18
- };
19
-
20
- // --- Mixin ---
21
-
22
- // @vue/component
23
- const tfootMixin = extend({
24
- props,
25
- methods: {
26
- renderTFootCustom() {
27
- const h = this.$createElement;
28
- if (this.hasNormalizedSlot(SLOT_NAME_CUSTOM_FOOT)) {
29
- return h(BTfoot, {
30
- class: this.tfootClass || null,
31
- props: {
32
- footVariant: this.footVariant || this.headVariant || null
33
- },
34
- key: 'bv-tfoot-custom'
35
- }, this.normalizeSlot(SLOT_NAME_CUSTOM_FOOT, {
36
- items: this.computedItems.slice(),
37
- fields: this.computedFields.slice(),
38
- columns: this.computedFields.length
39
- }));
40
- }
41
- return h();
42
- },
43
- renderTfoot() {
44
- // Passing true to renderThead will make it render a tfoot
45
- return this.footClone ? this.renderThead(true) : this.renderTFootCustom();
46
- }
47
- }
48
- });
49
-
50
- export { props, tfootMixin };
@@ -1,218 +0,0 @@
1
- import { extend } from '../../../vue';
2
- import { EVENT_NAME_HEAD_CLICKED } from '../../../constants/events';
3
- import { CODE_ENTER, CODE_SPACE } from '../../../constants/key-codes';
4
- import { PROP_TYPE_STRING, PROP_TYPE_ARRAY_OBJECT_STRING } from '../../../constants/props';
5
- import { SLOT_NAME_THEAD_TOP } from '../../../constants/slots';
6
- import { stopEvent } from '../../../utils/events';
7
- import { htmlOrText } from '../../../utils/html';
8
- import { identity } from '../../../utils/identity';
9
- import { isUndefinedOrNull } from '../../../utils/inspect';
10
- import { noop } from '../../../utils/noop';
11
- import { makeProp } from '../../../utils/props';
12
- import { safeVueInstance } from '../../../utils/safe-vue-instance';
13
- import { startCase } from '../../../utils/string';
14
- import { BThead } from '../thead';
15
- import { BTfoot } from '../tfoot';
16
- import { BTr } from '../tr';
17
- import { BTh } from '../th';
18
- import { filterEvent } from './filter-event';
19
- import { textSelectionActive } from './text-selection-active';
20
-
21
- // --- Helper methods ---
22
-
23
- const getHeadSlotName = value => `head(${value || ''})`;
24
- const getFootSlotName = value => `foot(${value || ''})`;
25
-
26
- // --- Props ---
27
-
28
- const props = {
29
- // Any Bootstrap theme variant (or custom)
30
- headRowVariant: makeProp(PROP_TYPE_STRING),
31
- // 'light', 'dark' or `null` (or custom)
32
- headVariant: makeProp(PROP_TYPE_STRING),
33
- theadClass: makeProp(PROP_TYPE_ARRAY_OBJECT_STRING),
34
- theadTrClass: makeProp(PROP_TYPE_ARRAY_OBJECT_STRING)
35
- };
36
-
37
- // --- Mixin ---
38
-
39
- // @vue/component
40
- const theadMixin = extend({
41
- props,
42
- methods: {
43
- fieldClasses(field) {
44
- // Header field (<th>) classes
45
- return [field.class ? field.class : '', field.thClass ? field.thClass : ''];
46
- },
47
- headClicked(event, field, isFoot) {
48
- if (this.stopIfBusy && this.stopIfBusy(event)) {
49
- // If table is busy (via provider) then don't propagate
50
- return;
51
- } else if (filterEvent(event)) {
52
- // Clicked on a non-disabled control so ignore
53
- return;
54
- } else if (textSelectionActive(this.$el)) {
55
- // User is selecting text, so ignore
56
- /* istanbul ignore next: JSDOM doesn't support getSelection() */
57
- return;
58
- }
59
- stopEvent(event);
60
- this.$emit(EVENT_NAME_HEAD_CLICKED, field.key, field, event, isFoot);
61
- // Call handleSort directly if sortable (defined in mixin-sorting.js)
62
- if (this.isSortable) {
63
- this.handleSort(field.key, field, event, isFoot);
64
- }
65
- },
66
- renderThead() {
67
- let isFoot = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
68
- const {
69
- computedFields: fields,
70
- isSortable,
71
- isSelectable,
72
- headVariant,
73
- footVariant,
74
- headRowVariant,
75
- footRowVariant
76
- } = safeVueInstance(this);
77
- const h = this.$createElement;
78
-
79
- // In always stacked mode, we don't bother rendering the head/foot
80
- // Or if no field headings (empty table)
81
- if (this.isStackedAlways || fields.length === 0) {
82
- return h();
83
- }
84
- const hasHeadClickListener = isSortable || this.hasListener(EVENT_NAME_HEAD_CLICKED);
85
-
86
- // Reference to `selectAllRows` and `clearSelected()`, if table is selectable
87
- const selectAllRows = isSelectable ? this.selectAllRows : noop;
88
- const clearSelected = isSelectable ? this.clearSelected : noop;
89
-
90
- // Helper function to generate a field <th> cell
91
- const makeCell = (field, colIndex) => {
92
- const {
93
- label,
94
- labelHtml,
95
- variant,
96
- stickyColumn,
97
- key
98
- } = field;
99
- let ariaLabel = null;
100
- if (!field.label.trim() && !field.headerTitle) {
101
- // In case field's label and title are empty/blank
102
- // We need to add a hint about what the column is about for non-sighted users
103
- /* istanbul ignore next */
104
- ariaLabel = startCase(field.key);
105
- }
106
- const on = {};
107
- if (hasHeadClickListener) {
108
- on.click = event => {
109
- this.headClicked(event, field, isFoot);
110
- };
111
- on.keydown = event => {
112
- const keyCode = event.keyCode;
113
- if (keyCode === CODE_ENTER || keyCode === CODE_SPACE) {
114
- this.headClicked(event, field, isFoot);
115
- }
116
- };
117
- }
118
- const sortAttrs = isSortable ? this.sortTheadThAttrs(key, field, isFoot) : {};
119
- const sortClass = isSortable ? this.sortTheadThClasses(key, field, isFoot) : null;
120
- const sortLabel = isSortable ? this.sortTheadThLabel(key, field, isFoot) : null;
121
- const data = {
122
- class: [{
123
- // We need to make the header cell relative when we have
124
- // a `.gl-sr-only` sort label to work around overflow issues
125
- 'gl-relative': sortLabel
126
- }, this.fieldClasses(field), sortClass],
127
- props: {
128
- variant,
129
- stickyColumn
130
- },
131
- style: field.thStyle || {},
132
- attrs: {
133
- // We only add a `tabindex` of `0` if there is a head-clicked listener
134
- // and the current field is sortable
135
- tabindex: hasHeadClickListener && field.sortable ? '0' : null,
136
- abbr: field.headerAbbr || null,
137
- title: field.headerTitle || null,
138
- 'aria-colindex': colIndex + 1,
139
- 'aria-label': ariaLabel,
140
- ...this.getThValues(null, key, field.thAttr, isFoot ? 'foot' : 'head', {}),
141
- ...sortAttrs
142
- },
143
- on,
144
- key
145
- };
146
-
147
- // Handle edge case where in-document templates are used with new
148
- // `v-slot:name` syntax where the browser lower-cases the v-slot's
149
- // name (attributes become lower cased when parsed by the browser)
150
- // We have replaced the square bracket syntax with round brackets
151
- // to prevent confusion with dynamic slot names
152
- let slotNames = [getHeadSlotName(key), getHeadSlotName(key.toLowerCase()), getHeadSlotName()];
153
- // Footer will fallback to header slot names
154
- if (isFoot) {
155
- slotNames = [getFootSlotName(key), getFootSlotName(key.toLowerCase()), getFootSlotName(), ...slotNames];
156
- }
157
- const scope = {
158
- label,
159
- column: key,
160
- field,
161
- isFoot,
162
- // Add in row select methods
163
- selectAllRows,
164
- clearSelected
165
- };
166
- const $content = this.normalizeSlot(slotNames, scope) || h('div', {
167
- domProps: htmlOrText(labelHtml, label)
168
- });
169
- const $srLabel = sortLabel ? h('span', {
170
- staticClass: 'gl-sr-only'
171
- }, ` (${sortLabel})`) : null;
172
-
173
- // Return the header cell
174
- return h(BTh, data, [$content, $srLabel].filter(identity));
175
- };
176
-
177
- // Generate the array of <th> cells
178
- const $cells = fields.map(makeCell).filter(identity);
179
-
180
- // Generate the row(s)
181
- const $trs = [];
182
- if (isFoot) {
183
- $trs.push(h(BTr, {
184
- class: this.tfootTrClass,
185
- props: {
186
- variant: isUndefinedOrNull(footRowVariant) ? headRowVariant : /* istanbul ignore next */footRowVariant
187
- }
188
- }, $cells));
189
- } else {
190
- const scope = {
191
- columns: fields.length,
192
- fields,
193
- // Add in row select methods
194
- selectAllRows,
195
- clearSelected
196
- };
197
- $trs.push(this.normalizeSlot(SLOT_NAME_THEAD_TOP, scope) || h());
198
- $trs.push(h(BTr, {
199
- class: this.theadTrClass,
200
- props: {
201
- variant: headRowVariant
202
- }
203
- }, $cells));
204
- }
205
- return h(isFoot ? BTfoot : BThead, {
206
- class: (isFoot ? this.tfootClass : this.theadClass) || null,
207
- props: isFoot ? {
208
- footVariant: footVariant || headVariant || null
209
- } : {
210
- headVariant: headVariant || null
211
- },
212
- key: isFoot ? 'bv-tfoot' : 'bv-thead'
213
- }, $trs);
214
- }
215
- }
216
- });
217
-
218
- export { props, theadMixin };
@@ -1,42 +0,0 @@
1
- import { extend } from '../../../vue';
2
- import { SLOT_NAME_TOP_ROW } from '../../../constants/slots';
3
- import { isFunction } from '../../../utils/inspect';
4
- import { BTr } from '../tr';
5
-
6
- // --- Props ---
7
-
8
- const props = {};
9
-
10
- // --- Mixin ---
11
-
12
- // @vue/component
13
- const topRowMixin = extend({
14
- methods: {
15
- renderTopRow() {
16
- const {
17
- computedFields: fields,
18
- stacked,
19
- tbodyTrClass,
20
- tbodyTrAttr
21
- } = this;
22
- const h = this.$createElement;
23
-
24
- // Add static Top Row slot (hidden in visibly stacked mode as we can't control the data-label)
25
- // If in *always* stacked mode, we don't bother rendering the row
26
- if (!this.hasNormalizedSlot(SLOT_NAME_TOP_ROW) || stacked === true || stacked === '') {
27
- return h();
28
- }
29
- return h(BTr, {
30
- staticClass: 'b-table-top-row',
31
- class: [isFunction(tbodyTrClass) ? tbodyTrClass(null, 'row-top') : tbodyTrClass],
32
- attrs: isFunction(tbodyTrAttr) ? tbodyTrAttr(null, 'row-top') : tbodyTrAttr,
33
- key: 'b-top-row'
34
- }, [this.normalizeSlot(SLOT_NAME_TOP_ROW, {
35
- columns: fields.length,
36
- fields
37
- })]);
38
- }
39
- }
40
- });
41
-
42
- export { props, topRowMixin };
@@ -1,86 +0,0 @@
1
- import { identity } from '../../../utils/identity';
2
- import { isArray, isString, isObject, isFunction } from '../../../utils/inspect';
3
- import { clone, keys } from '../../../utils/object';
4
- import { startCase } from '../../../utils/string';
5
- import { IGNORED_FIELD_KEYS } from './constants';
6
-
7
- // Private function to massage field entry into common object format
8
- const processField = (key, value) => {
9
- let field = null;
10
- if (isString(value)) {
11
- // Label shortcut
12
- field = {
13
- key,
14
- label: value
15
- };
16
- } else if (isFunction(value)) {
17
- // Formatter shortcut
18
- field = {
19
- key,
20
- formatter: value
21
- };
22
- } else if (isObject(value)) {
23
- field = clone(value);
24
- field.key = field.key || key;
25
- } else if (value !== false) {
26
- // Fallback to just key
27
- /* istanbul ignore next */
28
- field = {
29
- key
30
- };
31
- }
32
- return field;
33
- };
34
-
35
- // We normalize fields into an array of objects
36
- // [ { key:..., label:..., ...}, {...}, ..., {..}]
37
- const normalizeFields = (origFields, items) => {
38
- const fields = [];
39
- if (isArray(origFields)) {
40
- // Normalize array Form
41
- origFields.filter(identity).forEach(f => {
42
- if (isString(f)) {
43
- fields.push({
44
- key: f,
45
- label: startCase(f)
46
- });
47
- } else if (isObject(f) && f.key && isString(f.key)) {
48
- // Full object definition. We use assign so that we don't mutate the original
49
- fields.push(clone(f));
50
- } else if (isObject(f) && keys(f).length === 1) {
51
- // Shortcut object (i.e. { 'foo_bar': 'This is Foo Bar' }
52
- const key = keys(f)[0];
53
- const field = processField(key, f[key]);
54
- if (field) {
55
- fields.push(field);
56
- }
57
- }
58
- });
59
- }
60
-
61
- // If no field provided, take a sample from first record (if exits)
62
- if (fields.length === 0 && isArray(items) && items.length > 0) {
63
- const sample = items[0];
64
- keys(sample).forEach(k => {
65
- if (!IGNORED_FIELD_KEYS[k]) {
66
- fields.push({
67
- key: k,
68
- label: startCase(k)
69
- });
70
- }
71
- });
72
- }
73
-
74
- // Ensure we have a unique array of fields and that they have String labels
75
- const memo = {};
76
- return fields.filter(f => {
77
- if (!memo[f.key]) {
78
- memo[f.key] = true;
79
- f.label = isString(f.label) ? f.label : startCase(f.key);
80
- return true;
81
- }
82
- return false;
83
- });
84
- };
85
-
86
- export { normalizeFields };
@@ -1,32 +0,0 @@
1
- import { arrayIncludes } from '../../../utils/array';
2
- import { isFunction, isArray } from '../../../utils/inspect';
3
- import { keys, clone, pick } from '../../../utils/object';
4
- import { IGNORED_FIELD_KEYS } from './constants';
5
-
6
- // Return a copy of a row after all reserved fields have been filtered out
7
- const sanitizeRow = function (row, ignoreFields, includeFields) {
8
- let fieldsObj = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
9
- // We first need to format the row based on the field configurations
10
- // This ensures that we add formatted values for keys that may not
11
- // exist in the row itself
12
- const formattedRow = keys(fieldsObj).reduce((result, key) => {
13
- const field = fieldsObj[key];
14
- const {
15
- filterByFormatted
16
- } = field;
17
- const formatter = isFunction(filterByFormatted) ? /* istanbul ignore next */filterByFormatted : filterByFormatted ? /* istanbul ignore next */field.formatter : null;
18
- if (isFunction(formatter)) {
19
- result[key] = formatter(row[key], key, row);
20
- }
21
- return result;
22
- }, clone(row));
23
-
24
- // Determine the allowed keys:
25
- // - Ignore special fields that start with `_`
26
- // - Ignore fields in the `ignoreFields` array
27
- // - Include only fields in the `includeFields` array
28
- const allowedKeys = keys(formattedRow).filter(key => !IGNORED_FIELD_KEYS[key] && !(isArray(ignoreFields) && ignoreFields.length > 0 && arrayIncludes(ignoreFields, key)) && !(isArray(includeFields) && includeFields.length > 0 && !arrayIncludes(includeFields, key)));
29
- return pick(formattedRow, allowedKeys);
30
- };
31
-
32
- export { sanitizeRow };
@@ -1,11 +0,0 @@
1
- import { isObject } from '../../../utils/inspect';
2
- import { stringifyObjectValues } from '../../../utils/stringify-object-values';
3
- import { sanitizeRow } from './sanitize-row';
4
-
5
- // Stringifies the values of a record, ignoring any special top level field keys
6
- // TODO: Add option to stringify `scopedSlot` items
7
- const stringifyRecordValues = (row, ignoreFields, includeFields, fieldsObj) => {
8
- return isObject(row) ? stringifyObjectValues(sanitizeRow(row, ignoreFields, includeFields, fieldsObj)) : /* istanbul ignore next */'';
9
- };
10
-
11
- export { stringifyRecordValues };