Commit 8c67c27e authored by Brandon Labuschagne's avatar Brandon Labuschagne

Merge branch '232465-mlunoe-promote-store-module-to-be-with-shared-filtered-search' into 'master'

Refactor(filtered search): share filter module

See merge request gitlab-org/gitlab!44273
parents a5d18089 144a63c1
import Vue from 'vue'; import Vue from 'vue';
import Vuex from 'vuex'; import Vuex from 'vuex';
import filters from 'ee/analytics/shared/store/modules/filters'; import filters from '~/vue_shared/components/filtered_search_bar/store/modules/filters';
import * as actions from './actions'; import * as actions from './actions';
import mergeRequests from './modules/merge_requests/index'; import mergeRequests from './modules/merge_requests/index';
......
import Vue from 'vue'; import Vue from 'vue';
import Vuex from 'vuex'; import Vuex from 'vuex';
import filters from 'ee/analytics/shared/store/modules/filters'; import filters from '~/vue_shared/components/filtered_search_bar/store/modules/filters';
import * as actions from './actions'; import * as actions from './actions';
import * as getters from './getters'; import * as getters from './getters';
import mutations from './mutations'; import mutations from './mutations';
......
import Vue from 'vue'; import Vue from 'vue';
import Vuex from 'vuex'; import Vuex from 'vuex';
import filters from 'ee/analytics/shared/store/modules/filters'; import filters from '~/vue_shared/components/filtered_search_bar/store/modules/filters';
import * as actions from './actions'; import * as actions from './actions';
Vue.use(Vuex); Vue.use(Vuex);
......
...@@ -6,8 +6,8 @@ import MergeRequestTable from 'ee/analytics/code_review_analytics/components/mer ...@@ -6,8 +6,8 @@ import MergeRequestTable from 'ee/analytics/code_review_analytics/components/mer
import FilterBar from 'ee/analytics/code_review_analytics/components/filter_bar.vue'; import FilterBar from 'ee/analytics/code_review_analytics/components/filter_bar.vue';
import * as actions from 'ee/analytics/code_review_analytics/store/actions'; import * as actions from 'ee/analytics/code_review_analytics/store/actions';
import createMergeRequestsState from 'ee/analytics/code_review_analytics/store/modules/merge_requests/state'; import createMergeRequestsState from 'ee/analytics/code_review_analytics/store/modules/merge_requests/state';
import createFiltersState from 'ee/analytics/shared/store/modules/filters/state';
import { TEST_HOST } from 'helpers/test_constants'; import { TEST_HOST } from 'helpers/test_constants';
import createFiltersState from '~/vue_shared/components/filtered_search_bar/store/modules/filters/state';
const mockFilterManagerSetup = jest.fn(); const mockFilterManagerSetup = jest.fn();
jest.mock('ee/analytics/code_review_analytics/filtered_search_code_review_analytics', () => jest.mock('ee/analytics/code_review_analytics/filtered_search_code_review_analytics', () =>
......
...@@ -4,14 +4,20 @@ import axios from 'axios'; ...@@ -4,14 +4,20 @@ import axios from 'axios';
import MockAdapter from 'axios-mock-adapter'; import MockAdapter from 'axios-mock-adapter';
import storeConfig from 'ee/analytics/code_review_analytics/store'; import storeConfig from 'ee/analytics/code_review_analytics/store';
import FilterBar from 'ee/analytics/code_review_analytics/components/filter_bar.vue'; import FilterBar from 'ee/analytics/code_review_analytics/components/filter_bar.vue';
import initialFiltersState from 'ee/analytics/shared/store/modules/filters/state'; import {
filterMilestones,
filterLabels,
} from 'jest/vue_shared/components/filtered_search_bar/store/modules/filters/mock_data';
import {
getFilterParams,
getFilterValues,
} from 'jest/vue_shared/components/filtered_search_bar/store/modules/filters/test_helper';
import initialFiltersState from '~/vue_shared/components/filtered_search_bar/store/modules/filters/state';
import FilteredSearchBar from '~/vue_shared/components/filtered_search_bar/filtered_search_bar_root.vue'; import FilteredSearchBar from '~/vue_shared/components/filtered_search_bar/filtered_search_bar_root.vue';
import * as utils from '~/vue_shared/components/filtered_search_bar/filtered_search_utils'; import * as utils from '~/vue_shared/components/filtered_search_bar/filtered_search_utils';
import UrlSync from '~/vue_shared/components/url_sync.vue'; import UrlSync from '~/vue_shared/components/url_sync.vue';
import * as commonUtils from '~/lib/utils/common_utils'; import * as commonUtils from '~/lib/utils/common_utils';
import * as urlUtils from '~/lib/utils/url_utility'; import * as urlUtils from '~/lib/utils/url_utility';
import { filterMilestones, filterLabels } from '../../shared/store/modules/filters/mock_data';
import { getFilterParams, getFilterValues } from '../../shared/store/modules/filters/test_helper';
const localVue = createLocalVue(); const localVue = createLocalVue();
localVue.use(Vuex); localVue.use(Vuex);
......
...@@ -4,11 +4,14 @@ import axios from 'axios'; ...@@ -4,11 +4,14 @@ import axios from 'axios';
import MockAdapter from 'axios-mock-adapter'; import MockAdapter from 'axios-mock-adapter';
import storeConfig from 'ee/analytics/cycle_analytics/store'; import storeConfig from 'ee/analytics/cycle_analytics/store';
import FilterBar from 'ee/analytics/cycle_analytics/components/filter_bar.vue'; import FilterBar from 'ee/analytics/cycle_analytics/components/filter_bar.vue';
import initialFiltersState from 'ee/analytics/shared/store/modules/filters/state'; import {
filterMilestones,
filterLabels,
} from 'jest/vue_shared/components/filtered_search_bar/store/modules/filters/mock_data';
import initialFiltersState from '~/vue_shared/components/filtered_search_bar/store/modules/filters/state';
import FilteredSearchBar from '~/vue_shared/components/filtered_search_bar/filtered_search_bar_root.vue'; import FilteredSearchBar from '~/vue_shared/components/filtered_search_bar/filtered_search_bar_root.vue';
import UrlSync from '~/vue_shared/components/url_sync.vue'; import UrlSync from '~/vue_shared/components/url_sync.vue';
import * as utils from '~/vue_shared/components/filtered_search_bar/filtered_search_utils'; import * as utils from '~/vue_shared/components/filtered_search_bar/filtered_search_utils';
import { filterMilestones, filterLabels } from '../../shared/store/modules/filters/mock_data';
import * as commonUtils from '~/lib/utils/common_utils'; import * as commonUtils from '~/lib/utils/common_utils';
import * as urlUtils from '~/lib/utils/url_utility'; import * as urlUtils from '~/lib/utils/url_utility';
......
import * as getters from 'ee/analytics/cycle_analytics/store/getters'; import * as getters from 'ee/analytics/cycle_analytics/store/getters';
import {
filterMilestones,
filterUsers,
filterLabels,
} from 'jest/vue_shared/components/filtered_search_bar/store/modules/filters/mock_data';
import {
getFilterParams,
getFilterValues,
} from 'jest/vue_shared/components/filtered_search_bar/store/modules/filters/test_helper';
import { import {
startDate, startDate,
endDate, endDate,
...@@ -8,12 +17,6 @@ import { ...@@ -8,12 +17,6 @@ import {
issueStage, issueStage,
stageMedians, stageMedians,
} from '../mock_data'; } from '../mock_data';
import {
filterMilestones,
filterUsers,
filterLabels,
} from '../../shared/store/modules/filters/mock_data';
import { getFilterParams, getFilterValues } from '../../shared/store/modules/filters/test_helper';
let state = null; let state = null;
......
...@@ -4,20 +4,23 @@ import axios from 'axios'; ...@@ -4,20 +4,23 @@ import axios from 'axios';
import MockAdapter from 'axios-mock-adapter'; import MockAdapter from 'axios-mock-adapter';
import storeConfig from 'ee/analytics/merge_request_analytics/store'; import storeConfig from 'ee/analytics/merge_request_analytics/store';
import FilterBar from 'ee/analytics/merge_request_analytics/components/filter_bar.vue'; import FilterBar from 'ee/analytics/merge_request_analytics/components/filter_bar.vue';
import initialFiltersState from 'ee/analytics/shared/store/modules/filters/state';
import { mockBranches } from 'jest/vue_shared/components/filtered_search_bar/mock_data'; import { mockBranches } from 'jest/vue_shared/components/filtered_search_bar/mock_data';
import {
filterMilestones,
filterLabels,
filterUsers,
} from 'jest/vue_shared/components/filtered_search_bar/store/modules/filters/mock_data';
import {
getFilterParams,
getFilterValues,
} from 'jest/vue_shared/components/filtered_search_bar/store/modules/filters/test_helper';
import initialFiltersState from '~/vue_shared/components/filtered_search_bar/store/modules/filters/state';
import * as utils from '~/vue_shared/components/filtered_search_bar/filtered_search_utils'; import * as utils from '~/vue_shared/components/filtered_search_bar/filtered_search_utils';
import FilteredSearchBar from '~/vue_shared/components/filtered_search_bar/filtered_search_bar_root.vue'; import FilteredSearchBar from '~/vue_shared/components/filtered_search_bar/filtered_search_bar_root.vue';
import UrlSync from '~/vue_shared/components/url_sync.vue'; import UrlSync from '~/vue_shared/components/url_sync.vue';
import * as commonUtils from '~/lib/utils/common_utils'; import * as commonUtils from '~/lib/utils/common_utils';
import * as urlUtils from '~/lib/utils/url_utility'; import * as urlUtils from '~/lib/utils/url_utility';
import { ITEM_TYPE } from '~/groups/constants'; import { ITEM_TYPE } from '~/groups/constants';
import {
filterMilestones,
filterLabels,
filterUsers,
} from '../../shared/store/modules/filters/mock_data';
import { getFilterParams, getFilterValues } from '../../shared/store/modules/filters/test_helper';
const localVue = createLocalVue(); const localVue = createLocalVue();
localVue.use(Vuex); localVue.use(Vuex);
......
import axios from 'axios'; import axios from 'axios';
import MockAdapter from 'axios-mock-adapter'; import MockAdapter from 'axios-mock-adapter';
import testAction from 'helpers/vuex_action_helper'; import testAction from 'helpers/vuex_action_helper';
import * as actions from 'ee/analytics/shared/store/modules/filters/actions';
import * as types from 'ee/analytics/shared/store/modules/filters/mutation_types';
import initialState from 'ee/analytics/shared/store/modules/filters/state';
import { mockBranches } from 'jest/vue_shared/components/filtered_search_bar/mock_data'; import { mockBranches } from 'jest/vue_shared/components/filtered_search_bar/mock_data';
import * as actions from '~/vue_shared/components/filtered_search_bar/store/modules/filters/actions';
import * as types from '~/vue_shared/components/filtered_search_bar/store/modules/filters/mutation_types';
import initialState from '~/vue_shared/components/filtered_search_bar/store/modules/filters/state';
import httpStatusCodes from '~/lib/utils/http_status'; import httpStatusCodes from '~/lib/utils/http_status';
import { deprecatedCreateFlash as createFlash } from '~/flash'; import { deprecatedCreateFlash as createFlash } from '~/flash';
import Api from '~/api'; import Api from '~/api';
......
import { get } from 'lodash'; import { get } from 'lodash';
import initialState from 'ee/analytics/shared/store/modules/filters/state';
import mutations from 'ee/analytics/shared/store/modules/filters/mutations';
import * as types from 'ee/analytics/shared/store/modules/filters/mutation_types';
import { mockBranches } from 'jest/vue_shared/components/filtered_search_bar/mock_data'; import { mockBranches } from 'jest/vue_shared/components/filtered_search_bar/mock_data';
import initialState from '~/vue_shared/components/filtered_search_bar/store/modules/filters/state';
import mutations from '~/vue_shared/components/filtered_search_bar/store/modules/filters/mutations';
import * as types from '~/vue_shared/components/filtered_search_bar/store/modules/filters/mutation_types';
import { convertObjectPropsToCamelCase } from '~/lib/utils/common_utils'; import { convertObjectPropsToCamelCase } from '~/lib/utils/common_utils';
import { filterMilestones, filterUsers, filterLabels } from './mock_data'; import { filterMilestones, filterUsers, filterLabels } from './mock_data';
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment