@atlaskit/editor-plugin-table 1.4.1 → 1.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/dist/cjs/i18n/cs.js +2 -2
  3. package/dist/cjs/i18n/en_ZZ.js +43 -0
  4. package/dist/cjs/i18n/ja.js +4 -4
  5. package/dist/cjs/i18n/ko.js +1 -1
  6. package/dist/cjs/i18n/sv.js +1 -1
  7. package/dist/cjs/i18n/vi.js +2 -2
  8. package/dist/cjs/i18n/zh.js +3 -3
  9. package/dist/cjs/plugins/table/index.js +3 -1
  10. package/dist/cjs/plugins/table/nodeviews/TableComponent.js +5 -0
  11. package/dist/cjs/plugins/table/nodeviews/table.js +2 -1
  12. package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/resize-state.js +10 -0
  13. package/dist/cjs/plugins/table/ui/common-styles.js +1 -1
  14. package/dist/cjs/plugins/table/ui/consts.js +8 -3
  15. package/dist/cjs/plugins/table/ui/ui-styles.js +2 -2
  16. package/dist/cjs/version.json +1 -1
  17. package/dist/es2019/i18n/cs.js +2 -2
  18. package/dist/es2019/i18n/en_ZZ.js +36 -0
  19. package/dist/es2019/i18n/ja.js +4 -4
  20. package/dist/es2019/i18n/ko.js +1 -1
  21. package/dist/es2019/i18n/sv.js +1 -1
  22. package/dist/es2019/i18n/vi.js +2 -2
  23. package/dist/es2019/i18n/zh.js +3 -3
  24. package/dist/es2019/plugins/table/index.js +4 -2
  25. package/dist/es2019/plugins/table/nodeviews/TableComponent.js +5 -0
  26. package/dist/es2019/plugins/table/nodeviews/table.js +2 -1
  27. package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/resize-state.js +10 -0
  28. package/dist/es2019/plugins/table/ui/common-styles.js +3 -3
  29. package/dist/es2019/plugins/table/ui/consts.js +6 -2
  30. package/dist/es2019/plugins/table/ui/ui-styles.js +3 -3
  31. package/dist/es2019/version.json +1 -1
  32. package/dist/esm/i18n/cs.js +2 -2
  33. package/dist/esm/i18n/en_ZZ.js +36 -0
  34. package/dist/esm/i18n/ja.js +4 -4
  35. package/dist/esm/i18n/ko.js +1 -1
  36. package/dist/esm/i18n/sv.js +1 -1
  37. package/dist/esm/i18n/vi.js +2 -2
  38. package/dist/esm/i18n/zh.js +3 -3
  39. package/dist/esm/plugins/table/index.js +4 -2
  40. package/dist/esm/plugins/table/nodeviews/TableComponent.js +5 -0
  41. package/dist/esm/plugins/table/nodeviews/table.js +2 -1
  42. package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/resize-state.js +10 -0
  43. package/dist/esm/plugins/table/ui/common-styles.js +2 -2
  44. package/dist/esm/plugins/table/ui/consts.js +6 -2
  45. package/dist/esm/plugins/table/ui/ui-styles.js +3 -3
  46. package/dist/esm/version.json +1 -1
  47. package/dist/types/i18n/en_ZZ.d.ts +35 -0
  48. package/dist/types/plugins/table/ui/consts.d.ts +2 -1
  49. package/dist/types-ts4.5/i18n/en_ZZ.d.ts +35 -0
  50. package/dist/types-ts4.5/plugins/table/ui/consts.d.ts +2 -1
  51. package/examples/99-testing.tsx +1 -4
  52. package/package.json +16 -7
  53. package/src/__tests__/integration/auto-size.ts +6 -2
  54. package/src/__tests__/integration/sticky-header.ts +6 -5
  55. package/src/__tests__/unit/collab.ts +1 -1
  56. package/src/__tests__/unit/color-picker.ts +4 -0
  57. package/src/__tests__/unit/commands/insert.ts +1 -1
  58. package/src/__tests__/unit/commands/misc.ts +2 -0
  59. package/src/__tests__/unit/commands.ts +4 -2
  60. package/src/__tests__/unit/event-handlers.ts +4 -2
  61. package/src/__tests__/unit/get-toolbar-config.ts +4 -0
  62. package/src/__tests__/unit/index.ts +4 -2
  63. package/src/__tests__/unit/keymap.ts +4 -2
  64. package/src/__tests__/unit/layout.ts +4 -0
  65. package/src/__tests__/unit/pm-plugins/main-with-allow-collapse.ts +4 -0
  66. package/src/__tests__/unit/pm-plugins/table-resizing/event-handlers.ts +3 -1
  67. package/src/__tests__/unit/pm-plugins/table-selection-keymap.ts +2 -0
  68. package/src/__tests__/unit/undo-redo.ts +1 -1
  69. package/src/__tests__/unit/utils/collapse.ts +4 -1
  70. package/src/i18n/cs.ts +2 -2
  71. package/src/i18n/en_ZZ.ts +41 -0
  72. package/src/i18n/ja.ts +4 -4
  73. package/src/i18n/ko.ts +1 -1
  74. package/src/i18n/sv.ts +1 -1
  75. package/src/i18n/vi.ts +2 -2
  76. package/src/i18n/zh.ts +3 -3
  77. package/src/plugins/table/index.tsx +13 -2
  78. package/src/plugins/table/nodeviews/TableComponent.tsx +6 -0
  79. package/src/plugins/table/nodeviews/table.tsx +1 -0
  80. package/src/plugins/table/pm-plugins/table-resizing/utils/resize-state.ts +11 -0
  81. package/src/plugins/table/ui/common-styles.ts +3 -3
  82. package/src/plugins/table/ui/consts.ts +6 -2
  83. package/src/plugins/table/ui/ui-styles.ts +3 -3
@@ -18,8 +18,8 @@ export default {
18
18
  'fabric.editor.extension.deleteElementTitle': '删除元素',
19
19
  'fabric.editor.extension.sourceNoTitledName': '此元素',
20
20
  'fabric.editor.floatingToolbar.confirmModalCheckboxLabel': '同时删除已连接的元素',
21
- 'fabric.editor.headerColumn': '标头列',
22
- 'fabric.editor.headerRow': '表头行',
21
+ 'fabric.editor.headerColumn': '标题列',
22
+ 'fabric.editor.headerRow': '标题行',
23
23
  'fabric.editor.insertColumn': '在右侧插入列',
24
24
  'fabric.editor.insertRow': '在下方插入行',
25
25
  'fabric.editor.mergeCells': '合并单元格',
@@ -29,7 +29,7 @@ export default {
29
29
  'fabric.editor.rowControl': '突出显示行',
30
30
  'fabric.editor.sortColumnASC': '对列 A → Z 进行排序',
31
31
  'fabric.editor.sortColumnDESC': '对列 Z → A 进行排序',
32
- 'fabric.editor.splitCell': '分离单元格',
32
+ 'fabric.editor.splitCell': '拆分单元格',
33
33
  'fabric.editor.tableOptions': '表格选项',
34
34
  'fabric.editor.tables.confirmDeleteLinkedModalMessage': '删除 {nodeName} 将断开与其连接的所有内容。',
35
35
  'fabric.editor.tables.confirmDeleteLinkedModalOKButton': '删除'
@@ -3,7 +3,7 @@ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
3
3
  import { browser } from '@atlaskit/editor-common/utils';
4
4
  import { tableEditing } from '@atlaskit/editor-tables/pm-plugins';
5
5
  import { createTable } from '@atlaskit/editor-tables/utils';
6
- import { table, tableCell, tableHeader, tableRow } from '@atlaskit/adf-schema';
6
+ import { table, tableCell, tableHeader, tableRow, tableWithCustomWidth } from '@atlaskit/adf-schema';
7
7
  import { toggleTable, tooltip } from '@atlaskit/editor-common/keymaps';
8
8
  import { WithPluginState } from '@atlaskit/editor-common/with-plugin-state';
9
9
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD, TABLE_ACTION } from '@atlaskit/editor-common/analytics';
@@ -27,6 +27,7 @@ import FloatingInsertButton from './ui/FloatingInsertButton';
27
27
  import LayoutButton from './ui/LayoutButton';
28
28
  import { isLayoutSupported } from './utils';
29
29
  import { ErrorBoundary } from '@atlaskit/editor-common/error-boundary';
30
+ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
30
31
  const defaultGetEditorFeatureFlags = () => ({});
31
32
  const tablesPlugin = (options, api) => {
32
33
  const editorViewRef = {
@@ -70,9 +71,10 @@ const tablesPlugin = (options, api) => {
70
71
  }
71
72
  },
72
73
  nodes() {
74
+ const tableNode = getBooleanFF('platform.editor.custom-table-width') ? tableWithCustomWidth : table;
73
75
  return [{
74
76
  name: 'table',
75
- node: table
77
+ node: tableNode
76
78
  }, {
77
79
  name: 'tableHeader',
78
80
  node: tableHeader
@@ -4,6 +4,7 @@ import classnames from 'classnames';
4
4
  import { isTableSelected } from '@atlaskit/editor-tables/utils';
5
5
  import rafSchedule from 'raf-schd';
6
6
  import { findTable } from '@atlaskit/editor-tables/utils';
7
+ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
7
8
  import { calcTableWidth, tableMarginSides } from '@atlaskit/editor-common/styles';
8
9
  import { browser, isValidPosition } from '@atlaskit/editor-common/utils';
9
10
  import { akEditorMobileBreakoutPoint, akEditorTableToolbarSize as tableToolbarSize } from '@atlaskit/editor-shared-styles';
@@ -484,6 +485,10 @@ class TableComponent extends React.Component {
484
485
  const shadowStyle = tableOverflowShadowsOptimization ? memoizeOne(visible => ({
485
486
  visibility: visible ? 'visible' : 'hidden'
486
487
  })) : NOOP;
488
+ if (getBooleanFF('platform.editor.custom-table-width')) {
489
+ // new table experience code goes here
490
+ // return <Resizer>...
491
+ }
487
492
  return /*#__PURE__*/React.createElement("div", {
488
493
  style: {
489
494
  width: tableContainerWidth,
@@ -15,7 +15,8 @@ const tableAttributes = node => {
15
15
  'data-number-column': node.attrs.isNumberColumnEnabled,
16
16
  'data-layout': node.attrs.layout,
17
17
  'data-autosize': node.attrs.__autoSize,
18
- 'data-table-local-id': node.attrs.localId || ''
18
+ 'data-table-local-id': node.attrs.localId || '',
19
+ 'data-table-width': node.attrs.width
19
20
  };
20
21
  };
21
22
  const toDOM = (node, props) => {
@@ -230,6 +230,11 @@ export const normaliseTableLayout = input => {
230
230
  }
231
231
  };
232
232
  export const getNewResizeStateFromSelectedColumns = (rect, state, domAtPos, getEditorContainerWidth) => {
233
+ // Fail early so that we don't do complex calculations for no reason
234
+ const numColumnsSelected = rect.right - rect.left;
235
+ if (numColumnsSelected <= 1) {
236
+ return;
237
+ }
233
238
  const {
234
239
  totalRowCount,
235
240
  totalColumnCount,
@@ -238,6 +243,11 @@ export const getNewResizeStateFromSelectedColumns = (rect, state, domAtPos, getE
238
243
  if (!table) {
239
244
  return;
240
245
  }
246
+
247
+ // Fail early so that we don't do complex calculations for no reason
248
+ if (!hasTableBeenResized(table.node)) {
249
+ return;
250
+ }
241
251
  const maybeTable = domAtPos(table.start).node;
242
252
  const tableRef = maybeTable.closest('table');
243
253
  if (!tableRef) {
@@ -5,7 +5,7 @@ import { N40A, B300, N300, N20A, N0, R500 } from '@atlaskit/theme/colors';
5
5
  import { SelectionStyle, getSelectionStyles, akEditorSmallZIndex, akEditorTableNumberColumnWidth, akEditorStickyHeaderZIndex, akEditorTableToolbarSize, akEditorUnitZIndex, akEditorSelectedNodeClassName, relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
6
6
  import { scrollbarStyles } from '@atlaskit/editor-shared-styles/scrollbar';
7
7
  import { TableCssClassName as ClassName } from '../types';
8
- import { tableCellBackgroundColor, tableToolbarColor, tableBorderColor, tableCellSelectedColor, tableToolbarSelectedColor, tableBorderSelectedColor, tableCellDeleteColor, tableBorderDeleteColor, tableToolbarDeleteColor, tableBorderRadiusSize, tablePadding, tableScrollbarOffset, resizeHandlerAreaWidth, resizeLineWidth, tableToolbarSize, tableInsertColumnButtonSize, tableControlsSpacing, tableTextColor, stickyRowZIndex, columnControlsDecorationHeight, stickyRowOffsetTop, stickyHeaderBorderBottomWidth } from './consts';
8
+ import { tableCellBackgroundColor, tableHeaderCellBackgroundColor, tableBorderColor, tableCellSelectedColor, tableToolbarSelectedColor, tableBorderSelectedColor, tableCellDeleteColor, tableBorderDeleteColor, tableToolbarDeleteColor, tableBorderRadiusSize, tablePadding, tableScrollbarOffset, resizeHandlerAreaWidth, resizeLineWidth, tableToolbarSize, tableInsertColumnButtonSize, tableControlsSpacing, tableTextColor, stickyRowZIndex, columnControlsDecorationHeight, stickyRowOffsetTop, stickyHeaderBorderBottomWidth } from './consts';
9
9
  import { HeaderButton, HeaderButtonHover, HeaderButtonDanger, insertColumnButtonWrapper, insertRowButtonWrapper, columnControlsLineMarker, DeleteButton, OverflowShadow, columnControlsDecoration, hoveredDeleteButton, hoveredCell, hoveredWarningCell, resizeHandle, InsertMarker } from './ui-styles';
10
10
  const cornerControlHeight = tableToolbarSize + 1;
11
11
 
@@ -403,7 +403,7 @@ export const tableStyles = props => {
403
403
  border: 1px solid ${tableBorderColor(props)};
404
404
  border-radius: 0;
405
405
  border-top-left-radius: ${tableBorderRadiusSize}px;
406
- background: ${tableToolbarColor(props)};
406
+ background: ${tableHeaderCellBackgroundColor(props)};
407
407
  box-sizing: border-box;
408
408
  padding: 0;
409
409
  :focus {
@@ -508,7 +508,7 @@ export const tableStyles = props => {
508
508
  padding: 10px 2px;
509
509
  text-align: center;
510
510
  font-size: ${relativeFontSizeToBase16(fontSize())};
511
- background-color: ${tableToolbarColor(props)};
511
+ background-color: ${tableHeaderCellBackgroundColor(props)};
512
512
  color: ${tableTextColor(props)};
513
513
  border-color: ${tableBorderColor(props)};
514
514
 
@@ -14,6 +14,10 @@ export const tableCellBackgroundColor = themed({
14
14
  light: `var(--ds-surface, ${N0})`,
15
15
  dark: `var(--ds-surface, ${DN30})`
16
16
  });
17
+ export const tableHeaderCellBackgroundColor = themed({
18
+ light: `var(--ds-background-neutral, ${akEditorTableToolbar})`,
19
+ dark: `var(--ds-background-neutral, ${akEditorTableToolbarDark})`
20
+ });
17
21
  export const tableToolbarColor = themed({
18
22
  light: `var(--ds-background-neutral-subtle, ${akEditorTableToolbar})`,
19
23
  dark: `var(--ds-background-neutral-subtle, ${akEditorTableToolbarDark})`
@@ -23,8 +27,8 @@ export const tableTextColor = themed({
23
27
  dark: `var(--ds-text-subtlest, ${DN400})`
24
28
  });
25
29
  export const tableBorderColor = themed({
26
- light: `var(--ds-border, ${akEditorTableBorder})`,
27
- dark: `var(--ds-border, ${akEditorTableBorderDark})`
30
+ light: `var(--ds-background-accent-gray-subtler, ${akEditorTableBorder})`,
31
+ dark: `var(--ds-background-accent-gray-subtler, ${akEditorTableBorderDark})`
28
32
  });
29
33
  export const tableFloatingControlsColor = `var(--ds-background-neutral, ${N20})`;
30
34
  // TODO: https://product-fabric.atlassian.net/browse/DSP-4461
@@ -2,7 +2,7 @@ import { css } from '@emotion/react';
2
2
  import { tableCellBorderWidth, tableMarginTop, tableMarginTopWithControl } from '@atlaskit/editor-common/styles';
3
3
  import { akEditorShadowZIndex, akEditorTableNumberColumnWidth, akEditorUnitZIndex } from '@atlaskit/editor-shared-styles';
4
4
  import { N40A, B300, N300, R300, N20A, N60A, N0, Y50, Y200 } from '@atlaskit/theme/colors';
5
- import { tableToolbarColor, tableBorderColor, tableToolbarSelectedColor, tableBorderSelectedColor, tableCellDeleteColor, tableBorderDeleteColor, tableToolbarDeleteColor, lineMarkerSize, columnControlsDecorationHeight, columnControlsZIndex, columnControlsSelectedZIndex, resizeHandlerAreaWidth, resizeLineWidth, resizeHandlerZIndex, tableToolbarSize, tableInsertColumnButtonSize, tableDeleteButtonSize } from './consts';
5
+ import { tableBorderColor, tableToolbarSelectedColor, tableHeaderCellBackgroundColor, tableBorderSelectedColor, tableCellDeleteColor, tableBorderDeleteColor, tableToolbarDeleteColor, lineMarkerSize, columnControlsDecorationHeight, columnControlsZIndex, columnControlsSelectedZIndex, resizeHandlerAreaWidth, resizeLineWidth, resizeHandlerZIndex, tableToolbarSize, tableInsertColumnButtonSize, tableDeleteButtonSize } from './consts';
6
6
  import { TableCssClassName as ClassName } from '../types';
7
7
  import { borderRadius } from '@atlaskit/theme/constants';
8
8
  const InsertLine = cssString => css`
@@ -51,7 +51,7 @@ const Button = cssString => css`
51
51
  `;
52
52
  export const HeaderButton = (props, cssString) => css`
53
53
  .${ClassName.CONTROLS_BUTTON} {
54
- background: ${tableToolbarColor(props)};
54
+ background: ${tableHeaderCellBackgroundColor(props)};
55
55
  border: 1px solid ${tableBorderColor(props)};
56
56
  display: block;
57
57
  box-sizing: border-box;
@@ -231,7 +231,7 @@ export const OverflowShadow = props => css`
231
231
  }
232
232
  `;
233
233
  const columnHeaderButton = (props, cssString) => css`
234
- background: ${tableToolbarColor(props)};
234
+ background: ${tableHeaderCellBackgroundColor(props)};
235
235
  border: 1px solid ${tableBorderColor(props)};
236
236
  display: block;
237
237
  box-sizing: border-box;
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-table",
3
- "version": "1.4.1",
3
+ "version": "1.5.1",
4
4
  "sideEffects": false
5
5
  }
@@ -15,9 +15,9 @@ export default {
15
15
  'fabric.editor.cornerControl': 'Zvýraznit tabulku',
16
16
  'fabric.editor.distributeColumns': 'Rozložení sloupců',
17
17
  'fabric.editor.extension.confirmDeleteLinkedModalMessagePrefix': 'Odstraňování',
18
- 'fabric.editor.extension.deleteElementTitle': 'Vymazat prvek',
18
+ 'fabric.editor.extension.deleteElementTitle': 'Odstranit prvek',
19
19
  'fabric.editor.extension.sourceNoTitledName': 'tento prvek',
20
- 'fabric.editor.floatingToolbar.confirmModalCheckboxLabel': 'Vymazat také všechny připojené prvky',
20
+ 'fabric.editor.floatingToolbar.confirmModalCheckboxLabel': 'Odstranit také všechny připojené prvky',
21
21
  'fabric.editor.headerColumn': 'Sloupec záhlaví',
22
22
  'fabric.editor.headerRow': 'Řádek záhlaví',
23
23
  'fabric.editor.insertColumn': 'Vložit sloupec napravo',
@@ -0,0 +1,36 @@
1
+ /* prettier-ignore */
2
+ /**
3
+ * NOTE:
4
+ *
5
+ * This file is automatically generated by Traduki 2.0.
6
+ * DO NOT CHANGE IT BY HAND or your changes will be lost.
7
+ */
8
+ //
9
+ export default {
10
+ 'fabric.editor.canNotSortTable': "⁣⁢⚠️ You can't sort a table with merged cells⁡⁡‌⁠⁠‌‍⁣⁤",
11
+ 'fabric.editor.cellBackground': '⁣⁢Cell background‌؜‍⁠‌⁠⁡‍‍؜‍⁣⁤',
12
+ 'fabric.editor.cellOptions': '⁣⁢Cell options؜؜⁠⁠‍⁡⁡⁣⁤',
13
+ 'fabric.editor.clearCells': '{0, plural, one {⁣⁢Clear cell؜⁡‍؜‌⁠‍⁠‌؜‌‍⁠⁣⁤} other {⁣⁢Clear cells؜⁡‍؜‌⁠‍⁠‌؜‌‍⁠⁣⁤}}',
14
+ 'fabric.editor.collapseTable': '⁣⁢Collapse table‌؜⁡‍⁠⁡⁠‌؜‍‌⁡⁡⁣⁤',
15
+ 'fabric.editor.cornerControl': '⁣⁢Highlight table؜⁡؜⁠⁠⁠‌⁣⁤',
16
+ 'fabric.editor.distributeColumns': '⁣⁢Distribute columns؜‍‍⁡‍‌؜‍‍‌⁣⁤',
17
+ 'fabric.editor.extension.confirmDeleteLinkedModalMessagePrefix': '⁣⁢Deleting؜‌‌⁠⁠؜‍؜⁡‌؜‌‌‌‌‌⁣⁤',
18
+ 'fabric.editor.extension.deleteElementTitle': '⁣⁢Delete element؜‌⁠⁡‍‌⁠⁡‌؜؜؜‍⁣⁤',
19
+ 'fabric.editor.extension.sourceNoTitledName': '⁣⁢this element⁠⁠‍⁡‍؜⁠‌⁡؜⁡؜‍⁣⁤',
20
+ 'fabric.editor.floatingToolbar.confirmModalCheckboxLabel': '⁣⁢Also delete connected elements‌⁡⁡‍‍⁡⁡⁠‌؜؜⁣⁤',
21
+ 'fabric.editor.headerColumn': '⁣⁢Header column⁡⁡‌؜‌‌⁠⁠⁠⁡⁣⁤',
22
+ 'fabric.editor.headerRow': '⁣⁢Header row‍‌⁠⁠⁡⁠⁡⁠⁠⁠‌⁣⁤',
23
+ 'fabric.editor.insertColumn': '⁣⁢Insert column right⁠‍⁡⁠⁠؜⁡⁠⁡‌‌⁣⁤',
24
+ 'fabric.editor.insertRow': '⁣⁢Insert row below⁡⁡⁠؜‌⁠⁡‌‍⁣⁤',
25
+ 'fabric.editor.mergeCells': '⁣⁢Merge cells⁠‌⁡‍⁡⁡⁡؜⁣⁤',
26
+ 'fabric.editor.numberedColumn': '⁣⁢Numbered column⁡؜؜⁡⁡‌؜؜‍‍‌‌‍⁡⁡⁣⁤',
27
+ 'fabric.editor.removeColumns': '{0, plural, one {⁣⁢Delete column‌‍؜‌‌⁠؜⁡⁣⁤} other {⁣⁢Delete columns‌‍؜‌‌⁠؜⁡⁣⁤}}',
28
+ 'fabric.editor.removeRows': '{0, plural, one {⁣⁢Delete row⁠‍‍‌‍⁠؜‌⁣⁤} other {⁣⁢Delete rows⁠‍‍‌‍⁠؜‌⁣⁤}}',
29
+ 'fabric.editor.rowControl': '⁣⁢Highlight row‍‌⁠⁡⁠؜‌⁠؜؜؜؜؜⁣⁤',
30
+ 'fabric.editor.sortColumnASC': '⁣⁢Sort column A → Z⁠؜‍⁠⁠‌‌⁡‌‍⁣⁤',
31
+ 'fabric.editor.sortColumnDESC': '⁣⁢Sort column Z → A؜⁡‌؜‌‌‍⁡‌‌‍‍‌‍؜؜⁡⁣⁤',
32
+ 'fabric.editor.splitCell': '⁣⁢Split cell⁠‌‍؜⁠⁠؜‍؜⁡؜‌‍⁣⁤',
33
+ 'fabric.editor.tableOptions': '⁣⁢Table options؜؜‍‌؜⁡؜⁠⁣⁤',
34
+ 'fabric.editor.tables.confirmDeleteLinkedModalMessage': '⁣⁢Deleting {nodeName} will break anything connected to it.⁠⁡⁠‍‍⁠؜⁠⁡⁠⁣⁤',
35
+ 'fabric.editor.tables.confirmDeleteLinkedModalOKButton': '⁣⁢Delete؜⁡‍؜؜⁡⁠⁣⁤'
36
+ };
@@ -7,7 +7,7 @@
7
7
  */
8
8
  //Japanese
9
9
  export default {
10
- 'fabric.editor.canNotSortTable': '⚠️ 統合したセルで表を並べ替えることはできません',
10
+ 'fabric.editor.canNotSortTable': '⚠️ 結合セルを含む表は並べ替えられません。',
11
11
  'fabric.editor.cellBackground': 'セルの背景',
12
12
  'fabric.editor.cellOptions': 'セルのオプション',
13
13
  'fabric.editor.clearCells': '{0, plural, other {セルをクリア}}',
@@ -22,13 +22,13 @@ export default {
22
22
  'fabric.editor.headerRow': 'ヘッダーの行',
23
23
  'fabric.editor.insertColumn': '列を右に挿入',
24
24
  'fabric.editor.insertRow': '行を下に挿入',
25
- 'fabric.editor.mergeCells': 'セルをマージ',
25
+ 'fabric.editor.mergeCells': 'セルを結合',
26
26
  'fabric.editor.numberedColumn': '番号付き列',
27
27
  'fabric.editor.removeColumns': '{0, plural, other {列を削除}}',
28
28
  'fabric.editor.removeRows': '{0, plural, other {行を削除}}',
29
29
  'fabric.editor.rowControl': '行をハイライト',
30
- 'fabric.editor.sortColumnASC': '列の並べ替え A → Z',
31
- 'fabric.editor.sortColumnDESC': '列の並べ替え Z → A',
30
+ 'fabric.editor.sortColumnASC': '列の並べ替え: 昇順',
31
+ 'fabric.editor.sortColumnDESC': '列の並べ替え: 降順',
32
32
  'fabric.editor.splitCell': 'セルを分割',
33
33
  'fabric.editor.tableOptions': '表のオプション',
34
34
  'fabric.editor.tables.confirmDeleteLinkedModalMessage': '{nodeName} を削除すると、接続されているすべてが破棄されます。',
@@ -24,7 +24,7 @@ export default {
24
24
  'fabric.editor.numberedColumn': '번호 매기기 열',
25
25
  'fabric.editor.removeColumns': '{0, plural, other {열 삭제}}',
26
26
  'fabric.editor.removeRows': '{0, plural, other {행 삭제}}',
27
- 'fabric.editor.rowControl': '열 강조',
27
+ 'fabric.editor.rowControl': '열 강조 표시',
28
28
  'fabric.editor.sortColumnASC': '열 정렬: 오름차순',
29
29
  'fabric.editor.sortColumnDESC': '열 정렬: 내림차순',
30
30
  'fabric.editor.splitCell': '셀 나누기',
@@ -10,7 +10,7 @@ export default {
10
10
  'fabric.editor.canNotSortTable': '⚠️ Du kan inte sortera en panelvy med sammanslagna celler',
11
11
  'fabric.editor.cellBackground': 'Cellbakgrund',
12
12
  'fabric.editor.cellOptions': 'Cellalternativ',
13
- 'fabric.editor.clearCells': '{0, plural, one {Rensa celler} other {Rensa celler}}',
13
+ 'fabric.editor.clearCells': '{0, plural, one {Rensa cell} other {Rensa celler}}',
14
14
  'fabric.editor.collapseTable': 'Dölj tabell',
15
15
  'fabric.editor.cornerControl': 'Markera tabellen',
16
16
  'fabric.editor.distributeColumns': 'Fördela kolumner',
@@ -12,7 +12,7 @@ export default {
12
12
  'fabric.editor.cellOptions': 'Tùy chọn ô',
13
13
  'fabric.editor.clearCells': '{0, plural, other {Xóa ô}}',
14
14
  'fabric.editor.collapseTable': 'Thu gọn bảng',
15
- 'fabric.editor.cornerControl': 'Bảng nổi bật',
15
+ 'fabric.editor.cornerControl': 'Làm nổi bật bảng',
16
16
  'fabric.editor.distributeColumns': 'Phân phối cột',
17
17
  'fabric.editor.extension.deleteElementTitle': 'Xóa thành phần',
18
18
  'fabric.editor.floatingToolbar.confirmModalCheckboxLabel': 'Đồng thời xóa các thành phần được kết nối',
@@ -24,7 +24,7 @@ export default {
24
24
  'fabric.editor.numberedColumn': 'Cột được đánh số',
25
25
  'fabric.editor.removeColumns': '{0, plural, other {Xóa cột}}',
26
26
  'fabric.editor.removeRows': '{0, plural, other {Xóa hàng}}',
27
- 'fabric.editor.rowControl': 'Hàng nổi bật',
27
+ 'fabric.editor.rowControl': 'Làm nổi bật hàng',
28
28
  'fabric.editor.sortColumnASC': 'Sắp xếp cột A → Z',
29
29
  'fabric.editor.sortColumnDESC': 'Sắp xếp cột Z → A',
30
30
  'fabric.editor.splitCell': 'Tách ô',
@@ -18,8 +18,8 @@ export default {
18
18
  'fabric.editor.extension.deleteElementTitle': '删除元素',
19
19
  'fabric.editor.extension.sourceNoTitledName': '此元素',
20
20
  'fabric.editor.floatingToolbar.confirmModalCheckboxLabel': '同时删除已连接的元素',
21
- 'fabric.editor.headerColumn': '标头列',
22
- 'fabric.editor.headerRow': '表头行',
21
+ 'fabric.editor.headerColumn': '标题列',
22
+ 'fabric.editor.headerRow': '标题行',
23
23
  'fabric.editor.insertColumn': '在右侧插入列',
24
24
  'fabric.editor.insertRow': '在下方插入行',
25
25
  'fabric.editor.mergeCells': '合并单元格',
@@ -29,7 +29,7 @@ export default {
29
29
  'fabric.editor.rowControl': '突出显示行',
30
30
  'fabric.editor.sortColumnASC': '对列 A → Z 进行排序',
31
31
  'fabric.editor.sortColumnDESC': '对列 Z → A 进行排序',
32
- 'fabric.editor.splitCell': '分离单元格',
32
+ 'fabric.editor.splitCell': '拆分单元格',
33
33
  'fabric.editor.tableOptions': '表格选项',
34
34
  'fabric.editor.tables.confirmDeleteLinkedModalMessage': '删除 {nodeName} 将断开与其连接的所有内容。',
35
35
  'fabric.editor.tables.confirmDeleteLinkedModalOKButton': '删除'
@@ -3,7 +3,7 @@ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
3
3
  import { browser } from '@atlaskit/editor-common/utils';
4
4
  import { tableEditing } from '@atlaskit/editor-tables/pm-plugins';
5
5
  import { createTable } from '@atlaskit/editor-tables/utils';
6
- import { table, tableCell, tableHeader, tableRow } from '@atlaskit/adf-schema';
6
+ import { table, tableCell, tableHeader, tableRow, tableWithCustomWidth } from '@atlaskit/adf-schema';
7
7
  import { toggleTable, tooltip } from '@atlaskit/editor-common/keymaps';
8
8
  import { WithPluginState } from '@atlaskit/editor-common/with-plugin-state';
9
9
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD, TABLE_ACTION } from '@atlaskit/editor-common/analytics';
@@ -27,6 +27,7 @@ import FloatingInsertButton from './ui/FloatingInsertButton';
27
27
  import LayoutButton from './ui/LayoutButton';
28
28
  import { isLayoutSupported } from './utils';
29
29
  import { ErrorBoundary } from '@atlaskit/editor-common/error-boundary';
30
+ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
30
31
  var defaultGetEditorFeatureFlags = function defaultGetEditorFeatureFlags() {
31
32
  return {};
32
33
  };
@@ -70,9 +71,10 @@ var tablesPlugin = function tablesPlugin(options, api) {
70
71
  }
71
72
  },
72
73
  nodes: function nodes() {
74
+ var tableNode = getBooleanFF('platform.editor.custom-table-width') ? tableWithCustomWidth : table;
73
75
  return [{
74
76
  name: 'table',
75
- node: table
77
+ node: tableNode
76
78
  }, {
77
79
  name: 'tableHeader',
78
80
  node: tableHeader
@@ -14,6 +14,7 @@ import classnames from 'classnames';
14
14
  import { isTableSelected } from '@atlaskit/editor-tables/utils';
15
15
  import rafSchedule from 'raf-schd';
16
16
  import { findTable } from '@atlaskit/editor-tables/utils';
17
+ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
17
18
  import { calcTableWidth, tableMarginSides } from '@atlaskit/editor-common/styles';
18
19
  import { browser, isValidPosition } from '@atlaskit/editor-common/utils';
19
20
  import { akEditorMobileBreakoutPoint, akEditorTableToolbarSize as tableToolbarSize } from '@atlaskit/editor-shared-styles';
@@ -476,6 +477,10 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
476
477
  visibility: visible ? 'visible' : 'hidden'
477
478
  };
478
479
  }) : NOOP;
480
+ if (getBooleanFF('platform.editor.custom-table-width')) {
481
+ // new table experience code goes here
482
+ // return <Resizer>...
483
+ }
479
484
  return /*#__PURE__*/React.createElement("div", {
480
485
  style: {
481
486
  width: tableContainerWidth,
@@ -26,7 +26,8 @@ var tableAttributes = function tableAttributes(node) {
26
26
  'data-number-column': node.attrs.isNumberColumnEnabled,
27
27
  'data-layout': node.attrs.layout,
28
28
  'data-autosize': node.attrs.__autoSize,
29
- 'data-table-local-id': node.attrs.localId || ''
29
+ 'data-table-local-id': node.attrs.localId || '',
30
+ 'data-table-width': node.attrs.width
30
31
  };
31
32
  };
32
33
  var toDOM = function toDOM(node, props) {
@@ -249,6 +249,11 @@ export var normaliseTableLayout = function normaliseTableLayout(input) {
249
249
  }
250
250
  };
251
251
  export var getNewResizeStateFromSelectedColumns = function getNewResizeStateFromSelectedColumns(rect, state, domAtPos, getEditorContainerWidth) {
252
+ // Fail early so that we don't do complex calculations for no reason
253
+ var numColumnsSelected = rect.right - rect.left;
254
+ if (numColumnsSelected <= 1) {
255
+ return;
256
+ }
252
257
  var _getSelectedTableInfo = getSelectedTableInfo(state.selection),
253
258
  totalRowCount = _getSelectedTableInfo.totalRowCount,
254
259
  totalColumnCount = _getSelectedTableInfo.totalColumnCount,
@@ -256,6 +261,11 @@ export var getNewResizeStateFromSelectedColumns = function getNewResizeStateFrom
256
261
  if (!table) {
257
262
  return;
258
263
  }
264
+
265
+ // Fail early so that we don't do complex calculations for no reason
266
+ if (!hasTableBeenResized(table.node)) {
267
+ return;
268
+ }
259
269
  var maybeTable = domAtPos(table.start).node;
260
270
  var tableRef = maybeTable.closest('table');
261
271
  if (!tableRef) {
@@ -7,7 +7,7 @@ import { N40A, B300, N300, N20A, N0, R500 } from '@atlaskit/theme/colors';
7
7
  import { SelectionStyle, getSelectionStyles, akEditorSmallZIndex, akEditorTableNumberColumnWidth, akEditorStickyHeaderZIndex, akEditorTableToolbarSize, akEditorUnitZIndex, akEditorSelectedNodeClassName, relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
8
8
  import { scrollbarStyles } from '@atlaskit/editor-shared-styles/scrollbar';
9
9
  import { TableCssClassName as ClassName } from '../types';
10
- import { tableCellBackgroundColor, tableToolbarColor, tableBorderColor, tableCellSelectedColor, tableToolbarSelectedColor, tableBorderSelectedColor, tableCellDeleteColor, tableBorderDeleteColor, tableToolbarDeleteColor, tableBorderRadiusSize, tablePadding, tableScrollbarOffset, resizeHandlerAreaWidth, resizeLineWidth, tableToolbarSize, tableInsertColumnButtonSize, tableControlsSpacing, tableTextColor, stickyRowZIndex, columnControlsDecorationHeight, stickyRowOffsetTop, stickyHeaderBorderBottomWidth } from './consts';
10
+ import { tableCellBackgroundColor, tableHeaderCellBackgroundColor, tableBorderColor, tableCellSelectedColor, tableToolbarSelectedColor, tableBorderSelectedColor, tableCellDeleteColor, tableBorderDeleteColor, tableToolbarDeleteColor, tableBorderRadiusSize, tablePadding, tableScrollbarOffset, resizeHandlerAreaWidth, resizeLineWidth, tableToolbarSize, tableInsertColumnButtonSize, tableControlsSpacing, tableTextColor, stickyRowZIndex, columnControlsDecorationHeight, stickyRowOffsetTop, stickyHeaderBorderBottomWidth } from './consts';
11
11
  import { HeaderButton, HeaderButtonHover, HeaderButtonDanger, insertColumnButtonWrapper, insertRowButtonWrapper, columnControlsLineMarker, DeleteButton, OverflowShadow, columnControlsDecoration, hoveredDeleteButton, hoveredCell, hoveredWarningCell, resizeHandle, InsertMarker } from './ui-styles';
12
12
  var cornerControlHeight = tableToolbarSize + 1;
13
13
 
@@ -33,7 +33,7 @@ var breakoutWidthStyling = function breakoutWidthStyling(useFragmentMarkBreakout
33
33
  // TODO: https://product-fabric.atlassian.net/browse/DSP-4139
34
34
  export var tableStyles = function tableStyles(props) {
35
35
  var _props$featureFlags, _props$featureFlags$u, _props$featureFlags2, _props$featureFlags3;
36
- return css(_templateObject3 || (_templateObject3 = _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 */\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: ", ";\n margin-left: -1px;\n\n &.no-pointer-events {\n pointer-events: none;\n }\n }\n\n .", " .", " {\n left: unset;\n position: fixed;\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 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 .", " {\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: 1px;\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 td.", ", td.", " {\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 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 }\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(props), hoveredDeleteButton, hoveredCell, hoveredWarningCell, resizeHandle, 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, ClassName.CONTROLS_FLOATING_BUTTON_ROW, insertRowButtonWrapper, DeleteButton, 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, stickyRowZIndex, "var(--ds-surface, white)", "var(--ds-shadow-overflow, ".concat("0 6px 4px -4px ".concat(N40A), ")"), ClassName.TABLE_STICKY, ClassName.TABLE_STICKY_SHADOW, stickyRowZIndex + 1, 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)", (_props$featureFlags = props.featureFlags) !== null && _props$featureFlags !== void 0 && _props$featureFlags.stickyHeadersOptimization ? sentinelStyles : '', OverflowShadow(props), 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, ClassName.NODEVIEW_WRAPPER, breakoutWidthStyling((_props$featureFlags$u = (_props$featureFlags2 = props.featureFlags) === null || _props$featureFlags2 === void 0 ? void 0 : _props$featureFlags2.useFragmentMarkBreakoutWidthStylingFix) !== null && _props$featureFlags$u !== void 0 ? _props$featureFlags$u : true), 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, tableToolbarColor(props), ClassName.CONTROLS_CORNER_BUTTON, tableBorderSelectedColor, "var(--ds-background-selected, ".concat(tableToolbarSelectedColor, ")"), ClassName.TABLE_CONTAINER, ClassName.CORNER_CONTROLS, ClassName.CONTROLS_CORNER_BUTTON, akEditorTableToolbarSize + akEditorTableNumberColumnWidth, ClassName.ROW_CONTROLS, ClassName.CONTROLS_BUTTON, ClassName.IS_RESIZING, ClassName.CONTROLS_CORNER_BUTTON, tableBorderSelectedColor, "var(--ds-background-selected, ".concat(tableToolbarSelectedColor, ")"), ClassName.IS_RESIZING, ClassName.CONTROLS_CORNER_BUTTON, ClassName.HOVERED_CELL_IN_DANGER, tableBorderDeleteColor, "var(--ds-background-danger, ".concat(tableToolbarDeleteColor, ")"), 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(), HeaderButtonDanger(), ClassName.NUMBERED_COLUMN, akEditorTableToolbarSize - 1, akEditorTableToolbarSize, akEditorTableNumberColumnWidth + 1, ClassName.NUMBERED_COLUMN_BUTTON, tableBorderColor(props), relativeFontSizeToBase16(fontSize()), tableToolbarColor(props), tableTextColor(props), tableBorderColor(props), tableBorderColor(props), ClassName.WITH_CONTROLS, ClassName.CORNER_CONTROLS, ClassName.ROW_CONTROLS, ClassName.NUMBERED_COLUMN, ClassName.NUMBERED_COLUMN_BUTTON, ClassName.NUMBERED_COLUMN_BUTTON, tableBorderSelectedColor, tableBorderSelectedColor, "var(--ds-background-selected, ".concat(tableToolbarSelectedColor, ")"), akEditorUnitZIndex, "var(--ds-text-selected, ".concat(N0, ")"), ClassName.IS_RESIZING, ClassName.WITH_CONTROLS, ClassName.NUMBERED_COLUMN_BUTTON, ClassName.NUMBERED_COLUMN_BUTTON, tableBorderSelectedColor, tableBorderSelectedColor, "var(--ds-background-selected, ".concat(tableToolbarSelectedColor, ")"), akEditorUnitZIndex, "var(--ds-text-selected, ".concat(N0, ")"), ClassName.NUMBERED_COLUMN_BUTTON, ClassName.HOVERED_CELL_IN_DANGER, "var(--ds-background-danger, ".concat(tableToolbarDeleteColor, ")"), tableBorderDeleteColor, "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, ClassName.SELECTED_CELL, tableCellSelectedColor, akEditorSmallZIndex, ClassName.HOVERED_CELL_IN_DANGER, ClassName.HOVERED_CELL_IN_DANGER, tableCellDeleteColor, akEditorUnitZIndex * 100, ClassName.HOVERED_CELL, ClassName.SELECTED_CELL, tableBorderSelectedColor, akEditorSmallZIndex, ClassName.HOVERED_CELL_IN_DANGER, tableBorderDeleteColor, akEditorUnitZIndex * 100, ClassName.ROW_CONTROLS_WRAPPER, tableMarginTop - cornerControlHeight + 1, ClassName.ROW_CONTROLS_WRAPPER, ClassName.TABLE_LEFT_SHADOW, akEditorUnitZIndex, ClassName.ROW_CONTROLS_WRAPPER, tableToolbarSize, ClassName.TABLE_NODE_WRAPPER, insertColumnButtonOffset, insertColumnButtonOffset, ClassName.IS_RESIZING, ClassName.TABLE_NODE_WRAPPER, scrollbarStyles, ClassName.RESIZE_CURSOR, props !== null && props !== void 0 && (_props$featureFlags3 = props.featureFlags) !== null && _props$featureFlags3 !== void 0 && _props$featureFlags3.restartNumberedLists ? "" : listLargeNumericMarkersOldStyles, shadowSentinelStyles);
36
+ return css(_templateObject3 || (_templateObject3 = _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 */\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: ", ";\n margin-left: -1px;\n\n &.no-pointer-events {\n pointer-events: none;\n }\n }\n\n .", " .", " {\n left: unset;\n position: fixed;\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 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 .", " {\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: 1px;\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 td.", ", td.", " {\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 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 }\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(props), hoveredDeleteButton, hoveredCell, hoveredWarningCell, resizeHandle, 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, ClassName.CONTROLS_FLOATING_BUTTON_ROW, insertRowButtonWrapper, DeleteButton, 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, stickyRowZIndex, "var(--ds-surface, white)", "var(--ds-shadow-overflow, ".concat("0 6px 4px -4px ".concat(N40A), ")"), ClassName.TABLE_STICKY, ClassName.TABLE_STICKY_SHADOW, stickyRowZIndex + 1, 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)", (_props$featureFlags = props.featureFlags) !== null && _props$featureFlags !== void 0 && _props$featureFlags.stickyHeadersOptimization ? sentinelStyles : '', OverflowShadow(props), 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, ClassName.NODEVIEW_WRAPPER, breakoutWidthStyling((_props$featureFlags$u = (_props$featureFlags2 = props.featureFlags) === null || _props$featureFlags2 === void 0 ? void 0 : _props$featureFlags2.useFragmentMarkBreakoutWidthStylingFix) !== null && _props$featureFlags$u !== void 0 ? _props$featureFlags$u : true), 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, "var(--ds-background-selected, ".concat(tableToolbarSelectedColor, ")"), ClassName.TABLE_CONTAINER, ClassName.CORNER_CONTROLS, ClassName.CONTROLS_CORNER_BUTTON, akEditorTableToolbarSize + akEditorTableNumberColumnWidth, ClassName.ROW_CONTROLS, ClassName.CONTROLS_BUTTON, ClassName.IS_RESIZING, ClassName.CONTROLS_CORNER_BUTTON, tableBorderSelectedColor, "var(--ds-background-selected, ".concat(tableToolbarSelectedColor, ")"), ClassName.IS_RESIZING, ClassName.CONTROLS_CORNER_BUTTON, ClassName.HOVERED_CELL_IN_DANGER, tableBorderDeleteColor, "var(--ds-background-danger, ".concat(tableToolbarDeleteColor, ")"), 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(), HeaderButtonDanger(), ClassName.NUMBERED_COLUMN, 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, ClassName.NUMBERED_COLUMN_BUTTON, ClassName.NUMBERED_COLUMN_BUTTON, tableBorderSelectedColor, tableBorderSelectedColor, "var(--ds-background-selected, ".concat(tableToolbarSelectedColor, ")"), akEditorUnitZIndex, "var(--ds-text-selected, ".concat(N0, ")"), ClassName.IS_RESIZING, ClassName.WITH_CONTROLS, ClassName.NUMBERED_COLUMN_BUTTON, ClassName.NUMBERED_COLUMN_BUTTON, tableBorderSelectedColor, tableBorderSelectedColor, "var(--ds-background-selected, ".concat(tableToolbarSelectedColor, ")"), akEditorUnitZIndex, "var(--ds-text-selected, ".concat(N0, ")"), ClassName.NUMBERED_COLUMN_BUTTON, ClassName.HOVERED_CELL_IN_DANGER, "var(--ds-background-danger, ".concat(tableToolbarDeleteColor, ")"), tableBorderDeleteColor, "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, ClassName.SELECTED_CELL, tableCellSelectedColor, akEditorSmallZIndex, ClassName.HOVERED_CELL_IN_DANGER, ClassName.HOVERED_CELL_IN_DANGER, tableCellDeleteColor, akEditorUnitZIndex * 100, ClassName.HOVERED_CELL, ClassName.SELECTED_CELL, tableBorderSelectedColor, akEditorSmallZIndex, ClassName.HOVERED_CELL_IN_DANGER, tableBorderDeleteColor, akEditorUnitZIndex * 100, ClassName.ROW_CONTROLS_WRAPPER, tableMarginTop - cornerControlHeight + 1, ClassName.ROW_CONTROLS_WRAPPER, ClassName.TABLE_LEFT_SHADOW, akEditorUnitZIndex, ClassName.ROW_CONTROLS_WRAPPER, tableToolbarSize, ClassName.TABLE_NODE_WRAPPER, insertColumnButtonOffset, insertColumnButtonOffset, ClassName.IS_RESIZING, ClassName.TABLE_NODE_WRAPPER, scrollbarStyles, ClassName.RESIZE_CURSOR, props !== null && props !== void 0 && (_props$featureFlags3 = props.featureFlags) !== null && _props$featureFlags3 !== void 0 && _props$featureFlags3.restartNumberedLists ? "" : listLargeNumericMarkersOldStyles, shadowSentinelStyles);
37
37
  };
38
38
  export var tableFullPageEditorStyles = css(_templateObject4 || (_templateObject4 = _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);
39
39
  export var tableCommentEditorStyles = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n .ProseMirror .", " > table {\n margin-left: 0;\n margin-right: 0;\n ", ";\n }\n"])), ClassName.TABLE_NODE_WRAPPER, scrollbarStyles);
@@ -14,6 +14,10 @@ export var tableCellBackgroundColor = themed({
14
14
  light: "var(--ds-surface, ".concat(N0, ")"),
15
15
  dark: "var(--ds-surface, ".concat(DN30, ")")
16
16
  });
17
+ export var tableHeaderCellBackgroundColor = themed({
18
+ light: "var(--ds-background-neutral, ".concat(akEditorTableToolbar, ")"),
19
+ dark: "var(--ds-background-neutral, ".concat(akEditorTableToolbarDark, ")")
20
+ });
17
21
  export var tableToolbarColor = themed({
18
22
  light: "var(--ds-background-neutral-subtle, ".concat(akEditorTableToolbar, ")"),
19
23
  dark: "var(--ds-background-neutral-subtle, ".concat(akEditorTableToolbarDark, ")")
@@ -23,8 +27,8 @@ export var tableTextColor = themed({
23
27
  dark: "var(--ds-text-subtlest, ".concat(DN400, ")")
24
28
  });
25
29
  export var tableBorderColor = themed({
26
- light: "var(--ds-border, ".concat(akEditorTableBorder, ")"),
27
- dark: "var(--ds-border, ".concat(akEditorTableBorderDark, ")")
30
+ light: "var(--ds-background-accent-gray-subtler, ".concat(akEditorTableBorder, ")"),
31
+ dark: "var(--ds-background-accent-gray-subtler, ".concat(akEditorTableBorderDark, ")")
28
32
  });
29
33
  export var tableFloatingControlsColor = "var(--ds-background-neutral, ".concat(N20, ")");
30
34
  // TODO: https://product-fabric.atlassian.net/browse/DSP-4461
@@ -4,7 +4,7 @@ import { css } from '@emotion/react';
4
4
  import { tableCellBorderWidth, tableMarginTop, tableMarginTopWithControl } from '@atlaskit/editor-common/styles';
5
5
  import { akEditorShadowZIndex, akEditorTableNumberColumnWidth, akEditorUnitZIndex } from '@atlaskit/editor-shared-styles';
6
6
  import { N40A, B300, N300, R300, N20A, N60A, N0, Y50, Y200 } from '@atlaskit/theme/colors';
7
- import { tableToolbarColor, tableBorderColor, tableToolbarSelectedColor, tableBorderSelectedColor, tableCellDeleteColor, tableBorderDeleteColor, tableToolbarDeleteColor, lineMarkerSize, columnControlsDecorationHeight, columnControlsZIndex, columnControlsSelectedZIndex, resizeHandlerAreaWidth, resizeLineWidth, resizeHandlerZIndex, tableToolbarSize, tableInsertColumnButtonSize, tableDeleteButtonSize } from './consts';
7
+ import { tableBorderColor, tableToolbarSelectedColor, tableHeaderCellBackgroundColor, tableBorderSelectedColor, tableCellDeleteColor, tableBorderDeleteColor, tableToolbarDeleteColor, lineMarkerSize, columnControlsDecorationHeight, columnControlsZIndex, columnControlsSelectedZIndex, resizeHandlerAreaWidth, resizeLineWidth, resizeHandlerZIndex, tableToolbarSize, tableInsertColumnButtonSize, tableDeleteButtonSize } from './consts';
8
8
  import { TableCssClassName as ClassName } from '../types';
9
9
  import { borderRadius } from '@atlaskit/theme/constants';
10
10
  var InsertLine = function InsertLine(cssString) {
@@ -20,7 +20,7 @@ var Button = function Button(cssString) {
20
20
  return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n border-radius: ", "px;\n border-width: 0px;\n display: inline-flex;\n max-width: 100%;\n text-align: center;\n margin: 0px;\n padding: 0px;\n text-decoration: none;\n transition: background 0.1s ease-out 0s,\n box-shadow 0.15s cubic-bezier(0.47, 0.03, 0.49, 1.38) 0s;\n outline: none !important;\n cursor: none;\n\n > .", " {\n display: inline-flex;\n max-height: 100%;\n max-width: 100%;\n }\n ", "\n"])), borderRadius(), ClassName.CONTROLS_BUTTON_ICON, cssString);
21
21
  };
22
22
  export var HeaderButton = function HeaderButton(props, cssString) {
23
- return css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n .", " {\n background: ", ";\n border: 1px solid ", ";\n display: block;\n box-sizing: border-box;\n padding: 0;\n\n :focus {\n outline: none;\n }\n ", "\n }\n\n .", "::after {\n content: ' ';\n background-color: transparent;\n left: -15px;\n top: 0;\n position: absolute;\n width: 15px;\n height: 100%;\n z-index: 1;\n }\n\n .active .", " {\n color: ", ";\n background-color: ", ";\n border-color: ", ";\n }\n"])), ClassName.CONTROLS_BUTTON, tableToolbarColor(props), tableBorderColor(props), cssString, ClassName.ROW_CONTROLS_BUTTON, ClassName.CONTROLS_BUTTON, "var(--ds-icon-inverse, ".concat(N0, ")"), "var(--ds-background-selected, ".concat(tableToolbarSelectedColor, ")"), tableBorderSelectedColor);
23
+ return css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n .", " {\n background: ", ";\n border: 1px solid ", ";\n display: block;\n box-sizing: border-box;\n padding: 0;\n\n :focus {\n outline: none;\n }\n ", "\n }\n\n .", "::after {\n content: ' ';\n background-color: transparent;\n left: -15px;\n top: 0;\n position: absolute;\n width: 15px;\n height: 100%;\n z-index: 1;\n }\n\n .active .", " {\n color: ", ";\n background-color: ", ";\n border-color: ", ";\n }\n"])), ClassName.CONTROLS_BUTTON, tableHeaderCellBackgroundColor(props), tableBorderColor(props), cssString, ClassName.ROW_CONTROLS_BUTTON, ClassName.CONTROLS_BUTTON, "var(--ds-icon-inverse, ".concat(N0, ")"), "var(--ds-background-selected, ".concat(tableToolbarSelectedColor, ")"), tableBorderSelectedColor);
24
24
  };
25
25
  export var HeaderButtonHover = function HeaderButtonHover() {
26
26
  return css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n .", ":hover {\n color: ", ";\n background-color: ", ";\n border-color: ", ";\n cursor: pointer;\n }\n"])), ClassName.CONTROLS_BUTTON, "var(--ds-icon-inverse, ".concat(N0, ")"), "var(--ds-background-selected, ".concat(tableToolbarSelectedColor, ")"), tableBorderSelectedColor);
@@ -44,7 +44,7 @@ export var OverflowShadow = function OverflowShadow(props) {
44
44
  return css(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n .", ", .", " {\n display: block;\n height: calc(100% - ", "px);\n position: absolute;\n pointer-events: none;\n top: ", "px;\n z-index: ", ";\n width: 8px;\n }\n .", " {\n background: linear-gradient(\n to left,\n transparent 0,\n ", " 100%\n ),\n linear-gradient(\n to right,\n ", " 0px,\n transparent 1px\n );\n left: 0px;\n }\n .", "[data-number-column='true'] > :not(.", ").", " {\n left: ", "px;\n }\n .", " {\n background: linear-gradient(\n to right,\n transparent 0,\n ", " 100%\n ),\n linear-gradient(\n to left,\n ", " 0px,\n transparent 1px\n );\n left: calc(100% + 2px);\n }\n .", " {\n z-index: 0;\n }\n .", " {\n .", ", .", " {\n height: calc(100% - ", "px);\n top: ", "px;\n }\n .", " {\n border-left: 1px solid ", ";\n }\n }\n"])), ClassName.TABLE_RIGHT_SHADOW, ClassName.TABLE_LEFT_SHADOW, tableMarginTop, tableMarginTop, akEditorShadowZIndex, ClassName.TABLE_LEFT_SHADOW, "var(--ds-shadow-overflow-spread, ".concat(N40A, ")"), "var(--ds-shadow-overflow-perimeter, transparent)", ClassName.TABLE_CONTAINER, ClassName.TABLE_STICKY_SHADOW, ClassName.TABLE_LEFT_SHADOW, akEditorTableNumberColumnWidth - 1, ClassName.TABLE_RIGHT_SHADOW, "var(--ds-shadow-overflow-spread, ".concat(N40A, ")"), "var(--ds-shadow-overflow-perimeter, transparent)", ClassName.TABLE_COLUMN_CONTROLS_DECORATIONS, ClassName.WITH_CONTROLS, ClassName.TABLE_RIGHT_SHADOW, ClassName.TABLE_LEFT_SHADOW, tableMarginTopWithControl, tableMarginTopWithControl, ClassName.TABLE_LEFT_SHADOW, tableBorderColor(props));
45
45
  };
46
46
  var columnHeaderButton = function columnHeaderButton(props, cssString) {
47
- return css(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n background: ", ";\n border: 1px solid ", ";\n display: block;\n box-sizing: border-box;\n padding: 0;\n\n :focus {\n outline: none;\n }\n\n ", "\n"])), tableToolbarColor(props), tableBorderColor(props), cssString);
47
+ return css(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n background: ", ";\n border: 1px solid ", ";\n display: block;\n box-sizing: border-box;\n padding: 0;\n\n :focus {\n outline: none;\n }\n\n ", "\n"])), tableHeaderCellBackgroundColor(props), tableBorderColor(props), cssString);
48
48
  };
49
49
  var columnHeaderButtonSelected = css(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n color: ", ";\n background-color: ", ";\n border-color: ", ";\n z-index: ", ";\n"])), "var(--ds-text-inverse, ".concat(N0, ")"), "var(--ds-background-selected, ".concat(tableToolbarSelectedColor, ")"), tableBorderSelectedColor, columnControlsSelectedZIndex);
50
50
  export var columnControlsDecoration = function columnControlsDecoration(props) {