diff --git a/src/core/graph/subgraph/promotedWidgetTypes.ts b/src/core/graph/subgraph/promotedWidgetTypes.ts index 637e367695..33d163279f 100644 --- a/src/core/graph/subgraph/promotedWidgetTypes.ts +++ b/src/core/graph/subgraph/promotedWidgetTypes.ts @@ -39,6 +39,12 @@ export interface PromotedWidgetView extends IBaseWidget { hydrateHostValue(value: IBaseWidget['value']): void } +export function getPromotedWidgetHostStateName( + widget: PromotedWidgetView +): string { + return [widget.name, widget.sourceNodeId, widget.sourceWidgetName].join(':') +} + export function isPromotedWidgetView( widget: IBaseWidget ): widget is PromotedWidgetView { diff --git a/src/core/graph/subgraph/promotedWidgetView.ts b/src/core/graph/subgraph/promotedWidgetView.ts index bb09379289..8a33bc1efa 100644 --- a/src/core/graph/subgraph/promotedWidgetView.ts +++ b/src/core/graph/subgraph/promotedWidgetView.ts @@ -22,17 +22,17 @@ import { import { matchPromotedInput } from '@/core/graph/subgraph/matchPromotedInput' import { hasWidgetNode } from '@/core/graph/subgraph/widgetNodeTypeGuard' -import { isPromotedWidgetView } from './promotedWidgetTypes' +import { + getPromotedWidgetHostStateName, + isPromotedWidgetView +} from './promotedWidgetTypes' import type { PromotedWidgetView as IPromotedWidgetView } from './promotedWidgetTypes' export type { PromotedWidgetView } from './promotedWidgetTypes' -export { isPromotedWidgetView } from './promotedWidgetTypes' - -export function getPromotedWidgetHostStateName( - widget: IPromotedWidgetView -): string { - return [widget.name, widget.sourceNodeId, widget.sourceWidgetName].join(':') -} +export { + getPromotedWidgetHostStateName, + isPromotedWidgetView +} from './promotedWidgetTypes' interface SubgraphSlotRef { name: string diff --git a/src/core/graph/subgraph/promotionUtils.ts b/src/core/graph/subgraph/promotionUtils.ts index 0ad53ced04..eb3ffe2a92 100644 --- a/src/core/graph/subgraph/promotionUtils.ts +++ b/src/core/graph/subgraph/promotionUtils.ts @@ -1,7 +1,9 @@ import * as Sentry from '@sentry/vue' import type { PromotedWidgetSource } from '@/core/graph/subgraph/promotedWidgetTypes' -import { isPromotedWidgetView } from '@/core/graph/subgraph/promotedWidgetTypes' -import { getPromotedWidgetHostStateName } from '@/core/graph/subgraph/promotedWidgetView' +import { + getPromotedWidgetHostStateName, + isPromotedWidgetView +} from '@/core/graph/subgraph/promotedWidgetTypes' import { t } from '@/i18n' import type { IContextMenuValue,