@mmlogic/components 0.3.8 → 0.3.9

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.
Files changed (77) hide show
  1. package/dist/cjs/index.cjs.js +13 -0
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/mosterdcomponents.cjs.js +1 -1
  4. package/dist/cjs/{mrd-boolean-field_20.cjs.entry.js → mrd-boolean-field_22.cjs.entry.js} +504 -23
  5. package/dist/collection/collection-manifest.json +2 -0
  6. package/dist/collection/components/mrd-boolean-field/mrd-boolean-field.js +1 -1
  7. package/dist/collection/components/mrd-currency-field/mrd-currency-field.js +1 -1
  8. package/dist/collection/components/mrd-date-field/mrd-date-field.js +1 -1
  9. package/dist/collection/components/mrd-datetime-field/mrd-datetime-field.js +1 -1
  10. package/dist/collection/components/mrd-document-list/mrd-document-list.js +578 -0
  11. package/dist/collection/components/mrd-document-list/mrd-document-list.scss +126 -0
  12. package/dist/collection/components/mrd-document-view/mrd-document-view.js +177 -0
  13. package/dist/collection/components/mrd-document-view/mrd-document-view.scss +121 -0
  14. package/dist/collection/components/mrd-email-field/mrd-email-field.js +1 -1
  15. package/dist/collection/components/mrd-file-field/mrd-file-field.js +1 -1
  16. package/dist/collection/components/mrd-image-field/mrd-image-field.js +1 -1
  17. package/dist/collection/components/mrd-layout-section/mrd-layout-section.js +153 -15
  18. package/dist/collection/components/mrd-layout-section/mrd-layout-section.scss +46 -3
  19. package/dist/collection/components/mrd-longtext-field/mrd-longtext-field.js +1 -1
  20. package/dist/collection/components/mrd-number-field/mrd-number-field.js +1 -1
  21. package/dist/collection/components/mrd-secret-field/mrd-secret-field.js +2 -2
  22. package/dist/collection/components/mrd-text-field/mrd-text-field.js +1 -1
  23. package/dist/collection/components/mrd-textarea-field/mrd-textarea-field.js +1 -1
  24. package/dist/collection/components/mrd-time-field/mrd-time-field.js +1 -1
  25. package/dist/collection/dev/app.js +19 -2
  26. package/dist/collection/types/client-layout.js +10 -0
  27. package/dist/collection/utils/i18n.js +24 -0
  28. package/dist/components/client-layout.js +1 -1
  29. package/dist/components/format.js +1 -1
  30. package/dist/components/i18n.js +1 -1
  31. package/dist/components/index.js +1 -1
  32. package/dist/components/mrd-boolean-field2.js +1 -1
  33. package/dist/components/mrd-currency-field2.js +1 -1
  34. package/dist/components/mrd-date-field2.js +1 -1
  35. package/dist/components/mrd-datetime-field2.js +1 -1
  36. package/dist/components/mrd-document-list.d.ts +11 -0
  37. package/dist/components/mrd-document-list.js +1 -0
  38. package/dist/components/mrd-document-list2.js +1 -0
  39. package/dist/components/mrd-document-view.d.ts +11 -0
  40. package/dist/components/mrd-document-view.js +1 -0
  41. package/dist/components/mrd-document-view2.js +1 -0
  42. package/dist/components/mrd-email-field2.js +1 -1
  43. package/dist/components/mrd-file-field2.js +1 -1
  44. package/dist/components/mrd-image-field2.js +1 -1
  45. package/dist/components/mrd-layout-section.js +1 -1
  46. package/dist/components/mrd-longtext-field2.js +1 -1
  47. package/dist/components/mrd-number-field2.js +1 -1
  48. package/dist/components/mrd-secret-field2.js +1 -1
  49. package/dist/components/mrd-table2.js +1 -1
  50. package/dist/components/mrd-text-field2.js +1 -1
  51. package/dist/components/mrd-textarea-field2.js +1 -1
  52. package/dist/components/mrd-time-field2.js +1 -1
  53. package/dist/esm/index.js +11 -1
  54. package/dist/esm/loader.js +1 -1
  55. package/dist/esm/mosterdcomponents.js +1 -1
  56. package/dist/esm/{mrd-boolean-field_20.entry.js → mrd-boolean-field_22.entry.js} +504 -25
  57. package/dist/mosterdcomponents/index.esm.js +1 -1
  58. package/dist/mosterdcomponents/mosterdcomponents.css +1 -1
  59. package/dist/mosterdcomponents/mosterdcomponents.esm.js +1 -1
  60. package/dist/mosterdcomponents/p-b547291b.entry.js +1 -0
  61. package/dist/types/components/mrd-document-list/mrd-document-list.d.ts +108 -0
  62. package/dist/types/components/mrd-document-view/mrd-document-view.d.ts +36 -0
  63. package/dist/types/components/mrd-layout-section/mrd-layout-section.d.ts +33 -6
  64. package/dist/types/components.d.ts +290 -15
  65. package/dist/types/types/client-layout.d.ts +38 -0
  66. package/package.json +1 -1
  67. package/dist/mosterdcomponents/cell-renderer-CbRwLOo8.js.map +0 -1
  68. package/dist/mosterdcomponents/client-layout-D88nn5zf.js.map +0 -1
  69. package/dist/mosterdcomponents/format-BAfsQfy1.js.map +0 -1
  70. package/dist/mosterdcomponents/i18n-hoGGKbKU.js.map +0 -1
  71. package/dist/mosterdcomponents/index-6yQUNVww.js.map +0 -1
  72. package/dist/mosterdcomponents/index-I5SuYv7a.js.map +0 -1
  73. package/dist/mosterdcomponents/index.esm.js.map +0 -1
  74. package/dist/mosterdcomponents/mosterdcomponents.esm.js.map +0 -1
  75. package/dist/mosterdcomponents/p-7bfaee51.entry.js +0 -1
  76. package/dist/mosterdcomponents/quill-C9pgw_k-.js.map +0 -1
  77. package/dist/mosterdcomponents/validation-ixb43cqU.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  import { Host, h } from "@stencil/core";
2
- import { ClientLayoutItemType, ClientLayoutItemFieldDataType, } from "../../types/client-layout";
2
+ import { ClientLayoutItemType, ClientLayoutItemFieldDataType, resolveArchetype, ARCHETYPE_DOCUMENT, } from "../../types/client-layout";
3
3
  import { CellRenderer } from "../../utils/cell-renderer";
4
4
  import { t } from "../../utils/i18n";
5
5
  import { formatDate } from "../../utils/format";
@@ -14,11 +14,16 @@ export class MrdLayoutSection {
14
14
  /** Legacy: top-level _links from ClientDashboardMetadata. Not needed in new flat format. */
15
15
  this.links = {};
16
16
  this.locale = navigator.language;
17
+ /** Top-level archetypes on the object dashboard. When it contains commons.document,
18
+ * the record is rendered as a single-document view instead of generic fields. */
19
+ this.archetypes = [];
17
20
  this.searchQueryMap = {};
18
21
  this.searchResultsMap = {};
19
22
  this.imagePreviewUrl = null;
20
23
  this.imagePreviews = {};
21
24
  this.openHistoryField = null;
25
+ /** Per-view display mode for document collection views. Default 'tree'. */
26
+ this.docViewMode = {};
22
27
  this.historyClickOutside = null;
23
28
  this.searchTimers = {};
24
29
  this.handleViewLoadPage = (e, name) => {
@@ -102,11 +107,18 @@ export class MrdLayoutSection {
102
107
  }
103
108
  }
104
109
  /**
105
- * Inject data into an embedded mrd-table for a RELATED_VIEW or VIEW item.
106
- * Pass totalElements to update the pagination total (safe to pass on every page).
107
- * Pass hasNext (from _links.next presence) so the table can decide whether to emit aggregations.
110
+ * Inject rows for a VIEW / RELATED_VIEW item.
111
+ * - Table view: injects the page into the embedded mrd-table (pass totalElements/hasNext).
112
+ * - Document view: pass `nodeId` to route the rows to that folder node in the embedded
113
+ * mrd-document-list. Folder loading is just a filtered list load, so it reuses this method.
108
114
  */
109
- async setViewPage(name, page, rows, totalElements, hasNext) {
115
+ async setViewPage(name, page, rows, totalElements, hasNext, nodeId) {
116
+ if (nodeId) {
117
+ const list = this.el.querySelector(`mrd-document-list[data-doclist="${name}"]`);
118
+ if (list === null || list === void 0 ? void 0 : list.setDocuments)
119
+ await list.setDocuments(nodeId, rows);
120
+ return;
121
+ }
110
122
  const table = this.el.querySelector(`mrd-table[data-view="${name}"]`);
111
123
  if (!table)
112
124
  return;
@@ -122,6 +134,12 @@ export class MrdLayoutSection {
122
134
  return;
123
135
  await table.setAggregations(data);
124
136
  }
137
+ /** Inject distinct values into an embedded mrd-document-list for a document view. */
138
+ async setViewDistinct(name, nodeId, values) {
139
+ const list = this.el.querySelector(`mrd-document-list[data-doclist="${name}"]`);
140
+ if (list === null || list === void 0 ? void 0 : list.setDistinct)
141
+ await list.setDistinct(nodeId, values);
142
+ }
125
143
  /** Provide a resolved URL for an IMAGE field. Shows as thumbnail; clicking opens the lightbox. */
126
144
  async setImagePreview(fieldName, url) {
127
145
  this.imagePreviews = Object.assign(Object.assign({}, this.imagePreviews), { [fieldName]: url });
@@ -270,7 +288,7 @@ export class MrdLayoutSection {
270
288
  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)))))))));
271
289
  }
272
290
  renderRelatedView(item) {
273
- var _a, _b, _c, _d, _e, _f;
291
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
274
292
  const key = this.viewKeyFor(item);
275
293
  if (!key)
276
294
  return null;
@@ -280,7 +298,32 @@ export class MrdLayoutSection {
280
298
  // Extract parentId from data._links.self.href for RELATED_VIEW path construction
281
299
  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 : '';
282
300
  const parentId = (_f = selfHref.split('/').filter(Boolean).pop()) !== null && _f !== void 0 ? _f : '';
283
- 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) => {
301
+ // The API publishes `archetypes` on the VIEW/RELATED_VIEW item itself
302
+ // (sibling of `view`), not inside `view`.
303
+ const docArchetype = resolveArchetype((_g = item.archetypes) !== null && _g !== void 0 ? _g : (_h = item.view) === null || _h === void 0 ? void 0 : _h.archetypes, ARCHETYPE_DOCUMENT);
304
+ const mode = (_j = this.docViewMode[key]) !== null && _j !== void 0 ? _j : 'tree';
305
+ 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), docArchetype && this.renderDocToolbar(key, mode), docArchetype && mode === 'tree'
306
+ ? this.renderDocumentList(item, key, parentId, docArchetype)
307
+ : this.renderTable(item, key, parentId)));
308
+ }
309
+ /** Tree / list segmented toggle for document collection views (+ upload placeholder). */
310
+ renderDocToolbar(key, mode) {
311
+ return (h("div", { class: "mrd-layout-section__doc-toolbar" }, h("div", { class: "mrd-layout-section__seg", role: "group", "aria-label": t('doc_view_switch', this.locale) }, h("button", { class: "mrd-layout-section__seg-btn", "aria-pressed": String(mode === 'tree'), title: t('doc_view_tree', this.locale), "aria-label": t('doc_view_tree', this.locale), onClick: () => { this.docViewMode = Object.assign(Object.assign({}, this.docViewMode), { [key]: 'tree' }); } }, h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true" }, h("path", { d: "M3 5h6M3 12h9M3 19h6" }), h("circle", { cx: "18", cy: "5", r: "1.6" }), h("circle", { cx: "18", cy: "19", r: "1.6" }), h("path", { d: "M16 12h4" }))), h("button", { class: "mrd-layout-section__seg-btn", "aria-pressed": String(mode === 'list'), title: t('doc_view_list', this.locale), "aria-label": t('doc_view_list', this.locale), onClick: () => { this.docViewMode = Object.assign(Object.assign({}, this.docViewMode), { [key]: 'list' }); } }, h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true" }, h("path", { d: "M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01" }))))));
312
+ }
313
+ renderDocumentList(item, key, parentId, archetype) {
314
+ return (h("mrd-document-list", { "data-doclist": key, item: item, archetype: archetype, parentId: parentId, locale: this.locale, onMrdLoadDistinct: (e) => {
315
+ e.stopPropagation();
316
+ this.mrdLoadViewDistinct.emit(Object.assign({ name: key }, e.detail));
317
+ }, onMrdLoadPage: (e) => {
318
+ e.stopPropagation();
319
+ this.mrdLoadViewPage.emit(Object.assign({ name: key }, e.detail));
320
+ }, onMrdNavigate: (e) => {
321
+ e.stopPropagation();
322
+ this.mrdNavigate.emit(e.detail);
323
+ } }));
324
+ }
325
+ renderTable(item, key, parentId) {
326
+ return (h("mrd-table", { "data-view": key, item: item, parentId: parentId, locale: this.locale, onMrdLoadPage: (e) => this.handleViewLoadPage(e, key), onMrdLoadAggregations: (e) => {
284
327
  var _a;
285
328
  e.stopPropagation();
286
329
  this.mrdLoadViewAggregations.emit(Object.assign({ name: key, dataClass: (_a = item.dataClass) !== null && _a !== void 0 ? _a : key }, e.detail));
@@ -301,7 +344,7 @@ export class MrdLayoutSection {
301
344
  parentPath: e.detail.parentPath,
302
345
  basicType: e.detail.basicType,
303
346
  });
304
- } })));
347
+ } }));
305
348
  }
306
349
  renderItem(item) {
307
350
  var _a, _b;
@@ -333,8 +376,23 @@ export class MrdLayoutSection {
333
376
  return null;
334
377
  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: "" }))));
335
378
  }
379
+ /** Single-document view: the record's own type carries commons.document. Renders
380
+ * a recognisable document instead of generic fields, keeping any related views/
381
+ * searches below it. */
382
+ renderDocumentObject(archetype) {
383
+ const related = this.items.filter(it => it.type === ClientLayoutItemType.VIEW ||
384
+ it.type === ClientLayoutItemType.RELATED_VIEW ||
385
+ it.type === ClientLayoutItemType.SEARCH);
386
+ return [
387
+ h("mrd-document-view", { archetype: archetype, data: this.data, locale: this.locale, onMrdNavigate: (e) => { e.stopPropagation(); this.mrdNavigate.emit(e.detail); }, onMrdDownload: (e) => { e.stopPropagation(); this.mrdDownload.emit(e.detail); } }),
388
+ ...related.map(it => this.renderItem(it)),
389
+ ];
390
+ }
336
391
  render() {
337
- return (h(Host, { key: '39d21b05016b901ff73a90dc0c6ef04cc30b4d42' }, h("div", { key: '546d956676d66438930665e97c2ed618fb8d1d4c', class: "mrd-layout-section" }, this.items.map(item => this.renderItem(item))), this.renderImageModal()));
392
+ const docArchetype = resolveArchetype(this.archetypes, ARCHETYPE_DOCUMENT);
393
+ return (h(Host, { key: '4fbba410f9b8cab2bf21497467f99ff25f109bcc' }, h("div", { key: '679d2c34f1eaff694873ba18d679cbccecdae1a6', class: "mrd-layout-section" }, docArchetype
394
+ ? this.renderDocumentObject(docArchetype)
395
+ : this.items.map(item => this.renderItem(item))), this.renderImageModal()));
338
396
  }
339
397
  static get is() { return "mrd-layout-section"; }
340
398
  static get encapsulation() { return "scoped"; }
@@ -469,6 +527,31 @@ export class MrdLayoutSection {
469
527
  "reflect": false,
470
528
  "attribute": "locale",
471
529
  "defaultValue": "navigator.language"
530
+ },
531
+ "archetypes": {
532
+ "type": "unknown",
533
+ "mutable": false,
534
+ "complexType": {
535
+ "original": "ClientArchetype[]",
536
+ "resolved": "ClientArchetype[]",
537
+ "references": {
538
+ "ClientArchetype": {
539
+ "location": "import",
540
+ "path": "../../types/client-layout",
541
+ "id": "src/types/client-layout.ts::ClientArchetype",
542
+ "referenceLocation": "ClientArchetype"
543
+ }
544
+ }
545
+ },
546
+ "required": false,
547
+ "optional": false,
548
+ "docs": {
549
+ "tags": [],
550
+ "text": "Top-level archetypes on the object dashboard. When it contains commons.document,\nthe record is rendered as a single-document view instead of generic fields."
551
+ },
552
+ "getter": false,
553
+ "setter": false,
554
+ "defaultValue": "[]"
472
555
  }
473
556
  };
474
557
  }
@@ -478,7 +561,8 @@ export class MrdLayoutSection {
478
561
  "searchResultsMap": {},
479
562
  "imagePreviewUrl": {},
480
563
  "imagePreviews": {},
481
- "openHistoryField": {}
564
+ "openHistoryField": {},
565
+ "docViewMode": {}
482
566
  };
483
567
  }
484
568
  static get events() {
@@ -542,11 +626,11 @@ export class MrdLayoutSection {
542
626
  "composed": true,
543
627
  "docs": {
544
628
  "tags": [],
545
- "text": "Re-emitted from an embedded mrd-table's mrdLoadPage; host fetches the next page and calls setViewPage()."
629
+ "text": "Re-emitted from an embedded mrd-table's or mrd-document-list's mrdLoadPage; host fetches the\nrows and calls setViewPage(). `nodeId` is present for a document-list folder load."
546
630
  },
547
631
  "complexType": {
548
- "original": "{ name: string; page: number; sort: string; path: string; qs: string }",
549
- "resolved": "{ name: string; page: number; sort: string; path: string; qs: string; }",
632
+ "original": "{ name: string; page: number; sort: string; path: string; qs: string; nodeId?: string }",
633
+ "resolved": "{ name: string; page: number; sort: string; path: string; qs: string; nodeId?: string | undefined; }",
550
634
  "references": {}
551
635
  }
552
636
  }, {
@@ -594,6 +678,21 @@ export class MrdLayoutSection {
594
678
  "resolved": "{ name: string; dataClass: string; path: string; qs: string; aggQs: string; }",
595
679
  "references": {}
596
680
  }
681
+ }, {
682
+ "method": "mrdLoadViewDistinct",
683
+ "name": "mrdLoadViewDistinct",
684
+ "bubbles": true,
685
+ "cancelable": true,
686
+ "composed": true,
687
+ "docs": {
688
+ "tags": [],
689
+ "text": "Re-emitted from an embedded mrd-document-list's mrdLoadDistinct; host fetches distinct values and calls setViewDistinct()."
690
+ },
691
+ "complexType": {
692
+ "original": "{ name: string; nodeId: string; distinct: string; path: string; qs: string }",
693
+ "resolved": "{ name: string; nodeId: string; distinct: string; path: string; qs: string; }",
694
+ "references": {}
695
+ }
597
696
  }];
598
697
  }
599
698
  static get methods() {
@@ -631,7 +730,7 @@ export class MrdLayoutSection {
631
730
  },
632
731
  "setViewPage": {
633
732
  "complexType": {
634
- "signature": "(name: string, page: number, rows: any[], totalElements?: number, hasNext?: boolean) => Promise<void>",
733
+ "signature": "(name: string, page: number, rows: any[], totalElements?: number, hasNext?: boolean, nodeId?: string) => Promise<void>",
635
734
  "parameters": [{
636
735
  "name": "name",
637
736
  "type": "string",
@@ -652,6 +751,10 @@ export class MrdLayoutSection {
652
751
  "name": "hasNext",
653
752
  "type": "boolean | undefined",
654
753
  "docs": ""
754
+ }, {
755
+ "name": "nodeId",
756
+ "type": "string | undefined",
757
+ "docs": ""
655
758
  }],
656
759
  "references": {
657
760
  "Promise": {
@@ -662,7 +765,7 @@ export class MrdLayoutSection {
662
765
  "return": "Promise<void>"
663
766
  },
664
767
  "docs": {
665
- "text": "Inject data into an embedded mrd-table for a RELATED_VIEW or VIEW item.\nPass totalElements to update the pagination total (safe to pass on every page).\nPass hasNext (from _links.next presence) so the table can decide whether to emit aggregations.",
768
+ "text": "Inject rows for a VIEW / RELATED_VIEW item.\n- Table view: injects the page into the embedded mrd-table (pass totalElements/hasNext).\n- Document view: pass `nodeId` to route the rows to that folder node in the embedded\n mrd-document-list. Folder loading is just a filtered list load, so it reuses this method.",
666
769
  "tags": []
667
770
  }
668
771
  },
@@ -691,6 +794,41 @@ export class MrdLayoutSection {
691
794
  "tags": []
692
795
  }
693
796
  },
797
+ "setViewDistinct": {
798
+ "complexType": {
799
+ "signature": "(name: string, nodeId: string, values: DistinctValue[]) => Promise<void>",
800
+ "parameters": [{
801
+ "name": "name",
802
+ "type": "string",
803
+ "docs": ""
804
+ }, {
805
+ "name": "nodeId",
806
+ "type": "string",
807
+ "docs": ""
808
+ }, {
809
+ "name": "values",
810
+ "type": "DistinctValue[]",
811
+ "docs": ""
812
+ }],
813
+ "references": {
814
+ "Promise": {
815
+ "location": "global",
816
+ "id": "global::Promise"
817
+ },
818
+ "DistinctValue": {
819
+ "location": "import",
820
+ "path": "../mrd-document-list/mrd-document-list",
821
+ "id": "src/components/mrd-document-list/mrd-document-list.tsx::DistinctValue",
822
+ "referenceLocation": "DistinctValue"
823
+ }
824
+ },
825
+ "return": "Promise<void>"
826
+ },
827
+ "docs": {
828
+ "text": "Inject distinct values into an embedded mrd-document-list for a document view.",
829
+ "tags": []
830
+ }
831
+ },
694
832
  "setImagePreview": {
695
833
  "complexType": {
696
834
  "signature": "(fieldName: string, url: string) => Promise<void>",
@@ -250,13 +250,12 @@
250
250
  }
251
251
 
252
252
  .mrd-layout-section__group-title {
253
- font-size: var(--mrd-font-size-sm);
253
+ font-size: var(--mrd-font-size-xs);
254
254
  font-weight: var(--mrd-font-weight-semibold);
255
255
  color: var(--mrd-color-neutral-500);
256
256
  margin: 0 0 var(--mrd-space-2) 0;
257
257
  padding-bottom: 0;
258
- text-transform: uppercase;
259
- letter-spacing: 0.05em;
258
+ letter-spacing: 0.01em;
260
259
  }
261
260
 
262
261
  .mrd-layout-section__related-view {
@@ -270,6 +269,50 @@
270
269
  margin: 0 0 var(--mrd-space-3) 0;
271
270
  }
272
271
 
272
+ .mrd-layout-section__doc-toolbar {
273
+ display: flex;
274
+ align-items: center;
275
+ justify-content: flex-end;
276
+ gap: var(--mrd-space-2);
277
+ padding: var(--mrd-space-2) 0;
278
+ }
279
+
280
+ .mrd-layout-section__seg {
281
+ display: inline-flex;
282
+ gap: 2px;
283
+ padding: 2px;
284
+ background: var(--mrd-color-neutral-100);
285
+ border-radius: var(--mrd-border-radius);
286
+ }
287
+
288
+ .mrd-layout-section__seg-btn {
289
+ width: 1.875rem;
290
+ height: 1.625rem;
291
+ display: grid;
292
+ place-items: center;
293
+ border: none;
294
+ background: none;
295
+ border-radius: var(--mrd-border-radius-sm);
296
+ color: var(--mrd-color-neutral-500);
297
+ cursor: pointer;
298
+ transition: color var(--mrd-transition-fast), background var(--mrd-transition-fast);
299
+ }
300
+
301
+ .mrd-layout-section__seg-btn:hover {
302
+ color: var(--mrd-color-neutral-800);
303
+ }
304
+
305
+ .mrd-layout-section__seg-btn[aria-pressed='true'] {
306
+ background: var(--mrd-color-white);
307
+ color: var(--mrd-color-primary-dark);
308
+ box-shadow: var(--mrd-shadow-sm);
309
+ }
310
+
311
+ .mrd-layout-section__seg-btn svg {
312
+ width: 1rem;
313
+ height: 1rem;
314
+ }
315
+
273
316
  .mrd-layout-section__search {
274
317
  position: relative;
275
318
  margin: var(--mrd-space-2) 0;
@@ -28,7 +28,7 @@ export class MrdLongtextField {
28
28
  }
29
29
  render() {
30
30
  const hasError = !!this.error;
31
- return (h(Host, { key: '10d998b80f54cf7b10be26bf451d808c78579e69' }, h("div", { key: 'af45fe94a41f668bf6ddca670b42e065ee83ef23', class: "mrd-longtext-field" }, this.label && (h("label", { key: '31a08490d695ac9f4bbe5dff6a1ae3bb2a94337d', class: `mrd-longtext-field__label${this.required ? ' mrd-longtext-field__label--required' : ''}` }, this.label)), this.disabled ? (h("pre", { class: "mrd-longtext-field__content" }, this.value)) : (h("textarea", { class: `mrd-longtext-field__input${hasError ? ' mrd-longtext-field__input--error' : ''}`, name: this.name, placeholder: this.placeholder, required: this.required, rows: 10, onInput: this.handleInput, onBlur: this.handleBlur }, this.value)), hasError && h("span", { key: '7f133e72a882a8aaf33245445829754da1e6377b', class: "mrd-longtext-field__error" }, this.error))));
31
+ return (h(Host, { key: '624be9369a37f0901ada13bd0e8a3bb8b40f54c8' }, h("div", { key: '6544e7b10af59a5628a119d5ea907fb968f21d42', class: "mrd-longtext-field" }, this.label && (h("label", { key: 'd56386e3fc2984b522bcbf5ec6908e044ed6f3d3', class: `mrd-longtext-field__label${this.required ? ' mrd-longtext-field__label--required' : ''}` }, this.label)), this.disabled ? (h("pre", { class: "mrd-longtext-field__content" }, this.value)) : (h("textarea", { class: `mrd-longtext-field__input${hasError ? ' mrd-longtext-field__input--error' : ''}`, name: this.name, placeholder: this.placeholder, required: this.required, rows: 10, onInput: this.handleInput, onBlur: this.handleBlur }, this.value)), hasError && h("span", { key: '9423d70dec9c6439cc629746f1038a61a14da5e4', class: "mrd-longtext-field__error" }, this.error))));
32
32
  }
33
33
  static get is() { return "mrd-longtext-field"; }
34
34
  static get encapsulation() { return "scoped"; }
@@ -69,7 +69,7 @@ export class MrdNumberField {
69
69
  const hasError = !!this.error;
70
70
  const suffix = this.dataType === ClientLayoutItemFieldDataType.PERCENTAGE ? '%' :
71
71
  this.dataType === ClientLayoutItemFieldDataType.DECIMAL ? '' : '';
72
- return (h(Host, { key: '195beed4d6453597320b79654feaabe8f742eff2' }, h("div", { key: 'c641d7a4d27ba28dd34acda98d38f245945d20bb', class: "mrd-number-field" }, this.label && (h("label", { key: '2a5f6eb48889a3ab0aa76d6b2ca5d59b20625bb2', class: `mrd-number-field__label${this.required ? ' mrd-number-field__label--required' : ''}` }, this.label)), h("div", { key: 'a844b89e6a278629a8aefa4ac72e5e18e5904cab', class: "mrd-number-field__input-wrapper" }, h("input", { key: '1ce9c3d67b458601a0de95b3b8478ef05df73069', class: `mrd-number-field__input${hasError ? ' mrd-number-field__input--error' : ''}`, type: "text", inputMode: "decimal", name: this.name, value: this.displayValue, placeholder: this.placeholder || (suffix ? `0${suffix}` : '0'), required: this.required, disabled: this.disabled, onInput: this.handleInput, onBlur: this.handleBlur, onFocus: this.handleFocus })), hasError && h("span", { key: '4226614a65a8d27543d1287e2c1f61f67c427e63', class: "mrd-number-field__error" }, this.error))));
72
+ return (h(Host, { key: '2c844e94a7cbb3fcf33f9552329443260e9490ab' }, h("div", { key: 'b87bdc2a17552e74b27d6da16e4db9bfd2f7e4ac', class: "mrd-number-field" }, this.label && (h("label", { key: '4aca381054b0ce27c94a9a7c779642d44dbbebcc', class: `mrd-number-field__label${this.required ? ' mrd-number-field__label--required' : ''}` }, this.label)), h("div", { key: 'b7e8d122bfbd92152ce44a7ba56222425eed73f9', class: "mrd-number-field__input-wrapper" }, h("input", { key: '906330075f0b8a50ff45344e865217fd1938f199', class: `mrd-number-field__input${hasError ? ' mrd-number-field__input--error' : ''}`, type: "text", inputMode: "decimal", name: this.name, value: this.displayValue, placeholder: this.placeholder || (suffix ? `0${suffix}` : '0'), required: this.required, disabled: this.disabled, onInput: this.handleInput, onBlur: this.handleBlur, onFocus: this.handleFocus })), hasError && h("span", { key: '5f56d6f2e0a878703f35d50b1932a39a82dace3b', class: "mrd-number-field__error" }, this.error))));
73
73
  }
74
74
  static get is() { return "mrd-number-field"; }
75
75
  static get encapsulation() { return "scoped"; }
@@ -28,9 +28,9 @@ export class MrdSecretField {
28
28
  }
29
29
  render() {
30
30
  const hasError = !!this.error;
31
- return (h(Host, { key: '08f1aa9d8ab9f4e41abb6d3286e5e383427a5409' }, h("div", { key: 'fabe38aa130e211cea81f2c2f227bc15ad3ebf7d', class: "mrd-secret-field" }, this.label && (h("label", { key: '69af8844eff8ce84daa622635c79130fb491eb0b', class: `mrd-secret-field__label${this.required ? ' mrd-secret-field__label--required' : ''}` }, this.label)), this.disabled
31
+ return (h(Host, { key: 'e0d516f7e76c1fab5441567cc371569a8eab07f8' }, h("div", { key: 'fac6fb517a0f37560429c828251f7db3841d3301', class: "mrd-secret-field" }, this.label && (h("label", { key: 'b2dd3189f2fcf3fd3feea741a39dbd5c3f4d437f', class: `mrd-secret-field__label${this.required ? ' mrd-secret-field__label--required' : ''}` }, this.label)), this.disabled
32
32
  ? (h("span", { class: "mrd-secret-field__masked", "aria-label": this.label }, this.value ? '••••••••' : ''))
33
- : (h("input", { class: `mrd-secret-field__input${hasError ? ' mrd-secret-field__input--error' : ''}`, type: "password", name: this.name, value: this.value, placeholder: this.placeholder, required: this.required, autocomplete: "new-password", onInput: this.handleInput, onBlur: this.handleBlur })), hasError && h("span", { key: 'e602004f0bb10916d1015e3c2b003523a292997c', class: "mrd-secret-field__error" }, this.error))));
33
+ : (h("input", { class: `mrd-secret-field__input${hasError ? ' mrd-secret-field__input--error' : ''}`, type: "password", name: this.name, value: this.value, placeholder: this.placeholder, required: this.required, autocomplete: "new-password", onInput: this.handleInput, onBlur: this.handleBlur })), hasError && h("span", { key: 'dbd6667d7f2c6ed26220ac83a46235cf3ad777d7', class: "mrd-secret-field__error" }, this.error))));
34
34
  }
35
35
  static get is() { return "mrd-secret-field"; }
36
36
  static get encapsulation() { return "scoped"; }
@@ -28,7 +28,7 @@ export class MrdTextField {
28
28
  }
29
29
  render() {
30
30
  const hasError = !!this.error;
31
- return (h(Host, { key: 'fd4e1f389cb452ab80a1e1c7295d884ca935999e' }, h("div", { key: '7b7bde7a18fcd9b8d5779daab88ddabb45dd8692', class: "mrd-text-field" }, this.label && (h("label", { key: '8e2ad4053473cfad4eae4c4634b863ac5ef32fea', class: `mrd-text-field__label${this.required ? ' mrd-text-field__label--required' : ''}` }, this.label)), h("input", { key: 'd32712a6dc2aee4691bc4a580d5ca2ad81e0ff9f', class: `mrd-text-field__input${hasError ? ' mrd-text-field__input--error' : ''}`, type: "text", name: this.name, value: this.value, placeholder: this.placeholder, required: this.required, disabled: this.disabled, onInput: this.handleInput, onBlur: this.handleBlur }), hasError && h("span", { key: '31585dbf82020c81834e1eeada5cd9907a5ead56', class: "mrd-text-field__error" }, this.error))));
31
+ return (h(Host, { key: '124c46a83d30993aed5045eda42134d5c28ec989' }, h("div", { key: '5497fab2938f875fe9b4cd539a9feaaf907007e1', class: "mrd-text-field" }, this.label && (h("label", { key: '4d43255f45de8e7c4596a211797403479d2240b6', class: `mrd-text-field__label${this.required ? ' mrd-text-field__label--required' : ''}` }, this.label)), h("input", { key: 'df3d61fc60e41731e9783dc4484f3c3ca3ea8b13', class: `mrd-text-field__input${hasError ? ' mrd-text-field__input--error' : ''}`, type: "text", name: this.name, value: this.value, placeholder: this.placeholder, required: this.required, disabled: this.disabled, onInput: this.handleInput, onBlur: this.handleBlur }), hasError && h("span", { key: '9bf08d3a77d7616674caf3325b6598490f2d50fc', class: "mrd-text-field__error" }, this.error))));
32
32
  }
33
33
  static get is() { return "mrd-text-field"; }
34
34
  static get encapsulation() { return "scoped"; }
@@ -66,7 +66,7 @@ export class MrdTextareaField {
66
66
  }
67
67
  }
68
68
  render() {
69
- return (h(Host, { key: 'e1fd819c598f01e3986946357ec18d608f2c7adc' }, h("div", { key: '20c28e54e61429655b2d4f297bd84e183ad7e971', class: "mrd-textarea-field" }, this.label && (h("label", { key: 'fa46a20badc35c931563600f24a32e0a8c8c07ad', class: `mrd-textarea-field__label${this.required ? ' mrd-textarea-field__label--required' : ''}` }, this.label)), h("div", { key: 'ee928eca0a1b85401b346b7fae8adbe9214a7664', class: `mrd-textarea-field__container${this.error ? ' mrd-textarea-field__container--error' : ''}` }, h("div", { key: '89b00f3c526623c47f0aff7ad862f70dfdc2fe15', class: "mrd-textarea-field__editor" })), this.error && h("span", { key: '458cf8fddee36ddbc384ce4d25765e5aacd3c9d5', class: "mrd-textarea-field__error" }, this.error))));
69
+ return (h(Host, { key: '2413906076dee3f48118d44574dadd36bcedadfe' }, h("div", { key: '59e369a54e906b09a1062c7c5f701b8bbd631479', class: "mrd-textarea-field" }, this.label && (h("label", { key: 'd400c499eb6e35581fc2af9d372917287fcc60eb', class: `mrd-textarea-field__label${this.required ? ' mrd-textarea-field__label--required' : ''}` }, this.label)), h("div", { key: '62765821b5280e71918db0d070a136ef07e1eecd', class: `mrd-textarea-field__container${this.error ? ' mrd-textarea-field__container--error' : ''}` }, h("div", { key: 'f41b73291542d4582c492bce0a89240a171aba32', class: "mrd-textarea-field__editor" })), this.error && h("span", { key: 'eaba5b735be7aa8deebfbc46eac03be970bb1d13', class: "mrd-textarea-field__error" }, this.error))));
70
70
  }
71
71
  static get is() { return "mrd-textarea-field"; }
72
72
  static get encapsulation() { return "scoped"; }
@@ -27,7 +27,7 @@ export class MrdTimeField {
27
27
  }
28
28
  render() {
29
29
  const hasError = !!this.error;
30
- return (h(Host, { key: 'c507996709437d8982f9175b286e25598997002d' }, h("div", { key: 'd5f1b7f14d26cae8298cd40491898b39044158f8', class: "mrd-time-field" }, this.label && (h("label", { key: '10976e18df09240e00b045314c4ddd3845d4bfdc', class: `mrd-time-field__label${this.required ? ' mrd-time-field__label--required' : ''}` }, this.label)), h("input", { key: 'bc557333f107a371a7005f9b56dd0395190e63d7', class: `mrd-time-field__input${hasError ? ' mrd-time-field__input--error' : ''}`, type: "time", name: this.name, value: this.value, required: this.required, disabled: this.disabled, onChange: this.handleChange, onBlur: this.handleBlur }), hasError && h("span", { key: 'b5a09c2aa063fa9e2fc3aba411e86b57d879c408', class: "mrd-time-field__error" }, this.error))));
30
+ return (h(Host, { key: 'e93a6492a7bdc17f04f5aac0b8ecd63435a6280f' }, h("div", { key: 'b9692c11f21ccd354ba5475e1a60e6afc8ead22e', class: "mrd-time-field" }, this.label && (h("label", { key: '668492f16b6b96065fe65204a4f053c2ef2796e5', class: `mrd-time-field__label${this.required ? ' mrd-time-field__label--required' : ''}` }, this.label)), h("input", { key: 'bd2df39240c42b4a337554b0747c7b89eb5d8760', class: `mrd-time-field__input${hasError ? ' mrd-time-field__input--error' : ''}`, type: "time", name: this.name, value: this.value, required: this.required, disabled: this.disabled, onChange: this.handleChange, onBlur: this.handleBlur }), hasError && h("span", { key: '19a81211f3b630436a379f785768d28ffa01c12c', class: "mrd-time-field__error" }, this.error))));
31
31
  }
32
32
  static get is() { return "mrd-time-field"; }
33
33
  static get encapsulation() { return "scoped"; }
@@ -379,17 +379,21 @@ async function renderSection(index) {
379
379
  section.items = layout.items;
380
380
  section.data = _dashboardRecord ?? { _links: _dashboardData._links ?? {} };
381
381
  section.locale = _locale;
382
+ // Dashboard-level archetypes describe the object itself → single-document view.
383
+ // Only apply to the main object layout, not tab-page (related) layouts.
384
+ section.archetypes = (!layout.tabPage && _dashboardData.archetypes) ? _dashboardData.archetypes : [];
382
385
 
383
386
  section.addEventListener('mrdLoadViewPage', async (e) => {
384
387
  if (generation !== _sectionGeneration) return;
385
- const { name, page, path, qs } = e.detail;
388
+ const { name, page, path, qs, nodeId } = e.detail;
386
389
  logEvent('mrdLoadViewPage', e.detail);
387
390
  try {
388
391
  const url = `${_baseHref}${path}${qs ? '?' + qs : ''}`;
389
392
  const result = await apiFetchPage(authGetToken(), url, page);
390
393
  const rows = Object.values(result._embedded ?? {})[0] ?? [];
391
394
  const total = result.page?.totalElements;
392
- await section.setViewPage(name, page, rows, total);
395
+ // nodeId present document-list folder load; routed to the tree node.
396
+ await section.setViewPage(name, page, rows, total, undefined, nodeId);
393
397
  } catch (err) {
394
398
  console.error('[mrdLoadViewPage] mislukt', name, err);
395
399
  }
@@ -408,6 +412,19 @@ async function renderSection(index) {
408
412
  }
409
413
  });
410
414
 
415
+ section.addEventListener('mrdLoadViewDistinct', async (e) => {
416
+ if (generation !== _sectionGeneration) return;
417
+ const { name, nodeId, path, qs } = e.detail;
418
+ logEvent('mrdLoadViewDistinct', e.detail);
419
+ try {
420
+ const url = `${_baseHref}${path}${qs ? '?' + qs : ''}`;
421
+ const result = await apiRequest('GET', url, authGetToken());
422
+ if (result.ok) await section.setViewDistinct(name, nodeId, result.body?.values ?? []);
423
+ } catch (err) {
424
+ console.error('[mrdLoadViewDistinct] mislukt', name, err);
425
+ }
426
+ });
427
+
411
428
  section.addEventListener('mrdViewAction', async (e) => {
412
429
  logEvent('mrdViewAction', e.detail);
413
430
  const { action, dataClass } = e.detail;
@@ -62,3 +62,13 @@ export var ClientLayoutItemRelationEditBehavior;
62
62
  ClientLayoutItemRelationEditBehavior["DROPDOWN"] = "DROPDOWN";
63
63
  ClientLayoutItemRelationEditBehavior["CHECKBOX"] = "CHECKBOX";
64
64
  })(ClientLayoutItemRelationEditBehavior || (ClientLayoutItemRelationEditBehavior = {}));
65
+ /** Well-known archetype ids the client renders specially. */
66
+ export const ARCHETYPE_DOCUMENT = 'commons.document';
67
+ /**
68
+ * Find a binding for `archetypeId` in a published `archetypes` list.
69
+ * Returns `undefined` when the archetype is absent — callers fall back to the
70
+ * generic table/field rendering.
71
+ */
72
+ export function resolveArchetype(archetypes, archetypeId) {
73
+ return (archetypes !== null && archetypes !== void 0 ? archetypes : []).find(a => a.archetype === archetypeId);
74
+ }
@@ -32,6 +32,9 @@ const translations = {
32
32
  table_filter_clear_all: 'Alle filters wissen',
33
33
  table_new_record: 'Nieuw record',
34
34
  table_export_excel: 'Exporteer naar Excel',
35
+ doc_view_switch: 'Weergave wisselen',
36
+ doc_view_tree: 'Boomweergave',
37
+ doc_view_list: 'Lijstweergave',
35
38
  // mrd-table filter popup
36
39
  filter_sorting: 'Sortering',
37
40
  filter_ascending: 'Oplopend',
@@ -95,6 +98,9 @@ const translations = {
95
98
  table_filter_clear_all: 'Clear all filters',
96
99
  table_new_record: 'New record',
97
100
  table_export_excel: 'Export to Excel',
101
+ doc_view_switch: 'Switch view',
102
+ doc_view_tree: 'Tree view',
103
+ doc_view_list: 'List view',
98
104
  // mrd-table filter popup
99
105
  filter_sorting: 'Sorting',
100
106
  filter_ascending: 'Ascending',
@@ -158,6 +164,9 @@ const translations = {
158
164
  table_filter_clear_all: 'مسح جميع الفلاتر',
159
165
  table_new_record: 'سجل جديد',
160
166
  table_export_excel: 'تصدير إلى Excel',
167
+ doc_view_switch: 'تبديل العرض',
168
+ doc_view_tree: 'عرض شجري',
169
+ doc_view_list: 'عرض القائمة',
161
170
  // mrd-table filter popup
162
171
  filter_sorting: 'الترتيب',
163
172
  filter_ascending: 'تصاعدي',
@@ -221,6 +230,9 @@ const translations = {
221
230
  table_filter_clear_all: 'Effacer tous les filtres',
222
231
  table_new_record: 'Nouvel enregistrement',
223
232
  table_export_excel: 'Exporter vers Excel',
233
+ doc_view_switch: 'Changer de vue',
234
+ doc_view_tree: 'Vue arborescente',
235
+ doc_view_list: 'Vue liste',
224
236
  // mrd-table filter popup
225
237
  filter_sorting: 'Tri',
226
238
  filter_ascending: 'Croissant',
@@ -284,6 +296,9 @@ const translations = {
284
296
  table_filter_clear_all: 'Alle Filter löschen',
285
297
  table_new_record: 'Neuer Eintrag',
286
298
  table_export_excel: 'Als Excel exportieren',
299
+ doc_view_switch: 'Ansicht wechseln',
300
+ doc_view_tree: 'Baumansicht',
301
+ doc_view_list: 'Listenansicht',
287
302
  // mrd-table filter popup
288
303
  filter_sorting: 'Sortierung',
289
304
  filter_ascending: 'Aufsteigend',
@@ -347,6 +362,9 @@ const translations = {
347
362
  table_filter_clear_all: 'Borrar todos los filtros',
348
363
  table_new_record: 'Nuevo registro',
349
364
  table_export_excel: 'Exportar a Excel',
365
+ doc_view_switch: 'Cambiar vista',
366
+ doc_view_tree: 'Vista de árbol',
367
+ doc_view_list: 'Vista de lista',
350
368
  // mrd-table filter popup
351
369
  filter_sorting: 'Ordenación',
352
370
  filter_ascending: 'Ascendente',
@@ -410,6 +428,9 @@ const translations = {
410
428
  table_filter_clear_all: 'Cancella tutti i filtri',
411
429
  table_new_record: 'Nuovo record',
412
430
  table_export_excel: 'Esporta in Excel',
431
+ doc_view_switch: 'Cambia vista',
432
+ doc_view_tree: 'Vista ad albero',
433
+ doc_view_list: 'Vista elenco',
413
434
  // mrd-table filter popup
414
435
  filter_sorting: 'Ordinamento',
415
436
  filter_ascending: 'Crescente',
@@ -473,6 +494,9 @@ const translations = {
473
494
  table_filter_clear_all: 'Очистити всі фільтри',
474
495
  table_new_record: 'Новий запис',
475
496
  table_export_excel: 'Експортувати до Excel',
497
+ doc_view_switch: 'Змінити вигляд',
498
+ doc_view_tree: 'Деревоподібний вигляд',
499
+ doc_view_list: 'Список',
476
500
  // mrd-table filter popup
477
501
  filter_sorting: 'Сортування',
478
502
  filter_ascending: 'За зростанням',
@@ -1 +1 @@
1
- var E,A,T,O,R;!function(E){E.OBJECT_FORM_DASHBOARD="OBJECT_FORM_DASHBOARD",E.CLASS_DASHBOARD="CLASS_DASHBOARD",E.GENERAL_DASHBOARD="GENERAL_DASHBOARD",E.NAVIGATION_PANE="NAVIGATION_PANE"}(E||(E={})),function(E){E.FIELD="FIELD",E.RELATION="RELATION",E.SECTION="SECTION",E.GROUP="GROUP",E.HEADER="HEADER",E.TEXT="TEXT",E.NAVIGATE="NAVIGATE",E.ACTION="ACTION",E.SEARCH="SEARCH",E.VIEW="VIEW",E.RELATED_VIEW="RELATED_VIEW",E.RELATED_OBJECT="RELATED_OBJECT"}(A||(A={})),function(E){E.TEXT="TEXT",E.TEXTBLOCK="TEXTBLOCK",E.INTEGER="INTEGER",E.DECIMAL="DECIMAL",E.PERCENTAGE="PERCENTAGE",E.CURRENCY="CURRENCY",E.BOOLEAN="BOOLEAN",E.DATE="DATE",E.DATETIME="DATETIME",E.TIME="TIME",E.EMAIL="EMAIL",E.HYPERLINK="HYPERLINK",E.LIST="LIST",E.FILE="FILE",E.IMAGE="IMAGE",E.LONGTEXT="LONGTEXT",E.JSON="JSON",E.SECRET="SECRET"}(T||(T={})),function(E){E.SEARCH="SEARCH",E.DROPDOWN="DROPDOWN",E.CHECKBOX="CHECKBOX"}(O||(O={})),function(E){E.SEARCH="SEARCH",E.DROPDOWN="DROPDOWN",E.CHECKBOX="CHECKBOX"}(R||(R={}));export{E as C,A as a,T as b,O as c,R as d}
1
+ var E,A,T,O,R;!function(E){E.OBJECT_FORM_DASHBOARD="OBJECT_FORM_DASHBOARD",E.CLASS_DASHBOARD="CLASS_DASHBOARD",E.GENERAL_DASHBOARD="GENERAL_DASHBOARD",E.NAVIGATION_PANE="NAVIGATION_PANE"}(E||(E={})),function(E){E.FIELD="FIELD",E.RELATION="RELATION",E.SECTION="SECTION",E.GROUP="GROUP",E.HEADER="HEADER",E.TEXT="TEXT",E.NAVIGATE="NAVIGATE",E.ACTION="ACTION",E.SEARCH="SEARCH",E.VIEW="VIEW",E.RELATED_VIEW="RELATED_VIEW",E.RELATED_OBJECT="RELATED_OBJECT"}(A||(A={})),function(E){E.TEXT="TEXT",E.TEXTBLOCK="TEXTBLOCK",E.INTEGER="INTEGER",E.DECIMAL="DECIMAL",E.PERCENTAGE="PERCENTAGE",E.CURRENCY="CURRENCY",E.BOOLEAN="BOOLEAN",E.DATE="DATE",E.DATETIME="DATETIME",E.TIME="TIME",E.EMAIL="EMAIL",E.HYPERLINK="HYPERLINK",E.LIST="LIST",E.FILE="FILE",E.IMAGE="IMAGE",E.LONGTEXT="LONGTEXT",E.JSON="JSON",E.SECRET="SECRET"}(T||(T={})),function(E){E.SEARCH="SEARCH",E.DROPDOWN="DROPDOWN",E.CHECKBOX="CHECKBOX"}(O||(O={})),function(E){E.SEARCH="SEARCH",E.DROPDOWN="DROPDOWN",E.CHECKBOX="CHECKBOX"}(R||(R={}));const C="commons.document";function I(E,A){return(null!=E?E:[]).find((E=>E.archetype===A))}export{C as A,E as C,A as a,T as b,O as c,R as d,I as r}
@@ -1 +1 @@
1
- function n(n,i,t){return null==n||isNaN(n)?"":new Intl.NumberFormat(i,t).format(n)}function i(n,i,t){return null==n||isNaN(n)?"":new Intl.NumberFormat(t,{style:"currency",currency:i,minimumFractionDigits:2,maximumFractionDigits:2}).format(n)}function t(n,i,t=2){return null==n||isNaN(n)?"":new Intl.NumberFormat(i,{style:"percent",minimumFractionDigits:t,maximumFractionDigits:t}).format(n)}function e(n,i){if(!n)return"";const t="string"==typeof n?new Date(n):n;return isNaN(t.getTime())?"":new Intl.DateTimeFormat(i,{year:"numeric",month:"2-digit",day:"2-digit"}).format(t)}function r(n,i){if(!n)return"";const t="string"==typeof n?new Date(n):n;return isNaN(t.getTime())?"":new Intl.DateTimeFormat(i,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}).format(t)}function u(n,i){if(!n)return"";const[t,e]=n.split(":").map(Number),r=new Date;return r.setHours(t,e,0,0),new Intl.DateTimeFormat(i,{hour:"2-digit",minute:"2-digit"}).format(r)}function a(n,i){var t,e,r,u;if(!n||!n.trim())return null;const a=new Intl.NumberFormat(i).formatToParts(1234567.89),o=null!==(e=null===(t=a.find((n=>"group"===n.type)))||void 0===t?void 0:t.value)&&void 0!==e?e:",",l=null!==(u=null===(r=a.find((n=>"decimal"===n.type)))||void 0===r?void 0:r.value)&&void 0!==u?u:".",s=n.replace(new RegExp(`\\${o}`,"g"),"").replace(new RegExp(`\\${l}`),".").replace("%","").trim(),c=parseFloat(s);return isNaN(c)?null:c}export{e as a,u as b,r as c,i as d,t as e,n as f,a as p}
1
+ function n(n,i,t){return null==n||isNaN(n)?"":new Intl.NumberFormat(i,t).format(n)}function i(n,i,t){return null==n||isNaN(n)?"":new Intl.NumberFormat(t,{style:"currency",currency:i,minimumFractionDigits:2,maximumFractionDigits:2}).format(n)}function t(n,i,t=2){return null==n||isNaN(n)?"":new Intl.NumberFormat(i,{style:"percent",minimumFractionDigits:t,maximumFractionDigits:t}).format(n)}function e(n,i){if(!n)return"";const t="string"==typeof n?new Date(n):n;return isNaN(t.getTime())?"":new Intl.DateTimeFormat(i,{year:"numeric",month:"2-digit",day:"2-digit"}).format(t)}function r(n,i){if(!n)return"";const t="string"==typeof n?new Date(n):n;return isNaN(t.getTime())?"":new Intl.DateTimeFormat(i,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}).format(t)}function u(n,i){if(!n)return"";const[t,e]=n.split(":").map(Number),r=new Date;return r.setHours(t,e,0,0),new Intl.DateTimeFormat(i,{hour:"2-digit",minute:"2-digit"}).format(r)}function a(n,i){var t,e,r,u;if(!n||!n.trim())return null;const a=new Intl.NumberFormat(i).formatToParts(1234567.89),o=null!==(e=null===(t=a.find((n=>"group"===n.type)))||void 0===t?void 0:t.value)&&void 0!==e?e:",",l=null!==(u=null===(r=a.find((n=>"decimal"===n.type)))||void 0===r?void 0:r.value)&&void 0!==u?u:".",s=n.replace(new RegExp(`\\${o}`,"g"),"").replace(new RegExp(`\\${l}`),".").replace("%","").trim(),c=parseFloat(s);return isNaN(c)?null:c}export{n as a,u as b,r as c,i as d,t as e,e as f,a as p}