@atlaskit/editor-plugin-media 1.45.1 → 1.45.2
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 +9 -0
- package/dist/cjs/pm-plugins/main.js +11 -34
- package/dist/es2019/pm-plugins/main.js +10 -33
- package/dist/esm/pm-plugins/main.js +11 -34
- package/package.json +6 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-media
|
|
2
2
|
|
|
3
|
+
## 1.45.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#112186](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/112186)
|
|
8
|
+
[`9462d8ca2405a`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/9462d8ca2405a) -
|
|
9
|
+
Bump adf-schema to 47.2.1
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
3
12
|
## 1.45.1
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -13,7 +13,6 @@ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/creat
|
|
|
13
13
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
14
14
|
var _assert = _interopRequireDefault(require("assert"));
|
|
15
15
|
var _react = _interopRequireDefault(require("react"));
|
|
16
|
-
var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
17
16
|
var _reactIntlNext = require("react-intl-next");
|
|
18
17
|
var _uuid = _interopRequireDefault(require("uuid"));
|
|
19
18
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
@@ -28,7 +27,6 @@ var _view2 = require("@atlaskit/editor-prosemirror/view");
|
|
|
28
27
|
var _cellSelection = require("@atlaskit/editor-tables/cell-selection");
|
|
29
28
|
var _mediaClient = require("@atlaskit/media-client");
|
|
30
29
|
var _mediaCommon = require("@atlaskit/media-common");
|
|
31
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
32
30
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
33
31
|
var _helpers = _interopRequireWildcard(require("../pm-plugins/commands/helpers"));
|
|
34
32
|
var helpers = _helpers;
|
|
@@ -55,36 +53,20 @@ var MEDIA_PLUGIN_RESIZING_WIDTH_KEY = exports.MEDIA_PLUGIN_RESIZING_WIDTH_KEY =
|
|
|
55
53
|
var createDropPlaceholder = function createDropPlaceholder(intl, nodeViewPortalProviderAPI, dropPlaceholderKey, allowDropLine) {
|
|
56
54
|
var dropPlaceholder = document.createElement('div');
|
|
57
55
|
var createElement = _react.default.createElement;
|
|
58
|
-
if (
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
return createElement(_reactIntlNext.RawIntlProvider, {
|
|
62
|
-
value: intl
|
|
63
|
-
}, createElement(_DropPlaceholder.default, {
|
|
64
|
-
type: 'single'
|
|
65
|
-
}));
|
|
66
|
-
}, dropPlaceholder, dropPlaceholderKey);
|
|
67
|
-
} else {
|
|
68
|
-
nodeViewPortalProviderAPI.render(function () {
|
|
69
|
-
return createElement(_reactIntlNext.RawIntlProvider, {
|
|
70
|
-
value: intl
|
|
71
|
-
}, createElement(_DropPlaceholder.default));
|
|
72
|
-
}, dropPlaceholder, dropPlaceholderKey);
|
|
73
|
-
}
|
|
74
|
-
} else {
|
|
75
|
-
if (allowDropLine) {
|
|
76
|
-
//eslint-disable-next-line react/no-deprecated
|
|
77
|
-
_reactDom.default.render(createElement(_reactIntlNext.RawIntlProvider, {
|
|
56
|
+
if (allowDropLine) {
|
|
57
|
+
nodeViewPortalProviderAPI.render(function () {
|
|
58
|
+
return createElement(_reactIntlNext.RawIntlProvider, {
|
|
78
59
|
value: intl
|
|
79
60
|
}, createElement(_DropPlaceholder.default, {
|
|
80
61
|
type: 'single'
|
|
81
|
-
}))
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
|
|
62
|
+
}));
|
|
63
|
+
}, dropPlaceholder, dropPlaceholderKey);
|
|
64
|
+
} else {
|
|
65
|
+
nodeViewPortalProviderAPI.render(function () {
|
|
66
|
+
return createElement(_reactIntlNext.RawIntlProvider, {
|
|
85
67
|
value: intl
|
|
86
|
-
}, createElement(_DropPlaceholder.default))
|
|
87
|
-
}
|
|
68
|
+
}, createElement(_DropPlaceholder.default));
|
|
69
|
+
}, dropPlaceholder, dropPlaceholderKey);
|
|
88
70
|
}
|
|
89
71
|
return dropPlaceholder;
|
|
90
72
|
};
|
|
@@ -957,12 +939,7 @@ var createPlugin = exports.createPlugin = function createPlugin(_schema, options
|
|
|
957
939
|
key: 'drop-placeholder',
|
|
958
940
|
destroy: function destroy(elem) {
|
|
959
941
|
if (elem instanceof HTMLElement) {
|
|
960
|
-
|
|
961
|
-
nodeViewPortalProviderAPI.remove(dropPlaceholderKey);
|
|
962
|
-
} else {
|
|
963
|
-
//eslint-disable-next-line react/no-deprecated
|
|
964
|
-
_reactDom.default.unmountComponentAtNode(elem);
|
|
965
|
-
}
|
|
942
|
+
nodeViewPortalProviderAPI.remove(dropPlaceholderKey);
|
|
966
943
|
}
|
|
967
944
|
}
|
|
968
945
|
})].concat(mediaNodes);
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import assert from 'assert';
|
|
3
3
|
import React from 'react';
|
|
4
|
-
import ReactDOM from 'react-dom';
|
|
5
4
|
import { RawIntlProvider } from 'react-intl-next';
|
|
6
5
|
import uuid from 'uuid';
|
|
7
6
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
@@ -16,7 +15,6 @@ import { Decoration, DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
|
16
15
|
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
17
16
|
import { isFileIdentifier } from '@atlaskit/media-client';
|
|
18
17
|
import { getMediaFeatureFlag } from '@atlaskit/media-common';
|
|
19
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
20
18
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
21
19
|
import { updateMediaNodeAttrs } from '../pm-plugins/commands/helpers';
|
|
22
20
|
// Ignored via go/ees005
|
|
@@ -37,32 +35,16 @@ export const MEDIA_PLUGIN_RESIZING_WIDTH_KEY = 'mediaSinglePlugin.resizing-width
|
|
|
37
35
|
const createDropPlaceholder = (intl, nodeViewPortalProviderAPI, dropPlaceholderKey, allowDropLine) => {
|
|
38
36
|
const dropPlaceholder = document.createElement('div');
|
|
39
37
|
const createElement = React.createElement;
|
|
40
|
-
if (
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
})), dropPlaceholder, dropPlaceholderKey);
|
|
47
|
-
} else {
|
|
48
|
-
nodeViewPortalProviderAPI.render(() => createElement(RawIntlProvider, {
|
|
49
|
-
value: intl
|
|
50
|
-
}, createElement(DropPlaceholder)), dropPlaceholder, dropPlaceholderKey);
|
|
51
|
-
}
|
|
38
|
+
if (allowDropLine) {
|
|
39
|
+
nodeViewPortalProviderAPI.render(() => createElement(RawIntlProvider, {
|
|
40
|
+
value: intl
|
|
41
|
+
}, createElement(DropPlaceholder, {
|
|
42
|
+
type: 'single'
|
|
43
|
+
})), dropPlaceholder, dropPlaceholderKey);
|
|
52
44
|
} else {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
value: intl
|
|
57
|
-
}, createElement(DropPlaceholder, {
|
|
58
|
-
type: 'single'
|
|
59
|
-
})), dropPlaceholder);
|
|
60
|
-
} else {
|
|
61
|
-
//eslint-disable-next-line react/no-deprecated
|
|
62
|
-
ReactDOM.render(createElement(RawIntlProvider, {
|
|
63
|
-
value: intl
|
|
64
|
-
}, createElement(DropPlaceholder)), dropPlaceholder);
|
|
65
|
-
}
|
|
45
|
+
nodeViewPortalProviderAPI.render(() => createElement(RawIntlProvider, {
|
|
46
|
+
value: intl
|
|
47
|
+
}, createElement(DropPlaceholder)), dropPlaceholder, dropPlaceholderKey);
|
|
66
48
|
}
|
|
67
49
|
return dropPlaceholder;
|
|
68
50
|
};
|
|
@@ -846,12 +828,7 @@ export const createPlugin = (_schema, options, getIntl, pluginInjectionApi, node
|
|
|
846
828
|
key: 'drop-placeholder',
|
|
847
829
|
destroy: elem => {
|
|
848
830
|
if (elem instanceof HTMLElement) {
|
|
849
|
-
|
|
850
|
-
nodeViewPortalProviderAPI.remove(dropPlaceholderKey);
|
|
851
|
-
} else {
|
|
852
|
-
//eslint-disable-next-line react/no-deprecated
|
|
853
|
-
ReactDOM.unmountComponentAtNode(elem);
|
|
854
|
-
}
|
|
831
|
+
nodeViewPortalProviderAPI.remove(dropPlaceholderKey);
|
|
855
832
|
}
|
|
856
833
|
}
|
|
857
834
|
}), ...mediaNodes];
|
|
@@ -10,7 +10,6 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
10
10
|
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) { _defineProperty(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; }
|
|
11
11
|
import assert from 'assert';
|
|
12
12
|
import React from 'react';
|
|
13
|
-
import ReactDOM from 'react-dom';
|
|
14
13
|
import { RawIntlProvider } from 'react-intl-next';
|
|
15
14
|
import uuid from 'uuid';
|
|
16
15
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
@@ -25,7 +24,6 @@ import { Decoration, DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
|
25
24
|
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
26
25
|
import { isFileIdentifier } from '@atlaskit/media-client';
|
|
27
26
|
import { getMediaFeatureFlag } from '@atlaskit/media-common';
|
|
28
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
29
27
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
30
28
|
import { updateMediaNodeAttrs } from '../pm-plugins/commands/helpers';
|
|
31
29
|
// Ignored via go/ees005
|
|
@@ -46,36 +44,20 @@ export var MEDIA_PLUGIN_RESIZING_WIDTH_KEY = 'mediaSinglePlugin.resizing-width';
|
|
|
46
44
|
var createDropPlaceholder = function createDropPlaceholder(intl, nodeViewPortalProviderAPI, dropPlaceholderKey, allowDropLine) {
|
|
47
45
|
var dropPlaceholder = document.createElement('div');
|
|
48
46
|
var createElement = React.createElement;
|
|
49
|
-
if (
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
return createElement(RawIntlProvider, {
|
|
53
|
-
value: intl
|
|
54
|
-
}, createElement(DropPlaceholder, {
|
|
55
|
-
type: 'single'
|
|
56
|
-
}));
|
|
57
|
-
}, dropPlaceholder, dropPlaceholderKey);
|
|
58
|
-
} else {
|
|
59
|
-
nodeViewPortalProviderAPI.render(function () {
|
|
60
|
-
return createElement(RawIntlProvider, {
|
|
61
|
-
value: intl
|
|
62
|
-
}, createElement(DropPlaceholder));
|
|
63
|
-
}, dropPlaceholder, dropPlaceholderKey);
|
|
64
|
-
}
|
|
65
|
-
} else {
|
|
66
|
-
if (allowDropLine) {
|
|
67
|
-
//eslint-disable-next-line react/no-deprecated
|
|
68
|
-
ReactDOM.render(createElement(RawIntlProvider, {
|
|
47
|
+
if (allowDropLine) {
|
|
48
|
+
nodeViewPortalProviderAPI.render(function () {
|
|
49
|
+
return createElement(RawIntlProvider, {
|
|
69
50
|
value: intl
|
|
70
51
|
}, createElement(DropPlaceholder, {
|
|
71
52
|
type: 'single'
|
|
72
|
-
}))
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
|
|
53
|
+
}));
|
|
54
|
+
}, dropPlaceholder, dropPlaceholderKey);
|
|
55
|
+
} else {
|
|
56
|
+
nodeViewPortalProviderAPI.render(function () {
|
|
57
|
+
return createElement(RawIntlProvider, {
|
|
76
58
|
value: intl
|
|
77
|
-
}, createElement(DropPlaceholder))
|
|
78
|
-
}
|
|
59
|
+
}, createElement(DropPlaceholder));
|
|
60
|
+
}, dropPlaceholder, dropPlaceholderKey);
|
|
79
61
|
}
|
|
80
62
|
return dropPlaceholder;
|
|
81
63
|
};
|
|
@@ -948,12 +930,7 @@ export var createPlugin = function createPlugin(_schema, options, getIntl, plugi
|
|
|
948
930
|
key: 'drop-placeholder',
|
|
949
931
|
destroy: function destroy(elem) {
|
|
950
932
|
if (elem instanceof HTMLElement) {
|
|
951
|
-
|
|
952
|
-
nodeViewPortalProviderAPI.remove(dropPlaceholderKey);
|
|
953
|
-
} else {
|
|
954
|
-
//eslint-disable-next-line react/no-deprecated
|
|
955
|
-
ReactDOM.unmountComponentAtNode(elem);
|
|
956
|
-
}
|
|
933
|
+
nodeViewPortalProviderAPI.remove(dropPlaceholderKey);
|
|
957
934
|
}
|
|
958
935
|
}
|
|
959
936
|
})].concat(mediaNodes);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-media",
|
|
3
|
-
"version": "1.45.
|
|
3
|
+
"version": "1.45.2",
|
|
4
4
|
"description": "Media plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -32,14 +32,14 @@
|
|
|
32
32
|
"./types": "./src/types/index.ts"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@atlaskit/adf-schema": "^
|
|
35
|
+
"@atlaskit/adf-schema": "^47.2.1",
|
|
36
36
|
"@atlaskit/analytics-namespaced-context": "^6.13.0",
|
|
37
37
|
"@atlaskit/analytics-next": "^10.3.0",
|
|
38
38
|
"@atlaskit/button": "^20.5.0",
|
|
39
|
-
"@atlaskit/editor-common": "^99.
|
|
39
|
+
"@atlaskit/editor-common": "^99.14.0",
|
|
40
40
|
"@atlaskit/editor-palette": "1.7.0",
|
|
41
41
|
"@atlaskit/editor-plugin-analytics": "^1.12.0",
|
|
42
|
-
"@atlaskit/editor-plugin-annotation": "1.28.
|
|
42
|
+
"@atlaskit/editor-plugin-annotation": "1.28.1",
|
|
43
43
|
"@atlaskit/editor-plugin-connectivity": "^1.3.0",
|
|
44
44
|
"@atlaskit/editor-plugin-decorations": "^1.5.0",
|
|
45
45
|
"@atlaskit/editor-plugin-editor-disabled": "^1.5.0",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"@atlaskit/editor-shared-styles": "^3.2.0",
|
|
55
55
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
56
56
|
"@atlaskit/form": "^11.1.0",
|
|
57
|
-
"@atlaskit/icon": "^23.
|
|
57
|
+
"@atlaskit/icon": "^23.9.0",
|
|
58
58
|
"@atlaskit/media-card": "^78.19.0",
|
|
59
59
|
"@atlaskit/media-client": "^31.1.0",
|
|
60
60
|
"@atlaskit/media-client-react": "^3.0.0",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"@atlaskit/primitives": "^13.5.0",
|
|
68
68
|
"@atlaskit/textfield": "^6.8.0",
|
|
69
69
|
"@atlaskit/theme": "^15.0.0",
|
|
70
|
-
"@atlaskit/tmp-editor-statsig": "^2.
|
|
70
|
+
"@atlaskit/tmp-editor-statsig": "^2.46.0",
|
|
71
71
|
"@atlaskit/tokens": "^3.3.0",
|
|
72
72
|
"@atlaskit/tooltip": "^19.1.0",
|
|
73
73
|
"@babel/runtime": "^7.0.0",
|
|
@@ -148,9 +148,6 @@
|
|
|
148
148
|
"confluence_frontend_media_scroll_fix": {
|
|
149
149
|
"type": "boolean"
|
|
150
150
|
},
|
|
151
|
-
"platform_editor_react18_plugin_portalprovider": {
|
|
152
|
-
"type": "boolean"
|
|
153
|
-
},
|
|
154
151
|
"platform_editor_hide_external_media_badge": {
|
|
155
152
|
"type": "boolean"
|
|
156
153
|
},
|