@masterteam/components 0.0.325 → 0.0.326
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
|
@@ -178,6 +178,24 @@ interface EntityBaseConfig {
|
|
|
178
178
|
* renderer preserves the author's own line breaks instead.
|
|
179
179
|
*/
|
|
180
180
|
info?: EntitySectionLabel;
|
|
181
|
+
/**
|
|
182
|
+
* Renders the entity as the card's header instead of a grid cell: a
|
|
183
|
+
* full-width band pinned above every other entity, showing the value
|
|
184
|
+
* centred with no label. Its presence is the switch — absent ⇒ an ordinary
|
|
185
|
+
* cell.
|
|
186
|
+
*
|
|
187
|
+
* Text view types only, and one per display area. The customization drawer
|
|
188
|
+
* enforces both; the renderers only honour the first Text entity carrying
|
|
189
|
+
* it, so a configuration written elsewhere cannot produce two headers.
|
|
190
|
+
*/
|
|
191
|
+
header?: EntityHeaderConfig;
|
|
192
|
+
}
|
|
193
|
+
/** Colours of an entity rendered as a card header (`EntityBaseConfig.header`). */
|
|
194
|
+
interface EntityHeaderConfig {
|
|
195
|
+
/** Band background, `#rrggbb`. Absent ⇒ a light tint of the primary colour. */
|
|
196
|
+
backgroundColor?: string | null;
|
|
197
|
+
/** Top border, `#rrggbb`. Absent ⇒ the primary colour. */
|
|
198
|
+
borderColor?: string | null;
|
|
181
199
|
}
|
|
182
200
|
interface EntityUserConfig extends EntityBaseConfig {
|
|
183
201
|
showDisplayName?: boolean;
|
|
@@ -1333,7 +1351,7 @@ declare class EntityAttachment {
|
|
|
1333
1351
|
readonly data: _angular_core.InputSignal<EntityData | undefined>;
|
|
1334
1352
|
readonly name: _angular_core.InputSignal<string | undefined>;
|
|
1335
1353
|
readonly shape: _angular_core.InputSignal<"compact" | "default">;
|
|
1336
|
-
readonly value: _angular_core.InputSignal<string |
|
|
1354
|
+
readonly value: _angular_core.InputSignal<string | EntityAttachmentValue | EntityAttachmentItemValue | null | undefined>;
|
|
1337
1355
|
readonly endPoint: _angular_core.InputSignal<string>;
|
|
1338
1356
|
readonly context: _angular_core.InputSignal<HttpContext | undefined>;
|
|
1339
1357
|
private readonly httpClient;
|
|
@@ -1786,9 +1804,10 @@ declare function splitLeafKey(key: string): {
|
|
|
1786
1804
|
declare function expandLeafDetailsEntity(entity: EntityData): EntityData[];
|
|
1787
1805
|
/**
|
|
1788
1806
|
* Expands the entity types that render as several items — LeafDetails levels
|
|
1789
|
-
* and Connection source levels — then orders the flattened list
|
|
1790
|
-
*
|
|
1791
|
-
* configured area actually
|
|
1807
|
+
* and Connection source levels — then orders the flattened list, with the card
|
|
1808
|
+
* header (if any) pinned first. Shared by the customization builder canvas and
|
|
1809
|
+
* the runtime preview so both agree on what a configured area actually
|
|
1810
|
+
* contains.
|
|
1792
1811
|
*/
|
|
1793
1812
|
declare function buildDisplayEntities(entities: EntityData[]): EntityData[];
|
|
1794
1813
|
|
|
@@ -1934,6 +1953,75 @@ declare function groupEntitiesIntoSections(entities: EntityData[]): EntitySectio
|
|
|
1934
1953
|
*/
|
|
1935
1954
|
declare function getEntitySectionTitle(section: EntityData | null | undefined, lang?: string): string;
|
|
1936
1955
|
|
|
1956
|
+
/**
|
|
1957
|
+
* View types that can be rendered as a card header.
|
|
1958
|
+
*
|
|
1959
|
+
* Text only, deliberately: the header is one centred line naming the record,
|
|
1960
|
+
* and no other view type reads as that — a date, a status chip or a progress
|
|
1961
|
+
* bar stretched across the top of a card is decoration, not a title.
|
|
1962
|
+
*/
|
|
1963
|
+
declare const ENTITY_HEADER_VIEW_TYPES: ReadonlySet<string>;
|
|
1964
|
+
/** True when a property of this view type may be set as the card header. */
|
|
1965
|
+
declare function canEntityBeHeader(viewType: string | null | undefined): boolean;
|
|
1966
|
+
/**
|
|
1967
|
+
* The entity's header settings, or `null` when it renders as an ordinary cell.
|
|
1968
|
+
* A `header` saved on a view type that cannot be one is ignored rather than
|
|
1969
|
+
* honoured, so the renderers and the builder agree on what is a header.
|
|
1970
|
+
*/
|
|
1971
|
+
declare function resolveEntityHeader(entity: EntityData | null | undefined): EntityHeaderConfig | null;
|
|
1972
|
+
/** True when the entity renders as the card header. */
|
|
1973
|
+
declare function isEntityHeader(entity: EntityData | null | undefined): boolean;
|
|
1974
|
+
/**
|
|
1975
|
+
* Moves the first header entity to the front of an order-sorted list.
|
|
1976
|
+
*
|
|
1977
|
+
* The header is drawn above the card whatever its saved `order`, so it is
|
|
1978
|
+
* pinned here — in the one ordering every renderer and the builder share —
|
|
1979
|
+
* rather than in each of them. That keeps the builder's drag indexes, its
|
|
1980
|
+
* section-insert index and the runtime card all agreeing on the same list.
|
|
1981
|
+
*
|
|
1982
|
+
* Only the first is moved: a second entity flagged as a header (the drawer
|
|
1983
|
+
* allows one per area, but a configuration can be written elsewhere) stays an
|
|
1984
|
+
* ordinary cell where it is.
|
|
1985
|
+
*/
|
|
1986
|
+
declare function pinEntityHeaderFirst(entities: EntityData[]): EntityData[];
|
|
1987
|
+
/**
|
|
1988
|
+
* The colours a header with none picked is painted in, as `#rrggbb` — the
|
|
1989
|
+
* values `entity-header.css` produces: the theme's primary as the top border
|
|
1990
|
+
* and a 10% primary tint over white as the background. For showing an author
|
|
1991
|
+
* the defaults (the customization drawer's colour fields), not for saving
|
|
1992
|
+
* them: a stored hex would stop following the tenant's primary colour.
|
|
1993
|
+
*
|
|
1994
|
+
* `null` when the primary colour cannot be resolved in this document.
|
|
1995
|
+
*/
|
|
1996
|
+
declare function readEntityHeaderDefaults(doc: Document): Required<EntityHeaderConfig> | null;
|
|
1997
|
+
|
|
1998
|
+
/**
|
|
1999
|
+
* A Text entity configured as the card header (`configuration.header`): a
|
|
2000
|
+
* full-width band with a coloured top border and the value centred, no label.
|
|
2001
|
+
*
|
|
2002
|
+
* The band covers its host's padding so it sits flush against the card's top
|
|
2003
|
+
* and side edges. A padded host declares how much padding there is through
|
|
2004
|
+
* three custom properties — see `entity-header.css`. Without them the band
|
|
2005
|
+
* stays inside the content box with ordinary rounded corners.
|
|
2006
|
+
*/
|
|
2007
|
+
declare class EntityHeader {
|
|
2008
|
+
readonly data: _angular_core.InputSignal<EntityData>;
|
|
2009
|
+
private readonly header;
|
|
2010
|
+
/** `null` leaves the stylesheet's primary tint in place. */
|
|
2011
|
+
readonly backgroundColor: _angular_core.Signal<string | null>;
|
|
2012
|
+
/** `null` leaves the stylesheet's primary border in place. */
|
|
2013
|
+
readonly borderColor: _angular_core.Signal<string | null>;
|
|
2014
|
+
/**
|
|
2015
|
+
* A chosen background can be any colour at all, so the ink is picked to read
|
|
2016
|
+
* on it. The default tint is translucent over the card, so it keeps the
|
|
2017
|
+
* theme's own text colour — which is what flips correctly in dark mode.
|
|
2018
|
+
*/
|
|
2019
|
+
readonly textColor: _angular_core.Signal<string | null>;
|
|
2020
|
+
readonly displayValue: _angular_core.Signal<string>;
|
|
2021
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<EntityHeader, never>;
|
|
2022
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<EntityHeader, "mt-entity-header", never, { "data": { "alias": "data"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
2023
|
+
}
|
|
2024
|
+
|
|
1937
2025
|
declare class EntityPreview {
|
|
1938
2026
|
private readonly transloco;
|
|
1939
2027
|
readonly data: _angular_core.InputSignal<EntityData>;
|
|
@@ -1947,7 +2035,7 @@ declare class EntityPreview {
|
|
|
1947
2035
|
* `mt-entity-preview` usages in the app.
|
|
1948
2036
|
*/
|
|
1949
2037
|
readonly infoText: _angular_core.Signal<string>;
|
|
1950
|
-
readonly comparisonKind: _angular_core.Signal<"
|
|
2038
|
+
readonly comparisonKind: _angular_core.Signal<"EntityList" | "Value" | null>;
|
|
1951
2039
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<EntityPreview, never>;
|
|
1952
2040
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<EntityPreview, "mt-entity-preview", never, { "data": { "alias": "data"; "required": true; "isSignal": true; }; "attachmentShape": { "alias": "attachmentShape"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1953
2041
|
}
|
|
@@ -2079,9 +2167,14 @@ declare class EntitiesPreview {
|
|
|
2079
2167
|
/** Entities expanded and sorted by order */
|
|
2080
2168
|
readonly displayEntities: _angular_core.Signal<EntityData[]>;
|
|
2081
2169
|
/**
|
|
2082
|
-
* The
|
|
2083
|
-
*
|
|
2084
|
-
|
|
2170
|
+
* The entity drawn as the card header, or `null`. `buildDisplayEntities`
|
|
2171
|
+
* pins it first, so only the head of the list needs checking.
|
|
2172
|
+
*/
|
|
2173
|
+
readonly header: _angular_core.Signal<EntityData | null>;
|
|
2174
|
+
/**
|
|
2175
|
+
* The display entities, minus the header, split into section groups. With
|
|
2176
|
+
* no `Section` markers this is a single `{ section: null }` group, so the
|
|
2177
|
+
* bare grid renders exactly as before.
|
|
2085
2178
|
*/
|
|
2086
2179
|
readonly sectionGroups: _angular_core.Signal<_masterteam_components_entities.EntitySectionGroup[]>;
|
|
2087
2180
|
/**
|
|
@@ -2163,12 +2256,26 @@ declare class EntitiesManage extends EntitiesResizeBase {
|
|
|
2163
2256
|
}>;
|
|
2164
2257
|
/** Entities expanded and sorted by their configured order */
|
|
2165
2258
|
readonly displayEntities: _angular_core.Signal<EntityData[]>;
|
|
2259
|
+
/**
|
|
2260
|
+
* The card header, or `null`. `buildDisplayEntities` pins it first, which is
|
|
2261
|
+
* also where it renders — so it stays in the drop list's data and every drag
|
|
2262
|
+
* index the host receives still lines up with the host's own entity list.
|
|
2263
|
+
*/
|
|
2264
|
+
readonly header: _angular_core.Signal<EntityData | null>;
|
|
2265
|
+
/**
|
|
2266
|
+
* Keeps every drop below the header. The header is drawn above the card
|
|
2267
|
+
* whatever its order, so an item dropped in front of it would land somewhere
|
|
2268
|
+
* other than where the user let go of it.
|
|
2269
|
+
*/
|
|
2270
|
+
readonly sortPredicate: (index: number) => boolean;
|
|
2166
2271
|
/** Returns the grid-column span for a given entity size (1-24) */
|
|
2167
2272
|
getColSpan(entity: EntityData): string;
|
|
2168
2273
|
/** Returns the grid-row span (`null` = single row) for a given entity */
|
|
2169
2274
|
getRowSpan(entity: EntityData): string | null;
|
|
2170
2275
|
/** True when the entity is a full-width `Section` layout marker. */
|
|
2171
2276
|
isSection(entity: EntityData): boolean;
|
|
2277
|
+
/** True when the entity is the pinned card header. */
|
|
2278
|
+
isHeader(entity: EntityData): boolean;
|
|
2172
2279
|
/** Handle drag-drop reorder */
|
|
2173
2280
|
onDrop(event: CdkDragDrop<EntityData[]>): void;
|
|
2174
2281
|
protected onResizeComplete(entity: EntityData, previousSize: EntitySize, newSize: EntitySize): void;
|
|
@@ -2214,5 +2321,5 @@ declare class FitText {
|
|
|
2214
2321
|
|
|
2215
2322
|
declare function sharedActiveLang(transloco: TranslocoService): Signal<string>;
|
|
2216
2323
|
|
|
2217
|
-
export { CONNECTION_KEY_SEPARATOR, CURRENCY_COMPACT_THRESHOLD, ComparisonEntityList, ComparisonValue, DEFAULT_PERFORMANCE_SCORE_CHART_SIZE, DEFAULT_PHASE_GATE_COLOR, ENTITY_EMPTY_VALUE_PLACEHOLDER, ENTITY_LIST_TABLE_COMPONENT, ENTITY_ROW_SPANS, EntitiesManage, EntitiesPreview, EntitiesResizeBase, EntityAttachment, EntityCheckbox, EntityConnection, EntityCurrency, EntityDate, EntityField, EntityIcon, EntityLeafDetails, EntityListDrawer, EntityListPreview, EntityLocation, EntityLongText, EntityLookup, EntityLookupModuleCheckList, EntityPercentage, EntityPerformanceScore, EntityPhaseGate, EntityPreview, EntityPreviewBody, EntityRuntimeContextStore, EntityScheduleItem, EntityStatus, EntityText, EntityUser, FitText, LEAF_DETAILS_KEY_SEPARATOR, LEAF_PHASES_KEY_SEPARATOR, PERFORMANCE_SCORE_CHART_SIZES, SECTION_KEY_PREFIX, buildConnectionKey, buildDisplayEntities, buildEntityListRows, buildSectionKey, compactCurrencyDisplay, currencyUnitOf, displayOrPlaceholder, expandConnectionEntity, expandLeafDetailsEntity, extractDisplayText, getEntitySectionTitle, getPerformanceScoreBands, groupEntitiesIntoSections, humanizeEntityListKey, isConnectionSyntheticKey, isEntityAlignEnd, isEntityLabelHidden, isEntityListLocalDocument, isEntityListSelectionDocument, isEntitySection, isLeafDetailsCatalogConfiguration, isLeafDetailsCollectionValue, isLeafDetailsRuntimeValue, isLeafDetailsSyntheticKey, isLeafDetailsValue, isLeafPhasesSyntheticKey, isLeafSyntheticKey, isSectionKey, isValueMissing, localCellsByFieldId, matchesPercentageColorRule, mergeStakeholderNameColumns, mergeStakeholderNameEntities, mergeStakeholderNameRows, normalizeConnectionSourceLevels, normalizeNumerals, parseCurrencyAmount, parsePerformanceScore, readEntityValueColor, resolveConnectionLevelName, resolveEntityGridRow, resolveEntityInfo, resolveEntityLabelPosition, resolveLocalFieldConfiguration, resolveLocalFieldLabel, resolveLocalFieldViewType, resolveLocalizedLabel, resolvePercentageColor, resolvePerformanceScoreStatus, serializeEntityRawValue, sharedActiveLang, sortLocalRows, splitConnectionKey, splitLeafKey, summarizeEntityListRows, visibleLocalSchemaFields };
|
|
2218
|
-
export type { ComparisonValueSide, ConnectionCatalogConfiguration, ConnectionLevelSavedConfig, ConnectionSourceLevelConfig, EntityAttachmentItemValue, EntityAttachmentValue, EntityBaseConfig, EntityClickEvent, EntityComparisonField, EntityComparisonOperation, EntityConfiguration, EntityConnectionConfig, EntityConnectionSourceValue, EntityConnectionValue, EntityData, EntityLabelPosition, EntityLeafDetailsConfig, EntityListComparison, EntityListComparisonRow, EntityListEntityValue, EntityListInlineFieldMeta, EntityListLocalCell, EntityListLocalDocument, EntityListLocalFieldDefinition, EntityListLocalFieldWidth, EntityListLocalRow, EntityListLocalSchema, EntityListLocalSchemaField, EntityListRenderedRow, EntityListRowValue, EntityListSelectionDocument, EntityListSelectionRecord, EntityListSelectionRecordValue, EntityListTableHost, EntityListTranslatable, EntityListValueItem, EntityLocationValue, EntityLookupCheckListItem, EntityLookupCheckListPropValue, EntityLookupCheckListValue, EntityLookupValue, EntityMultiLookupValue, EntityMultiUserValue, EntityNestedPropertyMeta, EntityPercentageConfig, EntityPerformanceScoreChartSize, EntityPerformanceScoreConfig, EntityPerformanceScoreStatus, EntityPerformanceScoreValue, EntityPhaseGateValue, EntityPropertyConfiguration, EntityResizeEvent, EntityRowSpan, EntityRuntimeContext, 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, PercentageColorMode, PercentageColorPropertyRef, PercentageColorRule, PercentageColorSource, PropertyValueComparison, ValueComparison };
|
|
2324
|
+
export { CONNECTION_KEY_SEPARATOR, CURRENCY_COMPACT_THRESHOLD, ComparisonEntityList, ComparisonValue, DEFAULT_PERFORMANCE_SCORE_CHART_SIZE, DEFAULT_PHASE_GATE_COLOR, ENTITY_EMPTY_VALUE_PLACEHOLDER, ENTITY_HEADER_VIEW_TYPES, ENTITY_LIST_TABLE_COMPONENT, ENTITY_ROW_SPANS, EntitiesManage, EntitiesPreview, EntitiesResizeBase, EntityAttachment, EntityCheckbox, EntityConnection, EntityCurrency, EntityDate, EntityField, EntityHeader, EntityIcon, EntityLeafDetails, EntityListDrawer, EntityListPreview, EntityLocation, EntityLongText, EntityLookup, EntityLookupModuleCheckList, EntityPercentage, EntityPerformanceScore, EntityPhaseGate, EntityPreview, EntityPreviewBody, EntityRuntimeContextStore, EntityScheduleItem, EntityStatus, EntityText, EntityUser, FitText, LEAF_DETAILS_KEY_SEPARATOR, LEAF_PHASES_KEY_SEPARATOR, PERFORMANCE_SCORE_CHART_SIZES, SECTION_KEY_PREFIX, buildConnectionKey, buildDisplayEntities, buildEntityListRows, buildSectionKey, canEntityBeHeader, compactCurrencyDisplay, currencyUnitOf, displayOrPlaceholder, expandConnectionEntity, expandLeafDetailsEntity, extractDisplayText, getEntitySectionTitle, getPerformanceScoreBands, groupEntitiesIntoSections, humanizeEntityListKey, isConnectionSyntheticKey, isEntityAlignEnd, isEntityHeader, isEntityLabelHidden, isEntityListLocalDocument, isEntityListSelectionDocument, isEntitySection, isLeafDetailsCatalogConfiguration, isLeafDetailsCollectionValue, isLeafDetailsRuntimeValue, isLeafDetailsSyntheticKey, isLeafDetailsValue, isLeafPhasesSyntheticKey, isLeafSyntheticKey, isSectionKey, isValueMissing, localCellsByFieldId, matchesPercentageColorRule, mergeStakeholderNameColumns, mergeStakeholderNameEntities, mergeStakeholderNameRows, normalizeConnectionSourceLevels, normalizeNumerals, parseCurrencyAmount, parsePerformanceScore, pinEntityHeaderFirst, readEntityHeaderDefaults, readEntityValueColor, resolveConnectionLevelName, resolveEntityGridRow, resolveEntityHeader, resolveEntityInfo, resolveEntityLabelPosition, resolveLocalFieldConfiguration, resolveLocalFieldLabel, resolveLocalFieldViewType, resolveLocalizedLabel, resolvePercentageColor, resolvePerformanceScoreStatus, serializeEntityRawValue, sharedActiveLang, sortLocalRows, splitConnectionKey, splitLeafKey, summarizeEntityListRows, visibleLocalSchemaFields };
|
|
2325
|
+
export type { ComparisonValueSide, ConnectionCatalogConfiguration, ConnectionLevelSavedConfig, ConnectionSourceLevelConfig, EntityAttachmentItemValue, EntityAttachmentValue, EntityBaseConfig, EntityClickEvent, EntityComparisonField, EntityComparisonOperation, EntityConfiguration, EntityConnectionConfig, EntityConnectionSourceValue, EntityConnectionValue, EntityData, EntityHeaderConfig, EntityLabelPosition, EntityLeafDetailsConfig, EntityListComparison, EntityListComparisonRow, EntityListEntityValue, EntityListInlineFieldMeta, EntityListLocalCell, EntityListLocalDocument, EntityListLocalFieldDefinition, EntityListLocalFieldWidth, EntityListLocalRow, EntityListLocalSchema, EntityListLocalSchemaField, EntityListRenderedRow, EntityListRowValue, EntityListSelectionDocument, EntityListSelectionRecord, EntityListSelectionRecordValue, EntityListTableHost, EntityListTranslatable, EntityListValueItem, EntityLocationValue, EntityLookupCheckListItem, EntityLookupCheckListPropValue, EntityLookupCheckListValue, EntityLookupValue, EntityMultiLookupValue, EntityMultiUserValue, EntityNestedPropertyMeta, EntityPercentageConfig, EntityPerformanceScoreChartSize, EntityPerformanceScoreConfig, EntityPerformanceScoreStatus, EntityPerformanceScoreValue, EntityPhaseGateValue, EntityPropertyConfiguration, EntityResizeEvent, EntityRowSpan, EntityRuntimeContext, 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, PercentageColorMode, PercentageColorPropertyRef, PercentageColorRule, PercentageColorSource, PropertyValueComparison, ValueComparison };
|