@atlaskit/editor-plugin-media 1.20.0 → 1.20.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 +10 -0
- package/dist/cjs/toolbar/comments.js +1 -1
- package/dist/cjs/ui/CommentBadge/index.js +2 -1
- package/dist/es2019/toolbar/comments.js +2 -2
- package/dist/es2019/ui/CommentBadge/index.js +2 -1
- package/dist/esm/toolbar/comments.js +2 -2
- package/dist/esm/ui/CommentBadge/index.js +2 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-media
|
|
2
2
|
|
|
3
|
+
## 1.20.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#100662](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/100662)
|
|
8
|
+
[`3d61cd8f2afe`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/3d61cd8f2afe) -
|
|
9
|
+
[ED-23355] Update annotation viewed event to with attributes nodeType and method to capture
|
|
10
|
+
usage for comments on media
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
3
13
|
## 1.20.0
|
|
4
14
|
|
|
5
15
|
### Minor Changes
|
|
@@ -28,7 +28,7 @@ var commentButton = exports.commentButton = function commentButton(intl, state,
|
|
|
28
28
|
var _api$annotation$actio = api.annotation.actions,
|
|
29
29
|
showCommentForBlockNode = _api$annotation$actio.showCommentForBlockNode,
|
|
30
30
|
setInlineCommentDraftState = _api$annotation$actio.setInlineCommentDraftState;
|
|
31
|
-
if (!showCommentForBlockNode(selectMediaNode)(state, dispatch)) {
|
|
31
|
+
if (!showCommentForBlockNode(selectMediaNode, _analytics.VIEW_METHOD.COMMENT_BUTTON)(state, dispatch)) {
|
|
32
32
|
var _selectMediaNode$attr;
|
|
33
33
|
setInlineCommentDraftState(true,
|
|
34
34
|
// TODO: might need to update to reflect it's from media floating toolbar
|
|
@@ -9,6 +9,7 @@ exports.CommentBadge = void 0;
|
|
|
9
9
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
var _reactIntlNext = require("react-intl-next");
|
|
12
|
+
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
12
13
|
var _hooks = require("@atlaskit/editor-common/hooks");
|
|
13
14
|
var _mediaSingle = require("@atlaskit/editor-common/media-single");
|
|
14
15
|
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); }
|
|
@@ -46,7 +47,7 @@ var CommentBadgeWrapper = function CommentBadgeWrapper(_ref) {
|
|
|
46
47
|
var onClick = (0, _react.useCallback)(function () {
|
|
47
48
|
if (api.annotation && mediaNode) {
|
|
48
49
|
var showCommentForBlockNode = api.annotation.actions.showCommentForBlockNode;
|
|
49
|
-
showCommentForBlockNode(mediaNode)(state, dispatch);
|
|
50
|
+
showCommentForBlockNode(mediaNode, _analytics.VIEW_METHOD.BADGE)(state, dispatch);
|
|
50
51
|
}
|
|
51
52
|
}, [api.annotation, dispatch, mediaNode, state]);
|
|
52
53
|
var pos = getPos();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
2
|
+
import { INPUT_METHOD, VIEW_METHOD } from '@atlaskit/editor-common/analytics';
|
|
3
3
|
import { ToolTipContent } from '@atlaskit/editor-common/keymaps';
|
|
4
4
|
import { commentMessages as messages } from '@atlaskit/editor-common/media';
|
|
5
5
|
import CommentIcon from '@atlaskit/icon/glyph/comment';
|
|
@@ -20,7 +20,7 @@ export const commentButton = (intl, state, api) => {
|
|
|
20
20
|
showCommentForBlockNode,
|
|
21
21
|
setInlineCommentDraftState
|
|
22
22
|
} = api.annotation.actions;
|
|
23
|
-
if (!showCommentForBlockNode(selectMediaNode)(state, dispatch)) {
|
|
23
|
+
if (!showCommentForBlockNode(selectMediaNode, VIEW_METHOD.COMMENT_BUTTON)(state, dispatch)) {
|
|
24
24
|
var _selectMediaNode$attr;
|
|
25
25
|
setInlineCommentDraftState(true,
|
|
26
26
|
// TODO: might need to update to reflect it's from media floating toolbar
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { useCallback, useMemo, useState } from 'react';
|
|
2
2
|
import { injectIntl } from 'react-intl-next';
|
|
3
|
+
import { VIEW_METHOD } from '@atlaskit/editor-common/analytics';
|
|
3
4
|
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
4
5
|
import { CommentBadge as CommentBadgeComponent } from '@atlaskit/editor-common/media-single';
|
|
5
6
|
const CommentBadgeWrapper = ({
|
|
@@ -41,7 +42,7 @@ const CommentBadgeWrapper = ({
|
|
|
41
42
|
const {
|
|
42
43
|
showCommentForBlockNode
|
|
43
44
|
} = api.annotation.actions;
|
|
44
|
-
showCommentForBlockNode(mediaNode)(state, dispatch);
|
|
45
|
+
showCommentForBlockNode(mediaNode, VIEW_METHOD.BADGE)(state, dispatch);
|
|
45
46
|
}
|
|
46
47
|
}, [api.annotation, dispatch, mediaNode, state]);
|
|
47
48
|
const pos = getPos();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
2
|
+
import { INPUT_METHOD, VIEW_METHOD } from '@atlaskit/editor-common/analytics';
|
|
3
3
|
import { ToolTipContent } from '@atlaskit/editor-common/keymaps';
|
|
4
4
|
import { commentMessages as messages } from '@atlaskit/editor-common/media';
|
|
5
5
|
import CommentIcon from '@atlaskit/icon/glyph/comment';
|
|
@@ -21,7 +21,7 @@ export var commentButton = function commentButton(intl, state, api) {
|
|
|
21
21
|
var _api$annotation$actio = api.annotation.actions,
|
|
22
22
|
showCommentForBlockNode = _api$annotation$actio.showCommentForBlockNode,
|
|
23
23
|
setInlineCommentDraftState = _api$annotation$actio.setInlineCommentDraftState;
|
|
24
|
-
if (!showCommentForBlockNode(selectMediaNode)(state, dispatch)) {
|
|
24
|
+
if (!showCommentForBlockNode(selectMediaNode, VIEW_METHOD.COMMENT_BUTTON)(state, dispatch)) {
|
|
25
25
|
var _selectMediaNode$attr;
|
|
26
26
|
setInlineCommentDraftState(true,
|
|
27
27
|
// TODO: might need to update to reflect it's from media floating toolbar
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
2
|
import React, { useCallback, useMemo, useState } from 'react';
|
|
3
3
|
import { injectIntl } from 'react-intl-next';
|
|
4
|
+
import { VIEW_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
5
|
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
5
6
|
import { CommentBadge as CommentBadgeComponent } from '@atlaskit/editor-common/media-single';
|
|
6
7
|
var CommentBadgeWrapper = function CommentBadgeWrapper(_ref) {
|
|
@@ -36,7 +37,7 @@ var CommentBadgeWrapper = function CommentBadgeWrapper(_ref) {
|
|
|
36
37
|
var onClick = useCallback(function () {
|
|
37
38
|
if (api.annotation && mediaNode) {
|
|
38
39
|
var showCommentForBlockNode = api.annotation.actions.showCommentForBlockNode;
|
|
39
|
-
showCommentForBlockNode(mediaNode)(state, dispatch);
|
|
40
|
+
showCommentForBlockNode(mediaNode, VIEW_METHOD.BADGE)(state, dispatch);
|
|
40
41
|
}
|
|
41
42
|
}, [api.annotation, dispatch, mediaNode, state]);
|
|
42
43
|
var pos = getPos();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-media",
|
|
3
|
-
"version": "1.20.
|
|
3
|
+
"version": "1.20.1",
|
|
4
4
|
"description": "Media plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -37,10 +37,10 @@
|
|
|
37
37
|
"@atlaskit/analytics-namespaced-context": "^6.9.0",
|
|
38
38
|
"@atlaskit/analytics-next": "^9.3.0",
|
|
39
39
|
"@atlaskit/button": "^17.14.0",
|
|
40
|
-
"@atlaskit/editor-common": "^80.
|
|
40
|
+
"@atlaskit/editor-common": "^80.4.0",
|
|
41
41
|
"@atlaskit/editor-palette": "1.6.0",
|
|
42
42
|
"@atlaskit/editor-plugin-analytics": "^1.2.0",
|
|
43
|
-
"@atlaskit/editor-plugin-annotation": "1.
|
|
43
|
+
"@atlaskit/editor-plugin-annotation": "1.9.0",
|
|
44
44
|
"@atlaskit/editor-plugin-decorations": "^1.1.0",
|
|
45
45
|
"@atlaskit/editor-plugin-editor-disabled": "^1.1.0",
|
|
46
46
|
"@atlaskit/editor-plugin-editor-viewmode": "^1.1.0",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"@atlaskit/media-ui": "^25.10.0",
|
|
65
65
|
"@atlaskit/media-viewer": "^48.5.0",
|
|
66
66
|
"@atlaskit/platform-feature-flags": "^0.2.0",
|
|
67
|
-
"@atlaskit/primitives": "^6.
|
|
67
|
+
"@atlaskit/primitives": "^6.2.0",
|
|
68
68
|
"@atlaskit/textfield": "^6.3.0",
|
|
69
69
|
"@atlaskit/theme": "^12.8.0",
|
|
70
70
|
"@atlaskit/tokens": "^1.48.0",
|