@atlaskit/renderer 130.5.0 → 130.5.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 +9 -0
- package/dist/cjs/react/nodes/tableCell.js +28 -8
- package/dist/cjs/react/nodes/tableNew.js +134 -13
- package/dist/cjs/ui/Renderer/RendererStyleContainer.js +45 -2
- package/dist/cjs/ui/Renderer/index.js +1 -1
- package/dist/es2019/react/nodes/tableCell.js +28 -8
- package/dist/es2019/react/nodes/tableNew.js +133 -13
- package/dist/es2019/ui/Renderer/RendererStyleContainer.js +54 -2
- package/dist/es2019/ui/Renderer/index.js +1 -1
- package/dist/esm/react/nodes/tableCell.js +28 -8
- package/dist/esm/react/nodes/tableNew.js +134 -13
- package/dist/esm/ui/Renderer/RendererStyleContainer.js +45 -2
- package/dist/esm/ui/Renderer/index.js +1 -1
- package/dist/types/react/nodes/tableCell.d.ts +7 -1
- package/dist/types/react/nodes/tableNew.d.ts +8 -7
- package/dist/types-ts4.5/react/nodes/tableCell.d.ts +7 -1
- package/dist/types-ts4.5/react/nodes/tableNew.d.ts +8 -7
- package/package.json +8 -8
|
@@ -182,7 +182,10 @@ const headingAnchorStylesDuplicateAnchor = css({
|
|
|
182
182
|
'> button': {
|
|
183
183
|
opacity: 0,
|
|
184
184
|
transform: 'translate(-8px, 0px)',
|
|
185
|
-
|
|
185
|
+
transitionProperty: 'opacity, transform',
|
|
186
|
+
transitionDuration: `${"var(--ds-duration-medium, 0.2s)"}, ${"var(--ds-duration-medium, 0.2s)"}`,
|
|
187
|
+
transitionTimingFunction: `${"var(--ds-easing-out-practical, ease)"}, ${"var(--ds-easing-out-practical, ease)"}`,
|
|
188
|
+
transitionDelay: '0s, 0s'
|
|
186
189
|
}
|
|
187
190
|
},
|
|
188
191
|
'&:hover': {
|
|
@@ -1883,6 +1886,47 @@ const tableSharedStyle = css({
|
|
|
1883
1886
|
}
|
|
1884
1887
|
}
|
|
1885
1888
|
});
|
|
1889
|
+
const roundedTableOuterBorderOverlayStyles = css({
|
|
1890
|
+
[`.${TableSharedCssClassName.TABLE_CONTAINER} > table,
|
|
1891
|
+
.${TableSharedCssClassName.TABLE_NODE_WRAPPER} > table,
|
|
1892
|
+
.${TableSharedCssClassName.TABLE_STICKY_WRAPPER} > table`]: {
|
|
1893
|
+
borderColor: 'transparent',
|
|
1894
|
+
position: 'relative',
|
|
1895
|
+
'&::after': {
|
|
1896
|
+
content: "''",
|
|
1897
|
+
position: 'absolute',
|
|
1898
|
+
inset: 0,
|
|
1899
|
+
border: `${tableCellBorderWidth}px solid ${"var(--ds-background-accent-gray-subtler, #DDDEE1)"}`,
|
|
1900
|
+
borderRadius: "var(--ds-radius-medium, 6px)",
|
|
1901
|
+
pointerEvents: 'none',
|
|
1902
|
+
zIndex: 1
|
|
1903
|
+
},
|
|
1904
|
+
'> tbody > tr:first-of-type > th, > tbody > tr:first-of-type > td, > tbody > tr > th[data-reaches-top], > tbody > tr > td[data-reaches-top]': {
|
|
1905
|
+
borderTopColor: 'transparent'
|
|
1906
|
+
},
|
|
1907
|
+
'> tbody > tr > th:first-child, > tbody > tr > td:first-child, > tbody > tr > th[data-reaches-left], > tbody > tr > td[data-reaches-left]': {
|
|
1908
|
+
borderLeftColor: 'transparent'
|
|
1909
|
+
},
|
|
1910
|
+
'> tbody > tr > th[data-reaches-right], > tbody > tr > td[data-reaches-right]': {
|
|
1911
|
+
borderRightColor: 'transparent'
|
|
1912
|
+
},
|
|
1913
|
+
'> tbody > tr > th[data-reaches-bottom], > tbody > tr > td[data-reaches-bottom]': {
|
|
1914
|
+
borderBottomColor: 'transparent'
|
|
1915
|
+
},
|
|
1916
|
+
'> tbody > tr > th[data-reaches-top][data-reaches-left], > tbody > tr > td[data-reaches-top][data-reaches-left]': {
|
|
1917
|
+
borderTopLeftRadius: "var(--ds-radius-medium, 6px)"
|
|
1918
|
+
},
|
|
1919
|
+
'> tbody > tr > th[data-reaches-top][data-reaches-right], > tbody > tr > td[data-reaches-top][data-reaches-right]': {
|
|
1920
|
+
borderTopRightRadius: "var(--ds-radius-medium, 6px)"
|
|
1921
|
+
},
|
|
1922
|
+
'> tbody > tr > th[data-reaches-bottom][data-reaches-left], > tbody > tr > td[data-reaches-bottom][data-reaches-left]': {
|
|
1923
|
+
borderBottomLeftRadius: "var(--ds-radius-medium, 6px)"
|
|
1924
|
+
},
|
|
1925
|
+
'> tbody > tr > th[data-reaches-bottom][data-reaches-right], > tbody > tr > td[data-reaches-bottom][data-reaches-right]': {
|
|
1926
|
+
borderBottomRightRadius: "var(--ds-radius-medium, 6px)"
|
|
1927
|
+
}
|
|
1928
|
+
}
|
|
1929
|
+
});
|
|
1886
1930
|
const tableContentModeStyles = css({
|
|
1887
1931
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
1888
1932
|
[`.${RendererCssClassName.DOCUMENT} .${TableSharedCssClassName.TABLE_CONTAINER}:has(table[data-initial-width-mode="content"])`]: {
|
|
@@ -2690,6 +2734,14 @@ const tableFakeBorderStyles = css({
|
|
|
2690
2734
|
borderRightColor: 'transparent'
|
|
2691
2735
|
}
|
|
2692
2736
|
});
|
|
2737
|
+
const roundedTableFakeBorderOverlayStyles = css({
|
|
2738
|
+
[`.${TableSharedCssClassName.TABLE_CONTAINER}`]: {
|
|
2739
|
+
[`.${TableSharedCssClassName.TABLE_RIGHT_BORDER},
|
|
2740
|
+
.${TableSharedCssClassName.TABLE_LEFT_BORDER}`]: {
|
|
2741
|
+
display: 'none'
|
|
2742
|
+
}
|
|
2743
|
+
}
|
|
2744
|
+
});
|
|
2693
2745
|
const syncBlockStyles = css({
|
|
2694
2746
|
[`.${SyncBlockSharedCssClassName.renderer}, .${BodiedSyncBlockSharedCssClassName.renderer}, .${SyncBlockSharedCssClassName.error}, .${SyncBlockSharedCssClassName.loading}`]: {
|
|
2695
2747
|
borderRadius: "var(--ds-radius-small, 3px)",
|
|
@@ -2767,7 +2819,7 @@ export const RendererStyleContainer = props => {
|
|
|
2767
2819
|
// this should be placed after baseOtherStyles
|
|
2768
2820
|
expValEquals('platform_editor_render_bodied_extension_as_inline', 'isEnabled', true) && (expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? extensionAsInlineStyle : oldExtensionAsInlineStyle), inlineExtensionRendererMarginFix, allowNestedHeaderLinks && (expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? alignedHeadingAnchorStyle : alignedHeadingAnchorStyleDuplicateAnchor), mediaSingleSharedStyle,
|
|
2769
2821
|
// merge firstWrappedMediaStyles with mediaSingleSharedStyle when clean up platform_editor_fix_media_in_renderer
|
|
2770
|
-
fg('platform_editor_fix_media_in_renderer') && firstWrappedMediaStyles, tableSharedStyle, expValEquals('platform_editor_table_fit_to_content_auto_convert', 'isEnabled', true) && tableContentModeStyles, tableRendererHeaderStylesForTableCellOnly, fg('platform_editor_bordered_panel_nested_in_table') && tableRendererNestedPanelStyles, isBackgroundClipBrowserFixNeeded() && tableStylesBackGroundClipForGeckoForTableCellOnly, fg('platform_editor_nested_dnd_styles_changes') ? firstNodeWithNotMarginTopWithNestedDnD : firstNodeWithNotMarginTop, rendererTableStyles, isStickyScrollbarEnabled(appearance) && stickyScrollbarStyles, rendererTableHeaderEqualHeightStylesForTableCellOnly, allowColumnSorting && rendererTableSortableColumnStyles, allowColumnSorting && allowNestedHeaderLinks && (expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinks : rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinksDuplicateAnchor), rendererTableColumnStyles, stickyHeaderStyles, codeBlockAndLayoutStyles, columnLayoutSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveRendererStyles, isAdvancedLayoutsOn && layoutSectionForAdvancedLayoutsStyles, !useBlockRenderForCodeBlock && gridRenderForCodeBlockStyles, browser.safari && codeBlockInListSafariFixStyles, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && responsiveBreakoutWidth, appearance === 'full-page' && isPreviewPanelResponsivenessOn && responsiveBreakoutWidthWithReducedPadding, (appearance === 'full-width' || appearance === 'max' && (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true))) && responsiveBreakoutWidthFullWidth, expValEquals('platform_editor_lovability_emoji_scaling', 'isEnabled', true) ? expValEquals('platform_editor_emojis_in_renderer_smart_links', 'isEnabled', true) ? isCompactModeEnabled ? scaledDenseEmojiStylesNew : scaledEmojiStylesNew : isCompactModeEnabled ? scaledDenseEmojiStyles : scaledEmojiStyles : isCompactModeEnabled ? denseStyles : undefined, editorExperiment('platform_synced_block', true) && syncBlockStyles, centerWrapperStyles, editorExperiment('platform_synced_block', true) && isInsideSyncBlock && fg('platform_synced_block_patch_9') ? syncBlockRendererStyles : null, isInsideSyncBlock && editorExperiment('platform_synced_block', true) && fg('platform_synced_block_patch_9') && tableFakeBorderStyles, expValEquals('platform_editor_hide_extension_renderer_support', 'isEnabled', true) && hideExtensionStyles],
|
|
2822
|
+
fg('platform_editor_fix_media_in_renderer') && firstWrappedMediaStyles, tableSharedStyle, expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) && roundedTableOuterBorderOverlayStyles, expValEquals('platform_editor_table_fit_to_content_auto_convert', 'isEnabled', true) && tableContentModeStyles, tableRendererHeaderStylesForTableCellOnly, fg('platform_editor_bordered_panel_nested_in_table') && tableRendererNestedPanelStyles, isBackgroundClipBrowserFixNeeded() && tableStylesBackGroundClipForGeckoForTableCellOnly, fg('platform_editor_nested_dnd_styles_changes') ? firstNodeWithNotMarginTopWithNestedDnD : firstNodeWithNotMarginTop, rendererTableStyles, isStickyScrollbarEnabled(appearance) && stickyScrollbarStyles, rendererTableHeaderEqualHeightStylesForTableCellOnly, allowColumnSorting && rendererTableSortableColumnStyles, allowColumnSorting && allowNestedHeaderLinks && (expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinks : rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinksDuplicateAnchor), rendererTableColumnStyles, stickyHeaderStyles, codeBlockAndLayoutStyles, columnLayoutSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveRendererStyles, isAdvancedLayoutsOn && layoutSectionForAdvancedLayoutsStyles, !useBlockRenderForCodeBlock && gridRenderForCodeBlockStyles, browser.safari && codeBlockInListSafariFixStyles, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && responsiveBreakoutWidth, appearance === 'full-page' && isPreviewPanelResponsivenessOn && responsiveBreakoutWidthWithReducedPadding, (appearance === 'full-width' || appearance === 'max' && (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true))) && responsiveBreakoutWidthFullWidth, expValEquals('platform_editor_lovability_emoji_scaling', 'isEnabled', true) ? expValEquals('platform_editor_emojis_in_renderer_smart_links', 'isEnabled', true) ? isCompactModeEnabled ? scaledDenseEmojiStylesNew : scaledEmojiStylesNew : isCompactModeEnabled ? scaledDenseEmojiStyles : scaledEmojiStyles : isCompactModeEnabled ? denseStyles : undefined, editorExperiment('platform_synced_block', true) && syncBlockStyles, centerWrapperStyles, editorExperiment('platform_synced_block', true) && isInsideSyncBlock && fg('platform_synced_block_patch_9') ? syncBlockRendererStyles : null, isInsideSyncBlock && editorExperiment('platform_synced_block', true) && fg('platform_synced_block_patch_9') && tableFakeBorderStyles, isInsideSyncBlock && editorExperiment('platform_synced_block', true) && fg('platform_synced_block_patch_9') ? expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? roundedTableFakeBorderOverlayStyles : null : null, expValEquals('platform_editor_hide_extension_renderer_support', 'isEnabled', true) && hideExtensionStyles],
|
|
2771
2823
|
"data-testid": testId
|
|
2772
2824
|
}, children);
|
|
2773
2825
|
};
|
|
@@ -57,7 +57,7 @@ export const DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
57
57
|
const TABLE_INFO_TIMEOUT = 10000;
|
|
58
58
|
const RENDER_EVENT_SAMPLE_RATE = 0.2;
|
|
59
59
|
const packageName = "@atlaskit/renderer";
|
|
60
|
-
const packageVersion = "
|
|
60
|
+
const packageVersion = "0.0.0-development";
|
|
61
61
|
const setAsQueryContainerStyles = css({
|
|
62
62
|
containerName: 'ak-renderer-wrapper',
|
|
63
63
|
containerType: 'inline-size'
|
|
@@ -10,6 +10,7 @@ import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/anal
|
|
|
10
10
|
import { RendererCssClassName } from '../../consts';
|
|
11
11
|
import { useIntl } from 'react-intl';
|
|
12
12
|
import { tableCellMessages } from '../../messages';
|
|
13
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
13
14
|
var IgnoreSorting = ['LABEL', 'INPUT'];
|
|
14
15
|
var nextStatusOrder = function nextStatusOrder(currentSortOrder) {
|
|
15
16
|
switch (currentSortOrder) {
|
|
@@ -37,16 +38,26 @@ var getSortOrderLabel = function getSortOrderLabel(intl, currentSortOrder) {
|
|
|
37
38
|
return intl.formatMessage(noneSortingLabel);
|
|
38
39
|
}
|
|
39
40
|
};
|
|
40
|
-
|
|
41
|
-
// Ignored via go/ees005
|
|
42
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
43
|
-
var getDataAttributes = function getDataAttributes(colwidth, background) {
|
|
44
|
-
// Ignored via go/ees005
|
|
45
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
41
|
+
var getDataAttributes = function getDataAttributes(colwidth, background, cellEdgeProps) {
|
|
46
42
|
var attrs = {};
|
|
47
43
|
if (colwidth) {
|
|
48
44
|
attrs['data-colwidth'] = colwidth.join(',');
|
|
49
45
|
}
|
|
46
|
+
if (expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true)) {
|
|
47
|
+
if (cellEdgeProps !== null && cellEdgeProps !== void 0 && cellEdgeProps.reachesTop) {
|
|
48
|
+
attrs['data-reaches-top'] = true;
|
|
49
|
+
}
|
|
50
|
+
if (cellEdgeProps !== null && cellEdgeProps !== void 0 && cellEdgeProps.reachesBottom) {
|
|
51
|
+
attrs['data-reaches-bottom'] = true;
|
|
52
|
+
}
|
|
53
|
+
if (cellEdgeProps !== null && cellEdgeProps !== void 0 && cellEdgeProps.reachesLeft) {
|
|
54
|
+
attrs['data-reaches-left'] = true;
|
|
55
|
+
}
|
|
56
|
+
if (cellEdgeProps !== null && cellEdgeProps !== void 0 && cellEdgeProps.reachesRight) {
|
|
57
|
+
attrs['data-reaches-right'] = true;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
50
61
|
/**
|
|
51
62
|
* Storing hex code in data-cell-background because
|
|
52
63
|
* we want to have DST token (css variable) or
|
|
@@ -140,7 +151,11 @@ var getWithCellProps = function getWithCellProps(WrapperComponent) {
|
|
|
140
151
|
colspan = props.colspan,
|
|
141
152
|
background = props.background,
|
|
142
153
|
offsetTop = props.offsetTop,
|
|
143
|
-
ariaSort = props.ariaSort
|
|
154
|
+
ariaSort = props.ariaSort,
|
|
155
|
+
reachesTop = props.reachesTop,
|
|
156
|
+
reachesBottom = props.reachesBottom,
|
|
157
|
+
reachesLeft = props.reachesLeft,
|
|
158
|
+
reachesRight = props.reachesRight;
|
|
144
159
|
|
|
145
160
|
// This is used to set the background color of the cell
|
|
146
161
|
// to a dark mode color in mobile dark mode
|
|
@@ -167,7 +182,12 @@ var getWithCellProps = function getWithCellProps(WrapperComponent) {
|
|
|
167
182
|
className: className
|
|
168
183
|
// Ignored via go/ees005
|
|
169
184
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
170
|
-
}, getDataAttributes(colwidth, background
|
|
185
|
+
}, getDataAttributes(colwidth, background, {
|
|
186
|
+
reachesTop: reachesTop,
|
|
187
|
+
reachesBottom: reachesBottom,
|
|
188
|
+
reachesLeft: reachesLeft,
|
|
189
|
+
reachesRight: reachesRight
|
|
190
|
+
}), {
|
|
171
191
|
"aria-sort": ariaSort
|
|
172
192
|
}), children);
|
|
173
193
|
};
|
|
@@ -319,6 +319,7 @@ export var TableContainer = /*#__PURE__*/function (_React$Component) {
|
|
|
319
319
|
key: "componentDidMount",
|
|
320
320
|
value:
|
|
321
321
|
/**
|
|
322
|
+
* Starts observing table dimensions and wires sticky header/scrollbar behavior after mount.
|
|
322
323
|
*
|
|
323
324
|
* @example
|
|
324
325
|
*/
|
|
@@ -343,6 +344,7 @@ export var TableContainer = /*#__PURE__*/function (_React$Component) {
|
|
|
343
344
|
}
|
|
344
345
|
|
|
345
346
|
/**
|
|
347
|
+
* Updates sticky header wiring and scroll synchronization after prop or state changes.
|
|
346
348
|
*
|
|
347
349
|
* @param prevProps
|
|
348
350
|
* @param prevState
|
|
@@ -376,7 +378,7 @@ export var TableContainer = /*#__PURE__*/function (_React$Component) {
|
|
|
376
378
|
key: "pinTop",
|
|
377
379
|
get:
|
|
378
380
|
/**
|
|
379
|
-
*
|
|
381
|
+
* Calculates the top offset used when the sticky header is pinned to the table bottom.
|
|
380
382
|
*/
|
|
381
383
|
function get() {
|
|
382
384
|
if (!this.tableRef.current || !this.stickyHeaderRef.current) {
|
|
@@ -386,7 +388,7 @@ export var TableContainer = /*#__PURE__*/function (_React$Component) {
|
|
|
386
388
|
}
|
|
387
389
|
|
|
388
390
|
/**
|
|
389
|
-
*
|
|
391
|
+
* Determines whether sticky header positioning should include the default scroll root offset.
|
|
390
392
|
*/
|
|
391
393
|
}, {
|
|
392
394
|
key: "shouldAddOverflowParentOffsetTop_DO_NOT_USE",
|
|
@@ -399,7 +401,7 @@ export var TableContainer = /*#__PURE__*/function (_React$Component) {
|
|
|
399
401
|
}
|
|
400
402
|
|
|
401
403
|
/**
|
|
402
|
-
*
|
|
404
|
+
* Resolves the top position for the sticky header based on the current sticky mode.
|
|
403
405
|
*/
|
|
404
406
|
}, {
|
|
405
407
|
key: "stickyTop",
|
|
@@ -421,6 +423,7 @@ export var TableContainer = /*#__PURE__*/function (_React$Component) {
|
|
|
421
423
|
}
|
|
422
424
|
|
|
423
425
|
/**
|
|
426
|
+
* Renders the table container, sticky header, table content, sticky scrollbar, and synced block borders.
|
|
424
427
|
*
|
|
425
428
|
* @example
|
|
426
429
|
*/
|
|
@@ -611,14 +614,91 @@ export var TableContainer = /*#__PURE__*/function (_React$Component) {
|
|
|
611
614
|
}
|
|
612
615
|
}]);
|
|
613
616
|
}(React.Component);
|
|
617
|
+
var getCellEdgePropsByCellOffset = function getCellEdgePropsByCellOffset(tableNode) {
|
|
618
|
+
var cellEdgePropsByCellOffset = new Map();
|
|
619
|
+
var cellRightByCellOffset = new Map();
|
|
620
|
+
var occupiedGrid = [];
|
|
621
|
+
var tableWidth = 0;
|
|
622
|
+
var cellOffset = 0;
|
|
623
|
+
tableNode.forEach(function (rowNode, _rowOffset, rowIndex) {
|
|
624
|
+
var _occupiedGrid$rowInde;
|
|
625
|
+
occupiedGrid[rowIndex] = (_occupiedGrid$rowInde = occupiedGrid[rowIndex]) !== null && _occupiedGrid$rowInde !== void 0 ? _occupiedGrid$rowInde : [];
|
|
626
|
+
var columnIndex = 0;
|
|
627
|
+
cellOffset += 1;
|
|
628
|
+
rowNode.forEach(function (cellNode) {
|
|
629
|
+
while (occupiedGrid[rowIndex][columnIndex]) {
|
|
630
|
+
columnIndex += 1;
|
|
631
|
+
}
|
|
632
|
+
var colspan = cellNode.attrs.colspan || 1;
|
|
633
|
+
var rowspan = cellNode.attrs.rowspan || 1;
|
|
634
|
+
var cellLeft = columnIndex;
|
|
635
|
+
var cellRight = cellLeft + colspan;
|
|
636
|
+
var cellTop = rowIndex;
|
|
637
|
+
var cellBottom = cellTop + rowspan;
|
|
638
|
+
for (var row = cellTop; row < cellBottom; row += 1) {
|
|
639
|
+
var _occupiedGrid$row;
|
|
640
|
+
occupiedGrid[row] = (_occupiedGrid$row = occupiedGrid[row]) !== null && _occupiedGrid$row !== void 0 ? _occupiedGrid$row : [];
|
|
641
|
+
for (var column = cellLeft; column < cellRight; column += 1) {
|
|
642
|
+
occupiedGrid[row][column] = true;
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
tableWidth = Math.max(tableWidth, cellRight);
|
|
646
|
+
cellRightByCellOffset.set(cellOffset, cellRight);
|
|
647
|
+
cellEdgePropsByCellOffset.set(cellOffset, {
|
|
648
|
+
reachesBottom: cellBottom >= tableNode.childCount,
|
|
649
|
+
reachesLeft: cellLeft === 0,
|
|
650
|
+
reachesRight: false,
|
|
651
|
+
reachesTop: cellTop === 0
|
|
652
|
+
});
|
|
653
|
+
columnIndex = cellRight;
|
|
654
|
+
cellOffset += cellNode.nodeSize;
|
|
655
|
+
});
|
|
656
|
+
cellOffset += 1;
|
|
657
|
+
});
|
|
658
|
+
cellRightByCellOffset.forEach(function (cellRight, currentCellOffset) {
|
|
659
|
+
var edgeProps = cellEdgePropsByCellOffset.get(currentCellOffset);
|
|
660
|
+
if (edgeProps) {
|
|
661
|
+
edgeProps.reachesRight = cellRight >= tableWidth;
|
|
662
|
+
}
|
|
663
|
+
});
|
|
664
|
+
return cellEdgePropsByCellOffset;
|
|
665
|
+
};
|
|
666
|
+
var addTableCellEdgeProps = function addTableCellEdgeProps(rows, tableNode) {
|
|
667
|
+
try {
|
|
668
|
+
if (!tableNode) {
|
|
669
|
+
return rows;
|
|
670
|
+
}
|
|
671
|
+
var cellEdgePropsByCellOffset = getCellEdgePropsByCellOffset(tableNode);
|
|
672
|
+
var cellOffset = 0;
|
|
673
|
+
return React.Children.map(rows, function (row, rowIndex) {
|
|
674
|
+
var rowNode = tableNode.child(rowIndex);
|
|
675
|
+
cellOffset += 1;
|
|
676
|
+
var cellIndex = 0;
|
|
677
|
+
var rowChildren = React.Children.map(row.props.children, function (child) {
|
|
678
|
+
if (! /*#__PURE__*/React.isValidElement(child)) {
|
|
679
|
+
return child;
|
|
680
|
+
}
|
|
681
|
+
var cellNode = rowNode.child(cellIndex);
|
|
682
|
+
var edgeProps = cellEdgePropsByCellOffset.get(cellOffset);
|
|
683
|
+
cellIndex += 1;
|
|
684
|
+
cellOffset += cellNode.nodeSize;
|
|
685
|
+
return edgeProps ? /*#__PURE__*/React.cloneElement(child, edgeProps) : child;
|
|
686
|
+
});
|
|
687
|
+
cellOffset += 1;
|
|
688
|
+
return /*#__PURE__*/React.cloneElement(row, undefined, rowChildren);
|
|
689
|
+
});
|
|
690
|
+
} catch (_unused) {
|
|
691
|
+
// Renderer can receive malformed historical ADF. If the table shape cannot
|
|
692
|
+
// be described safely, keep rendering without rounded edge metadata.
|
|
693
|
+
return rows;
|
|
694
|
+
}
|
|
695
|
+
};
|
|
696
|
+
|
|
614
697
|
/**
|
|
615
|
-
*
|
|
698
|
+
* Processes table children before passing them to the styled table container.
|
|
616
699
|
*/
|
|
617
700
|
// Ignored via go/ees005
|
|
618
701
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
619
|
-
/**
|
|
620
|
-
*
|
|
621
|
-
*/
|
|
622
702
|
export var TableProcessorWithContainerStyles = /*#__PURE__*/function (_React$Component2) {
|
|
623
703
|
function TableProcessorWithContainerStyles() {
|
|
624
704
|
var _this2;
|
|
@@ -669,22 +749,63 @@ export var TableProcessorWithContainerStyles = /*#__PURE__*/function (_React$Com
|
|
|
669
749
|
key: "render",
|
|
670
750
|
value:
|
|
671
751
|
/**
|
|
752
|
+
* Renders processed table children inside the table container.
|
|
672
753
|
*
|
|
673
754
|
* @example
|
|
674
755
|
*/
|
|
675
756
|
function render() {
|
|
676
|
-
var
|
|
757
|
+
var _this$props2 = this.props,
|
|
758
|
+
allowColumnSorting = _this$props2.allowColumnSorting,
|
|
759
|
+
allowFixedColumnWidthOption = _this$props2.allowFixedColumnWidthOption,
|
|
760
|
+
allowTableAlignment = _this$props2.allowTableAlignment,
|
|
761
|
+
allowTableResizing = _this$props2.allowTableResizing,
|
|
762
|
+
children = _this$props2.children,
|
|
763
|
+
columnWidths = _this$props2.columnWidths,
|
|
764
|
+
disableTableOverflowShadow = _this$props2.disableTableOverflowShadow,
|
|
765
|
+
handleRef = _this$props2.handleRef,
|
|
766
|
+
isinsideMultiBodiedExtension = _this$props2.isinsideMultiBodiedExtension,
|
|
767
|
+
isInsideOfBlockNode = _this$props2.isInsideOfBlockNode,
|
|
768
|
+
isInsideOfTable = _this$props2.isInsideOfTable,
|
|
769
|
+
isNumberColumnEnabled = _this$props2.isNumberColumnEnabled,
|
|
770
|
+
isPresentational = _this$props2.isPresentational,
|
|
771
|
+
layout = _this$props2.layout,
|
|
772
|
+
rendererAppearance = _this$props2.rendererAppearance,
|
|
773
|
+
renderWidth = _this$props2.renderWidth,
|
|
774
|
+
shadowClassNames = _this$props2.shadowClassNames,
|
|
775
|
+
smartCardStorage = _this$props2.smartCardStorage,
|
|
776
|
+
stickyHeaders = _this$props2.stickyHeaders,
|
|
777
|
+
tabIndex = _this$props2.tabIndex,
|
|
778
|
+
tableNode = _this$props2.tableNode;
|
|
677
779
|
if (!children) {
|
|
678
780
|
return null;
|
|
679
781
|
}
|
|
680
782
|
var childrenArray = React.Children.toArray(children);
|
|
783
|
+
var childrenWithTableEdgeProps = expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? addTableCellEdgeProps(childrenArray, tableNode) : childrenArray;
|
|
681
784
|
var orderedChildren = compose(this.addNumberColumnIndexes, this.addSortableColumn
|
|
682
785
|
// @ts-expect-error TS2345: Argument of type '(ReactChild | ReactFragment | ReactPortal)[]' is not assignable to parameter of type 'ReactElement<any, string | JSXElementConstructor<any>>[]'
|
|
683
|
-
)(
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
786
|
+
)(childrenWithTableEdgeProps);
|
|
787
|
+
return /*#__PURE__*/React.createElement(TableContainer, {
|
|
788
|
+
allowColumnSorting: allowColumnSorting,
|
|
789
|
+
allowFixedColumnWidthOption: allowFixedColumnWidthOption,
|
|
790
|
+
allowTableAlignment: allowTableAlignment,
|
|
791
|
+
allowTableResizing: allowTableResizing,
|
|
792
|
+
columnWidths: columnWidths,
|
|
793
|
+
disableTableOverflowShadow: disableTableOverflowShadow,
|
|
794
|
+
handleRef: handleRef,
|
|
795
|
+
isinsideMultiBodiedExtension: isinsideMultiBodiedExtension,
|
|
796
|
+
isInsideOfBlockNode: isInsideOfBlockNode,
|
|
797
|
+
isInsideOfTable: isInsideOfTable,
|
|
798
|
+
isNumberColumnEnabled: isNumberColumnEnabled,
|
|
799
|
+
isPresentational: isPresentational,
|
|
800
|
+
layout: layout,
|
|
801
|
+
rendererAppearance: rendererAppearance,
|
|
802
|
+
renderWidth: renderWidth,
|
|
803
|
+
shadowClassNames: shadowClassNames,
|
|
804
|
+
smartCardStorage: smartCardStorage,
|
|
805
|
+
stickyHeaders: stickyHeaders,
|
|
806
|
+
tabIndex: tabIndex,
|
|
807
|
+
tableNode: tableNode
|
|
808
|
+
}, orderedChildren);
|
|
688
809
|
}
|
|
689
810
|
}]);
|
|
690
811
|
}(React.Component);
|
|
@@ -140,7 +140,10 @@ var headingAnchorStylesDuplicateAnchor = css({
|
|
|
140
140
|
'> button': {
|
|
141
141
|
opacity: 0,
|
|
142
142
|
transform: 'translate(-8px, 0px)',
|
|
143
|
-
|
|
143
|
+
transitionProperty: 'opacity, transform',
|
|
144
|
+
transitionDuration: "var(--ds-duration-medium, 0.2s)".concat(", ", "var(--ds-duration-medium, 0.2s)"),
|
|
145
|
+
transitionTimingFunction: "var(--ds-easing-out-practical, ease)".concat(", ", "var(--ds-easing-out-practical, ease)"),
|
|
146
|
+
transitionDelay: '0s, 0s'
|
|
144
147
|
}
|
|
145
148
|
}), '&:hover', _defineProperty({}, ".".concat(HeadingAnchorWrapperClassName, " > button"), {
|
|
146
149
|
opacity: 1,
|
|
@@ -1498,6 +1501,43 @@ var tableSharedStyle = css(_defineProperty(_defineProperty(_defineProperty(_defi
|
|
|
1498
1501
|
}))
|
|
1499
1502
|
}
|
|
1500
1503
|
}));
|
|
1504
|
+
var roundedTableOuterBorderOverlayStyles = css(_defineProperty({}, ".".concat(TableSharedCssClassName.TABLE_CONTAINER, " > table,\n\t.").concat(TableSharedCssClassName.TABLE_NODE_WRAPPER, " > table,\n\t.").concat(TableSharedCssClassName.TABLE_STICKY_WRAPPER, " > table"), {
|
|
1505
|
+
borderColor: 'transparent',
|
|
1506
|
+
position: 'relative',
|
|
1507
|
+
'&::after': {
|
|
1508
|
+
content: "''",
|
|
1509
|
+
position: 'absolute',
|
|
1510
|
+
inset: 0,
|
|
1511
|
+
border: "".concat(tableCellBorderWidth, "px solid ", "var(--ds-background-accent-gray-subtler, #DDDEE1)"),
|
|
1512
|
+
borderRadius: "var(--ds-radius-medium, 6px)",
|
|
1513
|
+
pointerEvents: 'none',
|
|
1514
|
+
zIndex: 1
|
|
1515
|
+
},
|
|
1516
|
+
'> tbody > tr:first-of-type > th, > tbody > tr:first-of-type > td, > tbody > tr > th[data-reaches-top], > tbody > tr > td[data-reaches-top]': {
|
|
1517
|
+
borderTopColor: 'transparent'
|
|
1518
|
+
},
|
|
1519
|
+
'> tbody > tr > th:first-child, > tbody > tr > td:first-child, > tbody > tr > th[data-reaches-left], > tbody > tr > td[data-reaches-left]': {
|
|
1520
|
+
borderLeftColor: 'transparent'
|
|
1521
|
+
},
|
|
1522
|
+
'> tbody > tr > th[data-reaches-right], > tbody > tr > td[data-reaches-right]': {
|
|
1523
|
+
borderRightColor: 'transparent'
|
|
1524
|
+
},
|
|
1525
|
+
'> tbody > tr > th[data-reaches-bottom], > tbody > tr > td[data-reaches-bottom]': {
|
|
1526
|
+
borderBottomColor: 'transparent'
|
|
1527
|
+
},
|
|
1528
|
+
'> tbody > tr > th[data-reaches-top][data-reaches-left], > tbody > tr > td[data-reaches-top][data-reaches-left]': {
|
|
1529
|
+
borderTopLeftRadius: "var(--ds-radius-medium, 6px)"
|
|
1530
|
+
},
|
|
1531
|
+
'> tbody > tr > th[data-reaches-top][data-reaches-right], > tbody > tr > td[data-reaches-top][data-reaches-right]': {
|
|
1532
|
+
borderTopRightRadius: "var(--ds-radius-medium, 6px)"
|
|
1533
|
+
},
|
|
1534
|
+
'> tbody > tr > th[data-reaches-bottom][data-reaches-left], > tbody > tr > td[data-reaches-bottom][data-reaches-left]': {
|
|
1535
|
+
borderBottomLeftRadius: "var(--ds-radius-medium, 6px)"
|
|
1536
|
+
},
|
|
1537
|
+
'> tbody > tr > th[data-reaches-bottom][data-reaches-right], > tbody > tr > td[data-reaches-bottom][data-reaches-right]': {
|
|
1538
|
+
borderBottomRightRadius: "var(--ds-radius-medium, 6px)"
|
|
1539
|
+
}
|
|
1540
|
+
}));
|
|
1501
1541
|
var tableContentModeStyles = css(_defineProperty(_defineProperty({}, ".".concat(RendererCssClassName.DOCUMENT, " .").concat(TableSharedCssClassName.TABLE_CONTAINER, ":has(table[data-initial-width-mode=\"content\"])"), {
|
|
1502
1542
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
1503
1543
|
width: 'max-content !important',
|
|
@@ -2103,6 +2143,9 @@ var tableFakeBorderStyles = css(_defineProperty(_defineProperty({}, ".".concat(T
|
|
|
2103
2143
|
borderLeftColor: 'transparent',
|
|
2104
2144
|
borderRightColor: 'transparent'
|
|
2105
2145
|
}));
|
|
2146
|
+
var roundedTableFakeBorderOverlayStyles = css(_defineProperty({}, ".".concat(TableSharedCssClassName.TABLE_CONTAINER), _defineProperty({}, ".".concat(TableSharedCssClassName.TABLE_RIGHT_BORDER, ",\n\t\t.").concat(TableSharedCssClassName.TABLE_LEFT_BORDER), {
|
|
2147
|
+
display: 'none'
|
|
2148
|
+
})));
|
|
2106
2149
|
var syncBlockStyles = css(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, ".".concat(SyncBlockSharedCssClassName.renderer, ", .").concat(BodiedSyncBlockSharedCssClassName.renderer, ", .").concat(SyncBlockSharedCssClassName.error, ", .").concat(SyncBlockSharedCssClassName.loading), {
|
|
2107
2150
|
borderRadius: "var(--ds-radius-small, 3px)",
|
|
2108
2151
|
marginTop: "var(--ds-space-075, 6px)",
|
|
@@ -2170,7 +2213,7 @@ export var RendererStyleContainer = function RendererStyleContainer(props) {
|
|
|
2170
2213
|
// this should be placed after baseOtherStyles
|
|
2171
2214
|
expValEquals('platform_editor_render_bodied_extension_as_inline', 'isEnabled', true) && (expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? extensionAsInlineStyle : oldExtensionAsInlineStyle), inlineExtensionRendererMarginFix, allowNestedHeaderLinks && (expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? alignedHeadingAnchorStyle : alignedHeadingAnchorStyleDuplicateAnchor), mediaSingleSharedStyle,
|
|
2172
2215
|
// merge firstWrappedMediaStyles with mediaSingleSharedStyle when clean up platform_editor_fix_media_in_renderer
|
|
2173
|
-
fg('platform_editor_fix_media_in_renderer') && firstWrappedMediaStyles, tableSharedStyle, expValEquals('platform_editor_table_fit_to_content_auto_convert', 'isEnabled', true) && tableContentModeStyles, tableRendererHeaderStylesForTableCellOnly, fg('platform_editor_bordered_panel_nested_in_table') && tableRendererNestedPanelStyles, isBackgroundClipBrowserFixNeeded() && tableStylesBackGroundClipForGeckoForTableCellOnly, fg('platform_editor_nested_dnd_styles_changes') ? firstNodeWithNotMarginTopWithNestedDnD : firstNodeWithNotMarginTop, rendererTableStyles, isStickyScrollbarEnabled(appearance) && stickyScrollbarStyles, rendererTableHeaderEqualHeightStylesForTableCellOnly, allowColumnSorting && rendererTableSortableColumnStyles, allowColumnSorting && allowNestedHeaderLinks && (expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinks : rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinksDuplicateAnchor), rendererTableColumnStyles, stickyHeaderStyles, codeBlockAndLayoutStyles, columnLayoutSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveRendererStyles, isAdvancedLayoutsOn && layoutSectionForAdvancedLayoutsStyles, !useBlockRenderForCodeBlock && gridRenderForCodeBlockStyles, browser.safari && codeBlockInListSafariFixStyles, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && responsiveBreakoutWidth, appearance === 'full-page' && isPreviewPanelResponsivenessOn && responsiveBreakoutWidthWithReducedPadding, (appearance === 'full-width' || appearance === 'max' && (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true))) && responsiveBreakoutWidthFullWidth, expValEquals('platform_editor_lovability_emoji_scaling', 'isEnabled', true) ? expValEquals('platform_editor_emojis_in_renderer_smart_links', 'isEnabled', true) ? isCompactModeEnabled ? scaledDenseEmojiStylesNew : scaledEmojiStylesNew : isCompactModeEnabled ? scaledDenseEmojiStyles : scaledEmojiStyles : isCompactModeEnabled ? denseStyles : undefined, editorExperiment('platform_synced_block', true) && syncBlockStyles, centerWrapperStyles, editorExperiment('platform_synced_block', true) && isInsideSyncBlock && fg('platform_synced_block_patch_9') ? syncBlockRendererStyles : null, isInsideSyncBlock && editorExperiment('platform_synced_block', true) && fg('platform_synced_block_patch_9') && tableFakeBorderStyles, expValEquals('platform_editor_hide_extension_renderer_support', 'isEnabled', true) && hideExtensionStyles],
|
|
2216
|
+
fg('platform_editor_fix_media_in_renderer') && firstWrappedMediaStyles, tableSharedStyle, expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) && roundedTableOuterBorderOverlayStyles, expValEquals('platform_editor_table_fit_to_content_auto_convert', 'isEnabled', true) && tableContentModeStyles, tableRendererHeaderStylesForTableCellOnly, fg('platform_editor_bordered_panel_nested_in_table') && tableRendererNestedPanelStyles, isBackgroundClipBrowserFixNeeded() && tableStylesBackGroundClipForGeckoForTableCellOnly, fg('platform_editor_nested_dnd_styles_changes') ? firstNodeWithNotMarginTopWithNestedDnD : firstNodeWithNotMarginTop, rendererTableStyles, isStickyScrollbarEnabled(appearance) && stickyScrollbarStyles, rendererTableHeaderEqualHeightStylesForTableCellOnly, allowColumnSorting && rendererTableSortableColumnStyles, allowColumnSorting && allowNestedHeaderLinks && (expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinks : rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinksDuplicateAnchor), rendererTableColumnStyles, stickyHeaderStyles, codeBlockAndLayoutStyles, columnLayoutSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveRendererStyles, isAdvancedLayoutsOn && layoutSectionForAdvancedLayoutsStyles, !useBlockRenderForCodeBlock && gridRenderForCodeBlockStyles, browser.safari && codeBlockInListSafariFixStyles, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && responsiveBreakoutWidth, appearance === 'full-page' && isPreviewPanelResponsivenessOn && responsiveBreakoutWidthWithReducedPadding, (appearance === 'full-width' || appearance === 'max' && (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true))) && responsiveBreakoutWidthFullWidth, expValEquals('platform_editor_lovability_emoji_scaling', 'isEnabled', true) ? expValEquals('platform_editor_emojis_in_renderer_smart_links', 'isEnabled', true) ? isCompactModeEnabled ? scaledDenseEmojiStylesNew : scaledEmojiStylesNew : isCompactModeEnabled ? scaledDenseEmojiStyles : scaledEmojiStyles : isCompactModeEnabled ? denseStyles : undefined, editorExperiment('platform_synced_block', true) && syncBlockStyles, centerWrapperStyles, editorExperiment('platform_synced_block', true) && isInsideSyncBlock && fg('platform_synced_block_patch_9') ? syncBlockRendererStyles : null, isInsideSyncBlock && editorExperiment('platform_synced_block', true) && fg('platform_synced_block_patch_9') && tableFakeBorderStyles, isInsideSyncBlock && editorExperiment('platform_synced_block', true) && fg('platform_synced_block_patch_9') ? expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? roundedTableFakeBorderOverlayStyles : null : null, expValEquals('platform_editor_hide_extension_renderer_support', 'isEnabled', true) && hideExtensionStyles],
|
|
2174
2217
|
"data-testid": testId
|
|
2175
2218
|
}, children);
|
|
2176
2219
|
};
|
|
@@ -62,7 +62,7 @@ export var DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
62
62
|
var TABLE_INFO_TIMEOUT = 10000;
|
|
63
63
|
var RENDER_EVENT_SAMPLE_RATE = 0.2;
|
|
64
64
|
var packageName = "@atlaskit/renderer";
|
|
65
|
-
var packageVersion = "
|
|
65
|
+
var packageVersion = "0.0.0-development";
|
|
66
66
|
var setAsQueryContainerStyles = css({
|
|
67
67
|
containerName: 'ak-renderer-wrapper',
|
|
68
68
|
containerType: 'inline-size'
|
|
@@ -2,7 +2,13 @@ import React from 'react';
|
|
|
2
2
|
import type { CellAttributes } from '@atlaskit/adf-schema';
|
|
3
3
|
import { SortOrder } from '@atlaskit/editor-common/types';
|
|
4
4
|
import type { AnalyticsEventPayload } from '../../analytics/events';
|
|
5
|
-
type
|
|
5
|
+
export type TableCellEdgeProps = {
|
|
6
|
+
reachesBottom?: boolean;
|
|
7
|
+
reachesLeft?: boolean;
|
|
8
|
+
reachesRight?: boolean;
|
|
9
|
+
reachesTop?: boolean;
|
|
10
|
+
};
|
|
11
|
+
type CellProps = CellAttributes & TableCellEdgeProps & {
|
|
6
12
|
ariaSort?: string;
|
|
7
13
|
children?: React.ReactNode;
|
|
8
14
|
className?: string;
|
|
@@ -70,11 +70,13 @@ export declare class TableContainer extends React.Component<TableProps & Overflo
|
|
|
70
70
|
private resizeObserver;
|
|
71
71
|
private applyResizerChange;
|
|
72
72
|
/**
|
|
73
|
+
* Starts observing table dimensions and wires sticky header/scrollbar behavior after mount.
|
|
73
74
|
*
|
|
74
75
|
* @example
|
|
75
76
|
*/
|
|
76
77
|
componentDidMount(): void;
|
|
77
78
|
/**
|
|
79
|
+
* Updates sticky header wiring and scroll synchronization after prop or state changes.
|
|
78
80
|
*
|
|
79
81
|
* @param prevProps
|
|
80
82
|
* @param prevState
|
|
@@ -87,18 +89,19 @@ export declare class TableContainer extends React.Component<TableProps & Overflo
|
|
|
87
89
|
onScroll: () => void;
|
|
88
90
|
onWrapperScrolled: () => void;
|
|
89
91
|
/**
|
|
90
|
-
*
|
|
92
|
+
* Calculates the top offset used when the sticky header is pinned to the table bottom.
|
|
91
93
|
*/
|
|
92
94
|
get pinTop(): number | undefined;
|
|
93
95
|
/**
|
|
94
|
-
*
|
|
96
|
+
* Determines whether sticky header positioning should include the default scroll root offset.
|
|
95
97
|
*/
|
|
96
98
|
get shouldAddOverflowParentOffsetTop_DO_NOT_USE(): boolean | null | undefined;
|
|
97
99
|
/**
|
|
98
|
-
*
|
|
100
|
+
* Resolves the top position for the sticky header based on the current sticky mode.
|
|
99
101
|
*/
|
|
100
102
|
get stickyTop(): number | undefined;
|
|
101
103
|
/**
|
|
104
|
+
* Renders the table container, sticky header, table content, sticky scrollbar, and synced block borders.
|
|
102
105
|
*
|
|
103
106
|
* @example
|
|
104
107
|
*/
|
|
@@ -109,16 +112,14 @@ type TableProcessorState = {
|
|
|
109
112
|
tableOrderStatus?: TableOrderStatus;
|
|
110
113
|
};
|
|
111
114
|
/**
|
|
112
|
-
*
|
|
113
|
-
*/
|
|
114
|
-
/**
|
|
115
|
-
*
|
|
115
|
+
* Processes table children before passing them to the styled table container.
|
|
116
116
|
*/
|
|
117
117
|
export declare class TableProcessorWithContainerStyles extends React.Component<TableProps & OverflowShadowProps & WithSmartCardStorageProps, TableProcessorState> {
|
|
118
118
|
state: {
|
|
119
119
|
tableOrderStatus: undefined;
|
|
120
120
|
};
|
|
121
121
|
/**
|
|
122
|
+
* Renders processed table children inside the table container.
|
|
122
123
|
*
|
|
123
124
|
* @example
|
|
124
125
|
*/
|
|
@@ -2,7 +2,13 @@ import React from 'react';
|
|
|
2
2
|
import type { CellAttributes } from '@atlaskit/adf-schema';
|
|
3
3
|
import { SortOrder } from '@atlaskit/editor-common/types';
|
|
4
4
|
import type { AnalyticsEventPayload } from '../../analytics/events';
|
|
5
|
-
type
|
|
5
|
+
export type TableCellEdgeProps = {
|
|
6
|
+
reachesBottom?: boolean;
|
|
7
|
+
reachesLeft?: boolean;
|
|
8
|
+
reachesRight?: boolean;
|
|
9
|
+
reachesTop?: boolean;
|
|
10
|
+
};
|
|
11
|
+
type CellProps = CellAttributes & TableCellEdgeProps & {
|
|
6
12
|
ariaSort?: string;
|
|
7
13
|
children?: React.ReactNode;
|
|
8
14
|
className?: string;
|
|
@@ -70,11 +70,13 @@ export declare class TableContainer extends React.Component<TableProps & Overflo
|
|
|
70
70
|
private resizeObserver;
|
|
71
71
|
private applyResizerChange;
|
|
72
72
|
/**
|
|
73
|
+
* Starts observing table dimensions and wires sticky header/scrollbar behavior after mount.
|
|
73
74
|
*
|
|
74
75
|
* @example
|
|
75
76
|
*/
|
|
76
77
|
componentDidMount(): void;
|
|
77
78
|
/**
|
|
79
|
+
* Updates sticky header wiring and scroll synchronization after prop or state changes.
|
|
78
80
|
*
|
|
79
81
|
* @param prevProps
|
|
80
82
|
* @param prevState
|
|
@@ -87,18 +89,19 @@ export declare class TableContainer extends React.Component<TableProps & Overflo
|
|
|
87
89
|
onScroll: () => void;
|
|
88
90
|
onWrapperScrolled: () => void;
|
|
89
91
|
/**
|
|
90
|
-
*
|
|
92
|
+
* Calculates the top offset used when the sticky header is pinned to the table bottom.
|
|
91
93
|
*/
|
|
92
94
|
get pinTop(): number | undefined;
|
|
93
95
|
/**
|
|
94
|
-
*
|
|
96
|
+
* Determines whether sticky header positioning should include the default scroll root offset.
|
|
95
97
|
*/
|
|
96
98
|
get shouldAddOverflowParentOffsetTop_DO_NOT_USE(): boolean | null | undefined;
|
|
97
99
|
/**
|
|
98
|
-
*
|
|
100
|
+
* Resolves the top position for the sticky header based on the current sticky mode.
|
|
99
101
|
*/
|
|
100
102
|
get stickyTop(): number | undefined;
|
|
101
103
|
/**
|
|
104
|
+
* Renders the table container, sticky header, table content, sticky scrollbar, and synced block borders.
|
|
102
105
|
*
|
|
103
106
|
* @example
|
|
104
107
|
*/
|
|
@@ -109,16 +112,14 @@ type TableProcessorState = {
|
|
|
109
112
|
tableOrderStatus?: TableOrderStatus;
|
|
110
113
|
};
|
|
111
114
|
/**
|
|
112
|
-
*
|
|
113
|
-
*/
|
|
114
|
-
/**
|
|
115
|
-
*
|
|
115
|
+
* Processes table children before passing them to the styled table container.
|
|
116
116
|
*/
|
|
117
117
|
export declare class TableProcessorWithContainerStyles extends React.Component<TableProps & OverflowShadowProps & WithSmartCardStorageProps, TableProcessorState> {
|
|
118
118
|
state: {
|
|
119
119
|
tableOrderStatus: undefined;
|
|
120
120
|
};
|
|
121
121
|
/**
|
|
122
|
+
* Renders processed table children inside the table container.
|
|
122
123
|
*
|
|
123
124
|
* @example
|
|
124
125
|
*/
|