@gitlab/ui 132.0.3 → 132.2.0
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.
- package/dist/components/base/accordion/accordion_item.js +1 -3
- package/dist/components/base/avatar/avatar.js +76 -5
- package/dist/components/base/badge/badge.js +5 -7
- package/dist/components/base/button/button.js +1 -3
- package/dist/components/base/collapse/collapse.js +2 -6
- package/dist/components/base/datepicker/datepicker.js +4 -5
- package/dist/components/base/daterange_picker/daterange_picker.js +2 -4
- package/dist/components/base/dropdown/dropdown_item.js +3 -4
- package/dist/components/base/filtered_search/filtered_search.js +55 -7
- package/dist/components/base/filtered_search/filtered_search_token.js +6 -14
- package/dist/components/base/filtered_search/filtered_search_token_segment.js +39 -19
- package/dist/components/base/filtered_search/filtered_search_utils.js +57 -7
- package/dist/components/base/form/form_checkbox/form_checkbox.js +13 -26
- package/dist/components/base/form/form_checkbox/form_checkbox_group.js +1 -3
- package/dist/components/base/form/form_fields/form_fields_loop.js +57 -6
- package/dist/components/base/form/form_group/form_group.js +1 -3
- package/dist/components/base/form/form_input/form_input.js +95 -41
- package/dist/components/base/form/form_input_group/form_input_group.js +2 -4
- package/dist/components/base/form/form_radio/form_radio.js +5 -9
- package/dist/components/base/form/form_radio_group/form_radio_group.js +1 -3
- package/dist/components/base/form/form_select/form_select.js +76 -5
- package/dist/components/base/infinite_scroll/infinite_scroll.js +7 -14
- package/dist/components/base/link/link.js +26 -7
- package/dist/components/base/new_dropdowns/base_dropdown/base_dropdown.js +93 -32
- package/dist/components/base/new_dropdowns/disclosure/disclosure_dropdown.js +2 -6
- package/dist/components/base/new_dropdowns/disclosure/disclosure_dropdown_item.js +2 -6
- package/dist/components/base/new_dropdowns/listbox/listbox.js +5 -13
- package/dist/components/base/new_dropdowns/listbox/listbox_item.js +1 -3
- package/dist/components/base/new_dropdowns/listbox/mock_data.js +2 -6
- package/dist/components/base/new_dropdowns/listbox/utils.js +6 -11
- package/dist/components/base/path/path.js +1 -5
- package/dist/components/base/search_box_by_type/search_box_by_type.js +2 -6
- package/dist/components/base/skeleton_loader/skeleton_loader.js +3 -5
- package/dist/components/base/table/table.js +32 -21
- package/dist/components/base/table_lite/table_lite.js +1 -3
- package/dist/components/base/tabs/tab/tab.js +1 -3
- package/dist/components/base/tabs/tabs/scrollable_tabs.js +1 -5
- package/dist/components/base/token_selector/token_selector.js +2 -6
- package/dist/components/charts/area/area.js +6 -7
- package/dist/components/charts/column/column.js +11 -15
- package/dist/components/charts/discrete_scatter/discrete_scatter.js +57 -5
- package/dist/components/charts/gauge/gauge.js +13 -21
- package/dist/components/charts/heatmap/heatmap.js +66 -18
- package/dist/components/charts/legend/legend.js +59 -13
- package/dist/components/charts/line/line.js +6 -7
- package/dist/components/charts/shared/tooltip/tooltip.js +11 -18
- package/dist/components/charts/sparkline/sparkline.js +72 -19
- package/dist/components/charts/stacked_column/stacked_column.js +18 -31
- package/dist/components/dashboards/dashboard_layout/grid_layout/grid_layout.js +40 -24
- package/dist/components/utilities/friendly_wrap/friendly_wrap.js +3 -7
- package/dist/components/utilities/intersperse/intersperse.js +6 -11
- package/dist/components/utilities/sprintf/sprintf.js +58 -7
- package/dist/components/utilities/truncate/truncate.js +2 -4
- package/dist/components/utilities/truncate_text/truncate_text.js +1 -3
- package/dist/config.js +3 -4
- package/dist/directives/hover_load/hover_load.js +1 -3
- package/dist/directives/outside/outside.js +9 -16
- package/dist/directives/resize_observer/resize_observer.js +6 -8
- package/dist/directives/safe_html/safe_html.js +1 -3
- package/dist/directives/safe_link/safe_link.js +11 -14
- package/dist/index.css +2 -2
- package/dist/index.css.map +1 -1
- package/dist/tokens/build/js/tokens.dark.js +95 -95
- package/dist/tokens/build/js/tokens.js +74 -74
- package/dist/tokens/common_story_options.js +7 -8
- package/dist/utils/charts/config.js +122 -90
- package/dist/utils/constants.js +26 -1
- package/dist/utils/data_utils.js +28 -1
- package/dist/utils/form_options_utils.js +4 -6
- package/dist/utils/is_slot_empty.js +3 -5
- package/dist/utils/stories_utils.js +8 -8
- package/dist/utils/use_mock_intersection_observer.js +63 -12
- package/dist/utils/utils.js +76 -19
- package/dist/vendor/bootstrap-vue/src/components/button/button-close.js +8 -11
- package/dist/vendor/bootstrap-vue/src/components/button/button.js +12 -17
- package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-divider.js +3 -6
- package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-form.js +6 -9
- package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-group.js +14 -19
- package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-header.js +8 -13
- package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-item-button.js +9 -12
- package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-item.js +8 -11
- package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-text.js +9 -14
- package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown.js +34 -43
- package/dist/vendor/bootstrap-vue/src/components/form/form-invalid-feedback.js +5 -9
- package/dist/vendor/bootstrap-vue/src/components/form/form-text.js +7 -10
- package/dist/vendor/bootstrap-vue/src/components/form/form-valid-feedback.js +5 -9
- package/dist/vendor/bootstrap-vue/src/components/form/form.js +7 -10
- package/dist/vendor/bootstrap-vue/src/components/form-group/form-group.js +77 -33
- package/dist/vendor/bootstrap-vue/src/components/form-select/form-select-option-group.js +6 -11
- package/dist/vendor/bootstrap-vue/src/components/form-select/form-select-option.js +6 -12
- package/dist/vendor/bootstrap-vue/src/components/form-select/form-select.js +28 -29
- package/dist/vendor/bootstrap-vue/src/components/form-textarea/form-textarea.js +7 -10
- package/dist/vendor/bootstrap-vue/src/components/layout/col.js +7 -11
- package/dist/vendor/bootstrap-vue/src/components/layout/form-row.js +3 -5
- package/dist/vendor/bootstrap-vue/src/components/link/link.js +19 -31
- package/dist/vendor/bootstrap-vue/src/components/modal/helpers/modal-manager.js +3 -4
- package/dist/vendor/bootstrap-vue/src/components/modal/modal.js +59 -68
- package/dist/vendor/bootstrap-vue/src/components/popover/helpers/bv-popover-template.js +2 -4
- package/dist/vendor/bootstrap-vue/src/components/popover/popover.js +4 -5
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/default-sort-compare.js +11 -7
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-bottom-row.js +4 -6
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-busy.js +3 -6
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-caption.js +4 -7
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-colgroup.js +1 -3
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-empty.js +16 -20
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-filtering.js +14 -25
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-items.js +23 -35
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-pagination.js +6 -8
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-provider.js +8 -10
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-selectable.js +8 -15
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-sorting.js +33 -41
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-stacked.js +3 -8
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-table-renderer.js +38 -50
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-tbody-row.js +19 -31
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-tbody.js +13 -23
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-tfoot.js +5 -6
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-thead.js +17 -21
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-top-row.js +4 -6
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/sanitize-row.js +1 -3
- package/dist/vendor/bootstrap-vue/src/components/table/tbody.js +3 -6
- package/dist/vendor/bootstrap-vue/src/components/table/td.js +9 -14
- package/dist/vendor/bootstrap-vue/src/components/table/tfoot.js +1 -2
- package/dist/vendor/bootstrap-vue/src/components/table/thead.js +1 -2
- package/dist/vendor/bootstrap-vue/src/components/table/tr.js +2 -5
- package/dist/vendor/bootstrap-vue/src/components/tabs/tab.js +19 -36
- package/dist/vendor/bootstrap-vue/src/components/tabs/tabs.js +66 -81
- package/dist/vendor/bootstrap-vue/src/components/tooltip/helpers/bv-popper.js +2 -6
- package/dist/vendor/bootstrap-vue/src/components/tooltip/helpers/bv-tooltip-template.js +5 -11
- package/dist/vendor/bootstrap-vue/src/components/tooltip/helpers/bv-tooltip.js +8 -14
- package/dist/vendor/bootstrap-vue/src/components/tooltip/tooltip.js +19 -22
- package/dist/vendor/bootstrap-vue/src/components/transition/bv-transition.js +7 -10
- package/dist/vendor/bootstrap-vue/src/components/transporter/transporter.js +7 -14
- package/dist/vendor/bootstrap-vue/src/directives/modal/modal.js +4 -5
- package/dist/vendor/bootstrap-vue/src/directives/visible/visible.js +5 -9
- package/dist/vendor/bootstrap-vue/src/mixins/dropdown.js +17 -29
- package/dist/vendor/bootstrap-vue/src/mixins/form-control.js +6 -7
- package/dist/vendor/bootstrap-vue/src/mixins/form-custom.js +1 -2
- package/dist/vendor/bootstrap-vue/src/mixins/form-options.js +5 -6
- package/dist/vendor/bootstrap-vue/src/mixins/form-size.js +1 -2
- package/dist/vendor/bootstrap-vue/src/mixins/form-state.js +1 -2
- package/dist/vendor/bootstrap-vue/src/mixins/form-text.js +29 -43
- package/dist/vendor/bootstrap-vue/src/mixins/id.js +1 -2
- package/dist/vendor/bootstrap-vue/src/utils/create-new-child-component.js +62 -15
- package/dist/vendor/bootstrap-vue/src/utils/dom.js +3 -9
- package/dist/vendor/bootstrap-vue/src/utils/events.js +7 -5
- package/dist/vendor/bootstrap-vue/src/utils/plugins.js +4 -5
- package/dist/vendor/bootstrap-vue/src/utils/router.js +9 -13
- package/package.json +10 -8
- package/src/components/dashboards/dashboard_layout/grid_layout/grid_layout.vue +21 -19
- package/src/scss/gitlab_ui.scss +3 -0
- package/src/scss/storybook.scss +3 -0
- package/src/scss/themes.scss +84 -0
- package/src/tokens/build/css/tokens.css +142 -142
- package/src/tokens/build/css/tokens.dark.css +138 -138
- package/src/tokens/build/docs/tokens-tailwind-docs.dark.json +580 -580
- package/src/tokens/build/docs/tokens-tailwind-docs.json +495 -495
- package/src/tokens/build/figma/constants.dark.json +799 -799
- package/src/tokens/build/figma/constants.json +799 -799
- package/src/tokens/build/js/tokens.dark.js +95 -95
- package/src/tokens/build/js/tokens.js +74 -74
- package/src/tokens/build/json/tokens.dark.json +1668 -1668
- package/src/tokens/build/json/tokens.json +1647 -1647
- package/src/tokens/build/scss/_tokens.dark.scss +138 -138
- package/src/tokens/build/scss/_tokens.scss +142 -142
- package/src/tokens/build/scss/_tokens_custom_properties.scss +73 -73
- package/src/tokens/constant/color.blue.tokens.json +182 -0
- package/src/tokens/constant/color.brand.tokens.json +252 -0
- package/src/tokens/constant/color.data.tokens.json +894 -0
- package/src/tokens/constant/color.green.tokens.json +182 -0
- package/src/tokens/constant/color.neutral.tokens.json +230 -0
- package/src/tokens/constant/color.orange.tokens.json +182 -0
- package/src/tokens/constant/color.purple.tokens.json +182 -0
- package/src/tokens/constant/color.red.tokens.json +182 -0
- package/src/tokens/constant/color.theme.tokens.json +1168 -0
- package/src/tokens/deprecated/deprecated.color.tokens.json +134 -1340
- package/src/utils/constants.js +9 -0
- package/src/vendor/bootstrap-vue/src/components/button/button-close.js +4 -5
- package/src/vendor/bootstrap-vue/src/components/button/button.js +7 -8
- package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown-divider.js +1 -2
- package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown-form.js +2 -8
- package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown-group.js +6 -7
- package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown-header.js +3 -4
- package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown-item-button.js +6 -12
- package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown-item.js +2 -3
- package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown-text.js +3 -4
- package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown.js +19 -26
- package/src/vendor/bootstrap-vue/src/components/form/form-text.js +4 -6
- package/src/vendor/bootstrap-vue/src/components/form/form.js +4 -6
- package/src/vendor/bootstrap-vue/src/components/form-group/form-group.js +66 -19
- package/src/vendor/bootstrap-vue/src/components/form-select/form-select-option-group.js +1 -2
- package/src/vendor/bootstrap-vue/src/components/form-select/form-select-option.js +1 -4
- package/src/vendor/bootstrap-vue/src/components/form-select/form-select.js +13 -14
- package/src/vendor/bootstrap-vue/src/components/form-textarea/form-textarea.js +5 -6
- package/src/vendor/bootstrap-vue/src/components/modal/modal.js +53 -62
- package/src/vendor/bootstrap-vue/src/components/popover/popover.js +4 -10
- package/src/vendor/bootstrap-vue/src/components/table/helpers/mixin-busy.js +1 -2
- package/src/vendor/bootstrap-vue/src/components/table/helpers/mixin-caption.js +2 -3
- package/src/vendor/bootstrap-vue/src/components/table/helpers/mixin-empty.js +5 -6
- package/src/vendor/bootstrap-vue/src/components/table/helpers/mixin-filtering.js +5 -13
- package/src/vendor/bootstrap-vue/src/components/table/helpers/mixin-items.js +12 -21
- package/src/vendor/bootstrap-vue/src/components/table/helpers/mixin-pagination.js +2 -3
- package/src/vendor/bootstrap-vue/src/components/table/helpers/mixin-provider.js +5 -11
- package/src/vendor/bootstrap-vue/src/components/table/helpers/mixin-selectable.js +4 -5
- package/src/vendor/bootstrap-vue/src/components/table/helpers/mixin-sorting.js +14 -21
- package/src/vendor/bootstrap-vue/src/components/table/helpers/mixin-stacked.js +1 -2
- package/src/vendor/bootstrap-vue/src/components/table/helpers/mixin-table-renderer.js +14 -20
- package/src/vendor/bootstrap-vue/src/components/table/helpers/mixin-tbody-row.js +3 -9
- package/src/vendor/bootstrap-vue/src/components/table/helpers/mixin-tbody.js +1 -2
- package/src/vendor/bootstrap-vue/src/components/table/helpers/mixin-tfoot.js +5 -11
- package/src/vendor/bootstrap-vue/src/components/table/helpers/mixin-thead.js +4 -5
- package/src/vendor/bootstrap-vue/src/components/table/tbody.js +2 -3
- package/src/vendor/bootstrap-vue/src/components/table/td.js +5 -6
- package/src/vendor/bootstrap-vue/src/components/table/tfoot.js +1 -2
- package/src/vendor/bootstrap-vue/src/components/table/thead.js +1 -2
- package/src/vendor/bootstrap-vue/src/components/table/tr.js +1 -2
- package/src/vendor/bootstrap-vue/src/components/tabs/tab.js +10 -16
- package/src/vendor/bootstrap-vue/src/components/tabs/tabs.js +33 -39
- package/src/vendor/bootstrap-vue/src/components/tooltip/tooltip.js +17 -25
- package/src/vendor/bootstrap-vue/src/components/transition/bv-transition.js +4 -5
- package/src/vendor/bootstrap-vue/src/components/transporter/transporter.js +4 -10
- package/src/vendor/bootstrap-vue/src/mixins/dropdown.js +9 -15
- package/src/vendor/bootstrap-vue/src/mixins/form-control.js +6 -7
- package/src/vendor/bootstrap-vue/src/mixins/form-custom.js +1 -2
- package/src/vendor/bootstrap-vue/src/mixins/form-options.js +5 -6
- package/src/vendor/bootstrap-vue/src/mixins/form-size.js +1 -2
- package/src/vendor/bootstrap-vue/src/mixins/form-state.js +1 -2
- package/src/vendor/bootstrap-vue/src/mixins/form-text.js +21 -33
- package/src/vendor/bootstrap-vue/src/mixins/id.js +1 -2
- package/dist/vendor/bootstrap-vue/src/mixins/model.js +0 -10
- package/dist/vendor/bootstrap-vue/src/utils/model.js +0 -33
- package/src/tokens/constant/color.tokens.json +0 -3422
- package/src/vendor/bootstrap-vue/src/mixins/model.js +0 -5
- package/src/vendor/bootstrap-vue/src/utils/model.js +0 -29
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { extend } from '../../../vue';
|
|
2
2
|
import { EVENT_NAME_SORT_CHANGED, MODEL_EVENT_NAME_PREFIX } from '../../../constants/events';
|
|
3
|
-
import { PROP_TYPE_STRING, PROP_TYPE_BOOLEAN, PROP_TYPE_FUNCTION, PROP_TYPE_ARRAY, PROP_TYPE_OBJECT } from '../../../constants/props';
|
|
4
3
|
import { isFunction, isUndefinedOrNull } from '../../../utils/inspect';
|
|
5
4
|
import { safeVueInstance } from '../../../utils/safe-vue-instance';
|
|
6
5
|
import { stableSort } from '../../../utils/stable-sort';
|
|
@@ -22,27 +21,27 @@ const SORT_DIRECTIONS = [SORT_DIRECTION_ASC, SORT_DIRECTION_DESC, SORT_DIRECTION
|
|
|
22
21
|
|
|
23
22
|
const props = {
|
|
24
23
|
labelSortAsc: {
|
|
25
|
-
type:
|
|
24
|
+
type: String,
|
|
26
25
|
required: false,
|
|
27
26
|
default: 'Click to sort ascending'
|
|
28
27
|
},
|
|
29
28
|
labelSortClear: {
|
|
30
|
-
type:
|
|
29
|
+
type: String,
|
|
31
30
|
required: false,
|
|
32
31
|
default: 'Click to clear sorting'
|
|
33
32
|
},
|
|
34
33
|
labelSortDesc: {
|
|
35
|
-
type:
|
|
34
|
+
type: String,
|
|
36
35
|
required: false,
|
|
37
36
|
default: 'Click to sort descending'
|
|
38
37
|
},
|
|
39
38
|
noFooterSorting: {
|
|
40
|
-
type:
|
|
39
|
+
type: Boolean,
|
|
41
40
|
required: false,
|
|
42
41
|
default: false
|
|
43
42
|
},
|
|
44
43
|
noLocalSorting: {
|
|
45
|
-
type:
|
|
44
|
+
type: Boolean,
|
|
46
45
|
required: false,
|
|
47
46
|
default: false
|
|
48
47
|
},
|
|
@@ -51,31 +50,31 @@ const props = {
|
|
|
51
50
|
// We will need to make sure the documentation is clear on what
|
|
52
51
|
// this prop does (as well as in the code for future reference)
|
|
53
52
|
noSortReset: {
|
|
54
|
-
type:
|
|
53
|
+
type: Boolean,
|
|
55
54
|
required: false,
|
|
56
55
|
default: false
|
|
57
56
|
},
|
|
58
57
|
[MODEL_PROP_NAME_SORT_BY]: {
|
|
59
|
-
type:
|
|
58
|
+
type: String,
|
|
60
59
|
required: false,
|
|
61
60
|
default: undefined
|
|
62
61
|
},
|
|
63
62
|
sortCompare: {
|
|
64
|
-
type:
|
|
63
|
+
type: Function,
|
|
65
64
|
required: false,
|
|
66
65
|
default: undefined
|
|
67
66
|
},
|
|
68
67
|
// String: locale code
|
|
69
68
|
// Array: array of Locale strings
|
|
70
69
|
sortCompareLocale: {
|
|
71
|
-
type: [
|
|
70
|
+
type: [Array, String],
|
|
72
71
|
required: false,
|
|
73
72
|
default: undefined
|
|
74
73
|
},
|
|
75
74
|
// Supported localCompare options, see `options` section of:
|
|
76
75
|
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/localeCompare
|
|
77
76
|
sortCompareOptions: {
|
|
78
|
-
type:
|
|
77
|
+
type: Object,
|
|
79
78
|
required: false,
|
|
80
79
|
default: () => ({
|
|
81
80
|
numeric: true
|
|
@@ -83,7 +82,7 @@ const props = {
|
|
|
83
82
|
},
|
|
84
83
|
// TODO: Make this tri-state: `true`, `false`, `null`
|
|
85
84
|
[MODEL_PROP_NAME_SORT_DESC]: {
|
|
86
|
-
type:
|
|
85
|
+
type: Boolean,
|
|
87
86
|
required: false,
|
|
88
87
|
default: false
|
|
89
88
|
},
|
|
@@ -91,20 +90,20 @@ const props = {
|
|
|
91
90
|
// It should be `initialSortDirection` as it is a bit misleading
|
|
92
91
|
// (not to mention it screws up the ARIA label on the headers)
|
|
93
92
|
sortDirection: {
|
|
94
|
-
type:
|
|
93
|
+
type: String,
|
|
95
94
|
required: false,
|
|
96
95
|
default: SORT_DIRECTION_ASC,
|
|
97
96
|
validator: value => SORT_DIRECTIONS.includes(value)
|
|
98
97
|
},
|
|
99
98
|
// Place the sorting icon on the left of the header cells
|
|
100
99
|
sortIconLeft: {
|
|
101
|
-
type:
|
|
100
|
+
type: Boolean,
|
|
102
101
|
required: false,
|
|
103
102
|
default: false
|
|
104
103
|
},
|
|
105
104
|
// Sort null and undefined to appear last
|
|
106
105
|
sortNullLast: {
|
|
107
|
-
type:
|
|
106
|
+
type: Boolean,
|
|
108
107
|
required: false,
|
|
109
108
|
default: false
|
|
110
109
|
}
|
|
@@ -131,16 +130,15 @@ const sortingMixin = extend({
|
|
|
131
130
|
// Sorts the filtered items and returns a new array of the sorted items
|
|
132
131
|
// When not sorted, the original items array will be returned
|
|
133
132
|
sortedItems() {
|
|
134
|
-
const
|
|
135
|
-
localSortBy
|
|
136
|
-
localSortDesc
|
|
137
|
-
sortCompareLocale
|
|
138
|
-
sortNullLast
|
|
139
|
-
sortCompare,
|
|
140
|
-
localSorting,
|
|
141
|
-
filteredItems,
|
|
142
|
-
localItems
|
|
143
|
-
} = safeVueInstance(this);
|
|
133
|
+
const _safeVueInstance = safeVueInstance(this),
|
|
134
|
+
sortBy = _safeVueInstance.localSortBy,
|
|
135
|
+
sortDesc = _safeVueInstance.localSortDesc,
|
|
136
|
+
locale = _safeVueInstance.sortCompareLocale,
|
|
137
|
+
nullLast = _safeVueInstance.sortNullLast,
|
|
138
|
+
sortCompare = _safeVueInstance.sortCompare,
|
|
139
|
+
localSorting = _safeVueInstance.localSorting,
|
|
140
|
+
filteredItems = _safeVueInstance.filteredItems,
|
|
141
|
+
localItems = _safeVueInstance.localItems;
|
|
144
142
|
const items = (filteredItems || localItems || []).slice();
|
|
145
143
|
const localeOptions = {
|
|
146
144
|
...this.sortCompareOptions,
|
|
@@ -260,13 +258,11 @@ const sortingMixin = extend({
|
|
|
260
258
|
},
|
|
261
259
|
sortTheadThAttrs(key, field, isFoot) {
|
|
262
260
|
var _field$sortKey;
|
|
263
|
-
const
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
localSorting
|
|
269
|
-
} = this;
|
|
261
|
+
const isSortable = this.isSortable,
|
|
262
|
+
noFooterSorting = this.noFooterSorting,
|
|
263
|
+
localSortDesc = this.localSortDesc,
|
|
264
|
+
localSortBy = this.localSortBy,
|
|
265
|
+
localSorting = this.localSorting;
|
|
270
266
|
if (!isSortable || isFoot && noFooterSorting) {
|
|
271
267
|
// No attributes if not a sortable table
|
|
272
268
|
return {};
|
|
@@ -287,15 +283,11 @@ const sortingMixin = extend({
|
|
|
287
283
|
if (!this.isSortable || isFoot && this.noFooterSorting) {
|
|
288
284
|
return null;
|
|
289
285
|
}
|
|
290
|
-
const
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
} = this;
|
|
296
|
-
const {
|
|
297
|
-
sortable
|
|
298
|
-
} = field;
|
|
286
|
+
const localSortBy = this.localSortBy,
|
|
287
|
+
localSortDesc = this.localSortDesc,
|
|
288
|
+
labelSortAsc = this.labelSortAsc,
|
|
289
|
+
labelSortDesc = this.labelSortDesc;
|
|
290
|
+
const sortable = field.sortable;
|
|
299
291
|
// The correctness of these labels is very important for screen reader users
|
|
300
292
|
let labelSorting = '';
|
|
301
293
|
if (sortable) {
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { extend } from '../../../vue';
|
|
2
|
-
import { PROP_TYPE_BOOLEAN, PROP_TYPE_STRING } from '../../../constants/props';
|
|
3
2
|
|
|
4
3
|
// --- Props ---
|
|
5
4
|
|
|
6
5
|
const props = {
|
|
7
6
|
stacked: {
|
|
8
|
-
type: [
|
|
7
|
+
type: [Boolean, String],
|
|
9
8
|
required: false,
|
|
10
9
|
default: false
|
|
11
10
|
}
|
|
@@ -18,9 +17,7 @@ const stackedMixin = extend({
|
|
|
18
17
|
props,
|
|
19
18
|
computed: {
|
|
20
19
|
isStacked() {
|
|
21
|
-
const
|
|
22
|
-
stacked
|
|
23
|
-
} = this;
|
|
20
|
+
const stacked = this.stacked;
|
|
24
21
|
// `true` when always stacked, or returns breakpoint specified
|
|
25
22
|
return stacked === '' ? true : stacked;
|
|
26
23
|
},
|
|
@@ -28,9 +25,7 @@ const stackedMixin = extend({
|
|
|
28
25
|
return this.isStacked === true;
|
|
29
26
|
},
|
|
30
27
|
stackedTableClasses() {
|
|
31
|
-
const
|
|
32
|
-
isStackedAlways
|
|
33
|
-
} = this;
|
|
28
|
+
const isStackedAlways = this.isStackedAlways;
|
|
34
29
|
return {
|
|
35
30
|
'b-table-stacked': isStackedAlways,
|
|
36
31
|
[`b-table-stacked-${this.stacked}`]: !isStackedAlways && this.isStacked
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { extend } from '../../../vue';
|
|
2
|
-
import { PROP_TYPE_BOOLEAN, PROP_TYPE_STRING, PROP_TYPE_ARRAY, PROP_TYPE_OBJECT } from '../../../constants/props';
|
|
3
2
|
import { identity } from '../../../utils/identity';
|
|
4
3
|
import { isBoolean } from '../../../utils/inspect';
|
|
5
4
|
import { safeVueInstance } from '../../../utils/safe-vue-instance';
|
|
@@ -13,73 +12,73 @@ import { attrsMixin } from '../../../mixins/attrs';
|
|
|
13
12
|
|
|
14
13
|
const props = {
|
|
15
14
|
bordered: {
|
|
16
|
-
type:
|
|
15
|
+
type: Boolean,
|
|
17
16
|
required: false,
|
|
18
17
|
default: false
|
|
19
18
|
},
|
|
20
19
|
borderless: {
|
|
21
|
-
type:
|
|
20
|
+
type: Boolean,
|
|
22
21
|
required: false,
|
|
23
22
|
default: false
|
|
24
23
|
},
|
|
25
24
|
captionTop: {
|
|
26
|
-
type:
|
|
25
|
+
type: Boolean,
|
|
27
26
|
required: false,
|
|
28
27
|
default: false
|
|
29
28
|
},
|
|
30
29
|
dark: {
|
|
31
|
-
type:
|
|
30
|
+
type: Boolean,
|
|
32
31
|
required: false,
|
|
33
32
|
default: false
|
|
34
33
|
},
|
|
35
34
|
fixed: {
|
|
36
|
-
type:
|
|
35
|
+
type: Boolean,
|
|
37
36
|
required: false,
|
|
38
37
|
default: false
|
|
39
38
|
},
|
|
40
39
|
hover: {
|
|
41
|
-
type:
|
|
40
|
+
type: Boolean,
|
|
42
41
|
required: false,
|
|
43
42
|
default: false
|
|
44
43
|
},
|
|
45
44
|
noBorderCollapse: {
|
|
46
|
-
type:
|
|
45
|
+
type: Boolean,
|
|
47
46
|
required: false,
|
|
48
47
|
default: false
|
|
49
48
|
},
|
|
50
49
|
outlined: {
|
|
51
|
-
type:
|
|
50
|
+
type: Boolean,
|
|
52
51
|
required: false,
|
|
53
52
|
default: false
|
|
54
53
|
},
|
|
55
54
|
responsive: {
|
|
56
|
-
type: [
|
|
55
|
+
type: [Boolean, String],
|
|
57
56
|
required: false,
|
|
58
57
|
default: false
|
|
59
58
|
},
|
|
60
59
|
small: {
|
|
61
|
-
type:
|
|
60
|
+
type: Boolean,
|
|
62
61
|
required: false,
|
|
63
62
|
default: false
|
|
64
63
|
},
|
|
65
64
|
// If a string, it is assumed to be the table `max-height` value
|
|
66
65
|
stickyHeader: {
|
|
67
|
-
type: [
|
|
66
|
+
type: [Boolean, String],
|
|
68
67
|
required: false,
|
|
69
68
|
default: false
|
|
70
69
|
},
|
|
71
70
|
striped: {
|
|
72
|
-
type:
|
|
71
|
+
type: Boolean,
|
|
73
72
|
required: false,
|
|
74
73
|
default: false
|
|
75
74
|
},
|
|
76
75
|
tableClass: {
|
|
77
|
-
type: [
|
|
76
|
+
type: [Array, Object, String],
|
|
78
77
|
required: false,
|
|
79
78
|
default: undefined
|
|
80
79
|
},
|
|
81
80
|
tableVariant: {
|
|
82
|
-
type:
|
|
81
|
+
type: String,
|
|
83
82
|
required: false,
|
|
84
83
|
default: undefined
|
|
85
84
|
}
|
|
@@ -105,41 +104,32 @@ const tableRendererMixin = extend({
|
|
|
105
104
|
},
|
|
106
105
|
// Layout related computed props
|
|
107
106
|
isResponsive() {
|
|
108
|
-
const
|
|
109
|
-
responsive
|
|
110
|
-
} = this;
|
|
107
|
+
const responsive = this.responsive;
|
|
111
108
|
return responsive === '' ? true : responsive;
|
|
112
109
|
},
|
|
113
110
|
isStickyHeader() {
|
|
114
|
-
let
|
|
115
|
-
stickyHeader
|
|
116
|
-
} = this;
|
|
111
|
+
let stickyHeader = this.stickyHeader;
|
|
117
112
|
stickyHeader = stickyHeader === '' ? true : stickyHeader;
|
|
118
113
|
return this.isStacked ? false : stickyHeader;
|
|
119
114
|
},
|
|
120
115
|
wrapperClasses() {
|
|
121
|
-
const
|
|
122
|
-
isResponsive
|
|
123
|
-
} = this;
|
|
116
|
+
const isResponsive = this.isResponsive;
|
|
124
117
|
return [this.isStickyHeader ? 'b-table-sticky-header' : '', isResponsive === true ? 'table-responsive' : isResponsive ? `table-responsive table-responsive-${this.responsive}` : ''].filter(identity);
|
|
125
118
|
},
|
|
126
119
|
wrapperStyles() {
|
|
127
|
-
const
|
|
128
|
-
isStickyHeader
|
|
129
|
-
} = this;
|
|
120
|
+
const isStickyHeader = this.isStickyHeader;
|
|
130
121
|
return isStickyHeader && !isBoolean(isStickyHeader) ? {
|
|
131
122
|
maxHeight: isStickyHeader
|
|
132
123
|
} : {};
|
|
133
124
|
},
|
|
134
125
|
tableClasses() {
|
|
135
|
-
let
|
|
136
|
-
hover,
|
|
137
|
-
tableVariant,
|
|
138
|
-
selectableTableClasses,
|
|
139
|
-
stackedTableClasses,
|
|
140
|
-
tableClass,
|
|
141
|
-
computedBusy
|
|
142
|
-
} = safeVueInstance(this);
|
|
126
|
+
let _safeVueInstance = safeVueInstance(this),
|
|
127
|
+
hover = _safeVueInstance.hover,
|
|
128
|
+
tableVariant = _safeVueInstance.tableVariant,
|
|
129
|
+
selectableTableClasses = _safeVueInstance.selectableTableClasses,
|
|
130
|
+
stackedTableClasses = _safeVueInstance.stackedTableClasses,
|
|
131
|
+
tableClass = _safeVueInstance.tableClass,
|
|
132
|
+
computedBusy = _safeVueInstance.computedBusy;
|
|
143
133
|
hover = this.isTableSimple ? hover : hover && this.computedItems.length > 0 && !computedBusy;
|
|
144
134
|
return [
|
|
145
135
|
// User supplied classes
|
|
@@ -164,13 +154,12 @@ const tableRendererMixin = extend({
|
|
|
164
154
|
selectableTableClasses];
|
|
165
155
|
},
|
|
166
156
|
tableAttrs() {
|
|
167
|
-
const
|
|
168
|
-
computedItems
|
|
169
|
-
filteredItems,
|
|
170
|
-
computedFields
|
|
171
|
-
selectableTableAttrs,
|
|
172
|
-
computedBusy
|
|
173
|
-
} = safeVueInstance(this);
|
|
157
|
+
const _safeVueInstance2 = safeVueInstance(this),
|
|
158
|
+
items = _safeVueInstance2.computedItems,
|
|
159
|
+
filteredItems = _safeVueInstance2.filteredItems,
|
|
160
|
+
fields = _safeVueInstance2.computedFields,
|
|
161
|
+
selectableTableAttrs = _safeVueInstance2.selectableTableAttrs,
|
|
162
|
+
computedBusy = _safeVueInstance2.computedBusy;
|
|
174
163
|
const ariaAttrs = this.isTableSimple ? {} : {
|
|
175
164
|
'aria-busy': toString(computedBusy),
|
|
176
165
|
'aria-colcount': toString(fields.length),
|
|
@@ -193,14 +182,13 @@ const tableRendererMixin = extend({
|
|
|
193
182
|
}
|
|
194
183
|
},
|
|
195
184
|
render(h) {
|
|
196
|
-
const
|
|
197
|
-
wrapperClasses,
|
|
198
|
-
renderCaption,
|
|
199
|
-
renderColgroup,
|
|
200
|
-
renderThead,
|
|
201
|
-
renderTbody,
|
|
202
|
-
renderTfoot
|
|
203
|
-
} = safeVueInstance(this);
|
|
185
|
+
const _safeVueInstance3 = safeVueInstance(this),
|
|
186
|
+
wrapperClasses = _safeVueInstance3.wrapperClasses,
|
|
187
|
+
renderCaption = _safeVueInstance3.renderCaption,
|
|
188
|
+
renderColgroup = _safeVueInstance3.renderColgroup,
|
|
189
|
+
renderThead = _safeVueInstance3.renderThead,
|
|
190
|
+
renderTbody = _safeVueInstance3.renderTbody,
|
|
191
|
+
renderTfoot = _safeVueInstance3.renderTfoot;
|
|
204
192
|
const $content = [];
|
|
205
193
|
if (this.isTableSimple) {
|
|
206
194
|
$content.push(this.normalizeSlot());
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { extend, REF_FOR_KEY } from '../../../vue';
|
|
2
2
|
import { EVENT_NAME_ROW_HOVERED, EVENT_NAME_ROW_UNHOVERED, EVENT_NAME_ROW_CLICKED } from '../../../constants/events';
|
|
3
|
-
import { PROP_TYPE_ARRAY, PROP_TYPE_OBJECT, PROP_TYPE_STRING, PROP_TYPE_FUNCTION } from '../../../constants/props';
|
|
4
3
|
import { SLOT_NAME_ROW_DETAILS } from '../../../constants/slots';
|
|
5
4
|
import { useParentMixin } from '../../../mixins/use-parent';
|
|
6
5
|
import { get } from '../../../utils/get';
|
|
@@ -16,17 +15,17 @@ import { FIELD_KEY_SHOW_DETAILS, FIELD_KEY_CELL_VARIANT, FIELD_KEY_ROW_VARIANT }
|
|
|
16
15
|
|
|
17
16
|
const props = {
|
|
18
17
|
detailsTdClass: {
|
|
19
|
-
type: [
|
|
18
|
+
type: [Array, Object, String],
|
|
20
19
|
required: false,
|
|
21
20
|
default: undefined
|
|
22
21
|
},
|
|
23
22
|
tbodyTrAttr: {
|
|
24
|
-
type: [
|
|
23
|
+
type: [Object, Function],
|
|
25
24
|
required: false,
|
|
26
25
|
default: undefined
|
|
27
26
|
},
|
|
28
27
|
tbodyTrClass: {
|
|
29
|
-
type: [
|
|
28
|
+
type: [Array, Object, String, Function],
|
|
30
29
|
required: false,
|
|
31
30
|
default: undefined
|
|
32
31
|
}
|
|
@@ -41,9 +40,7 @@ const tbodyRowMixin = extend({
|
|
|
41
40
|
methods: {
|
|
42
41
|
// Methods for computing classes, attributes and styles for table cells
|
|
43
42
|
getTdValues(item, key, tdValue, defaultValue) {
|
|
44
|
-
const
|
|
45
|
-
bvParent
|
|
46
|
-
} = this;
|
|
43
|
+
const bvParent = this.bvParent;
|
|
47
44
|
if (tdValue) {
|
|
48
45
|
const value = get(item, key, '');
|
|
49
46
|
if (isFunction(tdValue)) {
|
|
@@ -56,9 +53,7 @@ const tbodyRowMixin = extend({
|
|
|
56
53
|
return defaultValue;
|
|
57
54
|
},
|
|
58
55
|
getThValues(item, key, thValue, type, defaultValue) {
|
|
59
|
-
const
|
|
60
|
-
bvParent
|
|
61
|
-
} = this;
|
|
56
|
+
const bvParent = this.bvParent;
|
|
62
57
|
if (thValue) {
|
|
63
58
|
const value = get(item, key, '');
|
|
64
59
|
if (isFunction(thValue)) {
|
|
@@ -72,9 +67,7 @@ const tbodyRowMixin = extend({
|
|
|
72
67
|
},
|
|
73
68
|
// Method to get the value for a field
|
|
74
69
|
getFormattedValue(item, field) {
|
|
75
|
-
const
|
|
76
|
-
key
|
|
77
|
-
} = field;
|
|
70
|
+
const key = field.key;
|
|
78
71
|
const formatter = this.getFieldFormatter(key);
|
|
79
72
|
let value = get(item, key, null);
|
|
80
73
|
if (isFunction(formatter)) {
|
|
@@ -110,14 +103,10 @@ const tbodyRowMixin = extend({
|
|
|
110
103
|
},
|
|
111
104
|
// Renders a TD or TH for a row's field
|
|
112
105
|
renderTbodyRowCell(field, colIndex, item, rowIndex) {
|
|
113
|
-
const
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
key,
|
|
118
|
-
label,
|
|
119
|
-
isRowHeader
|
|
120
|
-
} = field;
|
|
106
|
+
const isStacked = this.isStacked;
|
|
107
|
+
const key = field.key,
|
|
108
|
+
label = field.label,
|
|
109
|
+
isRowHeader = field.isRowHeader;
|
|
121
110
|
const h = this.$createElement;
|
|
122
111
|
const hasDetailsSlot = this.hasNormalizedSlot(SLOT_NAME_ROW_DETAILS);
|
|
123
112
|
const formatted = this.getFormattedValue(item, field);
|
|
@@ -195,16 +184,15 @@ const tbodyRowMixin = extend({
|
|
|
195
184
|
},
|
|
196
185
|
// Renders an item's row (or rows if details supported)
|
|
197
186
|
renderTbodyRow(item, rowIndex) {
|
|
198
|
-
const
|
|
199
|
-
computedFields
|
|
200
|
-
striped,
|
|
201
|
-
primaryKey,
|
|
202
|
-
currentPage,
|
|
203
|
-
perPage,
|
|
204
|
-
tbodyTrClass,
|
|
205
|
-
tbodyTrAttr,
|
|
206
|
-
hasSelectableRowClick
|
|
207
|
-
} = safeVueInstance(this);
|
|
187
|
+
const _safeVueInstance = safeVueInstance(this),
|
|
188
|
+
fields = _safeVueInstance.computedFields,
|
|
189
|
+
striped = _safeVueInstance.striped,
|
|
190
|
+
primaryKey = _safeVueInstance.primaryKey,
|
|
191
|
+
currentPage = _safeVueInstance.currentPage,
|
|
192
|
+
perPage = _safeVueInstance.perPage,
|
|
193
|
+
tbodyTrClass = _safeVueInstance.tbodyTrClass,
|
|
194
|
+
tbodyTrAttr = _safeVueInstance.tbodyTrAttr,
|
|
195
|
+
hasSelectableRowClick = _safeVueInstance.hasSelectableRowClick;
|
|
208
196
|
const h = this.$createElement;
|
|
209
197
|
const hasDetailsSlot = this.hasNormalizedSlot(SLOT_NAME_ROW_DETAILS);
|
|
210
198
|
const rowShowDetails = item[FIELD_KEY_SHOW_DETAILS] && hasDetailsSlot;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { extend } from '../../../vue';
|
|
2
2
|
import { EVENT_NAME_ROW_CLICKED, EVENT_NAME_ROW_MIDDLE_CLICKED, EVENT_NAME_ROW_CONTEXTMENU, EVENT_NAME_ROW_DBLCLICKED } from '../../../constants/events';
|
|
3
3
|
import { CODE_ENTER, CODE_SPACE, CODE_UP, CODE_DOWN, CODE_HOME, CODE_END } from '../../../constants/key-codes';
|
|
4
|
-
import { PROP_TYPE_ARRAY, PROP_TYPE_OBJECT, PROP_TYPE_STRING } from '../../../constants/props';
|
|
5
4
|
import { from } from '../../../utils/array';
|
|
6
5
|
import { isElement, closest, isActiveElement, attemptFocus } from '../../../utils/dom';
|
|
7
6
|
import { safeVueInstance } from '../../../utils/safe-vue-instance';
|
|
@@ -23,7 +22,7 @@ const props = sortKeys({
|
|
|
23
22
|
...props$1,
|
|
24
23
|
...props$2,
|
|
25
24
|
tbodyClass: {
|
|
26
|
-
type: [
|
|
25
|
+
type: [Array, Object, String],
|
|
27
26
|
required: false,
|
|
28
27
|
default: undefined
|
|
29
28
|
}
|
|
@@ -44,9 +43,7 @@ const tbodyMixin = extend({
|
|
|
44
43
|
// Rows should all be `<b-tr>` components, but we map to TR elements
|
|
45
44
|
// Also note that `this.$refs['item-rows']` may not always be in document order
|
|
46
45
|
getTbodyTrs() {
|
|
47
|
-
const
|
|
48
|
-
$refs
|
|
49
|
-
} = this;
|
|
46
|
+
const $refs = this.$refs;
|
|
50
47
|
const tbody = $refs.tbody ? $refs.tbody.$el || $refs.tbody : null;
|
|
51
48
|
const trs = ($refs['item-rows'] || []).map(tr => tr.$el || tr);
|
|
52
49
|
return tbody && tbody.children && tbody.children.length > 0 && trs && trs.length > 0 ? from(tbody.children).filter(tr => trs.includes(tr)) : /* istanbul ignore next */[];
|
|
@@ -84,10 +81,8 @@ const tbodyMixin = extend({
|
|
|
84
81
|
// Delegated row event handlers
|
|
85
82
|
onTbodyRowKeydown(event) {
|
|
86
83
|
// Keyboard navigation and row click emulation
|
|
87
|
-
const
|
|
88
|
-
|
|
89
|
-
keyCode
|
|
90
|
-
} = event;
|
|
84
|
+
const target = event.target,
|
|
85
|
+
keyCode = event.keyCode;
|
|
91
86
|
if (this.tbodyRowEventStopped(event) || target.tagName !== 'TR' || !isActiveElement(target) || target.tabIndex !== 0) {
|
|
92
87
|
// Early exit if not an item row TR
|
|
93
88
|
return;
|
|
@@ -120,9 +115,7 @@ const tbodyMixin = extend({
|
|
|
120
115
|
}
|
|
121
116
|
},
|
|
122
117
|
onTBodyRowClicked(event) {
|
|
123
|
-
const
|
|
124
|
-
$refs
|
|
125
|
-
} = this;
|
|
118
|
+
const $refs = this.$refs;
|
|
126
119
|
const tbody = $refs.tbody ? $refs.tbody.$el || $refs.tbody : null;
|
|
127
120
|
// Don't emit event when the table is busy, the user clicked
|
|
128
121
|
// on a non-disabled control or is selecting text
|
|
@@ -151,14 +144,13 @@ const tbodyMixin = extend({
|
|
|
151
144
|
// Row hover handlers are handled by the tbody-row mixin
|
|
152
145
|
// As mouseenter/mouseleave events do not bubble
|
|
153
146
|
renderTbody() {
|
|
154
|
-
const
|
|
155
|
-
computedItems
|
|
156
|
-
renderBusy,
|
|
157
|
-
renderTopRow,
|
|
158
|
-
renderEmpty,
|
|
159
|
-
renderBottomRow,
|
|
160
|
-
hasSelectableRowClick
|
|
161
|
-
} = safeVueInstance(this);
|
|
147
|
+
const _safeVueInstance = safeVueInstance(this),
|
|
148
|
+
items = _safeVueInstance.computedItems,
|
|
149
|
+
renderBusy = _safeVueInstance.renderBusy,
|
|
150
|
+
renderTopRow = _safeVueInstance.renderTopRow,
|
|
151
|
+
renderEmpty = _safeVueInstance.renderEmpty,
|
|
152
|
+
renderBottomRow = _safeVueInstance.renderBottomRow,
|
|
153
|
+
hasSelectableRowClick = _safeVueInstance.hasSelectableRowClick;
|
|
162
154
|
const h = this.$createElement;
|
|
163
155
|
const hasRowClickHandler = this.hasListener(EVENT_NAME_ROW_CLICKED) || hasSelectableRowClick;
|
|
164
156
|
|
|
@@ -181,9 +173,7 @@ const tbodyMixin = extend({
|
|
|
181
173
|
let defaultSlotName = getCellSlotName();
|
|
182
174
|
defaultSlotName = this.hasNormalizedSlot(defaultSlotName) ? defaultSlotName : null;
|
|
183
175
|
this.computedFields.forEach(field => {
|
|
184
|
-
const
|
|
185
|
-
key
|
|
186
|
-
} = field;
|
|
176
|
+
const key = field.key;
|
|
187
177
|
const slotName = getCellSlotName(key);
|
|
188
178
|
const lowercaseSlotName = getCellSlotName(key.toLowerCase());
|
|
189
179
|
cache[key] = this.hasNormalizedSlot(slotName) ? slotName : this.hasNormalizedSlot(lowercaseSlotName) ? /* istanbul ignore next */lowercaseSlotName : defaultSlotName;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { extend } from '../../../vue';
|
|
2
|
-
import { PROP_TYPE_BOOLEAN, PROP_TYPE_STRING, PROP_TYPE_ARRAY, PROP_TYPE_OBJECT } from '../../../constants/props';
|
|
3
2
|
import { SLOT_NAME_CUSTOM_FOOT } from '../../../constants/slots';
|
|
4
3
|
import { BTfoot } from '../tfoot';
|
|
5
4
|
|
|
@@ -7,30 +6,30 @@ import { BTfoot } from '../tfoot';
|
|
|
7
6
|
|
|
8
7
|
const props = {
|
|
9
8
|
footClone: {
|
|
10
|
-
type:
|
|
9
|
+
type: Boolean,
|
|
11
10
|
required: false,
|
|
12
11
|
default: false
|
|
13
12
|
},
|
|
14
13
|
// Any Bootstrap theme variant (or custom)
|
|
15
14
|
// Falls back to `headRowVariant`
|
|
16
15
|
footRowVariant: {
|
|
17
|
-
type:
|
|
16
|
+
type: String,
|
|
18
17
|
required: false,
|
|
19
18
|
default: undefined
|
|
20
19
|
},
|
|
21
20
|
// 'dark', 'light', or `null` (or custom)
|
|
22
21
|
footVariant: {
|
|
23
|
-
type:
|
|
22
|
+
type: String,
|
|
24
23
|
required: false,
|
|
25
24
|
default: undefined
|
|
26
25
|
},
|
|
27
26
|
tfootClass: {
|
|
28
|
-
type: [
|
|
27
|
+
type: [Array, Object, String],
|
|
29
28
|
required: false,
|
|
30
29
|
default: undefined
|
|
31
30
|
},
|
|
32
31
|
tfootTrClass: {
|
|
33
|
-
type: [
|
|
32
|
+
type: [Array, Object, String],
|
|
34
33
|
required: false,
|
|
35
34
|
default: undefined
|
|
36
35
|
}
|