@masterteam/components 0.0.320 → 0.0.321
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.
|
@@ -20,6 +20,7 @@ import * as i1$1 from 'primeng/tooltip';
|
|
|
20
20
|
import { TooltipModule } from 'primeng/tooltip';
|
|
21
21
|
import { CdkDrag, CdkDropList, CdkDragPlaceholder } from '@angular/cdk/drag-drop';
|
|
22
22
|
|
|
23
|
+
const ENTITY_ROW_SPANS = [1, 2, 3, 4];
|
|
23
24
|
/** Whether a stored or rendered `EntityList` value is a Local document. */
|
|
24
25
|
function isEntityListLocalDocument(value) {
|
|
25
26
|
return (!!value &&
|
|
@@ -106,6 +107,14 @@ function getEntitySectionTitle(section, lang) {
|
|
|
106
107
|
}
|
|
107
108
|
|
|
108
109
|
const ENTITY_EMPTY_VALUE_PLACEHOLDER = '_';
|
|
110
|
+
/**
|
|
111
|
+
* The `grid-row` value for an entity's `configuration.rowSpan`, or `null` for
|
|
112
|
+
* the default single row so the grid's normal auto-placement is untouched.
|
|
113
|
+
*/
|
|
114
|
+
function resolveEntityGridRow(configuration) {
|
|
115
|
+
const rowSpan = configuration?.rowSpan ?? 1;
|
|
116
|
+
return rowSpan > 1 ? `span ${rowSpan}` : null;
|
|
117
|
+
}
|
|
109
118
|
function isValueMissing(value) {
|
|
110
119
|
if (value === null || value === undefined) {
|
|
111
120
|
return true;
|
|
@@ -1315,8 +1324,14 @@ const MIN_BAND_SPAN = 0.001;
|
|
|
1315
1324
|
* (r 5 + half its 3-unit stroke) at either end of the arc.
|
|
1316
1325
|
*/
|
|
1317
1326
|
const GAUGE_EXTENT = 6.5;
|
|
1318
|
-
/**
|
|
1319
|
-
|
|
1327
|
+
/**
|
|
1328
|
+
* Generous advances of 7-unit bold label glyphs, to size the viewBox. The box
|
|
1329
|
+
* is fitted tightly, so an underestimate clips the label at its cell's edge —
|
|
1330
|
+
* err wide: the percent sign in particular is far wider than a digit.
|
|
1331
|
+
*/
|
|
1332
|
+
const LABEL_DIGIT_WIDTH = 4.6;
|
|
1333
|
+
const LABEL_PERCENT_WIDTH = 7.2;
|
|
1334
|
+
const LABEL_SEPARATOR_WIDTH = 2.4;
|
|
1320
1335
|
const LABEL_HALF_HEIGHT = 4;
|
|
1321
1336
|
/** Width cap per `chartSize`. */
|
|
1322
1337
|
const CHART_MAX_WIDTH = {
|
|
@@ -1428,17 +1443,18 @@ class EntityPerformanceScore {
|
|
|
1428
1443
|
});
|
|
1429
1444
|
}, ...(ngDevMode ? [{ debugName: "labels" }] : /* istanbul ignore next */ []));
|
|
1430
1445
|
/**
|
|
1431
|
-
*
|
|
1432
|
-
*
|
|
1433
|
-
*
|
|
1446
|
+
* The drawn extent — arc, marker and band labels — in viewBox units. Fitted
|
|
1447
|
+
* tightly on every side: a label that overhangs one end of the arc is not
|
|
1448
|
+
* mirrored as empty space on the other, which used to leave the gauge with a
|
|
1449
|
+
* visibly wider gap on one side of its cell.
|
|
1434
1450
|
*/
|
|
1435
|
-
|
|
1451
|
+
frame = computed(() => {
|
|
1436
1452
|
let minX = ARC_CENTER_X - ARC_RADIUS - GAUGE_EXTENT;
|
|
1437
1453
|
let maxX = ARC_CENTER_X + ARC_RADIUS + GAUGE_EXTENT;
|
|
1438
1454
|
let minY = ARC_CENTER_Y - ARC_RADIUS - GAUGE_EXTENT;
|
|
1439
1455
|
const maxY = ARC_CENTER_Y + GAUGE_EXTENT;
|
|
1440
1456
|
for (const label of this.labels()) {
|
|
1441
|
-
const width = label.text
|
|
1457
|
+
const width = estimateLabelWidth(label.text);
|
|
1442
1458
|
const left = label.anchor === 'start'
|
|
1443
1459
|
? label.x
|
|
1444
1460
|
: label.anchor === 'end'
|
|
@@ -1448,9 +1464,25 @@ class EntityPerformanceScore {
|
|
|
1448
1464
|
maxX = Math.max(maxX, left + width);
|
|
1449
1465
|
minY = Math.min(minY, label.y - LABEL_HALF_HEIGHT);
|
|
1450
1466
|
}
|
|
1451
|
-
|
|
1452
|
-
|
|
1467
|
+
return { minX, minY, width: maxX - minX, height: maxY - minY };
|
|
1468
|
+
}, ...(ngDevMode ? [{ debugName: "frame" }] : /* istanbul ignore next */ []));
|
|
1469
|
+
viewBox = computed(() => {
|
|
1470
|
+
const { minX, minY, width, height } = this.frame();
|
|
1471
|
+
return `${minX} ${minY} ${width} ${height}`;
|
|
1453
1472
|
}, ...(ngDevMode ? [{ debugName: "viewBox" }] : /* istanbul ignore next */ []));
|
|
1473
|
+
/**
|
|
1474
|
+
* Horizontal padding (percent of the gauge width) that centres the status
|
|
1475
|
+
* pill under the arc's centre rather than under the SVG's, which drifts off
|
|
1476
|
+
* it whenever a band label overhangs only one end of the arc.
|
|
1477
|
+
*/
|
|
1478
|
+
pillInset = computed(() => {
|
|
1479
|
+
const { minX, width } = this.frame();
|
|
1480
|
+
const offset = (2 * (ARC_CENTER_X - minX)) / width - 1;
|
|
1481
|
+
return {
|
|
1482
|
+
left: Math.max(offset, 0) * 100,
|
|
1483
|
+
right: Math.max(-offset, 0) * 100,
|
|
1484
|
+
};
|
|
1485
|
+
}, ...(ngDevMode ? [{ debugName: "pillInset" }] : /* istanbul ignore next */ []));
|
|
1454
1486
|
marker = computed(() => {
|
|
1455
1487
|
const performance = this.performance();
|
|
1456
1488
|
if (performance === null)
|
|
@@ -1506,12 +1538,25 @@ class EntityPerformanceScore {
|
|
|
1506
1538
|
}
|
|
1507
1539
|
}
|
|
1508
1540
|
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
|
|
1541
|
+
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 <!-- Capped by `chartSize`; the pill row shares this width so its inset lines up -->\r\n <div class=\"w-full\" [style.max-width]=\"chartMaxWidth()\">\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 [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 <div\r\n class=\"flex justify-center\"\r\n [style.padding-left.%]=\"pillInset().left\"\r\n [style.padding-right.%]=\"pillInset().right\"\r\n >\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 </div>\r\n }\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "pipe", type: TranslocoPipe, name: "transloco" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1510
1542
|
}
|
|
1511
1543
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EntityPerformanceScore, decorators: [{
|
|
1512
1544
|
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
|
|
1545
|
+
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 <!-- Capped by `chartSize`; the pill row shares this width so its inset lines up -->\r\n <div class=\"w-full\" [style.max-width]=\"chartMaxWidth()\">\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 [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 <div\r\n class=\"flex justify-center\"\r\n [style.padding-left.%]=\"pillInset().left\"\r\n [style.padding-right.%]=\"pillInset().right\"\r\n >\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 </div>\r\n }\r\n </div>\r\n</div>\r\n" }]
|
|
1514
1546
|
}], 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 }] }] } });
|
|
1547
|
+
/** Estimated rendered width of a band label, in viewBox units. */
|
|
1548
|
+
function estimateLabelWidth(text) {
|
|
1549
|
+
let width = 0;
|
|
1550
|
+
for (const char of text) {
|
|
1551
|
+
if (char === '%' || char === '٪')
|
|
1552
|
+
width += LABEL_PERCENT_WIDTH;
|
|
1553
|
+
else if ('.,٫٬'.includes(char))
|
|
1554
|
+
width += LABEL_SEPARATOR_WIDTH;
|
|
1555
|
+
else
|
|
1556
|
+
width += LABEL_DIGIT_WIDTH;
|
|
1557
|
+
}
|
|
1558
|
+
return width;
|
|
1559
|
+
}
|
|
1515
1560
|
|
|
1516
1561
|
class EntityAttachment {
|
|
1517
1562
|
data = input(...(ngDevMode ? [undefined, { debugName: "data" }] : /* istanbul ignore next */ []));
|
|
@@ -3655,6 +3700,7 @@ class EntitiesPreview {
|
|
|
3655
3700
|
trackKey: entity.key ?? String(entity.order ?? entityIndex),
|
|
3656
3701
|
containerClass: buildSlotClass(entity, clickable, active),
|
|
3657
3702
|
colSpan: `span ${(entity.configuration?.size ?? 8)}`,
|
|
3703
|
+
gridRow: resolveEntityGridRow(entity.configuration),
|
|
3658
3704
|
clickable,
|
|
3659
3705
|
rowClickIgnore: clickable ? 'true' : null,
|
|
3660
3706
|
title: clickable ? (active ? activeTooltip : clickableTooltip) : null,
|
|
@@ -3673,14 +3719,14 @@ class EntitiesPreview {
|
|
|
3673
3719
|
});
|
|
3674
3720
|
}
|
|
3675
3721
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EntitiesPreview, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3676
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: EntitiesPreview, isStandalone: true, selector: "mt-entities-preview", inputs: { entities: { classPropertyName: "entities", publicName: "entities", isSignal: true, isRequired: true, transformFunction: null }, attachmentShape: { classPropertyName: "attachmentShape", publicName: "attachmentShape", isSignal: true, isRequired: false, transformFunction: null }, stackOnNarrow: { classPropertyName: "stackOnNarrow", publicName: "stackOnNarrow", isSignal: true, isRequired: false, transformFunction: null }, clickableKeys: { classPropertyName: "clickableKeys", publicName: "clickableKeys", isSignal: true, isRequired: false, transformFunction: null }, activeKeys: { classPropertyName: "activeKeys", publicName: "activeKeys", isSignal: true, isRequired: false, transformFunction: null }, clickableTooltip: { classPropertyName: "clickableTooltip", publicName: "clickableTooltip", isSignal: true, isRequired: false, transformFunction: null }, activeTooltip: { classPropertyName: "activeTooltip", publicName: "activeTooltip", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { entityClick: "entityClick" }, host: { properties: { "class.mt-entities-stack-narrow": "stackOnNarrow()" }, classAttribute: "block min-w-0 w-full" }, ngImport: i0, template: "<div class=\"flex flex-col gap-4\">\r\n @for (group of slotGroups(); track group.trackKey) {\r\n @if (group.boxed) {\r\n <!-- Titled section box (matches the client-form section view) -->\r\n <div\r\n class=\"flex flex-col gap-0 overflow-hidden rounded-md border border-surface-200 bg-surface-0\"\r\n >\r\n @if (group.title) {\r\n <h3\r\n class=\"m-0 border-b border-surface-200 bg-surface-50 px-4 py-3 text-lg font-semibold text-color\"\r\n dir=\"auto\"\r\n >\r\n {{ group.title }}\r\n </h3>\r\n }\r\n <div class=\"p-4\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"entityGrid\"\r\n [ngTemplateOutletContext]=\"{ $implicit: group.slots }\"\r\n />\r\n </div>\r\n </div>\r\n } @else {\r\n <ng-container\r\n [ngTemplateOutlet]=\"entityGrid\"\r\n [ngTemplateOutletContext]=\"{ $implicit: group.slots }\"\r\n />\r\n }\r\n }\r\n</div>\r\n\r\n<!--\r\n Every binding here reads a value the component already resolved into the slot\r\n (see `EntitiesPreview.slotGroups`). Keep it that way: this template runs once\r\n per entity per change detection pass, and a card grid renders thousands of\r\n them, so a method call or a fresh object literal in this block is measurably\r\n expensive.\r\n-->\r\n<ng-template #entityGrid let-slots>\r\n <div class=\"mt-entities-grid grid grid-cols-24 gap-x-3 gap-y-5\">\r\n @for (slot of slots; track slot.trackKey) {\r\n <div\r\n [class]=\"slot.containerClass\"\r\n [attr.data-row-click-ignore]=\"slot.rowClickIgnore\"\r\n [attr.title]=\"slot.title\"\r\n [style.grid-column]=\"slot.colSpan\"\r\n (click)=\"onSlotClick($event, slot)\"\r\n >\r\n <mt-entity-preview\r\n [data]=\"slot.entity\"\r\n [attachmentShape]=\"attachmentShape()\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n</ng-template>\r\n", styles: [":host{container-type:inline-size}@container (max-width: 400px){:host(.mt-entities-stack-narrow) .mt-entities-grid{grid-template-columns:1fr;column-gap:0}:host(.mt-entities-stack-narrow) .mt-entities-grid>*{grid-column:1 / -1!important}}@container (max-width: 280px){.mt-entities-grid{grid-template-columns:1fr;column-gap:0}.mt-entities-grid>*{grid-column:1 / -1!important}}.mt-entity-filterable{cursor:url(\"data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2314b8a6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 3H2l8 9.46V19l4 2v-8.54L22 3z'/%3E%3C/svg%3E\") 7 3,zoom-in!important}.mt-entity-filter-active{cursor:url(\"data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='%2314b8a6' stroke='%2314b8a6' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 3H2l8 9.46V19l4 2v-8.54L22 3z'/%3E%3C/svg%3E\") 7 3,zoom-out!important}.mt-entity-filterable:hover{background-color:#ccfbf147;outline:1px dashed rgb(20 184 166 / .28);outline-offset:2px}.mt-entity-filter-active{background-color:#ccfbf14d;box-shadow:inset 0 0 0 1.5px #14b8a666,0 0 0 1px #ffffff80}\n"], dependencies: [{ kind: "component", type: EntityPreview, selector: "mt-entity-preview", inputs: ["data", "attachmentShape"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3722
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: EntitiesPreview, isStandalone: true, selector: "mt-entities-preview", inputs: { entities: { classPropertyName: "entities", publicName: "entities", isSignal: true, isRequired: true, transformFunction: null }, attachmentShape: { classPropertyName: "attachmentShape", publicName: "attachmentShape", isSignal: true, isRequired: false, transformFunction: null }, stackOnNarrow: { classPropertyName: "stackOnNarrow", publicName: "stackOnNarrow", isSignal: true, isRequired: false, transformFunction: null }, clickableKeys: { classPropertyName: "clickableKeys", publicName: "clickableKeys", isSignal: true, isRequired: false, transformFunction: null }, activeKeys: { classPropertyName: "activeKeys", publicName: "activeKeys", isSignal: true, isRequired: false, transformFunction: null }, clickableTooltip: { classPropertyName: "clickableTooltip", publicName: "clickableTooltip", isSignal: true, isRequired: false, transformFunction: null }, activeTooltip: { classPropertyName: "activeTooltip", publicName: "activeTooltip", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { entityClick: "entityClick" }, host: { properties: { "class.mt-entities-stack-narrow": "stackOnNarrow()" }, classAttribute: "block min-w-0 w-full" }, ngImport: i0, template: "<div class=\"flex flex-col gap-4\">\r\n @for (group of slotGroups(); track group.trackKey) {\r\n @if (group.boxed) {\r\n <!-- Titled section box (matches the client-form section view) -->\r\n <div\r\n class=\"flex flex-col gap-0 overflow-hidden rounded-md border border-surface-200 bg-surface-0\"\r\n >\r\n @if (group.title) {\r\n <h3\r\n class=\"m-0 border-b border-surface-200 bg-surface-50 px-4 py-3 text-lg font-semibold text-color\"\r\n dir=\"auto\"\r\n >\r\n {{ group.title }}\r\n </h3>\r\n }\r\n <div class=\"p-4\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"entityGrid\"\r\n [ngTemplateOutletContext]=\"{ $implicit: group.slots }\"\r\n />\r\n </div>\r\n </div>\r\n } @else {\r\n <ng-container\r\n [ngTemplateOutlet]=\"entityGrid\"\r\n [ngTemplateOutletContext]=\"{ $implicit: group.slots }\"\r\n />\r\n }\r\n }\r\n</div>\r\n\r\n<!--\r\n Every binding here reads a value the component already resolved into the slot\r\n (see `EntitiesPreview.slotGroups`). Keep it that way: this template runs once\r\n per entity per change detection pass, and a card grid renders thousands of\r\n them, so a method call or a fresh object literal in this block is measurably\r\n expensive.\r\n-->\r\n<ng-template #entityGrid let-slots>\r\n <div class=\"mt-entities-grid grid grid-cols-24 gap-x-3 gap-y-5\">\r\n @for (slot of slots; track slot.trackKey) {\r\n <div\r\n [class]=\"slot.containerClass\"\r\n [attr.data-row-click-ignore]=\"slot.rowClickIgnore\"\r\n [attr.title]=\"slot.title\"\r\n [style.grid-column]=\"slot.colSpan\"\r\n [style.grid-row]=\"slot.gridRow\"\r\n (click)=\"onSlotClick($event, slot)\"\r\n >\r\n <mt-entity-preview\r\n [data]=\"slot.entity\"\r\n [attachmentShape]=\"attachmentShape()\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n</ng-template>\r\n", styles: [":host{container-type:inline-size}@container (max-width: 400px){:host(.mt-entities-stack-narrow) .mt-entities-grid{grid-template-columns:1fr;column-gap:0}:host(.mt-entities-stack-narrow) .mt-entities-grid>*{grid-column:1 / -1!important;grid-row:auto!important}}@container (max-width: 280px){.mt-entities-grid{grid-template-columns:1fr;column-gap:0}.mt-entities-grid>*{grid-column:1 / -1!important;grid-row:auto!important}}.mt-entity-filterable{cursor:url(\"data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2314b8a6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 3H2l8 9.46V19l4 2v-8.54L22 3z'/%3E%3C/svg%3E\") 7 3,zoom-in!important}.mt-entity-filter-active{cursor:url(\"data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='%2314b8a6' stroke='%2314b8a6' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 3H2l8 9.46V19l4 2v-8.54L22 3z'/%3E%3C/svg%3E\") 7 3,zoom-out!important}.mt-entity-filterable:hover{background-color:#ccfbf147;outline:1px dashed rgb(20 184 166 / .28);outline-offset:2px}.mt-entity-filter-active{background-color:#ccfbf14d;box-shadow:inset 0 0 0 1.5px #14b8a666,0 0 0 1px #ffffff80}\n"], dependencies: [{ kind: "component", type: EntityPreview, selector: "mt-entity-preview", inputs: ["data", "attachmentShape"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3677
3723
|
}
|
|
3678
3724
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EntitiesPreview, decorators: [{
|
|
3679
3725
|
type: Component,
|
|
3680
3726
|
args: [{ selector: 'mt-entities-preview', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [EntityPreview, NgTemplateOutlet], host: {
|
|
3681
3727
|
class: 'block min-w-0 w-full',
|
|
3682
3728
|
'[class.mt-entities-stack-narrow]': 'stackOnNarrow()',
|
|
3683
|
-
}, template: "<div class=\"flex flex-col gap-4\">\r\n @for (group of slotGroups(); track group.trackKey) {\r\n @if (group.boxed) {\r\n <!-- Titled section box (matches the client-form section view) -->\r\n <div\r\n class=\"flex flex-col gap-0 overflow-hidden rounded-md border border-surface-200 bg-surface-0\"\r\n >\r\n @if (group.title) {\r\n <h3\r\n class=\"m-0 border-b border-surface-200 bg-surface-50 px-4 py-3 text-lg font-semibold text-color\"\r\n dir=\"auto\"\r\n >\r\n {{ group.title }}\r\n </h3>\r\n }\r\n <div class=\"p-4\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"entityGrid\"\r\n [ngTemplateOutletContext]=\"{ $implicit: group.slots }\"\r\n />\r\n </div>\r\n </div>\r\n } @else {\r\n <ng-container\r\n [ngTemplateOutlet]=\"entityGrid\"\r\n [ngTemplateOutletContext]=\"{ $implicit: group.slots }\"\r\n />\r\n }\r\n }\r\n</div>\r\n\r\n<!--\r\n Every binding here reads a value the component already resolved into the slot\r\n (see `EntitiesPreview.slotGroups`). Keep it that way: this template runs once\r\n per entity per change detection pass, and a card grid renders thousands of\r\n them, so a method call or a fresh object literal in this block is measurably\r\n expensive.\r\n-->\r\n<ng-template #entityGrid let-slots>\r\n <div class=\"mt-entities-grid grid grid-cols-24 gap-x-3 gap-y-5\">\r\n @for (slot of slots; track slot.trackKey) {\r\n <div\r\n [class]=\"slot.containerClass\"\r\n [attr.data-row-click-ignore]=\"slot.rowClickIgnore\"\r\n [attr.title]=\"slot.title\"\r\n [style.grid-column]=\"slot.colSpan\"\r\n (click)=\"onSlotClick($event, slot)\"\r\n >\r\n <mt-entity-preview\r\n [data]=\"slot.entity\"\r\n [attachmentShape]=\"attachmentShape()\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n</ng-template>\r\n", styles: [":host{container-type:inline-size}@container (max-width: 400px){:host(.mt-entities-stack-narrow) .mt-entities-grid{grid-template-columns:1fr;column-gap:0}:host(.mt-entities-stack-narrow) .mt-entities-grid>*{grid-column:1 / -1!important}}@container (max-width: 280px){.mt-entities-grid{grid-template-columns:1fr;column-gap:0}.mt-entities-grid>*{grid-column:1 / -1!important}}.mt-entity-filterable{cursor:url(\"data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2314b8a6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 3H2l8 9.46V19l4 2v-8.54L22 3z'/%3E%3C/svg%3E\") 7 3,zoom-in!important}.mt-entity-filter-active{cursor:url(\"data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='%2314b8a6' stroke='%2314b8a6' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 3H2l8 9.46V19l4 2v-8.54L22 3z'/%3E%3C/svg%3E\") 7 3,zoom-out!important}.mt-entity-filterable:hover{background-color:#ccfbf147;outline:1px dashed rgb(20 184 166 / .28);outline-offset:2px}.mt-entity-filter-active{background-color:#ccfbf14d;box-shadow:inset 0 0 0 1.5px #14b8a666,0 0 0 1px #ffffff80}\n"] }]
|
|
3729
|
+
}, template: "<div class=\"flex flex-col gap-4\">\r\n @for (group of slotGroups(); track group.trackKey) {\r\n @if (group.boxed) {\r\n <!-- Titled section box (matches the client-form section view) -->\r\n <div\r\n class=\"flex flex-col gap-0 overflow-hidden rounded-md border border-surface-200 bg-surface-0\"\r\n >\r\n @if (group.title) {\r\n <h3\r\n class=\"m-0 border-b border-surface-200 bg-surface-50 px-4 py-3 text-lg font-semibold text-color\"\r\n dir=\"auto\"\r\n >\r\n {{ group.title }}\r\n </h3>\r\n }\r\n <div class=\"p-4\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"entityGrid\"\r\n [ngTemplateOutletContext]=\"{ $implicit: group.slots }\"\r\n />\r\n </div>\r\n </div>\r\n } @else {\r\n <ng-container\r\n [ngTemplateOutlet]=\"entityGrid\"\r\n [ngTemplateOutletContext]=\"{ $implicit: group.slots }\"\r\n />\r\n }\r\n }\r\n</div>\r\n\r\n<!--\r\n Every binding here reads a value the component already resolved into the slot\r\n (see `EntitiesPreview.slotGroups`). Keep it that way: this template runs once\r\n per entity per change detection pass, and a card grid renders thousands of\r\n them, so a method call or a fresh object literal in this block is measurably\r\n expensive.\r\n-->\r\n<ng-template #entityGrid let-slots>\r\n <div class=\"mt-entities-grid grid grid-cols-24 gap-x-3 gap-y-5\">\r\n @for (slot of slots; track slot.trackKey) {\r\n <div\r\n [class]=\"slot.containerClass\"\r\n [attr.data-row-click-ignore]=\"slot.rowClickIgnore\"\r\n [attr.title]=\"slot.title\"\r\n [style.grid-column]=\"slot.colSpan\"\r\n [style.grid-row]=\"slot.gridRow\"\r\n (click)=\"onSlotClick($event, slot)\"\r\n >\r\n <mt-entity-preview\r\n [data]=\"slot.entity\"\r\n [attachmentShape]=\"attachmentShape()\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n</ng-template>\r\n", styles: [":host{container-type:inline-size}@container (max-width: 400px){:host(.mt-entities-stack-narrow) .mt-entities-grid{grid-template-columns:1fr;column-gap:0}:host(.mt-entities-stack-narrow) .mt-entities-grid>*{grid-column:1 / -1!important;grid-row:auto!important}}@container (max-width: 280px){.mt-entities-grid{grid-template-columns:1fr;column-gap:0}.mt-entities-grid>*{grid-column:1 / -1!important;grid-row:auto!important}}.mt-entity-filterable{cursor:url(\"data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2314b8a6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 3H2l8 9.46V19l4 2v-8.54L22 3z'/%3E%3C/svg%3E\") 7 3,zoom-in!important}.mt-entity-filter-active{cursor:url(\"data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='%2314b8a6' stroke='%2314b8a6' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 3H2l8 9.46V19l4 2v-8.54L22 3z'/%3E%3C/svg%3E\") 7 3,zoom-out!important}.mt-entity-filterable:hover{background-color:#ccfbf147;outline:1px dashed rgb(20 184 166 / .28);outline-offset:2px}.mt-entity-filter-active{background-color:#ccfbf14d;box-shadow:inset 0 0 0 1.5px #14b8a666,0 0 0 1px #ffffff80}\n"] }]
|
|
3684
3730
|
}], propDecorators: { entities: [{ type: i0.Input, args: [{ isSignal: true, alias: "entities", required: true }] }], attachmentShape: [{ type: i0.Input, args: [{ isSignal: true, alias: "attachmentShape", required: false }] }], stackOnNarrow: [{ type: i0.Input, args: [{ isSignal: true, alias: "stackOnNarrow", required: false }] }], clickableKeys: [{ type: i0.Input, args: [{ isSignal: true, alias: "clickableKeys", required: false }] }], activeKeys: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeKeys", required: false }] }], clickableTooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "clickableTooltip", required: false }] }], activeTooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeTooltip", required: false }] }], entityClick: [{ type: i0.Output, args: ["entityClick"] }] } });
|
|
3685
3731
|
/** Stable key resolution shared with the host — must agree on order. */
|
|
3686
3732
|
function resolveEntityKey(entity) {
|
|
@@ -3833,6 +3879,11 @@ class EntitiesManage extends EntitiesResizeBase {
|
|
|
3833
3879
|
return 'span 24';
|
|
3834
3880
|
return this.getResizeColSpan(entity);
|
|
3835
3881
|
}
|
|
3882
|
+
/** Returns the grid-row span (`null` = single row) for a given entity */
|
|
3883
|
+
getRowSpan(entity) {
|
|
3884
|
+
const { configuration } = entity;
|
|
3885
|
+
return isEntitySection(entity) ? null : resolveEntityGridRow(configuration);
|
|
3886
|
+
}
|
|
3836
3887
|
/** True when the entity is a full-width `Section` layout marker. */
|
|
3837
3888
|
isSection(entity) {
|
|
3838
3889
|
return isEntitySection(entity);
|
|
@@ -3891,16 +3942,16 @@ class EntitiesManage extends EntitiesResizeBase {
|
|
|
3891
3942
|
});
|
|
3892
3943
|
}
|
|
3893
3944
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EntitiesManage, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
3894
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: EntitiesManage, isStandalone: true, selector: "mt-entities-manage", inputs: { entities: { classPropertyName: "entities", publicName: "entities", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { entities: "entitiesChange", entitiesReordered: "entitiesReordered", entityClicked: "entityClicked", externalItemDropped: "externalItemDropped" }, usesInheritance: true, ngImport: i0, template: "<div\r\n cdkDropList\r\n cdkDropListOrientation=\"mixed\"\r\n [cdkDropListData]=\"displayEntities()\"\r\n (cdkDropListDropped)=\"onDrop($event)\"\r\n class=\"grid grid-cols-24 gap-x-4 gap-y-6\"\r\n>\r\n @for (\r\n entity of displayEntities();\r\n track entity.key ?? entity.order ?? $index\r\n ) {\r\n @if (isSection(entity)) {\r\n <!-- Section marker: full-width, non-resizable header row -->\r\n <div\r\n cdkDrag\r\n [cdkDragData]=\"entity\"\r\n class=\"entity-cell section-row group relative min-w-0 flex items-center gap-2 px-4 py-2.5 cursor-grab active:cursor-grabbing rounded-md border border-surface-200 bg-surface-50 transition-colors hover:bg-emphasis\"\r\n [class.resizing]=\"resizingEntity() === entity\"\r\n [style.grid-column]=\"getColSpan(entity)\"\r\n (click)=\"entityClicked.emit(entity)\"\r\n >\r\n <div\r\n *cdkDragPlaceholder\r\n class=\"h-full min-h-11 bg-black/10 rounded-md\"\r\n [style.grid-column]=\"getColSpan(entity)\"\r\n ></div>\r\n\r\n <span\r\n class=\"flex-1 min-w-0 truncate text-base font-semibold\"\r\n dir=\"auto\"\r\n >\r\n {{ entity.name }}\r\n </span>\r\n <mt-icon\r\n icon=\"editor.pencil-01\"\r\n class=\"shrink-0 opacity-0 transition-opacity group-hover:opacity-60\"\r\n />\r\n </div>\r\n } @else {\r\n <div\r\n cdkDrag\r\n [cdkDragData]=\"entity\"\r\n class=\"entity-cell group relative min-w-0 flex items-center p-3 cursor-grab active:cursor-grabbing rounded-lg transition-colors bg-surface-100/60\"\r\n [class.border]=\"entity.configuration?.showBorder\"\r\n [class.border-dashed]=\"entity.configuration?.showBorder\"\r\n [class.border-gray-300]=\"entity.configuration?.showBorder\"\r\n [class.resizing]=\"resizingEntity() === entity\"\r\n [style.grid-column]=\"getColSpan(entity)\"\r\n >\r\n <!-- Drag placeholder -->\r\n <div\r\n *cdkDragPlaceholder\r\n class=\"h-full min-h-12 bg-black/10 rounded-xl\"\r\n [style.grid-column]=\"getColSpan(entity)\"\r\n ></div>\r\n\r\n <mt-entity-preview\r\n [data]=\"entity\"\r\n class=\"flex-1 min-w-0 cursor-pointer\"\r\n (click)=\"entityClicked.emit(entity)\"\r\n />\r\n\r\n <!-- Resize handle (right edge) -->\r\n <div\r\n class=\"resize-handle\"\r\n (mousedown)=\"onResizeStart($event, entity)\"\r\n (click)=\"$event.stopPropagation()\"\r\n >\r\n <div class=\"resize-handle-bar\"></div>\r\n </div>\r\n </div>\r\n }\r\n }\r\n</div>\r\n", styles: [".cdk-drag{cursor:grab}.cdk-drag:active{cursor:grabbing}.cdk-drag-preview{cursor:grabbing;overflow:hidden}.cdk-drag-placeholder{opacity:.5}.cdk-drop-list-dragging .cdk-drag{cursor:grabbing}.entity-cell{position:relative}.resize-handle{position:absolute;top:0;inset-inline-end:-4px;width:8px;height:100%;cursor:col-resize;z-index:10;display:flex;align-items:center;justify-content:center;opacity:0;transition:opacity .15s ease}.entity-cell:hover .resize-handle,.entity-cell.resizing .resize-handle{opacity:1}.resize-handle-bar{width:3px;height:24px;border-radius:2px;background-color:var(--p-primary-color, #6366f1);transition:height .15s ease,background-color .15s ease}.resize-handle:hover .resize-handle-bar{height:36px;background-color:var(--p-primary-color, #4f46e5)}.entity-cell.resizing{outline:2px dashed var(--p-primary-color, #6366f1);outline-offset:-1px;border-radius:8px;-webkit-user-select:none;user-select:none}\n"], dependencies: [{ kind: "component", type: EntityPreview, selector: "mt-entity-preview", inputs: ["data", "attachmentShape"] }, { kind: "component", type: Icon, selector: "mt-icon", inputs: ["icon"] }, { kind: "directive", type: CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: CdkDragPlaceholder, selector: "ng-template[cdkDragPlaceholder]", inputs: ["data"] }] });
|
|
3945
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: EntitiesManage, isStandalone: true, selector: "mt-entities-manage", inputs: { entities: { classPropertyName: "entities", publicName: "entities", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { entities: "entitiesChange", entitiesReordered: "entitiesReordered", entityClicked: "entityClicked", externalItemDropped: "externalItemDropped" }, usesInheritance: true, ngImport: i0, template: "<div\r\n cdkDropList\r\n cdkDropListOrientation=\"mixed\"\r\n [cdkDropListData]=\"displayEntities()\"\r\n (cdkDropListDropped)=\"onDrop($event)\"\r\n class=\"grid grid-cols-24 gap-x-4 gap-y-6\"\r\n>\r\n @for (\r\n entity of displayEntities();\r\n track entity.key ?? entity.order ?? $index\r\n ) {\r\n @if (isSection(entity)) {\r\n <!-- Section marker: full-width, non-resizable header row -->\r\n <div\r\n cdkDrag\r\n [cdkDragData]=\"entity\"\r\n class=\"entity-cell section-row group relative min-w-0 flex items-center gap-2 px-4 py-2.5 cursor-grab active:cursor-grabbing rounded-md border border-surface-200 bg-surface-50 transition-colors hover:bg-emphasis\"\r\n [class.resizing]=\"resizingEntity() === entity\"\r\n [style.grid-column]=\"getColSpan(entity)\"\r\n (click)=\"entityClicked.emit(entity)\"\r\n >\r\n <div\r\n *cdkDragPlaceholder\r\n class=\"h-full min-h-11 bg-black/10 rounded-md\"\r\n [style.grid-column]=\"getColSpan(entity)\"\r\n ></div>\r\n\r\n <span\r\n class=\"flex-1 min-w-0 truncate text-base font-semibold\"\r\n dir=\"auto\"\r\n >\r\n {{ entity.name }}\r\n </span>\r\n <mt-icon\r\n icon=\"editor.pencil-01\"\r\n class=\"shrink-0 opacity-0 transition-opacity group-hover:opacity-60\"\r\n />\r\n </div>\r\n } @else {\r\n <div\r\n cdkDrag\r\n [cdkDragData]=\"entity\"\r\n class=\"entity-cell group relative min-w-0 flex items-center p-3 cursor-grab active:cursor-grabbing rounded-lg transition-colors bg-surface-100/60\"\r\n [class.border]=\"entity.configuration?.showBorder\"\r\n [class.border-dashed]=\"entity.configuration?.showBorder\"\r\n [class.border-gray-300]=\"entity.configuration?.showBorder\"\r\n [class.resizing]=\"resizingEntity() === entity\"\r\n [style.grid-column]=\"getColSpan(entity)\"\r\n [style.grid-row]=\"getRowSpan(entity)\"\r\n >\r\n <!-- Drag placeholder -->\r\n <div\r\n *cdkDragPlaceholder\r\n class=\"h-full min-h-12 bg-black/10 rounded-xl\"\r\n [style.grid-column]=\"getColSpan(entity)\"\r\n [style.grid-row]=\"getRowSpan(entity)\"\r\n ></div>\r\n\r\n <mt-entity-preview\r\n [data]=\"entity\"\r\n class=\"flex-1 min-w-0 cursor-pointer\"\r\n (click)=\"entityClicked.emit(entity)\"\r\n />\r\n\r\n <!-- Resize handle (right edge) -->\r\n <div\r\n class=\"resize-handle\"\r\n (mousedown)=\"onResizeStart($event, entity)\"\r\n (click)=\"$event.stopPropagation()\"\r\n >\r\n <div class=\"resize-handle-bar\"></div>\r\n </div>\r\n </div>\r\n }\r\n }\r\n</div>\r\n", styles: [".cdk-drag{cursor:grab}.cdk-drag:active{cursor:grabbing}.cdk-drag-preview{cursor:grabbing;overflow:hidden}.cdk-drag-placeholder{opacity:.5}.cdk-drop-list-dragging .cdk-drag{cursor:grabbing}.entity-cell{position:relative}.resize-handle{position:absolute;top:0;inset-inline-end:-4px;width:8px;height:100%;cursor:col-resize;z-index:10;display:flex;align-items:center;justify-content:center;opacity:0;transition:opacity .15s ease}.entity-cell:hover .resize-handle,.entity-cell.resizing .resize-handle{opacity:1}.resize-handle-bar{width:3px;height:24px;border-radius:2px;background-color:var(--p-primary-color, #6366f1);transition:height .15s ease,background-color .15s ease}.resize-handle:hover .resize-handle-bar{height:36px;background-color:var(--p-primary-color, #4f46e5)}.entity-cell.resizing{outline:2px dashed var(--p-primary-color, #6366f1);outline-offset:-1px;border-radius:8px;-webkit-user-select:none;user-select:none}\n"], dependencies: [{ kind: "component", type: EntityPreview, selector: "mt-entity-preview", inputs: ["data", "attachmentShape"] }, { kind: "component", type: Icon, selector: "mt-icon", inputs: ["icon"] }, { kind: "directive", type: CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: CdkDragPlaceholder, selector: "ng-template[cdkDragPlaceholder]", inputs: ["data"] }] });
|
|
3895
3946
|
}
|
|
3896
3947
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EntitiesManage, decorators: [{
|
|
3897
3948
|
type: Component,
|
|
3898
|
-
args: [{ selector: 'mt-entities-manage', standalone: true, imports: [EntityPreview, Icon, CdkDrag, CdkDropList, CdkDragPlaceholder], template: "<div\r\n cdkDropList\r\n cdkDropListOrientation=\"mixed\"\r\n [cdkDropListData]=\"displayEntities()\"\r\n (cdkDropListDropped)=\"onDrop($event)\"\r\n class=\"grid grid-cols-24 gap-x-4 gap-y-6\"\r\n>\r\n @for (\r\n entity of displayEntities();\r\n track entity.key ?? entity.order ?? $index\r\n ) {\r\n @if (isSection(entity)) {\r\n <!-- Section marker: full-width, non-resizable header row -->\r\n <div\r\n cdkDrag\r\n [cdkDragData]=\"entity\"\r\n class=\"entity-cell section-row group relative min-w-0 flex items-center gap-2 px-4 py-2.5 cursor-grab active:cursor-grabbing rounded-md border border-surface-200 bg-surface-50 transition-colors hover:bg-emphasis\"\r\n [class.resizing]=\"resizingEntity() === entity\"\r\n [style.grid-column]=\"getColSpan(entity)\"\r\n (click)=\"entityClicked.emit(entity)\"\r\n >\r\n <div\r\n *cdkDragPlaceholder\r\n class=\"h-full min-h-11 bg-black/10 rounded-md\"\r\n [style.grid-column]=\"getColSpan(entity)\"\r\n ></div>\r\n\r\n <span\r\n class=\"flex-1 min-w-0 truncate text-base font-semibold\"\r\n dir=\"auto\"\r\n >\r\n {{ entity.name }}\r\n </span>\r\n <mt-icon\r\n icon=\"editor.pencil-01\"\r\n class=\"shrink-0 opacity-0 transition-opacity group-hover:opacity-60\"\r\n />\r\n </div>\r\n } @else {\r\n <div\r\n cdkDrag\r\n [cdkDragData]=\"entity\"\r\n class=\"entity-cell group relative min-w-0 flex items-center p-3 cursor-grab active:cursor-grabbing rounded-lg transition-colors bg-surface-100/60\"\r\n [class.border]=\"entity.configuration?.showBorder\"\r\n [class.border-dashed]=\"entity.configuration?.showBorder\"\r\n [class.border-gray-300]=\"entity.configuration?.showBorder\"\r\n [class.resizing]=\"resizingEntity() === entity\"\r\n [style.grid-column]=\"getColSpan(entity)\"\r\n >\r\n <!-- Drag placeholder -->\r\n <div\r\n *cdkDragPlaceholder\r\n class=\"h-full min-h-12 bg-black/10 rounded-xl\"\r\n [style.grid-column]=\"getColSpan(entity)\"\r\n ></div>\r\n\r\n <mt-entity-preview\r\n [data]=\"entity\"\r\n class=\"flex-1 min-w-0 cursor-pointer\"\r\n (click)=\"entityClicked.emit(entity)\"\r\n />\r\n\r\n <!-- Resize handle (right edge) -->\r\n <div\r\n class=\"resize-handle\"\r\n (mousedown)=\"onResizeStart($event, entity)\"\r\n (click)=\"$event.stopPropagation()\"\r\n >\r\n <div class=\"resize-handle-bar\"></div>\r\n </div>\r\n </div>\r\n }\r\n }\r\n</div>\r\n", styles: [".cdk-drag{cursor:grab}.cdk-drag:active{cursor:grabbing}.cdk-drag-preview{cursor:grabbing;overflow:hidden}.cdk-drag-placeholder{opacity:.5}.cdk-drop-list-dragging .cdk-drag{cursor:grabbing}.entity-cell{position:relative}.resize-handle{position:absolute;top:0;inset-inline-end:-4px;width:8px;height:100%;cursor:col-resize;z-index:10;display:flex;align-items:center;justify-content:center;opacity:0;transition:opacity .15s ease}.entity-cell:hover .resize-handle,.entity-cell.resizing .resize-handle{opacity:1}.resize-handle-bar{width:3px;height:24px;border-radius:2px;background-color:var(--p-primary-color, #6366f1);transition:height .15s ease,background-color .15s ease}.resize-handle:hover .resize-handle-bar{height:36px;background-color:var(--p-primary-color, #4f46e5)}.entity-cell.resizing{outline:2px dashed var(--p-primary-color, #6366f1);outline-offset:-1px;border-radius:8px;-webkit-user-select:none;user-select:none}\n"] }]
|
|
3949
|
+
args: [{ selector: 'mt-entities-manage', standalone: true, imports: [EntityPreview, Icon, CdkDrag, CdkDropList, CdkDragPlaceholder], template: "<div\r\n cdkDropList\r\n cdkDropListOrientation=\"mixed\"\r\n [cdkDropListData]=\"displayEntities()\"\r\n (cdkDropListDropped)=\"onDrop($event)\"\r\n class=\"grid grid-cols-24 gap-x-4 gap-y-6\"\r\n>\r\n @for (\r\n entity of displayEntities();\r\n track entity.key ?? entity.order ?? $index\r\n ) {\r\n @if (isSection(entity)) {\r\n <!-- Section marker: full-width, non-resizable header row -->\r\n <div\r\n cdkDrag\r\n [cdkDragData]=\"entity\"\r\n class=\"entity-cell section-row group relative min-w-0 flex items-center gap-2 px-4 py-2.5 cursor-grab active:cursor-grabbing rounded-md border border-surface-200 bg-surface-50 transition-colors hover:bg-emphasis\"\r\n [class.resizing]=\"resizingEntity() === entity\"\r\n [style.grid-column]=\"getColSpan(entity)\"\r\n (click)=\"entityClicked.emit(entity)\"\r\n >\r\n <div\r\n *cdkDragPlaceholder\r\n class=\"h-full min-h-11 bg-black/10 rounded-md\"\r\n [style.grid-column]=\"getColSpan(entity)\"\r\n ></div>\r\n\r\n <span\r\n class=\"flex-1 min-w-0 truncate text-base font-semibold\"\r\n dir=\"auto\"\r\n >\r\n {{ entity.name }}\r\n </span>\r\n <mt-icon\r\n icon=\"editor.pencil-01\"\r\n class=\"shrink-0 opacity-0 transition-opacity group-hover:opacity-60\"\r\n />\r\n </div>\r\n } @else {\r\n <div\r\n cdkDrag\r\n [cdkDragData]=\"entity\"\r\n class=\"entity-cell group relative min-w-0 flex items-center p-3 cursor-grab active:cursor-grabbing rounded-lg transition-colors bg-surface-100/60\"\r\n [class.border]=\"entity.configuration?.showBorder\"\r\n [class.border-dashed]=\"entity.configuration?.showBorder\"\r\n [class.border-gray-300]=\"entity.configuration?.showBorder\"\r\n [class.resizing]=\"resizingEntity() === entity\"\r\n [style.grid-column]=\"getColSpan(entity)\"\r\n [style.grid-row]=\"getRowSpan(entity)\"\r\n >\r\n <!-- Drag placeholder -->\r\n <div\r\n *cdkDragPlaceholder\r\n class=\"h-full min-h-12 bg-black/10 rounded-xl\"\r\n [style.grid-column]=\"getColSpan(entity)\"\r\n [style.grid-row]=\"getRowSpan(entity)\"\r\n ></div>\r\n\r\n <mt-entity-preview\r\n [data]=\"entity\"\r\n class=\"flex-1 min-w-0 cursor-pointer\"\r\n (click)=\"entityClicked.emit(entity)\"\r\n />\r\n\r\n <!-- Resize handle (right edge) -->\r\n <div\r\n class=\"resize-handle\"\r\n (mousedown)=\"onResizeStart($event, entity)\"\r\n (click)=\"$event.stopPropagation()\"\r\n >\r\n <div class=\"resize-handle-bar\"></div>\r\n </div>\r\n </div>\r\n }\r\n }\r\n</div>\r\n", styles: [".cdk-drag{cursor:grab}.cdk-drag:active{cursor:grabbing}.cdk-drag-preview{cursor:grabbing;overflow:hidden}.cdk-drag-placeholder{opacity:.5}.cdk-drop-list-dragging .cdk-drag{cursor:grabbing}.entity-cell{position:relative}.resize-handle{position:absolute;top:0;inset-inline-end:-4px;width:8px;height:100%;cursor:col-resize;z-index:10;display:flex;align-items:center;justify-content:center;opacity:0;transition:opacity .15s ease}.entity-cell:hover .resize-handle,.entity-cell.resizing .resize-handle{opacity:1}.resize-handle-bar{width:3px;height:24px;border-radius:2px;background-color:var(--p-primary-color, #6366f1);transition:height .15s ease,background-color .15s ease}.resize-handle:hover .resize-handle-bar{height:36px;background-color:var(--p-primary-color, #4f46e5)}.entity-cell.resizing{outline:2px dashed var(--p-primary-color, #6366f1);outline-offset:-1px;border-radius:8px;-webkit-user-select:none;user-select:none}\n"] }]
|
|
3899
3950
|
}], propDecorators: { entities: [{ type: i0.Input, args: [{ isSignal: true, alias: "entities", required: true }] }, { type: i0.Output, args: ["entitiesChange"] }], entitiesReordered: [{ type: i0.Output, args: ["entitiesReordered"] }], entityClicked: [{ type: i0.Output, args: ["entityClicked"] }], externalItemDropped: [{ type: i0.Output, args: ["externalItemDropped"] }] } });
|
|
3900
3951
|
|
|
3901
3952
|
/**
|
|
3902
3953
|
* Generated bundle index. Do not edit.
|
|
3903
3954
|
*/
|
|
3904
3955
|
|
|
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 };
|
|
3956
|
+
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 };
|
|
3906
3957
|
//# sourceMappingURL=masterteam-components-entities.mjs.map
|