@elliemae/ds-utilities 2.3.0-alpha.7 → 2.3.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/capitalize.js +7 -0
- package/cjs/compose.js +38 -0
- package/cjs/getComponentFromProps.js +30 -0
- package/cjs/hooks/index.js +63 -0
- package/cjs/hooks/useCancellableDelayedCallback.js +26 -0
- package/cjs/hooks/useDerivedStateFromProps.js +56 -0
- package/cjs/hooks/useExecutionTimer.js +31 -0
- package/cjs/hooks/useExpandState.js +133 -0
- package/cjs/hooks/useHotkeys.js +25 -0
- package/cjs/hooks/useHoverHandlersDelay.js +28 -0
- package/cjs/hooks/useIsShowingEllipsis.js +36 -0
- package/cjs/hooks/useOnElementResize.js +38 -0
- package/cjs/hooks/useParentElement.js +16 -0
- package/cjs/hooks/usePrevious.js +13 -0
- package/cjs/hooks/useResizeObserver.js +33 -0
- package/cjs/hooks/useSetRef.js +15 -0
- package/cjs/hooks/useShouldRecalculate.js +17 -0
- package/cjs/hooks/useWindowScrollerList.js +65 -0
- package/cjs/hooks/useWindowSize.js +27 -0
- package/cjs/index.js +268 -0
- package/cjs/onClickHandlerForNonInteractiveElements.js +22 -0
- package/cjs/operators.js +63 -0
- package/cjs/platform.js +9 -0
- package/cjs/reactTypesUtility.js +35 -0
- package/cjs/scrollingTimer.js +24 -0
- package/cjs/system.js +43 -0
- package/cjs/timeUtils.js +25 -0
- package/cjs/utils.js +263 -0
- package/cjs/validations.js +44 -0
- package/esm/capitalize.js +3 -0
- package/esm/compose.js +34 -0
- package/esm/getComponentFromProps.js +23 -0
- package/esm/hooks/index.js +19 -0
- package/esm/hooks/useCancellableDelayedCallback.js +24 -0
- package/esm/hooks/useDerivedStateFromProps.js +54 -0
- package/esm/hooks/useExecutionTimer.js +29 -0
- package/esm/hooks/useExpandState.js +127 -0
- package/esm/hooks/useHotkeys.js +19 -0
- package/{dist/esm → esm}/hooks/useHoverHandlersDelay.js +12 -15
- package/{dist/esm → esm}/hooks/useIsShowingEllipsis.js +12 -9
- package/esm/hooks/useOnElementResize.js +34 -0
- package/esm/hooks/useParentElement.js +12 -0
- package/esm/hooks/usePrevious.js +11 -0
- package/esm/hooks/useResizeObserver.js +26 -0
- package/esm/hooks/useSetRef.js +11 -0
- package/esm/hooks/useShouldRecalculate.js +15 -0
- package/{dist/esm → esm}/hooks/useWindowScrollerList.js +29 -20
- package/esm/hooks/useWindowSize.js +25 -0
- package/esm/index.js +32 -0
- package/esm/onClickHandlerForNonInteractiveElements.js +20 -0
- package/esm/operators.js +46 -0
- package/esm/platform.js +4 -0
- package/esm/reactTypesUtility.js +22 -0
- package/esm/scrollingTimer.js +20 -0
- package/esm/system.js +37 -0
- package/esm/timeUtils.js +20 -0
- package/esm/utils.js +99 -0
- package/esm/validations.js +38 -0
- package/package.json +72 -74
- package/types/capitalize.d.ts +1 -0
- package/types/compose.d.ts +11 -0
- package/types/getComponentFromProps.d.ts +2 -0
- package/types/hooks/index.d.ts +19 -0
- package/types/hooks/useCancellableDelayedCallback.d.ts +1 -0
- package/types/hooks/useDerivedStateFromProps.d.ts +1 -0
- package/types/hooks/useExecutionTimer.d.ts +1 -0
- package/types/hooks/useExpandState.d.ts +22 -0
- package/types/hooks/useHotkeys.d.ts +5 -0
- package/types/hooks/useHoverHandlersDelay.d.ts +9 -0
- package/types/hooks/useIsShowingEllipsis.d.ts +5 -0
- package/types/hooks/useOnElementResize.d.ts +2 -0
- package/types/hooks/useParentElement.d.ts +1 -0
- package/types/hooks/usePrevious.d.ts +2 -0
- package/types/hooks/useResizeObserver.d.ts +2 -0
- package/types/hooks/useSetRef.d.ts +2 -0
- package/types/hooks/useShouldRecalculate.d.ts +1 -0
- package/types/hooks/useWindowScrollerList.d.ts +4 -0
- package/types/hooks/useWindowSize.d.ts +1 -0
- package/types/index.d.ts +13 -0
- package/types/onClickHandlerForNonInteractiveElements.d.ts +12 -0
- package/types/operators.d.ts +31 -0
- package/types/platform.d.ts +2 -0
- package/types/reactTypesUtility.d.ts +6 -0
- package/types/scrollingTimer.d.ts +1 -0
- package/types/system.d.ts +3 -0
- package/types/timeUtils.d.ts +7 -0
- package/types/utils.d.ts +23 -0
- package/types/validations.d.ts +23 -0
- package/dist/cjs/capitalize.js +0 -35
- package/dist/cjs/capitalize.js.map +0 -7
- package/dist/cjs/compose.js +0 -45
- package/dist/cjs/compose.js.map +0 -7
- package/dist/cjs/getComponentFromProps.js +0 -48
- package/dist/cjs/getComponentFromProps.js.map +0 -7
- package/dist/cjs/hooks/index.js +0 -71
- package/dist/cjs/hooks/index.js.map +0 -7
- package/dist/cjs/hooks/useCancellableDelayedCallback.js +0 -51
- package/dist/cjs/hooks/useCancellableDelayedCallback.js.map +0 -7
- package/dist/cjs/hooks/useDerivedStateFromProps.js +0 -67
- package/dist/cjs/hooks/useDerivedStateFromProps.js.map +0 -7
- package/dist/cjs/hooks/useExecutionTimer.js +0 -50
- package/dist/cjs/hooks/useExecutionTimer.js.map +0 -7
- package/dist/cjs/hooks/useExpandState.js +0 -120
- package/dist/cjs/hooks/useExpandState.js.map +0 -7
- package/dist/cjs/hooks/useHotkeys.js +0 -45
- package/dist/cjs/hooks/useHotkeys.js.map +0 -7
- package/dist/cjs/hooks/useHoverHandlersDelay.js +0 -58
- package/dist/cjs/hooks/useHoverHandlersDelay.js.map +0 -7
- package/dist/cjs/hooks/useIsShowingEllipsis.js +0 -58
- package/dist/cjs/hooks/useIsShowingEllipsis.js.map +0 -7
- package/dist/cjs/hooks/useOnElementResize.js +0 -54
- package/dist/cjs/hooks/useOnElementResize.js.map +0 -7
- package/dist/cjs/hooks/useParentElement.js +0 -43
- package/dist/cjs/hooks/useParentElement.js.map +0 -7
- package/dist/cjs/hooks/usePrevious.js +0 -44
- package/dist/cjs/hooks/usePrevious.js.map +0 -7
- package/dist/cjs/hooks/useResizeObserver.js +0 -60
- package/dist/cjs/hooks/useResizeObserver.js.map +0 -7
- package/dist/cjs/hooks/useSetRef.js +0 -42
- package/dist/cjs/hooks/useSetRef.js.map +0 -7
- package/dist/cjs/hooks/useShouldRecalculate.js +0 -44
- package/dist/cjs/hooks/useShouldRecalculate.js.map +0 -7
- package/dist/cjs/hooks/useWindowScrollerList.js +0 -83
- package/dist/cjs/hooks/useWindowScrollerList.js.map +0 -7
- package/dist/cjs/hooks/useWindowSize.js +0 -57
- package/dist/cjs/hooks/useWindowSize.js.map +0 -7
- package/dist/cjs/index.js +0 -146
- package/dist/cjs/index.js.map +0 -7
- package/dist/cjs/onClickHandlerForNonInteractiveElements.js +0 -49
- package/dist/cjs/onClickHandlerForNonInteractiveElements.js.map +0 -7
- package/dist/cjs/operators.js +0 -68
- package/dist/cjs/operators.js.map +0 -7
- package/dist/cjs/platform.js +0 -37
- package/dist/cjs/platform.js.map +0 -7
- package/dist/cjs/reactTypesUtility.js +0 -58
- package/dist/cjs/reactTypesUtility.js.map +0 -7
- package/dist/cjs/scrollingTimer.js +0 -46
- package/dist/cjs/scrollingTimer.js.map +0 -7
- package/dist/cjs/system.js +0 -60
- package/dist/cjs/system.js.map +0 -7
- package/dist/cjs/timeUtils.js +0 -43
- package/dist/cjs/timeUtils.js.map +0 -7
- package/dist/cjs/utils.js +0 -127
- package/dist/cjs/utils.js.map +0 -7
- package/dist/cjs/validations.js +0 -57
- package/dist/cjs/validations.js.map +0 -7
- package/dist/esm/capitalize.js +0 -6
- package/dist/esm/capitalize.js.map +0 -7
- package/dist/esm/compose.js +0 -16
- package/dist/esm/compose.js.map +0 -7
- package/dist/esm/getComponentFromProps.js +0 -19
- package/dist/esm/getComponentFromProps.js.map +0 -7
- package/dist/esm/hooks/index.js +0 -42
- package/dist/esm/hooks/index.js.map +0 -7
- package/dist/esm/hooks/useCancellableDelayedCallback.js +0 -22
- package/dist/esm/hooks/useCancellableDelayedCallback.js.map +0 -7
- package/dist/esm/hooks/useDerivedStateFromProps.js +0 -38
- package/dist/esm/hooks/useDerivedStateFromProps.js.map +0 -7
- package/dist/esm/hooks/useExecutionTimer.js +0 -21
- package/dist/esm/hooks/useExecutionTimer.js.map +0 -7
- package/dist/esm/hooks/useExpandState.js +0 -91
- package/dist/esm/hooks/useExpandState.js.map +0 -7
- package/dist/esm/hooks/useHotkeys.js +0 -16
- package/dist/esm/hooks/useHotkeys.js.map +0 -7
- package/dist/esm/hooks/useHoverHandlersDelay.js.map +0 -7
- package/dist/esm/hooks/useIsShowingEllipsis.js.map +0 -7
- package/dist/esm/hooks/useOnElementResize.js +0 -25
- package/dist/esm/hooks/useOnElementResize.js.map +0 -7
- package/dist/esm/hooks/useParentElement.js +0 -14
- package/dist/esm/hooks/useParentElement.js.map +0 -7
- package/dist/esm/hooks/usePrevious.js +0 -15
- package/dist/esm/hooks/usePrevious.js.map +0 -7
- package/dist/esm/hooks/useResizeObserver.js +0 -31
- package/dist/esm/hooks/useResizeObserver.js.map +0 -7
- package/dist/esm/hooks/useSetRef.js +0 -13
- package/dist/esm/hooks/useSetRef.js.map +0 -7
- package/dist/esm/hooks/useShouldRecalculate.js +0 -15
- package/dist/esm/hooks/useShouldRecalculate.js.map +0 -7
- package/dist/esm/hooks/useWindowScrollerList.js.map +0 -7
- package/dist/esm/hooks/useWindowSize.js +0 -28
- package/dist/esm/hooks/useWindowSize.js.map +0 -7
- package/dist/esm/index.js +0 -206
- package/dist/esm/index.js.map +0 -7
- package/dist/esm/onClickHandlerForNonInteractiveElements.js +0 -20
- package/dist/esm/onClickHandlerForNonInteractiveElements.js.map +0 -7
- package/dist/esm/operators.js +0 -39
- package/dist/esm/operators.js.map +0 -7
- package/dist/esm/platform.js +0 -8
- package/dist/esm/platform.js.map +0 -7
- package/dist/esm/reactTypesUtility.js +0 -29
- package/dist/esm/reactTypesUtility.js.map +0 -7
- package/dist/esm/scrollingTimer.js +0 -17
- package/dist/esm/scrollingTimer.js.map +0 -7
- package/dist/esm/system.js +0 -31
- package/dist/esm/system.js.map +0 -7
- package/dist/esm/timeUtils.js +0 -14
- package/dist/esm/timeUtils.js.map +0 -7
- package/dist/esm/utils.js +0 -136
- package/dist/esm/utils.js.map +0 -7
- package/dist/esm/validations.js +0 -28
- package/dist/esm/validations.js.map +0 -7
package/package.json
CHANGED
|
@@ -1,130 +1,127 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-utilities",
|
|
3
|
-
"version": "2.3.0-
|
|
3
|
+
"version": "2.3.0-next.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Utilities",
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"module": "./dist/esm/index.js",
|
|
10
|
-
"main": "./dist/cjs/index.js",
|
|
11
|
-
"types": "./dist/types/index.d.ts",
|
|
6
|
+
"module": "./esm/index.js",
|
|
7
|
+
"main": "./cjs/index.js",
|
|
8
|
+
"types": "./types/index.d.ts",
|
|
12
9
|
"exports": {
|
|
13
10
|
".": {
|
|
14
|
-
"import": "./
|
|
15
|
-
"require": "./
|
|
11
|
+
"import": "./esm/index.js",
|
|
12
|
+
"require": "./cjs/index.js"
|
|
16
13
|
},
|
|
17
14
|
"./validations": {
|
|
18
|
-
"import": "./
|
|
19
|
-
"require": "./
|
|
15
|
+
"import": "./esm/validations.js",
|
|
16
|
+
"require": "./cjs/validations.js"
|
|
20
17
|
},
|
|
21
18
|
"./utils": {
|
|
22
|
-
"import": "./
|
|
23
|
-
"require": "./
|
|
19
|
+
"import": "./esm/utils.js",
|
|
20
|
+
"require": "./cjs/utils.js"
|
|
24
21
|
},
|
|
25
22
|
"./timeUtils": {
|
|
26
|
-
"import": "./
|
|
27
|
-
"require": "./
|
|
23
|
+
"import": "./esm/timeUtils.js",
|
|
24
|
+
"require": "./cjs/timeUtils.js"
|
|
28
25
|
},
|
|
29
26
|
"./system": {
|
|
30
|
-
"import": "./
|
|
31
|
-
"require": "./
|
|
27
|
+
"import": "./esm/system.js",
|
|
28
|
+
"require": "./cjs/system.js"
|
|
32
29
|
},
|
|
33
30
|
"./scrollingTimer": {
|
|
34
|
-
"import": "./
|
|
35
|
-
"require": "./
|
|
31
|
+
"import": "./esm/scrollingTimer.js",
|
|
32
|
+
"require": "./cjs/scrollingTimer.js"
|
|
36
33
|
},
|
|
37
34
|
"./reactTypesUtility": {
|
|
38
|
-
"import": "./
|
|
39
|
-
"require": "./
|
|
35
|
+
"import": "./esm/reactTypesUtility.js",
|
|
36
|
+
"require": "./cjs/reactTypesUtility.js"
|
|
40
37
|
},
|
|
41
38
|
"./platform": {
|
|
42
|
-
"import": "./
|
|
43
|
-
"require": "./
|
|
39
|
+
"import": "./esm/platform.js",
|
|
40
|
+
"require": "./cjs/platform.js"
|
|
44
41
|
},
|
|
45
42
|
"./operators": {
|
|
46
|
-
"import": "./
|
|
47
|
-
"require": "./
|
|
43
|
+
"import": "./esm/operators.js",
|
|
44
|
+
"require": "./cjs/operators.js"
|
|
48
45
|
},
|
|
49
46
|
"./onClickHandlerForNonInteractiveElements": {
|
|
50
|
-
"import": "./
|
|
51
|
-
"require": "./
|
|
47
|
+
"import": "./esm/onClickHandlerForNonInteractiveElements.js",
|
|
48
|
+
"require": "./cjs/onClickHandlerForNonInteractiveElements.js"
|
|
52
49
|
},
|
|
53
50
|
"./hooks/useWindowSize": {
|
|
54
|
-
"import": "./
|
|
55
|
-
"require": "./
|
|
51
|
+
"import": "./esm/hooks/useWindowSize.js",
|
|
52
|
+
"require": "./cjs/hooks/useWindowSize.js"
|
|
56
53
|
},
|
|
57
54
|
"./hooks/useWindowScrollerList": {
|
|
58
|
-
"import": "./
|
|
59
|
-
"require": "./
|
|
55
|
+
"import": "./esm/hooks/useWindowScrollerList.js",
|
|
56
|
+
"require": "./cjs/hooks/useWindowScrollerList.js"
|
|
60
57
|
},
|
|
61
58
|
"./hooks/useShouldRecalculate": {
|
|
62
|
-
"import": "./
|
|
63
|
-
"require": "./
|
|
59
|
+
"import": "./esm/hooks/useShouldRecalculate.js",
|
|
60
|
+
"require": "./cjs/hooks/useShouldRecalculate.js"
|
|
64
61
|
},
|
|
65
62
|
"./hooks/useSetRef": {
|
|
66
|
-
"import": "./
|
|
67
|
-
"require": "./
|
|
63
|
+
"import": "./esm/hooks/useSetRef.js",
|
|
64
|
+
"require": "./cjs/hooks/useSetRef.js"
|
|
68
65
|
},
|
|
69
66
|
"./hooks/useResizeObserver": {
|
|
70
|
-
"import": "./
|
|
71
|
-
"require": "./
|
|
67
|
+
"import": "./esm/hooks/useResizeObserver.js",
|
|
68
|
+
"require": "./cjs/hooks/useResizeObserver.js"
|
|
72
69
|
},
|
|
73
70
|
"./hooks/usePrevious": {
|
|
74
|
-
"import": "./
|
|
75
|
-
"require": "./
|
|
71
|
+
"import": "./esm/hooks/usePrevious.js",
|
|
72
|
+
"require": "./cjs/hooks/usePrevious.js"
|
|
76
73
|
},
|
|
77
74
|
"./hooks/useParentElement": {
|
|
78
|
-
"import": "./
|
|
79
|
-
"require": "./
|
|
75
|
+
"import": "./esm/hooks/useParentElement.js",
|
|
76
|
+
"require": "./cjs/hooks/useParentElement.js"
|
|
80
77
|
},
|
|
81
78
|
"./hooks/useOnElementResize": {
|
|
82
|
-
"import": "./
|
|
83
|
-
"require": "./
|
|
79
|
+
"import": "./esm/hooks/useOnElementResize.js",
|
|
80
|
+
"require": "./cjs/hooks/useOnElementResize.js"
|
|
84
81
|
},
|
|
85
82
|
"./hooks/useIsShowingEllipsis": {
|
|
86
|
-
"import": "./
|
|
87
|
-
"require": "./
|
|
83
|
+
"import": "./esm/hooks/useIsShowingEllipsis.js",
|
|
84
|
+
"require": "./cjs/hooks/useIsShowingEllipsis.js"
|
|
88
85
|
},
|
|
89
86
|
"./hooks/useHoverHandlersDelay": {
|
|
90
|
-
"import": "./
|
|
91
|
-
"require": "./
|
|
87
|
+
"import": "./esm/hooks/useHoverHandlersDelay.js",
|
|
88
|
+
"require": "./cjs/hooks/useHoverHandlersDelay.js"
|
|
92
89
|
},
|
|
93
90
|
"./hooks/useHotkeys": {
|
|
94
|
-
"import": "./
|
|
95
|
-
"require": "./
|
|
91
|
+
"import": "./esm/hooks/useHotkeys.js",
|
|
92
|
+
"require": "./cjs/hooks/useHotkeys.js"
|
|
96
93
|
},
|
|
97
94
|
"./hooks/useExpandState": {
|
|
98
|
-
"import": "./
|
|
99
|
-
"require": "./
|
|
95
|
+
"import": "./esm/hooks/useExpandState.js",
|
|
96
|
+
"require": "./cjs/hooks/useExpandState.js"
|
|
100
97
|
},
|
|
101
98
|
"./hooks/useExecutionTimer": {
|
|
102
|
-
"import": "./
|
|
103
|
-
"require": "./
|
|
99
|
+
"import": "./esm/hooks/useExecutionTimer.js",
|
|
100
|
+
"require": "./cjs/hooks/useExecutionTimer.js"
|
|
104
101
|
},
|
|
105
102
|
"./hooks/useDerivedStateFromProps": {
|
|
106
|
-
"import": "./
|
|
107
|
-
"require": "./
|
|
103
|
+
"import": "./esm/hooks/useDerivedStateFromProps.js",
|
|
104
|
+
"require": "./cjs/hooks/useDerivedStateFromProps.js"
|
|
108
105
|
},
|
|
109
106
|
"./hooks/useCancellableDelayedCallback": {
|
|
110
|
-
"import": "./
|
|
111
|
-
"require": "./
|
|
107
|
+
"import": "./esm/hooks/useCancellableDelayedCallback.js",
|
|
108
|
+
"require": "./cjs/hooks/useCancellableDelayedCallback.js"
|
|
112
109
|
},
|
|
113
110
|
"./hooks": {
|
|
114
|
-
"import": "./
|
|
115
|
-
"require": "./
|
|
111
|
+
"import": "./esm/hooks/index.js",
|
|
112
|
+
"require": "./cjs/hooks/index.js"
|
|
116
113
|
},
|
|
117
114
|
"./getComponentFromProps": {
|
|
118
|
-
"import": "./
|
|
119
|
-
"require": "./
|
|
115
|
+
"import": "./esm/getComponentFromProps.js",
|
|
116
|
+
"require": "./cjs/getComponentFromProps.js"
|
|
120
117
|
},
|
|
121
118
|
"./compose": {
|
|
122
|
-
"import": "./
|
|
123
|
-
"require": "./
|
|
119
|
+
"import": "./esm/compose.js",
|
|
120
|
+
"require": "./cjs/compose.js"
|
|
124
121
|
},
|
|
125
122
|
"./capitalize": {
|
|
126
|
-
"import": "./
|
|
127
|
-
"require": "./
|
|
123
|
+
"import": "./esm/capitalize.js",
|
|
124
|
+
"require": "./cjs/capitalize.js"
|
|
128
125
|
}
|
|
129
126
|
},
|
|
130
127
|
"sideEffects": [
|
|
@@ -136,13 +133,20 @@
|
|
|
136
133
|
"url": "https://git.elliemae.io/platform-ui/dimsum.git"
|
|
137
134
|
},
|
|
138
135
|
"engines": {
|
|
139
|
-
"
|
|
140
|
-
"node": ">=
|
|
136
|
+
"npm": ">=7",
|
|
137
|
+
"node": ">=14"
|
|
141
138
|
},
|
|
142
139
|
"author": "ICE MT",
|
|
140
|
+
"scripts": {
|
|
141
|
+
"prebuild": "exit 0",
|
|
142
|
+
"predev": "exit 0",
|
|
143
|
+
"build": "node ../../scripts/build/build.js",
|
|
144
|
+
"dev": "cross-env NODE_ENV=development && node ../../scripts/build/build.js -w"
|
|
145
|
+
},
|
|
143
146
|
"publishConfig": {
|
|
144
147
|
"access": "public",
|
|
145
|
-
"
|
|
148
|
+
"directory": "dist",
|
|
149
|
+
"generateSubmodules": true
|
|
146
150
|
},
|
|
147
151
|
"dependencies": {
|
|
148
152
|
"hotkeys-js": "~3.8.7",
|
|
@@ -157,11 +161,5 @@
|
|
|
157
161
|
"lodash": "^4.17.21",
|
|
158
162
|
"react": "~17.0.2",
|
|
159
163
|
"react-dom": "^17.0.2"
|
|
160
|
-
},
|
|
161
|
-
"scripts": {
|
|
162
|
-
"prebuild": "exit 0",
|
|
163
|
-
"predev": "exit 0",
|
|
164
|
-
"build": "node ../../scripts/build/build.js",
|
|
165
|
-
"dev": "cross-env NODE_ENV=development && node ../../scripts/build/build.js -w"
|
|
166
164
|
}
|
|
167
165
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const capitalize: (string: string) => string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Composes single-argument functions from right to left. The rightmost
|
|
3
|
+
* function can take multiple arguments as it provides the signature for
|
|
4
|
+
* the resulting composite function. [From redux v4.0.5]
|
|
5
|
+
*
|
|
6
|
+
* @param {...Function} funcs The functions to compose.
|
|
7
|
+
* @returns {Function} A function obtained by composing the argument functions
|
|
8
|
+
* from right to left. For example, compose(f, g, h) is identical to doing
|
|
9
|
+
* (...args) => f(g(h(...args))).
|
|
10
|
+
*/
|
|
11
|
+
export declare function compose(...funcs: any[]): any;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export { default as useMeasure } from 'use-measure';
|
|
2
|
+
export { default as useExecutionTimer } from './useExecutionTimer';
|
|
3
|
+
export { default as useExpandState } from './useExpandState';
|
|
4
|
+
export { default as useHotkeys } from './useHotkeys';
|
|
5
|
+
export { default as useHoverHandlersDelay } from './useHoverHandlersDelay';
|
|
6
|
+
export { default as useResizeObserver } from './useResizeObserver';
|
|
7
|
+
export { default as useShouldRecalculate } from './useShouldRecalculate';
|
|
8
|
+
export { default as useWindowScrollerList } from './useWindowScrollerList';
|
|
9
|
+
export { default as useWindowSize } from './useWindowSize';
|
|
10
|
+
export { default as useForceUpdate } from 'use-force-update';
|
|
11
|
+
export { default as useOnClickOutside } from 'use-onclickoutside';
|
|
12
|
+
export { useUncontrolled } from 'uncontrollable';
|
|
13
|
+
export { default as usePrevious } from './usePrevious';
|
|
14
|
+
export { default as useCancellableDelayedCallback } from './useCancellableDelayedCallback';
|
|
15
|
+
export { default as useDerivedStateFromProps } from './useDerivedStateFromProps';
|
|
16
|
+
export * from './useSetRef';
|
|
17
|
+
export * from './useParentElement';
|
|
18
|
+
export * from './useOnElementResize';
|
|
19
|
+
export * from './useIsShowingEllipsis';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function useCancellableDelayedCallback(cb: any, delay: any): ((...args: any[]) => void)[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function useDerivedStateFromProp(prop: any, options?: {}): any[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function useExecutionDelay(startFn: any, cleanFn: any, delayTime: any): ((...args: any[]) => void)[];
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export default function useExpandState({ items, itemKey, expanded: expandedProp, onExpand, onExpandChange, onExpandAll, onToggleExpand, onCollapse, }: {
|
|
2
|
+
items?: never[] | undefined;
|
|
3
|
+
itemKey?: string | undefined;
|
|
4
|
+
expanded?: {} | undefined;
|
|
5
|
+
onExpand: any;
|
|
6
|
+
onExpandChange?: (() => null) | undefined;
|
|
7
|
+
onExpandAll?: (() => null) | undefined;
|
|
8
|
+
onToggleExpand: any;
|
|
9
|
+
onCollapse: any;
|
|
10
|
+
}): {
|
|
11
|
+
state: {
|
|
12
|
+
expanded: any;
|
|
13
|
+
isExpandedAll: boolean;
|
|
14
|
+
};
|
|
15
|
+
actions: {
|
|
16
|
+
expand: (item: any, stateData?: boolean) => void;
|
|
17
|
+
toggleExpandAll: (stateData?: boolean) => void;
|
|
18
|
+
toggleExpand: (item: any, stateData?: boolean) => void;
|
|
19
|
+
collapse: (item: any) => void;
|
|
20
|
+
};
|
|
21
|
+
setExpanded: any;
|
|
22
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export default function useHoverHandlersDelay({ onMouseOver, onMouseLeave, hideDelay, showDelay, }: {
|
|
2
|
+
onMouseOver: any;
|
|
3
|
+
onMouseLeave: any;
|
|
4
|
+
hideDelay?: number | undefined;
|
|
5
|
+
showDelay?: number | undefined;
|
|
6
|
+
}): {
|
|
7
|
+
onMouseOver: () => void;
|
|
8
|
+
onMouseLeave: () => void;
|
|
9
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useParentElement: (ref: any) => any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function useShouldRecalculate(bool: any): number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function useWindowSize(): false | number[];
|
package/types/index.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export { default as getComponentFromProps } from './getComponentFromProps';
|
|
2
|
+
export { default as onClickHandlerForNonInteractiveElements } from './onClickHandlerForNonInteractiveElements';
|
|
3
|
+
export * from './capitalize';
|
|
4
|
+
export * from './operators';
|
|
5
|
+
export * from './utils';
|
|
6
|
+
export * from './system';
|
|
7
|
+
export * from './hooks';
|
|
8
|
+
export * from './timeUtils';
|
|
9
|
+
export * from './compose';
|
|
10
|
+
export * from './platform';
|
|
11
|
+
export * from './reactTypesUtility';
|
|
12
|
+
export * from './scrollingTimer';
|
|
13
|
+
export * from './validations';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Check if the value is null undefined ''
|
|
3
|
+
*
|
|
4
|
+
* @param value
|
|
5
|
+
*/
|
|
6
|
+
export declare const checkNotEmpty: (value: any) => boolean;
|
|
7
|
+
export declare const checkEmpty: (value: any) => boolean;
|
|
8
|
+
/**
|
|
9
|
+
* @param value: number
|
|
10
|
+
* @param comparator: number
|
|
11
|
+
* @param value
|
|
12
|
+
* @param comparator
|
|
13
|
+
*/
|
|
14
|
+
export declare const greaterThan: (value: any, comparator: any) => boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Check if a valid date with format MM/DD/YYYY
|
|
17
|
+
*
|
|
18
|
+
* @param {*} value: string
|
|
19
|
+
* @param value
|
|
20
|
+
*/
|
|
21
|
+
export declare const validDate: (value: any) => boolean;
|
|
22
|
+
export declare const equal: (a: any, b: any) => boolean;
|
|
23
|
+
export declare const notEqual: (a: any, b: any) => boolean;
|
|
24
|
+
export declare const isNull: (a: any) => boolean;
|
|
25
|
+
export declare const isNotNull: (a: any) => boolean;
|
|
26
|
+
export declare const isIn: (a: any, b: any) => boolean;
|
|
27
|
+
export declare const isNotIn: (a: any, b: any) => boolean;
|
|
28
|
+
export declare const greaterThanOrEquals: (value: any, comparator: any) => boolean;
|
|
29
|
+
export declare const lessThanOrEquals: (value: any, comparator: any) => boolean;
|
|
30
|
+
export declare const startsWith: (value: any, comparator: any) => boolean;
|
|
31
|
+
export declare const contains: (value: any, comparator: any) => boolean;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare function isClassComponent(component: any): boolean;
|
|
2
|
+
export declare function isFunctionComponent(component: any): boolean;
|
|
3
|
+
export declare function isReactComponent(component: any): boolean;
|
|
4
|
+
export declare function isElement(element: any): boolean;
|
|
5
|
+
export declare function isDOMTypeElement(element: any): boolean;
|
|
6
|
+
export declare function isCompositeTypeElement(element: any): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function resetTimer(func: any): (...args: any[]) => void;
|
package/types/utils.d.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* commonly used functions
|
|
3
|
+
* Add a level of indirection to lodash so we can replace
|
|
4
|
+
* it if desired, while keeping function names the same
|
|
5
|
+
*/
|
|
6
|
+
import { cloneDeep, filter, debounce, findIndex, isEmpty, isString, isEqual, noop, omit, orderBy, pull, sumBy, maxBy, meanBy, sortBy, transform, isFunction, uniq, uniqBy, groupBy, property, get, set, range, parseInt, padStart, isNaN, values, throttle, pick, pickBy, differenceBy, differenceWith, isEqualWith, curry, isObject, isBoolean } from 'lodash';
|
|
7
|
+
/**
|
|
8
|
+
* Concatenates classNames from arguments
|
|
9
|
+
*
|
|
10
|
+
* @param {...any} classnames
|
|
11
|
+
*/
|
|
12
|
+
export declare const cx: (...classnames: any[]) => any;
|
|
13
|
+
declare const toggleInObject: (obj: any, key: any, value: any) => any;
|
|
14
|
+
declare const toggleInArray: (array: any, value: any) => any[];
|
|
15
|
+
declare const arrayMove: (array: any, from: any, to: any) => any;
|
|
16
|
+
declare const addOrRemove: (array: any, item: any, accessor?: (item: any) => any) => any;
|
|
17
|
+
export declare function runAll(...fns: any[]): (...args: any[]) => void;
|
|
18
|
+
export declare function hashArray(arr: any, fieldName: any): any;
|
|
19
|
+
export declare function safeCall(fun: any, ...args: any[]): void;
|
|
20
|
+
export declare const removeUndefinedProperties: (obj: any) => any;
|
|
21
|
+
declare const _default: {};
|
|
22
|
+
export default _default;
|
|
23
|
+
export { isObject, curry, arrayMove, uniq, filter, uniqBy, groupBy, property, get, set, cloneDeep, debounce, findIndex, isEmpty, isString, isEqual, maxBy, meanBy, noop, omit, orderBy, pull, sortBy, sumBy, transform, isFunction, range, parseInt, padStart, isNaN, values, throttle, toggleInObject, toggleInArray, pick, pickBy, differenceBy, differenceWith, addOrRemove, isEqualWith, isBoolean, };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export declare const isRequired: ({ value, help }: {
|
|
2
|
+
value: any;
|
|
3
|
+
help?: string | undefined;
|
|
4
|
+
}) => {
|
|
5
|
+
payload: string;
|
|
6
|
+
error: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare const isGreaterThan: ({ value, help, comparator }: {
|
|
9
|
+
value: any;
|
|
10
|
+
help: any;
|
|
11
|
+
comparator?: number | undefined;
|
|
12
|
+
}) => {
|
|
13
|
+
payload: any;
|
|
14
|
+
error: boolean;
|
|
15
|
+
};
|
|
16
|
+
export declare const isValidDate: ({ value, help, format }: {
|
|
17
|
+
value: any;
|
|
18
|
+
help: any;
|
|
19
|
+
format?: string | undefined;
|
|
20
|
+
}) => {
|
|
21
|
+
payload: any;
|
|
22
|
+
error: boolean;
|
|
23
|
+
};
|
package/dist/cjs/capitalize.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __reExport = (target, module2, copyDefault, desc) => {
|
|
13
|
-
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(module2))
|
|
15
|
-
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
-
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return target;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (module2, isNodeMode) => {
|
|
21
|
-
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
-
};
|
|
23
|
-
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
-
return (module2, temp) => {
|
|
25
|
-
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
-
};
|
|
27
|
-
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
-
var capitalize_exports = {};
|
|
29
|
-
__export(capitalize_exports, {
|
|
30
|
-
capitalize: () => capitalize
|
|
31
|
-
});
|
|
32
|
-
var React = __toESM(require("react"));
|
|
33
|
-
const capitalize = (string) => string.charAt(0).toUpperCase() + string.slice(1);
|
|
34
|
-
module.exports = __toCommonJS(capitalize_exports);
|
|
35
|
-
//# sourceMappingURL=capitalize.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/capitalize.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["export const capitalize = (string: string): string => string.charAt(0).toUpperCase() + string.slice(1);\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,aAAa,CAAC,WAA2B,OAAO,OAAO,GAAG,gBAAgB,OAAO,MAAM;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
package/dist/cjs/compose.js
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __reExport = (target, module2, copyDefault, desc) => {
|
|
13
|
-
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(module2))
|
|
15
|
-
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
-
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return target;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (module2, isNodeMode) => {
|
|
21
|
-
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
-
};
|
|
23
|
-
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
-
return (module2, temp) => {
|
|
25
|
-
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
-
};
|
|
27
|
-
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
-
var compose_exports = {};
|
|
29
|
-
__export(compose_exports, {
|
|
30
|
-
compose: () => compose,
|
|
31
|
-
default: () => compose_default
|
|
32
|
-
});
|
|
33
|
-
var React = __toESM(require("react"));
|
|
34
|
-
const compose = (...funcs) => {
|
|
35
|
-
if (funcs.length === 0) {
|
|
36
|
-
return (arg) => arg;
|
|
37
|
-
}
|
|
38
|
-
if (funcs.length === 1) {
|
|
39
|
-
return funcs[0];
|
|
40
|
-
}
|
|
41
|
-
return funcs.reduce((a, b) => (...args) => a(b(...args)));
|
|
42
|
-
};
|
|
43
|
-
var compose_default = compose;
|
|
44
|
-
module.exports = __toCommonJS(compose_exports);
|
|
45
|
-
//# sourceMappingURL=compose.js.map
|
package/dist/cjs/compose.js.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/compose.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * Composes single-argument functions from right to left. The rightmost\n * function can take multiple arguments as it provides the signature for\n * the resulting composite function. [From redux v4.0.5]\n *\n * @param {...Function} funcs The functions to compose.\n * @returns {Function} A function obtained by composing the argument functions\n * from right to left. For example, compose(f, g, h) is identical to doing\n * (...args) => f(g(h(...args))).\n */\n\nexport const compose = (...funcs) => {\n if (funcs.length === 0) {\n return (arg) => arg;\n }\n\n if (funcs.length === 1) {\n return funcs[0];\n }\n\n return funcs.reduce((a, b) => (...args) => a(b(...args)));\n};\n\nexport default compose;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADWhB,MAAM,UAAU,IAAI,UAAU;AACnC,MAAI,MAAM,WAAW,GAAG;AACtB,WAAO,CAAC,QAAQ;AAAA;AAGlB,MAAI,MAAM,WAAW,GAAG;AACtB,WAAO,MAAM;AAAA;AAGf,SAAO,MAAM,OAAO,CAAC,GAAG,MAAM,IAAI,SAAS,EAAE,EAAE,GAAG;AAAA;AAGpD,IAAO,kBAAQ;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|