@atlaskit/renderer 137.1.9 → 137.1.10
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/colgroup.js +1 -2
- package/dist/cjs/react/nodes/table/sticky.js +2 -4
- package/dist/cjs/react/nodes/table/table.js +1 -12
- package/dist/cjs/react/nodes/table.js +471 -203
- package/dist/cjs/ui/Renderer/breakout-ssr.js +1 -2
- package/dist/cjs/ui/Renderer/index.js +3 -3
- package/dist/es2019/react/nodes/table/colgroup.js +1 -2
- package/dist/es2019/react/nodes/table/sticky.js +2 -3
- package/dist/es2019/react/nodes/table/table.js +1 -12
- package/dist/es2019/react/nodes/table.js +457 -190
- package/dist/es2019/ui/Renderer/breakout-ssr.js +1 -2
- package/dist/es2019/ui/Renderer/index.js +3 -3
- package/dist/esm/react/nodes/table/colgroup.js +1 -2
- package/dist/esm/react/nodes/table/sticky.js +2 -4
- package/dist/esm/react/nodes/table/table.js +1 -12
- package/dist/esm/react/nodes/table.js +471 -202
- package/dist/esm/ui/Renderer/breakout-ssr.js +1 -2
- package/dist/esm/ui/Renderer/index.js +3 -3
- package/dist/types/react/nodes/table/sticky.d.ts +1 -2
- package/dist/types/react/nodes/table.d.ts +78 -8
- package/package.json +4 -7
- package/dist/cjs/react/nodes/tableNew.js +0 -1020
- package/dist/es2019/react/nodes/tableNew.js +0 -956
- package/dist/esm/react/nodes/tableNew.js +0 -1014
- package/dist/types/react/nodes/tableNew.d.ts +0 -189
|
@@ -27,7 +27,7 @@ export function BreakoutSSRInlineScript(_ref) {
|
|
|
27
27
|
}
|
|
28
28
|
var id = Math.floor(Math.random() * (9999999999 - 9999 + 1)) + 9999;
|
|
29
29
|
var shouldSkipScript = {
|
|
30
|
-
table:
|
|
30
|
+
table: true
|
|
31
31
|
};
|
|
32
32
|
return /*#__PURE__*/React.createElement("script", {
|
|
33
33
|
"data-breakout-script-id": id
|
|
@@ -86,7 +86,6 @@ function applyBreakoutAfterSSR(id, breakoutConsts, shouldSkipBreakoutScript, fla
|
|
|
86
86
|
return;
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
// Remove with feature gate 'platform-ssr-table-resize'
|
|
90
89
|
// Ignored via go/ees005
|
|
91
90
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
92
91
|
if (item.target.classList.contains('ak-renderer-document')) {
|
|
@@ -65,7 +65,7 @@ export var DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
65
65
|
var TABLE_INFO_TIMEOUT = 10000;
|
|
66
66
|
var RENDER_EVENT_SAMPLE_RATE = 0.1;
|
|
67
67
|
var packageName = "@atlaskit/renderer";
|
|
68
|
-
var packageVersion = "137.1.
|
|
68
|
+
var packageVersion = "137.1.9";
|
|
69
69
|
var setAsQueryContainerStyles = css({
|
|
70
70
|
containerName: 'ak-renderer-wrapper',
|
|
71
71
|
containerType: 'inline-size'
|
|
@@ -775,7 +775,7 @@ var RendererWrapper = /*#__PURE__*/React.memo(function (props) {
|
|
|
775
775
|
//
|
|
776
776
|
|
|
777
777
|
// allowRendererContainerStyles is not needed for comment container styling as container should always be set for comments
|
|
778
|
-
if (appearance === 'comment' && isTopLevelRenderer
|
|
778
|
+
if (appearance === 'comment' && isTopLevelRenderer) {
|
|
779
779
|
return jsx("div", {
|
|
780
780
|
css: setAsQueryContainerStyles
|
|
781
781
|
}, renderer);
|
|
@@ -788,7 +788,7 @@ var RendererWrapper = /*#__PURE__*/React.memo(function (props) {
|
|
|
788
788
|
return (appearance === 'full-page' || appearance === 'full-width' || (expValEqualsNoExposure('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true)) && appearance === 'max') &&
|
|
789
789
|
// In case of having excerpt-include on page there are multiple renderers nested.
|
|
790
790
|
// Make sure only the root renderer is set to be query container.
|
|
791
|
-
isTopLevelRenderer && allowRendererContainerStyles
|
|
791
|
+
isTopLevelRenderer && allowRendererContainerStyles ? jsx("div", {
|
|
792
792
|
css: setAsQueryContainerStyles
|
|
793
793
|
}, renderer) : renderer;
|
|
794
794
|
});
|
|
@@ -15,7 +15,6 @@ type StickyTableProps = {
|
|
|
15
15
|
allowTableResizing?: boolean;
|
|
16
16
|
children: React.ReactNode[];
|
|
17
17
|
columnWidths?: number[];
|
|
18
|
-
fixTableSSRResizing?: boolean;
|
|
19
18
|
innerRef: React.RefObject<HTMLDivElement>;
|
|
20
19
|
isNumberColumnEnabled: boolean;
|
|
21
20
|
layout: TableLayout;
|
|
@@ -29,7 +28,7 @@ type StickyTableProps = {
|
|
|
29
28
|
top?: number;
|
|
30
29
|
wrapperWidth: number;
|
|
31
30
|
} & OverflowShadowProps;
|
|
32
|
-
export declare const StickyTable: ({ top, left, mode, shadowClassNames, innerRef, wrapperWidth, tableWidth, isNumberColumnEnabled, layout, children, columnWidths, renderWidth, rowHeight, tableNode, rendererAppearance, allowTableResizing,
|
|
31
|
+
export declare const StickyTable: ({ top, left, mode, shadowClassNames, innerRef, wrapperWidth, tableWidth, isNumberColumnEnabled, layout, children, columnWidths, renderWidth, rowHeight, tableNode, rendererAppearance, allowTableResizing, allowFixedColumnWidthOption, }: StickyTableProps) => jsx.JSX.Element;
|
|
33
32
|
/**
|
|
34
33
|
*
|
|
35
34
|
*/
|
|
@@ -26,7 +26,6 @@ export type TableProps = SharedTableProps & {
|
|
|
26
26
|
allowTableAlignment?: boolean;
|
|
27
27
|
allowTableResizing?: boolean;
|
|
28
28
|
children: React.ReactElement<any> | Array<React.ReactElement<any>>;
|
|
29
|
-
disableTableOverflowShadow?: boolean;
|
|
30
29
|
isPresentational?: boolean;
|
|
31
30
|
rendererAppearance?: RendererAppearance;
|
|
32
31
|
stickyHeaders?: StickyHeaderConfig;
|
|
@@ -42,8 +41,17 @@ export interface TableState {
|
|
|
42
41
|
headerRowHeight: number;
|
|
43
42
|
stickyMode: StickyMode;
|
|
44
43
|
wrapperWidth: number;
|
|
45
|
-
}
|
|
46
|
-
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Reads `nestedRendererType` from RendererContext and renders the fake left/right
|
|
47
|
+
* borders only when the current renderer is the nested renderer for a reference
|
|
48
|
+
* synced block.
|
|
49
|
+
*/
|
|
50
|
+
export declare const RefSyncBlockFakeBorders: ({ isNumberColumnEnabled, }: {
|
|
51
|
+
isNumberColumnEnabled: boolean;
|
|
52
|
+
}) => React.JSX.Element | null;
|
|
53
|
+
/**
|
|
54
|
+
* TableContainer renders tables using only CSS-based rules
|
|
47
55
|
*/
|
|
48
56
|
export declare class TableContainer extends React.Component<TableProps & OverflowShadowProps & WithSmartCardStorageProps, TableState> {
|
|
49
57
|
state: TableState;
|
|
@@ -55,14 +63,74 @@ export declare class TableContainer extends React.Component<TableProps & Overflo
|
|
|
55
63
|
stickyScrollbar?: TableStickyScrollbar;
|
|
56
64
|
nextFrame: number | undefined;
|
|
57
65
|
overflowParent: OverflowParent | null;
|
|
66
|
+
private containerRef;
|
|
67
|
+
private _isInsideNestedRenderer;
|
|
68
|
+
private _isInsideTableCell;
|
|
69
|
+
private lastComputedStyle;
|
|
58
70
|
private resizeObserver;
|
|
59
71
|
private applyResizerChange;
|
|
60
72
|
/**
|
|
73
|
+
* Checks if this table is inside a nested renderer (e.g. Include Page macro)
|
|
74
|
+
* by looking for multiple .ak-renderer-document ancestors in the DOM.
|
|
75
|
+
* The result is cached since a table's position in the DOM tree is stable after mount.
|
|
76
|
+
*/
|
|
77
|
+
private isInsideNestedRenderer;
|
|
78
|
+
/**
|
|
79
|
+
* Checks if this table is inside a table cell in the DOM. The result is cached
|
|
80
|
+
* since a table's position in the DOM tree is stable after mount.
|
|
81
|
+
*/
|
|
82
|
+
private isInsideTableCell;
|
|
83
|
+
private isInsideTableContext;
|
|
84
|
+
/**
|
|
85
|
+
* For tables inside nested renderers (e.g. Include Page macro), the parent
|
|
86
|
+
* renderer's CSS override forces width:100%!important and left:0!important
|
|
87
|
+
* which overrides the inline styles set by this component. Using
|
|
88
|
+
* style.setProperty with 'important' priority on inline styles beats
|
|
89
|
+
* stylesheet !important rules per the CSS cascade.
|
|
90
|
+
*
|
|
91
|
+
* Tables that are nested inside another table need to remain constrained by
|
|
92
|
+
* their table-cell context. Do not promote their width to inline !important,
|
|
93
|
+
* otherwise nested tables rendered through macros such as Excerpt Include can
|
|
94
|
+
* overflow and overlap adjacent cells.
|
|
95
|
+
*
|
|
96
|
+
* Top-level tables in nested renderers still preserve their saved width, but
|
|
97
|
+
* are capped to their containing block so wide tables do not escape constrained
|
|
98
|
+
* macro bodies such as Excerpt Include panels.
|
|
99
|
+
*
|
|
100
|
+
* Uses lastComputedStyle (populated during render) rather than reading from
|
|
101
|
+
* element.style, because React may remove properties from the DOM when their
|
|
102
|
+
* values transition to undefined between renders.
|
|
103
|
+
*
|
|
104
|
+
* `platform_nested_table_style_override_2` fixes a follow-up regression where a
|
|
105
|
+
* NON-resized table inside an Excerpt macro (not Excerpt Include) on a
|
|
106
|
+
* wide/full-width page shrinks to only show its first columns in the renderer.
|
|
107
|
+
* Inside a nested renderer (a macro body) a non-resized table's computed width
|
|
108
|
+
* is a default layout cap (760px/1800px, or a `cqw` length for full-page
|
|
109
|
+
* appearances) taken from the outer renderer's width context. That value does
|
|
110
|
+
* not match the macro's own box, so promoting it to inline `!important` makes
|
|
111
|
+
* the table collapse. Such tables have no author-chosen size to preserve, so
|
|
112
|
+
* under this gate we re-assert the parent stylesheet's intent (fill the box:
|
|
113
|
+
* `width: 100%; left: 0`) with inline `!important`.
|
|
114
|
+
*
|
|
115
|
+
* Explicitly resized tables (`tableNode.attrs.width` set) are excluded and keep
|
|
116
|
+
* the original PGXT-10226 behavior: their author-chosen width/left is promoted
|
|
117
|
+
* verbatim so the Include Page macro does not stretch or indent them. The
|
|
118
|
+
* table-cell short-circuit (PGXT-10294) above also still applies.
|
|
119
|
+
*/
|
|
120
|
+
private applyNestedRendererTableFix;
|
|
121
|
+
/**
|
|
122
|
+
* Callback ref that captures the container DOM element and also forwards
|
|
123
|
+
* to the handleRef prop from the overflow shadow HOC.
|
|
124
|
+
*/
|
|
125
|
+
private setContainerRef;
|
|
126
|
+
/**
|
|
127
|
+
* Starts observing table dimensions and wires sticky header/scrollbar behavior after mount.
|
|
61
128
|
*
|
|
62
129
|
* @example
|
|
63
130
|
*/
|
|
64
131
|
componentDidMount(): void;
|
|
65
132
|
/**
|
|
133
|
+
* Updates sticky header wiring and scroll synchronization after prop or state changes.
|
|
66
134
|
*
|
|
67
135
|
* @param prevProps
|
|
68
136
|
* @param prevState
|
|
@@ -75,18 +143,19 @@ export declare class TableContainer extends React.Component<TableProps & Overflo
|
|
|
75
143
|
onScroll: () => void;
|
|
76
144
|
onWrapperScrolled: () => void;
|
|
77
145
|
/**
|
|
78
|
-
*
|
|
146
|
+
* Calculates the top offset used when the sticky header is pinned to the table bottom.
|
|
79
147
|
*/
|
|
80
148
|
get pinTop(): number | undefined;
|
|
81
149
|
/**
|
|
82
|
-
*
|
|
150
|
+
* Determines whether sticky header positioning should include the default scroll root offset.
|
|
83
151
|
*/
|
|
84
152
|
get shouldAddOverflowParentOffsetTop_DO_NOT_USE(): boolean | null | undefined;
|
|
85
153
|
/**
|
|
86
|
-
*
|
|
154
|
+
* Resolves the top position for the sticky header based on the current sticky mode.
|
|
87
155
|
*/
|
|
88
156
|
get stickyTop(): number | undefined;
|
|
89
157
|
/**
|
|
158
|
+
* Renders the table container, sticky header, table content, sticky scrollbar, and synced block borders.
|
|
90
159
|
*
|
|
91
160
|
* @example
|
|
92
161
|
*/
|
|
@@ -97,13 +166,14 @@ type TableProcessorState = {
|
|
|
97
166
|
tableOrderStatus?: TableOrderStatus;
|
|
98
167
|
};
|
|
99
168
|
/**
|
|
100
|
-
*
|
|
169
|
+
* Processes table children before passing them to the styled table container.
|
|
101
170
|
*/
|
|
102
|
-
export declare class
|
|
171
|
+
export declare class TableProcessorWithContainerStyles extends React.Component<TableProps & OverflowShadowProps & WithSmartCardStorageProps, TableProcessorState> {
|
|
103
172
|
state: {
|
|
104
173
|
tableOrderStatus: undefined;
|
|
105
174
|
};
|
|
106
175
|
/**
|
|
176
|
+
* Renders processed table children inside the table container.
|
|
107
177
|
*
|
|
108
178
|
* @example
|
|
109
179
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/renderer",
|
|
3
|
-
"version": "137.1.
|
|
3
|
+
"version": "137.1.10",
|
|
4
4
|
"description": "Renderer component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -70,8 +70,8 @@
|
|
|
70
70
|
"@atlaskit/status": "^5.8.0",
|
|
71
71
|
"@atlaskit/task-decision": "^21.8.0",
|
|
72
72
|
"@atlaskit/theme": "^28.1.0",
|
|
73
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
74
|
-
"@atlaskit/tokens": "^16.
|
|
73
|
+
"@atlaskit/tmp-editor-statsig": "^167.0.0",
|
|
74
|
+
"@atlaskit/tokens": "^16.9.0",
|
|
75
75
|
"@atlaskit/tooltip": "^24.2.0",
|
|
76
76
|
"@atlaskit/visually-hidden": "^4.3.0",
|
|
77
77
|
"@babel/runtime": "^7.0.0",
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"uuid": "^3.1.0"
|
|
86
86
|
},
|
|
87
87
|
"peerDependencies": {
|
|
88
|
-
"@atlaskit/editor-common": "^120.
|
|
88
|
+
"@atlaskit/editor-common": "^120.7.0",
|
|
89
89
|
"@atlaskit/link-provider": "^5.4.0",
|
|
90
90
|
"@atlaskit/media-core": "^38.1.0",
|
|
91
91
|
"react": "^18.2.0",
|
|
@@ -164,9 +164,6 @@
|
|
|
164
164
|
"cc_comments_log_draft_annotation_ancestor_nodes": {
|
|
165
165
|
"type": "boolean"
|
|
166
166
|
},
|
|
167
|
-
"platform-ssr-table-resize": {
|
|
168
|
-
"type": "boolean"
|
|
169
|
-
},
|
|
170
167
|
"platform_fix_nested_num_column_scaling": {
|
|
171
168
|
"type": "boolean"
|
|
172
169
|
},
|