@mintplayer/ng-spark 22.23.0 → 22.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/README.md +196 -0
  2. package/fesm2022/mintplayer-ng-spark-attribute-description.mjs +100 -47
  3. package/fesm2022/mintplayer-ng-spark-attribute-description.mjs.map +1 -1
  4. package/fesm2022/mintplayer-ng-spark-client-operations.mjs +310 -329
  5. package/fesm2022/mintplayer-ng-spark-client-operations.mjs.map +1 -1
  6. package/fesm2022/mintplayer-ng-spark-column-filter.mjs +175 -135
  7. package/fesm2022/mintplayer-ng-spark-column-filter.mjs.map +1 -1
  8. package/fesm2022/mintplayer-ng-spark-contributions.mjs +721 -0
  9. package/fesm2022/mintplayer-ng-spark-contributions.mjs.map +1 -0
  10. package/fesm2022/mintplayer-ng-spark-grid.mjs +2385 -1118
  11. package/fesm2022/mintplayer-ng-spark-grid.mjs.map +1 -1
  12. package/fesm2022/mintplayer-ng-spark-history.mjs +598 -0
  13. package/fesm2022/mintplayer-ng-spark-history.mjs.map +1 -0
  14. package/fesm2022/mintplayer-ng-spark-icon.mjs +64 -27
  15. package/fesm2022/mintplayer-ng-spark-icon.mjs.map +1 -1
  16. package/fesm2022/mintplayer-ng-spark-models.mjs +405 -762
  17. package/fesm2022/mintplayer-ng-spark-models.mjs.map +1 -1
  18. package/fesm2022/mintplayer-ng-spark-moderation.mjs +1212 -0
  19. package/fesm2022/mintplayer-ng-spark-moderation.mjs.map +1 -0
  20. package/fesm2022/mintplayer-ng-spark-panels.mjs +60 -0
  21. package/fesm2022/mintplayer-ng-spark-panels.mjs.map +1 -0
  22. package/fesm2022/mintplayer-ng-spark-pipes.mjs +1158 -765
  23. package/fesm2022/mintplayer-ng-spark-pipes.mjs.map +1 -1
  24. package/fesm2022/mintplayer-ng-spark-po-create.mjs +273 -169
  25. package/fesm2022/mintplayer-ng-spark-po-create.mjs.map +1 -1
  26. package/fesm2022/mintplayer-ng-spark-po-detail.mjs +795 -410
  27. package/fesm2022/mintplayer-ng-spark-po-detail.mjs.map +1 -1
  28. package/fesm2022/mintplayer-ng-spark-po-edit.mjs +1196 -280
  29. package/fesm2022/mintplayer-ng-spark-po-edit.mjs.map +1 -1
  30. package/fesm2022/mintplayer-ng-spark-po-form.mjs +2244 -1224
  31. package/fesm2022/mintplayer-ng-spark-po-form.mjs.map +1 -1
  32. package/fesm2022/mintplayer-ng-spark-query-list.mjs +571 -303
  33. package/fesm2022/mintplayer-ng-spark-query-list.mjs.map +1 -1
  34. package/fesm2022/mintplayer-ng-spark-renderers.mjs +44 -55
  35. package/fesm2022/mintplayer-ng-spark-renderers.mjs.map +1 -1
  36. package/fesm2022/mintplayer-ng-spark-retry-action-modal.mjs +216 -177
  37. package/fesm2022/mintplayer-ng-spark-retry-action-modal.mjs.map +1 -1
  38. package/fesm2022/mintplayer-ng-spark-routes.mjs +24 -28
  39. package/fesm2022/mintplayer-ng-spark-routes.mjs.map +1 -1
  40. package/fesm2022/mintplayer-ng-spark-services.mjs +625 -640
  41. package/fesm2022/mintplayer-ng-spark-services.mjs.map +1 -1
  42. package/fesm2022/mintplayer-ng-spark-shell.mjs +1031 -397
  43. package/fesm2022/mintplayer-ng-spark-shell.mjs.map +1 -1
  44. package/fesm2022/mintplayer-ng-spark-soft-delete.mjs +294 -0
  45. package/fesm2022/mintplayer-ng-spark-soft-delete.mjs.map +1 -0
  46. package/fesm2022/mintplayer-ng-spark.mjs +14 -48
  47. package/fesm2022/mintplayer-ng-spark.mjs.map +1 -1
  48. package/package.json +23 -2
  49. package/types/mintplayer-ng-spark-attribute-description.d.ts +25 -18
  50. package/types/mintplayer-ng-spark-client-operations.d.ts +139 -160
  51. package/types/mintplayer-ng-spark-column-filter.d.ts +73 -55
  52. package/types/mintplayer-ng-spark-contributions.d.ts +231 -0
  53. package/types/mintplayer-ng-spark-grid.d.ts +917 -448
  54. package/types/mintplayer-ng-spark-history.d.ts +216 -0
  55. package/types/mintplayer-ng-spark-icon.d.ts +15 -13
  56. package/types/mintplayer-ng-spark-models.d.ts +681 -573
  57. package/types/mintplayer-ng-spark-moderation.d.ts +402 -0
  58. package/types/mintplayer-ng-spark-panels.d.ts +143 -0
  59. package/types/mintplayer-ng-spark-pipes.d.ts +131 -149
  60. package/types/mintplayer-ng-spark-po-create.d.ts +46 -37
  61. package/types/mintplayer-ng-spark-po-detail.d.ts +180 -117
  62. package/types/mintplayer-ng-spark-po-edit.d.ts +367 -64
  63. package/types/mintplayer-ng-spark-po-form.d.ts +558 -373
  64. package/types/mintplayer-ng-spark-query-list.d.ts +143 -82
  65. package/types/mintplayer-ng-spark-renderers.d.ts +121 -85
  66. package/types/mintplayer-ng-spark-retry-action-modal.d.ts +31 -34
  67. package/types/mintplayer-ng-spark-routes.d.ts +7 -11
  68. package/types/mintplayer-ng-spark-services.d.ts +377 -261
  69. package/types/mintplayer-ng-spark-shell.d.ts +228 -132
  70. package/types/mintplayer-ng-spark-soft-delete.d.ts +90 -0
  71. package/types/mintplayer-ng-spark.d.ts +19 -12
@@ -1,26 +1,23 @@
1
- import * as i0 from '@angular/core';
2
- import { PipeTransform } from '@angular/core';
3
- import { TranslatedString, PersistentObject, EntityType, LookupReference, EntityAttributeDefinition, QueryResultItem, SparkRow, ProgramUnit, EntityPermissions, ELookupDisplayType, LookupReferenceValue, ValidationError, QueryColumn } from '@mintplayer/ng-spark/models';
4
-
5
- declare class TranslateKeyPipe implements PipeTransform {
6
- private readonly lang;
7
- transform(key: string): string;
8
- static ɵfac: i0.ɵɵFactoryDeclaration<TranslateKeyPipe, never>;
9
- static ɵpipe: i0.ɵɵPipeDeclaration<TranslateKeyPipe, "t", true>;
1
+ import * as i0 from "@angular/core";
2
+ import { PipeTransform } from "@angular/core";
3
+ import { ELookupDisplayType, EntityAttributeDefinition, EntityPermissions, EntityType, LookupReference, LookupReferenceValue, PersistentObject, ProgramUnit, QueryColumn, QueryResultItem, SparkRow, TranslatedString, ValidationError } from "@mintplayer/ng-spark/models";
4
+ import { SparkAttributeRendererRegistration, SparkResolvedRowRenderer } from "@mintplayer/ng-spark/renderers";
5
+ export declare class TranslateKeyPipe implements PipeTransform {
6
+ private readonly lang;
7
+ transform(key: string): string;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<TranslateKeyPipe, never>;
9
+ static ɵpipe: i0.ɵɵPipeDeclaration<TranslateKeyPipe, "t", true>;
10
10
  }
11
-
12
- declare class ResolveTranslationPipe implements PipeTransform {
13
- transform(value: TranslatedString | undefined, fallback?: string): string;
14
- static ɵfac: i0.ɵɵFactoryDeclaration<ResolveTranslationPipe, never>;
15
- static ɵpipe: i0.ɵɵPipeDeclaration<ResolveTranslationPipe, "resolveTranslation", true>;
11
+ export declare class ResolveTranslationPipe implements PipeTransform {
12
+ transform(value: TranslatedString | undefined, fallback?: string): string;
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<ResolveTranslationPipe, never>;
14
+ static ɵpipe: i0.ɵɵPipeDeclaration<ResolveTranslationPipe, "resolveTranslation", true>;
16
15
  }
17
-
18
- declare class InputTypePipe implements PipeTransform {
19
- transform(dataType: string): string;
20
- static ɵfac: i0.ɵɵFactoryDeclaration<InputTypePipe, never>;
21
- static ɵpipe: i0.ɵɵPipeDeclaration<InputTypePipe, "inputType", true>;
16
+ export declare class InputTypePipe implements PipeTransform {
17
+ transform(dataType: string): string;
18
+ static ɵfac: i0.ɵɵFactoryDeclaration<InputTypePipe, never>;
19
+ static ɵpipe: i0.ɵɵPipeDeclaration<InputTypePipe, "inputType", true>;
22
20
  }
23
-
24
21
  /**
25
22
  * Parses a wire value into a `Date`, or `null` when it is absent or unparseable.
26
23
  *
@@ -38,32 +35,28 @@ declare class InputTypePipe implements PipeTransform {
38
35
  * display — a viewer wants the moment in their own zone — but it means a `Date` can never be the thing
39
36
  * you reach for when you need the *originating* wall clock. Read that from the wire value instead.
40
37
  */
41
- declare class ParsedDatePipe implements PipeTransform {
42
- transform(value: unknown): Date | null;
43
- static ɵfac: i0.ɵɵFactoryDeclaration<ParsedDatePipe, never>;
44
- static ɵpipe: i0.ɵɵPipeDeclaration<ParsedDatePipe, "parsedDate", true>;
38
+ export declare class ParsedDatePipe implements PipeTransform {
39
+ transform(value: unknown): Date | null;
40
+ static ɵfac: i0.ɵɵFactoryDeclaration<ParsedDatePipe, never>;
41
+ static ɵpipe: i0.ɵɵPipeDeclaration<ParsedDatePipe, "parsedDate", true>;
45
42
  }
46
-
47
- declare class AttributeValuePipe implements PipeTransform {
48
- transform(attrName: string, item: PersistentObject | null, entityType: EntityType | null, lookupRefOptions: Record<string, LookupReference>, allEntityTypes: EntityType[]): any;
49
- private formatAsDetailValue;
50
- static ɵfac: i0.ɵɵFactoryDeclaration<AttributeValuePipe, never>;
51
- static ɵpipe: i0.ɵɵPipeDeclaration<AttributeValuePipe, "attributeValue", true>;
43
+ export declare class AttributeValuePipe implements PipeTransform {
44
+ transform(attrName: string, item: PersistentObject | null, entityType: EntityType | null, lookupRefOptions: Record<string, LookupReference>, allEntityTypes: EntityType[]): any;
45
+ private formatAsDetailValue;
46
+ static ɵfac: i0.ɵɵFactoryDeclaration<AttributeValuePipe, never>;
47
+ static ɵpipe: i0.ɵɵPipeDeclaration<AttributeValuePipe, "attributeValue", true>;
52
48
  }
53
-
54
- declare class RawAttributeValuePipe implements PipeTransform {
55
- transform(attrName: string, item: PersistentObject | null): any;
56
- static ɵfac: i0.ɵɵFactoryDeclaration<RawAttributeValuePipe, never>;
57
- static ɵpipe: i0.ɵɵPipeDeclaration<RawAttributeValuePipe, "rawAttributeValue", true>;
49
+ export declare class RawAttributeValuePipe implements PipeTransform {
50
+ transform(attrName: string, item: PersistentObject | null): any;
51
+ static ɵfac: i0.ɵɵFactoryDeclaration<RawAttributeValuePipe, never>;
52
+ static ɵpipe: i0.ɵɵPipeDeclaration<RawAttributeValuePipe, "rawAttributeValue", true>;
58
53
  }
59
-
60
- declare class ReferenceDisplayValuePipe implements PipeTransform {
61
- private readonly lang;
62
- transform(attr: EntityAttributeDefinition, formData: Record<string, any>, referenceOptions: Record<string, QueryResultItem[]>): string;
63
- static ɵfac: i0.ɵɵFactoryDeclaration<ReferenceDisplayValuePipe, never>;
64
- static ɵpipe: i0.ɵɵPipeDeclaration<ReferenceDisplayValuePipe, "referenceDisplayValue", true>;
54
+ export declare class ReferenceDisplayValuePipe implements PipeTransform {
55
+ private readonly lang;
56
+ transform(attr: EntityAttributeDefinition, formData: Record<string, any>, referenceOptions: Record<string, QueryResultItem[]>): string;
57
+ static ɵfac: i0.ɵɵFactoryDeclaration<ReferenceDisplayValuePipe, never>;
58
+ static ɵpipe: i0.ɵɵPipeDeclaration<ReferenceDisplayValuePipe, "referenceDisplayValue", true>;
65
59
  }
66
-
67
60
  /**
68
61
  * The text a reference picker's result grid shows in one column.
69
62
  *
@@ -77,21 +70,19 @@ declare class ReferenceDisplayValuePipe implements PipeTransform {
77
70
  * have to know which one it was handed. Using it is also what keeps this working if a picker is ever
78
71
  * pointed at an AsDetail sub-table, whose rows are the flat record shape.
79
72
  */
80
- declare class ReferenceAttrValuePipe implements PipeTransform {
81
- transform(item: SparkRow, attrName: string): any;
82
- static ɵfac: i0.ɵɵFactoryDeclaration<ReferenceAttrValuePipe, never>;
83
- static ɵpipe: i0.ɵɵPipeDeclaration<ReferenceAttrValuePipe, "referenceAttrValue", true>;
73
+ export declare class ReferenceAttrValuePipe implements PipeTransform {
74
+ transform(item: SparkRow, attrName: string): any;
75
+ static ɵfac: i0.ɵɵFactoryDeclaration<ReferenceAttrValuePipe, never>;
76
+ static ɵpipe: i0.ɵɵPipeDeclaration<ReferenceAttrValuePipe, "referenceAttrValue", true>;
84
77
  }
85
-
86
- declare class ReferenceLinkRoutePipe implements PipeTransform {
87
- transform(referenceClrType: string, referenceId: any, allEntityTypes: EntityType[]): string[] | null;
88
- static ɵfac: i0.ɵɵFactoryDeclaration<ReferenceLinkRoutePipe, never>;
89
- static ɵpipe: i0.ɵɵPipeDeclaration<ReferenceLinkRoutePipe, "referenceLinkRoute", true>;
78
+ export declare class ReferenceLinkRoutePipe implements PipeTransform {
79
+ transform(referenceClrType: string, referenceId: any, allEntityTypes: EntityType[]): string[] | null;
80
+ static ɵfac: i0.ɵɵFactoryDeclaration<ReferenceLinkRoutePipe, never>;
81
+ static ɵpipe: i0.ɵɵPipeDeclaration<ReferenceLinkRoutePipe, "referenceLinkRoute", true>;
90
82
  }
91
-
92
- interface ReferenceChip {
93
- id: string;
94
- label: string;
83
+ export interface ReferenceChip {
84
+ id: string;
85
+ label: string;
95
86
  }
96
87
  /**
97
88
  * Resolves a multi-reference attribute (`dataType === 'Reference'`, `isArray === true`)
@@ -100,12 +91,11 @@ interface ReferenceChip {
100
91
  * the id when no breadcrumb is present. Mirrors the single-reference `breadcrumb`
101
92
  * display, applied per id.
102
93
  */
103
- declare class ReferenceChipsPipe implements PipeTransform {
104
- transform(attrName: string, item: PersistentObject | null): ReferenceChip[];
105
- static ɵfac: i0.ɵɵFactoryDeclaration<ReferenceChipsPipe, never>;
106
- static ɵpipe: i0.ɵɵPipeDeclaration<ReferenceChipsPipe, "referenceChips", true>;
94
+ export declare class ReferenceChipsPipe implements PipeTransform {
95
+ transform(attrName: string, item: PersistentObject | null): ReferenceChip[];
96
+ static ɵfac: i0.ɵɵFactoryDeclaration<ReferenceChipsPipe, never>;
97
+ static ɵpipe: i0.ɵɵPipeDeclaration<ReferenceChipsPipe, "referenceChips", true>;
107
98
  }
108
-
109
99
  /**
110
100
  * Maps a program unit to the router commands that open it. Type comparisons are exact: the
111
101
  * server's loader canonicalizes `type` casing, so tolerating variants here would only mask a
@@ -114,26 +104,33 @@ declare class ReferenceChipsPipe implements PipeTransform {
114
104
  * Returns null for a `url` unit — an external address is an `<a href>`, not a router link; the
115
105
  * component rendering the menu owns that branch.
116
106
  */
117
- declare class RouterLinkPipe implements PipeTransform {
118
- transform(unit: ProgramUnit): string[] | null;
119
- static ɵfac: i0.ɵɵFactoryDeclaration<RouterLinkPipe, never>;
120
- static ɵpipe: i0.ɵɵPipeDeclaration<RouterLinkPipe, "routerLink", true>;
107
+ export declare class RouterLinkPipe implements PipeTransform {
108
+ transform(unit: ProgramUnit): string[] | null;
109
+ static ɵfac: i0.ɵɵFactoryDeclaration<RouterLinkPipe, never>;
110
+ static ɵpipe: i0.ɵɵPipeDeclaration<RouterLinkPipe, "routerLink", true>;
121
111
  }
122
-
123
- declare class AsDetailTypePipe implements PipeTransform {
124
- transform(attr: EntityAttributeDefinition, asDetailTypes: Record<string, EntityType>): EntityType | null;
125
- static ɵfac: i0.ɵɵFactoryDeclaration<AsDetailTypePipe, never>;
126
- static ɵpipe: i0.ɵɵPipeDeclaration<AsDetailTypePipe, "asDetailType", true>;
112
+ export declare class AsDetailTypePipe implements PipeTransform {
113
+ transform(attr: EntityAttributeDefinition, asDetailTypes: Record<string, EntityType>): EntityType | null;
114
+ static ɵfac: i0.ɵɵFactoryDeclaration<AsDetailTypePipe, never>;
115
+ static ɵpipe: i0.ɵɵPipeDeclaration<AsDetailTypePipe, "asDetailType", true>;
127
116
  }
128
-
129
- declare class AsDetailColumnsPipe implements PipeTransform {
130
- transform(attr: EntityAttributeDefinition, asDetailTypes: Record<string, EntityType>): EntityAttributeDefinition[];
131
- static ɵfac: i0.ɵɵFactoryDeclaration<AsDetailColumnsPipe, never>;
132
- static ɵpipe: i0.ɵɵPipeDeclaration<AsDetailColumnsPipe, "asDetailColumns", true>;
117
+ /**
118
+ * The columns of an AsDetail table: the row type's visible attributes, in order — minus those a
119
+ * registered row renderer draws (`rowComponent`), when the host passes its renderer registry.
120
+ */
121
+ export declare class AsDetailColumnsPipe implements PipeTransform {
122
+ transform(attr: EntityAttributeDefinition, asDetailTypes: Record<string, EntityType>, renderers?: readonly SparkAttributeRendererRegistration[] | null): EntityAttributeDefinition[];
123
+ static ɵfac: i0.ɵɵFactoryDeclaration<AsDetailColumnsPipe, never>;
124
+ static ɵpipe: i0.ɵɵPipeDeclaration<AsDetailColumnsPipe, "asDetailColumns", true>;
125
+ }
126
+ /** The row renderer an AsDetail attribute's row type names (`rowComponent`), or null. */
127
+ export declare class AsDetailRowRendererPipe implements PipeTransform {
128
+ transform(attr: EntityAttributeDefinition, asDetailTypes: Record<string, EntityType>, renderers: readonly SparkAttributeRendererRegistration[] | null | undefined): SparkResolvedRowRenderer | null;
129
+ static ɵfac: i0.ɵɵFactoryDeclaration<AsDetailRowRendererPipe, never>;
130
+ static ɵpipe: i0.ɵɵPipeDeclaration<AsDetailRowRendererPipe, "asDetailRowRenderer", true>;
133
131
  }
134
-
135
132
  /** What a cell can resolve to: the column's own type, or `null` when it has no value. */
136
- type AsDetailCellValue = string | number | boolean | Date | null;
133
+ export type AsDetailCellValue = string | number | boolean | Date | null;
137
134
  /**
138
135
  * The value of one cell in an `AsDetail` table, **typed by the column's `dataType`** rather than
139
136
  * flattened to a string.
@@ -168,31 +165,27 @@ type AsDetailCellValue = string | number | boolean | Date | null;
168
165
  * falls back to its text, because showing what is there beats showing `Invalid Date`.
169
166
  * </p>
170
167
  */
171
- declare class AsDetailCellValuePipe implements PipeTransform {
172
- transform(row: Record<string, any>, parentAttr: EntityAttributeDefinition, col: EntityAttributeDefinition, asDetailRefOptions: Record<string, Record<string, QueryResultItem[]>>): AsDetailCellValue;
173
- static ɵfac: i0.ɵɵFactoryDeclaration<AsDetailCellValuePipe, never>;
174
- static ɵpipe: i0.ɵɵPipeDeclaration<AsDetailCellValuePipe, "asDetailCellValue", true>;
168
+ export declare class AsDetailCellValuePipe implements PipeTransform {
169
+ transform(row: Record<string, any>, parentAttr: EntityAttributeDefinition, col: EntityAttributeDefinition, asDetailRefOptions: Record<string, Record<string, QueryResultItem[]>>): AsDetailCellValue;
170
+ static ɵfac: i0.ɵɵFactoryDeclaration<AsDetailCellValuePipe, never>;
171
+ static ɵpipe: i0.ɵɵPipeDeclaration<AsDetailCellValuePipe, "asDetailCellValue", true>;
175
172
  }
176
-
177
- declare class AsDetailDisplayValuePipe implements PipeTransform {
178
- private readonly lang;
179
- transform(attr: EntityAttributeDefinition, formData: Record<string, any>, asDetailTypes: Record<string, EntityType>): string;
180
- static ɵfac: i0.ɵɵFactoryDeclaration<AsDetailDisplayValuePipe, never>;
181
- static ɵpipe: i0.ɵɵPipeDeclaration<AsDetailDisplayValuePipe, "asDetailDisplayValue", true>;
173
+ export declare class AsDetailDisplayValuePipe implements PipeTransform {
174
+ private readonly lang;
175
+ transform(attr: EntityAttributeDefinition, formData: Record<string, any>, asDetailTypes: Record<string, EntityType>): string;
176
+ static ɵfac: i0.ɵɵFactoryDeclaration<AsDetailDisplayValuePipe, never>;
177
+ static ɵpipe: i0.ɵɵPipeDeclaration<AsDetailDisplayValuePipe, "asDetailDisplayValue", true>;
182
178
  }
183
-
184
- declare class CanCreateDetailRowPipe implements PipeTransform {
185
- transform(attr: EntityAttributeDefinition, permissions: Record<string, EntityPermissions>): boolean;
186
- static ɵfac: i0.ɵɵFactoryDeclaration<CanCreateDetailRowPipe, never>;
187
- static ɵpipe: i0.ɵɵPipeDeclaration<CanCreateDetailRowPipe, "canCreateDetailRow", true>;
179
+ export declare class CanCreateDetailRowPipe implements PipeTransform {
180
+ transform(attr: EntityAttributeDefinition, permissions: Record<string, EntityPermissions>): boolean;
181
+ static ɵfac: i0.ɵɵFactoryDeclaration<CanCreateDetailRowPipe, never>;
182
+ static ɵpipe: i0.ɵɵPipeDeclaration<CanCreateDetailRowPipe, "canCreateDetailRow", true>;
188
183
  }
189
-
190
- declare class CanDeleteDetailRowPipe implements PipeTransform {
191
- transform(attr: EntityAttributeDefinition, permissions: Record<string, EntityPermissions>): boolean;
192
- static ɵfac: i0.ɵɵFactoryDeclaration<CanDeleteDetailRowPipe, never>;
193
- static ɵpipe: i0.ɵɵPipeDeclaration<CanDeleteDetailRowPipe, "canDeleteDetailRow", true>;
184
+ export declare class CanDeleteDetailRowPipe implements PipeTransform {
185
+ transform(attr: EntityAttributeDefinition, permissions: Record<string, EntityPermissions>): boolean;
186
+ static ɵfac: i0.ɵɵFactoryDeclaration<CanDeleteDetailRowPipe, never>;
187
+ static ɵpipe: i0.ɵɵPipeDeclaration<CanDeleteDetailRowPipe, "canDeleteDetailRow", true>;
194
188
  }
195
-
196
189
  /**
197
190
  * Whether the caller may edit rows of an AsDetail attribute's row type.
198
191
  *
@@ -204,48 +197,41 @@ declare class CanDeleteDetailRowPipe implements PipeTransform {
204
197
  * readable; hiding the inputs would hide the data, which is a worse answer than showing it
205
198
  * uneditable.
206
199
  */
207
- declare class CanEditDetailRowPipe implements PipeTransform {
208
- transform(attr: EntityAttributeDefinition, permissions: Record<string, EntityPermissions>): boolean;
209
- static ɵfac: i0.ɵɵFactoryDeclaration<CanEditDetailRowPipe, never>;
210
- static ɵpipe: i0.ɵɵPipeDeclaration<CanEditDetailRowPipe, "canEditDetailRow", true>;
200
+ export declare class CanEditDetailRowPipe implements PipeTransform {
201
+ transform(attr: EntityAttributeDefinition, permissions: Record<string, EntityPermissions>): boolean;
202
+ static ɵfac: i0.ɵɵFactoryDeclaration<CanEditDetailRowPipe, never>;
203
+ static ɵpipe: i0.ɵɵPipeDeclaration<CanEditDetailRowPipe, "canEditDetailRow", true>;
211
204
  }
212
-
213
- declare class LookupDisplayTypePipe implements PipeTransform {
214
- transform(attr: EntityAttributeDefinition, lookupRefOptions: Record<string, LookupReference>): ELookupDisplayType;
215
- static ɵfac: i0.ɵɵFactoryDeclaration<LookupDisplayTypePipe, never>;
216
- static ɵpipe: i0.ɵɵPipeDeclaration<LookupDisplayTypePipe, "lookupDisplayType", true>;
205
+ export declare class LookupDisplayTypePipe implements PipeTransform {
206
+ transform(attr: EntityAttributeDefinition, lookupRefOptions: Record<string, LookupReference>): ELookupDisplayType;
207
+ static ɵfac: i0.ɵɵFactoryDeclaration<LookupDisplayTypePipe, never>;
208
+ static ɵpipe: i0.ɵɵPipeDeclaration<LookupDisplayTypePipe, "lookupDisplayType", true>;
217
209
  }
218
-
219
- declare class LookupDisplayValuePipe implements PipeTransform {
220
- transform(attr: EntityAttributeDefinition, formData: Record<string, any>, lookupRefOptions: Record<string, LookupReference>): string;
221
- static ɵfac: i0.ɵɵFactoryDeclaration<LookupDisplayValuePipe, never>;
222
- static ɵpipe: i0.ɵɵPipeDeclaration<LookupDisplayValuePipe, "lookupDisplayValue", true>;
210
+ export declare class LookupDisplayValuePipe implements PipeTransform {
211
+ transform(attr: EntityAttributeDefinition, formData: Record<string, any>, lookupRefOptions: Record<string, LookupReference>): string;
212
+ static ɵfac: i0.ɵɵFactoryDeclaration<LookupDisplayValuePipe, never>;
213
+ static ɵpipe: i0.ɵɵPipeDeclaration<LookupDisplayValuePipe, "lookupDisplayValue", true>;
223
214
  }
224
-
225
- declare class LookupOptionsPipe implements PipeTransform {
226
- transform(attr: EntityAttributeDefinition, lookupRefOptions: Record<string, LookupReference>): LookupReferenceValue[];
227
- static ɵfac: i0.ɵɵFactoryDeclaration<LookupOptionsPipe, never>;
228
- static ɵpipe: i0.ɵɵPipeDeclaration<LookupOptionsPipe, "lookupOptions", true>;
215
+ export declare class LookupOptionsPipe implements PipeTransform {
216
+ transform(attr: EntityAttributeDefinition, lookupRefOptions: Record<string, LookupReference>): LookupReferenceValue[];
217
+ static ɵfac: i0.ɵɵFactoryDeclaration<LookupOptionsPipe, never>;
218
+ static ɵpipe: i0.ɵɵPipeDeclaration<LookupOptionsPipe, "lookupOptions", true>;
229
219
  }
230
-
231
- declare class InlineRefOptionsPipe implements PipeTransform {
232
- transform(parentAttr: EntityAttributeDefinition, col: EntityAttributeDefinition, asDetailRefOptions: Record<string, Record<string, QueryResultItem[]>>): QueryResultItem[];
233
- static ɵfac: i0.ɵɵFactoryDeclaration<InlineRefOptionsPipe, never>;
234
- static ɵpipe: i0.ɵɵPipeDeclaration<InlineRefOptionsPipe, "inlineRefOptions", true>;
220
+ export declare class InlineRefOptionsPipe implements PipeTransform {
221
+ transform(parentAttr: EntityAttributeDefinition, col: EntityAttributeDefinition, asDetailRefOptions: Record<string, Record<string, QueryResultItem[]>>): QueryResultItem[];
222
+ static ɵfac: i0.ɵɵFactoryDeclaration<InlineRefOptionsPipe, never>;
223
+ static ɵpipe: i0.ɵɵPipeDeclaration<InlineRefOptionsPipe, "inlineRefOptions", true>;
235
224
  }
236
-
237
- declare class ErrorForAttributePipe implements PipeTransform {
238
- transform(attrName: string, validationErrors: ValidationError[]): string | null;
239
- static ɵfac: i0.ɵɵFactoryDeclaration<ErrorForAttributePipe, never>;
240
- static ɵpipe: i0.ɵɵPipeDeclaration<ErrorForAttributePipe, "errorForAttribute", true>;
225
+ export declare class ErrorForAttributePipe implements PipeTransform {
226
+ transform(attrName: string, validationErrors: ValidationError[]): string | null;
227
+ static ɵfac: i0.ɵɵFactoryDeclaration<ErrorForAttributePipe, never>;
228
+ static ɵpipe: i0.ɵɵPipeDeclaration<ErrorForAttributePipe, "errorForAttribute", true>;
241
229
  }
242
-
243
- declare class IconNamePipe implements PipeTransform {
244
- transform(value: string | undefined, fallback: string): string;
245
- static ɵfac: i0.ɵɵFactoryDeclaration<IconNamePipe, never>;
246
- static ɵpipe: i0.ɵɵPipeDeclaration<IconNamePipe, "iconName", true>;
230
+ export declare class IconNamePipe implements PipeTransform {
231
+ transform(value: string | undefined, fallback: string): string;
232
+ static ɵfac: i0.ɵɵFactoryDeclaration<IconNamePipe, never>;
233
+ static ɵpipe: i0.ɵɵPipeDeclaration<IconNamePipe, "iconName", true>;
247
234
  }
248
-
249
235
  /**
250
236
  * Resolves an attribute to a list of flat row dicts for the detail-page table.
251
237
  * AsDetail array attributes carry their data as nested PersistentObjects in
@@ -254,12 +240,11 @@ declare class IconNamePipe implements PipeTransform {
254
240
  * this branch, the detail page rendered AsDetail arrays as empty tables even
255
241
  * when the edit page (which reads <c>attr.objects</c> directly) showed rows.
256
242
  */
257
- declare class ArrayValuePipe implements PipeTransform {
258
- transform(attrName: string, item: PersistentObject | null): Record<string, any>[];
259
- static ɵfac: i0.ɵɵFactoryDeclaration<ArrayValuePipe, never>;
260
- static ɵpipe: i0.ɵɵPipeDeclaration<ArrayValuePipe, "arrayValue", true>;
243
+ export declare class ArrayValuePipe implements PipeTransform {
244
+ transform(attrName: string, item: PersistentObject | null): Record<string, any>[];
245
+ static ɵfac: i0.ɵɵFactoryDeclaration<ArrayValuePipe, never>;
246
+ static ɵpipe: i0.ɵɵPipeDeclaration<ArrayValuePipe, "arrayValue", true>;
261
247
  }
262
-
263
248
  /**
264
249
  * The display text of one query-grid cell.
265
250
  *
@@ -270,10 +255,10 @@ declare class ArrayValuePipe implements PipeTransform {
270
255
  * merely unnecessary here, they are unreachable. Sharing the code would mean carrying branches
271
256
  * that can never fire and inviting the next reader to feed one shape into the other.
272
257
  */
273
- declare class QueryCellValuePipe implements PipeTransform {
274
- transform(column: QueryColumn, item: QueryResultItem | null, lookupRefOptions: Record<string, LookupReference>): any;
275
- static ɵfac: i0.ɵɵFactoryDeclaration<QueryCellValuePipe, never>;
276
- static ɵpipe: i0.ɵɵPipeDeclaration<QueryCellValuePipe, "queryCellValue", true>;
258
+ export declare class QueryCellValuePipe implements PipeTransform {
259
+ transform(column: QueryColumn, item: QueryResultItem | null, lookupRefOptions: Record<string, LookupReference>): any;
260
+ static ɵfac: i0.ɵɵFactoryDeclaration<QueryCellValuePipe, never>;
261
+ static ɵpipe: i0.ɵɵPipeDeclaration<QueryCellValuePipe, "queryCellValue", true>;
277
262
  }
278
263
  /**
279
264
  * Resolves a multi-reference column (`dataType === 'Reference'`, `isArray === true`) to chips.
@@ -282,11 +267,8 @@ declare class QueryCellValuePipe implements PipeTransform {
282
267
  * falling back to the id itself when a label is missing — the same display rule as a single
283
268
  * reference, applied per id.
284
269
  */
285
- declare class QueryReferenceChipsPipe implements PipeTransform {
286
- transform(column: QueryColumn, item: QueryResultItem | null): ReferenceChip[];
287
- static ɵfac: i0.ɵɵFactoryDeclaration<QueryReferenceChipsPipe, never>;
288
- static ɵpipe: i0.ɵɵPipeDeclaration<QueryReferenceChipsPipe, "queryReferenceChips", true>;
289
- }
290
-
291
- export { ArrayValuePipe, AsDetailCellValuePipe, AsDetailColumnsPipe, AsDetailDisplayValuePipe, AsDetailTypePipe, AttributeValuePipe, CanCreateDetailRowPipe, CanDeleteDetailRowPipe, CanEditDetailRowPipe, ErrorForAttributePipe, IconNamePipe, InlineRefOptionsPipe, InputTypePipe, LookupDisplayTypePipe, LookupDisplayValuePipe, LookupOptionsPipe, ParsedDatePipe, QueryCellValuePipe, QueryReferenceChipsPipe, RawAttributeValuePipe, ReferenceAttrValuePipe, ReferenceChipsPipe, ReferenceDisplayValuePipe, ReferenceLinkRoutePipe, ResolveTranslationPipe, RouterLinkPipe, TranslateKeyPipe };
292
- export type { AsDetailCellValue, ReferenceChip };
270
+ export declare class QueryReferenceChipsPipe implements PipeTransform {
271
+ transform(column: QueryColumn, item: QueryResultItem | null): ReferenceChip[];
272
+ static ɵfac: i0.ɵɵFactoryDeclaration<QueryReferenceChipsPipe, never>;
273
+ static ɵpipe: i0.ɵɵPipeDeclaration<QueryReferenceChipsPipe, "queryReferenceChips", true>;
274
+ }
@@ -1,37 +1,46 @@
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 SparkPoCreateComponent {
7
- private readonly route;
8
- private readonly router;
9
- private readonly sparkService;
10
- saved: _angular_core.OutputEmitterRef<PersistentObject>;
11
- cancelled: _angular_core.OutputEmitterRef<void>;
12
- colors: typeof Color;
13
- entityType: _angular_core.WritableSignal<EntityType | null>;
14
- type: _angular_core.WritableSignal<string>;
15
- formData: _angular_core.WritableSignal<Record<string, any>>;
16
- /** Bound two-way to the form. See {@link getEditableAttributes}. */
17
- refreshOverlay: _angular_core.WritableSignal<RefreshOverlay>;
18
- validationErrors: _angular_core.WritableSignal<ValidationError[]>;
19
- isSaving: _angular_core.WritableSignal<boolean>;
20
- private allEntityTypes;
21
- generalErrors: _angular_core.Signal<ValidationError[]>;
22
- constructor();
23
- private onParamsChange;
24
- initFormData(): void;
25
- /**
26
- * ⚠️ Overlaid before filtering — same reason as <c>spark-po-edit</c>, and worse here: this list is
27
- * the <em>only</em> source of the create payload, so an attribute a refresh hook revealed was not
28
- * merely sent stale, it was absent from the new object entirely.
29
- */
30
- getEditableAttributes(): _mintplayer_ng_spark_models.EntityAttributeDefinition[];
31
- onSave(): Promise<void>;
32
- onCancel(): void;
33
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<SparkPoCreateComponent, never>;
34
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<SparkPoCreateComponent, "spark-po-create", never, {}, { "saved": "saved"; "cancelled": "cancelled"; }, never, never, true, never>;
35
- }
36
-
37
- export { SparkPoCreateComponent };
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 SparkPoCreateComponent {
5
+ private readonly route;
6
+ private readonly router;
7
+ private readonly sparkService;
8
+ saved: import("@angular/core").OutputEmitterRef<PersistentObject>;
9
+ cancelled: import("@angular/core").OutputEmitterRef<void>;
10
+ colors: typeof Color;
11
+ entityType: import("@angular/core").WritableSignal<EntityType | null>;
12
+ type: import("@angular/core").WritableSignal<string>;
13
+ formData: import("@angular/core").WritableSignal<Record<string, any>>;
14
+ /** Bound two-way to the form. See {@link getEditableAttributes}. */
15
+ refreshOverlay: import("@angular/core").WritableSignal<RefreshOverlay>;
16
+ validationErrors: import("@angular/core").WritableSignal<ValidationError[]>;
17
+ isSaving: import("@angular/core").WritableSignal<boolean>;
18
+ private allEntityTypes;
19
+ generalErrors: import("@angular/core").Signal<ValidationError[]>;
20
+ constructor();
21
+ private onParamsChange;
22
+ /**
23
+ * The blank object comes from the server (#460, D19): `/po/new` runs the type's `OnNewAsync`, so a
24
+ * default a hook sets — and, for a New started from a sub-query, the reference to the parent the
25
+ * base hook fills — reaches the form. The sub-query card passes the parent as query parameters
26
+ * (`parentId`, `parentType`, `queryId`), so it survives the navigation and a reload of this page.
27
+ *
28
+ * A refusal (the parent is gone, or not the caller's to see) is shown and the client-side blank
29
+ * form stays usable, exactly as it was before the round-trip existed.
30
+ */
31
+ private applyServerDefaults;
32
+ initFormData(entityType?: EntityType | null): void;
33
+ /**
34
+ * ⚠️ Overlaid before filtering — same reason as <c>spark-po-edit</c>, and worse here: this list is
35
+ * the <em>only</em> source of the create payload, so an attribute a refresh hook revealed was not
36
+ * merely sent stale, it was absent from the new object entirely.
37
+ */
38
+ getEditableAttributes(entityType?: EntityType | null): import("@mintplayer/ng-spark/models").EntityAttributeDefinition[];
39
+ onSave(): Promise<void>;
40
+ onCancel(): void;
41
+ static ɵfac: i0.ɵɵFactoryDeclaration<SparkPoCreateComponent, never>;
42
+ static ɵcmp: i0.ɵɵComponentDeclaration<SparkPoCreateComponent, "spark-po-create", never, {}, {
43
+ "saved": "saved";
44
+ "cancelled": "cancelled";
45
+ }, never, never, true, never>;
46
+ }