@masterteam/components 0.0.301 → 0.0.303

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,21 @@ 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
+ /** Whether a stored or rendered `EntityList` value is a Local document. */
24
+ function isEntityListLocalDocument(value) {
25
+ return (!!value &&
26
+ typeof value === 'object' &&
27
+ !Array.isArray(value) &&
28
+ value.storageMode === 'Local');
29
+ }
30
+ /** Whether a stored or rendered `EntityList` value is a Selected document. */
31
+ function isEntityListSelectionDocument(value) {
32
+ return (!!value &&
33
+ typeof value === 'object' &&
34
+ !Array.isArray(value) &&
35
+ value.recordMode === 'Selected');
36
+ }
37
+
23
38
  /**
24
39
  * A section is persisted/transported as an ordinary display item whose
25
40
  * `propertyKey` carries this sentinel prefix instead of a real property key
@@ -1579,6 +1594,87 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
1579
1594
  args: [{ selector: 'mt-entity-schedule-item', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [EntityField, Chip], template: "<mt-entity-field\n [label]=\"displayName()\"\n [configuration]=\"data()?.configuration\"\n gap=\"normal\"\n>\n @if (items().length) {\n <div class=\"flex flex-wrap items-center gap-2\">\n @for (item of items(); track item.id) {\n <mt-chip [label]=\"item.name\" size=\"small\" />\n }\n </div>\n } @else {\n <span\n class=\"inline-flex items-center px-3 py-2 rounded-md text-xs font-semibold w-fit text-gray-500 bg-gray-100\"\n >\n {{ emptyLabel }}\n </span>\n }\n</mt-entity-field>\n" }]
1580
1595
  }], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }] } });
1581
1596
 
1597
+ /**
1598
+ * Pure helpers shared by everything that reads a Local `EntityList`
1599
+ * (`storageMode: "Local"`) — the runtime field that edits it and the preview
1600
+ * that only renders it. See `.github/instructions/properties/EntityList.md`.
1601
+ */
1602
+ /**
1603
+ * The schema's fields a row is rendered with, in order.
1604
+ *
1605
+ * A removed field stays in the stored schema as `hidden` so its values survive
1606
+ * and come back if it is re-added. The projected schema of a loaded value has
1607
+ * already dropped them, but the configuration's copy — what a create form falls
1608
+ * back to — has not.
1609
+ */
1610
+ function visibleLocalSchemaFields(schema) {
1611
+ const fields = Array.isArray(schema?.fields) ? schema.fields : [];
1612
+ return fields
1613
+ .filter((field) => !!field && !field.hidden && !!field.id)
1614
+ .slice()
1615
+ .sort((a, b) => (a.order ?? 0) - (b.order ?? 0));
1616
+ }
1617
+ function pickTranslatable(value, lang) {
1618
+ if (!value)
1619
+ return '';
1620
+ const own = lang === 'ar' ? value.ar : value.en;
1621
+ const other = lang === 'ar' ? value.en : value.ar;
1622
+ return (own ?? '').trim() || (other ?? '').trim();
1623
+ }
1624
+ /**
1625
+ * The label a field renders under: its local override, then the source label
1626
+ * captured when it was published, then its key. The publisher writes an
1627
+ * override into the captured definition as well, so either path shows it.
1628
+ */
1629
+ function resolveLocalFieldLabel(field, lang = 'en') {
1630
+ const definition = field.definition;
1631
+ return (pickTranslatable(field.label, lang) ||
1632
+ pickTranslatable({ en: definition?.nameEn, ar: definition?.nameAr }, lang) ||
1633
+ (definition?.name ?? '').trim() ||
1634
+ field.sourceKey);
1635
+ }
1636
+ /** The source view type the field captured; `Text` when none was. */
1637
+ function resolveLocalFieldViewType(field) {
1638
+ return field.definition?.viewType || 'Text';
1639
+ }
1640
+ /**
1641
+ * The captured source configuration (lookup id, percentage colour rules …).
1642
+ * `PropertyDefinitionReadDto.configuration` is typed `object?`, so the backend
1643
+ * writes whatever the source held — an object, or its JSON text.
1644
+ */
1645
+ function resolveLocalFieldConfiguration(field) {
1646
+ const configuration = field.definition?.configuration;
1647
+ if (!configuration)
1648
+ return null;
1649
+ if (typeof configuration !== 'string')
1650
+ return configuration;
1651
+ try {
1652
+ const parsed = JSON.parse(configuration);
1653
+ return parsed && typeof parsed === 'object' && !Array.isArray(parsed)
1654
+ ? parsed
1655
+ : null;
1656
+ }
1657
+ catch {
1658
+ return null;
1659
+ }
1660
+ }
1661
+ /** A row's cells keyed by field id. */
1662
+ function localCellsByFieldId(row) {
1663
+ const map = new Map();
1664
+ for (const cell of Array.isArray(row?.cells) ? row.cells : []) {
1665
+ if (cell?.fieldId)
1666
+ map.set(cell.fieldId, cell);
1667
+ }
1668
+ return map;
1669
+ }
1670
+ /** Rows in their stored order. */
1671
+ function sortLocalRows(rows) {
1672
+ return (Array.isArray(rows) ? rows : [])
1673
+ .filter((row) => !!row?.rowId)
1674
+ .slice()
1675
+ .sort((a, b) => (a.order ?? 0) - (b.order ?? 0));
1676
+ }
1677
+
1582
1678
  /**
1583
1679
  * Nested fields render as small labelled pairs. The row is the unit of
1584
1680
  * meaning, so labels sit above their values and stay muted.
@@ -1758,9 +1854,16 @@ function toNestedEntity(field, values) {
1758
1854
  * `allowed` narrows to those keys, in that order; empty renders every field
1759
1855
  * that survives the companion and identifier rules.
1760
1856
  */
1761
- function buildEntityListRows(data, allowed = []) {
1857
+ function buildEntityListRows(data, allowed = [], lang = 'en') {
1858
+ const value = coerceValue(data);
1859
+ if (isEntityListLocalDocument(value)) {
1860
+ return buildLocalRows(value, data, allowed, lang);
1861
+ }
1862
+ if (isEntityListSelectionDocument(value)) {
1863
+ return buildSelectionRows(value, data, allowed);
1864
+ }
1762
1865
  const fields = visibleFields(data, allowed);
1763
- const rows = coerceValue(data)?.rows;
1866
+ const rows = value?.rows;
1764
1867
  if (!Array.isArray(rows))
1765
1868
  return [];
1766
1869
  return rows
@@ -1782,6 +1885,150 @@ function buildEntityListRows(data, allowed = []) {
1782
1885
  };
1783
1886
  });
1784
1887
  }
1888
+ /**
1889
+ * Rows of a Local list (`storageMode: "Local"`).
1890
+ *
1891
+ * The projected document `process-form-load` returns carries its own
1892
+ * `schema`, and it wins: pending and approved evidence is pinned to the schema
1893
+ * it was submitted against, which the property configuration's *active* one
1894
+ * may no longer be. The fetch endpoints project against the active schema;
1895
+ * an older backend returned the stored document there (`schema: null`), for
1896
+ * which the configuration's `localSchema` is the fallback.
1897
+ * Cells are keyed by the field's local id and carry the backend-rendered
1898
+ * `value` beside `rawValue` where one was rendered; otherwise the raw value
1899
+ * shows.
1900
+ *
1901
+ * `allowed` narrows by source key, the one identity the host can know.
1902
+ */
1903
+ function buildLocalRows(document, data, allowed, lang) {
1904
+ const declared = visibleLocalSchemaFields(document.schema ?? readConfiguredLocalSchema(data));
1905
+ const bySourceKey = new Map(declared.map((field) => [field.sourceKey, field]));
1906
+ const fields = allowed.length === 0
1907
+ ? declared
1908
+ : allowed
1909
+ .map((key) => bySourceKey.get(key))
1910
+ .filter((field) => !!field);
1911
+ return sortLocalRows(document.localRows).map((row) => {
1912
+ const cells = localCellsByFieldId(row);
1913
+ const rendered = fields.map((field) => {
1914
+ const cell = cells.get(field.id);
1915
+ const rawValue = cell?.rawValue ?? undefined;
1916
+ return {
1917
+ key: field.sourceKey,
1918
+ name: resolveLocalFieldLabel(field, lang),
1919
+ viewType: normalizeViewType(resolveLocalFieldViewType(field)),
1920
+ value: (cell?.value ?? rawValue ?? ''),
1921
+ rawValue,
1922
+ propertyConfiguration: resolveLocalFieldConfiguration(field) ?? undefined,
1923
+ configuration: NESTED_FIELD_CONFIG,
1924
+ order: field.order,
1925
+ };
1926
+ });
1927
+ const [first, ...rest] = rendered;
1928
+ return {
1929
+ id: row.rowId,
1930
+ title: first ? { ...first, configuration: TITLE_FIELD_CONFIG } : null,
1931
+ fields: rest,
1932
+ };
1933
+ });
1934
+ }
1935
+ /**
1936
+ * Rows of a Selected list (`recordMode: "Selected"`): one per selected record
1937
+ * the value carries values for, in selection order.
1938
+ *
1939
+ * Here there is no metadata request, so nothing names the fields or their
1940
+ * view types: labels come from the keys and each value renders as its display
1941
+ * text. A record whose values the backend withheld (`unavailableIds`) has
1942
+ * nothing to show and is left out.
1943
+ *
1944
+ * `allowed` narrows by field key; otherwise the configured `readFields`
1945
+ * order, then the order the values arrived in.
1946
+ */
1947
+ function buildSelectionRows(document, data, allowed) {
1948
+ const records = new Map((document.records ?? []).map((record) => [record.entityId, record]));
1949
+ const ids = document.entityIds?.length
1950
+ ? document.entityIds
1951
+ : [...records.keys()];
1952
+ const configured = readConfiguredReadFields(data);
1953
+ return ids.flatMap((id) => {
1954
+ const record = records.get(id);
1955
+ if (!record)
1956
+ return [];
1957
+ const values = new Map((record.values ?? []).map((item) => [item.propertyKey, item]));
1958
+ const keys = allowed.length
1959
+ ? allowed
1960
+ : configured.length
1961
+ ? configured
1962
+ : [...values.keys()];
1963
+ const rendered = keys
1964
+ .map((key) => values.get(key))
1965
+ .filter((item) => !!item)
1966
+ .map((item, index) => ({
1967
+ key: item.propertyKey,
1968
+ name: humanizeEntityListKey(item.propertyKey),
1969
+ viewType: 'Text',
1970
+ value: selectionDisplayText(item.value, item.rawValue),
1971
+ rawValue: item.rawValue ?? undefined,
1972
+ configuration: NESTED_FIELD_CONFIG,
1973
+ order: index,
1974
+ }));
1975
+ const [first, ...rest] = rendered;
1976
+ return [
1977
+ {
1978
+ id: String(record.entityId),
1979
+ title: first ? { ...first, configuration: TITLE_FIELD_CONFIG } : null,
1980
+ fields: rest,
1981
+ },
1982
+ ];
1983
+ });
1984
+ }
1985
+ /** The configured displayed fields of a Selected list, if any. */
1986
+ function readConfiguredReadFields(data) {
1987
+ for (const source of [data.propertyConfiguration, data.configuration]) {
1988
+ if (!source || Array.isArray(source))
1989
+ continue;
1990
+ const fields = source['readFields'];
1991
+ if (Array.isArray(fields) && fields.length) {
1992
+ return fields.filter((key) => typeof key === 'string' && !!key);
1993
+ }
1994
+ }
1995
+ return [];
1996
+ }
1997
+ /**
1998
+ * A rendered source value as text: a scalar as is, a user or a lookup by its
1999
+ * display name, a list joined. Falls back to the stored scalar.
2000
+ */
2001
+ function selectionDisplayText(value, rawValue) {
2002
+ if (value == null || value === '')
2003
+ return rawValue ?? '';
2004
+ if (Array.isArray(value)) {
2005
+ return value
2006
+ .map((entry) => selectionDisplayText(entry, null))
2007
+ .filter((text) => !!text)
2008
+ .join(', ');
2009
+ }
2010
+ if (typeof value !== 'object')
2011
+ return String(value);
2012
+ const record = value;
2013
+ for (const key of ['display', 'displayName', 'name']) {
2014
+ const text = record[key];
2015
+ if (typeof text === 'string' && text.trim())
2016
+ return text.trim();
2017
+ }
2018
+ return rawValue ?? '';
2019
+ }
2020
+ /** The active Local schema from the property configuration, if any. */
2021
+ function readConfiguredLocalSchema(data) {
2022
+ for (const source of [data.propertyConfiguration, data.configuration]) {
2023
+ if (!source || Array.isArray(source))
2024
+ continue;
2025
+ const schema = source['localSchema'];
2026
+ if (schema && typeof schema === 'object') {
2027
+ return schema;
2028
+ }
2029
+ }
2030
+ return null;
2031
+ }
1785
2032
  /**
1786
2033
  * The row's title as plain text. A title that folded into a `Status` carries
1787
2034
  * an object, not a string — reading only the string case would silently drop
@@ -2008,7 +2255,9 @@ class EntityListDrawer {
2008
2255
  data = input.required(...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
2009
2256
  /** Ordered allowlist of nested field keys; empty renders all of them. */
2010
2257
  fields = input([], ...(ngDevMode ? [{ debugName: "fields" }] : /* istanbul ignore next */ []));
2011
- rows = computed(() => buildEntityListRows(this.data(), this.fields()), ...(ngDevMode ? [{ debugName: "rows" }] : /* istanbul ignore next */ []));
2258
+ /** A Local list's labels are `{ en, ar }` pairs; see `sharedActiveLang`. */
2259
+ activeLang = sharedActiveLang(inject(TranslocoService));
2260
+ rows = computed(() => buildEntityListRows(this.data(), this.fields(), this.activeLang()), ...(ngDevMode ? [{ debugName: "rows" }] : /* istanbul ignore next */ []));
2012
2261
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EntityListDrawer, deps: [], target: i0.ɵɵFactoryTarget.Component });
2013
2262
  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 });
2014
2263
  }
@@ -2081,7 +2330,7 @@ class EntityListPreview {
2081
2330
  */
2082
2331
  activeLang = sharedActiveLang(this.transloco);
2083
2332
  label = computed(() => this.data().name ?? '', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
2084
- rows = computed(() => buildEntityListRows(this.data(), this.fields()), ...(ngDevMode ? [{ debugName: "rows" }] : /* istanbul ignore next */ []));
2333
+ rows = computed(() => buildEntityListRows(this.data(), this.fields(), this.activeLang()), ...(ngDevMode ? [{ debugName: "rows" }] : /* istanbul ignore next */ []));
2085
2334
  count = computed(() => this.rows().length, ...(ngDevMode ? [{ debugName: "count" }] : /* istanbul ignore next */ []));
2086
2335
  hasRows = computed(() => this.count() > 0, ...(ngDevMode ? [{ debugName: "hasRows" }] : /* istanbul ignore next */ []));
2087
2336
  /**
@@ -2210,11 +2459,11 @@ class EntityListPreview {
2210
2459
  });
2211
2460
  }
2212
2461
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EntityListPreview, deps: [], target: i0.ɵɵFactoryTarget.Component });
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 });
2462
+ 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\r\n [label]=\"label()\"\r\n [configuration]=\"data().configuration\"\r\n gap=\"normal\"\r\n>\r\n @if (tableHost(); as host) {\r\n <!--\r\n The related records, rendered in full by the read-only\r\n `mt-entity-list-field`. It owns the metadata request, the access notices\r\n and the column projection \u2014 see `ENTITY_LIST_TABLE_COMPONENT` for why it\r\n arrives through an outlet rather than an import.\r\n -->\r\n <ng-container\r\n *ngComponentOutlet=\"host.component; inputs: host.inputs\"\r\n ></ng-container>\r\n } @else if (hasRows()) {\r\n <!--\r\n The count carries the information; the button carries the affordance.\r\n `mt-button` owns the tooltip and the accessible name, so the trigger is\r\n one element rather than a button wrapped in a tooltip host.\r\n -->\r\n <mt-button\r\n icon=\"general.eye\"\r\n [label]=\"count().toString()\"\r\n [tooltip]=\"tooltip()\"\r\n [ariaLabel]=\"ariaLabel()\"\r\n variant=\"text\"\r\n size=\"small\"\r\n styleClass=\"!px-2 !py-1 !gap-1\"\r\n (onClick)=\"openDrawer()\"\r\n />\r\n } @else {\r\n <span\r\n class=\"inline-flex w-fit items-center rounded-md bg-surface-100 px-3 py-2 text-xs font-semibold text-muted-color\"\r\n >\r\n {{ emptyLabel }}\r\n </span>\r\n }\r\n</mt-entity-field>\r\n", dependencies: [{ kind: "component", type: EntityField, selector: "mt-entity-field", inputs: ["label", "labelIconName", "configuration", "gap"] }, { kind: "component", type: 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 });
2214
2463
  }
2215
2464
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EntityListPreview, decorators: [{
2216
2465
  type: Component,
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" }]
2466
+ args: [{ selector: 'mt-entity-list-preview', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [EntityField, Button, NgComponentOutlet], template: "<mt-entity-field\r\n [label]=\"label()\"\r\n [configuration]=\"data().configuration\"\r\n gap=\"normal\"\r\n>\r\n @if (tableHost(); as host) {\r\n <!--\r\n The related records, rendered in full by the read-only\r\n `mt-entity-list-field`. It owns the metadata request, the access notices\r\n and the column projection \u2014 see `ENTITY_LIST_TABLE_COMPONENT` for why it\r\n arrives through an outlet rather than an import.\r\n -->\r\n <ng-container\r\n *ngComponentOutlet=\"host.component; inputs: host.inputs\"\r\n ></ng-container>\r\n } @else if (hasRows()) {\r\n <!--\r\n The count carries the information; the button carries the affordance.\r\n `mt-button` owns the tooltip and the accessible name, so the trigger is\r\n one element rather than a button wrapped in a tooltip host.\r\n -->\r\n <mt-button\r\n icon=\"general.eye\"\r\n [label]=\"count().toString()\"\r\n [tooltip]=\"tooltip()\"\r\n [ariaLabel]=\"ariaLabel()\"\r\n variant=\"text\"\r\n size=\"small\"\r\n styleClass=\"!px-2 !py-1 !gap-1\"\r\n (onClick)=\"openDrawer()\"\r\n />\r\n } @else {\r\n <span\r\n class=\"inline-flex w-fit items-center rounded-md bg-surface-100 px-3 py-2 text-xs font-semibold text-muted-color\"\r\n >\r\n {{ emptyLabel }}\r\n </span>\r\n }\r\n</mt-entity-field>\r\n" }]
2218
2467
  }], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }], fields: [{ type: i0.Input, args: [{ isSignal: true, alias: "fields", required: false }] }] } });
2219
2468
 
2220
2469
  /**
@@ -3252,5 +3501,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
3252
3501
  * Generated bundle index. Do not edit.
3253
3502
  */
3254
3503
 
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 };
3504
+ export { CONNECTION_KEY_SEPARATOR, CURRENCY_COMPACT_THRESHOLD, ComparisonEntityList, ComparisonValue, DEFAULT_PHASE_GATE_COLOR, ENTITY_EMPTY_VALUE_PLACEHOLDER, ENTITY_LIST_TABLE_COMPONENT, EntitiesManage, EntitiesPreview, EntitiesResizeBase, EntityAttachment, EntityCheckbox, EntityConnection, EntityCurrency, EntityDate, EntityField, EntityIcon, EntityLeafDetails, EntityListDrawer, EntityListPreview, EntityLocation, EntityLongText, EntityLookup, EntityLookupModuleCheckList, EntityPercentage, EntityPhaseGate, EntityPreview, EntityPreviewBody, EntityRuntimeContextStore, EntityScheduleItem, EntityStatus, EntityText, EntityUser, FitText, LEAF_DETAILS_KEY_SEPARATOR, LEAF_PHASES_KEY_SEPARATOR, SECTION_KEY_PREFIX, buildConnectionKey, buildDisplayEntities, buildEntityListRows, buildSectionKey, compactCurrencyDisplay, currencyUnitOf, displayOrPlaceholder, expandConnectionEntity, expandLeafDetailsEntity, extractDisplayText, getEntitySectionTitle, groupEntitiesIntoSections, humanizeEntityListKey, isConnectionSyntheticKey, isEntityAlignEnd, isEntityLabelHidden, isEntityListLocalDocument, isEntityListSelectionDocument, isEntitySection, isLeafDetailsCatalogConfiguration, isLeafDetailsCollectionValue, isLeafDetailsRuntimeValue, isLeafDetailsSyntheticKey, isLeafDetailsValue, isLeafPhasesSyntheticKey, isLeafSyntheticKey, isSectionKey, isValueMissing, localCellsByFieldId, matchesPercentageColorRule, normalizeConnectionSourceLevels, normalizeNumerals, parseCurrencyAmount, readEntityValueColor, resolveConnectionLevelName, resolveEntityInfo, resolveEntityLabelPosition, resolveLocalFieldConfiguration, resolveLocalFieldLabel, resolveLocalFieldViewType, resolveLocalizedLabel, resolvePercentageColor, serializeEntityRawValue, sharedActiveLang, sortLocalRows, splitConnectionKey, splitLeafKey, summarizeEntityListRows, visibleLocalSchemaFields };
3256
3505
  //# sourceMappingURL=masterteam-components-entities.mjs.map