@elliemae/ds-utilities 2.0.0-next.1 → 2.0.0-next.6
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/compose.js +2 -0
- package/cjs/getComponentFromProps.js +1 -0
- package/cjs/hooks/index.js +1 -0
- package/cjs/hooks/useCancellableDelayedCallback.js +1 -0
- package/cjs/hooks/useDerivedStateFromProps.js +1 -0
- package/cjs/hooks/useExecutionTimer.js +1 -0
- package/cjs/hooks/useExpandState.js +1 -0
- package/cjs/hooks/useHotkeys.js +1 -0
- package/cjs/hooks/useResizeObserver.js +1 -0
- package/cjs/hooks/useWindowSize.js +1 -0
- package/cjs/operators.js +1 -0
- package/cjs/system.js +1 -0
- package/cjs/timeUtils.js +1 -0
- package/cjs/utils.js +2 -1
- package/cjs/validations.js +2 -2
- package/esm/compose.js +2 -0
- package/esm/getComponentFromProps.js +1 -0
- package/esm/hooks/index.js +1 -0
- package/esm/hooks/useCancellableDelayedCallback.js +1 -0
- package/esm/hooks/useDerivedStateFromProps.js +1 -0
- package/esm/hooks/useExecutionTimer.js +1 -0
- package/esm/hooks/useExpandState.js +1 -0
- package/esm/hooks/useHotkeys.js +1 -0
- package/esm/hooks/useResizeObserver.js +1 -0
- package/esm/hooks/useWindowSize.js +1 -0
- package/esm/operators.js +1 -0
- package/esm/system.js +1 -0
- package/esm/timeUtils.js +1 -0
- package/esm/utils.js +2 -1
- package/esm/validations.js +2 -2
- package/package.json +1 -1
- package/cjs/package.json +0 -7
- package/esm/package.json +0 -7
package/cjs/compose.js
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
require('core-js/modules/web.dom-collections.iterator.js');
|
|
6
|
+
|
|
5
7
|
/**
|
|
6
8
|
* Composes single-argument functions from right to left. The rightmost
|
|
7
9
|
* function can take multiple arguments as it provides the signature for
|
package/cjs/hooks/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
4
|
+
require('core-js/modules/web.dom-collections.iterator.js');
|
|
4
5
|
var React = require('react');
|
|
5
6
|
var lodash = require('lodash');
|
|
6
7
|
var useDerivedStateFromProps = require('./useDerivedStateFromProps.js');
|
package/cjs/hooks/useHotkeys.js
CHANGED
package/cjs/operators.js
CHANGED
package/cjs/system.js
CHANGED
package/cjs/timeUtils.js
CHANGED
package/cjs/utils.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
6
|
+
require('core-js/modules/web.dom-collections.iterator.js');
|
|
6
7
|
var lodash = require('lodash');
|
|
7
8
|
var compose = require('./compose.js');
|
|
8
9
|
|
|
@@ -19,7 +20,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
19
20
|
* @param {...any} classnames
|
|
20
21
|
*/
|
|
21
22
|
|
|
22
|
-
const cx = (...classnames) => classnames.reduce((result, cn) =>
|
|
23
|
+
const cx = (...classnames) => classnames.reduce((result, cn) => "".concat(result, " ").concat(cn || ''), ''); // if entry exists, remove it, if not, add it
|
|
23
24
|
|
|
24
25
|
const toggleInObject = (obj, key, value) => obj[key] !== undefined ? lodash.omit(obj, [key]) : _objectSpread(_objectSpread({}, obj), {}, {
|
|
25
26
|
[key]: value
|
package/cjs/validations.js
CHANGED
|
@@ -16,7 +16,7 @@ const isGreaterThan = ({
|
|
|
16
16
|
help,
|
|
17
17
|
comparator = 0
|
|
18
18
|
}) => {
|
|
19
|
-
if (!help) help =
|
|
19
|
+
if (!help) help = "Max value ".concat(comparator);
|
|
20
20
|
return {
|
|
21
21
|
payload: help,
|
|
22
22
|
error: operators.greaterThan(value, comparator)
|
|
@@ -27,7 +27,7 @@ const isValidDate = ({
|
|
|
27
27
|
help,
|
|
28
28
|
format = 'MM/DD/AAA'
|
|
29
29
|
}) => {
|
|
30
|
-
if (!help) help =
|
|
30
|
+
if (!help) help = "Valid Date is required ".concat(format);
|
|
31
31
|
return {
|
|
32
32
|
payload: help,
|
|
33
33
|
error: !operators.validDate(value)
|
package/esm/compose.js
CHANGED
package/esm/hooks/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
2
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
2
3
|
import { useMemo } from 'react';
|
|
3
4
|
import { isFunction } from 'lodash';
|
|
4
5
|
import useDerivedStateFromProp from './useDerivedStateFromProps.js';
|
package/esm/hooks/useHotkeys.js
CHANGED
package/esm/operators.js
CHANGED
package/esm/system.js
CHANGED
package/esm/timeUtils.js
CHANGED
package/esm/utils.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
2
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
2
3
|
import { omit, cloneDeep, isFunction } from 'lodash';
|
|
3
4
|
export { cloneDeep, curry, debounce, differenceBy, differenceWith, filter, findIndex, get, groupBy, isBoolean, isEmpty, isEqual, isEqualWith, isFunction, isNaN, isObject, isString, maxBy, meanBy, noop, omit, orderBy, padStart, parseInt, pick, pickBy, property, pull, range, set, sortBy, sumBy, throttle, transform, uniq, uniqBy, values } from 'lodash';
|
|
4
5
|
export { compose } from './compose.js';
|
|
@@ -12,7 +13,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
12
13
|
* @param {...any} classnames
|
|
13
14
|
*/
|
|
14
15
|
|
|
15
|
-
const cx = (...classnames) => classnames.reduce((result, cn) =>
|
|
16
|
+
const cx = (...classnames) => classnames.reduce((result, cn) => "".concat(result, " ").concat(cn || ''), ''); // if entry exists, remove it, if not, add it
|
|
16
17
|
|
|
17
18
|
const toggleInObject = (obj, key, value) => obj[key] !== undefined ? omit(obj, [key]) : _objectSpread(_objectSpread({}, obj), {}, {
|
|
18
19
|
[key]: value
|
package/esm/validations.js
CHANGED
|
@@ -12,7 +12,7 @@ const isGreaterThan = ({
|
|
|
12
12
|
help,
|
|
13
13
|
comparator = 0
|
|
14
14
|
}) => {
|
|
15
|
-
if (!help) help =
|
|
15
|
+
if (!help) help = "Max value ".concat(comparator);
|
|
16
16
|
return {
|
|
17
17
|
payload: help,
|
|
18
18
|
error: greaterThan(value, comparator)
|
|
@@ -23,7 +23,7 @@ const isValidDate = ({
|
|
|
23
23
|
help,
|
|
24
24
|
format = 'MM/DD/AAA'
|
|
25
25
|
}) => {
|
|
26
|
-
if (!help) help =
|
|
26
|
+
if (!help) help = "Valid Date is required ".concat(format);
|
|
27
27
|
return {
|
|
28
28
|
payload: help,
|
|
29
29
|
error: !validDate(value)
|
package/package.json
CHANGED
package/cjs/package.json
DELETED