@masterteam/components 0.0.316 → 0.0.317

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.
@@ -368,26 +368,26 @@ class EntityField {
368
368
  return `flex min-w-0 ${directionClass} ${gapClass} ${alignClass}`.trimEnd();
369
369
  }, ...(ngDevMode ? [{ debugName: "containerClass" }] : /* istanbul ignore next */ []));
370
370
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EntityField, deps: [], target: i0.ɵɵFactoryTarget.Component });
371
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: EntityField, isStandalone: true, selector: "mt-entity-field", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, labelIconName: { classPropertyName: "labelIconName", publicName: "labelIconName", isSignal: true, isRequired: false, transformFunction: null }, configuration: { classPropertyName: "configuration", publicName: "configuration", isSignal: true, isRequired: false, transformFunction: null }, gap: { classPropertyName: "gap", publicName: "gap", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "block min-w-0 w-full" }, ngImport: i0, template: `
372
- <div [class]="containerClass()">
373
- <div [class]="contentContainerClass()">
374
- <ng-content />
375
- </div>
376
- @if (!hideLabel()) {
377
- <div [class]="labelContainerClass()">
378
- @if (labelIconName(); as iconName) {
379
- <mt-icon [icon]="iconName" size="xs" class="shrink-0" />
380
- }
381
- <span
382
- class="block min-w-0 truncate"
383
- mtTruncateTooltip
384
- tooltipPosition="top"
385
- >
386
- {{ label() }}
387
- </span>
388
- </div>
389
- }
390
- </div>
371
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: EntityField, isStandalone: true, selector: "mt-entity-field", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, labelIconName: { classPropertyName: "labelIconName", publicName: "labelIconName", isSignal: true, isRequired: false, transformFunction: null }, configuration: { classPropertyName: "configuration", publicName: "configuration", isSignal: true, isRequired: false, transformFunction: null }, gap: { classPropertyName: "gap", publicName: "gap", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "block min-w-0 w-full" }, ngImport: i0, template: `
372
+ <div [class]="containerClass()">
373
+ <div [class]="contentContainerClass()">
374
+ <ng-content />
375
+ </div>
376
+ @if (!hideLabel()) {
377
+ <div [class]="labelContainerClass()">
378
+ @if (labelIconName(); as iconName) {
379
+ <mt-icon [icon]="iconName" size="xs" class="shrink-0" />
380
+ }
381
+ <span
382
+ class="block min-w-0 truncate"
383
+ mtTruncateTooltip
384
+ tooltipPosition="top"
385
+ >
386
+ {{ label() }}
387
+ </span>
388
+ </div>
389
+ }
390
+ </div>
391
391
  `, isInline: true, dependencies: [{ kind: "directive", type: TruncateTooltip, selector: "[mtTruncateTooltip]" }, { kind: "component", type: Icon, selector: "mt-icon", inputs: ["icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
392
392
  }
393
393
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EntityField, decorators: [{
@@ -396,26 +396,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
396
396
  selector: 'mt-entity-field',
397
397
  changeDetection: ChangeDetectionStrategy.OnPush,
398
398
  imports: [TruncateTooltip, Icon],
399
- template: `
400
- <div [class]="containerClass()">
401
- <div [class]="contentContainerClass()">
402
- <ng-content />
403
- </div>
404
- @if (!hideLabel()) {
405
- <div [class]="labelContainerClass()">
406
- @if (labelIconName(); as iconName) {
407
- <mt-icon [icon]="iconName" size="xs" class="shrink-0" />
408
- }
409
- <span
410
- class="block min-w-0 truncate"
411
- mtTruncateTooltip
412
- tooltipPosition="top"
413
- >
414
- {{ label() }}
415
- </span>
416
- </div>
417
- }
418
- </div>
399
+ template: `
400
+ <div [class]="containerClass()">
401
+ <div [class]="contentContainerClass()">
402
+ <ng-content />
403
+ </div>
404
+ @if (!hideLabel()) {
405
+ <div [class]="labelContainerClass()">
406
+ @if (labelIconName(); as iconName) {
407
+ <mt-icon [icon]="iconName" size="xs" class="shrink-0" />
408
+ }
409
+ <span
410
+ class="block min-w-0 truncate"
411
+ mtTruncateTooltip
412
+ tooltipPosition="top"
413
+ >
414
+ {{ label() }}
415
+ </span>
416
+ </div>
417
+ }
418
+ </div>
419
419
  `,
420
420
  host: {
421
421
  class: 'block min-w-0 w-full',
@@ -1224,6 +1224,295 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
1224
1224
  args: [{ selector: 'mt-entity-phase-gate', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [EntityField], template: "<mt-entity-field\r\n [label]=\"displayName()\"\r\n [configuration]=\"data()?.configuration\"\r\n gap=\"normal\"\r\n>\r\n @if (hasValue()) {\r\n <span\r\n class=\"inline-flex items-center px-3 py-2 rounded-md text-xs font-semibold w-fit\"\r\n [style]=\"badgeStyle()\"\r\n >\r\n {{ phaseGateLabel() }}\r\n </span>\r\n } @else {\r\n <span\r\n class=\"inline-flex items-center px-3 py-2 rounded-md text-xs font-semibold w-fit text-gray-500 bg-gray-100\"\r\n >\r\n {{ emptyLabel }}\r\n </span>\r\n }\r\n</mt-entity-field>\r\n" }]
1225
1225
  }], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }] } });
1226
1226
 
1227
+ /**
1228
+ * One shared active-language signal per `TranslocoService`.
1229
+ *
1230
+ * `mt-entity-preview` renders once per property per record — a client-list card
1231
+ * grid mounts thousands of them — so a `toSignal(langChanges$)` inside each
1232
+ * instance would open thousands of subscriptions to the same Subject just to
1233
+ * read one global value. The language is global, so the signal is too: created
1234
+ * once, cached against the service, and shared by every entity that needs it.
1235
+ *
1236
+ * `manualCleanup` is deliberate. The cached signal outlives any single
1237
+ * component by design, and the service it hangs off is the root injector's —
1238
+ * tying its subscription to whichever entity happened to ask first would tear
1239
+ * it down the moment that entity scrolled out of view.
1240
+ */
1241
+ const langSignals = new WeakMap();
1242
+ function sharedActiveLang(transloco) {
1243
+ const cached = langSignals.get(transloco);
1244
+ if (cached) {
1245
+ return cached;
1246
+ }
1247
+ const lang = toSignal(transloco.langChanges$, {
1248
+ initialValue: transloco.getActiveLang(),
1249
+ manualCleanup: true,
1250
+ });
1251
+ langSignals.set(transloco, lang);
1252
+ return lang;
1253
+ }
1254
+
1255
+ /**
1256
+ * Shared reading of a `PerformanceScore` value. The gauge draws from it and the
1257
+ * table resolver filters by it, so a card's pill and the filter it sets can
1258
+ * never disagree about which status a record is in.
1259
+ */
1260
+ /** Every `chartSize`, smallest first — the order the drawer offers them in. */
1261
+ const PERFORMANCE_SCORE_CHART_SIZES = ['small', 'medium', 'large', 'full'];
1262
+ /** The cap applied when a display configuration carries no `chartSize`. */
1263
+ const DEFAULT_PERFORMANCE_SCORE_CHART_SIZE = 'medium';
1264
+ /** The score as a number, or `null` when there is no measurement. */
1265
+ function parsePerformanceScore(raw) {
1266
+ if (typeof raw === 'number')
1267
+ return Number.isFinite(raw) ? raw : null;
1268
+ if (isValueMissing(raw))
1269
+ return null;
1270
+ const parsed = Number.parseFloat(normalizeNumerals(String(raw)).replace(/[%٪]/g, '').trim());
1271
+ return Number.isNaN(parsed) ? null : parsed;
1272
+ }
1273
+ /** Bands with at least one bound, ordered along the arc. */
1274
+ function getPerformanceScoreBands(value) {
1275
+ return (value?.statuses ?? [])
1276
+ .filter((status) => status.from != null || status.to != null)
1277
+ .sort((a, b) => (a.from ?? -Infinity) - (b.from ?? -Infinity));
1278
+ }
1279
+ /**
1280
+ * The backend's status, else the band whose range holds the score. A missing
1281
+ * bound is open-ended here — unlike on the arc, where it stops at the scale —
1282
+ * so a 120% score still lands in a `from: 95` band.
1283
+ */
1284
+ function resolvePerformanceScoreStatus(value) {
1285
+ if (value?.status)
1286
+ return value.status;
1287
+ const performance = parsePerformanceScore(value?.performance);
1288
+ if (performance === null)
1289
+ return null;
1290
+ const bands = getPerformanceScoreBands(value);
1291
+ return (bands.find((band, index) => {
1292
+ const from = band.from ?? -Infinity;
1293
+ const to = band.to ?? Infinity;
1294
+ const isLast = index === bands.length - 1;
1295
+ return (performance >= from && (isLast ? performance <= to : performance < to));
1296
+ }) ?? null);
1297
+ }
1298
+
1299
+ /** Arc geometry, in viewBox units: a semicircle centred on (50, 100). */
1300
+ const ARC_RADIUS = 50;
1301
+ const ARC_CENTER_X = 50;
1302
+ const ARC_CENTER_Y = 100;
1303
+ /** Radius band labels sit on — just outside the 6-unit stroke. */
1304
+ const LABEL_RADIUS = 59;
1305
+ /**
1306
+ * How far each band is pulled back from an interior boundary, as a fraction of
1307
+ * the arc. Round caps add half the stroke (3 units) past each end, so without
1308
+ * this neighbouring bands would overlap instead of showing a gap.
1309
+ */
1310
+ const BAND_INSET = 4.5 / (Math.PI * ARC_RADIUS);
1311
+ /** Shortest band still drawn, so a very narrow range renders as a dot. */
1312
+ const MIN_BAND_SPAN = 0.001;
1313
+ /**
1314
+ * What the gauge always occupies, labels aside: the stroke (±3) and the marker
1315
+ * (r 5 + half its 3-unit stroke) at either end of the arc.
1316
+ */
1317
+ const GAUGE_EXTENT = 6.5;
1318
+ /** Rough advance of one 7-unit bold label glyph, to size the viewBox. */
1319
+ const LABEL_CHAR_WIDTH = 4.4;
1320
+ const LABEL_HALF_HEIGHT = 4;
1321
+ /** Width cap per `chartSize`. */
1322
+ const CHART_MAX_WIDTH = {
1323
+ small: '11rem',
1324
+ medium: '15rem',
1325
+ large: '20rem',
1326
+ full: '100%',
1327
+ };
1328
+ const FALLBACK_COLOR = 'var(--p-primary-color)';
1329
+ const EMPTY_COLOR = 'var(--p-surface-300)';
1330
+ /**
1331
+ * Preview renderer for `PerformanceScore` properties — a KPI's performance as a
1332
+ * semicircle gauge, ported from SPlus v3's `app-performance-gauge`.
1333
+ *
1334
+ * Each status band is an arc segment; the band the score sits in is drawn at
1335
+ * full strength and the rest are faded. The marker rides the arc at the score,
1336
+ * the score itself sits in the middle, and the current status is a pill below.
1337
+ *
1338
+ * Geometry is computed, not measured: the SVG has a fixed `viewBox` and
1339
+ * `width: 100%` (capped by `configuration.chartSize`, centred), so it scales with its grid
1340
+ * cell without a `ResizeObserver` — a card grid mounts one of these per record.
1341
+ */
1342
+ class EntityPerformanceScore {
1343
+ activeLang = sharedActiveLang(inject(TranslocoService));
1344
+ /** Full entity data object */
1345
+ data = input(...(ngDevMode ? [undefined, { debugName: "data" }] : /* istanbul ignore next */ []));
1346
+ /** Individual inputs (used when data is not provided) */
1347
+ name = input(...(ngDevMode ? [undefined, { debugName: "name" }] : /* istanbul ignore next */ []));
1348
+ value = input(...(ngDevMode ? [undefined, { debugName: "value" }] : /* istanbul ignore next */ []));
1349
+ displayName = computed(() => this.data()?.name ?? this.name() ?? '', ...(ngDevMode ? [{ debugName: "displayName" }] : /* istanbul ignore next */ []));
1350
+ /** The display configuration's `chartSize`, as a CSS `max-width`. */
1351
+ chartMaxWidth = computed(() => {
1352
+ const size = this.data()?.configuration?.chartSize;
1353
+ return (CHART_MAX_WIDTH[size ?? DEFAULT_PERFORMANCE_SCORE_CHART_SIZE] ??
1354
+ CHART_MAX_WIDTH[DEFAULT_PERFORMANCE_SCORE_CHART_SIZE]);
1355
+ }, ...(ngDevMode ? [{ debugName: "chartMaxWidth" }] : /* istanbul ignore next */ []));
1356
+ scoreValue = computed(() => {
1357
+ const value = this.data()?.value;
1358
+ if (value && typeof value === 'object' && !Array.isArray(value)) {
1359
+ return value;
1360
+ }
1361
+ return this.value() ?? null;
1362
+ }, ...(ngDevMode ? [{ debugName: "scoreValue" }] : /* istanbul ignore next */ []));
1363
+ performance = computed(() => parsePerformanceScore(this.scoreValue()?.performance), ...(ngDevMode ? [{ debugName: "performance" }] : /* istanbul ignore next */ []));
1364
+ hasPerformance = computed(() => this.performance() !== null, ...(ngDevMode ? [{ debugName: "hasPerformance" }] : /* istanbul ignore next */ []));
1365
+ /** Bands with at least one bound, ordered along the arc. */
1366
+ statuses = computed(() => getPerformanceScoreBands(this.scoreValue()), ...(ngDevMode ? [{ debugName: "statuses" }] : /* istanbul ignore next */ []));
1367
+ /** 0–100, widened to the outermost band bound. */
1368
+ scale = computed(() => {
1369
+ let min = 0;
1370
+ let max = 100;
1371
+ for (const status of this.statuses()) {
1372
+ if (status.from != null && status.from < min)
1373
+ min = status.from;
1374
+ if (status.to != null && status.to > max)
1375
+ max = status.to;
1376
+ }
1377
+ return { min, max };
1378
+ }, ...(ngDevMode ? [{ debugName: "scale" }] : /* istanbul ignore next */ []));
1379
+ /** See {@link resolvePerformanceScoreStatus}; the table filters by it too. */
1380
+ status = computed(() => resolvePerformanceScoreStatus(this.scoreValue()), ...(ngDevMode ? [{ debugName: "status" }] : /* istanbul ignore next */ []));
1381
+ accentColor = computed(() => {
1382
+ if (!this.hasPerformance())
1383
+ return EMPTY_COLOR;
1384
+ return this.status()?.color?.trim() || FALLBACK_COLOR;
1385
+ }, ...(ngDevMode ? [{ debugName: "accentColor" }] : /* istanbul ignore next */ []));
1386
+ bands = computed(() => {
1387
+ const statuses = this.statuses();
1388
+ if (!statuses.length) {
1389
+ return [
1390
+ {
1391
+ key: 'full',
1392
+ path: this.arcPath(0, 1),
1393
+ color: this.accentColor(),
1394
+ opacity: 1,
1395
+ },
1396
+ ];
1397
+ }
1398
+ const activeKey = this.status()?.key;
1399
+ const { min, max } = this.scale();
1400
+ return statuses.map((status, index) => {
1401
+ const start = this.toFraction(status.from ?? min);
1402
+ const end = this.toFraction(status.to ?? max);
1403
+ const insetStart = index > 0 ? start + BAND_INSET : start;
1404
+ const insetEnd = index < statuses.length - 1 ? end - BAND_INSET : end;
1405
+ return {
1406
+ key: status.key,
1407
+ path: this.arcPath(insetStart, Math.max(insetEnd, insetStart + MIN_BAND_SPAN)),
1408
+ color: status.color?.trim() || FALLBACK_COLOR,
1409
+ opacity: status.key === activeKey ? 1 : 0.2,
1410
+ };
1411
+ });
1412
+ }, ...(ngDevMode ? [{ debugName: "bands" }] : /* istanbul ignore next */ []));
1413
+ /** A label at every band start except the gauge minimum. */
1414
+ labels = computed(() => {
1415
+ const { min } = this.scale();
1416
+ return this.statuses()
1417
+ .filter((status) => status.from != null && status.from > min)
1418
+ .map((status) => {
1419
+ const angle = this.toAngle(this.toFraction(status.from));
1420
+ const cos = Math.cos(angle);
1421
+ return {
1422
+ key: status.key,
1423
+ text: this.formatPercent(status.from),
1424
+ x: ARC_CENTER_X + LABEL_RADIUS * cos,
1425
+ y: ARC_CENTER_Y - LABEL_RADIUS * Math.sin(angle),
1426
+ anchor: cos > 0.25 ? 'start' : cos < -0.25 ? 'end' : 'middle',
1427
+ };
1428
+ });
1429
+ }, ...(ngDevMode ? [{ debugName: "labels" }] : /* istanbul ignore next */ []));
1430
+ /**
1431
+ * Fitted to what is actually drawn, so the arc fills its cell instead of
1432
+ * reserving label room it may not need. Kept symmetric about the arc's
1433
+ * centre so the gauge stays centred over the status pill.
1434
+ */
1435
+ viewBox = computed(() => {
1436
+ let minX = ARC_CENTER_X - ARC_RADIUS - GAUGE_EXTENT;
1437
+ let maxX = ARC_CENTER_X + ARC_RADIUS + GAUGE_EXTENT;
1438
+ let minY = ARC_CENTER_Y - ARC_RADIUS - GAUGE_EXTENT;
1439
+ const maxY = ARC_CENTER_Y + GAUGE_EXTENT;
1440
+ for (const label of this.labels()) {
1441
+ const width = label.text.length * LABEL_CHAR_WIDTH;
1442
+ const left = label.anchor === 'start'
1443
+ ? label.x
1444
+ : label.anchor === 'end'
1445
+ ? label.x - width
1446
+ : label.x - width / 2;
1447
+ minX = Math.min(minX, left);
1448
+ maxX = Math.max(maxX, left + width);
1449
+ minY = Math.min(minY, label.y - LABEL_HALF_HEIGHT);
1450
+ }
1451
+ const halfWidth = Math.max(ARC_CENTER_X - minX, maxX - ARC_CENTER_X);
1452
+ return `${ARC_CENTER_X - halfWidth} ${minY} ${halfWidth * 2} ${maxY - minY}`;
1453
+ }, ...(ngDevMode ? [{ debugName: "viewBox" }] : /* istanbul ignore next */ []));
1454
+ marker = computed(() => {
1455
+ const performance = this.performance();
1456
+ if (performance === null)
1457
+ return null;
1458
+ return this.pointAt(this.toFraction(performance), ARC_RADIUS);
1459
+ }, ...(ngDevMode ? [{ debugName: "marker" }] : /* istanbul ignore next */ []));
1460
+ performanceLabel = computed(() => {
1461
+ const performance = this.performance();
1462
+ return performance === null
1463
+ ? ENTITY_EMPTY_VALUE_PLACEHOLDER
1464
+ : this.formatPercent(performance);
1465
+ }, ...(ngDevMode ? [{ debugName: "performanceLabel" }] : /* istanbul ignore next */ []));
1466
+ statusLabel = computed(() => this.status()?.display?.trim() || '', ...(ngDevMode ? [{ debugName: "statusLabel" }] : /* istanbul ignore next */ []));
1467
+ /** Same tinted badge as `mt-entity-status`, so both read as one status. */
1468
+ statusPillStyle = computed(() => {
1469
+ const color = this.status()?.color?.trim() || FALLBACK_COLOR;
1470
+ return {
1471
+ color,
1472
+ backgroundColor: `color-mix(in srgb, ${color} 12%, transparent)`,
1473
+ };
1474
+ }, ...(ngDevMode ? [{ debugName: "statusPillStyle" }] : /* istanbul ignore next */ []));
1475
+ /** Score → position along the arc, clamped to its ends. */
1476
+ toFraction(value) {
1477
+ const { min, max } = this.scale();
1478
+ return Math.min(Math.max((value - min) / (max - min), 0), 1);
1479
+ }
1480
+ /** Arc fraction → angle; 0 is the left end, 1 the right. */
1481
+ toAngle(fraction) {
1482
+ return Math.PI * (1 - fraction);
1483
+ }
1484
+ pointAt(fraction, radius) {
1485
+ const angle = this.toAngle(fraction);
1486
+ return {
1487
+ x: ARC_CENTER_X + radius * Math.cos(angle),
1488
+ y: ARC_CENTER_Y - radius * Math.sin(angle),
1489
+ };
1490
+ }
1491
+ arcPath(from, to) {
1492
+ const start = this.pointAt(from, ARC_RADIUS);
1493
+ const end = this.pointAt(to, ARC_RADIUS);
1494
+ return `M ${start.x} ${start.y} A ${ARC_RADIUS} ${ARC_RADIUS} 0 0 1 ${end.x} ${end.y}`;
1495
+ }
1496
+ /** Same locale-aware formatting as `mt-entity-percentage`. */
1497
+ formatPercent(value) {
1498
+ try {
1499
+ return new Intl.NumberFormat(this.activeLang() || 'en', {
1500
+ style: 'percent',
1501
+ maximumFractionDigits: 1,
1502
+ }).format(value / 100);
1503
+ }
1504
+ catch {
1505
+ return `${Number(value.toFixed(1))}%`;
1506
+ }
1507
+ }
1508
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EntityPerformanceScore, deps: [], target: i0.ɵɵFactoryTarget.Component });
1509
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: EntityPerformanceScore, isStandalone: true, selector: "mt-entity-performance-score", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<!--\r\n No property label above the gauge: the gauge carries its own caption\r\n (\"Performance Score\"), and the label repeated it. The property name is kept\r\n as the SVG's accessible name instead.\r\n-->\r\n<div class=\"flex w-full flex-col items-center\">\r\n <!--\r\n `direction=\"ltr\"` pins the band labels' text-anchor to the arc's own\r\n left/right \u2014 under an RTL host `start`/`end` would otherwise flip and push\r\n the labels into the arc. The gauge itself runs left to right in both\r\n languages, as it does in SPlus.\r\n -->\r\n <svg\r\n class=\"block h-auto w-full overflow-visible\"\r\n [style.max-width]=\"chartMaxWidth()\"\r\n [attr.viewBox]=\"viewBox()\"\r\n direction=\"ltr\"\r\n role=\"img\"\r\n [attr.aria-label]=\"displayName() + ' ' + performanceLabel()\"\r\n >\r\n @for (band of bands(); track band.key) {\r\n <path\r\n [attr.d]=\"band.path\"\r\n fill=\"none\"\r\n stroke-width=\"6\"\r\n stroke-linecap=\"round\"\r\n [style.stroke]=\"band.color\"\r\n [style.opacity]=\"band.opacity\"\r\n />\r\n }\r\n @for (label of labels(); track label.key) {\r\n <text\r\n [attr.x]=\"label.x\"\r\n [attr.y]=\"label.y\"\r\n [attr.text-anchor]=\"label.anchor\"\r\n dominant-baseline=\"middle\"\r\n font-size=\"7\"\r\n font-weight=\"700\"\r\n fill=\"currentColor\"\r\n >\r\n {{ label.text }}\r\n </text>\r\n }\r\n @if (marker(); as point) {\r\n <circle\r\n [attr.cx]=\"point.x\"\r\n [attr.cy]=\"point.y\"\r\n r=\"5\"\r\n fill=\"#ffffff\"\r\n stroke-width=\"3\"\r\n [style.stroke]=\"accentColor()\"\r\n style=\"filter: drop-shadow(1px 1px 1px rgba(0, 0, 0, 0.1))\"\r\n />\r\n }\r\n <text\r\n x=\"50\"\r\n y=\"87\"\r\n text-anchor=\"middle\"\r\n font-size=\"16\"\r\n font-weight=\"700\"\r\n [style.fill]=\"accentColor()\"\r\n >\r\n {{ performanceLabel() }}\r\n </text>\r\n <text\r\n x=\"50\"\r\n y=\"99\"\r\n text-anchor=\"middle\"\r\n font-size=\"6.5\"\r\n fill=\"currentColor\"\r\n class=\"text-gray-600\"\r\n >\r\n {{ \"components.performanceScore.label\" | transloco }}\r\n </text>\r\n </svg>\r\n\r\n @if (statusLabel()) {\r\n <span\r\n class=\"inline-block max-w-full truncate rounded-md px-3 py-2 text-xs font-semibold\"\r\n [style]=\"statusPillStyle()\"\r\n >\r\n {{ statusLabel() }}\r\n </span>\r\n }\r\n</div>\r\n", dependencies: [{ kind: "pipe", type: TranslocoPipe, name: "transloco" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1510
+ }
1511
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EntityPerformanceScore, decorators: [{
1512
+ type: Component,
1513
+ args: [{ selector: 'mt-entity-performance-score', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [TranslocoPipe], template: "<!--\r\n No property label above the gauge: the gauge carries its own caption\r\n (\"Performance Score\"), and the label repeated it. The property name is kept\r\n as the SVG's accessible name instead.\r\n-->\r\n<div class=\"flex w-full flex-col items-center\">\r\n <!--\r\n `direction=\"ltr\"` pins the band labels' text-anchor to the arc's own\r\n left/right \u2014 under an RTL host `start`/`end` would otherwise flip and push\r\n the labels into the arc. The gauge itself runs left to right in both\r\n languages, as it does in SPlus.\r\n -->\r\n <svg\r\n class=\"block h-auto w-full overflow-visible\"\r\n [style.max-width]=\"chartMaxWidth()\"\r\n [attr.viewBox]=\"viewBox()\"\r\n direction=\"ltr\"\r\n role=\"img\"\r\n [attr.aria-label]=\"displayName() + ' ' + performanceLabel()\"\r\n >\r\n @for (band of bands(); track band.key) {\r\n <path\r\n [attr.d]=\"band.path\"\r\n fill=\"none\"\r\n stroke-width=\"6\"\r\n stroke-linecap=\"round\"\r\n [style.stroke]=\"band.color\"\r\n [style.opacity]=\"band.opacity\"\r\n />\r\n }\r\n @for (label of labels(); track label.key) {\r\n <text\r\n [attr.x]=\"label.x\"\r\n [attr.y]=\"label.y\"\r\n [attr.text-anchor]=\"label.anchor\"\r\n dominant-baseline=\"middle\"\r\n font-size=\"7\"\r\n font-weight=\"700\"\r\n fill=\"currentColor\"\r\n >\r\n {{ label.text }}\r\n </text>\r\n }\r\n @if (marker(); as point) {\r\n <circle\r\n [attr.cx]=\"point.x\"\r\n [attr.cy]=\"point.y\"\r\n r=\"5\"\r\n fill=\"#ffffff\"\r\n stroke-width=\"3\"\r\n [style.stroke]=\"accentColor()\"\r\n style=\"filter: drop-shadow(1px 1px 1px rgba(0, 0, 0, 0.1))\"\r\n />\r\n }\r\n <text\r\n x=\"50\"\r\n y=\"87\"\r\n text-anchor=\"middle\"\r\n font-size=\"16\"\r\n font-weight=\"700\"\r\n [style.fill]=\"accentColor()\"\r\n >\r\n {{ performanceLabel() }}\r\n </text>\r\n <text\r\n x=\"50\"\r\n y=\"99\"\r\n text-anchor=\"middle\"\r\n font-size=\"6.5\"\r\n fill=\"currentColor\"\r\n class=\"text-gray-600\"\r\n >\r\n {{ \"components.performanceScore.label\" | transloco }}\r\n </text>\r\n </svg>\r\n\r\n @if (statusLabel()) {\r\n <span\r\n class=\"inline-block max-w-full truncate rounded-md px-3 py-2 text-xs font-semibold\"\r\n [style]=\"statusPillStyle()\"\r\n >\r\n {{ statusLabel() }}\r\n </span>\r\n }\r\n</div>\r\n" }]
1514
+ }], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }] } });
1515
+
1227
1516
  class EntityAttachment {
1228
1517
  data = input(...(ngDevMode ? [undefined, { debugName: "data" }] : /* istanbul ignore next */ []));
1229
1518
  name = input(...(ngDevMode ? [undefined, { debugName: "name" }] : /* istanbul ignore next */ []));
@@ -1598,11 +1887,11 @@ class EntityConnection {
1598
1887
  }, ...(ngDevMode ? [{ debugName: "connection" }] : /* istanbul ignore next */ []));
1599
1888
  displayValue = computed(() => displayOrPlaceholder(this.connection()?.display), ...(ngDevMode ? [{ debugName: "displayValue" }] : /* istanbul ignore next */ []));
1600
1889
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EntityConnection, deps: [], target: i0.ɵɵFactoryTarget.Component });
1601
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.8", type: EntityConnection, isStandalone: true, selector: "mt-entity-connection", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<mt-entity-field\n [label]=\"displayName()\"\n [configuration]=\"data()?.configuration\"\n>\n <div\n class=\"min-w-0 max-w-full truncate text-sm font-semibold\"\n mtTruncateTooltip\n tooltipPosition=\"top\"\n >\n {{ displayValue() }}\n </div>\n</mt-entity-field>\n", dependencies: [{ kind: "component", type: EntityField, selector: "mt-entity-field", inputs: ["label", "labelIconName", "configuration", "gap"] }, { kind: "directive", type: TruncateTooltip, selector: "[mtTruncateTooltip]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1890
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.8", type: EntityConnection, isStandalone: true, selector: "mt-entity-connection", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<mt-entity-field\r\n [label]=\"displayName()\"\r\n [configuration]=\"data()?.configuration\"\r\n>\r\n <div\r\n class=\"min-w-0 max-w-full truncate text-sm font-semibold\"\r\n mtTruncateTooltip\r\n tooltipPosition=\"top\"\r\n >\r\n {{ displayValue() }}\r\n </div>\r\n</mt-entity-field>\r\n", dependencies: [{ kind: "component", type: EntityField, selector: "mt-entity-field", inputs: ["label", "labelIconName", "configuration", "gap"] }, { kind: "directive", type: TruncateTooltip, selector: "[mtTruncateTooltip]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1602
1891
  }
1603
1892
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EntityConnection, decorators: [{
1604
1893
  type: Component,
1605
- args: [{ selector: 'mt-entity-connection', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [EntityField, TruncateTooltip], template: "<mt-entity-field\n [label]=\"displayName()\"\n [configuration]=\"data()?.configuration\"\n>\n <div\n class=\"min-w-0 max-w-full truncate text-sm font-semibold\"\n mtTruncateTooltip\n tooltipPosition=\"top\"\n >\n {{ displayValue() }}\n </div>\n</mt-entity-field>\n" }]
1894
+ args: [{ selector: 'mt-entity-connection', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [EntityField, TruncateTooltip], template: "<mt-entity-field\r\n [label]=\"displayName()\"\r\n [configuration]=\"data()?.configuration\"\r\n>\r\n <div\r\n class=\"min-w-0 max-w-full truncate text-sm font-semibold\"\r\n mtTruncateTooltip\r\n tooltipPosition=\"top\"\r\n >\r\n {{ displayValue() }}\r\n </div>\r\n</mt-entity-field>\r\n" }]
1606
1895
  }], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }] } });
1607
1896
  function normalizeEntityConnection(value) {
1608
1897
  if (value === null || value === undefined || value === '') {
@@ -1650,11 +1939,11 @@ class EntityScheduleItem {
1650
1939
  }, ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
1651
1940
  emptyLabel = ENTITY_EMPTY_VALUE_PLACEHOLDER;
1652
1941
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EntityScheduleItem, deps: [], target: i0.ɵɵFactoryTarget.Component });
1653
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: EntityScheduleItem, isStandalone: true, selector: "mt-entity-schedule-item", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<mt-entity-field\n [label]=\"displayName()\"\n [configuration]=\"data()?.configuration\"\n gap=\"normal\"\n>\n @if (items().length) {\n <div class=\"flex flex-wrap items-center gap-2\">\n @for (item of items(); track item.id) {\n <mt-chip [label]=\"item.name\" size=\"small\" />\n }\n </div>\n } @else {\n <span\n class=\"inline-flex items-center px-3 py-2 rounded-md text-xs font-semibold w-fit text-gray-500 bg-gray-100\"\n >\n {{ emptyLabel }}\n </span>\n }\n</mt-entity-field>\n", dependencies: [{ kind: "component", type: EntityField, selector: "mt-entity-field", inputs: ["label", "labelIconName", "configuration", "gap"] }, { kind: "component", type: Chip, selector: "mt-chip", inputs: ["label", "icon", "image", "removable", "removeIcon", "styleClass", "size"], outputs: ["onRemove", "onImageError"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1942
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: EntityScheduleItem, isStandalone: true, selector: "mt-entity-schedule-item", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<mt-entity-field\r\n [label]=\"displayName()\"\r\n [configuration]=\"data()?.configuration\"\r\n gap=\"normal\"\r\n>\r\n @if (items().length) {\r\n <div class=\"flex flex-wrap items-center gap-2\">\r\n @for (item of items(); track item.id) {\r\n <mt-chip [label]=\"item.name\" size=\"small\" />\r\n }\r\n </div>\r\n } @else {\r\n <span\r\n class=\"inline-flex items-center px-3 py-2 rounded-md text-xs font-semibold w-fit text-gray-500 bg-gray-100\"\r\n >\r\n {{ emptyLabel }}\r\n </span>\r\n }\r\n</mt-entity-field>\r\n", dependencies: [{ kind: "component", type: EntityField, selector: "mt-entity-field", inputs: ["label", "labelIconName", "configuration", "gap"] }, { kind: "component", type: Chip, selector: "mt-chip", inputs: ["label", "icon", "image", "removable", "removeIcon", "styleClass", "size"], outputs: ["onRemove", "onImageError"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1654
1943
  }
1655
1944
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EntityScheduleItem, decorators: [{
1656
1945
  type: Component,
1657
- args: [{ selector: 'mt-entity-schedule-item', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [EntityField, Chip], template: "<mt-entity-field\n [label]=\"displayName()\"\n [configuration]=\"data()?.configuration\"\n gap=\"normal\"\n>\n @if (items().length) {\n <div class=\"flex flex-wrap items-center gap-2\">\n @for (item of items(); track item.id) {\n <mt-chip [label]=\"item.name\" size=\"small\" />\n }\n </div>\n } @else {\n <span\n class=\"inline-flex items-center px-3 py-2 rounded-md text-xs font-semibold w-fit text-gray-500 bg-gray-100\"\n >\n {{ emptyLabel }}\n </span>\n }\n</mt-entity-field>\n" }]
1946
+ args: [{ selector: 'mt-entity-schedule-item', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [EntityField, Chip], template: "<mt-entity-field\r\n [label]=\"displayName()\"\r\n [configuration]=\"data()?.configuration\"\r\n gap=\"normal\"\r\n>\r\n @if (items().length) {\r\n <div class=\"flex flex-wrap items-center gap-2\">\r\n @for (item of items(); track item.id) {\r\n <mt-chip [label]=\"item.name\" size=\"small\" />\r\n }\r\n </div>\r\n } @else {\r\n <span\r\n class=\"inline-flex items-center px-3 py-2 rounded-md text-xs font-semibold w-fit text-gray-500 bg-gray-100\"\r\n >\r\n {{ emptyLabel }}\r\n </span>\r\n }\r\n</mt-entity-field>\r\n" }]
1658
1947
  }], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }] } });
1659
1948
 
1660
1949
  /**
@@ -2152,34 +2441,6 @@ function summarizeEntityListRows(rows, limit) {
2152
2441
  };
2153
2442
  }
2154
2443
 
2155
- /**
2156
- * One shared active-language signal per `TranslocoService`.
2157
- *
2158
- * `mt-entity-preview` renders once per property per record — a client-list card
2159
- * grid mounts thousands of them — so a `toSignal(langChanges$)` inside each
2160
- * instance would open thousands of subscriptions to the same Subject just to
2161
- * read one global value. The language is global, so the signal is too: created
2162
- * once, cached against the service, and shared by every entity that needs it.
2163
- *
2164
- * `manualCleanup` is deliberate. The cached signal outlives any single
2165
- * component by design, and the service it hangs off is the root injector's —
2166
- * tying its subscription to whichever entity happened to ask first would tear
2167
- * it down the moment that entity scrolled out of view.
2168
- */
2169
- const langSignals = new WeakMap();
2170
- function sharedActiveLang(transloco) {
2171
- const cached = langSignals.get(transloco);
2172
- if (cached) {
2173
- return cached;
2174
- }
2175
- const lang = toSignal(transloco.langChanges$, {
2176
- initialValue: transloco.getActiveLang(),
2177
- manualCleanup: true,
2178
- });
2179
- langSignals.set(transloco, lang);
2180
- return lang;
2181
- }
2182
-
2183
2444
  /** Neutral grey for a status the catalog left without a colour. */
2184
2445
  const DEFAULT_STATUS_COLOR = '#9CA3AF';
2185
2446
  class EntityLeafDetails {
@@ -2307,7 +2568,7 @@ class EntityValuePreview {
2307
2568
  : viewType;
2308
2569
  }, ...(ngDevMode ? [{ debugName: "previewType" }] : /* istanbul ignore next */ []));
2309
2570
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EntityValuePreview, deps: [], target: i0.ɵɵFactoryTarget.Component });
2310
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: EntityValuePreview, isStandalone: true, selector: "mt-entity-value-preview", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, attachmentShape: { classPropertyName: "attachmentShape", publicName: "attachmentShape", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "block min-w-0 w-full" }, ngImport: i0, template: "@switch (previewType()) {\r\n @case (\"Text\") {\r\n <mt-entity-text [data]=\"data()\" />\r\n }\r\n @case (\"LongText\") {\r\n <mt-entity-long-text [data]=\"data()\" />\r\n }\r\n @case (\"Date\") {\r\n <mt-entity-date [data]=\"data()\" />\r\n }\r\n @case (\"DateTime\") {\r\n <mt-entity-date [data]=\"data()\" [viewType]=\"'DateTime'\" />\r\n }\r\n @case (\"Time\") {\r\n <mt-entity-date [data]=\"data()\" [viewType]=\"'Time'\" />\r\n }\r\n @case (\"User\") {\r\n <mt-entity-user [data]=\"data()\" />\r\n }\r\n @case (\"MultiUser\") {\r\n <mt-entity-user [data]=\"data()\" />\r\n }\r\n @case (\"Percentage\") {\r\n <mt-entity-percentage [data]=\"data()\" />\r\n }\r\n @case (\"Currency\") {\r\n <mt-entity-currency [data]=\"data()\" />\r\n }\r\n @case (\"Number\") {\r\n <mt-entity-text [data]=\"data()\" />\r\n }\r\n @case (\"Checkbox\") {\r\n <mt-entity-checkbox [data]=\"data()\" />\r\n }\r\n @case (\"Lookup\") {\r\n <mt-entity-lookup [data]=\"data()\" />\r\n }\r\n @case (\"Status\") {\r\n <mt-entity-status [data]=\"data()\" />\r\n }\r\n @case (\"Icon\") {\r\n <mt-entity-icon [data]=\"data()\" />\r\n }\r\n @case (\"PhaseGate\") {\r\n <mt-entity-phase-gate [data]=\"data()\" />\r\n }\r\n @case (\"Attachment\") {\r\n <mt-entity-attachment [data]=\"data()\" [shape]=\"attachmentShape()\" />\r\n }\r\n @case (\"Location\") {\r\n <mt-entity-location [data]=\"data()\" />\r\n }\r\n @case (\"Connection\") {\r\n <mt-entity-connection [data]=\"data()\" />\r\n }\r\n @case (\"ScheduleItemSelector\") {\r\n <mt-entity-schedule-item [data]=\"data()\" />\r\n }\r\n @case (\"LeafDetails\") {\r\n <mt-entity-leaf-details [data]=\"data()\" />\r\n }\r\n @default {\r\n <mt-entity-text [data]=\"data()\" />\r\n }\r\n}\r\n", dependencies: [{ kind: "component", type: EntityText, selector: "mt-entity-text", inputs: ["data", "name", "value"] }, { kind: "component", type: EntityLongText, selector: "mt-entity-long-text", inputs: ["data", "name", "value"] }, { kind: "component", type: EntityDate, selector: "mt-entity-date", inputs: ["data", "name", "value", "viewType"] }, { kind: "component", type: EntityUser, selector: "mt-entity-user", inputs: ["data"] }, { kind: "component", type: EntityPercentage, selector: "mt-entity-percentage", inputs: ["data", "name", "value", "rawValue"] }, { kind: "component", type: EntityCurrency, selector: "mt-entity-currency", inputs: ["data", "name", "value"] }, { kind: "component", type: EntityCheckbox, selector: "mt-entity-checkbox", inputs: ["data", "name", "value", "rawValue"] }, { kind: "component", type: EntityLookup, selector: "mt-entity-lookup", inputs: ["data", "name", "value"] }, { kind: "component", type: EntityPhaseGate, selector: "mt-entity-phase-gate", inputs: ["data", "name", "value"] }, { kind: "component", type: EntityAttachment, selector: "mt-entity-attachment", inputs: ["data", "name", "shape", "value", "endPoint", "context"] }, { kind: "component", type: EntityStatus, selector: "mt-entity-status", inputs: ["data", "name", "value"] }, { kind: "component", type: EntityIcon, selector: "mt-entity-icon", inputs: ["data", "name", "value"] }, { kind: "component", type: EntityLeafDetails, selector: "mt-entity-leaf-details", inputs: ["data"] }, { kind: "component", type: EntityLocation, selector: "mt-entity-location", inputs: ["data"] }, { kind: "component", type: EntityConnection, selector: "mt-entity-connection", inputs: ["data", "name", "value"] }, { kind: "component", type: EntityScheduleItem, selector: "mt-entity-schedule-item", inputs: ["data"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2571
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: EntityValuePreview, isStandalone: true, selector: "mt-entity-value-preview", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, attachmentShape: { classPropertyName: "attachmentShape", publicName: "attachmentShape", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "block min-w-0 w-full" }, ngImport: i0, template: "@switch (previewType()) {\r\n @case (\"Text\") {\r\n <mt-entity-text [data]=\"data()\" />\r\n }\r\n @case (\"LongText\") {\r\n <mt-entity-long-text [data]=\"data()\" />\r\n }\r\n @case (\"Date\") {\r\n <mt-entity-date [data]=\"data()\" />\r\n }\r\n @case (\"DateTime\") {\r\n <mt-entity-date [data]=\"data()\" [viewType]=\"'DateTime'\" />\r\n }\r\n @case (\"Time\") {\r\n <mt-entity-date [data]=\"data()\" [viewType]=\"'Time'\" />\r\n }\r\n @case (\"User\") {\r\n <mt-entity-user [data]=\"data()\" />\r\n }\r\n @case (\"MultiUser\") {\r\n <mt-entity-user [data]=\"data()\" />\r\n }\r\n @case (\"Percentage\") {\r\n <mt-entity-percentage [data]=\"data()\" />\r\n }\r\n @case (\"Currency\") {\r\n <mt-entity-currency [data]=\"data()\" />\r\n }\r\n @case (\"Number\") {\r\n <mt-entity-text [data]=\"data()\" />\r\n }\r\n @case (\"Checkbox\") {\r\n <mt-entity-checkbox [data]=\"data()\" />\r\n }\r\n @case (\"Lookup\") {\r\n <mt-entity-lookup [data]=\"data()\" />\r\n }\r\n @case (\"Status\") {\r\n <mt-entity-status [data]=\"data()\" />\r\n }\r\n @case (\"Icon\") {\r\n <mt-entity-icon [data]=\"data()\" />\r\n }\r\n @case (\"PhaseGate\") {\r\n <mt-entity-phase-gate [data]=\"data()\" />\r\n }\r\n @case (\"PerformanceScore\") {\r\n <mt-entity-performance-score [data]=\"data()\" />\r\n }\r\n @case (\"Attachment\") {\r\n <mt-entity-attachment [data]=\"data()\" [shape]=\"attachmentShape()\" />\r\n }\r\n @case (\"Location\") {\r\n <mt-entity-location [data]=\"data()\" />\r\n }\r\n @case (\"Connection\") {\r\n <mt-entity-connection [data]=\"data()\" />\r\n }\r\n @case (\"ScheduleItemSelector\") {\r\n <mt-entity-schedule-item [data]=\"data()\" />\r\n }\r\n @case (\"LeafDetails\") {\r\n <mt-entity-leaf-details [data]=\"data()\" />\r\n }\r\n @default {\r\n <mt-entity-text [data]=\"data()\" />\r\n }\r\n}\r\n", dependencies: [{ kind: "component", type: EntityText, selector: "mt-entity-text", inputs: ["data", "name", "value"] }, { kind: "component", type: EntityLongText, selector: "mt-entity-long-text", inputs: ["data", "name", "value"] }, { kind: "component", type: EntityDate, selector: "mt-entity-date", inputs: ["data", "name", "value", "viewType"] }, { kind: "component", type: EntityUser, selector: "mt-entity-user", inputs: ["data"] }, { kind: "component", type: EntityPercentage, selector: "mt-entity-percentage", inputs: ["data", "name", "value", "rawValue"] }, { kind: "component", type: EntityCurrency, selector: "mt-entity-currency", inputs: ["data", "name", "value"] }, { kind: "component", type: EntityCheckbox, selector: "mt-entity-checkbox", inputs: ["data", "name", "value", "rawValue"] }, { kind: "component", type: EntityLookup, selector: "mt-entity-lookup", inputs: ["data", "name", "value"] }, { kind: "component", type: EntityPhaseGate, selector: "mt-entity-phase-gate", inputs: ["data", "name", "value"] }, { kind: "component", type: EntityPerformanceScore, selector: "mt-entity-performance-score", inputs: ["data", "name", "value"] }, { kind: "component", type: EntityAttachment, selector: "mt-entity-attachment", inputs: ["data", "name", "shape", "value", "endPoint", "context"] }, { kind: "component", type: EntityStatus, selector: "mt-entity-status", inputs: ["data", "name", "value"] }, { kind: "component", type: EntityIcon, selector: "mt-entity-icon", inputs: ["data", "name", "value"] }, { kind: "component", type: EntityLeafDetails, selector: "mt-entity-leaf-details", inputs: ["data"] }, { kind: "component", type: EntityLocation, selector: "mt-entity-location", inputs: ["data"] }, { kind: "component", type: EntityConnection, selector: "mt-entity-connection", inputs: ["data", "name", "value"] }, { kind: "component", type: EntityScheduleItem, selector: "mt-entity-schedule-item", inputs: ["data"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2311
2572
  }
2312
2573
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EntityValuePreview, decorators: [{
2313
2574
  type: Component,
@@ -2321,6 +2582,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
2321
2582
  EntityCheckbox,
2322
2583
  EntityLookup,
2323
2584
  EntityPhaseGate,
2585
+ EntityPerformanceScore,
2324
2586
  EntityAttachment,
2325
2587
  EntityStatus,
2326
2588
  EntityIcon,
@@ -2330,7 +2592,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
2330
2592
  EntityScheduleItem,
2331
2593
  ], host: {
2332
2594
  class: 'block min-w-0 w-full',
2333
- }, template: "@switch (previewType()) {\r\n @case (\"Text\") {\r\n <mt-entity-text [data]=\"data()\" />\r\n }\r\n @case (\"LongText\") {\r\n <mt-entity-long-text [data]=\"data()\" />\r\n }\r\n @case (\"Date\") {\r\n <mt-entity-date [data]=\"data()\" />\r\n }\r\n @case (\"DateTime\") {\r\n <mt-entity-date [data]=\"data()\" [viewType]=\"'DateTime'\" />\r\n }\r\n @case (\"Time\") {\r\n <mt-entity-date [data]=\"data()\" [viewType]=\"'Time'\" />\r\n }\r\n @case (\"User\") {\r\n <mt-entity-user [data]=\"data()\" />\r\n }\r\n @case (\"MultiUser\") {\r\n <mt-entity-user [data]=\"data()\" />\r\n }\r\n @case (\"Percentage\") {\r\n <mt-entity-percentage [data]=\"data()\" />\r\n }\r\n @case (\"Currency\") {\r\n <mt-entity-currency [data]=\"data()\" />\r\n }\r\n @case (\"Number\") {\r\n <mt-entity-text [data]=\"data()\" />\r\n }\r\n @case (\"Checkbox\") {\r\n <mt-entity-checkbox [data]=\"data()\" />\r\n }\r\n @case (\"Lookup\") {\r\n <mt-entity-lookup [data]=\"data()\" />\r\n }\r\n @case (\"Status\") {\r\n <mt-entity-status [data]=\"data()\" />\r\n }\r\n @case (\"Icon\") {\r\n <mt-entity-icon [data]=\"data()\" />\r\n }\r\n @case (\"PhaseGate\") {\r\n <mt-entity-phase-gate [data]=\"data()\" />\r\n }\r\n @case (\"Attachment\") {\r\n <mt-entity-attachment [data]=\"data()\" [shape]=\"attachmentShape()\" />\r\n }\r\n @case (\"Location\") {\r\n <mt-entity-location [data]=\"data()\" />\r\n }\r\n @case (\"Connection\") {\r\n <mt-entity-connection [data]=\"data()\" />\r\n }\r\n @case (\"ScheduleItemSelector\") {\r\n <mt-entity-schedule-item [data]=\"data()\" />\r\n }\r\n @case (\"LeafDetails\") {\r\n <mt-entity-leaf-details [data]=\"data()\" />\r\n }\r\n @default {\r\n <mt-entity-text [data]=\"data()\" />\r\n }\r\n}\r\n" }]
2595
+ }, template: "@switch (previewType()) {\r\n @case (\"Text\") {\r\n <mt-entity-text [data]=\"data()\" />\r\n }\r\n @case (\"LongText\") {\r\n <mt-entity-long-text [data]=\"data()\" />\r\n }\r\n @case (\"Date\") {\r\n <mt-entity-date [data]=\"data()\" />\r\n }\r\n @case (\"DateTime\") {\r\n <mt-entity-date [data]=\"data()\" [viewType]=\"'DateTime'\" />\r\n }\r\n @case (\"Time\") {\r\n <mt-entity-date [data]=\"data()\" [viewType]=\"'Time'\" />\r\n }\r\n @case (\"User\") {\r\n <mt-entity-user [data]=\"data()\" />\r\n }\r\n @case (\"MultiUser\") {\r\n <mt-entity-user [data]=\"data()\" />\r\n }\r\n @case (\"Percentage\") {\r\n <mt-entity-percentage [data]=\"data()\" />\r\n }\r\n @case (\"Currency\") {\r\n <mt-entity-currency [data]=\"data()\" />\r\n }\r\n @case (\"Number\") {\r\n <mt-entity-text [data]=\"data()\" />\r\n }\r\n @case (\"Checkbox\") {\r\n <mt-entity-checkbox [data]=\"data()\" />\r\n }\r\n @case (\"Lookup\") {\r\n <mt-entity-lookup [data]=\"data()\" />\r\n }\r\n @case (\"Status\") {\r\n <mt-entity-status [data]=\"data()\" />\r\n }\r\n @case (\"Icon\") {\r\n <mt-entity-icon [data]=\"data()\" />\r\n }\r\n @case (\"PhaseGate\") {\r\n <mt-entity-phase-gate [data]=\"data()\" />\r\n }\r\n @case (\"PerformanceScore\") {\r\n <mt-entity-performance-score [data]=\"data()\" />\r\n }\r\n @case (\"Attachment\") {\r\n <mt-entity-attachment [data]=\"data()\" [shape]=\"attachmentShape()\" />\r\n }\r\n @case (\"Location\") {\r\n <mt-entity-location [data]=\"data()\" />\r\n }\r\n @case (\"Connection\") {\r\n <mt-entity-connection [data]=\"data()\" />\r\n }\r\n @case (\"ScheduleItemSelector\") {\r\n <mt-entity-schedule-item [data]=\"data()\" />\r\n }\r\n @case (\"LeafDetails\") {\r\n <mt-entity-leaf-details [data]=\"data()\" />\r\n }\r\n @default {\r\n <mt-entity-text [data]=\"data()\" />\r\n }\r\n}\r\n" }]
2334
2596
  }], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }], attachmentShape: [{ type: i0.Input, args: [{ isSignal: true, alias: "attachmentShape", required: false }] }] } });
2335
2597
 
2336
2598
  /**
@@ -3640,5 +3902,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
3640
3902
  * Generated bundle index. Do not edit.
3641
3903
  */
3642
3904
 
3643
- export { CONNECTION_KEY_SEPARATOR, CURRENCY_COMPACT_THRESHOLD, ComparisonEntityList, ComparisonValue, DEFAULT_PHASE_GATE_COLOR, ENTITY_EMPTY_VALUE_PLACEHOLDER, ENTITY_LIST_TABLE_COMPONENT, EntitiesManage, EntitiesPreview, EntitiesResizeBase, EntityAttachment, EntityCheckbox, EntityConnection, EntityCurrency, EntityDate, EntityField, EntityIcon, EntityLeafDetails, EntityListDrawer, EntityListPreview, EntityLocation, EntityLongText, EntityLookup, EntityLookupModuleCheckList, EntityPercentage, EntityPhaseGate, EntityPreview, EntityPreviewBody, EntityRuntimeContextStore, EntityScheduleItem, EntityStatus, EntityText, EntityUser, FitText, LEAF_DETAILS_KEY_SEPARATOR, LEAF_PHASES_KEY_SEPARATOR, SECTION_KEY_PREFIX, buildConnectionKey, buildDisplayEntities, buildEntityListRows, buildSectionKey, compactCurrencyDisplay, currencyUnitOf, displayOrPlaceholder, expandConnectionEntity, expandLeafDetailsEntity, extractDisplayText, getEntitySectionTitle, 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, readEntityValueColor, resolveConnectionLevelName, resolveEntityInfo, resolveEntityLabelPosition, resolveLocalFieldConfiguration, resolveLocalFieldLabel, resolveLocalFieldViewType, resolveLocalizedLabel, resolvePercentageColor, serializeEntityRawValue, sharedActiveLang, sortLocalRows, splitConnectionKey, splitLeafKey, summarizeEntityListRows, visibleLocalSchemaFields };
3905
+ 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, 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, resolveEntityInfo, resolveEntityLabelPosition, resolveLocalFieldConfiguration, resolveLocalFieldLabel, resolveLocalFieldViewType, resolveLocalizedLabel, resolvePercentageColor, resolvePerformanceScoreStatus, serializeEntityRawValue, sharedActiveLang, sortLocalRows, splitConnectionKey, splitLeafKey, summarizeEntityListRows, visibleLocalSchemaFields };
3644
3906
  //# sourceMappingURL=masterteam-components-entities.mjs.map