@atlaskit/editor-plugin-table 0.2.2 → 0.2.3

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 (80) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/cjs/plugins/table/commands/hover.js +2 -1
  3. package/dist/cjs/plugins/table/event-handlers.js +5 -12
  4. package/dist/cjs/plugins/table/index.js +3 -1
  5. package/dist/cjs/plugins/table/nodeviews/TableComponent.js +15 -5
  6. package/dist/cjs/plugins/table/pm-plugins/default-table-selection.js +1 -2
  7. package/dist/cjs/plugins/table/pm-plugins/main.js +2 -2
  8. package/dist/cjs/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +42 -8
  9. package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/resize-logic.js +1 -1
  10. package/dist/cjs/plugins/table/toolbar.js +42 -10
  11. package/dist/cjs/plugins/table/ui/FloatingContextualButton/index.js +7 -1
  12. package/dist/cjs/plugins/table/ui/FloatingContextualButton/styles.js +34 -6
  13. package/dist/cjs/plugins/table/ui/FloatingContextualMenu/ContextualMenu.js +4 -1
  14. package/dist/cjs/plugins/table/ui/common-styles.js +1 -1
  15. package/dist/cjs/plugins/table/ui/consts.js +4 -4
  16. package/dist/cjs/plugins/table/ui/ui-styles.js +5 -5
  17. package/dist/cjs/version.json +1 -1
  18. package/dist/es2019/plugins/table/commands/hover.js +2 -1
  19. package/dist/es2019/plugins/table/event-handlers.js +5 -11
  20. package/dist/es2019/plugins/table/index.js +1 -1
  21. package/dist/es2019/plugins/table/nodeviews/TableComponent.js +12 -1
  22. package/dist/es2019/plugins/table/pm-plugins/default-table-selection.js +1 -2
  23. package/dist/es2019/plugins/table/pm-plugins/main.js +2 -2
  24. package/dist/es2019/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +31 -4
  25. package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/resize-logic.js +1 -1
  26. package/dist/es2019/plugins/table/toolbar.js +43 -12
  27. package/dist/es2019/plugins/table/ui/FloatingContextualButton/index.js +6 -2
  28. package/dist/es2019/plugins/table/ui/FloatingContextualButton/styles.js +47 -8
  29. package/dist/es2019/plugins/table/ui/FloatingContextualMenu/ContextualMenu.js +4 -1
  30. package/dist/es2019/plugins/table/ui/common-styles.js +9 -9
  31. package/dist/es2019/plugins/table/ui/consts.js +5 -5
  32. package/dist/es2019/plugins/table/ui/ui-styles.js +5 -5
  33. package/dist/es2019/version.json +1 -1
  34. package/dist/esm/plugins/table/commands/hover.js +2 -1
  35. package/dist/esm/plugins/table/event-handlers.js +5 -12
  36. package/dist/esm/plugins/table/index.js +3 -1
  37. package/dist/esm/plugins/table/nodeviews/TableComponent.js +17 -6
  38. package/dist/esm/plugins/table/pm-plugins/default-table-selection.js +1 -2
  39. package/dist/esm/plugins/table/pm-plugins/main.js +2 -2
  40. package/dist/esm/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +43 -8
  41. package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/resize-logic.js +1 -1
  42. package/dist/esm/plugins/table/toolbar.js +43 -12
  43. package/dist/esm/plugins/table/ui/FloatingContextualButton/index.js +8 -2
  44. package/dist/esm/plugins/table/ui/FloatingContextualButton/styles.js +28 -5
  45. package/dist/esm/plugins/table/ui/FloatingContextualMenu/ContextualMenu.js +4 -1
  46. package/dist/esm/plugins/table/ui/common-styles.js +1 -1
  47. package/dist/esm/plugins/table/ui/consts.js +5 -5
  48. package/dist/esm/plugins/table/ui/ui-styles.js +5 -5
  49. package/dist/esm/version.json +1 -1
  50. package/dist/types/plugins/table/event-handlers.d.ts +2 -2
  51. package/dist/types/plugins/table/pm-plugins/default-table-selection.d.ts +0 -1
  52. package/dist/types/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.d.ts +8 -0
  53. package/dist/types/plugins/table/toolbar.d.ts +3 -2
  54. package/dist/types/plugins/table/ui/FloatingContextualButton/styles.d.ts +3 -1
  55. package/dist/types/plugins/table/ui/consts.d.ts +2 -2
  56. package/package.json +4 -4
  57. package/src/__tests__/integration/__snapshots__/floating-toolbar.ts.snap +321 -0
  58. package/src/__tests__/integration/delete-last-column-in-full-width.ts +6 -5
  59. package/src/__tests__/integration/floating-toolbar.ts +169 -0
  60. package/src/__tests__/unit/get-toolbar-config.ts +1 -0
  61. package/src/__tests__/unit/nodeviews/TableComponent.tsx +146 -4
  62. package/src/__tests__/unit/pm-plugins/table-resizing/event-handlers.ts +82 -31
  63. package/src/__tests__/unit/toolbar.ts +165 -4
  64. package/src/__tests__/visual-regression/__image_snapshots__/cell-options-menu-ts-table-cell-options-menu-delete-row-menu-item-should-remove-the-table-row-on-click-1-snap.png +2 -2
  65. package/src/plugins/table/commands/hover.ts +1 -0
  66. package/src/plugins/table/event-handlers.ts +3 -16
  67. package/src/plugins/table/index.tsx +1 -0
  68. package/src/plugins/table/nodeviews/TableComponent.tsx +10 -2
  69. package/src/plugins/table/nodeviews/tableCell.tsx +1 -1
  70. package/src/plugins/table/pm-plugins/default-table-selection.ts +0 -1
  71. package/src/plugins/table/pm-plugins/main.ts +26 -28
  72. package/src/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.ts +44 -9
  73. package/src/plugins/table/pm-plugins/table-resizing/utils/resize-logic.ts +1 -1
  74. package/src/plugins/table/toolbar.tsx +60 -13
  75. package/src/plugins/table/ui/FloatingContextualButton/index.tsx +12 -2
  76. package/src/plugins/table/ui/FloatingContextualButton/styles.ts +51 -7
  77. package/src/plugins/table/ui/FloatingContextualMenu/ContextualMenu.tsx +3 -0
  78. package/src/plugins/table/ui/common-styles.ts +24 -9
  79. package/src/plugins/table/ui/consts.ts +7 -5
  80. package/src/plugins/table/ui/ui-styles.ts +20 -5
@@ -26,7 +26,7 @@ var sentinelStyles = ".".concat(ClassName.TABLE_CONTAINER, " {\n > .").concat(C
26
26
  export var tableStyles = function tableStyles(props) {
27
27
  var _props$featureFlags;
28
28
 
29
- return css(_templateObject || (_templateObject = _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\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 */\n > * .", " .", " {\n margin-left: unset !important;\n width: 100% !important;\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\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: ", "px;\n margin-bottom: -", "px;\n /* fixes gap cursor height */\n overflow: auto;\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 .ProseMirror .pm-table-cell-content-wrap ol[data-child-count='100+'] {\n padding-left: revert;\n }\n"])), ClassName.LAYOUT_BUTTON, token('color.background.neutral', N20A), token('color.icon', N300), ClassName.LAYOUT_BUTTON, ClassName.IS_RESIZING, token('color.background.neutral.hovered', B300), token('color.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, token('elevation.surface', 'white'), ClassName.TABLE_STICKY, ClassName.CORNER_CONTROLS, akEditorSmallZIndex, token('elevation.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, token('elevation.surface', 'white'), tableToolbarSize, ClassName.TABLE_STICKY, token('elevation.surface', 'green'), stickyRowOffsetTop, stickyRowZIndex, token('elevation.surface', 'white'), token('elevation.shadow.overflow', "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, token('elevation.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, ClassName.NODEVIEW_WRAPPER, ClassName.TABLE_CONTAINER, 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, 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, tableToolbarSelectedColor, ClassName.IS_RESIZING, ClassName.CONTROLS_CORNER_BUTTON, ClassName.HOVERED_CELL_IN_DANGER, tableBorderDeleteColor, 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, tableToolbarSelectedColor, akEditorUnitZIndex, token('color.text.inverse', N0), ClassName.IS_RESIZING, ClassName.WITH_CONTROLS, ClassName.NUMBERED_COLUMN_BUTTON, ClassName.NUMBERED_COLUMN_BUTTON, tableBorderSelectedColor, tableBorderSelectedColor, tableToolbarSelectedColor, akEditorUnitZIndex, token('color.text.inverse', N0), ClassName.NUMBERED_COLUMN_BUTTON, ClassName.HOVERED_CELL_IN_DANGER, tableToolbarDeleteColor, tableBorderDeleteColor, token('color.text.inverse', 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, tableScrollbarOffset, tableScrollbarOffset, ClassName.IS_RESIZING, ClassName.TABLE_NODE_WRAPPER, scrollbarStyles, ClassName.RESIZE_CURSOR);
29
+ return css(_templateObject || (_templateObject = _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\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 */\n > * .", " .", " {\n margin-left: unset !important;\n width: 100% !important;\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\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: ", "px;\n margin-bottom: -", "px;\n /* fixes gap cursor height */\n overflow: auto;\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 .ProseMirror .pm-table-cell-content-wrap ol[data-child-count='100+'] {\n padding-left: revert;\n }\n"])), ClassName.LAYOUT_BUTTON, token('color.background.neutral', N20A), token('color.icon', N300), ClassName.LAYOUT_BUTTON, ClassName.IS_RESIZING, token('color.background.neutral.hovered', B300), token('color.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, token('elevation.surface', 'white'), ClassName.TABLE_STICKY, ClassName.CORNER_CONTROLS, akEditorSmallZIndex, token('elevation.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, token('elevation.surface', 'white'), tableToolbarSize, ClassName.TABLE_STICKY, token('elevation.surface', 'green'), stickyRowOffsetTop, stickyRowZIndex, token('elevation.surface', 'white'), token('elevation.shadow.overflow', "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, token('elevation.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, ClassName.NODEVIEW_WRAPPER, ClassName.TABLE_CONTAINER, 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, token('color.background.selected', 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, token('color.background.selected', tableToolbarSelectedColor), ClassName.IS_RESIZING, ClassName.CONTROLS_CORNER_BUTTON, ClassName.HOVERED_CELL_IN_DANGER, tableBorderDeleteColor, token('color.background.danger', 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, token('color.background.selected', tableToolbarSelectedColor), akEditorUnitZIndex, token('color.text.selected', N0), ClassName.IS_RESIZING, ClassName.WITH_CONTROLS, ClassName.NUMBERED_COLUMN_BUTTON, ClassName.NUMBERED_COLUMN_BUTTON, tableBorderSelectedColor, tableBorderSelectedColor, token('color.background.selected', tableToolbarSelectedColor), akEditorUnitZIndex, token('color.text.selected', N0), ClassName.NUMBERED_COLUMN_BUTTON, ClassName.HOVERED_CELL_IN_DANGER, token('color.background.danger', tableToolbarDeleteColor), tableBorderDeleteColor, token('color.text.danger', 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, tableScrollbarOffset, tableScrollbarOffset, ClassName.IS_RESIZING, ClassName.TABLE_NODE_WRAPPER, scrollbarStyles, ClassName.RESIZE_CURSOR);
30
30
  };
31
31
  export var tableFullPageEditorStyles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .ProseMirror .", " > table {\n margin-left: 0;\n margin-right: 0;\n width: 100%;\n }\n"])), ClassName.TABLE_NODE_WRAPPER);
32
32
  export var tableCommentEditorStyles = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n .ProseMirror .", " > table {\n margin-left: 0;\n margin-right: 0;\n ", ";\n }\n"])), ClassName.TABLE_NODE_WRAPPER, scrollbarStyles);
@@ -1,4 +1,4 @@
1
- import { B200, B300, N0, N20, R400, R75, DN400, N200, DN30 } from '@atlaskit/theme/colors';
1
+ import { B200, B300, N20, R400, R75, DN400, N200, DN30, N0 } from '@atlaskit/theme/colors';
2
2
  import { tableCellBorderWidth, tableMarginTop } from '@atlaskit/editor-common/styles';
3
3
  import { akEditorTableBorder, akEditorTableBorderDark, akEditorTableToolbar, akEditorTableToolbarDark, akEditorTableToolbarSize, akEditorUnitZIndex, akRichMediaResizeZIndex } from '@atlaskit/editor-shared-styles';
4
4
  import { token } from '@atlaskit/tokens';
@@ -11,12 +11,12 @@ import { themed } from '@atlaskit/theme/components';
11
11
  // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
12
12
 
13
13
  export var tableCellBackgroundColor = themed({
14
- light: N0,
15
- dark: DN30
14
+ light: token('elevation.surface', N0),
15
+ dark: token('elevation.surface', DN30)
16
16
  });
17
17
  export var tableToolbarColor = themed({
18
- light: akEditorTableToolbar,
19
- dark: akEditorTableToolbarDark
18
+ light: token('color.background.neutral.subtle', akEditorTableToolbar),
19
+ dark: token('color.background.neutral.subtle', akEditorTableToolbarDark)
20
20
  });
21
21
  export var tableTextColor = themed({
22
22
  light: token('color.text.subtlest', N200),
@@ -28,13 +28,13 @@ var Button = function Button(cssString) {
28
28
  };
29
29
 
30
30
  export var HeaderButton = function HeaderButton(props, cssString) {
31
- 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, token('color.icon.inverse', N0), tableToolbarSelectedColor, tableBorderSelectedColor);
31
+ 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, token('color.icon.inverse', N0), token('color.background.selected', tableToolbarSelectedColor), tableBorderSelectedColor);
32
32
  };
33
33
  export var HeaderButtonHover = function HeaderButtonHover() {
34
- return css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n .", ":hover {\n color: ", ";\n background-color: ", ";\n border-color: ", ";\n cursor: pointer;\n }\n"])), ClassName.CONTROLS_BUTTON, token('color.icon.inverse', N0), tableToolbarSelectedColor, tableBorderSelectedColor);
34
+ return css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n .", ":hover {\n color: ", ";\n background-color: ", ";\n border-color: ", ";\n cursor: pointer;\n }\n"])), ClassName.CONTROLS_BUTTON, token('color.icon.inverse', N0), token('color.background.selected', tableToolbarSelectedColor), tableBorderSelectedColor);
35
35
  };
36
36
  export var HeaderButtonDanger = function HeaderButtonDanger() {
37
- return css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n .", " .", " {\n background-color: ", ";\n border-color: ", ";\n position: relative;\n z-index: ", ";\n }\n"])), ClassName.HOVERED_CELL_IN_DANGER, ClassName.CONTROLS_BUTTON, tableToolbarDeleteColor, tableBorderDeleteColor, akEditorUnitZIndex);
37
+ return css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n .", " .", " {\n background-color: ", ";\n border-color: ", ";\n position: relative;\n z-index: ", ";\n }\n"])), ClassName.HOVERED_CELL_IN_DANGER, ClassName.CONTROLS_BUTTON, token('color.background.danger', tableToolbarDeleteColor), tableBorderDeleteColor, akEditorUnitZIndex);
38
38
  };
39
39
 
40
40
  var InsertButton = function InsertButton() {
@@ -63,9 +63,9 @@ var columnHeaderButton = function columnHeaderButton(props, cssString) {
63
63
  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);
64
64
  };
65
65
 
66
- var columnHeaderButtonSelected = css(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n color: ", ";\n background-color: ", ";\n border-color: ", ";\n z-index: ", ";\n"])), token('color.text.inverse', N0), tableToolbarSelectedColor, tableBorderSelectedColor, columnControlsSelectedZIndex);
66
+ var columnHeaderButtonSelected = css(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n color: ", ";\n background-color: ", ";\n border-color: ", ";\n z-index: ", ";\n"])), token('color.text.inverse', N0), token('color.background.selected', tableToolbarSelectedColor), tableBorderSelectedColor, columnControlsSelectedZIndex);
67
67
  export var columnControlsDecoration = function columnControlsDecoration(props) {
68
- return css(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n .", " {\n display: none;\n cursor: pointer;\n position: absolute;\n width: calc(100% + ", "px);\n left: -1px;\n top: -", "px;\n height: ", "px;\n\n &::before {\n content: ' ';\n background-color: ", ";\n position: absolute;\n height: ", "px;\n width: ", "px;\n border-radius: 50%;\n pointer-events: none;\n top: 2px;\n right: -1px;\n }\n\n &::after {\n content: ' ';\n\n ", "\n }\n }\n\n div.", ">.", "::after {\n content: ' ';\n background-color: ", ";\n position: absolute;\n height: ", "px;\n width: ", "px;\n border-radius: 50%;\n pointer-events: none;\n top: -", "px;\n right: -1px;\n }\n\n .", " .", " {\n display: block;\n }\n\n table\n tr:first-of-type\n td.", ",\n table\n tr:first-of-type\n th.", " {\n &.", ",\n &.", ",\n &.", " {\n .", "::after {\n ", ";\n }\n\n &.", "\n .", "::after {\n background-color: ", ";\n border: 1px solid ", ";\n border-bottom: none;\n z-index: ", ";\n }\n }\n }\n\n .", "\n table\n tr:first-of-type\n td.", ",\n .", "\n table\n tr:first-of-type\n th.", " {\n .", "::after {\n ", ";\n }\n }\n"])), ClassName.COLUMN_CONTROLS_DECORATIONS, tableCellBorderWidth * 2, columnControlsDecorationHeight + tableCellBorderWidth, columnControlsDecorationHeight, tableBorderColor(props), lineMarkerSize, lineMarkerSize, columnHeaderButton(props, "\n border-right: ".concat(tableCellBorderWidth, "px solid ").concat(tableBorderColor(props), ";\n border-bottom: none;\n height: ").concat(tableToolbarSize, "px;\n width: 100%;\n position: absolute;\n top: ").concat(columnControlsDecorationHeight - tableToolbarSize, "px;\n left: 0px;\n z-index: ").concat(columnControlsZIndex, ";\n ")), ClassName.WITH_CONTROLS, ClassName.ROW_CONTROLS_WRAPPER, tableBorderColor(props), lineMarkerSize, lineMarkerSize, tableToolbarSize + tableCellBorderWidth, ClassName.WITH_CONTROLS, ClassName.COLUMN_CONTROLS_DECORATIONS, ClassName.TABLE_CELL, ClassName.TABLE_HEADER_CELL, ClassName.COLUMN_SELECTED, ClassName.HOVERED_COLUMN, ClassName.HOVERED_TABLE, ClassName.COLUMN_CONTROLS_DECORATIONS, columnHeaderButtonSelected, ClassName.HOVERED_CELL_IN_DANGER, ClassName.COLUMN_CONTROLS_DECORATIONS, tableToolbarDeleteColor, tableBorderDeleteColor, akEditorUnitZIndex * 100, ClassName.TABLE_SELECTED, ClassName.TABLE_CELL, ClassName.TABLE_SELECTED, ClassName.TABLE_HEADER_CELL, ClassName.COLUMN_CONTROLS_DECORATIONS, columnHeaderButtonSelected);
68
+ return css(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n .", " {\n display: none;\n cursor: pointer;\n position: absolute;\n width: calc(100% + ", "px);\n left: -1px;\n top: -", "px;\n height: ", "px;\n\n &::before {\n content: ' ';\n background-color: ", ";\n position: absolute;\n height: ", "px;\n width: ", "px;\n border-radius: 50%;\n pointer-events: none;\n top: 2px;\n right: -1px;\n }\n\n &::after {\n content: ' ';\n\n ", "\n }\n }\n\n div.", ">.", "::after {\n content: ' ';\n background-color: ", ";\n position: absolute;\n height: ", "px;\n width: ", "px;\n border-radius: 50%;\n pointer-events: none;\n top: -", "px;\n right: -1px;\n }\n\n .", " .", " {\n display: block;\n }\n\n table\n tr:first-of-type\n td.", ",\n table\n tr:first-of-type\n th.", " {\n &.", ",\n &.", ",\n &.", " {\n .", "::after {\n ", ";\n }\n\n &.", "\n .", "::after {\n background-color: ", ";\n border: 1px solid ", ";\n border-bottom: none;\n z-index: ", ";\n }\n }\n }\n\n .", "\n table\n tr:first-of-type\n td.", ",\n .", "\n table\n tr:first-of-type\n th.", " {\n .", "::after {\n ", ";\n }\n }\n"])), ClassName.COLUMN_CONTROLS_DECORATIONS, tableCellBorderWidth * 2, columnControlsDecorationHeight + tableCellBorderWidth, columnControlsDecorationHeight, tableBorderColor(props), lineMarkerSize, lineMarkerSize, columnHeaderButton(props, "\n border-right: ".concat(tableCellBorderWidth, "px solid ").concat(tableBorderColor(props), ";\n border-bottom: none;\n height: ").concat(tableToolbarSize, "px;\n width: 100%;\n position: absolute;\n top: ").concat(columnControlsDecorationHeight - tableToolbarSize, "px;\n left: 0px;\n z-index: ").concat(columnControlsZIndex, ";\n ")), ClassName.WITH_CONTROLS, ClassName.ROW_CONTROLS_WRAPPER, tableBorderColor(props), lineMarkerSize, lineMarkerSize, tableToolbarSize + tableCellBorderWidth, ClassName.WITH_CONTROLS, ClassName.COLUMN_CONTROLS_DECORATIONS, ClassName.TABLE_CELL, ClassName.TABLE_HEADER_CELL, ClassName.COLUMN_SELECTED, ClassName.HOVERED_COLUMN, ClassName.HOVERED_TABLE, ClassName.COLUMN_CONTROLS_DECORATIONS, columnHeaderButtonSelected, ClassName.HOVERED_CELL_IN_DANGER, ClassName.COLUMN_CONTROLS_DECORATIONS, token('color.background.danger', tableToolbarDeleteColor), tableBorderDeleteColor, akEditorUnitZIndex * 100, ClassName.TABLE_SELECTED, ClassName.TABLE_CELL, ClassName.TABLE_SELECTED, ClassName.TABLE_HEADER_CELL, ClassName.COLUMN_CONTROLS_DECORATIONS, columnHeaderButtonSelected);
69
69
  };
70
70
  export var hoveredDeleteButton = css(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n .", ".", " {\n .", ",\n .", ",\n .", " {\n border: 1px solid ", ";\n }\n .", "::after {\n background: ", ";\n }\n }\n"])), ClassName.TABLE_CONTAINER, ClassName.HOVERED_DELETE_BUTTON, ClassName.SELECTED_CELL, ClassName.COLUMN_SELECTED, ClassName.HOVERED_CELL, tableBorderDeleteColor, ClassName.SELECTED_CELL, tableCellDeleteColor);
71
71
  export var hoveredCell = css(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["\n :not(.", ")\n .", ":not(.", ") {\n .", " {\n position: relative;\n border: 1px solid ", ";\n }\n }\n"])), ClassName.IS_RESIZING, ClassName.TABLE_CONTAINER, ClassName.HOVERED_DELETE_BUTTON, ClassName.HOVERED_CELL, tableBorderSelectedColor);
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-table",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "sideEffects": false
5
5
  }
@@ -10,7 +10,7 @@ export declare const handleMouseOver: (view: EditorView, mouseEvent: Event) => b
10
10
  export declare const handleMouseDown: (_: EditorView, event: Event) => boolean;
11
11
  export declare const handleMouseOut: (view: EditorView, mouseEvent: Event) => boolean;
12
12
  export declare const handleMouseLeave: (view: EditorView, event: Event) => boolean;
13
- export declare const handleMouseMove: (getEditorFeatureFlags: GetEditorFeatureFlags) => (view: EditorView, event: Event, tableCellOptimization?: boolean | undefined, elementContentRects?: ElementContentRects | undefined) => boolean;
13
+ export declare const handleMouseMove: (getEditorFeatureFlags: GetEditorFeatureFlags) => (view: EditorView, event: Event, elementContentRects?: ElementContentRects | undefined) => boolean;
14
14
  export declare function handleTripleClick(view: EditorView, pos: number): boolean;
15
15
  export declare const handleCut: (oldTr: Transaction, oldState: EditorState, newState: EditorState, editorAnalyticsAPI?: EditorAnalyticsAPI | undefined) => Transaction;
16
- export declare const whenTableInFocus: (eventHandler: (view: EditorView, mouseEvent: Event, tableCellOptimization?: boolean | undefined, elementContentRects?: ElementContentRects | undefined) => boolean, elementContentRects?: ElementContentRects | undefined) => (view: EditorView, mouseEvent: Event) => boolean;
16
+ export declare const whenTableInFocus: (eventHandler: (view: EditorView, mouseEvent: Event, elementContentRects?: ElementContentRects | undefined) => boolean, elementContentRects?: ElementContentRects | undefined) => (view: EditorView, mouseEvent: Event) => boolean;
@@ -1,5 +1,4 @@
1
1
  export declare const defaultTableSelection: {
2
2
  hoveredColumns: never[];
3
3
  hoveredRows: never[];
4
- isInDanger: boolean;
5
4
  };
@@ -5,6 +5,14 @@ import { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
5
5
  import { TablePluginState } from '../../../types';
6
6
  import { TableDOMElements } from './dom';
7
7
  import type { GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
8
+ /**
9
+ * Check if a given node is a header row with this definition:
10
+ * - all children are tableHeader cells
11
+ * - no table cells have been have merged with other table row cells
12
+ *
13
+ * @param node ProseMirror node
14
+ * @return boolean if it meets definition
15
+ */
8
16
  export declare const supportedHeaderRow: (node: PmNode) => boolean;
9
17
  export declare class TableRowNodeView implements NodeView {
10
18
  view: EditorView;
@@ -4,6 +4,7 @@ import { ToolbarMenuConfig, ToolbarMenuState, ToolbarMenuContext, PluginConfig }
4
4
  import { EditorState } from 'prosemirror-state';
5
5
  import type { GetEditorContainerWidth } from '@atlaskit/editor-common/types';
6
6
  import { Rect } from '@atlaskit/editor-tables/table-map';
7
+ import { EditorView } from 'prosemirror-view';
7
8
  export declare const messages: {
8
9
  tableOptions: {
9
10
  id: string;
@@ -32,5 +33,5 @@ export declare const messages: {
32
33
  };
33
34
  };
34
35
  export declare const getToolbarMenuConfig: (config: ToolbarMenuConfig, state: ToolbarMenuState, { formatMessage }: ToolbarMenuContext, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => FloatingToolbarItem<Command>;
35
- export declare const getToolbarCellOptionsConfig: (editorState: EditorState, initialSelectionRect: Rect, { formatMessage }: ToolbarMenuContext, getEditorContainerWidth: GetEditorContainerWidth, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => FloatingToolbarDropdown<Command>;
36
- export declare const getToolbarConfig: (getEditorContainerWidth: GetEditorContainerWidth, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, getEditorFeatureFlags: GetEditorFeatureFlags) => (config: PluginConfig) => FloatingToolbarHandler;
36
+ export declare const getToolbarCellOptionsConfig: (editorState: EditorState, editorView: EditorView | undefined | null, initialSelectionRect: Rect, { formatMessage }: ToolbarMenuContext, getEditorContainerWidth: GetEditorContainerWidth, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => FloatingToolbarDropdown<Command>;
37
+ export declare const getToolbarConfig: (getEditorContainerWidth: GetEditorContainerWidth, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, getEditorFeatureFlags: GetEditorFeatureFlags, getEditorView: () => EditorView | null) => (config: PluginConfig) => FloatingToolbarHandler;
@@ -1 +1,3 @@
1
- export declare const tableFloatingCellButtonStyles: import("@emotion/react").SerializedStyles;
1
+ import { ThemeProps } from '@atlaskit/theme/types';
2
+ export declare const tableFloatingCellButtonStyles: (props: ThemeProps) => import("@emotion/react").SerializedStyles;
3
+ export declare const tableFloatingCellButtonSelectedStyles: (props: ThemeProps) => import("@emotion/react").SerializedStyles;
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * Basic colors added to prevent content overflow in table cells.
3
3
  */
4
- export declare const tableCellBackgroundColor: import("@atlaskit/theme").ThemedValue<string>;
5
- export declare const tableToolbarColor: import("@atlaskit/theme").ThemedValue<string>;
4
+ export declare const tableCellBackgroundColor: import("@atlaskit/theme").ThemedValue<"var(--ds-surface)">;
5
+ export declare const tableToolbarColor: import("@atlaskit/theme").ThemedValue<"var(--ds-background-neutral-subtle)">;
6
6
  export declare const tableTextColor: import("@atlaskit/theme").ThemedValue<"var(--ds-text-subtlest)">;
7
7
  export declare const tableBorderColor: import("@atlaskit/theme").ThemedValue<"var(--ds-border)">;
8
8
  export declare const tableFloatingControlsColor: "var(--ds-background-neutral)";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-table",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "Table plugin for the @atlaskit/editor",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -19,7 +19,7 @@
19
19
  },
20
20
  "dependencies": {
21
21
  "@atlaskit/adf-schema": "^24.0.0",
22
- "@atlaskit/editor-common": "^70.3.0",
22
+ "@atlaskit/editor-common": "^71.0.0",
23
23
  "@atlaskit/editor-shared-styles": "^2.2.0",
24
24
  "@atlaskit/editor-tables": "^2.2.0",
25
25
  "@atlaskit/icon": "^21.11.0",
@@ -50,8 +50,8 @@
50
50
  },
51
51
  "devDependencies": {
52
52
  "@atlaskit/analytics-next": "^8.3.3",
53
- "@atlaskit/button": "^16.4.0",
54
- "@atlaskit/editor-core": "^175.0.0",
53
+ "@atlaskit/button": "^16.5.0",
54
+ "@atlaskit/editor-core": "^176.0.0",
55
55
  "@atlaskit/editor-test-helpers": "^17.2.0",
56
56
  "@atlaskit/link-provider": "^1.3.0",
57
57
  "@atlaskit/logo": "^13.10.0",
@@ -0,0 +1,321 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`should show hover indicators on delete columns menu option 1`] = `
4
+ Object {
5
+ "content": Array [
6
+ Object {
7
+ "attrs": Object {
8
+ "__autoSize": false,
9
+ "isNumberColumnEnabled": false,
10
+ "layout": "default",
11
+ "localId": "abc-123",
12
+ },
13
+ "content": Array [
14
+ Object {
15
+ "content": Array [
16
+ Object {
17
+ "attrs": Object {
18
+ "background": null,
19
+ "colspan": 1,
20
+ "colwidth": null,
21
+ "rowspan": 1,
22
+ },
23
+ "content": Array [
24
+ Object {
25
+ "type": "paragraph",
26
+ },
27
+ ],
28
+ "type": "tableHeader",
29
+ },
30
+ Object {
31
+ "attrs": Object {
32
+ "background": null,
33
+ "colspan": 1,
34
+ "colwidth": null,
35
+ "rowspan": 1,
36
+ },
37
+ "content": Array [
38
+ Object {
39
+ "type": "paragraph",
40
+ },
41
+ ],
42
+ "type": "tableHeader",
43
+ },
44
+ Object {
45
+ "attrs": Object {
46
+ "background": null,
47
+ "colspan": 1,
48
+ "colwidth": null,
49
+ "rowspan": 1,
50
+ },
51
+ "content": Array [
52
+ Object {
53
+ "type": "paragraph",
54
+ },
55
+ ],
56
+ "type": "tableHeader",
57
+ },
58
+ ],
59
+ "type": "tableRow",
60
+ },
61
+ Object {
62
+ "content": Array [
63
+ Object {
64
+ "attrs": Object {
65
+ "background": null,
66
+ "colspan": 1,
67
+ "colwidth": null,
68
+ "rowspan": 1,
69
+ },
70
+ "content": Array [
71
+ Object {
72
+ "type": "paragraph",
73
+ },
74
+ ],
75
+ "type": "tableCell",
76
+ },
77
+ Object {
78
+ "attrs": Object {
79
+ "background": null,
80
+ "colspan": 1,
81
+ "colwidth": null,
82
+ "rowspan": 1,
83
+ },
84
+ "content": Array [
85
+ Object {
86
+ "type": "paragraph",
87
+ },
88
+ ],
89
+ "type": "tableCell",
90
+ },
91
+ Object {
92
+ "attrs": Object {
93
+ "background": null,
94
+ "colspan": 1,
95
+ "colwidth": null,
96
+ "rowspan": 1,
97
+ },
98
+ "content": Array [
99
+ Object {
100
+ "type": "paragraph",
101
+ },
102
+ ],
103
+ "type": "tableCell",
104
+ },
105
+ ],
106
+ "type": "tableRow",
107
+ },
108
+ Object {
109
+ "content": Array [
110
+ Object {
111
+ "attrs": Object {
112
+ "background": null,
113
+ "colspan": 1,
114
+ "colwidth": null,
115
+ "rowspan": 1,
116
+ },
117
+ "content": Array [
118
+ Object {
119
+ "type": "paragraph",
120
+ },
121
+ ],
122
+ "type": "tableCell",
123
+ },
124
+ Object {
125
+ "attrs": Object {
126
+ "background": null,
127
+ "colspan": 1,
128
+ "colwidth": null,
129
+ "rowspan": 1,
130
+ },
131
+ "content": Array [
132
+ Object {
133
+ "type": "paragraph",
134
+ },
135
+ ],
136
+ "type": "tableCell",
137
+ },
138
+ Object {
139
+ "attrs": Object {
140
+ "background": null,
141
+ "colspan": 1,
142
+ "colwidth": null,
143
+ "rowspan": 1,
144
+ },
145
+ "content": Array [
146
+ Object {
147
+ "type": "paragraph",
148
+ },
149
+ ],
150
+ "type": "tableCell",
151
+ },
152
+ ],
153
+ "type": "tableRow",
154
+ },
155
+ ],
156
+ "type": "table",
157
+ },
158
+ ],
159
+ "type": "doc",
160
+ }
161
+ `;
162
+
163
+ exports[`should show hover indicators on delete rows menu option 1`] = `
164
+ Object {
165
+ "content": Array [
166
+ Object {
167
+ "attrs": Object {
168
+ "__autoSize": false,
169
+ "isNumberColumnEnabled": false,
170
+ "layout": "default",
171
+ "localId": "abc-123",
172
+ },
173
+ "content": Array [
174
+ Object {
175
+ "content": Array [
176
+ Object {
177
+ "attrs": Object {
178
+ "background": null,
179
+ "colspan": 1,
180
+ "colwidth": null,
181
+ "rowspan": 1,
182
+ },
183
+ "content": Array [
184
+ Object {
185
+ "type": "paragraph",
186
+ },
187
+ ],
188
+ "type": "tableHeader",
189
+ },
190
+ Object {
191
+ "attrs": Object {
192
+ "background": null,
193
+ "colspan": 1,
194
+ "colwidth": null,
195
+ "rowspan": 1,
196
+ },
197
+ "content": Array [
198
+ Object {
199
+ "type": "paragraph",
200
+ },
201
+ ],
202
+ "type": "tableHeader",
203
+ },
204
+ Object {
205
+ "attrs": Object {
206
+ "background": null,
207
+ "colspan": 1,
208
+ "colwidth": null,
209
+ "rowspan": 1,
210
+ },
211
+ "content": Array [
212
+ Object {
213
+ "type": "paragraph",
214
+ },
215
+ ],
216
+ "type": "tableHeader",
217
+ },
218
+ ],
219
+ "type": "tableRow",
220
+ },
221
+ Object {
222
+ "content": Array [
223
+ Object {
224
+ "attrs": Object {
225
+ "background": null,
226
+ "colspan": 1,
227
+ "colwidth": null,
228
+ "rowspan": 1,
229
+ },
230
+ "content": Array [
231
+ Object {
232
+ "type": "paragraph",
233
+ },
234
+ ],
235
+ "type": "tableCell",
236
+ },
237
+ Object {
238
+ "attrs": Object {
239
+ "background": null,
240
+ "colspan": 1,
241
+ "colwidth": null,
242
+ "rowspan": 1,
243
+ },
244
+ "content": Array [
245
+ Object {
246
+ "type": "paragraph",
247
+ },
248
+ ],
249
+ "type": "tableCell",
250
+ },
251
+ Object {
252
+ "attrs": Object {
253
+ "background": null,
254
+ "colspan": 1,
255
+ "colwidth": null,
256
+ "rowspan": 1,
257
+ },
258
+ "content": Array [
259
+ Object {
260
+ "type": "paragraph",
261
+ },
262
+ ],
263
+ "type": "tableCell",
264
+ },
265
+ ],
266
+ "type": "tableRow",
267
+ },
268
+ Object {
269
+ "content": Array [
270
+ Object {
271
+ "attrs": Object {
272
+ "background": null,
273
+ "colspan": 1,
274
+ "colwidth": null,
275
+ "rowspan": 1,
276
+ },
277
+ "content": Array [
278
+ Object {
279
+ "type": "paragraph",
280
+ },
281
+ ],
282
+ "type": "tableCell",
283
+ },
284
+ Object {
285
+ "attrs": Object {
286
+ "background": null,
287
+ "colspan": 1,
288
+ "colwidth": null,
289
+ "rowspan": 1,
290
+ },
291
+ "content": Array [
292
+ Object {
293
+ "type": "paragraph",
294
+ },
295
+ ],
296
+ "type": "tableCell",
297
+ },
298
+ Object {
299
+ "attrs": Object {
300
+ "background": null,
301
+ "colspan": 1,
302
+ "colwidth": null,
303
+ "rowspan": 1,
304
+ },
305
+ "content": Array [
306
+ Object {
307
+ "type": "paragraph",
308
+ },
309
+ ],
310
+ "type": "tableCell",
311
+ },
312
+ ],
313
+ "type": "tableRow",
314
+ },
315
+ ],
316
+ "type": "table",
317
+ },
318
+ ],
319
+ "type": "doc",
320
+ }
321
+ `;
@@ -56,11 +56,12 @@ BrowserTestCase(
56
56
  await page.waitForVisible(deleteButtonSelector);
57
57
  await page.click(deleteButtonSelector);
58
58
 
59
- // await page.checkConsoleErrors({
60
- // ignoreErrors: [
61
- // /is potentially unsafe when doing server-side rendering\. Try changing it to/,
62
- // ],
63
- // });
59
+ // TODO: Figure out why this is causing a warning and causing the following check to fail in chrome.
60
+ // await page.checkConsoleErrors({
61
+ // ignoreErrors: [
62
+ // /is potentially unsafe when doing server-side rendering\. Try changing it to/,
63
+ // ],
64
+ // });
64
65
 
65
66
  const doc = await page.$eval(editable, getDocFromElement);
66
67
  expect(doc).toMatchCustomDocSnapshot(testName);