@atlaskit/renderer 109.21.0 → 109.21.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 +7 -0
- package/dist/cjs/react/nodes/table.js +18 -19
- package/dist/cjs/ui/Renderer/index.js +1 -1
- package/dist/es2019/react/nodes/table.js +19 -17
- package/dist/es2019/ui/Renderer/index.js +1 -1
- package/dist/esm/react/nodes/table.js +18 -19
- package/dist/esm/ui/Renderer/index.js +1 -1
- package/package.json +5 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @atlaskit/renderer
|
|
2
2
|
|
|
3
|
+
## 109.21.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#94757](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/94757) [`22e7c4a1a8f4`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/22e7c4a1a8f4) - add ff and fix table width issue in renderer
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
|
|
3
10
|
## 109.21.0
|
|
4
11
|
|
|
5
12
|
### Minor Changes
|
|
@@ -20,6 +20,7 @@ var _utils = require("@atlaskit/editor-common/utils");
|
|
|
20
20
|
var _types = require("@atlaskit/editor-common/types");
|
|
21
21
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
22
22
|
var _nodeWidth = require("@atlaskit/editor-common/node-width");
|
|
23
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
23
24
|
var _style = require("../../ui/Renderer/style");
|
|
24
25
|
var _tableCell = require("./tableCell");
|
|
25
26
|
var _SmartCardStorage = require("../../ui/SmartCardStorage");
|
|
@@ -440,26 +441,24 @@ var TableWithShadows = (0, _ui.overflowShadow)(TableProcessor, {
|
|
|
440
441
|
useShadowObserver: true
|
|
441
442
|
});
|
|
442
443
|
var TableWithWidth = function TableWithWidth(props) {
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
return /*#__PURE__*/_react.default.createElement(TableWithShadows, (0, _extends2.default)({
|
|
455
|
-
renderWidth: renderWidth
|
|
456
|
-
}, props));
|
|
457
|
-
}
|
|
458
|
-
// there should not be a case when colWidthsSum is 0 and table is in overflow state - so no need to render shadows in this case
|
|
459
|
-
return /*#__PURE__*/_react.default.createElement(TableProcessor, (0, _extends2.default)({
|
|
444
|
+
// Remember, `width` will be 0 during SSR
|
|
445
|
+
return /*#__PURE__*/_react.default.createElement(_ui.WidthConsumer, null, function (_ref2) {
|
|
446
|
+
var _props$columnWidths;
|
|
447
|
+
var width = _ref2.width;
|
|
448
|
+
// we are adding full page padding before but now it cause difference between editor and renderer so we need to remove it, and 1px also for matching exact width.
|
|
449
|
+
var renderWidth = props.rendererAppearance === 'full-page' ? (0, _platformFeatureFlags.getBooleanFF)('platform.editor.table-width-diff-in-renderer_x5s3z') ? width + _style.FullPagePadding - 1 : width - _style.FullPagePadding * 2 : width;
|
|
450
|
+
var colWidthsSum = ((_props$columnWidths = props.columnWidths) === null || _props$columnWidths === void 0 ? void 0 : _props$columnWidths.reduce(function (total, val) {
|
|
451
|
+
return total + val;
|
|
452
|
+
}, 0)) || 0;
|
|
453
|
+
if (colWidthsSum || isTableResizingEnabled(props.rendererAppearance)) {
|
|
454
|
+
return /*#__PURE__*/_react.default.createElement(TableWithShadows, (0, _extends2.default)({
|
|
460
455
|
renderWidth: renderWidth
|
|
461
456
|
}, props));
|
|
462
|
-
}
|
|
463
|
-
|
|
457
|
+
}
|
|
458
|
+
// there should not be a case when colWidthsSum is 0 and table is in overflow state - so no need to render shadows in this case
|
|
459
|
+
return /*#__PURE__*/_react.default.createElement(TableProcessor, (0, _extends2.default)({
|
|
460
|
+
renderWidth: renderWidth
|
|
461
|
+
}, props));
|
|
462
|
+
});
|
|
464
463
|
};
|
|
465
464
|
var _default = exports.default = (0, _SmartCardStorage.withSmartCardStorage)(TableWithWidth);
|
|
@@ -55,7 +55,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
55
55
|
var NORMAL_SEVERITY_THRESHOLD = exports.NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
56
56
|
var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
57
57
|
var packageName = "@atlaskit/renderer";
|
|
58
|
-
var packageVersion = "109.21.
|
|
58
|
+
var packageVersion = "109.21.1";
|
|
59
59
|
var Renderer = exports.Renderer = /*#__PURE__*/function (_PureComponent) {
|
|
60
60
|
(0, _inherits2.default)(Renderer, _PureComponent);
|
|
61
61
|
var _super = _createSuper(Renderer);
|
|
@@ -7,6 +7,7 @@ import { createCompareNodes, convertProsemirrorTableNodeToArrayOfRows, hasMerged
|
|
|
7
7
|
import { SortOrder } from '@atlaskit/editor-common/types';
|
|
8
8
|
import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth } from '@atlaskit/editor-shared-styles';
|
|
9
9
|
import { getTableContainerWidth } from '@atlaskit/editor-common/node-width';
|
|
10
|
+
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
10
11
|
import { FullPagePadding } from '../../ui/Renderer/style';
|
|
11
12
|
import { TableHeader } from './tableCell';
|
|
12
13
|
import { withSmartCardStorage } from '../../ui/SmartCardStorage';
|
|
@@ -379,23 +380,24 @@ const TableWithShadows = overflowShadow(TableProcessor, {
|
|
|
379
380
|
overflowSelector: `.${TableSharedCssClassName.TABLE_NODE_WRAPPER}`,
|
|
380
381
|
useShadowObserver: true
|
|
381
382
|
});
|
|
382
|
-
const TableWithWidth = props =>
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
383
|
+
const TableWithWidth = props => {
|
|
384
|
+
// Remember, `width` will be 0 during SSR
|
|
385
|
+
return /*#__PURE__*/React.createElement(WidthConsumer, null, ({
|
|
386
|
+
width
|
|
387
|
+
}) => {
|
|
388
|
+
var _props$columnWidths;
|
|
389
|
+
// we are adding full page padding before but now it cause difference between editor and renderer so we need to remove it, and 1px also for matching exact width.
|
|
390
|
+
const renderWidth = props.rendererAppearance === 'full-page' ? getBooleanFF('platform.editor.table-width-diff-in-renderer_x5s3z') ? width + FullPagePadding - 1 : width - FullPagePadding * 2 : width;
|
|
391
|
+
const colWidthsSum = ((_props$columnWidths = props.columnWidths) === null || _props$columnWidths === void 0 ? void 0 : _props$columnWidths.reduce((total, val) => total + val, 0)) || 0;
|
|
392
|
+
if (colWidthsSum || isTableResizingEnabled(props.rendererAppearance)) {
|
|
393
|
+
return /*#__PURE__*/React.createElement(TableWithShadows, _extends({
|
|
394
|
+
renderWidth: renderWidth
|
|
395
|
+
}, props));
|
|
396
|
+
}
|
|
397
|
+
// there should not be a case when colWidthsSum is 0 and table is in overflow state - so no need to render shadows in this case
|
|
398
|
+
return /*#__PURE__*/React.createElement(TableProcessor, _extends({
|
|
393
399
|
renderWidth: renderWidth
|
|
394
400
|
}, props));
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
return /*#__PURE__*/React.createElement(TableProcessor, _extends({
|
|
398
|
-
renderWidth: renderWidth
|
|
399
|
-
}, props));
|
|
400
|
-
});
|
|
401
|
+
});
|
|
402
|
+
};
|
|
401
403
|
export default withSmartCardStorage(TableWithWidth);
|
|
@@ -36,7 +36,7 @@ import { EditorMediaClientProvider } from '../../react/utils/EditorMediaClientPr
|
|
|
36
36
|
export const NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
37
37
|
export const DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
38
38
|
const packageName = "@atlaskit/renderer";
|
|
39
|
-
const packageVersion = "109.21.
|
|
39
|
+
const packageVersion = "109.21.1";
|
|
40
40
|
export class Renderer extends PureComponent {
|
|
41
41
|
constructor(props) {
|
|
42
42
|
super(props);
|
|
@@ -18,6 +18,7 @@ import { createCompareNodes, convertProsemirrorTableNodeToArrayOfRows, hasMerged
|
|
|
18
18
|
import { SortOrder } from '@atlaskit/editor-common/types';
|
|
19
19
|
import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth } from '@atlaskit/editor-shared-styles';
|
|
20
20
|
import { getTableContainerWidth } from '@atlaskit/editor-common/node-width';
|
|
21
|
+
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
21
22
|
import { FullPagePadding } from '../../ui/Renderer/style';
|
|
22
23
|
import { TableHeader } from './tableCell';
|
|
23
24
|
import { withSmartCardStorage } from '../../ui/SmartCardStorage';
|
|
@@ -433,26 +434,24 @@ var TableWithShadows = overflowShadow(TableProcessor, {
|
|
|
433
434
|
useShadowObserver: true
|
|
434
435
|
});
|
|
435
436
|
var TableWithWidth = function TableWithWidth(props) {
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
return /*#__PURE__*/React.createElement(TableWithShadows, _extends({
|
|
448
|
-
renderWidth: renderWidth
|
|
449
|
-
}, props));
|
|
450
|
-
}
|
|
451
|
-
// there should not be a case when colWidthsSum is 0 and table is in overflow state - so no need to render shadows in this case
|
|
452
|
-
return /*#__PURE__*/React.createElement(TableProcessor, _extends({
|
|
437
|
+
// Remember, `width` will be 0 during SSR
|
|
438
|
+
return /*#__PURE__*/React.createElement(WidthConsumer, null, function (_ref2) {
|
|
439
|
+
var _props$columnWidths;
|
|
440
|
+
var width = _ref2.width;
|
|
441
|
+
// we are adding full page padding before but now it cause difference between editor and renderer so we need to remove it, and 1px also for matching exact width.
|
|
442
|
+
var renderWidth = props.rendererAppearance === 'full-page' ? getBooleanFF('platform.editor.table-width-diff-in-renderer_x5s3z') ? width + FullPagePadding - 1 : width - FullPagePadding * 2 : width;
|
|
443
|
+
var colWidthsSum = ((_props$columnWidths = props.columnWidths) === null || _props$columnWidths === void 0 ? void 0 : _props$columnWidths.reduce(function (total, val) {
|
|
444
|
+
return total + val;
|
|
445
|
+
}, 0)) || 0;
|
|
446
|
+
if (colWidthsSum || isTableResizingEnabled(props.rendererAppearance)) {
|
|
447
|
+
return /*#__PURE__*/React.createElement(TableWithShadows, _extends({
|
|
453
448
|
renderWidth: renderWidth
|
|
454
449
|
}, props));
|
|
455
|
-
}
|
|
456
|
-
|
|
450
|
+
}
|
|
451
|
+
// there should not be a case when colWidthsSum is 0 and table is in overflow state - so no need to render shadows in this case
|
|
452
|
+
return /*#__PURE__*/React.createElement(TableProcessor, _extends({
|
|
453
|
+
renderWidth: renderWidth
|
|
454
|
+
}, props));
|
|
455
|
+
});
|
|
457
456
|
};
|
|
458
457
|
export default withSmartCardStorage(TableWithWidth);
|
|
@@ -46,7 +46,7 @@ import { EditorMediaClientProvider } from '../../react/utils/EditorMediaClientPr
|
|
|
46
46
|
export var NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
47
47
|
export var DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
48
48
|
var packageName = "@atlaskit/renderer";
|
|
49
|
-
var packageVersion = "109.21.
|
|
49
|
+
var packageVersion = "109.21.1";
|
|
50
50
|
export var Renderer = /*#__PURE__*/function (_PureComponent) {
|
|
51
51
|
_inherits(Renderer, _PureComponent);
|
|
52
52
|
var _super = _createSuper(Renderer);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/renderer",
|
|
3
|
-
"version": "109.21.
|
|
3
|
+
"version": "109.21.1",
|
|
4
4
|
"description": "Renderer component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@atlaskit/analytics-next": "^9.3.0",
|
|
32
32
|
"@atlaskit/button": "^17.14.0",
|
|
33
33
|
"@atlaskit/code": "^15.1.0",
|
|
34
|
-
"@atlaskit/editor-common": "^78.
|
|
34
|
+
"@atlaskit/editor-common": "^78.35.0",
|
|
35
35
|
"@atlaskit/editor-json-transformer": "^8.11.0",
|
|
36
36
|
"@atlaskit/editor-palette": "1.5.3",
|
|
37
37
|
"@atlaskit/editor-prosemirror": "4.0.0",
|
|
@@ -129,6 +129,9 @@
|
|
|
129
129
|
"platform.editor.inline_extension.extended_lcqdn": {
|
|
130
130
|
"type": "boolean"
|
|
131
131
|
},
|
|
132
|
+
"platform.editor.table-width-diff-in-renderer_x5s3z": {
|
|
133
|
+
"type": "boolean"
|
|
134
|
+
},
|
|
132
135
|
"platform.editor.allow-inline-comments-for-inline-nodes": {
|
|
133
136
|
"type": "boolean"
|
|
134
137
|
},
|