@atlaskit/editor-plugin-card 1.15.1 → 2.0.1
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 +19 -0
- package/dist/cjs/plugin.js +2 -12
- package/dist/cjs/pm-plugins/doc.js +88 -2
- package/dist/cjs/toolbar.js +4 -7
- package/dist/cjs/ui/EditLinkToolbar.js +3 -15
- package/dist/cjs/ui/HyperlinkToolbarAppearance.js +3 -5
- package/dist/cjs/ui/LinkToolbarAppearance.js +6 -6
- package/dist/cjs/utils.js +1 -4
- package/dist/es2019/plugin.js +3 -11
- package/dist/es2019/pm-plugins/doc.js +84 -1
- package/dist/es2019/toolbar.js +18 -23
- package/dist/es2019/ui/EditLinkToolbar.js +3 -16
- package/dist/es2019/ui/HyperlinkToolbarAppearance.js +3 -5
- package/dist/es2019/ui/LinkToolbarAppearance.js +6 -6
- package/dist/es2019/utils.js +0 -3
- package/dist/esm/plugin.js +3 -13
- package/dist/esm/pm-plugins/doc.js +88 -1
- package/dist/esm/toolbar.js +5 -8
- package/dist/esm/ui/EditLinkToolbar.js +3 -15
- package/dist/esm/ui/HyperlinkToolbarAppearance.js +3 -5
- package/dist/esm/ui/LinkToolbarAppearance.js +6 -6
- package/dist/esm/utils.js +0 -3
- package/dist/types/plugin.d.ts +1 -7
- package/dist/types/pm-plugins/doc.d.ts +11 -4
- package/dist/types/ui/EditLinkToolbar.d.ts +4 -8
- package/dist/types/ui/HyperlinkToolbarAppearance.d.ts +1 -2
- package/dist/types/ui/LinkToolbarAppearance.d.ts +0 -2
- package/dist/types/utils.d.ts +0 -2
- package/dist/types-ts4.5/plugin.d.ts +1 -7
- package/dist/types-ts4.5/pm-plugins/doc.d.ts +11 -4
- package/dist/types-ts4.5/ui/EditLinkToolbar.d.ts +4 -8
- package/dist/types-ts4.5/ui/HyperlinkToolbarAppearance.d.ts +1 -2
- package/dist/types-ts4.5/ui/LinkToolbarAppearance.d.ts +0 -2
- package/dist/types-ts4.5/utils.d.ts +0 -2
- package/package.json +6 -7
- package/dist/cjs/pm-plugins/mountHyperlink.js +0 -84
- package/dist/es2019/pm-plugins/mountHyperlink.js +0 -72
- package/dist/esm/pm-plugins/mountHyperlink.js +0 -77
- package/dist/types/pm-plugins/mountHyperlink.d.ts +0 -5
- package/dist/types-ts4.5/pm-plugins/mountHyperlink.d.ts +0 -5
|
@@ -18,6 +18,7 @@ import nodeNames, { cardMessages as messages } from '@atlaskit/editor-common/mes
|
|
|
18
18
|
import { isSupportedInParent } from '@atlaskit/editor-common/utils';
|
|
19
19
|
import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
20
20
|
import { LOCAL_STORAGE_DISCOVERY_KEY_TOOLBAR } from '../common/local-storage';
|
|
21
|
+
import { changeSelectedCardToLink, setSelectedCardAppearance } from '../pm-plugins/doc';
|
|
21
22
|
import { shouldRenderToolbarPulse } from '../toolbar';
|
|
22
23
|
import { getResolvedAttributesFromStore } from '../utils';
|
|
23
24
|
import { DiscoveryPulse } from './Pulse';
|
|
@@ -33,7 +34,7 @@ export var LinkToolbarAppearance = /*#__PURE__*/function (_React$Component) {
|
|
|
33
34
|
}
|
|
34
35
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
35
36
|
_defineProperty(_assertThisInitialized(_this), "renderDropdown", function (view, cardContext) {
|
|
36
|
-
var
|
|
37
|
+
var _setSelectedCardAppea, _setSelectedCardAppea2, _changeSelectedCardTo, _setSelectedCardAppea3, _cardContext$store2;
|
|
37
38
|
var _this$props = _this.props,
|
|
38
39
|
url = _this$props.url,
|
|
39
40
|
intl = _this$props.intl,
|
|
@@ -44,7 +45,6 @@ export var LinkToolbarAppearance = /*#__PURE__*/function (_React$Component) {
|
|
|
44
45
|
allowBlockCards = _this$props$allowBloc === void 0 ? true : _this$props$allowBloc,
|
|
45
46
|
platform = _this$props.platform,
|
|
46
47
|
editorAnalyticsApi = _this$props.editorAnalyticsApi,
|
|
47
|
-
cardActions = _this$props.cardActions,
|
|
48
48
|
_this$props$showUpgra = _this$props.showUpgradeDiscoverability,
|
|
49
49
|
showUpgradeDiscoverability = _this$props$showUpgra === void 0 ? true : _this$props$showUpgra,
|
|
50
50
|
isDatasourceView = _this$props.isDatasourceView;
|
|
@@ -64,7 +64,7 @@ export var LinkToolbarAppearance = /*#__PURE__*/function (_React$Component) {
|
|
|
64
64
|
var embedOption = allowEmbeds && preview && {
|
|
65
65
|
appearance: 'embed',
|
|
66
66
|
title: intl.formatMessage(messages.embed),
|
|
67
|
-
onClick: (
|
|
67
|
+
onClick: (_setSelectedCardAppea = setSelectedCardAppearance('embed', editorAnalyticsApi)) !== null && _setSelectedCardAppea !== void 0 ? _setSelectedCardAppea : defaultCommand,
|
|
68
68
|
selected: currentAppearance === 'embed',
|
|
69
69
|
hidden: false,
|
|
70
70
|
testId: 'embed-appearance',
|
|
@@ -74,7 +74,7 @@ export var LinkToolbarAppearance = /*#__PURE__*/function (_React$Component) {
|
|
|
74
74
|
var blockCardOption = allowBlockCards && {
|
|
75
75
|
appearance: 'block',
|
|
76
76
|
title: intl.formatMessage(messages.block),
|
|
77
|
-
onClick: (
|
|
77
|
+
onClick: (_setSelectedCardAppea2 = setSelectedCardAppearance('block', editorAnalyticsApi)) !== null && _setSelectedCardAppea2 !== void 0 ? _setSelectedCardAppea2 : defaultCommand,
|
|
78
78
|
selected: currentAppearance === 'block' && !isDatasourceView,
|
|
79
79
|
testId: 'block-appearance',
|
|
80
80
|
disabled: !isBlockCardLinkSupportedInParent,
|
|
@@ -82,7 +82,7 @@ export var LinkToolbarAppearance = /*#__PURE__*/function (_React$Component) {
|
|
|
82
82
|
};
|
|
83
83
|
var options = [{
|
|
84
84
|
title: intl.formatMessage(messages.url),
|
|
85
|
-
onClick: commandWithMetadata((
|
|
85
|
+
onClick: commandWithMetadata((_changeSelectedCardTo = changeSelectedCardToLink(url, url, true, undefined, undefined, editorAnalyticsApi)) !== null && _changeSelectedCardTo !== void 0 ? _changeSelectedCardTo : defaultCommand, {
|
|
86
86
|
action: ACTION.CHANGED_TYPE
|
|
87
87
|
}),
|
|
88
88
|
selected: !currentAppearance && !isDatasourceView,
|
|
@@ -90,7 +90,7 @@ export var LinkToolbarAppearance = /*#__PURE__*/function (_React$Component) {
|
|
|
90
90
|
}, {
|
|
91
91
|
appearance: 'inline',
|
|
92
92
|
title: intl.formatMessage(messages.inline),
|
|
93
|
-
onClick: (
|
|
93
|
+
onClick: (_setSelectedCardAppea3 = setSelectedCardAppearance('inline', editorAnalyticsApi)) !== null && _setSelectedCardAppea3 !== void 0 ? _setSelectedCardAppea3 : defaultCommand,
|
|
94
94
|
selected: currentAppearance === 'inline',
|
|
95
95
|
testId: 'inline-appearance'
|
|
96
96
|
}];
|
package/dist/esm/utils.js
CHANGED
|
@@ -80,9 +80,6 @@ export var isDatasourceConfigEditable = function isDatasourceConfigEditable(data
|
|
|
80
80
|
}
|
|
81
81
|
return datasourcesWithConfigModal.includes(datasourceId);
|
|
82
82
|
};
|
|
83
|
-
export var isEditDropdownEnabled = function isEditDropdownEnabled(platform) {
|
|
84
|
-
return getBooleanFF('platform.linking-platform.enable-datasource-edit-dropdown-toolbar') && platform !== 'mobile';
|
|
85
|
-
};
|
|
86
83
|
|
|
87
84
|
/**
|
|
88
85
|
* Typeguard that checks node attributes are datasource node attributes
|
package/dist/types/plugin.d.ts
CHANGED
|
@@ -6,7 +6,6 @@ import type { EditorViewModePlugin } from '@atlaskit/editor-plugin-editor-viewmo
|
|
|
6
6
|
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
7
7
|
import type { FloatingToolbarPlugin } from '@atlaskit/editor-plugin-floating-toolbar';
|
|
8
8
|
import type { GridPlugin } from '@atlaskit/editor-plugin-grid';
|
|
9
|
-
import type { HyperlinkPlugin } from '@atlaskit/editor-plugin-hyperlink';
|
|
10
9
|
import type { WidthPlugin } from '@atlaskit/editor-plugin-width';
|
|
11
10
|
import type { CardPluginOptions, CardPluginState } from './types';
|
|
12
11
|
export type CardPlugin = NextEditorPlugin<'card', {
|
|
@@ -18,14 +17,9 @@ export type CardPlugin = NextEditorPlugin<'card', {
|
|
|
18
17
|
WidthPlugin,
|
|
19
18
|
DecorationsPlugin,
|
|
20
19
|
GridPlugin,
|
|
21
|
-
FloatingToolbarPlugin
|
|
22
|
-
HyperlinkPlugin
|
|
20
|
+
FloatingToolbarPlugin
|
|
23
21
|
];
|
|
24
22
|
sharedState: CardPluginState | null;
|
|
25
23
|
actions: CardPluginActions;
|
|
26
24
|
}>;
|
|
27
|
-
/**
|
|
28
|
-
* Card plugin to be added to an `EditorPresetBuilder` and used with `ComposableEditor`
|
|
29
|
-
* from `@atlaskit/editor-core`.
|
|
30
|
-
*/
|
|
31
25
|
export declare const cardPlugin: CardPlugin;
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
+
import { type IntlShape } from 'react-intl-next';
|
|
1
2
|
import type { CreateUIAnalyticsEvent, UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
2
3
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
3
4
|
import { ACTION } from '@atlaskit/editor-common/analytics';
|
|
4
5
|
import type { CardReplacementInputMethod } from '@atlaskit/editor-common/card';
|
|
5
|
-
import type { CardAdf, CardAppearance, DatasourceAdf } from '@atlaskit/editor-common/provider-factory';
|
|
6
|
-
import type { Command } from '@atlaskit/editor-common/types';
|
|
6
|
+
import type { CardAdf, CardAppearance, DatasourceAdf, ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
7
|
+
import type { Command, ExtractInjectionAPI, FloatingToolbarItem } from '@atlaskit/editor-common/types';
|
|
7
8
|
import type { Node, NodeType } from '@atlaskit/editor-prosemirror/model';
|
|
8
9
|
import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
9
10
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
10
11
|
import type { InlineCardAdf } from '@atlaskit/smart-card';
|
|
11
|
-
import type
|
|
12
|
+
import { type cardPlugin } from '../plugin';
|
|
13
|
+
import type { CardPluginOptions, Request } from '../types';
|
|
12
14
|
export declare const replaceQueuedUrlWithCard: (url: string, cardData: CardAdf | DatasourceAdf, analyticsAction?: ACTION, editorAnalyticsApi?: EditorAnalyticsAPI, createAnalyticsEvent?: CreateUIAnalyticsEvent) => Command;
|
|
13
15
|
export declare const handleFallbackWithAnalytics: (request: Request, editorAnalyticsApi: EditorAnalyticsAPI | undefined) => Command;
|
|
14
16
|
export declare const queueCardsFromChangedTr: (state: EditorState, tr: Transaction, source: CardReplacementInputMethod, analyticsAction?: ACTION, normalizeLinkText?: boolean, sourceEvent?: UIAnalyticsEvent | null | undefined, appearance?: CardAppearance) => Transaction;
|
|
@@ -38,5 +40,10 @@ export declare const insertDatasource: (state: EditorState, adf: DatasourceAdf |
|
|
|
38
40
|
* Get attributes for new Card Appearance
|
|
39
41
|
*/
|
|
40
42
|
export declare const getAttrsForAppearance: (appearance: CardAppearance, selectedNode: Node) => import("prosemirror-model").Attrs;
|
|
41
|
-
export declare const editDatasource: (datasourceId: string,
|
|
43
|
+
export declare const editDatasource: (datasourceId: string, editorAnalyticsApi: EditorAnalyticsAPI | undefined) => Command;
|
|
44
|
+
export declare const getStartingToolbarItems: (options: CardPluginOptions, api?: ExtractInjectionAPI<typeof cardPlugin> | undefined) => (intl: IntlShape, link: string, providerFactory: ProviderFactory, onEditLink: Command, metadata: {
|
|
45
|
+
url: string;
|
|
46
|
+
title: string;
|
|
47
|
+
}) => FloatingToolbarItem<Command>[];
|
|
48
|
+
export declare const getEndingToolbarItems: (options: CardPluginOptions, api?: ExtractInjectionAPI<typeof cardPlugin> | undefined) => (intl: IntlShape, link: string) => FloatingToolbarItem<Command>[];
|
|
42
49
|
export {};
|
|
@@ -8,10 +8,7 @@ import type { ForceFocusSelector } from '@atlaskit/editor-plugin-floating-toolba
|
|
|
8
8
|
import type { Node } from '@atlaskit/editor-prosemirror/model';
|
|
9
9
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
10
10
|
import type { cardPlugin } from '../plugin';
|
|
11
|
-
|
|
12
|
-
pluginInjectionApi: ExtractInjectionAPI<typeof cardPlugin> | undefined;
|
|
13
|
-
}
|
|
14
|
-
export type EditLinkToolbarProps = InjectionAPI & {
|
|
11
|
+
export type EditLinkToolbarProps = {
|
|
15
12
|
view: EditorView;
|
|
16
13
|
providerFactory: ProviderFactory;
|
|
17
14
|
url: string | undefined;
|
|
@@ -22,7 +19,7 @@ export type EditLinkToolbarProps = InjectionAPI & {
|
|
|
22
19
|
forceFocusSelector: ForceFocusSelector | undefined;
|
|
23
20
|
lpLinkPicker: boolean;
|
|
24
21
|
};
|
|
25
|
-
export declare function HyperlinkAddToolbarWithState({ linkPickerOptions, onSubmit, displayText, displayUrl, providerFactory, view, onCancel, invokeMethod, lpLinkPicker, onClose, onEscapeCallback, onClickAwayCallback,
|
|
22
|
+
export declare function HyperlinkAddToolbarWithState({ linkPickerOptions, onSubmit, displayText, displayUrl, providerFactory, view, onCancel, invokeMethod, lpLinkPicker, onClose, onEscapeCallback, onClickAwayCallback, }: HyperlinkAddToolbarProps): JSX.Element;
|
|
26
23
|
export declare class EditLinkToolbar extends React.Component<EditLinkToolbarProps> {
|
|
27
24
|
componentDidUpdate(prevProps: EditLinkToolbarProps): void;
|
|
28
25
|
componentWillUnmount(): void;
|
|
@@ -30,12 +27,11 @@ export declare class EditLinkToolbar extends React.Component<EditLinkToolbarProp
|
|
|
30
27
|
render(): JSX.Element;
|
|
31
28
|
}
|
|
32
29
|
export declare const editLink: (editorAnalyticsApi: EditorAnalyticsAPI | undefined) => Command;
|
|
33
|
-
export declare const buildEditLinkToolbar: ({ providerFactory, node,
|
|
30
|
+
export declare const buildEditLinkToolbar: ({ providerFactory, node, pluginInjectionApi, linkPicker, lpLinkPicker, }: {
|
|
34
31
|
providerFactory: ProviderFactory;
|
|
35
32
|
node: Node;
|
|
36
|
-
linkPicker?: LinkPickerOptions | undefined;
|
|
37
33
|
pluginInjectionApi: ExtractInjectionAPI<typeof cardPlugin> | undefined;
|
|
34
|
+
linkPicker?: LinkPickerOptions | undefined;
|
|
38
35
|
lpLinkPicker: boolean;
|
|
39
36
|
}) => FloatingToolbarItem<Command>;
|
|
40
37
|
export declare const editLinkToolbarConfig: (showLinkingToolbar: boolean, lpLinkPicker?: boolean) => Partial<FloatingToolbarConfig>;
|
|
41
|
-
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Component } from 'react';
|
|
2
2
|
import type { IntlShape } from 'react-intl-next';
|
|
3
3
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
4
|
-
import type { CardOptions
|
|
4
|
+
import type { CardOptions } from '@atlaskit/editor-common/card';
|
|
5
5
|
import type { CardProvider, ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
6
6
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
7
7
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
@@ -15,7 +15,6 @@ export interface HyperlinkToolbarAppearanceProps {
|
|
|
15
15
|
platform?: CardPlatform;
|
|
16
16
|
cardOptions?: CardOptions;
|
|
17
17
|
editorAnalyticsApi: EditorAnalyticsAPI | undefined;
|
|
18
|
-
cardActions: CardPluginActions | undefined;
|
|
19
18
|
}
|
|
20
19
|
export interface HyperlinkToolbarAppearanceState {
|
|
21
20
|
supportedUrlsMap: Map<string, boolean>;
|
|
@@ -2,7 +2,6 @@ import React from 'react';
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import type { IntlShape } from 'react-intl-next';
|
|
4
4
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
5
|
-
import type { CardPluginActions } from '@atlaskit/editor-common/card';
|
|
6
5
|
import type { CardAppearance } from '@atlaskit/editor-common/provider-factory';
|
|
7
6
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
8
7
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
@@ -18,7 +17,6 @@ export interface LinkToolbarAppearanceProps {
|
|
|
18
17
|
allowEmbeds?: boolean;
|
|
19
18
|
allowBlockCards?: boolean;
|
|
20
19
|
platform?: CardPlatform;
|
|
21
|
-
cardActions: CardPluginActions | undefined;
|
|
22
20
|
showUpgradeDiscoverability?: boolean;
|
|
23
21
|
isDatasourceView?: boolean;
|
|
24
22
|
}
|
package/dist/types/utils.d.ts
CHANGED
|
@@ -2,7 +2,6 @@ import type { CardAppearance } from '@atlaskit/editor-common/provider-factory';
|
|
|
2
2
|
import type { Node, NodeType } from '@atlaskit/editor-prosemirror/model';
|
|
3
3
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
4
4
|
import type { CardContext } from '@atlaskit/link-provider';
|
|
5
|
-
import type { CardPlatform } from '@atlaskit/smart-card';
|
|
6
5
|
import type { CardInfo, DatasourceNode } from './types';
|
|
7
6
|
export declare const appearanceForNodeType: (spec: NodeType) => CardAppearance | undefined;
|
|
8
7
|
export declare const selectedCardAppearance: (state: EditorState) => CardAppearance | undefined;
|
|
@@ -23,7 +22,6 @@ export declare const isEmbedSupportedAtPosition: (currentNodePosition: number, e
|
|
|
23
22
|
export declare const isBlockSupportedAtPosition: (currentNodePosition: number, editorState: EditorState, currentAppearance?: CardAppearance) => boolean;
|
|
24
23
|
export declare const getResolvedAttributesFromStore: (url: string, display: string | null, store?: CardContext['store']) => {};
|
|
25
24
|
export declare const isDatasourceConfigEditable: (datasourceId: string) => boolean;
|
|
26
|
-
export declare const isEditDropdownEnabled: (platform?: CardPlatform) => boolean;
|
|
27
25
|
/**
|
|
28
26
|
* Typeguard that checks node attributes are datasource node attributes
|
|
29
27
|
* ** WARNING ** Typeguards are not a guarantee, if the asserted type changes
|
|
@@ -6,7 +6,6 @@ import type { EditorViewModePlugin } from '@atlaskit/editor-plugin-editor-viewmo
|
|
|
6
6
|
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
7
7
|
import type { FloatingToolbarPlugin } from '@atlaskit/editor-plugin-floating-toolbar';
|
|
8
8
|
import type { GridPlugin } from '@atlaskit/editor-plugin-grid';
|
|
9
|
-
import type { HyperlinkPlugin } from '@atlaskit/editor-plugin-hyperlink';
|
|
10
9
|
import type { WidthPlugin } from '@atlaskit/editor-plugin-width';
|
|
11
10
|
import type { CardPluginOptions, CardPluginState } from './types';
|
|
12
11
|
export type CardPlugin = NextEditorPlugin<'card', {
|
|
@@ -18,14 +17,9 @@ export type CardPlugin = NextEditorPlugin<'card', {
|
|
|
18
17
|
WidthPlugin,
|
|
19
18
|
DecorationsPlugin,
|
|
20
19
|
GridPlugin,
|
|
21
|
-
FloatingToolbarPlugin
|
|
22
|
-
HyperlinkPlugin
|
|
20
|
+
FloatingToolbarPlugin
|
|
23
21
|
];
|
|
24
22
|
sharedState: CardPluginState | null;
|
|
25
23
|
actions: CardPluginActions;
|
|
26
24
|
}>;
|
|
27
|
-
/**
|
|
28
|
-
* Card plugin to be added to an `EditorPresetBuilder` and used with `ComposableEditor`
|
|
29
|
-
* from `@atlaskit/editor-core`.
|
|
30
|
-
*/
|
|
31
25
|
export declare const cardPlugin: CardPlugin;
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
+
import { type IntlShape } from 'react-intl-next';
|
|
1
2
|
import type { CreateUIAnalyticsEvent, UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
2
3
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
3
4
|
import { ACTION } from '@atlaskit/editor-common/analytics';
|
|
4
5
|
import type { CardReplacementInputMethod } from '@atlaskit/editor-common/card';
|
|
5
|
-
import type { CardAdf, CardAppearance, DatasourceAdf } from '@atlaskit/editor-common/provider-factory';
|
|
6
|
-
import type { Command } from '@atlaskit/editor-common/types';
|
|
6
|
+
import type { CardAdf, CardAppearance, DatasourceAdf, ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
7
|
+
import type { Command, ExtractInjectionAPI, FloatingToolbarItem } from '@atlaskit/editor-common/types';
|
|
7
8
|
import type { Node, NodeType } from '@atlaskit/editor-prosemirror/model';
|
|
8
9
|
import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
9
10
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
10
11
|
import type { InlineCardAdf } from '@atlaskit/smart-card';
|
|
11
|
-
import type
|
|
12
|
+
import { type cardPlugin } from '../plugin';
|
|
13
|
+
import type { CardPluginOptions, Request } from '../types';
|
|
12
14
|
export declare const replaceQueuedUrlWithCard: (url: string, cardData: CardAdf | DatasourceAdf, analyticsAction?: ACTION, editorAnalyticsApi?: EditorAnalyticsAPI, createAnalyticsEvent?: CreateUIAnalyticsEvent) => Command;
|
|
13
15
|
export declare const handleFallbackWithAnalytics: (request: Request, editorAnalyticsApi: EditorAnalyticsAPI | undefined) => Command;
|
|
14
16
|
export declare const queueCardsFromChangedTr: (state: EditorState, tr: Transaction, source: CardReplacementInputMethod, analyticsAction?: ACTION, normalizeLinkText?: boolean, sourceEvent?: UIAnalyticsEvent | null | undefined, appearance?: CardAppearance) => Transaction;
|
|
@@ -38,5 +40,10 @@ export declare const insertDatasource: (state: EditorState, adf: DatasourceAdf |
|
|
|
38
40
|
* Get attributes for new Card Appearance
|
|
39
41
|
*/
|
|
40
42
|
export declare const getAttrsForAppearance: (appearance: CardAppearance, selectedNode: Node) => import("prosemirror-model").Attrs;
|
|
41
|
-
export declare const editDatasource: (datasourceId: string,
|
|
43
|
+
export declare const editDatasource: (datasourceId: string, editorAnalyticsApi: EditorAnalyticsAPI | undefined) => Command;
|
|
44
|
+
export declare const getStartingToolbarItems: (options: CardPluginOptions, api?: ExtractInjectionAPI<typeof cardPlugin> | undefined) => (intl: IntlShape, link: string, providerFactory: ProviderFactory, onEditLink: Command, metadata: {
|
|
45
|
+
url: string;
|
|
46
|
+
title: string;
|
|
47
|
+
}) => FloatingToolbarItem<Command>[];
|
|
48
|
+
export declare const getEndingToolbarItems: (options: CardPluginOptions, api?: ExtractInjectionAPI<typeof cardPlugin> | undefined) => (intl: IntlShape, link: string) => FloatingToolbarItem<Command>[];
|
|
42
49
|
export {};
|
|
@@ -8,10 +8,7 @@ import type { ForceFocusSelector } from '@atlaskit/editor-plugin-floating-toolba
|
|
|
8
8
|
import type { Node } from '@atlaskit/editor-prosemirror/model';
|
|
9
9
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
10
10
|
import type { cardPlugin } from '../plugin';
|
|
11
|
-
|
|
12
|
-
pluginInjectionApi: ExtractInjectionAPI<typeof cardPlugin> | undefined;
|
|
13
|
-
}
|
|
14
|
-
export type EditLinkToolbarProps = InjectionAPI & {
|
|
11
|
+
export type EditLinkToolbarProps = {
|
|
15
12
|
view: EditorView;
|
|
16
13
|
providerFactory: ProviderFactory;
|
|
17
14
|
url: string | undefined;
|
|
@@ -22,7 +19,7 @@ export type EditLinkToolbarProps = InjectionAPI & {
|
|
|
22
19
|
forceFocusSelector: ForceFocusSelector | undefined;
|
|
23
20
|
lpLinkPicker: boolean;
|
|
24
21
|
};
|
|
25
|
-
export declare function HyperlinkAddToolbarWithState({ linkPickerOptions, onSubmit, displayText, displayUrl, providerFactory, view, onCancel, invokeMethod, lpLinkPicker, onClose, onEscapeCallback, onClickAwayCallback,
|
|
22
|
+
export declare function HyperlinkAddToolbarWithState({ linkPickerOptions, onSubmit, displayText, displayUrl, providerFactory, view, onCancel, invokeMethod, lpLinkPicker, onClose, onEscapeCallback, onClickAwayCallback, }: HyperlinkAddToolbarProps): JSX.Element;
|
|
26
23
|
export declare class EditLinkToolbar extends React.Component<EditLinkToolbarProps> {
|
|
27
24
|
componentDidUpdate(prevProps: EditLinkToolbarProps): void;
|
|
28
25
|
componentWillUnmount(): void;
|
|
@@ -30,12 +27,11 @@ export declare class EditLinkToolbar extends React.Component<EditLinkToolbarProp
|
|
|
30
27
|
render(): JSX.Element;
|
|
31
28
|
}
|
|
32
29
|
export declare const editLink: (editorAnalyticsApi: EditorAnalyticsAPI | undefined) => Command;
|
|
33
|
-
export declare const buildEditLinkToolbar: ({ providerFactory, node,
|
|
30
|
+
export declare const buildEditLinkToolbar: ({ providerFactory, node, pluginInjectionApi, linkPicker, lpLinkPicker, }: {
|
|
34
31
|
providerFactory: ProviderFactory;
|
|
35
32
|
node: Node;
|
|
36
|
-
linkPicker?: LinkPickerOptions | undefined;
|
|
37
33
|
pluginInjectionApi: ExtractInjectionAPI<typeof cardPlugin> | undefined;
|
|
34
|
+
linkPicker?: LinkPickerOptions | undefined;
|
|
38
35
|
lpLinkPicker: boolean;
|
|
39
36
|
}) => FloatingToolbarItem<Command>;
|
|
40
37
|
export declare const editLinkToolbarConfig: (showLinkingToolbar: boolean, lpLinkPicker?: boolean) => Partial<FloatingToolbarConfig>;
|
|
41
|
-
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Component } from 'react';
|
|
2
2
|
import type { IntlShape } from 'react-intl-next';
|
|
3
3
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
4
|
-
import type { CardOptions
|
|
4
|
+
import type { CardOptions } from '@atlaskit/editor-common/card';
|
|
5
5
|
import type { CardProvider, ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
6
6
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
7
7
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
@@ -15,7 +15,6 @@ export interface HyperlinkToolbarAppearanceProps {
|
|
|
15
15
|
platform?: CardPlatform;
|
|
16
16
|
cardOptions?: CardOptions;
|
|
17
17
|
editorAnalyticsApi: EditorAnalyticsAPI | undefined;
|
|
18
|
-
cardActions: CardPluginActions | undefined;
|
|
19
18
|
}
|
|
20
19
|
export interface HyperlinkToolbarAppearanceState {
|
|
21
20
|
supportedUrlsMap: Map<string, boolean>;
|
|
@@ -2,7 +2,6 @@ import React from 'react';
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import type { IntlShape } from 'react-intl-next';
|
|
4
4
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
5
|
-
import type { CardPluginActions } from '@atlaskit/editor-common/card';
|
|
6
5
|
import type { CardAppearance } from '@atlaskit/editor-common/provider-factory';
|
|
7
6
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
8
7
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
@@ -18,7 +17,6 @@ export interface LinkToolbarAppearanceProps {
|
|
|
18
17
|
allowEmbeds?: boolean;
|
|
19
18
|
allowBlockCards?: boolean;
|
|
20
19
|
platform?: CardPlatform;
|
|
21
|
-
cardActions: CardPluginActions | undefined;
|
|
22
20
|
showUpgradeDiscoverability?: boolean;
|
|
23
21
|
isDatasourceView?: boolean;
|
|
24
22
|
}
|
|
@@ -2,7 +2,6 @@ import type { CardAppearance } from '@atlaskit/editor-common/provider-factory';
|
|
|
2
2
|
import type { Node, NodeType } from '@atlaskit/editor-prosemirror/model';
|
|
3
3
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
4
4
|
import type { CardContext } from '@atlaskit/link-provider';
|
|
5
|
-
import type { CardPlatform } from '@atlaskit/smart-card';
|
|
6
5
|
import type { CardInfo, DatasourceNode } from './types';
|
|
7
6
|
export declare const appearanceForNodeType: (spec: NodeType) => CardAppearance | undefined;
|
|
8
7
|
export declare const selectedCardAppearance: (state: EditorState) => CardAppearance | undefined;
|
|
@@ -23,7 +22,6 @@ export declare const isEmbedSupportedAtPosition: (currentNodePosition: number, e
|
|
|
23
22
|
export declare const isBlockSupportedAtPosition: (currentNodePosition: number, editorState: EditorState, currentAppearance?: CardAppearance) => boolean;
|
|
24
23
|
export declare const getResolvedAttributesFromStore: (url: string, display: string | null, store?: CardContext['store']) => {};
|
|
25
24
|
export declare const isDatasourceConfigEditable: (datasourceId: string) => boolean;
|
|
26
|
-
export declare const isEditDropdownEnabled: (platform?: CardPlatform) => boolean;
|
|
27
25
|
/**
|
|
28
26
|
* Typeguard that checks node attributes are datasource node attributes
|
|
29
27
|
* ** WARNING ** Typeguards are not a guarantee, if the asserted type changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-card",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "Card plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -35,17 +35,16 @@
|
|
|
35
35
|
"@atlaskit/adf-schema": "^36.10.7",
|
|
36
36
|
"@atlaskit/analytics-next": "^9.3.0",
|
|
37
37
|
"@atlaskit/custom-steps": "^0.2.0",
|
|
38
|
-
"@atlaskit/editor-common": "^
|
|
38
|
+
"@atlaskit/editor-common": "^82.0.0",
|
|
39
39
|
"@atlaskit/editor-plugin-analytics": "^1.2.0",
|
|
40
40
|
"@atlaskit/editor-plugin-decorations": "^1.1.0",
|
|
41
41
|
"@atlaskit/editor-plugin-editor-viewmode": "^1.1.0",
|
|
42
42
|
"@atlaskit/editor-plugin-feature-flags": "^1.1.0",
|
|
43
43
|
"@atlaskit/editor-plugin-floating-toolbar": "^1.4.0",
|
|
44
44
|
"@atlaskit/editor-plugin-grid": "^1.1.0",
|
|
45
|
-
"@atlaskit/editor-plugin-hyperlink": "^1.7.0",
|
|
46
45
|
"@atlaskit/editor-plugin-width": "^1.1.0",
|
|
47
46
|
"@atlaskit/editor-prosemirror": "4.0.1",
|
|
48
|
-
"@atlaskit/editor-shared-styles": "^2.
|
|
47
|
+
"@atlaskit/editor-shared-styles": "^2.12.0",
|
|
49
48
|
"@atlaskit/frontend-utilities": "^2.7.0",
|
|
50
49
|
"@atlaskit/icon": "^22.3.0",
|
|
51
50
|
"@atlaskit/link-analytics": "^8.3.0",
|
|
@@ -53,10 +52,10 @@
|
|
|
53
52
|
"@atlaskit/link-datasource": "^2.3.0",
|
|
54
53
|
"@atlaskit/linking-common": "^5.7.0",
|
|
55
54
|
"@atlaskit/linking-types": "^8.9.0",
|
|
56
|
-
"@atlaskit/menu": "2.
|
|
55
|
+
"@atlaskit/menu": "2.4.0",
|
|
57
56
|
"@atlaskit/platform-feature-flags": "^0.2.0",
|
|
58
|
-
"@atlaskit/primitives": "^6.
|
|
59
|
-
"@atlaskit/smart-card": "^27.
|
|
57
|
+
"@atlaskit/primitives": "^6.5.0",
|
|
58
|
+
"@atlaskit/smart-card": "^27.5.0",
|
|
60
59
|
"@atlaskit/theme": "^12.8.0",
|
|
61
60
|
"@atlaskit/tokens": "^1.49.0",
|
|
62
61
|
"@atlaskit/tooltip": "^18.4.0",
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.mountHyperlinkPlugin = void 0;
|
|
8
|
-
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
9
|
-
var _react = _interopRequireDefault(require("react"));
|
|
10
|
-
var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
|
|
11
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
12
|
-
var _toolbar = require("../toolbar");
|
|
13
|
-
var _HyperlinkToolbarAppearance = require("../ui/HyperlinkToolbarAppearance");
|
|
14
|
-
var _ToolbarViewedEvent = require("../ui/ToolbarViewedEvent");
|
|
15
|
-
var getToolbarViewedItem = function getToolbarViewedItem(link) {
|
|
16
|
-
return [{
|
|
17
|
-
type: 'custom',
|
|
18
|
-
fallback: [],
|
|
19
|
-
render: function render(editorView) {
|
|
20
|
-
return /*#__PURE__*/_react.default.createElement(_ToolbarViewedEvent.ToolbarViewedEvent, {
|
|
21
|
-
key: "edit.link.menu.viewed",
|
|
22
|
-
url: link,
|
|
23
|
-
display: "url",
|
|
24
|
-
editorView: editorView
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
}];
|
|
28
|
-
};
|
|
29
|
-
var mountHyperlinkPlugin = exports.mountHyperlinkPlugin = function mountHyperlinkPlugin(pluginInjectionApi, options) {
|
|
30
|
-
return new _safePlugin.SafePlugin({
|
|
31
|
-
view: function view(editorView) {
|
|
32
|
-
requestAnimationFrame(function () {
|
|
33
|
-
var _pluginInjectionApi$h, _pluginInjectionApi$c2, _pluginInjectionApi$c3;
|
|
34
|
-
pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$h = pluginInjectionApi.hyperlink) === null || _pluginInjectionApi$h === void 0 || (_pluginInjectionApi$h = _pluginInjectionApi$h.actions) === null || _pluginInjectionApi$h === void 0 || _pluginInjectionApi$h.prependToolbarButtons({
|
|
35
|
-
items: function items(state, intl, providerFactory, link) {
|
|
36
|
-
return [].concat((0, _toConsumableArray2.default)(getToolbarViewedItem(link)), [{
|
|
37
|
-
type: 'custom',
|
|
38
|
-
fallback: [],
|
|
39
|
-
render: function render(editorView) {
|
|
40
|
-
var _pluginInjectionApi$a, _pluginInjectionApi$c;
|
|
41
|
-
return /*#__PURE__*/_react.default.createElement(_HyperlinkToolbarAppearance.HyperlinkToolbarAppearance, {
|
|
42
|
-
key: "link-appearance",
|
|
43
|
-
url: link,
|
|
44
|
-
intl: intl,
|
|
45
|
-
editorView: editorView,
|
|
46
|
-
editorState: state,
|
|
47
|
-
cardOptions: options,
|
|
48
|
-
providerFactory: providerFactory,
|
|
49
|
-
platform: options === null || options === void 0 ? void 0 : options.platform,
|
|
50
|
-
editorAnalyticsApi: pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a === void 0 ? void 0 : _pluginInjectionApi$a.actions,
|
|
51
|
-
cardActions: pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$c = pluginInjectionApi.card) === null || _pluginInjectionApi$c === void 0 ? void 0 : _pluginInjectionApi$c.actions
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
}]);
|
|
55
|
-
},
|
|
56
|
-
onEscapeCallback: pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$c2 = pluginInjectionApi.card) === null || _pluginInjectionApi$c2 === void 0 ? void 0 : _pluginInjectionApi$c2.actions.hideLinkToolbar,
|
|
57
|
-
onInsertLinkCallback: pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$c3 = pluginInjectionApi.card) === null || _pluginInjectionApi$c3 === void 0 ? void 0 : _pluginInjectionApi$c3.actions.queueCardsFromChangedTr,
|
|
58
|
-
view: editorView,
|
|
59
|
-
skipAnalytics: true
|
|
60
|
-
});
|
|
61
|
-
if ((0, _platformFeatureFlags.getBooleanFF)('platform.editor.card.inject-settings-button')) {
|
|
62
|
-
/**
|
|
63
|
-
* Require either provider to be supplied (controls link preferences)
|
|
64
|
-
* Or explicit user preferences config in order to enable button
|
|
65
|
-
*/
|
|
66
|
-
if (options.provider || options.userPreferencesLink) {
|
|
67
|
-
var _pluginInjectionApi$h2;
|
|
68
|
-
pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$h2 = pluginInjectionApi.hyperlink) === null || _pluginInjectionApi$h2 === void 0 || _pluginInjectionApi$h2.actions.addToolbarItems({
|
|
69
|
-
items: function items(_, intl) {
|
|
70
|
-
var _pluginInjectionApi$a2;
|
|
71
|
-
return [{
|
|
72
|
-
type: 'separator'
|
|
73
|
-
}, (0, _toolbar.getHyperlinkToolbarSettingsButton)(intl, pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a2 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a2 === void 0 ? void 0 : _pluginInjectionApi$a2.actions, options.userPreferencesLink)];
|
|
74
|
-
},
|
|
75
|
-
placement: 'end',
|
|
76
|
-
view: editorView
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
});
|
|
81
|
-
return {};
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
|
-
};
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
4
|
-
import { getHyperlinkToolbarSettingsButton } from '../toolbar';
|
|
5
|
-
import { HyperlinkToolbarAppearance } from '../ui/HyperlinkToolbarAppearance';
|
|
6
|
-
import { ToolbarViewedEvent } from '../ui/ToolbarViewedEvent';
|
|
7
|
-
const getToolbarViewedItem = link => {
|
|
8
|
-
return [{
|
|
9
|
-
type: 'custom',
|
|
10
|
-
fallback: [],
|
|
11
|
-
render: editorView => /*#__PURE__*/React.createElement(ToolbarViewedEvent, {
|
|
12
|
-
key: "edit.link.menu.viewed",
|
|
13
|
-
url: link,
|
|
14
|
-
display: "url",
|
|
15
|
-
editorView: editorView
|
|
16
|
-
})
|
|
17
|
-
}];
|
|
18
|
-
};
|
|
19
|
-
export const mountHyperlinkPlugin = (pluginInjectionApi, options) => {
|
|
20
|
-
return new SafePlugin({
|
|
21
|
-
view(editorView) {
|
|
22
|
-
requestAnimationFrame(() => {
|
|
23
|
-
var _pluginInjectionApi$h, _pluginInjectionApi$h2, _pluginInjectionApi$c2, _pluginInjectionApi$c3;
|
|
24
|
-
pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$h = pluginInjectionApi.hyperlink) === null || _pluginInjectionApi$h === void 0 ? void 0 : (_pluginInjectionApi$h2 = _pluginInjectionApi$h.actions) === null || _pluginInjectionApi$h2 === void 0 ? void 0 : _pluginInjectionApi$h2.prependToolbarButtons({
|
|
25
|
-
items: (state, intl, providerFactory, link) => [...getToolbarViewedItem(link), {
|
|
26
|
-
type: 'custom',
|
|
27
|
-
fallback: [],
|
|
28
|
-
render: editorView => {
|
|
29
|
-
var _pluginInjectionApi$a, _pluginInjectionApi$c;
|
|
30
|
-
return /*#__PURE__*/React.createElement(HyperlinkToolbarAppearance, {
|
|
31
|
-
key: "link-appearance",
|
|
32
|
-
url: link,
|
|
33
|
-
intl: intl,
|
|
34
|
-
editorView: editorView,
|
|
35
|
-
editorState: state,
|
|
36
|
-
cardOptions: options,
|
|
37
|
-
providerFactory: providerFactory,
|
|
38
|
-
platform: options === null || options === void 0 ? void 0 : options.platform,
|
|
39
|
-
editorAnalyticsApi: pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$a = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a === void 0 ? void 0 : _pluginInjectionApi$a.actions,
|
|
40
|
-
cardActions: pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$c = pluginInjectionApi.card) === null || _pluginInjectionApi$c === void 0 ? void 0 : _pluginInjectionApi$c.actions
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
}],
|
|
44
|
-
onEscapeCallback: pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$c2 = pluginInjectionApi.card) === null || _pluginInjectionApi$c2 === void 0 ? void 0 : _pluginInjectionApi$c2.actions.hideLinkToolbar,
|
|
45
|
-
onInsertLinkCallback: pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$c3 = pluginInjectionApi.card) === null || _pluginInjectionApi$c3 === void 0 ? void 0 : _pluginInjectionApi$c3.actions.queueCardsFromChangedTr,
|
|
46
|
-
view: editorView,
|
|
47
|
-
skipAnalytics: true
|
|
48
|
-
});
|
|
49
|
-
if (getBooleanFF('platform.editor.card.inject-settings-button')) {
|
|
50
|
-
/**
|
|
51
|
-
* Require either provider to be supplied (controls link preferences)
|
|
52
|
-
* Or explicit user preferences config in order to enable button
|
|
53
|
-
*/
|
|
54
|
-
if (options.provider || options.userPreferencesLink) {
|
|
55
|
-
var _pluginInjectionApi$h3;
|
|
56
|
-
pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$h3 = pluginInjectionApi.hyperlink) === null || _pluginInjectionApi$h3 === void 0 ? void 0 : _pluginInjectionApi$h3.actions.addToolbarItems({
|
|
57
|
-
items: (_, intl) => {
|
|
58
|
-
var _pluginInjectionApi$a2;
|
|
59
|
-
return [{
|
|
60
|
-
type: 'separator'
|
|
61
|
-
}, getHyperlinkToolbarSettingsButton(intl, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$a2 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a2 === void 0 ? void 0 : _pluginInjectionApi$a2.actions, options.userPreferencesLink)];
|
|
62
|
-
},
|
|
63
|
-
placement: 'end',
|
|
64
|
-
view: editorView
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
-
return {};
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
};
|