@atlaskit/editor-plugin-media 3.0.12 → 3.0.14
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 +15 -0
- package/dist/cjs/ui/toolbar/index.js +3 -3
- package/dist/cjs/ui/toolbar/mediaInline.js +2 -2
- package/dist/es2019/ui/toolbar/index.js +3 -3
- package/dist/es2019/ui/toolbar/mediaInline.js +3 -3
- package/dist/esm/ui/toolbar/index.js +3 -3
- package/dist/esm/ui/toolbar/mediaInline.js +3 -3
- package/package.json +5 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-media
|
|
2
2
|
|
|
3
|
+
## 3.0.14
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 3.0.13
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#165113](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/165113)
|
|
14
|
+
[`867bcb05452bf`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/867bcb05452bf) -
|
|
15
|
+
Cleaned up platform_editor_controls_patch_analytics and platform_editor_controls_patch_analytics_2
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 3.0.12
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -210,7 +210,7 @@ var generateMediaCardFloatingToolbar = function generateMediaCardFloatingToolbar
|
|
|
210
210
|
onFocus: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaGroup, true),
|
|
211
211
|
onBlur: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaGroup, false),
|
|
212
212
|
title: intl.formatMessage(_messages.default.remove),
|
|
213
|
-
onClick:
|
|
213
|
+
onClick: handleRemoveMediaGroupWithAnalytics(editorAnalyticsAPI),
|
|
214
214
|
testId: 'media-toolbar-remove-button'
|
|
215
215
|
});
|
|
216
216
|
} else {
|
|
@@ -653,7 +653,7 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
653
653
|
onFocus: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaSingle, true),
|
|
654
654
|
onBlur: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaSingle, false),
|
|
655
655
|
title: intl.formatMessage(_messages.default.remove),
|
|
656
|
-
onClick:
|
|
656
|
+
onClick: removeWithAnalytics(pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a9 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a9 === void 0 ? void 0 : _pluginInjectionApi$a9.actions),
|
|
657
657
|
testId: 'media-toolbar-remove-button',
|
|
658
658
|
supportsViewMode: false
|
|
659
659
|
};
|
|
@@ -873,7 +873,7 @@ var floatingToolbar = exports.floatingToolbar = function floatingToolbar(state,
|
|
|
873
873
|
})
|
|
874
874
|
}, hoverDecorationProps(nodeType, _editorSharedStyles.akEditorSelectedNodeClassName)), _objectSpread({
|
|
875
875
|
title: intl === null || intl === void 0 ? void 0 : intl.formatMessage(_messages.default.delete),
|
|
876
|
-
onClick:
|
|
876
|
+
onClick: removeWithAnalytics(pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a10 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a10 === void 0 ? void 0 : _pluginInjectionApi$a10.actions, selectedNodeType),
|
|
877
877
|
icon: /*#__PURE__*/_react.default.createElement(_delete.default, {
|
|
878
878
|
label: ""
|
|
879
879
|
})
|
|
@@ -129,7 +129,7 @@ var generateMediaInlineFloatingToolbar = exports.generateMediaInlineFloatingTool
|
|
|
129
129
|
onFocus: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaInline, true),
|
|
130
130
|
onBlur: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaInline, false),
|
|
131
131
|
title: intl.formatMessage(_messages.default.remove),
|
|
132
|
-
onClick: (0,
|
|
132
|
+
onClick: (0, _commands.removeInlineCardWithAnalytics)(editorAnalyticsAPI),
|
|
133
133
|
testId: 'media-toolbar-remove-button'
|
|
134
134
|
});
|
|
135
135
|
} else {
|
|
@@ -435,7 +435,7 @@ var getMediaInlineImageToolbar = function getMediaInlineImageToolbar(state, intl
|
|
|
435
435
|
onFocus: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaInline, true),
|
|
436
436
|
onBlur: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaInline, false),
|
|
437
437
|
title: intl.formatMessage(_messages.default.remove),
|
|
438
|
-
onClick: (0,
|
|
438
|
+
onClick: (0, _commands.removeInlineCardWithAnalytics)(editorAnalyticsAPI),
|
|
439
439
|
testId: 'media-toolbar-remove-button'
|
|
440
440
|
});
|
|
441
441
|
}
|
|
@@ -199,7 +199,7 @@ const generateMediaCardFloatingToolbar = (state, intl, mediaPluginState, hoverDe
|
|
|
199
199
|
onFocus: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaGroup, true),
|
|
200
200
|
onBlur: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaGroup, false),
|
|
201
201
|
title: intl.formatMessage(commonMessages.remove),
|
|
202
|
-
onClick:
|
|
202
|
+
onClick: handleRemoveMediaGroupWithAnalytics(editorAnalyticsAPI),
|
|
203
203
|
testId: 'media-toolbar-remove-button'
|
|
204
204
|
});
|
|
205
205
|
} else {
|
|
@@ -649,7 +649,7 @@ const generateMediaSingleFloatingToolbar = (state, intl, options, pluginState, m
|
|
|
649
649
|
onFocus: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaSingle, true),
|
|
650
650
|
onBlur: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaSingle, false),
|
|
651
651
|
title: intl.formatMessage(commonMessages.remove),
|
|
652
|
-
onClick:
|
|
652
|
+
onClick: removeWithAnalytics(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$a9 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a9 === void 0 ? void 0 : _pluginInjectionApi$a9.actions),
|
|
653
653
|
testId: 'media-toolbar-remove-button',
|
|
654
654
|
supportsViewMode: false
|
|
655
655
|
};
|
|
@@ -872,7 +872,7 @@ export const floatingToolbar = (state, intl, options = {}, pluginInjectionApi) =
|
|
|
872
872
|
...hoverDecorationProps(nodeType, akEditorSelectedNodeClassName)
|
|
873
873
|
}, {
|
|
874
874
|
title: intl === null || intl === void 0 ? void 0 : intl.formatMessage(commonMessages.delete),
|
|
875
|
-
onClick:
|
|
875
|
+
onClick: removeWithAnalytics(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$a10 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a10 === void 0 ? void 0 : _pluginInjectionApi$a10.actions, selectedNodeType),
|
|
876
876
|
icon: /*#__PURE__*/React.createElement(DeleteIcon, {
|
|
877
877
|
label: ""
|
|
878
878
|
}),
|
|
@@ -18,7 +18,7 @@ import { currentMediaOrInlineNodeBorderMark } from '../../pm-plugins/utils/curre
|
|
|
18
18
|
import { isImage } from '../../pm-plugins/utils/is-type';
|
|
19
19
|
import ImageBorderItem from '../../ui/ImageBorder';
|
|
20
20
|
import { altTextButton } from './alt-text';
|
|
21
|
-
import { changeInlineToMediaCard, changeMediaInlineToMediaSingle,
|
|
21
|
+
import { changeInlineToMediaCard, changeMediaInlineToMediaSingle, removeInlineCardWithAnalytics, setBorderMark, toggleBorderMark } from './commands';
|
|
22
22
|
import { shouldShowImageBorder } from './imageBorder';
|
|
23
23
|
import { getOpenLinkToolbarButtonOption, shouldShowMediaLinkToolbar } from './linking';
|
|
24
24
|
import { LinkToolbarAppearance } from './linking-toolbar-appearance';
|
|
@@ -118,7 +118,7 @@ export const generateMediaInlineFloatingToolbar = (state, intl, mediaPluginState
|
|
|
118
118
|
onFocus: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaInline, true),
|
|
119
119
|
onBlur: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaInline, false),
|
|
120
120
|
title: intl.formatMessage(commonMessages.remove),
|
|
121
|
-
onClick:
|
|
121
|
+
onClick: removeInlineCardWithAnalytics(editorAnalyticsAPI),
|
|
122
122
|
testId: 'media-toolbar-remove-button'
|
|
123
123
|
});
|
|
124
124
|
} else {
|
|
@@ -425,7 +425,7 @@ const getMediaInlineImageToolbar = (state, intl, mediaPluginState, hoverDecorati
|
|
|
425
425
|
onFocus: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaInline, true),
|
|
426
426
|
onBlur: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaInline, false),
|
|
427
427
|
title: intl.formatMessage(commonMessages.remove),
|
|
428
|
-
onClick:
|
|
428
|
+
onClick: removeInlineCardWithAnalytics(editorAnalyticsAPI),
|
|
429
429
|
testId: 'media-toolbar-remove-button'
|
|
430
430
|
});
|
|
431
431
|
}
|
|
@@ -201,7 +201,7 @@ var generateMediaCardFloatingToolbar = function generateMediaCardFloatingToolbar
|
|
|
201
201
|
onFocus: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaGroup, true),
|
|
202
202
|
onBlur: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaGroup, false),
|
|
203
203
|
title: intl.formatMessage(commonMessages.remove),
|
|
204
|
-
onClick:
|
|
204
|
+
onClick: handleRemoveMediaGroupWithAnalytics(editorAnalyticsAPI),
|
|
205
205
|
testId: 'media-toolbar-remove-button'
|
|
206
206
|
});
|
|
207
207
|
} else {
|
|
@@ -644,7 +644,7 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
644
644
|
onFocus: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaSingle, true),
|
|
645
645
|
onBlur: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaSingle, false),
|
|
646
646
|
title: intl.formatMessage(commonMessages.remove),
|
|
647
|
-
onClick:
|
|
647
|
+
onClick: removeWithAnalytics(pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a9 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a9 === void 0 ? void 0 : _pluginInjectionApi$a9.actions),
|
|
648
648
|
testId: 'media-toolbar-remove-button',
|
|
649
649
|
supportsViewMode: false
|
|
650
650
|
};
|
|
@@ -864,7 +864,7 @@ export var floatingToolbar = function floatingToolbar(state, intl) {
|
|
|
864
864
|
})
|
|
865
865
|
}, hoverDecorationProps(nodeType, akEditorSelectedNodeClassName)), _objectSpread({
|
|
866
866
|
title: intl === null || intl === void 0 ? void 0 : intl.formatMessage(commonMessages.delete),
|
|
867
|
-
onClick:
|
|
867
|
+
onClick: removeWithAnalytics(pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a10 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a10 === void 0 ? void 0 : _pluginInjectionApi$a10.actions, selectedNodeType),
|
|
868
868
|
icon: /*#__PURE__*/React.createElement(DeleteIcon, {
|
|
869
869
|
label: ""
|
|
870
870
|
})
|
|
@@ -21,7 +21,7 @@ import { currentMediaOrInlineNodeBorderMark } from '../../pm-plugins/utils/curre
|
|
|
21
21
|
import { isImage } from '../../pm-plugins/utils/is-type';
|
|
22
22
|
import ImageBorderItem from '../../ui/ImageBorder';
|
|
23
23
|
import { altTextButton } from './alt-text';
|
|
24
|
-
import { changeInlineToMediaCard, changeMediaInlineToMediaSingle,
|
|
24
|
+
import { changeInlineToMediaCard, changeMediaInlineToMediaSingle, removeInlineCardWithAnalytics, setBorderMark, toggleBorderMark } from './commands';
|
|
25
25
|
import { shouldShowImageBorder } from './imageBorder';
|
|
26
26
|
import { getOpenLinkToolbarButtonOption, shouldShowMediaLinkToolbar } from './linking';
|
|
27
27
|
import { LinkToolbarAppearance } from './linking-toolbar-appearance';
|
|
@@ -120,7 +120,7 @@ export var generateMediaInlineFloatingToolbar = function generateMediaInlineFloa
|
|
|
120
120
|
onFocus: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaInline, true),
|
|
121
121
|
onBlur: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaInline, false),
|
|
122
122
|
title: intl.formatMessage(commonMessages.remove),
|
|
123
|
-
onClick:
|
|
123
|
+
onClick: removeInlineCardWithAnalytics(editorAnalyticsAPI),
|
|
124
124
|
testId: 'media-toolbar-remove-button'
|
|
125
125
|
});
|
|
126
126
|
} else {
|
|
@@ -426,7 +426,7 @@ var getMediaInlineImageToolbar = function getMediaInlineImageToolbar(state, intl
|
|
|
426
426
|
onFocus: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaInline, true),
|
|
427
427
|
onBlur: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaInline, false),
|
|
428
428
|
title: intl.formatMessage(commonMessages.remove),
|
|
429
|
-
onClick:
|
|
429
|
+
onClick: removeInlineCardWithAnalytics(editorAnalyticsAPI),
|
|
430
430
|
testId: 'media-toolbar-remove-button'
|
|
431
431
|
});
|
|
432
432
|
}
|
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.14",
|
|
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.1.0",
|
|
40
40
|
"@atlaskit/button": "^23.2.0",
|
|
41
|
-
"@atlaskit/editor-common": "^106.
|
|
41
|
+
"@atlaskit/editor-common": "^106.5.0",
|
|
42
42
|
"@atlaskit/editor-palette": "^2.1.0",
|
|
43
43
|
"@atlaskit/editor-plugin-analytics": "^2.3.0",
|
|
44
44
|
"@atlaskit/editor-plugin-annotation": "^2.9.0",
|
|
@@ -70,9 +70,9 @@
|
|
|
70
70
|
"@atlaskit/primitives": "^14.8.0",
|
|
71
71
|
"@atlaskit/textfield": "^8.0.0",
|
|
72
72
|
"@atlaskit/theme": "^18.0.0",
|
|
73
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
74
|
-
"@atlaskit/tokens": "^5.
|
|
75
|
-
"@atlaskit/tooltip": "^20.
|
|
73
|
+
"@atlaskit/tmp-editor-statsig": "^6.0.0",
|
|
74
|
+
"@atlaskit/tokens": "^5.1.0",
|
|
75
|
+
"@atlaskit/tooltip": "^20.3.0",
|
|
76
76
|
"@babel/runtime": "^7.0.0",
|
|
77
77
|
"@emotion/react": "^11.7.1",
|
|
78
78
|
"bind-event-listener": "^3.0.0",
|
|
@@ -193,9 +193,6 @@
|
|
|
193
193
|
"platform_editor_track_media_fail_to_insert": {
|
|
194
194
|
"type": "boolean"
|
|
195
195
|
},
|
|
196
|
-
"platform_editor_controls_patch_analytics_2": {
|
|
197
|
-
"type": "boolean"
|
|
198
|
-
},
|
|
199
196
|
"confluence_frontend_preload_inline_comment_editor": {
|
|
200
197
|
"type": "boolean"
|
|
201
198
|
},
|