@elliemae/ds-utilities 2.2.0-alpha.3 → 3.0.0-next.0
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 -35
- package/cjs/compose.js +32 -39
- package/cjs/getComponentFromProps.js +29 -47
- package/cjs/hooks/index.js +60 -68
- package/cjs/hooks/useCancellableDelayedCallback.js +18 -43
- package/cjs/hooks/useDerivedStateFromProps.js +36 -47
- package/cjs/hooks/useExecutionTimer.js +24 -43
- package/cjs/hooks/useExpandState.js +82 -69
- package/cjs/hooks/useHotkeys.js +24 -44
- package/cjs/hooks/useHoverHandlersDelay.js +18 -48
- package/cjs/hooks/useOnElementResize.js +27 -44
- package/cjs/hooks/useParentElement.js +13 -40
- package/cjs/hooks/usePrevious.js +10 -41
- package/cjs/hooks/useResizeObserver.js +25 -52
- package/cjs/hooks/useSetRef.js +11 -38
- package/cjs/hooks/useShouldRecalculate.js +14 -41
- package/cjs/hooks/useWindowScrollerList.js +33 -51
- package/cjs/hooks/useWindowSize.js +19 -49
- package/cjs/index.js +266 -145
- package/cjs/onClickHandlerForNonInteractiveElements.js +19 -46
- package/cjs/operators.js +51 -56
- package/cjs/platform.js +9 -37
- package/cjs/reactTypesUtility.js +22 -45
- package/cjs/scrollingTimer.js +15 -37
- package/cjs/system.js +30 -47
- package/cjs/timeUtils.js +24 -42
- package/cjs/utils.js +237 -101
- package/cjs/validations.js +35 -48
- package/esm/capitalize.js +3 -6
- package/esm/compose.js +29 -11
- package/esm/getComponentFromProps.js +22 -18
- package/esm/hooks/index.js +18 -40
- package/esm/hooks/useCancellableDelayedCallback.js +14 -12
- package/esm/hooks/useDerivedStateFromProps.js +31 -15
- package/esm/hooks/useExecutionTimer.js +20 -12
- package/esm/hooks/useExpandState.js +72 -36
- package/esm/hooks/useHotkeys.js +14 -11
- package/esm/hooks/useHoverHandlersDelay.js +12 -15
- package/esm/hooks/useOnElementResize.js +20 -12
- package/esm/hooks/useParentElement.js +7 -9
- package/esm/hooks/usePrevious.js +6 -10
- package/esm/hooks/useResizeObserver.js +15 -20
- package/esm/hooks/useSetRef.js +6 -8
- package/esm/hooks/useShouldRecalculate.js +11 -11
- package/esm/hooks/useWindowScrollerList.js +29 -20
- package/esm/hooks/useWindowSize.js +15 -18
- package/esm/index.js +31 -204
- package/esm/onClickHandlerForNonInteractiveElements.js +17 -17
- package/esm/operators.js +34 -27
- package/esm/platform.js +4 -8
- package/esm/reactTypesUtility.js +9 -16
- package/esm/scrollingTimer.js +11 -8
- package/esm/system.js +22 -16
- package/esm/timeUtils.js +19 -13
- package/esm/utils.js +72 -109
- package/esm/validations.js +28 -18
- package/package.json +1 -1
- package/types/compose.d.ts +1 -2
- package/types/getComponentFromProps.d.ts +1 -2
- package/types/hooks/index.d.ts +14 -14
- package/types/hooks/useCancellableDelayedCallback.d.ts +1 -2
- package/types/hooks/useDerivedStateFromProps.d.ts +1 -2
- package/types/hooks/useExecutionTimer.d.ts +1 -2
- package/types/hooks/useExpandState.d.ts +2 -3
- package/types/hooks/useHotkeys.d.ts +2 -3
- package/types/hooks/useHoverHandlersDelay.d.ts +2 -3
- package/types/hooks/usePrevious.d.ts +1 -1
- package/types/hooks/useResizeObserver.d.ts +1 -2
- package/types/hooks/useShouldRecalculate.d.ts +1 -2
- package/types/hooks/useWindowScrollerList.d.ts +2 -3
- package/types/hooks/useWindowSize.d.ts +1 -2
- package/types/index.d.ts +11 -11
- package/types/onClickHandlerForNonInteractiveElements.d.ts +7 -7
- package/types/scrollingTimer.d.ts +1 -1
- package/cjs/capitalize.js.map +0 -7
- package/cjs/compose.js.map +0 -7
- package/cjs/getComponentFromProps.js.map +0 -7
- package/cjs/hooks/index.js.map +0 -7
- package/cjs/hooks/useCancellableDelayedCallback.js.map +0 -7
- package/cjs/hooks/useDerivedStateFromProps.js.map +0 -7
- package/cjs/hooks/useExecutionTimer.js.map +0 -7
- package/cjs/hooks/useExpandState.js.map +0 -7
- package/cjs/hooks/useHotkeys.js.map +0 -7
- package/cjs/hooks/useHoverHandlersDelay.js.map +0 -7
- package/cjs/hooks/useOnElementResize.js.map +0 -7
- package/cjs/hooks/useParentElement.js.map +0 -7
- package/cjs/hooks/usePrevious.js.map +0 -7
- package/cjs/hooks/useResizeObserver.js.map +0 -7
- package/cjs/hooks/useSetRef.js.map +0 -7
- package/cjs/hooks/useShouldRecalculate.js.map +0 -7
- package/cjs/hooks/useWindowScrollerList.js.map +0 -7
- package/cjs/hooks/useWindowSize.js.map +0 -7
- package/cjs/index.js.map +0 -7
- package/cjs/onClickHandlerForNonInteractiveElements.js.map +0 -7
- package/cjs/operators.js.map +0 -7
- package/cjs/platform.js.map +0 -7
- package/cjs/reactTypesUtility.js.map +0 -7
- package/cjs/scrollingTimer.js.map +0 -7
- package/cjs/system.js.map +0 -7
- package/cjs/timeUtils.js.map +0 -7
- package/cjs/utils.js.map +0 -7
- package/cjs/validations.js.map +0 -7
- package/esm/capitalize.js.map +0 -7
- package/esm/compose.js.map +0 -7
- package/esm/getComponentFromProps.js.map +0 -7
- package/esm/hooks/index.js.map +0 -7
- package/esm/hooks/useCancellableDelayedCallback.js.map +0 -7
- package/esm/hooks/useDerivedStateFromProps.js.map +0 -7
- package/esm/hooks/useExecutionTimer.js.map +0 -7
- package/esm/hooks/useExpandState.js.map +0 -7
- package/esm/hooks/useHotkeys.js.map +0 -7
- package/esm/hooks/useHoverHandlersDelay.js.map +0 -7
- package/esm/hooks/useOnElementResize.js.map +0 -7
- package/esm/hooks/useParentElement.js.map +0 -7
- package/esm/hooks/usePrevious.js.map +0 -7
- package/esm/hooks/useResizeObserver.js.map +0 -7
- package/esm/hooks/useSetRef.js.map +0 -7
- package/esm/hooks/useShouldRecalculate.js.map +0 -7
- package/esm/hooks/useWindowScrollerList.js.map +0 -7
- package/esm/hooks/useWindowSize.js.map +0 -7
- package/esm/index.js.map +0 -7
- package/esm/onClickHandlerForNonInteractiveElements.js.map +0 -7
- package/esm/operators.js.map +0 -7
- package/esm/platform.js.map +0 -7
- package/esm/reactTypesUtility.js.map +0 -7
- package/esm/scrollingTimer.js.map +0 -7
- package/esm/system.js.map +0 -7
- package/esm/timeUtils.js.map +0 -7
- package/esm/utils.js.map +0 -7
- package/esm/validations.js.map +0 -7
package/cjs/index.js
CHANGED
|
@@ -1,145 +1,266 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
|
|
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
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var getComponentFromProps = require('./getComponentFromProps.js');
|
|
6
|
+
var onClickHandlerForNonInteractiveElements = require('./onClickHandlerForNonInteractiveElements.js');
|
|
7
|
+
var capitalize = require('./capitalize.js');
|
|
8
|
+
var operators = require('./operators.js');
|
|
9
|
+
var utils = require('./utils.js');
|
|
10
|
+
var system = require('./system.js');
|
|
11
|
+
var useMeasure = require('use-measure');
|
|
12
|
+
var useExecutionTimer = require('./hooks/useExecutionTimer.js');
|
|
13
|
+
var useExpandState = require('./hooks/useExpandState.js');
|
|
14
|
+
var useHotkeys = require('./hooks/useHotkeys.js');
|
|
15
|
+
var useHoverHandlersDelay = require('./hooks/useHoverHandlersDelay.js');
|
|
16
|
+
var useResizeObserver = require('./hooks/useResizeObserver.js');
|
|
17
|
+
var useShouldRecalculate = require('./hooks/useShouldRecalculate.js');
|
|
18
|
+
var useWindowScrollerList = require('./hooks/useWindowScrollerList.js');
|
|
19
|
+
var useWindowSize = require('./hooks/useWindowSize.js');
|
|
20
|
+
var useForceUpdate = require('use-force-update');
|
|
21
|
+
var useOnclickoutside = require('use-onclickoutside');
|
|
22
|
+
var uncontrollable = require('uncontrollable');
|
|
23
|
+
var usePrevious = require('./hooks/usePrevious.js');
|
|
24
|
+
var useCancellableDelayedCallback = require('./hooks/useCancellableDelayedCallback.js');
|
|
25
|
+
var useDerivedStateFromProps = require('./hooks/useDerivedStateFromProps.js');
|
|
26
|
+
var useSetRef = require('./hooks/useSetRef.js');
|
|
27
|
+
var useParentElement = require('./hooks/useParentElement.js');
|
|
28
|
+
var useOnElementResize = require('./hooks/useOnElementResize.js');
|
|
29
|
+
var timeUtils = require('./timeUtils.js');
|
|
30
|
+
var compose = require('./compose.js');
|
|
31
|
+
var platform = require('./platform.js');
|
|
32
|
+
var reactTypesUtility = require('./reactTypesUtility.js');
|
|
33
|
+
var scrollingTimer = require('./scrollingTimer.js');
|
|
34
|
+
var validations = require('./validations.js');
|
|
35
|
+
var lodash = require('lodash');
|
|
36
|
+
|
|
37
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
38
|
+
|
|
39
|
+
var useMeasure__default = /*#__PURE__*/_interopDefaultLegacy(useMeasure);
|
|
40
|
+
var useForceUpdate__default = /*#__PURE__*/_interopDefaultLegacy(useForceUpdate);
|
|
41
|
+
var useOnclickoutside__default = /*#__PURE__*/_interopDefaultLegacy(useOnclickoutside);
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
exports.getComponentFromProps = getComponentFromProps;
|
|
46
|
+
exports.onClickHandlerForNonInteractiveElements = onClickHandlerForNonInteractiveElements;
|
|
47
|
+
exports.capitalize = capitalize.capitalize;
|
|
48
|
+
exports.checkEmpty = operators.checkEmpty;
|
|
49
|
+
exports.checkNotEmpty = operators.checkNotEmpty;
|
|
50
|
+
exports.contains = operators.contains;
|
|
51
|
+
exports.equal = operators.equal;
|
|
52
|
+
exports.greaterThan = operators.greaterThan;
|
|
53
|
+
exports.greaterThanOrEquals = operators.greaterThanOrEquals;
|
|
54
|
+
exports.isIn = operators.isIn;
|
|
55
|
+
exports.isNotIn = operators.isNotIn;
|
|
56
|
+
exports.isNotNull = operators.isNotNull;
|
|
57
|
+
exports.isNull = operators.isNull;
|
|
58
|
+
exports.lessThanOrEquals = operators.lessThanOrEquals;
|
|
59
|
+
exports.notEqual = operators.notEqual;
|
|
60
|
+
exports.startsWith = operators.startsWith;
|
|
61
|
+
exports.validDate = operators.validDate;
|
|
62
|
+
exports.addOrRemove = utils.addOrRemove;
|
|
63
|
+
exports.arrayMove = utils.arrayMove;
|
|
64
|
+
exports.cx = utils.cx;
|
|
65
|
+
exports.hashArray = utils.hashArray;
|
|
66
|
+
exports.removeUndefinedProperties = utils.removeUndefinedProperties;
|
|
67
|
+
exports.runAll = utils.runAll;
|
|
68
|
+
exports.safeCall = utils.safeCall;
|
|
69
|
+
exports.toggleInArray = utils.toggleInArray;
|
|
70
|
+
exports.toggleInObject = utils.toggleInObject;
|
|
71
|
+
exports.logger = system.logger;
|
|
72
|
+
exports.mergeRefs = system.mergeRefs;
|
|
73
|
+
exports.setRef = system.setRef;
|
|
74
|
+
Object.defineProperty(exports, 'useMeasure', {
|
|
75
|
+
enumerable: true,
|
|
76
|
+
get: function () { return useMeasure__default["default"]; }
|
|
77
|
+
});
|
|
78
|
+
exports.useExecutionTimer = useExecutionTimer;
|
|
79
|
+
exports.useExpandState = useExpandState;
|
|
80
|
+
exports.useHotkeys = useHotkeys;
|
|
81
|
+
exports.useHoverHandlersDelay = useHoverHandlersDelay;
|
|
82
|
+
exports.useResizeObserver = useResizeObserver;
|
|
83
|
+
exports.useShouldRecalculate = useShouldRecalculate;
|
|
84
|
+
exports.useWindowScrollerList = useWindowScrollerList;
|
|
85
|
+
exports.useWindowSize = useWindowSize;
|
|
86
|
+
Object.defineProperty(exports, 'useForceUpdate', {
|
|
87
|
+
enumerable: true,
|
|
88
|
+
get: function () { return useForceUpdate__default["default"]; }
|
|
89
|
+
});
|
|
90
|
+
Object.defineProperty(exports, 'useOnClickOutside', {
|
|
91
|
+
enumerable: true,
|
|
92
|
+
get: function () { return useOnclickoutside__default["default"]; }
|
|
93
|
+
});
|
|
94
|
+
Object.defineProperty(exports, 'useUncontrolled', {
|
|
95
|
+
enumerable: true,
|
|
96
|
+
get: function () { return uncontrollable.useUncontrolled; }
|
|
97
|
+
});
|
|
98
|
+
exports.usePrevious = usePrevious;
|
|
99
|
+
exports.useCancellableDelayedCallback = useCancellableDelayedCallback;
|
|
100
|
+
exports.useDerivedStateFromProps = useDerivedStateFromProps;
|
|
101
|
+
exports.useSetRef = useSetRef.useSetRef;
|
|
102
|
+
exports.useParentElement = useParentElement.useParentElement;
|
|
103
|
+
exports.useOnElementResize = useOnElementResize.useOnElementResize;
|
|
104
|
+
exports.addLeadingZeros = timeUtils.addLeadingZeros;
|
|
105
|
+
exports.getVisibleTimeByFormat = timeUtils.getVisibleTimeByFormat;
|
|
106
|
+
exports.compose = compose.compose;
|
|
107
|
+
exports.DOCUMENT = platform.DOCUMENT;
|
|
108
|
+
exports.WINDOW = platform.WINDOW;
|
|
109
|
+
exports.isClassComponent = reactTypesUtility.isClassComponent;
|
|
110
|
+
exports.isCompositeTypeElement = reactTypesUtility.isCompositeTypeElement;
|
|
111
|
+
exports.isDOMTypeElement = reactTypesUtility.isDOMTypeElement;
|
|
112
|
+
exports.isElement = reactTypesUtility.isElement;
|
|
113
|
+
exports.isFunctionComponent = reactTypesUtility.isFunctionComponent;
|
|
114
|
+
exports.isReactComponent = reactTypesUtility.isReactComponent;
|
|
115
|
+
exports.resetTimer = scrollingTimer.resetTimer;
|
|
116
|
+
exports.isGreaterThan = validations.isGreaterThan;
|
|
117
|
+
exports.isRequired = validations.isRequired;
|
|
118
|
+
exports.isValidDate = validations.isValidDate;
|
|
119
|
+
Object.defineProperty(exports, 'cloneDeep', {
|
|
120
|
+
enumerable: true,
|
|
121
|
+
get: function () { return lodash.cloneDeep; }
|
|
122
|
+
});
|
|
123
|
+
Object.defineProperty(exports, 'curry', {
|
|
124
|
+
enumerable: true,
|
|
125
|
+
get: function () { return lodash.curry; }
|
|
126
|
+
});
|
|
127
|
+
Object.defineProperty(exports, 'debounce', {
|
|
128
|
+
enumerable: true,
|
|
129
|
+
get: function () { return lodash.debounce; }
|
|
130
|
+
});
|
|
131
|
+
Object.defineProperty(exports, 'differenceBy', {
|
|
132
|
+
enumerable: true,
|
|
133
|
+
get: function () { return lodash.differenceBy; }
|
|
134
|
+
});
|
|
135
|
+
Object.defineProperty(exports, 'differenceWith', {
|
|
136
|
+
enumerable: true,
|
|
137
|
+
get: function () { return lodash.differenceWith; }
|
|
138
|
+
});
|
|
139
|
+
Object.defineProperty(exports, 'filter', {
|
|
140
|
+
enumerable: true,
|
|
141
|
+
get: function () { return lodash.filter; }
|
|
142
|
+
});
|
|
143
|
+
Object.defineProperty(exports, 'findIndex', {
|
|
144
|
+
enumerable: true,
|
|
145
|
+
get: function () { return lodash.findIndex; }
|
|
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,49 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
|
|
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",
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* onClickHandler: callback
|
|
5
|
+
*
|
|
6
|
+
* @param onClickHandler
|
|
7
|
+
*/
|
|
8
|
+
var onClickHandlerForNonInteractiveElements = (onClickHandler => ({
|
|
9
|
+
role: 'button',
|
|
10
|
+
tabIndex: '0',
|
|
37
11
|
onClick: onClickHandler,
|
|
38
|
-
onKeyPress:
|
|
12
|
+
onKeyPress: event => {
|
|
39
13
|
event.stopPropagation();
|
|
40
|
-
const {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
14
|
+
const {
|
|
15
|
+
keycode,
|
|
16
|
+
key
|
|
17
|
+
} = event;
|
|
18
|
+
if (key === 'Enter') onClickHandler(event);else if (keycode === 13) onClickHandler(event);
|
|
45
19
|
}
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
module.exports =
|
|
49
|
-
//# sourceMappingURL=onClickHandlerForNonInteractiveElements.js.map
|
|
20
|
+
}));
|
|
21
|
+
|
|
22
|
+
module.exports = onClickHandlerForNonInteractiveElements;
|
package/cjs/operators.js
CHANGED
|
@@ -1,68 +1,63 @@
|
|
|
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
|
-
|
|
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 = __toESM(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);
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
require('core-js/modules/web.dom-collections.iterator.js');
|
|
6
|
+
require('core-js/modules/esnext.async-iterator.map.js');
|
|
7
|
+
require('core-js/modules/esnext.iterator.map.js');
|
|
8
|
+
var lodash = require('lodash');
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Check if the value is null undefined ''
|
|
12
|
+
*
|
|
13
|
+
* @param value
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
const checkNotEmpty = value => value === '' || value === undefined || value == [] || value === null || lodash.isEmpty(value);
|
|
17
|
+
const checkEmpty = value => !lodash.isEmpty(value);
|
|
18
|
+
/**
|
|
19
|
+
* @param value: number
|
|
20
|
+
* @param comparator: number
|
|
21
|
+
* @param value
|
|
22
|
+
* @param comparator
|
|
23
|
+
*/
|
|
24
|
+
|
|
49
25
|
const greaterThan = (value, comparator) => value > comparator;
|
|
50
|
-
|
|
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 => {
|
|
51
34
|
const dateValidationRegex = /^\d{1,2}\/\d{1,2}\/\d{4}$/;
|
|
52
|
-
if (!dateValidationRegex.test(value))
|
|
53
|
-
|
|
54
|
-
const [m, d, y] = value.split("/").map((n) => Number(n));
|
|
35
|
+
if (!dateValidationRegex.test(value)) return false;
|
|
36
|
+
const [m, d, y] = value.split('/').map(n => Number(n));
|
|
55
37
|
return m === Number(new Date(y, m - 1, d).getMonth()) + 1 && d === Number(new Date(y, m - 1, d).getDate());
|
|
56
38
|
};
|
|
57
39
|
const equal = (a, b) => a === b;
|
|
58
40
|
const notEqual = (a, b) => !equal(a, b);
|
|
59
|
-
const isNull =
|
|
60
|
-
const isNotNull =
|
|
41
|
+
const isNull = a => checkNotEmpty(a);
|
|
42
|
+
const isNotNull = a => !isNull(a);
|
|
61
43
|
const isIn = (a, b) => b.indexOf(a) > -1;
|
|
62
44
|
const isNotIn = (a, b) => !isIn(a, b);
|
|
63
45
|
const greaterThanOrEquals = (value, comparator) => value >= comparator;
|
|
64
46
|
const lessThanOrEquals = (value, comparator) => value <= comparator;
|
|
65
47
|
const startsWith = (value, comparator) => String(value).startsWith(comparator);
|
|
66
48
|
const contains = (value, comparator) => String(value).includes(comparator);
|
|
67
|
-
|
|
68
|
-
|
|
49
|
+
|
|
50
|
+
exports.checkEmpty = checkEmpty;
|
|
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;
|