@masterteam/components 0.0.233 → 0.0.235
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/fesm2022/masterteam-components-client-page.mjs +2 -2
- package/fesm2022/masterteam-components-client-page.mjs.map +1 -1
- package/fesm2022/masterteam-components-entities.mjs +169 -73
- package/fesm2022/masterteam-components-entities.mjs.map +1 -1
- package/fesm2022/masterteam-components-select-field.mjs +16 -2
- package/fesm2022/masterteam-components-select-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-table.mjs +4 -0
- package/fesm2022/masterteam-components-table.mjs.map +1 -1
- package/package.json +1 -1
- package/types/masterteam-components-entities.d.ts +84 -5
- package/types/masterteam-components-select-field.d.ts +8 -0
package/package.json
CHANGED
|
@@ -36,7 +36,12 @@ interface EntityListComparison {
|
|
|
36
36
|
}
|
|
37
37
|
type PropertyValueComparison = ValueComparison | EntityListComparison;
|
|
38
38
|
|
|
39
|
-
type EntityViewType = 'Text' | 'LongText' | 'Date' | 'DateTime' | 'Number' | 'Percentage' | 'Status' | 'Currency' | 'Checkbox' | 'User' | 'Lookup'
|
|
39
|
+
type EntityViewType = 'Text' | 'LongText' | 'Date' | 'DateTime' | 'Number' | 'Percentage' | 'Status' | 'Currency' | 'Checkbox' | 'User' | 'Lookup'
|
|
40
|
+
/**
|
|
41
|
+
* Calculated, read-only lookup resolved by the backend to the schema phase
|
|
42
|
+
* gate the record currently sits on. Never editable at runtime.
|
|
43
|
+
*/
|
|
44
|
+
| 'PhaseGate' | 'Attachment' | 'Location' | 'LookupMatrix' | 'LookupModuleCheckList' | 'LeafDetails' | 'Connection' | 'ScheduleItemSelector'
|
|
40
45
|
/**
|
|
41
46
|
* Layout marker, not a value. Rendered full-width and non-resizable; the
|
|
42
47
|
* preview layer (`groupEntitiesIntoSections`) turns each marker into a titled
|
|
@@ -110,6 +115,27 @@ interface EntityLookupValue {
|
|
|
110
115
|
color: string;
|
|
111
116
|
description?: string;
|
|
112
117
|
}
|
|
118
|
+
/**
|
|
119
|
+
* A `PhaseGate` value — the schema phase gate the record currently sits on.
|
|
120
|
+
*
|
|
121
|
+
* Calculated and read-only: the backend owns it, nothing in the runtime writes
|
|
122
|
+
* it back. `key` is the stable phase-gate key; the schema phase-gate *id* rides
|
|
123
|
+
* on the owning entity's `rawValue`, not here. `display` is resolved for the
|
|
124
|
+
* request language, and `en`/`ar` carry the explicit per-language labels so the
|
|
125
|
+
* renderer can follow a client-side language switch without a refetch.
|
|
126
|
+
*/
|
|
127
|
+
interface EntityPhaseGateValue {
|
|
128
|
+
key: string;
|
|
129
|
+
display: string;
|
|
130
|
+
en?: string;
|
|
131
|
+
ar?: string;
|
|
132
|
+
description?: string;
|
|
133
|
+
/**
|
|
134
|
+
* Optional presentation metadata (hex). Absent → the renderer's
|
|
135
|
+
* `DEFAULT_PHASE_GATE_COLOR` neutral badge.
|
|
136
|
+
*/
|
|
137
|
+
color?: string;
|
|
138
|
+
}
|
|
113
139
|
interface EntityUserValue {
|
|
114
140
|
id?: string;
|
|
115
141
|
userName?: string;
|
|
@@ -262,7 +288,7 @@ interface EntityData {
|
|
|
262
288
|
* props have no label and no view type to render with.
|
|
263
289
|
*/
|
|
264
290
|
nestedProperties?: EntityNestedPropertyMeta[];
|
|
265
|
-
value: string | EntityStatusValue | EntityUserValue | EntityLookupValue | EntityAttachmentValue | EntityLocationValue | EntityConnectionValue | EntityScheduleItemValue[] | EntityLookupCheckListValue | EntityLookupCheckListItem[] | LeafDetailsEntityValue | LeafDetailsEntityCollectionValue | LeafDetailsRuntimeValue;
|
|
291
|
+
value: string | EntityStatusValue | EntityUserValue | EntityLookupValue | EntityPhaseGateValue | EntityAttachmentValue | EntityLocationValue | EntityConnectionValue | EntityScheduleItemValue[] | EntityLookupCheckListValue | EntityLookupCheckListItem[] | LeafDetailsEntityValue | LeafDetailsEntityCollectionValue | LeafDetailsRuntimeValue;
|
|
266
292
|
viewType: EntityViewType;
|
|
267
293
|
type?: string;
|
|
268
294
|
configuration?: EntityConfiguration;
|
|
@@ -450,12 +476,65 @@ declare class EntityLookup {
|
|
|
450
476
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<EntityLookup, "mt-entity-lookup", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
451
477
|
}
|
|
452
478
|
|
|
479
|
+
/**
|
|
480
|
+
* Badge color used when the phase gate carries no `color`. `color` is optional
|
|
481
|
+
* presentation metadata, so a phase gate without one must still read as a
|
|
482
|
+
* badge rather than as bare text — this is the same neutral slate the table
|
|
483
|
+
* falls back to for uncategorized status chips.
|
|
484
|
+
*/
|
|
485
|
+
declare const DEFAULT_PHASE_GATE_COLOR = "#475569";
|
|
486
|
+
/**
|
|
487
|
+
* Preview renderer for `PhaseGate` properties — a calculated, read-only lookup
|
|
488
|
+
* pointing at the schema phase gate the record currently sits on. It renders
|
|
489
|
+
* exactly like {@link EntityLookup} (colored badge) but resolves its label
|
|
490
|
+
* per-language.
|
|
491
|
+
*
|
|
492
|
+
* Label resolution, in order:
|
|
493
|
+
* 1. `value.ar` / `value.en` for the active language — the backend sends both
|
|
494
|
+
* so a client-side language switch re-renders without a refetch, which is
|
|
495
|
+
* why they win over the already-resolved `display`.
|
|
496
|
+
* 2. `value.display`, then the other locale.
|
|
497
|
+
* 3. The flat display, for payloads that send the value as a bare string
|
|
498
|
+
* (comparison snapshots build their sides that way).
|
|
499
|
+
* 4. `rawValue` — the schema phase-gate id — as a last resort.
|
|
500
|
+
*/
|
|
501
|
+
declare class EntityPhaseGate {
|
|
502
|
+
private readonly transloco;
|
|
503
|
+
/** Full entity data object */
|
|
504
|
+
readonly data: _angular_core.InputSignal<EntityData | undefined>;
|
|
505
|
+
/** Individual inputs (used when data is not provided) */
|
|
506
|
+
readonly name: _angular_core.InputSignal<string | undefined>;
|
|
507
|
+
readonly value: _angular_core.InputSignal<EntityPhaseGateValue | undefined>;
|
|
508
|
+
private readonly activeLang;
|
|
509
|
+
readonly displayName: _angular_core.Signal<string>;
|
|
510
|
+
readonly phaseGateValue: _angular_core.Signal<EntityPhaseGateValue | null>;
|
|
511
|
+
/** Resolved label, or `null` when nothing at all is available. */
|
|
512
|
+
private readonly resolvedLabel;
|
|
513
|
+
readonly hasValue: _angular_core.Signal<boolean>;
|
|
514
|
+
readonly phaseGateLabel: _angular_core.Signal<string>;
|
|
515
|
+
readonly badgeStyle: _angular_core.Signal<{
|
|
516
|
+
color: string;
|
|
517
|
+
backgroundColor?: undefined;
|
|
518
|
+
} | {
|
|
519
|
+
color: string;
|
|
520
|
+
backgroundColor: string;
|
|
521
|
+
}>;
|
|
522
|
+
readonly emptyLabel = "_";
|
|
523
|
+
/** The value flattened to a plain display string by the sender. */
|
|
524
|
+
private flatDisplay;
|
|
525
|
+
/** The schema phase-gate id. */
|
|
526
|
+
private rawId;
|
|
527
|
+
private hexToRgba;
|
|
528
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<EntityPhaseGate, never>;
|
|
529
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<EntityPhaseGate, "mt-entity-phase-gate", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
530
|
+
}
|
|
531
|
+
|
|
453
532
|
type AttachmentReference = EntityAttachmentItemValue | string;
|
|
454
533
|
declare class EntityAttachment {
|
|
455
534
|
readonly data: _angular_core.InputSignal<EntityData | undefined>;
|
|
456
535
|
readonly name: _angular_core.InputSignal<string | undefined>;
|
|
457
536
|
readonly shape: _angular_core.InputSignal<"compact" | "default">;
|
|
458
|
-
readonly value: _angular_core.InputSignal<string |
|
|
537
|
+
readonly value: _angular_core.InputSignal<string | EntityAttachmentValue | EntityAttachmentItemValue | null | undefined>;
|
|
459
538
|
readonly endPoint: _angular_core.InputSignal<string>;
|
|
460
539
|
readonly context: _angular_core.InputSignal<HttpContext | undefined>;
|
|
461
540
|
private readonly httpClient;
|
|
@@ -825,5 +904,5 @@ declare class EntitiesManage extends EntitiesResizeBase {
|
|
|
825
904
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<EntitiesManage, "mt-entities-manage", never, { "entities": { "alias": "entities"; "required": true; "isSignal": true; }; }, { "entities": "entitiesChange"; "entitiesReordered": "entitiesReordered"; "entityClicked": "entityClicked"; "externalItemDropped": "externalItemDropped"; }, never, never, true, never>;
|
|
826
905
|
}
|
|
827
906
|
|
|
828
|
-
export { ComparisonEntityList, ComparisonValue, EntitiesManage, EntitiesPreview, EntitiesResizeBase, EntityAttachment, EntityCheckbox, EntityConnection, EntityCurrency, EntityDate, EntityField, EntityLeafDetails, EntityLocation, EntityLongText, EntityLookup, EntityLookupModuleCheckList, EntityPercentage, EntityPreview, EntityPreviewBody, EntityScheduleItem, EntityStatus, EntityText, EntityUser, LEAF_DETAILS_KEY_SEPARATOR, SECTION_KEY_PREFIX, buildDisplayEntities, buildSectionKey, expandLeafDetailsEntity, getEntitySectionTitle, groupEntitiesIntoSections, isEntitySection, isLeafDetailsCatalogConfiguration, isLeafDetailsCollectionValue, isLeafDetailsRuntimeValue, isLeafDetailsSyntheticKey, isLeafDetailsValue, isSectionKey, resolveLocalizedLabel };
|
|
829
|
-
export type { ComparisonValueSide, EntityAttachmentItemValue, EntityAttachmentValue, EntityBaseConfig, EntityClickEvent, EntityComparisonField, EntityComparisonOperation, EntityConfiguration, EntityConnectionValue, EntityData, EntityLabelPosition, EntityLeafDetailsConfig, EntityListComparison, EntityListComparisonRow, EntityLocationValue, EntityLookupCheckListItem, EntityLookupCheckListPropValue, EntityLookupCheckListValue, EntityLookupValue, EntityNestedPropertyMeta, EntityPercentageConfig, EntityPropertyConfiguration, EntityResizeEvent, EntityScheduleItemValue, EntitySectionConfig, EntitySectionGroup, EntitySectionLabel, EntitySize, EntityStatusValue, EntityUserConfig, EntityUserValue, EntityViewType, LeafDetailsCatalogConfiguration, LeafDetailsCatalogLevelValue, LeafDetailsCatalogStatusValue, LeafDetailsEntityCollectionValue, LeafDetailsEntityValue, LeafDetailsRuntimeChildSchema, LeafDetailsRuntimeStatusCount, LeafDetailsRuntimeStatusDetails, LeafDetailsRuntimeValue, LeafDetailsStatusSummary, LeafLevelSavedConfig, PropertyValueComparison, ValueComparison };
|
|
907
|
+
export { ComparisonEntityList, ComparisonValue, DEFAULT_PHASE_GATE_COLOR, EntitiesManage, EntitiesPreview, EntitiesResizeBase, EntityAttachment, EntityCheckbox, EntityConnection, EntityCurrency, EntityDate, EntityField, EntityLeafDetails, EntityLocation, EntityLongText, EntityLookup, EntityLookupModuleCheckList, EntityPercentage, EntityPhaseGate, EntityPreview, EntityPreviewBody, EntityScheduleItem, EntityStatus, EntityText, EntityUser, LEAF_DETAILS_KEY_SEPARATOR, SECTION_KEY_PREFIX, buildDisplayEntities, buildSectionKey, expandLeafDetailsEntity, getEntitySectionTitle, groupEntitiesIntoSections, isEntitySection, isLeafDetailsCatalogConfiguration, isLeafDetailsCollectionValue, isLeafDetailsRuntimeValue, isLeafDetailsSyntheticKey, isLeafDetailsValue, isSectionKey, resolveLocalizedLabel };
|
|
908
|
+
export type { ComparisonValueSide, EntityAttachmentItemValue, EntityAttachmentValue, EntityBaseConfig, EntityClickEvent, EntityComparisonField, EntityComparisonOperation, EntityConfiguration, EntityConnectionValue, EntityData, EntityLabelPosition, EntityLeafDetailsConfig, EntityListComparison, EntityListComparisonRow, EntityLocationValue, EntityLookupCheckListItem, EntityLookupCheckListPropValue, EntityLookupCheckListValue, EntityLookupValue, EntityNestedPropertyMeta, EntityPercentageConfig, EntityPhaseGateValue, EntityPropertyConfiguration, EntityResizeEvent, EntityScheduleItemValue, EntitySectionConfig, EntitySectionGroup, EntitySectionLabel, EntitySize, EntityStatusValue, EntityUserConfig, EntityUserValue, EntityViewType, LeafDetailsCatalogConfiguration, LeafDetailsCatalogLevelValue, LeafDetailsCatalogStatusValue, LeafDetailsEntityCollectionValue, LeafDetailsEntityValue, LeafDetailsRuntimeChildSchema, LeafDetailsRuntimeStatusCount, LeafDetailsRuntimeStatusDetails, LeafDetailsRuntimeValue, LeafDetailsStatusSummary, LeafLevelSavedConfig, PropertyValueComparison, ValueComparison };
|
|
@@ -91,6 +91,13 @@ declare class SelectField implements ControlValueAccessor, OnInit, OnChanges, Af
|
|
|
91
91
|
isGrouped(): boolean;
|
|
92
92
|
clearSelection(): void;
|
|
93
93
|
getOptionLabelValue(option: any): string;
|
|
94
|
+
/**
|
|
95
|
+
* Label used for rendering. Options whose label resolves to an empty string
|
|
96
|
+
* would otherwise paint a blank, unreadable row, so they fall back to a dash.
|
|
97
|
+
* Kept separate from {@link getOptionLabelValue} so value comparisons (e.g.
|
|
98
|
+
* current-user matching) still see the real, empty label.
|
|
99
|
+
*/
|
|
100
|
+
getOptionDisplayLabel(option: any): string;
|
|
94
101
|
getOptionIcon(option: any): string | undefined;
|
|
95
102
|
shouldRenderOptionColorSwatch(option: any): boolean;
|
|
96
103
|
getOptionSwatchColor(option: any): string | null;
|
|
@@ -98,6 +105,7 @@ declare class SelectField implements ControlValueAccessor, OnInit, OnChanges, Af
|
|
|
98
105
|
getOptionAvatarColor(option: any): string | null;
|
|
99
106
|
getOptionAvatarShape(option: any): 'circle' | 'square';
|
|
100
107
|
getGroupLabelValue(group: any): string;
|
|
108
|
+
getGroupDisplayLabel(group: any): string;
|
|
101
109
|
getGroupIcon(group: any): string | undefined;
|
|
102
110
|
shouldRenderGroupColorSwatch(group: any): boolean;
|
|
103
111
|
getGroupSwatchColor(group: any): string | null;
|