Skip to content

Commit

Permalink
[8.x] [embeddable] remove legacy embeddable types (#204832) (#204952)
Browse files Browse the repository at this point in the history
# Backport

This will backport the following commits from `main` to `8.x`:
- [[embeddable] remove legacy embeddable types
(#204832)](#204832)

<!--- Backport version: 8.9.8 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Nathan
Reese","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-12-19T13:29:20Z","message":"[embeddable]
remove legacy embeddable types (#204832)\n\nPart of embeddable cleanup.
PR removes legacy embeddable type guards
and\r\ntypes.","sha":"b321646d03fb7bfc9e9a323822432d145bc07411","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Embedding","Team:Presentation","release_note:skip","v9.0.0","project:embeddableRebuild","backport:version","v8.18.0"],"number":204832,"url":"https://github.com/elastic/kibana/pull/204832","mergeCommit":{"message":"[embeddable]
remove legacy embeddable types (#204832)\n\nPart of embeddable cleanup.
PR removes legacy embeddable type guards
and\r\ntypes.","sha":"b321646d03fb7bfc9e9a323822432d145bc07411"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/204832","number":204832,"mergeCommit":{"message":"[embeddable]
remove legacy embeddable types (#204832)\n\nPart of embeddable cleanup.
PR removes legacy embeddable type guards
and\r\ntypes.","sha":"b321646d03fb7bfc9e9a323822432d145bc07411"}},{"branch":"8.x","label":"v8.18.0","labelRegex":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

---------

Co-authored-by: kibanamachine <[email protected]>
  • Loading branch information
nreese and kibanamachine authored Dec 19, 2024
1 parent 8a14346 commit 8a46374
Show file tree
Hide file tree
Showing 23 changed files with 22 additions and 477 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import { createExtract, createInject } from './dashboard_container_references';
import { createEmbeddablePersistableStateServiceMock } from '@kbn/embeddable-plugin/common/mocks';
import { ParsedDashboardAttributesWithType } from '../../types';
import { SavedObjectEmbeddableInput } from '@kbn/embeddable-plugin/public';
import { SavedObjectEmbeddableInput } from '@kbn/embeddable-plugin/common';

const persistableStateService = createEmbeddablePersistableStateServiceMock();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,18 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/

import { Filter, TimeRange, onlyDisabledFiltersChanged } from '@kbn/es-query';
import { COMPARE_ALL_OPTIONS, Filter, TimeRange, onlyDisabledFiltersChanged } from '@kbn/es-query';
import { combineLatest, distinctUntilChanged, Observable, skip } from 'rxjs';
import { shouldRefreshFilterCompareOptions } from '@kbn/embeddable-plugin/public';
import { apiPublishesSettings } from '@kbn/presentation-containers/interfaces/publishes_settings';
import { apiPublishesReload, apiPublishesUnifiedSearch } from '@kbn/presentation-publishing';
import { areTimesEqual } from '../../../../dashboard_api/unified_search_manager';

const shouldRefreshFilterCompareOptions = {
...COMPARE_ALL_OPTIONS,
// do not compare $state to avoid refreshing when filter is pinned/unpinned (which does not impact results)
state: false,
};

export function newSession$(api: unknown) {
const observables: Array<Observable<unknown>> = [];

Expand Down
14 changes: 0 additions & 14 deletions src/plugins/embeddable/public/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,13 @@ export {
EmbeddableFactoryNotFoundError,
EmbeddableStateTransfer,
ErrorEmbeddable,
genericEmbeddableInputIsEqual,
isContextMenuTriggerContext,
isEmbeddable,
isErrorEmbeddable,
isExplicitInputWithAttributes,
isFilterableEmbeddable,
isMultiValueClickTriggerContext,
isRangeSelectTriggerContext,
isReferenceOrValueEmbeddable,
isRowClickTriggerContext,
isSavedObjectEmbeddableInput,
isValueClickTriggerContext,
MULTI_VALUE_CLICK_TRIGGER,
omitGenericEmbeddableInput,
panelBadgeTrigger,
panelHoverTrigger,
PanelNotFoundError,
Expand All @@ -46,11 +39,8 @@ export {
PANEL_NOTIFICATION_TRIGGER,
runEmbeddableFactoryMigrations,
SELECT_RANGE_TRIGGER,
shouldFetch$,
shouldRefreshFilterCompareOptions,
VALUE_CLICK_TRIGGER,
ViewMode,
withEmbeddableSubscription,
} from './lib';
export type {
CellValueContext,
Expand All @@ -63,15 +53,11 @@ export type {
EmbeddableInstanceConfiguration,
EmbeddableOutput,
EmbeddablePackageState,
FilterableEmbeddable,
IEmbeddable,
MultiValueClickContext,
OutputSpec,
PropertySpec,
RangeSelectContext,
ReferenceOrValueEmbeddable,
SavedObjectEmbeddableInput,
SelfStyledEmbeddable,
ValueClickContext,
} from './lib';
export type {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@

import { ViewMode } from '..';
import { KibanaExecutionContext } from '@kbn/core/types';
import { EmbeddableInput, omitGenericEmbeddableInput, genericEmbeddableInputIsEqual } from '.';
import { EmbeddableInput } from '.';
import { omitGenericEmbeddableInput, genericEmbeddableInputIsEqual } from './diff_embeddable_input';

const getGenericEmbeddableState = (state?: Partial<EmbeddableInput>): EmbeddableInput => {
const defaultState: EmbeddableInput = {
Expand Down
4 changes: 0 additions & 4 deletions src/plugins/embeddable/public/lib/embeddables/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,9 @@

export * from '../../../common/lib/saved_object_embeddable';
export * from './default_embeddable_factory_provider';
export { genericEmbeddableInputIsEqual, omitGenericEmbeddableInput } from './diff_embeddable_input';
export { Embeddable } from './embeddable';
export { EmbeddableErrorHandler } from './embeddable_error_handler';
export * from './embeddable_factory';
export * from './embeddable_factory_definition';
export { ErrorEmbeddable } from './error_embeddable';
export { isErrorEmbeddable } from './is_error_embeddable';
export { isEmbeddable } from './is_embeddable';
export type { EmbeddableInput, EmbeddableOutput, IEmbeddable } from './i_embeddable';
export { withEmbeddableSubscription } from './with_subscription';
19 changes: 0 additions & 19 deletions src/plugins/embeddable/public/lib/embeddables/is_embeddable.ts

This file was deleted.

This file was deleted.

This file was deleted.

12 changes: 0 additions & 12 deletions src/plugins/embeddable/public/lib/filterable_embeddable/index.ts

This file was deleted.

This file was deleted.

This file was deleted.

51 changes: 0 additions & 51 deletions src/plugins/embeddable/public/lib/filterable_embeddable/types.ts

This file was deleted.

3 changes: 0 additions & 3 deletions src/plugins/embeddable/public/lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,4 @@ export * from './embeddables';
export * from './types';
export * from './triggers';
export * from './state_transfer';
export * from './reference_or_value_embeddable';
export * from './self_styled_embeddable';
export * from './filterable_embeddable';
export * from './factory_migrations/run_factory_migrations';
Loading

0 comments on commit 8a46374

Please sign in to comment.