@masterteam/components 0.0.298 → 0.0.299
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/package.json
CHANGED
|
@@ -493,10 +493,18 @@ interface EntityScheduleItemValue {
|
|
|
493
493
|
moduleKey?: string;
|
|
494
494
|
itemType?: string;
|
|
495
495
|
}
|
|
496
|
-
/** One cell of an `EntityList` row.
|
|
496
|
+
/** One cell of an `EntityList` row. `rawValue` is always sent as a string. */
|
|
497
497
|
interface EntityListValueItem {
|
|
498
498
|
propertyKey: string;
|
|
499
499
|
rawValue?: string | null;
|
|
500
|
+
/**
|
|
501
|
+
* The backend's resolved counterpart of `rawValue` — a user object, a
|
|
502
|
+
* formatted date. `process-form-load` emits it beside every row value (see
|
|
503
|
+
* `toDisplayMap` in `mt-entity-list-field`); the `fetch` Card projection
|
|
504
|
+
* currently does not, which is why a snapshot-backed preview renders the
|
|
505
|
+
* stored id. Read when present so that stays a backend-only fix.
|
|
506
|
+
*/
|
|
507
|
+
value?: unknown;
|
|
500
508
|
}
|
|
501
509
|
/** One row of an `EntityList` value. */
|
|
502
510
|
interface EntityListRowValue {
|
|
@@ -505,13 +513,26 @@ interface EntityListRowValue {
|
|
|
505
513
|
values?: EntityListValueItem[];
|
|
506
514
|
}
|
|
507
515
|
/**
|
|
508
|
-
* The stored `EntityList` payload, as the backend renders it.
|
|
509
|
-
*
|
|
510
|
-
*
|
|
516
|
+
* The stored `EntityList` payload, as the backend renders it.
|
|
517
|
+
*
|
|
518
|
+
* Two parts carry displayable rows, and which one holds them depends on the
|
|
519
|
+
* source. An inline list keeps its rows in `rows`; a **module-backed** list
|
|
520
|
+
* keeps the linked target records in `snapshot.entities` and uses `rows` only
|
|
521
|
+
* for creates/updates the backend has not applied yet. Reading `rows` alone
|
|
522
|
+
* therefore shows nothing for the common module case — see
|
|
523
|
+
* `buildEntityListRows`, which merges the two.
|
|
524
|
+
*
|
|
525
|
+
* `entityIds` and the operation-marker arrays exist for the writable runtime,
|
|
526
|
+
* not for reading.
|
|
511
527
|
*/
|
|
512
528
|
interface EntityListEntityValue {
|
|
513
529
|
entityIds?: number[];
|
|
514
530
|
rows?: EntityListRowValue[];
|
|
531
|
+
/** Preserved values of the linked target records, for module-backed lists. */
|
|
532
|
+
snapshot?: {
|
|
533
|
+
takenAt?: string | null;
|
|
534
|
+
entities?: EntityListRowValue[];
|
|
535
|
+
};
|
|
515
536
|
}
|
|
516
537
|
/**
|
|
517
538
|
* One field definition of an inline `EntityList`, from its property
|
|
@@ -524,6 +545,13 @@ interface EntityListInlineFieldMeta {
|
|
|
524
545
|
order?: number;
|
|
525
546
|
required?: boolean;
|
|
526
547
|
configuration?: EntityPropertyConfiguration;
|
|
548
|
+
/**
|
|
549
|
+
* Display label. Absent on a genuine `inlineFields` entry — inline
|
|
550
|
+
* configuration has no labels, which is what `humanizeEntityListKey` exists
|
|
551
|
+
* for. Set when the columns are derived from `catalog.nestedProperties`,
|
|
552
|
+
* whose entries carry the target module's own label.
|
|
553
|
+
*/
|
|
554
|
+
label?: string;
|
|
527
555
|
}
|
|
528
556
|
/**
|
|
529
557
|
* Catalog metadata for a property nested inside another property's value.
|
|
@@ -1067,11 +1095,17 @@ declare function humanizeEntityListKey(key: string): string;
|
|
|
1067
1095
|
/**
|
|
1068
1096
|
* Turns an `EntityList` entity into rendered rows.
|
|
1069
1097
|
*
|
|
1070
|
-
* Nothing is fetched
|
|
1071
|
-
*
|
|
1072
|
-
*
|
|
1073
|
-
*
|
|
1074
|
-
*
|
|
1098
|
+
* Nothing is fetched. The value carries the rows — in `rows` for an inline
|
|
1099
|
+
* list, in `snapshot.entities` for a module-backed one, see `displayRowsOf` —
|
|
1100
|
+
* and the columns are described by the property configuration's
|
|
1101
|
+
* `inlineFields`, since the rows themselves carry bare keys. A module list has
|
|
1102
|
+
* no `inlineFields`, so its columns are derived from the keys present and
|
|
1103
|
+
* ordered by `readFields`; that yields humanized labels and plain text rather
|
|
1104
|
+
* than the target module's own labels and view types, which only that module's
|
|
1105
|
+
* catalog knows and this renderer never loads.
|
|
1106
|
+
*
|
|
1107
|
+
* Shared by the trigger (`mt-entity-list-preview`, which needs the count and
|
|
1108
|
+
* the titles) and the drawer that renders them in full.
|
|
1075
1109
|
*
|
|
1076
1110
|
* `allowed` narrows to those keys, in that order; empty renders every field
|
|
1077
1111
|
* that survives the companion and identifier rules.
|
|
@@ -1460,7 +1494,7 @@ declare class EntityPreview {
|
|
|
1460
1494
|
* `mt-entity-preview` usages in the app.
|
|
1461
1495
|
*/
|
|
1462
1496
|
readonly infoText: _angular_core.Signal<string>;
|
|
1463
|
-
readonly comparisonKind: _angular_core.Signal<"
|
|
1497
|
+
readonly comparisonKind: _angular_core.Signal<"EntityList" | "Value" | null>;
|
|
1464
1498
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<EntityPreview, never>;
|
|
1465
1499
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<EntityPreview, "mt-entity-preview", never, { "data": { "alias": "data"; "required": true; "isSignal": true; }; "attachmentShape": { "alias": "attachmentShape"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1466
1500
|
}
|