@atlaskit/editor-plugin-table 15.5.6 → 15.6.0

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,18 @@
1
1
  # @atlaskit/editor-plugin-table
2
2
 
3
+ ## 15.6.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`762b79e21f96a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/762b79e21f96a) -
8
+ Migrated and cleaned up legacy iconography usage.
9
+
10
+ ### Patch Changes
11
+
12
+ - [`7e1f5e6e54c20`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/7e1f5e6e54c20) -
13
+ [EDITOR-3962] Update check for if a table is nested so it covers all cases
14
+ - Updated dependencies
15
+
3
16
  ## 15.5.6
4
17
 
5
18
  ### Patch Changes
@@ -24,19 +24,6 @@ var _tableRowAddBelow = _interopRequireDefault(require("@atlaskit/icon/core/tabl
24
24
  var _tableRowDelete = _interopRequireDefault(require("@atlaskit/icon/core/table-row-delete"));
25
25
  var _tableRowMoveDown = _interopRequireDefault(require("@atlaskit/icon/core/table-row-move-down"));
26
26
  var _tableRowMoveUp = _interopRequireDefault(require("@atlaskit/icon/core/table-row-move-up"));
27
- var _arrowDown = _interopRequireDefault(require("@atlaskit/icon/glyph/arrow-down"));
28
- var _arrowLeft = _interopRequireDefault(require("@atlaskit/icon/glyph/arrow-left"));
29
- var _arrowRight = _interopRequireDefault(require("@atlaskit/icon/glyph/arrow-right"));
30
- var _arrowUp = _interopRequireDefault(require("@atlaskit/icon/glyph/arrow-up"));
31
- var _crossCircle = _interopRequireDefault(require("@atlaskit/icon/glyph/cross-circle"));
32
- var _layoutThreeEqual = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/layout-three-equal"));
33
- var _remove = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/remove"));
34
- var _chevronDoubleDown = _interopRequireDefault(require("@atlaskit/icon/glyph/hipchat/chevron-double-down"));
35
- var _chevronDoubleUp = _interopRequireDefault(require("@atlaskit/icon/glyph/hipchat/chevron-double-up"));
36
- var _AddColLeftIcon = require("../../ui/icons/AddColLeftIcon");
37
- var _AddColRightIcon = require("../../ui/icons/AddColRightIcon");
38
- var _AddRowAboveIcon = require("../../ui/icons/AddRowAboveIcon");
39
- var _AddRowBelowIcon = require("../../ui/icons/AddRowBelowIcon");
40
27
  var _toolbar = require("../../ui/toolbar");
41
28
  var _commandsWithAnalytics = require("../commands/commands-with-analytics");
42
29
  var _commandsWithAnalytics2 = require("../drag-and-drop/commands-with-analytics");
@@ -101,7 +88,6 @@ var getDragMenuConfig = exports.getDragMenuConfig = function getDragMenuConfig(d
101
88
  offset: 0,
102
89
  icon: function icon() {
103
90
  return /*#__PURE__*/_react.default.createElement(_tableRowAddAbove.default, {
104
- LEGACY_fallbackIcon: _AddRowAboveIcon.AddRowAboveIcon,
105
91
  spacing: 'spacious',
106
92
  label: ''
107
93
  });
@@ -112,7 +98,6 @@ var getDragMenuConfig = exports.getDragMenuConfig = function getDragMenuConfig(d
112
98
  offset: 1,
113
99
  icon: function icon() {
114
100
  return /*#__PURE__*/_react.default.createElement(_tableRowAddBelow.default, {
115
- LEGACY_fallbackIcon: _AddRowBelowIcon.AddRowBelowIcon,
116
101
  spacing: 'spacious',
117
102
  label: ''
118
103
  });
@@ -123,7 +108,6 @@ var getDragMenuConfig = exports.getDragMenuConfig = function getDragMenuConfig(d
123
108
  offset: 0,
124
109
  icon: function icon() {
125
110
  return /*#__PURE__*/_react.default.createElement(_tableColumnAddLeft.default, {
126
- LEGACY_fallbackIcon: _AddColLeftIcon.AddColLeftIcon,
127
111
  spacing: 'spacious',
128
112
  label: ''
129
113
  });
@@ -134,7 +118,6 @@ var getDragMenuConfig = exports.getDragMenuConfig = function getDragMenuConfig(d
134
118
  offset: 1,
135
119
  icon: function icon() {
136
120
  return /*#__PURE__*/_react.default.createElement(_tableColumnAddRight.default, {
137
- LEGACY_fallbackIcon: _AddColRightIcon.AddColRightIcon,
138
121
  spacing: 'spacious',
139
122
  label: ''
140
123
  });
@@ -145,7 +128,6 @@ var getDragMenuConfig = exports.getDragMenuConfig = function getDragMenuConfig(d
145
128
  label: 'up',
146
129
  icon: function icon() {
147
130
  return /*#__PURE__*/_react.default.createElement(_tableRowMoveUp.default, {
148
- LEGACY_fallbackIcon: _arrowUp.default,
149
131
  spacing: 'spacious',
150
132
  label: ''
151
133
  });
@@ -160,7 +142,6 @@ var getDragMenuConfig = exports.getDragMenuConfig = function getDragMenuConfig(d
160
142
  label: 'down',
161
143
  icon: function icon() {
162
144
  return /*#__PURE__*/_react.default.createElement(_tableRowMoveDown.default, {
163
- LEGACY_fallbackIcon: _arrowDown.default,
164
145
  spacing: 'spacious',
165
146
  label: ''
166
147
  });
@@ -175,7 +156,6 @@ var getDragMenuConfig = exports.getDragMenuConfig = function getDragMenuConfig(d
175
156
  label: 'left',
176
157
  icon: function icon() {
177
158
  return /*#__PURE__*/_react.default.createElement(_tableColumnMoveLeft.default, {
178
- LEGACY_fallbackIcon: _arrowLeft.default,
179
159
  spacing: 'spacious',
180
160
  label: ''
181
161
  });
@@ -190,7 +170,6 @@ var getDragMenuConfig = exports.getDragMenuConfig = function getDragMenuConfig(d
190
170
  label: 'right',
191
171
  icon: function icon() {
192
172
  return /*#__PURE__*/_react.default.createElement(_tableColumnMoveRight.default, {
193
- LEGACY_fallbackIcon: _arrowRight.default,
194
173
  spacing: 'spacious',
195
174
  label: ''
196
175
  });
@@ -207,7 +186,6 @@ var getDragMenuConfig = exports.getDragMenuConfig = function getDragMenuConfig(d
207
186
  order: _customSteps.TableSortOrder.ASC,
208
187
  icon: function icon() {
209
188
  return /*#__PURE__*/_react.default.createElement(_sortAscending.default, {
210
- LEGACY_fallbackIcon: _chevronDoubleUp.default,
211
189
  spacing: 'spacious',
212
190
  label: ''
213
191
  });
@@ -217,7 +195,6 @@ var getDragMenuConfig = exports.getDragMenuConfig = function getDragMenuConfig(d
217
195
  order: _customSteps.TableSortOrder.DESC,
218
196
  icon: function icon() {
219
197
  return /*#__PURE__*/_react.default.createElement(_sortDescending.default, {
220
- LEGACY_fallbackIcon: _chevronDoubleDown.default,
221
198
  spacing: 'spacious',
222
199
  label: ''
223
200
  });
@@ -278,7 +255,6 @@ var getDragMenuConfig = exports.getDragMenuConfig = function getDragMenuConfig(d
278
255
  },
279
256
  icon: function icon() {
280
257
  return /*#__PURE__*/_react.default.createElement(_tableColumnsDistribute.default, {
281
- LEGACY_fallbackIcon: _layoutThreeEqual.default,
282
258
  spacing: 'spacious',
283
259
  label: ''
284
260
  });
@@ -292,7 +268,6 @@ var getDragMenuConfig = exports.getDragMenuConfig = function getDragMenuConfig(d
292
268
  },
293
269
  icon: function icon() {
294
270
  return /*#__PURE__*/_react.default.createElement(_tableCellClear.default, {
295
- LEGACY_fallbackIcon: _crossCircle.default,
296
271
  spacing: 'spacious',
297
272
  label: ''
298
273
  });
@@ -311,13 +286,11 @@ var getDragMenuConfig = exports.getDragMenuConfig = function getDragMenuConfig(d
311
286
  },
312
287
  icon: direction === 'row' ? function () {
313
288
  return /*#__PURE__*/_react.default.createElement(_tableRowDelete.default, {
314
- LEGACY_fallbackIcon: _remove.default,
315
289
  spacing: 'spacious',
316
290
  label: ''
317
291
  });
318
292
  } : function () {
319
293
  return /*#__PURE__*/_react.default.createElement(_tableColumnDelete.default, {
320
- LEGACY_fallbackIcon: _remove.default,
321
294
  spacing: 'spacious',
322
295
  label: ''
323
296
  });
@@ -9,6 +9,7 @@ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers
9
9
  var _utils = require("@atlaskit/editor-common/utils");
10
10
  var _tableMap = require("@atlaskit/editor-tables/table-map");
11
11
  var _utils2 = require("@atlaskit/editor-tables/utils");
12
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
12
13
  var isIsolating = exports.isIsolating = function isIsolating(node) {
13
14
  return !!node.type.spec.isolating;
14
15
  };
@@ -102,8 +103,12 @@ function getTableWidths(node) {
102
103
  }
103
104
  var isTableNested = exports.isTableNested = function isTableNested(state) {
104
105
  var tablePos = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
105
- var parent = state.doc.resolve(tablePos).parent;
106
+ var $tablePos = state.doc.resolve(tablePos);
107
+ var parent = $tablePos.parent;
106
108
  var nodeTypes = state.schema.nodes;
109
+ if ((0, _platformFeatureFlags.fg)('platform_editor_change_table_nesting_check')) {
110
+ return $tablePos.depth > 0;
111
+ }
107
112
  return parent.type === nodeTypes.layoutColumn || parent.type === nodeTypes.expand || parent.type === nodeTypes.bodiedExtension || parent.type === nodeTypes.extensionFrame || parent.type === nodeTypes.tableHeader || parent.type === nodeTypes.tableCell;
108
113
  };
109
114
  var isTableNestedInMoreThanOneNode = exports.isTableNestedInMoreThanOneNode = function isTableNestedInMoreThanOneNode(state) {
@@ -124,7 +129,7 @@ var anyChildCellMergedAcrossRow = function anyChildCellMergedAcrossRow(node) {
124
129
  * - no table cells have been have merged with other table row cells
125
130
  *
126
131
  * @param node ProseMirror node
127
- * @return boolean if it meets definition
132
+ * @returns boolean if it meets definition
128
133
  */
129
134
  var supportedHeaderRow = exports.supportedHeaderRow = function supportedHeaderRow(node) {
130
135
  var allHeaders = (0, _utils.mapChildren)(node, function (child) {
@@ -37,8 +37,6 @@ var _tableColumnDelete = _interopRequireDefault(require("@atlaskit/icon/core/tab
37
37
  var _tableColumnsDistribute = _interopRequireDefault(require("@atlaskit/icon/core/table-columns-distribute"));
38
38
  var _tableRowAddBelow = _interopRequireDefault(require("@atlaskit/icon/core/table-row-add-below"));
39
39
  var _tableRowDelete = _interopRequireDefault(require("@atlaskit/icon/core/table-row-delete"));
40
- var _crossCircle = _interopRequireDefault(require("@atlaskit/icon/glyph/cross-circle"));
41
- var _remove = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/remove"));
42
40
  var _primitives = require("@atlaskit/primitives");
43
41
  var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
44
42
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
@@ -53,10 +51,6 @@ var _selection = require("../../pm-plugins/utils/selection");
53
51
  var _table = require("../../pm-plugins/utils/table");
54
52
  var _types = require("../../types");
55
53
  var _consts = require("../consts");
56
- var _AddColRightIcon = require("../icons/AddColRightIcon");
57
- var _AddRowBelowIcon = require("../icons/AddRowBelowIcon");
58
- var _MergeCellsIcon = require("../icons/MergeCellsIcon");
59
- var _SplitCellIcon = require("../icons/SplitCellIcon");
60
54
  var _styles2 = require("./styles");
61
55
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
62
56
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
@@ -210,8 +204,7 @@ var ContextualMenu = exports.ContextualMenu = /*#__PURE__*/function (_Component)
210
204
  }, (0, _react2.jsx)(_tableColumnsDistribute.default, {
211
205
  color: "currentColor",
212
206
  spacing: "spacious",
213
- label: formatMessage(_messages.tableMessages.distributeColumns),
214
- LEGACY_fallbackIcon: _MergeCellsIcon.MergeCellsIcon
207
+ label: formatMessage(_messages.tableMessages.distributeColumns)
215
208
  }))
216
209
  });
217
210
  });
@@ -235,8 +228,7 @@ var ContextualMenu = exports.ContextualMenu = /*#__PURE__*/function (_Component)
235
228
  }, (0, _react2.jsx)(_tableCellMerge.default, {
236
229
  color: "currentColor",
237
230
  spacing: "spacious",
238
- label: formatMessage(_messages.tableMessages.mergeCells),
239
- LEGACY_fallbackIcon: _MergeCellsIcon.MergeCellsIcon
231
+ label: formatMessage(_messages.tableMessages.mergeCells)
240
232
  })) : undefined
241
233
  }, {
242
234
  content: formatMessage(_messages.tableMessages.splitCell),
@@ -249,8 +241,7 @@ var ContextualMenu = exports.ContextualMenu = /*#__PURE__*/function (_Component)
249
241
  }, (0, _react2.jsx)(_tableCellSplit.default, {
250
242
  color: "currentColor",
251
243
  spacing: "spacious",
252
- label: formatMessage(_messages.tableMessages.splitCell),
253
- LEGACY_fallbackIcon: _SplitCellIcon.SplitCellIcon
244
+ label: formatMessage(_messages.tableMessages.splitCell)
254
245
  })) : undefined
255
246
  }];
256
247
  }
@@ -279,8 +270,7 @@ var ContextualMenu = exports.ContextualMenu = /*#__PURE__*/function (_Component)
279
270
  }, (0, _react2.jsx)(_tableColumnAddRight.default, {
280
271
  color: "currentColor",
281
272
  spacing: "spacious",
282
- label: formatMessage(_messages.tableMessages.addColumnRight),
283
- LEGACY_fallbackIcon: _AddColRightIcon.AddColRightIcon
273
+ label: formatMessage(_messages.tableMessages.addColumnRight)
284
274
  })) : undefined,
285
275
  'aria-label': (0, _keymaps.tooltip)(_keymaps.addColumnAfter, String(content))
286
276
  };
@@ -306,8 +296,7 @@ var ContextualMenu = exports.ContextualMenu = /*#__PURE__*/function (_Component)
306
296
  }, (0, _react2.jsx)(_tableRowAddBelow.default, {
307
297
  color: "currentColor",
308
298
  spacing: "spacious",
309
- label: formatMessage(_messages.tableMessages.addRowBelow),
310
- LEGACY_fallbackIcon: _AddRowBelowIcon.AddRowBelowIcon
299
+ label: formatMessage(_messages.tableMessages.addRowBelow)
311
300
  })) : undefined,
312
301
  'aria-label': (0, _keymaps.tooltip)(_keymaps.addRowAfter, String(content))
313
302
  };
@@ -344,8 +333,7 @@ var ContextualMenu = exports.ContextualMenu = /*#__PURE__*/function (_Component)
344
333
  spacing: "spacious",
345
334
  label: formatMessage(_messages.tableMessages.clearCells, {
346
335
  0: Math.max(noOfColumns, noOfRows)
347
- }),
348
- LEGACY_fallbackIcon: _crossCircle.default
336
+ })
349
337
  })) : undefined,
350
338
  'aria-label': (0, _keymaps.tooltip)(_keymaps.backspace, String(content))
351
339
  };
@@ -374,8 +362,7 @@ var ContextualMenu = exports.ContextualMenu = /*#__PURE__*/function (_Component)
374
362
  spacing: "spacious",
375
363
  label: formatMessage(_messages.tableMessages.removeColumns, {
376
364
  0: noOfColumns
377
- }),
378
- LEGACY_fallbackIcon: _remove.default
365
+ })
379
366
  })) : undefined
380
367
  };
381
368
  });
@@ -403,8 +390,7 @@ var ContextualMenu = exports.ContextualMenu = /*#__PURE__*/function (_Component)
403
390
  spacing: "spacious",
404
391
  label: formatMessage(_messages.tableMessages.removeRows, {
405
392
  0: noOfRows
406
- }),
407
- LEGACY_fallbackIcon: _remove.default
393
+ })
408
394
  })) : undefined
409
395
  };
410
396
  });
@@ -173,8 +173,7 @@ var convertToDropdownItems = function convertToDropdownItems(dragMenuConfig, for
173
173
  }, (0, _react2.jsx)(item.icon, {
174
174
  color: "currentColor",
175
175
  spacing: "spacious",
176
- label: formatMessage(MapDragMenuOptionIdToMessage[item.id].message, options),
177
- LEGACY_fallbackIcon: item.iconFallback ? item.iconFallback : undefined
176
+ label: formatMessage(MapDragMenuOptionIdToMessage[item.id].message, options)
178
177
  })) : undefined,
179
178
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
180
179
  elemAfter: item.keymap ? (0, _react2.jsx)("div", {
@@ -31,9 +31,6 @@ var _copy = _interopRequireDefault(require("@atlaskit/icon/core/copy"));
31
31
  var _customize = _interopRequireDefault(require("@atlaskit/icon/core/customize"));
32
32
  var _delete = _interopRequireDefault(require("@atlaskit/icon/core/delete"));
33
33
  var _tableColumnsDistribute = _interopRequireDefault(require("@atlaskit/icon/core/table-columns-distribute"));
34
- var _alignImageCenter2 = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/align-image-center"));
35
- var _alignImageLeft2 = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/align-image-left"));
36
- var _layoutThreeEqual = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/layout-three-equal"));
37
34
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
38
35
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
39
36
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
@@ -675,7 +672,6 @@ var getColumnSettingItems = function getColumnSettingItems(editorState, editorVi
675
672
  title: formatMessage(_messages.tableMessages.distributeColumns),
676
673
  icon: function icon() {
677
674
  return (0, _react.jsx)(_tableColumnsDistribute.default, {
678
- LEGACY_fallbackIcon: _layoutThreeEqual.default,
679
675
  spacing: 'spacious',
680
676
  label: ''
681
677
  });
@@ -770,8 +766,7 @@ var getAlignmentOptionsConfig = function getAlignmentOptionsConfig(editorState,
770
766
  return (0, _react.jsx)(_alignImageLeft.default, {
771
767
  color: "currentColor",
772
768
  spacing: "spacious",
773
- label: "table-align-start-icon",
774
- LEGACY_fallbackIcon: _alignImageLeft2.default
769
+ label: "table-align-start-icon"
775
770
  });
776
771
  }
777
772
  }, {
@@ -781,8 +776,7 @@ var getAlignmentOptionsConfig = function getAlignmentOptionsConfig(editorState,
781
776
  return (0, _react.jsx)(_alignImageCenter.default, {
782
777
  color: "currentColor",
783
778
  spacing: "spacious",
784
- label: "table-align-center-icon",
785
- LEGACY_fallbackIcon: _alignImageCenter2.default
779
+ label: "table-align-center-icon"
786
780
  });
787
781
  }
788
782
  }];
@@ -16,19 +16,6 @@ import TableRowAddBelowIcon from '@atlaskit/icon/core/table-row-add-below';
16
16
  import TableRowDeleteIcon from '@atlaskit/icon/core/table-row-delete';
17
17
  import TableRowMoveDownIcon from '@atlaskit/icon/core/table-row-move-down';
18
18
  import TableRowMoveUpIcon from '@atlaskit/icon/core/table-row-move-up';
19
- import ArrowDownIcon from '@atlaskit/icon/glyph/arrow-down';
20
- import ArrowLeftIcon from '@atlaskit/icon/glyph/arrow-left';
21
- import ArrowRightIcon from '@atlaskit/icon/glyph/arrow-right';
22
- import ArrowUpIcon from '@atlaskit/icon/glyph/arrow-up';
23
- import CrossCircleIcon from '@atlaskit/icon/glyph/cross-circle';
24
- import EditorLayoutThreeEqualIcon from '@atlaskit/icon/glyph/editor/layout-three-equal';
25
- import RemoveIcon from '@atlaskit/icon/glyph/editor/remove';
26
- import HipchatChevronDoubleDownIcon from '@atlaskit/icon/glyph/hipchat/chevron-double-down';
27
- import HipchatChevronDoubleUpIcon from '@atlaskit/icon/glyph/hipchat/chevron-double-up';
28
- import { AddColLeftIcon } from '../../ui/icons/AddColLeftIcon';
29
- import { AddColRightIcon } from '../../ui/icons/AddColRightIcon';
30
- import { AddRowAboveIcon } from '../../ui/icons/AddRowAboveIcon';
31
- import { AddRowBelowIcon } from '../../ui/icons/AddRowBelowIcon';
32
19
  import { getClosestSelectionRect } from '../../ui/toolbar';
33
20
  import { deleteColumnsWithAnalytics, deleteRowsWithAnalytics, distributeColumnsWidthsWithAnalytics, emptyMultipleCellsWithAnalytics, insertColumnWithAnalytics, insertRowWithAnalytics, sortColumnWithAnalytics } from '../commands/commands-with-analytics';
34
21
  import { moveSourceWithAnalytics } from '../drag-and-drop/commands-with-analytics';
@@ -88,7 +75,6 @@ export const getDragMenuConfig = (direction, getEditorContainerWidth, hasMergedC
88
75
  label: 'above',
89
76
  offset: 0,
90
77
  icon: () => /*#__PURE__*/React.createElement(TableRowAddAboveIcon, {
91
- LEGACY_fallbackIcon: AddRowAboveIcon,
92
78
  spacing: 'spacious',
93
79
  label: ''
94
80
  }),
@@ -97,7 +83,6 @@ export const getDragMenuConfig = (direction, getEditorContainerWidth, hasMergedC
97
83
  label: 'below',
98
84
  offset: 1,
99
85
  icon: () => /*#__PURE__*/React.createElement(TableRowAddBelowIcon, {
100
- LEGACY_fallbackIcon: AddRowBelowIcon,
101
86
  spacing: 'spacious',
102
87
  label: ''
103
88
  }),
@@ -106,7 +91,6 @@ export const getDragMenuConfig = (direction, getEditorContainerWidth, hasMergedC
106
91
  label: 'left',
107
92
  offset: 0,
108
93
  icon: () => /*#__PURE__*/React.createElement(TableColumnAddLeftIcon, {
109
- LEGACY_fallbackIcon: AddColLeftIcon,
110
94
  spacing: 'spacious',
111
95
  label: ''
112
96
  }),
@@ -115,7 +99,6 @@ export const getDragMenuConfig = (direction, getEditorContainerWidth, hasMergedC
115
99
  label: 'right',
116
100
  offset: 1,
117
101
  icon: () => /*#__PURE__*/React.createElement(TableColumnAddRightIcon, {
118
- LEGACY_fallbackIcon: AddColRightIcon,
119
102
  spacing: 'spacious',
120
103
  label: ''
121
104
  }),
@@ -124,7 +107,6 @@ export const getDragMenuConfig = (direction, getEditorContainerWidth, hasMergedC
124
107
  const moveOptions = direction === 'row' ? [{
125
108
  label: 'up',
126
109
  icon: () => /*#__PURE__*/React.createElement(TableRowMoveUpIcon, {
127
- LEGACY_fallbackIcon: ArrowUpIcon,
128
110
  spacing: 'spacious',
129
111
  label: ''
130
112
  }),
@@ -135,7 +117,6 @@ export const getDragMenuConfig = (direction, getEditorContainerWidth, hasMergedC
135
117
  }, {
136
118
  label: 'down',
137
119
  icon: () => /*#__PURE__*/React.createElement(TableRowMoveDownIcon, {
138
- LEGACY_fallbackIcon: ArrowDownIcon,
139
120
  spacing: 'spacious',
140
121
  label: ''
141
122
  }),
@@ -146,7 +127,6 @@ export const getDragMenuConfig = (direction, getEditorContainerWidth, hasMergedC
146
127
  }] : [{
147
128
  label: 'left',
148
129
  icon: () => /*#__PURE__*/React.createElement(TableColumnMoveLeftIcon, {
149
- LEGACY_fallbackIcon: ArrowLeftIcon,
150
130
  spacing: 'spacious',
151
131
  label: ''
152
132
  }),
@@ -157,7 +137,6 @@ export const getDragMenuConfig = (direction, getEditorContainerWidth, hasMergedC
157
137
  }, {
158
138
  label: 'right',
159
139
  icon: () => /*#__PURE__*/React.createElement(TableColumnMoveRightIcon, {
160
- LEGACY_fallbackIcon: ArrowRightIcon,
161
140
  spacing: 'spacious',
162
141
  label: ''
163
142
  }),
@@ -170,7 +149,6 @@ export const getDragMenuConfig = (direction, getEditorContainerWidth, hasMergedC
170
149
  label: 'increasing',
171
150
  order: SortOrder.ASC,
172
151
  icon: () => /*#__PURE__*/React.createElement(SortAscendingIcon, {
173
- LEGACY_fallbackIcon: HipchatChevronDoubleUpIcon,
174
152
  spacing: 'spacious',
175
153
  label: ''
176
154
  })
@@ -178,7 +156,6 @@ export const getDragMenuConfig = (direction, getEditorContainerWidth, hasMergedC
178
156
  label: 'decreasing',
179
157
  order: SortOrder.DESC,
180
158
  icon: () => /*#__PURE__*/React.createElement(SortDescendingIcon, {
181
- LEGACY_fallbackIcon: HipchatChevronDoubleDownIcon,
182
159
  spacing: 'spacious',
183
160
  label: ''
184
161
  })
@@ -235,7 +212,6 @@ export const getDragMenuConfig = (direction, getEditorContainerWidth, hasMergedC
235
212
  return false;
236
213
  },
237
214
  icon: () => /*#__PURE__*/React.createElement(TableColumnsDistributeIcon, {
238
- LEGACY_fallbackIcon: EditorLayoutThreeEqualIcon,
239
215
  spacing: 'spacious',
240
216
  label: ''
241
217
  })
@@ -247,7 +223,6 @@ export const getDragMenuConfig = (direction, getEditorContainerWidth, hasMergedC
247
223
  return true;
248
224
  },
249
225
  icon: () => /*#__PURE__*/React.createElement(TableCellClearIcon, {
250
- LEGACY_fallbackIcon: CrossCircleIcon,
251
226
  spacing: 'spacious',
252
227
  label: ''
253
228
  }),
@@ -264,11 +239,9 @@ export const getDragMenuConfig = (direction, getEditorContainerWidth, hasMergedC
264
239
  return true;
265
240
  },
266
241
  icon: direction === 'row' ? () => /*#__PURE__*/React.createElement(TableRowDeleteIcon, {
267
- LEGACY_fallbackIcon: RemoveIcon,
268
242
  spacing: 'spacious',
269
243
  label: ''
270
244
  }) : () => /*#__PURE__*/React.createElement(TableColumnDeleteIcon, {
271
- LEGACY_fallbackIcon: RemoveIcon,
272
245
  spacing: 'spacious',
273
246
  label: ''
274
247
  }),
@@ -1,6 +1,7 @@
1
1
  import { mapChildren } from '@atlaskit/editor-common/utils';
2
2
  import { TableMap } from '@atlaskit/editor-tables/table-map';
3
3
  import { findTable } from '@atlaskit/editor-tables/utils';
4
+ import { fg } from '@atlaskit/platform-feature-flags';
4
5
  export const isIsolating = node => {
5
6
  return !!node.type.spec.isolating;
6
7
  };
@@ -83,8 +84,12 @@ function getTableWidths(node) {
83
84
  return tableWidths;
84
85
  }
85
86
  export const isTableNested = (state, tablePos = 0) => {
86
- const parent = state.doc.resolve(tablePos).parent;
87
+ const $tablePos = state.doc.resolve(tablePos);
88
+ const parent = $tablePos.parent;
87
89
  const nodeTypes = state.schema.nodes;
90
+ if (fg('platform_editor_change_table_nesting_check')) {
91
+ return $tablePos.depth > 0;
92
+ }
88
93
  return parent.type === nodeTypes.layoutColumn || parent.type === nodeTypes.expand || parent.type === nodeTypes.bodiedExtension || parent.type === nodeTypes.extensionFrame || parent.type === nodeTypes.tableHeader || parent.type === nodeTypes.tableCell;
89
94
  };
90
95
  export const isTableNestedInMoreThanOneNode = (state, tablePos = 0) => {
@@ -98,7 +103,7 @@ const anyChildCellMergedAcrossRow = node => mapChildren(node, child => child.att
98
103
  * - no table cells have been have merged with other table row cells
99
104
  *
100
105
  * @param node ProseMirror node
101
- * @return boolean if it meets definition
106
+ * @returns boolean if it meets definition
102
107
  */
103
108
  export const supportedHeaderRow = node => {
104
109
  const allHeaders = mapChildren(node, child => child.type.name === 'tableHeader').every(Boolean);
@@ -29,8 +29,6 @@ import TableColumnDeleteIcon from '@atlaskit/icon/core/table-column-delete';
29
29
  import TableColumnsDistributeIcon from '@atlaskit/icon/core/table-columns-distribute';
30
30
  import TableRowAddBelowIcon from '@atlaskit/icon/core/table-row-add-below';
31
31
  import TableRowDeleteIcon from '@atlaskit/icon/core/table-row-delete';
32
- import CrossCircleIcon from '@atlaskit/icon/glyph/cross-circle';
33
- import RemoveIcon from '@atlaskit/icon/glyph/editor/remove';
34
32
  // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
35
33
  import { Box, xcss } from '@atlaskit/primitives';
36
34
  import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
@@ -46,10 +44,6 @@ import { getSelectedColumnIndexes, getSelectedRowIndexes } from '../../pm-plugin
46
44
  import { getMergedCellsPositions } from '../../pm-plugins/utils/table';
47
45
  import { TableCssClassName as ClassName } from '../../types';
48
46
  import { colorPalletteColumns, contextualMenuDropdownWidth, contextualMenuDropdownWidthDnD } from '../consts';
49
- import { AddColRightIcon } from '../icons/AddColRightIcon';
50
- import { AddRowBelowIcon } from '../icons/AddRowBelowIcon';
51
- import { MergeCellsIcon } from '../icons/MergeCellsIcon';
52
- import { SplitCellIcon } from '../icons/SplitCellIcon';
53
47
  import { cellColourPreviewStyles } from './styles';
54
48
  const arrowsList = new Set(['ArrowRight', 'ArrowLeft']);
55
49
  const elementBeforeIconStyles = xcss({
@@ -201,8 +195,7 @@ export class ContextualMenu extends Component {
201
195
  }, jsx(TableColumnsDistributeIcon, {
202
196
  color: "currentColor",
203
197
  spacing: "spacious",
204
- label: formatMessage(messages.distributeColumns),
205
- LEGACY_fallbackIcon: MergeCellsIcon
198
+ label: formatMessage(messages.distributeColumns)
206
199
  }))
207
200
  });
208
201
  });
@@ -232,8 +225,7 @@ export class ContextualMenu extends Component {
232
225
  }, jsx(TableCellMergeIcon, {
233
226
  color: "currentColor",
234
227
  spacing: "spacious",
235
- label: formatMessage(messages.mergeCells),
236
- LEGACY_fallbackIcon: MergeCellsIcon
228
+ label: formatMessage(messages.mergeCells)
237
229
  })) : undefined
238
230
  }, {
239
231
  content: formatMessage(messages.splitCell),
@@ -246,8 +238,7 @@ export class ContextualMenu extends Component {
246
238
  }, jsx(TableCellSplitIcon, {
247
239
  color: "currentColor",
248
240
  spacing: "spacious",
249
- label: formatMessage(messages.splitCell),
250
- LEGACY_fallbackIcon: SplitCellIcon
241
+ label: formatMessage(messages.splitCell)
251
242
  })) : undefined
252
243
  }];
253
244
  }
@@ -280,8 +271,7 @@ export class ContextualMenu extends Component {
280
271
  }, jsx(TableColumnAddRightIcon, {
281
272
  color: "currentColor",
282
273
  spacing: "spacious",
283
- label: formatMessage(messages.addColumnRight),
284
- LEGACY_fallbackIcon: AddColRightIcon
274
+ label: formatMessage(messages.addColumnRight)
285
275
  })) : undefined,
286
276
  'aria-label': tooltip(addColumnAfter, String(content))
287
277
  };
@@ -311,8 +301,7 @@ export class ContextualMenu extends Component {
311
301
  }, jsx(TableRowAddBelowIcon, {
312
302
  color: "currentColor",
313
303
  spacing: "spacious",
314
- label: formatMessage(messages.addRowBelow),
315
- LEGACY_fallbackIcon: AddRowBelowIcon
304
+ label: formatMessage(messages.addRowBelow)
316
305
  })) : undefined,
317
306
  'aria-label': tooltip(addRowAfter, String(content))
318
307
  };
@@ -355,8 +344,7 @@ export class ContextualMenu extends Component {
355
344
  spacing: "spacious",
356
345
  label: formatMessage(messages.clearCells, {
357
346
  0: Math.max(noOfColumns, noOfRows)
358
- }),
359
- LEGACY_fallbackIcon: CrossCircleIcon
347
+ })
360
348
  })) : undefined,
361
349
  'aria-label': tooltip(backspace, String(content))
362
350
  };
@@ -391,8 +379,7 @@ export class ContextualMenu extends Component {
391
379
  spacing: "spacious",
392
380
  label: formatMessage(messages.removeColumns, {
393
381
  0: noOfColumns
394
- }),
395
- LEGACY_fallbackIcon: RemoveIcon
382
+ })
396
383
  })) : undefined
397
384
  };
398
385
  });
@@ -426,8 +413,7 @@ export class ContextualMenu extends Component {
426
413
  spacing: "spacious",
427
414
  label: formatMessage(messages.removeRows, {
428
415
  0: noOfRows
429
- }),
430
- LEGACY_fallbackIcon: RemoveIcon
416
+ })
431
417
  })) : undefined
432
418
  };
433
419
  });
@@ -158,8 +158,7 @@ const convertToDropdownItems = (dragMenuConfig, formatMessage, selectionRect) =>
158
158
  }, jsx(item.icon, {
159
159
  color: "currentColor",
160
160
  spacing: "spacious",
161
- label: formatMessage(MapDragMenuOptionIdToMessage[item.id].message, options),
162
- LEGACY_fallbackIcon: item.iconFallback ? item.iconFallback : undefined
161
+ label: formatMessage(MapDragMenuOptionIdToMessage[item.id].message, options)
163
162
  })) : undefined,
164
163
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
165
164
  elemAfter: item.keymap ? jsx("div", {
@@ -26,9 +26,6 @@ import CopyIcon from '@atlaskit/icon/core/copy';
26
26
  import CustomizeIcon from '@atlaskit/icon/core/customize';
27
27
  import DeleteIcon from '@atlaskit/icon/core/delete';
28
28
  import TableColumnsDistributeIcon from '@atlaskit/icon/core/table-columns-distribute';
29
- import EditorAlignImageCenter from '@atlaskit/icon/glyph/editor/align-image-center';
30
- import EditorAlignImageLeft from '@atlaskit/icon/glyph/editor/align-image-left';
31
- import DistributeColumnIcon from '@atlaskit/icon/glyph/editor/layout-three-equal';
32
29
  import { fg } from '@atlaskit/platform-feature-flags';
33
30
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
34
31
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
@@ -630,7 +627,6 @@ const getColumnSettingItems = (editorState, editorView, {
630
627
  type: 'button',
631
628
  title: formatMessage(messages.distributeColumns),
632
629
  icon: () => jsx(TableColumnsDistributeIcon, {
633
- LEGACY_fallbackIcon: DistributeColumnIcon,
634
630
  spacing: 'spacious',
635
631
  label: ''
636
632
  }),
@@ -718,8 +714,7 @@ const getAlignmentOptionsConfig = (editorState, {
718
714
  icon: () => jsx(AlignImageLeftIcon, {
719
715
  color: "currentColor",
720
716
  spacing: "spacious",
721
- label: "table-align-start-icon",
722
- LEGACY_fallbackIcon: EditorAlignImageLeft
717
+ label: "table-align-start-icon"
723
718
  })
724
719
  }, {
725
720
  id: 'editor.table.alignCenter',
@@ -727,8 +722,7 @@ const getAlignmentOptionsConfig = (editorState, {
727
722
  icon: () => jsx(AlignImageCenterIcon, {
728
723
  color: "currentColor",
729
724
  spacing: "spacious",
730
- label: "table-align-center-icon",
731
- LEGACY_fallbackIcon: EditorAlignImageCenter
725
+ label: "table-align-center-icon"
732
726
  })
733
727
  }];
734
728
 
@@ -17,19 +17,6 @@ import TableRowAddBelowIcon from '@atlaskit/icon/core/table-row-add-below';
17
17
  import TableRowDeleteIcon from '@atlaskit/icon/core/table-row-delete';
18
18
  import TableRowMoveDownIcon from '@atlaskit/icon/core/table-row-move-down';
19
19
  import TableRowMoveUpIcon from '@atlaskit/icon/core/table-row-move-up';
20
- import ArrowDownIcon from '@atlaskit/icon/glyph/arrow-down';
21
- import ArrowLeftIcon from '@atlaskit/icon/glyph/arrow-left';
22
- import ArrowRightIcon from '@atlaskit/icon/glyph/arrow-right';
23
- import ArrowUpIcon from '@atlaskit/icon/glyph/arrow-up';
24
- import CrossCircleIcon from '@atlaskit/icon/glyph/cross-circle';
25
- import EditorLayoutThreeEqualIcon from '@atlaskit/icon/glyph/editor/layout-three-equal';
26
- import RemoveIcon from '@atlaskit/icon/glyph/editor/remove';
27
- import HipchatChevronDoubleDownIcon from '@atlaskit/icon/glyph/hipchat/chevron-double-down';
28
- import HipchatChevronDoubleUpIcon from '@atlaskit/icon/glyph/hipchat/chevron-double-up';
29
- import { AddColLeftIcon } from '../../ui/icons/AddColLeftIcon';
30
- import { AddColRightIcon } from '../../ui/icons/AddColRightIcon';
31
- import { AddRowAboveIcon } from '../../ui/icons/AddRowAboveIcon';
32
- import { AddRowBelowIcon } from '../../ui/icons/AddRowBelowIcon';
33
20
  import { getClosestSelectionRect } from '../../ui/toolbar';
34
21
  import { deleteColumnsWithAnalytics, deleteRowsWithAnalytics, distributeColumnsWidthsWithAnalytics, emptyMultipleCellsWithAnalytics, insertColumnWithAnalytics, insertRowWithAnalytics, sortColumnWithAnalytics } from '../commands/commands-with-analytics';
35
22
  import { moveSourceWithAnalytics } from '../drag-and-drop/commands-with-analytics';
@@ -94,7 +81,6 @@ export var getDragMenuConfig = function getDragMenuConfig(direction, getEditorCo
94
81
  offset: 0,
95
82
  icon: function icon() {
96
83
  return /*#__PURE__*/React.createElement(TableRowAddAboveIcon, {
97
- LEGACY_fallbackIcon: AddRowAboveIcon,
98
84
  spacing: 'spacious',
99
85
  label: ''
100
86
  });
@@ -105,7 +91,6 @@ export var getDragMenuConfig = function getDragMenuConfig(direction, getEditorCo
105
91
  offset: 1,
106
92
  icon: function icon() {
107
93
  return /*#__PURE__*/React.createElement(TableRowAddBelowIcon, {
108
- LEGACY_fallbackIcon: AddRowBelowIcon,
109
94
  spacing: 'spacious',
110
95
  label: ''
111
96
  });
@@ -116,7 +101,6 @@ export var getDragMenuConfig = function getDragMenuConfig(direction, getEditorCo
116
101
  offset: 0,
117
102
  icon: function icon() {
118
103
  return /*#__PURE__*/React.createElement(TableColumnAddLeftIcon, {
119
- LEGACY_fallbackIcon: AddColLeftIcon,
120
104
  spacing: 'spacious',
121
105
  label: ''
122
106
  });
@@ -127,7 +111,6 @@ export var getDragMenuConfig = function getDragMenuConfig(direction, getEditorCo
127
111
  offset: 1,
128
112
  icon: function icon() {
129
113
  return /*#__PURE__*/React.createElement(TableColumnAddRightIcon, {
130
- LEGACY_fallbackIcon: AddColRightIcon,
131
114
  spacing: 'spacious',
132
115
  label: ''
133
116
  });
@@ -138,7 +121,6 @@ export var getDragMenuConfig = function getDragMenuConfig(direction, getEditorCo
138
121
  label: 'up',
139
122
  icon: function icon() {
140
123
  return /*#__PURE__*/React.createElement(TableRowMoveUpIcon, {
141
- LEGACY_fallbackIcon: ArrowUpIcon,
142
124
  spacing: 'spacious',
143
125
  label: ''
144
126
  });
@@ -153,7 +135,6 @@ export var getDragMenuConfig = function getDragMenuConfig(direction, getEditorCo
153
135
  label: 'down',
154
136
  icon: function icon() {
155
137
  return /*#__PURE__*/React.createElement(TableRowMoveDownIcon, {
156
- LEGACY_fallbackIcon: ArrowDownIcon,
157
138
  spacing: 'spacious',
158
139
  label: ''
159
140
  });
@@ -168,7 +149,6 @@ export var getDragMenuConfig = function getDragMenuConfig(direction, getEditorCo
168
149
  label: 'left',
169
150
  icon: function icon() {
170
151
  return /*#__PURE__*/React.createElement(TableColumnMoveLeftIcon, {
171
- LEGACY_fallbackIcon: ArrowLeftIcon,
172
152
  spacing: 'spacious',
173
153
  label: ''
174
154
  });
@@ -183,7 +163,6 @@ export var getDragMenuConfig = function getDragMenuConfig(direction, getEditorCo
183
163
  label: 'right',
184
164
  icon: function icon() {
185
165
  return /*#__PURE__*/React.createElement(TableColumnMoveRightIcon, {
186
- LEGACY_fallbackIcon: ArrowRightIcon,
187
166
  spacing: 'spacious',
188
167
  label: ''
189
168
  });
@@ -200,7 +179,6 @@ export var getDragMenuConfig = function getDragMenuConfig(direction, getEditorCo
200
179
  order: SortOrder.ASC,
201
180
  icon: function icon() {
202
181
  return /*#__PURE__*/React.createElement(SortAscendingIcon, {
203
- LEGACY_fallbackIcon: HipchatChevronDoubleUpIcon,
204
182
  spacing: 'spacious',
205
183
  label: ''
206
184
  });
@@ -210,7 +188,6 @@ export var getDragMenuConfig = function getDragMenuConfig(direction, getEditorCo
210
188
  order: SortOrder.DESC,
211
189
  icon: function icon() {
212
190
  return /*#__PURE__*/React.createElement(SortDescendingIcon, {
213
- LEGACY_fallbackIcon: HipchatChevronDoubleDownIcon,
214
191
  spacing: 'spacious',
215
192
  label: ''
216
193
  });
@@ -271,7 +248,6 @@ export var getDragMenuConfig = function getDragMenuConfig(direction, getEditorCo
271
248
  },
272
249
  icon: function icon() {
273
250
  return /*#__PURE__*/React.createElement(TableColumnsDistributeIcon, {
274
- LEGACY_fallbackIcon: EditorLayoutThreeEqualIcon,
275
251
  spacing: 'spacious',
276
252
  label: ''
277
253
  });
@@ -285,7 +261,6 @@ export var getDragMenuConfig = function getDragMenuConfig(direction, getEditorCo
285
261
  },
286
262
  icon: function icon() {
287
263
  return /*#__PURE__*/React.createElement(TableCellClearIcon, {
288
- LEGACY_fallbackIcon: CrossCircleIcon,
289
264
  spacing: 'spacious',
290
265
  label: ''
291
266
  });
@@ -304,13 +279,11 @@ export var getDragMenuConfig = function getDragMenuConfig(direction, getEditorCo
304
279
  },
305
280
  icon: direction === 'row' ? function () {
306
281
  return /*#__PURE__*/React.createElement(TableRowDeleteIcon, {
307
- LEGACY_fallbackIcon: RemoveIcon,
308
282
  spacing: 'spacious',
309
283
  label: ''
310
284
  });
311
285
  } : function () {
312
286
  return /*#__PURE__*/React.createElement(TableColumnDeleteIcon, {
313
- LEGACY_fallbackIcon: RemoveIcon,
314
287
  spacing: 'spacious',
315
288
  label: ''
316
289
  });
@@ -2,6 +2,7 @@ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
2
2
  import { mapChildren } from '@atlaskit/editor-common/utils';
3
3
  import { TableMap } from '@atlaskit/editor-tables/table-map';
4
4
  import { findTable } from '@atlaskit/editor-tables/utils';
5
+ import { fg } from '@atlaskit/platform-feature-flags';
5
6
  export var isIsolating = function isIsolating(node) {
6
7
  return !!node.type.spec.isolating;
7
8
  };
@@ -95,8 +96,12 @@ function getTableWidths(node) {
95
96
  }
96
97
  export var isTableNested = function isTableNested(state) {
97
98
  var tablePos = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
98
- var parent = state.doc.resolve(tablePos).parent;
99
+ var $tablePos = state.doc.resolve(tablePos);
100
+ var parent = $tablePos.parent;
99
101
  var nodeTypes = state.schema.nodes;
102
+ if (fg('platform_editor_change_table_nesting_check')) {
103
+ return $tablePos.depth > 0;
104
+ }
100
105
  return parent.type === nodeTypes.layoutColumn || parent.type === nodeTypes.expand || parent.type === nodeTypes.bodiedExtension || parent.type === nodeTypes.extensionFrame || parent.type === nodeTypes.tableHeader || parent.type === nodeTypes.tableCell;
101
106
  };
102
107
  export var isTableNestedInMoreThanOneNode = function isTableNestedInMoreThanOneNode(state) {
@@ -117,7 +122,7 @@ var anyChildCellMergedAcrossRow = function anyChildCellMergedAcrossRow(node) {
117
122
  * - no table cells have been have merged with other table row cells
118
123
  *
119
124
  * @param node ProseMirror node
120
- * @return boolean if it meets definition
125
+ * @returns boolean if it meets definition
121
126
  */
122
127
  export var supportedHeaderRow = function supportedHeaderRow(node) {
123
128
  var allHeaders = mapChildren(node, function (child) {
@@ -39,8 +39,6 @@ import TableColumnDeleteIcon from '@atlaskit/icon/core/table-column-delete';
39
39
  import TableColumnsDistributeIcon from '@atlaskit/icon/core/table-columns-distribute';
40
40
  import TableRowAddBelowIcon from '@atlaskit/icon/core/table-row-add-below';
41
41
  import TableRowDeleteIcon from '@atlaskit/icon/core/table-row-delete';
42
- import CrossCircleIcon from '@atlaskit/icon/glyph/cross-circle';
43
- import RemoveIcon from '@atlaskit/icon/glyph/editor/remove';
44
42
  // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
45
43
  import { Box, xcss } from '@atlaskit/primitives';
46
44
  import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
@@ -56,10 +54,6 @@ import { getSelectedColumnIndexes, getSelectedRowIndexes } from '../../pm-plugin
56
54
  import { getMergedCellsPositions } from '../../pm-plugins/utils/table';
57
55
  import { TableCssClassName as ClassName } from '../../types';
58
56
  import { colorPalletteColumns, contextualMenuDropdownWidth, contextualMenuDropdownWidthDnD } from '../consts';
59
- import { AddColRightIcon } from '../icons/AddColRightIcon';
60
- import { AddRowBelowIcon } from '../icons/AddRowBelowIcon';
61
- import { MergeCellsIcon } from '../icons/MergeCellsIcon';
62
- import { SplitCellIcon } from '../icons/SplitCellIcon';
63
57
  import { cellColourPreviewStyles } from './styles';
64
58
  var arrowsList = new Set(['ArrowRight', 'ArrowLeft']);
65
59
  var elementBeforeIconStyles = xcss({
@@ -204,8 +198,7 @@ export var ContextualMenu = /*#__PURE__*/function (_Component) {
204
198
  }, jsx(TableColumnsDistributeIcon, {
205
199
  color: "currentColor",
206
200
  spacing: "spacious",
207
- label: formatMessage(messages.distributeColumns),
208
- LEGACY_fallbackIcon: MergeCellsIcon
201
+ label: formatMessage(messages.distributeColumns)
209
202
  }))
210
203
  });
211
204
  });
@@ -229,8 +222,7 @@ export var ContextualMenu = /*#__PURE__*/function (_Component) {
229
222
  }, jsx(TableCellMergeIcon, {
230
223
  color: "currentColor",
231
224
  spacing: "spacious",
232
- label: formatMessage(messages.mergeCells),
233
- LEGACY_fallbackIcon: MergeCellsIcon
225
+ label: formatMessage(messages.mergeCells)
234
226
  })) : undefined
235
227
  }, {
236
228
  content: formatMessage(messages.splitCell),
@@ -243,8 +235,7 @@ export var ContextualMenu = /*#__PURE__*/function (_Component) {
243
235
  }, jsx(TableCellSplitIcon, {
244
236
  color: "currentColor",
245
237
  spacing: "spacious",
246
- label: formatMessage(messages.splitCell),
247
- LEGACY_fallbackIcon: SplitCellIcon
238
+ label: formatMessage(messages.splitCell)
248
239
  })) : undefined
249
240
  }];
250
241
  }
@@ -273,8 +264,7 @@ export var ContextualMenu = /*#__PURE__*/function (_Component) {
273
264
  }, jsx(TableColumnAddRightIcon, {
274
265
  color: "currentColor",
275
266
  spacing: "spacious",
276
- label: formatMessage(messages.addColumnRight),
277
- LEGACY_fallbackIcon: AddColRightIcon
267
+ label: formatMessage(messages.addColumnRight)
278
268
  })) : undefined,
279
269
  'aria-label': tooltip(addColumnAfter, String(content))
280
270
  };
@@ -300,8 +290,7 @@ export var ContextualMenu = /*#__PURE__*/function (_Component) {
300
290
  }, jsx(TableRowAddBelowIcon, {
301
291
  color: "currentColor",
302
292
  spacing: "spacious",
303
- label: formatMessage(messages.addRowBelow),
304
- LEGACY_fallbackIcon: AddRowBelowIcon
293
+ label: formatMessage(messages.addRowBelow)
305
294
  })) : undefined,
306
295
  'aria-label': tooltip(addRowAfter, String(content))
307
296
  };
@@ -338,8 +327,7 @@ export var ContextualMenu = /*#__PURE__*/function (_Component) {
338
327
  spacing: "spacious",
339
328
  label: formatMessage(messages.clearCells, {
340
329
  0: Math.max(noOfColumns, noOfRows)
341
- }),
342
- LEGACY_fallbackIcon: CrossCircleIcon
330
+ })
343
331
  })) : undefined,
344
332
  'aria-label': tooltip(backspace, String(content))
345
333
  };
@@ -368,8 +356,7 @@ export var ContextualMenu = /*#__PURE__*/function (_Component) {
368
356
  spacing: "spacious",
369
357
  label: formatMessage(messages.removeColumns, {
370
358
  0: noOfColumns
371
- }),
372
- LEGACY_fallbackIcon: RemoveIcon
359
+ })
373
360
  })) : undefined
374
361
  };
375
362
  });
@@ -397,8 +384,7 @@ export var ContextualMenu = /*#__PURE__*/function (_Component) {
397
384
  spacing: "spacious",
398
385
  label: formatMessage(messages.removeRows, {
399
386
  0: noOfRows
400
- }),
401
- LEGACY_fallbackIcon: RemoveIcon
387
+ })
402
388
  })) : undefined
403
389
  };
404
390
  });
@@ -162,8 +162,7 @@ var convertToDropdownItems = function convertToDropdownItems(dragMenuConfig, for
162
162
  }, jsx(item.icon, {
163
163
  color: "currentColor",
164
164
  spacing: "spacious",
165
- label: formatMessage(MapDragMenuOptionIdToMessage[item.id].message, options),
166
- LEGACY_fallbackIcon: item.iconFallback ? item.iconFallback : undefined
165
+ label: formatMessage(MapDragMenuOptionIdToMessage[item.id].message, options)
167
166
  })) : undefined,
168
167
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
169
168
  elemAfter: item.keymap ? jsx("div", {
@@ -30,9 +30,6 @@ import CopyIcon from '@atlaskit/icon/core/copy';
30
30
  import CustomizeIcon from '@atlaskit/icon/core/customize';
31
31
  import DeleteIcon from '@atlaskit/icon/core/delete';
32
32
  import TableColumnsDistributeIcon from '@atlaskit/icon/core/table-columns-distribute';
33
- import EditorAlignImageCenter from '@atlaskit/icon/glyph/editor/align-image-center';
34
- import EditorAlignImageLeft from '@atlaskit/icon/glyph/editor/align-image-left';
35
- import DistributeColumnIcon from '@atlaskit/icon/glyph/editor/layout-three-equal';
36
33
  import { fg } from '@atlaskit/platform-feature-flags';
37
34
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
38
35
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
@@ -668,7 +665,6 @@ var getColumnSettingItems = function getColumnSettingItems(editorState, editorVi
668
665
  title: formatMessage(messages.distributeColumns),
669
666
  icon: function icon() {
670
667
  return jsx(TableColumnsDistributeIcon, {
671
- LEGACY_fallbackIcon: DistributeColumnIcon,
672
668
  spacing: 'spacious',
673
669
  label: ''
674
670
  });
@@ -763,8 +759,7 @@ var getAlignmentOptionsConfig = function getAlignmentOptionsConfig(editorState,
763
759
  return jsx(AlignImageLeftIcon, {
764
760
  color: "currentColor",
765
761
  spacing: "spacious",
766
- label: "table-align-start-icon",
767
- LEGACY_fallbackIcon: EditorAlignImageLeft
762
+ label: "table-align-start-icon"
768
763
  });
769
764
  }
770
765
  }, {
@@ -774,8 +769,7 @@ var getAlignmentOptionsConfig = function getAlignmentOptionsConfig(editorState,
774
769
  return jsx(AlignImageCenterIcon, {
775
770
  color: "currentColor",
776
771
  spacing: "spacious",
777
- label: "table-align-center-icon",
778
- LEGACY_fallbackIcon: EditorAlignImageCenter
772
+ label: "table-align-center-icon"
779
773
  });
780
774
  }
781
775
  }];
@@ -18,6 +18,6 @@ export declare const isTableNestedInMoreThanOneNode: (state: EditorState, tableP
18
18
  * - no table cells have been have merged with other table row cells
19
19
  *
20
20
  * @param node ProseMirror node
21
- * @return boolean if it meets definition
21
+ * @returns boolean if it meets definition
22
22
  */
23
23
  export declare const supportedHeaderRow: (node: PmNode) => boolean;
@@ -18,6 +18,6 @@ export declare const isTableNestedInMoreThanOneNode: (state: EditorState, tableP
18
18
  * - no table cells have been have merged with other table row cells
19
19
  *
20
20
  * @param node ProseMirror node
21
- * @return boolean if it meets definition
21
+ * @returns boolean if it meets definition
22
22
  */
23
23
  export declare const supportedHeaderRow: (node: PmNode) => boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-table",
3
- "version": "15.5.6",
3
+ "version": "15.6.0",
4
4
  "description": "Table plugin for the @atlaskit/editor",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -29,7 +29,7 @@
29
29
  },
30
30
  "dependencies": {
31
31
  "@atlaskit/adf-schema": "^51.5.0",
32
- "@atlaskit/button": "^23.7.0",
32
+ "@atlaskit/button": "^23.8.0",
33
33
  "@atlaskit/custom-steps": "^0.16.0",
34
34
  "@atlaskit/editor-palette": "^2.1.0",
35
35
  "@atlaskit/editor-plugin-accessibility-utils": "^6.0.0",
@@ -48,7 +48,7 @@
48
48
  "@atlaskit/editor-prosemirror": "^7.2.0",
49
49
  "@atlaskit/editor-shared-styles": "^3.10.0",
50
50
  "@atlaskit/editor-tables": "^2.9.0",
51
- "@atlaskit/icon": "^29.1.0",
51
+ "@atlaskit/icon": "^29.2.0",
52
52
  "@atlaskit/insm": "^0.2.0",
53
53
  "@atlaskit/menu": "^8.4.0",
54
54
  "@atlaskit/platform-feature-flags": "^1.1.0",
@@ -59,7 +59,7 @@
59
59
  "@atlaskit/theme": "^21.0.0",
60
60
  "@atlaskit/tmp-editor-statsig": "^15.12.0",
61
61
  "@atlaskit/toggle": "^15.2.0",
62
- "@atlaskit/tokens": "^8.5.0",
62
+ "@atlaskit/tokens": "^8.6.0",
63
63
  "@atlaskit/tooltip": "^20.11.0",
64
64
  "@babel/runtime": "^7.0.0",
65
65
  "@emotion/react": "^11.7.1",
@@ -70,7 +70,7 @@
70
70
  "uuid": "^3.1.0"
71
71
  },
72
72
  "peerDependencies": {
73
- "@atlaskit/editor-common": "^110.44.0",
73
+ "@atlaskit/editor-common": "^110.45.0",
74
74
  "react": "^18.2.0",
75
75
  "react-dom": "^18.2.0",
76
76
  "react-intl-next": "npm:react-intl@^5.18.1"
@@ -151,6 +151,9 @@
151
151
  },
152
152
  "platform_editor_table_numbered_table_border": {
153
153
  "type": "boolean"
154
+ },
155
+ "platform_editor_change_table_nesting_check": {
156
+ "type": "boolean"
154
157
  }
155
158
  }
156
159
  }