@elliemae/ds-shared 3.22.0-next.3 → 3.22.0-next.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.
@@ -0,0 +1,63 @@
1
+ import React from 'react';
2
+ import hoistNonReactStatic from 'hoist-non-react-statics';
3
+ /**
4
+ * Allows two animation frames to complete to allow other components to update
5
+ * and re-render before mounting and rendering an expensive `WrappedComponent`.
6
+ *
7
+ * @param WrappedComponent
8
+ * @param fallback
9
+ */
10
+ export declare const deferComponentRender: (WrappedComponent: any, fallback: any) => {
11
+ new (props: {} | Readonly<{}>): {
12
+ state: {
13
+ shouldRender: boolean;
14
+ };
15
+ componentDidMount(): void;
16
+ render(): any;
17
+ context: unknown;
18
+ setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<{}>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
19
+ forceUpdate(callback?: (() => void) | undefined): void;
20
+ readonly props: Readonly<{}>;
21
+ refs: {
22
+ [key: string]: React.ReactInstance;
23
+ };
24
+ shouldComponentUpdate?(nextProps: Readonly<{}>, nextState: Readonly<{}>, nextContext: any): boolean;
25
+ componentWillUnmount?(): void;
26
+ componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
27
+ getSnapshotBeforeUpdate?(prevProps: Readonly<{}>, prevState: Readonly<{}>): any;
28
+ componentDidUpdate?(prevProps: Readonly<{}>, prevState: Readonly<{}>, snapshot?: any): void;
29
+ componentWillMount?(): void;
30
+ UNSAFE_componentWillMount?(): void;
31
+ componentWillReceiveProps?(nextProps: Readonly<{}>, nextContext: any): void;
32
+ UNSAFE_componentWillReceiveProps?(nextProps: Readonly<{}>, nextContext: any): void;
33
+ componentWillUpdate?(nextProps: Readonly<{}>, nextState: Readonly<{}>, nextContext: any): void;
34
+ UNSAFE_componentWillUpdate?(nextProps: Readonly<{}>, nextState: Readonly<{}>, nextContext: any): void;
35
+ };
36
+ new (props: {}, context: any): {
37
+ state: {
38
+ shouldRender: boolean;
39
+ };
40
+ componentDidMount(): void;
41
+ render(): any;
42
+ context: unknown;
43
+ setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<{}>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
44
+ forceUpdate(callback?: (() => void) | undefined): void;
45
+ readonly props: Readonly<{}>;
46
+ refs: {
47
+ [key: string]: React.ReactInstance;
48
+ };
49
+ shouldComponentUpdate?(nextProps: Readonly<{}>, nextState: Readonly<{}>, nextContext: any): boolean;
50
+ componentWillUnmount?(): void;
51
+ componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
52
+ getSnapshotBeforeUpdate?(prevProps: Readonly<{}>, prevState: Readonly<{}>): any;
53
+ componentDidUpdate?(prevProps: Readonly<{}>, prevState: Readonly<{}>, snapshot?: any): void;
54
+ componentWillMount?(): void;
55
+ UNSAFE_componentWillMount?(): void;
56
+ componentWillReceiveProps?(nextProps: Readonly<{}>, nextContext: any): void;
57
+ UNSAFE_componentWillReceiveProps?(nextProps: Readonly<{}>, nextContext: any): void;
58
+ componentWillUpdate?(nextProps: Readonly<{}>, nextState: Readonly<{}>, nextContext: any): void;
59
+ UNSAFE_componentWillUpdate?(nextProps: Readonly<{}>, nextState: Readonly<{}>, nextContext: any): void;
60
+ };
61
+ contextType?: React.Context<any> | undefined;
62
+ } & hoistNonReactStatic.NonReactStatics<any, {}>;
63
+ export default deferComponentRender;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-shared",
3
- "version": "3.22.0-next.3",
3
+ "version": "3.22.0-next.5",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Shared components and utilities",
6
6
  "files": [
@@ -224,12 +224,12 @@
224
224
  "react-window": "~1.8.8",
225
225
  "table-resolver": "~4.1.1",
226
226
  "uuid": "~8.3.2",
227
- "@elliemae/ds-popover": "3.22.0-next.3",
228
- "@elliemae/ds-utilities": "3.22.0-next.3"
227
+ "@elliemae/ds-popover": "3.22.0-next.5",
228
+ "@elliemae/ds-utilities": "3.22.0-next.5"
229
229
  },
230
230
  "devDependencies": {
231
231
  "@elliemae/pui-cli": "~9.0.0-next.17",
232
- "@elliemae/ds-monorepo-devops": "3.22.0-next.3"
232
+ "@elliemae/ds-monorepo-devops": "3.22.0-next.5"
233
233
  },
234
234
  "peerDependencies": {
235
235
  "lodash": "~4.17.21",