@atlaskit/editor-plugin-card 7.3.0 → 7.4.0
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 +20 -0
- package/dist/cjs/nodeviews/blockCard.js +24 -6
- package/dist/cjs/nodeviews/embedCard.js +30 -8
- package/dist/cjs/nodeviews/inlineCard.js +1 -3
- package/dist/cjs/ui/OpenPreviewButton/index.js +78 -0
- package/dist/cjs/ui/toolbar.js +14 -2
- package/dist/es2019/nodeviews/blockCard.js +24 -6
- package/dist/es2019/nodeviews/embedCard.js +30 -8
- package/dist/es2019/nodeviews/inlineCard.js +1 -3
- package/dist/es2019/ui/OpenPreviewButton/index.js +73 -0
- package/dist/es2019/ui/toolbar.js +12 -2
- package/dist/esm/nodeviews/blockCard.js +24 -6
- package/dist/esm/nodeviews/embedCard.js +30 -8
- package/dist/esm/nodeviews/inlineCard.js +1 -3
- package/dist/esm/ui/OpenPreviewButton/index.js +71 -0
- package/dist/esm/ui/toolbar.js +14 -2
- package/dist/types/nodeviews/blockCard.d.ts +4 -4
- package/dist/types/nodeviews/datasource.d.ts +1 -1
- package/dist/types/nodeviews/embedCard.d.ts +5 -5
- package/dist/types/nodeviews/toDOM-fixes/blockCard.d.ts +18 -18
- package/dist/types/nodeviews/toDOM-fixes/embedCard.d.ts +18 -18
- package/dist/types/nodeviews/toDOM-fixes/inlineCard.d.ts +18 -18
- package/dist/types/pm-plugins/actions.d.ts +1 -1
- package/dist/types/pm-plugins/doc.d.ts +1 -1
- package/dist/types/pm-plugins/util/resolve.d.ts +1 -1
- package/dist/types/pm-plugins/util/state.d.ts +18 -18
- package/dist/types/pm-plugins/utils.d.ts +2 -5
- package/dist/types/types/index.d.ts +0 -1
- package/dist/types/ui/AwarenessWrapper/index.d.ts +0 -1
- package/dist/types/ui/ConfigureOverlay/index.d.ts +0 -1
- package/dist/types/ui/EditLinkToolbar.d.ts +1 -1
- package/dist/types/ui/HyperlinkToolbarAppearanceDropdown.d.ts +2 -2
- package/dist/types/ui/InlineCardOverlay/types.d.ts +0 -1
- package/dist/types/ui/LayoutButton/index.d.ts +0 -1
- package/dist/types/ui/LayoutButton/utils.d.ts +2 -1
- package/dist/types/ui/LinkToolbarAppearanceDropdown.d.ts +1 -1
- package/dist/types/ui/OpenPreviewButton/index.d.ts +11 -0
- package/dist/types/ui/ResizableEmbedCard.d.ts +1 -1
- package/dist/types/ui/ToolbarViewedEvent.d.ts +1 -1
- package/dist/types-ts4.5/nodeviews/blockCard.d.ts +4 -4
- package/dist/types-ts4.5/nodeviews/datasource.d.ts +1 -1
- package/dist/types-ts4.5/nodeviews/embedCard.d.ts +5 -5
- package/dist/types-ts4.5/nodeviews/toDOM-fixes/blockCard.d.ts +18 -18
- package/dist/types-ts4.5/nodeviews/toDOM-fixes/embedCard.d.ts +18 -18
- package/dist/types-ts4.5/nodeviews/toDOM-fixes/inlineCard.d.ts +18 -18
- package/dist/types-ts4.5/pm-plugins/actions.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/doc.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/util/resolve.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/util/state.d.ts +18 -18
- package/dist/types-ts4.5/pm-plugins/utils.d.ts +2 -5
- package/dist/types-ts4.5/types/index.d.ts +0 -1
- package/dist/types-ts4.5/ui/AwarenessWrapper/index.d.ts +0 -1
- package/dist/types-ts4.5/ui/ConfigureOverlay/index.d.ts +0 -1
- package/dist/types-ts4.5/ui/EditLinkToolbar.d.ts +1 -1
- package/dist/types-ts4.5/ui/HyperlinkToolbarAppearanceDropdown.d.ts +2 -2
- package/dist/types-ts4.5/ui/InlineCardOverlay/types.d.ts +0 -1
- package/dist/types-ts4.5/ui/LayoutButton/index.d.ts +0 -1
- package/dist/types-ts4.5/ui/LayoutButton/utils.d.ts +2 -1
- package/dist/types-ts4.5/ui/LinkToolbarAppearanceDropdown.d.ts +1 -1
- package/dist/types-ts4.5/ui/OpenPreviewButton/index.d.ts +11 -0
- package/dist/types-ts4.5/ui/ResizableEmbedCard.d.ts +1 -1
- package/dist/types-ts4.5/ui/ToolbarViewedEvent.d.ts +1 -1
- package/package.json +6 -6
|
@@ -15,6 +15,8 @@ import ReactNodeView from '@atlaskit/editor-common/react-node-view';
|
|
|
15
15
|
import { findOverflowScrollParent, UnsupportedBlock } from '@atlaskit/editor-common/ui';
|
|
16
16
|
import { browser, canRenderDatasource } from '@atlaskit/editor-common/utils';
|
|
17
17
|
import { Card as SmartCard } from '@atlaskit/smart-card';
|
|
18
|
+
import { CardSSR } from '@atlaskit/smart-card/ssr';
|
|
19
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
18
20
|
import { Datasource } from '../nodeviews/datasource';
|
|
19
21
|
import { registerCard, removeCard as _removeCard } from '../pm-plugins/actions';
|
|
20
22
|
import { isDatasourceNode } from '../pm-plugins/utils';
|
|
@@ -103,11 +105,23 @@ export var BlockCardComponent = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
103
105
|
cardContext = _this$props2.cardContext,
|
|
104
106
|
actionOptions = _this$props2.actionOptions,
|
|
105
107
|
onClick = _this$props2.onClick,
|
|
106
|
-
CompetitorPrompt = _this$props2.CompetitorPrompt
|
|
108
|
+
CompetitorPrompt = _this$props2.CompetitorPrompt,
|
|
109
|
+
isPageSSRed = _this$props2.isPageSSRed;
|
|
107
110
|
var _node$attrs = node.attrs,
|
|
108
111
|
url = _node$attrs.url,
|
|
109
112
|
data = _node$attrs.data;
|
|
110
|
-
var cardInner = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(
|
|
113
|
+
var cardInner = isPageSSRed && expValEquals('platform_editor_smart_card_otp', 'isEnabled', true) ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CardSSR, {
|
|
114
|
+
key: url,
|
|
115
|
+
url: url !== null && url !== void 0 ? url : data.url,
|
|
116
|
+
container: this.scrollContainer,
|
|
117
|
+
appearance: "block",
|
|
118
|
+
onClick: onClick,
|
|
119
|
+
onResolve: this.onResolve,
|
|
120
|
+
onError: this.onError,
|
|
121
|
+
platform: 'web',
|
|
122
|
+
actionOptions: actionOptions,
|
|
123
|
+
CompetitorPrompt: CompetitorPrompt
|
|
124
|
+
}), this.gapCursorSpan()) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(SmartCard, {
|
|
111
125
|
key: url,
|
|
112
126
|
url: url !== null && url !== void 0 ? url : data.url,
|
|
113
127
|
container: this.scrollContainer,
|
|
@@ -185,7 +199,8 @@ export var BlockCard = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
185
199
|
actionOptions = _this$reactComponentP3.actionOptions,
|
|
186
200
|
pluginInjectionApi = _this$reactComponentP3.pluginInjectionApi,
|
|
187
201
|
onClickCallback = _this$reactComponentP3.onClickCallback,
|
|
188
|
-
CompetitorPrompt = _this$reactComponentP3.CompetitorPrompt
|
|
202
|
+
CompetitorPrompt = _this$reactComponentP3.CompetitorPrompt,
|
|
203
|
+
isPageSSRed = _this$reactComponentP3.isPageSSRed;
|
|
189
204
|
return /*#__PURE__*/React.createElement(WrappedBlockCard, {
|
|
190
205
|
node: this.node,
|
|
191
206
|
view: this.view,
|
|
@@ -194,7 +209,8 @@ export var BlockCard = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
194
209
|
pluginInjectionApi: pluginInjectionApi,
|
|
195
210
|
onClickCallback: onClickCallback,
|
|
196
211
|
id: this.id,
|
|
197
|
-
CompetitorPrompt: CompetitorPrompt
|
|
212
|
+
CompetitorPrompt: CompetitorPrompt,
|
|
213
|
+
isPageSSRed: isPageSSRed
|
|
198
214
|
});
|
|
199
215
|
}
|
|
200
216
|
}, {
|
|
@@ -213,7 +229,8 @@ export var blockCardNodeView = function blockCardNodeView(_ref3) {
|
|
|
213
229
|
onClickCallback = _ref3.onClickCallback,
|
|
214
230
|
allowDatasource = _ref3.allowDatasource,
|
|
215
231
|
inlineCardViewProducer = _ref3.inlineCardViewProducer,
|
|
216
|
-
CompetitorPrompt = _ref3.CompetitorPrompt
|
|
232
|
+
CompetitorPrompt = _ref3.CompetitorPrompt,
|
|
233
|
+
isPageSSRed = _ref3.isPageSSRed;
|
|
217
234
|
return function (node, view, getPos, decorations) {
|
|
218
235
|
var portalProviderAPI = pmPluginFactoryParams.portalProviderAPI,
|
|
219
236
|
eventDispatcher = pmPluginFactoryParams.eventDispatcher;
|
|
@@ -221,7 +238,8 @@ export var blockCardNodeView = function blockCardNodeView(_ref3) {
|
|
|
221
238
|
actionOptions: actionOptions,
|
|
222
239
|
pluginInjectionApi: pluginInjectionApi,
|
|
223
240
|
onClickCallback: onClickCallback,
|
|
224
|
-
CompetitorPrompt: CompetitorPrompt
|
|
241
|
+
CompetitorPrompt: CompetitorPrompt,
|
|
242
|
+
isPageSSRed: isPageSSRed
|
|
225
243
|
};
|
|
226
244
|
var isDatasource = isDatasourceNode(node);
|
|
227
245
|
if (isDatasource) {
|
|
@@ -23,6 +23,7 @@ import { floatingLayouts, isRichMediaInsideOfBlockNode } from '@atlaskit/editor-
|
|
|
23
23
|
import { akEditorFullPageNarrowBreakout, DEFAULT_EMBED_CARD_HEIGHT, DEFAULT_EMBED_CARD_WIDTH } from '@atlaskit/editor-shared-styles';
|
|
24
24
|
import { componentWithCondition } from '@atlaskit/platform-feature-flags-react';
|
|
25
25
|
import { EmbedResizeMessageListener, Card as SmartCard } from '@atlaskit/smart-card';
|
|
26
|
+
import { CardSSR } from '@atlaskit/smart-card/ssr';
|
|
26
27
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
27
28
|
import { registerCard, removeCard as _removeCard } from '../pm-plugins/actions';
|
|
28
29
|
import ResizableEmbedCard from '../ui/ResizableEmbedCard';
|
|
@@ -304,7 +305,8 @@ export var EmbedCardComponent = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
304
305
|
pluginInjectionApi = _this$props.pluginInjectionApi,
|
|
305
306
|
actionOptions = _this$props.actionOptions,
|
|
306
307
|
onClick = _this$props.onClick,
|
|
307
|
-
CompetitorPrompt = _this$props.CompetitorPrompt
|
|
308
|
+
CompetitorPrompt = _this$props.CompetitorPrompt,
|
|
309
|
+
isPageSSRed = _this$props.isPageSSRed;
|
|
308
310
|
var _node$attrs = node.attrs,
|
|
309
311
|
url = _node$attrs.url,
|
|
310
312
|
pctWidth = _node$attrs.width,
|
|
@@ -331,7 +333,21 @@ export var EmbedCardComponent = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
331
333
|
pctWidth: pctWidth,
|
|
332
334
|
fullWidthMode: fullWidthMode
|
|
333
335
|
};
|
|
334
|
-
var smartCard = /*#__PURE__*/React.createElement(
|
|
336
|
+
var smartCard = isPageSSRed && expValEquals('platform_editor_smart_card_otp', 'isEnabled', true) ? /*#__PURE__*/React.createElement(CardSSR, {
|
|
337
|
+
key: url,
|
|
338
|
+
url: url,
|
|
339
|
+
appearance: "embed",
|
|
340
|
+
onClick: onClick,
|
|
341
|
+
onResolve: this.onResolve,
|
|
342
|
+
onError: this.onError,
|
|
343
|
+
frameStyle: "show",
|
|
344
|
+
inheritDimensions: true,
|
|
345
|
+
platform: 'web',
|
|
346
|
+
container: this.scrollContainer,
|
|
347
|
+
embedIframeRef: this.embedIframeRef,
|
|
348
|
+
actionOptions: actionOptions,
|
|
349
|
+
CompetitorPrompt: CompetitorPrompt
|
|
350
|
+
}) : /*#__PURE__*/React.createElement(SmartCard, {
|
|
335
351
|
key: url,
|
|
336
352
|
url: url,
|
|
337
353
|
appearance: "embed",
|
|
@@ -388,7 +404,8 @@ export var EmbedOrBlockCardComponent = function EmbedOrBlockCardComponent(props)
|
|
|
388
404
|
smartCard: props.smartCard,
|
|
389
405
|
hasPreview: props.hasPreview,
|
|
390
406
|
liveHeight: props.liveHeight,
|
|
391
|
-
initialAspectRatio: props.initialAspectRatio
|
|
407
|
+
initialAspectRatio: props.initialAspectRatio,
|
|
408
|
+
isPageSSRed: props.isPageSSRed
|
|
392
409
|
}) : /*#__PURE__*/React.createElement(EmbedCardComponent, {
|
|
393
410
|
id: props.id,
|
|
394
411
|
node: props.node,
|
|
@@ -406,7 +423,8 @@ export var EmbedOrBlockCardComponent = function EmbedOrBlockCardComponent(props)
|
|
|
406
423
|
smartCard: props.smartCard,
|
|
407
424
|
hasPreview: props.hasPreview,
|
|
408
425
|
liveHeight: props.liveHeight,
|
|
409
|
-
initialAspectRatio: props.initialAspectRatio
|
|
426
|
+
initialAspectRatio: props.initialAspectRatio,
|
|
427
|
+
isPageSSRed: props.isPageSSRed
|
|
410
428
|
});
|
|
411
429
|
};
|
|
412
430
|
var WrappedEmbedCardWithCondition = componentWithCondition(function () {
|
|
@@ -462,7 +480,8 @@ export var EmbedCard = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
462
480
|
dispatchAnalyticsEvent = _this$reactComponentP3.dispatchAnalyticsEvent,
|
|
463
481
|
pluginInjectionApi = _this$reactComponentP3.pluginInjectionApi,
|
|
464
482
|
onClickCallback = _this$reactComponentP3.onClickCallback,
|
|
465
|
-
CompetitorPrompt = _this$reactComponentP3.CompetitorPrompt
|
|
483
|
+
CompetitorPrompt = _this$reactComponentP3.CompetitorPrompt,
|
|
484
|
+
isPageSSRed = _this$reactComponentP3.isPageSSRed;
|
|
466
485
|
return /*#__PURE__*/React.createElement(WrappedEmbedCard, {
|
|
467
486
|
node: this.node,
|
|
468
487
|
view: this.view,
|
|
@@ -474,7 +493,8 @@ export var EmbedCard = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
474
493
|
pluginInjectionApi: pluginInjectionApi,
|
|
475
494
|
onClickCallback: onClickCallback,
|
|
476
495
|
id: this.id,
|
|
477
|
-
CompetitorPrompt: CompetitorPrompt
|
|
496
|
+
CompetitorPrompt: CompetitorPrompt,
|
|
497
|
+
isPageSSRed: isPageSSRed
|
|
478
498
|
});
|
|
479
499
|
}
|
|
480
500
|
}, {
|
|
@@ -493,7 +513,8 @@ export var embedCardNodeView = function embedCardNodeView(_ref4) {
|
|
|
493
513
|
pluginInjectionApi = _ref4.pluginInjectionApi,
|
|
494
514
|
actionOptions = _ref4.actionOptions,
|
|
495
515
|
onClickCallback = _ref4.onClickCallback,
|
|
496
|
-
CompetitorPrompt = _ref4.CompetitorPrompt
|
|
516
|
+
CompetitorPrompt = _ref4.CompetitorPrompt,
|
|
517
|
+
isPageSSRed = _ref4.isPageSSRed;
|
|
497
518
|
return function (node, view, getPos) {
|
|
498
519
|
var portalProviderAPI = pmPluginFactoryParams.portalProviderAPI,
|
|
499
520
|
eventDispatcher = pmPluginFactoryParams.eventDispatcher,
|
|
@@ -506,7 +527,8 @@ export var embedCardNodeView = function embedCardNodeView(_ref4) {
|
|
|
506
527
|
pluginInjectionApi: pluginInjectionApi,
|
|
507
528
|
actionOptions: actionOptions,
|
|
508
529
|
onClickCallback: onClickCallback,
|
|
509
|
-
CompetitorPrompt: CompetitorPrompt
|
|
530
|
+
CompetitorPrompt: CompetitorPrompt,
|
|
531
|
+
isPageSSRed: isPageSSRed
|
|
510
532
|
};
|
|
511
533
|
return new EmbedCard(node, view, getPos, portalProviderAPI, eventDispatcher, reactComponentProps, undefined).init();
|
|
512
534
|
};
|
|
@@ -8,7 +8,6 @@ import { UnsupportedInline, findOverflowScrollParent } from '@atlaskit/editor-co
|
|
|
8
8
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
9
|
import { Card as SmartCard } from '@atlaskit/smart-card';
|
|
10
10
|
import { CardSSR } from '@atlaskit/smart-card/ssr';
|
|
11
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
12
11
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
13
12
|
import { registerCard, removeCard } from '../pm-plugins/actions';
|
|
14
13
|
import { getAwarenessProps } from '../pm-plugins/utils';
|
|
@@ -100,8 +99,7 @@ export var InlineCard = /*#__PURE__*/memo(function (_ref) {
|
|
|
100
99
|
exposure: true
|
|
101
100
|
}) ? handleOnClick : propsOnClick;
|
|
102
101
|
var card = useMemo(function () {
|
|
103
|
-
|
|
104
|
-
if (isPageSSRed && url && !expValEquals('platform_editor_smart_card_otp', 'isEnabled', true)) {
|
|
102
|
+
if (isPageSSRed && url) {
|
|
105
103
|
return /*#__PURE__*/React.createElement(CardSSR, {
|
|
106
104
|
key: url,
|
|
107
105
|
url: url,
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { linkMessages } from '@atlaskit/editor-common/messages';
|
|
3
|
+
import { areToolbarFlagsEnabled } from '@atlaskit/editor-common/toolbar-flag-check';
|
|
4
|
+
import { FloatingToolbarButton as Button } from '@atlaskit/editor-common/ui';
|
|
5
|
+
import PanelRightIcon from '@atlaskit/icon/core/panel-right';
|
|
6
|
+
import { useSmartLinkContext } from '@atlaskit/link-provider';
|
|
7
|
+
import { Inline, Box, Flex } from '@atlaskit/primitives/compiled';
|
|
8
|
+
import { getObjectAri, getObjectIconUrl, getObjectName } from '@atlaskit/smart-card';
|
|
9
|
+
export var OpenPreviewPanelToolbarButton = function OpenPreviewPanelToolbarButton(_ref) {
|
|
10
|
+
var node = _ref.node,
|
|
11
|
+
intl = _ref.intl;
|
|
12
|
+
var _useSmartLinkContext = useSmartLinkContext(),
|
|
13
|
+
store = _useSmartLinkContext.store,
|
|
14
|
+
isPreviewPanelAvailable = _useSmartLinkContext.isPreviewPanelAvailable,
|
|
15
|
+
openPreviewPanel = _useSmartLinkContext.openPreviewPanel;
|
|
16
|
+
var url = node.attrs.url;
|
|
17
|
+
var cardState = store === null || store === void 0 ? void 0 : store.getState()[url];
|
|
18
|
+
if (cardState) {
|
|
19
|
+
var ari = getObjectAri(cardState.details);
|
|
20
|
+
var name = getObjectName(cardState.details);
|
|
21
|
+
var iconUrl = getObjectIconUrl(cardState.details);
|
|
22
|
+
var isPanelAvailable = ari && (isPreviewPanelAvailable === null || isPreviewPanelAvailable === void 0 ? void 0 : isPreviewPanelAvailable({
|
|
23
|
+
ari: ari
|
|
24
|
+
}));
|
|
25
|
+
var handleOpenGlancePanelClick = function handleOpenGlancePanelClick() {
|
|
26
|
+
if (openPreviewPanel && isPanelAvailable) {
|
|
27
|
+
openPreviewPanel({
|
|
28
|
+
url: url,
|
|
29
|
+
ari: ari,
|
|
30
|
+
name: name || '',
|
|
31
|
+
iconUrl: iconUrl
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
var title = intl.formatMessage(linkMessages.openPreviewPanel);
|
|
36
|
+
var icon = areToolbarFlagsEnabled() ? /*#__PURE__*/React.createElement(PanelRightIcon, {
|
|
37
|
+
label: "",
|
|
38
|
+
spacing: "spacious"
|
|
39
|
+
}) :
|
|
40
|
+
/*#__PURE__*/
|
|
41
|
+
// This is a hack required for Jira until areToolbarFlagsEnabled are enabled to ensure the icon has padding
|
|
42
|
+
// Padding is removed when areToolbarFlagsEnabed for a button with icon only in platform/packages/editor/editor-common/src/ui/FloatingToolbar/Button.tsx
|
|
43
|
+
React.createElement(Inline, {
|
|
44
|
+
as: "span",
|
|
45
|
+
space: "space.050",
|
|
46
|
+
alignBlock: "center"
|
|
47
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
48
|
+
as: "span",
|
|
49
|
+
"aria-hidden": true,
|
|
50
|
+
role: "presentation"
|
|
51
|
+
}), /*#__PURE__*/React.createElement(PanelRightIcon, {
|
|
52
|
+
label: "",
|
|
53
|
+
spacing: "spacious"
|
|
54
|
+
}), /*#__PURE__*/React.createElement(Box, {
|
|
55
|
+
as: "span",
|
|
56
|
+
"aria-hidden": true,
|
|
57
|
+
role: "presentation"
|
|
58
|
+
}));
|
|
59
|
+
if (openPreviewPanel && isPanelAvailable) {
|
|
60
|
+
return /*#__PURE__*/React.createElement(Flex, {
|
|
61
|
+
gap: "space.050"
|
|
62
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
63
|
+
testId: "open-preview-panel-floating-toolbar-button",
|
|
64
|
+
onClick: handleOpenGlancePanelClick,
|
|
65
|
+
icon: icon,
|
|
66
|
+
title: title
|
|
67
|
+
}));
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
return null;
|
|
71
|
+
};
|
package/dist/esm/ui/toolbar.js
CHANGED
|
@@ -39,6 +39,7 @@ import { HyperlinkToolbarAppearance } from './HyperlinkToolbarAppearance';
|
|
|
39
39
|
import { getCustomHyperlinkAppearanceDropdown } from './HyperlinkToolbarAppearanceDropdown';
|
|
40
40
|
import { LinkToolbarAppearance } from './LinkToolbarAppearance';
|
|
41
41
|
import { getLinkAppearanceDropdown } from './LinkToolbarAppearanceDropdown';
|
|
42
|
+
import { OpenPreviewPanelToolbarButton } from './OpenPreviewButton';
|
|
42
43
|
import { ToolbarViewedEvent } from './ToolbarViewedEvent';
|
|
43
44
|
export var removeCard = function removeCard(editorAnalyticsApi) {
|
|
44
45
|
return commandWithMetadata(function (state, dispatch) {
|
|
@@ -321,7 +322,18 @@ var generateToolbarItems = function generateToolbarItems(state, intl, providerFa
|
|
|
321
322
|
testId: 'link-toolbar-edit-link-button',
|
|
322
323
|
onClick: getEditLinkCallback(editorAnalyticsApi, true)
|
|
323
324
|
}];
|
|
324
|
-
var
|
|
325
|
+
var openPreviewPanelItems = fg('platform_editor_preview_panel_linking') ? [{
|
|
326
|
+
type: 'custom',
|
|
327
|
+
fallback: [],
|
|
328
|
+
render: function render() {
|
|
329
|
+
return /*#__PURE__*/React.createElement(OpenPreviewPanelToolbarButton, {
|
|
330
|
+
node: node,
|
|
331
|
+
intl: intl,
|
|
332
|
+
editorAnalyticsApi: editorAnalyticsApi
|
|
333
|
+
});
|
|
334
|
+
}
|
|
335
|
+
}] : [];
|
|
336
|
+
var toolbarItems = isNewEditorToolbarDisabled ? [].concat(editItems, commentItems, openPreviewPanelItems, [{
|
|
325
337
|
id: 'editor.link.openLink',
|
|
326
338
|
type: 'button',
|
|
327
339
|
icon: LinkExternalIcon,
|
|
@@ -358,7 +370,7 @@ var generateToolbarItems = function generateToolbarItems(state, intl, providerFa
|
|
|
358
370
|
onBlur: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(node.type, false),
|
|
359
371
|
title: intl.formatMessage(commonMessages.remove),
|
|
360
372
|
onClick: withToolbarMetadata(removeCard(editorAnalyticsApi))
|
|
361
|
-
}]) : [].concat(editButtonItems, _toConsumableArray(fg('platform_editor_controls_patch_15') ? [].concat(_toConsumableArray(getUnlinkButtonGroup(state, intl, node, inlineCard, editorAnalyticsApi)), [{
|
|
373
|
+
}]) : [].concat(openPreviewPanelItems, editButtonItems, _toConsumableArray(fg('platform_editor_controls_patch_15') ? [].concat(_toConsumableArray(getUnlinkButtonGroup(state, intl, node, inlineCard, editorAnalyticsApi)), [{
|
|
362
374
|
type: 'separator',
|
|
363
375
|
fullHeight: true
|
|
364
376
|
}]) : getUnlinkButtonGroup(state, intl, node, inlineCard, editorAnalyticsApi)), [{
|
|
@@ -13,15 +13,15 @@ export declare class BlockCardComponent extends React.PureComponent<SmartCardPro
|
|
|
13
13
|
id?: string;
|
|
14
14
|
});
|
|
15
15
|
onResolve: (data: {
|
|
16
|
-
url?: string
|
|
17
|
-
title?: string
|
|
16
|
+
url?: string;
|
|
17
|
+
title?: string;
|
|
18
18
|
}) => void;
|
|
19
19
|
componentWillUnmount(): void;
|
|
20
20
|
private removeCardDispatched;
|
|
21
21
|
private removeCard;
|
|
22
22
|
gapCursorSpan: () => React.JSX.Element | undefined;
|
|
23
23
|
onError: ({ err }: {
|
|
24
|
-
err?: Error
|
|
24
|
+
err?: Error;
|
|
25
25
|
}) => void;
|
|
26
26
|
render(): React.JSX.Element;
|
|
27
27
|
}
|
|
@@ -49,4 +49,4 @@ export interface BlockCardNodeViewProperties {
|
|
|
49
49
|
linkType?: string;
|
|
50
50
|
}>;
|
|
51
51
|
}
|
|
52
|
-
export declare const blockCardNodeView: ({ pmPluginFactoryParams, actionOptions, pluginInjectionApi, onClickCallback, allowDatasource, inlineCardViewProducer, CompetitorPrompt, }: BlockCardNodeViewProperties) => (node: Node, view: EditorView, getPos: () => number | undefined, decorations: readonly Decoration[]) => import("prosemirror-view").NodeView | Datasource | BlockCard;
|
|
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;
|
|
@@ -32,7 +32,7 @@ export declare class DatasourceComponent extends React.PureComponent<DatasourceC
|
|
|
32
32
|
handleColumnResize: (key: string, width: number) => void;
|
|
33
33
|
handleWrappedColumnChange: (key: string, shouldWrap: boolean) => void;
|
|
34
34
|
onError: ({ err }: {
|
|
35
|
-
err?: Error
|
|
35
|
+
err?: Error;
|
|
36
36
|
}) => void;
|
|
37
37
|
private getColumnsInfo;
|
|
38
38
|
render(): jsx.JSX.Element | null;
|
|
@@ -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
|
-
aspectRatio?: number
|
|
25
|
+
url?: string;
|
|
26
|
+
title?: string;
|
|
27
|
+
aspectRatio?: number;
|
|
28
28
|
}) => void;
|
|
29
29
|
updateSize: (pctWidth: number | null, layout: RichMediaLayout) => true | undefined;
|
|
30
30
|
private getLineLength;
|
|
@@ -36,7 +36,7 @@ export declare class EmbedCardComponent extends React.PureComponent<SmartCardPro
|
|
|
36
36
|
saveOriginalDimensionsAttributes: (height: number, width: number | undefined) => void;
|
|
37
37
|
onHeightUpdate: (height: number) => void;
|
|
38
38
|
onError: ({ err }: {
|
|
39
|
-
err?: Error
|
|
39
|
+
err?: Error;
|
|
40
40
|
}) => void;
|
|
41
41
|
componentWillUnmount(): void;
|
|
42
42
|
private removeCardDispatched;
|
|
@@ -64,4 +64,4 @@ export interface EmbedCardNodeViewProperties {
|
|
|
64
64
|
isPageSSRed: EmbedCardNodeViewProps['isPageSSRed'];
|
|
65
65
|
CompetitorPrompt?: EmbedCardNodeViewProps['CompetitorPrompt'];
|
|
66
66
|
}
|
|
67
|
-
export declare const embedCardNodeView: ({ allowResizing, fullWidthMode, pmPluginFactoryParams, pluginInjectionApi, actionOptions, onClickCallback, CompetitorPrompt, }: EmbedCardNodeViewProperties) => (node: PMNode, view: EditorView, getPos: () => number | undefined) => EmbedCard;
|
|
67
|
+
export declare const embedCardNodeView: ({ allowResizing, fullWidthMode, pmPluginFactoryParams, pluginInjectionApi, actionOptions, onClickCallback, CompetitorPrompt, isPageSSRed, }: EmbedCardNodeViewProperties) => (node: PMNode, view: EditorView, getPos: () => number | undefined) => EmbedCard;
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import type { DOMOutputSpec, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
export declare const blockCardSpecWithFixedToDOM: () => {
|
|
3
3
|
toDOM: (node: PMNode) => DOMOutputSpec;
|
|
4
|
-
content?: string
|
|
5
|
-
marks?: string
|
|
6
|
-
group?: string
|
|
7
|
-
inline?: boolean
|
|
8
|
-
atom?: boolean
|
|
4
|
+
content?: string;
|
|
5
|
+
marks?: string;
|
|
6
|
+
group?: string;
|
|
7
|
+
inline?: boolean;
|
|
8
|
+
atom?: boolean;
|
|
9
9
|
attrs?: {
|
|
10
10
|
[name: string]: import("prosemirror-model").AttributeSpec;
|
|
11
|
-
}
|
|
12
|
-
selectable?: boolean
|
|
13
|
-
draggable?: boolean
|
|
14
|
-
code?: boolean
|
|
15
|
-
whitespace?: "pre" | "normal"
|
|
16
|
-
definingAsContext?: boolean
|
|
17
|
-
definingForContent?: boolean
|
|
18
|
-
defining?: boolean
|
|
19
|
-
isolating?: boolean
|
|
20
|
-
parseDOM?: readonly import("prosemirror-model").TagParseRule[]
|
|
21
|
-
toDebugString?: (
|
|
22
|
-
leafText?: (
|
|
23
|
-
linebreakReplacement?: boolean
|
|
11
|
+
};
|
|
12
|
+
selectable?: boolean;
|
|
13
|
+
draggable?: boolean;
|
|
14
|
+
code?: boolean;
|
|
15
|
+
whitespace?: "pre" | "normal";
|
|
16
|
+
definingAsContext?: boolean;
|
|
17
|
+
definingForContent?: boolean;
|
|
18
|
+
defining?: boolean;
|
|
19
|
+
isolating?: boolean;
|
|
20
|
+
parseDOM?: readonly import("prosemirror-model").TagParseRule[];
|
|
21
|
+
toDebugString?: (node: PMNode) => string;
|
|
22
|
+
leafText?: (node: PMNode) => string;
|
|
23
|
+
linebreakReplacement?: boolean;
|
|
24
24
|
};
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import type { DOMOutputSpec, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
export declare const embedCardSpecWithFixedToDOM: () => {
|
|
3
3
|
toDOM: (node: PMNode) => DOMOutputSpec;
|
|
4
|
-
content?: string
|
|
5
|
-
marks?: string
|
|
6
|
-
group?: string
|
|
7
|
-
inline?: boolean
|
|
8
|
-
atom?: boolean
|
|
4
|
+
content?: string;
|
|
5
|
+
marks?: string;
|
|
6
|
+
group?: string;
|
|
7
|
+
inline?: boolean;
|
|
8
|
+
atom?: boolean;
|
|
9
9
|
attrs?: {
|
|
10
10
|
[name: string]: import("prosemirror-model").AttributeSpec;
|
|
11
|
-
}
|
|
12
|
-
selectable?: boolean
|
|
13
|
-
draggable?: boolean
|
|
14
|
-
code?: boolean
|
|
15
|
-
whitespace?: "pre" | "normal"
|
|
16
|
-
definingAsContext?: boolean
|
|
17
|
-
definingForContent?: boolean
|
|
18
|
-
defining?: boolean
|
|
19
|
-
isolating?: boolean
|
|
20
|
-
parseDOM?: readonly import("prosemirror-model").TagParseRule[]
|
|
21
|
-
toDebugString?: (
|
|
22
|
-
leafText?: (
|
|
23
|
-
linebreakReplacement?: boolean
|
|
11
|
+
};
|
|
12
|
+
selectable?: boolean;
|
|
13
|
+
draggable?: boolean;
|
|
14
|
+
code?: boolean;
|
|
15
|
+
whitespace?: "pre" | "normal";
|
|
16
|
+
definingAsContext?: boolean;
|
|
17
|
+
definingForContent?: boolean;
|
|
18
|
+
defining?: boolean;
|
|
19
|
+
isolating?: boolean;
|
|
20
|
+
parseDOM?: readonly import("prosemirror-model").TagParseRule[];
|
|
21
|
+
toDebugString?: (node: PMNode) => string;
|
|
22
|
+
leafText?: (node: PMNode) => string;
|
|
23
|
+
linebreakReplacement?: boolean;
|
|
24
24
|
};
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import type { DOMOutputSpec, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
export declare const inlineCardSpecWithFixedToDOM: () => {
|
|
3
3
|
toDOM: (node: PMNode) => DOMOutputSpec;
|
|
4
|
-
content?: string
|
|
5
|
-
marks?: string
|
|
6
|
-
group?: string
|
|
7
|
-
inline?: boolean
|
|
8
|
-
atom?: boolean
|
|
4
|
+
content?: string;
|
|
5
|
+
marks?: string;
|
|
6
|
+
group?: string;
|
|
7
|
+
inline?: boolean;
|
|
8
|
+
atom?: boolean;
|
|
9
9
|
attrs?: {
|
|
10
10
|
[name: string]: import("prosemirror-model").AttributeSpec;
|
|
11
|
-
}
|
|
12
|
-
selectable?: boolean
|
|
13
|
-
draggable?: boolean
|
|
14
|
-
code?: boolean
|
|
15
|
-
whitespace?: "pre" | "normal"
|
|
16
|
-
definingAsContext?: boolean
|
|
17
|
-
definingForContent?: boolean
|
|
18
|
-
defining?: boolean
|
|
19
|
-
isolating?: boolean
|
|
20
|
-
parseDOM?: readonly import("prosemirror-model").TagParseRule[]
|
|
21
|
-
toDebugString?: (
|
|
22
|
-
leafText?: (
|
|
23
|
-
linebreakReplacement?: boolean
|
|
11
|
+
};
|
|
12
|
+
selectable?: boolean;
|
|
13
|
+
draggable?: boolean;
|
|
14
|
+
code?: boolean;
|
|
15
|
+
whitespace?: "pre" | "normal";
|
|
16
|
+
definingAsContext?: boolean;
|
|
17
|
+
definingForContent?: boolean;
|
|
18
|
+
defining?: boolean;
|
|
19
|
+
isolating?: boolean;
|
|
20
|
+
parseDOM?: readonly import("prosemirror-model").TagParseRule[];
|
|
21
|
+
toDebugString?: (node: PMNode) => string;
|
|
22
|
+
leafText?: (node: PMNode) => string;
|
|
23
|
+
linebreakReplacement?: boolean;
|
|
24
24
|
};
|
|
@@ -17,7 +17,7 @@ export declare const setDatasourceTableRef: (datasourceTableRef?: HTMLElement) =
|
|
|
17
17
|
export declare const setCardLayout: (layout: DatasourceTableLayout) => (tr: Transaction) => Transaction;
|
|
18
18
|
export declare const setCardLayoutAndDatasourceTableRef: ({ layout, datasourceTableRef, }: {
|
|
19
19
|
layout: DatasourceTableLayout;
|
|
20
|
-
datasourceTableRef?: HTMLElement
|
|
20
|
+
datasourceTableRef?: HTMLElement;
|
|
21
21
|
}) => (tr: Transaction) => Transaction;
|
|
22
22
|
export declare const showLinkToolbar: (tr: Transaction) => Transaction;
|
|
23
23
|
export declare const hideLinkToolbar: (tr: Transaction) => Transaction;
|
|
@@ -12,7 +12,7 @@ import type { Request } from '../types';
|
|
|
12
12
|
export declare const replaceQueuedUrlWithCard: (url: string, cardData: CardAdf | DatasourceAdf, analyticsAction?: ACTION, editorAnalyticsApi?: EditorAnalyticsAPI, createAnalyticsEvent?: CreateUIAnalyticsEvent) => Command;
|
|
13
13
|
export declare const handleFallbackWithAnalytics: (request: Request, editorAnalyticsApi: EditorAnalyticsAPI | undefined) => Command;
|
|
14
14
|
export declare const queueCardsFromChangedTr: (state: EditorState, tr: Transaction, source: CardReplacementInputMethod, analyticsAction?: ACTION, normalizeLinkText?: boolean, sourceEvent?: UIAnalyticsEvent | null | undefined, appearance?: CardAppearance) => Transaction;
|
|
15
|
-
export declare const queueCardFromChangedTr: (state: EditorState, tr: Transaction, source: CardReplacementInputMethod, analyticsAction: ACTION, normalizeLinkText?: boolean, sourceEvent?: UIAnalyticsEvent | null | undefined, previousAppearance?: CardAppearance |
|
|
15
|
+
export declare const queueCardFromChangedTr: (state: EditorState, tr: Transaction, source: CardReplacementInputMethod, analyticsAction: ACTION, normalizeLinkText?: boolean, sourceEvent?: UIAnalyticsEvent | null | undefined, previousAppearance?: CardAppearance | "url") => Transaction;
|
|
16
16
|
export declare const convertHyperlinkToSmartCard: (state: EditorState, source: CardReplacementInputMethod, appearance: CardAppearance, normalizeLinkText?: boolean) => Transaction;
|
|
17
17
|
export declare const changeSelectedCardToLink: (text?: string, href?: string, sendAnalytics?: boolean, node?: Node, pos?: number, editorAnalyticsApi?: EditorAnalyticsAPI) => Command;
|
|
18
18
|
export declare const changeSelectedCardToLinkFallback: (text?: string, href?: string, sendAnalytics?: boolean, node?: Node, pos?: number, editorAnalyticsApi?: EditorAnalyticsAPI) => Command;
|
|
@@ -6,4 +6,4 @@ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
|
6
6
|
import type { DatasourceAdf } from '@atlaskit/linking-common';
|
|
7
7
|
import type { Request } from '../../types';
|
|
8
8
|
export declare const resolveWithProvider: (view: EditorView, provider: CardProvider, request: Request, options: CardOptions, editorAnalyticsApi: EditorAnalyticsAPI | undefined, createAnalyticsEvent: CreateUIAnalyticsEvent | undefined) => Promise<void | DatasourceAdf<Record<string, unknown>> | import("@atlaskit/linking-common").InlineCardAdf | import("@atlaskit/linking-common").BlockCardAdf | import("@atlaskit/linking-common").EmbedCardAdf>;
|
|
9
|
-
export declare const handleProvider: (_:
|
|
9
|
+
export declare const handleProvider: (_: "cardProvider", provider: Promise<CardProvider> | undefined, view: EditorView) => void;
|
|
@@ -8,35 +8,35 @@ export declare const getPluginStateWithUpdatedPos: (pluginState: CardPluginState
|
|
|
8
8
|
appearance: import("@atlaskit/editor-common/provider-factory").CardAppearance;
|
|
9
9
|
compareLinkText: boolean;
|
|
10
10
|
source: import("@atlaskit/editor-common/card").CardReplacementInputMethod;
|
|
11
|
-
previousAppearance?:
|
|
12
|
-
analyticsAction?: import("@atlaskit/editor-common/analytics").ACTION
|
|
13
|
-
shouldReplaceLink?: boolean
|
|
11
|
+
previousAppearance?: import("@atlaskit/editor-common/provider-factory").CardAppearance | "url";
|
|
12
|
+
analyticsAction?: import("@atlaskit/editor-common/analytics").ACTION;
|
|
13
|
+
shouldReplaceLink?: boolean;
|
|
14
14
|
sourceEvent?: import("@atlaskit/analytics-next").UIAnalyticsEvent | null | undefined;
|
|
15
15
|
}[];
|
|
16
16
|
cards: {
|
|
17
17
|
pos: number;
|
|
18
|
-
title?: string
|
|
19
|
-
url?: string
|
|
20
|
-
id?: string
|
|
18
|
+
title?: string;
|
|
19
|
+
url?: string;
|
|
20
|
+
id?: string;
|
|
21
21
|
}[];
|
|
22
22
|
provider: import("@atlaskit/editor-common/provider-factory").CardProvider | null;
|
|
23
23
|
datasourceStash: {
|
|
24
24
|
[x: string]: {
|
|
25
|
-
views: import("@atlaskit/linking-common").
|
|
25
|
+
views: import("@atlaskit/linking-common").DatasourceAdfView[];
|
|
26
26
|
};
|
|
27
27
|
};
|
|
28
28
|
showLinkingToolbar: boolean;
|
|
29
|
-
smartLinkEvents?: import("@atlaskit/smart-card").SmartLinkEvents
|
|
30
|
-
editorAppearance?: import("@atlaskit/editor-common/types").EditorAppearance
|
|
29
|
+
smartLinkEvents?: import("@atlaskit/smart-card").SmartLinkEvents;
|
|
30
|
+
editorAppearance?: import("@atlaskit/editor-common/types").EditorAppearance;
|
|
31
31
|
showDatasourceModal: boolean;
|
|
32
|
-
datasourceModalType?: import("@atlaskit/editor-common/types").DatasourceModalType
|
|
33
|
-
datasourceTableRef?: HTMLElement
|
|
34
|
-
layout?: "
|
|
35
|
-
inlineCardAwarenessCandidatePosition?: number
|
|
36
|
-
overlayCandidatePosition?: number
|
|
37
|
-
removeOverlay?: (
|
|
38
|
-
selectedInlineLinkPosition?: number
|
|
39
|
-
allowEmbeds?: boolean
|
|
40
|
-
allowBlockCards?: boolean
|
|
32
|
+
datasourceModalType?: import("@atlaskit/editor-common/types").DatasourceModalType;
|
|
33
|
+
datasourceTableRef?: HTMLElement;
|
|
34
|
+
layout?: import("../../ui/LayoutButton/types").DatasourceTableLayout;
|
|
35
|
+
inlineCardAwarenessCandidatePosition?: number;
|
|
36
|
+
overlayCandidatePosition?: number;
|
|
37
|
+
removeOverlay?: () => void;
|
|
38
|
+
selectedInlineLinkPosition?: number;
|
|
39
|
+
allowEmbeds?: boolean;
|
|
40
|
+
allowBlockCards?: boolean;
|
|
41
41
|
};
|
|
42
42
|
export declare const getNewRequests: (oldState: CardPluginState | undefined, currentState: CardPluginState) => Request[];
|
|
@@ -22,17 +22,14 @@ export declare const displayInfoForCard: (node: Node, info?: CardInfo) => TitleU
|
|
|
22
22
|
export declare const findCardInfo: (state: EditorState) => CardInfo | undefined;
|
|
23
23
|
export declare const isEmbedSupportedAtPosition: (currentNodePosition: number, editorState: EditorState, currentAppearance?: CardAppearance) => boolean;
|
|
24
24
|
export declare const isBlockSupportedAtPosition: (currentNodePosition: number, editorState: EditorState, currentAppearance?: CardAppearance) => boolean;
|
|
25
|
-
export declare const getResolvedAttributesFromStore: (url: string, display: string | null, store?: CardContext[
|
|
25
|
+
export declare const getResolvedAttributesFromStore: (url: string, display: string | null, store?: CardContext["store"]) => {};
|
|
26
26
|
export declare const isDatasourceConfigEditable: (datasourceId: string) => boolean;
|
|
27
27
|
/**
|
|
28
28
|
* Typeguard that checks node attributes are datasource node attributes
|
|
29
29
|
* ** WARNING ** Typeguards are not a guarantee, if the asserted type changes
|
|
30
30
|
* this function will not be updated automatically
|
|
31
31
|
*/
|
|
32
|
-
export declare const isDatasourceAdfAttributes: (attrs: Record<string, unknown> | undefined) => attrs is
|
|
33
|
-
url?: string | undefined;
|
|
34
|
-
datasource: import("@atlaskit/linking-common").Datasource<Record<string, unknown>>;
|
|
35
|
-
} & Partial<import("@atlaskit/adf-schema").RichMediaAttributes>;
|
|
32
|
+
export declare const isDatasourceAdfAttributes: (attrs: Record<string, unknown> | undefined) => attrs is DatasourceNode["attrs"];
|
|
36
33
|
/**
|
|
37
34
|
* Typeguard that checks a node is a datasource node (blockCard and has datasource attributes)
|
|
38
35
|
* ** WARNING ** Typeguards are not a guarantee, if the asserted type changes
|
|
@@ -31,7 +31,7 @@ export declare const buildEditLinkToolbar: ({ providerFactory, node, pluginInjec
|
|
|
31
31
|
providerFactory: ProviderFactory;
|
|
32
32
|
node: Node;
|
|
33
33
|
pluginInjectionApi: ExtractInjectionAPI<typeof cardPlugin> | undefined;
|
|
34
|
-
linkPicker?:
|
|
34
|
+
linkPicker?: LinkPickerOptions;
|
|
35
35
|
lpLinkPicker: boolean;
|
|
36
36
|
}) => FloatingToolbarItem<Command>;
|
|
37
37
|
export declare const editLinkToolbarConfig: (showLinkingToolbar: boolean, lpLinkPicker?: boolean) => Partial<FloatingToolbarConfig>;
|