@atlaskit/editor-plugin-media 1.12.2 → 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,18 @@
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
+
10
+ ## 1.12.3
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies
15
+
3
16
  ## 1.12.2
4
17
 
5
18
  ### 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 command = api.annotation.actions.showCommentForBlockNode(mediaNode) || api.annotation.actions.setInlineCommentDraftState(true,
20
- // TODO: might need to update to reflect it's from media floating toolbar
21
- _analytics.INPUT_METHOD.FLOATING_TB, 'block', true);
22
- command(state, dispatch);
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 command = api.annotation.actions.showCommentForBlockNode(mediaNode) || api.annotation.actions.setInlineCommentDraftState(true,
13
- // TODO: might need to update to reflect it's from media floating toolbar
14
- INPUT_METHOD.FLOATING_TB, 'block', true);
15
- command(state, dispatch);
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 command = api.annotation.actions.showCommentForBlockNode(mediaNode) || api.annotation.actions.setInlineCommentDraftState(true,
13
- // TODO: might need to update to reflect it's from media floating toolbar
14
- INPUT_METHOD.FLOATING_TB, 'block', true);
15
- command(state, dispatch);
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.2",
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.20.0",
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.1",
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",
@@ -59,13 +59,13 @@
59
59
  "@atlaskit/media-client-react": "^2.0.0",
60
60
  "@atlaskit/media-common": "^11.1.0",
61
61
  "@atlaskit/media-filmstrip": "^47.0.0",
62
- "@atlaskit/media-picker": "^66.3.0",
62
+ "@atlaskit/media-picker": "^66.4.0",
63
63
  "@atlaskit/media-ui": "^25.4.0",
64
64
  "@atlaskit/media-viewer": "^48.4.0",
65
65
  "@atlaskit/platform-feature-flags": "^0.2.0",
66
66
  "@atlaskit/primitives": "^5.1.0",
67
67
  "@atlaskit/textfield": "^6.1.0",
68
- "@atlaskit/theme": "^12.6.0",
68
+ "@atlaskit/theme": "^12.7.0",
69
69
  "@atlaskit/tokens": "^1.42.0",
70
70
  "@atlaskit/tooltip": "^18.1.0",
71
71
  "@babel/runtime": "^7.0.0",