@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.
Files changed (68) hide show
  1. package/README.md +181 -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 +308 -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-grid.mjs +2259 -1119
  9. package/fesm2022/mintplayer-ng-spark-grid.mjs.map +1 -1
  10. package/fesm2022/mintplayer-ng-spark-history.mjs +611 -0
  11. package/fesm2022/mintplayer-ng-spark-history.mjs.map +1 -0
  12. package/fesm2022/mintplayer-ng-spark-icon.mjs +64 -27
  13. package/fesm2022/mintplayer-ng-spark-icon.mjs.map +1 -1
  14. package/fesm2022/mintplayer-ng-spark-models.mjs +366 -762
  15. package/fesm2022/mintplayer-ng-spark-models.mjs.map +1 -1
  16. package/fesm2022/mintplayer-ng-spark-moderation.mjs +1212 -0
  17. package/fesm2022/mintplayer-ng-spark-moderation.mjs.map +1 -0
  18. package/fesm2022/mintplayer-ng-spark-panels.mjs +52 -0
  19. package/fesm2022/mintplayer-ng-spark-panels.mjs.map +1 -0
  20. package/fesm2022/mintplayer-ng-spark-pipes.mjs +1122 -765
  21. package/fesm2022/mintplayer-ng-spark-pipes.mjs.map +1 -1
  22. package/fesm2022/mintplayer-ng-spark-po-create.mjs +273 -169
  23. package/fesm2022/mintplayer-ng-spark-po-create.mjs.map +1 -1
  24. package/fesm2022/mintplayer-ng-spark-po-detail.mjs +786 -410
  25. package/fesm2022/mintplayer-ng-spark-po-detail.mjs.map +1 -1
  26. package/fesm2022/mintplayer-ng-spark-po-edit.mjs +292 -284
  27. package/fesm2022/mintplayer-ng-spark-po-edit.mjs.map +1 -1
  28. package/fesm2022/mintplayer-ng-spark-po-form.mjs +2187 -1225
  29. package/fesm2022/mintplayer-ng-spark-po-form.mjs.map +1 -1
  30. package/fesm2022/mintplayer-ng-spark-query-list.mjs +516 -303
  31. package/fesm2022/mintplayer-ng-spark-query-list.mjs.map +1 -1
  32. package/fesm2022/mintplayer-ng-spark-renderers.mjs +17 -55
  33. package/fesm2022/mintplayer-ng-spark-renderers.mjs.map +1 -1
  34. package/fesm2022/mintplayer-ng-spark-retry-action-modal.mjs +216 -177
  35. package/fesm2022/mintplayer-ng-spark-retry-action-modal.mjs.map +1 -1
  36. package/fesm2022/mintplayer-ng-spark-routes.mjs +24 -28
  37. package/fesm2022/mintplayer-ng-spark-routes.mjs.map +1 -1
  38. package/fesm2022/mintplayer-ng-spark-services.mjs +625 -640
  39. package/fesm2022/mintplayer-ng-spark-services.mjs.map +1 -1
  40. package/fesm2022/mintplayer-ng-spark-shell.mjs +1013 -397
  41. package/fesm2022/mintplayer-ng-spark-shell.mjs.map +1 -1
  42. package/fesm2022/mintplayer-ng-spark-soft-delete.mjs +294 -0
  43. package/fesm2022/mintplayer-ng-spark-soft-delete.mjs.map +1 -0
  44. package/fesm2022/mintplayer-ng-spark.mjs +13 -50
  45. package/fesm2022/mintplayer-ng-spark.mjs.map +1 -1
  46. package/package.json +17 -1
  47. package/types/mintplayer-ng-spark-attribute-description.d.ts +25 -18
  48. package/types/mintplayer-ng-spark-client-operations.d.ts +133 -160
  49. package/types/mintplayer-ng-spark-column-filter.d.ts +73 -55
  50. package/types/mintplayer-ng-spark-grid.d.ts +885 -448
  51. package/types/mintplayer-ng-spark-history.d.ts +223 -0
  52. package/types/mintplayer-ng-spark-icon.d.ts +15 -13
  53. package/types/mintplayer-ng-spark-models.d.ts +624 -573
  54. package/types/mintplayer-ng-spark-moderation.d.ts +402 -0
  55. package/types/mintplayer-ng-spark-panels.d.ts +108 -0
  56. package/types/mintplayer-ng-spark-pipes.d.ts +120 -149
  57. package/types/mintplayer-ng-spark-po-create.d.ts +46 -37
  58. package/types/mintplayer-ng-spark-po-detail.d.ts +177 -117
  59. package/types/mintplayer-ng-spark-po-edit.d.ts +64 -65
  60. package/types/mintplayer-ng-spark-po-form.d.ts +507 -371
  61. package/types/mintplayer-ng-spark-query-list.d.ts +118 -82
  62. package/types/mintplayer-ng-spark-renderers.d.ts +79 -85
  63. package/types/mintplayer-ng-spark-retry-action-modal.d.ts +31 -34
  64. package/types/mintplayer-ng-spark-routes.d.ts +7 -11
  65. package/types/mintplayer-ng-spark-services.d.ts +377 -261
  66. package/types/mintplayer-ng-spark-shell.d.ts +209 -128
  67. package/types/mintplayer-ng-spark-soft-delete.d.ts +90 -0
  68. package/types/mintplayer-ng-spark.d.ts +7 -12
@@ -1,117 +1,177 @@
1
- import * as _angular_core 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 { PersistentObject, EntityType, CustomActionDefinition, LookupReference, QueryResultItem, EntityAttributeDefinition, AttributeTab, AttributeGroup } from '@mintplayer/ng-spark/models';
6
-
7
- declare class SparkPoDetailComponent {
8
- private readonly route;
9
- private readonly router;
10
- private readonly sparkService;
11
- private readonly queryRefresh;
12
- private readonly attributeRefresh;
13
- protected readonly lang: SparkLanguageService;
14
- private readonly rendererRegistry;
15
- showCustomActions: _angular_core.InputSignal<boolean>;
16
- extraActionsTemplate: _angular_core.InputSignal<TemplateRef<void> | null>;
17
- extraContentTemplate: _angular_core.InputSignal<TemplateRef<{
18
- $implicit: PersistentObject;
19
- entityType: EntityType;
20
- }> | null>;
21
- /**
22
- * Header slots forwarded to every sub-query card on this page.
23
- *
24
- * A structural directive cannot cross a component boundary, and this component is created by
25
- * the router — in a default app there is no `<spark-po-detail>` tag to project content into.
26
- * So an app that wants slotted chrome on its sub-queries substitutes its own route component
27
- * via `SparkRouteConfig.poDetail` and forwards the templates through here. Forwarding a
28
- * `TemplateRef` as an input is already this component's idiom; see the two above.
29
- *
30
- * Each slot may target one query by alias, so a single forwarded set serves a page rendering
31
- * several sub-queries.
32
- */
33
- queryIconTemplate: _angular_core.InputSignal<TemplateRef<any> | null>;
34
- queryCaptionTemplate: _angular_core.InputSignal<TemplateRef<any> | null>;
35
- queryActionsTemplate: _angular_core.InputSignal<TemplateRef<any> | null>;
36
- edited: _angular_core.OutputEmitterRef<void>;
37
- deleted: _angular_core.OutputEmitterRef<void>;
38
- customActionExecuted: _angular_core.OutputEmitterRef<{
39
- action: CustomActionDefinition;
40
- item: PersistentObject;
41
- }>;
42
- colors: typeof Color;
43
- errorMessage: _angular_core.WritableSignal<string | null>;
44
- entityType: _angular_core.WritableSignal<EntityType | null>;
45
- allEntityTypes: _angular_core.WritableSignal<EntityType[]>;
46
- item: _angular_core.WritableSignal<PersistentObject | null>;
47
- lookupReferenceOptions: _angular_core.WritableSignal<Record<string, LookupReference>>;
48
- asDetailTypes: _angular_core.WritableSignal<Record<string, EntityType>>;
49
- asDetailReferenceOptions: _angular_core.WritableSignal<Record<string, Record<string, QueryResultItem[]>>>;
50
- type: string;
51
- id: string;
52
- canEdit: _angular_core.WritableSignal<boolean>;
53
- canDelete: _angular_core.WritableSignal<boolean>;
54
- customActions: _angular_core.WritableSignal<CustomActionDefinition[]>;
55
- /**
56
- * The actions actually offered for the object on screen.
57
- *
58
- * The catalogue at `/spark/actions/{objectTypeId}` is per TYPE -- the server is never told which
59
- * row is open -- so an action that applies to only some rows cannot be filtered there. The
60
- * entity's actions hook decides while it has the entity in hand and withholds what does not
61
- * apply, and the object arrives carrying that answer.
62
- *
63
- * An affordance, not a permission: the endpoint stays reachable and the action handler still
64
- * refuses on its own terms. What this prevents is offering a destructive action where it cannot
65
- * possibly apply -- Coverage showed an irreversible red "Delete data" button on every repository
66
- * page, healthy ones included, and only admitted it would refuse after the confirmation prompt.
67
- */
68
- visibleCustomActions: _angular_core.Signal<CustomActionDefinition[]>;
69
- constructor();
70
- /**
71
- * Applies patched attribute values in place, without a re-fetch.
72
- *
73
- * The operation carries the value the server computed after its own write, so this is both
74
- * cheaper and more correct than re-reading: a re-read goes through a RavenDB index that may
75
- * still be stale from the very write that produced the patch, and would show the old value.
76
- */
77
- private applyAttributePatches;
78
- private onParamsChange;
79
- visibleAttributes: _angular_core.Signal<EntityAttributeDefinition[]>;
80
- private static readonly DEFAULT_TAB;
81
- ungroupedAttributes: _angular_core.Signal<EntityAttributeDefinition[]>;
82
- resolvedTabs: _angular_core.Signal<AttributeTab[]>;
83
- groupsForTab(tab: AttributeTab): AttributeGroup[];
84
- attrsForGroup(group: AttributeGroup): EntityAttributeDefinition[];
85
- getDetailRendererComponent(attr: EntityAttributeDefinition): Type<any> | null;
86
- getDetailRendererInputs(component: Type<any>, attr: EntityAttributeDefinition, item: PersistentObject): Record<string, any>;
87
- /** Column renderer for a cell of an AsDetail sub-table (so embedded rows honor `col.renderer` too). */
88
- getAsDetailCellRendererComponent(col: EntityAttributeDefinition): Type<any> | null;
89
- getAsDetailCellRendererInputs(component: Type<any>, row: Record<string, any>, col: EntityAttributeDefinition): Record<string, any>;
90
- private loadLookupReferenceOptions;
91
- private loadAsDetailTypes;
92
- /**
93
- * The bootstrap classes for a custom action's button. Outline-primary stays the default, so
94
- * every existing action looks exactly as it did; a server-declared variant opts one action into
95
- * a louder style. Restricted to a known set rather than interpolated, because the value arrives
96
- * from a JSON file and must not be able to put arbitrary classes on the button.
97
- */
98
- protected customActionClass(action: CustomActionDefinition): string;
99
- /**
100
- * The action currently running, or null. Drives the disabled state on every custom-action
101
- * button.
102
- *
103
- * A custom action is not necessarily quick: Coverage's Resync makes paged GitHub App calls for
104
- * every account the caller manages, inside the request. Without this the button stayed live and
105
- * looked inert for several seconds, and a second click queued a second full run -- which is how
106
- * a slow action and a broken one became indistinguishable.
107
- */
108
- runningAction: _angular_core.WritableSignal<string | null>;
109
- onCustomAction(action: CustomActionDefinition): Promise<void>;
110
- onEdit(): void;
111
- onDelete(): Promise<void>;
112
- onBack(): void;
113
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<SparkPoDetailComponent, never>;
114
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<SparkPoDetailComponent, "spark-po-detail", never, { "showCustomActions": { "alias": "showCustomActions"; "required": false; "isSignal": true; }; "extraActionsTemplate": { "alias": "extraActionsTemplate"; "required": false; "isSignal": true; }; "extraContentTemplate": { "alias": "extraContentTemplate"; "required": false; "isSignal": true; }; "queryIconTemplate": { "alias": "queryIconTemplate"; "required": false; "isSignal": true; }; "queryCaptionTemplate": { "alias": "queryCaptionTemplate"; "required": false; "isSignal": true; }; "queryActionsTemplate": { "alias": "queryActionsTemplate"; "required": false; "isSignal": true; }; }, { "edited": "edited"; "deleted": "deleted"; "customActionExecuted": "customActionExecuted"; }, never, never, true, never>;
115
- }
116
-
117
- export { SparkPoDetailComponent };
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 * as _mintplayer_ng_spark_models from '@mintplayer/ng-spark/models';
2
- import { PersistentObject, EntityType, RefreshOverlay, ValidationError } from '@mintplayer/ng-spark/models';
3
- import * as _angular_core from '@angular/core';
4
- import { Color } from '@mintplayer/ng-bootstrap';
5
-
6
- declare class SparkPoEditComponent {
7
- private readonly route;
8
- private readonly router;
9
- private readonly sparkService;
10
- private readonly language;
11
- saved: _angular_core.OutputEmitterRef<PersistentObject>;
12
- cancelled: _angular_core.OutputEmitterRef<void>;
13
- colors: typeof Color;
14
- entityType: _angular_core.WritableSignal<EntityType | null>;
15
- item: _angular_core.WritableSignal<PersistentObject | null>;
16
- type: string;
17
- id: string;
18
- formData: _angular_core.WritableSignal<Record<string, any>>;
19
- /**
20
- * Bound two-way to the form, which is where refreshes land. Read by
21
- * {@link getEditableAttributes} so the save sees the object the user was actually shown.
22
- */
23
- refreshOverlay: _angular_core.WritableSignal<RefreshOverlay>;
24
- validationErrors: _angular_core.WritableSignal<ValidationError[]>;
25
- isSaving: _angular_core.WritableSignal<boolean>;
26
- private allEntityTypes;
27
- generalErrors: _angular_core.Signal<ValidationError[]>;
28
- constructor();
29
- private onParamsChange;
30
- initFormData(): void;
31
- /**
32
- * Resolves a nested AsDetail type by CLR name, for rebuilding the nested PO wire shape on save.
33
- *
34
- * ⚠️ <b>`detailTypes` first, catalogue second.</b> The catalogue from `/spark/types` is
35
- * <b>Query-gated</b>, and an AsDetail row type usually has no rights of its own — nobody grants
36
- * `Query/GateSettings`, because a gate is edited through the Repository that owns it. So the
37
- * catalogue does not contain it, the resolver returned undefined, and the save quietly took the
38
- * scalar branch: the attribute went out as a raw dict under `value` instead of a nested PO under
39
- * `object`, the server could not map it, and `EntityMapper`'s conversion `catch` swallowed the
40
- * failure. The save reported success and wrote nothing.
41
- * <para>
42
- * `detailTypes` is the parent's own copy of its row types, carried on the type definition for
43
- * exactly this reason (#385 fixed the rendering half; this is the save half). It is gated on the
44
- * parent's right, which is the right that governs editing the row anyway.
45
- * </para>
46
- */
47
- private resolveEntityType;
48
- /**
49
- * The attributes this page will read values from when it builds the save.
50
- *
51
- * ⚠️ <b>Overlaid before filtering, not after loading.</b> A refresh hook can reveal an attribute
52
- * that was hidden when the object was loaded, and the ordinary reason it does so is that the
53
- * attribute has just become required. Filtering on the loaded state left such an attribute out of
54
- * both {@link initFormData} and the save payload, so the user filled in a field whose value was
55
- * then dropped on the floor and refused by the server as missing — with no way out of the form.
56
- * The overlay is the form's, bound two-way, so the two halves cannot drift again.
57
- */
58
- getEditableAttributes(): _mintplayer_ng_spark_models.EntityAttributeDefinition[];
59
- onSave(): Promise<void>;
60
- onCancel(): void;
61
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<SparkPoEditComponent, never>;
62
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<SparkPoEditComponent, "spark-po-edit", never, {}, { "saved": "saved"; "cancelled": "cancelled"; }, never, never, true, never>;
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
+ }