@atlaskit/editor-common 106.3.1 → 106.3.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,28 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 106.3.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#165113](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/165113)
8
+ [`867bcb05452bf`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/867bcb05452bf) -
9
+ Cleaned up platform_editor_controls_patch_analytics and platform_editor_controls_patch_analytics_2
10
+ - Updated dependencies
11
+
12
+ ## 106.3.2
13
+
14
+ ### Patch Changes
15
+
16
+ - [#166424](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/166424)
17
+ [`5bfa5b37065b1`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5bfa5b37065b1) -
18
+ [ED-27807] Fix a bug where first button in the floating toolbar is shown with focus ring when
19
+ pressing Option+F10
20
+ - [#167027](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/167027)
21
+ [`44639aaa2f7ae`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/44639aaa2f7ae) -
22
+ ED-28191 add new description text for resizing shortcut now it applies to more elements behind
23
+ platform_editor_breakout_resizing experiment
24
+ - Updated dependencies
25
+
3
26
  ## 106.3.1
4
27
 
5
28
  ### Patch Changes
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.unlinkPayload = exports.buildVisitedNonHyperLinkPayload = exports.buildVisitedLinkPayload = exports.buildOpenedSettingsPayload = exports.buildEditLinkPayload = void 0;
7
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
8
7
  var _enums = require("./types/enums");
9
8
  var buildEditLinkPayload = exports.buildEditLinkPayload = function buildEditLinkPayload(type) {
10
9
  return {
@@ -58,7 +57,7 @@ var buildVisitedNonHyperLinkPayload = exports.buildVisitedNonHyperLinkPayload =
58
57
  actionSubject: _enums.ACTION_SUBJECT.SMART_LINK,
59
58
  actionSubjectId: type,
60
59
  attributes: {
61
- inputMethod: (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_analytics') ? inputMethod : _enums.INPUT_METHOD.TOOLBAR
60
+ inputMethod: inputMethod
62
61
  },
63
62
  eventType: _enums.EVENT_TYPE.TRACK
64
63
  };
@@ -71,11 +71,21 @@ var helpDialogMessages = exports.helpDialogMessages = (0, _reactIntlNext.defineM
71
71
  defaultMessage: 'Increase table or media size',
72
72
  description: 'The text is shown as an shortcut description in help dialog modal, when the user uses the described shortcut, he is able to increase the width of the selected element. Optimal characters less than 21.'
73
73
  },
74
+ increaseElementSize: {
75
+ id: 'fabric.editor.increaseElementSize',
76
+ defaultMessage: 'Increase element size',
77
+ description: 'The text is shown as an shortcut description in help dialog modal, when the user uses the described shortcut, he is able to increase the width of the selected element. Optimal characters less than 21.'
78
+ },
74
79
  decreaseSize: {
75
80
  id: 'fabric.editor.decreaseSize',
76
81
  defaultMessage: 'Decrease table or media size',
77
82
  description: 'The text is shown as an shortcut description in help dialog modal, when the user uses the described shortcut, he is able to decrease the width of the selected element. Optimal characters less than 21.'
78
83
  },
84
+ decreaseElementSize: {
85
+ id: 'fabric.editor.decreaseElementSize',
86
+ defaultMessage: 'Decrease element size',
87
+ description: 'The text is shown as an shortcut description in help dialog modal, when the user uses the described shortcut, he is able to decrease the width of the selected element. Optimal characters less than 21.'
88
+ },
79
89
  openCellOptions: {
80
90
  id: 'fabric.editor.openCellOptions',
81
91
  defaultMessage: 'Open cell options',
@@ -16,7 +16,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
16
16
  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); }
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 = "106.3.1";
19
+ var packageVersion = "106.3.3";
20
20
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
21
21
  // Remove URL as it has UGC
22
22
  // 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 = "106.3.1";
26
+ var packageVersion = "106.3.3";
27
27
  var halfFocusRing = 1;
28
28
  var dropOffset = '0, 8';
29
29
  // Ignored via go/ees005
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.ToolbarArrowKeyNavigationProvider = exports.KeyDownHandlerContext = void 0;
8
8
  var _react = _interopRequireWildcard(require("react"));
9
9
  var _react2 = require("@emotion/react");
10
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
10
11
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
11
12
  var _elementBrowser = require("../../element-browser");
12
13
  var _messages = require("../../messages");
@@ -213,10 +214,18 @@ var ToolbarArrowKeyNavigationProvider = exports.ToolbarArrowKeyNavigationProvide
213
214
  // Ignored via go/ees005
214
215
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
215
216
  if (isShortcutToFocusToolbar(event)) {
216
- var _filteredFocusableEle7, _filteredFocusableEle8;
217
+ var _filteredFocusableEle7, _filteredFocusableEle8, _filteredFocusableEle9;
217
218
  var filteredFocusableElements = getFilteredFocusableElements(wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current);
218
219
  (_filteredFocusableEle7 = filteredFocusableElements[0]) === null || _filteredFocusableEle7 === void 0 || _filteredFocusableEle7.focus();
219
- (_filteredFocusableEle8 = filteredFocusableElements[0]) === null || _filteredFocusableEle8 === void 0 || _filteredFocusableEle8.scrollIntoView({
220
+
221
+ // Button component from DS removes focus ring when :focus:not(:focus-visible) is true
222
+ // Since here we programmatically focus the first button in the toolbar (as suppose to keyboard navigation), browser does not always force focus-visible to true
223
+ // which is why the first button in the toolbar is not shown with focus ring
224
+ // The workaround is add a new classname so we add back focus ring when the button is focused
225
+ if (((_filteredFocusableEle8 = filteredFocusableElements[0]) === null || _filteredFocusableEle8 === void 0 ? void 0 : _filteredFocusableEle8.tagName) === 'BUTTON' && (0, _platformFeatureFlags.fg)('platform_editor_fix_floating_toolbar_focus')) {
226
+ filteredFocusableElements[0].classList.add('first-floating-toolbar-button');
227
+ }
228
+ (_filteredFocusableEle9 = filteredFocusableElements[0]) === null || _filteredFocusableEle9 === void 0 || _filteredFocusableEle9.scrollIntoView({
220
229
  behavior: 'smooth',
221
230
  block: 'center',
222
231
  inline: 'nearest'
@@ -1,4 +1,3 @@
1
- import { fg } from '@atlaskit/platform-feature-flags';
2
1
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from './types/enums';
3
2
  export const buildEditLinkPayload = type => {
4
3
  return {
@@ -52,7 +51,7 @@ export const buildVisitedNonHyperLinkPayload = (type, inputMethod) => {
52
51
  actionSubject: ACTION_SUBJECT.SMART_LINK,
53
52
  actionSubjectId: type,
54
53
  attributes: {
55
- inputMethod: fg('platform_editor_controls_patch_analytics') ? inputMethod : INPUT_METHOD.TOOLBAR
54
+ inputMethod: inputMethod
56
55
  },
57
56
  eventType: EVENT_TYPE.TRACK
58
57
  };
@@ -65,11 +65,21 @@ export const helpDialogMessages = defineMessages({
65
65
  defaultMessage: 'Increase table or media size',
66
66
  description: 'The text is shown as an shortcut description in help dialog modal, when the user uses the described shortcut, he is able to increase the width of the selected element. Optimal characters less than 21.'
67
67
  },
68
+ increaseElementSize: {
69
+ id: 'fabric.editor.increaseElementSize',
70
+ defaultMessage: 'Increase element size',
71
+ description: 'The text is shown as an shortcut description in help dialog modal, when the user uses the described shortcut, he is able to increase the width of the selected element. Optimal characters less than 21.'
72
+ },
68
73
  decreaseSize: {
69
74
  id: 'fabric.editor.decreaseSize',
70
75
  defaultMessage: 'Decrease table or media size',
71
76
  description: 'The text is shown as an shortcut description in help dialog modal, when the user uses the described shortcut, he is able to decrease the width of the selected element. Optimal characters less than 21.'
72
77
  },
78
+ decreaseElementSize: {
79
+ id: 'fabric.editor.decreaseElementSize',
80
+ defaultMessage: 'Decrease element size',
81
+ description: 'The text is shown as an shortcut description in help dialog modal, when the user uses the described shortcut, he is able to decrease the width of the selected element. Optimal characters less than 21.'
82
+ },
73
83
  openCellOptions: {
74
84
  id: 'fabric.editor.openCellOptions',
75
85
  defaultMessage: 'Open cell options',
@@ -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 = "106.3.1";
4
+ const packageVersion = "106.3.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 = "106.3.1";
16
+ const packageVersion = "106.3.3";
17
17
  const halfFocusRing = 1;
18
18
  const dropOffset = '0, 8';
19
19
  // Ignored via go/ees005
@@ -7,6 +7,7 @@ import React, { useCallback, useLayoutEffect, useMemo, useRef } from 'react';
7
7
 
8
8
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
9
9
  import { css, jsx } from '@emotion/react';
10
+ import { fg } from '@atlaskit/platform-feature-flags';
10
11
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
11
12
  import { ELEMENT_BROWSER_ID } from '../../element-browser';
12
13
  import { fullPageMessages } from '../../messages';
@@ -205,10 +206,18 @@ export const ToolbarArrowKeyNavigationProvider = ({
205
206
  // Ignored via go/ees005
206
207
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
207
208
  if (isShortcutToFocusToolbar(event)) {
208
- var _filteredFocusableEle7, _filteredFocusableEle8;
209
+ var _filteredFocusableEle7, _filteredFocusableEle8, _filteredFocusableEle9;
209
210
  const filteredFocusableElements = getFilteredFocusableElements(wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current);
210
211
  (_filteredFocusableEle7 = filteredFocusableElements[0]) === null || _filteredFocusableEle7 === void 0 ? void 0 : _filteredFocusableEle7.focus();
211
- (_filteredFocusableEle8 = filteredFocusableElements[0]) === null || _filteredFocusableEle8 === void 0 ? void 0 : _filteredFocusableEle8.scrollIntoView({
212
+
213
+ // Button component from DS removes focus ring when :focus:not(:focus-visible) is true
214
+ // Since here we programmatically focus the first button in the toolbar (as suppose to keyboard navigation), browser does not always force focus-visible to true
215
+ // which is why the first button in the toolbar is not shown with focus ring
216
+ // The workaround is add a new classname so we add back focus ring when the button is focused
217
+ if (((_filteredFocusableEle8 = filteredFocusableElements[0]) === null || _filteredFocusableEle8 === void 0 ? void 0 : _filteredFocusableEle8.tagName) === 'BUTTON' && fg('platform_editor_fix_floating_toolbar_focus')) {
218
+ filteredFocusableElements[0].classList.add('first-floating-toolbar-button');
219
+ }
220
+ (_filteredFocusableEle9 = filteredFocusableElements[0]) === null || _filteredFocusableEle9 === void 0 ? void 0 : _filteredFocusableEle9.scrollIntoView({
212
221
  behavior: 'smooth',
213
222
  block: 'center',
214
223
  inline: 'nearest'
@@ -1,4 +1,3 @@
1
- import { fg } from '@atlaskit/platform-feature-flags';
2
1
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from './types/enums';
3
2
  export var buildEditLinkPayload = function buildEditLinkPayload(type) {
4
3
  return {
@@ -52,7 +51,7 @@ export var buildVisitedNonHyperLinkPayload = function buildVisitedNonHyperLinkPa
52
51
  actionSubject: ACTION_SUBJECT.SMART_LINK,
53
52
  actionSubjectId: type,
54
53
  attributes: {
55
- inputMethod: fg('platform_editor_controls_patch_analytics') ? inputMethod : INPUT_METHOD.TOOLBAR
54
+ inputMethod: inputMethod
56
55
  },
57
56
  eventType: EVENT_TYPE.TRACK
58
57
  };
@@ -65,11 +65,21 @@ export var helpDialogMessages = defineMessages({
65
65
  defaultMessage: 'Increase table or media size',
66
66
  description: 'The text is shown as an shortcut description in help dialog modal, when the user uses the described shortcut, he is able to increase the width of the selected element. Optimal characters less than 21.'
67
67
  },
68
+ increaseElementSize: {
69
+ id: 'fabric.editor.increaseElementSize',
70
+ defaultMessage: 'Increase element size',
71
+ description: 'The text is shown as an shortcut description in help dialog modal, when the user uses the described shortcut, he is able to increase the width of the selected element. Optimal characters less than 21.'
72
+ },
68
73
  decreaseSize: {
69
74
  id: 'fabric.editor.decreaseSize',
70
75
  defaultMessage: 'Decrease table or media size',
71
76
  description: 'The text is shown as an shortcut description in help dialog modal, when the user uses the described shortcut, he is able to decrease the width of the selected element. Optimal characters less than 21.'
72
77
  },
78
+ decreaseElementSize: {
79
+ id: 'fabric.editor.decreaseElementSize',
80
+ defaultMessage: 'Decrease element size',
81
+ description: 'The text is shown as an shortcut description in help dialog modal, when the user uses the described shortcut, he is able to decrease the width of the selected element. Optimal characters less than 21.'
82
+ },
73
83
  openCellOptions: {
74
84
  id: 'fabric.editor.openCellOptions',
75
85
  defaultMessage: 'Open cell options',
@@ -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 = "106.3.1";
10
+ var packageVersion = "106.3.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 = "106.3.1";
23
+ var packageVersion = "106.3.3";
24
24
  var halfFocusRing = 1;
25
25
  var dropOffset = '0, 8';
26
26
  // Ignored via go/ees005
@@ -7,6 +7,7 @@ import React, { useCallback, useLayoutEffect, useMemo, useRef } from 'react';
7
7
 
8
8
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
9
9
  import { css, jsx } from '@emotion/react';
10
+ import { fg } from '@atlaskit/platform-feature-flags';
10
11
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
11
12
  import { ELEMENT_BROWSER_ID } from '../../element-browser';
12
13
  import { fullPageMessages } from '../../messages';
@@ -205,10 +206,18 @@ export var ToolbarArrowKeyNavigationProvider = function ToolbarArrowKeyNavigatio
205
206
  // Ignored via go/ees005
206
207
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
207
208
  if (isShortcutToFocusToolbar(event)) {
208
- var _filteredFocusableEle7, _filteredFocusableEle8;
209
+ var _filteredFocusableEle7, _filteredFocusableEle8, _filteredFocusableEle9;
209
210
  var filteredFocusableElements = getFilteredFocusableElements(wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current);
210
211
  (_filteredFocusableEle7 = filteredFocusableElements[0]) === null || _filteredFocusableEle7 === void 0 || _filteredFocusableEle7.focus();
211
- (_filteredFocusableEle8 = filteredFocusableElements[0]) === null || _filteredFocusableEle8 === void 0 || _filteredFocusableEle8.scrollIntoView({
212
+
213
+ // Button component from DS removes focus ring when :focus:not(:focus-visible) is true
214
+ // Since here we programmatically focus the first button in the toolbar (as suppose to keyboard navigation), browser does not always force focus-visible to true
215
+ // which is why the first button in the toolbar is not shown with focus ring
216
+ // The workaround is add a new classname so we add back focus ring when the button is focused
217
+ if (((_filteredFocusableEle8 = filteredFocusableElements[0]) === null || _filteredFocusableEle8 === void 0 ? void 0 : _filteredFocusableEle8.tagName) === 'BUTTON' && fg('platform_editor_fix_floating_toolbar_focus')) {
218
+ filteredFocusableElements[0].classList.add('first-floating-toolbar-button');
219
+ }
220
+ (_filteredFocusableEle9 = filteredFocusableElements[0]) === null || _filteredFocusableEle9 === void 0 || _filteredFocusableEle9.scrollIntoView({
212
221
  behavior: 'smooth',
213
222
  block: 'center',
214
223
  inline: 'nearest'
@@ -64,11 +64,21 @@ export declare const helpDialogMessages: {
64
64
  defaultMessage: string;
65
65
  description: string;
66
66
  };
67
+ increaseElementSize: {
68
+ id: string;
69
+ defaultMessage: string;
70
+ description: string;
71
+ };
67
72
  decreaseSize: {
68
73
  id: string;
69
74
  defaultMessage: string;
70
75
  description: string;
71
76
  };
77
+ decreaseElementSize: {
78
+ id: string;
79
+ defaultMessage: string;
80
+ description: string;
81
+ };
72
82
  openCellOptions: {
73
83
  id: string;
74
84
  defaultMessage: string;
@@ -64,11 +64,21 @@ export declare const helpDialogMessages: {
64
64
  defaultMessage: string;
65
65
  description: string;
66
66
  };
67
+ increaseElementSize: {
68
+ id: string;
69
+ defaultMessage: string;
70
+ description: string;
71
+ };
67
72
  decreaseSize: {
68
73
  id: string;
69
74
  defaultMessage: string;
70
75
  description: string;
71
76
  };
77
+ decreaseElementSize: {
78
+ id: string;
79
+ defaultMessage: string;
80
+ description: string;
81
+ };
72
82
  openCellOptions: {
73
83
  id: string;
74
84
  defaultMessage: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "106.3.1",
3
+ "version": "106.3.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/"
@@ -169,8 +169,8 @@
169
169
  "@atlaskit/task-decision": "^19.2.0",
170
170
  "@atlaskit/textfield": "^8.0.0",
171
171
  "@atlaskit/theme": "^18.0.0",
172
- "@atlaskit/tmp-editor-statsig": "^5.13.0",
173
- "@atlaskit/tokens": "^5.0.0",
172
+ "@atlaskit/tmp-editor-statsig": "^5.14.0",
173
+ "@atlaskit/tokens": "^5.1.0",
174
174
  "@atlaskit/tooltip": "^20.3.0",
175
175
  "@atlaskit/width-detector": "^5.0.0",
176
176
  "@babel/runtime": "^7.0.0",
@@ -373,9 +373,6 @@
373
373
  "platform_editor_fix_code_block_bg_color_in_macro": {
374
374
  "type": "boolean"
375
375
  },
376
- "platform_editor_controls_patch_analytics": {
377
- "type": "boolean"
378
- },
379
376
  "confluence_preload_extension_providers": {
380
377
  "type": "boolean"
381
378
  },
@@ -399,6 +396,9 @@
399
396
  },
400
397
  "interactable_in_editor_inputs": {
401
398
  "type": "boolean"
399
+ },
400
+ "platform_editor_fix_floating_toolbar_focus": {
401
+ "type": "boolean"
402
402
  }
403
403
  }
404
404
  }