@atlaskit/dynamic-table 14.8.4 → 14.8.5

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.
Files changed (40) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/cjs/components/stateless.js +1 -1
  3. package/dist/cjs/version.json +1 -1
  4. package/dist/es2019/components/stateless.js +1 -1
  5. package/dist/es2019/version.json +1 -1
  6. package/dist/esm/components/stateless.js +1 -1
  7. package/dist/esm/version.json +1 -1
  8. package/package.json +4 -12
  9. package/report.api.md +113 -337
  10. package/dist/types-ts4.0/components/body.d.ts +0 -112
  11. package/dist/types-ts4.0/components/loading-container-advanced.d.ts +0 -43
  12. package/dist/types-ts4.0/components/loading-container.d.ts +0 -18
  13. package/dist/types-ts4.0/components/managed-pagination.d.ts +0 -15
  14. package/dist/types-ts4.0/components/rankable/body.d.ts +0 -122
  15. package/dist/types-ts4.0/components/rankable/table-cell.d.ts +0 -14
  16. package/dist/types-ts4.0/components/rankable/table-head-cell.d.ts +0 -5
  17. package/dist/types-ts4.0/components/rankable/table-row.d.ts +0 -18
  18. package/dist/types-ts4.0/components/stateful.d.ts +0 -60
  19. package/dist/types-ts4.0/components/stateless.d.ts +0 -58
  20. package/dist/types-ts4.0/components/table-head-cell.d.ts +0 -17
  21. package/dist/types-ts4.0/components/table-head.d.ts +0 -19
  22. package/dist/types-ts4.0/components/table-row.d.ts +0 -11
  23. package/dist/types-ts4.0/hoc/with-dimensions.d.ts +0 -12
  24. package/dist/types-ts4.0/hoc/with-sorted-page-rows.d.ts +0 -117
  25. package/dist/types-ts4.0/index.d.ts +0 -2
  26. package/dist/types-ts4.0/internal/constants.d.ts +0 -5
  27. package/dist/types-ts4.0/internal/helpers.d.ts +0 -7
  28. package/dist/types-ts4.0/styled/constants.d.ts +0 -17
  29. package/dist/types-ts4.0/styled/dynamic-table.d.ts +0 -15
  30. package/dist/types-ts4.0/styled/empty-body.d.ts +0 -4
  31. package/dist/types-ts4.0/styled/loading-container-advanced.d.ts +0 -6
  32. package/dist/types-ts4.0/styled/loading-container.d.ts +0 -9
  33. package/dist/types-ts4.0/styled/rankable/row-placeholder.d.ts +0 -3
  34. package/dist/types-ts4.0/styled/rankable/table-cell.d.ts +0 -8
  35. package/dist/types-ts4.0/styled/rankable/table-row.d.ts +0 -11
  36. package/dist/types-ts4.0/styled/table-cell.d.ts +0 -4
  37. package/dist/types-ts4.0/styled/table-head.d.ts +0 -15
  38. package/dist/types-ts4.0/styled/table-row.d.ts +0 -9
  39. package/dist/types-ts4.0/theme.d.ts +0 -22
  40. package/dist/types-ts4.0/types.d.ts +0 -345
@@ -1,112 +0,0 @@
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;
@@ -1,43 +0,0 @@
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 | undefined) => 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 | undefined) => void;
40
- updateTargetAppearance: () => void;
41
- updateSpinnerPosition(): void;
42
- render(): JSX.Element;
43
- }
@@ -1,18 +0,0 @@
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 {};
@@ -1,15 +0,0 @@
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 | undefined) => void;
13
- render(): JSX.Element;
14
- }
15
- export {};
@@ -1,122 +0,0 @@
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;
@@ -1,14 +0,0 @@
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;
@@ -1,5 +0,0 @@
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;
@@ -1,18 +0,0 @@
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;
@@ -1,60 +0,0 @@
1
- import React from 'react';
2
- import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
3
- import noop from '@atlaskit/ds-lib/noop';
4
- import { RankEnd, RowType, SortOrderType, StatefulProps } from '../types';
5
- interface State {
6
- page?: number;
7
- sortKey?: string;
8
- sortOrder?: SortOrderType;
9
- rows?: RowType[];
10
- }
11
- /**
12
- * __Dynamic Table__
13
- *
14
- * A table displays rows of data with built-in pagination, sorting, and re-ordering functionality.
15
- *
16
- * - [Examples](https://atlaskit.atlassian.com/packages/design-system/dynamic-table)
17
- * - [Code](https://bitbucket.org/atlassian/atlassian-frontend/packages/design-system/dynamic-table)
18
- *
19
- * @example
20
- * ```jsx
21
- * import DynamicTable from '@atlaskit/dynamic-table';
22
- *
23
- * export default function TableUncontrolled() {
24
- * return (
25
- * <DynamicTable
26
- * head={head}
27
- * rows={rows}
28
- * rowsPerPage={10}
29
- * defaultPage={1}
30
- * loadingSpinnerSize="large"
31
- * isLoading={false}
32
- * />
33
- * );
34
- * }
35
- * ```
36
- */
37
- export default class DynamicTable extends React.Component<StatefulProps, State> {
38
- static defaultProps: {
39
- defaultPage: number;
40
- isLoading: boolean;
41
- isFixedSize: boolean;
42
- isRankable: boolean;
43
- onSetPage: typeof noop;
44
- onSort: typeof noop;
45
- rowsPerPage: number;
46
- };
47
- state: {
48
- page: number | undefined;
49
- sortKey: string | undefined;
50
- sortOrder: SortOrderType | undefined;
51
- rows: RowType[] | undefined;
52
- };
53
- UNSAFE_componentWillReceiveProps(newProps: StatefulProps): void;
54
- onSetPage: (page: number, analyticsEvent?: UIAnalyticsEvent | undefined) => void;
55
- onSort: ({ key, item, sortOrder }: any, analyticsEvent?: UIAnalyticsEvent | undefined) => void;
56
- onRankEndIfExists: (params: RankEnd) => void;
57
- onRankEnd: (params: RankEnd) => void;
58
- render(): JSX.Element;
59
- }
60
- export {};
@@ -1,58 +0,0 @@
1
- import React from 'react';
2
- import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
3
- import noop from '@atlaskit/ds-lib/noop';
4
- import { StatelessProps as Props, RankEnd, RankStart, RowCellType } from '../types';
5
- export interface State {
6
- isRanking: boolean;
7
- }
8
- declare class DynamicTable extends React.Component<Props, State> {
9
- tableBody?: HTMLDivElement;
10
- state: {
11
- isRanking: boolean;
12
- };
13
- static defaultProps: {
14
- isLoading: boolean;
15
- isFixedSize: boolean;
16
- rowsPerPage: number;
17
- onSetPage: typeof noop;
18
- onSort: typeof noop;
19
- page: number;
20
- isRankable: boolean;
21
- isRankingDisabled: boolean;
22
- onRankStart: typeof noop;
23
- onRankEnd: typeof noop;
24
- paginationi18n: {
25
- prev: string;
26
- next: string;
27
- label: string;
28
- };
29
- };
30
- UNSAFE_componentWillMount(): void;
31
- UNSAFE_componentWillReceiveProps(nextProps: Props): void;
32
- onSort: (item: RowCellType) => () => void;
33
- onSetPage: (page: number, event?: UIAnalyticsEvent | undefined) => void;
34
- onRankStart: (params: RankStart) => void;
35
- onRankEnd: (params: RankEnd) => void;
36
- getSpinnerSize: () => import("../types").LoadingSpinnerSizeType;
37
- renderEmptyBody: () => JSX.Element | undefined;
38
- render(): JSX.Element;
39
- }
40
- export { DynamicTable as DynamicTableWithoutAnalytics };
41
- declare const _default: React.ForwardRefExoticComponent<Pick<Pick<Omit<Props, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "head" | "caption" | "rows" | "emptyView" | "loadingSpinnerSize" | "totalRows" | "onPageRowsUpdate" | "sortKey" | "sortOrder" | "highlightedRowIndex" | "testId" | "label"> & Partial<Pick<Omit<Props, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "isLoading" | "isFixedSize" | "rowsPerPage" | "onSetPage" | "onSort" | "page" | "isRankable" | "isRankingDisabled" | "onRankStart" | "onRankEnd" | "paginationi18n">> & Partial<Pick<{
42
- isLoading: boolean;
43
- isFixedSize: boolean;
44
- rowsPerPage: number;
45
- onSetPage: typeof noop;
46
- onSort: typeof noop;
47
- page: number;
48
- isRankable: boolean;
49
- isRankingDisabled: boolean;
50
- onRankStart: typeof noop;
51
- onRankEnd: typeof noop;
52
- paginationi18n: {
53
- prev: string;
54
- next: string;
55
- label: string;
56
- };
57
- }, never>> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "head" | "caption" | "rows" | "emptyView" | "loadingSpinnerSize" | "isLoading" | "isFixedSize" | "rowsPerPage" | "totalRows" | "onSetPage" | "onSort" | "onPageRowsUpdate" | "page" | "sortKey" | "sortOrder" | "isRankable" | "isRankingDisabled" | "onRankStart" | "onRankEnd" | "paginationi18n" | "highlightedRowIndex" | "testId" | "label" | "key" | "analyticsContext"> & React.RefAttributes<any>>;
58
- export default _default;
@@ -1,17 +0,0 @@
1
- import React, { FC, KeyboardEvent, LegacyRef } from 'react';
2
- import { SortOrderType } from '../types';
3
- export interface TableHeadCellProps {
4
- sortKey?: string;
5
- isSortable?: boolean;
6
- sortOrder?: SortOrderType;
7
- isFixedSize?: boolean;
8
- innerRef?: LegacyRef<HTMLTableCellElement>;
9
- inlineStyles?: {};
10
- content?: React.ReactNode;
11
- onClick?: () => void;
12
- onKeyDown?: (e: KeyboardEvent) => void;
13
- testId?: string;
14
- isRanking?: boolean;
15
- }
16
- declare const TableHeadCell: FC<TableHeadCellProps>;
17
- export default TableHeadCell;
@@ -1,19 +0,0 @@
1
- import React, { KeyboardEvent } from 'react';
2
- import { HeadType, RowCellType, SortOrderType } from '../types';
3
- interface TableHeadProps {
4
- head: HeadType;
5
- sortKey?: string;
6
- sortOrder?: SortOrderType;
7
- isFixedSize?: boolean;
8
- onSort: (item: RowCellType) => () => void;
9
- isRankable?: boolean;
10
- isRanking: boolean;
11
- testId?: string;
12
- }
13
- declare class TableHead extends React.Component<TableHeadProps, {}> {
14
- UNSAFE_componentWillMount(): void;
15
- UNSAFE_componentWillReceiveProps(nextProps: TableHeadProps): void;
16
- canSortOnEnterPressed: (e: KeyboardEvent, isSortable: Boolean | void) => boolean | void;
17
- render(): JSX.Element | null;
18
- }
19
- export default TableHead;
@@ -1,11 +0,0 @@
1
- /// <reference types="react" />
2
- import { HeadType, RowType } from '../types';
3
- interface RowProps {
4
- head?: HeadType;
5
- isFixedSize: boolean;
6
- isHighlighted?: boolean;
7
- row: RowType;
8
- testId?: string;
9
- }
10
- declare const Row: ({ row, head, testId, isFixedSize, isHighlighted }: RowProps) => JSX.Element;
11
- export default Row;
@@ -1,12 +0,0 @@
1
- import React, { LegacyRef } from 'react';
2
- export interface State {
3
- refWidth: number;
4
- refHeight: number;
5
- }
6
- export interface WithDimensionsProps {
7
- innerRef?: LegacyRef<HTMLTableCellElement | HTMLTableRowElement>;
8
- isRanking: boolean;
9
- refWidth: number;
10
- refHeight: number;
11
- }
12
- export default function withDimensions<WrappedComponentProps extends WithDimensionsProps>(WrappedComponent: React.ComponentType<WrappedComponentProps>): React.ComponentClass<Omit<WrappedComponentProps, 'refWidth' | 'refHeight' | 'innerRef'>, State>;
@@ -1,117 +0,0 @@
1
- import React from 'react';
2
- import { HeadType, RowType, SortOrderType } from '../types';
3
- export interface TableProps {
4
- head?: HeadType;
5
- page?: number;
6
- rows?: Array<RowType>;
7
- rowsPerPage?: number;
8
- sortKey?: string;
9
- sortOrder?: SortOrderType;
10
- onPageRowsUpdate?: (pageRows: Array<RowType>) => void;
11
- }
12
- export interface WithSortedPageRowsProps {
13
- pageRows: Array<RowType>;
14
- isTotalPagesControlledExternally?: boolean;
15
- }
16
- export default function withSortedPageRows<WrappedComponentProps extends WithSortedPageRowsProps & TableProps>(WrappedComponent: React.ComponentType<WrappedComponentProps>): {
17
- new (props: Readonly<Omit<WrappedComponentProps & TableProps, "pageRows">>): {
18
- state: {
19
- pageRows: never[];
20
- };
21
- componentDidMount(): void;
22
- componentDidUpdate(_prevProps: Omit<WrappedComponentProps & TableProps, "pageRows">, prevState: {
23
- pageRows: Array<RowType>;
24
- }): void;
25
- render(): JSX.Element;
26
- context: any;
27
- setState<K extends "pageRows">(state: {
28
- pageRows: Array<RowType>;
29
- } | ((prevState: Readonly<{
30
- pageRows: Array<RowType>;
31
- }>, props: Readonly<Omit<WrappedComponentProps & TableProps, "pageRows">>) => {
32
- pageRows: Array<RowType>;
33
- } | Pick<{
34
- pageRows: Array<RowType>;
35
- }, K> | null) | Pick<{
36
- pageRows: Array<RowType>;
37
- }, K> | null, callback?: (() => void) | undefined): void;
38
- forceUpdate(callBack?: (() => void) | undefined): void;
39
- readonly props: Readonly<Omit<WrappedComponentProps & TableProps, "pageRows">> & Readonly<{
40
- children?: React.ReactNode;
41
- }>;
42
- refs: {
43
- [key: string]: React.ReactInstance;
44
- };
45
- shouldComponentUpdate?(nextProps: Readonly<Omit<WrappedComponentProps & TableProps, "pageRows">>, nextState: Readonly<{
46
- pageRows: Array<RowType>;
47
- }>, nextContext: any): boolean;
48
- componentWillUnmount?(): void;
49
- componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
50
- getSnapshotBeforeUpdate?(prevProps: Readonly<Omit<WrappedComponentProps & TableProps, "pageRows">>, prevState: Readonly<{
51
- pageRows: Array<RowType>;
52
- }>): any;
53
- componentWillMount?(): void;
54
- UNSAFE_componentWillMount?(): void;
55
- componentWillReceiveProps?(nextProps: Readonly<Omit<WrappedComponentProps & TableProps, "pageRows">>, nextContext: any): void;
56
- UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Omit<WrappedComponentProps & TableProps, "pageRows">>, nextContext: any): void;
57
- componentWillUpdate?(nextProps: Readonly<Omit<WrappedComponentProps & TableProps, "pageRows">>, nextState: Readonly<{
58
- pageRows: Array<RowType>;
59
- }>, nextContext: any): void;
60
- UNSAFE_componentWillUpdate?(nextProps: Readonly<Omit<WrappedComponentProps & TableProps, "pageRows">>, nextState: Readonly<{
61
- pageRows: Array<RowType>;
62
- }>, nextContext: any): void;
63
- };
64
- new (props: Omit<WrappedComponentProps & TableProps, "pageRows">, context?: any): {
65
- state: {
66
- pageRows: never[];
67
- };
68
- componentDidMount(): void;
69
- componentDidUpdate(_prevProps: Omit<WrappedComponentProps & TableProps, "pageRows">, prevState: {
70
- pageRows: Array<RowType>;
71
- }): void;
72
- render(): JSX.Element;
73
- context: any;
74
- setState<K extends "pageRows">(state: {
75
- pageRows: Array<RowType>;
76
- } | ((prevState: Readonly<{
77
- pageRows: Array<RowType>;
78
- }>, props: Readonly<Omit<WrappedComponentProps & TableProps, "pageRows">>) => {
79
- pageRows: Array<RowType>;
80
- } | Pick<{
81
- pageRows: Array<RowType>;
82
- }, K> | null) | Pick<{
83
- pageRows: Array<RowType>;
84
- }, K> | null, callback?: (() => void) | undefined): void;
85
- forceUpdate(callBack?: (() => void) | undefined): void;
86
- readonly props: Readonly<Omit<WrappedComponentProps & TableProps, "pageRows">> & Readonly<{
87
- children?: React.ReactNode;
88
- }>;
89
- refs: {
90
- [key: string]: React.ReactInstance;
91
- };
92
- shouldComponentUpdate?(nextProps: Readonly<Omit<WrappedComponentProps & TableProps, "pageRows">>, nextState: Readonly<{
93
- pageRows: Array<RowType>;
94
- }>, nextContext: any): boolean;
95
- componentWillUnmount?(): void;
96
- componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
97
- getSnapshotBeforeUpdate?(prevProps: Readonly<Omit<WrappedComponentProps & TableProps, "pageRows">>, prevState: Readonly<{
98
- pageRows: Array<RowType>;
99
- }>): any;
100
- componentWillMount?(): void;
101
- UNSAFE_componentWillMount?(): void;
102
- componentWillReceiveProps?(nextProps: Readonly<Omit<WrappedComponentProps & TableProps, "pageRows">>, nextContext: any): void;
103
- UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Omit<WrappedComponentProps & TableProps, "pageRows">>, nextContext: any): void;
104
- componentWillUpdate?(nextProps: Readonly<Omit<WrappedComponentProps & TableProps, "pageRows">>, nextState: Readonly<{
105
- pageRows: Array<RowType>;
106
- }>, nextContext: any): void;
107
- UNSAFE_componentWillUpdate?(nextProps: Readonly<Omit<WrappedComponentProps & TableProps, "pageRows">>, nextState: Readonly<{
108
- pageRows: Array<RowType>;
109
- }>, nextContext: any): void;
110
- };
111
- getDerivedStateFromProps(props: Omit<WrappedComponentProps & TableProps, 'pageRows'>, state: {
112
- pageRows: Array<RowType>;
113
- }): {
114
- pageRows: RowType[];
115
- };
116
- contextType?: React.Context<any> | undefined;
117
- };