@masterteam/components 0.0.273 → 0.0.275
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-entities.mjs +127 -12
- package/fesm2022/masterteam-components-entities.mjs.map +1 -1
- package/fesm2022/masterteam-components-select-field.mjs +2 -2
- package/fesm2022/masterteam-components-select-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-table.mjs +3 -0
- package/fesm2022/masterteam-components-table.mjs.map +1 -1
- package/package.json +1 -1
- package/types/masterteam-components-entities.d.ts +49 -3
package/package.json
CHANGED
|
@@ -180,6 +180,10 @@ interface EntitySectionConfig extends EntityBaseConfig {
|
|
|
180
180
|
label?: EntitySectionLabel;
|
|
181
181
|
}
|
|
182
182
|
type EntityConfiguration = EntityBaseConfig | EntityUserConfig | EntityPercentageConfig | EntityLeafDetailsConfig | EntityConnectionConfig | EntitySectionConfig;
|
|
183
|
+
/** Value shape for a translatable Text/LongText property: `{ display, ar?, en? }`. */
|
|
184
|
+
interface EntityTranslatableTextValue extends EntitySectionLabel {
|
|
185
|
+
display: string;
|
|
186
|
+
}
|
|
183
187
|
interface EntityStatusValue {
|
|
184
188
|
key: string;
|
|
185
189
|
display: string;
|
|
@@ -370,7 +374,7 @@ interface EntityData {
|
|
|
370
374
|
* props have no label and no view type to render with.
|
|
371
375
|
*/
|
|
372
376
|
nestedProperties?: EntityNestedPropertyMeta[];
|
|
373
|
-
value: string | EntityStatusValue | EntityUserValue | EntityMultiUserValue | EntityLookupValue | EntityMultiLookupValue | EntityPhaseGateValue | EntityAttachmentValue | EntityLocationValue | EntityConnectionValue | EntityScheduleItemValue[] | EntityLookupCheckListValue | EntityLookupCheckListItem[] | LeafDetailsEntityValue | LeafDetailsEntityCollectionValue | LeafDetailsRuntimeValue;
|
|
377
|
+
value: string | EntityTranslatableTextValue | EntityStatusValue | EntityUserValue | EntityMultiUserValue | EntityLookupValue | EntityMultiLookupValue | EntityPhaseGateValue | EntityAttachmentValue | EntityLocationValue | EntityConnectionValue | EntityScheduleItemValue[] | EntityLookupCheckListValue | EntityLookupCheckListItem[] | LeafDetailsEntityValue | LeafDetailsEntityCollectionValue | LeafDetailsRuntimeValue;
|
|
374
378
|
viewType: EntityViewType;
|
|
375
379
|
type?: string;
|
|
376
380
|
configuration?: EntityConfiguration;
|
|
@@ -396,6 +400,12 @@ declare function isValueMissing(value: unknown): boolean;
|
|
|
396
400
|
*/
|
|
397
401
|
declare function serializeEntityRawValue(raw: unknown): string | undefined;
|
|
398
402
|
declare function displayOrPlaceholder(value: unknown): string;
|
|
403
|
+
/**
|
|
404
|
+
* Text/LongText values are a plain string, except for translatable
|
|
405
|
+
* properties, where the backend sends `{ display, ar?, en? }` instead.
|
|
406
|
+
* Unwraps either shape to the string to render.
|
|
407
|
+
*/
|
|
408
|
+
declare function extractDisplayText(value: unknown): string | null;
|
|
399
409
|
declare function isEntityLabelHidden(configuration?: EntityConfiguration | null): boolean;
|
|
400
410
|
declare function isEntityAlignEnd(configuration?: EntityConfiguration | null): boolean;
|
|
401
411
|
/**
|
|
@@ -1225,5 +1235,41 @@ declare class EntitiesManage extends EntitiesResizeBase {
|
|
|
1225
1235
|
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>;
|
|
1226
1236
|
}
|
|
1227
1237
|
|
|
1228
|
-
|
|
1229
|
-
|
|
1238
|
+
/**
|
|
1239
|
+
* Shrinks an atomic value a little rather than letting it truncate.
|
|
1240
|
+
*
|
|
1241
|
+
* A date and an amount are single indivisible facts: `2026/08/16` cut to
|
|
1242
|
+
* `2026/08…` has lost the day, and `100,000 SAR` cut to `100,000 …` has lost
|
|
1243
|
+
* the currency — which is the one part a reader cannot infer. Prose survives an
|
|
1244
|
+
* ellipsis; these do not, so they get one lever before it.
|
|
1245
|
+
*
|
|
1246
|
+
* Why measure instead of thresholding. The first pass at this capped currency
|
|
1247
|
+
* by magnitude — compact anything above 100,000 — with the threshold read off
|
|
1248
|
+
* one measured card slot. But slot width is a property of the card layout, not
|
|
1249
|
+
* of the number: the three-across boxes on an Explore card are far narrower
|
|
1250
|
+
* than the slot that was measured, so `100,000 SAR` and `50,000 SAR` sat under
|
|
1251
|
+
* the threshold and truncated anyway. No constant can know the width it has.
|
|
1252
|
+
* This asks the element.
|
|
1253
|
+
*
|
|
1254
|
+
* The element keeps its `truncate`, so anything still too long at the floor
|
|
1255
|
+
* ellipsizes exactly as before — with the tooltip callers already attach
|
|
1256
|
+
* carrying the full value. Shrinking is a nudge, never the whole answer.
|
|
1257
|
+
*/
|
|
1258
|
+
declare class FitText {
|
|
1259
|
+
/** Set false to leave a particular instance alone. */
|
|
1260
|
+
readonly mtFitText: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
1261
|
+
private readonly host;
|
|
1262
|
+
private readonly destroyRef;
|
|
1263
|
+
private basePx;
|
|
1264
|
+
private frame;
|
|
1265
|
+
private resizeObserver?;
|
|
1266
|
+
private mutationObserver?;
|
|
1267
|
+
constructor();
|
|
1268
|
+
private schedule;
|
|
1269
|
+
private fit;
|
|
1270
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FitText, never>;
|
|
1271
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<FitText, "[mtFitText]", never, { "mtFitText": { "alias": "mtFitText"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1272
|
+
}
|
|
1273
|
+
|
|
1274
|
+
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, 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, resolveEntityLabelPosition, resolveLocalizedLabel, resolvePercentageColor, serializeEntityRawValue, splitConnectionKey };
|
|
1275
|
+
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 };
|