adminizer 4.5.0-build.198 → 4.5.0-build.199
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.
|
@@ -12,6 +12,7 @@ export declare class StorageService {
|
|
|
12
12
|
protected id: string;
|
|
13
13
|
protected model: string;
|
|
14
14
|
protected readonly adminizer: Adminizer;
|
|
15
|
+
readonly ready: Promise<void>;
|
|
15
16
|
constructor(adminizer: Adminizer, id: string, model: string);
|
|
16
17
|
initModel(): Promise<void>;
|
|
17
18
|
getId(): string;
|
|
@@ -32,6 +33,8 @@ export declare class StorageServices {
|
|
|
32
33
|
add(storage: StorageService): void;
|
|
33
34
|
get(id: string): StorageService;
|
|
34
35
|
getAll(): StorageService[];
|
|
36
|
+
/** Resolves when all sections have finished loading from the database */
|
|
37
|
+
ready(): Promise<void>;
|
|
35
38
|
}
|
|
36
39
|
export declare class Navigation extends AbstractCatalog {
|
|
37
40
|
readonly name: string;
|
|
@@ -6,11 +6,12 @@ export class StorageService {
|
|
|
6
6
|
id;
|
|
7
7
|
model;
|
|
8
8
|
adminizer;
|
|
9
|
+
ready;
|
|
9
10
|
constructor(adminizer, id, model) {
|
|
10
11
|
this.adminizer = adminizer;
|
|
11
12
|
this.id = id;
|
|
12
13
|
this.model = model.toLowerCase();
|
|
13
|
-
this.initModel();
|
|
14
|
+
this.ready = this.initModel();
|
|
14
15
|
}
|
|
15
16
|
async initModel() {
|
|
16
17
|
// Direct call by model adapter
|
|
@@ -152,6 +153,10 @@ export class StorageServices {
|
|
|
152
153
|
getAll() {
|
|
153
154
|
return this.storages;
|
|
154
155
|
}
|
|
156
|
+
/** Resolves when all sections have finished loading from the database */
|
|
157
|
+
async ready() {
|
|
158
|
+
await Promise.all(this.storages.map(s => s.ready));
|
|
159
|
+
}
|
|
155
160
|
}
|
|
156
161
|
export class Navigation extends AbstractCatalog {
|
|
157
162
|
name = 'Navigation';
|