@atlaskit/renderer 114.11.2 → 114.12.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 +26 -0
- package/afm-cc/tsconfig.json +3 -0
- package/dist/cjs/react/nodes/blockCard.js +24 -8
- package/dist/cjs/react/nodes/table/colgroup.js +5 -2
- package/dist/cjs/react/nodes/table/table.js +6 -1
- package/dist/cjs/react/nodes/table.js +51 -23
- package/dist/cjs/react/nodes/tableNew.js +550 -0
- package/dist/cjs/react/utils/EditorMediaClientProvider.js +23 -8
- package/dist/cjs/ui/Renderer/breakout-ssr.js +22 -22
- package/dist/cjs/ui/Renderer/index.js +1 -1
- package/dist/es2019/react/nodes/blockCard.js +24 -8
- package/dist/es2019/react/nodes/table/colgroup.js +5 -2
- package/dist/es2019/react/nodes/table/table.js +6 -1
- package/dist/es2019/react/nodes/table.js +50 -22
- package/dist/es2019/react/nodes/tableNew.js +501 -0
- package/dist/es2019/react/utils/EditorMediaClientProvider.js +25 -10
- package/dist/es2019/ui/Renderer/breakout-ssr.js +22 -22
- package/dist/es2019/ui/Renderer/index.js +1 -1
- package/dist/esm/react/nodes/blockCard.js +24 -8
- package/dist/esm/react/nodes/table/colgroup.js +5 -2
- package/dist/esm/react/nodes/table/table.js +6 -1
- package/dist/esm/react/nodes/table.js +51 -21
- package/dist/esm/react/nodes/tableNew.js +544 -0
- package/dist/esm/react/utils/EditorMediaClientProvider.js +25 -10
- package/dist/esm/ui/Renderer/breakout-ssr.js +22 -22
- package/dist/esm/ui/Renderer/index.js +1 -1
- package/dist/types/react/nodes/table.d.ts +35 -254
- package/dist/types/react/nodes/tableNew.d.ts +83 -0
- package/dist/types/ui/Renderer/breakout-ssr.d.ts +1 -2
- package/dist/types-ts4.5/react/nodes/table.d.ts +35 -254
- package/dist/types-ts4.5/react/nodes/tableNew.d.ts +83 -0
- package/dist/types-ts4.5/ui/Renderer/breakout-ssr.d.ts +1 -2
- package/package.json +13 -3
|
@@ -8,9 +8,19 @@ import type { StickyMode } from './table/sticky';
|
|
|
8
8
|
import { OverflowParent } from './table/sticky';
|
|
9
9
|
import type { SharedTableProps } from './table/types';
|
|
10
10
|
import { TableStickyScrollbar } from './TableStickyScrollbar';
|
|
11
|
+
export type TableArrayMapped = {
|
|
12
|
+
rowNodes: Array<PMNode | null>;
|
|
13
|
+
rowReact: React.ReactElement;
|
|
14
|
+
};
|
|
11
15
|
export declare const isTableResizingEnabled: (appearance: RendererAppearance) => boolean;
|
|
12
16
|
export declare const isStickyScrollbarEnabled: (appearance: RendererAppearance) => boolean;
|
|
13
|
-
|
|
17
|
+
export declare const orderChildren: (children: React.ReactElement[], tableNode: PMNode, smartCardStorage: WithSmartCardStorageProps['smartCardStorage'], tableOrderStatus?: TableOrderStatus) => React.ReactElement[];
|
|
18
|
+
export declare const hasRowspan: (row: PMNode) => boolean;
|
|
19
|
+
export declare const getRefTop: (refElement: HTMLElement) => number;
|
|
20
|
+
export declare const shouldHeaderStick: (scrollTop: number, tableTop: number, tableBottom: number, rowHeight: number) => boolean;
|
|
21
|
+
export declare const shouldHeaderPinBottom: (scrollTop: number, tableBottom: number, rowHeight: number) => boolean;
|
|
22
|
+
export declare const addSortableColumn: (rows: React.ReactElement<any>[], tableOrderStatus: TableOrderStatus | undefined, onSorting: (columnIndex: number, sortOrder: SortOrder) => void) => React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
|
|
23
|
+
export type TableProps = SharedTableProps & {
|
|
14
24
|
children: React.ReactElement<any> | Array<React.ReactElement<any>>;
|
|
15
25
|
tableNode?: PMNode;
|
|
16
26
|
rendererAppearance?: RendererAppearance;
|
|
@@ -20,11 +30,13 @@ type TableProps = SharedTableProps & {
|
|
|
20
30
|
allowTableResizing?: boolean;
|
|
21
31
|
isPresentational?: boolean;
|
|
22
32
|
};
|
|
23
|
-
|
|
33
|
+
export declare const isHeaderRowEnabled: (rows: (React.ReactChild | React.ReactFragment | React.ReactPortal)[]) => any;
|
|
34
|
+
export declare const tableCanBeSticky: (node: PMNode | undefined, children: (React.ReactChild | React.ReactFragment | React.ReactPortal)[]) => any;
|
|
35
|
+
export interface TableOrderStatus {
|
|
24
36
|
columnIndex: number;
|
|
25
37
|
order: SortOrder;
|
|
26
38
|
}
|
|
27
|
-
interface TableState {
|
|
39
|
+
export interface TableState {
|
|
28
40
|
stickyMode: StickyMode;
|
|
29
41
|
wrapperWidth: number;
|
|
30
42
|
headerRowHeight: number;
|
|
@@ -67,282 +79,51 @@ export declare class TableProcessor extends React.Component<TableProps & Overflo
|
|
|
67
79
|
private addNumberColumnIndexes;
|
|
68
80
|
}
|
|
69
81
|
declare const _default: {
|
|
70
|
-
new (props: import("@atlaskit/editor-common/utils").Diff<{
|
|
71
|
-
renderWidth?: number | undefined;
|
|
72
|
-
} & Omit<SharedTableProps & {
|
|
73
|
-
children: React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
|
|
74
|
-
tableNode?: PMNode | undefined;
|
|
75
|
-
rendererAppearance?: RendererAppearance;
|
|
76
|
-
allowColumnSorting?: boolean | undefined;
|
|
77
|
-
stickyHeaders?: StickyHeaderConfig | undefined;
|
|
78
|
-
allowTableAlignment?: boolean | undefined;
|
|
79
|
-
allowTableResizing?: boolean | undefined;
|
|
80
|
-
isPresentational?: boolean | undefined;
|
|
81
|
-
} & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps> | Readonly<import("@atlaskit/editor-common/utils").Diff<{
|
|
82
|
-
renderWidth?: number | undefined;
|
|
83
|
-
} & Omit<SharedTableProps & {
|
|
84
|
-
children: React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
|
|
85
|
-
tableNode?: PMNode | undefined;
|
|
86
|
-
rendererAppearance?: RendererAppearance;
|
|
87
|
-
allowColumnSorting?: boolean | undefined;
|
|
88
|
-
stickyHeaders?: StickyHeaderConfig | undefined;
|
|
89
|
-
allowTableAlignment?: boolean | undefined;
|
|
90
|
-
allowTableResizing?: boolean | undefined;
|
|
91
|
-
isPresentational?: boolean | undefined;
|
|
92
|
-
} & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>): {
|
|
82
|
+
new (props: import("@atlaskit/editor-common/utils").Diff<any, WithSmartCardStorageProps> | Readonly<import("@atlaskit/editor-common/utils").Diff<any, WithSmartCardStorageProps>>): {
|
|
93
83
|
render(): React.JSX.Element;
|
|
94
84
|
context: unknown;
|
|
95
|
-
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<import("@atlaskit/editor-common/utils").Diff<{
|
|
96
|
-
renderWidth?: number | undefined;
|
|
97
|
-
} & Omit<SharedTableProps & {
|
|
98
|
-
children: React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
|
|
99
|
-
tableNode?: PMNode | undefined;
|
|
100
|
-
rendererAppearance?: RendererAppearance;
|
|
101
|
-
allowColumnSorting?: boolean | undefined;
|
|
102
|
-
stickyHeaders?: StickyHeaderConfig | undefined;
|
|
103
|
-
allowTableAlignment?: boolean | undefined;
|
|
104
|
-
allowTableResizing?: boolean | undefined;
|
|
105
|
-
isPresentational?: boolean | undefined;
|
|
106
|
-
} & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
85
|
+
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<import("@atlaskit/editor-common/utils").Diff<any, WithSmartCardStorageProps>>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
107
86
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
108
|
-
readonly props: Readonly<import("@atlaskit/editor-common/utils").Diff<
|
|
109
|
-
renderWidth?: number | undefined;
|
|
110
|
-
} & Omit<SharedTableProps & {
|
|
111
|
-
children: React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
|
|
112
|
-
tableNode?: PMNode | undefined;
|
|
113
|
-
rendererAppearance?: RendererAppearance;
|
|
114
|
-
allowColumnSorting?: boolean | undefined;
|
|
115
|
-
stickyHeaders?: StickyHeaderConfig | undefined;
|
|
116
|
-
allowTableAlignment?: boolean | undefined;
|
|
117
|
-
allowTableResizing?: boolean | undefined;
|
|
118
|
-
isPresentational?: boolean | undefined;
|
|
119
|
-
} & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>;
|
|
87
|
+
readonly props: Readonly<import("@atlaskit/editor-common/utils").Diff<any, WithSmartCardStorageProps>>;
|
|
120
88
|
state: Readonly<{}>;
|
|
121
89
|
refs: {
|
|
122
90
|
[key: string]: React.ReactInstance;
|
|
123
91
|
};
|
|
124
92
|
componentDidMount?(): void;
|
|
125
|
-
shouldComponentUpdate?(nextProps: Readonly<import("@atlaskit/editor-common/utils").Diff<{
|
|
126
|
-
renderWidth?: number | undefined;
|
|
127
|
-
} & Omit<SharedTableProps & {
|
|
128
|
-
children: React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
|
|
129
|
-
tableNode?: PMNode | undefined;
|
|
130
|
-
rendererAppearance?: RendererAppearance;
|
|
131
|
-
allowColumnSorting?: boolean | undefined;
|
|
132
|
-
stickyHeaders?: StickyHeaderConfig | undefined;
|
|
133
|
-
allowTableAlignment?: boolean | undefined;
|
|
134
|
-
allowTableResizing?: boolean | undefined;
|
|
135
|
-
isPresentational?: boolean | undefined;
|
|
136
|
-
} & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
93
|
+
shouldComponentUpdate?(nextProps: Readonly<import("@atlaskit/editor-common/utils").Diff<any, WithSmartCardStorageProps>>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
137
94
|
componentWillUnmount?(): void;
|
|
138
95
|
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
139
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<import("@atlaskit/editor-common/utils").Diff<{
|
|
140
|
-
|
|
141
|
-
} & Omit<SharedTableProps & {
|
|
142
|
-
children: React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
|
|
143
|
-
tableNode?: PMNode | undefined;
|
|
144
|
-
rendererAppearance?: RendererAppearance;
|
|
145
|
-
allowColumnSorting?: boolean | undefined;
|
|
146
|
-
stickyHeaders?: StickyHeaderConfig | undefined;
|
|
147
|
-
allowTableAlignment?: boolean | undefined;
|
|
148
|
-
allowTableResizing?: boolean | undefined;
|
|
149
|
-
isPresentational?: boolean | undefined;
|
|
150
|
-
} & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>, prevState: Readonly<{}>): any;
|
|
151
|
-
componentDidUpdate?(prevProps: Readonly<import("@atlaskit/editor-common/utils").Diff<{
|
|
152
|
-
renderWidth?: number | undefined;
|
|
153
|
-
} & Omit<SharedTableProps & {
|
|
154
|
-
children: React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
|
|
155
|
-
tableNode?: PMNode | undefined;
|
|
156
|
-
rendererAppearance?: RendererAppearance;
|
|
157
|
-
allowColumnSorting?: boolean | undefined;
|
|
158
|
-
stickyHeaders?: StickyHeaderConfig | undefined;
|
|
159
|
-
allowTableAlignment?: boolean | undefined;
|
|
160
|
-
allowTableResizing?: boolean | undefined;
|
|
161
|
-
isPresentational?: boolean | undefined;
|
|
162
|
-
} & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
96
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<import("@atlaskit/editor-common/utils").Diff<any, WithSmartCardStorageProps>>, prevState: Readonly<{}>): any;
|
|
97
|
+
componentDidUpdate?(prevProps: Readonly<import("@atlaskit/editor-common/utils").Diff<any, WithSmartCardStorageProps>>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
163
98
|
componentWillMount?(): void;
|
|
164
99
|
UNSAFE_componentWillMount?(): void;
|
|
165
|
-
componentWillReceiveProps?(nextProps: Readonly<import("@atlaskit/editor-common/utils").Diff<
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
tableNode?: PMNode | undefined;
|
|
170
|
-
rendererAppearance?: RendererAppearance;
|
|
171
|
-
allowColumnSorting?: boolean | undefined;
|
|
172
|
-
stickyHeaders?: StickyHeaderConfig | undefined;
|
|
173
|
-
allowTableAlignment?: boolean | undefined;
|
|
174
|
-
allowTableResizing?: boolean | undefined;
|
|
175
|
-
isPresentational?: boolean | undefined;
|
|
176
|
-
} & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>, nextContext: any): void;
|
|
177
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<import("@atlaskit/editor-common/utils").Diff<{
|
|
178
|
-
renderWidth?: number | undefined;
|
|
179
|
-
} & Omit<SharedTableProps & {
|
|
180
|
-
children: React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
|
|
181
|
-
tableNode?: PMNode | undefined;
|
|
182
|
-
rendererAppearance?: RendererAppearance;
|
|
183
|
-
allowColumnSorting?: boolean | undefined;
|
|
184
|
-
stickyHeaders?: StickyHeaderConfig | undefined;
|
|
185
|
-
allowTableAlignment?: boolean | undefined;
|
|
186
|
-
allowTableResizing?: boolean | undefined;
|
|
187
|
-
isPresentational?: boolean | undefined;
|
|
188
|
-
} & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>, nextContext: any): void;
|
|
189
|
-
componentWillUpdate?(nextProps: Readonly<import("@atlaskit/editor-common/utils").Diff<{
|
|
190
|
-
renderWidth?: number | undefined;
|
|
191
|
-
} & Omit<SharedTableProps & {
|
|
192
|
-
children: React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
|
|
193
|
-
tableNode?: PMNode | undefined;
|
|
194
|
-
rendererAppearance?: RendererAppearance;
|
|
195
|
-
allowColumnSorting?: boolean | undefined;
|
|
196
|
-
stickyHeaders?: StickyHeaderConfig | undefined;
|
|
197
|
-
allowTableAlignment?: boolean | undefined;
|
|
198
|
-
allowTableResizing?: boolean | undefined;
|
|
199
|
-
isPresentational?: boolean | undefined;
|
|
200
|
-
} & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>, nextState: Readonly<{}>, nextContext: any): void;
|
|
201
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<import("@atlaskit/editor-common/utils").Diff<{
|
|
202
|
-
renderWidth?: number | undefined;
|
|
203
|
-
} & Omit<SharedTableProps & {
|
|
204
|
-
children: React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
|
|
205
|
-
tableNode?: PMNode | undefined;
|
|
206
|
-
rendererAppearance?: RendererAppearance;
|
|
207
|
-
allowColumnSorting?: boolean | undefined;
|
|
208
|
-
stickyHeaders?: StickyHeaderConfig | undefined;
|
|
209
|
-
allowTableAlignment?: boolean | undefined;
|
|
210
|
-
allowTableResizing?: boolean | undefined;
|
|
211
|
-
isPresentational?: boolean | undefined;
|
|
212
|
-
} & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>, nextState: Readonly<{}>, nextContext: any): void;
|
|
100
|
+
componentWillReceiveProps?(nextProps: Readonly<import("@atlaskit/editor-common/utils").Diff<any, WithSmartCardStorageProps>>, nextContext: any): void;
|
|
101
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<import("@atlaskit/editor-common/utils").Diff<any, WithSmartCardStorageProps>>, nextContext: any): void;
|
|
102
|
+
componentWillUpdate?(nextProps: Readonly<import("@atlaskit/editor-common/utils").Diff<any, WithSmartCardStorageProps>>, nextState: Readonly<{}>, nextContext: any): void;
|
|
103
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<import("@atlaskit/editor-common/utils").Diff<any, WithSmartCardStorageProps>>, nextState: Readonly<{}>, nextContext: any): void;
|
|
213
104
|
};
|
|
214
|
-
new (props: import("@atlaskit/editor-common/utils").Diff<{
|
|
215
|
-
renderWidth?: number | undefined;
|
|
216
|
-
} & Omit<SharedTableProps & {
|
|
217
|
-
children: React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
|
|
218
|
-
tableNode?: PMNode | undefined;
|
|
219
|
-
rendererAppearance?: RendererAppearance;
|
|
220
|
-
allowColumnSorting?: boolean | undefined;
|
|
221
|
-
stickyHeaders?: StickyHeaderConfig | undefined;
|
|
222
|
-
allowTableAlignment?: boolean | undefined;
|
|
223
|
-
allowTableResizing?: boolean | undefined;
|
|
224
|
-
isPresentational?: boolean | undefined;
|
|
225
|
-
} & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>, context: any): {
|
|
105
|
+
new (props: import("@atlaskit/editor-common/utils").Diff<any, WithSmartCardStorageProps>, context: any): {
|
|
226
106
|
render(): React.JSX.Element;
|
|
227
107
|
context: unknown;
|
|
228
|
-
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<import("@atlaskit/editor-common/utils").Diff<{
|
|
229
|
-
renderWidth?: number | undefined;
|
|
230
|
-
} & Omit<SharedTableProps & {
|
|
231
|
-
children: React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
|
|
232
|
-
tableNode?: PMNode | undefined;
|
|
233
|
-
rendererAppearance?: RendererAppearance;
|
|
234
|
-
allowColumnSorting?: boolean | undefined;
|
|
235
|
-
stickyHeaders?: StickyHeaderConfig | undefined;
|
|
236
|
-
allowTableAlignment?: boolean | undefined;
|
|
237
|
-
allowTableResizing?: boolean | undefined;
|
|
238
|
-
isPresentational?: boolean | undefined;
|
|
239
|
-
} & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
108
|
+
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<import("@atlaskit/editor-common/utils").Diff<any, WithSmartCardStorageProps>>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
240
109
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
241
|
-
readonly props: Readonly<import("@atlaskit/editor-common/utils").Diff<
|
|
242
|
-
renderWidth?: number | undefined;
|
|
243
|
-
} & Omit<SharedTableProps & {
|
|
244
|
-
children: React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
|
|
245
|
-
tableNode?: PMNode | undefined;
|
|
246
|
-
rendererAppearance?: RendererAppearance;
|
|
247
|
-
allowColumnSorting?: boolean | undefined;
|
|
248
|
-
stickyHeaders?: StickyHeaderConfig | undefined;
|
|
249
|
-
allowTableAlignment?: boolean | undefined;
|
|
250
|
-
allowTableResizing?: boolean | undefined;
|
|
251
|
-
isPresentational?: boolean | undefined;
|
|
252
|
-
} & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>;
|
|
110
|
+
readonly props: Readonly<import("@atlaskit/editor-common/utils").Diff<any, WithSmartCardStorageProps>>;
|
|
253
111
|
state: Readonly<{}>;
|
|
254
112
|
refs: {
|
|
255
113
|
[key: string]: React.ReactInstance;
|
|
256
114
|
};
|
|
257
115
|
componentDidMount?(): void;
|
|
258
|
-
shouldComponentUpdate?(nextProps: Readonly<import("@atlaskit/editor-common/utils").Diff<{
|
|
259
|
-
renderWidth?: number | undefined;
|
|
260
|
-
} & Omit<SharedTableProps & {
|
|
261
|
-
children: React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
|
|
262
|
-
tableNode?: PMNode | undefined;
|
|
263
|
-
rendererAppearance?: RendererAppearance;
|
|
264
|
-
allowColumnSorting?: boolean | undefined;
|
|
265
|
-
stickyHeaders?: StickyHeaderConfig | undefined;
|
|
266
|
-
allowTableAlignment?: boolean | undefined;
|
|
267
|
-
allowTableResizing?: boolean | undefined;
|
|
268
|
-
isPresentational?: boolean | undefined;
|
|
269
|
-
} & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
116
|
+
shouldComponentUpdate?(nextProps: Readonly<import("@atlaskit/editor-common/utils").Diff<any, WithSmartCardStorageProps>>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
270
117
|
componentWillUnmount?(): void;
|
|
271
118
|
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
272
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<import("@atlaskit/editor-common/utils").Diff<{
|
|
273
|
-
|
|
274
|
-
} & Omit<SharedTableProps & {
|
|
275
|
-
children: React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
|
|
276
|
-
tableNode?: PMNode | undefined;
|
|
277
|
-
rendererAppearance?: RendererAppearance;
|
|
278
|
-
allowColumnSorting?: boolean | undefined;
|
|
279
|
-
stickyHeaders?: StickyHeaderConfig | undefined;
|
|
280
|
-
allowTableAlignment?: boolean | undefined;
|
|
281
|
-
allowTableResizing?: boolean | undefined;
|
|
282
|
-
isPresentational?: boolean | undefined;
|
|
283
|
-
} & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>, prevState: Readonly<{}>): any;
|
|
284
|
-
componentDidUpdate?(prevProps: Readonly<import("@atlaskit/editor-common/utils").Diff<{
|
|
285
|
-
renderWidth?: number | undefined;
|
|
286
|
-
} & Omit<SharedTableProps & {
|
|
287
|
-
children: React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
|
|
288
|
-
tableNode?: PMNode | undefined;
|
|
289
|
-
rendererAppearance?: RendererAppearance;
|
|
290
|
-
allowColumnSorting?: boolean | undefined;
|
|
291
|
-
stickyHeaders?: StickyHeaderConfig | undefined;
|
|
292
|
-
allowTableAlignment?: boolean | undefined;
|
|
293
|
-
allowTableResizing?: boolean | undefined;
|
|
294
|
-
isPresentational?: boolean | undefined;
|
|
295
|
-
} & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
119
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<import("@atlaskit/editor-common/utils").Diff<any, WithSmartCardStorageProps>>, prevState: Readonly<{}>): any;
|
|
120
|
+
componentDidUpdate?(prevProps: Readonly<import("@atlaskit/editor-common/utils").Diff<any, WithSmartCardStorageProps>>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
296
121
|
componentWillMount?(): void;
|
|
297
122
|
UNSAFE_componentWillMount?(): void;
|
|
298
|
-
componentWillReceiveProps?(nextProps: Readonly<import("@atlaskit/editor-common/utils").Diff<
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
tableNode?: PMNode | undefined;
|
|
303
|
-
rendererAppearance?: RendererAppearance;
|
|
304
|
-
allowColumnSorting?: boolean | undefined;
|
|
305
|
-
stickyHeaders?: StickyHeaderConfig | undefined;
|
|
306
|
-
allowTableAlignment?: boolean | undefined;
|
|
307
|
-
allowTableResizing?: boolean | undefined;
|
|
308
|
-
isPresentational?: boolean | undefined;
|
|
309
|
-
} & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>, nextContext: any): void;
|
|
310
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<import("@atlaskit/editor-common/utils").Diff<{
|
|
311
|
-
renderWidth?: number | undefined;
|
|
312
|
-
} & Omit<SharedTableProps & {
|
|
313
|
-
children: React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
|
|
314
|
-
tableNode?: PMNode | undefined;
|
|
315
|
-
rendererAppearance?: RendererAppearance;
|
|
316
|
-
allowColumnSorting?: boolean | undefined;
|
|
317
|
-
stickyHeaders?: StickyHeaderConfig | undefined;
|
|
318
|
-
allowTableAlignment?: boolean | undefined;
|
|
319
|
-
allowTableResizing?: boolean | undefined;
|
|
320
|
-
isPresentational?: boolean | undefined;
|
|
321
|
-
} & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>, nextContext: any): void;
|
|
322
|
-
componentWillUpdate?(nextProps: Readonly<import("@atlaskit/editor-common/utils").Diff<{
|
|
323
|
-
renderWidth?: number | undefined;
|
|
324
|
-
} & Omit<SharedTableProps & {
|
|
325
|
-
children: React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
|
|
326
|
-
tableNode?: PMNode | undefined;
|
|
327
|
-
rendererAppearance?: RendererAppearance;
|
|
328
|
-
allowColumnSorting?: boolean | undefined;
|
|
329
|
-
stickyHeaders?: StickyHeaderConfig | undefined;
|
|
330
|
-
allowTableAlignment?: boolean | undefined;
|
|
331
|
-
allowTableResizing?: boolean | undefined;
|
|
332
|
-
isPresentational?: boolean | undefined;
|
|
333
|
-
} & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>, nextState: Readonly<{}>, nextContext: any): void;
|
|
334
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<import("@atlaskit/editor-common/utils").Diff<{
|
|
335
|
-
renderWidth?: number | undefined;
|
|
336
|
-
} & Omit<SharedTableProps & {
|
|
337
|
-
children: React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
|
|
338
|
-
tableNode?: PMNode | undefined;
|
|
339
|
-
rendererAppearance?: RendererAppearance;
|
|
340
|
-
allowColumnSorting?: boolean | undefined;
|
|
341
|
-
stickyHeaders?: StickyHeaderConfig | undefined;
|
|
342
|
-
allowTableAlignment?: boolean | undefined;
|
|
343
|
-
allowTableResizing?: boolean | undefined;
|
|
344
|
-
isPresentational?: boolean | undefined;
|
|
345
|
-
} & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>, nextState: Readonly<{}>, nextContext: any): void;
|
|
123
|
+
componentWillReceiveProps?(nextProps: Readonly<import("@atlaskit/editor-common/utils").Diff<any, WithSmartCardStorageProps>>, nextContext: any): void;
|
|
124
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<import("@atlaskit/editor-common/utils").Diff<any, WithSmartCardStorageProps>>, nextContext: any): void;
|
|
125
|
+
componentWillUpdate?(nextProps: Readonly<import("@atlaskit/editor-common/utils").Diff<any, WithSmartCardStorageProps>>, nextState: Readonly<{}>, nextContext: any): void;
|
|
126
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<import("@atlaskit/editor-common/utils").Diff<any, WithSmartCardStorageProps>>, nextState: Readonly<{}>, nextContext: any): void;
|
|
346
127
|
};
|
|
347
128
|
contextType?: React.Context<any> | undefined;
|
|
348
129
|
};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
3
|
+
import type { TableLayout } from '@atlaskit/adf-schema';
|
|
4
|
+
import type { OverflowShadowProps } from '@atlaskit/editor-common/ui';
|
|
5
|
+
import { SortOrder } from '@atlaskit/editor-common/types';
|
|
6
|
+
import type { RendererAppearance, StickyHeaderConfig } from '../../ui/Renderer/types';
|
|
7
|
+
import type { WithSmartCardStorageProps } from '../../ui/SmartCardStorage';
|
|
8
|
+
import type { StickyMode } from './table/sticky';
|
|
9
|
+
import { OverflowParent } from './table/sticky';
|
|
10
|
+
import type { SharedTableProps } from './table/types';
|
|
11
|
+
import { TableStickyScrollbar } from './TableStickyScrollbar';
|
|
12
|
+
export type TableArrayMapped = {
|
|
13
|
+
rowNodes: Array<PMNode | null>;
|
|
14
|
+
rowReact: React.ReactElement;
|
|
15
|
+
};
|
|
16
|
+
export declare const isTableResizingEnabled: (appearance: RendererAppearance) => boolean;
|
|
17
|
+
export declare const isStickyScrollbarEnabled: (appearance: RendererAppearance) => boolean;
|
|
18
|
+
export declare const orderChildren: (children: React.ReactElement[], tableNode: PMNode, smartCardStorage: WithSmartCardStorageProps['smartCardStorage'], tableOrderStatus?: TableOrderStatus) => React.ReactElement[];
|
|
19
|
+
export declare const hasRowspan: (row: PMNode) => boolean;
|
|
20
|
+
export declare const getRefTop: (refElement: HTMLElement) => number;
|
|
21
|
+
export declare const shouldHeaderStick: (scrollTop: number, tableTop: number, tableBottom: number, rowHeight: number) => boolean;
|
|
22
|
+
export declare const shouldHeaderPinBottom: (scrollTop: number, tableBottom: number, rowHeight: number) => boolean;
|
|
23
|
+
export declare const addSortableColumn: (rows: React.ReactElement<any>[], tableOrderStatus: TableOrderStatus | undefined, onSorting: (columnIndex: number, sortOrder: SortOrder) => void) => React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
|
|
24
|
+
export type TableProps = SharedTableProps & {
|
|
25
|
+
children: React.ReactElement<any> | Array<React.ReactElement<any>>;
|
|
26
|
+
tableNode?: PMNode;
|
|
27
|
+
rendererAppearance?: RendererAppearance;
|
|
28
|
+
allowColumnSorting?: boolean;
|
|
29
|
+
stickyHeaders?: StickyHeaderConfig;
|
|
30
|
+
allowTableAlignment?: boolean;
|
|
31
|
+
allowTableResizing?: boolean;
|
|
32
|
+
isPresentational?: boolean;
|
|
33
|
+
};
|
|
34
|
+
export declare const isHeaderRowEnabled: (rows: (React.ReactChild | React.ReactFragment | React.ReactPortal)[]) => any;
|
|
35
|
+
export declare const tableCanBeSticky: (node: PMNode | undefined, children: (React.ReactChild | React.ReactFragment | React.ReactPortal)[]) => any;
|
|
36
|
+
export interface TableOrderStatus {
|
|
37
|
+
columnIndex: number;
|
|
38
|
+
order: SortOrder;
|
|
39
|
+
}
|
|
40
|
+
export interface TableState {
|
|
41
|
+
stickyMode: StickyMode;
|
|
42
|
+
wrapperWidth: number;
|
|
43
|
+
headerRowHeight: number;
|
|
44
|
+
}
|
|
45
|
+
export declare class TableContainer extends React.Component<TableProps & OverflowShadowProps & WithSmartCardStorageProps, TableState> {
|
|
46
|
+
state: TableState;
|
|
47
|
+
tableRef: React.RefObject<HTMLTableElement>;
|
|
48
|
+
stickyHeaderRef: React.RefObject<HTMLElement>;
|
|
49
|
+
stickyScrollbarRef: React.RefObject<HTMLDivElement>;
|
|
50
|
+
stickyWrapperRef: React.RefObject<HTMLDivElement>;
|
|
51
|
+
wrapperRef: React.RefObject<HTMLDivElement>;
|
|
52
|
+
stickyScrollbar?: TableStickyScrollbar;
|
|
53
|
+
nextFrame: number | undefined;
|
|
54
|
+
overflowParent: OverflowParent | null;
|
|
55
|
+
updatedLayout: TableLayout | 'custom';
|
|
56
|
+
private resizeObserver;
|
|
57
|
+
private applyResizerChange;
|
|
58
|
+
componentDidMount(): void;
|
|
59
|
+
componentDidUpdate(prevProps: TableProps, prevState: TableState): void;
|
|
60
|
+
componentWillUnmount: () => void;
|
|
61
|
+
getScrollTop: () => number;
|
|
62
|
+
updateSticky: () => void;
|
|
63
|
+
onScroll: () => void;
|
|
64
|
+
onWrapperScrolled: () => void;
|
|
65
|
+
get pinTop(): number | undefined;
|
|
66
|
+
get shouldAddOverflowParentOffsetTop_DO_NOT_USE(): boolean | null | undefined;
|
|
67
|
+
get stickyTop(): number | undefined;
|
|
68
|
+
render(): React.JSX.Element;
|
|
69
|
+
private grabFirstRowRef;
|
|
70
|
+
}
|
|
71
|
+
type TableProcessorState = {
|
|
72
|
+
tableOrderStatus?: TableOrderStatus;
|
|
73
|
+
};
|
|
74
|
+
export declare class TableProcessorWithContainerStyles extends React.Component<TableProps & OverflowShadowProps & WithSmartCardStorageProps, TableProcessorState> {
|
|
75
|
+
state: {
|
|
76
|
+
tableOrderStatus: undefined;
|
|
77
|
+
};
|
|
78
|
+
render(): React.JSX.Element | null;
|
|
79
|
+
private addSortableColumn;
|
|
80
|
+
private changeSortOrder;
|
|
81
|
+
private addNumberColumnIndexes;
|
|
82
|
+
}
|
|
83
|
+
export {};
|
|
@@ -7,12 +7,11 @@ declare global {
|
|
|
7
7
|
/**
|
|
8
8
|
* Inline Script that updates breakout node width on client side,
|
|
9
9
|
* before main JavaScript bundle is ready.
|
|
10
|
-
*
|
|
11
10
|
* More info: https://product-fabric.atlassian.net/wiki/spaces/E/pages/1216218119/Renderer+SSR+for+Breakout+Nodes
|
|
12
11
|
*/
|
|
13
12
|
export declare function BreakoutSSRInlineScript({ noOpSSRInlineScript }: {
|
|
14
13
|
noOpSSRInlineScript: Boolean;
|
|
15
14
|
}): React.JSX.Element | null;
|
|
16
|
-
export declare function createBreakoutInlineScript(id: number): string;
|
|
15
|
+
export declare function createBreakoutInlineScript(id: number, optionalFlagArg?: boolean): string;
|
|
17
16
|
export declare const breakoutInlineScriptContext: string;
|
|
18
17
|
export declare const calcLineLength: any;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/renderer",
|
|
3
|
-
"version": "114.
|
|
3
|
+
"version": "114.12.1",
|
|
4
4
|
"description": "Renderer component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -31,11 +31,12 @@
|
|
|
31
31
|
"@atlaskit/analytics-next": "^11.0.0",
|
|
32
32
|
"@atlaskit/button": "^23.0.0",
|
|
33
33
|
"@atlaskit/code": "^17.1.0",
|
|
34
|
-
"@atlaskit/editor-common": "^103.
|
|
34
|
+
"@atlaskit/editor-common": "^103.21.0",
|
|
35
35
|
"@atlaskit/editor-json-transformer": "^8.24.0",
|
|
36
36
|
"@atlaskit/editor-palette": "^2.1.0",
|
|
37
37
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
38
38
|
"@atlaskit/editor-shared-styles": "^3.4.0",
|
|
39
|
+
"@atlaskit/editor-tables": "^2.9.0",
|
|
39
40
|
"@atlaskit/emoji": "^69.1.0",
|
|
40
41
|
"@atlaskit/feature-gate-js-client": "^5.2.0",
|
|
41
42
|
"@atlaskit/icon": "^25.6.0",
|
|
@@ -50,7 +51,7 @@
|
|
|
50
51
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
51
52
|
"@atlaskit/platform-feature-flags-react": "^0.1.0",
|
|
52
53
|
"@atlaskit/react-ufo": "^3.9.0",
|
|
53
|
-
"@atlaskit/smart-card": "^36.
|
|
54
|
+
"@atlaskit/smart-card": "^36.12.0",
|
|
54
55
|
"@atlaskit/status": "^3.0.0",
|
|
55
56
|
"@atlaskit/task-decision": "^19.2.0",
|
|
56
57
|
"@atlaskit/theme": "^18.0.0",
|
|
@@ -120,6 +121,9 @@
|
|
|
120
121
|
}
|
|
121
122
|
},
|
|
122
123
|
"platform-feature-flags": {
|
|
124
|
+
"platform-ssr-table-resize": {
|
|
125
|
+
"type": "boolean"
|
|
126
|
+
},
|
|
123
127
|
"cc_complexit_fe_improve_table_sorting": {
|
|
124
128
|
"type": "boolean"
|
|
125
129
|
},
|
|
@@ -129,6 +133,9 @@
|
|
|
129
133
|
"platform_renderer_annotations_create_debug_logging": {
|
|
130
134
|
"type": "boolean"
|
|
131
135
|
},
|
|
136
|
+
"platform_editor_speedup_media_client": {
|
|
137
|
+
"type": "boolean"
|
|
138
|
+
},
|
|
132
139
|
"platform_editor_annotation_position_comment_nodes": {
|
|
133
140
|
"type": "boolean"
|
|
134
141
|
},
|
|
@@ -225,6 +232,9 @@
|
|
|
225
232
|
"platform_ssr_smartlink_embeds": {
|
|
226
233
|
"type": "boolean"
|
|
227
234
|
},
|
|
235
|
+
"platform_ssr_smartlink_cards": {
|
|
236
|
+
"type": "boolean"
|
|
237
|
+
},
|
|
228
238
|
"confluence_frontend_fix_extension_draft_annotation": {
|
|
229
239
|
"type": "boolean"
|
|
230
240
|
},
|