@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
|
@@ -9,15 +9,15 @@ import type { Node } from '@atlaskit/editor-prosemirror/model';
|
|
|
9
9
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
10
10
|
import type { cardPlugin } from '../cardPlugin';
|
|
11
11
|
export type EditLinkToolbarProps = {
|
|
12
|
-
view: EditorView;
|
|
13
|
-
providerFactory: ProviderFactory;
|
|
14
|
-
url: string | undefined;
|
|
15
|
-
text: string;
|
|
16
|
-
node: Node;
|
|
17
|
-
onSubmit?: (href: string, text?: string, inputMethod?: LinkInputType, analytic?: UIAnalyticsEvent | null | undefined) => void;
|
|
18
|
-
linkPickerOptions?: LinkPickerOptions;
|
|
19
12
|
forceFocusSelector: ForceFocusSelector | undefined;
|
|
13
|
+
linkPickerOptions?: LinkPickerOptions;
|
|
20
14
|
lpLinkPicker: boolean;
|
|
15
|
+
node: Node;
|
|
16
|
+
onSubmit?: (href: string, text?: string, inputMethod?: LinkInputType, analytic?: UIAnalyticsEvent | null | undefined) => void;
|
|
17
|
+
providerFactory: ProviderFactory;
|
|
18
|
+
text: string;
|
|
19
|
+
url: string | undefined;
|
|
20
|
+
view: EditorView;
|
|
21
21
|
};
|
|
22
22
|
export declare function HyperlinkAddToolbarWithState({ linkPickerOptions, onSubmit, displayText, displayUrl, providerFactory, view, onCancel, invokeMethod, lpLinkPicker, onClose, onEscapeCallback, onClickAwayCallback, }: HyperlinkAddToolbarProps): React.JSX.Element;
|
|
23
23
|
export declare class EditLinkToolbar extends React.Component<EditLinkToolbarProps> {
|
|
@@ -28,10 +28,10 @@ export declare class EditLinkToolbar extends React.Component<EditLinkToolbarProp
|
|
|
28
28
|
}
|
|
29
29
|
export declare const getEditLinkCallback: (editorAnalyticsApi: EditorAnalyticsAPI | undefined, scrollIntoView: boolean) => Command;
|
|
30
30
|
export declare const buildEditLinkToolbar: ({ providerFactory, node, pluginInjectionApi, linkPicker, lpLinkPicker, }: {
|
|
31
|
-
providerFactory: ProviderFactory;
|
|
32
|
-
node: Node;
|
|
33
|
-
pluginInjectionApi: ExtractInjectionAPI<typeof cardPlugin> | undefined;
|
|
34
31
|
linkPicker?: LinkPickerOptions;
|
|
35
32
|
lpLinkPicker: boolean;
|
|
33
|
+
node: Node;
|
|
34
|
+
pluginInjectionApi: ExtractInjectionAPI<typeof cardPlugin> | undefined;
|
|
35
|
+
providerFactory: ProviderFactory;
|
|
36
36
|
}) => FloatingToolbarItem<Command>;
|
|
37
37
|
export declare const editLinkToolbarConfig: (showLinkingToolbar: boolean, lpLinkPicker?: boolean) => Partial<FloatingToolbarConfig>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx } from '@emotion/react';
|
|
2
2
|
import type { EditDatasourceToolbarButtonWithCommonProps, EditVariant } from './types';
|
|
3
3
|
interface EditToolbarPresentationProps extends EditDatasourceToolbarButtonWithCommonProps {
|
|
4
|
-
extensionKey?: string;
|
|
5
4
|
datasourceId?: string;
|
|
6
5
|
editVariant: EditVariant;
|
|
6
|
+
extensionKey?: string;
|
|
7
7
|
}
|
|
8
8
|
declare const EditToolbarButtonPresentation: ({ datasourceId, currentAppearance, editorAnalyticsApi, editVariant, editorView, extensionKey, onLinkEditClick, intl, }: EditToolbarPresentationProps) => jsx.JSX.Element | null;
|
|
9
9
|
export default EditToolbarButtonPresentation;
|
|
@@ -7,11 +7,11 @@ import type { CardContext } from '@atlaskit/link-provider';
|
|
|
7
7
|
import { type CardType } from '../../types';
|
|
8
8
|
export type EditVariant = 'none' | 'edit-link' | 'edit-datasource' | 'edit-dropdown';
|
|
9
9
|
export interface EditDatasourceToolbarButtonWithCommonProps {
|
|
10
|
-
|
|
11
|
-
onLinkEditClick: Command;
|
|
10
|
+
currentAppearance?: CardType;
|
|
12
11
|
editorAnalyticsApi?: EditorAnalyticsAPI;
|
|
13
12
|
editorView?: EditorView;
|
|
14
|
-
|
|
13
|
+
intl: IntlShape;
|
|
14
|
+
onLinkEditClick: Command;
|
|
15
15
|
}
|
|
16
16
|
export interface EditDatasourceToolbarButtonWithUrlProps extends EditDatasourceToolbarButtonWithCommonProps {
|
|
17
17
|
cardContext?: CardContext;
|
|
@@ -24,7 +24,7 @@ export interface EditDatasourceToolbarButtonWithDatasourceIdProps extends EditDa
|
|
|
24
24
|
}
|
|
25
25
|
export type EditDatasourceToolbarButtonProps = EditDatasourceToolbarButtonWithCommonProps & {
|
|
26
26
|
cardContext?: CardContext;
|
|
27
|
-
url?: string;
|
|
28
27
|
datasourceId?: string;
|
|
29
28
|
node?: Node;
|
|
29
|
+
url?: string;
|
|
30
30
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
3
|
export type EditorAnalyticsContextProps = {
|
|
4
|
-
editorView?: EditorView;
|
|
5
4
|
children: React.ReactNode;
|
|
5
|
+
editorView?: EditorView;
|
|
6
6
|
};
|
|
7
7
|
/**
|
|
8
8
|
* Provides location attribute to child events
|
|
@@ -3,15 +3,15 @@ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
|
3
3
|
import type { EditorCardPluginEvents } from '../analytics/create-events-queue';
|
|
4
4
|
import type { CardPluginEvent } from '../analytics/types';
|
|
5
5
|
export type AnalyticsBindingsProps = {
|
|
6
|
-
editorView: EditorView;
|
|
7
6
|
cardPluginEvents: EditorCardPluginEvents<CardPluginEvent>;
|
|
7
|
+
editorView: EditorView;
|
|
8
8
|
};
|
|
9
9
|
type EventMetadata = {
|
|
10
10
|
action?: string;
|
|
11
11
|
inputMethod?: string;
|
|
12
|
-
sourceEvent?: unknown;
|
|
13
12
|
isRedo?: boolean;
|
|
14
13
|
isUndo?: boolean;
|
|
14
|
+
sourceEvent?: unknown;
|
|
15
15
|
};
|
|
16
16
|
export declare const getMethod: (metadata: EventMetadata) => string | undefined;
|
|
17
17
|
export declare const getUpdateType: (metadata: EventMetadata) => string | undefined;
|
|
@@ -7,12 +7,12 @@ import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
|
7
7
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
8
8
|
import { type CardPlugin } from '../cardPluginType';
|
|
9
9
|
export interface HyperlinkToolbarAppearanceProps {
|
|
10
|
-
intl: IntlShape;
|
|
11
|
-
editorState: EditorState;
|
|
12
|
-
url: string;
|
|
13
|
-
editorView?: EditorView;
|
|
14
10
|
cardOptions?: CardOptions;
|
|
15
11
|
editorAnalyticsApi: EditorAnalyticsAPI | undefined;
|
|
16
12
|
editorPluginApi: ExtractInjectionAPI<CardPlugin> | undefined;
|
|
13
|
+
editorState: EditorState;
|
|
14
|
+
editorView?: EditorView;
|
|
15
|
+
intl: IntlShape;
|
|
16
|
+
url: string;
|
|
17
17
|
}
|
|
18
18
|
export declare function HyperlinkToolbarAppearance(props: HyperlinkToolbarAppearanceProps): React.JSX.Element | null;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Command, FloatingToolbarCustom, FloatingToolbarItem } from '@atlaskit/editor-common/types';
|
|
2
2
|
import type { HyperlinkToolbarAppearanceProps } from './HyperlinkToolbarAppearance';
|
|
3
3
|
export declare const getCustomHyperlinkAppearanceDropdown: ({ url, intl, editorAnalyticsApi, editorPluginApi, settingsConfig, cardOptions, allowDatasource, isDatasourceView, }: Omit<HyperlinkToolbarAppearanceProps, "editorState"> & {
|
|
4
|
-
settingsConfig: FloatingToolbarItem<Command>;
|
|
5
4
|
allowDatasource?: boolean;
|
|
6
5
|
isDatasourceView?: boolean;
|
|
6
|
+
settingsConfig: FloatingToolbarItem<Command>;
|
|
7
7
|
}) => FloatingToolbarCustom<Command>;
|
|
@@ -9,14 +9,14 @@ export declare const DATASOURCE_TABLE_LAYOUTS: readonly [
|
|
|
9
9
|
];
|
|
10
10
|
export type DatasourceTableLayout = (typeof DATASOURCE_TABLE_LAYOUTS)[number];
|
|
11
11
|
export type LayoutButtonProps = {
|
|
12
|
-
mountPoint?: HTMLElement;
|
|
13
12
|
boundariesElement?: HTMLElement;
|
|
14
|
-
|
|
15
|
-
targetElement?: HTMLElement;
|
|
13
|
+
intl: IntlShape;
|
|
16
14
|
layout?: DatasourceTableLayout;
|
|
15
|
+
mountPoint?: HTMLElement;
|
|
17
16
|
onLayoutChange?: (layout: DatasourceTableLayout) => void;
|
|
17
|
+
scrollableElement?: HTMLElement;
|
|
18
|
+
targetElement?: HTMLElement;
|
|
18
19
|
testId?: string;
|
|
19
|
-
intl: IntlShape;
|
|
20
20
|
};
|
|
21
21
|
export interface LayoutButtonWrapperProps extends Pick<LayoutButtonProps, 'mountPoint' | 'boundariesElement' | 'scrollableElement'> {
|
|
22
22
|
api: ExtractInjectionAPI<typeof cardPlugin> | undefined;
|
|
@@ -6,16 +6,16 @@ import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
|
6
6
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
7
7
|
import type { CardContext } from '@atlaskit/link-provider';
|
|
8
8
|
export interface LinkToolbarAppearanceProps {
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
allowBlockCards?: boolean;
|
|
10
|
+
allowEmbeds?: boolean;
|
|
11
11
|
currentAppearance?: CardAppearance;
|
|
12
|
+
editorAnalyticsApi: EditorAnalyticsAPI | undefined;
|
|
12
13
|
editorState: EditorState;
|
|
13
14
|
editorView?: EditorView;
|
|
14
|
-
|
|
15
|
-
allowEmbeds?: boolean;
|
|
16
|
-
allowBlockCards?: boolean;
|
|
17
|
-
showUpgradeDiscoverability?: boolean;
|
|
15
|
+
intl: IntlShape;
|
|
18
16
|
isDatasourceView?: boolean;
|
|
17
|
+
showUpgradeDiscoverability?: boolean;
|
|
18
|
+
url?: string;
|
|
19
19
|
}
|
|
20
20
|
export declare class LinkToolbarAppearance extends React.Component<LinkToolbarAppearanceProps, Object> {
|
|
21
21
|
renderDropdown: (view?: EditorView, cardContext?: CardContext) => React.JSX.Element | null;
|
|
@@ -2,13 +2,13 @@ import React from 'react';
|
|
|
2
2
|
import type { Command, FloatingToolbarDropdown, FloatingToolbarItem } from '@atlaskit/editor-common/types';
|
|
3
3
|
import { type LinkToolbarAppearanceProps } from './LinkToolbarAppearance';
|
|
4
4
|
type Props = LinkToolbarAppearanceProps & {
|
|
5
|
+
allowDatasource?: boolean;
|
|
5
6
|
dispatchCommand: (command: Command) => void;
|
|
6
7
|
settingsConfig: FloatingToolbarItem<Command>;
|
|
7
|
-
allowDatasource?: boolean;
|
|
8
8
|
};
|
|
9
9
|
export declare const LinkAppearanceMenu: ({ url, intl, currentAppearance, editorState, allowEmbeds, allowBlockCards, allowDatasource, editorAnalyticsApi, isDatasourceView, dispatchCommand, settingsConfig, }: Props) => React.JSX.Element | null;
|
|
10
10
|
export declare const getLinkAppearanceDropdown: ({ url, intl, currentAppearance, editorState, allowEmbeds, allowBlockCards, allowDatasource, editorAnalyticsApi, showUpgradeDiscoverability, isDatasourceView, settingsConfig, }: LinkToolbarAppearanceProps & {
|
|
11
|
-
settingsConfig: FloatingToolbarItem<Command>;
|
|
12
11
|
allowDatasource?: boolean;
|
|
12
|
+
settingsConfig: FloatingToolbarItem<Command>;
|
|
13
13
|
}) => FloatingToolbarDropdown<Command>;
|
|
14
14
|
export {};
|
|
@@ -3,9 +3,9 @@ import { type IntlShape } from 'react-intl-next';
|
|
|
3
3
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
4
4
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
5
5
|
type OpenPreviewPanelToolbarButtonProps = {
|
|
6
|
-
node: PMNode;
|
|
7
|
-
intl: IntlShape;
|
|
8
6
|
editorAnalyticsApi?: EditorAnalyticsAPI;
|
|
7
|
+
intl: IntlShape;
|
|
8
|
+
node: PMNode;
|
|
9
9
|
};
|
|
10
10
|
export declare const OpenPreviewPanelToolbarButton: ({ node, intl, }: OpenPreviewPanelToolbarButtonProps) => React.JSX.Element | null;
|
|
11
11
|
export {};
|
|
@@ -5,6 +5,12 @@ export interface PulseProps {
|
|
|
5
5
|
* The component around which the Pulse should be displayed
|
|
6
6
|
*/
|
|
7
7
|
children: JSX.Element;
|
|
8
|
+
/**
|
|
9
|
+
* Indicates when the feature is considered discovered. If "start" is passed, local storage key will be invalidated
|
|
10
|
+
* as soon as the animation starts. If "iteration" is passed (the default one), it will be invalidated after the first iteration
|
|
11
|
+
*/
|
|
12
|
+
discoveryMode?: PulseDiscoveryMode;
|
|
13
|
+
isInline?: boolean;
|
|
8
14
|
/**
|
|
9
15
|
* The key that is used in local storage to identify the descoverability of a feature where the Pulse is used
|
|
10
16
|
*/
|
|
@@ -13,13 +19,7 @@ export interface PulseProps {
|
|
|
13
19
|
* The time in ms after which the key in local storage will be considered expired and the Pulse will be shown again
|
|
14
20
|
*/
|
|
15
21
|
localStorageKeyExpirationInMs?: number;
|
|
16
|
-
/**
|
|
17
|
-
* Indicates when the feature is considered discovered. If "start" is passed, local storage key will be invalidated
|
|
18
|
-
* as soon as the animation starts. If "iteration" is passed (the default one), it will be invalidated after the first iteration
|
|
19
|
-
*/
|
|
20
|
-
discoveryMode?: PulseDiscoveryMode;
|
|
21
22
|
shouldShowPulse?: boolean;
|
|
22
23
|
testId?: string;
|
|
23
|
-
isInline?: boolean;
|
|
24
24
|
}
|
|
25
25
|
export declare const DiscoveryPulse: ({ children, localStorageKey, localStorageKeyExpirationInMs, discoveryMode, shouldShowPulse, testId, isInline, }: PulseProps) => React.JSX.Element;
|
|
@@ -11,10 +11,10 @@ type State = {
|
|
|
11
11
|
resizedPctWidth?: number;
|
|
12
12
|
};
|
|
13
13
|
export type Props = Omit<ResizerProps, 'height' | 'width'> & {
|
|
14
|
-
width?: number;
|
|
15
|
-
height?: number;
|
|
16
14
|
aspectRatio: number;
|
|
15
|
+
height?: number;
|
|
17
16
|
isResizeDisabled?: boolean;
|
|
17
|
+
width?: number;
|
|
18
18
|
};
|
|
19
19
|
export default class ResizableEmbedCard extends React.Component<Props, State> {
|
|
20
20
|
static defaultProps: {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export type Subscriber<T> = (event: T) => void;
|
|
2
2
|
export type EditorCardPluginEvents<T> = {
|
|
3
|
-
push: (...events: T[]) => void;
|
|
4
|
-
subscribe: (listener: Subscriber<T>) => () => void;
|
|
5
3
|
flush: () => void;
|
|
6
4
|
getSize: () => number;
|
|
5
|
+
push: (...events: T[]) => void;
|
|
6
|
+
subscribe: (listener: Subscriber<T>) => () => void;
|
|
7
7
|
};
|
|
8
8
|
/**
|
|
9
9
|
* Simple mechanism to defer event related callbacks
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import type { Node } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
export type Entity = {
|
|
3
|
-
pos: number;
|
|
4
3
|
node: Node;
|
|
5
4
|
nodeContext: string;
|
|
5
|
+
pos: number;
|
|
6
6
|
};
|
|
7
7
|
type Metadata<T = Object> = {
|
|
8
|
-
node: Node;
|
|
9
|
-
isUndo?: boolean;
|
|
10
|
-
isRedo?: boolean;
|
|
11
8
|
action?: string;
|
|
12
9
|
inputMethod?: string;
|
|
13
|
-
|
|
10
|
+
isRedo?: boolean;
|
|
11
|
+
isUndo?: boolean;
|
|
12
|
+
node: Node;
|
|
14
13
|
nodeContext?: string;
|
|
14
|
+
sourceEvent?: unknown;
|
|
15
15
|
} & T;
|
|
16
16
|
type UpdateMetadata = {
|
|
17
17
|
previousDisplay?: string;
|
|
@@ -31,34 +31,34 @@ export declare enum EVENT_SUBJECT {
|
|
|
31
31
|
* events can be derived from them / think of them in the same way
|
|
32
32
|
*/
|
|
33
33
|
export type LinkCreatedEvent = {
|
|
34
|
+
data: Metadata;
|
|
34
35
|
event: EVENT.CREATED;
|
|
35
36
|
subject: EVENT_SUBJECT.LINK;
|
|
36
|
-
data: Metadata;
|
|
37
37
|
};
|
|
38
38
|
export type LinkUpdatedEvent = {
|
|
39
|
+
data: Metadata<UpdateMetadata>;
|
|
39
40
|
event: EVENT.UPDATED;
|
|
40
41
|
subject: EVENT_SUBJECT.LINK;
|
|
41
|
-
data: Metadata<UpdateMetadata>;
|
|
42
42
|
};
|
|
43
43
|
export type LinkDeletedEvent = {
|
|
44
|
+
data: Metadata;
|
|
44
45
|
event: EVENT.DELETED;
|
|
45
46
|
subject: EVENT_SUBJECT.LINK;
|
|
46
|
-
data: Metadata;
|
|
47
47
|
};
|
|
48
48
|
export type DatasourceCreatedEvent = {
|
|
49
|
+
data: Metadata;
|
|
49
50
|
event: EVENT.CREATED;
|
|
50
51
|
subject: EVENT_SUBJECT.DATASOURCE;
|
|
51
|
-
data: Metadata;
|
|
52
52
|
};
|
|
53
53
|
export type DatasourceUpdatedEvent = {
|
|
54
|
+
data: Metadata<UpdateMetadata>;
|
|
54
55
|
event: EVENT.UPDATED;
|
|
55
56
|
subject: EVENT_SUBJECT.DATASOURCE;
|
|
56
|
-
data: Metadata<UpdateMetadata>;
|
|
57
57
|
};
|
|
58
58
|
export type DatasourceDeletedEvent = {
|
|
59
|
+
data: Metadata;
|
|
59
60
|
event: EVENT.DELETED;
|
|
60
61
|
subject: EVENT_SUBJECT.DATASOURCE;
|
|
61
|
-
data: Metadata;
|
|
62
62
|
};
|
|
63
63
|
export type LinkEvent = LinkCreatedEvent | LinkUpdatedEvent | LinkDeletedEvent;
|
|
64
64
|
export type DatasourceEvent = DatasourceCreatedEvent | DatasourceUpdatedEvent | DatasourceDeletedEvent;
|
|
@@ -10,7 +10,7 @@ export declare function getNodeSubject(node: Node): EVENT_SUBJECT | null;
|
|
|
10
10
|
/**
|
|
11
11
|
* Analytics appearance for link object
|
|
12
12
|
*/
|
|
13
|
-
export declare function appearanceForLink(node: Node):
|
|
13
|
+
export declare function appearanceForLink(node: Node): import("@atlaskit/editor-common/provider-factory").CardAppearance | "url";
|
|
14
14
|
export declare function getUrl(node: Node): string | undefined;
|
|
15
15
|
export declare const getNodeContext: (doc: Node, pos: number) => string;
|
|
16
16
|
export declare const findAtPositions: (tr: Transaction | ReadonlyTransaction, positions: number[]) => Entity[];
|
|
@@ -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;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-card",
|
|
3
|
-
"version": "7.4.
|
|
3
|
+
"version": "7.4.9",
|
|
4
4
|
"description": "Card plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"@atlaskit/editor-plugin-editor-disabled": "^3.0.0",
|
|
44
44
|
"@atlaskit/editor-plugin-editor-viewmode": "^5.0.0",
|
|
45
45
|
"@atlaskit/editor-plugin-feature-flags": "^2.0.0",
|
|
46
|
-
"@atlaskit/editor-plugin-floating-toolbar": "^5.
|
|
46
|
+
"@atlaskit/editor-plugin-floating-toolbar": "^5.2.0",
|
|
47
47
|
"@atlaskit/editor-plugin-grid": "^3.1.0",
|
|
48
48
|
"@atlaskit/editor-plugin-width": "^4.0.0",
|
|
49
49
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
@@ -60,9 +60,9 @@
|
|
|
60
60
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
61
61
|
"@atlaskit/platform-feature-flags-react": "^0.2.0",
|
|
62
62
|
"@atlaskit/primitives": "^14.11.0",
|
|
63
|
-
"@atlaskit/smart-card": "^40.
|
|
63
|
+
"@atlaskit/smart-card": "^40.13.0",
|
|
64
64
|
"@atlaskit/theme": "^19.0.0",
|
|
65
|
-
"@atlaskit/tmp-editor-statsig": "^11.
|
|
65
|
+
"@atlaskit/tmp-editor-statsig": "^11.5.0",
|
|
66
66
|
"@atlaskit/tokens": "^6.0.0",
|
|
67
67
|
"@babel/runtime": "^7.0.0",
|
|
68
68
|
"@emotion/react": "^11.7.1",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"uuid": "^3.1.0"
|
|
73
73
|
},
|
|
74
74
|
"peerDependencies": {
|
|
75
|
-
"@atlaskit/editor-common": "^107.
|
|
75
|
+
"@atlaskit/editor-common": "^107.28.0",
|
|
76
76
|
"@atlaskit/link-provider": "^3.7.0",
|
|
77
77
|
"react": "^18.2.0",
|
|
78
78
|
"react-intl-next": "npm:react-intl@^5.18.1"
|