@museumwnf/viewer-layout 3.60.0 → 3.61.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{FeaturedRecord-DLYyyRey.js → FeaturedRecord-DaGLHyhD.js} +1 -1
- package/dist/{ItemDetailView-D5T3QXYJ.js → ItemDetailView-D7m2C1Mg.js} +26 -19
- package/dist/{OnDisplayIn-CCM5Ahxy.js → OnDisplayIn-DW4iC5BB.js} +1 -1
- package/dist/{PartnerMap-BuQo_FLl.js → PartnerMap-U-Hi2FBi.js} +16 -12
- package/dist/RecordView-BE4mbj6G.js +363 -0
- package/dist/{Theme-0bsA_Abx.js → Theme-4RmyRY0x.js} +2 -2
- package/dist/{TimelineEventList-e1fNm28F.js → TimelineEventList-1feZA5t7.js} +1 -1
- package/dist/{TimelineResultsView-Cl_LcM--.js → TimelineResultsView-CkH3NDqL.js} +2 -2
- package/dist/{content-BzSJircQ.js → content-BNS5U0Xv.js} +2 -2
- package/dist/content.js +5 -5
- package/dist/dxa.js +619 -507
- package/dist/index.js +5 -5
- package/dist/standalone.js +2 -2
- package/dist/viewer-layout.css +1 -1
- package/dist/views.js +4 -4
- package/package.json +3 -3
- package/src/dxa/testing.js +27 -15
- package/src/styles/dxa-gallery.css +13 -3
- package/src/tokens.reference.css +1 -0
- package/dist/RecordView-n7bbQUg2.js +0 -345
package/dist/views.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as e } from "./FeaturedRecord-
|
|
2
|
-
import { s as t } from "./TimelineEventList-
|
|
3
|
-
import { a as n, i as r, n as i, o as a, r as o, s, t as c } from "./TimelineResultsView-
|
|
4
|
-
import { t as l } from "./RecordView-
|
|
1
|
+
import { t as e } from "./FeaturedRecord-DaGLHyhD.js";
|
|
2
|
+
import { s as t } from "./TimelineEventList-1feZA5t7.js";
|
|
3
|
+
import { a as n, i as r, n as i, o as a, r as o, s, t as c } from "./TimelineResultsView-CkH3NDqL.js";
|
|
4
|
+
import { t as l } from "./RecordView-BE4mbj6G.js";
|
|
5
5
|
import { computed as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createVNode as m, mergeProps as h, normalizeClass as g, openBlock as _, renderSlot as v, toDisplayString as y, unref as b } from "vue";
|
|
6
6
|
import { I18nText as x, renderInline as S, renderPlain as C, useDataPackage as w, useFeaturedRecord as T, useI18n as E, useSiteConfig as D } from "@museumwnf/viewer-core";
|
|
7
7
|
// src/views/HomeView.vue
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@museumwnf/viewer-layout",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.61.0",
|
|
4
4
|
"description": "Page structure for MWNF websites: PageShell composing seven optional, token-styled sections, the content components a page is made of, and the composed views a website names instead of writing a page.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -43,12 +43,12 @@
|
|
|
43
43
|
"test": "vitest run"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
|
-
"@museumwnf/viewer-core": "^2.
|
|
46
|
+
"@museumwnf/viewer-core": "^2.17.0",
|
|
47
47
|
"vue": "^3.5.0",
|
|
48
48
|
"vue-router": "^4.5.0 || ^5.0.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@museumwnf/viewer-core": "^2.
|
|
51
|
+
"@museumwnf/viewer-core": "^2.17.0",
|
|
52
52
|
"@vitejs/plugin-vue": "^6.0.10",
|
|
53
53
|
"@vue/test-utils": "^2.5.1",
|
|
54
54
|
"jsdom": "^30.1.3",
|
package/src/dxa/testing.js
CHANGED
|
@@ -264,22 +264,24 @@ export function describeGallerySmoke({ config, sharedTexts, ownTexts, manifest,
|
|
|
264
264
|
// is never shown.
|
|
265
265
|
expect(host.querySelector('.mwnf-record__aside .mwnf-sheet-related')).not.toBeNull()
|
|
266
266
|
expect(host.textContent).not.toContain('mwnf3:')
|
|
267
|
-
//
|
|
267
|
+
// Legacy's sheet (inventory-app#2423): Source and My Collection under
|
|
268
|
+
// the pictures, and the citation names the item's project from the
|
|
269
|
+
// manifest.
|
|
270
|
+
expect(host.querySelectorAll('.mwnf-record__media .mwnf-dxa-gallery-item__links a')).toHaveLength(2)
|
|
268
271
|
const projectName = manifest.projects[items[0].project_id]?.name?.en ?? ''
|
|
269
|
-
expect(host.querySelector('.mwnf-
|
|
272
|
+
expect(host.querySelector('.mwnf-dxa-gallery-item__credits').textContent).toContain(projectName)
|
|
270
273
|
app.unmount()
|
|
271
274
|
}, 60000)
|
|
272
275
|
|
|
273
276
|
outsideReferenceTest(mountSite, manifest, sharedTexts)
|
|
274
277
|
|
|
275
|
-
// The
|
|
276
|
-
// project name
|
|
277
|
-
it(
|
|
278
|
+
// The Source box takes the colour `projectColors` gives the item's
|
|
279
|
+
// project, and the citation its name from the manifest.
|
|
280
|
+
it("colours the Source box and names the citation's project from the manifest projects section", async () => {
|
|
278
281
|
const { app, host } = await mountSite(`#/item/${chip.item}`)
|
|
279
|
-
await vi.waitFor(() => expect(host.querySelector('.mwnf-
|
|
280
|
-
|
|
281
|
-
expect(
|
|
282
|
-
expect(line.querySelector('.mwnf-chip').classList.contains(chip.className)).toBe(true)
|
|
282
|
+
await vi.waitFor(() => expect(host.querySelector('.mwnf-dxa-gallery-item__source')).not.toBeNull(), WAIT)
|
|
283
|
+
expect(host.querySelector('.mwnf-dxa-gallery-item__project').textContent).toContain(chip.project)
|
|
284
|
+
expect(host.querySelector('.mwnf-dxa-gallery-item__source').classList.contains(chip.className)).toBe(true)
|
|
283
285
|
app.unmount()
|
|
284
286
|
}, 60000)
|
|
285
287
|
|
|
@@ -287,12 +289,12 @@ export function describeGallerySmoke({ config, sharedTexts, ownTexts, manifest,
|
|
|
287
289
|
// lists, and stays off every other.
|
|
288
290
|
it.skipIf(!noticeItem)('shows the explore-partner notice only for the project dataset.config.js lists', async () => {
|
|
289
291
|
const epm = await mountSite(`#/item/${noticeItem}`)
|
|
290
|
-
await vi.waitFor(() => expect(epm.host.querySelector('.mwnf-
|
|
292
|
+
await vi.waitFor(() => expect(epm.host.querySelector('.mwnf-dxa-gallery-item__source')).not.toBeNull(), WAIT)
|
|
291
293
|
expect(epm.host.querySelector('.mwnf-sheet-notice')).not.toBeNull()
|
|
292
294
|
epm.app.unmount()
|
|
293
295
|
|
|
294
296
|
const other = await mountSite(`#/item/${chip.item}`)
|
|
295
|
-
await vi.waitFor(() => expect(other.host.querySelector('.mwnf-
|
|
297
|
+
await vi.waitFor(() => expect(other.host.querySelector('.mwnf-dxa-gallery-item__source')).not.toBeNull(), WAIT)
|
|
296
298
|
expect(other.host.querySelector('.mwnf-sheet-notice')).toBeNull()
|
|
297
299
|
other.app.unmount()
|
|
298
300
|
}, 60000)
|
|
@@ -330,14 +332,24 @@ export function describeGallerySmoke({ config, sharedTexts, ownTexts, manifest,
|
|
|
330
332
|
app.unmount()
|
|
331
333
|
}, 30000)
|
|
332
334
|
|
|
333
|
-
|
|
335
|
+
// Legacy's Source box pointed at the record in its home database: now the
|
|
336
|
+
// record's page on its project's home site, a sibling of this one
|
|
337
|
+
// (`manifest.projects`' `home_site`), or this page when it has none.
|
|
338
|
+
it("points the Source box at the record's home site, or this page", async () => {
|
|
334
339
|
const [items] = await loadEntities(['items'])
|
|
335
340
|
const item = items[0]
|
|
336
341
|
const { app, host } = await mountSite(`#/item/${item.id}`)
|
|
337
|
-
await vi.waitFor(() => expect(host.querySelector('.mwnf-
|
|
338
|
-
const link = host.querySelector('.mwnf-
|
|
342
|
+
await vi.waitFor(() => expect(host.querySelector('.mwnf-dxa-gallery-item__source a')).not.toBeNull(), WAIT)
|
|
343
|
+
const link = host.querySelector('.mwnf-dxa-gallery-item__source a')
|
|
339
344
|
expect(link.textContent).toBe(link.getAttribute('href'))
|
|
340
|
-
|
|
345
|
+
const home = manifest.projects[item.project_id]?.home_site
|
|
346
|
+
let origin = config.site.origin
|
|
347
|
+
while (origin.endsWith('/')) origin = origin.slice(0, -1)
|
|
348
|
+
const expected = home && home !== manifest.site?.key
|
|
349
|
+
? `${origin.slice(0, origin.lastIndexOf('/'))}/${home}/#/item/${item.id}`
|
|
350
|
+
: `${origin}/#/item/${item.id}`
|
|
351
|
+
expect(link.getAttribute('href').startsWith(expected)).toBe(true)
|
|
352
|
+
expect(host.querySelector('.mwnf-source-credit')).toBeNull()
|
|
341
353
|
app.unmount()
|
|
342
354
|
}, 60000)
|
|
343
355
|
|
|
@@ -20,6 +20,9 @@
|
|
|
20
20
|
* --theme-light light menu items
|
|
21
21
|
* --background-color page background
|
|
22
22
|
*
|
|
23
|
+
* and, where legacy's `text-color` mixin took the medium-dark tone rather
|
|
24
|
+
* than the dark one, `--theme-text` (the item sidebar's headings).
|
|
25
|
+
*
|
|
23
26
|
* Every token below can be set again in the gallery's theme/tokens.css; the
|
|
24
27
|
* gallery's value wins. Legacy drew white text on both menu shades and on the
|
|
25
28
|
* header buttons whatever the palette, and so does this file.
|
|
@@ -227,10 +230,12 @@
|
|
|
227
230
|
--mwnf-dxa-heading-color: var(--theme-dark);
|
|
228
231
|
--mwnf-dxa-band-background: var(--background-color);
|
|
229
232
|
/* The item sheet's Related Content sidebar: white on the light tone, its
|
|
230
|
-
headings underlined in the
|
|
233
|
+
headings underlined and its description in the gallery's text colour
|
|
234
|
+
(legacy's `$theme-light` and `text-color` mixin, which ten galleries set
|
|
235
|
+
to their medium-dark tone: a gallery sets `--theme-text` for that). */
|
|
231
236
|
--mwnf-dxa-related-background: var(--theme-light);
|
|
232
237
|
--mwnf-dxa-related-text: #ffffff;
|
|
233
|
-
--mwnf-dxa-related-heading-color: var(--theme-dark);
|
|
238
|
+
--mwnf-dxa-related-heading-color: var(--theme-text, var(--theme-dark));
|
|
234
239
|
}
|
|
235
240
|
|
|
236
241
|
/* ── Page reset ──────────────────────────────────────────────────────────── */
|
|
@@ -306,12 +311,17 @@ a { color: inherit; }
|
|
|
306
311
|
}
|
|
307
312
|
.mwnf-nav__links li:nth-child(odd) { background: var(--theme-medium-dark); }
|
|
308
313
|
.mwnf-nav__links li:nth-child(even) { background: var(--theme-light); }
|
|
314
|
+
/* Legacy's entries are their 28px line, no taller; the notice under them its
|
|
315
|
+
text's own line (inventory-app#2423). */
|
|
309
316
|
.mwnf-nav__link {
|
|
310
317
|
width: 100%;
|
|
311
318
|
text-align: center;
|
|
312
|
-
padding:
|
|
319
|
+
padding: 0 4px;
|
|
313
320
|
text-transform: uppercase;
|
|
314
321
|
}
|
|
322
|
+
.mwnf-nav__notice {
|
|
323
|
+
line-height: normal;
|
|
324
|
+
}
|
|
315
325
|
.mwnf-nav__link--active {
|
|
316
326
|
background: rgba(0, 0, 0, 0.18);
|
|
317
327
|
text-decoration: none;
|
package/src/tokens.reference.css
CHANGED
|
@@ -839,6 +839,7 @@
|
|
|
839
839
|
/* --mwnf-dxa-related-background: #f0f0f0; Its background */
|
|
840
840
|
/* --mwnf-dxa-related-text: inherit; Its text and links */
|
|
841
841
|
/* --mwnf-dxa-related-heading-color: inherit; Its underlined headings */
|
|
842
|
+
/* --mwnf-dxa-languages-background: var(--theme-dark); A gallery item page's language band (legacy's dark tone) */
|
|
842
843
|
/* --mwnf-dxa-glossary-image: none; The glossary entry header's picture (set by ItemDetailView from the site's world.png) */
|
|
843
844
|
/* --mwnf-dxa-popup-image-width: 13.25rem; An exhibition popup notice's pictures: their widest (legacy sized them 191 to 211px) */
|
|
844
845
|
/* --mwnf-dxa-theme-background: #ffffff; Exhibition theme pages: the ground (legacy's secondary colour) */
|
|
@@ -1,345 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./GlossaryPopover-DbQKXhx9.js";
|
|
2
|
-
import { a as t, c as n, d as r, i, n as ee, o as te, r as ne, s as re } from "./PartnerMap-BuQo_FLl.js";
|
|
3
|
-
import { Fragment as ie, computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createSlots as ae, createTextVNode as oe, createVNode as u, guardReactiveProps as d, mergeProps as se, normalizeClass as ce, normalizeProps as f, openBlock as p, ref as m, renderList as h, renderSlot as g, toDisplayString as _, unref as v, useSlots as le, watch as y, withCtx as ue } from "vue";
|
|
4
|
-
import { useI18n as b } from "@museumwnf/viewer-core/i18n";
|
|
5
|
-
import { NotFoundView as de, byId as x, citation as fe, creditLine as pe, entityRef as me, languageLabels as he, loadEntities as ge, pictureCredits as _e, picturesInLanguage as ve, renderBlock as S, renderInline as C, renderPlain as ye, sheetRows as be, sourceUrl as xe, useDataPackage as Se, useGlossaryPopup as Ce, useI18n as we, useProjects as Te, useRecordSheet as Ee, useRelatedRecords as De } from "@museumwnf/viewer-core";
|
|
6
|
-
import { useRoute as Oe } from "vue-router";
|
|
7
|
-
// src/content/ShortDescription.vue
|
|
8
|
-
var w = ["dir"], ke = ["aria-expanded"], T = ["innerHTML"], Ae = {
|
|
9
|
-
__name: "ShortDescription",
|
|
10
|
-
props: {
|
|
11
|
-
html: {
|
|
12
|
-
type: String,
|
|
13
|
-
required: !0
|
|
14
|
-
},
|
|
15
|
-
dir: {
|
|
16
|
-
type: String,
|
|
17
|
-
default: void 0
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
setup(e) {
|
|
21
|
-
let t = e, { t: n } = b(), r = m(!1);
|
|
22
|
-
return y(() => t.html, () => {
|
|
23
|
-
r.value = !1;
|
|
24
|
-
}), (t, i) => (p(), c("div", {
|
|
25
|
-
class: "mwnf-sheet__short",
|
|
26
|
-
dir: e.dir
|
|
27
|
-
}, [l("button", {
|
|
28
|
-
type: "button",
|
|
29
|
-
class: "mwnf-sheet__toggle",
|
|
30
|
-
"aria-expanded": r.value ? "true" : "false",
|
|
31
|
-
onClick: i[0] ||= (e) => r.value = !r.value
|
|
32
|
-
}, _(r.value ? v(n)("record.action.hideShortDescription") : v(n)("record.action.viewShortDescription")), 9, ke), r.value ? (p(), c("div", {
|
|
33
|
-
key: 0,
|
|
34
|
-
class: "mwnf-sheet__block",
|
|
35
|
-
innerHTML: e.html
|
|
36
|
-
}, null, 8, T)) : s("", !0)], 8, w));
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
// src/views/pictureLimit.js
|
|
40
|
-
function E(e, t, n) {
|
|
41
|
-
let r = typeof t == "function" ? t(n) : t;
|
|
42
|
-
return Number.isInteger(r) && r > 0 ? e.slice(0, r) : e;
|
|
43
|
-
}
|
|
44
|
-
// src/views/RecordView.vue
|
|
45
|
-
var je = ["dir", "innerHTML"], Me = { class: "mwnf-record__body" }, Ne = { class: "mwnf-record__main" }, Pe = {
|
|
46
|
-
key: 1,
|
|
47
|
-
class: "mwnf-record__status"
|
|
48
|
-
}, Fe = {
|
|
49
|
-
key: 0,
|
|
50
|
-
class: "mwnf-record__aside"
|
|
51
|
-
}, Ie = {
|
|
52
|
-
key: 2,
|
|
53
|
-
class: "mwnf-record__status"
|
|
54
|
-
}, D = {
|
|
55
|
-
__name: "RecordView",
|
|
56
|
-
props: {
|
|
57
|
-
spec: {
|
|
58
|
-
type: Object,
|
|
59
|
-
required: !0
|
|
60
|
-
},
|
|
61
|
-
id: {
|
|
62
|
-
type: String,
|
|
63
|
-
required: !0
|
|
64
|
-
},
|
|
65
|
-
entity: {
|
|
66
|
-
type: String,
|
|
67
|
-
default: ""
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
setup(m) {
|
|
71
|
-
let y = m, { t: b, tIn: w, locale: ke } = we(), T = Se(), D = Te(), Le = le(), Re = Oe(), O = y.spec.entity ?? y.entity, k = a(() => y.spec), ze = me(O), Be = x(O), A = a(() => Be.value.get(y.id) ?? null), Ve = a(() => ze.value !== null), j = y.spec.creditPeople ? y.spec.creditPeople.entity ?? "authors" : null;
|
|
72
|
-
j && ge([j]).catch(() => {});
|
|
73
|
-
let He = j ? x(j) : null, { language: M, languages: Ue, dir: N, select: P, text: F, ready: I, terms: We, glossary: L, attribution: R } = Ee(A, {
|
|
74
|
-
entity: O,
|
|
75
|
-
translations: [...y.spec.translations ?? [], ...j ? [j] : []],
|
|
76
|
-
attribution: y.spec.attribution ?? []
|
|
77
|
-
}), z = a(() => he(Ue.value)), { active: B, onClick: V, close: Ge } = Ce(We), Ke = a(() => B.value ? S(B.value.definition, { breaks: !0 }) : ""), H = (e, t) => T.tr(e, t, M.value, "en"), U = (e) => T.translations(e, M.value), W = a(() => ({
|
|
78
|
-
record: A.value,
|
|
79
|
-
text: F.value,
|
|
80
|
-
language: M.value,
|
|
81
|
-
languages: z.value,
|
|
82
|
-
select: P,
|
|
83
|
-
dir: N.value,
|
|
84
|
-
glossary: L.value,
|
|
85
|
-
ready: I.value,
|
|
86
|
-
attribution: R.value,
|
|
87
|
-
t: b,
|
|
88
|
-
tIn: (e) => w ? w(M.value, e) : b(e),
|
|
89
|
-
tr: H,
|
|
90
|
-
translations: U
|
|
91
|
-
})), G = (e) => k.value.labelsInRecordLanguage && w ? w(M.value, e) : b(e);
|
|
92
|
-
function K(e) {
|
|
93
|
-
return ((typeof e == "function" ? e(W.value) : e) ?? []).map((e) => ({
|
|
94
|
-
...e,
|
|
95
|
-
label: e.label ? G(e.label) : ""
|
|
96
|
-
}));
|
|
97
|
-
}
|
|
98
|
-
let q = a(() => A.value ? be(K(k.value.fields), W.value) : []), J = a(() => A.value ? be(K(k.value.sections).map((e) => ({
|
|
99
|
-
render: "block",
|
|
100
|
-
...e
|
|
101
|
-
})), W.value) : []), Y = a(() => k.value.shortDescriptionAfter ?? "description"), qe = a(() => !q.value.some((e) => e.key === Y.value) && J.value.some((e) => e.key === Y.value)), Je = a(() => k.value.shortDescription === !1 ? "" : k.value.shortDescription ?? "short_description"), X = a(() => {
|
|
102
|
-
let e = Je.value ? F.value[Je.value] : "";
|
|
103
|
-
return e ? { html: S(String(e), {
|
|
104
|
-
breaks: !0,
|
|
105
|
-
glossary: L.value
|
|
106
|
-
}) } : null;
|
|
107
|
-
}), Ye = a(() => {
|
|
108
|
-
if (!A.value) return "";
|
|
109
|
-
if (k.value.title) return k.value.title(W.value);
|
|
110
|
-
let e = F.value.name ?? A.value.internal_name ?? A.value.id;
|
|
111
|
-
return C(String(e), { glossary: L.value });
|
|
112
|
-
}), Xe = a(() => A.value ? E(Ze(), k.value.pictureLimit, W.value) : []);
|
|
113
|
-
function Ze() {
|
|
114
|
-
if (k.value.media) return k.value.media(A.value, W.value);
|
|
115
|
-
let e = ye(String(F.value.name ?? A.value.internal_name ?? ""));
|
|
116
|
-
return ve(A.value.images, M.value).map((t) => ({
|
|
117
|
-
url: t.url,
|
|
118
|
-
alt: t.captions?.[M.value] ?? e,
|
|
119
|
-
caption: t.captions?.[M.value] ?? "",
|
|
120
|
-
..._e(t, M.value)
|
|
121
|
-
}));
|
|
122
|
-
}
|
|
123
|
-
let Qe = [
|
|
124
|
-
{
|
|
125
|
-
field: "author",
|
|
126
|
-
label: "sheet.field.preparedBy"
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
field: "copy_editor",
|
|
130
|
-
label: "sheet.field.copyeditedBy"
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
field: "translator",
|
|
134
|
-
label: "sheet.field.translationBy"
|
|
135
|
-
},
|
|
136
|
-
{
|
|
137
|
-
field: "translation_copy_editor",
|
|
138
|
-
label: "sheet.field.translationCopyeditedBy"
|
|
139
|
-
}
|
|
140
|
-
];
|
|
141
|
-
function $e(e) {
|
|
142
|
-
let t = k.value.creditNames ? F.value.credit_names?.[e] : null;
|
|
143
|
-
return t?.length ? pe(t) : F.value[e] ?? R.value[e] ?? "";
|
|
144
|
-
}
|
|
145
|
-
function et(e) {
|
|
146
|
-
let t = He ? F.value.credit_ids?.[e] : null;
|
|
147
|
-
if (!t?.length) return null;
|
|
148
|
-
let n = U(j), r = t.map((e) => {
|
|
149
|
-
let t = He.value.get(e);
|
|
150
|
-
if (!t) return null;
|
|
151
|
-
let r = t.name ?? "";
|
|
152
|
-
return {
|
|
153
|
-
name: M.value === "ar" && t.originalname ? t.originalname : r,
|
|
154
|
-
heading: [t.firstname, t.lastname].filter(Boolean).join(" ") || r,
|
|
155
|
-
biography: n?.[e]?.curriculum ?? ""
|
|
156
|
-
};
|
|
157
|
-
});
|
|
158
|
-
return r.every(Boolean) ? r : null;
|
|
159
|
-
}
|
|
160
|
-
let tt = a(() => (k.value.credits ?? Qe).map(({ field: e, label: t }) => ({
|
|
161
|
-
label: G(t),
|
|
162
|
-
value: $e(e),
|
|
163
|
-
people: et(e)
|
|
164
|
-
})).filter((e) => e.value)), nt = a(() => String(A.value?.[k.value.workingNumber ?? "mwnf_reference"] ?? ""));
|
|
165
|
-
function rt(e) {
|
|
166
|
-
if (e?.permalink !== !1) return typeof e?.permalink == "string" ? e.permalink : xe(Re) ?? void 0;
|
|
167
|
-
}
|
|
168
|
-
let it = a(() => {
|
|
169
|
-
let e = k.value.citation;
|
|
170
|
-
return !A.value || typeof e?.format != "function" ? "" : e.format(W.value, {
|
|
171
|
-
permalink: rt(e),
|
|
172
|
-
year: (/* @__PURE__ */ new Date()).getFullYear()
|
|
173
|
-
});
|
|
174
|
-
}), at = a(() => {
|
|
175
|
-
let e = k.value.citation;
|
|
176
|
-
if (!A.value || e === !1 || typeof e?.format == "function") return "";
|
|
177
|
-
let t = typeof e?.project == "function" ? null : e?.project ?? A.value.project_id, n = typeof e?.project == "function" ? e.project(A.value, W.value) : D.label(t);
|
|
178
|
-
return fe({
|
|
179
|
-
author: $e("author") || void 0,
|
|
180
|
-
name: F.value.name ?? A.value.internal_name ?? "",
|
|
181
|
-
project: n,
|
|
182
|
-
permalink: rt(e),
|
|
183
|
-
inWord: b("record.citation.in")
|
|
184
|
-
});
|
|
185
|
-
}), Z = De(A, {
|
|
186
|
-
entity: O,
|
|
187
|
-
language: M
|
|
188
|
-
}), Q = a(() => k.value.related === !1 ? null : k.value.related ?? {}), $ = a(() => {
|
|
189
|
-
if (!Q.value) return [];
|
|
190
|
-
let e = Q.value.record ?? ot;
|
|
191
|
-
return Z.value.inPackage.map((t) => e(t, W.value));
|
|
192
|
-
});
|
|
193
|
-
function ot({ record: e, justification: t }) {
|
|
194
|
-
let n = H(O, e.id).name ?? e.internal_name ?? e.id;
|
|
195
|
-
return {
|
|
196
|
-
id: e.id,
|
|
197
|
-
image: e.images?.[0]?.url ?? "",
|
|
198
|
-
imageAlt: ye(String(n)),
|
|
199
|
-
name: C(String(n)),
|
|
200
|
-
meta: t ? [t] : [],
|
|
201
|
-
badge: e.type ?? "",
|
|
202
|
-
to: {
|
|
203
|
-
name: k.value.route ?? (y.entity ? `${y.entity}-detail` : "item"),
|
|
204
|
-
params: { id: e.id }
|
|
205
|
-
}
|
|
206
|
-
};
|
|
207
|
-
}
|
|
208
|
-
let st = /* @__PURE__ */ new Set([
|
|
209
|
-
"header",
|
|
210
|
-
"before-sheet",
|
|
211
|
-
"after-sheet",
|
|
212
|
-
"aside",
|
|
213
|
-
"source",
|
|
214
|
-
"related",
|
|
215
|
-
"after",
|
|
216
|
-
"default"
|
|
217
|
-
]), ct = a(() => Object.keys(Le).filter((e) => !st.has(e)));
|
|
218
|
-
return (a, m) => Ve.value && !A.value ? (p(), o(v(de), { key: 0 })) : A.value ? (p(), c("article", {
|
|
219
|
-
key: 1,
|
|
220
|
-
class: ce(["mwnf-record", { "mwnf-record--spaced": k.value.spaced }]),
|
|
221
|
-
onClick: m[0] ||= (...e) => v(V) && v(V)(...e)
|
|
222
|
-
}, [
|
|
223
|
-
g(a.$slots, "header", f(d(W.value)), () => [
|
|
224
|
-
k.value.back ? (p(), o(r, {
|
|
225
|
-
key: 0,
|
|
226
|
-
class: "mwnf-record__back",
|
|
227
|
-
to: k.value.back.to,
|
|
228
|
-
href: k.value.back.href
|
|
229
|
-
}, {
|
|
230
|
-
default: ue(() => [oe("← " + _(v(b)(k.value.back.label)), 1)]),
|
|
231
|
-
_: 1
|
|
232
|
-
}, 8, ["to", "href"])) : s("", !0),
|
|
233
|
-
u(n, {
|
|
234
|
-
languages: z.value,
|
|
235
|
-
language: v(M),
|
|
236
|
-
onSelect: v(P)
|
|
237
|
-
}, null, 8, [
|
|
238
|
-
"languages",
|
|
239
|
-
"language",
|
|
240
|
-
"onSelect"
|
|
241
|
-
]),
|
|
242
|
-
l("h1", {
|
|
243
|
-
class: "mwnf-record__title",
|
|
244
|
-
dir: v(N) || void 0,
|
|
245
|
-
innerHTML: Ye.value
|
|
246
|
-
}, null, 8, je)
|
|
247
|
-
]),
|
|
248
|
-
l("div", Me, [l("div", Ne, [
|
|
249
|
-
Xe.value.length ? (p(), o(ee, {
|
|
250
|
-
key: 0,
|
|
251
|
-
images: Xe.value,
|
|
252
|
-
variant: k.value.mediaVariant ?? ""
|
|
253
|
-
}, null, 8, ["images", "variant"])) : s("", !0),
|
|
254
|
-
v(I) ? s("", !0) : (p(), c("p", Pe, _(v(b)("core.status.loading")), 1)),
|
|
255
|
-
g(a.$slots, "before-sheet", f(d(W.value))),
|
|
256
|
-
u(re, {
|
|
257
|
-
rows: q.value,
|
|
258
|
-
layout: k.value.layout ?? "table",
|
|
259
|
-
dir: v(N),
|
|
260
|
-
"short-description": X.value,
|
|
261
|
-
"short-description-after": Y.value
|
|
262
|
-
}, ae({ _: 2 }, [h(ct.value, (e) => ({
|
|
263
|
-
name: e,
|
|
264
|
-
fn: ue((t) => [g(a.$slots, e, f(d({
|
|
265
|
-
...t,
|
|
266
|
-
...W.value
|
|
267
|
-
})))])
|
|
268
|
-
}))]), 1032, [
|
|
269
|
-
"rows",
|
|
270
|
-
"layout",
|
|
271
|
-
"dir",
|
|
272
|
-
"short-description",
|
|
273
|
-
"short-description-after"
|
|
274
|
-
]),
|
|
275
|
-
(p(!0), c(ie, null, h(J.value, (e) => (p(), c(ie, { key: e.key }, [
|
|
276
|
-
u(te, {
|
|
277
|
-
heading: e.label,
|
|
278
|
-
html: e.html,
|
|
279
|
-
dir: v(N)
|
|
280
|
-
}, null, 8, [
|
|
281
|
-
"heading",
|
|
282
|
-
"html",
|
|
283
|
-
"dir"
|
|
284
|
-
]),
|
|
285
|
-
X.value && qe.value && e.key === Y.value ? (p(), o(Ae, {
|
|
286
|
-
key: 0,
|
|
287
|
-
html: X.value.html,
|
|
288
|
-
dir: v(N)
|
|
289
|
-
}, null, 8, ["html", "dir"])) : s("", !0),
|
|
290
|
-
g(a.$slots, `after-${e.key}`, se({ ref_for: !0 }, W.value))
|
|
291
|
-
], 64))), 128)),
|
|
292
|
-
g(a.$slots, "after-sheet", f(d(W.value))),
|
|
293
|
-
u(t, {
|
|
294
|
-
credits: tt.value,
|
|
295
|
-
"working-number": nt.value,
|
|
296
|
-
"working-number-label": G(k.value.workingNumberLabel ?? "sheet.field.workingNumber"),
|
|
297
|
-
citation: at.value,
|
|
298
|
-
"citation-html": it.value,
|
|
299
|
-
"citation-heading": k.value.citation?.heading ? G(k.value.citation.heading) : ""
|
|
300
|
-
}, null, 8, [
|
|
301
|
-
"credits",
|
|
302
|
-
"working-number",
|
|
303
|
-
"working-number-label",
|
|
304
|
-
"citation",
|
|
305
|
-
"citation-html",
|
|
306
|
-
"citation-heading"
|
|
307
|
-
]),
|
|
308
|
-
g(a.$slots, "source", f(d(W.value)), () => [u(i)]),
|
|
309
|
-
g(a.$slots, "related", f(d({
|
|
310
|
-
...W.value,
|
|
311
|
-
records: $.value,
|
|
312
|
-
outside: v(Z).outside
|
|
313
|
-
})), () => [Q.value ? (p(), o(ne, {
|
|
314
|
-
key: 0,
|
|
315
|
-
heading: v(b)(Q.value.heading ?? "record.related.items"),
|
|
316
|
-
records: $.value,
|
|
317
|
-
variant: Q.value.variant ?? "list",
|
|
318
|
-
"action-label": Q.value.actionLabel ? v(b)(Q.value.actionLabel) : ""
|
|
319
|
-
}, null, 8, [
|
|
320
|
-
"heading",
|
|
321
|
-
"records",
|
|
322
|
-
"variant",
|
|
323
|
-
"action-label"
|
|
324
|
-
])) : s("", !0)])
|
|
325
|
-
]), a.$slots.aside ? (p(), c("aside", Fe, [g(a.$slots, "aside", f(d({
|
|
326
|
-
...W.value,
|
|
327
|
-
records: $.value,
|
|
328
|
-
outside: v(Z).outside
|
|
329
|
-
})))])) : s("", !0)]),
|
|
330
|
-
g(a.$slots, "after", f(d(W.value))),
|
|
331
|
-
u(e, {
|
|
332
|
-
term: v(B),
|
|
333
|
-
html: Ke.value,
|
|
334
|
-
dir: v(N),
|
|
335
|
-
onClose: v(Ge)
|
|
336
|
-
}, null, 8, [
|
|
337
|
-
"term",
|
|
338
|
-
"html",
|
|
339
|
-
"dir",
|
|
340
|
-
"onClose"
|
|
341
|
-
])
|
|
342
|
-
], 2)) : (p(), c("p", Ie, _(v(b)("core.status.loading")), 1));
|
|
343
|
-
}
|
|
344
|
-
};
|
|
345
|
-
export { E as n, D as t };
|