@atlaskit/editor-common 118.1.0 → 118.1.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,22 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 118.1.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`699a0c23a3977`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/699a0c23a3977) -
8
+ Report native embed resize measurement failures through bounded analytics and Editor monitoring,
9
+ with a dynamic-config killswitch.
10
+ - [`59030625abf8d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/59030625abf8d) -
11
+ Fix Element Browser ARIA attributes exposed while migrating quick-insert tests to React Testing
12
+ Library.
13
+
14
+ ## 118.1.1
15
+
16
+ ### Patch Changes
17
+
18
+ - Updated dependencies
19
+
3
20
  ## 118.1.0
4
21
 
5
22
  ### Minor Changes
@@ -14,6 +14,7 @@ var _withAnalyticsContext = _interopRequireDefault(require("@atlaskit/analytics-
14
14
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
15
15
  var _shortcut = require("@atlaskit/editor-shared-styles/shortcut");
16
16
  var _search = _interopRequireDefault(require("@atlaskit/icon/core/search"));
17
+ var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
17
18
  var _textfield = _interopRequireDefault(require("@atlaskit/textfield"));
18
19
  var _constants = require("../constants");
19
20
  var _useFocus = _interopRequireDefault(require("../hooks/use-focus"));
@@ -86,7 +87,7 @@ function ElementSearch(_ref) {
86
87
  };
87
88
  var assistiveMessage = getFormattedMessage(items === null || items === void 0 ? void 0 : items.length);
88
89
  var isInputNotFocusedAndItemSelected = !inputFocused && selectedItemIndex !== undefined;
89
- var ariaActiveDescendant = isInputNotFocusedAndItemSelected ? "searched-item-".concat(selectedItemIndex) : undefined;
90
+ var ariaActiveDescendant = isInputNotFocusedAndItemSelected && (!(0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_element_browser_aria_fix') || items[selectedItemIndex]) ? "searched-item-".concat(selectedItemIndex) : undefined;
90
91
  return (
91
92
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
92
93
  (0, _react2.jsx)("div", {
@@ -28,7 +28,7 @@ var NETWORK_FAILURE_REGEX = /^network failure/i;
28
28
  var RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
29
29
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
30
30
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
31
- var packageVersion = "118.0.0";
31
+ var packageVersion = "118.1.1";
32
32
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
33
33
  // Remove URL as it has UGC
34
34
  // 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 = "118.0.0";
27
+ var packageVersion = "118.1.1";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var fadeIn = (0, _react2.keyframes)({
@@ -11,6 +11,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
11
11
  import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
12
12
  import { shortcutStyle } from '@atlaskit/editor-shared-styles/shortcut';
13
13
  import SearchIcon from '@atlaskit/icon/core/search';
14
+ import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
14
15
  import Textfield from '@atlaskit/textfield';
15
16
  import { GRID_SIZE, SEARCH_ITEM_HEIGHT_WIDTH } from '../constants';
16
17
  import useFocus from '../hooks/use-focus';
@@ -78,7 +79,7 @@ function ElementSearch({
78
79
  };
79
80
  const assistiveMessage = getFormattedMessage(items === null || items === void 0 ? void 0 : items.length);
80
81
  const isInputNotFocusedAndItemSelected = !inputFocused && selectedItemIndex !== undefined;
81
- const ariaActiveDescendant = isInputNotFocusedAndItemSelected ? `searched-item-${selectedItemIndex}` : undefined;
82
+ const ariaActiveDescendant = isInputNotFocusedAndItemSelected && (!isExperimentEnabled('platform_editor_element_browser_aria_fix') || items[selectedItemIndex]) ? `searched-item-${selectedItemIndex}` : undefined;
82
83
  return (
83
84
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
84
85
  jsx("div", {
@@ -14,7 +14,7 @@ const NETWORK_FAILURE_REGEX = /^network failure/i;
14
14
  const RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
15
15
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
16
16
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
17
- const packageVersion = "118.0.0";
17
+ const packageVersion = "118.1.1";
18
18
  const sanitiseSentryEvents = (data, _hint) => {
19
19
  // Remove URL as it has UGC
20
20
  // 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 = "118.0.0";
17
+ const packageVersion = "118.1.1";
18
18
  const halfFocusRing = 1;
19
19
  const dropOffset = '0, 8';
20
20
  const fadeIn = keyframes({
@@ -12,6 +12,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
12
12
  import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
13
13
  import { shortcutStyle } from '@atlaskit/editor-shared-styles/shortcut';
14
14
  import SearchIcon from '@atlaskit/icon/core/search';
15
+ import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
15
16
  import Textfield from '@atlaskit/textfield';
16
17
  import { GRID_SIZE, SEARCH_ITEM_HEIGHT_WIDTH } from '../constants';
17
18
  import useFocus from '../hooks/use-focus';
@@ -76,7 +77,7 @@ function ElementSearch(_ref) {
76
77
  };
77
78
  var assistiveMessage = getFormattedMessage(items === null || items === void 0 ? void 0 : items.length);
78
79
  var isInputNotFocusedAndItemSelected = !inputFocused && selectedItemIndex !== undefined;
79
- var ariaActiveDescendant = isInputNotFocusedAndItemSelected ? "searched-item-".concat(selectedItemIndex) : undefined;
80
+ var ariaActiveDescendant = isInputNotFocusedAndItemSelected && (!isExperimentEnabled('platform_editor_element_browser_aria_fix') || items[selectedItemIndex]) ? "searched-item-".concat(selectedItemIndex) : undefined;
80
81
  return (
81
82
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
82
83
  jsx("div", {
@@ -20,7 +20,7 @@ var NETWORK_FAILURE_REGEX = /^network failure/i;
20
20
  var RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
21
21
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
22
22
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
23
- var packageVersion = "118.0.0";
23
+ var packageVersion = "118.1.1";
24
24
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
25
25
  // Remove URL as it has UGC
26
26
  // 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 = "118.0.0";
24
+ var packageVersion = "118.1.1";
25
25
  var halfFocusRing = 1;
26
26
  var dropOffset = '0, 8';
27
27
  var fadeIn = keyframes({
@@ -8,7 +8,7 @@ export { PUNC, SYMBOL } from './types/substitute-events';
8
8
  export { BROWSER_FREEZE_INTERACTION_TYPE, FULL_WIDTH_MODE, MODE, PLATFORMS, } from './types/general-events';
9
9
  export { LINK_REPRESENTATION, LINK_RESOURCE, LINK_STATUS, USER_CONTEXT, } from './types/insert-events';
10
10
  export type { InputMethodInsertLink, InputMethodInsertMedia, InsertMediaVia, InsertEventPayload, } from './types/insert-events';
11
- export type { InputMethodInsertNativeEmbed, InsertNativeEmbedAEP, } from './types/native-embed-events';
11
+ export type { InputMethodInsertNativeEmbed, InsertNativeEmbedAEP, NativeEmbedResizeErroredAEP, } from './types/native-embed-events';
12
12
  export { CHANGE_ALIGNMENT_REASON, TABLE_ACTION, TABLE_BREAKOUT, TABLE_OVERFLOW_CHANGE_TRIGGER, TABLE_STATUS, TABLE_DISPLAY_MODE, } from './types/table-events';
13
13
  export type { TableEventPayload, OverflowStateInfo } from './types/table-events';
14
14
  export { PasteContents, PasteSources, PasteTypes } from './types/paste-events';
@@ -47,6 +47,7 @@ import type { LoomEventPayload } from './loom-events';
47
47
  import type { MediaEventPayload } from './media-events';
48
48
  import type { MentionEventPayload } from './mention-events';
49
49
  import type { MoveContentEventPayload } from './move-content-events';
50
+ import type { NativeEmbedResizeErroredAEP } from './native-embed-events';
50
51
  import type { NcsSessionStepEventAEP } from './ncs-session-step-events';
51
52
  import type { NestedTableActionsEventPayload } from './nested-table-events';
52
53
  import type { NodeEventPayload } from './node-events';
@@ -175,7 +176,7 @@ type SmartLinkErrorAEP = OperationalAEP<ACTION.ERRORED, ACTION_SUBJECT.SMART_LIN
175
176
  error: string;
176
177
  errorStack?: string;
177
178
  }>;
178
- export type ErrorEventPayload = InvalidTransactionErrorAEP | InvalidTransactionStepErrorAEP | FailedToUnmountErrorAEP | SynchronyErrorAEP | InvalidDocumentEncounteredAEP | SynchronyEntityErrorAEP | ContentComponentErrorAEP | PickerErrorAEP | ComponentCrashErrorAEP | ComponentCrashAdditionalInfoErrorAEP | SmartLinkErrorAEP | ElementTransformErrorAEP;
179
+ export type ErrorEventPayload = InvalidTransactionErrorAEP | InvalidTransactionStepErrorAEP | FailedToUnmountErrorAEP | SynchronyErrorAEP | InvalidDocumentEncounteredAEP | SynchronyEntityErrorAEP | ContentComponentErrorAEP | PickerErrorAEP | ComponentCrashErrorAEP | ComponentCrashAdditionalInfoErrorAEP | SmartLinkErrorAEP | NativeEmbedResizeErroredAEP | ElementTransformErrorAEP;
179
180
  export type AnalyticsEventPayloadCallback = (state: EditorState) => AnalyticsEventPayload | undefined;
180
181
  export type FireAnalyticsCallback = <T>(payload: FireAnalyticsEventPayload<T>) => void | undefined;
181
182
  export type FireAnalyticsEvent = (createAnalyticsEvent?: CreateUIAnalyticsEvent, options?: FireAnalyticsEventOptions) => FireAnalyticsCallback;
@@ -1,7 +1,12 @@
1
1
  import type { ACTION, ACTION_SUBJECT, INPUT_METHOD } from './enums';
2
- import type { TrackAEP } from './utils';
2
+ import type { OperationalAEP, TrackAEP } from './utils';
3
3
  export type InputMethodInsertNativeEmbed = INPUT_METHOD.CLIPBOARD | INPUT_METHOD.AUTO_DETECT | INPUT_METHOD.TYPEAHEAD | INPUT_METHOD.MANUAL | INPUT_METHOD.FORMATTING | INPUT_METHOD.FLOATING_TB;
4
4
  export type InsertNativeEmbedAEP = TrackAEP<ACTION.INSERTED, ACTION_SUBJECT.NATIVE_EMBED, undefined, {
5
5
  inputMethod: InputMethodInsertNativeEmbed;
6
6
  insertedCount: number;
7
7
  }, undefined>;
8
+ export type NativeEmbedResizeErroredAEP = OperationalAEP<ACTION.ERRORED, ACTION_SUBJECT.NATIVE_EMBED, undefined, {
9
+ errorName: string;
10
+ mode: 'live-update';
11
+ owner: 'coordinator-overlay';
12
+ }>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "118.1.0",
3
+ "version": "118.1.2",
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/"
@@ -63,7 +63,7 @@
63
63
  "@atlaskit/media-picker": "^72.1.0",
64
64
  "@atlaskit/media-ui": "^30.11.0",
65
65
  "@atlaskit/media-viewer": "^54.5.0",
66
- "@atlaskit/mention": "^27.13.0",
66
+ "@atlaskit/mention": "^27.14.0",
67
67
  "@atlaskit/menu": "^10.0.0",
68
68
  "@atlaskit/object": "^2.2.0",
69
69
  "@atlaskit/onboarding": "^15.1.0",
@@ -83,7 +83,7 @@
83
83
  "@atlaskit/task-decision": "^21.8.0",
84
84
  "@atlaskit/teams-app-config": "^2.2.0",
85
85
  "@atlaskit/textfield": "^10.0.0",
86
- "@atlaskit/tmp-editor-statsig": "^142.0.0",
86
+ "@atlaskit/tmp-editor-statsig": "^143.0.0",
87
87
  "@atlaskit/tokens": "^16.4.0",
88
88
  "@atlaskit/tooltip": "^24.0.0",
89
89
  "@atlaskit/width-detector": "^7.0.0",