@atlaskit/dynamic-table 14.10.0 → 14.11.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.
Files changed (50) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/components/body.js +10 -3
  3. package/dist/cjs/components/loading-container-advanced.js +14 -39
  4. package/dist/cjs/components/rankable/body.js +15 -3
  5. package/dist/cjs/components/stateless.js +4 -5
  6. package/dist/cjs/hoc/with-sorted-page-rows.js +11 -3
  7. package/dist/cjs/styled/constants.js +0 -2
  8. package/dist/cjs/styled/dynamic-table.js +1 -1
  9. package/dist/cjs/styled/empty-body.js +2 -2
  10. package/dist/cjs/styled/loading-container-advanced.js +5 -4
  11. package/dist/cjs/styled/rankable/table-row.js +2 -2
  12. package/dist/cjs/styled/table-head.js +3 -3
  13. package/dist/cjs/version.json +1 -1
  14. package/dist/es2019/components/body.js +10 -3
  15. package/dist/es2019/components/loading-container-advanced.js +14 -32
  16. package/dist/es2019/components/rankable/body.js +15 -3
  17. package/dist/es2019/components/stateless.js +4 -5
  18. package/dist/es2019/hoc/with-sorted-page-rows.js +11 -4
  19. package/dist/es2019/styled/constants.js +0 -2
  20. package/dist/es2019/styled/dynamic-table.js +1 -1
  21. package/dist/es2019/styled/empty-body.js +2 -2
  22. package/dist/es2019/styled/loading-container-advanced.js +5 -4
  23. package/dist/es2019/styled/rankable/table-row.js +2 -2
  24. package/dist/es2019/styled/table-head.js +3 -3
  25. package/dist/es2019/version.json +1 -1
  26. package/dist/esm/components/body.js +10 -3
  27. package/dist/esm/components/loading-container-advanced.js +14 -39
  28. package/dist/esm/components/rankable/body.js +15 -3
  29. package/dist/esm/components/stateless.js +4 -5
  30. package/dist/esm/hoc/with-sorted-page-rows.js +11 -3
  31. package/dist/esm/styled/constants.js +0 -2
  32. package/dist/esm/styled/dynamic-table.js +1 -1
  33. package/dist/esm/styled/empty-body.js +2 -2
  34. package/dist/esm/styled/loading-container-advanced.js +5 -4
  35. package/dist/esm/styled/rankable/table-row.js +2 -2
  36. package/dist/esm/styled/table-head.js +3 -3
  37. package/dist/esm/version.json +1 -1
  38. package/dist/types/components/body.d.ts +4 -102
  39. package/dist/types/components/loading-container-advanced.d.ts +4 -7
  40. package/dist/types/components/rankable/body.d.ts +5 -103
  41. package/dist/types/components/stateless.d.ts +1 -1
  42. package/dist/types/hoc/with-sorted-page-rows.d.ts +3 -102
  43. package/dist/types/styled/loading-container-advanced.d.ts +1 -2
  44. package/dist/types-ts4.5/components/body.d.ts +4 -102
  45. package/dist/types-ts4.5/components/loading-container-advanced.d.ts +4 -7
  46. package/dist/types-ts4.5/components/rankable/body.d.ts +5 -103
  47. package/dist/types-ts4.5/components/stateless.d.ts +1 -1
  48. package/dist/types-ts4.5/hoc/with-sorted-page-rows.d.ts +3 -102
  49. package/dist/types-ts4.5/styled/loading-container-advanced.d.ts +1 -2
  50. package/package.json +5 -4
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { DragStart, DropResult } from 'react-beautiful-dnd';
3
3
  import { WithSortedPageRowsProps } from '../../hoc/with-sorted-page-rows';
4
- import { HeadType, RankEnd, RankStart, RowType } from '../../types';
4
+ import { HeadType, RankEnd, RankStart } from '../../types';
5
5
  export interface RankableBodyProps extends WithSortedPageRowsProps {
6
6
  highlightedRowIndex?: number | number[];
7
7
  onRankStart: (rankStart: RankStart) => void;
@@ -11,112 +11,14 @@ export interface RankableBodyProps extends WithSortedPageRowsProps {
11
11
  isRankingDisabled: boolean;
12
12
  head?: HeadType;
13
13
  testId?: string;
14
+ forwardedRef?: React.Ref<HTMLTableSectionElement>;
14
15
  }
15
16
  export declare class RankableBody extends React.Component<RankableBodyProps, {}> {
16
17
  onBeforeDragStart: (dragStart: DragStart) => void;
17
18
  onDragEnd: (result: DropResult) => void;
18
19
  render(): JSX.Element;
19
20
  }
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
- };
21
+ declare const _default: React.ForwardRefExoticComponent<Omit<RankableBodyProps & import("../../hoc/with-sorted-page-rows").TableProps, "pageRows"> & {
22
+ forwardedRef?: React.RefObject<HTMLTableSectionElement> | undefined;
23
+ } & React.RefAttributes<HTMLTableSectionElement>>;
122
24
  export default _default;
@@ -6,7 +6,7 @@ export interface State {
6
6
  isRanking: boolean;
7
7
  }
8
8
  declare class DynamicTable extends React.Component<Props, State> {
9
- tableBody?: HTMLDivElement;
9
+ tableBody: React.RefObject<HTMLTableSectionElement>;
10
10
  state: {
11
11
  isRanking: boolean;
12
12
  };
@@ -13,105 +13,6 @@ export interface WithSortedPageRowsProps {
13
13
  pageRows: Array<RowType>;
14
14
  isTotalPagesControlledExternally?: boolean;
15
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
- };
16
+ export default function withSortedPageRows<WrappedComponentProps extends WithSortedPageRowsProps & TableProps, RefType = HTMLTableSectionElement>(WrappedComponent: React.ComponentType<WrappedComponentProps>): React.ForwardRefExoticComponent<React.PropsWithoutRef<Omit<WrappedComponentProps & TableProps, "pageRows"> & {
17
+ forwardedRef?: React.RefObject<RefType> | undefined;
18
+ }> & React.RefAttributes<RefType>>;
@@ -1,10 +1,9 @@
1
1
  /** @jsx jsx */
2
2
  import { FC, HTMLProps, ReactNode } from 'react';
3
- import { jsx } from '@emotion/react';
4
3
  type ContainerProps = HTMLProps<HTMLDivElement> & {
5
4
  testId?: string;
6
5
  };
7
- export declare const Container: (props: ContainerProps) => jsx.JSX.Element;
6
+ export declare const Container: import("react").ForwardRefExoticComponent<Pick<ContainerProps, "headers" | "method" | "rows" | "testId" | "label" | "cite" | "data" | "form" | "span" | "style" | "summary" | "title" | "pattern" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "tabIndex" | "inputMode" | "is" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "width" | "height" | "content" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "dateTime" | "default" | "defer" | "disabled" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "list" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "min" | "minLength" | "multiple" | "muted" | "name" | "nonce" | "noValidate" | "open" | "optimum" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "size" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "target" | "type" | "useMap" | "value" | "wmode" | "wrap"> & import("react").RefAttributes<HTMLDivElement>>;
8
7
  type SpinnerBackdropProps = {
9
8
  testId?: string;
10
9
  children: ReactNode;
@@ -5,108 +5,10 @@ interface BodyProps extends WithSortedPageRowsProps {
5
5
  head?: HeadType;
6
6
  highlightedRowIndex?: number | number[];
7
7
  isFixedSize: boolean;
8
+ forwardedRef?: React.Ref<HTMLTableSectionElement>;
8
9
  testId?: string;
9
10
  }
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
- };
11
+ declare const _default: React.ForwardRefExoticComponent<Omit<BodyProps & import("../hoc/with-sorted-page-rows").TableProps, "pageRows"> & {
12
+ forwardedRef?: React.RefObject<HTMLTableSectionElement> | undefined;
13
+ } & React.RefAttributes<HTMLTableSectionElement>>;
112
14
  export default _default;
@@ -1,16 +1,15 @@
1
1
  import React from 'react';
2
2
  import type { SpinnerSizeType } from '../types';
3
3
  export interface LoadingContainerAdvancedProps {
4
- children: React.ReactElement<any>;
5
4
  isLoading?: boolean;
6
5
  spinnerSize?: SpinnerSizeType;
7
6
  contentsOpacity: number | string;
8
- targetRef?: () => HTMLDivElement | undefined;
7
+ targetRef?: () => HTMLTableSectionElement | null;
9
8
  testId?: string;
10
9
  }
11
10
  export default class LoadingContainerAdvanced extends React.Component<LoadingContainerAdvancedProps, {}> {
12
- children?: HTMLElement;
13
- spinnerRef?: HTMLDivElement;
11
+ spinnerRef: React.RefObject<HTMLDivElement>;
12
+ containerRef: React.RefObject<HTMLDivElement>;
14
13
  static defaultProps: {
15
14
  isLoading: boolean;
16
15
  spinnerSize: string;
@@ -20,9 +19,7 @@ export default class LoadingContainerAdvanced extends React.Component<LoadingCon
20
19
  UNSAFE_componentWillReceiveProps: (nextProps: LoadingContainerAdvancedProps) => void;
21
20
  componentDidUpdate: () => void;
22
21
  componentWillUnmount: () => void;
23
- getTargetNode: (nextProps?: LoadingContainerAdvancedProps) => Element | Text | null;
24
- getThisNode: () => Element | Text | null;
25
- getSpinnerNode: () => Element | Text | null;
22
+ getTargetNode: (nextProps?: LoadingContainerAdvancedProps) => HTMLDivElement | null;
26
23
  hasTargetNode: (nextProps?: LoadingContainerAdvancedProps) => boolean;
27
24
  isVerticallyVisible: (elementRect: {
28
25
  top: number;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { DragStart, DropResult } from 'react-beautiful-dnd';
3
3
  import { WithSortedPageRowsProps } from '../../hoc/with-sorted-page-rows';
4
- import { HeadType, RankEnd, RankStart, RowType } from '../../types';
4
+ import { HeadType, RankEnd, RankStart } from '../../types';
5
5
  export interface RankableBodyProps extends WithSortedPageRowsProps {
6
6
  highlightedRowIndex?: number | number[];
7
7
  onRankStart: (rankStart: RankStart) => void;
@@ -11,112 +11,14 @@ export interface RankableBodyProps extends WithSortedPageRowsProps {
11
11
  isRankingDisabled: boolean;
12
12
  head?: HeadType;
13
13
  testId?: string;
14
+ forwardedRef?: React.Ref<HTMLTableSectionElement>;
14
15
  }
15
16
  export declare class RankableBody extends React.Component<RankableBodyProps, {}> {
16
17
  onBeforeDragStart: (dragStart: DragStart) => void;
17
18
  onDragEnd: (result: DropResult) => void;
18
19
  render(): JSX.Element;
19
20
  }
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
- };
21
+ declare const _default: React.ForwardRefExoticComponent<Omit<RankableBodyProps & import("../../hoc/with-sorted-page-rows").TableProps, "pageRows"> & {
22
+ forwardedRef?: React.RefObject<HTMLTableSectionElement> | undefined;
23
+ } & React.RefAttributes<HTMLTableSectionElement>>;
122
24
  export default _default;
@@ -6,7 +6,7 @@ export interface State {
6
6
  isRanking: boolean;
7
7
  }
8
8
  declare class DynamicTable extends React.Component<Props, State> {
9
- tableBody?: HTMLDivElement;
9
+ tableBody: React.RefObject<HTMLTableSectionElement>;
10
10
  state: {
11
11
  isRanking: boolean;
12
12
  };