@masterteam/components 0.0.284 → 0.0.286

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.284",
3
+ "version": "0.0.286",
4
4
  "publishConfig": {
5
5
  "directory": "../../../dist/masterteam/components",
6
6
  "linkDirectory": true,
@@ -282,7 +282,7 @@ interface EntityListColumnDef extends ColumnDef {
282
282
  viewType?: string;
283
283
  order?: number;
284
284
  visible?: boolean;
285
- configuration?: Record<string, unknown> | null;
285
+ configuration?: EntityData['propertyConfiguration'];
286
286
  /** Underlying catalog property key (e.g. "task_name") used to look up
287
287
  * form values keyed by property key when a new row is added locally. */
288
288
  propertyKey?: string;
@@ -327,6 +327,12 @@ declare class EntityListField implements ControlValueAccessor {
327
327
  readonly configuration: _angular_core.InputSignal<Record<string, unknown> | null>;
328
328
  /** Runtime ids needed to call the read endpoint. */
329
329
  readonly runtimeContext: _angular_core.InputSignal<EntityListFieldRuntimeContext | null>;
330
+ /**
331
+ * Full lookup catalog of the host form, forwarded to the add/edit dialog's
332
+ * nested form. `process-form-load` returns only the lookup *id* per field,
333
+ * so without this the target module's Lookup fields render "no options".
334
+ */
335
+ readonly lookups: _angular_core.InputSignal<unknown[]>;
330
336
  /** Optional HttpContext (kept for back-compat). */
331
337
  readonly context: _angular_core.InputSignal<HttpContext | undefined>;
332
338
  private readonly storedValue;
@@ -380,6 +386,7 @@ declare class EntityListField implements ControlValueAccessor {
380
386
  protected onTouched: () => void;
381
387
  protected onModelChange: (value: EntityListStoredValue | null) => void;
382
388
  private readonly http;
389
+ private fetchSubscription?;
383
390
  private readonly destroyRef;
384
391
  private readonly modal;
385
392
  private readonly transloco;
@@ -458,11 +465,12 @@ declare class EntityListField implements ControlValueAccessor {
458
465
  private diffValues;
459
466
  private isEmptyValue;
460
467
  private isSameValue;
468
+ private fetchDraftColumns;
461
469
  private fetchRows;
462
470
  private applyResponse;
463
471
  private toEntityData;
464
472
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<EntityListField, never>;
465
- 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; }; "context": { "alias": "context"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
473
+ 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>;
466
474
  }
467
475
 
468
476
  /** Inputs the EntityList add-row dialog will receive via ModalService inputValues. */
@@ -472,6 +480,11 @@ interface EntityListAddDialogInputs {
472
480
  levelDataId: number | string | null;
473
481
  /** Property keys that should be editable in the dialog. */
474
482
  writeFields: string[];
483
+ /**
484
+ * Host form's lookup catalog. The dialog's nested form needs it to resolve
485
+ * options for the target module's `Lookup` / `LookupMultiSelect` fields.
486
+ */
487
+ lookups?: unknown[];
475
488
  /** Pre-populated form values (keyed by property key) for the Edit flow. */
476
489
  initialValues?: Record<string, unknown>;
477
490
  /** True when the dialog edits an existing row rather than adding one. */
@@ -138,6 +138,16 @@ interface LeafLevelSavedConfig {
138
138
  size?: EntitySize;
139
139
  /** Status keys the user has chosen to display */
140
140
  selectedStatuses: string[];
141
+ /**
142
+ * Custom label for THIS tile, localized.
143
+ *
144
+ * Per-level rather than on the parent property because one LeafDetails
145
+ * property renders one tile per child level per projection — a single shared
146
+ * label would paint the same text on every one of them and leave the tiles
147
+ * indistinguishable. Same reasoning as `order` and `size`, which are already
148
+ * per-level. Empty → the child level's own name.
149
+ */
150
+ label?: EntitySectionLabel;
141
151
  }
142
152
  /**
143
153
  * Per-level display overrides for the *phase* projection of a LeafDetails
@@ -156,6 +166,8 @@ interface LeafPhaseSavedConfig {
156
166
  size?: EntitySize;
157
167
  /** Phase keys the user has chosen to display */
158
168
  selectedPhases: string[];
169
+ /** Custom label for this phase tile, localized. See `LeafLevelSavedConfig.label`. */
170
+ label?: EntitySectionLabel;
159
171
  }
160
172
  interface EntityLeafDetailsConfig extends EntityBaseConfig {
161
173
  /** Per-level display overrides for LeafDetails entities */
@@ -966,6 +978,12 @@ declare class EntityLeafDetails {
966
978
  readonly leafValue: _angular_core.Signal<LeafDetailsEntityValue | null>;
967
979
  /** True when this item paints the level's phase badges instead of statuses. */
968
980
  readonly isPhaseItem: _angular_core.Signal<boolean>;
981
+ /**
982
+ * This tile's own saved overrides — the `leafLevels` / `leafPhases` entry for
983
+ * its child level. The two maps are kept apart because one level can render
984
+ * both projections, each with its own slot, width and now label.
985
+ */
986
+ private readonly tileConfig;
969
987
  /**
970
988
  * The badges to paint. Phases and statuses carry the same `{ key, display,
971
989
  * color, count }` shape, so one template drives both — only which projection
@@ -974,8 +992,33 @@ declare class EntityLeafDetails {
974
992
  readonly badges: _angular_core.Signal<LeafDetailsStatusSummary[]>;
975
993
  /**
976
994
  * Label shown below the badges: "Level Name (total)", with a "— Phases"
977
- * qualifier on the phase item so a level configured with both projections
978
- * does not render two identically-labelled tiles.
995
+ * qualifier on an unnamed phase item so a level configured with both
996
+ * projections does not render two identically-labelled tiles.
997
+ *
998
+ * The custom label is read off the tile's OWN per-level entry, not from
999
+ * `data().name` and not from the parent property's `configuration.label`.
1000
+ *
1001
+ * Not `name`, because for this view type it does not survive the trip: both
1002
+ * hosts resolve a label into `name` up front (`toEntityData` in
1003
+ * client-instance-preview, `openDrawer` in the customization builder), and
1004
+ * then `expandLeafDetailsEntity` rewrites `name` to the child level's own
1005
+ * name when it splits the property into one tile per level.
1006
+ *
1007
+ * Not the parent's label, because one property becomes many tiles — one per
1008
+ * child level, and again per projection. A label held on the parent paints
1009
+ * the same text on every one of them, which is what makes a card show
1010
+ * "Delivery Portfolio (7)" three times over. `order` and `size` were already
1011
+ * per-level for exactly this reason; the label follows them.
1012
+ *
1013
+ * A custom label owns the whole name. The "— Phases" qualifier is only the
1014
+ * *default* disambiguator for a level that renders both projections — once an
1015
+ * author names the phase tile themselves, appending it would force a suffix
1016
+ * onto text they wrote, and "Delivery Stages — Phases" is not something they
1017
+ * can spell their way out of. So the qualifier applies to the fallback name
1018
+ * only; the author is trusted to have distinguished the tile.
1019
+ *
1020
+ * `(total)` is the one thing always appended — the count is the point of the
1021
+ * tile, and it is live data, not part of anyone's label.
979
1022
  */
980
1023
  readonly labelWithTotal: _angular_core.Signal<string>;
981
1024
  readonly labelIcon: _angular_core.Signal<string | null>;
@@ -497,6 +497,13 @@ interface FormulaToolbarPropertyItem {
497
497
  interface FormulaToolbarValueItem {
498
498
  key: string;
499
499
  name: string;
500
+ /**
501
+ * How `key` has to serialize. `'number'` emits an unquoted number literal —
502
+ * required by sources that compare against a numeric id (phase values), where
503
+ * a quoted id evaluates true in the client engine and false on the server.
504
+ * Defaults to `'string'`, which every other source compares as.
505
+ */
506
+ valueType?: 'string' | 'number';
500
507
  }
501
508
  interface OperatorGroup {
502
509
  type: string;
@@ -654,6 +661,11 @@ declare class FormulaToolbar {
654
661
  /**
655
662
  * Insert a picked value as a literal. The item's `key` is what gets stored
656
663
  * and compared; the name rides along as the chip's display label only.
664
+ *
665
+ * A numeric item serializes as a number literal rather than a quoted string —
666
+ * `createLiteralBlock` keeps the JS type on `literalValue`, which is what the
667
+ * editor reads to stamp `literalType`. Never infer this from the key looking
668
+ * numeric: lookup keys fall back to the item id and still compare as strings.
657
669
  */
658
670
  insertPropertyValue(item: FormulaToolbarValueItem): void;
659
671
  /** Insert custom value */
@@ -736,11 +736,17 @@ declare class EntityListFieldConfig extends BaseFieldConfig {
736
736
  configuration: any;
737
737
  /** Runtime ids needed to call the read endpoint. */
738
738
  runtimeContext: EntityListFieldRuntimeContext | null;
739
+ /**
740
+ * Full lookup catalog, carried through to the add/edit dialog's nested form.
741
+ * Without it a `Lookup` field of the target module renders "no options".
742
+ */
743
+ lookups: unknown[];
739
744
  context: HttpContext | undefined;
740
745
  constructor(config: Omit<BaseFieldConstructorConfig, 'type'> & {
741
746
  propertyId?: number | null;
742
747
  configuration?: any;
743
748
  runtimeContext?: EntityListFieldRuntimeContext | null;
749
+ lookups?: unknown[];
744
750
  context?: HttpContext | undefined;
745
751
  });
746
752
  }