@followupus/common 0.9.11 → 0.9.12

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.
@@ -249,7 +249,7 @@ export const getValidConditions = (filter, headers, currentUserId, escapeHeaderC
249
249
  }
250
250
  }
251
251
  if (checkHeader?.type === COLUMN_TYPES.DATE) {
252
- _.remove(c.value, v => v === Object.values(SpecialKeyInDateFilter).includes(v));
252
+ _.remove(c.value, v => Object.values(SpecialKeyInDateFilter).includes(v));
253
253
  }
254
254
  });
255
255
  // 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
@@ -328,8 +328,9 @@ const isInConditionValues = (itemVal, valueType, condition) => {
328
328
  return false;
329
329
  };
330
330
  const isDateInConditionValues = (itemVal, condition) => {
331
- if (condition.blank && (!itemVal || !dayjs(itemVal).isValid()))
332
- return true;
331
+ if (!itemVal || !dayjs(itemVal).isValid()) {
332
+ return !!condition.blank;
333
+ }
333
334
  const itemDate = dayjs(itemVal);
334
335
  return !!condition.value?.some(c => {
335
336
  if (c && typeof c === "object") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@followupus/common",
3
- "version": "0.9.11",
3
+ "version": "0.9.12",
4
4
  "description": "followup common utils npm package with TypeScript and VSCode",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",