@atlaskit/editor-plugin-insert-block 7.0.25 → 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,13 @@
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
+
3
11
  ## 7.0.25
4
12
 
5
13
  ### Patch Changes
@@ -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,
@@ -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,
@@ -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.25",
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.2.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
  }