@atlaskit/editor-plugin-media 1.31.9 → 1.32.0
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 +21 -0
- package/dist/cjs/plugin.js +2 -1
- package/dist/cjs/ui/MediaViewer/MediaViewerContainer.js +2 -4
- package/dist/es2019/plugin.js +2 -1
- package/dist/es2019/ui/MediaViewer/MediaViewerContainer.js +2 -4
- package/dist/esm/plugin.js +2 -1
- package/dist/esm/ui/MediaViewer/MediaViewerContainer.js +2 -4
- package/package.json +5 -8
- package/.eslintrc.js +0 -15
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-media
|
|
2
2
|
|
|
3
|
+
## 1.32.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#143644](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/143644)
|
|
8
|
+
[`b5352e3195293`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b5352e3195293) -
|
|
9
|
+
[ux] [ED-24327] Integrate new media popup into toolbar and quick action
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
15
|
+
## 1.31.10
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- [#143311](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/143311)
|
|
20
|
+
[`994ae05bb80fc`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/994ae05bb80fc) -
|
|
21
|
+
ED-24709: FF platform.editor.media.preview-in-full-page clean up
|
|
22
|
+
- Updated dependencies
|
|
23
|
+
|
|
3
24
|
## 1.31.9
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
package/dist/cjs/plugin.js
CHANGED
|
@@ -14,6 +14,7 @@ var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
|
|
|
14
14
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
15
15
|
var _mediaCommon = require("@atlaskit/media-common");
|
|
16
16
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
17
|
+
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
17
18
|
var _lazyMedia = require("./nodeviews/lazy-media");
|
|
18
19
|
var _lazyMediaGroup = require("./nodeviews/lazy-media-group");
|
|
19
20
|
var _lazyMediaInline = require("./nodeviews/lazy-media-inline");
|
|
@@ -251,7 +252,7 @@ var mediaPlugin = exports.mediaPlugin = function mediaPlugin(_ref2) {
|
|
|
251
252
|
pluginsOptions: {
|
|
252
253
|
quickInsert: function quickInsert(_ref13) {
|
|
253
254
|
var formatMessage = _ref13.formatMessage;
|
|
254
|
-
return [{
|
|
255
|
+
return (0, _experiments.editorExperiment)('add-media-from-url', true) ? [] : [{
|
|
255
256
|
id: 'media',
|
|
256
257
|
title: formatMessage(_messages.toolbarInsertBlockMessages.mediaFiles),
|
|
257
258
|
description: formatMessage(_messages.toolbarInsertBlockMessages.mediaFilesDescription),
|
|
@@ -9,7 +9,6 @@ exports.MediaViewerContainer = void 0;
|
|
|
9
9
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
var _react2 = require("@emotion/react");
|
|
12
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
13
12
|
var _utils = require("../../toolbar/utils");
|
|
14
13
|
var _isType = require("../../utils/is-type");
|
|
15
14
|
var _PortalWrapper = require("./PortalWrapper");
|
|
@@ -53,9 +52,8 @@ var MediaViewerContainer = exports.MediaViewerContainer = function MediaViewerCo
|
|
|
53
52
|
setShowMediaViewer(false);
|
|
54
53
|
};
|
|
55
54
|
var isVideoMedia = (0, _isType.isVideo)((_mediaNode$firstChild = mediaNode.firstChild) === null || _mediaNode$firstChild === void 0 ? void 0 : _mediaNode$firstChild.attrs.__fileMimeType);
|
|
56
|
-
var
|
|
57
|
-
|
|
58
|
-
return (0, _react2.jsx)(_react.Fragment, null, enableMediaViewer ? (0, _react2.jsx)(_react.Fragment, null, isInline ? (0, _react2.jsx)("span", {
|
|
55
|
+
var shouldShowViewer = isEditorViewMode && showViewer && selectedNodeAttrs && mediaClientConfig && !isVideoMedia;
|
|
56
|
+
return (0, _react2.jsx)(_react.Fragment, null, isEditorViewMode ? (0, _react2.jsx)(_react.Fragment, null, isInline ? (0, _react2.jsx)("span", {
|
|
59
57
|
onClick: showMediaViewer,
|
|
60
58
|
css: interactiveStyles,
|
|
61
59
|
"data-testid": mediaViewerContainerTestID
|
package/dist/es2019/plugin.js
CHANGED
|
@@ -7,6 +7,7 @@ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
|
7
7
|
import { NodeSelection, PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
8
8
|
import { getMediaFeatureFlag } from '@atlaskit/media-common';
|
|
9
9
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
10
11
|
import { lazyMediaView } from './nodeviews/lazy-media';
|
|
11
12
|
import { lazyMediaGroupView } from './nodeviews/lazy-media-group';
|
|
12
13
|
import { lazyMediaInlineView } from './nodeviews/lazy-media-inline';
|
|
@@ -251,7 +252,7 @@ export const mediaPlugin = ({
|
|
|
251
252
|
pluginsOptions: {
|
|
252
253
|
quickInsert: ({
|
|
253
254
|
formatMessage
|
|
254
|
-
}) => [{
|
|
255
|
+
}) => editorExperiment('add-media-from-url', true) ? [] : [{
|
|
255
256
|
id: 'media',
|
|
256
257
|
title: formatMessage(messages.mediaFiles),
|
|
257
258
|
description: formatMessage(messages.mediaFilesDescription),
|
|
@@ -6,7 +6,6 @@ import React, { Fragment, useEffect, useState } from 'react';
|
|
|
6
6
|
|
|
7
7
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
8
|
import { css, jsx } from '@emotion/react';
|
|
9
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
9
|
import { getSelectedNearestMediaContainerNodeAttrs } from '../../toolbar/utils';
|
|
11
10
|
import { isVideo } from '../../utils/is-type';
|
|
12
11
|
import { RenderMediaViewer } from './PortalWrapper';
|
|
@@ -36,9 +35,8 @@ export const MediaViewerContainer = ({
|
|
|
36
35
|
setShowMediaViewer(false);
|
|
37
36
|
};
|
|
38
37
|
const isVideoMedia = isVideo((_mediaNode$firstChild = mediaNode.firstChild) === null || _mediaNode$firstChild === void 0 ? void 0 : _mediaNode$firstChild.attrs.__fileMimeType);
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
return jsx(Fragment, null, enableMediaViewer ? jsx(Fragment, null, isInline ? jsx("span", {
|
|
38
|
+
const shouldShowViewer = isEditorViewMode && showViewer && selectedNodeAttrs && mediaClientConfig && !isVideoMedia;
|
|
39
|
+
return jsx(Fragment, null, isEditorViewMode ? jsx(Fragment, null, isInline ? jsx("span", {
|
|
42
40
|
onClick: showMediaViewer,
|
|
43
41
|
css: interactiveStyles,
|
|
44
42
|
"data-testid": mediaViewerContainerTestID
|
package/dist/esm/plugin.js
CHANGED
|
@@ -7,6 +7,7 @@ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
|
7
7
|
import { NodeSelection, PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
8
8
|
import { getMediaFeatureFlag } from '@atlaskit/media-common';
|
|
9
9
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
10
11
|
import { lazyMediaView } from './nodeviews/lazy-media';
|
|
11
12
|
import { lazyMediaGroupView } from './nodeviews/lazy-media-group';
|
|
12
13
|
import { lazyMediaInlineView } from './nodeviews/lazy-media-inline';
|
|
@@ -244,7 +245,7 @@ export var mediaPlugin = function mediaPlugin(_ref2) {
|
|
|
244
245
|
pluginsOptions: {
|
|
245
246
|
quickInsert: function quickInsert(_ref13) {
|
|
246
247
|
var formatMessage = _ref13.formatMessage;
|
|
247
|
-
return [{
|
|
248
|
+
return editorExperiment('add-media-from-url', true) ? [] : [{
|
|
248
249
|
id: 'media',
|
|
249
250
|
title: formatMessage(messages.mediaFiles),
|
|
250
251
|
description: formatMessage(messages.mediaFilesDescription),
|
|
@@ -7,7 +7,6 @@ import React, { Fragment, useEffect, useState } from 'react';
|
|
|
7
7
|
|
|
8
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
9
9
|
import { css, jsx } from '@emotion/react';
|
|
10
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
11
10
|
import { getSelectedNearestMediaContainerNodeAttrs } from '../../toolbar/utils';
|
|
12
11
|
import { isVideo } from '../../utils/is-type';
|
|
13
12
|
import { RenderMediaViewer } from './PortalWrapper';
|
|
@@ -42,9 +41,8 @@ export var MediaViewerContainer = function MediaViewerContainer(_ref) {
|
|
|
42
41
|
setShowMediaViewer(false);
|
|
43
42
|
};
|
|
44
43
|
var isVideoMedia = isVideo((_mediaNode$firstChild = mediaNode.firstChild) === null || _mediaNode$firstChild === void 0 ? void 0 : _mediaNode$firstChild.attrs.__fileMimeType);
|
|
45
|
-
var
|
|
46
|
-
|
|
47
|
-
return jsx(Fragment, null, enableMediaViewer ? jsx(Fragment, null, isInline ? jsx("span", {
|
|
44
|
+
var shouldShowViewer = isEditorViewMode && showViewer && selectedNodeAttrs && mediaClientConfig && !isVideoMedia;
|
|
45
|
+
return jsx(Fragment, null, isEditorViewMode ? jsx(Fragment, null, isInline ? jsx("span", {
|
|
48
46
|
onClick: showMediaViewer,
|
|
49
47
|
css: interactiveStyles,
|
|
50
48
|
"data-testid": mediaViewerContainerTestID
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-media",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.32.0",
|
|
4
4
|
"description": "Media plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"@atlaskit/analytics-namespaced-context": "^6.12.0",
|
|
37
37
|
"@atlaskit/analytics-next": "^10.1.0",
|
|
38
38
|
"@atlaskit/button": "^20.1.0",
|
|
39
|
-
"@atlaskit/editor-common": "^90.
|
|
39
|
+
"@atlaskit/editor-common": "^90.2.0",
|
|
40
40
|
"@atlaskit/editor-palette": "1.6.0",
|
|
41
41
|
"@atlaskit/editor-plugin-analytics": "^1.8.0",
|
|
42
42
|
"@atlaskit/editor-plugin-annotation": "1.19.7",
|
|
@@ -60,14 +60,14 @@
|
|
|
60
60
|
"@atlaskit/media-common": "^11.4.0",
|
|
61
61
|
"@atlaskit/media-filmstrip": "^47.3.0",
|
|
62
62
|
"@atlaskit/media-picker": "^66.7.0",
|
|
63
|
-
"@atlaskit/media-ui": "^25.
|
|
63
|
+
"@atlaskit/media-ui": "^25.15.0",
|
|
64
64
|
"@atlaskit/media-viewer": "^48.10.0",
|
|
65
65
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
66
|
-
"@atlaskit/primitives": "^12.
|
|
66
|
+
"@atlaskit/primitives": "^12.2.0",
|
|
67
67
|
"@atlaskit/textfield": "^6.5.0",
|
|
68
68
|
"@atlaskit/theme": "^13.0.0",
|
|
69
69
|
"@atlaskit/tmp-editor-statsig": "^2.1.8",
|
|
70
|
-
"@atlaskit/tokens": "^1.
|
|
70
|
+
"@atlaskit/tokens": "^1.61.0",
|
|
71
71
|
"@atlaskit/tooltip": "^18.7.0",
|
|
72
72
|
"@babel/runtime": "^7.0.0",
|
|
73
73
|
"@emotion/react": "^11.7.1",
|
|
@@ -132,9 +132,6 @@
|
|
|
132
132
|
"type": "boolean",
|
|
133
133
|
"referenceOnly": "true"
|
|
134
134
|
},
|
|
135
|
-
"platform.editor.media.preview-in-full-page": {
|
|
136
|
-
"type": "boolean"
|
|
137
|
-
},
|
|
138
135
|
"platform.editor.live-view.comments-in-media-toolbar-button": {
|
|
139
136
|
"type": "boolean"
|
|
140
137
|
},
|
package/.eslintrc.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
rules: {
|
|
3
|
-
'@atlaskit/design-system/consistent-css-prop-usage': 'error',
|
|
4
|
-
'@typescript-eslint/no-unused-vars': [
|
|
5
|
-
'error',
|
|
6
|
-
{
|
|
7
|
-
args: 'none',
|
|
8
|
-
vars: 'local',
|
|
9
|
-
varsIgnorePattern: '^_',
|
|
10
|
-
ignoreRestSiblings: true,
|
|
11
|
-
},
|
|
12
|
-
],
|
|
13
|
-
'no-unused-vars': 'off',
|
|
14
|
-
},
|
|
15
|
-
};
|