@gitlab/ui 37.4.0 → 37.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/dist/components/base/accordion/accordion_item.js +14 -1
  3. package/dist/components/base/datepicker/datepicker.documentation.js +2 -47
  4. package/dist/components/base/datepicker/datepicker.js +37 -1
  5. package/dist/components/base/filtered_search/filtered_search_term.js +6 -1
  6. package/dist/components/base/filtered_search/filtered_search_token_segment.js +10 -1
  7. package/dist/index.css +1 -1
  8. package/dist/index.css.map +1 -1
  9. package/documentation/documented_stories.js +1 -0
  10. package/package.json +1 -1
  11. package/src/components/base/accordion/accordion_item.spec.js +12 -0
  12. package/src/components/base/accordion/accordion_item.stories.js +4 -2
  13. package/src/components/base/accordion/accordion_item.vue +12 -1
  14. package/src/components/base/datepicker/datepicker.documentation.js +0 -59
  15. package/src/components/base/datepicker/datepicker.md +0 -6
  16. package/src/components/base/datepicker/datepicker.stories.js +97 -71
  17. package/src/components/base/datepicker/datepicker.vue +36 -1
  18. package/src/components/base/dropdown/dropdown.stories.js +4 -1
  19. package/src/components/base/dropdown/dropdown_section_header.scss +1 -0
  20. package/src/components/base/filtered_search/filtered_search.spec.js +12 -0
  21. package/src/components/base/filtered_search/filtered_search_term.spec.js +8 -2
  22. package/src/components/base/filtered_search/filtered_search_term.vue +6 -0
  23. package/src/components/base/filtered_search/filtered_search_token_segment.spec.js +46 -37
  24. package/src/components/base/filtered_search/filtered_search_token_segment.vue +14 -1
  25. package/src/components/base/form/form_select/form_select.spec.js +8 -4
  26. package/dist/components/base/datepicker/examples/datepicker.basic.example.js +0 -48
  27. package/dist/components/base/datepicker/examples/datepicker.custom_input.example.js +0 -48
  28. package/dist/components/base/datepicker/examples/datepicker.disabled.example.js +0 -48
  29. package/dist/components/base/datepicker/examples/datepicker.open_on_focus.example.js +0 -48
  30. package/dist/components/base/datepicker/examples/datepicker.with_clear_button.example.js +0 -48
  31. package/dist/components/base/datepicker/examples/index.js +0 -32
  32. package/src/components/base/datepicker/examples/datepicker.basic.example.vue +0 -12
  33. package/src/components/base/datepicker/examples/datepicker.custom_input.example.vue +0 -21
  34. package/src/components/base/datepicker/examples/datepicker.disabled.example.vue +0 -12
  35. package/src/components/base/datepicker/examples/datepicker.open_on_focus.example.vue +0 -12
  36. package/src/components/base/datepicker/examples/datepicker.with_clear_button.example.vue +0 -12
  37. package/src/components/base/datepicker/examples/index.js +0 -38
package/CHANGELOG.md CHANGED
@@ -1,3 +1,29 @@
1
+ # [37.5.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v37.4.2...v37.5.0) (2022-03-10)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **GlDropdown:** Wrap text in dropdown section header ([1408742](https://gitlab.com/gitlab-org/gitlab-ui/commit/140874226a351da03522b7b45ef4428443162a79))
7
+
8
+
9
+ ### Features
10
+
11
+ * **GlAccordionItem:** Add titleVisible property ([f8626aa](https://gitlab.com/gitlab-org/gitlab-ui/commit/f8626aa2a343d4159efddf6aacbdbaad6593eb27))
12
+
13
+ ## [37.4.2](https://gitlab.com/gitlab-org/gitlab-ui/compare/v37.4.1...v37.4.2) (2022-03-09)
14
+
15
+
16
+ ### Bug Fixes
17
+
18
+ * **GlFilteredSearch:** fix duplicate input attributes ([ea498b9](https://gitlab.com/gitlab-org/gitlab-ui/commit/ea498b9d114c86804d2885b645770ce53d178f4d))
19
+
20
+ ## [37.4.1](https://gitlab.com/gitlab-org/gitlab-ui/compare/v37.4.0...v37.4.1) (2022-03-07)
21
+
22
+
23
+ ### Bug Fixes
24
+
25
+ * **danger:** fix conventional commits url ([7ec70ef](https://gitlab.com/gitlab-org/gitlab-ui/commit/7ec70efae259272d2bd19654eaab64a33ab98fad))
26
+
1
27
  # [37.4.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v37.3.0...v37.4.0) (2022-03-07)
2
28
 
3
29
 
@@ -24,6 +24,15 @@ var script = {
24
24
  required: true
25
25
  },
26
26
 
27
+ /*
28
+ Used to set the title of accordion link when the content is visible
29
+ */
30
+ titleVisible: {
31
+ type: String,
32
+ default: null,
33
+ required: false
34
+ },
35
+
27
36
  /*
28
37
  When set, it will ensure the accordion item is initially visible
29
38
  */
@@ -67,6 +76,10 @@ var script = {
67
76
 
68
77
  icon() {
69
78
  return this.isVisible ? 'chevron-down' : 'chevron-right';
79
+ },
80
+
81
+ buttonTitle() {
82
+ return this.isVisible && this.titleVisible ? this.titleVisible : this.title;
70
83
  }
71
84
 
72
85
  }
@@ -76,7 +89,7 @@ var script = {
76
89
  const __vue_script__ = script;
77
90
 
78
91
  /* template */
79
- var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"gl-accordion-item"},[_c(_vm.headerComponent,{tag:"component",staticClass:"gl-accordion-item-header"},[_c('gl-button',{directives:[{name:"gl-collapse-toggle",rawName:"v-gl-collapse-toggle",value:(_vm.accordionItemId),expression:"accordionItemId"}],attrs:{"variant":"link","button-text-classes":"gl-display-flex","icon":_vm.icon}},[_vm._v("\n "+_vm._s(_vm.title)+"\n ")])],1),_vm._v(" "),_c('b-collapse',{staticClass:"gl-mt-3 gl-font-base",attrs:{"id":_vm.accordionItemId,"visible":_vm.isVisible,"accordion":_vm.accordion,"data-testid":("accordion-item-collapse-" + _vm.accordionItemId)},model:{value:(_vm.isVisible),callback:function ($$v) {_vm.isVisible=$$v;},expression:"isVisible"}},[_vm._t("default")],2)],1)};
92
+ var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"gl-accordion-item"},[_c(_vm.headerComponent,{tag:"component",staticClass:"gl-accordion-item-header"},[_c('gl-button',{directives:[{name:"gl-collapse-toggle",rawName:"v-gl-collapse-toggle",value:(_vm.accordionItemId),expression:"accordionItemId"}],attrs:{"variant":"link","button-text-classes":"gl-display-flex","icon":_vm.icon}},[_vm._v("\n "+_vm._s(_vm.buttonTitle)+"\n ")])],1),_vm._v(" "),_c('b-collapse',{staticClass:"gl-mt-3 gl-font-base",attrs:{"id":_vm.accordionItemId,"visible":_vm.isVisible,"accordion":_vm.accordion,"data-testid":("accordion-item-collapse-" + _vm.accordionItemId)},model:{value:(_vm.isVisible),callback:function ($$v) {_vm.isVisible=$$v;},expression:"isVisible"}},[_vm._t("default")],2)],1)};
80
93
  var __vue_staticRenderFns__ = [];
81
94
 
82
95
  /* style */
@@ -1,52 +1,7 @@
1
- import examples from './examples';
2
-
3
- var description = "# Datepicker\n\n<!-- STORY -->\n\n## Usage\n\nDate picker allows users to choose and input a date by manually typing the date into the input field\nor by using a calendar-like dropdown.\n\n### Warning\n\nBe careful when binding a date value using `value` prop. `value` is a watched property and Date\npicker will emit `input` event on _initial load_. Alternatively, use `defaultDate` to set the\ninitial date then receive updated date values through `input` events.\n";
1
+ var description = "Date picker allows users to choose and input a date by manually typing the date into the input field\nor by using a calendar-like dropdown.\n\n### Warning\n\nBe careful when binding a date value using `value` prop. `value` is a watched property and Date\npicker will emit `input` event on _initial load_. Alternatively, use `defaultDate` to set the\ninitial date then receive updated date values through `input` events.\n";
4
2
 
5
3
  var datepicker_documentation = {
6
- description,
7
- examples,
8
- propsInfo: {
9
- target: {
10
- additionalInfo: 'Selector of element that triggers the datepicker. Defaults to the calendar icon. Pass `null` to trigger on input focus.'
11
- },
12
- container: {
13
- additionalInfo: 'DOM node to render calendar into. Defaults to the datepicker container. Pass `null` to use Pikaday default.'
14
- },
15
- disableDayFn: {
16
- additionalInfo: 'Accepts a function that accepts a date as argument and returns true if the date is disabled.'
17
- },
18
- autocomplete: {
19
- additionalInfo: 'Defaults to `off` when datepicker opens on focus, otherwise defaults to `null`.'
20
- },
21
- defaultDate: {
22
- additionalInfo: 'Use this prop to set the initial date for the datepicker.'
23
- }
24
- },
25
- events: [{
26
- event: 'input',
27
- description: 'Emitted when a new date has been selected.',
28
- args: [{
29
- arg: 'date',
30
- description: 'The selected date'
31
- }]
32
- }, {
33
- event: 'close',
34
- description: 'Emitted when the datepicker is hidden.'
35
- }, {
36
- event: 'open',
37
- description: 'Emitted when the datepicker becomes visible.'
38
- }, {
39
- event: 'draw',
40
- description: 'Emitted when the datepicker draws a new month.'
41
- }, {
42
- event: 'clear',
43
- description: 'Emitted when the clear button is clicked.'
44
- }],
45
- slots: [{
46
- name: 'default',
47
- description: '(optional) Input to display and bind the datepicker to. Defaults to `<gl-form-input />`',
48
- scopedProps: `{ formattedDate: string }`
49
- }]
4
+ description
50
5
  };
51
6
 
52
7
  export default datepicker_documentation;
@@ -50,11 +50,18 @@ var script = {
50
50
  GlButton
51
51
  },
52
52
  props: {
53
+ /**
54
+ * Selector of element that triggers the datepicker. Defaults to the calendar icon. Pass `null` to trigger on input focus.
55
+ */
53
56
  target: {
54
57
  type: String,
55
58
  required: false,
56
59
  default: ''
57
60
  },
61
+
62
+ /**
63
+ * DOM node to render calendar into. Defaults to the datepicker container. Pass `null` to use Pikaday default.
64
+ */
58
65
  container: {
59
66
  type: String,
60
67
  required: false,
@@ -85,6 +92,10 @@ var script = {
85
92
  required: false,
86
93
  default: null
87
94
  },
95
+
96
+ /**
97
+ * Accepts a function that accepts a date as argument and returns true if the date is disabled.
98
+ */
88
99
  disableDayFn: {
89
100
  type: Function,
90
101
  required: false,
@@ -105,6 +116,10 @@ var script = {
105
116
  required: false,
106
117
  default: defaultDateFormat
107
118
  },
119
+
120
+ /**
121
+ * Defaults to `off` when datepicker opens on focus, otherwise defaults to `null`.
122
+ */
108
123
  autocomplete: {
109
124
  type: String,
110
125
  required: false,
@@ -125,6 +140,10 @@ var script = {
125
140
  required: false,
126
141
  default: false
127
142
  },
143
+
144
+ /**
145
+ * Use this prop to set the initial date for the datepicker.
146
+ */
128
147
  defaultDate: {
129
148
  type: Date,
130
149
  required: false,
@@ -289,23 +308,40 @@ var script = {
289
308
 
290
309
  methods: {
291
310
  selected(date) {
311
+ /**
312
+ * Emitted when a new date has been selected.
313
+ * @property {Date} date The selected date
314
+ */
292
315
  this.$emit('input', date);
293
316
  },
294
317
 
295
318
  closed() {
319
+ /**
320
+ * Emitted when the datepicker is hidden.
321
+ */
296
322
  this.$emit('close');
297
323
  },
298
324
 
299
325
  opened() {
326
+ /**
327
+ * Emitted when the datepicker becomes visible.
328
+ */
300
329
  this.$emit('open');
301
330
  },
302
331
 
303
332
  cleared() {
304
333
  this.textInput = '';
334
+ /**
335
+ * Emitted when the clear button is clicked.
336
+ */
337
+
305
338
  this.$emit('clear');
306
339
  },
307
340
 
308
341
  draw() {
342
+ /**
343
+ * Emitted when the datepicker draws a new month.
344
+ */
309
345
  this.$emit('monthChange');
310
346
  },
311
347
 
@@ -324,7 +360,7 @@ var script = {
324
360
  const __vue_script__ = script;
325
361
 
326
362
  /* template */
327
- var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"gl-datepicker d-inline-block"},[(_vm.showDefaultField)?_c('div',{staticClass:"position-relative"},[_vm._t("default",[_c('gl-form-input',{staticClass:"gl-datepicker-input",class:_vm.renderClearButton ? 'gl-pr-9!' : 'gl-pr-7!',attrs:{"id":_vm.inputId,"name":_vm.inputName,"data-testid":"gl-datepicker-input","value":_vm.formattedDate,"placeholder":_vm.placeholder,"autocomplete":_vm.inputAutocomplete,"disabled":_vm.disabled,"aria-label":_vm.inputLabel},on:{"keydown":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"enter",13,$event.key,"Enter")){ return null; }return _vm.onKeydown($event)}},model:{value:(_vm.textInput),callback:function ($$v) {_vm.textInput=$$v;},expression:"textInput"}})],{"formattedDate":_vm.formattedDate}),_vm._v(" "),_c('div',{staticClass:"gl-datepicker-actions"},[(_vm.renderClearButton)?_c('gl-button',{staticClass:"gl-pointer-events-auto",attrs:{"data-testid":"clear-button","aria-label":"Clear date","category":"tertiary","size":"small","icon":"clear"},on:{"click":_vm.cleared}}):_vm._e(),_vm._v(" "),(_vm.triggerOnFocus || _vm.disabled)?_c('span',{staticClass:"gl-px-2",class:_vm.disabled ? 'gl-text-gray-400' : 'gl-text-gray-500',attrs:{"data-testid":"datepicker-calendar-icon"}},[_c('gl-icon',{staticClass:"gl-display-block",attrs:{"name":"calendar","size":16}})],1):_c('gl-button',{ref:"calendarTriggerBtn",staticClass:"gl-pointer-events-auto",attrs:{"aria-label":"Open datepicker","category":"tertiary","size":"small","icon":"calendar"}})],1)],2):_vm._t("default",null,{"formattedDate":_vm.formattedDate})],2)};
363
+ var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"gl-datepicker d-inline-block"},[(_vm.showDefaultField)?_c('div',{staticClass:"gl-relative"},[_vm._t("default",[_c('gl-form-input',{staticClass:"gl-datepicker-input",class:_vm.renderClearButton ? 'gl-pr-9!' : 'gl-pr-7!',attrs:{"id":_vm.inputId,"name":_vm.inputName,"data-testid":"gl-datepicker-input","value":_vm.formattedDate,"placeholder":_vm.placeholder,"autocomplete":_vm.inputAutocomplete,"disabled":_vm.disabled,"aria-label":_vm.inputLabel},on:{"keydown":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"enter",13,$event.key,"Enter")){ return null; }return _vm.onKeydown($event)}},model:{value:(_vm.textInput),callback:function ($$v) {_vm.textInput=$$v;},expression:"textInput"}})],{"formattedDate":_vm.formattedDate}),_vm._v(" "),_c('div',{staticClass:"gl-datepicker-actions"},[(_vm.renderClearButton)?_c('gl-button',{staticClass:"gl-pointer-events-auto",attrs:{"data-testid":"clear-button","aria-label":"Clear date","category":"tertiary","size":"small","icon":"clear"},on:{"click":_vm.cleared}}):_vm._e(),_vm._v(" "),(_vm.triggerOnFocus || _vm.disabled)?_c('span',{staticClass:"gl-px-2",class:_vm.disabled ? 'gl-text-gray-400' : 'gl-text-gray-500',attrs:{"data-testid":"datepicker-calendar-icon"}},[_c('gl-icon',{staticClass:"gl-display-block",attrs:{"name":"calendar","size":16}})],1):_c('gl-button',{ref:"calendarTriggerBtn",staticClass:"gl-pointer-events-auto",attrs:{"aria-label":"Open datepicker","category":"tertiary","size":"small","icon":"calendar"}})],1)],2):_vm._t("default",null,{"formattedDate":_vm.formattedDate})],2)};
328
364
  var __vue_staticRenderFns__ = [];
329
365
 
330
366
  /* style */
@@ -39,6 +39,11 @@ var script = {
39
39
  type: Boolean,
40
40
  required: false,
41
41
  default: false
42
+ },
43
+ currentValue: {
44
+ type: Array,
45
+ required: false,
46
+ default: () => []
42
47
  }
43
48
  },
44
49
  computed: {
@@ -65,7 +70,7 @@ var script = {
65
70
  const __vue_script__ = script;
66
71
 
67
72
  /* template */
68
- var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"gl-h-auto gl-filtered-search-term"},[_c('gl-filtered-search-token-segment',{staticClass:"gl-filtered-search-term-token",class:{ 'gl-w-full': _vm.placeholder },attrs:{"active":_vm.active,"search-input-attributes":_vm.searchInputAttributes,"is-last-token":_vm.isLastToken},on:{"activate":function($event){return _vm.$emit('activate')},"deactivate":function($event){return _vm.$emit('deactivate')},"complete":function($event){return _vm.$emit('replace', { type: $event })},"backspace":function($event){return _vm.$emit('destroy')},"submit":function($event){return _vm.$emit('submit')},"split":function($event){return _vm.$emit('split', $event)}},scopedSlots:_vm._u([{key:"suggestions",fn:function(){return _vm._l((_vm.suggestedTokens),function(item,idx){return _c('gl-filtered-search-suggestion',{key:idx,attrs:{"value":item.type,"icon-name":item.icon}},[_vm._v("\n "+_vm._s(item.title)+"\n ")])})},proxy:true},{key:"view",fn:function(){return [(_vm.placeholder)?_c('input',_vm._b({staticClass:"gl-filtered-search-term-input",attrs:{"placeholder":_vm.placeholder,"aria-label":_vm.placeholder}},'input',_vm.searchInputAttributes,false)):[_vm._v(_vm._s(_vm.value.data))]]},proxy:true}]),model:{value:(_vm.internalValue),callback:function ($$v) {_vm.internalValue=$$v;},expression:"internalValue"}})],1)};
73
+ var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"gl-h-auto gl-filtered-search-term"},[_c('gl-filtered-search-token-segment',{staticClass:"gl-filtered-search-term-token",class:{ 'gl-w-full': _vm.placeholder },attrs:{"active":_vm.active,"search-input-attributes":_vm.searchInputAttributes,"is-last-token":_vm.isLastToken,"current-value":_vm.currentValue},on:{"activate":function($event){return _vm.$emit('activate')},"deactivate":function($event){return _vm.$emit('deactivate')},"complete":function($event){return _vm.$emit('replace', { type: $event })},"backspace":function($event){return _vm.$emit('destroy')},"submit":function($event){return _vm.$emit('submit')},"split":function($event){return _vm.$emit('split', $event)}},scopedSlots:_vm._u([{key:"suggestions",fn:function(){return _vm._l((_vm.suggestedTokens),function(item,idx){return _c('gl-filtered-search-suggestion',{key:idx,attrs:{"value":item.type,"icon-name":item.icon}},[_vm._v("\n "+_vm._s(item.title)+"\n ")])})},proxy:true},{key:"view",fn:function(){return [(_vm.placeholder)?_c('input',_vm._b({staticClass:"gl-filtered-search-term-input",attrs:{"placeholder":_vm.placeholder,"aria-label":_vm.placeholder}},'input',_vm.searchInputAttributes,false)):[_vm._v(_vm._s(_vm.value.data))]]},proxy:true}]),model:{value:(_vm.internalValue),callback:function ($$v) {_vm.internalValue=$$v;},expression:"internalValue"}})],1)};
69
74
  var __vue_staticRenderFns__ = [];
70
75
 
71
76
  /* style */
@@ -58,6 +58,11 @@ var script = {
58
58
  type: Boolean,
59
59
  required: false,
60
60
  default: false
61
+ },
62
+ currentValue: {
63
+ type: Array,
64
+ required: false,
65
+ default: () => []
61
66
  }
62
67
  },
63
68
 
@@ -113,6 +118,10 @@ var script = {
113
118
 
114
119
  const defaultSuggestion = this.options.find(op => op.default);
115
120
  return (_ref = defaultSuggestion !== null && defaultSuggestion !== void 0 ? defaultSuggestion : this.options[0]) === null || _ref === void 0 ? void 0 : _ref.value;
121
+ },
122
+
123
+ containerAttributes() {
124
+ return this.isLastToken && !this.active && this.currentValue.length > 1 && this.searchInputAttributes;
116
125
  }
117
126
 
118
127
  },
@@ -284,7 +293,7 @@ var script = {
284
293
  const __vue_script__ = script;
285
294
 
286
295
  /* template */
287
- var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',_vm._b({staticClass:"gl-filtered-search-token-segment",class:{ 'gl-filtered-search-token-segment-active': _vm.active },attrs:{"data-testid":"filtered-search-token-segment"},on:{"mousedown":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"left",37,$event.key,["Left","ArrowLeft"])){ return null; }if('button' in $event && $event.button !== 0){ return null; }return _vm.emitIfInactive($event)}}},'div',_vm.isLastToken && !_vm.active && _vm.searchInputAttributes,false),[(_vm.active)?[(((_vm.searchInputAttributes).type)==='checkbox')?_c('input',_vm._b({directives:[{name:"model",rawName:"v-model",value:(_vm.inputValue),expression:"inputValue"}],ref:"input",staticClass:"gl-filtered-search-token-segment-input",attrs:{"aria-label":_vm.label,"type":"checkbox"},domProps:{"checked":Array.isArray(_vm.inputValue)?_vm._i(_vm.inputValue,null)>-1:(_vm.inputValue)},on:{"keydown":_vm.handleInputKeydown,"blur":_vm.handleBlur,"change":function($event){var $$a=_vm.inputValue,$$el=$event.target,$$c=$$el.checked?(true):(false);if(Array.isArray($$a)){var $$v=null,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.inputValue=$$a.concat([$$v]));}else {$$i>-1&&(_vm.inputValue=$$a.slice(0,$$i).concat($$a.slice($$i+1)));}}else {_vm.inputValue=$$c;}}}},'input',_vm.searchInputAttributes,false)):(((_vm.searchInputAttributes).type)==='radio')?_c('input',_vm._b({directives:[{name:"model",rawName:"v-model",value:(_vm.inputValue),expression:"inputValue"}],ref:"input",staticClass:"gl-filtered-search-token-segment-input",attrs:{"aria-label":_vm.label,"type":"radio"},domProps:{"checked":_vm._q(_vm.inputValue,null)},on:{"keydown":_vm.handleInputKeydown,"blur":_vm.handleBlur,"change":function($event){_vm.inputValue=null;}}},'input',_vm.searchInputAttributes,false)):_c('input',_vm._b({directives:[{name:"model",rawName:"v-model",value:(_vm.inputValue),expression:"inputValue"}],ref:"input",staticClass:"gl-filtered-search-token-segment-input",attrs:{"aria-label":_vm.label,"type":(_vm.searchInputAttributes).type},domProps:{"value":(_vm.inputValue)},on:{"keydown":_vm.handleInputKeydown,"blur":_vm.handleBlur,"input":function($event){if($event.target.composing){ return; }_vm.inputValue=$event.target.value;}}},'input',_vm.searchInputAttributes,false)),_vm._v(" "),_c('portal',{key:("operator-" + _vm._uid),attrs:{"to":_vm.portalName}},[(_vm.hasOptionsOrSuggestions)?_c('gl-filtered-search-suggestion-list',{key:("operator-" + _vm._uid),ref:"suggestions",attrs:{"initial-value":_vm.defaultSuggestedValue},on:{"suggestion":_vm.applySuggestion}},[(_vm.options)?_vm._l((_vm.options),function(option,idx){return _c('gl-filtered-search-suggestion',{key:((option.value) + "-" + idx),attrs:{"value":option.value,"icon-name":option.icon}},[_vm._t("option",[_vm._v("\n "+_vm._s(option[_vm.optionTextField])+"\n ")],null,{ option: option })],2)}):_vm._t("suggestions")],2):_vm._e()],1)]:_vm._t("view",[_vm._v(_vm._s(_vm.inputValue))],null,{ inputValue: _vm.inputValue })],2)};
296
+ var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',_vm._b({staticClass:"gl-filtered-search-token-segment",class:{ 'gl-filtered-search-token-segment-active': _vm.active },attrs:{"data-testid":"filtered-search-token-segment"},on:{"mousedown":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"left",37,$event.key,["Left","ArrowLeft"])){ return null; }if('button' in $event && $event.button !== 0){ return null; }return _vm.emitIfInactive($event)}}},'div',_vm.containerAttributes,false),[(_vm.active)?[(((_vm.searchInputAttributes).type)==='checkbox')?_c('input',_vm._b({directives:[{name:"model",rawName:"v-model",value:(_vm.inputValue),expression:"inputValue"}],ref:"input",staticClass:"gl-filtered-search-token-segment-input",attrs:{"aria-label":_vm.label,"type":"checkbox"},domProps:{"checked":Array.isArray(_vm.inputValue)?_vm._i(_vm.inputValue,null)>-1:(_vm.inputValue)},on:{"keydown":_vm.handleInputKeydown,"blur":_vm.handleBlur,"change":function($event){var $$a=_vm.inputValue,$$el=$event.target,$$c=$$el.checked?(true):(false);if(Array.isArray($$a)){var $$v=null,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.inputValue=$$a.concat([$$v]));}else {$$i>-1&&(_vm.inputValue=$$a.slice(0,$$i).concat($$a.slice($$i+1)));}}else {_vm.inputValue=$$c;}}}},'input',_vm.searchInputAttributes,false)):(((_vm.searchInputAttributes).type)==='radio')?_c('input',_vm._b({directives:[{name:"model",rawName:"v-model",value:(_vm.inputValue),expression:"inputValue"}],ref:"input",staticClass:"gl-filtered-search-token-segment-input",attrs:{"aria-label":_vm.label,"type":"radio"},domProps:{"checked":_vm._q(_vm.inputValue,null)},on:{"keydown":_vm.handleInputKeydown,"blur":_vm.handleBlur,"change":function($event){_vm.inputValue=null;}}},'input',_vm.searchInputAttributes,false)):_c('input',_vm._b({directives:[{name:"model",rawName:"v-model",value:(_vm.inputValue),expression:"inputValue"}],ref:"input",staticClass:"gl-filtered-search-token-segment-input",attrs:{"aria-label":_vm.label,"type":(_vm.searchInputAttributes).type},domProps:{"value":(_vm.inputValue)},on:{"keydown":_vm.handleInputKeydown,"blur":_vm.handleBlur,"input":function($event){if($event.target.composing){ return; }_vm.inputValue=$event.target.value;}}},'input',_vm.searchInputAttributes,false)),_vm._v(" "),_c('portal',{key:("operator-" + _vm._uid),attrs:{"to":_vm.portalName}},[(_vm.hasOptionsOrSuggestions)?_c('gl-filtered-search-suggestion-list',{key:("operator-" + _vm._uid),ref:"suggestions",attrs:{"initial-value":_vm.defaultSuggestedValue},on:{"suggestion":_vm.applySuggestion}},[(_vm.options)?_vm._l((_vm.options),function(option,idx){return _c('gl-filtered-search-suggestion',{key:((option.value) + "-" + idx),attrs:{"value":option.value,"icon-name":option.icon}},[_vm._t("option",[_vm._v("\n "+_vm._s(option[_vm.optionTextField])+"\n ")],null,{ option: option })],2)}):_vm._t("suggestions")],2):_vm._e()],1)]:_vm._t("view",[_vm._v(_vm._s(_vm.inputValue))],null,{ inputValue: _vm.inputValue })],2)};
288
297
  var __vue_staticRenderFns__ = [];
289
298
 
290
299
  /* style */