@atlaskit/editor-plugin-media 1.44.1 → 1.44.2

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,13 @@
1
1
  # @atlaskit/editor-plugin-media
2
2
 
3
+ ## 1.44.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#100007](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/100007)
8
+ [`afe0edcf9ef4a`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/afe0edcf9ef4a) -
9
+ added toggle so comments on media are disabled when offline :)
10
+
3
11
  ## 1.44.1
4
12
 
5
13
  ### Patch Changes
@@ -15,7 +15,7 @@ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
15
15
  var _commentWithDotIcon = require("./assets/commentWithDotIcon");
16
16
  var _utils = require("./utils");
17
17
  var commentButton = exports.commentButton = function commentButton(intl, state, api) {
18
- var _getSelectedMediaSing, _api$annotation;
18
+ var _getSelectedMediaSing, _api$annotation, _api$connectivity;
19
19
  var selectMediaNode = (_getSelectedMediaSing = (0, _utils.getSelectedMediaSingle)(state)) === null || _getSelectedMediaSing === void 0 ? void 0 : _getSelectedMediaSing.node.firstChild;
20
20
  var hasActiveComments = false;
21
21
  var annotations = api === null || api === void 0 || (_api$annotation = api.annotation) === null || _api$annotation === void 0 || (_api$annotation = _api$annotation.sharedState.currentState()) === null || _api$annotation === void 0 ? void 0 : _api$annotation.annotations;
@@ -50,6 +50,7 @@ var commentButton = exports.commentButton = function commentButton(intl, state,
50
50
  tooltipContent: /*#__PURE__*/_react.default.createElement(_keymaps.ToolTipContent, {
51
51
  description: title
52
52
  }),
53
- supportsViewMode: true
53
+ supportsViewMode: true,
54
+ disabled: (api === null || api === void 0 || (_api$connectivity = api.connectivity) === null || _api$connectivity === void 0 || (_api$connectivity = _api$connectivity.sharedState) === null || _api$connectivity === void 0 || (_api$connectivity = _api$connectivity.currentState()) === null || _api$connectivity === void 0 ? void 0 : _api$connectivity.mode) === 'offline'
54
55
  };
55
56
  };
@@ -8,7 +8,7 @@ import { fg } from '@atlaskit/platform-feature-flags';
8
8
  import { CommentWithDotIcon } from './assets/commentWithDotIcon';
9
9
  import { getSelectedMediaSingle } from './utils';
10
10
  export const commentButton = (intl, state, api) => {
11
- var _getSelectedMediaSing, _api$annotation, _api$annotation$share;
11
+ var _getSelectedMediaSing, _api$annotation, _api$annotation$share, _api$connectivity, _api$connectivity$sha, _api$connectivity$sha2;
12
12
  const selectMediaNode = (_getSelectedMediaSing = getSelectedMediaSingle(state)) === null || _getSelectedMediaSing === void 0 ? void 0 : _getSelectedMediaSing.node.firstChild;
13
13
  let hasActiveComments = false;
14
14
  const annotations = api === null || api === void 0 ? void 0 : (_api$annotation = api.annotation) === null || _api$annotation === void 0 ? void 0 : (_api$annotation$share = _api$annotation.sharedState.currentState()) === null || _api$annotation$share === void 0 ? void 0 : _api$annotation$share.annotations;
@@ -42,6 +42,7 @@ export const commentButton = (intl, state, api) => {
42
42
  tooltipContent: /*#__PURE__*/React.createElement(ToolTipContent, {
43
43
  description: title
44
44
  }),
45
- supportsViewMode: true
45
+ supportsViewMode: true,
46
+ disabled: (api === null || api === void 0 ? void 0 : (_api$connectivity = api.connectivity) === null || _api$connectivity === void 0 ? void 0 : (_api$connectivity$sha = _api$connectivity.sharedState) === null || _api$connectivity$sha === void 0 ? void 0 : (_api$connectivity$sha2 = _api$connectivity$sha.currentState()) === null || _api$connectivity$sha2 === void 0 ? void 0 : _api$connectivity$sha2.mode) === 'offline'
46
47
  };
47
48
  };
@@ -8,7 +8,7 @@ import { fg } from '@atlaskit/platform-feature-flags';
8
8
  import { CommentWithDotIcon } from './assets/commentWithDotIcon';
9
9
  import { getSelectedMediaSingle } from './utils';
10
10
  export var commentButton = function commentButton(intl, state, api) {
11
- var _getSelectedMediaSing, _api$annotation;
11
+ var _getSelectedMediaSing, _api$annotation, _api$connectivity;
12
12
  var selectMediaNode = (_getSelectedMediaSing = getSelectedMediaSingle(state)) === null || _getSelectedMediaSing === void 0 ? void 0 : _getSelectedMediaSing.node.firstChild;
13
13
  var hasActiveComments = false;
14
14
  var annotations = api === null || api === void 0 || (_api$annotation = api.annotation) === null || _api$annotation === void 0 || (_api$annotation = _api$annotation.sharedState.currentState()) === null || _api$annotation === void 0 ? void 0 : _api$annotation.annotations;
@@ -43,6 +43,7 @@ export var commentButton = function commentButton(intl, state, api) {
43
43
  tooltipContent: /*#__PURE__*/React.createElement(ToolTipContent, {
44
44
  description: title
45
45
  }),
46
- supportsViewMode: true
46
+ supportsViewMode: true,
47
+ disabled: (api === null || api === void 0 || (_api$connectivity = api.connectivity) === null || _api$connectivity === void 0 || (_api$connectivity = _api$connectivity.sharedState) === null || _api$connectivity === void 0 || (_api$connectivity = _api$connectivity.currentState()) === null || _api$connectivity === void 0 ? void 0 : _api$connectivity.mode) === 'offline'
47
48
  };
48
49
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-media",
3
- "version": "1.44.1",
3
+ "version": "1.44.2",
4
4
  "description": "Media plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",