@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.
- package/README.md +196 -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 +310 -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-contributions.mjs +721 -0
- package/fesm2022/mintplayer-ng-spark-contributions.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-spark-grid.mjs +2385 -1118
- package/fesm2022/mintplayer-ng-spark-grid.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-spark-history.mjs +598 -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 +405 -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 +60 -0
- package/fesm2022/mintplayer-ng-spark-panels.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-spark-pipes.mjs +1158 -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 +795 -410
- package/fesm2022/mintplayer-ng-spark-po-detail.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-spark-po-edit.mjs +1196 -280
- package/fesm2022/mintplayer-ng-spark-po-edit.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-spark-po-form.mjs +2244 -1224
- package/fesm2022/mintplayer-ng-spark-po-form.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-spark-query-list.mjs +571 -303
- package/fesm2022/mintplayer-ng-spark-query-list.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-spark-renderers.mjs +44 -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 +1031 -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 +14 -48
- package/fesm2022/mintplayer-ng-spark.mjs.map +1 -1
- package/package.json +23 -2
- package/types/mintplayer-ng-spark-attribute-description.d.ts +25 -18
- package/types/mintplayer-ng-spark-client-operations.d.ts +139 -160
- package/types/mintplayer-ng-spark-column-filter.d.ts +73 -55
- package/types/mintplayer-ng-spark-contributions.d.ts +231 -0
- package/types/mintplayer-ng-spark-grid.d.ts +917 -448
- package/types/mintplayer-ng-spark-history.d.ts +216 -0
- package/types/mintplayer-ng-spark-icon.d.ts +15 -13
- package/types/mintplayer-ng-spark-models.d.ts +681 -573
- package/types/mintplayer-ng-spark-moderation.d.ts +402 -0
- package/types/mintplayer-ng-spark-panels.d.ts +143 -0
- package/types/mintplayer-ng-spark-pipes.d.ts +131 -149
- package/types/mintplayer-ng-spark-po-create.d.ts +46 -37
- package/types/mintplayer-ng-spark-po-detail.d.ts +180 -117
- package/types/mintplayer-ng-spark-po-edit.d.ts +367 -64
- package/types/mintplayer-ng-spark-po-form.d.ts +558 -373
- package/types/mintplayer-ng-spark-query-list.d.ts +143 -82
- package/types/mintplayer-ng-spark-renderers.d.ts +121 -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 +228 -132
- package/types/mintplayer-ng-spark-soft-delete.d.ts +90 -0
- package/types/mintplayer-ng-spark.d.ts +19 -12
|
@@ -1,117 +1,180 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { TemplateRef, Type } from
|
|
3
|
-
import { Color } from
|
|
4
|
-
import { SparkLanguageService } from
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { TemplateRef, Type } from "@angular/core";
|
|
3
|
+
import { Color } from "@mintplayer/ng-bootstrap";
|
|
4
|
+
import { SparkLanguageService } from "@mintplayer/ng-spark/services";
|
|
5
|
+
import { SparkResolvedRowRenderer } from "@mintplayer/ng-spark/renderers";
|
|
6
|
+
import { AttributeGroup, AttributeTab, CustomActionDefinition, EntityAttributeDefinition, EntityPermissions, EntityType, LookupReference, PersistentObject, QueryResultItem, SparkDeletedFilter } from "@mintplayer/ng-spark/models";
|
|
7
|
+
import { SparkDetailContext } from "@mintplayer/ng-spark/panels";
|
|
8
|
+
export declare class SparkPoDetailComponent {
|
|
9
|
+
private readonly route;
|
|
10
|
+
private readonly router;
|
|
11
|
+
private readonly sparkService;
|
|
12
|
+
private readonly returnNavigation;
|
|
13
|
+
private readonly queryRefresh;
|
|
14
|
+
private readonly attributeRefresh;
|
|
15
|
+
protected readonly lang: SparkLanguageService;
|
|
16
|
+
protected readonly rendererRegistry: import("@mintplayer/ng-spark/renderers").SparkAttributeRendererRegistration[];
|
|
17
|
+
/**
|
|
18
|
+
* Add-on panels and action-bar buttons (#460, `SPARK_DETAIL_PANELS` / `SPARK_DETAIL_ACTIONS`).
|
|
19
|
+
* Multi-provided, so History, SoftDelete and Moderation can each add theirs to the page
|
|
20
|
+
* `sparkRoutes()` routes to, which is created by the router and takes no templates.
|
|
21
|
+
*/
|
|
22
|
+
protected readonly detailPanels: import("@mintplayer/ng-spark/panels").SparkDetailPanel[];
|
|
23
|
+
protected readonly detailActions: import("@mintplayer/ng-spark/panels").SparkDetailAction[];
|
|
24
|
+
showCustomActions: import("@angular/core").InputSignal<boolean>;
|
|
25
|
+
extraActionsTemplate: import("@angular/core").InputSignal<TemplateRef<void> | null>;
|
|
26
|
+
extraContentTemplate: import("@angular/core").InputSignal<TemplateRef<{
|
|
27
|
+
$implicit: PersistentObject;
|
|
28
|
+
entityType: EntityType;
|
|
29
|
+
}> | null>;
|
|
30
|
+
/**
|
|
31
|
+
* Header slots forwarded to every sub-query card on this page.
|
|
32
|
+
*
|
|
33
|
+
* A structural directive cannot cross a component boundary, and this component is created by
|
|
34
|
+
* the router — in a default app there is no `<spark-po-detail>` tag to project content into.
|
|
35
|
+
* So an app that wants slotted chrome on its sub-queries substitutes its own route component
|
|
36
|
+
* via `SparkRouteConfig.poDetail` and forwards the templates through here. Forwarding a
|
|
37
|
+
* `TemplateRef` as an input is already this component's idiom; see the two above.
|
|
38
|
+
*
|
|
39
|
+
* Each slot may target one query by alias, so a single forwarded set serves a page rendering
|
|
40
|
+
* several sub-queries.
|
|
41
|
+
*/
|
|
42
|
+
queryIconTemplate: import("@angular/core").InputSignal<TemplateRef<any> | null>;
|
|
43
|
+
queryCaptionTemplate: import("@angular/core").InputSignal<TemplateRef<any> | null>;
|
|
44
|
+
queryActionsTemplate: import("@angular/core").InputSignal<TemplateRef<any> | null>;
|
|
45
|
+
edited: import("@angular/core").OutputEmitterRef<void>;
|
|
46
|
+
deleted: import("@angular/core").OutputEmitterRef<void>;
|
|
47
|
+
customActionExecuted: import("@angular/core").OutputEmitterRef<{
|
|
48
|
+
action: CustomActionDefinition;
|
|
49
|
+
item: PersistentObject;
|
|
50
|
+
}>;
|
|
51
|
+
colors: typeof Color;
|
|
52
|
+
errorMessage: import("@angular/core").WritableSignal<string | null>;
|
|
53
|
+
entityType: import("@angular/core").WritableSignal<EntityType | null>;
|
|
54
|
+
/** The sub-queries rendered as cards below the form, in object form (#460, D17). */
|
|
55
|
+
protected readonly subQueries: import("@angular/core").Signal<import("@mintplayer/ng-spark/models").SparkSubQuery[]>;
|
|
56
|
+
allEntityTypes: import("@angular/core").WritableSignal<EntityType[]>;
|
|
57
|
+
item: import("@angular/core").WritableSignal<PersistentObject | null>;
|
|
58
|
+
lookupReferenceOptions: import("@angular/core").WritableSignal<Record<string, LookupReference>>;
|
|
59
|
+
asDetailTypes: import("@angular/core").WritableSignal<Record<string, EntityType>>;
|
|
60
|
+
asDetailReferenceOptions: import("@angular/core").WritableSignal<Record<string, Record<string, QueryResultItem[]>>>;
|
|
61
|
+
type: string;
|
|
62
|
+
id: string;
|
|
63
|
+
canEdit: import("@angular/core").WritableSignal<boolean>;
|
|
64
|
+
canDelete: import("@angular/core").WritableSignal<boolean>;
|
|
65
|
+
customActions: import("@angular/core").WritableSignal<CustomActionDefinition[]>;
|
|
66
|
+
/** Type-level rights, kept for the add-on context; null until loaded. */
|
|
67
|
+
permissions: import("@angular/core").WritableSignal<EntityPermissions | null>;
|
|
68
|
+
/**
|
|
69
|
+
* The route's `?deleted=` mode (#460, T2): `only` when the row was opened from the recycle bin.
|
|
70
|
+
* Sent with every load of this object; the server honours it only for `ViewDeleted` holders, so
|
|
71
|
+
* for anyone else a deleted row stays a 404.
|
|
72
|
+
*/
|
|
73
|
+
deletedMode: import("@angular/core").WritableSignal<SparkDeletedFilter | null>;
|
|
74
|
+
/** True when the page shows a soft-deleted row: nothing but Restore/Purge applies to it. */
|
|
75
|
+
protected readonly isDeletedView: import("@angular/core").Signal<boolean>;
|
|
76
|
+
/** What every add-on panel and action receives; rebuilt whenever the object or rights change. */
|
|
77
|
+
protected readonly detailContext: import("@angular/core").Signal<SparkDetailContext | null>;
|
|
78
|
+
/**
|
|
79
|
+
* The actions actually offered for the object on screen.
|
|
80
|
+
*
|
|
81
|
+
* The catalogue at `/spark/actions/{objectTypeId}` is per TYPE -- the server is never told which
|
|
82
|
+
* row is open -- so an action that applies to only some rows cannot be filtered there. The
|
|
83
|
+
* entity's actions hook decides while it has the entity in hand and withholds what does not
|
|
84
|
+
* apply, and the object arrives carrying that answer.
|
|
85
|
+
*
|
|
86
|
+
* Since #460 (D13) the server asks the same hook again when the action is submitted and refuses a
|
|
87
|
+
* disabled one with 403, so hiding it here matches what the server will do. What this prevents is
|
|
88
|
+
* offering a destructive action where it cannot possibly apply -- Coverage showed an irreversible
|
|
89
|
+
* red "Delete data" button on every repository page, healthy ones included, and only admitted it
|
|
90
|
+
* would refuse after the confirmation prompt.
|
|
91
|
+
*/
|
|
92
|
+
visibleCustomActions: import("@angular/core").Signal<CustomActionDefinition[]>;
|
|
93
|
+
constructor();
|
|
94
|
+
/**
|
|
95
|
+
* Applies patched attribute values in place, without a re-fetch.
|
|
96
|
+
*
|
|
97
|
+
* The operation carries the value the server computed after its own write, so this is both
|
|
98
|
+
* cheaper and more correct than re-reading: a re-read goes through a RavenDB index that may
|
|
99
|
+
* still be stale from the very write that produced the patch, and would show the old value.
|
|
100
|
+
*/
|
|
101
|
+
private applyAttributePatches;
|
|
102
|
+
private onParamsChange;
|
|
103
|
+
/** The object as the page's current mode sees it. Only a set mode is sent. */
|
|
104
|
+
private loadItem;
|
|
105
|
+
/** (Re)loads the object, its type, rights and actions. Also what add-ons call via `context.reload()`. */
|
|
106
|
+
load(): Promise<void>;
|
|
107
|
+
visibleAttributes: import("@angular/core").Signal<EntityAttributeDefinition[]>;
|
|
108
|
+
private static readonly DEFAULT_TAB;
|
|
109
|
+
ungroupedAttributes: import("@angular/core").Signal<EntityAttributeDefinition[]>;
|
|
110
|
+
resolvedTabs: import("@angular/core").Signal<AttributeTab[]>;
|
|
111
|
+
groupsForTab(tab: AttributeTab): AttributeGroup[];
|
|
112
|
+
attrsForGroup(group: AttributeGroup): EntityAttributeDefinition[];
|
|
113
|
+
getDetailRendererComponent(attr: EntityAttributeDefinition): Type<any> | null;
|
|
114
|
+
/** Inputs of an AsDetail row renderer (`rowComponent`): the row and the object that owns it. */
|
|
115
|
+
getRowRendererInputs(renderer: SparkResolvedRowRenderer, row: Record<string, any>, item: PersistentObject): Record<string, any>;
|
|
116
|
+
getDetailRendererInputs(component: Type<any>, attr: EntityAttributeDefinition, item: PersistentObject): Record<string, any>;
|
|
117
|
+
/** Column renderer for a cell of an AsDetail sub-table (so embedded rows honor `col.renderer` too). */
|
|
118
|
+
getAsDetailCellRendererComponent(col: EntityAttributeDefinition): Type<any> | null;
|
|
119
|
+
getAsDetailCellRendererInputs(component: Type<any>, row: Record<string, any>, col: EntityAttributeDefinition): Record<string, any>;
|
|
120
|
+
private loadLookupReferenceOptions;
|
|
121
|
+
private loadAsDetailTypes;
|
|
122
|
+
/**
|
|
123
|
+
* The bootstrap classes for a custom action's button. Outline-primary stays the default, so
|
|
124
|
+
* every existing action looks exactly as it did; a server-declared variant opts one action into
|
|
125
|
+
* a louder style. Restricted to a known set rather than interpolated, because the value arrives
|
|
126
|
+
* from a JSON file and must not be able to put arbitrary classes on the button.
|
|
127
|
+
*/
|
|
128
|
+
protected customActionClass(action: CustomActionDefinition): string;
|
|
129
|
+
/**
|
|
130
|
+
* The action currently running, or null. Drives the disabled state on every custom-action
|
|
131
|
+
* button.
|
|
132
|
+
*
|
|
133
|
+
* A custom action is not necessarily quick: Coverage's Resync makes paged GitHub App calls for
|
|
134
|
+
* every account the caller manages, inside the request. Without this the button stayed live and
|
|
135
|
+
* looked inert for several seconds, and a second click queued a second full run -- which is how
|
|
136
|
+
* a slow action and a broken one became indistinguishable.
|
|
137
|
+
*/
|
|
138
|
+
runningAction: import("@angular/core").WritableSignal<string | null>;
|
|
139
|
+
onCustomAction(action: CustomActionDefinition): Promise<void>;
|
|
140
|
+
onEdit(): void;
|
|
141
|
+
onDelete(): Promise<void>;
|
|
142
|
+
onBack(): void;
|
|
143
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SparkPoDetailComponent, never>;
|
|
144
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SparkPoDetailComponent, "spark-po-detail", never, {
|
|
145
|
+
"showCustomActions": {
|
|
146
|
+
"alias": "showCustomActions";
|
|
147
|
+
"required": false;
|
|
148
|
+
"isSignal": true;
|
|
149
|
+
};
|
|
150
|
+
"extraActionsTemplate": {
|
|
151
|
+
"alias": "extraActionsTemplate";
|
|
152
|
+
"required": false;
|
|
153
|
+
"isSignal": true;
|
|
154
|
+
};
|
|
155
|
+
"extraContentTemplate": {
|
|
156
|
+
"alias": "extraContentTemplate";
|
|
157
|
+
"required": false;
|
|
158
|
+
"isSignal": true;
|
|
159
|
+
};
|
|
160
|
+
"queryIconTemplate": {
|
|
161
|
+
"alias": "queryIconTemplate";
|
|
162
|
+
"required": false;
|
|
163
|
+
"isSignal": true;
|
|
164
|
+
};
|
|
165
|
+
"queryCaptionTemplate": {
|
|
166
|
+
"alias": "queryCaptionTemplate";
|
|
167
|
+
"required": false;
|
|
168
|
+
"isSignal": true;
|
|
169
|
+
};
|
|
170
|
+
"queryActionsTemplate": {
|
|
171
|
+
"alias": "queryActionsTemplate";
|
|
172
|
+
"required": false;
|
|
173
|
+
"isSignal": true;
|
|
174
|
+
};
|
|
175
|
+
}, {
|
|
176
|
+
"edited": "edited";
|
|
177
|
+
"deleted": "deleted";
|
|
178
|
+
"customActionExecuted": "customActionExecuted";
|
|
179
|
+
}, never, never, true, never>;
|
|
180
|
+
}
|