@atlaskit/editor-plugin-table 3.0.1 → 3.0.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.
- package/CHANGELOG.md +15 -0
- package/dist/cjs/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +12 -1
- package/dist/cjs/plugins/table/ui/consts.js +6 -4
- package/dist/cjs/plugins/table/ui/ui-styles.js +1 -1
- package/dist/es2019/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +14 -3
- package/dist/es2019/plugins/table/ui/consts.js +5 -4
- package/dist/es2019/plugins/table/ui/ui-styles.js +2 -2
- package/dist/esm/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +14 -3
- package/dist/esm/plugins/table/ui/consts.js +5 -4
- package/dist/esm/plugins/table/ui/ui-styles.js +1 -1
- package/dist/types/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.d.ts +6 -5
- package/dist/types/plugins/table/pm-plugins/sticky-headers/util.d.ts +1 -1
- package/dist/types/plugins/table/ui/consts.d.ts +2 -1
- package/dist/types-ts4.5/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.d.ts +6 -5
- package/dist/types-ts4.5/plugins/table/pm-plugins/sticky-headers/util.d.ts +1 -1
- package/dist/types-ts4.5/plugins/table/ui/consts.d.ts +2 -1
- package/package.json +4 -4
- package/src/__tests__/integration/arrow-down-into-table.ts +2 -0
- package/src/__tests__/integration/auto-size.ts +3 -0
- package/src/__tests__/integration/cell-selection.ts +3 -0
- package/src/__tests__/integration/delete-columns.ts +2 -0
- package/src/__tests__/integration/delete-last-column-in-full-width.ts +2 -0
- package/src/__tests__/integration/delete-last-column-with-empty-action.ts +2 -0
- package/src/__tests__/integration/delete-last-row-with-empty-action.ts +2 -0
- package/src/__tests__/integration/delete-rows.ts +3 -0
- package/src/__tests__/integration/delete-table-when-selected.ts +3 -0
- package/src/__tests__/integration/deleting-empty-paragraph-under-table.ts +2 -0
- package/src/__tests__/integration/even-columns.ts +3 -0
- package/src/__tests__/integration/horizontal-scroll-shadows.ts +2 -0
- package/src/__tests__/integration/horizontal-scroll.ts +4 -1
- package/src/__tests__/integration/insert-cell-header-with-strong-mark.ts +2 -0
- package/src/__tests__/integration/insert-row-inside-layout.ts +3 -0
- package/src/__tests__/integration/layout.ts +3 -0
- package/src/__tests__/integration/meta-arrowup-cursor-in-first-row.ts +2 -0
- package/src/__tests__/integration/resize-handler.ts +3 -0
- package/src/__tests__/integration/resize.ts +4 -1
- package/src/__tests__/integration/scale.ts +3 -0
- package/src/__tests__/integration/sticky-header.ts +3 -1
- package/src/__tests__/unit/analytics.ts +5 -1
- package/src/__tests__/unit/collab.ts +4 -1
- package/src/__tests__/unit/commands/go-to-next-cell.ts +4 -1
- package/src/__tests__/unit/commands/insert.ts +7 -2
- package/src/__tests__/unit/commands/misc.ts +4 -1
- package/src/__tests__/unit/commands/sort.ts +3 -0
- package/src/__tests__/unit/commands.ts +4 -1
- package/src/__tests__/unit/copy-paste.ts +6 -1
- package/src/__tests__/unit/event-handlers/index.ts +4 -1
- package/src/__tests__/unit/event-handlers.ts +4 -1
- package/src/__tests__/unit/fix-tables.ts +4 -1
- package/src/__tests__/unit/get-toolbar-config.ts +4 -1
- package/src/__tests__/unit/handlers.ts +4 -1
- package/src/__tests__/unit/hover-selection.ts +5 -1
- package/src/__tests__/unit/index-with-fake-timers.ts +4 -2
- package/src/__tests__/unit/index.ts +8 -2
- package/src/__tests__/unit/layout.ts +4 -1
- package/src/__tests__/unit/nodeviews/OverflowShadowsObserver.ts +1 -0
- package/src/__tests__/unit/nodeviews/TableComponent.tsx +3 -2
- package/src/__tests__/unit/nodeviews/TableContainer.tsx +3 -1
- package/src/__tests__/unit/nodeviews/cell.ts +4 -1
- package/src/__tests__/unit/nodeviews/table.ts +5 -1
- package/src/__tests__/unit/pm-plugins/decorations/column-controls.ts +2 -0
- package/src/__tests__/unit/pm-plugins/decorations/column-resizing.ts +4 -1
- package/src/__tests__/unit/pm-plugins/decorations/plugin.ts +4 -1
- package/src/__tests__/unit/pm-plugins/main.ts +4 -1
- package/src/__tests__/unit/pm-plugins/safari-delete-composition-text-issue-workaround.ts +4 -1
- package/src/__tests__/unit/pm-plugins/sticky-headers/tableRow.tsx +6 -2
- package/src/__tests__/unit/pm-plugins/table-local-id.ts +9 -2
- package/src/__tests__/unit/pm-plugins/table-resizing/colgroup.ts +2 -0
- package/src/__tests__/unit/pm-plugins/table-resizing/event-handlers.ts +4 -1
- package/src/__tests__/unit/pm-plugins/table-width.ts +4 -1
- package/src/__tests__/unit/sort-column.ts +4 -1
- package/src/__tests__/unit/toolbar.ts +3 -0
- package/src/__tests__/unit/transforms/delete-columns.ts +4 -1
- package/src/__tests__/unit/transforms/delete-rows.ts +4 -1
- package/src/__tests__/unit/transforms/merging.ts +4 -1
- package/src/__tests__/unit/ui/ContextualMenu.tsx +3 -0
- package/src/__tests__/unit/ui/CornerControls.tsx +4 -1
- package/src/__tests__/unit/ui/FloatingContextualButton.tsx +4 -1
- package/src/__tests__/unit/ui/FloatingContextualMenu.tsx +3 -0
- package/src/__tests__/unit/ui/FloatingDeleteButton.tsx +4 -1
- package/src/__tests__/unit/ui/FloatingInsertButton.tsx +4 -1
- package/src/__tests__/unit/ui/RowControls.tsx +5 -1
- package/src/__tests__/unit/ui/TableFloatingControls.tsx +4 -1
- package/src/__tests__/unit/undo-redo.ts +5 -1
- package/src/__tests__/unit/utils/collapse.ts +4 -1
- package/src/__tests__/unit/utils/nodes.ts +4 -1
- package/src/__tests__/unit/utils/row-controls.ts +4 -1
- package/src/__tests__/unit/utils/table.ts +2 -0
- package/src/__tests__/unit/utils.ts +4 -1
- package/src/__tests__/visual-regression/__image_snapshots__/cell-options-menu-ts-table-cell-options-menu-delete-column-menu-item-should-remove-the-table-column-on-click-1-snap.png +2 -2
- package/src/__tests__/visual-regression/__image_snapshots__/cell-options-menu-ts-table-cell-options-menu-delete-column-menu-item-visual-hints-should-be-added-to-the-table-column-on-hover-1-snap.png +2 -2
- 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
- package/src/__tests__/visual-regression/__image_snapshots__/cell-options-menu-ts-table-cell-options-menu-delete-row-menu-item-visual-hints-should-be-added-to-the-table-row-on-hover-1-snap.png +2 -2
- package/src/__tests__/visual-regression/cell-options-menu.ts +3 -1
- package/src/__tests__/visual-regression/index.ts +4 -1
- package/src/__tests__/visual-regression/sticky-header.ts +4 -1
- package/src/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.ts +26 -7
- package/src/plugins/table/pm-plugins/sticky-headers/util.ts +1 -1
- package/src/plugins/table/ui/consts.ts +13 -2
- package/src/plugins/table/ui/ui-styles.ts +2 -2
- package/src/__tests__/integration/__snapshots__/floating-toolbar.ts.snap +0 -613
- package/src/__tests__/integration/floating-toolbar.ts +0 -374
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-table
|
|
2
2
|
|
|
3
|
+
## 3.0.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`65b155b2787`](https://bitbucket.org/atlassian/atlassian-frontend/commits/65b155b2787) - [ux] ED-19172: Updated tableHeaderCellBackgroundColor to use non-transparent token."
|
|
8
|
+
- [`cd06919038d`](https://bitbucket.org/atlassian/atlassian-frontend/commits/cd06919038d) - [ux] Fix Firefox scrolling stuck in some certain height when scroll up from bottom
|
|
9
|
+
- [`0b1f816e4fa`](https://bitbucket.org/atlassian/atlassian-frontend/commits/0b1f816e4fa) - [ux] Added akEditorTableHeaderCellBackground to store fallback.
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 3.0.2
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [`37c62369dae`](https://bitbucket.org/atlassian/atlassian-frontend/commits/37c62369dae) - NO-ISSUE Import doc builder types from editor-common
|
|
17
|
+
|
|
3
18
|
## 3.0.1
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -248,6 +248,7 @@ var TableRowNodeView = /*#__PURE__*/function () {
|
|
|
248
248
|
this.lastTimePainted = 0;
|
|
249
249
|
this.isHeaderRow = supportedHeaderRow(node);
|
|
250
250
|
this.isSticky = false;
|
|
251
|
+
this.lastStickyTimestamp = undefined;
|
|
251
252
|
if (this.isHeaderRow) {
|
|
252
253
|
this.dom.setAttribute('data-header-row', 'true');
|
|
253
254
|
this.subscribe();
|
|
@@ -393,6 +394,7 @@ var TableRowNodeView = /*#__PURE__*/function () {
|
|
|
393
394
|
if (!entry.isIntersecting && !sentinelIsBelowScrollArea) {
|
|
394
395
|
var _entry$rootBounds3;
|
|
395
396
|
_this4.tree && _this4.makeHeaderRowSticky(_this4.tree, (_entry$rootBounds3 = entry.rootBounds) === null || _entry$rootBounds3 === void 0 ? void 0 : _entry$rootBounds3.top);
|
|
397
|
+
_this4.lastStickyTimestamp = Date.now();
|
|
396
398
|
} else {
|
|
397
399
|
table && _this4.makeRowHeaderNotSticky(table);
|
|
398
400
|
}
|
|
@@ -401,12 +403,21 @@ var TableRowNodeView = /*#__PURE__*/function () {
|
|
|
401
403
|
var _entry$rootBounds4;
|
|
402
404
|
var sentinelIsAboveScrollArea = entry.boundingClientRect.top - _this4.dom.offsetHeight < (((_entry$rootBounds4 = entry.rootBounds) === null || _entry$rootBounds4 === void 0 ? void 0 : _entry$rootBounds4.top) || 0);
|
|
403
405
|
if (table && !entry.isIntersecting && sentinelIsAboveScrollArea) {
|
|
404
|
-
|
|
406
|
+
// Not a perfect solution, but need to this code specific for FireFox ED-19177
|
|
407
|
+
if (_utils.browser.gecko) {
|
|
408
|
+
if (_this4.lastStickyTimestamp && Date.now() - _this4.lastStickyTimestamp > _consts.STICKY_HEADER_TOGGLE_TOLERANCE_MS) {
|
|
409
|
+
_this4.makeRowHeaderNotSticky(table);
|
|
410
|
+
}
|
|
411
|
+
} else {
|
|
412
|
+
_this4.makeRowHeaderNotSticky(table);
|
|
413
|
+
}
|
|
405
414
|
} else if (entry.isIntersecting && sentinelIsAboveScrollArea) {
|
|
406
415
|
var _entry$rootBounds5;
|
|
407
416
|
_this4.tree && _this4.makeHeaderRowSticky(_this4.tree, entry === null || entry === void 0 ? void 0 : (_entry$rootBounds5 = entry.rootBounds) === null || _entry$rootBounds5 === void 0 ? void 0 : _entry$rootBounds5.top);
|
|
417
|
+
_this4.lastStickyTimestamp = Date.now();
|
|
408
418
|
}
|
|
409
419
|
}
|
|
420
|
+
return;
|
|
410
421
|
});
|
|
411
422
|
}, {
|
|
412
423
|
root: this.editorScrollableElement
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.tableToolbarSize = exports.tableToolbarSelectedColor = exports.tableToolbarDeleteColor = exports.tableToolbarColor = exports.tableTextColor = exports.tableScrollbarOffset = exports.tablePadding = exports.tableOverflowShadowWidth = exports.tableMarginFullWidthMode = exports.tableInsertColumnButtonSize = exports.tableInsertColumnButtonOffset = exports.tableHeaderCellBackgroundColor = exports.tableFloatingControlsColor = exports.tableDeleteButtonSize = exports.tableDeleteButtonOffset = exports.tableControlsSpacing = exports.tableCellSelectedDeleteIconColor = exports.tableCellSelectedDeleteIconBackground = exports.tableCellSelectedColor = exports.tableCellHoverDeleteIconColor = exports.tableCellHoverDeleteIconBackground = exports.tableCellDeleteColor = exports.tableCellBackgroundColor = exports.tableBorderSelectedColor = exports.tableBorderRadiusSize = exports.tableBorderDeleteColor = exports.tableBorderColor = exports.stickyRowZIndex = exports.stickyRowOffsetTop = exports.stickyHeaderBorderBottomWidth = exports.resizeLineWidth = exports.resizeHandlerZIndex = exports.resizeHandlerAreaWidth = exports.lineMarkerSize = exports.lineMarkerOffsetFromColumnControls = exports.layoutButtonSize = exports.contextualMenuTriggerSize = exports.contextualMenuDropdownWidth = exports.columnResizeHandleZIndex = exports.columnControlsZIndex = exports.columnControlsSelectedZIndex = exports.columnControlsDecorationHeight = exports.TABLE_SNAP_GAP = exports.TABLE_HIGHLIGHT_TOLERANCE = exports.TABLE_HIGHLIGHT_GAP = void 0;
|
|
6
|
+
exports.tableToolbarSize = exports.tableToolbarSelectedColor = exports.tableToolbarDeleteColor = exports.tableToolbarColor = exports.tableTextColor = exports.tableScrollbarOffset = exports.tablePadding = exports.tableOverflowShadowWidth = exports.tableMarginFullWidthMode = exports.tableInsertColumnButtonSize = exports.tableInsertColumnButtonOffset = exports.tableHeaderCellBackgroundColor = exports.tableFloatingControlsColor = exports.tableDeleteButtonSize = exports.tableDeleteButtonOffset = exports.tableControlsSpacing = exports.tableCellSelectedDeleteIconColor = exports.tableCellSelectedDeleteIconBackground = exports.tableCellSelectedColor = exports.tableCellHoverDeleteIconColor = exports.tableCellHoverDeleteIconBackground = exports.tableCellDeleteColor = exports.tableCellBackgroundColor = exports.tableBorderSelectedColor = exports.tableBorderRadiusSize = exports.tableBorderDeleteColor = exports.tableBorderColor = exports.stickyRowZIndex = exports.stickyRowOffsetTop = exports.stickyHeaderBorderBottomWidth = exports.resizeLineWidth = exports.resizeHandlerZIndex = exports.resizeHandlerAreaWidth = exports.lineMarkerSize = exports.lineMarkerOffsetFromColumnControls = exports.layoutButtonSize = exports.contextualMenuTriggerSize = exports.contextualMenuDropdownWidth = exports.columnResizeHandleZIndex = exports.columnControlsZIndex = exports.columnControlsSelectedZIndex = exports.columnControlsDecorationHeight = exports.TABLE_SNAP_GAP = exports.TABLE_HIGHLIGHT_TOLERANCE = exports.TABLE_HIGHLIGHT_GAP = exports.STICKY_HEADER_TOGGLE_TOLERANCE_MS = void 0;
|
|
7
7
|
var _styles = require("@atlaskit/editor-common/styles");
|
|
8
8
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
9
9
|
var _colors = require("@atlaskit/theme/colors");
|
|
@@ -21,8 +21,8 @@ var tableCellBackgroundColor = (0, _components.themed)({
|
|
|
21
21
|
});
|
|
22
22
|
exports.tableCellBackgroundColor = tableCellBackgroundColor;
|
|
23
23
|
var tableHeaderCellBackgroundColor = (0, _components.themed)({
|
|
24
|
-
light: "var(--ds-background-
|
|
25
|
-
dark: "var(--ds-background-
|
|
24
|
+
light: "var(--ds-background-accent-gray-subtlest, ".concat(_editorSharedStyles.akEditorTableHeaderCellBackground, ")"),
|
|
25
|
+
dark: "var(--ds-background-accent-gray-subtlest, ".concat(_editorSharedStyles.akEditorTableHeaderCellBackgroundDark, ")")
|
|
26
26
|
});
|
|
27
27
|
exports.tableHeaderCellBackgroundColor = tableHeaderCellBackgroundColor;
|
|
28
28
|
var tableToolbarColor = (0, _components.themed)({
|
|
@@ -150,4 +150,6 @@ exports.TABLE_SNAP_GAP = TABLE_SNAP_GAP;
|
|
|
150
150
|
var TABLE_HIGHLIGHT_GAP = 10;
|
|
151
151
|
exports.TABLE_HIGHLIGHT_GAP = TABLE_HIGHLIGHT_GAP;
|
|
152
152
|
var TABLE_HIGHLIGHT_TOLERANCE = 2;
|
|
153
|
-
exports.TABLE_HIGHLIGHT_TOLERANCE = TABLE_HIGHLIGHT_TOLERANCE;
|
|
153
|
+
exports.TABLE_HIGHLIGHT_TOLERANCE = TABLE_HIGHLIGHT_TOLERANCE;
|
|
154
|
+
var STICKY_HEADER_TOGGLE_TOLERANCE_MS = 5;
|
|
155
|
+
exports.STICKY_HEADER_TOGGLE_TOLERANCE_MS = STICKY_HEADER_TOGGLE_TOLERANCE_MS;
|
|
@@ -95,6 +95,6 @@ var getLastColumnResizerOverrides = function getLastColumnResizerOverrides() {
|
|
|
95
95
|
return (0, _platformFeatureFlags.getBooleanFF)('platform.editor.custom-table-width') ? (0, _react.css)(_templateObject22 || (_templateObject22 = (0, _taggedTemplateLiteral2.default)(["\n tr\n th:last-child\n .", ",\n tr\n td:last-child\n .", " {\n background-color: transparent;\n position: absolute;\n width: ", "px;\n height: 100%;\n top: 0;\n right: 0;\n cursor: col-resize;\n z-index: ", ";\n }\n "])), _types.TableCssClassName.RESIZE_HANDLE_DECORATION, _types.TableCssClassName.RESIZE_HANDLE_DECORATION, _consts.resizeHandlerAreaWidth, _consts.resizeHandlerZIndex) : '';
|
|
96
96
|
};
|
|
97
97
|
var resizeHandle = function resizeHandle(props) {
|
|
98
|
-
return (0, _react.css)(_templateObject23 || (_templateObject23 = (0, _taggedTemplateLiteral2.default)(["\n .", " {\n .", " {\n background-color: transparent;\n position: absolute;\n width: ", "px;\n height: 100%;\n top: 0;\n right: -", "px;\n cursor: col-resize;\n z-index: ", ";\n }\n\n ", "\n\n td.", "::before {\n content: ' ';\n position: absolute;\n left:
|
|
98
|
+
return (0, _react.css)(_templateObject23 || (_templateObject23 = (0, _taggedTemplateLiteral2.default)(["\n .", " {\n .", " {\n background-color: transparent;\n position: absolute;\n width: ", "px;\n height: 100%;\n top: 0;\n right: -", "px;\n cursor: col-resize;\n z-index: ", ";\n }\n\n ", "\n\n td.", "::before {\n content: ' ';\n position: absolute;\n left: ", ";\n top: -1px;\n width: ", "px;\n height: calc(100% + 2px);\n background-color: ", ";\n z-index: ", ";\n }\n\n th.", "::before {\n content: ' ';\n left: ", ";\n position: absolute;\n width: ", "px;\n height: calc(100% + ", "px);\n background-color: ", ";\n z-index: ", ";\n top: -", "px;\n }\n\n td.", "::before {\n content: ' ';\n position: absolute;\n right: -1px;\n top: -1px;\n width: ", "px;\n height: calc(100% + 2px);\n background-color: ", ";\n z-index: ", ";\n }\n\n th.", "::before {\n content: ' ';\n right: -1px;\n position: absolute;\n width: ", "px;\n height: calc(100% + ", "px);\n background-color: ", ";\n z-index: ", ";\n top: -", "px;\n }\n\n table\n tr:first-of-type\n th.", "\n .", "::after,\n table\n tr:first-of-type\n td.", "\n .", "::after {\n top: -", "px;\n height: calc(100% + ", "px);\n }\n }\n"])), _types.TableCssClassName.TABLE_CONTAINER, _types.TableCssClassName.RESIZE_HANDLE_DECORATION, _consts.resizeHandlerAreaWidth, _consts.resizeHandlerAreaWidth / 2, _consts.resizeHandlerZIndex, getLastColumnResizerOverrides(), _types.TableCssClassName.WITH_RESIZE_LINE, "var(--ds-space-negative-025, -2px)", _consts.resizeLineWidth, (0, _consts.tableBorderSelectedColor)(props), _consts.columnControlsZIndex * 2, _types.TableCssClassName.WITH_RESIZE_LINE, "var(--ds-space-negative-025, -2px)", _consts.resizeLineWidth, _consts.tableToolbarSize + _styles.tableCellBorderWidth, (0, _consts.tableBorderSelectedColor)(props), _consts.columnControlsZIndex * 2, _consts.tableToolbarSize + _styles.tableCellBorderWidth, _types.TableCssClassName.WITH_RESIZE_LINE_LAST_COLUMN, _consts.resizeLineWidth, (0, _consts.tableBorderSelectedColor)(props), _consts.columnControlsZIndex * 2, _types.TableCssClassName.WITH_RESIZE_LINE_LAST_COLUMN, _consts.resizeLineWidth, _consts.tableToolbarSize + _styles.tableCellBorderWidth, (0, _consts.tableBorderSelectedColor)(props), _consts.columnControlsZIndex * 2, _consts.tableToolbarSize + _styles.tableCellBorderWidth, _types.TableCssClassName.WITH_RESIZE_LINE, _types.TableCssClassName.RESIZE_HANDLE_DECORATION, _types.TableCssClassName.WITH_RESIZE_LINE, _types.TableCssClassName.RESIZE_HANDLE_DECORATION, _consts.tableToolbarSize + _styles.tableCellBorderWidth, _consts.tableToolbarSize + _styles.tableCellBorderWidth);
|
|
99
99
|
};
|
|
100
100
|
exports.resizeHandle = resizeHandle;
|
|
@@ -2,9 +2,9 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
import debounce from 'lodash/debounce';
|
|
3
3
|
import throttle from 'lodash/throttle';
|
|
4
4
|
import { findOverflowScrollParent } from '@atlaskit/editor-common/ui';
|
|
5
|
-
import { mapChildren } from '@atlaskit/editor-common/utils';
|
|
5
|
+
import { browser, mapChildren } from '@atlaskit/editor-common/utils';
|
|
6
6
|
import { TableCssClassName as ClassName, TableCssClassName } from '../../../types';
|
|
7
|
-
import { stickyHeaderBorderBottomWidth, stickyRowOffsetTop, tableControlsSpacing, tableScrollbarOffset } from '../../../ui/consts';
|
|
7
|
+
import { STICKY_HEADER_TOGGLE_TOLERANCE_MS, stickyHeaderBorderBottomWidth, stickyRowOffsetTop, tableControlsSpacing, tableScrollbarOffset } from '../../../ui/consts';
|
|
8
8
|
import { pluginKey as tablePluginKey } from '../../plugin-key';
|
|
9
9
|
import { syncStickyRowToTable, updateStickyMargins as updateTableMargin } from '../../table-resizing/utils/dom';
|
|
10
10
|
import { updateStickyState } from '../commands';
|
|
@@ -230,6 +230,7 @@ export class TableRowNodeView {
|
|
|
230
230
|
this.lastTimePainted = 0;
|
|
231
231
|
this.isHeaderRow = supportedHeaderRow(node);
|
|
232
232
|
this.isSticky = false;
|
|
233
|
+
this.lastStickyTimestamp = undefined;
|
|
233
234
|
if (this.isHeaderRow) {
|
|
234
235
|
this.dom.setAttribute('data-header-row', 'true');
|
|
235
236
|
this.subscribe();
|
|
@@ -361,6 +362,7 @@ export class TableRowNodeView {
|
|
|
361
362
|
if (!entry.isIntersecting && !sentinelIsBelowScrollArea) {
|
|
362
363
|
var _entry$rootBounds3;
|
|
363
364
|
this.tree && this.makeHeaderRowSticky(this.tree, (_entry$rootBounds3 = entry.rootBounds) === null || _entry$rootBounds3 === void 0 ? void 0 : _entry$rootBounds3.top);
|
|
365
|
+
this.lastStickyTimestamp = Date.now();
|
|
364
366
|
} else {
|
|
365
367
|
table && this.makeRowHeaderNotSticky(table);
|
|
366
368
|
}
|
|
@@ -369,12 +371,21 @@ export class TableRowNodeView {
|
|
|
369
371
|
var _entry$rootBounds4;
|
|
370
372
|
const sentinelIsAboveScrollArea = entry.boundingClientRect.top - this.dom.offsetHeight < (((_entry$rootBounds4 = entry.rootBounds) === null || _entry$rootBounds4 === void 0 ? void 0 : _entry$rootBounds4.top) || 0);
|
|
371
373
|
if (table && !entry.isIntersecting && sentinelIsAboveScrollArea) {
|
|
372
|
-
this
|
|
374
|
+
// Not a perfect solution, but need to this code specific for FireFox ED-19177
|
|
375
|
+
if (browser.gecko) {
|
|
376
|
+
if (this.lastStickyTimestamp && Date.now() - this.lastStickyTimestamp > STICKY_HEADER_TOGGLE_TOLERANCE_MS) {
|
|
377
|
+
this.makeRowHeaderNotSticky(table);
|
|
378
|
+
}
|
|
379
|
+
} else {
|
|
380
|
+
this.makeRowHeaderNotSticky(table);
|
|
381
|
+
}
|
|
373
382
|
} else if (entry.isIntersecting && sentinelIsAboveScrollArea) {
|
|
374
383
|
var _entry$rootBounds5;
|
|
375
384
|
this.tree && this.makeHeaderRowSticky(this.tree, entry === null || entry === void 0 ? void 0 : (_entry$rootBounds5 = entry.rootBounds) === null || _entry$rootBounds5 === void 0 ? void 0 : _entry$rootBounds5.top);
|
|
385
|
+
this.lastStickyTimestamp = Date.now();
|
|
376
386
|
}
|
|
377
387
|
}
|
|
388
|
+
return;
|
|
378
389
|
});
|
|
379
390
|
}, {
|
|
380
391
|
root: this.editorScrollableElement
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { tableCellBorderWidth, tableMarginTop } from '@atlaskit/editor-common/styles';
|
|
2
|
-
import { akEditorTableBorder, akEditorTableBorderDark, akEditorTableBorderSelected, akEditorTableCellBlanketDeleted, akEditorTableCellBlanketSelected, akEditorTableToolbar, akEditorTableToolbarDark, akEditorTableToolbarSize, akEditorUnitZIndex, akRichMediaResizeZIndex } from '@atlaskit/editor-shared-styles';
|
|
2
|
+
import { akEditorTableBorder, akEditorTableBorderDark, akEditorTableBorderSelected, akEditorTableCellBlanketDeleted, akEditorTableCellBlanketSelected, akEditorTableHeaderCellBackground, akEditorTableHeaderCellBackgroundDark, akEditorTableToolbar, akEditorTableToolbarDark, akEditorTableToolbarSize, akEditorUnitZIndex, akRichMediaResizeZIndex } from '@atlaskit/editor-shared-styles';
|
|
3
3
|
import { B200, DN30, DN400, N0, N20, N200, N20A, N300, R300, R400, R75 } from '@atlaskit/theme/colors';
|
|
4
4
|
import { themed } from '@atlaskit/theme/components';
|
|
5
5
|
import { RESIZE_HANDLE_AREA_DECORATION_GAP } from '../types';
|
|
@@ -15,8 +15,8 @@ export const tableCellBackgroundColor = themed({
|
|
|
15
15
|
dark: `var(--ds-surface, ${DN30})`
|
|
16
16
|
});
|
|
17
17
|
export const tableHeaderCellBackgroundColor = themed({
|
|
18
|
-
light: `var(--ds-background-
|
|
19
|
-
dark: `var(--ds-background-
|
|
18
|
+
light: `var(--ds-background-accent-gray-subtlest, ${akEditorTableHeaderCellBackground})`,
|
|
19
|
+
dark: `var(--ds-background-accent-gray-subtlest, ${akEditorTableHeaderCellBackgroundDark})`
|
|
20
20
|
});
|
|
21
21
|
export const tableToolbarColor = themed({
|
|
22
22
|
light: `var(--ds-background-neutral-subtle, ${akEditorTableToolbar})`,
|
|
@@ -100,4 +100,5 @@ export const stickyHeaderBorderBottomWidth = 1;
|
|
|
100
100
|
export const tableOverflowShadowWidth = 8;
|
|
101
101
|
export const TABLE_SNAP_GAP = 9;
|
|
102
102
|
export const TABLE_HIGHLIGHT_GAP = 10;
|
|
103
|
-
export const TABLE_HIGHLIGHT_TOLERANCE = 2;
|
|
103
|
+
export const TABLE_HIGHLIGHT_TOLERANCE = 2;
|
|
104
|
+
export const STICKY_HEADER_TOGGLE_TOLERANCE_MS = 5;
|
|
@@ -429,7 +429,7 @@ export const resizeHandle = props => css`
|
|
|
429
429
|
td.${ClassName.WITH_RESIZE_LINE}::before {
|
|
430
430
|
content: ' ';
|
|
431
431
|
position: absolute;
|
|
432
|
-
left: -2px;
|
|
432
|
+
left: ${"var(--ds-space-negative-025, -2px)"};
|
|
433
433
|
top: -1px;
|
|
434
434
|
width: ${resizeLineWidth}px;
|
|
435
435
|
height: calc(100% + 2px);
|
|
@@ -439,7 +439,7 @@ export const resizeHandle = props => css`
|
|
|
439
439
|
|
|
440
440
|
th.${ClassName.WITH_RESIZE_LINE}::before {
|
|
441
441
|
content: ' ';
|
|
442
|
-
left: -2px;
|
|
442
|
+
left: ${"var(--ds-space-negative-025, -2px)"};
|
|
443
443
|
position: absolute;
|
|
444
444
|
width: ${resizeLineWidth}px;
|
|
445
445
|
height: calc(100% + ${tableToolbarSize + tableCellBorderWidth}px);
|
|
@@ -4,9 +4,9 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
4
4
|
import debounce from 'lodash/debounce';
|
|
5
5
|
import throttle from 'lodash/throttle';
|
|
6
6
|
import { findOverflowScrollParent } from '@atlaskit/editor-common/ui';
|
|
7
|
-
import { mapChildren } from '@atlaskit/editor-common/utils';
|
|
7
|
+
import { browser, mapChildren } from '@atlaskit/editor-common/utils';
|
|
8
8
|
import { TableCssClassName as ClassName, TableCssClassName } from '../../../types';
|
|
9
|
-
import { stickyHeaderBorderBottomWidth, stickyRowOffsetTop, tableControlsSpacing, tableScrollbarOffset } from '../../../ui/consts';
|
|
9
|
+
import { STICKY_HEADER_TOGGLE_TOLERANCE_MS, stickyHeaderBorderBottomWidth, stickyRowOffsetTop, tableControlsSpacing, tableScrollbarOffset } from '../../../ui/consts';
|
|
10
10
|
import { pluginKey as tablePluginKey } from '../../plugin-key';
|
|
11
11
|
import { syncStickyRowToTable, updateStickyMargins as updateTableMargin } from '../../table-resizing/utils/dom';
|
|
12
12
|
import { updateStickyState } from '../commands';
|
|
@@ -241,6 +241,7 @@ export var TableRowNodeView = /*#__PURE__*/function () {
|
|
|
241
241
|
this.lastTimePainted = 0;
|
|
242
242
|
this.isHeaderRow = supportedHeaderRow(node);
|
|
243
243
|
this.isSticky = false;
|
|
244
|
+
this.lastStickyTimestamp = undefined;
|
|
244
245
|
if (this.isHeaderRow) {
|
|
245
246
|
this.dom.setAttribute('data-header-row', 'true');
|
|
246
247
|
this.subscribe();
|
|
@@ -386,6 +387,7 @@ export var TableRowNodeView = /*#__PURE__*/function () {
|
|
|
386
387
|
if (!entry.isIntersecting && !sentinelIsBelowScrollArea) {
|
|
387
388
|
var _entry$rootBounds3;
|
|
388
389
|
_this4.tree && _this4.makeHeaderRowSticky(_this4.tree, (_entry$rootBounds3 = entry.rootBounds) === null || _entry$rootBounds3 === void 0 ? void 0 : _entry$rootBounds3.top);
|
|
390
|
+
_this4.lastStickyTimestamp = Date.now();
|
|
389
391
|
} else {
|
|
390
392
|
table && _this4.makeRowHeaderNotSticky(table);
|
|
391
393
|
}
|
|
@@ -394,12 +396,21 @@ export var TableRowNodeView = /*#__PURE__*/function () {
|
|
|
394
396
|
var _entry$rootBounds4;
|
|
395
397
|
var sentinelIsAboveScrollArea = entry.boundingClientRect.top - _this4.dom.offsetHeight < (((_entry$rootBounds4 = entry.rootBounds) === null || _entry$rootBounds4 === void 0 ? void 0 : _entry$rootBounds4.top) || 0);
|
|
396
398
|
if (table && !entry.isIntersecting && sentinelIsAboveScrollArea) {
|
|
397
|
-
|
|
399
|
+
// Not a perfect solution, but need to this code specific for FireFox ED-19177
|
|
400
|
+
if (browser.gecko) {
|
|
401
|
+
if (_this4.lastStickyTimestamp && Date.now() - _this4.lastStickyTimestamp > STICKY_HEADER_TOGGLE_TOLERANCE_MS) {
|
|
402
|
+
_this4.makeRowHeaderNotSticky(table);
|
|
403
|
+
}
|
|
404
|
+
} else {
|
|
405
|
+
_this4.makeRowHeaderNotSticky(table);
|
|
406
|
+
}
|
|
398
407
|
} else if (entry.isIntersecting && sentinelIsAboveScrollArea) {
|
|
399
408
|
var _entry$rootBounds5;
|
|
400
409
|
_this4.tree && _this4.makeHeaderRowSticky(_this4.tree, entry === null || entry === void 0 ? void 0 : (_entry$rootBounds5 = entry.rootBounds) === null || _entry$rootBounds5 === void 0 ? void 0 : _entry$rootBounds5.top);
|
|
410
|
+
_this4.lastStickyTimestamp = Date.now();
|
|
401
411
|
}
|
|
402
412
|
}
|
|
413
|
+
return;
|
|
403
414
|
});
|
|
404
415
|
}, {
|
|
405
416
|
root: this.editorScrollableElement
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { tableCellBorderWidth, tableMarginTop } from '@atlaskit/editor-common/styles';
|
|
2
|
-
import { akEditorTableBorder, akEditorTableBorderDark, akEditorTableBorderSelected, akEditorTableCellBlanketDeleted, akEditorTableCellBlanketSelected, akEditorTableToolbar, akEditorTableToolbarDark, akEditorTableToolbarSize, akEditorUnitZIndex, akRichMediaResizeZIndex } from '@atlaskit/editor-shared-styles';
|
|
2
|
+
import { akEditorTableBorder, akEditorTableBorderDark, akEditorTableBorderSelected, akEditorTableCellBlanketDeleted, akEditorTableCellBlanketSelected, akEditorTableHeaderCellBackground, akEditorTableHeaderCellBackgroundDark, akEditorTableToolbar, akEditorTableToolbarDark, akEditorTableToolbarSize, akEditorUnitZIndex, akRichMediaResizeZIndex } from '@atlaskit/editor-shared-styles';
|
|
3
3
|
import { B200, DN30, DN400, N0, N20, N200, N20A, N300, R300, R400, R75 } from '@atlaskit/theme/colors';
|
|
4
4
|
import { themed } from '@atlaskit/theme/components';
|
|
5
5
|
import { RESIZE_HANDLE_AREA_DECORATION_GAP } from '../types';
|
|
@@ -15,8 +15,8 @@ export var tableCellBackgroundColor = themed({
|
|
|
15
15
|
dark: "var(--ds-surface, ".concat(DN30, ")")
|
|
16
16
|
});
|
|
17
17
|
export var tableHeaderCellBackgroundColor = themed({
|
|
18
|
-
light: "var(--ds-background-
|
|
19
|
-
dark: "var(--ds-background-
|
|
18
|
+
light: "var(--ds-background-accent-gray-subtlest, ".concat(akEditorTableHeaderCellBackground, ")"),
|
|
19
|
+
dark: "var(--ds-background-accent-gray-subtlest, ".concat(akEditorTableHeaderCellBackgroundDark, ")")
|
|
20
20
|
});
|
|
21
21
|
export var tableToolbarColor = themed({
|
|
22
22
|
light: "var(--ds-background-neutral-subtle, ".concat(akEditorTableToolbar, ")"),
|
|
@@ -100,4 +100,5 @@ export var stickyHeaderBorderBottomWidth = 1;
|
|
|
100
100
|
export var tableOverflowShadowWidth = 8;
|
|
101
101
|
export var TABLE_SNAP_GAP = 9;
|
|
102
102
|
export var TABLE_HIGHLIGHT_GAP = 10;
|
|
103
|
-
export var TABLE_HIGHLIGHT_TOLERANCE = 2;
|
|
103
|
+
export var TABLE_HIGHLIGHT_TOLERANCE = 2;
|
|
104
|
+
export var STICKY_HEADER_TOGGLE_TOLERANCE_MS = 5;
|
|
@@ -75,5 +75,5 @@ var getLastColumnResizerOverrides = function getLastColumnResizerOverrides() {
|
|
|
75
75
|
return getBooleanFF('platform.editor.custom-table-width') ? css(_templateObject22 || (_templateObject22 = _taggedTemplateLiteral(["\n tr\n th:last-child\n .", ",\n tr\n td:last-child\n .", " {\n background-color: transparent;\n position: absolute;\n width: ", "px;\n height: 100%;\n top: 0;\n right: 0;\n cursor: col-resize;\n z-index: ", ";\n }\n "])), ClassName.RESIZE_HANDLE_DECORATION, ClassName.RESIZE_HANDLE_DECORATION, resizeHandlerAreaWidth, resizeHandlerZIndex) : '';
|
|
76
76
|
};
|
|
77
77
|
export var resizeHandle = function resizeHandle(props) {
|
|
78
|
-
return css(_templateObject23 || (_templateObject23 = _taggedTemplateLiteral(["\n .", " {\n .", " {\n background-color: transparent;\n position: absolute;\n width: ", "px;\n height: 100%;\n top: 0;\n right: -", "px;\n cursor: col-resize;\n z-index: ", ";\n }\n\n ", "\n\n td.", "::before {\n content: ' ';\n position: absolute;\n left:
|
|
78
|
+
return css(_templateObject23 || (_templateObject23 = _taggedTemplateLiteral(["\n .", " {\n .", " {\n background-color: transparent;\n position: absolute;\n width: ", "px;\n height: 100%;\n top: 0;\n right: -", "px;\n cursor: col-resize;\n z-index: ", ";\n }\n\n ", "\n\n td.", "::before {\n content: ' ';\n position: absolute;\n left: ", ";\n top: -1px;\n width: ", "px;\n height: calc(100% + 2px);\n background-color: ", ";\n z-index: ", ";\n }\n\n th.", "::before {\n content: ' ';\n left: ", ";\n position: absolute;\n width: ", "px;\n height: calc(100% + ", "px);\n background-color: ", ";\n z-index: ", ";\n top: -", "px;\n }\n\n td.", "::before {\n content: ' ';\n position: absolute;\n right: -1px;\n top: -1px;\n width: ", "px;\n height: calc(100% + 2px);\n background-color: ", ";\n z-index: ", ";\n }\n\n th.", "::before {\n content: ' ';\n right: -1px;\n position: absolute;\n width: ", "px;\n height: calc(100% + ", "px);\n background-color: ", ";\n z-index: ", ";\n top: -", "px;\n }\n\n table\n tr:first-of-type\n th.", "\n .", "::after,\n table\n tr:first-of-type\n td.", "\n .", "::after {\n top: -", "px;\n height: calc(100% + ", "px);\n }\n }\n"])), ClassName.TABLE_CONTAINER, ClassName.RESIZE_HANDLE_DECORATION, resizeHandlerAreaWidth, resizeHandlerAreaWidth / 2, resizeHandlerZIndex, getLastColumnResizerOverrides(), ClassName.WITH_RESIZE_LINE, "var(--ds-space-negative-025, -2px)", resizeLineWidth, tableBorderSelectedColor(props), columnControlsZIndex * 2, ClassName.WITH_RESIZE_LINE, "var(--ds-space-negative-025, -2px)", resizeLineWidth, tableToolbarSize + tableCellBorderWidth, tableBorderSelectedColor(props), columnControlsZIndex * 2, tableToolbarSize + tableCellBorderWidth, ClassName.WITH_RESIZE_LINE_LAST_COLUMN, resizeLineWidth, tableBorderSelectedColor(props), columnControlsZIndex * 2, ClassName.WITH_RESIZE_LINE_LAST_COLUMN, resizeLineWidth, tableToolbarSize + tableCellBorderWidth, tableBorderSelectedColor(props), columnControlsZIndex * 2, tableToolbarSize + tableCellBorderWidth, ClassName.WITH_RESIZE_LINE, ClassName.RESIZE_HANDLE_DECORATION, ClassName.WITH_RESIZE_LINE, ClassName.RESIZE_HANDLE_DECORATION, tableToolbarSize + tableCellBorderWidth, tableToolbarSize + tableCellBorderWidth);
|
|
79
79
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/// <reference types="lodash" />
|
|
2
|
-
import { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
3
|
-
import { Node as PmNode } from '@atlaskit/editor-prosemirror/model';
|
|
4
|
-
import { EditorView, NodeView } from '@atlaskit/editor-prosemirror/view';
|
|
5
|
-
import { TablePluginState } from '../../../types';
|
|
6
|
-
import { TableDOMElements } from './dom';
|
|
2
|
+
import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
3
|
+
import type { Node as PmNode } from '@atlaskit/editor-prosemirror/model';
|
|
4
|
+
import type { EditorView, NodeView } from '@atlaskit/editor-prosemirror/view';
|
|
5
|
+
import type { TablePluginState } from '../../../types';
|
|
6
|
+
import type { TableDOMElements } from './dom';
|
|
7
7
|
/**
|
|
8
8
|
* Check if a given node is a header row with this definition:
|
|
9
9
|
* - all children are tableHeader cells
|
|
@@ -26,6 +26,7 @@ export declare class TableRowNodeView implements NodeView {
|
|
|
26
26
|
focused: boolean;
|
|
27
27
|
topPosEditorElement: number;
|
|
28
28
|
isSticky: boolean;
|
|
29
|
+
lastStickyTimestamp: number | undefined;
|
|
29
30
|
lastTimePainted: number;
|
|
30
31
|
private intersectionObserver?;
|
|
31
32
|
private resizeObserver?;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { StickyPluginState } from './types';
|
|
1
|
+
import type { StickyPluginState } from './types';
|
|
2
2
|
export declare const findStickyHeaderForTable: (state: StickyPluginState, tablePos: number | undefined) => import("./types").RowStickyState | undefined;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Basic colors added to prevent content overflow in table cells.
|
|
3
3
|
*/
|
|
4
4
|
export declare const tableCellBackgroundColor: import("@atlaskit/theme").ThemedValue<"var(--ds-surface)">;
|
|
5
|
-
export declare const tableHeaderCellBackgroundColor: import("@atlaskit/theme").ThemedValue<"var(--ds-background-
|
|
5
|
+
export declare const tableHeaderCellBackgroundColor: import("@atlaskit/theme").ThemedValue<"var(--ds-background-accent-gray-subtlest)">;
|
|
6
6
|
export declare const tableToolbarColor: import("@atlaskit/theme").ThemedValue<"var(--ds-background-neutral-subtle)">;
|
|
7
7
|
export declare const tableTextColor: import("@atlaskit/theme").ThemedValue<"var(--ds-text-subtlest)">;
|
|
8
8
|
export declare const tableBorderColor: import("@atlaskit/theme").ThemedValue<"var(--ds-background-accent-gray-subtler)">;
|
|
@@ -46,3 +46,4 @@ export declare const tableOverflowShadowWidth = 8;
|
|
|
46
46
|
export declare const TABLE_SNAP_GAP = 9;
|
|
47
47
|
export declare const TABLE_HIGHLIGHT_GAP = 10;
|
|
48
48
|
export declare const TABLE_HIGHLIGHT_TOLERANCE = 2;
|
|
49
|
+
export declare const STICKY_HEADER_TOGGLE_TOLERANCE_MS = 5;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/// <reference types="lodash" />
|
|
2
|
-
import { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
3
|
-
import { Node as PmNode } from '@atlaskit/editor-prosemirror/model';
|
|
4
|
-
import { EditorView, NodeView } from '@atlaskit/editor-prosemirror/view';
|
|
5
|
-
import { TablePluginState } from '../../../types';
|
|
6
|
-
import { TableDOMElements } from './dom';
|
|
2
|
+
import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
3
|
+
import type { Node as PmNode } from '@atlaskit/editor-prosemirror/model';
|
|
4
|
+
import type { EditorView, NodeView } from '@atlaskit/editor-prosemirror/view';
|
|
5
|
+
import type { TablePluginState } from '../../../types';
|
|
6
|
+
import type { TableDOMElements } from './dom';
|
|
7
7
|
/**
|
|
8
8
|
* Check if a given node is a header row with this definition:
|
|
9
9
|
* - all children are tableHeader cells
|
|
@@ -26,6 +26,7 @@ export declare class TableRowNodeView implements NodeView {
|
|
|
26
26
|
focused: boolean;
|
|
27
27
|
topPosEditorElement: number;
|
|
28
28
|
isSticky: boolean;
|
|
29
|
+
lastStickyTimestamp: number | undefined;
|
|
29
30
|
lastTimePainted: number;
|
|
30
31
|
private intersectionObserver?;
|
|
31
32
|
private resizeObserver?;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { StickyPluginState } from './types';
|
|
1
|
+
import type { StickyPluginState } from './types';
|
|
2
2
|
export declare const findStickyHeaderForTable: (state: StickyPluginState, tablePos: number | undefined) => import("./types").RowStickyState | undefined;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Basic colors added to prevent content overflow in table cells.
|
|
3
3
|
*/
|
|
4
4
|
export declare const tableCellBackgroundColor: import("@atlaskit/theme").ThemedValue<"var(--ds-surface)">;
|
|
5
|
-
export declare const tableHeaderCellBackgroundColor: import("@atlaskit/theme").ThemedValue<"var(--ds-background-
|
|
5
|
+
export declare const tableHeaderCellBackgroundColor: import("@atlaskit/theme").ThemedValue<"var(--ds-background-accent-gray-subtlest)">;
|
|
6
6
|
export declare const tableToolbarColor: import("@atlaskit/theme").ThemedValue<"var(--ds-background-neutral-subtle)">;
|
|
7
7
|
export declare const tableTextColor: import("@atlaskit/theme").ThemedValue<"var(--ds-text-subtlest)">;
|
|
8
8
|
export declare const tableBorderColor: import("@atlaskit/theme").ThemedValue<"var(--ds-background-accent-gray-subtler)">;
|
|
@@ -46,3 +46,4 @@ export declare const tableOverflowShadowWidth = 8;
|
|
|
46
46
|
export declare const TABLE_SNAP_GAP = 9;
|
|
47
47
|
export declare const TABLE_HIGHLIGHT_GAP = 10;
|
|
48
48
|
export declare const TABLE_HIGHLIGHT_TOLERANCE = 2;
|
|
49
|
+
export declare const STICKY_HEADER_TOGGLE_TOLERANCE_MS = 5;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-table",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.3",
|
|
4
4
|
"description": "Table plugin for the @atlaskit/editor",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -28,12 +28,12 @@
|
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@atlaskit/adf-schema": "^29.1.0",
|
|
31
|
-
"@atlaskit/editor-common": "^75.
|
|
31
|
+
"@atlaskit/editor-common": "^75.1.0",
|
|
32
32
|
"@atlaskit/editor-palette": "1.5.1",
|
|
33
33
|
"@atlaskit/editor-plugin-analytics": "^0.2.0",
|
|
34
34
|
"@atlaskit/editor-plugin-content-insertion": "^0.1.0",
|
|
35
35
|
"@atlaskit/editor-prosemirror": "1.1.0",
|
|
36
|
-
"@atlaskit/editor-shared-styles": "^2.
|
|
36
|
+
"@atlaskit/editor-shared-styles": "^2.7.0",
|
|
37
37
|
"@atlaskit/editor-tables": "^2.3.0",
|
|
38
38
|
"@atlaskit/icon": "^21.12.0",
|
|
39
39
|
"@atlaskit/platform-feature-flags": "^0.2.1",
|
|
@@ -112,4 +112,4 @@
|
|
|
112
112
|
"type": "boolean"
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
|
-
}
|
|
115
|
+
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
1
2
|
import {
|
|
2
3
|
expectToMatchSelection,
|
|
3
4
|
fullpage,
|
|
4
5
|
setProseMirrorTextSelection,
|
|
5
6
|
} from '@atlaskit/editor-test-helpers/integration/helpers';
|
|
7
|
+
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
6
8
|
import {
|
|
7
9
|
goToEditorTestingWDExample,
|
|
8
10
|
mountEditor,
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
1
2
|
import {
|
|
2
3
|
editable,
|
|
3
4
|
fullpage,
|
|
4
5
|
getDocFromElement,
|
|
5
6
|
} from '@atlaskit/editor-test-helpers/integration/helpers';
|
|
7
|
+
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
6
8
|
import sleep from '@atlaskit/editor-test-helpers/sleep';
|
|
9
|
+
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
7
10
|
import {
|
|
8
11
|
goToEditorTestingWDExample,
|
|
9
12
|
mountEditor,
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import isEqual from 'lodash/isEqual';
|
|
2
2
|
|
|
3
|
+
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
3
4
|
import { fullpage } from '@atlaskit/editor-test-helpers/integration/helpers';
|
|
5
|
+
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
4
6
|
import {
|
|
5
7
|
multiCellTableSelectionBottomRightToFirstCell,
|
|
6
8
|
multiCellTableSelectionBottomRightToMiddleTopCell,
|
|
7
9
|
multiCellTableSelectionTopLeftToBottomRight,
|
|
8
10
|
} from '@atlaskit/editor-test-helpers/page-objects/table';
|
|
11
|
+
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
9
12
|
import {
|
|
10
13
|
goToEditorTestingWDExample,
|
|
11
14
|
mountEditor,
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { createIntl } from 'react-intl-next';
|
|
2
2
|
|
|
3
|
+
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
3
4
|
import {
|
|
4
5
|
editable,
|
|
5
6
|
fullpage,
|
|
6
7
|
getDocFromElement,
|
|
7
8
|
} from '@atlaskit/editor-test-helpers/integration/helpers';
|
|
9
|
+
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
8
10
|
import {
|
|
9
11
|
goToEditorTestingWDExample,
|
|
10
12
|
mountEditor,
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
1
2
|
import {
|
|
2
3
|
editable,
|
|
3
4
|
fullpage,
|
|
4
5
|
getDocFromElement,
|
|
5
6
|
quickInsert,
|
|
6
7
|
} from '@atlaskit/editor-test-helpers/integration/helpers';
|
|
8
|
+
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
7
9
|
import {
|
|
8
10
|
goToEditorTestingWDExample,
|
|
9
11
|
mountEditor,
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
1
2
|
import {
|
|
2
3
|
editable,
|
|
3
4
|
fullpage,
|
|
4
5
|
getDocFromElement,
|
|
5
6
|
quickInsert,
|
|
6
7
|
} from '@atlaskit/editor-test-helpers/integration/helpers';
|
|
8
|
+
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
7
9
|
import {
|
|
8
10
|
goToEditorTestingWDExample,
|
|
9
11
|
mountEditor,
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
1
2
|
import {
|
|
2
3
|
editable,
|
|
3
4
|
fullpage,
|
|
4
5
|
getDocFromElement,
|
|
5
6
|
quickInsert,
|
|
6
7
|
} from '@atlaskit/editor-test-helpers/integration/helpers';
|
|
8
|
+
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
7
9
|
import {
|
|
8
10
|
goToEditorTestingWDExample,
|
|
9
11
|
mountEditor,
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { createIntl } from 'react-intl-next';
|
|
2
2
|
|
|
3
|
+
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
3
4
|
import {
|
|
4
5
|
editable,
|
|
5
6
|
fullpage,
|
|
6
7
|
getDocFromElement,
|
|
7
8
|
} from '@atlaskit/editor-test-helpers/integration/helpers';
|
|
9
|
+
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
8
10
|
import { deleteRow } from '@atlaskit/editor-test-helpers/page-objects/table';
|
|
11
|
+
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
9
12
|
import {
|
|
10
13
|
goToEditorTestingWDExample,
|
|
11
14
|
mountEditor,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
1
2
|
import {
|
|
2
3
|
clipboardInput,
|
|
3
4
|
copyAsHTMLButton,
|
|
@@ -6,11 +7,13 @@ import {
|
|
|
6
7
|
fullpage,
|
|
7
8
|
getDocFromElement,
|
|
8
9
|
} from '@atlaskit/editor-test-helpers/integration/helpers';
|
|
10
|
+
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
9
11
|
import {
|
|
10
12
|
clickFirstCell,
|
|
11
13
|
tableSelectors,
|
|
12
14
|
waitForNoTable,
|
|
13
15
|
} from '@atlaskit/editor-test-helpers/page-objects/table';
|
|
16
|
+
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
14
17
|
import {
|
|
15
18
|
goToEditorTestingWDExample,
|
|
16
19
|
mountEditor,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
1
2
|
import {
|
|
2
3
|
editable,
|
|
3
4
|
expectToMatchSelection,
|
|
@@ -5,6 +6,7 @@ import {
|
|
|
5
6
|
getDocFromElement,
|
|
6
7
|
setProseMirrorTextSelection,
|
|
7
8
|
} from '@atlaskit/editor-test-helpers/integration/helpers';
|
|
9
|
+
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
8
10
|
import {
|
|
9
11
|
goToEditorTestingWDExample,
|
|
10
12
|
mountEditor,
|
|
@@ -1,13 +1,16 @@
|
|
|
1
|
+
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
1
2
|
import {
|
|
2
3
|
doubleClickResizeHandle,
|
|
3
4
|
editable,
|
|
4
5
|
fullpage,
|
|
5
6
|
getDocFromElement,
|
|
6
7
|
} from '@atlaskit/editor-test-helpers/integration/helpers';
|
|
8
|
+
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
7
9
|
import {
|
|
8
10
|
clickFirstCell,
|
|
9
11
|
selectTable,
|
|
10
12
|
} from '@atlaskit/editor-test-helpers/page-objects/table';
|
|
13
|
+
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
11
14
|
import {
|
|
12
15
|
goToEditorTestingWDExample,
|
|
13
16
|
mountEditor,
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
1
2
|
import {
|
|
2
3
|
fullpage,
|
|
3
4
|
resizeColumn,
|
|
4
5
|
} from '@atlaskit/editor-test-helpers/integration/helpers';
|
|
6
|
+
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
5
7
|
import {
|
|
6
8
|
goToEditorTestingWDExample,
|
|
7
9
|
mountEditor,
|
|
@@ -1,17 +1,20 @@
|
|
|
1
|
+
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
1
2
|
import {
|
|
2
3
|
fullpage,
|
|
3
4
|
resizeColumn,
|
|
4
5
|
} from '@atlaskit/editor-test-helpers/integration/helpers';
|
|
6
|
+
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
5
7
|
import {
|
|
6
8
|
insertColumn,
|
|
7
9
|
insertTable,
|
|
8
10
|
} from '@atlaskit/editor-test-helpers/page-objects/table';
|
|
11
|
+
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
9
12
|
import {
|
|
10
13
|
goToEditorTestingWDExample,
|
|
11
14
|
mountEditor,
|
|
12
15
|
} from '@atlaskit/editor-test-helpers/testing-example-page';
|
|
13
16
|
import { BrowserTestCase } from '@atlaskit/webdriver-runner/runner';
|
|
14
|
-
import WebdriverPage from '@atlaskit/webdriver-runner/wd-wrapper';
|
|
17
|
+
import type WebdriverPage from '@atlaskit/webdriver-runner/wd-wrapper';
|
|
15
18
|
|
|
16
19
|
import basicTableAdf from './__fixtures__/basic-table';
|
|
17
20
|
import { emptyLayout } from './__fixtures__/empty-layout';
|