@budibase/shared-core 2.28.6 → 2.28.7
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/filters.d.ts +9 -8
- package/dist/index.js +5727 -133
- package/dist/index.js.map +4 -4
- package/dist/index.js.meta.json +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
package/dist/filters.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Datasource, BBReferenceFieldSubType, FieldType, FormulaType, SearchFilter, SearchFilters, SearchFilterOperator,
|
|
1
|
+
import { Datasource, BBReferenceFieldSubType, FieldType, FormulaType, SearchFilter, SearchFilters, SearchFilterOperator, SortType, FieldConstraints, SortOrder, RowSearchParams } from "@budibase/types";
|
|
2
2
|
/**
|
|
3
3
|
* Returns the valid operator options for a certain data type
|
|
4
4
|
*/
|
|
@@ -22,16 +22,17 @@ export declare const NoEmptyFilterStrings: (SearchFilterOperator | "fuzzyOr" | "
|
|
|
22
22
|
*/
|
|
23
23
|
export declare const removeKeyNumbering: (key: string) => string;
|
|
24
24
|
/**
|
|
25
|
-
* Builds a
|
|
25
|
+
* Builds a JSON query from the filter structure generated in the builder
|
|
26
26
|
* @param filter the builder filter structure
|
|
27
27
|
*/
|
|
28
|
-
export declare const
|
|
28
|
+
export declare const buildQuery: (filter: SearchFilter[]) => SearchFilters;
|
|
29
|
+
export declare const search: (docs: Record<string, any>[], query: RowSearchParams) => Record<string, any>[];
|
|
29
30
|
/**
|
|
30
|
-
* Performs a client-side
|
|
31
|
+
* Performs a client-side search on an array of data
|
|
31
32
|
* @param docs the data
|
|
32
|
-
* @param query the JSON
|
|
33
|
+
* @param query the JSON query
|
|
33
34
|
*/
|
|
34
|
-
export declare const
|
|
35
|
+
export declare const runQuery: (docs: Record<string, any>[], query: SearchFilters) => Record<string, any>[];
|
|
35
36
|
/**
|
|
36
37
|
* Performs a client-side sort from the equivalent server-side lucene sort
|
|
37
38
|
* parameters.
|
|
@@ -40,12 +41,12 @@ export declare const runLuceneQuery: (docs: any[], query?: SearchFilters) => any
|
|
|
40
41
|
* @param sortOrder the sort order ("ascending" or "descending")
|
|
41
42
|
* @param sortType the type of sort ("string" or "number")
|
|
42
43
|
*/
|
|
43
|
-
export declare const
|
|
44
|
+
export declare const sort: (docs: any[], sort: string, sortOrder: SortOrder, sortType?: SortType) => any[];
|
|
44
45
|
/**
|
|
45
46
|
* Limits the specified docs to the specified number of rows from the equivalent
|
|
46
47
|
* server-side lucene limit parameters.
|
|
47
48
|
* @param docs the data
|
|
48
49
|
* @param limit the number of docs to limit to
|
|
49
50
|
*/
|
|
50
|
-
export declare const
|
|
51
|
+
export declare const limit: (docs: any[], limit: string) => any[];
|
|
51
52
|
export declare const hasFilters: (query?: SearchFilters) => boolean;
|