@atlaskit/editor-plugin-table 8.4.5 → 8.4.7
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 +14 -0
- package/dist/cjs/nodeviews/OverflowShadowsObserver.js +1 -2
- package/dist/cjs/nodeviews/TableCell.js +6 -9
- package/dist/cjs/nodeviews/TableComponent.js +46 -41
- package/dist/cjs/nodeviews/TableRow.js +15 -18
- package/dist/cjs/nodeviews/TableStickyScrollbar.js +1 -2
- package/dist/cjs/nodeviews/table.js +17 -14
- package/dist/cjs/pm-plugins/plugin-key.js +3 -0
- package/dist/cjs/pm-plugins/table-resizing/plugin.js +1 -2
- package/dist/cjs/types/index.js +1 -1
- package/dist/cjs/ui/FloatingContextualMenu/ContextualMenu.js +26 -29
- package/dist/cjs/ui/FloatingDeleteButton/index.js +11 -14
- package/dist/cjs/ui/FloatingInsertButton/InsertButton.js +1 -2
- package/dist/cjs/ui/FloatingInsertButton/index.js +7 -10
- package/dist/cjs/ui/TableFloatingControls/CornerControls/ClassicCornerControls.js +9 -12
- package/dist/cjs/ui/TableFloatingControls/NumberColumn/index.js +11 -15
- package/dist/cjs/ui/TableFloatingControls/RowControls/ClassicControls.js +6 -9
- package/dist/cjs/ui/common-styles.js +2 -0
- package/dist/cjs/ui/consts.js +3 -0
- package/dist/es2019/index.js +3 -0
- package/dist/es2019/nodeviews/TableComponent.js +17 -7
- package/dist/es2019/nodeviews/table.js +7 -2
- package/dist/es2019/pm-plugins/commands/index.js +3 -0
- package/dist/es2019/pm-plugins/plugin-key.js +3 -0
- package/dist/es2019/types/index.js +3 -0
- package/dist/es2019/ui/common-styles.js +3 -0
- package/dist/es2019/ui/consts.js +3 -0
- package/dist/esm/index.js +3 -0
- package/dist/esm/nodeviews/OverflowShadowsObserver.js +1 -2
- package/dist/esm/nodeviews/TableCell.js +6 -9
- package/dist/esm/nodeviews/TableComponent.js +46 -41
- package/dist/esm/nodeviews/TableRow.js +15 -18
- package/dist/esm/nodeviews/TableStickyScrollbar.js +1 -2
- package/dist/esm/nodeviews/table.js +17 -14
- package/dist/esm/pm-plugins/commands/index.js +3 -0
- package/dist/esm/pm-plugins/plugin-key.js +3 -0
- package/dist/esm/pm-plugins/table-resizing/plugin.js +1 -2
- package/dist/esm/types/index.js +3 -0
- package/dist/esm/ui/FloatingContextualMenu/ContextualMenu.js +26 -29
- package/dist/esm/ui/FloatingDeleteButton/index.js +11 -14
- package/dist/esm/ui/FloatingInsertButton/InsertButton.js +1 -2
- package/dist/esm/ui/FloatingInsertButton/index.js +7 -10
- package/dist/esm/ui/TableFloatingControls/CornerControls/ClassicCornerControls.js +9 -12
- package/dist/esm/ui/TableFloatingControls/NumberColumn/index.js +11 -15
- package/dist/esm/ui/TableFloatingControls/RowControls/ClassicControls.js +6 -9
- package/dist/esm/ui/common-styles.js +3 -0
- package/dist/esm/ui/consts.js +3 -0
- package/dist/types/types/index.d.ts +3 -0
- package/dist/types-ts4.5/types/index.d.ts +3 -0
- package/package.json +7 -4
- package/src/index.ts +3 -0
- package/src/nodeviews/TableComponent.tsx +24 -4
- package/src/nodeviews/table.tsx +11 -2
- package/src/pm-plugins/commands/index.ts +3 -0
- package/src/pm-plugins/plugin-key.ts +3 -0
- package/src/types/index.ts +3 -0
- package/src/ui/common-styles.ts +3 -0
- package/src/ui/consts.ts +3 -0
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
4
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
5
3
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
4
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
5
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
7
6
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
|
-
function
|
|
7
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
9
8
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
10
9
|
import React, { Component } from 'react';
|
|
11
10
|
import classnames from 'classnames';
|
|
@@ -17,19 +16,17 @@ import { getRowHeights } from '../../../pm-plugins/utils';
|
|
|
17
16
|
import { TableCssClassName as ClassName } from '../../../types';
|
|
18
17
|
import { tableBorderColor } from '../../consts';
|
|
19
18
|
var NumberColumn = /*#__PURE__*/function (_Component) {
|
|
20
|
-
_inherits(NumberColumn, _Component);
|
|
21
|
-
var _super = _createSuper(NumberColumn);
|
|
22
19
|
function NumberColumn() {
|
|
23
20
|
var _this;
|
|
24
21
|
_classCallCheck(this, NumberColumn);
|
|
25
22
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
26
23
|
args[_key] = arguments[_key];
|
|
27
24
|
}
|
|
28
|
-
_this =
|
|
29
|
-
_defineProperty(
|
|
25
|
+
_this = _callSuper(this, NumberColumn, [].concat(args));
|
|
26
|
+
_defineProperty(_this, "hoverRows", function (index) {
|
|
30
27
|
return _this.props.tableActive ? _this.props.hoverRows([index]) : null;
|
|
31
28
|
});
|
|
32
|
-
_defineProperty(
|
|
29
|
+
_defineProperty(_this, "selectRow", function (index, event) {
|
|
33
30
|
var _this$props = _this.props,
|
|
34
31
|
tableActive = _this$props.tableActive,
|
|
35
32
|
editorView = _this$props.editorView,
|
|
@@ -52,7 +49,7 @@ var NumberColumn = /*#__PURE__*/function (_Component) {
|
|
|
52
49
|
}
|
|
53
50
|
selectRow(index, event.shiftKey);
|
|
54
51
|
});
|
|
55
|
-
_defineProperty(
|
|
52
|
+
_defineProperty(_this, "clearHoverSelection", function () {
|
|
56
53
|
var _this$props2 = _this.props,
|
|
57
54
|
tableActive = _this$props2.tableActive,
|
|
58
55
|
editorView = _this$props2.editorView;
|
|
@@ -62,7 +59,7 @@ var NumberColumn = /*#__PURE__*/function (_Component) {
|
|
|
62
59
|
clearHoverSelection()(state, dispatch);
|
|
63
60
|
}
|
|
64
61
|
});
|
|
65
|
-
_defineProperty(
|
|
62
|
+
_defineProperty(_this, "getCellStyles", function (index, rowHeight) {
|
|
66
63
|
var _this$props3 = _this.props,
|
|
67
64
|
stickyTop = _this$props3.stickyTop,
|
|
68
65
|
hasHeaderRow = _this$props3.hasHeaderRow;
|
|
@@ -77,8 +74,7 @@ var NumberColumn = /*#__PURE__*/function (_Component) {
|
|
|
77
74
|
height: rowHeight
|
|
78
75
|
};
|
|
79
76
|
});
|
|
80
|
-
_defineProperty(
|
|
81
|
-
var _classnames;
|
|
77
|
+
_defineProperty(_this, "getClassNames", function (index) {
|
|
82
78
|
var isButtonDisabled = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
83
79
|
var _this$props4 = _this.props,
|
|
84
80
|
hoveredRows = _this$props4.hoveredRows,
|
|
@@ -86,11 +82,12 @@ var NumberColumn = /*#__PURE__*/function (_Component) {
|
|
|
86
82
|
isInDanger = _this$props4.isInDanger,
|
|
87
83
|
isResizing = _this$props4.isResizing;
|
|
88
84
|
var isActive = isRowSelected(index)(editorView.state.selection) || (hoveredRows || []).indexOf(index) !== -1 && !isResizing;
|
|
89
|
-
return classnames(ClassName.NUMBERED_COLUMN_BUTTON, (
|
|
85
|
+
return classnames(ClassName.NUMBERED_COLUMN_BUTTON, _defineProperty(_defineProperty(_defineProperty({}, ClassName.NUMBERED_COLUMN_BUTTON_DISABLED, isButtonDisabled), ClassName.HOVERED_CELL_IN_DANGER, isActive && isInDanger), ClassName.HOVERED_CELL_ACTIVE, isActive));
|
|
90
86
|
});
|
|
91
87
|
return _this;
|
|
92
88
|
}
|
|
93
|
-
|
|
89
|
+
_inherits(NumberColumn, _Component);
|
|
90
|
+
return _createClass(NumberColumn, [{
|
|
94
91
|
key: "render",
|
|
95
92
|
value: function render() {
|
|
96
93
|
var _this2 = this;
|
|
@@ -157,6 +154,5 @@ var NumberColumn = /*#__PURE__*/function (_Component) {
|
|
|
157
154
|
}));
|
|
158
155
|
}
|
|
159
156
|
}]);
|
|
160
|
-
return NumberColumn;
|
|
161
157
|
}(Component);
|
|
162
158
|
export { NumberColumn as default };
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
4
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
5
3
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
4
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
5
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
7
6
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
|
-
function
|
|
7
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
9
8
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
10
9
|
import React, { Component } from 'react';
|
|
11
10
|
import { injectIntl } from 'react-intl-next';
|
|
@@ -16,16 +15,14 @@ import { getRowClassNames, getRowHeights, getRowsParams } from '../../../pm-plug
|
|
|
16
15
|
import { TableCssClassName as ClassName } from '../../../types';
|
|
17
16
|
import { tableControlsSpacing, tableToolbarSize } from '../../consts';
|
|
18
17
|
var RowControlsComponent = /*#__PURE__*/function (_Component) {
|
|
19
|
-
_inherits(RowControlsComponent, _Component);
|
|
20
|
-
var _super = _createSuper(RowControlsComponent);
|
|
21
18
|
function RowControlsComponent() {
|
|
22
19
|
var _this;
|
|
23
20
|
_classCallCheck(this, RowControlsComponent);
|
|
24
21
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
25
22
|
args[_key] = arguments[_key];
|
|
26
23
|
}
|
|
27
|
-
_this =
|
|
28
|
-
_defineProperty(
|
|
24
|
+
_this = _callSuper(this, RowControlsComponent, [].concat(args));
|
|
25
|
+
_defineProperty(_this, "clearHoverSelection", function () {
|
|
29
26
|
var _this$props$editorVie = _this.props.editorView,
|
|
30
27
|
state = _this$props$editorVie.state,
|
|
31
28
|
dispatch = _this$props$editorVie.dispatch;
|
|
@@ -33,7 +30,8 @@ var RowControlsComponent = /*#__PURE__*/function (_Component) {
|
|
|
33
30
|
});
|
|
34
31
|
return _this;
|
|
35
32
|
}
|
|
36
|
-
|
|
33
|
+
_inherits(RowControlsComponent, _Component);
|
|
34
|
+
return _createClass(RowControlsComponent, [{
|
|
37
35
|
key: "render",
|
|
38
36
|
value: function render() {
|
|
39
37
|
var _this2 = this;
|
|
@@ -110,6 +108,5 @@ var RowControlsComponent = /*#__PURE__*/function (_Component) {
|
|
|
110
108
|
);
|
|
111
109
|
}
|
|
112
110
|
}]);
|
|
113
|
-
return RowControlsComponent;
|
|
114
111
|
}(Component);
|
|
115
112
|
export var RowControls = injectIntl(RowControlsComponent);
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
|
|
3
|
+
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
4
|
+
// Entry file in package.json
|
|
5
|
+
|
|
3
6
|
/* eslint-disable @atlaskit/design-system/no-css-tagged-template-expression */
|
|
4
7
|
|
|
5
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
package/dist/esm/ui/consts.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
2
|
+
// Entry file in package.json
|
|
3
|
+
|
|
1
4
|
import { tableCellBorderWidth, tableMarginTop } from '@atlaskit/editor-common/styles';
|
|
2
5
|
import { akEditorTableBorder, akEditorTableBorderSelected, akEditorTableCellBlanketDeleted, akEditorTableCellBlanketSelected, akEditorTableHeaderCellBackground, akEditorTableToolbar, akEditorTableToolbarSize, akEditorUnitZIndex, akRichMediaResizeZIndex } from '@atlaskit/editor-shared-styles';
|
|
3
6
|
import { B200, N0, N20, N200, N20A, N300, R300, R400, R75 } from '@atlaskit/theme/colors';
|
|
@@ -415,6 +415,9 @@ export declare const TableCssClassName: {
|
|
|
415
415
|
TABLE_SHADOW_SENTINEL_RIGHT: string;
|
|
416
416
|
TABLE_CELL_NODEVIEW_CONTENT_DOM: string;
|
|
417
417
|
TABLE_CELL_WRAPPER: string;
|
|
418
|
+
/**
|
|
419
|
+
* @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-6877 Internal documentation for deprecation (no external access)}
|
|
420
|
+
**/
|
|
418
421
|
TABLE_HEADER_CELL_WRAPPER: string;
|
|
419
422
|
TABLE_ROW_CONTROLS_WRAPPER: string;
|
|
420
423
|
TABLE_COLUMN_CONTROLS_DECORATIONS: string;
|
|
@@ -415,6 +415,9 @@ export declare const TableCssClassName: {
|
|
|
415
415
|
TABLE_SHADOW_SENTINEL_RIGHT: string;
|
|
416
416
|
TABLE_CELL_NODEVIEW_CONTENT_DOM: string;
|
|
417
417
|
TABLE_CELL_WRAPPER: string;
|
|
418
|
+
/**
|
|
419
|
+
* @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-6877 Internal documentation for deprecation (no external access)}
|
|
420
|
+
**/
|
|
418
421
|
TABLE_HEADER_CELL_WRAPPER: string;
|
|
419
422
|
TABLE_ROW_CONTROLS_WRAPPER: string;
|
|
420
423
|
TABLE_COLUMN_CONTROLS_DECORATIONS: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-table",
|
|
3
|
-
"version": "8.4.
|
|
3
|
+
"version": "8.4.7",
|
|
4
4
|
"description": "Table plugin for the @atlaskit/editor",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"@atlaskit/adf-schema": "^46.1.0",
|
|
31
31
|
"@atlaskit/button": "^20.3.0",
|
|
32
32
|
"@atlaskit/custom-steps": "^0.9.0",
|
|
33
|
-
"@atlaskit/editor-common": "^96.
|
|
33
|
+
"@atlaskit/editor-common": "^96.5.0",
|
|
34
34
|
"@atlaskit/editor-palette": "1.6.3",
|
|
35
35
|
"@atlaskit/editor-plugin-accessibility-utils": "^1.2.0",
|
|
36
36
|
"@atlaskit/editor-plugin-analytics": "^1.10.0",
|
|
@@ -51,8 +51,8 @@
|
|
|
51
51
|
"@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.0.0",
|
|
52
52
|
"@atlaskit/primitives": "^13.3.0",
|
|
53
53
|
"@atlaskit/theme": "^14.0.0",
|
|
54
|
-
"@atlaskit/tmp-editor-statsig": "^2.
|
|
55
|
-
"@atlaskit/toggle": "^
|
|
54
|
+
"@atlaskit/tmp-editor-statsig": "^2.26.0",
|
|
55
|
+
"@atlaskit/toggle": "^14.0.0",
|
|
56
56
|
"@atlaskit/tokens": "^2.4.0",
|
|
57
57
|
"@atlaskit/tooltip": "^19.0.0",
|
|
58
58
|
"@babel/runtime": "^7.0.0",
|
|
@@ -137,6 +137,9 @@
|
|
|
137
137
|
},
|
|
138
138
|
"platform_editor_ed_25642": {
|
|
139
139
|
"type": "boolean"
|
|
140
|
+
},
|
|
141
|
+
"platform_editor_table_overflow_in_full_width_fix": {
|
|
142
|
+
"type": "boolean"
|
|
140
143
|
}
|
|
141
144
|
}
|
|
142
145
|
}
|
package/src/index.ts
CHANGED
|
@@ -173,6 +173,8 @@ class TableComponent extends React.Component<ComponentProps, TableState> {
|
|
|
173
173
|
private wrapperWidth?: number;
|
|
174
174
|
private wrapperReisizeObserver?: ResizeObserver;
|
|
175
175
|
|
|
176
|
+
private updateColGroupFromFullWidthChange?: boolean;
|
|
177
|
+
|
|
176
178
|
private dragAndDropCleanupFn?: CleanupFn;
|
|
177
179
|
|
|
178
180
|
constructor(props: ComponentProps) {
|
|
@@ -180,8 +182,14 @@ class TableComponent extends React.Component<ComponentProps, TableState> {
|
|
|
180
182
|
const { options, containerWidth, getNode } = props;
|
|
181
183
|
this.node = getNode();
|
|
182
184
|
this.containerWidth = containerWidth;
|
|
185
|
+
|
|
183
186
|
this.isInitialOverflowSent = false;
|
|
184
187
|
|
|
188
|
+
if (!this.updateColGroupFromFullWidthChange) {
|
|
189
|
+
this.updateColGroupFromFullWidthChange =
|
|
190
|
+
options?.isFullWidthModeEnabled && !options?.wasFullWidthModeEnabled;
|
|
191
|
+
}
|
|
192
|
+
|
|
185
193
|
// store table size using previous full-width mode so can detect if it has changed.
|
|
186
194
|
const isFullWidthModeEnabled = options ? options.wasFullWidthModeEnabled : false;
|
|
187
195
|
this.layoutSize = this.tableNodeLayoutSize(this.node, containerWidth.width, {
|
|
@@ -429,6 +437,14 @@ class TableComponent extends React.Component<ComponentProps, TableState> {
|
|
|
429
437
|
tableNode.attrs.isNumberColumnEnabled !== this.node.attrs.isNumberColumnEnabled;
|
|
430
438
|
const isNumberOfColumnsChanged = tablesHaveDifferentNoOfColumns(tableNode, this.node);
|
|
431
439
|
|
|
440
|
+
const { width: containerWidthValue, lineLength: containerLineLength } = containerWidth;
|
|
441
|
+
const isLineLengthChanged = this.containerWidth?.lineLength !== containerLineLength;
|
|
442
|
+
|
|
443
|
+
const isFullWidthModeAndLineLengthChanged =
|
|
444
|
+
this.updateColGroupFromFullWidthChange &&
|
|
445
|
+
isLineLengthChanged &&
|
|
446
|
+
fg('platform_editor_table_overflow_in_full_width_fix');
|
|
447
|
+
|
|
432
448
|
const maybeScale =
|
|
433
449
|
isTableSquashed ||
|
|
434
450
|
isTableWidthChanged ||
|
|
@@ -436,14 +452,12 @@ class TableComponent extends React.Component<ComponentProps, TableState> {
|
|
|
436
452
|
isNumberColumnChanged ||
|
|
437
453
|
isNumberOfColumnsChanged;
|
|
438
454
|
|
|
439
|
-
if (force || maybeScale) {
|
|
440
|
-
const { width: containerWidthValue } = containerWidth;
|
|
455
|
+
if (force || maybeScale || isFullWidthModeAndLineLengthChanged) {
|
|
441
456
|
const isWidthChanged = this.containerWidth?.width !== containerWidthValue;
|
|
442
457
|
const wasTableResized = hasTableBeenResized(this.node);
|
|
443
458
|
const isTableResized = hasTableBeenResized(tableNode);
|
|
444
459
|
const isColumnsDistributed = wasTableResized && !isTableResized;
|
|
445
460
|
const isTableDisplayModeChanged = this.node.attrs.displayMode !== tableNode.attrs.displayMode;
|
|
446
|
-
|
|
447
461
|
const shouldUpdateColgroup =
|
|
448
462
|
isWidthChanged ||
|
|
449
463
|
isColumnsDistributed ||
|
|
@@ -451,7 +465,8 @@ class TableComponent extends React.Component<ComponentProps, TableState> {
|
|
|
451
465
|
isTableWidthChanged ||
|
|
452
466
|
isTableDisplayModeChanged ||
|
|
453
467
|
isNumberColumnChanged ||
|
|
454
|
-
isNumberOfColumnsChanged
|
|
468
|
+
isNumberOfColumnsChanged ||
|
|
469
|
+
isFullWidthModeAndLineLengthChanged;
|
|
455
470
|
|
|
456
471
|
const { tableWithFixedColumnWidthsOption = false } = getEditorFeatureFlags();
|
|
457
472
|
|
|
@@ -523,6 +538,11 @@ class TableComponent extends React.Component<ComponentProps, TableState> {
|
|
|
523
538
|
});
|
|
524
539
|
}
|
|
525
540
|
}
|
|
541
|
+
|
|
542
|
+
if (isFullWidthModeAndLineLengthChanged) {
|
|
543
|
+
this.updateColGroupFromFullWidthChange = false;
|
|
544
|
+
}
|
|
545
|
+
|
|
526
546
|
this.tableNodeWidth = tableNodeWidth;
|
|
527
547
|
this.wasResizing = isResizing;
|
|
528
548
|
this.containerWidth = containerWidth;
|
package/src/nodeviews/table.tsx
CHANGED
|
@@ -19,6 +19,7 @@ import type { EditorState, PluginKey } from '@atlaskit/editor-prosemirror/state'
|
|
|
19
19
|
import type { EditorView, NodeView } from '@atlaskit/editor-prosemirror/view';
|
|
20
20
|
import { akEditorTableNumberColumnWidth } from '@atlaskit/editor-shared-styles';
|
|
21
21
|
import { TableMap } from '@atlaskit/editor-tables/table-map';
|
|
22
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
22
23
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
23
24
|
|
|
24
25
|
import { pluginConfig as getPluginConfig } from '../pm-plugins/create-plugin-config';
|
|
@@ -382,6 +383,10 @@ export const createTableView = (
|
|
|
382
383
|
isDragAndDropEnabled,
|
|
383
384
|
isTableScalingEnabled, // same as options.isTableScalingEnabled
|
|
384
385
|
} = getPluginState(view.state);
|
|
386
|
+
|
|
387
|
+
// Use shared state for isFullWidthModeEnabled and wasFullWidthModeEnabled for most up-to-date values
|
|
388
|
+
const tableState = pluginInjectionApi?.table?.sharedState.currentState();
|
|
389
|
+
|
|
385
390
|
const { allowColumnResizing, allowControls, allowTableResizing, allowTableAlignment } =
|
|
386
391
|
getPluginConfig(pluginConfig);
|
|
387
392
|
|
|
@@ -396,8 +401,12 @@ export const createTableView = (
|
|
|
396
401
|
eventDispatcher,
|
|
397
402
|
getPos: getPos as getPosHandlerNode,
|
|
398
403
|
options: {
|
|
399
|
-
isFullWidthModeEnabled
|
|
400
|
-
|
|
404
|
+
isFullWidthModeEnabled: fg('platform_editor_table_overflow_in_full_width_fix')
|
|
405
|
+
? tableState?.isFullWidthModeEnabled
|
|
406
|
+
: isFullWidthModeEnabled,
|
|
407
|
+
wasFullWidthModeEnabled: fg('platform_editor_table_overflow_in_full_width_fix')
|
|
408
|
+
? tableState?.wasFullWidthModeEnabled
|
|
409
|
+
: wasFullWidthModeEnabled,
|
|
401
410
|
isDragAndDropEnabled,
|
|
402
411
|
isTableScalingEnabled, // same as options.isTableScalingEnabled
|
|
403
412
|
isCommentEditor,
|
package/src/types/index.ts
CHANGED
package/src/ui/common-styles.ts
CHANGED