diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-18 13:34:06 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-18 13:34:06 +0300 |
commit | 859a6fb938bb9ee2a317c46dfa4fcc1af49608f0 (patch) | |
tree | d7f2700abe6b4ffcb2dcfc80631b2d87d0609239 /app/assets/javascripts/filtered_search | |
parent | 446d496a6d000c73a304be52587cd9bbc7493136 (diff) |
Add latest changes from gitlab-org/gitlab@13-9-stable-eev13.9.0-rc42
Diffstat (limited to 'app/assets/javascripts/filtered_search')
16 files changed, 51 insertions, 50 deletions
diff --git a/app/assets/javascripts/filtered_search/available_dropdown_mappings.js b/app/assets/javascripts/filtered_search/available_dropdown_mappings.js index 588bd534224..409b4ccbcfa 100644 --- a/app/assets/javascripts/filtered_search/available_dropdown_mappings.js +++ b/app/assets/javascripts/filtered_search/available_dropdown_mappings.js @@ -1,12 +1,12 @@ +import { mergeUrlParams } from '../lib/utils/url_utility'; +import DropdownAjaxFilter from './dropdown_ajax_filter'; +import DropdownEmoji from './dropdown_emoji'; import DropdownHint from './dropdown_hint'; -import DropdownUser from './dropdown_user'; import DropdownNonUser from './dropdown_non_user'; -import DropdownEmoji from './dropdown_emoji'; -import NullDropdown from './null_dropdown'; -import DropdownAjaxFilter from './dropdown_ajax_filter'; import DropdownOperator from './dropdown_operator'; +import DropdownUser from './dropdown_user'; import DropdownUtils from './dropdown_utils'; -import { mergeUrlParams } from '../lib/utils/url_utility'; +import NullDropdown from './null_dropdown'; export default class AvailableDropdownMappings { constructor({ diff --git a/app/assets/javascripts/filtered_search/dropdown_ajax_filter.js b/app/assets/javascripts/filtered_search/dropdown_ajax_filter.js index 2c0c3024d38..e317700b09b 100644 --- a/app/assets/javascripts/filtered_search/dropdown_ajax_filter.js +++ b/app/assets/javascripts/filtered_search/dropdown_ajax_filter.js @@ -1,9 +1,9 @@ -import { deprecatedCreateFlash as createFlash } from '../flash'; +import { __ } from '~/locale'; import AjaxFilter from '../droplab/plugins/ajax_filter'; -import FilteredSearchDropdown from './filtered_search_dropdown'; +import { deprecatedCreateFlash as createFlash } from '../flash'; import DropdownUtils from './dropdown_utils'; +import FilteredSearchDropdown from './filtered_search_dropdown'; import FilteredSearchTokenizer from './filtered_search_tokenizer'; -import { __ } from '~/locale'; export default class DropdownAjaxFilter extends FilteredSearchDropdown { constructor(options = {}) { diff --git a/app/assets/javascripts/filtered_search/dropdown_emoji.js b/app/assets/javascripts/filtered_search/dropdown_emoji.js index 001030b5f5f..a22430833a3 100644 --- a/app/assets/javascripts/filtered_search/dropdown_emoji.js +++ b/app/assets/javascripts/filtered_search/dropdown_emoji.js @@ -1,9 +1,9 @@ -import { deprecatedCreateFlash as Flash } from '../flash'; +import { __ } from '~/locale'; import Ajax from '../droplab/plugins/ajax'; import Filter from '../droplab/plugins/filter'; -import FilteredSearchDropdown from './filtered_search_dropdown'; +import { deprecatedCreateFlash as Flash } from '../flash'; import DropdownUtils from './dropdown_utils'; -import { __ } from '~/locale'; +import FilteredSearchDropdown from './filtered_search_dropdown'; export default class DropdownEmoji extends FilteredSearchDropdown { constructor(options = {}) { diff --git a/app/assets/javascripts/filtered_search/dropdown_hint.js b/app/assets/javascripts/filtered_search/dropdown_hint.js index 1180f8683a1..47f350dc6a2 100644 --- a/app/assets/javascripts/filtered_search/dropdown_hint.js +++ b/app/assets/javascripts/filtered_search/dropdown_hint.js @@ -1,9 +1,9 @@ import Filter from '~/droplab/plugins/filter'; -import FilteredSearchDropdown from './filtered_search_dropdown'; +import { __ } from '~/locale'; import DropdownUtils from './dropdown_utils'; +import FilteredSearchDropdown from './filtered_search_dropdown'; import FilteredSearchDropdownManager from './filtered_search_dropdown_manager'; import FilteredSearchVisualTokens from './filtered_search_visual_tokens'; -import { __ } from '~/locale'; export default class DropdownHint extends FilteredSearchDropdown { constructor(options = {}) { diff --git a/app/assets/javascripts/filtered_search/dropdown_non_user.js b/app/assets/javascripts/filtered_search/dropdown_non_user.js index 11261debeda..4df1120f169 100644 --- a/app/assets/javascripts/filtered_search/dropdown_non_user.js +++ b/app/assets/javascripts/filtered_search/dropdown_non_user.js @@ -1,9 +1,9 @@ -import { deprecatedCreateFlash as Flash } from '../flash'; +import { __ } from '~/locale'; import Ajax from '../droplab/plugins/ajax'; import Filter from '../droplab/plugins/filter'; -import FilteredSearchDropdown from './filtered_search_dropdown'; +import { deprecatedCreateFlash as Flash } from '../flash'; import DropdownUtils from './dropdown_utils'; -import { __ } from '~/locale'; +import FilteredSearchDropdown from './filtered_search_dropdown'; export default class DropdownNonUser extends FilteredSearchDropdown { constructor(options = {}) { diff --git a/app/assets/javascripts/filtered_search/dropdown_operator.js b/app/assets/javascripts/filtered_search/dropdown_operator.js index 8fee3385de1..0da8cd0ad83 100644 --- a/app/assets/javascripts/filtered_search/dropdown_operator.js +++ b/app/assets/javascripts/filtered_search/dropdown_operator.js @@ -1,7 +1,7 @@ import Filter from '~/droplab/plugins/filter'; import { __ } from '~/locale'; -import FilteredSearchDropdown from './filtered_search_dropdown'; import DropdownUtils from './dropdown_utils'; +import FilteredSearchDropdown from './filtered_search_dropdown'; import FilteredSearchDropdownManager from './filtered_search_dropdown_manager'; import FilteredSearchVisualTokens from './filtered_search_visual_tokens'; diff --git a/app/assets/javascripts/filtered_search/dropdown_utils.js b/app/assets/javascripts/filtered_search/dropdown_utils.js index 22c98f360ed..c98d1f8e064 100644 --- a/app/assets/javascripts/filtered_search/dropdown_utils.js +++ b/app/assets/javascripts/filtered_search/dropdown_utils.js @@ -1,7 +1,7 @@ import { last } from 'lodash'; import FilteredSearchContainer from './container'; -import FilteredSearchTokenizer from './filtered_search_tokenizer'; import FilteredSearchDropdownManager from './filtered_search_dropdown_manager'; +import FilteredSearchTokenizer from './filtered_search_tokenizer'; import FilteredSearchVisualTokens from './filtered_search_visual_tokens'; export default class DropdownUtils { diff --git a/app/assets/javascripts/filtered_search/filtered_search_dropdown.js b/app/assets/javascripts/filtered_search/filtered_search_dropdown.js index 7434cc4c5d1..fcc7caa9ff2 100644 --- a/app/assets/javascripts/filtered_search/filtered_search_dropdown.js +++ b/app/assets/javascripts/filtered_search/filtered_search_dropdown.js @@ -1,7 +1,7 @@ +import { FILTER_TYPE } from './constants'; import DropdownUtils from './dropdown_utils'; import FilteredSearchDropdownManager from './filtered_search_dropdown_manager'; import FilteredSearchVisualTokens from './filtered_search_visual_tokens'; -import { FILTER_TYPE } from './constants'; const DATA_DROPDOWN_TRIGGER = 'data-dropdown-trigger'; diff --git a/app/assets/javascripts/filtered_search/filtered_search_dropdown_manager.js b/app/assets/javascripts/filtered_search/filtered_search_dropdown_manager.js index 3c630c26bc7..ebaa3ef98b1 100644 --- a/app/assets/javascripts/filtered_search/filtered_search_dropdown_manager.js +++ b/app/assets/javascripts/filtered_search/filtered_search_dropdown_manager.js @@ -1,11 +1,11 @@ import { last } from 'lodash'; import AvailableDropdownMappings from 'ee_else_ce/filtered_search/available_dropdown_mappings'; import DropLab from '~/droplab/drop_lab'; +import { DROPDOWN_TYPE } from './constants'; import FilteredSearchContainer from './container'; -import FilteredSearchTokenKeys from './filtered_search_token_keys'; import DropdownUtils from './dropdown_utils'; +import FilteredSearchTokenKeys from './filtered_search_token_keys'; import FilteredSearchVisualTokens from './filtered_search_visual_tokens'; -import { DROPDOWN_TYPE } from './constants'; export default class FilteredSearchDropdownManager { constructor({ diff --git a/app/assets/javascripts/filtered_search/filtered_search_manager.js b/app/assets/javascripts/filtered_search/filtered_search_manager.js index 11b2eb839ce..69d19074cd0 100644 --- a/app/assets/javascripts/filtered_search/filtered_search_manager.js +++ b/app/assets/javascripts/filtered_search/filtered_search_manager.js @@ -1,19 +1,7 @@ import { last } from 'lodash'; import recentSearchesStorageKeys from 'ee_else_ce/filtered_search/recent_searches_storage_keys'; -import { getParameterByName, getUrlParamsArray } from '~/lib/utils/common_utils'; import IssuableFilteredSearchTokenKeys from '~/filtered_search/issuable_filtered_search_token_keys'; -import { visitUrl } from '../lib/utils/url_utility'; -import { deprecatedCreateFlash as Flash } from '../flash'; -import FilteredSearchContainer from './container'; -import RecentSearchesRoot from './recent_searches_root'; -import RecentSearchesStore from './stores/recent_searches_store'; -import RecentSearchesService from './services/recent_searches_service'; -import eventHub from './event_hub'; -import { addClassIfElementExists } from '../lib/utils/dom_utils'; -import FilteredSearchTokenizer from './filtered_search_tokenizer'; -import FilteredSearchDropdownManager from './filtered_search_dropdown_manager'; -import FilteredSearchVisualTokens from './filtered_search_visual_tokens'; -import DropdownUtils from './dropdown_utils'; +import { getParameterByName, getUrlParamsArray } from '~/lib/utils/common_utils'; import { ENTER_KEY_CODE, BACKSPACE_KEY_CODE, @@ -22,6 +10,18 @@ import { DOWN_KEY_CODE, } from '~/lib/utils/keycodes'; import { __ } from '~/locale'; +import { deprecatedCreateFlash as Flash } from '../flash'; +import { addClassIfElementExists } from '../lib/utils/dom_utils'; +import { visitUrl } from '../lib/utils/url_utility'; +import FilteredSearchContainer from './container'; +import DropdownUtils from './dropdown_utils'; +import eventHub from './event_hub'; +import FilteredSearchDropdownManager from './filtered_search_dropdown_manager'; +import FilteredSearchTokenizer from './filtered_search_tokenizer'; +import FilteredSearchVisualTokens from './filtered_search_visual_tokens'; +import RecentSearchesRoot from './recent_searches_root'; +import RecentSearchesService from './services/recent_searches_service'; +import RecentSearchesStore from './stores/recent_searches_store'; export default class FilteredSearchManager { constructor({ diff --git a/app/assets/javascripts/filtered_search/filtered_search_visual_tokens.js b/app/assets/javascripts/filtered_search/filtered_search_visual_tokens.js index 4e594dfa910..eec4db41b0a 100644 --- a/app/assets/javascripts/filtered_search/filtered_search_visual_tokens.js +++ b/app/assets/javascripts/filtered_search/filtered_search_visual_tokens.js @@ -1,6 +1,6 @@ -import VisualTokenValue from './visual_token_value'; import { objectToQueryString, spriteIcon } from '~/lib/utils/common_utils'; import FilteredSearchContainer from './container'; +import VisualTokenValue from './visual_token_value'; export default class FilteredSearchVisualTokens { static permissibleOperatorValues = ['=', '!=']; diff --git a/app/assets/javascripts/filtered_search/issuable_filtered_search_token_keys.js b/app/assets/javascripts/filtered_search/issuable_filtered_search_token_keys.js index 46867b184c8..2c58506985a 100644 --- a/app/assets/javascripts/filtered_search/issuable_filtered_search_token_keys.js +++ b/app/assets/javascripts/filtered_search/issuable_filtered_search_token_keys.js @@ -1,6 +1,6 @@ import { flattenDeep } from 'lodash'; -import FilteredSearchTokenKeys from './filtered_search_token_keys'; import { __ } from '~/locale'; +import FilteredSearchTokenKeys from './filtered_search_token_keys'; export const tokenKeys = [ { diff --git a/app/assets/javascripts/filtered_search/recent_searches_root.js b/app/assets/javascripts/filtered_search/recent_searches_root.js index 6c8e77a7fe5..1182cb34210 100644 --- a/app/assets/javascripts/filtered_search/recent_searches_root.js +++ b/app/assets/javascripts/filtered_search/recent_searches_root.js @@ -28,19 +28,18 @@ class RecentSearchesRoot { const { state } = this.store; this.vm = new Vue({ el: this.wrapperElement, - components: { - RecentSearchesDropdownContent, - }, data() { return state; }, - template: ` - <recent-searches-dropdown-content - :items="recentSearches" - :is-local-storage-available="isLocalStorageAvailable" - :allowed-keys="allowedKeys" - /> - `, + render(h) { + return h(RecentSearchesDropdownContent, { + props: { + items: this.recentSearches, + isLocalStorageAvailable: this.isLocalStorageAvailable, + allowedKeys: this.allowedKeys, + }, + }); + }, }); } diff --git a/app/assets/javascripts/filtered_search/recent_searches_storage_keys.js b/app/assets/javascripts/filtered_search/recent_searches_storage_keys.js index 54d49821d92..446a0e5eb24 100644 --- a/app/assets/javascripts/filtered_search/recent_searches_storage_keys.js +++ b/app/assets/javascripts/filtered_search/recent_searches_storage_keys.js @@ -3,4 +3,6 @@ export default { merge_requests: 'merge-request-recent-searches', group_members: 'group-members-recent-searches', group_invited_members: 'group-invited-members-recent-searches', + project_members: 'project-members-recent-searches', + project_group_links: 'project-group-links-recent-searches', }; diff --git a/app/assets/javascripts/filtered_search/services/recent_searches_service.js b/app/assets/javascripts/filtered_search/services/recent_searches_service.js index a056dea928d..56824977a43 100644 --- a/app/assets/javascripts/filtered_search/services/recent_searches_service.js +++ b/app/assets/javascripts/filtered_search/services/recent_searches_service.js @@ -1,5 +1,5 @@ -import RecentSearchesServiceError from './recent_searches_service_error'; import AccessorUtilities from '../../lib/utils/accessor'; +import RecentSearchesServiceError from './recent_searches_service_error'; class RecentSearchesService { constructor(localStorageKey = 'issuable-recent-searches') { diff --git a/app/assets/javascripts/filtered_search/visual_token_value.js b/app/assets/javascripts/filtered_search/visual_token_value.js index 0d36126943b..7f4445ad4c7 100644 --- a/app/assets/javascripts/filtered_search/visual_token_value.js +++ b/app/assets/javascripts/filtered_search/visual_token_value.js @@ -1,13 +1,13 @@ import { escape } from 'lodash'; import { USER_TOKEN_TYPES } from 'ee_else_ce/filtered_search/constants'; +import * as Emoji from '~/emoji'; import FilteredSearchContainer from '~/filtered_search/container'; -import FilteredSearchVisualTokens from '~/filtered_search/filtered_search_visual_tokens'; -import AjaxCache from '~/lib/utils/ajax_cache'; import DropdownUtils from '~/filtered_search/dropdown_utils'; +import FilteredSearchVisualTokens from '~/filtered_search/filtered_search_visual_tokens'; import { deprecatedCreateFlash as Flash } from '~/flash'; +import AjaxCache from '~/lib/utils/ajax_cache'; import UsersCache from '~/lib/utils/users_cache'; import { __ } from '~/locale'; -import * as Emoji from '~/emoji'; export default class VisualTokenValue { constructor(tokenValue, tokenType, tokenOperator) { |