2021-08-06 13:18:50 +03:00
|
|
|
//
|
|
|
|
// Copyright © 2020, 2021 Anticrm Platform Contributors.
|
|
|
|
// Copyright © 2021 Hardcore Engineering Inc.
|
|
|
|
//
|
|
|
|
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
|
|
|
// you may not use this file except in compliance with the License. You may
|
|
|
|
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
|
|
|
//
|
|
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
//
|
|
|
|
// See the License for the specific language governing permissions and
|
|
|
|
// limitations under the License.
|
|
|
|
//
|
|
|
|
|
2022-04-19 12:38:31 +03:00
|
|
|
import type {
|
|
|
|
AnyAttribute,
|
|
|
|
Class,
|
|
|
|
Client,
|
|
|
|
Doc,
|
|
|
|
DocumentQuery,
|
|
|
|
FindOptions,
|
2022-05-13 09:38:54 +03:00
|
|
|
Lookup,
|
2022-04-19 12:38:31 +03:00
|
|
|
Mixin,
|
|
|
|
Obj,
|
2022-05-19 09:38:12 +03:00
|
|
|
ObjQueryType,
|
2022-04-19 12:38:31 +03:00
|
|
|
Ref,
|
|
|
|
Space,
|
2022-05-19 09:38:12 +03:00
|
|
|
Type,
|
2022-04-19 12:38:31 +03:00
|
|
|
UXObject
|
|
|
|
} from '@anticrm/core'
|
2022-06-03 19:12:18 +03:00
|
|
|
import { Asset, IntlString, Plugin, plugin, Resource, Status } from '@anticrm/platform'
|
2022-05-13 09:38:54 +03:00
|
|
|
import type { Preference } from '@anticrm/preference'
|
2022-06-03 19:44:11 +03:00
|
|
|
import type { AnyComponent, AnySvelteComponent, PopupAlignment, PopupPosAlignment } from '@anticrm/ui'
|
2021-08-06 13:18:50 +03:00
|
|
|
|
2022-05-19 09:38:12 +03:00
|
|
|
/**
|
|
|
|
* @public
|
|
|
|
*/
|
|
|
|
export interface KeyFilter {
|
2022-06-21 07:05:09 +03:00
|
|
|
_class: Ref<Class<Doc>>
|
2022-05-19 09:38:12 +03:00
|
|
|
key: string
|
|
|
|
component: AnyComponent
|
|
|
|
label: IntlString
|
|
|
|
icon: Asset | undefined
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @public
|
|
|
|
*/
|
2022-06-03 19:12:18 +03:00
|
|
|
export interface FilterMode extends Doc {
|
2022-05-19 09:38:12 +03:00
|
|
|
label: IntlString
|
2022-06-21 07:05:09 +03:00
|
|
|
result: Resource<(filter: Filter, onUpdate: () => void) => Promise<ObjQueryType<any>>>
|
2022-05-19 09:38:12 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @public
|
|
|
|
*/
|
|
|
|
export interface Filter {
|
|
|
|
key: KeyFilter
|
2022-06-21 07:05:09 +03:00
|
|
|
nested?: Filter
|
2022-06-03 19:12:18 +03:00
|
|
|
mode: Ref<FilterMode>
|
|
|
|
modes: Ref<FilterMode>[]
|
2022-05-19 09:38:12 +03:00
|
|
|
value: any[]
|
2022-05-21 20:17:10 +03:00
|
|
|
index: number
|
|
|
|
onRemove?: () => void
|
2022-05-19 09:38:12 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @public
|
|
|
|
*/
|
|
|
|
export interface ClassFilters extends Class<Doc> {
|
|
|
|
filters: (KeyFilter | string)[]
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @public
|
|
|
|
*/
|
|
|
|
export interface AttributeFilter extends Class<Type<any>> {
|
|
|
|
component: AnyComponent
|
|
|
|
}
|
|
|
|
|
2021-08-07 08:39:49 +03:00
|
|
|
/**
|
|
|
|
* @public
|
|
|
|
*/
|
2021-08-06 13:18:50 +03:00
|
|
|
export interface AttributeEditor extends Class<Doc> {
|
2022-06-15 20:25:58 +03:00
|
|
|
inlineEditor: AnyComponent
|
2022-05-28 10:33:11 +03:00
|
|
|
// If defined could be used for ShowEditor declarative actions.
|
|
|
|
popup?: AnyComponent
|
2021-08-06 13:18:50 +03:00
|
|
|
}
|
|
|
|
|
2022-05-06 20:48:43 +03:00
|
|
|
/**
|
|
|
|
* @public
|
|
|
|
*/
|
|
|
|
export interface CollectionEditor extends Class<Doc> {
|
|
|
|
editor: AnyComponent
|
2022-06-15 20:25:58 +03:00
|
|
|
inlineEditor?: AnyComponent
|
2022-05-06 20:48:43 +03:00
|
|
|
}
|
|
|
|
|
2022-06-08 16:55:01 +03:00
|
|
|
/**
|
|
|
|
* @public
|
|
|
|
*/
|
|
|
|
export interface ArrayEditor extends Class<Doc> {
|
2022-06-20 18:59:56 +03:00
|
|
|
editor?: AnyComponent
|
|
|
|
inlineEditor?: AnyComponent
|
2022-06-08 16:55:01 +03:00
|
|
|
}
|
|
|
|
|
2022-05-19 10:14:05 +03:00
|
|
|
/**
|
|
|
|
* @public
|
|
|
|
*/
|
|
|
|
export interface CollectionPresenter extends Class<Doc> {
|
|
|
|
presenter: AnyComponent
|
|
|
|
}
|
|
|
|
|
2021-08-07 08:39:49 +03:00
|
|
|
/**
|
|
|
|
* @public
|
|
|
|
*/
|
2021-08-06 13:18:50 +03:00
|
|
|
export interface AttributePresenter extends Class<Doc> {
|
|
|
|
presenter: AnyComponent
|
|
|
|
}
|
|
|
|
|
2021-09-08 19:42:40 +03:00
|
|
|
/**
|
|
|
|
* @public
|
|
|
|
*/
|
|
|
|
export interface ObjectEditor extends Class<Doc> {
|
|
|
|
editor: AnyComponent
|
|
|
|
}
|
|
|
|
|
2022-04-12 08:59:38 +03:00
|
|
|
/**
|
|
|
|
* @public
|
|
|
|
*/
|
|
|
|
export interface SpaceHeader extends Class<Doc> {
|
|
|
|
header: AnyComponent
|
|
|
|
}
|
|
|
|
|
2022-04-22 06:13:15 +03:00
|
|
|
/**
|
|
|
|
* @public
|
|
|
|
*/
|
|
|
|
export interface SpaceName extends Class<Doc> {
|
|
|
|
getName: Resource<(client: Client, space: Space) => Promise<string>>
|
|
|
|
}
|
|
|
|
|
2022-01-18 13:21:32 +03:00
|
|
|
/**
|
|
|
|
* @public
|
|
|
|
*/
|
|
|
|
export interface ObjectEditorHeader extends Class<Doc> {
|
|
|
|
editor: AnyComponent
|
|
|
|
}
|
|
|
|
|
2021-12-20 12:37:15 +03:00
|
|
|
/**
|
|
|
|
* @public
|
|
|
|
*/
|
|
|
|
export interface ObjectValidator extends Class<Doc> {
|
|
|
|
validator: Resource<<T extends Doc>(doc: T, client: Client) => Promise<Status>>
|
|
|
|
}
|
|
|
|
|
2021-08-07 08:39:49 +03:00
|
|
|
/**
|
|
|
|
* @public
|
|
|
|
*/
|
2021-08-06 13:18:50 +03:00
|
|
|
export interface ViewletDescriptor extends Doc, UXObject {
|
|
|
|
component: AnyComponent
|
|
|
|
}
|
|
|
|
|
2021-08-07 08:39:49 +03:00
|
|
|
/**
|
|
|
|
* @public
|
|
|
|
*/
|
2021-08-06 13:18:50 +03:00
|
|
|
export interface Viewlet extends Doc {
|
|
|
|
attachTo: Ref<Class<Space>>
|
|
|
|
descriptor: Ref<ViewletDescriptor>
|
|
|
|
options?: FindOptions<Doc>
|
2022-05-13 09:38:54 +03:00
|
|
|
config: (BuildModelKey | string)[]
|
2022-05-13 20:31:57 +03:00
|
|
|
hiddenKeys?: string[]
|
2021-08-06 13:18:50 +03:00
|
|
|
}
|
|
|
|
|
2022-04-28 13:05:28 +03:00
|
|
|
/**
|
|
|
|
* @public
|
|
|
|
*/
|
|
|
|
export interface LinkPresenter extends Doc {
|
|
|
|
pattern: string
|
|
|
|
component: AnyComponent
|
|
|
|
}
|
|
|
|
|
2022-04-19 12:38:31 +03:00
|
|
|
/**
|
|
|
|
* @public
|
|
|
|
*
|
|
|
|
* "Alt + K" =\> Alt and K should be pressed together
|
|
|
|
* "J T" - J and then T shold be pressed.
|
|
|
|
*/
|
|
|
|
export type KeyBinding = string
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @public
|
|
|
|
*/
|
2022-05-04 11:08:12 +03:00
|
|
|
export type ViewActionInput = 'focus' | 'selection' | 'any' | 'none'
|
|
|
|
|
2021-09-25 19:48:22 +03:00
|
|
|
/**
|
|
|
|
* @public
|
|
|
|
*/
|
2022-05-04 11:08:12 +03:00
|
|
|
export type ViewAction<T = Record<string, any>> = Resource<
|
|
|
|
(doc: Doc | Doc[] | undefined, evt: Event, params?: T) => Promise<void>
|
|
|
|
>
|
2022-04-19 12:38:31 +03:00
|
|
|
|
2022-05-04 11:08:12 +03:00
|
|
|
/**
|
|
|
|
* @public
|
|
|
|
*/
|
|
|
|
export interface ActionCategory extends Doc, UXObject {
|
|
|
|
// Does category is visible for use in popup.
|
|
|
|
visible: boolean
|
2021-09-25 19:48:22 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @public
|
|
|
|
*/
|
2022-05-04 11:08:12 +03:00
|
|
|
export interface Action<T extends Doc = Doc, P = Record<string, any>> extends Doc, UXObject {
|
|
|
|
// Action implementation details
|
|
|
|
action: ViewAction<P>
|
|
|
|
// Action implementation parameters
|
|
|
|
actionProps?: P
|
|
|
|
|
|
|
|
// If specified, action could be used only with one item selected.
|
|
|
|
// single - one object is required
|
|
|
|
// any - one or multiple objects are required
|
|
|
|
// any - any input is suitable.
|
|
|
|
input: ViewActionInput
|
2022-05-25 09:08:26 +03:00
|
|
|
inline?: boolean
|
2022-05-04 11:08:12 +03:00
|
|
|
|
|
|
|
// Focus and/or all selection document should match target class.
|
|
|
|
target: Ref<Class<Doc>>
|
|
|
|
// Action is applicable only for objects matching criteria
|
2021-12-20 13:18:29 +03:00
|
|
|
query?: DocumentQuery<T>
|
2022-04-22 09:30:34 +03:00
|
|
|
|
2022-05-04 11:08:12 +03:00
|
|
|
// If defined, types should be matched to proposed list
|
|
|
|
inputProps?: Record<string, Ref<Class<Doc>>>
|
|
|
|
|
|
|
|
// Kayboard bindings
|
|
|
|
keyBinding?: KeyBinding[]
|
|
|
|
|
|
|
|
// short description for action.
|
|
|
|
description?: IntlString
|
|
|
|
|
|
|
|
// Action category, for UI.
|
|
|
|
category: Ref<ActionCategory>
|
|
|
|
|
|
|
|
// Context action is defined for
|
|
|
|
context: ViewContext
|
2022-06-03 07:24:38 +03:00
|
|
|
|
|
|
|
// A list of actions replaced by this one.
|
|
|
|
// For example it could be global action and action for focus class, second one fill override first one.
|
|
|
|
override?: Ref<Action>[]
|
2022-04-19 12:38:31 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @public
|
2022-05-04 11:08:12 +03:00
|
|
|
* context - only for context menu actions.
|
2022-04-19 12:38:31 +03:00
|
|
|
* workbench - global actions per application or entire workbench.
|
|
|
|
* browser - actions for list/table/kanban browsing.
|
|
|
|
* editor - actions for selected editor context.
|
2022-05-04 11:08:12 +03:00
|
|
|
* panel - for panel based actions.
|
|
|
|
* popup - for popup based actions, like Close of Popup.
|
|
|
|
* input - for input based actions, some actions should be available for input controls.
|
2022-04-19 12:38:31 +03:00
|
|
|
*/
|
2022-05-04 11:08:12 +03:00
|
|
|
export type ViewContextType = 'context' | 'workbench' | 'browser' | 'editor' | 'panel' | 'popup' | 'input' | 'none'
|
2022-04-19 12:38:31 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @public
|
|
|
|
*/
|
|
|
|
export interface ViewContext {
|
|
|
|
mode: ViewContextType | ViewContextType[]
|
|
|
|
// Active application
|
|
|
|
application?: Ref<Doc>
|
|
|
|
// Optional groupping
|
|
|
|
group?: string
|
2021-09-25 19:48:22 +03:00
|
|
|
}
|
|
|
|
|
2022-02-25 18:32:23 +03:00
|
|
|
/**
|
|
|
|
* @public
|
|
|
|
*/
|
|
|
|
export interface IgnoreActions extends Class<Doc> {
|
|
|
|
actions: Ref<Action>[]
|
|
|
|
}
|
|
|
|
|
2022-02-22 12:09:13 +03:00
|
|
|
/**
|
|
|
|
* @public
|
|
|
|
*/
|
|
|
|
export interface HTMLPresenter extends Class<Doc> {
|
|
|
|
presenter: Resource<(doc: Doc) => string>
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @public
|
|
|
|
*/
|
|
|
|
export interface TextPresenter extends Class<Doc> {
|
|
|
|
presenter: Resource<(doc: Doc) => string>
|
|
|
|
}
|
|
|
|
|
2022-04-19 12:38:31 +03:00
|
|
|
/**
|
|
|
|
* @public
|
|
|
|
*/
|
|
|
|
export interface PreviewPresenter extends Class<Doc> {
|
|
|
|
presenter: AnyComponent
|
|
|
|
}
|
|
|
|
|
2021-08-07 08:39:49 +03:00
|
|
|
/**
|
|
|
|
* @public
|
|
|
|
*/
|
2021-08-06 13:18:50 +03:00
|
|
|
export const viewId = 'view' as Plugin
|
|
|
|
|
2021-12-08 12:09:51 +03:00
|
|
|
/**
|
|
|
|
* @public
|
|
|
|
*/
|
2021-12-20 13:18:29 +03:00
|
|
|
export interface BuildModelKey {
|
|
|
|
key: string
|
|
|
|
presenter?: AnyComponent
|
2022-02-16 12:02:31 +03:00
|
|
|
// A set of extra props passed to presenter.
|
|
|
|
props?: Record<string, any>
|
|
|
|
|
2021-12-20 13:18:29 +03:00
|
|
|
label?: IntlString
|
2021-12-20 12:06:31 +03:00
|
|
|
sortingKey?: string
|
2022-03-15 12:01:49 +03:00
|
|
|
|
|
|
|
// On client sorting function
|
|
|
|
sortingFunction?: (a: Doc, b: Doc) => number
|
2021-12-08 12:09:51 +03:00
|
|
|
}
|
|
|
|
|
2021-11-18 15:48:05 +03:00
|
|
|
/**
|
|
|
|
* @public
|
|
|
|
*/
|
|
|
|
export interface AttributeModel {
|
|
|
|
key: string
|
|
|
|
label: IntlString
|
2021-12-03 13:16:16 +03:00
|
|
|
_class: Ref<Class<Doc>>
|
2021-11-18 15:48:05 +03:00
|
|
|
presenter: AnySvelteComponent
|
2021-12-08 12:09:51 +03:00
|
|
|
// Extra properties for component
|
|
|
|
props?: Record<string, any>
|
2021-12-20 12:06:31 +03:00
|
|
|
sortingKey: string
|
2022-01-11 12:09:52 +03:00
|
|
|
// Extra icon if applicable
|
|
|
|
icon?: Asset
|
2022-02-07 12:21:32 +03:00
|
|
|
|
|
|
|
attribute?: AnyAttribute
|
2022-06-07 07:10:34 +03:00
|
|
|
collectionAttr: boolean
|
2021-11-18 15:48:05 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @public
|
|
|
|
*/
|
|
|
|
export interface BuildModelOptions {
|
|
|
|
client: Client
|
|
|
|
_class: Ref<Class<Obj>>
|
2021-12-20 13:18:29 +03:00
|
|
|
keys: (BuildModelKey | string)[]
|
2022-05-13 09:38:54 +03:00
|
|
|
lookup?: Lookup<Doc>
|
2021-11-18 15:48:05 +03:00
|
|
|
ignoreMissing?: boolean
|
|
|
|
}
|
|
|
|
|
2022-01-11 12:05:53 +03:00
|
|
|
/**
|
|
|
|
* Define document create popup widget
|
|
|
|
*
|
|
|
|
* @public
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
export interface ObjectFactory extends Class<Obj> {
|
|
|
|
component: AnyComponent
|
|
|
|
}
|
|
|
|
|
2022-05-13 09:38:54 +03:00
|
|
|
/**
|
|
|
|
* @public
|
|
|
|
*/
|
|
|
|
export interface ViewletPreference extends Preference {
|
|
|
|
attachedTo: Ref<Viewlet>
|
|
|
|
config: (BuildModelKey | string)[]
|
|
|
|
}
|
|
|
|
|
2021-12-14 12:24:14 +03:00
|
|
|
/**
|
|
|
|
* @public
|
|
|
|
*/
|
|
|
|
const view = plugin(viewId, {
|
2021-08-06 13:18:50 +03:00
|
|
|
mixin: {
|
2022-05-19 09:38:12 +03:00
|
|
|
ClassFilters: '' as Ref<Mixin<ClassFilters>>,
|
|
|
|
AttributeFilter: '' as Ref<Mixin<AttributeFilter>>,
|
2021-08-06 13:18:50 +03:00
|
|
|
AttributeEditor: '' as Ref<Mixin<AttributeEditor>>,
|
2022-05-19 10:14:05 +03:00
|
|
|
CollectionPresenter: '' as Ref<Mixin<CollectionPresenter>>,
|
2022-05-06 20:48:43 +03:00
|
|
|
CollectionEditor: '' as Ref<Mixin<CollectionEditor>>,
|
2022-06-08 16:55:01 +03:00
|
|
|
ArrayEditor: '' as Ref<Mixin<ArrayEditor>>,
|
2021-09-07 11:36:50 +03:00
|
|
|
AttributePresenter: '' as Ref<Mixin<AttributePresenter>>,
|
2021-12-20 12:37:15 +03:00
|
|
|
ObjectEditor: '' as Ref<Mixin<ObjectEditor>>,
|
2022-01-18 13:21:32 +03:00
|
|
|
ObjectEditorHeader: '' as Ref<Mixin<ObjectEditorHeader>>,
|
2022-01-11 12:05:53 +03:00
|
|
|
ObjectValidator: '' as Ref<Mixin<ObjectValidator>>,
|
2022-01-19 12:04:30 +03:00
|
|
|
ObjectFactory: '' as Ref<Mixin<ObjectFactory>>,
|
2022-04-12 08:59:38 +03:00
|
|
|
SpaceHeader: '' as Ref<Mixin<SpaceHeader>>,
|
2022-04-22 06:13:15 +03:00
|
|
|
SpaceName: '' as Ref<Mixin<SpaceName>>,
|
2022-02-25 18:32:23 +03:00
|
|
|
IgnoreActions: '' as Ref<Mixin<IgnoreActions>>,
|
2022-02-22 12:09:13 +03:00
|
|
|
HTMLPresenter: '' as Ref<Mixin<HTMLPresenter>>,
|
2022-04-19 12:38:31 +03:00
|
|
|
TextPresenter: '' as Ref<Mixin<TextPresenter>>,
|
|
|
|
PreviewPresenter: '' as Ref<Mixin<PreviewPresenter>>
|
2021-08-06 13:18:50 +03:00
|
|
|
},
|
|
|
|
class: {
|
2022-05-13 09:38:54 +03:00
|
|
|
ViewletPreference: '' as Ref<Class<ViewletPreference>>,
|
2021-08-06 13:18:50 +03:00
|
|
|
ViewletDescriptor: '' as Ref<Class<ViewletDescriptor>>,
|
2021-09-25 19:48:22 +03:00
|
|
|
Viewlet: '' as Ref<Class<Viewlet>>,
|
|
|
|
Action: '' as Ref<Class<Action>>,
|
2022-05-04 11:08:12 +03:00
|
|
|
ActionCategory: '' as Ref<Class<ActionCategory>>,
|
2022-06-03 19:12:18 +03:00
|
|
|
LinkPresenter: '' as Ref<Class<LinkPresenter>>,
|
|
|
|
FilterMode: '' as Ref<Class<FilterMode>>
|
2021-08-06 13:18:50 +03:00
|
|
|
},
|
2022-06-23 11:54:58 +03:00
|
|
|
action: {
|
|
|
|
Delete: '' as Ref<Action>,
|
|
|
|
Move: '' as Ref<Action>,
|
|
|
|
MoveLeft: '' as Ref<Action>,
|
|
|
|
MoveRight: '' as Ref<Action>,
|
|
|
|
MoveUp: '' as Ref<Action>,
|
|
|
|
MoveDown: '' as Ref<Action>,
|
|
|
|
|
|
|
|
SelectItem: '' as Ref<Action>,
|
|
|
|
SelectItemAll: '' as Ref<Action>,
|
|
|
|
SelectItemNone: '' as Ref<Action>,
|
|
|
|
SelectUp: '' as Ref<Action>,
|
|
|
|
SelectDown: '' as Ref<Action>,
|
|
|
|
|
|
|
|
ShowPreview: '' as Ref<Action>,
|
|
|
|
ShowActions: '' as Ref<Action>,
|
|
|
|
|
|
|
|
// Edit document
|
|
|
|
Open: '' as Ref<Action>
|
|
|
|
},
|
2021-08-06 13:18:50 +03:00
|
|
|
viewlet: {
|
2021-12-15 12:04:43 +03:00
|
|
|
Table: '' as Ref<ViewletDescriptor>
|
2021-10-23 13:09:39 +03:00
|
|
|
},
|
2022-01-19 12:04:30 +03:00
|
|
|
component: {
|
2022-02-04 12:03:24 +03:00
|
|
|
ObjectPresenter: '' as AnyComponent,
|
2022-04-16 06:02:12 +03:00
|
|
|
EditDoc: '' as AnyComponent,
|
2022-05-28 10:33:11 +03:00
|
|
|
SpacePresenter: '' as AnyComponent,
|
|
|
|
BooleanTruePresenter: '' as AnyComponent
|
2022-01-19 12:04:30 +03:00
|
|
|
},
|
2022-05-13 09:38:54 +03:00
|
|
|
string: {
|
2022-06-23 11:54:58 +03:00
|
|
|
CustomizeView: '' as IntlString,
|
|
|
|
LabelNA: '' as IntlString
|
2022-05-13 09:38:54 +03:00
|
|
|
},
|
2021-08-06 13:18:50 +03:00
|
|
|
icon: {
|
2021-09-06 11:30:31 +03:00
|
|
|
Table: '' as Asset,
|
2022-05-02 07:23:57 +03:00
|
|
|
Card: '' as Asset,
|
2021-12-13 12:05:46 +03:00
|
|
|
Delete: '' as Asset,
|
2021-12-15 12:04:43 +03:00
|
|
|
MoreH: '' as Asset,
|
2021-12-21 12:08:22 +03:00
|
|
|
Move: '' as Asset,
|
2021-12-22 12:03:28 +03:00
|
|
|
Archive: '' as Asset,
|
2022-04-24 08:18:03 +03:00
|
|
|
Statuses: '' as Asset,
|
2022-05-13 09:38:54 +03:00
|
|
|
Setting: '' as Asset,
|
2022-05-04 11:08:12 +03:00
|
|
|
Open: '' as Asset,
|
2022-05-24 17:46:19 +03:00
|
|
|
ArrowRight: '' as Asset,
|
2022-05-29 10:31:37 +03:00
|
|
|
Views: '' as Asset,
|
2022-06-14 06:03:41 +03:00
|
|
|
Pin: '' as Asset,
|
2022-06-20 17:11:14 +03:00
|
|
|
Model: '' as Asset,
|
|
|
|
ViewButton: '' as Asset
|
2022-05-04 11:08:12 +03:00
|
|
|
},
|
|
|
|
category: {
|
|
|
|
General: '' as Ref<ActionCategory>,
|
|
|
|
GeneralNavigation: '' as Ref<ActionCategory>,
|
|
|
|
Navigation: '' as Ref<ActionCategory>,
|
|
|
|
Editor: '' as Ref<ActionCategory>,
|
|
|
|
MarkdownFormatting: '' as Ref<ActionCategory>
|
|
|
|
},
|
2022-06-21 07:05:09 +03:00
|
|
|
filter: {
|
2022-06-03 19:12:18 +03:00
|
|
|
FilterObjectIn: '' as Ref<FilterMode>,
|
|
|
|
FilterObjectNin: '' as Ref<FilterMode>,
|
|
|
|
FilterValueIn: '' as Ref<FilterMode>,
|
|
|
|
FilterValueNin: '' as Ref<FilterMode>,
|
|
|
|
FilterBefore: '' as Ref<FilterMode>,
|
2022-06-21 07:05:09 +03:00
|
|
|
FilterAfter: '' as Ref<FilterMode>,
|
|
|
|
FilterNestedMatch: '' as Ref<FilterMode>,
|
|
|
|
FilterNestedDontMatch: '' as Ref<FilterMode>
|
2022-06-03 19:12:18 +03:00
|
|
|
},
|
2022-05-25 09:08:26 +03:00
|
|
|
popup: {
|
|
|
|
PositionElementAlignment: '' as Resource<(e?: Event) => PopupAlignment | undefined>
|
|
|
|
},
|
2022-05-04 11:08:12 +03:00
|
|
|
actionImpl: {
|
|
|
|
UpdateDocument: '' as ViewAction<{
|
|
|
|
key: string
|
|
|
|
value: any
|
|
|
|
ask?: boolean
|
|
|
|
label?: IntlString
|
|
|
|
message?: IntlString
|
|
|
|
}>,
|
|
|
|
ShowPanel: '' as ViewAction<{
|
|
|
|
component?: AnyComponent
|
|
|
|
element?: PopupPosAlignment
|
|
|
|
rightSection?: AnyComponent
|
|
|
|
}>,
|
|
|
|
ShowPopup: '' as ViewAction<{
|
|
|
|
component: AnyComponent
|
2022-05-25 09:08:26 +03:00
|
|
|
element?: PopupPosAlignment | Resource<(e?: Event) => PopupAlignment | undefined>
|
2022-05-04 11:08:12 +03:00
|
|
|
_id?: string
|
|
|
|
_class?: string
|
|
|
|
_space?: string
|
|
|
|
value?: string
|
|
|
|
values?: string
|
|
|
|
props?: Record<string, any>
|
2022-05-28 10:33:11 +03:00
|
|
|
}>,
|
|
|
|
ShowEditor: '' as ViewAction<{
|
|
|
|
element?: PopupPosAlignment | Resource<(e?: Event) => PopupAlignment | undefined>
|
|
|
|
attribute: string
|
|
|
|
props?: Record<string, any>
|
2022-05-04 11:08:12 +03:00
|
|
|
}>
|
2021-08-06 13:18:50 +03:00
|
|
|
}
|
|
|
|
})
|
2021-12-14 12:24:14 +03:00
|
|
|
export default view
|