Commit c8aa5692 authored by Ezekiel Kigbo's avatar Ezekiel Kigbo

Swap create flash functions

Replaces the default export flash
function with the newCreateFlash.

Fix outstanding flash imports

Updates specs and replaces outstanding
imports for `Flash`

Fixes additional specs

Updates the remaining calls to different
flash methods, except for the window.Flash
method since this will break .erb templates
parent be63a5e0
......@@ -4,7 +4,7 @@ import { GlModal, GlTabs, GlTab, GlSearchBoxByType, GlSprintf } from '@gitlab/ui
import ReviewTabContainer from '~/add_context_commits_modal/components/review_tab_container.vue';
import { s__ } from '~/locale';
import eventHub from '../event_hub';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import {
findCommitIndex,
setCommitStatus,
......
import _ from 'lodash';
import axios from '~/lib/utils/axios_utils';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import { s__ } from '~/locale';
import Api from '~/api';
import * as types from './mutation_types';
......
import Api from '~/api';
import { s__ } from '~/locale';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import { convertObjectPropsToCamelCase } from '~/lib/utils/common_utils';
import * as types from './mutation_types';
......
......@@ -12,7 +12,7 @@ import ClipboardButton from '~/vue_shared/components/clipboard_button.vue';
import ToggleButton from '~/vue_shared/components/toggle_button.vue';
import axios from '~/lib/utils/axios_utils';
import { s__, __ } from '~/locale';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
export default {
i18n: {
......
import axios from './lib/utils/axios_utils';
import { joinPaths } from './lib/utils/url_utility';
import flash from '~/flash';
import { deprecatedCreateFlash as flash } from '~/flash';
import { __ } from '~/locale';
const DEFAULT_PER_PAGE = 20;
......
......@@ -7,7 +7,7 @@ import Cookies from 'js-cookie';
import { __ } from './locale';
import { updateTooltipTitle } from './lib/utils/common_utils';
import { isInVueNoteablePage } from './lib/utils/dom_utils';
import flash from './flash';
import { deprecatedCreateFlash as flash } from './flash';
import axios from './lib/utils/axios_utils';
import * as Emoji from '~/emoji';
......
......@@ -2,7 +2,7 @@
import { escape, debounce } from 'lodash';
import { mapActions, mapState } from 'vuex';
import { GlLoadingIcon, GlFormInput, GlFormGroup } from '@gitlab/ui';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import { s__, sprintf } from '~/locale';
import LoadingButton from '~/vue_shared/components/loading_button.vue';
import createEmptyBadge from '../empty_badge';
......
<script>
import { mapState, mapActions } from 'vuex';
import { GlSprintf } from '@gitlab/ui';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import { s__ } from '~/locale';
import DeprecatedModal2 from '~/vue_shared/components/deprecated_modal_2.vue';
import Badge from './badge.vue';
......
import flash from '~/flash';
import { deprecatedCreateFlash as flash } from '~/flash';
import { __ } from '~/locale';
import { scrollToElement } from '~/lib/utils/common_utils';
import service from '../../../services/drafts_service';
......
import flash from '~/flash';
import { deprecatedCreateFlash as flash } from '~/flash';
import { s__, sprintf } from '~/locale';
// Renders math using KaTeX in any element with the
......
import $ from 'jquery';
import { once } from 'lodash';
import flash from '~/flash';
import { deprecatedCreateFlash as flash } from '~/flash';
import { __, sprintf } from '~/locale';
// Renders diagrams and flowcharts from text using Mermaid in any element with the
......
......@@ -2,7 +2,7 @@
import $ from 'jquery';
import axios from '~/lib/utils/axios_utils';
import flash from '~/flash';
import { deprecatedCreateFlash as flash } from '~/flash';
import { __ } from '~/locale';
// MarkdownPreview
......
import Flash from '../flash';
import { deprecatedCreateFlash as Flash } from '../flash';
import BalsamiqViewer from './balsamiq/balsamiq_viewer';
import { __ } from '~/locale';
......
import $ from 'jquery';
import Api from '~/api';
import Flash from '../flash';
import { deprecatedCreateFlash as Flash } from '../flash';
import FileTemplateTypeSelector from './template_selectors/type_selector';
import BlobCiYamlSelector from './template_selectors/ci_yaml_selector';
import DockerfileSelector from './template_selectors/dockerfile_selector';
......
import { SwaggerUIBundle } from 'swagger-ui-dist';
import flash from '~/flash';
import { deprecatedCreateFlash as flash } from '~/flash';
import { __ } from '~/locale';
export default () => {
......
import $ from 'jquery';
import '~/behaviors/markdown/render_gfm';
import Flash from '../../flash';
import { deprecatedCreateFlash as Flash } from '../../flash';
import { handleLocationHash } from '../../lib/utils/common_utils';
import axios from '../../lib/utils/axios_utils';
import eventHub from '../../notes/event_hub';
......
......@@ -2,7 +2,7 @@
import $ from 'jquery';
import axios from '~/lib/utils/axios_utils';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import { BLOB_EDITOR_ERROR, BLOB_PREVIEW_ERROR } from './constants';
import TemplateSelectorMediator from '../blob/file_template_mediator';
import getModeByFileExtension from '~/lib/utils/ace_utils';
......
<script>
import { __ } from '~/locale';
import Flash from '~/flash';
import { deprecatedCreateFlash as Flash } from '~/flash';
import DeprecatedModal from '~/vue_shared/components/deprecated_modal.vue';
import { visitUrl } from '~/lib/utils/url_utility';
import boardsStore from '~/boards/stores/boards_store';
......
......@@ -6,7 +6,7 @@ import boardCard from './board_card.vue';
import eventHub from '../eventhub';
import boardsStore from '../stores/boards_store';
import { sprintf, __ } from '~/locale';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import {
getBoardSortableDefaultOptions,
sortableStart,
......
......@@ -3,7 +3,7 @@
import $ from 'jquery';
import Vue from 'vue';
import { GlLabel } from '@gitlab/ui';
import Flash from '~/flash';
import { deprecatedCreateFlash as Flash } from '~/flash';
import { sprintf, __ } from '~/locale';
import Sidebar from '~/right_sidebar';
import eventHub from '~/sidebar/event_hub';
......
<script>
import footerEEMixin from 'ee_else_ce/boards/mixins/modal_footer';
import Flash from '../../../flash';
import { deprecatedCreateFlash as Flash } from '../../../flash';
import { __, n__ } from '../../../locale';
import ListsDropdown from './lists_dropdown.vue';
import ModalStore from '../../stores/modal_store';
......
......@@ -3,7 +3,7 @@
import $ from 'jquery';
import { __ } from '~/locale';
import axios from '~/lib/utils/axios_utils';
import flash from '~/flash';
import { deprecatedCreateFlash as flash } from '~/flash';
import CreateLabelDropdown from '../../create_label';
import boardsStore from '../stores/boards_store';
......
<script>
import { GlButton } from '@gitlab/ui';
import axios from '~/lib/utils/axios_utils';
import Flash from '../../../flash';
import { deprecatedCreateFlash as Flash } from '../../../flash';
import { __ } from '../../../locale';
import boardsStore from '../../stores/boards_store';
......
......@@ -20,7 +20,7 @@ import {
import VueApollo from 'vue-apollo';
import BoardContent from '~/boards/components/board_content.vue';
import createDefaultClient from '~/lib/graphql';
import Flash from '~/flash';
import { deprecatedCreateFlash as Flash } from '~/flash';
import { __ } from '~/locale';
import './models/label';
import './models/assignee';
......
......@@ -2,7 +2,7 @@
import { __ } from '~/locale';
import ListLabel from './label';
import ListAssignee from './assignee';
import flash from '~/flash';
import { deprecatedCreateFlash as flash } from '~/flash';
import boardsStore from '../stores/boards_store';
import ListMilestone from './milestone';
import 'ee_else_ce/boards/models/issue';
......
import Vue from 'vue';
import { __ } from '../locale';
import createFlash from '../flash';
import { deprecatedCreateFlash as createFlash } from '../flash';
import axios from '../lib/utils/axios_utils';
import DivergenceGraph from './components/divergence_graph.vue';
......
import { escape } from 'lodash';
import axios from '../lib/utils/axios_utils';
import { s__ } from '../locale';
import Flash from '../flash';
import { deprecatedCreateFlash as Flash } from '../flash';
import { parseBoolean } from '../lib/utils/common_utils';
import statusCodes from '../lib/utils/http_status';
import VariableList from './ci_variable_list';
......
import * as types from './mutation_types';
import axios from '~/lib/utils/axios_utils';
import Api from '~/api';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import { __ } from '~/locale';
import { prepareDataForApi, prepareDataForDisplay, prepareEnvironments } from './utils';
......
......@@ -4,7 +4,7 @@ import { GlToast } from '@gitlab/ui';
import AccessorUtilities from '~/lib/utils/accessor';
import PersistentUserCallout from '../persistent_user_callout';
import { s__, sprintf } from '../locale';
import Flash from '../flash';
import { deprecatedCreateFlash as Flash } from '../flash';
import Poll from '../lib/utils/poll';
import initSettingsPanels from '../settings_panels';
import eventHub from './event_hub';
......
import * as Sentry from '@sentry/browser';
import Poll from '~/lib/utils/poll';
import axios from '~/lib/utils/axios_utils';
import flash from '~/flash';
import { deprecatedCreateFlash as flash } from '~/flash';
import { __ } from '~/locale';
import { MAX_REQUESTS } from '../constants';
import { parseIntPagination, normalizeHeaders } from '~/lib/utils/common_utils';
......
......@@ -3,7 +3,7 @@
import $ from 'jquery';
import { __ } from './locale';
import axios from './lib/utils/axios_utils';
import flash from './flash';
import { deprecatedCreateFlash as flash } from './flash';
import { capitalizeFirstCharacter } from './lib/utils/text_utility';
export default function initCompareAutocomplete(limitTo = null, clickHandler = () => {}) {
......
<script>
import { GlLink, GlSprintf } from '@gitlab/ui';
import { __ } from '../../locale';
import createFlash from '../../flash';
import { deprecatedCreateFlash as createFlash } from '../../flash';
import Api from '../../api';
import state from '../state';
import Dropdown from './dropdown.vue';
......
import flash from '~/flash';
import { deprecatedCreateFlash as flash } from '~/flash';
import { __ } from '~/locale';
import service from '../services/contributors_service';
import * as types from './mutation_types';
......
import * as types from './mutation_types';
import { setAWSConfig } from '../services/aws_services_facade';
import axios from '~/lib/utils/axios_utils';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import { convertObjectPropsToCamelCase } from '~/lib/utils/common_utils';
const getErrorMessage = data => {
......
/* global gapi */
import Vue from 'vue';
import Flash from '~/flash';
import { deprecatedCreateFlash as Flash } from '~/flash';
import GkeProjectIdDropdown from './components/gke_project_id_dropdown.vue';
import GkeZoneDropdown from './components/gke_zone_dropdown.vue';
import GkeMachineTypeDropdown from './components/gke_machine_type_dropdown.vue';
......
/* eslint-disable no-new */
import { debounce } from 'lodash';
import axios from './lib/utils/axios_utils';
import Flash from './flash';
import { deprecatedCreateFlash as Flash } from './flash';
import DropLab from './droplab/drop_lab';
import ISetter from './droplab/plugins/input_setter';
import { __, sprintf } from './locale';
......
......@@ -2,7 +2,7 @@ import $ from 'jquery';
import Vue from 'vue';
import Cookies from 'js-cookie';
import { GlEmptyState, GlLoadingIcon } from '@gitlab/ui';
import Flash from '../flash';
import { deprecatedCreateFlash as Flash } from '../flash';
import { __ } from '~/locale';
import Translate from '../vue_shared/translate';
import banner from './components/banner.vue';
......
import * as types from './mutation_types';
import Api from '~/api';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import { __ } from '~/locale';
export const requestAddFreezePeriod = ({ commit }) => {
......
<script>
import { GlLoadingIcon } from '@gitlab/ui';
import { s__ } from '~/locale';
import Flash from '~/flash';
import { deprecatedCreateFlash as Flash } from '~/flash';
import NavigationTabs from '~/vue_shared/components/navigation_tabs.vue';
import eventHub from '../eventhub';
import DeployKeysService from '../service';
......
<script>
import { GlIcon, GlLink, GlSprintf } from '@gitlab/ui';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import uploadDesignMutation from '../../graphql/mutations/upload_design.mutation.graphql';
import { UPLOAD_DESIGN_INVALID_FILETYPE_ERROR } from '../../utils/error_messages';
import { isValidDesignFile } from '../../utils/design_management_utils';
......
import { propertyOf } from 'lodash';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import { s__ } from '~/locale';
import getDesignListQuery from '../graphql/queries/get_design_list.query.graphql';
import allVersionsMixin from './all_versions';
......
......@@ -2,7 +2,7 @@
import Mousetrap from 'mousetrap';
import { GlLoadingIcon, GlAlert } from '@gitlab/ui';
import { ApolloMutation } from 'vue-apollo';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import { fetchPolicies } from '~/lib/graphql';
import allVersionsMixin from '../../mixins/all_versions';
import Toolbar from '../../components/toolbar/index.vue';
......
<script>
import { GlLoadingIcon, GlButton, GlAlert } from '@gitlab/ui';
import VueDraggable from 'vuedraggable';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import { s__, sprintf } from '~/locale';
import UploadButton from '../components/upload/button.vue';
import DeleteButton from '../components/delete_button.vue';
......
/* eslint-disable @gitlab/require-i18n-strings */
import { groupBy } from 'lodash';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import { extractCurrentDiscussion, extractDesign } from './design_management_utils';
import {
ADD_IMAGE_DIFF_NOTE_ERROR,
......
<script>
import { GlIcon, GlLink, GlSprintf } from '@gitlab/ui';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import uploadDesignMutation from '../../graphql/mutations/upload_design.mutation.graphql';
import { UPLOAD_DESIGN_INVALID_FILETYPE_ERROR } from '../../utils/error_messages';
import { isValidDesignFile } from '../../utils/design_management_utils';
......
import { propertyOf } from 'lodash';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import { s__ } from '~/locale';
import getDesignListQuery from '../graphql/queries/get_design_list.query.graphql';
import { extractNodes } from '../utils/design_management_utils';
......
......@@ -2,7 +2,7 @@
import Mousetrap from 'mousetrap';
import { GlLoadingIcon, GlAlert } from '@gitlab/ui';
import { ApolloMutation } from 'vue-apollo';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import { fetchPolicies } from '~/lib/graphql';
import allVersionsMixin from '../../mixins/all_versions';
import Toolbar from '../../components/toolbar/index.vue';
......
<script>
import { GlLoadingIcon, GlDeprecatedButton, GlAlert } from '@gitlab/ui';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import { s__, sprintf } from '~/locale';
import UploadButton from '../components/upload/button.vue';
import DeleteButton from '../components/delete_button.vue';
......
/* eslint-disable @gitlab/require-i18n-strings */
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import { extractCurrentDiscussion, extractDesign } from './design_management_utils';
import {
ADD_IMAGE_DIFF_NOTE_ERROR,
......
import $ from 'jquery';
import axios from '~/lib/utils/axios_utils';
import flash from '~/flash';
import { deprecatedCreateFlash as flash } from '~/flash';
import { __ } from '~/locale';
import { getLocationHash } from './lib/utils/url_utility';
import FilesCommentButton from './files_comment_button';
......
......@@ -3,7 +3,7 @@
import $ from 'jquery';
import Vue from 'vue';
import Flash from '../../flash';
import { deprecatedCreateFlash as Flash } from '../../flash';
import { sprintf, __ } from '~/locale';
const ResolveBtn = Vue.extend({
......
/* global CommentsStore */
import Vue from 'vue';
import Flash from '../../flash';
import { deprecatedCreateFlash as Flash } from '../../flash';
import { __ } from '~/locale';
window.gl = window.gl || {};
......
......@@ -3,8 +3,8 @@ import { mapState, mapGetters, mapActions } from 'vuex';
import { GlLoadingIcon, GlButtonGroup, GlButton, GlAlert } from '@gitlab/ui';
import Mousetrap from 'mousetrap';
import { __ } from '~/locale';
import createFlash from '~/flash';
import { getParameterByName, parseBoolean } from '~/lib/utils/common_utils';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import PanelResizer from '~/vue_shared/components/panel_resizer.vue';
import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
import { isSingleViewStyle } from '~/helpers/diffs_helper';
......
<script>
import { mapState, mapActions } from 'vuex';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import { s__ } from '~/locale';
import Icon from '~/vue_shared/components/icon.vue';
import { UNFOLD_COUNT, INLINE_DIFF_VIEW_TYPE, PARALLEL_DIFF_VIEW_TYPE } from '../constants';
......
......@@ -4,7 +4,7 @@ import { escape } from 'lodash';
import { GlLoadingIcon } from '@gitlab/ui';
import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
import { __, sprintf } from '~/locale';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import { hasDiff } from '~/helpers/diffs_helper';
import eventHub from '../../notes/event_hub';
import DiffFileHeader from './diff_file_header.vue';
......
......@@ -3,7 +3,7 @@ import Cookies from 'js-cookie';
import Poll from '~/lib/utils/poll';
import axios from '~/lib/utils/axios_utils';
import httpStatusCodes from '~/lib/utils/http_status';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import { __, s__ } from '~/locale';
import { handleLocationHash, historyPushState, scrollToElement } from '~/lib/utils/common_utils';
import { mergeUrlParams, getLocationHash } from '~/lib/utils/url_utility';
......
<script>
import { GlDeprecatedButton } from '@gitlab/ui';
import Flash from '~/flash';
import { deprecatedCreateFlash as Flash } from '~/flash';
import { s__ } from '~/locale';
import emptyState from './empty_state.vue';
import eventHub from '../event_hub';
......
......@@ -7,7 +7,7 @@ import EnvironmentsStore from 'ee_else_ce/environments/stores/environments_store
import Poll from '../../lib/utils/poll';
import { getParameterByName } from '../../lib/utils/common_utils';
import { s__ } from '../../locale';
import Flash from '../../flash';
import { deprecatedCreateFlash as Flash } from '../../flash';
import eventHub from '../event_hub';
import EnvironmentsService from '../services/environments_service';
......
......@@ -12,7 +12,7 @@ import {
GlDeprecatedDropdownItem,
GlDeprecatedDropdownDivider,
} from '@gitlab/ui';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import { __, sprintf, n__ } from '~/locale';
import Icon from '~/vue_shared/components/icon.vue';
import TooltipOnTruncate from '~/vue_shared/components/tooltip_on_truncate.vue';
......
import service from '../services';
import * as types from './mutation_types';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import { visitUrl } from '~/lib/utils/url_utility';
import { __ } from '~/locale';
......
import service from '../../services';
import * as types from './mutation_types';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import Poll from '~/lib/utils/poll';
import { __ } from '~/locale';
......
import Service from '../../services';
import * as types from './mutation_types';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import Poll from '~/lib/utils/poll';
import { __ } from '~/locale';
......
import { __ } from '~/locale';
import axios from '~/lib/utils/axios_utils';
import { refreshCurrentPage } from '~/lib/utils/url_utility';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import { transformFrontendSettings } from '../utils';
import * as types from './mutation_types';
......
import $ from 'jquery';
import axios from '../lib/utils/axios_utils';
import { __ } from '../locale';
import Flash from '../flash';
import { deprecatedCreateFlash as Flash } from '../flash';
import LazyLoader from '../lazy_loader';
import { togglePopover } from '../shared/popover';
......
import createFlash from '../flash';
import { deprecatedCreateFlash as createFlash } from '../flash';
import AjaxFilter from '../droplab/plugins/ajax_filter';
import FilteredSearchDropdown from './filtered_search_dropdown';
import DropdownUtils from './dropdown_utils';
......
import Flash from '../flash';
import { deprecatedCreateFlash as Flash } from '../flash';
import Ajax from '../droplab/plugins/ajax';
import Filter from '../droplab/plugins/filter';
import FilteredSearchDropdown from './filtered_search_dropdown';
......
import Flash from '../flash';
import { deprecatedCreateFlash as Flash } from '../flash';
import Ajax from '../droplab/plugins/ajax';
import Filter from '../droplab/plugins/filter';
import FilteredSearchDropdown from './filtered_search_dropdown';
......
......@@ -3,7 +3,7 @@ import recentSearchesStorageKeys from 'ee_else_ce/filtered_search/recent_searche
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 Flash from '../flash';
import { deprecatedCreateFlash as Flash } from '../flash';
import FilteredSearchContainer from './container';
import RecentSearchesRoot from './recent_searches_root';
import RecentSearchesStore from './stores/recent_searches_store';
......
......@@ -4,7 +4,7 @@ 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 Flash from '~/flash';
import { deprecatedCreateFlash as Flash } from '~/flash';
import UsersCache from '~/lib/utils/users_cache';
import { __ } from '~/locale';
import * as Emoji from '~/emoji';
......
......@@ -75,7 +75,7 @@ const removeFlashClickListener = (flashEl, fadeTransition) => {
* @param {Function} clickHandler Method to call when action is clicked on
* @param {Boolean} fadeTransition Boolean to determine whether to fade the alert out
*/
const createFlash = function createFlash(
const deprecatedCreateFlash = function deprecatedCreateFlash(
message,
type = FLASH_TYPES.ALERT,
parent = document,
......@@ -127,7 +127,7 @@ const createFlash = function createFlash(
* @param {Boolean} options.captureError Boolean to determine whether to send error to sentry
* @param {Object} options.error Error to be captured in sentry
*/
const newCreateFlash = function newCreateFlash({
const createFlash = function createFlash({
message,
type = FLASH_TYPES.ALERT,
parent = document,
......@@ -168,11 +168,11 @@ const newCreateFlash = function newCreateFlash({
export {
createFlash as default,
newCreateFlash,
deprecatedCreateFlash,
createFlashEl,
createAction,
hideFlash,
removeFlashClickListener,
FLASH_TYPES,
};
window.Flash = createFlash;
window.Flash = deprecatedCreateFlash;
import $ from 'jquery';
import { parseQueryStringIntoObject } from '~/lib/utils/common_utils';
import axios from '~/lib/utils/axios_utils';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import { __ } from '~/locale';
export default class GpgBadges {
......
import axios from '~/lib/utils/axios_utils';
import { __ } from '~/locale';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import { refreshCurrentPage } from '~/lib/utils/url_utility';
import * as mutationTypes from './mutation_types';
......
import { slugify } from './lib/utils/text_utility';
import fetchGroupPathAvailability from '~/pages/groups/new/fetch_group_path_availability';
import flash from '~/flash';
import { deprecatedCreateFlash as flash } from '~/flash';
import { __ } from '~/locale';
export default class Group {
......
import $ from 'jquery';
import { __ } from '~/locale';
import axios from './lib/utils/axios_utils';
import flash from './flash';
import { deprecatedCreateFlash as flash } from './flash';
const tooltipTitles = {
group: __('Unsubscribe at group level'),
......
<script>
import { mapActions, mapState, mapGetters } from 'vuex';
import { GlModal } from '@gitlab/ui';
import flash from '~/flash';
import { deprecatedCreateFlash as flash } from '~/flash';
import { __, sprintf, s__ } from '~/locale';
import { modalTypes } from '../../constants';
import { trimPathComponents, getPathParent } from '../../utils';
......
<script>
import { mapState, mapGetters, mapActions } from 'vuex';
import { viewerInformationForPath } from '~/vue_shared/components/content_viewer/lib/viewer_utils';
import flash from '~/flash';
import { deprecatedCreateFlash as flash } from '~/flash';
import ContentViewer from '~/vue_shared/components/content_viewer/content_viewer.vue';
import DiffViewer from '~/vue_shared/components/diff_viewer/diff_viewer.vue';
import {
......
import Vue from 'vue';
import IdeRouter from '~/ide/ide_router_extension';
import { joinPaths } from '~/lib/utils/url_utility';
import flash from '~/flash';
import { deprecatedCreateFlash as flash } from '~/flash';
import { __ } from '~/locale';
import { syncRouterAndStore } from './sync_router_and_store';
......
......@@ -2,7 +2,7 @@ import Vue from 'vue';
import { escape } from 'lodash';
import { __, sprintf } from '~/locale';
import { visitUrl } from '~/lib/utils/url_utility';
import flash from '~/flash';
import { deprecatedCreateFlash as flash } from '~/flash';
import * as types from './mutation_types';
import { decorateFiles } from '../lib/files';
import { stageKeys } from '../constants';
......
import flash from '~/flash';
import { deprecatedCreateFlash as flash } from '~/flash';
import { __ } from '~/locale';
import service from '../../services';
import * as types from '../mutation_types';
......
import { escape } from 'lodash';
import flash from '~/flash';
import { deprecatedCreateFlash as flash } from '~/flash';
import { __, sprintf } from '~/locale';
import service from '../../services';
import api from '../../../api';
......
import { sprintf, __ } from '~/locale';
import flash from '~/flash';
import { deprecatedCreateFlash as flash } from '~/flash';
import httpStatusCodes from '~/lib/utils/http_status';
import * as rootTypes from '../../mutation_types';
import { createCommitPayload, createNewMergeRequestUrl } from '../../utils';
......
import axios from '~/lib/utils/axios_utils';
import httpStatus from '~/lib/utils/http_status';
import flash from '~/flash';
import { deprecatedCreateFlash as flash } from '~/flash';
import * as types from '../mutation_types';
import * as messages from '../messages';
import * as terminalService from '../../../../services/terminals';
......
import axios from '~/lib/utils/axios_utils';
import flash from '~/flash';
import { deprecatedCreateFlash as flash } from '~/flash';
import * as types from '../mutation_types';
import * as messages from '../messages';
import { isEndingStatus } from '../utils';
......
......@@ -8,7 +8,7 @@ import {
} from '~/lib/utils/common_utils';
import Poll from '~/lib/utils/poll';
import { visitUrl, objectToQuery } from '~/lib/utils/url_utility';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import { s__, sprintf } from '~/locale';
import axios from '~/lib/utils/axios_utils';
......
......@@ -2,7 +2,7 @@ import $ from 'jquery';
import { escape } from 'lodash';
import { __, sprintf } from './locale';
import axios from './lib/utils/axios_utils';
import flash from './flash';
import { deprecatedCreateFlash as flash } from './flash';
import { parseBoolean } from './lib/utils/common_utils';
class ImporterStatus {
......
import axios from '~/lib/utils/axios_utils';
import { refreshCurrentPage } from '~/lib/utils/url_utility';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import { ERROR_MSG } from './constants';
export default class IncidentsSettingsService {
......
import $ from 'jquery';
import axios from '../lib/utils/axios_utils';
import flash from '../flash';
import { deprecatedCreateFlash as flash } from '../flash';
import { __ } from '~/locale';
import initForm from './edit';
import eventHub from './edit/event_hub';
......
import $ from 'jquery';
import { difference, intersection, union } from 'lodash';
import axios from './lib/utils/axios_utils';
import Flash from './flash';
import { deprecatedCreateFlash as Flash } from './flash';
import { __ } from './locale';
export default {
......
import $ from 'jquery';
import axios from './lib/utils/axios_utils';
import flash from './flash';
import { deprecatedCreateFlash as flash } from './flash';
import { s__, __ } from './locale';
import issuableInitBulkUpdateSidebar from './issuable_init_bulk_update_sidebar';
......
......@@ -6,7 +6,7 @@ import {
GlSkeletonLoading,
GlSafeHtmlDirective as SafeHtml,
} from '@gitlab/ui';
import flash from '~/flash';
import { deprecatedCreateFlash as flash } from '~/flash';
import axios from '~/lib/utils/axios_utils';
import {
scrollToElement,
......
......@@ -3,7 +3,7 @@
import $ from 'jquery';
import axios from './lib/utils/axios_utils';
import { addDelimiter } from './lib/utils/text_utility';
import flash from './flash';
import { deprecatedCreateFlash as flash } from './flash';
import CreateMergeRequestDropdown from './create_merge_request_dropdown';
import IssuablesHelper from './helpers/issuables_helper';
import { joinPaths } from '~/lib/utils/url_utility';
......
......@@ -2,7 +2,7 @@
import { GlIcon, GlIntersectionObserver } from '@gitlab/ui';
import Visibility from 'visibilityjs';
import { __, s__, sprintf } from '~/locale';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import { visitUrl } from '~/lib/utils/url_utility';
import Poll from '~/lib/utils/poll';
import eventHub from '../event_hub';
......
<script>
import $ from 'jquery';
import { s__, sprintf } from '~/locale';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import animateMixin from '../mixins/animate';
import TaskList from '../../task_list';
import recaptchaModalImplementor from '../../vue_shared/mixins/recaptcha_modal_implementor';
......
......@@ -3,7 +3,7 @@ import * as types from './mutation_types';
import axios from '~/lib/utils/axios_utils';
import Poll from '~/lib/utils/poll';
import { setFaviconOverlay, resetFavicon } from '~/lib/utils/common_utils';
import flash from '~/flash';
import { deprecatedCreateFlash as flash } from '~/flash';
import { __ } from '~/locale';
import {
canScroll,
......
......@@ -3,7 +3,7 @@
import $ from 'jquery';
import Sortable from 'sortablejs';
import flash from './flash';
import { deprecatedCreateFlash as flash } from './flash';
import axios from './lib/utils/axios_utils';
import { __ } from './locale';
......
......@@ -8,7 +8,7 @@ import { sprintf, s__, __ } from './locale';
import axios from './lib/utils/axios_utils';
import IssuableBulkUpdateActions from './issuable_bulk_update_actions';
import CreateLabelDropdown from './create_label';
import flash from './flash';
import { deprecatedCreateFlash as flash } from './flash';
import ModalStore from './boards/stores/modal_store';
import boardsStore from './boards/stores/boards_store';
import { isScopedLabel } from '~/lib/utils/common_utils';
......
......@@ -21,7 +21,7 @@ import { getLocationHash, visitUrl } from './lib/utils/url_utility';
// everything else
import loadAwardsHandler from './awards_handler';
import Flash, { removeFlashClickListener } from './flash';
import { deprecatedCreateFlash as Flash, removeFlashClickListener } from './flash';
import './gl_dropdown';
import initTodoToggle from './header';
import initImporterStatus from './importer_status';
......
import Sortable from 'sortablejs';
import { s__ } from '~/locale';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import {
getBoardSortableDefaultOptions,
sortableStart,
......
......@@ -3,7 +3,7 @@
import Vue from 'vue';
import axios from '~/lib/utils/axios_utils';
import flash from '~/flash';
import { deprecatedCreateFlash as flash } from '~/flash';
import { __ } from '~/locale';
import getModeByFileExtension from '~/lib/utils/ace_utils';
......
import $ from 'jquery';
import Vue from 'vue';
import createFlash from '../flash';
import { deprecatedCreateFlash as createFlash } from '../flash';
import initIssuableSidebar from '../init_issuable_sidebar';
import './merge_conflict_store';
import MergeConflictsService from './merge_conflict_service';
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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