Skip to content

Commit ff6e2a6

Browse files
committed
undo ToastNotification changes / add deprecated text
1 parent d6604a1 commit ff6e2a6

5 files changed

Lines changed: 45 additions & 4 deletions

File tree

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/*
2+
* Licensed to Elasticsearch B.V. under one or more contributor
3+
* license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright
5+
* ownership. Elasticsearch B.V. licenses this file to you under
6+
* the Apache License, Version 2.0 (the "License"); you may
7+
* not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
export { ToastNotifications } from './toast_notifications';
20+
export { toastNotifications } from './toasts';
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/*
2+
* Licensed to Elasticsearch B.V. under one or more contributor
3+
* license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright
5+
* ownership. Elasticsearch B.V. licenses this file to you under
6+
* the Apache License, Version 2.0 (the "License"); you may
7+
* not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
/**
20+
* ToastNotifications is deprecated! Please use npSetup.core.notifications.toasts instead
21+
*/
22+
export { ToastNotifications } from '../../../../../plugins/kibana_legacy/public';

src/legacy/ui/public/notify/toasts.ts renamed to src/legacy/ui/public/notify/toasts/toasts.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,5 @@
1818
*/
1919

2020
import { npSetup } from 'ui/new_platform';
21-
import { ToastNotifications } from '../../../../plugins/kibana_legacy/public';
22-
21+
import { ToastNotifications } from './toast_notifications';
2322
export const toastNotifications = new ToastNotifications(npSetup.core.notifications.toasts);

x-pack/legacy/plugins/spaces/public/copy_saved_objects_to_space/components/copy_to_space_flyout.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import { act } from '@testing-library/react';
1717
import { ProcessingCopyToSpace } from './processing_copy_to_space';
1818
import { spacesManagerMock } from '../../spaces_manager/mocks';
1919
import { SpacesManager } from '../../spaces_manager';
20-
import { ToastNotifications } from '../../../../../../../src/plugins/kibana_legacy/public';
20+
import { ToastNotifications } from 'ui/notify/toasts/toast_notifications';
2121

2222
jest.mock('../../../../../../../src/legacy/core_plugins/management/public/legacy', () => ({
2323
setup: mockManagementPlugin.createSetupContract(),

x-pack/legacy/plugins/spaces/public/copy_saved_objects_to_space/components/copy_to_space_flyout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import {
2121
import { mapValues } from 'lodash';
2222
import { i18n } from '@kbn/i18n';
2323
import { FormattedMessage } from '@kbn/i18n/react';
24-
import { ToastNotifications } from '../../../../../../../src/plugins/kibana_legacy/public';
24+
import { ToastNotifications } from 'ui/notify/toasts/toast_notifications';
2525
import { SavedObjectsManagementRecord } from '../../../../../../../src/legacy/core_plugins/management/public';
2626
import {
2727
ProcessedImportResponse,

0 commit comments

Comments
 (0)