@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,10 +1,10 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { TemplateRef } from "@angular/core";
|
|
3
|
+
import { Color } from "@mintplayer/ng-bootstrap";
|
|
4
|
+
import { SparkLanguageService } from "@mintplayer/ng-spark/services";
|
|
5
|
+
import { SparkQueryToolbarAction } from "@mintplayer/ng-spark/grid";
|
|
6
|
+
import { CustomActionDefinition, QueryColumn, QueryResultItem, SparkDeletedFilter } from "@mintplayer/ng-spark/models";
|
|
7
|
+
import { SparkQueryListContext } from "@mintplayer/ng-spark/panels";
|
|
8
8
|
/**
|
|
9
9
|
* The routed query page: chrome around one {@link SparkQueryGridComponent}.
|
|
10
10
|
*
|
|
@@ -22,78 +22,114 @@ import { SparkLanguageService } from '@mintplayer/ng-spark/services';
|
|
|
22
22
|
* is the shared component. This page previously wrote out `<bs-datatable>` twice, once per
|
|
23
23
|
* transport, with a shared row template between them; both are gone.
|
|
24
24
|
*/
|
|
25
|
-
declare class SparkQueryListComponent {
|
|
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
|
-
|
|
25
|
+
export declare class SparkQueryListComponent {
|
|
26
|
+
private readonly route;
|
|
27
|
+
private readonly router;
|
|
28
|
+
private readonly sparkService;
|
|
29
|
+
private readonly streamingService;
|
|
30
|
+
private readonly destroyRef;
|
|
31
|
+
protected readonly lang: SparkLanguageService;
|
|
32
|
+
extraActionsTemplate: import("@angular/core").InputSignal<TemplateRef<void> | null>;
|
|
33
|
+
showCustomActions: import("@angular/core").InputSignal<boolean>;
|
|
34
|
+
/**
|
|
35
|
+
* Forwarded to the grid, so a query PAGE can replace its row links — the same reason the card
|
|
36
|
+
* forwards it. Without this the escape hatch existed only for a directly-embedded grid.
|
|
37
|
+
*/
|
|
38
|
+
rowRoute: import("@angular/core").InputSignal<((row: QueryResultItem) => unknown[] | null) | null>;
|
|
39
|
+
rowClicked: import("@angular/core").OutputEmitterRef<QueryResultItem>;
|
|
40
|
+
createClicked: import("@angular/core").OutputEmitterRef<void>;
|
|
41
|
+
customActionExecuted: import("@angular/core").OutputEmitterRef<{
|
|
42
|
+
action: CustomActionDefinition;
|
|
43
|
+
}>;
|
|
44
|
+
colors: typeof Color;
|
|
45
|
+
/** The query the grid should render, resolved from the route. Null until it is known. */
|
|
46
|
+
queryId: import("@angular/core").WritableSignal<string | null>;
|
|
47
|
+
errorMessage: import("@angular/core").WritableSignal<string | null>;
|
|
48
|
+
searchTerm: import("@angular/core").WritableSignal<string>;
|
|
49
|
+
private readonly grid;
|
|
50
|
+
/**
|
|
51
|
+
* Grid state, surfaced for this page's chrome.
|
|
52
|
+
*
|
|
53
|
+
* Optional `viewChild`, read defensively: the action bar and caption render above the grid, so
|
|
54
|
+
* on the first change-detection pass the query has not resolved yet.
|
|
55
|
+
*/
|
|
56
|
+
protected readonly query: import("@angular/core").Signal<import("@mintplayer/ng-spark/models").SparkQuery | null>;
|
|
57
|
+
protected readonly entityType: import("@angular/core").Signal<import("@mintplayer/ng-spark/models").EntityType | null>;
|
|
58
|
+
protected readonly customActions: import("@angular/core").Signal<CustomActionDefinition[]>;
|
|
59
|
+
protected readonly canCreate: import("@angular/core").Signal<boolean>;
|
|
60
|
+
protected readonly resultCount: import("@angular/core").Signal<number | null>;
|
|
61
|
+
protected readonly isVirtualScrolling: import("@angular/core").Signal<boolean>;
|
|
62
|
+
protected readonly gridError: import("@angular/core").Signal<string | null>;
|
|
63
|
+
protected readonly permissions: import("@angular/core").Signal<import("@mintplayer/ng-spark/models").EntityPermissions | null>;
|
|
64
|
+
/** Add-on buttons for the action bar (#460, `SPARK_QUERY_LIST_ACTIONS`), e.g. the Deleted toggle. */
|
|
65
|
+
protected readonly listActions: import("@mintplayer/ng-spark/panels").SparkQueryListAction[];
|
|
66
|
+
/**
|
|
67
|
+
* The soft-deletion mode (#460, T2), read from the route's `?deleted=` so the recycle bin survives
|
|
68
|
+
* a reload and the back button from a row opened in it. `exclude` unless the route says otherwise.
|
|
69
|
+
*/
|
|
70
|
+
protected readonly deletedMode: import("@angular/core").WritableSignal<SparkDeletedFilter>;
|
|
71
|
+
/** Bumped by `context.reload()`; the grid treats any new value as "re-run the query". */
|
|
72
|
+
private readonly reloadToken;
|
|
73
|
+
protected readonly listContext: import("@angular/core").Signal<SparkQueryListContext | null>;
|
|
74
|
+
protected readonly gridReloadToken: import("@angular/core").Signal<number>;
|
|
75
|
+
private setDeleted;
|
|
76
|
+
/** Whether an action's selection rule is satisfied. Delegated: the grid holds the selection. */
|
|
77
|
+
/** @see SparkPoDetailComponent.customActionClass — same allow-list, same default. */
|
|
78
|
+
protected customActionClass(action: CustomActionDefinition): string;
|
|
79
|
+
/** The grid's toolbar model (#460, M15), the same list the sub-query card renders. */
|
|
80
|
+
protected readonly toolbarActions: import("@angular/core").Signal<SparkQueryToolbarAction[]>;
|
|
81
|
+
protected toolbarActionClass(action: SparkQueryToolbarAction): string;
|
|
82
|
+
protected isToolbarActionEnabled(action: SparkQueryToolbarAction): boolean;
|
|
83
|
+
protected runToolbarAction(action: SparkQueryToolbarAction): void;
|
|
84
|
+
protected isActionEnabled(action: CustomActionDefinition): boolean;
|
|
85
|
+
isStreaming: import("@angular/core").WritableSignal<boolean>;
|
|
86
|
+
private streamingSub;
|
|
87
|
+
/** Columns as sent with the stream's snapshot; empty until it arrives. */
|
|
88
|
+
protected readonly streamColumns: import("@angular/core").WritableSignal<QueryColumn[]>;
|
|
89
|
+
private readonly allItems;
|
|
90
|
+
private readonly streamItems;
|
|
91
|
+
/**
|
|
92
|
+
* Rows handed to the grid, or `null` to let it fetch for itself.
|
|
93
|
+
*
|
|
94
|
+
* Null for a normal query — an empty array would read as "here are no rows" and suppress the
|
|
95
|
+
* fetch entirely.
|
|
96
|
+
*/
|
|
97
|
+
protected readonly gridData: import("@angular/core").Signal<QueryResultItem[] | null>;
|
|
98
|
+
constructor();
|
|
99
|
+
private onParamsChange;
|
|
100
|
+
/**
|
|
101
|
+
* A load failure has to render, not just be swallowed: a denied query answers 404 (audit M-3, so
|
|
102
|
+
* existence is not leaked), which is indistinguishable from a missing one — hence a deliberately
|
|
103
|
+
* generic message rather than a guess at which it was.
|
|
104
|
+
*/
|
|
105
|
+
private reportLoadFailure;
|
|
106
|
+
protected onCustomAction(action: CustomActionDefinition): Promise<void>;
|
|
107
|
+
protected onCreate(): void;
|
|
108
|
+
protected clearSearch(): void;
|
|
109
|
+
private connectStreaming;
|
|
110
|
+
private disconnectStreaming;
|
|
111
|
+
private handleStreamingMessage;
|
|
112
|
+
private applyFilter;
|
|
113
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SparkQueryListComponent, never>;
|
|
114
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SparkQueryListComponent, "spark-query-list", never, {
|
|
115
|
+
"extraActionsTemplate": {
|
|
116
|
+
"alias": "extraActionsTemplate";
|
|
117
|
+
"required": false;
|
|
118
|
+
"isSignal": true;
|
|
119
|
+
};
|
|
120
|
+
"showCustomActions": {
|
|
121
|
+
"alias": "showCustomActions";
|
|
122
|
+
"required": false;
|
|
123
|
+
"isSignal": true;
|
|
124
|
+
};
|
|
125
|
+
"rowRoute": {
|
|
126
|
+
"alias": "rowRoute";
|
|
127
|
+
"required": false;
|
|
128
|
+
"isSignal": true;
|
|
129
|
+
};
|
|
130
|
+
}, {
|
|
131
|
+
"rowClicked": "rowClicked";
|
|
132
|
+
"createClicked": "createClicked";
|
|
133
|
+
"customActionExecuted": "customActionExecuted";
|
|
134
|
+
}, never, never, true, never>;
|
|
135
|
+
}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { InjectionToken, InputSignal, Provider, Type } from "@angular/core";
|
|
2
|
+
import { EntityAttributeDefinition, PersistentObject, PersistentObjectAttribute, QueryResultItem, QueryResultItemValue, SparkCellColumn } from "@mintplayer/ng-spark/models";
|
|
4
3
|
/**
|
|
5
4
|
* Drops entries the component doesn't declare, so every contract member is
|
|
6
5
|
* genuinely optional — NgComponentOutlet throws on an undeclared input.
|
|
7
6
|
*/
|
|
8
|
-
declare function withDeclaredInputs(component: Type<any>, inputs: Record<string, any>): Record<string, any>;
|
|
7
|
+
export declare function withDeclaredInputs(component: Type<any>, inputs: Record<string, any>): Record<string, any>;
|
|
9
8
|
/**
|
|
10
9
|
* The renderer-facing value of an attribute: the flat value, or for AsDetail
|
|
11
10
|
* attributes (whose flat value the server nulls on purpose) the nested
|
|
@@ -13,7 +12,7 @@ declare function withDeclaredInputs(component: Type<any>, inputs: Record<string,
|
|
|
13
12
|
*
|
|
14
13
|
* Used by the detail and edit paths, which still work in attributes.
|
|
15
14
|
*/
|
|
16
|
-
declare function rendererValue(attr: PersistentObjectAttribute | undefined): any;
|
|
15
|
+
export declare function rendererValue(attr: PersistentObjectAttribute | undefined): any;
|
|
17
16
|
/**
|
|
18
17
|
* The renderer-facing value of a query-result cell.
|
|
19
18
|
*
|
|
@@ -24,98 +23,96 @@ declare function rendererValue(attr: PersistentObjectAttribute | undefined): any
|
|
|
24
23
|
* stops a renderer silently receiving `undefined` because it was written against the attribute
|
|
25
24
|
* shape's `object` / `objects` fields, which a row does not carry.
|
|
26
25
|
*/
|
|
27
|
-
declare function cellValue(value: QueryResultItemValue | undefined): any;
|
|
28
|
-
|
|
26
|
+
export declare function cellValue(value: QueryResultItemValue | undefined): any;
|
|
29
27
|
/**
|
|
30
28
|
* Contract for detail-page renderers (spark-po-detail).
|
|
31
29
|
* Displays a single attribute value in the PO detail view.
|
|
32
30
|
*/
|
|
33
|
-
interface SparkAttributeDetailRenderer {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
31
|
+
export interface SparkAttributeDetailRenderer {
|
|
32
|
+
/**
|
|
33
|
+
* The current attribute value. For an AsDetail attribute this is the nested
|
|
34
|
+
* PersistentObject (single) or PersistentObject[] (array).
|
|
35
|
+
*/
|
|
36
|
+
value?: InputSignal<any>;
|
|
37
|
+
/** The attribute definition metadata */
|
|
38
|
+
attribute?: InputSignal<EntityAttributeDefinition | undefined>;
|
|
39
|
+
/** Renderer-specific options from rendererOptions */
|
|
40
|
+
options?: InputSignal<Record<string, any> | undefined>;
|
|
41
|
+
/** The full form data (for cross-field dependencies); AsDetail keys carry the nested PO(s) */
|
|
42
|
+
formData?: InputSignal<Record<string, any>>;
|
|
43
|
+
/** The full PersistentObject being displayed — ids/breadcrumbs the flattened formData drops */
|
|
44
|
+
item?: InputSignal<PersistentObject | undefined>;
|
|
47
45
|
}
|
|
48
46
|
/**
|
|
49
47
|
* Contract for query-list column renderers (spark-query-list).
|
|
50
48
|
* Displays a compact cell value in the list/grid view.
|
|
51
49
|
*/
|
|
52
|
-
interface SparkAttributeColumnRenderer {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
50
|
+
export interface SparkAttributeColumnRenderer {
|
|
51
|
+
/**
|
|
52
|
+
* The cell value. For an AsDetail column this is the nested PersistentObject (single) /
|
|
53
|
+
* PersistentObject[] (array) in an AsDetail sub-table, and the projected value in a query grid.
|
|
54
|
+
*/
|
|
55
|
+
value?: InputSignal<any>;
|
|
56
|
+
/**
|
|
57
|
+
* The column being rendered.
|
|
58
|
+
*
|
|
59
|
+
* A query grid supplies a {@link SparkCellColumn} from the result own column metadata; an
|
|
60
|
+
* AsDetail sub-table supplies its attribute definition, which satisfies the same shape. This
|
|
61
|
+
* replaced an `attribute` input typed as the definition: a query result no longer carries
|
|
62
|
+
* attribute metadata per row, so naming it `attribute` would promise something the grid cannot
|
|
63
|
+
* deliver.
|
|
64
|
+
*/
|
|
65
|
+
column?: InputSignal<SparkCellColumn | undefined>;
|
|
66
|
+
/** Renderer-specific options from rendererOptions */
|
|
67
|
+
options?: InputSignal<Record<string, any> | undefined>;
|
|
68
|
+
/**
|
|
69
|
+
* The row this cell belongs to: a {@link QueryResultItem} in a query grid, a plain record
|
|
70
|
+
* (possibly including the reserved '__sparkBreadcrumbs' key) in AsDetail sub-tables. Passed
|
|
71
|
+
* only when declared.
|
|
72
|
+
*/
|
|
73
|
+
item?: InputSignal<QueryResultItem | Record<string, any> | undefined>;
|
|
76
74
|
}
|
|
77
75
|
/**
|
|
78
76
|
* Contract for edit-form renderers (spark-po-form on create/edit pages).
|
|
79
77
|
* Replaces the default <input> for this attribute.
|
|
80
78
|
*/
|
|
81
|
-
interface SparkAttributeEditRenderer {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
79
|
+
export interface SparkAttributeEditRenderer {
|
|
80
|
+
/** The current attribute value */
|
|
81
|
+
value?: InputSignal<any>;
|
|
82
|
+
/** The attribute definition metadata */
|
|
83
|
+
attribute?: InputSignal<EntityAttributeDefinition | undefined>;
|
|
84
|
+
/** Renderer-specific options from rendererOptions */
|
|
85
|
+
options?: InputSignal<Record<string, any> | undefined>;
|
|
86
|
+
/**
|
|
87
|
+
* Callback to notify parent form of value changes (since NgComponentOutlet
|
|
88
|
+
* doesn't support outputs). Not declaring it disables write-back.
|
|
89
|
+
*/
|
|
90
|
+
valueChange?: InputSignal<(value: any) => void>;
|
|
93
91
|
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
filterLabel?: (value: unknown) => string;
|
|
92
|
+
export interface SparkAttributeRendererRegistration {
|
|
93
|
+
/** The renderer name (must match attr.renderer in model JSON) */
|
|
94
|
+
name: string;
|
|
95
|
+
/** Component for the PO detail page. Must implement SparkAttributeDetailRenderer. Omit for a column/edit-only renderer. */
|
|
96
|
+
detailComponent?: Type<any> | null;
|
|
97
|
+
/** Component for query-list column cells. Must implement SparkAttributeColumnRenderer. Omit for a detail/edit-only renderer. */
|
|
98
|
+
columnComponent?: Type<any> | null;
|
|
99
|
+
/** Optional component for create/edit forms. Must implement SparkAttributeEditRenderer. When omitted, the default input is used. */
|
|
100
|
+
editComponent?: Type<any>;
|
|
101
|
+
/**
|
|
102
|
+
* Relabels this column's values in a filter panel (#431).
|
|
103
|
+
*
|
|
104
|
+
* A renderer is a component that paints arbitrary DOM, and a distinct value has no row, so it
|
|
105
|
+
* cannot be instantiated to produce text for a filter list. The label therefore defaults to the
|
|
106
|
+
* server-computed cell text: a status rendered as a coloured pill lists `Active`, a rating
|
|
107
|
+
* rendered as stars lists `3`. This is the escape for when that is too raw — a value stored as
|
|
108
|
+
* `2` whose cell reads "High priority".
|
|
109
|
+
*
|
|
110
|
+
* ⚠️ A **pure function**: no DOM, no component instantiation, no row context. There is no row to
|
|
111
|
+
* give it, which is the whole reason the renderer itself cannot be used here.
|
|
112
|
+
*/
|
|
113
|
+
filterLabel?: (value: unknown) => string;
|
|
117
114
|
}
|
|
118
|
-
declare const SPARK_ATTRIBUTE_RENDERERS: InjectionToken<SparkAttributeRendererRegistration[]>;
|
|
115
|
+
export declare const SPARK_ATTRIBUTE_RENDERERS: InjectionToken<SparkAttributeRendererRegistration[]>;
|
|
119
116
|
/**
|
|
120
117
|
* Register custom attribute renderers globally.
|
|
121
118
|
*
|
|
@@ -125,7 +122,4 @@ declare const SPARK_ATTRIBUTE_RENDERERS: InjectionToken<SparkAttributeRendererRe
|
|
|
125
122
|
* { name: 'color-swatch', detailComponent: ColorDetailComponent, columnComponent: ColorColumnComponent },
|
|
126
123
|
* ])
|
|
127
124
|
*/
|
|
128
|
-
declare function provideSparkAttributeRenderers(renderers: SparkAttributeRendererRegistration[]): Provider;
|
|
129
|
-
|
|
130
|
-
export { SPARK_ATTRIBUTE_RENDERERS, cellValue, provideSparkAttributeRenderers, rendererValue, withDeclaredInputs };
|
|
131
|
-
export type { SparkAttributeColumnRenderer, SparkAttributeDetailRenderer, SparkAttributeEditRenderer, SparkAttributeRendererRegistration };
|
|
125
|
+
export declare function provideSparkAttributeRenderers(renderers: SparkAttributeRendererRegistration[]): Provider;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
|
|
1
|
+
import { Color } from "@mintplayer/ng-bootstrap";
|
|
2
|
+
import { RetryActionService } from "@mintplayer/ng-spark/services";
|
|
3
|
+
import { EntityType } from "@mintplayer/ng-spark/models";
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
6
5
|
/**
|
|
7
6
|
* Renders a retry-action popup. Before PRD §3 this component rendered title / message /
|
|
8
7
|
* option buttons only and silently forwarded the incoming <c>persistentObject</c> back to
|
|
@@ -12,32 +11,30 @@ import { EntityType } from '@mintplayer/ng-spark/models';
|
|
|
12
11
|
* field, and the values the user fills in flow back to the server via
|
|
13
12
|
* <c>RetryResult.PersistentObject</c>.
|
|
14
13
|
*/
|
|
15
|
-
declare class SparkRetryActionModalComponent {
|
|
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
|
-
export { SparkRetryActionModalComponent };
|
|
14
|
+
export declare class SparkRetryActionModalComponent {
|
|
15
|
+
protected readonly retryActionService: RetryActionService;
|
|
16
|
+
private readonly sparkService;
|
|
17
|
+
colors: typeof Color;
|
|
18
|
+
isOpen: import("@angular/core").Signal<boolean>;
|
|
19
|
+
/**
|
|
20
|
+
* EntityType definition for the incoming PO — fetched lazily via SparkService so the
|
|
21
|
+
* form knows which attributes are editable, their labels, rules, renderers, etc.
|
|
22
|
+
* `null` when the payload has no persistentObject or its objectTypeId doesn't match
|
|
23
|
+
* any registered entity type (renders the modal as a simple option picker).
|
|
24
|
+
*/
|
|
25
|
+
entityType: import("@angular/core").WritableSignal<EntityType | null>;
|
|
26
|
+
formData: import("@angular/core").WritableSignal<Record<string, any>>;
|
|
27
|
+
private allEntityTypes;
|
|
28
|
+
constructor();
|
|
29
|
+
private seedForm;
|
|
30
|
+
onOption(option: string): void;
|
|
31
|
+
/**
|
|
32
|
+
* Builds the PO the server sees under <c>Retry.Result.PersistentObject</c>. If the
|
|
33
|
+
* form resolved an EntityType, rebuild from the schema + formData (identical to the
|
|
34
|
+
* po-edit save path — AsDetail recursion included). Otherwise forward the incoming
|
|
35
|
+
* PO unmodified so pre-§3 flows without editable attributes keep working.
|
|
36
|
+
*/
|
|
37
|
+
private populatedPersistentObject;
|
|
38
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SparkRetryActionModalComponent, never>;
|
|
39
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SparkRetryActionModalComponent, "spark-retry-action-modal", never, {}, {}, never, never, true, never>;
|
|
40
|
+
}
|
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
import { Route, Routes } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
poDetail?: Route['loadComponent'];
|
|
1
|
+
import { Route, Routes } from "@angular/router";
|
|
2
|
+
export interface SparkRouteConfig {
|
|
3
|
+
queryList?: Route['loadComponent'];
|
|
4
|
+
poCreate?: Route['loadComponent'];
|
|
5
|
+
poEdit?: Route['loadComponent'];
|
|
6
|
+
poDetail?: Route['loadComponent'];
|
|
8
7
|
}
|
|
9
|
-
declare function sparkRoutes(config?: SparkRouteConfig): Routes;
|
|
10
|
-
|
|
11
|
-
export { sparkRoutes };
|
|
12
|
-
export type { SparkRouteConfig };
|
|
8
|
+
export declare function sparkRoutes(config?: SparkRouteConfig): Routes;
|