@mintplayer/ng-spark 22.23.0 → 22.25.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.
Files changed (71) hide show
  1. package/README.md +196 -0
  2. package/fesm2022/mintplayer-ng-spark-attribute-description.mjs +100 -47
  3. package/fesm2022/mintplayer-ng-spark-attribute-description.mjs.map +1 -1
  4. package/fesm2022/mintplayer-ng-spark-client-operations.mjs +310 -329
  5. package/fesm2022/mintplayer-ng-spark-client-operations.mjs.map +1 -1
  6. package/fesm2022/mintplayer-ng-spark-column-filter.mjs +175 -135
  7. package/fesm2022/mintplayer-ng-spark-column-filter.mjs.map +1 -1
  8. package/fesm2022/mintplayer-ng-spark-contributions.mjs +721 -0
  9. package/fesm2022/mintplayer-ng-spark-contributions.mjs.map +1 -0
  10. package/fesm2022/mintplayer-ng-spark-grid.mjs +2385 -1118
  11. package/fesm2022/mintplayer-ng-spark-grid.mjs.map +1 -1
  12. package/fesm2022/mintplayer-ng-spark-history.mjs +598 -0
  13. package/fesm2022/mintplayer-ng-spark-history.mjs.map +1 -0
  14. package/fesm2022/mintplayer-ng-spark-icon.mjs +64 -27
  15. package/fesm2022/mintplayer-ng-spark-icon.mjs.map +1 -1
  16. package/fesm2022/mintplayer-ng-spark-models.mjs +405 -762
  17. package/fesm2022/mintplayer-ng-spark-models.mjs.map +1 -1
  18. package/fesm2022/mintplayer-ng-spark-moderation.mjs +1212 -0
  19. package/fesm2022/mintplayer-ng-spark-moderation.mjs.map +1 -0
  20. package/fesm2022/mintplayer-ng-spark-panels.mjs +60 -0
  21. package/fesm2022/mintplayer-ng-spark-panels.mjs.map +1 -0
  22. package/fesm2022/mintplayer-ng-spark-pipes.mjs +1158 -765
  23. package/fesm2022/mintplayer-ng-spark-pipes.mjs.map +1 -1
  24. package/fesm2022/mintplayer-ng-spark-po-create.mjs +273 -169
  25. package/fesm2022/mintplayer-ng-spark-po-create.mjs.map +1 -1
  26. package/fesm2022/mintplayer-ng-spark-po-detail.mjs +795 -410
  27. package/fesm2022/mintplayer-ng-spark-po-detail.mjs.map +1 -1
  28. package/fesm2022/mintplayer-ng-spark-po-edit.mjs +1196 -280
  29. package/fesm2022/mintplayer-ng-spark-po-edit.mjs.map +1 -1
  30. package/fesm2022/mintplayer-ng-spark-po-form.mjs +2244 -1224
  31. package/fesm2022/mintplayer-ng-spark-po-form.mjs.map +1 -1
  32. package/fesm2022/mintplayer-ng-spark-query-list.mjs +571 -303
  33. package/fesm2022/mintplayer-ng-spark-query-list.mjs.map +1 -1
  34. package/fesm2022/mintplayer-ng-spark-renderers.mjs +44 -55
  35. package/fesm2022/mintplayer-ng-spark-renderers.mjs.map +1 -1
  36. package/fesm2022/mintplayer-ng-spark-retry-action-modal.mjs +216 -177
  37. package/fesm2022/mintplayer-ng-spark-retry-action-modal.mjs.map +1 -1
  38. package/fesm2022/mintplayer-ng-spark-routes.mjs +24 -28
  39. package/fesm2022/mintplayer-ng-spark-routes.mjs.map +1 -1
  40. package/fesm2022/mintplayer-ng-spark-services.mjs +625 -640
  41. package/fesm2022/mintplayer-ng-spark-services.mjs.map +1 -1
  42. package/fesm2022/mintplayer-ng-spark-shell.mjs +1031 -397
  43. package/fesm2022/mintplayer-ng-spark-shell.mjs.map +1 -1
  44. package/fesm2022/mintplayer-ng-spark-soft-delete.mjs +294 -0
  45. package/fesm2022/mintplayer-ng-spark-soft-delete.mjs.map +1 -0
  46. package/fesm2022/mintplayer-ng-spark.mjs +14 -48
  47. package/fesm2022/mintplayer-ng-spark.mjs.map +1 -1
  48. package/package.json +23 -2
  49. package/types/mintplayer-ng-spark-attribute-description.d.ts +25 -18
  50. package/types/mintplayer-ng-spark-client-operations.d.ts +139 -160
  51. package/types/mintplayer-ng-spark-column-filter.d.ts +73 -55
  52. package/types/mintplayer-ng-spark-contributions.d.ts +231 -0
  53. package/types/mintplayer-ng-spark-grid.d.ts +917 -448
  54. package/types/mintplayer-ng-spark-history.d.ts +216 -0
  55. package/types/mintplayer-ng-spark-icon.d.ts +15 -13
  56. package/types/mintplayer-ng-spark-models.d.ts +681 -573
  57. package/types/mintplayer-ng-spark-moderation.d.ts +402 -0
  58. package/types/mintplayer-ng-spark-panels.d.ts +143 -0
  59. package/types/mintplayer-ng-spark-pipes.d.ts +131 -149
  60. package/types/mintplayer-ng-spark-po-create.d.ts +46 -37
  61. package/types/mintplayer-ng-spark-po-detail.d.ts +180 -117
  62. package/types/mintplayer-ng-spark-po-edit.d.ts +367 -64
  63. package/types/mintplayer-ng-spark-po-form.d.ts +558 -373
  64. package/types/mintplayer-ng-spark-query-list.d.ts +143 -82
  65. package/types/mintplayer-ng-spark-renderers.d.ts +121 -85
  66. package/types/mintplayer-ng-spark-retry-action-modal.d.ts +31 -34
  67. package/types/mintplayer-ng-spark-routes.d.ts +7 -11
  68. package/types/mintplayer-ng-spark-services.d.ts +377 -261
  69. package/types/mintplayer-ng-spark-shell.d.ts +228 -132
  70. package/types/mintplayer-ng-spark-soft-delete.d.ts +90 -0
  71. package/types/mintplayer-ng-spark.d.ts +19 -12
@@ -1,11 +1,11 @@
1
- import * as _angular_core from '@angular/core';
2
- import { TemplateRef } from '@angular/core';
3
- import { BsShellState } from '@mintplayer/ng-bootstrap/shell';
4
- import { Breakpoint } from '@mintplayer/ng-bootstrap';
5
- import { ShellStateChangeEventDetail } from '@mintplayer/web-components/shell';
6
- import { ProgramUnitGroup } from '@mintplayer/ng-spark/models';
7
- import { SparkLanguageService } from '@mintplayer/ng-spark/services';
8
-
1
+ import * as i0 from "@angular/core";
2
+ import { TemplateRef } from "@angular/core";
3
+ import { BsShellState } from "@mintplayer/ng-bootstrap/shell";
4
+ import { BsThemeService, BsThemeToggleMode } from "@mintplayer/ng-bootstrap/theming";
5
+ import { Breakpoint } from "@mintplayer/ng-bootstrap";
6
+ import { ShellStateChangeEventDetail } from "@mintplayer/web-components/shell";
7
+ import { ProgramUnitGroup } from "@mintplayer/ng-spark/models";
8
+ import { SparkLanguageService } from "@mintplayer/ng-spark/services";
9
9
  /**
10
10
  * Region slots for `<spark-shell>`.
11
11
  *
@@ -35,20 +35,20 @@ import { SparkLanguageService } from '@mintplayer/ng-spark/services';
35
35
  * ```
36
36
  */
37
37
  /** Topbar, leading edge. Default: a `bs-navbar-toggler` mirroring the shell's open state. */
38
- declare class SparkShellTopbarStartDirective {
39
- readonly templateRef: TemplateRef<unknown>;
40
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<SparkShellTopbarStartDirective, never>;
41
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<SparkShellTopbarStartDirective, "[sparkShellTopbarStart]", never, {}, {}, never, never, true, never>;
38
+ export declare class SparkShellTopbarStartDirective {
39
+ readonly templateRef: TemplateRef<unknown>;
40
+ static ɵfac: i0.ɵɵFactoryDeclaration<SparkShellTopbarStartDirective, never>;
41
+ static ɵdir: i0.ɵɵDirectiveDeclaration<SparkShellTopbarStartDirective, "[sparkShellTopbarStart]", never, {}, {}, never, never, true, never>;
42
42
  }
43
43
  /**
44
44
  * Topbar, trailing edge. Default: the language selector (which hides itself when the app has
45
45
  * one language). This is where an auth bar goes — the shell cannot ship one itself, since
46
46
  * `@mintplayer/ng-spark` does not (and must not) depend on `@mintplayer/ng-spark-auth`.
47
47
  */
48
- declare class SparkShellTopbarEndDirective {
49
- readonly templateRef: TemplateRef<unknown>;
50
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<SparkShellTopbarEndDirective, never>;
51
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<SparkShellTopbarEndDirective, "[sparkShellTopbarEnd]", never, {}, {}, never, never, true, never>;
48
+ export declare class SparkShellTopbarEndDirective {
49
+ readonly templateRef: TemplateRef<unknown>;
50
+ static ɵfac: i0.ɵɵFactoryDeclaration<SparkShellTopbarEndDirective, never>;
51
+ static ɵdir: i0.ɵɵDirectiveDeclaration<SparkShellTopbarEndDirective, "[sparkShellTopbarEnd]", never, {}, {}, never, never, true, never>;
52
52
  }
53
53
  /**
54
54
  * Topbar, trailing edge, **beside** the default chrome rather than instead of it — rendered before
@@ -72,22 +72,22 @@ declare class SparkShellTopbarEndDirective {
72
72
  * Supplying both slots is allowed and does what it says: `topbarEnd` replaces the default chrome,
73
73
  * and these actions still render ahead of whatever it put there.
74
74
  */
75
- declare class SparkShellTopbarActionsDirective {
76
- readonly templateRef: TemplateRef<unknown>;
77
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<SparkShellTopbarActionsDirective, never>;
78
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<SparkShellTopbarActionsDirective, "[sparkShellTopbarActions]", never, {}, {}, never, never, true, never>;
75
+ export declare class SparkShellTopbarActionsDirective {
76
+ readonly templateRef: TemplateRef<unknown>;
77
+ static ɵfac: i0.ɵɵFactoryDeclaration<SparkShellTopbarActionsDirective, never>;
78
+ static ɵdir: i0.ɵɵDirectiveDeclaration<SparkShellTopbarActionsDirective, "[sparkShellTopbarActions]", never, {}, {}, never, never, true, never>;
79
79
  }
80
80
  /** Sidebar, above everything. Default: `<h5>{{ title }}</h5>`. */
81
- declare class SparkShellSidebarHeaderDirective {
82
- readonly templateRef: TemplateRef<unknown>;
83
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<SparkShellSidebarHeaderDirective, never>;
84
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<SparkShellSidebarHeaderDirective, "[sparkShellSidebarHeader]", never, {}, {}, never, never, true, never>;
81
+ export declare class SparkShellSidebarHeaderDirective {
82
+ readonly templateRef: TemplateRef<unknown>;
83
+ static ɵfac: i0.ɵɵFactoryDeclaration<SparkShellSidebarHeaderDirective, never>;
84
+ static ɵdir: i0.ɵɵDirectiveDeclaration<SparkShellSidebarHeaderDirective, "[sparkShellSidebarHeader]", never, {}, {}, never, never, true, never>;
85
85
  }
86
86
  /** Sidebar, between the header and the program-units menu. No default. */
87
- declare class SparkShellSidebarTopDirective {
88
- readonly templateRef: TemplateRef<unknown>;
89
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<SparkShellSidebarTopDirective, never>;
90
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<SparkShellSidebarTopDirective, "[sparkShellSidebarTop]", never, {}, {}, never, never, true, never>;
87
+ export declare class SparkShellSidebarTopDirective {
88
+ readonly templateRef: TemplateRef<unknown>;
89
+ static ɵfac: i0.ɵɵFactoryDeclaration<SparkShellSidebarTopDirective, never>;
90
+ static ɵdir: i0.ɵɵDirectiveDeclaration<SparkShellSidebarTopDirective, "[sparkShellSidebarTop]", never, {}, {}, never, never, true, never>;
91
91
  }
92
92
  /**
93
93
  * An extra accordion tab in the sidebar menu, rendered after the generated program-unit groups
@@ -112,40 +112,55 @@ declare class SparkShellSidebarTopDirective {
112
112
  * (client-side demos, external tools). For sidebar content that is NOT an accordion tab, use
113
113
  * `*sparkShellSidebarTop` or `*sparkShellSidebarFooter`.
114
114
  */
115
- declare class SparkShellTabDirective {
116
- readonly templateRef: TemplateRef<unknown>;
117
- /** The tab's header label. */
118
- readonly header: _angular_core.InputSignal<string>;
119
- /** Bootstrap icon name for the header, as in `programUnits.json`. Defaults to a folder. */
120
- readonly icon: _angular_core.InputSignal<string | undefined>;
121
- /** Replaces the icon+label header entirely, for a header that needs its own markup. */
122
- readonly headerTemplate: _angular_core.InputSignal<TemplateRef<unknown> | null>;
123
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<SparkShellTabDirective, never>;
124
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<SparkShellTabDirective, "[sparkShellTab]", never, { "header": { "alias": "sparkShellTab"; "required": true; "isSignal": true; }; "icon": { "alias": "sparkShellTabIcon"; "required": false; "isSignal": true; }; "headerTemplate": { "alias": "sparkShellTabHeader"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
115
+ export declare class SparkShellTabDirective {
116
+ readonly templateRef: TemplateRef<unknown>;
117
+ /** The tab's header label. */
118
+ readonly header: import("@angular/core").InputSignal<string>;
119
+ /** Bootstrap icon name for the header, as in `programUnits.json`. Defaults to a folder. */
120
+ readonly icon: import("@angular/core").InputSignal<string | undefined>;
121
+ /** Replaces the icon+label header entirely, for a header that needs its own markup. */
122
+ readonly headerTemplate: import("@angular/core").InputSignal<TemplateRef<unknown> | null>;
123
+ static ɵfac: i0.ɵɵFactoryDeclaration<SparkShellTabDirective, never>;
124
+ static ɵdir: i0.ɵɵDirectiveDeclaration<SparkShellTabDirective, "[sparkShellTab]", never, {
125
+ "header": {
126
+ "alias": "sparkShellTab";
127
+ "required": true;
128
+ "isSignal": true;
129
+ };
130
+ "icon": {
131
+ "alias": "sparkShellTabIcon";
132
+ "required": false;
133
+ "isSignal": true;
134
+ };
135
+ "headerTemplate": {
136
+ "alias": "sparkShellTabHeader";
137
+ "required": false;
138
+ "isSignal": true;
139
+ };
140
+ }, {}, never, never, true, never>;
125
141
  }
126
142
  /**
127
143
  * A sidebar accordion tab in the shape the menu renders it. Hosts normally contribute tabs with
128
144
  * `*sparkShellTab`; this is the same thing as data, for a host that computes its tabs.
129
145
  */
130
- interface SparkSidebarTab {
131
- readonly header: string;
132
- readonly icon?: string;
133
- readonly headerTemplate?: TemplateRef<unknown> | null;
134
- readonly content: TemplateRef<unknown>;
146
+ export interface SparkSidebarTab {
147
+ readonly header: string;
148
+ readonly icon?: string;
149
+ readonly headerTemplate?: TemplateRef<unknown> | null;
150
+ readonly content: TemplateRef<unknown>;
135
151
  }
136
152
  /** Sidebar, at the very bottom. No default. */
137
- declare class SparkShellSidebarFooterDirective {
138
- readonly templateRef: TemplateRef<unknown>;
139
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<SparkShellSidebarFooterDirective, never>;
140
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<SparkShellSidebarFooterDirective, "[sparkShellSidebarFooter]", never, {}, {}, never, never, true, never>;
153
+ export declare class SparkShellSidebarFooterDirective {
154
+ readonly templateRef: TemplateRef<unknown>;
155
+ static ɵfac: i0.ɵɵFactoryDeclaration<SparkShellSidebarFooterDirective, never>;
156
+ static ɵdir: i0.ɵɵDirectiveDeclaration<SparkShellSidebarFooterDirective, "[sparkShellSidebarFooter]", never, {}, {}, never, never, true, never>;
141
157
  }
142
158
  /** Main region, above the projected content (the host's `<router-outlet>`). No default. */
143
- declare class SparkShellMainHeaderDirective {
144
- readonly templateRef: TemplateRef<unknown>;
145
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<SparkShellMainHeaderDirective, never>;
146
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<SparkShellMainHeaderDirective, "[sparkShellMainHeader]", never, {}, {}, never, never, true, never>;
159
+ export declare class SparkShellMainHeaderDirective {
160
+ readonly templateRef: TemplateRef<unknown>;
161
+ static ɵfac: i0.ɵɵFactoryDeclaration<SparkShellMainHeaderDirective, never>;
162
+ static ɵdir: i0.ɵɵDirectiveDeclaration<SparkShellMainHeaderDirective, "[sparkShellMainHeader]", never, {}, {}, never, never, true, never>;
147
163
  }
148
-
149
164
  /**
150
165
  * The application frame: topbar + sidebar + main, wrapping ng-bootstrap's `bs-shell` (whose
151
166
  * `mp-shell` web component owns ALL responsive behavior — breakpoints, the overlay drawer,
@@ -166,62 +181,136 @@ declare class SparkShellMainHeaderDirective {
166
181
  * listens to `statechange` to keep the toggler's icon truthful in `auto` mode and only forces
167
182
  * `show`/`hide` on explicit toggles.
168
183
  *
169
- * Theming: the chrome colors are CSS custom properties with the classic dark-sidebar defaults —
170
- * `--spark-shell-topbar-bg`, `--spark-shell-sidebar-bg`, `--spark-shell-main-bg` — overridable on
171
- * the `<spark-shell>` element. `sidebarTheme` flips the sidebar's `data-bs-theme` (which is what
172
- * recolors the accordion internals across the shadow boundary) together with its default palette.
184
+ * Theming: the chrome colors are CSS custom properties —
185
+ * `--spark-shell-{topbar,sidebar,main}-{bg,color}` — declared per colour scheme under
186
+ * `[data-bs-theme=light]` / `[data-bs-theme=dark]` from Bootstrap tokens, so the whole shell follows
187
+ * the page's theme. An app restyles it by overriding those tokens, globally per scheme or on the
188
+ * `<spark-shell>` element.
189
+ *
190
+ * Colour mode: the shell injects `BsThemeService` itself, so 'auto' follows the OS live even when
191
+ * the topbar toggle is hidden with `[themeToggle]="false"` (an app may then place its own
192
+ * `<bs-theme-toggle>` elsewhere). The first paint is themed by `bs-theme-preboot.js` in the app's
193
+ * `index.html`, not by anything here.
173
194
  */
174
- declare class SparkShellComponent {
175
- /** The sidebar heading. Ignored when a `*sparkShellSidebarHeader` slot is supplied. */
176
- readonly title: _angular_core.InputSignal<string>;
177
- /** Forwarded to `bs-shell`: below it the sidebar is an overlay drawer. */
178
- readonly breakpoint: _angular_core.InputSignal<Breakpoint>;
179
- /**
180
- * `data-bs-theme` for the sidebar — what flips the accordion's shadow-DOM internals between
181
- * palettes — plus the matching default background. `null` sets no theme (inherit the page's).
182
- */
183
- readonly sidebarTheme: _angular_core.InputSignal<"dark" | "light" | null>;
184
- /** Forwarded to the menu: any changed value re-fetches the program units. */
185
- readonly reloadToken: _angular_core.InputSignal<unknown>;
186
- /** Extra sidebar tabs as data, for hosts that compute them; `*sparkShellTab` is the usual way. */
187
- readonly sidebarTabs: _angular_core.InputSignal<readonly SparkSidebarTab[]>;
188
- readonly topbarStartTemplate: _angular_core.InputSignal<TemplateRef<unknown> | null>;
189
- readonly topbarEndTemplate: _angular_core.InputSignal<TemplateRef<unknown> | null>;
190
- readonly topbarActionsTemplate: _angular_core.InputSignal<TemplateRef<unknown> | null>;
191
- readonly sidebarHeaderTemplate: _angular_core.InputSignal<TemplateRef<unknown> | null>;
192
- readonly sidebarTopTemplate: _angular_core.InputSignal<TemplateRef<unknown> | null>;
193
- readonly sidebarFooterTemplate: _angular_core.InputSignal<TemplateRef<unknown> | null>;
194
- readonly mainHeaderTemplate: _angular_core.InputSignal<TemplateRef<unknown> | null>;
195
- private readonly topbarStartSlot;
196
- private readonly topbarEndSlot;
197
- private readonly topbarActionsSlot;
198
- private readonly sidebarHeaderSlot;
199
- private readonly sidebarTopSlot;
200
- private readonly sidebarFooterSlot;
201
- private readonly mainHeaderSlot;
202
- protected readonly topbarStartTpl: _angular_core.Signal<TemplateRef<unknown> | null>;
203
- protected readonly topbarEndTpl: _angular_core.Signal<TemplateRef<unknown> | null>;
204
- protected readonly topbarActionsTpl: _angular_core.Signal<TemplateRef<unknown> | null>;
205
- protected readonly sidebarHeaderTpl: _angular_core.Signal<TemplateRef<unknown> | null>;
206
- protected readonly sidebarTopTpl: _angular_core.Signal<TemplateRef<unknown> | null>;
207
- protected readonly sidebarFooterTpl: _angular_core.Signal<TemplateRef<unknown> | null>;
208
- protected readonly mainHeaderTpl: _angular_core.Signal<TemplateRef<unknown> | null>;
209
- /**
210
- * Extra accordion tabs, forwarded to the menu so IT creates the `<bs-accordion-tab>` elements —
211
- * the only way they share the generated groups' single-open behavior (see
212
- * `SparkShellTabDirective`). Data-supplied tabs come first, then projected ones in declaration
213
- * order.
214
- */
215
- private readonly tabSlots;
216
- protected readonly tabs: _angular_core.Signal<readonly SparkSidebarTab[]>;
217
- protected readonly shellState: _angular_core.WritableSignal<BsShellState>;
218
- protected readonly isSidebarVisible: _angular_core.WritableSignal<boolean>;
219
- protected toggleSidebar(open: boolean): void;
220
- protected onShellToggle(detail: ShellStateChangeEventDetail): void;
221
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<SparkShellComponent, never>;
222
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<SparkShellComponent, "spark-shell", never, { "title": { "alias": "title"; "required": false; "isSignal": true; }; "breakpoint": { "alias": "breakpoint"; "required": false; "isSignal": true; }; "sidebarTheme": { "alias": "sidebarTheme"; "required": false; "isSignal": true; }; "reloadToken": { "alias": "reloadToken"; "required": false; "isSignal": true; }; "sidebarTabs": { "alias": "sidebarTabs"; "required": false; "isSignal": true; }; "topbarStartTemplate": { "alias": "topbarStartTemplate"; "required": false; "isSignal": true; }; "topbarEndTemplate": { "alias": "topbarEndTemplate"; "required": false; "isSignal": true; }; "topbarActionsTemplate": { "alias": "topbarActionsTemplate"; "required": false; "isSignal": true; }; "sidebarHeaderTemplate": { "alias": "sidebarHeaderTemplate"; "required": false; "isSignal": true; }; "sidebarTopTemplate": { "alias": "sidebarTopTemplate"; "required": false; "isSignal": true; }; "sidebarFooterTemplate": { "alias": "sidebarFooterTemplate"; "required": false; "isSignal": true; }; "mainHeaderTemplate": { "alias": "mainHeaderTemplate"; "required": false; "isSignal": true; }; }, {}, ["topbarStartSlot", "topbarEndSlot", "topbarActionsSlot", "sidebarHeaderSlot", "sidebarTopSlot", "sidebarFooterSlot", "mainHeaderSlot", "tabSlots"], ["*"], true, never>;
195
+ export declare class SparkShellComponent {
196
+ /** The sidebar heading. Ignored when a `*sparkShellSidebarHeader` slot is supplied. */
197
+ readonly title: import("@angular/core").InputSignal<string>;
198
+ /** Forwarded to `bs-shell`: below it the sidebar is an overlay drawer. */
199
+ readonly breakpoint: import("@angular/core").InputSignal<Breakpoint>;
200
+ /**
201
+ * Render the Auto / Light / Dark `bs-theme-toggle` in the topbar. `false` hides it; the theme
202
+ * service stays live either way.
203
+ */
204
+ readonly themeToggle: import("@angular/core").InputSignal<boolean>;
205
+ /**
206
+ * Instantiated here, not only through the toggle (PRD D3): without it, `[themeToggle]="false"`
207
+ * would leave 'auto' with no live `prefers-color-scheme` listener in Angular's view.
208
+ */
209
+ protected readonly theme: BsThemeService;
210
+ private readonly lang;
211
+ /** The toggle's cycle with Spark's translated labels (`theme.*` keys); icons stay ng-bootstrap's. */
212
+ protected readonly themeModes: import("@angular/core").Signal<readonly BsThemeToggleMode[]>;
213
+ /** Forwarded to the menu: any changed value re-fetches the program units. */
214
+ readonly reloadToken: import("@angular/core").InputSignal<unknown>;
215
+ /** Extra sidebar tabs as data, for hosts that compute them; `*sparkShellTab` is the usual way. */
216
+ readonly sidebarTabs: import("@angular/core").InputSignal<readonly SparkSidebarTab[]>;
217
+ readonly topbarStartTemplate: import("@angular/core").InputSignal<TemplateRef<unknown> | null>;
218
+ readonly topbarEndTemplate: import("@angular/core").InputSignal<TemplateRef<unknown> | null>;
219
+ readonly topbarActionsTemplate: import("@angular/core").InputSignal<TemplateRef<unknown> | null>;
220
+ readonly sidebarHeaderTemplate: import("@angular/core").InputSignal<TemplateRef<unknown> | null>;
221
+ readonly sidebarTopTemplate: import("@angular/core").InputSignal<TemplateRef<unknown> | null>;
222
+ readonly sidebarFooterTemplate: import("@angular/core").InputSignal<TemplateRef<unknown> | null>;
223
+ readonly mainHeaderTemplate: import("@angular/core").InputSignal<TemplateRef<unknown> | null>;
224
+ private readonly topbarStartSlot;
225
+ private readonly topbarEndSlot;
226
+ private readonly topbarActionsSlot;
227
+ private readonly sidebarHeaderSlot;
228
+ private readonly sidebarTopSlot;
229
+ private readonly sidebarFooterSlot;
230
+ private readonly mainHeaderSlot;
231
+ protected readonly topbarStartTpl: import("@angular/core").Signal<TemplateRef<unknown> | null>;
232
+ protected readonly topbarEndTpl: import("@angular/core").Signal<TemplateRef<unknown> | null>;
233
+ protected readonly topbarActionsTpl: import("@angular/core").Signal<TemplateRef<unknown> | null>;
234
+ protected readonly sidebarHeaderTpl: import("@angular/core").Signal<TemplateRef<unknown> | null>;
235
+ protected readonly sidebarTopTpl: import("@angular/core").Signal<TemplateRef<unknown> | null>;
236
+ protected readonly sidebarFooterTpl: import("@angular/core").Signal<TemplateRef<unknown> | null>;
237
+ protected readonly mainHeaderTpl: import("@angular/core").Signal<TemplateRef<unknown> | null>;
238
+ /**
239
+ * Extra accordion tabs, forwarded to the menu so IT creates the `<bs-accordion-tab>` elements —
240
+ * the only way they share the generated groups' single-open behavior (see
241
+ * `SparkShellTabDirective`). Data-supplied tabs come first, then projected ones in declaration
242
+ * order.
243
+ */
244
+ private readonly tabSlots;
245
+ protected readonly tabs: import("@angular/core").Signal<readonly SparkSidebarTab[]>;
246
+ protected readonly shellState: import("@angular/core").WritableSignal<BsShellState>;
247
+ protected readonly isSidebarVisible: import("@angular/core").WritableSignal<boolean>;
248
+ protected toggleSidebar(open: boolean): void;
249
+ protected onShellToggle(detail: ShellStateChangeEventDetail): void;
250
+ static ɵfac: i0.ɵɵFactoryDeclaration<SparkShellComponent, never>;
251
+ static ɵcmp: i0.ɵɵComponentDeclaration<SparkShellComponent, "spark-shell", never, {
252
+ "title": {
253
+ "alias": "title";
254
+ "required": false;
255
+ "isSignal": true;
256
+ };
257
+ "breakpoint": {
258
+ "alias": "breakpoint";
259
+ "required": false;
260
+ "isSignal": true;
261
+ };
262
+ "themeToggle": {
263
+ "alias": "themeToggle";
264
+ "required": false;
265
+ "isSignal": true;
266
+ };
267
+ "reloadToken": {
268
+ "alias": "reloadToken";
269
+ "required": false;
270
+ "isSignal": true;
271
+ };
272
+ "sidebarTabs": {
273
+ "alias": "sidebarTabs";
274
+ "required": false;
275
+ "isSignal": true;
276
+ };
277
+ "topbarStartTemplate": {
278
+ "alias": "topbarStartTemplate";
279
+ "required": false;
280
+ "isSignal": true;
281
+ };
282
+ "topbarEndTemplate": {
283
+ "alias": "topbarEndTemplate";
284
+ "required": false;
285
+ "isSignal": true;
286
+ };
287
+ "topbarActionsTemplate": {
288
+ "alias": "topbarActionsTemplate";
289
+ "required": false;
290
+ "isSignal": true;
291
+ };
292
+ "sidebarHeaderTemplate": {
293
+ "alias": "sidebarHeaderTemplate";
294
+ "required": false;
295
+ "isSignal": true;
296
+ };
297
+ "sidebarTopTemplate": {
298
+ "alias": "sidebarTopTemplate";
299
+ "required": false;
300
+ "isSignal": true;
301
+ };
302
+ "sidebarFooterTemplate": {
303
+ "alias": "sidebarFooterTemplate";
304
+ "required": false;
305
+ "isSignal": true;
306
+ };
307
+ "mainHeaderTemplate": {
308
+ "alias": "mainHeaderTemplate";
309
+ "required": false;
310
+ "isSignal": true;
311
+ };
312
+ }, {}, ["topbarStartSlot", "topbarEndSlot", "topbarActionsSlot", "sidebarHeaderSlot", "sidebarTopSlot", "sidebarFooterSlot", "mainHeaderSlot", "tabSlots"], ["*"], true, never>;
223
313
  }
224
-
225
314
  /**
226
315
  * The server-driven navigation menu: an accordion of program-unit groups fetched from
227
316
  * `GET /spark/program-units`, which the server has already filtered to what the caller's rights
@@ -238,35 +327,42 @@ declare class SparkShellComponent {
238
327
  *
239
328
  * Usually rendered by `<spark-shell>`; exported standalone for hosts that own their own layout.
240
329
  */
241
- declare class SparkProgramUnitsComponent {
242
- private readonly sparkService;
243
- private readonly authState;
244
- /** Any changed value triggers a reload — for apps whose auth state isn't a provided signal. */
245
- readonly reloadToken: _angular_core.InputSignal<unknown>;
246
- /**
247
- * Extra tabs to render after the generated groups, normally forwarded by `<spark-shell>` from
248
- * its `*sparkShellTab` directives. They must be rendered by THIS template — see
249
- * `SparkShellTabDirective` for why a host-declared `<bs-accordion-tab>` cannot work.
250
- */
251
- readonly extraTabs: _angular_core.InputSignal<readonly SparkSidebarTab[]>;
252
- protected readonly groups: _angular_core.WritableSignal<ProgramUnitGroup[]>;
253
- constructor();
254
- /** Re-fetches the menu. The response is already rights-filtered per caller. */
255
- reload(): Promise<void>;
256
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<SparkProgramUnitsComponent, never>;
257
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<SparkProgramUnitsComponent, "spark-program-units", never, { "reloadToken": { "alias": "reloadToken"; "required": false; "isSignal": true; }; "extraTabs": { "alias": "extraTabs"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
330
+ export declare class SparkProgramUnitsComponent {
331
+ private readonly sparkService;
332
+ private readonly authState;
333
+ /** Any changed value triggers a reload — for apps whose auth state isn't a provided signal. */
334
+ readonly reloadToken: import("@angular/core").InputSignal<unknown>;
335
+ /**
336
+ * Extra tabs to render after the generated groups, normally forwarded by `<spark-shell>` from
337
+ * its `*sparkShellTab` directives. They must be rendered by THIS template — see
338
+ * `SparkShellTabDirective` for why a host-declared `<bs-accordion-tab>` cannot work.
339
+ */
340
+ readonly extraTabs: import("@angular/core").InputSignal<readonly SparkSidebarTab[]>;
341
+ protected readonly groups: import("@angular/core").WritableSignal<ProgramUnitGroup[]>;
342
+ constructor();
343
+ /** Re-fetches the menu. The response is already rights-filtered per caller. */
344
+ reload(): Promise<void>;
345
+ static ɵfac: i0.ɵɵFactoryDeclaration<SparkProgramUnitsComponent, never>;
346
+ static ɵcmp: i0.ɵɵComponentDeclaration<SparkProgramUnitsComponent, "spark-program-units", never, {
347
+ "reloadToken": {
348
+ "alias": "reloadToken";
349
+ "required": false;
350
+ "isSignal": true;
351
+ };
352
+ "extraTabs": {
353
+ "alias": "extraTabs";
354
+ "required": false;
355
+ "isSignal": true;
356
+ };
357
+ }, {}, never, never, true, never>;
258
358
  }
259
-
260
359
  /**
261
360
  * The culture switcher: a `bs-select` over `SparkLanguageService`'s languages, persisting the
262
361
  * choice. Renders nothing when the app declares one language (or none), so hosts can include it
263
362
  * unconditionally — `<spark-shell>`'s topbar does exactly that as its trailing default.
264
363
  */
265
- declare class SparkLanguageSelectorComponent {
266
- protected readonly lang: SparkLanguageService;
267
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<SparkLanguageSelectorComponent, never>;
268
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<SparkLanguageSelectorComponent, "spark-language-selector", never, {}, {}, never, never, true, never>;
269
- }
270
-
271
- export { SparkLanguageSelectorComponent, SparkProgramUnitsComponent, SparkShellComponent, SparkShellMainHeaderDirective, SparkShellSidebarFooterDirective, SparkShellSidebarHeaderDirective, SparkShellSidebarTopDirective, SparkShellTabDirective, SparkShellTopbarActionsDirective, SparkShellTopbarEndDirective, SparkShellTopbarStartDirective };
272
- export type { SparkSidebarTab };
364
+ export declare class SparkLanguageSelectorComponent {
365
+ protected readonly lang: SparkLanguageService;
366
+ static ɵfac: i0.ɵɵFactoryDeclaration<SparkLanguageSelectorComponent, never>;
367
+ static ɵcmp: i0.ɵɵComponentDeclaration<SparkLanguageSelectorComponent, "spark-language-selector", never, {}, {}, never, never, true, never>;
368
+ }
@@ -0,0 +1,90 @@
1
+ import { PersistentObject } from "@mintplayer/ng-spark/models";
2
+ import * as i0 from "@angular/core";
3
+ import { Provider } from "@angular/core";
4
+ import { SparkDetailContext, SparkQueryListContext } from "@mintplayer/ng-spark/panels";
5
+ /**
6
+ * Client for the SoftDelete package's endpoints (`MintPlayer.Spark.SoftDelete`, #460 T1). Ids travel
7
+ * in the body — the route table is literal and Raven ids contain slashes.
8
+ */
9
+ export declare class SparkSoftDeleteService {
10
+ private readonly spark;
11
+ /**
12
+ * `POST /spark/po/restore` → the restored (live) object. Requires `Restore/T` and a deleted row;
13
+ * anything else is 404 (or 401 anonymous), a restore withheld by `OnDisableActionsAsync` is 403.
14
+ */
15
+ restore(type: string, id: string): Promise<PersistentObject>;
16
+ /**
17
+ * `POST /spark/po/purge` → 204. Requires `Purge/T` and a deleted row. Removes the document and
18
+ * every revision of it; it cannot be undone.
19
+ */
20
+ purge(type: string, id: string): Promise<void>;
21
+ static ɵfac: i0.ɵɵFactoryDeclaration<SparkSoftDeleteService, never>;
22
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
23
+ }
24
+ /**
25
+ * The query page's "Deleted" toggle (#460): switches the list into the recycle bin
26
+ * (`deleted: only`) and back. Rendered only for holders of `ViewDeleted/T` — for anyone else the
27
+ * server would ignore the widening anyway, so offering it would show the same rows under a
28
+ * misleading label.
29
+ *
30
+ * Registered by {@link provideSparkSoftDelete} as a `SPARK_QUERY_LIST_ACTIONS` entry; usable on its
31
+ * own in a custom page with any {@link SparkQueryListContext}.
32
+ */
33
+ export declare class SparkDeletedToggleComponent {
34
+ context: import("@angular/core").InputSignal<SparkQueryListContext>;
35
+ protected readonly visible: import("@angular/core").Signal<boolean>;
36
+ protected readonly active: import("@angular/core").Signal<boolean>;
37
+ toggle(): void;
38
+ static ɵfac: i0.ɵɵFactoryDeclaration<SparkDeletedToggleComponent, never>;
39
+ static ɵcmp: i0.ɵɵComponentDeclaration<SparkDeletedToggleComponent, "spark-deleted-toggle", never, {
40
+ "context": {
41
+ "alias": "context";
42
+ "required": true;
43
+ "isSignal": true;
44
+ };
45
+ }, {}, never, never, true, never>;
46
+ }
47
+ /**
48
+ * Restore and Purge on the detail page of a row opened from the recycle bin (#460).
49
+ *
50
+ * Shown only when the page loaded the row with `?deleted=only` (every row in the recycle bin is
51
+ * deleted) and the caller holds `Restore/T` / `Purge/T`. The server re-checks both — the row must be
52
+ * deleted and the row gate must pass — so a refusal here is the 404/403 it answers, surfaced inline.
53
+ *
54
+ * Registered by {@link provideSparkSoftDelete} as a `SPARK_DETAIL_ACTIONS` entry.
55
+ */
56
+ export declare class SparkSoftDeleteActionsComponent {
57
+ private readonly softDelete;
58
+ private readonly router;
59
+ private readonly route;
60
+ private readonly returnNavigation;
61
+ private readonly lang;
62
+ context: import("@angular/core").InputSignal<SparkDetailContext>;
63
+ protected readonly deletedView: import("@angular/core").Signal<boolean>;
64
+ protected readonly canRestore: import("@angular/core").Signal<boolean>;
65
+ protected readonly canPurge: import("@angular/core").Signal<boolean>;
66
+ protected readonly busy: import("@angular/core").WritableSignal<boolean>;
67
+ protected readonly error: import("@angular/core").WritableSignal<string | null>;
68
+ restore(): Promise<void>;
69
+ purge(): Promise<void>;
70
+ private run;
71
+ static ɵfac: i0.ɵɵFactoryDeclaration<SparkSoftDeleteActionsComponent, never>;
72
+ static ɵcmp: i0.ɵɵComponentDeclaration<SparkSoftDeleteActionsComponent, "spark-soft-delete-actions", never, {
73
+ "context": {
74
+ "alias": "context";
75
+ "required": true;
76
+ "isSignal": true;
77
+ };
78
+ }, {}, never, never, true, never>;
79
+ }
80
+ /**
81
+ * Adds the SoftDelete UI (#460) to the pages `sparkRoutes()` routes to:
82
+ *
83
+ * - the query page gets a **Deleted** toggle (holders of `ViewDeleted/T`) that lists the recycle bin
84
+ * (`?deleted=only`); its rows open with the same mode;
85
+ * - the detail page of such a row gets **Restore** (`Restore/T`) and **Purge** (`Purge/T`).
86
+ *
87
+ * Needs the server package `MintPlayer.Spark.SoftDelete`. Add to the app's providers:
88
+ * `providers: [provideSpark(...), provideSparkSoftDelete()]`.
89
+ */
90
+ export declare function provideSparkSoftDelete(): Provider[];
@@ -1,11 +1,21 @@
1
- import { InjectionToken, Signal, Provider } from '@angular/core';
2
-
1
+ import { InjectionToken, Provider, Signal } from "@angular/core";
3
2
  interface SparkConfig {
4
- baseUrl: string;
3
+ baseUrl: string;
4
+ /**
5
+ * The concurrency-conflict notice and dialog on the edit page.
6
+ *
7
+ * `showChangedBy`: when true, "Changed by X" names whoever wrote the version merged against, but
8
+ * only when History resolves a display name for exactly that version (a `History/T` holder; one
9
+ * `POST /spark/po/revisions` request). Default false: no History request is made and no user is
10
+ * shown. A raw `ModifiedBy` user id is never shown in either mode. The "at T" time part is shown
11
+ * whenever the object carries `ModifiedAt`.
12
+ */
13
+ conflictDialog?: {
14
+ showChangedBy?: boolean;
15
+ };
5
16
  }
6
- declare const SPARK_CONFIG: InjectionToken<SparkConfig>;
7
- declare const defaultSparkConfig: SparkConfig;
8
-
17
+ export declare const SPARK_CONFIG: InjectionToken<SparkConfig>;
18
+ export declare const defaultSparkConfig: SparkConfig;
9
19
  /**
10
20
  * A signal that changes whenever the authenticated user changes — the bridge that lets ng-spark
11
21
  * components react to sign-in/out without a dependency on `@mintplayer/ng-spark-auth` (no
@@ -19,9 +29,6 @@ declare const defaultSparkConfig: SparkConfig;
19
29
  * The signal's VALUE is deliberately opaque (`unknown`): consumers only track it for change,
20
30
  * never read it — what "the user" looks like belongs to the auth package.
21
31
  */
22
- declare const SPARK_AUTH_STATE: InjectionToken<Signal<unknown>>;
23
-
24
- declare function provideSpark(config?: Partial<SparkConfig>): Provider[];
25
-
26
- export { SPARK_AUTH_STATE, SPARK_CONFIG, defaultSparkConfig, provideSpark };
27
- export type { SparkConfig };
32
+ export declare const SPARK_AUTH_STATE: InjectionToken<Signal<unknown>>;
33
+ export declare function provideSpark(config?: Partial<SparkConfig>): Provider[];
34
+ export type { SparkConfig };