@masterteam/components 0.0.292 → 0.0.293
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/masterteam-components-business-fields.mjs +98 -15
- package/fesm2022/masterteam-components-business-fields.mjs.map +1 -1
- package/fesm2022/masterteam-components.mjs +8 -0
- package/fesm2022/masterteam-components.mjs.map +1 -1
- package/package.json +1 -1
- package/types/masterteam-components-business-fields.d.ts +46 -5
- package/types/masterteam-components.d.ts +8 -0
package/package.json
CHANGED
|
@@ -298,6 +298,12 @@ type EntityListAccess = 'Auto' | 'Read' | 'Write' | 'ReadWrite' | 'None';
|
|
|
298
298
|
interface EntityListSubmitValue {
|
|
299
299
|
propertyKey: string;
|
|
300
300
|
rawValue: string | null;
|
|
301
|
+
/**
|
|
302
|
+
* Backend-resolved display value for `rawValue`, present only on a loaded
|
|
303
|
+
* value's rendered rows (a user object, an attachment list, a formatted
|
|
304
|
+
* percentage). It is display-only and never submitted — see `emitValue`.
|
|
305
|
+
*/
|
|
306
|
+
value?: unknown;
|
|
301
307
|
}
|
|
302
308
|
/**
|
|
303
309
|
* A pending create/update row in the stored EntityList payload.
|
|
@@ -327,6 +333,14 @@ declare class EntityListField implements ControlValueAccessor {
|
|
|
327
333
|
readonly configuration: _angular_core.InputSignal<Record<string, unknown> | null>;
|
|
328
334
|
/** Runtime ids needed to call the read endpoint. */
|
|
329
335
|
readonly runtimeContext: _angular_core.InputSignal<EntityListFieldRuntimeContext | null>;
|
|
336
|
+
/**
|
|
337
|
+
* The bound value is an unapplied process submission — an Approval step's
|
|
338
|
+
* frozen create/update/delete operations — rather than a persisted record
|
|
339
|
+
* value. Its `rows[]` and `deletedIds` are pending intent the approver has
|
|
340
|
+
* to see staged over the loaded records, not markers of writes the backend
|
|
341
|
+
* already applied. See `.github/instructions/properties/EntityList.md`.
|
|
342
|
+
*/
|
|
343
|
+
readonly pendingSubmission: _angular_core.InputSignal<boolean>;
|
|
330
344
|
/**
|
|
331
345
|
* Full lookup catalog of the host form, forwarded to the add/edit dialog's
|
|
332
346
|
* nested form. `process-form-load` returns only the lookup *id* per field,
|
|
@@ -368,7 +382,16 @@ declare class EntityListField implements ControlValueAccessor {
|
|
|
368
382
|
* partial updates of existing records; `entityId = 0` rows are creates.
|
|
369
383
|
*/
|
|
370
384
|
private readonly pendingRows;
|
|
371
|
-
/** Existing entity ids the user removed
|
|
385
|
+
/** Existing entity ids the user removed in this session. */
|
|
386
|
+
private readonly stagedDeletedIds;
|
|
387
|
+
/** `deletedIds` carried by the loaded value, before they mean anything. */
|
|
388
|
+
private readonly loadedDeletedIds;
|
|
389
|
+
/**
|
|
390
|
+
* Delete intents that apply to the table right now. On a persisted value the
|
|
391
|
+
* loaded `deletedIds` are historical operation markers — the records are
|
|
392
|
+
* already gone — so only this session's removals count. On an unapplied
|
|
393
|
+
* submission they are deletes awaiting approval and must be staged too.
|
|
394
|
+
*/
|
|
372
395
|
private readonly deletedIds;
|
|
373
396
|
/** rowId → original form values / option labels (view state only). */
|
|
374
397
|
private readonly rowDrafts;
|
|
@@ -382,9 +405,18 @@ declare class EntityListField implements ControlValueAccessor {
|
|
|
382
405
|
/** Pending edits of existing rows, keyed by entity id. */
|
|
383
406
|
private readonly editedRowsByEntityId;
|
|
384
407
|
/**
|
|
385
|
-
*
|
|
386
|
-
*
|
|
387
|
-
*
|
|
408
|
+
* Whether the table stages pending operations over the loaded records.
|
|
409
|
+
*
|
|
410
|
+
* Editable write modes stage the user's own edits, and a read-only
|
|
411
|
+
* Write-only field has nothing but its stored rows to show. A pending
|
|
412
|
+
* submission stages them too even though it is read-only and `ReadWrite`:
|
|
413
|
+
* an approver reviewing a request has to see what it *will* do to the target
|
|
414
|
+
* module, not the records as they stand.
|
|
415
|
+
*/
|
|
416
|
+
private readonly showsPendingOperations;
|
|
417
|
+
/**
|
|
418
|
+
* Rows rendered in the table: existing rows merged with pending edits,
|
|
419
|
+
* removed rows hidden, and created rows appended.
|
|
388
420
|
*/
|
|
389
421
|
protected readonly displayRows: _angular_core.Signal<EntityListRow[]>;
|
|
390
422
|
protected readonly hasRows: _angular_core.Signal<boolean>;
|
|
@@ -472,6 +504,15 @@ declare class EntityListField implements ControlValueAccessor {
|
|
|
472
504
|
/** Backend `rawValue` is a serialized scalar; objects/arrays go as JSON. */
|
|
473
505
|
private toRawValue;
|
|
474
506
|
private toValueMap;
|
|
507
|
+
/**
|
|
508
|
+
* Backend-resolved display values of a loaded row, keyed like `toValueMap`.
|
|
509
|
+
*
|
|
510
|
+
* A row the user just added carries its labels in a `rowDrafts` entry, but a
|
|
511
|
+
* row that arrived on a loaded value has none — only what the backend
|
|
512
|
+
* rendered beside each `rawValue`. Without this the approver's table prints
|
|
513
|
+
* the stored scalar: a bare GUID where the assignee belongs.
|
|
514
|
+
*/
|
|
515
|
+
private toDisplayMap;
|
|
475
516
|
private dropEmptyValues;
|
|
476
517
|
/**
|
|
477
518
|
* Keys the user actually changed. A key that was empty before and is still
|
|
@@ -499,7 +540,7 @@ declare class EntityListField implements ControlValueAccessor {
|
|
|
499
540
|
private applyResponse;
|
|
500
541
|
private toEntityData;
|
|
501
542
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<EntityListField, never>;
|
|
502
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<EntityListField, "mt-entity-list-field", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "propertyId": { "alias": "propertyId"; "required": false; "isSignal": true; }; "configuration": { "alias": "configuration"; "required": false; "isSignal": true; }; "runtimeContext": { "alias": "runtimeContext"; "required": false; "isSignal": true; }; "lookups": { "alias": "lookups"; "required": false; "isSignal": true; }; "context": { "alias": "context"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
543
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<EntityListField, "mt-entity-list-field", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "propertyId": { "alias": "propertyId"; "required": false; "isSignal": true; }; "configuration": { "alias": "configuration"; "required": false; "isSignal": true; }; "runtimeContext": { "alias": "runtimeContext"; "required": false; "isSignal": true; }; "pendingSubmission": { "alias": "pendingSubmission"; "required": false; "isSignal": true; }; "lookups": { "alias": "lookups"; "required": false; "isSignal": true; }; "context": { "alias": "context"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
503
544
|
}
|
|
504
545
|
|
|
505
546
|
/** Inputs the EntityList add-row dialog will receive via ModalService inputValues. */
|
|
@@ -742,12 +742,20 @@ declare class EntityListFieldConfig extends BaseFieldConfig {
|
|
|
742
742
|
*/
|
|
743
743
|
lookups: unknown[];
|
|
744
744
|
context: HttpContext | undefined;
|
|
745
|
+
/**
|
|
746
|
+
* The bound value is an unapplied process submission — an Approval step's
|
|
747
|
+
* frozen create/update/delete operations — rather than a persisted record
|
|
748
|
+
* value. Its `rows[]` and `deletedIds` are pending intent to overlay on the
|
|
749
|
+
* loaded records, not markers of writes the backend already applied.
|
|
750
|
+
*/
|
|
751
|
+
pendingSubmission: boolean;
|
|
745
752
|
constructor(config: Omit<BaseFieldConstructorConfig, 'type'> & {
|
|
746
753
|
propertyId?: number | null;
|
|
747
754
|
configuration?: any;
|
|
748
755
|
runtimeContext?: EntityListFieldRuntimeContext | null;
|
|
749
756
|
lookups?: unknown[];
|
|
750
757
|
context?: HttpContext | undefined;
|
|
758
|
+
pendingSubmission?: boolean;
|
|
751
759
|
});
|
|
752
760
|
}
|
|
753
761
|
interface ScheduleItemSelectorFieldRuntimeContext {
|