@mmlogic/components 0.3.8 → 0.3.10

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 (82) 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_23.cjs.entry.js} +1059 -23
  5. package/dist/collection/collection-manifest.json +3 -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-container/mrd-document-container.js +375 -0
  11. package/dist/collection/components/mrd-document-container/mrd-document-container.scss +79 -0
  12. package/dist/collection/components/mrd-document-list/mrd-document-list.js +1129 -0
  13. package/dist/collection/components/mrd-document-list/mrd-document-list.scss +181 -0
  14. package/dist/collection/components/mrd-document-view/mrd-document-view.js +177 -0
  15. package/dist/collection/components/mrd-document-view/mrd-document-view.scss +121 -0
  16. package/dist/collection/components/mrd-email-field/mrd-email-field.js +1 -1
  17. package/dist/collection/components/mrd-file-field/mrd-file-field.js +1 -1
  18. package/dist/collection/components/mrd-image-field/mrd-image-field.js +1 -1
  19. package/dist/collection/components/mrd-layout-section/mrd-layout-section.js +288 -14
  20. package/dist/collection/components/mrd-layout-section/mrd-layout-section.scss +2 -3
  21. package/dist/collection/components/mrd-longtext-field/mrd-longtext-field.js +1 -1
  22. package/dist/collection/components/mrd-number-field/mrd-number-field.js +1 -1
  23. package/dist/collection/components/mrd-secret-field/mrd-secret-field.js +2 -2
  24. package/dist/collection/components/mrd-text-field/mrd-text-field.js +1 -1
  25. package/dist/collection/components/mrd-textarea-field/mrd-textarea-field.js +1 -1
  26. package/dist/collection/components/mrd-time-field/mrd-time-field.js +1 -1
  27. package/dist/collection/dev/app.js +66 -2
  28. package/dist/collection/types/client-layout.js +10 -0
  29. package/dist/collection/utils/i18n.js +34 -0
  30. package/dist/components/client-layout.js +1 -1
  31. package/dist/components/format.js +1 -1
  32. package/dist/components/i18n.js +1 -1
  33. package/dist/components/index.js +1 -1
  34. package/dist/components/mrd-boolean-field2.js +1 -1
  35. package/dist/components/mrd-currency-field2.js +1 -1
  36. package/dist/components/mrd-date-field2.js +1 -1
  37. package/dist/components/mrd-datetime-field2.js +1 -1
  38. package/dist/components/mrd-document-container.d.ts +11 -0
  39. package/dist/components/mrd-document-container.js +1 -0
  40. package/dist/components/mrd-document-container2.js +1 -0
  41. package/dist/components/mrd-document-list.d.ts +11 -0
  42. package/dist/components/mrd-document-list.js +1 -0
  43. package/dist/components/mrd-document-list2.js +1 -0
  44. package/dist/components/mrd-document-view.d.ts +11 -0
  45. package/dist/components/mrd-document-view.js +1 -0
  46. package/dist/components/mrd-document-view2.js +1 -0
  47. package/dist/components/mrd-email-field2.js +1 -1
  48. package/dist/components/mrd-file-field2.js +1 -1
  49. package/dist/components/mrd-image-field2.js +1 -1
  50. package/dist/components/mrd-layout-section.js +1 -1
  51. package/dist/components/mrd-longtext-field2.js +1 -1
  52. package/dist/components/mrd-number-field2.js +1 -1
  53. package/dist/components/mrd-secret-field2.js +1 -1
  54. package/dist/components/mrd-table2.js +1 -1
  55. package/dist/components/mrd-text-field2.js +1 -1
  56. package/dist/components/mrd-textarea-field2.js +1 -1
  57. package/dist/components/mrd-time-field2.js +1 -1
  58. package/dist/esm/index.js +11 -1
  59. package/dist/esm/loader.js +1 -1
  60. package/dist/esm/mosterdcomponents.js +1 -1
  61. package/dist/esm/{mrd-boolean-field_20.entry.js → mrd-boolean-field_23.entry.js} +1058 -25
  62. package/dist/mosterdcomponents/{cell-renderer-CbRwLOo8.js.map → cell-renderer-B-AJDBcj.js.map} +1 -1
  63. package/dist/mosterdcomponents/{client-layout-D88nn5zf.js.map → client-layout-ChqRA3AF.js.map} +1 -1
  64. package/dist/mosterdcomponents/i18n-s1XrKcD2.js.map +1 -0
  65. package/dist/mosterdcomponents/index-DkY-NQj0.js.map +1 -0
  66. package/dist/mosterdcomponents/index-DwF_Sp__.js.map +1 -0
  67. package/dist/mosterdcomponents/index.esm.js +1 -1
  68. package/dist/mosterdcomponents/mosterdcomponents.css +1 -1
  69. package/dist/mosterdcomponents/mosterdcomponents.esm.js +1 -1
  70. package/dist/mosterdcomponents/p-69452249.entry.js +1 -0
  71. package/dist/mosterdcomponents/{validation-ixb43cqU.js.map → validation-Br9k2Ztw.js.map} +1 -1
  72. package/dist/types/components/mrd-document-container/mrd-document-container.d.ts +94 -0
  73. package/dist/types/components/mrd-document-list/mrd-document-list.d.ts +210 -0
  74. package/dist/types/components/mrd-document-view/mrd-document-view.d.ts +36 -0
  75. package/dist/types/components/mrd-layout-section/mrd-layout-section.d.ts +57 -6
  76. package/dist/types/components.d.ts +507 -15
  77. package/dist/types/types/client-layout.d.ts +38 -0
  78. package/package.json +1 -1
  79. package/dist/mosterdcomponents/i18n-hoGGKbKU.js.map +0 -1
  80. package/dist/mosterdcomponents/index-6yQUNVww.js.map +0 -1
  81. package/dist/mosterdcomponents/index-I5SuYv7a.js.map +0 -1
  82. package/dist/mosterdcomponents/p-7bfaee51.entry.js +0 -1
@@ -5,10 +5,14 @@
5
5
  * It contains typing information for all components that exist in this project.
6
6
  */
7
7
  import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
8
- import { ClientLayout, ClientLayoutItem, ClientLayoutItemFieldDataType, ClientLayoutItemRelationDisplayType, ClientLayoutItemRelationEditBehavior, ClientListValue, CurrencyValue, RelationSearchResult } from "./types";
9
- import { AggregationResult, ClientLayoutItem as ClientLayoutItem1, ClientLayoutItemNavigate, ClientViewMetadata, HyperlinkValue, RelationSearchResult as RelationSearchResult1 } from "./types/client-layout";
10
- export { ClientLayout, ClientLayoutItem, ClientLayoutItemFieldDataType, ClientLayoutItemRelationDisplayType, ClientLayoutItemRelationEditBehavior, ClientListValue, CurrencyValue, RelationSearchResult } from "./types";
11
- export { AggregationResult, ClientLayoutItem as ClientLayoutItem1, ClientLayoutItemNavigate, ClientViewMetadata, HyperlinkValue, RelationSearchResult as RelationSearchResult1 } from "./types/client-layout";
8
+ import { ClientLayout, ClientLayoutItem as ClientLayoutItem1, ClientLayoutItemFieldDataType, ClientLayoutItemRelationDisplayType, ClientLayoutItemRelationEditBehavior, ClientListValue, CurrencyValue, RelationSearchResult } from "./types";
9
+ import { AggregationResult, ClientArchetype, ClientLayoutItem, ClientLayoutItemNavigate, ClientViewMetadata, HyperlinkValue, RelationSearchResult as RelationSearchResult1 } from "./types/client-layout";
10
+ import { DistinctValue, DocRow } from "./components/mrd-document-list/mrd-document-list";
11
+ import { DistinctValue as DistinctValue1 } from "./components/mrd-document-list/mrd-document-list";
12
+ export { ClientLayout, ClientLayoutItem as ClientLayoutItem1, ClientLayoutItemFieldDataType, ClientLayoutItemRelationDisplayType, ClientLayoutItemRelationEditBehavior, ClientListValue, CurrencyValue, RelationSearchResult } from "./types";
13
+ export { AggregationResult, ClientArchetype, ClientLayoutItem, ClientLayoutItemNavigate, ClientViewMetadata, HyperlinkValue, RelationSearchResult as RelationSearchResult1 } from "./types/client-layout";
14
+ export { DistinctValue, DocRow } from "./components/mrd-document-list/mrd-document-list";
15
+ export { DistinctValue as DistinctValue1 } from "./components/mrd-document-list/mrd-document-list";
12
16
  export namespace Components {
13
17
  interface MrdBooleanField {
14
18
  /**
@@ -114,6 +118,121 @@ export namespace Components {
114
118
  */
115
119
  "value": string;
116
120
  }
121
+ /**
122
+ * Owns a document collection view: a single toolbar (view switch + collection
123
+ * actions like "New folder", and — later — upload / drag-drop) plus the two
124
+ * interchangeable bodies, the folder tree (`mrd-document-list`) and the flat
125
+ * table (`mrd-table`).
126
+ * `mrd-layout-section` renders one of these per document VIEW / RELATED_VIEW and
127
+ * forwards the re-emitted load/navigate/action events to the host. The embedded
128
+ * table/list keep their `data-view` / `data-doclist` attributes so the host's
129
+ * existing `setViewPage` / `setViewDistinct` / `setViewAggregations` lookups
130
+ * (recursive querySelector) still resolve them unchanged.
131
+ */
132
+ interface MrdDocumentContainer {
133
+ /**
134
+ * Resolved `commons.document` archetype binding for the folder tree.
135
+ */
136
+ "archetype": ClientArchetype;
137
+ /**
138
+ * The VIEW or RELATED_VIEW layout item (dataClass, fromClass, view config).
139
+ * @default null
140
+ */
141
+ "item": ClientLayoutItem | null;
142
+ /**
143
+ * @default navigator.language
144
+ */
145
+ "locale": string;
146
+ /**
147
+ * Parent record id — required for RELATED_VIEW path building.
148
+ * @default ''
149
+ */
150
+ "parentId": string;
151
+ /**
152
+ * Lookup key used for the embedded `data-doclist` / `data-view` attributes.
153
+ * @default ''
154
+ */
155
+ "viewKey": string;
156
+ }
157
+ /**
158
+ * Archetype-driven document collection view. Renders documents as a lazy,
159
+ * file-explorer-style folder tree, grouped by the `commons.document` archetype's
160
+ * `container` (dossier, the top folder) and `folder` (a path string like
161
+ * `/draft documents/may 2020`, the sub-path beneath it).
162
+ * Loading is lazy per level, mirroring the /distinct endpoint (FINDING-0106):
163
+ * - on load → `mrdLoadDistinct` for the `container` relation → top folders;
164
+ * - on expanding a container → `mrdLoadDistinct` for the `folder` field, filtered
165
+ * by `{containerField}_href` → all folder path strings for that container
166
+ * (the client splits them on `/` and builds the sub-tree locally);
167
+ * - on expanding a node that holds documents → `mrdLoadPage` (a plain filtered list
168
+ * load, the same one a table page uses), filtered by container + exact folder string.
169
+ * When exactly one container exists (e.g. a dossier detail page) the container
170
+ * level is hidden and its folder tree is shown directly at the root.
171
+ */
172
+ interface MrdDocumentList {
173
+ /**
174
+ * Resolved `commons.document` binding: slot name → concrete field/relation name.
175
+ */
176
+ "archetype": ClientArchetype;
177
+ /**
178
+ * Start creating a folder under the current target. Called by the host toolbar (mrd-document-container). No-op when there is no valid target.
179
+ */
180
+ "createFolder": () => Promise<void>;
181
+ /**
182
+ * The VIEW or RELATED_VIEW layout item (dataClass, fromClass, view config).
183
+ * @default null
184
+ */
185
+ "item": ClientLayoutItem | null;
186
+ /**
187
+ * @default navigator.language
188
+ */
189
+ "locale": string;
190
+ /**
191
+ * Parent record id — required for RELATED_VIEW path building.
192
+ * @default ''
193
+ */
194
+ "parentId": string;
195
+ /**
196
+ * Host callback with the created document's self href, so the optimistic row becomes navigable without waiting for a reload.
197
+ */
198
+ "setCreatedHref": (href: string) => Promise<void>;
199
+ /**
200
+ * Inject distinct values for a node. `nodeId` is the sentinel root (containers) or a container node id (folders).
201
+ */
202
+ "setDistinct": (nodeId: string, values: DistinctValue[]) => Promise<void>;
203
+ /**
204
+ * Inject the documents loaded for one folder node.
205
+ */
206
+ "setDocuments": (nodeId: string, docs: DocRow[]) => Promise<void>;
207
+ /**
208
+ * Host callback with the uploaded file reference. Builds the create payload from the archetype slots and requests the new document.
209
+ */
210
+ "setFileReference": (uri: string) => Promise<void>;
211
+ }
212
+ /**
213
+ * Archetype-driven single-document view. Given a `commons.document` binding and a
214
+ * data record, renders the document recognisably — title, file preview/download,
215
+ * summary and date — plus a navigation link to the container (the dossier),
216
+ * instead of a generic field form.
217
+ * The component keys on the slot→field map (`archetype.slots`) to locate values:
218
+ * value slots read `data[field]`; the `container` relation slot reads
219
+ * `data._links[field]` (`{ href, name }`). Empty slots are omitted.
220
+ */
221
+ interface MrdDocumentView {
222
+ /**
223
+ * Resolved `commons.document` binding: slot name → concrete field/relation name.
224
+ */
225
+ "archetype": ClientArchetype;
226
+ /**
227
+ * The data record from the /data endpoint. Fields keyed by name; relations under `_links`.
228
+ * @default {}
229
+ */
230
+ "data": Record<string, unknown>;
231
+ /**
232
+ * @default navigator.language
233
+ */
234
+ "locale": string;
235
+ }
117
236
  interface MrdEmailField {
118
237
  /**
119
238
  * @default false
@@ -145,7 +264,7 @@ export namespace Components {
145
264
  "value": string;
146
265
  }
147
266
  interface MrdField {
148
- "item": ClientLayoutItem;
267
+ "item": ClientLayoutItem1;
149
268
  /**
150
269
  * @default navigator.language
151
270
  */
@@ -283,6 +402,11 @@ export namespace Components {
283
402
  "value": unknown;
284
403
  }
285
404
  interface MrdLayoutSection {
405
+ /**
406
+ * Top-level archetypes on the object dashboard. When it contains commons.document, the record is rendered as a single-document view instead of generic fields.
407
+ * @default []
408
+ */
409
+ "archetypes": ClientArchetype[];
286
410
  /**
287
411
  * Record data object; keys are field names, _links holds relation and related-view links.
288
412
  * @default {}
@@ -292,7 +416,7 @@ export namespace Components {
292
416
  * Items from one layout entry in ClientDashboardMetadata.layouts[].
293
417
  * @default []
294
418
  */
295
- "items": ClientLayoutItem1[];
419
+ "items": ClientLayoutItem[];
296
420
  /**
297
421
  * Legacy: top-level _links from ClientDashboardMetadata. Not needed in new flat format.
298
422
  * @default {}
@@ -319,9 +443,21 @@ export namespace Components {
319
443
  */
320
444
  "setViewAggregations": (name: string, data: any) => Promise<void>;
321
445
  /**
322
- * Inject data into an embedded mrd-table for a RELATED_VIEW or VIEW item. Pass totalElements to update the pagination total (safe to pass on every page). Pass hasNext (from _links.next presence) so the table can decide whether to emit aggregations.
446
+ * Inject the created document's href after a file-drop create, so the optimistic row becomes navigable (see mrdCreateObject).
447
+ */
448
+ "setViewCreatedObject": (name: string, href: string) => Promise<void>;
449
+ /**
450
+ * Inject distinct values into an embedded mrd-document-list for a document view.
451
+ */
452
+ "setViewDistinct": (name: string, nodeId: string, values: DistinctValue1[]) => Promise<void>;
453
+ /**
454
+ * Inject the uploaded file reference for a dropped file, so the document view can request creation of the new document (see mrdViewUpload).
455
+ */
456
+ "setViewFileReference": (name: string, uri: string) => Promise<void>;
457
+ /**
458
+ * Inject rows for a VIEW / RELATED_VIEW item. - Table view: injects the page into the embedded mrd-table (pass totalElements/hasNext). - Document view: pass `nodeId` to route the rows to that folder node in the embedded mrd-document-list. Folder loading is just a filtered list load, so it reuses this method.
323
459
  */
324
- "setViewPage": (name: string, page: number, rows: any[], totalElements?: number, hasNext?: boolean) => Promise<void>;
460
+ "setViewPage": (name: string, page: number, rows: any[], totalElements?: number, hasNext?: boolean, nodeId?: string) => Promise<void>;
325
461
  /**
326
462
  * Legacy: view metadata map (ClientDashboardMetadata.views). Not needed in new flat format.
327
463
  * @default {}
@@ -523,7 +659,7 @@ export namespace Components {
523
659
  * The VIEW or RELATED_VIEW layout item. Contains view config, dataClass, fromClass, actions etc.
524
660
  * @default null
525
661
  */
526
- "item": ClientLayoutItem1 | null;
662
+ "item": ClientLayoutItem | null;
527
663
  /**
528
664
  * @default navigator.language
529
665
  */
@@ -670,6 +806,18 @@ export interface MrdDatetimeFieldCustomEvent<T> extends CustomEvent<T> {
670
806
  detail: T;
671
807
  target: HTMLMrdDatetimeFieldElement;
672
808
  }
809
+ export interface MrdDocumentContainerCustomEvent<T> extends CustomEvent<T> {
810
+ detail: T;
811
+ target: HTMLMrdDocumentContainerElement;
812
+ }
813
+ export interface MrdDocumentListCustomEvent<T> extends CustomEvent<T> {
814
+ detail: T;
815
+ target: HTMLMrdDocumentListElement;
816
+ }
817
+ export interface MrdDocumentViewCustomEvent<T> extends CustomEvent<T> {
818
+ detail: T;
819
+ target: HTMLMrdDocumentViewElement;
820
+ }
673
821
  export interface MrdEmailFieldCustomEvent<T> extends CustomEvent<T> {
674
822
  detail: T;
675
823
  target: HTMLMrdEmailFieldElement;
@@ -807,6 +955,106 @@ declare global {
807
955
  prototype: HTMLMrdDatetimeFieldElement;
808
956
  new (): HTMLMrdDatetimeFieldElement;
809
957
  };
958
+ interface HTMLMrdDocumentContainerElementEventMap {
959
+ "mrdLoadPage": { page: number; sort: string; path: string; qs: string; nodeId?: string };
960
+ "mrdLoadDistinct": { nodeId: string; distinct: string; path: string; qs: string };
961
+ "mrdLoadAggregations": { path: string; qs: string; aggQs: string };
962
+ "mrdNavigate": { href?: string; label: string };
963
+ "mrdAction": { action: string; path?: string; qs?: string; parentPath?: string | null; basicType?: string };
964
+ "mrdUpdateObject": { href: string; values: Record<string, unknown> };
965
+ "mrdUpload": { file: File };
966
+ "mrdCreateObject": { path: string; values: Record<string, unknown> };
967
+ }
968
+ /**
969
+ * Owns a document collection view: a single toolbar (view switch + collection
970
+ * actions like "New folder", and — later — upload / drag-drop) plus the two
971
+ * interchangeable bodies, the folder tree (`mrd-document-list`) and the flat
972
+ * table (`mrd-table`).
973
+ * `mrd-layout-section` renders one of these per document VIEW / RELATED_VIEW and
974
+ * forwards the re-emitted load/navigate/action events to the host. The embedded
975
+ * table/list keep their `data-view` / `data-doclist` attributes so the host's
976
+ * existing `setViewPage` / `setViewDistinct` / `setViewAggregations` lookups
977
+ * (recursive querySelector) still resolve them unchanged.
978
+ */
979
+ interface HTMLMrdDocumentContainerElement extends Components.MrdDocumentContainer, HTMLStencilElement {
980
+ addEventListener<K extends keyof HTMLMrdDocumentContainerElementEventMap>(type: K, listener: (this: HTMLMrdDocumentContainerElement, ev: MrdDocumentContainerCustomEvent<HTMLMrdDocumentContainerElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
981
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
982
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
983
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
984
+ removeEventListener<K extends keyof HTMLMrdDocumentContainerElementEventMap>(type: K, listener: (this: HTMLMrdDocumentContainerElement, ev: MrdDocumentContainerCustomEvent<HTMLMrdDocumentContainerElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
985
+ removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
986
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
987
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
988
+ }
989
+ var HTMLMrdDocumentContainerElement: {
990
+ prototype: HTMLMrdDocumentContainerElement;
991
+ new (): HTMLMrdDocumentContainerElement;
992
+ };
993
+ interface HTMLMrdDocumentListElementEventMap {
994
+ "mrdLoadDistinct": { nodeId: string; distinct: string; path: string; qs: string };
995
+ "mrdLoadPage": { nodeId: string; page: number; sort: string; path: string; qs: string };
996
+ "mrdNavigate": { href?: string; label: string };
997
+ "mrdCanCreate": boolean;
998
+ "mrdUpdateObject": { href: string; values: Record<string, unknown> };
999
+ "mrdUpload": { file: File };
1000
+ "mrdCreateObject": { path: string; values: Record<string, unknown> };
1001
+ }
1002
+ /**
1003
+ * Archetype-driven document collection view. Renders documents as a lazy,
1004
+ * file-explorer-style folder tree, grouped by the `commons.document` archetype's
1005
+ * `container` (dossier, the top folder) and `folder` (a path string like
1006
+ * `/draft documents/may 2020`, the sub-path beneath it).
1007
+ * Loading is lazy per level, mirroring the /distinct endpoint (FINDING-0106):
1008
+ * - on load → `mrdLoadDistinct` for the `container` relation → top folders;
1009
+ * - on expanding a container → `mrdLoadDistinct` for the `folder` field, filtered
1010
+ * by `{containerField}_href` → all folder path strings for that container
1011
+ * (the client splits them on `/` and builds the sub-tree locally);
1012
+ * - on expanding a node that holds documents → `mrdLoadPage` (a plain filtered list
1013
+ * load, the same one a table page uses), filtered by container + exact folder string.
1014
+ * When exactly one container exists (e.g. a dossier detail page) the container
1015
+ * level is hidden and its folder tree is shown directly at the root.
1016
+ */
1017
+ interface HTMLMrdDocumentListElement extends Components.MrdDocumentList, HTMLStencilElement {
1018
+ addEventListener<K extends keyof HTMLMrdDocumentListElementEventMap>(type: K, listener: (this: HTMLMrdDocumentListElement, ev: MrdDocumentListCustomEvent<HTMLMrdDocumentListElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
1019
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
1020
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
1021
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
1022
+ removeEventListener<K extends keyof HTMLMrdDocumentListElementEventMap>(type: K, listener: (this: HTMLMrdDocumentListElement, ev: MrdDocumentListCustomEvent<HTMLMrdDocumentListElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
1023
+ removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
1024
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
1025
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
1026
+ }
1027
+ var HTMLMrdDocumentListElement: {
1028
+ prototype: HTMLMrdDocumentListElement;
1029
+ new (): HTMLMrdDocumentListElement;
1030
+ };
1031
+ interface HTMLMrdDocumentViewElementEventMap {
1032
+ "mrdNavigate": { href?: string; label: string };
1033
+ "mrdDownload": { href: string; fileName: string };
1034
+ }
1035
+ /**
1036
+ * Archetype-driven single-document view. Given a `commons.document` binding and a
1037
+ * data record, renders the document recognisably — title, file preview/download,
1038
+ * summary and date — plus a navigation link to the container (the dossier),
1039
+ * instead of a generic field form.
1040
+ * The component keys on the slot→field map (`archetype.slots`) to locate values:
1041
+ * value slots read `data[field]`; the `container` relation slot reads
1042
+ * `data._links[field]` (`{ href, name }`). Empty slots are omitted.
1043
+ */
1044
+ interface HTMLMrdDocumentViewElement extends Components.MrdDocumentView, HTMLStencilElement {
1045
+ addEventListener<K extends keyof HTMLMrdDocumentViewElementEventMap>(type: K, listener: (this: HTMLMrdDocumentViewElement, ev: MrdDocumentViewCustomEvent<HTMLMrdDocumentViewElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
1046
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
1047
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
1048
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
1049
+ removeEventListener<K extends keyof HTMLMrdDocumentViewElementEventMap>(type: K, listener: (this: HTMLMrdDocumentViewElement, ev: MrdDocumentViewCustomEvent<HTMLMrdDocumentViewElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
1050
+ removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
1051
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
1052
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
1053
+ }
1054
+ var HTMLMrdDocumentViewElement: {
1055
+ prototype: HTMLMrdDocumentViewElement;
1056
+ new (): HTMLMrdDocumentViewElement;
1057
+ };
810
1058
  interface HTMLMrdEmailFieldElementEventMap {
811
1059
  "mrdChange": { name: string; value: string };
812
1060
  "mrdBlur": { name: string; value: string };
@@ -927,10 +1175,14 @@ declare global {
927
1175
  "mrdNavigate": { href?: string; label: string; navigate?: ClientLayoutItemNavigate };
928
1176
  "mrdSearch": { query: string; dataClass: string };
929
1177
  "mrdDownload": { href: string; fileName: string };
930
- "mrdLoadViewPage": { name: string; page: number; sort: string; path: string; qs: string };
1178
+ "mrdLoadViewPage": { name: string; page: number; sort: string; path: string; qs: string; nodeId?: string };
931
1179
  "mrdLoadImage": { fieldName: string; href: string };
932
1180
  "mrdViewAction": { name: string; action: string; dataClass: string; path?: string; qs?: string; parentPath?: string | null; basicType?: string };
933
1181
  "mrdLoadViewAggregations": { name: string; dataClass: string; path: string; qs: string; aggQs: string };
1182
+ "mrdLoadViewDistinct": { name: string; nodeId: string; distinct: string; path: string; qs: string };
1183
+ "mrdUpdateObject": { href: string; values: Record<string, unknown> };
1184
+ "mrdViewUpload": { name: string; file: File };
1185
+ "mrdCreateObject": { name: string; path: string; values: Record<string, unknown> };
934
1186
  }
935
1187
  interface HTMLMrdLayoutSectionElement extends Components.MrdLayoutSection, HTMLStencilElement {
936
1188
  addEventListener<K extends keyof HTMLMrdLayoutSectionElementEventMap>(type: K, listener: (this: HTMLMrdLayoutSectionElement, ev: MrdLayoutSectionCustomEvent<HTMLMrdLayoutSectionElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
@@ -1118,6 +1370,9 @@ declare global {
1118
1370
  "mrd-currency-field": HTMLMrdCurrencyFieldElement;
1119
1371
  "mrd-date-field": HTMLMrdDateFieldElement;
1120
1372
  "mrd-datetime-field": HTMLMrdDatetimeFieldElement;
1373
+ "mrd-document-container": HTMLMrdDocumentContainerElement;
1374
+ "mrd-document-list": HTMLMrdDocumentListElement;
1375
+ "mrd-document-view": HTMLMrdDocumentViewElement;
1121
1376
  "mrd-email-field": HTMLMrdEmailFieldElement;
1122
1377
  "mrd-field": HTMLMrdFieldElement;
1123
1378
  "mrd-file-field": HTMLMrdFileFieldElement;
@@ -1249,6 +1504,169 @@ declare namespace LocalJSX {
1249
1504
  */
1250
1505
  "value"?: string;
1251
1506
  }
1507
+ /**
1508
+ * Owns a document collection view: a single toolbar (view switch + collection
1509
+ * actions like "New folder", and — later — upload / drag-drop) plus the two
1510
+ * interchangeable bodies, the folder tree (`mrd-document-list`) and the flat
1511
+ * table (`mrd-table`).
1512
+ * `mrd-layout-section` renders one of these per document VIEW / RELATED_VIEW and
1513
+ * forwards the re-emitted load/navigate/action events to the host. The embedded
1514
+ * table/list keep their `data-view` / `data-doclist` attributes so the host's
1515
+ * existing `setViewPage` / `setViewDistinct` / `setViewAggregations` lookups
1516
+ * (recursive querySelector) still resolve them unchanged.
1517
+ */
1518
+ interface MrdDocumentContainer {
1519
+ /**
1520
+ * Resolved `commons.document` archetype binding for the folder tree.
1521
+ */
1522
+ "archetype": ClientArchetype;
1523
+ /**
1524
+ * The VIEW or RELATED_VIEW layout item (dataClass, fromClass, view config).
1525
+ * @default null
1526
+ */
1527
+ "item"?: ClientLayoutItem | null;
1528
+ /**
1529
+ * @default navigator.language
1530
+ */
1531
+ "locale"?: string;
1532
+ /**
1533
+ * A table toolbar action was triggered.
1534
+ */
1535
+ "onMrdAction"?: (event: MrdDocumentContainerCustomEvent<{ action: string; path?: string; qs?: string; parentPath?: string | null; basicType?: string }>) => void;
1536
+ /**
1537
+ * Create a new document from an uploaded file; host POSTs `values` to `path`.
1538
+ */
1539
+ "onMrdCreateObject"?: (event: MrdDocumentContainerCustomEvent<{ path: string; values: Record<string, unknown> }>) => void;
1540
+ /**
1541
+ * Re-emitted from the embedded table.
1542
+ */
1543
+ "onMrdLoadAggregations"?: (event: MrdDocumentContainerCustomEvent<{ path: string; qs: string; aggQs: string }>) => void;
1544
+ /**
1545
+ * Re-emitted from the embedded folder tree.
1546
+ */
1547
+ "onMrdLoadDistinct"?: (event: MrdDocumentContainerCustomEvent<{ nodeId: string; distinct: string; path: string; qs: string }>) => void;
1548
+ /**
1549
+ * Re-emitted from the embedded list/table. `nodeId` present for a folder load.
1550
+ */
1551
+ "onMrdLoadPage"?: (event: MrdDocumentContainerCustomEvent<{ page: number; sort: string; path: string; qs: string; nodeId?: string }>) => void;
1552
+ /**
1553
+ * A row / document was activated. Host routes to the object page.
1554
+ */
1555
+ "onMrdNavigate"?: (event: MrdDocumentContainerCustomEvent<{ href?: string; label: string }>) => void;
1556
+ /**
1557
+ * Generic "update an existing object" request, re-emitted from the folder tree (a document was dragged into another folder/container).
1558
+ */
1559
+ "onMrdUpdateObject"?: (event: MrdDocumentContainerCustomEvent<{ href: string; values: Record<string, unknown> }>) => void;
1560
+ /**
1561
+ * An external file was dropped on a folder; host uploads and calls back.
1562
+ */
1563
+ "onMrdUpload"?: (event: MrdDocumentContainerCustomEvent<{ file: File }>) => void;
1564
+ /**
1565
+ * Parent record id — required for RELATED_VIEW path building.
1566
+ * @default ''
1567
+ */
1568
+ "parentId"?: string;
1569
+ /**
1570
+ * Lookup key used for the embedded `data-doclist` / `data-view` attributes.
1571
+ * @default ''
1572
+ */
1573
+ "viewKey"?: string;
1574
+ }
1575
+ /**
1576
+ * Archetype-driven document collection view. Renders documents as a lazy,
1577
+ * file-explorer-style folder tree, grouped by the `commons.document` archetype's
1578
+ * `container` (dossier, the top folder) and `folder` (a path string like
1579
+ * `/draft documents/may 2020`, the sub-path beneath it).
1580
+ * Loading is lazy per level, mirroring the /distinct endpoint (FINDING-0106):
1581
+ * - on load → `mrdLoadDistinct` for the `container` relation → top folders;
1582
+ * - on expanding a container → `mrdLoadDistinct` for the `folder` field, filtered
1583
+ * by `{containerField}_href` → all folder path strings for that container
1584
+ * (the client splits them on `/` and builds the sub-tree locally);
1585
+ * - on expanding a node that holds documents → `mrdLoadPage` (a plain filtered list
1586
+ * load, the same one a table page uses), filtered by container + exact folder string.
1587
+ * When exactly one container exists (e.g. a dossier detail page) the container
1588
+ * level is hidden and its folder tree is shown directly at the root.
1589
+ */
1590
+ interface MrdDocumentList {
1591
+ /**
1592
+ * Resolved `commons.document` binding: slot name → concrete field/relation name.
1593
+ */
1594
+ "archetype": ClientArchetype;
1595
+ /**
1596
+ * The VIEW or RELATED_VIEW layout item (dataClass, fromClass, view config).
1597
+ * @default null
1598
+ */
1599
+ "item"?: ClientLayoutItem | null;
1600
+ /**
1601
+ * @default navigator.language
1602
+ */
1603
+ "locale"?: string;
1604
+ /**
1605
+ * Emitted whenever the "can create a folder here" state changes, so a host toolbar (mrd-document-container) can enable/disable its New folder button.
1606
+ */
1607
+ "onMrdCanCreate"?: (event: MrdDocumentListCustomEvent<boolean>) => void;
1608
+ /**
1609
+ * Fired once the dropped file is uploaded — requests creation of a new document. Host POSTs `values` to `path` (on a 400 it can open the create form itself).
1610
+ */
1611
+ "onMrdCreateObject"?: (event: MrdDocumentListCustomEvent<{ path: string; values: Record<string, unknown> }>) => void;
1612
+ /**
1613
+ * Request distinct values for a field/relation. Host fetches `{path}?{qs}` and calls `setDistinct(nodeId, values)`.
1614
+ */
1615
+ "onMrdLoadDistinct"?: (event: MrdDocumentListCustomEvent<{ nodeId: string; distinct: string; path: string; qs: string }>) => void;
1616
+ /**
1617
+ * Request the documents in one folder — the same filtered list load a table does. Host fetches `{path}?{qs}` and calls `setDocuments(nodeId, docs)` (via setViewPage).
1618
+ */
1619
+ "onMrdLoadPage"?: (event: MrdDocumentListCustomEvent<{ nodeId: string; page: number; sort: string; path: string; qs: string }>) => void;
1620
+ /**
1621
+ * A document row was clicked. Host routes to the document object page.
1622
+ */
1623
+ "onMrdNavigate"?: (event: MrdDocumentListCustomEvent<{ href?: string; label: string }>) => void;
1624
+ /**
1625
+ * Generic "update an existing object" request — fired when a document is dragged into another folder/container. Host PATCHes `href` with `values` (no move/folder knowledge needed). `values` carries the new folder string (or null for the container root) and, on a cross-container move, the new container relation href.
1626
+ */
1627
+ "onMrdUpdateObject"?: (event: MrdDocumentListCustomEvent<{ href: string; values: Record<string, unknown> }>) => void;
1628
+ /**
1629
+ * An external file was dropped onto a folder/container. Same flow as mrd-form: host uploads the file and calls `setFileReference(uri)` with the result.
1630
+ */
1631
+ "onMrdUpload"?: (event: MrdDocumentListCustomEvent<{ file: File }>) => void;
1632
+ /**
1633
+ * Parent record id — required for RELATED_VIEW path building.
1634
+ * @default ''
1635
+ */
1636
+ "parentId"?: string;
1637
+ }
1638
+ /**
1639
+ * Archetype-driven single-document view. Given a `commons.document` binding and a
1640
+ * data record, renders the document recognisably — title, file preview/download,
1641
+ * summary and date — plus a navigation link to the container (the dossier),
1642
+ * instead of a generic field form.
1643
+ * The component keys on the slot→field map (`archetype.slots`) to locate values:
1644
+ * value slots read `data[field]`; the `container` relation slot reads
1645
+ * `data._links[field]` (`{ href, name }`). Empty slots are omitted.
1646
+ */
1647
+ interface MrdDocumentView {
1648
+ /**
1649
+ * Resolved `commons.document` binding: slot name → concrete field/relation name.
1650
+ */
1651
+ "archetype": ClientArchetype;
1652
+ /**
1653
+ * The data record from the /data endpoint. Fields keyed by name; relations under `_links`.
1654
+ * @default {}
1655
+ */
1656
+ "data"?: Record<string, unknown>;
1657
+ /**
1658
+ * @default navigator.language
1659
+ */
1660
+ "locale"?: string;
1661
+ /**
1662
+ * Download the document file. Host resolves the href to a signed URL.
1663
+ */
1664
+ "onMrdDownload"?: (event: MrdDocumentViewCustomEvent<{ href: string; fileName: string }>) => void;
1665
+ /**
1666
+ * Navigate to the container (dossier). Host resolves the href and routes.
1667
+ */
1668
+ "onMrdNavigate"?: (event: MrdDocumentViewCustomEvent<{ href?: string; label: string }>) => void;
1669
+ }
1252
1670
  interface MrdEmailField {
1253
1671
  /**
1254
1672
  * @default false
@@ -1282,7 +1700,7 @@ declare namespace LocalJSX {
1282
1700
  "value"?: string;
1283
1701
  }
1284
1702
  interface MrdField {
1285
- "item": ClientLayoutItem;
1703
+ "item": ClientLayoutItem1;
1286
1704
  /**
1287
1705
  * @default navigator.language
1288
1706
  */
@@ -1443,6 +1861,11 @@ declare namespace LocalJSX {
1443
1861
  "value"?: unknown;
1444
1862
  }
1445
1863
  interface MrdLayoutSection {
1864
+ /**
1865
+ * Top-level archetypes on the object dashboard. When it contains commons.document, the record is rendered as a single-document view instead of generic fields.
1866
+ * @default []
1867
+ */
1868
+ "archetypes"?: ClientArchetype[];
1446
1869
  /**
1447
1870
  * Record data object; keys are field names, _links holds relation and related-view links.
1448
1871
  * @default {}
@@ -1452,7 +1875,7 @@ declare namespace LocalJSX {
1452
1875
  * Items from one layout entry in ClientDashboardMetadata.layouts[].
1453
1876
  * @default []
1454
1877
  */
1455
- "items"?: ClientLayoutItem1[];
1878
+ "items"?: ClientLayoutItem[];
1456
1879
  /**
1457
1880
  * Legacy: top-level _links from ClientDashboardMetadata. Not needed in new flat format.
1458
1881
  * @default {}
@@ -1462,6 +1885,10 @@ declare namespace LocalJSX {
1462
1885
  * @default navigator.language
1463
1886
  */
1464
1887
  "locale"?: string;
1888
+ /**
1889
+ * Create a new document from an uploaded file; host POSTs `values` to `path`, then calls setViewCreatedObject(name, href) with the new object's href.
1890
+ */
1891
+ "onMrdCreateObject"?: (event: MrdLayoutSectionCustomEvent<{ name: string; path: string; values: Record<string, unknown> }>) => void;
1465
1892
  "onMrdDownload"?: (event: MrdLayoutSectionCustomEvent<{ href: string; fileName: string }>) => void;
1466
1893
  /**
1467
1894
  * Fired once on load for each IMAGE field that has an href; host resolves the URL and calls setImagePreview().
@@ -1472,15 +1899,27 @@ declare namespace LocalJSX {
1472
1899
  */
1473
1900
  "onMrdLoadViewAggregations"?: (event: MrdLayoutSectionCustomEvent<{ name: string; dataClass: string; path: string; qs: string; aggQs: string }>) => void;
1474
1901
  /**
1475
- * Re-emitted from an embedded mrd-table's mrdLoadPage; host fetches the next page and calls setViewPage().
1902
+ * Re-emitted from an embedded mrd-document-list's mrdLoadDistinct; host fetches distinct values and calls setViewDistinct().
1476
1903
  */
1477
- "onMrdLoadViewPage"?: (event: MrdLayoutSectionCustomEvent<{ name: string; page: number; sort: string; path: string; qs: string }>) => void;
1904
+ "onMrdLoadViewDistinct"?: (event: MrdLayoutSectionCustomEvent<{ name: string; nodeId: string; distinct: string; path: string; qs: string }>) => void;
1905
+ /**
1906
+ * Re-emitted from an embedded mrd-table's or mrd-document-list's mrdLoadPage; host fetches the rows and calls setViewPage(). `nodeId` is present for a document-list folder load.
1907
+ */
1908
+ "onMrdLoadViewPage"?: (event: MrdLayoutSectionCustomEvent<{ name: string; page: number; sort: string; path: string; qs: string; nodeId?: string }>) => void;
1478
1909
  "onMrdNavigate"?: (event: MrdLayoutSectionCustomEvent<{ href?: string; label: string; navigate?: ClientLayoutItemNavigate }>) => void;
1479
1910
  "onMrdSearch"?: (event: MrdLayoutSectionCustomEvent<{ query: string; dataClass: string }>) => void;
1911
+ /**
1912
+ * Generic "update an existing object" request from an embedded document view (a document dragged into another folder). Host PATCHes `href` with `values`.
1913
+ */
1914
+ "onMrdUpdateObject"?: (event: MrdLayoutSectionCustomEvent<{ href: string; values: Record<string, unknown> }>) => void;
1480
1915
  /**
1481
1916
  * Re-emitted from an embedded mrd-table's mrdAction; host builds the target URL from dataClass.
1482
1917
  */
1483
1918
  "onMrdViewAction"?: (event: MrdLayoutSectionCustomEvent<{ name: string; action: string; dataClass: string; path?: string; qs?: string; parentPath?: string | null; basicType?: string }>) => void;
1919
+ /**
1920
+ * An external file was dropped on a document view; host uploads and calls setViewFileReference(name, uri).
1921
+ */
1922
+ "onMrdViewUpload"?: (event: MrdLayoutSectionCustomEvent<{ name: string; file: File }>) => void;
1484
1923
  /**
1485
1924
  * Legacy: view metadata map (ClientDashboardMetadata.views). Not needed in new flat format.
1486
1925
  * @default {}
@@ -1687,7 +2126,7 @@ declare namespace LocalJSX {
1687
2126
  * The VIEW or RELATED_VIEW layout item. Contains view config, dataClass, fromClass, actions etc.
1688
2127
  * @default null
1689
2128
  */
1690
- "item"?: ClientLayoutItem1 | null;
2129
+ "item"?: ClientLayoutItem | null;
1691
2130
  /**
1692
2131
  * @default navigator.language
1693
2132
  */
@@ -1867,6 +2306,18 @@ declare namespace LocalJSX {
1867
2306
  "disabled": boolean;
1868
2307
  "locale": string;
1869
2308
  }
2309
+ interface MrdDocumentContainerAttributes {
2310
+ "parentId": string;
2311
+ "viewKey": string;
2312
+ "locale": string;
2313
+ }
2314
+ interface MrdDocumentListAttributes {
2315
+ "parentId": string;
2316
+ "locale": string;
2317
+ }
2318
+ interface MrdDocumentViewAttributes {
2319
+ "locale": string;
2320
+ }
1870
2321
  interface MrdEmailFieldAttributes {
1871
2322
  "name": string;
1872
2323
  "label": string;
@@ -2007,6 +2458,9 @@ declare namespace LocalJSX {
2007
2458
  "mrd-currency-field": Omit<MrdCurrencyField, keyof MrdCurrencyFieldAttributes> & { [K in keyof MrdCurrencyField & keyof MrdCurrencyFieldAttributes]?: MrdCurrencyField[K] } & { [K in keyof MrdCurrencyField & keyof MrdCurrencyFieldAttributes as `attr:${K}`]?: MrdCurrencyFieldAttributes[K] } & { [K in keyof MrdCurrencyField & keyof MrdCurrencyFieldAttributes as `prop:${K}`]?: MrdCurrencyField[K] };
2008
2459
  "mrd-date-field": Omit<MrdDateField, keyof MrdDateFieldAttributes> & { [K in keyof MrdDateField & keyof MrdDateFieldAttributes]?: MrdDateField[K] } & { [K in keyof MrdDateField & keyof MrdDateFieldAttributes as `attr:${K}`]?: MrdDateFieldAttributes[K] } & { [K in keyof MrdDateField & keyof MrdDateFieldAttributes as `prop:${K}`]?: MrdDateField[K] };
2009
2460
  "mrd-datetime-field": Omit<MrdDatetimeField, keyof MrdDatetimeFieldAttributes> & { [K in keyof MrdDatetimeField & keyof MrdDatetimeFieldAttributes]?: MrdDatetimeField[K] } & { [K in keyof MrdDatetimeField & keyof MrdDatetimeFieldAttributes as `attr:${K}`]?: MrdDatetimeFieldAttributes[K] } & { [K in keyof MrdDatetimeField & keyof MrdDatetimeFieldAttributes as `prop:${K}`]?: MrdDatetimeField[K] };
2461
+ "mrd-document-container": Omit<MrdDocumentContainer, keyof MrdDocumentContainerAttributes> & { [K in keyof MrdDocumentContainer & keyof MrdDocumentContainerAttributes]?: MrdDocumentContainer[K] } & { [K in keyof MrdDocumentContainer & keyof MrdDocumentContainerAttributes as `attr:${K}`]?: MrdDocumentContainerAttributes[K] } & { [K in keyof MrdDocumentContainer & keyof MrdDocumentContainerAttributes as `prop:${K}`]?: MrdDocumentContainer[K] };
2462
+ "mrd-document-list": Omit<MrdDocumentList, keyof MrdDocumentListAttributes> & { [K in keyof MrdDocumentList & keyof MrdDocumentListAttributes]?: MrdDocumentList[K] } & { [K in keyof MrdDocumentList & keyof MrdDocumentListAttributes as `attr:${K}`]?: MrdDocumentListAttributes[K] } & { [K in keyof MrdDocumentList & keyof MrdDocumentListAttributes as `prop:${K}`]?: MrdDocumentList[K] };
2463
+ "mrd-document-view": Omit<MrdDocumentView, keyof MrdDocumentViewAttributes> & { [K in keyof MrdDocumentView & keyof MrdDocumentViewAttributes]?: MrdDocumentView[K] } & { [K in keyof MrdDocumentView & keyof MrdDocumentViewAttributes as `attr:${K}`]?: MrdDocumentViewAttributes[K] } & { [K in keyof MrdDocumentView & keyof MrdDocumentViewAttributes as `prop:${K}`]?: MrdDocumentView[K] };
2010
2464
  "mrd-email-field": Omit<MrdEmailField, keyof MrdEmailFieldAttributes> & { [K in keyof MrdEmailField & keyof MrdEmailFieldAttributes]?: MrdEmailField[K] } & { [K in keyof MrdEmailField & keyof MrdEmailFieldAttributes as `attr:${K}`]?: MrdEmailFieldAttributes[K] } & { [K in keyof MrdEmailField & keyof MrdEmailFieldAttributes as `prop:${K}`]?: MrdEmailField[K] };
2011
2465
  "mrd-field": Omit<MrdField, keyof MrdFieldAttributes> & { [K in keyof MrdField & keyof MrdFieldAttributes]?: MrdField[K] } & { [K in keyof MrdField & keyof MrdFieldAttributes as `attr:${K}`]?: MrdFieldAttributes[K] } & { [K in keyof MrdField & keyof MrdFieldAttributes as `prop:${K}`]?: MrdField[K] };
2012
2466
  "mrd-file-field": Omit<MrdFileField, keyof MrdFileFieldAttributes> & { [K in keyof MrdFileField & keyof MrdFileFieldAttributes]?: MrdFileField[K] } & { [K in keyof MrdFileField & keyof MrdFileFieldAttributes as `attr:${K}`]?: MrdFileFieldAttributes[K] } & { [K in keyof MrdFileField & keyof MrdFileFieldAttributes as `prop:${K}`]?: MrdFileField[K] };
@@ -2033,6 +2487,44 @@ declare module "@stencil/core" {
2033
2487
  "mrd-currency-field": LocalJSX.IntrinsicElements["mrd-currency-field"] & JSXBase.HTMLAttributes<HTMLMrdCurrencyFieldElement>;
2034
2488
  "mrd-date-field": LocalJSX.IntrinsicElements["mrd-date-field"] & JSXBase.HTMLAttributes<HTMLMrdDateFieldElement>;
2035
2489
  "mrd-datetime-field": LocalJSX.IntrinsicElements["mrd-datetime-field"] & JSXBase.HTMLAttributes<HTMLMrdDatetimeFieldElement>;
2490
+ /**
2491
+ * Owns a document collection view: a single toolbar (view switch + collection
2492
+ * actions like "New folder", and — later — upload / drag-drop) plus the two
2493
+ * interchangeable bodies, the folder tree (`mrd-document-list`) and the flat
2494
+ * table (`mrd-table`).
2495
+ * `mrd-layout-section` renders one of these per document VIEW / RELATED_VIEW and
2496
+ * forwards the re-emitted load/navigate/action events to the host. The embedded
2497
+ * table/list keep their `data-view` / `data-doclist` attributes so the host's
2498
+ * existing `setViewPage` / `setViewDistinct` / `setViewAggregations` lookups
2499
+ * (recursive querySelector) still resolve them unchanged.
2500
+ */
2501
+ "mrd-document-container": LocalJSX.IntrinsicElements["mrd-document-container"] & JSXBase.HTMLAttributes<HTMLMrdDocumentContainerElement>;
2502
+ /**
2503
+ * Archetype-driven document collection view. Renders documents as a lazy,
2504
+ * file-explorer-style folder tree, grouped by the `commons.document` archetype's
2505
+ * `container` (dossier, the top folder) and `folder` (a path string like
2506
+ * `/draft documents/may 2020`, the sub-path beneath it).
2507
+ * Loading is lazy per level, mirroring the /distinct endpoint (FINDING-0106):
2508
+ * - on load → `mrdLoadDistinct` for the `container` relation → top folders;
2509
+ * - on expanding a container → `mrdLoadDistinct` for the `folder` field, filtered
2510
+ * by `{containerField}_href` → all folder path strings for that container
2511
+ * (the client splits them on `/` and builds the sub-tree locally);
2512
+ * - on expanding a node that holds documents → `mrdLoadPage` (a plain filtered list
2513
+ * load, the same one a table page uses), filtered by container + exact folder string.
2514
+ * When exactly one container exists (e.g. a dossier detail page) the container
2515
+ * level is hidden and its folder tree is shown directly at the root.
2516
+ */
2517
+ "mrd-document-list": LocalJSX.IntrinsicElements["mrd-document-list"] & JSXBase.HTMLAttributes<HTMLMrdDocumentListElement>;
2518
+ /**
2519
+ * Archetype-driven single-document view. Given a `commons.document` binding and a
2520
+ * data record, renders the document recognisably — title, file preview/download,
2521
+ * summary and date — plus a navigation link to the container (the dossier),
2522
+ * instead of a generic field form.
2523
+ * The component keys on the slot→field map (`archetype.slots`) to locate values:
2524
+ * value slots read `data[field]`; the `container` relation slot reads
2525
+ * `data._links[field]` (`{ href, name }`). Empty slots are omitted.
2526
+ */
2527
+ "mrd-document-view": LocalJSX.IntrinsicElements["mrd-document-view"] & JSXBase.HTMLAttributes<HTMLMrdDocumentViewElement>;
2036
2528
  "mrd-email-field": LocalJSX.IntrinsicElements["mrd-email-field"] & JSXBase.HTMLAttributes<HTMLMrdEmailFieldElement>;
2037
2529
  "mrd-field": LocalJSX.IntrinsicElements["mrd-field"] & JSXBase.HTMLAttributes<HTMLMrdFieldElement>;
2038
2530
  "mrd-file-field": LocalJSX.IntrinsicElements["mrd-file-field"] & JSXBase.HTMLAttributes<HTMLMrdFileFieldElement>;