@atlaskit/editor-plugin-card 4.5.16 → 4.5.18
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 +12 -0
- package/dist/cjs/nodeviews/blockCard.js +19 -6
- package/dist/cjs/nodeviews/embedCard.js +16 -1
- package/dist/cjs/nodeviews/inlineCard.js +17 -5
- package/dist/cjs/nodeviews/inlineCardWithAwareness.js +18 -3
- package/dist/cjs/pm-plugins/actions.js +12 -3
- package/dist/cjs/pm-plugins/doc.js +5 -25
- package/dist/cjs/pm-plugins/reducers.js +13 -0
- package/dist/cjs/pm-plugins/util/resolve.js +2 -8
- package/dist/cjs/pm-plugins/utils.js +1 -4
- package/dist/cjs/ui/EditLinkToolbar.js +2 -8
- package/dist/cjs/ui/ResizableEmbedCard.js +1 -1
- package/dist/cjs/ui/analytics/events-from-tr.js +0 -3
- package/dist/cjs/ui/analytics/utils.js +1 -4
- package/dist/cjs/ui/editDatasourceAction.js +1 -4
- package/dist/cjs/ui/toolbar.js +7 -28
- package/dist/es2019/nodeviews/blockCard.js +20 -7
- package/dist/es2019/nodeviews/embedCard.js +17 -2
- package/dist/es2019/nodeviews/inlineCard.js +21 -7
- package/dist/es2019/nodeviews/inlineCardWithAwareness.js +12 -1
- package/dist/es2019/pm-plugins/actions.js +7 -2
- package/dist/es2019/pm-plugins/doc.js +7 -33
- package/dist/es2019/pm-plugins/reducers.js +12 -0
- package/dist/es2019/pm-plugins/util/resolve.js +2 -8
- package/dist/es2019/pm-plugins/utils.js +2 -8
- package/dist/es2019/ui/EditLinkToolbar.js +2 -8
- package/dist/es2019/ui/ResizableEmbedCard.js +1 -1
- package/dist/es2019/ui/analytics/events-from-tr.js +0 -3
- package/dist/es2019/ui/analytics/utils.js +1 -4
- package/dist/es2019/ui/editDatasourceAction.js +1 -4
- package/dist/es2019/ui/toolbar.js +7 -28
- package/dist/esm/nodeviews/blockCard.js +20 -7
- package/dist/esm/nodeviews/embedCard.js +17 -2
- package/dist/esm/nodeviews/inlineCard.js +19 -7
- package/dist/esm/nodeviews/inlineCardWithAwareness.js +18 -3
- package/dist/esm/pm-plugins/actions.js +11 -2
- package/dist/esm/pm-plugins/doc.js +5 -25
- package/dist/esm/pm-plugins/reducers.js +13 -0
- package/dist/esm/pm-plugins/util/resolve.js +2 -8
- package/dist/esm/pm-plugins/utils.js +1 -4
- package/dist/esm/ui/EditLinkToolbar.js +2 -8
- package/dist/esm/ui/ResizableEmbedCard.js +1 -1
- package/dist/esm/ui/analytics/events-from-tr.js +0 -3
- package/dist/esm/ui/analytics/utils.js +1 -4
- package/dist/esm/ui/editDatasourceAction.js +1 -4
- package/dist/esm/ui/toolbar.js +7 -28
- package/dist/types/nodeviews/blockCard.d.ts +8 -2
- package/dist/types/nodeviews/embedCard.d.ts +8 -2
- package/dist/types/nodeviews/genericCard.d.ts +3 -1
- package/dist/types/pm-plugins/actions.d.ts +2 -1
- package/dist/types/pm-plugins/util/state.d.ts +1 -0
- package/dist/types/types/index.d.ts +7 -1
- package/dist/types/ui/datasourceErrorBoundary.d.ts +1 -1
- package/dist/types-ts4.5/nodeviews/blockCard.d.ts +8 -2
- package/dist/types-ts4.5/nodeviews/embedCard.d.ts +8 -2
- package/dist/types-ts4.5/nodeviews/genericCard.d.ts +3 -1
- package/dist/types-ts4.5/pm-plugins/actions.d.ts +2 -1
- package/dist/types-ts4.5/pm-plugins/util/state.d.ts +1 -0
- package/dist/types-ts4.5/types/index.d.ts +7 -1
- package/dist/types-ts4.5/ui/datasourceErrorBoundary.d.ts +1 -1
- package/package.json +26 -22
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
|
-
import React, { memo, useCallback, useMemo, useState } from 'react';
|
|
3
|
+
import React, { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
4
4
|
import rafSchedule from 'raf-schd';
|
|
5
|
+
import uuid from 'uuid/v4';
|
|
5
6
|
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
6
7
|
import { handleNavigation } from '@atlaskit/editor-common/link';
|
|
7
8
|
import { findOverflowScrollParent, UnsupportedInline } from '@atlaskit/editor-common/ui';
|
|
8
9
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
9
10
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
11
|
import { Card as SmartCard } from '@atlaskit/smart-card';
|
|
11
|
-
import { registerCard } from '../pm-plugins/actions';
|
|
12
|
+
import { registerCard, removeCard } from '../pm-plugins/actions';
|
|
12
13
|
import { getAwarenessProps } from '../pm-plugins/utils';
|
|
13
14
|
import OverlayWrapper from '../ui/ConfigureOverlay';
|
|
14
15
|
import { Card } from './genericCard';
|
|
@@ -28,6 +29,19 @@ export var InlineCard = /*#__PURE__*/memo(function (_ref) {
|
|
|
28
29
|
var _node$attrs = node.attrs,
|
|
29
30
|
url = _node$attrs.url,
|
|
30
31
|
data = _node$attrs.data;
|
|
32
|
+
var refId = useRef(uuid());
|
|
33
|
+
useEffect(function () {
|
|
34
|
+
var id = refId.current;
|
|
35
|
+
return function () {
|
|
36
|
+
if (fg('platform_editor_fix_card_plugin_state')) {
|
|
37
|
+
var tr = view.state.tr;
|
|
38
|
+
removeCard({
|
|
39
|
+
id: id
|
|
40
|
+
})(tr);
|
|
41
|
+
view.dispatch(tr);
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
}, [getPos, view]);
|
|
31
45
|
var scrollContainer = useMemo(
|
|
32
46
|
// Ignored via go/ees005
|
|
33
47
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
@@ -52,7 +66,8 @@ export var InlineCard = /*#__PURE__*/memo(function (_ref) {
|
|
|
52
66
|
registerCard({
|
|
53
67
|
title: title,
|
|
54
68
|
url: url,
|
|
55
|
-
pos: pos
|
|
69
|
+
pos: pos,
|
|
70
|
+
id: refId.current
|
|
56
71
|
})(tr);
|
|
57
72
|
onRes === null || onRes === void 0 || onRes(tr, title);
|
|
58
73
|
view.dispatch(tr);
|
|
@@ -158,10 +173,7 @@ export function InlineCardNodeView(props) {
|
|
|
158
173
|
}
|
|
159
174
|
export var inlineCardNodeView = function inlineCardNodeView(_ref2) {
|
|
160
175
|
var inlineCardViewProducer = _ref2.inlineCardViewProducer;
|
|
161
|
-
return function (node, view, getPos, decorations
|
|
162
|
-
// Ignored via go/ees005
|
|
163
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
164
|
-
) {
|
|
176
|
+
return function (node, view, getPos, decorations) {
|
|
165
177
|
return inlineCardViewProducer(node, view, getPos, decorations);
|
|
166
178
|
};
|
|
167
179
|
};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
2
|
import React, { memo, useCallback, useMemo, useState } from 'react';
|
|
3
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
4
|
import { registerRemoveOverlay } from '../pm-plugins/actions';
|
|
5
|
+
import { pluginKey } from '../pm-plugins/plugin-key';
|
|
4
6
|
import { AwarenessWrapper } from '../ui/AwarenessWrapper';
|
|
5
7
|
import { InlineCard } from './inlineCard';
|
|
6
8
|
export var InlineCardWithAwareness = /*#__PURE__*/memo(function (_ref) {
|
|
@@ -28,9 +30,22 @@ export var InlineCardWithAwareness = /*#__PURE__*/memo(function (_ref) {
|
|
|
28
30
|
isResolvedViewRendered = _useState6[0],
|
|
29
31
|
setIsResolvedViewRendered = _useState6[1];
|
|
30
32
|
var onResolve = useCallback(function (tr, title) {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
33
|
+
if (fg('platform_editor_fix_card_plugin_state')) {
|
|
34
|
+
var metadata = tr.getMeta(pluginKey);
|
|
35
|
+
if (metadata && metadata.type === 'REGISTER') {
|
|
36
|
+
registerRemoveOverlay(function () {
|
|
37
|
+
return setIsInserted(false);
|
|
38
|
+
}, metadata.info)(tr);
|
|
39
|
+
} else {
|
|
40
|
+
registerRemoveOverlay(function () {
|
|
41
|
+
return setIsInserted(false);
|
|
42
|
+
})(tr);
|
|
43
|
+
}
|
|
44
|
+
} else {
|
|
45
|
+
registerRemoveOverlay(function () {
|
|
46
|
+
return setIsInserted(false);
|
|
47
|
+
})(tr);
|
|
48
|
+
}
|
|
34
49
|
if (title) {
|
|
35
50
|
setIsResolvedViewRendered(true);
|
|
36
51
|
}
|
|
@@ -26,11 +26,20 @@ export var registerCard = function registerCard(info) {
|
|
|
26
26
|
});
|
|
27
27
|
};
|
|
28
28
|
};
|
|
29
|
-
export var
|
|
29
|
+
export var removeCard = function removeCard(info) {
|
|
30
|
+
return function (tr) {
|
|
31
|
+
return cardAction(tr, {
|
|
32
|
+
type: 'REMOVE_CARD',
|
|
33
|
+
info: info
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
export var registerRemoveOverlay = function registerRemoveOverlay(callback, info) {
|
|
30
38
|
return function (tr) {
|
|
31
39
|
return cardAction(tr, {
|
|
32
40
|
type: 'REGISTER_REMOVE_OVERLAY_ON_INSERTED_LINK',
|
|
33
|
-
callback: callback
|
|
41
|
+
callback: callback,
|
|
42
|
+
info: info
|
|
34
43
|
});
|
|
35
44
|
};
|
|
36
45
|
};
|
|
@@ -18,8 +18,6 @@ import { appearanceForNodeType, isDatasourceConfigEditable, isDatasourceNode, se
|
|
|
18
18
|
/**
|
|
19
19
|
* Attempt to replace the link into the respective card.
|
|
20
20
|
*/
|
|
21
|
-
// Ignored via go/ees005
|
|
22
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
23
21
|
function replaceLinksToCards(tr, cardAdf, schema, request) {
|
|
24
22
|
var inlineCard = schema.nodes.inlineCard;
|
|
25
23
|
var url = request.url;
|
|
@@ -57,10 +55,7 @@ function replaceLinksToCards(tr, cardAdf, schema, request) {
|
|
|
57
55
|
}
|
|
58
56
|
return $pos.node($pos.depth - 1).type.name;
|
|
59
57
|
}
|
|
60
|
-
export var replaceQueuedUrlWithCard = function replaceQueuedUrlWithCard(url, cardData, analyticsAction, editorAnalyticsApi, createAnalyticsEvent
|
|
61
|
-
// Ignored via go/ees005
|
|
62
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
63
|
-
) {
|
|
58
|
+
export var replaceQueuedUrlWithCard = function replaceQueuedUrlWithCard(url, cardData, analyticsAction, editorAnalyticsApi, createAnalyticsEvent) {
|
|
64
59
|
return function (editorState, dispatch) {
|
|
65
60
|
var state = pluginKey.getState(editorState);
|
|
66
61
|
if (!state) {
|
|
@@ -198,10 +193,7 @@ export var queueCardsFromChangedTr = function queueCardsFromChangedTr(state, tr,
|
|
|
198
193
|
export var queueCardFromChangedTr = function queueCardFromChangedTr(state, tr, source, analyticsAction) {
|
|
199
194
|
var normalizeLinkText = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;
|
|
200
195
|
var sourceEvent = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : undefined;
|
|
201
|
-
var previousAppearance
|
|
202
|
-
// Ignored via go/ees005
|
|
203
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
204
|
-
= arguments.length > 6 ? arguments[6] : undefined;
|
|
196
|
+
var previousAppearance = arguments.length > 6 ? arguments[6] : undefined;
|
|
205
197
|
var schema = state.schema;
|
|
206
198
|
var link = schema.marks.link;
|
|
207
199
|
var requests = [];
|
|
@@ -261,10 +253,7 @@ export var convertHyperlinkToSmartCard = function convertHyperlinkToSmartCard(st
|
|
|
261
253
|
});
|
|
262
254
|
return queueCards(requests)(state.tr);
|
|
263
255
|
};
|
|
264
|
-
export var changeSelectedCardToLink = function changeSelectedCardToLink(text, href, sendAnalytics, node, pos, editorAnalyticsApi
|
|
265
|
-
// Ignored via go/ees005
|
|
266
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
267
|
-
) {
|
|
256
|
+
export var changeSelectedCardToLink = function changeSelectedCardToLink(text, href, sendAnalytics, node, pos, editorAnalyticsApi) {
|
|
268
257
|
return function (state, dispatch) {
|
|
269
258
|
var selectedNode = state.selection instanceof NodeSelection ? state.selection.node : undefined;
|
|
270
259
|
var tr;
|
|
@@ -293,10 +282,7 @@ export var changeSelectedCardToLink = function changeSelectedCardToLink(text, hr
|
|
|
293
282
|
return true;
|
|
294
283
|
};
|
|
295
284
|
};
|
|
296
|
-
export var changeSelectedCardToLinkFallback = function changeSelectedCardToLinkFallback(text, href, sendAnalytics, node, pos, editorAnalyticsApi
|
|
297
|
-
// Ignored via go/ees005
|
|
298
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
299
|
-
) {
|
|
285
|
+
export var changeSelectedCardToLinkFallback = function changeSelectedCardToLinkFallback(text, href, sendAnalytics, node, pos, editorAnalyticsApi) {
|
|
300
286
|
return function (state, dispatch) {
|
|
301
287
|
var tr;
|
|
302
288
|
if (node && pos) {
|
|
@@ -347,9 +333,6 @@ function cardToLinkWithTransaction(state, text, href) {
|
|
|
347
333
|
})]), false);
|
|
348
334
|
return tr;
|
|
349
335
|
}
|
|
350
|
-
|
|
351
|
-
// Ignored via go/ees005
|
|
352
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
353
336
|
function cardNodeToLinkWithTransaction(state, text, href, node, pos) {
|
|
354
337
|
var link = state.schema.marks.link;
|
|
355
338
|
var url = node.attrs.url || node.attrs.data.url;
|
|
@@ -515,10 +498,7 @@ export var updateCardViaDatasource = function updateCardViaDatasource(args) {
|
|
|
515
498
|
}
|
|
516
499
|
view.dispatch(tr.scrollIntoView());
|
|
517
500
|
};
|
|
518
|
-
export var insertDatasource = function insertDatasource(state, adf, view, sourceEvent
|
|
519
|
-
// Ignored via go/ees005
|
|
520
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
521
|
-
) {
|
|
501
|
+
export var insertDatasource = function insertDatasource(state, adf, view, sourceEvent) {
|
|
522
502
|
var tr = state.tr,
|
|
523
503
|
from = state.selection.from,
|
|
524
504
|
schemaNodes = state.schema.nodes;
|
|
@@ -28,6 +28,13 @@ var register = function register(state, action) {
|
|
|
28
28
|
}).concat(action.info)
|
|
29
29
|
});
|
|
30
30
|
};
|
|
31
|
+
var removeCard = function removeCard(state, action) {
|
|
32
|
+
return _objectSpread(_objectSpread({}, state), {}, {
|
|
33
|
+
cards: state.cards.filter(function (card) {
|
|
34
|
+
return card.id !== action.info.id;
|
|
35
|
+
})
|
|
36
|
+
});
|
|
37
|
+
};
|
|
31
38
|
var setProvider = function setProvider(state, action) {
|
|
32
39
|
return _objectSpread(_objectSpread({}, state), {}, {
|
|
33
40
|
provider: action.provider
|
|
@@ -78,6 +85,10 @@ var clearOverlayCandidate = function clearOverlayCandidate(state) {
|
|
|
78
85
|
};
|
|
79
86
|
var registerRemoveOverlayOnInsertedLink = function registerRemoveOverlayOnInsertedLink(state, action) {
|
|
80
87
|
return _objectSpread(_objectSpread({}, state), {}, {
|
|
88
|
+
cards: action.info ? state.cards.filter(function (card) {
|
|
89
|
+
var _action$info;
|
|
90
|
+
return card.pos !== ((_action$info = action.info) === null || _action$info === void 0 ? void 0 : _action$info.pos);
|
|
91
|
+
}).concat(action.info) : state.cards,
|
|
81
92
|
removeOverlay: action.callback
|
|
82
93
|
});
|
|
83
94
|
};
|
|
@@ -107,6 +118,8 @@ export default (function (state, action) {
|
|
|
107
118
|
return resolve(state, action);
|
|
108
119
|
case 'REGISTER':
|
|
109
120
|
return register(state, action);
|
|
121
|
+
case 'REMOVE_CARD':
|
|
122
|
+
return removeCard(state, action);
|
|
110
123
|
case 'REGISTER_EVENTS':
|
|
111
124
|
return registerEvents(state, action);
|
|
112
125
|
case 'SET_DATASOURCE_TABLE_REF':
|
|
@@ -28,10 +28,7 @@ var isFreshlyPastedOnNewLine = function isFreshlyPastedOnNewLine(view) {
|
|
|
28
28
|
// ============================================================================ //
|
|
29
29
|
// Used for all interactions with the EditorCardProvider.
|
|
30
30
|
// ============================================================================ //
|
|
31
|
-
export var resolveWithProvider = function resolveWithProvider(view, provider, request, options, editorAnalyticsApi, createAnalyticsEvent
|
|
32
|
-
// Ignored via go/ees005
|
|
33
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
34
|
-
) {
|
|
31
|
+
export var resolveWithProvider = function resolveWithProvider(view, provider, request, options, editorAnalyticsApi, createAnalyticsEvent) {
|
|
35
32
|
var isEmbedFriendlyLocation = fg('hardcoded-embeds-only-on-new-line') ? isFreshlyPastedOnNewLine(view) : true;
|
|
36
33
|
|
|
37
34
|
// When user manually changes appearance from blue link to smart link, we should respect that,
|
|
@@ -61,10 +58,7 @@ var updateCardType = function updateCardType(resolvedCard, options) {
|
|
|
61
58
|
resolvedCard.type = 'inlineCard';
|
|
62
59
|
}
|
|
63
60
|
};
|
|
64
|
-
var handleResolved = function handleResolved(view, request, editorAnalyticsApi, createAnalyticsEvent, options
|
|
65
|
-
// Ignored via go/ees005
|
|
66
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
67
|
-
) {
|
|
61
|
+
var handleResolved = function handleResolved(view, request, editorAnalyticsApi, createAnalyticsEvent, options) {
|
|
68
62
|
return function (resolvedCard) {
|
|
69
63
|
updateCardType(resolvedCard, options);
|
|
70
64
|
replaceQueuedUrlWithCard(request.url, resolvedCard, request.analyticsAction, editorAnalyticsApi, createAnalyticsEvent)(view.state, view.dispatch);
|
|
@@ -50,10 +50,7 @@ export var findCardInfo = function findCardInfo(state) {
|
|
|
50
50
|
return cardInfo.pos === state.selection.from;
|
|
51
51
|
});
|
|
52
52
|
};
|
|
53
|
-
var isAppearanceSupportedInParent = function isAppearanceSupportedInParent(currentNodePosition, editorState, fragment, currentAppearance
|
|
54
|
-
// Ignored via go/ees005
|
|
55
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
56
|
-
) {
|
|
53
|
+
var isAppearanceSupportedInParent = function isAppearanceSupportedInParent(currentNodePosition, editorState, fragment, currentAppearance) {
|
|
57
54
|
var resolvedPosition = editorState.doc.resolve(currentNodePosition);
|
|
58
55
|
var parent = currentAppearance === 'embed' || currentAppearance === 'block' ? resolvedPosition.node() : resolvedPosition.node(-1);
|
|
59
56
|
return parent && parent.type.validContent(fragment);
|
|
@@ -93,10 +93,7 @@ export var EditLinkToolbar = /*#__PURE__*/function (_React$Component) {
|
|
|
93
93
|
// via the floating toolbar
|
|
94
94
|
,
|
|
95
95
|
invokeMethod: INPUT_METHOD.FLOATING_TB,
|
|
96
|
-
lpLinkPicker: lpLinkPicker
|
|
97
|
-
// Ignored via go/ees005
|
|
98
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
99
|
-
,
|
|
96
|
+
lpLinkPicker: lpLinkPicker,
|
|
100
97
|
onSubmit: function onSubmit(href, title, displayText, inputMethod, analytic) {
|
|
101
98
|
_this.hideLinkToolbar();
|
|
102
99
|
if (_onSubmit) {
|
|
@@ -167,10 +164,7 @@ export var buildEditLinkToolbar = function buildEditLinkToolbar(_ref2) {
|
|
|
167
164
|
text: displayInfo.title || '',
|
|
168
165
|
node: node,
|
|
169
166
|
lpLinkPicker: lpLinkPicker,
|
|
170
|
-
forceFocusSelector: pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$f = pluginInjectionApi.floatingToolbar) === null || _pluginInjectionApi$f === void 0 || (_pluginInjectionApi$f = _pluginInjectionApi$f.actions) === null || _pluginInjectionApi$f === void 0 ? void 0 : _pluginInjectionApi$f.forceFocusSelector
|
|
171
|
-
// Ignored via go/ees005
|
|
172
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
173
|
-
,
|
|
167
|
+
forceFocusSelector: pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$f = pluginInjectionApi.floatingToolbar) === null || _pluginInjectionApi$f === void 0 || (_pluginInjectionApi$f = _pluginInjectionApi$f.actions) === null || _pluginInjectionApi$f === void 0 ? void 0 : _pluginInjectionApi$f.forceFocusSelector,
|
|
174
168
|
onSubmit: function onSubmit(newHref, newText, inputMethod, analytic) {
|
|
175
169
|
var urlChanged = newHref !== displayInfo.url;
|
|
176
170
|
var titleChanged = newText !== displayInfo.title;
|
|
@@ -311,7 +311,7 @@ var ResizableEmbedCard = /*#__PURE__*/function (_React$Component) {
|
|
|
311
311
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
312
312
|
display: 'block',
|
|
313
313
|
/* Fixes extra padding problem in Firefox */
|
|
314
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
314
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop, @atlaskit/design-system/use-tokens-typography -- Ignored via go/DSP-18766
|
|
315
315
|
fontSize: 0,
|
|
316
316
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop, @atlaskit/design-system/use-tokens-typography -- Ignored via go/DSP-18766
|
|
317
317
|
lineHeight: 0
|
|
@@ -76,9 +76,6 @@ export var findChanged = function findChanged(tr, state) {
|
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
|
-
|
|
80
|
-
// Ignored via go/ees005
|
|
81
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
82
79
|
stepMap.forEach(function (oldStart, oldEnd, newStart, newEnd) {
|
|
83
80
|
var _tr$docs2;
|
|
84
81
|
var before = tr.docs[i];
|
|
@@ -81,10 +81,7 @@ export var findAtPositions = function findAtPositions(tr, positions) {
|
|
|
81
81
|
}
|
|
82
82
|
return entities;
|
|
83
83
|
};
|
|
84
|
-
export var findInNodeRange = function findInNodeRange(doc, from, to, predicate
|
|
85
|
-
// Ignored via go/ees005
|
|
86
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
87
|
-
) {
|
|
84
|
+
export var findInNodeRange = function findInNodeRange(doc, from, to, predicate) {
|
|
88
85
|
var entities = [];
|
|
89
86
|
doc.nodesBetween(from, to, function (node, pos) {
|
|
90
87
|
if (predicate(node)) {
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
2
2
|
import { getDatasourceType } from '@atlaskit/editor-common/utils';
|
|
3
3
|
import { showDatasourceModal } from '../pm-plugins/actions';
|
|
4
|
-
export var editDatasource = function editDatasource(datasourceId, editorAnalyticsApi, appearance, extensionKey
|
|
5
|
-
// Ignored via go/ees005
|
|
6
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
7
|
-
) {
|
|
4
|
+
export var editDatasource = function editDatasource(datasourceId, editorAnalyticsApi, appearance, extensionKey) {
|
|
8
5
|
return function (state, dispatch) {
|
|
9
6
|
var datasourceType = getDatasourceType(datasourceId);
|
|
10
7
|
if (dispatch && datasourceType) {
|
package/dist/esm/ui/toolbar.js
CHANGED
|
@@ -93,10 +93,7 @@ export var openLinkSettings = function openLinkSettings(editorAnalyticsApi) {
|
|
|
93
93
|
return true;
|
|
94
94
|
};
|
|
95
95
|
};
|
|
96
|
-
export var floatingToolbar = function floatingToolbar(cardOptions, lpLinkPicker, linkPickerOptions, pluginInjectionApi, disableFloatingToolbar
|
|
97
|
-
// Ignored via go/ees005
|
|
98
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
99
|
-
) {
|
|
96
|
+
export var floatingToolbar = function floatingToolbar(cardOptions, lpLinkPicker, linkPickerOptions, pluginInjectionApi, disableFloatingToolbar) {
|
|
100
97
|
return function (state, intl, providerFactory) {
|
|
101
98
|
if (disableFloatingToolbar) {
|
|
102
99
|
return;
|
|
@@ -161,10 +158,7 @@ var unlinkCard = function unlinkCard(node, state, editorAnalyticsApi) {
|
|
|
161
158
|
return false;
|
|
162
159
|
};
|
|
163
160
|
};
|
|
164
|
-
var buildAlignmentOptions = function buildAlignmentOptions(state, intl, widthPluginDependencyApi, analyticsApi, cardOptions
|
|
165
|
-
// Ignored via go/ees005
|
|
166
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
167
|
-
) {
|
|
161
|
+
var buildAlignmentOptions = function buildAlignmentOptions(state, intl, widthPluginDependencyApi, analyticsApi, cardOptions) {
|
|
168
162
|
return buildLayoutButtons(state, intl, state.schema.nodes.embedCard, widthPluginDependencyApi, analyticsApi, true, true, cardOptions === null || cardOptions === void 0 ? void 0 : cardOptions.allowWrapping, cardOptions === null || cardOptions === void 0 ? void 0 : cardOptions.allowAlignment);
|
|
169
163
|
};
|
|
170
164
|
var withToolbarMetadata = function withToolbarMetadata(command) {
|
|
@@ -189,10 +183,7 @@ var getToolbarViewedItem = function getToolbarViewedItem(url, display) {
|
|
|
189
183
|
}
|
|
190
184
|
}];
|
|
191
185
|
};
|
|
192
|
-
var generateToolbarItems = function generateToolbarItems(state, intl, providerFactory, cardOptions, lpLinkPicker, linkPicker, pluginInjectionApi
|
|
193
|
-
// Ignored via go/ees005
|
|
194
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
195
|
-
) {
|
|
186
|
+
var generateToolbarItems = function generateToolbarItems(state, intl, providerFactory, cardOptions, lpLinkPicker, linkPicker, pluginInjectionApi) {
|
|
196
187
|
return function (node) {
|
|
197
188
|
var _pluginInjectionApi$a, _pluginInjectionApi$d, _pluginInjectionApi$d2, _pluginInjectionApi$a2, _node$attrs;
|
|
198
189
|
var _titleUrlPairFromNode2 = titleUrlPairFromNode(node),
|
|
@@ -385,10 +376,7 @@ var generateToolbarItems = function generateToolbarItems(state, intl, providerFa
|
|
|
385
376
|
}
|
|
386
377
|
};
|
|
387
378
|
};
|
|
388
|
-
var getUnlinkButtonGroup = function getUnlinkButtonGroup(state, intl, node, inlineCard, editorAnalyticsApi
|
|
389
|
-
// Ignored via go/ees005
|
|
390
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
391
|
-
) {
|
|
379
|
+
var getUnlinkButtonGroup = function getUnlinkButtonGroup(state, intl, node, inlineCard, editorAnalyticsApi) {
|
|
392
380
|
return node.type === inlineCard ? [{
|
|
393
381
|
id: 'editor.link.unlink',
|
|
394
382
|
focusEditoronEnter: true,
|
|
@@ -413,10 +401,7 @@ export var getSettingsButton = function getSettingsButton(intl, editorAnalyticsA
|
|
|
413
401
|
target: '_blank'
|
|
414
402
|
};
|
|
415
403
|
};
|
|
416
|
-
var getDatasourceButtonGroup = function getDatasourceButtonGroup(metadata, intl, editorAnalyticsApi, node, hoverDecoration, datasourceId, state, cardOptions, currentAppearance
|
|
417
|
-
// Ignored via go/ees005
|
|
418
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
419
|
-
) {
|
|
404
|
+
var getDatasourceButtonGroup = function getDatasourceButtonGroup(metadata, intl, editorAnalyticsApi, node, hoverDecoration, datasourceId, state, cardOptions, currentAppearance) {
|
|
420
405
|
var _node$attrs2;
|
|
421
406
|
var toolbarItems = [];
|
|
422
407
|
var canShowAppearanceSwitch = function canShowAppearanceSwitch() {
|
|
@@ -525,17 +510,11 @@ var getDatasourceButtonGroup = function getDatasourceButtonGroup(metadata, intl,
|
|
|
525
510
|
});
|
|
526
511
|
return toolbarItems;
|
|
527
512
|
};
|
|
528
|
-
export var shouldRenderToolbarPulse = function shouldRenderToolbarPulse(embedEnabled, appearance, status, isDiscoverabilityEnabled
|
|
529
|
-
// Ignored via go/ees005
|
|
530
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
531
|
-
) {
|
|
513
|
+
export var shouldRenderToolbarPulse = function shouldRenderToolbarPulse(embedEnabled, appearance, status, isDiscoverabilityEnabled) {
|
|
532
514
|
return embedEnabled && appearance === 'inline' && status === 'resolved' && isDiscoverabilityEnabled;
|
|
533
515
|
};
|
|
534
516
|
export var getStartingToolbarItems = function getStartingToolbarItems(options, api) {
|
|
535
|
-
return function (intl, link, onEditLink, metadata
|
|
536
|
-
// Ignored via go/ees005
|
|
537
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
538
|
-
) {
|
|
517
|
+
return function (intl, link, onEditLink, metadata) {
|
|
539
518
|
var editLinkItem = options.allowDatasource ? [{
|
|
540
519
|
type: 'custom',
|
|
541
520
|
fallback: [],
|
|
@@ -5,9 +5,13 @@ import type { Node } from '@atlaskit/editor-prosemirror/model';
|
|
|
5
5
|
import type { Decoration, DecorationSource, EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
6
6
|
import { Datasource } from '../nodeviews/datasource';
|
|
7
7
|
import type { SmartCardProps } from './genericCard';
|
|
8
|
-
export declare class BlockCardComponent extends React.PureComponent<SmartCardProps
|
|
8
|
+
export declare class BlockCardComponent extends React.PureComponent<SmartCardProps & {
|
|
9
|
+
id?: string;
|
|
10
|
+
}> {
|
|
9
11
|
private scrollContainer?;
|
|
10
|
-
constructor(props: SmartCardProps
|
|
12
|
+
constructor(props: SmartCardProps & {
|
|
13
|
+
id?: string;
|
|
14
|
+
});
|
|
11
15
|
onResolve: (data: {
|
|
12
16
|
url?: string | undefined;
|
|
13
17
|
title?: string | undefined;
|
|
@@ -20,6 +24,7 @@ export declare class BlockCardComponent extends React.PureComponent<SmartCardPro
|
|
|
20
24
|
}
|
|
21
25
|
export type BlockCardNodeViewProps = Pick<SmartCardProps, 'actionOptions' | 'pluginInjectionApi' | 'onClickCallback'>;
|
|
22
26
|
export declare class BlockCard extends ReactNodeView<BlockCardNodeViewProps> {
|
|
27
|
+
private id;
|
|
23
28
|
unsubscribe: (() => void) | undefined;
|
|
24
29
|
createDomRef(): HTMLElement;
|
|
25
30
|
private updateContentEditable;
|
|
@@ -27,6 +32,7 @@ export declare class BlockCard extends ReactNodeView<BlockCardNodeViewProps> {
|
|
|
27
32
|
update(node: Node, decorations: ReadonlyArray<Decoration>, _innerDecorations?: DecorationSource): boolean;
|
|
28
33
|
render(): JSX.Element;
|
|
29
34
|
destroy(): void;
|
|
35
|
+
private removeCard;
|
|
30
36
|
}
|
|
31
37
|
export interface BlockCardNodeViewProperties {
|
|
32
38
|
pmPluginFactoryParams: PMPluginFactoryParams;
|
|
@@ -11,10 +11,14 @@ export type EmbedCardState = {
|
|
|
11
11
|
liveHeight?: number;
|
|
12
12
|
initialAspectRatio?: number;
|
|
13
13
|
};
|
|
14
|
-
export declare class EmbedCardComponent extends React.PureComponent<SmartCardProps
|
|
14
|
+
export declare class EmbedCardComponent extends React.PureComponent<SmartCardProps & {
|
|
15
|
+
id?: string;
|
|
16
|
+
}, EmbedCardState> {
|
|
15
17
|
private scrollContainer?;
|
|
16
18
|
private embedIframeRef;
|
|
17
|
-
constructor(props: SmartCardProps
|
|
19
|
+
constructor(props: SmartCardProps & {
|
|
20
|
+
id?: string;
|
|
21
|
+
});
|
|
18
22
|
state: EmbedCardState;
|
|
19
23
|
private getPosSafely;
|
|
20
24
|
onResolve: (data: {
|
|
@@ -38,12 +42,14 @@ export declare class EmbedCardComponent extends React.PureComponent<SmartCardPro
|
|
|
38
42
|
}
|
|
39
43
|
export type EmbedCardNodeViewProps = Pick<SmartCardProps, 'eventDispatcher' | 'allowResizing' | 'fullWidthMode' | 'dispatchAnalyticsEvent' | 'pluginInjectionApi' | 'actionOptions' | 'onClickCallback'>;
|
|
40
44
|
export declare class EmbedCard extends ReactNodeView<EmbedCardNodeViewProps> {
|
|
45
|
+
private id;
|
|
41
46
|
unsubscribe: (() => void) | undefined;
|
|
42
47
|
viewShouldUpdate(nextNode: PMNode): boolean;
|
|
43
48
|
createDomRef(): HTMLElement;
|
|
44
49
|
private updateContentEditable;
|
|
45
50
|
render(): JSX.Element;
|
|
46
51
|
destroy(): void;
|
|
52
|
+
private removeCard;
|
|
47
53
|
}
|
|
48
54
|
export interface EmbedCardNodeViewProperties {
|
|
49
55
|
allowResizing: EmbedCardNodeViewProps['allowResizing'];
|
|
@@ -46,4 +46,6 @@ export interface SmartCardProps extends CardProps {
|
|
|
46
46
|
allowBlockCards?: boolean;
|
|
47
47
|
enableInlineUpgradeFeatures?: boolean;
|
|
48
48
|
}
|
|
49
|
-
export declare function Card(SmartCardComponent: React.ComponentType<React.PropsWithChildren<SmartCardProps
|
|
49
|
+
export declare function Card(SmartCardComponent: React.ComponentType<React.PropsWithChildren<SmartCardProps & {
|
|
50
|
+
id?: string;
|
|
51
|
+
}>>, UnsupportedComponent: React.ComponentType<React.PropsWithChildren<unknown>>): React.ComponentType<React.PropsWithChildren<CardProps>>;
|
|
@@ -9,7 +9,8 @@ export declare const cardAction: (tr: Transaction, action: CardPluginAction) =>
|
|
|
9
9
|
export declare const resolveCard: (url: string) => (tr: Transaction) => Transaction;
|
|
10
10
|
export declare const queueCards: (requests: Request[]) => (tr: Transaction) => Transaction;
|
|
11
11
|
export declare const registerCard: (info: CardInfo) => (tr: Transaction) => Transaction;
|
|
12
|
-
export declare const
|
|
12
|
+
export declare const removeCard: (info: Partial<CardInfo>) => (tr: Transaction) => Transaction;
|
|
13
|
+
export declare const registerRemoveOverlay: (callback: () => void, info?: CardInfo) => (tr: Transaction) => Transaction;
|
|
13
14
|
export declare const registerSmartCardEvents: (smartLinkEvents: SmartLinkEvents) => (tr: Transaction) => Transaction;
|
|
14
15
|
export declare const setProvider: (cardProvider: CardProvider | null) => (tr: Transaction) => Transaction;
|
|
15
16
|
export declare const setDatasourceTableRef: (datasourceTableRef?: HTMLElement) => (tr: Transaction) => Transaction;
|
|
@@ -17,6 +17,7 @@ export declare const getPluginStateWithUpdatedPos: (pluginState: CardPluginState
|
|
|
17
17
|
pos: number;
|
|
18
18
|
title?: string | undefined;
|
|
19
19
|
url?: string | undefined;
|
|
20
|
+
id?: string | undefined;
|
|
20
21
|
}[];
|
|
21
22
|
provider: import("@atlaskit/editor-common/provider-factory").CardProvider | null;
|
|
22
23
|
datasourceStash: {
|
|
@@ -17,6 +17,7 @@ export type DatasourceNode = Omit<Node, 'attrs'> & {
|
|
|
17
17
|
export type CardInfo = {
|
|
18
18
|
title?: string;
|
|
19
19
|
url?: string;
|
|
20
|
+
id?: string;
|
|
20
21
|
pos: number;
|
|
21
22
|
};
|
|
22
23
|
export type Request = {
|
|
@@ -123,6 +124,10 @@ export type Register = {
|
|
|
123
124
|
type: 'REGISTER';
|
|
124
125
|
info: CardInfo;
|
|
125
126
|
};
|
|
127
|
+
export type RemoveCard = {
|
|
128
|
+
type: 'REMOVE_CARD';
|
|
129
|
+
info: Partial<CardInfo>;
|
|
130
|
+
};
|
|
126
131
|
export type ShowLinkToolbar = {
|
|
127
132
|
type: 'SHOW_LINK_TOOLBAR';
|
|
128
133
|
};
|
|
@@ -159,6 +164,7 @@ type ClearOverlayCandidate = {
|
|
|
159
164
|
type RegisterRemoveOverlayOnInsertedLink = {
|
|
160
165
|
type: 'REGISTER_REMOVE_OVERLAY_ON_INSERTED_LINK';
|
|
161
166
|
callback: () => void;
|
|
167
|
+
info?: Register['info'];
|
|
162
168
|
};
|
|
163
169
|
export type SetDatasourceStash = {
|
|
164
170
|
type: 'SET_DATASOURCE_STASH';
|
|
@@ -171,5 +177,5 @@ export type RemoveDatasourceStash = {
|
|
|
171
177
|
type: 'REMOVE_DATASOURCE_STASH';
|
|
172
178
|
url: string;
|
|
173
179
|
};
|
|
174
|
-
export type CardPluginAction = SetProvider | Queue | Resolve | Register | ShowLinkToolbar | HideLinkToolbar | ShowDatasourceModal | HideDatasourceModal | RegisterSmartCardEvents | SetDatasourceTableRef | SetCardLayout | SetCardLayoutAndDatasourceTableRef | ClearOverlayCandidate | RegisterRemoveOverlayOnInsertedLink | SetDatasourceStash | RemoveDatasourceStash;
|
|
180
|
+
export type CardPluginAction = SetProvider | Queue | Resolve | Register | RemoveCard | ShowLinkToolbar | HideLinkToolbar | ShowDatasourceModal | HideDatasourceModal | RegisterSmartCardEvents | SetDatasourceTableRef | SetCardLayout | SetCardLayoutAndDatasourceTableRef | ClearOverlayCandidate | RegisterRemoveOverlayOnInsertedLink | SetDatasourceStash | RemoveDatasourceStash;
|
|
175
181
|
export {};
|
|
@@ -20,5 +20,5 @@ export declare class DatasourceErrorBoundary extends React.Component<DatasourceE
|
|
|
20
20
|
error: Error | APIError;
|
|
21
21
|
};
|
|
22
22
|
componentDidCatch(error: Error | APIError): void;
|
|
23
|
-
render(): React.
|
|
23
|
+
render(): string | number | boolean | JSX.Element | React.ReactFragment | null | undefined;
|
|
24
24
|
}
|
|
@@ -5,9 +5,13 @@ import type { Node } from '@atlaskit/editor-prosemirror/model';
|
|
|
5
5
|
import type { Decoration, DecorationSource, EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
6
6
|
import { Datasource } from '../nodeviews/datasource';
|
|
7
7
|
import type { SmartCardProps } from './genericCard';
|
|
8
|
-
export declare class BlockCardComponent extends React.PureComponent<SmartCardProps
|
|
8
|
+
export declare class BlockCardComponent extends React.PureComponent<SmartCardProps & {
|
|
9
|
+
id?: string;
|
|
10
|
+
}> {
|
|
9
11
|
private scrollContainer?;
|
|
10
|
-
constructor(props: SmartCardProps
|
|
12
|
+
constructor(props: SmartCardProps & {
|
|
13
|
+
id?: string;
|
|
14
|
+
});
|
|
11
15
|
onResolve: (data: {
|
|
12
16
|
url?: string | undefined;
|
|
13
17
|
title?: string | undefined;
|
|
@@ -20,6 +24,7 @@ export declare class BlockCardComponent extends React.PureComponent<SmartCardPro
|
|
|
20
24
|
}
|
|
21
25
|
export type BlockCardNodeViewProps = Pick<SmartCardProps, 'actionOptions' | 'pluginInjectionApi' | 'onClickCallback'>;
|
|
22
26
|
export declare class BlockCard extends ReactNodeView<BlockCardNodeViewProps> {
|
|
27
|
+
private id;
|
|
23
28
|
unsubscribe: (() => void) | undefined;
|
|
24
29
|
createDomRef(): HTMLElement;
|
|
25
30
|
private updateContentEditable;
|
|
@@ -27,6 +32,7 @@ export declare class BlockCard extends ReactNodeView<BlockCardNodeViewProps> {
|
|
|
27
32
|
update(node: Node, decorations: ReadonlyArray<Decoration>, _innerDecorations?: DecorationSource): boolean;
|
|
28
33
|
render(): JSX.Element;
|
|
29
34
|
destroy(): void;
|
|
35
|
+
private removeCard;
|
|
30
36
|
}
|
|
31
37
|
export interface BlockCardNodeViewProperties {
|
|
32
38
|
pmPluginFactoryParams: PMPluginFactoryParams;
|
|
@@ -11,10 +11,14 @@ export type EmbedCardState = {
|
|
|
11
11
|
liveHeight?: number;
|
|
12
12
|
initialAspectRatio?: number;
|
|
13
13
|
};
|
|
14
|
-
export declare class EmbedCardComponent extends React.PureComponent<SmartCardProps
|
|
14
|
+
export declare class EmbedCardComponent extends React.PureComponent<SmartCardProps & {
|
|
15
|
+
id?: string;
|
|
16
|
+
}, EmbedCardState> {
|
|
15
17
|
private scrollContainer?;
|
|
16
18
|
private embedIframeRef;
|
|
17
|
-
constructor(props: SmartCardProps
|
|
19
|
+
constructor(props: SmartCardProps & {
|
|
20
|
+
id?: string;
|
|
21
|
+
});
|
|
18
22
|
state: EmbedCardState;
|
|
19
23
|
private getPosSafely;
|
|
20
24
|
onResolve: (data: {
|
|
@@ -38,12 +42,14 @@ export declare class EmbedCardComponent extends React.PureComponent<SmartCardPro
|
|
|
38
42
|
}
|
|
39
43
|
export type EmbedCardNodeViewProps = Pick<SmartCardProps, 'eventDispatcher' | 'allowResizing' | 'fullWidthMode' | 'dispatchAnalyticsEvent' | 'pluginInjectionApi' | 'actionOptions' | 'onClickCallback'>;
|
|
40
44
|
export declare class EmbedCard extends ReactNodeView<EmbedCardNodeViewProps> {
|
|
45
|
+
private id;
|
|
41
46
|
unsubscribe: (() => void) | undefined;
|
|
42
47
|
viewShouldUpdate(nextNode: PMNode): boolean;
|
|
43
48
|
createDomRef(): HTMLElement;
|
|
44
49
|
private updateContentEditable;
|
|
45
50
|
render(): JSX.Element;
|
|
46
51
|
destroy(): void;
|
|
52
|
+
private removeCard;
|
|
47
53
|
}
|
|
48
54
|
export interface EmbedCardNodeViewProperties {
|
|
49
55
|
allowResizing: EmbedCardNodeViewProps['allowResizing'];
|
|
@@ -46,4 +46,6 @@ export interface SmartCardProps extends CardProps {
|
|
|
46
46
|
allowBlockCards?: boolean;
|
|
47
47
|
enableInlineUpgradeFeatures?: boolean;
|
|
48
48
|
}
|
|
49
|
-
export declare function Card(SmartCardComponent: React.ComponentType<React.PropsWithChildren<SmartCardProps
|
|
49
|
+
export declare function Card(SmartCardComponent: React.ComponentType<React.PropsWithChildren<SmartCardProps & {
|
|
50
|
+
id?: string;
|
|
51
|
+
}>>, UnsupportedComponent: React.ComponentType<React.PropsWithChildren<unknown>>): React.ComponentType<React.PropsWithChildren<CardProps>>;
|
|
@@ -9,7 +9,8 @@ export declare const cardAction: (tr: Transaction, action: CardPluginAction) =>
|
|
|
9
9
|
export declare const resolveCard: (url: string) => (tr: Transaction) => Transaction;
|
|
10
10
|
export declare const queueCards: (requests: Request[]) => (tr: Transaction) => Transaction;
|
|
11
11
|
export declare const registerCard: (info: CardInfo) => (tr: Transaction) => Transaction;
|
|
12
|
-
export declare const
|
|
12
|
+
export declare const removeCard: (info: Partial<CardInfo>) => (tr: Transaction) => Transaction;
|
|
13
|
+
export declare const registerRemoveOverlay: (callback: () => void, info?: CardInfo) => (tr: Transaction) => Transaction;
|
|
13
14
|
export declare const registerSmartCardEvents: (smartLinkEvents: SmartLinkEvents) => (tr: Transaction) => Transaction;
|
|
14
15
|
export declare const setProvider: (cardProvider: CardProvider | null) => (tr: Transaction) => Transaction;
|
|
15
16
|
export declare const setDatasourceTableRef: (datasourceTableRef?: HTMLElement) => (tr: Transaction) => Transaction;
|