@beabee/beabee-common 1.7.2 → 1.7.4

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.
@@ -15,6 +15,9 @@ exports.contactFilters = {
15
15
  joined: {
16
16
  type: "date",
17
17
  },
18
+ contributionCancelled: {
19
+ type: "date",
20
+ },
18
21
  contributionType: {
19
22
  type: "enum",
20
23
  options: [
@@ -113,7 +113,7 @@ function validateRule(filters, rule) {
113
113
  return false; // Invalid value type
114
114
  }
115
115
  if (filter.type === "date" &&
116
- rule.value.some((v) => (0, isValid_1.default)((0, parseISO_1.default)(v)))) {
116
+ rule.value.some((v) => !(0, isValid_1.default)((0, parseISO_1.default)(v)))) {
117
117
  return false; // Invalid date
118
118
  }
119
119
  return {
@@ -12,6 +12,9 @@ export const contactFilters = {
12
12
  joined: {
13
13
  type: "date",
14
14
  },
15
+ contributionCancelled: {
16
+ type: "date",
17
+ },
15
18
  contributionType: {
16
19
  type: "enum",
17
20
  options: [
@@ -92,7 +92,7 @@ export function validateRule(filters, rule) {
92
92
  return false; // Invalid value type
93
93
  }
94
94
  if (filter.type === "date" &&
95
- rule.value.some((v) => isValid(parseISO(v)))) {
95
+ rule.value.some((v) => !isValid(parseISO(v)))) {
96
96
  return false; // Invalid date
97
97
  }
98
98
  return {
@@ -12,6 +12,9 @@ export declare const contactFilters: {
12
12
  readonly joined: {
13
13
  readonly type: "date";
14
14
  };
15
+ readonly contributionCancelled: {
16
+ readonly type: "date";
17
+ };
15
18
  readonly contributionType: {
16
19
  readonly type: "enum";
17
20
  readonly options: readonly [ContributionType.Automatic, ContributionType.Gift, ContributionType.Manual, ContributionType.None];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@beabee/beabee-common",
3
- "version": "1.7.2",
3
+ "version": "1.7.4",
4
4
  "description": "",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.js",