mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-20 16:42:56 +00:00
feat: add filter chips for news
This commit is contained in:
@@ -19,8 +19,10 @@ import {
|
||||
SCMultiSearchResponse,
|
||||
SCSearchRequest,
|
||||
SCSearchResponse,
|
||||
SCSearchValueFilter,
|
||||
SCThingOriginType,
|
||||
SCThings,
|
||||
SCThingsField,
|
||||
SCThingType,
|
||||
} from '@openstapps/core';
|
||||
import {SCSaveableThing} from '@openstapps/core';
|
||||
@@ -88,6 +90,25 @@ export class DataProvider {
|
||||
*/
|
||||
storageProvider: StorageProvider;
|
||||
|
||||
/**
|
||||
* Simplify creation of a value filter
|
||||
*
|
||||
* @param field Database field for apply the filter to
|
||||
* @param value Value to match with
|
||||
*/
|
||||
static createValueFilter(
|
||||
field: SCThingsField,
|
||||
value: string,
|
||||
): SCSearchValueFilter {
|
||||
return {
|
||||
type: 'value',
|
||||
arguments: {
|
||||
field: field,
|
||||
value: value,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user