@atlaskit/editor-tables 2.9.74 → 2.9.76

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,19 @@
1
1
  # @atlaskit/editor-tables
2
2
 
3
+ ## 2.9.76
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 2.9.75
10
+
11
+ ### Patch Changes
12
+
13
+ - [`d2c265eaaf495`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d2c265eaaf495) -
14
+ Remove isDragAndDropEnabled dead code from pm-plugins - always true (EDITOR-6290)
15
+ - Updated dependencies
16
+
3
17
  ## 2.9.74
4
18
 
5
19
  ### Patch Changes
@@ -133,7 +133,7 @@ function handleTripleClick(view, pos) {
133
133
  view.dispatch(view.state.tr.setSelection(new _cellSelection.CellSelection($cell)));
134
134
  return true;
135
135
  }
136
- function handleMouseDown(view, event, dragAndDropEnabled) {
136
+ function handleMouseDown(view, event) {
137
137
  var startEvent = event;
138
138
  // Prevent right clicks from making a cell selection https://product-fabric.atlassian.net/browse/ED-12527
139
139
  if (startEvent.ctrlKey || startEvent.metaKey || startEvent.button === 2 // right mouse click
@@ -148,7 +148,7 @@ function handleMouseDown(view, event, dragAndDropEnabled) {
148
148
  if (startEvent.shiftKey && view.state.selection instanceof _cellSelection.CellSelection) {
149
149
  var targetElement = event.target instanceof HTMLElement || event.target instanceof SVGElement ? event.target : null;
150
150
  var isDragHandleElement = !!targetElement && !!targetElement.closest('button.pm-table-drag-handle-button-container, button.pm-table-drag-handle-button-clickable-zone');
151
- if (dragAndDropEnabled && isDragHandleElement) {
151
+ if (isDragHandleElement) {
152
152
  return false;
153
153
  }
154
154
  setCellSelection(view.state.selection.$anchorCell, startEvent);
@@ -28,8 +28,6 @@ function tableEditing() {
28
28
  var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
29
29
  _ref$allowTableNodeSe = _ref.allowTableNodeSelection,
30
30
  allowTableNodeSelection = _ref$allowTableNodeSe === void 0 ? false : _ref$allowTableNodeSe,
31
- _ref$dragAndDropEnabl = _ref.dragAndDropEnabled,
32
- dragAndDropEnabled = _ref$dragAndDropEnabl === void 0 ? false : _ref$dragAndDropEnabl,
33
31
  reportFixedTable = _ref.reportFixedTable;
34
32
  return new _state.Plugin({
35
33
  key: _pluginKey.tableEditingKey,
@@ -59,7 +57,7 @@ function tableEditing() {
59
57
  decorations: _drawCellSelection.drawCellSelection,
60
58
  handleDOMEvents: {
61
59
  mousedown: function mousedown(view, event) {
62
- (0, _input.handleMouseDown)(view, event, dragAndDropEnabled);
60
+ (0, _input.handleMouseDown)(view, event);
63
61
  }
64
62
  },
65
63
  createSelectionBetween: function createSelectionBetween(view) {
@@ -132,7 +132,7 @@ export function handleTripleClick(view, pos) {
132
132
  view.dispatch(view.state.tr.setSelection(new CellSelection($cell)));
133
133
  return true;
134
134
  }
135
- export function handleMouseDown(view, event, dragAndDropEnabled) {
135
+ export function handleMouseDown(view, event) {
136
136
  const startEvent = event;
137
137
  // Prevent right clicks from making a cell selection https://product-fabric.atlassian.net/browse/ED-12527
138
138
  if (startEvent.ctrlKey || startEvent.metaKey || startEvent.button === 2 // right mouse click
@@ -147,7 +147,7 @@ export function handleMouseDown(view, event, dragAndDropEnabled) {
147
147
  if (startEvent.shiftKey && view.state.selection instanceof CellSelection) {
148
148
  const targetElement = event.target instanceof HTMLElement || event.target instanceof SVGElement ? event.target : null;
149
149
  const isDragHandleElement = !!targetElement && !!targetElement.closest('button.pm-table-drag-handle-button-container, button.pm-table-drag-handle-button-clickable-zone');
150
- if (dragAndDropEnabled && isDragHandleElement) {
150
+ if (isDragHandleElement) {
151
151
  return false;
152
152
  }
153
153
  setCellSelection(view.state.selection.$anchorCell, startEvent);
@@ -21,7 +21,6 @@ import { tableEditingKey } from './plugin-key';
21
21
 
22
22
  export function tableEditing({
23
23
  allowTableNodeSelection = false,
24
- dragAndDropEnabled = false,
25
24
  reportFixedTable
26
25
  } = {}) {
27
26
  return new Plugin({
@@ -53,7 +52,7 @@ export function tableEditing({
53
52
  decorations: drawCellSelection,
54
53
  handleDOMEvents: {
55
54
  mousedown: (view, event) => {
56
- handleMouseDown(view, event, dragAndDropEnabled);
55
+ handleMouseDown(view, event);
57
56
  }
58
57
  },
59
58
  createSelectionBetween(view) {
@@ -125,7 +125,7 @@ export function handleTripleClick(view, pos) {
125
125
  view.dispatch(view.state.tr.setSelection(new CellSelection($cell)));
126
126
  return true;
127
127
  }
128
- export function handleMouseDown(view, event, dragAndDropEnabled) {
128
+ export function handleMouseDown(view, event) {
129
129
  var startEvent = event;
130
130
  // Prevent right clicks from making a cell selection https://product-fabric.atlassian.net/browse/ED-12527
131
131
  if (startEvent.ctrlKey || startEvent.metaKey || startEvent.button === 2 // right mouse click
@@ -140,7 +140,7 @@ export function handleMouseDown(view, event, dragAndDropEnabled) {
140
140
  if (startEvent.shiftKey && view.state.selection instanceof CellSelection) {
141
141
  var targetElement = event.target instanceof HTMLElement || event.target instanceof SVGElement ? event.target : null;
142
142
  var isDragHandleElement = !!targetElement && !!targetElement.closest('button.pm-table-drag-handle-button-container, button.pm-table-drag-handle-button-clickable-zone');
143
- if (dragAndDropEnabled && isDragHandleElement) {
143
+ if (isDragHandleElement) {
144
144
  return false;
145
145
  }
146
146
  setCellSelection(view.state.selection.$anchorCell, startEvent);
@@ -23,8 +23,6 @@ export function tableEditing() {
23
23
  var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
24
24
  _ref$allowTableNodeSe = _ref.allowTableNodeSelection,
25
25
  allowTableNodeSelection = _ref$allowTableNodeSe === void 0 ? false : _ref$allowTableNodeSe,
26
- _ref$dragAndDropEnabl = _ref.dragAndDropEnabled,
27
- dragAndDropEnabled = _ref$dragAndDropEnabl === void 0 ? false : _ref$dragAndDropEnabl,
28
26
  reportFixedTable = _ref.reportFixedTable;
29
27
  return new Plugin({
30
28
  key: tableEditingKey,
@@ -54,7 +52,7 @@ export function tableEditing() {
54
52
  decorations: drawCellSelection,
55
53
  handleDOMEvents: {
56
54
  mousedown: function mousedown(view, event) {
57
- handleMouseDown(view, event, dragAndDropEnabled);
55
+ handleMouseDown(view, event);
58
56
  }
59
57
  },
60
58
  createSelectionBetween: function createSelectionBetween(view) {
@@ -1,4 +1,4 @@
1
1
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
2
2
  export declare const handleKeyDown: (view: EditorView, event: KeyboardEvent) => boolean;
3
3
  export declare function handleTripleClick(view: EditorView, pos: number): boolean;
4
- export declare function handleMouseDown(view: EditorView, event: Event, dragAndDropEnabled: boolean): boolean;
4
+ export declare function handleMouseDown(view: EditorView, event: Event): boolean;
@@ -1,9 +1,8 @@
1
1
  import { Plugin } from '@atlaskit/editor-prosemirror/state';
2
2
  import type { ReportFixedTable } from '../utils/fix-tables';
3
3
  type PluginState = number | null;
4
- export declare function tableEditing({ allowTableNodeSelection, dragAndDropEnabled, reportFixedTable, }?: {
4
+ export declare function tableEditing({ allowTableNodeSelection, reportFixedTable, }?: {
5
5
  allowTableNodeSelection?: boolean;
6
- dragAndDropEnabled?: boolean;
7
6
  reportFixedTable?: ReportFixedTable;
8
7
  }): Plugin<PluginState>;
9
8
  export {};
@@ -1,4 +1,4 @@
1
1
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
2
2
  export declare const handleKeyDown: (view: EditorView, event: KeyboardEvent) => boolean;
3
3
  export declare function handleTripleClick(view: EditorView, pos: number): boolean;
4
- export declare function handleMouseDown(view: EditorView, event: Event, dragAndDropEnabled: boolean): boolean;
4
+ export declare function handleMouseDown(view: EditorView, event: Event): boolean;
@@ -1,9 +1,8 @@
1
1
  import { Plugin } from '@atlaskit/editor-prosemirror/state';
2
2
  import type { ReportFixedTable } from '../utils/fix-tables';
3
3
  type PluginState = number | null;
4
- export declare function tableEditing({ allowTableNodeSelection, dragAndDropEnabled, reportFixedTable, }?: {
4
+ export declare function tableEditing({ allowTableNodeSelection, reportFixedTable, }?: {
5
5
  allowTableNodeSelection?: boolean;
6
- dragAndDropEnabled?: boolean;
7
6
  reportFixedTable?: ReportFixedTable;
8
7
  }): Plugin<PluginState>;
9
8
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-tables",
3
- "version": "2.9.74",
3
+ "version": "2.9.76",
4
4
  "description": "A package that contains common classes and utility functions for editor tables",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -29,7 +29,7 @@
29
29
  "dependencies": {
30
30
  "@atlaskit/editor-prosemirror": "^7.3.0",
31
31
  "@atlaskit/platform-feature-flags": "^1.1.0",
32
- "@atlaskit/tmp-editor-statsig": "^64.0.0",
32
+ "@atlaskit/tmp-editor-statsig": "^66.0.0",
33
33
  "@babel/runtime": "^7.0.0"
34
34
  },
35
35
  "devDependencies": {