@followupus/common 0.10.27 → 0.10.29

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.
@@ -18,5 +18,7 @@ export declare const MESSAGE_CATEGORY: {
18
18
  AUTOMATIONS_ISSUE_OR_FIXED: string;
19
19
  MY_INTEGRATIONS_DISABLED_OR_DELETE: string;
20
20
  MY_ROLE_CHANGED_IN_OBJECT: string;
21
+ TRANSFER_USER_DATA: string;
22
+ TRANSFER_USER_DATA_USER: string;
21
23
  };
22
24
  export type MessageCategoryType = (typeof MESSAGE_CATEGORY)[keyof typeof MESSAGE_CATEGORY];
@@ -18,4 +18,6 @@ export const MESSAGE_CATEGORY = {
18
18
  AUTOMATIONS_ISSUE_OR_FIXED: 'AUTOMATIONS_ISSUE_OR_FIXED',
19
19
  MY_INTEGRATIONS_DISABLED_OR_DELETE: 'MY_INTEGRATIONS_DISABLED_OR_DELETE',
20
20
  MY_ROLE_CHANGED_IN_OBJECT: "MY_ROLE_CHANGED_IN_OBJECT",
21
+ TRANSFER_USER_DATA: "TRANSFER_USER_DATA ",
22
+ TRANSFER_USER_DATA_USER: "TRANSFER_USER_DATA_USER",
21
23
  };
@@ -413,7 +413,7 @@ export const getValidConditions = (filter, headers, currentUserId, escapeHeaderC
413
413
  }
414
414
  if (checkHeader?.type === COLUMN_TYPES.DATE ||
415
415
  checkHeader?.type === COLUMN_TYPES.CREATED_AT) {
416
- _.remove(c.value, v => Object.values(SpecialKeyInDateFilter).includes(v));
416
+ _.remove(c.value ?? [], v => Object.values(SpecialKeyInDateFilter).includes(v));
417
417
  }
418
418
  });
419
419
  // for dropdown, if set the option is in filter condition, and user delete the option. should ignore it or make the option can't be deleted
@@ -479,16 +479,16 @@ const isInConditionValues = (itemVal, valueType, condition) => {
479
479
  case "number":
480
480
  case "string":
481
481
  return ((condition.blank && !itemVal) ||
482
- !!condition.value.find(val => val === itemVal));
482
+ !!condition.value?.find(val => val === itemVal));
483
483
  case "stringArray":
484
484
  return ((condition.blank && !itemVal?.length) ||
485
- condition.value.some(val => Array.isArray(itemVal) && itemVal?.includes(val)));
485
+ !!condition.value?.some(val => Array.isArray(itemVal) && itemVal?.includes(val)));
486
486
  case "object":
487
487
  return ((condition.blank && !itemVal) ||
488
- !!condition.value.find(val => _.isEqual(val, itemVal)));
488
+ !!condition.value?.find(val => _.isEqual(val, itemVal)));
489
489
  case "objectArray":
490
490
  return ((condition.blank && !itemVal?.length) ||
491
- condition.value.some(val => Array.isArray(itemVal) &&
491
+ !!condition.value?.some(val => Array.isArray(itemVal) &&
492
492
  itemVal.find(existVal => _.isEqual(val, existVal))));
493
493
  default:
494
494
  break;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@followupus/common",
3
- "version": "0.10.27",
3
+ "version": "0.10.29",
4
4
  "description": "followup common utils npm package with TypeScript and VSCode",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",