@atlaskit/editor-plugin-media 1.12.3 → 1.12.4
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
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-media
|
|
2
2
|
|
|
3
|
+
## 1.12.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#84432](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/84432) [`19324d1894bb`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/19324d1894bb) - [ED-22643] Update showInlineCommentForBlockNode so that it can dispatch action to show comment view component when there are no active comments associated with the give node
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
|
|
3
10
|
## 1.12.3
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
|
@@ -16,10 +16,14 @@ var commentButton = exports.commentButton = function commentButton(intl, _state,
|
|
|
16
16
|
var onClickHandler = function onClickHandler(state, dispatch) {
|
|
17
17
|
if (api !== null && api !== void 0 && api.annotation && state.selection instanceof _state2.NodeSelection) {
|
|
18
18
|
var mediaNode = state.selection.node.firstChild;
|
|
19
|
-
var
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
var _api$annotation$actio = api.annotation.actions,
|
|
20
|
+
showCommentForBlockNode = _api$annotation$actio.showCommentForBlockNode,
|
|
21
|
+
setInlineCommentDraftState = _api$annotation$actio.setInlineCommentDraftState;
|
|
22
|
+
if (!showCommentForBlockNode(mediaNode)(state, dispatch)) {
|
|
23
|
+
setInlineCommentDraftState(true,
|
|
24
|
+
// TODO: might need to update to reflect it's from media floating toolbar
|
|
25
|
+
_analytics.INPUT_METHOD.FLOATING_TB, 'block', true)(state, dispatch);
|
|
26
|
+
}
|
|
23
27
|
}
|
|
24
28
|
return true;
|
|
25
29
|
};
|
|
@@ -9,10 +9,15 @@ export const commentButton = (intl, _state, api) => {
|
|
|
9
9
|
const onClickHandler = (state, dispatch) => {
|
|
10
10
|
if (api !== null && api !== void 0 && api.annotation && state.selection instanceof NodeSelection) {
|
|
11
11
|
const mediaNode = state.selection.node.firstChild;
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
const {
|
|
13
|
+
showCommentForBlockNode,
|
|
14
|
+
setInlineCommentDraftState
|
|
15
|
+
} = api.annotation.actions;
|
|
16
|
+
if (!showCommentForBlockNode(mediaNode)(state, dispatch)) {
|
|
17
|
+
setInlineCommentDraftState(true,
|
|
18
|
+
// TODO: might need to update to reflect it's from media floating toolbar
|
|
19
|
+
INPUT_METHOD.FLOATING_TB, 'block', true)(state, dispatch);
|
|
20
|
+
}
|
|
16
21
|
}
|
|
17
22
|
return true;
|
|
18
23
|
};
|
|
@@ -9,10 +9,14 @@ export var commentButton = function commentButton(intl, _state, api) {
|
|
|
9
9
|
var onClickHandler = function onClickHandler(state, dispatch) {
|
|
10
10
|
if (api !== null && api !== void 0 && api.annotation && state.selection instanceof NodeSelection) {
|
|
11
11
|
var mediaNode = state.selection.node.firstChild;
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
var _api$annotation$actio = api.annotation.actions,
|
|
13
|
+
showCommentForBlockNode = _api$annotation$actio.showCommentForBlockNode,
|
|
14
|
+
setInlineCommentDraftState = _api$annotation$actio.setInlineCommentDraftState;
|
|
15
|
+
if (!showCommentForBlockNode(mediaNode)(state, dispatch)) {
|
|
16
|
+
setInlineCommentDraftState(true,
|
|
17
|
+
// TODO: might need to update to reflect it's from media floating toolbar
|
|
18
|
+
INPUT_METHOD.FLOATING_TB, 'block', true)(state, dispatch);
|
|
19
|
+
}
|
|
16
20
|
}
|
|
17
21
|
return true;
|
|
18
22
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-media",
|
|
3
|
-
"version": "1.12.
|
|
3
|
+
"version": "1.12.4",
|
|
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.2.0",
|
|
39
39
|
"@atlaskit/button": "^17.7.0",
|
|
40
|
-
"@atlaskit/editor-common": "^78.
|
|
40
|
+
"@atlaskit/editor-common": "^78.21.0",
|
|
41
41
|
"@atlaskit/editor-palette": "1.5.3",
|
|
42
42
|
"@atlaskit/editor-plugin-analytics": "^1.0.0",
|
|
43
|
-
"@atlaskit/editor-plugin-annotation": "1.5.
|
|
43
|
+
"@atlaskit/editor-plugin-annotation": "1.5.3",
|
|
44
44
|
"@atlaskit/editor-plugin-decorations": "^1.0.0",
|
|
45
45
|
"@atlaskit/editor-plugin-editor-disabled": "^1.0.0",
|
|
46
46
|
"@atlaskit/editor-plugin-floating-toolbar": "^1.2.0",
|