@atlaskit/editor-plugin-table 7.25.27 → 7.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/dist/cjs/commands/column-resize.js +1 -2
- package/dist/cjs/nodeviews/TableComponent.js +3 -5
- package/dist/cjs/plugin.js +1 -1
- package/dist/cjs/pm-plugins/drag-and-drop/plugin.js +1 -4
- package/dist/cjs/pm-plugins/table-resizing/event-handlers.js +3 -4
- package/dist/cjs/pm-plugins/table-resizing/utils/resize-state.js +1 -2
- package/dist/cjs/pm-plugins/table-resizing/utils/scale-table.js +1 -4
- package/dist/cjs/ui/FloatingContextualMenu/ContextualMenu.js +1 -1
- package/dist/cjs/ui/FloatingDragMenu/index.js +1 -2
- package/dist/cjs/ui/FloatingInsertButton/index.js +1 -2
- package/dist/es2019/commands/column-resize.js +1 -2
- package/dist/es2019/nodeviews/TableComponent.js +3 -5
- package/dist/es2019/plugin.js +1 -1
- package/dist/es2019/pm-plugins/drag-and-drop/plugin.js +1 -4
- package/dist/es2019/pm-plugins/table-resizing/event-handlers.js +3 -4
- package/dist/es2019/pm-plugins/table-resizing/utils/resize-state.js +1 -2
- package/dist/es2019/pm-plugins/table-resizing/utils/scale-table.js +1 -4
- package/dist/es2019/ui/FloatingContextualMenu/ContextualMenu.js +1 -1
- package/dist/es2019/ui/FloatingDragMenu/index.js +1 -2
- package/dist/es2019/ui/FloatingInsertButton/index.js +1 -2
- package/dist/esm/commands/column-resize.js +1 -2
- package/dist/esm/nodeviews/TableComponent.js +3 -5
- package/dist/esm/plugin.js +1 -1
- package/dist/esm/pm-plugins/drag-and-drop/plugin.js +1 -4
- package/dist/esm/pm-plugins/table-resizing/event-handlers.js +3 -4
- package/dist/esm/pm-plugins/table-resizing/utils/resize-state.js +1 -2
- package/dist/esm/pm-plugins/table-resizing/utils/scale-table.js +1 -4
- package/dist/esm/ui/FloatingContextualMenu/ContextualMenu.js +1 -1
- package/dist/esm/ui/FloatingDragMenu/index.js +1 -2
- package/dist/esm/ui/FloatingInsertButton/index.js +1 -2
- package/package.json +2 -5
- package/src/commands/column-resize.ts +1 -4
- package/src/nodeviews/TableComponent.tsx +3 -8
- package/src/plugin.tsx +1 -2
- package/src/pm-plugins/drag-and-drop/plugin.ts +1 -4
- package/src/pm-plugins/table-resizing/event-handlers.ts +3 -8
- package/src/pm-plugins/table-resizing/utils/resize-state.ts +1 -4
- package/src/pm-plugins/table-resizing/utils/scale-table.ts +1 -5
- package/src/ui/FloatingContextualMenu/ContextualMenu.tsx +1 -2
- package/src/ui/FloatingDragMenu/index.tsx +1 -4
- package/src/ui/FloatingInsertButton/index.tsx +1 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-table
|
|
2
2
|
|
|
3
|
+
## 7.27.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#142155](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/142155)
|
|
8
|
+
[`9749eb9ba2987`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/9749eb9ba2987) -
|
|
9
|
+
Remove platform.editor.table.use-increased-scaling-percent feature flag
|
|
10
|
+
|
|
11
|
+
## 7.26.0
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- [#141652](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/141652)
|
|
16
|
+
[`1cbce9d217a8e`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/1cbce9d217a8e) -
|
|
17
|
+
[ux] EDF-1549 AI button added in floating toolbar of panel, table, layout and expand behind
|
|
18
|
+
experiment.
|
|
19
|
+
|
|
3
20
|
## 7.25.27
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -8,7 +8,6 @@ var _messages = require("@atlaskit/editor-common/messages");
|
|
|
8
8
|
var _styles = require("@atlaskit/editor-common/styles");
|
|
9
9
|
var _editorTables = require("@atlaskit/editor-tables");
|
|
10
10
|
var _utils = require("@atlaskit/editor-tables/utils");
|
|
11
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
12
11
|
var _plugin = require("../pm-plugins/decorations/plugin");
|
|
13
12
|
var _utils2 = require("../pm-plugins/decorations/utils");
|
|
14
13
|
var _pluginFactory = require("../pm-plugins/plugin-factory");
|
|
@@ -207,7 +206,7 @@ var changeColumnWidthByStep = exports.changeColumnWidthByStep = function changeC
|
|
|
207
206
|
if (isTableScalingWithFixedColumnWidthsOptionEnabled) {
|
|
208
207
|
isTableScalingEnabledOnCurrentTable = originalTable.attrs.displayMode !== 'fixed';
|
|
209
208
|
}
|
|
210
|
-
var shouldUseIncreasedScalingPercent = isTableScalingWithFixedColumnWidthsOptionEnabled
|
|
209
|
+
var shouldUseIncreasedScalingPercent = isTableScalingWithFixedColumnWidthsOptionEnabled;
|
|
211
210
|
if (isTableScalingEnabled && isCommentEditor) {
|
|
212
211
|
isTableScalingEnabledOnCurrentTable = true;
|
|
213
212
|
shouldUseIncreasedScalingPercent = true;
|
|
@@ -544,9 +544,7 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
544
544
|
_getEditorFeatureFlag5 = _getEditorFeatureFlag4.tableWithFixedColumnWidthsOption,
|
|
545
545
|
tableWithFixedColumnWidthsOption = _getEditorFeatureFlag5 === void 0 ? false : _getEditorFeatureFlag5;
|
|
546
546
|
var isTableScalingWithFixedColumnWidthsOptionEnabled = !!((_this$props$options = this.props.options) !== null && _this$props$options !== void 0 && _this$props$options.isTableScalingEnabled) && tableWithFixedColumnWidthsOption;
|
|
547
|
-
var shouldUseIncreasedScalingPercent = isTableScalingWithFixedColumnWidthsOptionEnabled &&
|
|
548
|
-
// When in comment editor, we need the scaling percent to be 40% while tableWithFixedColumnWidthsOption is not visible
|
|
549
|
-
!!((_this$props$options2 = this.props.options) !== null && _this$props$options2 !== void 0 && _this$props$options2.isTableScalingEnabled) && !!((_this$props$options3 = this.props.options) !== null && _this$props$options3 !== void 0 && _this$props$options3.isCommentEditor);
|
|
547
|
+
var shouldUseIncreasedScalingPercent = isTableScalingWithFixedColumnWidthsOptionEnabled || !!((_this$props$options2 = this.props.options) !== null && _this$props$options2 !== void 0 && _this$props$options2.isTableScalingEnabled) && !!((_this$props$options3 = this.props.options) !== null && _this$props$options3 !== void 0 && _this$props$options3.isCommentEditor);
|
|
550
548
|
if (force || !isResizing && shouldUpdateColgroup) {
|
|
551
549
|
var _this$props$options4, _this$props$options5, _this$props$options6, _this$props$options7;
|
|
552
550
|
var resizeState = (0, _utils4.getResizeState)({
|
|
@@ -625,7 +623,7 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
625
623
|
shouldHandleColgroupUpdates = true;
|
|
626
624
|
}
|
|
627
625
|
var isTableScalingWithFixedColumnWidthsOptionEnabled = !!isTableScalingEnabled && tableWithFixedColumnWidthsOption;
|
|
628
|
-
var shouldUseIncreasedScalingPercent = isTableScalingWithFixedColumnWidthsOptionEnabled
|
|
626
|
+
var shouldUseIncreasedScalingPercent = isTableScalingWithFixedColumnWidthsOptionEnabled || !!isTableScalingEnabled && !!((_this$props$options8 = this.props.options) !== null && _this$props$options8 !== void 0 && _this$props$options8.isCommentEditor);
|
|
629
627
|
if (isTableScalingWithFixedColumnWidthsOptionEnabled && getNode().attrs.displayMode !== 'fixed') {
|
|
630
628
|
shouldScale = true;
|
|
631
629
|
shouldHandleColgroupUpdates = true;
|
|
@@ -842,7 +840,7 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
842
840
|
stickyScrollbar = _getEditorFeatureFlag8.stickyScrollbar,
|
|
843
841
|
_getEditorFeatureFlag9 = _getEditorFeatureFlag8.tableWithFixedColumnWidthsOption,
|
|
844
842
|
tableWithFixedColumnWidthsOption = _getEditorFeatureFlag9 === void 0 ? false : _getEditorFeatureFlag9;
|
|
845
|
-
var shouldUseIncreasedScalingPercent = !!isTableScalingEnabled && (tableWithFixedColumnWidthsOption
|
|
843
|
+
var shouldUseIncreasedScalingPercent = !!isTableScalingEnabled && (tableWithFixedColumnWidthsOption || !!((_this$props$options10 = this.props.options) !== null && _this$props$options10 !== void 0 && _this$props$options10.isCommentEditor));
|
|
846
844
|
return /*#__PURE__*/_react.default.createElement(_TableContainer.TableContainer
|
|
847
845
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
848
846
|
, {
|
package/dist/cjs/plugin.js
CHANGED
|
@@ -77,7 +77,7 @@ var tablesPlugin = function tablesPlugin(_ref) {
|
|
|
77
77
|
var editorAnalyticsAPI = api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions;
|
|
78
78
|
var ariaNotifyPlugin = api === null || api === void 0 || (_api$accessibilityUti = api.accessibilityUtils) === null || _api$accessibilityUti === void 0 ? void 0 : _api$accessibilityUti.actions.ariaNotify;
|
|
79
79
|
var isTableFixedColumnWidthsOptionEnabled = (options === null || options === void 0 || (_options$getEditorFea = options.getEditorFeatureFlags) === null || _options$getEditorFea === void 0 ? void 0 : _options$getEditorFea.call(options).tableWithFixedColumnWidthsOption) || false;
|
|
80
|
-
var shouldUseIncreasedScalingPercent = (options === null || options === void 0 ? void 0 : options.isTableScalingEnabled) && (isTableFixedColumnWidthsOptionEnabled
|
|
80
|
+
var shouldUseIncreasedScalingPercent = (options === null || options === void 0 ? void 0 : options.isTableScalingEnabled) && (isTableFixedColumnWidthsOptionEnabled || ( // When in comment editor, we need the scaling percent to be 40% while tableWithFixedColumnWidthsOption is not visible
|
|
81
81
|
options === null || options === void 0 ? void 0 : options.isCommentEditor));
|
|
82
82
|
var isCellBackgroundDuplicated = (options === null || options === void 0 || (_options$getEditorFea2 = options.getEditorFeatureFlags) === null || _options$getEditorFea2 === void 0 ? void 0 : _options$getEditorFea2.call(options).tableDuplicateCellColouring) || false;
|
|
83
83
|
return {
|
|
@@ -9,7 +9,6 @@ var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
|
|
|
9
9
|
var _view = require("@atlaskit/editor-prosemirror/view");
|
|
10
10
|
var _cellSelection = require("@atlaskit/editor-tables/cell-selection");
|
|
11
11
|
var _utils = require("@atlaskit/editor-tables/utils");
|
|
12
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
13
12
|
var _element = require("@atlaskit/pragmatic-drag-and-drop-auto-scroll/element");
|
|
14
13
|
var _combine = require("@atlaskit/pragmatic-drag-and-drop/combine");
|
|
15
14
|
var _adapter = require("@atlaskit/pragmatic-drag-and-drop/element/adapter");
|
|
@@ -168,9 +167,7 @@ var destroyFn = function destroyFn(editorView, editorAnalyticsAPI, isTableScalin
|
|
|
168
167
|
if (isTableScalingEnabled && isCommentEditor) {
|
|
169
168
|
isTableScalingEnabledOnCurrentTable = true;
|
|
170
169
|
}
|
|
171
|
-
var shouldUseIncreasedScalingPercent = isTableScalingWithFixedColumnWidthsOptionEnabled
|
|
172
|
-
// When in comment editor, we need the scaling percent to be 40% while tableWithFixedColumnWidthsOption is not visible
|
|
173
|
-
isTableScalingEnabled && isCommentEditor;
|
|
170
|
+
var shouldUseIncreasedScalingPercent = isTableScalingWithFixedColumnWidthsOptionEnabled || isTableScalingEnabled && isCommentEditor;
|
|
174
171
|
(0, _utils3.insertColgroupFromNode)(tableRef, tableNode, isTableScalingEnabledOnCurrentTable, undefined, shouldUseIncreasedScalingPercent, isCommentEditor);
|
|
175
172
|
}
|
|
176
173
|
}
|
|
@@ -10,7 +10,6 @@ var _analytics = require("@atlaskit/editor-common/analytics");
|
|
|
10
10
|
var _styles = require("@atlaskit/editor-common/styles");
|
|
11
11
|
var _tableMap = require("@atlaskit/editor-tables/table-map");
|
|
12
12
|
var _utils = require("@atlaskit/editor-tables/utils");
|
|
13
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
14
13
|
var _columnResize = require("../../commands/column-resize");
|
|
15
14
|
var _misc = require("../../commands/misc");
|
|
16
15
|
var _transforms = require("../../transforms");
|
|
@@ -77,7 +76,7 @@ var handleMouseDown = exports.handleMouseDown = function handleMouseDown(view, e
|
|
|
77
76
|
if (isTableScalingWithFixedColumnWidthsOptionEnabled) {
|
|
78
77
|
shouldScale = shouldScale && originalTable.attrs.displayMode !== 'fixed';
|
|
79
78
|
}
|
|
80
|
-
var shouldUseIncreasedScalingPercent = isTableScalingWithFixedColumnWidthsOptionEnabled
|
|
79
|
+
var shouldUseIncreasedScalingPercent = isTableScalingWithFixedColumnWidthsOptionEnabled;
|
|
81
80
|
if (isTableScalingEnabled && isCommentEditor) {
|
|
82
81
|
shouldScale = tableDepth === 0;
|
|
83
82
|
shouldUseIncreasedScalingPercent = true;
|
|
@@ -181,7 +180,7 @@ var handleMouseDown = exports.handleMouseDown = function handleMouseDown(view, e
|
|
|
181
180
|
_shouldScale = _shouldScale && originalTable.attrs.displayMode !== 'fixed';
|
|
182
181
|
}
|
|
183
182
|
var resizedDelta = clientX - startX;
|
|
184
|
-
var _shouldUseIncreasedScalingPercent = isTableScalingWithFixedColumnWidthsOptionEnabled
|
|
183
|
+
var _shouldUseIncreasedScalingPercent = isTableScalingWithFixedColumnWidthsOptionEnabled || isTableScalingEnabled && !!isCommentEditor;
|
|
185
184
|
if (isNewColumnResizingEnabled && !(0, _utils2.isTableNested)(state, tablePos)) {
|
|
186
185
|
var newResizeState = (0, _utils3.resizeColumnAndTable)({
|
|
187
186
|
resizeState: resizeState,
|
|
@@ -288,7 +287,7 @@ var handleMouseDown = exports.handleMouseDown = function handleMouseDown(view, e
|
|
|
288
287
|
var map = _tableMap.TableMap.get(table);
|
|
289
288
|
var colIndex = map.colCount($cell.pos - $cell.start(-1)) + $cell.nodeAfter.attrs.colspan - 1;
|
|
290
289
|
var shouldScale = tableDepth === 0 && isTableScalingEnabled;
|
|
291
|
-
var shouldUseIncreasedScalingPercent = isTableScalingWithFixedColumnWidthsOptionEnabled
|
|
290
|
+
var shouldUseIncreasedScalingPercent = isTableScalingWithFixedColumnWidthsOptionEnabled || isTableScalingEnabled && isCommentEditor;
|
|
292
291
|
if (isTableScalingWithFixedColumnWidthsOptionEnabled) {
|
|
293
292
|
shouldScale = shouldScale && originalTable.attrs.displayMode !== 'fixed';
|
|
294
293
|
}
|
|
@@ -9,7 +9,6 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
9
9
|
var _nodeWidth = require("@atlaskit/editor-common/node-width");
|
|
10
10
|
var _styles = require("@atlaskit/editor-common/styles");
|
|
11
11
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
12
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
13
12
|
var _utils2 = require("../../../utils");
|
|
14
13
|
var _colgroup = require("./colgroup");
|
|
15
14
|
var _columnState = require("./column-state");
|
|
@@ -343,7 +342,7 @@ var getNewResizeStateFromSelectedColumns = exports.getNewResizeStateFromSelected
|
|
|
343
342
|
if (isTableScalingWithFixedColumnWidthsOptionEnabled) {
|
|
344
343
|
isTableScalingEnabledOnCurrentTable = table.node.attrs.displayMode !== 'fixed';
|
|
345
344
|
}
|
|
346
|
-
var shouldUseIncreasedScalingPercent = isTableScalingWithFixedColumnWidthsOptionEnabled
|
|
345
|
+
var shouldUseIncreasedScalingPercent = isTableScalingWithFixedColumnWidthsOptionEnabled;
|
|
347
346
|
if (isTableScalingEnabled && isCommentEditor) {
|
|
348
347
|
isTableScalingEnabledOnCurrentTable = true;
|
|
349
348
|
shouldUseIncreasedScalingPercent = true;
|
|
@@ -10,7 +10,6 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
10
10
|
var _nodeWidth = require("@atlaskit/editor-common/node-width");
|
|
11
11
|
var _styles = require("@atlaskit/editor-common/styles");
|
|
12
12
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
13
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
14
13
|
var _transforms = require("../../../transforms");
|
|
15
14
|
var _utils = require("../../../utils");
|
|
16
15
|
var _misc = require("../utils/misc");
|
|
@@ -137,9 +136,7 @@ var previewScaleTable = exports.previewScaleTable = function previewScaleTable(t
|
|
|
137
136
|
(0, _dom.syncStickyRowToTable)(tableRef);
|
|
138
137
|
return;
|
|
139
138
|
}
|
|
140
|
-
var shouldUseIncreasedScalingPercent = isTableScalingWithFixedColumnWidthsOptionEnabled
|
|
141
|
-
// When in comment editor, we need the scaling percent to be 40% while tableWithFixedColumnWidthsOption is not visible
|
|
142
|
-
isTableScalingEnabled && isCommentEditor;
|
|
139
|
+
var shouldUseIncreasedScalingPercent = isTableScalingWithFixedColumnWidthsOptionEnabled || isTableScalingEnabled && isCommentEditor;
|
|
143
140
|
var resizeState = parentWidth ? scaleWithParent(tableRef, parentWidth, node, start, domAtPos, false,
|
|
144
141
|
// Here isTableScalingEnabled = false
|
|
145
142
|
shouldUseIncreasedScalingPercent) : scale(tableRef, options, domAtPos, false, shouldUseIncreasedScalingPercent);
|
|
@@ -490,7 +490,7 @@ var ContextualMenu = exports.ContextualMenu = /*#__PURE__*/function (_Component)
|
|
|
490
490
|
dispatch(tr);
|
|
491
491
|
editorView.dom.focus(); // otherwise cursor disappears from cell
|
|
492
492
|
}
|
|
493
|
-
var shouldUseIncreasedScalingPercent = isTableScalingEnabled && (tableWithFixedColumnWidthsOption
|
|
493
|
+
var shouldUseIncreasedScalingPercent = isTableScalingEnabled && (tableWithFixedColumnWidthsOption ||
|
|
494
494
|
// When in comment editor, we need the scaling percent to be 40% while tableWithFixedColumnWidthsOption is not visible
|
|
495
495
|
isCommentEditor);
|
|
496
496
|
switch (item.value.name) {
|
|
@@ -9,7 +9,6 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
10
10
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
11
11
|
var _cellSelection = require("@atlaskit/editor-tables/cell-selection");
|
|
12
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
13
12
|
var _consts = require("../consts");
|
|
14
13
|
var _DragMenu = _interopRequireDefault(require("./DragMenu"));
|
|
15
14
|
var FloatingDragMenu = function FloatingDragMenu(_ref) {
|
|
@@ -47,7 +46,7 @@ var FloatingDragMenu = function FloatingDragMenu(_ref) {
|
|
|
47
46
|
tableWithFixedColumnWidthsOption = _ref2$tableWithFixedC === void 0 ? false : _ref2$tableWithFixedC,
|
|
48
47
|
_ref2$tableSortColumn = _ref2.tableSortColumnReorder,
|
|
49
48
|
tableSortColumnReorder = _ref2$tableSortColumn === void 0 ? false : _ref2$tableSortColumn;
|
|
50
|
-
var shouldUseIncreasedScalingPercent = isTableScalingEnabled && tableWithFixedColumnWidthsOption
|
|
49
|
+
var shouldUseIncreasedScalingPercent = isTableScalingEnabled && (tableWithFixedColumnWidthsOption || isCommentEditor);
|
|
51
50
|
return /*#__PURE__*/_react.default.createElement(_ui.Popup, {
|
|
52
51
|
alignX: direction === 'row' ? 'right' : undefined,
|
|
53
52
|
alignY: direction === 'row' ? 'start' : undefined,
|
|
@@ -24,7 +24,6 @@ var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
|
24
24
|
var _cellSelection = require("@atlaskit/editor-tables/cell-selection");
|
|
25
25
|
var _tableMap = require("@atlaskit/editor-tables/table-map");
|
|
26
26
|
var _utils3 = require("@atlaskit/editor-tables/utils");
|
|
27
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
28
27
|
var _commandsWithAnalytics = require("../../commands-with-analytics");
|
|
29
28
|
var _types = require("../../types");
|
|
30
29
|
var _utils4 = require("../../utils");
|
|
@@ -211,7 +210,7 @@ var FloatingInsertButton = exports.FloatingInsertButton = /*#__PURE__*/function
|
|
|
211
210
|
tableDuplicateCellColouring = _ref$tableDuplicateCe === void 0 ? false : _ref$tableDuplicateCe,
|
|
212
211
|
_ref$tableWithFixedCo = _ref.tableWithFixedColumnWidthsOption,
|
|
213
212
|
tableWithFixedColumnWidthsOption = _ref$tableWithFixedCo === void 0 ? false : _ref$tableWithFixedCo;
|
|
214
|
-
var shouldUseIncreasedScalingPercent = isTableScalingEnabled && tableWithFixedColumnWidthsOption
|
|
213
|
+
var shouldUseIncreasedScalingPercent = isTableScalingEnabled && (tableWithFixedColumnWidthsOption || isCommentEditor);
|
|
215
214
|
var state = editorView.state,
|
|
216
215
|
dispatch = editorView.dispatch;
|
|
217
216
|
(0, _commandsWithAnalytics.insertColumnWithAnalytics)(this.props.api, editorAnalyticsAPI, isTableScalingEnabled, tableDuplicateCellColouring, tableWithFixedColumnWidthsOption, shouldUseIncreasedScalingPercent, isCommentEditor)(_analytics.INPUT_METHOD.BUTTON, insertColumnButtonIndex)(state, dispatch, editorView);
|
|
@@ -2,7 +2,6 @@ import { tableMessages as messages } from '@atlaskit/editor-common/messages';
|
|
|
2
2
|
import { tableCellMinWidth } from '@atlaskit/editor-common/styles';
|
|
3
3
|
import { TableMap } from '@atlaskit/editor-tables';
|
|
4
4
|
import { findCellClosestToPos, findCellRectClosestToPos, findTableClosestToPos, getSelectionRect, isSelectionType, nextCell } from '@atlaskit/editor-tables/utils';
|
|
5
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
5
|
import { getDecorations } from '../pm-plugins/decorations/plugin';
|
|
7
6
|
import { buildColumnResizingDecorations, clearColumnResizingDecorations } from '../pm-plugins/decorations/utils';
|
|
8
7
|
import { createCommand, getPluginState } from '../pm-plugins/plugin-factory';
|
|
@@ -202,7 +201,7 @@ export const changeColumnWidthByStep = ({
|
|
|
202
201
|
if (isTableScalingWithFixedColumnWidthsOptionEnabled) {
|
|
203
202
|
isTableScalingEnabledOnCurrentTable = originalTable.attrs.displayMode !== 'fixed';
|
|
204
203
|
}
|
|
205
|
-
let shouldUseIncreasedScalingPercent = isTableScalingWithFixedColumnWidthsOptionEnabled
|
|
204
|
+
let shouldUseIncreasedScalingPercent = isTableScalingWithFixedColumnWidthsOptionEnabled;
|
|
206
205
|
if (isTableScalingEnabled && isCommentEditor) {
|
|
207
206
|
isTableScalingEnabledOnCurrentTable = true;
|
|
208
207
|
shouldUseIncreasedScalingPercent = true;
|
|
@@ -525,9 +525,7 @@ class TableComponent extends React.Component {
|
|
|
525
525
|
tableWithFixedColumnWidthsOption = false
|
|
526
526
|
} = getEditorFeatureFlags();
|
|
527
527
|
const isTableScalingWithFixedColumnWidthsOptionEnabled = !!((_this$props$options = this.props.options) !== null && _this$props$options !== void 0 && _this$props$options.isTableScalingEnabled) && tableWithFixedColumnWidthsOption;
|
|
528
|
-
const shouldUseIncreasedScalingPercent = isTableScalingWithFixedColumnWidthsOptionEnabled &&
|
|
529
|
-
// When in comment editor, we need the scaling percent to be 40% while tableWithFixedColumnWidthsOption is not visible
|
|
530
|
-
!!((_this$props$options2 = this.props.options) !== null && _this$props$options2 !== void 0 && _this$props$options2.isTableScalingEnabled) && !!((_this$props$options3 = this.props.options) !== null && _this$props$options3 !== void 0 && _this$props$options3.isCommentEditor);
|
|
528
|
+
const shouldUseIncreasedScalingPercent = isTableScalingWithFixedColumnWidthsOptionEnabled || !!((_this$props$options2 = this.props.options) !== null && _this$props$options2 !== void 0 && _this$props$options2.isTableScalingEnabled) && !!((_this$props$options3 = this.props.options) !== null && _this$props$options3 !== void 0 && _this$props$options3.isCommentEditor);
|
|
531
529
|
if (force || !isResizing && shouldUpdateColgroup) {
|
|
532
530
|
var _this$props$options4, _this$props$options5, _this$props$options6, _this$props$options7;
|
|
533
531
|
const resizeState = getResizeState({
|
|
@@ -605,7 +603,7 @@ class TableComponent extends React.Component {
|
|
|
605
603
|
shouldHandleColgroupUpdates = true;
|
|
606
604
|
}
|
|
607
605
|
const isTableScalingWithFixedColumnWidthsOptionEnabled = !!isTableScalingEnabled && tableWithFixedColumnWidthsOption;
|
|
608
|
-
const shouldUseIncreasedScalingPercent = isTableScalingWithFixedColumnWidthsOptionEnabled
|
|
606
|
+
const shouldUseIncreasedScalingPercent = isTableScalingWithFixedColumnWidthsOptionEnabled || !!isTableScalingEnabled && !!((_this$props$options10 = this.props.options) !== null && _this$props$options10 !== void 0 && _this$props$options10.isCommentEditor);
|
|
609
607
|
if (isTableScalingWithFixedColumnWidthsOptionEnabled && getNode().attrs.displayMode !== 'fixed') {
|
|
610
608
|
shouldScale = true;
|
|
611
609
|
shouldHandleColgroupUpdates = true;
|
|
@@ -822,7 +820,7 @@ class TableComponent extends React.Component {
|
|
|
822
820
|
stickyScrollbar,
|
|
823
821
|
tableWithFixedColumnWidthsOption = false
|
|
824
822
|
} = getEditorFeatureFlags();
|
|
825
|
-
const shouldUseIncreasedScalingPercent = !!isTableScalingEnabled && (tableWithFixedColumnWidthsOption
|
|
823
|
+
const shouldUseIncreasedScalingPercent = !!isTableScalingEnabled && (tableWithFixedColumnWidthsOption || !!((_this$props$options12 = this.props.options) !== null && _this$props$options12 !== void 0 && _this$props$options12.isCommentEditor));
|
|
826
824
|
return /*#__PURE__*/React.createElement(TableContainer
|
|
827
825
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
828
826
|
, {
|
package/dist/es2019/plugin.js
CHANGED
|
@@ -66,7 +66,7 @@ const tablesPlugin = ({
|
|
|
66
66
|
const editorAnalyticsAPI = api === null || api === void 0 ? void 0 : (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions;
|
|
67
67
|
const ariaNotifyPlugin = api === null || api === void 0 ? void 0 : (_api$accessibilityUti = api.accessibilityUtils) === null || _api$accessibilityUti === void 0 ? void 0 : _api$accessibilityUti.actions.ariaNotify;
|
|
68
68
|
const isTableFixedColumnWidthsOptionEnabled = (options === null || options === void 0 ? void 0 : (_options$getEditorFea = options.getEditorFeatureFlags) === null || _options$getEditorFea === void 0 ? void 0 : _options$getEditorFea.call(options).tableWithFixedColumnWidthsOption) || false;
|
|
69
|
-
const shouldUseIncreasedScalingPercent = (options === null || options === void 0 ? void 0 : options.isTableScalingEnabled) && (isTableFixedColumnWidthsOptionEnabled
|
|
69
|
+
const shouldUseIncreasedScalingPercent = (options === null || options === void 0 ? void 0 : options.isTableScalingEnabled) && (isTableFixedColumnWidthsOptionEnabled || ( // When in comment editor, we need the scaling percent to be 40% while tableWithFixedColumnWidthsOption is not visible
|
|
70
70
|
options === null || options === void 0 ? void 0 : options.isCommentEditor));
|
|
71
71
|
const isCellBackgroundDuplicated = (options === null || options === void 0 ? void 0 : (_options$getEditorFea2 = options.getEditorFeatureFlags) === null || _options$getEditorFea2 === void 0 ? void 0 : _options$getEditorFea2.call(options).tableDuplicateCellColouring) || false;
|
|
72
72
|
return {
|
|
@@ -3,7 +3,6 @@ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
|
3
3
|
import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
4
4
|
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
5
5
|
import { getCellsInRow, getSelectedCellInfo } from '@atlaskit/editor-tables/utils';
|
|
6
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
6
|
import { autoScrollForElements } from '@atlaskit/pragmatic-drag-and-drop-auto-scroll/element';
|
|
8
7
|
import { combine } from '@atlaskit/pragmatic-drag-and-drop/combine';
|
|
9
8
|
import { monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
|
|
@@ -176,9 +175,7 @@ const destroyFn = (editorView, editorAnalyticsAPI, isTableScalingEnabled, isTabl
|
|
|
176
175
|
if (isTableScalingEnabled && isCommentEditor) {
|
|
177
176
|
isTableScalingEnabledOnCurrentTable = true;
|
|
178
177
|
}
|
|
179
|
-
const shouldUseIncreasedScalingPercent = isTableScalingWithFixedColumnWidthsOptionEnabled &&
|
|
180
|
-
// When in comment editor, we need the scaling percent to be 40% while tableWithFixedColumnWidthsOption is not visible
|
|
181
|
-
isTableScalingEnabled && isCommentEditor;
|
|
178
|
+
const shouldUseIncreasedScalingPercent = isTableScalingWithFixedColumnWidthsOptionEnabled || isTableScalingEnabled && isCommentEditor;
|
|
182
179
|
insertColgroupFromNode(tableRef, tableNode, isTableScalingEnabledOnCurrentTable, undefined, shouldUseIncreasedScalingPercent, isCommentEditor);
|
|
183
180
|
}
|
|
184
181
|
}
|
|
@@ -2,7 +2,6 @@ import { ACTION_SUBJECT, CHANGE_ALIGNMENT_REASON, EVENT_TYPE, INPUT_METHOD, TABL
|
|
|
2
2
|
import { tableCellMinWidth } from '@atlaskit/editor-common/styles';
|
|
3
3
|
import { TableMap } from '@atlaskit/editor-tables/table-map';
|
|
4
4
|
import { getSelectionRect } from '@atlaskit/editor-tables/utils';
|
|
5
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
5
|
import { stopKeyboardColumnResizing } from '../../commands/column-resize';
|
|
7
6
|
import { updateResizeHandleDecorations } from '../../commands/misc';
|
|
8
7
|
import { updateColumnWidths } from '../../transforms';
|
|
@@ -71,7 +70,7 @@ export const handleMouseDown = (view, event, localResizeHandlePos, getEditorCont
|
|
|
71
70
|
if (isTableScalingWithFixedColumnWidthsOptionEnabled) {
|
|
72
71
|
shouldScale = shouldScale && originalTable.attrs.displayMode !== 'fixed';
|
|
73
72
|
}
|
|
74
|
-
let shouldUseIncreasedScalingPercent = isTableScalingWithFixedColumnWidthsOptionEnabled
|
|
73
|
+
let shouldUseIncreasedScalingPercent = isTableScalingWithFixedColumnWidthsOptionEnabled;
|
|
75
74
|
if (isTableScalingEnabled && isCommentEditor) {
|
|
76
75
|
shouldScale = tableDepth === 0;
|
|
77
76
|
shouldUseIncreasedScalingPercent = true;
|
|
@@ -185,7 +184,7 @@ export const handleMouseDown = (view, event, localResizeHandlePos, getEditorCont
|
|
|
185
184
|
shouldScale = shouldScale && originalTable.attrs.displayMode !== 'fixed';
|
|
186
185
|
}
|
|
187
186
|
const resizedDelta = clientX - startX;
|
|
188
|
-
const shouldUseIncreasedScalingPercent = isTableScalingWithFixedColumnWidthsOptionEnabled
|
|
187
|
+
const shouldUseIncreasedScalingPercent = isTableScalingWithFixedColumnWidthsOptionEnabled || isTableScalingEnabled && !!isCommentEditor;
|
|
189
188
|
if (isNewColumnResizingEnabled && !isTableNested(state, tablePos)) {
|
|
190
189
|
const newResizeState = resizeColumnAndTable({
|
|
191
190
|
resizeState,
|
|
@@ -299,7 +298,7 @@ export const handleMouseDown = (view, event, localResizeHandlePos, getEditorCont
|
|
|
299
298
|
const map = TableMap.get(table);
|
|
300
299
|
const colIndex = map.colCount($cell.pos - $cell.start(-1)) + $cell.nodeAfter.attrs.colspan - 1;
|
|
301
300
|
let shouldScale = tableDepth === 0 && isTableScalingEnabled;
|
|
302
|
-
const shouldUseIncreasedScalingPercent = isTableScalingWithFixedColumnWidthsOptionEnabled
|
|
301
|
+
const shouldUseIncreasedScalingPercent = isTableScalingWithFixedColumnWidthsOptionEnabled || isTableScalingEnabled && isCommentEditor;
|
|
303
302
|
if (isTableScalingWithFixedColumnWidthsOptionEnabled) {
|
|
304
303
|
shouldScale = shouldScale && originalTable.attrs.displayMode !== 'fixed';
|
|
305
304
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { getTableContainerWidth } from '@atlaskit/editor-common/node-width';
|
|
2
2
|
import { tableCellMinWidth, tableNewColumnMinWidth } from '@atlaskit/editor-common/styles';
|
|
3
3
|
import { calcTableColumnWidths } from '@atlaskit/editor-common/utils';
|
|
4
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
4
|
import { getSelectedTableInfo } from '../../../utils';
|
|
6
5
|
import { getColWidthFix, hasTableBeenResized, insertColgroupFromNode } from './colgroup';
|
|
7
6
|
import { getCellsRefsInColumn, getColumnStateFromDOM } from './column-state';
|
|
@@ -312,7 +311,7 @@ export const getNewResizeStateFromSelectedColumns = (rect, state, domAtPos, getE
|
|
|
312
311
|
if (isTableScalingWithFixedColumnWidthsOptionEnabled) {
|
|
313
312
|
isTableScalingEnabledOnCurrentTable = table.node.attrs.displayMode !== 'fixed';
|
|
314
313
|
}
|
|
315
|
-
let shouldUseIncreasedScalingPercent = isTableScalingWithFixedColumnWidthsOptionEnabled
|
|
314
|
+
let shouldUseIncreasedScalingPercent = isTableScalingWithFixedColumnWidthsOptionEnabled;
|
|
316
315
|
if (isTableScalingEnabled && isCommentEditor) {
|
|
317
316
|
isTableScalingEnabledOnCurrentTable = true;
|
|
318
317
|
shouldUseIncreasedScalingPercent = true;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { getTableContainerWidth } from '@atlaskit/editor-common/node-width';
|
|
2
2
|
import { tableCellMinWidth } from '@atlaskit/editor-common/styles';
|
|
3
3
|
import { akEditorTableNumberColumnWidth } from '@atlaskit/editor-shared-styles';
|
|
4
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
4
|
import { updateColumnWidths } from '../../../transforms';
|
|
6
5
|
import { getTableWidth } from '../../../utils';
|
|
7
6
|
import { getLayoutSize } from '../utils/misc';
|
|
@@ -125,9 +124,7 @@ export const previewScaleTable = (tableRef, options, domAtPos, isTableScalingEna
|
|
|
125
124
|
syncStickyRowToTable(tableRef);
|
|
126
125
|
return;
|
|
127
126
|
}
|
|
128
|
-
const shouldUseIncreasedScalingPercent = isTableScalingWithFixedColumnWidthsOptionEnabled &&
|
|
129
|
-
// When in comment editor, we need the scaling percent to be 40% while tableWithFixedColumnWidthsOption is not visible
|
|
130
|
-
isTableScalingEnabled && isCommentEditor;
|
|
127
|
+
const shouldUseIncreasedScalingPercent = isTableScalingWithFixedColumnWidthsOptionEnabled || isTableScalingEnabled && isCommentEditor;
|
|
131
128
|
const resizeState = parentWidth ? scaleWithParent(tableRef, parentWidth, node, start, domAtPos, false,
|
|
132
129
|
// Here isTableScalingEnabled = false
|
|
133
130
|
shouldUseIncreasedScalingPercent) : scale(tableRef, options, domAtPos, false, shouldUseIncreasedScalingPercent);
|
|
@@ -523,7 +523,7 @@ export class ContextualMenu extends Component {
|
|
|
523
523
|
dispatch(tr);
|
|
524
524
|
editorView.dom.focus(); // otherwise cursor disappears from cell
|
|
525
525
|
}
|
|
526
|
-
const shouldUseIncreasedScalingPercent = isTableScalingEnabled && (tableWithFixedColumnWidthsOption
|
|
526
|
+
const shouldUseIncreasedScalingPercent = isTableScalingEnabled && (tableWithFixedColumnWidthsOption ||
|
|
527
527
|
// When in comment editor, we need the scaling percent to be 40% while tableWithFixedColumnWidthsOption is not visible
|
|
528
528
|
isCommentEditor);
|
|
529
529
|
switch (item.value.name) {
|
|
@@ -2,7 +2,6 @@ import React from 'react';
|
|
|
2
2
|
import { Popup } from '@atlaskit/editor-common/ui';
|
|
3
3
|
import { akEditorFloatingDialogZIndex, akEditorFloatingOverlapPanelZIndex } from '@atlaskit/editor-shared-styles';
|
|
4
4
|
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
5
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
5
|
import { dragMenuDropdownWidth, tablePopupMenuFitHeight } from '../consts';
|
|
7
6
|
import DragMenu from './DragMenu';
|
|
8
7
|
const FloatingDragMenu = ({
|
|
@@ -39,7 +38,7 @@ const FloatingDragMenu = ({
|
|
|
39
38
|
tableWithFixedColumnWidthsOption = false,
|
|
40
39
|
tableSortColumnReorder = false
|
|
41
40
|
} = getEditorFeatureFlags ? getEditorFeatureFlags() : {};
|
|
42
|
-
const shouldUseIncreasedScalingPercent = isTableScalingEnabled && tableWithFixedColumnWidthsOption
|
|
41
|
+
const shouldUseIncreasedScalingPercent = isTableScalingEnabled && (tableWithFixedColumnWidthsOption || isCommentEditor);
|
|
43
42
|
return /*#__PURE__*/React.createElement(Popup, {
|
|
44
43
|
alignX: direction === 'row' ? 'right' : undefined,
|
|
45
44
|
alignY: direction === 'row' ? 'start' : undefined,
|
|
@@ -10,7 +10,6 @@ import { akEditorTableCellOnStickyHeaderZIndex } from '@atlaskit/editor-shared-s
|
|
|
10
10
|
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
11
11
|
import { TableMap } from '@atlaskit/editor-tables/table-map';
|
|
12
12
|
import { findTable } from '@atlaskit/editor-tables/utils';
|
|
13
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
14
13
|
import { insertColumnWithAnalytics, insertRowWithAnalytics } from '../../commands-with-analytics';
|
|
15
14
|
import { TableCssClassName as ClassName } from '../../types';
|
|
16
15
|
import { checkIfNumberColumnEnabled } from '../../utils';
|
|
@@ -189,7 +188,7 @@ export class FloatingInsertButton extends React.Component {
|
|
|
189
188
|
tableDuplicateCellColouring = false,
|
|
190
189
|
tableWithFixedColumnWidthsOption = false
|
|
191
190
|
} = getEditorFeatureFlags ? getEditorFeatureFlags() : {};
|
|
192
|
-
const shouldUseIncreasedScalingPercent = isTableScalingEnabled && tableWithFixedColumnWidthsOption
|
|
191
|
+
const shouldUseIncreasedScalingPercent = isTableScalingEnabled && (tableWithFixedColumnWidthsOption || isCommentEditor);
|
|
193
192
|
const {
|
|
194
193
|
state,
|
|
195
194
|
dispatch
|
|
@@ -2,7 +2,6 @@ import { tableMessages as messages } from '@atlaskit/editor-common/messages';
|
|
|
2
2
|
import { tableCellMinWidth } from '@atlaskit/editor-common/styles';
|
|
3
3
|
import { TableMap } from '@atlaskit/editor-tables';
|
|
4
4
|
import { findCellClosestToPos, findCellRectClosestToPos, findTableClosestToPos, getSelectionRect, isSelectionType, nextCell } from '@atlaskit/editor-tables/utils';
|
|
5
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
5
|
import { getDecorations } from '../pm-plugins/decorations/plugin';
|
|
7
6
|
import { buildColumnResizingDecorations, clearColumnResizingDecorations } from '../pm-plugins/decorations/utils';
|
|
8
7
|
import { createCommand, getPluginState } from '../pm-plugins/plugin-factory';
|
|
@@ -201,7 +200,7 @@ export var changeColumnWidthByStep = function changeColumnWidthByStep(_ref4) {
|
|
|
201
200
|
if (isTableScalingWithFixedColumnWidthsOptionEnabled) {
|
|
202
201
|
isTableScalingEnabledOnCurrentTable = originalTable.attrs.displayMode !== 'fixed';
|
|
203
202
|
}
|
|
204
|
-
var shouldUseIncreasedScalingPercent = isTableScalingWithFixedColumnWidthsOptionEnabled
|
|
203
|
+
var shouldUseIncreasedScalingPercent = isTableScalingWithFixedColumnWidthsOptionEnabled;
|
|
205
204
|
if (isTableScalingEnabled && isCommentEditor) {
|
|
206
205
|
isTableScalingEnabledOnCurrentTable = true;
|
|
207
206
|
shouldUseIncreasedScalingPercent = true;
|
|
@@ -537,9 +537,7 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
537
537
|
_getEditorFeatureFlag5 = _getEditorFeatureFlag4.tableWithFixedColumnWidthsOption,
|
|
538
538
|
tableWithFixedColumnWidthsOption = _getEditorFeatureFlag5 === void 0 ? false : _getEditorFeatureFlag5;
|
|
539
539
|
var isTableScalingWithFixedColumnWidthsOptionEnabled = !!((_this$props$options = this.props.options) !== null && _this$props$options !== void 0 && _this$props$options.isTableScalingEnabled) && tableWithFixedColumnWidthsOption;
|
|
540
|
-
var shouldUseIncreasedScalingPercent = isTableScalingWithFixedColumnWidthsOptionEnabled &&
|
|
541
|
-
// When in comment editor, we need the scaling percent to be 40% while tableWithFixedColumnWidthsOption is not visible
|
|
542
|
-
!!((_this$props$options2 = this.props.options) !== null && _this$props$options2 !== void 0 && _this$props$options2.isTableScalingEnabled) && !!((_this$props$options3 = this.props.options) !== null && _this$props$options3 !== void 0 && _this$props$options3.isCommentEditor);
|
|
540
|
+
var shouldUseIncreasedScalingPercent = isTableScalingWithFixedColumnWidthsOptionEnabled || !!((_this$props$options2 = this.props.options) !== null && _this$props$options2 !== void 0 && _this$props$options2.isTableScalingEnabled) && !!((_this$props$options3 = this.props.options) !== null && _this$props$options3 !== void 0 && _this$props$options3.isCommentEditor);
|
|
543
541
|
if (force || !isResizing && shouldUpdateColgroup) {
|
|
544
542
|
var _this$props$options4, _this$props$options5, _this$props$options6, _this$props$options7;
|
|
545
543
|
var resizeState = getResizeState({
|
|
@@ -618,7 +616,7 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
618
616
|
shouldHandleColgroupUpdates = true;
|
|
619
617
|
}
|
|
620
618
|
var isTableScalingWithFixedColumnWidthsOptionEnabled = !!isTableScalingEnabled && tableWithFixedColumnWidthsOption;
|
|
621
|
-
var shouldUseIncreasedScalingPercent = isTableScalingWithFixedColumnWidthsOptionEnabled
|
|
619
|
+
var shouldUseIncreasedScalingPercent = isTableScalingWithFixedColumnWidthsOptionEnabled || !!isTableScalingEnabled && !!((_this$props$options8 = this.props.options) !== null && _this$props$options8 !== void 0 && _this$props$options8.isCommentEditor);
|
|
622
620
|
if (isTableScalingWithFixedColumnWidthsOptionEnabled && getNode().attrs.displayMode !== 'fixed') {
|
|
623
621
|
shouldScale = true;
|
|
624
622
|
shouldHandleColgroupUpdates = true;
|
|
@@ -835,7 +833,7 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
835
833
|
stickyScrollbar = _getEditorFeatureFlag8.stickyScrollbar,
|
|
836
834
|
_getEditorFeatureFlag9 = _getEditorFeatureFlag8.tableWithFixedColumnWidthsOption,
|
|
837
835
|
tableWithFixedColumnWidthsOption = _getEditorFeatureFlag9 === void 0 ? false : _getEditorFeatureFlag9;
|
|
838
|
-
var shouldUseIncreasedScalingPercent = !!isTableScalingEnabled && (tableWithFixedColumnWidthsOption
|
|
836
|
+
var shouldUseIncreasedScalingPercent = !!isTableScalingEnabled && (tableWithFixedColumnWidthsOption || !!((_this$props$options10 = this.props.options) !== null && _this$props$options10 !== void 0 && _this$props$options10.isCommentEditor));
|
|
839
837
|
return /*#__PURE__*/React.createElement(TableContainer
|
|
840
838
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
841
839
|
, {
|
package/dist/esm/plugin.js
CHANGED
|
@@ -70,7 +70,7 @@ var tablesPlugin = function tablesPlugin(_ref) {
|
|
|
70
70
|
var editorAnalyticsAPI = api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions;
|
|
71
71
|
var ariaNotifyPlugin = api === null || api === void 0 || (_api$accessibilityUti = api.accessibilityUtils) === null || _api$accessibilityUti === void 0 ? void 0 : _api$accessibilityUti.actions.ariaNotify;
|
|
72
72
|
var isTableFixedColumnWidthsOptionEnabled = (options === null || options === void 0 || (_options$getEditorFea = options.getEditorFeatureFlags) === null || _options$getEditorFea === void 0 ? void 0 : _options$getEditorFea.call(options).tableWithFixedColumnWidthsOption) || false;
|
|
73
|
-
var shouldUseIncreasedScalingPercent = (options === null || options === void 0 ? void 0 : options.isTableScalingEnabled) && (isTableFixedColumnWidthsOptionEnabled
|
|
73
|
+
var shouldUseIncreasedScalingPercent = (options === null || options === void 0 ? void 0 : options.isTableScalingEnabled) && (isTableFixedColumnWidthsOptionEnabled || ( // When in comment editor, we need the scaling percent to be 40% while tableWithFixedColumnWidthsOption is not visible
|
|
74
74
|
options === null || options === void 0 ? void 0 : options.isCommentEditor));
|
|
75
75
|
var isCellBackgroundDuplicated = (options === null || options === void 0 || (_options$getEditorFea2 = options.getEditorFeatureFlags) === null || _options$getEditorFea2 === void 0 ? void 0 : _options$getEditorFea2.call(options).tableDuplicateCellColouring) || false;
|
|
76
76
|
return {
|
|
@@ -3,7 +3,6 @@ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
|
3
3
|
import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
4
4
|
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
5
5
|
import { getCellsInRow, getSelectedCellInfo } from '@atlaskit/editor-tables/utils';
|
|
6
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
6
|
import { autoScrollForElements } from '@atlaskit/pragmatic-drag-and-drop-auto-scroll/element';
|
|
8
7
|
import { combine } from '@atlaskit/pragmatic-drag-and-drop/combine';
|
|
9
8
|
import { monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
|
|
@@ -162,9 +161,7 @@ var destroyFn = function destroyFn(editorView, editorAnalyticsAPI, isTableScalin
|
|
|
162
161
|
if (isTableScalingEnabled && isCommentEditor) {
|
|
163
162
|
isTableScalingEnabledOnCurrentTable = true;
|
|
164
163
|
}
|
|
165
|
-
var shouldUseIncreasedScalingPercent = isTableScalingWithFixedColumnWidthsOptionEnabled &&
|
|
166
|
-
// When in comment editor, we need the scaling percent to be 40% while tableWithFixedColumnWidthsOption is not visible
|
|
167
|
-
isTableScalingEnabled && isCommentEditor;
|
|
164
|
+
var shouldUseIncreasedScalingPercent = isTableScalingWithFixedColumnWidthsOptionEnabled || isTableScalingEnabled && isCommentEditor;
|
|
168
165
|
insertColgroupFromNode(tableRef, tableNode, isTableScalingEnabledOnCurrentTable, undefined, shouldUseIncreasedScalingPercent, isCommentEditor);
|
|
169
166
|
}
|
|
170
167
|
}
|
|
@@ -5,7 +5,6 @@ import { ACTION_SUBJECT, CHANGE_ALIGNMENT_REASON, EVENT_TYPE, INPUT_METHOD, TABL
|
|
|
5
5
|
import { tableCellMinWidth } from '@atlaskit/editor-common/styles';
|
|
6
6
|
import { TableMap } from '@atlaskit/editor-tables/table-map';
|
|
7
7
|
import { getSelectionRect } from '@atlaskit/editor-tables/utils';
|
|
8
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
8
|
import { stopKeyboardColumnResizing } from '../../commands/column-resize';
|
|
10
9
|
import { updateResizeHandleDecorations } from '../../commands/misc';
|
|
11
10
|
import { updateColumnWidths } from '../../transforms';
|
|
@@ -70,7 +69,7 @@ export var handleMouseDown = function handleMouseDown(view, event, localResizeHa
|
|
|
70
69
|
if (isTableScalingWithFixedColumnWidthsOptionEnabled) {
|
|
71
70
|
shouldScale = shouldScale && originalTable.attrs.displayMode !== 'fixed';
|
|
72
71
|
}
|
|
73
|
-
var shouldUseIncreasedScalingPercent = isTableScalingWithFixedColumnWidthsOptionEnabled
|
|
72
|
+
var shouldUseIncreasedScalingPercent = isTableScalingWithFixedColumnWidthsOptionEnabled;
|
|
74
73
|
if (isTableScalingEnabled && isCommentEditor) {
|
|
75
74
|
shouldScale = tableDepth === 0;
|
|
76
75
|
shouldUseIncreasedScalingPercent = true;
|
|
@@ -174,7 +173,7 @@ export var handleMouseDown = function handleMouseDown(view, event, localResizeHa
|
|
|
174
173
|
_shouldScale = _shouldScale && originalTable.attrs.displayMode !== 'fixed';
|
|
175
174
|
}
|
|
176
175
|
var resizedDelta = clientX - startX;
|
|
177
|
-
var _shouldUseIncreasedScalingPercent = isTableScalingWithFixedColumnWidthsOptionEnabled
|
|
176
|
+
var _shouldUseIncreasedScalingPercent = isTableScalingWithFixedColumnWidthsOptionEnabled || isTableScalingEnabled && !!isCommentEditor;
|
|
178
177
|
if (isNewColumnResizingEnabled && !isTableNested(state, tablePos)) {
|
|
179
178
|
var newResizeState = resizeColumnAndTable({
|
|
180
179
|
resizeState: resizeState,
|
|
@@ -281,7 +280,7 @@ export var handleMouseDown = function handleMouseDown(view, event, localResizeHa
|
|
|
281
280
|
var map = TableMap.get(table);
|
|
282
281
|
var colIndex = map.colCount($cell.pos - $cell.start(-1)) + $cell.nodeAfter.attrs.colspan - 1;
|
|
283
282
|
var shouldScale = tableDepth === 0 && isTableScalingEnabled;
|
|
284
|
-
var shouldUseIncreasedScalingPercent = isTableScalingWithFixedColumnWidthsOptionEnabled
|
|
283
|
+
var shouldUseIncreasedScalingPercent = isTableScalingWithFixedColumnWidthsOptionEnabled || isTableScalingEnabled && isCommentEditor;
|
|
285
284
|
if (isTableScalingWithFixedColumnWidthsOptionEnabled) {
|
|
286
285
|
shouldScale = shouldScale && originalTable.attrs.displayMode !== 'fixed';
|
|
287
286
|
}
|
|
@@ -4,7 +4,6 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
4
4
|
import { getTableContainerWidth } from '@atlaskit/editor-common/node-width';
|
|
5
5
|
import { tableCellMinWidth, tableNewColumnMinWidth } from '@atlaskit/editor-common/styles';
|
|
6
6
|
import { calcTableColumnWidths } from '@atlaskit/editor-common/utils';
|
|
7
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
7
|
import { getSelectedTableInfo } from '../../../utils';
|
|
9
8
|
import { getColWidthFix, hasTableBeenResized, insertColgroupFromNode } from './colgroup';
|
|
10
9
|
import { getCellsRefsInColumn, getColumnStateFromDOM } from './column-state';
|
|
@@ -336,7 +335,7 @@ export var getNewResizeStateFromSelectedColumns = function getNewResizeStateFrom
|
|
|
336
335
|
if (isTableScalingWithFixedColumnWidthsOptionEnabled) {
|
|
337
336
|
isTableScalingEnabledOnCurrentTable = table.node.attrs.displayMode !== 'fixed';
|
|
338
337
|
}
|
|
339
|
-
var shouldUseIncreasedScalingPercent = isTableScalingWithFixedColumnWidthsOptionEnabled
|
|
338
|
+
var shouldUseIncreasedScalingPercent = isTableScalingWithFixedColumnWidthsOptionEnabled;
|
|
340
339
|
if (isTableScalingEnabled && isCommentEditor) {
|
|
341
340
|
isTableScalingEnabledOnCurrentTable = true;
|
|
342
341
|
shouldUseIncreasedScalingPercent = true;
|
|
@@ -4,7 +4,6 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
4
4
|
import { getTableContainerWidth } from '@atlaskit/editor-common/node-width';
|
|
5
5
|
import { tableCellMinWidth } from '@atlaskit/editor-common/styles';
|
|
6
6
|
import { akEditorTableNumberColumnWidth } from '@atlaskit/editor-shared-styles';
|
|
7
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
7
|
import { updateColumnWidths } from '../../../transforms';
|
|
9
8
|
import { getTableWidth } from '../../../utils';
|
|
10
9
|
import { getLayoutSize } from '../utils/misc';
|
|
@@ -129,9 +128,7 @@ export var previewScaleTable = function previewScaleTable(tableRef, options, dom
|
|
|
129
128
|
syncStickyRowToTable(tableRef);
|
|
130
129
|
return;
|
|
131
130
|
}
|
|
132
|
-
var shouldUseIncreasedScalingPercent = isTableScalingWithFixedColumnWidthsOptionEnabled &&
|
|
133
|
-
// When in comment editor, we need the scaling percent to be 40% while tableWithFixedColumnWidthsOption is not visible
|
|
134
|
-
isTableScalingEnabled && isCommentEditor;
|
|
131
|
+
var shouldUseIncreasedScalingPercent = isTableScalingWithFixedColumnWidthsOptionEnabled || isTableScalingEnabled && isCommentEditor;
|
|
135
132
|
var resizeState = parentWidth ? scaleWithParent(tableRef, parentWidth, node, start, domAtPos, false,
|
|
136
133
|
// Here isTableScalingEnabled = false
|
|
137
134
|
shouldUseIncreasedScalingPercent) : scale(tableRef, options, domAtPos, false, shouldUseIncreasedScalingPercent);
|
|
@@ -483,7 +483,7 @@ export var ContextualMenu = /*#__PURE__*/function (_Component) {
|
|
|
483
483
|
dispatch(tr);
|
|
484
484
|
editorView.dom.focus(); // otherwise cursor disappears from cell
|
|
485
485
|
}
|
|
486
|
-
var shouldUseIncreasedScalingPercent = isTableScalingEnabled && (tableWithFixedColumnWidthsOption
|
|
486
|
+
var shouldUseIncreasedScalingPercent = isTableScalingEnabled && (tableWithFixedColumnWidthsOption ||
|
|
487
487
|
// When in comment editor, we need the scaling percent to be 40% while tableWithFixedColumnWidthsOption is not visible
|
|
488
488
|
isCommentEditor);
|
|
489
489
|
switch (item.value.name) {
|
|
@@ -2,7 +2,6 @@ import React from 'react';
|
|
|
2
2
|
import { Popup } from '@atlaskit/editor-common/ui';
|
|
3
3
|
import { akEditorFloatingDialogZIndex, akEditorFloatingOverlapPanelZIndex } from '@atlaskit/editor-shared-styles';
|
|
4
4
|
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
5
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
5
|
import { dragMenuDropdownWidth, tablePopupMenuFitHeight } from '../consts';
|
|
7
6
|
import DragMenu from './DragMenu';
|
|
8
7
|
var FloatingDragMenu = function FloatingDragMenu(_ref) {
|
|
@@ -40,7 +39,7 @@ var FloatingDragMenu = function FloatingDragMenu(_ref) {
|
|
|
40
39
|
tableWithFixedColumnWidthsOption = _ref2$tableWithFixedC === void 0 ? false : _ref2$tableWithFixedC,
|
|
41
40
|
_ref2$tableSortColumn = _ref2.tableSortColumnReorder,
|
|
42
41
|
tableSortColumnReorder = _ref2$tableSortColumn === void 0 ? false : _ref2$tableSortColumn;
|
|
43
|
-
var shouldUseIncreasedScalingPercent = isTableScalingEnabled && tableWithFixedColumnWidthsOption
|
|
42
|
+
var shouldUseIncreasedScalingPercent = isTableScalingEnabled && (tableWithFixedColumnWidthsOption || isCommentEditor);
|
|
44
43
|
return /*#__PURE__*/React.createElement(Popup, {
|
|
45
44
|
alignX: direction === 'row' ? 'right' : undefined,
|
|
46
45
|
alignY: direction === 'row' ? 'start' : undefined,
|
|
@@ -18,7 +18,6 @@ import { akEditorTableCellOnStickyHeaderZIndex } from '@atlaskit/editor-shared-s
|
|
|
18
18
|
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
19
19
|
import { TableMap } from '@atlaskit/editor-tables/table-map';
|
|
20
20
|
import { findTable } from '@atlaskit/editor-tables/utils';
|
|
21
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
22
21
|
import { insertColumnWithAnalytics, insertRowWithAnalytics } from '../../commands-with-analytics';
|
|
23
22
|
import { TableCssClassName as ClassName } from '../../types';
|
|
24
23
|
import { checkIfNumberColumnEnabled } from '../../utils';
|
|
@@ -201,7 +200,7 @@ export var FloatingInsertButton = /*#__PURE__*/function (_React$Component) {
|
|
|
201
200
|
tableDuplicateCellColouring = _ref$tableDuplicateCe === void 0 ? false : _ref$tableDuplicateCe,
|
|
202
201
|
_ref$tableWithFixedCo = _ref.tableWithFixedColumnWidthsOption,
|
|
203
202
|
tableWithFixedColumnWidthsOption = _ref$tableWithFixedCo === void 0 ? false : _ref$tableWithFixedCo;
|
|
204
|
-
var shouldUseIncreasedScalingPercent = isTableScalingEnabled && tableWithFixedColumnWidthsOption
|
|
203
|
+
var shouldUseIncreasedScalingPercent = isTableScalingEnabled && (tableWithFixedColumnWidthsOption || isCommentEditor);
|
|
205
204
|
var state = editorView.state,
|
|
206
205
|
dispatch = editorView.dispatch;
|
|
207
206
|
insertColumnWithAnalytics(this.props.api, editorAnalyticsAPI, isTableScalingEnabled, tableDuplicateCellColouring, tableWithFixedColumnWidthsOption, shouldUseIncreasedScalingPercent, isCommentEditor)(INPUT_METHOD.BUTTON, insertColumnButtonIndex)(state, dispatch, editorView);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-table",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.27.0",
|
|
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": "^40.9.0",
|
|
31
31
|
"@atlaskit/button": "^20.1.0",
|
|
32
32
|
"@atlaskit/custom-steps": "^0.7.0",
|
|
33
|
-
"@atlaskit/editor-common": "^89.
|
|
33
|
+
"@atlaskit/editor-common": "^89.3.0",
|
|
34
34
|
"@atlaskit/editor-palette": "1.6.0",
|
|
35
35
|
"@atlaskit/editor-plugin-accessibility-utils": "^1.2.0",
|
|
36
36
|
"@atlaskit/editor-plugin-analytics": "^1.8.0",
|
|
@@ -106,9 +106,6 @@
|
|
|
106
106
|
"platform.editor.table.use-shared-state-hook": {
|
|
107
107
|
"type": "boolean"
|
|
108
108
|
},
|
|
109
|
-
"platform.editor.table.use-increased-scaling-percent": {
|
|
110
|
-
"type": "boolean"
|
|
111
|
-
},
|
|
112
109
|
"platform_editor_batch_steps_table": {
|
|
113
110
|
"type": "boolean"
|
|
114
111
|
},
|
|
@@ -15,7 +15,6 @@ import {
|
|
|
15
15
|
isSelectionType,
|
|
16
16
|
nextCell,
|
|
17
17
|
} from '@atlaskit/editor-tables/utils';
|
|
18
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
19
18
|
|
|
20
19
|
import { getDecorations } from '../pm-plugins/decorations/plugin';
|
|
21
20
|
import {
|
|
@@ -327,9 +326,7 @@ export const changeColumnWidthByStep =
|
|
|
327
326
|
isTableScalingEnabledOnCurrentTable = originalTable.attrs.displayMode !== 'fixed';
|
|
328
327
|
}
|
|
329
328
|
|
|
330
|
-
let shouldUseIncreasedScalingPercent =
|
|
331
|
-
isTableScalingWithFixedColumnWidthsOptionEnabled &&
|
|
332
|
-
fg('platform.editor.table.use-increased-scaling-percent');
|
|
329
|
+
let shouldUseIncreasedScalingPercent = isTableScalingWithFixedColumnWidthsOptionEnabled;
|
|
333
330
|
|
|
334
331
|
if (isTableScalingEnabled && isCommentEditor) {
|
|
335
332
|
isTableScalingEnabledOnCurrentTable = true;
|
|
@@ -451,9 +451,7 @@ class TableComponent extends React.Component<ComponentProps, TableState> {
|
|
|
451
451
|
!!this.props.options?.isTableScalingEnabled && tableWithFixedColumnWidthsOption;
|
|
452
452
|
|
|
453
453
|
const shouldUseIncreasedScalingPercent =
|
|
454
|
-
|
|
455
|
-
fg('platform.editor.table.use-increased-scaling-percent')) ||
|
|
456
|
-
// When in comment editor, we need the scaling percent to be 40% while tableWithFixedColumnWidthsOption is not visible
|
|
454
|
+
isTableScalingWithFixedColumnWidthsOptionEnabled ||
|
|
457
455
|
(!!this.props.options?.isTableScalingEnabled && !!this.props.options?.isCommentEditor);
|
|
458
456
|
|
|
459
457
|
if (force || (!isResizing && shouldUpdateColgroup)) {
|
|
@@ -555,8 +553,7 @@ class TableComponent extends React.Component<ComponentProps, TableState> {
|
|
|
555
553
|
const isTableScalingWithFixedColumnWidthsOptionEnabled =
|
|
556
554
|
!!isTableScalingEnabled && tableWithFixedColumnWidthsOption;
|
|
557
555
|
const shouldUseIncreasedScalingPercent =
|
|
558
|
-
|
|
559
|
-
fg('platform.editor.table.use-increased-scaling-percent')) ||
|
|
556
|
+
isTableScalingWithFixedColumnWidthsOptionEnabled ||
|
|
560
557
|
(!!isTableScalingEnabled && !!this.props.options?.isCommentEditor);
|
|
561
558
|
|
|
562
559
|
if (
|
|
@@ -850,9 +847,7 @@ class TableComponent extends React.Component<ComponentProps, TableState> {
|
|
|
850
847
|
|
|
851
848
|
const shouldUseIncreasedScalingPercent =
|
|
852
849
|
!!isTableScalingEnabled &&
|
|
853
|
-
(
|
|
854
|
-
fg('platform.editor.table.use-increased-scaling-percent')) ||
|
|
855
|
-
!!this.props.options?.isCommentEditor);
|
|
850
|
+
(tableWithFixedColumnWidthsOption || !!this.props.options?.isCommentEditor);
|
|
856
851
|
|
|
857
852
|
return (
|
|
858
853
|
<TableContainer
|
package/src/plugin.tsx
CHANGED
|
@@ -169,8 +169,7 @@ const tablesPlugin: TablePlugin = ({ config: options, api }) => {
|
|
|
169
169
|
|
|
170
170
|
const shouldUseIncreasedScalingPercent =
|
|
171
171
|
options?.isTableScalingEnabled &&
|
|
172
|
-
(
|
|
173
|
-
fg('platform.editor.table.use-increased-scaling-percent')) ||
|
|
172
|
+
(isTableFixedColumnWidthsOptionEnabled ||
|
|
174
173
|
// When in comment editor, we need the scaling percent to be 40% while tableWithFixedColumnWidthsOption is not visible
|
|
175
174
|
options?.isCommentEditor);
|
|
176
175
|
|
|
@@ -6,7 +6,6 @@ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
|
6
6
|
import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
7
7
|
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
8
8
|
import { getCellsInRow, getSelectedCellInfo } from '@atlaskit/editor-tables/utils';
|
|
9
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
9
|
import { autoScrollForElements } from '@atlaskit/pragmatic-drag-and-drop-auto-scroll/element';
|
|
11
10
|
import { combine } from '@atlaskit/pragmatic-drag-and-drop/combine';
|
|
12
11
|
import { monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
|
|
@@ -228,9 +227,7 @@ const destroyFn = (
|
|
|
228
227
|
isTableScalingEnabledOnCurrentTable = true;
|
|
229
228
|
}
|
|
230
229
|
const shouldUseIncreasedScalingPercent =
|
|
231
|
-
|
|
232
|
-
fg('platform.editor.table.use-increased-scaling-percent')) ||
|
|
233
|
-
// When in comment editor, we need the scaling percent to be 40% while tableWithFixedColumnWidthsOption is not visible
|
|
230
|
+
isTableScalingWithFixedColumnWidthsOptionEnabled ||
|
|
234
231
|
(isTableScalingEnabled && isCommentEditor);
|
|
235
232
|
|
|
236
233
|
insertColgroupFromNode(
|
|
@@ -13,7 +13,6 @@ import type { GetEditorContainerWidth, GetEditorFeatureFlags } from '@atlaskit/e
|
|
|
13
13
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
14
14
|
import { TableMap } from '@atlaskit/editor-tables/table-map';
|
|
15
15
|
import { getSelectionRect } from '@atlaskit/editor-tables/utils';
|
|
16
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
17
16
|
|
|
18
17
|
import { stopKeyboardColumnResizing } from '../../commands/column-resize';
|
|
19
18
|
import { updateResizeHandleDecorations } from '../../commands/misc';
|
|
@@ -113,9 +112,7 @@ export const handleMouseDown = (
|
|
|
113
112
|
shouldScale = shouldScale && originalTable.attrs.displayMode !== 'fixed';
|
|
114
113
|
}
|
|
115
114
|
|
|
116
|
-
let shouldUseIncreasedScalingPercent =
|
|
117
|
-
isTableScalingWithFixedColumnWidthsOptionEnabled &&
|
|
118
|
-
fg('platform.editor.table.use-increased-scaling-percent');
|
|
115
|
+
let shouldUseIncreasedScalingPercent = isTableScalingWithFixedColumnWidthsOptionEnabled;
|
|
119
116
|
|
|
120
117
|
if (isTableScalingEnabled && isCommentEditor) {
|
|
121
118
|
shouldScale = tableDepth === 0;
|
|
@@ -231,8 +228,7 @@ export const handleMouseDown = (
|
|
|
231
228
|
|
|
232
229
|
const resizedDelta = clientX - startX;
|
|
233
230
|
const shouldUseIncreasedScalingPercent =
|
|
234
|
-
|
|
235
|
-
fg('platform.editor.table.use-increased-scaling-percent')) ||
|
|
231
|
+
isTableScalingWithFixedColumnWidthsOptionEnabled ||
|
|
236
232
|
(isTableScalingEnabled && !!isCommentEditor);
|
|
237
233
|
|
|
238
234
|
if (isNewColumnResizingEnabled && !isTableNested(state, tablePos)) {
|
|
@@ -371,8 +367,7 @@ export const handleMouseDown = (
|
|
|
371
367
|
let shouldScale = tableDepth === 0 && isTableScalingEnabled;
|
|
372
368
|
|
|
373
369
|
const shouldUseIncreasedScalingPercent =
|
|
374
|
-
|
|
375
|
-
fg('platform.editor.table.use-increased-scaling-percent')) ||
|
|
370
|
+
isTableScalingWithFixedColumnWidthsOptionEnabled ||
|
|
376
371
|
(isTableScalingEnabled && isCommentEditor);
|
|
377
372
|
|
|
378
373
|
if (isTableScalingWithFixedColumnWidthsOptionEnabled) {
|
|
@@ -5,7 +5,6 @@ import { calcTableColumnWidths } from '@atlaskit/editor-common/utils';
|
|
|
5
5
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
6
6
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
7
7
|
import type { Rect } from '@atlaskit/editor-tables/table-map';
|
|
8
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
8
|
|
|
10
9
|
import { getSelectedTableInfo } from '../../../utils';
|
|
11
10
|
|
|
@@ -373,9 +372,7 @@ export const getNewResizeStateFromSelectedColumns = (
|
|
|
373
372
|
isTableScalingEnabledOnCurrentTable = table.node.attrs.displayMode !== 'fixed';
|
|
374
373
|
}
|
|
375
374
|
|
|
376
|
-
let shouldUseIncreasedScalingPercent =
|
|
377
|
-
isTableScalingWithFixedColumnWidthsOptionEnabled &&
|
|
378
|
-
fg('platform.editor.table.use-increased-scaling-percent');
|
|
375
|
+
let shouldUseIncreasedScalingPercent = isTableScalingWithFixedColumnWidthsOptionEnabled;
|
|
379
376
|
|
|
380
377
|
if (isTableScalingEnabled && isCommentEditor) {
|
|
381
378
|
isTableScalingEnabledOnCurrentTable = true;
|
|
@@ -4,7 +4,6 @@ import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
|
4
4
|
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
5
5
|
import type { DomAtPos } from '@atlaskit/editor-prosemirror/utils';
|
|
6
6
|
import { akEditorTableNumberColumnWidth } from '@atlaskit/editor-shared-styles';
|
|
7
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
7
|
|
|
9
8
|
import { updateColumnWidths } from '../../../transforms';
|
|
10
9
|
import type { PluginInjectionAPI } from '../../../types';
|
|
@@ -191,10 +190,7 @@ export const previewScaleTable = (
|
|
|
191
190
|
}
|
|
192
191
|
|
|
193
192
|
const shouldUseIncreasedScalingPercent =
|
|
194
|
-
|
|
195
|
-
fg('platform.editor.table.use-increased-scaling-percent')) ||
|
|
196
|
-
// When in comment editor, we need the scaling percent to be 40% while tableWithFixedColumnWidthsOption is not visible
|
|
197
|
-
(isTableScalingEnabled && isCommentEditor);
|
|
193
|
+
isTableScalingWithFixedColumnWidthsOptionEnabled || (isTableScalingEnabled && isCommentEditor);
|
|
198
194
|
|
|
199
195
|
const resizeState = parentWidth
|
|
200
196
|
? scaleWithParent(
|
|
@@ -683,8 +683,7 @@ export class ContextualMenu extends Component<Props & WrappedComponentProps, Sta
|
|
|
683
683
|
|
|
684
684
|
const shouldUseIncreasedScalingPercent =
|
|
685
685
|
isTableScalingEnabled &&
|
|
686
|
-
(
|
|
687
|
-
fg('platform.editor.table.use-increased-scaling-percent')) ||
|
|
686
|
+
(tableWithFixedColumnWidthsOption ||
|
|
688
687
|
// When in comment editor, we need the scaling percent to be 40% while tableWithFixedColumnWidthsOption is not visible
|
|
689
688
|
isCommentEditor);
|
|
690
689
|
|
|
@@ -11,7 +11,6 @@ import {
|
|
|
11
11
|
akEditorFloatingOverlapPanelZIndex,
|
|
12
12
|
} from '@atlaskit/editor-shared-styles';
|
|
13
13
|
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
14
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
15
14
|
|
|
16
15
|
import type { RowStickyState } from '../../pm-plugins/sticky-headers';
|
|
17
16
|
import type { PluginConfig, PluginInjectionAPI, TableDirection } from '../../types';
|
|
@@ -87,9 +86,7 @@ const FloatingDragMenu = ({
|
|
|
87
86
|
} = getEditorFeatureFlags ? getEditorFeatureFlags() : {};
|
|
88
87
|
|
|
89
88
|
const shouldUseIncreasedScalingPercent =
|
|
90
|
-
isTableScalingEnabled &&
|
|
91
|
-
tableWithFixedColumnWidthsOption &&
|
|
92
|
-
fg('platform.editor.table.use-increased-scaling-percent');
|
|
89
|
+
isTableScalingEnabled && (tableWithFixedColumnWidthsOption || isCommentEditor);
|
|
93
90
|
|
|
94
91
|
return (
|
|
95
92
|
<Popup
|
|
@@ -25,7 +25,6 @@ import { akEditorTableCellOnStickyHeaderZIndex } from '@atlaskit/editor-shared-s
|
|
|
25
25
|
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
26
26
|
import { TableMap } from '@atlaskit/editor-tables/table-map';
|
|
27
27
|
import { findTable } from '@atlaskit/editor-tables/utils';
|
|
28
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
29
28
|
|
|
30
29
|
import { insertColumnWithAnalytics, insertRowWithAnalytics } from '../../commands-with-analytics';
|
|
31
30
|
import { TableCssClassName as ClassName } from '../../types';
|
|
@@ -278,9 +277,7 @@ export class FloatingInsertButton extends React.Component<Props & WrappedCompone
|
|
|
278
277
|
getEditorFeatureFlags ? getEditorFeatureFlags() : {};
|
|
279
278
|
|
|
280
279
|
const shouldUseIncreasedScalingPercent =
|
|
281
|
-
isTableScalingEnabled &&
|
|
282
|
-
tableWithFixedColumnWidthsOption &&
|
|
283
|
-
fg('platform.editor.table.use-increased-scaling-percent');
|
|
280
|
+
isTableScalingEnabled && (tableWithFixedColumnWidthsOption || isCommentEditor);
|
|
284
281
|
|
|
285
282
|
const { state, dispatch } = editorView;
|
|
286
283
|
insertColumnWithAnalytics(
|