@processpuzzle/base-app 0.2.1 → 0.4.0
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/README.md +15 -3
- package/assets/i18n/base_app/de.json +227 -10
- package/assets/i18n/base_app/en.json +227 -10
- package/assets/i18n/base_app/es.json +227 -10
- package/assets/i18n/base_app/fr.json +227 -10
- package/assets/i18n/base_app/hu.json +227 -10
- package/assets/images/demo-logo.svg +101 -0
- package/fesm2022/processpuzzle-base-app.mjs +4391 -2171
- package/fesm2022/processpuzzle-base-app.mjs.map +1 -1
- package/package.json +4 -4
- package/types/processpuzzle-base-app.d.ts +1408 -740
- package/types/processpuzzle-base-app.d.ts.map +1 -1
- package/theme/pp-material-themes.scss +0 -81
|
@@ -1,18 +1,73 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
import { BaseEntity, BaseEntityDescriptor, BaseEntityFacade, BaseEntityFacadeRegistry, BaseEntityMapper, BaseEntityRestService, BaseFormControlComponent, BaseFormHostDirective, EmbeddedChildRoute, EmbeddedEntityFacade, EntityTabDescriptor, PersistedEntity, Selectable, SelectablesInput, WorkingContextAggregate, WorkingContextDefinition, WorkingContextPersistence } from "@processpuzzle/base-entity";
|
|
2
|
+
import { ModuleAssetContext, SidenavControl, ThemeColorScheme, ThemePreset, WIDGET_PLACEMENTS, WidgetInstance, WidgetInstance as WidgetInstance$1, WidgetPlacement, WidgetRegistration } from "@processpuzzle/widgets";
|
|
3
|
+
import { Observable } from "rxjs";
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
import { OnDestroy, OnInit, Provider, Type } from "@angular/core";
|
|
6
|
+
import { LayoutService, TranslationSource } from "@processpuzzle/util";
|
|
7
|
+
import { CanMatchFn, Route, Routes } from "@angular/router";
|
|
8
|
+
import { Translation } from "@jsverse/transloco";
|
|
9
|
+
/**
|
|
10
|
+
* Frontend model of the `ModuleDefinition` schema of `base-app-api.yaml`: a lazily-loadable slice of an
|
|
11
|
+
* application, with its own flat route list and its own transloco scope. An {@link ModuleMount} of an
|
|
12
|
+
* `AppDefinition` names one of these by key and mounts its routes under a base path.
|
|
13
|
+
*
|
|
14
|
+
* **What "lazy" honestly means.** A module lazy-loads *metadata* — this definition, its routes, its
|
|
15
|
+
* translations, and the documents and descriptors they name. It does **not** lazy-load widget code:
|
|
16
|
+
* widget components are bundled at compile time and resolved through the frontend registry, so a
|
|
17
|
+
* metadata module cannot split a bundle on its own. The wins are that `AppDefinition` stops being one
|
|
18
|
+
* aggregate that has to be loaded, locked and published atomically, and that a module is the unit of
|
|
19
|
+
* authoring permission and versioning. Nothing here should be justified on bundle size.
|
|
20
|
+
*
|
|
21
|
+
* Unlike the region / route / mount classes this one is a **routable** entity: it has endpoints of its
|
|
22
|
+
* own, so it comes with a service, a store and a facade rather than travelling inside another payload.
|
|
23
|
+
*/
|
|
24
|
+
export declare class ModuleDefinition implements BaseEntity {
|
|
25
|
+
/**
|
|
26
|
+
* The contract calls this field `key`; base-entity keys every store, URL and reference on `id`, so
|
|
27
|
+
* {@link ModuleDefinitionMapper} renames it on the way in and out rather than teaching the framework a
|
|
28
|
+
* second identity field. One name for one thing on this side of the mapper — a `key` property beside
|
|
29
|
+
* `id` could only ever disagree with it.
|
|
30
|
+
*
|
|
31
|
+
* Immutable by contract: `ModuleMount.moduleKey` resolves against it, and a rename would silently
|
|
32
|
+
* unmount the module from every app that mounts it.
|
|
33
|
+
*/
|
|
34
|
+
id: string;
|
|
35
|
+
name: string;
|
|
36
|
+
translocoId: string | undefined;
|
|
37
|
+
description: string | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* Transloco scope the module's translations load under. Absent means {@link id}, which is the default
|
|
40
|
+
* the contract states; {@link moduleTranslocoScope} is the one place that default is applied.
|
|
41
|
+
*/
|
|
42
|
+
translocoScope: string | undefined;
|
|
43
|
+
/**
|
|
44
|
+
* The module's routes, flat and relative to the base path it is mounted at — the same shape and the
|
|
45
|
+
* same derived nesting as `AppDefinition.routes`, and flattened by the same mapper. A module does not
|
|
46
|
+
* mount modules: this is where composition stops.
|
|
47
|
+
*/
|
|
48
|
+
routes: RouteDefinition[] | undefined;
|
|
49
|
+
orgKey: string | undefined;
|
|
50
|
+
version: number | undefined;
|
|
51
|
+
createdAt: string | undefined;
|
|
52
|
+
updatedAt: string | undefined;
|
|
53
|
+
constructor(init?: Partial<ModuleDefinition>);
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* The scope a module's translations load under, applying the contract's default: the module key with its dashes
|
|
57
|
+
* written as underscores (`conduct-race` is `conduct_race`), because transloco keys use underscores and the scope is
|
|
58
|
+
* the first segment of every key a widget names for the module. The backend derives the same default
|
|
59
|
+
* (`ModuleDefinition.getTranslocoScope`). Kept as a function
|
|
60
|
+
* rather than resolved in the mapper, so a definition never carries a `translocoScope` the designer did
|
|
61
|
+
* not author — the field stays empty in the form, and the fallback is a rendering decision.
|
|
62
|
+
*/
|
|
63
|
+
export declare function moduleTranslocoScope(definition: ModuleDefinition): string;
|
|
64
|
+
/**
|
|
65
|
+
* The transloco key a module's route title is translated under: the authored `translocoId`, else one derived
|
|
66
|
+
* from the scope and the path — `<scope>.route.<path>`. A designer therefore never has to type a key for a
|
|
67
|
+
* module to be translatable; the backend derives the same key when it prepares the translation files
|
|
68
|
+
* (`ModuleTranslationKeys`), and the two have to agree.
|
|
69
|
+
*/
|
|
70
|
+
export declare function moduleRouteTranslocoId(scope: string, route: RouteDefinition): string;
|
|
16
71
|
/**
|
|
17
72
|
* Frontend model of the `AppDefinition` schema of `base-app-api.yaml`. `theme` and `layout` are
|
|
18
73
|
* flattened onto the entity by {@link AppDefinitionMapper} so that the generated form can offer a
|
|
@@ -33,101 +88,112 @@ import * as _processpuzzle_base_app from '@processpuzzle/base-app';
|
|
|
33
88
|
* needs a constructor. They stay plain data — the rows of a loaded aggregate are the parsed JSON,
|
|
34
89
|
* never instances of these classes, so nothing may rely on `instanceof` or on a method.
|
|
35
90
|
*/
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
91
|
+
/**
|
|
92
|
+
* The theme presets and colour schemes the contract's `MaterialTheme` / `ColorScheme` enums allow. They are
|
|
93
|
+
* the widgets library's lists, because that is where the stylesheet defining them and the `ThemesButton`
|
|
94
|
+
* picking from them live.
|
|
95
|
+
*/
|
|
96
|
+
export declare const MATERIAL_THEMES: readonly ["processpuzzle", "azure-blue", "rose-red", "magenta-violet", "cyan-orange", "indigo-pink", "deeppurple-amber", "pink-bluegrey", "purple-green"];
|
|
97
|
+
type MaterialTheme = ThemePreset;
|
|
98
|
+
export declare const COLOR_SCHEMES: readonly ["light", "dark", "auto"];
|
|
99
|
+
type ColorScheme = ThemeColorScheme;
|
|
100
|
+
export declare const LAYOUT_PRESETS: readonly ["sidenav-left", "sidenav-right", "top-nav"];
|
|
41
101
|
type LayoutPreset = (typeof LAYOUT_PRESETS)[number];
|
|
42
|
-
declare const SIDENAV_MODES: readonly ["side", "over", "push"];
|
|
102
|
+
export declare const SIDENAV_MODES: readonly ["side", "over", "push"];
|
|
43
103
|
type SidenavMode = (typeof SIDENAV_MODES)[number];
|
|
44
104
|
/**
|
|
105
|
+
* `statusbar` carries neither `navItems` nor `widgets`: the shell fills it with the active working contexts.
|
|
106
|
+
*
|
|
45
107
|
* No `content`: once routes own the content area it *is* the router outlet, so a content region would
|
|
46
108
|
* have no field of its own — `widgets` is header/footer-only and `navItems` sidenav-only. Its sizing
|
|
47
109
|
* lives in {@link LayoutDefinition.contentMaxWidth}.
|
|
48
110
|
*/
|
|
49
|
-
declare const REGION_TYPES: readonly ["header", "sidenav", "footer"];
|
|
111
|
+
export declare const REGION_TYPES: readonly ["header", "sidenav", "footer", "statusbar"];
|
|
50
112
|
type RegionType = (typeof REGION_TYPES)[number];
|
|
51
113
|
/**
|
|
52
114
|
* What a route renders. Uppercase because the contract's enum is — `RegionType` and the theme enums
|
|
53
115
|
* are lowercase, and mixing the two up is a silent miss rather than a type error once a value reaches
|
|
54
116
|
* JSON.
|
|
55
117
|
*/
|
|
56
|
-
declare const ROUTE_TARGET_KINDS: readonly ["WIDGETS", "DOCUMENT", "ENTITY"];
|
|
118
|
+
export declare const ROUTE_TARGET_KINDS: readonly ["WIDGETS", "DOCUMENT", "ENTITY"];
|
|
57
119
|
type RouteTargetKind = (typeof ROUTE_TARGET_KINDS)[number];
|
|
58
|
-
declare const ENTITY_MODES: readonly ["LIST", "DETAILS"];
|
|
120
|
+
export declare const ENTITY_MODES: readonly ["LIST", "DETAILS"];
|
|
59
121
|
type EntityMode = (typeof ENTITY_MODES)[number];
|
|
60
|
-
declare enum AppDefinitionStatus {
|
|
61
|
-
|
|
62
|
-
|
|
122
|
+
export declare enum AppDefinitionStatus {
|
|
123
|
+
DRAFT = "DRAFT",
|
|
124
|
+
PUBLISHED = "PUBLISHED"
|
|
63
125
|
}
|
|
64
126
|
interface ThemeDefinition {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
127
|
+
materialTheme?: MaterialTheme;
|
|
128
|
+
colorScheme?: ColorScheme;
|
|
129
|
+
/** Overrides for the `--pp-*` custom properties of `base-widget-frontend/src/theme/pp-colors.css`. */
|
|
130
|
+
tokenOverrides?: Record<string, string>;
|
|
131
|
+
logoUrl?: string;
|
|
132
|
+
faviconUrl?: string;
|
|
71
133
|
}
|
|
72
134
|
interface LayoutDefinition {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
}
|
|
79
|
-
declare class NavItem implements BaseEntity {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
}
|
|
96
|
-
declare class RegionDefinition implements BaseEntity {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
135
|
+
preset?: LayoutPreset;
|
|
136
|
+
sidenavMode?: SidenavMode;
|
|
137
|
+
sidenavCollapsible?: boolean;
|
|
138
|
+
sidenavOpenByDefault?: boolean;
|
|
139
|
+
contentMaxWidth?: string;
|
|
140
|
+
}
|
|
141
|
+
export declare class NavItem implements BaseEntity {
|
|
142
|
+
id: string;
|
|
143
|
+
label: string;
|
|
144
|
+
translocoId?: string;
|
|
145
|
+
icon?: string;
|
|
146
|
+
/**
|
|
147
|
+
* `RouteDefinition.path` of the route this entry navigates to, resolved by string. Absent on a group
|
|
148
|
+
* node, which expands its {@link children} instead of navigating.
|
|
149
|
+
*
|
|
150
|
+
* A path naming no route is a validation *warning* server-side, not an error: it may name a route of
|
|
151
|
+
* a module that has not been authored yet, and modules stay loosely coupled.
|
|
152
|
+
*/
|
|
153
|
+
routePath?: string;
|
|
154
|
+
roles?: string[];
|
|
155
|
+
children?: NavItem[];
|
|
156
|
+
constructor(init?: Partial<NavItem>);
|
|
157
|
+
}
|
|
158
|
+
export declare class RegionDefinition implements BaseEntity {
|
|
159
|
+
/**
|
|
160
|
+
* Declared, never assigned. The contract gives a region no `id` — `type` identifies it, see
|
|
161
|
+
* `APP_REGION_ID_FIELD` — but `BaseEntity`'s only property is an optional `id`, and TypeScript's
|
|
162
|
+
* weak-type rule rejects a type that shares no property with it. `declare` emits nothing, so the
|
|
163
|
+
* payload stays exactly the shape the schema describes.
|
|
164
|
+
*/
|
|
165
|
+
readonly id?: string;
|
|
166
|
+
/**
|
|
167
|
+
* Required by the contract, but undefined while a region is being created — the dropdown is declared
|
|
168
|
+
* `required`, so the form is what enforces the contract before the row reaches the payload.
|
|
169
|
+
*/
|
|
170
|
+
type: RegionType | undefined;
|
|
171
|
+
/** `sidenav` only; left undefined so a header region's payload carries no empty nav tree. */
|
|
172
|
+
navItems?: NavItem[];
|
|
173
|
+
/** `header` / `footer` only. */
|
|
174
|
+
widgets?: WidgetInstance$1[];
|
|
175
|
+
constructor(init?: Partial<RegionDefinition>);
|
|
114
176
|
}
|
|
115
177
|
/**
|
|
116
178
|
* The nested `target` object of the DTO. Only {@link AppDefinitionMapper} handles it — the form works
|
|
117
179
|
* on the fields {@link RouteDefinition} carries flattened — so it is an interface rather than a class.
|
|
118
180
|
*/
|
|
119
181
|
interface RouteTarget {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
182
|
+
kind: RouteTargetKind;
|
|
183
|
+
/** WIDGETS only. */
|
|
184
|
+
widgets?: WidgetInstance$1[];
|
|
185
|
+
/** DOCUMENT only. */
|
|
186
|
+
documentSlug?: string;
|
|
187
|
+
/** ENTITY only. */
|
|
188
|
+
entityName?: string;
|
|
189
|
+
/** ENTITY only. */
|
|
190
|
+
entityMode?: EntityMode;
|
|
191
|
+
/** ENTITY + LIST only. */
|
|
192
|
+
rsqlFilter?: string;
|
|
193
|
+
/** ENTITY + LIST only: see {@link RouteDefinition.filterByContext}. */
|
|
194
|
+
filterByContext?: string;
|
|
195
|
+
/** ENTITY only, with `requiresContext`: see {@link RouteDefinition.contextPath}. */
|
|
196
|
+
contextPath?: string;
|
|
131
197
|
}
|
|
132
198
|
/**
|
|
133
199
|
* One navigable route. **Flat: a route has no children.** `path` may be multi-segment, so `claims`,
|
|
@@ -139,133 +205,424 @@ interface RouteTarget {
|
|
|
139
205
|
* The `target` fields are flattened onto the row and re-nested by {@link AppDefinitionMapper}; which of
|
|
140
206
|
* them are meaningful follows from {@link kind}, and the backend — not the form — is what enforces it.
|
|
141
207
|
*/
|
|
142
|
-
declare class RouteDefinition implements BaseEntity {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
208
|
+
export declare class RouteDefinition implements BaseEntity {
|
|
209
|
+
/**
|
|
210
|
+
* Declared, never assigned. The contract gives a route no `id`: `path` identifies it, which is what
|
|
211
|
+
* a `NavItem.routePath` resolves against. Same reason as {@link RegionDefinition.id}.
|
|
212
|
+
*/
|
|
213
|
+
readonly id?: string;
|
|
214
|
+
/** Relative to the app root, no leading slash. May contain `/` for depth and `:name` for a parameter. */
|
|
215
|
+
path: string;
|
|
216
|
+
title: string;
|
|
217
|
+
translocoId?: string;
|
|
218
|
+
icon?: string;
|
|
219
|
+
/** Empty or absent means any authenticated member of the organization, as on {@link NavItem.roles}. */
|
|
220
|
+
roles?: string[];
|
|
221
|
+
/**
|
|
222
|
+
* Name of a {@link WorkingContextRow} the route needs. The route is then served below `ctx/<name>/<id>/` and,
|
|
223
|
+
* opened without an active entity, shows a "Select a …" empty state with the picker instead of the screen.
|
|
224
|
+
*/
|
|
225
|
+
requiresContext?: string;
|
|
226
|
+
/**
|
|
227
|
+
* Required by the contract, but undefined while a route is being created — the dropdown is declared
|
|
228
|
+
* `required`, so the form is what enforces it before the row reaches the payload.
|
|
229
|
+
*/
|
|
230
|
+
kind: RouteTargetKind | undefined;
|
|
231
|
+
/** WIDGETS only. Starts as an empty array so the embedded list has something to append to. */
|
|
232
|
+
widgets: WidgetInstance$1[];
|
|
233
|
+
documentSlug?: string;
|
|
234
|
+
entityName?: string;
|
|
235
|
+
entityMode?: EntityMode;
|
|
236
|
+
rsqlFilter?: string;
|
|
237
|
+
/**
|
|
238
|
+
* With `requiresContext` on an ENTITY route: the attribute of the context's entity whose embedded collection the
|
|
239
|
+
* route lists, `entityName` being the items' type. Adding, editing and removing an item then acts on the **active**
|
|
240
|
+
* entity of the context — no selection, and no form of the whole entity.
|
|
241
|
+
*/
|
|
242
|
+
contextPath?: string;
|
|
243
|
+
/**
|
|
244
|
+
* ENTITY + LIST: the working context the list may be narrowed to. The route does not require the context — an optional
|
|
245
|
+
* view, shown with a toggle "only the active …" that filters the list by `<context name> == <active id>` while it is on.
|
|
246
|
+
*/
|
|
247
|
+
filterByContext?: string;
|
|
248
|
+
/** The object the flattened fields came from, preserved so a save cannot drop a future field. */
|
|
249
|
+
target?: RouteTarget;
|
|
250
|
+
constructor(init?: Partial<RouteDefinition>);
|
|
251
|
+
}
|
|
252
|
+
/**
|
|
253
|
+
* One working context of the app, as the form edits it: `picker` and `display` flattened onto the row, because a
|
|
254
|
+
* descriptor addresses one property rather than a path, and `confirmSwitchWhen` reduced to the one condition the
|
|
255
|
+
* form offers — the states that make leaving the entity ask first. {@link source} keeps the object the row came
|
|
256
|
+
* from, so a save cannot drop what no control writes.
|
|
257
|
+
*
|
|
258
|
+
* A class rather than an interface for the reason {@link NavItem} is one: the `Add` action mints a blank row.
|
|
259
|
+
*/
|
|
260
|
+
declare class WorkingContextRow implements BaseEntity {
|
|
261
|
+
/** The contract gives a context no `id`: `name` identifies it, as `moduleKey` does a mount. */
|
|
262
|
+
readonly id?: string;
|
|
263
|
+
name: string;
|
|
264
|
+
entityName: string;
|
|
265
|
+
parent?: string;
|
|
266
|
+
basePath?: string;
|
|
267
|
+
persist?: WorkingContextPersistence;
|
|
268
|
+
pickerSearchFields?: string[];
|
|
269
|
+
pickerRecent?: number;
|
|
270
|
+
displayLabel?: string;
|
|
271
|
+
displayBadge?: string;
|
|
272
|
+
displayExtra?: string;
|
|
273
|
+
confirmSwitchStates?: string[];
|
|
274
|
+
source?: WorkingContextDefinition;
|
|
275
|
+
constructor(init?: Partial<WorkingContextRow>);
|
|
169
276
|
}
|
|
170
277
|
/**
|
|
171
278
|
* Mounts a module's routes under {@link basePath}. The one place route structure composes, and it
|
|
172
279
|
* composes exactly one level deep: a module cannot mount modules.
|
|
173
280
|
*/
|
|
174
|
-
declare class ModuleMount implements BaseEntity {
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
}
|
|
185
|
-
declare class AppDefinition implements BaseEntity {
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
281
|
+
export declare class ModuleMount implements BaseEntity {
|
|
282
|
+
/** `moduleKey` identifies the mount; the contract gives it no `id`. */
|
|
283
|
+
readonly id?: string;
|
|
284
|
+
/**
|
|
285
|
+
* Key of a `ModuleDefinition` in this organization. One naming no existing module is a validation
|
|
286
|
+
* warning, not an error — an app may mount a module before it has been authored.
|
|
287
|
+
*/
|
|
288
|
+
moduleKey: string;
|
|
289
|
+
basePath: string;
|
|
290
|
+
constructor(init?: Partial<ModuleMount>);
|
|
291
|
+
}
|
|
292
|
+
export declare class AppDefinition implements BaseEntity {
|
|
293
|
+
/** Unique within the organization and used verbatim as the run-time route segment. */
|
|
294
|
+
id: string;
|
|
295
|
+
name: string;
|
|
296
|
+
translocoId: string | undefined;
|
|
297
|
+
description: string | undefined;
|
|
298
|
+
materialTheme: MaterialTheme | undefined;
|
|
299
|
+
colorScheme: ColorScheme | undefined;
|
|
300
|
+
tokenOverrides: Record<string, string> | undefined;
|
|
301
|
+
logoUrl: string | undefined;
|
|
302
|
+
faviconUrl: string | undefined;
|
|
303
|
+
preset: LayoutPreset | undefined;
|
|
304
|
+
sidenavMode: SidenavMode | undefined;
|
|
305
|
+
sidenavCollapsible: boolean;
|
|
306
|
+
sidenavOpenByDefault: boolean;
|
|
307
|
+
contentMaxWidth: string | undefined;
|
|
308
|
+
/** The objects the flattened fields came from, preserved so a save cannot drop a future field. */
|
|
309
|
+
theme: ThemeDefinition | undefined;
|
|
310
|
+
layout: LayoutDefinition | undefined;
|
|
311
|
+
regions: RegionDefinition[] | undefined;
|
|
312
|
+
routes: RouteDefinition[] | undefined;
|
|
313
|
+
modules: ModuleMount[] | undefined;
|
|
314
|
+
/** Working contexts routes may require, with `picker` / `display` flattened for the form. */
|
|
315
|
+
contexts: WorkingContextRow[] | undefined;
|
|
316
|
+
/**
|
|
317
|
+
* The mounted modules themselves, as the `/layout` read carries them: the released rows with the published
|
|
318
|
+
* revision, the drafts with the draft. Read-only, never saved, and `undefined` on the designer's own read —
|
|
319
|
+
* which is how the route builder tells a layout that brought its modules from a definition that did not.
|
|
320
|
+
*/
|
|
321
|
+
mountedModules: ModuleDefinition[] | undefined;
|
|
322
|
+
orgKey: string | undefined;
|
|
323
|
+
status: AppDefinitionStatus | undefined;
|
|
324
|
+
version: number | undefined;
|
|
325
|
+
publishedVersion: number | undefined;
|
|
326
|
+
createdAt: string | undefined;
|
|
327
|
+
updatedAt: string | undefined;
|
|
328
|
+
constructor(init?: Partial<AppDefinition>);
|
|
329
|
+
}
|
|
216
330
|
/**
|
|
217
|
-
* Frontend
|
|
218
|
-
*
|
|
219
|
-
*
|
|
331
|
+
* Frontend models of the module-translation schemas of `base-app-api.yaml`. The app is not a translation
|
|
332
|
+
* editor: a user downloads the prepared files, translates off-line and uploads them again, so what the
|
|
333
|
+
* frontend knows of translations is how far each language is covered and what an upload stored.
|
|
334
|
+
*/
|
|
335
|
+
/** How much of a module one language covers; the default language is complete by definition. */
|
|
336
|
+
interface ModuleTranslationCoverage {
|
|
337
|
+
readonly locale: string;
|
|
338
|
+
readonly defaultLocale: boolean;
|
|
339
|
+
readonly keyCount: number;
|
|
340
|
+
readonly translatedCount: number;
|
|
341
|
+
readonly missingKeys: string[];
|
|
342
|
+
}
|
|
343
|
+
/** What an upload stored for one language: every key of the file, reported by how it relates to what the module authors. */
|
|
344
|
+
interface ModuleTranslationUploadLanguage {
|
|
345
|
+
readonly locale: string;
|
|
346
|
+
readonly storedKeys: number;
|
|
347
|
+
/** Keys of the file the module does not author itself — the texts its widgets name under its scope; stored like the rest. */
|
|
348
|
+
readonly additionalKeys: string[];
|
|
349
|
+
readonly missingKeys: string[];
|
|
350
|
+
/** Stored keys whose value still equals the authored text. */
|
|
351
|
+
readonly untranslatedKeys: string[];
|
|
352
|
+
}
|
|
353
|
+
interface ModuleTranslationUploadReport {
|
|
354
|
+
readonly languages: ModuleTranslationUploadLanguage[];
|
|
355
|
+
}
|
|
356
|
+
/** The stored bundle of one module, language and channel: keys relative to the module's transloco scope. */
|
|
357
|
+
type ModuleTranslationBundle = Record<string, string>;
|
|
358
|
+
/**
|
|
359
|
+
* REST access to the prepared translation files of a module, under `/organizations/{orgKey}/modules/{key}`.
|
|
360
|
+
* A service of its own rather than more methods on `ModuleDefinitionService`: those would inherit the JSON
|
|
361
|
+
* `Content-Type` header of the generic CRUD client, which is wrong for a multipart upload and a zip download.
|
|
362
|
+
*/
|
|
363
|
+
export declare class ModuleTranslationService {
|
|
364
|
+
private readonly http;
|
|
365
|
+
private readonly runtimeConfiguration;
|
|
366
|
+
/** The draft's coverage of every supported language. */
|
|
367
|
+
coverage(moduleKey: string): Observable<ModuleTranslationCoverage[]>;
|
|
368
|
+
/** The zip of one prepared `<language>.json` per supported language. */
|
|
369
|
+
download(moduleKey: string): Observable<Blob>;
|
|
370
|
+
/** Stores the translated files — the zip, or one `<language>.json` — onto the draft. */
|
|
371
|
+
upload(moduleKey: string, file: File): Observable<ModuleTranslationUploadReport>;
|
|
372
|
+
/**
|
|
373
|
+
* What the module's transloco scope loads for one language: the stored translations only, keys relative
|
|
374
|
+
* to the scope. `released` is the running application's read, `draft` the designer's.
|
|
375
|
+
*/
|
|
376
|
+
bundle(moduleKey: string, locale: string, revision: 'draft' | 'released'): Observable<ModuleTranslationBundle>;
|
|
377
|
+
private moduleUrl;
|
|
378
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ModuleTranslationService, never>;
|
|
379
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
380
|
+
}
|
|
381
|
+
/** Frontend model of `ModuleAssetInfo` in `base-app-api.yaml`, which app assets share: one file an application brings along, without its bytes. */
|
|
382
|
+
interface AppAsset {
|
|
383
|
+
/** Relative to the application, e.g. `cards/plan-race.svg`; what a widget names as `app:<path>`. */
|
|
384
|
+
readonly path: string;
|
|
385
|
+
readonly mimeType: string;
|
|
386
|
+
/** Bytes. */
|
|
387
|
+
readonly size: number;
|
|
388
|
+
/** Hex SHA-256 of the content. */
|
|
389
|
+
readonly sha256: string;
|
|
390
|
+
}
|
|
391
|
+
/**
|
|
392
|
+
* REST access to the assets of an application, under `/organizations/{orgKey}/app-definitions/{appId}/assets`. A
|
|
393
|
+
* service of its own, for the reason {@link ModuleAssetService} is: the generic CRUD client sends a JSON
|
|
394
|
+
* `Content-Type`, which is wrong for a multipart upload and for a file download.
|
|
395
|
+
*/
|
|
396
|
+
export declare class AppAssetService {
|
|
397
|
+
private readonly http;
|
|
398
|
+
private readonly runtimeConfiguration;
|
|
399
|
+
list(appId: string, revision?: 'draft' | 'released'): Observable<AppAsset[]>;
|
|
400
|
+
/** Adds the file to the application draft under `path`, replacing the asset already there; its own name when `path` is empty. */
|
|
401
|
+
upload(appId: string, file: File, path?: string): Observable<AppAsset>;
|
|
402
|
+
remove(appId: string, path: string): Observable<void>;
|
|
403
|
+
/** The bytes of one asset. Through `HttpClient`, so that the bearer token goes with it. */
|
|
404
|
+
content(appId: string, path: string, revision: 'draft' | 'released'): Observable<Blob>;
|
|
405
|
+
private assetsUrl;
|
|
406
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AppAssetService, never>;
|
|
407
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
408
|
+
}
|
|
409
|
+
/** One file an owner brings along, as the list endpoint reports it. */
|
|
410
|
+
interface OwnedAsset {
|
|
411
|
+
readonly path: string;
|
|
412
|
+
readonly mimeType: string;
|
|
413
|
+
readonly size: number;
|
|
414
|
+
readonly sha256: string;
|
|
415
|
+
}
|
|
416
|
+
/** What the Assets section needs of the service behind it: a module's or an application's. */
|
|
417
|
+
interface OwnedAssetService {
|
|
418
|
+
list(ownerKey: string): Observable<OwnedAsset[]>;
|
|
419
|
+
upload(ownerKey: string, file: File, path?: string): Observable<OwnedAsset>;
|
|
420
|
+
remove(ownerKey: string, path: string): Observable<void>;
|
|
421
|
+
}
|
|
422
|
+
/**
|
|
423
|
+
* The logic of an Assets section: the files an owner — a module or an application — brings along, listed with
|
|
424
|
+
* their path, type and size, and added one by one, never as an archive. A widget names one as `<scheme>:<path>`.
|
|
220
425
|
*
|
|
221
|
-
*
|
|
222
|
-
*
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
426
|
+
* Offered once the owner is saved, since an asset belongs to the stored draft. Each upload goes to the folder the
|
|
427
|
+
* user typed (empty: the owner's root), under the file's own name.
|
|
428
|
+
*/
|
|
429
|
+
declare abstract class AssetsControlBase<Entity extends BaseEntity> extends BaseFormControlComponent<Entity> implements OnInit {
|
|
430
|
+
/** Key root of the section's own words. */
|
|
431
|
+
protected abstract readonly scope: string;
|
|
432
|
+
/** What a widget writes before the path: `module` or `app`. */
|
|
433
|
+
protected abstract readonly scheme: string;
|
|
434
|
+
/** Prefix of the section's test ids. */
|
|
435
|
+
protected abstract readonly testIdPrefix: string;
|
|
436
|
+
protected abstract readonly service: OwnedAssetService;
|
|
437
|
+
private readonly destroyRef;
|
|
438
|
+
private readonly savedKey;
|
|
439
|
+
/** The key of the stored owner, once there is one. */
|
|
440
|
+
protected readonly ownerKey: import("@angular/core").Signal<string | undefined>;
|
|
441
|
+
protected readonly assets: import("@angular/core").WritableSignal<OwnedAsset[]>;
|
|
442
|
+
protected readonly error: import("@angular/core").WritableSignal<string | undefined>;
|
|
443
|
+
ngOnInit(): void;
|
|
444
|
+
protected sizeOf(asset: OwnedAsset): string;
|
|
445
|
+
/** Uploads each chosen file, one request apiece, into the folder typed beside the button. */
|
|
446
|
+
protected upload(ownerKey: string, input: HTMLInputElement, folder: string): void;
|
|
447
|
+
protected remove(ownerKey: string, asset: OwnedAsset): void;
|
|
448
|
+
/** Only a saved owner has a draft to hold assets; a key typed into a new form is not one. */
|
|
449
|
+
private updateKey;
|
|
450
|
+
private reload;
|
|
451
|
+
private messageOf;
|
|
452
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AssetsControlBase<any>, never>;
|
|
453
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AssetsControlBase<any>, "ng-component", never, {}, {}, never, never, true, never>;
|
|
454
|
+
}
|
|
455
|
+
/** Key root of the control's own words. */
|
|
456
|
+
export declare const APP_ASSETS_I18N_SCOPE = "base_app.app_definition.assets_panel";
|
|
457
|
+
/** The files an application brings along — the pictures of its own pages, say; a widget names one as `app:<path>`. */
|
|
458
|
+
export declare class AppAssetsControlComponent<Entity extends BaseEntity> extends AssetsControlBase<Entity> {
|
|
459
|
+
protected readonly scope = "base_app.app_definition.assets_panel";
|
|
460
|
+
protected readonly scheme = "app";
|
|
461
|
+
protected readonly testIdPrefix = "app";
|
|
462
|
+
protected readonly service: AppAssetService;
|
|
463
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AppAssetsControlComponent<any>, never>;
|
|
464
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AppAssetsControlComponent<any>, "pp-app-assets-control", never, {}, {}, never, never, true, never>;
|
|
465
|
+
}
|
|
466
|
+
/**
|
|
467
|
+
* Frontend models of the app-translation schemas of `base-app-api.yaml`. As for a module, the app is not a translation
|
|
468
|
+
* editor: a user downloads the files, translates off-line and uploads them again.
|
|
469
|
+
*/
|
|
470
|
+
/** What an upload stored for one language. */
|
|
471
|
+
interface AppTranslationUploadLanguage {
|
|
472
|
+
readonly locale: string;
|
|
473
|
+
readonly storedKeys: number;
|
|
474
|
+
}
|
|
475
|
+
interface AppTranslationUploadReport {
|
|
476
|
+
readonly languages: AppTranslationUploadLanguage[];
|
|
477
|
+
}
|
|
478
|
+
/** The stored bundle of one application, language and channel: flat keys, whatever the application's widgets name. */
|
|
479
|
+
type AppTranslationBundle = Record<string, string>;
|
|
480
|
+
/**
|
|
481
|
+
* REST access to the translation files of an application, under `/organizations/{orgKey}/app-definitions/{appId}`.
|
|
482
|
+
* A service of its own, for the reason {@link ModuleTranslationService} is: the generic CRUD client sends a JSON
|
|
483
|
+
* `Content-Type`, which is wrong for a multipart upload and a zip download.
|
|
484
|
+
*/
|
|
485
|
+
export declare class AppTranslationService {
|
|
486
|
+
private readonly http;
|
|
487
|
+
private readonly runtimeConfiguration;
|
|
488
|
+
/** The zip of one `<language>.json` per supported language, holding what the draft has stored. */
|
|
489
|
+
download(appId: string): Observable<Blob>;
|
|
490
|
+
/** Stores the translated files — the zip, or one `<language>.json` — onto the draft, replacing each language they name. */
|
|
491
|
+
upload(appId: string, file: File): Observable<AppTranslationUploadReport>;
|
|
492
|
+
/** Removes the draft bundle of one language. */
|
|
493
|
+
remove(appId: string, locale: string): Observable<void>;
|
|
494
|
+
/**
|
|
495
|
+
* The stored texts of one language, flat. `released` is the running application's read, `draft` the designer's.
|
|
496
|
+
*/
|
|
497
|
+
bundle(appId: string, locale: string, revision: 'draft' | 'released'): Observable<AppTranslationBundle>;
|
|
498
|
+
private translationsUrl;
|
|
499
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AppTranslationService, never>;
|
|
500
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
501
|
+
}
|
|
502
|
+
/** Key root of the control's own words. */
|
|
503
|
+
export declare const APP_TRANSLATIONS_I18N_SCOPE = "base_app.app_definition.translations_panel";
|
|
504
|
+
/** One language the draft holds texts for, its keys sorted so the list reads the same every time. */
|
|
505
|
+
interface StoredLanguage {
|
|
506
|
+
readonly locale: string;
|
|
507
|
+
readonly texts: Record<string, string>;
|
|
508
|
+
readonly keys: string[];
|
|
509
|
+
}
|
|
510
|
+
/**
|
|
511
|
+
* Where the user fetches and returns the texts of the application's own pages. *Download* gives one file per
|
|
512
|
+
* supported language holding what is stored (an empty one for a language nothing is stored for), the user fills them
|
|
513
|
+
* in off-line, and *Upload* takes them back. Unlike a module's, the keys are not derived from the definition: they are
|
|
514
|
+
* whatever the application's widgets name under their `translocoPrefix`, so the section shows what is stored: each
|
|
515
|
+
* language that holds texts, with its count, and — on a click — its keys and texts, read-only.
|
|
227
516
|
*
|
|
228
|
-
*
|
|
229
|
-
*
|
|
517
|
+
* There is no endpoint listing the stored languages, and none is needed: the draft bundle of a language answers an
|
|
518
|
+
* empty object when nothing is stored, so each language the application offers is read and the empty ones are left
|
|
519
|
+
* out. A failed read counts as empty — the list is a view, and Download still gives the authoritative files.
|
|
520
|
+
*
|
|
521
|
+
* Offered once the application is saved, since the texts belong to the stored draft.
|
|
230
522
|
*/
|
|
231
|
-
declare class
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
523
|
+
export declare class AppTranslationsControlComponent<Entity extends BaseEntity> extends BaseFormControlComponent<Entity> implements OnInit {
|
|
524
|
+
protected readonly scope = "base_app.app_definition.translations_panel";
|
|
525
|
+
private readonly translations;
|
|
526
|
+
private readonly transloco;
|
|
527
|
+
private readonly destroyRef;
|
|
528
|
+
private readonly savedId;
|
|
529
|
+
private reading?;
|
|
530
|
+
/** The id of the stored application, once there is one. */
|
|
531
|
+
protected readonly appId: import("@angular/core").Signal<string | undefined>;
|
|
532
|
+
protected readonly report: import("@angular/core").WritableSignal<AppTranslationUploadReport | undefined>;
|
|
533
|
+
protected readonly error: import("@angular/core").WritableSignal<string | undefined>;
|
|
534
|
+
/** The languages holding texts; `undefined` until the first read answers. */
|
|
535
|
+
protected readonly stored: import("@angular/core").WritableSignal<StoredLanguage[] | undefined>;
|
|
536
|
+
protected readonly selected: import("@angular/core").WritableSignal<string | undefined>;
|
|
537
|
+
protected readonly selectedLanguage: import("@angular/core").Signal<StoredLanguage | undefined>;
|
|
538
|
+
ngOnInit(): void;
|
|
539
|
+
protected download(appId: string): void;
|
|
540
|
+
protected upload(appId: string, input: HTMLInputElement): void;
|
|
541
|
+
/** Only a saved application has a draft to hold the texts; an id typed into a new form is not one. */
|
|
542
|
+
private updateId;
|
|
543
|
+
/** Shows a language's texts, or hides them when it is the one already shown. */
|
|
544
|
+
protected toggle(locale: string): void;
|
|
545
|
+
/** Reads the draft bundle of every offered language; a newer read replaces one still under way. */
|
|
546
|
+
private readStored;
|
|
547
|
+
private readLanguage;
|
|
548
|
+
/** The languages the application is offered in, the fallback one included, in the configured order. */
|
|
549
|
+
private languages;
|
|
550
|
+
private save;
|
|
551
|
+
private messageOf;
|
|
552
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AppTranslationsControlComponent<any>, never>;
|
|
553
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AppTranslationsControlComponent<any>, "pp-app-translations-control", never, {}, {}, never, never, true, never>;
|
|
554
|
+
}
|
|
555
|
+
/** Frontend model of `ModuleAssetInfo` in `base-app-api.yaml`: one file a module brings along, without its bytes. */
|
|
556
|
+
interface ModuleAsset {
|
|
557
|
+
/** Relative to the module, e.g. `docs/img/flow.png`; what a widget names as `module:<path>`. */
|
|
558
|
+
readonly path: string;
|
|
559
|
+
readonly mimeType: string;
|
|
560
|
+
/** Bytes. */
|
|
561
|
+
readonly size: number;
|
|
562
|
+
/** Hex SHA-256 of the content. */
|
|
563
|
+
readonly sha256: string;
|
|
564
|
+
}
|
|
565
|
+
/**
|
|
566
|
+
* REST access to the assets of a module, under `/organizations/{orgKey}/modules/{key}/assets`. A service of its
|
|
567
|
+
* own, for the reason `ModuleTranslationService` is: the generic CRUD client sends a JSON `Content-Type`, which is
|
|
568
|
+
* wrong for a multipart upload and for a file download.
|
|
266
569
|
*/
|
|
267
|
-
declare
|
|
268
|
-
|
|
570
|
+
export declare class ModuleAssetService {
|
|
571
|
+
private readonly http;
|
|
572
|
+
private readonly runtimeConfiguration;
|
|
573
|
+
list(moduleKey: string, revision?: 'draft' | 'released'): Observable<ModuleAsset[]>;
|
|
574
|
+
/** Adds the file to the module draft under `path`, replacing the asset already there; its own name when `path` is empty. */
|
|
575
|
+
upload(moduleKey: string, file: File, path?: string): Observable<ModuleAsset>;
|
|
576
|
+
remove(moduleKey: string, path: string): Observable<void>;
|
|
577
|
+
/** The bytes of one asset. Through `HttpClient`, so that the bearer token goes with it. */
|
|
578
|
+
content(moduleKey: string, path: string, revision: 'draft' | 'released'): Observable<Blob>;
|
|
579
|
+
private assetsUrl;
|
|
580
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ModuleAssetService, never>;
|
|
581
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
582
|
+
}
|
|
583
|
+
/** Key root of the control's own words. */
|
|
584
|
+
export declare const MODULE_ASSETS_I18N_SCOPE = "base_app.module_definition.assets_panel";
|
|
585
|
+
/** The files a module brings along; a widget names one as `module:<path>`, a markdown file links the others relatively. */
|
|
586
|
+
export declare class ModuleAssetsControlComponent<Entity extends BaseEntity> extends AssetsControlBase<Entity> {
|
|
587
|
+
protected readonly scope = "base_app.module_definition.assets_panel";
|
|
588
|
+
protected readonly scheme = "module";
|
|
589
|
+
protected readonly testIdPrefix = "module";
|
|
590
|
+
protected readonly service: ModuleAssetService;
|
|
591
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ModuleAssetsControlComponent<any>, never>;
|
|
592
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ModuleAssetsControlComponent<any>, "pp-module-assets-control", never, {}, {}, never, never, true, never>;
|
|
593
|
+
}
|
|
594
|
+
/** Key root of the control's own words. */
|
|
595
|
+
export declare const MODULE_TRANSLATIONS_I18N_SCOPE = "base_app.module_definition.translations_panel";
|
|
596
|
+
/**
|
|
597
|
+
* Where the user fetches and returns the module's translation files. The app is deliberately not a
|
|
598
|
+
* translation editor: *Download* prepares one file per supported language holding every translatable item
|
|
599
|
+
* of the module, the user translates them off-line, and *Upload* takes them back. What the section shows is
|
|
600
|
+
* how far each language is covered, and — after an upload — what was stored and what was not understood.
|
|
601
|
+
*
|
|
602
|
+
* Offered once the module is saved: the files are prepared from the stored draft, so for a module that has
|
|
603
|
+
* only been typed into the form there is nothing yet to prepare them from.
|
|
604
|
+
*/
|
|
605
|
+
export declare class ModuleTranslationsControlComponent<Entity extends BaseEntity> extends BaseFormControlComponent<Entity> implements OnInit {
|
|
606
|
+
protected readonly scope = "base_app.module_definition.translations_panel";
|
|
607
|
+
private readonly translations;
|
|
608
|
+
private readonly destroyRef;
|
|
609
|
+
private readonly savedKey;
|
|
610
|
+
/** The key of the stored module, once there is one. */
|
|
611
|
+
protected readonly moduleKey: import("@angular/core").Signal<string | undefined>;
|
|
612
|
+
protected readonly coverage: import("@angular/core").WritableSignal<ModuleTranslationCoverage[]>;
|
|
613
|
+
protected readonly report: import("@angular/core").WritableSignal<ModuleTranslationUploadReport | undefined>;
|
|
614
|
+
protected readonly error: import("@angular/core").WritableSignal<string | undefined>;
|
|
615
|
+
ngOnInit(): void;
|
|
616
|
+
protected download(moduleKey: string): void;
|
|
617
|
+
protected upload(moduleKey: string, input: HTMLInputElement): void;
|
|
618
|
+
/** Only a saved module has a draft to prepare the files from; a key typed into a new form is not one. */
|
|
619
|
+
private updateKey;
|
|
620
|
+
private loadCoverage;
|
|
621
|
+
private save;
|
|
622
|
+
private messageOf;
|
|
623
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ModuleTranslationsControlComponent<any>, never>;
|
|
624
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ModuleTranslationsControlComponent<any>, "pp-module-translations-control", never, {}, {}, never, never, true, never>;
|
|
625
|
+
}
|
|
269
626
|
/**
|
|
270
627
|
* Transloco scope of this library. The translations live in
|
|
271
628
|
* `libs/js-shared/base-app-frontend/src/assets/i18n/base_app/*.json` and are published with the
|
|
@@ -276,34 +633,34 @@ declare function moduleTranslocoScope(definition: ModuleDefinition): string;
|
|
|
276
633
|
* The alias is spelled out on purpose: transloco camel-cases the default alias, which would turn
|
|
277
634
|
* `base_app` into `baseApp` and silently miss every key below.
|
|
278
635
|
*/
|
|
279
|
-
declare const BASE_APP_TRANSLOCO_SCOPE = "base_app";
|
|
636
|
+
export declare const BASE_APP_TRANSLOCO_SCOPE = "base_app";
|
|
280
637
|
/** Key root of the `AppDefinition` entity name (`._self`) and of its attribute labels. */
|
|
281
|
-
declare const APP_DEFINITION_I18N_SCOPE = "base_app.app_definition";
|
|
638
|
+
export declare const APP_DEFINITION_I18N_SCOPE = "base_app.app_definition";
|
|
282
639
|
/**
|
|
283
640
|
* Label of the Preview tab. Under this library's own scope rather than `base_entity.tabs.*`: the generic
|
|
284
641
|
* tabs are List and Details, and an application preview is this feature's contribution, not the framework's.
|
|
285
642
|
* Resolved with `{ entity }` like the generic tab labels, so a translation may name the entity if it reads
|
|
286
643
|
* better that way.
|
|
287
644
|
*/
|
|
288
|
-
declare const APP_PREVIEW_I18N_KEY = "base_app.app_definition.tabs.preview";
|
|
645
|
+
export declare const APP_PREVIEW_I18N_KEY = "base_app.app_definition.tabs.preview";
|
|
289
646
|
/**
|
|
290
647
|
* Key root of the `ModuleDefinition` entity name and attribute labels. A child of this library's scope
|
|
291
648
|
* like the one above, and not to be confused with `ModuleDefinition.translocoScope`, which is a scope an
|
|
292
649
|
* *authored* module's own translations load under — see {@link moduleTranslocoScope}. These keys are the
|
|
293
650
|
* framework's labels for the authoring form; that one is the tenant's content.
|
|
294
651
|
*/
|
|
295
|
-
declare const MODULE_DEFINITION_I18N_SCOPE = "base_app.module_definition";
|
|
652
|
+
export declare const MODULE_DEFINITION_I18N_SCOPE = "base_app.module_definition";
|
|
296
653
|
/**
|
|
297
654
|
* Key roots of the nested definitions the `AppDefinition` form contains through `EMBEDDED_COMPONENTS`
|
|
298
655
|
* controls. They are children of {@link BASE_APP_TRANSLOCO_SCOPE} rather than scopes of their own,
|
|
299
656
|
* because the whole graph is edited under `BASE_APP_ROUTES` and one scope registration has to cover
|
|
300
657
|
* all of it — the embedded route branches add none.
|
|
301
658
|
*/
|
|
302
|
-
declare const APP_REGION_I18N_SCOPE = "base_app.app_region";
|
|
303
|
-
declare const APP_ROUTE_I18N_SCOPE = "base_app.app_route";
|
|
304
|
-
declare const APP_MODULE_MOUNT_I18N_SCOPE = "base_app.app_module_mount";
|
|
305
|
-
declare const APP_NAV_ITEM_I18N_SCOPE = "base_app.app_nav_item";
|
|
306
|
-
declare const APP_WIDGET_I18N_SCOPE = "base_app.app_widget";
|
|
659
|
+
export declare const APP_REGION_I18N_SCOPE = "base_app.app_region";
|
|
660
|
+
export declare const APP_ROUTE_I18N_SCOPE = "base_app.app_route";
|
|
661
|
+
export declare const APP_MODULE_MOUNT_I18N_SCOPE = "base_app.app_module_mount";
|
|
662
|
+
export declare const APP_NAV_ITEM_I18N_SCOPE = "base_app.app_nav_item";
|
|
663
|
+
export declare const APP_WIDGET_I18N_SCOPE = "base_app.app_widget";
|
|
307
664
|
/**
|
|
308
665
|
* Where this library's transloco bundles come from when the application ships without its assets.
|
|
309
666
|
*
|
|
@@ -313,8 +670,7 @@ declare const APP_WIDGET_I18N_SCOPE = "base_app.app_widget";
|
|
|
313
670
|
* host that skips that copy step. It is declared here rather than in the application because which
|
|
314
671
|
* backend owns a scope is base-app's knowledge, not its caller's.
|
|
315
672
|
*/
|
|
316
|
-
declare const BASE_APP_TRANSLATION_SOURCE: TranslationSource;
|
|
317
|
-
|
|
673
|
+
export declare const BASE_APP_TRANSLATION_SOURCE: TranslationSource;
|
|
318
674
|
/**
|
|
319
675
|
* Entity names of the app-definition graph, kept in one dependency-free module.
|
|
320
676
|
*
|
|
@@ -322,35 +678,30 @@ declare const BASE_APP_TRANSLATION_SOURCE: TranslationSource;
|
|
|
322
678
|
* aggregates `App Region`, and `App Region` names `App Definition` as its `componentParent`. Each
|
|
323
679
|
* descriptor module re-exports its own name, so importers are unaffected.
|
|
324
680
|
*/
|
|
325
|
-
declare const APP_DEFINITION_ENTITY_NAME = "App Definition";
|
|
681
|
+
export declare const APP_DEFINITION_ENTITY_NAME = "App Definition";
|
|
326
682
|
/**
|
|
327
683
|
* A second aggregate root beside `App Definition`, not a part of it — hence no `App` prefix, which in
|
|
328
684
|
* every other name here marks something the app document carries. `App Module Mount` is the row inside
|
|
329
685
|
* an app that *names* one of these.
|
|
330
686
|
*/
|
|
331
|
-
declare const MODULE_DEFINITION_ENTITY_NAME = "Module Definition";
|
|
332
|
-
declare const APP_MODULE_MOUNT_ENTITY_NAME = "App Module Mount";
|
|
333
|
-
declare const APP_NAV_ITEM_ENTITY_NAME = "App Nav Item";
|
|
334
|
-
declare const APP_REGION_ENTITY_NAME = "App Region";
|
|
335
|
-
declare const APP_ROUTE_ENTITY_NAME = "App Route";
|
|
336
|
-
declare const APP_WIDGET_ENTITY_NAME = "App Widget";
|
|
337
|
-
|
|
338
|
-
declare function createAppDefinitionDescriptor(): BaseEntityDescriptor;
|
|
339
|
-
|
|
687
|
+
export declare const MODULE_DEFINITION_ENTITY_NAME = "Module Definition";
|
|
688
|
+
export declare const APP_MODULE_MOUNT_ENTITY_NAME = "App Module Mount";
|
|
689
|
+
export declare const APP_NAV_ITEM_ENTITY_NAME = "App Nav Item";
|
|
690
|
+
export declare const APP_REGION_ENTITY_NAME = "App Region";
|
|
691
|
+
export declare const APP_ROUTE_ENTITY_NAME = "App Route";
|
|
692
|
+
export declare const APP_WIDGET_ENTITY_NAME = "App Widget";
|
|
693
|
+
export declare function createAppDefinitionDescriptor(): BaseEntityDescriptor;
|
|
340
694
|
/** `ModuleMount` has no `id` — an app mounts a given module once, so `moduleKey` identifies the row. */
|
|
341
|
-
declare const APP_MODULE_MOUNT_ID_FIELD = "moduleKey";
|
|
342
|
-
declare function createModuleMountDescriptor(): BaseEntityDescriptor;
|
|
343
|
-
|
|
344
|
-
declare function createNavItemDescriptor(): BaseEntityDescriptor;
|
|
345
|
-
|
|
695
|
+
export declare const APP_MODULE_MOUNT_ID_FIELD = "moduleKey";
|
|
696
|
+
export declare function createModuleMountDescriptor(): BaseEntityDescriptor;
|
|
697
|
+
export declare function createNavItemDescriptor(): BaseEntityDescriptor;
|
|
346
698
|
/**
|
|
347
699
|
* `RegionDefinition` has no `id` — a region is identified by the shell slot it fills, and an app
|
|
348
700
|
* declares each slot at most once. Referencing attributes therefore have to set
|
|
349
701
|
* `referenceIdField = 'type'`; see the `regions` attribute of the `AppDefinition` descriptor.
|
|
350
702
|
*/
|
|
351
|
-
declare const APP_REGION_ID_FIELD = "type";
|
|
352
|
-
declare function createRegionDefinitionDescriptor(): BaseEntityDescriptor;
|
|
353
|
-
|
|
703
|
+
export declare const APP_REGION_ID_FIELD = "type";
|
|
704
|
+
export declare function createRegionDefinitionDescriptor(): BaseEntityDescriptor;
|
|
354
705
|
/**
|
|
355
706
|
* `RouteDefinition` has no `id` — `path` identifies a route, and it is what a `NavItem.routePath`
|
|
356
707
|
* resolves against. Referencing attributes therefore have to set `referenceIdField = 'path'`; see the
|
|
@@ -361,44 +712,55 @@ declare function createRegionDefinitionDescriptor(): BaseEntityDescriptor;
|
|
|
361
712
|
* reverse proxy that normalizes `%2F` before the SPA sees it would not — worth an e2e case once
|
|
362
713
|
* multi-segment routes are authored in the testbed.
|
|
363
714
|
*/
|
|
364
|
-
declare const APP_ROUTE_ID_FIELD = "path";
|
|
365
|
-
declare function createRouteDefinitionDescriptor(): BaseEntityDescriptor;
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
715
|
+
export declare const APP_ROUTE_ID_FIELD = "path";
|
|
716
|
+
export declare function createRouteDefinitionDescriptor(): BaseEntityDescriptor;
|
|
717
|
+
/**
|
|
718
|
+
* @param widgetTypes the options of the `type` dropdown — see {@link widgetTypeSelectables}. Without them the
|
|
719
|
+
* dropdown is empty, as it should be where no widget is registered: none could render.
|
|
720
|
+
*/
|
|
721
|
+
export declare function createWidgetInstanceDescriptor(widgetTypes?: SelectablesInput): BaseEntityDescriptor;
|
|
722
|
+
/**
|
|
723
|
+
* The registered widget types as dropdown options, sorted alphabetically using the current locale. `key` and `value` are both the registry key,
|
|
724
|
+
* because the dropdown stores and displays `value` — a display name there would be saved as the type.
|
|
725
|
+
*/
|
|
726
|
+
export declare function widgetTypeSelectables(registry: ReadonlyMap<string, WidgetRegistration>): Selectable[];
|
|
727
|
+
export declare function createModuleDefinitionDescriptor(): BaseEntityDescriptor;
|
|
728
|
+
/** Lifts `picker` / `display` / `confirmSwitchWhen` onto the row, where a form control can reach them. */
|
|
729
|
+
declare function flattenWorkingContext(dto: WorkingContextDefinition): WorkingContextRow;
|
|
371
730
|
/** The `RouteDefinition` schema as it travels: `target` nested, exactly as the contract declares it. */
|
|
372
731
|
interface RouteDefinitionDto {
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
732
|
+
path?: string;
|
|
733
|
+
title?: string;
|
|
734
|
+
translocoId?: string;
|
|
735
|
+
icon?: string;
|
|
736
|
+
roles?: string[];
|
|
737
|
+
requiresContext?: string;
|
|
738
|
+
target?: RouteTarget;
|
|
739
|
+
}
|
|
381
740
|
interface AppDefinitionDto {
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
741
|
+
id?: string;
|
|
742
|
+
name?: string;
|
|
743
|
+
translocoId?: string;
|
|
744
|
+
description?: string;
|
|
745
|
+
theme?: ThemeDefinition;
|
|
746
|
+
layout?: LayoutDefinition;
|
|
747
|
+
regions?: AppDefinition['regions'];
|
|
748
|
+
routes?: RouteDefinitionDto[];
|
|
749
|
+
modules?: AppDefinition['modules'];
|
|
750
|
+
contexts?: Parameters<typeof flattenWorkingContext>[0][];
|
|
751
|
+
/** `/layout` only. */
|
|
752
|
+
mountedModules?: unknown[];
|
|
753
|
+
orgKey?: string;
|
|
754
|
+
status?: AppDefinitionStatus;
|
|
755
|
+
version?: number;
|
|
756
|
+
publishedVersion?: number;
|
|
757
|
+
createdAt?: string;
|
|
758
|
+
updatedAt?: string;
|
|
397
759
|
}
|
|
398
760
|
/** What `PUT /app-definitions/{appId}` receives: the DTO with `theme` and `layout` always rebuilt. */
|
|
399
761
|
type AppDefinitionPayload = AppDefinitionDto & {
|
|
400
|
-
|
|
401
|
-
|
|
762
|
+
theme: ThemeDefinition;
|
|
763
|
+
layout: LayoutDefinition;
|
|
402
764
|
};
|
|
403
765
|
/**
|
|
404
766
|
* Translates between the `AppDefinition` DTO of `base-app-api.yaml` and the flat entity the
|
|
@@ -416,95 +778,107 @@ type AppDefinitionPayload = AppDefinitionDto & {
|
|
|
416
778
|
* `route-definition.mapper.ts` rather than here, because `ModuleDefinition.routes` carries the same
|
|
417
779
|
* schema and a route authored in a module has to behave exactly like one authored in an app.
|
|
418
780
|
*/
|
|
419
|
-
declare class AppDefinitionMapper implements BaseEntityMapper<AppDefinition> {
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
781
|
+
export declare class AppDefinitionMapper implements BaseEntityMapper<AppDefinition> {
|
|
782
|
+
private readonly moduleMapper;
|
|
783
|
+
fromDto(dto: unknown): AppDefinition;
|
|
784
|
+
toDto(entity: AppDefinition): AppDefinitionPayload;
|
|
785
|
+
private mergeTheme;
|
|
786
|
+
private mergeLayout;
|
|
787
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AppDefinitionMapper, never>;
|
|
788
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
426
789
|
}
|
|
427
|
-
|
|
428
790
|
/**
|
|
429
791
|
* REST access to `/organizations/{orgKey}/app-definitions`. As in base-rule, the organization is
|
|
430
792
|
* part of the configured service root — `APP_SERVICE_ROOT`, the optional per-feature escape hatch,
|
|
431
793
|
* falling back to `BACKEND_SERVICE_ROOT`, which is what every deployment actually sets — so the
|
|
432
794
|
* tenant is a deployment concern rather than something every call has to carry.
|
|
433
795
|
*/
|
|
434
|
-
declare class AppDefinitionService extends BaseEntityRestService<AppDefinition> {
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
796
|
+
export declare class AppDefinitionService extends BaseEntityRestService<AppDefinition> {
|
|
797
|
+
protected entityMapper: AppDefinitionMapper;
|
|
798
|
+
constructor(entityMapper: AppDefinitionMapper);
|
|
799
|
+
/**
|
|
800
|
+
* `POST /app-definitions/{appId}/publish` — promotes the stored `version` to `publishedVersion` and
|
|
801
|
+
* sets the status to `PUBLISHED`. The backend validates the definition first and answers 400 when it
|
|
802
|
+
* is not publishable, so the caller only has to deal with the happy path and the error.
|
|
803
|
+
*/
|
|
804
|
+
publish(id: string): Observable<PersistedEntity<AppDefinition>>;
|
|
805
|
+
/**
|
|
806
|
+
* `GET /app-definitions/{appId}/layout` — the **published** revision, role-filtered, with its routes:
|
|
807
|
+
* what the runtime host renders. `findById` is the designer's read and always returns the draft.
|
|
808
|
+
*
|
|
809
|
+
* Resolves to `undefined` while the application has never been published, which the backend answers
|
|
810
|
+
* with 404. That is the state of every new organization, so it is not reported as an error.
|
|
811
|
+
*/
|
|
812
|
+
findPublished(id: string): Observable<AppDefinition | undefined>;
|
|
813
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AppDefinitionService, never>;
|
|
814
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
815
|
+
}
|
|
816
|
+
export declare const AppDefinitionStore: import("@angular/core").Type<{
|
|
817
|
+
entities: import("@angular/core").Signal<AppDefinition[]>;
|
|
818
|
+
number: import("@angular/core").Signal<number>;
|
|
819
|
+
size: import("@angular/core").Signal<number>;
|
|
820
|
+
totalElements: import("@angular/core").Signal<number>;
|
|
821
|
+
totalPages: import("@angular/core").Signal<number>;
|
|
822
|
+
currentId: import("@angular/core").Signal<string | undefined>;
|
|
823
|
+
currentEntity: import("@ngrx/signals").DeepSignal<AppDefinition> | import("@angular/core").Signal<undefined>;
|
|
824
|
+
isLoading: import("@angular/core").Signal<boolean>;
|
|
825
|
+
error: import("@angular/core").Signal<string | undefined>;
|
|
826
|
+
selectedEntities: import("@angular/core").Signal<AppDefinition[]>;
|
|
827
|
+
stagedIds: import("@angular/core").Signal<string[]>;
|
|
828
|
+
activeTabs: import("@angular/core").Signal<string[]>;
|
|
829
|
+
currentTab: import("@angular/core").Signal<string | undefined>;
|
|
830
|
+
filterKey: import("@angular/core").Signal<string | undefined>;
|
|
831
|
+
countOfEntities: import("@angular/core").Signal<number>;
|
|
832
|
+
matTableDataSource: import("@angular/core").Signal<import("@angular/material/table").MatTableDataSource<AppDefinition, import("@angular/material/paginator").MatPaginator>>;
|
|
833
|
+
clearCurrentEntity: () => void;
|
|
834
|
+
createEntity: () => AppDefinition;
|
|
835
|
+
add: (entity: AppDefinition) => Promise<PersistedEntity<AppDefinition> | undefined>;
|
|
836
|
+
delete: (id: string) => Promise<void>;
|
|
837
|
+
keyOf: (entity: AppDefinition) => string | undefined;
|
|
838
|
+
hasStagedChanges: (id: string) => boolean;
|
|
839
|
+
deleteAll: import("@ngrx/signals/rxjs-interop").RxMethod<void>;
|
|
840
|
+
deselectAll: () => void;
|
|
841
|
+
deselectEntity: (id: string) => void;
|
|
842
|
+
load: import("@ngrx/signals/rxjs-interop").RxMethod<import("@processpuzzle/base-entity").BaseEntityQueryCondition>;
|
|
843
|
+
loadById: (id: string) => AppDefinition | undefined;
|
|
844
|
+
reload: (id: string) => Promise<PersistedEntity<AppDefinition> | undefined>;
|
|
845
|
+
resetErrorState: () => void;
|
|
846
|
+
selectEntity: (id: string) => void;
|
|
847
|
+
setCurrentEntity: (id: string | undefined) => void;
|
|
848
|
+
stage: (entity: PersistedEntity<AppDefinition>) => void;
|
|
849
|
+
update: (entity: PersistedEntity<AppDefinition>) => Promise<PersistedEntity<AppDefinition> | undefined>;
|
|
850
|
+
reset: () => void;
|
|
851
|
+
tabIsActive: (tabName: string) => void;
|
|
852
|
+
tabIsInactive: (tabName: string) => void;
|
|
853
|
+
doFilter: (filterKey: string) => void;
|
|
854
|
+
publish: (id: string) => Promise<PersistedEntity<AppDefinition> | undefined>;
|
|
855
|
+
} & import("@ngrx/signals").StateSource<{
|
|
856
|
+
entities: AppDefinition[];
|
|
857
|
+
number: number;
|
|
858
|
+
size: number;
|
|
859
|
+
totalElements: number;
|
|
860
|
+
totalPages: number;
|
|
861
|
+
currentId: string | undefined;
|
|
862
|
+
currentEntity: AppDefinition | undefined;
|
|
863
|
+
isLoading: boolean;
|
|
864
|
+
error: string | undefined;
|
|
865
|
+
selectedEntities: AppDefinition[];
|
|
866
|
+
stagedIds: string[];
|
|
867
|
+
activeTabs: string[];
|
|
868
|
+
currentTab: string | undefined;
|
|
869
|
+
filterKey: string | undefined;
|
|
495
870
|
}>>;
|
|
496
|
-
|
|
497
871
|
interface ModuleDefinitionDto {
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
872
|
+
key?: string;
|
|
873
|
+
name?: string;
|
|
874
|
+
translocoId?: string;
|
|
875
|
+
description?: string;
|
|
876
|
+
translocoScope?: string;
|
|
877
|
+
routes?: RouteDefinitionDto[];
|
|
878
|
+
orgKey?: string;
|
|
879
|
+
version?: number;
|
|
880
|
+
createdAt?: string;
|
|
881
|
+
updatedAt?: string;
|
|
508
882
|
}
|
|
509
883
|
/**
|
|
510
884
|
* Translates between the `ModuleDefinition` DTO of `base-app-api.yaml` and the entity the generated form
|
|
@@ -515,13 +889,12 @@ interface ModuleDefinitionDto {
|
|
|
515
889
|
* - **each route's `target` is flattened** onto the row and re-nested on save, by the same functions
|
|
516
890
|
* `AppDefinitionMapper` uses, so a route authored in a module behaves like one authored in an app.
|
|
517
891
|
*/
|
|
518
|
-
declare class ModuleDefinitionMapper implements BaseEntityMapper<ModuleDefinition> {
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
892
|
+
export declare class ModuleDefinitionMapper implements BaseEntityMapper<ModuleDefinition> {
|
|
893
|
+
fromDto(dto: unknown): ModuleDefinition;
|
|
894
|
+
toDto(entity: ModuleDefinition): ModuleDefinitionDto;
|
|
895
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ModuleDefinitionMapper, never>;
|
|
896
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
523
897
|
}
|
|
524
|
-
|
|
525
898
|
/**
|
|
526
899
|
* REST access to `/organizations/{orgKey}/modules`. As for `AppDefinitionService`, the organization is
|
|
527
900
|
* part of the configured service root (`APP_SERVICE_ROOT`, falling back to `BACKEND_SERVICE_ROOT`), so
|
|
@@ -533,115 +906,124 @@ declare class ModuleDefinitionMapper implements BaseEntityMapper<ModuleDefinitio
|
|
|
533
906
|
* the shell makes when something first navigates under a mount; see `ModuleLoader` in
|
|
534
907
|
* `app-route-builder.ts`.
|
|
535
908
|
*/
|
|
536
|
-
declare class ModuleDefinitionService extends BaseEntityRestService<ModuleDefinition> {
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
909
|
+
export declare class ModuleDefinitionService extends BaseEntityRestService<ModuleDefinition> {
|
|
910
|
+
protected entityMapper: ModuleDefinitionMapper;
|
|
911
|
+
constructor(entityMapper: ModuleDefinitionMapper);
|
|
912
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ModuleDefinitionService, never>;
|
|
913
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
541
914
|
}
|
|
542
|
-
|
|
543
915
|
/**
|
|
544
916
|
* Plain generic CRUD — a module has no `publish` of its own. Publishing is an `AppDefinition` operation:
|
|
545
917
|
* an app is what a user navigates to, and its status is what decides whether a mount is live. Giving a
|
|
546
918
|
* module a second, independent lifecycle would make "which version of what is live" a question with two
|
|
547
919
|
* answers.
|
|
548
920
|
*/
|
|
549
|
-
declare const ModuleDefinitionStore:
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
921
|
+
export declare const ModuleDefinitionStore: import("@angular/core").Type<{
|
|
922
|
+
entities: import("@angular/core").Signal<ModuleDefinition[]>;
|
|
923
|
+
number: import("@angular/core").Signal<number>;
|
|
924
|
+
size: import("@angular/core").Signal<number>;
|
|
925
|
+
totalElements: import("@angular/core").Signal<number>;
|
|
926
|
+
totalPages: import("@angular/core").Signal<number>;
|
|
927
|
+
currentId: import("@angular/core").Signal<string | undefined>;
|
|
928
|
+
currentEntity: import("@angular/core").Signal<undefined> | import("@ngrx/signals").DeepSignal<ModuleDefinition>;
|
|
929
|
+
isLoading: import("@angular/core").Signal<boolean>;
|
|
930
|
+
error: import("@angular/core").Signal<string | undefined>;
|
|
931
|
+
selectedEntities: import("@angular/core").Signal<ModuleDefinition[]>;
|
|
932
|
+
stagedIds: import("@angular/core").Signal<string[]>;
|
|
933
|
+
activeTabs: import("@angular/core").Signal<string[]>;
|
|
934
|
+
currentTab: import("@angular/core").Signal<string | undefined>;
|
|
935
|
+
filterKey: import("@angular/core").Signal<string | undefined>;
|
|
936
|
+
countOfEntities: import("@angular/core").Signal<number>;
|
|
937
|
+
matTableDataSource: import("@angular/core").Signal<import("@angular/material/table").MatTableDataSource<ModuleDefinition, import("@angular/material/paginator").MatPaginator>>;
|
|
938
|
+
clearCurrentEntity: () => void;
|
|
939
|
+
createEntity: () => ModuleDefinition;
|
|
940
|
+
add: (entity: ModuleDefinition) => Promise<import("@processpuzzle/base-entity").PersistedEntity<ModuleDefinition> | undefined>;
|
|
941
|
+
delete: (id: string) => Promise<void>;
|
|
942
|
+
keyOf: (entity: ModuleDefinition) => string | undefined;
|
|
943
|
+
hasStagedChanges: (id: string) => boolean;
|
|
944
|
+
deleteAll: import("@ngrx/signals/rxjs-interop").RxMethod<void>;
|
|
945
|
+
deselectAll: () => void;
|
|
946
|
+
deselectEntity: (id: string) => void;
|
|
947
|
+
load: import("@ngrx/signals/rxjs-interop").RxMethod<import("@processpuzzle/base-entity").BaseEntityQueryCondition>;
|
|
948
|
+
loadById: (id: string) => ModuleDefinition | undefined;
|
|
949
|
+
reload: (id: string) => Promise<import("@processpuzzle/base-entity").PersistedEntity<ModuleDefinition> | undefined>;
|
|
950
|
+
resetErrorState: () => void;
|
|
951
|
+
selectEntity: (id: string) => void;
|
|
952
|
+
setCurrentEntity: (id: string | undefined) => void;
|
|
953
|
+
stage: (entity: import("@processpuzzle/base-entity").PersistedEntity<ModuleDefinition>) => void;
|
|
954
|
+
update: (entity: import("@processpuzzle/base-entity").PersistedEntity<ModuleDefinition>) => Promise<import("@processpuzzle/base-entity").PersistedEntity<ModuleDefinition> | undefined>;
|
|
955
|
+
reset: () => void;
|
|
956
|
+
tabIsActive: (tabName: string) => void;
|
|
957
|
+
tabIsInactive: (tabName: string) => void;
|
|
958
|
+
doFilter: (filterKey: string) => void;
|
|
959
|
+
} & import("@ngrx/signals").StateSource<{
|
|
960
|
+
entities: ModuleDefinition[];
|
|
961
|
+
number: number;
|
|
962
|
+
size: number;
|
|
963
|
+
totalElements: number;
|
|
964
|
+
totalPages: number;
|
|
965
|
+
currentId: string | undefined;
|
|
966
|
+
currentEntity: ModuleDefinition | undefined;
|
|
967
|
+
isLoading: boolean;
|
|
968
|
+
error: string | undefined;
|
|
969
|
+
selectedEntities: ModuleDefinition[];
|
|
970
|
+
stagedIds: string[];
|
|
971
|
+
activeTabs: string[];
|
|
972
|
+
currentTab: string | undefined;
|
|
973
|
+
filterKey: string | undefined;
|
|
596
974
|
}>>;
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
static ɵprov: _angular_core.ɵɵInjectableDeclaration<ModuleDefinitionFacade>;
|
|
620
|
-
}
|
|
621
|
-
|
|
975
|
+
export declare class AppDefinitionFacade extends BaseEntityFacade<AppDefinition> {
|
|
976
|
+
readonly entityType: typeof AppDefinition;
|
|
977
|
+
private readonly mapperRef;
|
|
978
|
+
private readonly serviceRef;
|
|
979
|
+
protected createMapper(): AppDefinitionMapper;
|
|
980
|
+
protected createService(): AppDefinitionService;
|
|
981
|
+
protected createStoreClass(): Type<unknown>;
|
|
982
|
+
protected createDescriptor(): BaseEntityDescriptor;
|
|
983
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AppDefinitionFacade, never>;
|
|
984
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
985
|
+
}
|
|
986
|
+
export declare class ModuleDefinitionFacade extends BaseEntityFacade<ModuleDefinition> {
|
|
987
|
+
readonly entityType: typeof ModuleDefinition;
|
|
988
|
+
private readonly mapperRef;
|
|
989
|
+
private readonly serviceRef;
|
|
990
|
+
protected createMapper(): ModuleDefinitionMapper;
|
|
991
|
+
protected createService(): ModuleDefinitionService;
|
|
992
|
+
protected createStoreClass(): Type<unknown>;
|
|
993
|
+
protected createDescriptor(): BaseEntityDescriptor;
|
|
994
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ModuleDefinitionFacade, never>;
|
|
995
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
996
|
+
}
|
|
622
997
|
/**
|
|
623
998
|
* A mount is a row of the `App Definition` document, so it is edited through that document — unlike the
|
|
624
999
|
* `ModuleDefinition` it names, which is an aggregate of its own with its own endpoints.
|
|
625
1000
|
*/
|
|
626
|
-
declare class AppModuleMountFacade extends EmbeddedEntityFacade<ModuleMount> {
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
1001
|
+
export declare class AppModuleMountFacade extends EmbeddedEntityFacade<ModuleMount> {
|
|
1002
|
+
readonly entityType: typeof ModuleMount;
|
|
1003
|
+
protected createDescriptor(): BaseEntityDescriptor;
|
|
1004
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AppModuleMountFacade, never>;
|
|
1005
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
631
1006
|
}
|
|
632
|
-
|
|
633
1007
|
/**
|
|
634
1008
|
* One facade covers every level of the nav tree, however deep: the store is a root singleton and the row
|
|
635
1009
|
* it stands for comes from the route, so `app-nav-item/a/details/app-nav-item/b/details` resolves through
|
|
636
1010
|
* the same facade as the top level.
|
|
637
1011
|
*/
|
|
638
|
-
declare class AppNavItemFacade extends EmbeddedEntityFacade<NavItem> {
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
1012
|
+
export declare class AppNavItemFacade extends EmbeddedEntityFacade<NavItem> {
|
|
1013
|
+
readonly entityType: typeof NavItem;
|
|
1014
|
+
protected createDescriptor(): BaseEntityDescriptor;
|
|
1015
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AppNavItemFacade, never>;
|
|
1016
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
1017
|
+
}
|
|
1018
|
+
/** What the builder needs to know of a context: its name, and the one it is nested in. */
|
|
1019
|
+
interface ContextRef {
|
|
1020
|
+
name: string;
|
|
1021
|
+
parent?: string;
|
|
1022
|
+
/** The context's entity type. With it, the context's route is the aggregate root of the embedded screens below it. */
|
|
1023
|
+
entityName?: string;
|
|
1024
|
+
/** What the entity is made of, for those screens; filled in by {@link buildAppRoutes} from `contextChildren`. */
|
|
1025
|
+
aggregate?: WorkingContextAggregate;
|
|
643
1026
|
}
|
|
644
|
-
|
|
645
1027
|
/**
|
|
646
1028
|
* What the run-time shell registers routes from. `routes` and `modules` are the app definition's own
|
|
647
1029
|
* fields; the other two are how the routes of a mounted module get in.
|
|
@@ -653,12 +1035,35 @@ declare class AppNavItemFacade extends EmbeddedEntityFacade<NavItem> {
|
|
|
653
1035
|
*
|
|
654
1036
|
* A key present in `moduleRoutes` is never loaded again, so an empty array there says "this module has no
|
|
655
1037
|
* routes" and is honoured as such.
|
|
1038
|
+
*
|
|
1039
|
+
* `loadTranslations` is where a lazily mounted module's own translations come from; without it the module's
|
|
1040
|
+
* scope is registered with the application's default loader alone.
|
|
656
1041
|
*/
|
|
657
1042
|
interface AppRouteSource {
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
1043
|
+
routes?: RouteDefinition[];
|
|
1044
|
+
modules?: ModuleMount[];
|
|
1045
|
+
/** The app's working contexts. A route naming one is served below `ctx/<name>/:id/`; see {@link groupContextRoutes}. */
|
|
1046
|
+
contexts?: ContextRef[];
|
|
1047
|
+
/**
|
|
1048
|
+
* The embedded children of an entity type, as its own details route mounts them. Asked once per context that names an
|
|
1049
|
+
* entity: the rows of those children open as screens below the context's route, saved through the item endpoints.
|
|
1050
|
+
*/
|
|
1051
|
+
contextChildren?: (entityName: string) => EmbeddedChildRoute[] | Promise<EmbeddedChildRoute[]>;
|
|
1052
|
+
moduleRoutes?: Record<string, RouteDefinition[] | undefined>;
|
|
1053
|
+
loadModule?: ModuleLoader;
|
|
1054
|
+
loadTranslations?: ModuleTranslationLoader;
|
|
1055
|
+
/** The assets of a module, by key, for the widgets below its mount; without it a `module:` value resolves to nothing. */
|
|
1056
|
+
moduleAssets?: (moduleKey: string) => ModuleAssetContext;
|
|
1057
|
+
}
|
|
1058
|
+
/**
|
|
1059
|
+
* Fetches the translations of one module and language. `languages` — read when the module loads, so it may be
|
|
1060
|
+
* a getter — is what the module's scope is registered
|
|
1061
|
+
* for: transloco enumerates an inline loader's languages when the scope is registered, so a loader that
|
|
1062
|
+
* answers any language still has to name the ones it answers.
|
|
1063
|
+
*/
|
|
1064
|
+
interface ModuleTranslationLoader {
|
|
1065
|
+
readonly languages: string[];
|
|
1066
|
+
load(moduleKey: string, scope: string, locale: string): Promise<Translation>;
|
|
662
1067
|
}
|
|
663
1068
|
/**
|
|
664
1069
|
* Fetches one module by key, or resolves to `undefined` if the organization has no such module. Rejecting
|
|
@@ -702,8 +1107,7 @@ type RouteRenderer = (definition: RouteDefinition) => Route | Promise<Route>;
|
|
|
702
1107
|
* swallowed by it. Beyond that the authored order is kept, and a duplicate path — which the backend
|
|
703
1108
|
* rejects as an error, so it should never arrive — keeps its first occurrence.
|
|
704
1109
|
*/
|
|
705
|
-
declare function buildAppRoutes(source: AppRouteSource, renderRoute: RouteRenderer): Promise<Routes>;
|
|
706
|
-
|
|
1110
|
+
export declare function buildAppRoutes(source: AppRouteSource, renderRoute: RouteRenderer): Promise<Routes>;
|
|
707
1111
|
/**
|
|
708
1112
|
* The `RouteRenderer` {@link buildAppRoutes} needs — turns one authored `RouteDefinition` into the
|
|
709
1113
|
* `Route` that actually renders it. Owns `component`, `data` and any `children` the kind calls for; `path`
|
|
@@ -720,82 +1124,69 @@ declare function buildAppRoutes(source: AppRouteSource, renderRoute: RouteRender
|
|
|
720
1124
|
* route's `documentSlug` at runtime. Rendering a document read-only inside a live app is its own small
|
|
721
1125
|
* design question and this falls through to {@link RouteUnsupportedComponent} rather than guessing.
|
|
722
1126
|
*/
|
|
723
|
-
declare class AppRouteRenderer {
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
}
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
*
|
|
753
|
-
* resolved against WIDGET_REGISTRY. REFERENCED instances are skipped here for the same reason
|
|
1127
|
+
export declare class AppRouteRenderer {
|
|
1128
|
+
private readonly entityScreens;
|
|
1129
|
+
render: (definition: RouteDefinition) => Promise<Route>;
|
|
1130
|
+
/**
|
|
1131
|
+
* An `ENTITY` route: base-entity's generated screens, mounted at the authored path.
|
|
1132
|
+
*
|
|
1133
|
+
* Both halves belong to base-entity and are called rather than reimplemented here: `EntityScreenResolver`
|
|
1134
|
+
* answers for an entity with a compile-time facade and for one that exists only as a `BaseEntityDefinition`
|
|
1135
|
+
* alike, and `entityScreenRoute` owns the URL shape those screens need. What is left is exactly the
|
|
1136
|
+
* *application definition* concern — when the routes are built, the authored title, and the authored
|
|
1137
|
+
* `entityMode` / `rsqlFilter`.
|
|
1138
|
+
*
|
|
1139
|
+
* The descriptor is resolved **before** the route exists, which is what makes the route either complete or
|
|
1140
|
+
* a leaf. An entity nothing answers to keeps the leaf, whose component says so at the URL the nav item
|
|
1141
|
+
* links to; a legitimate state, since an `AppDefinition` may name an entity that has been renamed or one
|
|
1142
|
+
* whose definitions this deployment's backend does not serve.
|
|
1143
|
+
*
|
|
1144
|
+
* `entityMode` is passed along but not applied. A `DETAILS` route lands on the list, from which the row is
|
|
1145
|
+
* one click away: making it open a form directly means carrying the authored route's own `:id` into the
|
|
1146
|
+
* child URL, and the `RedirectFunction` that would do it receives a *partial* route snapshot whose
|
|
1147
|
+
* parameter inheritance at recognition time is not something to bet a navigation on. Deferred with `roles`
|
|
1148
|
+
* and `rsqlFilter` rather than guessed at.
|
|
1149
|
+
*/
|
|
1150
|
+
private entityRoute;
|
|
1151
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AppRouteRenderer, never>;
|
|
1152
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
1153
|
+
}
|
|
1154
|
+
/**
|
|
1155
|
+
* Renders a route whose kind is WIDGETS: every STANDALONE instance in order, each through base-widget's
|
|
1156
|
+
* WidgetHostComponent. REFERENCED instances are skipped here for the same reason
|
|
754
1157
|
* DocumentEditorComponent skips them at its top level — they're placed by whichever STANDALONE
|
|
755
1158
|
* container widget names them in props.childIds, not by this component.
|
|
756
1159
|
*
|
|
757
1160
|
* Delegates the common widget rendering rule to WidgetListComponent, which is also used by the
|
|
758
1161
|
* header and footer regions in the application preview.
|
|
759
1162
|
*/
|
|
760
|
-
declare class RouteWidgetsComponent {
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
}
|
|
766
|
-
|
|
767
|
-
/**
|
|
768
|
-
* One widget as it is rendered: the component the registry answered with, or none.
|
|
769
|
-
*
|
|
770
|
-
* Resolved once per definition into a computed rather than by a template method, so the lookup does not
|
|
771
|
-
* re-run on every change detection pass and `ngComponentOutlet` is not handed a fresh value each time.
|
|
772
|
-
*/
|
|
773
|
-
interface WidgetRow {
|
|
774
|
-
id: string;
|
|
775
|
-
type: string;
|
|
776
|
-
props?: Record<string, unknown>;
|
|
777
|
-
/** Absent when no `provideWidget()` in the hosting application answers `type`. */
|
|
778
|
-
component?: Type<unknown>;
|
|
1163
|
+
export declare class RouteWidgetsComponent {
|
|
1164
|
+
private readonly route;
|
|
1165
|
+
protected readonly widgets: WidgetInstance$1[];
|
|
1166
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RouteWidgetsComponent, never>;
|
|
1167
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<RouteWidgetsComponent, "pp-route-widgets", never, {}, {}, never, never, true, never>;
|
|
779
1168
|
}
|
|
780
1169
|
/**
|
|
781
|
-
* Renders the top-level widgets shared by routed content and static shell regions
|
|
1170
|
+
* Renders the top-level widgets shared by routed content and static shell regions, each through
|
|
1171
|
+
* base-widget's {@link WidgetHostComponent} — which resolves the component, binds the props and shows a
|
|
1172
|
+
* placeholder for a type the application did not register. This component only decides *which* widgets
|
|
1173
|
+
* render here, and in what order.
|
|
782
1174
|
*
|
|
783
|
-
*
|
|
784
|
-
*
|
|
785
|
-
* this component has to render, not one it can rule out: it shows a placeholder naming the type, where
|
|
786
|
-
* throwing would take the whole shell down over one mistyped widget in one region and leave the designer
|
|
787
|
-
* with a blank page instead of a pointer to the row at fault.
|
|
1175
|
+
* base-app passes no binding resolver: a page or region declares no ports for `inputBindings` to resolve
|
|
1176
|
+
* against, so a placement here is configured by its props alone.
|
|
788
1177
|
*/
|
|
789
|
-
declare class WidgetListComponent {
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
1178
|
+
export declare class WidgetListComponent {
|
|
1179
|
+
readonly widgets: import("@angular/core").InputSignal<WidgetInstance$1[]>;
|
|
1180
|
+
protected readonly rows: import("@angular/core").Signal<WidgetInstance$1[]>;
|
|
1181
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WidgetListComponent, never>;
|
|
1182
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<WidgetListComponent, "pp-widget-list", never, {
|
|
1183
|
+
"widgets": {
|
|
1184
|
+
"alias": "widgets";
|
|
1185
|
+
"required": false;
|
|
1186
|
+
"isSignal": true;
|
|
1187
|
+
};
|
|
1188
|
+
}, {}, never, never, true, never>;
|
|
797
1189
|
}
|
|
798
|
-
|
|
799
1190
|
/**
|
|
800
1191
|
* Fallback rendered by {@link AppRouteRenderer} for a route kind it doesn't yet know how to build a
|
|
801
1192
|
* real component for (today: DOCUMENT, and any kind value the frontend doesn't recognize). Exists so
|
|
@@ -807,65 +1198,65 @@ declare class WidgetListComponent {
|
|
|
807
1198
|
* caught up to yet, same spirit as a NavItem naming a route that hasn't been authored being a warning
|
|
808
1199
|
* rather than a validation failure elsewhere in this library.
|
|
809
1200
|
*/
|
|
810
|
-
declare class RouteUnsupportedComponent {
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
1201
|
+
export declare class RouteUnsupportedComponent {
|
|
1202
|
+
private readonly route;
|
|
1203
|
+
protected readonly reason: import("@angular/core").Signal<string>;
|
|
1204
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RouteUnsupportedComponent, never>;
|
|
1205
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<RouteUnsupportedComponent, "pp-route-unsupported", never, {}, {}, never, never, true, never>;
|
|
815
1206
|
}
|
|
816
|
-
|
|
817
1207
|
/**
|
|
818
1208
|
* A region has a facade like any other entity — that is what gives it a store, and so a working list and
|
|
819
1209
|
* form. Its repository reads and writes the `App Definition` document instead of an endpoint of its own,
|
|
820
1210
|
* because the contract nests `regions` inside that document.
|
|
821
1211
|
*/
|
|
822
|
-
declare class AppRegionFacade extends EmbeddedEntityFacade<RegionDefinition> {
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
1212
|
+
export declare class AppRegionFacade extends EmbeddedEntityFacade<RegionDefinition> {
|
|
1213
|
+
readonly entityType: typeof RegionDefinition;
|
|
1214
|
+
protected createDescriptor(): BaseEntityDescriptor;
|
|
1215
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AppRegionFacade, never>;
|
|
1216
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
827
1217
|
}
|
|
828
|
-
|
|
829
1218
|
/**
|
|
830
1219
|
* `GET .../app-definitions/{appId}/layout` is a read-only projection for the run-time shell, not a write
|
|
831
1220
|
* endpoint — a route is authored inside the `App Definition` document, so its store goes through that
|
|
832
1221
|
* document like every other embedded child of the graph.
|
|
833
1222
|
*/
|
|
834
|
-
declare class AppRouteFacade extends EmbeddedEntityFacade<RouteDefinition> {
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
1223
|
+
export declare class AppRouteFacade extends EmbeddedEntityFacade<RouteDefinition> {
|
|
1224
|
+
readonly entityType: typeof RouteDefinition;
|
|
1225
|
+
protected createDescriptor(): BaseEntityDescriptor;
|
|
1226
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AppRouteFacade, never>;
|
|
1227
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
839
1228
|
}
|
|
840
|
-
|
|
841
1229
|
/**
|
|
842
1230
|
* A widget sits under a region, a page or another widget, and one facade serves all three: which owner's
|
|
843
1231
|
* rows its store reads is decided by the route that is open, not by the facade.
|
|
1232
|
+
*
|
|
1233
|
+
* The `type` dropdown lists the registry this facade's injector sees — widgets registered only in a lazily
|
|
1234
|
+
* loaded route below it are not offered, the same limit the props control has.
|
|
844
1235
|
*/
|
|
845
|
-
declare class AppWidgetFacade extends EmbeddedEntityFacade<WidgetInstance> {
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
}
|
|
868
|
-
|
|
1236
|
+
export declare class AppWidgetFacade extends EmbeddedEntityFacade<WidgetInstance> {
|
|
1237
|
+
readonly entityType: typeof WidgetInstance;
|
|
1238
|
+
private readonly widgetRegistry;
|
|
1239
|
+
protected createDescriptor(): BaseEntityDescriptor;
|
|
1240
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AppWidgetFacade, never>;
|
|
1241
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
1242
|
+
}
|
|
1243
|
+
/**
|
|
1244
|
+
* The App Definition screens, with the Preview tab beside the form.
|
|
1245
|
+
*
|
|
1246
|
+
* There is no Publish button here any more. An application goes live together with everything it uses — its
|
|
1247
|
+
* modules, and the entities, rules and workflows its routes reach — so publishing is the organization's
|
|
1248
|
+
* release, made from the designer's Release section, not an action on one definition.
|
|
1249
|
+
*/
|
|
1250
|
+
export declare class AppDefinitionContainerComponent implements OnDestroy {
|
|
1251
|
+
private readonly containerComponentRef;
|
|
1252
|
+
baseEntityHost: BaseFormHostDirective;
|
|
1253
|
+
private readonly store;
|
|
1254
|
+
readonly entityDescriptor: BaseEntityDescriptor;
|
|
1255
|
+
constructor();
|
|
1256
|
+
ngOnDestroy(): void;
|
|
1257
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AppDefinitionContainerComponent, never>;
|
|
1258
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AppDefinitionContainerComponent, "pp-app-definition-container", never, {}, {}, never, never, true, never>;
|
|
1259
|
+
}
|
|
869
1260
|
/**
|
|
870
1261
|
* The Preview tab's screen, mounted at `app-definition/<id>/preview` by `BASE_APP_ROUTES` — a sibling of
|
|
871
1262
|
* the generic Details form rather than something stacked under it, which is what the `extraTabs` hook on
|
|
@@ -873,26 +1264,31 @@ declare class AppDefinitionContainerComponent implements OnDestroy {
|
|
|
873
1264
|
*
|
|
874
1265
|
* A **container and nothing more**: it resolves which definition is being previewed and frames the
|
|
875
1266
|
* result. Everything about *how* an application renders belongs to {@link AppShellComponent}, which the
|
|
876
|
-
*
|
|
1267
|
+
* runtime host mounts just as this does — so the preview cannot grow behaviour the real
|
|
877
1268
|
* shell lacks, which is the only way a preview stays honest.
|
|
878
1269
|
*
|
|
879
1270
|
* The frame below — rounded, white, and tall enough to look like an application — is the preview's own,
|
|
880
1271
|
* not the shell's. In production the shell fills the viewport and none of it applies.
|
|
881
1272
|
*/
|
|
882
|
-
declare class AppPreviewComponent implements OnInit {
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
1273
|
+
export declare class AppPreviewComponent implements OnInit {
|
|
1274
|
+
/**
|
|
1275
|
+
* Bound from the route's `:entityId` param by `withComponentInputBinding()`, the same way
|
|
1276
|
+
* `BaseEntityFormComponent` receives it — so a deep link and a reload resolve the same app definition as a
|
|
1277
|
+
* click through the tab does.
|
|
1278
|
+
*/
|
|
1279
|
+
readonly entityId: import("@angular/core").InputSignal<string>;
|
|
1280
|
+
private readonly store;
|
|
1281
|
+
protected readonly app: import("@angular/core").Signal<AppDefinition | undefined>;
|
|
1282
|
+
ngOnInit(): void;
|
|
1283
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AppPreviewComponent, never>;
|
|
1284
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AppPreviewComponent, "pp-app-preview-tab", never, {
|
|
1285
|
+
"entityId": {
|
|
1286
|
+
"alias": "entityId";
|
|
1287
|
+
"required": true;
|
|
1288
|
+
"isSignal": true;
|
|
1289
|
+
};
|
|
1290
|
+
}, {}, never, never, true, never>;
|
|
1291
|
+
}
|
|
896
1292
|
/**
|
|
897
1293
|
* One region resolved to something renderable: which slot it fills, the component that fills it and
|
|
898
1294
|
* the inputs to bind. **Data, not a view** — deliberately the same shape of answer
|
|
@@ -905,32 +1301,60 @@ declare class AppPreviewComponent implements OnInit {
|
|
|
905
1301
|
* the second reason this carries inputs rather than a constructed component.
|
|
906
1302
|
*/
|
|
907
1303
|
interface RegionView {
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
1304
|
+
slot: RegionType;
|
|
1305
|
+
component: Type<unknown>;
|
|
1306
|
+
inputs: Record<string, unknown>;
|
|
911
1307
|
}
|
|
912
1308
|
/**
|
|
913
1309
|
* Turns one authored `RegionDefinition` into the {@link RegionView} that renders it.
|
|
914
1310
|
*
|
|
915
1311
|
* An injectable rather than a free function, though stateless today, for the reason `AppRouteRenderer`
|
|
916
|
-
* is one: the Preview tab and the
|
|
1312
|
+
* is one: the Preview tab and the runtime host must resolve regions *identically*,
|
|
917
1313
|
* so there has to be exactly one of these, and a constructor parameter is a cheaper way to grow it than
|
|
918
1314
|
* a rewrite.
|
|
919
1315
|
*/
|
|
920
|
-
declare class AppRegionRenderer {
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
1316
|
+
export declare class AppRegionRenderer {
|
|
1317
|
+
render: (region: RegionDefinition, definition: AppDefinition | undefined) => RegionView | undefined;
|
|
1318
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AppRegionRenderer, never>;
|
|
1319
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
1320
|
+
}
|
|
1321
|
+
/**
|
|
1322
|
+
* The shell's answer to base-widget's `SIDENAV_CONTROL`, for the `sidenav-toggle` widget. The shell owns the
|
|
1323
|
+
* drawer and writes {@link available}; the widget only flips {@link opened}, which the shell binds to it.
|
|
1324
|
+
*/
|
|
1325
|
+
declare class ShellSidenavControl implements SidenavControl {
|
|
1326
|
+
readonly available: import("@angular/core").WritableSignal<boolean>;
|
|
1327
|
+
readonly opened: import("@angular/core").WritableSignal<boolean>;
|
|
1328
|
+
toggle(): void;
|
|
1329
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ShellSidenavControl, never>;
|
|
1330
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
1331
|
+
}
|
|
1332
|
+
/**
|
|
1333
|
+
* Marks content a host projects into the end of the shell's top row: `<div ppShellActions>…</div>`.
|
|
1334
|
+
*
|
|
1335
|
+
* For controls that belong to the platform rather than to the application — signing out, switching
|
|
1336
|
+
* organization, opening the designer. They come from the host and not from a header region, because a
|
|
1337
|
+
* definition decides what its regions hold, and a definition that could drop the designer button would
|
|
1338
|
+
* let a designer lock themselves out of the designer.
|
|
1339
|
+
*
|
|
1340
|
+
* **It brings its own overlay container.** Projected content resolves its dependencies through the
|
|
1341
|
+
* injectors of the template that declared it — the host's — not through the shell's, so the shell's
|
|
1342
|
+
* {@link ShellOverlayContainer} is out of its reach: a menu opened from one of these controls would render
|
|
1343
|
+
* under `<body>` and wear the host's theme. This element is inside the shell's host, which is all a
|
|
1344
|
+
* container needs to wear the application's.
|
|
1345
|
+
*/
|
|
1346
|
+
export declare class ShellActionsDirective {
|
|
1347
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ShellActionsDirective, never>;
|
|
1348
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ShellActionsDirective, "[ppShellActions]", never, {}, {}, never, never, true, never>;
|
|
924
1349
|
}
|
|
925
|
-
|
|
926
1350
|
/**
|
|
927
1351
|
* The run-time shell of a metadata-defined application: the chrome an `AppDefinition` describes, with a
|
|
928
1352
|
* `<router-outlet>` where its routes render.
|
|
929
1353
|
*
|
|
930
|
-
* **This is the application, not a picture of one.** `AppPreviewComponent` hosts it
|
|
931
|
-
* tab shows the real thing, and
|
|
932
|
-
* the whole point of it being a component with one input rather than
|
|
933
|
-
* preview. A shell built for the preview would drift from the one built for production, and a preview
|
|
1354
|
+
* **This is the application, not a picture of one.** `AppPreviewComponent` hosts it with the draft so
|
|
1355
|
+
* that the Preview tab shows the real thing, and a runtime host mounts the same component with the
|
|
1356
|
+
* published revision — which is the whole point of it being a component with one input rather than
|
|
1357
|
+
* something assembled inside the preview. A shell built for the preview would drift from the one built for production, and a preview
|
|
934
1358
|
* that drifts is worse than none.
|
|
935
1359
|
*
|
|
936
1360
|
* Everything is bound declaratively. Regions are resolved to {@link RegionView}s and rendered through
|
|
@@ -938,57 +1362,108 @@ declare class AppRegionRenderer {
|
|
|
938
1362
|
* details form re-renders through ordinary signal propagation instead of a clear-and-rebuild that would
|
|
939
1363
|
* drop scroll position and focus on every keystroke.
|
|
940
1364
|
*
|
|
941
|
-
* The whole theme is applied here, not only the brand colours: `--pp-*` overrides as a style binding and
|
|
942
|
-
*
|
|
943
|
-
*
|
|
944
|
-
*
|
|
945
|
-
*
|
|
946
|
-
* the
|
|
947
|
-
*
|
|
948
|
-
*
|
|
949
|
-
*
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
1365
|
+
* The whole theme is applied here, not only the brand colours: `--pp-*` overrides as a style binding, and
|
|
1366
|
+
* a class selecting one of the scoped Material themes of widgets' `src/theme/pp-material-themes.scss`. The
|
|
1367
|
+
* class comes from the shell's own {@link ThemeService}: the definition's `materialTheme` / `colorScheme`
|
|
1368
|
+
* are its defaults, and a `ThemesButton` placed in one of the regions overrides them for this application
|
|
1369
|
+
* only. Both work because a Material theme is a set of custom properties and nothing else. That file is a
|
|
1370
|
+
* **global stylesheet the application registers**; if it is not registered the classes still land and the
|
|
1371
|
+
* shell simply inherits the host's theme. Overlays opened from inside the shell render into a
|
|
1372
|
+
* {@link ShellOverlayContainer} in its host, so they are themed as well.
|
|
1373
|
+
*
|
|
1374
|
+
* The definition's routes render in the outlet once its host registers them as the children of the route
|
|
1375
|
+
* the shell is mounted on — `appShellRoutesGuard` for the Preview, `publishedAppRoutesGuard` for a runtime
|
|
1376
|
+
* host.
|
|
1377
|
+
*
|
|
1378
|
+
* A host may also project controls of its own into the end of the top row, marked {@link ShellActionsDirective}
|
|
1379
|
+
* — the platform's controls a definition must not be able to remove, such as the way into the designer.
|
|
1380
|
+
*/
|
|
1381
|
+
export declare class AppShellComponent {
|
|
1382
|
+
/**
|
|
1383
|
+
* The definition to render. Optional rather than required because the shell is mounted before the
|
|
1384
|
+
* definition resolves — the preview's store selects the entity in its own `ngOnInit`, and a deep link
|
|
1385
|
+
* arrives with nothing loaded — so an empty shell is a state to render, not an error.
|
|
1386
|
+
*/
|
|
1387
|
+
readonly definition: import("@angular/core").InputSignal<AppDefinition | undefined>;
|
|
1388
|
+
/**
|
|
1389
|
+
* Whether a theme the user picks in a `ThemesButton` inside the shell is remembered, per application id.
|
|
1390
|
+
* The designer's preview turns it off: there a choice is only tried out, and a stored one would shadow the
|
|
1391
|
+
* theme being edited in the neighbouring form.
|
|
1392
|
+
*/
|
|
1393
|
+
readonly persistTheme: import("@angular/core").InputSignal<boolean>;
|
|
1394
|
+
private readonly regionRenderer;
|
|
1395
|
+
private readonly theme;
|
|
1396
|
+
private readonly applicationContext;
|
|
1397
|
+
private readonly workingContext;
|
|
1398
|
+
private readonly hostRoute;
|
|
1399
|
+
protected readonly layoutService: LayoutService;
|
|
1400
|
+
protected readonly sidenavControl: ShellSidenavControl;
|
|
1401
|
+
/** Controls the host projected into the top row; the row is rendered for them alone if need be. */
|
|
1402
|
+
protected readonly hostActions: import("@angular/core").Signal<ShellActionsDirective | undefined>;
|
|
1403
|
+
protected readonly layout: import("@angular/core").Signal<import("@processpuzzle/base-app").ResolvedLayout>;
|
|
1404
|
+
protected readonly themeVars: import("@angular/core").Signal<Record<string, string>>;
|
|
1405
|
+
protected readonly themeClass: import("@angular/core").Signal<string>;
|
|
1406
|
+
private readonly applyThemeDefaults;
|
|
1407
|
+
/**
|
|
1408
|
+
* Hands the definition's working contexts to the service, with the URL the shell is mounted at in front of
|
|
1409
|
+
* each `basePath` — what lets "Set as active" on an entity's list reach the context's pages from outside them.
|
|
1410
|
+
* Re-run on every edit, and undone on destroy, so a previewed definition's contexts never outlive its preview.
|
|
1411
|
+
*/
|
|
1412
|
+
private readonly registerWorkingContexts;
|
|
1413
|
+
private readonly applySidenavDefault;
|
|
1414
|
+
private readonly regionViews;
|
|
1415
|
+
protected readonly headerView: import("@angular/core").Signal<RegionView | undefined>;
|
|
1416
|
+
protected readonly footerView: import("@angular/core").Signal<RegionView | undefined>;
|
|
1417
|
+
protected readonly statusbarView: import("@angular/core").Signal<RegionView | undefined>;
|
|
1418
|
+
/**
|
|
1419
|
+
* The nav in the sidenav, for the two sidenav presets. Split from {@link topNavView} rather than
|
|
1420
|
+
* decided in the template, so each slot is one unambiguous `@if` and the mutual exclusion is stated
|
|
1421
|
+
* once, here.
|
|
1422
|
+
*/
|
|
1423
|
+
protected readonly sidenavView: import("@angular/core").Signal<RegionView | undefined>;
|
|
1424
|
+
/**
|
|
1425
|
+
* The same nav relocated into the header row under `top-nav`. It is placed beside the header region
|
|
1426
|
+
* rather than inside it, so that a `top-nav` app which declares no header region is still navigable —
|
|
1427
|
+
* and so that the shell still never invents a region that was not authored.
|
|
1428
|
+
*/
|
|
1429
|
+
protected readonly topNavView: import("@angular/core").Signal<RegionView | undefined>;
|
|
1430
|
+
/**
|
|
1431
|
+
* A handset layout has room for neither a sidenav nor a horizontal nav row, so the shell renders the nav
|
|
1432
|
+
* in neither place there; a `nav-menu` widget in the header stands in for it, reading the same entries
|
|
1433
|
+
* through the APPLICATION_CONTEXT. A definition with no such widget is not navigable on a phone — which is
|
|
1434
|
+
* why the seeded applications all place one.
|
|
1435
|
+
*/
|
|
1436
|
+
private readonly isSmallScreen;
|
|
1437
|
+
/**
|
|
1438
|
+
* The nav view's own inputs with the axis the layout dictates laid over them.
|
|
1439
|
+
*
|
|
1440
|
+
* Computeds rather than a method called from the template: a method would hand `NgComponentOutlet` a
|
|
1441
|
+
* freshly built object on every change-detection pass, so it would re-diff and re-apply the nav's
|
|
1442
|
+
* inputs continuously. Memoized, the identity only changes when the definition or the preset does.
|
|
1443
|
+
*/
|
|
1444
|
+
protected readonly sidenavInputs: import("@angular/core").Signal<{
|
|
1445
|
+
compact: boolean;
|
|
1446
|
+
}>;
|
|
1447
|
+
protected readonly topNavInputs: import("@angular/core").Signal<Record<string, unknown>>;
|
|
1448
|
+
private readonly syncSidenavAvailability;
|
|
1449
|
+
/** A backdrop click or Escape closes an over-mode drawer; a hide request from a page is not the user's choice. */
|
|
1450
|
+
protected onSidenavOpenedChange(opened: boolean): void;
|
|
1451
|
+
private navInputsOf;
|
|
1452
|
+
private viewOf;
|
|
1453
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AppShellComponent, never>;
|
|
1454
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AppShellComponent, "pp-app-shell", never, {
|
|
1455
|
+
"definition": {
|
|
1456
|
+
"alias": "definition";
|
|
1457
|
+
"required": false;
|
|
1458
|
+
"isSignal": true;
|
|
1459
|
+
};
|
|
1460
|
+
"persistTheme": {
|
|
1461
|
+
"alias": "persistTheme";
|
|
1462
|
+
"required": false;
|
|
1463
|
+
"isSignal": true;
|
|
1464
|
+
};
|
|
1465
|
+
}, {}, ["hostActions"], ["[ppShellActions]"], true, never>;
|
|
1466
|
+
}
|
|
992
1467
|
/**
|
|
993
1468
|
* Turns one `AppDefinition` into the `Routes` that render its screens — the missing consumer of
|
|
994
1469
|
* {@link buildAppRoutes}, which until now produced routes nothing registered.
|
|
@@ -996,35 +1471,64 @@ declare class AppShellComponent {
|
|
|
996
1471
|
* Separate from the guard below so the interesting part is testable without a router: this class answers
|
|
997
1472
|
* "what routes does app X have", and the guard is only the two lines that hand them to Angular.
|
|
998
1473
|
*/
|
|
999
|
-
declare class AppShellRoutesFactory {
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1474
|
+
export declare class AppShellRoutesFactory {
|
|
1475
|
+
private readonly injector;
|
|
1476
|
+
private readonly appService;
|
|
1477
|
+
private readonly moduleService;
|
|
1478
|
+
private readonly renderRoute;
|
|
1479
|
+
private readonly entityScreens;
|
|
1480
|
+
childrenOf(appId: string): Promise<Routes>;
|
|
1481
|
+
/**
|
|
1482
|
+
* The routes of a definition already in hand — the published one the runtime host fetched, or the draft
|
|
1483
|
+
* {@link childrenOf} found. One builder for both is what keeps the Preview and the live application from
|
|
1484
|
+
* rendering the same definition differently.
|
|
1485
|
+
*
|
|
1486
|
+
* A definition read through `/layout` brings its mounted modules along, from its own side — the released
|
|
1487
|
+
* modules with the published revision — and those are the only ones it mounts. Fetching a module instead
|
|
1488
|
+
* would read its draft, and the live application would show edits nobody has released.
|
|
1489
|
+
*/
|
|
1490
|
+
childrenFor(definition: AppDefinition): Promise<Routes>;
|
|
1491
|
+
/**
|
|
1492
|
+
* Where a mounted module's translations come from: whatever the application or the seeded bundles already
|
|
1493
|
+
* serve for the scope, under what the module's own uploaded files say. The shipped bundle stays underneath
|
|
1494
|
+
* so that a module translated the way every module was before files could be uploaded — a seeded
|
|
1495
|
+
* `order_admin` bundle — keeps its words.
|
|
1496
|
+
*
|
|
1497
|
+
* A language the module has nothing uploaded for answers with the shipped bundle alone, and a failed read
|
|
1498
|
+
* of the uploaded one is no reason to fail the load: the titles keep their authored text.
|
|
1499
|
+
*/
|
|
1500
|
+
private translationsOf;
|
|
1501
|
+
/**
|
|
1502
|
+
* The bundle the application ships for the scope, if it ships one. A module a Business Starter brought has only
|
|
1503
|
+
* the texts it uploaded, so there is no `assets/i18n/<scope>/<locale>.json` and the request answers 404 — which
|
|
1504
|
+
* must not fail the whole load, or the uploaded texts would never reach the module.
|
|
1505
|
+
*/
|
|
1506
|
+
private shipped;
|
|
1507
|
+
private uploaded;
|
|
1508
|
+
/** The languages transloco is configured for, the active and the fallback one included. */
|
|
1509
|
+
private languages;
|
|
1510
|
+
/**
|
|
1511
|
+
* Store first, endpoint second.
|
|
1512
|
+
*
|
|
1513
|
+
* The store holds the newest definition immediately after a Save, so the next navigation inside the
|
|
1514
|
+
* preview picks up a route the designer just added — without a second GET, and without this having to
|
|
1515
|
+
* know that a save happened. The fetch is for the case the store cannot serve: a deep link or a reload,
|
|
1516
|
+
* where nothing has been loaded yet.
|
|
1517
|
+
*
|
|
1518
|
+
* A failure resolves to `undefined` rather than propagating. A guard that rejects fails the whole
|
|
1519
|
+
* navigation, and an app whose definition cannot be read should render an empty shell, not a dead URL.
|
|
1520
|
+
*/
|
|
1521
|
+
private definitionOf;
|
|
1522
|
+
/**
|
|
1523
|
+
* The {@link ModuleLoader} `buildAppRoutes` calls for a mount whose module it has not got. Resolving to
|
|
1524
|
+
* `undefined` is deliberate and is what the contract asks for: a `ModuleMount` naming a module nobody has
|
|
1525
|
+
* authored yet is a validation *warning*, so it must contribute no routes rather than break navigation.
|
|
1526
|
+
*/
|
|
1527
|
+
private loadModule;
|
|
1528
|
+
/** `findById` resolves to `void` for a missing record and rejects on a transport error; both mean "no". */
|
|
1529
|
+
private fetch;
|
|
1530
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AppShellRoutesFactory, never>;
|
|
1531
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
1028
1532
|
}
|
|
1029
1533
|
/**
|
|
1030
1534
|
* Registers an application's own routes as the children of the Preview tab's route, so that navigating
|
|
@@ -1040,8 +1544,100 @@ declare class AppShellRoutesFactory {
|
|
|
1040
1544
|
* Always returns `true`. It is not deciding whether the tab may be entered — it is filling in the tab's
|
|
1041
1545
|
* children on the way past.
|
|
1042
1546
|
*/
|
|
1043
|
-
declare const appShellRoutesGuard: CanMatchFn;
|
|
1044
|
-
|
|
1547
|
+
export declare const appShellRoutesGuard: CanMatchFn;
|
|
1548
|
+
/**
|
|
1549
|
+
* The published revision of the application the runtime host renders — what end users see, as opposed to
|
|
1550
|
+
* the draft the designer edits and previews.
|
|
1551
|
+
*
|
|
1552
|
+
* Held here rather than in `AppDefinitionStore`, which is the designer's store of drafts: the two are
|
|
1553
|
+
* different revisions of the same entity, and one store holding both would let a save in the designer
|
|
1554
|
+
* leak into the live application before it was published.
|
|
1555
|
+
*/
|
|
1556
|
+
export declare class PublishedAppStore {
|
|
1557
|
+
private readonly appService;
|
|
1558
|
+
private readonly _published;
|
|
1559
|
+
private readonly _loaded;
|
|
1560
|
+
/** The published definition; `undefined` before the first load and while nothing has been published. */
|
|
1561
|
+
readonly published: import("@angular/core").Signal<AppDefinition | undefined>;
|
|
1562
|
+
/** Whether a load has finished, so a host can tell "not published" from "not asked yet". */
|
|
1563
|
+
readonly loaded: import("@angular/core").Signal<boolean>;
|
|
1564
|
+
/**
|
|
1565
|
+
* Reads the published revision afresh. A transport failure is treated like "not published": the host then
|
|
1566
|
+
* renders its fallback rather than a dead URL, and the error itself has been reported by the interceptor.
|
|
1567
|
+
*
|
|
1568
|
+
* A 401 is the exception: it says the session ended, not that nothing is published, and answering it with
|
|
1569
|
+
* the fallback would show the user a working-looking application that fails on every call. It is rethrown
|
|
1570
|
+
* and the store is left as it was — neither `published` nor `loaded` changes — while the session-expired
|
|
1571
|
+
* interceptor sends the user to sign in again.
|
|
1572
|
+
*/
|
|
1573
|
+
load(appId: string): Promise<AppDefinition | undefined>;
|
|
1574
|
+
/** Records that there is no application to load, as a finished load that found nothing. */
|
|
1575
|
+
clear(): Promise<undefined>;
|
|
1576
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PublishedAppStore, never>;
|
|
1577
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
1578
|
+
}
|
|
1579
|
+
/**
|
|
1580
|
+
* Registers the **published** application's routes as the children of the runtime host's route — the
|
|
1581
|
+
* production counterpart of `appShellRoutesGuard`, and the same `canMatch` technique for the same reason:
|
|
1582
|
+
* `children` is read fresh on every recognition, and this runs, awaited, before the router reads it.
|
|
1583
|
+
*
|
|
1584
|
+
* **When it fetches.** On entering the host — the first load, or coming back from the designer or any other
|
|
1585
|
+
* screen outside it — and not on navigations inside it. Entering is the moment a newly published revision
|
|
1586
|
+
* has to show up: "Publish, then back to the application" is the designer's whole workflow. Inside, the
|
|
1587
|
+
* routes built on entry stay, so moving between the application's pages costs no request.
|
|
1588
|
+
*
|
|
1589
|
+
* `fallback` takes the place of the application's routes while nothing has been published — or a published
|
|
1590
|
+
* revision has no routes — so that the host's URL always matches something. Without it the host route would
|
|
1591
|
+
* fail to match, a catch-all would redirect back to it, and the navigation would never settle.
|
|
1592
|
+
*
|
|
1593
|
+
* `appId` is either the id itself or a function that finds it — for a host that cannot know it at build
|
|
1594
|
+
* time, because the organization's application is whichever one it kept. The function is called in the
|
|
1595
|
+
* guard's injection context, and an `undefined` answer means there is no application: the fallback.
|
|
1596
|
+
*
|
|
1597
|
+
* Always resolves to `true`: it does not decide whether the host may be entered, it fills in its children.
|
|
1598
|
+
*/
|
|
1599
|
+
export declare function publishedAppRoutesGuard(appId: string | AppIdResolver, fallback?: Routes): CanMatchFn;
|
|
1600
|
+
/** Finds the id of the application a runtime host renders; `undefined` when the organization has none. */
|
|
1601
|
+
type AppIdResolver = () => Promise<string | undefined>;
|
|
1602
|
+
/**
|
|
1603
|
+
* Makes the element and everything below it wear the theme of the **published** application — the preset,
|
|
1604
|
+
* colour scheme and token overrides its definition declares, and the user's own choice in a `ThemesButton`,
|
|
1605
|
+
* remembered under the same key `AppShellComponent` uses. So the screens that work *on* the application
|
|
1606
|
+
* (administration, for one) look like the application instead of like the host's default.
|
|
1607
|
+
*
|
|
1608
|
+
* The standard way for a custom application's own chrome to follow the application's theme: bind it on the
|
|
1609
|
+
* chrome's root element, passing the {@link AppIdResolver} that finds the application. When the published
|
|
1610
|
+
* revision has not been read yet — a deep link straight into the administration — the directive reads it.
|
|
1611
|
+
*
|
|
1612
|
+
* `enabled` switches the theme off, for a mode that must keep the host's look (the designer).
|
|
1613
|
+
*
|
|
1614
|
+
* Like `AppShellComponent` it needs `pp-material-themes.scss` among the application's global styles.
|
|
1615
|
+
*/
|
|
1616
|
+
export declare class PublishedAppThemeDirective {
|
|
1617
|
+
readonly appIdResolver: import("@angular/core").InputSignal<AppIdResolver>;
|
|
1618
|
+
readonly enabled: import("@angular/core").InputSignal<boolean>;
|
|
1619
|
+
private readonly store;
|
|
1620
|
+
private readonly theme;
|
|
1621
|
+
private readonly injector;
|
|
1622
|
+
private loading;
|
|
1623
|
+
protected readonly themeClass: import("@angular/core").Signal<string>;
|
|
1624
|
+
protected readonly themeVars: import("@angular/core").Signal<Record<string, string>>;
|
|
1625
|
+
private readonly loadWhenUnread;
|
|
1626
|
+
private readonly applyDefaults;
|
|
1627
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PublishedAppThemeDirective, never>;
|
|
1628
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<PublishedAppThemeDirective, "[ppPublishedAppTheme]", never, {
|
|
1629
|
+
"appIdResolver": {
|
|
1630
|
+
"alias": "ppPublishedAppTheme";
|
|
1631
|
+
"required": true;
|
|
1632
|
+
"isSignal": true;
|
|
1633
|
+
};
|
|
1634
|
+
"enabled": {
|
|
1635
|
+
"alias": "ppPublishedAppThemeEnabled";
|
|
1636
|
+
"required": false;
|
|
1637
|
+
"isSignal": true;
|
|
1638
|
+
};
|
|
1639
|
+
}, {}, never, never, true, never>;
|
|
1640
|
+
}
|
|
1045
1641
|
/**
|
|
1046
1642
|
* The layout decisions {@link AppShellComponent} renders from, resolved out of an `AppDefinition`'s
|
|
1047
1643
|
* `layout` fields with every default already applied — so the template reads values rather than
|
|
@@ -1052,21 +1648,21 @@ declare const appShellRoutesGuard: CanMatchFn;
|
|
|
1052
1648
|
* needs injection, and a pure derivation is testable without a `TestBed`.
|
|
1053
1649
|
*/
|
|
1054
1650
|
interface ResolvedLayout {
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1651
|
+
preset: LayoutPreset;
|
|
1652
|
+
/**
|
|
1653
|
+
* Always resolved, even for `top-nav` where it is meaningless — {@link hasSidenav} is what says
|
|
1654
|
+
* whether a sidenav is rendered at all. Leaving it undefined there would only push a `?? 'side'`
|
|
1655
|
+
* into the template that no definition can ever reach, since `hasSidenav` already implies a mode.
|
|
1656
|
+
*/
|
|
1657
|
+
sidenavMode: SidenavMode;
|
|
1658
|
+
/** `end` for `sidenav-right`, `start` otherwise — the values `matSidenav`'s `position` takes. */
|
|
1659
|
+
sidenavPosition: 'start' | 'end';
|
|
1660
|
+
/** Whether the shell renders a sidenav at all. False for `top-nav`. */
|
|
1661
|
+
hasSidenav: boolean;
|
|
1662
|
+
sidenavOpened: boolean;
|
|
1663
|
+
sidenavCollapsible: boolean;
|
|
1664
|
+
/** Undefined means unconstrained, which is what an absent `contentMaxWidth` asks for. */
|
|
1665
|
+
contentMaxWidth?: string;
|
|
1070
1666
|
}
|
|
1071
1667
|
/**
|
|
1072
1668
|
* Resolves the layout of one definition.
|
|
@@ -1081,54 +1677,69 @@ interface ResolvedLayout {
|
|
|
1081
1677
|
* `sidenavCollapsible` and `sidenavOpenByDefault` need no such fallback: they are non-optional on the
|
|
1082
1678
|
* entity and the constructor defaults them, so there is always a value to read.
|
|
1083
1679
|
*/
|
|
1084
|
-
declare function layoutOf(definition: AppDefinition | undefined): ResolvedLayout;
|
|
1680
|
+
export declare function layoutOf(definition: AppDefinition | undefined): ResolvedLayout;
|
|
1085
1681
|
/**
|
|
1086
1682
|
* The `--pp-*` overrides of one definition, as a style object to bind on the shell's host element.
|
|
1087
1683
|
*
|
|
1088
1684
|
* Custom properties cascade, so setting them on one element re-tints every framework surface below it
|
|
1089
1685
|
* — which is what makes a themed preview possible at all without an iframe. `materialTheme` and
|
|
1090
|
-
* `colorScheme` are
|
|
1091
|
-
*
|
|
1092
|
-
* document.
|
|
1686
|
+
* `colorScheme` are not handled here but by {@link themeDefaultsOf} and the shell's `ThemeService`, as
|
|
1687
|
+
* classes on the same element.
|
|
1093
1688
|
*
|
|
1094
1689
|
* Keys are passed through untouched, including their leading `--`: Angular's `[style]` binding treats
|
|
1095
1690
|
* a custom property as a custom property, and the contract calls these overrides of the tokens in
|
|
1096
1691
|
* `pp-colors.css`, so anything else would be this function inventing a naming rule.
|
|
1097
1692
|
*/
|
|
1098
|
-
declare function themeVarsOf(definition: AppDefinition | undefined): Record<string, string>;
|
|
1099
|
-
|
|
1693
|
+
export declare function themeVarsOf(definition: AppDefinition | undefined): Record<string, string>;
|
|
1694
|
+
/**
|
|
1695
|
+
* A route that requires a working context, by where the shell serves it: `base` is the module mount's path (empty
|
|
1696
|
+
* for the app's own routes), `path` the route's own. Its pages live at `<base>/ctx/<context>/[<id>/]<path>`.
|
|
1697
|
+
*/
|
|
1698
|
+
interface ContextLink {
|
|
1699
|
+
base: string;
|
|
1700
|
+
path: string;
|
|
1701
|
+
context: string;
|
|
1702
|
+
}
|
|
1100
1703
|
/**
|
|
1101
1704
|
* The `footer` region: the widgets it declares, and nothing else. The contract gives a footer no field
|
|
1102
1705
|
* beyond `widgets`, so this stays a thin styled host over {@link WidgetListComponent} — separate from
|
|
1103
1706
|
* the header only because the two are different slots with different styling, not because they share
|
|
1104
1707
|
* no logic.
|
|
1105
1708
|
*/
|
|
1106
|
-
declare class RegionFooterComponent {
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1709
|
+
export declare class RegionFooterComponent {
|
|
1710
|
+
readonly widgets: import("@angular/core").InputSignal<WidgetInstance$1[]>;
|
|
1711
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RegionFooterComponent, never>;
|
|
1712
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<RegionFooterComponent, "pp-region-footer", never, {
|
|
1713
|
+
"widgets": {
|
|
1714
|
+
"alias": "widgets";
|
|
1715
|
+
"required": false;
|
|
1716
|
+
"isSignal": true;
|
|
1717
|
+
};
|
|
1718
|
+
}, {}, never, never, true, never>;
|
|
1110
1719
|
}
|
|
1111
|
-
|
|
1112
1720
|
/**
|
|
1113
|
-
* The `header` region: the
|
|
1721
|
+
* The `header` region: the widgets the region declares, laid out in one row.
|
|
1114
1722
|
*
|
|
1115
|
-
* The brand is
|
|
1116
|
-
* the
|
|
1117
|
-
*
|
|
1118
|
-
*
|
|
1723
|
+
* The brand is widgets too — `app-logo` and `app-title` — which read the application's name and logo from
|
|
1724
|
+
* the shell's `APPLICATION_CONTEXT`. So a designer orders, omits or restyles them like any other widget, and
|
|
1725
|
+
* the header has no second, built-in way of showing the same thing. `--pp-app-title-color` is set to the
|
|
1726
|
+
* on-header colour here, so the title stays legible on the header surface whatever the theme.
|
|
1119
1727
|
*
|
|
1120
1728
|
* Nav items are *not* handled here. Under the `top-nav` preset the shell places the `sidenav` region's
|
|
1121
1729
|
* nav beside this component in the same row, so that a `top-nav` app with no header region is still
|
|
1122
1730
|
* navigable — see {@link AppShellComponent}.
|
|
1123
1731
|
*/
|
|
1124
|
-
declare class RegionHeaderComponent {
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1732
|
+
export declare class RegionHeaderComponent {
|
|
1733
|
+
readonly widgets: import("@angular/core").InputSignal<WidgetInstance$1[]>;
|
|
1734
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RegionHeaderComponent, never>;
|
|
1735
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<RegionHeaderComponent, "pp-region-header", never, {
|
|
1736
|
+
"widgets": {
|
|
1737
|
+
"alias": "widgets";
|
|
1738
|
+
"required": false;
|
|
1739
|
+
"isSignal": true;
|
|
1740
|
+
};
|
|
1741
|
+
}, {}, never, never, true, never>;
|
|
1130
1742
|
}
|
|
1131
|
-
|
|
1132
1743
|
/** Which way the list runs. The shell decides it from `layout.preset`, not the region definition. */
|
|
1133
1744
|
type NavOrientation = 'vertical' | 'horizontal';
|
|
1134
1745
|
/**
|
|
@@ -1137,20 +1748,20 @@ type NavOrientation = 'vertical' | 'horizontal';
|
|
|
1137
1748
|
* template would re-run on every change detection pass.
|
|
1138
1749
|
*/
|
|
1139
1750
|
interface NavRow {
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1751
|
+
id: string;
|
|
1752
|
+
label: string;
|
|
1753
|
+
/**
|
|
1754
|
+
* Transloco key for {@link label}, preferred over it when the key resolves. Carried onto the row rather
|
|
1755
|
+
* than translated here: `toNavRows` is a pure function and translation depends on the active language
|
|
1756
|
+
* and on which scopes have finished loading, both of which are the template's concern.
|
|
1757
|
+
*/
|
|
1758
|
+
translocoId?: string;
|
|
1759
|
+
icon?: string;
|
|
1760
|
+
/** Present only when the item names a route that something accounts for — see {@link toNavRows}. */
|
|
1761
|
+
routePath?: string;
|
|
1762
|
+
/** The item names a route path, but nothing in the definition accounts for it. */
|
|
1763
|
+
unresolved: boolean;
|
|
1764
|
+
children: NavRow[];
|
|
1154
1765
|
}
|
|
1155
1766
|
/**
|
|
1156
1767
|
* Renders the nav tree of the `sidenav` region — in the sidenav for the two sidenav presets, and
|
|
@@ -1171,16 +1782,78 @@ interface NavRow {
|
|
|
1171
1782
|
* *tenant* content living under a module's own scope, which for an authored module is served by the
|
|
1172
1783
|
* backend rather than shipped as an asset; `ppLabel` falling back is the normal case, not a defect.
|
|
1173
1784
|
*/
|
|
1174
|
-
declare class RegionNavComponent {
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1785
|
+
export declare class RegionNavComponent {
|
|
1786
|
+
readonly navItems: import("@angular/core").InputSignal<NavItem[]>;
|
|
1787
|
+
readonly orientation: import("@angular/core").InputSignal<NavOrientation>;
|
|
1788
|
+
/**
|
|
1789
|
+
* Icon-over-label rows for a narrow layout. Set by the shell on a tablet layout, where a content-sized
|
|
1790
|
+
* drawer with full rows would take too much of the screen; meaningless for the horizontal nav.
|
|
1791
|
+
*/
|
|
1792
|
+
readonly compact: import("@angular/core").InputSignal<boolean>;
|
|
1793
|
+
/** Route paths the definition accounts for, supplied by `AppRegionRenderer`. See {@link toNavRows}. */
|
|
1794
|
+
readonly knownPaths: import("@angular/core").InputSignal<string[]>;
|
|
1795
|
+
/** Routes bound to a working context, supplied by `AppRegionRenderer`: their nav entries lead into the context. */
|
|
1796
|
+
readonly contextLinks: import("@angular/core").InputSignal<ContextLink[]>;
|
|
1797
|
+
private readonly workingContext;
|
|
1798
|
+
private readonly activeIds;
|
|
1799
|
+
protected readonly rows: import("@angular/core").Signal<NavRow[]>;
|
|
1800
|
+
private withContextLinks;
|
|
1801
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RegionNavComponent, never>;
|
|
1802
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<RegionNavComponent, "pp-region-nav", never, {
|
|
1803
|
+
"navItems": {
|
|
1804
|
+
"alias": "navItems";
|
|
1805
|
+
"required": false;
|
|
1806
|
+
"isSignal": true;
|
|
1807
|
+
};
|
|
1808
|
+
"orientation": {
|
|
1809
|
+
"alias": "orientation";
|
|
1810
|
+
"required": false;
|
|
1811
|
+
"isSignal": true;
|
|
1812
|
+
};
|
|
1813
|
+
"compact": {
|
|
1814
|
+
"alias": "compact";
|
|
1815
|
+
"required": false;
|
|
1816
|
+
"isSignal": true;
|
|
1817
|
+
};
|
|
1818
|
+
"knownPaths": {
|
|
1819
|
+
"alias": "knownPaths";
|
|
1820
|
+
"required": false;
|
|
1821
|
+
"isSignal": true;
|
|
1822
|
+
};
|
|
1823
|
+
"contextLinks": {
|
|
1824
|
+
"alias": "contextLinks";
|
|
1825
|
+
"required": false;
|
|
1826
|
+
"isSignal": true;
|
|
1827
|
+
};
|
|
1828
|
+
}, {}, never, never, true, never>;
|
|
1829
|
+
}
|
|
1830
|
+
/**
|
|
1831
|
+
* The concepts the guide explains, in the order an application is assembled. Each is a section with a
|
|
1832
|
+
* stable anchor — see {@link appConceptAnchor} — so a designer tooltip can point at exactly the paragraph
|
|
1833
|
+
* that explains its field.
|
|
1834
|
+
*/
|
|
1835
|
+
export declare const APP_CONCEPTS: readonly ["assembling", "application", "theme", "layout", "regions", "header", "footer", "navigation", "routes", "widgets", "entities", "documents", "modules", "roles", "lifecycle"];
|
|
1836
|
+
type AppConcept = (typeof APP_CONCEPTS)[number];
|
|
1837
|
+
/** Element id of a concept's section; append it as the URL fragment of a page hosting the guide. */
|
|
1838
|
+
export declare function appConceptAnchor(concept: AppConcept): string;
|
|
1839
|
+
/**
|
|
1840
|
+
* The guide hosted by the application samples page: what a dynamic application is made of and how the
|
|
1841
|
+
* pieces relate, written for the person assembling one rather than for a developer.
|
|
1842
|
+
*
|
|
1843
|
+
* The bodies are translation values carrying a little inline markup (`<b>`, `<code>`, `<ul>`), bound
|
|
1844
|
+
* through `[innerHTML]` — Angular's sanitizer keeps exactly that subset, and the text is ours, not the tenant's.
|
|
1845
|
+
*/
|
|
1846
|
+
export declare class AppConceptsGuideComponent {
|
|
1847
|
+
readonly scope = "base_app.concepts";
|
|
1848
|
+
readonly concepts: readonly ["assembling", "application", "theme", "layout", "regions", "header", "footer", "navigation", "routes", "widgets", "entities", "documents", "modules", "roles", "lifecycle"];
|
|
1849
|
+
readonly anchor: typeof appConceptAnchor;
|
|
1850
|
+
private readonly route;
|
|
1851
|
+
private readonly transloco;
|
|
1852
|
+
private readonly injector;
|
|
1853
|
+
constructor();
|
|
1854
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AppConceptsGuideComponent, never>;
|
|
1855
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AppConceptsGuideComponent, "pp-app-concepts-guide", never, {}, {}, never, never, true, never>;
|
|
1182
1856
|
}
|
|
1183
|
-
|
|
1184
1857
|
/**
|
|
1185
1858
|
* The Preview tab, declared once and consumed twice: `BASE_APP_ROUTES` mounts it as
|
|
1186
1859
|
* `app-definition/<id>/preview`, and `AppDefinitionContainerComponent` puts it on the descriptor so the tab bar
|
|
@@ -1193,8 +1866,7 @@ declare class RegionNavComponent {
|
|
|
1193
1866
|
* no `children` at all takes the `loadChildren` path instead, which is cached per Route object and so cannot
|
|
1194
1867
|
* vary by `:entityId`.
|
|
1195
1868
|
*/
|
|
1196
|
-
declare const APP_PREVIEW_TAB: EntityTabDescriptor;
|
|
1197
|
-
|
|
1869
|
+
export declare const APP_PREVIEW_TAB: EntityTabDescriptor;
|
|
1198
1870
|
/**
|
|
1199
1871
|
* Hosts the generic container for `Module Definition`, whose only job is to bind the descriptor to the
|
|
1200
1872
|
* store the routable screens read from.
|
|
@@ -1204,14 +1876,13 @@ declare const APP_PREVIEW_TAB: EntityTabDescriptor;
|
|
|
1204
1876
|
* mount is live, so a module with a lifecycle of its own would make "which version of what is live" a
|
|
1205
1877
|
* question with two answers.
|
|
1206
1878
|
*/
|
|
1207
|
-
declare class ModuleDefinitionContainerComponent {
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1879
|
+
export declare class ModuleDefinitionContainerComponent {
|
|
1880
|
+
private readonly store;
|
|
1881
|
+
readonly entityDescriptor: BaseEntityDescriptor;
|
|
1882
|
+
constructor();
|
|
1883
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ModuleDefinitionContainerComponent, never>;
|
|
1884
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ModuleDefinitionContainerComponent, "pp-module-definition-container", never, {}, {}, never, never, true, never>;
|
|
1213
1885
|
}
|
|
1214
|
-
|
|
1215
1886
|
/**
|
|
1216
1887
|
* The facades of the whole definition graph, to be spread into the application's `providers`.
|
|
1217
1888
|
*
|
|
@@ -1219,7 +1890,7 @@ declare class ModuleDefinitionContainerComponent {
|
|
|
1219
1890
|
* like any other — that is what gives it a store — and only its repository differs, reading and writing
|
|
1220
1891
|
* the `App Definition` document rather than an endpoint of its own.
|
|
1221
1892
|
*/
|
|
1222
|
-
declare const BASE_APP_FACADE_PROVIDERS: Provider[];
|
|
1893
|
+
export declare const BASE_APP_FACADE_PROVIDERS: Provider[];
|
|
1223
1894
|
/**
|
|
1224
1895
|
* The same facades keyed by entity name, to be spread into the application's
|
|
1225
1896
|
* `BASE_ENTITY_FACADE_REGISTRY` value.
|
|
@@ -1230,15 +1901,12 @@ declare const BASE_APP_FACADE_PROVIDERS: Provider[];
|
|
|
1230
1901
|
* because the token holds one value: a second `provide: BASE_ENTITY_FACADE_REGISTRY` would replace the
|
|
1231
1902
|
* application's own entities instead of adding to them.
|
|
1232
1903
|
*/
|
|
1233
|
-
declare const BASE_APP_ENTITY_FACADES: BaseEntityFacadeRegistry;
|
|
1234
|
-
|
|
1904
|
+
export declare const BASE_APP_ENTITY_FACADES: BaseEntityFacadeRegistry;
|
|
1235
1905
|
/**
|
|
1236
1906
|
* The path segment has to be `snakeCaseName('App Definition')`, because
|
|
1237
1907
|
* `BaseFormNavigatorSingletonStore` builds the details URL from the entity name — see the same
|
|
1238
1908
|
* constraint on `BASE_RULE_ROUTES`.
|
|
1239
1909
|
*/
|
|
1240
|
-
declare const BASE_APP_ROUTES: Routes;
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
export type { AppRouteSource, ColorScheme, EntityMode, LayoutDefinition, LayoutPreset, MaterialTheme, ModuleLoader, NavOrientation, RegionType, RegionView, ResolvedLayout, RouteRenderer, RouteTarget, RouteTargetKind, SidenavMode, ThemeDefinition };
|
|
1244
|
-
//# sourceMappingURL=processpuzzle-base-app.d.ts.map
|
|
1910
|
+
export declare const BASE_APP_ROUTES: Routes;
|
|
1911
|
+
export { type AppAsset, type AppConcept, type AppIdResolver, type AppRouteSource, type AppTranslationBundle, type AppTranslationUploadReport, type ColorScheme, type EntityMode, type LayoutDefinition, type LayoutPreset, type MaterialTheme, type ModuleAsset, type ModuleLoader, type ModuleTranslationBundle, type ModuleTranslationCoverage, type ModuleTranslationUploadLanguage, type ModuleTranslationUploadReport, type NavOrientation, type RegionType, type RegionView, type ResolvedLayout, type RouteRenderer, type RouteTarget, type RouteTargetKind, type SidenavMode, type ThemeDefinition, WIDGET_PLACEMENTS, WidgetInstance, type WidgetPlacement };
|
|
1912
|
+
//# sourceMappingURL=processpuzzle-base-app.d.ts.map
|