@masterteam/components 0.0.281 → 0.0.282

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@masterteam/components",
3
- "version": "0.0.281",
3
+ "version": "0.0.282",
4
4
  "publishConfig": {
5
5
  "directory": "../../../dist/masterteam/components",
6
6
  "linkDirectory": true,
@@ -1,10 +1,11 @@
1
1
  import * as _masterteam_components_entities from '@masterteam/components/entities';
2
2
  import * as _angular_core from '@angular/core';
3
- import { ElementRef, NgZone } from '@angular/core';
3
+ import { ElementRef, NgZone, Signal } from '@angular/core';
4
4
  import { MTDateFormatType } from '@masterteam/components';
5
5
  import { MTIcon } from '@masterteam/icons';
6
6
  import { HttpContext } from '@angular/common/http';
7
7
  import { CdkDragDrop } from '@angular/cdk/drag-drop';
8
+ import { TranslocoService } from '@jsverse/transloco';
8
9
 
9
10
  interface ComparisonValueSide {
10
11
  raw: unknown;
@@ -86,6 +87,16 @@ interface EntityBaseConfig {
86
87
  * label; it also serves as the heading for `Section` markers.
87
88
  */
88
89
  label?: EntitySectionLabel;
90
+ /**
91
+ * Admin-authored explanatory note, localized. When present the entity grows a
92
+ * small info affordance at its top-end corner that reveals this text on hover.
93
+ *
94
+ * Plain text, deliberately. Every string inside a `configuration` payload is
95
+ * sanitized server-side with the PlainText profile, which strips HTML tags
96
+ * outright — rich markup authored here would come back as bare words. The
97
+ * renderer preserves the author's own line breaks instead.
98
+ */
99
+ info?: EntitySectionLabel;
89
100
  }
90
101
  interface EntityUserConfig extends EntityBaseConfig {
91
102
  showDisplayName?: boolean;
@@ -416,6 +427,16 @@ declare function displayOrPlaceholder(value: unknown): string;
416
427
  declare function extractDisplayText(value: unknown): string | null;
417
428
  declare function isEntityLabelHidden(configuration?: EntityConfiguration | null): boolean;
418
429
  declare function isEntityAlignEnd(configuration?: EntityConfiguration | null): boolean;
430
+ /**
431
+ * The admin-authored note attached to a property in the customization drawer
432
+ * (`configuration.info`), resolved for the active language.
433
+ *
434
+ * Returns `''` when there is no note, which is what the renderer keys off to
435
+ * decide whether the entity gets an info affordance at all. The drawer omits
436
+ * the key entirely rather than writing an empty object, so "absent" and "blank"
437
+ * collapse to the same answer here on purpose.
438
+ */
439
+ declare function resolveEntityInfo(configuration?: EntityConfiguration | null, lang?: string): string;
419
440
  /**
420
441
  * The product default: label above value.
421
442
  *
@@ -1041,8 +1062,18 @@ declare function groupEntitiesIntoSections(entities: EntityData[]): EntitySectio
1041
1062
  declare function getEntitySectionTitle(section: EntityData | null | undefined, lang?: string): string;
1042
1063
 
1043
1064
  declare class EntityPreview {
1065
+ private readonly transloco;
1044
1066
  readonly data: _angular_core.InputSignal<EntityData>;
1045
1067
  readonly attachmentShape: _angular_core.InputSignal<"compact" | "default">;
1068
+ private readonly activeLang;
1069
+ /**
1070
+ * The admin-authored note for the active language, or `''` when the property
1071
+ * has none. Resolved here rather than in each `entity-*` component because
1072
+ * this is the one wrapper every view type and every call site passes through
1073
+ * — the card grid, the customization builder preview, and the standalone
1074
+ * `mt-entity-preview` usages in the app.
1075
+ */
1076
+ readonly infoText: _angular_core.Signal<string>;
1046
1077
  readonly comparisonKind: _angular_core.Signal<"Value" | "EntityList" | null>;
1047
1078
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<EntityPreview, never>;
1048
1079
  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>;
@@ -1298,5 +1329,7 @@ declare class FitText {
1298
1329
  static ɵdir: _angular_core.ɵɵDirectiveDeclaration<FitText, "[mtFitText]", never, { "mtFitText": { "alias": "mtFitText"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
1299
1330
  }
1300
1331
 
1301
- 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, resolveEntityLabelPosition, resolveLocalizedLabel, resolvePercentageColor, serializeEntityRawValue, splitConnectionKey };
1332
+ declare function sharedActiveLang(transloco: TranslocoService): Signal<string>;
1333
+
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 };
1302
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 };
@@ -297,7 +297,11 @@ interface FunctionCategoryGroup {
297
297
  interface OperatorDefinition {
298
298
  symbol: string;
299
299
  name: string;
300
- type: 'arithmetic' | 'comparison' | 'logical';
300
+ /**
301
+ * 'grouping' covers the syntax pieces the toolbar also has to offer — the
302
+ * parens that override precedence and the comma that separates arguments.
303
+ */
304
+ type: 'arithmetic' | 'comparison' | 'logical' | 'grouping';
301
305
  description: string;
302
306
  precedence: number;
303
307
  }