@atlaskit/editor-plugin-card 7.4.7 → 7.4.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/dist/cjs/nodeviews/inlineCard.js +7 -4
- package/dist/cjs/nodeviews/inlineCardWithAwareness.js +4 -2
- package/dist/es2019/nodeviews/inlineCard.js +7 -4
- package/dist/es2019/nodeviews/inlineCardWithAwareness.js +4 -2
- package/dist/esm/nodeviews/inlineCard.js +7 -4
- package/dist/esm/nodeviews/inlineCardWithAwareness.js +4 -2
- package/dist/types/cardPluginType.d.ts +3 -3
- package/dist/types/nodeviews/blockCard.d.ts +7 -7
- package/dist/types/nodeviews/datasource.d.ts +5 -5
- package/dist/types/nodeviews/embedCard.d.ts +8 -8
- package/dist/types/nodeviews/genericCard.d.ts +20 -19
- package/dist/types/nodeviews/inlineCard.d.ts +1 -1
- package/dist/types/nodeviews/inlineCardWithAwareness.d.ts +1 -1
- package/dist/types/pm-plugins/actions.d.ts +1 -1
- package/dist/types/pm-plugins/doc.d.ts +5 -5
- package/dist/types/pm-plugins/util/state.d.ts +13 -13
- package/dist/types/types/index.d.ts +48 -48
- package/dist/types/ui/AwarenessWrapper/index.d.ts +4 -4
- package/dist/types/ui/ConfigureOverlay/index.d.ts +2 -2
- package/dist/types/ui/DatasourceAppearanceButton.d.ts +5 -5
- package/dist/types/ui/DatasourceDropdownOption.d.ts +3 -3
- package/dist/types/ui/DatasourceModal/index.d.ts +2 -2
- package/dist/types/ui/EditLinkToolbar.d.ts +10 -10
- package/dist/types/ui/EditToolbarButton/EditToolbarButtonPresentation.d.ts +1 -1
- package/dist/types/ui/EditToolbarButton/types.d.ts +4 -4
- package/dist/types/ui/EditorAnalyticsContext.d.ts +1 -1
- package/dist/types/ui/EditorLinkingPlatformAnalytics/common.d.ts +2 -2
- package/dist/types/ui/HyperlinkToolbarAppearance.d.ts +4 -4
- package/dist/types/ui/HyperlinkToolbarAppearanceDropdown.d.ts +1 -1
- package/dist/types/ui/LayoutButton/types.d.ts +4 -4
- package/dist/types/ui/LinkToolbarAppearance.d.ts +6 -6
- package/dist/types/ui/LinkToolbarAppearanceDropdown.d.ts +2 -2
- package/dist/types/ui/OpenPreviewButton/index.d.ts +2 -2
- package/dist/types/ui/Pulse/index.d.ts +6 -6
- package/dist/types/ui/ResizableEmbedCard.d.ts +2 -2
- package/dist/types/ui/ToolbarViewedEvent.d.ts +1 -1
- package/dist/types/ui/analytics/create-events-queue.d.ts +2 -2
- package/dist/types/ui/analytics/events-from-tr.d.ts +1 -1
- package/dist/types/ui/analytics/types.d.ts +11 -11
- package/dist/types/ui/analytics/utils.d.ts +1 -1
- package/dist/types/ui/datasourceErrorBoundary.d.ts +4 -4
- package/dist/types/ui/hooks/useLinkUpgradeDiscoverability.d.ts +4 -4
- package/dist/types/ui/preview/PreviewInvoker.d.ts +1 -1
- package/dist/types/ui/toolbar.d.ts +1 -1
- package/dist/types/ui/useFetchDatasourceInfo.d.ts +2 -2
- package/dist/types-ts4.5/cardPluginType.d.ts +3 -3
- package/dist/types-ts4.5/nodeviews/blockCard.d.ts +7 -7
- package/dist/types-ts4.5/nodeviews/datasource.d.ts +5 -5
- package/dist/types-ts4.5/nodeviews/embedCard.d.ts +8 -8
- package/dist/types-ts4.5/nodeviews/genericCard.d.ts +20 -19
- package/dist/types-ts4.5/nodeviews/inlineCard.d.ts +1 -1
- package/dist/types-ts4.5/nodeviews/inlineCardWithAwareness.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/actions.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/doc.d.ts +5 -5
- package/dist/types-ts4.5/pm-plugins/util/state.d.ts +13 -13
- package/dist/types-ts4.5/types/index.d.ts +48 -48
- package/dist/types-ts4.5/ui/AwarenessWrapper/index.d.ts +4 -4
- package/dist/types-ts4.5/ui/ConfigureOverlay/index.d.ts +2 -2
- package/dist/types-ts4.5/ui/DatasourceAppearanceButton.d.ts +5 -5
- package/dist/types-ts4.5/ui/DatasourceDropdownOption.d.ts +3 -3
- package/dist/types-ts4.5/ui/DatasourceModal/index.d.ts +2 -2
- package/dist/types-ts4.5/ui/EditLinkToolbar.d.ts +10 -10
- package/dist/types-ts4.5/ui/EditToolbarButton/EditToolbarButtonPresentation.d.ts +1 -1
- package/dist/types-ts4.5/ui/EditToolbarButton/types.d.ts +4 -4
- package/dist/types-ts4.5/ui/EditorAnalyticsContext.d.ts +1 -1
- package/dist/types-ts4.5/ui/EditorLinkingPlatformAnalytics/common.d.ts +2 -2
- package/dist/types-ts4.5/ui/HyperlinkToolbarAppearance.d.ts +4 -4
- package/dist/types-ts4.5/ui/HyperlinkToolbarAppearanceDropdown.d.ts +1 -1
- package/dist/types-ts4.5/ui/LayoutButton/types.d.ts +4 -4
- package/dist/types-ts4.5/ui/LinkToolbarAppearance.d.ts +6 -6
- package/dist/types-ts4.5/ui/LinkToolbarAppearanceDropdown.d.ts +2 -2
- package/dist/types-ts4.5/ui/OpenPreviewButton/index.d.ts +2 -2
- package/dist/types-ts4.5/ui/Pulse/index.d.ts +6 -6
- package/dist/types-ts4.5/ui/ResizableEmbedCard.d.ts +2 -2
- package/dist/types-ts4.5/ui/ToolbarViewedEvent.d.ts +1 -1
- package/dist/types-ts4.5/ui/analytics/create-events-queue.d.ts +2 -2
- package/dist/types-ts4.5/ui/analytics/events-from-tr.d.ts +1 -1
- package/dist/types-ts4.5/ui/analytics/types.d.ts +11 -11
- package/dist/types-ts4.5/ui/analytics/utils.d.ts +1 -1
- package/dist/types-ts4.5/ui/datasourceErrorBoundary.d.ts +4 -4
- package/dist/types-ts4.5/ui/hooks/useLinkUpgradeDiscoverability.d.ts +4 -4
- package/dist/types-ts4.5/ui/preview/PreviewInvoker.d.ts +1 -1
- package/dist/types-ts4.5/ui/toolbar.d.ts +1 -1
- package/dist/types-ts4.5/ui/useFetchDatasourceInfo.d.ts +2 -2
- package/package.json +5 -5
|
@@ -3,12 +3,12 @@ import type { DatasourceModalType } from '@atlaskit/editor-common/types';
|
|
|
3
3
|
import type { APIError } from '@atlaskit/linking-common';
|
|
4
4
|
import type { DatasourceProps } from '../nodeviews/datasource';
|
|
5
5
|
export type DatasourceErrorBoundaryProps = React.PropsWithChildren<{
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
datasourceId?: string;
|
|
7
|
+
datasourceModalType?: DatasourceModalType;
|
|
8
8
|
handleError?: () => void;
|
|
9
|
+
unsupportedComponent?: React.ComponentType<React.PropsWithChildren<unknown>>;
|
|
10
|
+
url?: string;
|
|
9
11
|
view: DatasourceProps['view'];
|
|
10
|
-
datasourceModalType?: DatasourceModalType;
|
|
11
|
-
datasourceId?: string;
|
|
12
12
|
}>;
|
|
13
13
|
export declare class DatasourceErrorBoundary extends React.Component<DatasourceErrorBoundaryProps> {
|
|
14
14
|
state: {
|
|
@@ -2,12 +2,12 @@ import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
|
2
2
|
import type { CardContext } from '@atlaskit/link-provider';
|
|
3
3
|
import type { cardPlugin } from '../../cardPlugin';
|
|
4
4
|
export type LinkUpgradeDiscoverabilityProps = {
|
|
5
|
-
url: string;
|
|
6
|
-
linkPosition: number;
|
|
7
5
|
cardContext?: CardContext;
|
|
8
|
-
pluginInjectionApi?: ExtractInjectionAPI<typeof cardPlugin>;
|
|
9
|
-
isPulseEnabled?: boolean;
|
|
10
6
|
isOverlayEnabled?: boolean;
|
|
7
|
+
isPulseEnabled?: boolean;
|
|
8
|
+
linkPosition: number;
|
|
9
|
+
pluginInjectionApi?: ExtractInjectionAPI<typeof cardPlugin>;
|
|
10
|
+
url: string;
|
|
11
11
|
};
|
|
12
12
|
declare const useLinkUpgradeDiscoverability: ({ url, linkPosition, cardContext, pluginInjectionApi, isPulseEnabled, isOverlayEnabled, }: LinkUpgradeDiscoverabilityProps) => {
|
|
13
13
|
shouldShowToolbarPulse: boolean | undefined;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
type PreviewInvokerProps = {
|
|
4
|
-
url: string;
|
|
5
4
|
appearance: 'inline' | 'block' | 'embed';
|
|
6
5
|
children: (api: {
|
|
7
6
|
canPreview: boolean;
|
|
8
7
|
invokePreview?: () => void;
|
|
9
8
|
}) => ReactNode;
|
|
9
|
+
url: string;
|
|
10
10
|
};
|
|
11
11
|
export declare const PreviewInvoker: ({ url, appearance, children }: PreviewInvokerProps) => React.JSX.Element;
|
|
12
12
|
export {};
|
|
@@ -13,7 +13,7 @@ export declare const floatingToolbar: (cardOptions: CardOptions, lpLinkPicker: b
|
|
|
13
13
|
export declare const getSettingsButton: (intl: IntlShape, editorAnalyticsApi: EditorAnalyticsAPI | undefined, userPreferencesLink?: string) => FloatingToolbarItem<Command>;
|
|
14
14
|
export declare const shouldRenderToolbarPulse: (embedEnabled: boolean, appearance: string, status: string, isDiscoverabilityEnabled: boolean) => boolean;
|
|
15
15
|
export declare const getStartingToolbarItems: (options: CardPluginOptions, api?: ExtractInjectionAPI<typeof cardPlugin> | undefined) => (intl: IntlShape, link: string, onEditLink: Command, metadata: {
|
|
16
|
-
url: string;
|
|
17
16
|
title: string;
|
|
17
|
+
url: string;
|
|
18
18
|
}, state?: EditorState) => FloatingToolbarItem<Command>[];
|
|
19
19
|
export declare const getEndingToolbarItems: (options: CardPluginOptions, api?: ExtractInjectionAPI<typeof cardPlugin> | undefined) => (intl: IntlShape, link: string) => FloatingToolbarItem<Command>[];
|
|
@@ -2,10 +2,10 @@ import type { JiraIssueDatasourceParameters } from '@atlaskit/link-datasource';
|
|
|
2
2
|
import type { CardContext } from '@atlaskit/link-provider';
|
|
3
3
|
import type { DatasourceParameters } from '@atlaskit/linking-types';
|
|
4
4
|
export interface useFetchDatasourceInfoProps {
|
|
5
|
-
isRegularCardNode: boolean;
|
|
6
|
-
url?: string;
|
|
7
5
|
cardContext?: CardContext;
|
|
6
|
+
isRegularCardNode: boolean;
|
|
8
7
|
nodeParameters?: DatasourceParameters | JiraIssueDatasourceParameters;
|
|
8
|
+
url?: string;
|
|
9
9
|
}
|
|
10
10
|
export declare const useFetchDatasourceInfo: ({ isRegularCardNode, url, cardContext, nodeParameters, }: useFetchDatasourceInfoProps) => {
|
|
11
11
|
datasourceId: string | undefined;
|
|
@@ -15,10 +15,10 @@ import type { SelectionPlugin } from '@atlaskit/editor-plugin-selection';
|
|
|
15
15
|
import type { WidthPlugin } from '@atlaskit/editor-plugin-width';
|
|
16
16
|
import type { CardPluginOptions, CardPluginState } from './types';
|
|
17
17
|
type DummyAnnotationPlugin = NextEditorPlugin<'annotation', {
|
|
18
|
-
sharedState: InlineCommentPluginState;
|
|
19
18
|
actions: {
|
|
20
19
|
setInlineCommentDraftState: (isDraft: boolean, inputMethod: INPUT_METHOD) => Command;
|
|
21
20
|
};
|
|
21
|
+
sharedState: InlineCommentPluginState;
|
|
22
22
|
}>;
|
|
23
23
|
export type CardPluginDependencies = [
|
|
24
24
|
OptionalPlugin<FeatureFlagsPlugin>,
|
|
@@ -35,9 +35,9 @@ export type CardPluginDependencies = [
|
|
|
35
35
|
OptionalPlugin<BasePlugin>
|
|
36
36
|
];
|
|
37
37
|
export type CardPlugin = NextEditorPlugin<'card', {
|
|
38
|
-
|
|
38
|
+
actions: CardPluginActions;
|
|
39
39
|
dependencies: CardPluginDependencies;
|
|
40
|
+
pluginConfiguration: CardPluginOptions | undefined;
|
|
40
41
|
sharedState: CardPluginState | null;
|
|
41
|
-
actions: CardPluginActions;
|
|
42
42
|
}>;
|
|
43
43
|
export {};
|
|
@@ -13,8 +13,8 @@ export declare class BlockCardComponent extends React.PureComponent<SmartCardPro
|
|
|
13
13
|
id?: string;
|
|
14
14
|
});
|
|
15
15
|
onResolve: (data: {
|
|
16
|
-
url?: string;
|
|
17
16
|
title?: string;
|
|
17
|
+
url?: string;
|
|
18
18
|
}) => void;
|
|
19
19
|
componentWillUnmount(): void;
|
|
20
20
|
private removeCardDispatched;
|
|
@@ -37,16 +37,16 @@ export declare class BlockCard extends ReactNodeView<BlockCardNodeViewProps> {
|
|
|
37
37
|
destroy(): void;
|
|
38
38
|
}
|
|
39
39
|
export interface BlockCardNodeViewProperties {
|
|
40
|
-
pmPluginFactoryParams: PMPluginFactoryParams;
|
|
41
40
|
actionOptions: BlockCardNodeViewProps['actionOptions'];
|
|
42
|
-
pluginInjectionApi: BlockCardNodeViewProps['pluginInjectionApi'];
|
|
43
|
-
onClickCallback: BlockCardNodeViewProps['onClickCallback'];
|
|
44
41
|
allowDatasource: boolean | undefined;
|
|
45
|
-
inlineCardViewProducer: ReturnType<typeof getInlineNodeViewProducer>;
|
|
46
|
-
isPageSSRed: BlockCardNodeViewProps['isPageSSRed'];
|
|
47
42
|
CompetitorPrompt?: React.ComponentType<{
|
|
48
|
-
sourceUrl: string;
|
|
49
43
|
linkType?: string;
|
|
44
|
+
sourceUrl: string;
|
|
50
45
|
}>;
|
|
46
|
+
inlineCardViewProducer: ReturnType<typeof getInlineNodeViewProducer>;
|
|
47
|
+
isPageSSRed: BlockCardNodeViewProps['isPageSSRed'];
|
|
48
|
+
onClickCallback: BlockCardNodeViewProps['onClickCallback'];
|
|
49
|
+
pluginInjectionApi: BlockCardNodeViewProps['pluginInjectionApi'];
|
|
50
|
+
pmPluginFactoryParams: PMPluginFactoryParams;
|
|
51
51
|
}
|
|
52
52
|
export declare const blockCardNodeView: ({ pmPluginFactoryParams, actionOptions, pluginInjectionApi, onClickCallback, allowDatasource, inlineCardViewProducer, CompetitorPrompt, isPageSSRed, }: BlockCardNodeViewProperties) => (node: Node, view: EditorView, getPos: () => number | undefined, decorations: readonly Decoration[]) => import("prosemirror-view").NodeView | Datasource | BlockCard;
|
|
@@ -13,13 +13,13 @@ import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
|
13
13
|
import type { Decoration, DecorationSource, EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
14
14
|
import type { cardPlugin } from '../index';
|
|
15
15
|
export interface DatasourceProps extends ReactComponentProps {
|
|
16
|
-
node: PMNode;
|
|
17
|
-
view: EditorView;
|
|
18
|
-
getPos: getPosHandler;
|
|
19
|
-
portalProviderAPI: PortalProviderAPI;
|
|
20
16
|
eventDispatcher: EventDispatcher;
|
|
21
|
-
|
|
17
|
+
getPos: getPosHandler;
|
|
22
18
|
isNodeNested?: boolean;
|
|
19
|
+
node: PMNode;
|
|
20
|
+
pluginInjectionApi: ExtractInjectionAPI<typeof cardPlugin> | undefined;
|
|
21
|
+
portalProviderAPI: PortalProviderAPI;
|
|
22
|
+
view: EditorView;
|
|
23
23
|
}
|
|
24
24
|
interface DatasourceComponentProps extends ReactComponentProps, Pick<DatasourceProps, 'node' | 'view' | 'getPos'> {
|
|
25
25
|
}
|
|
@@ -8,8 +8,8 @@ import type { cardPlugin } from '../index';
|
|
|
8
8
|
import type { SmartCardProps } from './genericCard';
|
|
9
9
|
export type EmbedCardState = {
|
|
10
10
|
hasPreview: boolean;
|
|
11
|
-
liveHeight?: number;
|
|
12
11
|
initialAspectRatio?: number;
|
|
12
|
+
liveHeight?: number;
|
|
13
13
|
};
|
|
14
14
|
export declare class EmbedCardComponent extends React.PureComponent<SmartCardProps & {
|
|
15
15
|
id?: string;
|
|
@@ -22,9 +22,9 @@ export declare class EmbedCardComponent extends React.PureComponent<SmartCardPro
|
|
|
22
22
|
state: EmbedCardState;
|
|
23
23
|
private getPosSafely;
|
|
24
24
|
onResolve: (data: {
|
|
25
|
-
url?: string;
|
|
26
|
-
title?: string;
|
|
27
25
|
aspectRatio?: number;
|
|
26
|
+
title?: string;
|
|
27
|
+
url?: string;
|
|
28
28
|
}) => void;
|
|
29
29
|
updateSize: (pctWidth: number | null, layout: RichMediaLayout) => true | undefined;
|
|
30
30
|
private getLineLength;
|
|
@@ -55,13 +55,13 @@ export declare class EmbedCard extends ReactNodeView<EmbedCardNodeViewProps> {
|
|
|
55
55
|
destroy(): void;
|
|
56
56
|
}
|
|
57
57
|
export interface EmbedCardNodeViewProperties {
|
|
58
|
+
actionOptions: EmbedCardNodeViewProps['actionOptions'];
|
|
58
59
|
allowResizing: EmbedCardNodeViewProps['allowResizing'];
|
|
60
|
+
CompetitorPrompt?: EmbedCardNodeViewProps['CompetitorPrompt'];
|
|
59
61
|
fullWidthMode: EmbedCardNodeViewProps['fullWidthMode'];
|
|
60
|
-
pmPluginFactoryParams: PMPluginFactoryParams;
|
|
61
|
-
pluginInjectionApi: ExtractInjectionAPI<typeof cardPlugin> | undefined;
|
|
62
|
-
actionOptions: EmbedCardNodeViewProps['actionOptions'];
|
|
63
|
-
onClickCallback: EmbedCardNodeViewProps['onClickCallback'];
|
|
64
62
|
isPageSSRed: EmbedCardNodeViewProps['isPageSSRed'];
|
|
65
|
-
|
|
63
|
+
onClickCallback: EmbedCardNodeViewProps['onClickCallback'];
|
|
64
|
+
pluginInjectionApi: ExtractInjectionAPI<typeof cardPlugin> | undefined;
|
|
65
|
+
pmPluginFactoryParams: PMPluginFactoryParams;
|
|
66
66
|
}
|
|
67
67
|
export declare const embedCardNodeView: ({ allowResizing, fullWidthMode, pmPluginFactoryParams, pluginInjectionApi, actionOptions, onClickCallback, CompetitorPrompt, isPageSSRed, }: EmbedCardNodeViewProperties) => (node: PMNode, view: EditorView, getPos: () => number | undefined) => EmbedCard;
|
|
@@ -16,40 +16,41 @@ export type EditorContext<T> = React.Context<T> & {
|
|
|
16
16
|
value: T;
|
|
17
17
|
};
|
|
18
18
|
export interface CardNodeViewProps extends ReactComponentProps {
|
|
19
|
-
providerFactory?: ProviderFactory;
|
|
20
19
|
eventDispatcher?: EventDispatcher;
|
|
20
|
+
providerFactory?: ProviderFactory;
|
|
21
21
|
}
|
|
22
22
|
export interface CardProps extends CardNodeViewProps {
|
|
23
|
+
__livePage?: boolean;
|
|
24
|
+
actionOptions?: BaseCardProps['actionOptions'];
|
|
25
|
+
allowResizing?: boolean;
|
|
23
26
|
children?: React.ReactNode;
|
|
24
|
-
node: PMNode;
|
|
25
|
-
view: EditorView;
|
|
26
|
-
getPos: getPosHandler;
|
|
27
27
|
dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
|
|
28
28
|
eventDispatcher?: EventDispatcher;
|
|
29
|
-
allowResizing?: boolean;
|
|
30
29
|
fullWidthMode?: boolean;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
getPos: getPosHandler;
|
|
31
|
+
hoverPreviewOptions?: BaseCardProps['hoverPreviewOptions'];
|
|
32
|
+
node: PMNode;
|
|
34
33
|
onClickCallback?: OnClickCallback;
|
|
34
|
+
pluginInjectionApi?: ExtractInjectionAPI<typeof cardPlugin>;
|
|
35
35
|
showHoverPreview?: BaseCardProps['showHoverPreview'];
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
useAlternativePreloader?: boolean;
|
|
37
|
+
view: EditorView;
|
|
38
38
|
}
|
|
39
39
|
export interface SmartCardProps extends CardProps {
|
|
40
|
-
pluginInjectionApi?: ExtractInjectionAPI<typeof cardPlugin>;
|
|
41
|
-
cardContext?: EditorContext<CardContext | undefined>;
|
|
42
|
-
onClick?: EventHandler<MouseEvent | KeyboardEvent> | undefined;
|
|
43
|
-
onResolve?: (tr: Transaction, title?: string) => void;
|
|
44
|
-
isHovered?: boolean;
|
|
45
|
-
allowEmbeds?: boolean;
|
|
46
40
|
allowBlockCards?: boolean;
|
|
47
|
-
|
|
48
|
-
|
|
41
|
+
allowEmbeds?: boolean;
|
|
42
|
+
cardContext?: EditorContext<CardContext | undefined>;
|
|
49
43
|
CompetitorPrompt?: React.ComponentType<{
|
|
50
|
-
sourceUrl: string;
|
|
51
44
|
linkType?: string;
|
|
45
|
+
sourceUrl: string;
|
|
52
46
|
}>;
|
|
47
|
+
disablePreviewPanel?: BaseCardProps['disablePreviewPanel'];
|
|
48
|
+
enableInlineUpgradeFeatures?: boolean;
|
|
49
|
+
isHovered?: boolean;
|
|
50
|
+
isPageSSRed?: boolean;
|
|
51
|
+
onClick?: EventHandler<MouseEvent | KeyboardEvent> | undefined;
|
|
52
|
+
onResolve?: (tr: Transaction, title?: string) => void;
|
|
53
|
+
pluginInjectionApi?: ExtractInjectionAPI<typeof cardPlugin>;
|
|
53
54
|
}
|
|
54
55
|
/**
|
|
55
56
|
*
|
|
@@ -4,7 +4,7 @@ import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
|
4
4
|
import type { Decoration, EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
5
5
|
import type { SmartCardProps } from './genericCard';
|
|
6
6
|
import { type InlineCardWithAwarenessProps } from './inlineCardWithAwareness';
|
|
7
|
-
export declare const InlineCard: React.MemoExoticComponent<({ node, cardContext, actionOptions, useAlternativePreloader, view, getPos, onClick: propsOnClick, onResolve: onRes, isHovered, showHoverPreview, hoverPreviewOptions, isPageSSRed, pluginInjectionApi, }: SmartCardProps) => React.JSX.Element | null>;
|
|
7
|
+
export declare const InlineCard: React.MemoExoticComponent<({ node, cardContext, actionOptions, useAlternativePreloader, view, getPos, onClick: propsOnClick, onResolve: onRes, isHovered, showHoverPreview, hoverPreviewOptions, isPageSSRed, pluginInjectionApi, disablePreviewPanel, }: SmartCardProps) => React.JSX.Element | null>;
|
|
8
8
|
export type InlineCardNodeViewProps = Pick<SmartCardProps, 'useAlternativePreloader' | 'actionOptions' | 'allowEmbeds' | 'allowBlockCards' | 'enableInlineUpgradeFeatures' | 'pluginInjectionApi' | 'onClickCallback' | 'isPageSSRed' | 'CompetitorPrompt'>;
|
|
9
9
|
/**
|
|
10
10
|
*
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { SmartCardProps } from './genericCard';
|
|
3
3
|
export type InlineCardWithAwarenessProps = {
|
|
4
|
-
isPulseEnabled?: boolean;
|
|
5
4
|
isOverlayEnabled?: boolean;
|
|
5
|
+
isPulseEnabled?: boolean;
|
|
6
6
|
isSelected?: boolean;
|
|
7
7
|
};
|
|
8
8
|
export declare const InlineCardWithAwareness: React.MemoExoticComponent<({ node, cardContext, actionOptions, useAlternativePreloader, view, getPos, pluginInjectionApi, onClick, isPulseEnabled, isOverlayEnabled, isSelected, isPageSSRed, appearance, }: SmartCardProps & InlineCardWithAwarenessProps) => React.JSX.Element>;
|
|
@@ -16,8 +16,8 @@ export declare const setProvider: (cardProvider: CardProvider | null) => (tr: Tr
|
|
|
16
16
|
export declare const setDatasourceTableRef: (datasourceTableRef?: HTMLElement) => (tr: Transaction) => Transaction;
|
|
17
17
|
export declare const setCardLayout: (layout: DatasourceTableLayout) => (tr: Transaction) => Transaction;
|
|
18
18
|
export declare const setCardLayoutAndDatasourceTableRef: ({ layout, datasourceTableRef, }: {
|
|
19
|
-
layout: DatasourceTableLayout;
|
|
20
19
|
datasourceTableRef?: HTMLElement;
|
|
20
|
+
layout: DatasourceTableLayout;
|
|
21
21
|
}) => (tr: Transaction) => Transaction;
|
|
22
22
|
export declare const showLinkToolbar: (tr: Transaction) => Transaction;
|
|
23
23
|
export declare const hideLinkToolbar: (tr: Transaction) => Transaction;
|
|
@@ -24,13 +24,13 @@ export type LinkNodes = {
|
|
|
24
24
|
};
|
|
25
25
|
export declare const getLinkNodeType: (appearance: CardAppearance, linkNodes: LinkNodes) => NodeType;
|
|
26
26
|
type UpdateCardArgs = {
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
inputMethod?: string;
|
|
28
|
+
isDeletingConfig?: boolean;
|
|
29
29
|
newAdf: DatasourceAdf | InlineCardAdf;
|
|
30
|
-
|
|
30
|
+
node: Node;
|
|
31
31
|
sourceEvent?: UIAnalyticsEvent;
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
state: EditorState;
|
|
33
|
+
view: EditorView;
|
|
34
34
|
};
|
|
35
35
|
export declare const updateCardViaDatasource: (args: UpdateCardArgs) => void;
|
|
36
36
|
export declare const insertDatasource: (state: EditorState, adf: DatasourceAdf | InlineCardAdf, view: EditorView, sourceEvent?: UIAnalyticsEvent) => void;
|
|
@@ -4,39 +4,39 @@ export declare const getPluginState: (editorState: EditorState) => CardPluginSta
|
|
|
4
4
|
export declare const getPluginStateWithUpdatedPos: (pluginState: CardPluginState, tr: ReadonlyTransaction) => {
|
|
5
5
|
requests: {
|
|
6
6
|
pos: number;
|
|
7
|
-
|
|
7
|
+
analyticsAction?: import("@atlaskit/editor-common/analytics").ACTION;
|
|
8
8
|
appearance: import("@atlaskit/editor-common/provider-factory").CardAppearance;
|
|
9
9
|
compareLinkText: boolean;
|
|
10
|
-
source: import("@atlaskit/editor-common/card").CardReplacementInputMethod;
|
|
11
10
|
previousAppearance?: import("@atlaskit/editor-common/provider-factory").CardAppearance | "url";
|
|
12
|
-
analyticsAction?: import("@atlaskit/editor-common/analytics").ACTION;
|
|
13
11
|
shouldReplaceLink?: boolean;
|
|
12
|
+
source: import("@atlaskit/editor-common/card").CardReplacementInputMethod;
|
|
14
13
|
sourceEvent?: import("@atlaskit/analytics-next").UIAnalyticsEvent | null | undefined;
|
|
14
|
+
url: string;
|
|
15
15
|
}[];
|
|
16
16
|
cards: {
|
|
17
17
|
pos: number;
|
|
18
|
+
id?: string;
|
|
18
19
|
title?: string;
|
|
19
20
|
url?: string;
|
|
20
|
-
id?: string;
|
|
21
21
|
}[];
|
|
22
|
-
|
|
22
|
+
allowBlockCards?: boolean;
|
|
23
|
+
allowEmbeds?: boolean;
|
|
24
|
+
datasourceModalType?: import("@atlaskit/editor-common/types").DatasourceModalType;
|
|
23
25
|
datasourceStash: {
|
|
24
26
|
[x: string]: {
|
|
25
27
|
views: import("@atlaskit/linking-common").DatasourceAdfView[];
|
|
26
28
|
};
|
|
27
29
|
};
|
|
28
|
-
showLinkingToolbar: boolean;
|
|
29
|
-
smartLinkEvents?: import("@atlaskit/smart-card").SmartLinkEvents;
|
|
30
|
-
editorAppearance?: import("@atlaskit/editor-common/types").EditorAppearance;
|
|
31
|
-
showDatasourceModal: boolean;
|
|
32
|
-
datasourceModalType?: import("@atlaskit/editor-common/types").DatasourceModalType;
|
|
33
30
|
datasourceTableRef?: HTMLElement;
|
|
34
|
-
|
|
31
|
+
editorAppearance?: import("@atlaskit/editor-common/types").EditorAppearance;
|
|
35
32
|
inlineCardAwarenessCandidatePosition?: number;
|
|
33
|
+
layout?: import("../../ui/LayoutButton/types").DatasourceTableLayout;
|
|
36
34
|
overlayCandidatePosition?: number;
|
|
35
|
+
provider: import("@atlaskit/editor-common/provider-factory").CardProvider | null;
|
|
37
36
|
removeOverlay?: () => void;
|
|
38
37
|
selectedInlineLinkPosition?: number;
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
showDatasourceModal: boolean;
|
|
39
|
+
showLinkingToolbar: boolean;
|
|
40
|
+
smartLinkEvents?: import("@atlaskit/smart-card").SmartLinkEvents;
|
|
41
41
|
};
|
|
42
42
|
export declare const getNewRequests: (oldState: CardPluginState | undefined, currentState: CardPluginState) => Request[];
|
|
@@ -15,20 +15,19 @@ export type DatasourceNode = Omit<Node, 'attrs'> & {
|
|
|
15
15
|
readonly attrs: DatasourceAdf['attrs'] & Partial<RichMediaAttributes>;
|
|
16
16
|
};
|
|
17
17
|
export type CardInfo = {
|
|
18
|
-
title?: string;
|
|
19
|
-
url?: string;
|
|
20
18
|
id?: string;
|
|
21
19
|
pos: number;
|
|
20
|
+
title?: string;
|
|
21
|
+
url?: string;
|
|
22
22
|
};
|
|
23
23
|
export type Request = {
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
* The URL of the link being upgraded/resolved
|
|
25
|
+
* Analytics action to be used when disaptching
|
|
26
|
+
* analytics events once the link is successfully/unsuccessfully
|
|
27
|
+
* resolved. Preserves the users "intent" ie was this a link
|
|
28
|
+
* being inserted or updated?
|
|
30
29
|
*/
|
|
31
|
-
|
|
30
|
+
analyticsAction?: ACTION;
|
|
32
31
|
/**
|
|
33
32
|
* The requested appearance to upgrade to
|
|
34
33
|
*/
|
|
@@ -40,11 +39,9 @@ export type Request = {
|
|
|
40
39
|
*/
|
|
41
40
|
compareLinkText: boolean;
|
|
42
41
|
/**
|
|
43
|
-
*
|
|
44
|
-
* has occured. Used when analytics are dispatched after the link
|
|
45
|
-
* is successfully/unsuccessfully resolved.
|
|
42
|
+
* The position of the link in the doc this request for upgrade is for
|
|
46
43
|
*/
|
|
47
|
-
|
|
44
|
+
pos: number;
|
|
48
45
|
/**
|
|
49
46
|
* The previous appearance of the link
|
|
50
47
|
* This is necessary when tracking an update of a link
|
|
@@ -52,13 +49,6 @@ export type Request = {
|
|
|
52
49
|
* replacing with a hyperlink and queueing it for upgrade
|
|
53
50
|
*/
|
|
54
51
|
previousAppearance?: CardAppearance | 'url';
|
|
55
|
-
/**
|
|
56
|
-
* Analytics action to be used when disaptching
|
|
57
|
-
* analytics events once the link is successfully/unsuccessfully
|
|
58
|
-
* resolved. Preserves the users "intent" ie was this a link
|
|
59
|
-
* being inserted or updated?
|
|
60
|
-
*/
|
|
61
|
-
analyticsAction?: ACTION;
|
|
62
52
|
/**
|
|
63
53
|
* Describes if the requested `appearance` MUST be returned by the card provider
|
|
64
54
|
* when resolving the link, because the request is associated with the user intent
|
|
@@ -66,12 +56,22 @@ export type Request = {
|
|
|
66
56
|
* should not be affected by "default appearances" or "user preferences"
|
|
67
57
|
*/
|
|
68
58
|
shouldReplaceLink?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Analytics input method which preserves "how" the change
|
|
61
|
+
* has occured. Used when analytics are dispatched after the link
|
|
62
|
+
* is successfully/unsuccessfully resolved.
|
|
63
|
+
*/
|
|
64
|
+
source: CardReplacementInputMethod;
|
|
69
65
|
/**
|
|
70
66
|
* Source UI that triggered this step if relevant
|
|
71
67
|
* Primarily for transfering link picker UI event from initial UI action
|
|
72
68
|
* through to the end of the link queue/request saga
|
|
73
69
|
*/
|
|
74
70
|
sourceEvent?: UIAnalyticsEvent | null | undefined;
|
|
71
|
+
/**
|
|
72
|
+
* The URL of the link being upgraded/resolved
|
|
73
|
+
*/
|
|
74
|
+
url: string;
|
|
75
75
|
};
|
|
76
76
|
/**
|
|
77
77
|
* Each key in the stash is URL.
|
|
@@ -81,57 +81,57 @@ type DatasourceStash = Record<string, {
|
|
|
81
81
|
views: DatasourceAdfView[];
|
|
82
82
|
}>;
|
|
83
83
|
export type CardPluginState = {
|
|
84
|
-
|
|
85
|
-
|
|
84
|
+
allowBlockCards?: boolean;
|
|
85
|
+
allowEmbeds?: boolean;
|
|
86
86
|
cards: CardInfo[];
|
|
87
|
-
datasourceStash: DatasourceStash;
|
|
88
|
-
showLinkingToolbar: boolean;
|
|
89
|
-
smartLinkEvents?: SmartLinkEvents;
|
|
90
|
-
editorAppearance?: EditorAppearance;
|
|
91
|
-
showDatasourceModal: boolean;
|
|
92
87
|
datasourceModalType?: DatasourceModalType;
|
|
88
|
+
datasourceStash: DatasourceStash;
|
|
93
89
|
datasourceTableRef?: HTMLElement;
|
|
94
|
-
|
|
90
|
+
editorAppearance?: EditorAppearance;
|
|
95
91
|
inlineCardAwarenessCandidatePosition?: number;
|
|
92
|
+
layout?: DatasourceTableLayout;
|
|
96
93
|
overlayCandidatePosition?: number;
|
|
94
|
+
provider: CardProvider | null;
|
|
97
95
|
removeOverlay?: () => void;
|
|
96
|
+
requests: Request[];
|
|
98
97
|
selectedInlineLinkPosition?: number;
|
|
99
|
-
|
|
100
|
-
|
|
98
|
+
showDatasourceModal: boolean;
|
|
99
|
+
showLinkingToolbar: boolean;
|
|
100
|
+
smartLinkEvents?: SmartLinkEvents;
|
|
101
101
|
};
|
|
102
102
|
export type CardPluginOptions = CardOptions & {
|
|
103
|
+
cardPluginEvents?: EditorCardPluginEvents<CardPluginEvent>;
|
|
104
|
+
CompetitorPrompt?: React.ComponentType<{
|
|
105
|
+
linkType?: string;
|
|
106
|
+
sourceUrl: string;
|
|
107
|
+
}>;
|
|
108
|
+
disableFloatingToolbar?: boolean;
|
|
103
109
|
editorAppearance?: EditorAppearance;
|
|
104
110
|
fullWidthMode?: boolean;
|
|
111
|
+
isPageSSRed?: boolean;
|
|
105
112
|
linkPicker?: LinkPickerOptions;
|
|
106
|
-
cardPluginEvents?: EditorCardPluginEvents<CardPluginEvent>;
|
|
107
113
|
lpLinkPicker?: boolean;
|
|
108
|
-
disableFloatingToolbar?: boolean;
|
|
109
114
|
onClickCallback?: OnClickCallback;
|
|
110
|
-
isPageSSRed?: boolean;
|
|
111
|
-
CompetitorPrompt?: React.ComponentType<{
|
|
112
|
-
sourceUrl: string;
|
|
113
|
-
linkType?: string;
|
|
114
|
-
}>;
|
|
115
115
|
};
|
|
116
116
|
export type SetProvider = {
|
|
117
|
-
type: 'SET_PROVIDER';
|
|
118
117
|
provider: CardProvider | null;
|
|
118
|
+
type: 'SET_PROVIDER';
|
|
119
119
|
};
|
|
120
120
|
export type Queue = {
|
|
121
|
-
type: 'QUEUE';
|
|
122
121
|
requests: Request[];
|
|
122
|
+
type: 'QUEUE';
|
|
123
123
|
};
|
|
124
124
|
export type Resolve = {
|
|
125
125
|
type: 'RESOLVE';
|
|
126
126
|
url: string;
|
|
127
127
|
};
|
|
128
128
|
export type Register = {
|
|
129
|
-
type: 'REGISTER';
|
|
130
129
|
info: CardInfo;
|
|
130
|
+
type: 'REGISTER';
|
|
131
131
|
};
|
|
132
132
|
export type RemoveCard = {
|
|
133
|
-
type: 'REMOVE_CARD';
|
|
134
133
|
info: Partial<CardInfo>;
|
|
134
|
+
type: 'REMOVE_CARD';
|
|
135
135
|
};
|
|
136
136
|
export type ShowLinkToolbar = {
|
|
137
137
|
type: 'SHOW_LINK_TOOLBAR';
|
|
@@ -140,43 +140,43 @@ export type HideLinkToolbar = {
|
|
|
140
140
|
type: 'HIDE_LINK_TOOLBAR';
|
|
141
141
|
};
|
|
142
142
|
export type ShowDatasourceModal = {
|
|
143
|
-
type: 'SHOW_DATASOURCE_MODAL';
|
|
144
143
|
modalType: DatasourceModalType;
|
|
144
|
+
type: 'SHOW_DATASOURCE_MODAL';
|
|
145
145
|
};
|
|
146
146
|
export type HideDatasourceModal = {
|
|
147
147
|
type: 'HIDE_DATASOURCE_MODAL';
|
|
148
148
|
};
|
|
149
149
|
export type RegisterSmartCardEvents = {
|
|
150
|
-
type: 'REGISTER_EVENTS';
|
|
151
150
|
smartLinkEvents: SmartLinkEvents;
|
|
151
|
+
type: 'REGISTER_EVENTS';
|
|
152
152
|
};
|
|
153
153
|
export type SetDatasourceTableRef = {
|
|
154
|
-
type: 'SET_DATASOURCE_TABLE_REF';
|
|
155
154
|
datasourceTableRef?: HTMLElement;
|
|
155
|
+
type: 'SET_DATASOURCE_TABLE_REF';
|
|
156
156
|
};
|
|
157
157
|
export type SetCardLayout = {
|
|
158
|
-
type: 'SET_CARD_LAYOUT';
|
|
159
158
|
layout: DatasourceTableLayout;
|
|
159
|
+
type: 'SET_CARD_LAYOUT';
|
|
160
160
|
};
|
|
161
161
|
export type SetCardLayoutAndDatasourceTableRef = {
|
|
162
|
-
type: 'SET_CARD_LAYOUT_AND_DATASOURCE_TABLE_REF';
|
|
163
|
-
layout: DatasourceTableLayout;
|
|
164
162
|
datasourceTableRef?: HTMLElement;
|
|
163
|
+
layout: DatasourceTableLayout;
|
|
164
|
+
type: 'SET_CARD_LAYOUT_AND_DATASOURCE_TABLE_REF';
|
|
165
165
|
};
|
|
166
166
|
type ClearOverlayCandidate = {
|
|
167
167
|
type: 'CLEAR_OVERLAY_CANDIDATE';
|
|
168
168
|
};
|
|
169
169
|
type RegisterRemoveOverlayOnInsertedLink = {
|
|
170
|
-
type: 'REGISTER_REMOVE_OVERLAY_ON_INSERTED_LINK';
|
|
171
170
|
callback: () => void;
|
|
172
171
|
info?: Register['info'];
|
|
172
|
+
type: 'REGISTER_REMOVE_OVERLAY_ON_INSERTED_LINK';
|
|
173
173
|
};
|
|
174
174
|
export type SetDatasourceStash = {
|
|
175
|
-
type: 'SET_DATASOURCE_STASH';
|
|
176
175
|
datasourceStash: {
|
|
177
176
|
url: string;
|
|
178
177
|
views: DatasourceAdfView[];
|
|
179
178
|
};
|
|
179
|
+
type: 'SET_DATASOURCE_STASH';
|
|
180
180
|
};
|
|
181
181
|
export type RemoveDatasourceStash = {
|
|
182
182
|
type: 'REMOVE_DATASOURCE_STASH';
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { jsx } from '@emotion/react';
|
|
2
2
|
import type { SmartCardProps } from '../../nodeviews/genericCard';
|
|
3
3
|
type AwarenessWrapperProps = {
|
|
4
|
+
children: JSX.Element;
|
|
4
5
|
isInserted?: boolean;
|
|
6
|
+
isOverlayEnabled?: boolean;
|
|
7
|
+
isPulseEnabled?: boolean;
|
|
5
8
|
isResolvedViewRendered?: boolean;
|
|
6
|
-
|
|
9
|
+
isSelected?: boolean;
|
|
7
10
|
markMostRecentlyInsertedLink: (isLinkMostRecentlyInserted: boolean) => void;
|
|
8
11
|
setOverlayHoveredStyles: (isHovered: boolean) => void;
|
|
9
12
|
url: string;
|
|
10
|
-
isOverlayEnabled?: boolean;
|
|
11
|
-
isPulseEnabled?: boolean;
|
|
12
|
-
isSelected?: boolean;
|
|
13
13
|
} & Partial<SmartCardProps>;
|
|
14
14
|
export declare const AwarenessWrapper: ({ cardContext, children, getPos, isInserted, isOverlayEnabled, isSelected, isResolvedViewRendered, isPulseEnabled, markMostRecentlyInsertedLink, pluginInjectionApi, setOverlayHoveredStyles, url, appearance, }: AwarenessWrapperProps) => jsx.JSX.Element;
|
|
15
15
|
export {};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx } from '@emotion/react';
|
|
2
2
|
import { type EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
3
|
declare const OverlayWrapper: ({ view, targetElementPos, children, isHoveredCallback: hoverCallback, onOpenLinkClick, }: {
|
|
4
|
-
view: EditorView;
|
|
5
|
-
targetElementPos: number | undefined;
|
|
6
4
|
children: JSX.Element;
|
|
7
5
|
/** Fired when the mouse enters or leaves the overlay button */
|
|
8
6
|
isHoveredCallback: (isHovered: boolean) => void;
|
|
9
7
|
onOpenLinkClick: (event: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => void;
|
|
8
|
+
targetElementPos: number | undefined;
|
|
9
|
+
view: EditorView;
|
|
10
10
|
}) => jsx.JSX.Element;
|
|
11
11
|
export default OverlayWrapper;
|
|
@@ -5,13 +5,13 @@ import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
|
5
5
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
6
6
|
import { type CardContext } from '@atlaskit/link-provider';
|
|
7
7
|
export interface DatasourceAppearanceButtonProps {
|
|
8
|
-
|
|
8
|
+
cardContext?: CardContext;
|
|
9
9
|
editorAnalyticsApi?: EditorAnalyticsAPI;
|
|
10
|
-
url: string;
|
|
11
|
-
editorView?: EditorView;
|
|
12
10
|
editorState: EditorState;
|
|
13
|
-
|
|
14
|
-
selected?: boolean;
|
|
11
|
+
editorView?: EditorView;
|
|
15
12
|
inputMethod: string;
|
|
13
|
+
intl: IntlShape;
|
|
14
|
+
selected?: boolean;
|
|
15
|
+
url: string;
|
|
16
16
|
}
|
|
17
17
|
export declare const DatasourceAppearanceButton: ({ intl, editorAnalyticsApi, url, editorView, editorState, selected, inputMethod, }: DatasourceAppearanceButtonProps) => jsx.JSX.Element;
|
|
@@ -3,11 +3,11 @@ import type { IntlShape } from 'react-intl-next';
|
|
|
3
3
|
import type { Command } from '@atlaskit/editor-common/types';
|
|
4
4
|
interface Props {
|
|
5
5
|
allowDatasource?: boolean;
|
|
6
|
+
dispatchCommand: (command: Command) => void;
|
|
7
|
+
inputMethod: string;
|
|
6
8
|
intl: IntlShape;
|
|
7
|
-
url: string;
|
|
8
9
|
selected: boolean;
|
|
9
|
-
|
|
10
|
-
dispatchCommand: (command: Command) => void;
|
|
10
|
+
url: string;
|
|
11
11
|
}
|
|
12
12
|
export declare const datasourceDisplayInformation: {
|
|
13
13
|
title: {
|
|
@@ -4,9 +4,9 @@ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
|
4
4
|
import type { CardContext } from '@atlaskit/link-provider';
|
|
5
5
|
import type { ModalTypeToComponentMap } from './ModalWithState';
|
|
6
6
|
type DatasourceModalProps = {
|
|
7
|
-
view: EditorView;
|
|
8
|
-
editorAnalyticsApi?: EditorAnalyticsAPI;
|
|
9
7
|
cardContext?: CardContext;
|
|
8
|
+
editorAnalyticsApi?: EditorAnalyticsAPI;
|
|
9
|
+
view: EditorView;
|
|
10
10
|
} & ModalTypeToComponentMap;
|
|
11
11
|
export declare const DatasourceModal: ({ view, cardContext, datasourceId: defaultDatasourceId, componentType: Component, }: DatasourceModalProps) => React.JSX.Element | null;
|
|
12
12
|
export {};
|