@mmlogic/components 0.2.0 → 0.3.0

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.
@@ -1364,7 +1364,6 @@ const MrdLayoutSection = class {
1364
1364
  this.mrdNavigate = createEvent(this, "mrdNavigate");
1365
1365
  this.mrdSearch = createEvent(this, "mrdSearch");
1366
1366
  this.mrdDownload = createEvent(this, "mrdDownload");
1367
- this.mrdLoadView = createEvent(this, "mrdLoadView");
1368
1367
  this.mrdLoadViewPage = createEvent(this, "mrdLoadViewPage");
1369
1368
  this.mrdLoadImage = createEvent(this, "mrdLoadImage");
1370
1369
  this.mrdViewAction = createEvent(this, "mrdViewAction");
@@ -1373,24 +1372,19 @@ const MrdLayoutSection = class {
1373
1372
  this.items = [];
1374
1373
  /** Record data object; keys are field names, _links holds relation and related-view links. */
1375
1374
  this.data = {};
1376
- /** View metadata map (ClientDashboardMetadata.views) for RELATED_VIEW and VIEW items. */
1375
+ /** Legacy: view metadata map (ClientDashboardMetadata.views). Not needed in new flat format. */
1377
1376
  this.views = {};
1378
- /** Top-level _links from ClientDashboardMetadata; used to resolve hrefs for VIEW items. */
1377
+ /** Legacy: top-level _links from ClientDashboardMetadata. Not needed in new flat format. */
1379
1378
  this.links = {};
1380
1379
  this.locale = navigator.language;
1381
1380
  this.searchQueryMap = {};
1382
1381
  this.searchResultsMap = {};
1383
1382
  this.imagePreviewUrl = null;
1384
1383
  this.imagePreviews = {};
1385
- this.activeViewMap = {};
1386
- this.viewLinksMap = {};
1387
- this.activeFiltersMap = {};
1388
1384
  this.searchTimers = {};
1389
1385
  this.handleViewLoadPage = (e, name) => {
1390
- var _a;
1391
1386
  e.stopPropagation();
1392
- const filters = (_a = this.activeFiltersMap[name]) !== null && _a !== void 0 ? _a : [];
1393
- this.mrdLoadViewPage.emit({ name, page: e.detail.page, sort: e.detail.sort, filters });
1387
+ this.mrdLoadViewPage.emit({ name, page: e.detail.page, sort: e.detail.sort, path: e.detail.path, qs: e.detail.qs });
1394
1388
  };
1395
1389
  this.handleSearchInput = (dataClass, query) => {
1396
1390
  this.searchQueryMap = Object.assign(Object.assign({}, this.searchQueryMap), { [dataClass]: query });
@@ -1407,59 +1401,29 @@ const MrdLayoutSection = class {
1407
1401
  }
1408
1402
  componentDidLoad() {
1409
1403
  setTimeout(() => {
1410
- this.emitLoadViews();
1404
+ this.initEmbeddedTables();
1411
1405
  this.emitLoadImages();
1412
1406
  }, 0);
1413
1407
  }
1414
- linksChanged(newVal) {
1415
- if (Object.keys(newVal !== null && newVal !== void 0 ? newVal : {}).length > 0) {
1416
- this.emitLoadViews();
1417
- }
1418
- }
1419
1408
  dataChanged(newVal) {
1420
- var _a;
1421
- if (newVal && Object.keys((_a = newVal === null || newVal === void 0 ? void 0 : newVal._links) !== null && _a !== void 0 ? _a : {}).length > 0) {
1422
- this.emitLoadViews();
1409
+ if (newVal && Object.keys(newVal).length > 0) {
1410
+ setTimeout(() => this.initEmbeddedTables(), 0);
1423
1411
  }
1424
1412
  }
1425
- resolveViewFilters(viewConfig) {
1426
- var _a;
1427
- return ((_a = viewConfig.filter) !== null && _a !== void 0 ? _a : []).map(f => {
1428
- var _a, _b, _c, _d;
1429
- const base = { field: f.name, dataType: 'TEXT' };
1430
- switch (f.operator) {
1431
- case 'FROM': return Object.assign(Object.assign({}, base), { from: (_a = f.value) !== null && _a !== void 0 ? _a : null });
1432
- case 'TO': return Object.assign(Object.assign({}, base), { to: (_b = f.value) !== null && _b !== void 0 ? _b : null });
1433
- case 'STARTS_WITH': return Object.assign(Object.assign({}, base), { operator: 'startsWith', value: (_c = f.value) !== null && _c !== void 0 ? _c : null });
1434
- case 'NOT_EMPTY': return Object.assign(Object.assign({}, base), { operator: 'isNotEmpty' });
1435
- case 'EMPTY': return Object.assign(Object.assign({}, base), { operator: 'isEmpty' });
1436
- default: return Object.assign(Object.assign({}, base), { operator: 'equals', value: (_d = f.value) !== null && _d !== void 0 ? _d : null });
1437
- }
1438
- });
1439
- }
1440
- emitLoadViews() {
1441
- var _a, _b, _c, _d, _e, _f, _g;
1442
- const dataLinks = ((_b = (_a = this.data) === null || _a === void 0 ? void 0 : _a._links) !== null && _b !== void 0 ? _b : {});
1443
- for (const item of this.flattenItems(this.items)) {
1444
- if (item.type === ClientLayoutItemType.RELATED_VIEW && item.name) {
1445
- const viewConfig = this.views[item.name];
1446
- if (!viewConfig)
1447
- continue;
1448
- const href = (_d = dataLinks[(_c = item.relatedClass) !== null && _c !== void 0 ? _c : '']) === null || _d === void 0 ? void 0 : _d.href;
1449
- this.mrdLoadView.emit({ name: item.name, href, viewConfig, sort: (_e = viewConfig.defaultSort) !== null && _e !== void 0 ? _e : '', filters: this.resolveViewFilters(viewConfig) });
1450
- }
1451
- else if (item.type === ClientLayoutItemType.VIEW) {
1452
- const viewName = item.name;
1453
- if (!viewName)
1454
- continue;
1455
- const viewConfig = this.views[viewName];
1456
- if (!viewConfig)
1457
- continue;
1458
- const href = (_f = this.links[viewName]) === null || _f === void 0 ? void 0 : _f.href;
1459
- this.mrdLoadView.emit({ name: viewName, href, viewConfig, sort: (_g = viewConfig.defaultSort) !== null && _g !== void 0 ? _g : '', filters: this.resolveViewFilters(viewConfig) });
1413
+ async initEmbeddedTables() {
1414
+ const tables = this.el.querySelectorAll('mrd-table[data-view]');
1415
+ for (const table of Array.from(tables)) {
1416
+ if (typeof table.init === 'function') {
1417
+ await table.init();
1460
1418
  }
1461
1419
  }
1462
1420
  }
1421
+ viewKeyFor(item) {
1422
+ var _a, _b, _c, _d;
1423
+ if (item.type === ClientLayoutItemType.RELATED_VIEW)
1424
+ return (_b = (_a = item.relatedClass) !== null && _a !== void 0 ? _a : item.name) !== null && _b !== void 0 ? _b : '';
1425
+ return (_d = (_c = item.dataClass) !== null && _c !== void 0 ? _c : item.name) !== null && _d !== void 0 ? _d : '';
1426
+ }
1463
1427
  emitLoadImages() {
1464
1428
  for (const item of this.flattenItems(this.items)) {
1465
1429
  if (item.type === ClientLayoutItemType.FIELD && item.dataType === ClientLayoutItemFieldDataType.IMAGE) {
@@ -1489,19 +1453,14 @@ const MrdLayoutSection = class {
1489
1453
  }
1490
1454
  /**
1491
1455
  * Inject data into an embedded mrd-table for a RELATED_VIEW or VIEW item.
1492
- * Pass totalElements on page 0 to initialise the table; omit on subsequent pages.
1493
- * Pass pageLinks (_links from the page response) on page 0 to enable action hrefs in mrdViewAction.
1456
+ * Pass totalElements to update the pagination total (safe to pass on every page).
1494
1457
  */
1495
- async setViewPage(name, page, rows, totalElements, pageLinks) {
1496
- if (pageLinks) {
1497
- this.viewLinksMap = Object.assign(Object.assign({}, this.viewLinksMap), { [name]: pageLinks });
1498
- }
1458
+ async setViewPage(name, page, rows, totalElements) {
1499
1459
  const table = this.el.querySelector(`mrd-table[data-view="${name}"]`);
1500
1460
  if (!table)
1501
1461
  return;
1502
1462
  if (totalElements !== undefined) {
1503
1463
  table.totalElements = totalElements;
1504
- await table.init();
1505
1464
  }
1506
1465
  await table.setPage(page, rows);
1507
1466
  }
@@ -1637,63 +1596,36 @@ const MrdLayoutSection = class {
1637
1596
  return (h("div", { class: "mrd-layout-section__search", key: `search-${dataClass}` }, h("div", { class: "mrd-layout-section__search-wrap" }, h("svg", { class: "mrd-layout-section__search-icon", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", "aria-hidden": "true" }, h("path", { "fill-rule": "evenodd", d: "M9 3.5a5.5 5.5 0 100 11 5.5 5.5 0 000-11zM2 9a7 7 0 1112.452 4.391l3.328 3.329a.75.75 0 11-1.06 1.06l-3.329-3.328A7 7 0 012 9z", "clip-rule": "evenodd" })), h("input", { class: "mrd-layout-section__search-input", type: "text", value: query, placeholder: (_c = item.label) !== null && _c !== void 0 ? _c : '', onInput: e => this.handleSearchInput(dataClass, e.target.value) })), results.length > 0 && (h("ul", { class: "mrd-layout-section__search-results" }, results.map(r => (h("li", { key: r.id, class: "mrd-layout-section__search-result" }, h("button", { class: "mrd-layout-section__search-result-btn", onClick: () => this.mrdNavigate.emit({ href: r.id, label: r.label }) }, h("span", { class: "mrd-layout-section__search-result-label" }, r.label), r.description && h("span", { class: "mrd-layout-section__search-result-desc" }, r.description)))))))));
1638
1597
  }
1639
1598
  renderRelatedView(item) {
1640
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
1641
- const isRelated = item.type === ClientLayoutItemType.RELATED_VIEW;
1642
- const name = item.name;
1643
- if (!name)
1599
+ var _a, _b, _c, _d, _e, _f;
1600
+ const key = this.viewKeyFor(item);
1601
+ if (!key)
1644
1602
  return null;
1645
- const viewConfig = this.views[name];
1646
- if (!viewConfig)
1603
+ if (!item.view)
1647
1604
  return null;
1648
1605
  const showTitle = (_a = item.showTitle) !== null && _a !== void 0 ? _a : false;
1649
- const activeName = (_b = this.activeViewMap[name]) !== null && _b !== void 0 ? _b : name;
1650
- const activeViewConfig = (_c = this.views[activeName]) !== null && _c !== void 0 ? _c : viewConfig;
1651
- // Build the full view list (original + alternatives) so the switcher can always go back.
1652
- const originalLabel = (_f = (_e = (_d = viewConfig.pluralLabel) !== null && _d !== void 0 ? _d : viewConfig.singularLabel) !== null && _e !== void 0 ? _e : item.label) !== null && _f !== void 0 ? _f : name;
1653
- const allViews = [{ name, label: originalLabel }, ...((_g = item.alternativeViews) !== null && _g !== void 0 ? _g : [])];
1654
- const activeEntry = allViews.find(v => v.name === activeName);
1655
- const viewLabel = (_k = (_j = (_h = activeEntry === null || activeEntry === void 0 ? void 0 : activeEntry.label) !== null && _h !== void 0 ? _h : activeViewConfig.pluralLabel) !== null && _j !== void 0 ? _j : activeViewConfig.singularLabel) !== null && _k !== void 0 ? _k : '';
1656
- const altViews = allViews.filter(v => v.name !== activeName);
1657
- const rawActions = (_l = item.actions) !== null && _l !== void 0 ? _l : ['NEW', 'EXPORT'];
1658
- const tableActions = rawActions.reduce((acc, a) => {
1659
- if (a === 'NEW')
1660
- acc.push({ action: 'create', label: t('table_new_record', this.locale), icon: 'assets/sprites.svg#icon-plus', variant: 'primary' });
1661
- if (a === 'EXPORT')
1662
- acc.push({ action: 'export', label: t('table_export_excel', this.locale), icon: 'assets/sprites.svg#icon-file-excel' });
1663
- return acc;
1664
- }, []);
1665
- return (h("div", { class: "mrd-layout-section__related-view", key: `view-${name}` }, showTitle && item.label && h("h3", { class: "mrd-layout-section__related-view-title" }, item.label), h("mrd-table", { "data-view": name, columns: activeViewConfig.values, locale: this.locale, defaultSort: (_m = activeViewConfig.defaultSort) !== null && _m !== void 0 ? _m : '', viewLabel: viewLabel, alternativeViews: altViews, actions: tableActions, onMrdLoadPage: (e) => this.handleViewLoadPage(e, name), onMrdSwitchView: (e) => {
1666
- var _a, _b, _c, _d, _e, _f, _g, _h;
1667
- e.stopPropagation();
1668
- const newViewName = e.detail.name;
1669
- const newViewConfig = this.views[newViewName];
1670
- if (!newViewConfig)
1671
- return;
1672
- this.activeViewMap = Object.assign(Object.assign({}, this.activeViewMap), { [name]: newViewName });
1673
- this.activeFiltersMap = Object.assign(Object.assign({}, this.activeFiltersMap), { [name]: [] });
1674
- const dataLinks = ((_b = (_a = this.data) === null || _a === void 0 ? void 0 : _a._links) !== null && _b !== void 0 ? _b : {});
1675
- const href = isRelated
1676
- ? (_d = dataLinks[(_c = item.relatedClass) !== null && _c !== void 0 ? _c : '']) === null || _d === void 0 ? void 0 : _d.href
1677
- : ((_f = (_e = this.links[newViewName]) === null || _e === void 0 ? void 0 : _e.href) !== null && _f !== void 0 ? _f : (_g = this.links[name]) === null || _g === void 0 ? void 0 : _g.href);
1678
- this.mrdLoadView.emit({ name, href, viewConfig: newViewConfig, sort: (_h = newViewConfig.defaultSort) !== null && _h !== void 0 ? _h : '', filters: this.resolveViewFilters(newViewConfig) });
1679
- }, onMrdFilter: (e) => {
1606
+ // Extract parentId from data._links.self.href for RELATED_VIEW path construction
1607
+ const selfHref = (_e = (_d = (_c = (_b = this.data) === null || _b === void 0 ? void 0 : _b._links) === null || _c === void 0 ? void 0 : _c.self) === null || _d === void 0 ? void 0 : _d.href) !== null && _e !== void 0 ? _e : '';
1608
+ const parentId = (_f = selfHref.split('/').filter(Boolean).pop()) !== null && _f !== void 0 ? _f : '';
1609
+ return (h("div", { class: "mrd-layout-section__related-view", key: `view-${key}` }, showTitle && item.label && h("h3", { class: "mrd-layout-section__related-view-title" }, item.label), h("mrd-table", { "data-view": key, item: item, parentId: parentId, locale: this.locale, onMrdLoadPage: (e) => this.handleViewLoadPage(e, key), onMrdLoadAggregations: (e) => {
1610
+ var _a;
1680
1611
  e.stopPropagation();
1681
- this.activeFiltersMap = Object.assign(Object.assign({}, this.activeFiltersMap), { [name]: e.detail.filters });
1682
- }, onMrdLoadAggregations: (e) => {
1683
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
1612
+ this.mrdLoadViewAggregations.emit(Object.assign({ name: key, dataClass: (_a = item.dataClass) !== null && _a !== void 0 ? _a : key }, e.detail));
1613
+ }, onMrdRowClick: (e) => {
1614
+ var _a, _b, _c;
1684
1615
  e.stopPropagation();
1685
- const dataLinks = ((_b = (_a = this.data) === null || _a === void 0 ? void 0 : _a._links) !== null && _b !== void 0 ? _b : {});
1686
- const href = isRelated
1687
- ? (_d = dataLinks[(_c = item.relatedClass) !== null && _c !== void 0 ? _c : '']) === null || _d === void 0 ? void 0 : _d.href
1688
- : ((_g = (_f = this.links[(_e = this.activeViewMap[name]) !== null && _e !== void 0 ? _e : name]) === null || _f === void 0 ? void 0 : _f.href) !== null && _g !== void 0 ? _g : (_h = this.links[name]) === null || _h === void 0 ? void 0 : _h.href);
1689
- const filters = (_j = this.activeFiltersMap[name]) !== null && _j !== void 0 ? _j : [];
1690
- this.mrdLoadViewAggregations.emit(Object.assign({ name, href, filters }, e.detail));
1616
+ const row = e.detail;
1617
+ this.mrdNavigate.emit({ href: (_b = (_a = row === null || row === void 0 ? void 0 : row._links) === null || _a === void 0 ? void 0 : _a.self) === null || _b === void 0 ? void 0 : _b.href, label: (_c = row === null || row === void 0 ? void 0 : row.name) !== null && _c !== void 0 ? _c : '' });
1691
1618
  }, onMrdAction: (e) => {
1692
- var _a, _b, _c;
1619
+ var _a;
1693
1620
  e.stopPropagation();
1694
- const pl = (_a = this.viewLinksMap[name]) !== null && _a !== void 0 ? _a : {};
1695
- const href = e.detail.action === 'export' ? (_b = pl['excel']) === null || _b === void 0 ? void 0 : _b.href : (_c = pl['self']) === null || _c === void 0 ? void 0 : _c.href;
1696
- this.mrdViewAction.emit({ name, action: e.detail.action, href });
1621
+ this.mrdViewAction.emit({
1622
+ name: key,
1623
+ action: e.detail.action,
1624
+ dataClass: (_a = item.dataClass) !== null && _a !== void 0 ? _a : key,
1625
+ path: e.detail.path,
1626
+ qs: e.detail.qs,
1627
+ parentPath: e.detail.parentPath,
1628
+ });
1697
1629
  } })));
1698
1630
  }
1699
1631
  renderItem(item) {
@@ -1727,13 +1659,10 @@ const MrdLayoutSection = class {
1727
1659
  return (h("div", { class: "mrd-layout-section__modal-backdrop", onClick: () => { this.imagePreviewUrl = null; } }, h("div", { class: "mrd-layout-section__modal", onClick: (e) => e.stopPropagation() }, h("button", { class: "mrd-layout-section__modal-close", onClick: () => { this.imagePreviewUrl = null; } }, "\u2715"), h("img", { class: "mrd-layout-section__modal-image", src: this.imagePreviewUrl, alt: "" }))));
1728
1660
  }
1729
1661
  render() {
1730
- return (h(Host, { key: '7a91a541e056965dc79d74a50827e8c270c33a0d' }, h("div", { key: 'bcf4a2e81e704d136fb437cd2cb22acb4a05a8b3', class: "mrd-layout-section" }, this.items.map(item => this.renderItem(item))), this.renderImageModal()));
1662
+ return (h(Host, { key: 'a7b6514d19cf79261396d9aaf03f459600037566' }, h("div", { key: '331f0558ef3eddf5a9b4332f7ec45c58b52dd8c3', class: "mrd-layout-section" }, this.items.map(item => this.renderItem(item))), this.renderImageModal()));
1731
1663
  }
1732
1664
  get el() { return getElement(this); }
1733
1665
  static get watchers() { return {
1734
- "links": [{
1735
- "linksChanged": 0
1736
- }],
1737
1666
  "data": [{
1738
1667
  "dataChanged": 0
1739
1668
  }]
@@ -2199,9 +2128,7 @@ const MrdTable = class {
2199
2128
  this.mrdLoadPage = createEvent(this, "mrdLoadPage");
2200
2129
  this.mrdRowClick = createEvent(this, "mrdRowClick");
2201
2130
  this.mrdAction = createEvent(this, "mrdAction");
2202
- this.mrdFilter = createEvent(this, "mrdFilter");
2203
2131
  this.mrdDownload = createEvent(this, "mrdDownload");
2204
- this.mrdSwitchView = createEvent(this, "mrdSwitchView");
2205
2132
  this.mrdLoadAggregations = createEvent(this, "mrdLoadAggregations");
2206
2133
  // ── Non-state internals ────────────────────────────────────────────────────
2207
2134
  this.pendingPages = new Set();
@@ -2209,7 +2136,10 @@ const MrdTable = class {
2209
2136
  this.outsideClickHandler = null;
2210
2137
  this.keydownHandler = null;
2211
2138
  // ── Props ──────────────────────────────────────────────────────────────────
2212
- this.columns = [];
2139
+ /** The VIEW or RELATED_VIEW layout item. Contains view config, dataClass, fromClass, actions etc. */
2140
+ this.item = null;
2141
+ /** Parent record id — required for RELATED_VIEW to build /{fromClass}/{parentId}/{dataClass}. */
2142
+ this.parentId = '';
2213
2143
  /** Direct rows (non-paginated mode, used when totalElements === 0). */
2214
2144
  this.rows = [];
2215
2145
  this.locale = navigator.language;
@@ -2221,16 +2151,9 @@ const MrdTable = class {
2221
2151
  this.rowHeight = 36;
2222
2152
  /** Height of the scroll container in px. */
2223
2153
  this.tableHeight = 500;
2224
- /** Initial sort applied on load, e.g. "timestamp,desc" or "name".
2225
- * Parsed by init() into sortField + sortDir. */
2226
- this.defaultSort = '';
2227
- /** Toolbar action buttons rendered above the table. */
2228
- this.actions = [];
2229
- /** Display label of the current view — shown in the toolbar center as a view picker trigger. */
2230
- this.viewLabel = '';
2231
- /** Alternative views available for this table; renders a dropdown when non-empty. */
2232
- this.alternativeViews = [];
2233
2154
  // ── Internal state ─────────────────────────────────────────────────────────
2155
+ /** Index into allViews[] for the currently displayed view. 0 = primary, 1+ = alternatives. */
2156
+ this.activeViewIdx = 0;
2234
2157
  this.loadedPages = new Map();
2235
2158
  this.requestedPages = new Set();
2236
2159
  this.renderStart = 0;
@@ -2273,13 +2196,16 @@ const MrdTable = class {
2273
2196
  totalElementsChanged(newVal) {
2274
2197
  this.renderEnd = Math.min(this.renderEnd, Math.max(0, newVal - 1));
2275
2198
  }
2276
- /** Apply defaultSort when the prop changes (e.g. after a view switch). */
2277
- defaultSortChanged(newVal) {
2278
- this.applyDefaultSort(newVal);
2199
+ /** Reset to primary view when the item prop is replaced from outside. */
2200
+ itemChanged(newVal) {
2201
+ var _a, _b;
2202
+ this.activeViewIdx = 0;
2203
+ this.applyDefaultSort((_b = (_a = newVal === null || newVal === void 0 ? void 0 : newVal.view) === null || _a === void 0 ? void 0 : _a.defaultSort) !== null && _b !== void 0 ? _b : '');
2279
2204
  }
2280
2205
  // ── Lifecycle ──────────────────────────────────────────────────────────────
2281
2206
  componentWillLoad() {
2282
- this.applyDefaultSort(this.defaultSort);
2207
+ var _a, _b, _c;
2208
+ this.applyDefaultSort((_c = (_b = (_a = this.item) === null || _a === void 0 ? void 0 : _a.view) === null || _b === void 0 ? void 0 : _b.defaultSort) !== null && _c !== void 0 ? _c : '');
2283
2209
  }
2284
2210
  // ── Helpers ────────────────────────────────────────────────────────────────
2285
2211
  applyDefaultSort(defaultSort) {
@@ -2311,14 +2237,17 @@ const MrdTable = class {
2311
2237
  this.colWidths = [];
2312
2238
  this.scrollTop = 0;
2313
2239
  this.renderStart = 0;
2314
- // No BUFFER on init — only request what fits the visible area (page 0).
2315
- // BUFFER is applied during scroll to pre-fetch the next page proactively.
2316
- this.renderEnd = Math.max(0, Math.min(this.visibleCount() - 1, this.totalElements - 1));
2240
+ // Always fill the visible viewport on init — totalElements may be stale from a
2241
+ // previous view. setPage() clamps renderEnd when the page is shorter than pageSize.
2242
+ this.renderEnd = this.visibleCount() - 1;
2317
2243
  const scroller = this.el.querySelector('.mrd-table__scroll');
2318
2244
  if (scroller)
2319
2245
  scroller.scrollTop = 0;
2320
2246
  this.aggregations = null;
2321
2247
  this.emitLoadAggregations();
2248
+ // Always request page 0 — totalElements may be unknown (0) on first load.
2249
+ this.mrdLoadPage.emit({ page: 0, sort: this.sortParam(), path: this.buildDataPath(), qs: this.buildQueryParams(0) });
2250
+ this.requestedPages = new Set([0]);
2322
2251
  }
2323
2252
  /**
2324
2253
  * Inject the rows for a given page (0-based).
@@ -2371,6 +2300,147 @@ const MrdTable = class {
2371
2300
  return '';
2372
2301
  return this.sortDir === 'desc' ? `${this.sortField},desc` : this.sortField;
2373
2302
  }
2303
+ /** Stable ordered list: primary view first, then alternatives (from the item prop). */
2304
+ get allViews() {
2305
+ var _a, _b, _c, _d, _e, _f, _g;
2306
+ if (!this.item)
2307
+ return [];
2308
+ const it = this.item;
2309
+ return [
2310
+ { label: (_e = (_d = (_c = (_a = it.label) !== null && _a !== void 0 ? _a : (_b = it.view) === null || _b === void 0 ? void 0 : _b.pluralLabel) !== null && _c !== void 0 ? _c : it.dataClass) !== null && _d !== void 0 ? _d : it.relatedClass) !== null && _e !== void 0 ? _e : '', dataClass: (_f = it.dataClass) !== null && _f !== void 0 ? _f : it.relatedClass, fromClass: it.fromClass, filterClass: it.filterClass, view: it.view },
2311
+ ...((_g = it.alternativeViews) !== null && _g !== void 0 ? _g : []).map(av => {
2312
+ var _a, _b, _c, _d;
2313
+ return ({
2314
+ label: (_d = (_c = (_a = av.label) !== null && _a !== void 0 ? _a : (_b = av.view) === null || _b === void 0 ? void 0 : _b.pluralLabel) !== null && _c !== void 0 ? _c : av.dataClass) !== null && _d !== void 0 ? _d : '',
2315
+ dataClass: av.dataClass,
2316
+ fromClass: av.fromClass,
2317
+ filterClass: av.filterClass,
2318
+ view: av.view,
2319
+ });
2320
+ }),
2321
+ ];
2322
+ }
2323
+ /** Relative excel export path for the current view.
2324
+ * VIEW: /excel/{dataClass}
2325
+ * RELATED_VIEW: /excel/{fromClass}/{parentId}/{dataClass} */
2326
+ buildExcelPath() {
2327
+ var _a, _b, _c, _d;
2328
+ const v = this.allViews[this.activeViewIdx];
2329
+ if (!v)
2330
+ return '';
2331
+ if (((_a = this.item) === null || _a === void 0 ? void 0 : _a.type) === 'RELATED_VIEW') {
2332
+ return `/excel/${(_b = v.fromClass) !== null && _b !== void 0 ? _b : ''}/${this.parentId}/${(_c = v.dataClass) !== null && _c !== void 0 ? _c : ''}`;
2333
+ }
2334
+ return `/excel/${(_d = v.dataClass) !== null && _d !== void 0 ? _d : ''}`;
2335
+ }
2336
+ buildActionDetail(action) {
2337
+ var _a, _b, _c;
2338
+ if (action === 'export') {
2339
+ return { action, path: this.buildExcelPath(), qs: this.buildQueryParams(0) };
2340
+ }
2341
+ if (action === 'create') {
2342
+ const v = this.allViews[this.activeViewIdx];
2343
+ const parentPath = ((_a = this.item) === null || _a === void 0 ? void 0 : _a.type) === 'RELATED_VIEW'
2344
+ ? `/${(_b = v === null || v === void 0 ? void 0 : v.fromClass) !== null && _b !== void 0 ? _b : ''}/${this.parentId}`
2345
+ : null;
2346
+ return { action, dataClass: (_c = v === null || v === void 0 ? void 0 : v.dataClass) !== null && _c !== void 0 ? _c : '', parentPath };
2347
+ }
2348
+ return { action };
2349
+ }
2350
+ /** Relative data path for the current view, without query string.
2351
+ * VIEW: /{dataClass}
2352
+ * RELATED_VIEW: /{fromClass}/{parentId}/{dataClass} */
2353
+ buildDataPath() {
2354
+ var _a, _b, _c, _d;
2355
+ const v = this.allViews[this.activeViewIdx];
2356
+ if (!v)
2357
+ return '';
2358
+ if (((_a = this.item) === null || _a === void 0 ? void 0 : _a.type) === 'RELATED_VIEW') {
2359
+ return `/${(_b = v.fromClass) !== null && _b !== void 0 ? _b : ''}/${this.parentId}/${(_c = v.dataClass) !== null && _c !== void 0 ? _c : ''}`;
2360
+ }
2361
+ return `/${(_d = v.dataClass) !== null && _d !== void 0 ? _d : ''}`;
2362
+ }
2363
+ /** Build query params for a page request from current sort, view filters, filterClass and active column filters. */
2364
+ buildQueryParams(page) {
2365
+ var _a, _b, _c, _d, _e, _f, _g;
2366
+ const v = this.allViews[this.activeViewIdx];
2367
+ const p = new URLSearchParams();
2368
+ if (page > 0)
2369
+ p.set('page', String(page));
2370
+ const sort = this.sortParam();
2371
+ if (sort)
2372
+ p.set('sort', sort);
2373
+ const filterClass = v === null || v === void 0 ? void 0 : v.filterClass;
2374
+ if (filterClass)
2375
+ p.set('type', filterClass);
2376
+ for (const f of ((_b = (_a = v === null || v === void 0 ? void 0 : v.view) === null || _a === void 0 ? void 0 : _a.filter) !== null && _b !== void 0 ? _b : [])) {
2377
+ if (!f.name)
2378
+ continue;
2379
+ if (f.operator === 'EMPTY') {
2380
+ p.set(f.name, '');
2381
+ continue;
2382
+ }
2383
+ if (f.operator === 'NOT_EMPTY') {
2384
+ p.set(f.name + '_notempty', 'true');
2385
+ continue;
2386
+ }
2387
+ if (f.operator === 'STARTS_WITH') {
2388
+ p.set(f.name + '_startswith', String((_c = f.value) !== null && _c !== void 0 ? _c : ''));
2389
+ continue;
2390
+ }
2391
+ if (f.operator === 'FROM') {
2392
+ p.set(f.name + '_from', String((_d = f.value) !== null && _d !== void 0 ? _d : ''));
2393
+ continue;
2394
+ }
2395
+ if (f.operator === 'TO') {
2396
+ p.set(f.name + '_to', String((_e = f.value) !== null && _e !== void 0 ? _e : ''));
2397
+ continue;
2398
+ }
2399
+ if (f.value != null) {
2400
+ p.set(f.name, String(f.value));
2401
+ }
2402
+ }
2403
+ for (const f of this.activeFilters.values()) {
2404
+ if (f.operator === 'isEmpty') {
2405
+ p.set(f.field, '');
2406
+ continue;
2407
+ }
2408
+ if (f.operator === 'isNotEmpty') {
2409
+ p.set(f.field + '_notempty', 'true');
2410
+ continue;
2411
+ }
2412
+ if (f.operator === 'startsWith') {
2413
+ p.set(f.field + '_startswith', String((_f = f.value) !== null && _f !== void 0 ? _f : ''));
2414
+ continue;
2415
+ }
2416
+ if ((_g = f.values) === null || _g === void 0 ? void 0 : _g.length) {
2417
+ p.set(f.field, f.values.join(','));
2418
+ continue;
2419
+ }
2420
+ if (f.value != null)
2421
+ p.set(f.field, String(f.value));
2422
+ if (f.from != null)
2423
+ p.set(f.field + '_from', String(f.from));
2424
+ if (f.to != null)
2425
+ p.set(f.field + '_to', String(f.to));
2426
+ }
2427
+ return p.toString();
2428
+ }
2429
+ get columns() {
2430
+ var _a, _b, _c;
2431
+ return ((_c = (_b = (_a = this.allViews[this.activeViewIdx]) === null || _a === void 0 ? void 0 : _a.view) === null || _b === void 0 ? void 0 : _b.values) !== null && _c !== void 0 ? _c : []);
2432
+ }
2433
+ get tableActions() {
2434
+ var _a, _b;
2435
+ const raw = (_b = (_a = this.item) === null || _a === void 0 ? void 0 : _a.actions) !== null && _b !== void 0 ? _b : [];
2436
+ return (raw !== null && raw !== void 0 ? raw : []).reduce((acc, a) => {
2437
+ if (a === 'NEW')
2438
+ acc.push({ action: 'create', label: t('table_new_record', this.locale), icon: 'assets/sprites.svg#icon-plus', variant: 'primary' });
2439
+ if (a === 'EXPORT')
2440
+ acc.push({ action: 'export', label: t('table_export_excel', this.locale), icon: 'assets/sprites.svg#icon-file-excel' });
2441
+ return acc;
2442
+ }, []);
2443
+ }
2374
2444
  colName(col) {
2375
2445
  var _a;
2376
2446
  return (_a = col.name) !== null && _a !== void 0 ? _a : '';
@@ -2402,9 +2472,9 @@ const MrdTable = class {
2402
2472
  return Object.keys(params).length > 0 ? params : null;
2403
2473
  }
2404
2474
  emitLoadAggregations() {
2405
- const params = this.buildAggregationParams();
2406
- if (params)
2407
- this.mrdLoadAggregations.emit(params);
2475
+ const aggParams = this.buildAggregationParams();
2476
+ if (aggParams)
2477
+ this.mrdLoadAggregations.emit(Object.assign(Object.assign({}, aggParams), { path: this.buildDataPath(), qs: this.buildQueryParams(0) }));
2408
2478
  }
2409
2479
  renderAggregationValue(col) {
2410
2480
  var _a, _b;
@@ -2469,7 +2539,7 @@ const MrdTable = class {
2469
2539
  for (let p = firstPage; p <= lastPage; p++) {
2470
2540
  if (!this.loadedPages.has(p) && !next.has(p)) {
2471
2541
  next.add(p);
2472
- this.mrdLoadPage.emit({ page: p, sort: this.sortParam() });
2542
+ this.mrdLoadPage.emit({ page: p, sort: this.sortParam(), path: this.buildDataPath(), qs: this.buildQueryParams(p) });
2473
2543
  changed = true;
2474
2544
  }
2475
2545
  }
@@ -2511,7 +2581,7 @@ const MrdTable = class {
2511
2581
  if (pageEnd < this.renderStart || pageStart > this.renderEnd)
2512
2582
  continue;
2513
2583
  next.add(page);
2514
- this.mrdLoadPage.emit({ page, sort: this.sortParam() });
2584
+ this.mrdLoadPage.emit({ page, sort: this.sortParam(), path: this.buildDataPath(), qs: this.buildQueryParams(page) });
2515
2585
  changed = true;
2516
2586
  }
2517
2587
  this.pendingPages.clear();
@@ -2703,7 +2773,6 @@ const MrdTable = class {
2703
2773
  }
2704
2774
  this.activeFilters = next;
2705
2775
  this.closeFilterPopup();
2706
- this.mrdFilter.emit({ filters: Array.from(this.activeFilters.values()) });
2707
2776
  this.aggregations = null;
2708
2777
  this.emitLoadAggregations();
2709
2778
  if (this.totalElements > 0) {
@@ -2718,7 +2787,6 @@ const MrdTable = class {
2718
2787
  next.delete(name);
2719
2788
  this.activeFilters = next;
2720
2789
  this.closeFilterPopup();
2721
- this.mrdFilter.emit({ filters: Array.from(this.activeFilters.values()) });
2722
2790
  this.aggregations = null;
2723
2791
  this.emitLoadAggregations();
2724
2792
  if (this.totalElements > 0) {
@@ -2728,7 +2796,6 @@ const MrdTable = class {
2728
2796
  }
2729
2797
  clearAllFilters() {
2730
2798
  this.activeFilters = new Map();
2731
- this.mrdFilter.emit({ filters: [] });
2732
2799
  this.aggregations = null;
2733
2800
  this.emitLoadAggregations();
2734
2801
  if (this.totalElements > 0) {
@@ -2737,28 +2804,30 @@ const MrdTable = class {
2737
2804
  }
2738
2805
  }
2739
2806
  // ── View switcher ──────────────────────────────────────────────────────────
2740
- handleViewSwitch(view) {
2741
- this.mrdSwitchView.emit({ name: view.name, class: view.class });
2807
+ handleViewSwitch(targetIdx) {
2808
+ var _a, _b;
2809
+ const target = this.allViews[targetIdx];
2810
+ if (!(target === null || target === void 0 ? void 0 : target.view))
2811
+ return;
2812
+ this.activeViewIdx = targetIdx;
2813
+ this.applyDefaultSort((_b = (_a = target.view) === null || _a === void 0 ? void 0 : _a.defaultSort) !== null && _b !== void 0 ? _b : '');
2814
+ this.activeFilters = new Map();
2815
+ this.init();
2742
2816
  }
2743
2817
  // ── Render: toolbar ────────────────────────────────────────────────────────
2744
2818
  renderToolbar() {
2745
- var _a, _b;
2746
2819
  const filterCount = this.activeFilters.size;
2747
- const hasActions = ((_a = this.actions) === null || _a === void 0 ? void 0 : _a.length) > 0;
2748
- const hasViewSwitcher = !!this.viewLabel && ((_b = this.alternativeViews) === null || _b === void 0 ? void 0 : _b.length) > 0;
2820
+ const actions = this.tableActions;
2821
+ const allViews = this.allViews;
2822
+ const hasActions = actions.length > 0;
2823
+ const hasViewSwitcher = allViews.length > 1;
2749
2824
  return (h("div", { class: "mrd-table__toolbar" }, h("div", { class: "mrd-table__toolbar-left" }, h("button", { class: `mrd-table__action mrd-table__action--secondary mrd-table__filter-toggle${this.filterMode ? ' mrd-table__filter-toggle--active' : ''}`, onClick: () => this.handleFilterToggle() }, h("svg", { class: "mrd-table__action-icon", viewBox: "0 0 24 24", "aria-hidden": "true" }, h("path", { fill: "currentColor", d: "M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z" })), filterCount > 0 && h("span", { class: "mrd-table__filter-badge" }, filterCount), h("span", { class: "mrd-table__action-tooltip" }, this.filterMode ? t('table_filter_hide', this.locale) : t('table_filter', this.locale), filterCount > 0 ? ` (${filterCount} ${t('table_filter_active', this.locale)})` : '')), filterCount > 0 && (h("button", { class: "mrd-table__action mrd-table__action--secondary", onClick: () => this.clearAllFilters() }, h("svg", { class: "mrd-table__action-icon", viewBox: "0 0 24 24", "aria-hidden": "true" }, h("path", { fill: "currentColor", d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" })), h("span", { class: "mrd-table__action-tooltip" }, t('table_filter_clear_all', this.locale))))), hasViewSwitcher && (h("div", { class: "mrd-table__toolbar-center" }, h("select", { class: "mrd-table__view-select", onChange: (e) => {
2750
- const sel = e.target;
2751
- const view = this.alternativeViews.find(v => v.name === sel.value);
2752
- if (view) {
2753
- sel.selectedIndex = 0;
2754
- this.handleViewSwitch(view);
2755
- }
2756
- } }, h("option", { value: "" }, this.viewLabel), this.alternativeViews.map(v => {
2757
- var _a;
2758
- return (h("option", { value: v.name }, (_a = v.label) !== null && _a !== void 0 ? _a : v.name));
2759
- })))), hasActions && (h("div", { class: "mrd-table__toolbar-right" }, this.actions.map(a => {
2825
+ const idx = parseInt(e.target.value, 10);
2826
+ if (!isNaN(idx) && idx !== this.activeViewIdx)
2827
+ this.handleViewSwitch(idx);
2828
+ } }, allViews.map((v, i) => (h("option", { value: String(i), selected: i === this.activeViewIdx }, v.label)))))), hasActions && (h("div", { class: "mrd-table__toolbar-right" }, actions.map(a => {
2760
2829
  var _a;
2761
- return (h("button", { class: `mrd-table__action mrd-table__action--${(_a = a.variant) !== null && _a !== void 0 ? _a : 'secondary'}`, disabled: a.disabled, onClick: () => this.mrdAction.emit({ action: a.action }) }, a.icon
2830
+ return (h("button", { class: `mrd-table__action mrd-table__action--${(_a = a.variant) !== null && _a !== void 0 ? _a : 'secondary'}`, disabled: a.disabled, onClick: () => this.mrdAction.emit(this.buildActionDetail(a.action)) }, a.icon
2762
2831
  ? h("svg", { class: "mrd-table__action-icon", "aria-hidden": "true" }, h("use", { href: a.icon }))
2763
2832
  : a.label, h("span", { class: "mrd-table__action-tooltip" }, a.label)));
2764
2833
  })))));
@@ -3004,8 +3073,8 @@ const MrdTable = class {
3004
3073
  "totalElements": [{
3005
3074
  "totalElementsChanged": 0
3006
3075
  }],
3007
- "defaultSort": [{
3008
- "defaultSortChanged": 0
3076
+ "item": [{
3077
+ "itemChanged": 0
3009
3078
  }]
3010
3079
  }; }
3011
3080
  };
@@ -1 +1 @@
1
- import{p as e,b as l}from"./p-_tsCCkAi.js";export{s as setNonce}from"./p-_tsCCkAi.js";import{g as a}from"./p-DQuL1Twl.js";(()=>{const l=import.meta.url,a={};return""!==l&&(a.resourcesUrl=new URL(".",l).href),e(a)})().then((async e=>(await a(),l([["p-61ef0232",[[2,"mrd-form",{layout:[16],locale:[1],values:[16],referenceHref:[1,"reference-href"],referenceClass:[1,"reference-class"],showCancel:[4,"show-cancel"],formValues:[32],errors:[32],submitted:[32],setFieldValue:[64]},null,{values:[{valuesChanged:0}]}],[2,"mrd-layout-section",{items:[16],data:[16],views:[16],links:[16],locale:[1],searchQueryMap:[32],searchResultsMap:[32],imagePreviewUrl:[32],imagePreviews:[32],activeViewMap:[32],setSearchResults:[64],setViewPage:[64],setViewAggregations:[64],setImagePreview:[64],openImagePreview:[64]},null,{links:[{linksChanged:0}],data:[{dataChanged:0}]}],[2,"mrd-field",{item:[16],locale:[1],value:[16]}],[2,"mrd-table",{columns:[16],rows:[16],locale:[1],totalElements:[2,"total-elements"],pageSize:[2,"page-size"],rowHeight:[2,"row-height"],tableHeight:[2,"table-height"],defaultSort:[1,"default-sort"],actions:[16],viewLabel:[1,"view-label"],alternativeViews:[16],loadedPages:[32],requestedPages:[32],renderStart:[32],renderEnd:[32],colWidths:[32],sortField:[32],sortDir:[32],filterMode:[32],activeFilters:[32],openFilterCol:[32],pendingFilter:[32],popupPos:[32],scrollTop:[32],textblockModal:[32],jsonModal:[32],aggregations:[32],init:[64],setPage:[64],setAggregations:[64]},null,{totalElements:[{totalElementsChanged:0}],defaultSort:[{defaultSortChanged:0}]}],[2,"mrd-boolean-field",{name:[1],label:[1],value:[4],required:[4],disabled:[4],locale:[1],checked:[32]}],[2,"mrd-currency-field",{name:[1],label:[1],value:[16],required:[4],disabled:[4],locale:[1],amountDisplay:[32],currency:[32],error:[32]}],[2,"mrd-date-field",{name:[1],label:[1],value:[1],required:[4],disabled:[4],locale:[1],error:[32]}],[2,"mrd-datetime-field",{name:[1],label:[1],value:[1],required:[4],disabled:[4],locale:[1],error:[32],localValue:[32]},null,{value:[{valueChanged:0}]}],[2,"mrd-email-field",{name:[1],label:[1],value:[1],placeholder:[1],required:[4],disabled:[4],locale:[1],error:[32]}],[2,"mrd-file-field",{name:[1],label:[1],value:[16],required:[4],disabled:[4],locale:[1],accept:[1],maxSize:[2,"max-size"],fileName:[32],isDragging:[32],uploading:[32],error:[32]},null,{value:[{valueChanged:0}]}],[2,"mrd-hyperlink-field",{name:[1],label:[1],value:[1],placeholder:[1],required:[4],disabled:[4],locale:[1],error:[32]}],[2,"mrd-image-field",{name:[1],label:[1],value:[16],required:[4],disabled:[4],locale:[1],accept:[1],maxSize:[2,"max-size"],previewUrl:[32],fileName:[32],isDragging:[32],uploading:[32],error:[32]},null,{value:[{valueChanged:0}]}],[2,"mrd-list-field",{name:[1],label:[1],value:[1],required:[4],disabled:[4],multiple:[4],locale:[1],listItems:[16],error:[32],selected:[32]}],[2,"mrd-longtext-field",{name:[1],label:[1],value:[1],placeholder:[1],required:[4],disabled:[4],locale:[1],error:[32]}],[2,"mrd-number-field",{name:[1],label:[1],value:[2],placeholder:[1],required:[4],disabled:[4],locale:[1],dataType:[1,"data-type"],decimalPrecision:[2,"decimal-precision"],displayValue:[32],error:[32]}],[2,"mrd-relation-field",{name:[1],label:[1],required:[4],disabled:[4],locale:[1],relatedClass:[1,"related-class"],mostSignificantClass:[1,"most-significant-class"],displayType:[1,"display-type"],editBehavior:[1,"edit-behavior"],commonRelation:[1,"common-relation"],multiple:[4],dropdownValues:[16],value:[1],searchQuery:[32],searchResults:[32],allRecords:[32],isLoading:[32],selectedItems:[32],showResults:[32],error:[32],highlightedIndex:[32],setAllRecords:[64],setSearchResults:[64],setLoading:[64]},null,{allRecords:[{allRecordsChanged:0}]}],[2,"mrd-text-field",{name:[1],label:[1],value:[1],placeholder:[1],required:[4],disabled:[4],locale:[1],error:[32]}],[2,"mrd-textarea-field",{name:[1],label:[1],value:[1],placeholder:[1],required:[4],disabled:[4],locale:[1],error:[32],editorReady:[32]}],[2,"mrd-time-field",{name:[1],label:[1],value:[1],required:[4],disabled:[4],locale:[1],error:[32]}]]]],e))));
1
+ import{p as e,b as l}from"./p-_tsCCkAi.js";export{s as setNonce}from"./p-_tsCCkAi.js";import{g as a}from"./p-DQuL1Twl.js";(()=>{const l=import.meta.url,a={};return""!==l&&(a.resourcesUrl=new URL(".",l).href),e(a)})().then((async e=>(await a(),l([["p-f6d0f02b",[[2,"mrd-form",{layout:[16],locale:[1],values:[16],referenceHref:[1,"reference-href"],referenceClass:[1,"reference-class"],showCancel:[4,"show-cancel"],formValues:[32],errors:[32],submitted:[32],setFieldValue:[64]},null,{values:[{valuesChanged:0}]}],[2,"mrd-layout-section",{items:[16],data:[16],views:[16],links:[16],locale:[1],searchQueryMap:[32],searchResultsMap:[32],imagePreviewUrl:[32],imagePreviews:[32],setSearchResults:[64],setViewPage:[64],setViewAggregations:[64],setImagePreview:[64],openImagePreview:[64]},null,{data:[{dataChanged:0}]}],[2,"mrd-field",{item:[16],locale:[1],value:[16]}],[2,"mrd-table",{item:[16],parentId:[1,"parent-id"],rows:[16],locale:[1],totalElements:[2,"total-elements"],pageSize:[2,"page-size"],rowHeight:[2,"row-height"],tableHeight:[2,"table-height"],activeViewIdx:[32],loadedPages:[32],requestedPages:[32],renderStart:[32],renderEnd:[32],colWidths:[32],sortField:[32],sortDir:[32],filterMode:[32],activeFilters:[32],openFilterCol:[32],pendingFilter:[32],popupPos:[32],scrollTop:[32],textblockModal:[32],jsonModal:[32],aggregations:[32],init:[64],setPage:[64],setAggregations:[64]},null,{totalElements:[{totalElementsChanged:0}],item:[{itemChanged:0}]}],[2,"mrd-boolean-field",{name:[1],label:[1],value:[4],required:[4],disabled:[4],locale:[1],checked:[32]}],[2,"mrd-currency-field",{name:[1],label:[1],value:[16],required:[4],disabled:[4],locale:[1],amountDisplay:[32],currency:[32],error:[32]}],[2,"mrd-date-field",{name:[1],label:[1],value:[1],required:[4],disabled:[4],locale:[1],error:[32]}],[2,"mrd-datetime-field",{name:[1],label:[1],value:[1],required:[4],disabled:[4],locale:[1],error:[32],localValue:[32]},null,{value:[{valueChanged:0}]}],[2,"mrd-email-field",{name:[1],label:[1],value:[1],placeholder:[1],required:[4],disabled:[4],locale:[1],error:[32]}],[2,"mrd-file-field",{name:[1],label:[1],value:[16],required:[4],disabled:[4],locale:[1],accept:[1],maxSize:[2,"max-size"],fileName:[32],isDragging:[32],uploading:[32],error:[32]},null,{value:[{valueChanged:0}]}],[2,"mrd-hyperlink-field",{name:[1],label:[1],value:[1],placeholder:[1],required:[4],disabled:[4],locale:[1],error:[32]}],[2,"mrd-image-field",{name:[1],label:[1],value:[16],required:[4],disabled:[4],locale:[1],accept:[1],maxSize:[2,"max-size"],previewUrl:[32],fileName:[32],isDragging:[32],uploading:[32],error:[32]},null,{value:[{valueChanged:0}]}],[2,"mrd-list-field",{name:[1],label:[1],value:[1],required:[4],disabled:[4],multiple:[4],locale:[1],listItems:[16],error:[32],selected:[32]}],[2,"mrd-longtext-field",{name:[1],label:[1],value:[1],placeholder:[1],required:[4],disabled:[4],locale:[1],error:[32]}],[2,"mrd-number-field",{name:[1],label:[1],value:[2],placeholder:[1],required:[4],disabled:[4],locale:[1],dataType:[1,"data-type"],decimalPrecision:[2,"decimal-precision"],displayValue:[32],error:[32]}],[2,"mrd-relation-field",{name:[1],label:[1],required:[4],disabled:[4],locale:[1],relatedClass:[1,"related-class"],mostSignificantClass:[1,"most-significant-class"],displayType:[1,"display-type"],editBehavior:[1,"edit-behavior"],commonRelation:[1,"common-relation"],multiple:[4],dropdownValues:[16],value:[1],searchQuery:[32],searchResults:[32],allRecords:[32],isLoading:[32],selectedItems:[32],showResults:[32],error:[32],highlightedIndex:[32],setAllRecords:[64],setSearchResults:[64],setLoading:[64]},null,{allRecords:[{allRecordsChanged:0}]}],[2,"mrd-text-field",{name:[1],label:[1],value:[1],placeholder:[1],required:[4],disabled:[4],locale:[1],error:[32]}],[2,"mrd-textarea-field",{name:[1],label:[1],value:[1],placeholder:[1],required:[4],disabled:[4],locale:[1],error:[32],editorReady:[32]}],[2,"mrd-time-field",{name:[1],label:[1],value:[1],required:[4],disabled:[4],locale:[1],error:[32]}]]]],e))));