@masterteam/components 0.0.302 → 0.0.304

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@masterteam/components",
3
- "version": "0.0.302",
3
+ "version": "0.0.304",
4
4
  "publishConfig": {
5
5
  "directory": "../../../dist/masterteam/components",
6
6
  "linkDirectory": true,
@@ -375,6 +375,17 @@ interface EntityListStoredValue {
375
375
  deletedIds?: number[];
376
376
  snapshot?: unknown;
377
377
  rows?: EntityListSubmitRow[];
378
+ /**
379
+ * The versioned Related protocol: the parent-owned list version the value
380
+ * was loaded at, one UUID per intended change, and an opaque server token
381
+ * per existing target the change edits or deletes. The form load sends
382
+ * `version` and `expectedVersions`, with `mutationId` empty.
383
+ */
384
+ version?: number;
385
+ mutationId?: string;
386
+ expectedVersions?: Record<string, string>;
387
+ /** Response-only current rows of the targets; never submitted. */
388
+ live?: unknown;
378
389
  }
379
390
  declare class EntityListField implements ControlValueAccessor {
380
391
  readonly label: _angular_core.InputSignal<string>;
@@ -386,6 +397,11 @@ declare class EntityListField implements ControlValueAccessor {
386
397
  * effective configuration.
387
398
  */
388
399
  readonly propertyId: _angular_core.InputSignal<number | null>;
400
+ /**
401
+ * EntityList property key. A Selected list's picker loads its candidates
402
+ * from `forms/options/{propertyKey}`; no other mode reads it.
403
+ */
404
+ readonly propertyKey: _angular_core.InputSignal<string>;
389
405
  /**
390
406
  * Stored property configuration (sourceType, moduleId, access, readFields …).
391
407
  *
@@ -482,6 +498,13 @@ declare class EntityListField implements ControlValueAccessor {
482
498
  * value keys.
483
499
  */
484
500
  protected readonly writeFields: _angular_core.Signal<string[]>;
501
+ /**
502
+ * Write fields a new row must fill: the target's required, non-calculated
503
+ * properties. The backend rejects a create row without any of them
504
+ * (`entity_list.required_field_missing`), while the target module's form —
505
+ * which the add dialog renders — may mark fewer required.
506
+ */
507
+ private readonly createRequiredFields;
485
508
  /**
486
509
  * Pending create/update rows, in the exact shape persisted by the backend
487
510
  * (`rows[]` of the stored EntityList JSON). Rows with `entityId > 0` are
@@ -639,6 +662,74 @@ declare class EntityListField implements ControlValueAccessor {
639
662
  * `allowCreate`; a loaded row follows `allowEdit` / `allowDelete`.
640
663
  */
641
664
  protected readonly localRowActions: _angular_core.Signal<TableAction[]>;
665
+ /** Loaded selection plus this session's picks; see `SelectionEditorState`. */
666
+ private readonly selectionState;
667
+ /** The bound value was a Selected document, whatever the metadata says yet. */
668
+ private readonly selectionValueSeen;
669
+ /** The last Selected value emitted, so its echo does not reset the picks. */
670
+ private lastSelectionEmit;
671
+ /**
672
+ * The list holds only the records the user picked. It never falls back to
673
+ * every related record: an empty selection is empty. Known from the
674
+ * metadata, or earlier from the value itself.
675
+ */
676
+ protected readonly selectionMode: _angular_core.Signal<boolean>;
677
+ /** Render once the metadata answered: it is the access boundary. */
678
+ protected readonly selectionReady: _angular_core.Signal<boolean>;
679
+ private readonly selectionMultiple;
680
+ /**
681
+ * The picker's `contextKey`: the context of the form that owns the property
682
+ * — never the source module, which the backend resolves from the property's
683
+ * own configuration.
684
+ */
685
+ private readonly selectionContextKey;
686
+ /**
687
+ * Whether the user may change which records are selected. That is the
688
+ * form's call — `readonly`, from the field's `isWrite` — and not the
689
+ * metadata's `access` or its `allow*` switches: those describe the source
690
+ * records, which selecting never writes.
691
+ */
692
+ protected readonly selectionWritable: _angular_core.Signal<boolean>;
693
+ /**
694
+ * The selected records as table rows, in selection order.
695
+ *
696
+ * A saved record renders from the backend's `records`, cell by cell against
697
+ * the metadata columns — the same cells a related list shows. A record
698
+ * picked in this session renders the display values its option carried
699
+ * (`metadataJson`) the same way; an older backend sends none, and the row
700
+ * then shows its name and "Shown after saving". A record in `unavailableIds` was
701
+ * deleted or is no longer visible: the backend keeps it selected but
702
+ * withholds its values, and the row says so, so the user can remove it.
703
+ */
704
+ protected readonly selectionRows: _angular_core.Signal<EntityListRow[]>;
705
+ protected readonly selectionRowActions: _angular_core.Signal<TableAction[]>;
706
+ /**
707
+ * A required Selected list needs a record. An emptied selection is an
708
+ * object — a mutation with no ids — so `Validators.required` passes it and
709
+ * only the backend would object (`entity_list.selection_required`).
710
+ */
711
+ private readonly selectionRequiredValidator;
712
+ protected openSelectionDialog(): void;
713
+ /**
714
+ * Publish the selection as the control's value: a mutation when it differs
715
+ * from what was loaded, else the loaded value, which the submission leaves
716
+ * out. See `buildSelectionValue`.
717
+ */
718
+ private emitSelection;
719
+ /**
720
+ * Take a Selected document, and say whether it was one.
721
+ *
722
+ * Our own emission echoed back keeps the session; a value some instance of
723
+ * this field emitted restores that instance's state (see
724
+ * `SELECTION_EDITOR_STATES`); anything else starts a session on it. That is
725
+ * the projection `process-form-load` returns, the stored document a preview
726
+ * gets from the fetch endpoints, or a mutation the form already held — which
727
+ * stays the control's value until the user changes the selection.
728
+ *
729
+ * An empty value resets the session too and still falls through, since
730
+ * which mode the list uses may not be known yet.
731
+ */
732
+ private writeSelectionValue;
642
733
  /** Enough context to ask the backend what this field should render. */
643
734
  protected readonly hasRequiredContext: _angular_core.Signal<boolean>;
644
735
  /**
@@ -680,9 +771,10 @@ declare class EntityListField implements ControlValueAccessor {
680
771
  * - A value some instance of this field emitted restores that instance's
681
772
  * state — see `LOCAL_EDITOR_STATES`.
682
773
  * - A document the backend sent starts a fresh session on it: the projection
683
- * `process-form-load` returns (its `schema` set, cells rendered), or the
684
- * stored document the fetch endpoints return for a preview (`schema:
685
- * null`, cells unrendered) — the schema then comes from the metadata.
774
+ * `process-form-load` and the fetch endpoints return (its `schema` set,
775
+ * cells rendered), or the stored document an older backend's fetch
776
+ * endpoints returned (`schema: null`, cells unrendered) — the schema then
777
+ * comes from the metadata.
686
778
  * Every backend document carries the `schema` member, null or not; a
687
779
  * mutation never does. So a mutation nobody here emitted has no rows to
688
780
  * rebuild the table from and is left as the control's value, untouched
@@ -769,9 +861,9 @@ declare class EntityListField implements ControlValueAccessor {
769
861
  private buildLocalDraftCell;
770
862
  /**
771
863
  * A loaded cell: the backend's rendered `value` beside its `rawValue`. A
772
- * stored document from the fetch endpoints has no rendered values, so the
773
- * raw one is shaped the way a locally set cell would be — a user id still
774
- * renders as a user, though only as its id until the backend renders it.
864
+ * stored document (what an older backend's fetch endpoints returned) has no
865
+ * rendered values, so the raw one is shaped the way a locally set cell would
866
+ * be — a user id still renders as a user, though only as its id.
775
867
  */
776
868
  private buildLocalLoadedCell;
777
869
  /**
@@ -811,6 +903,17 @@ declare class EntityListField implements ControlValueAccessor {
811
903
  */
812
904
  private toLocalEntityValue;
813
905
  private emitValue;
906
+ /**
907
+ * The id of the change a Related list's value carries. The backend rejects
908
+ * a Related change without one (`entity_list.invalid_payload`), and the form
909
+ * load sends it empty — so a value with rows or deletions gets its own: the
910
+ * same while the change is (a retry of the same save), a new one when it
911
+ * differs, since reusing an id for other content is refused
912
+ * (`entity_list.linked_mutation_reused`). A value with nothing to apply keeps
913
+ * what it loaded with; the backend skips it.
914
+ */
915
+ private linkedMutation;
916
+ private linkedMutationId;
814
917
  /**
815
918
  * `values[]` entries, restricted to `writeFields` when configured.
816
919
  *
@@ -894,7 +997,7 @@ declare class EntityListField implements ControlValueAccessor {
894
997
  private applyRecords;
895
998
  private toEntityData;
896
999
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<EntityListField, never>;
897
- 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; }; "initialValue": { "alias": "initialValue"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
1000
+ 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; }; "propertyKey": { "alias": "propertyKey"; "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; }; "initialValue": { "alias": "initialValue"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
898
1001
  }
899
1002
 
900
1003
  /** Inputs the EntityList add-row dialog will receive via ModalService inputValues. */
@@ -38,6 +38,56 @@ interface EntityListComparison {
38
38
  }
39
39
  type PropertyValueComparison = ValueComparison | EntityListComparison;
40
40
 
41
+ /**
42
+ * The runtime ids an entity renderer needs to fetch anything of its own.
43
+ *
44
+ * A rendered `EntityData` describes one *value*; it carries no idea of which
45
+ * level or level-data row it was read from. Most view types never need one —
46
+ * the value is the whole answer. `EntityList` is the exception: a module-backed
47
+ * list's rows live in another module and are scoped by the owning level-data
48
+ * row, so the renderer cannot resolve them from the value alone.
49
+ *
50
+ * Hosts that know these ids publish them through `EntityRuntimeContextStore`;
51
+ * hosts that do not simply leave it unprovided and every renderer keeps its
52
+ * value-only behaviour.
53
+ */
54
+ interface EntityRuntimeContext {
55
+ /** Owning level id — addresses the per-level configuration override. */
56
+ levelId?: number | string | null;
57
+ /** Owning level-data row — what related records are scoped to. */
58
+ levelDataId?: number | string | null;
59
+ }
60
+ /**
61
+ * Publishes an `EntityRuntimeContext` to a subtree of entity renderers.
62
+ *
63
+ * Deliberately **not** `providedIn: 'root'`: an unprovided store is the signal
64
+ * that the host has no runtime context, and every consumer injects it
65
+ * `{ optional: true }`. Providing it on a component scopes it to that
66
+ * component's view — which is also how a nested renderer shuts the context
67
+ * off for its own children (see `EntityListField`, whose table cells must not
68
+ * re-enter the fetching path).
69
+ */
70
+ declare class EntityRuntimeContextStore {
71
+ readonly context: _angular_core.WritableSignal<EntityRuntimeContext | null>;
72
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<EntityRuntimeContextStore, never>;
73
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<EntityRuntimeContextStore>;
74
+ }
75
+ /**
76
+ * The component `mt-entity-list-preview` renders inline instead of its
77
+ * count-and-drawer trigger, when a runtime context is available.
78
+ *
79
+ * Indirection rather than a direct import because the real renderer is
80
+ * `mt-entity-list-field` (`@masterteam/components/business-fields`), which
81
+ * builds on `mt-table` — and `table` already imports `entities`, so importing
82
+ * it back here would make the two entry points circular. The provider lives
83
+ * with the component: `provideEntityListTablePreview()`.
84
+ *
85
+ * The component is created with `NgComponentOutlet` and receives
86
+ * `propertyId`, `runtimeContext`, `configuration`, `initialValue`, `readonly`
87
+ * and `label` as inputs.
88
+ */
89
+ declare const ENTITY_LIST_TABLE_COMPONENT: InjectionToken<Type<unknown>>;
90
+
41
91
  type EntityViewType = 'Text' | 'LongText' | 'Date' | 'DateTime'
42
92
  /**
43
93
  * Time-of-day. The value on the wire is still a full ISO instant (the
@@ -601,6 +651,42 @@ interface EntityListLocalDocument {
601
651
  }
602
652
  /** Whether a stored or rendered `EntityList` value is a Local document. */
603
653
  declare function isEntityListLocalDocument(value: unknown): value is EntityListLocalDocument;
654
+ /** One source value of a selected record: stored scalar plus rendered value. */
655
+ interface EntityListSelectionRecordValue {
656
+ propertyKey: string;
657
+ rawValue?: string | null;
658
+ value?: unknown;
659
+ }
660
+ /** A selected source record, with the configured read fields' values. */
661
+ interface EntityListSelectionRecord {
662
+ entityId: number;
663
+ values: EntityListSelectionRecordValue[];
664
+ }
665
+ /**
666
+ * A Selected `EntityList` value (`recordMode: "Selected"`): the source records
667
+ * the user picked, by id. Selecting never creates, edits or deletes a source
668
+ * record.
669
+ *
670
+ * Arrives from `process-form-load` as the projected document — `records`
671
+ * rendered for display, `unavailableIds` for chosen records the user can no
672
+ * longer see — and leaves as a *mutation* carrying only `recordMode`,
673
+ * `version`, `mutationId` and the full replacement `entityIds`. See
674
+ * `.github/instructions/properties/EntityList.md`.
675
+ */
676
+ interface EntityListSelectionDocument {
677
+ recordMode: 'Selected';
678
+ version: number;
679
+ mutationId?: string;
680
+ entityIds: number[];
681
+ /** Response-only: the selected records, rendered for display. */
682
+ records?: EntityListSelectionRecord[];
683
+ /** Response-only: server-captured values; never replayed as a write. */
684
+ snapshot?: unknown;
685
+ /** Response-only: chosen ids whose record is deleted or no longer visible. */
686
+ unavailableIds?: number[];
687
+ }
688
+ /** Whether a stored or rendered `EntityList` value is a Selected document. */
689
+ declare function isEntityListSelectionDocument(value: unknown): value is EntityListSelectionDocument;
604
690
  /**
605
691
  * One field definition of an inline `EntityList`, from its property
606
692
  * configuration's `inlineFields`. This is the only description of the nested
@@ -665,6 +751,12 @@ interface EntityData {
665
751
  configuration?: EntityConfiguration;
666
752
  /** Present on submitted ChangeRequest records — frozen old→new snapshot. */
667
753
  comparison?: PropertyValueComparison;
754
+ /**
755
+ * The record's runtime ids, set by a host that renders the value outside
756
+ * any `EntityRuntimeContextStore` — a table cell. `EntityList` reads it to
757
+ * render its full list in the drawer, as a record preview does inline.
758
+ */
759
+ runtimeContext?: EntityRuntimeContext | null;
668
760
  }
669
761
  /** Emitted when an entity is resized via the drag handle */
670
762
  interface EntityResizeEvent {
@@ -746,56 +838,6 @@ declare function resolveEntityLabelPosition(configuration?: EntityConfiguration
746
838
  */
747
839
  declare function normalizeNumerals(input: string): string;
748
840
 
749
- /**
750
- * The runtime ids an entity renderer needs to fetch anything of its own.
751
- *
752
- * A rendered `EntityData` describes one *value*; it carries no idea of which
753
- * level or level-data row it was read from. Most view types never need one —
754
- * the value is the whole answer. `EntityList` is the exception: a module-backed
755
- * list's rows live in another module and are scoped by the owning level-data
756
- * row, so the renderer cannot resolve them from the value alone.
757
- *
758
- * Hosts that know these ids publish them through `EntityRuntimeContextStore`;
759
- * hosts that do not simply leave it unprovided and every renderer keeps its
760
- * value-only behaviour.
761
- */
762
- interface EntityRuntimeContext {
763
- /** Owning level id — addresses the per-level configuration override. */
764
- levelId?: number | string | null;
765
- /** Owning level-data row — what related records are scoped to. */
766
- levelDataId?: number | string | null;
767
- }
768
- /**
769
- * Publishes an `EntityRuntimeContext` to a subtree of entity renderers.
770
- *
771
- * Deliberately **not** `providedIn: 'root'`: an unprovided store is the signal
772
- * that the host has no runtime context, and every consumer injects it
773
- * `{ optional: true }`. Providing it on a component scopes it to that
774
- * component's view — which is also how a nested renderer shuts the context
775
- * off for its own children (see `EntityListField`, whose table cells must not
776
- * re-enter the fetching path).
777
- */
778
- declare class EntityRuntimeContextStore {
779
- readonly context: _angular_core.WritableSignal<EntityRuntimeContext | null>;
780
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<EntityRuntimeContextStore, never>;
781
- static ɵprov: _angular_core.ɵɵInjectableDeclaration<EntityRuntimeContextStore>;
782
- }
783
- /**
784
- * The component `mt-entity-list-preview` renders inline instead of its
785
- * count-and-drawer trigger, when a runtime context is available.
786
- *
787
- * Indirection rather than a direct import because the real renderer is
788
- * `mt-entity-list-field` (`@masterteam/components/business-fields`), which
789
- * builds on `mt-table` — and `table` already imports `entities`, so importing
790
- * it back here would make the two entry points circular. The provider lives
791
- * with the component: `provideEntityListTablePreview()`.
792
- *
793
- * The component is created with `NgComponentOutlet` and receives
794
- * `propertyId`, `runtimeContext`, `configuration`, `initialValue`, `readonly`
795
- * and `label` as inputs.
796
- */
797
- declare const ENTITY_LIST_TABLE_COMPONENT: InjectionToken<Type<unknown>>;
798
-
799
841
  type EntityFieldGap = 'compact' | 'normal' | 'relaxed';
800
842
  declare class EntityField {
801
843
  readonly label: _angular_core.InputSignal<string>;
@@ -1256,11 +1298,47 @@ declare function localCellsByFieldId(row: EntityListLocalRow): Map<string, Entit
1256
1298
  /** Rows in their stored order. */
1257
1299
  declare function sortLocalRows(rows: readonly EntityListLocalRow[] | null | undefined): EntityListLocalRow[];
1258
1300
 
1259
- /** What `NgComponentOutlet` needs to render the inline table. */
1301
+ /**
1302
+ * What `NgComponentOutlet` needs to render an `EntityList` table: the
1303
+ * read-only `mt-entity-list-field` (`ENTITY_LIST_TABLE_COMPONENT`) and its
1304
+ * inputs.
1305
+ */
1260
1306
  interface EntityListTableHost {
1261
1307
  component: Type<unknown>;
1262
1308
  inputs: Record<string, unknown>;
1263
1309
  }
1310
+ /**
1311
+ * The full nested `EntityList`, rendered in a drawer opened by
1312
+ * `mt-entity-list-preview`.
1313
+ *
1314
+ * It lives in a drawer rather than in the cell because the cell is a table
1315
+ * column: even three lines per row set the height of every row in the table,
1316
+ * and a checklist of fifteen made the grid unreadable. The drawer has the
1317
+ * width and height this content actually needs.
1318
+ *
1319
+ * With a `table` it renders the list the way a record preview does — the
1320
+ * read-only `mt-entity-list-field`, with its columns, typed cells and access
1321
+ * notices — for a table cell whose host knew the record's runtime ids.
1322
+ * Otherwise it renders the rows the value itself carries.
1323
+ *
1324
+ * Created through `ModalService`, so its inputs arrive via `inputValues` and
1325
+ * it is built with the **root** injector — nothing route-provided is visible
1326
+ * here, which is why it takes the already-resolved entity and table rather
1327
+ * than looking anything up.
1328
+ */
1329
+ declare class EntityListDrawer {
1330
+ readonly data: _angular_core.InputSignal<EntityData>;
1331
+ /** Ordered allowlist of nested field keys; empty renders all of them. */
1332
+ readonly fields: _angular_core.InputSignal<string[]>;
1333
+ /** The list's table, when the opener could build one; see above. */
1334
+ readonly table: _angular_core.InputSignal<EntityListTableHost | null>;
1335
+ /** A Local list's labels are `{ en, ar }` pairs; see `sharedActiveLang`. */
1336
+ private readonly activeLang;
1337
+ readonly rows: _angular_core.Signal<EntityListRenderedRow[]>;
1338
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<EntityListDrawer, never>;
1339
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<EntityListDrawer, "mt-entity-list-drawer", never, { "data": { "alias": "data"; "required": true; "isSignal": true; }; "fields": { "alias": "fields"; "required": false; "isSignal": true; }; "table": { "alias": "table"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
1340
+ }
1341
+
1264
1342
  /**
1265
1343
  * Read-only renderer for an `EntityList` value. It has two shapes, and which
1266
1344
  * one applies is decided by what the host gave it — never by the value.
@@ -1344,6 +1422,29 @@ declare class EntityListPreview {
1344
1422
  * pass would re-write every input on every tick.
1345
1423
  */
1346
1424
  protected readonly tableHost: _angular_core.Signal<EntityListTableHost | null>;
1425
+ /**
1426
+ * The same table, for the drawer of a table cell. A cell publishes no
1427
+ * runtime context — an inline table would set the height of every row — but
1428
+ * a host that knows the record's ids puts them on the value
1429
+ * (`EntityData.runtimeContext`), and the drawer then shows the list exactly
1430
+ * as a record preview does, instead of the value-only rows.
1431
+ */
1432
+ private readonly drawerTable;
1433
+ private buildTableHost;
1434
+ /**
1435
+ * Whether the value itself holds the list's rows — a Local or Selected
1436
+ * document. A Related list's value is membership and evidence only; its
1437
+ * rows are read by the table, so its cell does not claim a count.
1438
+ */
1439
+ private readonly valueHoldsRows;
1440
+ /** The trigger shows when there are rows to count, or a table to open. */
1441
+ protected readonly showTrigger: _angular_core.Signal<boolean>;
1442
+ /**
1443
+ * The trigger's label: the row count when the value holds the rows, else
1444
+ * "View" — a Related list's saved membership is not what its table shows,
1445
+ * so it is not presented as a count.
1446
+ */
1447
+ protected readonly triggerLabel: _angular_core.Signal<string>;
1347
1448
  /**
1348
1449
  * An empty list reads as the standard empty value, not as a sentence — this
1349
1450
  * sits in a table cell, where a "no related items" line would be louder than
@@ -1374,31 +1475,6 @@ declare class EntityListPreview {
1374
1475
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<EntityListPreview, "mt-entity-list-preview", never, { "data": { "alias": "data"; "required": true; "isSignal": true; }; "fields": { "alias": "fields"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
1375
1476
  }
1376
1477
 
1377
- /**
1378
- * The full nested `EntityList`, rendered in a drawer opened by
1379
- * `mt-entity-list-preview`.
1380
- *
1381
- * It lives in a drawer rather than in the cell because the cell is a table
1382
- * column: even three lines per row set the height of every row in the table,
1383
- * and a checklist of fifteen made the grid unreadable. The drawer has the
1384
- * width and height this content actually needs.
1385
- *
1386
- * Created through `ModalService`, so its inputs arrive via `inputValues` and
1387
- * it is built with the **root** injector — nothing route-provided is visible
1388
- * here, which is why it takes the already-resolved entity rather than looking
1389
- * anything up.
1390
- */
1391
- declare class EntityListDrawer {
1392
- readonly data: _angular_core.InputSignal<EntityData>;
1393
- /** Ordered allowlist of nested field keys; empty renders all of them. */
1394
- readonly fields: _angular_core.InputSignal<string[]>;
1395
- /** A Local list's labels are `{ en, ar }` pairs; see `sharedActiveLang`. */
1396
- private readonly activeLang;
1397
- readonly rows: _angular_core.Signal<EntityListRenderedRow[]>;
1398
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<EntityListDrawer, never>;
1399
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<EntityListDrawer, "mt-entity-list-drawer", never, { "data": { "alias": "data"; "required": true; "isSignal": true; }; "fields": { "alias": "fields"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
1400
- }
1401
-
1402
1478
  interface RenderedItem {
1403
1479
  lookupKey: string;
1404
1480
  /** Humanized lookup key for display. */
@@ -1950,5 +2026,5 @@ declare class FitText {
1950
2026
 
1951
2027
  declare function sharedActiveLang(transloco: TranslocoService): Signal<string>;
1952
2028
 
1953
- export { CONNECTION_KEY_SEPARATOR, CURRENCY_COMPACT_THRESHOLD, ComparisonEntityList, ComparisonValue, DEFAULT_PHASE_GATE_COLOR, ENTITY_EMPTY_VALUE_PLACEHOLDER, ENTITY_LIST_TABLE_COMPONENT, EntitiesManage, EntitiesPreview, EntitiesResizeBase, EntityAttachment, EntityCheckbox, EntityConnection, EntityCurrency, EntityDate, EntityField, EntityIcon, EntityLeafDetails, EntityListDrawer, EntityListPreview, EntityLocation, EntityLongText, EntityLookup, EntityLookupModuleCheckList, EntityPercentage, EntityPhaseGate, EntityPreview, EntityPreviewBody, EntityRuntimeContextStore, EntityScheduleItem, EntityStatus, EntityText, EntityUser, FitText, LEAF_DETAILS_KEY_SEPARATOR, LEAF_PHASES_KEY_SEPARATOR, SECTION_KEY_PREFIX, buildConnectionKey, buildDisplayEntities, buildEntityListRows, buildSectionKey, compactCurrencyDisplay, currencyUnitOf, displayOrPlaceholder, expandConnectionEntity, expandLeafDetailsEntity, extractDisplayText, getEntitySectionTitle, groupEntitiesIntoSections, humanizeEntityListKey, isConnectionSyntheticKey, isEntityAlignEnd, isEntityLabelHidden, isEntityListLocalDocument, isEntitySection, isLeafDetailsCatalogConfiguration, isLeafDetailsCollectionValue, isLeafDetailsRuntimeValue, isLeafDetailsSyntheticKey, isLeafDetailsValue, isLeafPhasesSyntheticKey, isLeafSyntheticKey, isSectionKey, isValueMissing, localCellsByFieldId, matchesPercentageColorRule, normalizeConnectionSourceLevels, normalizeNumerals, parseCurrencyAmount, readEntityValueColor, resolveConnectionLevelName, resolveEntityInfo, resolveEntityLabelPosition, resolveLocalFieldConfiguration, resolveLocalFieldLabel, resolveLocalFieldViewType, resolveLocalizedLabel, resolvePercentageColor, serializeEntityRawValue, sharedActiveLang, sortLocalRows, splitConnectionKey, splitLeafKey, summarizeEntityListRows, visibleLocalSchemaFields };
1954
- export type { ComparisonValueSide, ConnectionCatalogConfiguration, ConnectionLevelSavedConfig, ConnectionSourceLevelConfig, EntityAttachmentItemValue, EntityAttachmentValue, EntityBaseConfig, EntityClickEvent, EntityComparisonField, EntityComparisonOperation, EntityConfiguration, EntityConnectionConfig, EntityConnectionSourceValue, EntityConnectionValue, EntityData, EntityLabelPosition, EntityLeafDetailsConfig, EntityListComparison, EntityListComparisonRow, EntityListEntityValue, EntityListInlineFieldMeta, EntityListLocalCell, EntityListLocalDocument, EntityListLocalFieldDefinition, EntityListLocalFieldWidth, EntityListLocalRow, EntityListLocalSchema, EntityListLocalSchemaField, EntityListRenderedRow, EntityListRowValue, EntityListTranslatable, EntityListValueItem, EntityLocationValue, EntityLookupCheckListItem, EntityLookupCheckListPropValue, EntityLookupCheckListValue, EntityLookupValue, EntityMultiLookupValue, EntityMultiUserValue, EntityNestedPropertyMeta, EntityPercentageConfig, EntityPhaseGateValue, EntityPropertyConfiguration, EntityResizeEvent, EntityRuntimeContext, EntityScheduleItemValue, EntitySectionConfig, EntitySectionGroup, EntitySectionLabel, EntitySize, EntityStatusValue, EntityTranslatableTextValue, EntityUserConfig, EntityUserValue, EntityViewType, LeafDetailsBadgeKind, LeafDetailsCatalogConfiguration, LeafDetailsCatalogLevelValue, LeafDetailsCatalogPhaseValue, LeafDetailsCatalogStatusValue, LeafDetailsEntityCollectionValue, LeafDetailsEntityValue, LeafDetailsPhaseSummary, LeafDetailsRuntimeChildSchema, LeafDetailsRuntimePhaseCount, LeafDetailsRuntimePhaseDetails, LeafDetailsRuntimeStatusCount, LeafDetailsRuntimeStatusDetails, LeafDetailsRuntimeValue, LeafDetailsStatusSummary, LeafLevelSavedConfig, LeafPhaseSavedConfig, PercentageColorMode, PercentageColorPropertyRef, PercentageColorRule, PercentageColorSource, PropertyValueComparison, ValueComparison };
2029
+ export { CONNECTION_KEY_SEPARATOR, CURRENCY_COMPACT_THRESHOLD, ComparisonEntityList, ComparisonValue, DEFAULT_PHASE_GATE_COLOR, ENTITY_EMPTY_VALUE_PLACEHOLDER, ENTITY_LIST_TABLE_COMPONENT, EntitiesManage, EntitiesPreview, EntitiesResizeBase, EntityAttachment, EntityCheckbox, EntityConnection, EntityCurrency, EntityDate, EntityField, EntityIcon, EntityLeafDetails, EntityListDrawer, EntityListPreview, EntityLocation, EntityLongText, EntityLookup, EntityLookupModuleCheckList, EntityPercentage, EntityPhaseGate, EntityPreview, EntityPreviewBody, EntityRuntimeContextStore, EntityScheduleItem, EntityStatus, EntityText, EntityUser, FitText, LEAF_DETAILS_KEY_SEPARATOR, LEAF_PHASES_KEY_SEPARATOR, SECTION_KEY_PREFIX, buildConnectionKey, buildDisplayEntities, buildEntityListRows, buildSectionKey, compactCurrencyDisplay, currencyUnitOf, displayOrPlaceholder, expandConnectionEntity, expandLeafDetailsEntity, extractDisplayText, getEntitySectionTitle, groupEntitiesIntoSections, humanizeEntityListKey, isConnectionSyntheticKey, isEntityAlignEnd, isEntityLabelHidden, isEntityListLocalDocument, isEntityListSelectionDocument, isEntitySection, isLeafDetailsCatalogConfiguration, isLeafDetailsCollectionValue, isLeafDetailsRuntimeValue, isLeafDetailsSyntheticKey, isLeafDetailsValue, isLeafPhasesSyntheticKey, isLeafSyntheticKey, isSectionKey, isValueMissing, localCellsByFieldId, matchesPercentageColorRule, normalizeConnectionSourceLevels, normalizeNumerals, parseCurrencyAmount, readEntityValueColor, resolveConnectionLevelName, resolveEntityInfo, resolveEntityLabelPosition, resolveLocalFieldConfiguration, resolveLocalFieldLabel, resolveLocalFieldViewType, resolveLocalizedLabel, resolvePercentageColor, serializeEntityRawValue, sharedActiveLang, sortLocalRows, splitConnectionKey, splitLeafKey, summarizeEntityListRows, visibleLocalSchemaFields };
2030
+ export type { ComparisonValueSide, ConnectionCatalogConfiguration, ConnectionLevelSavedConfig, ConnectionSourceLevelConfig, EntityAttachmentItemValue, EntityAttachmentValue, EntityBaseConfig, EntityClickEvent, EntityComparisonField, EntityComparisonOperation, EntityConfiguration, EntityConnectionConfig, EntityConnectionSourceValue, EntityConnectionValue, EntityData, EntityLabelPosition, EntityLeafDetailsConfig, EntityListComparison, EntityListComparisonRow, EntityListEntityValue, EntityListInlineFieldMeta, EntityListLocalCell, EntityListLocalDocument, EntityListLocalFieldDefinition, EntityListLocalFieldWidth, EntityListLocalRow, EntityListLocalSchema, EntityListLocalSchemaField, EntityListRenderedRow, EntityListRowValue, EntityListSelectionDocument, EntityListSelectionRecord, EntityListSelectionRecordValue, EntityListTableHost, EntityListTranslatable, EntityListValueItem, EntityLocationValue, EntityLookupCheckListItem, EntityLookupCheckListPropValue, EntityLookupCheckListValue, EntityLookupValue, EntityMultiLookupValue, EntityMultiUserValue, EntityNestedPropertyMeta, EntityPercentageConfig, EntityPhaseGateValue, EntityPropertyConfiguration, EntityResizeEvent, EntityRuntimeContext, EntityScheduleItemValue, EntitySectionConfig, EntitySectionGroup, EntitySectionLabel, EntitySize, EntityStatusValue, EntityTranslatableTextValue, EntityUserConfig, EntityUserValue, EntityViewType, LeafDetailsBadgeKind, LeafDetailsCatalogConfiguration, LeafDetailsCatalogLevelValue, LeafDetailsCatalogPhaseValue, LeafDetailsCatalogStatusValue, LeafDetailsEntityCollectionValue, LeafDetailsEntityValue, LeafDetailsPhaseSummary, LeafDetailsRuntimeChildSchema, LeafDetailsRuntimePhaseCount, LeafDetailsRuntimePhaseDetails, LeafDetailsRuntimeStatusCount, LeafDetailsRuntimeStatusDetails, LeafDetailsRuntimeValue, LeafDetailsStatusSummary, LeafLevelSavedConfig, LeafPhaseSavedConfig, PercentageColorMode, PercentageColorPropertyRef, PercentageColorRule, PercentageColorSource, PropertyValueComparison, ValueComparison };
@@ -729,10 +729,21 @@ interface EntityListFieldRuntimeContext {
729
729
  /** Current level id (used to build the fetch/query contextKey). */
730
730
  levelId?: number | string | null;
731
731
  levelDataId?: number | string | null;
732
+ /**
733
+ * Module schema id of the form that owns the property — the `Module:{id}`
734
+ * segment of the options `contextKey` a Selected list's picker sends. Absent
735
+ * on a level's own form, whose context is `Level:{levelId}`.
736
+ */
737
+ moduleId?: number | string | null;
732
738
  }
733
739
  declare class EntityListFieldConfig extends BaseFieldConfig {
734
740
  /** EntityList property id (used in the read endpoint route). */
735
741
  propertyId: number | null;
742
+ /**
743
+ * EntityList property key — the `forms/options/{propertyKey}` route a
744
+ * Selected list's picker loads its candidates from.
745
+ */
746
+ propertyKey: string;
736
747
  /** Property configuration (sourceType, moduleId, access, snapshotMode, fields). */
737
748
  configuration: any;
738
749
  /** Runtime ids needed to call the read endpoint. */
@@ -752,6 +763,7 @@ declare class EntityListFieldConfig extends BaseFieldConfig {
752
763
  pendingSubmission: boolean;
753
764
  constructor(config: Omit<BaseFieldConstructorConfig, 'type'> & {
754
765
  propertyId?: number | null;
766
+ propertyKey?: string;
755
767
  configuration?: any;
756
768
  runtimeContext?: EntityListFieldRuntimeContext | null;
757
769
  lookups?: unknown[];