Skip to content

Commit

Permalink
undo ToastNotification changes / add deprecated text
Browse files Browse the repository at this point in the history
  • Loading branch information
kertal committed Feb 6, 2020
1 parent d6604a1 commit ff6e2a6
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 4 deletions.
20 changes: 20 additions & 0 deletions src/legacy/ui/public/notify/toasts/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
export { ToastNotifications } from './toast_notifications';
export { toastNotifications } from './toasts';
22 changes: 22 additions & 0 deletions src/legacy/ui/public/notify/toasts/toast_notifications.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
/**
* ToastNotifications is deprecated! Please use npSetup.core.notifications.toasts instead
*/
export { ToastNotifications } from '../../../../../plugins/kibana_legacy/public';
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,5 @@
*/

import { npSetup } from 'ui/new_platform';
import { ToastNotifications } from '../../../../plugins/kibana_legacy/public';

import { ToastNotifications } from './toast_notifications';
export const toastNotifications = new ToastNotifications(npSetup.core.notifications.toasts);
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { act } from '@testing-library/react';
import { ProcessingCopyToSpace } from './processing_copy_to_space';
import { spacesManagerMock } from '../../spaces_manager/mocks';
import { SpacesManager } from '../../spaces_manager';
import { ToastNotifications } from '../../../../../../../src/plugins/kibana_legacy/public';
import { ToastNotifications } from 'ui/notify/toasts/toast_notifications';

jest.mock('../../../../../../../src/legacy/core_plugins/management/public/legacy', () => ({
setup: mockManagementPlugin.createSetupContract(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
import { mapValues } from 'lodash';
import { i18n } from '@kbn/i18n';
import { FormattedMessage } from '@kbn/i18n/react';
import { ToastNotifications } from '../../../../../../../src/plugins/kibana_legacy/public';
import { ToastNotifications } from 'ui/notify/toasts/toast_notifications';
import { SavedObjectsManagementRecord } from '../../../../../../../src/legacy/core_plugins/management/public';
import {
ProcessedImportResponse,
Expand Down

0 comments on commit ff6e2a6

Please sign in to comment.