@atlaskit/editor-plugin-table 24.3.14 → 24.4.1

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 (73) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/dist/cjs/nodeviews/TableResizer.js +4 -10
  3. package/dist/cjs/nodeviews/TableSSRReactContextsProvider.js +23 -0
  4. package/dist/cjs/nodeviews/table-node-views.js +1 -1
  5. package/dist/cjs/nodeviews/table.js +14 -21
  6. package/dist/cjs/pm-plugins/commands/insert.js +10 -1
  7. package/dist/cjs/pm-plugins/drag-and-drop/plugin.js +12 -25
  8. package/dist/cjs/pm-plugins/main.js +3 -1
  9. package/dist/cjs/pm-plugins/table-resizing/event-handlers.js +10 -22
  10. package/dist/cjs/pm-plugins/table-resizing/utils/colgroup.js +2 -1
  11. package/dist/cjs/tablePlugin.js +10 -1
  12. package/dist/cjs/ui/TableMenu/cell/getCellMenuComponents.js +153 -1
  13. package/dist/cjs/ui/TableMenu/cell/keys.js +19 -5
  14. package/dist/cjs/ui/TableMenu/column/getColumnMenuComponents.js +166 -1
  15. package/dist/cjs/ui/TableMenu/column/items/AddColumnRightItem.js +2 -2
  16. package/dist/cjs/ui/TableMenu/column/items/DeleteColumnItem.js +3 -3
  17. package/dist/cjs/ui/TableMenu/column/items/DistributeColumnsItem.js +2 -2
  18. package/dist/cjs/ui/TableMenu/row/getRowMenuComponents.js +136 -1
  19. package/dist/cjs/ui/TableMenu/row/items/AddRowBelowItem.js +2 -2
  20. package/dist/cjs/ui/TableMenu/row/items/DeleteRowItem.js +3 -3
  21. package/dist/cjs/ui/TableMenu/shared/getSharedItems.js +141 -1
  22. package/dist/cjs/ui/TableMenu/shared/selection.js +19 -0
  23. package/dist/es2019/nodeviews/TableResizer.js +4 -10
  24. package/dist/es2019/nodeviews/TableSSRReactContextsProvider.js +17 -0
  25. package/dist/es2019/nodeviews/table-node-views.js +1 -1
  26. package/dist/es2019/nodeviews/table.js +15 -22
  27. package/dist/es2019/pm-plugins/commands/insert.js +10 -1
  28. package/dist/es2019/pm-plugins/drag-and-drop/plugin.js +12 -25
  29. package/dist/es2019/pm-plugins/main.js +4 -2
  30. package/dist/es2019/pm-plugins/table-resizing/event-handlers.js +10 -22
  31. package/dist/es2019/pm-plugins/table-resizing/utils/colgroup.js +2 -1
  32. package/dist/es2019/tablePlugin.js +10 -1
  33. package/dist/es2019/ui/TableMenu/cell/getCellMenuComponents.js +134 -2
  34. package/dist/es2019/ui/TableMenu/cell/keys.js +25 -2
  35. package/dist/es2019/ui/TableMenu/column/getColumnMenuComponents.js +144 -1
  36. package/dist/es2019/ui/TableMenu/column/items/AddColumnRightItem.js +2 -2
  37. package/dist/es2019/ui/TableMenu/column/items/DeleteColumnItem.js +3 -3
  38. package/dist/es2019/ui/TableMenu/column/items/DistributeColumnsItem.js +2 -2
  39. package/dist/es2019/ui/TableMenu/row/getRowMenuComponents.js +118 -1
  40. package/dist/es2019/ui/TableMenu/row/items/AddRowBelowItem.js +2 -2
  41. package/dist/es2019/ui/TableMenu/row/items/DeleteRowItem.js +3 -3
  42. package/dist/es2019/ui/TableMenu/shared/getSharedItems.js +130 -4
  43. package/dist/es2019/ui/TableMenu/shared/selection.js +14 -0
  44. package/dist/esm/nodeviews/TableResizer.js +4 -10
  45. package/dist/esm/nodeviews/TableSSRReactContextsProvider.js +16 -0
  46. package/dist/esm/nodeviews/table-node-views.js +1 -1
  47. package/dist/esm/nodeviews/table.js +15 -22
  48. package/dist/esm/pm-plugins/commands/insert.js +10 -1
  49. package/dist/esm/pm-plugins/drag-and-drop/plugin.js +12 -25
  50. package/dist/esm/pm-plugins/main.js +4 -2
  51. package/dist/esm/pm-plugins/table-resizing/event-handlers.js +10 -22
  52. package/dist/esm/pm-plugins/table-resizing/utils/colgroup.js +2 -1
  53. package/dist/esm/tablePlugin.js +10 -1
  54. package/dist/esm/ui/TableMenu/cell/getCellMenuComponents.js +154 -2
  55. package/dist/esm/ui/TableMenu/cell/keys.js +16 -2
  56. package/dist/esm/ui/TableMenu/column/getColumnMenuComponents.js +166 -1
  57. package/dist/esm/ui/TableMenu/column/items/AddColumnRightItem.js +2 -2
  58. package/dist/esm/ui/TableMenu/column/items/DeleteColumnItem.js +3 -3
  59. package/dist/esm/ui/TableMenu/column/items/DistributeColumnsItem.js +2 -2
  60. package/dist/esm/ui/TableMenu/row/getRowMenuComponents.js +136 -1
  61. package/dist/esm/ui/TableMenu/row/items/AddRowBelowItem.js +2 -2
  62. package/dist/esm/ui/TableMenu/row/items/DeleteRowItem.js +3 -3
  63. package/dist/esm/ui/TableMenu/shared/getSharedItems.js +144 -4
  64. package/dist/esm/ui/TableMenu/shared/selection.js +14 -0
  65. package/dist/types/nodeviews/TableSSRReactContextsProvider.d.ts +8 -0
  66. package/dist/types/nodeviews/table-node-views.d.ts +2 -0
  67. package/dist/types/nodeviews/table.d.ts +3 -1
  68. package/dist/types/nodeviews/types.d.ts +2 -0
  69. package/dist/types/tablePluginType.d.ts +3 -2
  70. package/dist/types/ui/TableMenu/cell/keys.d.ts +2 -0
  71. package/dist/types/ui/TableMenu/column/getColumnMenuComponents.d.ts +1 -1
  72. package/dist/types/ui/TableMenu/shared/selection.d.ts +8 -0
  73. package/package.json +9 -3
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ import { RawIntlProvider } from 'react-intl';
3
+ import { isSSR, isSSRStreaming } from '@atlaskit/editor-common/core-utils';
4
+ export function TableSSRReactContextsProvider(_ref) {
5
+ var children = _ref.children,
6
+ intl = _ref.intl;
7
+ if (!isSSR() || !isSSRStreaming()) {
8
+ return children;
9
+ }
10
+ if (!intl) {
11
+ return children;
12
+ }
13
+ return /*#__PURE__*/React.createElement(RawIntlProvider, {
14
+ value: intl
15
+ }, children);
16
+ }
@@ -7,7 +7,7 @@ import TableRow from './TableRow';
7
7
  import TableRowNativeStickyWithFallback from './TableRowNativeStickyWithFallback';
8
8
  export var tableView = function tableView(options) {
9
9
  return function (node, view, getPos) {
10
- return createTableView(node, view, getPos, options.portalProviderAPI, options.eventDispatcher, options.getEditorContainerWidth, options.getEditorFeatureFlags, options.dispatchAnalyticsEvent, options.pluginInjectionApi, options.isCommentEditor, options.isChromelessEditor, options === null || options === void 0 ? void 0 : options.allowFixedColumnWidthOption);
10
+ return createTableView(node, view, getPos, options.portalProviderAPI, options.eventDispatcher, options.getEditorContainerWidth, options.getEditorFeatureFlags, options.dispatchAnalyticsEvent, options.pluginInjectionApi, options.isCommentEditor, options.isChromelessEditor, options === null || options === void 0 ? void 0 : options.allowFixedColumnWidthOption, options.intl);
11
11
  };
12
12
  };
13
13
  export var tableCellView = function tableCellView(options) {
@@ -10,7 +10,7 @@ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstruct
10
10
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
11
11
  function _superPropGet(t, o, e, r) { var p = _get(_getPrototypeOf(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; }
12
12
  import React from 'react';
13
- import { isSSR, isSSRStreaming } from '@atlaskit/editor-common/core-utils';
13
+ import { isSSRStreaming } from '@atlaskit/editor-common/core-utils';
14
14
  import { getTableContainerWidth } from '@atlaskit/editor-common/node-width';
15
15
  import ReactNodeView from '@atlaskit/editor-common/react-node-view';
16
16
  import { isTableInContentMode } from '@atlaskit/editor-common/table';
@@ -27,6 +27,7 @@ import { isTableNested, tablesHaveDifferentColumnWidths } from '../pm-plugins/ut
27
27
  import { isContentModeSupported } from '../pm-plugins/utils/tableMode/is-content-mode-supported';
28
28
  import { RoundedTableEdges } from './rounded-table-edges';
29
29
  import { TableComponentWithSharedState } from './TableComponentWithSharedState';
30
+ import { TableSSRReactContextsProvider } from './TableSSRReactContextsProvider';
30
31
  import { tableNodeSpecWithFixedToDOM } from './toDOM';
31
32
  var tableAttributes = function tableAttributes(node) {
32
33
  return {
@@ -74,6 +75,7 @@ var TableView = /*#__PURE__*/function (_ReactNodeView) {
74
75
  _this.eventDispatcher = props.eventDispatcher;
75
76
  _this.options = props.options;
76
77
  _this.getEditorFeatureFlags = props.getEditorFeatureFlags;
78
+ _this.intl = props.intl;
77
79
  if (expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true)) {
78
80
  _this.roundedTableEdges = new RoundedTableEdges(function () {
79
81
  return _this.table;
@@ -161,7 +163,11 @@ var TableView = /*#__PURE__*/function (_ReactNodeView) {
161
163
  }
162
164
 
163
165
  // Remove the ProseMirror table DOM structure to avoid duplication, as it's replaced with the React table node.
164
- if (this.dom && this.renderedDOM) {
166
+ // In SSR streaming the portal renders via `container.innerHTML = html` (portal/common.tsx), which detaches
167
+ // `renderedDOM` from `dom` before this runs; require it to still be a child so `removeChild` doesn't throw
168
+ // `NotFoundError` (which would make EditorSSRRenderer fall back to the position-blind schema toDOM and lose
169
+ // nested detection). CSR keeps the original condition unchanged.
170
+ if (this.dom && this.renderedDOM && (!isSSRStreaming() || this.renderedDOM.parentNode === this.dom)) {
165
171
  this.dom.removeChild(this.renderedDOM);
166
172
  }
167
173
  // Move the table from the ProseMirror table structure into the React rendered table node.
@@ -265,7 +271,9 @@ var TableView = /*#__PURE__*/function (_ReactNodeView) {
265
271
  }, {
266
272
  key: "render",
267
273
  value: function render(props, forwardRef) {
268
- return /*#__PURE__*/React.createElement(TableComponentWithSharedState, {
274
+ return /*#__PURE__*/React.createElement(TableSSRReactContextsProvider, {
275
+ intl: this.intl
276
+ }, /*#__PURE__*/React.createElement(TableComponentWithSharedState, {
269
277
  forwardRef: forwardRef,
270
278
  getNode: this.getNode,
271
279
  view: props.view,
@@ -280,7 +288,7 @@ var TableView = /*#__PURE__*/function (_ReactNodeView) {
280
288
  getEditorFeatureFlags: props.getEditorFeatureFlags,
281
289
  dispatchAnalyticsEvent: props.dispatchAnalyticsEvent,
282
290
  allowFixedColumnWidthOption: props.allowFixedColumnWidthOption
283
- });
291
+ }));
284
292
  }
285
293
  }, {
286
294
  key: "viewShouldUpdate",
@@ -352,7 +360,7 @@ var TableView = /*#__PURE__*/function (_ReactNodeView) {
352
360
  }]);
353
361
  }(ReactNodeView);
354
362
  export { TableView as default };
355
- export var createTableView = function createTableView(node, view, getPos, portalProviderAPI, eventDispatcher, getEditorContainerWidth, getEditorFeatureFlags, dispatchAnalyticsEvent, pluginInjectionApi, isCommentEditor, isChromelessEditor, allowFixedColumnWidthOption) {
363
+ export var createTableView = function createTableView(node, view, getPos, portalProviderAPI, eventDispatcher, getEditorContainerWidth, getEditorFeatureFlags, dispatchAnalyticsEvent, pluginInjectionApi, isCommentEditor, isChromelessEditor, allowFixedColumnWidthOption, intl) {
356
364
  var _pluginInjectionApi$t;
357
365
  var _getPluginState2 = getPluginState(view.state),
358
366
  pluginConfig = _getPluginState2.pluginConfig,
@@ -367,22 +375,6 @@ export var createTableView = function createTableView(node, view, getPos, portal
367
375
  allowTableAlignment = _getPluginConfig.allowTableAlignment;
368
376
  var isTableFixedColumnWidthsOptionEnabled = (fg('platform_editor_table_fixed_column_width_prop') ? allowFixedColumnWidthOption : getEditorFeatureFlags === null || getEditorFeatureFlags === void 0 ? void 0 : getEditorFeatureFlags().tableWithFixedColumnWidthsOption) || false;
369
377
  var shouldUseIncreasedScalingPercent = isTableScalingEnabled && (isTableFixedColumnWidthsOptionEnabled || isCommentEditor);
370
-
371
- // In SSR use native ProseMirror spec-based render for table nodes
372
- if (isSSR() && isSSRStreaming()) {
373
- var isNested = isTableNested(view.state, typeof getPos === 'function' ? getPos() : undefined);
374
- var tableDOMStructure = tableNodeSpecWithFixedToDOM({
375
- allowColumnResizing: allowColumnResizing !== null && allowColumnResizing !== void 0 ? allowColumnResizing : false,
376
- tableResizingEnabled: allowTableResizing !== null && allowTableResizing !== void 0 ? allowTableResizing : false,
377
- getEditorContainerWidth: getEditorContainerWidth,
378
- isTableScalingEnabled: isTableScalingEnabled,
379
- shouldUseIncreasedScalingPercent: shouldUseIncreasedScalingPercent,
380
- isCommentEditor: isCommentEditor,
381
- isChromelessEditor: isChromelessEditor,
382
- isNested: isNested
383
- }).toDOM(node);
384
- return DOMSerializer.renderSpec(document, tableDOMStructure);
385
- }
386
378
  return new TableView({
387
379
  node: node,
388
380
  view: view,
@@ -406,6 +398,7 @@ export var createTableView = function createTableView(node, view, getPos, portal
406
398
  getEditorFeatureFlags: getEditorFeatureFlags,
407
399
  dispatchAnalyticsEvent: dispatchAnalyticsEvent,
408
400
  pluginInjectionApi: pluginInjectionApi,
409
- allowFixedColumnWidthOption: allowFixedColumnWidthOption
401
+ allowFixedColumnWidthOption: allowFixedColumnWidthOption,
402
+ intl: intl
410
403
  }).init();
411
404
  };
@@ -9,7 +9,9 @@ import { Selection, TextSelection } from '@atlaskit/editor-prosemirror/state';
9
9
  import { hasParentNodeOfType, safeInsert } from '@atlaskit/editor-prosemirror/utils';
10
10
  import { TableMap } from '@atlaskit/editor-tables/table-map';
11
11
  import { addColumnAt as addColumnAtPMUtils, addRowAt, findTable, selectedRect } from '@atlaskit/editor-tables/utils';
12
+ import { fg } from '@atlaskit/platform-feature-flags';
12
13
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
14
+ import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
13
15
  import { updateRowOrColumnMovedTransform } from '../analytics/commands';
14
16
  import { META_KEYS } from '../table-analytics';
15
17
  import { rescaleColumns } from '../transforms/column-width';
@@ -264,8 +266,15 @@ export var insertTableWithNestingSupport = function insertTableWithNestingSuppor
264
266
  _ref2$createTableProp = _ref2.createTableProps,
265
267
  createTableProps = _ref2$createTableProp === void 0 ? {} : _ref2$createTableProp;
266
268
  return function (_ref3) {
267
- var _api$contentInsertion, _tr$selection$$from$n2;
269
+ var _api$markdownMode, _api$contentInsertion, _tr$selection$$from$n2;
268
270
  var tr = _ref3.tr;
271
+ // Delegate to the markdown plugin to insert a markdown table string at the CM cursor position.
272
+ var markdownState = api === null || api === void 0 || (_api$markdownMode = api.markdownMode) === null || _api$markdownMode === void 0 ? void 0 : _api$markdownMode.sharedState.currentState();
273
+ if (markdownState !== null && markdownState !== void 0 && markdownState.isMarkdownMode && (markdownState === null || markdownState === void 0 ? void 0 : markdownState.view) === 'syntax' && expValEqualsNoExposure('cc-markdown-mode', 'isEnabled', true) && fg('platform_editor_markdown_compatible_toolbar')) {
274
+ var _api$markdownMode2;
275
+ api === null || api === void 0 || (_api$markdownMode2 = api.markdownMode) === null || _api$markdownMode2 === void 0 || _api$markdownMode2.actions.insertSourceTable(createTableProps.rowsCount, createTableProps.colsCount);
276
+ return tr;
277
+ }
269
278
  var schema = tr.doc.type.schema;
270
279
 
271
280
  // If the cursor is inside a table
@@ -33,20 +33,16 @@ var destroyFn = function destroyFn(editorView, editorAnalyticsAPI, isTableScalin
33
33
  return type === 'table-row';
34
34
  },
35
35
  onDragStart: function onDragStart() {
36
- if (expValEquals('cc_editor_interactivity_monitoring', 'isEnabled', true)) {
37
- var _insm$session;
38
- (_insm$session = insm.session) === null || _insm$session === void 0 || _insm$session.startFeature('tableDragAndDrop');
39
- }
36
+ var _insm$session;
37
+ (_insm$session = insm.session) === null || _insm$session === void 0 || _insm$session.startFeature('tableDragAndDrop');
40
38
  // auto scroller doesn't work when scroll-behavior: smooth is set, this monitor temporarily removes it via inline styles
41
39
  // Ignored via go/ees005
42
40
  // eslint-disable-next-line @atlaskit/editor/no-as-casting
43
41
  editorPageScrollContainer.style.setProperty('scroll-behavior', 'unset');
44
42
  },
45
43
  onDrop: function onDrop() {
46
- if (expValEquals('cc_editor_interactivity_monitoring', 'isEnabled', true)) {
47
- var _insm$session2;
48
- (_insm$session2 = insm.session) === null || _insm$session2 === void 0 || _insm$session2.endFeature('tableDragAndDrop');
49
- }
44
+ var _insm$session2;
45
+ (_insm$session2 = insm.session) === null || _insm$session2 === void 0 || _insm$session2.endFeature('tableDragAndDrop');
50
46
  // 'null' will remove the inline style
51
47
  // Ignored via go/ees005
52
48
  // eslint-disable-next-line @atlaskit/editor/no-as-casting
@@ -82,10 +78,8 @@ var destroyFn = function destroyFn(editorView, editorAnalyticsAPI, isTableScalin
82
78
  return localId === (tableNode === null || tableNode === void 0 ? void 0 : tableNode.attrs.localId);
83
79
  },
84
80
  onDragStart: function onDragStart() {
85
- if (expValEquals('cc_editor_interactivity_monitoring', 'isEnabled', true)) {
86
- var _insm$session3;
87
- (_insm$session3 = insm.session) === null || _insm$session3 === void 0 || _insm$session3.startFeature('tableDragAndDrop');
88
- }
81
+ var _insm$session3;
82
+ (_insm$session3 = insm.session) === null || _insm$session3 === void 0 || _insm$session3.startFeature('tableDragAndDrop');
89
83
  if (expValEquals('platform_editor_table_menu_updates', 'isEnabled', true)) {
90
84
  api === null || api === void 0 || api.core.actions.execute(function (_ref7) {
91
85
  var _api$userIntent;
@@ -154,13 +148,10 @@ var destroyFn = function destroyFn(editorView, editorAnalyticsAPI, isTableScalin
154
148
  }
155
149
  // If no data can be found then it's most like we do not want to perform any drop action
156
150
  if (!data) {
157
- var _event$source, _event$source2;
151
+ var _insm$session4, _event$source, _event$source2;
158
152
  // If we're able to determine the source type of the dropped element then we should report to analytics that
159
153
  // the drop event was cancelled. Otherwise we will cancel silently.
160
- if (expValEquals('cc_editor_interactivity_monitoring', 'isEnabled', true)) {
161
- var _insm$session4;
162
- (_insm$session4 = insm.session) === null || _insm$session4 === void 0 || _insm$session4.endFeature('tableDragAndDrop');
163
- }
154
+ (_insm$session4 = insm.session) === null || _insm$session4 === void 0 || _insm$session4.endFeature('tableDragAndDrop');
164
155
  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') {
165
156
  var _event$source$data;
166
157
  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);
@@ -184,16 +175,15 @@ var destroyFn = function destroyFn(editorView, editorAnalyticsAPI, isTableScalin
184
175
 
185
176
  // If the drop target index contains merged cells then we should not allow the drop to occur.
186
177
  if (hasMergedCellsInBetween([targetAdjustedIndex - 1, targetAdjustedIndex], sourceType === 'table-row' ? DropTargetType.ROW : DropTargetType.COLUMN)(editorView.state.selection)) {
178
+ var _insm$session5;
187
179
  clearDropTargetWithAnalytics(editorAnalyticsAPI)(INPUT_METHOD.DRAG_AND_DROP, sourceType, sourceIndexes,
188
180
  // This event is mrked as invalid because the user is attempting to drop an element in an area which has merged cells.
189
181
  TABLE_STATUS.INVALID, tr)(editorView.state, editorView.dispatch);
190
- if (expValEquals('cc_editor_interactivity_monitoring', 'isEnabled', true)) {
191
- var _insm$session5;
192
- (_insm$session5 = insm.session) === null || _insm$session5 === void 0 || _insm$session5.endFeature('tableDragAndDrop');
193
- }
182
+ (_insm$session5 = insm.session) === null || _insm$session5 === void 0 || _insm$session5.endFeature('tableDragAndDrop');
194
183
  return;
195
184
  }
196
185
  requestAnimationFrame(function () {
186
+ var _insm$session6;
197
187
  if (behaviour === 'clone') {
198
188
  cloneSourceWithAnalytics(editorAnalyticsAPI)(INPUT_METHOD.DRAG_AND_DROP, sourceType, sourceIndexes, targetIndex, targetDirection, tr)(editorView.state, editorView.dispatch);
199
189
  } else {
@@ -220,10 +210,7 @@ var destroyFn = function destroyFn(editorView, editorAnalyticsAPI, isTableScalin
220
210
  }
221
211
  }
222
212
  editorView.focus();
223
- if (expValEquals('cc_editor_interactivity_monitoring', 'isEnabled', true)) {
224
- var _insm$session6;
225
- (_insm$session6 = insm.session) === null || _insm$session6 === void 0 || _insm$session6.endFeature('tableDragAndDrop');
226
- }
213
+ (_insm$session6 = insm.session) === null || _insm$session6 === void 0 || _insm$session6.endFeature('tableDragAndDrop');
227
214
  });
228
215
  }
229
216
  })]));
@@ -4,7 +4,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
4
4
  import { bind } from 'bind-event-listener';
5
5
  import { ACTION, ACTION_SUBJECT, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
6
6
  import { getBrowserInfo } from '@atlaskit/editor-common/browser';
7
- import { insideTable } from '@atlaskit/editor-common/core-utils';
7
+ import { insideTable, isSSRStreaming } from '@atlaskit/editor-common/core-utils';
8
8
  import { isNestedTablesSupported } from '@atlaskit/editor-common/nesting';
9
9
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
10
10
  import { transformSliceToRemoveOpenBodiedExtension, transformSliceToRemoveOpenExpand, transformSliceToRemoveOpenLayoutNodes, transformSliceToRemoveOpenMultiBodiedExtension, transformSliceToRemoveOpenNestedExpand } from '@atlaskit/editor-common/transforms';
@@ -62,6 +62,7 @@ export var createPlugin = function createPlugin(dispatchAnalyticsEvent, dispatch
62
62
  }
63
63
  return editorView.state;
64
64
  };
65
+ var intl = isSSRStreaming() ? getIntl() : undefined;
65
66
  var getNodeView = function getNodeView() {
66
67
  return {
67
68
  table: tableView({
@@ -73,7 +74,8 @@ export var createPlugin = function createPlugin(dispatchAnalyticsEvent, dispatch
73
74
  pluginInjectionApi: pluginInjectionApi,
74
75
  isCommentEditor: isCommentEditor,
75
76
  isChromelessEditor: isChromelessEditor,
76
- allowFixedColumnWidthOption: allowFixedColumnWidthOption
77
+ allowFixedColumnWidthOption: allowFixedColumnWidthOption,
78
+ intl: intl
77
79
  }),
78
80
  tableRow: tableRowView({
79
81
  eventDispatcher: eventDispatcher,
@@ -3,7 +3,6 @@ import { tableCellMinWidth } from '@atlaskit/editor-common/styles';
3
3
  import { TableMap } from '@atlaskit/editor-tables/table-map';
4
4
  import { getSelectionRect } from '@atlaskit/editor-tables/utils';
5
5
  import { insm } from '@atlaskit/insm';
6
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
7
6
  import { stopKeyboardColumnResizing } from '../commands/column-resize';
8
7
  import { updateResizeHandleDecorations } from '../commands/misc';
9
8
  import { getPluginState as getTablePluginState } from '../plugin-factory';
@@ -19,7 +18,7 @@ import { currentColWidth, getTableMaxWidth, pointsAtCell, getScalingPercentForTa
19
18
  import { resizeColumn } from './utils/resize-column';
20
19
  import { getResizeState } from './utils/resize-state';
21
20
  export var handleMouseDown = function handleMouseDown(view, event, localResizeHandlePos, getEditorContainerWidth, getEditorFeatureFlags, isTableScalingEnabled, api, nodeViewPortalProviderAPI, editorAnalyticsAPI, isCommentEditor) {
22
- var _originalTable$attrs;
21
+ var _insm$session, _originalTable$attrs;
23
22
  var state = view.state,
24
23
  dispatch = view.dispatch;
25
24
  var editorDisabled = !view.editable;
@@ -32,10 +31,7 @@ export var handleMouseDown = function handleMouseDown(view, event, localResizeHa
32
31
  var _getTablePluginState = getTablePluginState(state),
33
32
  isKeyboardResize = _getTablePluginState.isKeyboardResize;
34
33
  event.preventDefault();
35
- if (expValEquals('cc_editor_interactivity_monitoring', 'isEnabled', true)) {
36
- var _insm$session;
37
- (_insm$session = insm.session) === null || _insm$session === void 0 || _insm$session.startFeature('tableColumnResize');
38
- }
34
+ (_insm$session = insm.session) === null || _insm$session === void 0 || _insm$session.startFeature('tableColumnResize');
39
35
  var tr = view.state.tr;
40
36
  tr.setMeta(META_KEYS.OVERFLOW_TRIGGER, {
41
37
  name: TABLE_OVERFLOW_CHANGE_TRIGGER.RESIZED_COLUMN
@@ -126,17 +122,13 @@ export var handleMouseDown = function handleMouseDown(view, event, localResizeHa
126
122
  var _getTablePluginState2 = getTablePluginState(state),
127
123
  isTableHovered = _getTablePluginState2.isTableHovered;
128
124
  if (resizeHandlePos === null) {
129
- if (expValEquals('cc_editor_interactivity_monitoring', 'isEnabled', true)) {
130
- var _insm$session2;
131
- (_insm$session2 = insm.session) === null || _insm$session2 === void 0 || _insm$session2.endFeature('tableColumnResize');
132
- }
125
+ var _insm$session2;
126
+ (_insm$session2 = insm.session) === null || _insm$session2 === void 0 || _insm$session2.endFeature('tableColumnResize');
133
127
  return stopResizing()(state, dispatch);
134
128
  }
135
129
  if (!pointsAtCell(state.doc.resolve(resizeHandlePos))) {
136
- if (expValEquals('cc_editor_interactivity_monitoring', 'isEnabled', true)) {
137
- var _insm$session3;
138
- (_insm$session3 = insm.session) === null || _insm$session3 === void 0 || _insm$session3.endFeature('tableColumnResize');
139
- }
130
+ var _insm$session3;
131
+ (_insm$session3 = insm.session) === null || _insm$session3 === void 0 || _insm$session3.endFeature('tableColumnResize');
140
132
  return;
141
133
  }
142
134
  // resizeHandlePos could be remapped via a collab change.
@@ -149,10 +141,8 @@ export var handleMouseDown = function handleMouseDown(view, event, localResizeHa
149
141
 
150
142
  // If we let go in the same place we started, don't need to do anything.
151
143
  if (dragging && clientX === dragging.startX) {
152
- if (expValEquals('cc_editor_interactivity_monitoring', 'isEnabled', true)) {
153
- var _insm$session4;
154
- (_insm$session4 = insm.session) === null || _insm$session4 === void 0 || _insm$session4.endFeature('tableColumnResize');
155
- }
144
+ var _insm$session4;
145
+ (_insm$session4 = insm.session) === null || _insm$session4 === void 0 || _insm$session4.endFeature('tableColumnResize');
156
146
  if (isKeyboardResize || !isTableHovered) {
157
147
  /** if column resize had started via keyboard but continued by mouse
158
148
  * or mouse pointer leaves the table but mouse button still pressed
@@ -164,6 +154,7 @@ export var handleMouseDown = function handleMouseDown(view, event, localResizeHa
164
154
  }
165
155
  var tr = state.tr;
166
156
  if (dragging) {
157
+ var _insm$session5;
167
158
  var startX = dragging.startX;
168
159
 
169
160
  // If the dimensions of the table have changed through a remote modification by another
@@ -219,10 +210,7 @@ export var handleMouseDown = function handleMouseDown(view, event, localResizeHa
219
210
  }
220
211
  })(tr);
221
212
  }
222
- if (expValEquals('cc_editor_interactivity_monitoring', 'isEnabled', true)) {
223
- var _insm$session5;
224
- (_insm$session5 = insm.session) === null || _insm$session5 === void 0 || _insm$session5.endFeature('tableColumnResize');
225
- }
213
+ (_insm$session5 = insm.session) === null || _insm$session5 === void 0 || _insm$session5.endFeature('tableColumnResize');
226
214
  if (isKeyboardResize || !isTableHovered) {
227
215
  /** if column resize had started via keyboard but continued by mouse
228
216
  * or mouse pointer leaves the table but mouse button still pressed
@@ -1,4 +1,5 @@
1
1
  import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
2
+ import { isSSRStreaming } from '@atlaskit/editor-common/core-utils';
2
3
  import { tableCellMinWidth } from '@atlaskit/editor-common/styles';
3
4
  import { calcTableColumnWidths, getFragmentBackingArray } from '@atlaskit/editor-common/utils';
4
5
  import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
@@ -25,7 +26,7 @@ var generateColStyle = function generateColStyle(fixedColWidth, tableWidth, isCo
25
26
  if (hasTableBeenResized) {
26
27
  return "width: max(".concat(fixedColWidth, "px, ").concat(tableCellMinWidth, "px)");
27
28
  }
28
- return "width: ".concat(tableCellMinWidth, "px)");
29
+ return isSSRStreaming() ? "width: ".concat(tableCellMinWidth, "px") : "width: ".concat(tableCellMinWidth, "px)");
29
30
  }
30
31
  if (isFullPageEditor || !isFullPageEditor && isTableHasWidth) {
31
32
  var scaledPercent = isNumberColumnEnabled ? "calc(calc(var(--ak-editor-table-width) - ".concat(akEditorTableNumberColumnWidth, "px - 1px)/").concat(tableWidth, ")") : "calc(calc(var(--ak-editor-table-width) - 1px)/".concat(tableWidth, ")");
@@ -16,6 +16,7 @@ import { hasParentNodeOfType, safeInsert } from '@atlaskit/editor-prosemirror/ut
16
16
  import { tableEditing } from '@atlaskit/editor-tables/pm-plugins';
17
17
  import { fg } from '@atlaskit/platform-feature-flags';
18
18
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
19
+ import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
19
20
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
20
21
  import { tableNodeSpecWithFixedToDOM } from './nodeviews/toDOM';
21
22
  import { createPlugin as createActiveCellHighlightPlugin } from './pm-plugins/active-cell-highlight/plugin';
@@ -554,7 +555,7 @@ var tablePlugin = function tablePlugin(_ref) {
554
555
  return /*#__PURE__*/React.createElement(IconTable, null);
555
556
  },
556
557
  action: function action(insert, state) {
557
- var _api$table, _options$tableOptions6, _tr$selection$$from$n;
558
+ var _api$markdownMode, _api$table, _options$tableOptions6, _tr$selection$$from$n;
558
559
  if (isTableSelectorEnabled) {
559
560
  var _tr = insert('');
560
561
  _tr.setMeta(sizeSelectorPluginKey, {
@@ -563,6 +564,14 @@ var tablePlugin = function tablePlugin(_ref) {
563
564
  return _tr;
564
565
  }
565
566
 
567
+ // Delegate to the markdown plugin to insert a markdown table string at the CM cursor position.
568
+ var markdownState = api === null || api === void 0 || (_api$markdownMode = api.markdownMode) === null || _api$markdownMode === void 0 ? void 0 : _api$markdownMode.sharedState.currentState();
569
+ if (markdownState !== null && markdownState !== void 0 && markdownState.isMarkdownMode && (markdownState === null || markdownState === void 0 ? void 0 : markdownState.view) === 'syntax' && expValEqualsNoExposure('cc-markdown-mode', 'isEnabled', true) && fg('platform_editor_markdown_compatible_toolbar')) {
570
+ var _api$markdownMode2;
571
+ api === null || api === void 0 || (_api$markdownMode2 = api.markdownMode) === null || _api$markdownMode2 === void 0 || _api$markdownMode2.actions.insertSourceTable();
572
+ return state.tr;
573
+ }
574
+
566
575
  // see comment on tablesPlugin.getSharedState on usage
567
576
  var tableState = api === null || api === void 0 || (_api$table = api.table) === null || _api$table === void 0 ? void 0 : _api$table.sharedState.currentState();
568
577
  var tableNodeProps = {
@@ -4,14 +4,166 @@ import { ToolbarDropdownItemSection } from '@atlaskit/editor-toolbar';
4
4
  import AlignPositionBottomIcon from '@atlaskit/icon-lab/core/align-position-bottom';
5
5
  import AlignPositionCenterVerticalIcon from '@atlaskit/icon-lab/core/align-position-center-vertical';
6
6
  import AlignPositionTopIcon from '@atlaskit/icon-lab/core/align-position-top';
7
+ import { fg } from '@atlaskit/platform-feature-flags';
7
8
  import { MergeCellsItem } from './items/MergeCellsItem';
8
9
  import { SplitCellItem } from './items/SplitCellItem';
9
10
  import { VerticalAlignDropdownItem } from './items/VerticalAlignDropdownItem';
10
11
  import { VerticalAlignNestedMenu } from './items/VerticalAlignNestedMenu';
11
- import { CELL_MENU, CELL_ACTION_SECTION, CELL_DANGER_SECTION, CELL_MENU_RANK, MERGE_CELLS_ITEM, SPLIT_CELL_ITEM, CELL_ACTION_SECTION_RANK, VERTICAL_ALIGN_BOTTOM_ITEM, VERTICAL_ALIGN_MENU, VERTICAL_ALIGN_MENU_RANK, VERTICAL_ALIGN_MENU_SECTION, VERTICAL_ALIGN_MENU_SECTION_RANK, VERTICAL_ALIGN_MIDDLE_ITEM, VERTICAL_ALIGN_TOP_ITEM } from './keys';
12
+ import { CELL_MENU, CELL_ACTION_SECTION, CELL_ADD_SECTION, CELL_DANGER_SECTION, CELL_MENU_RANK, MERGE_CELLS_ITEM, SPLIT_CELL_ITEM, CELL_ACTION_SECTION_RANK, CELL_ADD_SECTION_RANK, VERTICAL_ALIGN_BOTTOM_ITEM, VERTICAL_ALIGN_MENU, VERTICAL_ALIGN_MENU_RANK, VERTICAL_ALIGN_MENU_SECTION, VERTICAL_ALIGN_MENU_SECTION_RANK, VERTICAL_ALIGN_MIDDLE_ITEM, VERTICAL_ALIGN_TOP_ITEM } from './keys';
12
13
  export var getCellMenuComponents = function getCellMenuComponents(_ref) {
13
14
  var api = _ref.api;
14
- return [
15
+ return fg('platform_editor_table_cell_menu_update') ? [
16
+ // --- Cell menu update ON ---
17
+ // Merge/Split cells move into the Add section (alongside the shared add/distribute
18
+ // items); the danger section gains the shared Delete column/row items.
19
+
20
+ // --- Menu surface ---
21
+ {
22
+ type: CELL_MENU.type,
23
+ key: CELL_MENU.key
24
+ },
25
+ // --- Main action section (Background color, Vertical align) ---
26
+ {
27
+ type: CELL_ACTION_SECTION.type,
28
+ key: CELL_ACTION_SECTION.key,
29
+ parents: [{
30
+ type: CELL_MENU.type,
31
+ key: CELL_MENU.key,
32
+ rank: CELL_MENU_RANK[CELL_ACTION_SECTION.key]
33
+ }],
34
+ component: function component(props) {
35
+ return /*#__PURE__*/React.createElement(ToolbarDropdownItemSection, null, props.children);
36
+ }
37
+ }, {
38
+ type: VERTICAL_ALIGN_MENU.type,
39
+ key: VERTICAL_ALIGN_MENU.key,
40
+ parents: [{
41
+ type: CELL_ACTION_SECTION.type,
42
+ key: CELL_ACTION_SECTION.key,
43
+ rank: CELL_ACTION_SECTION_RANK[VERTICAL_ALIGN_MENU.key]
44
+ }],
45
+ component: function component(props) {
46
+ return /*#__PURE__*/React.createElement(VerticalAlignNestedMenu, null, props.children);
47
+ }
48
+ }, {
49
+ type: VERTICAL_ALIGN_MENU_SECTION.type,
50
+ key: VERTICAL_ALIGN_MENU_SECTION.key,
51
+ parents: [{
52
+ type: VERTICAL_ALIGN_MENU.type,
53
+ key: VERTICAL_ALIGN_MENU.key,
54
+ rank: VERTICAL_ALIGN_MENU_RANK[VERTICAL_ALIGN_MENU_SECTION.key]
55
+ }],
56
+ component: function component(props) {
57
+ return /*#__PURE__*/React.createElement(ToolbarDropdownItemSection, null, props.children);
58
+ }
59
+ }, {
60
+ type: VERTICAL_ALIGN_TOP_ITEM.type,
61
+ key: VERTICAL_ALIGN_TOP_ITEM.key,
62
+ parents: [{
63
+ type: VERTICAL_ALIGN_MENU_SECTION.type,
64
+ key: VERTICAL_ALIGN_MENU_SECTION.key,
65
+ rank: VERTICAL_ALIGN_MENU_SECTION_RANK[VERTICAL_ALIGN_TOP_ITEM.key]
66
+ }],
67
+ component: function component() {
68
+ return /*#__PURE__*/React.createElement(VerticalAlignDropdownItem, {
69
+ api: api,
70
+ icon: AlignPositionTopIcon,
71
+ label: messages.cellAlignmentTop,
72
+ value: "top"
73
+ });
74
+ }
75
+ }, {
76
+ type: VERTICAL_ALIGN_MIDDLE_ITEM.type,
77
+ key: VERTICAL_ALIGN_MIDDLE_ITEM.key,
78
+ parents: [{
79
+ type: VERTICAL_ALIGN_MENU_SECTION.type,
80
+ key: VERTICAL_ALIGN_MENU_SECTION.key,
81
+ rank: VERTICAL_ALIGN_MENU_SECTION_RANK[VERTICAL_ALIGN_MIDDLE_ITEM.key]
82
+ }],
83
+ component: function component() {
84
+ return /*#__PURE__*/React.createElement(VerticalAlignDropdownItem, {
85
+ api: api,
86
+ icon: AlignPositionCenterVerticalIcon,
87
+ label: messages.cellAlignmentMiddle,
88
+ value: "middle"
89
+ });
90
+ }
91
+ }, {
92
+ type: VERTICAL_ALIGN_BOTTOM_ITEM.type,
93
+ key: VERTICAL_ALIGN_BOTTOM_ITEM.key,
94
+ parents: [{
95
+ type: VERTICAL_ALIGN_MENU_SECTION.type,
96
+ key: VERTICAL_ALIGN_MENU_SECTION.key,
97
+ rank: VERTICAL_ALIGN_MENU_SECTION_RANK[VERTICAL_ALIGN_BOTTOM_ITEM.key]
98
+ }],
99
+ component: function component() {
100
+ return /*#__PURE__*/React.createElement(VerticalAlignDropdownItem, {
101
+ api: api,
102
+ icon: AlignPositionBottomIcon,
103
+ label: messages.cellAlignmentBottom,
104
+ value: "bottom"
105
+ });
106
+ }
107
+ },
108
+ // --- Add / Move section (shared Add column right / Add row below / Distribute
109
+ // columns are registered in `../shared/getSharedItems`; Merge/Split cells below) ---
110
+ {
111
+ type: CELL_ADD_SECTION.type,
112
+ key: CELL_ADD_SECTION.key,
113
+ parents: [{
114
+ type: CELL_MENU.type,
115
+ key: CELL_MENU.key,
116
+ rank: CELL_MENU_RANK[CELL_ADD_SECTION.key]
117
+ }],
118
+ component: function component(props) {
119
+ return /*#__PURE__*/React.createElement(ToolbarDropdownItemSection, {
120
+ hasSeparator: true
121
+ }, props.children);
122
+ }
123
+ }, {
124
+ type: MERGE_CELLS_ITEM.type,
125
+ key: MERGE_CELLS_ITEM.key,
126
+ parents: [{
127
+ type: CELL_ADD_SECTION.type,
128
+ key: CELL_ADD_SECTION.key,
129
+ rank: CELL_ADD_SECTION_RANK[MERGE_CELLS_ITEM.key]
130
+ }],
131
+ component: function component() {
132
+ return /*#__PURE__*/React.createElement(MergeCellsItem, {
133
+ api: api
134
+ });
135
+ }
136
+ }, {
137
+ type: SPLIT_CELL_ITEM.type,
138
+ key: SPLIT_CELL_ITEM.key,
139
+ parents: [{
140
+ type: CELL_ADD_SECTION.type,
141
+ key: CELL_ADD_SECTION.key,
142
+ rank: CELL_ADD_SECTION_RANK[SPLIT_CELL_ITEM.key]
143
+ }],
144
+ component: function component() {
145
+ return /*#__PURE__*/React.createElement(SplitCellItem, {
146
+ api: api
147
+ });
148
+ }
149
+ },
150
+ // --- Danger section (Clear cell + shared Delete column / Delete row) ---
151
+ {
152
+ type: CELL_DANGER_SECTION.type,
153
+ key: CELL_DANGER_SECTION.key,
154
+ parents: [{
155
+ type: CELL_MENU.type,
156
+ key: CELL_MENU.key,
157
+ rank: CELL_MENU_RANK[CELL_DANGER_SECTION.key]
158
+ }],
159
+ component: function component(props) {
160
+ return /*#__PURE__*/React.createElement(ToolbarDropdownItemSection, {
161
+ hasSeparator: true
162
+ }, props.children);
163
+ }
164
+ }] : [
165
+ // --- Cell menu update OFF: legacy cell menu (Merge/Split live in the action section) ---
166
+
15
167
  // --- Menu surface ---
16
168
  {
17
169
  type: CELL_MENU.type,
@@ -1,4 +1,6 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ import { ADD_COLUMN_RIGHT_ITEM, DELETE_COLUMN_ITEM, DISTRIBUTE_COLUMNS_ITEM } from '../column/keys';
3
+ import { ADD_ROW_BELOW_ITEM, DELETE_ROW_ITEM } from '../row/keys';
2
4
  import { BACKGROUND_COLOR_ITEM, CLEAR_CELLS_ITEM } from '../shared/keys';
3
5
 
4
6
  // --- Menu surface ---
@@ -14,11 +16,15 @@ export var CELL_ACTION_SECTION = {
14
16
  type: 'menu-section',
15
17
  key: 'cell-action-section'
16
18
  };
19
+ export var CELL_ADD_SECTION = {
20
+ type: 'menu-section',
21
+ key: 'cell-add-section'
22
+ };
17
23
  export var CELL_DANGER_SECTION = {
18
24
  type: 'menu-section',
19
25
  key: 'cell-danger-section'
20
26
  };
21
- export var CELL_MENU_RANK = _defineProperty(_defineProperty({}, CELL_ACTION_SECTION.key, 100), CELL_DANGER_SECTION.key, 200);
27
+ export var CELL_MENU_RANK = _defineProperty(_defineProperty(_defineProperty({}, CELL_ACTION_SECTION.key, 100), CELL_ADD_SECTION.key, 200), CELL_DANGER_SECTION.key, 300);
22
28
  export var MERGE_CELLS_ITEM = {
23
29
  type: 'menu-item',
24
30
  key: 'merge-cells'
@@ -49,8 +55,16 @@ export var VERTICAL_ALIGN_BOTTOM_ITEM = {
49
55
  };
50
56
 
51
57
  // --- Item ranks within their sections ---
58
+ //
59
+ // The add/delete items rendered in the cell menu are shared with the row/column
60
+ // menus (registered once in `../shared/getSharedItems` with multiple parents), so
61
+ // we reuse their existing keys here rather than declaring cell-specific ones.
52
62
 
53
63
  export var CELL_ACTION_SECTION_RANK = _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, BACKGROUND_COLOR_ITEM.key, 100), VERTICAL_ALIGN_MENU.key, 200), MERGE_CELLS_ITEM.key, 300), SPLIT_CELL_ITEM.key, 400);
54
64
  export var VERTICAL_ALIGN_MENU_RANK = _defineProperty({}, VERTICAL_ALIGN_MENU_SECTION.key, 100);
55
65
  export var VERTICAL_ALIGN_MENU_SECTION_RANK = _defineProperty(_defineProperty(_defineProperty({}, VERTICAL_ALIGN_TOP_ITEM.key, 100), VERTICAL_ALIGN_MIDDLE_ITEM.key, 200), VERTICAL_ALIGN_BOTTOM_ITEM.key, 300);
56
- export var CELL_DANGER_SECTION_RANK = _defineProperty({}, CLEAR_CELLS_ITEM.key, 100);
66
+
67
+ // Merge/Split cells are relocated from the action section into the add section when the
68
+ // cell menu update gate is on; they sit at the top of the section.
69
+ export var CELL_ADD_SECTION_RANK = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, MERGE_CELLS_ITEM.key, 100), SPLIT_CELL_ITEM.key, 200), ADD_COLUMN_RIGHT_ITEM.key, 300), ADD_ROW_BELOW_ITEM.key, 400), DISTRIBUTE_COLUMNS_ITEM.key, 500);
70
+ export var CELL_DANGER_SECTION_RANK = _defineProperty(_defineProperty(_defineProperty({}, CLEAR_CELLS_ITEM.key, 100), DELETE_COLUMN_ITEM.key, 200), DELETE_ROW_ITEM.key, 300);