@gitlab/ui 46.1.0 → 47.0.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 (50) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/dist/components/base/breadcrumb/breadcrumb.js +1 -1
  3. package/dist/components/base/datepicker/datepicker.js +17 -11
  4. package/dist/components/base/dropdown/dropdown.js +22 -5
  5. package/dist/components/base/filtered_search/filtered_search.js +1 -1
  6. package/dist/components/base/form/form_checkbox_tree/form_checkbox_tree.js +1 -1
  7. package/dist/components/base/form/form_checkbox_tree/models/tree.js +0 -1
  8. package/dist/components/base/infinite_scroll/infinite_scroll.js +17 -26
  9. package/dist/components/base/pagination/pagination.js +3 -1
  10. package/dist/components/base/search_box_by_click/search_box_by_click.js +1 -1
  11. package/dist/components/base/sorting/sorting_item.js +9 -2
  12. package/dist/components/charts/column/column.js +0 -1
  13. package/dist/components/utilities/intersperse/intersperse.js +1 -1
  14. package/dist/utility_classes.css +1 -1
  15. package/dist/utility_classes.css.map +1 -1
  16. package/package.json +7 -7
  17. package/src/components/base/alert/alert.spec.js +3 -3
  18. package/src/components/base/breadcrumb/breadcrumb.spec.js +0 -2
  19. package/src/components/base/breadcrumb/breadcrumb.vue +1 -1
  20. package/src/components/base/datepicker/datepicker.vue +18 -11
  21. package/src/components/base/daterange_picker/daterange_picker.spec.js +1 -3
  22. package/src/components/base/dropdown/dropdown.spec.js +37 -0
  23. package/src/components/base/dropdown/dropdown.stories.js +24 -1
  24. package/src/components/base/dropdown/dropdown.vue +22 -3
  25. package/src/components/base/filtered_search/filtered_search.vue +29 -30
  26. package/src/components/base/form/form_checkbox_tree/form_checkbox_tree.vue +1 -1
  27. package/src/components/base/form/form_checkbox_tree/models/tree.js +0 -1
  28. package/src/components/base/form/form_group/form_group.spec.js +1 -0
  29. package/src/components/base/infinite_scroll/infinite_scroll.vue +15 -24
  30. package/src/components/base/new_dropdowns/base_dropdown/base_dropdown.spec.js +1 -0
  31. package/src/components/base/new_dropdowns/listbox/listbox.spec.js +1 -0
  32. package/src/components/base/new_dropdowns/listbox/listbox.stories.js +64 -99
  33. package/src/components/base/pagination/pagination.spec.js +1 -1
  34. package/src/components/base/pagination/pagination.vue +6 -4
  35. package/src/components/base/search_box_by_click/search_box_by_click.spec.js +6 -5
  36. package/src/components/base/search_box_by_click/search_box_by_click.vue +1 -1
  37. package/src/components/base/sorting/sorting.spec.js +0 -17
  38. package/src/components/base/sorting/sorting_item.spec.js +3 -1
  39. package/src/components/base/sorting/sorting_item.vue +9 -10
  40. package/src/components/base/tabs/tab/tab.spec.js +2 -3
  41. package/src/components/base/tabs/tabs/scrollable_tabs.spec.js +3 -1
  42. package/src/components/charts/column/column.vue +1 -1
  43. package/src/components/utilities/intersection_observer/intersection_observer.spec.js +1 -1
  44. package/src/components/utilities/intersperse/intersperse.vue +1 -1
  45. package/src/components/utilities/sprintf/sprintf.spec.js +1 -5
  46. package/src/components/utilities/truncate/truncate.spec.js +4 -5
  47. package/src/directives/hover_load/hover_load.spec.js +1 -1
  48. package/src/directives/safe_link/safe_link.spec.js +11 -13
  49. package/src/scss/utilities.scss +2 -12
  50. package/src/scss/utility-mixins/spacing.scss +1 -8
package/CHANGELOG.md CHANGED
@@ -1,3 +1,28 @@
1
+ ## [47.0.1](https://gitlab.com/gitlab-org/gitlab-ui/compare/v47.0.0...v47.0.1) (2022-10-18)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **GlDropdown:** Fix GlDropdown not auto flipping horizontally ([635eca3](https://gitlab.com/gitlab-org/gitlab-ui/commit/635eca3eea58f6ee1d2fd01a17a1db3401657647))
7
+
8
+ # [47.0.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v46.1.0...v47.0.0) (2022-10-17)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * convert gl-sm-pr-2 to mobile-first, remove gl-md-pr-2 ([823c6c8](https://gitlab.com/gitlab-org/gitlab-ui/commit/823c6c8c727219a63b1c4bc31f16c82ac027e130))
14
+
15
+
16
+ ### BREAKING CHANGES
17
+
18
+ * This converts gl-sm-pr-2 from desktop-first to
19
+ mobile-first and removes gl-md-pr-2. If you were relying on the former,
20
+ please migrate to a mobile-first approach. If relying on the latter, you
21
+ might need to add it back to the library. We are defaulting to removing
22
+ utils that aren't used in GitLab projects while we remove desktop-first
23
+ utils, so it might be necessary to re-add some of them if they are used
24
+ elsewhere.
25
+
1
26
  # [46.1.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v46.0.0...v46.1.0) (2022-10-10)
2
27
 
3
28
 
@@ -97,7 +97,7 @@ var script = {
97
97
  const __vue_script__ = script;
98
98
 
99
99
  /* template */
100
- var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('nav',{staticClass:"gl-breadcrumbs",attrs:{"aria-label":"Breadcrumb"}},[_vm._t("avatar"),_vm._v(" "),_c('b-breadcrumb',_vm._g(_vm._b({staticClass:"gl-breadcrumb-list"},'b-breadcrumb',_vm.$attrs,false),_vm.$listeners),[_vm._l((_vm.items),function(item,index){return [_c('gl-breadcrumb-item',{key:index,ref:_vm.isFirstItem(index) ? 'firstItem' : null,refInFor:true,class:{ 'gl-display-none': _vm.isItemCollapsed(index) },attrs:{"text":item.text,"href":item.href,"to":item.to,"aria-current":_vm.getAriaCurrentAttr(index)}},[_c('span',[_vm._v(_vm._s(item.text))]),_vm._v(" "),(!_vm.isLastItem(index))?_c('span',{key:(index + " " + (item.text)),staticClass:"gl-breadcrumb-separator",attrs:{"data-testid":"separator"}},[_vm._t("separator",function(){return [_c('gl-icon',{attrs:{"name":"chevron-right"}})]})],2):_vm._e()]),_vm._v(" "),(_vm.showCollapsedBreadcrumbsExpander(index))?[_c('gl-button',{directives:[{name:"gl-tooltip",rawName:"v-gl-tooltip.hover",value:('Show all breadcrumbs'),expression:"'Show all breadcrumbs'",modifiers:{"hover":true}}],attrs:{"aria-label":"Show all breadcrumbs","data-testid":"collapsed-expander","icon":"ellipsis_h","category":"primary"},on:{"click":_vm.expandBreadcrumbs}}),_vm._v(" "),_c('span',{key:"expander",staticClass:"gl-display-inline-flex gl-text-gray-500",attrs:{"data-testid":"expander-separator"}},[_vm._t("separator",function(){return [_c('gl-icon',{attrs:{"name":"chevron-right"}})]})],2)]:_vm._e()]})],2)],2)};
100
+ var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('nav',{staticClass:"gl-breadcrumbs",attrs:{"aria-label":"Breadcrumb"}},[_vm._t("avatar"),_vm._v(" "),_c('b-breadcrumb',_vm._g(_vm._b({staticClass:"gl-breadcrumb-list"},'b-breadcrumb',_vm.$attrs,false),_vm.$listeners),[_vm._l((_vm.items),function(item,index){return [_c('gl-breadcrumb-item',{ref:_vm.isFirstItem(index) ? 'firstItem' : null,refInFor:true,class:{ 'gl-display-none': _vm.isItemCollapsed(index) },attrs:{"text":item.text,"href":item.href,"to":item.to,"aria-current":_vm.getAriaCurrentAttr(index)}},[_c('span',[_vm._v(_vm._s(item.text))]),_vm._v(" "),(!_vm.isLastItem(index))?_c('span',{key:(index + " " + (item.text)),staticClass:"gl-breadcrumb-separator",attrs:{"data-testid":"separator"}},[_vm._t("separator",function(){return [_c('gl-icon',{attrs:{"name":"chevron-right"}})]})],2):_vm._e()]),_vm._v(" "),(_vm.showCollapsedBreadcrumbsExpander(index))?[_c('gl-button',{directives:[{name:"gl-tooltip",rawName:"v-gl-tooltip.hover",value:('Show all breadcrumbs'),expression:"'Show all breadcrumbs'",modifiers:{"hover":true}}],attrs:{"aria-label":"Show all breadcrumbs","data-testid":"collapsed-expander","icon":"ellipsis_h","category":"primary"},on:{"click":_vm.expandBreadcrumbs}}),_vm._v(" "),_c('span',{key:"expander",staticClass:"gl-display-inline-flex gl-text-gray-500",attrs:{"data-testid":"expander-separator"}},[_vm._t("separator",function(){return [_c('gl-icon',{attrs:{"name":"chevron-right"}})]})],2)]:_vm._e()]})],2)],2)};
101
101
  var __vue_staticRenderFns__ = [];
102
102
 
103
103
  /* style */
@@ -189,7 +189,7 @@ var script = {
189
189
 
190
190
  computed: {
191
191
  formattedDate() {
192
- return this.calendar && this.calendar.toString();
192
+ return this.$options.pikaday.calendar && this.$options.pikaday.calendar.toString();
193
193
  },
194
194
 
195
195
  customTrigger() {
@@ -223,25 +223,25 @@ var script = {
223
223
  },
224
224
  watch: {
225
225
  value(val) {
226
- if (!areDatesEqual(val, this.calendar.getDate())) {
227
- this.calendar.setDate(val, true);
226
+ if (!areDatesEqual(val, this.$options.pikaday.calendar.getDate())) {
227
+ this.$options.pikaday.calendar.setDate(val, true);
228
228
  }
229
229
  },
230
230
 
231
231
  minDate(minDate) {
232
- this.calendar.setMinDate(minDate);
232
+ this.$options.pikaday.calendar.setMinDate(minDate);
233
233
  },
234
234
 
235
235
  maxDate(maxDate) {
236
- this.calendar.setMaxDate(maxDate);
236
+ this.$options.pikaday.calendar.setMaxDate(maxDate);
237
237
  },
238
238
 
239
239
  startRange(startRange) {
240
- this.calendar.setStartRange(startRange);
240
+ this.$options.pikaday.calendar.setStartRange(startRange);
241
241
  },
242
242
 
243
243
  endRange(endRange) {
244
- this.calendar.setEndRange(endRange);
244
+ this.$options.pikaday.calendar.setEndRange(endRange);
245
245
  }
246
246
 
247
247
  },
@@ -295,15 +295,15 @@ var script = {
295
295
  pikadayConfig.i18n = this.i18n;
296
296
  }
297
297
 
298
- this.calendar = new Pikaday(pikadayConfig);
298
+ this.$options.pikaday.calendar = new Pikaday(pikadayConfig);
299
299
 
300
300
  if (this.startOpened) {
301
- this.calendar.show();
301
+ this.$options.pikaday.calendar.show();
302
302
  }
303
303
  },
304
304
 
305
305
  beforeDestroy() {
306
- this.calendar.destroy();
306
+ this.$options.pikaday.calendar.destroy();
307
307
  },
308
308
 
309
309
  methods: {
@@ -348,11 +348,17 @@ var script = {
348
348
  onKeydown() {
349
349
  if (this.textInput === '') {
350
350
  const resetDate = this.minDate || null;
351
- this.calendar.setDate(resetDate);
351
+ this.$options.pikaday.calendar.setDate(resetDate);
352
352
  this.selected(resetDate);
353
353
  }
354
354
  }
355
355
 
356
+ },
357
+ // Vue3 will make this.$options shallow-readonly
358
+ // that means that in order to store anything in $options
359
+ // we need an object as a container
360
+ pikaday: {
361
+ calendar: null
356
362
  }
357
363
  };
358
364
 
@@ -1,3 +1,5 @@
1
+ import _merge from 'lodash/merge';
2
+ import Vue from 'vue';
1
3
  import { BDropdown } from 'bootstrap-vue/esm/index.js';
2
4
  import { selectAll, isVisible } from 'bootstrap-vue/esm/utils/dom';
3
5
  import { buttonCategoryOptions, dropdownVariantOptions, buttonSizeOptions } from '../../../utils/constants';
@@ -8,8 +10,6 @@ import GlLoadingIcon from '../loading_icon/loading_icon';
8
10
  import GlDropdownDivider from './dropdown_divider';
9
11
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
10
12
 
11
- //
12
-
13
13
  function filterVisible(els) {
14
14
  return (els || []).filter(isVisible);
15
15
  }
@@ -18,14 +18,21 @@ const Selector = {
18
18
  ITEM_SELECTOR: '.dropdown-item:not(.disabled):not([disabled]),.form-control:not(.disabled):not([disabled])'
19
19
  }; // see https://gitlab.com/gitlab-org/gitlab-ui/merge_requests/130#note_126406721
20
20
 
21
- const ExtendedBDropdown = {
22
- extends: BDropdown,
21
+ const ExtendedBDropdown = Vue.extend(BDropdown, {
23
22
  methods: {
24
23
  getItems() {
25
24
  return filterVisible(selectAll(Selector.ITEM_SELECTOR, this.$refs.menu));
26
25
  }
27
26
 
28
27
  }
28
+ });
29
+ const DefaultPopperOptions = {
30
+ modifiers: {
31
+ flip: {
32
+ flipVariationsByContent: true,
33
+ padding: 28
34
+ }
35
+ }
29
36
  };
30
37
  var script = {
31
38
  components: {
@@ -139,6 +146,11 @@ var script = {
139
146
  type: Boolean,
140
147
  required: false,
141
148
  default: false
149
+ },
150
+ popperOpts: {
151
+ type: Object,
152
+ required: false,
153
+ default: null
142
154
  }
143
155
  },
144
156
  computed: {
@@ -188,6 +200,10 @@ var script = {
188
200
 
189
201
  hasHighlightedItemsOrClearAll() {
190
202
  return this.hasHighlightedItemsContent && this.showHighlightedItemsTitle || this.showClearAll;
203
+ },
204
+
205
+ popperOptions() {
206
+ return _merge({}, DefaultPopperOptions, this.popperOpts);
191
207
  }
192
208
 
193
209
  },
@@ -212,7 +228,7 @@ var script = {
212
228
  const __vue_script__ = script;
213
229
 
214
230
  /* template */
215
- var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-dropdown',_vm._g(_vm._b({ref:"dropdown",staticClass:"gl-new-dropdown",attrs:{"split":_vm.split,"variant":_vm.variant,"size":_vm.buttonSize,"toggle-class":[_vm.toggleButtonClasses],"split-class":_vm.splitButtonClasses,"block":_vm.block,"disabled":_vm.disabled || _vm.loading,"right":_vm.right},scopedSlots:_vm._u([{key:"button-content",fn:function(){return [_vm._t("button-content",function(){return [(_vm.loading)?_c('gl-loading-icon',{class:{ 'gl-mr-2': !_vm.isIconOnly }}):_vm._e(),_vm._v(" "),(_vm.icon && !(_vm.isIconOnly && _vm.loading))?_c('gl-icon',{staticClass:"dropdown-icon",attrs:{"name":_vm.icon}}):_vm._e(),_vm._v(" "),_c('span',{staticClass:"gl-new-dropdown-button-text",class:{ 'gl-sr-only': _vm.textSrOnly }},[_vm._t("button-text",function(){return [_vm._v(_vm._s(_vm.buttonText))]})],2),_vm._v(" "),(_vm.renderCaret)?_c('gl-icon',{staticClass:"gl-button-icon dropdown-chevron",attrs:{"name":"chevron-down"}}):_vm._e()]})]},proxy:true}],null,true)},'b-dropdown',_vm.$attrs,false),_vm.$listeners),[_c('div',{staticClass:"gl-new-dropdown-inner"},[(_vm.hasSlotContents('header') || _vm.headerText)?_c('div',{staticClass:"gl-new-dropdown-header",class:{ 'gl-border-b-0!': _vm.hideHeaderBorder }},[(_vm.headerText)?_c('p',{staticClass:"gl-new-dropdown-header-top"},[_vm._v("\n "+_vm._s(_vm.headerText)+"\n ")]):_vm._e(),_vm._v(" "),_vm._t("header")],2):_vm._e(),_vm._v(" "),(_vm.hasHighlightedItemsOrClearAll)?_c('div',{staticClass:"gl-display-flex gl-flex-direction-row gl-justify-content-space-between gl-align-items-center"},[(_vm.hasHighlightedItemsContent && _vm.showHighlightedItemsTitle)?_c('div',{staticClass:"gl-display-flex gl-flex-grow-1 gl-justify-content-flex-start",class:_vm.highlightedItemsTitleClass},[_c('span',{staticClass:"gl-font-weight-bold",attrs:{"data-testid":"highlighted-items-title"}},[_vm._v(_vm._s(_vm.highlightedItemsTitle))])]):_vm._e(),_vm._v(" "),(_vm.showClearAll)?_c('div',{staticClass:"gl-display-flex gl-flex-grow-1 gl-justify-content-end",class:_vm.clearAllTextClass},[_c('gl-button',{attrs:{"size":"small","category":"tertiary","variant":"link","data-testid":"clear-all-button"},on:{"click":function($event){return _vm.$emit('clear-all', $event)}}},[_vm._v(_vm._s(_vm.clearAllText))])],1):_vm._e()]):_vm._e(),_vm._v(" "),_c('div',{staticClass:"gl-new-dropdown-contents"},[(_vm.hasHighlightedItemsContent)?_c('div',{staticClass:"gl-overflow-visible",attrs:{"data-testid":"highlighted-items"}},[_vm._t("highlighted-items"),_vm._v(" "),_c('gl-dropdown-divider')],2):_vm._e(),_vm._v(" "),_vm._t("default")],2),_vm._v(" "),(_vm.hasSlotContents('footer'))?_c('div',{staticClass:"gl-new-dropdown-footer"},[_vm._t("footer")],2):_vm._e()])])};
231
+ var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-dropdown',_vm._g(_vm._b({ref:"dropdown",staticClass:"gl-new-dropdown",attrs:{"split":_vm.split,"variant":_vm.variant,"size":_vm.buttonSize,"toggle-class":[_vm.toggleButtonClasses],"split-class":_vm.splitButtonClasses,"block":_vm.block,"disabled":_vm.disabled || _vm.loading,"right":_vm.right,"popper-opts":_vm.popperOptions},scopedSlots:_vm._u([{key:"button-content",fn:function(){return [_vm._t("button-content",function(){return [(_vm.loading)?_c('gl-loading-icon',{class:{ 'gl-mr-2': !_vm.isIconOnly }}):_vm._e(),_vm._v(" "),(_vm.icon && !(_vm.isIconOnly && _vm.loading))?_c('gl-icon',{staticClass:"dropdown-icon",attrs:{"name":_vm.icon}}):_vm._e(),_vm._v(" "),_c('span',{staticClass:"gl-new-dropdown-button-text",class:{ 'gl-sr-only': _vm.textSrOnly }},[_vm._t("button-text",function(){return [_vm._v(_vm._s(_vm.buttonText))]})],2),_vm._v(" "),(_vm.renderCaret)?_c('gl-icon',{staticClass:"gl-button-icon dropdown-chevron",attrs:{"name":"chevron-down"}}):_vm._e()]})]},proxy:true}],null,true)},'b-dropdown',_vm.$attrs,false),_vm.$listeners),[_c('div',{staticClass:"gl-new-dropdown-inner"},[(_vm.hasSlotContents('header') || _vm.headerText)?_c('div',{staticClass:"gl-new-dropdown-header",class:{ 'gl-border-b-0!': _vm.hideHeaderBorder }},[(_vm.headerText)?_c('p',{staticClass:"gl-new-dropdown-header-top"},[_vm._v("\n "+_vm._s(_vm.headerText)+"\n ")]):_vm._e(),_vm._v(" "),_vm._t("header")],2):_vm._e(),_vm._v(" "),(_vm.hasHighlightedItemsOrClearAll)?_c('div',{staticClass:"gl-display-flex gl-flex-direction-row gl-justify-content-space-between gl-align-items-center"},[(_vm.hasHighlightedItemsContent && _vm.showHighlightedItemsTitle)?_c('div',{staticClass:"gl-display-flex gl-flex-grow-1 gl-justify-content-flex-start",class:_vm.highlightedItemsTitleClass},[_c('span',{staticClass:"gl-font-weight-bold",attrs:{"data-testid":"highlighted-items-title"}},[_vm._v(_vm._s(_vm.highlightedItemsTitle))])]):_vm._e(),_vm._v(" "),(_vm.showClearAll)?_c('div',{staticClass:"gl-display-flex gl-flex-grow-1 gl-justify-content-end",class:_vm.clearAllTextClass},[_c('gl-button',{attrs:{"size":"small","category":"tertiary","variant":"link","data-testid":"clear-all-button"},on:{"click":function($event){return _vm.$emit('clear-all', $event)}}},[_vm._v(_vm._s(_vm.clearAllText))])],1):_vm._e()]):_vm._e(),_vm._v(" "),_c('div',{staticClass:"gl-new-dropdown-contents"},[(_vm.hasHighlightedItemsContent)?_c('div',{staticClass:"gl-overflow-visible",attrs:{"data-testid":"highlighted-items"}},[_vm._t("highlighted-items"),_vm._v(" "),_c('gl-dropdown-divider')],2):_vm._e(),_vm._v(" "),_vm._t("default")],2),_vm._v(" "),(_vm.hasSlotContents('footer'))?_c('div',{staticClass:"gl-new-dropdown-footer"},[_vm._t("footer")],2):_vm._e()])])};
216
232
  var __vue_staticRenderFns__ = [];
217
233
 
218
234
  /* style */
@@ -245,3 +261,4 @@ var __vue_staticRenderFns__ = [];
245
261
  );
246
262
 
247
263
  export default __vue_component__;
264
+ export { DefaultPopperOptions };
@@ -356,7 +356,7 @@ var script = {
356
356
  const __vue_script__ = script;
357
357
 
358
358
  /* template */
359
- var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('gl-search-box-by-click',_vm._b({attrs:{"value":_vm.tokens,"history-items":_vm.historyItems,"clearable":_vm.hasValue,"search-button-attributes":_vm.searchButtonAttributes,"disabled":_vm.viewOnly,"data-testid":"filtered-search-input"},on:{"submit":_vm.submit,"input":_vm.applyNewValue,"history-item-selected":function($event){return _vm.$emit('history-item-selected', $event)},"clear":function($event){return _vm.$emit('clear')},"clear-history":function($event){return _vm.$emit('clear-history')}},scopedSlots:_vm._u([{key:"history-item",fn:function(slotScope){return [_vm._t("history-item",null,null,slotScope)]}},{key:"input",fn:function(){return [_c('div',{staticClass:"gl-filtered-search-scrollable",class:{ 'gl-bg-gray-10! gl-inset-border-1-gray-100!': _vm.viewOnly }},[_vm._l((_vm.tokens),function(token,idx){return [_c(_vm.getTokenComponent(token.type),{key:token.id,ref:"tokens",refInFor:true,tag:"component",staticClass:"gl-filtered-search-item",class:{ 'gl-filtered-search-last-item': _vm.isLastToken(idx) && !_vm.viewOnly },attrs:{"config":_vm.getTokenEntry(token.type),"active":_vm.activeTokenIdx === idx,"cursor-position":_vm.intendedCursorPosition,"available-tokens":_vm.currentAvailableTokens,"current-value":_vm.tokens,"index":idx,"placeholder":_vm.termPlaceholder,"show-friendly-text":_vm.showFriendlyText,"search-input-attributes":_vm.searchInputAttributes,"view-only":_vm.viewOnly,"is-last-token":_vm.isLastToken(idx)},on:{"activate":function($event){return _vm.activate(idx)},"deactivate":function($event){return _vm.deactivate(token)},"destroy":function($event){return _vm.destroyToken(idx, $event)},"replace":function($event){return _vm.replaceToken(idx, $event)},"complete":_vm.completeToken,"submit":_vm.submit,"split":function($event){return _vm.createTokens(idx, $event)},"previous":_vm.activatePreviousToken,"next":_vm.activateNextToken},model:{value:(token.value),callback:function ($$v) {_vm.$set(token, "value", $$v);},expression:"token.value"}})]})],2),_vm._v(" "),_c('portal-target',{key:_vm.activeTokenIdx,ref:"menu",style:(_vm.suggestionsStyle),attrs:{"name":_vm.portalName,"slim":""}})]},proxy:true}],null,true)},'gl-search-box-by-click',_vm.$attrs,false))};
359
+ var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('gl-search-box-by-click',_vm._b({attrs:{"value":_vm.tokens,"history-items":_vm.historyItems,"clearable":_vm.hasValue,"search-button-attributes":_vm.searchButtonAttributes,"disabled":_vm.viewOnly,"data-testid":"filtered-search-input"},on:{"submit":_vm.submit,"input":_vm.applyNewValue,"history-item-selected":function($event){return _vm.$emit('history-item-selected', $event)},"clear":function($event){return _vm.$emit('clear')},"clear-history":function($event){return _vm.$emit('clear-history')}},scopedSlots:_vm._u([{key:"history-item",fn:function(slotScope){return [_vm._t("history-item",null,null,slotScope)]}},{key:"input",fn:function(){return [_c('div',{staticClass:"gl-filtered-search-scrollable",class:{ 'gl-bg-gray-10! gl-inset-border-1-gray-100!': _vm.viewOnly }},_vm._l((_vm.tokens),function(token,idx){return _c(_vm.getTokenComponent(token.type),{key:token.id,ref:"tokens",refInFor:true,tag:"component",staticClass:"gl-filtered-search-item",class:{ 'gl-filtered-search-last-item': _vm.isLastToken(idx) && !_vm.viewOnly },attrs:{"config":_vm.getTokenEntry(token.type),"active":_vm.activeTokenIdx === idx,"cursor-position":_vm.intendedCursorPosition,"available-tokens":_vm.currentAvailableTokens,"current-value":_vm.tokens,"index":idx,"placeholder":_vm.termPlaceholder,"show-friendly-text":_vm.showFriendlyText,"search-input-attributes":_vm.searchInputAttributes,"view-only":_vm.viewOnly,"is-last-token":_vm.isLastToken(idx)},on:{"activate":function($event){return _vm.activate(idx)},"deactivate":function($event){return _vm.deactivate(token)},"destroy":function($event){return _vm.destroyToken(idx, $event)},"replace":function($event){return _vm.replaceToken(idx, $event)},"complete":_vm.completeToken,"submit":_vm.submit,"split":function($event){return _vm.createTokens(idx, $event)},"previous":_vm.activatePreviousToken,"next":_vm.activateNextToken},model:{value:(token.value),callback:function ($$v) {_vm.$set(token, "value", $$v);},expression:"token.value"}})}),1),_vm._v(" "),_c('portal-target',{key:_vm.activeTokenIdx,ref:"menu",style:(_vm.suggestionsStyle),attrs:{"name":_vm.portalName,"slim":""}})]},proxy:true}],null,true)},'gl-search-box-by-click',_vm.$attrs,false))};
360
360
  var __vue_staticRenderFns__ = [];
361
361
 
362
362
  /* style */
@@ -112,7 +112,7 @@ var script = {
112
112
  const __vue_script__ = script;
113
113
 
114
114
  /* template */
115
- var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('gl-form-group',{attrs:{"label":_vm.label,"label-sr-only":_vm.labelSrOnly}},[(!_vm.hideToggleAll)?_c('gl-form-checkbox',{staticClass:"gl-form-checkbox-tree-toggle-all",attrs:{"checked":_vm.tree.allOptionsChecked,"indeterminate":_vm.tree.someOptionsChecked},on:{"change":_vm.tree.toggleAllOptions}},[_vm._v("\n "+_vm._s(_vm.toggleAllLabel)+"\n ")]):_vm._e(),_vm._v(" "),_vm._l((_vm.options),function(option){return _c('gl-form-checkbox-tree-node',{key:option.value,attrs:{"option":option}})})],2)};
115
+ var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('gl-form-group',{attrs:{"label":_vm.label,"label-sr-only":_vm.labelSrOnly}},[(!_vm.hideToggleAll)?_c('gl-form-checkbox',{staticClass:"gl-form-checkbox-tree-toggle-all",attrs:{"checked":_vm.tree.allOptionsChecked,"indeterminate":_vm.tree.someOptionsChecked},on:{"change":function($event){return _vm.tree.toggleAllOptions($event)}}},[_vm._v("\n "+_vm._s(_vm.toggleAllLabel)+"\n ")]):_vm._e(),_vm._v(" "),_vm._l((_vm.options),function(option){return _c('gl-form-checkbox-tree-node',{key:option.value,attrs:{"option":option}})})],2)};
116
116
  var __vue_staticRenderFns__ = [];
117
117
 
118
118
  /* style */
@@ -5,7 +5,6 @@ class Tree {
5
5
  constructor(options, selected) {
6
6
  this.treeDepth = 0;
7
7
  this.nodes = {};
8
- this.toggleAllOptions = this.toggleAllOptions.bind(this);
9
8
  this.initNodes(options, selected);
10
9
  this.initIndeterminateStates();
11
10
  }
@@ -63,8 +63,23 @@ var script = {
63
63
  } = this.$refs.infiniteContainer; // Only when scrolled to the top
64
64
 
65
65
  if (scrollHeight !== 0 && scrollTop === 0) {
66
- // Store scrollHeight to know how far to scroll
67
- this.$options.adjustScrollHeight = scrollHeight;
66
+ // Wait until the DOM is fully updated to adjust scroll
67
+ this.$nextTick(() => {
68
+ const {
69
+ scrollHeight: newScrollHeight
70
+ } = this.$refs.infiniteContainer; // New scrollTop is the new height, minus the old height
71
+ // minus a small space to allow the user to trigger a scroll once more
72
+
73
+ let top = newScrollHeight - scrollHeight - adjustScrollGap; // Never adjust to 0, or a new event may be be triggered
74
+
75
+ if (top < 1) {
76
+ top = 1;
77
+ }
78
+
79
+ this.scrollTo({
80
+ top
81
+ });
82
+ });
68
83
  }
69
84
  }
70
85
  }
@@ -80,30 +95,6 @@ var script = {
80
95
  });
81
96
  },
82
97
 
83
- updated() {
84
- // Wait until the DOM is fully updated to adjust scroll
85
- this.$nextTick(() => {
86
- if (this.$options.adjustScrollHeight) {
87
- const {
88
- scrollHeight
89
- } = this.$refs.infiniteContainer; // New scrollTop is the new height, minus the old height
90
- // minus a small space to allow the user to trigger a scroll once more
91
-
92
- let top = scrollHeight - this.$options.adjustScrollHeight - adjustScrollGap; // Never adjust to 0, or a new event may be be triggered
93
-
94
- if (top < 1) {
95
- top = 1;
96
- }
97
-
98
- this.scrollTo({
99
- top
100
- }); // Prevent subsequent updates
101
-
102
- this.$options.adjustScrollHeight = null;
103
- }
104
- });
105
- },
106
-
107
98
  methods: {
108
99
  /**
109
100
  * Scroll to the top of the container, leaving a gap
@@ -367,7 +367,9 @@ var script = {
367
367
  key: `ellipsis_${side}`,
368
368
  slot: `ellipsis-${side}`,
369
369
  component: 'span',
370
- disabled: true
370
+ disabled: true,
371
+ slotData: {},
372
+ listeners: {}
371
373
  };
372
374
  },
373
375
 
@@ -224,7 +224,7 @@ var script = {
224
224
  const __vue_script__ = script;
225
225
 
226
226
  /* template */
227
- var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('gl-form-input-group',{staticClass:"gl-search-box-by-click",scopedSlots:_vm._u([(_vm.historyItems)?{key:"prepend",fn:function(){return [_c('gl-dropdown',{ref:"historyDropdown",staticClass:"gl-search-box-by-click-history",attrs:{"menu-class":"gl-search-box-by-click-menu","category":"secondary","disabled":_vm.disabled},scopedSlots:_vm._u([{key:"button-content",fn:function(){return [_c('gl-icon',{staticClass:"gl-search-box-by-click-history-icon",attrs:{"name":"history"}}),_vm._v(" "),_c('gl-icon',{staticClass:"gl-search-box-by-click-history-icon-chevron",attrs:{"name":"chevron-down"}}),_vm._v(" "),_c('span',{staticClass:"gl-sr-only"},[_vm._v("Toggle history")])]},proxy:true}],null,false,2220989388)},[_vm._v(" "),_c('gl-dropdown-text',{staticClass:"gl-search-box-by-click-history-header"},[_vm._v("\n "+_vm._s(_vm.recentSearchesHeader)+"\n "),_c('gl-button',{directives:[{name:"gl-tooltip",rawName:"v-gl-tooltip.hover",value:({ container: _vm.tooltipContainer }),expression:"{ container: tooltipContainer }",modifiers:{"hover":true}}],ref:"closeHistory",staticClass:"gl-search-box-by-click-close-history-button",attrs:{"title":_vm.closeButtonTitle,"aria-label":_vm.closeButtonTitle,"category":"tertiary","name":"close","icon":"close"},on:{"click":_vm.closeHistoryDropdown}})],1),_vm._v(" "),_c('gl-dropdown-divider'),_vm._v(" "),(_vm.historyItems.length)?[_vm._l((_vm.historyItems),function(item,idx){return _c('gl-dropdown-item',{key:idx,staticClass:"gl-search-box-by-click-history-item",on:{"click":function($event){return _vm.selectHistoryItem(item)}}},[_vm._t("history-item",function(){return [_vm._v(_vm._s(item))]},{"historyItem":item})],2)}),_vm._v(" "),_c('gl-dropdown-divider'),_vm._v(" "),_c('gl-dropdown-item',{ref:"clearHistory",on:{"click":_vm.emitClearHistory}},[_vm._v(_vm._s(_vm.clearRecentSearchesText))])]:_c('gl-dropdown-text',{staticClass:"gl-search-box-by-click-history-no-searches"},[_vm._v(_vm._s(_vm.noRecentSearchesText))])],2)]},proxy:true}:null,{key:"append",fn:function(){return [_c('gl-button',_vm._b({ref:"searchButton",staticClass:"gl-search-box-by-click-search-button",attrs:{"icon":"search","disabled":_vm.disabled,"aria-label":"Search","data-testid":"search-button"},on:{"click":function($event){return _vm.search(_vm.currentValue)}}},'gl-button',_vm.searchButtonAttributes,false))]},proxy:true}],null,true)},[_vm._v(" "),_vm._t("input",function(){return [_c('gl-form-input',_vm._b({ref:"input",staticClass:"gl-search-box-by-click-input",attrs:{"disabled":_vm.disabled},on:{"focus":function($event){_vm.isFocused = true;},"blur":function($event){_vm.isFocused = false;},"keydown":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"enter",13,$event.key,"Enter")){ return null; }return _vm.search(_vm.currentValue)}},model:{value:(_vm.currentValue),callback:function ($$v) {_vm.currentValue=$$v;},expression:"currentValue"}},'gl-form-input',_vm.inputAttributes,false))]}),_vm._v(" "),(_vm.clearable && _vm.hasValue && !_vm.disabled)?_c('gl-clear-icon-button',{staticClass:"gl-search-box-by-click-icon-button gl-search-box-by-click-clear-button gl-clear-icon-button",attrs:{"title":_vm.clearButtonTitle,"tooltip-container":_vm.tooltipContainer,"data-testid":"filtered-search-clear-button"},on:{"click":_vm.clearInput}}):_vm._e()],2)};
227
+ var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('gl-form-input-group',{staticClass:"gl-search-box-by-click",scopedSlots:_vm._u([(_vm.historyItems)?{key:"prepend",fn:function(){return [_c('gl-dropdown',{ref:"historyDropdown",staticClass:"gl-search-box-by-click-history",attrs:{"menu-class":"gl-search-box-by-click-menu","category":"secondary","disabled":_vm.disabled},scopedSlots:_vm._u([{key:"button-content",fn:function(){return [_c('gl-icon',{staticClass:"gl-search-box-by-click-history-icon",attrs:{"name":"history"}}),_vm._v(" "),_c('gl-icon',{staticClass:"gl-search-box-by-click-history-icon-chevron",attrs:{"name":"chevron-down"}}),_vm._v(" "),_c('span',{staticClass:"gl-sr-only"},[_vm._v("Toggle history")])]},proxy:true}],null,false,2220989388)},[_vm._v(" "),_c('gl-dropdown-text',{staticClass:"gl-search-box-by-click-history-header"},[_vm._v("\n "+_vm._s(_vm.recentSearchesHeader)+"\n "),_c('gl-button',{directives:[{name:"gl-tooltip",rawName:"v-gl-tooltip.hover",value:({ container: _vm.tooltipContainer }),expression:"{ container: tooltipContainer }",modifiers:{"hover":true}}],ref:"closeHistory",staticClass:"gl-search-box-by-click-close-history-button",attrs:{"title":_vm.closeButtonTitle,"aria-label":_vm.closeButtonTitle,"category":"tertiary","name":"close","icon":"close"},on:{"click":_vm.closeHistoryDropdown}})],1),_vm._v(" "),_c('gl-dropdown-divider'),_vm._v(" "),(_vm.historyItems.length)?[_vm._l((_vm.historyItems),function(item,idx){return _c('gl-dropdown-item',{key:idx,staticClass:"gl-search-box-by-click-history-item",on:{"click":function($event){return _vm.selectHistoryItem(item)}}},[_vm._t("history-item",function(){return [_vm._v(_vm._s(item))]},{"historyItem":item})],2)}),_vm._v(" "),_c('gl-dropdown-divider'),_vm._v(" "),_c('gl-dropdown-item',{ref:"clearHistory",on:{"click":_vm.emitClearHistory}},[_vm._v(_vm._s(_vm.clearRecentSearchesText))])]:_c('gl-dropdown-text',{staticClass:"gl-search-box-by-click-history-no-searches"},[_vm._v(_vm._s(_vm.noRecentSearchesText))])],2)]},proxy:true}:null,{key:"append",fn:function(){return [_c('gl-button',_vm._b({ref:"searchButton",staticClass:"gl-search-box-by-click-search-button",attrs:{"icon":"search","disabled":_vm.disabled,"aria-label":"Search","data-testid":"search-button"},on:{"click":function($event){return _vm.search(_vm.currentValue)}}},'gl-button',_vm.searchButtonAttributes,false))]},proxy:true}],null,true)},[_vm._v(" "),_vm._t("input",function(){return [_c('gl-form-input',_vm._b({ref:"input",staticClass:"gl-search-box-by-click-input",attrs:{"disabled":_vm.disabled},on:{"focus":function($event){_vm.isFocused = true;},"blur":function($event){_vm.isFocused = false;}},nativeOn:{"keydown":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"enter",13,$event.key,"Enter")){ return null; }return _vm.search(_vm.currentValue)}},model:{value:(_vm.currentValue),callback:function ($$v) {_vm.currentValue=$$v;},expression:"currentValue"}},'gl-form-input',_vm.inputAttributes,false))]}),_vm._v(" "),(_vm.clearable && _vm.hasValue && !_vm.disabled)?_c('gl-clear-icon-button',{staticClass:"gl-search-box-by-click-icon-button gl-search-box-by-click-clear-button gl-clear-icon-button",attrs:{"title":_vm.clearButtonTitle,"tooltip-container":_vm.tooltipContainer,"data-testid":"filtered-search-clear-button"},on:{"click":_vm.clearInput}}):_vm._e()],2)};
228
228
  var __vue_staticRenderFns__ = [];
229
229
 
230
230
  /* style */
@@ -43,7 +43,7 @@ var script = {
43
43
  */
44
44
  render(createElement, _ref) {
45
45
  let {
46
- children,
46
+ scopedSlots,
47
47
  data,
48
48
  props = {}
49
49
  } = _ref;
@@ -58,8 +58,15 @@ var script = {
58
58
  });
59
59
  return createElement(GlDropdownItem, { ...data,
60
60
  attrs: { ...props
61
+ },
62
+ scopedSlots: {
63
+ default: () => {
64
+ var _scopedSlots$default;
65
+
66
+ return [icon, (_scopedSlots$default = scopedSlots.default) === null || _scopedSlots$default === void 0 ? void 0 : _scopedSlots$default.call(scopedSlots)];
67
+ }
61
68
  }
62
- }, [icon, children]);
69
+ });
63
70
  }
64
71
 
65
72
  };
@@ -93,7 +93,6 @@ var script = {
93
93
  } = _ref;
94
94
  const color = colorFromDefaultPalette(index);
95
95
  return generateBarSeries({
96
- stack: this.groupBy,
97
96
  name,
98
97
  data,
99
98
  color
@@ -8,7 +8,7 @@ import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
8
8
 
9
9
  const containsWhitespaceOnly = vNode => vNode.text.trim() === '';
10
10
 
11
- const isTag = vNode => vNode.tag !== undefined;
11
+ const isTag = vNode => typeof vNode.tag === 'string';
12
12
 
13
13
  const filterWhitespaceNodes = filter(vNode => isTag(vNode) || !containsWhitespaceOnly(vNode));
14
14
  const insertAfterSecondLastItem = insert(-1);