@atlaskit/editor-plugin-insert-block 7.0.24 → 7.0.26

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,21 @@
1
1
  # @atlaskit/editor-plugin-insert-block
2
2
 
3
+ ## 7.0.26
4
+
5
+ ### Patch Changes
6
+
7
+ - [`d4e5a749a78f4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d4e5a749a78f4) -
8
+ Fix nested-interactive a11y violation by mounting mediaInsertPicker inside media button
9
+ - Updated dependencies
10
+
11
+ ## 7.0.25
12
+
13
+ ### Patch Changes
14
+
15
+ - [`55920a92e882a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/55920a92e882a) -
16
+ tsignores added for help-center local consumpton removed
17
+ - Updated dependencies
18
+
3
19
  ## 7.0.24
4
20
 
5
21
  ### Patch Changes
@@ -11,13 +11,11 @@ var toggleInsertBlockPmPlugin = exports.toggleInsertBlockPmPlugin = function tog
11
11
  return new _safePlugin.SafePlugin({
12
12
  key: toggleInsertBlockPmKey,
13
13
  state: {
14
- // @ts-ignore - Workaround for help-center local consumption
15
14
  init: function init() {
16
15
  return {
17
16
  showElementBrowser: false
18
17
  };
19
18
  },
20
- // @ts-ignore - Workaround for help-center local consumption
21
19
  apply: function apply(tr, pluginState) {
22
20
  var meta = tr.getMeta(toggleInsertBlockPmKey);
23
21
  if (!meta) {
@@ -356,13 +356,17 @@ var ToolbarInsertBlock = exports.ToolbarInsertBlock = /*#__PURE__*/function (_Re
356
356
  onShowMediaPicker = _this$props5.onShowMediaPicker,
357
357
  dispatchAnalyticsEvent = _this$props5.dispatchAnalyticsEvent;
358
358
  if (onShowMediaPicker) {
359
- var _this$mediaButtonRef, _this$props$popupsMou;
359
+ var _this$mediaButtonRef, _this$props$popupsMou, _this$props$popupsMou2;
360
360
  var ref = (_this$mediaButtonRef = _this.mediaButtonRef) === null || _this$mediaButtonRef === void 0 ? void 0 : _this$mediaButtonRef.deref();
361
361
  var args = ref ? {
362
362
  ref: ref,
363
363
  mountPoint: (_this$props$popupsMou = _this.props.popupsMountPoint) !== null && _this$props$popupsMou !== void 0 ? _this$props$popupsMou : ref
364
364
  } : undefined;
365
- onShowMediaPicker(args);
365
+ var argsWithUpdatedMountPoint = ref !== null && ref !== void 0 && ref.parentElement ? {
366
+ ref: ref,
367
+ mountPoint: (_this$props$popupsMou2 = _this.props.popupsMountPoint) !== null && _this$props$popupsMou2 !== void 0 ? _this$props$popupsMou2 : ref.parentElement
368
+ } : undefined;
369
+ onShowMediaPicker((0, _platformFeatureFlags.fg)('platform_editor_nov_a11y_fixes') ? argsWithUpdatedMountPoint : args);
366
370
  if (dispatchAnalyticsEvent) {
367
371
  dispatchAnalyticsEvent({
368
372
  action: _analytics.ACTION.OPENED,
@@ -4,15 +4,11 @@ export const toggleInsertBlockPmKey = new PluginKey('toggleInsertBlockPmKey');
4
4
  export const toggleInsertBlockPmPlugin = () => new SafePlugin({
5
5
  key: toggleInsertBlockPmKey,
6
6
  state: {
7
- // @ts-ignore - Workaround for help-center local consumption
8
-
9
7
  init() {
10
8
  return {
11
9
  showElementBrowser: false
12
10
  };
13
11
  },
14
- // @ts-ignore - Workaround for help-center local consumption
15
-
16
12
  apply(tr, pluginState) {
17
13
  const meta = tr.getMeta(toggleInsertBlockPmKey);
18
14
  if (!meta) {
@@ -375,13 +375,17 @@ export class ToolbarInsertBlock extends React.PureComponent {
375
375
  dispatchAnalyticsEvent
376
376
  } = this.props;
377
377
  if (onShowMediaPicker) {
378
- var _this$mediaButtonRef, _this$props$popupsMou;
378
+ var _this$mediaButtonRef, _this$props$popupsMou, _this$props$popupsMou2;
379
379
  const ref = (_this$mediaButtonRef = this.mediaButtonRef) === null || _this$mediaButtonRef === void 0 ? void 0 : _this$mediaButtonRef.deref();
380
380
  const args = ref ? {
381
381
  ref,
382
382
  mountPoint: (_this$props$popupsMou = this.props.popupsMountPoint) !== null && _this$props$popupsMou !== void 0 ? _this$props$popupsMou : ref
383
383
  } : undefined;
384
- onShowMediaPicker(args);
384
+ const argsWithUpdatedMountPoint = ref !== null && ref !== void 0 && ref.parentElement ? {
385
+ ref,
386
+ mountPoint: (_this$props$popupsMou2 = this.props.popupsMountPoint) !== null && _this$props$popupsMou2 !== void 0 ? _this$props$popupsMou2 : ref.parentElement
387
+ } : undefined;
388
+ onShowMediaPicker(fg('platform_editor_nov_a11y_fixes') ? argsWithUpdatedMountPoint : args);
385
389
  if (dispatchAnalyticsEvent) {
386
390
  dispatchAnalyticsEvent({
387
391
  action: ACTION.OPENED,
@@ -5,13 +5,11 @@ export var toggleInsertBlockPmPlugin = function toggleInsertBlockPmPlugin() {
5
5
  return new SafePlugin({
6
6
  key: toggleInsertBlockPmKey,
7
7
  state: {
8
- // @ts-ignore - Workaround for help-center local consumption
9
8
  init: function init() {
10
9
  return {
11
10
  showElementBrowser: false
12
11
  };
13
12
  },
14
- // @ts-ignore - Workaround for help-center local consumption
15
13
  apply: function apply(tr, pluginState) {
16
14
  var meta = tr.getMeta(toggleInsertBlockPmKey);
17
15
  if (!meta) {
@@ -350,13 +350,17 @@ export var ToolbarInsertBlock = /*#__PURE__*/function (_React$PureComponent) {
350
350
  onShowMediaPicker = _this$props5.onShowMediaPicker,
351
351
  dispatchAnalyticsEvent = _this$props5.dispatchAnalyticsEvent;
352
352
  if (onShowMediaPicker) {
353
- var _this$mediaButtonRef, _this$props$popupsMou;
353
+ var _this$mediaButtonRef, _this$props$popupsMou, _this$props$popupsMou2;
354
354
  var ref = (_this$mediaButtonRef = _this.mediaButtonRef) === null || _this$mediaButtonRef === void 0 ? void 0 : _this$mediaButtonRef.deref();
355
355
  var args = ref ? {
356
356
  ref: ref,
357
357
  mountPoint: (_this$props$popupsMou = _this.props.popupsMountPoint) !== null && _this$props$popupsMou !== void 0 ? _this$props$popupsMou : ref
358
358
  } : undefined;
359
- onShowMediaPicker(args);
359
+ var argsWithUpdatedMountPoint = ref !== null && ref !== void 0 && ref.parentElement ? {
360
+ ref: ref,
361
+ mountPoint: (_this$props$popupsMou2 = _this.props.popupsMountPoint) !== null && _this$props$popupsMou2 !== void 0 ? _this$props$popupsMou2 : ref.parentElement
362
+ } : undefined;
363
+ onShowMediaPicker(fg('platform_editor_nov_a11y_fixes') ? argsWithUpdatedMountPoint : args);
360
364
  if (dispatchAnalyticsEvent) {
361
365
  dispatchAnalyticsEvent({
362
366
  action: ACTION.OPENED,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-insert-block",
3
- "version": "7.0.24",
3
+ "version": "7.0.26",
4
4
  "description": "Insert block plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -48,7 +48,7 @@
48
48
  "@atlaskit/editor-plugin-panel": "^8.1.0",
49
49
  "@atlaskit/editor-plugin-placeholder-text": "^7.1.0",
50
50
  "@atlaskit/editor-plugin-primary-toolbar": "^7.0.0",
51
- "@atlaskit/editor-plugin-quick-insert": "^6.0.0",
51
+ "@atlaskit/editor-plugin-quick-insert": "^6.1.0",
52
52
  "@atlaskit/editor-plugin-rule": "^6.1.0",
53
53
  "@atlaskit/editor-plugin-status": "^7.1.0",
54
54
  "@atlaskit/editor-plugin-table": "^15.4.0",
@@ -64,7 +64,7 @@
64
64
  "@atlaskit/icon-lab": "^5.12.0",
65
65
  "@atlaskit/platform-feature-flags": "^1.1.0",
66
66
  "@atlaskit/theme": "^21.0.0",
67
- "@atlaskit/tmp-editor-statsig": "^14.1.0",
67
+ "@atlaskit/tmp-editor-statsig": "^14.6.0",
68
68
  "@atlaskit/tokens": "^8.4.0",
69
69
  "@babel/runtime": "^7.0.0",
70
70
  "@emotion/react": "^11.7.1",
@@ -74,7 +74,7 @@
74
74
  "react-virtualized": "^9.22.6"
75
75
  },
76
76
  "peerDependencies": {
77
- "@atlaskit/editor-common": "^110.36.0",
77
+ "@atlaskit/editor-common": "^110.38.0",
78
78
  "react": "^18.2.0",
79
79
  "react-dom": "^18.2.0",
80
80
  "react-intl-next": "npm:react-intl@^5.18.1"
@@ -140,6 +140,9 @@
140
140
  },
141
141
  "platform_editor_toolbar_aifc_undo_redo_confluence": {
142
142
  "type": "boolean"
143
+ },
144
+ "platform_editor_nov_a11y_fixes": {
145
+ "type": "boolean"
143
146
  }
144
147
  }
145
148
  }