@atlaskit/editor-plugin-table 4.0.2 → 4.1.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.
Files changed (161) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/i18n/cs.js +2 -3
  3. package/dist/cjs/i18n/da.js +2 -3
  4. package/dist/cjs/i18n/de.js +2 -3
  5. package/dist/cjs/i18n/en.js +2 -3
  6. package/dist/cjs/i18n/en_GB.js +2 -3
  7. package/dist/cjs/i18n/en_ZZ.js +2 -3
  8. package/dist/cjs/i18n/es.js +2 -3
  9. package/dist/cjs/i18n/fi.js +2 -3
  10. package/dist/cjs/i18n/fr.js +2 -3
  11. package/dist/cjs/i18n/hu.js +2 -3
  12. package/dist/cjs/i18n/it.js +2 -3
  13. package/dist/cjs/i18n/ja.js +2 -3
  14. package/dist/cjs/i18n/ko.js +2 -3
  15. package/dist/cjs/i18n/nb.js +2 -3
  16. package/dist/cjs/i18n/nl.js +2 -3
  17. package/dist/cjs/i18n/pl.js +2 -3
  18. package/dist/cjs/i18n/pt_BR.js +2 -3
  19. package/dist/cjs/i18n/ru.js +2 -3
  20. package/dist/cjs/i18n/sv.js +2 -3
  21. package/dist/cjs/i18n/th.js +2 -3
  22. package/dist/cjs/i18n/tr.js +2 -3
  23. package/dist/cjs/i18n/uk.js +2 -3
  24. package/dist/cjs/i18n/vi.js +2 -3
  25. package/dist/cjs/i18n/zh.js +2 -3
  26. package/dist/cjs/i18n/zh_TW.js +2 -3
  27. package/dist/cjs/plugins/table/commands/clear.js +3 -5
  28. package/dist/cjs/plugins/table/commands/collapse.js +2 -3
  29. package/dist/cjs/plugins/table/commands/go-to-next-cell.js +2 -3
  30. package/dist/cjs/plugins/table/commands/hover.js +8 -15
  31. package/dist/cjs/plugins/table/commands/insert.js +6 -11
  32. package/dist/cjs/plugins/table/commands/misc.js +23 -45
  33. package/dist/cjs/plugins/table/commands/referentiality.js +2 -3
  34. package/dist/cjs/plugins/table/commands/selection.js +3 -6
  35. package/dist/cjs/plugins/table/commands/sort.js +2 -3
  36. package/dist/cjs/plugins/table/commands/split-cell.js +2 -3
  37. package/dist/cjs/plugins/table/commands/toggle.js +7 -13
  38. package/dist/cjs/plugins/table/commands-with-analytics.js +19 -37
  39. package/dist/cjs/plugins/table/create-plugin-config.js +2 -3
  40. package/dist/cjs/plugins/table/event-handlers.js +12 -22
  41. package/dist/cjs/plugins/table/handlers.js +2 -3
  42. package/dist/cjs/plugins/table/index.js +8 -9
  43. package/dist/cjs/plugins/table/nodeviews/OverflowShadowsObserver.js +5 -6
  44. package/dist/cjs/plugins/table/nodeviews/TableComponent.js +2 -3
  45. package/dist/cjs/plugins/table/nodeviews/TableContainer.js +10 -13
  46. package/dist/cjs/plugins/table/nodeviews/TableResizer.js +4 -5
  47. package/dist/cjs/plugins/table/nodeviews/TableStickyScrollbar.js +5 -10
  48. package/dist/cjs/plugins/table/nodeviews/table.js +4 -6
  49. package/dist/cjs/plugins/table/nodeviews/tableCell.js +2 -3
  50. package/dist/cjs/plugins/table/nodeviews/update-overflow-shadows.js +2 -3
  51. package/dist/cjs/plugins/table/pm-plugins/decorations/plugin.js +5 -9
  52. package/dist/cjs/plugins/table/pm-plugins/decorations/utils/column-controls.js +3 -5
  53. package/dist/cjs/plugins/table/pm-plugins/decorations/utils/column-resizing.js +3 -5
  54. package/dist/cjs/plugins/table/pm-plugins/decorations/utils/compose-decorations.js +2 -3
  55. package/dist/cjs/plugins/table/pm-plugins/default-table-selection.js +2 -3
  56. package/dist/cjs/plugins/table/pm-plugins/keymap.js +1 -2
  57. package/dist/cjs/plugins/table/pm-plugins/main.js +2 -3
  58. package/dist/cjs/plugins/table/pm-plugins/plugin-factory.js +3 -6
  59. package/dist/cjs/plugins/table/pm-plugins/plugin-key.js +1 -2
  60. package/dist/cjs/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.js +3 -5
  61. package/dist/cjs/plugins/table/pm-plugins/sticky-headers/commands.js +3 -5
  62. package/dist/cjs/plugins/table/pm-plugins/sticky-headers/nodeviews/dom.js +3 -5
  63. package/dist/cjs/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +6 -8
  64. package/dist/cjs/plugins/table/pm-plugins/sticky-headers/plugin-key.js +1 -2
  65. package/dist/cjs/plugins/table/pm-plugins/sticky-headers/plugin-state.js +2 -4
  66. package/dist/cjs/plugins/table/pm-plugins/sticky-headers/plugin.js +2 -3
  67. package/dist/cjs/plugins/table/pm-plugins/sticky-headers/util.js +2 -3
  68. package/dist/cjs/plugins/table/pm-plugins/table-analytics.js +5 -8
  69. package/dist/cjs/plugins/table/pm-plugins/table-local-id.js +2 -3
  70. package/dist/cjs/plugins/table/pm-plugins/table-resizing/commands.js +7 -13
  71. package/dist/cjs/plugins/table/pm-plugins/table-resizing/event-handlers.js +3 -4
  72. package/dist/cjs/plugins/table/pm-plugins/table-resizing/plugin-factory.js +3 -6
  73. package/dist/cjs/plugins/table/pm-plugins/table-resizing/plugin-key.js +1 -2
  74. package/dist/cjs/plugins/table/pm-plugins/table-resizing/reducer.js +2 -3
  75. package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/colgroup.js +7 -13
  76. package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/column-state.js +5 -10
  77. package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/consts.js +2 -4
  78. package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/dom.js +8 -15
  79. package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/misc.js +2 -3
  80. package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/resize-column.js +2 -3
  81. package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/resize-logic.js +70 -71
  82. package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/resize-state.js +11 -21
  83. package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/scale-table.js +5 -9
  84. package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/unit-to-number.js +2 -3
  85. package/dist/cjs/plugins/table/pm-plugins/table-selection-keymap.js +1 -2
  86. package/dist/cjs/plugins/table/pm-plugins/table-width.js +3 -5
  87. package/dist/cjs/plugins/table/reducer.js +2 -3
  88. package/dist/cjs/plugins/table/toolbar.js +5 -9
  89. package/dist/cjs/plugins/table/transforms/column-width.js +4 -6
  90. package/dist/cjs/plugins/table/transforms/delete-columns.js +58 -58
  91. package/dist/cjs/plugins/table/transforms/delete-rows.js +52 -52
  92. package/dist/cjs/plugins/table/transforms/fix-tables.js +3 -6
  93. package/dist/cjs/plugins/table/transforms/replace-table.js +3 -4
  94. package/dist/cjs/plugins/table/types.js +5 -9
  95. package/dist/cjs/plugins/table/ui/ColumnResizeWidget/index.js +2 -3
  96. package/dist/cjs/plugins/table/ui/FloatingContextualButton/FixedButton.js +5 -10
  97. package/dist/cjs/plugins/table/ui/FloatingContextualButton/styles.js +3 -5
  98. package/dist/cjs/plugins/table/ui/FloatingContextualMenu/ContextualMenu.js +4 -7
  99. package/dist/cjs/plugins/table/ui/FloatingContextualMenu/index.js +1 -2
  100. package/dist/cjs/plugins/table/ui/FloatingContextualMenu/styles.js +2 -4
  101. package/dist/cjs/plugins/table/ui/FloatingDeleteButton/DeleteButton.js +1 -2
  102. package/dist/cjs/plugins/table/ui/FloatingDeleteButton/index.js +1 -2
  103. package/dist/cjs/plugins/table/ui/FloatingInsertButton/InsertButton.js +1 -2
  104. package/dist/cjs/plugins/table/ui/FloatingInsertButton/getPopupOptions.js +1 -2
  105. package/dist/cjs/plugins/table/ui/FloatingInsertButton/index.js +2 -4
  106. package/dist/cjs/plugins/table/ui/LayoutButton/index.js +1 -2
  107. package/dist/cjs/plugins/table/ui/TableFloatingControls/CornerControls/index.js +1 -2
  108. package/dist/cjs/plugins/table/ui/TableFloatingControls/NumberColumn/index.js +2 -3
  109. package/dist/cjs/plugins/table/ui/TableFloatingControls/RowControls/index.js +1 -2
  110. package/dist/cjs/plugins/table/ui/TableFloatingControls/index.js +1 -2
  111. package/dist/cjs/plugins/table/ui/common-styles.js +23 -14
  112. package/dist/cjs/plugins/table/ui/consts.js +47 -94
  113. package/dist/cjs/plugins/table/ui/messages.js +2 -3
  114. package/dist/cjs/plugins/table/ui/ui-styles.js +32 -38
  115. package/dist/cjs/plugins/table/utils/analytics.js +7 -12
  116. package/dist/cjs/plugins/table/utils/collapse.js +3 -5
  117. package/dist/cjs/plugins/table/utils/column-controls.js +6 -11
  118. package/dist/cjs/plugins/table/utils/decoration.js +10 -19
  119. package/dist/cjs/plugins/table/utils/dom.js +16 -28
  120. package/dist/cjs/plugins/table/utils/guidelines.js +1 -2
  121. package/dist/cjs/plugins/table/utils/nodes.js +12 -23
  122. package/dist/cjs/plugins/table/utils/paste.js +10 -16
  123. package/dist/cjs/plugins/table/utils/row-controls.js +7 -13
  124. package/dist/cjs/plugins/table/utils/selection.js +5 -9
  125. package/dist/cjs/plugins/table/utils/snapping.js +4 -7
  126. package/dist/cjs/plugins/table/utils/table.js +3 -5
  127. package/dist/cjs/plugins/table/utils/update-plugin-state-decorations.js +2 -3
  128. package/dist/cjs/plugins/table-plugin.js +1 -2
  129. package/dist/es2019/plugins/table/ui/common-styles.js +40 -4
  130. package/dist/es2019/plugins/table/ui/ui-styles.js +223 -85
  131. package/dist/esm/plugins/table/event-handlers.js +1 -1
  132. package/dist/esm/plugins/table/index.js +7 -7
  133. package/dist/esm/plugins/table/nodeviews/OverflowShadowsObserver.js +3 -3
  134. package/dist/esm/plugins/table/nodeviews/TableComponent.js +1 -1
  135. package/dist/esm/plugins/table/nodeviews/TableContainer.js +6 -6
  136. package/dist/esm/plugins/table/nodeviews/TableResizer.js +2 -2
  137. package/dist/esm/plugins/table/nodeviews/TableStickyScrollbar.js +3 -7
  138. package/dist/esm/plugins/table/nodeviews/table.js +1 -1
  139. package/dist/esm/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +3 -3
  140. package/dist/esm/plugins/table/pm-plugins/table-analytics.js +1 -1
  141. package/dist/esm/plugins/table/pm-plugins/table-resizing/event-handlers.js +1 -1
  142. package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/resize-logic.js +68 -67
  143. package/dist/esm/plugins/table/toolbar.js +1 -1
  144. package/dist/esm/plugins/table/transforms/column-width.js +1 -1
  145. package/dist/esm/plugins/table/transforms/delete-columns.js +56 -55
  146. package/dist/esm/plugins/table/transforms/delete-rows.js +51 -50
  147. package/dist/esm/plugins/table/transforms/replace-table.js +1 -1
  148. package/dist/esm/plugins/table/ui/FloatingContextualMenu/ContextualMenu.js +1 -1
  149. package/dist/esm/plugins/table/ui/common-styles.js +20 -6
  150. package/dist/esm/plugins/table/ui/ui-styles.js +18 -10
  151. package/dist/esm/plugins/table/utils/analytics.js +1 -1
  152. package/dist/esm/plugins/table/utils/dom.js +1 -1
  153. package/dist/esm/plugins/table/utils/paste.js +4 -4
  154. package/dist/types/plugins/table/index.d.ts +1 -0
  155. package/dist/types-ts4.5/plugins/table/index.d.ts +1 -0
  156. package/package.json +5 -2
  157. package/report.api.md +2 -0
  158. package/src/plugins/table/index.tsx +1 -1
  159. package/src/plugins/table/ui/common-styles.ts +46 -4
  160. package/src/plugins/table/ui/ui-styles.ts +235 -90
  161. package/tmp/api-report-tmp.d.ts +2 -0
@@ -1,4 +1,3 @@
1
- import _typeof from "@babel/runtime/helpers/typeof";
2
1
  import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
3
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
4
3
  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; }
@@ -51,39 +50,40 @@ export function reduceSpace(state, amount) {
51
50
  // keep trying to resolve resize request until we run out of free space,
52
51
  // or nothing to resize
53
52
  var _loop = function _loop() {
54
- // filter candidates only with free space
55
- var candidates = state.cols.filter(function (column) {
56
- return getFreeSpace(column) && ignoreCols.indexOf(column.index) === -1;
57
- });
58
- if (candidates.length === 0) {
59
- return "break";
60
- }
61
- var requestedResize = Math.floor(remaining / candidates.length);
62
- if (requestedResize === 0) {
63
- return "break";
64
- }
65
- candidates.forEach(function (candidate) {
66
- var newWidth = candidate.width - requestedResize;
67
- if (newWidth < candidate.minWidth) {
68
- // If the new requested width is less than our min
69
- // Calc what width we didn't use, we'll try extract that
70
- // from other cols.
71
- var remainder = candidate.minWidth - newWidth;
72
- newWidth = candidate.minWidth;
73
- remaining = remaining - requestedResize + remainder;
74
- } else {
75
- remaining -= requestedResize;
53
+ // filter candidates only with free space
54
+ var candidates = state.cols.filter(function (column) {
55
+ return getFreeSpace(column) && ignoreCols.indexOf(column.index) === -1;
56
+ });
57
+ if (candidates.length === 0) {
58
+ return 0; // break
59
+ }
60
+ var requestedResize = Math.floor(remaining / candidates.length);
61
+ if (requestedResize === 0) {
62
+ return 0; // break
76
63
  }
77
- state = _objectSpread(_objectSpread({}, state), {}, {
78
- cols: [].concat(_toConsumableArray(state.cols.slice(0, candidate.index)), [_objectSpread(_objectSpread({}, candidate), {}, {
79
- width: newWidth
80
- })], _toConsumableArray(state.cols.slice(candidate.index + 1)))
64
+ candidates.forEach(function (candidate) {
65
+ var newWidth = candidate.width - requestedResize;
66
+ if (newWidth < candidate.minWidth) {
67
+ // If the new requested width is less than our min
68
+ // Calc what width we didn't use, we'll try extract that
69
+ // from other cols.
70
+ var remainder = candidate.minWidth - newWidth;
71
+ newWidth = candidate.minWidth;
72
+ remaining = remaining - requestedResize + remainder;
73
+ } else {
74
+ remaining -= requestedResize;
75
+ }
76
+ state = _objectSpread(_objectSpread({}, state), {}, {
77
+ cols: [].concat(_toConsumableArray(state.cols.slice(0, candidate.index)), [_objectSpread(_objectSpread({}, candidate), {}, {
78
+ width: newWidth
79
+ })], _toConsumableArray(state.cols.slice(candidate.index + 1)))
80
+ });
81
81
  });
82
- });
83
- };
82
+ },
83
+ _ret;
84
84
  while (remaining > 0) {
85
- var _ret = _loop();
86
- if (_ret === "break") break;
85
+ _ret = _loop();
86
+ if (_ret === 0) break;
87
87
  }
88
88
  return state;
89
89
  }
@@ -136,44 +136,45 @@ function moveSpaceFrom(state, srcIdx, destIdx, amount) {
136
136
  function stackSpace(state, destIdx, amount) {
137
137
  var candidates = getCandidates(state, destIdx, amount);
138
138
  var _loop2 = function _loop2() {
139
- // search for most (or least) free space in candidates
140
- var candidateIdx = findNextFreeColumn(candidates, amount);
141
- if (candidateIdx === -1) {
142
- // stack to the right -> growing the dragging column and go overflow
143
- if (amount > 0) {
144
- return {
145
- v: {
146
- state: _objectSpread(_objectSpread({}, state), {}, {
147
- cols: [].concat(_toConsumableArray(state.cols.slice(0, destIdx)), [_objectSpread(_objectSpread({}, state.cols[destIdx]), {}, {
148
- width: state.cols[destIdx].width + amount
149
- })], _toConsumableArray(state.cols.slice(destIdx + 1)))
150
- }),
151
- remaining: amount
152
- }
153
- };
154
- }
139
+ // search for most (or least) free space in candidates
140
+ var candidateIdx = findNextFreeColumn(candidates, amount);
141
+ if (candidateIdx === -1) {
142
+ // stack to the right -> growing the dragging column and go overflow
143
+ if (amount > 0) {
144
+ return {
145
+ v: {
146
+ state: _objectSpread(_objectSpread({}, state), {}, {
147
+ cols: [].concat(_toConsumableArray(state.cols.slice(0, destIdx)), [_objectSpread(_objectSpread({}, state.cols[destIdx]), {}, {
148
+ width: state.cols[destIdx].width + amount
149
+ })], _toConsumableArray(state.cols.slice(destIdx + 1)))
150
+ }),
151
+ remaining: amount
152
+ }
153
+ };
154
+ }
155
155
 
156
- // stacking to the left, if no free space remains
157
- return "break";
158
- }
159
- var column = candidates.find(function (col) {
160
- return col.index === candidateIdx;
161
- });
162
- if (!column || getFreeSpace(column) <= 0) {
163
- // no more columns with free space remain
164
- return "break";
165
- }
166
- var res = moveSpaceFrom(state, column.index, destIdx, amount);
167
- state = res.state;
168
- amount -= res.amount;
169
- candidates = candidates.filter(function (col) {
170
- return col.index !== candidateIdx;
171
- });
172
- };
156
+ // stacking to the left, if no free space remains
157
+ return 0; // break
158
+ }
159
+ var column = candidates.find(function (col) {
160
+ return col.index === candidateIdx;
161
+ });
162
+ if (!column || getFreeSpace(column) <= 0) {
163
+ // no more columns with free space remain
164
+ return 0; // break
165
+ }
166
+ var res = moveSpaceFrom(state, column.index, destIdx, amount);
167
+ state = res.state;
168
+ amount -= res.amount;
169
+ candidates = candidates.filter(function (col) {
170
+ return col.index !== candidateIdx;
171
+ });
172
+ },
173
+ _ret2;
173
174
  while (candidates.length && amount) {
174
- var _ret2 = _loop2();
175
- if (_ret2 === "break") break;
176
- if (_typeof(_ret2) === "object") return _ret2.v;
175
+ _ret2 = _loop2();
176
+ if (_ret2 === 0) break;
177
+ if (_ret2) return _ret2.v;
177
178
  }
178
179
  return {
179
180
  state: state,
@@ -416,7 +416,7 @@ var getColorPicker = function getColorPicker(state, menu, _ref4, editorAnalytics
416
416
  return [];
417
417
  }
418
418
  var node = targetCellPosition ? state.doc.nodeAt(targetCellPosition) : undefined;
419
- var currentBackground = (node === null || node === void 0 ? void 0 : (_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.background) || '#ffffff';
419
+ var currentBackground = (node === null || node === void 0 || (_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.background) || '#ffffff';
420
420
  var defaultPalette = cellBackgroundColorPalette.find(function (item) {
421
421
  return item.value === currentBackground;
422
422
  }) || {
@@ -140,7 +140,7 @@ export var rescaleColumns = function rescaleColumns(getEditorContainerWidth) {
140
140
  getEditorContainerWidth: getEditorContainerWidth
141
141
  });
142
142
  var tableWidth = tableRef.clientWidth || akEditorDefaultLayoutWidth;
143
- var tableMaxWidth = (tableRef === null || tableRef === void 0 ? void 0 : (_tableRef$parentEleme = tableRef.parentElement) === null || _tableRef$parentEleme === void 0 ? void 0 : _tableRef$parentEleme.clientWidth) || 0;
143
+ var tableMaxWidth = (tableRef === null || tableRef === void 0 || (_tableRef$parentEleme = tableRef.parentElement) === null || _tableRef$parentEleme === void 0 ? void 0 : _tableRef$parentEleme.clientWidth) || 0;
144
144
  tableMaxWidth -= insertColumnButtonOffset;
145
145
  var newTableMap = TableMap.get(newTable);
146
146
  var noOfColumns = newTableMap.width;
@@ -65,69 +65,70 @@ var deleteColumnsLegacy = function deleteColumnsLegacy(rect) {
65
65
  var rowCells = [];
66
66
  var row = table.node.child(rowIndex);
67
67
  var _loop = function _loop(colIndex) {
68
- var cellPos = map.map[rowIndex * map.width + colIndex];
69
- var cell = table.node.nodeAt(cellPos);
70
- if (!cell) {
71
- return "continue";
72
- }
73
- var cellsInColumn = map.cellsInRect({
74
- left: colIndex,
75
- top: 0,
76
- right: colIndex + 1,
77
- bottom: map.height
78
- });
79
- if (columnsToDelete.indexOf(colIndex) === -1) {
80
- // decrement colspans for col-spanning cells that overlap deleted columns
81
- if (cellsInColumn.indexOf(cellPos) > -1 && !seen[cellPos]) {
82
- var overlappingCols = 0;
83
- columnsToDelete.forEach(function (colIndexToDelete) {
84
- if (colIndex < colIndexToDelete && cell.attrs.colspan + colIndex - 1 >= colIndexToDelete) {
85
- overlappingCols += 1;
68
+ var cellPos = map.map[rowIndex * map.width + colIndex];
69
+ var cell = table.node.nodeAt(cellPos);
70
+ if (!cell) {
71
+ return 0; // continue
72
+ }
73
+ var cellsInColumn = map.cellsInRect({
74
+ left: colIndex,
75
+ top: 0,
76
+ right: colIndex + 1,
77
+ bottom: map.height
78
+ });
79
+ if (columnsToDelete.indexOf(colIndex) === -1) {
80
+ // decrement colspans for col-spanning cells that overlap deleted columns
81
+ if (cellsInColumn.indexOf(cellPos) > -1 && !seen[cellPos]) {
82
+ var overlappingCols = 0;
83
+ columnsToDelete.forEach(function (colIndexToDelete) {
84
+ if (colIndex < colIndexToDelete && cell.attrs.colspan + colIndex - 1 >= colIndexToDelete) {
85
+ overlappingCols += 1;
86
+ }
87
+ });
88
+ if (overlappingCols > 0) {
89
+ var attrs = _objectSpread(_objectSpread({}, cell.attrs), {}, {
90
+ colspan: cell.attrs.colspan - overlappingCols
91
+ });
92
+ if (cell.attrs.colwidth) {
93
+ var minColIndex = Math.min.apply(Math, columnsToDelete);
94
+ var pos = minColIndex > 0 ? minColIndex - map.colCount(cellPos) : 0;
95
+ var colwidth = cell.attrs.colwidth.slice() || [];
96
+ colwidth.splice(pos, overlappingCols);
97
+ attrs.colwidth = colwidth;
98
+ }
99
+ var newCell = cell.type.createChecked(attrs, cell.content, cell.marks);
100
+ rowCells.push(newCell);
101
+ seen[cellPos] = true;
102
+ return 0; // continue
86
103
  }
87
- });
88
- if (overlappingCols > 0) {
89
- var attrs = _objectSpread(_objectSpread({}, cell.attrs), {}, {
90
- colspan: cell.attrs.colspan - overlappingCols
104
+ } else if (deletedCells[cellPos]) {
105
+ // if we're removing a col-spanning cell, we need to add missing cells to columns to the right
106
+ var _attrs = _objectSpread(_objectSpread({}, cell.attrs), {}, {
107
+ colspan: 1,
108
+ rowspan: 1
91
109
  });
92
110
  if (cell.attrs.colwidth) {
93
- var minColIndex = Math.min.apply(Math, columnsToDelete);
94
- var pos = minColIndex > 0 ? minColIndex - map.colCount(cellPos) : 0;
95
- var colwidth = cell.attrs.colwidth.slice() || [];
96
- colwidth.splice(pos, overlappingCols);
97
- attrs.colwidth = colwidth;
111
+ var _pos = colIndex > 0 ? colIndex - map.colCount(cellPos) : 0;
112
+ _attrs.colwidth = cell.attrs.colwidth.slice().splice(_pos, 1);
98
113
  }
99
- var newCell = cell.type.createChecked(attrs, cell.content, cell.marks);
100
- rowCells.push(newCell);
101
- seen[cellPos] = true;
102
- return "continue";
103
- }
104
- } else if (deletedCells[cellPos]) {
105
- // if we're removing a col-spanning cell, we need to add missing cells to columns to the right
106
- var _attrs = _objectSpread(_objectSpread({}, cell.attrs), {}, {
107
- colspan: 1,
108
- rowspan: 1
109
- });
110
- if (cell.attrs.colwidth) {
111
- var _pos = colIndex > 0 ? colIndex - map.colCount(cellPos) : 0;
112
- _attrs.colwidth = cell.attrs.colwidth.slice().splice(_pos, 1);
114
+ var _newCell = cell.type.createChecked(_attrs, cell.type.schema.nodes.paragraph.createChecked(), cell.marks);
115
+ rowCells.push(_newCell);
116
+ return 0; // continue
113
117
  }
114
- var _newCell = cell.type.createChecked(_attrs, cell.type.schema.nodes.paragraph.createChecked(), cell.marks);
115
- rowCells.push(_newCell);
116
- return "continue";
117
- }
118
118
 
119
- // normal cells that we want to keep
120
- if (!seen[cellPos]) {
121
- seen[cellPos] = true;
122
- rowCells.push(cell);
119
+ // normal cells that we want to keep
120
+ if (!seen[cellPos]) {
121
+ seen[cellPos] = true;
122
+ rowCells.push(cell);
123
+ }
124
+ } else if (cellsInColumn.indexOf(cellPos) > -1) {
125
+ deletedCells[cellPos] = true;
123
126
  }
124
- } else if (cellsInColumn.indexOf(cellPos) > -1) {
125
- deletedCells[cellPos] = true;
126
- }
127
- };
127
+ },
128
+ _ret;
128
129
  for (var colIndex = 0; colIndex < map.width; colIndex++) {
129
- var _ret = _loop(colIndex);
130
- if (_ret === "continue") continue;
130
+ _ret = _loop(colIndex);
131
+ if (_ret === 0) continue;
131
132
  }
132
133
  if (rowCells.length) {
133
134
  rows.push(row.type.createChecked(row.attrs, rowCells, row.marks));
@@ -36,61 +36,62 @@ export var deleteRows = function deleteRows(rect) {
36
36
  var rowCells = [];
37
37
  var row = table.node.child(rowIndex);
38
38
  var _loop2 = function _loop2() {
39
- var cellPos = map.map[rowIndex * map.width + colIndex];
40
- var cell = table.node.nodeAt(cellPos);
41
- if (!cell) {
42
- return "continue";
43
- }
44
- var cellsInRow = map.cellsInRect({
45
- left: 0,
46
- top: rowIndex,
47
- right: map.width,
48
- bottom: rowIndex + 1
49
- });
50
- if (rowsToDelete.indexOf(rowIndex) === -1 && !seen[cellPos]) {
51
- // decrement rowspans for row-spanning cells that overlap deleted rows
52
- if (cellsInRow.indexOf(cellPos) > -1) {
53
- var overlappingRows = 0;
54
- rowsToDelete.forEach(function (rowIndexToDelete) {
55
- if (rowIndex < rowIndexToDelete && cell.attrs.rowspan + rowIndex - 1 >= rowIndexToDelete) {
56
- overlappingRows += 1;
39
+ var cellPos = map.map[rowIndex * map.width + colIndex];
40
+ var cell = table.node.nodeAt(cellPos);
41
+ if (!cell) {
42
+ return 0; // continue
43
+ }
44
+ var cellsInRow = map.cellsInRect({
45
+ left: 0,
46
+ top: rowIndex,
47
+ right: map.width,
48
+ bottom: rowIndex + 1
49
+ });
50
+ if (rowsToDelete.indexOf(rowIndex) === -1 && !seen[cellPos]) {
51
+ // decrement rowspans for row-spanning cells that overlap deleted rows
52
+ if (cellsInRow.indexOf(cellPos) > -1) {
53
+ var overlappingRows = 0;
54
+ rowsToDelete.forEach(function (rowIndexToDelete) {
55
+ if (rowIndex < rowIndexToDelete && cell.attrs.rowspan + rowIndex - 1 >= rowIndexToDelete) {
56
+ overlappingRows += 1;
57
+ }
58
+ });
59
+ if (overlappingRows > 0) {
60
+ var newCell = cell.type.createChecked(_objectSpread(_objectSpread({}, cell.attrs), {}, {
61
+ rowspan: cell.attrs.rowspan - overlappingRows
62
+ }), cell.content, cell.marks);
63
+ rowCells.push(newCell);
64
+ seen[cellPos] = true;
65
+ return 0; // continue
57
66
  }
58
- });
59
- if (overlappingRows > 0) {
60
- var newCell = cell.type.createChecked(_objectSpread(_objectSpread({}, cell.attrs), {}, {
61
- rowspan: cell.attrs.rowspan - overlappingRows
62
- }), cell.content, cell.marks);
63
- rowCells.push(newCell);
64
- seen[cellPos] = true;
65
- return "continue";
66
- }
67
- } else if (deletedCells[cellPos]) {
68
- // if we're removing a row-spanning cell, we need to add missing cells to rows below
69
- var attrs = _objectSpread(_objectSpread({}, cell.attrs), {}, {
70
- colspan: 1,
71
- rowspan: 1
72
- });
73
- if (cell.attrs.colwidth) {
74
- var pos = colIndex > 0 ? colIndex - map.colCount(cellPos) : 0;
75
- attrs.colwidth = cell.attrs.colwidth.slice().splice(pos, 1);
67
+ } else if (deletedCells[cellPos]) {
68
+ // if we're removing a row-spanning cell, we need to add missing cells to rows below
69
+ var attrs = _objectSpread(_objectSpread({}, cell.attrs), {}, {
70
+ colspan: 1,
71
+ rowspan: 1
72
+ });
73
+ if (cell.attrs.colwidth) {
74
+ var pos = colIndex > 0 ? colIndex - map.colCount(cellPos) : 0;
75
+ attrs.colwidth = cell.attrs.colwidth.slice().splice(pos, 1);
76
+ }
77
+ var _newCell = cell.type.createChecked(attrs, cell.type.schema.nodes.paragraph.createChecked(), cell.marks);
78
+ rowCells.push(_newCell);
79
+ return 0; // continue
76
80
  }
77
- var _newCell = cell.type.createChecked(attrs, cell.type.schema.nodes.paragraph.createChecked(), cell.marks);
78
- rowCells.push(_newCell);
79
- return "continue";
80
- }
81
81
 
82
- // normal cells that we want to keep
83
- if (!seen[cellPos]) {
84
- seen[cellPos] = true;
85
- rowCells.push(cell);
82
+ // normal cells that we want to keep
83
+ if (!seen[cellPos]) {
84
+ seen[cellPos] = true;
85
+ rowCells.push(cell);
86
+ }
87
+ } else if (cellsInRow.indexOf(cellPos) > -1) {
88
+ deletedCells[cellPos] = true;
86
89
  }
87
- } else if (cellsInRow.indexOf(cellPos) > -1) {
88
- deletedCells[cellPos] = true;
89
- }
90
- };
90
+ },
91
+ _ret;
91
92
  for (var colIndex = 0; colIndex < map.width; colIndex++) {
92
- var _ret = _loop2();
93
- if (_ret === "continue") continue;
93
+ _ret = _loop2();
94
+ if (_ret === 0) continue;
94
95
  }
95
96
  if (rowCells.length) {
96
97
  rows.push(row.type.createChecked(row.attrs, rowCells, row.marks));
@@ -13,7 +13,7 @@ export var replaceSelectedTable = function replaceSelectedTable(state, content,
13
13
  var _getSelectedTableInfo = getSelectedTableInfo(state.selection),
14
14
  totalRowCount = _getSelectedTableInfo.totalRowCount,
15
15
  totalColumnCount = _getSelectedTableInfo.totalColumnCount;
16
- editorAnalyticsAPI === null || editorAnalyticsAPI === void 0 ? void 0 : editorAnalyticsAPI.attachAnalyticsEvent({
16
+ editorAnalyticsAPI === null || editorAnalyticsAPI === void 0 || editorAnalyticsAPI.attachAnalyticsEvent({
17
17
  action: TABLE_ACTION.REPLACED,
18
18
  actionSubject: ACTION_SUBJECT.TABLE,
19
19
  attributes: {
@@ -118,7 +118,7 @@ export var ContextualMenu = /*#__PURE__*/function (_Component) {
118
118
  if (allowBackgroundColor) {
119
119
  var _node$attrs;
120
120
  var node = isOpen && targetCellPosition ? state.doc.nodeAt(targetCellPosition) : null;
121
- var background = hexToEditorBackgroundPaletteColor((node === null || node === void 0 ? void 0 : (_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.background) || '#ffffff');
121
+ var background = hexToEditorBackgroundPaletteColor((node === null || node === void 0 || (_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.background) || '#ffffff');
122
122
  items.push({
123
123
  content: formatMessage(messages.cellBackground),
124
124
  value: {
@@ -1,5 +1,5 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
2
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
3
3
  import { css } from '@emotion/react';
4
4
  import { tableMarginTop, tableSharedStyle } from '@atlaskit/editor-common/styles';
5
5
  import { akEditorSelectedNodeClassName, akEditorSmallZIndex, akEditorStickyHeaderZIndex, akEditorTableCellOnStickyHeaderZIndex, akEditorTableNumberColumnWidth, akEditorTableToolbarSize, akEditorUnitZIndex, getSelectionStyles, MAX_BROWSER_SCROLLBAR_HEIGHT, relativeFontSizeToBase16, SelectionStyle } from '@atlaskit/editor-shared-styles';
@@ -33,18 +33,32 @@ var listLargeNumericMarkersOldStyles = "\n .ProseMirror .pm-table-cell-content-
33
33
  var breakoutWidthStyling = function breakoutWidthStyling() {
34
34
  return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n > *:not([data-mark-type='fragment'])\n .", "\n .", " {\n margin-left: unset !important;\n width: 100% !important;\n }\n\n > [data-mark-type='fragment']\n *\n .", "\n .", " {\n margin-left: unset !important;\n width: 100% !important;\n }\n "])), ClassName.NODEVIEW_WRAPPER, ClassName.TABLE_CONTAINER, ClassName.NODEVIEW_WRAPPER, ClassName.TABLE_CONTAINER);
35
35
  };
36
+ var tableBorderStyles = function tableBorderStyles(props) {
37
+ if (getBooleanFF('platform.editor.table.column-controls-styles-updated')) {
38
+ return "border-color: ".concat(tableBorderDeleteColor(props));
39
+ } else {
40
+ return "border: 1px solid ".concat(tableBorderDeleteColor(props));
41
+ }
42
+ };
43
+ var tableStickyHeaderColumnControlsDecorationsStyle = function tableStickyHeaderColumnControlsDecorationsStyle(props) {
44
+ if (getBooleanFF('platform.editor.table.column-controls-styles-updated')) {
45
+ return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .", " .", " {\n z-index: 0;\n left: -1px;\n }\n\n .", "\n .", "::after {\n border-left: 1px solid ", ";\n }\n\n .", "\n tr:first-of-type\n th.", " {\n &.", ", &.", " {\n .", "::after {\n left: 0;\n }\n }\n }\n "])), ClassName.TABLE_STICKY, ClassName.COLUMN_CONTROLS_DECORATIONS, ClassName.TABLE_STICKY, ClassName.COLUMN_CONTROLS_DECORATIONS, tableBorderColor(props), ClassName.TABLE_STICKY, ClassName.TABLE_HEADER_CELL, ClassName.COLUMN_SELECTED, ClassName.HOVERED_COLUMN, ClassName.COLUMN_CONTROLS_DECORATIONS);
46
+ } else {
47
+ return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n .", " .", " {\n z-index: 0;\n }\n "])), ClassName.TABLE_STICKY, ClassName.COLUMN_CONTROLS_DECORATIONS);
48
+ }
49
+ };
36
50
  var tableWrapperStyles = function tableWrapperStyles() {
37
51
  if (getBooleanFF('platform.editor.custom-table-width')) {
38
- return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .", " {\n padding-bottom: 0px;\n /* fixes gap cursor height */\n overflow: auto;\n overflow-y: hidden;\n position: relative;\n\n > table[data-number-column='true'] {\n margin-left: 1px;\n width: calc(100% - 1px);\n }\n }\n "])), ClassName.TABLE_NODE_WRAPPER);
52
+ return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n .", " {\n padding-bottom: 0px;\n /* fixes gap cursor height */\n overflow: auto;\n overflow-y: hidden;\n position: relative;\n\n > table[data-number-column='true'] {\n margin-left: 1px;\n width: calc(100% - 1px);\n }\n }\n "])), ClassName.TABLE_NODE_WRAPPER);
39
53
  } else {
40
- return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n .", " {\n padding-right: ", "px;\n margin-right: -", "px;\n padding-bottom: 0px;\n /* fixes gap cursor height */\n overflow: auto;\n overflow-y: hidden;\n position: relative;\n }\n "])), ClassName.TABLE_NODE_WRAPPER, insertColumnButtonOffset, insertColumnButtonOffset);
54
+ return css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n .", " {\n padding-right: ", "px;\n margin-right: -", "px;\n padding-bottom: 0px;\n /* fixes gap cursor height */\n overflow: auto;\n overflow-y: hidden;\n position: relative;\n }\n "])), ClassName.TABLE_NODE_WRAPPER, insertColumnButtonOffset, insertColumnButtonOffset);
41
55
  }
42
56
  };
43
57
 
44
58
  // TODO: https://product-fabric.atlassian.net/browse/DSP-4139
45
59
  export var tableStyles = function tableStyles(props) {
46
60
  var _props$featureFlags;
47
- return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n .", " button {\n background: ", ";\n color: ", ";\n cursor: none;\n }\n\n .", ":not(.", ") button:hover {\n background: ", ";\n color: ", " !important;\n cursor: pointer;\n }\n\n .ProseMirror {\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n\n .", " {\n margin-bottom: 0;\n }\n\n .", " {\n td.", ", th.", " {\n position: relative;\n overflow: visible;\n }\n\n td.", " {\n background-color: ", ";\n\n // ED-15246: Trello card is visible through a border of a table border\n // This fixes a border issue caused by relative positioned table cells\n &::after {\n height: 100%;\n content: '';\n border-left: 1px solid ", ";\n border-bottom: 1px solid ", ";\n position: absolute;\n right: 0px;\n top: 0px;\n bottom: 0;\n width: 100%;\n display: inline-block;\n pointer-events: none;\n }\n }\n }\n\n .", " {\n ", "\n }\n\n .", " {\n ", "\n }\n\n /* Delete button */\n ", "\n /* Ends Delete button */\n\n /* sticky styles */\n .", " .", " .", ":first-of-type {\n margin-top: ", "px;\n width: ", "px;\n\n position: fixed !important;\n z-index: ", " !important;\n box-shadow: 0px -", "px ", ";\n border-right: 0 none;\n /* top set by NumberColumn component */\n }\n\n .", " .", ".sticky {\n position: fixed !important;\n /* needs to be above row controls */\n z-index: ", " !important;\n background: ", ";\n\n width: ", "px;\n height: ", "px;\n }\n\n .", ".sticky .", " {\n border-bottom: 0px none;\n border-right: 0px none;\n\n height: ", "px;\n width: ", "px;\n }\n\n .", " .", " {\n z-index: 0;\n }\n\n .", "\n .", "\n .", ".sticky {\n position: fixed !important;\n z-index: ", " !important;\n display: flex;\n border-left: ", "px solid\n ", ";\n margin-left: -", "px;\n }\n\n .", " col:first-of-type {\n /* moving rows out of a table layout does weird things in Chrome */\n border-right: 1px solid ", ";\n }\n\n tr.sticky {\n padding-top: ", "px;\n position: fixed;\n display: grid;\n\n /* to keep it above cell selection but below date and other nodes popups that are inside sticky header */\n z-index: ", ";\n\n overflow-y: visible;\n overflow-x: hidden;\n\n grid-auto-flow: column;\n\n /* background for where controls apply */\n background: ", ";\n box-sizing: content-box;\n\n margin-top: 2px;\n\n box-shadow: 0 6px 4px -4px ", ";\n margin-left: -1px;\n\n &.no-pointer-events {\n pointer-events: none;\n }\n }\n\n .", " .", " {\n left: unset;\n position: fixed;\n /* needs to be above sticky header row and below date and other nodes popups that are inside sticky header */\n z-index: ", ";\n }\n\n .", ".", "\n .", " {\n padding-bottom: ", "px;\n }\n\n tr.sticky th {\n border-bottom: ", "px solid\n ", ";\n margin-right: -1px;\n }\n\n .", " tr.sticky > th:last-child {\n border-right-width: 1px;\n }\n\n /* add left edge for first cell */\n .", " tr.sticky > th:first-of-type {\n margin-left: 0px;\n }\n\n /* add a little bit so the scroll lines up with the table */\n .", " tr.sticky::after {\n content: ' ';\n width: ", "px;\n }\n\n /* To fix jumpiness caused in Chrome Browsers for sticky headers */\n .", " .sticky + tr {\n min-height: 0px;\n }\n\n /* move resize line a little in sticky bar */\n .", ".", " {\n tr.sticky\n td.", ",\n tr.sticky\n th.", " {\n .", "::after {\n right: ", "px;\n }\n }\n\n /* when selected put it back to normal -- :not selector would be nicer */\n tr.sticky\n td.", ".", ",\n tr.sticky\n th.", ".", " {\n .", "::after {\n right: ", "px;\n }\n }\n }\n\n tr.sticky\n .", ",\n tr.sticky\n .", " {\n z-index: 1;\n }\n\n .", " tr.sticky {\n padding-top: ", "px;\n }\n\n .", ".", "\n .", "\n .", ":first-of-type {\n margin-top: ", "px;\n }\n\n .", ".sticky {\n border-top: ", "px solid\n ", ";\n }\n\n ", "\n ", "\n ", "\n\n .", " .", " {\n height: 0; // stop overflow flash & set correct height in update-overflow-shadows.ts\n }\n\n .less-padding {\n padding: 0 ", "px;\n\n .", " {\n padding: 0 ", "px;\n\n // https://product-fabric.atlassian.net/browse/ED-16386\n // Fixes issue where the extra padding that is added here throws off the position\n // of the rows control dot\n &::after {\n right: 6px !important;\n }\n }\n\n &.", "[data-number-column='true'] {\n padding-left: ", "px;\n }\n .", ", .", " {\n width: ", "px;\n }\n\n .", " {\n left: 6px;\n }\n\n .", " {\n left: calc(100% - 6px);\n }\n }\n\n > .", " {\n /**\n * Prevent margins collapsing, aids with placing the gap-cursor correctly\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Box_Model/Mastering_margin_collapsing\n *\n * TODO: Enable this, many tests will fail!\n * border-top: 1px solid transparent;\n */\n }\n\n /* Breakout only works on top level unless wrapped in fragment mark */\n ", "\n\n ", ";\n\n /* Corner controls */\n .", " {\n width: ", "px;\n height: ", "px;\n display: none;\n\n .", " {\n position: relative;\n\n ", ";\n }\n }\n\n .", ".sticky {\n .", " {\n /* sticky row insert dot overlaps other row insert and messes things up */\n display: none !important;\n }\n }\n\n .", " {\n position: absolute;\n top: 0;\n width: ", "px;\n height: ", "px;\n border: 1px solid ", ";\n border-radius: 0;\n border-top-left-radius: ", "px;\n background: ", ";\n box-sizing: border-box;\n padding: 0;\n :focus {\n outline: none;\n }\n }\n .active .", " {\n border-color: ", ";\n background: ", ";\n }\n\n .", "[data-number-column='true'] {\n .", ", .", " {\n width: ", "px;\n }\n .", " .", " {\n border-right-width: 0;\n }\n }\n\n :not(.", ") .", ":hover {\n border-color: ", ";\n background: ", ";\n cursor: pointer;\n }\n\n :not(.", ")\n .", ".", " {\n border-color: ", ";\n background: ", ";\n }\n\n /* Row controls */\n .", " {\n width: ", "px;\n box-sizing: border-box;\n display: none;\n position: relative;\n\n ", ";\n\n .", " {\n display: flex;\n flex-direction: column;\n }\n .", ":last-child > button {\n border-bottom-left-radius: ", "px;\n }\n .", " {\n position: relative;\n margin-top: -1px;\n }\n .", ":hover,\n .", ".active,\n .", ":hover {\n z-index: ", ";\n }\n\n ", "\n }\n\n :not(.", ") .", " {\n ", "\n ", "\n }\n\n /* Numbered column */\n .", " {\n position: relative;\n float: right;\n margin-left: ", "px;\n top: ", "px;\n width: ", "px;\n box-sizing: border-box;\n }\n\n .", " {\n border: 1px solid ", ";\n box-sizing: border-box;\n margin-top: -1px;\n padding-bottom: 2px;\n padding: 10px 2px;\n text-align: center;\n font-size: ", ";\n background-color: ", ";\n color: ", ";\n border-color: ", ";\n\n :first-child:not(style),\n style:first-child + * {\n margin-top: 0;\n }\n :last-child {\n border-bottom: 1px solid ", ";\n }\n }\n\n .", " {\n .", ", .", " {\n display: block;\n }\n .", " {\n padding-left: ", "px;\n\n .", " {\n border-left: 0 none;\n }\n\n .", ".active {\n border-bottom: 1px solid ", ";\n border-color: ", ";\n background-color: ", ";\n position: relative;\n z-index: ", ";\n color: ", ";\n }\n }\n }\n :not(.", ") .", " {\n .", " {\n cursor: pointer;\n }\n .", ":hover {\n border-bottom: 1px solid ", ";\n border-color: ", ";\n background-color: ", ";\n position: relative;\n z-index: ", ";\n color: ", ";\n }\n .", ".", " {\n background-color: ", ";\n border: 1px solid ", ";\n border-left: 0;\n color: ", ";\n position: relative;\n z-index: ", ";\n }\n }\n\n /* Table */\n .", " > table {\n table-layout: fixed;\n white-space: normal;\n border-top: none;\n // 1px border width offset added here to prevent unwanted overflow and scolling - ED-16212\n margin-right: -1px;\n // Allows better positioning for the shadow sentinels - ED-16668\n position: relative;\n\n > tbody > tr {\n white-space: pre-wrap;\n }\n\n .", " + * {\n margin-top: 0;\n }\n\n /*\n * Headings have a top margin by default, but we don't want this on the\n * first heading within table header cells.\n *\n * This specifically sets margin-top for the first heading within a header\n * cell when center/right aligned.\n */\n th.", " > .fabric-editor-block-mark {\n > h1:first-of-type,\n > h2:first-of-type,\n > h3:first-of-type,\n > h4:first-of-type,\n > h5:first-of-type,\n > h6:first-of-type {\n margin-top: 0;\n }\n }\n\n .", ", .", " {\n position: relative;\n }\n /* Give selected cells a blue overlay */\n .", "::after,\n .", "::after {\n z-index: ", ";\n position: absolute;\n content: '';\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n width: 100%;\n pointer-events: none;\n }\n .", " {\n border: 1px solid ", ";\n }\n .", "::after {\n background: ", ";\n z-index: ", ";\n }\n th.", "::after,\n td.", "::after {\n background: ", ";\n z-index: ", ";\n }\n // ED-15246: Trello card is visible through a border of a table border\n /* ED-19064: To fix when enable header column in the table,\n and selection the header column, the right border is not tableBorderSelectedColor\n when deleting the header column, the right border is not tableToolbarDeleteColor */\n td.", ",\n td.", ",\n th.", ".", ",\n th.", ".", " {\n &::after {\n height: 100%;\n width: 100%;\n border: 1px solid ", ";\n content: '';\n position: absolute;\n left: -1px;\n top: -1px;\n bottom: 0;\n z-index: ", ";\n display: inline-block;\n pointer-events: none;\n }\n &.", "::after {\n border: 1px solid ", ";\n z-index: ", ";\n }\n }\n }\n .", " {\n position: absolute;\n /* top of corner control is table margin top - corner control height + 1 pixel of table border. */\n top: ", "px;\n }\n .", ".", " {\n z-index: ", ";\n }\n .", " {\n left: -", "px;\n }\n ", "\n }\n\n .ProseMirror.", " {\n .", " {\n overflow-x: auto;\n ", ";\n }\n }\n\n .ProseMirror.", " {\n cursor: col-resize;\n }\n\n /*\n ED-15882: When custom start numbers is enabled for lists, we have\n styles that handle this generally (in editor-common) so we can\n throw away the older table-specific styles here.\n */\n ", "\n\n ", "\n"])), ClassName.LAYOUT_BUTTON, "var(--ds-background-neutral, ".concat(N20A, ")"), "var(--ds-icon, ".concat(N300, ")"), ClassName.LAYOUT_BUTTON, ClassName.IS_RESIZING, "var(--ds-background-neutral-hovered, ".concat(B300, ")"), "var(--ds-icon, white)", tableSharedStyle(props), columnControlsLineMarker(), hoveredDeleteButton(props), hoveredCell(props), hoveredWarningCell, resizeHandle(props), rangeSelectionStyles, ClassName.LAST_ITEM_IN_CELL, ClassName.TABLE_NODE_WRAPPER, ClassName.TABLE_CELL, ClassName.TABLE_HEADER_CELL, ClassName.TABLE_CELL, tableCellBackgroundColor(props), tableBorderColor(props), tableBorderColor(props), ClassName.CONTROLS_FLOATING_BUTTON_COLUMN, insertColumnButtonWrapper(props), ClassName.CONTROLS_FLOATING_BUTTON_ROW, insertRowButtonWrapper(props), DeleteButton(props), ClassName.TABLE_STICKY, ClassName.NUMBERED_COLUMN, ClassName.NUMBERED_COLUMN_BUTTON, stickyRowOffsetTop + 2, akEditorTableNumberColumnWidth, akEditorStickyHeaderZIndex, stickyRowOffsetTop, "var(--ds-surface, white)", ClassName.TABLE_STICKY, ClassName.CORNER_CONTROLS, akEditorSmallZIndex, "var(--ds-surface, white)", tableToolbarSize, tableToolbarSize, ClassName.CORNER_CONTROLS, ClassName.CONTROLS_CORNER_BUTTON, tableToolbarSize, tableToolbarSize, ClassName.TABLE_STICKY, ClassName.COLUMN_CONTROLS_DECORATIONS, ClassName.TABLE_STICKY, ClassName.ROW_CONTROLS, ClassName.ROW_CONTROLS_BUTTON_WRAP, akEditorStickyHeaderZIndex, tableToolbarSize, "var(--ds-surface, white)", tableToolbarSize, ClassName.TABLE_STICKY, "var(--ds-surface, green)", stickyRowOffsetTop, akEditorTableCellOnStickyHeaderZIndex - 5, "var(--ds-surface, white)", "var(--ds-shadow-overflow-perimeter, ".concat(N40A, ")"), ClassName.TABLE_STICKY, ClassName.TABLE_STICKY_SHADOW, akEditorTableCellOnStickyHeaderZIndex, ClassName.WITH_CONTROLS, ClassName.TABLE_STICKY, ClassName.TABLE_STICKY_SHADOW, tableToolbarSize, stickyHeaderBorderBottomWidth, tableBorderColor(props), ClassName.TABLE_STICKY, ClassName.TABLE_STICKY, ClassName.TABLE_STICKY, insertColumnButtonOffset + 1, ClassName.TABLE_STICKY, ClassName.TABLE_CONTAINER, ClassName.TABLE_STICKY, ClassName.WITH_RESIZE_LINE, ClassName.WITH_RESIZE_LINE, ClassName.RESIZE_HANDLE_DECORATION, (resizeHandlerAreaWidth - resizeLineWidth) / 2 + 1, ClassName.WITH_RESIZE_LINE, ClassName.SELECTED_CELL, ClassName.WITH_RESIZE_LINE, ClassName.SELECTED_CELL, ClassName.RESIZE_HANDLE_DECORATION, (resizeHandlerAreaWidth - resizeLineWidth) / 2, ClassName.HOVERED_CELL, ClassName.SELECTED_CELL, ClassName.WITH_CONTROLS, tableControlsSpacing, ClassName.WITH_CONTROLS, ClassName.TABLE_STICKY, ClassName.NUMBERED_COLUMN, ClassName.NUMBERED_COLUMN_BUTTON, tableControlsSpacing + 2, ClassName.CORNER_CONTROLS, tableControlsSpacing - tableToolbarSize + 2, "var(--ds-surface, white)", sentinelStyles, OverflowShadow(props), stickyScrollbarStyles(), ClassName.TABLE_STICKY, ClassName.TABLE_STICKY_SHADOW, tablePadding, ClassName.ROW_CONTROLS_WRAPPER, tablePadding, ClassName.TABLE_CONTAINER, akEditorTableNumberColumnWidth + tablePadding - 1, ClassName.TABLE_LEFT_SHADOW, ClassName.TABLE_RIGHT_SHADOW, tableOverflowShadowWidth, ClassName.TABLE_LEFT_SHADOW, ClassName.TABLE_RIGHT_SHADOW, ClassName.NODEVIEW_WRAPPER, breakoutWidthStyling(), columnControlsDecoration(props), ClassName.CORNER_CONTROLS, tableToolbarSize + 1, cornerControlHeight, ClassName.CORNER_CONTROLS_INSERT_ROW_MARKER, InsertMarker(props, "\n left: -11px;\n top: 9px;\n "), ClassName.CORNER_CONTROLS, ClassName.CORNER_CONTROLS_INSERT_ROW_MARKER, ClassName.CONTROLS_CORNER_BUTTON, tableToolbarSize + 1, tableToolbarSize + 1, tableBorderColor(props), tableBorderRadiusSize, tableHeaderCellBackgroundColor(props), ClassName.CONTROLS_CORNER_BUTTON, tableBorderSelectedColor(props), tableToolbarSelectedColor(props), ClassName.TABLE_CONTAINER, ClassName.CORNER_CONTROLS, ClassName.CONTROLS_CORNER_BUTTON, getBooleanFF('platform.editor.custom-table-width') ? akEditorTableToolbarSize + akEditorTableNumberColumnWidth + 1 : akEditorTableToolbarSize + akEditorTableNumberColumnWidth, ClassName.ROW_CONTROLS, ClassName.CONTROLS_BUTTON, ClassName.IS_RESIZING, ClassName.CONTROLS_CORNER_BUTTON, tableBorderSelectedColor(props), tableToolbarSelectedColor(props), ClassName.IS_RESIZING, ClassName.CONTROLS_CORNER_BUTTON, ClassName.HOVERED_CELL_IN_DANGER, tableBorderDeleteColor(props), tableToolbarDeleteColor(props), ClassName.ROW_CONTROLS, tableToolbarSize, InsertMarker(props, "\n bottom: -1px;\n left: -11px;\n "), ClassName.ROW_CONTROLS_INNER, ClassName.ROW_CONTROLS_BUTTON_WRAP, tableBorderRadiusSize, ClassName.ROW_CONTROLS_BUTTON_WRAP, ClassName.ROW_CONTROLS_BUTTON_WRAP, ClassName.ROW_CONTROLS_BUTTON_WRAP, ClassName.CONTROLS_BUTTON, akEditorUnitZIndex, HeaderButton(props, "\n border-bottom: 1px solid ".concat(tableBorderColor(props), ";\n border-right: 0px;\n border-radius: 0;\n height: 100%;\n width: ").concat(tableToolbarSize, "px;\n\n .").concat(ClassName.CONTROLS_BUTTON_OVERLAY, " {\n position: absolute;\n width: 30px;\n height: 50%;\n right: 0;\n bottom: 0;\n }\n .").concat(ClassName.CONTROLS_BUTTON_OVERLAY, ":first-of-type {\n top: 0;\n }\n ")), ClassName.IS_RESIZING, ClassName.ROW_CONTROLS, HeaderButtonHover(props), HeaderButtonDanger(props), ClassName.NUMBERED_COLUMN, getBooleanFF('platform.editor.custom-table-width') ? akEditorTableToolbarSize : akEditorTableToolbarSize - 1, akEditorTableToolbarSize, akEditorTableNumberColumnWidth + 1, ClassName.NUMBERED_COLUMN_BUTTON, tableBorderColor(props), relativeFontSizeToBase16(fontSize()), tableHeaderCellBackgroundColor(props), tableTextColor(props), tableBorderColor(props), tableBorderColor(props), ClassName.WITH_CONTROLS, ClassName.CORNER_CONTROLS, ClassName.ROW_CONTROLS, ClassName.NUMBERED_COLUMN, getBooleanFF('platform.editor.custom-table-width') ? 0 : 1, ClassName.NUMBERED_COLUMN_BUTTON, ClassName.NUMBERED_COLUMN_BUTTON, tableBorderSelectedColor(props), tableBorderSelectedColor(props), tableToolbarSelectedColor(props), akEditorUnitZIndex, "var(--ds-text-selected, ".concat(N0, ")"), ClassName.IS_RESIZING, ClassName.WITH_CONTROLS, ClassName.NUMBERED_COLUMN_BUTTON, ClassName.NUMBERED_COLUMN_BUTTON, tableBorderSelectedColor(props), tableBorderSelectedColor(props), tableToolbarSelectedColor(props), akEditorUnitZIndex, "var(--ds-text-selected, ".concat(N0, ")"), ClassName.NUMBERED_COLUMN_BUTTON, ClassName.HOVERED_CELL_IN_DANGER, tableToolbarDeleteColor(props), tableBorderDeleteColor(props), "var(--ds-text-danger, ".concat(R500, ")"), akEditorUnitZIndex, ClassName.TABLE_NODE_WRAPPER, ClassName.COLUMN_CONTROLS_DECORATIONS, ClassName.TABLE_HEADER_CELL, ClassName.SELECTED_CELL, ClassName.HOVERED_CELL_IN_DANGER, ClassName.SELECTED_CELL, ClassName.HOVERED_CELL_IN_DANGER, akEditorSmallZIndex, ClassName.SELECTED_CELL, tableBorderSelectedColor(props), ClassName.SELECTED_CELL, tableCellSelectedColor(props), akEditorSmallZIndex, ClassName.HOVERED_CELL_IN_DANGER, ClassName.HOVERED_CELL_IN_DANGER, tableCellDeleteColor(props), akEditorUnitZIndex * 100, ClassName.HOVERED_CELL, ClassName.SELECTED_CELL, ClassName.TABLE_HEADER_CELL, ClassName.SELECTED_CELL, ClassName.TABLE_HEADER_CELL, ClassName.HOVERED_CELL, tableBorderSelectedColor(props), akEditorSmallZIndex, ClassName.HOVERED_CELL_IN_DANGER, tableBorderDeleteColor(props), akEditorUnitZIndex * 100, ClassName.ROW_CONTROLS_WRAPPER, tableMarginTop - cornerControlHeight + 1, ClassName.ROW_CONTROLS_WRAPPER, ClassName.TABLE_LEFT_SHADOW, akEditorUnitZIndex, ClassName.ROW_CONTROLS_WRAPPER, tableToolbarSize, tableWrapperStyles(), ClassName.IS_RESIZING, ClassName.TABLE_NODE_WRAPPER, scrollbarStyles, ClassName.RESIZE_CURSOR, props !== null && props !== void 0 && (_props$featureFlags = props.featureFlags) !== null && _props$featureFlags !== void 0 && _props$featureFlags.restartNumberedLists ? "" : listLargeNumericMarkersOldStyles, shadowSentinelStyles);
61
+ return css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n .", " button {\n background: ", ";\n color: ", ";\n cursor: none;\n }\n\n .", ":not(.", ") button:hover {\n background: ", ";\n color: ", " !important;\n cursor: pointer;\n }\n\n .ProseMirror {\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n\n .", " {\n margin-bottom: 0;\n }\n\n .", " {\n td.", ", th.", " {\n position: relative;\n overflow: visible;\n }\n\n td.", " {\n background-color: ", ";\n\n // ED-15246: Trello card is visible through a border of a table border\n // This fixes a border issue caused by relative positioned table cells\n &::after {\n height: 100%;\n content: '';\n border-left: 1px solid ", ";\n border-bottom: 1px solid ", ";\n position: absolute;\n right: 0px;\n top: 0px;\n bottom: 0;\n width: 100%;\n display: inline-block;\n pointer-events: none;\n }\n }\n }\n\n .", " {\n ", "\n }\n\n .", " {\n ", "\n }\n\n /* Delete button */\n ", "\n /* Ends Delete button */\n\n /* sticky styles */\n .", " .", " .", ":first-of-type {\n margin-top: ", "px;\n width: ", "px;\n\n position: fixed !important;\n z-index: ", " !important;\n box-shadow: 0px -", "px ", ";\n border-right: 0 none;\n /* top set by NumberColumn component */\n }\n\n .", " .", ".sticky {\n position: fixed !important;\n /* needs to be above row controls */\n z-index: ", " !important;\n background: ", ";\n\n width: ", "px;\n height: ", "px;\n }\n\n .", ".sticky .", " {\n border-bottom: 0px none;\n border-right: 0px none;\n\n height: ", "px;\n width: ", "px;\n }\n\n ", "\n\n .", "\n .", "\n .", ".sticky {\n position: fixed !important;\n z-index: ", " !important;\n display: flex;\n border-left: ", "px solid\n ", ";\n margin-left: -", "px;\n }\n\n .", " col:first-of-type {\n /* moving rows out of a table layout does weird things in Chrome */\n border-right: 1px solid ", ";\n }\n\n tr.sticky {\n padding-top: ", "px;\n position: fixed;\n display: grid;\n\n /* to keep it above cell selection but below date and other nodes popups that are inside sticky header */\n z-index: ", ";\n\n overflow-y: visible;\n overflow-x: hidden;\n\n grid-auto-flow: column;\n\n /* background for where controls apply */\n background: ", ";\n box-sizing: content-box;\n\n margin-top: 2px;\n\n box-shadow: 0 6px 4px -4px ", ";\n margin-left: -1px;\n\n &.no-pointer-events {\n pointer-events: none;\n }\n }\n\n .", " .", " {\n left: unset;\n position: fixed;\n /* needs to be above sticky header row and below date and other nodes popups that are inside sticky header */\n z-index: ", ";\n }\n\n .", ".", "\n .", " {\n padding-bottom: ", "px;\n }\n\n tr.sticky th {\n border-bottom: ", "px solid\n ", ";\n margin-right: -1px;\n }\n\n .", " tr.sticky > th:last-child {\n border-right-width: 1px;\n }\n\n /* add left edge for first cell */\n .", " tr.sticky > th:first-of-type {\n margin-left: 0px;\n }\n\n /* add a little bit so the scroll lines up with the table */\n .", " tr.sticky::after {\n content: ' ';\n width: ", "px;\n }\n\n /* To fix jumpiness caused in Chrome Browsers for sticky headers */\n .", " .sticky + tr {\n min-height: 0px;\n }\n\n /* move resize line a little in sticky bar */\n .", ".", " {\n tr.sticky\n td.", ",\n tr.sticky\n th.", " {\n .", "::after {\n right: ", "px;\n }\n }\n\n /* when selected put it back to normal -- :not selector would be nicer */\n tr.sticky\n td.", ".", ",\n tr.sticky\n th.", ".", " {\n .", "::after {\n right: ", "px;\n }\n }\n }\n\n tr.sticky\n .", ",\n tr.sticky\n .", " {\n z-index: 1;\n }\n\n .", " tr.sticky {\n padding-top: ", "px;\n }\n\n .", ".", "\n .", "\n .", ":first-of-type {\n margin-top: ", "px;\n }\n\n .", ".sticky {\n border-top: ", "px solid\n ", ";\n }\n\n ", "\n ", "\n ", "\n\n .", " .", " {\n height: 0; // stop overflow flash & set correct height in update-overflow-shadows.ts\n }\n\n .less-padding {\n padding: 0 ", "px;\n\n .", " {\n padding: 0 ", "px;\n\n // https://product-fabric.atlassian.net/browse/ED-16386\n // Fixes issue where the extra padding that is added here throws off the position\n // of the rows control dot\n &::after {\n right: 6px !important;\n }\n }\n\n &.", "[data-number-column='true'] {\n padding-left: ", "px;\n }\n .", ", .", " {\n width: ", "px;\n }\n\n .", " {\n left: 6px;\n }\n\n .", " {\n left: calc(100% - 6px);\n }\n }\n\n > .", " {\n /**\n * Prevent margins collapsing, aids with placing the gap-cursor correctly\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Box_Model/Mastering_margin_collapsing\n *\n * TODO: Enable this, many tests will fail!\n * border-top: 1px solid transparent;\n */\n }\n\n /* Breakout only works on top level unless wrapped in fragment mark */\n ", "\n\n ", ";\n\n /* Corner controls */\n .", " {\n width: ", "px;\n height: ", "px;\n display: none;\n\n .", " {\n position: relative;\n\n ", ";\n }\n }\n\n .", ".sticky {\n .", " {\n /* sticky row insert dot overlaps other row insert and messes things up */\n display: none !important;\n }\n }\n\n .", " {\n position: absolute;\n top: 0;\n width: ", "px;\n height: ", "px;\n border: 1px solid ", ";\n border-radius: 0;\n border-top-left-radius: ", "px;\n background: ", ";\n box-sizing: border-box;\n padding: 0;\n :focus {\n outline: none;\n }\n }\n .active .", " {\n border-color: ", ";\n background: ", ";\n }\n\n .", "[data-number-column='true'] {\n .", ", .", " {\n width: ", "px;\n }\n .", " .", " {\n border-right-width: 0;\n }\n }\n\n :not(.", ") .", ":hover {\n border-color: ", ";\n background: ", ";\n cursor: pointer;\n }\n\n :not(.", ")\n .", ".", " {\n border-color: ", ";\n background: ", ";\n }\n\n /* Row controls */\n .", " {\n width: ", "px;\n box-sizing: border-box;\n display: none;\n position: relative;\n\n ", ";\n\n .", " {\n display: flex;\n flex-direction: column;\n }\n .", ":last-child > button {\n border-bottom-left-radius: ", "px;\n }\n .", " {\n position: relative;\n margin-top: -1px;\n }\n .", ":hover,\n .", ".active,\n .", ":hover {\n z-index: ", ";\n }\n\n ", "\n }\n\n :not(.", ") .", " {\n ", "\n ", "\n }\n\n /* Numbered column */\n .", " {\n position: relative;\n float: right;\n margin-left: ", "px;\n top: ", "px;\n width: ", "px;\n box-sizing: border-box;\n }\n\n .", " {\n border: 1px solid ", ";\n box-sizing: border-box;\n margin-top: -1px;\n padding-bottom: 2px;\n padding: 10px 2px;\n text-align: center;\n font-size: ", ";\n background-color: ", ";\n color: ", ";\n border-color: ", ";\n\n :first-child:not(style),\n style:first-child + * {\n margin-top: 0;\n }\n :last-child {\n border-bottom: 1px solid ", ";\n }\n }\n\n .", " {\n .", ", .", " {\n display: block;\n }\n .", " {\n padding-left: ", "px;\n\n .", " {\n border-left: 0 none;\n }\n\n .", ".active {\n border-bottom: 1px solid ", ";\n border-color: ", ";\n background-color: ", ";\n position: relative;\n z-index: ", ";\n color: ", ";\n }\n }\n }\n :not(.", ") .", " {\n .", " {\n cursor: pointer;\n }\n .", ":hover {\n border-bottom: 1px solid ", ";\n border-color: ", ";\n background-color: ", ";\n position: relative;\n z-index: ", ";\n color: ", ";\n }\n .", ".", " {\n background-color: ", ";\n border: 1px solid ", ";\n border-left: 0;\n color: ", ";\n position: relative;\n z-index: ", ";\n }\n }\n\n /* Table */\n .", " > table {\n table-layout: fixed;\n white-space: normal;\n border-top: none;\n // 1px border width offset added here to prevent unwanted overflow and scolling - ED-16212\n margin-right: -1px;\n // Allows better positioning for the shadow sentinels - ED-16668\n position: relative;\n\n > tbody > tr {\n white-space: pre-wrap;\n }\n\n .", " + * {\n margin-top: 0;\n }\n\n /*\n * Headings have a top margin by default, but we don't want this on the\n * first heading within table header cells.\n *\n * This specifically sets margin-top for the first heading within a header\n * cell when center/right aligned.\n */\n th.", " > .fabric-editor-block-mark {\n > h1:first-of-type,\n > h2:first-of-type,\n > h3:first-of-type,\n > h4:first-of-type,\n > h5:first-of-type,\n > h6:first-of-type {\n margin-top: 0;\n }\n }\n\n .", ", .", " {\n position: relative;\n }\n /* Give selected cells a blue overlay */\n .", "::after,\n .", "::after {\n z-index: ", ";\n position: absolute;\n content: '';\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n width: 100%;\n pointer-events: none;\n }\n .", " {\n border: 1px solid ", ";\n }\n .", "::after {\n background: ", ";\n z-index: ", ";\n }\n th.", "::after,\n td.", "::after {\n background: ", ";\n z-index: ", ";\n }\n // ED-15246: Trello card is visible through a border of a table border\n /* ED-19064: To fix when enable header column in the table,\n and selection the header column, the right border is not tableBorderSelectedColor\n when deleting the header column, the right border is not tableToolbarDeleteColor */\n td.", ",\n td.", ",\n th.", ".", ",\n th.", ".", " {\n &::after {\n height: 100%;\n width: 100%;\n border: 1px solid ", ";\n content: '';\n position: absolute;\n left: -1px;\n top: -1px;\n bottom: 0;\n z-index: ", ";\n display: inline-block;\n pointer-events: none;\n }\n &.", "::after {\n ", ";\n z-index: ", ";\n }\n }\n }\n .", " {\n position: absolute;\n /* top of corner control is table margin top - corner control height + 1 pixel of table border. */\n top: ", "px;\n }\n .", ".", " {\n z-index: ", ";\n }\n .", " {\n left: -", "px;\n }\n ", "\n }\n\n .ProseMirror.", " {\n .", " {\n overflow-x: auto;\n ", ";\n }\n }\n\n .ProseMirror.", " {\n cursor: col-resize;\n }\n\n /*\n ED-15882: When custom start numbers is enabled for lists, we have\n styles that handle this generally (in editor-common) so we can\n throw away the older table-specific styles here.\n */\n ", "\n\n ", "\n"])), ClassName.LAYOUT_BUTTON, "var(--ds-background-neutral, ".concat(N20A, ")"), "var(--ds-icon, ".concat(N300, ")"), ClassName.LAYOUT_BUTTON, ClassName.IS_RESIZING, "var(--ds-background-neutral-hovered, ".concat(B300, ")"), "var(--ds-icon, white)", tableSharedStyle(props), columnControlsLineMarker(), hoveredDeleteButton(props), hoveredCell(props), hoveredWarningCell, resizeHandle(props), rangeSelectionStyles, ClassName.LAST_ITEM_IN_CELL, ClassName.TABLE_NODE_WRAPPER, ClassName.TABLE_CELL, ClassName.TABLE_HEADER_CELL, ClassName.TABLE_CELL, tableCellBackgroundColor(props), tableBorderColor(props), tableBorderColor(props), ClassName.CONTROLS_FLOATING_BUTTON_COLUMN, insertColumnButtonWrapper(props), ClassName.CONTROLS_FLOATING_BUTTON_ROW, insertRowButtonWrapper(props), DeleteButton(props), ClassName.TABLE_STICKY, ClassName.NUMBERED_COLUMN, ClassName.NUMBERED_COLUMN_BUTTON, stickyRowOffsetTop + 2, akEditorTableNumberColumnWidth, akEditorStickyHeaderZIndex, stickyRowOffsetTop, "var(--ds-surface, white)", ClassName.TABLE_STICKY, ClassName.CORNER_CONTROLS, akEditorSmallZIndex, "var(--ds-surface, white)", tableToolbarSize, tableToolbarSize, ClassName.CORNER_CONTROLS, ClassName.CONTROLS_CORNER_BUTTON, tableToolbarSize, tableToolbarSize, tableStickyHeaderColumnControlsDecorationsStyle(props), ClassName.TABLE_STICKY, ClassName.ROW_CONTROLS, ClassName.ROW_CONTROLS_BUTTON_WRAP, akEditorStickyHeaderZIndex, tableToolbarSize, "var(--ds-surface, white)", tableToolbarSize, ClassName.TABLE_STICKY, "var(--ds-surface, green)", stickyRowOffsetTop, akEditorTableCellOnStickyHeaderZIndex - 5, "var(--ds-surface, white)", "var(--ds-shadow-overflow-perimeter, ".concat(N40A, ")"), ClassName.TABLE_STICKY, ClassName.TABLE_STICKY_SHADOW, akEditorTableCellOnStickyHeaderZIndex, ClassName.WITH_CONTROLS, ClassName.TABLE_STICKY, ClassName.TABLE_STICKY_SHADOW, tableToolbarSize, stickyHeaderBorderBottomWidth, tableBorderColor(props), ClassName.TABLE_STICKY, ClassName.TABLE_STICKY, ClassName.TABLE_STICKY, insertColumnButtonOffset + 1, ClassName.TABLE_STICKY, ClassName.TABLE_CONTAINER, ClassName.TABLE_STICKY, ClassName.WITH_RESIZE_LINE, ClassName.WITH_RESIZE_LINE, ClassName.RESIZE_HANDLE_DECORATION, (resizeHandlerAreaWidth - resizeLineWidth) / 2 + 1, ClassName.WITH_RESIZE_LINE, ClassName.SELECTED_CELL, ClassName.WITH_RESIZE_LINE, ClassName.SELECTED_CELL, ClassName.RESIZE_HANDLE_DECORATION, (resizeHandlerAreaWidth - resizeLineWidth) / 2, ClassName.HOVERED_CELL, ClassName.SELECTED_CELL, ClassName.WITH_CONTROLS, tableControlsSpacing, ClassName.WITH_CONTROLS, ClassName.TABLE_STICKY, ClassName.NUMBERED_COLUMN, ClassName.NUMBERED_COLUMN_BUTTON, tableControlsSpacing + 2, ClassName.CORNER_CONTROLS, tableControlsSpacing - tableToolbarSize + 2, "var(--ds-surface, white)", sentinelStyles, OverflowShadow(props), stickyScrollbarStyles(), ClassName.TABLE_STICKY, ClassName.TABLE_STICKY_SHADOW, tablePadding, ClassName.ROW_CONTROLS_WRAPPER, tablePadding, ClassName.TABLE_CONTAINER, akEditorTableNumberColumnWidth + tablePadding - 1, ClassName.TABLE_LEFT_SHADOW, ClassName.TABLE_RIGHT_SHADOW, tableOverflowShadowWidth, ClassName.TABLE_LEFT_SHADOW, ClassName.TABLE_RIGHT_SHADOW, ClassName.NODEVIEW_WRAPPER, breakoutWidthStyling(), columnControlsDecoration(props), ClassName.CORNER_CONTROLS, tableToolbarSize + 1, cornerControlHeight, ClassName.CORNER_CONTROLS_INSERT_ROW_MARKER, InsertMarker(props, "\n left: -11px;\n top: 9px;\n "), ClassName.CORNER_CONTROLS, ClassName.CORNER_CONTROLS_INSERT_ROW_MARKER, ClassName.CONTROLS_CORNER_BUTTON, tableToolbarSize + 1, tableToolbarSize + 1, tableBorderColor(props), tableBorderRadiusSize, tableHeaderCellBackgroundColor(props), ClassName.CONTROLS_CORNER_BUTTON, tableBorderSelectedColor(props), tableToolbarSelectedColor(props), ClassName.TABLE_CONTAINER, ClassName.CORNER_CONTROLS, ClassName.CONTROLS_CORNER_BUTTON, getBooleanFF('platform.editor.custom-table-width') ? akEditorTableToolbarSize + akEditorTableNumberColumnWidth + 1 : akEditorTableToolbarSize + akEditorTableNumberColumnWidth, ClassName.ROW_CONTROLS, ClassName.CONTROLS_BUTTON, ClassName.IS_RESIZING, ClassName.CONTROLS_CORNER_BUTTON, tableBorderSelectedColor(props), tableToolbarSelectedColor(props), ClassName.IS_RESIZING, ClassName.CONTROLS_CORNER_BUTTON, ClassName.HOVERED_CELL_IN_DANGER, tableBorderDeleteColor(props), tableToolbarDeleteColor(props), ClassName.ROW_CONTROLS, tableToolbarSize, InsertMarker(props, "\n bottom: -1px;\n left: -11px;\n "), ClassName.ROW_CONTROLS_INNER, ClassName.ROW_CONTROLS_BUTTON_WRAP, tableBorderRadiusSize, ClassName.ROW_CONTROLS_BUTTON_WRAP, ClassName.ROW_CONTROLS_BUTTON_WRAP, ClassName.ROW_CONTROLS_BUTTON_WRAP, ClassName.CONTROLS_BUTTON, akEditorUnitZIndex, HeaderButton(props, "\n border-bottom: 1px solid ".concat(tableBorderColor(props), ";\n border-right: 0px;\n border-radius: 0;\n height: 100%;\n width: ").concat(tableToolbarSize, "px;\n\n .").concat(ClassName.CONTROLS_BUTTON_OVERLAY, " {\n position: absolute;\n width: 30px;\n height: 50%;\n right: 0;\n bottom: 0;\n }\n .").concat(ClassName.CONTROLS_BUTTON_OVERLAY, ":first-of-type {\n top: 0;\n }\n ")), ClassName.IS_RESIZING, ClassName.ROW_CONTROLS, HeaderButtonHover(props), HeaderButtonDanger(props), ClassName.NUMBERED_COLUMN, getBooleanFF('platform.editor.custom-table-width') ? akEditorTableToolbarSize : akEditorTableToolbarSize - 1, akEditorTableToolbarSize, akEditorTableNumberColumnWidth + 1, ClassName.NUMBERED_COLUMN_BUTTON, tableBorderColor(props), relativeFontSizeToBase16(fontSize()), tableHeaderCellBackgroundColor(props), tableTextColor(props), tableBorderColor(props), tableBorderColor(props), ClassName.WITH_CONTROLS, ClassName.CORNER_CONTROLS, ClassName.ROW_CONTROLS, ClassName.NUMBERED_COLUMN, getBooleanFF('platform.editor.custom-table-width') ? 0 : 1, ClassName.NUMBERED_COLUMN_BUTTON, ClassName.NUMBERED_COLUMN_BUTTON, tableBorderSelectedColor(props), tableBorderSelectedColor(props), tableToolbarSelectedColor(props), akEditorUnitZIndex, "var(--ds-text-selected, ".concat(N0, ")"), ClassName.IS_RESIZING, ClassName.WITH_CONTROLS, ClassName.NUMBERED_COLUMN_BUTTON, ClassName.NUMBERED_COLUMN_BUTTON, tableBorderSelectedColor(props), tableBorderSelectedColor(props), tableToolbarSelectedColor(props), akEditorUnitZIndex, "var(--ds-text-selected, ".concat(N0, ")"), ClassName.NUMBERED_COLUMN_BUTTON, ClassName.HOVERED_CELL_IN_DANGER, tableToolbarDeleteColor(props), tableBorderDeleteColor(props), "var(--ds-text-danger, ".concat(R500, ")"), akEditorUnitZIndex, ClassName.TABLE_NODE_WRAPPER, ClassName.COLUMN_CONTROLS_DECORATIONS, ClassName.TABLE_HEADER_CELL, ClassName.SELECTED_CELL, ClassName.HOVERED_CELL_IN_DANGER, ClassName.SELECTED_CELL, ClassName.HOVERED_CELL_IN_DANGER, akEditorSmallZIndex, ClassName.SELECTED_CELL, tableBorderSelectedColor(props), ClassName.SELECTED_CELL, tableCellSelectedColor(props), akEditorSmallZIndex, ClassName.HOVERED_CELL_IN_DANGER, ClassName.HOVERED_CELL_IN_DANGER, tableCellDeleteColor(props), akEditorUnitZIndex * 100, ClassName.HOVERED_CELL, ClassName.SELECTED_CELL, ClassName.TABLE_HEADER_CELL, ClassName.SELECTED_CELL, ClassName.TABLE_HEADER_CELL, ClassName.HOVERED_CELL, tableBorderSelectedColor(props), akEditorSmallZIndex, ClassName.HOVERED_CELL_IN_DANGER, tableBorderStyles(props), akEditorUnitZIndex * 100, ClassName.ROW_CONTROLS_WRAPPER, tableMarginTop - cornerControlHeight + 1, ClassName.ROW_CONTROLS_WRAPPER, ClassName.TABLE_LEFT_SHADOW, akEditorUnitZIndex, ClassName.ROW_CONTROLS_WRAPPER, tableToolbarSize, tableWrapperStyles(), ClassName.IS_RESIZING, ClassName.TABLE_NODE_WRAPPER, scrollbarStyles, ClassName.RESIZE_CURSOR, props !== null && props !== void 0 && (_props$featureFlags = props.featureFlags) !== null && _props$featureFlags !== void 0 && _props$featureFlags.restartNumberedLists ? "" : listLargeNumericMarkersOldStyles, shadowSentinelStyles);
48
62
  };
49
- export var tableFullPageEditorStyles = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n .ProseMirror .", " > table {\n margin-left: 0;\n // 1px border width offset added here to prevent unwanted overflow and scolling - ED-16212\n margin-right: -1px;\n width: 100%;\n }\n"])), ClassName.TABLE_NODE_WRAPPER);
50
- export var tableCommentEditorStyles = css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n .ProseMirror .", " > table {\n margin-left: 0;\n margin-right: 0;\n ", ";\n }\n"])), ClassName.TABLE_NODE_WRAPPER, scrollbarStyles);
63
+ export var tableFullPageEditorStyles = css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n .ProseMirror .", " > table {\n margin-left: 0;\n // 1px border width offset added here to prevent unwanted overflow and scolling - ED-16212\n margin-right: -1px;\n width: 100%;\n }\n"])), ClassName.TABLE_NODE_WRAPPER);
64
+ export var tableCommentEditorStyles = css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n .ProseMirror .", " > table {\n margin-left: 0;\n margin-right: 0;\n ", ";\n }\n"])), ClassName.TABLE_NODE_WRAPPER, scrollbarStyles);