@masterteam/components 0.0.285 → 0.0.287

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.285",
3
+ "version": "0.0.287",
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;
@@ -386,6 +386,7 @@ declare class EntityListField implements ControlValueAccessor {
386
386
  protected onTouched: () => void;
387
387
  protected onModelChange: (value: EntityListStoredValue | null) => void;
388
388
  private readonly http;
389
+ private fetchSubscription?;
389
390
  private readonly destroyRef;
390
391
  private readonly modal;
391
392
  private readonly transloco;
@@ -464,6 +465,7 @@ declare class EntityListField implements ControlValueAccessor {
464
465
  private diffValues;
465
466
  private isEmptyValue;
466
467
  private isSameValue;
468
+ private fetchDraftColumns;
467
469
  private fetchRows;
468
470
  private applyResponse;
469
471
  private toEntityData;
@@ -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;
@@ -587,6 +594,19 @@ declare class FormulaToolbar {
587
594
  }[]>;
588
595
  /** Property items normalized from legacy string keys or keyed descriptors */
589
596
  readonly propertyItems: _angular_core.Signal<FormulaToolbarPropertyItem[]>;
597
+ /**
598
+ * Scope hint per property key, present **only** where a display name is
599
+ * shared by more than one property. Two chips both reading "Status" are
600
+ * otherwise indistinguishable before clicking one; a name that is already
601
+ * unique gets no badge, so the common case stays uncluttered.
602
+ *
603
+ * Computed over every property, not the filtered list — a search that hides
604
+ * one of a colliding pair must not make the survivor lose its badge and
605
+ * appear unambiguous.
606
+ */
607
+ readonly propertyQualifiers: _angular_core.Signal<Record<string, string>>;
608
+ /** Scope badge for a property, or '' when its name is already unique. */
609
+ qualifierFor(propertyKey: string): string;
590
610
  /** Filtered properties based on search */
591
611
  readonly filteredProperties: _angular_core.Signal<FormulaToolbarPropertyItem[]>;
592
612
  /**
@@ -654,6 +674,11 @@ declare class FormulaToolbar {
654
674
  /**
655
675
  * Insert a picked value as a literal. The item's `key` is what gets stored
656
676
  * and compared; the name rides along as the chip's display label only.
677
+ *
678
+ * A numeric item serializes as a number literal rather than a quoted string —
679
+ * `createLiteralBlock` keeps the JS type on `literalValue`, which is what the
680
+ * editor reads to stamp `literalType`. Never infer this from the key looking
681
+ * numeric: lookup keys fall back to the item id and still compare as strings.
657
682
  */
658
683
  insertPropertyValue(item: FormulaToolbarValueItem): void;
659
684
  /** Insert custom value */