@masterteam/components 0.0.300 → 0.0.301
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/common.css +1 -1
- package/fesm2022/masterteam-components-business-fields.mjs +138 -51
- package/fesm2022/masterteam-components-business-fields.mjs.map +1 -1
- package/fesm2022/masterteam-components-checkbox-field.mjs +2 -2
- package/fesm2022/masterteam-components-checkbox-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-entities.mjs +208 -291
- package/fesm2022/masterteam-components-entities.mjs.map +1 -1
- package/fesm2022/masterteam-components-radio-button-field.mjs +2 -2
- package/fesm2022/masterteam-components-radio-button-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-select-field.mjs +23 -2
- package/fesm2022/masterteam-components-select-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-table.mjs +1 -1
- package/fesm2022/masterteam-components-table.mjs.map +1 -1
- package/fesm2022/masterteam-components-toggle-field.mjs +2 -2
- package/fesm2022/masterteam-components-toggle-field.mjs.map +1 -1
- package/fesm2022/masterteam-components.mjs +43 -2
- package/fesm2022/masterteam-components.mjs.map +1 -1
- package/package.json +1 -1
- package/types/masterteam-components-business-fields.d.ts +80 -27
- package/types/masterteam-components-entities.d.ts +132 -114
- package/types/masterteam-components-select-field.d.ts +14 -0
- package/types/masterteam-components.d.ts +27 -2
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, computed, ChangeDetectionStrategy, Component, inject, ElementRef, DestroyRef, afterNextRender, Directive,
|
|
2
|
+
import { signal, Injectable, InjectionToken, input, computed, ChangeDetectionStrategy, Component, inject, ElementRef, DestroyRef, afterNextRender, Directive, effect, untracked, ViewEncapsulation, output, NgZone, model } from '@angular/core';
|
|
3
3
|
import { TruncateTooltip, Tooltip } from '@masterteam/components/tooltip';
|
|
4
4
|
import { Icon } from '@masterteam/icons';
|
|
5
|
-
import { MTDateFormatPipe, REQUEST_CONTEXT, readableTextOn } from '@masterteam/components';
|
|
5
|
+
import { MTDateFormatPipe, REQUEST_CONTEXT, coerceCheckboxValue, readableTextOn } from '@masterteam/components';
|
|
6
6
|
import { HttpContext, HttpClient } from '@angular/common/http';
|
|
7
7
|
import { TranslocoPipe, TranslocoService } from '@jsverse/transloco';
|
|
8
8
|
import { Avatar } from '@masterteam/components/avatar';
|
|
@@ -14,10 +14,10 @@ import { FormsModule } from '@angular/forms';
|
|
|
14
14
|
import { Button } from '@masterteam/components/button';
|
|
15
15
|
import { forkJoin, finalize, of, take, switchMap, EMPTY, map, catchError } from 'rxjs';
|
|
16
16
|
import { Chip } from '@masterteam/components/chip';
|
|
17
|
+
import { NgComponentOutlet, NgTemplateOutlet, DOCUMENT } from '@angular/common';
|
|
17
18
|
import { ModalService } from '@masterteam/components/modal';
|
|
18
19
|
import * as i1$1 from 'primeng/tooltip';
|
|
19
20
|
import { TooltipModule } from 'primeng/tooltip';
|
|
20
|
-
import { NgComponentOutlet, NgTemplateOutlet, DOCUMENT } from '@angular/common';
|
|
21
21
|
import { CdkDrag, CdkDropList, CdkDragPlaceholder } from '@angular/cdk/drag-drop';
|
|
22
22
|
|
|
23
23
|
/**
|
|
@@ -224,6 +224,40 @@ function normalizeNumerals(input) {
|
|
|
224
224
|
.replace(/[٬ ]/g, '');
|
|
225
225
|
}
|
|
226
226
|
|
|
227
|
+
/**
|
|
228
|
+
* Publishes an `EntityRuntimeContext` to a subtree of entity renderers.
|
|
229
|
+
*
|
|
230
|
+
* Deliberately **not** `providedIn: 'root'`: an unprovided store is the signal
|
|
231
|
+
* that the host has no runtime context, and every consumer injects it
|
|
232
|
+
* `{ optional: true }`. Providing it on a component scopes it to that
|
|
233
|
+
* component's view — which is also how a nested renderer shuts the context
|
|
234
|
+
* off for its own children (see `EntityListField`, whose table cells must not
|
|
235
|
+
* re-enter the fetching path).
|
|
236
|
+
*/
|
|
237
|
+
class EntityRuntimeContextStore {
|
|
238
|
+
context = signal(null, ...(ngDevMode ? [{ debugName: "context" }] : /* istanbul ignore next */ []));
|
|
239
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EntityRuntimeContextStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
240
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EntityRuntimeContextStore });
|
|
241
|
+
}
|
|
242
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EntityRuntimeContextStore, decorators: [{
|
|
243
|
+
type: Injectable
|
|
244
|
+
}] });
|
|
245
|
+
/**
|
|
246
|
+
* The component `mt-entity-list-preview` renders inline instead of its
|
|
247
|
+
* count-and-drawer trigger, when a runtime context is available.
|
|
248
|
+
*
|
|
249
|
+
* Indirection rather than a direct import because the real renderer is
|
|
250
|
+
* `mt-entity-list-field` (`@masterteam/components/business-fields`), which
|
|
251
|
+
* builds on `mt-table` — and `table` already imports `entities`, so importing
|
|
252
|
+
* it back here would make the two entry points circular. The provider lives
|
|
253
|
+
* with the component: `provideEntityListTablePreview()`.
|
|
254
|
+
*
|
|
255
|
+
* The component is created with `NgComponentOutlet` and receives
|
|
256
|
+
* `propertyId`, `runtimeContext`, `configuration`, `initialValue`, `readonly`
|
|
257
|
+
* and `label` as inputs.
|
|
258
|
+
*/
|
|
259
|
+
const ENTITY_LIST_TABLE_COMPONENT = new InjectionToken('ENTITY_LIST_TABLE_COMPONENT');
|
|
260
|
+
|
|
227
261
|
class EntityField {
|
|
228
262
|
label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
229
263
|
labelIconName = input(null, ...(ngDevMode ? [{ debugName: "labelIconName" }] : /* istanbul ignore next */ []));
|
|
@@ -934,30 +968,16 @@ class EntityCheckbox {
|
|
|
934
968
|
displayName = computed(() => this.data()?.name ?? this.name() ?? '', ...(ngDevMode ? [{ debugName: "displayName" }] : /* istanbul ignore next */ []));
|
|
935
969
|
emptyLabel = ENTITY_EMPTY_VALUE_PLACEHOLDER;
|
|
936
970
|
hideName = computed(() => isEntityLabelHidden(this.data()?.configuration), ...(ngDevMode ? [{ debugName: "hideName" }] : /* istanbul ignore next */ []));
|
|
971
|
+
// Reads `rawValue` first (the value as stored) and falls back to the
|
|
972
|
+
// rendered `value`. Both arrive as text — `coerceCheckboxValue` owns the
|
|
973
|
+
// single definition of which strings count as checked, shared with the
|
|
974
|
+
// editable form so a record cannot preview one way and edit another.
|
|
937
975
|
checkboxState = computed(() => {
|
|
938
|
-
const raw = this.data()?.rawValue ?? this.rawValue();
|
|
939
|
-
if (raw !==
|
|
940
|
-
return
|
|
941
|
-
|
|
942
|
-
const val = this.data()?.value ?? this.value();
|
|
943
|
-
if (typeof val === 'string') {
|
|
944
|
-
return this.parseBoolean(val);
|
|
945
|
-
}
|
|
946
|
-
return null;
|
|
976
|
+
const raw = coerceCheckboxValue(this.data()?.rawValue ?? this.rawValue());
|
|
977
|
+
if (raw !== null)
|
|
978
|
+
return raw;
|
|
979
|
+
return coerceCheckboxValue(this.data()?.value ?? this.value());
|
|
947
980
|
}, ...(ngDevMode ? [{ debugName: "checkboxState" }] : /* istanbul ignore next */ []));
|
|
948
|
-
parseBoolean(value) {
|
|
949
|
-
const normalized = value.trim().toLowerCase();
|
|
950
|
-
if (!normalized.length) {
|
|
951
|
-
return null;
|
|
952
|
-
}
|
|
953
|
-
if (normalized === 'true') {
|
|
954
|
-
return true;
|
|
955
|
-
}
|
|
956
|
-
if (normalized === 'false') {
|
|
957
|
-
return false;
|
|
958
|
-
}
|
|
959
|
-
return null;
|
|
960
|
-
}
|
|
961
981
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EntityCheckbox, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
962
982
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: EntityCheckbox, isStandalone: true, selector: "mt-entity-checkbox", 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 }, rawValue: { classPropertyName: "rawValue", publicName: "rawValue", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"flex items-center gap-2\">\r\n @if (checkboxState() === true) {\r\n <svg class=\"w-5 h-5 text-green-500\" viewBox=\"0 0 20 20\" fill=\"currentColor\">\r\n <path\r\n fill-rule=\"evenodd\"\r\n d=\"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z\"\r\n clip-rule=\"evenodd\"\r\n />\r\n </svg>\r\n } @else if (checkboxState() === false) {\r\n <svg class=\"w-5 h-5 text-gray-300\" viewBox=\"0 0 20 20\" fill=\"currentColor\">\r\n <path\r\n fill-rule=\"evenodd\"\r\n d=\"M10 18a8 8 0 100-16 8 8 0 000 16zm-1-5.414l-2.293-2.293a1 1 0 011.414-1.414L10 11.172l3.879-3.879a1 1 0 111.414 1.414L10 13.414l-.707-.707-.293-.293z\"\r\n clip-rule=\"evenodd\"\r\n />\r\n </svg>\r\n } @else {\r\n <span\r\n class=\"inline-flex h-5 min-w-5 items-center justify-center rounded-full bg-gray-100 px-1 text-[10px] font-semibold text-gray-500\"\r\n >\r\n {{ emptyLabel }}\r\n </span>\r\n }\r\n @if (!hideName()) {\r\n <span class=\"text-sm font-semibold\">{{ displayName() }}</span>\r\n }\r\n</div>\r\n", changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
963
983
|
}
|
|
@@ -1637,11 +1657,11 @@ function coerceValue(data) {
|
|
|
1637
1657
|
}
|
|
1638
1658
|
}
|
|
1639
1659
|
/**
|
|
1640
|
-
*
|
|
1641
|
-
*
|
|
1642
|
-
*
|
|
1660
|
+
* The inline field catalog. `propertyConfiguration` is the untouched catalog
|
|
1661
|
+
* entry; `configuration` is read as well because the table merges its own
|
|
1662
|
+
* display flags into that object when it builds a cell.
|
|
1643
1663
|
*/
|
|
1644
|
-
function
|
|
1664
|
+
function readInlineFields(data) {
|
|
1645
1665
|
const sources = [
|
|
1646
1666
|
data.propertyConfiguration ?? null,
|
|
1647
1667
|
(data.configuration ?? null),
|
|
@@ -1649,27 +1669,13 @@ function readConfigArray(data, key) {
|
|
|
1649
1669
|
for (const source of sources) {
|
|
1650
1670
|
if (!source || Array.isArray(source))
|
|
1651
1671
|
continue;
|
|
1652
|
-
const
|
|
1653
|
-
if (Array.isArray(
|
|
1654
|
-
return
|
|
1672
|
+
const fields = source['inlineFields'];
|
|
1673
|
+
if (Array.isArray(fields) && fields.length > 0) {
|
|
1674
|
+
return fields;
|
|
1675
|
+
}
|
|
1655
1676
|
}
|
|
1656
1677
|
return [];
|
|
1657
1678
|
}
|
|
1658
|
-
/** The inline field catalog — present only on an inline list. */
|
|
1659
|
-
function readInlineFields(data) {
|
|
1660
|
-
return readConfigArray(data, 'inlineFields');
|
|
1661
|
-
}
|
|
1662
|
-
/**
|
|
1663
|
-
* Readable target property keys of a module-backed list, in configured order.
|
|
1664
|
-
*
|
|
1665
|
-
* Unlike `inlineFields` these are bare keys: a module list's configuration
|
|
1666
|
-
* names *what* to read from the target module, never how to render it — the
|
|
1667
|
-
* labels and view types live in that module's own catalog, which this
|
|
1668
|
-
* read-only renderer never fetches.
|
|
1669
|
-
*/
|
|
1670
|
-
function readModuleFieldKeys(data) {
|
|
1671
|
-
return readConfigArray(data, 'readFields').filter((key) => typeof key === 'string' && key.length > 0);
|
|
1672
|
-
}
|
|
1673
1679
|
/**
|
|
1674
1680
|
* The field this one is a machine companion of, when that field is present in
|
|
1675
1681
|
* the same list. `status_color` returns `status`; a standalone `color` field
|
|
@@ -1686,10 +1692,10 @@ function companionTargetOf(field, present) {
|
|
|
1686
1692
|
return null;
|
|
1687
1693
|
}
|
|
1688
1694
|
/** Field definitions in render order, machine companions already removed. */
|
|
1689
|
-
function
|
|
1690
|
-
const
|
|
1691
|
-
const present = new Set(
|
|
1692
|
-
const visible =
|
|
1695
|
+
function visibleFields(data, allowed) {
|
|
1696
|
+
const declared = [...readInlineFields(data)].sort((a, b) => (a.order ?? 0) - (b.order ?? 0));
|
|
1697
|
+
const present = new Set(declared.map((field) => field.key));
|
|
1698
|
+
const visible = declared.filter((field) => !isIdentifierField(field) && !companionTargetOf(field, present));
|
|
1693
1699
|
if (allowed.length === 0)
|
|
1694
1700
|
return visible;
|
|
1695
1701
|
const byKey = new Map(visible.map((field) => [field.key, field]));
|
|
@@ -1697,115 +1703,7 @@ function refineFields(declared, allowed) {
|
|
|
1697
1703
|
.map((key) => byKey.get(key))
|
|
1698
1704
|
.filter((field) => !!field);
|
|
1699
1705
|
}
|
|
1700
|
-
/** `values` merged by property key, with `next` winning. */
|
|
1701
|
-
function mergeRowValues(base, next) {
|
|
1702
|
-
const byKey = new Map();
|
|
1703
|
-
for (const item of [...(base.values ?? []), ...(next.values ?? [])]) {
|
|
1704
|
-
if (item?.propertyKey)
|
|
1705
|
-
byKey.set(item.propertyKey, item);
|
|
1706
|
-
}
|
|
1707
|
-
return { ...base, ...next, values: [...byKey.values()] };
|
|
1708
|
-
}
|
|
1709
|
-
/**
|
|
1710
|
-
* Identity that recognises the same record in both halves of the value, or
|
|
1711
|
-
* null when the row carries nothing stable to match on.
|
|
1712
|
-
*/
|
|
1713
|
-
function rowKeyOf(row) {
|
|
1714
|
-
const entityId = Number(row.entityId);
|
|
1715
|
-
if (entityId > 0)
|
|
1716
|
-
return `entity:${entityId}`;
|
|
1717
|
-
return row.rowId ? `row:${row.rowId}` : null;
|
|
1718
|
-
}
|
|
1719
|
-
/**
|
|
1720
|
-
* The rows a reader should see, drawn from both halves of the value.
|
|
1721
|
-
*
|
|
1722
|
-
* An inline list carries everything in `rows`, so this is a pass-through for
|
|
1723
|
-
* it. A **module-backed** list keeps its linked records in `snapshot.entities`
|
|
1724
|
-
* and uses `rows` only for creates/updates the backend has not applied yet —
|
|
1725
|
-
* so reading `rows` alone showed an empty placeholder for every module list
|
|
1726
|
-
* that had been saved, and a count of the pending writes for one that had not.
|
|
1727
|
-
* Neither number was the number of related records.
|
|
1728
|
-
*
|
|
1729
|
-
* Snapshot first, so the linked records keep their order, with a pending row
|
|
1730
|
-
* for the same record merged over it — a pending update carries only the keys
|
|
1731
|
-
* the user changed, so replacing outright would blank the rest.
|
|
1732
|
-
*/
|
|
1733
|
-
function displayRowsOf(value) {
|
|
1734
|
-
const byKey = new Map();
|
|
1735
|
-
const loose = [];
|
|
1736
|
-
const absorb = (rows) => {
|
|
1737
|
-
for (const row of rows ?? []) {
|
|
1738
|
-
if (!row)
|
|
1739
|
-
continue;
|
|
1740
|
-
const key = rowKeyOf(row);
|
|
1741
|
-
if (!key) {
|
|
1742
|
-
loose.push(row);
|
|
1743
|
-
continue;
|
|
1744
|
-
}
|
|
1745
|
-
const base = byKey.get(key);
|
|
1746
|
-
byKey.set(key, base ? mergeRowValues(base, row) : row);
|
|
1747
|
-
}
|
|
1748
|
-
};
|
|
1749
|
-
absorb(value.snapshot?.entities);
|
|
1750
|
-
absorb(value.rows);
|
|
1751
|
-
return [...byKey.values(), ...loose];
|
|
1752
|
-
}
|
|
1753
|
-
/**
|
|
1754
|
-
* Field definitions for a list whose configuration declares none — every
|
|
1755
|
-
* module-backed list, whose rows carry bare target property keys.
|
|
1756
|
-
*
|
|
1757
|
-
* Order and membership come from the configured `readFields` when there is
|
|
1758
|
-
* one: a key the configuration does not read is not shown, the same rule the
|
|
1759
|
-
* runtime table applies to its columns. With no `readFields`, every key
|
|
1760
|
-
* present renders in first-seen order.
|
|
1761
|
-
*/
|
|
1762
|
-
function derivedFields(data, rows) {
|
|
1763
|
-
const present = [];
|
|
1764
|
-
const seen = new Set();
|
|
1765
|
-
for (const row of rows) {
|
|
1766
|
-
for (const item of row.values ?? []) {
|
|
1767
|
-
if (!item?.propertyKey || seen.has(item.propertyKey))
|
|
1768
|
-
continue;
|
|
1769
|
-
seen.add(item.propertyKey);
|
|
1770
|
-
present.push(item.propertyKey);
|
|
1771
|
-
}
|
|
1772
|
-
}
|
|
1773
|
-
const configured = readModuleFieldKeys(data);
|
|
1774
|
-
const keys = configured.length
|
|
1775
|
-
? configured.filter((key) => seen.has(key))
|
|
1776
|
-
: present;
|
|
1777
|
-
// `catalog.nestedProperties` carries the target module's own label and view
|
|
1778
|
-
// type per nested key. The backend populates it for LookupModuleCheckList
|
|
1779
|
-
// and not (yet) for EntityList, so this is usually empty and the key is
|
|
1780
|
-
// humanized instead — but when it arrives, the columns improve on their own.
|
|
1781
|
-
const meta = new Map((data.nestedProperties ?? []).map((property) => [property.key, property]));
|
|
1782
|
-
return keys.map((key, order) => {
|
|
1783
|
-
const nested = meta.get(key);
|
|
1784
|
-
return {
|
|
1785
|
-
key,
|
|
1786
|
-
order,
|
|
1787
|
-
label: nested?.label,
|
|
1788
|
-
viewType: nested?.viewType,
|
|
1789
|
-
configuration: nested?.configuration,
|
|
1790
|
-
};
|
|
1791
|
-
});
|
|
1792
|
-
}
|
|
1793
|
-
/**
|
|
1794
|
-
* Row values by key. The resolved `value` is preferred over `rawValue` when
|
|
1795
|
-
* the backend sent one — a user object renders as a name, where the stored id
|
|
1796
|
-
* renders as a GUID.
|
|
1797
|
-
*/
|
|
1798
1706
|
function valuesByKey(row) {
|
|
1799
|
-
const map = new Map();
|
|
1800
|
-
for (const item of row.values ?? []) {
|
|
1801
|
-
if (!item?.propertyKey)
|
|
1802
|
-
continue;
|
|
1803
|
-
map.set(item.propertyKey, item.value ?? item.rawValue ?? null);
|
|
1804
|
-
}
|
|
1805
|
-
return map;
|
|
1806
|
-
}
|
|
1807
|
-
/** The same values, as the raw strings the status companions are read from. */
|
|
1808
|
-
function rawValuesByKey(row) {
|
|
1809
1707
|
const map = new Map();
|
|
1810
1708
|
for (const item of row.values ?? []) {
|
|
1811
1709
|
if (item?.propertyKey)
|
|
@@ -1818,16 +1716,13 @@ function rawValuesByKey(row) {
|
|
|
1818
1716
|
* companion becomes a `Status`, so the trio renders as one coloured badge
|
|
1819
1717
|
* instead of three separate cells.
|
|
1820
1718
|
*/
|
|
1821
|
-
function toNestedEntity(field, values
|
|
1822
|
-
const raw =
|
|
1823
|
-
const
|
|
1824
|
-
const
|
|
1825
|
-
const statusKey = rawValues.get(`${field.key}_key`);
|
|
1719
|
+
function toNestedEntity(field, values) {
|
|
1720
|
+
const raw = values.get(field.key) ?? null;
|
|
1721
|
+
const color = values.get(`${field.key}_color`);
|
|
1722
|
+
const statusKey = values.get(`${field.key}_key`);
|
|
1826
1723
|
const base = {
|
|
1827
1724
|
key: field.key,
|
|
1828
|
-
|
|
1829
|
-
// one; inline configuration never has one, hence the humanized fallback.
|
|
1830
|
-
name: field.label || humanizeEntityListKey(field.key),
|
|
1725
|
+
name: humanizeEntityListKey(field.key),
|
|
1831
1726
|
propertyConfiguration: field.configuration,
|
|
1832
1727
|
configuration: NESTED_FIELD_CONFIG,
|
|
1833
1728
|
order: field.order,
|
|
@@ -1848,43 +1743,32 @@ function toNestedEntity(field, values, rawValues) {
|
|
|
1848
1743
|
...base,
|
|
1849
1744
|
rawValue: raw ?? undefined,
|
|
1850
1745
|
viewType: normalizeViewType(field.viewType),
|
|
1851
|
-
|
|
1852
|
-
// to the stored string, which is all a snapshot carries today.
|
|
1853
|
-
value: (resolved ?? ''),
|
|
1746
|
+
value: raw ?? '',
|
|
1854
1747
|
};
|
|
1855
1748
|
}
|
|
1856
1749
|
/**
|
|
1857
1750
|
* Turns an `EntityList` entity into rendered rows.
|
|
1858
1751
|
*
|
|
1859
|
-
* Nothing is fetched
|
|
1860
|
-
*
|
|
1861
|
-
*
|
|
1862
|
-
* `
|
|
1863
|
-
*
|
|
1864
|
-
* ordered by `readFields`; that yields humanized labels and plain text rather
|
|
1865
|
-
* than the target module's own labels and view types, which only that module's
|
|
1866
|
-
* catalog knows and this renderer never loads.
|
|
1867
|
-
*
|
|
1868
|
-
* Shared by the trigger (`mt-entity-list-preview`, which needs the count and
|
|
1869
|
-
* the titles) and the drawer that renders them in full.
|
|
1752
|
+
* Nothing is fetched: the value already carries `rows[]`, and the property
|
|
1753
|
+
* configuration's `inlineFields` is the only description of the nested columns
|
|
1754
|
+
* — the rows themselves carry bare keys. Shared by the trigger
|
|
1755
|
+
* (`mt-entity-list-preview`, which needs the count and the titles) and the
|
|
1756
|
+
* drawer that renders them in full.
|
|
1870
1757
|
*
|
|
1871
1758
|
* `allowed` narrows to those keys, in that order; empty renders every field
|
|
1872
1759
|
* that survives the companion and identifier rules.
|
|
1873
1760
|
*/
|
|
1874
1761
|
function buildEntityListRows(data, allowed = []) {
|
|
1875
|
-
const
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
const rows = displayRowsOf(value);
|
|
1879
|
-
if (rows.length === 0)
|
|
1762
|
+
const fields = visibleFields(data, allowed);
|
|
1763
|
+
const rows = coerceValue(data)?.rows;
|
|
1764
|
+
if (!Array.isArray(rows))
|
|
1880
1765
|
return [];
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1766
|
+
return rows
|
|
1767
|
+
.filter((row) => !!row)
|
|
1768
|
+
.map((row, index) => {
|
|
1884
1769
|
const values = valuesByKey(row);
|
|
1885
|
-
const rawValues = rawValuesByKey(row);
|
|
1886
1770
|
const rendered = fields
|
|
1887
|
-
.map((field) => toNestedEntity(field, values
|
|
1771
|
+
.map((field) => toNestedEntity(field, values))
|
|
1888
1772
|
.filter((entity) => !!entity);
|
|
1889
1773
|
// The title is the first field that actually rendered, not the first
|
|
1890
1774
|
// that was declared: a leading field can drop out (an empty status
|
|
@@ -1925,22 +1809,6 @@ function summarizeEntityListRows(rows, limit) {
|
|
|
1925
1809
|
};
|
|
1926
1810
|
}
|
|
1927
1811
|
|
|
1928
|
-
/**
|
|
1929
|
-
* The component that renders an `EntityList` as its full read-only table —
|
|
1930
|
-
* `mt-entity-list-field` in practice, registered by `provideEntityListTable()`
|
|
1931
|
-
* from `@masterteam/components/business-fields`.
|
|
1932
|
-
*
|
|
1933
|
-
* It is a token rather than a direct import because `business-fields` already
|
|
1934
|
-
* imports this package: rendering the field from here would close the cycle.
|
|
1935
|
-
* The same reason `ENTITY_LIST_ADD_DIALOG_COMPONENT` exists one layer up.
|
|
1936
|
-
*
|
|
1937
|
-
* Unregistered, every `EntityList` keeps the compact count-and-drawer
|
|
1938
|
-
* renderer, which is also what a call site gets when it passes no
|
|
1939
|
-
* {@link EntityListPreviewContext} — a table cell must never expand into a
|
|
1940
|
-
* table, since one row would then own the height of the whole grid.
|
|
1941
|
-
*/
|
|
1942
|
-
const ENTITY_LIST_TABLE_COMPONENT = new InjectionToken('ENTITY_LIST_TABLE_COMPONENT');
|
|
1943
|
-
|
|
1944
1812
|
/**
|
|
1945
1813
|
* One shared active-language signal per `TranslocoService`.
|
|
1946
1814
|
*
|
|
@@ -2142,32 +2010,41 @@ class EntityListDrawer {
|
|
|
2142
2010
|
fields = input([], ...(ngDevMode ? [{ debugName: "fields" }] : /* istanbul ignore next */ []));
|
|
2143
2011
|
rows = computed(() => buildEntityListRows(this.data(), this.fields()), ...(ngDevMode ? [{ debugName: "rows" }] : /* istanbul ignore next */ []));
|
|
2144
2012
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EntityListDrawer, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2145
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: EntityListDrawer, isStandalone: true, selector: "mt-entity-list-drawer", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, fields: { classPropertyName: "fields", publicName: "fields", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "block h-full" }, ngImport: i0, template: "<!--\
|
|
2013
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: EntityListDrawer, isStandalone: true, selector: "mt-entity-list-drawer", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, fields: { classPropertyName: "fields", publicName: "fields", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "block h-full" }, ngImport: i0, template: "<!--\n Owns its scroll rather than taking the shared `mt-modal-content` shell: that\n class reserves 60px for a footer, and this drawer is read-only and has none,\n so it would leave a dead strip at the bottom. `h-full` chains off the host's,\n which chains off `.p-drawer-content` \u2014 the one definite height here.\n-->\n<div class=\"flex h-full flex-col gap-2 overflow-auto p-5\">\n @for (row of rows(); track row.id) {\n <div class=\"rounded-md border border-surface-200 bg-surface-50 px-3 py-2.5\">\n @if (row.title; as title) {\n <div class=\"min-w-0 text-sm font-medium text-color\">\n <mt-entity-value-preview [data]=\"title\" attachmentShape=\"compact\" />\n </div>\n }\n\n @if (row.fields.length) {\n <!--\n The drawer has room the cell did not, so fields get a real grid with\n their labels instead of being crushed onto one wrapping line.\n `auto-fill` adapts to the drawer's actual width without a container\n query, and the `min()` floor keeps a narrow drawer from being forced\n wider than the viewport.\n -->\n <div\n class=\"mt-2 grid gap-x-4 gap-y-3 [grid-template-columns:repeat(auto-fill,minmax(min(9rem,100%),1fr))]\"\n >\n @for (field of row.fields; track field.key) {\n <div class=\"min-w-0 overflow-hidden\">\n <mt-entity-value-preview\n [data]=\"field\"\n attachmentShape=\"compact\"\n />\n </div>\n }\n </div>\n }\n </div>\n }\n</div>\n", dependencies: [{ kind: "component", type: EntityValuePreview, selector: "mt-entity-value-preview", inputs: ["data", "attachmentShape"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2146
2014
|
}
|
|
2147
2015
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EntityListDrawer, decorators: [{
|
|
2148
2016
|
type: Component,
|
|
2149
|
-
args: [{ selector: 'mt-entity-list-drawer', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [EntityValuePreview], host: { class: 'block h-full' }, template: "<!--\
|
|
2017
|
+
args: [{ selector: 'mt-entity-list-drawer', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [EntityValuePreview], host: { class: 'block h-full' }, template: "<!--\n Owns its scroll rather than taking the shared `mt-modal-content` shell: that\n class reserves 60px for a footer, and this drawer is read-only and has none,\n so it would leave a dead strip at the bottom. `h-full` chains off the host's,\n which chains off `.p-drawer-content` \u2014 the one definite height here.\n-->\n<div class=\"flex h-full flex-col gap-2 overflow-auto p-5\">\n @for (row of rows(); track row.id) {\n <div class=\"rounded-md border border-surface-200 bg-surface-50 px-3 py-2.5\">\n @if (row.title; as title) {\n <div class=\"min-w-0 text-sm font-medium text-color\">\n <mt-entity-value-preview [data]=\"title\" attachmentShape=\"compact\" />\n </div>\n }\n\n @if (row.fields.length) {\n <!--\n The drawer has room the cell did not, so fields get a real grid with\n their labels instead of being crushed onto one wrapping line.\n `auto-fill` adapts to the drawer's actual width without a container\n query, and the `min()` floor keeps a narrow drawer from being forced\n wider than the viewport.\n -->\n <div\n class=\"mt-2 grid gap-x-4 gap-y-3 [grid-template-columns:repeat(auto-fill,minmax(min(9rem,100%),1fr))]\"\n >\n @for (field of row.fields; track field.key) {\n <div class=\"min-w-0 overflow-hidden\">\n <mt-entity-value-preview\n [data]=\"field\"\n attachmentShape=\"compact\"\n />\n </div>\n }\n </div>\n }\n </div>\n }\n</div>\n" }]
|
|
2150
2018
|
}], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }], fields: [{ type: i0.Input, args: [{ isSignal: true, alias: "fields", required: false }] }] } });
|
|
2151
2019
|
|
|
2152
2020
|
/** Rows named in the tooltip before it collapses into "+N more". */
|
|
2153
2021
|
const TOOLTIP_ROW_LIMIT = 6;
|
|
2154
2022
|
/**
|
|
2155
|
-
* Read-only renderer for an `EntityList` value
|
|
2156
|
-
*
|
|
2157
|
-
* target module carries a calculated inline list of its own (phase gate
|
|
2158
|
-
* checklists being the case this was written for).
|
|
2023
|
+
* Read-only renderer for an `EntityList` value. It has two shapes, and which
|
|
2024
|
+
* one applies is decided by what the host gave it — never by the value.
|
|
2159
2025
|
*
|
|
2160
|
-
*
|
|
2161
|
-
*
|
|
2162
|
-
*
|
|
2163
|
-
*
|
|
2164
|
-
*
|
|
2165
|
-
*
|
|
2026
|
+
* **Inline table.** When the host published an `EntityRuntimeContext` and the
|
|
2027
|
+
* property is module-backed, the rows are the target module's own records and
|
|
2028
|
+
* live behind `Properties/{id}/entitylist/table-metadata` + `fetch/query`.
|
|
2029
|
+
* Nothing in the value describes them — a `Realtime` list's value is literally
|
|
2030
|
+
* `null` — so the whole table is fetched, by handing the work to the read-only
|
|
2031
|
+
* `mt-entity-list-field` through `ENTITY_LIST_TABLE_COMPONENT`. That component
|
|
2032
|
+
* already owns the metadata call, the authorization boundary (`403` is a
|
|
2033
|
+
* notice, not an error) and the column projection; duplicating it here would
|
|
2034
|
+
* be a second implementation of the same contract. This is the shape a card
|
|
2035
|
+
* preview gets.
|
|
2166
2036
|
*
|
|
2167
|
-
*
|
|
2168
|
-
* configuration's `inlineFields`
|
|
2169
|
-
*
|
|
2170
|
-
*
|
|
2037
|
+
* **Count + drawer.** Otherwise the value carries its own `rows[]` and the
|
|
2038
|
+
* property configuration's `inlineFields` is the only description of the
|
|
2039
|
+
* columns — a calculated inline list, phase gate checklists being the case
|
|
2040
|
+
* this was written for. Those render inside a *table cell* (`mt-table` builds
|
|
2041
|
+
* its entity cells through `mt-entity-preview`), where inline rows would own
|
|
2042
|
+
* the height of every row in the grid: three lines per checklist item, times
|
|
2043
|
+
* however many the phase gate has. The rows go in a drawer instead, and the
|
|
2044
|
+
* tooltip names them so "which ones are these?" is answered without opening
|
|
2045
|
+
* anything. A table cell publishes no runtime context, so it keeps this shape.
|
|
2046
|
+
*
|
|
2047
|
+
* There is no writable path in either case.
|
|
2171
2048
|
*/
|
|
2172
2049
|
class EntityListPreview {
|
|
2173
2050
|
data = input.required(...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
|
|
@@ -2175,10 +2052,26 @@ class EntityListPreview {
|
|
|
2175
2052
|
* Restricts rendering to these nested field keys, in this order. Left empty,
|
|
2176
2053
|
* every field in `inlineFields` renders — what the generic table path wants;
|
|
2177
2054
|
* a host that knows the list narrows it here. Forwarded to the drawer.
|
|
2055
|
+
*
|
|
2056
|
+
* Applies to the drawer shape only: an inline table's columns come from the
|
|
2057
|
+
* backend's own projection, which already reflects the configured read
|
|
2058
|
+
* fields for this level.
|
|
2178
2059
|
*/
|
|
2179
2060
|
fields = input([], ...(ngDevMode ? [{ debugName: "fields" }] : /* istanbul ignore next */ []));
|
|
2180
2061
|
modal = inject(ModalService);
|
|
2181
2062
|
transloco = inject(TranslocoService);
|
|
2063
|
+
/**
|
|
2064
|
+
* Both optional, and both have to be present for the inline table: the
|
|
2065
|
+
* component says the host *can* render one, the context says it knows which
|
|
2066
|
+
* level-data row to scope the rows to. A host that provides neither — every
|
|
2067
|
+
* `mt-table` cell — keeps the drawer.
|
|
2068
|
+
*/
|
|
2069
|
+
tableComponent = inject(ENTITY_LIST_TABLE_COMPONENT, {
|
|
2070
|
+
optional: true,
|
|
2071
|
+
});
|
|
2072
|
+
runtimeContextStore = inject(EntityRuntimeContextStore, {
|
|
2073
|
+
optional: true,
|
|
2074
|
+
});
|
|
2182
2075
|
/**
|
|
2183
2076
|
* Read inside every computed that translates. `transloco.translate()` is a
|
|
2184
2077
|
* one-shot read with no signal of its own, so without this dependency the
|
|
@@ -2191,6 +2084,64 @@ class EntityListPreview {
|
|
|
2191
2084
|
rows = computed(() => buildEntityListRows(this.data(), this.fields()), ...(ngDevMode ? [{ debugName: "rows" }] : /* istanbul ignore next */ []));
|
|
2192
2085
|
count = computed(() => this.rows().length, ...(ngDevMode ? [{ debugName: "count" }] : /* istanbul ignore next */ []));
|
|
2193
2086
|
hasRows = computed(() => this.count() > 0, ...(ngDevMode ? [{ debugName: "hasRows" }] : /* istanbul ignore next */ []));
|
|
2087
|
+
/**
|
|
2088
|
+
* Whether the list's rows are records of another module rather than values
|
|
2089
|
+
* held inside this one.
|
|
2090
|
+
*
|
|
2091
|
+
* Mirrors the backend's own `ResolveSourceType`: an explicit `sourceType`
|
|
2092
|
+
* wins, and a configuration written before that field existed is module-
|
|
2093
|
+
* backed exactly when it names a module. Read from the stored configuration
|
|
2094
|
+
* because it is the only description available before the metadata request —
|
|
2095
|
+
* the effective, level-overridden one comes back from that endpoint, and the
|
|
2096
|
+
* table component gates on it again.
|
|
2097
|
+
*/
|
|
2098
|
+
moduleBacked = computed(() => {
|
|
2099
|
+
const configuration = this.propertyConfiguration();
|
|
2100
|
+
if (!configuration)
|
|
2101
|
+
return false;
|
|
2102
|
+
const sourceType = configuration['sourceType'];
|
|
2103
|
+
if (typeof sourceType === 'string' && sourceType.trim()) {
|
|
2104
|
+
return sourceType.trim().toLowerCase() === 'module';
|
|
2105
|
+
}
|
|
2106
|
+
return Number(configuration['moduleId'] ?? 0) > 0;
|
|
2107
|
+
}, ...(ngDevMode ? [{ debugName: "moduleBacked" }] : /* istanbul ignore next */ []));
|
|
2108
|
+
/**
|
|
2109
|
+
* The inline table's component and inputs, or null when this instance
|
|
2110
|
+
* renders the drawer trigger instead.
|
|
2111
|
+
*
|
|
2112
|
+
* A `computed` rather than a template expression on purpose: the object is
|
|
2113
|
+
* re-created only when its inputs actually change, and `NgComponentOutlet`
|
|
2114
|
+
* re-applies inputs on identity change — a fresh object per change-detection
|
|
2115
|
+
* pass would re-write every input on every tick.
|
|
2116
|
+
*/
|
|
2117
|
+
tableHost = computed(() => {
|
|
2118
|
+
const component = this.tableComponent;
|
|
2119
|
+
if (!component || !this.moduleBacked())
|
|
2120
|
+
return null;
|
|
2121
|
+
const context = this.runtimeContextStore?.context() ?? null;
|
|
2122
|
+
if (!context || !(Number(context.levelId) > 0))
|
|
2123
|
+
return null;
|
|
2124
|
+
const data = this.data();
|
|
2125
|
+
const propertyId = Number(data.propertyId ?? 0);
|
|
2126
|
+
if (!(propertyId > 0))
|
|
2127
|
+
return null;
|
|
2128
|
+
return {
|
|
2129
|
+
component,
|
|
2130
|
+
inputs: {
|
|
2131
|
+
propertyId,
|
|
2132
|
+
runtimeContext: context,
|
|
2133
|
+
configuration: this.propertyConfiguration(),
|
|
2134
|
+
// Rendered outside a form, so there is no `ControlValueAccessor` to
|
|
2135
|
+
// write through. A Write-only list has no readable records and its
|
|
2136
|
+
// stored rows are the only thing it can show.
|
|
2137
|
+
initialValue: data.value ?? data.rawValue ?? null,
|
|
2138
|
+
readonly: true,
|
|
2139
|
+
// `mt-entity-field` already renders the property's label above the
|
|
2140
|
+
// table; the field would repeat it.
|
|
2141
|
+
label: '',
|
|
2142
|
+
},
|
|
2143
|
+
};
|
|
2144
|
+
}, ...(ngDevMode ? [{ debugName: "tableHost" }] : /* istanbul ignore next */ []));
|
|
2194
2145
|
/**
|
|
2195
2146
|
* An empty list reads as the standard empty value, not as a sentence — this
|
|
2196
2147
|
* sits in a table cell, where a "no related items" line would be louder than
|
|
@@ -2224,6 +2175,25 @@ class EntityListPreview {
|
|
|
2224
2175
|
: [];
|
|
2225
2176
|
return [...names, ...more].join(' · ');
|
|
2226
2177
|
}, ...(ngDevMode ? [{ debugName: "tooltip" }] : /* istanbul ignore next */ []));
|
|
2178
|
+
/**
|
|
2179
|
+
* The untouched catalog configuration. `configuration` is read as a fallback
|
|
2180
|
+
* because the table merges its own display flags into that object when it
|
|
2181
|
+
* builds a cell, and a `LeafDetails` catalog entry is an array — neither is
|
|
2182
|
+
* an `EntityList` configuration, so both are rejected here.
|
|
2183
|
+
*/
|
|
2184
|
+
propertyConfiguration = computed(() => {
|
|
2185
|
+
const data = this.data();
|
|
2186
|
+
const sources = [
|
|
2187
|
+
data.propertyConfiguration,
|
|
2188
|
+
data.configuration,
|
|
2189
|
+
];
|
|
2190
|
+
for (const source of sources) {
|
|
2191
|
+
if (!source || Array.isArray(source))
|
|
2192
|
+
continue;
|
|
2193
|
+
return source;
|
|
2194
|
+
}
|
|
2195
|
+
return null;
|
|
2196
|
+
}, ...(ngDevMode ? [{ debugName: "propertyConfiguration" }] : /* istanbul ignore next */ []));
|
|
2227
2197
|
viewLabel() {
|
|
2228
2198
|
return this.transloco.translate('components.entityListPreview.view');
|
|
2229
2199
|
}
|
|
@@ -2240,11 +2210,11 @@ class EntityListPreview {
|
|
|
2240
2210
|
});
|
|
2241
2211
|
}
|
|
2242
2212
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EntityListPreview, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2243
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: EntityListPreview, isStandalone: true, selector: "mt-entity-list-preview", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, fields: { classPropertyName: "fields", publicName: "fields", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<mt-entity-field\
|
|
2213
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: EntityListPreview, isStandalone: true, selector: "mt-entity-list-preview", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, fields: { classPropertyName: "fields", publicName: "fields", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<mt-entity-field\n [label]=\"label()\"\n [configuration]=\"data().configuration\"\n gap=\"normal\"\n>\n @if (tableHost(); as host) {\n <!--\n The related records, rendered in full by the read-only\n `mt-entity-list-field`. It owns the metadata request, the access notices\n and the column projection \u2014 see `ENTITY_LIST_TABLE_COMPONENT` for why it\n arrives through an outlet rather than an import.\n -->\n <ng-container\n *ngComponentOutlet=\"host.component; inputs: host.inputs\"\n ></ng-container>\n } @else if (hasRows()) {\n <!--\n The count carries the information; the button carries the affordance.\n `mt-button` owns the tooltip and the accessible name, so the trigger is\n one element rather than a button wrapped in a tooltip host.\n -->\n <mt-button\n icon=\"general.eye\"\n [label]=\"count().toString()\"\n [tooltip]=\"tooltip()\"\n [ariaLabel]=\"ariaLabel()\"\n variant=\"text\"\n size=\"small\"\n styleClass=\"!px-2 !py-1 !gap-1\"\n (onClick)=\"openDrawer()\"\n />\n } @else {\n <span\n class=\"inline-flex w-fit items-center rounded-md bg-surface-100 px-3 py-2 text-xs font-semibold text-muted-color\"\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: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs", "ariaLabel"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule"], exportAs: ["ngComponentOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2244
2214
|
}
|
|
2245
2215
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EntityListPreview, decorators: [{
|
|
2246
2216
|
type: Component,
|
|
2247
|
-
args: [{ selector: 'mt-entity-list-preview', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [EntityField, Button], template: "<mt-entity-field\
|
|
2217
|
+
args: [{ selector: 'mt-entity-list-preview', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [EntityField, Button, NgComponentOutlet], template: "<mt-entity-field\n [label]=\"label()\"\n [configuration]=\"data().configuration\"\n gap=\"normal\"\n>\n @if (tableHost(); as host) {\n <!--\n The related records, rendered in full by the read-only\n `mt-entity-list-field`. It owns the metadata request, the access notices\n and the column projection \u2014 see `ENTITY_LIST_TABLE_COMPONENT` for why it\n arrives through an outlet rather than an import.\n -->\n <ng-container\n *ngComponentOutlet=\"host.component; inputs: host.inputs\"\n ></ng-container>\n } @else if (hasRows()) {\n <!--\n The count carries the information; the button carries the affordance.\n `mt-button` owns the tooltip and the accessible name, so the trigger is\n one element rather than a button wrapped in a tooltip host.\n -->\n <mt-button\n icon=\"general.eye\"\n [label]=\"count().toString()\"\n [tooltip]=\"tooltip()\"\n [ariaLabel]=\"ariaLabel()\"\n variant=\"text\"\n size=\"small\"\n styleClass=\"!px-2 !py-1 !gap-1\"\n (onClick)=\"openDrawer()\"\n />\n } @else {\n <span\n class=\"inline-flex w-fit items-center rounded-md bg-surface-100 px-3 py-2 text-xs font-semibold text-muted-color\"\n >\n {{ emptyLabel }}\n </span>\n }\n</mt-entity-field>\n" }]
|
|
2248
2218
|
}], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }], fields: [{ type: i0.Input, args: [{ isSignal: true, alias: "fields", required: false }] }] } });
|
|
2249
2219
|
|
|
2250
2220
|
/**
|
|
@@ -2814,64 +2784,15 @@ function buildDisplayEntities(entities) {
|
|
|
2814
2784
|
class EntityPreviewBody {
|
|
2815
2785
|
data = input.required(...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
|
|
2816
2786
|
attachmentShape = input('default', ...(ngDevMode ? [{ debugName: "attachmentShape" }] : /* istanbul ignore next */ []));
|
|
2817
|
-
/**
|
|
2818
|
-
* Runtime ids that opt an `EntityList` into its full read-only table instead
|
|
2819
|
-
* of the compact count-and-drawer. Null — the default, and what every table
|
|
2820
|
-
* cell passes — keeps the compact renderer.
|
|
2821
|
-
*/
|
|
2822
|
-
entityListContext = input(null, ...(ngDevMode ? [{ debugName: "entityListContext" }] : /* istanbul ignore next */ []));
|
|
2823
|
-
tableComponent = inject(ENTITY_LIST_TABLE_COMPONENT, {
|
|
2824
|
-
optional: true,
|
|
2825
|
-
});
|
|
2826
|
-
/**
|
|
2827
|
-
* The expanded table, when this call site asked for one, a host registered a
|
|
2828
|
-
* component to render it, and the ids that component needs are present. The
|
|
2829
|
-
* property id addresses the metadata endpoint and the level scopes it, so
|
|
2830
|
-
* without either there is nothing to render and the compact view stands in.
|
|
2831
|
-
*/
|
|
2832
|
-
entityListTable = computed(() => {
|
|
2833
|
-
if (!this.tableComponent)
|
|
2834
|
-
return null;
|
|
2835
|
-
const context = this.entityListContext();
|
|
2836
|
-
if (!context || !(Number(context.levelId ?? 0) > 0))
|
|
2837
|
-
return null;
|
|
2838
|
-
return Number(this.data().propertyId ?? 0) > 0 ? this.tableComponent : null;
|
|
2839
|
-
}, ...(ngDevMode ? [{ debugName: "entityListTable" }] : /* istanbul ignore next */ []));
|
|
2840
|
-
/**
|
|
2841
|
-
* Inputs for the registered table. `label` is deliberately blank: the
|
|
2842
|
-
* surrounding `mt-entity-field` already prints the property name, and the
|
|
2843
|
-
* field would otherwise print a second one in its own style.
|
|
2844
|
-
*/
|
|
2845
|
-
entityListTableInputs = computed(() => {
|
|
2846
|
-
const context = this.entityListContext() ?? {};
|
|
2847
|
-
return {
|
|
2848
|
-
propertyId: Number(this.data().propertyId ?? 0),
|
|
2849
|
-
runtimeContext: {
|
|
2850
|
-
levelId: context.levelId ?? null,
|
|
2851
|
-
levelDataId: context.levelDataId ?? null,
|
|
2852
|
-
},
|
|
2853
|
-
readonly: true,
|
|
2854
|
-
label: '',
|
|
2855
|
-
// There is no form control here, so the stored value has to be handed
|
|
2856
|
-
// over directly — it is all a write-only list has to render.
|
|
2857
|
-
value: this.data().value ?? null,
|
|
2858
|
-
};
|
|
2859
|
-
}, ...(ngDevMode ? [{ debugName: "entityListTableInputs" }] : /* istanbul ignore next */ []));
|
|
2860
2787
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EntityPreviewBody, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2861
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: EntityPreviewBody, isStandalone: true, selector: "mt-entity-preview-body", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, attachmentShape: { classPropertyName: "attachmentShape", publicName: "attachmentShape", isSignal: true, isRequired: false, transformFunction: null }
|
|
2788
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: EntityPreviewBody, isStandalone: true, selector: "mt-entity-preview-body", 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: "w-full" }, ngImport: i0, template: "@if (data().viewType === \"LookupModuleCheckList\") {\r\n <mt-entity-lookup-module-check-list [data]=\"data()\" />\r\n} @else if (data().viewType === \"EntityList\") {\r\n <mt-entity-list-preview [data]=\"data()\" />\r\n} @else {\r\n <mt-entity-value-preview\r\n [data]=\"data()\"\r\n [attachmentShape]=\"attachmentShape()\"\r\n />\r\n}\r\n", dependencies: [{ kind: "component", type: EntityListPreview, selector: "mt-entity-list-preview", inputs: ["data", "fields"] }, { kind: "component", type: EntityLookupModuleCheckList, selector: "mt-entity-lookup-module-check-list", inputs: ["data"] }, { kind: "component", type: EntityValuePreview, selector: "mt-entity-value-preview", inputs: ["data", "attachmentShape"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2862
2789
|
}
|
|
2863
2790
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EntityPreviewBody, decorators: [{
|
|
2864
2791
|
type: Component,
|
|
2865
|
-
args: [{ selector: 'mt-entity-preview-body', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
2866
|
-
EntityField,
|
|
2867
|
-
EntityListPreview,
|
|
2868
|
-
EntityLookupModuleCheckList,
|
|
2869
|
-
EntityValuePreview,
|
|
2870
|
-
NgComponentOutlet,
|
|
2871
|
-
], host: {
|
|
2792
|
+
args: [{ selector: 'mt-entity-preview-body', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [EntityListPreview, EntityLookupModuleCheckList, EntityValuePreview], host: {
|
|
2872
2793
|
class: 'w-full',
|
|
2873
|
-
}, template: "@if (data().viewType === \"LookupModuleCheckList\") {\n <mt-entity-lookup-module-check-list [data]=\"data()\" />\n} @else if (data().viewType === \"EntityList\") {\
|
|
2874
|
-
}], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }], attachmentShape: [{ type: i0.Input, args: [{ isSignal: true, alias: "attachmentShape", required: false }] }]
|
|
2794
|
+
}, template: "@if (data().viewType === \"LookupModuleCheckList\") {\r\n <mt-entity-lookup-module-check-list [data]=\"data()\" />\r\n} @else if (data().viewType === \"EntityList\") {\r\n <mt-entity-list-preview [data]=\"data()\" />\r\n} @else {\r\n <mt-entity-value-preview\r\n [data]=\"data()\"\r\n [attachmentShape]=\"attachmentShape()\"\r\n />\r\n}\r\n" }]
|
|
2795
|
+
}], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }], attachmentShape: [{ type: i0.Input, args: [{ isSignal: true, alias: "attachmentShape", required: false }] }] } });
|
|
2875
2796
|
|
|
2876
2797
|
class ComparisonValue {
|
|
2877
2798
|
data = input.required(...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
|
|
@@ -2895,7 +2816,7 @@ class ComparisonValue {
|
|
|
2895
2816
|
};
|
|
2896
2817
|
}
|
|
2897
2818
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ComparisonValue, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2898
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: ComparisonValue, isStandalone: true, selector: "mt-comparison-value", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null } }, host: { classAttribute: "block w-full" }, ngImport: i0, template: "@if (comparison(); as cmp) {\r\n <div class=\"flex w-full min-w-0 items-stretch gap-3\">\r\n <div\r\n class=\"flex min-w-0 flex-1 flex-col gap-1 rounded-md border border-surface-200 bg-surface-50 px-3 py-2\"\r\n >\r\n <span class=\"text-xs font-medium uppercase tracking-wide text-muted-color\"\r\n >Before</span\r\n >\r\n @if (oldEntity(); as old) {\r\n <mt-entity-preview-body [data]=\"old\" />\r\n } @else {\r\n <span class=\"text-sm text-muted-color\">_</span>\r\n }\r\n </div>\r\n <div class=\"flex shrink-0 items-center text-muted-color\" aria-hidden=\"true\">\r\n →\r\n </div>\r\n <div\r\n class=\"flex min-w-0 flex-1 flex-col gap-1 rounded-md border border-primary-200 bg-primary-50 px-3 py-2\"\r\n >\r\n <span class=\"text-xs font-medium uppercase tracking-wide text-primary-600\"\r\n >After</span\r\n >\r\n @if (newEntity(); as next) {\r\n <mt-entity-preview-body [data]=\"next\" />\r\n } @else {\r\n <span class=\"text-sm text-muted-color\">_</span>\r\n }\r\n </div>\r\n </div>\r\n}\r\n", dependencies: [{ kind: "component", type: EntityPreviewBody, selector: "mt-entity-preview-body", inputs: ["data", "attachmentShape"
|
|
2819
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: ComparisonValue, isStandalone: true, selector: "mt-comparison-value", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null } }, host: { classAttribute: "block w-full" }, ngImport: i0, template: "@if (comparison(); as cmp) {\r\n <div class=\"flex w-full min-w-0 items-stretch gap-3\">\r\n <div\r\n class=\"flex min-w-0 flex-1 flex-col gap-1 rounded-md border border-surface-200 bg-surface-50 px-3 py-2\"\r\n >\r\n <span class=\"text-xs font-medium uppercase tracking-wide text-muted-color\"\r\n >Before</span\r\n >\r\n @if (oldEntity(); as old) {\r\n <mt-entity-preview-body [data]=\"old\" />\r\n } @else {\r\n <span class=\"text-sm text-muted-color\">_</span>\r\n }\r\n </div>\r\n <div class=\"flex shrink-0 items-center text-muted-color\" aria-hidden=\"true\">\r\n →\r\n </div>\r\n <div\r\n class=\"flex min-w-0 flex-1 flex-col gap-1 rounded-md border border-primary-200 bg-primary-50 px-3 py-2\"\r\n >\r\n <span class=\"text-xs font-medium uppercase tracking-wide text-primary-600\"\r\n >After</span\r\n >\r\n @if (newEntity(); as next) {\r\n <mt-entity-preview-body [data]=\"next\" />\r\n } @else {\r\n <span class=\"text-sm text-muted-color\">_</span>\r\n }\r\n </div>\r\n </div>\r\n}\r\n", dependencies: [{ kind: "component", type: EntityPreviewBody, selector: "mt-entity-preview-body", inputs: ["data", "attachmentShape"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2899
2820
|
}
|
|
2900
2821
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ComparisonValue, decorators: [{
|
|
2901
2822
|
type: Component,
|
|
@@ -2960,8 +2881,6 @@ class EntityPreview {
|
|
|
2960
2881
|
transloco = inject(TranslocoService);
|
|
2961
2882
|
data = input.required(...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
|
|
2962
2883
|
attachmentShape = input('default', ...(ngDevMode ? [{ debugName: "attachmentShape" }] : /* istanbul ignore next */ []));
|
|
2963
|
-
/** Forwarded to the body; see `EntityPreviewBody.entityListContext`. */
|
|
2964
|
-
entityListContext = input(null, ...(ngDevMode ? [{ debugName: "entityListContext" }] : /* istanbul ignore next */ []));
|
|
2965
2884
|
activeLang = sharedActiveLang(this.transloco);
|
|
2966
2885
|
/**
|
|
2967
2886
|
* The admin-authored note for the active language, or `''` when the property
|
|
@@ -2982,7 +2901,7 @@ class EntityPreview {
|
|
|
2982
2901
|
return null;
|
|
2983
2902
|
}, ...(ngDevMode ? [{ debugName: "comparisonKind" }] : /* istanbul ignore next */ []));
|
|
2984
2903
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EntityPreview, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2985
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: EntityPreview, isStandalone: true, selector: "mt-entity-preview", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, attachmentShape: { classPropertyName: "attachmentShape", publicName: "attachmentShape", isSignal: true, isRequired: false, transformFunction: null }
|
|
2904
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: EntityPreview, isStandalone: true, selector: "mt-entity-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: { properties: { "class.relative": "infoText()", "class.pe-4": "infoText()" }, classAttribute: "w-full" }, ngImport: i0, template: "@if (infoText(); as info) {\r\n <!--\r\n The note affordance. Absolutely positioned so it stays out of the value's\r\n own layout \u2014 each viewType renders its own markup and there is no shared\r\n slot to put this in \u2014 while the host reserves the corner with `pe-4`, so a\r\n long value truncates before it can run underneath the icon.\r\n -->\r\n <!--\r\n Sized with `text-sm`, not a `size` input: `mt-icon` has none, and its host\r\n is `width: 1em` \u2014 so font-size is what actually scales the glyph.\r\n -->\r\n <mt-icon\r\n icon=\"general.info-circle\"\r\n class=\"absolute top-0 end-0 z-10 cursor-help text-sm text-surface-400 transition-colors hover:text-primary-600\"\r\n [mtTooltip]=\"info\"\r\n tooltipPosition=\"top\"\r\n tooltipStyleClass=\"mt-entity-info-tooltip\"\r\n [attr.aria-label]=\"info\"\r\n />\r\n}\r\n\r\n@switch (comparisonKind()) {\r\n @case (\"Value\") {\r\n <mt-comparison-value [data]=\"data()\" />\r\n }\r\n @case (\"EntityList\") {\r\n <mt-comparison-entity-list [data]=\"data()\" />\r\n }\r\n @default {\r\n <mt-entity-preview-body\r\n [data]=\"data()\"\r\n [attachmentShape]=\"attachmentShape()\"\r\n />\r\n }\r\n}\r\n", styles: [".mt-entity-info-tooltip{max-width:22rem}.mt-entity-info-tooltip .p-tooltip-text{white-space:pre-wrap;text-align:start;overflow-wrap:anywhere}\n"], dependencies: [{ kind: "component", type: EntityPreviewBody, selector: "mt-entity-preview-body", inputs: ["data", "attachmentShape"] }, { kind: "component", type: ComparisonValue, selector: "mt-comparison-value", inputs: ["data"] }, { kind: "component", type: ComparisonEntityList, selector: "mt-comparison-entity-list", inputs: ["data"] }, { kind: "directive", type: Tooltip, selector: "[mtTooltip]" }, { kind: "component", type: Icon, selector: "mt-icon", inputs: ["icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
2986
2905
|
}
|
|
2987
2906
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EntityPreview, decorators: [{
|
|
2988
2907
|
type: Component,
|
|
@@ -2998,8 +2917,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
2998
2917
|
// exactly the box it had before this feature existed.
|
|
2999
2918
|
'[class.relative]': 'infoText()',
|
|
3000
2919
|
'[class.pe-4]': 'infoText()',
|
|
3001
|
-
}, template: "@if (infoText(); as info) {\r\n <!--\r\n The note affordance. Absolutely positioned so it stays out of the value's\r\n own layout \u2014 each viewType renders its own markup and there is no shared\r\n slot to put this in \u2014 while the host reserves the corner with `pe-4`, so a\r\n long value truncates before it can run underneath the icon.\r\n -->\r\n <!--\r\n Sized with `text-sm`, not a `size` input: `mt-icon` has none, and its host\r\n is `width: 1em` \u2014 so font-size is what actually scales the glyph.\r\n -->\r\n <mt-icon\r\n icon=\"general.info-circle\"\r\n class=\"absolute top-0 end-0 z-10 cursor-help text-sm text-surface-400 transition-colors hover:text-primary-600\"\r\n [mtTooltip]=\"info\"\r\n tooltipPosition=\"top\"\r\n tooltipStyleClass=\"mt-entity-info-tooltip\"\r\n [attr.aria-label]=\"info\"\r\n />\r\n}\r\n\r\n@switch (comparisonKind()) {\r\n @case (\"Value\") {\r\n <mt-comparison-value [data]=\"data()\" />\r\n }\r\n @case (\"EntityList\") {\r\n <mt-comparison-entity-list [data]=\"data()\" />\r\n }\r\n @default {\r\n <mt-entity-preview-body\r\n [data]=\"data()\"\r\n [attachmentShape]=\"attachmentShape()\"\r\n
|
|
3002
|
-
}], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }], attachmentShape: [{ type: i0.Input, args: [{ isSignal: true, alias: "attachmentShape", required: false }] }]
|
|
2920
|
+
}, template: "@if (infoText(); as info) {\r\n <!--\r\n The note affordance. Absolutely positioned so it stays out of the value's\r\n own layout \u2014 each viewType renders its own markup and there is no shared\r\n slot to put this in \u2014 while the host reserves the corner with `pe-4`, so a\r\n long value truncates before it can run underneath the icon.\r\n -->\r\n <!--\r\n Sized with `text-sm`, not a `size` input: `mt-icon` has none, and its host\r\n is `width: 1em` \u2014 so font-size is what actually scales the glyph.\r\n -->\r\n <mt-icon\r\n icon=\"general.info-circle\"\r\n class=\"absolute top-0 end-0 z-10 cursor-help text-sm text-surface-400 transition-colors hover:text-primary-600\"\r\n [mtTooltip]=\"info\"\r\n tooltipPosition=\"top\"\r\n tooltipStyleClass=\"mt-entity-info-tooltip\"\r\n [attr.aria-label]=\"info\"\r\n />\r\n}\r\n\r\n@switch (comparisonKind()) {\r\n @case (\"Value\") {\r\n <mt-comparison-value [data]=\"data()\" />\r\n }\r\n @case (\"EntityList\") {\r\n <mt-comparison-entity-list [data]=\"data()\" />\r\n }\r\n @default {\r\n <mt-entity-preview-body\r\n [data]=\"data()\"\r\n [attachmentShape]=\"attachmentShape()\"\r\n />\r\n }\r\n}\r\n", styles: [".mt-entity-info-tooltip{max-width:22rem}.mt-entity-info-tooltip .p-tooltip-text{white-space:pre-wrap;text-align:start;overflow-wrap:anywhere}\n"] }]
|
|
2921
|
+
}], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }], attachmentShape: [{ type: i0.Input, args: [{ isSignal: true, alias: "attachmentShape", required: false }] }] } });
|
|
3003
2922
|
|
|
3004
2923
|
const EMPTY_KEY_SET = new Set();
|
|
3005
2924
|
/** Classes every entity slot carries, before its per-slot modifiers. */
|
|
@@ -3011,8 +2930,6 @@ class EntitiesPreview {
|
|
|
3011
2930
|
/** Array of entity data to display */
|
|
3012
2931
|
entities = input.required(...(ngDevMode ? [{ debugName: "entities" }] : /* istanbul ignore next */ []));
|
|
3013
2932
|
attachmentShape = input('default', ...(ngDevMode ? [{ debugName: "attachmentShape" }] : /* istanbul ignore next */ []));
|
|
3014
|
-
/** Forwarded to every entity; see `EntityPreviewBody.entityListContext`. */
|
|
3015
|
-
entityListContext = input(null, ...(ngDevMode ? [{ debugName: "entityListContext" }] : /* istanbul ignore next */ []));
|
|
3016
2933
|
/**
|
|
3017
2934
|
* Soft "stack every field full-width when the host is narrower than the
|
|
3018
2935
|
* 24-column grid reads well" behavior (the ≤400px container-query fallback,
|
|
@@ -3106,15 +3023,15 @@ class EntitiesPreview {
|
|
|
3106
3023
|
});
|
|
3107
3024
|
}
|
|
3108
3025
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EntitiesPreview, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3109
|
-
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 },
|
|
3026
|
+
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 });
|
|
3110
3027
|
}
|
|
3111
3028
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EntitiesPreview, decorators: [{
|
|
3112
3029
|
type: Component,
|
|
3113
3030
|
args: [{ selector: 'mt-entities-preview', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [EntityPreview, NgTemplateOutlet], host: {
|
|
3114
3031
|
class: 'block min-w-0 w-full',
|
|
3115
3032
|
'[class.mt-entities-stack-narrow]': 'stackOnNarrow()',
|
|
3116
|
-
}, 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
|
|
3117
|
-
}], propDecorators: { entities: [{ type: i0.Input, args: [{ isSignal: true, alias: "entities", required: true }] }], attachmentShape: [{ type: i0.Input, args: [{ isSignal: true, alias: "attachmentShape", required: false }] }],
|
|
3033
|
+
}, 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"] }]
|
|
3034
|
+
}], 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"] }] } });
|
|
3118
3035
|
/** Stable key resolution shared with the host — must agree on order. */
|
|
3119
3036
|
function resolveEntityKey(entity) {
|
|
3120
3037
|
return entity.key || entity.normalizedKey || entity.name || '';
|
|
@@ -3324,7 +3241,7 @@ class EntitiesManage extends EntitiesResizeBase {
|
|
|
3324
3241
|
});
|
|
3325
3242
|
}
|
|
3326
3243
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EntitiesManage, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
3327
|
-
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"
|
|
3244
|
+
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"] }] });
|
|
3328
3245
|
}
|
|
3329
3246
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EntitiesManage, decorators: [{
|
|
3330
3247
|
type: Component,
|
|
@@ -3335,5 +3252,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
3335
3252
|
* Generated bundle index. Do not edit.
|
|
3336
3253
|
*/
|
|
3337
3254
|
|
|
3338
|
-
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, 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, isEntitySection, isLeafDetailsCatalogConfiguration, isLeafDetailsCollectionValue, isLeafDetailsRuntimeValue, isLeafDetailsSyntheticKey, isLeafDetailsValue, isLeafPhasesSyntheticKey, isLeafSyntheticKey, isSectionKey, isValueMissing, matchesPercentageColorRule, normalizeConnectionSourceLevels, normalizeNumerals, parseCurrencyAmount, readEntityValueColor, resolveConnectionLevelName, resolveEntityInfo, resolveEntityLabelPosition, resolveLocalizedLabel, resolvePercentageColor, serializeEntityRawValue, sharedActiveLang, splitConnectionKey, splitLeafKey, summarizeEntityListRows };
|
|
3255
|
+
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, isEntitySection, isLeafDetailsCatalogConfiguration, isLeafDetailsCollectionValue, isLeafDetailsRuntimeValue, isLeafDetailsSyntheticKey, isLeafDetailsValue, isLeafPhasesSyntheticKey, isLeafSyntheticKey, isSectionKey, isValueMissing, matchesPercentageColorRule, normalizeConnectionSourceLevels, normalizeNumerals, parseCurrencyAmount, readEntityValueColor, resolveConnectionLevelName, resolveEntityInfo, resolveEntityLabelPosition, resolveLocalizedLabel, resolvePercentageColor, serializeEntityRawValue, sharedActiveLang, splitConnectionKey, splitLeafKey, summarizeEntityListRows };
|
|
3339
3256
|
//# sourceMappingURL=masterteam-components-entities.mjs.map
|