mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
## Summary
Manual backport of "Attempt to get rid of SavedObjectClass (#192265)"
### Checklist
### For maintainers
- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
---------
Co-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit ac29d0fc48
)
# Conflicts:
#
src/plugins/dashboard/public/services/saved_objects_tagging/saved_objects_tagging.stub.ts
#
src/plugins/dashboard/public/services/saved_objects_tagging/saved_objects_tagging_service.ts
# src/plugins/dashboard/public/services/saved_objects_tagging/types.ts
## Summary
Summarize your PR. If it involves visual changes include a screenshot or
gif.
### Checklist
This commit is contained in:
parent
89f85ab596
commit
0e205fae8f
41 changed files with 10 additions and 2022 deletions
|
@ -1,17 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import {
|
||||
SavedObjectsTaggingApiUi,
|
||||
TagDecoratedSavedObject,
|
||||
} from '@kbn/saved-objects-tagging-oss-plugin/public';
|
||||
|
||||
export const hasTagDecoration: SavedObjectsTaggingApiUi['hasTagDecoration'] = (
|
||||
object
|
||||
): object is TagDecoratedSavedObject => {
|
||||
return 'getTags' in object && 'setTags' in object;
|
||||
};
|
|
@ -21,7 +21,6 @@ import { buildGetSearchBarFilter } from './get_search_bar_filter';
|
|||
import { buildParseSearchQuery } from './parse_search_query';
|
||||
import { buildConvertNameToReference } from './convert_name_to_reference';
|
||||
import { buildGetTagList } from './get_tag_list';
|
||||
import { hasTagDecoration } from './has_tag_decoration';
|
||||
|
||||
interface GetUiApiOptions extends StartServices {
|
||||
capabilities: TagsCapabilities;
|
||||
|
@ -50,7 +49,6 @@ export const getUiApi = ({
|
|||
getSearchBarFilter: buildGetSearchBarFilter({ getTagList }),
|
||||
parseSearchQuery: buildParseSearchQuery({ cache }),
|
||||
convertNameToReference: buildConvertNameToReference({ cache }),
|
||||
hasTagDecoration,
|
||||
getTagIdsFromReferences,
|
||||
getTagIdFromName: (tagName: string) => convertTagNameToId(tagName, cache.getState()),
|
||||
updateTagsReferences,
|
||||
|
|
|
@ -15,7 +15,6 @@ import type { ScopedHistory } from '@kbn/core/public';
|
|||
import { coreMock, themeServiceMock } from '@kbn/core/public/mocks';
|
||||
import { dataPluginMock } from '@kbn/data-plugin/public/mocks';
|
||||
import { dataViewPluginMocks } from '@kbn/data-views-plugin/public/mocks';
|
||||
import { savedObjectsPluginMock } from '@kbn/saved-objects-plugin/public/mocks';
|
||||
import { chartPluginMock } from '@kbn/charts-plugin/public/mocks';
|
||||
import { fieldFormatsServiceMock } from '@kbn/field-formats-plugin/public/mocks';
|
||||
import type { SharePluginStart } from '@kbn/share-plugin/public';
|
||||
|
@ -88,7 +87,6 @@ const appDependencies: AppDependencies = {
|
|||
theme: themeServiceMock.createStartContract(),
|
||||
http: coreSetup.http,
|
||||
history: {} as ScopedHistory,
|
||||
savedObjectsPlugin: savedObjectsPluginMock.createStartContract(),
|
||||
share: { urlGenerators: { getUrlGenerator: jest.fn() } } as unknown as SharePluginStart,
|
||||
triggersActionsUi: {} as jest.Mocked<TriggersAndActionsUIPublicPluginStart>,
|
||||
unifiedSearch: unifiedSearchPluginMock.createStartContract(),
|
||||
|
|
|
@ -19,7 +19,6 @@ import type {
|
|||
ScopedHistory,
|
||||
ThemeServiceStart,
|
||||
} from '@kbn/core/public';
|
||||
import type { SavedObjectsStart as SavedObjectsPluginStart } from '@kbn/saved-objects-plugin/public';
|
||||
import type { DataPublicPluginStart } from '@kbn/data-plugin/public';
|
||||
import type { DataViewsPublicPluginStart } from '@kbn/data-views-plugin/public';
|
||||
import type { SharePluginStart } from '@kbn/share-plugin/public';
|
||||
|
@ -59,7 +58,6 @@ export interface AppDependencies {
|
|||
overlays: OverlayStart;
|
||||
theme: ThemeServiceStart;
|
||||
history: ScopedHistory;
|
||||
savedObjectsPlugin: SavedObjectsPluginStart;
|
||||
share: SharePluginStart;
|
||||
spaces?: SpacesPluginStart;
|
||||
triggersActionsUi: TriggersAndActionsUIPublicPluginStart;
|
||||
|
|
|
@ -84,7 +84,6 @@ export async function mountManagementSection(
|
|||
uiSettings,
|
||||
settings,
|
||||
history,
|
||||
savedObjectsPlugin: plugins.savedObjects,
|
||||
share,
|
||||
spaces,
|
||||
triggersActionsUi,
|
||||
|
|
|
@ -11,7 +11,6 @@ import type { CoreSetup } from '@kbn/core/public';
|
|||
import type { DataPublicPluginStart } from '@kbn/data-plugin/public';
|
||||
import type { DataViewsPublicPluginStart } from '@kbn/data-views-plugin/public';
|
||||
import type { HomePublicPluginSetup } from '@kbn/home-plugin/public';
|
||||
import type { SavedObjectsStart } from '@kbn/saved-objects-plugin/public';
|
||||
import type { ManagementSetup } from '@kbn/management-plugin/public';
|
||||
import type { SharePluginStart } from '@kbn/share-plugin/public';
|
||||
import type { SpacesApi } from '@kbn/spaces-plugin/public';
|
||||
|
@ -37,7 +36,6 @@ export interface PluginsDependencies {
|
|||
dataViews: DataViewsPublicPluginStart;
|
||||
management: ManagementSetup;
|
||||
home: HomePublicPluginSetup;
|
||||
savedObjects: SavedObjectsStart;
|
||||
savedSearch: SavedSearchPublicPluginStart;
|
||||
share: SharePluginStart;
|
||||
spaces?: SpacesApi;
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
"@kbn/alerting-plugin",
|
||||
"@kbn/data-views-plugin",
|
||||
"@kbn/home-plugin",
|
||||
"@kbn/saved-objects-plugin",
|
||||
"@kbn/management-plugin",
|
||||
"@kbn/share-plugin",
|
||||
"@kbn/spaces-plugin",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue