@atlaskit/editor-common 110.49.0 → 110.49.1

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,14 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 110.49.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`bb2dc129454dc`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/bb2dc129454dc) -
8
+ [ux] [ENGHEALTH-47470] internationalise literal strings behind fg platform_editor_dec_a11y_fixes
9
+ - [`517cb8568bc25`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/517cb8568bc25) -
10
+ [ENGHEALTH-47470] refactor of code to close enghealth ticket
11
+
3
12
  ## 110.49.0
4
13
 
5
14
  ### Minor Changes
@@ -12,8 +12,11 @@ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"))
12
12
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
13
13
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
14
14
  var _react = _interopRequireDefault(require("react"));
15
+ var _reactIntlNext = require("react-intl-next");
15
16
  var _reactLoadable = _interopRequireDefault(require("react-loadable"));
17
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
16
18
  var _manifestHelpers = require("./manifest-helpers");
19
+ var _messages = require("./messages");
17
20
  function getNodeFromManifest(
18
21
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
19
22
  manifest, extKey, nodeKey, extensionType, extensionKey) {
@@ -103,11 +106,11 @@ function _getExtensionModuleNodePrivateProps() {
103
106
  return _getExtensionModuleNodePrivateProps.apply(this, arguments);
104
107
  }
105
108
  function ExtensionLoading(props) {
109
+ var intl = (0, _reactIntlNext.useIntl)();
106
110
  if (props.error || props.timedOut) {
107
111
  // eslint-disable-next-line no-console
108
112
  console.error('Error rendering extension', props.error);
109
- // eslint-disable-next-line @atlassian/i18n/no-literal-string-in-jsx
110
- return /*#__PURE__*/_react.default.createElement("div", null, "Error loading the extension!");
113
+ return /*#__PURE__*/_react.default.createElement("div", null, (0, _platformFeatureFlags.fg)('platform_editor_dec_a11y_fixes') ? intl.formatMessage(_messages.messages.extensionLoadingError) : 'Error loading the extension!');
111
114
  } else {
112
115
  return null;
113
116
  }
@@ -45,6 +45,11 @@ var messages = exports.messages = (0, _reactIntlNext.defineMessages)({
45
45
  id: 'fabric.editor.extensions.config-panel.loading-error.non-final',
46
46
  defaultMessage: 'We ran into a bit of trouble. Refresh to try again.',
47
47
  description: 'Error message when loading the configuration panel'
48
+ },
49
+ extensionLoadingError: {
50
+ id: 'fabric.editor.extension.loading-error',
51
+ defaultMessage: 'Error loading the extension!',
52
+ description: 'Error message when loading an extension'
48
53
  }
49
54
  });
50
55
  var configPanelMessages = exports.configPanelMessages = (0, _reactIntlNext.defineMessages)({
@@ -19,7 +19,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
19
19
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
20
20
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
21
21
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
22
- var packageVersion = "110.48.1";
22
+ var packageVersion = "110.49.0";
23
23
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
24
24
  // Remove URL as it has UGC
25
25
  // Ignored via go/ees007
@@ -24,7 +24,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
24
24
  * @jsx jsx
25
25
  */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
26
26
  var packageName = "@atlaskit/editor-common";
27
- var packageVersion = "110.48.1";
27
+ var packageVersion = "110.49.0";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var fadeIn = (0, _react2.keyframes)({
@@ -156,12 +156,9 @@ var TableSelectorPopup = function TableSelectorPopup(_ref3) {
156
156
  isFocused: isCurrentFocused,
157
157
  handleInitialButtonFocus: handleInitialButtonFocus
158
158
  });
159
- })), (0, _platformFeatureFlags.fg)('platform_editor_dec_a11y_fixes') ? (0, _react2.jsx)("span", {
159
+ })), (0, _react2.jsx)("span", {
160
160
  css: selectionSizeTextStyles,
161
161
  "aria-hidden": true
162
- }, "".concat(selectedCol, " ").concat(MULTIPLICATION_SYMBOL, " ").concat(selectedRow)) : (0, _react2.jsx)("span", {
163
- css: selectionSizeTextStyles,
164
- "aria-hidden": true
165
- }, "".concat(selectedCol, " x ").concat(selectedRow)));
162
+ }, (0, _platformFeatureFlags.fg)('platform_editor_dec_a11y_fixes') ? "".concat(selectedCol, " ").concat(MULTIPLICATION_SYMBOL, " ").concat(selectedRow) : "".concat(selectedCol, " x ").concat(selectedRow)));
166
163
  };
167
164
  var _default = exports.default = (0, _reactIntlNext.injectIntl)(TableSelectorPopup);
@@ -1,6 +1,9 @@
1
1
  import React from 'react';
2
+ import { useIntl } from 'react-intl-next';
2
3
  import Loadable from 'react-loadable';
4
+ import { fg } from '@atlaskit/platform-feature-flags';
3
5
  import { getExtensionKeyAndNodeKey, resolveImport, resolveImportSync } from './manifest-helpers';
6
+ import { messages } from './messages';
4
7
  function getNodeFromManifest(
5
8
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6
9
  manifest, extKey, nodeKey, extensionType, extensionKey) {
@@ -47,11 +50,11 @@ export async function getExtensionModuleNodePrivateProps(extensionProvider, exte
47
50
  }, {});
48
51
  }
49
52
  function ExtensionLoading(props) {
53
+ const intl = useIntl();
50
54
  if (props.error || props.timedOut) {
51
55
  // eslint-disable-next-line no-console
52
56
  console.error('Error rendering extension', props.error);
53
- // eslint-disable-next-line @atlassian/i18n/no-literal-string-in-jsx
54
- return /*#__PURE__*/React.createElement("div", null, "Error loading the extension!");
57
+ return /*#__PURE__*/React.createElement("div", null, fg('platform_editor_dec_a11y_fixes') ? intl.formatMessage(messages.extensionLoadingError) : 'Error loading the extension!');
55
58
  } else {
56
59
  return null;
57
60
  }
@@ -39,6 +39,11 @@ export const messages = defineMessages({
39
39
  id: 'fabric.editor.extensions.config-panel.loading-error.non-final',
40
40
  defaultMessage: 'We ran into a bit of trouble. Refresh to try again.',
41
41
  description: 'Error message when loading the configuration panel'
42
+ },
43
+ extensionLoadingError: {
44
+ id: 'fabric.editor.extension.loading-error',
45
+ defaultMessage: 'Error loading the extension!',
46
+ description: 'Error message when loading an extension'
42
47
  }
43
48
  });
44
49
  export const configPanelMessages = defineMessages({
@@ -4,7 +4,7 @@ import { isFedRamp } from './environment';
4
4
  import { normaliseSentryBreadcrumbs, SERIALIZABLE_ATTRIBUTES } from './normalise-sentry-breadcrumbs';
5
5
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
6
6
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
7
- const packageVersion = "110.48.1";
7
+ const packageVersion = "110.49.0";
8
8
  const sanitiseSentryEvents = (data, _hint) => {
9
9
  // Remove URL as it has UGC
10
10
  // Ignored via go/ees007
@@ -14,7 +14,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
14
14
  import { fg } from '@atlaskit/platform-feature-flags';
15
15
  import Layer from '../Layer';
16
16
  const packageName = "@atlaskit/editor-common";
17
- const packageVersion = "110.48.1";
17
+ const packageVersion = "110.49.0";
18
18
  const halfFocusRing = 1;
19
19
  const dropOffset = '0, 8';
20
20
  const fadeIn = keyframes({
@@ -148,12 +148,9 @@ const TableSelectorPopup = ({
148
148
  isFocused: isCurrentFocused,
149
149
  handleInitialButtonFocus: handleInitialButtonFocus
150
150
  });
151
- })), fg('platform_editor_dec_a11y_fixes') ? jsx("span", {
151
+ })), jsx("span", {
152
152
  css: selectionSizeTextStyles,
153
153
  "aria-hidden": true
154
- }, `${selectedCol} ${MULTIPLICATION_SYMBOL} ${selectedRow}`) : jsx("span", {
155
- css: selectionSizeTextStyles,
156
- "aria-hidden": true
157
- }, `${selectedCol} x ${selectedRow}`));
154
+ }, fg('platform_editor_dec_a11y_fixes') ? `${selectedCol} ${MULTIPLICATION_SYMBOL} ${selectedRow}` : `${selectedCol} x ${selectedRow}`));
158
155
  };
159
156
  export default injectIntl(TableSelectorPopup);
@@ -2,8 +2,11 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
2
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
3
  import _regeneratorRuntime from "@babel/runtime/regenerator";
4
4
  import React from 'react';
5
+ import { useIntl } from 'react-intl-next';
5
6
  import Loadable from 'react-loadable';
7
+ import { fg } from '@atlaskit/platform-feature-flags';
6
8
  import { getExtensionKeyAndNodeKey, resolveImport, resolveImportSync } from './manifest-helpers';
9
+ import { messages } from './messages';
7
10
  function getNodeFromManifest(
8
11
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
9
12
  manifest, extKey, nodeKey, extensionType, extensionKey) {
@@ -93,11 +96,11 @@ function _getExtensionModuleNodePrivateProps() {
93
96
  return _getExtensionModuleNodePrivateProps.apply(this, arguments);
94
97
  }
95
98
  function ExtensionLoading(props) {
99
+ var intl = useIntl();
96
100
  if (props.error || props.timedOut) {
97
101
  // eslint-disable-next-line no-console
98
102
  console.error('Error rendering extension', props.error);
99
- // eslint-disable-next-line @atlassian/i18n/no-literal-string-in-jsx
100
- return /*#__PURE__*/React.createElement("div", null, "Error loading the extension!");
103
+ return /*#__PURE__*/React.createElement("div", null, fg('platform_editor_dec_a11y_fixes') ? intl.formatMessage(messages.extensionLoadingError) : 'Error loading the extension!');
101
104
  } else {
102
105
  return null;
103
106
  }
@@ -39,6 +39,11 @@ export var messages = defineMessages({
39
39
  id: 'fabric.editor.extensions.config-panel.loading-error.non-final',
40
40
  defaultMessage: 'We ran into a bit of trouble. Refresh to try again.',
41
41
  description: 'Error message when loading the configuration panel'
42
+ },
43
+ extensionLoadingError: {
44
+ id: 'fabric.editor.extension.loading-error',
45
+ defaultMessage: 'Error loading the extension!',
46
+ description: 'Error message when loading an extension'
42
47
  }
43
48
  });
44
49
  export var configPanelMessages = defineMessages({
@@ -10,7 +10,7 @@ import { isFedRamp } from './environment';
10
10
  import { normaliseSentryBreadcrumbs, SERIALIZABLE_ATTRIBUTES } from './normalise-sentry-breadcrumbs';
11
11
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
12
12
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
13
- var packageVersion = "110.48.1";
13
+ var packageVersion = "110.49.0";
14
14
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
15
15
  // Remove URL as it has UGC
16
16
  // Ignored via go/ees007
@@ -21,7 +21,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
21
21
  import { fg } from '@atlaskit/platform-feature-flags';
22
22
  import Layer from '../Layer';
23
23
  var packageName = "@atlaskit/editor-common";
24
- var packageVersion = "110.48.1";
24
+ var packageVersion = "110.49.0";
25
25
  var halfFocusRing = 1;
26
26
  var dropOffset = '0, 8';
27
27
  var fadeIn = keyframes({
@@ -148,12 +148,9 @@ var TableSelectorPopup = function TableSelectorPopup(_ref3) {
148
148
  isFocused: isCurrentFocused,
149
149
  handleInitialButtonFocus: handleInitialButtonFocus
150
150
  });
151
- })), fg('platform_editor_dec_a11y_fixes') ? jsx("span", {
151
+ })), jsx("span", {
152
152
  css: selectionSizeTextStyles,
153
153
  "aria-hidden": true
154
- }, "".concat(selectedCol, " ").concat(MULTIPLICATION_SYMBOL, " ").concat(selectedRow)) : jsx("span", {
155
- css: selectionSizeTextStyles,
156
- "aria-hidden": true
157
- }, "".concat(selectedCol, " x ").concat(selectedRow)));
154
+ }, fg('platform_editor_dec_a11y_fixes') ? "".concat(selectedCol, " ").concat(MULTIPLICATION_SYMBOL, " ").concat(selectedRow) : "".concat(selectedCol, " x ").concat(selectedRow)));
158
155
  };
159
156
  export default injectIntl(TableSelectorPopup);
@@ -39,6 +39,11 @@ export declare const messages: {
39
39
  defaultMessage: string;
40
40
  description: string;
41
41
  };
42
+ extensionLoadingError: {
43
+ id: string;
44
+ defaultMessage: string;
45
+ description: string;
46
+ };
42
47
  };
43
48
  export declare const configPanelMessages: {
44
49
  configFailedToLoad: {
@@ -39,6 +39,11 @@ export declare const messages: {
39
39
  defaultMessage: string;
40
40
  description: string;
41
41
  };
42
+ extensionLoadingError: {
43
+ id: string;
44
+ defaultMessage: string;
45
+ description: string;
46
+ };
42
47
  };
43
48
  export declare const configPanelMessages: {
44
49
  configFailedToLoad: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "110.49.0",
3
+ "version": "110.49.1",
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/"