@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,117 +1,177 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { TemplateRef, Type } from
|
|
3
|
-
import { Color } from
|
|
4
|
-
import { SparkLanguageService } from
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
declare class SparkPoDetailComponent {
|
|
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 { AttributeGroup, AttributeTab, CustomActionDefinition, EntityAttributeDefinition, EntityPermissions, EntityType, LookupReference, PersistentObject, QueryResultItem, SparkDeletedFilter } from "@mintplayer/ng-spark/models";
|
|
6
|
+
import { SparkDetailContext } from "@mintplayer/ng-spark/panels";
|
|
7
|
+
export declare class SparkPoDetailComponent {
|
|
8
|
+
private readonly route;
|
|
9
|
+
private readonly router;
|
|
10
|
+
private readonly sparkService;
|
|
11
|
+
private readonly returnNavigation;
|
|
12
|
+
private readonly queryRefresh;
|
|
13
|
+
private readonly attributeRefresh;
|
|
14
|
+
protected readonly lang: SparkLanguageService;
|
|
15
|
+
private readonly rendererRegistry;
|
|
16
|
+
/**
|
|
17
|
+
* Add-on panels and action-bar buttons (#460, `SPARK_DETAIL_PANELS` / `SPARK_DETAIL_ACTIONS`).
|
|
18
|
+
* Multi-provided, so History, SoftDelete and Moderation can each add theirs to the page
|
|
19
|
+
* `sparkRoutes()` routes to, which is created by the router and takes no templates.
|
|
20
|
+
*/
|
|
21
|
+
protected readonly detailPanels: import("@mintplayer/ng-spark/panels").SparkDetailPanel[];
|
|
22
|
+
protected readonly detailActions: import("@mintplayer/ng-spark/panels").SparkDetailAction[];
|
|
23
|
+
showCustomActions: import("@angular/core").InputSignal<boolean>;
|
|
24
|
+
extraActionsTemplate: import("@angular/core").InputSignal<TemplateRef<void> | null>;
|
|
25
|
+
extraContentTemplate: import("@angular/core").InputSignal<TemplateRef<{
|
|
26
|
+
$implicit: PersistentObject;
|
|
27
|
+
entityType: EntityType;
|
|
28
|
+
}> | null>;
|
|
29
|
+
/**
|
|
30
|
+
* Header slots forwarded to every sub-query card on this page.
|
|
31
|
+
*
|
|
32
|
+
* A structural directive cannot cross a component boundary, and this component is created by
|
|
33
|
+
* the router — in a default app there is no `<spark-po-detail>` tag to project content into.
|
|
34
|
+
* So an app that wants slotted chrome on its sub-queries substitutes its own route component
|
|
35
|
+
* via `SparkRouteConfig.poDetail` and forwards the templates through here. Forwarding a
|
|
36
|
+
* `TemplateRef` as an input is already this component's idiom; see the two above.
|
|
37
|
+
*
|
|
38
|
+
* Each slot may target one query by alias, so a single forwarded set serves a page rendering
|
|
39
|
+
* several sub-queries.
|
|
40
|
+
*/
|
|
41
|
+
queryIconTemplate: import("@angular/core").InputSignal<TemplateRef<any> | null>;
|
|
42
|
+
queryCaptionTemplate: import("@angular/core").InputSignal<TemplateRef<any> | null>;
|
|
43
|
+
queryActionsTemplate: import("@angular/core").InputSignal<TemplateRef<any> | null>;
|
|
44
|
+
edited: import("@angular/core").OutputEmitterRef<void>;
|
|
45
|
+
deleted: import("@angular/core").OutputEmitterRef<void>;
|
|
46
|
+
customActionExecuted: import("@angular/core").OutputEmitterRef<{
|
|
47
|
+
action: CustomActionDefinition;
|
|
48
|
+
item: PersistentObject;
|
|
49
|
+
}>;
|
|
50
|
+
colors: typeof Color;
|
|
51
|
+
errorMessage: import("@angular/core").WritableSignal<string | null>;
|
|
52
|
+
entityType: import("@angular/core").WritableSignal<EntityType | null>;
|
|
53
|
+
/** The sub-queries rendered as cards below the form, in object form (#460, D17). */
|
|
54
|
+
protected readonly subQueries: import("@angular/core").Signal<import("@mintplayer/ng-spark/models").SparkSubQuery[]>;
|
|
55
|
+
allEntityTypes: import("@angular/core").WritableSignal<EntityType[]>;
|
|
56
|
+
item: import("@angular/core").WritableSignal<PersistentObject | null>;
|
|
57
|
+
lookupReferenceOptions: import("@angular/core").WritableSignal<Record<string, LookupReference>>;
|
|
58
|
+
asDetailTypes: import("@angular/core").WritableSignal<Record<string, EntityType>>;
|
|
59
|
+
asDetailReferenceOptions: import("@angular/core").WritableSignal<Record<string, Record<string, QueryResultItem[]>>>;
|
|
60
|
+
type: string;
|
|
61
|
+
id: string;
|
|
62
|
+
canEdit: import("@angular/core").WritableSignal<boolean>;
|
|
63
|
+
canDelete: import("@angular/core").WritableSignal<boolean>;
|
|
64
|
+
customActions: import("@angular/core").WritableSignal<CustomActionDefinition[]>;
|
|
65
|
+
/** Type-level rights, kept for the add-on context; null until loaded. */
|
|
66
|
+
permissions: import("@angular/core").WritableSignal<EntityPermissions | null>;
|
|
67
|
+
/**
|
|
68
|
+
* The route's `?deleted=` mode (#460, T2): `only` when the row was opened from the recycle bin.
|
|
69
|
+
* Sent with every load of this object; the server honours it only for `ViewDeleted` holders, so
|
|
70
|
+
* for anyone else a deleted row stays a 404.
|
|
71
|
+
*/
|
|
72
|
+
deletedMode: import("@angular/core").WritableSignal<SparkDeletedFilter | null>;
|
|
73
|
+
/** True when the page shows a soft-deleted row: nothing but Restore/Purge applies to it. */
|
|
74
|
+
protected readonly isDeletedView: import("@angular/core").Signal<boolean>;
|
|
75
|
+
/** What every add-on panel and action receives; rebuilt whenever the object or rights change. */
|
|
76
|
+
protected readonly detailContext: import("@angular/core").Signal<SparkDetailContext | null>;
|
|
77
|
+
/**
|
|
78
|
+
* The actions actually offered for the object on screen.
|
|
79
|
+
*
|
|
80
|
+
* The catalogue at `/spark/actions/{objectTypeId}` is per TYPE -- the server is never told which
|
|
81
|
+
* row is open -- so an action that applies to only some rows cannot be filtered there. The
|
|
82
|
+
* entity's actions hook decides while it has the entity in hand and withholds what does not
|
|
83
|
+
* apply, and the object arrives carrying that answer.
|
|
84
|
+
*
|
|
85
|
+
* Since #460 (D13) the server asks the same hook again when the action is submitted and refuses a
|
|
86
|
+
* disabled one with 403, so hiding it here matches what the server will do. What this prevents is
|
|
87
|
+
* offering a destructive action where it cannot possibly apply -- Coverage showed an irreversible
|
|
88
|
+
* red "Delete data" button on every repository page, healthy ones included, and only admitted it
|
|
89
|
+
* would refuse after the confirmation prompt.
|
|
90
|
+
*/
|
|
91
|
+
visibleCustomActions: import("@angular/core").Signal<CustomActionDefinition[]>;
|
|
92
|
+
constructor();
|
|
93
|
+
/**
|
|
94
|
+
* Applies patched attribute values in place, without a re-fetch.
|
|
95
|
+
*
|
|
96
|
+
* The operation carries the value the server computed after its own write, so this is both
|
|
97
|
+
* cheaper and more correct than re-reading: a re-read goes through a RavenDB index that may
|
|
98
|
+
* still be stale from the very write that produced the patch, and would show the old value.
|
|
99
|
+
*/
|
|
100
|
+
private applyAttributePatches;
|
|
101
|
+
private onParamsChange;
|
|
102
|
+
/** The object as the page's current mode sees it. Only a set mode is sent. */
|
|
103
|
+
private loadItem;
|
|
104
|
+
/** (Re)loads the object, its type, rights and actions. Also what add-ons call via `context.reload()`. */
|
|
105
|
+
load(): Promise<void>;
|
|
106
|
+
visibleAttributes: import("@angular/core").Signal<EntityAttributeDefinition[]>;
|
|
107
|
+
private static readonly DEFAULT_TAB;
|
|
108
|
+
ungroupedAttributes: import("@angular/core").Signal<EntityAttributeDefinition[]>;
|
|
109
|
+
resolvedTabs: import("@angular/core").Signal<AttributeTab[]>;
|
|
110
|
+
groupsForTab(tab: AttributeTab): AttributeGroup[];
|
|
111
|
+
attrsForGroup(group: AttributeGroup): EntityAttributeDefinition[];
|
|
112
|
+
getDetailRendererComponent(attr: EntityAttributeDefinition): Type<any> | null;
|
|
113
|
+
getDetailRendererInputs(component: Type<any>, attr: EntityAttributeDefinition, item: PersistentObject): Record<string, any>;
|
|
114
|
+
/** Column renderer for a cell of an AsDetail sub-table (so embedded rows honor `col.renderer` too). */
|
|
115
|
+
getAsDetailCellRendererComponent(col: EntityAttributeDefinition): Type<any> | null;
|
|
116
|
+
getAsDetailCellRendererInputs(component: Type<any>, row: Record<string, any>, col: EntityAttributeDefinition): Record<string, any>;
|
|
117
|
+
private loadLookupReferenceOptions;
|
|
118
|
+
private loadAsDetailTypes;
|
|
119
|
+
/**
|
|
120
|
+
* The bootstrap classes for a custom action's button. Outline-primary stays the default, so
|
|
121
|
+
* every existing action looks exactly as it did; a server-declared variant opts one action into
|
|
122
|
+
* a louder style. Restricted to a known set rather than interpolated, because the value arrives
|
|
123
|
+
* from a JSON file and must not be able to put arbitrary classes on the button.
|
|
124
|
+
*/
|
|
125
|
+
protected customActionClass(action: CustomActionDefinition): string;
|
|
126
|
+
/**
|
|
127
|
+
* The action currently running, or null. Drives the disabled state on every custom-action
|
|
128
|
+
* button.
|
|
129
|
+
*
|
|
130
|
+
* A custom action is not necessarily quick: Coverage's Resync makes paged GitHub App calls for
|
|
131
|
+
* every account the caller manages, inside the request. Without this the button stayed live and
|
|
132
|
+
* looked inert for several seconds, and a second click queued a second full run -- which is how
|
|
133
|
+
* a slow action and a broken one became indistinguishable.
|
|
134
|
+
*/
|
|
135
|
+
runningAction: import("@angular/core").WritableSignal<string | null>;
|
|
136
|
+
onCustomAction(action: CustomActionDefinition): Promise<void>;
|
|
137
|
+
onEdit(): void;
|
|
138
|
+
onDelete(): Promise<void>;
|
|
139
|
+
onBack(): void;
|
|
140
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SparkPoDetailComponent, never>;
|
|
141
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SparkPoDetailComponent, "spark-po-detail", never, {
|
|
142
|
+
"showCustomActions": {
|
|
143
|
+
"alias": "showCustomActions";
|
|
144
|
+
"required": false;
|
|
145
|
+
"isSignal": true;
|
|
146
|
+
};
|
|
147
|
+
"extraActionsTemplate": {
|
|
148
|
+
"alias": "extraActionsTemplate";
|
|
149
|
+
"required": false;
|
|
150
|
+
"isSignal": true;
|
|
151
|
+
};
|
|
152
|
+
"extraContentTemplate": {
|
|
153
|
+
"alias": "extraContentTemplate";
|
|
154
|
+
"required": false;
|
|
155
|
+
"isSignal": true;
|
|
156
|
+
};
|
|
157
|
+
"queryIconTemplate": {
|
|
158
|
+
"alias": "queryIconTemplate";
|
|
159
|
+
"required": false;
|
|
160
|
+
"isSignal": true;
|
|
161
|
+
};
|
|
162
|
+
"queryCaptionTemplate": {
|
|
163
|
+
"alias": "queryCaptionTemplate";
|
|
164
|
+
"required": false;
|
|
165
|
+
"isSignal": true;
|
|
166
|
+
};
|
|
167
|
+
"queryActionsTemplate": {
|
|
168
|
+
"alias": "queryActionsTemplate";
|
|
169
|
+
"required": false;
|
|
170
|
+
"isSignal": true;
|
|
171
|
+
};
|
|
172
|
+
}, {
|
|
173
|
+
"edited": "edited";
|
|
174
|
+
"deleted": "deleted";
|
|
175
|
+
"customActionExecuted": "customActionExecuted";
|
|
176
|
+
}, never, never, true, never>;
|
|
177
|
+
}
|
|
@@ -1,65 +1,64 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import * as
|
|
4
|
-
|
|
5
|
-
|
|
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
|
-
export { SparkPoEditComponent };
|
|
1
|
+
import { Color } from "@mintplayer/ng-bootstrap";
|
|
2
|
+
import { EntityType, PersistentObject, RefreshOverlay, ValidationError } from "@mintplayer/ng-spark/models";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class SparkPoEditComponent {
|
|
5
|
+
private readonly route;
|
|
6
|
+
private readonly router;
|
|
7
|
+
private readonly sparkService;
|
|
8
|
+
private readonly language;
|
|
9
|
+
saved: import("@angular/core").OutputEmitterRef<PersistentObject>;
|
|
10
|
+
cancelled: import("@angular/core").OutputEmitterRef<void>;
|
|
11
|
+
colors: typeof Color;
|
|
12
|
+
entityType: import("@angular/core").WritableSignal<EntityType | null>;
|
|
13
|
+
item: import("@angular/core").WritableSignal<PersistentObject | null>;
|
|
14
|
+
type: string;
|
|
15
|
+
id: string;
|
|
16
|
+
formData: import("@angular/core").WritableSignal<Record<string, any>>;
|
|
17
|
+
/**
|
|
18
|
+
* Bound two-way to the form, which is where refreshes land. Read by
|
|
19
|
+
* {@link getEditableAttributes} so the save sees the object the user was actually shown.
|
|
20
|
+
*/
|
|
21
|
+
refreshOverlay: import("@angular/core").WritableSignal<RefreshOverlay>;
|
|
22
|
+
validationErrors: import("@angular/core").WritableSignal<ValidationError[]>;
|
|
23
|
+
isSaving: import("@angular/core").WritableSignal<boolean>;
|
|
24
|
+
private allEntityTypes;
|
|
25
|
+
generalErrors: import("@angular/core").Signal<ValidationError[]>;
|
|
26
|
+
constructor();
|
|
27
|
+
private onParamsChange;
|
|
28
|
+
initFormData(): void;
|
|
29
|
+
/**
|
|
30
|
+
* Resolves a nested AsDetail type by CLR name, for rebuilding the nested PO wire shape on save.
|
|
31
|
+
*
|
|
32
|
+
* ⚠️ <b>`detailTypes` first, catalogue second.</b> The catalogue from `/spark/types` is
|
|
33
|
+
* <b>Query-gated</b>, and an AsDetail row type usually has no rights of its own — nobody grants
|
|
34
|
+
* `Query/GateSettings`, because a gate is edited through the Repository that owns it. So the
|
|
35
|
+
* catalogue does not contain it, the resolver returned undefined, and the save quietly took the
|
|
36
|
+
* scalar branch: the attribute went out as a raw dict under `value` instead of a nested PO under
|
|
37
|
+
* `object`, the server could not map it, and `EntityMapper`'s conversion `catch` swallowed the
|
|
38
|
+
* failure. The save reported success and wrote nothing.
|
|
39
|
+
* <para>
|
|
40
|
+
* `detailTypes` is the parent's own copy of its row types, carried on the type definition for
|
|
41
|
+
* exactly this reason (#385 fixed the rendering half; this is the save half). It is gated on the
|
|
42
|
+
* parent's right, which is the right that governs editing the row anyway.
|
|
43
|
+
* </para>
|
|
44
|
+
*/
|
|
45
|
+
private resolveEntityType;
|
|
46
|
+
/**
|
|
47
|
+
* The attributes this page will read values from when it builds the save.
|
|
48
|
+
*
|
|
49
|
+
* ⚠️ <b>Overlaid before filtering, not after loading.</b> A refresh hook can reveal an attribute
|
|
50
|
+
* that was hidden when the object was loaded, and the ordinary reason it does so is that the
|
|
51
|
+
* attribute has just become required. Filtering on the loaded state left such an attribute out of
|
|
52
|
+
* both {@link initFormData} and the save payload, so the user filled in a field whose value was
|
|
53
|
+
* then dropped on the floor and refused by the server as missing — with no way out of the form.
|
|
54
|
+
* The overlay is the form's, bound two-way, so the two halves cannot drift again.
|
|
55
|
+
*/
|
|
56
|
+
getEditableAttributes(): import("@mintplayer/ng-spark/models").EntityAttributeDefinition[];
|
|
57
|
+
onSave(): Promise<void>;
|
|
58
|
+
onCancel(): void;
|
|
59
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SparkPoEditComponent, never>;
|
|
60
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SparkPoEditComponent, "spark-po-edit", never, {}, {
|
|
61
|
+
"saved": "saved";
|
|
62
|
+
"cancelled": "cancelled";
|
|
63
|
+
}, never, never, true, never>;
|
|
64
|
+
}
|