@atlaskit/editor-plugin-media 3.0.0 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/cjs/pm-plugins/pixel-resizing/ui/styles.js +1 -1
- package/dist/cjs/ui/toolbar/index.js +19 -3
- package/dist/es2019/pm-plugins/pixel-resizing/ui/styles.js +1 -1
- package/dist/es2019/ui/toolbar/index.js +19 -3
- package/dist/esm/pm-plugins/pixel-resizing/ui/styles.js +1 -1
- package/dist/esm/ui/toolbar/index.js +19 -3
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-media
|
|
2
2
|
|
|
3
|
+
## 3.0.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#150219](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/150219)
|
|
8
|
+
[`8f6e3a7613db0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8f6e3a7613db0) -
|
|
9
|
+
Fixes invalid css comments in template literal styles
|
|
10
|
+
- [#150731](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/150731)
|
|
11
|
+
[`e21eb5fc3b241`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e21eb5fc3b241) -
|
|
12
|
+
ED-27860 Fix media deleted events and update inputMethod to floatingToolbar for expands
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
3
15
|
## 3.0.0
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -11,7 +11,7 @@ var _templateObject; // eslint-disable-next-line @atlaskit/ui-styling-standard/u
|
|
|
11
11
|
var PIXEL_SIZING_WRAPPER_MINIMUM_WIDTH = 120;
|
|
12
12
|
|
|
13
13
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
14
|
-
var pixelSizingWrapper = exports.pixelSizingWrapper = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\tdisplay: grid;\n\tgrid-template-columns: 1fr 1em 1fr 0;\n\tgrid-template-rows: auto;\n\tgrid-template-areas: 'widthinput label heightinput submit';\n\twidth: ", "px;\n\ttext-align: center;\n\theight: ", ";\n\n\t
|
|
14
|
+
var pixelSizingWrapper = exports.pixelSizingWrapper = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\tdisplay: grid;\n\tgrid-template-columns: 1fr 1em 1fr 0;\n\tgrid-template-rows: auto;\n\tgrid-template-areas: 'widthinput label heightinput submit';\n\twidth: ", "px;\n\ttext-align: center;\n\theight: ", ";\n\n\t/* Atlaskit fieldset does not allow style override */\n\t& > * {\n\t\tmargin-top: 0 !important;\n\t}\n"])), PIXEL_SIZING_WRAPPER_MINIMUM_WIDTH, "var(--ds-space-300, 24px)");
|
|
15
15
|
|
|
16
16
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
17
17
|
var pixelEntryForm = exports.pixelEntryForm = (0, _react.css)({
|
|
@@ -63,10 +63,26 @@ var mediaTypeMessages = {
|
|
|
63
63
|
archive: _mediaUi.messages.file_archive_is_selected,
|
|
64
64
|
unknown: _mediaUi.messages.file_unknown_is_selected
|
|
65
65
|
};
|
|
66
|
-
var
|
|
66
|
+
var getMediaActionSubject = function getMediaActionSubject(nodeType) {
|
|
67
|
+
switch (nodeType.name) {
|
|
68
|
+
case 'mediaSingle':
|
|
69
|
+
return _analytics.ACTION_SUBJECT.MEDIA_SINGLE;
|
|
70
|
+
case 'mediaInline':
|
|
71
|
+
return _analytics.ACTION_SUBJECT.MEDIA_INLINE;
|
|
72
|
+
case 'mediaGroup':
|
|
73
|
+
return _analytics.ACTION_SUBJECT.MEDIA_GROUP;
|
|
74
|
+
default:
|
|
75
|
+
return _analytics.ACTION_SUBJECT.MEDIA;
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
var removeWithAnalytics = function removeWithAnalytics(editorAnalyticsApi, nodeType) {
|
|
79
|
+
if (!nodeType) {
|
|
80
|
+
return remove;
|
|
81
|
+
}
|
|
82
|
+
var mediaType = getMediaActionSubject(nodeType);
|
|
67
83
|
return (0, _editorAnalytics.withAnalytics)(editorAnalyticsApi, {
|
|
68
84
|
action: _analytics.ACTION.DELETED,
|
|
69
|
-
actionSubject:
|
|
85
|
+
actionSubject: mediaType,
|
|
70
86
|
attributes: {
|
|
71
87
|
inputMethod: _analytics.INPUT_METHOD.FLOATING_TB
|
|
72
88
|
},
|
|
@@ -862,7 +878,7 @@ var floatingToolbar = exports.floatingToolbar = function floatingToolbar(state,
|
|
|
862
878
|
})
|
|
863
879
|
}, hoverDecorationProps(nodeType, _editorSharedStyles.akEditorSelectedNodeClassName)), _objectSpread({
|
|
864
880
|
title: intl === null || intl === void 0 ? void 0 : intl.formatMessage(_messages.default.delete),
|
|
865
|
-
onClick: (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_analytics_2') ? removeWithAnalytics(pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a12 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a12 === void 0 ? void 0 : _pluginInjectionApi$a12.actions) : remove,
|
|
881
|
+
onClick: (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_analytics_2') ? removeWithAnalytics(pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a12 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a12 === void 0 ? void 0 : _pluginInjectionApi$a12.actions, selectedNodeType) : remove,
|
|
866
882
|
icon: /*#__PURE__*/_react.default.createElement(_delete.default, {
|
|
867
883
|
label: ""
|
|
868
884
|
})
|
|
@@ -12,7 +12,7 @@ export const pixelSizingWrapper = css`
|
|
|
12
12
|
text-align: center;
|
|
13
13
|
height: ${"var(--ds-space-300, 24px)"};
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
/* Atlaskit fieldset does not allow style override */
|
|
16
16
|
& > * {
|
|
17
17
|
margin-top: 0 !important;
|
|
18
18
|
}
|
|
@@ -49,10 +49,26 @@ const mediaTypeMessages = {
|
|
|
49
49
|
archive: messages.file_archive_is_selected,
|
|
50
50
|
unknown: messages.file_unknown_is_selected
|
|
51
51
|
};
|
|
52
|
-
const
|
|
52
|
+
const getMediaActionSubject = nodeType => {
|
|
53
|
+
switch (nodeType.name) {
|
|
54
|
+
case 'mediaSingle':
|
|
55
|
+
return ACTION_SUBJECT.MEDIA_SINGLE;
|
|
56
|
+
case 'mediaInline':
|
|
57
|
+
return ACTION_SUBJECT.MEDIA_INLINE;
|
|
58
|
+
case 'mediaGroup':
|
|
59
|
+
return ACTION_SUBJECT.MEDIA_GROUP;
|
|
60
|
+
default:
|
|
61
|
+
return ACTION_SUBJECT.MEDIA;
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
const removeWithAnalytics = (editorAnalyticsApi, nodeType) => {
|
|
65
|
+
if (!nodeType) {
|
|
66
|
+
return remove;
|
|
67
|
+
}
|
|
68
|
+
const mediaType = getMediaActionSubject(nodeType);
|
|
53
69
|
return withAnalytics(editorAnalyticsApi, {
|
|
54
70
|
action: ACTION.DELETED,
|
|
55
|
-
actionSubject:
|
|
71
|
+
actionSubject: mediaType,
|
|
56
72
|
attributes: {
|
|
57
73
|
inputMethod: INPUT_METHOD.FLOATING_TB
|
|
58
74
|
},
|
|
@@ -860,7 +876,7 @@ export const floatingToolbar = (state, intl, options = {}, pluginInjectionApi) =
|
|
|
860
876
|
...hoverDecorationProps(nodeType, akEditorSelectedNodeClassName)
|
|
861
877
|
}, {
|
|
862
878
|
title: intl === null || intl === void 0 ? void 0 : intl.formatMessage(commonMessages.delete),
|
|
863
|
-
onClick: fg('platform_editor_controls_patch_analytics_2') ? removeWithAnalytics(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$a12 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a12 === void 0 ? void 0 : _pluginInjectionApi$a12.actions) : remove,
|
|
879
|
+
onClick: fg('platform_editor_controls_patch_analytics_2') ? removeWithAnalytics(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$a12 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a12 === void 0 ? void 0 : _pluginInjectionApi$a12.actions, selectedNodeType) : remove,
|
|
864
880
|
icon: /*#__PURE__*/React.createElement(DeleteIcon, {
|
|
865
881
|
label: ""
|
|
866
882
|
}),
|
|
@@ -5,7 +5,7 @@ import { css } from '@emotion/react';
|
|
|
5
5
|
var PIXEL_SIZING_WRAPPER_MINIMUM_WIDTH = 120;
|
|
6
6
|
|
|
7
7
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
8
|
-
export var pixelSizingWrapper = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\tdisplay: grid;\n\tgrid-template-columns: 1fr 1em 1fr 0;\n\tgrid-template-rows: auto;\n\tgrid-template-areas: 'widthinput label heightinput submit';\n\twidth: ", "px;\n\ttext-align: center;\n\theight: ", ";\n\n\t
|
|
8
|
+
export var pixelSizingWrapper = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\tdisplay: grid;\n\tgrid-template-columns: 1fr 1em 1fr 0;\n\tgrid-template-rows: auto;\n\tgrid-template-areas: 'widthinput label heightinput submit';\n\twidth: ", "px;\n\ttext-align: center;\n\theight: ", ";\n\n\t/* Atlaskit fieldset does not allow style override */\n\t& > * {\n\t\tmargin-top: 0 !important;\n\t}\n"])), PIXEL_SIZING_WRAPPER_MINIMUM_WIDTH, "var(--ds-space-300, 24px)");
|
|
9
9
|
|
|
10
10
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
11
11
|
export var pixelEntryForm = css({
|
|
@@ -53,10 +53,26 @@ var mediaTypeMessages = {
|
|
|
53
53
|
archive: messages.file_archive_is_selected,
|
|
54
54
|
unknown: messages.file_unknown_is_selected
|
|
55
55
|
};
|
|
56
|
-
var
|
|
56
|
+
var getMediaActionSubject = function getMediaActionSubject(nodeType) {
|
|
57
|
+
switch (nodeType.name) {
|
|
58
|
+
case 'mediaSingle':
|
|
59
|
+
return ACTION_SUBJECT.MEDIA_SINGLE;
|
|
60
|
+
case 'mediaInline':
|
|
61
|
+
return ACTION_SUBJECT.MEDIA_INLINE;
|
|
62
|
+
case 'mediaGroup':
|
|
63
|
+
return ACTION_SUBJECT.MEDIA_GROUP;
|
|
64
|
+
default:
|
|
65
|
+
return ACTION_SUBJECT.MEDIA;
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
var removeWithAnalytics = function removeWithAnalytics(editorAnalyticsApi, nodeType) {
|
|
69
|
+
if (!nodeType) {
|
|
70
|
+
return remove;
|
|
71
|
+
}
|
|
72
|
+
var mediaType = getMediaActionSubject(nodeType);
|
|
57
73
|
return withAnalytics(editorAnalyticsApi, {
|
|
58
74
|
action: ACTION.DELETED,
|
|
59
|
-
actionSubject:
|
|
75
|
+
actionSubject: mediaType,
|
|
60
76
|
attributes: {
|
|
61
77
|
inputMethod: INPUT_METHOD.FLOATING_TB
|
|
62
78
|
},
|
|
@@ -852,7 +868,7 @@ export var floatingToolbar = function floatingToolbar(state, intl) {
|
|
|
852
868
|
})
|
|
853
869
|
}, hoverDecorationProps(nodeType, akEditorSelectedNodeClassName)), _objectSpread({
|
|
854
870
|
title: intl === null || intl === void 0 ? void 0 : intl.formatMessage(commonMessages.delete),
|
|
855
|
-
onClick: fg('platform_editor_controls_patch_analytics_2') ? removeWithAnalytics(pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a12 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a12 === void 0 ? void 0 : _pluginInjectionApi$a12.actions) : remove,
|
|
871
|
+
onClick: fg('platform_editor_controls_patch_analytics_2') ? removeWithAnalytics(pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a12 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a12 === void 0 ? void 0 : _pluginInjectionApi$a12.actions, selectedNodeType) : remove,
|
|
856
872
|
icon: /*#__PURE__*/React.createElement(DeleteIcon, {
|
|
857
873
|
label: ""
|
|
858
874
|
})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-media",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"description": "Media plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"@atlaskit/analytics-namespaced-context": "^7.0.0",
|
|
39
39
|
"@atlaskit/analytics-next": "^11.0.0",
|
|
40
40
|
"@atlaskit/button": "^23.0.0",
|
|
41
|
-
"@atlaskit/editor-common": "^104.
|
|
41
|
+
"@atlaskit/editor-common": "^104.1.0",
|
|
42
42
|
"@atlaskit/editor-palette": "^2.1.0",
|
|
43
43
|
"@atlaskit/editor-plugin-analytics": "^2.2.0",
|
|
44
44
|
"@atlaskit/editor-plugin-annotation": "^2.7.0",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"@atlaskit/editor-shared-styles": "^3.4.0",
|
|
58
58
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
59
59
|
"@atlaskit/form": "^12.0.0",
|
|
60
|
-
"@atlaskit/icon": "^25.
|
|
60
|
+
"@atlaskit/icon": "^25.7.0",
|
|
61
61
|
"@atlaskit/media-card": "^79.2.0",
|
|
62
62
|
"@atlaskit/media-client": "^33.0.0",
|
|
63
63
|
"@atlaskit/media-client-react": "^4.0.0",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"@atlaskit/primitives": "^14.7.0",
|
|
71
71
|
"@atlaskit/textfield": "^8.0.0",
|
|
72
72
|
"@atlaskit/theme": "^18.0.0",
|
|
73
|
-
"@atlaskit/tmp-editor-statsig": "^4.
|
|
73
|
+
"@atlaskit/tmp-editor-statsig": "^4.17.0",
|
|
74
74
|
"@atlaskit/tokens": "^4.8.0",
|
|
75
75
|
"@atlaskit/tooltip": "^20.0.0",
|
|
76
76
|
"@babel/runtime": "^7.0.0",
|