@atlaskit/editor-plugin-table 28.1.2 → 28.1.4

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,20 @@
1
1
  # @atlaskit/editor-plugin-table
2
2
 
3
+ ## 28.1.4
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 28.1.3
10
+
11
+ ### Patch Changes
12
+
13
+ - [`468a533e36283`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/468a533e36283) -
14
+ Clean up the shipped `platform_editor_table_a11y_eslint_fix` experiment and keep its enabled table
15
+ focus behavior.
16
+ - Updated dependencies
17
+
3
18
  ## 28.1.2
4
19
 
5
20
  ### Patch Changes
@@ -279,12 +279,8 @@ var DragHandleComponent = function DragHandleComponent(_ref) {
279
279
  setIsHovered(false);
280
280
  _onMouseOut && _onMouseOut(e);
281
281
  },
282
- onFocus: (0, _expValEquals.expValEquals)('platform_editor_table_a11y_eslint_fix', 'isEnabled', true) ? function (e) {
283
- onFocus && onFocus(e);
284
- } : undefined,
285
- onBlur: (0, _expValEquals.expValEquals)('platform_editor_table_a11y_eslint_fix', 'isEnabled', true) ? function (e) {
286
- onBlur && onBlur(e);
287
- } : undefined,
282
+ onFocus: onFocus,
283
+ onBlur: onBlur,
288
284
  onMouseUp: function onMouseUp(e) {
289
285
  // return focus to editor so copying table selections whilst still works, i cannot call e.preventDefault in a mousemove event as this stops dragstart events from firing
290
286
  // -> this is bad for a11y but is the current standard new copy/paste keyboard shortcuts should be introduced instead
@@ -7,7 +7,6 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.default = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
  var _reactIntl = require("react-intl");
10
- var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
11
10
  var _types = require("../../types");
12
11
  var DeleteButton = function DeleteButton(_ref) {
13
12
  var style = _ref.style,
@@ -24,8 +23,8 @@ var DeleteButton = function DeleteButton(_ref) {
24
23
  style: style,
25
24
  onMouseEnter: onMouseEnter,
26
25
  onMouseLeave: onMouseLeave,
27
- onFocus: (0, _expValEquals.expValEquals)('platform_editor_table_a11y_eslint_fix', 'isEnabled', true) ? onMouseEnter : undefined,
28
- onBlur: (0, _expValEquals.expValEquals)('platform_editor_table_a11y_eslint_fix', 'isEnabled', true) ? onMouseLeave : undefined
26
+ onFocus: onMouseEnter,
27
+ onBlur: onMouseLeave
29
28
  }, /*#__PURE__*/_react.default.createElement("button", {
30
29
  type: "button",
31
30
  "aria-label": formatMessage(removeLabel, {
@@ -242,8 +242,8 @@ var ColumnControls = exports.ColumnControls = function ColumnControls(_ref) {
242
242
  onClick: handleClick,
243
243
  onMouseOver: handleMouseOver,
244
244
  onMouseOut: handleMouseOut,
245
- onBlur: (0, _expValEquals.expValEquals)('platform_editor_table_a11y_eslint_fix', 'isEnabled', true) ? handleMouseOut : undefined,
246
- onFocus: (0, _expValEquals.expValEquals)('platform_editor_table_a11y_eslint_fix', 'isEnabled', true) ? handleMouseOver : undefined,
245
+ onBlur: handleMouseOut,
246
+ onFocus: handleMouseOver,
247
247
  toggleDragMenu: toggleDragMenuHandler,
248
248
  editorView: editorView
249
249
  }));
@@ -120,9 +120,9 @@ var NumberColumn = exports.default = /*#__PURE__*/function (_Component) {
120
120
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
121
121
  ,
122
122
  style: _this2.getCellStyles(index, rowHeight),
123
- onFocus: (0, _expValEquals.expValEquals)('platform_editor_table_a11y_eslint_fix', 'isEnabled', true) ? function () {
123
+ onFocus: function onFocus() {
124
124
  return updateCellHoverLocation(index);
125
- } : undefined,
125
+ },
126
126
  onMouseOver: function onMouseOver() {
127
127
  return updateCellHoverLocation(index);
128
128
  }
@@ -237,8 +237,8 @@ var DragControls = exports.DragControls = function DragControls(_ref) {
237
237
  onClick: handleClick,
238
238
  onMouseOver: handleMouseOver,
239
239
  onMouseOut: handleMouseOut,
240
- onBlur: (0, _expValEquals.expValEquals)('platform_editor_table_a11y_eslint_fix', 'isEnabled', true) ? handleMouseOut : undefined,
241
- onFocus: (0, _expValEquals.expValEquals)('platform_editor_table_a11y_eslint_fix', 'isEnabled', true) ? handleMouseOver : undefined,
240
+ onBlur: handleMouseOut,
241
+ onFocus: handleMouseOver,
242
242
  toggleDragMenu: toggleDragMenuHandler,
243
243
  editorView: editorView
244
244
  }));
@@ -273,12 +273,8 @@ const DragHandleComponent = ({
273
273
  setIsHovered(false);
274
274
  onMouseOut && onMouseOut(e);
275
275
  },
276
- onFocus: expValEquals('platform_editor_table_a11y_eslint_fix', 'isEnabled', true) ? e => {
277
- onFocus && onFocus(e);
278
- } : undefined,
279
- onBlur: expValEquals('platform_editor_table_a11y_eslint_fix', 'isEnabled', true) ? e => {
280
- onBlur && onBlur(e);
281
- } : undefined,
276
+ onFocus: onFocus,
277
+ onBlur: onBlur,
282
278
  onMouseUp: e => {
283
279
  // return focus to editor so copying table selections whilst still works, i cannot call e.preventDefault in a mousemove event as this stops dragstart events from firing
284
280
  // -> this is bad for a11y but is the current standard new copy/paste keyboard shortcuts should be introduced instead
@@ -1,6 +1,5 @@
1
1
  import React from 'react';
2
2
  import { injectIntl } from 'react-intl';
3
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
4
3
  import { TableCssClassName as ClassName } from '../../types';
5
4
  const DeleteButton = ({
6
5
  style,
@@ -19,8 +18,8 @@ const DeleteButton = ({
19
18
  style: style,
20
19
  onMouseEnter: onMouseEnter,
21
20
  onMouseLeave: onMouseLeave,
22
- onFocus: expValEquals('platform_editor_table_a11y_eslint_fix', 'isEnabled', true) ? onMouseEnter : undefined,
23
- onBlur: expValEquals('platform_editor_table_a11y_eslint_fix', 'isEnabled', true) ? onMouseLeave : undefined
21
+ onFocus: onMouseEnter,
22
+ onBlur: onMouseLeave
24
23
  }, /*#__PURE__*/React.createElement("button", {
25
24
  type: "button",
26
25
  "aria-label": formatMessage(removeLabel, {
@@ -241,8 +241,8 @@ export const ColumnControls = ({
241
241
  onClick: handleClick,
242
242
  onMouseOver: handleMouseOver,
243
243
  onMouseOut: handleMouseOut,
244
- onBlur: expValEquals('platform_editor_table_a11y_eslint_fix', 'isEnabled', true) ? handleMouseOut : undefined,
245
- onFocus: expValEquals('platform_editor_table_a11y_eslint_fix', 'isEnabled', true) ? handleMouseOver : undefined,
244
+ onBlur: handleMouseOut,
245
+ onFocus: handleMouseOver,
246
246
  toggleDragMenu: toggleDragMenuHandler,
247
247
  editorView: editorView
248
248
  }));
@@ -101,7 +101,7 @@ export default class NumberColumn extends Component {
101
101
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
102
102
  ,
103
103
  style: this.getCellStyles(index, rowHeight),
104
- onFocus: expValEquals('platform_editor_table_a11y_eslint_fix', 'isEnabled', true) ? () => updateCellHoverLocation(index) : undefined,
104
+ onFocus: () => updateCellHoverLocation(index),
105
105
  onMouseOver: () => updateCellHoverLocation(index)
106
106
  }, hasHeaderRow ? index > 0 ? index : null : index + 1)));
107
107
  }
@@ -228,8 +228,8 @@ export const DragControls = ({
228
228
  onClick: handleClick,
229
229
  onMouseOver: handleMouseOver,
230
230
  onMouseOut: handleMouseOut,
231
- onBlur: expValEquals('platform_editor_table_a11y_eslint_fix', 'isEnabled', true) ? handleMouseOut : undefined,
232
- onFocus: expValEquals('platform_editor_table_a11y_eslint_fix', 'isEnabled', true) ? handleMouseOver : undefined,
231
+ onBlur: handleMouseOut,
232
+ onFocus: handleMouseOver,
233
233
  toggleDragMenu: toggleDragMenuHandler,
234
234
  editorView: editorView
235
235
  }));
@@ -270,12 +270,8 @@ var DragHandleComponent = function DragHandleComponent(_ref) {
270
270
  setIsHovered(false);
271
271
  _onMouseOut && _onMouseOut(e);
272
272
  },
273
- onFocus: expValEquals('platform_editor_table_a11y_eslint_fix', 'isEnabled', true) ? function (e) {
274
- onFocus && onFocus(e);
275
- } : undefined,
276
- onBlur: expValEquals('platform_editor_table_a11y_eslint_fix', 'isEnabled', true) ? function (e) {
277
- onBlur && onBlur(e);
278
- } : undefined,
273
+ onFocus: onFocus,
274
+ onBlur: onBlur,
279
275
  onMouseUp: function onMouseUp(e) {
280
276
  // return focus to editor so copying table selections whilst still works, i cannot call e.preventDefault in a mousemove event as this stops dragstart events from firing
281
277
  // -> this is bad for a11y but is the current standard new copy/paste keyboard shortcuts should be introduced instead
@@ -1,6 +1,5 @@
1
1
  import React from 'react';
2
2
  import { injectIntl } from 'react-intl';
3
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
4
3
  import { TableCssClassName as ClassName } from '../../types';
5
4
  var DeleteButton = function DeleteButton(_ref) {
6
5
  var style = _ref.style,
@@ -17,8 +16,8 @@ var DeleteButton = function DeleteButton(_ref) {
17
16
  style: style,
18
17
  onMouseEnter: onMouseEnter,
19
18
  onMouseLeave: onMouseLeave,
20
- onFocus: expValEquals('platform_editor_table_a11y_eslint_fix', 'isEnabled', true) ? onMouseEnter : undefined,
21
- onBlur: expValEquals('platform_editor_table_a11y_eslint_fix', 'isEnabled', true) ? onMouseLeave : undefined
19
+ onFocus: onMouseEnter,
20
+ onBlur: onMouseLeave
22
21
  }, /*#__PURE__*/React.createElement("button", {
23
22
  type: "button",
24
23
  "aria-label": formatMessage(removeLabel, {
@@ -234,8 +234,8 @@ export var ColumnControls = function ColumnControls(_ref) {
234
234
  onClick: handleClick,
235
235
  onMouseOver: handleMouseOver,
236
236
  onMouseOut: handleMouseOut,
237
- onBlur: expValEquals('platform_editor_table_a11y_eslint_fix', 'isEnabled', true) ? handleMouseOut : undefined,
238
- onFocus: expValEquals('platform_editor_table_a11y_eslint_fix', 'isEnabled', true) ? handleMouseOver : undefined,
237
+ onBlur: handleMouseOut,
238
+ onFocus: handleMouseOver,
239
239
  toggleDragMenu: toggleDragMenuHandler,
240
240
  editorView: editorView
241
241
  }));
@@ -111,9 +111,9 @@ var NumberColumn = /*#__PURE__*/function (_Component) {
111
111
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
112
112
  ,
113
113
  style: _this2.getCellStyles(index, rowHeight),
114
- onFocus: expValEquals('platform_editor_table_a11y_eslint_fix', 'isEnabled', true) ? function () {
114
+ onFocus: function onFocus() {
115
115
  return updateCellHoverLocation(index);
116
- } : undefined,
116
+ },
117
117
  onMouseOver: function onMouseOver() {
118
118
  return updateCellHoverLocation(index);
119
119
  }
@@ -228,8 +228,8 @@ export var DragControls = function DragControls(_ref) {
228
228
  onClick: handleClick,
229
229
  onMouseOver: handleMouseOver,
230
230
  onMouseOut: handleMouseOut,
231
- onBlur: expValEquals('platform_editor_table_a11y_eslint_fix', 'isEnabled', true) ? handleMouseOut : undefined,
232
- onFocus: expValEquals('platform_editor_table_a11y_eslint_fix', 'isEnabled', true) ? handleMouseOver : undefined,
231
+ onBlur: handleMouseOut,
232
+ onFocus: handleMouseOver,
233
233
  toggleDragMenu: toggleDragMenuHandler,
234
234
  editorView: editorView
235
235
  }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-table",
3
- "version": "28.1.2",
3
+ "version": "28.1.4",
4
4
  "description": "Table plugin for the @atlaskit/editor",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -29,7 +29,7 @@
29
29
  "@atlaskit/editor-plugin-batch-attribute-updates": "^16.0.0",
30
30
  "@atlaskit/editor-plugin-content-insertion": "^16.1.0",
31
31
  "@atlaskit/editor-plugin-editor-viewmode": "^18.0.0",
32
- "@atlaskit/editor-plugin-extension": "19.1.2",
32
+ "@atlaskit/editor-plugin-extension": "19.1.4",
33
33
  "@atlaskit/editor-plugin-guideline": "^16.1.0",
34
34
  "@atlaskit/editor-plugin-interaction": "^27.0.0",
35
35
  "@atlaskit/editor-plugin-limited-mode": "^13.0.0",
@@ -53,7 +53,7 @@
53
53
  "@atlaskit/pragmatic-drag-and-drop-auto-scroll": "^3.2.0",
54
54
  "@atlaskit/pragmatic-drag-and-drop-hitbox": "^2.2.0",
55
55
  "@atlaskit/primitives": "^22.5.0",
56
- "@atlaskit/tmp-editor-statsig": "^170.0.0",
56
+ "@atlaskit/tmp-editor-statsig": "^172.0.0",
57
57
  "@atlaskit/toggle": "^17.3.0",
58
58
  "@atlaskit/tokens": "^16.11.0",
59
59
  "@atlaskit/tooltip": "^24.3.0",
@@ -68,33 +68,11 @@
68
68
  "uuid": "^3.1.0"
69
69
  },
70
70
  "peerDependencies": {
71
- "@atlaskit/editor-common": "^120.10.0",
71
+ "@atlaskit/editor-common": "^120.11.0",
72
72
  "react": "^18.2.0 || ^19.2.0",
73
73
  "react-dom": "^18.2.0 || ^19.2.0",
74
74
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
75
75
  },
76
- "techstack": {
77
- "@atlassian/frontend": {
78
- "code-structure": [
79
- "editor-plugin"
80
- ],
81
- "import-structure": [
82
- "atlassian-conventions"
83
- ],
84
- "circular-dependencies": [
85
- "file-and-folder-level"
86
- ]
87
- },
88
- "@repo/internal": {
89
- "design-tokens": [
90
- "color"
91
- ],
92
- "deprecation": "no-deprecated-imports",
93
- "styling": [
94
- "emotion"
95
- ]
96
- }
97
- },
98
76
  "platform-feature-flags": {
99
77
  "platform_editor_markdown_compatible_toolbar": {
100
78
  "type": "boolean"