@masterteam/components 0.0.282 → 0.0.283
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
|
@@ -139,9 +139,29 @@ interface LeafLevelSavedConfig {
|
|
|
139
139
|
/** Status keys the user has chosen to display */
|
|
140
140
|
selectedStatuses: string[];
|
|
141
141
|
}
|
|
142
|
+
/**
|
|
143
|
+
* Per-level display overrides for the *phase* projection of a LeafDetails
|
|
144
|
+
* property — the sibling of {@link LeafLevelSavedConfig}. The two are kept
|
|
145
|
+
* apart on purpose: one level can contribute a status item, a phase item, or
|
|
146
|
+
* both, each with its own slot and width in the grid.
|
|
147
|
+
*
|
|
148
|
+
* Unlike `leafLevels`, an absent `leafPhases` map hides every phase item.
|
|
149
|
+
* Phases are strictly opt-in so existing cards do not grow badges they were
|
|
150
|
+
* never configured with.
|
|
151
|
+
*/
|
|
152
|
+
interface LeafPhaseSavedConfig {
|
|
153
|
+
/** Position order for this level's phase entity in the preview grid */
|
|
154
|
+
order: number;
|
|
155
|
+
/** Column span (1-24), persisted from drag-resize */
|
|
156
|
+
size?: EntitySize;
|
|
157
|
+
/** Phase keys the user has chosen to display */
|
|
158
|
+
selectedPhases: string[];
|
|
159
|
+
}
|
|
142
160
|
interface EntityLeafDetailsConfig extends EntityBaseConfig {
|
|
143
161
|
/** Per-level display overrides for LeafDetails entities */
|
|
144
162
|
leafLevels?: Record<string, LeafLevelSavedConfig>;
|
|
163
|
+
/** Per-level phase-badge overrides for LeafDetails entities */
|
|
164
|
+
leafPhases?: Record<string, LeafPhaseSavedConfig>;
|
|
145
165
|
}
|
|
146
166
|
/**
|
|
147
167
|
* Per-source-level display overrides for a Connection entity. Unlike
|
|
@@ -267,17 +287,50 @@ interface LeafDetailsCatalogStatusValue {
|
|
|
267
287
|
icon?: string | null;
|
|
268
288
|
order?: number;
|
|
269
289
|
}
|
|
290
|
+
/**
|
|
291
|
+
* One phase bucket of a child level, as published on the catalog
|
|
292
|
+
* `configuration` and counted at runtime. `id` is the schema phase-gate id and
|
|
293
|
+
* is `null` on the backend's synthetic "No current phase" bucket — `key` is
|
|
294
|
+
* what the saved configuration selects on, so it is the stable identifier here.
|
|
295
|
+
*/
|
|
296
|
+
interface LeafDetailsCatalogPhaseValue {
|
|
297
|
+
id?: number | null;
|
|
298
|
+
key: string;
|
|
299
|
+
display: string;
|
|
300
|
+
color: string | null;
|
|
301
|
+
icon?: string | null;
|
|
302
|
+
order?: number;
|
|
303
|
+
}
|
|
304
|
+
interface LeafDetailsPhaseSummary {
|
|
305
|
+
id?: number | null;
|
|
306
|
+
key: string;
|
|
307
|
+
display: string;
|
|
308
|
+
color: string | null;
|
|
309
|
+
/** Always 0 in preview/configuration context; populated from runtime fetch */
|
|
310
|
+
count: number;
|
|
311
|
+
}
|
|
270
312
|
interface LeafDetailsCatalogLevelValue {
|
|
271
313
|
levelId: number;
|
|
272
314
|
levelName: string;
|
|
273
315
|
levelIcon: string;
|
|
274
316
|
statuses: LeafDetailsCatalogStatusValue[];
|
|
317
|
+
/** Absent for child levels the tenant has defined no phase gates on. */
|
|
318
|
+
phases?: LeafDetailsCatalogPhaseValue[] | null;
|
|
275
319
|
}
|
|
320
|
+
/** Which projection of a child level an expanded LeafDetails item renders. */
|
|
321
|
+
type LeafDetailsBadgeKind = 'status' | 'phase';
|
|
276
322
|
interface LeafDetailsEntityValue {
|
|
277
323
|
levelId: number;
|
|
278
324
|
levelName: string;
|
|
279
325
|
levelIcon: string;
|
|
280
326
|
statuses: LeafDetailsStatusSummary[];
|
|
327
|
+
phases?: LeafDetailsPhaseSummary[];
|
|
328
|
+
/**
|
|
329
|
+
* Set by `expandLeafDetailsEntity` on the split items. `'status'` (or absent,
|
|
330
|
+
* for values produced before phases existed) renders the status badges;
|
|
331
|
+
* `'phase'` renders the phase badges.
|
|
332
|
+
*/
|
|
333
|
+
kind?: LeafDetailsBadgeKind;
|
|
281
334
|
}
|
|
282
335
|
type LeafDetailsEntityCollectionValue = LeafDetailsEntityValue[];
|
|
283
336
|
type LeafDetailsCatalogConfiguration = LeafDetailsCatalogLevelValue[];
|
|
@@ -294,12 +347,26 @@ interface LeafDetailsRuntimeStatusCount {
|
|
|
294
347
|
details: LeafDetailsRuntimeStatusDetails;
|
|
295
348
|
count: number;
|
|
296
349
|
}
|
|
350
|
+
interface LeafDetailsRuntimePhaseDetails {
|
|
351
|
+
id?: number | null;
|
|
352
|
+
key: string;
|
|
353
|
+
display: string;
|
|
354
|
+
color: string | null;
|
|
355
|
+
icon?: string | null;
|
|
356
|
+
order?: number;
|
|
357
|
+
}
|
|
358
|
+
interface LeafDetailsRuntimePhaseCount {
|
|
359
|
+
details: LeafDetailsRuntimePhaseDetails;
|
|
360
|
+
count: number;
|
|
361
|
+
}
|
|
297
362
|
interface LeafDetailsRuntimeChildSchema {
|
|
298
363
|
levelId: number;
|
|
299
364
|
levelName: string;
|
|
300
365
|
levelIcon: string;
|
|
301
366
|
totalCount?: number;
|
|
302
367
|
statuses: LeafDetailsRuntimeStatusCount[];
|
|
368
|
+
/** Absent for child levels the tenant has defined no phase gates on. */
|
|
369
|
+
phases?: LeafDetailsRuntimePhaseCount[] | null;
|
|
303
370
|
}
|
|
304
371
|
interface LeafDetailsRuntimeValue {
|
|
305
372
|
totalCount?: number;
|
|
@@ -888,9 +955,28 @@ declare class EntityLookupModuleCheckList {
|
|
|
888
955
|
}
|
|
889
956
|
|
|
890
957
|
declare class EntityLeafDetails {
|
|
958
|
+
private readonly transloco;
|
|
891
959
|
readonly data: _angular_core.InputSignal<EntityData>;
|
|
960
|
+
/**
|
|
961
|
+
* Re-resolves the "Phases" qualifier when the user switches language. The
|
|
962
|
+
* shared signal keeps this to one subscription for the whole grid — a cards
|
|
963
|
+
* board mounts thousands of these.
|
|
964
|
+
*/
|
|
965
|
+
private readonly activeLang;
|
|
892
966
|
readonly leafValue: _angular_core.Signal<LeafDetailsEntityValue | null>;
|
|
893
|
-
/**
|
|
967
|
+
/** True when this item paints the level's phase badges instead of statuses. */
|
|
968
|
+
readonly isPhaseItem: _angular_core.Signal<boolean>;
|
|
969
|
+
/**
|
|
970
|
+
* The badges to paint. Phases and statuses carry the same `{ key, display,
|
|
971
|
+
* color, count }` shape, so one template drives both — only which projection
|
|
972
|
+
* of the level is read differs.
|
|
973
|
+
*/
|
|
974
|
+
readonly badges: _angular_core.Signal<LeafDetailsStatusSummary[]>;
|
|
975
|
+
/**
|
|
976
|
+
* 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.
|
|
979
|
+
*/
|
|
894
980
|
readonly labelWithTotal: _angular_core.Signal<string>;
|
|
895
981
|
readonly labelIcon: _angular_core.Signal<string | null>;
|
|
896
982
|
statusColor(color: string | null): string;
|
|
@@ -905,11 +991,27 @@ declare class EntityLeafDetails {
|
|
|
905
991
|
}
|
|
906
992
|
|
|
907
993
|
declare const LEAF_DETAILS_KEY_SEPARATOR = "::leaflevel::";
|
|
994
|
+
/**
|
|
995
|
+
* The phase projection of the same child level. One level can contribute both
|
|
996
|
+
* a status item and a phase item to the same area, so they need distinct keys
|
|
997
|
+
* — the key is what each item's persisted order/size is looked up by.
|
|
998
|
+
*/
|
|
999
|
+
declare const LEAF_PHASES_KEY_SEPARATOR = "::leafphase::";
|
|
908
1000
|
declare function isLeafDetailsValue(value: unknown): value is LeafDetailsEntityValue;
|
|
909
1001
|
declare function isLeafDetailsCollectionValue(value: unknown): value is LeafDetailsEntityCollectionValue;
|
|
910
1002
|
declare function isLeafDetailsCatalogConfiguration(value: unknown): value is LeafDetailsCatalogConfiguration;
|
|
911
1003
|
declare function isLeafDetailsRuntimeValue(value: unknown): value is LeafDetailsRuntimeValue;
|
|
912
1004
|
declare function isLeafDetailsSyntheticKey(key?: string | null): boolean;
|
|
1005
|
+
/** True for the key of an expanded *phase* item of a LeafDetails property. */
|
|
1006
|
+
declare function isLeafPhasesSyntheticKey(key?: string | null): boolean;
|
|
1007
|
+
/** True for either projection's expanded key. */
|
|
1008
|
+
declare function isLeafSyntheticKey(key?: string | null): boolean;
|
|
1009
|
+
/** Splits either projection's expanded key back into property key + level id. */
|
|
1010
|
+
declare function splitLeafKey(key: string): {
|
|
1011
|
+
propertyKey: string;
|
|
1012
|
+
levelId: string;
|
|
1013
|
+
kind: 'status' | 'phase';
|
|
1014
|
+
};
|
|
913
1015
|
declare function expandLeafDetailsEntity(entity: EntityData): EntityData[];
|
|
914
1016
|
/**
|
|
915
1017
|
* Expands the entity types that render as several items — LeafDetails levels
|
|
@@ -1331,5 +1433,5 @@ declare class FitText {
|
|
|
1331
1433
|
|
|
1332
1434
|
declare function sharedActiveLang(transloco: TranslocoService): Signal<string>;
|
|
1333
1435
|
|
|
1334
|
-
export { CONNECTION_KEY_SEPARATOR, CURRENCY_COMPACT_THRESHOLD, ComparisonEntityList, ComparisonValue, DEFAULT_PHASE_GATE_COLOR, ENTITY_EMPTY_VALUE_PLACEHOLDER, EntitiesManage, EntitiesPreview, EntitiesResizeBase, EntityAttachment, EntityCheckbox, EntityConnection, EntityCurrency, EntityDate, EntityField, EntityIcon, EntityLeafDetails, EntityLocation, EntityLongText, EntityLookup, EntityLookupModuleCheckList, EntityPercentage, EntityPhaseGate, EntityPreview, EntityPreviewBody, EntityScheduleItem, EntityStatus, EntityText, EntityUser, FitText, LEAF_DETAILS_KEY_SEPARATOR, SECTION_KEY_PREFIX, buildConnectionKey, buildDisplayEntities, buildSectionKey, compactCurrencyDisplay, currencyUnitOf, displayOrPlaceholder, expandConnectionEntity, expandLeafDetailsEntity, extractDisplayText, getEntitySectionTitle, groupEntitiesIntoSections, isConnectionSyntheticKey, isEntityAlignEnd, isEntityLabelHidden, isEntitySection, isLeafDetailsCatalogConfiguration, isLeafDetailsCollectionValue, isLeafDetailsRuntimeValue, isLeafDetailsSyntheticKey, isLeafDetailsValue, isSectionKey, isValueMissing, matchesPercentageColorRule, normalizeConnectionSourceLevels, normalizeNumerals, parseCurrencyAmount, resolveConnectionLevelName, resolveEntityInfo, resolveEntityLabelPosition, resolveLocalizedLabel, resolvePercentageColor, serializeEntityRawValue, sharedActiveLang, splitConnectionKey };
|
|
1335
|
-
export type { ComparisonValueSide, ConnectionCatalogConfiguration, ConnectionLevelSavedConfig, ConnectionSourceLevelConfig, EntityAttachmentItemValue, EntityAttachmentValue, EntityBaseConfig, EntityClickEvent, EntityComparisonField, EntityComparisonOperation, EntityConfiguration, EntityConnectionConfig, EntityConnectionSourceValue, EntityConnectionValue, EntityData, EntityLabelPosition, EntityLeafDetailsConfig, EntityListComparison, EntityListComparisonRow, EntityLocationValue, EntityLookupCheckListItem, EntityLookupCheckListPropValue, EntityLookupCheckListValue, EntityLookupValue, EntityMultiLookupValue, EntityMultiUserValue, EntityNestedPropertyMeta, EntityPercentageConfig, EntityPhaseGateValue, EntityPropertyConfiguration, EntityResizeEvent, EntityScheduleItemValue, EntitySectionConfig, EntitySectionGroup, EntitySectionLabel, EntitySize, EntityStatusValue, EntityTranslatableTextValue, EntityUserConfig, EntityUserValue, EntityViewType, LeafDetailsCatalogConfiguration, LeafDetailsCatalogLevelValue, LeafDetailsCatalogStatusValue, LeafDetailsEntityCollectionValue, LeafDetailsEntityValue, LeafDetailsRuntimeChildSchema, LeafDetailsRuntimeStatusCount, LeafDetailsRuntimeStatusDetails, LeafDetailsRuntimeValue, LeafDetailsStatusSummary, LeafLevelSavedConfig, PercentageColorRule, PercentageColorSource, PropertyValueComparison, ValueComparison };
|
|
1436
|
+
export { CONNECTION_KEY_SEPARATOR, CURRENCY_COMPACT_THRESHOLD, ComparisonEntityList, ComparisonValue, DEFAULT_PHASE_GATE_COLOR, ENTITY_EMPTY_VALUE_PLACEHOLDER, EntitiesManage, EntitiesPreview, EntitiesResizeBase, EntityAttachment, EntityCheckbox, EntityConnection, EntityCurrency, EntityDate, EntityField, EntityIcon, EntityLeafDetails, EntityLocation, EntityLongText, EntityLookup, EntityLookupModuleCheckList, EntityPercentage, EntityPhaseGate, EntityPreview, EntityPreviewBody, EntityScheduleItem, EntityStatus, EntityText, EntityUser, FitText, LEAF_DETAILS_KEY_SEPARATOR, LEAF_PHASES_KEY_SEPARATOR, SECTION_KEY_PREFIX, buildConnectionKey, buildDisplayEntities, buildSectionKey, compactCurrencyDisplay, currencyUnitOf, displayOrPlaceholder, expandConnectionEntity, expandLeafDetailsEntity, extractDisplayText, getEntitySectionTitle, groupEntitiesIntoSections, isConnectionSyntheticKey, isEntityAlignEnd, isEntityLabelHidden, isEntitySection, isLeafDetailsCatalogConfiguration, isLeafDetailsCollectionValue, isLeafDetailsRuntimeValue, isLeafDetailsSyntheticKey, isLeafDetailsValue, isLeafPhasesSyntheticKey, isLeafSyntheticKey, isSectionKey, isValueMissing, matchesPercentageColorRule, normalizeConnectionSourceLevels, normalizeNumerals, parseCurrencyAmount, resolveConnectionLevelName, resolveEntityInfo, resolveEntityLabelPosition, resolveLocalizedLabel, resolvePercentageColor, serializeEntityRawValue, sharedActiveLang, splitConnectionKey, splitLeafKey };
|
|
1437
|
+
export type { ComparisonValueSide, ConnectionCatalogConfiguration, ConnectionLevelSavedConfig, ConnectionSourceLevelConfig, EntityAttachmentItemValue, EntityAttachmentValue, EntityBaseConfig, EntityClickEvent, EntityComparisonField, EntityComparisonOperation, EntityConfiguration, EntityConnectionConfig, EntityConnectionSourceValue, EntityConnectionValue, EntityData, EntityLabelPosition, EntityLeafDetailsConfig, EntityListComparison, EntityListComparisonRow, EntityLocationValue, EntityLookupCheckListItem, EntityLookupCheckListPropValue, EntityLookupCheckListValue, EntityLookupValue, EntityMultiLookupValue, EntityMultiUserValue, EntityNestedPropertyMeta, EntityPercentageConfig, EntityPhaseGateValue, EntityPropertyConfiguration, EntityResizeEvent, 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, PercentageColorRule, PercentageColorSource, PropertyValueComparison, ValueComparison };
|