@mmlogic/components 0.4.3 → 0.5.1

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/client-layout-RZ3Ix-4a.js +87 -0
  2. package/dist/cjs/{index-CAzwGt9u.js → index-DzRfoAPz.js} +36 -9
  3. package/dist/cjs/index.cjs.js +56 -81
  4. package/dist/cjs/loader.cjs.js +2 -2
  5. package/dist/cjs/mosterdcomponents.cjs.js +3 -3
  6. package/dist/cjs/{mrd-boolean-field_24.cjs.entry.js → mrd-boolean-field_23.cjs.entry.js} +159 -286
  7. package/dist/collection/collection-manifest.json +1 -2
  8. package/dist/collection/components/documents/mrd-document-container/mrd-document-container.css +0 -17
  9. package/dist/collection/components/documents/mrd-document-container/mrd-document-container.js +12 -4
  10. package/dist/collection/components/documents/mrd-document-list/mrd-document-list.css +9 -43
  11. package/dist/collection/components/documents/mrd-document-list/mrd-document-list.js +14 -6
  12. package/dist/collection/components/documents/mrd-document-view/mrd-document-view.css +30 -68
  13. package/dist/collection/components/documents/mrd-document-view/mrd-document-view.js +49 -90
  14. package/dist/collection/components/fields/mrd-boolean-field/mrd-boolean-field.css +0 -10
  15. package/dist/collection/components/fields/mrd-currency-field/mrd-currency-field.css +0 -7
  16. package/dist/collection/components/fields/mrd-file-field/mrd-file-field.css +0 -11
  17. package/dist/collection/components/fields/mrd-hyperlink-field/mrd-hyperlink-field.css +0 -3
  18. package/dist/collection/components/fields/mrd-image-field/mrd-image-field.css +6 -20
  19. package/dist/collection/components/fields/mrd-list-field/mrd-list-field.css +0 -4
  20. package/dist/collection/components/fields/mrd-longtext-field/mrd-longtext-field.css +0 -1
  21. package/dist/collection/components/fields/mrd-relation-field/mrd-relation-field.css +9 -35
  22. package/dist/collection/components/fields/mrd-textarea-field/mrd-textarea-field.css +0 -9
  23. package/dist/collection/components/form/mrd-field/mrd-field.css +0 -13
  24. package/dist/collection/components/form/mrd-form/mrd-form.css +0 -19
  25. package/dist/collection/components/layout/mrd-layout-section/mrd-layout-section.css +3 -58
  26. package/dist/collection/components/layout/mrd-layout-section/mrd-layout-section.js +25 -66
  27. package/dist/collection/components/table/mrd-table/mrd-table.css +38 -185
  28. package/dist/collection/components/table/mrd-table/mrd-table.js +3 -5
  29. package/dist/collection/components/table/mrd-table/table-parts.js +2 -5
  30. package/dist/collection/dev/app.js +76 -40
  31. package/dist/collection/dev/example-data.js +2 -1
  32. package/dist/collection/index.js +1 -0
  33. package/dist/collection/utils/document-attachments.js +20 -0
  34. package/dist/collection/{components/documents/mrd-file-preview → utils}/file-preview-kind.js +4 -4
  35. package/dist/collection/utils/i18n.js +0 -32
  36. package/dist/components/document-attachments.js +1 -0
  37. package/dist/components/field-helpers.js +1 -1
  38. package/dist/components/i18n.js +1 -1
  39. package/dist/components/index.js +1 -1
  40. package/dist/components/mrd-document-container2.js +1 -1
  41. package/dist/components/mrd-document-list2.js +1 -1
  42. package/dist/components/mrd-document-view2.js +1 -1
  43. package/dist/components/mrd-email-field2.js +1 -1
  44. package/dist/components/mrd-form.js +1 -1
  45. package/dist/components/mrd-hyperlink-field2.js +1 -1
  46. package/dist/components/mrd-image-field2.js +1 -1
  47. package/dist/components/mrd-layout-section.js +1 -1
  48. package/dist/components/mrd-number-field2.js +1 -1
  49. package/dist/components/mrd-relation-field2.js +1 -1
  50. package/dist/components/mrd-table2.js +1 -1
  51. package/dist/esm/client-layout-DCOAAH92.js +84 -0
  52. package/dist/esm/{index-DiSEJMA8.js → index-DiSe6vjv.js} +36 -9
  53. package/dist/esm/index.js +30 -80
  54. package/dist/esm/loader.js +3 -3
  55. package/dist/esm/mosterdcomponents.js +4 -4
  56. package/dist/esm/{mrd-boolean-field_24.entry.js → mrd-boolean-field_23.entry.js} +69 -195
  57. package/dist/mosterdcomponents/index.esm.js +1 -1
  58. package/dist/mosterdcomponents/mosterdcomponents.css +7 -1
  59. package/dist/mosterdcomponents/mosterdcomponents.esm.js +1 -1
  60. package/dist/mosterdcomponents/p-DCOAAH92.js +1 -0
  61. package/dist/mosterdcomponents/p-DiSe6vjv.js +2 -0
  62. package/dist/mosterdcomponents/p-cdecc698.entry.js +1 -0
  63. package/dist/types/components/documents/mrd-document-container/mrd-document-container.d.ts +4 -2
  64. package/dist/types/components/documents/mrd-document-list/mrd-document-list.d.ts +6 -2
  65. package/dist/types/components/documents/mrd-document-view/mrd-document-view.d.ts +27 -29
  66. package/dist/types/components/layout/mrd-layout-section/mrd-layout-section.d.ts +12 -15
  67. package/dist/types/components.d.ts +61 -195
  68. package/dist/types/index.d.ts +2 -0
  69. package/dist/types/stencil-public-runtime.d.ts +1 -0
  70. package/dist/types/types/client-layout.d.ts +10 -3
  71. package/dist/types/utils/document-attachments.d.ts +8 -0
  72. package/dist/types/utils/file-preview-kind.d.ts +9 -0
  73. package/package.json +10 -12
  74. package/dist/collection/components/documents/mrd-file-preview/mrd-file-preview.css +0 -59
  75. package/dist/collection/components/documents/mrd-file-preview/mrd-file-preview.js +0 -212
  76. package/dist/components/mrd-file-preview.d.ts +0 -11
  77. package/dist/components/mrd-file-preview.js +0 -1
  78. package/dist/components/mrd-file-preview2.js +0 -1
  79. package/dist/mosterdcomponents/p-DiSEJMA8.js +0 -2
  80. package/dist/mosterdcomponents/p-e816d459.entry.js +0 -1
  81. package/dist/types/components/documents/mrd-file-preview/file-preview-kind.d.ts +0 -9
  82. package/dist/types/components/documents/mrd-file-preview/mrd-file-preview.d.ts +0 -41
@@ -3,7 +3,6 @@
3
3
  "components/documents/mrd-document-container/mrd-document-container.js",
4
4
  "components/documents/mrd-document-list/mrd-document-list.js",
5
5
  "components/documents/mrd-document-view/mrd-document-view.js",
6
- "components/documents/mrd-file-preview/mrd-file-preview.js",
7
6
  "components/fields/mrd-boolean-field/mrd-boolean-field.js",
8
7
  "components/fields/mrd-currency-field/mrd-currency-field.js",
9
8
  "components/fields/mrd-date-field/mrd-date-field.js",
@@ -28,7 +27,7 @@
28
27
  "mixins": [],
29
28
  "compiler": {
30
29
  "name": "@stencil/core",
31
- "version": "4.43.2",
30
+ "version": "4.43.5",
32
31
  "typescriptVersion": "5.8.3"
33
32
  },
34
33
  "collections": [],
@@ -7,23 +7,14 @@
7
7
  align-items: center;
8
8
  justify-content: flex-end;
9
9
  gap: var(--mrd-space-2);
10
- /* Horizontal padding intentionally 0: mrd-table__toolbar is flush with its
11
- card body too, so the two sibling views' buttons line up on the same
12
- left/right edge as their bodies below. */
13
10
  padding: var(--mrd-space-2) 0;
14
11
  border-bottom: 1px solid var(--mrd-color-neutral-100);
15
12
  }
16
-
17
- /* Card frame matching .mrd-table__scroll, so the tree view reads as an inset
18
- panel like the sibling table view instead of bleeding to the tab edges.
19
- The list mode doesn't need this: the embedded mrd-table already draws its
20
- own .mrd-table__scroll frame. */
21
13
  .mrd-document-container__body--tree {
22
14
  border: 1px solid var(--mrd-border-color);
23
15
  border-radius: var(--mrd-border-radius);
24
16
  overflow: hidden;
25
17
  }
26
-
27
18
  .mrd-document-container__action {
28
19
  display: inline-flex;
29
20
  align-items: center;
@@ -38,23 +29,19 @@
38
29
  cursor: pointer;
39
30
  transition: background var(--mrd-transition-fast), border-color var(--mrd-transition-fast);
40
31
  }
41
-
42
32
  .mrd-document-container__action svg {
43
33
  width: 1rem;
44
34
  height: 1rem;
45
35
  color: var(--mrd-color-folder);
46
36
  }
47
-
48
37
  .mrd-document-container__action:hover:not(:disabled) {
49
38
  background: var(--mrd-color-neutral-50);
50
39
  border-color: var(--mrd-color-neutral-300);
51
40
  }
52
-
53
41
  .mrd-document-container__action:disabled {
54
42
  opacity: 0.5;
55
43
  cursor: not-allowed;
56
44
  }
57
-
58
45
  .mrd-document-container__seg {
59
46
  display: inline-flex;
60
47
  gap: 2px;
@@ -62,7 +49,6 @@
62
49
  background: var(--mrd-color-neutral-100);
63
50
  border-radius: var(--mrd-border-radius);
64
51
  }
65
-
66
52
  .mrd-document-container__seg-btn {
67
53
  width: 1.875rem;
68
54
  height: 1.625rem;
@@ -75,17 +61,14 @@
75
61
  cursor: pointer;
76
62
  transition: color var(--mrd-transition-fast), background var(--mrd-transition-fast);
77
63
  }
78
-
79
64
  .mrd-document-container__seg-btn:hover {
80
65
  color: var(--mrd-color-neutral-800);
81
66
  }
82
-
83
67
  .mrd-document-container__seg-btn[aria-pressed=true] {
84
68
  background: var(--mrd-color-white);
85
69
  color: var(--mrd-color-primary-dark);
86
70
  box-shadow: var(--mrd-shadow-sm);
87
71
  }
88
-
89
72
  .mrd-document-container__seg-btn svg {
90
73
  width: 1rem;
91
74
  height: 1rem;
@@ -1,6 +1,7 @@
1
1
  import { Host, h } from "@stencil/core";
2
2
  import { ClientLayoutNavigateBehaviour } from "../../../types/client-layout";
3
3
  import { t } from "../../../utils/i18n";
4
+ import { attachmentsFromRecord } from "../../../utils/document-attachments";
4
5
  /**
5
6
  * Owns a document collection view: a single toolbar (view switch + collection
6
7
  * actions like "New folder", and — later — upload / drag-drop) plus the two
@@ -104,6 +105,7 @@ export class MrdDocumentContainer {
104
105
  label: (_c = row === null || row === void 0 ? void 0 : row.name) !== null && _c !== void 0 ? _c : '',
105
106
  navigateBehaviour: ClientLayoutNavigateBehaviour.OVERLAY_PAGE,
106
107
  listContext,
108
+ attachments: attachmentsFromRecord(this.archetype, row),
107
109
  });
108
110
  }, onMrdAction: (e) => {
109
111
  e.stopPropagation();
@@ -112,7 +114,7 @@ export class MrdDocumentContainer {
112
114
  }
113
115
  render() {
114
116
  const treeMode = this.mode === 'tree';
115
- return (h(Host, { key: '7d0523d66f9a3d189dcc5517cd7281a57456977d' }, this.renderToolbar(), h("div", { key: '19b0f416d2ad1b093afd6f799670debf8c18b225', class: {
117
+ return (h(Host, { key: '4d21f26c956773c63cbf5118394c6afa29d6014d' }, this.renderToolbar(), h("div", { key: 'bc070236bf9a7d0eba57aa2cd70fa3ae36cbf5f1', class: {
116
118
  'mrd-document-container__body': true,
117
119
  'mrd-document-container__body--tree': treeMode,
118
120
  }, style: treeMode ? { height: `${this.height}px`, overflowY: 'auto' } : {} }, treeMode ? this.renderTree() : this.renderList())));
@@ -342,11 +344,11 @@ export class MrdDocumentContainer {
342
344
  "composed": true,
343
345
  "docs": {
344
346
  "tags": [],
345
- "text": "A row / document was activated. Host routes to the object page. Documents\nare always the \"quick look\" use case, so navigateBehaviour is hardcoded\nto OVERLAY_PAGE here \u2014 unlike the generic VIEW/RELATED_VIEW table path in\nmrd-layout-section, which takes it from the item's configuration."
347
+ "text": "A row / document was activated. Host routes to the object page. Documents\nare always the \"quick look\" use case, so navigateBehaviour is hardcoded\nto OVERLAY_PAGE here \u2014 unlike the generic VIEW/RELATED_VIEW table path in\nmrd-layout-section, which takes it from the item's configuration.\n`attachments` prefetches the clicked row's file slot (see TASK-0169)."
346
348
  },
347
349
  "complexType": {
348
- "original": "{ href?: string; label: string; navigateBehaviour?: ClientLayoutNavigateBehaviour; listContext?: ListNavigationContext }",
349
- "resolved": "{ href?: string | undefined; label: string; navigateBehaviour?: ClientLayoutNavigateBehaviour | undefined; listContext?: ListNavigationContext | undefined; }",
350
+ "original": "{ href?: string; label: string; navigateBehaviour?: ClientLayoutNavigateBehaviour; listContext?: ListNavigationContext; attachments?: DocumentAttachment[] }",
351
+ "resolved": "{ href?: string | undefined; label: string; navigateBehaviour?: ClientLayoutNavigateBehaviour | undefined; listContext?: ListNavigationContext | undefined; attachments?: DocumentAttachment[] | undefined; }",
350
352
  "references": {
351
353
  "ClientLayoutNavigateBehaviour": {
352
354
  "location": "import",
@@ -359,6 +361,12 @@ export class MrdDocumentContainer {
359
361
  "path": "../../../utils/query-params",
360
362
  "id": "src/utils/query-params.ts::ListNavigationContext",
361
363
  "referenceLocation": "ListNavigationContext"
364
+ },
365
+ "DocumentAttachment": {
366
+ "location": "import",
367
+ "path": "../../../types/client-layout",
368
+ "id": "src/types/client-layout.ts::DocumentAttachment",
369
+ "referenceLocation": "DocumentAttachment"
362
370
  }
363
371
  }
364
372
  }
@@ -1,4 +1,3 @@
1
- @charset "UTF-8";
2
1
  :host {
3
2
  display: block;
4
3
  height: 100%;
@@ -9,68 +8,54 @@
9
8
  min-height: 100%;
10
9
  box-sizing: border-box;
11
10
  }
12
-
13
- /* Whole-area highlight while a file/document is dragged over the root (dossier
14
- context) — makes the drop target obvious, Finder-style. */
15
11
  .mrd-document-list--drop-active {
16
12
  outline: 2px dashed var(--mrd-color-primary);
17
13
  outline-offset: -4px;
18
14
  background: var(--mrd-color-primary-50, rgba(22, 163, 74, 0.06));
19
15
  }
20
-
21
16
  .mrd-document-list__row {
22
17
  display: flex;
23
18
  align-items: center;
24
19
  gap: var(--mrd-space-1);
25
20
  height: 2.125rem;
26
- /* Asymmetric: a narrow left gutter (Finder-style — the disclosure triangle
27
- sits in the margin, not indented behind a full column) vs. a roomier
28
- right side for the count/date columns. */
29
21
  padding: 0 var(--mrd-space-4) 0 var(--mrd-space-2);
30
22
  cursor: pointer;
31
23
  user-select: none;
32
24
  font-size: var(--mrd-font-size-sm);
33
25
  color: var(--mrd-color-neutral-800);
34
26
  }
35
-
36
27
  .mrd-document-list__row:hover {
37
28
  background: var(--mrd-color-neutral-50);
38
29
  }
39
-
40
30
  .mrd-document-list__row--selected {
41
31
  background: var(--mrd-color-primary-50, rgba(22, 163, 74, 0.1));
42
32
  }
43
-
44
33
  .mrd-document-list__row--selected:hover {
45
34
  background: var(--mrd-color-primary-50, rgba(22, 163, 74, 0.1));
46
35
  }
47
-
48
36
  .mrd-document-list__row--pending .mrd-document-list__label {
49
37
  font-style: italic;
50
38
  color: var(--mrd-color-neutral-500);
51
39
  }
52
-
53
40
  .mrd-document-list__row--doc {
54
41
  cursor: grab;
55
42
  }
56
-
57
43
  .mrd-document-list__row--doc:active {
58
44
  cursor: grabbing;
59
45
  }
60
-
61
46
  .mrd-document-list__row--drop {
62
47
  background: var(--mrd-color-primary-50, rgba(22, 163, 74, 0.1));
63
48
  box-shadow: inset 0 0 0 1px var(--mrd-color-primary);
64
49
  }
65
-
66
50
  .mrd-document-list__row--drop:hover {
67
51
  background: var(--mrd-color-primary-50, rgba(22, 163, 74, 0.1));
68
52
  }
69
-
70
53
  .mrd-document-list__row--edit {
71
54
  cursor: default;
72
55
  }
73
-
56
+ .mrd-document-list__row--dossier .mrd-document-list__label {
57
+ font-weight: var(--mrd-font-weight-semibold);
58
+ }
74
59
  .mrd-document-list__name-input {
75
60
  flex: 1;
76
61
  min-width: 0;
@@ -84,22 +69,15 @@
84
69
  outline: none;
85
70
  box-shadow: var(--mrd-shadow-focus);
86
71
  }
87
-
88
72
  .mrd-document-list__error {
89
73
  font-size: var(--mrd-font-size-xs);
90
74
  color: var(--mrd-color-danger, #dc2626);
91
75
  padding-top: 0.125rem;
92
76
  padding-bottom: 0.25rem;
93
77
  }
94
-
95
- .mrd-document-list__row--dossier .mrd-document-list__label {
96
- font-weight: var(--mrd-font-weight-semibold);
97
- }
98
-
99
78
  .mrd-document-list__indent {
100
79
  flex: none;
101
80
  }
102
-
103
81
  .mrd-document-list__chev {
104
82
  width: 0.875rem;
105
83
  height: 1rem;
@@ -109,45 +87,36 @@
109
87
  color: var(--mrd-color-neutral-400);
110
88
  transition: transform var(--mrd-transition-fast);
111
89
  }
112
-
113
90
  .mrd-document-list__chev svg {
114
91
  width: 0.6875rem;
115
92
  height: 0.6875rem;
116
93
  }
117
-
118
94
  .mrd-document-list__chev--open {
119
95
  transform: rotate(90deg);
120
96
  }
121
-
122
97
  .mrd-document-list__chev--leaf {
123
98
  visibility: hidden;
124
99
  }
125
-
126
100
  .mrd-document-list__icon {
127
101
  width: 1.0625rem;
128
102
  height: 1.0625rem;
129
103
  flex: none;
130
104
  }
131
-
132
105
  .mrd-document-list__icon--dossier {
133
106
  color: var(--mrd-color-primary);
134
107
  }
135
-
136
108
  .mrd-document-list__icon--folder {
137
109
  color: var(--mrd-color-folder);
138
110
  }
139
-
140
111
  .mrd-document-list__icon--doc {
141
112
  color: var(--mrd-color-neutral-400);
142
113
  }
143
-
144
114
  .mrd-document-list__label {
145
115
  flex: 1;
146
116
  white-space: nowrap;
147
117
  overflow: hidden;
148
118
  text-overflow: ellipsis;
149
119
  }
150
-
151
120
  .mrd-document-list__count {
152
121
  flex: none;
153
122
  font-family: var(--mrd-font-family-mono);
@@ -157,14 +126,12 @@
157
126
  border-radius: var(--mrd-border-radius-full);
158
127
  padding: 0.0625rem 0.5rem;
159
128
  }
160
-
161
129
  .mrd-document-list__date {
162
130
  flex: none;
163
131
  font-size: var(--mrd-font-size-xs);
164
132
  color: var(--mrd-color-neutral-400);
165
133
  font-variant-numeric: tabular-nums;
166
134
  }
167
-
168
135
  .mrd-document-list__loading {
169
136
  display: flex;
170
137
  align-items: center;
@@ -174,7 +141,6 @@
174
141
  font-size: var(--mrd-font-size-xs);
175
142
  color: var(--mrd-color-neutral-400);
176
143
  }
177
-
178
144
  .mrd-document-list__spinner {
179
145
  width: 0.75rem;
180
146
  height: 0.75rem;
@@ -183,15 +149,15 @@
183
149
  border-radius: 50%;
184
150
  animation: mrd-document-list-spin 0.7s linear infinite;
185
151
  }
186
-
187
- @keyframes mrd-document-list-spin {
188
- to {
189
- transform: rotate(360deg);
190
- }
191
- }
192
152
  .mrd-document-list__empty {
193
153
  padding: var(--mrd-space-8) var(--mrd-space-4);
194
154
  text-align: center;
195
155
  color: var(--mrd-color-neutral-400);
196
156
  font-size: var(--mrd-font-size-sm);
157
+ }
158
+
159
+ @keyframes mrd-document-list-spin {
160
+ to {
161
+ transform: rotate(360deg);
162
+ }
197
163
  }
@@ -2,6 +2,7 @@ import { Host, h } from "@stencil/core";
2
2
  import { ClientLayoutItemType } from "../../../types/client-layout";
3
3
  import { t } from "../../../utils/i18n";
4
4
  import { applyViewFilters, buildListPath } from "../../../utils/query-params";
5
+ import { attachmentsFromRecord } from "../../../utils/document-attachments";
5
6
  import { makeContainerNode, makeFolderNode, computeTotals, segmentsOf, folderStringOf, stripExtension, applyFolderDistinct, applyDocMove, } from "./folder-tree";
6
7
  import { renderLoadingRow, renderNodeChildren, renderContainerNode } from "./tree-view";
7
8
  /**
@@ -614,7 +615,8 @@ export class MrdDocumentList {
614
615
  const listContext = index >= 0
615
616
  ? { index, sort: '', path: this.buildDataPath(), qs: this.buildDocQs(container, node) }
616
617
  : undefined;
617
- this.mrdNavigate.emit({ href, label, listContext });
618
+ const attachments = attachmentsFromRecord(this.archetype, doc);
619
+ this.mrdNavigate.emit({ href, label, listContext, attachments });
618
620
  }
619
621
  // ── Render ───────────────────────────────────────────────────────────────
620
622
  treeCtx() {
@@ -648,7 +650,7 @@ export class MrdDocumentList {
648
650
  body = renderLoadingRow(ctx, 0);
649
651
  }
650
652
  else if (this.containers.length === 0) {
651
- body = h("div", { key: '49157721108db3b03c8c5e6550692b42dfc2e113', class: "mrd-document-list__empty" }, t('no_results', this.locale));
653
+ body = h("div", { key: '308725d741deb384082bd514edd34593f7d662a2', class: "mrd-document-list__empty" }, t('no_results', this.locale));
652
654
  }
653
655
  else if (this.singleContainer) {
654
656
  // Dossier context: render the single container's folder tree at the root.
@@ -666,7 +668,7 @@ export class MrdDocumentList {
666
668
  else {
667
669
  body = this.containers.map(c => renderContainerNode(ctx, c, 0));
668
670
  }
669
- return (h(Host, { key: 'b6d3dd44036a9215979a0dbec699902f308fbeb5' }, h("div", { key: '8ec0e58cb5e7192f7a9af9062dd5bc7f7bb00713', class: 'mrd-document-list' + (this.rootDropActive ? ' mrd-document-list--drop-active' : ''), onDragOver: this.onRootDragOver, onDragLeave: this.onRootDragLeave, onDrop: this.onRootDrop }, body)));
671
+ return (h(Host, { key: '9d5fde912999b57a0f0b737980d59e94f385f11d' }, h("div", { key: '17191411c2e626995f08b66bad755342fe3b13ae', class: 'mrd-document-list' + (this.rootDropActive ? ' mrd-document-list--drop-active' : ''), onDragOver: this.onRootDragOver, onDragLeave: this.onRootDragLeave, onDrop: this.onRootDrop }, body)));
670
672
  }
671
673
  static get is() { return "mrd-document-list"; }
672
674
  static get encapsulation() { return "scoped"; }
@@ -843,17 +845,23 @@ export class MrdDocumentList {
843
845
  "composed": true,
844
846
  "docs": {
845
847
  "tags": [],
846
- "text": "A document row was clicked. Host routes to the document object page. `listContext` can\nbe used to re-fetch this exact record (or its neighbours) via `{path}?{qs}&page={index}&size=1`."
848
+ "text": "A document row was clicked. Host routes to the document object page. `listContext` can\nbe used to re-fetch this exact record (or its neighbours) via `{path}?{qs}&page={index}&size=1`.\n`attachments` is a prefetch of the clicked row's own file slot (derived from `archetype`)\nso the host can render a preview immediately, without waiting for the navigated-to\npage's own mrdAttachments \u2014 see TASK-0169 / FINDING-0111."
847
849
  },
848
850
  "complexType": {
849
- "original": "{ href?: string; label: string; listContext?: ListNavigationContext }",
850
- "resolved": "{ href?: string | undefined; label: string; listContext?: ListNavigationContext | undefined; }",
851
+ "original": "{ href?: string; label: string; listContext?: ListNavigationContext; attachments?: DocumentAttachment[] }",
852
+ "resolved": "{ href?: string | undefined; label: string; listContext?: ListNavigationContext | undefined; attachments?: DocumentAttachment[] | undefined; }",
851
853
  "references": {
852
854
  "ListNavigationContext": {
853
855
  "location": "import",
854
856
  "path": "../../../utils/query-params",
855
857
  "id": "src/utils/query-params.ts::ListNavigationContext",
856
858
  "referenceLocation": "ListNavigationContext"
859
+ },
860
+ "DocumentAttachment": {
861
+ "location": "import",
862
+ "path": "../../../types/client-layout",
863
+ "id": "src/types/client-layout.ts::DocumentAttachment",
864
+ "referenceLocation": "DocumentAttachment"
857
865
  }
858
866
  }
859
867
  }
@@ -1,53 +1,49 @@
1
1
  :host {
2
2
  display: block;
3
- container-type: inline-size;
4
- container-name: mrd-document-view;
5
3
  }
6
4
 
7
5
  .mrd-document-view {
8
- max-width: 1200px;
6
+ max-width: 640px;
9
7
  }
10
-
11
8
  .mrd-document-view__body {
12
- display: grid;
13
- grid-template-columns: 1fr;
9
+ display: flex;
10
+ flex-direction: column;
14
11
  gap: var(--mrd-space-6);
15
12
  }
16
-
17
- @container mrd-document-view (min-width: 640px) {
18
- .mrd-document-view__body {
19
- grid-template-columns: minmax(220px, 320px) 1fr !important;
20
- align-items: stretch !important;
21
- }
22
- .mrd-document-view__crumb {
23
- margin-bottom: var(--mrd-space-2) !important;
24
- }
25
- }
26
- .mrd-document-view__crumb {
27
- display: inline-flex;
28
- align-items: center;
29
- gap: var(--mrd-space-2);
30
- margin-bottom: var(--mrd-space-4);
31
- padding: var(--mrd-space-1) var(--mrd-space-3);
32
- background: var(--mrd-color-primary-light);
33
- border: 1px solid transparent;
34
- border-radius: var(--mrd-border-radius);
13
+ .mrd-document-view__container {
14
+ display: flex;
15
+ flex-direction: column;
16
+ align-items: flex-start;
17
+ gap: var(--mrd-space-1);
18
+ margin-bottom: var(--mrd-space-6);
19
+ }
20
+ .mrd-document-view__container-link {
21
+ background: none;
22
+ border: none;
23
+ padding: 0;
35
24
  font-family: var(--mrd-font-family);
36
25
  font-size: var(--mrd-font-size-sm);
37
- color: var(--mrd-color-primary-dark);
26
+ font-weight: var(--mrd-font-weight-semibold);
27
+ color: var(--mrd-color-primary);
38
28
  cursor: pointer;
29
+ text-align: left;
39
30
  }
40
-
41
- .mrd-document-view__crumb:hover {
42
- border-color: var(--mrd-color-primary);
31
+ .mrd-document-view__container-link:hover {
32
+ text-decoration: underline;
43
33
  }
44
-
45
- .mrd-document-view__crumb-icon {
46
- width: 0.875rem;
47
- height: 0.875rem;
34
+ .mrd-document-view__folder {
35
+ display: inline-flex;
36
+ align-items: center;
37
+ gap: var(--mrd-space-1);
38
+ font-size: var(--mrd-font-size-xs);
39
+ color: var(--mrd-color-neutral-400);
40
+ word-break: break-word;
41
+ }
42
+ .mrd-document-view__folder-icon {
43
+ width: 0.75rem;
44
+ height: 0.75rem;
48
45
  flex-shrink: 0;
49
46
  }
50
-
51
47
  .mrd-document-view__title {
52
48
  font-size: var(--mrd-font-size-2xl);
53
49
  font-weight: var(--mrd-font-weight-bold);
@@ -55,48 +51,17 @@
55
51
  letter-spacing: -0.02em;
56
52
  margin: 0 0 var(--mrd-space-1) 0;
57
53
  }
58
-
59
54
  .mrd-document-view__date {
60
55
  font-size: var(--mrd-font-size-sm);
61
56
  color: var(--mrd-color-neutral-400);
62
57
  font-variant-numeric: tabular-nums;
63
58
  margin: 0 0 var(--mrd-space-6) 0;
64
59
  }
65
-
66
60
  .mrd-document-view__file-meta {
67
61
  display: flex;
68
62
  align-items: center;
69
- gap: var(--mrd-space-4);
70
63
  margin-bottom: var(--mrd-space-2);
71
64
  }
72
-
73
- .mrd-document-view__file-name {
74
- flex: 1;
75
- min-width: 0;
76
- font-weight: var(--mrd-font-weight-semibold);
77
- font-size: var(--mrd-font-size-sm);
78
- color: var(--mrd-color-neutral-800);
79
- word-break: break-word;
80
- }
81
-
82
- .mrd-document-view__preview {
83
- width: 100%;
84
- overflow: hidden;
85
- border: 1px solid var(--mrd-border-color);
86
- border-radius: var(--mrd-border-radius-md);
87
- background: var(--mrd-color-neutral-50);
88
- }
89
-
90
- .mrd-document-view__preview-loading {
91
- display: flex;
92
- align-items: center;
93
- justify-content: center;
94
- width: 100%;
95
- height: 100%;
96
- color: var(--mrd-color-neutral-500);
97
- font-size: var(--mrd-font-size-sm);
98
- }
99
-
100
65
  .mrd-document-view__download {
101
66
  display: inline-flex;
102
67
  align-items: center;
@@ -113,17 +78,14 @@
113
78
  color: var(--mrd-color-neutral-700);
114
79
  cursor: pointer;
115
80
  }
116
-
117
81
  .mrd-document-view__download:hover {
118
82
  background: var(--mrd-color-neutral-100);
119
83
  color: var(--mrd-color-neutral-900);
120
84
  }
121
-
122
85
  .mrd-document-view__download svg {
123
86
  width: 0.9375rem;
124
87
  height: 0.9375rem;
125
88
  }
126
-
127
89
  .mrd-document-view__summary-body {
128
90
  font-size: var(--mrd-font-size-base);
129
91
  color: var(--mrd-color-neutral-700);