@atlaskit/editor-plugin-table 7.3.8 → 7.3.9

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.
Files changed (45) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/afm-cc/tsconfig.json +9 -0
  3. package/dist/cjs/nodeviews/ExternalDropTargets.js +2 -2
  4. package/dist/cjs/nodeviews/TableComponent.js +1 -1
  5. package/dist/cjs/pm-plugins/drag-and-drop/plugin.js +4 -4
  6. package/dist/cjs/pm-plugins/drag-and-drop/utils/monitor.js +1 -1
  7. package/dist/cjs/ui/DragHandle/index.js +3 -3
  8. package/dist/cjs/ui/TableFloatingColumnControls/ColumnDropTargets/ColumnDropTarget.js +3 -3
  9. package/dist/cjs/ui/TableFloatingColumnControls/index.js +2 -2
  10. package/dist/cjs/ui/TableFloatingControls/RowControls/DragControls.js +2 -2
  11. package/dist/cjs/ui/TableFloatingControls/RowDropTarget/index.js +3 -3
  12. package/dist/es2019/nodeviews/ExternalDropTargets.js +1 -1
  13. package/dist/es2019/nodeviews/TableComponent.js +1 -1
  14. package/dist/es2019/pm-plugins/drag-and-drop/plugin.js +2 -2
  15. package/dist/es2019/pm-plugins/drag-and-drop/utils/monitor.js +1 -1
  16. package/dist/es2019/ui/DragHandle/index.js +2 -2
  17. package/dist/es2019/ui/TableFloatingColumnControls/ColumnDropTargets/ColumnDropTarget.js +2 -2
  18. package/dist/es2019/ui/TableFloatingColumnControls/index.js +1 -1
  19. package/dist/es2019/ui/TableFloatingControls/RowControls/DragControls.js +1 -1
  20. package/dist/es2019/ui/TableFloatingControls/RowDropTarget/index.js +2 -2
  21. package/dist/esm/nodeviews/ExternalDropTargets.js +1 -1
  22. package/dist/esm/nodeviews/TableComponent.js +1 -1
  23. package/dist/esm/pm-plugins/drag-and-drop/plugin.js +2 -2
  24. package/dist/esm/pm-plugins/drag-and-drop/utils/monitor.js +1 -1
  25. package/dist/esm/ui/DragHandle/index.js +2 -2
  26. package/dist/esm/ui/TableFloatingColumnControls/ColumnDropTargets/ColumnDropTarget.js +2 -2
  27. package/dist/esm/ui/TableFloatingColumnControls/index.js +1 -1
  28. package/dist/esm/ui/TableFloatingControls/RowControls/DragControls.js +1 -1
  29. package/dist/esm/ui/TableFloatingControls/RowDropTarget/index.js +2 -2
  30. package/dist/types/pm-plugins/drag-and-drop/utils/monitor.d.ts +1 -1
  31. package/dist/types/types.d.ts +1 -1
  32. package/dist/types-ts4.5/pm-plugins/drag-and-drop/utils/monitor.d.ts +1 -1
  33. package/dist/types-ts4.5/types.d.ts +1 -1
  34. package/package.json +8 -8
  35. package/src/nodeviews/ExternalDropTargets.tsx +1 -1
  36. package/src/nodeviews/TableComponent.tsx +1 -1
  37. package/src/pm-plugins/drag-and-drop/plugin.ts +2 -2
  38. package/src/pm-plugins/drag-and-drop/utils/monitor.ts +3 -3
  39. package/src/types.ts +1 -1
  40. package/src/ui/DragHandle/index.tsx +2 -2
  41. package/src/ui/TableFloatingColumnControls/ColumnDropTargets/ColumnDropTarget.tsx +2 -2
  42. package/src/ui/TableFloatingColumnControls/index.tsx +1 -1
  43. package/src/ui/TableFloatingControls/RowControls/DragControls.tsx +1 -1
  44. package/src/ui/TableFloatingControls/RowDropTarget/index.tsx +2 -2
  45. package/tsconfig.json +894 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @atlaskit/editor-plugin-table
2
2
 
3
+ ## 7.3.9
4
+
5
+ ### Patch Changes
6
+
7
+ - [#70616](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/70616) [`76068b6be8dc`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/76068b6be8dc) - Upgrading to Pragmatic drag and drop 1.0
8
+ - Updated dependencies
9
+
3
10
  ## 7.3.8
4
11
 
5
12
  ### Patch Changes
@@ -57,6 +57,15 @@
57
57
  {
58
58
  "path": "../../../platform/feature-flags/afm-cc/tsconfig.json"
59
59
  },
60
+ {
61
+ "path": "../../../pragmatic-drag-and-drop/core/afm-cc/tsconfig.json"
62
+ },
63
+ {
64
+ "path": "../../../pragmatic-drag-and-drop/auto-scroll/afm-cc/tsconfig.json"
65
+ },
66
+ {
67
+ "path": "../../../pragmatic-drag-and-drop/hitbox/afm-cc/tsconfig.json"
68
+ },
60
69
  {
61
70
  "path": "../../../design-system/primitives/afm-cc/tsconfig.json"
62
71
  },
@@ -9,7 +9,7 @@ exports.ExternalDropTargets = void 0;
9
9
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
10
10
  var _react = _interopRequireWildcard(require("react"));
11
11
  var _styles = require("@atlaskit/editor-common/styles");
12
- var _element = require("@atlaskit/pragmatic-drag-and-drop/adapter/element");
12
+ var _adapter = require("@atlaskit/pragmatic-drag-and-drop/element/adapter");
13
13
  var _consts = require("../ui/consts");
14
14
  var _ColumnDropTarget = require("../ui/TableFloatingColumnControls/ColumnDropTargets/ColumnDropTarget");
15
15
  var _utils = require("../utils");
@@ -26,7 +26,7 @@ var ExternalDropTargets = exports.ExternalDropTargets = function ExternalDropTar
26
26
  setIsDragging = _useState2[1];
27
27
  var currentNodeLocalId = node === null || node === void 0 ? void 0 : node.attrs.localId;
28
28
  (0, _react.useEffect)(function () {
29
- return (0, _element.monitorForElements)({
29
+ return (0, _adapter.monitorForElements)({
30
30
  canMonitor: function canMonitor(_ref2) {
31
31
  var source = _ref2.source;
32
32
  var _ref3 = source.data,
@@ -24,7 +24,7 @@ var _utils = require("@atlaskit/editor-common/utils");
24
24
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
25
25
  var _utils2 = require("@atlaskit/editor-tables/utils");
26
26
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
27
- var _combine = require("@atlaskit/pragmatic-drag-and-drop/util/combine");
27
+ var _combine = require("@atlaskit/pragmatic-drag-and-drop/combine");
28
28
  var _commands = require("../commands");
29
29
  var _utils3 = require("../pm-plugins/drag-and-drop/utils");
30
30
  var _pluginFactory = require("../pm-plugins/plugin-factory");
@@ -10,8 +10,8 @@ var _view = require("@atlaskit/editor-prosemirror/view");
10
10
  var _cellSelection = require("@atlaskit/editor-tables/cell-selection");
11
11
  var _utils = require("@atlaskit/editor-tables/utils");
12
12
  var _element = require("@atlaskit/pragmatic-drag-and-drop-auto-scroll/element");
13
- var _element2 = require("@atlaskit/pragmatic-drag-and-drop/adapter/element");
14
- var _combine = require("@atlaskit/pragmatic-drag-and-drop/util/combine");
13
+ var _combine = require("@atlaskit/pragmatic-drag-and-drop/combine");
14
+ var _adapter = require("@atlaskit/pragmatic-drag-and-drop/element/adapter");
15
15
  var _utils2 = require("../../utils");
16
16
  var _pluginFactory = require("../plugin-factory");
17
17
  var _pluginKey = require("../plugin-key");
@@ -25,7 +25,7 @@ var _pluginKey2 = require("./plugin-key");
25
25
  var _monitor = require("./utils/monitor");
26
26
  var destroyFn = function destroyFn(editorView, editorAnalyticsAPI) {
27
27
  var editorPageScrollContainer = document.querySelector('.fabric-editor-popup-scroll-parent');
28
- var rowAutoScrollers = editorPageScrollContainer ? [(0, _element2.monitorForElements)({
28
+ var rowAutoScrollers = editorPageScrollContainer ? [(0, _adapter.monitorForElements)({
29
29
  canMonitor: function canMonitor(_ref) {
30
30
  var source = _ref.source;
31
31
  var _ref2 = source.data,
@@ -49,7 +49,7 @@ var destroyFn = function destroyFn(editorView, editorAnalyticsAPI) {
49
49
  return type === 'table-row';
50
50
  }
51
51
  })] : [];
52
- return _combine.combine.apply(void 0, rowAutoScrollers.concat([(0, _element2.monitorForElements)({
52
+ return _combine.combine.apply(void 0, rowAutoScrollers.concat([(0, _adapter.monitorForElements)({
53
53
  canMonitor: function canMonitor(_ref5) {
54
54
  var source = _ref5.source;
55
55
  var _ref6 = source.data,
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.getDraggableDataFromEvent = void 0;
7
- var _closestEdge = require("@atlaskit/pragmatic-drag-and-drop-hitbox/addon/closest-edge");
7
+ var _closestEdge = require("@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge");
8
8
  var getDraggableDataFromEvent = exports.getDraggableDataFromEvent = function getDraggableDataFromEvent(_ref) {
9
9
  var _extractClosestEdge;
10
10
  var location = _ref.location,
@@ -14,8 +14,8 @@ var _reactDom = _interopRequireDefault(require("react-dom"));
14
14
  var _reactIntlNext = require("react-intl-next");
15
15
  var _messages = require("@atlaskit/editor-common/messages");
16
16
  var _utils = require("@atlaskit/editor-common/utils");
17
- var _element = require("@atlaskit/pragmatic-drag-and-drop/adapter/element");
18
- var _setCustomNativeDragPreview = require("@atlaskit/pragmatic-drag-and-drop/util/set-custom-native-drag-preview");
17
+ var _adapter = require("@atlaskit/pragmatic-drag-and-drop/element/adapter");
18
+ var _setCustomNativeDragPreview = require("@atlaskit/pragmatic-drag-and-drop/element/set-custom-native-drag-preview");
19
19
  var _pluginFactory = require("../../pm-plugins/drag-and-drop/plugin-factory");
20
20
  var _pluginFactory2 = require("../../pm-plugins/plugin-factory");
21
21
  var _types = require("../../types");
@@ -70,7 +70,7 @@ var DragHandleComponent = function DragHandleComponent(_ref) {
70
70
  (0, _react.useEffect)(function () {
71
71
  var dragHandleDivRefCurrent = dragHandleDivRef.current;
72
72
  if (dragHandleDivRefCurrent) {
73
- return (0, _element.draggable)({
73
+ return (0, _adapter.draggable)({
74
74
  element: dragHandleDivRefCurrent,
75
75
  canDrag: function canDrag() {
76
76
  return !hasMergedCells;
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.ColumnDropTarget = void 0;
8
8
  var _react = _interopRequireWildcard(require("react"));
9
- var _closestEdge = require("@atlaskit/pragmatic-drag-and-drop-hitbox/addon/closest-edge");
10
- var _element = require("@atlaskit/pragmatic-drag-and-drop/adapter/element");
9
+ var _closestEdge = require("@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge");
10
+ var _adapter = require("@atlaskit/pragmatic-drag-and-drop/element/adapter");
11
11
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
12
12
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
13
13
  var ColumnDropTarget = exports.ColumnDropTarget = function ColumnDropTarget(_ref) {
@@ -21,7 +21,7 @@ var ColumnDropTarget = exports.ColumnDropTarget = function ColumnDropTarget(_ref
21
21
  if (!dropTargetRef.current) {
22
22
  return;
23
23
  }
24
- return (0, _element.dropTargetForElements)({
24
+ return (0, _adapter.dropTargetForElements)({
25
25
  element: dropTargetRef.current,
26
26
  canDrop: function canDrop(_ref2) {
27
27
  var _data$indexes, _data$indexes2;
@@ -8,7 +8,7 @@ Object.defineProperty(exports, "__esModule", {
8
8
  exports.default = exports.TableFloatingColumnControls = void 0;
9
9
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
10
10
  var _react = _interopRequireWildcard(require("react"));
11
- var _element = require("@atlaskit/pragmatic-drag-and-drop/adapter/element");
11
+ var _adapter = require("@atlaskit/pragmatic-drag-and-drop/element/adapter");
12
12
  var _types = require("../../types");
13
13
  var _utils = require("../../utils");
14
14
  var _ColumnControls = require("./ColumnControls");
@@ -81,7 +81,7 @@ var TableFloatingColumnControls = exports.TableFloatingColumnControls = function
81
81
  }
82
82
  }, [tableRef]);
83
83
  (0, _react.useEffect)(function () {
84
- return (0, _element.monitorForElements)({
84
+ return (0, _adapter.monitorForElements)({
85
85
  canMonitor: function canMonitor(_ref2) {
86
86
  var source = _ref2.source;
87
87
  var _ref3 = source.data,
@@ -11,7 +11,7 @@ var _react = _interopRequireWildcard(require("react"));
11
11
  var _reactIntlNext = require("react-intl-next");
12
12
  var _editorTables = require("@atlaskit/editor-tables");
13
13
  var _utils = require("@atlaskit/editor-tables/utils");
14
- var _element = require("@atlaskit/pragmatic-drag-and-drop/adapter/element");
14
+ var _adapter = require("@atlaskit/pragmatic-drag-and-drop/element/adapter");
15
15
  var _commands = require("../../../commands");
16
16
  var _commands2 = require("../../../pm-plugins/drag-and-drop/commands");
17
17
  var _pluginFactory = require("../../../pm-plugins/plugin-factory");
@@ -61,7 +61,7 @@ var DragControlsComponent = function DragControlsComponent(_ref) {
61
61
  var selectedRowIndexes = getSelectedRows(editorView.state.selection);
62
62
  var currentNodeLocalId = (_tableNode$attrs$loca = tableNode === null || tableNode === void 0 || (_tableNode$attrs = tableNode.attrs) === null || _tableNode$attrs === void 0 ? void 0 : _tableNode$attrs.localId) !== null && _tableNode$attrs$loca !== void 0 ? _tableNode$attrs$loca : '';
63
63
  (0, _react.useEffect)(function () {
64
- return (0, _element.monitorForElements)({
64
+ return (0, _adapter.monitorForElements)({
65
65
  canMonitor: function canMonitor(_ref2) {
66
66
  var source = _ref2.source;
67
67
  var _ref3 = source.data,
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.default = void 0;
8
8
  var _react = _interopRequireWildcard(require("react"));
9
- var _closestEdge = require("@atlaskit/pragmatic-drag-and-drop-hitbox/addon/closest-edge");
10
- var _element = require("@atlaskit/pragmatic-drag-and-drop/adapter/element");
9
+ var _closestEdge = require("@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge");
10
+ var _adapter = require("@atlaskit/pragmatic-drag-and-drop/element/adapter");
11
11
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
12
12
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
13
13
  var RowDropTarget = function RowDropTarget(_ref) {
@@ -19,7 +19,7 @@ var RowDropTarget = function RowDropTarget(_ref) {
19
19
  if (!dropTargetRef.current) {
20
20
  return;
21
21
  }
22
- return (0, _element.dropTargetForElements)({
22
+ return (0, _adapter.dropTargetForElements)({
23
23
  element: dropTargetRef.current,
24
24
  canDrop: function canDrop(_ref2) {
25
25
  var _data$indexes, _data$indexes2;
@@ -1,6 +1,6 @@
1
1
  import React, { useEffect, useState } from 'react';
2
2
  import { tableMarginTop } from '@atlaskit/editor-common/styles';
3
- import { monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/adapter/element';
3
+ import { monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
4
4
  import { dropTargetExtendedWidth, dropTargetsZIndex } from '../ui/consts';
5
5
  import { ColumnDropTarget } from '../ui/TableFloatingColumnControls/ColumnDropTargets/ColumnDropTarget';
6
6
  import { getColumnsWidths } from '../utils';
@@ -10,7 +10,7 @@ import { browser, isValidPosition } from '@atlaskit/editor-common/utils';
10
10
  import { MAX_BROWSER_SCROLLBAR_HEIGHT, akEditorTableToolbarSize as tableToolbarSize } from '@atlaskit/editor-shared-styles';
11
11
  import { findTable, isTableSelected } from '@atlaskit/editor-tables/utils';
12
12
  import { getBooleanFF } from '@atlaskit/platform-feature-flags';
13
- import { combine } from '@atlaskit/pragmatic-drag-and-drop/util/combine';
13
+ import { combine } from '@atlaskit/pragmatic-drag-and-drop/combine';
14
14
  import { autoSizeTable, clearHoverSelection } from '../commands';
15
15
  import { autoScrollerFactory } from '../pm-plugins/drag-and-drop/utils';
16
16
  import { getPluginState } from '../pm-plugins/plugin-factory';
@@ -4,8 +4,8 @@ import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
4
4
  import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
5
5
  import { getCellsInRow } from '@atlaskit/editor-tables/utils';
6
6
  import { autoScrollForElements } from '@atlaskit/pragmatic-drag-and-drop-auto-scroll/element';
7
- import { monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/adapter/element';
8
- import { combine } from '@atlaskit/pragmatic-drag-and-drop/util/combine';
7
+ import { combine } from '@atlaskit/pragmatic-drag-and-drop/combine';
8
+ import { monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
9
9
  import { findNearestCellIndexToPoint, hasMergedCellsInBetween } from '../../utils';
10
10
  import { getPluginState as getTablePluginState } from '../plugin-factory';
11
11
  import { pluginKey as tablePluginKey } from '../plugin-key';
@@ -1,4 +1,4 @@
1
- import { extractClosestEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/addon/closest-edge';
1
+ import { extractClosestEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';
2
2
  export const getDraggableDataFromEvent = ({
3
3
  location,
4
4
  source
@@ -4,8 +4,8 @@ import ReactDOM from 'react-dom';
4
4
  import { injectIntl } from 'react-intl-next';
5
5
  import { tableMessages as messages } from '@atlaskit/editor-common/messages';
6
6
  import { browser } from '@atlaskit/editor-common/utils';
7
- import { draggable } from '@atlaskit/pragmatic-drag-and-drop/adapter/element';
8
- import { setCustomNativeDragPreview } from '@atlaskit/pragmatic-drag-and-drop/util/set-custom-native-drag-preview';
7
+ import { draggable } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
8
+ import { setCustomNativeDragPreview } from '@atlaskit/pragmatic-drag-and-drop/element/set-custom-native-drag-preview';
9
9
  import { getPluginState as getDnDPluginState } from '../../pm-plugins/drag-and-drop/plugin-factory';
10
10
  import { getPluginState } from '../../pm-plugins/plugin-factory';
11
11
  import { TableCssClassName as ClassName } from '../../types';
@@ -1,6 +1,6 @@
1
1
  import React, { useEffect, useRef } from 'react';
2
- import { attachClosestEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/addon/closest-edge';
3
- import { dropTargetForElements } from '@atlaskit/pragmatic-drag-and-drop/adapter/element';
2
+ import { attachClosestEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';
3
+ import { dropTargetForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
4
4
  export const ColumnDropTarget = ({
5
5
  index,
6
6
  localId,
@@ -1,5 +1,5 @@
1
1
  import React, { useEffect, useMemo, useRef, useState } from 'react';
2
- import { monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/adapter/element';
2
+ import { monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
3
3
  import { TableCssClassName as ClassName } from '../../types';
4
4
  import { containsHeaderColumn, getColumnsWidths, getRowHeights } from '../../utils';
5
5
  import { ColumnControls } from './ColumnControls';
@@ -4,7 +4,7 @@ import React, { Fragment, useCallback, useEffect, useMemo, useState } from 'reac
4
4
  import { injectIntl } from 'react-intl-next';
5
5
  import { CellSelection } from '@atlaskit/editor-tables';
6
6
  import { getSelectionRect } from '@atlaskit/editor-tables/utils';
7
- import { monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/adapter/element';
7
+ import { monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
8
8
  import { clearHoverSelection } from '../../../commands';
9
9
  import { toggleDragMenu } from '../../../pm-plugins/drag-and-drop/commands';
10
10
  import { getPluginState as getTablePluginState } from '../../../pm-plugins/plugin-factory';
@@ -1,6 +1,6 @@
1
1
  import React, { useEffect, useRef } from 'react';
2
- import { attachClosestEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/addon/closest-edge';
3
- import { dropTargetForElements } from '@atlaskit/pragmatic-drag-and-drop/adapter/element';
2
+ import { attachClosestEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';
3
+ import { dropTargetForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
4
4
  const RowDropTarget = ({
5
5
  index,
6
6
  localId,
@@ -1,7 +1,7 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
2
  import React, { useEffect, useState } from 'react';
3
3
  import { tableMarginTop } from '@atlaskit/editor-common/styles';
4
- import { monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/adapter/element';
4
+ import { monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
5
5
  import { dropTargetExtendedWidth, dropTargetsZIndex } from '../ui/consts';
6
6
  import { ColumnDropTarget } from '../ui/TableFloatingColumnControls/ColumnDropTargets/ColumnDropTarget';
7
7
  import { getColumnsWidths } from '../utils';
@@ -21,7 +21,7 @@ import { browser, isValidPosition } from '@atlaskit/editor-common/utils';
21
21
  import { MAX_BROWSER_SCROLLBAR_HEIGHT, akEditorTableToolbarSize as tableToolbarSize } from '@atlaskit/editor-shared-styles';
22
22
  import { findTable, isTableSelected } from '@atlaskit/editor-tables/utils';
23
23
  import { getBooleanFF } from '@atlaskit/platform-feature-flags';
24
- import { combine } from '@atlaskit/pragmatic-drag-and-drop/util/combine';
24
+ import { combine } from '@atlaskit/pragmatic-drag-and-drop/combine';
25
25
  import { autoSizeTable, clearHoverSelection } from '../commands';
26
26
  import { autoScrollerFactory } from '../pm-plugins/drag-and-drop/utils';
27
27
  import { getPluginState } from '../pm-plugins/plugin-factory';
@@ -4,8 +4,8 @@ import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
4
4
  import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
5
5
  import { getCellsInRow } from '@atlaskit/editor-tables/utils';
6
6
  import { autoScrollForElements } from '@atlaskit/pragmatic-drag-and-drop-auto-scroll/element';
7
- import { monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/adapter/element';
8
- import { combine } from '@atlaskit/pragmatic-drag-and-drop/util/combine';
7
+ import { combine } from '@atlaskit/pragmatic-drag-and-drop/combine';
8
+ import { monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
9
9
  import { findNearestCellIndexToPoint, hasMergedCellsInBetween } from '../../utils';
10
10
  import { getPluginState as getTablePluginState } from '../plugin-factory';
11
11
  import { pluginKey as tablePluginKey } from '../plugin-key';
@@ -1,4 +1,4 @@
1
- import { extractClosestEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/addon/closest-edge';
1
+ import { extractClosestEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';
2
2
  export var getDraggableDataFromEvent = function getDraggableDataFromEvent(_ref) {
3
3
  var _extractClosestEdge;
4
4
  var location = _ref.location,
@@ -6,8 +6,8 @@ import ReactDOM from 'react-dom';
6
6
  import { injectIntl } from 'react-intl-next';
7
7
  import { tableMessages as messages } from '@atlaskit/editor-common/messages';
8
8
  import { browser } from '@atlaskit/editor-common/utils';
9
- import { draggable } from '@atlaskit/pragmatic-drag-and-drop/adapter/element';
10
- import { setCustomNativeDragPreview } from '@atlaskit/pragmatic-drag-and-drop/util/set-custom-native-drag-preview';
9
+ import { draggable } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
10
+ import { setCustomNativeDragPreview } from '@atlaskit/pragmatic-drag-and-drop/element/set-custom-native-drag-preview';
11
11
  import { getPluginState as getDnDPluginState } from '../../pm-plugins/drag-and-drop/plugin-factory';
12
12
  import { getPluginState } from '../../pm-plugins/plugin-factory';
13
13
  import { TableCssClassName as ClassName } from '../../types';
@@ -1,6 +1,6 @@
1
1
  import React, { useEffect, useRef } from 'react';
2
- import { attachClosestEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/addon/closest-edge';
3
- import { dropTargetForElements } from '@atlaskit/pragmatic-drag-and-drop/adapter/element';
2
+ import { attachClosestEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';
3
+ import { dropTargetForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
4
4
  export var ColumnDropTarget = function ColumnDropTarget(_ref) {
5
5
  var index = _ref.index,
6
6
  localId = _ref.localId,
@@ -3,7 +3,7 @@ function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol
3
3
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
4
4
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
5
5
  import React, { useEffect, useMemo, useRef, useState } from 'react';
6
- import { monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/adapter/element';
6
+ import { monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
7
7
  import { TableCssClassName as ClassName } from '../../types';
8
8
  import { containsHeaderColumn, getColumnsWidths, getRowHeights } from '../../utils';
9
9
  import { ColumnControls } from './ColumnControls';
@@ -5,7 +5,7 @@ import React, { Fragment, useCallback, useEffect, useMemo, useState } from 'reac
5
5
  import { injectIntl } from 'react-intl-next';
6
6
  import { CellSelection } from '@atlaskit/editor-tables';
7
7
  import { getSelectionRect } from '@atlaskit/editor-tables/utils';
8
- import { monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/adapter/element';
8
+ import { monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
9
9
  import { clearHoverSelection } from '../../../commands';
10
10
  import { toggleDragMenu } from '../../../pm-plugins/drag-and-drop/commands';
11
11
  import { getPluginState as getTablePluginState } from '../../../pm-plugins/plugin-factory';
@@ -1,6 +1,6 @@
1
1
  import React, { useEffect, useRef } from 'react';
2
- import { attachClosestEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/addon/closest-edge';
3
- import { dropTargetForElements } from '@atlaskit/pragmatic-drag-and-drop/adapter/element';
2
+ import { attachClosestEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';
3
+ import { dropTargetForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
4
4
  var RowDropTarget = function RowDropTarget(_ref) {
5
5
  var index = _ref.index,
6
6
  localId = _ref.localId,
@@ -1,3 +1,3 @@
1
- import type { ElementEventBasePayload } from '@atlaskit/pragmatic-drag-and-drop/adapter/element';
1
+ import type { ElementEventBasePayload } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
2
2
  import type { DraggableData } from '../../../types';
3
3
  export declare const getDraggableDataFromEvent: ({ location, source, }: ElementEventBasePayload) => DraggableData | undefined;
@@ -7,7 +7,7 @@ import type { Node as PmNode } from '@atlaskit/editor-prosemirror/model';
7
7
  import type { Transaction } from '@atlaskit/editor-prosemirror/state';
8
8
  import type { DecorationSet } from '@atlaskit/editor-prosemirror/view';
9
9
  import type { Rect } from '@atlaskit/editor-tables/table-map';
10
- import type { Edge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/addon/closest-edge';
10
+ import type { Edge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';
11
11
  import type tablePlugin from './plugin';
12
12
  export declare const RESIZE_HANDLE_AREA_DECORATION_GAP = 30;
13
13
  export type RowInsertPosition = 'TOP' | 'BOTTOM';
@@ -1,3 +1,3 @@
1
- import type { ElementEventBasePayload } from '@atlaskit/pragmatic-drag-and-drop/adapter/element';
1
+ import type { ElementEventBasePayload } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
2
2
  import type { DraggableData } from '../../../types';
3
3
  export declare const getDraggableDataFromEvent: ({ location, source, }: ElementEventBasePayload) => DraggableData | undefined;
@@ -7,7 +7,7 @@ import type { Node as PmNode } from '@atlaskit/editor-prosemirror/model';
7
7
  import type { Transaction } from '@atlaskit/editor-prosemirror/state';
8
8
  import type { DecorationSet } from '@atlaskit/editor-prosemirror/view';
9
9
  import type { Rect } from '@atlaskit/editor-tables/table-map';
10
- import type { Edge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/addon/closest-edge';
10
+ import type { Edge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';
11
11
  import type tablePlugin from './plugin';
12
12
  export declare const RESIZE_HANDLE_AREA_DECORATION_GAP = 30;
13
13
  export type RowInsertPosition = 'TOP' | 'BOTTOM';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-table",
3
- "version": "7.3.8",
3
+ "version": "7.3.9",
4
4
  "description": "Table plugin for the @atlaskit/editor",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -30,23 +30,23 @@
30
30
  "dependencies": {
31
31
  "@atlaskit/adf-schema": "^35.5.1",
32
32
  "@atlaskit/custom-steps": "^0.0.13",
33
- "@atlaskit/editor-common": "^78.3.0",
33
+ "@atlaskit/editor-common": "^78.4.0",
34
34
  "@atlaskit/editor-palette": "1.5.2",
35
35
  "@atlaskit/editor-plugin-analytics": "^1.0.0",
36
36
  "@atlaskit/editor-plugin-content-insertion": "^1.0.0",
37
37
  "@atlaskit/editor-plugin-guideline": "^1.0.0",
38
- "@atlaskit/editor-plugin-selection": "^1.0.0",
38
+ "@atlaskit/editor-plugin-selection": "^1.1.0",
39
39
  "@atlaskit/editor-plugin-width": "^1.0.0",
40
40
  "@atlaskit/editor-prosemirror": "3.0.0",
41
41
  "@atlaskit/editor-shared-styles": "^2.9.0",
42
42
  "@atlaskit/editor-tables": "^2.5.0",
43
- "@atlaskit/icon": "^22.0.0",
43
+ "@atlaskit/icon": "^22.1.0",
44
44
  "@atlaskit/menu": "^2.1.5",
45
45
  "@atlaskit/platform-feature-flags": "^0.2.1",
46
- "@atlaskit/pragmatic-drag-and-drop": "^0.25.0",
47
- "@atlaskit/pragmatic-drag-and-drop-auto-scroll": "^0.8.0",
48
- "@atlaskit/pragmatic-drag-and-drop-hitbox": "^0.12.0",
49
- "@atlaskit/primitives": "^2.0.0",
46
+ "@atlaskit/pragmatic-drag-and-drop": "^1.0.0",
47
+ "@atlaskit/pragmatic-drag-and-drop-auto-scroll": "^1.0.0",
48
+ "@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.0.0",
49
+ "@atlaskit/primitives": "^2.1.0",
50
50
  "@atlaskit/theme": "^12.6.0",
51
51
  "@atlaskit/toggle": "^13.0.0",
52
52
  "@atlaskit/tokens": "^1.38.0",
@@ -3,7 +3,7 @@ import React, { useEffect, useState } from 'react';
3
3
  import { tableMarginTop } from '@atlaskit/editor-common/styles';
4
4
  import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
5
5
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
6
- import { monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/adapter/element';
6
+ import { monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
7
7
 
8
8
  import type { DraggableSourceData } from '../types';
9
9
  import { dropTargetExtendedWidth, dropTargetsZIndex } from '../ui/consts';
@@ -31,8 +31,8 @@ import {
31
31
  } from '@atlaskit/editor-shared-styles';
32
32
  import { findTable, isTableSelected } from '@atlaskit/editor-tables/utils';
33
33
  import { getBooleanFF } from '@atlaskit/platform-feature-flags';
34
+ import { combine } from '@atlaskit/pragmatic-drag-and-drop/combine';
34
35
  import type { CleanupFn } from '@atlaskit/pragmatic-drag-and-drop/types';
35
- import { combine } from '@atlaskit/pragmatic-drag-and-drop/util/combine';
36
36
 
37
37
  import { autoSizeTable, clearHoverSelection } from '../commands';
38
38
  import { autoScrollerFactory } from '../pm-plugins/drag-and-drop/utils';
@@ -10,8 +10,8 @@ import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
10
10
  import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
11
11
  import { getCellsInRow } from '@atlaskit/editor-tables/utils';
12
12
  import { autoScrollForElements } from '@atlaskit/pragmatic-drag-and-drop-auto-scroll/element';
13
- import { monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/adapter/element';
14
- import { combine } from '@atlaskit/pragmatic-drag-and-drop/util/combine';
13
+ import { combine } from '@atlaskit/pragmatic-drag-and-drop/combine';
14
+ import { monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
15
15
 
16
16
  import type { DraggableSourceData } from '../../types';
17
17
  import {
@@ -1,6 +1,6 @@
1
- import { extractClosestEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/addon/closest-edge';
2
- import type { Edge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/addon/closest-edge';
3
- import type { ElementEventBasePayload } from '@atlaskit/pragmatic-drag-and-drop/adapter/element';
1
+ import { extractClosestEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';
2
+ import type { Edge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';
3
+ import type { ElementEventBasePayload } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
4
4
 
5
5
  import type {
6
6
  DraggableData,
package/src/types.ts CHANGED
@@ -14,7 +14,7 @@ import type { Node as PmNode } from '@atlaskit/editor-prosemirror/model';
14
14
  import type { Transaction } from '@atlaskit/editor-prosemirror/state';
15
15
  import type { DecorationSet } from '@atlaskit/editor-prosemirror/view';
16
16
  import type { Rect } from '@atlaskit/editor-tables/table-map';
17
- import type { Edge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/addon/closest-edge';
17
+ import type { Edge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';
18
18
 
19
19
  import type tablePlugin from './plugin';
20
20
 
@@ -9,8 +9,8 @@ import { injectIntl } from 'react-intl-next';
9
9
  import { tableMessages as messages } from '@atlaskit/editor-common/messages';
10
10
  import { browser } from '@atlaskit/editor-common/utils';
11
11
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
12
- import { draggable } from '@atlaskit/pragmatic-drag-and-drop/adapter/element';
13
- import { setCustomNativeDragPreview } from '@atlaskit/pragmatic-drag-and-drop/util/set-custom-native-drag-preview';
12
+ import { draggable } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
13
+ import { setCustomNativeDragPreview } from '@atlaskit/pragmatic-drag-and-drop/element/set-custom-native-drag-preview';
14
14
  import { token } from '@atlaskit/tokens';
15
15
 
16
16
  import { getPluginState as getDnDPluginState } from '../../pm-plugins/drag-and-drop/plugin-factory';
@@ -1,7 +1,7 @@
1
1
  import React, { useEffect, useRef } from 'react';
2
2
 
3
- import { attachClosestEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/addon/closest-edge';
4
- import { dropTargetForElements } from '@atlaskit/pragmatic-drag-and-drop/adapter/element';
3
+ import { attachClosestEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';
4
+ import { dropTargetForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
5
5
 
6
6
  import type { DraggableSourceData } from '../../../types';
7
7
 
@@ -5,7 +5,7 @@ import type { GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
5
5
  import type { Node as PmNode } from '@atlaskit/editor-prosemirror/model';
6
6
  import type { Selection } from '@atlaskit/editor-prosemirror/state';
7
7
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
8
- import { monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/adapter/element';
8
+ import { monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
9
9
 
10
10
  import type { RowStickyState } from '../../pm-plugins/sticky-headers';
11
11
  import type { CellHoverMeta, DraggableSourceData } from '../../types';
@@ -16,7 +16,7 @@ import type { Selection } from '@atlaskit/editor-prosemirror/state';
16
16
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
17
17
  import { CellSelection } from '@atlaskit/editor-tables';
18
18
  import { getSelectionRect } from '@atlaskit/editor-tables/utils';
19
- import { monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/adapter/element';
19
+ import { monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
20
20
  import { token } from '@atlaskit/tokens';
21
21
 
22
22
  import { clearHoverSelection } from '../../../commands';
@@ -1,7 +1,7 @@
1
1
  import React, { useEffect, useRef } from 'react';
2
2
 
3
- import { attachClosestEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/addon/closest-edge';
4
- import { dropTargetForElements } from '@atlaskit/pragmatic-drag-and-drop/adapter/element';
3
+ import { attachClosestEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';
4
+ import { dropTargetForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
5
5
 
6
6
  import type { DraggableSourceData } from '../../../types';
7
7