@beabee/beabee-common 1.12.3 → 1.13.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.
@@ -57,7 +57,7 @@ exports.calloutResponseFilters = {
57
57
  nullable: true,
58
58
  },
59
59
  answers: {
60
- type: "text",
60
+ type: "blob",
61
61
  },
62
62
  };
63
63
  exports.calloutResponseCommentFilters = {
@@ -64,18 +64,13 @@ exports.nullableOperators = {
64
64
  };
65
65
  exports.operatorsByType = {
66
66
  text: { ...equalityOperators, ...arrayOperators, ...stringOperators },
67
+ blob: arrayOperators,
67
68
  date: numericOperators,
68
69
  number: numericOperators,
69
70
  boolean: { equal: equalityOperators.equal },
70
71
  array: arrayOperators,
71
72
  enum: equalityOperators,
72
73
  contact: equalityOperators,
73
- // custom: {
74
- // ...equalityOperators,
75
- // ...arrayOperators,
76
- // ...stringOperators,
77
- // ...numericOperators,
78
- // },
79
74
  };
80
75
  // More general type to allow mapping while maintaining full type above
81
76
  exports.operatorsByTypeMap = exports.operatorsByType;
@@ -34,6 +34,8 @@ function convertComponentToFilter(component) {
34
34
  type: component.type === "radio" ? "enum" : "array",
35
35
  options: convertValuesToOptions(component.values),
36
36
  };
37
+ case "textarea":
38
+ return { ...baseItem, type: "blob" };
37
39
  default:
38
40
  return { ...baseItem, type: "text" };
39
41
  }
@@ -54,7 +54,7 @@ export const calloutResponseFilters = {
54
54
  nullable: true,
55
55
  },
56
56
  answers: {
57
- type: "text",
57
+ type: "blob",
58
58
  },
59
59
  };
60
60
  export const calloutResponseCommentFilters = {
@@ -47,18 +47,13 @@ export const nullableOperators = {
47
47
  };
48
48
  export const operatorsByType = {
49
49
  text: { ...equalityOperators, ...arrayOperators, ...stringOperators },
50
+ blob: arrayOperators,
50
51
  date: numericOperators,
51
52
  number: numericOperators,
52
53
  boolean: { equal: equalityOperators.equal },
53
54
  array: arrayOperators,
54
55
  enum: equalityOperators,
55
56
  contact: equalityOperators,
56
- // custom: {
57
- // ...equalityOperators,
58
- // ...arrayOperators,
59
- // ...stringOperators,
60
- // ...numericOperators,
61
- // },
62
57
  };
63
58
  // More general type to allow mapping while maintaining full type above
64
59
  export const operatorsByTypeMap = operatorsByType;
@@ -30,6 +30,8 @@ function convertComponentToFilter(component) {
30
30
  type: component.type === "radio" ? "enum" : "array",
31
31
  options: convertValuesToOptions(component.values),
32
32
  };
33
+ case "textarea":
34
+ return { ...baseItem, type: "blob" };
33
35
  default:
34
36
  return { ...baseItem, type: "text" };
35
37
  }
@@ -50,7 +50,7 @@ export declare const calloutResponseFilters: {
50
50
  readonly nullable: true;
51
51
  };
52
52
  readonly answers: {
53
- readonly type: "text";
53
+ readonly type: "blob";
54
54
  };
55
55
  };
56
56
  export type CalloutResponseFilterName = keyof typeof calloutResponseFilters;
@@ -26,7 +26,7 @@ export interface ValidatedRuleGroup<Field extends string> {
26
26
  condition: "AND" | "OR";
27
27
  rules: (ValidatedRuleGroup<Field> | ValidatedRule<Field>)[];
28
28
  }
29
- export type FilterType = "text" | "date" | "number" | "boolean" | "array" | "enum" | "contact";
29
+ export type FilterType = "text" | "blob" | "date" | "number" | "boolean" | "array" | "enum" | "contact";
30
30
  interface BaseFilterArgs {
31
31
  type: FilterType;
32
32
  nullable?: boolean;
@@ -83,6 +83,14 @@ export declare const operatorsByType: {
83
83
  args: number;
84
84
  };
85
85
  };
86
+ readonly blob: {
87
+ contains: {
88
+ args: number;
89
+ };
90
+ not_contains: {
91
+ args: number;
92
+ };
93
+ };
86
94
  readonly date: {
87
95
  between: {
88
96
  args: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@beabee/beabee-common",
3
- "version": "1.12.3",
3
+ "version": "1.13.1",
4
4
  "description": "",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.js",