@gitlab/ui 132.1.0 → 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 +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
|
@@ -10,6 +10,76 @@ import DropdownContainer from './dropdown_container';
|
|
|
10
10
|
import { DEFAULT_OFFSET, FIXED_WIDTH_CLASS, ARROW_X_MINIMUM } from './constants';
|
|
11
11
|
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
12
12
|
|
|
13
|
+
function _arrayLikeToArray(r, a) {
|
|
14
|
+
(null == a || a > r.length) && (a = r.length);
|
|
15
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
16
|
+
return n;
|
|
17
|
+
}
|
|
18
|
+
function _arrayWithHoles(r) {
|
|
19
|
+
if (Array.isArray(r)) return r;
|
|
20
|
+
}
|
|
21
|
+
function _iterableToArrayLimit(r, l) {
|
|
22
|
+
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
23
|
+
if (null != t) {
|
|
24
|
+
var e,
|
|
25
|
+
n,
|
|
26
|
+
i,
|
|
27
|
+
u,
|
|
28
|
+
a = [],
|
|
29
|
+
f = !0,
|
|
30
|
+
o = !1;
|
|
31
|
+
try {
|
|
32
|
+
if (i = (t = t.call(r)).next, 0 === l) {
|
|
33
|
+
if (Object(t) !== t) return;
|
|
34
|
+
f = !1;
|
|
35
|
+
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
36
|
+
} catch (r) {
|
|
37
|
+
o = !0, n = r;
|
|
38
|
+
} finally {
|
|
39
|
+
try {
|
|
40
|
+
if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
|
|
41
|
+
} finally {
|
|
42
|
+
if (o) throw n;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
return a;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
function _nonIterableRest() {
|
|
49
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
50
|
+
}
|
|
51
|
+
function _objectWithoutProperties(e, t) {
|
|
52
|
+
if (null == e) return {};
|
|
53
|
+
var o,
|
|
54
|
+
r,
|
|
55
|
+
i = _objectWithoutPropertiesLoose(e, t);
|
|
56
|
+
if (Object.getOwnPropertySymbols) {
|
|
57
|
+
var n = Object.getOwnPropertySymbols(e);
|
|
58
|
+
for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
|
59
|
+
}
|
|
60
|
+
return i;
|
|
61
|
+
}
|
|
62
|
+
function _objectWithoutPropertiesLoose(r, e) {
|
|
63
|
+
if (null == r) return {};
|
|
64
|
+
var t = {};
|
|
65
|
+
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
66
|
+
if (-1 !== e.indexOf(n)) continue;
|
|
67
|
+
t[n] = r[n];
|
|
68
|
+
}
|
|
69
|
+
return t;
|
|
70
|
+
}
|
|
71
|
+
function _slicedToArray(r, e) {
|
|
72
|
+
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
|
|
73
|
+
}
|
|
74
|
+
function _unsupportedIterableToArray(r, a) {
|
|
75
|
+
if (r) {
|
|
76
|
+
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
77
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
78
|
+
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const _excluded = ["listeners", "is"];
|
|
13
83
|
const BASE_DROPDOWN_CLASS = 'gl-new-dropdown';
|
|
14
84
|
const DROPDOWN_CONTAINER_CLASS = 'gl-new-dropdown-container';
|
|
15
85
|
var script = {
|
|
@@ -380,11 +450,10 @@ var script = {
|
|
|
380
450
|
return this.toggleOptions.listeners;
|
|
381
451
|
},
|
|
382
452
|
toggleAttributes() {
|
|
383
|
-
const
|
|
384
|
-
listeners
|
|
385
|
-
is
|
|
386
|
-
|
|
387
|
-
} = this.toggleOptions;
|
|
453
|
+
const _this$toggleOptions = this.toggleOptions;
|
|
454
|
+
_this$toggleOptions.listeners;
|
|
455
|
+
_this$toggleOptions.is;
|
|
456
|
+
const attributes = _objectWithoutProperties(_this$toggleOptions, _excluded);
|
|
388
457
|
return attributes;
|
|
389
458
|
},
|
|
390
459
|
toggleComponent() {
|
|
@@ -408,7 +477,9 @@ var script = {
|
|
|
408
477
|
},
|
|
409
478
|
floatingUIConfig() {
|
|
410
479
|
const placement = dropdownPlacements[this.placement];
|
|
411
|
-
const
|
|
480
|
+
const _placement$split = placement.split('-'),
|
|
481
|
+
_placement$split2 = _slicedToArray(_placement$split, 2),
|
|
482
|
+
alignment = _placement$split2[1];
|
|
412
483
|
return {
|
|
413
484
|
placement,
|
|
414
485
|
strategy: this.positioningStrategy,
|
|
@@ -420,11 +491,9 @@ var script = {
|
|
|
420
491
|
}), size({
|
|
421
492
|
apply: _ref => {
|
|
422
493
|
var _this$nonScrollableCo;
|
|
423
|
-
let
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
elements
|
|
427
|
-
} = _ref;
|
|
494
|
+
let availableWidth = _ref.availableWidth,
|
|
495
|
+
availableHeight = _ref.availableHeight,
|
|
496
|
+
elements = _ref.elements;
|
|
428
497
|
const contentsEl = elements.floating.querySelector(`.${GL_DROPDOWN_CONTENTS_CLASS}`);
|
|
429
498
|
if (!contentsEl) return;
|
|
430
499
|
const contentsAvailableHeight = availableHeight - ((_this$nonScrollableCo = this.nonScrollableContentHeight) !== null && _this$nonScrollableCo !== void 0 ? _this$nonScrollableCo : 0) - DEFAULT_OFFSET;
|
|
@@ -497,18 +566,15 @@ var script = {
|
|
|
497
566
|
* early to prevent a TypeError.
|
|
498
567
|
*/
|
|
499
568
|
if (!this.$refs.content) return;
|
|
500
|
-
const
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
placement
|
|
505
|
-
} = result;
|
|
569
|
+
const x = result.x,
|
|
570
|
+
y = result.y,
|
|
571
|
+
middlewareData = result.middlewareData,
|
|
572
|
+
placement = result.placement;
|
|
506
573
|
|
|
507
574
|
// Get offsets based on actual placement, not requested placement
|
|
508
|
-
const
|
|
509
|
-
rotation,
|
|
510
|
-
staticSide
|
|
511
|
-
} = this.getArrowOffsets(placement);
|
|
575
|
+
const _this$getArrowOffsets = this.getArrowOffsets(placement),
|
|
576
|
+
rotation = _this$getArrowOffsets.rotation,
|
|
577
|
+
staticSide = _this$getArrowOffsets.staticSide;
|
|
512
578
|
|
|
513
579
|
// Assign dropdown window position
|
|
514
580
|
Object.assign(this.$refs.content.style, {
|
|
@@ -518,10 +584,9 @@ var script = {
|
|
|
518
584
|
|
|
519
585
|
// Assign arrow position
|
|
520
586
|
if (middlewareData && middlewareData.arrow) {
|
|
521
|
-
const
|
|
522
|
-
x
|
|
523
|
-
y
|
|
524
|
-
} = middlewareData.arrow;
|
|
587
|
+
const _middlewareData$arrow = middlewareData.arrow,
|
|
588
|
+
arrowX = _middlewareData$arrow.x,
|
|
589
|
+
arrowY = _middlewareData$arrow.y;
|
|
525
590
|
|
|
526
591
|
/**
|
|
527
592
|
* Clamp arrow X position to a minimum of 24px from the edge of the dropdown.
|
|
@@ -623,13 +688,9 @@ var script = {
|
|
|
623
688
|
this.toggleElement.focus();
|
|
624
689
|
},
|
|
625
690
|
onKeydown(event) {
|
|
626
|
-
const
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
target: {
|
|
630
|
-
tagName
|
|
631
|
-
}
|
|
632
|
-
} = event;
|
|
691
|
+
const keyCode = event.keyCode,
|
|
692
|
+
code = event.code,
|
|
693
|
+
tagName = event.target.tagName;
|
|
633
694
|
|
|
634
695
|
// Use keyCode because @vue/test-utils doesn't correctly set the
|
|
635
696
|
// `code` and `key` KeyboardEvent properties. This is only needed in this case because:
|
|
@@ -284,9 +284,7 @@ var script = {
|
|
|
284
284
|
this.nextFocusedItemIndex = null;
|
|
285
285
|
},
|
|
286
286
|
onKeydown(event) {
|
|
287
|
-
const
|
|
288
|
-
code
|
|
289
|
-
} = event;
|
|
287
|
+
const code = event.code;
|
|
290
288
|
const elements = this.getFocusableListItemElements();
|
|
291
289
|
if (elements.length < 1) return;
|
|
292
290
|
let stop = true;
|
|
@@ -313,9 +311,7 @@ var script = {
|
|
|
313
311
|
return filterVisible(Array.from(items || []));
|
|
314
312
|
},
|
|
315
313
|
focusNextItem(event, elements, offset) {
|
|
316
|
-
const
|
|
317
|
-
target
|
|
318
|
-
} = event;
|
|
314
|
+
const target = event.target;
|
|
319
315
|
const currentIndex = elements.indexOf(target);
|
|
320
316
|
const nextIndex = clamp(currentIndex + offset, 0, elements.length - 1);
|
|
321
317
|
this.focusItem(nextIndex, elements);
|
|
@@ -59,9 +59,7 @@ var script = {
|
|
|
59
59
|
return Boolean(this.$scopedSlots.default);
|
|
60
60
|
},
|
|
61
61
|
itemComponent() {
|
|
62
|
-
const
|
|
63
|
-
item
|
|
64
|
-
} = this;
|
|
62
|
+
const item = this.item;
|
|
65
63
|
if (this.isLink) return {
|
|
66
64
|
is: GlLink,
|
|
67
65
|
attrs: {
|
|
@@ -126,9 +124,7 @@ var script = {
|
|
|
126
124
|
},
|
|
127
125
|
methods: {
|
|
128
126
|
onKeydown(event) {
|
|
129
|
-
const
|
|
130
|
-
code
|
|
131
|
-
} = event;
|
|
127
|
+
const code = event.code;
|
|
132
128
|
if (code === ENTER || code === SPACE) {
|
|
133
129
|
if (this.isCustomContent) {
|
|
134
130
|
this.action();
|
|
@@ -439,9 +439,7 @@ var script = {
|
|
|
439
439
|
if (!this.multiple && this.selectedValues.length) {
|
|
440
440
|
var _this$flattenedOption;
|
|
441
441
|
return (_this$flattenedOption = this.flattenedOptions.find(_ref => {
|
|
442
|
-
let
|
|
443
|
-
value
|
|
444
|
-
} = _ref;
|
|
442
|
+
let value = _ref.value;
|
|
445
443
|
return value === this.selectedValues[0];
|
|
446
444
|
})) === null || _this$flattenedOption === void 0 ? void 0 : _this$flattenedOption.text;
|
|
447
445
|
}
|
|
@@ -451,9 +449,7 @@ var script = {
|
|
|
451
449
|
},
|
|
452
450
|
selectedIndices() {
|
|
453
451
|
return this.selectedValues.map(selected => this.flattenedOptions.findIndex(_ref2 => {
|
|
454
|
-
let
|
|
455
|
-
value
|
|
456
|
-
} = _ref2;
|
|
452
|
+
let value = _ref2.value;
|
|
457
453
|
return value === selected;
|
|
458
454
|
})).filter(index => index !== -1).sort();
|
|
459
455
|
},
|
|
@@ -706,10 +702,8 @@ var script = {
|
|
|
706
702
|
this.focusItem(nextIndex, elements, this.searchable);
|
|
707
703
|
},
|
|
708
704
|
onKeydown(event) {
|
|
709
|
-
const
|
|
710
|
-
|
|
711
|
-
target
|
|
712
|
-
} = event;
|
|
705
|
+
const code = event.code,
|
|
706
|
+
target = event.target;
|
|
713
707
|
const elements = this.getFocusableListItemElements();
|
|
714
708
|
if (elements.length < 1) return;
|
|
715
709
|
const isSearchInput = target.matches(SEARCH_INPUT_SELECTOR);
|
|
@@ -772,9 +766,7 @@ var script = {
|
|
|
772
766
|
return Array.from(items || []);
|
|
773
767
|
},
|
|
774
768
|
focusNextItem(event, elements, offset) {
|
|
775
|
-
const
|
|
776
|
-
target
|
|
777
|
-
} = event;
|
|
769
|
+
const target = event.target;
|
|
778
770
|
const currentIndex = elements.indexOf(target);
|
|
779
771
|
const nextIndex = clamp(currentIndex + offset, 0, elements.length - 1);
|
|
780
772
|
this.focusItem(nextIndex, elements);
|
|
@@ -44,9 +44,7 @@ const mockOptions = [{
|
|
|
44
44
|
disabled: true
|
|
45
45
|
}];
|
|
46
46
|
const mockOptionsValues = mockOptions.map(_ref => {
|
|
47
|
-
let
|
|
48
|
-
value
|
|
49
|
-
} = _ref;
|
|
47
|
+
let value = _ref.value;
|
|
50
48
|
return value;
|
|
51
49
|
});
|
|
52
50
|
const mockGroups = [{
|
|
@@ -72,9 +70,7 @@ const mockGroups = [{
|
|
|
72
70
|
}]
|
|
73
71
|
}];
|
|
74
72
|
const mockGroupOptionsValues = mockGroups.map(group => group.options).flat().map(_ref2 => {
|
|
75
|
-
let
|
|
76
|
-
value
|
|
77
|
-
} = _ref2;
|
|
73
|
+
let value = _ref2.value;
|
|
78
74
|
return value;
|
|
79
75
|
});
|
|
80
76
|
const mockGroupsWithTextSrOnly = [{
|
|
@@ -4,9 +4,8 @@ const isOption = item => Boolean(item) && (isString(item.value) || isNumber(item
|
|
|
4
4
|
|
|
5
5
|
// eslint-disable-next-line unicorn/no-array-callback-reference
|
|
6
6
|
const isGroup = function () {
|
|
7
|
-
let {
|
|
8
|
-
options
|
|
9
|
-
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
7
|
+
let _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
8
|
+
options = _ref.options;
|
|
10
9
|
return Array.isArray(options) && options.every(isOption);
|
|
11
10
|
};
|
|
12
11
|
const hasNoDuplicates = array => array.length === new Set(array).size;
|
|
@@ -14,18 +13,14 @@ const flattenedOptions = items => items.flatMap(item => isOption(item) ? item :
|
|
|
14
13
|
|
|
15
14
|
// eslint-disable-next-line unicorn/no-array-callback-reference
|
|
16
15
|
const isAllOptionsOrAllGroups = items => items.every(isOption) || items.every(isGroup);
|
|
17
|
-
const hasUniqueValues = items => hasNoDuplicates(flattenedOptions(items).map(
|
|
18
|
-
let
|
|
19
|
-
value
|
|
20
|
-
} = _ref;
|
|
16
|
+
const hasUniqueValues = items => hasNoDuplicates(flattenedOptions(items).map(_ref2 => {
|
|
17
|
+
let value = _ref2.value;
|
|
21
18
|
return value;
|
|
22
19
|
}));
|
|
23
20
|
|
|
24
21
|
// eslint-disable-next-line unicorn/no-array-callback-reference
|
|
25
|
-
const hasUniqueGroups = items => hasNoDuplicates(items.filter(isGroup).map(
|
|
26
|
-
let
|
|
27
|
-
text
|
|
28
|
-
} = _ref2;
|
|
22
|
+
const hasUniqueGroups = items => hasNoDuplicates(items.filter(isGroup).map(_ref3 => {
|
|
23
|
+
let text = _ref3.text;
|
|
29
24
|
return text;
|
|
30
25
|
}));
|
|
31
26
|
const itemsValidator = items => isAllOptionsOrAllGroups(items) && hasUniqueValues(items) && hasUniqueGroups(items);
|
|
@@ -115,9 +115,7 @@ var script = {
|
|
|
115
115
|
this.$emit('input', value);
|
|
116
116
|
},
|
|
117
117
|
onFocusout(event) {
|
|
118
|
-
const
|
|
119
|
-
relatedTarget
|
|
120
|
-
} = event;
|
|
118
|
+
const relatedTarget = event.relatedTarget;
|
|
121
119
|
if (this.isInputOrClearButton(relatedTarget)) {
|
|
122
120
|
return;
|
|
123
121
|
}
|
|
@@ -129,9 +127,7 @@ var script = {
|
|
|
129
127
|
this.$emit('focusout', event);
|
|
130
128
|
},
|
|
131
129
|
onFocusin(event) {
|
|
132
|
-
const
|
|
133
|
-
relatedTarget
|
|
134
|
-
} = event;
|
|
130
|
+
const relatedTarget = event.relatedTarget;
|
|
135
131
|
if (this.isInputOrClearButton(relatedTarget)) {
|
|
136
132
|
return;
|
|
137
133
|
}
|
|
@@ -74,11 +74,9 @@ var script = {
|
|
|
74
74
|
},
|
|
75
75
|
render(createElement, _ref) {
|
|
76
76
|
var _data$attrs;
|
|
77
|
-
let
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
data
|
|
81
|
-
} = _ref;
|
|
77
|
+
let props = _ref.props,
|
|
78
|
+
slots = _ref.slots,
|
|
79
|
+
data = _ref.data;
|
|
82
80
|
const slotIsSet = () => slots().default;
|
|
83
81
|
const propValueOrDefault = (name, defaultValue) => props[name] !== null ? props[name] : defaultValue;
|
|
84
82
|
const inheritedClasses = data.class || (// Vue 3
|
|
@@ -4,16 +4,34 @@ import GlLoadingIcon from '../loading_icon/loading_icon';
|
|
|
4
4
|
import { glTableLiteWarning, tableFullProps, tableFullSlots } from './constants';
|
|
5
5
|
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
6
6
|
|
|
7
|
+
function _objectWithoutProperties(e, t) {
|
|
8
|
+
if (null == e) return {};
|
|
9
|
+
var o,
|
|
10
|
+
r,
|
|
11
|
+
i = _objectWithoutPropertiesLoose(e, t);
|
|
12
|
+
if (Object.getOwnPropertySymbols) {
|
|
13
|
+
var n = Object.getOwnPropertySymbols(e);
|
|
14
|
+
for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
|
15
|
+
}
|
|
16
|
+
return i;
|
|
17
|
+
}
|
|
18
|
+
function _objectWithoutPropertiesLoose(r, e) {
|
|
19
|
+
if (null == r) return {};
|
|
20
|
+
var t = {};
|
|
21
|
+
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
22
|
+
if (-1 !== e.indexOf(n)) continue;
|
|
23
|
+
t[n] = r[n];
|
|
24
|
+
}
|
|
25
|
+
return t;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const _excluded = ["thAlignRight", "thClass"];
|
|
7
29
|
const shouldUseFullTable = _ref => {
|
|
8
|
-
let
|
|
9
|
-
$
|
|
10
|
-
$scopedSlots
|
|
11
|
-
} = _ref;
|
|
30
|
+
let $attrs = _ref.$attrs,
|
|
31
|
+
$scopedSlots = _ref.$scopedSlots;
|
|
12
32
|
return tableFullProps.some(prop => $attrs[prop] !== undefined) || tableFullSlots.some(slot => $scopedSlots[slot] !== undefined);
|
|
13
33
|
};
|
|
14
|
-
const
|
|
15
|
-
tableClass
|
|
16
|
-
} = BTable.options.props;
|
|
34
|
+
const tableClass = BTable.options.props.tableClass;
|
|
17
35
|
var script = {
|
|
18
36
|
name: 'GlTable',
|
|
19
37
|
components: {
|
|
@@ -89,11 +107,10 @@ var script = {
|
|
|
89
107
|
if (typeof field === 'string') {
|
|
90
108
|
return field;
|
|
91
109
|
}
|
|
92
|
-
const
|
|
93
|
-
|
|
94
|
-
thClass = '',
|
|
95
|
-
|
|
96
|
-
} = field;
|
|
110
|
+
const thAlignRight = field.thAlignRight,
|
|
111
|
+
_field$thClass = field.thClass,
|
|
112
|
+
thClass = _field$thClass === void 0 ? '' : _field$thClass,
|
|
113
|
+
rest = _objectWithoutProperties(field, _excluded);
|
|
97
114
|
const computedThClass = Array.isArray(thClass) ? thClass : thClass.split(' ');
|
|
98
115
|
if (thAlignRight) {
|
|
99
116
|
computedThClass.push('gl-table-th-align-right');
|
|
@@ -117,21 +134,15 @@ var script = {
|
|
|
117
134
|
},
|
|
118
135
|
methods: {
|
|
119
136
|
isSortable(_ref2) {
|
|
120
|
-
let
|
|
121
|
-
field
|
|
122
|
-
} = _ref2;
|
|
137
|
+
let field = _ref2.field;
|
|
123
138
|
return field === null || field === void 0 ? void 0 : field.sortable;
|
|
124
139
|
},
|
|
125
140
|
activeSortingColumn(_ref3) {
|
|
126
|
-
let
|
|
127
|
-
field
|
|
128
|
-
} = _ref3;
|
|
141
|
+
let field = _ref3.field;
|
|
129
142
|
return this.localSortBy === (field === null || field === void 0 ? void 0 : field.key);
|
|
130
143
|
},
|
|
131
144
|
getSortingIcon(_ref4) {
|
|
132
|
-
let
|
|
133
|
-
field
|
|
134
|
-
} = _ref4;
|
|
145
|
+
let field = _ref4.field;
|
|
135
146
|
if (this.activeSortingColumn({
|
|
136
147
|
field
|
|
137
148
|
})) {
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { BTableLite } from '../../../vendor/bootstrap-vue/src/components/table/table-lite';
|
|
2
2
|
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
3
3
|
|
|
4
|
-
const
|
|
5
|
-
tableClass
|
|
6
|
-
} = BTableLite.options.props;
|
|
4
|
+
const tableClass = BTableLite.options.props.tableClass;
|
|
7
5
|
var script = {
|
|
8
6
|
name: 'GlTableLite',
|
|
9
7
|
components: {
|
|
@@ -323,9 +323,7 @@ var script = {
|
|
|
323
323
|
},
|
|
324
324
|
handleContainerClick(event) {
|
|
325
325
|
// Bail if token is clicked
|
|
326
|
-
const
|
|
327
|
-
target
|
|
328
|
-
} = event;
|
|
326
|
+
const target = event.target;
|
|
329
327
|
if ((target === null || target === void 0 ? void 0 : target.closest('.gl-token')) !== null || this.inputFocused) {
|
|
330
328
|
return;
|
|
331
329
|
}
|
|
@@ -394,9 +392,7 @@ var script = {
|
|
|
394
392
|
this.focusTextInput();
|
|
395
393
|
},
|
|
396
394
|
handleAriaInvalid() {
|
|
397
|
-
const
|
|
398
|
-
state
|
|
399
|
-
} = this;
|
|
395
|
+
const state = this.state;
|
|
400
396
|
return state === false ? 'true' : null;
|
|
401
397
|
},
|
|
402
398
|
handleAriaActiveDescendent(value) {
|
|
@@ -267,14 +267,13 @@ var script = {
|
|
|
267
267
|
*/
|
|
268
268
|
onChartDataPointMouseOver(params) {
|
|
269
269
|
if (isDataPointAnnotation(params)) {
|
|
270
|
-
const
|
|
271
|
-
event
|
|
272
|
-
} = params;
|
|
270
|
+
const event = params.event;
|
|
273
271
|
const toolTipFormatter = this.formatAnnotationsTooltipText || this.defaultAnnotationTooltipText;
|
|
274
|
-
const
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
272
|
+
const _toolTipFormatter = toolTipFormatter(params),
|
|
273
|
+
_toolTipFormatter$tit = _toolTipFormatter.title,
|
|
274
|
+
title = _toolTipFormatter$tit === void 0 ? '' : _toolTipFormatter$tit,
|
|
275
|
+
_toolTipFormatter$con = _toolTipFormatter.content,
|
|
276
|
+
content = _toolTipFormatter$con === void 0 ? '' : _toolTipFormatter$con;
|
|
278
277
|
this.showAnnotationsTooltip = true;
|
|
279
278
|
this.annotationsTooltipTitle = title;
|
|
280
279
|
this.annotationsTooltipContent = content;
|
|
@@ -79,11 +79,10 @@ var script = {
|
|
|
79
79
|
},
|
|
80
80
|
barSeries() {
|
|
81
81
|
return this.bars.map((_ref, index) => {
|
|
82
|
-
let
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
stack = CHART_DEFAULT_SERIES_STACK
|
|
86
|
-
} = _ref;
|
|
82
|
+
let name = _ref.name,
|
|
83
|
+
data = _ref.data,
|
|
84
|
+
_ref$stack = _ref.stack,
|
|
85
|
+
stack = _ref$stack === void 0 ? CHART_DEFAULT_SERIES_STACK : _ref$stack;
|
|
87
86
|
const color = colorFromDefaultPalette(index);
|
|
88
87
|
return generateBarSeries({
|
|
89
88
|
name,
|
|
@@ -96,10 +95,8 @@ var script = {
|
|
|
96
95
|
lineSeries() {
|
|
97
96
|
const offset = this.bars.length;
|
|
98
97
|
return this.lines.map((_ref2, index) => {
|
|
99
|
-
let
|
|
100
|
-
|
|
101
|
-
data
|
|
102
|
-
} = _ref2;
|
|
98
|
+
let name = _ref2.name,
|
|
99
|
+
data = _ref2.data;
|
|
103
100
|
const color = colorFromDefaultPalette(offset + index);
|
|
104
101
|
return generateLineSeries({
|
|
105
102
|
name,
|
|
@@ -111,12 +108,11 @@ var script = {
|
|
|
111
108
|
secondarySeries() {
|
|
112
109
|
const offset = this.bars.length + this.lines.length;
|
|
113
110
|
return this.secondaryData.map((_ref3, index) => {
|
|
114
|
-
let
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
stack = CHART_DEFAULT_SERIES_SECONDARY_STACK
|
|
119
|
-
} = _ref3;
|
|
111
|
+
let name = _ref3.name,
|
|
112
|
+
data = _ref3.data,
|
|
113
|
+
type = _ref3.type,
|
|
114
|
+
_ref3$stack = _ref3.stack,
|
|
115
|
+
stack = _ref3$stack === void 0 ? CHART_DEFAULT_SERIES_SECONDARY_STACK : _ref3$stack;
|
|
120
116
|
const color = colorFromDefaultPalette(offset + index);
|
|
121
117
|
return type === CHART_TYPE_LINE ? generateLineSeries({
|
|
122
118
|
color,
|