@atlaskit/editor-plugin-table 5.4.21 → 5.4.23
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,17 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-table
|
|
2
2
|
|
|
3
|
+
## 5.4.23
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#59370](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/59370) [`eb7463620368`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/eb7463620368) - [ux] ED-21355:When table drag and drop enable not show cell options on table toolbar.
|
|
8
|
+
|
|
9
|
+
## 5.4.22
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
3
15
|
## 5.4.21
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.getToolbarMenuConfig = exports.getToolbarConfig = exports.getToolbarCellOptionsConfig = exports.getClosestSelectionRect = void 0;
|
|
9
|
+
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
9
10
|
var _react = require("@emotion/react");
|
|
10
11
|
var _customSteps = require("@atlaskit/custom-steps");
|
|
11
12
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
@@ -281,7 +282,8 @@ var getToolbarConfig = exports.getToolbarConfig = function getToolbarConfig(getE
|
|
|
281
282
|
if (tableObject && pluginState.editorHasFocus && !isWidthResizing) {
|
|
282
283
|
var nodeType = state.schema.nodes.table;
|
|
283
284
|
var menu = getToolbarMenuConfig(config, pluginState, intl, editorAnalyticsAPI);
|
|
284
|
-
var cellItems
|
|
285
|
+
var cellItems;
|
|
286
|
+
cellItems = pluginState.isDragAndDropEnabled ? [] : getCellItems(config, state, getEditorView(), intl, getEditorContainerWidth, editorAnalyticsAPI);
|
|
285
287
|
var colorPicker = getColorPicker(state, menu, intl, editorAnalyticsAPI);
|
|
286
288
|
|
|
287
289
|
// Check if we need to show confirm dialog for delete button
|
|
@@ -332,7 +334,7 @@ var getToolbarConfig = exports.getToolbarConfig = function getToolbarConfig(getE
|
|
|
332
334
|
},
|
|
333
335
|
zIndex: _editorSharedStyles.akEditorFloatingPanelZIndex + 1,
|
|
334
336
|
// Place the context menu slightly above the others
|
|
335
|
-
items: [menu, separator(menu.hidden)].concat(cellItems, colorPicker, [{
|
|
337
|
+
items: [menu, separator(menu.hidden)].concat((0, _toConsumableArray2.default)(cellItems), colorPicker, [{
|
|
336
338
|
type: 'extensions-placeholder',
|
|
337
339
|
separator: 'end'
|
|
338
340
|
}, {
|
|
@@ -271,7 +271,8 @@ export const getToolbarConfig = (getEditorContainerWidth, editorAnalyticsAPI, ge
|
|
|
271
271
|
if (tableObject && pluginState.editorHasFocus && !isWidthResizing) {
|
|
272
272
|
const nodeType = state.schema.nodes.table;
|
|
273
273
|
const menu = getToolbarMenuConfig(config, pluginState, intl, editorAnalyticsAPI);
|
|
274
|
-
|
|
274
|
+
let cellItems;
|
|
275
|
+
cellItems = pluginState.isDragAndDropEnabled ? [] : getCellItems(config, state, getEditorView(), intl, getEditorContainerWidth, editorAnalyticsAPI);
|
|
275
276
|
const colorPicker = getColorPicker(state, menu, intl, editorAnalyticsAPI);
|
|
276
277
|
|
|
277
278
|
// Check if we need to show confirm dialog for delete button
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
1
2
|
/** @jsx jsx */
|
|
2
3
|
import { jsx } from '@emotion/react';
|
|
3
4
|
import { TableSortOrder as SortOrder } from '@atlaskit/custom-steps';
|
|
@@ -270,7 +271,8 @@ export var getToolbarConfig = function getToolbarConfig(getEditorContainerWidth,
|
|
|
270
271
|
if (tableObject && pluginState.editorHasFocus && !isWidthResizing) {
|
|
271
272
|
var nodeType = state.schema.nodes.table;
|
|
272
273
|
var menu = getToolbarMenuConfig(config, pluginState, intl, editorAnalyticsAPI);
|
|
273
|
-
var cellItems
|
|
274
|
+
var cellItems;
|
|
275
|
+
cellItems = pluginState.isDragAndDropEnabled ? [] : getCellItems(config, state, getEditorView(), intl, getEditorContainerWidth, editorAnalyticsAPI);
|
|
274
276
|
var colorPicker = getColorPicker(state, menu, intl, editorAnalyticsAPI);
|
|
275
277
|
|
|
276
278
|
// Check if we need to show confirm dialog for delete button
|
|
@@ -321,7 +323,7 @@ export var getToolbarConfig = function getToolbarConfig(getEditorContainerWidth,
|
|
|
321
323
|
},
|
|
322
324
|
zIndex: akEditorFloatingPanelZIndex + 1,
|
|
323
325
|
// Place the context menu slightly above the others
|
|
324
|
-
items: [menu, separator(menu.hidden)].concat(cellItems, colorPicker, [{
|
|
326
|
+
items: [menu, separator(menu.hidden)].concat(_toConsumableArray(cellItems), colorPicker, [{
|
|
325
327
|
type: 'extensions-placeholder',
|
|
326
328
|
separator: 'end'
|
|
327
329
|
}, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-table",
|
|
3
|
-
"version": "5.4.
|
|
3
|
+
"version": "5.4.23",
|
|
4
4
|
"description": "Table plugin for the @atlaskit/editor",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@atlaskit/editor-tables": "^2.3.0",
|
|
42
42
|
"@atlaskit/icon": "^22.0.0",
|
|
43
43
|
"@atlaskit/platform-feature-flags": "^0.2.1",
|
|
44
|
-
"@atlaskit/pragmatic-drag-and-drop": "^0.
|
|
44
|
+
"@atlaskit/pragmatic-drag-and-drop": "^0.25.0",
|
|
45
45
|
"@atlaskit/pragmatic-drag-and-drop-auto-scroll": "^0.8.0",
|
|
46
46
|
"@atlaskit/pragmatic-drag-and-drop-hitbox": "^0.12.0",
|
|
47
47
|
"@atlaskit/primitives": "^1.13.0",
|
|
@@ -426,14 +426,17 @@ export const getToolbarConfig =
|
|
|
426
426
|
editorAnalyticsAPI,
|
|
427
427
|
);
|
|
428
428
|
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
429
|
+
let cellItems: Array<FloatingToolbarItem<Command>>;
|
|
430
|
+
cellItems = pluginState.isDragAndDropEnabled
|
|
431
|
+
? []
|
|
432
|
+
: getCellItems(
|
|
433
|
+
config,
|
|
434
|
+
state,
|
|
435
|
+
getEditorView(),
|
|
436
|
+
intl,
|
|
437
|
+
getEditorContainerWidth,
|
|
438
|
+
editorAnalyticsAPI,
|
|
439
|
+
);
|
|
437
440
|
const colorPicker = getColorPicker(state, menu, intl, editorAnalyticsAPI);
|
|
438
441
|
|
|
439
442
|
// Check if we need to show confirm dialog for delete button
|
|
@@ -486,7 +489,6 @@ export const getToolbarConfig =
|
|
|
486
489
|
|
|
487
490
|
return element;
|
|
488
491
|
};
|
|
489
|
-
|
|
490
492
|
return {
|
|
491
493
|
title: 'Table floating controls',
|
|
492
494
|
getDomRef,
|