@atlaskit/renderer 133.17.1 → 133.17.2
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/nodes/table/table.js +2 -1
- package/dist/cjs/react/nodes/table.js +22 -7
- package/dist/cjs/react/nodes/tableNew.js +5 -1
- package/dist/cjs/ui/Renderer/index.js +1 -1
- package/dist/es2019/react/nodes/table/table.js +2 -1
- package/dist/es2019/react/nodes/table.js +23 -7
- package/dist/es2019/react/nodes/tableNew.js +5 -1
- package/dist/es2019/ui/Renderer/index.js +1 -1
- package/dist/esm/react/nodes/table/table.js +2 -1
- package/dist/esm/react/nodes/table.js +22 -7
- package/dist/esm/react/nodes/tableNew.js +5 -1
- 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/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/renderer
|
|
2
2
|
|
|
3
|
+
## 133.17.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`90510b2e6e5af`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/90510b2e6e5af) -
|
|
8
|
+
Prevent nested renderer tables from incorrectly using content-width mode
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
3
11
|
## 133.17.1
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -25,6 +25,7 @@ var Table = exports.Table = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
|
25
25
|
tableNode = _ref.tableNode,
|
|
26
26
|
rendererAppearance = _ref.rendererAppearance,
|
|
27
27
|
isInsideOfBlockNode = _ref.isInsideOfBlockNode,
|
|
28
|
+
isInsideOfNestedRenderer = _ref.isInsideOfNestedRenderer,
|
|
28
29
|
isInsideOfTable = _ref.isInsideOfTable,
|
|
29
30
|
isinsideMultiBodiedExtension = _ref.isinsideMultiBodiedExtension,
|
|
30
31
|
allowTableResizing = _ref.allowTableResizing,
|
|
@@ -62,7 +63,7 @@ var Table = exports.Table = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
|
62
63
|
allowTableResizing: allowTableResizing,
|
|
63
64
|
rendererAppearance: rendererAppearance
|
|
64
65
|
}),
|
|
65
|
-
isTableNested: isInsideOfBlockNode || isInsideOfTable
|
|
66
|
+
isTableNested: isInsideOfBlockNode || isInsideOfNestedRenderer || isInsideOfTable
|
|
66
67
|
}) && (0, _expValEquals.expValEquals)('platform_editor_table_fit_to_content_auto_convert', 'isEnabled', true);
|
|
67
68
|
return /*#__PURE__*/_react.default.createElement("table", (0, _extends2.default)({}, (0, _platformFeatureFlags.fg)('platform_renderer_isPresentational') && {
|
|
68
69
|
role: isPresentational ? 'presentation' : undefined
|
|
@@ -31,6 +31,7 @@ var _sticky = require("./table/sticky");
|
|
|
31
31
|
var _table = require("./table/table");
|
|
32
32
|
var _appearance = require("../utils/appearance");
|
|
33
33
|
var _TableStickyScrollbar = require("./TableStickyScrollbar");
|
|
34
|
+
var _rendererContext = require("../../renderer-context");
|
|
34
35
|
var _tableNew = require("./tableNew");
|
|
35
36
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
36
37
|
var _table2 = require("@atlaskit/editor-common/table");
|
|
@@ -415,6 +416,7 @@ var TableContainer = exports.TableContainer = /*#__PURE__*/function (_React$Comp
|
|
|
415
416
|
tableNode = _this$props.tableNode,
|
|
416
417
|
rendererAppearance = _this$props.rendererAppearance,
|
|
417
418
|
isInsideOfBlockNode = _this$props.isInsideOfBlockNode,
|
|
419
|
+
isInsideOfNestedRenderer = _this$props.isInsideOfNestedRenderer,
|
|
418
420
|
isInsideOfTable = _this$props.isInsideOfTable,
|
|
419
421
|
isinsideMultiBodiedExtension = _this$props.isinsideMultiBodiedExtension,
|
|
420
422
|
allowTableAlignment = _this$props.allowTableAlignment,
|
|
@@ -528,7 +530,7 @@ var TableContainer = exports.TableContainer = /*#__PURE__*/function (_React$Comp
|
|
|
528
530
|
allowTableResizing: allowTableResizing,
|
|
529
531
|
rendererAppearance: rendererAppearance
|
|
530
532
|
}),
|
|
531
|
-
isTableNested: isInsideOfBlockNode || isInsideOfTable
|
|
533
|
+
isTableNested: isInsideOfBlockNode || isInsideOfNestedRenderer || isInsideOfTable
|
|
532
534
|
}) && (0, _expValEquals.expValEquals)('platform_editor_table_fit_to_content_auto_convert', 'isEnabled', true);
|
|
533
535
|
var style;
|
|
534
536
|
if (fixTableSSRResizing) {
|
|
@@ -591,6 +593,7 @@ var TableContainer = exports.TableContainer = /*#__PURE__*/function (_React$Comp
|
|
|
591
593
|
tableNode: tableNode,
|
|
592
594
|
rendererAppearance: rendererAppearance,
|
|
593
595
|
isInsideOfBlockNode: isInsideOfBlockNode,
|
|
596
|
+
isInsideOfNestedRenderer: isInsideOfNestedRenderer,
|
|
594
597
|
isInsideOfTable: isInsideOfTable,
|
|
595
598
|
isinsideMultiBodiedExtension: isinsideMultiBodiedExtension,
|
|
596
599
|
allowTableResizing: allowTableResizing,
|
|
@@ -722,6 +725,9 @@ var TableWithShadows = (0, _ui.overflowShadow)(TableProcessor, {
|
|
|
722
725
|
useShadowObserver: true
|
|
723
726
|
});
|
|
724
727
|
var TableWithWidth = function TableWithWidth(props) {
|
|
728
|
+
var _useRendererContext = (0, _rendererContext.useRendererContext)(),
|
|
729
|
+
isTopLevelRenderer = _useRendererContext.isTopLevelRenderer;
|
|
730
|
+
var isInsideOfNestedRenderer = isTopLevelRenderer === false && (0, _expValEquals.expValEquals)('platform_editor_table_nested_content_mode_fix', 'isEnabled', true);
|
|
725
731
|
if ((0, _platformFeatureFlags.fg)('platform-ssr-table-resize')) {
|
|
726
732
|
var _props$columnWidths;
|
|
727
733
|
var colWidthsSum =
|
|
@@ -730,14 +736,19 @@ var TableWithWidth = function TableWithWidth(props) {
|
|
|
730
736
|
return total + val;
|
|
731
737
|
}, 0)) || 0;
|
|
732
738
|
if (colWidthsSum || props.allowTableResizing) {
|
|
739
|
+
return /*#__PURE__*/_react.default.createElement(TableWithShadowsAndContainerStyles
|
|
733
740
|
// Ignored via go/ees005
|
|
734
741
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
735
|
-
|
|
742
|
+
, (0, _extends2.default)({}, props, {
|
|
743
|
+
isInsideOfNestedRenderer: isInsideOfNestedRenderer
|
|
744
|
+
}));
|
|
736
745
|
}
|
|
737
746
|
return /*#__PURE__*/_react.default.createElement(_tableNew.TableProcessorWithContainerStyles
|
|
738
747
|
// Ignored via go/ees005
|
|
739
748
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
740
|
-
, props
|
|
749
|
+
, (0, _extends2.default)({}, props, {
|
|
750
|
+
isInsideOfNestedRenderer: isInsideOfNestedRenderer
|
|
751
|
+
}));
|
|
741
752
|
} else {
|
|
742
753
|
return /*#__PURE__*/_react.default.createElement(_ui.WidthConsumer, null, function (_ref3) {
|
|
743
754
|
var _props$columnWidths2;
|
|
@@ -749,18 +760,22 @@ var TableWithWidth = function TableWithWidth(props) {
|
|
|
749
760
|
return total + val;
|
|
750
761
|
}, 0)) || 0;
|
|
751
762
|
if (colWidthsSum || props.allowTableResizing) {
|
|
752
|
-
// Ignored via go/ees005
|
|
753
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
754
763
|
return /*#__PURE__*/_react.default.createElement(TableWithShadows, (0, _extends2.default)({
|
|
755
764
|
renderWidth: renderWidth
|
|
756
|
-
|
|
765
|
+
// Ignored via go/ees005
|
|
766
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
767
|
+
}, props, {
|
|
768
|
+
isInsideOfNestedRenderer: isInsideOfNestedRenderer
|
|
769
|
+
}));
|
|
757
770
|
}
|
|
758
771
|
// 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
|
|
759
772
|
return /*#__PURE__*/_react.default.createElement(TableProcessor, (0, _extends2.default)({
|
|
760
773
|
renderWidth: renderWidth
|
|
761
774
|
// Ignored via go/ees005
|
|
762
775
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
763
|
-
}, props
|
|
776
|
+
}, props, {
|
|
777
|
+
isInsideOfNestedRenderer: isInsideOfNestedRenderer
|
|
778
|
+
}));
|
|
764
779
|
});
|
|
765
780
|
}
|
|
766
781
|
};
|
|
@@ -615,6 +615,7 @@ var TableContainer = exports.TableContainer = /*#__PURE__*/function (_React$Comp
|
|
|
615
615
|
tableNode = _this$props.tableNode,
|
|
616
616
|
rendererAppearance = _this$props.rendererAppearance,
|
|
617
617
|
isInsideOfBlockNode = _this$props.isInsideOfBlockNode,
|
|
618
|
+
isInsideOfNestedRenderer = _this$props.isInsideOfNestedRenderer,
|
|
618
619
|
isInsideOfTable = _this$props.isInsideOfTable,
|
|
619
620
|
isinsideMultiBodiedExtension = _this$props.isinsideMultiBodiedExtension,
|
|
620
621
|
allowTableAlignment = _this$props.allowTableAlignment,
|
|
@@ -704,7 +705,7 @@ var TableContainer = exports.TableContainer = /*#__PURE__*/function (_React$Comp
|
|
|
704
705
|
allowTableResizing: allowTableResizing,
|
|
705
706
|
rendererAppearance: rendererAppearance
|
|
706
707
|
}),
|
|
707
|
-
isTableNested: isInsideOfBlockNode || isInsideOfTable
|
|
708
|
+
isTableNested: isInsideOfBlockNode || isInsideOfNestedRenderer || isInsideOfTable
|
|
708
709
|
}) && (0, _expValEquals.expValEquals)('platform_editor_table_fit_to_content_auto_convert', 'isEnabled', true);
|
|
709
710
|
var style = _objectSpread(_objectSpread({}, isContentModeTable && {
|
|
710
711
|
'--renderer-table-max-width': renderWidthCSS
|
|
@@ -772,6 +773,7 @@ var TableContainer = exports.TableContainer = /*#__PURE__*/function (_React$Comp
|
|
|
772
773
|
tableNode: tableNode,
|
|
773
774
|
rendererAppearance: rendererAppearance,
|
|
774
775
|
isInsideOfBlockNode: isInsideOfBlockNode,
|
|
776
|
+
isInsideOfNestedRenderer: isInsideOfNestedRenderer,
|
|
775
777
|
isInsideOfTable: isInsideOfTable,
|
|
776
778
|
isinsideMultiBodiedExtension: isinsideMultiBodiedExtension,
|
|
777
779
|
allowTableResizing: allowTableResizing,
|
|
@@ -1001,6 +1003,7 @@ var TableProcessorWithContainerStyles = exports.TableProcessorWithContainerStyle
|
|
|
1001
1003
|
handleRef = _this$props2.handleRef,
|
|
1002
1004
|
isinsideMultiBodiedExtension = _this$props2.isinsideMultiBodiedExtension,
|
|
1003
1005
|
isInsideOfBlockNode = _this$props2.isInsideOfBlockNode,
|
|
1006
|
+
isInsideOfNestedRenderer = _this$props2.isInsideOfNestedRenderer,
|
|
1004
1007
|
isInsideOfTable = _this$props2.isInsideOfTable,
|
|
1005
1008
|
isNumberColumnEnabled = _this$props2.isNumberColumnEnabled,
|
|
1006
1009
|
isPresentational = _this$props2.isPresentational,
|
|
@@ -1030,6 +1033,7 @@ var TableProcessorWithContainerStyles = exports.TableProcessorWithContainerStyle
|
|
|
1030
1033
|
handleRef: handleRef,
|
|
1031
1034
|
isinsideMultiBodiedExtension: isinsideMultiBodiedExtension,
|
|
1032
1035
|
isInsideOfBlockNode: isInsideOfBlockNode,
|
|
1036
|
+
isInsideOfNestedRenderer: isInsideOfNestedRenderer,
|
|
1033
1037
|
isInsideOfTable: isInsideOfTable,
|
|
1034
1038
|
isNumberColumnEnabled: isNumberColumnEnabled,
|
|
1035
1039
|
isPresentational: isPresentational,
|
|
@@ -73,7 +73,7 @@ var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
73
73
|
var TABLE_INFO_TIMEOUT = 10000;
|
|
74
74
|
var RENDER_EVENT_SAMPLE_RATE = 0.1;
|
|
75
75
|
var packageName = "@atlaskit/renderer";
|
|
76
|
-
var packageVersion = "133.17.
|
|
76
|
+
var packageVersion = "133.17.1";
|
|
77
77
|
var setAsQueryContainerStyles = (0, _react2.css)({
|
|
78
78
|
containerName: 'ak-renderer-wrapper',
|
|
79
79
|
containerType: 'inline-size'
|
|
@@ -17,6 +17,7 @@ export const Table = /*#__PURE__*/React.memo(({
|
|
|
17
17
|
tableNode,
|
|
18
18
|
rendererAppearance,
|
|
19
19
|
isInsideOfBlockNode,
|
|
20
|
+
isInsideOfNestedRenderer,
|
|
20
21
|
isInsideOfTable,
|
|
21
22
|
isinsideMultiBodiedExtension,
|
|
22
23
|
allowTableResizing,
|
|
@@ -54,7 +55,7 @@ export const Table = /*#__PURE__*/React.memo(({
|
|
|
54
55
|
allowTableResizing,
|
|
55
56
|
rendererAppearance
|
|
56
57
|
}),
|
|
57
|
-
isTableNested: isInsideOfBlockNode || isInsideOfTable
|
|
58
|
+
isTableNested: isInsideOfBlockNode || isInsideOfNestedRenderer || isInsideOfTable
|
|
58
59
|
}) && expValEquals('platform_editor_table_fit_to_content_auto_convert', 'isEnabled', true);
|
|
59
60
|
return /*#__PURE__*/React.createElement("table", _extends({}, fg('platform_renderer_isPresentational') && {
|
|
60
61
|
role: isPresentational ? 'presentation' : undefined
|
|
@@ -18,6 +18,7 @@ import { StickyTable, tableStickyPadding, OverflowParent } from './table/sticky'
|
|
|
18
18
|
import { Table } from './table/table';
|
|
19
19
|
import { isCommentAppearance, isFullPageAppearance, isFullWidthAppearance, isFullWidthOrFullPageAppearance, isMaxWidthAppearance } from '../utils/appearance';
|
|
20
20
|
import { TableStickyScrollbar } from './TableStickyScrollbar';
|
|
21
|
+
import { useRendererContext } from '../../renderer-context';
|
|
21
22
|
import { TableProcessorWithContainerStyles, RefSyncBlockFakeBorders } from './tableNew';
|
|
22
23
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
23
24
|
import { isTableInContentMode } from '@atlaskit/editor-common/table';
|
|
@@ -356,6 +357,7 @@ export class TableContainer extends React.Component {
|
|
|
356
357
|
tableNode,
|
|
357
358
|
rendererAppearance,
|
|
358
359
|
isInsideOfBlockNode,
|
|
360
|
+
isInsideOfNestedRenderer,
|
|
359
361
|
isInsideOfTable,
|
|
360
362
|
isinsideMultiBodiedExtension,
|
|
361
363
|
allowTableAlignment,
|
|
@@ -469,7 +471,7 @@ export class TableContainer extends React.Component {
|
|
|
469
471
|
allowTableResizing,
|
|
470
472
|
rendererAppearance
|
|
471
473
|
}),
|
|
472
|
-
isTableNested: isInsideOfBlockNode || isInsideOfTable
|
|
474
|
+
isTableNested: isInsideOfBlockNode || isInsideOfNestedRenderer || isInsideOfTable
|
|
473
475
|
}) && expValEquals('platform_editor_table_fit_to_content_auto_convert', 'isEnabled', true);
|
|
474
476
|
let style;
|
|
475
477
|
if (fixTableSSRResizing) {
|
|
@@ -534,6 +536,7 @@ export class TableContainer extends React.Component {
|
|
|
534
536
|
tableNode: tableNode,
|
|
535
537
|
rendererAppearance: rendererAppearance,
|
|
536
538
|
isInsideOfBlockNode: isInsideOfBlockNode,
|
|
539
|
+
isInsideOfNestedRenderer: isInsideOfNestedRenderer,
|
|
537
540
|
isInsideOfTable: isInsideOfTable,
|
|
538
541
|
isinsideMultiBodiedExtension: isinsideMultiBodiedExtension,
|
|
539
542
|
allowTableResizing: allowTableResizing,
|
|
@@ -662,20 +665,29 @@ const TableWithShadows = overflowShadow(TableProcessor, {
|
|
|
662
665
|
useShadowObserver: true
|
|
663
666
|
});
|
|
664
667
|
const TableWithWidth = props => {
|
|
668
|
+
const {
|
|
669
|
+
isTopLevelRenderer
|
|
670
|
+
} = useRendererContext();
|
|
671
|
+
const isInsideOfNestedRenderer = isTopLevelRenderer === false && expValEquals('platform_editor_table_nested_content_mode_fix', 'isEnabled', true);
|
|
665
672
|
if (fg('platform-ssr-table-resize')) {
|
|
666
673
|
var _props$columnWidths;
|
|
667
674
|
const colWidthsSum =
|
|
668
675
|
// eslint-disable-next-line @atlassian/perf-linting/no-expensive-computations-in-render -- Ignored via go/ees017 (to be fixed)
|
|
669
676
|
((_props$columnWidths = props.columnWidths) === null || _props$columnWidths === void 0 ? void 0 : _props$columnWidths.reduce((total, val) => total + val, 0)) || 0;
|
|
670
677
|
if (colWidthsSum || props.allowTableResizing) {
|
|
678
|
+
return /*#__PURE__*/React.createElement(TableWithShadowsAndContainerStyles
|
|
671
679
|
// Ignored via go/ees005
|
|
672
680
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
673
|
-
|
|
681
|
+
, _extends({}, props, {
|
|
682
|
+
isInsideOfNestedRenderer: isInsideOfNestedRenderer
|
|
683
|
+
}));
|
|
674
684
|
}
|
|
675
685
|
return /*#__PURE__*/React.createElement(TableProcessorWithContainerStyles
|
|
676
686
|
// Ignored via go/ees005
|
|
677
687
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
678
|
-
, props
|
|
688
|
+
, _extends({}, props, {
|
|
689
|
+
isInsideOfNestedRenderer: isInsideOfNestedRenderer
|
|
690
|
+
}));
|
|
679
691
|
} else {
|
|
680
692
|
return /*#__PURE__*/React.createElement(WidthConsumer, null, ({
|
|
681
693
|
width
|
|
@@ -686,18 +698,22 @@ const TableWithWidth = props => {
|
|
|
686
698
|
// eslint-disable-next-line @atlassian/perf-linting/no-expensive-computations-in-render -- Ignored via go/ees017 (to be fixed)
|
|
687
699
|
((_props$columnWidths2 = props.columnWidths) === null || _props$columnWidths2 === void 0 ? void 0 : _props$columnWidths2.reduce((total, val) => total + val, 0)) || 0;
|
|
688
700
|
if (colWidthsSum || props.allowTableResizing) {
|
|
689
|
-
// Ignored via go/ees005
|
|
690
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
691
701
|
return /*#__PURE__*/React.createElement(TableWithShadows, _extends({
|
|
692
702
|
renderWidth: renderWidth
|
|
693
|
-
|
|
703
|
+
// Ignored via go/ees005
|
|
704
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
705
|
+
}, props, {
|
|
706
|
+
isInsideOfNestedRenderer: isInsideOfNestedRenderer
|
|
707
|
+
}));
|
|
694
708
|
}
|
|
695
709
|
// 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
|
|
696
710
|
return /*#__PURE__*/React.createElement(TableProcessor, _extends({
|
|
697
711
|
renderWidth: renderWidth
|
|
698
712
|
// Ignored via go/ees005
|
|
699
713
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
700
|
-
}, props
|
|
714
|
+
}, props, {
|
|
715
|
+
isInsideOfNestedRenderer: isInsideOfNestedRenderer
|
|
716
|
+
}));
|
|
701
717
|
});
|
|
702
718
|
}
|
|
703
719
|
};
|
|
@@ -550,6 +550,7 @@ export class TableContainer extends React.Component {
|
|
|
550
550
|
tableNode,
|
|
551
551
|
rendererAppearance,
|
|
552
552
|
isInsideOfBlockNode,
|
|
553
|
+
isInsideOfNestedRenderer,
|
|
553
554
|
isInsideOfTable,
|
|
554
555
|
isinsideMultiBodiedExtension,
|
|
555
556
|
allowTableAlignment,
|
|
@@ -642,7 +643,7 @@ export class TableContainer extends React.Component {
|
|
|
642
643
|
allowTableResizing,
|
|
643
644
|
rendererAppearance
|
|
644
645
|
}),
|
|
645
|
-
isTableNested: isInsideOfBlockNode || isInsideOfTable
|
|
646
|
+
isTableNested: isInsideOfBlockNode || isInsideOfNestedRenderer || isInsideOfTable
|
|
646
647
|
}) && expValEquals('platform_editor_table_fit_to_content_auto_convert', 'isEnabled', true);
|
|
647
648
|
const style = {
|
|
648
649
|
...(isContentModeTable && {
|
|
@@ -711,6 +712,7 @@ export class TableContainer extends React.Component {
|
|
|
711
712
|
tableNode: tableNode,
|
|
712
713
|
rendererAppearance: rendererAppearance,
|
|
713
714
|
isInsideOfBlockNode: isInsideOfBlockNode,
|
|
715
|
+
isInsideOfNestedRenderer: isInsideOfNestedRenderer,
|
|
714
716
|
isInsideOfTable: isInsideOfTable,
|
|
715
717
|
isinsideMultiBodiedExtension: isinsideMultiBodiedExtension,
|
|
716
718
|
allowTableResizing: allowTableResizing,
|
|
@@ -937,6 +939,7 @@ export class TableProcessorWithContainerStyles extends React.Component {
|
|
|
937
939
|
handleRef,
|
|
938
940
|
isinsideMultiBodiedExtension,
|
|
939
941
|
isInsideOfBlockNode,
|
|
942
|
+
isInsideOfNestedRenderer,
|
|
940
943
|
isInsideOfTable,
|
|
941
944
|
isNumberColumnEnabled,
|
|
942
945
|
isPresentational,
|
|
@@ -967,6 +970,7 @@ export class TableProcessorWithContainerStyles extends React.Component {
|
|
|
967
970
|
handleRef: handleRef,
|
|
968
971
|
isinsideMultiBodiedExtension: isinsideMultiBodiedExtension,
|
|
969
972
|
isInsideOfBlockNode: isInsideOfBlockNode,
|
|
973
|
+
isInsideOfNestedRenderer: isInsideOfNestedRenderer,
|
|
970
974
|
isInsideOfTable: isInsideOfTable,
|
|
971
975
|
isNumberColumnEnabled: isNumberColumnEnabled,
|
|
972
976
|
isPresentational: isPresentational,
|
|
@@ -59,7 +59,7 @@ export const DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
59
59
|
const TABLE_INFO_TIMEOUT = 10000;
|
|
60
60
|
const RENDER_EVENT_SAMPLE_RATE = 0.1;
|
|
61
61
|
const packageName = "@atlaskit/renderer";
|
|
62
|
-
const packageVersion = "133.17.
|
|
62
|
+
const packageVersion = "133.17.1";
|
|
63
63
|
const setAsQueryContainerStyles = css({
|
|
64
64
|
containerName: 'ak-renderer-wrapper',
|
|
65
65
|
containerType: 'inline-size'
|
|
@@ -18,6 +18,7 @@ export var Table = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
18
18
|
tableNode = _ref.tableNode,
|
|
19
19
|
rendererAppearance = _ref.rendererAppearance,
|
|
20
20
|
isInsideOfBlockNode = _ref.isInsideOfBlockNode,
|
|
21
|
+
isInsideOfNestedRenderer = _ref.isInsideOfNestedRenderer,
|
|
21
22
|
isInsideOfTable = _ref.isInsideOfTable,
|
|
22
23
|
isinsideMultiBodiedExtension = _ref.isinsideMultiBodiedExtension,
|
|
23
24
|
allowTableResizing = _ref.allowTableResizing,
|
|
@@ -55,7 +56,7 @@ export var Table = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
55
56
|
allowTableResizing: allowTableResizing,
|
|
56
57
|
rendererAppearance: rendererAppearance
|
|
57
58
|
}),
|
|
58
|
-
isTableNested: isInsideOfBlockNode || isInsideOfTable
|
|
59
|
+
isTableNested: isInsideOfBlockNode || isInsideOfNestedRenderer || isInsideOfTable
|
|
59
60
|
}) && expValEquals('platform_editor_table_fit_to_content_auto_convert', 'isEnabled', true);
|
|
60
61
|
return /*#__PURE__*/React.createElement("table", _extends({}, fg('platform_renderer_isPresentational') && {
|
|
61
62
|
role: isPresentational ? 'presentation' : undefined
|
|
@@ -31,6 +31,7 @@ import { StickyTable, tableStickyPadding, OverflowParent } from './table/sticky'
|
|
|
31
31
|
import { Table } from './table/table';
|
|
32
32
|
import { isCommentAppearance, isFullPageAppearance, isFullWidthAppearance, isFullWidthOrFullPageAppearance, isMaxWidthAppearance } from '../utils/appearance';
|
|
33
33
|
import { TableStickyScrollbar } from './TableStickyScrollbar';
|
|
34
|
+
import { useRendererContext } from '../../renderer-context';
|
|
34
35
|
import { TableProcessorWithContainerStyles, RefSyncBlockFakeBorders } from './tableNew';
|
|
35
36
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
36
37
|
import { isTableInContentMode } from '@atlaskit/editor-common/table';
|
|
@@ -408,6 +409,7 @@ export var TableContainer = /*#__PURE__*/function (_React$Component) {
|
|
|
408
409
|
tableNode = _this$props.tableNode,
|
|
409
410
|
rendererAppearance = _this$props.rendererAppearance,
|
|
410
411
|
isInsideOfBlockNode = _this$props.isInsideOfBlockNode,
|
|
412
|
+
isInsideOfNestedRenderer = _this$props.isInsideOfNestedRenderer,
|
|
411
413
|
isInsideOfTable = _this$props.isInsideOfTable,
|
|
412
414
|
isinsideMultiBodiedExtension = _this$props.isinsideMultiBodiedExtension,
|
|
413
415
|
allowTableAlignment = _this$props.allowTableAlignment,
|
|
@@ -521,7 +523,7 @@ export var TableContainer = /*#__PURE__*/function (_React$Component) {
|
|
|
521
523
|
allowTableResizing: allowTableResizing,
|
|
522
524
|
rendererAppearance: rendererAppearance
|
|
523
525
|
}),
|
|
524
|
-
isTableNested: isInsideOfBlockNode || isInsideOfTable
|
|
526
|
+
isTableNested: isInsideOfBlockNode || isInsideOfNestedRenderer || isInsideOfTable
|
|
525
527
|
}) && expValEquals('platform_editor_table_fit_to_content_auto_convert', 'isEnabled', true);
|
|
526
528
|
var style;
|
|
527
529
|
if (fixTableSSRResizing) {
|
|
@@ -584,6 +586,7 @@ export var TableContainer = /*#__PURE__*/function (_React$Component) {
|
|
|
584
586
|
tableNode: tableNode,
|
|
585
587
|
rendererAppearance: rendererAppearance,
|
|
586
588
|
isInsideOfBlockNode: isInsideOfBlockNode,
|
|
589
|
+
isInsideOfNestedRenderer: isInsideOfNestedRenderer,
|
|
587
590
|
isInsideOfTable: isInsideOfTable,
|
|
588
591
|
isinsideMultiBodiedExtension: isinsideMultiBodiedExtension,
|
|
589
592
|
allowTableResizing: allowTableResizing,
|
|
@@ -717,6 +720,9 @@ var TableWithShadows = overflowShadow(TableProcessor, {
|
|
|
717
720
|
useShadowObserver: true
|
|
718
721
|
});
|
|
719
722
|
var TableWithWidth = function TableWithWidth(props) {
|
|
723
|
+
var _useRendererContext = useRendererContext(),
|
|
724
|
+
isTopLevelRenderer = _useRendererContext.isTopLevelRenderer;
|
|
725
|
+
var isInsideOfNestedRenderer = isTopLevelRenderer === false && expValEquals('platform_editor_table_nested_content_mode_fix', 'isEnabled', true);
|
|
720
726
|
if (fg('platform-ssr-table-resize')) {
|
|
721
727
|
var _props$columnWidths;
|
|
722
728
|
var colWidthsSum =
|
|
@@ -725,14 +731,19 @@ var TableWithWidth = function TableWithWidth(props) {
|
|
|
725
731
|
return total + val;
|
|
726
732
|
}, 0)) || 0;
|
|
727
733
|
if (colWidthsSum || props.allowTableResizing) {
|
|
734
|
+
return /*#__PURE__*/React.createElement(TableWithShadowsAndContainerStyles
|
|
728
735
|
// Ignored via go/ees005
|
|
729
736
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
730
|
-
|
|
737
|
+
, _extends({}, props, {
|
|
738
|
+
isInsideOfNestedRenderer: isInsideOfNestedRenderer
|
|
739
|
+
}));
|
|
731
740
|
}
|
|
732
741
|
return /*#__PURE__*/React.createElement(TableProcessorWithContainerStyles
|
|
733
742
|
// Ignored via go/ees005
|
|
734
743
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
735
|
-
, props
|
|
744
|
+
, _extends({}, props, {
|
|
745
|
+
isInsideOfNestedRenderer: isInsideOfNestedRenderer
|
|
746
|
+
}));
|
|
736
747
|
} else {
|
|
737
748
|
return /*#__PURE__*/React.createElement(WidthConsumer, null, function (_ref3) {
|
|
738
749
|
var _props$columnWidths2;
|
|
@@ -744,18 +755,22 @@ var TableWithWidth = function TableWithWidth(props) {
|
|
|
744
755
|
return total + val;
|
|
745
756
|
}, 0)) || 0;
|
|
746
757
|
if (colWidthsSum || props.allowTableResizing) {
|
|
747
|
-
// Ignored via go/ees005
|
|
748
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
749
758
|
return /*#__PURE__*/React.createElement(TableWithShadows, _extends({
|
|
750
759
|
renderWidth: renderWidth
|
|
751
|
-
|
|
760
|
+
// Ignored via go/ees005
|
|
761
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
762
|
+
}, props, {
|
|
763
|
+
isInsideOfNestedRenderer: isInsideOfNestedRenderer
|
|
764
|
+
}));
|
|
752
765
|
}
|
|
753
766
|
// 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
|
|
754
767
|
return /*#__PURE__*/React.createElement(TableProcessor, _extends({
|
|
755
768
|
renderWidth: renderWidth
|
|
756
769
|
// Ignored via go/ees005
|
|
757
770
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
758
|
-
}, props
|
|
771
|
+
}, props, {
|
|
772
|
+
isInsideOfNestedRenderer: isInsideOfNestedRenderer
|
|
773
|
+
}));
|
|
759
774
|
});
|
|
760
775
|
}
|
|
761
776
|
};
|
|
@@ -609,6 +609,7 @@ export var TableContainer = /*#__PURE__*/function (_React$Component) {
|
|
|
609
609
|
tableNode = _this$props.tableNode,
|
|
610
610
|
rendererAppearance = _this$props.rendererAppearance,
|
|
611
611
|
isInsideOfBlockNode = _this$props.isInsideOfBlockNode,
|
|
612
|
+
isInsideOfNestedRenderer = _this$props.isInsideOfNestedRenderer,
|
|
612
613
|
isInsideOfTable = _this$props.isInsideOfTable,
|
|
613
614
|
isinsideMultiBodiedExtension = _this$props.isinsideMultiBodiedExtension,
|
|
614
615
|
allowTableAlignment = _this$props.allowTableAlignment,
|
|
@@ -698,7 +699,7 @@ export var TableContainer = /*#__PURE__*/function (_React$Component) {
|
|
|
698
699
|
allowTableResizing: allowTableResizing,
|
|
699
700
|
rendererAppearance: rendererAppearance
|
|
700
701
|
}),
|
|
701
|
-
isTableNested: isInsideOfBlockNode || isInsideOfTable
|
|
702
|
+
isTableNested: isInsideOfBlockNode || isInsideOfNestedRenderer || isInsideOfTable
|
|
702
703
|
}) && expValEquals('platform_editor_table_fit_to_content_auto_convert', 'isEnabled', true);
|
|
703
704
|
var style = _objectSpread(_objectSpread({}, isContentModeTable && {
|
|
704
705
|
'--renderer-table-max-width': renderWidthCSS
|
|
@@ -766,6 +767,7 @@ export var TableContainer = /*#__PURE__*/function (_React$Component) {
|
|
|
766
767
|
tableNode: tableNode,
|
|
767
768
|
rendererAppearance: rendererAppearance,
|
|
768
769
|
isInsideOfBlockNode: isInsideOfBlockNode,
|
|
770
|
+
isInsideOfNestedRenderer: isInsideOfNestedRenderer,
|
|
769
771
|
isInsideOfTable: isInsideOfTable,
|
|
770
772
|
isinsideMultiBodiedExtension: isinsideMultiBodiedExtension,
|
|
771
773
|
allowTableResizing: allowTableResizing,
|
|
@@ -995,6 +997,7 @@ export var TableProcessorWithContainerStyles = /*#__PURE__*/function (_React$Com
|
|
|
995
997
|
handleRef = _this$props2.handleRef,
|
|
996
998
|
isinsideMultiBodiedExtension = _this$props2.isinsideMultiBodiedExtension,
|
|
997
999
|
isInsideOfBlockNode = _this$props2.isInsideOfBlockNode,
|
|
1000
|
+
isInsideOfNestedRenderer = _this$props2.isInsideOfNestedRenderer,
|
|
998
1001
|
isInsideOfTable = _this$props2.isInsideOfTable,
|
|
999
1002
|
isNumberColumnEnabled = _this$props2.isNumberColumnEnabled,
|
|
1000
1003
|
isPresentational = _this$props2.isPresentational,
|
|
@@ -1024,6 +1027,7 @@ export var TableProcessorWithContainerStyles = /*#__PURE__*/function (_React$Com
|
|
|
1024
1027
|
handleRef: handleRef,
|
|
1025
1028
|
isinsideMultiBodiedExtension: isinsideMultiBodiedExtension,
|
|
1026
1029
|
isInsideOfBlockNode: isInsideOfBlockNode,
|
|
1030
|
+
isInsideOfNestedRenderer: isInsideOfNestedRenderer,
|
|
1027
1031
|
isInsideOfTable: isInsideOfTable,
|
|
1028
1032
|
isNumberColumnEnabled: isNumberColumnEnabled,
|
|
1029
1033
|
isPresentational: isPresentational,
|
|
@@ -64,7 +64,7 @@ export var DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
64
64
|
var TABLE_INFO_TIMEOUT = 10000;
|
|
65
65
|
var RENDER_EVENT_SAMPLE_RATE = 0.1;
|
|
66
66
|
var packageName = "@atlaskit/renderer";
|
|
67
|
-
var packageVersion = "133.17.
|
|
67
|
+
var packageVersion = "133.17.1";
|
|
68
68
|
var setAsQueryContainerStyles = css({
|
|
69
69
|
containerName: 'ak-renderer-wrapper',
|
|
70
70
|
containerType: 'inline-size'
|
|
@@ -6,5 +6,5 @@ type TableProps = SharedTableProps & {
|
|
|
6
6
|
innerRef?: React.RefObject<HTMLTableElement>;
|
|
7
7
|
isPresentational?: boolean;
|
|
8
8
|
};
|
|
9
|
-
export declare const Table: React.MemoExoticComponent<({ innerRef, isNumberColumnEnabled, columnWidths, layout, renderWidth, children, tableNode, rendererAppearance, isInsideOfBlockNode, isInsideOfTable, isinsideMultiBodiedExtension, allowTableResizing, isPresentational, fixTableSSRResizing, allowFixedColumnWidthOption, }: TableProps) => React.JSX.Element>;
|
|
9
|
+
export declare const Table: React.MemoExoticComponent<({ innerRef, isNumberColumnEnabled, columnWidths, layout, renderWidth, children, tableNode, rendererAppearance, isInsideOfBlockNode, isInsideOfNestedRenderer, isInsideOfTable, isinsideMultiBodiedExtension, allowTableResizing, isPresentational, fixTableSSRResizing, allowFixedColumnWidthOption, }: TableProps) => React.JSX.Element>;
|
|
10
10
|
export {};
|
|
@@ -7,6 +7,7 @@ export type SharedTableProps = {
|
|
|
7
7
|
columnWidths?: Array<number>;
|
|
8
8
|
isinsideMultiBodiedExtension?: boolean;
|
|
9
9
|
isInsideOfBlockNode?: boolean;
|
|
10
|
+
isInsideOfNestedRenderer?: boolean;
|
|
10
11
|
isInsideOfTable?: boolean;
|
|
11
12
|
isNumberColumnEnabled: boolean;
|
|
12
13
|
layout: TableLayout;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/renderer",
|
|
3
|
-
"version": "133.17.
|
|
3
|
+
"version": "133.17.2",
|
|
4
4
|
"description": "Renderer component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"@atlaskit/status": "^5.8.0",
|
|
69
69
|
"@atlaskit/task-decision": "^21.8.0",
|
|
70
70
|
"@atlaskit/theme": "^26.1.0",
|
|
71
|
-
"@atlaskit/tmp-editor-statsig": "^135.
|
|
71
|
+
"@atlaskit/tmp-editor-statsig": "^135.5.0",
|
|
72
72
|
"@atlaskit/tokens": "^16.3.0",
|
|
73
73
|
"@atlaskit/tooltip": "^23.2.0",
|
|
74
74
|
"@atlaskit/visually-hidden": "^4.2.0",
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"uuid": "^3.1.0"
|
|
84
84
|
},
|
|
85
85
|
"peerDependencies": {
|
|
86
|
-
"@atlaskit/editor-common": "^116.
|
|
86
|
+
"@atlaskit/editor-common": "^116.44.0",
|
|
87
87
|
"@atlaskit/link-provider": "^5.2.0",
|
|
88
88
|
"@atlaskit/media-core": "^38.0.0",
|
|
89
89
|
"react": "^18.2.0",
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
"@atlaskit/media-core": "^38.0.0",
|
|
102
102
|
"@atlaskit/media-integration-test-helpers": "workspace:^",
|
|
103
103
|
"@atlaskit/media-test-helpers": "^42.2.0",
|
|
104
|
-
"@atlaskit/mention": "^27.
|
|
104
|
+
"@atlaskit/mention": "^27.12.0",
|
|
105
105
|
"@atlaskit/modal-dialog": "^16.2.0",
|
|
106
106
|
"@atlaskit/navigation-system": "^10.9.0",
|
|
107
107
|
"@atlaskit/profilecard": "^26.14.0",
|