@xh/hoist 71.0.0-SNAPSHOT.1733262000771 → 71.0.0-SNAPSHOT.1733266596001
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/CHANGELOG.md +8 -2
- package/appcontainer/AppContainerModel.ts +2 -1
- package/build/types/cmp/viewmanager/SaveAsDialogModel.d.ts +23 -0
- package/build/types/cmp/viewmanager/View.d.ts +28 -0
- package/build/types/cmp/viewmanager/ViewInfo.d.ts +30 -0
- package/build/types/cmp/viewmanager/ViewManagerModel.d.ts +185 -0
- package/build/types/cmp/viewmanager/index.d.ts +4 -0
- package/build/types/core/XH.d.ts +2 -1
- package/build/types/core/persist/PersistOptions.d.ts +3 -1
- package/build/types/core/persist/index.d.ts +6 -5
- package/build/types/core/persist/{CustomProvider.d.ts → provider/CustomProvider.d.ts} +1 -1
- package/build/types/core/persist/{DashViewProvider.d.ts → provider/DashViewProvider.d.ts} +2 -2
- package/build/types/core/persist/{LocalStorageProvider.d.ts → provider/LocalStorageProvider.d.ts} +1 -1
- package/build/types/core/persist/{PrefProvider.d.ts → provider/PrefProvider.d.ts} +1 -2
- package/build/types/core/persist/provider/SessionStorageProvider.d.ts +10 -0
- package/build/types/core/persist/{viewmanager → provider}/ViewManagerProvider.d.ts +3 -3
- package/build/types/desktop/cmp/viewmanager/ViewManager.d.ts +9 -10
- package/build/types/desktop/cmp/viewmanager/ViewMenu.d.ts +5 -0
- package/build/types/desktop/cmp/viewmanager/dialog/EditForm.d.ts +5 -0
- package/build/types/desktop/cmp/viewmanager/dialog/EditFormModel.d.ts +18 -0
- package/build/types/desktop/cmp/viewmanager/dialog/ManageDialog.d.ts +5 -0
- package/build/types/desktop/cmp/viewmanager/dialog/ManageDialogModel.d.ts +38 -0
- package/build/types/desktop/cmp/viewmanager/dialog/SaveAsDialog.d.ts +5 -0
- package/build/types/svc/JsonBlobService.d.ts +1 -1
- package/build/types/svc/index.d.ts +2 -1
- package/build/types/svc/storage/BaseStorageService.d.ts +21 -0
- package/build/types/svc/storage/LocalStorageService.d.ts +12 -0
- package/build/types/svc/storage/SessionStorageService.d.ts +12 -0
- package/cmp/viewmanager/SaveAsDialogModel.ts +97 -0
- package/cmp/viewmanager/View.ts +56 -0
- package/cmp/viewmanager/ViewInfo.ts +58 -0
- package/cmp/viewmanager/ViewManagerModel.ts +710 -0
- package/cmp/viewmanager/index.ts +4 -0
- package/core/XH.ts +2 -0
- package/core/persist/PersistOptions.ts +4 -1
- package/core/persist/PersistenceProvider.ts +5 -0
- package/core/persist/index.ts +6 -5
- package/core/persist/{CustomProvider.ts → provider/CustomProvider.ts} +1 -1
- package/core/persist/{DashViewProvider.ts → provider/DashViewProvider.ts} +1 -1
- package/core/persist/{LocalStorageProvider.ts → provider/LocalStorageProvider.ts} +1 -1
- package/core/persist/{PrefProvider.ts → provider/PrefProvider.ts} +2 -2
- package/core/persist/provider/SessionStorageProvider.ts +35 -0
- package/core/persist/{viewmanager → provider}/ViewManagerProvider.ts +5 -9
- package/desktop/cmp/viewmanager/ViewManager.ts +47 -229
- package/desktop/cmp/viewmanager/ViewMenu.ts +191 -0
- package/desktop/cmp/viewmanager/dialog/EditForm.ts +126 -0
- package/desktop/cmp/viewmanager/dialog/EditFormModel.ts +125 -0
- package/desktop/cmp/viewmanager/dialog/ManageDialog.ts +98 -0
- package/desktop/cmp/viewmanager/dialog/ManageDialogModel.ts +279 -0
- package/desktop/cmp/viewmanager/{impl/SaveDialog.ts → dialog/SaveAsDialog.ts} +20 -12
- package/package.json +1 -1
- package/svc/JsonBlobService.ts +1 -1
- package/svc/index.ts +2 -1
- package/svc/{LocalStorageService.ts → storage/BaseStorageService.ts} +13 -23
- package/svc/storage/LocalStorageService.ts +23 -0
- package/svc/storage/SessionStorageService.ts +23 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/build/types/core/persist/viewmanager/Types.d.ts +0 -48
- package/build/types/core/persist/viewmanager/ViewManagerModel.d.ts +0 -145
- package/build/types/core/persist/viewmanager/impl/BuildViewTree.d.ts +0 -8
- package/build/types/core/persist/viewmanager/impl/ManageDialogModel.d.ts +0 -30
- package/build/types/core/persist/viewmanager/impl/SaveDialogModel.d.ts +0 -23
- package/build/types/core/persist/viewmanager/index.d.ts +0 -2
- package/build/types/desktop/cmp/viewmanager/impl/ManageDialog.d.ts +0 -6
- package/build/types/desktop/cmp/viewmanager/impl/SaveDialog.d.ts +0 -2
- package/build/types/svc/LocalStorageService.d.ts +0 -24
- package/core/persist/viewmanager/Types.ts +0 -53
- package/core/persist/viewmanager/ViewManagerModel.ts +0 -481
- package/core/persist/viewmanager/impl/BuildViewTree.ts +0 -68
- package/core/persist/viewmanager/impl/ManageDialogModel.ts +0 -276
- package/core/persist/viewmanager/impl/SaveDialogModel.ts +0 -112
- package/core/persist/viewmanager/index.ts +0 -2
- package/desktop/cmp/viewmanager/impl/ManageDialog.ts +0 -197
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { PlainObject } from '@xh/hoist/core';
|
|
2
|
-
/**
|
|
3
|
-
* Interface for a bundle of {@link PersistableState} managed by {@link ViewManagerModel}.
|
|
4
|
-
* Views are persisted to / loaded from the server as {@link JsonBlob}s.
|
|
5
|
-
*/
|
|
6
|
-
export interface View<T extends PlainObject = PlainObject> {
|
|
7
|
-
/** Either null for private views or special token "*" for globally shared views. */
|
|
8
|
-
acl: '*' | null;
|
|
9
|
-
dateCreated: number;
|
|
10
|
-
description: string;
|
|
11
|
-
/** Calculated display group - either "Shared [entityName]" or "My [entityName]". */
|
|
12
|
-
group: string;
|
|
13
|
-
/**
|
|
14
|
-
* True if user has tagged this view as a favorite. Note that a user's list of favorite views is
|
|
15
|
-
* persisted via `ViewManagerModel.persistWith` and *not* stored in the blob itself.
|
|
16
|
-
*/
|
|
17
|
-
isFavorite: boolean;
|
|
18
|
-
/** True if this view has been shared (acl == "*") and is visible to all users. */
|
|
19
|
-
isShared: boolean;
|
|
20
|
-
lastUpdated: number;
|
|
21
|
-
lastUpdatedBy: string;
|
|
22
|
-
/** User-supplied descriptive name, including folder designating prefix. */
|
|
23
|
-
name: string;
|
|
24
|
-
/** User-supplied descriptive name, without folder designating prefix. */
|
|
25
|
-
shortName: string;
|
|
26
|
-
/** Original creator of the view, and the only user with access to it if not shared. */
|
|
27
|
-
owner: string;
|
|
28
|
-
token: string;
|
|
29
|
-
/** App-defined type discriminator, as per {@link ViewManagerConfig.viewType}. */
|
|
30
|
-
type: string;
|
|
31
|
-
value: T;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Abstract representation of ViewManager views available for selection, potentially grouped into
|
|
35
|
-
* hierarchical folders. Lightweight, user-driven organization into "folders" is supported by
|
|
36
|
-
* inserting a "\" in the name of any view.
|
|
37
|
-
*/
|
|
38
|
-
export type ViewTree = {
|
|
39
|
-
text: string;
|
|
40
|
-
selected: boolean;
|
|
41
|
-
} & ({
|
|
42
|
-
type: 'folder';
|
|
43
|
-
items: ViewTree[];
|
|
44
|
-
} | {
|
|
45
|
-
type: 'view';
|
|
46
|
-
token: string;
|
|
47
|
-
description: string;
|
|
48
|
-
});
|
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
import { HoistModel, LoadSpec, Persistable, PersistableState, PersistOptions, PlainObject, TaskObserver, Thunkable, ViewManagerProvider } from '@xh/hoist/core';
|
|
2
|
-
import { SaveDialogModel } from './impl/SaveDialogModel';
|
|
3
|
-
import { View, ViewTree } from './Types';
|
|
4
|
-
export interface ViewManagerConfig {
|
|
5
|
-
/**
|
|
6
|
-
* True (default) to allow user to opt in to automatically saving changes to their private
|
|
7
|
-
* views - requires `persistWith`.
|
|
8
|
-
*/
|
|
9
|
-
enableAutoSave?: boolean;
|
|
10
|
-
/**
|
|
11
|
-
* True (default) to allow the user to select a "Default" option that restores all persisted
|
|
12
|
-
* objects to their in-code defaults. If not enabled, at least one saved view should be created
|
|
13
|
-
* in advance, so that there is a clear initial selection for users without any private views.
|
|
14
|
-
*/
|
|
15
|
-
enableDefault?: boolean;
|
|
16
|
-
/** True (default) to allow user to mark views as favorites. Requires `persistWith`. */
|
|
17
|
-
enableFavorites?: boolean;
|
|
18
|
-
/**
|
|
19
|
-
* True to allow the user to publish or edit globally shared views. Apps are expected to
|
|
20
|
-
* commonly set this based on user roles - e.g. `XH.getUser().hasRole('MANAGE_GRID_VIEWS')`.
|
|
21
|
-
*/
|
|
22
|
-
enableSharing?: Thunkable<boolean>;
|
|
23
|
-
/** Used to persist the user's last selected + favorite views and autoSave preference. */
|
|
24
|
-
persistWith?: PersistOptions;
|
|
25
|
-
/**
|
|
26
|
-
* Required discriminator for the particular class of views to be loaded and managed by this
|
|
27
|
-
* model. Maps onto the `type` field of the persisted `JsonBlob`. Set to something descriptive
|
|
28
|
-
* and specific enough to be identifiable and allow for different viewManagers to be added
|
|
29
|
-
* to your app in the future - e.g. `portfolioGridView` or `tradeBlotterDashboard`.
|
|
30
|
-
*/
|
|
31
|
-
viewType: string;
|
|
32
|
-
/**
|
|
33
|
-
* Optional user-facing display name for the view type, displayed in the ViewManager menu
|
|
34
|
-
* and associated management dialogs and prompts. Defaulted from `viewType` if not provided.
|
|
35
|
-
*/
|
|
36
|
-
viewTypeDisplayName?: string;
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* ViewManagerModel coordinates the loading, saving, and management of user-defined bundles of
|
|
40
|
-
* {@link Persistable} component/model state.
|
|
41
|
-
*
|
|
42
|
-
* - Models to be persisted are bound to this model via their `persistWith` config. One or more
|
|
43
|
-
* models can be bound to a single ViewManagerModel, allowing a single view to capture the state
|
|
44
|
-
* of multiple components - e.g. grouping and filtering options along with grid state.
|
|
45
|
-
* - Views are persisted back to the server as JsonBlob objects.
|
|
46
|
-
* - Views can be private to their owner, or optionally enabled for sharing to (all) other users.
|
|
47
|
-
* - Views can be marked as favorites for quick access.
|
|
48
|
-
* - See the desktop {@link ViewManager} component - the initial Hoist UI for this model.
|
|
49
|
-
*/
|
|
50
|
-
export declare class ViewManagerModel<T extends PlainObject = PlainObject> extends HoistModel implements Persistable<ViewManagerModelPersistState> {
|
|
51
|
-
/**
|
|
52
|
-
* Factory to create new instances of this model and await its initial load before binding to
|
|
53
|
-
* any persistable component models. This ensures that bound models will have the expected
|
|
54
|
-
* initial persisted state applied within their constructor, before their components have
|
|
55
|
-
* rendered, and avoids thrashing of component state during initial load.
|
|
56
|
-
*
|
|
57
|
-
* To minimize the impact this async requirement has on the design and lifecycle of individual
|
|
58
|
-
* components within an app, consider eagerly constructing any viewManagerModels required within
|
|
59
|
-
* your `AppModel.initAsync` method and saving a reference to them there for component models
|
|
60
|
-
* to then use when they are mounted. The VM model instances will then be "ready to go" and
|
|
61
|
-
* usable within model constructors. (Initializing and referencing from one or more app
|
|
62
|
-
* services would be another, similar option.)
|
|
63
|
-
*/
|
|
64
|
-
static createAsync(config: ViewManagerConfig): Promise<ViewManagerModel>;
|
|
65
|
-
/** Immutable configuration for this model. */
|
|
66
|
-
readonly viewType: string;
|
|
67
|
-
readonly displayName: string;
|
|
68
|
-
readonly DisplayName: string;
|
|
69
|
-
readonly enableDefault: boolean;
|
|
70
|
-
readonly enableAutoSave: boolean;
|
|
71
|
-
readonly enableFavorites: boolean;
|
|
72
|
-
/** Last selected, fully-persisted state of the active view. */
|
|
73
|
-
value: T;
|
|
74
|
-
/** Current state of the active view, can include not-yet-persisted changes. */
|
|
75
|
-
pendingValue: T;
|
|
76
|
-
/** Loaded saved view definitions - both private and shared. */
|
|
77
|
-
views: View<T>[];
|
|
78
|
-
/** Currently selected view, or null if in default mode. Token only will be set during pre-loading.*/
|
|
79
|
-
selectedToken: string;
|
|
80
|
-
selectedView: View<T>;
|
|
81
|
-
/** List of tokens for the user's favorite views. */
|
|
82
|
-
favorites: string[];
|
|
83
|
-
/**
|
|
84
|
-
* True if user has opted-in to automatically saving changes to personal views (if auto-save
|
|
85
|
-
* generally available as per `enableAutoSave`).
|
|
86
|
-
*/
|
|
87
|
-
autoSave: boolean;
|
|
88
|
-
/**
|
|
89
|
-
* TaskObserver linked to {@link selectViewAsync}. If a change to the active view is likely to
|
|
90
|
-
* require intensive layout/grid work, consider masking affected components with this observer.
|
|
91
|
-
*/
|
|
92
|
-
viewSelectionObserver: TaskObserver;
|
|
93
|
-
manageDialogOpen: boolean;
|
|
94
|
-
readonly saveDialogModel: SaveDialogModel;
|
|
95
|
-
private readonly _enableSharing;
|
|
96
|
-
/**
|
|
97
|
-
* @internal array of {@link ViewManagerProvider} instances bound to this model. Providers will
|
|
98
|
-
* push themselves onto this array when constructed with a reference to this model. Used to
|
|
99
|
-
* proactively push state to the target components when the model's selected `value` changes.
|
|
100
|
-
*/
|
|
101
|
-
providers: ViewManagerProvider<any>[];
|
|
102
|
-
get enableSharing(): boolean;
|
|
103
|
-
get canSave(): boolean;
|
|
104
|
-
get canAutoSave(): boolean;
|
|
105
|
-
get autoSaveUnavailableReason(): string;
|
|
106
|
-
get isDirty(): boolean;
|
|
107
|
-
get isShared(): boolean;
|
|
108
|
-
get favoriteViews(): View<T>[];
|
|
109
|
-
get sharedViews(): View<T>[];
|
|
110
|
-
get privateViews(): View<T>[];
|
|
111
|
-
get sharedViewTree(): ViewTree[];
|
|
112
|
-
get privateViewTree(): ViewTree[];
|
|
113
|
-
/**
|
|
114
|
-
* Use the static {@link createAsync} factory to create an instance of this model and await its
|
|
115
|
-
* initial load before binding to persistable components.
|
|
116
|
-
*/
|
|
117
|
-
private constructor();
|
|
118
|
-
doLoadAsync(loadSpec: LoadSpec): Promise<void>;
|
|
119
|
-
selectViewAsync(token: string): Promise<void>;
|
|
120
|
-
saveAsync(): Promise<void>;
|
|
121
|
-
saveAsAsync(): Promise<void>;
|
|
122
|
-
resetAsync(): Promise<void>;
|
|
123
|
-
setPendingValue(pendingValue: T): void;
|
|
124
|
-
openManageDialog(): void;
|
|
125
|
-
closeManageDialog(): void;
|
|
126
|
-
toggleFavorite(token: string): void;
|
|
127
|
-
addFavorite(token: string): void;
|
|
128
|
-
removeFavorite(token: string): void;
|
|
129
|
-
isFavorite(token: string): boolean;
|
|
130
|
-
getPersistableState(): PersistableState<ViewManagerModelPersistState>;
|
|
131
|
-
setPersistableState(state: PersistableState<ViewManagerModelPersistState>): void;
|
|
132
|
-
private selectViewInternalAsync;
|
|
133
|
-
private processRaw;
|
|
134
|
-
private setValue;
|
|
135
|
-
private cleanValue;
|
|
136
|
-
private confirmSaveForSharedViewAsync;
|
|
137
|
-
private maybeAutoSaveAsync;
|
|
138
|
-
private onFavoritesChange;
|
|
139
|
-
}
|
|
140
|
-
interface ViewManagerModelPersistState {
|
|
141
|
-
selectedToken?: string;
|
|
142
|
-
favorites?: string[];
|
|
143
|
-
autoSave?: boolean;
|
|
144
|
-
}
|
|
145
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { View, ViewManagerModel, ViewTree } from '@xh/hoist/core/persist/viewmanager';
|
|
2
|
-
/**
|
|
3
|
-
* Create a menu-friendly, tree representation of a set of views, using the `\`
|
|
4
|
-
* in view names to create folders.
|
|
5
|
-
*
|
|
6
|
-
* @internal
|
|
7
|
-
*/
|
|
8
|
-
export declare function buildViewTree(views: View[], model: ViewManagerModel): ViewTree[];
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { FormModel } from '@xh/hoist/cmp/form';
|
|
2
|
-
import { GridModel } from '@xh/hoist/cmp/grid';
|
|
3
|
-
import { HoistModel, TaskObserver } from '@xh/hoist/core';
|
|
4
|
-
export declare class ManageDialogModel extends HoistModel {
|
|
5
|
-
private viewManagerModel;
|
|
6
|
-
gridModel: GridModel;
|
|
7
|
-
formModel: FormModel;
|
|
8
|
-
readonly saveTask: TaskObserver;
|
|
9
|
-
readonly deleteTask: TaskObserver;
|
|
10
|
-
get selectedId(): string;
|
|
11
|
-
get selectedIds(): string[];
|
|
12
|
-
get hasMultiSelection(): boolean;
|
|
13
|
-
get selIsShared(): boolean;
|
|
14
|
-
get canDelete(): boolean;
|
|
15
|
-
get canEdit(): boolean;
|
|
16
|
-
get enableSharing(): boolean;
|
|
17
|
-
get showSaveButton(): boolean;
|
|
18
|
-
get displayName(): string;
|
|
19
|
-
get enableFavorites(): boolean;
|
|
20
|
-
constructor();
|
|
21
|
-
onLinked(): void;
|
|
22
|
-
doLoadAsync(): Promise<void>;
|
|
23
|
-
saveAsync(): Promise<void>;
|
|
24
|
-
deleteAsync(): Promise<void>;
|
|
25
|
-
private doSaveAsync;
|
|
26
|
-
private doDeleteAsync;
|
|
27
|
-
private ensureGridHasSelection;
|
|
28
|
-
private createGridModel;
|
|
29
|
-
private createFormModel;
|
|
30
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { FormModel } from '@xh/hoist/cmp/form';
|
|
2
|
-
import { HoistModel, TaskObserver } from '@xh/hoist/core';
|
|
3
|
-
import { ViewManagerModel } from '@xh/hoist/core/persist/viewmanager';
|
|
4
|
-
import { JsonBlob } from '@xh/hoist/svc';
|
|
5
|
-
import { View } from '../Types';
|
|
6
|
-
export declare class SaveDialogModel extends HoistModel {
|
|
7
|
-
private readonly viewManagerModel;
|
|
8
|
-
readonly formModel: FormModel;
|
|
9
|
-
readonly saveTask: TaskObserver;
|
|
10
|
-
viewStub: Partial<View>;
|
|
11
|
-
isOpen: boolean;
|
|
12
|
-
private resolveOpen;
|
|
13
|
-
private invalidNames;
|
|
14
|
-
get type(): string;
|
|
15
|
-
get DisplayName(): string;
|
|
16
|
-
constructor(viewManagerModel: ViewManagerModel);
|
|
17
|
-
openAsync(viewStub: Partial<View>, invalidNames: string[]): Promise<JsonBlob>;
|
|
18
|
-
cancel(): void;
|
|
19
|
-
saveAsAsync(): Promise<void>;
|
|
20
|
-
private createFormModel;
|
|
21
|
-
private doSaveAsAsync;
|
|
22
|
-
private close;
|
|
23
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { HoistProps } from '@xh/hoist/core';
|
|
2
|
-
import { ManageDialogModel } from '@xh/hoist/core/persist/viewmanager/impl/ManageDialogModel';
|
|
3
|
-
export interface ManageDialogProps extends HoistProps<ManageDialogModel> {
|
|
4
|
-
onClose: () => void;
|
|
5
|
-
}
|
|
6
|
-
export declare const manageDialog: import("@xh/hoist/core").ElementFactory<ManageDialogProps>;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { HoistService } from '@xh/hoist/core';
|
|
2
|
-
/**
|
|
3
|
-
* Service to provide simple key/value access to browser local storage, appropriately namespaced
|
|
4
|
-
* by application code and username.
|
|
5
|
-
*
|
|
6
|
-
* In the unexpected case that local storage is not available, will provide a transient in-memory
|
|
7
|
-
* storage to support its operations and API.
|
|
8
|
-
*
|
|
9
|
-
* Relied upon by Hoist features such as local preference values and grid state.
|
|
10
|
-
*/
|
|
11
|
-
export declare class LocalStorageService extends HoistService {
|
|
12
|
-
static instance: LocalStorageService;
|
|
13
|
-
constructor();
|
|
14
|
-
get(key: string, defaultValue?: any): any;
|
|
15
|
-
set(key: string, value: any): void;
|
|
16
|
-
apply(key: string, newProps: object): void;
|
|
17
|
-
remove(key: string): void;
|
|
18
|
-
removeIf(predicateFn: (s: string) => boolean): void;
|
|
19
|
-
clear(): void;
|
|
20
|
-
keys(): string[];
|
|
21
|
-
get isFake(): boolean;
|
|
22
|
-
private getInstance;
|
|
23
|
-
private getNamespace;
|
|
24
|
-
}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import {PlainObject} from '@xh/hoist/core';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Interface for a bundle of {@link PersistableState} managed by {@link ViewManagerModel}.
|
|
5
|
-
* Views are persisted to / loaded from the server as {@link JsonBlob}s.
|
|
6
|
-
*/
|
|
7
|
-
export interface View<T extends PlainObject = PlainObject> {
|
|
8
|
-
/** Either null for private views or special token "*" for globally shared views. */
|
|
9
|
-
acl: '*' | null;
|
|
10
|
-
dateCreated: number;
|
|
11
|
-
description: string;
|
|
12
|
-
/** Calculated display group - either "Shared [entityName]" or "My [entityName]". */
|
|
13
|
-
group: string;
|
|
14
|
-
/**
|
|
15
|
-
* True if user has tagged this view as a favorite. Note that a user's list of favorite views is
|
|
16
|
-
* persisted via `ViewManagerModel.persistWith` and *not* stored in the blob itself.
|
|
17
|
-
*/
|
|
18
|
-
isFavorite: boolean;
|
|
19
|
-
/** True if this view has been shared (acl == "*") and is visible to all users. */
|
|
20
|
-
isShared: boolean;
|
|
21
|
-
lastUpdated: number;
|
|
22
|
-
lastUpdatedBy: string;
|
|
23
|
-
/** User-supplied descriptive name, including folder designating prefix. */
|
|
24
|
-
name: string;
|
|
25
|
-
/** User-supplied descriptive name, without folder designating prefix. */
|
|
26
|
-
shortName: string;
|
|
27
|
-
/** Original creator of the view, and the only user with access to it if not shared. */
|
|
28
|
-
owner: string;
|
|
29
|
-
token: string;
|
|
30
|
-
/** App-defined type discriminator, as per {@link ViewManagerConfig.viewType}. */
|
|
31
|
-
type: string;
|
|
32
|
-
value: T;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Abstract representation of ViewManager views available for selection, potentially grouped into
|
|
37
|
-
* hierarchical folders. Lightweight, user-driven organization into "folders" is supported by
|
|
38
|
-
* inserting a "\" in the name of any view.
|
|
39
|
-
*/
|
|
40
|
-
export type ViewTree = {
|
|
41
|
-
text: string;
|
|
42
|
-
selected: boolean;
|
|
43
|
-
} & (
|
|
44
|
-
| {
|
|
45
|
-
type: 'folder';
|
|
46
|
-
items: ViewTree[];
|
|
47
|
-
}
|
|
48
|
-
| {
|
|
49
|
-
type: 'view';
|
|
50
|
-
token: string;
|
|
51
|
-
description: string;
|
|
52
|
-
}
|
|
53
|
-
);
|