@atlaskit/editor-plugin-table 7.21.3 → 7.21.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 +8 -0
- package/dist/cjs/nodeviews/TableComponent.js +17 -2
- package/dist/cjs/pm-plugins/main.js +1 -1
- package/dist/cjs/toolbar.js +4 -1
- package/dist/cjs/ui/ColumnResizeWidget/index.js +4 -1
- package/dist/cjs/ui/FloatingAlignmentButtons/FloatingAlignmentButtons.js +4 -1
- package/dist/cjs/ui/FloatingContextualButton/index.js +4 -1
- package/dist/cjs/ui/FloatingContextualMenu/ContextualMenu.js +4 -1
- package/dist/cjs/ui/FloatingContextualMenu/index.js +4 -1
- package/dist/cjs/ui/FloatingDragMenu/DragMenu.js +4 -1
- package/dist/es2019/nodeviews/TableComponent.js +17 -2
- package/dist/es2019/pm-plugins/main.js +1 -1
- package/dist/es2019/toolbar.js +4 -1
- package/dist/es2019/ui/ColumnResizeWidget/index.js +4 -1
- package/dist/es2019/ui/FloatingAlignmentButtons/FloatingAlignmentButtons.js +4 -1
- package/dist/es2019/ui/FloatingContextualButton/index.js +4 -1
- package/dist/es2019/ui/FloatingContextualMenu/ContextualMenu.js +4 -1
- package/dist/es2019/ui/FloatingContextualMenu/index.js +4 -1
- package/dist/es2019/ui/FloatingDragMenu/DragMenu.js +4 -1
- package/dist/esm/nodeviews/TableComponent.js +17 -2
- package/dist/esm/pm-plugins/main.js +1 -1
- package/dist/esm/toolbar.js +4 -1
- package/dist/esm/ui/ColumnResizeWidget/index.js +4 -1
- package/dist/esm/ui/FloatingAlignmentButtons/FloatingAlignmentButtons.js +4 -1
- package/dist/esm/ui/FloatingContextualButton/index.js +4 -1
- package/dist/esm/ui/FloatingContextualMenu/ContextualMenu.js +4 -1
- package/dist/esm/ui/FloatingContextualMenu/index.js +4 -1
- package/dist/esm/ui/FloatingDragMenu/DragMenu.js +4 -1
- package/dist/types/ui/ColumnResizeWidget/index.d.ts +4 -1
- package/dist/types/ui/FloatingAlignmentButtons/FloatingAlignmentButtons.d.ts +4 -1
- package/dist/types/ui/FloatingContextualMenu/ContextualMenu.d.ts +4 -1
- package/dist/types/ui/FloatingContextualMenu/index.d.ts +4 -1
- package/dist/types/ui/FloatingDragMenu/DragMenu.d.ts +4 -1
- package/dist/types-ts4.5/ui/ColumnResizeWidget/index.d.ts +4 -1
- package/dist/types-ts4.5/ui/FloatingAlignmentButtons/FloatingAlignmentButtons.d.ts +4 -1
- package/dist/types-ts4.5/ui/FloatingContextualMenu/ContextualMenu.d.ts +4 -1
- package/dist/types-ts4.5/ui/FloatingContextualMenu/index.d.ts +4 -1
- package/dist/types-ts4.5/ui/FloatingDragMenu/DragMenu.d.ts +4 -1
- package/package.json +6 -3
- package/src/nodeviews/TableComponent.tsx +14 -0
- package/src/pm-plugins/main.ts +3 -1
- package/src/toolbar.tsx +4 -1
- package/src/ui/ColumnResizeWidget/index.tsx +4 -1
- package/src/ui/FloatingAlignmentButtons/FloatingAlignmentButtons.tsx +4 -1
- package/src/ui/FloatingContextualButton/index.tsx +4 -1
- package/src/ui/FloatingContextualMenu/ContextualMenu.tsx +4 -1
- package/src/ui/FloatingContextualMenu/index.tsx +4 -1
- package/src/ui/FloatingDragMenu/DragMenu.tsx +4 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-table
|
|
2
2
|
|
|
3
|
+
## 7.21.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#122264](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/122264)
|
|
8
|
+
[`257d7e96264e0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/257d7e96264e0) -
|
|
9
|
+
[ux] Fix table column delete decorations showing when expected in React 18.
|
|
10
|
+
|
|
3
11
|
## 7.21.3
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -28,6 +28,7 @@ var _utils2 = require("@atlaskit/editor-tables/utils");
|
|
|
28
28
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
29
29
|
var _combine = require("@atlaskit/pragmatic-drag-and-drop/combine");
|
|
30
30
|
var _commands = require("../commands");
|
|
31
|
+
var _eventHandlers = require("../event-handlers");
|
|
31
32
|
var _utils3 = require("../pm-plugins/drag-and-drop/utils");
|
|
32
33
|
var _pluginFactory = require("../pm-plugins/plugin-factory");
|
|
33
34
|
var _stickyHeaders = require("../pm-plugins/sticky-headers");
|
|
@@ -74,6 +75,12 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
74
75
|
scroll: 0,
|
|
75
76
|
parentWidth: undefined
|
|
76
77
|
}, (0, _defineProperty3.default)(_defineProperty2, _types.ShadowEvent.SHOW_BEFORE_SHADOW, false), (0, _defineProperty3.default)(_defineProperty2, _types.ShadowEvent.SHOW_AFTER_SHADOW, false), (0, _defineProperty3.default)(_defineProperty2, "tableWrapperWidth", undefined), (0, _defineProperty3.default)(_defineProperty2, "tableWrapperHeight", undefined), _defineProperty2));
|
|
78
|
+
(0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "handleMouseOut", function (event) {
|
|
79
|
+
if (!(0, _eventHandlers.isTableInFocus)(_this.props.view)) {
|
|
80
|
+
return false;
|
|
81
|
+
}
|
|
82
|
+
return (0, _eventHandlers.handleMouseOut)(_this.props.view, event);
|
|
83
|
+
});
|
|
77
84
|
(0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "handleMouseEnter", function () {
|
|
78
85
|
var node = _this.props.getNode();
|
|
79
86
|
var pos = _this.props.getPos();
|
|
@@ -364,6 +371,10 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
364
371
|
this === null || this === void 0 || (_this$table = this.table) === null || _this$table === void 0 || _this$table.addEventListener('mouseenter', this.handleMouseEnter);
|
|
365
372
|
}
|
|
366
373
|
}
|
|
374
|
+
if ((0, _platformFeatureFlags.fg)('editor_react_18_fix_table_delete_col_decorations')) {
|
|
375
|
+
var _this$table2;
|
|
376
|
+
this === null || this === void 0 || (_this$table2 = this.table) === null || _this$table2 === void 0 || _this$table2.addEventListener('mouseout', this.handleMouseOut);
|
|
377
|
+
}
|
|
367
378
|
var _getEditorFeatureFlag = getEditorFeatureFlags(),
|
|
368
379
|
_getEditorFeatureFlag2 = _getEditorFeatureFlag.tableWithFixedColumnWidthsOption,
|
|
369
380
|
tableWithFixedColumnWidthsOption = _getEditorFeatureFlag2 === void 0 ? false : _getEditorFeatureFlag2,
|
|
@@ -445,8 +456,12 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
445
456
|
window.removeEventListener('resize', this.handleWindowResizeDebounced);
|
|
446
457
|
}
|
|
447
458
|
if ((0, _platformFeatureFlags.fg)('platform.editor.table.live-pages-sorting_4malx')) {
|
|
448
|
-
var _this$
|
|
449
|
-
this === null || this === void 0 || (_this$
|
|
459
|
+
var _this$table3;
|
|
460
|
+
this === null || this === void 0 || (_this$table3 = this.table) === null || _this$table3 === void 0 || _this$table3.removeEventListener('mouseenter', this.handleMouseEnter);
|
|
461
|
+
}
|
|
462
|
+
if ((0, _platformFeatureFlags.fg)('editor_react_18_fix_table_delete_col_decorations')) {
|
|
463
|
+
var _this$table4;
|
|
464
|
+
this === null || this === void 0 || (_this$table4 = this.table) === null || _this$table4 === void 0 || _this$table4.removeEventListener('mouseout', this.handleMouseOut);
|
|
450
465
|
}
|
|
451
466
|
if (this.overflowShadowsObserver) {
|
|
452
467
|
this.overflowShadowsObserver.dispose();
|
|
@@ -282,7 +282,7 @@ var createPlugin = exports.createPlugin = function createPlugin(dispatchAnalytic
|
|
|
282
282
|
mousedown: (0, _eventHandlers.withCellTracking)(_eventHandlers.handleMouseDown),
|
|
283
283
|
mouseover: (0, _eventHandlers.withCellTracking)((0, _eventHandlers.whenTableInFocus)(_eventHandlers.handleMouseOver)),
|
|
284
284
|
mouseleave: _eventHandlers.handleMouseLeave,
|
|
285
|
-
mouseout: (0, _eventHandlers.whenTableInFocus)(_eventHandlers.handleMouseOut),
|
|
285
|
+
mouseout: (0, _platformFeatureFlags.fg)('editor_react_18_fix_table_delete_col_decorations') ? undefined : (0, _eventHandlers.whenTableInFocus)(_eventHandlers.handleMouseOut),
|
|
286
286
|
mousemove: (0, _eventHandlers.whenTableInFocus)(_eventHandlers.handleMouseMove),
|
|
287
287
|
mouseenter: _eventHandlers.handleMouseEnter,
|
|
288
288
|
mouseup: (0, _eventHandlers.whenTableInFocus)(_eventHandlers.handleMouseUp),
|
package/dist/cjs/toolbar.js
CHANGED
|
@@ -42,7 +42,10 @@ var _alignment = require("./utils/alignment");
|
|
|
42
42
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
43
43
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
44
44
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
45
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } /**
|
|
45
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } /**
|
|
46
|
+
* @jsxRuntime classic
|
|
47
|
+
* @jsx jsx
|
|
48
|
+
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
46
49
|
var getToolbarMenuConfig = exports.getToolbarMenuConfig = function getToolbarMenuConfig(config, state, _ref, editorAnalyticsAPI) {
|
|
47
50
|
var formatMessage = _ref.formatMessage;
|
|
48
51
|
var isTableScalingWithFixedColumnWidthsOptionShown = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
|
|
@@ -12,7 +12,10 @@ var _keymaps = require("@atlaskit/editor-common/keymaps");
|
|
|
12
12
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
13
13
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
14
14
|
var _types = require("../../types");
|
|
15
|
-
/**
|
|
15
|
+
/**
|
|
16
|
+
* @jsxRuntime classic
|
|
17
|
+
* @jsx jsx
|
|
18
|
+
*/
|
|
16
19
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
17
20
|
|
|
18
21
|
var ColumnResizeWidget = exports.ColumnResizeWidget = function ColumnResizeWidget(_ref) {
|
|
@@ -8,7 +8,10 @@ var _react = require("@emotion/react");
|
|
|
8
8
|
var _button = require("@atlaskit/button");
|
|
9
9
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
10
10
|
var _primitives = require("@atlaskit/primitives");
|
|
11
|
-
/**
|
|
11
|
+
/**
|
|
12
|
+
* @jsxRuntime classic
|
|
13
|
+
* @jsx jsx
|
|
14
|
+
*/
|
|
12
15
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
13
16
|
|
|
14
17
|
var containerStyles = (0, _primitives.xcss)({
|
|
@@ -25,7 +25,10 @@ var _FixedButton = _interopRequireDefault(require("./FixedButton"));
|
|
|
25
25
|
var _styles = require("./styles");
|
|
26
26
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
27
27
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
28
|
-
/**
|
|
28
|
+
/**
|
|
29
|
+
* @jsxRuntime classic
|
|
30
|
+
* @jsx jsx
|
|
31
|
+
*/
|
|
29
32
|
|
|
30
33
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
31
34
|
|
|
@@ -48,7 +48,10 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
|
|
|
48
48
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
49
49
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
50
50
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
51
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /* eslint-disable @atlaskit/design-system/prefer-primitives */ /**
|
|
51
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /* eslint-disable @atlaskit/design-system/prefer-primitives */ /**
|
|
52
|
+
* @jsxRuntime classic
|
|
53
|
+
* @jsx jsx
|
|
54
|
+
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
52
55
|
var arrowsList = new Set(['ArrowRight', 'ArrowLeft']);
|
|
53
56
|
var ContextualMenu = exports.ContextualMenu = /*#__PURE__*/function (_Component) {
|
|
54
57
|
(0, _inherits2.default)(ContextualMenu, _Component);
|
|
@@ -14,7 +14,10 @@ var _pluginFactory = require("../../pm-plugins/plugin-factory");
|
|
|
14
14
|
var _consts = require("../consts");
|
|
15
15
|
var _ContextualMenu = _interopRequireDefault(require("./ContextualMenu"));
|
|
16
16
|
var _styles = require("./styles");
|
|
17
|
-
/**
|
|
17
|
+
/**
|
|
18
|
+
* @jsxRuntime classic
|
|
19
|
+
* @jsx jsx
|
|
20
|
+
*/
|
|
18
21
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
19
22
|
|
|
20
23
|
var FloatingContextualMenu = function FloatingContextualMenu(_ref) {
|
|
@@ -38,7 +38,10 @@ var _styles2 = require("./styles");
|
|
|
38
38
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
39
39
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
40
40
|
/* eslint-disable @atlaskit/design-system/prefer-primitives */
|
|
41
|
-
/**
|
|
41
|
+
/**
|
|
42
|
+
* @jsxRuntime classic
|
|
43
|
+
* @jsx jsx
|
|
44
|
+
*/
|
|
42
45
|
/** @jsxFrag */
|
|
43
46
|
|
|
44
47
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
@@ -14,6 +14,7 @@ import { findTable, isTableSelected } from '@atlaskit/editor-tables/utils';
|
|
|
14
14
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
15
15
|
import { combine } from '@atlaskit/pragmatic-drag-and-drop/combine';
|
|
16
16
|
import { autoSizeTable, clearHoverSelection } from '../commands';
|
|
17
|
+
import { handleMouseOut, isTableInFocus } from '../event-handlers';
|
|
17
18
|
import { autoScrollerFactory } from '../pm-plugins/drag-and-drop/utils';
|
|
18
19
|
import { getPluginState } from '../pm-plugins/plugin-factory';
|
|
19
20
|
import { findStickyHeaderForTable, pluginKey as stickyHeadersPluginKey } from '../pm-plugins/sticky-headers';
|
|
@@ -52,6 +53,12 @@ class TableComponent extends React.Component {
|
|
|
52
53
|
tableWrapperWidth: undefined,
|
|
53
54
|
tableWrapperHeight: undefined
|
|
54
55
|
});
|
|
56
|
+
_defineProperty(this, "handleMouseOut", event => {
|
|
57
|
+
if (!isTableInFocus(this.props.view)) {
|
|
58
|
+
return false;
|
|
59
|
+
}
|
|
60
|
+
return handleMouseOut(this.props.view, event);
|
|
61
|
+
});
|
|
55
62
|
_defineProperty(this, "handleMouseEnter", () => {
|
|
56
63
|
const node = this.props.getNode();
|
|
57
64
|
const pos = this.props.getPos();
|
|
@@ -348,6 +355,10 @@ class TableComponent extends React.Component {
|
|
|
348
355
|
this === null || this === void 0 ? void 0 : (_this$table = this.table) === null || _this$table === void 0 ? void 0 : _this$table.addEventListener('mouseenter', this.handleMouseEnter);
|
|
349
356
|
}
|
|
350
357
|
}
|
|
358
|
+
if (fg('editor_react_18_fix_table_delete_col_decorations')) {
|
|
359
|
+
var _this$table2;
|
|
360
|
+
this === null || this === void 0 ? void 0 : (_this$table2 = this.table) === null || _this$table2 === void 0 ? void 0 : _this$table2.addEventListener('mouseout', this.handleMouseOut);
|
|
361
|
+
}
|
|
351
362
|
const {
|
|
352
363
|
tableWithFixedColumnWidthsOption = false,
|
|
353
364
|
stickyScrollbar
|
|
@@ -429,8 +440,12 @@ class TableComponent extends React.Component {
|
|
|
429
440
|
window.removeEventListener('resize', this.handleWindowResizeDebounced);
|
|
430
441
|
}
|
|
431
442
|
if (fg('platform.editor.table.live-pages-sorting_4malx')) {
|
|
432
|
-
var _this$
|
|
433
|
-
this === null || this === void 0 ? void 0 : (_this$
|
|
443
|
+
var _this$table3;
|
|
444
|
+
this === null || this === void 0 ? void 0 : (_this$table3 = this.table) === null || _this$table3 === void 0 ? void 0 : _this$table3.removeEventListener('mouseenter', this.handleMouseEnter);
|
|
445
|
+
}
|
|
446
|
+
if (fg('editor_react_18_fix_table_delete_col_decorations')) {
|
|
447
|
+
var _this$table4;
|
|
448
|
+
this === null || this === void 0 ? void 0 : (_this$table4 = this.table) === null || _this$table4 === void 0 ? void 0 : _this$table4.removeEventListener('mouseout', this.handleMouseOut);
|
|
434
449
|
}
|
|
435
450
|
if (this.overflowShadowsObserver) {
|
|
436
451
|
this.overflowShadowsObserver.dispose();
|
|
@@ -280,7 +280,7 @@ export const createPlugin = (dispatchAnalyticsEvent, dispatch, portalProviderAPI
|
|
|
280
280
|
mousedown: withCellTracking(handleMouseDown),
|
|
281
281
|
mouseover: withCellTracking(whenTableInFocus(handleMouseOver)),
|
|
282
282
|
mouseleave: handleMouseLeave,
|
|
283
|
-
mouseout: whenTableInFocus(handleMouseOut),
|
|
283
|
+
mouseout: fg('editor_react_18_fix_table_delete_col_decorations') ? undefined : whenTableInFocus(handleMouseOut),
|
|
284
284
|
mousemove: whenTableInFocus(handleMouseMove),
|
|
285
285
|
mouseenter: handleMouseEnter,
|
|
286
286
|
mouseup: whenTableInFocus(handleMouseUp),
|
package/dist/es2019/toolbar.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* @jsxRuntime classic
|
|
4
|
+
* @jsx jsx
|
|
5
|
+
*/
|
|
3
6
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
4
7
|
import { jsx } from '@emotion/react';
|
|
5
8
|
import { TableSortOrder as SortOrder } from '@atlaskit/custom-steps';
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* @jsxRuntime classic
|
|
4
|
+
* @jsx jsx
|
|
5
|
+
*/
|
|
3
6
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
4
7
|
import { jsx } from '@emotion/react';
|
|
5
8
|
import { useIntl } from 'react-intl-next';
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
/* eslint-disable @atlaskit/design-system/prefer-primitives */
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* @jsxRuntime classic
|
|
5
|
+
* @jsx jsx
|
|
6
|
+
*/
|
|
4
7
|
import React, { Component } from 'react';
|
|
5
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
9
|
import { jsx } from '@emotion/react';
|
|
@@ -28,6 +28,7 @@ import { findTable, isTableSelected } from '@atlaskit/editor-tables/utils';
|
|
|
28
28
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
29
29
|
import { combine } from '@atlaskit/pragmatic-drag-and-drop/combine';
|
|
30
30
|
import { autoSizeTable, clearHoverSelection } from '../commands';
|
|
31
|
+
import { handleMouseOut, isTableInFocus } from '../event-handlers';
|
|
31
32
|
import { autoScrollerFactory } from '../pm-plugins/drag-and-drop/utils';
|
|
32
33
|
import { getPluginState } from '../pm-plugins/plugin-factory';
|
|
33
34
|
import { findStickyHeaderForTable, pluginKey as stickyHeadersPluginKey } from '../pm-plugins/sticky-headers';
|
|
@@ -67,6 +68,12 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
67
68
|
scroll: 0,
|
|
68
69
|
parentWidth: undefined
|
|
69
70
|
}, _defineProperty(_defineProperty2, ShadowEvent.SHOW_BEFORE_SHADOW, false), _defineProperty(_defineProperty2, ShadowEvent.SHOW_AFTER_SHADOW, false), _defineProperty(_defineProperty2, "tableWrapperWidth", undefined), _defineProperty(_defineProperty2, "tableWrapperHeight", undefined), _defineProperty2));
|
|
71
|
+
_defineProperty(_assertThisInitialized(_this), "handleMouseOut", function (event) {
|
|
72
|
+
if (!isTableInFocus(_this.props.view)) {
|
|
73
|
+
return false;
|
|
74
|
+
}
|
|
75
|
+
return handleMouseOut(_this.props.view, event);
|
|
76
|
+
});
|
|
70
77
|
_defineProperty(_assertThisInitialized(_this), "handleMouseEnter", function () {
|
|
71
78
|
var node = _this.props.getNode();
|
|
72
79
|
var pos = _this.props.getPos();
|
|
@@ -357,6 +364,10 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
357
364
|
this === null || this === void 0 || (_this$table = this.table) === null || _this$table === void 0 || _this$table.addEventListener('mouseenter', this.handleMouseEnter);
|
|
358
365
|
}
|
|
359
366
|
}
|
|
367
|
+
if (fg('editor_react_18_fix_table_delete_col_decorations')) {
|
|
368
|
+
var _this$table2;
|
|
369
|
+
this === null || this === void 0 || (_this$table2 = this.table) === null || _this$table2 === void 0 || _this$table2.addEventListener('mouseout', this.handleMouseOut);
|
|
370
|
+
}
|
|
360
371
|
var _getEditorFeatureFlag = getEditorFeatureFlags(),
|
|
361
372
|
_getEditorFeatureFlag2 = _getEditorFeatureFlag.tableWithFixedColumnWidthsOption,
|
|
362
373
|
tableWithFixedColumnWidthsOption = _getEditorFeatureFlag2 === void 0 ? false : _getEditorFeatureFlag2,
|
|
@@ -438,8 +449,12 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
438
449
|
window.removeEventListener('resize', this.handleWindowResizeDebounced);
|
|
439
450
|
}
|
|
440
451
|
if (fg('platform.editor.table.live-pages-sorting_4malx')) {
|
|
441
|
-
var _this$
|
|
442
|
-
this === null || this === void 0 || (_this$
|
|
452
|
+
var _this$table3;
|
|
453
|
+
this === null || this === void 0 || (_this$table3 = this.table) === null || _this$table3 === void 0 || _this$table3.removeEventListener('mouseenter', this.handleMouseEnter);
|
|
454
|
+
}
|
|
455
|
+
if (fg('editor_react_18_fix_table_delete_col_decorations')) {
|
|
456
|
+
var _this$table4;
|
|
457
|
+
this === null || this === void 0 || (_this$table4 = this.table) === null || _this$table4 === void 0 || _this$table4.removeEventListener('mouseout', this.handleMouseOut);
|
|
443
458
|
}
|
|
444
459
|
if (this.overflowShadowsObserver) {
|
|
445
460
|
this.overflowShadowsObserver.dispose();
|
|
@@ -275,7 +275,7 @@ export var createPlugin = function createPlugin(dispatchAnalyticsEvent, dispatch
|
|
|
275
275
|
mousedown: withCellTracking(handleMouseDown),
|
|
276
276
|
mouseover: withCellTracking(whenTableInFocus(handleMouseOver)),
|
|
277
277
|
mouseleave: handleMouseLeave,
|
|
278
|
-
mouseout: whenTableInFocus(handleMouseOut),
|
|
278
|
+
mouseout: fg('editor_react_18_fix_table_delete_col_decorations') ? undefined : whenTableInFocus(handleMouseOut),
|
|
279
279
|
mousemove: whenTableInFocus(handleMouseMove),
|
|
280
280
|
mouseenter: handleMouseEnter,
|
|
281
281
|
mouseup: whenTableInFocus(handleMouseUp),
|
package/dist/esm/toolbar.js
CHANGED
|
@@ -3,7 +3,10 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
3
3
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
4
4
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5
5
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
6
|
-
/**
|
|
6
|
+
/**
|
|
7
|
+
* @jsxRuntime classic
|
|
8
|
+
* @jsx jsx
|
|
9
|
+
*/
|
|
7
10
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
11
|
import { jsx } from '@emotion/react';
|
|
9
12
|
import { TableSortOrder as SortOrder } from '@atlaskit/custom-steps';
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* @jsxRuntime classic
|
|
4
|
+
* @jsx jsx
|
|
5
|
+
*/
|
|
3
6
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
4
7
|
import { jsx } from '@emotion/react';
|
|
5
8
|
import { useIntl } from 'react-intl-next';
|
|
@@ -11,7 +11,10 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
11
11
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
12
12
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
13
13
|
/* eslint-disable @atlaskit/design-system/prefer-primitives */
|
|
14
|
-
/**
|
|
14
|
+
/**
|
|
15
|
+
* @jsxRuntime classic
|
|
16
|
+
* @jsx jsx
|
|
17
|
+
*/
|
|
15
18
|
import React, { Component } from 'react';
|
|
16
19
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
17
20
|
import { jsx } from '@emotion/react';
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
2
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
3
3
|
/* eslint-disable @atlaskit/design-system/prefer-primitives */
|
|
4
|
-
/**
|
|
4
|
+
/**
|
|
5
|
+
* @jsxRuntime classic
|
|
6
|
+
* @jsx jsx
|
|
7
|
+
*/
|
|
5
8
|
/** @jsxFrag */
|
|
6
9
|
import React, { useEffect, useState } from 'react';
|
|
7
10
|
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
2
5
|
import { jsx } from '@emotion/react';
|
|
3
6
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
4
7
|
import type { GetEditorContainerWidth, GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
2
5
|
import { jsx } from '@emotion/react';
|
|
3
6
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
4
7
|
import type { GetEditorContainerWidth, GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-table",
|
|
3
|
-
"version": "7.21.
|
|
3
|
+
"version": "7.21.4",
|
|
4
4
|
"description": "Table plugin for the @atlaskit/editor",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@atlaskit/adf-schema": "^39.0.3",
|
|
32
32
|
"@atlaskit/button": "^19.0.0",
|
|
33
33
|
"@atlaskit/custom-steps": "^0.4.0",
|
|
34
|
-
"@atlaskit/editor-common": "^86.
|
|
34
|
+
"@atlaskit/editor-common": "^86.4.0",
|
|
35
35
|
"@atlaskit/editor-palette": "1.6.0",
|
|
36
36
|
"@atlaskit/editor-plugin-accessibility-utils": "^1.1.0",
|
|
37
37
|
"@atlaskit/editor-plugin-analytics": "^1.4.0",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"@atlaskit/editor-prosemirror": "4.0.1",
|
|
44
44
|
"@atlaskit/editor-shared-styles": "^2.13.0",
|
|
45
45
|
"@atlaskit/editor-tables": "^2.7.0",
|
|
46
|
-
"@atlaskit/icon": "^22.
|
|
46
|
+
"@atlaskit/icon": "^22.7.0",
|
|
47
47
|
"@atlaskit/menu": "^2.8.0",
|
|
48
48
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
49
49
|
"@atlaskit/pragmatic-drag-and-drop": "^1.2.0",
|
|
@@ -128,6 +128,9 @@
|
|
|
128
128
|
},
|
|
129
129
|
"platform_editor_element_drag_and_drop_ed_24041": {
|
|
130
130
|
"type": "boolean"
|
|
131
|
+
},
|
|
132
|
+
"editor_react_18_fix_table_delete_col_decorations": {
|
|
133
|
+
"type": "boolean"
|
|
131
134
|
}
|
|
132
135
|
}
|
|
133
136
|
}
|
|
@@ -26,6 +26,7 @@ import type { CleanupFn } from '@atlaskit/pragmatic-drag-and-drop/types';
|
|
|
26
26
|
import { token } from '@atlaskit/tokens';
|
|
27
27
|
|
|
28
28
|
import { autoSizeTable, clearHoverSelection } from '../commands';
|
|
29
|
+
import { handleMouseOut, isTableInFocus } from '../event-handlers';
|
|
29
30
|
import { autoScrollerFactory } from '../pm-plugins/drag-and-drop/utils';
|
|
30
31
|
import { getPluginState } from '../pm-plugins/plugin-factory';
|
|
31
32
|
import type { RowStickyState, StickyPluginState } from '../pm-plugins/sticky-headers';
|
|
@@ -186,6 +187,13 @@ class TableComponent extends React.Component<ComponentProps, TableState> {
|
|
|
186
187
|
}
|
|
187
188
|
}
|
|
188
189
|
|
|
190
|
+
private handleMouseOut = (event: Event) => {
|
|
191
|
+
if (!isTableInFocus(this.props.view)) {
|
|
192
|
+
return false;
|
|
193
|
+
}
|
|
194
|
+
return handleMouseOut(this.props.view, event);
|
|
195
|
+
};
|
|
196
|
+
|
|
189
197
|
componentDidMount() {
|
|
190
198
|
const {
|
|
191
199
|
allowColumnResizing,
|
|
@@ -204,6 +212,9 @@ class TableComponent extends React.Component<ComponentProps, TableState> {
|
|
|
204
212
|
this?.table?.addEventListener('mouseenter', this.handleMouseEnter);
|
|
205
213
|
}
|
|
206
214
|
}
|
|
215
|
+
if (fg('editor_react_18_fix_table_delete_col_decorations')) {
|
|
216
|
+
this?.table?.addEventListener('mouseout', this.handleMouseOut);
|
|
217
|
+
}
|
|
207
218
|
|
|
208
219
|
const { tableWithFixedColumnWidthsOption = false, stickyScrollbar } = getEditorFeatureFlags();
|
|
209
220
|
|
|
@@ -308,6 +319,9 @@ class TableComponent extends React.Component<ComponentProps, TableState> {
|
|
|
308
319
|
if (fg('platform.editor.table.live-pages-sorting_4malx')) {
|
|
309
320
|
this?.table?.removeEventListener('mouseenter', this.handleMouseEnter);
|
|
310
321
|
}
|
|
322
|
+
if (fg('editor_react_18_fix_table_delete_col_decorations')) {
|
|
323
|
+
this?.table?.removeEventListener('mouseout', this.handleMouseOut);
|
|
324
|
+
}
|
|
311
325
|
|
|
312
326
|
if (this.overflowShadowsObserver) {
|
|
313
327
|
this.overflowShadowsObserver.dispose();
|
package/src/pm-plugins/main.ts
CHANGED
|
@@ -374,7 +374,9 @@ export const createPlugin = (
|
|
|
374
374
|
mousedown: withCellTracking(handleMouseDown),
|
|
375
375
|
mouseover: withCellTracking(whenTableInFocus(handleMouseOver)),
|
|
376
376
|
mouseleave: handleMouseLeave,
|
|
377
|
-
mouseout:
|
|
377
|
+
mouseout: fg('editor_react_18_fix_table_delete_col_decorations')
|
|
378
|
+
? undefined
|
|
379
|
+
: whenTableInFocus(handleMouseOut),
|
|
378
380
|
mousemove: whenTableInFocus(handleMouseMove),
|
|
379
381
|
mouseenter: handleMouseEnter,
|
|
380
382
|
mouseup: whenTableInFocus(handleMouseUp),
|
package/src/toolbar.tsx
CHANGED