@atlaskit/renderer 112.8.7 → 112.8.8
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 +10 -0
- package/dist/cjs/react/index.js +2 -0
- package/dist/cjs/react/nodes/table/colgroup.js +2 -1
- package/dist/cjs/react/nodes/table/table.js +2 -0
- package/dist/cjs/react/nodes/table.js +3 -1
- package/dist/cjs/react/renderer-node.js +7 -1
- package/dist/cjs/ui/Renderer/index.js +1 -1
- package/dist/es2019/react/index.js +3 -1
- package/dist/es2019/react/nodes/table/colgroup.js +2 -1
- package/dist/es2019/react/nodes/table/table.js +2 -0
- package/dist/es2019/react/nodes/table.js +3 -1
- package/dist/es2019/react/renderer-node.js +8 -0
- package/dist/es2019/ui/Renderer/index.js +1 -1
- package/dist/esm/react/index.js +3 -1
- package/dist/esm/react/nodes/table/colgroup.js +2 -1
- package/dist/esm/react/nodes/table/table.js +2 -0
- package/dist/esm/react/nodes/table.js +3 -1
- package/dist/esm/react/renderer-node.js +6 -0
- package/dist/esm/ui/Renderer/index.js +1 -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/renderer-node.d.ts +1 -0
- 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/renderer-node.d.ts +1 -0
- package/package.json +10 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @atlaskit/renderer
|
|
2
2
|
|
|
3
|
+
## 112.8.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#103047](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/103047)
|
|
8
|
+
[`2e9d79eb2d217`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/2e9d79eb2d217) -
|
|
9
|
+
[ux] ED-26201 Prevent generation of table colgroup in renderer if table is nested in a table and
|
|
10
|
+
columns haven't been resized
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
3
13
|
## 112.8.7
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
package/dist/cjs/react/index.js
CHANGED
|
@@ -407,6 +407,7 @@ var ReactSerializer = exports.default = /*#__PURE__*/function () {
|
|
|
407
407
|
var stickyHeaders = !(0, _rendererNode.insideBreakoutLayout)(path) ? this.stickyHeaders : undefined;
|
|
408
408
|
var isInsideOfBlockNode = (0, _rendererNode.insideBlockNode)(path, node.type.schema);
|
|
409
409
|
var isInsideMultiBodiedExtension = (0, _rendererNode.insideMultiBodiedExtension)(path, node.type.schema);
|
|
410
|
+
var isInsideOfTable = (0, _rendererNode.insideTable)(path, node.type.schema);
|
|
410
411
|
return _objectSpread(_objectSpread({}, this.getProps(node)), {}, {
|
|
411
412
|
allowColumnSorting: this.allowColumnSorting,
|
|
412
413
|
columnWidths:
|
|
@@ -417,6 +418,7 @@ var ReactSerializer = exports.default = /*#__PURE__*/function () {
|
|
|
417
418
|
tableNode: node,
|
|
418
419
|
stickyHeaders: stickyHeaders,
|
|
419
420
|
isInsideOfBlockNode: isInsideOfBlockNode,
|
|
421
|
+
isInsideOfTable: isInsideOfTable,
|
|
420
422
|
isInsideMultiBodiedExtension: isInsideMultiBodiedExtension,
|
|
421
423
|
allowTableAlignment: this.allowTableAlignment,
|
|
422
424
|
allowTableResizing: this.allowTableResizing
|
|
@@ -70,6 +70,7 @@ var renderScaleDownColgroup = function renderScaleDownColgroup(props) {
|
|
|
70
70
|
tableNode = props.tableNode,
|
|
71
71
|
rendererAppearance = props.rendererAppearance,
|
|
72
72
|
isInsideOfBlockNode = props.isInsideOfBlockNode,
|
|
73
|
+
isInsideOfTable = props.isInsideOfTable,
|
|
73
74
|
isinsideMultiBodiedExtension = props.isinsideMultiBodiedExtension,
|
|
74
75
|
isTableScalingEnabled = props.isTableScalingEnabled,
|
|
75
76
|
isTableFixedColumnWidthsOptionEnabled = props.isTableFixedColumnWidthsOptionEnabled,
|
|
@@ -92,7 +93,7 @@ var renderScaleDownColgroup = function renderScaleDownColgroup(props) {
|
|
|
92
93
|
// appearance == comment && !allowTableResizing && !tableNode?.attrs.width, means it is a inline comment
|
|
93
94
|
// When comment and inline comment table width inherits from the parent container, we want tableContainerWidth === renderWidth
|
|
94
95
|
var tableContainerWidth = rendererAppearance === 'comment' && !(tableNode !== null && tableNode !== void 0 && tableNode.attrs.width) || isRendererNested ? renderWidth : (0, _nodeWidth.getTableContainerWidth)(tableNode);
|
|
95
|
-
if (allowTableResizing && !isInsideOfBlockNode && !isinsideMultiBodiedExtension && !tableColumnResized) {
|
|
96
|
+
if (allowTableResizing && !isInsideOfBlockNode && !((0, _platformFeatureFlags.fg)('platform_editor_nested_tables_renderer_colgroup') && isInsideOfTable) && !isinsideMultiBodiedExtension && !tableColumnResized) {
|
|
96
97
|
// when no columns are resized, each column should have equal width, equals to tableWidth / noOfColumns
|
|
97
98
|
var _tableWidth2 = (isNumberColumnEnabled ? tableContainerWidth - _editorSharedStyles.akEditorTableNumberColumnWidth : tableContainerWidth) - 1;
|
|
98
99
|
var defaultColumnWidth = _tableWidth2 / noOfColumns;
|
|
@@ -20,6 +20,7 @@ var Table = exports.Table = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
|
20
20
|
tableNode = _ref.tableNode,
|
|
21
21
|
rendererAppearance = _ref.rendererAppearance,
|
|
22
22
|
isInsideOfBlockNode = _ref.isInsideOfBlockNode,
|
|
23
|
+
isInsideOfTable = _ref.isInsideOfTable,
|
|
23
24
|
isinsideMultiBodiedExtension = _ref.isinsideMultiBodiedExtension,
|
|
24
25
|
allowTableResizing = _ref.allowTableResizing;
|
|
25
26
|
var tableWidth = tableNode ? (0, _nodeWidth.getTableContainerWidth)(tableNode) : _editorSharedStyles.akEditorDefaultLayoutWidth;
|
|
@@ -46,6 +47,7 @@ var Table = exports.Table = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
|
46
47
|
tableNode: tableNode,
|
|
47
48
|
rendererAppearance: rendererAppearance,
|
|
48
49
|
isInsideOfBlockNode: isInsideOfBlockNode,
|
|
50
|
+
isInsideOfTable: isInsideOfTable,
|
|
49
51
|
isinsideMultiBodiedExtension: isinsideMultiBodiedExtension,
|
|
50
52
|
allowTableResizing: allowTableResizing
|
|
51
53
|
}), /*#__PURE__*/_react.default.createElement("tbody", null, children));
|
|
@@ -347,6 +347,7 @@ var TableContainer = exports.TableContainer = /*#__PURE__*/function (_React$Comp
|
|
|
347
347
|
tableNode = _this$props.tableNode,
|
|
348
348
|
rendererAppearance = _this$props.rendererAppearance,
|
|
349
349
|
isInsideOfBlockNode = _this$props.isInsideOfBlockNode,
|
|
350
|
+
isInsideOfTable = _this$props.isInsideOfTable,
|
|
350
351
|
isinsideMultiBodiedExtension = _this$props.isinsideMultiBodiedExtension,
|
|
351
352
|
allowTableAlignment = _this$props.allowTableAlignment,
|
|
352
353
|
allowTableResizing = _this$props.allowTableResizing;
|
|
@@ -387,7 +388,7 @@ var TableContainer = exports.TableContainer = /*#__PURE__*/function (_React$Comp
|
|
|
387
388
|
var lineLengthCSS = (0, _appearance.isFullWidthAppearance)(rendererAppearance) ? fullWidthLineLengthCSS : isCommentAppearanceAndTableAlignmentEnabled ? renderWidthCSS : "".concat(lineLengthFixedWidth, "px");
|
|
388
389
|
var fixTableSSRResizing = (0, _platformFeatureFlags.fg)('platform-fix-table-ssr-resizing');
|
|
389
390
|
var tableWidthNew = fixTableSSRResizing ? (0, _nodeWidth.getTableContainerWidth)(tableNode) : tableWidth;
|
|
390
|
-
var shouldCalculateLeftForAlignment = !isInsideOfBlockNode && isTableAlignStart && ((0, _appearance.isFullPageAppearance)(rendererAppearance) && tableWidthNew <= lineLengthFixedWidth || (0, _appearance.isFullWidthAppearance)(rendererAppearance) || isCommentAppearanceAndTableAlignmentEnabled);
|
|
391
|
+
var shouldCalculateLeftForAlignment = !isInsideOfBlockNode && !isInsideOfTable && isTableAlignStart && ((0, _appearance.isFullPageAppearance)(rendererAppearance) && tableWidthNew <= lineLengthFixedWidth || (0, _appearance.isFullWidthAppearance)(rendererAppearance) || isCommentAppearanceAndTableAlignmentEnabled);
|
|
391
392
|
var leftCSS;
|
|
392
393
|
if (shouldCalculateLeftForAlignment) {
|
|
393
394
|
left = (tableWidth - lineLength) / 2;
|
|
@@ -498,6 +499,7 @@ var TableContainer = exports.TableContainer = /*#__PURE__*/function (_React$Comp
|
|
|
498
499
|
tableNode: tableNode,
|
|
499
500
|
rendererAppearance: rendererAppearance,
|
|
500
501
|
isInsideOfBlockNode: isInsideOfBlockNode,
|
|
502
|
+
isInsideOfTable: isInsideOfTable,
|
|
501
503
|
isinsideMultiBodiedExtension: isinsideMultiBodiedExtension,
|
|
502
504
|
allowTableResizing: allowTableResizing
|
|
503
505
|
}, this.grabFirstRowRef(children))), isStickyScrollbarEnabled(this.props.rendererAppearance) && /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.insideMultiBodiedExtension = exports.insideBreakoutLayout = exports.insideBlockNode = void 0;
|
|
6
|
+
exports.insideTable = exports.insideMultiBodiedExtension = exports.insideBreakoutLayout = exports.insideBlockNode = void 0;
|
|
7
7
|
var isLayoutNode = function isLayoutNode(node) {
|
|
8
8
|
return node.type.name === 'layoutSection';
|
|
9
9
|
};
|
|
@@ -36,4 +36,10 @@ var insideMultiBodiedExtension = exports.insideMultiBodiedExtension = function i
|
|
|
36
36
|
return path.some(function (n) {
|
|
37
37
|
return n.type === multiBodiedExtension;
|
|
38
38
|
});
|
|
39
|
+
};
|
|
40
|
+
var insideTable = exports.insideTable = function insideTable(path, schema) {
|
|
41
|
+
var table = schema.nodes.table;
|
|
42
|
+
return path.some(function (n) {
|
|
43
|
+
return n.type === table;
|
|
44
|
+
});
|
|
39
45
|
};
|
|
@@ -64,7 +64,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
64
64
|
var NORMAL_SEVERITY_THRESHOLD = exports.NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
65
65
|
var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
66
66
|
var packageName = "@atlaskit/renderer";
|
|
67
|
-
var packageVersion = "112.8.
|
|
67
|
+
var packageVersion = "112.8.8";
|
|
68
68
|
var setAsQueryContainerStyles = (0, _react2.css)({
|
|
69
69
|
containerName: 'ak-renderer-wrapper',
|
|
70
70
|
containerType: 'inline-size',
|
|
@@ -12,7 +12,7 @@ import { calcTableColumnWidths, getColumnWidths } from '@atlaskit/editor-common/
|
|
|
12
12
|
import { getText } from '../utils';
|
|
13
13
|
import { findChildrenByType } from '@atlaskit/editor-prosemirror/utils';
|
|
14
14
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
15
|
-
import { insideBlockNode, insideBreakoutLayout, insideMultiBodiedExtension } from './renderer-node';
|
|
15
|
+
import { insideBlockNode, insideBreakoutLayout, insideMultiBodiedExtension, insideTable } from './renderer-node';
|
|
16
16
|
import { isCodeMark } from './marks/code';
|
|
17
17
|
import { segmentText } from './utils/segment-text';
|
|
18
18
|
import { renderTextSegments } from './utils/render-text-segments';
|
|
@@ -374,6 +374,7 @@ export default class ReactSerializer {
|
|
|
374
374
|
const stickyHeaders = !insideBreakoutLayout(path) ? this.stickyHeaders : undefined;
|
|
375
375
|
const isInsideOfBlockNode = insideBlockNode(path, node.type.schema);
|
|
376
376
|
const isInsideMultiBodiedExtension = insideMultiBodiedExtension(path, node.type.schema);
|
|
377
|
+
const isInsideOfTable = insideTable(path, node.type.schema);
|
|
377
378
|
return {
|
|
378
379
|
...this.getProps(node),
|
|
379
380
|
allowColumnSorting: this.allowColumnSorting,
|
|
@@ -385,6 +386,7 @@ export default class ReactSerializer {
|
|
|
385
386
|
tableNode: node,
|
|
386
387
|
stickyHeaders,
|
|
387
388
|
isInsideOfBlockNode,
|
|
389
|
+
isInsideOfTable,
|
|
388
390
|
isInsideMultiBodiedExtension,
|
|
389
391
|
allowTableAlignment: this.allowTableAlignment,
|
|
390
392
|
allowTableResizing: this.allowTableResizing
|
|
@@ -57,6 +57,7 @@ const renderScaleDownColgroup = props => {
|
|
|
57
57
|
tableNode,
|
|
58
58
|
rendererAppearance,
|
|
59
59
|
isInsideOfBlockNode,
|
|
60
|
+
isInsideOfTable,
|
|
60
61
|
isinsideMultiBodiedExtension,
|
|
61
62
|
isTableScalingEnabled,
|
|
62
63
|
isTableFixedColumnWidthsOptionEnabled,
|
|
@@ -80,7 +81,7 @@ const renderScaleDownColgroup = props => {
|
|
|
80
81
|
// appearance == comment && !allowTableResizing && !tableNode?.attrs.width, means it is a inline comment
|
|
81
82
|
// When comment and inline comment table width inherits from the parent container, we want tableContainerWidth === renderWidth
|
|
82
83
|
const tableContainerWidth = rendererAppearance === 'comment' && !(tableNode !== null && tableNode !== void 0 && tableNode.attrs.width) || isRendererNested ? renderWidth : getTableContainerWidth(tableNode);
|
|
83
|
-
if (allowTableResizing && !isInsideOfBlockNode && !isinsideMultiBodiedExtension && !tableColumnResized) {
|
|
84
|
+
if (allowTableResizing && !isInsideOfBlockNode && !(fg('platform_editor_nested_tables_renderer_colgroup') && isInsideOfTable) && !isinsideMultiBodiedExtension && !tableColumnResized) {
|
|
84
85
|
// when no columns are resized, each column should have equal width, equals to tableWidth / noOfColumns
|
|
85
86
|
const tableWidth = (isNumberColumnEnabled ? tableContainerWidth - akEditorTableNumberColumnWidth : tableContainerWidth) - 1;
|
|
86
87
|
const defaultColumnWidth = tableWidth / noOfColumns;
|
|
@@ -12,6 +12,7 @@ export const Table = /*#__PURE__*/React.memo(({
|
|
|
12
12
|
tableNode,
|
|
13
13
|
rendererAppearance,
|
|
14
14
|
isInsideOfBlockNode,
|
|
15
|
+
isInsideOfTable,
|
|
15
16
|
isinsideMultiBodiedExtension,
|
|
16
17
|
allowTableResizing
|
|
17
18
|
}) => {
|
|
@@ -40,6 +41,7 @@ export const Table = /*#__PURE__*/React.memo(({
|
|
|
40
41
|
tableNode: tableNode,
|
|
41
42
|
rendererAppearance: rendererAppearance,
|
|
42
43
|
isInsideOfBlockNode: isInsideOfBlockNode,
|
|
44
|
+
isInsideOfTable: isInsideOfTable,
|
|
43
45
|
isinsideMultiBodiedExtension: isinsideMultiBodiedExtension,
|
|
44
46
|
allowTableResizing: allowTableResizing
|
|
45
47
|
}), /*#__PURE__*/React.createElement("tbody", null, children));
|
|
@@ -290,6 +290,7 @@ export class TableContainer extends React.Component {
|
|
|
290
290
|
tableNode,
|
|
291
291
|
rendererAppearance,
|
|
292
292
|
isInsideOfBlockNode,
|
|
293
|
+
isInsideOfTable,
|
|
293
294
|
isinsideMultiBodiedExtension,
|
|
294
295
|
allowTableAlignment,
|
|
295
296
|
allowTableResizing
|
|
@@ -330,7 +331,7 @@ export class TableContainer extends React.Component {
|
|
|
330
331
|
const lineLengthCSS = isFullWidthAppearance(rendererAppearance) ? fullWidthLineLengthCSS : isCommentAppearanceAndTableAlignmentEnabled ? renderWidthCSS : `${lineLengthFixedWidth}px`;
|
|
331
332
|
const fixTableSSRResizing = fg('platform-fix-table-ssr-resizing');
|
|
332
333
|
const tableWidthNew = fixTableSSRResizing ? getTableContainerWidth(tableNode) : tableWidth;
|
|
333
|
-
const shouldCalculateLeftForAlignment = !isInsideOfBlockNode && isTableAlignStart && (isFullPageAppearance(rendererAppearance) && tableWidthNew <= lineLengthFixedWidth || isFullWidthAppearance(rendererAppearance) || isCommentAppearanceAndTableAlignmentEnabled);
|
|
334
|
+
const shouldCalculateLeftForAlignment = !isInsideOfBlockNode && !isInsideOfTable && isTableAlignStart && (isFullPageAppearance(rendererAppearance) && tableWidthNew <= lineLengthFixedWidth || isFullWidthAppearance(rendererAppearance) || isCommentAppearanceAndTableAlignmentEnabled);
|
|
334
335
|
let leftCSS;
|
|
335
336
|
if (shouldCalculateLeftForAlignment) {
|
|
336
337
|
left = (tableWidth - lineLength) / 2;
|
|
@@ -441,6 +442,7 @@ export class TableContainer extends React.Component {
|
|
|
441
442
|
tableNode: tableNode,
|
|
442
443
|
rendererAppearance: rendererAppearance,
|
|
443
444
|
isInsideOfBlockNode: isInsideOfBlockNode,
|
|
445
|
+
isInsideOfTable: isInsideOfTable,
|
|
444
446
|
isinsideMultiBodiedExtension: isinsideMultiBodiedExtension,
|
|
445
447
|
allowTableResizing: allowTableResizing
|
|
446
448
|
}, this.grabFirstRowRef(children))), isStickyScrollbarEnabled(this.props.rendererAppearance) && /*#__PURE__*/React.createElement("div", {
|
|
@@ -19,4 +19,12 @@ export const insideMultiBodiedExtension = (path, schema) => {
|
|
|
19
19
|
}
|
|
20
20
|
} = schema;
|
|
21
21
|
return path.some(n => n.type === multiBodiedExtension);
|
|
22
|
+
};
|
|
23
|
+
export const insideTable = (path, schema) => {
|
|
24
|
+
const {
|
|
25
|
+
nodes: {
|
|
26
|
+
table
|
|
27
|
+
}
|
|
28
|
+
} = schema;
|
|
29
|
+
return path.some(n => n.type === table);
|
|
22
30
|
};
|
|
@@ -45,7 +45,7 @@ import { TruncatedWrapper } from './truncated-wrapper';
|
|
|
45
45
|
export const NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
46
46
|
export const DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
47
47
|
const packageName = "@atlaskit/renderer";
|
|
48
|
-
const packageVersion = "112.8.
|
|
48
|
+
const packageVersion = "112.8.8";
|
|
49
49
|
const setAsQueryContainerStyles = css({
|
|
50
50
|
containerName: 'ak-renderer-wrapper',
|
|
51
51
|
containerType: 'inline-size',
|
package/dist/esm/react/index.js
CHANGED
|
@@ -19,7 +19,7 @@ import { calcTableColumnWidths, getColumnWidths } from '@atlaskit/editor-common/
|
|
|
19
19
|
import { getText } from '../utils';
|
|
20
20
|
import { findChildrenByType } from '@atlaskit/editor-prosemirror/utils';
|
|
21
21
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
22
|
-
import { insideBlockNode, insideBreakoutLayout, insideMultiBodiedExtension } from './renderer-node';
|
|
22
|
+
import { insideBlockNode, insideBreakoutLayout, insideMultiBodiedExtension, insideTable } from './renderer-node';
|
|
23
23
|
import { isCodeMark } from './marks/code';
|
|
24
24
|
import { segmentText } from './utils/segment-text';
|
|
25
25
|
import { renderTextSegments } from './utils/render-text-segments';
|
|
@@ -400,6 +400,7 @@ var ReactSerializer = /*#__PURE__*/function () {
|
|
|
400
400
|
var stickyHeaders = !insideBreakoutLayout(path) ? this.stickyHeaders : undefined;
|
|
401
401
|
var isInsideOfBlockNode = insideBlockNode(path, node.type.schema);
|
|
402
402
|
var isInsideMultiBodiedExtension = insideMultiBodiedExtension(path, node.type.schema);
|
|
403
|
+
var isInsideOfTable = insideTable(path, node.type.schema);
|
|
403
404
|
return _objectSpread(_objectSpread({}, this.getProps(node)), {}, {
|
|
404
405
|
allowColumnSorting: this.allowColumnSorting,
|
|
405
406
|
columnWidths:
|
|
@@ -410,6 +411,7 @@ var ReactSerializer = /*#__PURE__*/function () {
|
|
|
410
411
|
tableNode: node,
|
|
411
412
|
stickyHeaders: stickyHeaders,
|
|
412
413
|
isInsideOfBlockNode: isInsideOfBlockNode,
|
|
414
|
+
isInsideOfTable: isInsideOfTable,
|
|
413
415
|
isInsideMultiBodiedExtension: isInsideMultiBodiedExtension,
|
|
414
416
|
allowTableAlignment: this.allowTableAlignment,
|
|
415
417
|
allowTableResizing: this.allowTableResizing
|
|
@@ -64,6 +64,7 @@ var renderScaleDownColgroup = function renderScaleDownColgroup(props) {
|
|
|
64
64
|
tableNode = props.tableNode,
|
|
65
65
|
rendererAppearance = props.rendererAppearance,
|
|
66
66
|
isInsideOfBlockNode = props.isInsideOfBlockNode,
|
|
67
|
+
isInsideOfTable = props.isInsideOfTable,
|
|
67
68
|
isinsideMultiBodiedExtension = props.isinsideMultiBodiedExtension,
|
|
68
69
|
isTableScalingEnabled = props.isTableScalingEnabled,
|
|
69
70
|
isTableFixedColumnWidthsOptionEnabled = props.isTableFixedColumnWidthsOptionEnabled,
|
|
@@ -86,7 +87,7 @@ var renderScaleDownColgroup = function renderScaleDownColgroup(props) {
|
|
|
86
87
|
// appearance == comment && !allowTableResizing && !tableNode?.attrs.width, means it is a inline comment
|
|
87
88
|
// When comment and inline comment table width inherits from the parent container, we want tableContainerWidth === renderWidth
|
|
88
89
|
var tableContainerWidth = rendererAppearance === 'comment' && !(tableNode !== null && tableNode !== void 0 && tableNode.attrs.width) || isRendererNested ? renderWidth : getTableContainerWidth(tableNode);
|
|
89
|
-
if (allowTableResizing && !isInsideOfBlockNode && !isinsideMultiBodiedExtension && !tableColumnResized) {
|
|
90
|
+
if (allowTableResizing && !isInsideOfBlockNode && !(fg('platform_editor_nested_tables_renderer_colgroup') && isInsideOfTable) && !isinsideMultiBodiedExtension && !tableColumnResized) {
|
|
90
91
|
// when no columns are resized, each column should have equal width, equals to tableWidth / noOfColumns
|
|
91
92
|
var _tableWidth2 = (isNumberColumnEnabled ? tableContainerWidth - akEditorTableNumberColumnWidth : tableContainerWidth) - 1;
|
|
92
93
|
var defaultColumnWidth = _tableWidth2 / noOfColumns;
|
|
@@ -13,6 +13,7 @@ export var Table = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
13
13
|
tableNode = _ref.tableNode,
|
|
14
14
|
rendererAppearance = _ref.rendererAppearance,
|
|
15
15
|
isInsideOfBlockNode = _ref.isInsideOfBlockNode,
|
|
16
|
+
isInsideOfTable = _ref.isInsideOfTable,
|
|
16
17
|
isinsideMultiBodiedExtension = _ref.isinsideMultiBodiedExtension,
|
|
17
18
|
allowTableResizing = _ref.allowTableResizing;
|
|
18
19
|
var tableWidth = tableNode ? getTableContainerWidth(tableNode) : akEditorDefaultLayoutWidth;
|
|
@@ -39,6 +40,7 @@ export var Table = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
39
40
|
tableNode: tableNode,
|
|
40
41
|
rendererAppearance: rendererAppearance,
|
|
41
42
|
isInsideOfBlockNode: isInsideOfBlockNode,
|
|
43
|
+
isInsideOfTable: isInsideOfTable,
|
|
42
44
|
isinsideMultiBodiedExtension: isinsideMultiBodiedExtension,
|
|
43
45
|
allowTableResizing: allowTableResizing
|
|
44
46
|
}), /*#__PURE__*/React.createElement("tbody", null, children));
|
|
@@ -340,6 +340,7 @@ export var TableContainer = /*#__PURE__*/function (_React$Component) {
|
|
|
340
340
|
tableNode = _this$props.tableNode,
|
|
341
341
|
rendererAppearance = _this$props.rendererAppearance,
|
|
342
342
|
isInsideOfBlockNode = _this$props.isInsideOfBlockNode,
|
|
343
|
+
isInsideOfTable = _this$props.isInsideOfTable,
|
|
343
344
|
isinsideMultiBodiedExtension = _this$props.isinsideMultiBodiedExtension,
|
|
344
345
|
allowTableAlignment = _this$props.allowTableAlignment,
|
|
345
346
|
allowTableResizing = _this$props.allowTableResizing;
|
|
@@ -380,7 +381,7 @@ export var TableContainer = /*#__PURE__*/function (_React$Component) {
|
|
|
380
381
|
var lineLengthCSS = isFullWidthAppearance(rendererAppearance) ? fullWidthLineLengthCSS : isCommentAppearanceAndTableAlignmentEnabled ? renderWidthCSS : "".concat(lineLengthFixedWidth, "px");
|
|
381
382
|
var fixTableSSRResizing = fg('platform-fix-table-ssr-resizing');
|
|
382
383
|
var tableWidthNew = fixTableSSRResizing ? getTableContainerWidth(tableNode) : tableWidth;
|
|
383
|
-
var shouldCalculateLeftForAlignment = !isInsideOfBlockNode && isTableAlignStart && (isFullPageAppearance(rendererAppearance) && tableWidthNew <= lineLengthFixedWidth || isFullWidthAppearance(rendererAppearance) || isCommentAppearanceAndTableAlignmentEnabled);
|
|
384
|
+
var shouldCalculateLeftForAlignment = !isInsideOfBlockNode && !isInsideOfTable && isTableAlignStart && (isFullPageAppearance(rendererAppearance) && tableWidthNew <= lineLengthFixedWidth || isFullWidthAppearance(rendererAppearance) || isCommentAppearanceAndTableAlignmentEnabled);
|
|
384
385
|
var leftCSS;
|
|
385
386
|
if (shouldCalculateLeftForAlignment) {
|
|
386
387
|
left = (tableWidth - lineLength) / 2;
|
|
@@ -491,6 +492,7 @@ export var TableContainer = /*#__PURE__*/function (_React$Component) {
|
|
|
491
492
|
tableNode: tableNode,
|
|
492
493
|
rendererAppearance: rendererAppearance,
|
|
493
494
|
isInsideOfBlockNode: isInsideOfBlockNode,
|
|
495
|
+
isInsideOfTable: isInsideOfTable,
|
|
494
496
|
isinsideMultiBodiedExtension: isinsideMultiBodiedExtension,
|
|
495
497
|
allowTableResizing: allowTableResizing
|
|
496
498
|
}, this.grabFirstRowRef(children))), isStickyScrollbarEnabled(this.props.rendererAppearance) && /*#__PURE__*/React.createElement("div", {
|
|
@@ -30,4 +30,10 @@ export var insideMultiBodiedExtension = function insideMultiBodiedExtension(path
|
|
|
30
30
|
return path.some(function (n) {
|
|
31
31
|
return n.type === multiBodiedExtension;
|
|
32
32
|
});
|
|
33
|
+
};
|
|
34
|
+
export var insideTable = function insideTable(path, schema) {
|
|
35
|
+
var table = schema.nodes.table;
|
|
36
|
+
return path.some(function (n) {
|
|
37
|
+
return n.type === table;
|
|
38
|
+
});
|
|
33
39
|
};
|
|
@@ -54,7 +54,7 @@ import { TruncatedWrapper } from './truncated-wrapper';
|
|
|
54
54
|
export var NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
55
55
|
export var DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
56
56
|
var packageName = "@atlaskit/renderer";
|
|
57
|
-
var packageVersion = "112.8.
|
|
57
|
+
var packageVersion = "112.8.8";
|
|
58
58
|
var setAsQueryContainerStyles = css({
|
|
59
59
|
containerName: 'ak-renderer-wrapper',
|
|
60
60
|
containerType: 'inline-size',
|
|
@@ -4,5 +4,5 @@ type TableProps = SharedTableProps & {
|
|
|
4
4
|
innerRef?: React.RefObject<HTMLTableElement>;
|
|
5
5
|
children: React.ReactNode[];
|
|
6
6
|
};
|
|
7
|
-
export declare const Table: React.MemoExoticComponent<({ innerRef, isNumberColumnEnabled, columnWidths, layout, renderWidth, children, tableNode, rendererAppearance, isInsideOfBlockNode, isinsideMultiBodiedExtension, allowTableResizing, }: TableProps) => JSX.Element>;
|
|
7
|
+
export declare const Table: React.MemoExoticComponent<({ innerRef, isNumberColumnEnabled, columnWidths, layout, renderWidth, children, tableNode, rendererAppearance, isInsideOfBlockNode, isInsideOfTable, isinsideMultiBodiedExtension, allowTableResizing, }: TableProps) => JSX.Element>;
|
|
8
8
|
export {};
|
|
@@ -2,3 +2,4 @@ import type { Node, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
|
2
2
|
export declare const insideBreakoutLayout: (path: Node[]) => boolean;
|
|
3
3
|
export declare const insideBlockNode: (path: Node[], schema: Schema) => boolean;
|
|
4
4
|
export declare const insideMultiBodiedExtension: (path: Node[], schema: Schema) => boolean;
|
|
5
|
+
export declare const insideTable: (path: Node[], schema: Schema) => boolean;
|
|
@@ -4,5 +4,5 @@ type TableProps = SharedTableProps & {
|
|
|
4
4
|
innerRef?: React.RefObject<HTMLTableElement>;
|
|
5
5
|
children: React.ReactNode[];
|
|
6
6
|
};
|
|
7
|
-
export declare const Table: React.MemoExoticComponent<({ innerRef, isNumberColumnEnabled, columnWidths, layout, renderWidth, children, tableNode, rendererAppearance, isInsideOfBlockNode, isinsideMultiBodiedExtension, allowTableResizing, }: TableProps) => JSX.Element>;
|
|
7
|
+
export declare const Table: React.MemoExoticComponent<({ innerRef, isNumberColumnEnabled, columnWidths, layout, renderWidth, children, tableNode, rendererAppearance, isInsideOfBlockNode, isInsideOfTable, isinsideMultiBodiedExtension, allowTableResizing, }: TableProps) => JSX.Element>;
|
|
8
8
|
export {};
|
|
@@ -2,3 +2,4 @@ import type { Node, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
|
2
2
|
export declare const insideBreakoutLayout: (path: Node[]) => boolean;
|
|
3
3
|
export declare const insideBlockNode: (path: Node[], schema: Schema) => boolean;
|
|
4
4
|
export declare const insideMultiBodiedExtension: (path: Node[], schema: Schema) => boolean;
|
|
5
|
+
export declare const insideTable: (path: Node[], schema: Schema) => boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/renderer",
|
|
3
|
-
"version": "112.8.
|
|
3
|
+
"version": "112.8.8",
|
|
4
4
|
"description": "Renderer component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -23,20 +23,20 @@
|
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@atlaskit/adf-schema": "^46.1.0",
|
|
26
|
-
"@atlaskit/adf-utils": "^19.
|
|
26
|
+
"@atlaskit/adf-utils": "^19.17.0",
|
|
27
27
|
"@atlaskit/analytics-listeners": "^8.13.0",
|
|
28
28
|
"@atlaskit/analytics-namespaced-context": "^6.12.0",
|
|
29
29
|
"@atlaskit/analytics-next": "^10.2.0",
|
|
30
30
|
"@atlaskit/button": "^20.3.0",
|
|
31
31
|
"@atlaskit/code": "^15.6.0",
|
|
32
|
-
"@atlaskit/editor-common": "^99.
|
|
32
|
+
"@atlaskit/editor-common": "^99.3.0",
|
|
33
33
|
"@atlaskit/editor-json-transformer": "^8.21.0",
|
|
34
34
|
"@atlaskit/editor-palette": "1.6.4",
|
|
35
35
|
"@atlaskit/editor-prosemirror": "6.2.1",
|
|
36
36
|
"@atlaskit/editor-shared-styles": "^3.2.0",
|
|
37
37
|
"@atlaskit/emoji": "^67.12.0",
|
|
38
38
|
"@atlaskit/feature-gate-js-client": "^4.23.0",
|
|
39
|
-
"@atlaskit/icon": "^23.
|
|
39
|
+
"@atlaskit/icon": "^23.4.0",
|
|
40
40
|
"@atlaskit/link-datasource": "^3.15.0",
|
|
41
41
|
"@atlaskit/media-card": "^78.18.0",
|
|
42
42
|
"@atlaskit/media-client": "^29.0.0",
|
|
@@ -46,11 +46,11 @@
|
|
|
46
46
|
"@atlaskit/media-ui": "^27.3.0",
|
|
47
47
|
"@atlaskit/media-viewer": "^49.6.0",
|
|
48
48
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
49
|
-
"@atlaskit/smart-card": "^34.
|
|
49
|
+
"@atlaskit/smart-card": "^34.2.0",
|
|
50
50
|
"@atlaskit/status": "^1.8.0",
|
|
51
51
|
"@atlaskit/task-decision": "^17.11.0",
|
|
52
52
|
"@atlaskit/theme": "^14.0.0",
|
|
53
|
-
"@atlaskit/tmp-editor-statsig": "^2.
|
|
53
|
+
"@atlaskit/tmp-editor-statsig": "^2.35.0",
|
|
54
54
|
"@atlaskit/tokens": "^3.0.0",
|
|
55
55
|
"@atlaskit/tooltip": "^19.0.0",
|
|
56
56
|
"@atlaskit/visually-hidden": "^1.5.0",
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"@atlaskit/media-core": "^34.4.0",
|
|
80
80
|
"@atlaskit/media-integration-test-helpers": "^3.1.0",
|
|
81
81
|
"@atlaskit/media-test-helpers": "^34.7.0",
|
|
82
|
-
"@atlaskit/mention": "^23.
|
|
82
|
+
"@atlaskit/mention": "^23.8.0",
|
|
83
83
|
"@atlaskit/navigation-next": "^9.0.0",
|
|
84
84
|
"@atlaskit/util-data-test": "^17.13.0",
|
|
85
85
|
"@atlaskit/visual-regression": "*",
|
|
@@ -178,6 +178,9 @@
|
|
|
178
178
|
},
|
|
179
179
|
"platform_editor_accessible_heading_copy_link": {
|
|
180
180
|
"type": "boolean"
|
|
181
|
+
},
|
|
182
|
+
"platform_editor_nested_tables_renderer_colgroup": {
|
|
183
|
+
"type": "boolean"
|
|
181
184
|
}
|
|
182
185
|
},
|
|
183
186
|
"af:exports": {
|