@atlaskit/editor-plugin-table 23.3.2 → 23.3.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 +26 -0
- package/dist/cjs/ui/FloatingContextualMenu/ContextualMenu.js +6 -2
- package/dist/es2019/ui/FloatingContextualMenu/ContextualMenu.js +6 -2
- package/dist/esm/ui/FloatingContextualMenu/ContextualMenu.js +8 -2
- package/dist/types/ui/FloatingContextualMenu/ContextualMenu.d.ts +0 -4
- package/dist/types-ts4.5/ui/FloatingContextualMenu/ContextualMenu.d.ts +0 -4
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-table
|
|
2
2
|
|
|
3
|
+
## 23.3.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`a4f97c853dccf`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a4f97c853dccf) -
|
|
8
|
+
Extend `no-module-level-eval` lint rule to cover editor experiment APIs (`expValEquals`, `expVal`,
|
|
9
|
+
`editorExperiment`, `expValEqualsNoExposure`) imported from `@atlaskit/tmp-editor-statsig`
|
|
10
|
+
subpaths. Module-level evaluation of these functions causes flakiness because experiment values
|
|
11
|
+
may not be resolved yet at import time.
|
|
12
|
+
|
|
13
|
+
Fix existing violations in `editor-plugin-block-controls` (`global-styles.tsx`) and
|
|
14
|
+
`editor-plugin-table` (`ContextualMenu.tsx`) by converting module-level experiment evaluations to
|
|
15
|
+
lazy function calls.
|
|
16
|
+
|
|
17
|
+
Clean up fully-launched experiment `platform_editor_unify_native_dnd_selectors` — replace
|
|
18
|
+
conditional selector logic with the winning `dragHandlerAnchorSelectorWithTaskExclusion` value and
|
|
19
|
+
remove the experiment from `experiments-config.ts`.
|
|
20
|
+
|
|
21
|
+
- Updated dependencies
|
|
22
|
+
|
|
23
|
+
## 23.3.3
|
|
24
|
+
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- Updated dependencies
|
|
28
|
+
|
|
3
29
|
## 23.3.2
|
|
4
30
|
|
|
5
31
|
### Patch Changes
|
|
@@ -15,6 +15,7 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits
|
|
|
15
15
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
16
16
|
var _react = _interopRequireWildcard(require("react"));
|
|
17
17
|
var _react2 = require("@emotion/react");
|
|
18
|
+
var _memoizeOne = _interopRequireDefault(require("memoize-one"));
|
|
18
19
|
var _reactIntl = require("react-intl");
|
|
19
20
|
var _customSteps = require("@atlaskit/custom-steps");
|
|
20
21
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
@@ -59,7 +60,6 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
59
60
|
* @jsxRuntime classic
|
|
60
61
|
* @jsx jsx
|
|
61
62
|
*/ /* eslint-disable @typescript-eslint/consistent-type-imports, @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766; jsx required at runtime for @jsxRuntime classic */ // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
62
|
-
var arrowsList = new Set(!(0, _expValEquals.expValEquals)('platform_editor_toolbar_submenu_open_click', 'isEnabled', true) ? ['ArrowRight', 'ArrowLeft'] : ['ArrowRight']);
|
|
63
63
|
var dropdownMenuSection = {
|
|
64
64
|
hasSeparator: true
|
|
65
65
|
};
|
|
@@ -67,6 +67,10 @@ var elementBeforeIconStyles = (0, _primitives.xcss)({
|
|
|
67
67
|
marginRight: 'space.negative.075',
|
|
68
68
|
display: 'flex'
|
|
69
69
|
});
|
|
70
|
+
var getArrowsList = (0, _memoizeOne.default)(function () {
|
|
71
|
+
return new Set(!(0, _expValEquals.expValEquals)('platform_editor_toolbar_submenu_open_click', 'isEnabled', true) ? ['ArrowRight', 'ArrowLeft'] : ['ArrowRight']);
|
|
72
|
+
});
|
|
73
|
+
|
|
70
74
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
71
75
|
var ContextualMenu = exports.ContextualMenu = /*#__PURE__*/function (_Component) {
|
|
72
76
|
function ContextualMenu() {
|
|
@@ -569,7 +573,7 @@ var ContextualMenu = exports.ContextualMenu = /*#__PURE__*/function (_Component)
|
|
|
569
573
|
var event = payload.event;
|
|
570
574
|
if (event && event instanceof KeyboardEvent) {
|
|
571
575
|
if (!_this.state.isSubmenuOpen) {
|
|
572
|
-
if (
|
|
576
|
+
if (getArrowsList().has(event.key)) {
|
|
573
577
|
// preventing default behavior for avoiding cursor jump to next/previous table column
|
|
574
578
|
// when left/right arrow pressed.
|
|
575
579
|
event.preventDefault();
|
|
@@ -4,9 +4,12 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
4
4
|
* @jsxRuntime classic
|
|
5
5
|
* @jsx jsx
|
|
6
6
|
*/
|
|
7
|
+
|
|
7
8
|
import React, { Component } from 'react';
|
|
9
|
+
|
|
8
10
|
/* eslint-disable @typescript-eslint/consistent-type-imports, @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766; jsx required at runtime for @jsxRuntime classic */
|
|
9
11
|
import { jsx } from '@emotion/react';
|
|
12
|
+
import memoizeOne from 'memoize-one';
|
|
10
13
|
import { injectIntl } from 'react-intl';
|
|
11
14
|
import { TableSortOrder as SortOrder } from '@atlaskit/custom-steps';
|
|
12
15
|
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
@@ -44,7 +47,6 @@ import { getMergedCellsPositions } from '../../pm-plugins/utils/table';
|
|
|
44
47
|
import { TableCssClassName as ClassName } from '../../types';
|
|
45
48
|
import { colorPalletteColumns, contextualMenuDropdownWidthDnD } from '../consts';
|
|
46
49
|
import { cellColourPreviewStyles } from './styles';
|
|
47
|
-
const arrowsList = new Set(!expValEquals('platform_editor_toolbar_submenu_open_click', 'isEnabled', true) ? ['ArrowRight', 'ArrowLeft'] : ['ArrowRight']);
|
|
48
50
|
const dropdownMenuSection = {
|
|
49
51
|
hasSeparator: true
|
|
50
52
|
};
|
|
@@ -52,6 +54,8 @@ const elementBeforeIconStyles = xcss({
|
|
|
52
54
|
marginRight: 'space.negative.075',
|
|
53
55
|
display: 'flex'
|
|
54
56
|
});
|
|
57
|
+
const getArrowsList = memoizeOne(() => new Set(!expValEquals('platform_editor_toolbar_submenu_open_click', 'isEnabled', true) ? ['ArrowRight', 'ArrowLeft'] : ['ArrowRight']));
|
|
58
|
+
|
|
55
59
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
56
60
|
export class ContextualMenu extends Component {
|
|
57
61
|
constructor(...args) {
|
|
@@ -605,7 +609,7 @@ export class ContextualMenu extends Component {
|
|
|
605
609
|
} = payload;
|
|
606
610
|
if (event && event instanceof KeyboardEvent) {
|
|
607
611
|
if (!this.state.isSubmenuOpen) {
|
|
608
|
-
if (
|
|
612
|
+
if (getArrowsList().has(event.key)) {
|
|
609
613
|
// preventing default behavior for avoiding cursor jump to next/previous table column
|
|
610
614
|
// when left/right arrow pressed.
|
|
611
615
|
event.preventDefault();
|
|
@@ -14,9 +14,12 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
14
14
|
* @jsxRuntime classic
|
|
15
15
|
* @jsx jsx
|
|
16
16
|
*/
|
|
17
|
+
|
|
17
18
|
import React, { Component } from 'react';
|
|
19
|
+
|
|
18
20
|
/* eslint-disable @typescript-eslint/consistent-type-imports, @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766; jsx required at runtime for @jsxRuntime classic */
|
|
19
21
|
import { jsx } from '@emotion/react';
|
|
22
|
+
import memoizeOne from 'memoize-one';
|
|
20
23
|
import { injectIntl } from 'react-intl';
|
|
21
24
|
import { TableSortOrder as SortOrder } from '@atlaskit/custom-steps';
|
|
22
25
|
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
@@ -54,7 +57,6 @@ import { getMergedCellsPositions } from '../../pm-plugins/utils/table';
|
|
|
54
57
|
import { TableCssClassName as ClassName } from '../../types';
|
|
55
58
|
import { colorPalletteColumns, contextualMenuDropdownWidthDnD } from '../consts';
|
|
56
59
|
import { cellColourPreviewStyles } from './styles';
|
|
57
|
-
var arrowsList = new Set(!expValEquals('platform_editor_toolbar_submenu_open_click', 'isEnabled', true) ? ['ArrowRight', 'ArrowLeft'] : ['ArrowRight']);
|
|
58
60
|
var dropdownMenuSection = {
|
|
59
61
|
hasSeparator: true
|
|
60
62
|
};
|
|
@@ -62,6 +64,10 @@ var elementBeforeIconStyles = xcss({
|
|
|
62
64
|
marginRight: 'space.negative.075',
|
|
63
65
|
display: 'flex'
|
|
64
66
|
});
|
|
67
|
+
var getArrowsList = memoizeOne(function () {
|
|
68
|
+
return new Set(!expValEquals('platform_editor_toolbar_submenu_open_click', 'isEnabled', true) ? ['ArrowRight', 'ArrowLeft'] : ['ArrowRight']);
|
|
69
|
+
});
|
|
70
|
+
|
|
65
71
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
66
72
|
export var ContextualMenu = /*#__PURE__*/function (_Component) {
|
|
67
73
|
function ContextualMenu() {
|
|
@@ -564,7 +570,7 @@ export var ContextualMenu = /*#__PURE__*/function (_Component) {
|
|
|
564
570
|
var event = payload.event;
|
|
565
571
|
if (event && event instanceof KeyboardEvent) {
|
|
566
572
|
if (!_this.state.isSubmenuOpen) {
|
|
567
|
-
if (
|
|
573
|
+
if (getArrowsList().has(event.key)) {
|
|
568
574
|
// preventing default behavior for avoiding cursor jump to next/previous table column
|
|
569
575
|
// when left/right arrow pressed.
|
|
570
576
|
event.preventDefault();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-table",
|
|
3
|
-
"version": "23.3.
|
|
3
|
+
"version": "23.3.4",
|
|
4
4
|
"description": "Table plugin for the @atlaskit/editor",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@atlaskit/editor-plugin-batch-attribute-updates": "^11.0.0",
|
|
38
38
|
"@atlaskit/editor-plugin-content-insertion": "^11.0.0",
|
|
39
39
|
"@atlaskit/editor-plugin-editor-viewmode": "^13.0.0",
|
|
40
|
-
"@atlaskit/editor-plugin-extension": "14.1.
|
|
40
|
+
"@atlaskit/editor-plugin-extension": "14.1.4",
|
|
41
41
|
"@atlaskit/editor-plugin-guideline": "^11.0.0",
|
|
42
42
|
"@atlaskit/editor-plugin-interaction": "^20.0.0",
|
|
43
43
|
"@atlaskit/editor-plugin-limited-mode": "^8.0.0",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"@atlaskit/pragmatic-drag-and-drop-auto-scroll": "^2.1.0",
|
|
61
61
|
"@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.2.0",
|
|
62
62
|
"@atlaskit/primitives": "^19.0.0",
|
|
63
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
63
|
+
"@atlaskit/tmp-editor-statsig": "^93.0.0",
|
|
64
64
|
"@atlaskit/toggle": "^16.1.0",
|
|
65
65
|
"@atlaskit/tokens": "^13.3.0",
|
|
66
66
|
"@atlaskit/tooltip": "^22.6.0",
|