string
| |
+| showSaveModal | (saveModal: React.ReactElement, I18nContext: I18nStart['Context']) => void
| |
+| i18nContext | I18nStart['Context']
| |
+| toasts | NotificationsStart['toasts']
| |
+| options | AttributeServiceOptions<SavedObjectAttributes>
| |
+| getEmbeddableFactory | (embeddableFactoryId: string) => EmbeddableFactory
| |
+
diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.attributeservice.getexplicitinputfromembeddable.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.attributeservice.getexplicitinputfromembeddable.md
new file mode 100644
index 0000000000000..e3f27723e1a70
--- /dev/null
+++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.attributeservice.getexplicitinputfromembeddable.md
@@ -0,0 +1,22 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [AttributeService](./kibana-plugin-plugins-embeddable-public.attributeservice.md) > [getExplicitInputFromEmbeddable](./kibana-plugin-plugins-embeddable-public.attributeservice.getexplicitinputfromembeddable.md)
+
+## AttributeService.getExplicitInputFromEmbeddable() method
+
+Signature:
+
+```typescript
+getExplicitInputFromEmbeddable(embeddable: IEmbeddable): ValType | RefType;
+```
+
+## Parameters
+
+| Parameter | Type | Description |
+| --- | --- | --- |
+| embeddable | IEmbeddable
| |
+
+Returns:
+
+`ValType | RefType`
+
diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.attributeservice.getinputasreftype.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.attributeservice.getinputasreftype.md
new file mode 100644
index 0000000000000..7908327c594d8
--- /dev/null
+++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.attributeservice.getinputasreftype.md
@@ -0,0 +1,16 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [AttributeService](./kibana-plugin-plugins-embeddable-public.attributeservice.md) > [getInputAsRefType](./kibana-plugin-plugins-embeddable-public.attributeservice.getinputasreftype.md)
+
+## AttributeService.getInputAsRefType property
+
+Signature:
+
+```typescript
+getInputAsRefType: (input: ValType | RefType, saveOptions?: {
+ showSaveModal: boolean;
+ saveModalTitle?: string | undefined;
+ } | {
+ title: string;
+ } | undefined) => PromiseAttributeService
class |
+
+## Properties
+
+| Property | Modifiers | Type | Description |
+| --- | --- | --- | --- |
+| [getInputAsRefType](./kibana-plugin-plugins-embeddable-public.attributeservice.getinputasreftype.md) | | (input: ValType | RefType, saveOptions?: {
showSaveModal: boolean;
saveModalTitle?: string | undefined;
} | {
title: string;
} | undefined) => Promise<RefType>
| |
+| [getInputAsValueType](./kibana-plugin-plugins-embeddable-public.attributeservice.getinputasvaluetype.md) | | (input: ValType | RefType) => Promise<ValType>
| |
+| [inputIsRefType](./kibana-plugin-plugins-embeddable-public.attributeservice.inputisreftype.md) | | (input: ValType | RefType) => input is RefType
| |
+
+## Methods
+
+| Method | Modifiers | Description |
+| --- | --- | --- |
+| [getExplicitInputFromEmbeddable(embeddable)](./kibana-plugin-plugins-embeddable-public.attributeservice.getexplicitinputfromembeddable.md) | | |
+| [unwrapAttributes(input)](./kibana-plugin-plugins-embeddable-public.attributeservice.unwrapattributes.md) | | |
+| [wrapAttributes(newAttributes, useRefType, input)](./kibana-plugin-plugins-embeddable-public.attributeservice.wrapattributes.md) | | |
+
diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.attributeservice.unwrapattributes.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.attributeservice.unwrapattributes.md
new file mode 100644
index 0000000000000..f08736a2240a3
--- /dev/null
+++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.attributeservice.unwrapattributes.md
@@ -0,0 +1,22 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [AttributeService](./kibana-plugin-plugins-embeddable-public.attributeservice.md) > [unwrapAttributes](./kibana-plugin-plugins-embeddable-public.attributeservice.unwrapattributes.md)
+
+## AttributeService.unwrapAttributes() method
+
+Signature:
+
+```typescript
+unwrapAttributes(input: RefType | ValType): PromiseRefType | ValType
| |
+
+Returns:
+
+`PromiseSavedObjectAttributes
| |
+| useRefType | boolean
| |
+| input | ValType | RefType
| |
+
+Returns:
+
+`PromiseEmbeddablePanelHOC
| |
+| [getAttributeService](./kibana-plugin-plugins-embeddable-public.embeddablestart.getattributeservice.md) | <A extends {
title: string;
}, V extends EmbeddableInput & {
[ATTRIBUTE_SERVICE_KEY]: A;
} = EmbeddableInput & {
[ATTRIBUTE_SERVICE_KEY]: A;
}, R extends SavedObjectEmbeddableInput = SavedObjectEmbeddableInput>(type: string, options: AttributeServiceOptions<A>) => AttributeService<A, V, R>
| |
| [getEmbeddableFactories](./kibana-plugin-plugins-embeddable-public.embeddablestart.getembeddablefactories.md) | () => IterableIterator<EmbeddableFactory>
| |
| [getEmbeddableFactory](./kibana-plugin-plugins-embeddable-public.embeddablestart.getembeddablefactory.md) | <I extends EmbeddableInput = EmbeddableInput, O extends EmbeddableOutput = EmbeddableOutput, E extends IEmbeddable<I, O> = IEmbeddable<I, O>>(embeddableFactoryId: string) => EmbeddableFactory<I, O, E> | undefined
| |
| [getEmbeddablePanel](./kibana-plugin-plugins-embeddable-public.embeddablestart.getembeddablepanel.md) | (stateTransfer?: EmbeddableStateTransfer) => EmbeddablePanelHOC
| |
diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.md
index 64dfdd1c6dc22..df67eda5074b9 100644
--- a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.md
+++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.md
@@ -9,6 +9,7 @@
| Class | Description |
| --- | --- |
| [AddPanelAction](./kibana-plugin-plugins-embeddable-public.addpanelaction.md) | |
+| [AttributeService](./kibana-plugin-plugins-embeddable-public.attributeservice.md) | |
| [Container](./kibana-plugin-plugins-embeddable-public.container.md) | |
| [EditPanelAction](./kibana-plugin-plugins-embeddable-public.editpanelaction.md) | |
| [Embeddable](./kibana-plugin-plugins-embeddable-public.embeddable.md) | |
@@ -71,6 +72,7 @@
| --- | --- |
| [ACTION\_ADD\_PANEL](./kibana-plugin-plugins-embeddable-public.action_add_panel.md) | |
| [ACTION\_EDIT\_PANEL](./kibana-plugin-plugins-embeddable-public.action_edit_panel.md) | |
+| [ATTRIBUTE\_SERVICE\_KEY](./kibana-plugin-plugins-embeddable-public.attribute_service_key.md) | The attribute service is a shared, generic service that embeddables can use to provide the functionality required to fulfill the requirements of the ReferenceOrValueEmbeddable interface. The attribute\_service can also be used as a higher level wrapper to transform an embeddable input shape that references a saved object into an embeddable input shape that contains that saved object's attributes by value. |
| [CONTEXT\_MENU\_TRIGGER](./kibana-plugin-plugins-embeddable-public.context_menu_trigger.md) | |
| [contextMenuTrigger](./kibana-plugin-plugins-embeddable-public.contextmenutrigger.md) | |
| [defaultEmbeddableFactoryProvider](./kibana-plugin-plugins-embeddable-public.defaultembeddablefactoryprovider.md) | |
diff --git a/docs/development/plugins/embeddable/server/kibana-plugin-plugins-embeddable-server.embeddablesetup.getattributeservice.md b/docs/development/plugins/embeddable/server/kibana-plugin-plugins-embeddable-server.embeddablesetup.getattributeservice.md
new file mode 100644
index 0000000000000..9cd77ca6e3a36
--- /dev/null
+++ b/docs/development/plugins/embeddable/server/kibana-plugin-plugins-embeddable-server.embeddablesetup.getattributeservice.md
@@ -0,0 +1,11 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-embeddable-server](./kibana-plugin-plugins-embeddable-server.md) > [EmbeddableSetup](./kibana-plugin-plugins-embeddable-server.embeddablesetup.md) > [getAttributeService](./kibana-plugin-plugins-embeddable-server.embeddablesetup.getattributeservice.md)
+
+## EmbeddableSetup.getAttributeService property
+
+Signature:
+
+```typescript
+getAttributeService: any;
+```
diff --git a/docs/development/plugins/embeddable/server/kibana-plugin-plugins-embeddable-server.embeddablesetup.md b/docs/development/plugins/embeddable/server/kibana-plugin-plugins-embeddable-server.embeddablesetup.md
index 59ca4a2bbca75..bd024095e80be 100644
--- a/docs/development/plugins/embeddable/server/kibana-plugin-plugins-embeddable-server.embeddablesetup.md
+++ b/docs/development/plugins/embeddable/server/kibana-plugin-plugins-embeddable-server.embeddablesetup.md
@@ -14,6 +14,7 @@ export interface EmbeddableSetup
| Property | Type | Description |
| --- | --- | --- |
+| [getAttributeService](./kibana-plugin-plugins-embeddable-server.embeddablesetup.getattributeservice.md) | any
| |
| [registerEmbeddableFactory](./kibana-plugin-plugins-embeddable-server.embeddablesetup.registerembeddablefactory.md) | (factory: EmbeddableRegistryDefinition) => void
| |
| [registerEnhancement](./kibana-plugin-plugins-embeddable-server.embeddablesetup.registerenhancement.md) | (enhancement: EnhancementRegistryDefinition) => void
| |
diff --git a/examples/embeddable_examples/kibana.json b/examples/embeddable_examples/kibana.json
index 223b8c55a5fde..6025d24665901 100644
--- a/examples/embeddable_examples/kibana.json
+++ b/examples/embeddable_examples/kibana.json
@@ -4,7 +4,7 @@
"kibanaVersion": "kibana",
"server": true,
"ui": true,
- "requiredPlugins": ["embeddable", "uiActions", "dashboard", "savedObjects"],
+ "requiredPlugins": ["embeddable", "uiActions", "savedObjects", "dashboard"],
"optionalPlugins": [],
"extraPublicDirs": ["public/todo", "public/hello_world", "public/todo/todo_ref_embeddable"],
"requiredBundles": ["kibanaReact"]
diff --git a/examples/embeddable_examples/public/book/book_embeddable.tsx b/examples/embeddable_examples/public/book/book_embeddable.tsx
index 65ec22a2759e2..8d633a892ec6d 100644
--- a/examples/embeddable_examples/public/book/book_embeddable.tsx
+++ b/examples/embeddable_examples/public/book/book_embeddable.tsx
@@ -26,10 +26,10 @@ import {
EmbeddableOutput,
SavedObjectEmbeddableInput,
ReferenceOrValueEmbeddable,
+ AttributeService,
} from '../../../../src/plugins/embeddable/public';
import { BookSavedObjectAttributes } from '../../common';
import { BookEmbeddableComponent } from './book_component';
-import { AttributeService } from '../../../../src/plugins/dashboard/public';
export const BOOK_EMBEDDABLE = 'book';
export type BookEmbeddableInput = BookByValueInput | BookByReferenceInput;
diff --git a/examples/embeddable_examples/public/book/book_embeddable_factory.tsx b/examples/embeddable_examples/public/book/book_embeddable_factory.tsx
index a535552282150..f569e2e8d154d 100644
--- a/examples/embeddable_examples/public/book/book_embeddable_factory.tsx
+++ b/examples/embeddable_examples/public/book/book_embeddable_factory.tsx
@@ -25,6 +25,8 @@ import {
EmbeddableFactoryDefinition,
IContainer,
EmbeddableFactory,
+ EmbeddableStart,
+ AttributeService,
} from '../../../../src/plugins/embeddable/public';
import {
BookEmbeddable,
@@ -38,11 +40,10 @@ import {
SavedObjectsClientContract,
SimpleSavedObject,
} from '../../../../src/core/public';
-import { DashboardStart, AttributeService } from '../../../../src/plugins/dashboard/public';
import { checkForDuplicateTitle, OnSaveProps } from '../../../../src/plugins/saved_objects/public';
interface StartServices {
- getAttributeService: DashboardStart['getAttributeService'];
+ getAttributeService: EmbeddableStart['getAttributeService'];
openModal: OverlayStart['openModal'];
savedObjectsClient: SavedObjectsClientContract;
overlays: OverlayStart;
diff --git a/examples/embeddable_examples/public/book/edit_book_action.tsx b/examples/embeddable_examples/public/book/edit_book_action.tsx
index 77035b6887734..e2133a8d51ea2 100644
--- a/examples/embeddable_examples/public/book/edit_book_action.tsx
+++ b/examples/embeddable_examples/public/book/edit_book_action.tsx
@@ -22,7 +22,11 @@ import { i18n } from '@kbn/i18n';
import { BookSavedObjectAttributes, BOOK_SAVED_OBJECT } from '../../common';
import { createAction } from '../../../../src/plugins/ui_actions/public';
import { toMountPoint } from '../../../../src/plugins/kibana_react/public';
-import { ViewMode, SavedObjectEmbeddableInput } from '../../../../src/plugins/embeddable/public';
+import {
+ ViewMode,
+ SavedObjectEmbeddableInput,
+ EmbeddableStart,
+} from '../../../../src/plugins/embeddable/public';
import {
BookEmbeddable,
BOOK_EMBEDDABLE,
@@ -30,13 +34,12 @@ import {
BookByValueInput,
} from './book_embeddable';
import { CreateEditBookComponent } from './create_edit_book_component';
-import { DashboardStart } from '../../../../src/plugins/dashboard/public';
import { OnSaveProps } from '../../../../src/plugins/saved_objects/public';
import { SavedObjectsClientContract } from '../../../../src/core/target/types/public/saved_objects';
interface StartServices {
openModal: OverlayStart['openModal'];
- getAttributeService: DashboardStart['getAttributeService'];
+ getAttributeService: EmbeddableStart['getAttributeService'];
savedObjectsClient: SavedObjectsClientContract;
}
diff --git a/examples/embeddable_examples/public/plugin.ts b/examples/embeddable_examples/public/plugin.ts
index 6d1b119e741bd..9b9770e40611e 100644
--- a/examples/embeddable_examples/public/plugin.ts
+++ b/examples/embeddable_examples/public/plugin.ts
@@ -62,7 +62,6 @@ import {
ACTION_ADD_BOOK_TO_LIBRARY,
createAddBookToLibraryAction,
} from './book/add_book_to_library_action';
-import { DashboardStart } from '../../../src/plugins/dashboard/public';
import {
ACTION_UNLINK_BOOK_FROM_LIBRARY,
createUnlinkBookFromLibraryAction,
@@ -75,7 +74,6 @@ export interface EmbeddableExamplesSetupDependencies {
export interface EmbeddableExamplesStartDependencies {
embeddable: EmbeddableStart;
- dashboard: DashboardStart;
savedObjectsClient: SavedObjectsClient;
}
@@ -157,7 +155,7 @@ export class EmbeddableExamplesPlugin
this.exampleEmbeddableFactories.getBookEmbeddableFactory = deps.embeddable.registerEmbeddableFactory(
BOOK_EMBEDDABLE,
new BookEmbeddableFactoryDefinition(async () => ({
- getAttributeService: (await core.getStartServices())[1].dashboard.getAttributeService,
+ getAttributeService: (await core.getStartServices())[1].embeddable.getAttributeService,
openModal: (await core.getStartServices())[0].overlays.openModal,
savedObjectsClient: (await core.getStartServices())[0].savedObjects.client,
overlays: (await core.getStartServices())[0].overlays,
@@ -165,7 +163,7 @@ export class EmbeddableExamplesPlugin
);
const editBookAction = createEditBookAction(async () => ({
- getAttributeService: (await core.getStartServices())[1].dashboard.getAttributeService,
+ getAttributeService: (await core.getStartServices())[1].embeddable.getAttributeService,
openModal: (await core.getStartServices())[0].overlays.openModal,
savedObjectsClient: (await core.getStartServices())[0].savedObjects.client,
}));
diff --git a/src/plugins/dashboard/public/index.ts b/src/plugins/dashboard/public/index.ts
index bf9a3b2b8a217..004b1a901bca9 100644
--- a/src/plugins/dashboard/public/index.ts
+++ b/src/plugins/dashboard/public/index.ts
@@ -45,7 +45,6 @@ export {
export { addEmbeddableToDashboardUrl } from './url_utils/url_helper';
export { SavedObjectDashboard } from './saved_dashboards';
export { SavedDashboardPanel } from './types';
-export { AttributeService, ATTRIBUTE_SERVICE_KEY } from './attribute_service';
export function plugin(initializerContext: PluginInitializerContext) {
return new DashboardPlugin(initializerContext);
diff --git a/src/plugins/dashboard/public/mocks.tsx b/src/plugins/dashboard/public/mocks.tsx
index 07f29eca53042..be7460f3110a5 100644
--- a/src/plugins/dashboard/public/mocks.tsx
+++ b/src/plugins/dashboard/public/mocks.tsx
@@ -20,13 +20,10 @@
import { DashboardStart } from './plugin';
export type Start = jest.Mocked void;
// (undocumented)
diff --git a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/__snapshots__/label_template_flyout.test.tsx.snap b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/__snapshots__/label_template_flyout.test.tsx.snap
index 69b192a81d097..38f630358d064 100644
--- a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/__snapshots__/label_template_flyout.test.tsx.snap
+++ b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/__snapshots__/label_template_flyout.test.tsx.snap
@@ -4,6 +4,7 @@ exports[`LabelTemplateFlyout should not render if not visible 1`] = `""`;
exports[`LabelTemplateFlyout should render normally 1`] = `
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/url.test.tsx b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/url.test.tsx
index a1a1655949432..eb5cac111928f 100644
--- a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/url.test.tsx
+++ b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/url.test.tsx
@@ -18,13 +18,22 @@
*/
import React from 'react';
-import { shallow } from 'enzyme';
import { FieldFormat } from 'src/plugins/data/public';
-
+import { IntlProvider } from 'react-intl';
import { UrlFormatEditor } from './url';
+import { coreMock } from '../../../../../../../../../core/public/mocks';
+import { createKibanaReactContext } from '../../../../../../../../kibana_react/public';
+import { render } from '@testing-library/react';
+import userEvent from '@testing-library/user-event';
+
+jest.mock('@elastic/eui/lib/services/accessibility', () => {
+ return {
+ htmlIdGenerator: () => () => `generated-id`,
+ };
+});
const fieldType = 'string';
-const format = {
+const format = ({
getConverterFor: jest
.fn()
.mockImplementation(() => (input: string) => `converted url for ${input}`),
@@ -35,78 +44,115 @@ const format = {
{ kind: 'audio', text: 'Audio' },
],
},
-};
+} as unknown) as FieldFormat;
const formatParams = {
openLinkInCurrentTab: true,
urlTemplate: '',
labelTemplate: '',
width: '',
height: '',
+ type: 'a',
};
+
const onChange = jest.fn();
const onError = jest.fn();
+const renderWithContext = (Element: React.ReactElement) =>
+ render(
+
diff --git a/src/plugins/visualizations/kibana.json b/src/plugins/visualizations/kibana.json
index 4a2b795ce0917..0ced74e2733d3 100644
--- a/src/plugins/visualizations/kibana.json
+++ b/src/plugins/visualizations/kibana.json
@@ -9,7 +9,6 @@
"uiActions",
"embeddable",
"inspector",
- "dashboard",
"savedObjects"
],
"optionalPlugins": ["usageCollection"],
diff --git a/src/plugins/visualizations/public/embeddable/create_vis_embeddable_from_object.ts b/src/plugins/visualizations/public/embeddable/create_vis_embeddable_from_object.ts
index b27d24d980e8d..36f3f7d6ed22e 100644
--- a/src/plugins/visualizations/public/embeddable/create_vis_embeddable_from_object.ts
+++ b/src/plugins/visualizations/public/embeddable/create_vis_embeddable_from_object.ts
@@ -25,7 +25,11 @@ import {
VisualizeByReferenceInput,
VisualizeSavedObjectAttributes,
} from './visualize_embeddable';
-import { IContainer, ErrorEmbeddable } from '../../../../plugins/embeddable/public';
+import {
+ IContainer,
+ ErrorEmbeddable,
+ AttributeService,
+} from '../../../../plugins/embeddable/public';
import { DisabledLabEmbeddable } from './disabled_lab_embeddable';
import {
getSavedVisualizationsLoader,
@@ -37,7 +41,6 @@ import {
import { VisualizeEmbeddableFactoryDeps } from './visualize_embeddable_factory';
import { VISUALIZE_ENABLE_LABS_SETTING } from '../../common/constants';
import { SavedVisualizationsLoader } from '../saved_visualizations';
-import { AttributeService } from '../../../dashboard/public';
export const createVisEmbeddableFromObject = (deps: VisualizeEmbeddableFactoryDeps) => async (
vis: Vis,
diff --git a/src/plugins/visualizations/public/embeddable/visualize_embeddable.ts b/src/plugins/visualizations/public/embeddable/visualize_embeddable.ts
index fe8a9adff4052..a810b4b65528f 100644
--- a/src/plugins/visualizations/public/embeddable/visualize_embeddable.ts
+++ b/src/plugins/visualizations/public/embeddable/visualize_embeddable.ts
@@ -38,6 +38,7 @@ import {
Adapters,
SavedObjectEmbeddableInput,
ReferenceOrValueEmbeddable,
+ AttributeService,
} from '../../../../plugins/embeddable/public';
import {
IExpressionLoaderParams,
@@ -51,7 +52,6 @@ import { VIS_EVENT_TO_TRIGGER } from './events';
import { VisualizeEmbeddableFactoryDeps } from './visualize_embeddable_factory';
import { TriggerId } from '../../../ui_actions/public';
import { SavedObjectAttributes } from '../../../../core/types';
-import { AttributeService } from '../../../dashboard/public';
import { SavedVisualizationsLoader } from '../saved_visualizations';
import { VisSavedObject } from '../types';
diff --git a/src/plugins/visualizations/public/embeddable/visualize_embeddable_factory.tsx b/src/plugins/visualizations/public/embeddable/visualize_embeddable_factory.tsx
index 87f78f5639ff0..4b851da6be70e 100644
--- a/src/plugins/visualizations/public/embeddable/visualize_embeddable_factory.tsx
+++ b/src/plugins/visualizations/public/embeddable/visualize_embeddable_factory.tsx
@@ -26,6 +26,7 @@ import {
EmbeddableOutput,
ErrorEmbeddable,
IContainer,
+ AttributeService,
} from '../../../embeddable/public';
import { DisabledLabEmbeddable } from './disabled_lab_embeddable';
import {
@@ -50,7 +51,6 @@ import { createVisEmbeddableFromObject } from './create_vis_embeddable_from_obje
import { StartServicesGetter } from '../../../kibana_utils/public';
import { VisualizationsStartDeps } from '../plugin';
import { VISUALIZE_ENABLE_LABS_SETTING } from '../../common/constants';
-import { AttributeService } from '../../../dashboard/public';
import { checkForDuplicateTitle } from '../../../saved_objects/public';
interface VisualizationAttributes extends SavedObjectAttributes {
@@ -126,7 +126,7 @@ export class VisualizeEmbeddableFactory
if (!this.attributeService) {
this.attributeService = await this.deps
.start()
- .plugins.dashboard.getAttributeService<
+ .plugins.embeddable.getAttributeService<
VisualizeSavedObjectAttributes,
VisualizeByValueInput,
VisualizeByReferenceInput
diff --git a/src/plugins/visualizations/public/plugin.ts b/src/plugins/visualizations/public/plugin.ts
index 52382f3566206..c1dbe39def64c 100644
--- a/src/plugins/visualizations/public/plugin.ts
+++ b/src/plugins/visualizations/public/plugin.ts
@@ -113,8 +113,8 @@ export interface VisualizationsStartDeps {
uiActions: UiActionsStart;
application: ApplicationStart;
dashboard: DashboardStart;
+ getAttributeService: EmbeddableStart['getAttributeService'];
savedObjects: SavedObjectsStart;
- getAttributeService: DashboardStart['getAttributeService'];
savedObjectsClient: SavedObjectsClientContract;
}
diff --git a/x-pack/plugins/alerts/common/alert_instance_summary.ts b/x-pack/plugins/alerts/common/alert_instance_summary.ts
index 333db3ccda963..08c3b2fc2c241 100644
--- a/x-pack/plugins/alerts/common/alert_instance_summary.ts
+++ b/x-pack/plugins/alerts/common/alert_instance_summary.ts
@@ -4,8 +4,8 @@
* you may not use this file except in compliance with the Elastic License.
*/
-type AlertStatusValues = 'OK' | 'Active' | 'Error';
-type AlertInstanceStatusValues = 'OK' | 'Active';
+export type AlertStatusValues = 'OK' | 'Active' | 'Error';
+export type AlertInstanceStatusValues = 'OK' | 'Active';
export interface AlertInstanceSummary {
id: string;
diff --git a/x-pack/plugins/lens/kibana.json b/x-pack/plugins/lens/kibana.json
index 46a0b56a03ec5..100527accd1b9 100644
--- a/x-pack/plugins/lens/kibana.json
+++ b/x-pack/plugins/lens/kibana.json
@@ -12,9 +12,10 @@
"visualizations",
"dashboard",
"charts",
- "uiActions"
+ "uiActions",
+ "embeddable"
],
- "optionalPlugins": ["embeddable", "usageCollection", "taskManager", "globalSearch"],
+ "optionalPlugins": ["usageCollection", "taskManager", "globalSearch"],
"configPath": ["xpack", "lens"],
"extraPublicDirs": ["common/constants"],
"requiredBundles": ["savedObjects", "kibanaUtils", "kibanaReact", "embeddable"]
diff --git a/x-pack/plugins/lens/public/app_plugin/app.test.tsx b/x-pack/plugins/lens/public/app_plugin/app.test.tsx
index 70f3f767930ec..e9e6bf43d9f1b 100644
--- a/x-pack/plugins/lens/public/app_plugin/app.test.tsx
+++ b/x-pack/plugins/lens/public/app_plugin/app.test.tsx
@@ -36,7 +36,7 @@ import {
LensByReferenceInput,
} from '../editor_frame_service/embeddable/embeddable';
import { SavedObjectReference } from '../../../../../src/core/types';
-import { mockAttributeService } from '../../../../../src/plugins/dashboard/public/mocks';
+import { mockAttributeService } from '../../../../../src/plugins/embeddable/public/mocks';
import { LensAttributeService } from '../lens_attribute_service';
import { KibanaContextProvider } from '../../../../../src/plugins/kibana_react/public';
diff --git a/x-pack/plugins/lens/public/editor_frame_service/embeddable/embeddable.test.tsx b/x-pack/plugins/lens/public/editor_frame_service/embeddable/embeddable.test.tsx
index 4966fce590542..d91865c21a2a6 100644
--- a/x-pack/plugins/lens/public/editor_frame_service/embeddable/embeddable.test.tsx
+++ b/x-pack/plugins/lens/public/editor_frame_service/embeddable/embeddable.test.tsx
@@ -25,7 +25,7 @@ import { dataPluginMock } from '../../../../../../src/plugins/data/public/mocks'
import { VIS_EVENT_TO_TRIGGER } from '../../../../../../src/plugins/visualizations/public/embeddable';
import { coreMock, httpServiceMock } from '../../../../../../src/core/public/mocks';
import { IBasePath } from '../../../../../../src/core/public';
-import { AttributeService } from '../../../../../../src/plugins/dashboard/public';
+import { AttributeService } from '../../../../../../src/plugins/embeddable/public';
import { LensAttributeService } from '../../lens_attribute_service';
import { OnSaveProps } from '../../../../../../src/plugins/saved_objects/public/save_modal';
diff --git a/x-pack/plugins/lens/public/lens_attribute_service.ts b/x-pack/plugins/lens/public/lens_attribute_service.ts
index 9e1ce535d6675..9f6feee2877a8 100644
--- a/x-pack/plugins/lens/public/lens_attribute_service.ts
+++ b/x-pack/plugins/lens/public/lens_attribute_service.ts
@@ -6,7 +6,7 @@
import { CoreStart } from '../../../../src/core/public';
import { LensPluginStartDependencies } from './plugin';
-import { AttributeService } from '../../../../src/plugins/dashboard/public';
+import { AttributeService } from '../../../../src/plugins/embeddable/public';
import {
LensSavedObjectAttributes,
LensByValueInput,
@@ -26,7 +26,7 @@ export function getLensAttributeService(
startDependencies: LensPluginStartDependencies
): LensAttributeService {
const savedObjectStore = new SavedObjectIndexStore(core.savedObjects.client);
- return startDependencies.dashboard.getAttributeService<
+ return startDependencies.embeddable.getAttributeService<
LensSavedObjectAttributes,
LensByValueInput,
LensByReferenceInput
diff --git a/x-pack/plugins/lens/public/plugin.ts b/x-pack/plugins/lens/public/plugin.ts
index 90b0f0a2bde84..ef84ca2698ee6 100644
--- a/x-pack/plugins/lens/public/plugin.ts
+++ b/x-pack/plugins/lens/public/plugin.ts
@@ -58,7 +58,7 @@ export interface LensPluginStartDependencies {
navigation: NavigationPublicPluginStart;
uiActions: UiActionsStart;
dashboard: DashboardStart;
- embeddable?: EmbeddableStart;
+ embeddable: EmbeddableStart;
}
export class LensPlugin {
private datatableVisualization: DatatableVisualization;
diff --git a/x-pack/plugins/security_solution/cypress/integration/alerts.spec.ts b/x-pack/plugins/security_solution/cypress/integration/alerts.spec.ts
index db841d2a732c4..07d0d63e57059 100644
--- a/x-pack/plugins/security_solution/cypress/integration/alerts.spec.ts
+++ b/x-pack/plugins/security_solution/cypress/integration/alerts.spec.ts
@@ -30,7 +30,8 @@ import { loginAndWaitForPage } from '../tasks/login';
import { DETECTIONS_URL } from '../urls/navigation';
-describe('Alerts', () => {
+// FLAKY: https://github.com/elastic/kibana/issues/77957
+describe.skip('Alerts', () => {
context('Closing alerts', () => {
beforeEach(() => {
esArchiverLoad('alerts');
diff --git a/x-pack/plugins/security_solution/cypress/integration/timeline_template_creation.spec.ts b/x-pack/plugins/security_solution/cypress/integration/timeline_template_creation.spec.ts
index e262d12770d3a..91255d6110d59 100644
--- a/x-pack/plugins/security_solution/cypress/integration/timeline_template_creation.spec.ts
+++ b/x-pack/plugins/security_solution/cypress/integration/timeline_template_creation.spec.ts
@@ -43,7 +43,8 @@ import { openTimeline } from '../tasks/timelines';
import { OVERVIEW_URL } from '../urls/navigation';
-describe('Timeline Templates', () => {
+// FLAKY: https://github.com/elastic/kibana/issues/79967
+describe.skip('Timeline Templates', () => {
before(() => {
cy.server();
cy.route('PATCH', '**/api/timeline').as('timeline');
diff --git a/x-pack/plugins/security_solution/public/cases/components/settings/card.tsx b/x-pack/plugins/security_solution/public/cases/components/settings/card.tsx
index 60b471b1a99c4..344ca88f5ab37 100644
--- a/x-pack/plugins/security_solution/public/cases/components/settings/card.tsx
+++ b/x-pack/plugins/security_solution/public/cases/components/settings/card.tsx
@@ -35,7 +35,7 @@ const ConnectorCardDisplay: React.FC