@elliemae/ds-utilities 2.2.0-next.3 → 2.3.0-alpha.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 +35 -7
- package/cjs/capitalize.js.map +7 -0
- package/cjs/compose.js +39 -32
- package/cjs/compose.js.map +7 -0
- package/cjs/getComponentFromProps.js +47 -29
- package/cjs/getComponentFromProps.js.map +7 -0
- package/cjs/hooks/index.js +68 -60
- package/cjs/hooks/index.js.map +7 -0
- package/cjs/hooks/useCancellableDelayedCallback.js +43 -18
- package/cjs/hooks/useCancellableDelayedCallback.js.map +7 -0
- package/cjs/hooks/useDerivedStateFromProps.js +47 -36
- package/cjs/hooks/useDerivedStateFromProps.js.map +7 -0
- package/cjs/hooks/useExecutionTimer.js +43 -24
- package/cjs/hooks/useExecutionTimer.js.map +7 -0
- package/cjs/hooks/useExpandState.js +69 -82
- package/cjs/hooks/useExpandState.js.map +7 -0
- package/cjs/hooks/useHotkeys.js +44 -24
- package/cjs/hooks/useHotkeys.js.map +7 -0
- package/cjs/hooks/useHoverHandlersDelay.js +48 -18
- package/cjs/hooks/useHoverHandlersDelay.js.map +7 -0
- package/cjs/hooks/useOnElementResize.js +44 -27
- package/cjs/hooks/useOnElementResize.js.map +7 -0
- package/cjs/hooks/useParentElement.js +40 -13
- package/cjs/hooks/useParentElement.js.map +7 -0
- package/cjs/hooks/usePrevious.js +41 -10
- package/cjs/hooks/usePrevious.js.map +7 -0
- package/cjs/hooks/useResizeObserver.js +52 -25
- package/cjs/hooks/useResizeObserver.js.map +7 -0
- package/cjs/hooks/useSetRef.js +38 -11
- package/cjs/hooks/useSetRef.js.map +7 -0
- package/cjs/hooks/useShouldRecalculate.js +41 -14
- package/cjs/hooks/useShouldRecalculate.js.map +7 -0
- package/cjs/hooks/useWindowScrollerList.js +51 -33
- package/cjs/hooks/useWindowScrollerList.js.map +7 -0
- package/cjs/hooks/useWindowSize.js +49 -19
- package/cjs/hooks/useWindowSize.js.map +7 -0
- package/cjs/index.js +145 -266
- package/cjs/index.js.map +7 -0
- package/cjs/onClickHandlerForNonInteractiveElements.js +46 -19
- package/cjs/onClickHandlerForNonInteractiveElements.js.map +7 -0
- package/cjs/operators.js +56 -51
- package/cjs/operators.js.map +7 -0
- package/cjs/platform.js +37 -9
- package/cjs/platform.js.map +7 -0
- package/cjs/reactTypesUtility.js +45 -22
- package/cjs/reactTypesUtility.js.map +7 -0
- package/cjs/scrollingTimer.js +37 -15
- package/cjs/scrollingTimer.js.map +7 -0
- package/cjs/system.js +47 -30
- package/cjs/system.js.map +7 -0
- package/cjs/timeUtils.js +42 -24
- package/cjs/timeUtils.js.map +7 -0
- package/cjs/utils.js +101 -237
- package/cjs/utils.js.map +7 -0
- package/cjs/validations.js +48 -35
- package/cjs/validations.js.map +7 -0
- package/esm/capitalize.js +6 -3
- package/esm/capitalize.js.map +7 -0
- package/esm/compose.js +11 -29
- package/esm/compose.js.map +7 -0
- package/esm/getComponentFromProps.js +18 -22
- package/esm/getComponentFromProps.js.map +7 -0
- package/esm/hooks/index.js +40 -18
- package/esm/hooks/index.js.map +7 -0
- package/esm/hooks/useCancellableDelayedCallback.js +12 -14
- package/esm/hooks/useCancellableDelayedCallback.js.map +7 -0
- package/esm/hooks/useDerivedStateFromProps.js +15 -31
- package/esm/hooks/useDerivedStateFromProps.js.map +7 -0
- package/esm/hooks/useExecutionTimer.js +12 -20
- package/esm/hooks/useExecutionTimer.js.map +7 -0
- package/esm/hooks/useExpandState.js +36 -72
- package/esm/hooks/useExpandState.js.map +7 -0
- package/esm/hooks/useHotkeys.js +11 -14
- package/esm/hooks/useHotkeys.js.map +7 -0
- package/esm/hooks/useHoverHandlersDelay.js +15 -12
- package/esm/hooks/useHoverHandlersDelay.js.map +7 -0
- package/esm/hooks/useOnElementResize.js +12 -20
- package/esm/hooks/useOnElementResize.js.map +7 -0
- package/esm/hooks/useParentElement.js +9 -7
- package/esm/hooks/useParentElement.js.map +7 -0
- package/esm/hooks/usePrevious.js +10 -6
- package/esm/hooks/usePrevious.js.map +7 -0
- package/esm/hooks/useResizeObserver.js +20 -15
- package/esm/hooks/useResizeObserver.js.map +7 -0
- package/esm/hooks/useSetRef.js +8 -6
- package/esm/hooks/useSetRef.js.map +7 -0
- package/esm/hooks/useShouldRecalculate.js +11 -11
- package/esm/hooks/useShouldRecalculate.js.map +7 -0
- package/esm/hooks/useWindowScrollerList.js +20 -29
- package/esm/hooks/useWindowScrollerList.js.map +7 -0
- package/esm/hooks/useWindowSize.js +18 -15
- package/esm/hooks/useWindowSize.js.map +7 -0
- package/esm/index.js +204 -31
- package/esm/index.js.map +7 -0
- package/esm/onClickHandlerForNonInteractiveElements.js +17 -17
- package/esm/onClickHandlerForNonInteractiveElements.js.map +7 -0
- package/esm/operators.js +27 -34
- package/esm/operators.js.map +7 -0
- package/esm/platform.js +8 -4
- package/esm/platform.js.map +7 -0
- package/esm/reactTypesUtility.js +16 -9
- package/esm/reactTypesUtility.js.map +7 -0
- package/esm/scrollingTimer.js +8 -11
- package/esm/scrollingTimer.js.map +7 -0
- package/esm/system.js +16 -22
- package/esm/system.js.map +7 -0
- package/esm/timeUtils.js +13 -19
- package/esm/timeUtils.js.map +7 -0
- package/esm/utils.js +109 -72
- package/esm/utils.js.map +7 -0
- package/esm/validations.js +18 -28
- package/esm/validations.js.map +7 -0
- package/package.json +1 -1
- package/types/compose.d.ts +2 -1
- package/types/getComponentFromProps.d.ts +2 -1
- package/types/hooks/index.d.ts +14 -14
- package/types/hooks/useCancellableDelayedCallback.d.ts +2 -1
- package/types/hooks/useDerivedStateFromProps.d.ts +2 -1
- package/types/hooks/useExecutionTimer.d.ts +2 -1
- package/types/hooks/useExpandState.d.ts +3 -2
- package/types/hooks/useHotkeys.d.ts +3 -2
- package/types/hooks/useHoverHandlersDelay.d.ts +3 -2
- package/types/hooks/usePrevious.d.ts +1 -1
- package/types/hooks/useResizeObserver.d.ts +2 -1
- package/types/hooks/useShouldRecalculate.d.ts +2 -1
- package/types/hooks/useWindowScrollerList.d.ts +3 -2
- package/types/hooks/useWindowSize.d.ts +2 -1
- package/types/index.d.ts +11 -11
- package/types/onClickHandlerForNonInteractiveElements.d.ts +7 -7
- package/types/scrollingTimer.d.ts +1 -1
package/cjs/index.js
CHANGED
|
@@ -1,266 +1,145 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
var
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
var
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
var
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
});
|
|
147
|
-
Object.defineProperty(exports, 'get', {
|
|
148
|
-
enumerable: true,
|
|
149
|
-
get: function () { return lodash.get; }
|
|
150
|
-
});
|
|
151
|
-
Object.defineProperty(exports, 'groupBy', {
|
|
152
|
-
enumerable: true,
|
|
153
|
-
get: function () { return lodash.groupBy; }
|
|
154
|
-
});
|
|
155
|
-
Object.defineProperty(exports, 'isBoolean', {
|
|
156
|
-
enumerable: true,
|
|
157
|
-
get: function () { return lodash.isBoolean; }
|
|
158
|
-
});
|
|
159
|
-
Object.defineProperty(exports, 'isEmpty', {
|
|
160
|
-
enumerable: true,
|
|
161
|
-
get: function () { return lodash.isEmpty; }
|
|
162
|
-
});
|
|
163
|
-
Object.defineProperty(exports, 'isEqual', {
|
|
164
|
-
enumerable: true,
|
|
165
|
-
get: function () { return lodash.isEqual; }
|
|
166
|
-
});
|
|
167
|
-
Object.defineProperty(exports, 'isEqualWith', {
|
|
168
|
-
enumerable: true,
|
|
169
|
-
get: function () { return lodash.isEqualWith; }
|
|
170
|
-
});
|
|
171
|
-
Object.defineProperty(exports, 'isFunction', {
|
|
172
|
-
enumerable: true,
|
|
173
|
-
get: function () { return lodash.isFunction; }
|
|
174
|
-
});
|
|
175
|
-
Object.defineProperty(exports, 'isNaN', {
|
|
176
|
-
enumerable: true,
|
|
177
|
-
get: function () { return lodash.isNaN; }
|
|
178
|
-
});
|
|
179
|
-
Object.defineProperty(exports, 'isObject', {
|
|
180
|
-
enumerable: true,
|
|
181
|
-
get: function () { return lodash.isObject; }
|
|
182
|
-
});
|
|
183
|
-
Object.defineProperty(exports, 'isString', {
|
|
184
|
-
enumerable: true,
|
|
185
|
-
get: function () { return lodash.isString; }
|
|
186
|
-
});
|
|
187
|
-
Object.defineProperty(exports, 'maxBy', {
|
|
188
|
-
enumerable: true,
|
|
189
|
-
get: function () { return lodash.maxBy; }
|
|
190
|
-
});
|
|
191
|
-
Object.defineProperty(exports, 'meanBy', {
|
|
192
|
-
enumerable: true,
|
|
193
|
-
get: function () { return lodash.meanBy; }
|
|
194
|
-
});
|
|
195
|
-
Object.defineProperty(exports, 'noop', {
|
|
196
|
-
enumerable: true,
|
|
197
|
-
get: function () { return lodash.noop; }
|
|
198
|
-
});
|
|
199
|
-
Object.defineProperty(exports, 'omit', {
|
|
200
|
-
enumerable: true,
|
|
201
|
-
get: function () { return lodash.omit; }
|
|
202
|
-
});
|
|
203
|
-
Object.defineProperty(exports, 'orderBy', {
|
|
204
|
-
enumerable: true,
|
|
205
|
-
get: function () { return lodash.orderBy; }
|
|
206
|
-
});
|
|
207
|
-
Object.defineProperty(exports, 'padStart', {
|
|
208
|
-
enumerable: true,
|
|
209
|
-
get: function () { return lodash.padStart; }
|
|
210
|
-
});
|
|
211
|
-
Object.defineProperty(exports, 'parseInt', {
|
|
212
|
-
enumerable: true,
|
|
213
|
-
get: function () { return lodash.parseInt; }
|
|
214
|
-
});
|
|
215
|
-
Object.defineProperty(exports, 'pick', {
|
|
216
|
-
enumerable: true,
|
|
217
|
-
get: function () { return lodash.pick; }
|
|
218
|
-
});
|
|
219
|
-
Object.defineProperty(exports, 'pickBy', {
|
|
220
|
-
enumerable: true,
|
|
221
|
-
get: function () { return lodash.pickBy; }
|
|
222
|
-
});
|
|
223
|
-
Object.defineProperty(exports, 'property', {
|
|
224
|
-
enumerable: true,
|
|
225
|
-
get: function () { return lodash.property; }
|
|
226
|
-
});
|
|
227
|
-
Object.defineProperty(exports, 'pull', {
|
|
228
|
-
enumerable: true,
|
|
229
|
-
get: function () { return lodash.pull; }
|
|
230
|
-
});
|
|
231
|
-
Object.defineProperty(exports, 'range', {
|
|
232
|
-
enumerable: true,
|
|
233
|
-
get: function () { return lodash.range; }
|
|
234
|
-
});
|
|
235
|
-
Object.defineProperty(exports, 'set', {
|
|
236
|
-
enumerable: true,
|
|
237
|
-
get: function () { return lodash.set; }
|
|
238
|
-
});
|
|
239
|
-
Object.defineProperty(exports, 'sortBy', {
|
|
240
|
-
enumerable: true,
|
|
241
|
-
get: function () { return lodash.sortBy; }
|
|
242
|
-
});
|
|
243
|
-
Object.defineProperty(exports, 'sumBy', {
|
|
244
|
-
enumerable: true,
|
|
245
|
-
get: function () { return lodash.sumBy; }
|
|
246
|
-
});
|
|
247
|
-
Object.defineProperty(exports, 'throttle', {
|
|
248
|
-
enumerable: true,
|
|
249
|
-
get: function () { return lodash.throttle; }
|
|
250
|
-
});
|
|
251
|
-
Object.defineProperty(exports, 'transform', {
|
|
252
|
-
enumerable: true,
|
|
253
|
-
get: function () { return lodash.transform; }
|
|
254
|
-
});
|
|
255
|
-
Object.defineProperty(exports, 'uniq', {
|
|
256
|
-
enumerable: true,
|
|
257
|
-
get: function () { return lodash.uniq; }
|
|
258
|
-
});
|
|
259
|
-
Object.defineProperty(exports, 'uniqBy', {
|
|
260
|
-
enumerable: true,
|
|
261
|
-
get: function () { return lodash.uniqBy; }
|
|
262
|
-
});
|
|
263
|
-
Object.defineProperty(exports, 'values', {
|
|
264
|
-
enumerable: true,
|
|
265
|
-
get: function () { return lodash.values; }
|
|
266
|
-
});
|
|
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 src_exports = {};
|
|
29
|
+
__export(src_exports, {
|
|
30
|
+
DOCUMENT: () => import_platform.DOCUMENT,
|
|
31
|
+
WINDOW: () => import_platform.WINDOW,
|
|
32
|
+
addLeadingZeros: () => import_timeUtils.addLeadingZeros,
|
|
33
|
+
addOrRemove: () => import_utils.addOrRemove,
|
|
34
|
+
arrayMove: () => import_utils.arrayMove,
|
|
35
|
+
capitalize: () => import_capitalize.capitalize,
|
|
36
|
+
checkEmpty: () => import_operators.checkEmpty,
|
|
37
|
+
checkNotEmpty: () => import_operators.checkNotEmpty,
|
|
38
|
+
cloneDeep: () => import_utils.cloneDeep,
|
|
39
|
+
compose: () => import_compose.compose,
|
|
40
|
+
contains: () => import_operators.contains,
|
|
41
|
+
curry: () => import_utils.curry,
|
|
42
|
+
cx: () => import_utils.cx,
|
|
43
|
+
debounce: () => import_utils.debounce,
|
|
44
|
+
differenceBy: () => import_utils.differenceBy,
|
|
45
|
+
differenceWith: () => import_utils.differenceWith,
|
|
46
|
+
equal: () => import_operators.equal,
|
|
47
|
+
filter: () => import_utils.filter,
|
|
48
|
+
findIndex: () => import_utils.findIndex,
|
|
49
|
+
get: () => import_utils.get,
|
|
50
|
+
getComponentFromProps: () => import_getComponentFromProps.default,
|
|
51
|
+
getVisibleTimeByFormat: () => import_timeUtils.getVisibleTimeByFormat,
|
|
52
|
+
greaterThan: () => import_operators.greaterThan,
|
|
53
|
+
greaterThanOrEquals: () => import_operators.greaterThanOrEquals,
|
|
54
|
+
groupBy: () => import_utils.groupBy,
|
|
55
|
+
hashArray: () => import_utils.hashArray,
|
|
56
|
+
isBoolean: () => import_utils.isBoolean,
|
|
57
|
+
isClassComponent: () => import_reactTypesUtility.isClassComponent,
|
|
58
|
+
isCompositeTypeElement: () => import_reactTypesUtility.isCompositeTypeElement,
|
|
59
|
+
isDOMTypeElement: () => import_reactTypesUtility.isDOMTypeElement,
|
|
60
|
+
isElement: () => import_reactTypesUtility.isElement,
|
|
61
|
+
isEmpty: () => import_utils.isEmpty,
|
|
62
|
+
isEqual: () => import_utils.isEqual,
|
|
63
|
+
isEqualWith: () => import_utils.isEqualWith,
|
|
64
|
+
isFunction: () => import_utils.isFunction,
|
|
65
|
+
isFunctionComponent: () => import_reactTypesUtility.isFunctionComponent,
|
|
66
|
+
isGreaterThan: () => import_validations.isGreaterThan,
|
|
67
|
+
isIn: () => import_operators.isIn,
|
|
68
|
+
isNaN: () => import_utils.isNaN,
|
|
69
|
+
isNotIn: () => import_operators.isNotIn,
|
|
70
|
+
isNotNull: () => import_operators.isNotNull,
|
|
71
|
+
isNull: () => import_operators.isNull,
|
|
72
|
+
isObject: () => import_utils.isObject,
|
|
73
|
+
isReactComponent: () => import_reactTypesUtility.isReactComponent,
|
|
74
|
+
isRequired: () => import_validations.isRequired,
|
|
75
|
+
isString: () => import_utils.isString,
|
|
76
|
+
isValidDate: () => import_validations.isValidDate,
|
|
77
|
+
lessThanOrEquals: () => import_operators.lessThanOrEquals,
|
|
78
|
+
logger: () => import_system.logger,
|
|
79
|
+
maxBy: () => import_utils.maxBy,
|
|
80
|
+
meanBy: () => import_utils.meanBy,
|
|
81
|
+
mergeRefs: () => import_system.mergeRefs,
|
|
82
|
+
noop: () => import_utils.noop,
|
|
83
|
+
notEqual: () => import_operators.notEqual,
|
|
84
|
+
omit: () => import_utils.omit,
|
|
85
|
+
onClickHandlerForNonInteractiveElements: () => import_onClickHandlerForNonInteractiveElements.default,
|
|
86
|
+
orderBy: () => import_utils.orderBy,
|
|
87
|
+
padStart: () => import_utils.padStart,
|
|
88
|
+
parseInt: () => import_utils.parseInt,
|
|
89
|
+
pick: () => import_utils.pick,
|
|
90
|
+
pickBy: () => import_utils.pickBy,
|
|
91
|
+
property: () => import_utils.property,
|
|
92
|
+
pull: () => import_utils.pull,
|
|
93
|
+
range: () => import_utils.range,
|
|
94
|
+
removeUndefinedProperties: () => import_utils.removeUndefinedProperties,
|
|
95
|
+
resetTimer: () => import_scrollingTimer.resetTimer,
|
|
96
|
+
runAll: () => import_utils.runAll,
|
|
97
|
+
safeCall: () => import_utils.safeCall,
|
|
98
|
+
set: () => import_utils.set,
|
|
99
|
+
setRef: () => import_system.setRef,
|
|
100
|
+
sortBy: () => import_utils.sortBy,
|
|
101
|
+
startsWith: () => import_operators.startsWith,
|
|
102
|
+
sumBy: () => import_utils.sumBy,
|
|
103
|
+
throttle: () => import_utils.throttle,
|
|
104
|
+
toggleInArray: () => import_utils.toggleInArray,
|
|
105
|
+
toggleInObject: () => import_utils.toggleInObject,
|
|
106
|
+
transform: () => import_utils.transform,
|
|
107
|
+
uniq: () => import_utils.uniq,
|
|
108
|
+
uniqBy: () => import_utils.uniqBy,
|
|
109
|
+
useCancellableDelayedCallback: () => import_hooks.useCancellableDelayedCallback,
|
|
110
|
+
useDerivedStateFromProps: () => import_hooks.useDerivedStateFromProps,
|
|
111
|
+
useExecutionTimer: () => import_hooks.useExecutionTimer,
|
|
112
|
+
useExpandState: () => import_hooks.useExpandState,
|
|
113
|
+
useForceUpdate: () => import_hooks.useForceUpdate,
|
|
114
|
+
useHotkeys: () => import_hooks.useHotkeys,
|
|
115
|
+
useHoverHandlersDelay: () => import_hooks.useHoverHandlersDelay,
|
|
116
|
+
useMeasure: () => import_hooks.useMeasure,
|
|
117
|
+
useOnClickOutside: () => import_hooks.useOnClickOutside,
|
|
118
|
+
useOnElementResize: () => import_hooks.useOnElementResize,
|
|
119
|
+
useParentElement: () => import_hooks.useParentElement,
|
|
120
|
+
usePrevious: () => import_hooks.usePrevious,
|
|
121
|
+
useResizeObserver: () => import_hooks.useResizeObserver,
|
|
122
|
+
useSetRef: () => import_hooks.useSetRef,
|
|
123
|
+
useShouldRecalculate: () => import_hooks.useShouldRecalculate,
|
|
124
|
+
useUncontrolled: () => import_hooks.useUncontrolled,
|
|
125
|
+
useWindowScrollerList: () => import_hooks.useWindowScrollerList,
|
|
126
|
+
useWindowSize: () => import_hooks.useWindowSize,
|
|
127
|
+
validDate: () => import_operators.validDate,
|
|
128
|
+
values: () => import_utils.values
|
|
129
|
+
});
|
|
130
|
+
var React = __toESM(require("react"));
|
|
131
|
+
var import_getComponentFromProps = __toESM(require("./getComponentFromProps"));
|
|
132
|
+
var import_onClickHandlerForNonInteractiveElements = __toESM(require("./onClickHandlerForNonInteractiveElements"));
|
|
133
|
+
var import_capitalize = require("./capitalize");
|
|
134
|
+
var import_operators = require("./operators");
|
|
135
|
+
var import_utils = require("./utils");
|
|
136
|
+
var import_system = require("./system");
|
|
137
|
+
var import_hooks = require("./hooks");
|
|
138
|
+
var import_timeUtils = require("./timeUtils");
|
|
139
|
+
var import_compose = require("./compose");
|
|
140
|
+
var import_platform = require("./platform");
|
|
141
|
+
var import_reactTypesUtility = require("./reactTypesUtility");
|
|
142
|
+
var import_scrollingTimer = require("./scrollingTimer");
|
|
143
|
+
var import_validations = require("./validations");
|
|
144
|
+
module.exports = __toCommonJS(src_exports);
|
|
145
|
+
//# sourceMappingURL=index.js.map
|
package/cjs/index.js.map
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/index.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["export { default as getComponentFromProps } from './getComponentFromProps';\nexport { default as onClickHandlerForNonInteractiveElements } from './onClickHandlerForNonInteractiveElements';\nexport { capitalize } from './capitalize';\nexport {\n checkNotEmpty,\n checkEmpty,\n greaterThan,\n validDate,\n equal,\n notEqual,\n isNull,\n isNotNull,\n isIn,\n isNotIn,\n greaterThanOrEquals,\n lessThanOrEquals,\n startsWith,\n contains,\n} from './operators';\nexport {\n cx,\n runAll,\n hashArray,\n safeCall,\n removeUndefinedProperties,\n isObject,\n curry,\n arrayMove,\n uniq,\n filter,\n uniqBy,\n groupBy,\n property,\n get,\n set,\n cloneDeep,\n debounce,\n findIndex,\n isEmpty,\n isString,\n isEqual,\n maxBy,\n meanBy,\n noop,\n omit,\n orderBy,\n pull,\n sortBy,\n sumBy,\n transform,\n isFunction,\n range,\n parseInt,\n padStart,\n isNaN,\n values,\n throttle,\n toggleInObject,\n toggleInArray,\n pick,\n pickBy,\n differenceBy,\n differenceWith,\n addOrRemove,\n isEqualWith,\n isBoolean,\n} from './utils';\nexport { setRef, mergeRefs, logger } from './system';\nexport {\n useMeasure,\n useForceUpdate,\n useOnClickOutside,\n useUncontrolled,\n useExecutionTimer,\n useExpandState,\n useHotkeys,\n useHoverHandlersDelay,\n useResizeObserver,\n useShouldRecalculate,\n useWindowScrollerList,\n useWindowSize,\n usePrevious,\n useCancellableDelayedCallback,\n useDerivedStateFromProps,\n useSetRef,\n useParentElement,\n useOnElementResize,\n} from './hooks';\nexport { getVisibleTimeByFormat, addLeadingZeros } from './timeUtils';\nexport { compose } from './compose';\nexport { DOCUMENT, WINDOW } from './platform';\nexport {\n isClassComponent,\n isFunctionComponent,\n isReactComponent,\n isElement,\n isDOMTypeElement,\n isCompositeTypeElement,\n} from './reactTypesUtility';\nexport { resetTimer } from './scrollingTimer';\nexport { isRequired, isGreaterThan, isValidDate } from './validations';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mCAAiD;AACjD,qDAAmE;AACnE,wBAA2B;AAC3B,uBAeO;AACP,mBA+CO;AACP,oBAA0C;AAC1C,mBAmBO;AACP,uBAAwD;AACxD,qBAAwB;AACxB,sBAAiC;AACjC,+BAOO;AACP,4BAA2B;AAC3B,yBAAuD;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,22 +1,49 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
|
|
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 onClickHandlerForNonInteractiveElements_exports = {};
|
|
29
|
+
__export(onClickHandlerForNonInteractiveElements_exports, {
|
|
30
|
+
default: () => onClickHandlerForNonInteractiveElements_default,
|
|
31
|
+
onClickHandlerForNonInteractiveElements: () => onClickHandlerForNonInteractiveElements
|
|
32
|
+
});
|
|
33
|
+
var React = __toESM(require("react"));
|
|
34
|
+
const onClickHandlerForNonInteractiveElements = (onClickHandler) => ({
|
|
35
|
+
role: "button",
|
|
36
|
+
tabIndex: "0",
|
|
11
37
|
onClick: onClickHandler,
|
|
12
|
-
onKeyPress: event => {
|
|
38
|
+
onKeyPress: (event) => {
|
|
13
39
|
event.stopPropagation();
|
|
14
|
-
const {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
40
|
+
const { keycode, key } = event;
|
|
41
|
+
if (key === "Enter")
|
|
42
|
+
onClickHandler(event);
|
|
43
|
+
else if (keycode === 13)
|
|
44
|
+
onClickHandler(event);
|
|
19
45
|
}
|
|
20
|
-
})
|
|
21
|
-
|
|
22
|
-
module.exports =
|
|
46
|
+
});
|
|
47
|
+
var onClickHandlerForNonInteractiveElements_default = onClickHandlerForNonInteractiveElements;
|
|
48
|
+
module.exports = __toCommonJS(onClickHandlerForNonInteractiveElements_exports);
|
|
49
|
+
//# sourceMappingURL=onClickHandlerForNonInteractiveElements.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/onClickHandlerForNonInteractiveElements.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["/**\n * onClickHandler: callback\n *\n * @param onClickHandler\n */\nexport const onClickHandlerForNonInteractiveElements = onClickHandler => ({\n role: 'button',\n tabIndex: '0',\n onClick: onClickHandler,\n onKeyPress: event => {\n event.stopPropagation();\n const { keycode, key } = event;\n if (key === 'Enter') onClickHandler(event);\n else if (keycode === 13) onClickHandler(event);\n },\n});\n\nexport default onClickHandlerForNonInteractiveElements;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADKhB,MAAM,0CAA0C,oBAAmB;AAAA,EACxE,MAAM;AAAA,EACN,UAAU;AAAA,EACV,SAAS;AAAA,EACT,YAAY,WAAS;AACnB,UAAM;AACN,UAAM,EAAE,SAAS,QAAQ;AACzB,QAAI,QAAQ;AAAS,qBAAe;AAAA,aAC3B,YAAY;AAAI,qBAAe;AAAA;AAAA;AAI5C,IAAO,kDAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/cjs/operators.js
CHANGED
|
@@ -1,63 +1,68 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
*/
|
|
24
|
-
|
|
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 operators_exports = {};
|
|
29
|
+
__export(operators_exports, {
|
|
30
|
+
checkEmpty: () => checkEmpty,
|
|
31
|
+
checkNotEmpty: () => checkNotEmpty,
|
|
32
|
+
contains: () => contains,
|
|
33
|
+
equal: () => equal,
|
|
34
|
+
greaterThan: () => greaterThan,
|
|
35
|
+
greaterThanOrEquals: () => greaterThanOrEquals,
|
|
36
|
+
isIn: () => isIn,
|
|
37
|
+
isNotIn: () => isNotIn,
|
|
38
|
+
isNotNull: () => isNotNull,
|
|
39
|
+
isNull: () => isNull,
|
|
40
|
+
lessThanOrEquals: () => lessThanOrEquals,
|
|
41
|
+
notEqual: () => notEqual,
|
|
42
|
+
startsWith: () => startsWith,
|
|
43
|
+
validDate: () => validDate
|
|
44
|
+
});
|
|
45
|
+
var React = __toESM(require("react"));
|
|
46
|
+
var import_lodash = require("lodash");
|
|
47
|
+
const checkNotEmpty = (value) => value === "" || value === void 0 || value == [] || value === null || (0, import_lodash.isEmpty)(value);
|
|
48
|
+
const checkEmpty = (value) => !(0, import_lodash.isEmpty)(value);
|
|
25
49
|
const greaterThan = (value, comparator) => value > comparator;
|
|
26
|
-
|
|
27
|
-
* Check if a valid date with format MM/DD/YYYY
|
|
28
|
-
*
|
|
29
|
-
* @param {*} value: string
|
|
30
|
-
* @param value
|
|
31
|
-
*/
|
|
32
|
-
|
|
33
|
-
const validDate = value => {
|
|
50
|
+
const validDate = (value) => {
|
|
34
51
|
const dateValidationRegex = /^\d{1,2}\/\d{1,2}\/\d{4}$/;
|
|
35
|
-
if (!dateValidationRegex.test(value))
|
|
36
|
-
|
|
52
|
+
if (!dateValidationRegex.test(value))
|
|
53
|
+
return false;
|
|
54
|
+
const [m, d, y] = value.split("/").map((n) => Number(n));
|
|
37
55
|
return m === Number(new Date(y, m - 1, d).getMonth()) + 1 && d === Number(new Date(y, m - 1, d).getDate());
|
|
38
56
|
};
|
|
39
57
|
const equal = (a, b) => a === b;
|
|
40
58
|
const notEqual = (a, b) => !equal(a, b);
|
|
41
|
-
const isNull = a => checkNotEmpty(a);
|
|
42
|
-
const isNotNull = a => !isNull(a);
|
|
59
|
+
const isNull = (a) => checkNotEmpty(a);
|
|
60
|
+
const isNotNull = (a) => !isNull(a);
|
|
43
61
|
const isIn = (a, b) => b.indexOf(a) > -1;
|
|
44
62
|
const isNotIn = (a, b) => !isIn(a, b);
|
|
45
63
|
const greaterThanOrEquals = (value, comparator) => value >= comparator;
|
|
46
64
|
const lessThanOrEquals = (value, comparator) => value <= comparator;
|
|
47
65
|
const startsWith = (value, comparator) => String(value).startsWith(comparator);
|
|
48
66
|
const contains = (value, comparator) => String(value).includes(comparator);
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
exports.checkNotEmpty = checkNotEmpty;
|
|
52
|
-
exports.contains = contains;
|
|
53
|
-
exports.equal = equal;
|
|
54
|
-
exports.greaterThan = greaterThan;
|
|
55
|
-
exports.greaterThanOrEquals = greaterThanOrEquals;
|
|
56
|
-
exports.isIn = isIn;
|
|
57
|
-
exports.isNotIn = isNotIn;
|
|
58
|
-
exports.isNotNull = isNotNull;
|
|
59
|
-
exports.isNull = isNull;
|
|
60
|
-
exports.lessThanOrEquals = lessThanOrEquals;
|
|
61
|
-
exports.notEqual = notEqual;
|
|
62
|
-
exports.startsWith = startsWith;
|
|
63
|
-
exports.validDate = validDate;
|
|
67
|
+
module.exports = __toCommonJS(operators_exports);
|
|
68
|
+
//# sourceMappingURL=operators.js.map
|