@gitlab/ui 132.1.0 → 132.2.1
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 +37 -21
- 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 +25 -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 +9 -7
- 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 +14 -20
- 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,7 +1,6 @@
|
|
|
1
1
|
import { extend } from '../../../vue';
|
|
2
2
|
import { EVENT_NAME_HEAD_CLICKED } from '../../../constants/events';
|
|
3
3
|
import { CODE_ENTER, CODE_SPACE } from '../../../constants/key-codes';
|
|
4
|
-
import { PROP_TYPE_STRING, PROP_TYPE_ARRAY, PROP_TYPE_OBJECT } from '../../../constants/props';
|
|
5
4
|
import { SLOT_NAME_THEAD_TOP } from '../../../constants/slots';
|
|
6
5
|
import { stopEvent } from '../../../utils/events';
|
|
7
6
|
import { htmlOrText } from '../../../utils/html';
|
|
@@ -27,23 +26,23 @@ const getFootSlotName = value => `foot(${value || ''})`;
|
|
|
27
26
|
const props = {
|
|
28
27
|
// Any Bootstrap theme variant (or custom)
|
|
29
28
|
headRowVariant: {
|
|
30
|
-
type:
|
|
29
|
+
type: String,
|
|
31
30
|
required: false,
|
|
32
31
|
default: undefined
|
|
33
32
|
},
|
|
34
33
|
// 'light', 'dark' or `null` (or custom)
|
|
35
34
|
headVariant: {
|
|
36
|
-
type:
|
|
35
|
+
type: String,
|
|
37
36
|
required: false,
|
|
38
37
|
default: undefined
|
|
39
38
|
},
|
|
40
39
|
theadClass: {
|
|
41
|
-
type: [
|
|
40
|
+
type: [Array, Object, String],
|
|
42
41
|
required: false,
|
|
43
42
|
default: undefined
|
|
44
43
|
},
|
|
45
44
|
theadTrClass: {
|
|
46
|
-
type: [
|
|
45
|
+
type: [Array, Object, String],
|
|
47
46
|
required: false,
|
|
48
47
|
default: undefined
|
|
49
48
|
}
|
|
@@ -80,15 +79,14 @@ const theadMixin = extend({
|
|
|
80
79
|
},
|
|
81
80
|
renderThead() {
|
|
82
81
|
let isFoot = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
83
|
-
const
|
|
84
|
-
computedFields
|
|
85
|
-
isSortable,
|
|
86
|
-
isSelectable,
|
|
87
|
-
headVariant,
|
|
88
|
-
footVariant,
|
|
89
|
-
headRowVariant,
|
|
90
|
-
footRowVariant
|
|
91
|
-
} = safeVueInstance(this);
|
|
82
|
+
const _safeVueInstance = safeVueInstance(this),
|
|
83
|
+
fields = _safeVueInstance.computedFields,
|
|
84
|
+
isSortable = _safeVueInstance.isSortable,
|
|
85
|
+
isSelectable = _safeVueInstance.isSelectable,
|
|
86
|
+
headVariant = _safeVueInstance.headVariant,
|
|
87
|
+
footVariant = _safeVueInstance.footVariant,
|
|
88
|
+
headRowVariant = _safeVueInstance.headRowVariant,
|
|
89
|
+
footRowVariant = _safeVueInstance.footRowVariant;
|
|
92
90
|
const h = this.$createElement;
|
|
93
91
|
|
|
94
92
|
// In always stacked mode, we don't bother rendering the head/foot
|
|
@@ -104,13 +102,11 @@ const theadMixin = extend({
|
|
|
104
102
|
|
|
105
103
|
// Helper function to generate a field <th> cell
|
|
106
104
|
const makeCell = (field, colIndex) => {
|
|
107
|
-
const
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
key
|
|
113
|
-
} = field;
|
|
105
|
+
const label = field.label,
|
|
106
|
+
labelHtml = field.labelHtml,
|
|
107
|
+
variant = field.variant,
|
|
108
|
+
stickyColumn = field.stickyColumn,
|
|
109
|
+
key = field.key;
|
|
114
110
|
let ariaLabel = null;
|
|
115
111
|
if (!field.label.trim() && !field.headerTitle) {
|
|
116
112
|
// In case field's label and title are empty/blank
|
|
@@ -13,12 +13,10 @@ const props = {};
|
|
|
13
13
|
const topRowMixin = extend({
|
|
14
14
|
methods: {
|
|
15
15
|
renderTopRow() {
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
tbodyTrAttr
|
|
21
|
-
} = this;
|
|
16
|
+
const fields = this.computedFields,
|
|
17
|
+
stacked = this.stacked,
|
|
18
|
+
tbodyTrClass = this.tbodyTrClass,
|
|
19
|
+
tbodyTrAttr = this.tbodyTrAttr;
|
|
22
20
|
const h = this.$createElement;
|
|
23
21
|
|
|
24
22
|
// Add static Top Row slot (hidden in visibly stacked mode as we can't control the data-label)
|
|
@@ -10,9 +10,7 @@ const sanitizeRow = function (row, ignoreFields, includeFields) {
|
|
|
10
10
|
// exist in the row itself
|
|
11
11
|
const formattedRow = keys(fieldsObj).reduce((result, key) => {
|
|
12
12
|
const field = fieldsObj[key];
|
|
13
|
-
const
|
|
14
|
-
filterByFormatted
|
|
15
|
-
} = field;
|
|
13
|
+
const filterByFormatted = field.filterByFormatted;
|
|
16
14
|
const formatter = isFunction(filterByFormatted) ? /* istanbul ignore next */filterByFormatted : filterByFormatted ? /* istanbul ignore next */field.formatter : null;
|
|
17
15
|
if (isFunction(formatter)) {
|
|
18
16
|
result[key] = formatter(row[key], key, row);
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { extend } from '../../vue';
|
|
2
2
|
import { NAME_TBODY } from '../../constants/components';
|
|
3
|
-
import { PROP_TYPE_OBJECT } from '../../constants/props';
|
|
4
3
|
import { attrsMixin } from '../../mixins/attrs';
|
|
5
4
|
import { listenersMixin } from '../../mixins/listeners';
|
|
6
5
|
import { normalizeSlotMixin } from '../../mixins/normalize-slot';
|
|
@@ -9,12 +8,12 @@ import { normalizeSlotMixin } from '../../mixins/normalize-slot';
|
|
|
9
8
|
|
|
10
9
|
const props = {
|
|
11
10
|
tbodyTransitionHandlers: {
|
|
12
|
-
type:
|
|
11
|
+
type: Object,
|
|
13
12
|
required: false,
|
|
14
13
|
default: undefined
|
|
15
14
|
},
|
|
16
15
|
tbodyTransitionProps: {
|
|
17
|
-
type:
|
|
16
|
+
type: Object,
|
|
18
17
|
required: false,
|
|
19
18
|
default: undefined
|
|
20
19
|
}
|
|
@@ -87,9 +86,7 @@ const BTbody = /*#__PURE__*/extend({
|
|
|
87
86
|
};
|
|
88
87
|
},
|
|
89
88
|
tbodyProps() {
|
|
90
|
-
const
|
|
91
|
-
tbodyTransitionProps
|
|
92
|
-
} = this;
|
|
89
|
+
const tbodyTransitionProps = this.tbodyTransitionProps;
|
|
93
90
|
return tbodyTransitionProps ? {
|
|
94
91
|
...tbodyTransitionProps,
|
|
95
92
|
tag: 'tbody'
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { extend } from '../../vue';
|
|
2
2
|
import { NAME_TABLE_CELL } from '../../constants/components';
|
|
3
|
-
import { PROP_TYPE_NUMBER, PROP_TYPE_STRING, PROP_TYPE_BOOLEAN } from '../../constants/props';
|
|
4
3
|
import { isTag } from '../../utils/dom';
|
|
5
4
|
import { isUndefinedOrNull } from '../../utils/inspect';
|
|
6
5
|
import { toInteger } from '../../utils/number';
|
|
@@ -24,29 +23,29 @@ const spanValidator = value => isUndefinedOrNull(value) || parseSpan(value) > 0;
|
|
|
24
23
|
|
|
25
24
|
const props = {
|
|
26
25
|
colspan: {
|
|
27
|
-
type: [
|
|
26
|
+
type: [Number, String],
|
|
28
27
|
required: false,
|
|
29
28
|
default: null,
|
|
30
29
|
validator: spanValidator
|
|
31
30
|
},
|
|
32
31
|
rowspan: {
|
|
33
|
-
type: [
|
|
32
|
+
type: [Number, String],
|
|
34
33
|
required: false,
|
|
35
34
|
default: null,
|
|
36
35
|
validator: spanValidator
|
|
37
36
|
},
|
|
38
37
|
stackedHeading: {
|
|
39
|
-
type:
|
|
38
|
+
type: String,
|
|
40
39
|
required: false,
|
|
41
40
|
default: undefined
|
|
42
41
|
},
|
|
43
42
|
stickyColumn: {
|
|
44
|
-
type:
|
|
43
|
+
type: Boolean,
|
|
45
44
|
required: false,
|
|
46
45
|
default: false
|
|
47
46
|
},
|
|
48
47
|
variant: {
|
|
49
|
-
type:
|
|
48
|
+
type: String,
|
|
50
49
|
required: false,
|
|
51
50
|
default: undefined
|
|
52
51
|
}
|
|
@@ -139,11 +138,9 @@ const BTd = /*#__PURE__*/extend({
|
|
|
139
138
|
// We use computed props here for improved performance by caching
|
|
140
139
|
// the results of the string interpolation
|
|
141
140
|
cellClasses() {
|
|
142
|
-
let
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
isStickyColumn
|
|
146
|
-
} = this;
|
|
141
|
+
let variant = this.variant,
|
|
142
|
+
headVariant = this.headVariant,
|
|
143
|
+
isStickyColumn = this.isStickyColumn;
|
|
147
144
|
if (!variant && this.isStickyHeader && !headVariant || !variant && isStickyColumn && this.inTfoot && !this.footVariant || !variant && isStickyColumn && this.inThead && !headVariant || !variant && isStickyColumn && this.inTbody) {
|
|
148
145
|
// Needed for sticky-header mode as Bootstrap v4 table cells do
|
|
149
146
|
// not inherit parent's `background-color`
|
|
@@ -152,9 +149,7 @@ const BTd = /*#__PURE__*/extend({
|
|
|
152
149
|
return [variant ? `${this.isDark ? 'bg' : 'table'}-${variant}` : null, isStickyColumn ? 'b-table-sticky-column' : null];
|
|
153
150
|
},
|
|
154
151
|
cellAttrs() {
|
|
155
|
-
const
|
|
156
|
-
stackedHeading
|
|
157
|
-
} = this;
|
|
152
|
+
const stackedHeading = this.stackedHeading;
|
|
158
153
|
|
|
159
154
|
// We use computed props here for improved performance by caching
|
|
160
155
|
// the results of the object spread (Object.assign)
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { extend } from '../../vue';
|
|
2
2
|
import { NAME_TFOOT } from '../../constants/components';
|
|
3
|
-
import { PROP_TYPE_STRING } from '../../constants/props';
|
|
4
3
|
import { attrsMixin } from '../../mixins/attrs';
|
|
5
4
|
import { listenersMixin } from '../../mixins/listeners';
|
|
6
5
|
import { normalizeSlotMixin } from '../../mixins/normalize-slot';
|
|
@@ -10,7 +9,7 @@ import { normalizeSlotMixin } from '../../mixins/normalize-slot';
|
|
|
10
9
|
const props = {
|
|
11
10
|
// Supported values: 'lite', 'dark', or null
|
|
12
11
|
footVariant: {
|
|
13
|
-
type:
|
|
12
|
+
type: String,
|
|
14
13
|
required: false,
|
|
15
14
|
default: undefined
|
|
16
15
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { extend } from '../../vue';
|
|
2
2
|
import { NAME_THEAD } from '../../constants/components';
|
|
3
|
-
import { PROP_TYPE_STRING } from '../../constants/props';
|
|
4
3
|
import { attrsMixin } from '../../mixins/attrs';
|
|
5
4
|
import { listenersMixin } from '../../mixins/listeners';
|
|
6
5
|
import { normalizeSlotMixin } from '../../mixins/normalize-slot';
|
|
@@ -11,7 +10,7 @@ const props = {
|
|
|
11
10
|
// Also sniffed by `<b-tr>` / `<b-td>` / `<b-th>`
|
|
12
11
|
// Supported values: 'lite', 'dark', or `null`
|
|
13
12
|
headVariant: {
|
|
14
|
-
type:
|
|
13
|
+
type: String,
|
|
15
14
|
required: false,
|
|
16
15
|
default: undefined
|
|
17
16
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { extend } from '../../vue';
|
|
2
2
|
import { NAME_TR } from '../../constants/components';
|
|
3
|
-
import { PROP_TYPE_STRING } from '../../constants/props';
|
|
4
3
|
import { attrsMixin } from '../../mixins/attrs';
|
|
5
4
|
import { listenersMixin } from '../../mixins/listeners';
|
|
6
5
|
import { normalizeSlotMixin } from '../../mixins/normalize-slot';
|
|
@@ -14,7 +13,7 @@ const DARK = 'dark';
|
|
|
14
13
|
|
|
15
14
|
const props = {
|
|
16
15
|
variant: {
|
|
17
|
-
type:
|
|
16
|
+
type: String,
|
|
18
17
|
required: false,
|
|
19
18
|
default: undefined
|
|
20
19
|
}
|
|
@@ -96,9 +95,7 @@ const BTr = /*#__PURE__*/extend({
|
|
|
96
95
|
return this.headVariant === LIGHT || this.footVariant === LIGHT ? /* istanbul ignore next */false : this.headVariant === DARK || this.footVariant === DARK ? /* istanbul ignore next */true : this.isDark;
|
|
97
96
|
},
|
|
98
97
|
trClasses() {
|
|
99
|
-
const
|
|
100
|
-
variant
|
|
101
|
-
} = this;
|
|
98
|
+
const variant = this.variant;
|
|
102
99
|
return [variant ? `${this.isRowDark ? 'bg' : 'table'}-${variant}` : null];
|
|
103
100
|
},
|
|
104
101
|
trAttrs() {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { extend } from '../../vue';
|
|
2
2
|
import { NAME_TAB } from '../../constants/components';
|
|
3
3
|
import { MODEL_EVENT_NAME_PREFIX } from '../../constants/events';
|
|
4
|
-
import { PROP_TYPE_BOOLEAN, PROP_TYPE_STRING, PROP_TYPE_ARRAY, PROP_TYPE_OBJECT } from '../../constants/props';
|
|
5
4
|
import { SLOT_NAME_TITLE } from '../../constants/slots';
|
|
6
5
|
import { sortKeys } from '../../utils/object';
|
|
7
6
|
import { props as props$1, idMixin } from '../../mixins/id';
|
|
@@ -18,54 +17,54 @@ const MODEL_EVENT_NAME_ACTIVE = MODEL_EVENT_NAME_PREFIX + MODEL_PROP_NAME_ACTIVE
|
|
|
18
17
|
const props = sortKeys({
|
|
19
18
|
...props$1,
|
|
20
19
|
[MODEL_PROP_NAME_ACTIVE]: {
|
|
21
|
-
type:
|
|
20
|
+
type: Boolean,
|
|
22
21
|
required: false,
|
|
23
22
|
default: false
|
|
24
23
|
},
|
|
25
24
|
buttonId: {
|
|
26
|
-
type:
|
|
25
|
+
type: String,
|
|
27
26
|
required: false,
|
|
28
27
|
default: undefined
|
|
29
28
|
},
|
|
30
29
|
disabled: {
|
|
31
|
-
type:
|
|
30
|
+
type: Boolean,
|
|
32
31
|
required: false,
|
|
33
32
|
default: false
|
|
34
33
|
},
|
|
35
34
|
lazy: {
|
|
36
|
-
type:
|
|
35
|
+
type: Boolean,
|
|
37
36
|
required: false,
|
|
38
37
|
default: false
|
|
39
38
|
},
|
|
40
39
|
noBody: {
|
|
41
|
-
type:
|
|
40
|
+
type: Boolean,
|
|
42
41
|
required: false,
|
|
43
42
|
default: false
|
|
44
43
|
},
|
|
45
44
|
tag: {
|
|
46
|
-
type:
|
|
45
|
+
type: String,
|
|
47
46
|
required: false,
|
|
48
47
|
default: 'div'
|
|
49
48
|
},
|
|
50
49
|
title: {
|
|
51
|
-
type:
|
|
50
|
+
type: String,
|
|
52
51
|
required: false,
|
|
53
52
|
default: undefined
|
|
54
53
|
},
|
|
55
54
|
// Sniffed by `<b-tabs>` and added to nav `li.nav-item`
|
|
56
55
|
titleItemClass: {
|
|
57
|
-
type: [
|
|
56
|
+
type: [Array, Object, String],
|
|
58
57
|
required: false,
|
|
59
58
|
default: undefined
|
|
60
59
|
},
|
|
61
60
|
titleLinkAttributes: {
|
|
62
|
-
type:
|
|
61
|
+
type: Object,
|
|
63
62
|
required: false,
|
|
64
63
|
default: undefined
|
|
65
64
|
},
|
|
66
65
|
// Sniffed by `<b-tabs>` and added to nav `a.nav-link`
|
|
67
66
|
titleLinkClass: {
|
|
68
|
-
type: [
|
|
67
|
+
type: [Array, Object, String],
|
|
69
68
|
required: false,
|
|
70
69
|
default: undefined
|
|
71
70
|
}
|
|
@@ -97,10 +96,8 @@ const BTab = /*#__PURE__*/extend({
|
|
|
97
96
|
return true;
|
|
98
97
|
},
|
|
99
98
|
tabClasses() {
|
|
100
|
-
const
|
|
101
|
-
|
|
102
|
-
disabled
|
|
103
|
-
} = this;
|
|
99
|
+
const active = this.localActive,
|
|
100
|
+
disabled = this.disabled;
|
|
104
101
|
return [{
|
|
105
102
|
active,
|
|
106
103
|
disabled,
|
|
@@ -137,9 +134,7 @@ const BTab = /*#__PURE__*/extend({
|
|
|
137
134
|
},
|
|
138
135
|
disabled(newValue, oldValue) {
|
|
139
136
|
if (newValue !== oldValue) {
|
|
140
|
-
const
|
|
141
|
-
firstTab
|
|
142
|
-
} = this.bvTabs;
|
|
137
|
+
const firstTab = this.bvTabs.firstTab;
|
|
143
138
|
if (newValue && this.localActive && firstTab) {
|
|
144
139
|
this.localActive = false;
|
|
145
140
|
firstTab();
|
|
@@ -158,9 +153,7 @@ const BTab = /*#__PURE__*/extend({
|
|
|
158
153
|
updated() {
|
|
159
154
|
// Force the tab button content to update (since slots are not reactive)
|
|
160
155
|
// Only done if we have a title slot, as the title prop is reactive
|
|
161
|
-
const
|
|
162
|
-
updateButton
|
|
163
|
-
} = this.bvTabs;
|
|
156
|
+
const updateButton = this.bvTabs.updateButton;
|
|
164
157
|
if (updateButton && this.hasNormalizedSlot(SLOT_NAME_TITLE)) {
|
|
165
158
|
updateButton(this);
|
|
166
159
|
}
|
|
@@ -173,18 +166,14 @@ const BTab = /*#__PURE__*/extend({
|
|
|
173
166
|
// Private methods
|
|
174
167
|
registerTab() {
|
|
175
168
|
// Inform `<b-tabs>` of our presence
|
|
176
|
-
const
|
|
177
|
-
registerTab
|
|
178
|
-
} = this.bvTabs;
|
|
169
|
+
const registerTab = this.bvTabs.registerTab;
|
|
179
170
|
if (registerTab) {
|
|
180
171
|
registerTab(this);
|
|
181
172
|
}
|
|
182
173
|
},
|
|
183
174
|
unregisterTab() {
|
|
184
175
|
// Inform `<b-tabs>` of our departure
|
|
185
|
-
const
|
|
186
|
-
unregisterTab
|
|
187
|
-
} = this.bvTabs;
|
|
176
|
+
const unregisterTab = this.bvTabs.unregisterTab;
|
|
188
177
|
if (unregisterTab) {
|
|
189
178
|
unregisterTab(this);
|
|
190
179
|
}
|
|
@@ -192,23 +181,17 @@ const BTab = /*#__PURE__*/extend({
|
|
|
192
181
|
// Public methods
|
|
193
182
|
activate() {
|
|
194
183
|
// Not inside a `<b-tabs>` component or tab is disabled
|
|
195
|
-
const
|
|
196
|
-
activateTab
|
|
197
|
-
} = this.bvTabs;
|
|
184
|
+
const activateTab = this.bvTabs.activateTab;
|
|
198
185
|
return activateTab && !this.disabled ? activateTab(this) : false;
|
|
199
186
|
},
|
|
200
187
|
deactivate() {
|
|
201
188
|
// Not inside a `<b-tabs>` component or not active to begin with
|
|
202
|
-
const
|
|
203
|
-
deactivateTab
|
|
204
|
-
} = this.bvTabs;
|
|
189
|
+
const deactivateTab = this.bvTabs.deactivateTab;
|
|
205
190
|
return deactivateTab && this.localActive ? deactivateTab(this) : false;
|
|
206
191
|
}
|
|
207
192
|
},
|
|
208
193
|
render(h) {
|
|
209
|
-
const
|
|
210
|
-
localActive
|
|
211
|
-
} = this;
|
|
194
|
+
const localActive = this.localActive;
|
|
212
195
|
const $content = h(this.tag, {
|
|
213
196
|
staticClass: 'tab-pane',
|
|
214
197
|
class: this.tabClasses,
|