@elliemae/ds-utilities 3.52.0-rc.8 → 3.52.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/dist/cjs/operators.js +3 -3
- package/dist/cjs/operators.js.map +2 -2
- package/dist/cjs/utils.js +42 -42
- package/dist/cjs/utils.js.map +2 -2
- package/dist/esm/operators.js +1 -1
- package/dist/esm/operators.js.map +1 -1
- package/dist/esm/utils.js +1 -1
- package/dist/esm/utils.js.map +1 -1
- package/dist/types/utils.d.ts +2 -1
- package/package.json +10 -10
package/dist/cjs/operators.js
CHANGED
|
@@ -45,12 +45,12 @@ __export(operators_exports, {
|
|
|
45
45
|
});
|
|
46
46
|
module.exports = __toCommonJS(operators_exports);
|
|
47
47
|
var React = __toESM(require("react"));
|
|
48
|
-
var
|
|
48
|
+
var import_lodash_es = require("lodash-es");
|
|
49
49
|
const checkNotEmpty = (value) => (
|
|
50
50
|
// eslint-disable-next-line eqeqeq
|
|
51
|
-
value === "" || value === void 0 || value === null || (0,
|
|
51
|
+
value === "" || value === void 0 || value === null || (0, import_lodash_es.isEmpty)(value)
|
|
52
52
|
);
|
|
53
|
-
const checkEmpty = (value) => !(0,
|
|
53
|
+
const checkEmpty = (value) => !(0, import_lodash_es.isEmpty)(value);
|
|
54
54
|
const greaterThan = (value, comparator) => value > comparator;
|
|
55
55
|
const validDate = (value) => {
|
|
56
56
|
const dateValidationRegex = /^\d{1,2}\/\d{1,2}\/\d{4}$/;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/operators.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import { isEmpty } from 'lodash';\n\n// Check if the value is empty\nexport const checkNotEmpty = (value: unknown) =>\n // eslint-disable-next-line eqeqeq\n value === '' || value === undefined || value === null || isEmpty(value);\n\n// Check if the value is not empty\nexport const checkEmpty = (value: unknown) => !isEmpty(value);\n\nexport const greaterThan = (value: number, comparator: number) => value > comparator;\n\n// Check if a valid date with format MM/DD/YYYY\nexport const validDate = (value: string) => {\n const dateValidationRegex = /^\\d{1,2}\\/\\d{1,2}\\/\\d{4}$/;\n if (!dateValidationRegex.test(value)) return false;\n const [m, d, y] = value.split('/').map((n) => Number(n));\n return m === Number(new Date(y, m - 1, d).getMonth()) + 1 && d === Number(new Date(y, m - 1, d).getDate());\n};\n\nexport const equal = (a: unknown, b: unknown) => a === b;\n\nexport const notEqual = (a: unknown, b: unknown) => !equal(a, b);\n\nexport const isNull = (a: unknown) => checkNotEmpty(a);\n\nexport const isNotNull = (a: unknown) => !isNull(a);\n\nexport const isIn = <T,>(a: T, b: T[]) => b.indexOf(a) > -1;\n\nexport const isNotIn = <T,>(a: T, b: T[]) => !isIn(a, b);\n\nexport const greaterThanOrEquals = (value: number, comparator: number) => value >= comparator;\nexport const lessThanOrEquals = (value: number, comparator: number) => value <= comparator;\nexport const startsWith = (value: unknown, comparator: string) => String(value).startsWith(comparator);\nexport const contains = (value: unknown, comparator: string) => String(value).includes(comparator);\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;ACAA,YAAuB;ADAvB,
|
|
4
|
+
"sourcesContent": ["import { isEmpty } from 'lodash-es';\n\n// Check if the value is empty\nexport const checkNotEmpty = (value: unknown) =>\n // eslint-disable-next-line eqeqeq\n value === '' || value === undefined || value === null || isEmpty(value);\n\n// Check if the value is not empty\nexport const checkEmpty = (value: unknown) => !isEmpty(value);\n\nexport const greaterThan = (value: number, comparator: number) => value > comparator;\n\n// Check if a valid date with format MM/DD/YYYY\nexport const validDate = (value: string) => {\n const dateValidationRegex = /^\\d{1,2}\\/\\d{1,2}\\/\\d{4}$/;\n if (!dateValidationRegex.test(value)) return false;\n const [m, d, y] = value.split('/').map((n) => Number(n));\n return m === Number(new Date(y, m - 1, d).getMonth()) + 1 && d === Number(new Date(y, m - 1, d).getDate());\n};\n\nexport const equal = (a: unknown, b: unknown) => a === b;\n\nexport const notEqual = (a: unknown, b: unknown) => !equal(a, b);\n\nexport const isNull = (a: unknown) => checkNotEmpty(a);\n\nexport const isNotNull = (a: unknown) => !isNull(a);\n\nexport const isIn = <T,>(a: T, b: T[]) => b.indexOf(a) > -1;\n\nexport const isNotIn = <T,>(a: T, b: T[]) => !isIn(a, b);\n\nexport const greaterThanOrEquals = (value: number, comparator: number) => value >= comparator;\nexport const lessThanOrEquals = (value: number, comparator: number) => value <= comparator;\nexport const startsWith = (value: unknown, comparator: string) => String(value).startsWith(comparator);\nexport const contains = (value: unknown, comparator: string) => String(value).includes(comparator);\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;ACAA,YAAuB;ADAvB,uBAAwB;AAGjB,MAAM,gBAAgB,CAAC;AAAA;AAAA,EAE5B,UAAU,MAAM,UAAU,UAAa,UAAU,YAAQ,0BAAQ,KAAK;AAAA;AAGjE,MAAM,aAAa,CAAC,UAAmB,KAAC,0BAAQ,KAAK;AAErD,MAAM,cAAc,CAAC,OAAe,eAAuB,QAAQ;AAGnE,MAAM,YAAY,CAAC,UAAkB;AAC1C,QAAM,sBAAsB;AAC5B,MAAI,CAAC,oBAAoB,KAAK,KAAK,EAAG,QAAO;AAC7C,QAAM,CAAC,GAAG,GAAG,CAAC,IAAI,MAAM,MAAM,GAAG,EAAE,IAAI,CAAC,MAAM,OAAO,CAAC,CAAC;AACvD,SAAO,MAAM,OAAO,IAAI,KAAK,GAAG,IAAI,GAAG,CAAC,EAAE,SAAS,CAAC,IAAI,KAAK,MAAM,OAAO,IAAI,KAAK,GAAG,IAAI,GAAG,CAAC,EAAE,QAAQ,CAAC;AAC3G;AAEO,MAAM,QAAQ,CAAC,GAAY,MAAe,MAAM;AAEhD,MAAM,WAAW,CAAC,GAAY,MAAe,CAAC,MAAM,GAAG,CAAC;AAExD,MAAM,SAAS,CAAC,MAAe,cAAc,CAAC;AAE9C,MAAM,YAAY,CAAC,MAAe,CAAC,OAAO,CAAC;AAE3C,MAAM,OAAO,CAAK,GAAM,MAAW,EAAE,QAAQ,CAAC,IAAI;AAElD,MAAM,UAAU,CAAK,GAAM,MAAW,CAAC,KAAK,GAAG,CAAC;AAEhD,MAAM,sBAAsB,CAAC,OAAe,eAAuB,SAAS;AAC5E,MAAM,mBAAmB,CAAC,OAAe,eAAuB,SAAS;AACzE,MAAM,aAAa,CAAC,OAAgB,eAAuB,OAAO,KAAK,EAAE,WAAW,UAAU;AAC9F,MAAM,WAAW,CAAC,OAAgB,eAAuB,OAAO,KAAK,EAAE,SAAS,UAAU;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/utils.js
CHANGED
|
@@ -30,57 +30,57 @@ var utils_exports = {};
|
|
|
30
30
|
__export(utils_exports, {
|
|
31
31
|
addOrRemove: () => addOrRemove,
|
|
32
32
|
arrayMove: () => arrayMove,
|
|
33
|
-
cloneDeep: () =>
|
|
34
|
-
curry: () =>
|
|
33
|
+
cloneDeep: () => import_lodash_es.cloneDeep,
|
|
34
|
+
curry: () => import_lodash_es.curry,
|
|
35
35
|
cx: () => cx,
|
|
36
|
-
debounce: () =>
|
|
36
|
+
debounce: () => import_lodash_es.debounce,
|
|
37
37
|
default: () => utils_default,
|
|
38
|
-
differenceBy: () =>
|
|
39
|
-
differenceWith: () =>
|
|
40
|
-
filter: () =>
|
|
41
|
-
findIndex: () =>
|
|
42
|
-
get: () =>
|
|
43
|
-
groupBy: () =>
|
|
38
|
+
differenceBy: () => import_lodash_es.differenceBy,
|
|
39
|
+
differenceWith: () => import_lodash_es.differenceWith,
|
|
40
|
+
filter: () => import_lodash_es.filter,
|
|
41
|
+
findIndex: () => import_lodash_es.findIndex,
|
|
42
|
+
get: () => import_lodash_es.get,
|
|
43
|
+
groupBy: () => import_lodash_es.groupBy,
|
|
44
44
|
hashArray: () => hashArray,
|
|
45
|
-
isBoolean: () =>
|
|
46
|
-
isEmpty: () =>
|
|
47
|
-
isEqual: () =>
|
|
48
|
-
isEqualWith: () =>
|
|
49
|
-
isFunction: () =>
|
|
50
|
-
isNaN: () =>
|
|
51
|
-
isObject: () =>
|
|
52
|
-
isString: () =>
|
|
53
|
-
maxBy: () =>
|
|
54
|
-
meanBy: () =>
|
|
55
|
-
noop: () =>
|
|
56
|
-
omit: () =>
|
|
57
|
-
orderBy: () =>
|
|
58
|
-
padStart: () =>
|
|
59
|
-
parseInt: () =>
|
|
60
|
-
pick: () =>
|
|
61
|
-
pickBy: () =>
|
|
62
|
-
property: () =>
|
|
63
|
-
pull: () =>
|
|
64
|
-
range: () =>
|
|
45
|
+
isBoolean: () => import_lodash_es.isBoolean,
|
|
46
|
+
isEmpty: () => import_lodash_es.isEmpty,
|
|
47
|
+
isEqual: () => import_lodash_es.isEqual,
|
|
48
|
+
isEqualWith: () => import_lodash_es.isEqualWith,
|
|
49
|
+
isFunction: () => import_lodash_es.isFunction,
|
|
50
|
+
isNaN: () => import_lodash_es.isNaN,
|
|
51
|
+
isObject: () => import_lodash_es.isObject,
|
|
52
|
+
isString: () => import_lodash_es.isString,
|
|
53
|
+
maxBy: () => import_lodash_es.maxBy,
|
|
54
|
+
meanBy: () => import_lodash_es.meanBy,
|
|
55
|
+
noop: () => import_lodash_es.noop,
|
|
56
|
+
omit: () => import_lodash_es.omit,
|
|
57
|
+
orderBy: () => import_lodash_es.orderBy,
|
|
58
|
+
padStart: () => import_lodash_es.padStart,
|
|
59
|
+
parseInt: () => import_lodash_es.parseInt,
|
|
60
|
+
pick: () => import_lodash_es.pick,
|
|
61
|
+
pickBy: () => import_lodash_es.pickBy,
|
|
62
|
+
property: () => import_lodash_es.property,
|
|
63
|
+
pull: () => import_lodash_es.pull,
|
|
64
|
+
range: () => import_lodash_es.range,
|
|
65
65
|
removeUndefinedProperties: () => removeUndefinedProperties,
|
|
66
66
|
runAll: () => runAll,
|
|
67
67
|
safeCall: () => safeCall,
|
|
68
|
-
set: () =>
|
|
69
|
-
sortBy: () =>
|
|
70
|
-
sumBy: () =>
|
|
71
|
-
throttle: () =>
|
|
68
|
+
set: () => import_lodash_es.set,
|
|
69
|
+
sortBy: () => import_lodash_es.sortBy,
|
|
70
|
+
sumBy: () => import_lodash_es.sumBy,
|
|
71
|
+
throttle: () => import_lodash_es.throttle,
|
|
72
72
|
toggleInArray: () => toggleInArray,
|
|
73
73
|
toggleInObject: () => toggleInObject,
|
|
74
|
-
transform: () =>
|
|
75
|
-
uniq: () =>
|
|
76
|
-
uniqBy: () =>
|
|
77
|
-
values: () =>
|
|
74
|
+
transform: () => import_lodash_es.transform,
|
|
75
|
+
uniq: () => import_lodash_es.uniq,
|
|
76
|
+
uniqBy: () => import_lodash_es.uniqBy,
|
|
77
|
+
values: () => import_lodash_es.values
|
|
78
78
|
});
|
|
79
79
|
module.exports = __toCommonJS(utils_exports);
|
|
80
80
|
var React = __toESM(require("react"));
|
|
81
|
-
var
|
|
81
|
+
var import_lodash_es = require("lodash-es");
|
|
82
82
|
const cx = (...classnames) => classnames.reduce((result, cn) => `${result} ${cn || ""}`, "");
|
|
83
|
-
const toggleInObject = (obj, key, value) => obj[key] !== void 0 ? (0,
|
|
83
|
+
const toggleInObject = (obj, key, value) => obj[key] !== void 0 ? (0, import_lodash_es.omit)(obj, [key]) : { ...obj, [key]: value };
|
|
84
84
|
const toggleInArray = (array, value) => array.indexOf(value) === -1 ? [value] : [];
|
|
85
85
|
const arrayMoveMutate = (array, from, to) => {
|
|
86
86
|
array.splice(to < 0 ? array.length + to : to, 0, array.splice(from, 1)[0]);
|
|
@@ -94,7 +94,7 @@ const accessorDefault = (item) => item;
|
|
|
94
94
|
const addOrRemove = (array, item, accessor = accessorDefault) => {
|
|
95
95
|
const index = array.findIndex((iItem) => accessor(iItem) === accessor(item));
|
|
96
96
|
if (index !== -1) {
|
|
97
|
-
const nextArray = (0,
|
|
97
|
+
const nextArray = (0, import_lodash_es.cloneDeep)(array);
|
|
98
98
|
nextArray.splice(index, 1);
|
|
99
99
|
return nextArray;
|
|
100
100
|
}
|
|
@@ -103,7 +103,7 @@ const addOrRemove = (array, item, accessor = accessorDefault) => {
|
|
|
103
103
|
function runAll(...fns) {
|
|
104
104
|
return (...args) => fns.forEach((fn) => {
|
|
105
105
|
if (Array.isArray(fn)) runAll(fn);
|
|
106
|
-
if ((0,
|
|
106
|
+
if ((0, import_lodash_es.isFunction)(fn)) fn(...args);
|
|
107
107
|
});
|
|
108
108
|
}
|
|
109
109
|
function hashArray(arr, fieldName) {
|
|
@@ -116,7 +116,7 @@ function hashArray(arr, fieldName) {
|
|
|
116
116
|
}, {});
|
|
117
117
|
}
|
|
118
118
|
function safeCall(fun, ...args) {
|
|
119
|
-
if ((0,
|
|
119
|
+
if ((0, import_lodash_es.isFunction)(fun)) {
|
|
120
120
|
fun(...args);
|
|
121
121
|
}
|
|
122
122
|
}
|
package/dist/cjs/utils.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/utils.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable no-param-reassign */\n/* eslint-disable max-lines */\n/**\n * commonly used functions\n * Add a level of indirection to lodash so we can replace\n * it if desired, while keeping function names the same\n */\n// TODO: Import individual packages vs referencing all of lodash\nimport {\n cloneDeep,\n filter,\n debounce,\n findIndex,\n isEmpty,\n isString,\n isEqual,\n noop,\n omit,\n orderBy,\n pull,\n sumBy,\n maxBy,\n meanBy,\n sortBy,\n transform,\n isFunction,\n uniq,\n uniqBy,\n groupBy,\n property,\n get,\n set,\n range,\n parseInt,\n padStart,\n isNaN,\n values,\n throttle,\n pick,\n pickBy,\n differenceBy,\n differenceWith,\n isEqualWith,\n curry,\n isObject,\n isBoolean,\n} from 'lodash';\n\ntype UnknownFunctionT = (...args: unknown[]) => unknown;\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype ValidKeys = string | number | symbol;\n\n/**\n * Concatenates classNames from arguments\n * @param {...any} classnames classnames you want to join\n * @returns {string} All classnames string concatenated\n */\nexport const cx = (...classnames: string[]): string => classnames.reduce((result, cn) => `${result} ${cn || ''}`, '');\n\n// if entry exists, remove it, if not, add it\nconst toggleInObject = (obj: Record<string, unknown>, key: string, value: unknown) =>\n obj[key] !== undefined ? omit(obj, [key]) : { ...obj, [key]: value };\n\nconst toggleInArray = (array: unknown[], value: unknown) => (array.indexOf(value) === -1 ? [value] : []);\n\nconst arrayMoveMutate = (array: unknown[], from: number, to: number) => {\n array.splice(to < 0 ? array.length + to : to, 0, array.splice(from, 1)[0]);\n};\n\nconst arrayMove = <T,>(array: T[], from: number, to: number): T[] => {\n array = array.slice();\n arrayMoveMutate(array, from, to);\n return array;\n};\n\nconst accessorDefault = <T,>(item: T): T => item;\n\nconst addOrRemove = <T,>(array: T[], item: T, accessor = accessorDefault): T[] => {\n const index = array.findIndex((iItem) => accessor(iItem) === accessor(item));\n\n if (index !== -1) {\n const nextArray = cloneDeep(array);\n nextArray.splice(index, 1);\n return nextArray;\n }\n\n return [...array, item];\n};\n\nexport function runAll(...fns: (UnknownFunctionT | UnknownFunctionT[])[]) {\n return (...args: unknown[]) =>\n fns.forEach((fn) => {\n if (Array.isArray(fn)) runAll(fn);\n if (isFunction(fn)) fn(...args);\n });\n}\n\nexport function hashArray(arr: (ValidKeys | Record<string, ValidKeys>)[], fieldName?: string) {\n return arr.reduce<Record<ValidKeys, boolean>>((result, item) => {\n const newKey: ValidKeys = fieldName && typeof item === 'object' ? item[fieldName] : (item as ValidKeys);\n return {\n ...result,\n [newKey]: true,\n };\n }, {});\n}\n\nexport function safeCall(fun: unknown, ...args: unknown[]) {\n if (isFunction(fun)) {\n fun(...args);\n }\n}\n\nexport const removeUndefinedProperties = (obj: Record<string, unknown>) => {\n const cleanObject = { ...obj };\n Object.keys(obj).forEach((key) => cleanObject[key] === undefined && delete cleanObject[key]);\n return cleanObject;\n};\n\nexport default {};\nexport {\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};\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;ACAA,YAAuB;ADQvB,
|
|
4
|
+
"sourcesContent": ["/* eslint-disable no-param-reassign */\n/* eslint-disable max-lines */\n/**\n * commonly used functions\n * Add a level of indirection to lodash so we can replace\n * it if desired, while keeping function names the same\n */\n// TODO: Import individual packages vs referencing all of lodash\nimport {\n cloneDeep,\n filter,\n debounce,\n findIndex,\n isEmpty,\n isString,\n isEqual,\n noop,\n omit,\n orderBy,\n pull,\n sumBy,\n maxBy,\n meanBy,\n sortBy,\n transform,\n isFunction,\n uniq,\n uniqBy,\n groupBy,\n property,\n get,\n set,\n range,\n parseInt,\n padStart,\n isNaN,\n values,\n throttle,\n pick,\n pickBy,\n differenceBy,\n differenceWith,\n isEqualWith,\n curry,\n isObject,\n isBoolean,\n} from 'lodash-es';\n\ntype UnknownFunctionT = (...args: unknown[]) => unknown;\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype ValidKeys = string | number | symbol;\n\n/**\n * Concatenates classNames from arguments\n * @param {...any} classnames classnames you want to join\n * @returns {string} All classnames string concatenated\n */\nexport const cx = (...classnames: string[]): string => classnames.reduce((result, cn) => `${result} ${cn || ''}`, '');\n\n// if entry exists, remove it, if not, add it\nconst toggleInObject = (obj: Record<string, unknown>, key: string, value: unknown) =>\n obj[key] !== undefined ? omit(obj, [key]) : { ...obj, [key]: value };\n\nconst toggleInArray = (array: unknown[], value: unknown) => (array.indexOf(value) === -1 ? [value] : []);\n\nconst arrayMoveMutate = (array: unknown[], from: number, to: number) => {\n array.splice(to < 0 ? array.length + to : to, 0, array.splice(from, 1)[0]);\n};\n\nconst arrayMove = <T,>(array: T[], from: number, to: number): T[] => {\n array = array.slice();\n arrayMoveMutate(array, from, to);\n return array;\n};\n\nconst accessorDefault = <T,>(item: T): T => item;\n\nconst addOrRemove = <T,>(array: T[], item: T, accessor = accessorDefault): T[] => {\n const index = array.findIndex((iItem) => accessor(iItem) === accessor(item));\n\n if (index !== -1) {\n const nextArray = cloneDeep(array);\n nextArray.splice(index, 1);\n return nextArray;\n }\n\n return [...array, item];\n};\n\nexport function runAll(...fns: (UnknownFunctionT | UnknownFunctionT[])[]) {\n return (...args: unknown[]) =>\n fns.forEach((fn) => {\n if (Array.isArray(fn)) runAll(fn);\n if (isFunction(fn)) fn(...args);\n });\n}\n\nexport function hashArray(arr: (ValidKeys | Record<string, ValidKeys>)[], fieldName?: string) {\n return arr.reduce<Record<ValidKeys, boolean>>((result, item) => {\n const newKey: ValidKeys = fieldName && typeof item === 'object' ? item[fieldName] : (item as ValidKeys);\n return {\n ...result,\n [newKey]: true,\n };\n }, {});\n}\n\nexport function safeCall(fun: unknown, ...args: unknown[]) {\n if (isFunction(fun)) {\n fun(...args);\n }\n}\n\nexport const removeUndefinedProperties = (obj: Record<string, unknown>) => {\n const cleanObject = { ...obj };\n Object.keys(obj).forEach((key) => cleanObject[key] === undefined && delete cleanObject[key]);\n return cleanObject;\n};\n\nexport default {};\nexport {\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};\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;ACAA,YAAuB;ADQvB,uBAsCO;AAWA,MAAM,KAAK,IAAI,eAAiC,WAAW,OAAO,CAAC,QAAQ,OAAO,GAAG,MAAM,IAAI,MAAM,EAAE,IAAI,EAAE;AAGpH,MAAM,iBAAiB,CAAC,KAA8B,KAAa,UACjE,IAAI,GAAG,MAAM,aAAY,uBAAK,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,KAAK,CAAC,GAAG,GAAG,MAAM;AAErE,MAAM,gBAAgB,CAAC,OAAkB,UAAoB,MAAM,QAAQ,KAAK,MAAM,KAAK,CAAC,KAAK,IAAI,CAAC;AAEtG,MAAM,kBAAkB,CAAC,OAAkB,MAAc,OAAe;AACtE,QAAM,OAAO,KAAK,IAAI,MAAM,SAAS,KAAK,IAAI,GAAG,MAAM,OAAO,MAAM,CAAC,EAAE,CAAC,CAAC;AAC3E;AAEA,MAAM,YAAY,CAAK,OAAY,MAAc,OAAoB;AACnE,UAAQ,MAAM,MAAM;AACpB,kBAAgB,OAAO,MAAM,EAAE;AAC/B,SAAO;AACT;AAEA,MAAM,kBAAkB,CAAK,SAAe;AAE5C,MAAM,cAAc,CAAK,OAAY,MAAS,WAAW,oBAAyB;AAChF,QAAM,QAAQ,MAAM,UAAU,CAAC,UAAU,SAAS,KAAK,MAAM,SAAS,IAAI,CAAC;AAE3E,MAAI,UAAU,IAAI;AAChB,UAAM,gBAAY,4BAAU,KAAK;AACjC,cAAU,OAAO,OAAO,CAAC;AACzB,WAAO;AAAA,EACT;AAEA,SAAO,CAAC,GAAG,OAAO,IAAI;AACxB;AAEO,SAAS,UAAU,KAAgD;AACxE,SAAO,IAAI,SACT,IAAI,QAAQ,CAAC,OAAO;AAClB,QAAI,MAAM,QAAQ,EAAE,EAAG,QAAO,EAAE;AAChC,YAAI,6BAAW,EAAE,EAAG,IAAG,GAAG,IAAI;AAAA,EAChC,CAAC;AACL;AAEO,SAAS,UAAU,KAAgD,WAAoB;AAC5F,SAAO,IAAI,OAAmC,CAAC,QAAQ,SAAS;AAC9D,UAAM,SAAoB,aAAa,OAAO,SAAS,WAAW,KAAK,SAAS,IAAK;AACrF,WAAO;AAAA,MACL,GAAG;AAAA,MACH,CAAC,MAAM,GAAG;AAAA,IACZ;AAAA,EACF,GAAG,CAAC,CAAC;AACP;AAEO,SAAS,SAAS,QAAiB,MAAiB;AACzD,UAAI,6BAAW,GAAG,GAAG;AACnB,QAAI,GAAG,IAAI;AAAA,EACb;AACF;AAEO,MAAM,4BAA4B,CAAC,QAAiC;AACzE,QAAM,cAAc,EAAE,GAAG,IAAI;AAC7B,SAAO,KAAK,GAAG,EAAE,QAAQ,CAAC,QAAQ,YAAY,GAAG,MAAM,UAAa,OAAO,YAAY,GAAG,CAAC;AAC3F,SAAO;AACT;AAEA,IAAO,gBAAQ,CAAC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/operators.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/operators.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { isEmpty } from 'lodash';\n\n// Check if the value is empty\nexport const checkNotEmpty = (value: unknown) =>\n // eslint-disable-next-line eqeqeq\n value === '' || value === undefined || value === null || isEmpty(value);\n\n// Check if the value is not empty\nexport const checkEmpty = (value: unknown) => !isEmpty(value);\n\nexport const greaterThan = (value: number, comparator: number) => value > comparator;\n\n// Check if a valid date with format MM/DD/YYYY\nexport const validDate = (value: string) => {\n const dateValidationRegex = /^\\d{1,2}\\/\\d{1,2}\\/\\d{4}$/;\n if (!dateValidationRegex.test(value)) return false;\n const [m, d, y] = value.split('/').map((n) => Number(n));\n return m === Number(new Date(y, m - 1, d).getMonth()) + 1 && d === Number(new Date(y, m - 1, d).getDate());\n};\n\nexport const equal = (a: unknown, b: unknown) => a === b;\n\nexport const notEqual = (a: unknown, b: unknown) => !equal(a, b);\n\nexport const isNull = (a: unknown) => checkNotEmpty(a);\n\nexport const isNotNull = (a: unknown) => !isNull(a);\n\nexport const isIn = <T,>(a: T, b: T[]) => b.indexOf(a) > -1;\n\nexport const isNotIn = <T,>(a: T, b: T[]) => !isIn(a, b);\n\nexport const greaterThanOrEquals = (value: number, comparator: number) => value >= comparator;\nexport const lessThanOrEquals = (value: number, comparator: number) => value <= comparator;\nexport const startsWith = (value: unknown, comparator: string) => String(value).startsWith(comparator);\nexport const contains = (value: unknown, comparator: string) => String(value).includes(comparator);\n"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { isEmpty } from 'lodash-es';\n\n// Check if the value is empty\nexport const checkNotEmpty = (value: unknown) =>\n // eslint-disable-next-line eqeqeq\n value === '' || value === undefined || value === null || isEmpty(value);\n\n// Check if the value is not empty\nexport const checkEmpty = (value: unknown) => !isEmpty(value);\n\nexport const greaterThan = (value: number, comparator: number) => value > comparator;\n\n// Check if a valid date with format MM/DD/YYYY\nexport const validDate = (value: string) => {\n const dateValidationRegex = /^\\d{1,2}\\/\\d{1,2}\\/\\d{4}$/;\n if (!dateValidationRegex.test(value)) return false;\n const [m, d, y] = value.split('/').map((n) => Number(n));\n return m === Number(new Date(y, m - 1, d).getMonth()) + 1 && d === Number(new Date(y, m - 1, d).getDate());\n};\n\nexport const equal = (a: unknown, b: unknown) => a === b;\n\nexport const notEqual = (a: unknown, b: unknown) => !equal(a, b);\n\nexport const isNull = (a: unknown) => checkNotEmpty(a);\n\nexport const isNotNull = (a: unknown) => !isNull(a);\n\nexport const isIn = <T,>(a: T, b: T[]) => b.indexOf(a) > -1;\n\nexport const isNotIn = <T,>(a: T, b: T[]) => !isIn(a, b);\n\nexport const greaterThanOrEquals = (value: number, comparator: number) => value >= comparator;\nexport const lessThanOrEquals = (value: number, comparator: number) => value <= comparator;\nexport const startsWith = (value: unknown, comparator: string) => String(value).startsWith(comparator);\nexport const contains = (value: unknown, comparator: string) => String(value).includes(comparator);\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,eAAe;AAGjB,MAAM,gBAAgB,CAAC;AAAA;AAAA,EAE5B,UAAU,MAAM,UAAU,UAAa,UAAU,QAAQ,QAAQ,KAAK;AAAA;AAGjE,MAAM,aAAa,CAAC,UAAmB,CAAC,QAAQ,KAAK;AAErD,MAAM,cAAc,CAAC,OAAe,eAAuB,QAAQ;AAGnE,MAAM,YAAY,CAAC,UAAkB;AAC1C,QAAM,sBAAsB;AAC5B,MAAI,CAAC,oBAAoB,KAAK,KAAK,EAAG,QAAO;AAC7C,QAAM,CAAC,GAAG,GAAG,CAAC,IAAI,MAAM,MAAM,GAAG,EAAE,IAAI,CAAC,MAAM,OAAO,CAAC,CAAC;AACvD,SAAO,MAAM,OAAO,IAAI,KAAK,GAAG,IAAI,GAAG,CAAC,EAAE,SAAS,CAAC,IAAI,KAAK,MAAM,OAAO,IAAI,KAAK,GAAG,IAAI,GAAG,CAAC,EAAE,QAAQ,CAAC;AAC3G;AAEO,MAAM,QAAQ,CAAC,GAAY,MAAe,MAAM;AAEhD,MAAM,WAAW,CAAC,GAAY,MAAe,CAAC,MAAM,GAAG,CAAC;AAExD,MAAM,SAAS,CAAC,MAAe,cAAc,CAAC;AAE9C,MAAM,YAAY,CAAC,MAAe,CAAC,OAAO,CAAC;AAE3C,MAAM,OAAO,CAAK,GAAM,MAAW,EAAE,QAAQ,CAAC,IAAI;AAElD,MAAM,UAAU,CAAK,GAAM,MAAW,CAAC,KAAK,GAAG,CAAC;AAEhD,MAAM,sBAAsB,CAAC,OAAe,eAAuB,SAAS;AAC5E,MAAM,mBAAmB,CAAC,OAAe,eAAuB,SAAS;AACzE,MAAM,aAAa,CAAC,OAAgB,eAAuB,OAAO,KAAK,EAAE,WAAW,UAAU;AAC9F,MAAM,WAAW,CAAC,OAAgB,eAAuB,OAAO,KAAK,EAAE,SAAS,UAAU;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/utils.js
CHANGED
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
curry,
|
|
38
38
|
isObject,
|
|
39
39
|
isBoolean
|
|
40
|
-
} from "lodash";
|
|
40
|
+
} from "lodash-es";
|
|
41
41
|
const cx = (...classnames) => classnames.reduce((result, cn) => `${result} ${cn || ""}`, "");
|
|
42
42
|
const toggleInObject = (obj, key, value) => obj[key] !== void 0 ? omit(obj, [key]) : { ...obj, [key]: value };
|
|
43
43
|
const toggleInArray = (array, value) => array.indexOf(value) === -1 ? [value] : [];
|
package/dist/esm/utils.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/utils.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable no-param-reassign */\n/* eslint-disable max-lines */\n/**\n * commonly used functions\n * Add a level of indirection to lodash so we can replace\n * it if desired, while keeping function names the same\n */\n// TODO: Import individual packages vs referencing all of lodash\nimport {\n cloneDeep,\n filter,\n debounce,\n findIndex,\n isEmpty,\n isString,\n isEqual,\n noop,\n omit,\n orderBy,\n pull,\n sumBy,\n maxBy,\n meanBy,\n sortBy,\n transform,\n isFunction,\n uniq,\n uniqBy,\n groupBy,\n property,\n get,\n set,\n range,\n parseInt,\n padStart,\n isNaN,\n values,\n throttle,\n pick,\n pickBy,\n differenceBy,\n differenceWith,\n isEqualWith,\n curry,\n isObject,\n isBoolean,\n} from 'lodash';\n\ntype UnknownFunctionT = (...args: unknown[]) => unknown;\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype ValidKeys = string | number | symbol;\n\n/**\n * Concatenates classNames from arguments\n * @param {...any} classnames classnames you want to join\n * @returns {string} All classnames string concatenated\n */\nexport const cx = (...classnames: string[]): string => classnames.reduce((result, cn) => `${result} ${cn || ''}`, '');\n\n// if entry exists, remove it, if not, add it\nconst toggleInObject = (obj: Record<string, unknown>, key: string, value: unknown) =>\n obj[key] !== undefined ? omit(obj, [key]) : { ...obj, [key]: value };\n\nconst toggleInArray = (array: unknown[], value: unknown) => (array.indexOf(value) === -1 ? [value] : []);\n\nconst arrayMoveMutate = (array: unknown[], from: number, to: number) => {\n array.splice(to < 0 ? array.length + to : to, 0, array.splice(from, 1)[0]);\n};\n\nconst arrayMove = <T,>(array: T[], from: number, to: number): T[] => {\n array = array.slice();\n arrayMoveMutate(array, from, to);\n return array;\n};\n\nconst accessorDefault = <T,>(item: T): T => item;\n\nconst addOrRemove = <T,>(array: T[], item: T, accessor = accessorDefault): T[] => {\n const index = array.findIndex((iItem) => accessor(iItem) === accessor(item));\n\n if (index !== -1) {\n const nextArray = cloneDeep(array);\n nextArray.splice(index, 1);\n return nextArray;\n }\n\n return [...array, item];\n};\n\nexport function runAll(...fns: (UnknownFunctionT | UnknownFunctionT[])[]) {\n return (...args: unknown[]) =>\n fns.forEach((fn) => {\n if (Array.isArray(fn)) runAll(fn);\n if (isFunction(fn)) fn(...args);\n });\n}\n\nexport function hashArray(arr: (ValidKeys | Record<string, ValidKeys>)[], fieldName?: string) {\n return arr.reduce<Record<ValidKeys, boolean>>((result, item) => {\n const newKey: ValidKeys = fieldName && typeof item === 'object' ? item[fieldName] : (item as ValidKeys);\n return {\n ...result,\n [newKey]: true,\n };\n }, {});\n}\n\nexport function safeCall(fun: unknown, ...args: unknown[]) {\n if (isFunction(fun)) {\n fun(...args);\n }\n}\n\nexport const removeUndefinedProperties = (obj: Record<string, unknown>) => {\n const cleanObject = { ...obj };\n Object.keys(obj).forEach((key) => cleanObject[key] === undefined && delete cleanObject[key]);\n return cleanObject;\n};\n\nexport default {};\nexport {\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};\n"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable no-param-reassign */\n/* eslint-disable max-lines */\n/**\n * commonly used functions\n * Add a level of indirection to lodash so we can replace\n * it if desired, while keeping function names the same\n */\n// TODO: Import individual packages vs referencing all of lodash\nimport {\n cloneDeep,\n filter,\n debounce,\n findIndex,\n isEmpty,\n isString,\n isEqual,\n noop,\n omit,\n orderBy,\n pull,\n sumBy,\n maxBy,\n meanBy,\n sortBy,\n transform,\n isFunction,\n uniq,\n uniqBy,\n groupBy,\n property,\n get,\n set,\n range,\n parseInt,\n padStart,\n isNaN,\n values,\n throttle,\n pick,\n pickBy,\n differenceBy,\n differenceWith,\n isEqualWith,\n curry,\n isObject,\n isBoolean,\n} from 'lodash-es';\n\ntype UnknownFunctionT = (...args: unknown[]) => unknown;\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype ValidKeys = string | number | symbol;\n\n/**\n * Concatenates classNames from arguments\n * @param {...any} classnames classnames you want to join\n * @returns {string} All classnames string concatenated\n */\nexport const cx = (...classnames: string[]): string => classnames.reduce((result, cn) => `${result} ${cn || ''}`, '');\n\n// if entry exists, remove it, if not, add it\nconst toggleInObject = (obj: Record<string, unknown>, key: string, value: unknown) =>\n obj[key] !== undefined ? omit(obj, [key]) : { ...obj, [key]: value };\n\nconst toggleInArray = (array: unknown[], value: unknown) => (array.indexOf(value) === -1 ? [value] : []);\n\nconst arrayMoveMutate = (array: unknown[], from: number, to: number) => {\n array.splice(to < 0 ? array.length + to : to, 0, array.splice(from, 1)[0]);\n};\n\nconst arrayMove = <T,>(array: T[], from: number, to: number): T[] => {\n array = array.slice();\n arrayMoveMutate(array, from, to);\n return array;\n};\n\nconst accessorDefault = <T,>(item: T): T => item;\n\nconst addOrRemove = <T,>(array: T[], item: T, accessor = accessorDefault): T[] => {\n const index = array.findIndex((iItem) => accessor(iItem) === accessor(item));\n\n if (index !== -1) {\n const nextArray = cloneDeep(array);\n nextArray.splice(index, 1);\n return nextArray;\n }\n\n return [...array, item];\n};\n\nexport function runAll(...fns: (UnknownFunctionT | UnknownFunctionT[])[]) {\n return (...args: unknown[]) =>\n fns.forEach((fn) => {\n if (Array.isArray(fn)) runAll(fn);\n if (isFunction(fn)) fn(...args);\n });\n}\n\nexport function hashArray(arr: (ValidKeys | Record<string, ValidKeys>)[], fieldName?: string) {\n return arr.reduce<Record<ValidKeys, boolean>>((result, item) => {\n const newKey: ValidKeys = fieldName && typeof item === 'object' ? item[fieldName] : (item as ValidKeys);\n return {\n ...result,\n [newKey]: true,\n };\n }, {});\n}\n\nexport function safeCall(fun: unknown, ...args: unknown[]) {\n if (isFunction(fun)) {\n fun(...args);\n }\n}\n\nexport const removeUndefinedProperties = (obj: Record<string, unknown>) => {\n const cleanObject = { ...obj };\n Object.keys(obj).forEach((key) => cleanObject[key] === undefined && delete cleanObject[key]);\n return cleanObject;\n};\n\nexport default {};\nexport {\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};\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACQvB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAWA,MAAM,KAAK,IAAI,eAAiC,WAAW,OAAO,CAAC,QAAQ,OAAO,GAAG,MAAM,IAAI,MAAM,EAAE,IAAI,EAAE;AAGpH,MAAM,iBAAiB,CAAC,KAA8B,KAAa,UACjE,IAAI,GAAG,MAAM,SAAY,KAAK,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,KAAK,CAAC,GAAG,GAAG,MAAM;AAErE,MAAM,gBAAgB,CAAC,OAAkB,UAAoB,MAAM,QAAQ,KAAK,MAAM,KAAK,CAAC,KAAK,IAAI,CAAC;AAEtG,MAAM,kBAAkB,CAAC,OAAkB,MAAc,OAAe;AACtE,QAAM,OAAO,KAAK,IAAI,MAAM,SAAS,KAAK,IAAI,GAAG,MAAM,OAAO,MAAM,CAAC,EAAE,CAAC,CAAC;AAC3E;AAEA,MAAM,YAAY,CAAK,OAAY,MAAc,OAAoB;AACnE,UAAQ,MAAM,MAAM;AACpB,kBAAgB,OAAO,MAAM,EAAE;AAC/B,SAAO;AACT;AAEA,MAAM,kBAAkB,CAAK,SAAe;AAE5C,MAAM,cAAc,CAAK,OAAY,MAAS,WAAW,oBAAyB;AAChF,QAAM,QAAQ,MAAM,UAAU,CAAC,UAAU,SAAS,KAAK,MAAM,SAAS,IAAI,CAAC;AAE3E,MAAI,UAAU,IAAI;AAChB,UAAM,YAAY,UAAU,KAAK;AACjC,cAAU,OAAO,OAAO,CAAC;AACzB,WAAO;AAAA,EACT;AAEA,SAAO,CAAC,GAAG,OAAO,IAAI;AACxB;AAEO,SAAS,UAAU,KAAgD;AACxE,SAAO,IAAI,SACT,IAAI,QAAQ,CAAC,OAAO;AAClB,QAAI,MAAM,QAAQ,EAAE,EAAG,QAAO,EAAE;AAChC,QAAI,WAAW,EAAE,EAAG,IAAG,GAAG,IAAI;AAAA,EAChC,CAAC;AACL;AAEO,SAAS,UAAU,KAAgD,WAAoB;AAC5F,SAAO,IAAI,OAAmC,CAAC,QAAQ,SAAS;AAC9D,UAAM,SAAoB,aAAa,OAAO,SAAS,WAAW,KAAK,SAAS,IAAK;AACrF,WAAO;AAAA,MACL,GAAG;AAAA,MACH,CAAC,MAAM,GAAG;AAAA,IACZ;AAAA,EACF,GAAG,CAAC,CAAC;AACP;AAEO,SAAS,SAAS,QAAiB,MAAiB;AACzD,MAAI,WAAW,GAAG,GAAG;AACnB,QAAI,GAAG,IAAI;AAAA,EACb;AACF;AAEO,MAAM,4BAA4B,CAAC,QAAiC;AACzE,QAAM,cAAc,EAAE,GAAG,IAAI;AAC7B,SAAO,KAAK,GAAG,EAAE,QAAQ,CAAC,QAAQ,YAAY,GAAG,MAAM,UAAa,OAAO,YAAY,GAAG,CAAC;AAC3F,SAAO;AACT;AAEA,IAAO,gBAAQ,CAAC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/types/utils.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
/// <reference types="lodash" />
|
|
1
2
|
/**
|
|
2
3
|
* commonly used functions
|
|
3
4
|
* Add a level of indirection to lodash so we can replace
|
|
4
5
|
* it if desired, while keeping function names the same
|
|
5
6
|
*/
|
|
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
|
+
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-es';
|
|
7
8
|
type UnknownFunctionT = (...args: unknown[]) => unknown;
|
|
8
9
|
type ValidKeys = string | number | symbol;
|
|
9
10
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-utilities",
|
|
3
|
-
"version": "3.52.0
|
|
3
|
+
"version": "3.52.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Utilities",
|
|
6
6
|
"files": [
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"typeSafety": false
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@elliemae/pui-theme": "~2.
|
|
43
|
+
"@elliemae/pui-theme": "~2.12.0",
|
|
44
44
|
"hotkeys-js": "~3.10.2",
|
|
45
45
|
"raf": "~3.4.1",
|
|
46
46
|
"react-dom": "^18.3.1",
|
|
@@ -49,21 +49,21 @@
|
|
|
49
49
|
"use-force-update": "~1.0.11",
|
|
50
50
|
"use-measure": "~0.3.0",
|
|
51
51
|
"use-onclickoutside": "~0.4.1",
|
|
52
|
-
"@elliemae/ds-hooks-
|
|
53
|
-
"@elliemae/ds-hooks-
|
|
54
|
-
"@elliemae/ds-hooks-on-
|
|
55
|
-
"@elliemae/ds-hooks-on-
|
|
56
|
-
"@elliemae/ds-props-helpers": "3.52.0
|
|
52
|
+
"@elliemae/ds-hooks-is-mobile": "3.52.0",
|
|
53
|
+
"@elliemae/ds-hooks-focus-trap": "3.52.0",
|
|
54
|
+
"@elliemae/ds-hooks-on-first-focus-in": "3.52.0",
|
|
55
|
+
"@elliemae/ds-hooks-on-blur-out": "3.52.0",
|
|
56
|
+
"@elliemae/ds-props-helpers": "3.52.0"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@elliemae/pui-cli": "9.0.0-next.
|
|
59
|
+
"@elliemae/pui-cli": "9.0.0-next.63",
|
|
60
60
|
"jest": "~29.7.0",
|
|
61
61
|
"jest-cli": "~29.7.0",
|
|
62
62
|
"react-dom": "^18.3.1",
|
|
63
|
-
"@elliemae/ds-monorepo-devops": "3.52.0
|
|
63
|
+
"@elliemae/ds-monorepo-devops": "3.52.0"
|
|
64
64
|
},
|
|
65
65
|
"peerDependencies": {
|
|
66
|
-
"lodash": "^4.17.21",
|
|
66
|
+
"lodash-es": "^4.17.21",
|
|
67
67
|
"react": "^18.3.1",
|
|
68
68
|
"react-dom": "^18.3.1"
|
|
69
69
|
},
|