@gitlab/ui 127.0.0 → 127.1.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.
Files changed (96) hide show
  1. package/dist/components/base/alert/alert.js +0 -2
  2. package/dist/components/base/avatar/avatar.js +0 -2
  3. package/dist/components/base/badge/badge.js +0 -2
  4. package/dist/components/base/breadcrumb/breadcrumb.js +0 -2
  5. package/dist/components/base/button/button.js +0 -2
  6. package/dist/components/base/card/card.js +0 -2
  7. package/dist/components/base/collapse/collapse.js +0 -2
  8. package/dist/components/base/datepicker/datepicker.js +0 -2
  9. package/dist/components/base/drawer/drawer.js +0 -2
  10. package/dist/components/base/filtered_search/filtered_search.js +9 -7
  11. package/dist/components/base/filtered_search/filtered_search_suggestion_list.js +2 -2
  12. package/dist/components/base/filtered_search/filtered_search_token_segment.js +10 -2
  13. package/dist/components/base/filtered_search/filtered_search_utils.js +2 -1
  14. package/dist/components/base/form/form.js +0 -2
  15. package/dist/components/base/icon/icon.js +0 -2
  16. package/dist/components/base/illustration/illustration.js +0 -2
  17. package/dist/components/base/label/label.js +0 -2
  18. package/dist/components/base/link/link.js +0 -2
  19. package/dist/components/base/markdown/markdown.js +0 -2
  20. package/dist/components/base/modal/modal.js +0 -2
  21. package/dist/components/base/new_dropdowns/disclosure/disclosure_dropdown.js +0 -2
  22. package/dist/components/base/new_dropdowns/listbox/listbox.js +0 -2
  23. package/dist/components/base/pagination/pagination.js +1 -3
  24. package/dist/components/base/path/path.js +0 -2
  25. package/dist/components/base/popover/popover.js +0 -2
  26. package/dist/components/base/table/table.js +0 -2
  27. package/dist/components/base/tabs/tab/tab.js +0 -2
  28. package/dist/components/base/tabs/tabs/tabs.js +0 -2
  29. package/dist/components/base/toast/toast.js +2 -1
  30. package/dist/components/base/toggle/toggle.js +0 -2
  31. package/dist/components/base/token/token.js +0 -2
  32. package/dist/components/base/tooltip/tooltip.js +0 -2
  33. package/dist/components/charts/area/area.js +15 -1
  34. package/dist/components/charts/bar/bar.js +0 -3
  35. package/dist/components/charts/chart/chart.js +0 -3
  36. package/dist/components/charts/column/column.js +0 -2
  37. package/dist/components/charts/gauge/gauge.js +0 -2
  38. package/dist/components/charts/heatmap/heatmap.js +0 -2
  39. package/dist/components/charts/legend/legend.js +0 -2
  40. package/dist/components/charts/line/line.js +17 -1
  41. package/dist/components/charts/shared/tooltip/tooltip.js +0 -2
  42. package/dist/components/charts/sparkline/sparkline.js +0 -3
  43. package/dist/components/utilities/intersperse/intersperse.js +0 -2
  44. package/dist/components/utilities/sprintf/sprintf.js +1 -2
  45. package/dist/components/utilities/truncate/truncate.js +0 -2
  46. package/dist/index.css +1 -1
  47. package/dist/index.css.map +1 -1
  48. package/package.json +1 -1
  49. package/src/components/base/alert/alert.vue +0 -1
  50. package/src/components/base/avatar/avatar.vue +0 -1
  51. package/src/components/base/badge/badge.vue +0 -1
  52. package/src/components/base/breadcrumb/breadcrumb.vue +0 -1
  53. package/src/components/base/button/button.vue +0 -1
  54. package/src/components/base/card/card.vue +0 -1
  55. package/src/components/base/collapse/collapse.vue +0 -1
  56. package/src/components/base/datepicker/datepicker.vue +0 -1
  57. package/src/components/base/drawer/drawer.vue +0 -1
  58. package/src/components/base/dropdown/dropdown.vue +1 -1
  59. package/src/components/base/filtered_search/filtered_search.vue +8 -7
  60. package/src/components/base/filtered_search/filtered_search_suggestion_list.vue +2 -2
  61. package/src/components/base/filtered_search/filtered_search_token_segment.vue +15 -2
  62. package/src/components/base/filtered_search/filtered_search_utils.js +2 -0
  63. package/src/components/base/form/form.vue +0 -1
  64. package/src/components/base/icon/icon.vue +0 -1
  65. package/src/components/base/illustration/illustration.vue +0 -1
  66. package/src/components/base/label/label.vue +0 -1
  67. package/src/components/base/link/link.vue +0 -1
  68. package/src/components/base/markdown/markdown.vue +0 -1
  69. package/src/components/base/modal/modal.vue +0 -1
  70. package/src/components/base/new_dropdowns/disclosure/disclosure_dropdown.vue +0 -1
  71. package/src/components/base/new_dropdowns/listbox/listbox.vue +0 -1
  72. package/src/components/base/pagination/pagination.vue +1 -2
  73. package/src/components/base/path/path.vue +0 -1
  74. package/src/components/base/popover/popover.vue +0 -1
  75. package/src/components/base/table/table.vue +0 -1
  76. package/src/components/base/tabs/tab/tab.vue +0 -1
  77. package/src/components/base/tabs/tabs/tabs.vue +0 -1
  78. package/src/components/base/toast/toast.js +1 -0
  79. package/src/components/base/toast/toast.scss +18 -2
  80. package/src/components/base/toggle/toggle.vue +0 -1
  81. package/src/components/base/token/token.vue +0 -1
  82. package/src/components/base/tooltip/tooltip.vue +0 -1
  83. package/src/components/charts/area/area.vue +0 -1
  84. package/src/components/charts/bar/bar.vue +0 -1
  85. package/src/components/charts/chart/chart.vue +0 -1
  86. package/src/components/charts/column/column.vue +0 -1
  87. package/src/components/charts/gauge/gauge.vue +0 -1
  88. package/src/components/charts/heatmap/heatmap.vue +0 -1
  89. package/src/components/charts/legend/legend.vue +0 -1
  90. package/src/components/charts/line/line.vue +0 -1
  91. package/src/components/charts/shared/tooltip/tooltip.vue +0 -1
  92. package/src/components/charts/sparkline/sparkline.vue +0 -1
  93. package/src/components/utilities/intersperse/intersperse.vue +0 -1
  94. package/src/components/utilities/sprintf/sprintf.vue +0 -1
  95. package/src/components/utilities/truncate/truncate.vue +0 -1
  96. package/tailwind.defaults.js +12 -0
@@ -5,8 +5,6 @@ import GlButton from '../button/button';
5
5
  import GlIcon from '../icon/icon';
6
6
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
7
7
 
8
- //
9
-
10
8
  var script = {
11
9
  name: 'GlAlert',
12
10
  components: {
@@ -4,8 +4,6 @@ import { getAvatarChar } from '../../../utils/string_utils';
4
4
  import { avatarSizeValidator } from './utils';
5
5
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
6
6
 
7
- //
8
-
9
7
  const IDENTICON_BG_COUNT = 7;
10
8
  var script = {
11
9
  name: 'GlAvatar',
@@ -4,8 +4,6 @@ import GlIcon from '../icon/icon';
4
4
  import { logWarning } from '../../../utils/utils';
5
5
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
6
6
 
7
- //
8
-
9
7
  const variantClass = {
10
8
  [badgeVariantOptions.neutral]: 'badge-neutral',
11
9
  [badgeVariantOptions.info]: 'badge-info',
@@ -8,8 +8,6 @@ import ClipboardButton from '../../shared_components/clipboard_button/clipboard_
8
8
  import GlBreadcrumbItem from './breadcrumb_item';
9
9
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
10
10
 
11
- //
12
-
13
11
  var script = {
14
12
  name: 'GlBreadcrumb',
15
13
  components: {
@@ -10,8 +10,6 @@ import { SPACE, ENTER } from '../new_dropdowns/constants';
10
10
  import { glButtonConfig } from '../../../config';
11
11
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
12
12
 
13
- //
14
-
15
13
  var script = {
16
14
  name: 'GlButton',
17
15
  components: {
@@ -1,7 +1,5 @@
1
1
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
2
2
 
3
- //
4
-
5
3
  var script = {
6
4
  name: 'GlCard',
7
5
  props: {
@@ -1,7 +1,5 @@
1
1
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
2
2
 
3
- //
4
-
5
3
  var script = {
6
4
  name: 'GlCollapse',
7
5
  model: {
@@ -9,8 +9,6 @@ import GlIcon from '../icon/icon';
9
9
  import { translate } from '../../../utils/i18n';
10
10
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
11
11
 
12
- //
13
-
14
12
  const pad = function (val) {
15
13
  let len = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;
16
14
  return `0${val}`.slice(-len);
@@ -3,8 +3,6 @@ import { maxZIndex, drawerVariants } from '../../../utils/constants';
3
3
  import GlButton from '../button/button';
4
4
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
5
5
 
6
- //
7
-
8
6
  var script = {
9
7
  name: 'GlDrawer',
10
8
  components: {
@@ -6,13 +6,17 @@ import { logWarning } from '../../../utils/utils';
6
6
  import GlIcon from '../icon/icon';
7
7
  import GlSearchBoxByClick from '../search_box_by_click/search_box_by_click';
8
8
  import GlFilteredSearchTerm from './filtered_search_term';
9
- import { termTokenDefinition, isEmptyTerm, createTerm, needDenormalization, denormalizeTokens, INTENT_ACTIVATE_PREVIOUS, ensureTokenId, normalizeTokens } from './filtered_search_utils';
9
+ import { termTokenDefinition, isEmptyTerm, createTerm, INTENT_ACTIVATE_PREVIOUS, ensureTokenId, normalizeTokens, needDenormalization, denormalizeTokens } from './filtered_search_utils';
10
10
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
11
11
 
12
12
  let portalUuid = 0;
13
13
  function initialState() {
14
14
  return [createTerm()];
15
15
  }
16
+ function computeTokens(value, termsAsTokens) {
17
+ const resolved = value !== null && value !== void 0 && value.length ? cloneDeep(value) : initialState();
18
+ return needDenormalization(resolved) ? denormalizeTokens(resolved, termsAsTokens) : resolved;
19
+ }
16
20
  var script = {
17
21
  name: 'GlFilteredSearch',
18
22
  components: {
@@ -167,7 +171,7 @@ var script = {
167
171
  },
168
172
  data() {
169
173
  return {
170
- tokens: initialState(),
174
+ tokens: computeTokens(this.value, this.termsAsTokens),
171
175
  activeTokenIdx: null,
172
176
  suggestionsStyle: {},
173
177
  intendedCursorPosition: 'end'
@@ -229,17 +233,15 @@ var script = {
229
233
  value: {
230
234
  handler(newValue, oldValue) {
231
235
  if (!isEqual(newValue, oldValue)) {
232
- const value = newValue.length ? newValue : initialState();
233
- this.applyNewValue(cloneDeep(value));
236
+ this.applyNewValue(newValue);
234
237
  }
235
238
  },
236
- deep: true,
237
- immediate: true
239
+ deep: true
238
240
  }
239
241
  },
240
242
  methods: {
241
243
  applyNewValue(newValue) {
242
- this.tokens = needDenormalization(newValue) ? denormalizeTokens(newValue, this.termsAsTokens) : newValue;
244
+ this.tokens = computeTokens(newValue, this.termsAsTokens);
243
245
  },
244
246
  isActiveToken(idx) {
245
247
  return this.activeTokenIdx === idx;
@@ -1,4 +1,4 @@
1
- import { stepIndexAndWrap } from './filtered_search_utils';
1
+ import { FILTERED_SEARCH_SUGGESTIONS_CLASS, stepIndexAndWrap } from './filtered_search_utils';
2
2
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
3
3
 
4
4
  const DEFER_TO_INITIAL_VALUE = -1;
@@ -40,7 +40,7 @@ var script = {
40
40
  return this.registeredItems[this.activeIdx];
41
41
  },
42
42
  listClasses() {
43
- return [this.suggestionsListClass(), 'dropdown-menu gl-filtered-search-suggestion-list'];
43
+ return [this.suggestionsListClass(), `dropdown-menu ${FILTERED_SEARCH_SUGGESTIONS_CLASS}`];
44
44
  }
45
45
  },
46
46
  watch: {
@@ -3,7 +3,7 @@ import { Portal } from 'portal-vue';
3
3
  import { LEFT_MOUSE_BUTTON } from '../../../utils/constants';
4
4
  import GlFilteredSearchSuggestion from './filtered_search_suggestion';
5
5
  import GlFilteredSearchSuggestionList from './filtered_search_suggestion_list';
6
- import { TERM_TOKEN_TYPE, splitOnQuotes, match, wrapTokenInQuotes } from './filtered_search_utils';
6
+ import { TERM_TOKEN_TYPE, splitOnQuotes, match, wrapTokenInQuotes, FILTERED_SEARCH_SUGGESTIONS_CLASS } from './filtered_search_utils';
7
7
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
8
8
 
9
9
  // We need some helpers to ensure @vue/compat compatibility
@@ -381,7 +381,15 @@ var script = {
381
381
  applySuggestion: v => this.applySuggestion(v)
382
382
  });
383
383
  },
384
- handleBlur() {
384
+ handleBlur(e) {
385
+ var _e$relatedTarget;
386
+ // Keep focus on input when blur event is on same element
387
+ // (e.g. scrollbar in filtered search suggestions list)
388
+ if ((_e$relatedTarget = e.relatedTarget) !== null && _e$relatedTarget !== void 0 && _e$relatedTarget.classList.contains(FILTERED_SEARCH_SUGGESTIONS_CLASS)) {
389
+ var _this$$refs$input;
390
+ (_this$$refs$input = this.$refs.input) === null || _this$$refs$input === void 0 ? void 0 : _this$$refs$input.focus();
391
+ return;
392
+ }
385
393
  if (this.multiSelect) {
386
394
  this.$emit('complete');
387
395
  } else if (this.active) {
@@ -6,6 +6,7 @@ import { modulo } from '../../../utils/number_utils';
6
6
  const TERM_TOKEN_TYPE = 'filtered-search-term';
7
7
  const INTENT_ACTIVATE_PREVIOUS = 'intent-activate-previous';
8
8
  const TOKEN_CLOSE_SELECTOR = '.gl-token-close';
9
+ const FILTERED_SEARCH_SUGGESTIONS_CLASS = 'gl-filtered-search-suggestion-list';
9
10
  function isEmptyTerm(token) {
10
11
  return token.type === TERM_TOKEN_TYPE && token.value.data.trim() === '';
11
12
  }
@@ -239,4 +240,4 @@ function wrapTokenInQuotes(token) {
239
240
  return `"${token}"`;
240
241
  }
241
242
 
242
- export { INTENT_ACTIVATE_PREVIOUS, TERM_TOKEN_TYPE, TOKEN_CLOSE_SELECTOR, createTerm, denormalizeTokens, ensureTokenId, isEmptyTerm, match, needDenormalization, normalizeTokens, splitOnQuotes, stepIndexAndWrap, termTokenDefinition, tokenToOption, wrapTokenInQuotes };
243
+ export { FILTERED_SEARCH_SUGGESTIONS_CLASS, INTENT_ACTIVATE_PREVIOUS, TERM_TOKEN_TYPE, TOKEN_CLOSE_SELECTOR, createTerm, denormalizeTokens, ensureTokenId, isEmptyTerm, match, needDenormalization, normalizeTokens, splitOnQuotes, stepIndexAndWrap, termTokenDefinition, tokenToOption, wrapTokenInQuotes };
@@ -1,7 +1,5 @@
1
1
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
2
2
 
3
- //
4
-
5
3
  var script = {
6
4
  name: 'GlForm'
7
5
  };
@@ -4,8 +4,6 @@ import { logWarning } from '../../../utils/utils';
4
4
  import { iconSizeOptions, iconVariantOptions } from '../../../utils/constants';
5
5
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
6
6
 
7
- //
8
-
9
7
  const knownIcons = new Set(iconsInfo.icons);
10
8
 
11
9
  /** This is a re-usable vue component for rendering a svg sprite icon
@@ -3,8 +3,6 @@ import illustrationsInfo from '@gitlab/svgs/dist/illustrations.json';
3
3
  import { logWarning } from '../../../utils/utils';
4
4
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
5
5
 
6
- //
7
-
8
6
  const knownIllustrations = illustrationsInfo.icons;
9
7
 
10
8
  /** This is a re-usable vue component for rendering a svg sprite icon
@@ -6,8 +6,6 @@ import GlLink from '../link/link';
6
6
  import GlTooltip from '../tooltip/tooltip';
7
7
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
8
8
 
9
- //
10
-
11
9
  var script = {
12
10
  name: 'GlLabel',
13
11
  components: {
@@ -13,8 +13,6 @@ import { attemptFocus, attemptBlur } from '../../../vendor/bootstrap-vue/src/uti
13
13
  import { linkVariantOptions, isVue3, linkVariantUnstyled, linkVariantInline, linkVariantMeta } from '../../../utils/constants';
14
14
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
15
15
 
16
- //
17
-
18
16
  const ANCHOR_TAG = 'a';
19
17
  const NUXT_LINK_TAG = 'nuxt-link';
20
18
  const VUE_ROUTER_LINK_TAG = 'router-link';
@@ -1,7 +1,5 @@
1
1
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
2
2
 
3
- //
4
-
5
3
  var script = {
6
4
  name: 'GlMarkdown',
7
5
  props: {
@@ -6,8 +6,6 @@ import CloseButton from '../../shared_components/close_button/close_button';
6
6
  import GlButton from '../button/button';
7
7
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
8
8
 
9
- //
10
-
11
9
  function validatorHelper(obj) {
12
10
  return Object.keys(obj).every(val => val === 'text' || val === 'attributes');
13
11
  }
@@ -9,8 +9,6 @@ import GlDisclosureDropdownGroup from './disclosure_dropdown_group';
9
9
  import { itemsValidator, hasOnlyListItems, isItem } from './utils';
10
10
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
11
11
 
12
- //
13
-
14
12
  const ITEM_SELECTOR = `.${ITEM_CLASS}`;
15
13
  var script = {
16
14
  name: 'GlDisclosureDropdown',
@@ -15,8 +15,6 @@ import GlListboxGroup from './listbox_group';
15
15
  import { itemsValidator, isOption, flattenedOptions } from './utils';
16
16
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
17
17
 
18
- //
19
-
20
18
  const ITEM_SELECTOR = '[role="option"]';
21
19
  const ITEM_NULL_KEY = Symbol('null-key');
22
20
  const HEADER_ITEMS_BORDER_CLASSES = ['gl-border-b-1', 'gl-border-b-solid', 'gl-border-b-dropdown-divider'];
@@ -8,11 +8,9 @@ import GlIcon from '../icon/icon';
8
8
  import GlLink from '../link/link';
9
9
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
10
10
 
11
- //
12
-
13
11
  const pageRange = (from, to) => range(from, to + 1, 1);
14
12
  var script = {
15
- name: 'Pagination',
13
+ name: 'GlPagination',
16
14
  components: {
17
15
  GlLink,
18
16
  GlIcon
@@ -5,8 +5,6 @@ import { GlResizeObserverDirective } from '../../../directives/resize_observer/r
5
5
  import GlIcon from '../icon/icon';
6
6
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
7
7
 
8
- //
9
-
10
8
  const BOUNDARY_WIDTH = 40;
11
9
  const PATH_ITEM_CLASS = 'gl-path-button';
12
10
  const PATH_ACTIVE_ITEM_CLASS = 'gl-path-active-item';
@@ -4,8 +4,6 @@ import CloseButton from '../../shared_components/close_button/close_button';
4
4
  import { popoverPlacements } from '../../../utils/constants';
5
5
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
6
6
 
7
- //
8
-
9
7
  const popoverRefName = 'bPopover';
10
8
  var script = {
11
9
  name: 'GlPopover',
@@ -3,8 +3,6 @@ import { isDev, logWarning } from '../../../utils/utils';
3
3
  import { glTableLiteWarning, tableFullProps, tableFullSlots } from './constants';
4
4
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
5
5
 
6
- //
7
-
8
6
  const shouldUseFullTable = _ref => {
9
7
  let {
10
8
  $attrs,
@@ -5,8 +5,6 @@ import { logWarning } from '../../../../utils/utils';
5
5
  import { DEFAULT_TAB_TITLE_LINK_CLASS } from '../constants';
6
6
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
7
7
 
8
- //
9
-
10
8
  var script = {
11
9
  name: 'GlTab',
12
10
  components: {
@@ -3,8 +3,6 @@ import { tabsButtonDefaults } from '../../../../utils/constants';
3
3
  import GlButton from '../../button/button';
4
4
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
5
5
 
6
- //
7
-
8
6
  const validatorHelper = obj => Object.keys(obj).every(val => val === 'text' || val === 'attributes');
9
7
  var script = {
10
8
  name: 'GlTabs',
@@ -7,7 +7,8 @@ const DEFAULT_OPTIONS = {
7
7
  autoHideDelay: 5000,
8
8
  toastClass: 'gl-toast',
9
9
  isStatus: true,
10
- toaster: 'b-toaster-bottom-left'
10
+ toaster: 'b-toaster-bottom-left',
11
+ appendToast: true
11
12
  };
12
13
  let toastsCount = 0;
13
14
  function renderTitle(h, toast, options) {
@@ -4,8 +4,6 @@ import GlIcon from '../icon/icon';
4
4
  import GlLoadingIcon from '../loading_icon/loading_icon';
5
5
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
6
6
 
7
- //
8
-
9
7
  let uuid = 0;
10
8
  var script = {
11
9
  name: 'GlToggle',
@@ -3,8 +3,6 @@ import { translate } from '../../../utils/i18n';
3
3
  import CloseButton from '../../shared_components/close_button/close_button';
4
4
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
5
5
 
6
- //
7
-
8
6
  var script = {
9
7
  name: 'GlToken',
10
8
  components: {
@@ -4,8 +4,6 @@ import tooltipMixin from '../../mixins/tooltip_mixin';
4
4
  import { getGlTooltipDefaultContainer } from '../../../directives/tooltip/container';
5
5
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
6
6
 
7
- //
8
-
9
7
  const tooltipRefName = 'bvTooltip';
10
8
  var script = {
11
9
  name: 'GlTooltip',
@@ -8,7 +8,21 @@ import ChartLegend from '../legend/legend';
8
8
  import ChartTooltip from '../shared/tooltip/tooltip';
9
9
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
10
10
 
11
- //
11
+ /**
12
+ * Area charts as of %12.10 support annotations.
13
+ * Annotations is composed of a dotted line and an arrow
14
+ * at the bottom. The dotted line is constructed
15
+ * with markLine and arrows with markPoint.
16
+ *
17
+ * Similar to how custom tooltips are displayed when area chart
18
+ * is hovered, a tooltip should be displayed when the annotation
19
+ * arrow is hovered. This component adds event listeners
20
+ * to figure out if mouse is hovered on charts to show tooltips.
21
+ * While that works for data points inside the grid, for arrows
22
+ * that live right under the chart, we use eCharts inbuilt
23
+ * event listeners to detect hover. Given this limitation,
24
+ * we use a separate tooltip for data point and arrow.
25
+ */
12
26
 
13
27
  var script = {
14
28
  name: 'GlAreaChart',
@@ -10,9 +10,6 @@ import ChartTooltip from '../shared/tooltip/tooltip';
10
10
  import { stackedPresentationOptions } from '../../../utils/constants';
11
11
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
12
12
 
13
- //
14
-
15
-
16
13
  /**
17
14
  * `nameGap` in charts/config is set to 50 but it is not
18
15
  * used for bar charts as the axes are flipped. That is why
@@ -6,9 +6,6 @@ import { GlResizeObserverDirective } from '../../../directives/resize_observer/r
6
6
  import { debounceByAnimationFrame } from '../../../utils/utils';
7
7
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
8
8
 
9
- //
10
-
11
-
12
9
  /**
13
10
  * Allowed values by eCharts
14
11
  * https://echarts.apache.org/en/api.html#echartsInstance.resize
@@ -6,8 +6,6 @@ import Chart from '../chart/chart';
6
6
  import ChartTooltip from '../shared/tooltip/tooltip';
7
7
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
8
8
 
9
- //
10
-
11
9
  const yAxisDefaults = {
12
10
  ...yAxis,
13
11
  nameLocation: 'center',
@@ -5,8 +5,6 @@ import { gaugeSafeHues, gaugeWarningHue, gaugeNeutralHues } from '../../../utils
5
5
  import Chart from '../chart/chart';
6
6
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
7
7
 
8
- //
9
-
10
8
  const AXIS_LABEL_FONT_SIZE_PX = 14;
11
9
  const ARC_RADIUS = '80%';
12
10
  const DETAIL_FONT_SIZE_PX = 30;
@@ -10,8 +10,6 @@ import ChartLegend from '../legend/legend';
10
10
  import ChartTooltip from '../shared/tooltip/tooltip';
11
11
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
12
12
 
13
- //
14
-
15
13
  const defaultOptions = {
16
14
  visualMap: {
17
15
  show: false,
@@ -6,8 +6,6 @@ import GlTruncate from '../../utilities/truncate/truncate';
6
6
  import GlChartSeriesLabel from '../series_label/series_label';
7
7
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
8
8
 
9
- //
10
-
11
9
  var script = {
12
10
  name: 'GlChartLegend',
13
11
  components: {
@@ -8,7 +8,23 @@ import ChartLegend from '../legend/legend';
8
8
  import ChartTooltip from '../shared/tooltip/tooltip';
9
9
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
10
10
 
11
- //
11
+ /**
12
+ * Line charts as of %12.10 support annotations.
13
+ * Annotations is composed of a dotted line and an arrow
14
+ * at the bottom. The dotted line is constructed
15
+ * with markLine and arrows with markPoint. Most of this
16
+ * logic is in GitLab and should be eventually moved to
17
+ * GitLab UI https://gitlab.com/gitlab-org/gitlab/-/issues/213390.
18
+ *
19
+ * Similar to how custom tooltips are displayed when line chart
20
+ * is hovered, a tooltip should be displayed when the annotation
21
+ * arrow is hovered. This component adds event listeners
22
+ * to figure out if mouse is hovered on charts to show tooltips.
23
+ * While that works for data points inside the grid, for arrows
24
+ * that live right under the chart, we use eCharts inbuilt
25
+ * event listeners to detect hover. Given this limitation,
26
+ * we use a separate tooltip for data point and arrow.
27
+ */
12
28
 
13
29
  var script = {
14
30
  name: 'GlLineChart',
@@ -7,8 +7,6 @@ import { getTooltipAxisConfig, getTooltipTitle, getTooltipContent, getTooltipPar
7
7
  import TooltipDefaultFormat from './tooltip_default_format/tooltip_default_format';
8
8
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
9
9
 
10
- //
11
-
12
10
  var script = {
13
11
  name: 'GlChartTooltip',
14
12
  components: {
@@ -8,9 +8,6 @@ import Chart from '../chart/chart';
8
8
  import ChartTooltip from '../shared/tooltip/tooltip';
9
9
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
10
10
 
11
- //
12
-
13
-
14
11
  // the padding is needed so the mark points don't overflow when visible
15
12
  const gridPadding = symbolSize / 2;
16
13
  const generateGradient = colors => {
@@ -6,8 +6,6 @@ import { insert, intersperse } from '../../../utils/data_utils';
6
6
  import { isVnodeEmpty } from '../../../utils/is_slot_empty';
7
7
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
8
8
 
9
- //
10
-
11
9
  const filterEmptyNodesVue2 = filter(vNode => typeof vNode.tag === 'string' || vNode.text.trim() !== '');
12
10
  const {
13
11
  Fragment
@@ -2,8 +2,7 @@ import has from 'lodash/has';
2
2
  import isString from 'lodash/isString';
3
3
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
4
4
 
5
- //
6
-
5
+ /* eslint-disable no-continue */
7
6
  const PREFIX = '%{';
8
7
  const SUFFIX = '}';
9
8
  const START_SUFFIX = 'Start';
@@ -3,8 +3,6 @@ import { GlResizeObserverDirective } from '../../../directives/resize_observer/r
3
3
  import { POSITION, ZERO_WIDTH_SPACE } from './constants';
4
4
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
5
5
 
6
- //
7
-
8
6
  var script = {
9
7
  name: 'GlTruncate',
10
8
  POSITION,