@atlaskit/editor-plugin-media 1.44.0 → 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,19 @@
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
+
11
+ ## 1.44.1
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies
16
+
3
17
  ## 1.44.0
4
18
 
5
19
  ### Minor Changes
@@ -276,7 +276,7 @@ var MediaPluginStateImplementation = exports.MediaPluginStateImplementation = /*
276
276
  (0, _mediaCommon2.removeMediaNode)(_this.view, getNode, getPos);
277
277
  });
278
278
  (0, _defineProperty2.default)(this, "getIdentifierKey", function (identifier) {
279
- if (identifier.mediaItemType === "file") {
279
+ if (identifier.mediaItemType === 'file') {
280
280
  return identifier.id;
281
281
  } else {
282
282
  return identifier.dataURI;
@@ -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
  };
@@ -248,7 +248,7 @@ export class MediaPluginStateImplementation {
248
248
  removeMediaNode(this.view, getNode, getPos);
249
249
  });
250
250
  _defineProperty(this, "getIdentifierKey", identifier => {
251
- if (identifier.mediaItemType === "file") {
251
+ if (identifier.mediaItemType === 'file') {
252
252
  return identifier.id;
253
253
  } else {
254
254
  return identifier.dataURI;
@@ -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
  };
@@ -267,7 +267,7 @@ export var MediaPluginStateImplementation = /*#__PURE__*/function () {
267
267
  removeMediaNode(_this.view, getNode, getPos);
268
268
  });
269
269
  _defineProperty(this, "getIdentifierKey", function (identifier) {
270
- if (identifier.mediaItemType === "file") {
270
+ if (identifier.mediaItemType === 'file') {
271
271
  return identifier.id;
272
272
  } else {
273
273
  return identifier.dataURI;
@@ -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.0",
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",
@@ -36,10 +36,10 @@
36
36
  "@atlaskit/analytics-namespaced-context": "^6.12.0",
37
37
  "@atlaskit/analytics-next": "^10.2.0",
38
38
  "@atlaskit/button": "^20.3.0",
39
- "@atlaskit/editor-common": "^98.2.0",
40
- "@atlaskit/editor-palette": "1.6.3",
39
+ "@atlaskit/editor-common": "^99.0.0",
40
+ "@atlaskit/editor-palette": "1.6.4",
41
41
  "@atlaskit/editor-plugin-analytics": "^1.10.0",
42
- "@atlaskit/editor-plugin-annotation": "1.26.10",
42
+ "@atlaskit/editor-plugin-annotation": "1.26.11",
43
43
  "@atlaskit/editor-plugin-connectivity": "^1.1.0",
44
44
  "@atlaskit/editor-plugin-decorations": "^1.3.0",
45
45
  "@atlaskit/editor-plugin-editor-disabled": "^1.3.0",
@@ -54,7 +54,7 @@
54
54
  "@atlaskit/editor-shared-styles": "^3.2.0",
55
55
  "@atlaskit/editor-tables": "^2.8.0",
56
56
  "@atlaskit/form": "^11.0.0",
57
- "@atlaskit/icon": "^23.2.0",
57
+ "@atlaskit/icon": "^23.3.0",
58
58
  "@atlaskit/media-card": "^78.18.0",
59
59
  "@atlaskit/media-client": "^29.0.0",
60
60
  "@atlaskit/media-client-react": "^2.5.0",
@@ -68,7 +68,7 @@
68
68
  "@atlaskit/textfield": "^6.7.0",
69
69
  "@atlaskit/theme": "^14.0.0",
70
70
  "@atlaskit/tmp-editor-statsig": "^2.33.0",
71
- "@atlaskit/tokens": "^2.5.0",
71
+ "@atlaskit/tokens": "^3.0.0",
72
72
  "@atlaskit/tooltip": "^19.0.0",
73
73
  "@babel/runtime": "^7.0.0",
74
74
  "@emotion/react": "^11.7.1",