@mintplayer/ng-spark 22.27.0 → 22.28.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/fesm2022/mintplayer-ng-spark-grid.mjs +5 -9
- package/fesm2022/mintplayer-ng-spark-grid.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-spark-history.mjs +1 -1
- package/fesm2022/mintplayer-ng-spark-history.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-spark-models.mjs +3 -3
- package/fesm2022/mintplayer-ng-spark-models.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-spark-moderation.mjs +1 -1
- package/fesm2022/mintplayer-ng-spark-moderation.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-spark-pipes.mjs +5 -2
- package/fesm2022/mintplayer-ng-spark-pipes.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-spark-po-create.mjs +13 -5
- package/fesm2022/mintplayer-ng-spark-po-create.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-spark-po-detail.mjs +2 -1
- package/fesm2022/mintplayer-ng-spark-po-detail.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-spark-po-edit.mjs +38 -13
- package/fesm2022/mintplayer-ng-spark-po-edit.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-spark-po-form.mjs +3 -3
- package/fesm2022/mintplayer-ng-spark-po-form.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-spark-renderers.mjs +2 -1
- package/fesm2022/mintplayer-ng-spark-renderers.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-spark-retry-action-modal.mjs +0 -1
- package/fesm2022/mintplayer-ng-spark-retry-action-modal.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-spark-services.mjs +3 -2
- package/fesm2022/mintplayer-ng-spark-services.mjs.map +1 -1
- package/package.json +1 -1
- package/types/mintplayer-ng-spark-grid.d.ts +3 -14
- package/types/mintplayer-ng-spark-models.d.ts +13 -13
- package/types/mintplayer-ng-spark-moderation.d.ts +8 -4
- package/types/mintplayer-ng-spark-pipes.d.ts +3 -0
- package/types/mintplayer-ng-spark-po-create.d.ts +4 -0
- package/types/mintplayer-ng-spark-po-detail.d.ts +4 -0
- package/types/mintplayer-ng-spark-po-edit.d.ts +16 -0
- package/types/mintplayer-ng-spark-po-form.d.ts +1 -0
- package/types/mintplayer-ng-spark-services.d.ts +5 -1
|
@@ -141,9 +141,9 @@ export declare class SparkModerationService {
|
|
|
141
141
|
}>;
|
|
142
142
|
/**
|
|
143
143
|
* The caller's own reputation, shared by every caller in flight at once: the badge and the
|
|
144
|
-
* review-queue link both re-read on the same navigation and cost one request.
|
|
144
|
+
* review-queue link both re-read on the same navigation and cost one request. `null` signed out.
|
|
145
145
|
*/
|
|
146
|
-
ownReputation(): Promise<ModerationReputation>;
|
|
146
|
+
ownReputation(): Promise<ModerationReputation | null>;
|
|
147
147
|
/** Casts (+1 / −1) or withdraws (0) the caller's vote; resolves to the target's new state. */
|
|
148
148
|
vote(type: string, id: string, direction: -1 | 0 | 1): Promise<ModerationVoteState>;
|
|
149
149
|
/**
|
|
@@ -159,8 +159,12 @@ export declare class SparkModerationService {
|
|
|
159
159
|
unlock(type: string, id: string): Promise<void>;
|
|
160
160
|
/** What the moderator panel shows about a target, including which tools the caller holds. */
|
|
161
161
|
status(type: string, id: string): Promise<ModerationStatus>;
|
|
162
|
-
/**
|
|
163
|
-
|
|
162
|
+
/**
|
|
163
|
+
* A user's reputation; the caller's own when `userId` is omitted (with privileges and suspension).
|
|
164
|
+
* `null` for an anonymous caller: the server answers it 200 with no result rather than 401, so a
|
|
165
|
+
* badge on a page anyone may read never sends the app to the sign-in page.
|
|
166
|
+
*/
|
|
167
|
+
reputation(userId?: string): Promise<ModerationReputation | null>;
|
|
164
168
|
/** The caller's own ledger, newest first. Voters are never named; a reversal reads "Voting corrected (−N)". */
|
|
165
169
|
history(take?: number): Promise<ModerationReputationLine[]>;
|
|
166
170
|
cases(status?: string, skip?: number, take?: number): Promise<ModerationCaseSummary[]>;
|
|
@@ -117,6 +117,9 @@ export declare class AsDetailTypePipe implements PipeTransform {
|
|
|
117
117
|
/**
|
|
118
118
|
* The columns of an AsDetail table: the row type's visible attributes, in order — minus those a
|
|
119
119
|
* registered row renderer draws (`rowComponent`), when the host passes its renderer registry.
|
|
120
|
+
*
|
|
121
|
+
* An attribute the row type's model draws nowhere (`showedOn: None`, #264) is not a column. Columns are per
|
|
122
|
+
* type, so they come from the model; a runtime `showedOn` on one row cannot add or remove a column.
|
|
120
123
|
*/
|
|
121
124
|
export declare class AsDetailColumnsPipe implements PipeTransform {
|
|
122
125
|
transform(attr: EntityAttributeDefinition, asDetailTypes: Record<string, EntityType>, renderers?: readonly SparkAttributeRendererRegistration[] | null): EntityAttributeDefinition[];
|
|
@@ -16,6 +16,10 @@ export declare class SparkPoCreateComponent {
|
|
|
16
16
|
validationErrors: import("@angular/core").WritableSignal<ValidationError[]>;
|
|
17
17
|
isSaving: import("@angular/core").WritableSignal<boolean>;
|
|
18
18
|
private allEntityTypes;
|
|
19
|
+
/**
|
|
20
|
+
* The errors the form cannot show next to a field: those with no attribute, and those on an attribute the
|
|
21
|
+
* form does not draw (#264, G6). Those used to be swallowed; Vidyano promotes them to a notification too.
|
|
22
|
+
*/
|
|
19
23
|
generalErrors: import("@angular/core").Signal<ValidationError[]>;
|
|
20
24
|
/**
|
|
21
25
|
* The parent a sub-query card's New passed in the URL (`parentId`, `parentType`, `queryId`), or
|
|
@@ -108,6 +108,10 @@ export declare class SparkPoDetailComponent {
|
|
|
108
108
|
private loadItem;
|
|
109
109
|
/** (Re)loads the object, its type, rights and actions. Also what add-ons call via `context.reload()`. */
|
|
110
110
|
load(): Promise<void>;
|
|
111
|
+
/**
|
|
112
|
+
* Drawn from the loaded object's own `showedOn`, falling back to the model's (#264, G-Q3): an action sets
|
|
113
|
+
* it per object in `OnLoadAsync` — a stolen car's police report number is shown, the model says `None`.
|
|
114
|
+
*/
|
|
111
115
|
visibleAttributes: import("@angular/core").Signal<EntityAttributeDefinition[]>;
|
|
112
116
|
private static readonly DEFAULT_TAB;
|
|
113
117
|
ungroupedAttributes: import("@angular/core").Signal<EntityAttributeDefinition[]>;
|
|
@@ -147,6 +147,11 @@ export declare class SparkPoEditComponent {
|
|
|
147
147
|
* is not the question's author edits only its translations; the server drops the rest from the
|
|
148
148
|
* save anyway). Shared by the form and {@link getEditableAttributes}, so what is drawn, what is
|
|
149
149
|
* initialised and what is saved agree. A refresh overlay can still lift it.
|
|
150
|
+
* <para>
|
|
151
|
+
* The same goes for where an attribute is drawn and whether it is required (#264, G5/G7): an action
|
|
152
|
+
* sets the runtime `showedOn`/`isRequired` in `OnLoadAsync` (a stolen car shows its police report
|
|
153
|
+
* number, required), and the form honours that from its first render rather than after a refresh.
|
|
154
|
+
* </para>
|
|
150
155
|
*/
|
|
151
156
|
formEntityType: import("@angular/core").Signal<EntityType | null>;
|
|
152
157
|
type: string;
|
|
@@ -160,6 +165,10 @@ export declare class SparkPoEditComponent {
|
|
|
160
165
|
validationErrors: import("@angular/core").WritableSignal<ValidationError[]>;
|
|
161
166
|
isSaving: import("@angular/core").WritableSignal<boolean>;
|
|
162
167
|
private allEntityTypes;
|
|
168
|
+
/**
|
|
169
|
+
* The errors the form cannot show next to a field: those with no attribute, and those on an attribute the
|
|
170
|
+
* form does not draw (#264, G6). Those used to be swallowed; Vidyano promotes them to a notification too.
|
|
171
|
+
*/
|
|
163
172
|
generalErrors: import("@angular/core").Signal<ValidationError[]>;
|
|
164
173
|
/** After a 409 was merged: what they changed, and that nothing has been saved yet. */
|
|
165
174
|
private readonly conflictNoticeText;
|
|
@@ -212,6 +221,13 @@ export declare class SparkPoEditComponent {
|
|
|
212
221
|
* then dropped on the floor and refused by the server as missing — with no way out of the form.
|
|
213
222
|
* The overlay is the form's, bound two-way, so the two halves cannot drift again.
|
|
214
223
|
*/
|
|
224
|
+
/**
|
|
225
|
+
* The attributes {@link formDataFrom} gives a slot: the editable ones, plus those the model makes editable
|
|
226
|
+
* but this object's load made read-only (#264). A refresh can lift a load-time `isReadOnly` (a stolen car's
|
|
227
|
+
* plate, once the car is back in use), and the control must then show the loaded value, not an empty
|
|
228
|
+
* required field. Only {@link getEditableAttributes} decides what is saved, so a slot alone sends nothing.
|
|
229
|
+
*/
|
|
230
|
+
private formDataAttributes;
|
|
215
231
|
getEditableAttributes(): import("@mintplayer/ng-spark/models").EntityAttributeDefinition[];
|
|
216
232
|
onSave(): Promise<void>;
|
|
217
233
|
onCancel(): void;
|
|
@@ -514,6 +514,7 @@ export declare class SparkReferencePickerComponent {
|
|
|
514
514
|
pagination: import("@angular/core").WritableSignal<PaginationResponse<QueryResultItem> | undefined>;
|
|
515
515
|
settings: import("@angular/core").WritableSignal<DatatableSettings>;
|
|
516
516
|
searchTerm: string;
|
|
517
|
+
/** The picker lists query rows, so its columns are the query's: `showedOn` includes Query (#264; not None). */
|
|
517
518
|
visibleAttributes: import("@angular/core").Signal<import("@mintplayer/ng-spark/models").EntityAttributeDefinition[]>;
|
|
518
519
|
rows: import("@angular/core").Signal<QueryResultItem[]>;
|
|
519
520
|
displayValue: import("@angular/core").Signal<string>;
|
|
@@ -103,7 +103,11 @@ export declare class SparkService {
|
|
|
103
103
|
private static readonly MAX_RETRY_DEPTH;
|
|
104
104
|
private readonly dispatcher;
|
|
105
105
|
getEntityTypes(): Promise<EntityType[]>;
|
|
106
|
-
|
|
106
|
+
/**
|
|
107
|
+
* One entity type, shaped by the caller's attribute rights. `purpose` narrows it for one form (#264, G1/G2):
|
|
108
|
+
* `'new'` leaves out what the caller may not create and does not apply edit-only denies.
|
|
109
|
+
*/
|
|
110
|
+
getEntityType(id: string, purpose?: 'new' | 'edit' | 'read'): Promise<EntityType>;
|
|
107
111
|
getEntityTypeByClrType(clrType: string): Promise<EntityType | undefined>;
|
|
108
112
|
getPermissions(entityTypeId: string): Promise<EntityPermissions>;
|
|
109
113
|
getQueries(): Promise<SparkQuery[]>;
|