@mintplayer/ng-spark 22.23.0 → 22.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +181 -0
- package/fesm2022/mintplayer-ng-spark-attribute-description.mjs +100 -47
- package/fesm2022/mintplayer-ng-spark-attribute-description.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-spark-client-operations.mjs +308 -329
- package/fesm2022/mintplayer-ng-spark-client-operations.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-spark-column-filter.mjs +175 -135
- package/fesm2022/mintplayer-ng-spark-column-filter.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-spark-grid.mjs +2259 -1119
- package/fesm2022/mintplayer-ng-spark-grid.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-spark-history.mjs +611 -0
- package/fesm2022/mintplayer-ng-spark-history.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-spark-icon.mjs +64 -27
- package/fesm2022/mintplayer-ng-spark-icon.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-spark-models.mjs +366 -762
- package/fesm2022/mintplayer-ng-spark-models.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-spark-moderation.mjs +1212 -0
- package/fesm2022/mintplayer-ng-spark-moderation.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-spark-panels.mjs +52 -0
- package/fesm2022/mintplayer-ng-spark-panels.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-spark-pipes.mjs +1122 -765
- package/fesm2022/mintplayer-ng-spark-pipes.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-spark-po-create.mjs +273 -169
- package/fesm2022/mintplayer-ng-spark-po-create.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-spark-po-detail.mjs +786 -410
- package/fesm2022/mintplayer-ng-spark-po-detail.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-spark-po-edit.mjs +292 -284
- package/fesm2022/mintplayer-ng-spark-po-edit.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-spark-po-form.mjs +2187 -1225
- package/fesm2022/mintplayer-ng-spark-po-form.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-spark-query-list.mjs +516 -303
- package/fesm2022/mintplayer-ng-spark-query-list.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-spark-renderers.mjs +17 -55
- package/fesm2022/mintplayer-ng-spark-renderers.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-spark-retry-action-modal.mjs +216 -177
- package/fesm2022/mintplayer-ng-spark-retry-action-modal.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-spark-routes.mjs +24 -28
- package/fesm2022/mintplayer-ng-spark-routes.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-spark-services.mjs +625 -640
- package/fesm2022/mintplayer-ng-spark-services.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-spark-shell.mjs +1013 -397
- package/fesm2022/mintplayer-ng-spark-shell.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-spark-soft-delete.mjs +294 -0
- package/fesm2022/mintplayer-ng-spark-soft-delete.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-spark.mjs +13 -50
- package/fesm2022/mintplayer-ng-spark.mjs.map +1 -1
- package/package.json +17 -1
- package/types/mintplayer-ng-spark-attribute-description.d.ts +25 -18
- package/types/mintplayer-ng-spark-client-operations.d.ts +133 -160
- package/types/mintplayer-ng-spark-column-filter.d.ts +73 -55
- package/types/mintplayer-ng-spark-grid.d.ts +885 -448
- package/types/mintplayer-ng-spark-history.d.ts +223 -0
- package/types/mintplayer-ng-spark-icon.d.ts +15 -13
- package/types/mintplayer-ng-spark-models.d.ts +624 -573
- package/types/mintplayer-ng-spark-moderation.d.ts +402 -0
- package/types/mintplayer-ng-spark-panels.d.ts +108 -0
- package/types/mintplayer-ng-spark-pipes.d.ts +120 -149
- package/types/mintplayer-ng-spark-po-create.d.ts +46 -37
- package/types/mintplayer-ng-spark-po-detail.d.ts +177 -117
- package/types/mintplayer-ng-spark-po-edit.d.ts +64 -65
- package/types/mintplayer-ng-spark-po-form.d.ts +507 -371
- package/types/mintplayer-ng-spark-query-list.d.ts +118 -82
- package/types/mintplayer-ng-spark-renderers.d.ts +79 -85
- package/types/mintplayer-ng-spark-retry-action-modal.d.ts +31 -34
- package/types/mintplayer-ng-spark-routes.d.ts +7 -11
- package/types/mintplayer-ng-spark-services.d.ts +377 -261
- package/types/mintplayer-ng-spark-shell.d.ts +209 -128
- package/types/mintplayer-ng-spark-soft-delete.d.ts +90 -0
- package/types/mintplayer-ng-spark.d.ts +7 -12
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { TemplateRef } from
|
|
3
|
-
import { BsShellState } from
|
|
4
|
-
import { Breakpoint } from
|
|
5
|
-
import { ShellStateChangeEventDetail } from
|
|
6
|
-
import { ProgramUnitGroup } from
|
|
7
|
-
import { SparkLanguageService } from
|
|
8
|
-
|
|
1
|
+
import * as i0 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";
|
|
9
8
|
/**
|
|
10
9
|
* Region slots for `<spark-shell>`.
|
|
11
10
|
*
|
|
@@ -35,20 +34,20 @@ import { SparkLanguageService } from '@mintplayer/ng-spark/services';
|
|
|
35
34
|
* ```
|
|
36
35
|
*/
|
|
37
36
|
/** Topbar, leading edge. Default: a `bs-navbar-toggler` mirroring the shell's open state. */
|
|
38
|
-
declare class SparkShellTopbarStartDirective {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
37
|
+
export declare class SparkShellTopbarStartDirective {
|
|
38
|
+
readonly templateRef: TemplateRef<unknown>;
|
|
39
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SparkShellTopbarStartDirective, never>;
|
|
40
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<SparkShellTopbarStartDirective, "[sparkShellTopbarStart]", never, {}, {}, never, never, true, never>;
|
|
42
41
|
}
|
|
43
42
|
/**
|
|
44
43
|
* Topbar, trailing edge. Default: the language selector (which hides itself when the app has
|
|
45
44
|
* one language). This is where an auth bar goes — the shell cannot ship one itself, since
|
|
46
45
|
* `@mintplayer/ng-spark` does not (and must not) depend on `@mintplayer/ng-spark-auth`.
|
|
47
46
|
*/
|
|
48
|
-
declare class SparkShellTopbarEndDirective {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
47
|
+
export declare class SparkShellTopbarEndDirective {
|
|
48
|
+
readonly templateRef: TemplateRef<unknown>;
|
|
49
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SparkShellTopbarEndDirective, never>;
|
|
50
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<SparkShellTopbarEndDirective, "[sparkShellTopbarEnd]", never, {}, {}, never, never, true, never>;
|
|
52
51
|
}
|
|
53
52
|
/**
|
|
54
53
|
* Topbar, trailing edge, **beside** the default chrome rather than instead of it — rendered before
|
|
@@ -72,22 +71,22 @@ declare class SparkShellTopbarEndDirective {
|
|
|
72
71
|
* Supplying both slots is allowed and does what it says: `topbarEnd` replaces the default chrome,
|
|
73
72
|
* and these actions still render ahead of whatever it put there.
|
|
74
73
|
*/
|
|
75
|
-
declare class SparkShellTopbarActionsDirective {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
74
|
+
export declare class SparkShellTopbarActionsDirective {
|
|
75
|
+
readonly templateRef: TemplateRef<unknown>;
|
|
76
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SparkShellTopbarActionsDirective, never>;
|
|
77
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<SparkShellTopbarActionsDirective, "[sparkShellTopbarActions]", never, {}, {}, never, never, true, never>;
|
|
79
78
|
}
|
|
80
79
|
/** Sidebar, above everything. Default: `<h5>{{ title }}</h5>`. */
|
|
81
|
-
declare class SparkShellSidebarHeaderDirective {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
80
|
+
export declare class SparkShellSidebarHeaderDirective {
|
|
81
|
+
readonly templateRef: TemplateRef<unknown>;
|
|
82
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SparkShellSidebarHeaderDirective, never>;
|
|
83
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<SparkShellSidebarHeaderDirective, "[sparkShellSidebarHeader]", never, {}, {}, never, never, true, never>;
|
|
85
84
|
}
|
|
86
85
|
/** Sidebar, between the header and the program-units menu. No default. */
|
|
87
|
-
declare class SparkShellSidebarTopDirective {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
86
|
+
export declare class SparkShellSidebarTopDirective {
|
|
87
|
+
readonly templateRef: TemplateRef<unknown>;
|
|
88
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SparkShellSidebarTopDirective, never>;
|
|
89
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<SparkShellSidebarTopDirective, "[sparkShellSidebarTop]", never, {}, {}, never, never, true, never>;
|
|
91
90
|
}
|
|
92
91
|
/**
|
|
93
92
|
* An extra accordion tab in the sidebar menu, rendered after the generated program-unit groups
|
|
@@ -112,40 +111,55 @@ declare class SparkShellSidebarTopDirective {
|
|
|
112
111
|
* (client-side demos, external tools). For sidebar content that is NOT an accordion tab, use
|
|
113
112
|
* `*sparkShellSidebarTop` or `*sparkShellSidebarFooter`.
|
|
114
113
|
*/
|
|
115
|
-
declare class SparkShellTabDirective {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
114
|
+
export declare class SparkShellTabDirective {
|
|
115
|
+
readonly templateRef: TemplateRef<unknown>;
|
|
116
|
+
/** The tab's header label. */
|
|
117
|
+
readonly header: import("@angular/core").InputSignal<string>;
|
|
118
|
+
/** Bootstrap icon name for the header, as in `programUnits.json`. Defaults to a folder. */
|
|
119
|
+
readonly icon: import("@angular/core").InputSignal<string | undefined>;
|
|
120
|
+
/** Replaces the icon+label header entirely, for a header that needs its own markup. */
|
|
121
|
+
readonly headerTemplate: import("@angular/core").InputSignal<TemplateRef<unknown> | null>;
|
|
122
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SparkShellTabDirective, never>;
|
|
123
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<SparkShellTabDirective, "[sparkShellTab]", never, {
|
|
124
|
+
"header": {
|
|
125
|
+
"alias": "sparkShellTab";
|
|
126
|
+
"required": true;
|
|
127
|
+
"isSignal": true;
|
|
128
|
+
};
|
|
129
|
+
"icon": {
|
|
130
|
+
"alias": "sparkShellTabIcon";
|
|
131
|
+
"required": false;
|
|
132
|
+
"isSignal": true;
|
|
133
|
+
};
|
|
134
|
+
"headerTemplate": {
|
|
135
|
+
"alias": "sparkShellTabHeader";
|
|
136
|
+
"required": false;
|
|
137
|
+
"isSignal": true;
|
|
138
|
+
};
|
|
139
|
+
}, {}, never, never, true, never>;
|
|
125
140
|
}
|
|
126
141
|
/**
|
|
127
142
|
* A sidebar accordion tab in the shape the menu renders it. Hosts normally contribute tabs with
|
|
128
143
|
* `*sparkShellTab`; this is the same thing as data, for a host that computes its tabs.
|
|
129
144
|
*/
|
|
130
|
-
interface SparkSidebarTab {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
145
|
+
export interface SparkSidebarTab {
|
|
146
|
+
readonly header: string;
|
|
147
|
+
readonly icon?: string;
|
|
148
|
+
readonly headerTemplate?: TemplateRef<unknown> | null;
|
|
149
|
+
readonly content: TemplateRef<unknown>;
|
|
135
150
|
}
|
|
136
151
|
/** Sidebar, at the very bottom. No default. */
|
|
137
|
-
declare class SparkShellSidebarFooterDirective {
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
152
|
+
export declare class SparkShellSidebarFooterDirective {
|
|
153
|
+
readonly templateRef: TemplateRef<unknown>;
|
|
154
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SparkShellSidebarFooterDirective, never>;
|
|
155
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<SparkShellSidebarFooterDirective, "[sparkShellSidebarFooter]", never, {}, {}, never, never, true, never>;
|
|
141
156
|
}
|
|
142
157
|
/** Main region, above the projected content (the host's `<router-outlet>`). No default. */
|
|
143
|
-
declare class SparkShellMainHeaderDirective {
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
158
|
+
export declare class SparkShellMainHeaderDirective {
|
|
159
|
+
readonly templateRef: TemplateRef<unknown>;
|
|
160
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SparkShellMainHeaderDirective, never>;
|
|
161
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<SparkShellMainHeaderDirective, "[sparkShellMainHeader]", never, {}, {}, never, never, true, never>;
|
|
147
162
|
}
|
|
148
|
-
|
|
149
163
|
/**
|
|
150
164
|
* The application frame: topbar + sidebar + main, wrapping ng-bootstrap's `bs-shell` (whose
|
|
151
165
|
* `mp-shell` web component owns ALL responsive behavior — breakpoints, the overlay drawer,
|
|
@@ -171,57 +185,117 @@ declare class SparkShellMainHeaderDirective {
|
|
|
171
185
|
* the `<spark-shell>` element. `sidebarTheme` flips the sidebar's `data-bs-theme` (which is what
|
|
172
186
|
* recolors the accordion internals across the shadow boundary) together with its default palette.
|
|
173
187
|
*/
|
|
174
|
-
declare class SparkShellComponent {
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
188
|
+
export declare class SparkShellComponent {
|
|
189
|
+
/** The sidebar heading. Ignored when a `*sparkShellSidebarHeader` slot is supplied. */
|
|
190
|
+
readonly title: import("@angular/core").InputSignal<string>;
|
|
191
|
+
/** Forwarded to `bs-shell`: below it the sidebar is an overlay drawer. */
|
|
192
|
+
readonly breakpoint: import("@angular/core").InputSignal<Breakpoint>;
|
|
193
|
+
/**
|
|
194
|
+
* `data-bs-theme` for the sidebar — what flips the accordion's shadow-DOM internals between
|
|
195
|
+
* palettes — plus the matching default background. `null` sets no theme (inherit the page's).
|
|
196
|
+
*/
|
|
197
|
+
readonly sidebarTheme: import("@angular/core").InputSignal<"dark" | "light" | null>;
|
|
198
|
+
/** Forwarded to the menu: any changed value re-fetches the program units. */
|
|
199
|
+
readonly reloadToken: import("@angular/core").InputSignal<unknown>;
|
|
200
|
+
/** Extra sidebar tabs as data, for hosts that compute them; `*sparkShellTab` is the usual way. */
|
|
201
|
+
readonly sidebarTabs: import("@angular/core").InputSignal<readonly SparkSidebarTab[]>;
|
|
202
|
+
readonly topbarStartTemplate: import("@angular/core").InputSignal<TemplateRef<unknown> | null>;
|
|
203
|
+
readonly topbarEndTemplate: import("@angular/core").InputSignal<TemplateRef<unknown> | null>;
|
|
204
|
+
readonly topbarActionsTemplate: import("@angular/core").InputSignal<TemplateRef<unknown> | null>;
|
|
205
|
+
readonly sidebarHeaderTemplate: import("@angular/core").InputSignal<TemplateRef<unknown> | null>;
|
|
206
|
+
readonly sidebarTopTemplate: import("@angular/core").InputSignal<TemplateRef<unknown> | null>;
|
|
207
|
+
readonly sidebarFooterTemplate: import("@angular/core").InputSignal<TemplateRef<unknown> | null>;
|
|
208
|
+
readonly mainHeaderTemplate: import("@angular/core").InputSignal<TemplateRef<unknown> | null>;
|
|
209
|
+
private readonly topbarStartSlot;
|
|
210
|
+
private readonly topbarEndSlot;
|
|
211
|
+
private readonly topbarActionsSlot;
|
|
212
|
+
private readonly sidebarHeaderSlot;
|
|
213
|
+
private readonly sidebarTopSlot;
|
|
214
|
+
private readonly sidebarFooterSlot;
|
|
215
|
+
private readonly mainHeaderSlot;
|
|
216
|
+
protected readonly topbarStartTpl: import("@angular/core").Signal<TemplateRef<unknown> | null>;
|
|
217
|
+
protected readonly topbarEndTpl: import("@angular/core").Signal<TemplateRef<unknown> | null>;
|
|
218
|
+
protected readonly topbarActionsTpl: import("@angular/core").Signal<TemplateRef<unknown> | null>;
|
|
219
|
+
protected readonly sidebarHeaderTpl: import("@angular/core").Signal<TemplateRef<unknown> | null>;
|
|
220
|
+
protected readonly sidebarTopTpl: import("@angular/core").Signal<TemplateRef<unknown> | null>;
|
|
221
|
+
protected readonly sidebarFooterTpl: import("@angular/core").Signal<TemplateRef<unknown> | null>;
|
|
222
|
+
protected readonly mainHeaderTpl: import("@angular/core").Signal<TemplateRef<unknown> | null>;
|
|
223
|
+
/**
|
|
224
|
+
* Extra accordion tabs, forwarded to the menu so IT creates the `<bs-accordion-tab>` elements —
|
|
225
|
+
* the only way they share the generated groups' single-open behavior (see
|
|
226
|
+
* `SparkShellTabDirective`). Data-supplied tabs come first, then projected ones in declaration
|
|
227
|
+
* order.
|
|
228
|
+
*/
|
|
229
|
+
private readonly tabSlots;
|
|
230
|
+
protected readonly tabs: import("@angular/core").Signal<readonly SparkSidebarTab[]>;
|
|
231
|
+
protected readonly shellState: import("@angular/core").WritableSignal<BsShellState>;
|
|
232
|
+
protected readonly isSidebarVisible: import("@angular/core").WritableSignal<boolean>;
|
|
233
|
+
protected toggleSidebar(open: boolean): void;
|
|
234
|
+
protected onShellToggle(detail: ShellStateChangeEventDetail): void;
|
|
235
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SparkShellComponent, never>;
|
|
236
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SparkShellComponent, "spark-shell", never, {
|
|
237
|
+
"title": {
|
|
238
|
+
"alias": "title";
|
|
239
|
+
"required": false;
|
|
240
|
+
"isSignal": true;
|
|
241
|
+
};
|
|
242
|
+
"breakpoint": {
|
|
243
|
+
"alias": "breakpoint";
|
|
244
|
+
"required": false;
|
|
245
|
+
"isSignal": true;
|
|
246
|
+
};
|
|
247
|
+
"sidebarTheme": {
|
|
248
|
+
"alias": "sidebarTheme";
|
|
249
|
+
"required": false;
|
|
250
|
+
"isSignal": true;
|
|
251
|
+
};
|
|
252
|
+
"reloadToken": {
|
|
253
|
+
"alias": "reloadToken";
|
|
254
|
+
"required": false;
|
|
255
|
+
"isSignal": true;
|
|
256
|
+
};
|
|
257
|
+
"sidebarTabs": {
|
|
258
|
+
"alias": "sidebarTabs";
|
|
259
|
+
"required": false;
|
|
260
|
+
"isSignal": true;
|
|
261
|
+
};
|
|
262
|
+
"topbarStartTemplate": {
|
|
263
|
+
"alias": "topbarStartTemplate";
|
|
264
|
+
"required": false;
|
|
265
|
+
"isSignal": true;
|
|
266
|
+
};
|
|
267
|
+
"topbarEndTemplate": {
|
|
268
|
+
"alias": "topbarEndTemplate";
|
|
269
|
+
"required": false;
|
|
270
|
+
"isSignal": true;
|
|
271
|
+
};
|
|
272
|
+
"topbarActionsTemplate": {
|
|
273
|
+
"alias": "topbarActionsTemplate";
|
|
274
|
+
"required": false;
|
|
275
|
+
"isSignal": true;
|
|
276
|
+
};
|
|
277
|
+
"sidebarHeaderTemplate": {
|
|
278
|
+
"alias": "sidebarHeaderTemplate";
|
|
279
|
+
"required": false;
|
|
280
|
+
"isSignal": true;
|
|
281
|
+
};
|
|
282
|
+
"sidebarTopTemplate": {
|
|
283
|
+
"alias": "sidebarTopTemplate";
|
|
284
|
+
"required": false;
|
|
285
|
+
"isSignal": true;
|
|
286
|
+
};
|
|
287
|
+
"sidebarFooterTemplate": {
|
|
288
|
+
"alias": "sidebarFooterTemplate";
|
|
289
|
+
"required": false;
|
|
290
|
+
"isSignal": true;
|
|
291
|
+
};
|
|
292
|
+
"mainHeaderTemplate": {
|
|
293
|
+
"alias": "mainHeaderTemplate";
|
|
294
|
+
"required": false;
|
|
295
|
+
"isSignal": true;
|
|
296
|
+
};
|
|
297
|
+
}, {}, ["topbarStartSlot", "topbarEndSlot", "topbarActionsSlot", "sidebarHeaderSlot", "sidebarTopSlot", "sidebarFooterSlot", "mainHeaderSlot", "tabSlots"], ["*"], true, never>;
|
|
223
298
|
}
|
|
224
|
-
|
|
225
299
|
/**
|
|
226
300
|
* The server-driven navigation menu: an accordion of program-unit groups fetched from
|
|
227
301
|
* `GET /spark/program-units`, which the server has already filtered to what the caller's rights
|
|
@@ -238,35 +312,42 @@ declare class SparkShellComponent {
|
|
|
238
312
|
*
|
|
239
313
|
* Usually rendered by `<spark-shell>`; exported standalone for hosts that own their own layout.
|
|
240
314
|
*/
|
|
241
|
-
declare class SparkProgramUnitsComponent {
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
315
|
+
export declare class SparkProgramUnitsComponent {
|
|
316
|
+
private readonly sparkService;
|
|
317
|
+
private readonly authState;
|
|
318
|
+
/** Any changed value triggers a reload — for apps whose auth state isn't a provided signal. */
|
|
319
|
+
readonly reloadToken: import("@angular/core").InputSignal<unknown>;
|
|
320
|
+
/**
|
|
321
|
+
* Extra tabs to render after the generated groups, normally forwarded by `<spark-shell>` from
|
|
322
|
+
* its `*sparkShellTab` directives. They must be rendered by THIS template — see
|
|
323
|
+
* `SparkShellTabDirective` for why a host-declared `<bs-accordion-tab>` cannot work.
|
|
324
|
+
*/
|
|
325
|
+
readonly extraTabs: import("@angular/core").InputSignal<readonly SparkSidebarTab[]>;
|
|
326
|
+
protected readonly groups: import("@angular/core").WritableSignal<ProgramUnitGroup[]>;
|
|
327
|
+
constructor();
|
|
328
|
+
/** Re-fetches the menu. The response is already rights-filtered per caller. */
|
|
329
|
+
reload(): Promise<void>;
|
|
330
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SparkProgramUnitsComponent, never>;
|
|
331
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SparkProgramUnitsComponent, "spark-program-units", never, {
|
|
332
|
+
"reloadToken": {
|
|
333
|
+
"alias": "reloadToken";
|
|
334
|
+
"required": false;
|
|
335
|
+
"isSignal": true;
|
|
336
|
+
};
|
|
337
|
+
"extraTabs": {
|
|
338
|
+
"alias": "extraTabs";
|
|
339
|
+
"required": false;
|
|
340
|
+
"isSignal": true;
|
|
341
|
+
};
|
|
342
|
+
}, {}, never, never, true, never>;
|
|
258
343
|
}
|
|
259
|
-
|
|
260
344
|
/**
|
|
261
345
|
* The culture switcher: a `bs-select` over `SparkLanguageService`'s languages, persisting the
|
|
262
346
|
* choice. Renders nothing when the app declares one language (or none), so hosts can include it
|
|
263
347
|
* unconditionally — `<spark-shell>`'s topbar does exactly that as its trailing default.
|
|
264
348
|
*/
|
|
265
|
-
declare class SparkLanguageSelectorComponent {
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
export { SparkLanguageSelectorComponent, SparkProgramUnitsComponent, SparkShellComponent, SparkShellMainHeaderDirective, SparkShellSidebarFooterDirective, SparkShellSidebarHeaderDirective, SparkShellSidebarTopDirective, SparkShellTabDirective, SparkShellTopbarActionsDirective, SparkShellTopbarEndDirective, SparkShellTopbarStartDirective };
|
|
272
|
-
export type { SparkSidebarTab };
|
|
349
|
+
export declare class SparkLanguageSelectorComponent {
|
|
350
|
+
protected readonly lang: SparkLanguageService;
|
|
351
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SparkLanguageSelectorComponent, never>;
|
|
352
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SparkLanguageSelectorComponent, "spark-language-selector", never, {}, {}, never, never, true, never>;
|
|
353
|
+
}
|
|
@@ -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,9 @@
|
|
|
1
|
-
import { InjectionToken,
|
|
2
|
-
|
|
1
|
+
import { InjectionToken, Provider, Signal } from "@angular/core";
|
|
3
2
|
interface SparkConfig {
|
|
4
|
-
|
|
3
|
+
baseUrl: string;
|
|
5
4
|
}
|
|
6
|
-
declare const SPARK_CONFIG: InjectionToken<SparkConfig>;
|
|
7
|
-
declare const defaultSparkConfig: SparkConfig;
|
|
8
|
-
|
|
5
|
+
export declare const SPARK_CONFIG: InjectionToken<SparkConfig>;
|
|
6
|
+
export declare const defaultSparkConfig: SparkConfig;
|
|
9
7
|
/**
|
|
10
8
|
* A signal that changes whenever the authenticated user changes — the bridge that lets ng-spark
|
|
11
9
|
* components react to sign-in/out without a dependency on `@mintplayer/ng-spark-auth` (no
|
|
@@ -19,9 +17,6 @@ declare const defaultSparkConfig: SparkConfig;
|
|
|
19
17
|
* The signal's VALUE is deliberately opaque (`unknown`): consumers only track it for change,
|
|
20
18
|
* never read it — what "the user" looks like belongs to the auth package.
|
|
21
19
|
*/
|
|
22
|
-
declare const SPARK_AUTH_STATE: InjectionToken<Signal<unknown>>;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
export { SPARK_AUTH_STATE, SPARK_CONFIG, defaultSparkConfig, provideSpark };
|
|
27
|
-
export type { SparkConfig };
|
|
20
|
+
export declare const SPARK_AUTH_STATE: InjectionToken<Signal<unknown>>;
|
|
21
|
+
export declare function provideSpark(config?: Partial<SparkConfig>): Provider[];
|
|
22
|
+
export type { SparkConfig };
|