@atlaskit/editor-plugin-card 4.5.8 → 4.5.10
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/cardPlugin.js +2 -1
- package/dist/cjs/nodeviews/blockCard.js +6 -1
- package/dist/cjs/nodeviews/embedCard.js +12 -2
- package/dist/cjs/nodeviews/genericCard.js +2 -0
- package/dist/cjs/nodeviews/inlineCard.js +10 -2
- package/dist/cjs/pm-plugins/doc.js +25 -5
- package/dist/cjs/pm-plugins/keymap.js +5 -0
- package/dist/cjs/pm-plugins/main.js +5 -1
- package/dist/cjs/pm-plugins/util/resolve.js +8 -2
- package/dist/cjs/pm-plugins/utils.js +4 -1
- package/dist/cjs/ui/DatasourceIcon/index.js +4 -0
- package/dist/cjs/ui/EditLinkToolbar.js +8 -2
- package/dist/cjs/ui/EditToolbarButton/EditToolbarButtonPresentation.js +20 -5
- package/dist/cjs/ui/EditToolbarButton/index.js +20 -5
- package/dist/cjs/ui/EditorLinkingPlatformAnalytics/index.js +7 -1
- package/dist/cjs/ui/HyperlinkToolbarAppearance.js +3 -0
- package/dist/cjs/ui/InlineCardOverlay/index.js +49 -45
- package/dist/cjs/ui/LayoutButton/index.js +4 -1
- package/dist/cjs/ui/ResizableEmbedCard.js +6 -1
- package/dist/cjs/ui/analytics/events-from-tr.js +3 -0
- package/dist/cjs/ui/analytics/utils.js +4 -1
- package/dist/cjs/ui/editDatasourceAction.js +4 -1
- package/dist/cjs/ui/toolbar.js +32 -7
- package/dist/es2019/cardPlugin.js +2 -0
- package/dist/es2019/nodeviews/blockCard.js +6 -1
- package/dist/es2019/nodeviews/embedCard.js +12 -2
- package/dist/es2019/nodeviews/genericCard.js +2 -0
- package/dist/es2019/nodeviews/inlineCard.js +10 -2
- package/dist/es2019/pm-plugins/doc.js +33 -7
- package/dist/es2019/pm-plugins/keymap.js +5 -0
- package/dist/es2019/pm-plugins/main.js +5 -1
- package/dist/es2019/pm-plugins/util/resolve.js +8 -2
- package/dist/es2019/pm-plugins/utils.js +8 -2
- package/dist/es2019/ui/DatasourceIcon/index.js +4 -0
- package/dist/es2019/ui/EditLinkToolbar.js +8 -2
- package/dist/es2019/ui/EditToolbarButton/EditToolbarButtonPresentation.js +20 -5
- package/dist/es2019/ui/EditToolbarButton/index.js +20 -5
- package/dist/es2019/ui/EditorLinkingPlatformAnalytics/index.js +7 -1
- package/dist/es2019/ui/HyperlinkToolbarAppearance.js +3 -0
- package/dist/es2019/ui/InlineCardOverlay/index.js +47 -43
- package/dist/es2019/ui/LayoutButton/index.js +4 -1
- package/dist/es2019/ui/LinkToolbarAppearance.js +0 -1
- package/dist/es2019/ui/ResizableEmbedCard.js +6 -1
- package/dist/es2019/ui/analytics/events-from-tr.js +3 -0
- package/dist/es2019/ui/analytics/utils.js +4 -1
- package/dist/es2019/ui/editDatasourceAction.js +4 -1
- package/dist/es2019/ui/toolbar.js +32 -7
- package/dist/esm/cardPlugin.js +2 -0
- package/dist/esm/nodeviews/blockCard.js +6 -1
- package/dist/esm/nodeviews/embedCard.js +12 -2
- package/dist/esm/nodeviews/genericCard.js +2 -0
- package/dist/esm/nodeviews/inlineCard.js +10 -2
- package/dist/esm/pm-plugins/doc.js +25 -5
- package/dist/esm/pm-plugins/keymap.js +5 -0
- package/dist/esm/pm-plugins/main.js +5 -1
- package/dist/esm/pm-plugins/util/resolve.js +8 -2
- package/dist/esm/pm-plugins/utils.js +4 -1
- package/dist/esm/ui/DatasourceIcon/index.js +4 -0
- package/dist/esm/ui/EditLinkToolbar.js +8 -2
- package/dist/esm/ui/EditToolbarButton/EditToolbarButtonPresentation.js +20 -5
- package/dist/esm/ui/EditToolbarButton/index.js +20 -5
- package/dist/esm/ui/EditorLinkingPlatformAnalytics/index.js +7 -1
- package/dist/esm/ui/HyperlinkToolbarAppearance.js +3 -0
- package/dist/esm/ui/InlineCardOverlay/index.js +49 -45
- package/dist/esm/ui/LayoutButton/index.js +4 -1
- package/dist/esm/ui/LinkToolbarAppearance.js +0 -1
- package/dist/esm/ui/ResizableEmbedCard.js +6 -1
- package/dist/esm/ui/analytics/events-from-tr.js +3 -0
- package/dist/esm/ui/analytics/utils.js +4 -1
- package/dist/esm/ui/editDatasourceAction.js +4 -1
- package/dist/esm/ui/toolbar.js +32 -7
- package/dist/types/ui/EditLinkToolbar.d.ts +1 -1
- package/dist/types/ui/LinkToolbarAppearance.d.ts +1 -1
- package/dist/types/ui/analytics/types.d.ts +1 -1
- package/dist/types/ui/datasourceErrorBoundary.d.ts +1 -1
- package/dist/types-ts4.5/ui/EditLinkToolbar.d.ts +1 -1
- package/dist/types-ts4.5/ui/LinkToolbarAppearance.d.ts +1 -1
- package/dist/types-ts4.5/ui/analytics/types.d.ts +1 -1
- package/dist/types-ts4.5/ui/datasourceErrorBoundary.d.ts +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
package/dist/cjs/cardPlugin.js
CHANGED
|
@@ -29,7 +29,8 @@ var _EditorSmartCardEvents = require("./ui/EditorSmartCardEvents");
|
|
|
29
29
|
var _LayoutButton = _interopRequireDefault(require("./ui/LayoutButton"));
|
|
30
30
|
var _toolbar = require("./ui/toolbar");
|
|
31
31
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
32
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
32
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } // Ignored via go/ees005
|
|
33
|
+
// eslint-disable-next-line import/no-named-as-default
|
|
33
34
|
var cardPlugin = exports.cardPlugin = function cardPlugin(_ref) {
|
|
34
35
|
var _options$lpLinkPicker;
|
|
35
36
|
var _ref$config = _ref.config,
|
|
@@ -32,6 +32,8 @@ var BlockCardComponent = exports.BlockCardComponent = /*#__PURE__*/function (_Re
|
|
|
32
32
|
var _this;
|
|
33
33
|
(0, _classCallCheck2.default)(this, BlockCardComponent);
|
|
34
34
|
_this = _callSuper(this, BlockCardComponent, [props]);
|
|
35
|
+
// Ignored via go/ees005
|
|
36
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
35
37
|
(0, _defineProperty2.default)(_this, "onResolve", function (data) {
|
|
36
38
|
var _this$props = _this.props,
|
|
37
39
|
getPos = _this$props.getPos,
|
|
@@ -193,7 +195,10 @@ var blockCardNodeView = exports.blockCardNodeView = function blockCardNodeView(_
|
|
|
193
195
|
onClickCallback = _ref3.onClickCallback,
|
|
194
196
|
allowDatasource = _ref3.allowDatasource,
|
|
195
197
|
inlineCardViewProducer = _ref3.inlineCardViewProducer;
|
|
196
|
-
return function (node, view, getPos, decorations
|
|
198
|
+
return function (node, view, getPos, decorations
|
|
199
|
+
// Ignored via go/ees005
|
|
200
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
201
|
+
) {
|
|
197
202
|
var portalProviderAPI = pmPluginFactoryParams.portalProviderAPI,
|
|
198
203
|
eventDispatcher = pmPluginFactoryParams.eventDispatcher;
|
|
199
204
|
var reactComponentProps = {
|
|
@@ -70,7 +70,10 @@ var CardInner = function CardInner(_ref) {
|
|
|
70
70
|
richMediaWrapperHeight = heightAlone;
|
|
71
71
|
richMediaWrapperWidth = undefined;
|
|
72
72
|
}
|
|
73
|
-
return /*#__PURE__*/_react.default.createElement(_ui.MediaSingle
|
|
73
|
+
return /*#__PURE__*/_react.default.createElement(_ui.MediaSingle
|
|
74
|
+
// Ignored via go/ees005
|
|
75
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
76
|
+
, (0, _extends2.default)({}, cardProps, {
|
|
74
77
|
height: richMediaWrapperHeight,
|
|
75
78
|
width: richMediaWrapperWidth,
|
|
76
79
|
nodeType: "embedCard",
|
|
@@ -87,7 +90,10 @@ var CardInner = function CardInner(_ref) {
|
|
|
87
90
|
highlight: highlight
|
|
88
91
|
});
|
|
89
92
|
};
|
|
90
|
-
return /*#__PURE__*/_react.default.createElement(_ResizableEmbedCard.default
|
|
93
|
+
return /*#__PURE__*/_react.default.createElement(_ResizableEmbedCard.default
|
|
94
|
+
// Ignored via go/ees005
|
|
95
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
96
|
+
, (0, _extends2.default)({}, cardProps, {
|
|
91
97
|
height: heightAlone,
|
|
92
98
|
aspectRatio: aspectRatio,
|
|
93
99
|
view: view,
|
|
@@ -98,6 +104,8 @@ var CardInner = function CardInner(_ref) {
|
|
|
98
104
|
displayGrid: displayGrid,
|
|
99
105
|
updateSize: updateSize,
|
|
100
106
|
dispatchAnalyticsEvent: dispatchAnalyticsEvent
|
|
107
|
+
// Ignored via go/ees005
|
|
108
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
101
109
|
}, (0, _platformFeatureFlags.fg)('platform_fix_embedded_card_re-rendering') && {
|
|
102
110
|
isResizeDisabled: editorDisabledState === null || editorDisabledState === void 0 ? void 0 : editorDisabledState.editorDisabled
|
|
103
111
|
}), smartCard);
|
|
@@ -108,6 +116,8 @@ var EmbedCardComponent = exports.EmbedCardComponent = /*#__PURE__*/function (_Re
|
|
|
108
116
|
var _this;
|
|
109
117
|
(0, _classCallCheck2.default)(this, EmbedCardComponent);
|
|
110
118
|
_this = _callSuper(this, EmbedCardComponent, [props]);
|
|
119
|
+
// Ignored via go/ees005
|
|
120
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
111
121
|
(0, _defineProperty2.default)(_this, "embedIframeRef", /*#__PURE__*/_react.default.createRef());
|
|
112
122
|
(0, _defineProperty2.default)(_this, "state", {
|
|
113
123
|
hasPreview: true
|
|
@@ -127,6 +127,8 @@ function Card(SmartCardComponent, UnsupportedComponent) {
|
|
|
127
127
|
return /*#__PURE__*/_react.default.createElement(SmartCardComponent, (0, _extends2.default)({
|
|
128
128
|
key: url,
|
|
129
129
|
cardContext: cardContext
|
|
130
|
+
// Ignored via go/ees005
|
|
131
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
130
132
|
}, _this2.props, {
|
|
131
133
|
onClick: onClick
|
|
132
134
|
}));
|
|
@@ -40,7 +40,10 @@ var InlineCard = exports.InlineCard = /*#__PURE__*/(0, _react.memo)(function (_r
|
|
|
40
40
|
var _node$attrs = node.attrs,
|
|
41
41
|
url = _node$attrs.url,
|
|
42
42
|
data = _node$attrs.data;
|
|
43
|
-
var scrollContainer = (0, _react.useMemo)(
|
|
43
|
+
var scrollContainer = (0, _react.useMemo)(
|
|
44
|
+
// Ignored via go/ees005
|
|
45
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
46
|
+
function () {
|
|
44
47
|
return (0, _ui.findOverflowScrollParent)(view.dom) || undefined;
|
|
45
48
|
}, [view.dom]);
|
|
46
49
|
var onResolve = (0, _react.useCallback)(function (data) {
|
|
@@ -161,11 +164,16 @@ function InlineCardNodeView(props) {
|
|
|
161
164
|
useAlternativePreloader: useAlternativePreloader,
|
|
162
165
|
pluginInjectionApi: pluginInjectionApi,
|
|
163
166
|
onClickCallback: onClickCallback
|
|
167
|
+
// Ignored via go/ees005
|
|
168
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
164
169
|
}, enableInlineUpgradeFeatures && (0, _utils.getAwarenessProps)(view.state, getPos, allowEmbeds, allowBlockCards, (editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode) === 'view')));
|
|
165
170
|
}
|
|
166
171
|
var inlineCardNodeView = exports.inlineCardNodeView = function inlineCardNodeView(_ref2) {
|
|
167
172
|
var inlineCardViewProducer = _ref2.inlineCardViewProducer;
|
|
168
|
-
return function (node, view, getPos, decorations
|
|
173
|
+
return function (node, view, getPos, decorations
|
|
174
|
+
// Ignored via go/ees005
|
|
175
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
176
|
+
) {
|
|
169
177
|
return inlineCardViewProducer(node, view, getPos, decorations);
|
|
170
178
|
};
|
|
171
179
|
};
|
|
@@ -24,6 +24,8 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
24
24
|
/**
|
|
25
25
|
* Attempt to replace the link into the respective card.
|
|
26
26
|
*/
|
|
27
|
+
// Ignored via go/ees005
|
|
28
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
27
29
|
function replaceLinksToCards(tr, cardAdf, schema, request) {
|
|
28
30
|
var inlineCard = schema.nodes.inlineCard;
|
|
29
31
|
var url = request.url;
|
|
@@ -61,7 +63,10 @@ function replaceLinksToCards(tr, cardAdf, schema, request) {
|
|
|
61
63
|
}
|
|
62
64
|
return $pos.node($pos.depth - 1).type.name;
|
|
63
65
|
}
|
|
64
|
-
var replaceQueuedUrlWithCard = exports.replaceQueuedUrlWithCard = function replaceQueuedUrlWithCard(url, cardData, analyticsAction, editorAnalyticsApi, createAnalyticsEvent
|
|
66
|
+
var replaceQueuedUrlWithCard = exports.replaceQueuedUrlWithCard = function replaceQueuedUrlWithCard(url, cardData, analyticsAction, editorAnalyticsApi, createAnalyticsEvent
|
|
67
|
+
// Ignored via go/ees005
|
|
68
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
69
|
+
) {
|
|
65
70
|
return function (editorState, dispatch) {
|
|
66
71
|
var state = _pluginKey.pluginKey.getState(editorState);
|
|
67
72
|
if (!state) {
|
|
@@ -199,7 +204,10 @@ var queueCardsFromChangedTr = exports.queueCardsFromChangedTr = function queueCa
|
|
|
199
204
|
var queueCardFromChangedTr = exports.queueCardFromChangedTr = function queueCardFromChangedTr(state, tr, source, analyticsAction) {
|
|
200
205
|
var normalizeLinkText = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;
|
|
201
206
|
var sourceEvent = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : undefined;
|
|
202
|
-
var previousAppearance
|
|
207
|
+
var previousAppearance
|
|
208
|
+
// Ignored via go/ees005
|
|
209
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
210
|
+
= arguments.length > 6 ? arguments[6] : undefined;
|
|
203
211
|
var schema = state.schema;
|
|
204
212
|
var link = schema.marks.link;
|
|
205
213
|
var requests = [];
|
|
@@ -259,7 +267,10 @@ var convertHyperlinkToSmartCard = exports.convertHyperlinkToSmartCard = function
|
|
|
259
267
|
});
|
|
260
268
|
return (0, _actions.queueCards)(requests)(state.tr);
|
|
261
269
|
};
|
|
262
|
-
var changeSelectedCardToLink = exports.changeSelectedCardToLink = function changeSelectedCardToLink(text, href, sendAnalytics, node, pos, editorAnalyticsApi
|
|
270
|
+
var changeSelectedCardToLink = exports.changeSelectedCardToLink = function changeSelectedCardToLink(text, href, sendAnalytics, node, pos, editorAnalyticsApi
|
|
271
|
+
// Ignored via go/ees005
|
|
272
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
273
|
+
) {
|
|
263
274
|
return function (state, dispatch) {
|
|
264
275
|
var selectedNode = state.selection instanceof _state.NodeSelection ? state.selection.node : undefined;
|
|
265
276
|
var tr;
|
|
@@ -288,7 +299,10 @@ var changeSelectedCardToLink = exports.changeSelectedCardToLink = function chang
|
|
|
288
299
|
return true;
|
|
289
300
|
};
|
|
290
301
|
};
|
|
291
|
-
var changeSelectedCardToLinkFallback = exports.changeSelectedCardToLinkFallback = function changeSelectedCardToLinkFallback(text, href, sendAnalytics, node, pos, editorAnalyticsApi
|
|
302
|
+
var changeSelectedCardToLinkFallback = exports.changeSelectedCardToLinkFallback = function changeSelectedCardToLinkFallback(text, href, sendAnalytics, node, pos, editorAnalyticsApi
|
|
303
|
+
// Ignored via go/ees005
|
|
304
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
305
|
+
) {
|
|
292
306
|
return function (state, dispatch) {
|
|
293
307
|
var tr;
|
|
294
308
|
if (node && pos) {
|
|
@@ -339,6 +353,9 @@ function cardToLinkWithTransaction(state, text, href) {
|
|
|
339
353
|
})]), false);
|
|
340
354
|
return tr;
|
|
341
355
|
}
|
|
356
|
+
|
|
357
|
+
// Ignored via go/ees005
|
|
358
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
342
359
|
function cardNodeToLinkWithTransaction(state, text, href, node, pos) {
|
|
343
360
|
var link = state.schema.marks.link;
|
|
344
361
|
var url = node.attrs.url || node.attrs.data.url;
|
|
@@ -504,7 +521,10 @@ var updateCardViaDatasource = exports.updateCardViaDatasource = function updateC
|
|
|
504
521
|
}
|
|
505
522
|
view.dispatch(tr.scrollIntoView());
|
|
506
523
|
};
|
|
507
|
-
var insertDatasource = exports.insertDatasource = function insertDatasource(state, adf, view, sourceEvent
|
|
524
|
+
var insertDatasource = exports.insertDatasource = function insertDatasource(state, adf, view, sourceEvent
|
|
525
|
+
// Ignored via go/ees005
|
|
526
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
527
|
+
) {
|
|
508
528
|
var tr = state.tr,
|
|
509
529
|
from = state.selection.from,
|
|
510
530
|
schemaNodes = state.schema.nodes;
|
|
@@ -57,7 +57,12 @@ function cardKeymap(featureFlags) {
|
|
|
57
57
|
|
|
58
58
|
// https://bugs.chromium.org/p/chromium/issues/detail?id=1227468 introduced since Chrome 91
|
|
59
59
|
if (_browser.browser.chrome && _browser.browser.chrome_version > 90) {
|
|
60
|
+
// Ignored via go/ees005
|
|
61
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
60
62
|
(0, _keymaps.bindKeymapWithCommand)(_keymaps.moveUp.common, selectAboveBelowInlineCard('up'), list);
|
|
63
|
+
|
|
64
|
+
// Ignored via go/ees005
|
|
65
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
61
66
|
(0, _keymaps.bindKeymapWithCommand)(_keymaps.moveDown.common, selectAboveBelowInlineCard('down'), list);
|
|
62
67
|
}
|
|
63
68
|
return (0, _keymap.keymap)(list);
|
|
@@ -185,7 +185,11 @@ var createPlugin = exports.createPlugin = function createPlugin(options, pluginI
|
|
|
185
185
|
var isBlockCardSelected = selection instanceof _state.NodeSelection && ((_selection$node = selection.node) === null || _selection$node === void 0 ? void 0 : _selection$node.type) === schema.nodes.blockCard;
|
|
186
186
|
if (isBlockCardSelected) {
|
|
187
187
|
var _findDomRefAtPos, _node$attrs;
|
|
188
|
-
|
|
188
|
+
// Ignored via go/ees005
|
|
189
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
190
|
+
var datasourceTableRef = // Ignored via go/ees005
|
|
191
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
192
|
+
(_findDomRefAtPos = (0, _utils.findDomRefAtPos)(selection.from, domAtPos)) === null || _findDomRefAtPos === void 0 ? void 0 : _findDomRefAtPos.querySelector(".".concat(_styles.DATASOURCE_INNER_CONTAINER_CLASSNAME));
|
|
189
193
|
var node = selection.node;
|
|
190
194
|
var isDatasource = !!(node !== null && node !== void 0 && (_node$attrs = node.attrs) !== null && _node$attrs !== void 0 && _node$attrs.datasource);
|
|
191
195
|
var shouldUpdateTableRef = datasourceTableRef && (currentState === null || currentState === void 0 ? void 0 : currentState.datasourceTableRef) !== datasourceTableRef;
|
|
@@ -34,7 +34,10 @@ var isFreshlyPastedOnNewLine = function isFreshlyPastedOnNewLine(view) {
|
|
|
34
34
|
// ============================================================================ //
|
|
35
35
|
// Used for all interactions with the EditorCardProvider.
|
|
36
36
|
// ============================================================================ //
|
|
37
|
-
var resolveWithProvider = exports.resolveWithProvider = function resolveWithProvider(view, provider, request, options, editorAnalyticsApi, createAnalyticsEvent
|
|
37
|
+
var resolveWithProvider = exports.resolveWithProvider = function resolveWithProvider(view, provider, request, options, editorAnalyticsApi, createAnalyticsEvent
|
|
38
|
+
// Ignored via go/ees005
|
|
39
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
40
|
+
) {
|
|
38
41
|
var isEmbedFriendlyLocation = (0, _platformFeatureFlags.fg)('hardcoded-embeds-only-on-new-line') ? isFreshlyPastedOnNewLine(view) : true;
|
|
39
42
|
|
|
40
43
|
// When user manually changes appearance from blue link to smart link, we should respect that,
|
|
@@ -64,7 +67,10 @@ var updateCardType = function updateCardType(resolvedCard, options) {
|
|
|
64
67
|
resolvedCard.type = 'inlineCard';
|
|
65
68
|
}
|
|
66
69
|
};
|
|
67
|
-
var handleResolved = function handleResolved(view, request, editorAnalyticsApi, createAnalyticsEvent, options
|
|
70
|
+
var handleResolved = function handleResolved(view, request, editorAnalyticsApi, createAnalyticsEvent, options
|
|
71
|
+
// Ignored via go/ees005
|
|
72
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
73
|
+
) {
|
|
68
74
|
return function (resolvedCard) {
|
|
69
75
|
updateCardType(resolvedCard, options);
|
|
70
76
|
(0, _doc.replaceQueuedUrlWithCard)(request.url, resolvedCard, request.analyticsAction, editorAnalyticsApi, createAnalyticsEvent)(view.state, view.dispatch);
|
|
@@ -57,7 +57,10 @@ var findCardInfo = exports.findCardInfo = function findCardInfo(state) {
|
|
|
57
57
|
return cardInfo.pos === state.selection.from;
|
|
58
58
|
});
|
|
59
59
|
};
|
|
60
|
-
var isAppearanceSupportedInParent = function isAppearanceSupportedInParent(currentNodePosition, editorState, fragment, currentAppearance
|
|
60
|
+
var isAppearanceSupportedInParent = function isAppearanceSupportedInParent(currentNodePosition, editorState, fragment, currentAppearance
|
|
61
|
+
// Ignored via go/ees005
|
|
62
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
63
|
+
) {
|
|
61
64
|
var resolvedPosition = editorState.doc.resolve(currentNodePosition);
|
|
62
65
|
var parent = currentAppearance === 'embed' || currentAppearance === 'block' ? resolvedPosition.node() : resolvedPosition.node(-1);
|
|
63
66
|
return parent && parent.type.validContent(fragment);
|
|
@@ -16,6 +16,8 @@ var IconDatasourceGlyph = function IconDatasourceGlyph(props) {
|
|
|
16
16
|
height: "15",
|
|
17
17
|
viewBox: "0 0 15 15",
|
|
18
18
|
fill: "none"
|
|
19
|
+
// Ignored via go/ees005
|
|
20
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
19
21
|
}, props), /*#__PURE__*/_react.default.createElement("path", {
|
|
20
22
|
fillRule: "evenodd",
|
|
21
23
|
clipRule: "evenodd",
|
|
@@ -35,5 +37,7 @@ var DatasourceIcon = exports.DatasourceIcon = function DatasourceIcon(props) {
|
|
|
35
37
|
xcss: wrapperStyles
|
|
36
38
|
}, /*#__PURE__*/_react.default.createElement(_icon.default, (0, _extends2.default)({
|
|
37
39
|
glyph: IconDatasourceGlyph
|
|
40
|
+
// Ignored via go/ees005
|
|
41
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
38
42
|
}, props)));
|
|
39
43
|
};
|
|
@@ -102,7 +102,10 @@ var EditLinkToolbar = exports.EditLinkToolbar = /*#__PURE__*/function (_React$Co
|
|
|
102
102
|
// via the floating toolbar
|
|
103
103
|
,
|
|
104
104
|
invokeMethod: _analytics.INPUT_METHOD.FLOATING_TB,
|
|
105
|
-
lpLinkPicker: lpLinkPicker
|
|
105
|
+
lpLinkPicker: lpLinkPicker
|
|
106
|
+
// Ignored via go/ees005
|
|
107
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
108
|
+
,
|
|
106
109
|
onSubmit: function onSubmit(href, title, displayText, inputMethod, analytic) {
|
|
107
110
|
_this.hideLinkToolbar();
|
|
108
111
|
if (_onSubmit) {
|
|
@@ -173,7 +176,10 @@ var buildEditLinkToolbar = exports.buildEditLinkToolbar = function buildEditLink
|
|
|
173
176
|
text: displayInfo.title || '',
|
|
174
177
|
node: node,
|
|
175
178
|
lpLinkPicker: lpLinkPicker,
|
|
176
|
-
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
|
|
179
|
+
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
|
|
180
|
+
// Ignored via go/ees005
|
|
181
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
182
|
+
,
|
|
177
183
|
onSubmit: function onSubmit(newHref, newText, inputMethod, analytic) {
|
|
178
184
|
var urlChanged = newHref !== displayInfo.url;
|
|
179
185
|
var titleChanged = newText !== displayInfo.title;
|
|
@@ -69,7 +69,10 @@ var EditToolbarButtonPresentation = function EditToolbarButtonPresentation(_ref)
|
|
|
69
69
|
}, (0, _react2.jsx)(_ui.FloatingToolbarButton, {
|
|
70
70
|
testId: "edit-link",
|
|
71
71
|
onClick: onEditLink
|
|
72
|
-
}, (0, _react2.jsx)(_reactIntlNext.FormattedMessage
|
|
72
|
+
}, (0, _react2.jsx)(_reactIntlNext.FormattedMessage
|
|
73
|
+
// Ignored via go/ees005
|
|
74
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
75
|
+
, _messages.linkToolbarMessages.editLink)), (0, _react2.jsx)(_ui.FloatingToolbarSeparator, null));
|
|
73
76
|
}
|
|
74
77
|
case 'edit-datasource':
|
|
75
78
|
{
|
|
@@ -79,7 +82,10 @@ var EditToolbarButtonPresentation = function EditToolbarButtonPresentation(_ref)
|
|
|
79
82
|
testId: "edit-datasource",
|
|
80
83
|
tooltipContent: intl.formatMessage(_messages.linkToolbarMessages.editDatasourceStandaloneTooltip),
|
|
81
84
|
onClick: onEditDatasource
|
|
82
|
-
}, (0, _react2.jsx)(_reactIntlNext.FormattedMessage
|
|
85
|
+
}, (0, _react2.jsx)(_reactIntlNext.FormattedMessage
|
|
86
|
+
// Ignored via go/ees005
|
|
87
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
88
|
+
, _messages.linkToolbarMessages.editDatasourceStandalone)), (0, _react2.jsx)(_ui.FloatingToolbarSeparator, null));
|
|
83
89
|
}
|
|
84
90
|
case 'edit-dropdown':
|
|
85
91
|
{
|
|
@@ -96,7 +102,10 @@ var EditToolbarButtonPresentation = function EditToolbarButtonPresentation(_ref)
|
|
|
96
102
|
selected: isOpen,
|
|
97
103
|
disabled: false,
|
|
98
104
|
ariaHasPopup: true
|
|
99
|
-
}, (0, _react2.jsx)(_reactIntlNext.FormattedMessage
|
|
105
|
+
}, (0, _react2.jsx)(_reactIntlNext.FormattedMessage
|
|
106
|
+
// Ignored via go/ees005
|
|
107
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
108
|
+
, _messages.cardMessages.editDropdownTriggerTitle)), (0, _react2.jsx)(_ui.FloatingToolbarSeparator, null));
|
|
100
109
|
return (0, _react2.jsx)(_primitives.Flex, {
|
|
101
110
|
ref: containerRef
|
|
102
111
|
}, (0, _react2.jsx)(_uiMenu.DropdownContainer, {
|
|
@@ -113,11 +122,17 @@ var EditToolbarButtonPresentation = function EditToolbarButtonPresentation(_ref)
|
|
|
113
122
|
key: "edit.link",
|
|
114
123
|
onClick: onEditLink,
|
|
115
124
|
testId: "edit-dropdown-edit-link-item"
|
|
116
|
-
}, (0, _react2.jsx)(_reactIntlNext.FormattedMessage
|
|
125
|
+
}, (0, _react2.jsx)(_reactIntlNext.FormattedMessage
|
|
126
|
+
// Ignored via go/ees005
|
|
127
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
128
|
+
, _messages.cardMessages.editDropdownEditLinkTitle)), (0, _react2.jsx)(_menu.ButtonItem, {
|
|
117
129
|
key: "edit.datasource",
|
|
118
130
|
onClick: onEditDatasource,
|
|
119
131
|
testId: "edit-dropdown-edit-datasource-item"
|
|
120
|
-
}, (0, _react2.jsx)(_reactIntlNext.FormattedMessage
|
|
132
|
+
}, (0, _react2.jsx)(_reactIntlNext.FormattedMessage
|
|
133
|
+
// Ignored via go/ees005
|
|
134
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
135
|
+
, _messages.cardMessages.editDropdownEditDatasourceTitle))));
|
|
121
136
|
}
|
|
122
137
|
case 'none':
|
|
123
138
|
default:
|
|
@@ -100,7 +100,10 @@ var EditToolbarButtonWithCardContext = function EditToolbarButtonWithCardContext
|
|
|
100
100
|
}, (0, _react2.jsx)(_ui.FloatingToolbarButton, {
|
|
101
101
|
testId: "edit-link",
|
|
102
102
|
onClick: onEditLink
|
|
103
|
-
}, (0, _react2.jsx)(_reactIntlNext.FormattedMessage
|
|
103
|
+
}, (0, _react2.jsx)(_reactIntlNext.FormattedMessage
|
|
104
|
+
// Ignored via go/ees005
|
|
105
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
106
|
+
, _messages.linkToolbarMessages.editLink)), (0, _react2.jsx)(_ui.FloatingToolbarSeparator, null));
|
|
104
107
|
}
|
|
105
108
|
case 'edit-datasource':
|
|
106
109
|
{
|
|
@@ -110,7 +113,10 @@ var EditToolbarButtonWithCardContext = function EditToolbarButtonWithCardContext
|
|
|
110
113
|
testId: "edit-datasource",
|
|
111
114
|
tooltipContent: intl.formatMessage(_messages.linkToolbarMessages.editDatasourceStandaloneTooltip),
|
|
112
115
|
onClick: onEditDatasource
|
|
113
|
-
}, (0, _react2.jsx)(_reactIntlNext.FormattedMessage
|
|
116
|
+
}, (0, _react2.jsx)(_reactIntlNext.FormattedMessage
|
|
117
|
+
// Ignored via go/ees005
|
|
118
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
119
|
+
, _messages.linkToolbarMessages.editDatasourceStandalone)), (0, _react2.jsx)(_ui.FloatingToolbarSeparator, null));
|
|
114
120
|
}
|
|
115
121
|
case 'edit-dropdown':
|
|
116
122
|
{
|
|
@@ -127,7 +133,10 @@ var EditToolbarButtonWithCardContext = function EditToolbarButtonWithCardContext
|
|
|
127
133
|
selected: isOpen,
|
|
128
134
|
disabled: false,
|
|
129
135
|
ariaHasPopup: true
|
|
130
|
-
}, (0, _react2.jsx)(_reactIntlNext.FormattedMessage
|
|
136
|
+
}, (0, _react2.jsx)(_reactIntlNext.FormattedMessage
|
|
137
|
+
// Ignored via go/ees005
|
|
138
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
139
|
+
, _messages.cardMessages.editDropdownTriggerTitle)), (0, _react2.jsx)(_ui.FloatingToolbarSeparator, null));
|
|
131
140
|
return (0, _react2.jsx)(_primitives.Flex, {
|
|
132
141
|
ref: containerRef
|
|
133
142
|
}, (0, _react2.jsx)(_uiMenu.DropdownContainer, {
|
|
@@ -144,11 +153,17 @@ var EditToolbarButtonWithCardContext = function EditToolbarButtonWithCardContext
|
|
|
144
153
|
key: "edit.link",
|
|
145
154
|
onClick: onEditLink,
|
|
146
155
|
testId: "edit-dropdown-edit-link-item"
|
|
147
|
-
}, (0, _react2.jsx)(_reactIntlNext.FormattedMessage
|
|
156
|
+
}, (0, _react2.jsx)(_reactIntlNext.FormattedMessage
|
|
157
|
+
// Ignored via go/ees005
|
|
158
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
159
|
+
, _messages.cardMessages.editDropdownEditLinkTitle)), (0, _react2.jsx)(_menu.ButtonItem, {
|
|
148
160
|
key: "edit.datasource",
|
|
149
161
|
onClick: onEditDatasource,
|
|
150
162
|
testId: "edit-dropdown-edit-datasource-item"
|
|
151
|
-
}, (0, _react2.jsx)(_reactIntlNext.FormattedMessage
|
|
163
|
+
}, (0, _react2.jsx)(_reactIntlNext.FormattedMessage
|
|
164
|
+
// Ignored via go/ees005
|
|
165
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
166
|
+
, _messages.cardMessages.editDropdownEditDatasourceTitle))));
|
|
152
167
|
}
|
|
153
168
|
case 'none':
|
|
154
169
|
default:
|
|
@@ -29,7 +29,13 @@ var EditorLinkingPlatformAnalytics = exports.EditorLinkingPlatformAnalytics = /*
|
|
|
29
29
|
value: function render() {
|
|
30
30
|
return /*#__PURE__*/_react.default.createElement(_linkProvider.EditorSmartCardProvider, null, /*#__PURE__*/_react.default.createElement(_linkProvider.EditorSmartCardProviderValueGuard, null, /*#__PURE__*/_react.default.createElement(_EditorAnalyticsContext.EditorAnalyticsContext, {
|
|
31
31
|
editorView: this.props.editorView
|
|
32
|
-
}, /*#__PURE__*/_react.default.createElement(_LinkEvents.LinkEventsBinding
|
|
32
|
+
}, /*#__PURE__*/_react.default.createElement(_LinkEvents.LinkEventsBinding
|
|
33
|
+
// Ignored via go/ees005
|
|
34
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
35
|
+
, this.props), /*#__PURE__*/_react.default.createElement(_DatasourceEvents.DatasourceEventsBinding
|
|
36
|
+
// Ignored via go/ees005
|
|
37
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
38
|
+
, this.props))));
|
|
33
39
|
}
|
|
34
40
|
}]);
|
|
35
41
|
}(_react.default.PureComponent);
|
|
@@ -30,6 +30,9 @@ function HyperlinkToolbarAppearance(props) {
|
|
|
30
30
|
editorState = props.editorState,
|
|
31
31
|
cardOptions = props.cardOptions,
|
|
32
32
|
editorAnalyticsApi = props.editorAnalyticsApi;
|
|
33
|
+
|
|
34
|
+
// Ignored via go/ees005
|
|
35
|
+
// eslint-disable-next-line require-await
|
|
33
36
|
var getProvider = /*#__PURE__*/function () {
|
|
34
37
|
var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
35
38
|
var _props$cardOptions;
|
|
@@ -226,50 +226,54 @@ var InlineCardOverlay = function InlineCardOverlay(_ref) {
|
|
|
226
226
|
}, [isVisible, setVisibility]);
|
|
227
227
|
var intl = (0, _reactIntlNext.useIntl)();
|
|
228
228
|
var label = intl.formatMessage(_messages.cardMessages.inlineOverlay);
|
|
229
|
-
return (
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
,
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
,
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
,
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
229
|
+
return (
|
|
230
|
+
// Ignored via go/ees005
|
|
231
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
232
|
+
(0, _react2.jsx)("span", (0, _extends2.default)({}, props, {
|
|
233
|
+
css: containerStyles,
|
|
234
|
+
ref: containerRef
|
|
235
|
+
}), children, isVisible && (0, _react2.jsx)(_react.default.Fragment, null, (0, _react2.jsx)("span", {
|
|
236
|
+
"aria-hidden": "true",
|
|
237
|
+
className: OVERLAY_MARKER_CLASSNAME
|
|
238
|
+
}, _whitespace.ZERO_WIDTH_JOINER), (0, _react2.jsx)("a", {
|
|
239
|
+
css: [overlayStyles, showOverlay && showOverlayStyles],
|
|
240
|
+
style: {
|
|
241
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
242
|
+
marginLeft: availableWidth && -availableWidth,
|
|
243
|
+
width: availableWidth
|
|
244
|
+
},
|
|
245
|
+
"data-testid": testId,
|
|
246
|
+
href: url,
|
|
247
|
+
onClick: function onClick(e) {
|
|
248
|
+
return e.preventDefault();
|
|
249
|
+
},
|
|
250
|
+
tabIndex: -1
|
|
251
|
+
}, (0, _react2.jsx)("span", {
|
|
252
|
+
css: overflowingContainerStyles
|
|
253
|
+
}, (0, _react2.jsx)("span", {
|
|
254
|
+
css: iconAndLabelStyles
|
|
255
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
256
|
+
,
|
|
257
|
+
className: ICON_AND_LABEL_CLASSNAME
|
|
258
|
+
}, (0, _react2.jsx)("span", {
|
|
259
|
+
css: iconStyles
|
|
260
|
+
}, (0, _react2.jsx)(_preferences.default, {
|
|
261
|
+
label: label,
|
|
262
|
+
size: iconSize.current,
|
|
263
|
+
testId: "".concat(testId, "-icon")
|
|
264
|
+
})), showLabel && (0, _react2.jsx)("span", {
|
|
265
|
+
css: labelStyles
|
|
266
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
267
|
+
,
|
|
268
|
+
className: OVERLAY_LABEL_CLASSNAME,
|
|
269
|
+
"data-testid": "".concat(testId, "-label")
|
|
270
|
+
}, label)), (0, _react2.jsx)("span", {
|
|
271
|
+
css: gradientStyles
|
|
272
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
273
|
+
,
|
|
274
|
+
className: OVERLAY_GRADIENT_CLASSNAME,
|
|
275
|
+
"data-testid": "".concat(testId, "-gradient")
|
|
276
|
+
})))))
|
|
277
|
+
);
|
|
274
278
|
};
|
|
275
279
|
var _default = exports.default = InlineCardOverlay;
|
|
@@ -119,7 +119,10 @@ var LayoutButtonWrapper = function LayoutButtonWrapper(_ref2) {
|
|
|
119
119
|
return (0, _react2.jsx)(LayoutButton, {
|
|
120
120
|
mountPoint: mountPoint,
|
|
121
121
|
scrollableElement: scrollableElement,
|
|
122
|
-
boundariesElement: boundariesElement
|
|
122
|
+
boundariesElement: boundariesElement
|
|
123
|
+
// Ignored via go/ees005
|
|
124
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
125
|
+
,
|
|
123
126
|
targetElement: datasourceTableRef,
|
|
124
127
|
layout: (0, _utils3.isDatasourceTableLayout)(layout) ? layout : undefined,
|
|
125
128
|
onLayoutChange: onLayoutChange,
|
|
@@ -377,7 +377,10 @@ var ResizableEmbedCard = exports.default = /*#__PURE__*/function (_React$Compone
|
|
|
377
377
|
containerWidth: containerWidth || _editorSharedStyles.DEFAULT_EMBED_CARD_WIDTH,
|
|
378
378
|
fullWidthMode: fullWidthMode
|
|
379
379
|
})
|
|
380
|
-
}, (0, _react2.jsx)(_ui.Resizer
|
|
380
|
+
}, (0, _react2.jsx)(_ui.Resizer
|
|
381
|
+
// Ignored via go/ees005
|
|
382
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
383
|
+
, (0, _extends2.default)({}, this.props, {
|
|
381
384
|
enable: enable,
|
|
382
385
|
calcNewSize: this.calcNewSize,
|
|
383
386
|
snapPoints: this.calcSnapPoints(),
|
|
@@ -385,6 +388,8 @@ var ResizableEmbedCard = exports.default = /*#__PURE__*/function (_React$Compone
|
|
|
385
388
|
highlights: this.highlights,
|
|
386
389
|
nodeType: "embed",
|
|
387
390
|
handleStyles: nestedInTableHandleStyles(this.isNestedInTable())
|
|
391
|
+
// Ignored via go/ees005
|
|
392
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
388
393
|
}, resizerProps), children, this.getHeightDefiningComponent())));
|
|
389
394
|
/* eslint-enable @atlaskit/design-system/consistent-css-prop-usage */
|
|
390
395
|
}
|
|
@@ -83,6 +83,9 @@ var findChanged = exports.findChanged = function findChanged(tr, state) {
|
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
|
+
|
|
87
|
+
// Ignored via go/ees005
|
|
88
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
86
89
|
stepMap.forEach(function (oldStart, oldEnd, newStart, newEnd) {
|
|
87
90
|
var _tr$docs2;
|
|
88
91
|
var before = tr.docs[i];
|
|
@@ -92,7 +92,10 @@ var findAtPositions = exports.findAtPositions = function findAtPositions(tr, pos
|
|
|
92
92
|
}
|
|
93
93
|
return entities;
|
|
94
94
|
};
|
|
95
|
-
var findInNodeRange = exports.findInNodeRange = function findInNodeRange(doc, from, to, predicate
|
|
95
|
+
var findInNodeRange = exports.findInNodeRange = function findInNodeRange(doc, from, to, predicate
|
|
96
|
+
// Ignored via go/ees005
|
|
97
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
98
|
+
) {
|
|
96
99
|
var entities = [];
|
|
97
100
|
doc.nodesBetween(from, to, function (node, pos) {
|
|
98
101
|
if (predicate(node)) {
|
|
@@ -7,7 +7,10 @@ exports.editDatasource = void 0;
|
|
|
7
7
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
8
8
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
9
9
|
var _actions = require("../pm-plugins/actions");
|
|
10
|
-
var editDatasource = exports.editDatasource = function editDatasource(datasourceId, editorAnalyticsApi, appearance, extensionKey
|
|
10
|
+
var editDatasource = exports.editDatasource = function editDatasource(datasourceId, editorAnalyticsApi, appearance, extensionKey
|
|
11
|
+
// Ignored via go/ees005
|
|
12
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
13
|
+
) {
|
|
11
14
|
return function (state, dispatch) {
|
|
12
15
|
var datasourceType = (0, _utils.getDatasourceType)(datasourceId);
|
|
13
16
|
if (dispatch && datasourceType) {
|