@gitlab/ui 38.0.1 → 38.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (140) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/README.md +1 -1
  3. package/dist/components/base/breadcrumb/breadcrumb.js +10 -5
  4. package/dist/components/base/{filtered_search/examples/filtered_search.single_unique.example.js → breadcrumb/breadcrumb_item.js} +32 -28
  5. package/dist/components/base/dropdown/dropdown.documentation.js +1 -5
  6. package/dist/components/base/dropdown/dropdown_item.documentation.js +2 -3
  7. package/dist/components/base/filtered_search/filtered_search.documentation.js +2 -66
  8. package/dist/components/base/filtered_search/filtered_search.js +51 -20
  9. package/dist/components/base/filtered_search/filtered_search_suggestion.documentation.js +2 -8
  10. package/dist/components/base/filtered_search/filtered_search_suggestion.js +5 -1
  11. package/dist/components/base/filtered_search/filtered_search_suggestion_list.documentation.js +2 -7
  12. package/dist/components/base/filtered_search/filtered_search_suggestion_list.js +4 -0
  13. package/dist/components/base/filtered_search/filtered_search_term.documentation.js +2 -44
  14. package/dist/components/base/filtered_search/filtered_search_term.js +37 -0
  15. package/dist/components/base/filtered_search/filtered_search_token.documentation.js +2 -31
  16. package/dist/components/base/filtered_search/filtered_search_token.js +80 -23
  17. package/dist/components/base/filtered_search/filtered_search_token_segment.documentation.js +2 -46
  18. package/dist/components/base/filtered_search/filtered_search_token_segment.js +48 -0
  19. package/dist/components/base/filtered_search/filtered_search_utils.js +42 -9
  20. package/dist/components/base/form/form_checkbox_tree/form_checkbox_tree.documentation.js +2 -27
  21. package/dist/components/base/form/form_checkbox_tree/form_checkbox_tree.js +16 -1
  22. package/dist/components/charts/series_label/series_label.js +6 -1
  23. package/dist/index.css +1 -1
  24. package/dist/index.css.map +1 -1
  25. package/dist/utils/use_mock_intersection_observer.js +2 -2
  26. package/documentation/components_documentation.js +0 -4
  27. package/documentation/documented_stories.js +10 -1
  28. package/package.json +11 -9
  29. package/src/components/base/avatar_link/avatar_link.stories.js +2 -2
  30. package/src/components/base/breadcrumb/breadcrumb.spec.js +24 -10
  31. package/src/components/base/breadcrumb/breadcrumb.vue +11 -6
  32. package/src/components/base/breadcrumb/breadcrumb_item.spec.js +45 -0
  33. package/src/components/base/breadcrumb/breadcrumb_item.vue +43 -0
  34. package/src/components/base/dropdown/dropdown.documentation.js +0 -3
  35. package/src/components/base/dropdown/dropdown.md +7 -2
  36. package/src/components/base/dropdown/dropdown.stories.js +487 -439
  37. package/src/components/base/dropdown/dropdown_item.documentation.js +0 -1
  38. package/src/components/base/dropdown/dropdown_item.md +0 -6
  39. package/src/components/base/dropdown/dropdown_item.stories.js +107 -35
  40. package/src/components/base/filtered_search/filtered_search.documentation.js +0 -76
  41. package/src/components/base/filtered_search/filtered_search.md +3 -4
  42. package/src/components/base/filtered_search/filtered_search.spec.js +37 -12
  43. package/src/components/base/filtered_search/filtered_search.stories.js +260 -17
  44. package/src/components/base/filtered_search/filtered_search.vue +57 -14
  45. package/src/components/base/filtered_search/filtered_search_suggestion.documentation.js +0 -6
  46. package/src/components/base/filtered_search/filtered_search_suggestion.md +1 -7
  47. package/src/components/base/filtered_search/filtered_search_suggestion.stories.js +26 -18
  48. package/src/components/base/filtered_search/filtered_search_suggestion.vue +6 -0
  49. package/src/components/base/filtered_search/filtered_search_suggestion_list.documentation.js +0 -5
  50. package/src/components/base/filtered_search/filtered_search_suggestion_list.md +1 -7
  51. package/src/components/base/filtered_search/filtered_search_suggestion_list.stories.js +33 -25
  52. package/src/components/base/filtered_search/filtered_search_suggestion_list.vue +5 -0
  53. package/src/components/base/filtered_search/filtered_search_term.documentation.js +0 -41
  54. package/src/components/base/filtered_search/filtered_search_term.md +0 -2
  55. package/src/components/base/filtered_search/filtered_search_term.stories.js +33 -26
  56. package/src/components/base/filtered_search/filtered_search_term.vue +54 -0
  57. package/src/components/base/filtered_search/filtered_search_token.documentation.js +0 -26
  58. package/src/components/base/filtered_search/filtered_search_token.md +1 -3
  59. package/src/components/base/filtered_search/filtered_search_token.spec.js +31 -1
  60. package/src/components/base/filtered_search/filtered_search_token.stories.js +137 -132
  61. package/src/components/base/filtered_search/filtered_search_token.vue +93 -21
  62. package/src/components/base/filtered_search/filtered_search_token_segment.documentation.js +0 -43
  63. package/src/components/base/filtered_search/filtered_search_token_segment.md +0 -2
  64. package/src/components/base/filtered_search/filtered_search_token_segment.stories.js +86 -79
  65. package/src/components/base/filtered_search/filtered_search_token_segment.vue +42 -0
  66. package/src/components/base/filtered_search/filtered_search_utils.js +38 -5
  67. package/src/components/base/form/form.stories.js +2 -0
  68. package/src/components/base/form/form_checkbox_tree/form_checkbox_tree.documentation.js +0 -26
  69. package/src/components/base/form/form_checkbox_tree/form_checkbox_tree.md +0 -4
  70. package/src/components/base/form/form_checkbox_tree/form_checkbox_tree.stories.js +123 -92
  71. package/src/components/base/form/form_checkbox_tree/form_checkbox_tree.vue +13 -1
  72. package/src/components/base/form/form_radio/form_radio.spec.js +21 -8
  73. package/src/components/base/form/form_radio_group/form_radio_group.stories.js +2 -1
  74. package/src/components/base/markdown/markdown.scss +21 -0
  75. package/src/components/base/markdown/markdown_typescale_demo.html +17 -6
  76. package/src/components/base/navbar/navbar.stories.js +2 -1
  77. package/src/components/base/skeleton_loader/skeleton_loader.stories.js +67 -21
  78. package/src/components/base/tabs/tabs/tabs.stories.js +2 -2
  79. package/src/components/charts/series_label/series_label.stories.js +6 -3
  80. package/src/components/charts/series_label/series_label.vue +3 -0
  81. package/src/scss/typescale/typescale.md +0 -2
  82. package/src/scss/typescale/typescale.stories.js +17 -4
  83. package/src/utils/use_mock_intersection_observer.js +3 -3
  84. package/dist/components/base/dropdown/dropdown_divider.documentation.js +0 -8
  85. package/dist/components/base/dropdown/dropdown_form.documentation.js +0 -17
  86. package/dist/components/base/dropdown/dropdown_section_header.documentation.js +0 -8
  87. package/dist/components/base/dropdown/dropdown_text.documentation.js +0 -8
  88. package/dist/components/base/dropdown/examples/dropdown.default.example.js +0 -38
  89. package/dist/components/base/dropdown/examples/dropdown.links.example.js +0 -38
  90. package/dist/components/base/dropdown/examples/dropdown.with_avatar_and_secondary_text.example.js +0 -38
  91. package/dist/components/base/dropdown/examples/dropdown.with_checked_items.example.js +0 -38
  92. package/dist/components/base/dropdown/examples/dropdown.with_clear_all.example.js +0 -38
  93. package/dist/components/base/dropdown/examples/dropdown.with_divider.example.js +0 -38
  94. package/dist/components/base/dropdown/examples/dropdown.with_form.example.js +0 -38
  95. package/dist/components/base/dropdown/examples/dropdown.with_header.example.js +0 -38
  96. package/dist/components/base/dropdown/examples/dropdown.with_highlighted_items.example.js +0 -38
  97. package/dist/components/base/dropdown/examples/dropdown.with_icons.example.js +0 -38
  98. package/dist/components/base/dropdown/examples/dropdown.with_right_align.example.js +0 -38
  99. package/dist/components/base/dropdown/examples/dropdown.with_search.example.js +0 -67
  100. package/dist/components/base/dropdown/examples/dropdown.with_section_headers.example.js +0 -38
  101. package/dist/components/base/dropdown/examples/index.js +0 -85
  102. package/dist/components/base/filtered_search/examples/filtered_search.default.example.js +0 -422
  103. package/dist/components/base/filtered_search/examples/filtered_search.friendly.example.js +0 -423
  104. package/dist/components/base/filtered_search/examples/filtered_search.history.example.js +0 -91
  105. package/dist/components/base/filtered_search/examples/filtered_search.multi_select.example.js +0 -196
  106. package/dist/components/base/filtered_search/examples/index.js +0 -32
  107. package/dist/components/base/form/form_checkbox_tree/examples/form_checkbox_tree.basic.example.js +0 -103
  108. package/dist/components/base/form/form_checkbox_tree/examples/index.js +0 -13
  109. package/src/components/base/dropdown/dropdown_divider.documentation.js +0 -6
  110. package/src/components/base/dropdown/dropdown_divider.md +0 -7
  111. package/src/components/base/dropdown/dropdown_divider.stories.js +0 -16
  112. package/src/components/base/dropdown/dropdown_form.documentation.js +0 -9
  113. package/src/components/base/dropdown/dropdown_form.md +0 -4
  114. package/src/components/base/dropdown/dropdown_form.stories.js +0 -17
  115. package/src/components/base/dropdown/dropdown_section_header.documentation.js +0 -6
  116. package/src/components/base/dropdown/dropdown_section_header.stories.js +0 -17
  117. package/src/components/base/dropdown/dropdown_text.documentation.js +0 -6
  118. package/src/components/base/dropdown/dropdown_text.stories.js +0 -16
  119. package/src/components/base/dropdown/examples/dropdown.default.example.vue +0 -7
  120. package/src/components/base/dropdown/examples/dropdown.links.example.vue +0 -7
  121. package/src/components/base/dropdown/examples/dropdown.with_avatar_and_secondary_text.example.vue +0 -7
  122. package/src/components/base/dropdown/examples/dropdown.with_checked_items.example.vue +0 -6
  123. package/src/components/base/dropdown/examples/dropdown.with_clear_all.example.vue +0 -7
  124. package/src/components/base/dropdown/examples/dropdown.with_divider.example.vue +0 -9
  125. package/src/components/base/dropdown/examples/dropdown.with_form.example.vue +0 -10
  126. package/src/components/base/dropdown/examples/dropdown.with_header.example.vue +0 -7
  127. package/src/components/base/dropdown/examples/dropdown.with_highlighted_items.example.vue +0 -9
  128. package/src/components/base/dropdown/examples/dropdown.with_icons.example.vue +0 -43
  129. package/src/components/base/dropdown/examples/dropdown.with_right_align.example.vue +0 -7
  130. package/src/components/base/dropdown/examples/dropdown.with_search.example.vue +0 -38
  131. package/src/components/base/dropdown/examples/dropdown.with_section_headers.example.vue +0 -10
  132. package/src/components/base/dropdown/examples/index.js +0 -99
  133. package/src/components/base/filtered_search/examples/filtered_search.default.example.vue +0 -298
  134. package/src/components/base/filtered_search/examples/filtered_search.friendly.example.vue +0 -300
  135. package/src/components/base/filtered_search/examples/filtered_search.history.example.vue +0 -50
  136. package/src/components/base/filtered_search/examples/filtered_search.multi_select.example.vue +0 -132
  137. package/src/components/base/filtered_search/examples/filtered_search.single_unique.example.vue +0 -31
  138. package/src/components/base/filtered_search/examples/index.js +0 -38
  139. package/src/components/base/form/form_checkbox_tree/examples/form_checkbox_tree.basic.example.vue +0 -77
  140. package/src/components/base/form/form_checkbox_tree/examples/index.js +0 -15
package/CHANGELOG.md CHANGED
@@ -1,3 +1,30 @@
1
+ ## [38.2.1](https://gitlab.com/gitlab-org/gitlab-ui/compare/v38.2.0...v38.2.1) (2022-04-01)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **GlFilteredSearch:** Generate stable token keys ([88dccde](https://gitlab.com/gitlab-org/gitlab-ui/commit/88dccde9f4df1352a7e06e831de8baced4a8d18f))
7
+
8
+ # [38.2.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v38.1.0...v38.2.0) (2022-03-31)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * **GlFilteredSearch:** Stop mutating value prop ([79aa5bc](https://gitlab.com/gitlab-org/gitlab-ui/commit/79aa5bc9712e293e08842c8c0234e29511de3401))
14
+ * **GlFilteredSearch:** Stop mutating value prop ([31808db](https://gitlab.com/gitlab-org/gitlab-ui/commit/31808dbcf6b3c412db7191fe12317009b0d95542))
15
+
16
+
17
+ ### Features
18
+
19
+ * **audio:** Implementation of GitLab Flavoured Markdown audio styles ([e4c613f](https://gitlab.com/gitlab-org/gitlab-ui/commit/e4c613f0892b7b1bf3bd97b17e64e4d2e6492ebe))
20
+
21
+ # [38.1.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v38.0.1...v38.1.0) (2022-03-28)
22
+
23
+
24
+ ### Features
25
+
26
+ * **GlBreadcrumbItem:** implement custom component, add `aria-current="page"` to the last breadcrumb link ([6c246e4](https://gitlab.com/gitlab-org/gitlab-ui/commit/6c246e49d3132be4f0f4d70b0f358af4622a27f6))
27
+
1
28
  ## [38.0.1](https://gitlab.com/gitlab-org/gitlab-ui/compare/v38.0.0...v38.0.1) (2022-03-21)
2
29
 
3
30
 
package/README.md CHANGED
@@ -46,7 +46,7 @@ GitLab UI provides component styles, a utility-class library, and SCSS utilities
46
46
 
47
47
  ## Quick start - development
48
48
 
49
- Make sure you have [Node](https://nodejs.org/en/) 14.x (LTS) and [Yarn](https://yarnpkg.com/) 1.22
49
+ Make sure you have [Node](https://nodejs.org/en/) 16.x (LTS) and [Yarn](https://yarnpkg.com/) 1.22
50
50
  or newer.
51
51
 
52
52
  ```sh
@@ -1,16 +1,17 @@
1
- import { BBreadcrumb, BBreadcrumbItem } from 'bootstrap-vue/esm/index.js';
1
+ import { BBreadcrumb } from 'bootstrap-vue/esm/index.js';
2
2
  import GlIcon from '../icon/icon';
3
3
  import GlButton from '../button/button';
4
4
  import { GlTooltipDirective } from '../../../directives/tooltip';
5
+ import GlBreadcrumbItem from './breadcrumb_item';
5
6
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
6
7
 
7
8
  const COLLAPSE_AT_SIZE = 4;
8
9
  var script = {
9
10
  components: {
10
11
  BBreadcrumb,
11
- BBreadcrumbItem,
12
12
  GlIcon,
13
- GlButton
13
+ GlButton,
14
+ GlBreadcrumbItem
14
15
  },
15
16
  directives: {
16
17
  GlTooltip: GlTooltipDirective
@@ -72,7 +73,7 @@ var script = {
72
73
  this.$refs.firstItem[0].querySelector('a').focus();
73
74
  } catch (e) {
74
75
  /* eslint-disable-next-line no-console */
75
- console.error(`Failed to set focus on the last breadcrumb item.`);
76
+ console.error(`Failed to set focus on the first breadcrumb item.`);
76
77
  }
77
78
  },
78
79
 
@@ -82,6 +83,10 @@ var script = {
82
83
 
83
84
  isItemCollapsed(index) {
84
85
  return this.hasCollapsible && this.isListCollapsed && !this.nonCollapsibleIndices.includes(index);
86
+ },
87
+
88
+ getAriaCurrentAttr(index) {
89
+ return this.isLastItem(index) ? 'page' : false;
85
90
  }
86
91
 
87
92
  }
@@ -91,7 +96,7 @@ var script = {
91
96
  const __vue_script__ = script;
92
97
 
93
98
  /* template */
94
- 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('b-breadcrumb-item',{key:index,ref:_vm.isFirstItem(index) ? 'firstItem' : null,refInFor:true,staticClass:"gl-breadcrumb-item",class:{ 'gl-display-none': _vm.isItemCollapsed(index) },attrs:{"text":item.text,"href":item.href,"to":item.to}},[_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",[_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",[_c('gl-icon',{attrs:{"name":"chevron-right"}})])],2)]:_vm._e()]})],2)],2)};
99
+ 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",[_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",[_c('gl-icon',{attrs:{"name":"chevron-right"}})])],2)]:_vm._e()]})],2)],2)};
95
100
  var __vue_staticRenderFns__ = [];
96
101
 
97
102
  /* style */
@@ -1,41 +1,45 @@
1
+ import { BLink } from 'bootstrap-vue/esm/index.js';
1
2
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
2
3
 
3
- const testTokens = [{
4
- type: 'unique',
5
- title: 'Unique',
6
- icon: 'document',
7
- token: 'gl-filtered-search-token',
8
- operators: [{
9
- value: '=',
10
- description: 'is',
11
- default: 'true'
12
- }],
13
- options: [{
14
- icon: 'heart',
15
- title: 'heart',
16
- value: 1
17
- }, {
18
- icon: 'hook',
19
- title: 'hook',
20
- value: 2
21
- }],
22
- unique: true
23
- }];
24
4
  var script = {
25
- data() {
26
- return {
27
- tokens: testTokens,
28
- value: []
29
- };
30
- }
5
+ components: {
6
+ BLink
7
+ },
8
+ inheritAttrs: false,
9
+ props: {
10
+ text: {
11
+ type: String,
12
+ required: false,
13
+ default: null
14
+ },
15
+ to: {
16
+ type: [String, Object],
17
+ required: false,
18
+ default: null
19
+ },
20
+ href: {
21
+ type: String,
22
+ required: false,
23
+ default: null
24
+ },
25
+ ariaCurrent: {
26
+ type: [String, Boolean],
27
+ required: false,
28
+ default: false,
29
+
30
+ validator(value) {
31
+ return [false, 'page'].indexOf(value) !== -1;
32
+ }
31
33
 
34
+ }
35
+ }
32
36
  };
33
37
 
34
38
  /* script */
35
39
  const __vue_script__ = script;
36
40
 
37
41
  /* template */
38
- var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_vm._v("\n "+_vm._s(_vm.value)+"\n "),_c('gl-filtered-search',{attrs:{"available-tokens":_vm.tokens},model:{value:(_vm.value),callback:function ($$v) {_vm.value=$$v;},expression:"value"}})],1)};
42
+ var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('li',{staticClass:"gl-breadcrumb-item"},[_c('b-link',{attrs:{"href":_vm.href,"to":_vm.to,"aria-current":_vm.ariaCurrent}},[_vm._t("default",[_vm._v(_vm._s(_vm.text))])],2)],1)};
39
43
  var __vue_staticRenderFns__ = [];
40
44
 
41
45
  /* style */
@@ -1,11 +1,7 @@
1
- import examples from './examples';
2
-
3
- var description = "## Usage\n\nThe dropdown component offers a user multiple items or actions to choose from which are initially\ncollapsed behind a button.\n\n### Icon-only dropdown\n\nIcon-only dropdowns must have an accessible name.\nYou can provide this with the combination of `text` and `text-sr-only` props.\n\nOptionally, you can use `no-caret` to remove the caret and `category=\"tertiary\"` to remove the border.\n\n```html\n<gl-dropdown\n icon=\"ellipsis_v\"\n text=\"More actions\"\n :text-sr-only=\"true\"\n category=\"tertiary\"\n no-caret\n>\n```\n\n### Button Content\n\nThere are 3 ways to set the dropdown button's content.\n\n1. Use the `text` attribute. This will display the text with the loading spinner (shown with the\n`loading` attribute), icon (if provided by the `icon` attribute), and dropdown caret:\n\n ```html\n <gl-dropdown text=\"Button text\">\n ```\n\n1. Use the `button-text` template. This allows custom content for the button's text, but keeps the\nloading spinner, icon, and dropdown caret:\n\n ```html\n <gl-dropdown>\n <template #button-text>\n <!-- Loading spinner shown here -->\n <!-- Icon shown here -->\n Custom <strong>Content</strong> with <em>HTML</em> via Slot\n <gl-truncate position=\"middle\" text=\"Truncated button text\"/>\n <!-- Dropdown arrow shown here -->\n </template>\n </gl-dropdown>\n ```\n\n1. Use the `button-content` template. This will replace everything in the button with the template:\n\n ```html\n <gl-dropdown>\n <template #button-content>\n Custom <strong>Content</strong> with <em>HTML</em> via Slot\n </template>\n </gl-dropdown>\n ```\n";
1
+ var description = "The dropdown component offers a user multiple items or actions to choose from which are initially\ncollapsed behind a button.\n\n### Icon-only dropdown\n\nIcon-only dropdowns must have an accessible name.\nYou can provide this with the combination of `text` and `text-sr-only` props.\n\nOptionally, you can use `no-caret` to remove the caret and `category=\"tertiary\"` to remove the border.\n\n```html\n<gl-dropdown\n icon=\"ellipsis_v\"\n text=\"More actions\"\n :text-sr-only=\"true\"\n category=\"tertiary\"\n no-caret\n>\n```\n\n### Button Content\n\nThere are 3 ways to set the dropdown button's content.\n\n1. Use the `text` attribute. This will display the text with the loading spinner (shown with the\n`loading` attribute), icon (if provided by the `icon` attribute), and dropdown caret:\n\n ```html\n <gl-dropdown text=\"Button text\">\n ```\n\n1. Use the `button-text` template. This allows custom content for the button's text, but keeps the\nloading spinner, icon, and dropdown caret:\n\n ```html\n <gl-dropdown>\n <template #button-text>\n <!-- Loading spinner shown here -->\n <!-- Icon shown here -->\n Custom <strong>Content</strong> with <em>HTML</em> via Slot\n <gl-truncate position=\"middle\" text=\"Truncated button text\"/>\n <!-- Dropdown arrow shown here -->\n </template>\n </gl-dropdown>\n ```\n\n1. Use the `button-content` template. This will replace everything in the button with the template:\n\n ```html\n <gl-dropdown>\n <template #button-content>\n Custom <strong>Content</strong> with <em>HTML</em> via Slot\n </template>\n </gl-dropdown>\n ```\n\n### GlDropdownForm\n\nUnlike `b-dropdown-form`, we do _not_ add any additional padding with the `gl-dropdown-form` component.\nThis is to prevent double padding with `gl-dropdown-item` and similar components, so in most cases\nshouldn't be needed. To add padding, either add a padding utility class to your form, or an inner\nelement with some padding.\n";
4
2
 
5
3
  var dropdown_documentation = {
6
4
  description,
7
- bootstrapComponent: 'b-dropdown',
8
- examples,
9
5
  followsDesignSystem: false
10
6
  };
11
7
 
@@ -1,8 +1,7 @@
1
- var description = "# Dropdown Item\n\n<!-- STORY -->\n\n## Usage\n\nThe dropdown item component is meant to be used for clickable entries inside a dropdown component.\nIf you provide the `href` attribute, it renders a link instead of a button.\n";
1
+ var description = "The dropdown item component is meant to be used for clickable entries inside a dropdown component.\nIf you provide the `href` attribute, it renders a link instead of a button.\n";
2
2
 
3
3
  var dropdown_item_documentation = {
4
- description,
5
- bootstrapComponent: 'b-dropdown'
4
+ description
6
5
  };
7
6
 
8
7
  export default dropdown_item_documentation;
@@ -1,6 +1,4 @@
1
- import examples from './examples';
2
-
3
- var filtered_search = "# Filtered Search\n\nThe filtered search component is responsible for managing search with possible filters.\n\n## Usage\n\nEach filter option (named token) requires a separate Vue component. `GlFilteredSearchToken` is an\nexample of such a token.\n\nPrepare array of available token configurations with the following fields:\n\n- `type`: unique identifier of token type\n- `title`: human-readable title of the token\n- `icon`: token icon\n- `token`: (optional) the token Vue component to use (e.g. `AuthorToken`)\n- `dataType`: (optional) identifier of type (for example \"user\") for this filter. Tokens\n of the same type could be switched without losing their values\n- `unique`: (optional) indicate this token could appear only once in the filter\n- `disabled`: (optional) indicate this token should be hidden from the dropdown\n- `operators`: (optional) an array of selectable operators.\n Each array item is an object that must contain `value` and `description`, and optionally `default`\n (e.g. `{ value: '=', description: 'is', default: 'true' }`)\n- `multiSelect`: (optional) when `true`, the suggestions list becomes multi-select instead of single-select.\n It is discouraged to use this together with `unique`, as `unique` is intended for single-select.\n- `options`: (optional) an array of options which the user can pick after the operator has been selected.\n The option object can have the following properties defined: `value`, `icon`, `text`, and `default`\n all of which are expected be of type `string`. If the `default` is omitted, the `value` of the first\n option will be displayed as a suggestion\n- any additional fields required to configure your component\n\nEach token for filtered search is a Vue component with the following props:\n\n- `value`: an object with a `data` property containing the current value, and optionally an\n`operator` value containing the operator value\n- `active`: indicates if the token is currently active. It's the token's responsibility\n to render proper control for editing (for example input).\n- `current-value`: current tokens of the filtered search.\n- `index`: current token position in the filtered search.\n- `config`: additional configuration, supplied in filtered search config for this token.\n\nThe token should emit the following events:\n\n- `activate`: when the token requests activation (for example, when being clicked).\n- `deactivate`: when token requests deactivation (for example due to losing blur on input).\n- `destroy`: when token requests self-destruction (for instance for clicking \"X\" sign).\n- `replace`: token requests its replacement with another token.\n- `split`: token requests adding string values after the current token.\n- `complete`: token indicates its editing is completed.\n\n## Examples\n\nDefine a list of available tokens:\n\n```js\nconst availableTokens = [\n { type: 'static', icon: 'label', title: 'static:token', token: staticToken },\n { type: 'dynamic', icon: 'rocket', title: 'dynamic:~token', token: dynamicToken },\n];\n```\n\nPass the list of tokens to the search component. Optionally, you can use `v-model` to receive\nrealtime updates:\n\n```js\n <gl-filtered-search :available-tokens=\"tokens\" v-model=\"value\" />\n```\n";
1
+ var filtered_search = "The filtered search component is responsible for managing search with possible filters.\n\n## Usage\n\nEach filter option (named token) requires a separate Vue component. `GlFilteredSearchToken` is an\nexample of such a token.\n\nPrepare array of available token configurations with the following fields:\n\n- `type`: unique identifier of token type\n- `title`: human-readable title of the token\n- `icon`: token icon\n- `token`: (optional) the token Vue component to use (e.g. `AuthorToken`)\n- `dataType`: (optional) identifier of type (for example \"user\") for this filter. Tokens\n of the same type could be switched without losing their values\n- `unique`: (optional) indicate this token could appear only once in the filter\n- `disabled`: (optional) indicate this token should be hidden from the dropdown\n- `operators`: (optional) an array of selectable operators.\n Each array item is an object that must contain `value` and `description`, and optionally `default`\n (e.g. `{ value: '=', description: 'is', default: 'true' }`)\n- `multiSelect`: (optional) when `true`, the suggestions list becomes multi-select instead of single-select.\n It is discouraged to use this together with `unique`, as `unique` is intended for single-select.\n- `options`: (optional) an array of options which the user can pick after the operator has been selected.\n The option object can have the following properties defined: `value`, `icon`, `text`, and `default`\n all of which are expected be of type `string`. If the `default` is omitted, the `value` of the first\n option will be displayed as a suggestion\n- any additional fields required to configure your component\n\nEach token for filtered search is a Vue component with the following props:\n\n- `value`: an object with a `data` property containing the current value, and optionally an\n`operator` value containing the operator value\n- `active`: indicates if the token is currently active. It's the token's responsibility\n to render proper control for editing (for example input).\n- `current-value`: current tokens of the filtered search.\n- `index`: current token position in the filtered search.\n- `config`: additional configuration, supplied in filtered search config for this token.\n\nThe token should emit the following events:\n\n- `activate`: when the token requests activation (for example, when being clicked).\n- `deactivate`: when token requests deactivation (for example due to losing blur on input).\n- `destroy`: when token requests self-destruction (for instance for clicking \"X\" sign).\n- `replace`: token requests its replacement with another token.\n- `split`: token requests adding string values after the current token.\n- `complete`: token indicates its editing is completed.\n\n## Examples\n\nDefine a list of available tokens:\n\n```js\nconst availableTokens = [\n { type: 'static', icon: 'label', title: 'static:token', token: staticToken },\n { type: 'dynamic', icon: 'rocket', title: 'dynamic:~token', token: dynamicToken },\n];\n```\n\nPass the list of tokens to the search component. Optionally, you can use `v-model` to receive\nrealtime updates:\n\n```html\n\n<gl-filtered-search :available-tokens=\"tokens\" v-model=\"value\" />\n```\n";
4
2
 
5
3
  var description = /*#__PURE__*/Object.freeze({
6
4
  __proto__: null,
@@ -9,69 +7,7 @@ var description = /*#__PURE__*/Object.freeze({
9
7
 
10
8
  var filtered_search_documentation = {
11
9
  description,
12
- followsDesignSystem: true,
13
- bootstrapComponent: null,
14
- examples,
15
- propsInfo: {
16
- value: {
17
- additionalInfo: 'If provided, used as value of filtered search'
18
- },
19
- historyItems: {
20
- additionalInfo: 'If provided, used as history items for this component'
21
- },
22
- availableTokens: {
23
- additionalInfo: 'Available tokens'
24
- },
25
- placeholder: {
26
- additionalInfo: 'If provided, used as history items for this component'
27
- },
28
- recentSearchesHeader: {
29
- additionalInfo: 'i18n for recent searches title within history dropdown'
30
- },
31
- clearButtonTitle: {
32
- additionalInfo: 'i18n for clear button title'
33
- },
34
- closeButtonTitle: {
35
- additionalInfo: 'i18n for close button title within history dropdown'
36
- },
37
- clearRecentSearchesText: {
38
- additionalInfo: 'i18n for recent searches clear text'
39
- },
40
- suggestionsListClass: {
41
- additionalInfo: 'Additional classes to add to the suggestion list menu. NOTE: this not reactive, and the value must be available and fixed when the component is instantiated'
42
- },
43
- searchButtonAttributes: {
44
- additionalInfo: 'HTML attributes to add to the search button'
45
- },
46
- searchInputAttributes: {
47
- additionalInfo: 'HTML attributes to add to the search input'
48
- }
49
- },
50
- events: [{
51
- event: 'clear',
52
- description: 'Emitted when search is cleared'
53
- }, {
54
- event: 'submit',
55
- args: [{
56
- arg: 'tokens',
57
- description: '(Array)'
58
- }],
59
- description: 'Emitted when search is submitted'
60
- }, {
61
- event: 'history-item-selected',
62
- args: [{
63
- arg: 'value',
64
- description: 'History item'
65
- }],
66
- description: 'Emitted when item from history is selected'
67
- }, {
68
- event: 'clear-history',
69
- description: 'Emitted when clear history button is clicked'
70
- }],
71
- slots: [{
72
- name: 'history-item',
73
- description: 'Slot to customize history item in history dropdown. Used only if using history items'
74
- }]
10
+ followsDesignSystem: true
75
11
  };
76
12
 
77
13
  export default filtered_search_documentation;
@@ -5,27 +5,18 @@ import { GlTooltipDirective } from '../../../directives/tooltip';
5
5
  import GlIcon from '../icon/icon';
6
6
  import GlSearchBoxByClick from '../search_box_by_click/search_box_by_click';
7
7
  import GlFilteredSearchTerm from './filtered_search_term';
8
- import { TERM_TOKEN_TYPE, needDenormalization, denormalizeTokens, isEmptyTerm, INTENT_ACTIVATE_PREVIOUS, normalizeTokens } from './filtered_search_utils';
8
+ import { createTerm, needDenormalization, denormalizeTokens, isEmptyTerm, INTENT_ACTIVATE_PREVIOUS, ensureTokenId, normalizeTokens } from './filtered_search_utils';
9
9
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
10
10
 
11
11
  Vue.use(PortalVue);
12
12
  let portalUuid = 0;
13
13
 
14
- function createTerm() {
15
- let data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
16
- return {
17
- type: TERM_TOKEN_TYPE,
18
- value: {
19
- data
20
- }
21
- };
22
- }
23
-
24
14
  function initialState() {
25
15
  return [createTerm()];
26
16
  }
27
17
 
28
18
  var script = {
19
+ name: 'GlFilteredSearch',
29
20
  components: {
30
21
  GlSearchBoxByClick,
31
22
  GlIcon
@@ -49,16 +40,27 @@ var script = {
49
40
 
50
41
  inheritAttrs: false,
51
42
  props: {
43
+ /**
44
+ * If provided, used as value of filtered search
45
+ */
52
46
  value: {
53
47
  required: false,
54
48
  type: Array,
55
49
  default: () => []
56
50
  },
51
+
52
+ /**
53
+ * Available tokens
54
+ */
57
55
  availableTokens: {
58
56
  type: Array,
59
57
  required: false,
60
58
  default: () => []
61
59
  },
60
+
61
+ /**
62
+ * If provided, used as history items for this component
63
+ */
62
64
  placeholder: {
63
65
  type: String,
64
66
  required: false,
@@ -74,21 +76,38 @@ var script = {
74
76
  required: false,
75
77
  default: null
76
78
  },
79
+
80
+ /**
81
+ * Additional classes to add to the suggestion list menu. NOTE: this not reactive, and the value
82
+ * must be available and fixed when the component is instantiated
83
+ */
77
84
  suggestionsListClass: {
78
85
  type: [String, Array, Object],
79
86
  required: false,
80
87
  default: null
81
88
  },
89
+
90
+ /**
91
+ * Display operators' descriptions instead of their values (e.g., "is" instead of "=").
92
+ */
82
93
  showFriendlyText: {
83
94
  type: Boolean,
84
95
  required: false,
85
96
  default: false
86
97
  },
98
+
99
+ /**
100
+ * HTML attributes to add to the search button
101
+ */
87
102
  searchButtonAttributes: {
88
103
  type: Object,
89
104
  required: false,
90
105
  default: () => ({})
91
106
  },
107
+
108
+ /**
109
+ * HTML attributes to add to the search input
110
+ */
92
111
  searchInputAttributes: {
93
112
  type: Object,
94
113
  required: false,
@@ -143,9 +162,22 @@ var script = {
143
162
  watch: {
144
163
  tokens: {
145
164
  handler() {
165
+ if (process.env.NODE_ENV !== 'production') {
166
+ const invalidToken = this.tokens.find(token => !token.id);
167
+
168
+ if (invalidToken) {
169
+ throw new Error(`Token does not have an id:\n${JSON.stringify(invalidToken)}`);
170
+ }
171
+ }
172
+
146
173
  if (this.tokens.length === 0 || !this.isLastTokenEmpty()) {
147
174
  this.tokens.push(createTerm());
148
175
  }
176
+ /**
177
+ * Emitted when the tokens (value) changes
178
+ * @property {array} tokens
179
+ */
180
+
149
181
 
150
182
  this.$emit('input', this.tokens);
151
183
  },
@@ -244,12 +276,12 @@ var script = {
244
276
  },
245
277
 
246
278
  replaceToken(idx, token) {
247
- this.$set(this.tokens, idx, { ...token,
279
+ this.$set(this.tokens, idx, ensureTokenId({ ...token,
248
280
  value: {
249
281
  data: '',
250
282
  ...token.value
251
283
  }
252
- });
284
+ }));
253
285
  this.activeTokenIdx = idx;
254
286
  },
255
287
 
@@ -261,12 +293,7 @@ var script = {
261
293
  return;
262
294
  }
263
295
 
264
- const newTokens = newStrings.map(data => ({
265
- type: TERM_TOKEN_TYPE,
266
- value: {
267
- data
268
- }
269
- }));
296
+ const newTokens = newStrings.map(data => createTerm(data));
270
297
  this.tokens.splice(idx + 1, 0, ...newTokens);
271
298
  this.activeTokenIdx = idx + newStrings.length;
272
299
  },
@@ -280,6 +307,10 @@ var script = {
280
307
  },
281
308
 
282
309
  submit() {
310
+ /**
311
+ * Emitted when search is submitted
312
+ * @property {array} tokens
313
+ */
283
314
  this.$emit('submit', normalizeTokens(_cloneDeep(this.tokens)));
284
315
  },
285
316
 
@@ -295,7 +326,7 @@ var script = {
295
326
  const __vue_script__ = script;
296
327
 
297
328
  /* template */
298
- 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,"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"},[_vm._l((_vm.tokens),function(token,idx){return [_c(_vm.getTokenComponent(token.type),{key:((token.type) + "-" + idx),ref:"tokens",refInFor:true,tag:"component",staticClass:"gl-filtered-search-item",class:{
329
+ 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,"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"},[_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:{
299
330
  'gl-filtered-search-last-item': _vm.isLastToken(idx),
300
331
  },attrs:{"config":_vm.getTokenEntry(token.type),"active":_vm.activeTokenIdx === idx,"available-tokens":_vm.currentAvailableTokens,"current-value":_vm.tokens,"index":idx,"placeholder":_vm.termPlaceholder,"show-friendly-text":_vm.showFriendlyText,"search-input-attributes":_vm.searchInputAttributes,"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)}},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))};
301
332
  var __vue_staticRenderFns__ = [];
@@ -1,13 +1,7 @@
1
- var description = "# Filtered Search Suggestion\n\n<!-- STORY -->\n\n## Usage\n\nThe filtered search suggestion component is a wrapper around `GlDropdownItem`, which registers\nsuggestions in a top-level suggestion list:\n\n```js\n<gl-filtered-search-suggestion-list>\n <gl-filtered-search-suggestion value=\"foo\">Example suggestion</gl-filtered-search-suggestion>\n <gl-filtered-search-suggestion value=\"bar\">Example suggestion 2</gl-filtered-search-suggestion>\n</gl-filtered-search-suggestion-list>\n```\n";
1
+ var description = "The filtered search suggestion component is a wrapper around `GlDropdownItem`, which registers\nsuggestions in a top-level suggestion list:\n\n```html\n<gl-filtered-search-suggestion-list>\n <gl-filtered-search-suggestion value=\"foo\">Example suggestion</gl-filtered-search-suggestion>\n <gl-filtered-search-suggestion value=\"bar\">Example suggestion 2</gl-filtered-search-suggestion>\n</gl-filtered-search-suggestion-list>\n```\n";
2
2
 
3
3
  var filtered_search_suggestion_documentation = {
4
- description,
5
- bootstrapComponent: 'b-dropdown-item',
6
- propsInfo: {
7
- value: {
8
- additionalInfo: 'Value which will be emitted if this suggestion will be selected in list'
9
- }
10
- }
4
+ description
11
5
  };
12
6
 
13
7
  export default filtered_search_suggestion_documentation;
@@ -2,12 +2,16 @@ import GlDropdownItem from '../dropdown/dropdown_item';
2
2
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
3
3
 
4
4
  var script = {
5
+ name: 'GlFilteredSearchSuggestion',
5
6
  components: {
6
7
  GlDropdownItem
7
8
  },
8
9
  inject: ['filteredSearchSuggestionListInstance'],
9
10
  inheritAttrs: false,
10
11
  props: {
12
+ /**
13
+ * Value that will be emitted if this suggestion is selected.
14
+ */
11
15
  value: {
12
16
  required: true,
13
17
  validator: () => true
@@ -55,7 +59,7 @@ var script = {
55
59
  const __vue_script__ = script;
56
60
 
57
61
  /* template */
58
- var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('gl-dropdown-item',_vm._b({ref:"item",staticClass:"gl-filtered-search-suggestion",class:{ 'gl-filtered-search-suggestion-active': _vm.isActive },attrs:{"href":"#"},nativeOn:{"mousedown":function($event){$event.preventDefault();return _vm.emitValue($event)}}},'gl-dropdown-item',_vm.$attrs,false),[_vm._t("default")],2)};
62
+ var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('gl-dropdown-item',_vm._b({ref:"item",staticClass:"gl-filtered-search-suggestion",class:{ 'gl-filtered-search-suggestion-active': _vm.isActive },attrs:{"data-testid":"filtered-search-suggestion","href":"#"},nativeOn:{"mousedown":function($event){$event.preventDefault();return _vm.emitValue($event)}}},'gl-dropdown-item',_vm.$attrs,false),[_vm._t("default")],2)};
59
63
  var __vue_staticRenderFns__ = [];
60
64
 
61
65
  /* style */
@@ -1,12 +1,7 @@
1
- var description = "# Filtered Search Suggestion\n\n<!-- STORY -->\n\n## Usage\n\nThe filtered search suggestion list component is responsible for managing underlying suggestion instances.\nYou obtain the ref for this component and manage suggestion selection via the component public API:\n\n- `getValue()` - Retrieves the current selected suggestion.\n- `nextItem()` - Selects the next suggestion. If last suggestion was selected, selection is cleared.\n- `prevItem()` - Selects the previous suggestion. If first suggestion was selected, selection is cleared.\n\n```js\n<gl-filtered-search-suggestion-list ref=\"suggestions\">\n <gl-filtered-search-suggestion value=\"foo\">Example suggestion</gl-filtered-search-suggestion>\n <gl-filtered-search-suggestion value=\"bar\">Example suggestion 2</gl-filtered-search-suggestion>\n</gl-filtered-search-suggestion-list>\n```\n";
1
+ var description = "The filtered search suggestion list component is responsible for managing underlying suggestion instances.\nYou obtain the ref for this component and manage suggestion selection via the component public API:\n\n- `getValue()` - Retrieves the current selected suggestion.\n- `nextItem()` - Selects the next suggestion. If last suggestion was selected, selection is cleared.\n- `prevItem()` - Selects the previous suggestion. If first suggestion was selected, selection is cleared.\n\n```html\n<gl-filtered-search-suggestion-list ref=\"suggestions\">\n <gl-filtered-search-suggestion value=\"foo\">Example suggestion</gl-filtered-search-suggestion>\n <gl-filtered-search-suggestion value=\"bar\">Example suggestion 2</gl-filtered-search-suggestion>\n</gl-filtered-search-suggestion-list>\n```\n";
2
2
 
3
3
  var filtered_search_suggestion_list_documentation = {
4
- description,
5
- propsInfo: {
6
- initialValue: {
7
- additionalInfo: 'Value to be initially selected in list'
8
- }
9
- }
4
+ description
10
5
  };
11
6
 
12
7
  export default filtered_search_suggestion_list_documentation;
@@ -1,6 +1,7 @@
1
1
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
2
2
 
3
3
  var script = {
4
+ name: 'GlFilteredSearchSuggestionList',
4
5
  inject: ['suggestionsListClass'],
5
6
 
6
7
  provide() {
@@ -10,6 +11,9 @@ var script = {
10
11
  },
11
12
 
12
13
  props: {
14
+ /**
15
+ * Value to be initially selected in list.
16
+ */
13
17
  initialValue: {
14
18
  required: false,
15
19
  validator: () => true,
@@ -1,4 +1,4 @@
1
- var filtered_search_term = "# Filtered Search Term\n\nThe filtered search term is a component for managing \"free input\" in the filtered search component.\nIt is responsible for autocompleting available tokens and \"converting\" to a relevant\ncomponent when an autocomplete item is selected.\n\n## Usage\n\nThis component is internal and is not intended to be used by `@gitlab/ui` users.\n";
1
+ var filtered_search_term = "The filtered search term is a component for managing \"free input\" in the filtered search component.\nIt is responsible for autocompleting available tokens and \"converting\" to a relevant\ncomponent when an autocomplete item is selected.\n\n## Usage\n\nThis component is internal and is not intended to be used by `@gitlab/ui` users.\n";
2
2
 
3
3
  var description = /*#__PURE__*/Object.freeze({
4
4
  __proto__: null,
@@ -6,49 +6,7 @@ var description = /*#__PURE__*/Object.freeze({
6
6
  });
7
7
 
8
8
  var filtered_search_term_documentation = {
9
- description,
10
- bootstrapComponent: null,
11
- propsInfo: {
12
- availableTokens: {
13
- additionalInfo: 'Tokens available for this filtered search instance'
14
- },
15
- active: {
16
- additionalInfo: 'If this term token is currently active'
17
- },
18
- value: {
19
- additionalInfo: 'Current term value'
20
- },
21
- searchInputAttributes: {
22
- additionalInfo: 'HTML attributes to add to the search input'
23
- },
24
- isLastToken: {
25
- additionalInfo: 'If this is the last token'
26
- }
27
- },
28
- events: [{
29
- event: 'activate',
30
- description: 'Emitted when this term token is clicked'
31
- }, {
32
- event: 'deactivate',
33
- description: 'Emitted when this term token loses its focus'
34
- }, {
35
- event: 'destroy',
36
- description: 'Emitted when token value is empty and backspace is pressed'
37
- }, {
38
- event: 'replace',
39
- args: [{
40
- arg: 'token',
41
- description: '(Object) Replacement token configuration'
42
- }],
43
- description: 'Emitted when autocomplete entry is selected'
44
- }, {
45
- event: 'split',
46
- args: [{
47
- arg: 'newTokens',
48
- description: '(Array) Token configurations'
49
- }],
50
- description: 'Emitted when Space is pressed in-between term text'
51
- }]
9
+ description
52
10
  };
53
11
 
54
12
  export default filtered_search_term_documentation;