@atlaskit/editor-core 215.15.3 → 215.15.5

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-core
2
2
 
3
+ ## 215.15.5
4
+
5
+ ### Patch Changes
6
+
7
+ - [`32da92aaf953d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/32da92aaf953d) -
8
+ Fix scrollable-region-focusable accessibility violation by adding tabIndex to context panel
9
+ content
10
+ - Updated dependencies
11
+
12
+ ## 215.15.4
13
+
14
+ ### Patch Changes
15
+
16
+ - [`55920a92e882a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/55920a92e882a) -
17
+ tsignores added for help-center local consumpton removed
18
+ - Updated dependencies
19
+
3
20
  ## 215.15.3
4
21
 
5
22
  ### Patch Changes
@@ -12,13 +12,11 @@ var createEditorStateNotificationPlugin = exports.createEditorStateNotificationP
12
12
  return new _safePlugin.SafePlugin({
13
13
  key: key,
14
14
  state: {
15
- // @ts-ignore - Workaround for help-center local consumption
16
15
  init: function init() {
17
16
  return {
18
17
  latestTransaction: undefined
19
18
  };
20
19
  },
21
- // @ts-ignore - Workaround for help-center local consumption
22
20
  apply: function apply(tr) {
23
21
  transactions.push(tr);
24
22
  return {
@@ -28,8 +26,6 @@ var createEditorStateNotificationPlugin = exports.createEditorStateNotificationP
28
26
  },
29
27
  view: function view() {
30
28
  return {
31
- // @ts-ignore - Workaround for help-center local consumption
32
-
33
29
  update: function update(view, oldEditorState) {
34
30
  onEditorStateUpdated({
35
31
  oldEditorState: oldEditorState,
@@ -146,7 +146,7 @@ var SwappableContentAreaInner = /*#__PURE__*/function (_React$PureComponent) {
146
146
  overflowX: 'hidden'
147
147
  });
148
148
  return (0, _react2.jsx)(_contextPanel.ContextPanelConsumer, null, function (_ref) {
149
- var _this2$props$intl;
149
+ var _this2$props$intl, _this2$props$intl2;
150
150
  var broadcastWidth = _ref.broadcastWidth;
151
151
  var contextPanelWidth = visible ? width : 0;
152
152
  broadcastWidth(contextPanelWidth);
@@ -159,7 +159,12 @@ var SwappableContentAreaInner = /*#__PURE__*/function (_React$PureComponent) {
159
159
  "aria-modal": "false",
160
160
  role: "dialog"
161
161
  }, (0, _react2.jsx)("div", {
162
- "data-testid": "context-panel-content",
162
+ "data-testid": "context-panel-content"
163
+ // Adding tabIndex=0 here to make content focusable as it is a scrollable region
164
+ ,
165
+ tabIndex: (0, _platformFeatureFlags.fg)('platform_editor_nov_a11y_fixes') ? 0 : undefined,
166
+ role: (0, _platformFeatureFlags.fg)('platform_editor_nov_a11y_fixes') ? 'region' : undefined,
167
+ "aria-label": (0, _platformFeatureFlags.fg)('platform_editor_nov_a11y_fixes') ? (_this2$props$intl2 = _this2.props.intl) === null || _this2$props$intl2 === void 0 ? void 0 : _this2$props$intl2.formatMessage(_messages.contextPanelMessages.panelContentLabel) : undefined,
163
168
  css: [content, hasPadding && paddingStyles,
164
169
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/design-system/consistent-css-prop-usage
165
170
  _this2.props.customWidth && customPanelWidthStyles, !visible && panelHidden, (0, _platformFeatureFlags.fg)('platform_editor_disable_context_panel_animation') && disablePanelAnimation]
@@ -5,4 +5,4 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.version = exports.name = void 0;
7
7
  var name = exports.name = "@atlaskit/editor-core";
8
- var version = exports.version = "0.0.0-development";
8
+ var version = exports.version = "215.15.4";
@@ -6,15 +6,11 @@ export const createEditorStateNotificationPlugin = (onEditorStateUpdated, onEdit
6
6
  return new SafePlugin({
7
7
  key: key,
8
8
  state: {
9
- // @ts-ignore - Workaround for help-center local consumption
10
-
11
9
  init() {
12
10
  return {
13
11
  latestTransaction: undefined
14
12
  };
15
13
  },
16
- // @ts-ignore - Workaround for help-center local consumption
17
-
18
14
  apply(tr) {
19
15
  transactions.push(tr);
20
16
  return {
@@ -24,8 +20,6 @@ export const createEditorStateNotificationPlugin = (onEditorStateUpdated, onEdit
24
20
  },
25
21
  view: () => {
26
22
  return {
27
- // @ts-ignore - Workaround for help-center local consumption
28
-
29
23
  update: (view, oldEditorState) => {
30
24
  onEditorStateUpdated({
31
25
  oldEditorState,
@@ -135,7 +135,7 @@ class SwappableContentAreaInner extends React.PureComponent {
135
135
  return jsx(ContextPanelConsumer, null, ({
136
136
  broadcastWidth
137
137
  }) => {
138
- var _this$props$intl;
138
+ var _this$props$intl, _this$props$intl2;
139
139
  const contextPanelWidth = visible ? width : 0;
140
140
  broadcastWidth(contextPanelWidth);
141
141
  return jsx("div", {
@@ -147,7 +147,12 @@ class SwappableContentAreaInner extends React.PureComponent {
147
147
  "aria-modal": "false",
148
148
  role: "dialog"
149
149
  }, jsx("div", {
150
- "data-testid": "context-panel-content",
150
+ "data-testid": "context-panel-content"
151
+ // Adding tabIndex=0 here to make content focusable as it is a scrollable region
152
+ ,
153
+ tabIndex: fg('platform_editor_nov_a11y_fixes') ? 0 : undefined,
154
+ role: fg('platform_editor_nov_a11y_fixes') ? 'region' : undefined,
155
+ "aria-label": fg('platform_editor_nov_a11y_fixes') ? (_this$props$intl2 = this.props.intl) === null || _this$props$intl2 === void 0 ? void 0 : _this$props$intl2.formatMessage(contextPanelMessages.panelContentLabel) : undefined,
151
156
  css: [content, hasPadding && paddingStyles,
152
157
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/design-system/consistent-css-prop-usage
153
158
  this.props.customWidth && customPanelWidthStyles, !visible && panelHidden, fg('platform_editor_disable_context_panel_animation') && disablePanelAnimation]
@@ -1,2 +1,2 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "0.0.0-development";
2
+ export const version = "215.15.4";
@@ -6,13 +6,11 @@ export var createEditorStateNotificationPlugin = function createEditorStateNotif
6
6
  return new SafePlugin({
7
7
  key: key,
8
8
  state: {
9
- // @ts-ignore - Workaround for help-center local consumption
10
9
  init: function init() {
11
10
  return {
12
11
  latestTransaction: undefined
13
12
  };
14
13
  },
15
- // @ts-ignore - Workaround for help-center local consumption
16
14
  apply: function apply(tr) {
17
15
  transactions.push(tr);
18
16
  return {
@@ -22,8 +20,6 @@ export var createEditorStateNotificationPlugin = function createEditorStateNotif
22
20
  },
23
21
  view: function view() {
24
22
  return {
25
- // @ts-ignore - Workaround for help-center local consumption
26
-
27
23
  update: function update(view, oldEditorState) {
28
24
  onEditorStateUpdated({
29
25
  oldEditorState: oldEditorState,
@@ -141,7 +141,7 @@ var SwappableContentAreaInner = /*#__PURE__*/function (_React$PureComponent) {
141
141
  overflowX: 'hidden'
142
142
  });
143
143
  return jsx(ContextPanelConsumer, null, function (_ref) {
144
- var _this2$props$intl;
144
+ var _this2$props$intl, _this2$props$intl2;
145
145
  var broadcastWidth = _ref.broadcastWidth;
146
146
  var contextPanelWidth = visible ? width : 0;
147
147
  broadcastWidth(contextPanelWidth);
@@ -154,7 +154,12 @@ var SwappableContentAreaInner = /*#__PURE__*/function (_React$PureComponent) {
154
154
  "aria-modal": "false",
155
155
  role: "dialog"
156
156
  }, jsx("div", {
157
- "data-testid": "context-panel-content",
157
+ "data-testid": "context-panel-content"
158
+ // Adding tabIndex=0 here to make content focusable as it is a scrollable region
159
+ ,
160
+ tabIndex: fg('platform_editor_nov_a11y_fixes') ? 0 : undefined,
161
+ role: fg('platform_editor_nov_a11y_fixes') ? 'region' : undefined,
162
+ "aria-label": fg('platform_editor_nov_a11y_fixes') ? (_this2$props$intl2 = _this2.props.intl) === null || _this2$props$intl2 === void 0 ? void 0 : _this2$props$intl2.formatMessage(contextPanelMessages.panelContentLabel) : undefined,
158
163
  css: [content, hasPadding && paddingStyles,
159
164
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/design-system/consistent-css-prop-usage
160
165
  _this2.props.customWidth && customPanelWidthStyles, !visible && panelHidden, fg('platform_editor_disable_context_panel_animation') && disablePanelAnimation]
@@ -1,2 +1,2 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "0.0.0-development";
2
+ export var version = "215.15.4";
@@ -398,7 +398,7 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
398
398
  };
399
399
  commands: {
400
400
  formatNode: (targetType: import("packages/editor/editor-plugin-block-menu/dist/types/editor-commands/transforms/types").FormatNodeTargetType, analyticsAttrs?: import("packages/editor/editor-plugin-block-menu/dist/types/editor-commands/transforms/types").FormatNodeAnalyticsAttrs) => import("@atlaskit/editor-common/types").EditorCommand;
401
- transformNode: (targetType: import("prosemirror-model").NodeType, analyticsAttrs?: import("packages/editor/editor-plugin-block-menu/dist/types/editor-commands/transforms/types").FormatNodeAnalyticsAttrs) => import("@atlaskit/editor-common/types").EditorCommand;
401
+ transformNode: (targetType: import("prosemirror-model").NodeType, analyticsAttrs?: import("packages/editor/editor-plugin-block-menu/dist/types/editor-commands/transforms/types").TransformNodeAnalyticsAttrs) => import("@atlaskit/editor-common/types").EditorCommand;
402
402
  };
403
403
  dependencies: [import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/block-controls").BlockControlsPlugin>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/user-intent").UserIntentPlugin>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/selection").SelectionPlugin>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/decorations").DecorationsPlugin>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/analytics").AnalyticsPlugin>];
404
404
  pluginConfiguration?: import("@atlaskit/editor-plugins/block-menu").BlockMenuPluginOptions;
@@ -471,7 +471,7 @@ export default function createUniversalPresetInternal({ appearance, props, featu
471
471
  };
472
472
  commands: {
473
473
  formatNode: (targetType: import("packages/editor/editor-plugin-block-menu/dist/types/editor-commands/transforms/types").FormatNodeTargetType, analyticsAttrs?: import("packages/editor/editor-plugin-block-menu/dist/types/editor-commands/transforms/types").FormatNodeAnalyticsAttrs) => import("@atlaskit/editor-common/types").EditorCommand;
474
- transformNode: (targetType: import("prosemirror-model").NodeType, analyticsAttrs?: import("packages/editor/editor-plugin-block-menu/dist/types/editor-commands/transforms/types").FormatNodeAnalyticsAttrs) => import("@atlaskit/editor-common/types").EditorCommand;
474
+ transformNode: (targetType: import("prosemirror-model").NodeType, analyticsAttrs?: import("packages/editor/editor-plugin-block-menu/dist/types/editor-commands/transforms/types").TransformNodeAnalyticsAttrs) => import("@atlaskit/editor-common/types").EditorCommand;
475
475
  };
476
476
  dependencies: [import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/block-controls").BlockControlsPlugin>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/user-intent").UserIntentPlugin>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/selection").SelectionPlugin>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/decorations").DecorationsPlugin>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/analytics").AnalyticsPlugin>];
477
477
  pluginConfiguration?: import("@atlaskit/editor-plugins/block-menu").BlockMenuPluginOptions;
@@ -398,7 +398,7 @@ export default function useUniversalPreset({ props, initialPluginConfiguration }
398
398
  };
399
399
  commands: {
400
400
  formatNode: (targetType: import("packages/editor/editor-plugin-block-menu/dist/types/editor-commands/transforms/types").FormatNodeTargetType, analyticsAttrs?: import("packages/editor/editor-plugin-block-menu/dist/types/editor-commands/transforms/types").FormatNodeAnalyticsAttrs) => import("@atlaskit/editor-common/types").EditorCommand;
401
- transformNode: (targetType: import("prosemirror-model").NodeType, analyticsAttrs?: import("packages/editor/editor-plugin-block-menu/dist/types/editor-commands/transforms/types").FormatNodeAnalyticsAttrs) => import("@atlaskit/editor-common/types").EditorCommand;
401
+ transformNode: (targetType: import("prosemirror-model").NodeType, analyticsAttrs?: import("packages/editor/editor-plugin-block-menu/dist/types/editor-commands/transforms/types").TransformNodeAnalyticsAttrs) => import("@atlaskit/editor-common/types").EditorCommand;
402
402
  };
403
403
  dependencies: [import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/block-controls").BlockControlsPlugin>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/user-intent").UserIntentPlugin>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/selection").SelectionPlugin>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/decorations").DecorationsPlugin>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/analytics").AnalyticsPlugin>];
404
404
  pluginConfiguration?: import("@atlaskit/editor-plugins/block-menu").BlockMenuPluginOptions;
@@ -563,7 +563,7 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
563
563
  };
564
564
  commands: {
565
565
  formatNode: (targetType: import("packages/editor/editor-plugin-block-menu/dist/types/editor-commands/transforms/types").FormatNodeTargetType, analyticsAttrs?: import("packages/editor/editor-plugin-block-menu/dist/types/editor-commands/transforms/types").FormatNodeAnalyticsAttrs) => import("@atlaskit/editor-common/types").EditorCommand;
566
- transformNode: (targetType: import("prosemirror-model").NodeType, analyticsAttrs?: import("packages/editor/editor-plugin-block-menu/dist/types/editor-commands/transforms/types").FormatNodeAnalyticsAttrs) => import("@atlaskit/editor-common/types").EditorCommand;
566
+ transformNode: (targetType: import("prosemirror-model").NodeType, analyticsAttrs?: import("packages/editor/editor-plugin-block-menu/dist/types/editor-commands/transforms/types").TransformNodeAnalyticsAttrs) => import("@atlaskit/editor-common/types").EditorCommand;
567
567
  };
568
568
  dependencies: [
569
569
  import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/block-controls").BlockControlsPlugin>,
@@ -636,7 +636,7 @@ export default function createUniversalPresetInternal({ appearance, props, featu
636
636
  };
637
637
  commands: {
638
638
  formatNode: (targetType: import("packages/editor/editor-plugin-block-menu/dist/types/editor-commands/transforms/types").FormatNodeTargetType, analyticsAttrs?: import("packages/editor/editor-plugin-block-menu/dist/types/editor-commands/transforms/types").FormatNodeAnalyticsAttrs) => import("@atlaskit/editor-common/types").EditorCommand;
639
- transformNode: (targetType: import("prosemirror-model").NodeType, analyticsAttrs?: import("packages/editor/editor-plugin-block-menu/dist/types/editor-commands/transforms/types").FormatNodeAnalyticsAttrs) => import("@atlaskit/editor-common/types").EditorCommand;
639
+ transformNode: (targetType: import("prosemirror-model").NodeType, analyticsAttrs?: import("packages/editor/editor-plugin-block-menu/dist/types/editor-commands/transforms/types").TransformNodeAnalyticsAttrs) => import("@atlaskit/editor-common/types").EditorCommand;
640
640
  };
641
641
  dependencies: [
642
642
  import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/block-controls").BlockControlsPlugin>,
@@ -563,7 +563,7 @@ export default function useUniversalPreset({ props, initialPluginConfiguration }
563
563
  };
564
564
  commands: {
565
565
  formatNode: (targetType: import("packages/editor/editor-plugin-block-menu/dist/types/editor-commands/transforms/types").FormatNodeTargetType, analyticsAttrs?: import("packages/editor/editor-plugin-block-menu/dist/types/editor-commands/transforms/types").FormatNodeAnalyticsAttrs) => import("@atlaskit/editor-common/types").EditorCommand;
566
- transformNode: (targetType: import("prosemirror-model").NodeType, analyticsAttrs?: import("packages/editor/editor-plugin-block-menu/dist/types/editor-commands/transforms/types").FormatNodeAnalyticsAttrs) => import("@atlaskit/editor-common/types").EditorCommand;
566
+ transformNode: (targetType: import("prosemirror-model").NodeType, analyticsAttrs?: import("packages/editor/editor-plugin-block-menu/dist/types/editor-commands/transforms/types").TransformNodeAnalyticsAttrs) => import("@atlaskit/editor-common/types").EditorCommand;
567
567
  };
568
568
  dependencies: [
569
569
  import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/block-controls").BlockControlsPlugin>,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "215.15.3",
3
+ "version": "215.15.5",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -64,7 +64,7 @@
64
64
  "@atlaskit/platform-feature-flags-react": "^0.4.0",
65
65
  "@atlaskit/react-ufo": "^4.15.0",
66
66
  "@atlaskit/task-decision": "^19.2.0",
67
- "@atlaskit/tmp-editor-statsig": "^14.1.0",
67
+ "@atlaskit/tmp-editor-statsig": "^14.4.0",
68
68
  "@atlaskit/tokens": "^8.4.0",
69
69
  "@atlaskit/tooltip": "^20.10.0",
70
70
  "@atlaskit/width-detector": "^5.0.0",
@@ -104,7 +104,6 @@
104
104
  "@atlaskit/media-integration-test-helpers": "workspace:^",
105
105
  "@atlaskit/media-test-helpers": "^39.0.0",
106
106
  "@atlaskit/modal-dialog": "^14.7.0",
107
- "@atlaskit/primitives": "^16.4.0",
108
107
  "@atlaskit/renderer": "^124.16.0",
109
108
  "@atlaskit/section-message": "^8.9.0",
110
109
  "@atlaskit/synchrony-test-helpers": "workspace:^",
@@ -379,6 +378,9 @@
379
378
  "cc_fd_wb_create_priority_in_slash_menu_enabled": {
380
379
  "type": "boolean"
381
380
  },
381
+ "platform_editor_nov_a11y_fixes": {
382
+ "type": "boolean"
383
+ },
382
384
  "platform_editor_ai_aifc_patch_beta_2": {
383
385
  "type": "boolean"
384
386
  },