@forestadmin/datasource-customizer 1.43.0 → 1.43.2
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Caller, Collection } from '@forestadmin/datasource-toolkit';
|
|
2
2
|
import CollectionCustomizationContext from '../../context/collection-context';
|
|
3
|
-
import { TCollectionName,
|
|
3
|
+
import { TCollectionName, TConditionTree, TFieldName, TSchema } from '../../templates';
|
|
4
4
|
export type SearchOptions<S extends TSchema = TSchema, N extends TCollectionName<S> = TCollectionName<S>> = {
|
|
5
5
|
/**
|
|
6
6
|
* Include fields from the first level of relations
|
|
@@ -9,15 +9,15 @@ export type SearchOptions<S extends TSchema = TSchema, N extends TCollectionName
|
|
|
9
9
|
/**
|
|
10
10
|
* Remove these fields from the default search fields
|
|
11
11
|
*/
|
|
12
|
-
excludeFields?: Array<
|
|
12
|
+
excludeFields?: Array<TFieldName<S, N>>;
|
|
13
13
|
/**
|
|
14
14
|
* Add these fields to the default search fields
|
|
15
15
|
*/
|
|
16
|
-
includeFields?: Array<
|
|
16
|
+
includeFields?: Array<TFieldName<S, N>>;
|
|
17
17
|
/**
|
|
18
18
|
* Replace the list of default searched field by these fields
|
|
19
19
|
*/
|
|
20
|
-
onlyFields?: Array<
|
|
20
|
+
onlyFields?: Array<TFieldName<S, N>>;
|
|
21
21
|
};
|
|
22
22
|
export default class CollectionSearchContext<S extends TSchema = TSchema, N extends TCollectionName<S> = TCollectionName<S>> extends CollectionCustomizationContext<S, N> {
|
|
23
23
|
readonly generateSearchFilter: (searchText: string, options?: SearchOptions<S, N>) => TConditionTree<S, N>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forestadmin/datasource-customizer",
|
|
3
|
-
"version": "1.43.
|
|
3
|
+
"version": "1.43.2",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"license": "GPL-3.0",
|
|
6
6
|
"publishConfig": {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"@types/uuid": "^9.0.0"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@forestadmin/datasource-toolkit": "1.32.
|
|
32
|
+
"@forestadmin/datasource-toolkit": "1.32.1",
|
|
33
33
|
"antlr4": "^4.13.1-patch-1",
|
|
34
34
|
"file-type": "^16.5.4",
|
|
35
35
|
"luxon": "^3.2.1",
|