@masterteam/components 0.0.269 → 0.0.271
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/assets/common.css +1 -1
- package/fesm2022/masterteam-components-business-fields.mjs +6 -7
- package/fesm2022/masterteam-components-business-fields.mjs.map +1 -1
- package/fesm2022/masterteam-components-entities.mjs +209 -21
- package/fesm2022/masterteam-components-entities.mjs.map +1 -1
- package/fesm2022/masterteam-components-field-validation.mjs.map +1 -1
- package/fesm2022/masterteam-components-table.mjs.map +1 -1
- package/fesm2022/masterteam-components-tabs.mjs +73 -13
- package/fesm2022/masterteam-components-tabs.mjs.map +1 -1
- package/fesm2022/masterteam-components-treeselect-field.mjs +2 -2
- package/fesm2022/masterteam-components-treeselect-field.mjs.map +1 -1
- package/package.json +1 -1
- package/types/masterteam-components-entities.d.ts +138 -11
- package/types/masterteam-components-tabs.d.ts +24 -1
|
@@ -84,10 +84,10 @@ interface EntityUserConfig extends EntityBaseConfig {
|
|
|
84
84
|
showPhoneNumber?: boolean;
|
|
85
85
|
showEmail?: boolean;
|
|
86
86
|
/**
|
|
87
|
-
* Whether the
|
|
88
|
-
*
|
|
87
|
+
* Whether the avatar is rendered at all. When `false` neither the user's
|
|
88
|
+
* picture nor the generic fallback icon shows — only the name remains.
|
|
89
89
|
*/
|
|
90
|
-
|
|
90
|
+
showAvatar?: boolean;
|
|
91
91
|
/** Maximum users shown before the MultiUser preview collapses behind +N. */
|
|
92
92
|
maxVisibleUsers?: number;
|
|
93
93
|
}
|
|
@@ -124,6 +124,51 @@ interface EntityLeafDetailsConfig extends EntityBaseConfig {
|
|
|
124
124
|
/** Per-level display overrides for LeafDetails entities */
|
|
125
125
|
leafLevels?: Record<string, LeafLevelSavedConfig>;
|
|
126
126
|
}
|
|
127
|
+
/**
|
|
128
|
+
* Per-source-level display overrides for a Connection entity. Unlike
|
|
129
|
+
* `LeafLevelSavedConfig` an absent entry does not hide the level — every source
|
|
130
|
+
* level always renders as its own item and simply inherits the parent's
|
|
131
|
+
* order/size until the user drags it.
|
|
132
|
+
*/
|
|
133
|
+
interface ConnectionLevelSavedConfig {
|
|
134
|
+
/** Position order for this source-level item in the preview grid */
|
|
135
|
+
order?: number;
|
|
136
|
+
/** Column span (1-24), persisted from drag-resize */
|
|
137
|
+
size?: EntitySize;
|
|
138
|
+
}
|
|
139
|
+
interface EntityConnectionConfig extends EntityBaseConfig {
|
|
140
|
+
/** Per-source-level display overrides for Connection entities */
|
|
141
|
+
connectionLevels?: Record<string, ConnectionLevelSavedConfig>;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* One source level a Connection property can link to, as published on the
|
|
145
|
+
* property catalog's `configuration.sourceLevels`. Its `name` supplies the
|
|
146
|
+
* label of the split item that represents this level.
|
|
147
|
+
*/
|
|
148
|
+
interface ConnectionSourceLevelConfig {
|
|
149
|
+
levelId: number;
|
|
150
|
+
levelKey?: string;
|
|
151
|
+
name?: EntitySectionLabel | string;
|
|
152
|
+
connectionId?: number;
|
|
153
|
+
[key: string]: unknown;
|
|
154
|
+
}
|
|
155
|
+
/** Catalog `configuration` shape of a `Connection` property. */
|
|
156
|
+
interface ConnectionCatalogConfiguration {
|
|
157
|
+
sourceLevels?: ConnectionSourceLevelConfig[];
|
|
158
|
+
[key: string]: unknown;
|
|
159
|
+
}
|
|
160
|
+
/** One connected record inside a Connection value's `Sources` array. */
|
|
161
|
+
interface EntityConnectionSourceValue {
|
|
162
|
+
sourceLevelId?: number;
|
|
163
|
+
SourceLevelId?: number;
|
|
164
|
+
sourceLevelDataId?: number;
|
|
165
|
+
SourceLevelDataId?: number;
|
|
166
|
+
display?: string;
|
|
167
|
+
Display?: string;
|
|
168
|
+
name?: string;
|
|
169
|
+
Name?: string;
|
|
170
|
+
[key: string]: unknown;
|
|
171
|
+
}
|
|
127
172
|
/** A localized label ({ en, ar }) — used by section headings and custom labels. */
|
|
128
173
|
interface EntitySectionLabel {
|
|
129
174
|
en?: string;
|
|
@@ -134,7 +179,7 @@ interface EntitySectionConfig extends EntityBaseConfig {
|
|
|
134
179
|
/** Section heading, localized. Empty/absent renders a header-less box. */
|
|
135
180
|
label?: EntitySectionLabel;
|
|
136
181
|
}
|
|
137
|
-
type EntityConfiguration = EntityBaseConfig | EntityUserConfig | EntityPercentageConfig | EntityLeafDetailsConfig | EntitySectionConfig;
|
|
182
|
+
type EntityConfiguration = EntityBaseConfig | EntityUserConfig | EntityPercentageConfig | EntityLeafDetailsConfig | EntityConnectionConfig | EntitySectionConfig;
|
|
138
183
|
interface EntityStatusValue {
|
|
139
184
|
key: string;
|
|
140
185
|
display: string;
|
|
@@ -257,6 +302,9 @@ interface EntityLocationValue {
|
|
|
257
302
|
interface EntityConnectionValue {
|
|
258
303
|
/** Human-readable label of the connected record (read from `rawValue.display`). */
|
|
259
304
|
display?: string;
|
|
305
|
+
/** Per-source breakdown; the backend serializes it as `Sources`. */
|
|
306
|
+
sources?: EntityConnectionSourceValue[];
|
|
307
|
+
Sources?: EntityConnectionSourceValue[];
|
|
260
308
|
[key: string]: unknown;
|
|
261
309
|
}
|
|
262
310
|
/** A single property key/value captured for a checklist entry. */
|
|
@@ -336,6 +384,50 @@ interface EntityResizeEvent {
|
|
|
336
384
|
newSize: EntitySize;
|
|
337
385
|
}
|
|
338
386
|
|
|
387
|
+
declare const ENTITY_EMPTY_VALUE_PLACEHOLDER = "_";
|
|
388
|
+
declare function isValueMissing(value: unknown): boolean;
|
|
389
|
+
/**
|
|
390
|
+
* Serializes a backend `raw` cell into the string `EntityData.rawValue` holds.
|
|
391
|
+
*
|
|
392
|
+
* Object raws — the Connection payload, the LeafDetails summary — must be
|
|
393
|
+
* JSON-encoded: `String(obj)` yields "[object Object]" and silently destroys
|
|
394
|
+
* the payload the display layer needs to expand them. Primitives keep plain
|
|
395
|
+
* `String()` so dates/percentages/checkboxes are not wrapped in quotes.
|
|
396
|
+
*/
|
|
397
|
+
declare function serializeEntityRawValue(raw: unknown): string | undefined;
|
|
398
|
+
declare function displayOrPlaceholder(value: unknown): string;
|
|
399
|
+
declare function isEntityLabelHidden(configuration?: EntityConfiguration | null): boolean;
|
|
400
|
+
declare function isEntityAlignEnd(configuration?: EntityConfiguration | null): boolean;
|
|
401
|
+
/**
|
|
402
|
+
* The product default: label above value.
|
|
403
|
+
*
|
|
404
|
+
* It used to be `bottom`, which is why Portfolio and Program cards rendered
|
|
405
|
+
* "06/07/2026" then "Start Date" while Project cards — whose properties had
|
|
406
|
+
* been through the property-configuration drawer, and so carry an explicit
|
|
407
|
+
* `labelPosition` — rendered the label first. Two orders inside one Explore
|
|
408
|
+
* module, reachable by clicking a different item in the same sidebar
|
|
409
|
+
* (finding M-13). Label-first reads better down a column of mixed field types,
|
|
410
|
+
* so it is what every unconfigured property now gets.
|
|
411
|
+
*
|
|
412
|
+
* An explicit configuration still wins: an administrator who deliberately
|
|
413
|
+
* chose value-above-label for a property keeps it.
|
|
414
|
+
*/
|
|
415
|
+
declare function resolveEntityLabelPosition(configuration?: EntityConfiguration | null): EntityLabelPosition;
|
|
416
|
+
/**
|
|
417
|
+
* Rewrites a localised numeric string into something `parseFloat` can read.
|
|
418
|
+
*
|
|
419
|
+
* `rawNumericValue` can fall back to the already-formatted display string, so
|
|
420
|
+
* whatever `Intl.NumberFormat` produced has to survive a round trip. Under
|
|
421
|
+
* `ar` that is harmless (Latin digits plus invisible direction marks), but
|
|
422
|
+
* `ar-SA` renders Arabic-Indic digits and an Arabic decimal separator, which
|
|
423
|
+
* parse to NaN — the bar would silently disappear rather than show a value.
|
|
424
|
+
*
|
|
425
|
+
* Handles Arabic-Indic (U+0660-0669) and Eastern Arabic-Indic (U+06F0-06F9)
|
|
426
|
+
* digits, the Arabic decimal separator, thousands separators, and the
|
|
427
|
+
* bidirectional marks Intl inserts around the percent sign.
|
|
428
|
+
*/
|
|
429
|
+
declare function normalizeNumerals(input: string): string;
|
|
430
|
+
|
|
339
431
|
type EntityFieldGap = 'compact' | 'normal' | 'relaxed';
|
|
340
432
|
declare class EntityField {
|
|
341
433
|
readonly label: _angular_core.InputSignal<string>;
|
|
@@ -439,11 +531,8 @@ declare class EntityUser {
|
|
|
439
531
|
readonly showDisplayName: _angular_core.Signal<boolean>;
|
|
440
532
|
readonly showPhoneNumber: _angular_core.Signal<boolean>;
|
|
441
533
|
readonly showEmail: _angular_core.Signal<boolean>;
|
|
442
|
-
/**
|
|
443
|
-
|
|
444
|
-
* its shape while the user's real picture stays hidden.
|
|
445
|
-
*/
|
|
446
|
-
readonly showUserImage: _angular_core.Signal<boolean>;
|
|
534
|
+
/** When off the avatar is dropped entirely, leaving the name on its own. */
|
|
535
|
+
readonly showAvatar: _angular_core.Signal<boolean>;
|
|
447
536
|
readonly phoneNumber: _angular_core.Signal<string>;
|
|
448
537
|
readonly email: _angular_core.Signal<string>;
|
|
449
538
|
readonly hasContactInfo: _angular_core.Signal<boolean>;
|
|
@@ -764,8 +853,46 @@ declare function isLeafDetailsCatalogConfiguration(value: unknown): value is Lea
|
|
|
764
853
|
declare function isLeafDetailsRuntimeValue(value: unknown): value is LeafDetailsRuntimeValue;
|
|
765
854
|
declare function isLeafDetailsSyntheticKey(key?: string | null): boolean;
|
|
766
855
|
declare function expandLeafDetailsEntity(entity: EntityData): EntityData[];
|
|
856
|
+
/**
|
|
857
|
+
* Expands the entity types that render as several items — LeafDetails levels
|
|
858
|
+
* and Connection source levels — then orders the flattened list. Shared by the
|
|
859
|
+
* customization builder canvas and the runtime preview so both agree on what a
|
|
860
|
+
* configured area actually contains.
|
|
861
|
+
*/
|
|
767
862
|
declare function buildDisplayEntities(entities: EntityData[]): EntityData[];
|
|
768
863
|
|
|
864
|
+
/**
|
|
865
|
+
* Separator for the synthetic keys of the per-source-level items a Connection
|
|
866
|
+
* property expands into. Mirrors `LEAF_DETAILS_KEY_SEPARATOR`: the persisted
|
|
867
|
+
* display configuration is still keyed by the real property key, and the split
|
|
868
|
+
* items only exist in the rendered/managed entity list.
|
|
869
|
+
*/
|
|
870
|
+
declare const CONNECTION_KEY_SEPARATOR = "::connlevel::";
|
|
871
|
+
declare function isConnectionSyntheticKey(key?: string | null): boolean;
|
|
872
|
+
declare function buildConnectionKey(propertyKey: string, levelId: number | string): string;
|
|
873
|
+
/** Splits a synthetic key back into the owning property key and its level id. */
|
|
874
|
+
declare function splitConnectionKey(key: string): {
|
|
875
|
+
propertyKey: string;
|
|
876
|
+
levelId: string;
|
|
877
|
+
};
|
|
878
|
+
/**
|
|
879
|
+
* Reads the `sourceLevels` published on a Connection property's catalog
|
|
880
|
+
* configuration. These define the split — one item per source level — and carry
|
|
881
|
+
* the level name used as each item's label.
|
|
882
|
+
*/
|
|
883
|
+
declare function normalizeConnectionSourceLevels(configuration: unknown): ConnectionSourceLevelConfig[];
|
|
884
|
+
/** Picks the source level's localized name for the active document language. */
|
|
885
|
+
declare function resolveConnectionLevelName(level: ConnectionSourceLevelConfig): string;
|
|
886
|
+
/**
|
|
887
|
+
* Splits a Connection entity into one item per source level, so a card shows
|
|
888
|
+
* each connected level under its own name instead of a single comma-joined
|
|
889
|
+
* value under the generic "Connection" label.
|
|
890
|
+
*
|
|
891
|
+
* Falls back to the original entity when the catalog publishes no source
|
|
892
|
+
* levels — without them there is nothing to label the split items with.
|
|
893
|
+
*/
|
|
894
|
+
declare function expandConnectionEntity(entity: EntityData): EntityData[];
|
|
895
|
+
|
|
769
896
|
/**
|
|
770
897
|
* The largest amount still rendered in full.
|
|
771
898
|
*
|
|
@@ -1098,5 +1225,5 @@ declare class EntitiesManage extends EntitiesResizeBase {
|
|
|
1098
1225
|
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>;
|
|
1099
1226
|
}
|
|
1100
1227
|
|
|
1101
|
-
export { CURRENCY_COMPACT_THRESHOLD, 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, compactCurrencyDisplay, currencyUnitOf, expandLeafDetailsEntity, getEntitySectionTitle, groupEntitiesIntoSections, isEntitySection, isLeafDetailsCatalogConfiguration, isLeafDetailsCollectionValue, isLeafDetailsRuntimeValue, isLeafDetailsSyntheticKey, isLeafDetailsValue, isSectionKey, matchesPercentageColorRule, parseCurrencyAmount, resolveLocalizedLabel, resolvePercentageColor };
|
|
1102
|
-
export type { ComparisonValueSide, EntityAttachmentItemValue, EntityAttachmentValue, EntityBaseConfig, EntityClickEvent, EntityComparisonField, EntityComparisonOperation, EntityConfiguration, EntityConnectionValue, EntityData, EntityLabelPosition, EntityLeafDetailsConfig, EntityListComparison, EntityListComparisonRow, EntityLocationValue, EntityLookupCheckListItem, EntityLookupCheckListPropValue, EntityLookupCheckListValue, EntityLookupValue, EntityMultiLookupValue, EntityMultiUserValue, 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, PercentageColorRule, PercentageColorSource, PropertyValueComparison, ValueComparison };
|
|
1228
|
+
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, EntityLeafDetails, EntityLocation, EntityLongText, EntityLookup, EntityLookupModuleCheckList, EntityPercentage, EntityPhaseGate, EntityPreview, EntityPreviewBody, EntityScheduleItem, EntityStatus, EntityText, EntityUser, LEAF_DETAILS_KEY_SEPARATOR, SECTION_KEY_PREFIX, buildConnectionKey, buildDisplayEntities, buildSectionKey, compactCurrencyDisplay, currencyUnitOf, displayOrPlaceholder, expandConnectionEntity, expandLeafDetailsEntity, getEntitySectionTitle, groupEntitiesIntoSections, isConnectionSyntheticKey, isEntityAlignEnd, isEntityLabelHidden, isEntitySection, isLeafDetailsCatalogConfiguration, isLeafDetailsCollectionValue, isLeafDetailsRuntimeValue, isLeafDetailsSyntheticKey, isLeafDetailsValue, isSectionKey, isValueMissing, matchesPercentageColorRule, normalizeConnectionSourceLevels, normalizeNumerals, parseCurrencyAmount, resolveConnectionLevelName, resolveEntityLabelPosition, resolveLocalizedLabel, resolvePercentageColor, serializeEntityRawValue, splitConnectionKey };
|
|
1229
|
+
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, EntityUserConfig, EntityUserValue, EntityViewType, LeafDetailsCatalogConfiguration, LeafDetailsCatalogLevelValue, LeafDetailsCatalogStatusValue, LeafDetailsEntityCollectionValue, LeafDetailsEntityValue, LeafDetailsRuntimeChildSchema, LeafDetailsRuntimeStatusCount, LeafDetailsRuntimeStatusDetails, LeafDetailsRuntimeValue, LeafDetailsStatusSummary, LeafLevelSavedConfig, PercentageColorRule, PercentageColorSource, PropertyValueComparison, ValueComparison };
|
|
@@ -37,14 +37,37 @@ declare class Tabs {
|
|
|
37
37
|
private readonly tabsContainer;
|
|
38
38
|
private readonly measureRow;
|
|
39
39
|
private readonly morePopover;
|
|
40
|
+
private readonly moreBlock;
|
|
40
41
|
private resizeObserver?;
|
|
41
42
|
private measureHandle;
|
|
42
43
|
private alignHandle;
|
|
44
|
+
/** Last real width of the more block; 0 until it has been rendered once. */
|
|
45
|
+
private moreWidth;
|
|
43
46
|
readonly visibleCount: _angular_core.WritableSignal<number>;
|
|
47
|
+
/** Natural width of every option, in order, from the measurement ghost row. */
|
|
48
|
+
private readonly tabWidths;
|
|
49
|
+
/** Room the visible row actually has, once the more button is accounted for. */
|
|
50
|
+
private readonly availableWidth;
|
|
51
|
+
private readonly activeIndex;
|
|
52
|
+
/**
|
|
53
|
+
* The tabs the strip shows — the widest prefix that fits, plus the active tab
|
|
54
|
+
* if that prefix would have hidden it.
|
|
55
|
+
*
|
|
56
|
+
* Without the second half, selecting a tab from the more menu left the strip
|
|
57
|
+
* with nothing selected at all: no underline, and no `aria-selected` on any
|
|
58
|
+
* tab, so neither a sighted user nor a screen reader could tell where they
|
|
59
|
+
* were. A project exposes twenty-three tabs and ten of them sit in the menu,
|
|
60
|
+
* so this is the normal case for a third of the product, not an edge.
|
|
61
|
+
*
|
|
62
|
+
* The active tab is appended rather than swapped in, which keeps the row in
|
|
63
|
+
* the options' own order: everything in the prefix precedes it already.
|
|
64
|
+
* Trailing tabs are dropped until it genuinely fits, using the same measured
|
|
65
|
+
* widths the prefix was chosen with, so pinning never pushes the row wider
|
|
66
|
+
* than the space it was measured against.
|
|
67
|
+
*/
|
|
44
68
|
readonly visibleOptions: _angular_core.Signal<OptionItem[]>;
|
|
45
69
|
readonly overflowOptions: _angular_core.Signal<OptionItem[]>;
|
|
46
70
|
readonly hasOverflow: _angular_core.Signal<boolean>;
|
|
47
|
-
readonly isActiveInOverflow: _angular_core.Signal<boolean>;
|
|
48
71
|
readonly searchThreshold: _angular_core.InputSignal<number>;
|
|
49
72
|
readonly searchTerm: _angular_core.WritableSignal<string>;
|
|
50
73
|
readonly showOverflowSearch: _angular_core.Signal<boolean>;
|