@followupus/common 0.8.0 → 0.8.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/dist/shared/delta.d.ts
CHANGED
package/dist/shared/shared.d.ts
CHANGED
package/dist/shared/shared.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { cloneDeep, isEqual } from "lodash";
|
|
2
1
|
import dayjs from "dayjs";
|
|
2
|
+
import _ from 'lodash';
|
|
3
3
|
export const COLUMN_TYPES = {
|
|
4
4
|
NUMBER: "number",
|
|
5
5
|
TEXT: "string",
|
|
@@ -163,7 +163,7 @@ export const getDateGroupKey = (dateStr) => {
|
|
|
163
163
|
return DATE_GROUPS.FUTURE;
|
|
164
164
|
};
|
|
165
165
|
export const getValidConditions = (filter, headers, currentUserId) => {
|
|
166
|
-
const newFilter = cloneDeep(filter);
|
|
166
|
+
const newFilter = _.cloneDeep(filter);
|
|
167
167
|
if (!newFilter.criteria?.length || !headers?.length) {
|
|
168
168
|
return [];
|
|
169
169
|
}
|
|
@@ -226,11 +226,11 @@ const isInConditionValues = (itemVal, valueType, condition) => {
|
|
|
226
226
|
condition.value.some(val => Array.isArray(itemVal) && itemVal?.includes(val)));
|
|
227
227
|
case "object":
|
|
228
228
|
return ((condition.blank && !itemVal) ||
|
|
229
|
-
!!condition.value.find(val => isEqual(val, itemVal)));
|
|
229
|
+
!!condition.value.find(val => _.isEqual(val, itemVal)));
|
|
230
230
|
case "objectArray":
|
|
231
231
|
return ((condition.blank && !itemVal?.length) ||
|
|
232
232
|
condition.value.some(val => Array.isArray(itemVal) &&
|
|
233
|
-
itemVal.find(existVal => isEqual(val, existVal))));
|
|
233
|
+
itemVal.find(existVal => _.isEqual(val, existVal))));
|
|
234
234
|
default:
|
|
235
235
|
break;
|
|
236
236
|
}
|
|
@@ -290,7 +290,7 @@ const isEquals = (itemVal, valueType, condition) => {
|
|
|
290
290
|
case "string":
|
|
291
291
|
return !!itemVal && checkVal === itemVal;
|
|
292
292
|
case "object":
|
|
293
|
-
return isEqual(itemVal, checkVal);
|
|
293
|
+
return _.isEqual(itemVal, checkVal);
|
|
294
294
|
default:
|
|
295
295
|
break;
|
|
296
296
|
}
|