@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.
- package/dist/cjs/client-layout-RZ3Ix-4a.js +87 -0
- package/dist/cjs/{index-CAzwGt9u.js → index-DzRfoAPz.js} +36 -9
- package/dist/cjs/index.cjs.js +56 -81
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/mosterdcomponents.cjs.js +3 -3
- package/dist/cjs/{mrd-boolean-field_24.cjs.entry.js → mrd-boolean-field_23.cjs.entry.js} +159 -286
- package/dist/collection/collection-manifest.json +1 -2
- package/dist/collection/components/documents/mrd-document-container/mrd-document-container.css +0 -17
- package/dist/collection/components/documents/mrd-document-container/mrd-document-container.js +12 -4
- package/dist/collection/components/documents/mrd-document-list/mrd-document-list.css +9 -43
- package/dist/collection/components/documents/mrd-document-list/mrd-document-list.js +14 -6
- package/dist/collection/components/documents/mrd-document-view/mrd-document-view.css +30 -68
- package/dist/collection/components/documents/mrd-document-view/mrd-document-view.js +49 -90
- package/dist/collection/components/fields/mrd-boolean-field/mrd-boolean-field.css +0 -10
- package/dist/collection/components/fields/mrd-currency-field/mrd-currency-field.css +0 -7
- package/dist/collection/components/fields/mrd-file-field/mrd-file-field.css +0 -11
- package/dist/collection/components/fields/mrd-hyperlink-field/mrd-hyperlink-field.css +0 -3
- package/dist/collection/components/fields/mrd-image-field/mrd-image-field.css +6 -20
- package/dist/collection/components/fields/mrd-list-field/mrd-list-field.css +0 -4
- package/dist/collection/components/fields/mrd-longtext-field/mrd-longtext-field.css +0 -1
- package/dist/collection/components/fields/mrd-relation-field/mrd-relation-field.css +9 -35
- package/dist/collection/components/fields/mrd-textarea-field/mrd-textarea-field.css +0 -9
- package/dist/collection/components/form/mrd-field/mrd-field.css +0 -13
- package/dist/collection/components/form/mrd-form/mrd-form.css +0 -19
- package/dist/collection/components/layout/mrd-layout-section/mrd-layout-section.css +3 -58
- package/dist/collection/components/layout/mrd-layout-section/mrd-layout-section.js +25 -66
- package/dist/collection/components/table/mrd-table/mrd-table.css +38 -185
- package/dist/collection/components/table/mrd-table/mrd-table.js +3 -5
- package/dist/collection/components/table/mrd-table/table-parts.js +2 -5
- package/dist/collection/dev/app.js +76 -40
- package/dist/collection/dev/example-data.js +2 -1
- package/dist/collection/index.js +1 -0
- package/dist/collection/utils/document-attachments.js +20 -0
- package/dist/collection/{components/documents/mrd-file-preview → utils}/file-preview-kind.js +4 -4
- package/dist/collection/utils/i18n.js +0 -32
- package/dist/components/document-attachments.js +1 -0
- package/dist/components/field-helpers.js +1 -1
- package/dist/components/i18n.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/mrd-document-container2.js +1 -1
- package/dist/components/mrd-document-list2.js +1 -1
- package/dist/components/mrd-document-view2.js +1 -1
- package/dist/components/mrd-email-field2.js +1 -1
- package/dist/components/mrd-form.js +1 -1
- package/dist/components/mrd-hyperlink-field2.js +1 -1
- package/dist/components/mrd-image-field2.js +1 -1
- package/dist/components/mrd-layout-section.js +1 -1
- package/dist/components/mrd-number-field2.js +1 -1
- package/dist/components/mrd-relation-field2.js +1 -1
- package/dist/components/mrd-table2.js +1 -1
- package/dist/esm/client-layout-DCOAAH92.js +84 -0
- package/dist/esm/{index-DiSEJMA8.js → index-DiSe6vjv.js} +36 -9
- package/dist/esm/index.js +30 -80
- package/dist/esm/loader.js +3 -3
- package/dist/esm/mosterdcomponents.js +4 -4
- package/dist/esm/{mrd-boolean-field_24.entry.js → mrd-boolean-field_23.entry.js} +69 -195
- package/dist/mosterdcomponents/index.esm.js +1 -1
- package/dist/mosterdcomponents/mosterdcomponents.css +7 -1
- package/dist/mosterdcomponents/mosterdcomponents.esm.js +1 -1
- package/dist/mosterdcomponents/p-DCOAAH92.js +1 -0
- package/dist/mosterdcomponents/p-DiSe6vjv.js +2 -0
- package/dist/mosterdcomponents/p-cdecc698.entry.js +1 -0
- package/dist/types/components/documents/mrd-document-container/mrd-document-container.d.ts +4 -2
- package/dist/types/components/documents/mrd-document-list/mrd-document-list.d.ts +6 -2
- package/dist/types/components/documents/mrd-document-view/mrd-document-view.d.ts +27 -29
- package/dist/types/components/layout/mrd-layout-section/mrd-layout-section.d.ts +12 -15
- package/dist/types/components.d.ts +61 -195
- package/dist/types/index.d.ts +2 -0
- package/dist/types/stencil-public-runtime.d.ts +1 -0
- package/dist/types/types/client-layout.d.ts +10 -3
- package/dist/types/utils/document-attachments.d.ts +8 -0
- package/dist/types/utils/file-preview-kind.d.ts +9 -0
- package/package.json +10 -12
- package/dist/collection/components/documents/mrd-file-preview/mrd-file-preview.css +0 -59
- package/dist/collection/components/documents/mrd-file-preview/mrd-file-preview.js +0 -212
- package/dist/components/mrd-file-preview.d.ts +0 -11
- package/dist/components/mrd-file-preview.js +0 -1
- package/dist/components/mrd-file-preview2.js +0 -1
- package/dist/mosterdcomponents/p-DiSEJMA8.js +0 -2
- package/dist/mosterdcomponents/p-e816d459.entry.js +0 -1
- package/dist/types/components/documents/mrd-file-preview/file-preview-kind.d.ts +0 -9
- package/dist/types/components/documents/mrd-file-preview/mrd-file-preview.d.ts +0 -41
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
font-size: var(--mrd-font-size-base);
|
|
9
9
|
color: var(--mrd-color-neutral-800);
|
|
10
10
|
}
|
|
11
|
-
|
|
12
11
|
.mrd-layout-section__field {
|
|
13
12
|
display: grid;
|
|
14
13
|
grid-template-columns: 200px 1fr;
|
|
@@ -16,14 +15,15 @@
|
|
|
16
15
|
gap: 0 var(--mrd-space-2);
|
|
17
16
|
padding: var(--mrd-space-1) 0;
|
|
18
17
|
}
|
|
19
|
-
|
|
18
|
+
.mrd-layout-section__field--block {
|
|
19
|
+
grid-template-columns: 1fr;
|
|
20
|
+
}
|
|
20
21
|
.mrd-layout-section__field-label {
|
|
21
22
|
font-size: var(--mrd-font-size-xs);
|
|
22
23
|
font-weight: var(--mrd-font-weight-normal);
|
|
23
24
|
color: var(--mrd-color-neutral-500);
|
|
24
25
|
padding-top: 1px;
|
|
25
26
|
}
|
|
26
|
-
|
|
27
27
|
.mrd-layout-section__field-value {
|
|
28
28
|
font-size: var(--mrd-font-size-sm);
|
|
29
29
|
font-weight: var(--mrd-font-weight-medium);
|
|
@@ -33,13 +33,11 @@
|
|
|
33
33
|
align-items: center;
|
|
34
34
|
gap: var(--mrd-space-1);
|
|
35
35
|
}
|
|
36
|
-
|
|
37
36
|
.mrd-layout-section__history-wrap {
|
|
38
37
|
position: relative;
|
|
39
38
|
display: inline-flex;
|
|
40
39
|
align-items: center;
|
|
41
40
|
}
|
|
42
|
-
|
|
43
41
|
.mrd-layout-section__history-btn {
|
|
44
42
|
display: inline-flex;
|
|
45
43
|
align-items: center;
|
|
@@ -55,22 +53,18 @@
|
|
|
55
53
|
flex-shrink: 0;
|
|
56
54
|
transition: color var(--mrd-transition-fast), background-color var(--mrd-transition-fast);
|
|
57
55
|
}
|
|
58
|
-
|
|
59
56
|
.mrd-layout-section__history-btn:hover {
|
|
60
57
|
color: var(--mrd-color-neutral-700);
|
|
61
58
|
background-color: var(--mrd-color-neutral-100);
|
|
62
59
|
}
|
|
63
|
-
|
|
64
60
|
.mrd-layout-section__history-btn:focus {
|
|
65
61
|
outline: none;
|
|
66
62
|
box-shadow: var(--mrd-shadow-focus);
|
|
67
63
|
}
|
|
68
|
-
|
|
69
64
|
.mrd-layout-section__history-icon {
|
|
70
65
|
width: 0.875rem;
|
|
71
66
|
height: 0.875rem;
|
|
72
67
|
}
|
|
73
|
-
|
|
74
68
|
.mrd-layout-section__history-popover {
|
|
75
69
|
position: absolute;
|
|
76
70
|
top: calc(100% + 0.25rem);
|
|
@@ -84,7 +78,6 @@
|
|
|
84
78
|
padding: var(--mrd-space-1) 0;
|
|
85
79
|
z-index: var(--mrd-z-dropdown);
|
|
86
80
|
}
|
|
87
|
-
|
|
88
81
|
.mrd-layout-section__history-entry {
|
|
89
82
|
font-family: var(--mrd-font-family);
|
|
90
83
|
font-size: var(--mrd-font-size-sm);
|
|
@@ -93,11 +86,9 @@
|
|
|
93
86
|
padding: var(--mrd-space-2) var(--mrd-space-3);
|
|
94
87
|
line-height: var(--mrd-line-height-normal);
|
|
95
88
|
}
|
|
96
|
-
|
|
97
89
|
.mrd-layout-section__history-entry:not(:last-child) {
|
|
98
90
|
border-bottom: var(--mrd-border-width) solid var(--mrd-color-neutral-100);
|
|
99
91
|
}
|
|
100
|
-
|
|
101
92
|
.mrd-layout-section__field-header {
|
|
102
93
|
font-size: var(--mrd-font-size-2xl);
|
|
103
94
|
font-weight: var(--mrd-font-weight-bold);
|
|
@@ -105,7 +96,6 @@
|
|
|
105
96
|
margin: 0 0 var(--mrd-space-4) 0;
|
|
106
97
|
padding: 0;
|
|
107
98
|
}
|
|
108
|
-
|
|
109
99
|
.mrd-layout-section__header {
|
|
110
100
|
font-size: var(--mrd-font-size-xl);
|
|
111
101
|
font-weight: var(--mrd-font-weight-semibold);
|
|
@@ -113,14 +103,12 @@
|
|
|
113
103
|
margin: var(--mrd-space-4) 0 var(--mrd-space-2) 0;
|
|
114
104
|
padding: 0;
|
|
115
105
|
}
|
|
116
|
-
|
|
117
106
|
.mrd-layout-section__text {
|
|
118
107
|
font-size: var(--mrd-font-size-base);
|
|
119
108
|
color: var(--mrd-color-neutral-700);
|
|
120
109
|
line-height: var(--mrd-line-height-relaxed);
|
|
121
110
|
margin: var(--mrd-space-2) 0;
|
|
122
111
|
}
|
|
123
|
-
|
|
124
112
|
.mrd-layout-section__navigate {
|
|
125
113
|
display: inline-flex;
|
|
126
114
|
align-items: center;
|
|
@@ -135,21 +123,17 @@
|
|
|
135
123
|
cursor: pointer;
|
|
136
124
|
margin: var(--mrd-space-2) 0;
|
|
137
125
|
}
|
|
138
|
-
|
|
139
126
|
.mrd-layout-section__navigate:hover {
|
|
140
127
|
background-color: var(--mrd-color-primary-light);
|
|
141
128
|
border-color: var(--mrd-color-primary);
|
|
142
129
|
}
|
|
143
|
-
|
|
144
130
|
.mrd-layout-section__link {
|
|
145
131
|
color: var(--mrd-color-primary);
|
|
146
132
|
text-decoration: none;
|
|
147
133
|
}
|
|
148
|
-
|
|
149
134
|
.mrd-layout-section__link:hover {
|
|
150
135
|
text-decoration: underline;
|
|
151
136
|
}
|
|
152
|
-
|
|
153
137
|
.mrd-layout-section__relation-link {
|
|
154
138
|
background: none;
|
|
155
139
|
border: none;
|
|
@@ -161,11 +145,9 @@
|
|
|
161
145
|
cursor: pointer;
|
|
162
146
|
text-align: left;
|
|
163
147
|
}
|
|
164
|
-
|
|
165
148
|
.mrd-layout-section__relation-link:hover {
|
|
166
149
|
text-decoration: underline;
|
|
167
150
|
}
|
|
168
|
-
|
|
169
151
|
.mrd-layout-section__download-link {
|
|
170
152
|
display: inline-flex;
|
|
171
153
|
align-items: center;
|
|
@@ -179,31 +161,22 @@
|
|
|
179
161
|
cursor: pointer;
|
|
180
162
|
text-align: left;
|
|
181
163
|
}
|
|
182
|
-
|
|
183
164
|
.mrd-layout-section__download-link:hover {
|
|
184
165
|
text-decoration: underline;
|
|
185
166
|
color: var(--mrd-color-primary-dark);
|
|
186
167
|
}
|
|
187
|
-
|
|
188
168
|
.mrd-layout-section__file-icon {
|
|
189
169
|
flex-shrink: 0;
|
|
190
170
|
width: 1rem;
|
|
191
171
|
height: 1rem;
|
|
192
172
|
}
|
|
193
|
-
|
|
194
173
|
.mrd-layout-section__boolean--true {
|
|
195
174
|
color: var(--mrd-color-success);
|
|
196
175
|
font-weight: var(--mrd-font-weight-semibold);
|
|
197
176
|
}
|
|
198
|
-
|
|
199
177
|
.mrd-layout-section__boolean--false {
|
|
200
178
|
color: var(--mrd-color-neutral-400);
|
|
201
179
|
}
|
|
202
|
-
|
|
203
|
-
.mrd-layout-section__field--block {
|
|
204
|
-
grid-template-columns: 1fr;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
180
|
.mrd-layout-section__badge {
|
|
208
181
|
display: inline-block;
|
|
209
182
|
font-size: var(--mrd-font-size-xs);
|
|
@@ -211,13 +184,11 @@
|
|
|
211
184
|
padding: 2px var(--mrd-space-3);
|
|
212
185
|
border-radius: 10px;
|
|
213
186
|
}
|
|
214
|
-
|
|
215
187
|
.mrd-layout-section__badge-dot-row {
|
|
216
188
|
display: inline-flex;
|
|
217
189
|
align-items: center;
|
|
218
190
|
gap: var(--mrd-space-2);
|
|
219
191
|
}
|
|
220
|
-
|
|
221
192
|
.mrd-layout-section__badge-dot {
|
|
222
193
|
display: inline-block;
|
|
223
194
|
width: 10px;
|
|
@@ -225,7 +196,6 @@
|
|
|
225
196
|
border-radius: 50%;
|
|
226
197
|
flex-shrink: 0;
|
|
227
198
|
}
|
|
228
|
-
|
|
229
199
|
.mrd-layout-section__secret-masked {
|
|
230
200
|
font-family: var(--mrd-font-family);
|
|
231
201
|
font-size: var(--mrd-font-size-base);
|
|
@@ -234,7 +204,6 @@
|
|
|
234
204
|
user-select: none;
|
|
235
205
|
pointer-events: none;
|
|
236
206
|
}
|
|
237
|
-
|
|
238
207
|
.mrd-layout-section__pre {
|
|
239
208
|
font-family: var(--mrd-font-family-mono);
|
|
240
209
|
font-size: var(--mrd-font-size-xs);
|
|
@@ -249,11 +218,9 @@
|
|
|
249
218
|
white-space: pre-wrap;
|
|
250
219
|
word-break: break-word;
|
|
251
220
|
}
|
|
252
|
-
|
|
253
221
|
.mrd-layout-section__group {
|
|
254
222
|
margin: var(--mrd-space-4) 0;
|
|
255
223
|
}
|
|
256
|
-
|
|
257
224
|
.mrd-layout-section__group-title {
|
|
258
225
|
font-size: var(--mrd-font-size-xs);
|
|
259
226
|
font-weight: var(--mrd-font-weight-semibold);
|
|
@@ -262,27 +229,22 @@
|
|
|
262
229
|
padding-bottom: 0;
|
|
263
230
|
letter-spacing: 0.01em;
|
|
264
231
|
}
|
|
265
|
-
|
|
266
232
|
.mrd-layout-section__related-view {
|
|
267
233
|
margin: var(--mrd-space-4) 0;
|
|
268
234
|
}
|
|
269
|
-
|
|
270
235
|
.mrd-layout-section__related-view-title {
|
|
271
236
|
font-size: var(--mrd-font-size-lg);
|
|
272
237
|
font-weight: var(--mrd-font-weight-semibold);
|
|
273
238
|
color: var(--mrd-color-neutral-800);
|
|
274
239
|
margin: 0 0 var(--mrd-space-3) 0;
|
|
275
240
|
}
|
|
276
|
-
|
|
277
241
|
.mrd-layout-section__search {
|
|
278
242
|
position: relative;
|
|
279
243
|
margin: var(--mrd-space-2) 0;
|
|
280
244
|
}
|
|
281
|
-
|
|
282
245
|
.mrd-layout-section__search-wrap {
|
|
283
246
|
position: relative;
|
|
284
247
|
}
|
|
285
|
-
|
|
286
248
|
.mrd-layout-section__search-icon {
|
|
287
249
|
position: absolute;
|
|
288
250
|
left: var(--mrd-input-padding-x);
|
|
@@ -293,7 +255,6 @@
|
|
|
293
255
|
color: var(--mrd-color-neutral-400);
|
|
294
256
|
pointer-events: none;
|
|
295
257
|
}
|
|
296
|
-
|
|
297
258
|
.mrd-layout-section__search-input {
|
|
298
259
|
display: block;
|
|
299
260
|
width: 100%;
|
|
@@ -309,16 +270,13 @@
|
|
|
309
270
|
appearance: none;
|
|
310
271
|
box-sizing: border-box;
|
|
311
272
|
}
|
|
312
|
-
|
|
313
273
|
.mrd-layout-section__search-input:focus {
|
|
314
274
|
border-color: var(--mrd-border-color-focus);
|
|
315
275
|
box-shadow: var(--mrd-shadow-focus);
|
|
316
276
|
}
|
|
317
|
-
|
|
318
277
|
.mrd-layout-section__search-input::placeholder {
|
|
319
278
|
color: var(--mrd-input-placeholder-color);
|
|
320
279
|
}
|
|
321
|
-
|
|
322
280
|
.mrd-layout-section__search-results {
|
|
323
281
|
position: absolute;
|
|
324
282
|
top: 100%;
|
|
@@ -336,12 +294,10 @@
|
|
|
336
294
|
margin: 0;
|
|
337
295
|
padding: var(--mrd-space-1) 0;
|
|
338
296
|
}
|
|
339
|
-
|
|
340
297
|
.mrd-layout-section__search-result {
|
|
341
298
|
margin: 0;
|
|
342
299
|
padding: 0;
|
|
343
300
|
}
|
|
344
|
-
|
|
345
301
|
.mrd-layout-section__search-result-btn {
|
|
346
302
|
display: flex;
|
|
347
303
|
flex-direction: column;
|
|
@@ -353,23 +309,19 @@
|
|
|
353
309
|
cursor: pointer;
|
|
354
310
|
font-family: var(--mrd-font-family);
|
|
355
311
|
}
|
|
356
|
-
|
|
357
312
|
.mrd-layout-section__search-result-btn:hover {
|
|
358
313
|
background-color: var(--mrd-color-primary-light);
|
|
359
314
|
}
|
|
360
|
-
|
|
361
315
|
.mrd-layout-section__search-result-label {
|
|
362
316
|
font-size: var(--mrd-font-size-sm);
|
|
363
317
|
font-weight: var(--mrd-font-weight-medium);
|
|
364
318
|
color: var(--mrd-color-neutral-800);
|
|
365
319
|
}
|
|
366
|
-
|
|
367
320
|
.mrd-layout-section__search-result-desc {
|
|
368
321
|
font-size: var(--mrd-font-size-xs);
|
|
369
322
|
color: var(--mrd-color-neutral-500);
|
|
370
323
|
margin-top: var(--mrd-space-1);
|
|
371
324
|
}
|
|
372
|
-
|
|
373
325
|
.mrd-layout-section__image-thumb-btn {
|
|
374
326
|
background: none;
|
|
375
327
|
border: none;
|
|
@@ -380,11 +332,9 @@
|
|
|
380
332
|
overflow: hidden;
|
|
381
333
|
line-height: 0;
|
|
382
334
|
}
|
|
383
|
-
|
|
384
335
|
.mrd-layout-section__image-thumb-btn:hover .mrd-layout-section__image-thumb {
|
|
385
336
|
opacity: 0.85;
|
|
386
337
|
}
|
|
387
|
-
|
|
388
338
|
.mrd-layout-section__image-thumb {
|
|
389
339
|
display: block;
|
|
390
340
|
max-width: 160px;
|
|
@@ -393,7 +343,6 @@
|
|
|
393
343
|
object-fit: cover;
|
|
394
344
|
transition: opacity 0.15s;
|
|
395
345
|
}
|
|
396
|
-
|
|
397
346
|
.mrd-layout-section__modal-backdrop {
|
|
398
347
|
position: fixed;
|
|
399
348
|
inset: 0;
|
|
@@ -403,7 +352,6 @@
|
|
|
403
352
|
align-items: center;
|
|
404
353
|
justify-content: center;
|
|
405
354
|
}
|
|
406
|
-
|
|
407
355
|
.mrd-layout-section__modal {
|
|
408
356
|
position: relative;
|
|
409
357
|
background: var(--mrd-color-white);
|
|
@@ -416,7 +364,6 @@
|
|
|
416
364
|
justify-content: center;
|
|
417
365
|
box-shadow: var(--mrd-shadow-lg);
|
|
418
366
|
}
|
|
419
|
-
|
|
420
367
|
.mrd-layout-section__modal-close {
|
|
421
368
|
position: absolute;
|
|
422
369
|
top: var(--mrd-space-2);
|
|
@@ -435,11 +382,9 @@
|
|
|
435
382
|
line-height: 1;
|
|
436
383
|
z-index: 1;
|
|
437
384
|
}
|
|
438
|
-
|
|
439
385
|
.mrd-layout-section__modal-close:hover {
|
|
440
386
|
background: rgba(0, 0, 0, 0.8);
|
|
441
387
|
}
|
|
442
|
-
|
|
443
388
|
.mrd-layout-section__modal-image {
|
|
444
389
|
display: block;
|
|
445
390
|
max-width: 100%;
|
|
@@ -16,17 +16,11 @@ export class MrdLayoutSection {
|
|
|
16
16
|
/** Top-level archetypes on the object dashboard. When it contains commons.document,
|
|
17
17
|
* the record is rendered as a single-document view instead of generic fields. */
|
|
18
18
|
this.archetypes = [];
|
|
19
|
-
/** Minimum height (px) of the commons.document inline file preview — it
|
|
20
|
-
* stretches taller in the wide side-by-side layout. Pass a smaller value
|
|
21
|
-
* when embedding the record in an overlay with limited height. */
|
|
22
|
-
this.documentPreviewHeight = 640;
|
|
23
19
|
this.searchQueryMap = {};
|
|
24
20
|
this.searchResultsMap = {};
|
|
25
21
|
this.imagePreviewUrl = null;
|
|
26
22
|
this.imagePreviews = {};
|
|
27
23
|
this.openHistoryField = null;
|
|
28
|
-
/** Signed URL for the commons.document archetype's inline file preview. */
|
|
29
|
-
this.documentPreviewUrl = null;
|
|
30
24
|
this.historyClickOutside = null;
|
|
31
25
|
this.searchTimers = {};
|
|
32
26
|
this.handleViewLoadPage = (e, name) => {
|
|
@@ -150,11 +144,6 @@ export class MrdLayoutSection {
|
|
|
150
144
|
async openImagePreview(url) {
|
|
151
145
|
this.imagePreviewUrl = url;
|
|
152
146
|
}
|
|
153
|
-
/** Provide a resolved signed URL for the commons.document archetype's inline
|
|
154
|
-
* file preview, in response to mrdLoadDocumentPreview. */
|
|
155
|
-
async setDocumentPreviewUrl(url) {
|
|
156
|
-
this.documentPreviewUrl = url;
|
|
157
|
-
}
|
|
158
147
|
resolveSearchKey() {
|
|
159
148
|
var _a;
|
|
160
149
|
const items = flattenItems(this.items).filter(i => i.type === ClientLayoutItemType.SEARCH);
|
|
@@ -328,18 +317,17 @@ export class MrdLayoutSection {
|
|
|
328
317
|
* a recognisable document instead of generic fields, keeping any related views/
|
|
329
318
|
* searches below it. */
|
|
330
319
|
renderDocumentObject(archetype) {
|
|
331
|
-
var _a;
|
|
332
320
|
const related = this.items.filter(it => it.type === ClientLayoutItemType.VIEW ||
|
|
333
321
|
it.type === ClientLayoutItemType.RELATED_VIEW ||
|
|
334
322
|
it.type === ClientLayoutItemType.SEARCH);
|
|
335
323
|
return [
|
|
336
|
-
h("mrd-document-view", { archetype: archetype, data: this.data, locale: this.locale,
|
|
324
|
+
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); }, onMrdAttachments: (e) => { e.stopPropagation(); this.mrdAttachments.emit(e.detail); } }),
|
|
337
325
|
...related.map(it => this.renderItem(it)),
|
|
338
326
|
];
|
|
339
327
|
}
|
|
340
328
|
render() {
|
|
341
329
|
const docArchetype = resolveArchetype(this.archetypes, ARCHETYPE_DOCUMENT);
|
|
342
|
-
return (h(Host, { key: '
|
|
330
|
+
return (h(Host, { key: '8585dae577d38e3c9517039b48aa9e798190937c' }, h("div", { key: '020b942996b1346bdc3bc89938e4b020823cfcea', class: "mrd-layout-section" }, docArchetype
|
|
343
331
|
? this.renderDocumentObject(docArchetype)
|
|
344
332
|
: this.items.map(item => this.renderItem(item))), this.renderImageModal()));
|
|
345
333
|
}
|
|
@@ -501,26 +489,6 @@ export class MrdLayoutSection {
|
|
|
501
489
|
"getter": false,
|
|
502
490
|
"setter": false,
|
|
503
491
|
"defaultValue": "[]"
|
|
504
|
-
},
|
|
505
|
-
"documentPreviewHeight": {
|
|
506
|
-
"type": "number",
|
|
507
|
-
"mutable": false,
|
|
508
|
-
"complexType": {
|
|
509
|
-
"original": "number",
|
|
510
|
-
"resolved": "number",
|
|
511
|
-
"references": {}
|
|
512
|
-
},
|
|
513
|
-
"required": false,
|
|
514
|
-
"optional": false,
|
|
515
|
-
"docs": {
|
|
516
|
-
"tags": [],
|
|
517
|
-
"text": "Minimum height (px) of the commons.document inline file preview \u2014 it\nstretches taller in the wide side-by-side layout. Pass a smaller value\nwhen embedding the record in an overlay with limited height."
|
|
518
|
-
},
|
|
519
|
-
"getter": false,
|
|
520
|
-
"setter": false,
|
|
521
|
-
"reflect": false,
|
|
522
|
-
"attribute": "document-preview-height",
|
|
523
|
-
"defaultValue": "640"
|
|
524
492
|
}
|
|
525
493
|
};
|
|
526
494
|
}
|
|
@@ -530,8 +498,7 @@ export class MrdLayoutSection {
|
|
|
530
498
|
"searchResultsMap": {},
|
|
531
499
|
"imagePreviewUrl": {},
|
|
532
500
|
"imagePreviews": {},
|
|
533
|
-
"openHistoryField": {}
|
|
534
|
-
"documentPreviewUrl": {}
|
|
501
|
+
"openHistoryField": {}
|
|
535
502
|
};
|
|
536
503
|
}
|
|
537
504
|
static get events() {
|
|
@@ -543,11 +510,11 @@ export class MrdLayoutSection {
|
|
|
543
510
|
"composed": true,
|
|
544
511
|
"docs": {
|
|
545
512
|
"tags": [],
|
|
546
|
-
"text": ""
|
|
513
|
+
"text": "`attachments`, when present, prefetches the clicked document row's file slot\n(see TASK-0169 / FINDING-0111) so the host can render a preview immediately,\nwithout waiting for the navigated-to page's own mrdAttachments. Only set for\ncommons.document rows opened from an embedded document view."
|
|
547
514
|
},
|
|
548
515
|
"complexType": {
|
|
549
|
-
"original": "{ href?: string; label: string; navigate?: ClientLayoutItemNavigate; navigateBehaviour?: ClientLayoutNavigateBehaviour; listContext?: ListNavigationContext }",
|
|
550
|
-
"resolved": "{ href?: string | undefined; label: string; navigate?: ClientLayoutItemNavigate | undefined; navigateBehaviour?: ClientLayoutNavigateBehaviour | undefined; listContext?: ListNavigationContext | undefined; }",
|
|
516
|
+
"original": "{ href?: string; label: string; navigate?: ClientLayoutItemNavigate; navigateBehaviour?: ClientLayoutNavigateBehaviour; listContext?: ListNavigationContext; attachments?: DocumentAttachment[] }",
|
|
517
|
+
"resolved": "{ href?: string | undefined; label: string; navigate?: ClientLayoutItemNavigate | undefined; navigateBehaviour?: ClientLayoutNavigateBehaviour | undefined; listContext?: ListNavigationContext | undefined; attachments?: DocumentAttachment[] | undefined; }",
|
|
551
518
|
"references": {
|
|
552
519
|
"ClientLayoutItemNavigate": {
|
|
553
520
|
"location": "import",
|
|
@@ -566,6 +533,12 @@ export class MrdLayoutSection {
|
|
|
566
533
|
"path": "../../../utils/query-params",
|
|
567
534
|
"id": "src/utils/query-params.ts::ListNavigationContext",
|
|
568
535
|
"referenceLocation": "ListNavigationContext"
|
|
536
|
+
},
|
|
537
|
+
"DocumentAttachment": {
|
|
538
|
+
"location": "import",
|
|
539
|
+
"path": "../../../types/client-layout",
|
|
540
|
+
"id": "src/types/client-layout.ts::DocumentAttachment",
|
|
541
|
+
"referenceLocation": "DocumentAttachment"
|
|
569
542
|
}
|
|
570
543
|
}
|
|
571
544
|
}
|
|
@@ -630,19 +603,26 @@ export class MrdLayoutSection {
|
|
|
630
603
|
"references": {}
|
|
631
604
|
}
|
|
632
605
|
}, {
|
|
633
|
-
"method": "
|
|
634
|
-
"name": "
|
|
606
|
+
"method": "mrdAttachments",
|
|
607
|
+
"name": "mrdAttachments",
|
|
635
608
|
"bubbles": true,
|
|
636
609
|
"cancelable": true,
|
|
637
610
|
"composed": true,
|
|
638
611
|
"docs": {
|
|
639
612
|
"tags": [],
|
|
640
|
-
"text": "Re-emitted from an embedded mrd-document-view
|
|
613
|
+
"text": "Re-emitted from an embedded mrd-document-view (commons.document single-object\nview) whenever its file slot's value changes. The component never renders the\nfile itself \u2014 the host resolves the href(s) and decides how/whether to show\nthem, e.g. in a panel next to this mrd-layout-section."
|
|
641
614
|
},
|
|
642
615
|
"complexType": {
|
|
643
|
-
"original": "{
|
|
644
|
-
"resolved": "{
|
|
645
|
-
"references": {
|
|
616
|
+
"original": "{ attachments: DocumentAttachment[] }",
|
|
617
|
+
"resolved": "{ attachments: DocumentAttachment[]; }",
|
|
618
|
+
"references": {
|
|
619
|
+
"DocumentAttachment": {
|
|
620
|
+
"location": "import",
|
|
621
|
+
"path": "../../../types/client-layout",
|
|
622
|
+
"id": "src/types/client-layout.ts::DocumentAttachment",
|
|
623
|
+
"referenceLocation": "DocumentAttachment"
|
|
624
|
+
}
|
|
625
|
+
}
|
|
646
626
|
}
|
|
647
627
|
}, {
|
|
648
628
|
"method": "mrdViewAction",
|
|
@@ -1004,27 +984,6 @@ export class MrdLayoutSection {
|
|
|
1004
984
|
"text": "Open the lightbox directly with a URL (e.g. after mrdDownload on a FILE field).",
|
|
1005
985
|
"tags": []
|
|
1006
986
|
}
|
|
1007
|
-
},
|
|
1008
|
-
"setDocumentPreviewUrl": {
|
|
1009
|
-
"complexType": {
|
|
1010
|
-
"signature": "(url: string) => Promise<void>",
|
|
1011
|
-
"parameters": [{
|
|
1012
|
-
"name": "url",
|
|
1013
|
-
"type": "string",
|
|
1014
|
-
"docs": ""
|
|
1015
|
-
}],
|
|
1016
|
-
"references": {
|
|
1017
|
-
"Promise": {
|
|
1018
|
-
"location": "global",
|
|
1019
|
-
"id": "global::Promise"
|
|
1020
|
-
}
|
|
1021
|
-
},
|
|
1022
|
-
"return": "Promise<void>"
|
|
1023
|
-
},
|
|
1024
|
-
"docs": {
|
|
1025
|
-
"text": "Provide a resolved signed URL for the commons.document archetype's inline\nfile preview, in response to mrdLoadDocumentPreview.",
|
|
1026
|
-
"tags": []
|
|
1027
|
-
}
|
|
1028
987
|
}
|
|
1029
988
|
};
|
|
1030
989
|
}
|