@processpuzzle/base-app 0.2.1 → 0.3.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.
@@ -1,18 +1,10 @@
1
- import * as _processpuzzle_base_entity from '@processpuzzle/base-entity';
2
- import { BaseEntity, BaseEntityDescriptor, BaseEntityMapper, BaseEntityRestService, PersistedEntity, BaseEntityFacade, EmbeddedEntityFacade, BaseFormHostDirective, EntityTabDescriptor, BaseEntityFacadeRegistry } from '@processpuzzle/base-entity';
3
- import { WidgetInstance } from '@processpuzzle/widgets';
4
- export { WIDGET_PLACEMENTS, WidgetInstance, WidgetPlacement } from '@processpuzzle/widgets';
5
- import { TranslationSource } from '@processpuzzle/util';
6
- import * as _angular_core from '@angular/core';
7
- import { Type, OnDestroy, TemplateRef, OnInit, Provider } from '@angular/core';
8
- import { Observable } from 'rxjs';
9
- import * as _ngrx_signals_rxjs_interop from '@ngrx/signals/rxjs-interop';
10
- import * as _angular_material_table from '@angular/material/table';
11
- import * as _angular_material_paginator from '@angular/material/paginator';
12
- import * as _ngrx_signals from '@ngrx/signals';
13
- import { Route, Routes, CanMatchFn } from '@angular/router';
14
- import * as _processpuzzle_base_app from '@processpuzzle/base-app';
15
-
1
+ import { BaseEntity, BaseEntityDescriptor, BaseEntityFacade, BaseEntityFacadeRegistry, BaseEntityMapper, BaseEntityRestService, BaseFormHostDirective, EmbeddedEntityFacade, EntityTabDescriptor, PersistedEntity } from "@processpuzzle/base-entity";
2
+ import { ThemeColorScheme, ThemePreset, ThemeSelection, WIDGET_PLACEMENTS, WidgetInstance, WidgetInstance as WidgetInstance$1, WidgetPlacement } from "@processpuzzle/widgets";
3
+ import { LayoutService, TranslationSource } from "@processpuzzle/util";
4
+ import * as i0 from "@angular/core";
5
+ import { OnDestroy, OnInit, Provider, TemplateRef, Type } from "@angular/core";
6
+ import { Observable } from "rxjs";
7
+ import { CanMatchFn, Route, Routes } from "@angular/router";
16
8
  /**
17
9
  * Frontend model of the `AppDefinition` schema of `base-app-api.yaml`. `theme` and `layout` are
18
10
  * flattened onto the entity by {@link AppDefinitionMapper} so that the generated form can offer a
@@ -33,101 +25,106 @@ import * as _processpuzzle_base_app from '@processpuzzle/base-app';
33
25
  * needs a constructor. They stay plain data — the rows of a loaded aggregate are the parsed JSON,
34
26
  * never instances of these classes, so nothing may rely on `instanceof` or on a method.
35
27
  */
36
- declare const MATERIAL_THEMES: readonly ["azure-blue", "rose-red", "magenta-violet", "cyan-orange"];
37
- type MaterialTheme = (typeof MATERIAL_THEMES)[number];
38
- declare const COLOR_SCHEMES: readonly ["light", "dark", "auto"];
39
- type ColorScheme = (typeof COLOR_SCHEMES)[number];
40
- declare const LAYOUT_PRESETS: readonly ["sidenav-left", "sidenav-right", "top-nav"];
28
+ /**
29
+ * The theme presets and colour schemes the contract's `MaterialTheme` / `ColorScheme` enums allow. They are
30
+ * the widgets library's lists, because that is where the stylesheet defining them and the `ThemesButton`
31
+ * picking from them live.
32
+ */
33
+ export declare const MATERIAL_THEMES: readonly ["processpuzzle", "azure-blue", "rose-red", "magenta-violet", "cyan-orange", "indigo-pink", "deeppurple-amber", "pink-bluegrey", "purple-green"];
34
+ type MaterialTheme = ThemePreset;
35
+ export declare const COLOR_SCHEMES: readonly ["light", "dark", "auto"];
36
+ type ColorScheme = ThemeColorScheme;
37
+ export declare const LAYOUT_PRESETS: readonly ["sidenav-left", "sidenav-right", "top-nav"];
41
38
  type LayoutPreset = (typeof LAYOUT_PRESETS)[number];
42
- declare const SIDENAV_MODES: readonly ["side", "over", "push"];
39
+ export declare const SIDENAV_MODES: readonly ["side", "over", "push"];
43
40
  type SidenavMode = (typeof SIDENAV_MODES)[number];
44
41
  /**
45
42
  * No `content`: once routes own the content area it *is* the router outlet, so a content region would
46
43
  * have no field of its own — `widgets` is header/footer-only and `navItems` sidenav-only. Its sizing
47
44
  * lives in {@link LayoutDefinition.contentMaxWidth}.
48
45
  */
49
- declare const REGION_TYPES: readonly ["header", "sidenav", "footer"];
46
+ export declare const REGION_TYPES: readonly ["header", "sidenav", "footer"];
50
47
  type RegionType = (typeof REGION_TYPES)[number];
51
48
  /**
52
49
  * What a route renders. Uppercase because the contract's enum is — `RegionType` and the theme enums
53
50
  * are lowercase, and mixing the two up is a silent miss rather than a type error once a value reaches
54
51
  * JSON.
55
52
  */
56
- declare const ROUTE_TARGET_KINDS: readonly ["WIDGETS", "DOCUMENT", "ENTITY"];
53
+ export declare const ROUTE_TARGET_KINDS: readonly ["WIDGETS", "DOCUMENT", "ENTITY"];
57
54
  type RouteTargetKind = (typeof ROUTE_TARGET_KINDS)[number];
58
- declare const ENTITY_MODES: readonly ["LIST", "DETAILS"];
55
+ export declare const ENTITY_MODES: readonly ["LIST", "DETAILS"];
59
56
  type EntityMode = (typeof ENTITY_MODES)[number];
60
- declare enum AppDefinitionStatus {
61
- DRAFT = "DRAFT",
62
- PUBLISHED = "PUBLISHED"
57
+ export declare enum AppDefinitionStatus {
58
+ DRAFT = "DRAFT",
59
+ PUBLISHED = "PUBLISHED"
63
60
  }
64
61
  interface ThemeDefinition {
65
- materialTheme?: MaterialTheme;
66
- colorScheme?: ColorScheme;
67
- /** Overrides for the `--pp-*` custom properties of `widgets/src/theme/pp-colors.css`. */
68
- tokenOverrides?: Record<string, string>;
69
- logoUrl?: string;
70
- faviconUrl?: string;
62
+ materialTheme?: MaterialTheme;
63
+ colorScheme?: ColorScheme;
64
+ /** Overrides for the `--pp-*` custom properties of `base-widget-frontend/src/theme/pp-colors.css`. */
65
+ tokenOverrides?: Record<string, string>;
66
+ logoUrl?: string;
67
+ faviconUrl?: string;
71
68
  }
72
69
  interface LayoutDefinition {
73
- preset?: LayoutPreset;
74
- sidenavMode?: SidenavMode;
75
- sidenavCollapsible?: boolean;
76
- sidenavOpenByDefault?: boolean;
77
- contentMaxWidth?: string;
70
+ preset?: LayoutPreset;
71
+ sidenavMode?: SidenavMode;
72
+ sidenavCollapsible?: boolean;
73
+ sidenavOpenByDefault?: boolean;
74
+ contentMaxWidth?: string;
78
75
  }
79
- declare class NavItem implements BaseEntity {
80
- id: string;
81
- label: string;
82
- translocoId?: string;
83
- icon?: string;
84
- /**
85
- * `RouteDefinition.path` of the route this entry navigates to, resolved by string. Absent on a group
86
- * node, which expands its {@link children} instead of navigating.
87
- *
88
- * A path naming no route is a validation *warning* server-side, not an error: it may name a route of
89
- * a module that has not been authored yet, and modules stay loosely coupled.
90
- */
91
- routePath?: string;
92
- roles?: string[];
93
- children?: NavItem[];
94
- constructor(init?: Partial<NavItem>);
76
+ export declare class NavItem implements BaseEntity {
77
+ id: string;
78
+ label: string;
79
+ translocoId?: string;
80
+ icon?: string;
81
+ /**
82
+ * `RouteDefinition.path` of the route this entry navigates to, resolved by string. Absent on a group
83
+ * node, which expands its {@link children} instead of navigating.
84
+ *
85
+ * A path naming no route is a validation *warning* server-side, not an error: it may name a route of
86
+ * a module that has not been authored yet, and modules stay loosely coupled.
87
+ */
88
+ routePath?: string;
89
+ roles?: string[];
90
+ children?: NavItem[];
91
+ constructor(init?: Partial<NavItem>);
95
92
  }
96
- declare class RegionDefinition implements BaseEntity {
97
- /**
98
- * Declared, never assigned. The contract gives a region no `id` — `type` identifies it, see
99
- * `APP_REGION_ID_FIELD` — but `BaseEntity`'s only property is an optional `id`, and TypeScript's
100
- * weak-type rule rejects a type that shares no property with it. `declare` emits nothing, so the
101
- * payload stays exactly the shape the schema describes.
102
- */
103
- readonly id?: string;
104
- /**
105
- * Required by the contract, but undefined while a region is being created — the dropdown is declared
106
- * `required`, so the form is what enforces the contract before the row reaches the payload.
107
- */
108
- type: RegionType | undefined;
109
- /** `sidenav` only; left undefined so a header region's payload carries no empty nav tree. */
110
- navItems?: NavItem[];
111
- /** `header` / `footer` only. */
112
- widgets?: WidgetInstance[];
113
- constructor(init?: Partial<RegionDefinition>);
93
+ export declare class RegionDefinition implements BaseEntity {
94
+ /**
95
+ * Declared, never assigned. The contract gives a region no `id` — `type` identifies it, see
96
+ * `APP_REGION_ID_FIELD` — but `BaseEntity`'s only property is an optional `id`, and TypeScript's
97
+ * weak-type rule rejects a type that shares no property with it. `declare` emits nothing, so the
98
+ * payload stays exactly the shape the schema describes.
99
+ */
100
+ readonly id?: string;
101
+ /**
102
+ * Required by the contract, but undefined while a region is being created — the dropdown is declared
103
+ * `required`, so the form is what enforces the contract before the row reaches the payload.
104
+ */
105
+ type: RegionType | undefined;
106
+ /** `sidenav` only; left undefined so a header region's payload carries no empty nav tree. */
107
+ navItems?: NavItem[];
108
+ /** `header` / `footer` only. */
109
+ widgets?: WidgetInstance$1[];
110
+ constructor(init?: Partial<RegionDefinition>);
114
111
  }
115
112
  /**
116
113
  * The nested `target` object of the DTO. Only {@link AppDefinitionMapper} handles it — the form works
117
114
  * on the fields {@link RouteDefinition} carries flattened — so it is an interface rather than a class.
118
115
  */
119
116
  interface RouteTarget {
120
- kind: RouteTargetKind;
121
- /** WIDGETS only. */
122
- widgets?: WidgetInstance[];
123
- /** DOCUMENT only. */
124
- documentSlug?: string;
125
- /** ENTITY only. */
126
- entityName?: string;
127
- /** ENTITY only. */
128
- entityMode?: EntityMode;
129
- /** ENTITY + LIST only. */
130
- rsqlFilter?: string;
117
+ kind: RouteTargetKind;
118
+ /** WIDGETS only. */
119
+ widgets?: WidgetInstance$1[];
120
+ /** DOCUMENT only. */
121
+ documentSlug?: string;
122
+ /** ENTITY only. */
123
+ entityName?: string;
124
+ /** ENTITY only. */
125
+ entityMode?: EntityMode;
126
+ /** ENTITY + LIST only. */
127
+ rsqlFilter?: string;
131
128
  }
132
129
  /**
133
130
  * One navigable route. **Flat: a route has no children.** `path` may be multi-segment, so `claims`,
@@ -139,80 +136,79 @@ interface RouteTarget {
139
136
  * The `target` fields are flattened onto the row and re-nested by {@link AppDefinitionMapper}; which of
140
137
  * them are meaningful follows from {@link kind}, and the backend — not the form — is what enforces it.
141
138
  */
142
- declare class RouteDefinition implements BaseEntity {
143
- /**
144
- * Declared, never assigned. The contract gives a route no `id`: `path` identifies it, which is what
145
- * a `NavItem.routePath` resolves against. Same reason as {@link RegionDefinition.id}.
146
- */
147
- readonly id?: string;
148
- /** Relative to the app root, no leading slash. May contain `/` for depth and `:name` for a parameter. */
149
- path: string;
150
- title: string;
151
- translocoId?: string;
152
- icon?: string;
153
- /** Empty or absent means any authenticated member of the organization, as on {@link NavItem.roles}. */
154
- roles?: string[];
155
- /**
156
- * Required by the contract, but undefined while a route is being created — the dropdown is declared
157
- * `required`, so the form is what enforces it before the row reaches the payload.
158
- */
159
- kind: RouteTargetKind | undefined;
160
- /** WIDGETS only. Starts as an empty array so the embedded list has something to append to. */
161
- widgets: WidgetInstance[];
162
- documentSlug?: string;
163
- entityName?: string;
164
- entityMode?: EntityMode;
165
- rsqlFilter?: string;
166
- /** The object the flattened fields came from, preserved so a save cannot drop a future field. */
167
- target?: RouteTarget;
168
- constructor(init?: Partial<RouteDefinition>);
139
+ export declare class RouteDefinition implements BaseEntity {
140
+ /**
141
+ * Declared, never assigned. The contract gives a route no `id`: `path` identifies it, which is what
142
+ * a `NavItem.routePath` resolves against. Same reason as {@link RegionDefinition.id}.
143
+ */
144
+ readonly id?: string;
145
+ /** Relative to the app root, no leading slash. May contain `/` for depth and `:name` for a parameter. */
146
+ path: string;
147
+ title: string;
148
+ translocoId?: string;
149
+ icon?: string;
150
+ /** Empty or absent means any authenticated member of the organization, as on {@link NavItem.roles}. */
151
+ roles?: string[];
152
+ /**
153
+ * Required by the contract, but undefined while a route is being created — the dropdown is declared
154
+ * `required`, so the form is what enforces it before the row reaches the payload.
155
+ */
156
+ kind: RouteTargetKind | undefined;
157
+ /** WIDGETS only. Starts as an empty array so the embedded list has something to append to. */
158
+ widgets: WidgetInstance$1[];
159
+ documentSlug?: string;
160
+ entityName?: string;
161
+ entityMode?: EntityMode;
162
+ rsqlFilter?: string;
163
+ /** The object the flattened fields came from, preserved so a save cannot drop a future field. */
164
+ target?: RouteTarget;
165
+ constructor(init?: Partial<RouteDefinition>);
169
166
  }
170
167
  /**
171
168
  * Mounts a module's routes under {@link basePath}. The one place route structure composes, and it
172
169
  * composes exactly one level deep: a module cannot mount modules.
173
170
  */
174
- declare class ModuleMount implements BaseEntity {
175
- /** `moduleKey` identifies the mount; the contract gives it no `id`. */
176
- readonly id?: string;
177
- /**
178
- * Key of a `ModuleDefinition` in this organization. One naming no existing module is a validation
179
- * warning, not an error — an app may mount a module before it has been authored.
180
- */
181
- moduleKey: string;
182
- basePath: string;
183
- constructor(init?: Partial<ModuleMount>);
171
+ export declare class ModuleMount implements BaseEntity {
172
+ /** `moduleKey` identifies the mount; the contract gives it no `id`. */
173
+ readonly id?: string;
174
+ /**
175
+ * Key of a `ModuleDefinition` in this organization. One naming no existing module is a validation
176
+ * warning, not an error — an app may mount a module before it has been authored.
177
+ */
178
+ moduleKey: string;
179
+ basePath: string;
180
+ constructor(init?: Partial<ModuleMount>);
184
181
  }
185
- declare class AppDefinition implements BaseEntity {
186
- /** Unique within the organization and used verbatim as the run-time route segment. */
187
- id: string;
188
- name: string;
189
- translocoId: string | undefined;
190
- description: string | undefined;
191
- materialTheme: MaterialTheme | undefined;
192
- colorScheme: ColorScheme | undefined;
193
- tokenOverrides: Record<string, string> | undefined;
194
- logoUrl: string | undefined;
195
- faviconUrl: string | undefined;
196
- preset: LayoutPreset | undefined;
197
- sidenavMode: SidenavMode | undefined;
198
- sidenavCollapsible: boolean;
199
- sidenavOpenByDefault: boolean;
200
- contentMaxWidth: string | undefined;
201
- /** The objects the flattened fields came from, preserved so a save cannot drop a future field. */
202
- theme: ThemeDefinition | undefined;
203
- layout: LayoutDefinition | undefined;
204
- regions: RegionDefinition[] | undefined;
205
- routes: RouteDefinition[] | undefined;
206
- modules: ModuleMount[] | undefined;
207
- orgKey: string | undefined;
208
- status: AppDefinitionStatus | undefined;
209
- version: number | undefined;
210
- publishedVersion: number | undefined;
211
- createdAt: string | undefined;
212
- updatedAt: string | undefined;
213
- constructor(init?: Partial<AppDefinition>);
182
+ export declare class AppDefinition implements BaseEntity {
183
+ /** Unique within the organization and used verbatim as the run-time route segment. */
184
+ id: string;
185
+ name: string;
186
+ translocoId: string | undefined;
187
+ description: string | undefined;
188
+ materialTheme: MaterialTheme | undefined;
189
+ colorScheme: ColorScheme | undefined;
190
+ tokenOverrides: Record<string, string> | undefined;
191
+ logoUrl: string | undefined;
192
+ faviconUrl: string | undefined;
193
+ preset: LayoutPreset | undefined;
194
+ sidenavMode: SidenavMode | undefined;
195
+ sidenavCollapsible: boolean;
196
+ sidenavOpenByDefault: boolean;
197
+ contentMaxWidth: string | undefined;
198
+ /** The objects the flattened fields came from, preserved so a save cannot drop a future field. */
199
+ theme: ThemeDefinition | undefined;
200
+ layout: LayoutDefinition | undefined;
201
+ regions: RegionDefinition[] | undefined;
202
+ routes: RouteDefinition[] | undefined;
203
+ modules: ModuleMount[] | undefined;
204
+ orgKey: string | undefined;
205
+ status: AppDefinitionStatus | undefined;
206
+ version: number | undefined;
207
+ publishedVersion: number | undefined;
208
+ createdAt: string | undefined;
209
+ updatedAt: string | undefined;
210
+ constructor(init?: Partial<AppDefinition>);
214
211
  }
215
-
216
212
  /**
217
213
  * Frontend model of the `ModuleDefinition` schema of `base-app-api.yaml`: a lazily-loadable slice of an
218
214
  * application, with its own flat route list and its own transloco scope. An {@link ModuleMount} of an
@@ -228,44 +224,43 @@ declare class AppDefinition implements BaseEntity {
228
224
  * Unlike the region / route / mount classes this one is a **routable** entity: it has endpoints of its
229
225
  * own, so it comes with a service, a store and a facade rather than travelling inside another payload.
230
226
  */
231
- declare class ModuleDefinition implements BaseEntity {
232
- /**
233
- * The contract calls this field `key`; base-entity keys every store, URL and reference on `id`, so
234
- * {@link ModuleDefinitionMapper} renames it on the way in and out rather than teaching the framework a
235
- * second identity field. One name for one thing on this side of the mapper — a `key` property beside
236
- * `id` could only ever disagree with it.
237
- *
238
- * Immutable by contract: `ModuleMount.moduleKey` resolves against it, and a rename would silently
239
- * unmount the module from every app that mounts it.
240
- */
241
- id: string;
242
- name: string;
243
- translocoId: string | undefined;
244
- description: string | undefined;
245
- /**
246
- * Transloco scope the module's translations load under. Absent means {@link id}, which is the default
247
- * the contract states; {@link moduleTranslocoScope} is the one place that default is applied.
248
- */
249
- translocoScope: string | undefined;
250
- /**
251
- * The module's routes, flat and relative to the base path it is mounted at — the same shape and the
252
- * same derived nesting as `AppDefinition.routes`, and flattened by the same mapper. A module does not
253
- * mount modules: this is where composition stops.
254
- */
255
- routes: RouteDefinition[] | undefined;
256
- orgKey: string | undefined;
257
- version: number | undefined;
258
- createdAt: string | undefined;
259
- updatedAt: string | undefined;
260
- constructor(init?: Partial<ModuleDefinition>);
227
+ export declare class ModuleDefinition implements BaseEntity {
228
+ /**
229
+ * The contract calls this field `key`; base-entity keys every store, URL and reference on `id`, so
230
+ * {@link ModuleDefinitionMapper} renames it on the way in and out rather than teaching the framework a
231
+ * second identity field. One name for one thing on this side of the mapper — a `key` property beside
232
+ * `id` could only ever disagree with it.
233
+ *
234
+ * Immutable by contract: `ModuleMount.moduleKey` resolves against it, and a rename would silently
235
+ * unmount the module from every app that mounts it.
236
+ */
237
+ id: string;
238
+ name: string;
239
+ translocoId: string | undefined;
240
+ description: string | undefined;
241
+ /**
242
+ * Transloco scope the module's translations load under. Absent means {@link id}, which is the default
243
+ * the contract states; {@link moduleTranslocoScope} is the one place that default is applied.
244
+ */
245
+ translocoScope: string | undefined;
246
+ /**
247
+ * The module's routes, flat and relative to the base path it is mounted at — the same shape and the
248
+ * same derived nesting as `AppDefinition.routes`, and flattened by the same mapper. A module does not
249
+ * mount modules: this is where composition stops.
250
+ */
251
+ routes: RouteDefinition[] | undefined;
252
+ orgKey: string | undefined;
253
+ version: number | undefined;
254
+ createdAt: string | undefined;
255
+ updatedAt: string | undefined;
256
+ constructor(init?: Partial<ModuleDefinition>);
261
257
  }
262
258
  /**
263
259
  * The scope a module's translations load under, applying the contract's default. Kept as a function
264
260
  * rather than resolved in the mapper, so a definition never carries a `translocoScope` the designer did
265
261
  * not author — the field stays empty in the form, and the fallback is a rendering decision.
266
262
  */
267
- declare function moduleTranslocoScope(definition: ModuleDefinition): string;
268
-
263
+ export declare function moduleTranslocoScope(definition: ModuleDefinition): string;
269
264
  /**
270
265
  * Transloco scope of this library. The translations live in
271
266
  * `libs/js-shared/base-app-frontend/src/assets/i18n/base_app/*.json` and are published with the
@@ -276,34 +271,46 @@ declare function moduleTranslocoScope(definition: ModuleDefinition): string;
276
271
  * The alias is spelled out on purpose: transloco camel-cases the default alias, which would turn
277
272
  * `base_app` into `baseApp` and silently miss every key below.
278
273
  */
279
- declare const BASE_APP_TRANSLOCO_SCOPE = "base_app";
274
+ export declare const BASE_APP_TRANSLOCO_SCOPE = "base_app";
275
+ /**
276
+ * Scope of the generic framework labels (`base_entity.tabs.*`, `base_entity.toolbar.*`), whose files
277
+ * base-entity owns. It has to be registered next to {@link BASE_APP_TRANSLOCO_SCOPE} wherever the
278
+ * generic screens are hosted: `BaseEntityTabsComponent` translates from it through `TranslocoPipe`,
279
+ * which caches the value it resolved for a key on first render. If only `base_app` were loaded, the
280
+ * tabs would keep the raw key even after the toolbar — which registers this scope for itself —
281
+ * triggers the load.
282
+ */
283
+ declare const BASE_ENTITY_TRANSLOCO_SCOPE = "base_entity";
280
284
  /** Key root of the `AppDefinition` entity name (`._self`) and of its attribute labels. */
281
- declare const APP_DEFINITION_I18N_SCOPE = "base_app.app_definition";
285
+ export declare const APP_DEFINITION_I18N_SCOPE = "base_app.app_definition";
282
286
  /**
283
287
  * Label of the Preview tab. Under this library's own scope rather than `base_entity.tabs.*`: the generic
284
288
  * tabs are List and Details, and an application preview is this feature's contribution, not the framework's.
285
289
  * Resolved with `{ entity }` like the generic tab labels, so a translation may name the entity if it reads
286
290
  * better that way.
287
291
  */
288
- declare const APP_PREVIEW_I18N_KEY = "base_app.app_definition.tabs.preview";
292
+ export declare const APP_PREVIEW_I18N_KEY = "base_app.app_definition.tabs.preview";
289
293
  /**
290
294
  * Key root of the `ModuleDefinition` entity name and attribute labels. A child of this library's scope
291
295
  * like the one above, and not to be confused with `ModuleDefinition.translocoScope`, which is a scope an
292
296
  * *authored* module's own translations load under — see {@link moduleTranslocoScope}. These keys are the
293
297
  * framework's labels for the authoring form; that one is the tenant's content.
294
298
  */
295
- declare const MODULE_DEFINITION_I18N_SCOPE = "base_app.module_definition";
299
+ export declare const MODULE_DEFINITION_I18N_SCOPE = "base_app.module_definition";
296
300
  /**
297
301
  * Key roots of the nested definitions the `AppDefinition` form contains through `EMBEDDED_COMPONENTS`
298
302
  * controls. They are children of {@link BASE_APP_TRANSLOCO_SCOPE} rather than scopes of their own,
299
303
  * because the whole graph is edited under `BASE_APP_ROUTES` and one scope registration has to cover
300
304
  * all of it — the embedded route branches add none.
301
305
  */
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";
306
+ export declare const APP_REGION_I18N_SCOPE = "base_app.app_region";
307
+ export declare const APP_ROUTE_I18N_SCOPE = "base_app.app_route";
308
+ export declare const APP_MODULE_MOUNT_I18N_SCOPE = "base_app.app_module_mount";
309
+ export declare const APP_NAV_ITEM_I18N_SCOPE = "base_app.app_nav_item";
310
+ export declare const APP_WIDGET_I18N_SCOPE = "base_app.app_widget";
311
+ /** Keys of the `Publish` form action contributed by `AppDefinitionContainerComponent`. */
312
+ declare const PUBLISH_BUTTON_I18N_KEY = "base_app.publish.button";
313
+ declare const PUBLISH_TOOLTIP_I18N_KEY = "base_app.publish.tooltip";
307
314
  /**
308
315
  * Where this library's transloco bundles come from when the application ships without its assets.
309
316
  *
@@ -313,8 +320,7 @@ declare const APP_WIDGET_I18N_SCOPE = "base_app.app_widget";
313
320
  * host that skips that copy step. It is declared here rather than in the application because which
314
321
  * backend owns a scope is base-app's knowledge, not its caller's.
315
322
  */
316
- declare const BASE_APP_TRANSLATION_SOURCE: TranslationSource;
317
-
323
+ export declare const BASE_APP_TRANSLATION_SOURCE: TranslationSource;
318
324
  /**
319
325
  * Entity names of the app-definition graph, kept in one dependency-free module.
320
326
  *
@@ -322,35 +328,30 @@ declare const BASE_APP_TRANSLATION_SOURCE: TranslationSource;
322
328
  * aggregates `App Region`, and `App Region` names `App Definition` as its `componentParent`. Each
323
329
  * descriptor module re-exports its own name, so importers are unaffected.
324
330
  */
325
- declare const APP_DEFINITION_ENTITY_NAME = "App Definition";
331
+ export declare const APP_DEFINITION_ENTITY_NAME = "App Definition";
326
332
  /**
327
333
  * A second aggregate root beside `App Definition`, not a part of it — hence no `App` prefix, which in
328
334
  * every other name here marks something the app document carries. `App Module Mount` is the row inside
329
335
  * an app that *names* one of these.
330
336
  */
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
-
337
+ export declare const MODULE_DEFINITION_ENTITY_NAME = "Module Definition";
338
+ export declare const APP_MODULE_MOUNT_ENTITY_NAME = "App Module Mount";
339
+ export declare const APP_NAV_ITEM_ENTITY_NAME = "App Nav Item";
340
+ export declare const APP_REGION_ENTITY_NAME = "App Region";
341
+ export declare const APP_ROUTE_ENTITY_NAME = "App Route";
342
+ export declare const APP_WIDGET_ENTITY_NAME = "App Widget";
343
+ export declare function createAppDefinitionDescriptor(): BaseEntityDescriptor;
340
344
  /** `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
-
345
+ export declare const APP_MODULE_MOUNT_ID_FIELD = "moduleKey";
346
+ export declare function createModuleMountDescriptor(): BaseEntityDescriptor;
347
+ export declare function createNavItemDescriptor(): BaseEntityDescriptor;
346
348
  /**
347
349
  * `RegionDefinition` has no `id` — a region is identified by the shell slot it fills, and an app
348
350
  * declares each slot at most once. Referencing attributes therefore have to set
349
351
  * `referenceIdField = 'type'`; see the `regions` attribute of the `AppDefinition` descriptor.
350
352
  */
351
- declare const APP_REGION_ID_FIELD = "type";
352
- declare function createRegionDefinitionDescriptor(): BaseEntityDescriptor;
353
-
353
+ export declare const APP_REGION_ID_FIELD = "type";
354
+ export declare function createRegionDefinitionDescriptor(): BaseEntityDescriptor;
354
355
  /**
355
356
  * `RouteDefinition` has no `id` — `path` identifies a route, and it is what a `NavItem.routePath`
356
357
  * resolves against. Referencing attributes therefore have to set `referenceIdField = 'path'`; see the
@@ -361,44 +362,62 @@ declare function createRegionDefinitionDescriptor(): BaseEntityDescriptor;
361
362
  * reverse proxy that normalizes `%2F` before the SPA sees it would not — worth an e2e case once
362
363
  * multi-segment routes are authored in the testbed.
363
364
  */
364
- declare const APP_ROUTE_ID_FIELD = "path";
365
- declare function createRouteDefinitionDescriptor(): BaseEntityDescriptor;
366
-
367
- declare function createWidgetInstanceDescriptor(): BaseEntityDescriptor;
368
-
369
- declare function createModuleDefinitionDescriptor(): BaseEntityDescriptor;
370
-
365
+ export declare const APP_ROUTE_ID_FIELD = "path";
366
+ export declare function createRouteDefinitionDescriptor(): BaseEntityDescriptor;
367
+ export declare function createWidgetInstanceDescriptor(): BaseEntityDescriptor;
368
+ export declare function createModuleDefinitionDescriptor(): BaseEntityDescriptor;
371
369
  /** The `RouteDefinition` schema as it travels: `target` nested, exactly as the contract declares it. */
372
370
  interface RouteDefinitionDto {
373
- path?: string;
374
- title?: string;
375
- translocoId?: string;
376
- icon?: string;
377
- roles?: string[];
378
- target?: RouteTarget;
371
+ path?: string;
372
+ title?: string;
373
+ translocoId?: string;
374
+ icon?: string;
375
+ roles?: string[];
376
+ target?: RouteTarget;
379
377
  }
380
-
378
+ /**
379
+ * The `target` flattening both aggregates that own routes need — `AppDefinition.routes` and
380
+ * `ModuleDefinition.routes` carry the same schema, and a route authored in a module has to behave
381
+ * exactly like one authored in an app.
382
+ *
383
+ * Why flatten at all: `EMBEDDED_COMPONENTS` edits a row as the flat JSON it arrived as, and a descriptor
384
+ * addresses one property rather than a path, so nothing in the generated form could reach
385
+ * `target.documentSlug`. The contract already keeps `RouteTarget` flat rather than a `oneOf` for the
386
+ * related reason that the form cannot edit a discriminated union of classes.
387
+ */
388
+ declare function flattenRouteTarget(dto: RouteDefinitionDto): RouteDefinition;
389
+ /**
390
+ * The inverse. `kind` is non-optional in the contract but undefined on a row the designer has not
391
+ * finished — the dropdown is `required`, so the form rejects that before a save; the cast keeps this
392
+ * mapping from having to invent a default the backend would then have to second-guess.
393
+ *
394
+ * `widgets` is omitted when empty rather than sent as `[]`, so a DOCUMENT or ENTITY route does not
395
+ * persist an empty widget list it has no use for. The rest is merged onto the `target` the fields were
396
+ * lifted out of, which preserves any field a later contract version adds before this mapping learns
397
+ * about it — a PUT is a full replacement, so anything dropped here is dropped for good.
398
+ */
399
+ declare function nestRouteTarget(route: RouteDefinition): RouteDefinitionDto;
381
400
  interface AppDefinitionDto {
382
- id?: string;
383
- name?: string;
384
- translocoId?: string;
385
- description?: string;
386
- theme?: ThemeDefinition;
387
- layout?: LayoutDefinition;
388
- regions?: AppDefinition['regions'];
389
- routes?: RouteDefinitionDto[];
390
- modules?: AppDefinition['modules'];
391
- orgKey?: string;
392
- status?: AppDefinitionStatus;
393
- version?: number;
394
- publishedVersion?: number;
395
- createdAt?: string;
396
- updatedAt?: string;
401
+ id?: string;
402
+ name?: string;
403
+ translocoId?: string;
404
+ description?: string;
405
+ theme?: ThemeDefinition;
406
+ layout?: LayoutDefinition;
407
+ regions?: AppDefinition['regions'];
408
+ routes?: RouteDefinitionDto[];
409
+ modules?: AppDefinition['modules'];
410
+ orgKey?: string;
411
+ status?: AppDefinitionStatus;
412
+ version?: number;
413
+ publishedVersion?: number;
414
+ createdAt?: string;
415
+ updatedAt?: string;
397
416
  }
398
417
  /** What `PUT /app-definitions/{appId}` receives: the DTO with `theme` and `layout` always rebuilt. */
399
418
  type AppDefinitionPayload = AppDefinitionDto & {
400
- theme: ThemeDefinition;
401
- layout: LayoutDefinition;
419
+ theme: ThemeDefinition;
420
+ layout: LayoutDefinition;
402
421
  };
403
422
  /**
404
423
  * Translates between the `AppDefinition` DTO of `base-app-api.yaml` and the flat entity the
@@ -416,95 +435,116 @@ type AppDefinitionPayload = AppDefinitionDto & {
416
435
  * `route-definition.mapper.ts` rather than here, because `ModuleDefinition.routes` carries the same
417
436
  * schema and a route authored in a module has to behave exactly like one authored in an app.
418
437
  */
419
- declare class AppDefinitionMapper implements BaseEntityMapper<AppDefinition> {
420
- fromDto(dto: unknown): AppDefinition;
421
- toDto(entity: AppDefinition): AppDefinitionPayload;
422
- private mergeTheme;
423
- private mergeLayout;
424
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<AppDefinitionMapper, never>;
425
- static ɵprov: _angular_core.ɵɵInjectableDeclaration<AppDefinitionMapper>;
438
+ export declare class AppDefinitionMapper implements BaseEntityMapper<AppDefinition> {
439
+ fromDto(dto: unknown): AppDefinition;
440
+ toDto(entity: AppDefinition): AppDefinitionPayload;
441
+ private mergeTheme;
442
+ private mergeLayout;
443
+ static ɵfac: i0.ɵɵFactoryDeclaration<AppDefinitionMapper, never>;
444
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
426
445
  }
427
-
428
446
  /**
429
447
  * REST access to `/organizations/{orgKey}/app-definitions`. As in base-rule, the organization is
430
448
  * part of the configured service root — `APP_SERVICE_ROOT`, the optional per-feature escape hatch,
431
449
  * falling back to `BACKEND_SERVICE_ROOT`, which is what every deployment actually sets — so the
432
450
  * tenant is a deployment concern rather than something every call has to carry.
433
451
  */
434
- declare class AppDefinitionService extends BaseEntityRestService<AppDefinition> {
435
- protected entityMapper: AppDefinitionMapper;
436
- constructor(entityMapper: AppDefinitionMapper);
437
- /**
438
- * `POST /app-definitions/{appId}/publish` — promotes the stored `version` to `publishedVersion` and
439
- * sets the status to `PUBLISHED`. The backend validates the definition first and answers 400 when it
440
- * is not publishable, so the caller only has to deal with the happy path and the error.
441
- */
442
- publish(id: string): Observable<PersistedEntity<AppDefinition>>;
443
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<AppDefinitionService, never>;
444
- static ɵprov: _angular_core.ɵɵInjectableDeclaration<AppDefinitionService>;
452
+ export declare class AppDefinitionService extends BaseEntityRestService<AppDefinition> {
453
+ protected entityMapper: AppDefinitionMapper;
454
+ constructor(entityMapper: AppDefinitionMapper);
455
+ /**
456
+ * `POST /app-definitions/{appId}/publish` — promotes the stored `version` to `publishedVersion` and
457
+ * sets the status to `PUBLISHED`. The backend validates the definition first and answers 400 when it
458
+ * is not publishable, so the caller only has to deal with the happy path and the error.
459
+ */
460
+ publish(id: string): Observable<PersistedEntity<AppDefinition>>;
461
+ static ɵfac: i0.ɵɵFactoryDeclaration<AppDefinitionService, never>;
462
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
445
463
  }
446
-
447
- declare const AppDefinitionStore: _angular_core.Type<{
448
- entities: _angular_core.Signal<AppDefinition[]>;
449
- number: _angular_core.Signal<number>;
450
- size: _angular_core.Signal<number>;
451
- totalElements: _angular_core.Signal<number>;
452
- totalPages: _angular_core.Signal<number>;
453
- currentId: _angular_core.Signal<string | undefined>;
454
- currentEntity: _angular_core.Signal<AppDefinition | undefined>;
455
- isLoading: _angular_core.Signal<boolean>;
456
- error: _angular_core.Signal<string | undefined>;
457
- selectedEntities: _angular_core.Signal<AppDefinition[]>;
458
- activeTabs: _angular_core.Signal<string[]>;
459
- currentTab: _angular_core.Signal<string | undefined>;
460
- filterKey: _angular_core.Signal<string | undefined>;
461
- countOfEntities: _angular_core.Signal<number>;
462
- matTableDataSource: _angular_core.Signal<_angular_material_table.MatTableDataSource<AppDefinition, _angular_material_paginator.MatPaginator>>;
463
- clearCurrentEntity: () => void;
464
- createEntity: () => AppDefinition;
465
- add: (entity: AppDefinition) => Promise<PersistedEntity<AppDefinition> | undefined>;
466
- delete: (id: string) => Promise<void>;
467
- deleteAll: _ngrx_signals_rxjs_interop.RxMethod<void>;
468
- deselectAll: () => void;
469
- deselectEntity: (id: string) => void;
470
- load: _ngrx_signals_rxjs_interop.RxMethod<_processpuzzle_base_entity.BaseEntityQueryCondition>;
471
- loadById: (id: string) => AppDefinition | undefined;
472
- resetErrorState: () => void;
473
- selectEntity: (id: string) => void;
474
- setCurrentEntity: (id: string | undefined) => void;
475
- update: (entity: PersistedEntity<AppDefinition>) => Promise<PersistedEntity<AppDefinition> | undefined>;
476
- reset: () => void;
477
- tabIsActive: (tabName: string) => void;
478
- tabIsInactive: (tabName: string) => void;
479
- doFilter: (filterKey: string) => void;
464
+ /** The slice of `BaseEntityStore`'s state that {@link AppDefinitionPublishStore} reads and patches. */
465
+ type PublishableState = {
466
+ entities: AppDefinition[];
467
+ currentEntity: AppDefinition | undefined;
468
+ isLoading: boolean;
469
+ error: string | undefined;
470
+ };
471
+ /**
472
+ * Adds the `publish` use case on top of the generic CRUD store. It keeps the same contract as
473
+ * `addEntity` / `updateEntity`: flip `isLoading`, replace the entity in the list with the server's
474
+ * answer so the form's read-only `status` / `publishedVersion` fields refresh, and surface failures
475
+ * through `error` rather than by throwing.
476
+ */
477
+ declare function AppDefinitionPublishStore(): import("@ngrx/signals").SignalStoreFeature<{
478
+ state: PublishableState;
479
+ props: {};
480
+ methods: {};
481
+ }, {
482
+ state: {};
483
+ props: {};
484
+ methods: {
480
485
  publish: (id: string) => Promise<PersistedEntity<AppDefinition> | undefined>;
481
- } & _ngrx_signals.StateSource<{
482
- entities: AppDefinition[];
483
- number: number;
484
- size: number;
485
- totalElements: number;
486
- totalPages: number;
487
- currentId: string | undefined;
488
- currentEntity: AppDefinition | undefined;
489
- isLoading: boolean;
490
- error: string | undefined;
491
- selectedEntities: AppDefinition[];
492
- activeTabs: string[];
493
- currentTab: string | undefined;
494
- filterKey: string | undefined;
486
+ };
487
+ }>;
488
+ export declare const AppDefinitionStore: import("@angular/core").Type<{
489
+ entities: import("@angular/core").Signal<AppDefinition[]>;
490
+ number: import("@angular/core").Signal<number>;
491
+ size: import("@angular/core").Signal<number>;
492
+ totalElements: import("@angular/core").Signal<number>;
493
+ totalPages: import("@angular/core").Signal<number>;
494
+ currentId: import("@angular/core").Signal<string | undefined>;
495
+ currentEntity: import("@ngrx/signals").DeepSignal<AppDefinition> | import("@angular/core").Signal<undefined>;
496
+ isLoading: import("@angular/core").Signal<boolean>;
497
+ error: import("@angular/core").Signal<string | undefined>;
498
+ selectedEntities: import("@angular/core").Signal<AppDefinition[]>;
499
+ activeTabs: import("@angular/core").Signal<string[]>;
500
+ currentTab: import("@angular/core").Signal<string | undefined>;
501
+ filterKey: import("@angular/core").Signal<string | undefined>;
502
+ countOfEntities: import("@angular/core").Signal<number>;
503
+ matTableDataSource: import("@angular/core").Signal<import("@angular/material/table").MatTableDataSource<AppDefinition, import("@angular/material/paginator").MatPaginator>>;
504
+ clearCurrentEntity: () => void;
505
+ createEntity: () => AppDefinition;
506
+ add: (entity: AppDefinition) => Promise<PersistedEntity<AppDefinition> | undefined>;
507
+ delete: (id: string) => Promise<void>;
508
+ deleteAll: import("@ngrx/signals/rxjs-interop").RxMethod<void>;
509
+ deselectAll: () => void;
510
+ deselectEntity: (id: string) => void;
511
+ load: import("@ngrx/signals/rxjs-interop").RxMethod<import("@processpuzzle/base-entity").BaseEntityQueryCondition>;
512
+ loadById: (id: string) => AppDefinition | undefined;
513
+ resetErrorState: () => void;
514
+ selectEntity: (id: string) => void;
515
+ setCurrentEntity: (id: string | undefined) => void;
516
+ update: (entity: PersistedEntity<AppDefinition>) => Promise<PersistedEntity<AppDefinition> | undefined>;
517
+ reset: () => void;
518
+ tabIsActive: (tabName: string) => void;
519
+ tabIsInactive: (tabName: string) => void;
520
+ doFilter: (filterKey: string) => void;
521
+ publish: (id: string) => Promise<PersistedEntity<AppDefinition> | undefined>;
522
+ } & import("@ngrx/signals").StateSource<{
523
+ entities: AppDefinition[];
524
+ number: number;
525
+ size: number;
526
+ totalElements: number;
527
+ totalPages: number;
528
+ currentId: string | undefined;
529
+ currentEntity: AppDefinition | undefined;
530
+ isLoading: boolean;
531
+ error: string | undefined;
532
+ selectedEntities: AppDefinition[];
533
+ activeTabs: string[];
534
+ currentTab: string | undefined;
535
+ filterKey: string | undefined;
495
536
  }>>;
496
-
497
537
  interface ModuleDefinitionDto {
498
- key?: string;
499
- name?: string;
500
- translocoId?: string;
501
- description?: string;
502
- translocoScope?: string;
503
- routes?: RouteDefinitionDto[];
504
- orgKey?: string;
505
- version?: number;
506
- createdAt?: string;
507
- updatedAt?: string;
538
+ key?: string;
539
+ name?: string;
540
+ translocoId?: string;
541
+ description?: string;
542
+ translocoScope?: string;
543
+ routes?: RouteDefinitionDto[];
544
+ orgKey?: string;
545
+ version?: number;
546
+ createdAt?: string;
547
+ updatedAt?: string;
508
548
  }
509
549
  /**
510
550
  * Translates between the `ModuleDefinition` DTO of `base-app-api.yaml` and the entity the generated form
@@ -515,13 +555,12 @@ interface ModuleDefinitionDto {
515
555
  * - **each route's `target` is flattened** onto the row and re-nested on save, by the same functions
516
556
  * `AppDefinitionMapper` uses, so a route authored in a module behaves like one authored in an app.
517
557
  */
518
- declare class ModuleDefinitionMapper implements BaseEntityMapper<ModuleDefinition> {
519
- fromDto(dto: unknown): ModuleDefinition;
520
- toDto(entity: ModuleDefinition): ModuleDefinitionDto;
521
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<ModuleDefinitionMapper, never>;
522
- static ɵprov: _angular_core.ɵɵInjectableDeclaration<ModuleDefinitionMapper>;
558
+ export declare class ModuleDefinitionMapper implements BaseEntityMapper<ModuleDefinition> {
559
+ fromDto(dto: unknown): ModuleDefinition;
560
+ toDto(entity: ModuleDefinition): ModuleDefinitionDto;
561
+ static ɵfac: i0.ɵɵFactoryDeclaration<ModuleDefinitionMapper, never>;
562
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
523
563
  }
524
-
525
564
  /**
526
565
  * REST access to `/organizations/{orgKey}/modules`. As for `AppDefinitionService`, the organization is
527
566
  * part of the configured service root (`APP_SERVICE_ROOT`, falling back to `BACKEND_SERVICE_ROOT`), so
@@ -533,115 +572,109 @@ declare class ModuleDefinitionMapper implements BaseEntityMapper<ModuleDefinitio
533
572
  * the shell makes when something first navigates under a mount; see `ModuleLoader` in
534
573
  * `app-route-builder.ts`.
535
574
  */
536
- declare class ModuleDefinitionService extends BaseEntityRestService<ModuleDefinition> {
537
- protected entityMapper: ModuleDefinitionMapper;
538
- constructor(entityMapper: ModuleDefinitionMapper);
539
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<ModuleDefinitionService, never>;
540
- static ɵprov: _angular_core.ɵɵInjectableDeclaration<ModuleDefinitionService>;
575
+ export declare class ModuleDefinitionService extends BaseEntityRestService<ModuleDefinition> {
576
+ protected entityMapper: ModuleDefinitionMapper;
577
+ constructor(entityMapper: ModuleDefinitionMapper);
578
+ static ɵfac: i0.ɵɵFactoryDeclaration<ModuleDefinitionService, never>;
579
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
541
580
  }
542
-
543
581
  /**
544
582
  * Plain generic CRUD — a module has no `publish` of its own. Publishing is an `AppDefinition` operation:
545
583
  * an app is what a user navigates to, and its status is what decides whether a mount is live. Giving a
546
584
  * module a second, independent lifecycle would make "which version of what is live" a question with two
547
585
  * answers.
548
586
  */
549
- declare const ModuleDefinitionStore: _angular_core.Type<{
550
- entities: _angular_core.Signal<ModuleDefinition[]>;
551
- number: _angular_core.Signal<number>;
552
- size: _angular_core.Signal<number>;
553
- totalElements: _angular_core.Signal<number>;
554
- totalPages: _angular_core.Signal<number>;
555
- currentId: _angular_core.Signal<string | undefined>;
556
- currentEntity: _angular_core.Signal<ModuleDefinition | undefined>;
557
- isLoading: _angular_core.Signal<boolean>;
558
- error: _angular_core.Signal<string | undefined>;
559
- selectedEntities: _angular_core.Signal<ModuleDefinition[]>;
560
- activeTabs: _angular_core.Signal<string[]>;
561
- currentTab: _angular_core.Signal<string | undefined>;
562
- filterKey: _angular_core.Signal<string | undefined>;
563
- countOfEntities: _angular_core.Signal<number>;
564
- matTableDataSource: _angular_core.Signal<_angular_material_table.MatTableDataSource<ModuleDefinition, _angular_material_paginator.MatPaginator>>;
565
- clearCurrentEntity: () => void;
566
- createEntity: () => ModuleDefinition;
567
- add: (entity: ModuleDefinition) => Promise<_processpuzzle_base_entity.PersistedEntity<ModuleDefinition> | undefined>;
568
- delete: (id: string) => Promise<void>;
569
- deleteAll: _ngrx_signals_rxjs_interop.RxMethod<void>;
570
- deselectAll: () => void;
571
- deselectEntity: (id: string) => void;
572
- load: _ngrx_signals_rxjs_interop.RxMethod<_processpuzzle_base_entity.BaseEntityQueryCondition>;
573
- loadById: (id: string) => ModuleDefinition | undefined;
574
- resetErrorState: () => void;
575
- selectEntity: (id: string) => void;
576
- setCurrentEntity: (id: string | undefined) => void;
577
- update: (entity: _processpuzzle_base_entity.PersistedEntity<ModuleDefinition>) => Promise<_processpuzzle_base_entity.PersistedEntity<ModuleDefinition> | undefined>;
578
- reset: () => void;
579
- tabIsActive: (tabName: string) => void;
580
- tabIsInactive: (tabName: string) => void;
581
- doFilter: (filterKey: string) => void;
582
- } & _ngrx_signals.StateSource<{
583
- entities: ModuleDefinition[];
584
- number: number;
585
- size: number;
586
- totalElements: number;
587
- totalPages: number;
588
- currentId: string | undefined;
589
- currentEntity: ModuleDefinition | undefined;
590
- isLoading: boolean;
591
- error: string | undefined;
592
- selectedEntities: ModuleDefinition[];
593
- activeTabs: string[];
594
- currentTab: string | undefined;
595
- filterKey: string | undefined;
587
+ export declare const ModuleDefinitionStore: import("@angular/core").Type<{
588
+ entities: import("@angular/core").Signal<ModuleDefinition[]>;
589
+ number: import("@angular/core").Signal<number>;
590
+ size: import("@angular/core").Signal<number>;
591
+ totalElements: import("@angular/core").Signal<number>;
592
+ totalPages: import("@angular/core").Signal<number>;
593
+ currentId: import("@angular/core").Signal<string | undefined>;
594
+ currentEntity: import("@angular/core").Signal<undefined> | import("@ngrx/signals").DeepSignal<ModuleDefinition>;
595
+ isLoading: import("@angular/core").Signal<boolean>;
596
+ error: import("@angular/core").Signal<string | undefined>;
597
+ selectedEntities: import("@angular/core").Signal<ModuleDefinition[]>;
598
+ activeTabs: import("@angular/core").Signal<string[]>;
599
+ currentTab: import("@angular/core").Signal<string | undefined>;
600
+ filterKey: import("@angular/core").Signal<string | undefined>;
601
+ countOfEntities: import("@angular/core").Signal<number>;
602
+ matTableDataSource: import("@angular/core").Signal<import("@angular/material/table").MatTableDataSource<ModuleDefinition, import("@angular/material/paginator").MatPaginator>>;
603
+ clearCurrentEntity: () => void;
604
+ createEntity: () => ModuleDefinition;
605
+ add: (entity: ModuleDefinition) => Promise<import("@processpuzzle/base-entity").PersistedEntity<ModuleDefinition> | undefined>;
606
+ delete: (id: string) => Promise<void>;
607
+ deleteAll: import("@ngrx/signals/rxjs-interop").RxMethod<void>;
608
+ deselectAll: () => void;
609
+ deselectEntity: (id: string) => void;
610
+ load: import("@ngrx/signals/rxjs-interop").RxMethod<import("@processpuzzle/base-entity").BaseEntityQueryCondition>;
611
+ loadById: (id: string) => ModuleDefinition | undefined;
612
+ resetErrorState: () => void;
613
+ selectEntity: (id: string) => void;
614
+ setCurrentEntity: (id: string | undefined) => void;
615
+ update: (entity: import("@processpuzzle/base-entity").PersistedEntity<ModuleDefinition>) => Promise<import("@processpuzzle/base-entity").PersistedEntity<ModuleDefinition> | undefined>;
616
+ reset: () => void;
617
+ tabIsActive: (tabName: string) => void;
618
+ tabIsInactive: (tabName: string) => void;
619
+ doFilter: (filterKey: string) => void;
620
+ } & import("@ngrx/signals").StateSource<{
621
+ entities: ModuleDefinition[];
622
+ number: number;
623
+ size: number;
624
+ totalElements: number;
625
+ totalPages: number;
626
+ currentId: string | undefined;
627
+ currentEntity: ModuleDefinition | undefined;
628
+ isLoading: boolean;
629
+ error: string | undefined;
630
+ selectedEntities: ModuleDefinition[];
631
+ activeTabs: string[];
632
+ currentTab: string | undefined;
633
+ filterKey: string | undefined;
596
634
  }>>;
597
-
598
- declare class AppDefinitionFacade extends BaseEntityFacade<AppDefinition> {
599
- readonly entityType: typeof AppDefinition;
600
- private readonly mapperRef;
601
- private readonly serviceRef;
602
- protected createMapper(): AppDefinitionMapper;
603
- protected createService(): AppDefinitionService;
604
- protected createStoreClass(): Type<unknown>;
605
- protected createDescriptor(): BaseEntityDescriptor;
606
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<AppDefinitionFacade, never>;
607
- static ɵprov: _angular_core.ɵɵInjectableDeclaration<AppDefinitionFacade>;
635
+ export declare class AppDefinitionFacade extends BaseEntityFacade<AppDefinition> {
636
+ readonly entityType: typeof AppDefinition;
637
+ private readonly mapperRef;
638
+ private readonly serviceRef;
639
+ protected createMapper(): AppDefinitionMapper;
640
+ protected createService(): AppDefinitionService;
641
+ protected createStoreClass(): Type<unknown>;
642
+ protected createDescriptor(): BaseEntityDescriptor;
643
+ static ɵfac: i0.ɵɵFactoryDeclaration<AppDefinitionFacade, never>;
644
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
608
645
  }
609
-
610
- declare class ModuleDefinitionFacade extends BaseEntityFacade<ModuleDefinition> {
611
- readonly entityType: typeof ModuleDefinition;
612
- private readonly mapperRef;
613
- private readonly serviceRef;
614
- protected createMapper(): ModuleDefinitionMapper;
615
- protected createService(): ModuleDefinitionService;
616
- protected createStoreClass(): Type<unknown>;
617
- protected createDescriptor(): BaseEntityDescriptor;
618
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<ModuleDefinitionFacade, never>;
619
- static ɵprov: _angular_core.ɵɵInjectableDeclaration<ModuleDefinitionFacade>;
646
+ export declare class ModuleDefinitionFacade extends BaseEntityFacade<ModuleDefinition> {
647
+ readonly entityType: typeof ModuleDefinition;
648
+ private readonly mapperRef;
649
+ private readonly serviceRef;
650
+ protected createMapper(): ModuleDefinitionMapper;
651
+ protected createService(): ModuleDefinitionService;
652
+ protected createStoreClass(): Type<unknown>;
653
+ protected createDescriptor(): BaseEntityDescriptor;
654
+ static ɵfac: i0.ɵɵFactoryDeclaration<ModuleDefinitionFacade, never>;
655
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
620
656
  }
621
-
622
657
  /**
623
658
  * A mount is a row of the `App Definition` document, so it is edited through that document — unlike the
624
659
  * `ModuleDefinition` it names, which is an aggregate of its own with its own endpoints.
625
660
  */
626
- declare class AppModuleMountFacade extends EmbeddedEntityFacade<ModuleMount> {
627
- readonly entityType: typeof ModuleMount;
628
- protected createDescriptor(): BaseEntityDescriptor;
629
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<AppModuleMountFacade, never>;
630
- static ɵprov: _angular_core.ɵɵInjectableDeclaration<AppModuleMountFacade>;
661
+ export declare class AppModuleMountFacade extends EmbeddedEntityFacade<ModuleMount> {
662
+ readonly entityType: typeof ModuleMount;
663
+ protected createDescriptor(): BaseEntityDescriptor;
664
+ static ɵfac: i0.ɵɵFactoryDeclaration<AppModuleMountFacade, never>;
665
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
631
666
  }
632
-
633
667
  /**
634
668
  * One facade covers every level of the nav tree, however deep: the store is a root singleton and the row
635
669
  * it stands for comes from the route, so `app-nav-item/a/details/app-nav-item/b/details` resolves through
636
670
  * the same facade as the top level.
637
671
  */
638
- declare class AppNavItemFacade extends EmbeddedEntityFacade<NavItem> {
639
- readonly entityType: typeof NavItem;
640
- protected createDescriptor(): BaseEntityDescriptor;
641
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<AppNavItemFacade, never>;
642
- static ɵprov: _angular_core.ɵɵInjectableDeclaration<AppNavItemFacade>;
672
+ export declare class AppNavItemFacade extends EmbeddedEntityFacade<NavItem> {
673
+ readonly entityType: typeof NavItem;
674
+ protected createDescriptor(): BaseEntityDescriptor;
675
+ static ɵfac: i0.ɵɵFactoryDeclaration<AppNavItemFacade, never>;
676
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
643
677
  }
644
-
645
678
  /**
646
679
  * What the run-time shell registers routes from. `routes` and `modules` are the app definition's own
647
680
  * fields; the other two are how the routes of a mounted module get in.
@@ -655,10 +688,10 @@ declare class AppNavItemFacade extends EmbeddedEntityFacade<NavItem> {
655
688
  * routes" and is honoured as such.
656
689
  */
657
690
  interface AppRouteSource {
658
- routes?: RouteDefinition[];
659
- modules?: ModuleMount[];
660
- moduleRoutes?: Record<string, RouteDefinition[] | undefined>;
661
- loadModule?: ModuleLoader;
691
+ routes?: RouteDefinition[];
692
+ modules?: ModuleMount[];
693
+ moduleRoutes?: Record<string, RouteDefinition[] | undefined>;
694
+ loadModule?: ModuleLoader;
662
695
  }
663
696
  /**
664
697
  * Fetches one module by key, or resolves to `undefined` if the organization has no such module. Rejecting
@@ -702,8 +735,7 @@ type RouteRenderer = (definition: RouteDefinition) => Route | Promise<Route>;
702
735
  * swallowed by it. Beyond that the authored order is kept, and a duplicate path — which the backend
703
736
  * rejects as an error, so it should never arrive — keeps its first occurrence.
704
737
  */
705
- declare function buildAppRoutes(source: AppRouteSource, renderRoute: RouteRenderer): Promise<Routes>;
706
-
738
+ export declare function buildAppRoutes(source: AppRouteSource, renderRoute: RouteRenderer): Promise<Routes>;
707
739
  /**
708
740
  * The `RouteRenderer` {@link buildAppRoutes} needs — turns one authored `RouteDefinition` into the
709
741
  * `Route` that actually renders it. Owns `component`, `data` and any `children` the kind calls for; `path`
@@ -720,82 +752,71 @@ declare function buildAppRoutes(source: AppRouteSource, renderRoute: RouteRender
720
752
  * route's `documentSlug` at runtime. Rendering a document read-only inside a live app is its own small
721
753
  * design question and this falls through to {@link RouteUnsupportedComponent} rather than guessing.
722
754
  */
723
- declare class AppRouteRenderer {
724
- private readonly entityScreens;
725
- render: (definition: RouteDefinition) => Promise<Route>;
726
- /**
727
- * An `ENTITY` route: base-entity's generated screens, mounted at the authored path.
728
- *
729
- * Both halves belong to base-entity and are called rather than reimplemented here: `EntityScreenResolver`
730
- * answers for an entity with a compile-time facade and for one that exists only as a `BaseEntityDefinition`
731
- * alike, and `entityScreenRoute` owns the URL shape those screens need. What is left is exactly the
732
- * *application definition* concern — when the routes are built, the authored title, and the authored
733
- * `entityMode` / `rsqlFilter`.
734
- *
735
- * The descriptor is resolved **before** the route exists, which is what makes the route either complete or
736
- * a leaf. An entity nothing answers to keeps the leaf, whose component says so at the URL the nav item
737
- * links to; a legitimate state, since an `AppDefinition` may name an entity that has been renamed or one
738
- * whose definitions this deployment's backend does not serve.
739
- *
740
- * `entityMode` is passed along but not applied. A `DETAILS` route lands on the list, from which the row is
741
- * one click away: making it open a form directly means carrying the authored route's own `:id` into the
742
- * child URL, and the `RedirectFunction` that would do it receives a *partial* route snapshot whose
743
- * parameter inheritance at recognition time is not something to bet a navigation on. Deferred with `roles`
744
- * and `rsqlFilter` rather than guessed at.
745
- */
746
- private entityRoute;
747
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<AppRouteRenderer, never>;
748
- static ɵprov: _angular_core.ɵɵInjectableDeclaration<AppRouteRenderer>;
755
+ export declare class AppRouteRenderer {
756
+ private readonly entityScreens;
757
+ render: (definition: RouteDefinition) => Promise<Route>;
758
+ /**
759
+ * An `ENTITY` route: base-entity's generated screens, mounted at the authored path.
760
+ *
761
+ * Both halves belong to base-entity and are called rather than reimplemented here: `EntityScreenResolver`
762
+ * answers for an entity with a compile-time facade and for one that exists only as a `BaseEntityDefinition`
763
+ * alike, and `entityScreenRoute` owns the URL shape those screens need. What is left is exactly the
764
+ * *application definition* concern — when the routes are built, the authored title, and the authored
765
+ * `entityMode` / `rsqlFilter`.
766
+ *
767
+ * The descriptor is resolved **before** the route exists, which is what makes the route either complete or
768
+ * a leaf. An entity nothing answers to keeps the leaf, whose component says so at the URL the nav item
769
+ * links to; a legitimate state, since an `AppDefinition` may name an entity that has been renamed or one
770
+ * whose definitions this deployment's backend does not serve.
771
+ *
772
+ * `entityMode` is passed along but not applied. A `DETAILS` route lands on the list, from which the row is
773
+ * one click away: making it open a form directly means carrying the authored route's own `:id` into the
774
+ * child URL, and the `RedirectFunction` that would do it receives a *partial* route snapshot whose
775
+ * parameter inheritance at recognition time is not something to bet a navigation on. Deferred with `roles`
776
+ * and `rsqlFilter` rather than guessed at.
777
+ */
778
+ private entityRoute;
779
+ static ɵfac: i0.ɵɵFactoryDeclaration<AppRouteRenderer, never>;
780
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
749
781
  }
750
-
751
782
  /**
752
- * Renders a route whose kind is WIDGETS: every STANDALONE instance in order, via NgComponentOutlet
753
- * resolved against WIDGET_REGISTRY. REFERENCED instances are skipped here for the same reason
783
+ * Renders a route whose kind is WIDGETS: every STANDALONE instance in order, each through base-widget's
784
+ * WidgetHostComponent. REFERENCED instances are skipped here for the same reason
754
785
  * DocumentEditorComponent skips them at its top level — they're placed by whichever STANDALONE
755
786
  * container widget names them in props.childIds, not by this component.
756
787
  *
757
788
  * Delegates the common widget rendering rule to WidgetListComponent, which is also used by the
758
789
  * header and footer regions in the application preview.
759
790
  */
760
- declare class RouteWidgetsComponent {
761
- private readonly route;
762
- protected readonly widgets: WidgetInstance[];
763
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<RouteWidgetsComponent, never>;
764
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<RouteWidgetsComponent, "pp-route-widgets", never, {}, {}, never, never, true, never>;
791
+ export declare class RouteWidgetsComponent {
792
+ private readonly route;
793
+ protected readonly widgets: WidgetInstance$1[];
794
+ static ɵfac: i0.ɵɵFactoryDeclaration<RouteWidgetsComponent, never>;
795
+ static ɵcmp: i0.ɵɵComponentDeclaration<RouteWidgetsComponent, "pp-route-widgets", never, {}, {}, never, never, true, never>;
765
796
  }
766
-
797
+ /** The widgets rendered in sequence — every one but those a container widget places by id. */
798
+ declare function standaloneWidgets(widgets: WidgetInstance$1[] | undefined): WidgetInstance$1[];
767
799
  /**
768
- * One widget as it is rendered: the component the registry answered with, or none.
800
+ * Renders the top-level widgets shared by routed content and static shell regions, each through
801
+ * base-widget's {@link WidgetHostComponent} — which resolves the component, binds the props and shows a
802
+ * placeholder for a type the application did not register. This component only decides *which* widgets
803
+ * render here, and in what order.
769
804
  *
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.
805
+ * base-app passes no binding resolver: a page or region declares no ports for `inputBindings` to resolve
806
+ * against, so a placement here is configured by its props alone.
772
807
  */
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>;
808
+ export declare class WidgetListComponent {
809
+ readonly widgets: import("@angular/core").InputSignal<WidgetInstance$1[]>;
810
+ protected readonly rows: import("@angular/core").Signal<WidgetInstance$1[]>;
811
+ static ɵfac: i0.ɵɵFactoryDeclaration<WidgetListComponent, never>;
812
+ static ɵcmp: i0.ɵɵComponentDeclaration<WidgetListComponent, "pp-widget-list", never, {
813
+ "widgets": {
814
+ "alias": "widgets";
815
+ "required": false;
816
+ "isSignal": true;
817
+ };
818
+ }, {}, never, never, true, never>;
779
819
  }
780
- /**
781
- * Renders the top-level widgets shared by routed content and static shell regions.
782
- *
783
- * A `WidgetInstance.type` is an open string on the contract and the server checks it for blankness alone —
784
- * it cannot know which components the hosting application registered. So an unregistered type is a state
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.
788
- */
789
- declare class WidgetListComponent {
790
- readonly widgets: _angular_core.InputSignal<WidgetInstance[]>;
791
- /** Optional: an application that registers no widget at all renders every instance as a placeholder. */
792
- private readonly registry;
793
- protected readonly rows: _angular_core.Signal<WidgetRow[]>;
794
- protected explain(type: string): string;
795
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<WidgetListComponent, never>;
796
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<WidgetListComponent, "pp-widget-list", never, { "widgets": { "alias": "widgets"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
797
- }
798
-
799
820
  /**
800
821
  * Fallback rendered by {@link AppRouteRenderer} for a route kind it doesn't yet know how to build a
801
822
  * real component for (today: DOCUMENT, and any kind value the frontend doesn't recognize). Exists so
@@ -807,65 +828,60 @@ declare class WidgetListComponent {
807
828
  * caught up to yet, same spirit as a NavItem naming a route that hasn't been authored being a warning
808
829
  * rather than a validation failure elsewhere in this library.
809
830
  */
810
- declare class RouteUnsupportedComponent {
811
- private readonly route;
812
- protected readonly reason: _angular_core.Signal<string>;
813
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<RouteUnsupportedComponent, never>;
814
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<RouteUnsupportedComponent, "pp-route-unsupported", never, {}, {}, never, never, true, never>;
831
+ export declare class RouteUnsupportedComponent {
832
+ private readonly route;
833
+ protected readonly reason: import("@angular/core").Signal<string>;
834
+ static ɵfac: i0.ɵɵFactoryDeclaration<RouteUnsupportedComponent, never>;
835
+ static ɵcmp: i0.ɵɵComponentDeclaration<RouteUnsupportedComponent, "pp-route-unsupported", never, {}, {}, never, never, true, never>;
815
836
  }
816
-
817
837
  /**
818
838
  * A region has a facade like any other entity — that is what gives it a store, and so a working list and
819
839
  * form. Its repository reads and writes the `App Definition` document instead of an endpoint of its own,
820
840
  * because the contract nests `regions` inside that document.
821
841
  */
822
- declare class AppRegionFacade extends EmbeddedEntityFacade<RegionDefinition> {
823
- readonly entityType: typeof RegionDefinition;
824
- protected createDescriptor(): BaseEntityDescriptor;
825
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<AppRegionFacade, never>;
826
- static ɵprov: _angular_core.ɵɵInjectableDeclaration<AppRegionFacade>;
842
+ export declare class AppRegionFacade extends EmbeddedEntityFacade<RegionDefinition> {
843
+ readonly entityType: typeof RegionDefinition;
844
+ protected createDescriptor(): BaseEntityDescriptor;
845
+ static ɵfac: i0.ɵɵFactoryDeclaration<AppRegionFacade, never>;
846
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
827
847
  }
828
-
829
848
  /**
830
849
  * `GET .../app-definitions/{appId}/layout` is a read-only projection for the run-time shell, not a write
831
850
  * endpoint — a route is authored inside the `App Definition` document, so its store goes through that
832
851
  * document like every other embedded child of the graph.
833
852
  */
834
- declare class AppRouteFacade extends EmbeddedEntityFacade<RouteDefinition> {
835
- readonly entityType: typeof RouteDefinition;
836
- protected createDescriptor(): BaseEntityDescriptor;
837
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<AppRouteFacade, never>;
838
- static ɵprov: _angular_core.ɵɵInjectableDeclaration<AppRouteFacade>;
853
+ export declare class AppRouteFacade extends EmbeddedEntityFacade<RouteDefinition> {
854
+ readonly entityType: typeof RouteDefinition;
855
+ protected createDescriptor(): BaseEntityDescriptor;
856
+ static ɵfac: i0.ɵɵFactoryDeclaration<AppRouteFacade, never>;
857
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
839
858
  }
840
-
841
859
  /**
842
860
  * A widget sits under a region, a page or another widget, and one facade serves all three: which owner's
843
861
  * rows its store reads is decided by the route that is open, not by the facade.
844
862
  */
845
- declare class AppWidgetFacade extends EmbeddedEntityFacade<WidgetInstance> {
846
- readonly entityType: typeof WidgetInstance;
847
- protected createDescriptor(): BaseEntityDescriptor;
848
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<AppWidgetFacade, never>;
849
- static ɵprov: _angular_core.ɵɵInjectableDeclaration<AppWidgetFacade>;
863
+ export declare class AppWidgetFacade extends EmbeddedEntityFacade<WidgetInstance> {
864
+ readonly entityType: typeof WidgetInstance;
865
+ protected createDescriptor(): BaseEntityDescriptor;
866
+ static ɵfac: i0.ɵɵFactoryDeclaration<AppWidgetFacade, never>;
867
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
850
868
  }
851
-
852
- declare class AppDefinitionContainerComponent implements OnDestroy {
853
- private readonly containerComponentRef;
854
- baseEntityHost: BaseFormHostDirective;
855
- readonly publishActionsTpl: _angular_core.Signal<TemplateRef<unknown> | undefined>;
856
- private readonly store;
857
- readonly entityDescriptor: BaseEntityDescriptor;
858
- readonly publishButtonKey = "base_app.publish.button";
859
- readonly publishTooltipKey = "base_app.publish.tooltip";
860
- /** Only a definition the backend already knows can be promoted, so a not-yet-saved form cannot publish. */
861
- readonly canPublish: _angular_core.Signal<boolean>;
862
- constructor();
863
- ngOnDestroy(): void;
864
- onPublish(): Promise<void>;
865
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<AppDefinitionContainerComponent, never>;
866
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<AppDefinitionContainerComponent, "pp-app-definition-container", never, {}, {}, never, never, true, never>;
869
+ export declare class AppDefinitionContainerComponent implements OnDestroy {
870
+ private readonly containerComponentRef;
871
+ baseEntityHost: BaseFormHostDirective;
872
+ readonly publishActionsTpl: import("@angular/core").Signal<TemplateRef<unknown> | undefined>;
873
+ private readonly store;
874
+ readonly entityDescriptor: BaseEntityDescriptor;
875
+ readonly publishButtonKey = "base_app.publish.button";
876
+ readonly publishTooltipKey = "base_app.publish.tooltip";
877
+ /** Only a definition the backend already knows can be promoted, so a not-yet-saved form cannot publish. */
878
+ readonly canPublish: import("@angular/core").Signal<boolean>;
879
+ constructor();
880
+ ngOnDestroy(): void;
881
+ onPublish(): Promise<void>;
882
+ static ɵfac: i0.ɵɵFactoryDeclaration<AppDefinitionContainerComponent, never>;
883
+ static ɵcmp: i0.ɵɵComponentDeclaration<AppDefinitionContainerComponent, "pp-app-definition-container", never, {}, {}, never, never, true, never>;
867
884
  }
868
-
869
885
  /**
870
886
  * The Preview tab's screen, mounted at `app-definition/<id>/preview` by `BASE_APP_ROUTES` — a sibling of
871
887
  * the generic Details form rather than something stacked under it, which is what the `extraTabs` hook on
@@ -879,20 +895,25 @@ declare class AppDefinitionContainerComponent implements OnDestroy {
879
895
  * The frame below — rounded, white, and tall enough to look like an application — is the preview's own,
880
896
  * not the shell's. In production the shell fills the viewport and none of it applies.
881
897
  */
882
- declare class AppPreviewComponent implements OnInit {
883
- /**
884
- * Bound from the route's `:entityId` param by `withComponentInputBinding()`, the same way
885
- * `BaseEntityFormComponent` receives it — so a deep link and a reload resolve the same app definition as a
886
- * click through the tab does.
887
- */
888
- readonly entityId: _angular_core.InputSignal<string>;
889
- private readonly store;
890
- protected readonly app: _angular_core.Signal<AppDefinition | undefined>;
891
- ngOnInit(): void;
892
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<AppPreviewComponent, never>;
893
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<AppPreviewComponent, "pp-app-preview-tab", never, { "entityId": { "alias": "entityId"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
898
+ export declare class AppPreviewComponent implements OnInit {
899
+ /**
900
+ * Bound from the route's `:entityId` param by `withComponentInputBinding()`, the same way
901
+ * `BaseEntityFormComponent` receives it — so a deep link and a reload resolve the same app definition as a
902
+ * click through the tab does.
903
+ */
904
+ readonly entityId: import("@angular/core").InputSignal<string>;
905
+ private readonly store;
906
+ protected readonly app: import("@angular/core").Signal<AppDefinition | undefined>;
907
+ ngOnInit(): void;
908
+ static ɵfac: i0.ɵɵFactoryDeclaration<AppPreviewComponent, never>;
909
+ static ɵcmp: i0.ɵɵComponentDeclaration<AppPreviewComponent, "pp-app-preview-tab", never, {
910
+ "entityId": {
911
+ "alias": "entityId";
912
+ "required": true;
913
+ "isSignal": true;
914
+ };
915
+ }, {}, never, never, true, never>;
894
916
  }
895
-
896
917
  /**
897
918
  * One region resolved to something renderable: which slot it fills, the component that fills it and
898
919
  * the inputs to bind. **Data, not a view** — deliberately the same shape of answer
@@ -905,9 +926,9 @@ declare class AppPreviewComponent implements OnInit {
905
926
  * the second reason this carries inputs rather than a constructed component.
906
927
  */
907
928
  interface RegionView {
908
- slot: RegionType;
909
- component: Type<unknown>;
910
- inputs: Record<string, unknown>;
929
+ slot: RegionType;
930
+ component: Type<unknown>;
931
+ inputs: Record<string, unknown>;
911
932
  }
912
933
  /**
913
934
  * Turns one authored `RegionDefinition` into the {@link RegionView} that renders it.
@@ -917,12 +938,11 @@ interface RegionView {
917
938
  * so there has to be exactly one of these, and a constructor parameter is a cheaper way to grow it than
918
939
  * a rewrite.
919
940
  */
920
- declare class AppRegionRenderer {
921
- render: (region: RegionDefinition, definition: AppDefinition | undefined) => RegionView | undefined;
922
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<AppRegionRenderer, never>;
923
- static ɵprov: _angular_core.ɵɵInjectableDeclaration<AppRegionRenderer>;
941
+ export declare class AppRegionRenderer {
942
+ render: (region: RegionDefinition, definition: AppDefinition | undefined) => RegionView | undefined;
943
+ static ɵfac: i0.ɵɵFactoryDeclaration<AppRegionRenderer, never>;
944
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
924
945
  }
925
-
926
946
  /**
927
947
  * The run-time shell of a metadata-defined application: the chrome an `AppDefinition` describes, with a
928
948
  * `<router-outlet>` where its routes render.
@@ -938,57 +958,88 @@ declare class AppRegionRenderer {
938
958
  * details form re-renders through ordinary signal propagation instead of a clear-and-rebuild that would
939
959
  * drop scroll position and focus on every keystroke.
940
960
  *
941
- * The whole theme is applied here, not only the brand colours: `--pp-*` overrides as a style binding and
942
- * the definition's `materialTheme` / `colorScheme` as a class selecting one of the scoped Material themes
943
- * in `src/theme/pp-material-themes.scss`. Both work because a Material theme is a set of custom
944
- * properties and nothing else. That file is a **global stylesheet the application registers**; if it is
945
- * not registered the classes below still land and the shell simply inherits the host's theme. See it for
946
- * the one thing this cannot reach — CDK overlays, which render outside the shell's subtree.
961
+ * The whole theme is applied here, not only the brand colours: `--pp-*` overrides as a style binding, and
962
+ * a class selecting one of the scoped Material themes of widgets' `src/theme/pp-material-themes.scss`. The
963
+ * class comes from the shell's own {@link ThemeService}: the definition's `materialTheme` / `colorScheme`
964
+ * are its defaults, and a `ThemesButton` placed in one of the regions overrides them for this application
965
+ * only. Both work because a Material theme is a set of custom properties and nothing else. That file is a
966
+ * **global stylesheet the application registers**; if it is not registered the classes still land and the
967
+ * shell simply inherits the host's theme. Overlays opened from inside the shell render into a
968
+ * {@link ShellOverlayContainer} in its host, so they are themed as well.
947
969
  *
948
970
  * Not yet handled, deliberately: **no routes are registered** under the outlet. That is the nested router
949
971
  * context, which needs `EntityTabDescriptor` to be able to carry child routes.
950
972
  */
951
- declare class AppShellComponent {
952
- /**
953
- * The definition to render. Optional rather than required because the shell is mounted before the
954
- * definition resolves — the preview's store selects the entity in its own `ngOnInit`, and a deep link
955
- * arrives with nothing loaded — so an empty shell is a state to render, not an error.
956
- */
957
- readonly definition: _angular_core.InputSignal<AppDefinition | undefined>;
958
- private readonly regionRenderer;
959
- protected readonly layout: _angular_core.Signal<_processpuzzle_base_app.ResolvedLayout>;
960
- protected readonly themeVars: _angular_core.Signal<Record<string, string>>;
961
- protected readonly themeClass: _angular_core.Signal<string>;
962
- private readonly regionViews;
963
- protected readonly headerView: _angular_core.Signal<RegionView | undefined>;
964
- protected readonly footerView: _angular_core.Signal<RegionView | undefined>;
965
- /**
966
- * The nav in the sidenav, for the two sidenav presets. Split from {@link topNavView} rather than
967
- * decided in the template, so each slot is one unambiguous `@if` and the mutual exclusion is stated
968
- * once, here.
969
- */
970
- protected readonly sidenavView: _angular_core.Signal<RegionView | undefined>;
971
- /**
972
- * The same nav relocated into the header row under `top-nav`. It is placed beside the header region
973
- * rather than inside it, so that a `top-nav` app which declares no header region is still navigable —
974
- * and so that the shell still never invents a region that was not authored.
975
- */
976
- protected readonly topNavView: _angular_core.Signal<RegionView | undefined>;
977
- /**
978
- * The nav view's own inputs with the axis the layout dictates laid over them.
979
- *
980
- * Computeds rather than a method called from the template: a method would hand `NgComponentOutlet` a
981
- * freshly built object on every change-detection pass, so it would re-diff and re-apply the nav's
982
- * inputs continuously. Memoized, the identity only changes when the definition or the preset does.
983
- */
984
- protected readonly sidenavInputs: _angular_core.Signal<Record<string, unknown>>;
985
- protected readonly topNavInputs: _angular_core.Signal<Record<string, unknown>>;
986
- private navInputsOf;
987
- private viewOf;
988
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<AppShellComponent, never>;
989
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<AppShellComponent, "pp-app-shell", never, { "definition": { "alias": "definition"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
973
+ export declare class AppShellComponent {
974
+ /**
975
+ * The definition to render. Optional rather than required because the shell is mounted before the
976
+ * definition resolves — the preview's store selects the entity in its own `ngOnInit`, and a deep link
977
+ * arrives with nothing loaded — so an empty shell is a state to render, not an error.
978
+ */
979
+ readonly definition: import("@angular/core").InputSignal<AppDefinition | undefined>;
980
+ /**
981
+ * Whether a theme the user picks in a `ThemesButton` inside the shell is remembered, per application id.
982
+ * The designer's preview turns it off: there a choice is only tried out, and a stored one would shadow the
983
+ * theme being edited in the neighbouring form.
984
+ */
985
+ readonly persistTheme: import("@angular/core").InputSignal<boolean>;
986
+ private readonly regionRenderer;
987
+ private readonly theme;
988
+ private readonly applicationContext;
989
+ protected readonly layoutService: LayoutService;
990
+ protected readonly layout: import("@angular/core").Signal<import("@processpuzzle/base-app").ResolvedLayout>;
991
+ protected readonly themeVars: import("@angular/core").Signal<Record<string, string>>;
992
+ protected readonly themeClass: import("@angular/core").Signal<string>;
993
+ private readonly applyThemeDefaults;
994
+ private readonly regionViews;
995
+ protected readonly headerView: import("@angular/core").Signal<RegionView | undefined>;
996
+ protected readonly footerView: import("@angular/core").Signal<RegionView | undefined>;
997
+ /**
998
+ * The nav in the sidenav, for the two sidenav presets. Split from {@link topNavView} rather than
999
+ * decided in the template, so each slot is one unambiguous `@if` and the mutual exclusion is stated
1000
+ * once, here.
1001
+ */
1002
+ protected readonly sidenavView: import("@angular/core").Signal<RegionView | undefined>;
1003
+ /**
1004
+ * The same nav relocated into the header row under `top-nav`. It is placed beside the header region
1005
+ * rather than inside it, so that a `top-nav` app which declares no header region is still navigable —
1006
+ * and so that the shell still never invents a region that was not authored.
1007
+ */
1008
+ protected readonly topNavView: import("@angular/core").Signal<RegionView | undefined>;
1009
+ /**
1010
+ * A handset layout has room for neither a sidenav nor a horizontal nav row, so the shell renders the nav
1011
+ * in neither place there; a `nav-menu` widget in the header stands in for it, reading the same entries
1012
+ * through the APPLICATION_CONTEXT. A definition with no such widget is not navigable on a phone — which is
1013
+ * why the seeded applications all place one.
1014
+ */
1015
+ private readonly isSmallScreen;
1016
+ /**
1017
+ * The nav view's own inputs with the axis the layout dictates laid over them.
1018
+ *
1019
+ * Computeds rather than a method called from the template: a method would hand `NgComponentOutlet` a
1020
+ * freshly built object on every change-detection pass, so it would re-diff and re-apply the nav's
1021
+ * inputs continuously. Memoized, the identity only changes when the definition or the preset does.
1022
+ */
1023
+ protected readonly sidenavInputs: import("@angular/core").Signal<{
1024
+ compact: boolean;
1025
+ }>;
1026
+ protected readonly topNavInputs: import("@angular/core").Signal<Record<string, unknown>>;
1027
+ private navInputsOf;
1028
+ private viewOf;
1029
+ static ɵfac: i0.ɵɵFactoryDeclaration<AppShellComponent, never>;
1030
+ static ɵcmp: i0.ɵɵComponentDeclaration<AppShellComponent, "pp-app-shell", never, {
1031
+ "definition": {
1032
+ "alias": "definition";
1033
+ "required": false;
1034
+ "isSignal": true;
1035
+ };
1036
+ "persistTheme": {
1037
+ "alias": "persistTheme";
1038
+ "required": false;
1039
+ "isSignal": true;
1040
+ };
1041
+ }, {}, never, never, true, never>;
990
1042
  }
991
-
992
1043
  /**
993
1044
  * Turns one `AppDefinition` into the `Routes` that render its screens — the missing consumer of
994
1045
  * {@link buildAppRoutes}, which until now produced routes nothing registered.
@@ -996,35 +1047,35 @@ declare class AppShellComponent {
996
1047
  * Separate from the guard below so the interesting part is testable without a router: this class answers
997
1048
  * "what routes does app X have", and the guard is only the two lines that hand them to Angular.
998
1049
  */
999
- declare class AppShellRoutesFactory {
1000
- private readonly appStore;
1001
- private readonly appService;
1002
- private readonly moduleStore;
1003
- private readonly moduleService;
1004
- private readonly renderRoute;
1005
- childrenOf(appId: string): Promise<Routes>;
1006
- /**
1007
- * Store first, endpoint second.
1008
- *
1009
- * The store holds the newest definition immediately after a Save, so the next navigation inside the
1010
- * preview picks up a route the designer just added — without a second GET, and without this having to
1011
- * know that a save happened. The fetch is for the case the store cannot serve: a deep link or a reload,
1012
- * where nothing has been loaded yet.
1013
- *
1014
- * A failure resolves to `undefined` rather than propagating. A guard that rejects fails the whole
1015
- * navigation, and an app whose definition cannot be read should render an empty shell, not a dead URL.
1016
- */
1017
- private definitionOf;
1018
- /**
1019
- * The {@link ModuleLoader} `buildAppRoutes` calls for a mount whose module it has not got. Resolving to
1020
- * `undefined` is deliberate and is what the contract asks for: a `ModuleMount` naming a module nobody has
1021
- * authored yet is a validation *warning*, so it must contribute no routes rather than break navigation.
1022
- */
1023
- private loadModule;
1024
- /** `findById` resolves to `void` for a missing record and rejects on a transport error; both mean "no". */
1025
- private fetch;
1026
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<AppShellRoutesFactory, never>;
1027
- static ɵprov: _angular_core.ɵɵInjectableDeclaration<AppShellRoutesFactory>;
1050
+ export declare class AppShellRoutesFactory {
1051
+ private readonly appStore;
1052
+ private readonly appService;
1053
+ private readonly moduleStore;
1054
+ private readonly moduleService;
1055
+ private readonly renderRoute;
1056
+ childrenOf(appId: string): Promise<Routes>;
1057
+ /**
1058
+ * Store first, endpoint second.
1059
+ *
1060
+ * The store holds the newest definition immediately after a Save, so the next navigation inside the
1061
+ * preview picks up a route the designer just added — without a second GET, and without this having to
1062
+ * know that a save happened. The fetch is for the case the store cannot serve: a deep link or a reload,
1063
+ * where nothing has been loaded yet.
1064
+ *
1065
+ * A failure resolves to `undefined` rather than propagating. A guard that rejects fails the whole
1066
+ * navigation, and an app whose definition cannot be read should render an empty shell, not a dead URL.
1067
+ */
1068
+ private definitionOf;
1069
+ /**
1070
+ * The {@link ModuleLoader} `buildAppRoutes` calls for a mount whose module it has not got. Resolving to
1071
+ * `undefined` is deliberate and is what the contract asks for: a `ModuleMount` naming a module nobody has
1072
+ * authored yet is a validation *warning*, so it must contribute no routes rather than break navigation.
1073
+ */
1074
+ private loadModule;
1075
+ /** `findById` resolves to `void` for a missing record and rejects on a transport error; both mean "no". */
1076
+ private fetch;
1077
+ static ɵfac: i0.ɵɵFactoryDeclaration<AppShellRoutesFactory, never>;
1078
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
1028
1079
  }
1029
1080
  /**
1030
1081
  * Registers an application's own routes as the children of the Preview tab's route, so that navigating
@@ -1040,8 +1091,7 @@ declare class AppShellRoutesFactory {
1040
1091
  * Always returns `true`. It is not deciding whether the tab may be entered — it is filling in the tab's
1041
1092
  * children on the way past.
1042
1093
  */
1043
- declare const appShellRoutesGuard: CanMatchFn;
1044
-
1094
+ export declare const appShellRoutesGuard: CanMatchFn;
1045
1095
  /**
1046
1096
  * The layout decisions {@link AppShellComponent} renders from, resolved out of an `AppDefinition`'s
1047
1097
  * `layout` fields with every default already applied — so the template reads values rather than
@@ -1052,21 +1102,21 @@ declare const appShellRoutesGuard: CanMatchFn;
1052
1102
  * needs injection, and a pure derivation is testable without a `TestBed`.
1053
1103
  */
1054
1104
  interface ResolvedLayout {
1055
- preset: LayoutPreset;
1056
- /**
1057
- * Always resolved, even for `top-nav` where it is meaningless — {@link hasSidenav} is what says
1058
- * whether a sidenav is rendered at all. Leaving it undefined there would only push a `?? 'side'`
1059
- * into the template that no definition can ever reach, since `hasSidenav` already implies a mode.
1060
- */
1061
- sidenavMode: SidenavMode;
1062
- /** `end` for `sidenav-right`, `start` otherwise — the values `matSidenav`'s `position` takes. */
1063
- sidenavPosition: 'start' | 'end';
1064
- /** Whether the shell renders a sidenav at all. False for `top-nav`. */
1065
- hasSidenav: boolean;
1066
- sidenavOpened: boolean;
1067
- sidenavCollapsible: boolean;
1068
- /** Undefined means unconstrained, which is what an absent `contentMaxWidth` asks for. */
1069
- contentMaxWidth?: string;
1105
+ preset: LayoutPreset;
1106
+ /**
1107
+ * Always resolved, even for `top-nav` where it is meaningless — {@link hasSidenav} is what says
1108
+ * whether a sidenav is rendered at all. Leaving it undefined there would only push a `?? 'side'`
1109
+ * into the template that no definition can ever reach, since `hasSidenav` already implies a mode.
1110
+ */
1111
+ sidenavMode: SidenavMode;
1112
+ /** `end` for `sidenav-right`, `start` otherwise — the values `matSidenav`'s `position` takes. */
1113
+ sidenavPosition: 'start' | 'end';
1114
+ /** Whether the shell renders a sidenav at all. False for `top-nav`. */
1115
+ hasSidenav: boolean;
1116
+ sidenavOpened: boolean;
1117
+ sidenavCollapsible: boolean;
1118
+ /** Undefined means unconstrained, which is what an absent `contentMaxWidth` asks for. */
1119
+ contentMaxWidth?: string;
1070
1120
  }
1071
1121
  /**
1072
1122
  * Resolves the layout of one definition.
@@ -1081,54 +1131,76 @@ interface ResolvedLayout {
1081
1131
  * `sidenavCollapsible` and `sidenavOpenByDefault` need no such fallback: they are non-optional on the
1082
1132
  * entity and the constructor defaults them, so there is always a value to read.
1083
1133
  */
1084
- declare function layoutOf(definition: AppDefinition | undefined): ResolvedLayout;
1134
+ export declare function layoutOf(definition: AppDefinition | undefined): ResolvedLayout;
1085
1135
  /**
1086
1136
  * The `--pp-*` overrides of one definition, as a style object to bind on the shell's host element.
1087
1137
  *
1088
1138
  * Custom properties cascade, so setting them on one element re-tints every framework surface below it
1089
1139
  * — which is what makes a themed preview possible at all without an iframe. `materialTheme` and
1090
- * `colorScheme` are deliberately **not** handled: those want `:root` and a Material theme class, and
1091
- * neither scopes to a subtree. They belong to the standalone runtime host, where the shell owns the
1092
- * document.
1140
+ * `colorScheme` are not handled here but by {@link themeDefaultsOf} and the shell's `ThemeService`, as
1141
+ * classes on the same element.
1093
1142
  *
1094
1143
  * Keys are passed through untouched, including their leading `--`: Angular's `[style]` binding treats
1095
1144
  * a custom property as a custom property, and the contract calls these overrides of the tokens in
1096
1145
  * `pp-colors.css`, so anything else would be this function inventing a naming rule.
1097
1146
  */
1098
- declare function themeVarsOf(definition: AppDefinition | undefined): Record<string, string>;
1099
-
1147
+ export declare function themeVarsOf(definition: AppDefinition | undefined): Record<string, string>;
1148
+ /**
1149
+ * The route paths this definition accounts for: its own routes' paths, plus the base path of every module
1150
+ * it mounts.
1151
+ *
1152
+ * A module's *own* routes are deliberately absent. They live in the module's definition, which the router
1153
+ * fetches only when something navigates into the mount, so they cannot be known here — which is why the
1154
+ * consumer of this list treats a path *below* a known one as accounted for. See `toNavRows`.
1155
+ */
1156
+ declare function knownRoutePathsOf(definition: AppDefinition | undefined): string[];
1157
+ /**
1158
+ * The theme preset and colour scheme a definition declares, as the defaults of the shell's `ThemeService` —
1159
+ * which a user's choice in a `ThemesButton` overrides, and which fall back to the ProcessPuzzle look, light,
1160
+ * for whatever the definition leaves unset. Those fallbacks are the contract's defaults too, so the server
1161
+ * fills the same values in on save.
1162
+ */
1163
+ declare function themeDefaultsOf(definition: AppDefinition | undefined): Partial<ThemeSelection>;
1100
1164
  /**
1101
1165
  * The `footer` region: the widgets it declares, and nothing else. The contract gives a footer no field
1102
1166
  * beyond `widgets`, so this stays a thin styled host over {@link WidgetListComponent} — separate from
1103
1167
  * the header only because the two are different slots with different styling, not because they share
1104
1168
  * no logic.
1105
1169
  */
1106
- declare class RegionFooterComponent {
1107
- readonly widgets: _angular_core.InputSignal<WidgetInstance[]>;
1108
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<RegionFooterComponent, never>;
1109
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<RegionFooterComponent, "pp-region-footer", never, { "widgets": { "alias": "widgets"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
1170
+ export declare class RegionFooterComponent {
1171
+ readonly widgets: import("@angular/core").InputSignal<WidgetInstance$1[]>;
1172
+ static ɵfac: i0.ɵɵFactoryDeclaration<RegionFooterComponent, never>;
1173
+ static ɵcmp: i0.ɵɵComponentDeclaration<RegionFooterComponent, "pp-region-footer", never, {
1174
+ "widgets": {
1175
+ "alias": "widgets";
1176
+ "required": false;
1177
+ "isSignal": true;
1178
+ };
1179
+ }, {}, never, never, true, never>;
1110
1180
  }
1111
-
1112
1181
  /**
1113
- * The `header` region: the application's brand block and the widgets the region declares.
1182
+ * The `header` region: the widgets the region declares, laid out in one row.
1114
1183
  *
1115
- * The brand is the shell's contribution rather than the region's — `logoUrl` and the title come from
1116
- * the definition's theme and name, not from anything authored on the region — which is why they are
1117
- * inputs the renderer fills instead of something this component reaches into a store for. That keeps
1118
- * it renderable from a spec with three inputs and no providers.
1184
+ * The brand is widgets too — `app-logo` and `app-title` — which read the application's name and logo from
1185
+ * the shell's `APPLICATION_CONTEXT`. So a designer orders, omits or restyles them like any other widget, and
1186
+ * the header has no second, built-in way of showing the same thing. `--pp-app-title-color` is set to the
1187
+ * on-header colour here, so the title stays legible on the header surface whatever the theme.
1119
1188
  *
1120
1189
  * Nav items are *not* handled here. Under the `top-nav` preset the shell places the `sidenav` region's
1121
1190
  * nav beside this component in the same row, so that a `top-nav` app with no header region is still
1122
1191
  * navigable — see {@link AppShellComponent}.
1123
1192
  */
1124
- declare class RegionHeaderComponent {
1125
- readonly title: _angular_core.InputSignal<string>;
1126
- readonly logoUrl: _angular_core.InputSignal<string | undefined>;
1127
- readonly widgets: _angular_core.InputSignal<WidgetInstance[]>;
1128
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<RegionHeaderComponent, never>;
1129
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<RegionHeaderComponent, "pp-region-header", never, { "title": { "alias": "title"; "required": false; "isSignal": true; }; "logoUrl": { "alias": "logoUrl"; "required": false; "isSignal": true; }; "widgets": { "alias": "widgets"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
1193
+ export declare class RegionHeaderComponent {
1194
+ readonly widgets: import("@angular/core").InputSignal<WidgetInstance$1[]>;
1195
+ static ɵfac: i0.ɵɵFactoryDeclaration<RegionHeaderComponent, never>;
1196
+ static ɵcmp: i0.ɵɵComponentDeclaration<RegionHeaderComponent, "pp-region-header", never, {
1197
+ "widgets": {
1198
+ "alias": "widgets";
1199
+ "required": false;
1200
+ "isSignal": true;
1201
+ };
1202
+ }, {}, never, never, true, never>;
1130
1203
  }
1131
-
1132
1204
  /** Which way the list runs. The shell decides it from `layout.preset`, not the region definition. */
1133
1205
  type NavOrientation = 'vertical' | 'horizontal';
1134
1206
  /**
@@ -1137,21 +1209,33 @@ type NavOrientation = 'vertical' | 'horizontal';
1137
1209
  * template would re-run on every change detection pass.
1138
1210
  */
1139
1211
  interface NavRow {
1140
- id: string;
1141
- label: string;
1142
- /**
1143
- * Transloco key for {@link label}, preferred over it when the key resolves. Carried onto the row rather
1144
- * than translated here: `toNavRows` is a pure function and translation depends on the active language
1145
- * and on which scopes have finished loading, both of which are the template's concern.
1146
- */
1147
- translocoId?: string;
1148
- icon?: string;
1149
- /** Present only when the item names a route that something accounts for — see {@link toNavRows}. */
1150
- routePath?: string;
1151
- /** The item names a route path, but nothing in the definition accounts for it. */
1152
- unresolved: boolean;
1153
- children: NavRow[];
1212
+ id: string;
1213
+ label: string;
1214
+ /**
1215
+ * Transloco key for {@link label}, preferred over it when the key resolves. Carried onto the row rather
1216
+ * than translated here: `toNavRows` is a pure function and translation depends on the active language
1217
+ * and on which scopes have finished loading, both of which are the template's concern.
1218
+ */
1219
+ translocoId?: string;
1220
+ icon?: string;
1221
+ /** Present only when the item names a route that something accounts for — see {@link toNavRows}. */
1222
+ routePath?: string;
1223
+ /** The item names a route path, but nothing in the definition accounts for it. */
1224
+ unresolved: boolean;
1225
+ children: NavRow[];
1154
1226
  }
1227
+ /**
1228
+ * Maps the authored nav tree onto rows, resolving each `routePath` against the paths the definition
1229
+ * accounts for.
1230
+ *
1231
+ * A path counts as resolved if it equals a declared route's path *or* sits below one — below a declared
1232
+ * route, or below a mounted module's base path. The prefix rule is what keeps this from crying wolf: the
1233
+ * routes inside a module live in the module's own definition, which is fetched lazily and is not knowable
1234
+ * here, so `back-office/lines` has to be trusted on the strength of the `back-office` mount alone.
1235
+ *
1236
+ * A group node — no `routePath`, children instead — is not unresolved. It expands rather than navigates.
1237
+ */
1238
+ declare function toNavRows(items: NavItem[] | undefined, knownPaths: string[]): NavRow[];
1155
1239
  /**
1156
1240
  * Renders the nav tree of the `sidenav` region — in the sidenav for the two sidenav presets, and
1157
1241
  * horizontally in the header row for `top-nav`. One component for both, because the tree and its
@@ -1171,16 +1255,41 @@ interface NavRow {
1171
1255
  * *tenant* content living under a module's own scope, which for an authored module is served by the
1172
1256
  * backend rather than shipped as an asset; `ppLabel` falling back is the normal case, not a defect.
1173
1257
  */
1174
- declare class RegionNavComponent {
1175
- readonly navItems: _angular_core.InputSignal<NavItem[]>;
1176
- readonly orientation: _angular_core.InputSignal<NavOrientation>;
1177
- /** Route paths the definition accounts for, supplied by `AppRegionRenderer`. See {@link toNavRows}. */
1178
- readonly knownPaths: _angular_core.InputSignal<string[]>;
1179
- protected readonly rows: _angular_core.Signal<NavRow[]>;
1180
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<RegionNavComponent, never>;
1181
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<RegionNavComponent, "pp-region-nav", never, { "navItems": { "alias": "navItems"; "required": false; "isSignal": true; }; "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "knownPaths": { "alias": "knownPaths"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
1258
+ export declare class RegionNavComponent {
1259
+ readonly navItems: import("@angular/core").InputSignal<NavItem[]>;
1260
+ readonly orientation: import("@angular/core").InputSignal<NavOrientation>;
1261
+ /**
1262
+ * Icon-over-label rows for a narrow layout. Set by the shell on a tablet layout, where a content-sized
1263
+ * drawer with full rows would take too much of the screen; meaningless for the horizontal nav.
1264
+ */
1265
+ readonly compact: import("@angular/core").InputSignal<boolean>;
1266
+ /** Route paths the definition accounts for, supplied by `AppRegionRenderer`. See {@link toNavRows}. */
1267
+ readonly knownPaths: import("@angular/core").InputSignal<string[]>;
1268
+ protected readonly rows: import("@angular/core").Signal<NavRow[]>;
1269
+ static ɵfac: i0.ɵɵFactoryDeclaration<RegionNavComponent, never>;
1270
+ static ɵcmp: i0.ɵɵComponentDeclaration<RegionNavComponent, "pp-region-nav", never, {
1271
+ "navItems": {
1272
+ "alias": "navItems";
1273
+ "required": false;
1274
+ "isSignal": true;
1275
+ };
1276
+ "orientation": {
1277
+ "alias": "orientation";
1278
+ "required": false;
1279
+ "isSignal": true;
1280
+ };
1281
+ "compact": {
1282
+ "alias": "compact";
1283
+ "required": false;
1284
+ "isSignal": true;
1285
+ };
1286
+ "knownPaths": {
1287
+ "alias": "knownPaths";
1288
+ "required": false;
1289
+ "isSignal": true;
1290
+ };
1291
+ }, {}, never, never, true, never>;
1182
1292
  }
1183
-
1184
1293
  /**
1185
1294
  * The Preview tab, declared once and consumed twice: `BASE_APP_ROUTES` mounts it as
1186
1295
  * `app-definition/<id>/preview`, and `AppDefinitionContainerComponent` puts it on the descriptor so the tab bar
@@ -1193,8 +1302,7 @@ declare class RegionNavComponent {
1193
1302
  * no `children` at all takes the `loadChildren` path instead, which is cached per Route object and so cannot
1194
1303
  * vary by `:entityId`.
1195
1304
  */
1196
- declare const APP_PREVIEW_TAB: EntityTabDescriptor;
1197
-
1305
+ export declare const APP_PREVIEW_TAB: EntityTabDescriptor;
1198
1306
  /**
1199
1307
  * Hosts the generic container for `Module Definition`, whose only job is to bind the descriptor to the
1200
1308
  * store the routable screens read from.
@@ -1204,14 +1312,13 @@ declare const APP_PREVIEW_TAB: EntityTabDescriptor;
1204
1312
  * mount is live, so a module with a lifecycle of its own would make "which version of what is live" a
1205
1313
  * question with two answers.
1206
1314
  */
1207
- declare class ModuleDefinitionContainerComponent {
1208
- private readonly store;
1209
- readonly entityDescriptor: BaseEntityDescriptor;
1210
- constructor();
1211
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<ModuleDefinitionContainerComponent, never>;
1212
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<ModuleDefinitionContainerComponent, "pp-module-definition-container", never, {}, {}, never, never, true, never>;
1315
+ export declare class ModuleDefinitionContainerComponent {
1316
+ private readonly store;
1317
+ readonly entityDescriptor: BaseEntityDescriptor;
1318
+ constructor();
1319
+ static ɵfac: i0.ɵɵFactoryDeclaration<ModuleDefinitionContainerComponent, never>;
1320
+ static ɵcmp: i0.ɵɵComponentDeclaration<ModuleDefinitionContainerComponent, "pp-module-definition-container", never, {}, {}, never, never, true, never>;
1213
1321
  }
1214
-
1215
1322
  /**
1216
1323
  * The facades of the whole definition graph, to be spread into the application's `providers`.
1217
1324
  *
@@ -1219,7 +1326,7 @@ declare class ModuleDefinitionContainerComponent {
1219
1326
  * like any other — that is what gives it a store — and only its repository differs, reading and writing
1220
1327
  * the `App Definition` document rather than an endpoint of its own.
1221
1328
  */
1222
- declare const BASE_APP_FACADE_PROVIDERS: Provider[];
1329
+ export declare const BASE_APP_FACADE_PROVIDERS: Provider[];
1223
1330
  /**
1224
1331
  * The same facades keyed by entity name, to be spread into the application's
1225
1332
  * `BASE_ENTITY_FACADE_REGISTRY` value.
@@ -1230,15 +1337,12 @@ declare const BASE_APP_FACADE_PROVIDERS: Provider[];
1230
1337
  * because the token holds one value: a second `provide: BASE_ENTITY_FACADE_REGISTRY` would replace the
1231
1338
  * application's own entities instead of adding to them.
1232
1339
  */
1233
- declare const BASE_APP_ENTITY_FACADES: BaseEntityFacadeRegistry;
1234
-
1340
+ export declare const BASE_APP_ENTITY_FACADES: BaseEntityFacadeRegistry;
1235
1341
  /**
1236
1342
  * The path segment has to be `snakeCaseName('App Definition')`, because
1237
1343
  * `BaseFormNavigatorSingletonStore` builds the details URL from the entity name — see the same
1238
1344
  * constraint on `BASE_RULE_ROUTES`.
1239
1345
  */
1240
- declare const BASE_APP_ROUTES: Routes;
1241
-
1242
- export { APP_DEFINITION_ENTITY_NAME, APP_DEFINITION_I18N_SCOPE, APP_MODULE_MOUNT_ENTITY_NAME, APP_MODULE_MOUNT_I18N_SCOPE, APP_MODULE_MOUNT_ID_FIELD, APP_NAV_ITEM_ENTITY_NAME, APP_NAV_ITEM_I18N_SCOPE, APP_PREVIEW_I18N_KEY, APP_PREVIEW_TAB, APP_REGION_ENTITY_NAME, APP_REGION_I18N_SCOPE, APP_REGION_ID_FIELD, APP_ROUTE_ENTITY_NAME, APP_ROUTE_I18N_SCOPE, APP_ROUTE_ID_FIELD, APP_WIDGET_ENTITY_NAME, APP_WIDGET_I18N_SCOPE, AppDefinition, AppDefinitionContainerComponent, AppDefinitionFacade, AppDefinitionMapper, AppDefinitionService, AppDefinitionStatus, AppDefinitionStore, AppModuleMountFacade, AppNavItemFacade, AppPreviewComponent, AppRegionFacade, AppRegionRenderer, AppRouteFacade, AppRouteRenderer, AppShellComponent, AppShellRoutesFactory, AppWidgetFacade, BASE_APP_ENTITY_FACADES, BASE_APP_FACADE_PROVIDERS, BASE_APP_ROUTES, BASE_APP_TRANSLATION_SOURCE, BASE_APP_TRANSLOCO_SCOPE, COLOR_SCHEMES, ENTITY_MODES, LAYOUT_PRESETS, MATERIAL_THEMES, MODULE_DEFINITION_ENTITY_NAME, MODULE_DEFINITION_I18N_SCOPE, ModuleDefinition, ModuleDefinitionContainerComponent, ModuleDefinitionFacade, ModuleDefinitionMapper, ModuleDefinitionService, ModuleDefinitionStore, ModuleMount, NavItem, REGION_TYPES, ROUTE_TARGET_KINDS, RegionDefinition, RegionFooterComponent, RegionHeaderComponent, RegionNavComponent, RouteDefinition, RouteUnsupportedComponent, RouteWidgetsComponent, SIDENAV_MODES, WidgetListComponent, appShellRoutesGuard, buildAppRoutes, createAppDefinitionDescriptor, createModuleDefinitionDescriptor, createModuleMountDescriptor, createNavItemDescriptor, createRegionDefinitionDescriptor, createRouteDefinitionDescriptor, createWidgetInstanceDescriptor, layoutOf, moduleTranslocoScope, themeVarsOf };
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
1346
+ export declare const BASE_APP_ROUTES: Routes;
1347
+ export { type AppRouteSource, type ColorScheme, type EntityMode, type LayoutDefinition, type LayoutPreset, type MaterialTheme, type ModuleLoader, type NavOrientation, type RegionType, type RegionView, type ResolvedLayout, type RouteRenderer, type RouteTarget, type RouteTargetKind, type SidenavMode, type ThemeDefinition, WIDGET_PLACEMENTS, WidgetInstance, type WidgetPlacement };
1348
+ //# sourceMappingURL=processpuzzle-base-app.d.ts.map