@atlaskit/editor-plugin-table 13.0.6 → 13.0.7
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 +10 -0
- package/dist/cjs/nodeviews/TableComponent.js +5 -3
- package/dist/cjs/pm-plugins/drag-and-drop/plugin.js +26 -0
- package/dist/es2019/nodeviews/TableComponent.js +5 -3
- package/dist/es2019/pm-plugins/drag-and-drop/plugin.js +26 -0
- package/dist/esm/nodeviews/TableComponent.js +5 -3
- package/dist/esm/pm-plugins/drag-and-drop/plugin.js +26 -0
- package/package.json +7 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-table
|
|
2
2
|
|
|
3
|
+
## 13.0.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`5be5ab89fb72d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5be5ab89fb72d) -
|
|
8
|
+
Add tableDragAndDrop insm feature tracking
|
|
9
|
+
- [`790dacebab86f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/790dacebab86f) -
|
|
10
|
+
fix table resize issue when table scailing experiment is on
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
3
13
|
## 13.0.6
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
|
@@ -461,6 +461,10 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
461
461
|
}
|
|
462
462
|
}
|
|
463
463
|
});
|
|
464
|
+
if ((0, _expValEquals.expValEquals)('platform_editor_tables_scaling_css', 'isEnabled', true)) {
|
|
465
|
+
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
466
|
+
window.addEventListener('resize', this.handleWindowResizeNewDebounced);
|
|
467
|
+
}
|
|
464
468
|
}
|
|
465
469
|
}
|
|
466
470
|
}, {
|
|
@@ -551,8 +555,6 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
551
555
|
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
552
556
|
window.addEventListener('resize', this.handleWindowResizeDebounced);
|
|
553
557
|
}
|
|
554
|
-
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
555
|
-
window.addEventListener('resize', this.handleWindowResizeNewDebounced);
|
|
556
558
|
this.handleTableResizingDebounced();
|
|
557
559
|
}
|
|
558
560
|
var currentStickyState = _pluginKey.pluginKey.getState(this.props.view.state);
|
|
@@ -606,7 +608,7 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
606
608
|
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
607
609
|
window.removeEventListener('resize', this.handleWindowResizeDebounced);
|
|
608
610
|
}
|
|
609
|
-
if (
|
|
611
|
+
if ((0, _expValEquals.expValEquals)('platform_editor_tables_scaling_css', 'isEnabled', true)) {
|
|
610
612
|
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
611
613
|
window.removeEventListener('resize', this.handleWindowResizeNewDebounced);
|
|
612
614
|
}
|
|
@@ -9,9 +9,11 @@ var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
|
|
|
9
9
|
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
|
+
var _insm = require("@atlaskit/insm");
|
|
12
13
|
var _element = require("@atlaskit/pragmatic-drag-and-drop-auto-scroll/element");
|
|
13
14
|
var _combine = require("@atlaskit/pragmatic-drag-and-drop/combine");
|
|
14
15
|
var _adapter = require("@atlaskit/pragmatic-drag-and-drop/element/adapter");
|
|
16
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
15
17
|
var _pluginFactory = require("../plugin-factory");
|
|
16
18
|
var _pluginKey = require("../plugin-key");
|
|
17
19
|
var _colgroup = require("../table-resizing/utils/colgroup");
|
|
@@ -34,12 +36,20 @@ var destroyFn = function destroyFn(editorView, editorAnalyticsAPI, isTableScalin
|
|
|
34
36
|
return type === 'table-row';
|
|
35
37
|
},
|
|
36
38
|
onDragStart: function onDragStart() {
|
|
39
|
+
if ((0, _expValEquals.expValEquals)('cc_editor_interactivity_monitoring', 'isEnabled', true)) {
|
|
40
|
+
var _insm$session;
|
|
41
|
+
(_insm$session = _insm.insm.session) === null || _insm$session === void 0 || _insm$session.startFeature('tableDragAndDrop');
|
|
42
|
+
}
|
|
37
43
|
// auto scroller doesn't work when scroll-behavior: smooth is set, this monitor temporarily removes it via inline styles
|
|
38
44
|
// Ignored via go/ees005
|
|
39
45
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
40
46
|
editorPageScrollContainer.style.setProperty('scroll-behavior', 'unset');
|
|
41
47
|
},
|
|
42
48
|
onDrop: function onDrop() {
|
|
49
|
+
if ((0, _expValEquals.expValEquals)('cc_editor_interactivity_monitoring', 'isEnabled', true)) {
|
|
50
|
+
var _insm$session2;
|
|
51
|
+
(_insm$session2 = _insm.insm.session) === null || _insm$session2 === void 0 || _insm$session2.endFeature('tableDragAndDrop');
|
|
52
|
+
}
|
|
43
53
|
// 'null' will remove the inline style
|
|
44
54
|
// Ignored via go/ees005
|
|
45
55
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
@@ -76,6 +86,10 @@ var destroyFn = function destroyFn(editorView, editorAnalyticsAPI, isTableScalin
|
|
|
76
86
|
},
|
|
77
87
|
onDragStart: function onDragStart(_ref7) {
|
|
78
88
|
var location = _ref7.location;
|
|
89
|
+
if ((0, _expValEquals.expValEquals)('cc_editor_interactivity_monitoring', 'isEnabled', true)) {
|
|
90
|
+
var _insm$session3;
|
|
91
|
+
(_insm$session3 = _insm.insm.session) === null || _insm$session3 === void 0 || _insm$session3.startFeature('tableDragAndDrop');
|
|
92
|
+
}
|
|
79
93
|
(0, _commands.toggleDragMenu)(false)(editorView.state, editorView.dispatch);
|
|
80
94
|
},
|
|
81
95
|
onDrag: function onDrag(event) {
|
|
@@ -124,6 +138,10 @@ var destroyFn = function destroyFn(editorView, editorAnalyticsAPI, isTableScalin
|
|
|
124
138
|
var _event$source, _event$source2;
|
|
125
139
|
// If we're able to determine the source type of the dropped element then we should report to analytics that
|
|
126
140
|
// the drop event was cancelled. Otherwise we will cancel silently.
|
|
141
|
+
if ((0, _expValEquals.expValEquals)('cc_editor_interactivity_monitoring', 'isEnabled', true)) {
|
|
142
|
+
var _insm$session4;
|
|
143
|
+
(_insm$session4 = _insm.insm.session) === null || _insm$session4 === void 0 || _insm$session4.endFeature('tableDragAndDrop');
|
|
144
|
+
}
|
|
127
145
|
if ((event === null || event === void 0 || (_event$source = event.source) === null || _event$source === void 0 || (_event$source = _event$source.data) === null || _event$source === void 0 ? void 0 : _event$source.type) === 'table-row' || (event === null || event === void 0 || (_event$source2 = event.source) === null || _event$source2 === void 0 || (_event$source2 = _event$source2.data) === null || _event$source2 === void 0 ? void 0 : _event$source2.type) === 'table-column') {
|
|
128
146
|
var _event$source$data;
|
|
129
147
|
return (0, _commandsWithAnalytics.clearDropTargetWithAnalytics)(editorAnalyticsAPI)(_analytics.INPUT_METHOD.DRAG_AND_DROP, event.source.data.type, (_event$source$data = event.source.data) === null || _event$source$data === void 0 ? void 0 : _event$source$data.indexes, _analytics.TABLE_STATUS.CANCELLED, tr)(editorView.state, editorView.dispatch);
|
|
@@ -150,6 +168,10 @@ var destroyFn = function destroyFn(editorView, editorAnalyticsAPI, isTableScalin
|
|
|
150
168
|
(0, _commandsWithAnalytics.clearDropTargetWithAnalytics)(editorAnalyticsAPI)(_analytics.INPUT_METHOD.DRAG_AND_DROP, sourceType, sourceIndexes,
|
|
151
169
|
// This event is mrked as invalid because the user is attempting to drop an element in an area which has merged cells.
|
|
152
170
|
_analytics.TABLE_STATUS.INVALID, tr)(editorView.state, editorView.dispatch);
|
|
171
|
+
if ((0, _expValEquals.expValEquals)('cc_editor_interactivity_monitoring', 'isEnabled', true)) {
|
|
172
|
+
var _insm$session5;
|
|
173
|
+
(_insm$session5 = _insm.insm.session) === null || _insm$session5 === void 0 || _insm$session5.endFeature('tableDragAndDrop');
|
|
174
|
+
}
|
|
153
175
|
return;
|
|
154
176
|
}
|
|
155
177
|
requestAnimationFrame(function () {
|
|
@@ -179,6 +201,10 @@ var destroyFn = function destroyFn(editorView, editorAnalyticsAPI, isTableScalin
|
|
|
179
201
|
}
|
|
180
202
|
}
|
|
181
203
|
editorView.focus();
|
|
204
|
+
if ((0, _expValEquals.expValEquals)('cc_editor_interactivity_monitoring', 'isEnabled', true)) {
|
|
205
|
+
var _insm$session6;
|
|
206
|
+
(_insm$session6 = _insm.insm.session) === null || _insm$session6 === void 0 || _insm$session6.endFeature('tableDragAndDrop');
|
|
207
|
+
}
|
|
182
208
|
});
|
|
183
209
|
}
|
|
184
210
|
})]));
|
|
@@ -448,6 +448,10 @@ class TableComponent extends React.Component {
|
|
|
448
448
|
}
|
|
449
449
|
}
|
|
450
450
|
});
|
|
451
|
+
if (expValEquals('platform_editor_tables_scaling_css', 'isEnabled', true)) {
|
|
452
|
+
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
453
|
+
window.addEventListener('resize', this.handleWindowResizeNewDebounced);
|
|
454
|
+
}
|
|
451
455
|
}
|
|
452
456
|
}
|
|
453
457
|
initialiseEventListenersAfterMount() {
|
|
@@ -525,8 +529,6 @@ class TableComponent extends React.Component {
|
|
|
525
529
|
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
526
530
|
window.addEventListener('resize', this.handleWindowResizeDebounced);
|
|
527
531
|
}
|
|
528
|
-
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
529
|
-
window.addEventListener('resize', this.handleWindowResizeNewDebounced);
|
|
530
532
|
this.handleTableResizingDebounced();
|
|
531
533
|
}
|
|
532
534
|
const currentStickyState = stickyHeadersPluginKey.getState(this.props.view.state);
|
|
@@ -579,7 +581,7 @@ class TableComponent extends React.Component {
|
|
|
579
581
|
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
580
582
|
window.removeEventListener('resize', this.handleWindowResizeDebounced);
|
|
581
583
|
}
|
|
582
|
-
if (
|
|
584
|
+
if (expValEquals('platform_editor_tables_scaling_css', 'isEnabled', true)) {
|
|
583
585
|
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
584
586
|
window.removeEventListener('resize', this.handleWindowResizeNewDebounced);
|
|
585
587
|
}
|
|
@@ -3,9 +3,11 @@ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
|
3
3
|
import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
4
4
|
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
5
5
|
import { getCellsInRow, getSelectedCellInfo } from '@atlaskit/editor-tables/utils';
|
|
6
|
+
import { insm } from '@atlaskit/insm';
|
|
6
7
|
import { autoScrollForElements } from '@atlaskit/pragmatic-drag-and-drop-auto-scroll/element';
|
|
7
8
|
import { combine } from '@atlaskit/pragmatic-drag-and-drop/combine';
|
|
8
9
|
import { monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
|
|
10
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
9
11
|
import { getPluginState as getTablePluginState } from '../plugin-factory';
|
|
10
12
|
import { pluginKey as tablePluginKey } from '../plugin-key';
|
|
11
13
|
import { insertColgroupFromNode } from '../table-resizing/utils/colgroup';
|
|
@@ -30,12 +32,20 @@ const destroyFn = (editorView, editorAnalyticsAPI, isTableScalingEnabled, isTabl
|
|
|
30
32
|
return type === 'table-row';
|
|
31
33
|
},
|
|
32
34
|
onDragStart() {
|
|
35
|
+
if (expValEquals('cc_editor_interactivity_monitoring', 'isEnabled', true)) {
|
|
36
|
+
var _insm$session;
|
|
37
|
+
(_insm$session = insm.session) === null || _insm$session === void 0 ? void 0 : _insm$session.startFeature('tableDragAndDrop');
|
|
38
|
+
}
|
|
33
39
|
// auto scroller doesn't work when scroll-behavior: smooth is set, this monitor temporarily removes it via inline styles
|
|
34
40
|
// Ignored via go/ees005
|
|
35
41
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
36
42
|
editorPageScrollContainer.style.setProperty('scroll-behavior', 'unset');
|
|
37
43
|
},
|
|
38
44
|
onDrop() {
|
|
45
|
+
if (expValEquals('cc_editor_interactivity_monitoring', 'isEnabled', true)) {
|
|
46
|
+
var _insm$session2;
|
|
47
|
+
(_insm$session2 = insm.session) === null || _insm$session2 === void 0 ? void 0 : _insm$session2.endFeature('tableDragAndDrop');
|
|
48
|
+
}
|
|
39
49
|
// 'null' will remove the inline style
|
|
40
50
|
// Ignored via go/ees005
|
|
41
51
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
@@ -78,6 +88,10 @@ const destroyFn = (editorView, editorAnalyticsAPI, isTableScalingEnabled, isTabl
|
|
|
78
88
|
onDragStart: ({
|
|
79
89
|
location
|
|
80
90
|
}) => {
|
|
91
|
+
if (expValEquals('cc_editor_interactivity_monitoring', 'isEnabled', true)) {
|
|
92
|
+
var _insm$session3;
|
|
93
|
+
(_insm$session3 = insm.session) === null || _insm$session3 === void 0 ? void 0 : _insm$session3.startFeature('tableDragAndDrop');
|
|
94
|
+
}
|
|
81
95
|
toggleDragMenu(false)(editorView.state, editorView.dispatch);
|
|
82
96
|
},
|
|
83
97
|
onDrag(event) {
|
|
@@ -129,6 +143,10 @@ const destroyFn = (editorView, editorAnalyticsAPI, isTableScalingEnabled, isTabl
|
|
|
129
143
|
var _event$source, _event$source$data, _event$source2, _event$source2$data;
|
|
130
144
|
// If we're able to determine the source type of the dropped element then we should report to analytics that
|
|
131
145
|
// the drop event was cancelled. Otherwise we will cancel silently.
|
|
146
|
+
if (expValEquals('cc_editor_interactivity_monitoring', 'isEnabled', true)) {
|
|
147
|
+
var _insm$session4;
|
|
148
|
+
(_insm$session4 = insm.session) === null || _insm$session4 === void 0 ? void 0 : _insm$session4.endFeature('tableDragAndDrop');
|
|
149
|
+
}
|
|
132
150
|
if ((event === null || event === void 0 ? void 0 : (_event$source = event.source) === null || _event$source === void 0 ? void 0 : (_event$source$data = _event$source.data) === null || _event$source$data === void 0 ? void 0 : _event$source$data.type) === 'table-row' || (event === null || event === void 0 ? void 0 : (_event$source2 = event.source) === null || _event$source2 === void 0 ? void 0 : (_event$source2$data = _event$source2.data) === null || _event$source2$data === void 0 ? void 0 : _event$source2$data.type) === 'table-column') {
|
|
133
151
|
var _event$source$data2;
|
|
134
152
|
return clearDropTargetWithAnalytics(editorAnalyticsAPI)(INPUT_METHOD.DRAG_AND_DROP, event.source.data.type, (_event$source$data2 = event.source.data) === null || _event$source$data2 === void 0 ? void 0 : _event$source$data2.indexes, TABLE_STATUS.CANCELLED, tr)(editorView.state, editorView.dispatch);
|
|
@@ -157,6 +175,10 @@ const destroyFn = (editorView, editorAnalyticsAPI, isTableScalingEnabled, isTabl
|
|
|
157
175
|
clearDropTargetWithAnalytics(editorAnalyticsAPI)(INPUT_METHOD.DRAG_AND_DROP, sourceType, sourceIndexes,
|
|
158
176
|
// This event is mrked as invalid because the user is attempting to drop an element in an area which has merged cells.
|
|
159
177
|
TABLE_STATUS.INVALID, tr)(editorView.state, editorView.dispatch);
|
|
178
|
+
if (expValEquals('cc_editor_interactivity_monitoring', 'isEnabled', true)) {
|
|
179
|
+
var _insm$session5;
|
|
180
|
+
(_insm$session5 = insm.session) === null || _insm$session5 === void 0 ? void 0 : _insm$session5.endFeature('tableDragAndDrop');
|
|
181
|
+
}
|
|
160
182
|
return;
|
|
161
183
|
}
|
|
162
184
|
requestAnimationFrame(() => {
|
|
@@ -187,6 +209,10 @@ const destroyFn = (editorView, editorAnalyticsAPI, isTableScalingEnabled, isTabl
|
|
|
187
209
|
}
|
|
188
210
|
}
|
|
189
211
|
editorView.focus();
|
|
212
|
+
if (expValEquals('cc_editor_interactivity_monitoring', 'isEnabled', true)) {
|
|
213
|
+
var _insm$session6;
|
|
214
|
+
(_insm$session6 = insm.session) === null || _insm$session6 === void 0 ? void 0 : _insm$session6.endFeature('tableDragAndDrop');
|
|
215
|
+
}
|
|
190
216
|
});
|
|
191
217
|
}
|
|
192
218
|
}));
|
|
@@ -455,6 +455,10 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
455
455
|
}
|
|
456
456
|
}
|
|
457
457
|
});
|
|
458
|
+
if (expValEquals('platform_editor_tables_scaling_css', 'isEnabled', true)) {
|
|
459
|
+
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
460
|
+
window.addEventListener('resize', this.handleWindowResizeNewDebounced);
|
|
461
|
+
}
|
|
458
462
|
}
|
|
459
463
|
}
|
|
460
464
|
}, {
|
|
@@ -545,8 +549,6 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
545
549
|
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
546
550
|
window.addEventListener('resize', this.handleWindowResizeDebounced);
|
|
547
551
|
}
|
|
548
|
-
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
549
|
-
window.addEventListener('resize', this.handleWindowResizeNewDebounced);
|
|
550
552
|
this.handleTableResizingDebounced();
|
|
551
553
|
}
|
|
552
554
|
var currentStickyState = stickyHeadersPluginKey.getState(this.props.view.state);
|
|
@@ -600,7 +602,7 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
600
602
|
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
601
603
|
window.removeEventListener('resize', this.handleWindowResizeDebounced);
|
|
602
604
|
}
|
|
603
|
-
if (
|
|
605
|
+
if (expValEquals('platform_editor_tables_scaling_css', 'isEnabled', true)) {
|
|
604
606
|
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
605
607
|
window.removeEventListener('resize', this.handleWindowResizeNewDebounced);
|
|
606
608
|
}
|
|
@@ -3,9 +3,11 @@ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
|
3
3
|
import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
4
4
|
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
5
5
|
import { getCellsInRow, getSelectedCellInfo } from '@atlaskit/editor-tables/utils';
|
|
6
|
+
import { insm } from '@atlaskit/insm';
|
|
6
7
|
import { autoScrollForElements } from '@atlaskit/pragmatic-drag-and-drop-auto-scroll/element';
|
|
7
8
|
import { combine } from '@atlaskit/pragmatic-drag-and-drop/combine';
|
|
8
9
|
import { monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
|
|
10
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
9
11
|
import { getPluginState as getTablePluginState } from '../plugin-factory';
|
|
10
12
|
import { pluginKey as tablePluginKey } from '../plugin-key';
|
|
11
13
|
import { insertColgroupFromNode } from '../table-resizing/utils/colgroup';
|
|
@@ -28,12 +30,20 @@ var destroyFn = function destroyFn(editorView, editorAnalyticsAPI, isTableScalin
|
|
|
28
30
|
return type === 'table-row';
|
|
29
31
|
},
|
|
30
32
|
onDragStart: function onDragStart() {
|
|
33
|
+
if (expValEquals('cc_editor_interactivity_monitoring', 'isEnabled', true)) {
|
|
34
|
+
var _insm$session;
|
|
35
|
+
(_insm$session = insm.session) === null || _insm$session === void 0 || _insm$session.startFeature('tableDragAndDrop');
|
|
36
|
+
}
|
|
31
37
|
// auto scroller doesn't work when scroll-behavior: smooth is set, this monitor temporarily removes it via inline styles
|
|
32
38
|
// Ignored via go/ees005
|
|
33
39
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
34
40
|
editorPageScrollContainer.style.setProperty('scroll-behavior', 'unset');
|
|
35
41
|
},
|
|
36
42
|
onDrop: function onDrop() {
|
|
43
|
+
if (expValEquals('cc_editor_interactivity_monitoring', 'isEnabled', true)) {
|
|
44
|
+
var _insm$session2;
|
|
45
|
+
(_insm$session2 = insm.session) === null || _insm$session2 === void 0 || _insm$session2.endFeature('tableDragAndDrop');
|
|
46
|
+
}
|
|
37
47
|
// 'null' will remove the inline style
|
|
38
48
|
// Ignored via go/ees005
|
|
39
49
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
@@ -70,6 +80,10 @@ var destroyFn = function destroyFn(editorView, editorAnalyticsAPI, isTableScalin
|
|
|
70
80
|
},
|
|
71
81
|
onDragStart: function onDragStart(_ref7) {
|
|
72
82
|
var location = _ref7.location;
|
|
83
|
+
if (expValEquals('cc_editor_interactivity_monitoring', 'isEnabled', true)) {
|
|
84
|
+
var _insm$session3;
|
|
85
|
+
(_insm$session3 = insm.session) === null || _insm$session3 === void 0 || _insm$session3.startFeature('tableDragAndDrop');
|
|
86
|
+
}
|
|
73
87
|
toggleDragMenu(false)(editorView.state, editorView.dispatch);
|
|
74
88
|
},
|
|
75
89
|
onDrag: function onDrag(event) {
|
|
@@ -118,6 +132,10 @@ var destroyFn = function destroyFn(editorView, editorAnalyticsAPI, isTableScalin
|
|
|
118
132
|
var _event$source, _event$source2;
|
|
119
133
|
// If we're able to determine the source type of the dropped element then we should report to analytics that
|
|
120
134
|
// the drop event was cancelled. Otherwise we will cancel silently.
|
|
135
|
+
if (expValEquals('cc_editor_interactivity_monitoring', 'isEnabled', true)) {
|
|
136
|
+
var _insm$session4;
|
|
137
|
+
(_insm$session4 = insm.session) === null || _insm$session4 === void 0 || _insm$session4.endFeature('tableDragAndDrop');
|
|
138
|
+
}
|
|
121
139
|
if ((event === null || event === void 0 || (_event$source = event.source) === null || _event$source === void 0 || (_event$source = _event$source.data) === null || _event$source === void 0 ? void 0 : _event$source.type) === 'table-row' || (event === null || event === void 0 || (_event$source2 = event.source) === null || _event$source2 === void 0 || (_event$source2 = _event$source2.data) === null || _event$source2 === void 0 ? void 0 : _event$source2.type) === 'table-column') {
|
|
122
140
|
var _event$source$data;
|
|
123
141
|
return clearDropTargetWithAnalytics(editorAnalyticsAPI)(INPUT_METHOD.DRAG_AND_DROP, event.source.data.type, (_event$source$data = event.source.data) === null || _event$source$data === void 0 ? void 0 : _event$source$data.indexes, TABLE_STATUS.CANCELLED, tr)(editorView.state, editorView.dispatch);
|
|
@@ -144,6 +162,10 @@ var destroyFn = function destroyFn(editorView, editorAnalyticsAPI, isTableScalin
|
|
|
144
162
|
clearDropTargetWithAnalytics(editorAnalyticsAPI)(INPUT_METHOD.DRAG_AND_DROP, sourceType, sourceIndexes,
|
|
145
163
|
// This event is mrked as invalid because the user is attempting to drop an element in an area which has merged cells.
|
|
146
164
|
TABLE_STATUS.INVALID, tr)(editorView.state, editorView.dispatch);
|
|
165
|
+
if (expValEquals('cc_editor_interactivity_monitoring', 'isEnabled', true)) {
|
|
166
|
+
var _insm$session5;
|
|
167
|
+
(_insm$session5 = insm.session) === null || _insm$session5 === void 0 || _insm$session5.endFeature('tableDragAndDrop');
|
|
168
|
+
}
|
|
147
169
|
return;
|
|
148
170
|
}
|
|
149
171
|
requestAnimationFrame(function () {
|
|
@@ -173,6 +195,10 @@ var destroyFn = function destroyFn(editorView, editorAnalyticsAPI, isTableScalin
|
|
|
173
195
|
}
|
|
174
196
|
}
|
|
175
197
|
editorView.focus();
|
|
198
|
+
if (expValEquals('cc_editor_interactivity_monitoring', 'isEnabled', true)) {
|
|
199
|
+
var _insm$session6;
|
|
200
|
+
(_insm$session6 = insm.session) === null || _insm$session6 === void 0 || _insm$session6.endFeature('tableDragAndDrop');
|
|
201
|
+
}
|
|
176
202
|
});
|
|
177
203
|
}
|
|
178
204
|
})]));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-table",
|
|
3
|
-
"version": "13.0.
|
|
3
|
+
"version": "13.0.7",
|
|
4
4
|
"description": "Table plugin for the @atlaskit/editor",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -48,18 +48,19 @@
|
|
|
48
48
|
"@atlaskit/editor-shared-styles": "^3.6.0",
|
|
49
49
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
50
50
|
"@atlaskit/icon": "^28.1.0",
|
|
51
|
-
"@atlaskit/
|
|
51
|
+
"@atlaskit/insm": "^0.1.0",
|
|
52
|
+
"@atlaskit/menu": "^8.4.0",
|
|
52
53
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
53
54
|
"@atlaskit/platform-feature-flags-react": "^0.3.0",
|
|
54
55
|
"@atlaskit/pragmatic-drag-and-drop": "^1.7.0",
|
|
55
56
|
"@atlaskit/pragmatic-drag-and-drop-auto-scroll": "^2.1.0",
|
|
56
57
|
"@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.1.0",
|
|
57
|
-
"@atlaskit/primitives": "^14.
|
|
58
|
+
"@atlaskit/primitives": "^14.13.0",
|
|
58
59
|
"@atlaskit/react-ufo": "^4.5.0",
|
|
59
60
|
"@atlaskit/theme": "^20.0.0",
|
|
60
|
-
"@atlaskit/tmp-editor-statsig": "^12.
|
|
61
|
+
"@atlaskit/tmp-editor-statsig": "^12.5.0",
|
|
61
62
|
"@atlaskit/toggle": "^15.1.0",
|
|
62
|
-
"@atlaskit/tokens": "^6.
|
|
63
|
+
"@atlaskit/tokens": "^6.2.0",
|
|
63
64
|
"@atlaskit/tooltip": "^20.4.0",
|
|
64
65
|
"@babel/runtime": "^7.0.0",
|
|
65
66
|
"@emotion/react": "^11.7.1",
|
|
@@ -70,7 +71,7 @@
|
|
|
70
71
|
"uuid": "^3.1.0"
|
|
71
72
|
},
|
|
72
73
|
"peerDependencies": {
|
|
73
|
-
"@atlaskit/editor-common": "^108.
|
|
74
|
+
"@atlaskit/editor-common": "^108.3.0",
|
|
74
75
|
"react": "^18.2.0",
|
|
75
76
|
"react-dom": "^18.2.0",
|
|
76
77
|
"react-intl-next": "npm:react-intl@^5.18.1"
|