@atlaskit/editor-common 77.4.2 → 77.4.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-common
2
2
 
3
+ ## 77.4.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [#72231](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/72231) [`edf38e369597`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/edf38e369597) - ED-21768 enable ssr for inline image
8
+
9
+ ## 77.4.3
10
+
11
+ ### Patch Changes
12
+
13
+ - [#72710](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/72710) [`3a884530c4d2`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/3a884530c4d2) - Move translation strings for find-replace to ICU format.
14
+ - Updated dependencies
15
+
3
16
  ## 77.4.2
4
17
 
5
18
  ### Patch Changes
@@ -18,7 +18,7 @@ var mediaResizeAnnouncerMessMessages = exports.mediaResizeAnnouncerMessMessages
18
18
  },
19
19
  DefaultMediaWidth: {
20
20
  id: 'fabric.editor.media.DefaultMediaWidth',
21
- defaultMessage: 'Media width {action} to {newMediaWidth} pixels.',
21
+ defaultMessage: '{newMediaWidth, plural, one {Media width {action} to # pixel.} other {Media width {action} to # pixels.}}',
22
22
  description: 'Media width {action} to {newMediaWidth} pixels.'
23
23
  },
24
24
  IncreasedAction: {
@@ -38,7 +38,8 @@ var InlineImageCard = exports.InlineImageCard = function InlineImageCard(_ref) {
38
38
  preview = _useFilePreview.preview,
39
39
  previewError = _useFilePreview.error,
40
40
  onImageError = _useFilePreview.onImageError,
41
- _onImageLoad = _useFilePreview.onImageLoad;
41
+ _onImageLoad = _useFilePreview.onImageLoad,
42
+ getSsrScriptProps = _useFilePreview.getSsrScriptProps;
42
43
  if (previewError) {
43
44
  return renderError({
44
45
  error: previewError
@@ -47,7 +48,7 @@ var InlineImageCard = exports.InlineImageCard = function InlineImageCard(_ref) {
47
48
  if (!preview) {
48
49
  return (0, _react2.jsx)(_loadingView.InlineImageCardLoadingView, null);
49
50
  }
50
- return (0, _react2.jsx)(_mediaUi.MediaImage, {
51
+ return (0, _react2.jsx)(_react.Fragment, null, (0, _react2.jsx)(_mediaUi.MediaImage, {
51
52
  dataURI: preview.dataURI,
52
53
  alt: alt,
53
54
  previewOrientation: preview.orientation,
@@ -59,5 +60,5 @@ var InlineImageCard = exports.InlineImageCard = function InlineImageCard(_ref) {
59
60
  forceSyncDisplay: !!ssr,
60
61
  crop: crop,
61
62
  stretch: stretch
62
- });
63
+ }), getSsrScriptProps && (0, _react2.jsx)("script", getSsrScriptProps()));
63
64
  };
@@ -89,38 +89,41 @@ var MediaInlineImageCardInternal = exports.MediaInlineImageCardInternal = functi
89
89
  }
90
90
  }, [identifier, mediaClient]);
91
91
  var content = function content(dimensions) {
92
- if (subscribeError) {
93
- var isUploading = (fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'uploading';
94
- var errorMessage = isUploading ? _mediaInlineCard.messages.failedToUpload : _mediaInlineCard.messages.unableToLoadContent;
95
- var errorReason = (fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'uploading' ? 'upload' : 'metadata-fetch';
96
- fireFailedOperationalEvent(new _mediaCard.MediaCardError(errorReason, subscribeError));
97
- return (0, _react2.jsx)(_errorView.InlineImageCardErrorView, {
98
- message: formatMessage(errorMessage)
99
- });
100
- }
101
- if (!fileState || (fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'uploading') {
92
+ if (!mediaClient) {
102
93
  return (0, _react2.jsx)(_loadingView.InlineImageCardLoadingView, null);
103
94
  }
104
- if (fileState.status === 'error') {
105
- var error = new _mediaCard.MediaCardError('error-file-state', new Error(fileState.message));
106
- !isFailedEventSent && fireFailedOperationalEvent(error);
107
- return (0, _react2.jsx)(_errorView.InlineImageCardErrorView, {
108
- message: formatMessage(_mediaInlineCard.messages.unableToLoadContent)
109
- });
110
- } else if (fileState.status === 'failed-processing') {
111
- !isFailedEventSent && fireFailedOperationalEvent(undefined, 'failed-processing');
112
- return (0, _react2.jsx)(_errorView.InlineImageCardErrorView, {
113
- message: formatMessage(_mediaInlineCard.messages.unableToLoadContent)
114
- });
115
- } else if (!fileState.name) {
116
- var _error = new _mediaCard.MediaCardError('metadata-fetch', new _mediaClient.FileFetcherError('emptyFileName', fileState.id));
117
- !isFailedEventSent && fireFailedOperationalEvent(_error);
118
- return (0, _react2.jsx)(_errorView.InlineImageCardErrorView, {
119
- message: formatMessage(_mediaInlineCard.messages.unableToLoadContent)
120
- });
121
- }
122
- if (fileState.status === 'processed') {
123
- fireSucceededOperationalEvent();
95
+ if (!ssr) {
96
+ if (subscribeError) {
97
+ var isUploading = (fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'uploading';
98
+ var errorMessage = isUploading ? _mediaInlineCard.messages.failedToUpload : _mediaInlineCard.messages.unableToLoadContent;
99
+ var errorReason = (fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'uploading' ? 'upload' : 'metadata-fetch';
100
+ fireFailedOperationalEvent(new _mediaCard.MediaCardError(errorReason, subscribeError));
101
+ return (0, _react2.jsx)(_errorView.InlineImageCardErrorView, {
102
+ message: formatMessage(errorMessage)
103
+ });
104
+ }
105
+ if (!fileState || (fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'uploading') {
106
+ return (0, _react2.jsx)(_loadingView.InlineImageCardLoadingView, null);
107
+ }
108
+ if (fileState.status === 'error') {
109
+ fireFailedOperationalEvent(new _mediaCard.MediaCardError('error-file-state', new Error(fileState.message)));
110
+ return (0, _react2.jsx)(_errorView.InlineImageCardErrorView, {
111
+ message: formatMessage(_mediaInlineCard.messages.unableToLoadContent)
112
+ });
113
+ } else if (fileState.status === 'failed-processing') {
114
+ fireFailedOperationalEvent(undefined, 'failed-processing');
115
+ return (0, _react2.jsx)(_errorView.InlineImageCardErrorView, {
116
+ message: formatMessage(_mediaInlineCard.messages.unableToLoadContent)
117
+ });
118
+ } else if (!fileState.name) {
119
+ fireFailedOperationalEvent(new _mediaCard.MediaCardError('metadata-fetch', new _mediaClient.FileFetcherError('emptyFileName', fileState.id)));
120
+ return (0, _react2.jsx)(_errorView.InlineImageCardErrorView, {
121
+ message: formatMessage(_mediaInlineCard.messages.unableToLoadContent)
122
+ });
123
+ }
124
+ if (fileState.status === 'processed') {
125
+ fireSucceededOperationalEvent();
126
+ }
124
127
  }
125
128
  return (0, _react2.jsx)(_mediaClientReact.MediaClientContext.Provider, {
126
129
  value: mediaClient
@@ -63,17 +63,7 @@ var findReplaceMessages = exports.findReplaceMessages = (0, _reactIntlNext.defin
63
63
  },
64
64
  replaceSuccess: {
65
65
  id: 'fabric.editor.replaceSuccess',
66
- defaultMessage: '{numberOfMatches} {matchPluralSingularNoun} replaced',
66
+ defaultMessage: '{numberOfMatches, plural, one {# match replaced} other {# matches replaced}}',
67
67
  description: 'Text when replacement succesfully done'
68
- },
69
- matchSingularNoun: {
70
- id: 'fabric.editor.match.singular',
71
- defaultMessage: 'match',
72
- description: 'Singular "Match" noun'
73
- },
74
- matchPluralNoun: {
75
- id: 'fabric.editor.match.plural',
76
- defaultMessage: 'matches',
77
- description: 'Plural "Match" noun'
78
68
  }
79
69
  });
@@ -16,7 +16,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
16
16
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
17
17
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
18
18
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
19
- var packageVersion = "77.4.2";
19
+ var packageVersion = "77.4.4";
20
20
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
21
21
  // Remove URL as it has UGC
22
22
  // TODO: Sanitise the URL instead of just removing it
@@ -22,7 +22,7 @@ var _templateObject, _templateObject2, _templateObject3;
22
22
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
23
23
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /** @jsx jsx */
24
24
  var packageName = "@atlaskit/editor-common";
25
- var packageVersion = "77.4.2";
25
+ var packageVersion = "77.4.4";
26
26
  var halfFocusRing = 1;
27
27
  var dropOffset = '0, 8';
28
28
  var DropList = /*#__PURE__*/function (_Component) {
@@ -12,7 +12,7 @@ export const mediaResizeAnnouncerMessMessages = defineMessages({
12
12
  },
13
13
  DefaultMediaWidth: {
14
14
  id: 'fabric.editor.media.DefaultMediaWidth',
15
- defaultMessage: 'Media width {action} to {newMediaWidth} pixels.',
15
+ defaultMessage: '{newMediaWidth, plural, one {Media width {action} to # pixel.} other {Media width {action} to # pixels.}}',
16
16
  description: 'Media width {action} to {newMediaWidth} pixels.'
17
17
  },
18
18
  IncreasedAction: {
@@ -1,5 +1,5 @@
1
1
  /** @jsx jsx */
2
- import { useMemo } from 'react';
2
+ import { Fragment, useMemo } from 'react';
3
3
  import { jsx } from '@emotion/react';
4
4
  import { getRandomHex } from '@atlaskit/media-common';
5
5
  import { useFilePreview } from '@atlaskit/media-file-preview';
@@ -25,7 +25,8 @@ export const InlineImageCard = ({
25
25
  preview,
26
26
  error: previewError,
27
27
  onImageError,
28
- onImageLoad
28
+ onImageLoad,
29
+ getSsrScriptProps
29
30
  } = useFilePreview({
30
31
  identifier,
31
32
  ssr,
@@ -40,7 +41,7 @@ export const InlineImageCard = ({
40
41
  if (!preview) {
41
42
  return jsx(InlineImageCardLoadingView, null);
42
43
  }
43
- return jsx(MediaImage, {
44
+ return jsx(Fragment, null, jsx(MediaImage, {
44
45
  dataURI: preview.dataURI,
45
46
  alt: alt,
46
47
  previewOrientation: preview.orientation,
@@ -52,5 +53,5 @@ export const InlineImageCard = ({
52
53
  forceSyncDisplay: !!ssr,
53
54
  crop: crop,
54
55
  stretch: stretch
55
- });
56
+ }), getSsrScriptProps && jsx("script", getSsrScriptProps()));
56
57
  };
@@ -69,38 +69,41 @@ export const MediaInlineImageCardInternal = ({
69
69
  }
70
70
  }, [identifier, mediaClient]);
71
71
  const content = dimensions => {
72
- if (subscribeError) {
73
- const isUploading = (fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'uploading';
74
- const errorMessage = isUploading ? messages.failedToUpload : messages.unableToLoadContent;
75
- const errorReason = (fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'uploading' ? 'upload' : 'metadata-fetch';
76
- fireFailedOperationalEvent(new MediaCardError(errorReason, subscribeError));
77
- return jsx(InlineImageCardErrorView, {
78
- message: formatMessage(errorMessage)
79
- });
80
- }
81
- if (!fileState || (fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'uploading') {
72
+ if (!mediaClient) {
82
73
  return jsx(InlineImageCardLoadingView, null);
83
74
  }
84
- if (fileState.status === 'error') {
85
- const error = new MediaCardError('error-file-state', new Error(fileState.message));
86
- !isFailedEventSent && fireFailedOperationalEvent(error);
87
- return jsx(InlineImageCardErrorView, {
88
- message: formatMessage(messages.unableToLoadContent)
89
- });
90
- } else if (fileState.status === 'failed-processing') {
91
- !isFailedEventSent && fireFailedOperationalEvent(undefined, 'failed-processing');
92
- return jsx(InlineImageCardErrorView, {
93
- message: formatMessage(messages.unableToLoadContent)
94
- });
95
- } else if (!fileState.name) {
96
- const error = new MediaCardError('metadata-fetch', new FileFetcherError('emptyFileName', fileState.id));
97
- !isFailedEventSent && fireFailedOperationalEvent(error);
98
- return jsx(InlineImageCardErrorView, {
99
- message: formatMessage(messages.unableToLoadContent)
100
- });
101
- }
102
- if (fileState.status === 'processed') {
103
- fireSucceededOperationalEvent();
75
+ if (!ssr) {
76
+ if (subscribeError) {
77
+ const isUploading = (fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'uploading';
78
+ const errorMessage = isUploading ? messages.failedToUpload : messages.unableToLoadContent;
79
+ const errorReason = (fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'uploading' ? 'upload' : 'metadata-fetch';
80
+ fireFailedOperationalEvent(new MediaCardError(errorReason, subscribeError));
81
+ return jsx(InlineImageCardErrorView, {
82
+ message: formatMessage(errorMessage)
83
+ });
84
+ }
85
+ if (!fileState || (fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'uploading') {
86
+ return jsx(InlineImageCardLoadingView, null);
87
+ }
88
+ if (fileState.status === 'error') {
89
+ fireFailedOperationalEvent(new MediaCardError('error-file-state', new Error(fileState.message)));
90
+ return jsx(InlineImageCardErrorView, {
91
+ message: formatMessage(messages.unableToLoadContent)
92
+ });
93
+ } else if (fileState.status === 'failed-processing') {
94
+ fireFailedOperationalEvent(undefined, 'failed-processing');
95
+ return jsx(InlineImageCardErrorView, {
96
+ message: formatMessage(messages.unableToLoadContent)
97
+ });
98
+ } else if (!fileState.name) {
99
+ fireFailedOperationalEvent(new MediaCardError('metadata-fetch', new FileFetcherError('emptyFileName', fileState.id)));
100
+ return jsx(InlineImageCardErrorView, {
101
+ message: formatMessage(messages.unableToLoadContent)
102
+ });
103
+ }
104
+ if (fileState.status === 'processed') {
105
+ fireSucceededOperationalEvent();
106
+ }
104
107
  }
105
108
  return jsx(MediaClientContext.Provider, {
106
109
  value: mediaClient
@@ -57,17 +57,7 @@ export const findReplaceMessages = defineMessages({
57
57
  },
58
58
  replaceSuccess: {
59
59
  id: 'fabric.editor.replaceSuccess',
60
- defaultMessage: '{numberOfMatches} {matchPluralSingularNoun} replaced',
60
+ defaultMessage: '{numberOfMatches, plural, one {# match replaced} other {# matches replaced}}',
61
61
  description: 'Text when replacement succesfully done'
62
- },
63
- matchSingularNoun: {
64
- id: 'fabric.editor.match.singular',
65
- defaultMessage: 'match',
66
- description: 'Singular "Match" noun'
67
- },
68
- matchPluralNoun: {
69
- id: 'fabric.editor.match.plural',
70
- defaultMessage: 'matches',
71
- description: 'Plural "Match" noun'
72
62
  }
73
63
  });
@@ -1,6 +1,6 @@
1
1
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
2
2
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
3
- const packageVersion = "77.4.2";
3
+ const packageVersion = "77.4.4";
4
4
  const sanitiseSentryEvents = (data, _hint) => {
5
5
  // Remove URL as it has UGC
6
6
  // TODO: Sanitise the URL instead of just removing it
@@ -7,7 +7,7 @@ import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@
7
7
  import { N0, N50A, N60A, N900 } from '@atlaskit/theme/colors';
8
8
  import Layer from '../Layer';
9
9
  const packageName = "@atlaskit/editor-common";
10
- const packageVersion = "77.4.2";
10
+ const packageVersion = "77.4.4";
11
11
  const halfFocusRing = 1;
12
12
  const dropOffset = '0, 8';
13
13
  class DropList extends Component {
@@ -12,7 +12,7 @@ export var mediaResizeAnnouncerMessMessages = defineMessages({
12
12
  },
13
13
  DefaultMediaWidth: {
14
14
  id: 'fabric.editor.media.DefaultMediaWidth',
15
- defaultMessage: 'Media width {action} to {newMediaWidth} pixels.',
15
+ defaultMessage: '{newMediaWidth, plural, one {Media width {action} to # pixel.} other {Media width {action} to # pixels.}}',
16
16
  description: 'Media width {action} to {newMediaWidth} pixels.'
17
17
  },
18
18
  IncreasedAction: {
@@ -1,5 +1,5 @@
1
1
  /** @jsx jsx */
2
- import { useMemo } from 'react';
2
+ import { Fragment, useMemo } from 'react';
3
3
  import { jsx } from '@emotion/react';
4
4
  import { getRandomHex } from '@atlaskit/media-common';
5
5
  import { useFilePreview } from '@atlaskit/media-file-preview';
@@ -31,7 +31,8 @@ export var InlineImageCard = function InlineImageCard(_ref) {
31
31
  preview = _useFilePreview.preview,
32
32
  previewError = _useFilePreview.error,
33
33
  onImageError = _useFilePreview.onImageError,
34
- _onImageLoad = _useFilePreview.onImageLoad;
34
+ _onImageLoad = _useFilePreview.onImageLoad,
35
+ getSsrScriptProps = _useFilePreview.getSsrScriptProps;
35
36
  if (previewError) {
36
37
  return renderError({
37
38
  error: previewError
@@ -40,7 +41,7 @@ export var InlineImageCard = function InlineImageCard(_ref) {
40
41
  if (!preview) {
41
42
  return jsx(InlineImageCardLoadingView, null);
42
43
  }
43
- return jsx(MediaImage, {
44
+ return jsx(Fragment, null, jsx(MediaImage, {
44
45
  dataURI: preview.dataURI,
45
46
  alt: alt,
46
47
  previewOrientation: preview.orientation,
@@ -52,5 +53,5 @@ export var InlineImageCard = function InlineImageCard(_ref) {
52
53
  forceSyncDisplay: !!ssr,
53
54
  crop: crop,
54
55
  stretch: stretch
55
- });
56
+ }), getSsrScriptProps && jsx("script", getSsrScriptProps()));
56
57
  };
@@ -84,38 +84,41 @@ export var MediaInlineImageCardInternal = function MediaInlineImageCardInternal(
84
84
  }
85
85
  }, [identifier, mediaClient]);
86
86
  var content = function content(dimensions) {
87
- if (subscribeError) {
88
- var isUploading = (fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'uploading';
89
- var errorMessage = isUploading ? messages.failedToUpload : messages.unableToLoadContent;
90
- var errorReason = (fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'uploading' ? 'upload' : 'metadata-fetch';
91
- fireFailedOperationalEvent(new MediaCardError(errorReason, subscribeError));
92
- return jsx(InlineImageCardErrorView, {
93
- message: formatMessage(errorMessage)
94
- });
95
- }
96
- if (!fileState || (fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'uploading') {
87
+ if (!mediaClient) {
97
88
  return jsx(InlineImageCardLoadingView, null);
98
89
  }
99
- if (fileState.status === 'error') {
100
- var error = new MediaCardError('error-file-state', new Error(fileState.message));
101
- !isFailedEventSent && fireFailedOperationalEvent(error);
102
- return jsx(InlineImageCardErrorView, {
103
- message: formatMessage(messages.unableToLoadContent)
104
- });
105
- } else if (fileState.status === 'failed-processing') {
106
- !isFailedEventSent && fireFailedOperationalEvent(undefined, 'failed-processing');
107
- return jsx(InlineImageCardErrorView, {
108
- message: formatMessage(messages.unableToLoadContent)
109
- });
110
- } else if (!fileState.name) {
111
- var _error = new MediaCardError('metadata-fetch', new FileFetcherError('emptyFileName', fileState.id));
112
- !isFailedEventSent && fireFailedOperationalEvent(_error);
113
- return jsx(InlineImageCardErrorView, {
114
- message: formatMessage(messages.unableToLoadContent)
115
- });
116
- }
117
- if (fileState.status === 'processed') {
118
- fireSucceededOperationalEvent();
90
+ if (!ssr) {
91
+ if (subscribeError) {
92
+ var isUploading = (fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'uploading';
93
+ var errorMessage = isUploading ? messages.failedToUpload : messages.unableToLoadContent;
94
+ var errorReason = (fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'uploading' ? 'upload' : 'metadata-fetch';
95
+ fireFailedOperationalEvent(new MediaCardError(errorReason, subscribeError));
96
+ return jsx(InlineImageCardErrorView, {
97
+ message: formatMessage(errorMessage)
98
+ });
99
+ }
100
+ if (!fileState || (fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'uploading') {
101
+ return jsx(InlineImageCardLoadingView, null);
102
+ }
103
+ if (fileState.status === 'error') {
104
+ fireFailedOperationalEvent(new MediaCardError('error-file-state', new Error(fileState.message)));
105
+ return jsx(InlineImageCardErrorView, {
106
+ message: formatMessage(messages.unableToLoadContent)
107
+ });
108
+ } else if (fileState.status === 'failed-processing') {
109
+ fireFailedOperationalEvent(undefined, 'failed-processing');
110
+ return jsx(InlineImageCardErrorView, {
111
+ message: formatMessage(messages.unableToLoadContent)
112
+ });
113
+ } else if (!fileState.name) {
114
+ fireFailedOperationalEvent(new MediaCardError('metadata-fetch', new FileFetcherError('emptyFileName', fileState.id)));
115
+ return jsx(InlineImageCardErrorView, {
116
+ message: formatMessage(messages.unableToLoadContent)
117
+ });
118
+ }
119
+ if (fileState.status === 'processed') {
120
+ fireSucceededOperationalEvent();
121
+ }
119
122
  }
120
123
  return jsx(MediaClientContext.Provider, {
121
124
  value: mediaClient
@@ -57,17 +57,7 @@ export var findReplaceMessages = defineMessages({
57
57
  },
58
58
  replaceSuccess: {
59
59
  id: 'fabric.editor.replaceSuccess',
60
- defaultMessage: '{numberOfMatches} {matchPluralSingularNoun} replaced',
60
+ defaultMessage: '{numberOfMatches, plural, one {# match replaced} other {# matches replaced}}',
61
61
  description: 'Text when replacement succesfully done'
62
- },
63
- matchSingularNoun: {
64
- id: 'fabric.editor.match.singular',
65
- defaultMessage: 'match',
66
- description: 'Singular "Match" noun'
67
- },
68
- matchPluralNoun: {
69
- id: 'fabric.editor.match.plural',
70
- defaultMessage: 'matches',
71
- description: 'Plural "Match" noun'
72
62
  }
73
63
  });
@@ -6,7 +6,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
6
6
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
7
7
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
8
8
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
9
- var packageVersion = "77.4.2";
9
+ var packageVersion = "77.4.4";
10
10
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
11
11
  // Remove URL as it has UGC
12
12
  // TODO: Sanitise the URL instead of just removing it
@@ -17,7 +17,7 @@ import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@
17
17
  import { N0, N50A, N60A, N900 } from '@atlaskit/theme/colors';
18
18
  import Layer from '../Layer';
19
19
  var packageName = "@atlaskit/editor-common";
20
- var packageVersion = "77.4.2";
20
+ var packageVersion = "77.4.4";
21
21
  var halfFocusRing = 1;
22
22
  var dropOffset = '0, 8';
23
23
  var DropList = /*#__PURE__*/function (_Component) {
@@ -59,14 +59,4 @@ export declare const findReplaceMessages: {
59
59
  defaultMessage: string;
60
60
  description: string;
61
61
  };
62
- matchSingularNoun: {
63
- id: string;
64
- defaultMessage: string;
65
- description: string;
66
- };
67
- matchPluralNoun: {
68
- id: string;
69
- defaultMessage: string;
70
- description: string;
71
- };
72
62
  };
@@ -59,14 +59,4 @@ export declare const findReplaceMessages: {
59
59
  defaultMessage: string;
60
60
  description: string;
61
61
  };
62
- matchSingularNoun: {
63
- id: string;
64
- defaultMessage: string;
65
- description: string;
66
- };
67
- matchPluralNoun: {
68
- id: string;
69
- defaultMessage: string;
70
- description: string;
71
- };
72
62
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "77.4.2",
3
+ "version": "77.4.4",
4
4
  "description": "A package that contains common classes and components for editor and renderer",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -113,7 +113,7 @@
113
113
  "@atlaskit/in-product-testing": "^0.2.0",
114
114
  "@atlaskit/link-datasource": "^1.22.0",
115
115
  "@atlaskit/link-picker": "^1.33.0",
116
- "@atlaskit/media-card": "^77.9.0",
116
+ "@atlaskit/media-card": "^77.10.0",
117
117
  "@atlaskit/media-client": "^26.2.0",
118
118
  "@atlaskit/media-client-react": "^2.0.0",
119
119
  "@atlaskit/media-common": "^11.0.0",