@atlaskit/renderer 109.50.7 → 109.51.1
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 +21 -0
- package/dist/cjs/react/index.js +3 -1
- package/dist/cjs/react/nodes/table/colgroup.js +8 -4
- package/dist/cjs/react/nodes/table/sticky.js +9 -9
- package/dist/cjs/react/nodes/table/table.js +8 -4
- package/dist/cjs/react/nodes/table.js +12 -13
- package/dist/cjs/ui/Renderer/ErrorBoundary.js +22 -27
- package/dist/cjs/ui/Renderer/index.js +7 -4
- package/dist/es2019/react/index.js +3 -1
- package/dist/es2019/react/nodes/table/colgroup.js +8 -4
- package/dist/es2019/react/nodes/table/sticky.js +9 -9
- package/dist/es2019/react/nodes/table/table.js +8 -4
- package/dist/es2019/react/nodes/table.js +12 -13
- package/dist/es2019/ui/Renderer/ErrorBoundary.js +20 -25
- package/dist/es2019/ui/Renderer/index.js +7 -4
- package/dist/esm/react/index.js +3 -1
- package/dist/esm/react/nodes/table/colgroup.js +8 -4
- package/dist/esm/react/nodes/table/sticky.js +9 -9
- package/dist/esm/react/nodes/table/table.js +8 -4
- package/dist/esm/react/nodes/table.js +12 -13
- package/dist/esm/ui/Renderer/ErrorBoundary.js +22 -27
- package/dist/esm/ui/Renderer/index.js +7 -4
- package/dist/types/react/index.d.ts +2 -0
- package/dist/types/react/nodes/table/sticky.d.ts +2 -1
- package/dist/types/react/nodes/table/table.d.ts +1 -1
- package/dist/types/react/nodes/table/types.d.ts +1 -0
- package/dist/types/react/nodes/table.d.ts +22 -0
- package/dist/types/ui/Renderer/style.d.ts +1 -0
- package/dist/types/ui/renderer-props.d.ts +1 -0
- package/dist/types-ts4.5/react/index.d.ts +2 -0
- package/dist/types-ts4.5/react/nodes/table/sticky.d.ts +2 -1
- package/dist/types-ts4.5/react/nodes/table/table.d.ts +1 -1
- package/dist/types-ts4.5/react/nodes/table/types.d.ts +1 -0
- package/dist/types-ts4.5/react/nodes/table.d.ts +22 -0
- package/dist/types-ts4.5/ui/Renderer/style.d.ts +1 -0
- package/dist/types-ts4.5/ui/renderer-props.d.ts +1 -0
- package/package.json +5 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @atlaskit/renderer
|
|
2
2
|
|
|
3
|
+
## 109.51.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#134066](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/134066)
|
|
8
|
+
[`43a1d7aed352b`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/43a1d7aed352b) -
|
|
9
|
+
UNSTABLE_allowTableResizing in renderer added
|
|
10
|
+
|
|
11
|
+
## 109.51.0
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- [#134423](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/134423)
|
|
16
|
+
[`026952a6b9ee5`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/026952a6b9ee5) -
|
|
17
|
+
[ux] EDF-1284: Cleanup platform.editor.renderer-error-boundary-for-dom-errors platform flag in
|
|
18
|
+
renderer
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- Updated dependencies
|
|
23
|
+
|
|
3
24
|
## 109.50.7
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
package/dist/cjs/react/index.js
CHANGED
|
@@ -192,6 +192,7 @@ var ReactSerializer = exports.default = /*#__PURE__*/function () {
|
|
|
192
192
|
this.textHighlighter = init.textHighlighter;
|
|
193
193
|
this.isCommentsOnMediaMediaInlineBugFixEnabled = init.isCommentsOnMediaMediaInlineBugFixEnabled;
|
|
194
194
|
this.allowTableAlignment = init.allowTableAlignment;
|
|
195
|
+
this.allowTableResizing = init.allowTableResizing;
|
|
195
196
|
}
|
|
196
197
|
(0, _createClass2.default)(ReactSerializer, [{
|
|
197
198
|
key: "resetState",
|
|
@@ -365,7 +366,8 @@ var ReactSerializer = exports.default = /*#__PURE__*/function () {
|
|
|
365
366
|
stickyHeaders: stickyHeaders,
|
|
366
367
|
isInsideOfBlockNode: isInsideOfBlockNode,
|
|
367
368
|
isInsideMultiBodiedExtension: isInsideMultiBodiedExtension,
|
|
368
|
-
allowTableAlignment: this.allowTableAlignment
|
|
369
|
+
allowTableAlignment: this.allowTableAlignment,
|
|
370
|
+
allowTableResizing: this.allowTableResizing
|
|
369
371
|
});
|
|
370
372
|
}
|
|
371
373
|
}, {
|
|
@@ -10,7 +10,6 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
10
10
|
var _styles = require("@atlaskit/editor-common/styles");
|
|
11
11
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
12
12
|
var _nodeWidth = require("@atlaskit/editor-common/node-width");
|
|
13
|
-
var _table = require("../table");
|
|
14
13
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
15
14
|
var _useFeatureFlags = require("../../../use-feature-flags");
|
|
16
15
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -63,7 +62,8 @@ var renderScaleDownColgroup = function renderScaleDownColgroup(props) {
|
|
|
63
62
|
isInsideOfBlockNode = props.isInsideOfBlockNode,
|
|
64
63
|
isinsideMultiBodiedExtension = props.isinsideMultiBodiedExtension,
|
|
65
64
|
isTableScalingEnabled = props.isTableScalingEnabled,
|
|
66
|
-
isTableFixedColumnWidthsOptionEnabled = props.isTableFixedColumnWidthsOptionEnabled
|
|
65
|
+
isTableFixedColumnWidthsOptionEnabled = props.isTableFixedColumnWidthsOptionEnabled,
|
|
66
|
+
allowTableResizing = props.allowTableResizing;
|
|
67
67
|
if (!columnWidths) {
|
|
68
68
|
return [];
|
|
69
69
|
}
|
|
@@ -72,8 +72,12 @@ var renderScaleDownColgroup = function renderScaleDownColgroup(props) {
|
|
|
72
72
|
var tableResized = isTableResized(columnWidths);
|
|
73
73
|
var noOfColumns = columnWidths.length;
|
|
74
74
|
var targetWidths;
|
|
75
|
-
|
|
76
|
-
|
|
75
|
+
|
|
76
|
+
// appearance == comment && allowTableResizing && !tableNode?.attrs.width, means it is a comment
|
|
77
|
+
// appearance == comment && !allowTableResizing && !tableNode?.attrs.width, means it is a inline comment
|
|
78
|
+
// When comment and inline comment table width inherits from the parent container, we want tableContainerWidth === renderWidth
|
|
79
|
+
var tableContainerWidth = rendererAppearance === 'comment' && !(tableNode !== null && tableNode !== void 0 && tableNode.attrs.width) ? renderWidth : (0, _nodeWidth.getTableContainerWidth)(tableNode);
|
|
80
|
+
if (allowTableResizing && !isInsideOfBlockNode && !isinsideMultiBodiedExtension && !tableResized) {
|
|
77
81
|
// for tables with no column widths defined, assume that the real table width
|
|
78
82
|
// is defined by node.attrs.width
|
|
79
83
|
var _tableWidth2 = (isNumberColumnEnabled ? tableContainerWidth - _editorSharedStyles.akEditorTableNumberColumnWidth : tableContainerWidth) - 1;
|
|
@@ -16,7 +16,6 @@ var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
|
16
16
|
var _colors = require("@atlaskit/theme/colors");
|
|
17
17
|
var _table = require("./table");
|
|
18
18
|
var _injectProps = require("../../utils/inject-props");
|
|
19
|
-
var _table2 = require("../table");
|
|
20
19
|
/**
|
|
21
20
|
* @jsxRuntime classic
|
|
22
21
|
* @jsx jsx
|
|
@@ -40,10 +39,10 @@ var modeSpecficStyles = {
|
|
|
40
39
|
};
|
|
41
40
|
|
|
42
41
|
// TODO: Quality ticket: https://product-fabric.atlassian.net/browse/DSP-4123
|
|
43
|
-
var fixedTableDivStaticStyles = function fixedTableDivStaticStyles(top, width,
|
|
42
|
+
var fixedTableDivStaticStyles = function fixedTableDivStaticStyles(top, width, allowTableResizing) {
|
|
44
43
|
var _css;
|
|
45
44
|
var stickyHeaderZIndex;
|
|
46
|
-
if (
|
|
45
|
+
if (allowTableResizing) {
|
|
47
46
|
stickyHeaderZIndex = 13;
|
|
48
47
|
} else {
|
|
49
48
|
stickyHeaderZIndex = _editorSharedStyles.akEditorStickyHeaderZIndex;
|
|
@@ -76,8 +75,8 @@ var FixedTableDiv = function FixedTableDiv(props) {
|
|
|
76
75
|
var top = props.top,
|
|
77
76
|
wrapperWidth = props.wrapperWidth,
|
|
78
77
|
mode = props.mode,
|
|
79
|
-
|
|
80
|
-
var fixedTableCss = [fixedTableDivStaticStyles(top, wrapperWidth,
|
|
78
|
+
allowTableResizing = props.allowTableResizing;
|
|
79
|
+
var fixedTableCss = [fixedTableDivStaticStyles(top, wrapperWidth, allowTableResizing), modeSpecficStyles === null || modeSpecficStyles === void 0 ? void 0 : modeSpecficStyles[mode]];
|
|
81
80
|
var attrs = {
|
|
82
81
|
mode: mode
|
|
83
82
|
};
|
|
@@ -85,7 +84,7 @@ var FixedTableDiv = function FixedTableDiv(props) {
|
|
|
85
84
|
"data-testid": "sticky-table-fixed"
|
|
86
85
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
87
86
|
,
|
|
88
|
-
className:
|
|
87
|
+
className: allowTableResizing ? 'fixed-table-div-custom-table-resizing' : ''
|
|
89
88
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
90
89
|
,
|
|
91
90
|
css: fixedTableCss
|
|
@@ -106,10 +105,11 @@ var StickyTable = exports.StickyTable = function StickyTable(_ref) {
|
|
|
106
105
|
renderWidth = _ref.renderWidth,
|
|
107
106
|
rowHeight = _ref.rowHeight,
|
|
108
107
|
tableNode = _ref.tableNode,
|
|
109
|
-
rendererAppearance = _ref.rendererAppearance
|
|
108
|
+
rendererAppearance = _ref.rendererAppearance,
|
|
109
|
+
allowTableResizing = _ref.allowTableResizing;
|
|
110
110
|
var styles;
|
|
111
111
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
112
|
-
if (
|
|
112
|
+
if (allowTableResizing) {
|
|
113
113
|
styles = (0, _react2.css)({
|
|
114
114
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
115
115
|
top: mode === 'pin-bottom' ? top : undefined,
|
|
@@ -133,7 +133,7 @@ var StickyTable = exports.StickyTable = function StickyTable(_ref) {
|
|
|
133
133
|
top: mode === 'stick' ? top : undefined,
|
|
134
134
|
mode: rowHeight > 300 ? 'none' : mode,
|
|
135
135
|
wrapperWidth: wrapperWidth,
|
|
136
|
-
|
|
136
|
+
allowTableResizing: allowTableResizing
|
|
137
137
|
}, (0, _react2.jsx)("div", {
|
|
138
138
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
139
139
|
className: "".concat(_styles.TableSharedCssClassName.TABLE_CONTAINER, " is-sticky ").concat(shadowClassNames || ''),
|
|
@@ -9,7 +9,6 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
var _colgroup = require("./colgroup");
|
|
10
10
|
var _nodeWidth = require("@atlaskit/editor-common/node-width");
|
|
11
11
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
12
|
-
var _table = require("../table");
|
|
13
12
|
var Table = exports.Table = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
14
13
|
var _tableNode$attrs;
|
|
15
14
|
var innerRef = _ref.innerRef,
|
|
@@ -21,11 +20,15 @@ var Table = exports.Table = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
|
21
20
|
tableNode = _ref.tableNode,
|
|
22
21
|
rendererAppearance = _ref.rendererAppearance,
|
|
23
22
|
isInsideOfBlockNode = _ref.isInsideOfBlockNode,
|
|
24
|
-
isinsideMultiBodiedExtension = _ref.isinsideMultiBodiedExtension
|
|
23
|
+
isinsideMultiBodiedExtension = _ref.isinsideMultiBodiedExtension,
|
|
24
|
+
allowTableResizing = _ref.allowTableResizing;
|
|
25
25
|
var tableWidth = tableNode ? (0, _nodeWidth.getTableContainerWidth)(tableNode) : _editorSharedStyles.akEditorDefaultLayoutWidth;
|
|
26
|
-
if (rendererAppearance === 'comment' &&
|
|
26
|
+
if (rendererAppearance === 'comment' && allowTableResizing && tableNode && !((_tableNode$attrs = tableNode.attrs) !== null && _tableNode$attrs !== void 0 && _tableNode$attrs.width)) {
|
|
27
27
|
tableWidth = 'inherit';
|
|
28
28
|
}
|
|
29
|
+
if (rendererAppearance === 'comment' && !allowTableResizing) {
|
|
30
|
+
tableWidth = renderWidth;
|
|
31
|
+
}
|
|
29
32
|
var tableLayout = tableNode === null || tableNode === void 0 ? void 0 : tableNode.attrs.layout;
|
|
30
33
|
var tableDisplayMode = tableNode === null || tableNode === void 0 ? void 0 : tableNode.attrs.displayMode;
|
|
31
34
|
return /*#__PURE__*/_react.default.createElement("table", {
|
|
@@ -43,6 +46,7 @@ var Table = exports.Table = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
|
43
46
|
tableNode: tableNode,
|
|
44
47
|
rendererAppearance: rendererAppearance,
|
|
45
48
|
isInsideOfBlockNode: isInsideOfBlockNode,
|
|
46
|
-
isinsideMultiBodiedExtension: isinsideMultiBodiedExtension
|
|
49
|
+
isinsideMultiBodiedExtension: isinsideMultiBodiedExtension,
|
|
50
|
+
allowTableResizing: allowTableResizing
|
|
47
51
|
}), /*#__PURE__*/_react.default.createElement("tbody", null, children));
|
|
48
52
|
});
|
|
@@ -33,9 +33,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
33
33
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
34
34
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
35
35
|
var isTableResizingEnabled = exports.isTableResizingEnabled = function isTableResizingEnabled(appearance) {
|
|
36
|
-
return (0, _appearance.isFullWidthOrFullPageAppearance)(appearance) ||
|
|
37
|
-
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
38
|
-
(0, _appearance.isCommentAppearance)(appearance) && (0, _platformFeatureFlags.fg)('platform_editor_table_support_in_comment');
|
|
36
|
+
return (0, _appearance.isFullWidthOrFullPageAppearance)(appearance) || (0, _appearance.isCommentAppearance)(appearance) && (0, _platformFeatureFlags.fg)('platform_editor_table_support_in_comment');
|
|
39
37
|
};
|
|
40
38
|
var orderChildren = function orderChildren(children, tableNode, smartCardStorage, tableOrderStatus) {
|
|
41
39
|
if (!tableOrderStatus || tableOrderStatus.order === _types.SortOrder.NO_ORDER) {
|
|
@@ -299,7 +297,8 @@ var TableContainer = exports.TableContainer = /*#__PURE__*/function (_React$Comp
|
|
|
299
297
|
rendererAppearance = _this$props.rendererAppearance,
|
|
300
298
|
isInsideOfBlockNode = _this$props.isInsideOfBlockNode,
|
|
301
299
|
isinsideMultiBodiedExtension = _this$props.isinsideMultiBodiedExtension,
|
|
302
|
-
allowTableAlignment = _this$props.allowTableAlignment
|
|
300
|
+
allowTableAlignment = _this$props.allowTableAlignment,
|
|
301
|
+
allowTableResizing = _this$props.allowTableResizing;
|
|
303
302
|
var stickyMode = this.state.stickyMode;
|
|
304
303
|
var lineLengthFixedWidth = _editorSharedStyles.akEditorDefaultLayoutWidth;
|
|
305
304
|
var left;
|
|
@@ -312,7 +311,7 @@ var TableContainer = exports.TableContainer = /*#__PURE__*/function (_React$Comp
|
|
|
312
311
|
var calcDefaultLayoutWidthByAppearance = function calcDefaultLayoutWidthByAppearance(rendererAppearance, tableNode) {
|
|
313
312
|
if (rendererAppearance === 'full-width' && !(tableNode !== null && tableNode !== void 0 && tableNode.attrs.width)) {
|
|
314
313
|
return isRenderWidthValid ? Math.min(_editorSharedStyles.akEditorFullWidthLayoutWidth, renderWidth) : _editorSharedStyles.akEditorFullWidthLayoutWidth;
|
|
315
|
-
} else if (rendererAppearance === 'comment' &&
|
|
314
|
+
} else if (rendererAppearance === 'comment' && allowTableResizing && !(tableNode !== null && tableNode !== void 0 && tableNode.attrs.width)) {
|
|
316
315
|
var tableContainerWidth = (0, _nodeWidth.getTableContainerWidth)(tableNode);
|
|
317
316
|
return isRenderWidthValid ? renderWidth : tableContainerWidth;
|
|
318
317
|
} else {
|
|
@@ -322,9 +321,7 @@ var TableContainer = exports.TableContainer = /*#__PURE__*/function (_React$Comp
|
|
|
322
321
|
}
|
|
323
322
|
};
|
|
324
323
|
var tableWidth = calcDefaultLayoutWidthByAppearance(rendererAppearance, tableNode);
|
|
325
|
-
var isCommentAppearanceAndTableAlignmentEnabled =
|
|
326
|
-
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
327
|
-
allowTableAlignment && (0, _platformFeatureFlags.fg)('platform_editor_table_support_in_comment');
|
|
324
|
+
var isCommentAppearanceAndTableAlignmentEnabled = allowTableAlignment && (0, _platformFeatureFlags.fg)('platform_editor_table_support_in_comment');
|
|
328
325
|
|
|
329
326
|
// Logic for table alignment in renderer
|
|
330
327
|
var isTableAlignStart = ((0, _appearance.isFullWidthOrFullPageAppearance)(rendererAppearance) || isCommentAppearanceAndTableAlignmentEnabled) && tableNode && tableNode.attrs && tableNode.attrs.layout === 'align-start' && allowTableAlignment && (0, _platformFeatureFlags.fg)('platform.editor.table.allow-table-alignment'); // allowTableAlignment should be used instead of fg('platform.editor.table.allow-table-alignment') after this fg cleanup
|
|
@@ -352,8 +349,8 @@ var TableContainer = exports.TableContainer = /*#__PURE__*/function (_React$Comp
|
|
|
352
349
|
} else {
|
|
353
350
|
updatedLayout = layout;
|
|
354
351
|
}
|
|
355
|
-
var finalTableContainerWidth =
|
|
356
|
-
if (rendererAppearance === 'comment' &&
|
|
352
|
+
var finalTableContainerWidth = allowTableResizing ? tableWidth : 'inherit';
|
|
353
|
+
if (rendererAppearance === 'comment' && allowTableResizing) {
|
|
357
354
|
finalTableContainerWidth = tableNode !== null && tableNode !== void 0 && tableNode.attrs.width ? tableWidth : 'inherit';
|
|
358
355
|
}
|
|
359
356
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -380,7 +377,8 @@ var TableContainer = exports.TableContainer = /*#__PURE__*/function (_React$Comp
|
|
|
380
377
|
columnWidths: columnWidths,
|
|
381
378
|
rowHeight: this.state.headerRowHeight,
|
|
382
379
|
tableNode: tableNode,
|
|
383
|
-
rendererAppearance: rendererAppearance
|
|
380
|
+
rendererAppearance: rendererAppearance,
|
|
381
|
+
allowTableResizing: allowTableResizing
|
|
384
382
|
}, [children && children[0]]), /*#__PURE__*/_react.default.createElement("div", {
|
|
385
383
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
386
384
|
className: _styles.TableSharedCssClassName.TABLE_NODE_WRAPPER,
|
|
@@ -395,7 +393,8 @@ var TableContainer = exports.TableContainer = /*#__PURE__*/function (_React$Comp
|
|
|
395
393
|
tableNode: tableNode,
|
|
396
394
|
rendererAppearance: rendererAppearance,
|
|
397
395
|
isInsideOfBlockNode: isInsideOfBlockNode,
|
|
398
|
-
isinsideMultiBodiedExtension: isinsideMultiBodiedExtension
|
|
396
|
+
isinsideMultiBodiedExtension: isinsideMultiBodiedExtension,
|
|
397
|
+
allowTableResizing: allowTableResizing
|
|
399
398
|
}, this.grabFirstRowRef(children)))));
|
|
400
399
|
}
|
|
401
400
|
}]);
|
|
@@ -475,7 +474,7 @@ var TableWithWidth = function TableWithWidth(props) {
|
|
|
475
474
|
var colWidthsSum = ((_props$columnWidths = props.columnWidths) === null || _props$columnWidths === void 0 ? void 0 : _props$columnWidths.reduce(function (total, val) {
|
|
476
475
|
return total + val;
|
|
477
476
|
}, 0)) || 0;
|
|
478
|
-
if (colWidthsSum ||
|
|
477
|
+
if (colWidthsSum || props.allowTableResizing) {
|
|
479
478
|
return /*#__PURE__*/_react.default.createElement(TableWithShadows, (0, _extends2.default)({
|
|
480
479
|
renderWidth: renderWidth
|
|
481
480
|
}, props));
|
|
@@ -14,7 +14,6 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
|
|
|
14
14
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
15
15
|
var _react = _interopRequireDefault(require("react"));
|
|
16
16
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
17
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
18
17
|
var _analyticsListeners = require("@atlaskit/analytics-listeners");
|
|
19
18
|
var _monitoring = require("@atlaskit/editor-common/monitoring");
|
|
20
19
|
var _events = require("../../analytics/events");
|
|
@@ -77,26 +76,24 @@ var ErrorBoundary = exports.ErrorBoundary = /*#__PURE__*/function (_React$Compon
|
|
|
77
76
|
(0, _monitoring.logException)(error, {
|
|
78
77
|
location: 'renderer'
|
|
79
78
|
});
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
});
|
|
99
|
-
}
|
|
79
|
+
var pattern = /Failed to execute.*on 'Node'.*/;
|
|
80
|
+
var matchesPattern = pattern.test(error.message);
|
|
81
|
+
if (matchesPattern) {
|
|
82
|
+
this.fireAnalyticsEvent({
|
|
83
|
+
action: _analytics.ACTION.CAUGHT_DOM_ERROR,
|
|
84
|
+
actionSubject: this.props.component,
|
|
85
|
+
actionSubjectId: this.props.componentId,
|
|
86
|
+
eventType: _analytics.EVENT_TYPE.OPERATIONAL,
|
|
87
|
+
attributes: {
|
|
88
|
+
platform: _events.PLATFORM.WEB,
|
|
89
|
+
errorMessage: "".concat(additionalInfo).concat(error === null || error === void 0 ? void 0 : error.message)
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
this.setState(function () {
|
|
93
|
+
return {
|
|
94
|
+
domError: true
|
|
95
|
+
};
|
|
96
|
+
});
|
|
100
97
|
}
|
|
101
98
|
if (this.hasFallback()) {
|
|
102
99
|
this.setState({
|
|
@@ -111,12 +108,10 @@ var ErrorBoundary = exports.ErrorBoundary = /*#__PURE__*/function (_React$Compon
|
|
|
111
108
|
}, {
|
|
112
109
|
key: "render",
|
|
113
110
|
value: function render() {
|
|
114
|
-
if (
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
}, this.props.children);
|
|
119
|
-
}
|
|
111
|
+
if (this.state.domError) {
|
|
112
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
|
|
113
|
+
key: (0, _uuid.default)()
|
|
114
|
+
}, this.props.children);
|
|
120
115
|
}
|
|
121
116
|
if (this.shouldRecover()) {
|
|
122
117
|
return this.props.fallbackComponent;
|
|
@@ -60,7 +60,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
60
60
|
var NORMAL_SEVERITY_THRESHOLD = exports.NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
61
61
|
var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
62
62
|
var packageName = "@atlaskit/renderer";
|
|
63
|
-
var packageVersion = "109.
|
|
63
|
+
var packageVersion = "109.51.1";
|
|
64
64
|
var defaultNodeComponents = exports.defaultNodeComponents = _nodes.nodeToReact;
|
|
65
65
|
var Renderer = exports.Renderer = /*#__PURE__*/function (_PureComponent) {
|
|
66
66
|
(0, _inherits2.default)(Renderer, _PureComponent);
|
|
@@ -290,7 +290,8 @@ var Renderer = exports.Renderer = /*#__PURE__*/function (_PureComponent) {
|
|
|
290
290
|
isInsideOfInlineExtension: (0, _platformFeatureFlags.fg)('platform.editor.inline_extension.extended_lcqdn') && props.isInsideOfInlineExtension,
|
|
291
291
|
textHighlighter: props.UNSTABLE_textHighlighter,
|
|
292
292
|
isCommentsOnMediaMediaInlineBugFixEnabled: featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.commentsOnMediaMediaInlineBugFix,
|
|
293
|
-
allowTableAlignment: props.UNSTABLE_allowTableAlignment
|
|
293
|
+
allowTableAlignment: props.UNSTABLE_allowTableAlignment,
|
|
294
|
+
allowTableResizing: props.appearance === 'comment' && !(0, _platformFeatureFlags.fg)('platform_editor_table_support_in_comment') ? false : props.UNSTABLE_allowTableResizing
|
|
294
295
|
};
|
|
295
296
|
}
|
|
296
297
|
}, {
|
|
@@ -488,7 +489,8 @@ var RendererWrapper = /*#__PURE__*/_react.default.memo(function (props) {
|
|
|
488
489
|
useBlockRenderForCodeBlock = props.useBlockRenderForCodeBlock,
|
|
489
490
|
addTelepointer = props.addTelepointer,
|
|
490
491
|
ssr = props.ssr,
|
|
491
|
-
isInsideOfInlineExtension = props.isInsideOfInlineExtension
|
|
492
|
+
isInsideOfInlineExtension = props.isInsideOfInlineExtension,
|
|
493
|
+
allowTableResizing = props.allowTableResizing;
|
|
492
494
|
var createTelepointer = function createTelepointer() {
|
|
493
495
|
var telepointer = document.createElement('span');
|
|
494
496
|
telepointer.textContent = "\u200B";
|
|
@@ -561,7 +563,8 @@ var RendererWrapper = /*#__PURE__*/_react.default.memo(function (props) {
|
|
|
561
563
|
allowNestedHeaderLinks: allowNestedHeaderLinks,
|
|
562
564
|
allowColumnSorting: !!allowColumnSorting,
|
|
563
565
|
useBlockRenderForCodeBlock: useBlockRenderForCodeBlock,
|
|
564
|
-
allowAnnotations: props.allowAnnotations
|
|
566
|
+
allowAnnotations: props.allowAnnotations,
|
|
567
|
+
allowTableResizing: allowTableResizing
|
|
565
568
|
})
|
|
566
569
|
}, children))));
|
|
567
570
|
});
|
|
@@ -178,6 +178,7 @@ export default class ReactSerializer {
|
|
|
178
178
|
this.textHighlighter = init.textHighlighter;
|
|
179
179
|
this.isCommentsOnMediaMediaInlineBugFixEnabled = init.isCommentsOnMediaMediaInlineBugFixEnabled;
|
|
180
180
|
this.allowTableAlignment = init.allowTableAlignment;
|
|
181
|
+
this.allowTableResizing = init.allowTableResizing;
|
|
181
182
|
}
|
|
182
183
|
resetState() {
|
|
183
184
|
this.headingIds = [];
|
|
@@ -327,7 +328,8 @@ export default class ReactSerializer {
|
|
|
327
328
|
stickyHeaders,
|
|
328
329
|
isInsideOfBlockNode,
|
|
329
330
|
isInsideMultiBodiedExtension,
|
|
330
|
-
allowTableAlignment: this.allowTableAlignment
|
|
331
|
+
allowTableAlignment: this.allowTableAlignment,
|
|
332
|
+
allowTableResizing: this.allowTableResizing
|
|
331
333
|
};
|
|
332
334
|
}
|
|
333
335
|
getDateProps(node, parentInfo, path = []) {
|
|
@@ -2,7 +2,6 @@ import React from 'react';
|
|
|
2
2
|
import { tableCellBorderWidth, tableCellMinWidth } from '@atlaskit/editor-common/styles';
|
|
3
3
|
import { akEditorTableNumberColumnWidth, akEditorTableLegacyCellMinWidth } from '@atlaskit/editor-shared-styles';
|
|
4
4
|
import { getTableContainerWidth } from '@atlaskit/editor-common/node-width';
|
|
5
|
-
import { isTableResizingEnabled } from '../table';
|
|
6
5
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
6
|
import { useFeatureFlags } from '../../../use-feature-flags';
|
|
8
7
|
// we allow scaling down column widths by no more than 30%
|
|
@@ -49,7 +48,8 @@ const renderScaleDownColgroup = props => {
|
|
|
49
48
|
isInsideOfBlockNode,
|
|
50
49
|
isinsideMultiBodiedExtension,
|
|
51
50
|
isTableScalingEnabled,
|
|
52
|
-
isTableFixedColumnWidthsOptionEnabled
|
|
51
|
+
isTableFixedColumnWidthsOptionEnabled,
|
|
52
|
+
allowTableResizing
|
|
53
53
|
} = props;
|
|
54
54
|
if (!columnWidths) {
|
|
55
55
|
return [];
|
|
@@ -59,8 +59,12 @@ const renderScaleDownColgroup = props => {
|
|
|
59
59
|
const tableResized = isTableResized(columnWidths);
|
|
60
60
|
const noOfColumns = columnWidths.length;
|
|
61
61
|
let targetWidths;
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
|
|
63
|
+
// appearance == comment && allowTableResizing && !tableNode?.attrs.width, means it is a comment
|
|
64
|
+
// appearance == comment && !allowTableResizing && !tableNode?.attrs.width, means it is a inline comment
|
|
65
|
+
// When comment and inline comment table width inherits from the parent container, we want tableContainerWidth === renderWidth
|
|
66
|
+
const tableContainerWidth = rendererAppearance === 'comment' && !(tableNode !== null && tableNode !== void 0 && tableNode.attrs.width) ? renderWidth : getTableContainerWidth(tableNode);
|
|
67
|
+
if (allowTableResizing && !isInsideOfBlockNode && !isinsideMultiBodiedExtension && !tableResized) {
|
|
64
68
|
// for tables with no column widths defined, assume that the real table width
|
|
65
69
|
// is defined by node.attrs.width
|
|
66
70
|
const tableWidth = (isNumberColumnEnabled ? tableContainerWidth - akEditorTableNumberColumnWidth : tableContainerWidth) - 1;
|
|
@@ -13,7 +13,6 @@ import { akEditorStickyHeaderZIndex } from '@atlaskit/editor-shared-styles';
|
|
|
13
13
|
import { N40A } from '@atlaskit/theme/colors';
|
|
14
14
|
import { Table } from './table';
|
|
15
15
|
import { recursivelyInjectProps } from '../../utils/inject-props';
|
|
16
|
-
import { isTableResizingEnabled } from '../table';
|
|
17
16
|
export const tableStickyPadding = 8;
|
|
18
17
|
const modeSpecficStyles = {
|
|
19
18
|
none: css({
|
|
@@ -28,9 +27,9 @@ const modeSpecficStyles = {
|
|
|
28
27
|
};
|
|
29
28
|
|
|
30
29
|
// TODO: Quality ticket: https://product-fabric.atlassian.net/browse/DSP-4123
|
|
31
|
-
const fixedTableDivStaticStyles = (top, width,
|
|
30
|
+
const fixedTableDivStaticStyles = (top, width, allowTableResizing) => {
|
|
32
31
|
let stickyHeaderZIndex;
|
|
33
|
-
if (
|
|
32
|
+
if (allowTableResizing) {
|
|
34
33
|
stickyHeaderZIndex = 13;
|
|
35
34
|
} else {
|
|
36
35
|
stickyHeaderZIndex = akEditorStickyHeaderZIndex;
|
|
@@ -75,9 +74,9 @@ const FixedTableDiv = props => {
|
|
|
75
74
|
top,
|
|
76
75
|
wrapperWidth,
|
|
77
76
|
mode,
|
|
78
|
-
|
|
77
|
+
allowTableResizing
|
|
79
78
|
} = props;
|
|
80
|
-
const fixedTableCss = [fixedTableDivStaticStyles(top, wrapperWidth,
|
|
79
|
+
const fixedTableCss = [fixedTableDivStaticStyles(top, wrapperWidth, allowTableResizing), modeSpecficStyles === null || modeSpecficStyles === void 0 ? void 0 : modeSpecficStyles[mode]];
|
|
81
80
|
const attrs = {
|
|
82
81
|
mode
|
|
83
82
|
};
|
|
@@ -85,7 +84,7 @@ const FixedTableDiv = props => {
|
|
|
85
84
|
"data-testid": "sticky-table-fixed"
|
|
86
85
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
87
86
|
,
|
|
88
|
-
className:
|
|
87
|
+
className: allowTableResizing ? 'fixed-table-div-custom-table-resizing' : ''
|
|
89
88
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
90
89
|
,
|
|
91
90
|
css: fixedTableCss
|
|
@@ -106,11 +105,12 @@ export const StickyTable = ({
|
|
|
106
105
|
renderWidth,
|
|
107
106
|
rowHeight,
|
|
108
107
|
tableNode,
|
|
109
|
-
rendererAppearance
|
|
108
|
+
rendererAppearance,
|
|
109
|
+
allowTableResizing
|
|
110
110
|
}) => {
|
|
111
111
|
let styles;
|
|
112
112
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
113
|
-
if (
|
|
113
|
+
if (allowTableResizing) {
|
|
114
114
|
styles = css({
|
|
115
115
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
116
116
|
top: mode === 'pin-bottom' ? top : undefined,
|
|
@@ -134,7 +134,7 @@ export const StickyTable = ({
|
|
|
134
134
|
top: mode === 'stick' ? top : undefined,
|
|
135
135
|
mode: rowHeight > 300 ? 'none' : mode,
|
|
136
136
|
wrapperWidth: wrapperWidth,
|
|
137
|
-
|
|
137
|
+
allowTableResizing: allowTableResizing
|
|
138
138
|
}, jsx("div", {
|
|
139
139
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
140
140
|
className: `${TableSharedCssClassName.TABLE_CONTAINER} is-sticky ${shadowClassNames || ''}`,
|
|
@@ -2,7 +2,6 @@ import React from 'react';
|
|
|
2
2
|
import { Colgroup } from './colgroup';
|
|
3
3
|
import { getTableContainerWidth } from '@atlaskit/editor-common/node-width';
|
|
4
4
|
import { akEditorDefaultLayoutWidth } from '@atlaskit/editor-shared-styles';
|
|
5
|
-
import { isTableResizingEnabled } from '../table';
|
|
6
5
|
export const Table = /*#__PURE__*/React.memo(({
|
|
7
6
|
innerRef,
|
|
8
7
|
isNumberColumnEnabled,
|
|
@@ -13,13 +12,17 @@ export const Table = /*#__PURE__*/React.memo(({
|
|
|
13
12
|
tableNode,
|
|
14
13
|
rendererAppearance,
|
|
15
14
|
isInsideOfBlockNode,
|
|
16
|
-
isinsideMultiBodiedExtension
|
|
15
|
+
isinsideMultiBodiedExtension,
|
|
16
|
+
allowTableResizing
|
|
17
17
|
}) => {
|
|
18
18
|
var _tableNode$attrs;
|
|
19
19
|
let tableWidth = tableNode ? getTableContainerWidth(tableNode) : akEditorDefaultLayoutWidth;
|
|
20
|
-
if (rendererAppearance === 'comment' &&
|
|
20
|
+
if (rendererAppearance === 'comment' && allowTableResizing && tableNode && !((_tableNode$attrs = tableNode.attrs) !== null && _tableNode$attrs !== void 0 && _tableNode$attrs.width)) {
|
|
21
21
|
tableWidth = 'inherit';
|
|
22
22
|
}
|
|
23
|
+
if (rendererAppearance === 'comment' && !allowTableResizing) {
|
|
24
|
+
tableWidth = renderWidth;
|
|
25
|
+
}
|
|
23
26
|
const tableLayout = tableNode === null || tableNode === void 0 ? void 0 : tableNode.attrs.layout;
|
|
24
27
|
const tableDisplayMode = tableNode === null || tableNode === void 0 ? void 0 : tableNode.attrs.displayMode;
|
|
25
28
|
return /*#__PURE__*/React.createElement("table", {
|
|
@@ -37,6 +40,7 @@ export const Table = /*#__PURE__*/React.memo(({
|
|
|
37
40
|
tableNode: tableNode,
|
|
38
41
|
rendererAppearance: rendererAppearance,
|
|
39
42
|
isInsideOfBlockNode: isInsideOfBlockNode,
|
|
40
|
-
isinsideMultiBodiedExtension: isinsideMultiBodiedExtension
|
|
43
|
+
isinsideMultiBodiedExtension: isinsideMultiBodiedExtension,
|
|
44
|
+
allowTableResizing: allowTableResizing
|
|
41
45
|
}), /*#__PURE__*/React.createElement("tbody", null, children));
|
|
42
46
|
});
|
|
@@ -14,9 +14,7 @@ import { withSmartCardStorage } from '../../ui/SmartCardStorage';
|
|
|
14
14
|
import { StickyTable, tableStickyPadding, OverflowParent } from './table/sticky';
|
|
15
15
|
import { Table } from './table/table';
|
|
16
16
|
import { isCommentAppearance, isFullPageAppearance, isFullWidthAppearance, isFullWidthOrFullPageAppearance } from '../utils/appearance';
|
|
17
|
-
export const isTableResizingEnabled = appearance => isFullWidthOrFullPageAppearance(appearance) ||
|
|
18
|
-
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
19
|
-
isCommentAppearance(appearance) && fg('platform_editor_table_support_in_comment');
|
|
17
|
+
export const isTableResizingEnabled = appearance => isFullWidthOrFullPageAppearance(appearance) || isCommentAppearance(appearance) && fg('platform_editor_table_support_in_comment');
|
|
20
18
|
const orderChildren = (children, tableNode, smartCardStorage, tableOrderStatus) => {
|
|
21
19
|
if (!tableOrderStatus || tableOrderStatus.order === SortOrder.NO_ORDER) {
|
|
22
20
|
return children;
|
|
@@ -243,7 +241,8 @@ export class TableContainer extends React.Component {
|
|
|
243
241
|
rendererAppearance,
|
|
244
242
|
isInsideOfBlockNode,
|
|
245
243
|
isinsideMultiBodiedExtension,
|
|
246
|
-
allowTableAlignment
|
|
244
|
+
allowTableAlignment,
|
|
245
|
+
allowTableResizing
|
|
247
246
|
} = this.props;
|
|
248
247
|
const {
|
|
249
248
|
stickyMode
|
|
@@ -259,7 +258,7 @@ export class TableContainer extends React.Component {
|
|
|
259
258
|
const calcDefaultLayoutWidthByAppearance = (rendererAppearance, tableNode) => {
|
|
260
259
|
if (rendererAppearance === 'full-width' && !(tableNode !== null && tableNode !== void 0 && tableNode.attrs.width)) {
|
|
261
260
|
return isRenderWidthValid ? Math.min(akEditorFullWidthLayoutWidth, renderWidth) : akEditorFullWidthLayoutWidth;
|
|
262
|
-
} else if (rendererAppearance === 'comment' &&
|
|
261
|
+
} else if (rendererAppearance === 'comment' && allowTableResizing && !(tableNode !== null && tableNode !== void 0 && tableNode.attrs.width)) {
|
|
263
262
|
const tableContainerWidth = getTableContainerWidth(tableNode);
|
|
264
263
|
return isRenderWidthValid ? renderWidth : tableContainerWidth;
|
|
265
264
|
} else {
|
|
@@ -269,9 +268,7 @@ export class TableContainer extends React.Component {
|
|
|
269
268
|
}
|
|
270
269
|
};
|
|
271
270
|
const tableWidth = calcDefaultLayoutWidthByAppearance(rendererAppearance, tableNode);
|
|
272
|
-
const isCommentAppearanceAndTableAlignmentEnabled =
|
|
273
|
-
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
274
|
-
allowTableAlignment && fg('platform_editor_table_support_in_comment');
|
|
271
|
+
const isCommentAppearanceAndTableAlignmentEnabled = allowTableAlignment && fg('platform_editor_table_support_in_comment');
|
|
275
272
|
|
|
276
273
|
// Logic for table alignment in renderer
|
|
277
274
|
const isTableAlignStart = (isFullWidthOrFullPageAppearance(rendererAppearance) || isCommentAppearanceAndTableAlignmentEnabled) && tableNode && tableNode.attrs && tableNode.attrs.layout === 'align-start' && allowTableAlignment && fg('platform.editor.table.allow-table-alignment'); // allowTableAlignment should be used instead of fg('platform.editor.table.allow-table-alignment') after this fg cleanup
|
|
@@ -299,8 +296,8 @@ export class TableContainer extends React.Component {
|
|
|
299
296
|
} else {
|
|
300
297
|
updatedLayout = layout;
|
|
301
298
|
}
|
|
302
|
-
let finalTableContainerWidth =
|
|
303
|
-
if (rendererAppearance === 'comment' &&
|
|
299
|
+
let finalTableContainerWidth = allowTableResizing ? tableWidth : 'inherit';
|
|
300
|
+
if (rendererAppearance === 'comment' && allowTableResizing) {
|
|
304
301
|
finalTableContainerWidth = tableNode !== null && tableNode !== void 0 && tableNode.attrs.width ? tableWidth : 'inherit';
|
|
305
302
|
}
|
|
306
303
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
@@ -327,7 +324,8 @@ export class TableContainer extends React.Component {
|
|
|
327
324
|
columnWidths: columnWidths,
|
|
328
325
|
rowHeight: this.state.headerRowHeight,
|
|
329
326
|
tableNode: tableNode,
|
|
330
|
-
rendererAppearance: rendererAppearance
|
|
327
|
+
rendererAppearance: rendererAppearance,
|
|
328
|
+
allowTableResizing: allowTableResizing
|
|
331
329
|
}, [children && children[0]]), /*#__PURE__*/React.createElement("div", {
|
|
332
330
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
333
331
|
className: TableSharedCssClassName.TABLE_NODE_WRAPPER,
|
|
@@ -342,7 +340,8 @@ export class TableContainer extends React.Component {
|
|
|
342
340
|
tableNode: tableNode,
|
|
343
341
|
rendererAppearance: rendererAppearance,
|
|
344
342
|
isInsideOfBlockNode: isInsideOfBlockNode,
|
|
345
|
-
isinsideMultiBodiedExtension: isinsideMultiBodiedExtension
|
|
343
|
+
isinsideMultiBodiedExtension: isinsideMultiBodiedExtension,
|
|
344
|
+
allowTableResizing: allowTableResizing
|
|
346
345
|
}, this.grabFirstRowRef(children)))));
|
|
347
346
|
}
|
|
348
347
|
}
|
|
@@ -414,7 +413,7 @@ const TableWithWidth = props => {
|
|
|
414
413
|
var _props$columnWidths;
|
|
415
414
|
const renderWidth = props.rendererAppearance === 'full-page' ? width - FullPagePadding * 2 : width;
|
|
416
415
|
const colWidthsSum = ((_props$columnWidths = props.columnWidths) === null || _props$columnWidths === void 0 ? void 0 : _props$columnWidths.reduce((total, val) => total + val, 0)) || 0;
|
|
417
|
-
if (colWidthsSum ||
|
|
416
|
+
if (colWidthsSum || props.allowTableResizing) {
|
|
418
417
|
return /*#__PURE__*/React.createElement(TableWithShadows, _extends({
|
|
419
418
|
renderWidth: renderWidth
|
|
420
419
|
}, props));
|