@atlaskit/editor-core 187.14.9 → 187.14.11
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 +6 -0
- package/dist/cjs/plugins/media/commands/captions.js +29 -27
- package/dist/cjs/plugins/media/commands/linking.js +21 -17
- package/dist/cjs/plugins/media/index.js +4 -3
- package/dist/cjs/plugins/media/nodeviews/mediaSingle.js +4 -2
- package/dist/cjs/plugins/media/pm-plugins/keymap.js +17 -15
- package/dist/cjs/plugins/media/pm-plugins/main.js +7 -5
- package/dist/cjs/plugins/media/toolbar/commands.js +149 -141
- package/dist/cjs/plugins/media/toolbar/index.js +20 -16
- package/dist/cjs/plugins/media/toolbar/linking.js +4 -3
- package/dist/cjs/plugins/media/utils/media-files.js +78 -75
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/plugins/media/commands/captions.js +4 -4
- package/dist/es2019/plugins/media/commands/linking.js +12 -11
- package/dist/es2019/plugins/media/index.js +6 -3
- package/dist/es2019/plugins/media/nodeviews/mediaSingle.js +4 -2
- package/dist/es2019/plugins/media/pm-plugins/keymap.js +5 -5
- package/dist/es2019/plugins/media/pm-plugins/main.js +7 -5
- package/dist/es2019/plugins/media/toolbar/commands.js +15 -15
- package/dist/es2019/plugins/media/toolbar/index.js +20 -16
- package/dist/es2019/plugins/media/toolbar/linking.js +6 -3
- package/dist/es2019/plugins/media/utils/media-files.js +5 -6
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/plugins/media/commands/captions.js +29 -27
- package/dist/esm/plugins/media/commands/linking.js +21 -17
- package/dist/esm/plugins/media/index.js +4 -3
- package/dist/esm/plugins/media/nodeviews/mediaSingle.js +4 -2
- package/dist/esm/plugins/media/pm-plugins/keymap.js +17 -15
- package/dist/esm/plugins/media/pm-plugins/main.js +7 -5
- package/dist/esm/plugins/media/toolbar/commands.js +148 -140
- package/dist/esm/plugins/media/toolbar/index.js +20 -16
- package/dist/esm/plugins/media/toolbar/linking.js +4 -3
- package/dist/esm/plugins/media/utils/media-files.js +78 -75
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/plugins/media/commands/captions.d.ts +2 -1
- package/dist/types/plugins/media/commands/linking.d.ts +3 -3
- package/dist/types/plugins/media/pm-plugins/keymap.d.ts +2 -1
- package/dist/types/plugins/media/pm-plugins/main.d.ts +1 -1
- package/dist/types/plugins/media/toolbar/commands.d.ts +5 -4
- package/dist/types/plugins/media/utils/media-files.d.ts +3 -2
- package/dist/types-ts4.5/plugins/media/commands/captions.d.ts +2 -1
- package/dist/types-ts4.5/plugins/media/commands/linking.d.ts +3 -3
- package/dist/types-ts4.5/plugins/media/pm-plugins/keymap.d.ts +2 -1
- package/dist/types-ts4.5/plugins/media/pm-plugins/main.d.ts +1 -1
- package/dist/types-ts4.5/plugins/media/toolbar/commands.d.ts +5 -4
- package/dist/types-ts4.5/plugins/media/utils/media-files.d.ts +3 -2
- package/package.json +4 -4
|
@@ -48,7 +48,7 @@ var handleRemoveMediaGroup = function handleRemoveMediaGroup(state, dispatch) {
|
|
|
48
48
|
}
|
|
49
49
|
return true;
|
|
50
50
|
};
|
|
51
|
-
var generateMediaCardFloatingToolbar = function generateMediaCardFloatingToolbar(state, intl, mediaPluginState, hoverDecoration) {
|
|
51
|
+
var generateMediaCardFloatingToolbar = function generateMediaCardFloatingToolbar(state, intl, mediaPluginState, hoverDecoration, editorAnalyticsAPI) {
|
|
52
52
|
var mediaGroup = state.schema.nodes.mediaGroup;
|
|
53
53
|
var items = [{
|
|
54
54
|
id: 'editor.media.view.switcher',
|
|
@@ -59,7 +59,7 @@ var generateMediaCardFloatingToolbar = function generateMediaCardFloatingToolbar
|
|
|
59
59
|
title: intl.formatMessage(_messages2.cardMessages.inline),
|
|
60
60
|
selected: false,
|
|
61
61
|
disabled: false,
|
|
62
|
-
onClick: _commands.changeMediaCardToInline,
|
|
62
|
+
onClick: (0, _commands.changeMediaCardToInline)(editorAnalyticsAPI),
|
|
63
63
|
testId: 'inline-appearance'
|
|
64
64
|
}, {
|
|
65
65
|
id: 'editor.media.view.switcher.thumbnail',
|
|
@@ -121,7 +121,7 @@ var generateMediaCardFloatingToolbar = function generateMediaCardFloatingToolbar
|
|
|
121
121
|
}];
|
|
122
122
|
return items;
|
|
123
123
|
};
|
|
124
|
-
var generateMediaInlineFloatingToolbar = function generateMediaInlineFloatingToolbar(state, intl, mediaPluginState, hoverDecoration) {
|
|
124
|
+
var generateMediaInlineFloatingToolbar = function generateMediaInlineFloatingToolbar(state, intl, mediaPluginState, hoverDecoration, editorAnalyticsAPI) {
|
|
125
125
|
var mediaInline = state.schema.nodes.mediaInline;
|
|
126
126
|
var items = [{
|
|
127
127
|
id: 'editor.media.view.switcher',
|
|
@@ -141,7 +141,7 @@ var generateMediaInlineFloatingToolbar = function generateMediaInlineFloatingToo
|
|
|
141
141
|
title: intl.formatMessage(_mediaUi.messages.displayThumbnail),
|
|
142
142
|
selected: false,
|
|
143
143
|
disabled: false,
|
|
144
|
-
onClick: _commands.changeInlineToMediaCard,
|
|
144
|
+
onClick: (0, _commands.changeInlineToMediaCard)(editorAnalyticsAPI),
|
|
145
145
|
testId: 'thumbnail-appearance'
|
|
146
146
|
}]
|
|
147
147
|
}, {
|
|
@@ -195,7 +195,7 @@ var generateMediaInlineFloatingToolbar = function generateMediaInlineFloatingToo
|
|
|
195
195
|
return items;
|
|
196
196
|
};
|
|
197
197
|
var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToolbar(state, intl, options, pluginState, mediaLinkingState, pluginInjectionApi, getEditorFeatureFlags) {
|
|
198
|
-
var _pluginInjectionApi$
|
|
198
|
+
var _pluginInjectionApi$d7;
|
|
199
199
|
var mediaSingle = state.schema.nodes.mediaSingle;
|
|
200
200
|
var allowResizing = options.allowResizing,
|
|
201
201
|
allowLinking = options.allowLinking,
|
|
@@ -216,10 +216,12 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
216
216
|
var borderMark = (0, _currentMediaNode.currentMediaNodeBorderMark)(state);
|
|
217
217
|
return /*#__PURE__*/_react.default.createElement(_ImageBorder.default, {
|
|
218
218
|
toggleBorder: function toggleBorder() {
|
|
219
|
-
|
|
219
|
+
var _pluginInjectionApi$d, _pluginInjectionApi$d2;
|
|
220
|
+
(0, _commands.toggleBorderMark)(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d = pluginInjectionApi.dependencies) === null || _pluginInjectionApi$d === void 0 ? void 0 : (_pluginInjectionApi$d2 = _pluginInjectionApi$d.analytics) === null || _pluginInjectionApi$d2 === void 0 ? void 0 : _pluginInjectionApi$d2.actions)(state, dispatch);
|
|
220
221
|
},
|
|
221
222
|
setBorder: function setBorder(attrs) {
|
|
222
|
-
|
|
223
|
+
var _pluginInjectionApi$d3, _pluginInjectionApi$d4;
|
|
224
|
+
(0, _commands.setBorderMark)(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d3 = pluginInjectionApi.dependencies) === null || _pluginInjectionApi$d3 === void 0 ? void 0 : (_pluginInjectionApi$d4 = _pluginInjectionApi$d3.analytics) === null || _pluginInjectionApi$d4 === void 0 ? void 0 : _pluginInjectionApi$d4.actions)(attrs)(state, dispatch);
|
|
223
225
|
},
|
|
224
226
|
showSomewhatSemanticTooltips: getEditorFeatureFlags === null || getEditorFeatureFlags === void 0 ? void 0 : getEditorFeatureFlags().useSomewhatSemanticTextColorNames,
|
|
225
227
|
borderMark: borderMark,
|
|
@@ -232,7 +234,7 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
232
234
|
});
|
|
233
235
|
}
|
|
234
236
|
if (allowAdvancedToolBarOptions) {
|
|
235
|
-
var _pluginInjectionApi$
|
|
237
|
+
var _pluginInjectionApi$d5;
|
|
236
238
|
var widthPlugin = pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.dependencies.width;
|
|
237
239
|
var isChangingLayoutDisabled = false;
|
|
238
240
|
if ((0, _platformFeatureFlags.getBooleanFF)('platform.editor.media.extended-resize-experience')) {
|
|
@@ -246,7 +248,7 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
246
248
|
}
|
|
247
249
|
}
|
|
248
250
|
}
|
|
249
|
-
var layoutButtons = (0, _card.buildLayoutButtons)(state, intl, state.schema.nodes.mediaSingle, widthPlugin, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$
|
|
251
|
+
var layoutButtons = (0, _card.buildLayoutButtons)(state, intl, state.schema.nodes.mediaSingle, widthPlugin, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d5 = pluginInjectionApi.dependencies.analytics) === null || _pluginInjectionApi$d5 === void 0 ? void 0 : _pluginInjectionApi$d5.actions, allowResizing, allowResizingInTables, true, true, isChangingLayoutDisabled);
|
|
250
252
|
toolbarButtons = [].concat((0, _toConsumableArray2.default)(toolbarButtons), (0, _toConsumableArray2.default)(layoutButtons));
|
|
251
253
|
if (layoutButtons.length) {
|
|
252
254
|
toolbarButtons.push({
|
|
@@ -268,10 +270,10 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
268
270
|
};
|
|
269
271
|
var openLink = function openLink() {
|
|
270
272
|
if (editorView) {
|
|
271
|
-
var _pluginInjectionApi$
|
|
273
|
+
var _pluginInjectionApi$d6;
|
|
272
274
|
var tr = editorView.state.tr,
|
|
273
275
|
dispatch = editorView.dispatch;
|
|
274
|
-
pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$
|
|
276
|
+
pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d6 = pluginInjectionApi.dependencies.analytics) === null || _pluginInjectionApi$d6 === void 0 ? void 0 : _pluginInjectionApi$d6.actions.attachAnalyticsEvent({
|
|
275
277
|
eventType: _analytics.EVENT_TYPE.TRACK,
|
|
276
278
|
action: _analytics.ACTION.VISITED,
|
|
277
279
|
actionSubject: _analytics.ACTION_SUBJECT.MEDIA,
|
|
@@ -301,7 +303,7 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
301
303
|
type: 'separator'
|
|
302
304
|
});
|
|
303
305
|
}
|
|
304
|
-
var _ref = (_pluginInjectionApi$
|
|
306
|
+
var _ref = (_pluginInjectionApi$d7 = pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.dependencies.decorations.actions) !== null && _pluginInjectionApi$d7 !== void 0 ? _pluginInjectionApi$d7 : {},
|
|
305
307
|
hoverDecoration = _ref.hoverDecoration;
|
|
306
308
|
var removeButton = {
|
|
307
309
|
id: 'editor.media.delete',
|
|
@@ -330,7 +332,7 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
330
332
|
return items;
|
|
331
333
|
};
|
|
332
334
|
var floatingToolbar = function floatingToolbar(state, intl) {
|
|
333
|
-
var _pluginInjectionApi$
|
|
335
|
+
var _pluginInjectionApi$d8;
|
|
334
336
|
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
335
337
|
var pluginInjectionApi = arguments.length > 3 ? arguments[3] : undefined;
|
|
336
338
|
var _state$schema$nodes = state.schema.nodes,
|
|
@@ -346,7 +348,7 @@ var floatingToolbar = function floatingToolbar(state, intl) {
|
|
|
346
348
|
getEditorFeatureFlags = options.getEditorFeatureFlags;
|
|
347
349
|
var mediaPluginState = _pluginKey.stateKey.getState(state);
|
|
348
350
|
var mediaLinkingState = (0, _linking2.getMediaLinkingState)(state);
|
|
349
|
-
var _ref2 = (_pluginInjectionApi$
|
|
351
|
+
var _ref2 = (_pluginInjectionApi$d8 = pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.dependencies.decorations.actions) !== null && _pluginInjectionApi$d8 !== void 0 ? _pluginInjectionApi$d8 : {},
|
|
350
352
|
hoverDecoration = _ref2.hoverDecoration;
|
|
351
353
|
if (!mediaPluginState || mediaPluginState.isResizing) {
|
|
352
354
|
return;
|
|
@@ -380,20 +382,22 @@ var floatingToolbar = function floatingToolbar(state, intl) {
|
|
|
380
382
|
selectedNodeType = state.selection.node.type;
|
|
381
383
|
}
|
|
382
384
|
if (allowMediaInline && (parentMediaGroupNode === null || parentMediaGroupNode === void 0 ? void 0 : parentMediaGroupNode.node.type) === mediaGroup) {
|
|
385
|
+
var _pluginInjectionApi$d9, _pluginInjectionApi$d10;
|
|
383
386
|
var mediaOffset = state.selection.$from.parentOffset + 1;
|
|
384
387
|
baseToolbar.getDomRef = function () {
|
|
385
388
|
var _mediaPluginState$ele;
|
|
386
389
|
var selector = (0, _mediaFilmstrip.mediaFilmstripItemDOMSelector)(mediaOffset);
|
|
387
390
|
return (_mediaPluginState$ele = mediaPluginState.element) === null || _mediaPluginState$ele === void 0 ? void 0 : _mediaPluginState$ele.querySelector(selector);
|
|
388
391
|
};
|
|
389
|
-
items = generateMediaCardFloatingToolbar(state, intl, mediaPluginState, hoverDecoration);
|
|
392
|
+
items = generateMediaCardFloatingToolbar(state, intl, mediaPluginState, hoverDecoration, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d9 = pluginInjectionApi.dependencies) === null || _pluginInjectionApi$d9 === void 0 ? void 0 : (_pluginInjectionApi$d10 = _pluginInjectionApi$d9.analytics) === null || _pluginInjectionApi$d10 === void 0 ? void 0 : _pluginInjectionApi$d10.actions);
|
|
390
393
|
} else if (allowMediaInline && selectedNodeType && selectedNodeType === mediaInline) {
|
|
394
|
+
var _pluginInjectionApi$d11, _pluginInjectionApi$d12;
|
|
391
395
|
baseToolbar.getDomRef = function () {
|
|
392
396
|
var _mediaPluginState$ele2;
|
|
393
397
|
var element = (_mediaPluginState$ele2 = mediaPluginState.element) === null || _mediaPluginState$ele2 === void 0 ? void 0 : _mediaPluginState$ele2.querySelector(".".concat(_styles.MediaInlineNodeSelector));
|
|
394
398
|
return element || mediaPluginState.element;
|
|
395
399
|
};
|
|
396
|
-
items = generateMediaInlineFloatingToolbar(state, intl, mediaPluginState, hoverDecoration);
|
|
400
|
+
items = generateMediaInlineFloatingToolbar(state, intl, mediaPluginState, hoverDecoration, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d11 = pluginInjectionApi.dependencies) === null || _pluginInjectionApi$d11 === void 0 ? void 0 : (_pluginInjectionApi$d12 = _pluginInjectionApi$d11.analytics) === null || _pluginInjectionApi$d12 === void 0 ? void 0 : _pluginInjectionApi$d12.actions);
|
|
397
401
|
} else {
|
|
398
402
|
baseToolbar.getDomRef = function () {
|
|
399
403
|
var _mediaPluginState$ele3;
|
|
@@ -58,7 +58,8 @@ var getLinkingToolbar = function getLinkingToolbar(toolbarBaseConfig, mediaLinki
|
|
|
58
58
|
intl: intl,
|
|
59
59
|
editing: editing,
|
|
60
60
|
onUnlink: function onUnlink() {
|
|
61
|
-
|
|
61
|
+
var _pluginInjectionApi$d, _pluginInjectionApi$d2;
|
|
62
|
+
return (0, _linking.unlink)(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d = pluginInjectionApi.dependencies) === null || _pluginInjectionApi$d === void 0 ? void 0 : (_pluginInjectionApi$d2 = _pluginInjectionApi$d.analytics) === null || _pluginInjectionApi$d2 === void 0 ? void 0 : _pluginInjectionApi$d2.actions)(view.state, view.dispatch, view);
|
|
62
63
|
},
|
|
63
64
|
onBack: function onBack(href, meta) {
|
|
64
65
|
if (href.trim() && meta.inputMethod) {
|
|
@@ -67,14 +68,14 @@ var getLinkingToolbar = function getLinkingToolbar(toolbarBaseConfig, mediaLinki
|
|
|
67
68
|
(0, _linking.hideLinkingToolbar)(view.state, view.dispatch, view);
|
|
68
69
|
},
|
|
69
70
|
onCancel: function onCancel() {
|
|
70
|
-
var _pluginInjectionApi$
|
|
71
|
+
var _pluginInjectionApi$d3;
|
|
71
72
|
(0, _linking.hideLinkingToolbar)(view.state, view.dispatch, view, true);
|
|
72
73
|
/** Focus should move to the 'Add link' button when the toolbar closes
|
|
73
74
|
* and not close the floating toolbar.
|
|
74
75
|
*/
|
|
75
76
|
var tr = view.state.tr,
|
|
76
77
|
dispatch = view.dispatch;
|
|
77
|
-
pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$
|
|
78
|
+
pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d3 = pluginInjectionApi.dependencies.floatingToolbar.actions) === null || _pluginInjectionApi$d3 === void 0 ? void 0 : _pluginInjectionApi$d3.forceFocusSelector(FORCE_FOCUS_SELECTOR)(tr);
|
|
78
79
|
dispatch(tr);
|
|
79
80
|
},
|
|
80
81
|
onSubmit: function onSubmit(href, meta) {
|
|
@@ -11,7 +11,6 @@ var _mediaCommon = require("./media-common");
|
|
|
11
11
|
var _utils3 = require("@atlaskit/editor-prosemirror/utils");
|
|
12
12
|
var _position = require("../../../utils/prosemirror/position");
|
|
13
13
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
14
|
-
var _analytics2 = require("../../analytics");
|
|
15
14
|
var canInsertMediaInline = function canInsertMediaInline(state) {
|
|
16
15
|
var node = state.schema.nodes.mediaInline.create({});
|
|
17
16
|
return (0, _utils3.canInsert)(state.selection.$to, _model.Fragment.from(node));
|
|
@@ -79,41 +78,43 @@ function shouldAppendParagraph(state, node) {
|
|
|
79
78
|
* @param mediaState Media file to be added to the editor
|
|
80
79
|
* @param collection Collection for the media to be added
|
|
81
80
|
*/
|
|
82
|
-
var insertMediaInlineNode = function insertMediaInlineNode(
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
81
|
+
var insertMediaInlineNode = function insertMediaInlineNode(editorAnalyticsAPI) {
|
|
82
|
+
return function (view, mediaState, collection, inputMethod) {
|
|
83
|
+
var state = view.state,
|
|
84
|
+
dispatch = view.dispatch;
|
|
85
|
+
var schema = state.schema,
|
|
86
|
+
tr = state.tr;
|
|
87
|
+
var mediaInline = schema.nodes.mediaInline;
|
|
88
88
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
89
|
+
// Do nothing if no media found
|
|
90
|
+
if (!mediaInline || !mediaState || collection === undefined) {
|
|
91
|
+
return false;
|
|
92
|
+
}
|
|
93
|
+
var id = mediaState.id;
|
|
94
|
+
var mediaInlineNode = mediaInline.create({
|
|
95
|
+
id: id,
|
|
96
|
+
collection: collection
|
|
97
|
+
});
|
|
98
|
+
var space = state.schema.text(' ');
|
|
99
|
+
var pos = state.selection.$to.pos;
|
|
100
100
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
101
|
+
// If the selection is inside an empty list item set pos inside paragraph
|
|
102
|
+
if ((0, _utils.isInListItem)(state) && (0, _mediaCommon.isInsidePotentialEmptyParagraph)(state)) {
|
|
103
|
+
pos = pos + 1;
|
|
104
|
+
}
|
|
105
|
+
var content = _model.Fragment.from([mediaInlineNode, space]);
|
|
106
106
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
107
|
+
// Delete the selection if a selection is made
|
|
108
|
+
var deleteRange = findDeleteRange(state);
|
|
109
|
+
if (!deleteRange) {
|
|
110
|
+
tr.insert(pos, content);
|
|
111
|
+
} else {
|
|
112
|
+
tr.insert(pos, content).deleteRange(deleteRange.start, deleteRange.end);
|
|
113
|
+
}
|
|
114
|
+
editorAnalyticsAPI === null || editorAnalyticsAPI === void 0 ? void 0 : editorAnalyticsAPI.attachAnalyticsEvent(getInsertMediaInlineAnalytics(mediaState, inputMethod))(tr);
|
|
115
|
+
dispatch(tr);
|
|
116
|
+
return true;
|
|
117
|
+
};
|
|
117
118
|
};
|
|
118
119
|
|
|
119
120
|
/**
|
|
@@ -124,51 +125,53 @@ var insertMediaInlineNode = function insertMediaInlineNode(view, mediaState, col
|
|
|
124
125
|
* @param collection Collection for the media to be added
|
|
125
126
|
*/
|
|
126
127
|
exports.insertMediaInlineNode = insertMediaInlineNode;
|
|
127
|
-
var insertMediaGroupNode = function insertMediaGroupNode(
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
128
|
+
var insertMediaGroupNode = function insertMediaGroupNode(editorAnalyticsAPI) {
|
|
129
|
+
return function (view, mediaStates, collection, inputMethod) {
|
|
130
|
+
var state = view.state,
|
|
131
|
+
dispatch = view.dispatch;
|
|
132
|
+
var tr = state.tr,
|
|
133
|
+
schema = state.schema;
|
|
134
|
+
var _schema$nodes = schema.nodes,
|
|
135
|
+
media = _schema$nodes.media,
|
|
136
|
+
paragraph = _schema$nodes.paragraph;
|
|
135
137
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
138
|
+
// Do nothing if no media found
|
|
139
|
+
if (!media || !mediaStates.length) {
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
var mediaNodes = createMediaFileNodes(mediaStates, collection, media);
|
|
143
|
+
var mediaInsertPos = findMediaInsertPos(state);
|
|
144
|
+
var resolvedInsertPos = tr.doc.resolve(mediaInsertPos);
|
|
145
|
+
var parent = resolvedInsertPos.parent;
|
|
146
|
+
var nodeAtInsertionPoint = tr.doc.nodeAt(mediaInsertPos);
|
|
147
|
+
var shouldSplit = !isSelectionMediaGroup(state) && (0, _utils2.isSupportedInParent)(state, _model.Fragment.from(state.schema.nodes.mediaGroup.createChecked({}, mediaNodes)));
|
|
148
|
+
var withParagraph = shouldAppendParagraph(state, nodeAtInsertionPoint);
|
|
149
|
+
var content = parent.type === schema.nodes.mediaGroup ? mediaNodes // If parent is a mediaGroup do not wrap items again.
|
|
150
|
+
: [schema.nodes.mediaGroup.createChecked({}, mediaNodes)];
|
|
151
|
+
if (shouldSplit) {
|
|
152
|
+
content = withParagraph ? content.concat(paragraph.create()) : content;
|
|
153
|
+
// delete the selection or empty paragraph
|
|
154
|
+
var deleteRange = findDeleteRange(state);
|
|
155
|
+
if (!deleteRange) {
|
|
156
|
+
tr.insert(mediaInsertPos, content);
|
|
157
|
+
} else if (mediaInsertPos <= deleteRange.start) {
|
|
158
|
+
tr.deleteRange(deleteRange.start, deleteRange.end).insert(mediaInsertPos, content);
|
|
159
|
+
} else {
|
|
160
|
+
tr.insert(mediaInsertPos, content).deleteRange(deleteRange.start, deleteRange.end);
|
|
161
|
+
}
|
|
162
|
+
editorAnalyticsAPI === null || editorAnalyticsAPI === void 0 ? void 0 : editorAnalyticsAPI.attachAnalyticsEvent(getInsertMediaGroupAnalytics(mediaStates, inputMethod))(tr);
|
|
163
|
+
dispatch(tr);
|
|
164
|
+
setSelectionAfterMediaInsertion(view);
|
|
165
|
+
return;
|
|
159
166
|
}
|
|
160
|
-
(0, _analytics2.addAnalytics)(state, tr, getInsertMediaGroupAnalytics(mediaStates, inputMethod));
|
|
161
|
-
dispatch(tr);
|
|
162
|
-
setSelectionAfterMediaInsertion(view);
|
|
163
|
-
return;
|
|
164
|
-
}
|
|
165
167
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
168
|
+
// Don't append new paragraph when adding media to a existing mediaGroup
|
|
169
|
+
if (withParagraph && parent.type !== schema.nodes.mediaGroup) {
|
|
170
|
+
content.push(paragraph.create());
|
|
171
|
+
}
|
|
172
|
+
editorAnalyticsAPI === null || editorAnalyticsAPI === void 0 ? void 0 : editorAnalyticsAPI.attachAnalyticsEvent(getInsertMediaGroupAnalytics(mediaStates, inputMethod))(tr);
|
|
173
|
+
dispatch((0, _utils3.safeInsert)(_model.Fragment.fromArray(content), mediaInsertPos)(tr));
|
|
174
|
+
};
|
|
172
175
|
};
|
|
173
176
|
exports.insertMediaGroupNode = insertMediaGroupNode;
|
|
174
177
|
var createMediaFileNodes = function createMediaFileNodes(mediaStates, collection, media) {
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.version = exports.nextMajorVersion = exports.name = void 0;
|
|
7
7
|
var name = "@atlaskit/editor-core";
|
|
8
8
|
exports.name = name;
|
|
9
|
-
var version = "187.14.
|
|
9
|
+
var version = "187.14.11";
|
|
10
10
|
exports.version = version;
|
|
11
11
|
var nextMajorVersion = function nextMajorVersion() {
|
|
12
12
|
return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
|
package/dist/cjs/version.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { setTextSelection } from '@atlaskit/editor-prosemirror/utils';
|
|
2
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID,
|
|
2
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
3
3
|
export const selectCaptionFromMediaSinglePos = (mediaSingleNodePos, mediaSingleNode) => (state, dispatch) => {
|
|
4
4
|
// node should have two children, media and caption
|
|
5
5
|
if (mediaSingleNode.childCount !== 2) {
|
|
@@ -15,7 +15,7 @@ export const selectCaptionFromMediaSinglePos = (mediaSingleNodePos, mediaSingleN
|
|
|
15
15
|
}
|
|
16
16
|
return true;
|
|
17
17
|
};
|
|
18
|
-
export const insertAndSelectCaptionFromMediaSinglePos = (mediaSingleNodePos, mediaSingleNode) => (state, dispatch) => {
|
|
18
|
+
export const insertAndSelectCaptionFromMediaSinglePos = editorAnalyticsAPI => (mediaSingleNodePos, mediaSingleNode) => (state, dispatch) => {
|
|
19
19
|
if (typeof mediaSingleNodePos !== 'number') {
|
|
20
20
|
return false;
|
|
21
21
|
}
|
|
@@ -32,12 +32,12 @@ export const insertAndSelectCaptionFromMediaSinglePos = (mediaSingleNodePos, med
|
|
|
32
32
|
tr = state.tr.insert(mediaSingleNodePos + media.nodeSize + 1, caption);
|
|
33
33
|
tr = setSelectionAtEndOfCaption(tr, mediaSingleNodePos, media.nodeSize, caption.nodeSize);
|
|
34
34
|
tr.setMeta('scrollIntoView', false);
|
|
35
|
-
|
|
35
|
+
editorAnalyticsAPI === null || editorAnalyticsAPI === void 0 ? void 0 : editorAnalyticsAPI.attachAnalyticsEvent({
|
|
36
36
|
action: ACTION.ADDED,
|
|
37
37
|
eventType: EVENT_TYPE.TRACK,
|
|
38
38
|
actionSubject: ACTION_SUBJECT.MEDIA_SINGLE,
|
|
39
39
|
actionSubjectId: ACTION_SUBJECT_ID.CAPTION
|
|
40
|
-
});
|
|
40
|
+
})(tr);
|
|
41
41
|
dispatch(tr);
|
|
42
42
|
}
|
|
43
43
|
return true;
|
|
@@ -2,7 +2,7 @@ import { createMediaLinkingCommand, getMediaLinkingState, mediaLinkingPluginKey
|
|
|
2
2
|
import { normalizeUrl } from '@atlaskit/editor-common/utils';
|
|
3
3
|
import { createToggleBlockMarkOnRange } from '../../../commands';
|
|
4
4
|
import { MediaLinkingActionsTypes } from '../pm-plugins/linking/actions';
|
|
5
|
-
import {
|
|
5
|
+
import { EVENT_TYPE, ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
|
|
6
6
|
import { currentMediaNode } from '../utils/current-media-node';
|
|
7
7
|
import { checkMediaType } from '../utils/check-media-type';
|
|
8
8
|
import { getMediaPluginState } from '../pm-plugins/main';
|
|
@@ -117,22 +117,23 @@ function toggleLinkMark(tr, state, {
|
|
|
117
117
|
toggleBlockLinkMark($pos.pos, $pos.pos + node.nodeSize, tr, state);
|
|
118
118
|
return tr;
|
|
119
119
|
}
|
|
120
|
-
const fireAnalyticForMediaLink = (tr,
|
|
121
|
-
|
|
120
|
+
const fireAnalyticForMediaLink = (tr, action, attributes = undefined, editorAnalyticsAPI) => {
|
|
121
|
+
editorAnalyticsAPI === null || editorAnalyticsAPI === void 0 ? void 0 : editorAnalyticsAPI.attachAnalyticsEvent({
|
|
122
122
|
action,
|
|
123
123
|
eventType: EVENT_TYPE.TRACK,
|
|
124
124
|
actionSubject: ACTION_SUBJECT.MEDIA,
|
|
125
125
|
actionSubjectId: ACTION_SUBJECT_ID.LINK,
|
|
126
126
|
attributes
|
|
127
|
-
});
|
|
127
|
+
})(tr);
|
|
128
|
+
return tr;
|
|
128
129
|
};
|
|
129
|
-
export const unlink = createMediaLinkingCommand({
|
|
130
|
+
export const unlink = editorAnalyticsAPI => createMediaLinkingCommand({
|
|
130
131
|
type: MediaLinkingActionsTypes.unlink
|
|
131
132
|
}, (tr, state) => {
|
|
132
133
|
const transaction = toggleLinkMark(tr, state, {
|
|
133
134
|
forceRemove: true
|
|
134
135
|
});
|
|
135
|
-
return fireAnalyticForMediaLink(transaction,
|
|
136
|
+
return fireAnalyticForMediaLink(transaction, ACTION.DELETED, undefined, editorAnalyticsAPI);
|
|
136
137
|
});
|
|
137
138
|
const getAction = (newUrl, state) => {
|
|
138
139
|
const currentUrl = getCurrentUrl(state);
|
|
@@ -143,7 +144,7 @@ const getAction = (newUrl, state) => {
|
|
|
143
144
|
}
|
|
144
145
|
return undefined;
|
|
145
146
|
};
|
|
146
|
-
export const setUrlToMedia = (url, inputMethod) => createMediaLinkingCommand({
|
|
147
|
+
export const setUrlToMedia = (url, inputMethod, editorAnalyticsAPI) => createMediaLinkingCommand({
|
|
147
148
|
type: MediaLinkingActionsTypes.setUrl,
|
|
148
149
|
payload: normalizeUrl(url)
|
|
149
150
|
}, (tr, state) => {
|
|
@@ -155,14 +156,14 @@ export const setUrlToMedia = (url, inputMethod) => createMediaLinkingCommand({
|
|
|
155
156
|
const toggleLinkMarkResult = toggleLinkMark(tr, state, {
|
|
156
157
|
url: url
|
|
157
158
|
});
|
|
158
|
-
fireAnalyticForMediaLink(tr,
|
|
159
|
+
fireAnalyticForMediaLink(tr, action, action === ACTION.ADDED ? {
|
|
159
160
|
inputMethod
|
|
160
|
-
} : undefined);
|
|
161
|
+
} : undefined, editorAnalyticsAPI);
|
|
161
162
|
return toggleLinkMarkResult;
|
|
162
163
|
} catch (e) {
|
|
163
|
-
fireAnalyticForMediaLink(tr,
|
|
164
|
+
fireAnalyticForMediaLink(tr, ACTION.ERRORED, {
|
|
164
165
|
action: action
|
|
165
|
-
});
|
|
166
|
+
}, editorAnalyticsAPI);
|
|
166
167
|
throw e;
|
|
167
168
|
}
|
|
168
169
|
});
|
|
@@ -108,7 +108,10 @@ const mediaPlugin = (options = {}, api) => {
|
|
|
108
108
|
}
|
|
109
109
|
}, {
|
|
110
110
|
name: 'mediaKeymap',
|
|
111
|
-
plugin: () =>
|
|
111
|
+
plugin: () => {
|
|
112
|
+
var _api$dependencies$ana;
|
|
113
|
+
return keymapPlugin(options, api === null || api === void 0 ? void 0 : (_api$dependencies$ana = api.dependencies.analytics) === null || _api$dependencies$ana === void 0 ? void 0 : _api$dependencies$ana.actions);
|
|
114
|
+
}
|
|
112
115
|
}];
|
|
113
116
|
if (options && options.allowMediaSingle) {
|
|
114
117
|
pmPlugins.push({
|
|
@@ -222,11 +225,11 @@ const mediaPlugin = (options = {}, api) => {
|
|
|
222
225
|
keywords: ['attachment', 'gif', 'media', 'picture', 'image', 'video'],
|
|
223
226
|
icon: () => /*#__PURE__*/React.createElement(IconImages, null),
|
|
224
227
|
action(insert, state) {
|
|
225
|
-
var _api$dependencies$
|
|
228
|
+
var _api$dependencies$ana2;
|
|
226
229
|
const pluginState = pluginKey.getState(state);
|
|
227
230
|
pluginState === null || pluginState === void 0 ? void 0 : pluginState.showMediaPicker();
|
|
228
231
|
const tr = insert('');
|
|
229
|
-
api === null || api === void 0 ? void 0 : (_api$dependencies$
|
|
232
|
+
api === null || api === void 0 ? void 0 : (_api$dependencies$ana2 = api.dependencies.analytics) === null || _api$dependencies$ana2 === void 0 ? void 0 : _api$dependencies$ana2.actions.attachAnalyticsEvent({
|
|
230
233
|
action: ACTION.OPENED,
|
|
231
234
|
actionSubject: ACTION_SUBJECT.PICKER,
|
|
232
235
|
actionSubjectId: ACTION_SUBJECT_ID.PICKER_CLOUD,
|
|
@@ -164,15 +164,17 @@ export default class MediaSingleNode extends Component {
|
|
|
164
164
|
(_this$captionPlaceHol = this.captionPlaceHolderRef.current) === null || _this$captionPlaceHol === void 0 ? void 0 : _this$captionPlaceHol.click();
|
|
165
165
|
});
|
|
166
166
|
_defineProperty(this, "clickPlaceholder", () => {
|
|
167
|
+
var _pluginInjectionApi$d, _pluginInjectionApi$d2;
|
|
167
168
|
const {
|
|
168
169
|
view,
|
|
169
170
|
getPos,
|
|
170
|
-
node
|
|
171
|
+
node,
|
|
172
|
+
pluginInjectionApi
|
|
171
173
|
} = this.props;
|
|
172
174
|
if (typeof getPos === 'boolean') {
|
|
173
175
|
return;
|
|
174
176
|
}
|
|
175
|
-
insertAndSelectCaptionFromMediaSinglePos(getPos(), node)(view.state, view.dispatch);
|
|
177
|
+
insertAndSelectCaptionFromMediaSinglePos(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d = pluginInjectionApi.dependencies) === null || _pluginInjectionApi$d === void 0 ? void 0 : (_pluginInjectionApi$d2 = _pluginInjectionApi$d.analytics) === null || _pluginInjectionApi$d2 === void 0 ? void 0 : _pluginInjectionApi$d2.actions)(getPos(), node)(view.state, view.dispatch);
|
|
176
178
|
});
|
|
177
179
|
/**
|
|
178
180
|
* Get parent width for a nested media single node
|
|
@@ -5,7 +5,7 @@ import { stateKey } from '../pm-plugins/plugin-key';
|
|
|
5
5
|
import { getMediaFeatureFlag } from '@atlaskit/media-common';
|
|
6
6
|
import { GapCursorSelection, Side } from '@atlaskit/editor-common/selection';
|
|
7
7
|
import { insertAndSelectCaptionFromMediaSinglePos, selectCaptionFromMediaSinglePos } from '../commands/captions';
|
|
8
|
-
export function keymapPlugin(options) {
|
|
8
|
+
export function keymapPlugin(options, editorAnalyticsAPI) {
|
|
9
9
|
const list = {};
|
|
10
10
|
const {
|
|
11
11
|
featureFlags
|
|
@@ -13,8 +13,8 @@ export function keymapPlugin(options) {
|
|
|
13
13
|
keymaps.bindKeymapWithCommand(keymaps.undo.common, ignoreLinksInSteps, list);
|
|
14
14
|
keymaps.bindKeymapWithCommand(keymaps.enter.common, splitMediaGroup, list);
|
|
15
15
|
if (getMediaFeatureFlag('captions', featureFlags)) {
|
|
16
|
-
keymaps.bindKeymapWithCommand(keymaps.moveDown.common, insertAndSelectCaption, list);
|
|
17
|
-
keymaps.bindKeymapWithCommand(keymaps.tab.common, insertAndSelectCaption, list);
|
|
16
|
+
keymaps.bindKeymapWithCommand(keymaps.moveDown.common, insertAndSelectCaption(editorAnalyticsAPI), list);
|
|
17
|
+
keymaps.bindKeymapWithCommand(keymaps.tab.common, insertAndSelectCaption(editorAnalyticsAPI), list);
|
|
18
18
|
keymaps.bindKeymapWithCommand(keymaps.moveLeft.common, arrowLeftFromMediaSingle(options === null || options === void 0 ? void 0 : options.editorSelectionAPI), list);
|
|
19
19
|
keymaps.bindKeymapWithCommand(keymaps.moveRight.common, arrowRightFromMediaSingle(options === null || options === void 0 ? void 0 : options.editorSelectionAPI), list);
|
|
20
20
|
}
|
|
@@ -30,7 +30,7 @@ const splitMediaGroup = state => {
|
|
|
30
30
|
const mediaPluginState = stateKey.getState(state);
|
|
31
31
|
return mediaPluginState.splitMediaGroup();
|
|
32
32
|
};
|
|
33
|
-
const insertAndSelectCaption = (state, dispatch) => {
|
|
33
|
+
const insertAndSelectCaption = editorAnalyticsAPI => (state, dispatch) => {
|
|
34
34
|
const {
|
|
35
35
|
selection,
|
|
36
36
|
schema
|
|
@@ -41,7 +41,7 @@ const insertAndSelectCaption = (state, dispatch) => {
|
|
|
41
41
|
from,
|
|
42
42
|
node
|
|
43
43
|
} = selection;
|
|
44
|
-
if (!insertAndSelectCaptionFromMediaSinglePos(from, node)(state, dispatch)) {
|
|
44
|
+
if (!insertAndSelectCaptionFromMediaSinglePos(editorAnalyticsAPI)(from, node)(state, dispatch)) {
|
|
45
45
|
selectCaptionFromMediaSinglePos(from, node)(state, dispatch);
|
|
46
46
|
}
|
|
47
47
|
}
|
|
@@ -45,7 +45,7 @@ const createDropPlaceholder = (intl, allowDropLine) => {
|
|
|
45
45
|
};
|
|
46
46
|
const MEDIA_RESOLVED_STATES = ['ready', 'error', 'cancelled'];
|
|
47
47
|
export class MediaPluginStateImplementation {
|
|
48
|
-
constructor(_state, options, mediaOptions, newInsertionBehaviour, _dispatch,
|
|
48
|
+
constructor(_state, options, mediaOptions, newInsertionBehaviour, _dispatch, _pluginInjectionApi) {
|
|
49
49
|
_defineProperty(this, "allowsUploads", false);
|
|
50
50
|
_defineProperty(this, "ignoreLinks", false);
|
|
51
51
|
_defineProperty(this, "waitForMediaUpload", true);
|
|
@@ -149,7 +149,7 @@ export class MediaPluginStateImplementation {
|
|
|
149
149
|
*
|
|
150
150
|
* called when we insert a new file via the picker (connected via pickerfacade)
|
|
151
151
|
*/
|
|
152
|
-
_defineProperty(this, "insertFile", (mediaState, onMediaStateChanged, pickerType) => {
|
|
152
|
+
_defineProperty(this, "insertFile", (mediaState, onMediaStateChanged, pickerType, pluginInjectionApi) => {
|
|
153
153
|
var _mediaState$collectio, _this$mediaOptions2;
|
|
154
154
|
const {
|
|
155
155
|
state
|
|
@@ -175,9 +175,11 @@ export class MediaPluginStateImplementation {
|
|
|
175
175
|
const widthPluginState = (_this$pluginInjection = this.pluginInjectionApi) === null || _this$pluginInjection === void 0 ? void 0 : _this$pluginInjection.dependencies.width.sharedState.currentState();
|
|
176
176
|
insertMediaSingleNode(this.view, mediaStateWithContext, this.getInputMethod(pickerType), collection, this.mediaOptions && this.mediaOptions.alignLeftOnInsert, this.newInsertionBehaviour, widthPluginState);
|
|
177
177
|
} else if (getMediaFeatureFlag('mediaInline', (_this$mediaOptions2 = this.mediaOptions) === null || _this$mediaOptions2 === void 0 ? void 0 : _this$mediaOptions2.featureFlags) && !isInEmptyLine(state) && (!isInsidePotentialEmptyParagraph(state) || isInListItem(state)) && canInsertMediaInline(state)) {
|
|
178
|
-
|
|
178
|
+
var _pluginInjectionApi$d, _pluginInjectionApi$d2;
|
|
179
|
+
insertMediaInlineNode(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d = pluginInjectionApi.dependencies) === null || _pluginInjectionApi$d === void 0 ? void 0 : (_pluginInjectionApi$d2 = _pluginInjectionApi$d.analytics) === null || _pluginInjectionApi$d2 === void 0 ? void 0 : _pluginInjectionApi$d2.actions)(this.view, mediaStateWithContext, collection, this.getInputMethod(pickerType));
|
|
179
180
|
} else {
|
|
180
|
-
|
|
181
|
+
var _pluginInjectionApi$d3, _pluginInjectionApi$d4;
|
|
182
|
+
insertMediaGroupNode(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d3 = pluginInjectionApi.dependencies) === null || _pluginInjectionApi$d3 === void 0 ? void 0 : (_pluginInjectionApi$d4 = _pluginInjectionApi$d3.analytics) === null || _pluginInjectionApi$d4 === void 0 ? void 0 : _pluginInjectionApi$d4.actions)(this.view, [mediaStateWithContext], collection, this.getInputMethod(pickerType));
|
|
181
183
|
}
|
|
182
184
|
|
|
183
185
|
// do events when media state changes
|
|
@@ -413,7 +415,7 @@ export class MediaPluginStateImplementation {
|
|
|
413
415
|
this.mediaOptions = mediaOptions;
|
|
414
416
|
this.newInsertionBehaviour = newInsertionBehaviour;
|
|
415
417
|
this.dispatch = _dispatch;
|
|
416
|
-
this.pluginInjectionApi =
|
|
418
|
+
this.pluginInjectionApi = _pluginInjectionApi;
|
|
417
419
|
this.waitForMediaUpload = options.waitForMediaUpload === undefined ? true : options.waitForMediaUpload;
|
|
418
420
|
const {
|
|
419
421
|
nodes
|