@atlaskit/editor-plugin-table 2.9.0 → 2.10.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 (104) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/cjs/plugins/table/event-handlers.js +52 -56
  3. package/dist/cjs/plugins/table/nodeviews/TableComponent.js +19 -69
  4. package/dist/cjs/plugins/table/nodeviews/TableContainer.js +9 -0
  5. package/dist/cjs/plugins/table/nodeviews/TableResizer.js +19 -4
  6. package/dist/cjs/plugins/table/nodeviews/table.js +23 -30
  7. package/dist/cjs/plugins/table/nodeviews/tableCell.js +3 -6
  8. package/dist/cjs/plugins/table/nodeviews/update-overflow-shadows.js +2 -40
  9. package/dist/cjs/plugins/table/pm-plugins/main.js +3 -3
  10. package/dist/cjs/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +2 -73
  11. package/dist/cjs/plugins/table/pm-plugins/sticky-headers/plugin.js +1 -1
  12. package/dist/cjs/plugins/table/pm-plugins/table-resizing/event-handlers.js +1 -1
  13. package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/dom.js +1 -5
  14. package/dist/cjs/plugins/table/ui/TableFloatingControls/index.js +3 -7
  15. package/dist/cjs/plugins/table/ui/common-styles.js +2 -2
  16. package/dist/cjs/plugins/table/utils/dom.js +5 -12
  17. package/dist/es2019/plugins/table/event-handlers.js +3 -6
  18. package/dist/es2019/plugins/table/nodeviews/TableComponent.js +18 -69
  19. package/dist/es2019/plugins/table/nodeviews/TableContainer.js +9 -0
  20. package/dist/es2019/plugins/table/nodeviews/TableResizer.js +19 -4
  21. package/dist/es2019/plugins/table/nodeviews/table.js +24 -32
  22. package/dist/es2019/plugins/table/nodeviews/tableCell.js +3 -7
  23. package/dist/es2019/plugins/table/nodeviews/update-overflow-shadows.js +0 -35
  24. package/dist/es2019/plugins/table/pm-plugins/main.js +3 -4
  25. package/dist/es2019/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +2 -77
  26. package/dist/es2019/plugins/table/pm-plugins/sticky-headers/plugin.js +1 -1
  27. package/dist/es2019/plugins/table/pm-plugins/table-resizing/event-handlers.js +1 -1
  28. package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/dom.js +1 -5
  29. package/dist/es2019/plugins/table/ui/TableFloatingControls/index.js +3 -9
  30. package/dist/es2019/plugins/table/ui/common-styles.js +3 -3
  31. package/dist/es2019/plugins/table/utils/dom.js +5 -12
  32. package/dist/esm/plugins/table/event-handlers.js +52 -56
  33. package/dist/esm/plugins/table/nodeviews/TableComponent.js +19 -69
  34. package/dist/esm/plugins/table/nodeviews/TableContainer.js +9 -0
  35. package/dist/esm/plugins/table/nodeviews/TableResizer.js +19 -4
  36. package/dist/esm/plugins/table/nodeviews/table.js +23 -30
  37. package/dist/esm/plugins/table/nodeviews/tableCell.js +3 -6
  38. package/dist/esm/plugins/table/nodeviews/update-overflow-shadows.js +0 -37
  39. package/dist/esm/plugins/table/pm-plugins/main.js +3 -3
  40. package/dist/esm/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +2 -73
  41. package/dist/esm/plugins/table/pm-plugins/sticky-headers/plugin.js +1 -1
  42. package/dist/esm/plugins/table/pm-plugins/table-resizing/event-handlers.js +1 -1
  43. package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/dom.js +1 -5
  44. package/dist/esm/plugins/table/ui/TableFloatingControls/index.js +3 -7
  45. package/dist/esm/plugins/table/ui/common-styles.js +2 -2
  46. package/dist/esm/plugins/table/utils/dom.js +5 -12
  47. package/dist/types/plugins/table/event-handlers.d.ts +1 -2
  48. package/dist/types/plugins/table/nodeviews/TableComponent.d.ts +0 -2
  49. package/dist/types/plugins/table/nodeviews/TableContainer.d.ts +6 -5
  50. package/dist/types/plugins/table/nodeviews/TableResizer.d.ts +2 -1
  51. package/dist/types/plugins/table/nodeviews/table.d.ts +0 -1
  52. package/dist/types/plugins/table/nodeviews/tableCell.d.ts +2 -3
  53. package/dist/types/plugins/table/nodeviews/types.d.ts +0 -1
  54. package/dist/types/plugins/table/nodeviews/update-overflow-shadows.d.ts +0 -6
  55. package/dist/types/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.d.ts +1 -6
  56. package/dist/types/plugins/table/pm-plugins/table-resizing/utils/dom.d.ts +1 -2
  57. package/dist/types/plugins/table/types.d.ts +2 -2
  58. package/dist/types/plugins/table/ui/TableFloatingControls/index.d.ts +0 -1
  59. package/dist/types/plugins/table/utils/dom.d.ts +1 -1
  60. package/dist/types-ts4.5/plugins/table/event-handlers.d.ts +1 -2
  61. package/dist/types-ts4.5/plugins/table/nodeviews/TableComponent.d.ts +0 -2
  62. package/dist/types-ts4.5/plugins/table/nodeviews/TableContainer.d.ts +6 -5
  63. package/dist/types-ts4.5/plugins/table/nodeviews/TableResizer.d.ts +2 -1
  64. package/dist/types-ts4.5/plugins/table/nodeviews/table.d.ts +0 -1
  65. package/dist/types-ts4.5/plugins/table/nodeviews/tableCell.d.ts +2 -3
  66. package/dist/types-ts4.5/plugins/table/nodeviews/types.d.ts +0 -1
  67. package/dist/types-ts4.5/plugins/table/nodeviews/update-overflow-shadows.d.ts +0 -6
  68. package/dist/types-ts4.5/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.d.ts +1 -6
  69. package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/utils/dom.d.ts +1 -2
  70. package/dist/types-ts4.5/plugins/table/types.d.ts +2 -2
  71. package/dist/types-ts4.5/plugins/table/ui/TableFloatingControls/index.d.ts +0 -1
  72. package/dist/types-ts4.5/plugins/table/utils/dom.d.ts +1 -1
  73. package/package.json +2 -2
  74. package/report.api.md +2 -0
  75. package/src/__tests__/integration/horizontal-scroll-shadows.ts +6 -9
  76. package/src/__tests__/integration/resize.ts +6 -16
  77. package/src/__tests__/unit/event-handlers.ts +1 -4
  78. package/src/__tests__/unit/nodeviews/TableComponent.tsx +48 -92
  79. package/src/__tests__/unit/nodeviews/cell.ts +1 -3
  80. package/src/__tests__/unit/nodeviews/table.ts +71 -83
  81. package/src/__tests__/unit/pm-plugins/sticky-headers/tableRow.tsx +5 -9
  82. package/src/__tests__/unit/ui/RowControls.tsx +1 -0
  83. package/src/__tests__/unit/utils/dom.ts +6 -112
  84. package/src/plugins/table/event-handlers.ts +72 -79
  85. package/src/plugins/table/nodeviews/TableComponent.tsx +37 -114
  86. package/src/plugins/table/nodeviews/TableContainer.tsx +17 -11
  87. package/src/plugins/table/nodeviews/TableResizer.tsx +34 -4
  88. package/src/plugins/table/nodeviews/table.tsx +22 -30
  89. package/src/plugins/table/nodeviews/tableCell.tsx +3 -11
  90. package/src/plugins/table/nodeviews/types.ts +0 -1
  91. package/src/plugins/table/nodeviews/update-overflow-shadows.ts +0 -54
  92. package/src/plugins/table/pm-plugins/main.ts +4 -22
  93. package/src/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.ts +1 -83
  94. package/src/plugins/table/pm-plugins/sticky-headers/plugin.ts +1 -7
  95. package/src/plugins/table/pm-plugins/table-resizing/event-handlers.ts +1 -1
  96. package/src/plugins/table/pm-plugins/table-resizing/utils/dom.ts +30 -48
  97. package/src/plugins/table/types.ts +3 -2
  98. package/src/plugins/table/ui/TableFloatingControls/index.tsx +3 -15
  99. package/src/plugins/table/ui/common-styles.ts +1 -1
  100. package/src/plugins/table/utils/dom.ts +3 -11
  101. package/tmp/api-report-tmp.d.ts +2 -0
  102. package/dist/cjs/version.json +0 -5
  103. package/dist/es2019/version.json +0 -5
  104. package/dist/esm/version.json +0 -5
@@ -64,9 +64,7 @@ var TableFloatingControls = /*#__PURE__*/function (_Component) {
64
64
  var _window,
65
65
  _this2 = this;
66
66
  var tableRef = this.props.tableRef;
67
- var _this$props$getEditor = this.props.getEditorFeatureFlags(),
68
- tableRenderOptimization = _this$props$getEditor.tableRenderOptimization;
69
- if (tableRenderOptimization && tableRef && !this.resizeObserver && (_window = window) !== null && _window !== void 0 && _window.ResizeObserver) {
67
+ if (tableRef && !this.resizeObserver && (_window = window) !== null && _window !== void 0 && _window.ResizeObserver) {
70
68
  this.resizeObserver = new ResizeObserver(function (entries) {
71
69
  var _iterator = _createForOfIteratorHelper(entries),
72
70
  _step;
@@ -104,10 +102,8 @@ var TableFloatingControls = /*#__PURE__*/function (_Component) {
104
102
  ordering = _this$props.ordering,
105
103
  headerRowHeight = _this$props.headerRowHeight,
106
104
  stickyHeader = _this$props.stickyHeader;
107
- var _this$props$getEditor2 = this.props.getEditorFeatureFlags(),
108
- tableRenderOptimization = _this$props$getEditor2.tableRenderOptimization;
109
- var tableHeight = tableRenderOptimization ? (_this$state = this.state) === null || _this$state === void 0 ? void 0 : _this$state.tableHeight : this.props.tableHeight;
110
- var nextTableHeight = tableRenderOptimization ? nextState === null || nextState === void 0 ? void 0 : nextState.tableHeight : nextProps.tableHeight;
105
+ var tableHeight = (_this$state = this.state) === null || _this$state === void 0 ? void 0 : _this$state.tableHeight;
106
+ var nextTableHeight = nextState === null || nextState === void 0 ? void 0 : nextState.tableHeight;
111
107
  return ordering !== nextProps.ordering || tableRef !== nextProps.tableRef || tableHeight !== nextTableHeight || tableActive !== nextProps.tableActive || isInDanger !== nextProps.isInDanger || isResizing !== nextProps.isResizing || hoveredRows !== nextProps.hoveredRows || isHeaderRowEnabled !== nextProps.isHeaderRowEnabled || isHeaderColumnEnabled !== nextProps.isHeaderColumnEnabled || isNumberColumnEnabled !== nextProps.isNumberColumnEnabled || isSelectionUpdated(selection, nextProps.selection) || headerRowHeight !== nextProps.headerRowHeight || stickyHeader !== nextProps.stickyHeader;
112
108
  }
113
109
  }, {
@@ -37,8 +37,8 @@ var tableWrapperStyles = function tableWrapperStyles() {
37
37
 
38
38
  // TODO: https://product-fabric.atlassian.net/browse/DSP-4139
39
39
  export var tableStyles = function tableStyles(props) {
40
- var _props$featureFlags, _props$featureFlags2;
41
- 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 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 /* 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)", (_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(), 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, 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, 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(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$featureFlags2 = props.featureFlags) !== null && _props$featureFlags2 !== void 0 && _props$featureFlags2.restartNumberedLists ? "" : listLargeNumericMarkersOldStyles, shadowSentinelStyles);
40
+ var _props$featureFlags;
41
+ 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 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 /* 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), 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(), 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, 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, 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(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);
42
42
  };
43
43
  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);
44
44
  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);
@@ -84,22 +84,15 @@ export var isTableContainerOrWrapper = function isTableContainerOrWrapper(node)
84
84
  * the same is valid to the right side.
85
85
  */
86
86
 
87
- export var getMousePositionHorizontalRelativeByElement = function getMousePositionHorizontalRelativeByElement(mouseEvent, mouseMoveOptimization, elementContentRects, gapInPixels) {
87
+ export var getMousePositionHorizontalRelativeByElement = function getMousePositionHorizontalRelativeByElement(mouseEvent, elementContentRects, gapInPixels) {
88
88
  var element = mouseEvent.target;
89
89
  if (element instanceof HTMLElement) {
90
+ var _closestCell$id, _elementContentRects$, _elementContentRects$2;
90
91
  var width, x;
91
92
  var closestCell = element.closest(SELECTOR_TABLE_LEAFS);
92
- if (mouseMoveOptimization) {
93
- var _closestCell$id, _elementContentRects$, _elementContentRects$2;
94
- var id = (_closestCell$id = closestCell === null || closestCell === void 0 ? void 0 : closestCell.id) !== null && _closestCell$id !== void 0 ? _closestCell$id : '';
95
- width = (_elementContentRects$ = elementContentRects === null || elementContentRects === void 0 ? void 0 : (_elementContentRects$2 = elementContentRects[id]) === null || _elementContentRects$2 === void 0 ? void 0 : _elementContentRects$2.width) !== null && _elementContentRects$ !== void 0 ? _elementContentRects$ : 0;
96
- x = mouseEvent.offsetX;
97
- } else {
98
- var elementRect = element.getBoundingClientRect();
99
- width = elementRect.width;
100
- var left = elementRect.left;
101
- x = mouseEvent.clientX - left;
102
- }
93
+ var id = (_closestCell$id = closestCell === null || closestCell === void 0 ? void 0 : closestCell.id) !== null && _closestCell$id !== void 0 ? _closestCell$id : '';
94
+ width = (_elementContentRects$ = elementContentRects === null || elementContentRects === void 0 ? void 0 : (_elementContentRects$2 = elementContentRects[id]) === null || _elementContentRects$2 === void 0 ? void 0 : _elementContentRects$2.width) !== null && _elementContentRects$ !== void 0 ? _elementContentRects$ : 0;
95
+ x = mouseEvent.offsetX;
103
96
  if (width <= 0) {
104
97
  return null;
105
98
  }
@@ -1,5 +1,4 @@
1
1
  import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
2
- import type { GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
3
2
  import { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
4
3
  import { EditorView } from '@atlaskit/editor-prosemirror/view';
5
4
  import { ElementContentRects } from './types';
@@ -10,7 +9,7 @@ export declare const handleMouseOver: (view: EditorView, mouseEvent: Event) => b
10
9
  export declare const handleMouseDown: (_: EditorView, event: Event) => boolean;
11
10
  export declare const handleMouseOut: (view: EditorView, mouseEvent: Event) => boolean;
12
11
  export declare const handleMouseLeave: (view: EditorView, event: Event) => boolean;
13
- export declare const handleMouseMove: (getEditorFeatureFlags: GetEditorFeatureFlags) => (view: EditorView, event: Event, elementContentRects?: ElementContentRects) => boolean;
12
+ export declare const handleMouseMove: (view: EditorView, event: Event, elementContentRects?: ElementContentRects) => boolean;
14
13
  export declare function handleTripleClick(view: EditorView, pos: number): boolean;
15
14
  export declare const handleCut: (oldTr: Transaction, oldState: EditorState, newState: EditorState, editorAnalyticsAPI?: EditorAnalyticsAPI) => Transaction;
16
15
  export declare const whenTableInFocus: (eventHandler: (view: EditorView, mouseEvent: Event, elementContentRects?: ElementContentRects) => boolean, elementContentRects?: ElementContentRects) => (view: EditorView, mouseEvent: Event) => boolean;
@@ -30,7 +30,6 @@ export interface ComponentProps {
30
30
  interface TableState {
31
31
  scroll: number;
32
32
  parentWidth?: number;
33
- isLoading: boolean;
34
33
  stickyHeader?: RowStickyState;
35
34
  [ShadowEvent.SHOW_BEFORE_SHADOW]: boolean;
36
35
  [ShadowEvent.SHOW_AFTER_SHADOW]: boolean;
@@ -48,7 +47,6 @@ declare class TableComponent extends React.Component<ComponentProps, TableState>
48
47
  componentDidMount(): void;
49
48
  componentWillUnmount(): void;
50
49
  componentDidUpdate(): void;
51
- private updateShadows;
52
50
  private updateShadowState;
53
51
  private createShadowSentinels;
54
52
  onStickyState: (state: StickyPluginState) => void;
@@ -1,8 +1,9 @@
1
- import React, { PropsWithChildren } from 'react';
2
- import { EditorContainerWidth } from '@atlaskit/editor-common/types';
3
- import { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
4
- import { EditorView } from '@atlaskit/editor-prosemirror/view';
5
- import { PluginInjectionAPI } from '../types';
1
+ import type { PropsWithChildren } from 'react';
2
+ import React from 'react';
3
+ import type { EditorContainerWidth } from '@atlaskit/editor-common/types';
4
+ import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
5
+ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
6
+ import type { PluginInjectionAPI } from '../types';
6
7
  type InnerContainerProps = {
7
8
  className: string;
8
9
  style?: {
@@ -7,6 +7,7 @@ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
7
7
  interface TableResizerProps {
8
8
  width: number;
9
9
  maxWidth: number;
10
+ containerWidth: number;
10
11
  updateWidth: (width: number) => void;
11
12
  editorView: EditorView;
12
13
  getPos: () => number | undefined;
@@ -15,5 +16,5 @@ interface TableResizerProps {
15
16
  displayGuideline: (guideline: GuidelineConfig[]) => boolean;
16
17
  attachAnalyticsEvent: (payload: TableEventPayload) => ((tr: Transaction) => boolean) | undefined;
17
18
  }
18
- export declare const TableResizer: ({ children, width, maxWidth, updateWidth, editorView, getPos, node, tableRef, displayGuideline, attachAnalyticsEvent, }: PropsWithChildren<TableResizerProps>) => JSX.Element;
19
+ export declare const TableResizer: ({ children, width, maxWidth, containerWidth, updateWidth, editorView, getPos, node, tableRef, displayGuideline, attachAnalyticsEvent, }: PropsWithChildren<TableResizerProps>) => JSX.Element;
19
20
  export {};
@@ -11,7 +11,6 @@ type ForwardRef = (node: HTMLElement | null) => void;
11
11
  export default class TableView extends ReactNodeView<Props> {
12
12
  private table;
13
13
  private resizeObserver?;
14
- private tableRenderOptimization?;
15
14
  eventDispatcher?: EventDispatcher;
16
15
  getPos: getPosHandlerNode;
17
16
  constructor(props: Props);
@@ -1,5 +1,5 @@
1
1
  import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
2
- import type { GetEditorFeatureFlags, getPosHandler } from '@atlaskit/editor-common/types';
2
+ import type { getPosHandler } from '@atlaskit/editor-common/types';
3
3
  import { Node } from '@atlaskit/editor-prosemirror/model';
4
4
  import { EditorView, NodeView } from '@atlaskit/editor-prosemirror/view';
5
5
  export default class TableCellNodeView implements NodeView {
@@ -10,8 +10,7 @@ export default class TableCellNodeView implements NodeView {
10
10
  view: EditorView;
11
11
  providerFactory?: ProviderFactory;
12
12
  observer?: ResizeObserver;
13
- mouseMoveOptimization?: boolean;
14
- constructor(node: Node, view: EditorView, getPos: any, getEditorFeatureFlags: GetEditorFeatureFlags, observer?: ResizeObserver);
13
+ constructor(node: Node, view: EditorView, getPos: any, observer?: ResizeObserver);
15
14
  private updateNodeView;
16
15
  update(node: Node): boolean;
17
16
  destroy(): void;
@@ -19,7 +19,6 @@ export interface Props {
19
19
  eventDispatcher: EventDispatcher;
20
20
  getPos: () => number | undefined;
21
21
  options?: TableOptions;
22
- tableRenderOptimization?: boolean;
23
22
  getEditorContainerWidth: GetEditorContainerWidth;
24
23
  getEditorFeatureFlags: GetEditorFeatureFlags;
25
24
  hasIntlContext: boolean;
@@ -1,7 +1 @@
1
- import type { GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
2
1
  export declare const updateShadowListForStickyStyles: (heightStyle: string, shadows: HTMLCollection) => void;
3
- /**
4
- * Update overflow shadows for a given wrapper & table.
5
- * if `overflowShadowOptimization` is enabled, this will exit early.
6
- */
7
- export declare const updateOverflowShadows: (getEditorFeatureFlags: GetEditorFeatureFlags) => (wrapper?: HTMLElement | null, table?: HTMLElement | null, rightShadows?: NodeListOf<HTMLElement> | null, leftShadows?: NodeListOf<HTMLElement> | null) => false | undefined;
@@ -1,6 +1,5 @@
1
1
  /// <reference types="lodash" />
2
2
  import { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
3
- import type { GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
4
3
  import { Node as PmNode } from '@atlaskit/editor-prosemirror/model';
5
4
  import { EditorView, NodeView } from '@atlaskit/editor-prosemirror/view';
6
5
  import { TablePluginState } from '../../../types';
@@ -30,11 +29,10 @@ export declare class TableRowNodeView implements NodeView {
30
29
  lastTimePainted: number;
31
30
  private intersectionObserver?;
32
31
  private resizeObserver?;
33
- private stickyHeadersOptimization;
34
32
  private sentinels;
35
33
  private stickyRowHeight?;
36
34
  get tree(): TableDOMElements | null | undefined;
37
- constructor(node: PmNode, view: EditorView, getPos: any, eventDispatcher: EventDispatcher, getEditorFeatureFlags: GetEditorFeatureFlags);
35
+ constructor(node: PmNode, view: EditorView, getPos: any, eventDispatcher: EventDispatcher);
38
36
  listening: boolean;
39
37
  headerRowMouseScrollEnd: import("lodash").DebouncedFunc<() => void>;
40
38
  headerRowMouseScroll: import("lodash").DebouncedFunc<() => void>;
@@ -47,9 +45,6 @@ export declare class TableRowNodeView implements NodeView {
47
45
  previousPadding: number | undefined;
48
46
  latestDomTop: number | undefined;
49
47
  nextFrame: number | undefined;
50
- onScroll: () => void;
51
- loop: () => void;
52
- paint: (tree: TableDOMElements) => void;
53
48
  update(node: PmNode, ..._args: any[]): boolean;
54
49
  destroy(): void;
55
50
  ignoreMutation(mutationRecord: MutationRecord | {
@@ -1,7 +1,6 @@
1
- import type { GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
2
1
  import { EditorState } from '@atlaskit/editor-prosemirror/state';
3
2
  import { EditorView } from '@atlaskit/editor-prosemirror/view';
4
- export declare const updateControls: (getEditorFeatureFlags: GetEditorFeatureFlags) => (state: EditorState) => void;
3
+ export declare const updateControls: () => (state: EditorState) => void;
5
4
  export declare const isClickNear: (event: MouseEvent, click: {
6
5
  x: number;
7
6
  y: number;
@@ -38,13 +38,14 @@ export interface PluginConfig {
38
38
  permittedLayouts?: PermittedLayoutsDescriptor;
39
39
  allowControls?: boolean;
40
40
  stickyHeaders?: boolean;
41
+ allowCellOptionsInFloatingToolbar?: boolean;
42
+ allowDistributeColumns?: boolean;
41
43
  tableCellOptimization?: boolean;
42
44
  tableRenderOptimization?: boolean;
43
45
  stickyHeadersOptimization?: boolean;
44
46
  initialRenderOptimization?: boolean;
45
47
  mouseMoveOptimization?: boolean;
46
48
  tableOverflowShadowsOptimization?: boolean;
47
- allowDistributeColumns?: boolean;
48
49
  }
49
50
  export type { ColumnResizingPluginState } from '@atlaskit/editor-common/types';
50
51
  export type CellColumnPositioning = Pick<Rect, 'right' | 'left'>;
@@ -70,7 +71,6 @@ export interface TablePluginState {
70
71
  ordering?: TableColumnOrdering;
71
72
  resizeHandleRowIndex?: number;
72
73
  resizeHandleColumnIndex?: number;
73
- tableCellOptimization?: boolean;
74
74
  isTableCollapsed?: boolean;
75
75
  canCollapseTable?: boolean;
76
76
  }
@@ -16,7 +16,6 @@ export interface Props {
16
16
  isHeaderColumnEnabled?: boolean;
17
17
  isNumberColumnEnabled?: boolean;
18
18
  hasHeaderRow?: boolean;
19
- tableHeight?: number;
20
19
  headerRowHeight?: number;
21
20
  hoveredRows?: number[];
22
21
  ordering?: TableColumnOrdering;
@@ -8,7 +8,7 @@ export declare const isRowControlsButton: (node: HTMLElement | null) => boolean;
8
8
  export declare const isResizeHandleDecoration: (node: HTMLElement | null) => boolean;
9
9
  export declare const isTableControlsButton: (node: HTMLElement | null) => boolean;
10
10
  export declare const isTableContainerOrWrapper: (node: HTMLElement | null) => boolean;
11
- export declare const getMousePositionHorizontalRelativeByElement: (mouseEvent: MouseEvent, mouseMoveOptimization?: boolean, elementContentRects?: ElementContentRects, gapInPixels?: number) => 'left' | 'right' | null;
11
+ export declare const getMousePositionHorizontalRelativeByElement: (mouseEvent: MouseEvent, elementContentRects?: ElementContentRects, gapInPixels?: number) => 'left' | 'right' | null;
12
12
  export declare const getMousePositionVerticalRelativeByElement: (mouseEvent: MouseEvent) => 'top' | 'bottom' | null;
13
13
  export declare const updateResizeHandles: (tableRef?: HTMLElement) => void;
14
14
  export declare const hasResizeHandler: ({ columnEndIndexTarget, target, }: {
@@ -1,5 +1,4 @@
1
1
  import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
2
- import type { GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
3
2
  import { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
4
3
  import { EditorView } from '@atlaskit/editor-prosemirror/view';
5
4
  import { ElementContentRects } from './types';
@@ -10,7 +9,7 @@ export declare const handleMouseOver: (view: EditorView, mouseEvent: Event) => b
10
9
  export declare const handleMouseDown: (_: EditorView, event: Event) => boolean;
11
10
  export declare const handleMouseOut: (view: EditorView, mouseEvent: Event) => boolean;
12
11
  export declare const handleMouseLeave: (view: EditorView, event: Event) => boolean;
13
- export declare const handleMouseMove: (getEditorFeatureFlags: GetEditorFeatureFlags) => (view: EditorView, event: Event, elementContentRects?: ElementContentRects) => boolean;
12
+ export declare const handleMouseMove: (view: EditorView, event: Event, elementContentRects?: ElementContentRects) => boolean;
14
13
  export declare function handleTripleClick(view: EditorView, pos: number): boolean;
15
14
  export declare const handleCut: (oldTr: Transaction, oldState: EditorState, newState: EditorState, editorAnalyticsAPI?: EditorAnalyticsAPI) => Transaction;
16
15
  export declare const whenTableInFocus: (eventHandler: (view: EditorView, mouseEvent: Event, elementContentRects?: ElementContentRects) => boolean, elementContentRects?: ElementContentRects) => (view: EditorView, mouseEvent: Event) => boolean;
@@ -30,7 +30,6 @@ export interface ComponentProps {
30
30
  interface TableState {
31
31
  scroll: number;
32
32
  parentWidth?: number;
33
- isLoading: boolean;
34
33
  stickyHeader?: RowStickyState;
35
34
  [ShadowEvent.SHOW_BEFORE_SHADOW]: boolean;
36
35
  [ShadowEvent.SHOW_AFTER_SHADOW]: boolean;
@@ -48,7 +47,6 @@ declare class TableComponent extends React.Component<ComponentProps, TableState>
48
47
  componentDidMount(): void;
49
48
  componentWillUnmount(): void;
50
49
  componentDidUpdate(): void;
51
- private updateShadows;
52
50
  private updateShadowState;
53
51
  private createShadowSentinels;
54
52
  onStickyState: (state: StickyPluginState) => void;
@@ -1,8 +1,9 @@
1
- import React, { PropsWithChildren } from 'react';
2
- import { EditorContainerWidth } from '@atlaskit/editor-common/types';
3
- import { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
4
- import { EditorView } from '@atlaskit/editor-prosemirror/view';
5
- import { PluginInjectionAPI } from '../types';
1
+ import type { PropsWithChildren } from 'react';
2
+ import React from 'react';
3
+ import type { EditorContainerWidth } from '@atlaskit/editor-common/types';
4
+ import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
5
+ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
6
+ import type { PluginInjectionAPI } from '../types';
6
7
  type InnerContainerProps = {
7
8
  className: string;
8
9
  style?: {
@@ -7,6 +7,7 @@ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
7
7
  interface TableResizerProps {
8
8
  width: number;
9
9
  maxWidth: number;
10
+ containerWidth: number;
10
11
  updateWidth: (width: number) => void;
11
12
  editorView: EditorView;
12
13
  getPos: () => number | undefined;
@@ -15,5 +16,5 @@ interface TableResizerProps {
15
16
  displayGuideline: (guideline: GuidelineConfig[]) => boolean;
16
17
  attachAnalyticsEvent: (payload: TableEventPayload) => ((tr: Transaction) => boolean) | undefined;
17
18
  }
18
- export declare const TableResizer: ({ children, width, maxWidth, updateWidth, editorView, getPos, node, tableRef, displayGuideline, attachAnalyticsEvent, }: PropsWithChildren<TableResizerProps>) => JSX.Element;
19
+ export declare const TableResizer: ({ children, width, maxWidth, containerWidth, updateWidth, editorView, getPos, node, tableRef, displayGuideline, attachAnalyticsEvent, }: PropsWithChildren<TableResizerProps>) => JSX.Element;
19
20
  export {};
@@ -11,7 +11,6 @@ type ForwardRef = (node: HTMLElement | null) => void;
11
11
  export default class TableView extends ReactNodeView<Props> {
12
12
  private table;
13
13
  private resizeObserver?;
14
- private tableRenderOptimization?;
15
14
  eventDispatcher?: EventDispatcher;
16
15
  getPos: getPosHandlerNode;
17
16
  constructor(props: Props);
@@ -1,5 +1,5 @@
1
1
  import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
2
- import type { GetEditorFeatureFlags, getPosHandler } from '@atlaskit/editor-common/types';
2
+ import type { getPosHandler } from '@atlaskit/editor-common/types';
3
3
  import { Node } from '@atlaskit/editor-prosemirror/model';
4
4
  import { EditorView, NodeView } from '@atlaskit/editor-prosemirror/view';
5
5
  export default class TableCellNodeView implements NodeView {
@@ -10,8 +10,7 @@ export default class TableCellNodeView implements NodeView {
10
10
  view: EditorView;
11
11
  providerFactory?: ProviderFactory;
12
12
  observer?: ResizeObserver;
13
- mouseMoveOptimization?: boolean;
14
- constructor(node: Node, view: EditorView, getPos: any, getEditorFeatureFlags: GetEditorFeatureFlags, observer?: ResizeObserver);
13
+ constructor(node: Node, view: EditorView, getPos: any, observer?: ResizeObserver);
15
14
  private updateNodeView;
16
15
  update(node: Node): boolean;
17
16
  destroy(): void;
@@ -19,7 +19,6 @@ export interface Props {
19
19
  eventDispatcher: EventDispatcher;
20
20
  getPos: () => number | undefined;
21
21
  options?: TableOptions;
22
- tableRenderOptimization?: boolean;
23
22
  getEditorContainerWidth: GetEditorContainerWidth;
24
23
  getEditorFeatureFlags: GetEditorFeatureFlags;
25
24
  hasIntlContext: boolean;
@@ -1,7 +1 @@
1
- import type { GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
2
1
  export declare const updateShadowListForStickyStyles: (heightStyle: string, shadows: HTMLCollection) => void;
3
- /**
4
- * Update overflow shadows for a given wrapper & table.
5
- * if `overflowShadowOptimization` is enabled, this will exit early.
6
- */
7
- export declare const updateOverflowShadows: (getEditorFeatureFlags: GetEditorFeatureFlags) => (wrapper?: HTMLElement | null, table?: HTMLElement | null, rightShadows?: NodeListOf<HTMLElement> | null, leftShadows?: NodeListOf<HTMLElement> | null) => false | undefined;
@@ -1,6 +1,5 @@
1
1
  /// <reference types="lodash" />
2
2
  import { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
3
- import type { GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
4
3
  import { Node as PmNode } from '@atlaskit/editor-prosemirror/model';
5
4
  import { EditorView, NodeView } from '@atlaskit/editor-prosemirror/view';
6
5
  import { TablePluginState } from '../../../types';
@@ -30,11 +29,10 @@ export declare class TableRowNodeView implements NodeView {
30
29
  lastTimePainted: number;
31
30
  private intersectionObserver?;
32
31
  private resizeObserver?;
33
- private stickyHeadersOptimization;
34
32
  private sentinels;
35
33
  private stickyRowHeight?;
36
34
  get tree(): TableDOMElements | null | undefined;
37
- constructor(node: PmNode, view: EditorView, getPos: any, eventDispatcher: EventDispatcher, getEditorFeatureFlags: GetEditorFeatureFlags);
35
+ constructor(node: PmNode, view: EditorView, getPos: any, eventDispatcher: EventDispatcher);
38
36
  listening: boolean;
39
37
  headerRowMouseScrollEnd: import("lodash").DebouncedFunc<() => void>;
40
38
  headerRowMouseScroll: import("lodash").DebouncedFunc<() => void>;
@@ -47,9 +45,6 @@ export declare class TableRowNodeView implements NodeView {
47
45
  previousPadding: number | undefined;
48
46
  latestDomTop: number | undefined;
49
47
  nextFrame: number | undefined;
50
- onScroll: () => void;
51
- loop: () => void;
52
- paint: (tree: TableDOMElements) => void;
53
48
  update(node: PmNode, ..._args: any[]): boolean;
54
49
  destroy(): void;
55
50
  ignoreMutation(mutationRecord: MutationRecord | {
@@ -1,7 +1,6 @@
1
- import type { GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
2
1
  import { EditorState } from '@atlaskit/editor-prosemirror/state';
3
2
  import { EditorView } from '@atlaskit/editor-prosemirror/view';
4
- export declare const updateControls: (getEditorFeatureFlags: GetEditorFeatureFlags) => (state: EditorState) => void;
3
+ export declare const updateControls: () => (state: EditorState) => void;
5
4
  export declare const isClickNear: (event: MouseEvent, click: {
6
5
  x: number;
7
6
  y: number;
@@ -38,13 +38,14 @@ export interface PluginConfig {
38
38
  permittedLayouts?: PermittedLayoutsDescriptor;
39
39
  allowControls?: boolean;
40
40
  stickyHeaders?: boolean;
41
+ allowCellOptionsInFloatingToolbar?: boolean;
42
+ allowDistributeColumns?: boolean;
41
43
  tableCellOptimization?: boolean;
42
44
  tableRenderOptimization?: boolean;
43
45
  stickyHeadersOptimization?: boolean;
44
46
  initialRenderOptimization?: boolean;
45
47
  mouseMoveOptimization?: boolean;
46
48
  tableOverflowShadowsOptimization?: boolean;
47
- allowDistributeColumns?: boolean;
48
49
  }
49
50
  export type { ColumnResizingPluginState } from '@atlaskit/editor-common/types';
50
51
  export type CellColumnPositioning = Pick<Rect, 'right' | 'left'>;
@@ -70,7 +71,6 @@ export interface TablePluginState {
70
71
  ordering?: TableColumnOrdering;
71
72
  resizeHandleRowIndex?: number;
72
73
  resizeHandleColumnIndex?: number;
73
- tableCellOptimization?: boolean;
74
74
  isTableCollapsed?: boolean;
75
75
  canCollapseTable?: boolean;
76
76
  }
@@ -16,7 +16,6 @@ export interface Props {
16
16
  isHeaderColumnEnabled?: boolean;
17
17
  isNumberColumnEnabled?: boolean;
18
18
  hasHeaderRow?: boolean;
19
- tableHeight?: number;
20
19
  headerRowHeight?: number;
21
20
  hoveredRows?: number[];
22
21
  ordering?: TableColumnOrdering;
@@ -11,7 +11,7 @@ export declare const isRowControlsButton: (node: HTMLElement | null) => boolean;
11
11
  export declare const isResizeHandleDecoration: (node: HTMLElement | null) => boolean;
12
12
  export declare const isTableControlsButton: (node: HTMLElement | null) => boolean;
13
13
  export declare const isTableContainerOrWrapper: (node: HTMLElement | null) => boolean;
14
- export declare const getMousePositionHorizontalRelativeByElement: (mouseEvent: MouseEvent, mouseMoveOptimization?: boolean, elementContentRects?: ElementContentRects, gapInPixels?: number) => 'left' | 'right' | null;
14
+ export declare const getMousePositionHorizontalRelativeByElement: (mouseEvent: MouseEvent, elementContentRects?: ElementContentRects, gapInPixels?: number) => 'left' | 'right' | null;
15
15
  export declare const getMousePositionVerticalRelativeByElement: (mouseEvent: MouseEvent) => 'top' | 'bottom' | null;
16
16
  export declare const updateResizeHandles: (tableRef?: HTMLElement) => void;
17
17
  export declare const hasResizeHandler: ({ columnEndIndexTarget, target, }: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-table",
3
- "version": "2.9.0",
3
+ "version": "2.10.0",
4
4
  "description": "Table plugin for the @atlaskit/editor",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -28,7 +28,7 @@
28
28
  },
29
29
  "dependencies": {
30
30
  "@atlaskit/adf-schema": "^28.1.0",
31
- "@atlaskit/editor-common": "^74.46.0",
31
+ "@atlaskit/editor-common": "^74.47.0",
32
32
  "@atlaskit/editor-palette": "1.5.1",
33
33
  "@atlaskit/editor-plugin-analytics": "^0.1.0",
34
34
  "@atlaskit/editor-plugin-content-insertion": "^0.0.8",
package/report.api.md CHANGED
@@ -41,6 +41,8 @@ interface PluginConfig {
41
41
  // (undocumented)
42
42
  allowBackgroundColor?: boolean;
43
43
  // (undocumented)
44
+ allowCellOptionsInFloatingToolbar?: boolean;
45
+ // (undocumented)
44
46
  allowCollapse?: boolean;
45
47
  // (undocumented)
46
48
  allowColumnResizing?: boolean;