mindoodb 0.3.3 → 0.3.4
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/dist/browser/index.mjs +6 -0
- package/dist/core/BaseMindooTenantDirectory.d.ts +10 -0
- package/dist/core/BaseMindooTenantDirectory.d.ts.map +1 -1
- package/dist/core/BaseMindooTenantDirectory.js +81 -3
- package/dist/core/BaseMindooTenantDirectory.js.map +1 -1
- package/dist/core/accesscontrol/directoryProjection.d.ts.map +1 -1
- package/dist/core/accesscontrol/directoryProjection.js +1 -0
- package/dist/core/accesscontrol/directoryProjection.js.map +1 -1
- package/dist/core/accesscontrol/types.d.ts +11 -2
- package/dist/core/accesscontrol/types.d.ts.map +1 -1
- package/dist/core/accesscontrol/types.js +3 -0
- package/dist/core/accesscontrol/types.js.map +1 -1
- package/dist/core/appendonlystores/network/AuthenticationService.d.ts +1 -0
- package/dist/core/appendonlystores/network/AuthenticationService.d.ts.map +1 -1
- package/dist/core/appendonlystores/network/AuthenticationService.js +1 -1
- package/dist/core/appendonlystores/network/AuthenticationService.js.map +1 -1
- package/dist/core/appendonlystores/network/types.d.ts +2 -0
- package/dist/core/appendonlystores/network/types.d.ts.map +1 -1
- package/dist/core/appendonlystores/network/types.js.map +1 -1
- package/dist/core/appendonlystores/rpc/SqlRpc.d.ts +8 -1
- package/dist/core/appendonlystores/rpc/SqlRpc.d.ts.map +1 -1
- package/dist/core/appendonlystores/rpc/SqlRpc.js +17 -0
- package/dist/core/appendonlystores/rpc/SqlRpc.js.map +1 -1
- package/dist/core/appendonlystores/sqlite/SqliteDriver.d.ts +6 -0
- package/dist/core/appendonlystores/sqlite/SqliteDriver.d.ts.map +1 -1
- package/dist/core/appendonlystores/sqlite/SqliteDriver.js.map +1 -1
- package/dist/core/builtinDbInvariants.d.ts +2 -1
- package/dist/core/builtinDbInvariants.d.ts.map +1 -1
- package/dist/core/builtinDbInvariants.js +2 -1
- package/dist/core/builtinDbInvariants.js.map +1 -1
- package/dist/core/guestAdmissions.d.ts +31 -2
- package/dist/core/guestAdmissions.d.ts.map +1 -1
- package/dist/core/guestAdmissions.js +26 -3
- package/dist/core/guestAdmissions.js.map +1 -1
- package/dist/core/guestTickets.d.ts +13 -0
- package/dist/core/guestTickets.d.ts.map +1 -1
- package/dist/core/guestTickets.js +16 -1
- package/dist/core/guestTickets.js.map +1 -1
- package/dist/core/index.d.ts +3 -3
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +9 -3
- package/dist/core/index.js.map +1 -1
- package/dist/core/indexing/summary/SummaryVirtualViewDataProvider.d.ts +19 -0
- package/dist/core/indexing/summary/SummaryVirtualViewDataProvider.d.ts.map +1 -1
- package/dist/core/indexing/summary/SummaryVirtualViewDataProvider.js +149 -52
- package/dist/core/indexing/summary/SummaryVirtualViewDataProvider.js.map +1 -1
- package/dist/core/indexing/virtualviews/IViewEntryAccessCheck.d.ts +8 -7
- package/dist/core/indexing/virtualviews/IViewEntryAccessCheck.d.ts.map +1 -1
- package/dist/core/indexing/virtualviews/IViewEntryAccessCheck.js +3 -3
- package/dist/core/indexing/virtualviews/IViewEntryAccessCheck.js.map +1 -1
- package/dist/core/indexing/virtualviews/MindooDBVirtualViewDataProvider.d.ts +9 -0
- package/dist/core/indexing/virtualviews/MindooDBVirtualViewDataProvider.d.ts.map +1 -1
- package/dist/core/indexing/virtualviews/MindooDBVirtualViewDataProvider.js +20 -3
- package/dist/core/indexing/virtualviews/MindooDBVirtualViewDataProvider.js.map +1 -1
- package/dist/core/indexing/virtualviews/ViewEntry.d.ts +48 -0
- package/dist/core/indexing/virtualviews/ViewEntry.d.ts.map +1 -0
- package/dist/core/indexing/virtualviews/ViewEntry.js +3 -0
- package/dist/core/indexing/virtualviews/ViewEntry.js.map +1 -0
- package/dist/core/indexing/virtualviews/ViewEntrySortKeyComparator.d.ts.map +1 -1
- package/dist/core/indexing/virtualviews/ViewEntrySortKeyComparator.js +6 -6
- package/dist/core/indexing/virtualviews/ViewEntrySortKeyComparator.js.map +1 -1
- package/dist/core/indexing/virtualviews/ViewNavigator.d.ts +58 -0
- package/dist/core/indexing/virtualviews/ViewNavigator.d.ts.map +1 -0
- package/dist/core/indexing/virtualviews/ViewNavigator.js +3 -0
- package/dist/core/indexing/virtualviews/ViewNavigator.js.map +1 -0
- package/dist/core/indexing/virtualviews/VirtualView.d.ts +38 -0
- package/dist/core/indexing/virtualviews/VirtualView.d.ts.map +1 -1
- package/dist/core/indexing/virtualviews/VirtualView.js +150 -0
- package/dist/core/indexing/virtualviews/VirtualView.js.map +1 -1
- package/dist/core/indexing/virtualviews/VirtualViewDataChange.d.ts +6 -0
- package/dist/core/indexing/virtualviews/VirtualViewDataChange.d.ts.map +1 -1
- package/dist/core/indexing/virtualviews/VirtualViewDataChange.js +8 -1
- package/dist/core/indexing/virtualviews/VirtualViewDataChange.js.map +1 -1
- package/dist/core/indexing/virtualviews/VirtualViewEntryData.d.ts +4 -1
- package/dist/core/indexing/virtualviews/VirtualViewEntryData.d.ts.map +1 -1
- package/dist/core/indexing/virtualviews/VirtualViewEntryData.js +14 -0
- package/dist/core/indexing/virtualviews/VirtualViewEntryData.js.map +1 -1
- package/dist/core/indexing/virtualviews/VirtualViewFactory.d.ts +9 -1
- package/dist/core/indexing/virtualviews/VirtualViewFactory.d.ts.map +1 -1
- package/dist/core/indexing/virtualviews/VirtualViewFactory.js +25 -0
- package/dist/core/indexing/virtualviews/VirtualViewFactory.js.map +1 -1
- package/dist/core/indexing/virtualviews/VirtualViewMergedNavigator.d.ts +19 -17
- package/dist/core/indexing/virtualviews/VirtualViewMergedNavigator.d.ts.map +1 -1
- package/dist/core/indexing/virtualviews/VirtualViewMergedNavigator.js +20 -17
- package/dist/core/indexing/virtualviews/VirtualViewMergedNavigator.js.map +1 -1
- package/dist/core/indexing/virtualviews/VirtualViewNavigator.d.ts +77 -301
- package/dist/core/indexing/virtualviews/VirtualViewNavigator.d.ts.map +1 -1
- package/dist/core/indexing/virtualviews/VirtualViewNavigator.js +158 -895
- package/dist/core/indexing/virtualviews/VirtualViewNavigator.js.map +1 -1
- package/dist/core/indexing/virtualviews/VirtualViewTreeCursor.d.ts +336 -0
- package/dist/core/indexing/virtualviews/VirtualViewTreeCursor.d.ts.map +1 -0
- package/dist/core/indexing/virtualviews/VirtualViewTreeCursor.js +1015 -0
- package/dist/core/indexing/virtualviews/VirtualViewTreeCursor.js.map +1 -0
- package/dist/core/indexing/virtualviews/index.d.ts +6 -0
- package/dist/core/indexing/virtualviews/index.d.ts.map +1 -1
- package/dist/core/indexing/virtualviews/index.js +10 -1
- package/dist/core/indexing/virtualviews/index.js.map +1 -1
- package/dist/core/indexing/virtualviews/sql/SqlViewIndex.d.ts +112 -0
- package/dist/core/indexing/virtualviews/sql/SqlViewIndex.d.ts.map +1 -0
- package/dist/core/indexing/virtualviews/sql/SqlViewIndex.js +364 -0
- package/dist/core/indexing/virtualviews/sql/SqlViewIndex.js.map +1 -0
- package/dist/core/indexing/virtualviews/sql/SqlViewNavigator.d.ts +250 -0
- package/dist/core/indexing/virtualviews/sql/SqlViewNavigator.d.ts.map +1 -0
- package/dist/core/indexing/virtualviews/sql/SqlViewNavigator.js +878 -0
- package/dist/core/indexing/virtualviews/sql/SqlViewNavigator.js.map +1 -0
- package/dist/core/indexing/virtualviews/viewRows.d.ts +59 -0
- package/dist/core/indexing/virtualviews/viewRows.d.ts.map +1 -0
- package/dist/core/indexing/virtualviews/viewRows.js +105 -0
- package/dist/core/indexing/virtualviews/viewRows.js.map +1 -0
- package/dist/core/indexing/virtualviews/viewSortKeys.d.ts +44 -0
- package/dist/core/indexing/virtualviews/viewSortKeys.d.ts.map +1 -0
- package/dist/core/indexing/virtualviews/viewSortKeys.js +85 -0
- package/dist/core/indexing/virtualviews/viewSortKeys.js.map +1 -0
- package/dist/core/types.d.ts +4 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/guest/guestCall.d.ts +1 -0
- package/dist/guest/guestCall.d.ts.map +1 -1
- package/dist/guest/guestCall.js +2 -1
- package/dist/guest/guestCall.js.map +1 -1
- package/dist/server/GuestAdmissionService.d.ts +2 -1
- package/dist/server/GuestAdmissionService.d.ts.map +1 -1
- package/dist/server/GuestAdmissionService.js +4 -2
- package/dist/server/GuestAdmissionService.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,332 +1,108 @@
|
|
|
1
1
|
import type { VirtualView } from "./VirtualView";
|
|
2
|
-
import
|
|
2
|
+
import { VirtualViewEntryData } from "./VirtualViewEntryData";
|
|
3
3
|
import type { IViewEntryAccessCheck } from "./IViewEntryAccessCheck";
|
|
4
|
-
import {
|
|
4
|
+
import type { ViewEntry } from "./ViewEntry";
|
|
5
|
+
import type { ViewNavigator } from "./ViewNavigator";
|
|
6
|
+
import { SelectedOnly, WithCategories, WithDocuments, type ScopedDocId } from "./types";
|
|
7
|
+
/** Options for {@link VirtualViewNavigator.readEntries}. */
|
|
8
|
+
export interface ReadEntriesOptions {
|
|
9
|
+
/** At most this many entries. */
|
|
10
|
+
count: number;
|
|
11
|
+
/** Walk backwards (gotoPrev) instead of forwards. */
|
|
12
|
+
backwards?: boolean;
|
|
13
|
+
/** Only selected entries (gotoNextSelected / gotoPrevSelected). */
|
|
14
|
+
selectedOnly?: boolean;
|
|
15
|
+
/** Include the current entry as the first one (else start with the next). */
|
|
16
|
+
includeCurrent?: boolean;
|
|
17
|
+
}
|
|
5
18
|
/**
|
|
6
|
-
* Navigator for
|
|
7
|
-
*
|
|
19
|
+
* Navigator for a view: moves a cursor through categories and documents,
|
|
20
|
+
* with expanded/collapsed states, selection and access control.
|
|
21
|
+
*
|
|
22
|
+
* Asynchronous, so a view kept in SQLite (B6 of the 1M documents plan) can
|
|
23
|
+
* answer every step with a query; entries come as {@link ViewEntry}, not as
|
|
24
|
+
* tree nodes. This class navigates views kept in memory, on the tree
|
|
25
|
+
* ({@link VirtualViewTreeCursor}); the answers are immediate.
|
|
26
|
+
*
|
|
27
|
+
* Selection and expansion are state of the navigator and stay synchronous.
|
|
8
28
|
*/
|
|
9
|
-
export declare class VirtualViewNavigator {
|
|
10
|
-
private readonly
|
|
11
|
-
private topEntry;
|
|
12
|
-
private readonly withCategories;
|
|
13
|
-
private readonly withDocuments;
|
|
14
|
-
private readonly accessCheck;
|
|
15
|
-
private readonly dontShowEmptyCategories;
|
|
16
|
-
/** Stack of traversal states for navigation */
|
|
17
|
-
private currentEntryStack;
|
|
18
|
-
/** Selection state - if selectAll is true, this is a deselection list */
|
|
19
|
-
private selectedOrDeselectedEntries;
|
|
20
|
-
private selectAll;
|
|
21
|
-
/** Expansion state - if expandAllByDefault is true, this is a collapse list */
|
|
22
|
-
private expandedOrCollapsedEntries;
|
|
23
|
-
private expandAllByDefault;
|
|
24
|
-
private expandLevel;
|
|
29
|
+
export declare class VirtualViewNavigator implements ViewNavigator {
|
|
30
|
+
private readonly cursor;
|
|
25
31
|
constructor(view: VirtualView, topEntry: VirtualViewEntryData, withCategories: WithCategories, withDocuments: WithDocuments, accessCheck?: IViewEntryAccessCheck | null, dontShowEmptyCategories?: boolean);
|
|
26
|
-
|
|
27
|
-
private
|
|
32
|
+
/** The tree node of an entry this navigator handed out (or found again by its position). */
|
|
33
|
+
private node;
|
|
28
34
|
getView(): VirtualView;
|
|
29
35
|
isDontShowEmptyCategories(): boolean;
|
|
30
|
-
/**
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
*
|
|
56
|
-
*/
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
private gotoNextSiblingRaw;
|
|
62
|
-
/**
|
|
63
|
-
* Move to the previous entry (respecting expand states)
|
|
64
|
-
*/
|
|
65
|
-
gotoPrev(): boolean;
|
|
66
|
-
/**
|
|
67
|
-
* Move to the next sibling
|
|
68
|
-
*/
|
|
69
|
-
gotoNextSibling(): boolean;
|
|
70
|
-
/**
|
|
71
|
-
* Move to the previous sibling
|
|
72
|
-
*/
|
|
73
|
-
gotoPrevSibling(): boolean;
|
|
74
|
-
/**
|
|
75
|
-
* Move to the parent entry
|
|
76
|
-
*/
|
|
77
|
-
gotoParent(): boolean;
|
|
78
|
-
/**
|
|
79
|
-
* Move to the first child of current entry
|
|
80
|
-
*/
|
|
81
|
-
gotoFirstChild(): boolean;
|
|
82
|
-
/**
|
|
83
|
-
* Move to the last child of current entry
|
|
84
|
-
*/
|
|
85
|
-
gotoLastChild(): boolean;
|
|
86
|
-
private gotoDeepestExpandedDescendant;
|
|
87
|
-
/**
|
|
88
|
-
* Move to a specific position (e.g., "1.2.3")
|
|
89
|
-
*/
|
|
90
|
-
gotoPos(posStr: string): boolean;
|
|
91
|
-
/**
|
|
92
|
-
* Move to a specific position array (e.g., [1, 2, 3])
|
|
93
|
-
*/
|
|
94
|
-
gotoPosArray(pos: number[]): boolean;
|
|
95
|
-
/**
|
|
96
|
-
* Get the entry at a specific position without moving the cursor
|
|
97
|
-
*
|
|
98
|
-
* @param posStr Position string e.g. "1.2.3"
|
|
99
|
-
* @returns The entry at the position or null if not found
|
|
100
|
-
*/
|
|
101
|
-
getPos(posStr: string): VirtualViewEntryData | null;
|
|
102
|
-
/**
|
|
103
|
-
* Get the entry at a specific position array without moving the cursor
|
|
104
|
-
*
|
|
105
|
-
* @param pos Position array e.g. [1, 2, 3]
|
|
106
|
-
* @returns The entry at the position or null if not found
|
|
107
|
-
*/
|
|
108
|
-
getPosArray(pos: number[]): VirtualViewEntryData | null;
|
|
109
|
-
/**
|
|
110
|
-
* Find a category entry by path string (e.g., "Category1\\Category1.1")
|
|
111
|
-
* Navigates through the category tree from the top entry.
|
|
112
|
-
*
|
|
113
|
-
* @param category Category path with backslash separators
|
|
114
|
-
* @returns The category entry or null if not found
|
|
115
|
-
*/
|
|
116
|
-
findCategoryEntry(category: string): VirtualViewEntryData | null;
|
|
117
|
-
/**
|
|
118
|
-
* Find a category entry by array of category parts
|
|
119
|
-
* Navigates through the category tree from the top entry.
|
|
120
|
-
*
|
|
121
|
-
* @param categoryParts Array of category values e.g. ["Category1", "Category1.1"]
|
|
122
|
-
* @returns The category entry or null if not found
|
|
123
|
-
*/
|
|
124
|
-
findCategoryEntryByParts(categoryParts: unknown[]): VirtualViewEntryData | null;
|
|
125
|
-
/**
|
|
126
|
-
* Iterate forward through entries
|
|
127
|
-
*/
|
|
128
|
-
entriesForward(selectedOnly?: SelectedOnly): AsyncGenerator<VirtualViewEntryData>;
|
|
129
|
-
/**
|
|
130
|
-
* Iterate forward through entries starting from a specific position
|
|
131
|
-
*
|
|
132
|
-
* @param startPos Starting position string e.g. "1.2.3"
|
|
133
|
-
* @param selectedOnly Whether to only yield selected entries
|
|
134
|
-
*/
|
|
135
|
-
entriesForwardFromPosition(startPos: string, selectedOnly?: SelectedOnly): AsyncGenerator<VirtualViewEntryData>;
|
|
136
|
-
/**
|
|
137
|
-
* Iterate backward through entries
|
|
138
|
-
*/
|
|
139
|
-
entriesBackward(selectedOnly?: SelectedOnly): AsyncGenerator<VirtualViewEntryData>;
|
|
140
|
-
/**
|
|
141
|
-
* Move to next selected entry
|
|
142
|
-
*/
|
|
143
|
-
gotoNextSelected(): boolean;
|
|
144
|
-
/**
|
|
145
|
-
* Move to previous selected entry
|
|
146
|
-
*/
|
|
147
|
-
gotoPrevSelected(): boolean;
|
|
148
|
-
private isVisible;
|
|
149
|
-
/**
|
|
150
|
-
* Select an entry
|
|
151
|
-
*/
|
|
36
|
+
/** Restrict navigation to the subtree of `newRoot`. */
|
|
37
|
+
setRoot(newRoot: ViewEntry): this;
|
|
38
|
+
getCurrentEntry(): Promise<ViewEntry | null>;
|
|
39
|
+
gotoFirst(): Promise<boolean>;
|
|
40
|
+
gotoLast(): Promise<boolean>;
|
|
41
|
+
gotoNext(): Promise<boolean>;
|
|
42
|
+
gotoPrev(): Promise<boolean>;
|
|
43
|
+
gotoNextSibling(): Promise<boolean>;
|
|
44
|
+
gotoPrevSibling(): Promise<boolean>;
|
|
45
|
+
gotoParent(): Promise<boolean>;
|
|
46
|
+
gotoFirstChild(): Promise<boolean>;
|
|
47
|
+
gotoLastChild(): Promise<boolean>;
|
|
48
|
+
gotoNextSelected(): Promise<boolean>;
|
|
49
|
+
gotoPrevSelected(): Promise<boolean>;
|
|
50
|
+
/** Move to a position such as "1.2.3". */
|
|
51
|
+
gotoPos(posStr: string): Promise<boolean>;
|
|
52
|
+
gotoPosArray(pos: number[]): Promise<boolean>;
|
|
53
|
+
/** The entry at a position, without moving the cursor. */
|
|
54
|
+
getPos(posStr: string): Promise<ViewEntry | null>;
|
|
55
|
+
getPosArray(pos: number[]): Promise<ViewEntry | null>;
|
|
56
|
+
/** A category by its path ("Category1\\Category1.1"). */
|
|
57
|
+
findCategoryEntry(category: string): Promise<ViewEntry | null>;
|
|
58
|
+
findCategoryEntryByParts(categoryParts: unknown[]): Promise<ViewEntry | null>;
|
|
59
|
+
/**
|
|
60
|
+
* Moves the cursor up to `count` times and returns the entries it passed:
|
|
61
|
+
* a page, in one call (a view in SQLite reads it in one query).
|
|
62
|
+
*/
|
|
63
|
+
readEntries(options: ReadEntriesOptions): Promise<ViewEntry[]>;
|
|
64
|
+
entriesForward(selectedOnly?: SelectedOnly): AsyncGenerator<ViewEntry>;
|
|
65
|
+
entriesForwardFromPosition(startPos: string, selectedOnly?: SelectedOnly): AsyncGenerator<ViewEntry>;
|
|
66
|
+
entriesBackward(selectedOnly?: SelectedOnly): AsyncGenerator<ViewEntry>;
|
|
152
67
|
select(origin: string, docId: string, selectParentCategories?: boolean): this;
|
|
153
|
-
/**
|
|
154
|
-
* Deselect an entry
|
|
155
|
-
*/
|
|
156
68
|
deselect(origin: string, docId: string): this;
|
|
157
|
-
/**
|
|
158
|
-
* Select all entries
|
|
159
|
-
*/
|
|
160
69
|
selectAllEntries(): this;
|
|
161
|
-
/**
|
|
162
|
-
* Deselect all entries
|
|
163
|
-
*/
|
|
164
70
|
deselectAllEntries(): this;
|
|
165
|
-
/**
|
|
166
|
-
* Check if an entry is selected
|
|
167
|
-
*/
|
|
168
71
|
isSelected(origin: string, docId: string): boolean;
|
|
169
72
|
isSelectAllByDefault(): boolean;
|
|
170
|
-
/**
|
|
171
|
-
* Returns whether all entries are deselected by default
|
|
172
|
-
*/
|
|
173
73
|
isDeselectAllByDefault(): boolean;
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
*/
|
|
74
|
+
getSelectedOrDeselectedEntries(): Set<string>;
|
|
75
|
+
setSelectedOrDeselectedEntries(entries: Set<string>): this;
|
|
177
76
|
expand(origin: string, docId: string): this;
|
|
178
|
-
/**
|
|
179
|
-
* Collapse an entry
|
|
180
|
-
*/
|
|
181
77
|
collapse(origin: string, docId: string): this;
|
|
182
|
-
/**
|
|
183
|
-
* Expand by position string
|
|
184
|
-
*/
|
|
185
78
|
expandPos(posStr: string): this;
|
|
186
|
-
/**
|
|
187
|
-
* Collapse by position string
|
|
188
|
-
*/
|
|
189
79
|
collapsePos(posStr: string): this;
|
|
190
|
-
/**
|
|
191
|
-
* Expand by position array
|
|
192
|
-
*
|
|
193
|
-
* @param pos Position array e.g. [1, 2, 3]
|
|
194
|
-
*/
|
|
195
80
|
expandPosArray(pos: number[]): this;
|
|
196
|
-
/**
|
|
197
|
-
* Collapse by position array
|
|
198
|
-
*
|
|
199
|
-
* @param pos Position array e.g. [1, 2, 3]
|
|
200
|
-
*/
|
|
201
81
|
collapsePosArray(pos: number[]): this;
|
|
202
|
-
private getEntryAtPos;
|
|
203
|
-
/**
|
|
204
|
-
* Collapse all entries
|
|
205
|
-
*/
|
|
206
82
|
collapseAll(): this;
|
|
207
|
-
/**
|
|
208
|
-
* Expand all entries
|
|
209
|
-
*/
|
|
210
83
|
expandAll(): this;
|
|
211
|
-
/**
|
|
212
|
-
* Expand entries up to a specific level
|
|
213
|
-
*/
|
|
214
84
|
expandToLevel(level: number): this;
|
|
215
|
-
/**
|
|
216
|
-
|
|
217
|
-
*/
|
|
218
|
-
isExpanded(entry: VirtualViewEntryData): boolean;
|
|
219
|
-
/**
|
|
220
|
-
* Check if an entry is expanded by origin and docId
|
|
221
|
-
* Does not check expandLevel - only checks the expand/collapse state
|
|
222
|
-
*
|
|
223
|
-
* @param origin Origin of the entry
|
|
224
|
-
* @param docId Document ID of the entry
|
|
225
|
-
* @returns true if expanded
|
|
226
|
-
*/
|
|
85
|
+
/** Whether an entry is expanded (by level or by its state). */
|
|
86
|
+
isExpanded(entry: ViewEntry): boolean;
|
|
227
87
|
isExpandedByDocId(origin: string, docId: string): boolean;
|
|
228
88
|
isExpandAllByDefault(): boolean;
|
|
229
89
|
isCollapseAllByDefault(): boolean;
|
|
230
90
|
getExpandLevel(): number;
|
|
231
|
-
getSelectedOrDeselectedEntries(): Set<string>;
|
|
232
|
-
setSelectedOrDeselectedEntries(entries: Set<string>): this;
|
|
233
91
|
getExpandedOrCollapsedEntries(): Set<string>;
|
|
234
92
|
setExpandedOrCollapsedEntries(entries: Set<string>): this;
|
|
235
|
-
/**
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
*
|
|
250
|
-
* @param entry Parent entry
|
|
251
|
-
* @param startKey Start key value
|
|
252
|
-
* @param endKey End key value
|
|
253
|
-
* @param descending Whether to return in descending order
|
|
254
|
-
* @returns Filtered child documents within the range
|
|
255
|
-
*/
|
|
256
|
-
childDocumentsBetween(entry: VirtualViewEntryData, startKey: unknown, endKey: unknown, descending?: boolean): VirtualViewEntryData[];
|
|
257
|
-
/**
|
|
258
|
-
* Get child documents by key (exact or prefix match)
|
|
259
|
-
*
|
|
260
|
-
* @param entry Parent entry
|
|
261
|
-
* @param key Key value to search for
|
|
262
|
-
* @param isExact Whether to match exactly or by prefix
|
|
263
|
-
* @param descending Whether to return in descending order
|
|
264
|
-
* @returns Matching child documents
|
|
265
|
-
*/
|
|
266
|
-
childDocumentsByKey(entry: VirtualViewEntryData, key: string, isExact: boolean, descending?: boolean): VirtualViewEntryData[];
|
|
267
|
-
/**
|
|
268
|
-
* Get child categories within a key range (inclusive)
|
|
269
|
-
*
|
|
270
|
-
* @param entry Parent entry
|
|
271
|
-
* @param startKey Start key value
|
|
272
|
-
* @param endKey End key value
|
|
273
|
-
* @param descending Whether to return in descending order
|
|
274
|
-
* @returns Filtered child categories within the range
|
|
275
|
-
*/
|
|
276
|
-
childCategoriesBetween(entry: VirtualViewEntryData, startKey: unknown, endKey: unknown, descending?: boolean): VirtualViewEntryData[];
|
|
277
|
-
/**
|
|
278
|
-
* Get child categories by key (exact or prefix match)
|
|
279
|
-
*
|
|
280
|
-
* @param entry Parent entry
|
|
281
|
-
* @param key Key value to search for
|
|
282
|
-
* @param isExact Whether to match exactly or by prefix
|
|
283
|
-
* @param descending Whether to return in descending order
|
|
284
|
-
* @returns Matching child categories
|
|
285
|
-
*/
|
|
286
|
-
childCategoriesByKey(entry: VirtualViewEntryData, key: string, isExact: boolean, descending?: boolean): VirtualViewEntryData[];
|
|
287
|
-
/**
|
|
288
|
-
* Compare two position arrays for sorting
|
|
289
|
-
*/
|
|
290
|
-
private static comparePositions;
|
|
291
|
-
/** Sort entries by tree position, computing each position once. */
|
|
292
|
-
private static sortByPosition;
|
|
293
|
-
/**
|
|
294
|
-
* Get all occurrences of a document in the view, sorted by position
|
|
295
|
-
*
|
|
296
|
-
* @param origin Origin of the document
|
|
297
|
-
* @param docId Document ID
|
|
298
|
-
* @returns Array of entries sorted by position
|
|
299
|
-
*/
|
|
300
|
-
getSortedEntries(origin: string, docId: string): VirtualViewEntryData[];
|
|
301
|
-
/**
|
|
302
|
-
* Get all occurrences of multiple documents in the view, sorted by position
|
|
303
|
-
*
|
|
304
|
-
* @param origin Origin of the documents
|
|
305
|
-
* @param docIds Set of document IDs
|
|
306
|
-
* @returns Array of entries sorted by position
|
|
307
|
-
*/
|
|
308
|
-
getSortedEntriesMultiple(origin: string, docIds: Set<string>): VirtualViewEntryData[];
|
|
309
|
-
/**
|
|
310
|
-
* Get all occurrences of scoped document IDs in the view, sorted by position
|
|
311
|
-
*
|
|
312
|
-
* @param scopedDocIds Set of scoped document IDs (origin + docId)
|
|
313
|
-
* @returns Array of entries sorted by position
|
|
314
|
-
*/
|
|
315
|
-
getSortedEntriesScoped(scopedDocIds: Set<ScopedDocId>): VirtualViewEntryData[];
|
|
316
|
-
/**
|
|
317
|
-
* Get document IDs sorted by their position in the view
|
|
318
|
-
*
|
|
319
|
-
* @param origin Origin of the documents
|
|
320
|
-
* @param docIds Set of document IDs
|
|
321
|
-
* @returns Array of document IDs sorted by their position in the view
|
|
322
|
-
*/
|
|
323
|
-
getSortedDocIds(origin: string, docIds: Set<string>): string[];
|
|
324
|
-
/**
|
|
325
|
-
* Get scoped document IDs sorted by their position in the view
|
|
326
|
-
*
|
|
327
|
-
* @param scopedDocIds Set of scoped document IDs
|
|
328
|
-
* @returns Array of scoped document IDs sorted by their position in the view
|
|
329
|
-
*/
|
|
330
|
-
getSortedDocIdsScoped(scopedDocIds: Set<ScopedDocId>): ScopedDocId[];
|
|
93
|
+
/** Children of an entry; `null` for the top level. */
|
|
94
|
+
childEntries(entry: ViewEntry | null, descending?: boolean): Promise<ViewEntry[]>;
|
|
95
|
+
childDocuments(entry: ViewEntry | null, descending?: boolean): Promise<ViewEntry[]>;
|
|
96
|
+
childCategories(entry: ViewEntry | null, descending?: boolean): Promise<ViewEntry[]>;
|
|
97
|
+
childDocumentsBetween(entry: ViewEntry | null, startKey: unknown, endKey: unknown, descending?: boolean): Promise<ViewEntry[]>;
|
|
98
|
+
childDocumentsByKey(entry: ViewEntry | null, key: string, isExact: boolean, descending?: boolean): Promise<ViewEntry[]>;
|
|
99
|
+
childCategoriesBetween(entry: ViewEntry | null, startKey: unknown, endKey: unknown, descending?: boolean): Promise<ViewEntry[]>;
|
|
100
|
+
childCategoriesByKey(entry: ViewEntry | null, key: string, isExact: boolean, descending?: boolean): Promise<ViewEntry[]>;
|
|
101
|
+
private parentNode;
|
|
102
|
+
getSortedEntries(origin: string, docId: string): Promise<ViewEntry[]>;
|
|
103
|
+
getSortedEntriesMultiple(origin: string, docIds: Set<string>): Promise<ViewEntry[]>;
|
|
104
|
+
getSortedEntriesScoped(scopedDocIds: Set<ScopedDocId>): Promise<ViewEntry[]>;
|
|
105
|
+
getSortedDocIds(origin: string, docIds: Set<string>): Promise<string[]>;
|
|
106
|
+
getSortedDocIdsScoped(scopedDocIds: Set<ScopedDocId>): Promise<ScopedDocId[]>;
|
|
331
107
|
}
|
|
332
108
|
//# sourceMappingURL=VirtualViewNavigator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VirtualViewNavigator.d.ts","sourceRoot":"","sources":["../../../../src/core/indexing/virtualviews/VirtualViewNavigator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,
|
|
1
|
+
{"version":3,"file":"VirtualViewNavigator.d.ts","sourceRoot":"","sources":["../../../../src/core/indexing/virtualviews/VirtualViewNavigator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,OAAO,EAAE,YAAY,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