@atlaskit/dynamic-table 14.9.0 → 14.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/cjs/components/stateless.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/stateless.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/stateless.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/components/loading-container-advanced.d.ts +2 -2
- package/dist/types/components/managed-pagination.d.ts +1 -1
- package/dist/types/components/stateful.d.ts +2 -2
- package/dist/types/components/stateless.d.ts +1 -1
- package/dist/types/internal/helpers.d.ts +6 -6
- package/dist/types/styled/dynamic-table.d.ts +1 -1
- package/dist/types/styled/empty-body.d.ts +2 -2
- package/dist/types/styled/loading-container-advanced.d.ts +2 -2
- package/dist/types/styled/loading-container.d.ts +2 -2
- package/dist/types/styled/rankable/table-cell.d.ts +1 -1
- package/dist/types/styled/rankable/table-row.d.ts +1 -1
- package/dist/types/styled/table-head.d.ts +1 -1
- package/dist/types/styled/table-row.d.ts +1 -1
- package/dist/types/types.d.ts +3 -3
- package/dist/types-ts4.5/components/body.d.ts +112 -0
- package/dist/types-ts4.5/components/loading-container-advanced.d.ts +43 -0
- package/dist/types-ts4.5/components/loading-container.d.ts +18 -0
- package/dist/types-ts4.5/components/managed-pagination.d.ts +15 -0
- package/dist/types-ts4.5/components/rankable/body.d.ts +122 -0
- package/dist/types-ts4.5/components/rankable/table-cell.d.ts +14 -0
- package/dist/types-ts4.5/components/rankable/table-head-cell.d.ts +5 -0
- package/dist/types-ts4.5/components/rankable/table-row.d.ts +18 -0
- package/dist/types-ts4.5/components/stateful.d.ts +60 -0
- package/dist/types-ts4.5/components/stateless.d.ts +58 -0
- package/dist/types-ts4.5/components/table-head-cell.d.ts +19 -0
- package/dist/types-ts4.5/components/table-head.d.ts +18 -0
- package/dist/types-ts4.5/components/table-row.d.ts +11 -0
- package/dist/types-ts4.5/hoc/with-dimensions.d.ts +12 -0
- package/dist/types-ts4.5/hoc/with-sorted-page-rows.d.ts +117 -0
- package/dist/types-ts4.5/index.d.ts +2 -0
- package/dist/types-ts4.5/internal/constants.d.ts +5 -0
- package/dist/types-ts4.5/internal/helpers.d.ts +7 -0
- package/dist/types-ts4.5/styled/constants.d.ts +17 -0
- package/dist/types-ts4.5/styled/dynamic-table.d.ts +20 -0
- package/dist/types-ts4.5/styled/empty-body.d.ts +13 -0
- package/dist/types-ts4.5/styled/loading-container-advanced.d.ts +14 -0
- package/dist/types-ts4.5/styled/loading-container.d.ts +14 -0
- package/dist/types-ts4.5/styled/rankable/table-cell.d.ts +9 -0
- package/dist/types-ts4.5/styled/rankable/table-row.d.ts +13 -0
- package/dist/types-ts4.5/styled/table-cell.d.ts +4 -0
- package/dist/types-ts4.5/styled/table-head.d.ts +18 -0
- package/dist/types-ts4.5/styled/table-row.d.ts +10 -0
- package/dist/types-ts4.5/theme.d.ts +22 -0
- package/dist/types-ts4.5/types.d.ts +345 -0
- package/package.json +12 -4
- package/theme/package.json +2 -2
- package/types/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/dynamic-table
|
|
2
2
|
|
|
3
|
+
## 14.9.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`9d00501a414`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9d00501a414) - Ensure legacy types are published for TS 4.5-4.8
|
|
8
|
+
|
|
9
|
+
## 14.9.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`41fae2c6f68`](https://bitbucket.org/atlassian/atlassian-frontend/commits/41fae2c6f68) - Upgrade Typescript from `4.5.5` to `4.9.5`
|
|
14
|
+
|
|
3
15
|
## 14.9.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
|
@@ -29,7 +29,7 @@ var _tableHead = _interopRequireDefault(require("./table-head"));
|
|
|
29
29
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
30
30
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
31
31
|
var packageName = "@atlaskit/dynamic-table";
|
|
32
|
-
var packageVersion = "14.9.
|
|
32
|
+
var packageVersion = "14.9.2";
|
|
33
33
|
function toggleSortOrder(currentSortOrder) {
|
|
34
34
|
switch (currentSortOrder) {
|
|
35
35
|
case _constants.DESC:
|
package/dist/cjs/version.json
CHANGED
|
@@ -14,7 +14,7 @@ import ManagedPagination from './managed-pagination';
|
|
|
14
14
|
import RankableTableBody from './rankable/body';
|
|
15
15
|
import TableHead from './table-head';
|
|
16
16
|
const packageName = "@atlaskit/dynamic-table";
|
|
17
|
-
const packageVersion = "14.9.
|
|
17
|
+
const packageVersion = "14.9.2";
|
|
18
18
|
function toggleSortOrder(currentSortOrder) {
|
|
19
19
|
switch (currentSortOrder) {
|
|
20
20
|
case DESC:
|
package/dist/es2019/version.json
CHANGED
|
@@ -22,7 +22,7 @@ import ManagedPagination from './managed-pagination';
|
|
|
22
22
|
import RankableTableBody from './rankable/body';
|
|
23
23
|
import TableHead from './table-head';
|
|
24
24
|
var packageName = "@atlaskit/dynamic-table";
|
|
25
|
-
var packageVersion = "14.9.
|
|
25
|
+
var packageVersion = "14.9.2";
|
|
26
26
|
function toggleSortOrder(currentSortOrder) {
|
|
27
27
|
switch (currentSortOrder) {
|
|
28
28
|
case DESC:
|
package/dist/esm/version.json
CHANGED
|
@@ -23,7 +23,7 @@ export default class LoadingContainerAdvanced extends React.Component<LoadingCon
|
|
|
23
23
|
getTargetNode: (nextProps?: LoadingContainerAdvancedProps) => Element | Text | null;
|
|
24
24
|
getThisNode: () => Element | Text | null;
|
|
25
25
|
getSpinnerNode: () => Element | Text | null;
|
|
26
|
-
hasTargetNode: (nextProps?: LoadingContainerAdvancedProps
|
|
26
|
+
hasTargetNode: (nextProps?: LoadingContainerAdvancedProps) => boolean;
|
|
27
27
|
isVerticallyVisible: (elementRect: {
|
|
28
28
|
top: number;
|
|
29
29
|
bottom: number;
|
|
@@ -36,7 +36,7 @@ export default class LoadingContainerAdvanced extends React.Component<LoadingCon
|
|
|
36
36
|
detachListeners(): void;
|
|
37
37
|
handleResize: () => void;
|
|
38
38
|
handleScroll: () => void;
|
|
39
|
-
translateSpinner: (spinnerNode: HTMLElement, transformY: number, isFixed?: boolean
|
|
39
|
+
translateSpinner: (spinnerNode: HTMLElement, transformY: number, isFixed?: boolean) => void;
|
|
40
40
|
updateTargetAppearance: () => void;
|
|
41
41
|
updateSpinnerPosition(): void;
|
|
42
42
|
render(): JSX.Element;
|
|
@@ -9,7 +9,7 @@ interface ManagedPaginationProps {
|
|
|
9
9
|
testId?: string;
|
|
10
10
|
}
|
|
11
11
|
export default class ManagedPagination extends React.Component<ManagedPaginationProps> {
|
|
12
|
-
onChange: (_event: any, newValue: any, analyticsEvent?: UIAnalyticsEvent
|
|
12
|
+
onChange: (_event: any, newValue: any, analyticsEvent?: UIAnalyticsEvent) => void;
|
|
13
13
|
render(): JSX.Element;
|
|
14
14
|
}
|
|
15
15
|
export {};
|
|
@@ -51,8 +51,8 @@ export default class DynamicTable extends React.Component<StatefulProps, State>
|
|
|
51
51
|
rows: RowType[] | undefined;
|
|
52
52
|
};
|
|
53
53
|
UNSAFE_componentWillReceiveProps(newProps: StatefulProps): void;
|
|
54
|
-
onSetPageHandler: (page: number, analyticsEvent?: UIAnalyticsEvent
|
|
55
|
-
onSortHandler: ({ key, item, sortOrder }: any, analyticsEvent?: UIAnalyticsEvent
|
|
54
|
+
onSetPageHandler: (page: number, analyticsEvent?: UIAnalyticsEvent) => void;
|
|
55
|
+
onSortHandler: ({ key, item, sortOrder }: any, analyticsEvent?: UIAnalyticsEvent) => void;
|
|
56
56
|
onRankEndIfExistsHandler: (params: RankEnd) => void;
|
|
57
57
|
onRankEndHandler: (params: RankEnd) => void;
|
|
58
58
|
render(): JSX.Element;
|
|
@@ -30,7 +30,7 @@ declare class DynamicTable extends React.Component<Props, State> {
|
|
|
30
30
|
UNSAFE_componentWillMount(): void;
|
|
31
31
|
UNSAFE_componentWillReceiveProps(nextProps: Props): void;
|
|
32
32
|
onSortHandler: (item: RowCellType) => () => void;
|
|
33
|
-
onSetPageHandler: (page: number, event?: UIAnalyticsEvent
|
|
33
|
+
onSetPageHandler: (page: number, event?: UIAnalyticsEvent) => void;
|
|
34
34
|
onRankStartHandler: (params: RankStart) => void;
|
|
35
35
|
onRankEndHandler: (params: RankEnd) => void;
|
|
36
36
|
getSpinnerSize: () => import("../types").LoadingSpinnerSizeType;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { HeadType, RankEnd, RowType } from '../types';
|
|
2
|
-
export declare const getPageRows: (allRows: Array<RowType>, pageNumber?: number
|
|
3
|
-
export declare const assertIsSortable: (head?: HeadType
|
|
4
|
-
export declare const validateSortKey: (sortKey?: string
|
|
5
|
-
export declare const inlineStylesIfRanking: (isRanking: boolean, width: number, height?: number
|
|
6
|
-
export declare const computeIndex: (index: number, page: number, rowsPerPage?: number
|
|
7
|
-
export declare const reorderRows: (rankEnd: RankEnd, rows: RowType[], page?: number, rowsPerPage?: number
|
|
2
|
+
export declare const getPageRows: (allRows: Array<RowType>, pageNumber?: number, rowsPerPage?: number) => Array<RowType>;
|
|
3
|
+
export declare const assertIsSortable: (head?: HeadType) => void;
|
|
4
|
+
export declare const validateSortKey: (sortKey?: string, head?: HeadType) => void;
|
|
5
|
+
export declare const inlineStylesIfRanking: (isRanking: boolean, width: number, height?: number) => {};
|
|
6
|
+
export declare const computeIndex: (index: number, page: number, rowsPerPage?: number) => number;
|
|
7
|
+
export declare const reorderRows: (rankEnd: RankEnd, rows: RowType[], page?: number, rowsPerPage?: number) => RowType[];
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { FC, ReactNode } from 'react';
|
|
3
|
-
|
|
3
|
+
type EmptyViewWithFixedHeightProps = {
|
|
4
4
|
testId?: string;
|
|
5
5
|
children?: ReactNode;
|
|
6
6
|
};
|
|
7
|
-
|
|
7
|
+
type EmptyViewContainerProps = {
|
|
8
8
|
testId?: string;
|
|
9
9
|
children: ReactNode;
|
|
10
10
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { FC, HTMLProps, ReactNode } from 'react';
|
|
3
3
|
import { jsx } from '@emotion/react';
|
|
4
|
-
|
|
4
|
+
type ContainerProps = HTMLProps<HTMLDivElement> & {
|
|
5
5
|
testId?: string;
|
|
6
6
|
};
|
|
7
7
|
export declare const Container: (props: ContainerProps) => jsx.JSX.Element;
|
|
8
|
-
|
|
8
|
+
type SpinnerBackdropProps = {
|
|
9
9
|
testId?: string;
|
|
10
10
|
children: ReactNode;
|
|
11
11
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { FC, ReactNode } from 'react';
|
|
3
3
|
export declare const CSS_VAR_CONTENTS_OPACITY = "--contents-opacity";
|
|
4
|
-
|
|
4
|
+
type ContainerProps = {
|
|
5
5
|
testId?: string;
|
|
6
6
|
children: ReactNode;
|
|
7
7
|
};
|
|
8
|
-
|
|
8
|
+
type LoadingContainerProps = ContainerProps & {
|
|
9
9
|
contentsOpacity: number;
|
|
10
10
|
};
|
|
11
11
|
export declare const Container: FC<ContainerProps>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { FC, HTMLProps, ReactNode } from 'react';
|
|
3
3
|
import { TruncateStyleProps } from '../constants';
|
|
4
|
-
|
|
4
|
+
type RankableTableBodyCellProps = HTMLProps<HTMLTableCellElement | HTMLTableRowElement> & TruncateStyleProps & {
|
|
5
5
|
isRanking?: boolean;
|
|
6
6
|
children?: ReactNode;
|
|
7
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { HTMLAttributes } from 'react';
|
|
3
3
|
import { ITableRowProps } from '../table-row';
|
|
4
|
-
export
|
|
4
|
+
export type RankableTableBodyRowProps = HTMLAttributes<HTMLTableRowElement> & ITableRowProps & {
|
|
5
5
|
isRanking?: boolean;
|
|
6
6
|
isRankingItem?: boolean;
|
|
7
7
|
testId?: string;
|
|
@@ -8,7 +8,7 @@ interface HeadProps {
|
|
|
8
8
|
testId?: string;
|
|
9
9
|
}
|
|
10
10
|
export declare const Head: FC<HeadProps>;
|
|
11
|
-
|
|
11
|
+
type HeadCellProps = TruncateStyleProps & HTMLProps<HTMLTableCellElement> & {
|
|
12
12
|
onClick?: () => void;
|
|
13
13
|
isSortable?: boolean;
|
|
14
14
|
sortOrder?: SortOrderType;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -305,13 +305,13 @@ export interface RowType extends React.ComponentPropsWithoutRef<'tr'> {
|
|
|
305
305
|
/**
|
|
306
306
|
* Enum style type to determine whether sort results are ascending or descending.
|
|
307
307
|
*/
|
|
308
|
-
export
|
|
308
|
+
export type SortOrderType = 'ASC' | 'DESC';
|
|
309
309
|
/**
|
|
310
310
|
* Determines the size of the table loading spinner.
|
|
311
311
|
* This matches the underlying `Size` type in `@atlaskit/spinner`
|
|
312
312
|
*/
|
|
313
|
-
export
|
|
314
|
-
export
|
|
313
|
+
export type SpinnerSizeType = SizeType;
|
|
314
|
+
export type LoadingSpinnerSizeType = 'small' | 'large';
|
|
315
315
|
export interface HeadCellType extends RowCellType {
|
|
316
316
|
/**
|
|
317
317
|
* Whether the column the cell sits above is sortable.
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { WithSortedPageRowsProps } from '../hoc/with-sorted-page-rows';
|
|
3
|
+
import { HeadType } from '../types';
|
|
4
|
+
interface BodyProps extends WithSortedPageRowsProps {
|
|
5
|
+
head?: HeadType;
|
|
6
|
+
highlightedRowIndex?: number | number[];
|
|
7
|
+
isFixedSize: boolean;
|
|
8
|
+
testId?: string;
|
|
9
|
+
}
|
|
10
|
+
declare const _default: {
|
|
11
|
+
new (props: Readonly<Omit<BodyProps & import("../hoc/with-sorted-page-rows").TableProps, "pageRows">>): {
|
|
12
|
+
state: {
|
|
13
|
+
pageRows: never[];
|
|
14
|
+
};
|
|
15
|
+
componentDidMount(): void;
|
|
16
|
+
componentDidUpdate(_prevProps: Omit<BodyProps & import("../hoc/with-sorted-page-rows").TableProps, "pageRows">, prevState: {
|
|
17
|
+
pageRows: import("../types").RowType[];
|
|
18
|
+
}): void;
|
|
19
|
+
render(): JSX.Element;
|
|
20
|
+
context: any;
|
|
21
|
+
setState<K extends "pageRows">(state: {
|
|
22
|
+
pageRows: import("../types").RowType[];
|
|
23
|
+
} | ((prevState: Readonly<{
|
|
24
|
+
pageRows: import("../types").RowType[];
|
|
25
|
+
}>, props: Readonly<Omit<BodyProps & import("../hoc/with-sorted-page-rows").TableProps, "pageRows">>) => {
|
|
26
|
+
pageRows: import("../types").RowType[];
|
|
27
|
+
} | Pick<{
|
|
28
|
+
pageRows: import("../types").RowType[];
|
|
29
|
+
}, K> | null) | Pick<{
|
|
30
|
+
pageRows: import("../types").RowType[];
|
|
31
|
+
}, K> | null, callback?: (() => void) | undefined): void;
|
|
32
|
+
forceUpdate(callBack?: (() => void) | undefined): void;
|
|
33
|
+
readonly props: Readonly<Omit<BodyProps & import("../hoc/with-sorted-page-rows").TableProps, "pageRows">> & Readonly<{
|
|
34
|
+
children?: React.ReactNode;
|
|
35
|
+
}>;
|
|
36
|
+
refs: {
|
|
37
|
+
[key: string]: React.ReactInstance;
|
|
38
|
+
};
|
|
39
|
+
shouldComponentUpdate?(nextProps: Readonly<Omit<BodyProps & import("../hoc/with-sorted-page-rows").TableProps, "pageRows">>, nextState: Readonly<{
|
|
40
|
+
pageRows: import("../types").RowType[];
|
|
41
|
+
}>, nextContext: any): boolean;
|
|
42
|
+
componentWillUnmount?(): void;
|
|
43
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
44
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Omit<BodyProps & import("../hoc/with-sorted-page-rows").TableProps, "pageRows">>, prevState: Readonly<{
|
|
45
|
+
pageRows: import("../types").RowType[];
|
|
46
|
+
}>): any;
|
|
47
|
+
componentWillMount?(): void;
|
|
48
|
+
UNSAFE_componentWillMount?(): void;
|
|
49
|
+
componentWillReceiveProps?(nextProps: Readonly<Omit<BodyProps & import("../hoc/with-sorted-page-rows").TableProps, "pageRows">>, nextContext: any): void;
|
|
50
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Omit<BodyProps & import("../hoc/with-sorted-page-rows").TableProps, "pageRows">>, nextContext: any): void;
|
|
51
|
+
componentWillUpdate?(nextProps: Readonly<Omit<BodyProps & import("../hoc/with-sorted-page-rows").TableProps, "pageRows">>, nextState: Readonly<{
|
|
52
|
+
pageRows: import("../types").RowType[];
|
|
53
|
+
}>, nextContext: any): void;
|
|
54
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<Omit<BodyProps & import("../hoc/with-sorted-page-rows").TableProps, "pageRows">>, nextState: Readonly<{
|
|
55
|
+
pageRows: import("../types").RowType[];
|
|
56
|
+
}>, nextContext: any): void;
|
|
57
|
+
};
|
|
58
|
+
new (props: Omit<BodyProps & import("../hoc/with-sorted-page-rows").TableProps, "pageRows">, context?: any): {
|
|
59
|
+
state: {
|
|
60
|
+
pageRows: never[];
|
|
61
|
+
};
|
|
62
|
+
componentDidMount(): void;
|
|
63
|
+
componentDidUpdate(_prevProps: Omit<BodyProps & import("../hoc/with-sorted-page-rows").TableProps, "pageRows">, prevState: {
|
|
64
|
+
pageRows: import("../types").RowType[];
|
|
65
|
+
}): void;
|
|
66
|
+
render(): JSX.Element;
|
|
67
|
+
context: any;
|
|
68
|
+
setState<K extends "pageRows">(state: {
|
|
69
|
+
pageRows: import("../types").RowType[];
|
|
70
|
+
} | ((prevState: Readonly<{
|
|
71
|
+
pageRows: import("../types").RowType[];
|
|
72
|
+
}>, props: Readonly<Omit<BodyProps & import("../hoc/with-sorted-page-rows").TableProps, "pageRows">>) => {
|
|
73
|
+
pageRows: import("../types").RowType[];
|
|
74
|
+
} | Pick<{
|
|
75
|
+
pageRows: import("../types").RowType[];
|
|
76
|
+
}, K> | null) | Pick<{
|
|
77
|
+
pageRows: import("../types").RowType[];
|
|
78
|
+
}, K> | null, callback?: (() => void) | undefined): void;
|
|
79
|
+
forceUpdate(callBack?: (() => void) | undefined): void;
|
|
80
|
+
readonly props: Readonly<Omit<BodyProps & import("../hoc/with-sorted-page-rows").TableProps, "pageRows">> & Readonly<{
|
|
81
|
+
children?: React.ReactNode;
|
|
82
|
+
}>;
|
|
83
|
+
refs: {
|
|
84
|
+
[key: string]: React.ReactInstance;
|
|
85
|
+
};
|
|
86
|
+
shouldComponentUpdate?(nextProps: Readonly<Omit<BodyProps & import("../hoc/with-sorted-page-rows").TableProps, "pageRows">>, nextState: Readonly<{
|
|
87
|
+
pageRows: import("../types").RowType[];
|
|
88
|
+
}>, nextContext: any): boolean;
|
|
89
|
+
componentWillUnmount?(): void;
|
|
90
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
91
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Omit<BodyProps & import("../hoc/with-sorted-page-rows").TableProps, "pageRows">>, prevState: Readonly<{
|
|
92
|
+
pageRows: import("../types").RowType[];
|
|
93
|
+
}>): any;
|
|
94
|
+
componentWillMount?(): void;
|
|
95
|
+
UNSAFE_componentWillMount?(): void;
|
|
96
|
+
componentWillReceiveProps?(nextProps: Readonly<Omit<BodyProps & import("../hoc/with-sorted-page-rows").TableProps, "pageRows">>, nextContext: any): void;
|
|
97
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Omit<BodyProps & import("../hoc/with-sorted-page-rows").TableProps, "pageRows">>, nextContext: any): void;
|
|
98
|
+
componentWillUpdate?(nextProps: Readonly<Omit<BodyProps & import("../hoc/with-sorted-page-rows").TableProps, "pageRows">>, nextState: Readonly<{
|
|
99
|
+
pageRows: import("../types").RowType[];
|
|
100
|
+
}>, nextContext: any): void;
|
|
101
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<Omit<BodyProps & import("../hoc/with-sorted-page-rows").TableProps, "pageRows">>, nextState: Readonly<{
|
|
102
|
+
pageRows: import("../types").RowType[];
|
|
103
|
+
}>, nextContext: any): void;
|
|
104
|
+
};
|
|
105
|
+
getDerivedStateFromProps(props: Omit<BodyProps & import("../hoc/with-sorted-page-rows").TableProps, "pageRows">, state: {
|
|
106
|
+
pageRows: import("../types").RowType[];
|
|
107
|
+
}): {
|
|
108
|
+
pageRows: import("../types").RowType[];
|
|
109
|
+
};
|
|
110
|
+
contextType?: React.Context<any> | undefined;
|
|
111
|
+
};
|
|
112
|
+
export default _default;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { SpinnerSizeType } from '../types';
|
|
3
|
+
export interface LoadingContainerAdvancedProps {
|
|
4
|
+
children: React.ReactElement<any>;
|
|
5
|
+
isLoading?: boolean;
|
|
6
|
+
spinnerSize?: SpinnerSizeType;
|
|
7
|
+
contentsOpacity: number | string;
|
|
8
|
+
targetRef?: () => HTMLDivElement | undefined;
|
|
9
|
+
testId?: string;
|
|
10
|
+
}
|
|
11
|
+
export default class LoadingContainerAdvanced extends React.Component<LoadingContainerAdvancedProps, {}> {
|
|
12
|
+
children?: HTMLElement;
|
|
13
|
+
spinnerRef?: HTMLDivElement;
|
|
14
|
+
static defaultProps: {
|
|
15
|
+
isLoading: boolean;
|
|
16
|
+
spinnerSize: string;
|
|
17
|
+
contentsOpacity: "var(--ds-opacity-loading)";
|
|
18
|
+
};
|
|
19
|
+
componentDidMount: () => void;
|
|
20
|
+
UNSAFE_componentWillReceiveProps: (nextProps: LoadingContainerAdvancedProps) => void;
|
|
21
|
+
componentDidUpdate: () => void;
|
|
22
|
+
componentWillUnmount: () => void;
|
|
23
|
+
getTargetNode: (nextProps?: LoadingContainerAdvancedProps) => Element | Text | null;
|
|
24
|
+
getThisNode: () => Element | Text | null;
|
|
25
|
+
getSpinnerNode: () => Element | Text | null;
|
|
26
|
+
hasTargetNode: (nextProps?: LoadingContainerAdvancedProps) => boolean;
|
|
27
|
+
isVerticallyVisible: (elementRect: {
|
|
28
|
+
top: number;
|
|
29
|
+
bottom: number;
|
|
30
|
+
}, viewportHeight: number) => boolean;
|
|
31
|
+
isFullyVerticallyVisible: (elementRect: {
|
|
32
|
+
top: number;
|
|
33
|
+
bottom: number;
|
|
34
|
+
}, viewportHeight: number) => boolean;
|
|
35
|
+
attachListeners(): void;
|
|
36
|
+
detachListeners(): void;
|
|
37
|
+
handleResize: () => void;
|
|
38
|
+
handleScroll: () => void;
|
|
39
|
+
translateSpinner: (spinnerNode: HTMLElement, transformY: number, isFixed?: boolean) => void;
|
|
40
|
+
updateTargetAppearance: () => void;
|
|
41
|
+
updateSpinnerPosition(): void;
|
|
42
|
+
render(): JSX.Element;
|
|
43
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { SpinnerSizeType } from '../types';
|
|
3
|
+
interface LoadingContainerProps {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
isLoading?: boolean;
|
|
6
|
+
spinnerSize?: SpinnerSizeType;
|
|
7
|
+
contentsOpacity: number;
|
|
8
|
+
testId?: string;
|
|
9
|
+
}
|
|
10
|
+
export default class LoadingContainer extends React.Component<LoadingContainerProps> {
|
|
11
|
+
static defaultProps: {
|
|
12
|
+
isLoading: boolean;
|
|
13
|
+
spinnerSize: string;
|
|
14
|
+
contentsOpacity: number;
|
|
15
|
+
};
|
|
16
|
+
render(): JSX.Element;
|
|
17
|
+
}
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
3
|
+
import type { I18nShape } from '../types';
|
|
4
|
+
interface ManagedPaginationProps {
|
|
5
|
+
value?: number;
|
|
6
|
+
onChange: (newValue: any, analyticsEvent?: UIAnalyticsEvent) => void;
|
|
7
|
+
total: number;
|
|
8
|
+
i18n?: I18nShape;
|
|
9
|
+
testId?: string;
|
|
10
|
+
}
|
|
11
|
+
export default class ManagedPagination extends React.Component<ManagedPaginationProps> {
|
|
12
|
+
onChange: (_event: any, newValue: any, analyticsEvent?: UIAnalyticsEvent) => void;
|
|
13
|
+
render(): JSX.Element;
|
|
14
|
+
}
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DragStart, DropResult } from 'react-beautiful-dnd';
|
|
3
|
+
import { WithSortedPageRowsProps } from '../../hoc/with-sorted-page-rows';
|
|
4
|
+
import { HeadType, RankEnd, RankStart, RowType } from '../../types';
|
|
5
|
+
export interface RankableBodyProps extends WithSortedPageRowsProps {
|
|
6
|
+
highlightedRowIndex?: number | number[];
|
|
7
|
+
onRankStart: (rankStart: RankStart) => void;
|
|
8
|
+
onRankEnd: (rankEnd: RankEnd) => void;
|
|
9
|
+
isFixedSize: boolean;
|
|
10
|
+
isRanking: boolean;
|
|
11
|
+
isRankingDisabled: boolean;
|
|
12
|
+
head?: HeadType;
|
|
13
|
+
testId?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare class RankableBody extends React.Component<RankableBodyProps, {}> {
|
|
16
|
+
onBeforeDragStart: (dragStart: DragStart) => void;
|
|
17
|
+
onDragEnd: (result: DropResult) => void;
|
|
18
|
+
render(): JSX.Element;
|
|
19
|
+
}
|
|
20
|
+
declare const _default: {
|
|
21
|
+
new (props: Readonly<Omit<RankableBodyProps & import("../../hoc/with-sorted-page-rows").TableProps, "pageRows">>): {
|
|
22
|
+
state: {
|
|
23
|
+
pageRows: never[];
|
|
24
|
+
};
|
|
25
|
+
componentDidMount(): void;
|
|
26
|
+
componentDidUpdate(_prevProps: Omit<RankableBodyProps & import("../../hoc/with-sorted-page-rows").TableProps, "pageRows">, prevState: {
|
|
27
|
+
pageRows: RowType[];
|
|
28
|
+
}): void;
|
|
29
|
+
render(): JSX.Element;
|
|
30
|
+
context: any;
|
|
31
|
+
setState<K extends "pageRows">(state: {
|
|
32
|
+
pageRows: RowType[];
|
|
33
|
+
} | ((prevState: Readonly<{
|
|
34
|
+
pageRows: RowType[];
|
|
35
|
+
}>, props: Readonly<Omit<RankableBodyProps & import("../../hoc/with-sorted-page-rows").TableProps, "pageRows">>) => {
|
|
36
|
+
pageRows: RowType[];
|
|
37
|
+
} | Pick<{
|
|
38
|
+
pageRows: RowType[];
|
|
39
|
+
}, K> | null) | Pick<{
|
|
40
|
+
pageRows: RowType[];
|
|
41
|
+
}, K> | null, callback?: (() => void) | undefined): void;
|
|
42
|
+
forceUpdate(callBack?: (() => void) | undefined): void;
|
|
43
|
+
readonly props: Readonly<Omit<RankableBodyProps & import("../../hoc/with-sorted-page-rows").TableProps, "pageRows">> & Readonly<{
|
|
44
|
+
children?: React.ReactNode;
|
|
45
|
+
}>;
|
|
46
|
+
refs: {
|
|
47
|
+
[key: string]: React.ReactInstance;
|
|
48
|
+
};
|
|
49
|
+
shouldComponentUpdate?(nextProps: Readonly<Omit<RankableBodyProps & import("../../hoc/with-sorted-page-rows").TableProps, "pageRows">>, nextState: Readonly<{
|
|
50
|
+
pageRows: RowType[];
|
|
51
|
+
}>, nextContext: any): boolean;
|
|
52
|
+
componentWillUnmount?(): void;
|
|
53
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
54
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Omit<RankableBodyProps & import("../../hoc/with-sorted-page-rows").TableProps, "pageRows">>, prevState: Readonly<{
|
|
55
|
+
pageRows: RowType[];
|
|
56
|
+
}>): any;
|
|
57
|
+
componentWillMount?(): void;
|
|
58
|
+
UNSAFE_componentWillMount?(): void;
|
|
59
|
+
componentWillReceiveProps?(nextProps: Readonly<Omit<RankableBodyProps & import("../../hoc/with-sorted-page-rows").TableProps, "pageRows">>, nextContext: any): void;
|
|
60
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Omit<RankableBodyProps & import("../../hoc/with-sorted-page-rows").TableProps, "pageRows">>, nextContext: any): void;
|
|
61
|
+
componentWillUpdate?(nextProps: Readonly<Omit<RankableBodyProps & import("../../hoc/with-sorted-page-rows").TableProps, "pageRows">>, nextState: Readonly<{
|
|
62
|
+
pageRows: RowType[];
|
|
63
|
+
}>, nextContext: any): void;
|
|
64
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<Omit<RankableBodyProps & import("../../hoc/with-sorted-page-rows").TableProps, "pageRows">>, nextState: Readonly<{
|
|
65
|
+
pageRows: RowType[];
|
|
66
|
+
}>, nextContext: any): void;
|
|
67
|
+
};
|
|
68
|
+
new (props: Omit<RankableBodyProps & import("../../hoc/with-sorted-page-rows").TableProps, "pageRows">, context?: any): {
|
|
69
|
+
state: {
|
|
70
|
+
pageRows: never[];
|
|
71
|
+
};
|
|
72
|
+
componentDidMount(): void;
|
|
73
|
+
componentDidUpdate(_prevProps: Omit<RankableBodyProps & import("../../hoc/with-sorted-page-rows").TableProps, "pageRows">, prevState: {
|
|
74
|
+
pageRows: RowType[];
|
|
75
|
+
}): void;
|
|
76
|
+
render(): JSX.Element;
|
|
77
|
+
context: any;
|
|
78
|
+
setState<K extends "pageRows">(state: {
|
|
79
|
+
pageRows: RowType[];
|
|
80
|
+
} | ((prevState: Readonly<{
|
|
81
|
+
pageRows: RowType[];
|
|
82
|
+
}>, props: Readonly<Omit<RankableBodyProps & import("../../hoc/with-sorted-page-rows").TableProps, "pageRows">>) => {
|
|
83
|
+
pageRows: RowType[];
|
|
84
|
+
} | Pick<{
|
|
85
|
+
pageRows: RowType[];
|
|
86
|
+
}, K> | null) | Pick<{
|
|
87
|
+
pageRows: RowType[];
|
|
88
|
+
}, K> | null, callback?: (() => void) | undefined): void;
|
|
89
|
+
forceUpdate(callBack?: (() => void) | undefined): void;
|
|
90
|
+
readonly props: Readonly<Omit<RankableBodyProps & import("../../hoc/with-sorted-page-rows").TableProps, "pageRows">> & Readonly<{
|
|
91
|
+
children?: React.ReactNode;
|
|
92
|
+
}>;
|
|
93
|
+
refs: {
|
|
94
|
+
[key: string]: React.ReactInstance;
|
|
95
|
+
};
|
|
96
|
+
shouldComponentUpdate?(nextProps: Readonly<Omit<RankableBodyProps & import("../../hoc/with-sorted-page-rows").TableProps, "pageRows">>, nextState: Readonly<{
|
|
97
|
+
pageRows: RowType[];
|
|
98
|
+
}>, nextContext: any): boolean;
|
|
99
|
+
componentWillUnmount?(): void;
|
|
100
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
101
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Omit<RankableBodyProps & import("../../hoc/with-sorted-page-rows").TableProps, "pageRows">>, prevState: Readonly<{
|
|
102
|
+
pageRows: RowType[];
|
|
103
|
+
}>): any;
|
|
104
|
+
componentWillMount?(): void;
|
|
105
|
+
UNSAFE_componentWillMount?(): void;
|
|
106
|
+
componentWillReceiveProps?(nextProps: Readonly<Omit<RankableBodyProps & import("../../hoc/with-sorted-page-rows").TableProps, "pageRows">>, nextContext: any): void;
|
|
107
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Omit<RankableBodyProps & import("../../hoc/with-sorted-page-rows").TableProps, "pageRows">>, nextContext: any): void;
|
|
108
|
+
componentWillUpdate?(nextProps: Readonly<Omit<RankableBodyProps & import("../../hoc/with-sorted-page-rows").TableProps, "pageRows">>, nextState: Readonly<{
|
|
109
|
+
pageRows: RowType[];
|
|
110
|
+
}>, nextContext: any): void;
|
|
111
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<Omit<RankableBodyProps & import("../../hoc/with-sorted-page-rows").TableProps, "pageRows">>, nextState: Readonly<{
|
|
112
|
+
pageRows: RowType[];
|
|
113
|
+
}>, nextContext: any): void;
|
|
114
|
+
};
|
|
115
|
+
getDerivedStateFromProps(props: Omit<RankableBodyProps & import("../../hoc/with-sorted-page-rows").TableProps, "pageRows">, state: {
|
|
116
|
+
pageRows: RowType[];
|
|
117
|
+
}): {
|
|
118
|
+
pageRows: RowType[];
|
|
119
|
+
};
|
|
120
|
+
contextType?: React.Context<any> | undefined;
|
|
121
|
+
};
|
|
122
|
+
export default _default;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { WithDimensionsProps } from '../../hoc/with-dimensions';
|
|
3
|
+
import { HeadCellType, RowCellType } from '../../types';
|
|
4
|
+
export interface RankableTableCellProps extends WithDimensionsProps {
|
|
5
|
+
head?: HeadCellType;
|
|
6
|
+
cell: RowCellType;
|
|
7
|
+
isFixedSize: boolean;
|
|
8
|
+
testId?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare class RankableTableCell extends React.Component<RankableTableCellProps, {}> {
|
|
11
|
+
render(): JSX.Element;
|
|
12
|
+
}
|
|
13
|
+
declare const _default: React.ComponentClass<Omit<RankableTableCellProps, "innerRef" | "refWidth" | "refHeight">, import("../../hoc/with-dimensions").State>;
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { WithDimensionsProps } from '../../hoc/with-dimensions';
|
|
3
|
+
import { TableHeadCellProps } from '../table-head-cell';
|
|
4
|
+
declare const _default: React.ComponentClass<Omit<WithDimensionsProps & TableHeadCellProps, "innerRef" | "refWidth" | "refHeight">, import("../../hoc/with-dimensions").State>;
|
|
5
|
+
export default _default;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { WithDimensionsProps } from '../../hoc/with-dimensions';
|
|
3
|
+
import { HeadType, RowType } from '../../types';
|
|
4
|
+
export interface RankableTableRowProps extends WithDimensionsProps {
|
|
5
|
+
head?: HeadType;
|
|
6
|
+
isFixedSize: boolean;
|
|
7
|
+
row: RowType;
|
|
8
|
+
rowIndex: number;
|
|
9
|
+
isRankingDisabled: boolean;
|
|
10
|
+
isHighlighted?: boolean;
|
|
11
|
+
testId?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare class RankableTableRow extends React.Component<RankableTableRowProps> {
|
|
14
|
+
innerRef: (innerRefFn: Function) => (ref: HTMLTableRowElement) => void;
|
|
15
|
+
render(): JSX.Element;
|
|
16
|
+
}
|
|
17
|
+
declare const _default: React.ComponentClass<Omit<RankableTableRowProps, "innerRef" | "refWidth" | "refHeight">, import("../../hoc/with-dimensions").State>;
|
|
18
|
+
export default _default;
|