@atlaskit/renderer 109.51.0 → 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 +8 -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 +10 -7
- 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 +10 -7
- 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 +10 -7
- 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 +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
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
|
+
|
|
3
11
|
## 109.51.0
|
|
4
12
|
|
|
5
13
|
### Minor 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
|
});
|
|
@@ -297,7 +297,8 @@ var TableContainer = exports.TableContainer = /*#__PURE__*/function (_React$Comp
|
|
|
297
297
|
rendererAppearance = _this$props.rendererAppearance,
|
|
298
298
|
isInsideOfBlockNode = _this$props.isInsideOfBlockNode,
|
|
299
299
|
isinsideMultiBodiedExtension = _this$props.isinsideMultiBodiedExtension,
|
|
300
|
-
allowTableAlignment = _this$props.allowTableAlignment
|
|
300
|
+
allowTableAlignment = _this$props.allowTableAlignment,
|
|
301
|
+
allowTableResizing = _this$props.allowTableResizing;
|
|
301
302
|
var stickyMode = this.state.stickyMode;
|
|
302
303
|
var lineLengthFixedWidth = _editorSharedStyles.akEditorDefaultLayoutWidth;
|
|
303
304
|
var left;
|
|
@@ -310,7 +311,7 @@ var TableContainer = exports.TableContainer = /*#__PURE__*/function (_React$Comp
|
|
|
310
311
|
var calcDefaultLayoutWidthByAppearance = function calcDefaultLayoutWidthByAppearance(rendererAppearance, tableNode) {
|
|
311
312
|
if (rendererAppearance === 'full-width' && !(tableNode !== null && tableNode !== void 0 && tableNode.attrs.width)) {
|
|
312
313
|
return isRenderWidthValid ? Math.min(_editorSharedStyles.akEditorFullWidthLayoutWidth, renderWidth) : _editorSharedStyles.akEditorFullWidthLayoutWidth;
|
|
313
|
-
} else if (rendererAppearance === 'comment' &&
|
|
314
|
+
} else if (rendererAppearance === 'comment' && allowTableResizing && !(tableNode !== null && tableNode !== void 0 && tableNode.attrs.width)) {
|
|
314
315
|
var tableContainerWidth = (0, _nodeWidth.getTableContainerWidth)(tableNode);
|
|
315
316
|
return isRenderWidthValid ? renderWidth : tableContainerWidth;
|
|
316
317
|
} else {
|
|
@@ -348,8 +349,8 @@ var TableContainer = exports.TableContainer = /*#__PURE__*/function (_React$Comp
|
|
|
348
349
|
} else {
|
|
349
350
|
updatedLayout = layout;
|
|
350
351
|
}
|
|
351
|
-
var finalTableContainerWidth =
|
|
352
|
-
if (rendererAppearance === 'comment' &&
|
|
352
|
+
var finalTableContainerWidth = allowTableResizing ? tableWidth : 'inherit';
|
|
353
|
+
if (rendererAppearance === 'comment' && allowTableResizing) {
|
|
353
354
|
finalTableContainerWidth = tableNode !== null && tableNode !== void 0 && tableNode.attrs.width ? tableWidth : 'inherit';
|
|
354
355
|
}
|
|
355
356
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -376,7 +377,8 @@ var TableContainer = exports.TableContainer = /*#__PURE__*/function (_React$Comp
|
|
|
376
377
|
columnWidths: columnWidths,
|
|
377
378
|
rowHeight: this.state.headerRowHeight,
|
|
378
379
|
tableNode: tableNode,
|
|
379
|
-
rendererAppearance: rendererAppearance
|
|
380
|
+
rendererAppearance: rendererAppearance,
|
|
381
|
+
allowTableResizing: allowTableResizing
|
|
380
382
|
}, [children && children[0]]), /*#__PURE__*/_react.default.createElement("div", {
|
|
381
383
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
382
384
|
className: _styles.TableSharedCssClassName.TABLE_NODE_WRAPPER,
|
|
@@ -391,7 +393,8 @@ var TableContainer = exports.TableContainer = /*#__PURE__*/function (_React$Comp
|
|
|
391
393
|
tableNode: tableNode,
|
|
392
394
|
rendererAppearance: rendererAppearance,
|
|
393
395
|
isInsideOfBlockNode: isInsideOfBlockNode,
|
|
394
|
-
isinsideMultiBodiedExtension: isinsideMultiBodiedExtension
|
|
396
|
+
isinsideMultiBodiedExtension: isinsideMultiBodiedExtension,
|
|
397
|
+
allowTableResizing: allowTableResizing
|
|
395
398
|
}, this.grabFirstRowRef(children)))));
|
|
396
399
|
}
|
|
397
400
|
}]);
|
|
@@ -471,7 +474,7 @@ var TableWithWidth = function TableWithWidth(props) {
|
|
|
471
474
|
var colWidthsSum = ((_props$columnWidths = props.columnWidths) === null || _props$columnWidths === void 0 ? void 0 : _props$columnWidths.reduce(function (total, val) {
|
|
472
475
|
return total + val;
|
|
473
476
|
}, 0)) || 0;
|
|
474
|
-
if (colWidthsSum ||
|
|
477
|
+
if (colWidthsSum || props.allowTableResizing) {
|
|
475
478
|
return /*#__PURE__*/_react.default.createElement(TableWithShadows, (0, _extends2.default)({
|
|
476
479
|
renderWidth: renderWidth
|
|
477
480
|
}, props));
|
|
@@ -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.51.
|
|
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
|
});
|
|
@@ -241,7 +241,8 @@ export class TableContainer extends React.Component {
|
|
|
241
241
|
rendererAppearance,
|
|
242
242
|
isInsideOfBlockNode,
|
|
243
243
|
isinsideMultiBodiedExtension,
|
|
244
|
-
allowTableAlignment
|
|
244
|
+
allowTableAlignment,
|
|
245
|
+
allowTableResizing
|
|
245
246
|
} = this.props;
|
|
246
247
|
const {
|
|
247
248
|
stickyMode
|
|
@@ -257,7 +258,7 @@ export class TableContainer extends React.Component {
|
|
|
257
258
|
const calcDefaultLayoutWidthByAppearance = (rendererAppearance, tableNode) => {
|
|
258
259
|
if (rendererAppearance === 'full-width' && !(tableNode !== null && tableNode !== void 0 && tableNode.attrs.width)) {
|
|
259
260
|
return isRenderWidthValid ? Math.min(akEditorFullWidthLayoutWidth, renderWidth) : akEditorFullWidthLayoutWidth;
|
|
260
|
-
} else if (rendererAppearance === 'comment' &&
|
|
261
|
+
} else if (rendererAppearance === 'comment' && allowTableResizing && !(tableNode !== null && tableNode !== void 0 && tableNode.attrs.width)) {
|
|
261
262
|
const tableContainerWidth = getTableContainerWidth(tableNode);
|
|
262
263
|
return isRenderWidthValid ? renderWidth : tableContainerWidth;
|
|
263
264
|
} else {
|
|
@@ -295,8 +296,8 @@ export class TableContainer extends React.Component {
|
|
|
295
296
|
} else {
|
|
296
297
|
updatedLayout = layout;
|
|
297
298
|
}
|
|
298
|
-
let finalTableContainerWidth =
|
|
299
|
-
if (rendererAppearance === 'comment' &&
|
|
299
|
+
let finalTableContainerWidth = allowTableResizing ? tableWidth : 'inherit';
|
|
300
|
+
if (rendererAppearance === 'comment' && allowTableResizing) {
|
|
300
301
|
finalTableContainerWidth = tableNode !== null && tableNode !== void 0 && tableNode.attrs.width ? tableWidth : 'inherit';
|
|
301
302
|
}
|
|
302
303
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
@@ -323,7 +324,8 @@ export class TableContainer extends React.Component {
|
|
|
323
324
|
columnWidths: columnWidths,
|
|
324
325
|
rowHeight: this.state.headerRowHeight,
|
|
325
326
|
tableNode: tableNode,
|
|
326
|
-
rendererAppearance: rendererAppearance
|
|
327
|
+
rendererAppearance: rendererAppearance,
|
|
328
|
+
allowTableResizing: allowTableResizing
|
|
327
329
|
}, [children && children[0]]), /*#__PURE__*/React.createElement("div", {
|
|
328
330
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
329
331
|
className: TableSharedCssClassName.TABLE_NODE_WRAPPER,
|
|
@@ -338,7 +340,8 @@ export class TableContainer extends React.Component {
|
|
|
338
340
|
tableNode: tableNode,
|
|
339
341
|
rendererAppearance: rendererAppearance,
|
|
340
342
|
isInsideOfBlockNode: isInsideOfBlockNode,
|
|
341
|
-
isinsideMultiBodiedExtension: isinsideMultiBodiedExtension
|
|
343
|
+
isinsideMultiBodiedExtension: isinsideMultiBodiedExtension,
|
|
344
|
+
allowTableResizing: allowTableResizing
|
|
342
345
|
}, this.grabFirstRowRef(children)))));
|
|
343
346
|
}
|
|
344
347
|
}
|
|
@@ -410,7 +413,7 @@ const TableWithWidth = props => {
|
|
|
410
413
|
var _props$columnWidths;
|
|
411
414
|
const renderWidth = props.rendererAppearance === 'full-page' ? width - FullPagePadding * 2 : width;
|
|
412
415
|
const colWidthsSum = ((_props$columnWidths = props.columnWidths) === null || _props$columnWidths === void 0 ? void 0 : _props$columnWidths.reduce((total, val) => total + val, 0)) || 0;
|
|
413
|
-
if (colWidthsSum ||
|
|
416
|
+
if (colWidthsSum || props.allowTableResizing) {
|
|
414
417
|
return /*#__PURE__*/React.createElement(TableWithShadows, _extends({
|
|
415
418
|
renderWidth: renderWidth
|
|
416
419
|
}, props));
|
|
@@ -42,7 +42,7 @@ import { nodeToReact } from '../../react/nodes';
|
|
|
42
42
|
export const NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
43
43
|
export const DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
44
44
|
const packageName = "@atlaskit/renderer";
|
|
45
|
-
const packageVersion = "109.51.
|
|
45
|
+
const packageVersion = "109.51.1";
|
|
46
46
|
export const defaultNodeComponents = nodeToReact;
|
|
47
47
|
export class Renderer extends PureComponent {
|
|
48
48
|
constructor(props) {
|
|
@@ -270,7 +270,8 @@ export class Renderer extends PureComponent {
|
|
|
270
270
|
isInsideOfInlineExtension: fg('platform.editor.inline_extension.extended_lcqdn') && props.isInsideOfInlineExtension,
|
|
271
271
|
textHighlighter: props.UNSTABLE_textHighlighter,
|
|
272
272
|
isCommentsOnMediaMediaInlineBugFixEnabled: featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.commentsOnMediaMediaInlineBugFix,
|
|
273
|
-
allowTableAlignment: props.UNSTABLE_allowTableAlignment
|
|
273
|
+
allowTableAlignment: props.UNSTABLE_allowTableAlignment,
|
|
274
|
+
allowTableResizing: props.appearance === 'comment' && !fg('platform_editor_table_support_in_comment') ? false : props.UNSTABLE_allowTableResizing
|
|
274
275
|
};
|
|
275
276
|
}
|
|
276
277
|
render() {
|
|
@@ -462,7 +463,8 @@ const RendererWrapper = /*#__PURE__*/React.memo(props => {
|
|
|
462
463
|
useBlockRenderForCodeBlock,
|
|
463
464
|
addTelepointer,
|
|
464
465
|
ssr,
|
|
465
|
-
isInsideOfInlineExtension
|
|
466
|
+
isInsideOfInlineExtension,
|
|
467
|
+
allowTableResizing
|
|
466
468
|
} = props;
|
|
467
469
|
const createTelepointer = () => {
|
|
468
470
|
const telepointer = document.createElement('span');
|
|
@@ -534,7 +536,8 @@ const RendererWrapper = /*#__PURE__*/React.memo(props => {
|
|
|
534
536
|
allowNestedHeaderLinks,
|
|
535
537
|
allowColumnSorting: !!allowColumnSorting,
|
|
536
538
|
useBlockRenderForCodeBlock,
|
|
537
|
-
allowAnnotations: props.allowAnnotations
|
|
539
|
+
allowAnnotations: props.allowAnnotations,
|
|
540
|
+
allowTableResizing: allowTableResizing
|
|
538
541
|
})
|
|
539
542
|
}, children))));
|
|
540
543
|
});
|
package/dist/esm/react/index.js
CHANGED
|
@@ -185,6 +185,7 @@ var ReactSerializer = /*#__PURE__*/function () {
|
|
|
185
185
|
this.textHighlighter = init.textHighlighter;
|
|
186
186
|
this.isCommentsOnMediaMediaInlineBugFixEnabled = init.isCommentsOnMediaMediaInlineBugFixEnabled;
|
|
187
187
|
this.allowTableAlignment = init.allowTableAlignment;
|
|
188
|
+
this.allowTableResizing = init.allowTableResizing;
|
|
188
189
|
}
|
|
189
190
|
_createClass(ReactSerializer, [{
|
|
190
191
|
key: "resetState",
|
|
@@ -358,7 +359,8 @@ var ReactSerializer = /*#__PURE__*/function () {
|
|
|
358
359
|
stickyHeaders: stickyHeaders,
|
|
359
360
|
isInsideOfBlockNode: isInsideOfBlockNode,
|
|
360
361
|
isInsideMultiBodiedExtension: isInsideMultiBodiedExtension,
|
|
361
|
-
allowTableAlignment: this.allowTableAlignment
|
|
362
|
+
allowTableAlignment: this.allowTableAlignment,
|
|
363
|
+
allowTableResizing: this.allowTableResizing
|
|
362
364
|
});
|
|
363
365
|
}
|
|
364
366
|
}, {
|
|
@@ -5,7 +5,6 @@ import React from 'react';
|
|
|
5
5
|
import { tableCellBorderWidth, tableCellMinWidth } from '@atlaskit/editor-common/styles';
|
|
6
6
|
import { akEditorTableNumberColumnWidth, akEditorTableLegacyCellMinWidth } from '@atlaskit/editor-shared-styles';
|
|
7
7
|
import { getTableContainerWidth } from '@atlaskit/editor-common/node-width';
|
|
8
|
-
import { isTableResizingEnabled } from '../table';
|
|
9
8
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
9
|
import { useFeatureFlags } from '../../../use-feature-flags';
|
|
11
10
|
// we allow scaling down column widths by no more than 30%
|
|
@@ -56,7 +55,8 @@ var renderScaleDownColgroup = function renderScaleDownColgroup(props) {
|
|
|
56
55
|
isInsideOfBlockNode = props.isInsideOfBlockNode,
|
|
57
56
|
isinsideMultiBodiedExtension = props.isinsideMultiBodiedExtension,
|
|
58
57
|
isTableScalingEnabled = props.isTableScalingEnabled,
|
|
59
|
-
isTableFixedColumnWidthsOptionEnabled = props.isTableFixedColumnWidthsOptionEnabled
|
|
58
|
+
isTableFixedColumnWidthsOptionEnabled = props.isTableFixedColumnWidthsOptionEnabled,
|
|
59
|
+
allowTableResizing = props.allowTableResizing;
|
|
60
60
|
if (!columnWidths) {
|
|
61
61
|
return [];
|
|
62
62
|
}
|
|
@@ -65,8 +65,12 @@ var renderScaleDownColgroup = function renderScaleDownColgroup(props) {
|
|
|
65
65
|
var tableResized = isTableResized(columnWidths);
|
|
66
66
|
var noOfColumns = columnWidths.length;
|
|
67
67
|
var targetWidths;
|
|
68
|
-
|
|
69
|
-
|
|
68
|
+
|
|
69
|
+
// appearance == comment && allowTableResizing && !tableNode?.attrs.width, means it is a comment
|
|
70
|
+
// appearance == comment && !allowTableResizing && !tableNode?.attrs.width, means it is a inline comment
|
|
71
|
+
// When comment and inline comment table width inherits from the parent container, we want tableContainerWidth === renderWidth
|
|
72
|
+
var tableContainerWidth = rendererAppearance === 'comment' && !(tableNode !== null && tableNode !== void 0 && tableNode.attrs.width) ? renderWidth : getTableContainerWidth(tableNode);
|
|
73
|
+
if (allowTableResizing && !isInsideOfBlockNode && !isinsideMultiBodiedExtension && !tableResized) {
|
|
70
74
|
// for tables with no column widths defined, assume that the real table width
|
|
71
75
|
// is defined by node.attrs.width
|
|
72
76
|
var _tableWidth2 = (isNumberColumnEnabled ? tableContainerWidth - akEditorTableNumberColumnWidth : tableContainerWidth) - 1;
|
|
@@ -16,7 +16,6 @@ import { akEditorStickyHeaderZIndex } from '@atlaskit/editor-shared-styles';
|
|
|
16
16
|
import { N40A } from '@atlaskit/theme/colors';
|
|
17
17
|
import { Table } from './table';
|
|
18
18
|
import { recursivelyInjectProps } from '../../utils/inject-props';
|
|
19
|
-
import { isTableResizingEnabled } from '../table';
|
|
20
19
|
export var tableStickyPadding = 8;
|
|
21
20
|
var modeSpecficStyles = {
|
|
22
21
|
none: css({
|
|
@@ -31,10 +30,10 @@ var modeSpecficStyles = {
|
|
|
31
30
|
};
|
|
32
31
|
|
|
33
32
|
// TODO: Quality ticket: https://product-fabric.atlassian.net/browse/DSP-4123
|
|
34
|
-
var fixedTableDivStaticStyles = function fixedTableDivStaticStyles(top, width,
|
|
33
|
+
var fixedTableDivStaticStyles = function fixedTableDivStaticStyles(top, width, allowTableResizing) {
|
|
35
34
|
var _css;
|
|
36
35
|
var stickyHeaderZIndex;
|
|
37
|
-
if (
|
|
36
|
+
if (allowTableResizing) {
|
|
38
37
|
stickyHeaderZIndex = 13;
|
|
39
38
|
} else {
|
|
40
39
|
stickyHeaderZIndex = akEditorStickyHeaderZIndex;
|
|
@@ -67,8 +66,8 @@ var FixedTableDiv = function FixedTableDiv(props) {
|
|
|
67
66
|
var top = props.top,
|
|
68
67
|
wrapperWidth = props.wrapperWidth,
|
|
69
68
|
mode = props.mode,
|
|
70
|
-
|
|
71
|
-
var fixedTableCss = [fixedTableDivStaticStyles(top, wrapperWidth,
|
|
69
|
+
allowTableResizing = props.allowTableResizing;
|
|
70
|
+
var fixedTableCss = [fixedTableDivStaticStyles(top, wrapperWidth, allowTableResizing), modeSpecficStyles === null || modeSpecficStyles === void 0 ? void 0 : modeSpecficStyles[mode]];
|
|
72
71
|
var attrs = {
|
|
73
72
|
mode: mode
|
|
74
73
|
};
|
|
@@ -76,7 +75,7 @@ var FixedTableDiv = function FixedTableDiv(props) {
|
|
|
76
75
|
"data-testid": "sticky-table-fixed"
|
|
77
76
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
78
77
|
,
|
|
79
|
-
className:
|
|
78
|
+
className: allowTableResizing ? 'fixed-table-div-custom-table-resizing' : ''
|
|
80
79
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
81
80
|
,
|
|
82
81
|
css: fixedTableCss
|
|
@@ -97,10 +96,11 @@ export var StickyTable = function StickyTable(_ref) {
|
|
|
97
96
|
renderWidth = _ref.renderWidth,
|
|
98
97
|
rowHeight = _ref.rowHeight,
|
|
99
98
|
tableNode = _ref.tableNode,
|
|
100
|
-
rendererAppearance = _ref.rendererAppearance
|
|
99
|
+
rendererAppearance = _ref.rendererAppearance,
|
|
100
|
+
allowTableResizing = _ref.allowTableResizing;
|
|
101
101
|
var styles;
|
|
102
102
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
103
|
-
if (
|
|
103
|
+
if (allowTableResizing) {
|
|
104
104
|
styles = css({
|
|
105
105
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
106
106
|
top: mode === 'pin-bottom' ? top : undefined,
|
|
@@ -124,7 +124,7 @@ export var StickyTable = function StickyTable(_ref) {
|
|
|
124
124
|
top: mode === 'stick' ? top : undefined,
|
|
125
125
|
mode: rowHeight > 300 ? 'none' : mode,
|
|
126
126
|
wrapperWidth: wrapperWidth,
|
|
127
|
-
|
|
127
|
+
allowTableResizing: allowTableResizing
|
|
128
128
|
}, jsx("div", {
|
|
129
129
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
130
130
|
className: "".concat(TableSharedCssClassName.TABLE_CONTAINER, " is-sticky ").concat(shadowClassNames || ''),
|