@atlaskit/editor-plugin-table 14.1.0 → 14.2.0

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,24 @@
1
1
  # @atlaskit/editor-plugin-table
2
2
 
3
+ ## 14.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`b367661ba720e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b367661ba720e) -
8
+ EDITOR-1562 bump adf-schema for afm
9
+
10
+ ### Patch Changes
11
+
12
+ - Updated dependencies
13
+
14
+ ## 14.1.1
15
+
16
+ ### Patch Changes
17
+
18
+ - [`99f67e6caf2b2`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/99f67e6caf2b2) -
19
+ Add aria-label to table floating insert buttons to address button-name A11Y violation
20
+ - Updated dependencies
21
+
3
22
  ## 14.1.0
4
23
 
5
24
  ### Minor Changes
@@ -97,6 +97,9 @@ var ContentComponentInternal = function ContentComponentInternal(_ref) {
97
97
  sizeSelectorTargetRef = _useSharedPluginState.sizeSelectorTargetRef;
98
98
  var _ref2 = pluginConfig !== null && pluginConfig !== void 0 ? pluginConfig : {},
99
99
  allowControls = _ref2.allowControls;
100
+ if (!editorView) {
101
+ return null;
102
+ }
100
103
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, targetCellPosition && (tableRef || isCellMenuOpenByKeyboard) && !isResizing && options && options.allowContextualMenu && /*#__PURE__*/_react.default.createElement(_FloatingContextualButton.default, {
101
104
  isNumberColumnEnabled: tableNode && tableNode.attrs.isNumberColumnEnabled,
102
105
  editorView: editorView,
@@ -14,6 +14,7 @@ var _messages = require("@atlaskit/editor-common/messages");
14
14
  var _styles = require("@atlaskit/editor-common/styles");
15
15
  var _utils = require("@atlaskit/editor-common/utils");
16
16
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
17
+ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
17
18
  var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
18
19
  var _types = require("../../types");
19
20
  var _consts = require("../consts");
@@ -144,7 +145,8 @@ var InsertButton = function InsertButton(_ref3) {
144
145
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
145
146
  ,
146
147
  className: _types.TableCssClassName.CONTROLS_INSERT_BUTTON,
147
- onMouseDown: onMouseDown
148
+ onMouseDown: onMouseDown,
149
+ "aria-label": (0, _expValEquals.expValEquals)('platform_editor_fix_button_name_violation_in_table', 'isEnabled', true) ? formatMessage(tooltipMessageByType(type)) : undefined
148
150
  }, /*#__PURE__*/_react.default.createElement("svg", {
149
151
  className: _types.TableCssClassName.CONTROLS_BUTTON_ICON
150
152
  }, /*#__PURE__*/_react.default.createElement("path", {
@@ -92,6 +92,9 @@ const ContentComponentInternal = ({
92
92
  const {
93
93
  allowControls
94
94
  } = pluginConfig !== null && pluginConfig !== void 0 ? pluginConfig : {};
95
+ if (!editorView) {
96
+ return null;
97
+ }
95
98
  return /*#__PURE__*/React.createElement(React.Fragment, null, targetCellPosition && (tableRef || isCellMenuOpenByKeyboard) && !isResizing && options && options.allowContextualMenu && /*#__PURE__*/React.createElement(FloatingContextualButton, {
96
99
  isNumberColumnEnabled: tableNode && tableNode.attrs.isNumberColumnEnabled,
97
100
  editorView: editorView,
@@ -8,6 +8,7 @@ import { tableMessages as messages } from '@atlaskit/editor-common/messages';
8
8
  import { tableMarginTop } from '@atlaskit/editor-common/styles';
9
9
  import { closestElement } from '@atlaskit/editor-common/utils';
10
10
  import { akEditorTableNumberColumnWidth } from '@atlaskit/editor-shared-styles';
11
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
11
12
  import Tooltip from '@atlaskit/tooltip';
12
13
  import { TableCssClassName as ClassName } from '../../types';
13
14
  import { tableToolbarSize } from '../consts';
@@ -149,7 +150,8 @@ const InsertButton = ({
149
150
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
150
151
  ,
151
152
  className: ClassName.CONTROLS_INSERT_BUTTON,
152
- onMouseDown: onMouseDown
153
+ onMouseDown: onMouseDown,
154
+ "aria-label": expValEquals('platform_editor_fix_button_name_violation_in_table', 'isEnabled', true) ? formatMessage(tooltipMessageByType(type)) : undefined
153
155
  }, /*#__PURE__*/React.createElement("svg", {
154
156
  className: ClassName.CONTROLS_BUTTON_ICON
155
157
  }, /*#__PURE__*/React.createElement("path", {
@@ -89,6 +89,9 @@ var ContentComponentInternal = function ContentComponentInternal(_ref) {
89
89
  sizeSelectorTargetRef = _useSharedPluginState.sizeSelectorTargetRef;
90
90
  var _ref2 = pluginConfig !== null && pluginConfig !== void 0 ? pluginConfig : {},
91
91
  allowControls = _ref2.allowControls;
92
+ if (!editorView) {
93
+ return null;
94
+ }
92
95
  return /*#__PURE__*/React.createElement(React.Fragment, null, targetCellPosition && (tableRef || isCellMenuOpenByKeyboard) && !isResizing && options && options.allowContextualMenu && /*#__PURE__*/React.createElement(FloatingContextualButton, {
93
96
  isNumberColumnEnabled: tableNode && tableNode.attrs.isNumberColumnEnabled,
94
97
  editorView: editorView,
@@ -9,6 +9,7 @@ import { tableMessages as messages } from '@atlaskit/editor-common/messages';
9
9
  import { tableMarginTop } from '@atlaskit/editor-common/styles';
10
10
  import { closestElement } from '@atlaskit/editor-common/utils';
11
11
  import { akEditorTableNumberColumnWidth } from '@atlaskit/editor-shared-styles';
12
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
12
13
  import Tooltip from '@atlaskit/tooltip';
13
14
  import { TableCssClassName as ClassName } from '../../types';
14
15
  import { tableToolbarSize } from '../consts';
@@ -137,7 +138,8 @@ var InsertButton = function InsertButton(_ref3) {
137
138
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
138
139
  ,
139
140
  className: ClassName.CONTROLS_INSERT_BUTTON,
140
- onMouseDown: onMouseDown
141
+ onMouseDown: onMouseDown,
142
+ "aria-label": expValEquals('platform_editor_fix_button_name_violation_in_table', 'isEnabled', true) ? formatMessage(tooltipMessageByType(type)) : undefined
141
143
  }, /*#__PURE__*/React.createElement("svg", {
142
144
  className: ClassName.CONTROLS_BUTTON_ICON
143
145
  }, /*#__PURE__*/React.createElement("path", {
@@ -8,7 +8,7 @@ export type ContentComponentProps = {
8
8
  defaultGetEditorContainerWidth: GetEditorContainerWidth;
9
9
  defaultGetEditorFeatureFlags: GetEditorFeatureFlags;
10
10
  dispatchAnalyticsEvent: DispatchAnalyticsEvent | undefined;
11
- editorView: EditorView;
11
+ editorView?: EditorView;
12
12
  isTableSelectorEnabled: boolean | undefined;
13
13
  options?: TablePluginOptions;
14
14
  popupsBoundariesElement?: HTMLElement;
@@ -8,7 +8,7 @@ export type ContentComponentProps = {
8
8
  defaultGetEditorContainerWidth: GetEditorContainerWidth;
9
9
  defaultGetEditorFeatureFlags: GetEditorFeatureFlags;
10
10
  dispatchAnalyticsEvent: DispatchAnalyticsEvent | undefined;
11
- editorView: EditorView;
11
+ editorView?: EditorView;
12
12
  isTableSelectorEnabled: boolean | undefined;
13
13
  options?: TablePluginOptions;
14
14
  popupsBoundariesElement?: HTMLElement;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-table",
3
- "version": "14.1.0",
3
+ "version": "14.2.0",
4
4
  "description": "Table plugin for the @atlaskit/editor",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -28,16 +28,16 @@
28
28
  "singleton": true
29
29
  },
30
30
  "dependencies": {
31
- "@atlaskit/adf-schema": "^51.1.1",
31
+ "@atlaskit/adf-schema": "^51.1.2",
32
32
  "@atlaskit/button": "^23.4.0",
33
- "@atlaskit/custom-steps": "^0.12.0",
33
+ "@atlaskit/custom-steps": "^0.13.0",
34
34
  "@atlaskit/editor-palette": "^2.1.0",
35
35
  "@atlaskit/editor-plugin-accessibility-utils": "^5.0.0",
36
- "@atlaskit/editor-plugin-analytics": "^5.1.0",
37
- "@atlaskit/editor-plugin-batch-attribute-updates": "^5.1.0",
36
+ "@atlaskit/editor-plugin-analytics": "^5.2.0",
37
+ "@atlaskit/editor-plugin-batch-attribute-updates": "^5.2.0",
38
38
  "@atlaskit/editor-plugin-content-insertion": "^5.0.0",
39
39
  "@atlaskit/editor-plugin-editor-viewmode": "^7.0.0",
40
- "@atlaskit/editor-plugin-extension": "8.1.0",
40
+ "@atlaskit/editor-plugin-extension": "8.2.0",
41
41
  "@atlaskit/editor-plugin-guideline": "^5.0.0",
42
42
  "@atlaskit/editor-plugin-interaction": "^7.0.0",
43
43
  "@atlaskit/editor-plugin-limited-mode": "^2.0.0",
@@ -57,9 +57,9 @@
57
57
  "@atlaskit/pragmatic-drag-and-drop-auto-scroll": "^2.1.0",
58
58
  "@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.1.0",
59
59
  "@atlaskit/primitives": "^14.14.0",
60
- "@atlaskit/react-ufo": "^4.6.0",
60
+ "@atlaskit/react-ufo": "^4.7.0",
61
61
  "@atlaskit/theme": "^21.0.0",
62
- "@atlaskit/tmp-editor-statsig": "^12.14.0",
62
+ "@atlaskit/tmp-editor-statsig": "^12.18.0",
63
63
  "@atlaskit/toggle": "^15.1.0",
64
64
  "@atlaskit/tokens": "^6.3.0",
65
65
  "@atlaskit/tooltip": "^20.4.0",
@@ -72,7 +72,7 @@
72
72
  "uuid": "^3.1.0"
73
73
  },
74
74
  "peerDependencies": {
75
- "@atlaskit/editor-common": "^109.3.0",
75
+ "@atlaskit/editor-common": "^109.5.0",
76
76
  "react": "^18.2.0",
77
77
  "react-dom": "^18.2.0",
78
78
  "react-intl-next": "npm:react-intl@^5.18.1"