@atlaskit/editor-common 105.5.2 → 105.5.3

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,17 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 105.5.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#155765](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/155765)
8
+ [`dac294edbbb31`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/dac294edbbb31) -
9
+ [ux] Set correct a11y role on dropdown's options.
10
+ - [#156039](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/156039)
11
+ [`78d82dd184edd`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/78d82dd184edd) -
12
+ Wrap mention FC component with a React.memo
13
+ - Updated dependencies
14
+
3
15
  ## 105.5.2
4
16
 
5
17
  ### Patch Changes
@@ -10,6 +10,8 @@ var _react = require("react");
10
10
  var _react2 = require("@emotion/react");
11
11
  var _checkMarkEditorDone = _interopRequireDefault(require("@atlaskit/icon/core/migration/check-mark--editor-done"));
12
12
  var _menu = require("@atlaskit/menu");
13
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
14
+ var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
13
15
  var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
14
16
  var _floatingToolbar = require("../floating-toolbar");
15
17
  /**
@@ -158,8 +160,12 @@ var DropdownMenuItem = exports.DropdownMenuItem = function DropdownMenuItem(prop
158
160
  // Ignored via go/ees005
159
161
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
160
162
  var hasRole = function hasRole(item) {
161
- var _item$domItemOptions;
162
- return ((_item$domItemOptions = item.domItemOptions) === null || _item$domItemOptions === void 0 ? void 0 : _item$domItemOptions.type) === 'item-checkbox' ? 'menuitemcheckbox' : undefined;
163
+ var _item$domItemOptions2;
164
+ if ((0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') && (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_9')) {
165
+ var _item$domItemOptions;
166
+ return ((_item$domItemOptions = item.domItemOptions) === null || _item$domItemOptions === void 0 ? void 0 : _item$domItemOptions.type) === 'item-checkbox' ? 'menuitemcheckbox' : 'menuitem';
167
+ }
168
+ return ((_item$domItemOptions2 = item.domItemOptions) === null || _item$domItemOptions2 === void 0 ? void 0 : _item$domItemOptions2.type) === 'item-checkbox' ? 'menuitemcheckbox' : undefined;
163
169
  };
164
170
  (0, _react.useEffect)(function () {
165
171
  var labelRefCurrent = labelRef.current;
@@ -17,7 +17,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
17
17
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
18
18
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
19
19
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
20
- var packageVersion = "105.5.2";
20
+ var packageVersion = "105.5.3";
21
21
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
22
22
  // Remove URL as it has UGC
23
23
  // Ignored via go/ees007
@@ -23,7 +23,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
23
23
  * @jsx jsx
24
24
  */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
25
25
  var packageName = "@atlaskit/editor-common";
26
- var packageVersion = "105.5.2";
26
+ var packageVersion = "105.5.3";
27
27
  var halfFocusRing = 1;
28
28
  var dropOffset = '0, 8';
29
29
  // Ignored via go/ees005
@@ -23,7 +23,7 @@ function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0,
23
23
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
24
24
  var GENERIC_USER_IDS = ['HipChat', 'all', 'here'];
25
25
  var noop = function noop() {};
26
- var MentionWithProviders = exports.MentionWithProviders = function MentionWithProviders(_ref) {
26
+ var MentionWithProviders = exports.MentionWithProviders = /*#__PURE__*/_react.default.memo(function (_ref) {
27
27
  var accessLevel = _ref.accessLevel,
28
28
  eventHandlers = _ref.eventHandlers,
29
29
  id = _ref.id,
@@ -72,7 +72,7 @@ var MentionWithProviders = exports.MentionWithProviders = function MentionWithPr
72
72
  onMouseEnter: eventHandlers === null || eventHandlers === void 0 ? void 0 : eventHandlers.onMouseEnter,
73
73
  onMouseLeave: eventHandlers === null || eventHandlers === void 0 ? void 0 : eventHandlers.onMouseLeave
74
74
  });
75
- };
75
+ });
76
76
 
77
77
  // eslint-disable-next-line @repo/internal/react/no-class-components
78
78
  var MentionWithProvidersOld = exports.MentionWithProvidersOld = /*#__PURE__*/function (_PureComponent) {
@@ -10,6 +10,8 @@ import { css, jsx } from '@emotion/react';
10
10
 
11
11
  import EditorDoneIcon from '@atlaskit/icon/core/migration/check-mark--editor-done';
12
12
  import { ButtonItem } from '@atlaskit/menu';
13
+ import { fg } from '@atlaskit/platform-feature-flags';
14
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
13
15
  import Tooltip from '@atlaskit/tooltip';
14
16
  import { messages } from '../floating-toolbar';
15
17
  export const menuItemDimensions = {
@@ -151,8 +153,12 @@ export const DropdownMenuItem = props => {
151
153
  // Ignored via go/ees005
152
154
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
153
155
  const hasRole = item => {
154
- var _item$domItemOptions;
155
- return ((_item$domItemOptions = item.domItemOptions) === null || _item$domItemOptions === void 0 ? void 0 : _item$domItemOptions.type) === 'item-checkbox' ? 'menuitemcheckbox' : undefined;
156
+ var _item$domItemOptions2;
157
+ if (editorExperiment('platform_editor_controls', 'variant1') && fg('platform_editor_controls_patch_9')) {
158
+ var _item$domItemOptions;
159
+ return ((_item$domItemOptions = item.domItemOptions) === null || _item$domItemOptions === void 0 ? void 0 : _item$domItemOptions.type) === 'item-checkbox' ? 'menuitemcheckbox' : 'menuitem';
160
+ }
161
+ return ((_item$domItemOptions2 = item.domItemOptions) === null || _item$domItemOptions2 === void 0 ? void 0 : _item$domItemOptions2.type) === 'item-checkbox' ? 'menuitemcheckbox' : undefined;
156
162
  };
157
163
  useEffect(() => {
158
164
  const labelRefCurrent = labelRef.current;
@@ -1,7 +1,7 @@
1
1
  import { isFedRamp } from './environment';
2
2
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
3
3
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
4
- const packageVersion = "105.5.2";
4
+ const packageVersion = "105.5.3";
5
5
  const sanitiseSentryEvents = (data, _hint) => {
6
6
  // Remove URL as it has UGC
7
7
  // Ignored via go/ees007
@@ -13,7 +13,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
13
13
  import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
14
14
  import Layer from '../Layer';
15
15
  const packageName = "@atlaskit/editor-common";
16
- const packageVersion = "105.5.2";
16
+ const packageVersion = "105.5.3";
17
17
  const halfFocusRing = 1;
18
18
  const dropOffset = '0, 8';
19
19
  // Ignored via go/ees005
@@ -5,7 +5,7 @@ import { ResourcedMention } from '@atlaskit/mention/element';
5
5
  import ResourcedMentionWithProfilecard from './mention-with-profilecard';
6
6
  const GENERIC_USER_IDS = ['HipChat', 'all', 'here'];
7
7
  const noop = () => {};
8
- export const MentionWithProviders = ({
8
+ export const MentionWithProviders = /*#__PURE__*/React.memo(({
9
9
  accessLevel,
10
10
  eventHandlers,
11
11
  id,
@@ -52,7 +52,7 @@ export const MentionWithProviders = ({
52
52
  onMouseEnter: eventHandlers === null || eventHandlers === void 0 ? void 0 : eventHandlers.onMouseEnter,
53
53
  onMouseLeave: eventHandlers === null || eventHandlers === void 0 ? void 0 : eventHandlers.onMouseLeave
54
54
  });
55
- };
55
+ });
56
56
 
57
57
  // eslint-disable-next-line @repo/internal/react/no-class-components
58
58
  export class MentionWithProvidersOld extends PureComponent {
@@ -11,6 +11,8 @@ import { css, jsx } from '@emotion/react';
11
11
 
12
12
  import EditorDoneIcon from '@atlaskit/icon/core/migration/check-mark--editor-done';
13
13
  import { ButtonItem } from '@atlaskit/menu';
14
+ import { fg } from '@atlaskit/platform-feature-flags';
15
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
14
16
  import Tooltip from '@atlaskit/tooltip';
15
17
  import { messages } from '../floating-toolbar';
16
18
  export var menuItemDimensions = {
@@ -150,8 +152,12 @@ export var DropdownMenuItem = function DropdownMenuItem(props) {
150
152
  // Ignored via go/ees005
151
153
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
152
154
  var hasRole = function hasRole(item) {
153
- var _item$domItemOptions;
154
- return ((_item$domItemOptions = item.domItemOptions) === null || _item$domItemOptions === void 0 ? void 0 : _item$domItemOptions.type) === 'item-checkbox' ? 'menuitemcheckbox' : undefined;
155
+ var _item$domItemOptions2;
156
+ if (editorExperiment('platform_editor_controls', 'variant1') && fg('platform_editor_controls_patch_9')) {
157
+ var _item$domItemOptions;
158
+ return ((_item$domItemOptions = item.domItemOptions) === null || _item$domItemOptions === void 0 ? void 0 : _item$domItemOptions.type) === 'item-checkbox' ? 'menuitemcheckbox' : 'menuitem';
159
+ }
160
+ return ((_item$domItemOptions2 = item.domItemOptions) === null || _item$domItemOptions2 === void 0 ? void 0 : _item$domItemOptions2.type) === 'item-checkbox' ? 'menuitemcheckbox' : undefined;
155
161
  };
156
162
  useEffect(function () {
157
163
  var labelRefCurrent = labelRef.current;
@@ -7,7 +7,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
7
7
  import { isFedRamp } from './environment';
8
8
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
9
9
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
10
- var packageVersion = "105.5.2";
10
+ var packageVersion = "105.5.3";
11
11
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
12
12
  // Remove URL as it has UGC
13
13
  // Ignored via go/ees007
@@ -20,7 +20,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
20
20
  import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
21
21
  import Layer from '../Layer';
22
22
  var packageName = "@atlaskit/editor-common";
23
- var packageVersion = "105.5.2";
23
+ var packageVersion = "105.5.3";
24
24
  var halfFocusRing = 1;
25
25
  var dropOffset = '0, 8';
26
26
  // Ignored via go/ees005
@@ -13,7 +13,7 @@ import { ResourcedMention } from '@atlaskit/mention/element';
13
13
  import ResourcedMentionWithProfilecard from './mention-with-profilecard';
14
14
  var GENERIC_USER_IDS = ['HipChat', 'all', 'here'];
15
15
  var noop = function noop() {};
16
- export var MentionWithProviders = function MentionWithProviders(_ref) {
16
+ export var MentionWithProviders = /*#__PURE__*/React.memo(function (_ref) {
17
17
  var accessLevel = _ref.accessLevel,
18
18
  eventHandlers = _ref.eventHandlers,
19
19
  id = _ref.id,
@@ -62,7 +62,7 @@ export var MentionWithProviders = function MentionWithProviders(_ref) {
62
62
  onMouseEnter: eventHandlers === null || eventHandlers === void 0 ? void 0 : eventHandlers.onMouseEnter,
63
63
  onMouseLeave: eventHandlers === null || eventHandlers === void 0 ? void 0 : eventHandlers.onMouseLeave
64
64
  });
65
- };
65
+ });
66
66
 
67
67
  // eslint-disable-next-line @repo/internal/react/no-class-components
68
68
  export var MentionWithProvidersOld = /*#__PURE__*/function (_PureComponent) {
@@ -14,7 +14,7 @@ export interface Props {
14
14
  export interface State {
15
15
  profilecardProvider: ProfilecardProvider | null;
16
16
  }
17
- export declare const MentionWithProviders: ({ accessLevel, eventHandlers, id, mentionProvider, profilecardProvider: profilecardProviderResolver, text, localId, }: Props) => React.JSX.Element;
17
+ export declare const MentionWithProviders: React.MemoExoticComponent<({ accessLevel, eventHandlers, id, mentionProvider, profilecardProvider: profilecardProviderResolver, text, localId, }: Props) => React.JSX.Element>;
18
18
  export declare class MentionWithProvidersOld extends PureComponent<Props, State> {
19
19
  state: State;
20
20
  UNSAFE_componentWillMount(): void;
@@ -14,7 +14,7 @@ export interface Props {
14
14
  export interface State {
15
15
  profilecardProvider: ProfilecardProvider | null;
16
16
  }
17
- export declare const MentionWithProviders: ({ accessLevel, eventHandlers, id, mentionProvider, profilecardProvider: profilecardProviderResolver, text, localId, }: Props) => React.JSX.Element;
17
+ export declare const MentionWithProviders: React.MemoExoticComponent<({ accessLevel, eventHandlers, id, mentionProvider, profilecardProvider: profilecardProviderResolver, text, localId, }: Props) => React.JSX.Element>;
18
18
  export declare class MentionWithProvidersOld extends PureComponent<Props, State> {
19
19
  state: State;
20
20
  UNSAFE_componentWillMount(): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "105.5.2",
3
+ "version": "105.5.3",
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/"
@@ -382,6 +382,9 @@
382
382
  },
383
383
  "platform_editor_r18_fix_selection_resync": {
384
384
  "type": "boolean"
385
+ },
386
+ "platform_editor_controls_patch_9": {
387
+ "type": "boolean"
385
388
  }
386
389
  }
387
390
  }