mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-13 21:27:46 +02:00
Save last filter (#2003)
Signed-off-by: Denis Bykhov <80476319+BykhovDenis@users.noreply.github.com>
This commit is contained in:
+16
-10
@@ -30,10 +30,8 @@ import type {
|
||||
Type,
|
||||
UXObject
|
||||
} from '@anticrm/core'
|
||||
import type { Asset, IntlString, Plugin, Resource, Status } from '@anticrm/platform'
|
||||
import { plugin } from '@anticrm/platform'
|
||||
import type { AnyComponent, AnySvelteComponent } from '@anticrm/ui'
|
||||
import { PopupAlignment, PopupPosAlignment } from '@anticrm/ui/src/types'
|
||||
import { Asset, IntlString, Plugin, plugin, Resource, Status } from '@anticrm/platform'
|
||||
import type { AnyComponent, AnySvelteComponent, PopupAlignment, PopupPosAlignment } from '@anticrm/ui'
|
||||
import type { Preference } from '@anticrm/preference'
|
||||
|
||||
/**
|
||||
@@ -49,10 +47,9 @@ export interface KeyFilter {
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export interface FilterMode {
|
||||
export interface FilterMode extends Doc {
|
||||
label: IntlString
|
||||
isAvailable: (values: any[]) => boolean
|
||||
result: (values: any[], onUpdate: () => void) => Promise<ObjQueryType<any>>
|
||||
result: Resource<(values: any[], onUpdate: () => void, index: number) => Promise<ObjQueryType<any>>>
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -60,8 +57,8 @@ export interface FilterMode {
|
||||
*/
|
||||
export interface Filter {
|
||||
key: KeyFilter
|
||||
mode: FilterMode
|
||||
modes: FilterMode[]
|
||||
mode: Ref<FilterMode>
|
||||
modes: Ref<FilterMode>[]
|
||||
value: any[]
|
||||
index: number
|
||||
onRemove?: () => void
|
||||
@@ -387,7 +384,8 @@ const view = plugin(viewId, {
|
||||
Viewlet: '' as Ref<Class<Viewlet>>,
|
||||
Action: '' as Ref<Class<Action>>,
|
||||
ActionCategory: '' as Ref<Class<ActionCategory>>,
|
||||
LinkPresenter: '' as Ref<Class<LinkPresenter>>
|
||||
LinkPresenter: '' as Ref<Class<LinkPresenter>>,
|
||||
FilterMode: '' as Ref<Class<FilterMode>>
|
||||
},
|
||||
viewlet: {
|
||||
Table: '' as Ref<ViewletDescriptor>
|
||||
@@ -422,6 +420,14 @@ const view = plugin(viewId, {
|
||||
Editor: '' as Ref<ActionCategory>,
|
||||
MarkdownFormatting: '' as Ref<ActionCategory>
|
||||
},
|
||||
ids: {
|
||||
FilterObjectIn: '' as Ref<FilterMode>,
|
||||
FilterObjectNin: '' as Ref<FilterMode>,
|
||||
FilterValueIn: '' as Ref<FilterMode>,
|
||||
FilterValueNin: '' as Ref<FilterMode>,
|
||||
FilterBefore: '' as Ref<FilterMode>,
|
||||
FilterAfter: '' as Ref<FilterMode>
|
||||
},
|
||||
popup: {
|
||||
PositionElementAlignment: '' as Resource<(e?: Event) => PopupAlignment | undefined>
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user