@atlaskit/editor-plugin-media 1.43.7 → 1.43.8
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/mediaPlugin.js +2 -0
- package/dist/cjs/nodeviews/lazy-media-group.js +4 -1
- package/dist/cjs/nodeviews/lazy-media-inline.js +4 -1
- package/dist/cjs/nodeviews/lazy-media.js +4 -1
- package/dist/cjs/nodeviews/mediaGroup.js +7 -1
- package/dist/cjs/nodeviews/mediaInline.js +6 -1
- package/dist/cjs/nodeviews/mediaNodeView/index.js +6 -2
- package/dist/cjs/nodeviews/mediaNodeView/media.js +10 -0
- package/dist/cjs/nodeviews/mediaSingle.js +41 -8
- package/dist/cjs/nodeviews/toDOM-fixes/toDOMAttrs.js +7 -3
- package/dist/cjs/pm-plugins/alt-text/commands.js +2 -0
- package/dist/cjs/pm-plugins/alt-text/keymap.js +6 -0
- package/dist/cjs/pm-plugins/alt-text/ui/AltTextEdit.js +4 -0
- package/dist/cjs/pm-plugins/commands/captions.js +4 -1
- package/dist/cjs/pm-plugins/commands/linking.js +10 -2
- package/dist/cjs/pm-plugins/keymap-media.js +10 -0
- package/dist/cjs/pm-plugins/keymap.js +54 -7
- package/dist/cjs/pm-plugins/linking/keymap.js +3 -0
- package/dist/cjs/pm-plugins/main.js +24 -3
- package/dist/cjs/pm-plugins/mediaTaskManager.js +7 -0
- package/dist/cjs/pm-plugins/picker-facade.js +8 -0
- package/dist/cjs/pm-plugins/utils/batchMediaNodeAttrs.js +2 -0
- package/dist/cjs/pm-plugins/utils/media-files.js +8 -2
- package/dist/cjs/pm-plugins/utils/media-single.js +19 -4
- package/dist/cjs/ui/CaptionPlaceholder/index.js +8 -2
- package/dist/cjs/ui/ImageBorder/index.js +44 -38
- package/dist/cjs/ui/ImageBorder/styles.js +2 -0
- package/dist/cjs/ui/MediaLinkingToolbar.js +2 -1
- package/dist/cjs/ui/MediaPicker/DropzoneWrapper.js +2 -0
- package/dist/cjs/ui/MediaPicker/index.js +3 -0
- package/dist/cjs/ui/MediaViewer/PortalWrapper.js +8 -2
- package/dist/cjs/ui/PixelEntry/index.js +61 -51
- package/dist/cjs/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +10 -2
- package/dist/cjs/ui/ResizableMediaSingle/index.js +6 -1
- package/dist/cjs/ui/ResizableMediaSingle/styles.js +3 -0
- package/dist/cjs/ui/toolbar/assets/commentWithDotIcon.js +2 -0
- package/dist/cjs/ui/toolbar/commands.js +4 -1
- package/dist/cjs/ui/toolbar/filePreviewItem.js +4 -1
- package/dist/cjs/ui/toolbar/index.js +21 -3
- package/dist/cjs/ui/toolbar/layout-group.js +8 -1
- package/dist/cjs/ui/toolbar/linking.js +4 -1
- package/dist/cjs/ui/toolbar/utils.js +2 -0
- package/dist/es2019/mediaPlugin.js +2 -0
- package/dist/es2019/nodeviews/lazy-media-group.js +4 -1
- package/dist/es2019/nodeviews/lazy-media-inline.js +4 -1
- package/dist/es2019/nodeviews/lazy-media-single.js +4 -1
- package/dist/es2019/nodeviews/lazy-media.js +4 -1
- package/dist/es2019/nodeviews/mediaGroup.js +7 -1
- package/dist/es2019/nodeviews/mediaInline.js +6 -1
- package/dist/es2019/nodeviews/mediaNodeView/index.js +6 -1
- package/dist/es2019/nodeviews/mediaNodeView/media.js +10 -0
- package/dist/es2019/nodeviews/mediaSingle.js +43 -8
- package/dist/es2019/nodeviews/toDOM-fixes/toDOMAttrs.js +4 -1
- package/dist/es2019/pm-plugins/alt-text/commands.js +2 -0
- package/dist/es2019/pm-plugins/alt-text/keymap.js +6 -0
- package/dist/es2019/pm-plugins/alt-text/ui/AltTextEdit.js +4 -0
- package/dist/es2019/pm-plugins/commands/captions.js +4 -1
- package/dist/es2019/pm-plugins/commands/linking.js +10 -2
- package/dist/es2019/pm-plugins/keymap-media.js +10 -0
- package/dist/es2019/pm-plugins/keymap.js +54 -7
- package/dist/es2019/pm-plugins/linking/keymap.js +3 -0
- package/dist/es2019/pm-plugins/main.js +24 -2
- package/dist/es2019/pm-plugins/mediaTaskManager.js +7 -0
- package/dist/es2019/pm-plugins/picker-facade.js +8 -0
- package/dist/es2019/pm-plugins/utils/batchMediaNodeAttrs.js +2 -0
- package/dist/es2019/pm-plugins/utils/media-files.js +8 -2
- package/dist/es2019/pm-plugins/utils/media-single.js +19 -4
- package/dist/es2019/ui/CaptionPlaceholder/index.js +8 -2
- package/dist/es2019/ui/ImageBorder/index.js +44 -38
- package/dist/es2019/ui/ImageBorder/styles.js +2 -0
- package/dist/es2019/ui/MediaLinkingToolbar.js +4 -2
- package/dist/es2019/ui/MediaPicker/DropzoneWrapper.js +2 -0
- package/dist/es2019/ui/MediaPicker/index.js +3 -0
- package/dist/es2019/ui/MediaViewer/PortalWrapper.js +8 -2
- package/dist/es2019/ui/PixelEntry/index.js +59 -49
- package/dist/es2019/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +10 -2
- package/dist/es2019/ui/ResizableMediaSingle/index.js +6 -1
- package/dist/es2019/ui/ResizableMediaSingle/styles.js +3 -0
- package/dist/es2019/ui/toolbar/assets/commentWithDotIcon.js +2 -0
- package/dist/es2019/ui/toolbar/commands.js +4 -1
- package/dist/es2019/ui/toolbar/filePreviewItem.js +4 -1
- package/dist/es2019/ui/toolbar/index.js +21 -3
- package/dist/es2019/ui/toolbar/layout-group.js +8 -1
- package/dist/es2019/ui/toolbar/linking.js +4 -1
- package/dist/es2019/ui/toolbar/mediaInline.js +8 -2
- package/dist/es2019/ui/toolbar/utils.js +6 -1
- package/dist/esm/mediaPlugin.js +2 -0
- package/dist/esm/nodeviews/lazy-media-group.js +4 -1
- package/dist/esm/nodeviews/lazy-media-inline.js +4 -1
- package/dist/esm/nodeviews/lazy-media.js +4 -1
- package/dist/esm/nodeviews/mediaGroup.js +7 -1
- package/dist/esm/nodeviews/mediaInline.js +6 -1
- package/dist/esm/nodeviews/mediaNodeView/index.js +6 -1
- package/dist/esm/nodeviews/mediaNodeView/media.js +10 -0
- package/dist/esm/nodeviews/mediaSingle.js +41 -8
- package/dist/esm/nodeviews/toDOM-fixes/toDOMAttrs.js +7 -3
- package/dist/esm/pm-plugins/alt-text/commands.js +2 -0
- package/dist/esm/pm-plugins/alt-text/keymap.js +6 -0
- package/dist/esm/pm-plugins/alt-text/ui/AltTextEdit.js +4 -0
- package/dist/esm/pm-plugins/commands/captions.js +4 -1
- package/dist/esm/pm-plugins/commands/linking.js +10 -2
- package/dist/esm/pm-plugins/keymap-media.js +10 -0
- package/dist/esm/pm-plugins/keymap.js +54 -7
- package/dist/esm/pm-plugins/linking/keymap.js +3 -0
- package/dist/esm/pm-plugins/main.js +24 -2
- package/dist/esm/pm-plugins/mediaTaskManager.js +7 -0
- package/dist/esm/pm-plugins/picker-facade.js +8 -0
- package/dist/esm/pm-plugins/utils/batchMediaNodeAttrs.js +2 -0
- package/dist/esm/pm-plugins/utils/media-files.js +8 -2
- package/dist/esm/pm-plugins/utils/media-single.js +19 -4
- package/dist/esm/ui/CaptionPlaceholder/index.js +8 -2
- package/dist/esm/ui/ImageBorder/index.js +44 -38
- package/dist/esm/ui/ImageBorder/styles.js +2 -0
- package/dist/esm/ui/MediaLinkingToolbar.js +4 -2
- package/dist/esm/ui/MediaPicker/DropzoneWrapper.js +2 -0
- package/dist/esm/ui/MediaPicker/index.js +3 -0
- package/dist/esm/ui/MediaViewer/PortalWrapper.js +8 -2
- package/dist/esm/ui/PixelEntry/index.js +61 -51
- package/dist/esm/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +10 -2
- package/dist/esm/ui/ResizableMediaSingle/index.js +6 -1
- package/dist/esm/ui/ResizableMediaSingle/styles.js +3 -0
- package/dist/esm/ui/toolbar/assets/commentWithDotIcon.js +2 -0
- package/dist/esm/ui/toolbar/commands.js +4 -1
- package/dist/esm/ui/toolbar/filePreviewItem.js +4 -1
- package/dist/esm/ui/toolbar/index.js +21 -3
- package/dist/esm/ui/toolbar/layout-group.js +8 -1
- package/dist/esm/ui/toolbar/linking.js +4 -1
- package/dist/esm/ui/toolbar/utils.js +2 -0
- package/dist/types/nodeviews/mediaNodeView/index.d.ts +1 -2
- package/dist/types/pm-plugins/utils/media-single.d.ts +1 -1
- package/dist/types/ui/toolbar/commands.d.ts +1 -2
- package/dist/types-ts4.5/nodeviews/mediaNodeView/index.d.ts +1 -2
- package/dist/types-ts4.5/pm-plugins/utils/media-single.d.ts +1 -1
- package/dist/types-ts4.5/ui/toolbar/commands.d.ts +1 -2
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
package/dist/cjs/mediaPlugin.js
CHANGED
|
@@ -103,6 +103,8 @@ var mediaPlugin = exports.mediaPlugin = function mediaPlugin(_ref3) {
|
|
|
103
103
|
return _pluginKey.stateKey.getState(editorState) || null;
|
|
104
104
|
},
|
|
105
105
|
actions: {
|
|
106
|
+
// Ignored via go/ees005
|
|
107
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
106
108
|
insertMediaAsMediaSingle: function insertMediaAsMediaSingle(view, node, inputMethod, isNestingInQuoteSupported, insertMediaVia) {
|
|
107
109
|
var _api$analytics;
|
|
108
110
|
return (0, _mediaSingle2.insertMediaAsMediaSingle)(view, node, inputMethod, api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions, isNestingInQuoteSupported, insertMediaVia);
|
|
@@ -13,7 +13,10 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
|
|
|
13
13
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != (0, _typeof2.default)(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
14
14
|
var lazyMediaGroupView = exports.lazyMediaGroupView = function lazyMediaGroupView(portalProviderAPI, eventDispatcher, providerFactory) {
|
|
15
15
|
var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
16
|
-
var api
|
|
16
|
+
var api
|
|
17
|
+
// Ignored via go/ees005
|
|
18
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
19
|
+
= arguments.length > 4 ? arguments[4] : undefined;
|
|
17
20
|
if ((0, _experiments.editorExperiment)('platform_editor_exp_lazy_node_views', false)) {
|
|
18
21
|
return (0, _mediaGroup.ReactMediaGroupNode)(portalProviderAPI, eventDispatcher, providerFactory, options, api);
|
|
19
22
|
}
|
|
@@ -11,7 +11,10 @@ var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
|
11
11
|
var _mediaInline = require("./mediaInline");
|
|
12
12
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
13
13
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != (0, _typeof2.default)(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
14
|
-
var lazyMediaInlineView = exports.lazyMediaInlineView = function lazyMediaInlineView(portalProviderAPI, eventDispatcher, providerFactory, api, dispatchAnalyticsEvent
|
|
14
|
+
var lazyMediaInlineView = exports.lazyMediaInlineView = function lazyMediaInlineView(portalProviderAPI, eventDispatcher, providerFactory, api, dispatchAnalyticsEvent
|
|
15
|
+
// Ignored via go/ees005
|
|
16
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
17
|
+
) {
|
|
15
18
|
if ((0, _experiments.editorExperiment)('platform_editor_exp_lazy_node_views', false)) {
|
|
16
19
|
return (0, _mediaInline.ReactMediaInlineNode)(portalProviderAPI, eventDispatcher, providerFactory, api, dispatchAnalyticsEvent);
|
|
17
20
|
}
|
|
@@ -13,7 +13,10 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
|
|
|
13
13
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != (0, _typeof2.default)(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
14
14
|
var lazyMediaView = exports.lazyMediaView = function lazyMediaView(portalProviderAPI, eventDispatcher, providerFactory) {
|
|
15
15
|
var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
16
|
-
var api
|
|
16
|
+
var api
|
|
17
|
+
// Ignored via go/ees005
|
|
18
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
19
|
+
= arguments.length > 4 ? arguments[4] : undefined;
|
|
17
20
|
if ((0, _experiments.editorExperiment)('platform_editor_exp_lazy_node_views', false)) {
|
|
18
21
|
return (0, _mediaNodeView.ReactMediaNode)(portalProviderAPI, eventDispatcher, providerFactory, options, api);
|
|
19
22
|
}
|
|
@@ -267,6 +267,9 @@ var MediaGroup = /*#__PURE__*/function (_React$Component) {
|
|
|
267
267
|
var _this$mediaPluginStat2;
|
|
268
268
|
(_this$mediaPluginStat2 = this.mediaPluginState) === null || _this$mediaPluginStat2 === void 0 || _this$mediaPluginStat2.handleMediaGroupUpdate(this.mediaNodes, []);
|
|
269
269
|
}
|
|
270
|
+
|
|
271
|
+
// Ignored via go/ees005
|
|
272
|
+
// eslint-disable-next-line react/no-unsafe
|
|
270
273
|
}, {
|
|
271
274
|
key: "UNSAFE_componentWillReceiveProps",
|
|
272
275
|
value: function UNSAFE_componentWillReceiveProps(props) {
|
|
@@ -388,7 +391,10 @@ var MediaGroupNodeView = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
388
391
|
}(_reactNodeView.default);
|
|
389
392
|
var ReactMediaGroupNode = exports.ReactMediaGroupNode = function ReactMediaGroupNode(portalProviderAPI, eventDispatcher, providerFactory) {
|
|
390
393
|
var mediaOptions = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
391
|
-
var pluginInjectionApi
|
|
394
|
+
var pluginInjectionApi
|
|
395
|
+
// Ignored via go/ees005
|
|
396
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
397
|
+
= arguments.length > 4 ? arguments[4] : undefined;
|
|
392
398
|
return function (node, view, getPos) {
|
|
393
399
|
return new MediaGroupNodeView(node, view, getPos, portalProviderAPI, eventDispatcher, {
|
|
394
400
|
providerFactory: providerFactory,
|
|
@@ -171,6 +171,8 @@ var MediaInline = exports.MediaInline = function MediaInline(props) {
|
|
|
171
171
|
var identifier = {
|
|
172
172
|
id: id,
|
|
173
173
|
mediaItemType: 'file',
|
|
174
|
+
// Ignored via go/ees005
|
|
175
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
174
176
|
collectionName: collection
|
|
175
177
|
};
|
|
176
178
|
|
|
@@ -299,7 +301,10 @@ var MediaInlineNodeView = exports.MediaInlineNodeView = /*#__PURE__*/function (_
|
|
|
299
301
|
}
|
|
300
302
|
}]);
|
|
301
303
|
}(_selectionBasedNodeView.SelectionBasedNodeView);
|
|
302
|
-
var ReactMediaInlineNode = exports.ReactMediaInlineNode = function ReactMediaInlineNode(portalProviderAPI, eventDispatcher, providerFactory, api, dispatchAnalyticsEvent
|
|
304
|
+
var ReactMediaInlineNode = exports.ReactMediaInlineNode = function ReactMediaInlineNode(portalProviderAPI, eventDispatcher, providerFactory, api, dispatchAnalyticsEvent
|
|
305
|
+
// Ignored via go/ees005
|
|
306
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
307
|
+
) {
|
|
303
308
|
return function (node, view, getPos) {
|
|
304
309
|
return new MediaInlineNodeView(node, view, getPos, portalProviderAPI, eventDispatcher, {
|
|
305
310
|
providerFactory: providerFactory,
|
|
@@ -27,7 +27,8 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
27
27
|
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; }
|
|
28
28
|
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
29
29
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
30
|
-
function _superPropGet(t, o, e, r) { var p = (0, _get2.default)((0, _getPrototypeOf2.default)(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; }
|
|
30
|
+
function _superPropGet(t, o, e, r) { var p = (0, _get2.default)((0, _getPrototypeOf2.default)(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; } // Ignored via go/ees005
|
|
31
|
+
// eslint-disable-next-line import/no-named-as-default
|
|
31
32
|
var MediaNodeWithProviders = function MediaNodeWithProviders(_ref) {
|
|
32
33
|
var pluginInjectionApi = _ref.pluginInjectionApi,
|
|
33
34
|
innerComponent = _ref.innerComponent;
|
|
@@ -188,7 +189,10 @@ var MediaNodeView = /*#__PURE__*/function (_SelectionBasedNodeVi) {
|
|
|
188
189
|
}(_selectionBasedNodeView.SelectionBasedNodeView);
|
|
189
190
|
var ReactMediaNode = exports.ReactMediaNode = function ReactMediaNode(portalProviderAPI, eventDispatcher, providerFactory) {
|
|
190
191
|
var mediaOptions = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
191
|
-
var pluginInjectionApi
|
|
192
|
+
var pluginInjectionApi
|
|
193
|
+
// Ignored via go/ees005
|
|
194
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
195
|
+
= arguments.length > 4 ? arguments[4] : undefined;
|
|
192
196
|
return function (node, view, getPos) {
|
|
193
197
|
return new MediaNodeView(node, view, getPos, portalProviderAPI, eventDispatcher, {
|
|
194
198
|
eventDispatcher: eventDispatcher,
|
|
@@ -191,7 +191,11 @@ var MediaNode = exports.MediaNode = /*#__PURE__*/function (_Component) {
|
|
|
191
191
|
var lastElement;
|
|
192
192
|
var focusableElements = (_this2$videoControlsW = _this2.videoControlsWrapperRef) === null || _this2$videoControlsW === void 0 || (_this2$videoControlsW = _this2$videoControlsW.current) === null || _this2$videoControlsW === void 0 ? void 0 : _this2$videoControlsW.querySelectorAll('button, input, [tabindex]:not([tabindex="-1"])');
|
|
193
193
|
if (focusableElements && focusableElements.length) {
|
|
194
|
+
// Ignored via go/ees005
|
|
195
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
194
196
|
firstElement = focusableElements[0];
|
|
197
|
+
// Ignored via go/ees005
|
|
198
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
195
199
|
lastElement = focusableElements[focusableElements.length - 1];
|
|
196
200
|
if (event.shiftKey && document.activeElement === firstElement) {
|
|
197
201
|
event.preventDefault();
|
|
@@ -246,12 +250,16 @@ var MediaNode = exports.MediaNode = /*#__PURE__*/function (_Component) {
|
|
|
246
250
|
}
|
|
247
251
|
var contextId = contextIdentifierProvider && contextIdentifierProvider.objectId;
|
|
248
252
|
var identifier = type === 'external' ? {
|
|
253
|
+
// Ignored via go/ees005
|
|
254
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
249
255
|
dataURI: url,
|
|
250
256
|
name: url,
|
|
251
257
|
mediaItemType: 'external-image'
|
|
252
258
|
} : {
|
|
253
259
|
id: id,
|
|
254
260
|
mediaItemType: 'file',
|
|
261
|
+
// Ignored via go/ees005
|
|
262
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
255
263
|
collectionName: collection
|
|
256
264
|
};
|
|
257
265
|
|
|
@@ -259,6 +267,8 @@ var MediaNode = exports.MediaNode = /*#__PURE__*/function (_Component) {
|
|
|
259
267
|
// there is a possibility mediaClientConfig will be part of a identifier,
|
|
260
268
|
// so this might be not an issue
|
|
261
269
|
var mediaClientConfig = viewMediaClientConfig || {
|
|
270
|
+
// Ignored via go/ees005
|
|
271
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
262
272
|
authProvider: function authProvider() {
|
|
263
273
|
return {};
|
|
264
274
|
}
|
|
@@ -147,6 +147,8 @@ var MediaSingleNode = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
147
147
|
_context2.next = 16;
|
|
148
148
|
break;
|
|
149
149
|
}
|
|
150
|
+
// Ignored via go/ees005
|
|
151
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
150
152
|
updatingNode = _this.mediaNodeUpdater.handleExternalMedia(_this.props.getPos);
|
|
151
153
|
addPendingTask(updatingNode);
|
|
152
154
|
_context2.next = 15;
|
|
@@ -174,6 +176,8 @@ var MediaSingleNode = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
174
176
|
isCopying: true
|
|
175
177
|
});
|
|
176
178
|
_context2.prev = 25;
|
|
179
|
+
// Ignored via go/ees005
|
|
180
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
177
181
|
copyNode = _this.mediaNodeUpdater.copyNode({
|
|
178
182
|
traceId: node.attrs.__mediaTraceId
|
|
179
183
|
});
|
|
@@ -277,7 +281,10 @@ var MediaSingleNode = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
277
281
|
(0, _inherits2.default)(MediaSingleNode, _Component);
|
|
278
282
|
return (0, _createClass2.default)(MediaSingleNode, [{
|
|
279
283
|
key: "UNSAFE_componentWillReceiveProps",
|
|
280
|
-
value:
|
|
284
|
+
value:
|
|
285
|
+
// Ignored via go/ees005
|
|
286
|
+
// eslint-disable-next-line react/no-unsafe
|
|
287
|
+
function UNSAFE_componentWillReceiveProps(nextProps) {
|
|
281
288
|
if (!this.mediaNodeUpdater) {
|
|
282
289
|
this.createOrUpdateMediaNodeUpdater(nextProps);
|
|
283
290
|
}
|
|
@@ -526,12 +533,21 @@ var MediaSingleNode = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
526
533
|
ref: this.captionPlaceHolderRef,
|
|
527
534
|
onClick: this.clickPlaceholder
|
|
528
535
|
})));
|
|
529
|
-
return (0, _react2.jsx)(_react.Fragment, null, canResize ? (0, _platformFeatureFlags.fg)('platform_editor_media_extended_resize_experience') ? (0, _react2.jsx)(_ResizableMediaSingleNext.default
|
|
536
|
+
return (0, _react2.jsx)(_react.Fragment, null, canResize ? (0, _platformFeatureFlags.fg)('platform_editor_media_extended_resize_experience') ? (0, _react2.jsx)(_ResizableMediaSingleNext.default
|
|
537
|
+
// Ignored via go/ees005
|
|
538
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
539
|
+
, (0, _extends2.default)({}, resizableMediaSingleProps, {
|
|
530
540
|
showLegacyNotification: widthType !== 'pixel'
|
|
531
|
-
}), MediaChildren) : (0, _react2.jsx)(_ResizableMediaSingle.default
|
|
541
|
+
}), MediaChildren) : (0, _react2.jsx)(_ResizableMediaSingle.default
|
|
542
|
+
// Ignored via go/ees005
|
|
543
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
544
|
+
, (0, _extends2.default)({}, resizableMediaSingleProps, {
|
|
532
545
|
lineLength: contentWidthForLegacyExperience,
|
|
533
546
|
pctWidth: mediaSingleWidthAttribute
|
|
534
|
-
}), MediaChildren) : (0, _react2.jsx)(_ui.MediaSingle
|
|
547
|
+
}), MediaChildren) : (0, _react2.jsx)(_ui.MediaSingle
|
|
548
|
+
// Ignored via go/ees005
|
|
549
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
550
|
+
, (0, _extends2.default)({}, mediaSingleProps, {
|
|
535
551
|
pctWidth: mediaSingleWidthAttribute,
|
|
536
552
|
size: {
|
|
537
553
|
width: mediaSingleWidthAttribute,
|
|
@@ -590,8 +606,14 @@ var MediaSingleNodeWrapper = function MediaSingleNodeWrapper(_ref6) {
|
|
|
590
606
|
editorAppearance: editorAppearance
|
|
591
607
|
});
|
|
592
608
|
}
|
|
593
|
-
return (0, _react2.jsx)(MediaSingleNode
|
|
594
|
-
|
|
609
|
+
return (0, _react2.jsx)(MediaSingleNode
|
|
610
|
+
// Ignored via go/ees005
|
|
611
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
612
|
+
, {
|
|
613
|
+
width: widthState.width
|
|
614
|
+
// Ignored via go/ees005
|
|
615
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
616
|
+
,
|
|
595
617
|
lineLength: widthState.lineLength,
|
|
596
618
|
node: node,
|
|
597
619
|
getPos: getPos,
|
|
@@ -737,6 +759,9 @@ var MediaSingleNodeView = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
737
759
|
}
|
|
738
760
|
return false;
|
|
739
761
|
}
|
|
762
|
+
|
|
763
|
+
// Ignored via go/ees005
|
|
764
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
740
765
|
}, {
|
|
741
766
|
key: "update",
|
|
742
767
|
value: function update(node, decorations, _innerDecorations, isValidUpdate) {
|
|
@@ -777,8 +802,14 @@ var MediaSingleNodeView = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
777
802
|
view: _this5.view,
|
|
778
803
|
fullWidthMode: fullWidthMode,
|
|
779
804
|
selected: _this5.isNodeSelected,
|
|
780
|
-
eventDispatcher: eventDispatcher
|
|
781
|
-
|
|
805
|
+
eventDispatcher: eventDispatcher
|
|
806
|
+
// Ignored via go/ees005
|
|
807
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
808
|
+
,
|
|
809
|
+
dispatchAnalyticsEvent: dispatchAnalyticsEvent
|
|
810
|
+
// Ignored via go/ees005
|
|
811
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
812
|
+
,
|
|
782
813
|
forwardRef: forwardRef,
|
|
783
814
|
editorAppearance: editorAppearance
|
|
784
815
|
});
|
|
@@ -790,6 +821,8 @@ var MediaSingleNodeView = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
790
821
|
value: function ignoreMutation() {
|
|
791
822
|
// DOM has changed; recalculate if we need to re-render
|
|
792
823
|
if (this.dom) {
|
|
824
|
+
// Ignored via go/ees005
|
|
825
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
793
826
|
var offsetLeft = this.dom.offsetLeft;
|
|
794
827
|
if (offsetLeft !== this.lastOffsetLeft) {
|
|
795
828
|
this.lastOffsetLeft = offsetLeft;
|
|
@@ -48,9 +48,13 @@ var getMediaAttrs = exports.getMediaAttrs = function getMediaAttrs(nodeName, nod
|
|
|
48
48
|
return attrs;
|
|
49
49
|
};
|
|
50
50
|
var camelCaseToKebabCase = exports.camelCaseToKebabCase = function camelCaseToKebabCase(str) {
|
|
51
|
-
return
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
return (
|
|
52
|
+
// Ignored via go/ees005
|
|
53
|
+
// eslint-disable-next-line require-unicode-regexp
|
|
54
|
+
str.replace(/([^A-Z]+)([A-Z])/g, function (_, x, y) {
|
|
55
|
+
return "".concat(x, "-").concat(y.toLowerCase());
|
|
56
|
+
})
|
|
57
|
+
);
|
|
54
58
|
};
|
|
55
59
|
|
|
56
60
|
/**
|
|
@@ -26,6 +26,8 @@ var createCommandWithAnalytics = function createCommandWithAnalytics(actionType,
|
|
|
26
26
|
eventType: _analytics.EVENT_TYPE.TRACK,
|
|
27
27
|
attributes: {
|
|
28
28
|
type: type,
|
|
29
|
+
// Ignored via go/ees005
|
|
30
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
29
31
|
mediaType: mediaNode.attrs.type
|
|
30
32
|
}
|
|
31
33
|
};
|
|
@@ -9,7 +9,13 @@ var _keymap = require("@atlaskit/editor-prosemirror/keymap");
|
|
|
9
9
|
var _commands = require("./commands");
|
|
10
10
|
function keymapPlugin(schema, editorAnalyticsAPI) {
|
|
11
11
|
var list = {};
|
|
12
|
+
|
|
13
|
+
// Ignored via go/ees005
|
|
14
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
12
15
|
(0, _keymaps.bindKeymapWithCommand)(_keymaps.addAltText.common, (0, _commands.openMediaAltTextMenu)(editorAnalyticsAPI), list);
|
|
16
|
+
|
|
17
|
+
// Ignored via go/ees005
|
|
18
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
13
19
|
(0, _keymaps.bindKeymapWithCommand)(_keymaps.escape.common, _commands.closeMediaAltTextMenu, list);
|
|
14
20
|
return (0, _keymap.keymap)(list);
|
|
15
21
|
}
|
|
@@ -97,6 +97,8 @@ var AltTextEditComponent = exports.AltTextEditComponent = /*#__PURE__*/function
|
|
|
97
97
|
// We need to pass down the ESCAPE keymap
|
|
98
98
|
// because when we focus on the Toolbar, Prosemirror blur,
|
|
99
99
|
// making all keyboard shortcuts not working
|
|
100
|
+
// Ignored via go/ees005
|
|
101
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
100
102
|
view.someProp('handleKeyDown', function (fn) {
|
|
101
103
|
return fn(view, event);
|
|
102
104
|
});
|
|
@@ -175,6 +177,8 @@ var AltTextEditComponent = exports.AltTextEditComponent = /*#__PURE__*/function
|
|
|
175
177
|
shortcutOverride: "Esc"
|
|
176
178
|
});
|
|
177
179
|
var errorsList = (this.state.validationErrors || []).map(function (error, index) {
|
|
180
|
+
// Ignored via go/ees005
|
|
181
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
178
182
|
return (0, _react2.jsx)(_ui.ErrorMessage, {
|
|
179
183
|
key: index
|
|
180
184
|
}, error);
|
|
@@ -54,6 +54,9 @@ var insertAndSelectCaptionFromMediaSinglePos = exports.insertAndSelectCaptionFro
|
|
|
54
54
|
};
|
|
55
55
|
};
|
|
56
56
|
};
|
|
57
|
-
var setSelectionAtEndOfCaption = function setSelectionAtEndOfCaption(tr, mediaSingleNodePos, mediaNodeSize, captionNodeSize
|
|
57
|
+
var setSelectionAtEndOfCaption = function setSelectionAtEndOfCaption(tr, mediaSingleNodePos, mediaNodeSize, captionNodeSize
|
|
58
|
+
// Ignored via go/ees005
|
|
59
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
60
|
+
) {
|
|
58
61
|
return (0, _utils.setTextSelection)(mediaSingleNodePos + mediaNodeSize + captionNodeSize)(tr);
|
|
59
62
|
};
|
|
@@ -70,7 +70,10 @@ var showLinkingToolbarWithMediaTypeCheck = exports.showLinkingToolbarWithMediaTy
|
|
|
70
70
|
var hideLinkingToolbarCommand = (0, _linking.createMediaLinkingCommand)({
|
|
71
71
|
type: _actions.MediaLinkingActionsTypes.hideToolbar
|
|
72
72
|
});
|
|
73
|
-
var hideLinkingToolbar = exports.hideLinkingToolbar = function hideLinkingToolbar(state, dispatch, view, focusFloatingToolbar
|
|
73
|
+
var hideLinkingToolbar = exports.hideLinkingToolbar = function hideLinkingToolbar(state, dispatch, view, focusFloatingToolbar
|
|
74
|
+
// Ignored via go/ees005
|
|
75
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
76
|
+
) {
|
|
74
77
|
hideLinkingToolbarCommand(state, dispatch, view);
|
|
75
78
|
|
|
76
79
|
// restore focus on the editor so keyboard shortcuts aren't lost to the browser
|
|
@@ -93,6 +96,8 @@ function getCurrentUrl(state) {
|
|
|
93
96
|
if (!hasLink) {
|
|
94
97
|
return;
|
|
95
98
|
}
|
|
99
|
+
// Ignored via go/ees005
|
|
100
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
96
101
|
var link = node.marks.find(function (mark) {
|
|
97
102
|
return mark.type === linkType;
|
|
98
103
|
}); // Already check exist
|
|
@@ -162,7 +167,10 @@ function toggleLinkMark(tr, state, _ref) {
|
|
|
162
167
|
}
|
|
163
168
|
var fireAnalyticForMediaLink = function fireAnalyticForMediaLink(tr, action) {
|
|
164
169
|
var attributes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
|
|
165
|
-
var editorAnalyticsAPI
|
|
170
|
+
var editorAnalyticsAPI
|
|
171
|
+
// Ignored via go/ees005
|
|
172
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
173
|
+
= arguments.length > 3 ? arguments[3] : undefined;
|
|
166
174
|
editorAnalyticsAPI === null || editorAnalyticsAPI === void 0 || editorAnalyticsAPI.attachAnalyticsEvent({
|
|
167
175
|
action: action,
|
|
168
176
|
eventType: _analytics.EVENT_TYPE.TRACK,
|
|
@@ -84,6 +84,9 @@ function handleSelectionAfterWrapRight(isEmptyNode) {
|
|
|
84
84
|
// the last is the image so should let the default behaviour delete the image
|
|
85
85
|
return false;
|
|
86
86
|
}
|
|
87
|
+
|
|
88
|
+
// Ignored via go/ees005
|
|
89
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
87
90
|
var mediaSingle = getSibling(state.selection, -1); // Sibling is a media single already checked in main code
|
|
88
91
|
var mediaSinglePos = $from.pos - mediaSingle.nodeSize;
|
|
89
92
|
|
|
@@ -113,6 +116,8 @@ function handleSelectionAfterWrapRight(isEmptyNode) {
|
|
|
113
116
|
} else {
|
|
114
117
|
// If is any other kind of block just add the paragraph after it
|
|
115
118
|
var endOfBlockPos = maybeAnyBlockPos + maybeSibling.nodeSize - 1;
|
|
119
|
+
// Ignored via go/ees005
|
|
120
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
116
121
|
(0, _utils2.safeInsert)($from.parent.copy($from.parent.content), endOfBlockPos)(tr);
|
|
117
122
|
}
|
|
118
123
|
}
|
|
@@ -141,6 +146,9 @@ var backspaceAfterMediaNode = function backspaceAfterMediaNode(schema) {
|
|
|
141
146
|
if (!isSiblingOfType(state.selection, schema.nodes.mediaSingle, previousSibling) && !isSiblingOfType(state.selection, schema.nodes.mediaGroup, previousSibling)) {
|
|
142
147
|
return false;
|
|
143
148
|
}
|
|
149
|
+
|
|
150
|
+
// Ignored via go/ees005
|
|
151
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
144
152
|
var media = getSibling(state.selection, previousSibling);
|
|
145
153
|
|
|
146
154
|
// if media single
|
|
@@ -175,6 +183,8 @@ var backspaceAfterMediaNode = function backspaceAfterMediaNode(schema) {
|
|
|
175
183
|
function keymapPlugin(schema) {
|
|
176
184
|
var list = {};
|
|
177
185
|
var backspaceAfterMediaCommand = backspaceAfterMediaNode(schema);
|
|
186
|
+
// Ignored via go/ees005
|
|
187
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
178
188
|
(0, _keymaps.bindKeymapWithCommand)(_keymaps.backspace.common, backspaceAfterMediaCommand, list);
|
|
179
189
|
return (0, _keymap.keymap)(list);
|
|
180
190
|
}
|
|
@@ -16,21 +16,49 @@ var _captions = require("../pm-plugins/commands/captions");
|
|
|
16
16
|
var _pluginKey = require("../pm-plugins/plugin-key");
|
|
17
17
|
var _commands = require("../ui/toolbar/commands");
|
|
18
18
|
var _utils = require("../ui/toolbar/utils");
|
|
19
|
+
// Ignored via go/ees005
|
|
20
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
19
21
|
function keymapPlugin(options, editorAnalyticsAPI, editorSelectionAPI, widthPlugin, getIntl) {
|
|
20
22
|
var list = {};
|
|
23
|
+
|
|
24
|
+
// Ignored via go/ees005
|
|
25
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
21
26
|
(0, _keymaps.bindKeymapWithCommand)(_keymaps.undo.common, ignoreLinksInSteps, list);
|
|
22
27
|
if (options !== null && options !== void 0 && options.allowCaptions) {
|
|
28
|
+
// Ignored via go/ees005
|
|
29
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
23
30
|
(0, _keymaps.bindKeymapWithCommand)(_keymaps.moveDown.common, insertAndSelectCaption(editorAnalyticsAPI), list);
|
|
31
|
+
// Ignored via go/ees005
|
|
32
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
24
33
|
(0, _keymaps.bindKeymapWithCommand)(_keymaps.tab.common, insertAndSelectCaption(editorAnalyticsAPI), list);
|
|
34
|
+
|
|
35
|
+
// Ignored via go/ees005
|
|
36
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
25
37
|
(0, _keymaps.bindKeymapWithCommand)(_keymaps.moveLeft.common, arrowLeftFromMediaSingle(editorSelectionAPI), list);
|
|
38
|
+
// Ignored via go/ees005
|
|
39
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
26
40
|
(0, _keymaps.bindKeymapWithCommand)(_keymaps.moveRight.common, arrowRightFromMediaSingle(editorSelectionAPI), list);
|
|
27
41
|
}
|
|
42
|
+
|
|
43
|
+
// Ignored via go/ees005
|
|
44
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
28
45
|
(0, _keymaps.bindKeymapWithCommand)(_keymaps.insertNewLine.common, splitMediaGroup, list);
|
|
46
|
+
// Ignored via go/ees005
|
|
47
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
29
48
|
(0, _keymaps.bindKeymapWithCommand)(_keymaps.enter.common, splitMediaGroup, list);
|
|
30
49
|
if ((0, _platformFeatureFlags.fg)('platform_editor_media_extended_resize_experience')) {
|
|
31
|
-
(0, _keymaps.bindKeymapWithCommand)(
|
|
32
|
-
|
|
50
|
+
(0, _keymaps.bindKeymapWithCommand)(
|
|
51
|
+
// Ignored via go/ees005
|
|
52
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
53
|
+
_keymaps.increaseMediaSize.common, handleMediaIncrease(editorAnalyticsAPI, widthPlugin, options, getIntl), list);
|
|
54
|
+
(0, _keymaps.bindKeymapWithCommand)(
|
|
55
|
+
// Ignored via go/ees005
|
|
56
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
57
|
+
_keymaps.decreaseMediaSize.common, handleMediaDecrease(editorAnalyticsAPI, widthPlugin, options, getIntl), list);
|
|
33
58
|
}
|
|
59
|
+
|
|
60
|
+
// Ignored via go/ees005
|
|
61
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
34
62
|
(0, _keymaps.bindKeymapWithCommand)(_keymaps.activateVideoControls.common, focusPlayButton, list);
|
|
35
63
|
return (0, _keymap.keymap)(list);
|
|
36
64
|
}
|
|
@@ -52,7 +80,10 @@ var focusPlayButton = function focusPlayButton(state) {
|
|
|
52
80
|
}
|
|
53
81
|
return true;
|
|
54
82
|
};
|
|
55
|
-
var validationMaxMin = function validationMaxMin(newWidth, maxWidth, minWidth, validation
|
|
83
|
+
var validationMaxMin = function validationMaxMin(newWidth, maxWidth, minWidth, validation
|
|
84
|
+
// Ignored via go/ees005
|
|
85
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
86
|
+
) {
|
|
56
87
|
var newWidthValidated;
|
|
57
88
|
if (newWidth > maxWidth) {
|
|
58
89
|
newWidthValidated = maxWidth;
|
|
@@ -69,7 +100,10 @@ var validationMaxMin = function validationMaxMin(newWidth, maxWidth, minWidth, v
|
|
|
69
100
|
validation: validation
|
|
70
101
|
};
|
|
71
102
|
};
|
|
72
|
-
var createAnnouncer = function createAnnouncer(action, mediaWidth, changeAmount, validation, getIntl
|
|
103
|
+
var createAnnouncer = function createAnnouncer(action, mediaWidth, changeAmount, validation, getIntl
|
|
104
|
+
// Ignored via go/ees005
|
|
105
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
106
|
+
) {
|
|
73
107
|
var announcerContainer = document.getElementById('media-announcer') || document.createElement('div');
|
|
74
108
|
var intl = getIntl();
|
|
75
109
|
if (!announcerContainer.id) {
|
|
@@ -77,6 +111,8 @@ var createAnnouncer = function createAnnouncer(action, mediaWidth, changeAmount,
|
|
|
77
111
|
announcerContainer.setAttribute('role', 'status');
|
|
78
112
|
announcerContainer.setAttribute('aria-live', 'polite');
|
|
79
113
|
announcerContainer.setAttribute('aria-atomic', 'true');
|
|
114
|
+
// Ignored via go/ees005
|
|
115
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
80
116
|
var style = announcerContainer.style;
|
|
81
117
|
style.position = 'absolute';
|
|
82
118
|
style.width = '1px';
|
|
@@ -98,7 +134,10 @@ var createAnnouncer = function createAnnouncer(action, mediaWidth, changeAmount,
|
|
|
98
134
|
}
|
|
99
135
|
}
|
|
100
136
|
};
|
|
101
|
-
var handleMediaSizeChange = function handleMediaSizeChange(editorAnalyticsAPI, widthPlugin, options, changeAmount, action, getIntl
|
|
137
|
+
var handleMediaSizeChange = function handleMediaSizeChange(editorAnalyticsAPI, widthPlugin, options, changeAmount, action, getIntl
|
|
138
|
+
// Ignored via go/ees005
|
|
139
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
140
|
+
) {
|
|
102
141
|
return function (state, dispatch) {
|
|
103
142
|
var _getSelectedMediaSing, _widthPlugin$sharedSt, _widthPlugin$sharedSt2, _getSelectedMediaSing2;
|
|
104
143
|
var selection = state.selection;
|
|
@@ -110,6 +149,8 @@ var handleMediaSizeChange = function handleMediaSizeChange(editorAnalyticsAPI, w
|
|
|
110
149
|
var mediaPluginState = _pluginKey.stateKey.getState(state);
|
|
111
150
|
var maxWidthForNestedNode = mediaPluginState.currentMaxWidth;
|
|
112
151
|
var minWidth = _mediaSingle.MEDIA_SINGLE_DEFAULT_MIN_PIXEL_WIDTH;
|
|
152
|
+
// Ignored via go/ees005
|
|
153
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
113
154
|
var maxWidth = maxWidthForNestedNode;
|
|
114
155
|
var currentMaxWidth = (widthPlugin === null || widthPlugin === void 0 || (_widthPlugin$sharedSt2 = widthPlugin.sharedState.currentState()) === null || _widthPlugin$sharedSt2 === void 0 ? void 0 : _widthPlugin$sharedSt2.width) || maxWidth;
|
|
115
156
|
if (maxWidth === undefined && maxWidthForNestedNode === undefined) {
|
|
@@ -133,10 +174,16 @@ var handleMediaSizeChange = function handleMediaSizeChange(editorAnalyticsAPI, w
|
|
|
133
174
|
return true;
|
|
134
175
|
};
|
|
135
176
|
};
|
|
136
|
-
var handleMediaIncrease = function handleMediaIncrease(editorAnalyticsAPI, widthPlugin, options, getIntl
|
|
177
|
+
var handleMediaIncrease = function handleMediaIncrease(editorAnalyticsAPI, widthPlugin, options, getIntl
|
|
178
|
+
// Ignored via go/ees005
|
|
179
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
180
|
+
) {
|
|
137
181
|
return handleMediaSizeChange(editorAnalyticsAPI, widthPlugin, options, 1, 'increased', getIntl);
|
|
138
182
|
};
|
|
139
|
-
var handleMediaDecrease = function handleMediaDecrease(editorAnalyticsAPI, widthPlugin, options, getIntl
|
|
183
|
+
var handleMediaDecrease = function handleMediaDecrease(editorAnalyticsAPI, widthPlugin, options, getIntl
|
|
184
|
+
// Ignored via go/ees005
|
|
185
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
186
|
+
) {
|
|
140
187
|
return handleMediaSizeChange(editorAnalyticsAPI, widthPlugin, options, -1, 'decreased', getIntl);
|
|
141
188
|
};
|
|
142
189
|
var insertAndSelectCaption = function insertAndSelectCaption(editorAnalyticsAPI) {
|
|
@@ -9,6 +9,9 @@ var _keymap = require("@atlaskit/editor-prosemirror/keymap");
|
|
|
9
9
|
var _linking = require("../commands/linking");
|
|
10
10
|
function keymapPlugin(schema) {
|
|
11
11
|
var list = {};
|
|
12
|
+
|
|
13
|
+
// Ignored via go/ees005
|
|
14
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
12
15
|
(0, _keymaps.bindKeymapWithCommand)(_keymaps.addLink.common, _linking.showLinkingToolbarWithMediaTypeCheck, list);
|
|
13
16
|
return (0, _keymap.keymap)(list);
|
|
14
17
|
}
|