@beabee/beabee-common 1.2.2 → 1.3.0
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/cjs/search/index.js
CHANGED
|
@@ -14,7 +14,25 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.convertFiltersToRules = exports.convertRulesToFilters = exports.
|
|
17
|
+
exports.convertFiltersToRules = exports.convertRulesToFilters = exports.operationParams = exports.nullableOperators = exports.operators = void 0;
|
|
18
|
+
exports.operators = [
|
|
19
|
+
"equal",
|
|
20
|
+
"not_equal",
|
|
21
|
+
"less",
|
|
22
|
+
"less_or_equal",
|
|
23
|
+
"greater",
|
|
24
|
+
"greater_or_equal",
|
|
25
|
+
"between",
|
|
26
|
+
"not_between",
|
|
27
|
+
"begins_with",
|
|
28
|
+
"not_begins_with",
|
|
29
|
+
"contains",
|
|
30
|
+
"not_contains",
|
|
31
|
+
"ends_with",
|
|
32
|
+
"not_ends_with",
|
|
33
|
+
"is_empty",
|
|
34
|
+
"is_not_empty",
|
|
35
|
+
];
|
|
18
36
|
const equal = { args: 1 };
|
|
19
37
|
const equalityOperators = { equal, not_equal: { args: 1 } };
|
|
20
38
|
const numericOperators = {
|
|
@@ -34,7 +52,7 @@ exports.nullableOperators = {
|
|
|
34
52
|
is_empty: { args: 0 },
|
|
35
53
|
is_not_empty: { args: 0 },
|
|
36
54
|
};
|
|
37
|
-
exports.
|
|
55
|
+
exports.operationParams = {
|
|
38
56
|
text: {
|
|
39
57
|
...equalityOperators,
|
|
40
58
|
...arrayOperators,
|
package/dist/esm/search/index.js
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
export const operators = [
|
|
2
|
+
"equal",
|
|
3
|
+
"not_equal",
|
|
4
|
+
"less",
|
|
5
|
+
"less_or_equal",
|
|
6
|
+
"greater",
|
|
7
|
+
"greater_or_equal",
|
|
8
|
+
"between",
|
|
9
|
+
"not_between",
|
|
10
|
+
"begins_with",
|
|
11
|
+
"not_begins_with",
|
|
12
|
+
"contains",
|
|
13
|
+
"not_contains",
|
|
14
|
+
"ends_with",
|
|
15
|
+
"not_ends_with",
|
|
16
|
+
"is_empty",
|
|
17
|
+
"is_not_empty",
|
|
18
|
+
];
|
|
1
19
|
const equal = { args: 1 };
|
|
2
20
|
const equalityOperators = { equal, not_equal: { args: 1 } };
|
|
3
21
|
const numericOperators = {
|
|
@@ -17,7 +35,7 @@ export const nullableOperators = {
|
|
|
17
35
|
is_empty: { args: 0 },
|
|
18
36
|
is_not_empty: { args: 0 },
|
|
19
37
|
};
|
|
20
|
-
export const
|
|
38
|
+
export const operationParams = {
|
|
21
39
|
text: {
|
|
22
40
|
...equalityOperators,
|
|
23
41
|
...arrayOperators,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export declare
|
|
1
|
+
export declare const operators: readonly ["equal", "not_equal", "less", "less_or_equal", "greater", "greater_or_equal", "between", "not_between", "begins_with", "not_begins_with", "contains", "not_contains", "ends_with", "not_ends_with", "is_empty", "is_not_empty"];
|
|
2
|
+
export declare type GetPaginatedQueryRuleOperator = typeof operators[number];
|
|
2
3
|
export declare type GetPaginatedQueryRuleValue = string | number | boolean;
|
|
3
4
|
export interface GetPaginatedQueryRule<T> {
|
|
4
5
|
field: T;
|
|
@@ -30,7 +31,7 @@ export declare const nullableOperators: {
|
|
|
30
31
|
args: number;
|
|
31
32
|
};
|
|
32
33
|
};
|
|
33
|
-
export declare const
|
|
34
|
+
export declare const operationParams: Record<FilterType, Partial<Record<FilterOperator, FilterOperatorParams>>>;
|
|
34
35
|
interface BaseFilterArgs {
|
|
35
36
|
type: FilterType;
|
|
36
37
|
nullable?: boolean;
|