@museumwnf/viewer-layout 3.4.0 → 3.6.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/README.md +70 -2
- package/dist/{FeaturedRecord-BJ8LaWGP.js → FeaturedRecord-DJfyvfqt.js} +1 -1
- package/dist/GlossaryPopover-DcptyNWI.js +654 -0
- package/dist/{ItemDetailView-I__hm63H.js → ItemDetailView-BdGFnbLG.js} +15 -14
- package/dist/{OnDisplayIn-Dv8i7uvH.js → OnDisplayIn-BfJoPonn.js} +38 -38
- package/dist/RecordView-DovgfTMz.js +263 -0
- package/dist/{Theme-B5J0XRe1.js → Theme-CZ-OVXao.js} +24 -24
- package/dist/TimelineEventList-gsoc-SBx.js +841 -0
- package/dist/TimelineResultsView-C2-TnM71.js +1386 -0
- package/dist/{content-p0tqKkcD.js → content-CtwBcSjU.js} +2 -2
- package/dist/content.js +6 -5
- package/dist/dxa.js +351 -349
- package/dist/index.js +6 -5
- package/dist/standalone.js +761 -0
- package/dist/viewer-layout.css +1 -1
- package/dist/views.js +5 -4
- package/package.json +4 -3
- package/src/tokens.reference.css +66 -0
- package/dist/TimelineEventList-COjkXEzS.js +0 -1487
- package/dist/TimelineResultsView-ChkBn27W.js +0 -1640
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { t as e } from "./chrome-DPuPeWzV.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { r as t } from "./GlossaryPopover-DcptyNWI.js";
|
|
3
|
+
import { n } from "./TimelineEventList-gsoc-SBx.js";
|
|
4
|
+
import { i as r, n as i, o as a, r as o, t as s } from "./OnDisplayIn-BfJoPonn.js";
|
|
5
|
+
import { t as c } from "./RecordView-DovgfTMz.js";
|
|
5
6
|
import { Fragment as l, computed as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createElementVNode as m, createSlots as ee, createTextVNode as h, createVNode as g, guardReactiveProps as _, normalizeClass as v, normalizeProps as y, normalizeStyle as te, openBlock as b, renderList as x, renderSlot as S, toDisplayString as C, unref as w, useSlots as ne, withCtx as T } from "vue";
|
|
6
7
|
import { NotFoundView as re, byId as E, loadEntities as ie, mdInline as D, mdStrip as ae, mwnfLinks as O, partnerView as oe, useDataPackage as se, useI18n as ce, useProjects as le, useSiteConfig as ue } from "@museumwnf/viewer-core";
|
|
7
8
|
//#region src/dxa/ItemDetailView.vue
|
|
@@ -188,22 +189,22 @@ var k = {
|
|
|
188
189
|
target: "_blank",
|
|
189
190
|
rel: "noopener"
|
|
190
191
|
}, "↗ " + C(e.addToCollectionLabel), 9, M)])) : f("", !0)])) : f("", !0), e?.notice ? (b(), p("div", N, [h(C(e.notice) + " ", 1), m("strong", null, [m("em", null, C(t.languages.map((e) => e.label).join(", ")), 1)])])) : f("", !0)], 64))), 128))])]),
|
|
191
|
-
museum: T((
|
|
192
|
+
museum: T((t) => [S(e.$slots, "museum", y(_(t)), () => [(b(!0), p(l, null, x([Ne(t)], (e) => (b(), p("div", P, [e.holder ? (b(), p("p", {
|
|
192
193
|
key: 0,
|
|
193
194
|
class: "mwnf-sheet-museum__holder",
|
|
194
195
|
innerHTML: e.holder
|
|
195
|
-
}, null, 8, F)) : f("", !0), e.view ? (b(), d(
|
|
196
|
+
}, null, 8, F)) : f("", !0), e.view ? (b(), d(n, {
|
|
196
197
|
key: 1,
|
|
197
198
|
variant: "summary",
|
|
198
199
|
partner: e.view,
|
|
199
200
|
label: "partner.info.about",
|
|
200
|
-
dir:
|
|
201
|
+
dir: t.dir
|
|
201
202
|
}, null, 8, ["partner", "dir"])) : f("", !0)]))), 128))])]),
|
|
202
203
|
related: T(() => []),
|
|
203
|
-
aside: T((
|
|
204
|
+
aside: T((n) => [S(e.$slots, "related", y(_(n)), () => [(b(!0), p(l, null, x([Pe(n.record, n)], (e) => (b(), p(l, { key: n.record?.id ?? "related" }, [e ? (b(), p("div", I, [
|
|
204
205
|
e.title ? (b(), p("p", L, C(e.title), 1)) : f("", !0),
|
|
205
206
|
e.description ? (b(), p("p", R, C(e.description), 1)) : f("", !0),
|
|
206
|
-
e.inPackage.length || e.references.length ? (b(), d(
|
|
207
|
+
e.inPackage.length || e.references.length ? (b(), d(t, {
|
|
207
208
|
key: 2,
|
|
208
209
|
heading: e.heading,
|
|
209
210
|
records: e.inPackage,
|
|
@@ -232,20 +233,20 @@ var k = {
|
|
|
232
233
|
rel: "noopener"
|
|
233
234
|
}, "↗ " + C(e.artisticIntroduction.label), 9, H)])) : f("", !0),
|
|
234
235
|
e.timeline ? (b(), d(o, {
|
|
235
|
-
key:
|
|
236
|
+
key: n.record.id,
|
|
236
237
|
info: e.timeline
|
|
237
238
|
}, null, 8, ["info"])) : f("", !0),
|
|
238
239
|
e.glossary ? (b(), d(a, {
|
|
239
240
|
key: 5,
|
|
240
|
-
language:
|
|
241
|
-
dir:
|
|
241
|
+
language: n.language,
|
|
242
|
+
dir: n.dir
|
|
242
243
|
}, null, 8, ["language", "dir"])) : f("", !0),
|
|
243
244
|
e.dynasties?.records?.length ? (b(), d(r, {
|
|
244
245
|
key: 6,
|
|
245
246
|
heading: w(K)("record.dynasty.list"),
|
|
246
247
|
dynasties: e.dynasties.records,
|
|
247
248
|
tr: e.dynasties.tr,
|
|
248
|
-
dir:
|
|
249
|
+
dir: n.dir
|
|
249
250
|
}, null, 8, [
|
|
250
251
|
"heading",
|
|
251
252
|
"dynasties",
|
|
@@ -255,13 +256,13 @@ var k = {
|
|
|
255
256
|
g(i, {
|
|
256
257
|
media: e.media,
|
|
257
258
|
descriptions: !1,
|
|
258
|
-
dir:
|
|
259
|
+
dir: n.dir
|
|
259
260
|
}, null, 8, ["media", "dir"]),
|
|
260
261
|
e.onDisplayIn?.groups.length ? (b(), p("div", U, [m("p", de, C(w(K)("record.related.onDisplayIn")), 1), g(s, {
|
|
261
262
|
heading: "",
|
|
262
263
|
groups: e.onDisplayIn.groups,
|
|
263
264
|
"pending-label": e.onDisplayIn.pendingLabel,
|
|
264
|
-
dir:
|
|
265
|
+
dir: n.dir
|
|
265
266
|
}, null, 8, [
|
|
266
267
|
"groups",
|
|
267
268
|
"pending-label",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { d as e, o as t } from "./GlossaryPopover-DcptyNWI.js";
|
|
2
2
|
import { Fragment as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, createVNode as l, mergeProps as u, normalizeClass as d, openBlock as f, ref as p, renderList as m, renderSlot as h, resolveDynamicComponent as g, toDisplayString as _, unref as v, vModelSelect as y, vModelText as b, watch as x, withCtx as S, withDirectives as C, withKeys as w } from "vue";
|
|
3
3
|
import { useI18n as T } from "@museumwnf/viewer-core/i18n";
|
|
4
4
|
import { md as E, mdInline as D, searchGlossary as ee } from "@museumwnf/viewer-core";
|
|
@@ -35,8 +35,8 @@ var k = ["href"], A = {
|
|
|
35
35
|
default: "←"
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
|
-
setup(
|
|
39
|
-
let n = O(), a =
|
|
38
|
+
setup(t) {
|
|
39
|
+
let n = O(), a = t, l = r(() => !!(a.to || a.href));
|
|
40
40
|
function u() {
|
|
41
41
|
return window.history.state?.back != null || !l.value && window.history.length > 1;
|
|
42
42
|
}
|
|
@@ -47,28 +47,28 @@ var k = ["href"], A = {
|
|
|
47
47
|
function m(e) {
|
|
48
48
|
e.button !== 0 || e.metaKey || e.ctrlKey || e.shiftKey || e.altKey || (u() ? (e.preventDefault(), n.back()) : a.to && n ? (e.preventDefault(), n.push(a.to)) : l.value || e.preventDefault());
|
|
49
49
|
}
|
|
50
|
-
return (n, r) =>
|
|
50
|
+
return (n, r) => t.variant === "bar" ? (f(), o("a", {
|
|
51
51
|
key: 0,
|
|
52
52
|
href: p.value,
|
|
53
53
|
class: "mwnf-back-bar mwnf-back-bar--link",
|
|
54
54
|
onClick: m
|
|
55
55
|
}, [
|
|
56
|
-
s("span", A, _(
|
|
56
|
+
s("span", A, _(t.arrow), 1),
|
|
57
57
|
r[0] ||= c(),
|
|
58
|
-
h(n.$slots, "default", {}, () => [c(_(n.$t(
|
|
59
|
-
], 8, k)) : (f(), o("div", te, [l.value && !u() ? (f(), i(
|
|
58
|
+
h(n.$slots, "default", {}, () => [c(_(n.$t(t.label)), 1)])
|
|
59
|
+
], 8, k)) : (f(), o("div", te, [l.value && !u() ? (f(), i(e, {
|
|
60
60
|
key: 0,
|
|
61
|
-
to:
|
|
62
|
-
href:
|
|
61
|
+
to: t.to,
|
|
62
|
+
href: t.href,
|
|
63
63
|
class: "mwnf-back-link__button"
|
|
64
64
|
}, {
|
|
65
|
-
default: S(() => [c(" ↩ " + _(n.$t(
|
|
65
|
+
default: S(() => [c(" ↩ " + _(n.$t(t.label)), 1)]),
|
|
66
66
|
_: 1
|
|
67
67
|
}, 8, ["to", "href"])) : (f(), o("button", {
|
|
68
68
|
key: 1,
|
|
69
69
|
class: "mwnf-back-link__button",
|
|
70
70
|
onClick: d
|
|
71
|
-
}, " ↩ " + _(n.$t(
|
|
71
|
+
}, " ↩ " + _(n.$t(t.label)), 1))]));
|
|
72
72
|
}
|
|
73
73
|
}, j = ["dir"], M = { class: "mwnf-glossary-tool__toggle" }, N = { class: "mwnf-glossary-tool__panel" }, P = { class: "mwnf-glossary-tool__heading" }, F = { class: "mwnf-glossary-tool__instructions" }, I = ["aria-expanded", "aria-label"], L = {
|
|
74
74
|
key: 0,
|
|
@@ -256,8 +256,8 @@ var k = ["href"], A = {
|
|
|
256
256
|
type: Object,
|
|
257
257
|
required: !0
|
|
258
258
|
} },
|
|
259
|
-
setup(
|
|
260
|
-
let i =
|
|
259
|
+
setup(t) {
|
|
260
|
+
let i = t, { t: u } = T(), d = p(!1), h = p(i.info.defaultCountry ? i.info.defaultCountry() : "all");
|
|
261
261
|
x(() => i.info, (e) => {
|
|
262
262
|
h.value = e.defaultCountry ? e.defaultCountry() : "all";
|
|
263
263
|
});
|
|
@@ -265,23 +265,23 @@ var k = ["href"], A = {
|
|
|
265
265
|
return (r, i) => (f(), o("div", ue, [s("p", {
|
|
266
266
|
class: "mwnf-sheet-timeline__trigger",
|
|
267
267
|
onClick: i[0] ||= (e) => d.value = !d.value
|
|
268
|
-
}, "➤ " + _(v(u)(
|
|
268
|
+
}, "➤ " + _(v(u)(t.info.trigger ?? "record.related.timelineForItem")), 1), d.value ? (f(), o("div", de, [
|
|
269
269
|
s("button", {
|
|
270
270
|
type: "button",
|
|
271
271
|
class: "mwnf-sheet-timeline__close",
|
|
272
272
|
"aria-label": v(u)("core.action.close"),
|
|
273
273
|
onClick: i[1] ||= (e) => d.value = !1
|
|
274
274
|
}, "✕", 8, fe),
|
|
275
|
-
s("p", pe, _(v(u)(
|
|
275
|
+
s("p", pe, _(v(u)(t.info.heading)), 1),
|
|
276
276
|
s("div", me, [C(s("select", {
|
|
277
277
|
"onUpdate:modelValue": i[2] ||= (e) => h.value = e,
|
|
278
278
|
class: "mwnf-sheet-timeline__select"
|
|
279
|
-
}, [(f(!0), o(n, null, m(
|
|
279
|
+
}, [(f(!0), o(n, null, m(t.info.countries, (e) => (f(), o("option", {
|
|
280
280
|
key: e.value,
|
|
281
281
|
value: e.value
|
|
282
|
-
}, _(e.label), 9, he))), 128))], 512), [[y, h.value]]), l(
|
|
282
|
+
}, _(e.label), 9, he))), 128))], 512), [[y, h.value]]), l(e, {
|
|
283
283
|
class: "mwnf-sheet-timeline__link",
|
|
284
|
-
to:
|
|
284
|
+
to: t.info.searchTo(h.value, g.value)
|
|
285
285
|
}, {
|
|
286
286
|
default: S(() => [c("➤ " + _(v(u)("timeline.action.beginFullSearch")), 1)]),
|
|
287
287
|
_: 1
|
|
@@ -326,28 +326,28 @@ var k = ["href"], A = {
|
|
|
326
326
|
default: ""
|
|
327
327
|
}
|
|
328
328
|
},
|
|
329
|
-
setup(
|
|
330
|
-
let c =
|
|
329
|
+
setup(e) {
|
|
330
|
+
let c = e, { t: l } = T(), u = r(() => {
|
|
331
331
|
let e = c.media.filter((e) => e?.url);
|
|
332
332
|
if (!c.language) return e;
|
|
333
333
|
let t = e.filter((e) => e.language === c.language);
|
|
334
334
|
return t.length ? t : e;
|
|
335
335
|
});
|
|
336
|
-
return (r, c) => u.value.length ? (f(), i(
|
|
336
|
+
return (r, c) => u.value.length ? (f(), i(t, {
|
|
337
337
|
key: 0,
|
|
338
|
-
heading:
|
|
339
|
-
dir:
|
|
338
|
+
heading: e.heading ? v(l)(e.heading) : "",
|
|
339
|
+
dir: e.dir,
|
|
340
340
|
class: "mwnf-related-media"
|
|
341
341
|
}, {
|
|
342
|
-
default: S(() => [(f(!0), o(n, null, m(u.value, (
|
|
343
|
-
key:
|
|
342
|
+
default: S(() => [(f(!0), o(n, null, m(u.value, (t) => (f(), o("div", {
|
|
343
|
+
key: t.url,
|
|
344
344
|
class: "mwnf-related-media__entry"
|
|
345
345
|
}, [s("a", {
|
|
346
|
-
href:
|
|
346
|
+
href: t.url,
|
|
347
347
|
target: "_blank",
|
|
348
348
|
rel: "noopener",
|
|
349
349
|
class: "mwnf-related-media__link"
|
|
350
|
-
}, "↗ " + _(
|
|
350
|
+
}, "↗ " + _(t.title || t.url), 9, xe), e.descriptions && t.description ? (f(), o("p", Se, _(t.description), 1)) : a("", !0)]))), 128))]),
|
|
351
351
|
_: 1
|
|
352
352
|
}, 8, ["heading", "dir"])) : a("", !0);
|
|
353
353
|
}
|
|
@@ -376,29 +376,29 @@ var k = ["href"], A = {
|
|
|
376
376
|
},
|
|
377
377
|
setup(l) {
|
|
378
378
|
let d = l, { t: p } = T(), h = r(() => d.groups.filter((e) => e.links?.length));
|
|
379
|
-
return (r, d) => h.value.length ? (f(), i(g(l.heading ?
|
|
379
|
+
return (r, d) => h.value.length ? (f(), i(g(l.heading ? t : "div"), u({ key: 0 }, l.heading ? { heading: v(p)(l.heading) } : {}, {
|
|
380
380
|
dir: l.dir || void 0,
|
|
381
381
|
class: "mwnf-on-display"
|
|
382
382
|
}), {
|
|
383
|
-
default: S(() => [(f(!0), o(n, null, m(h.value, (
|
|
384
|
-
key:
|
|
383
|
+
default: S(() => [(f(!0), o(n, null, m(h.value, (t, r) => (f(), o("div", {
|
|
384
|
+
key: t.heading ?? r,
|
|
385
385
|
class: "mwnf-on-display__group"
|
|
386
|
-
}, [
|
|
387
|
-
key:
|
|
386
|
+
}, [t.heading ? (f(), o("p", we, _(v(p)(t.heading)), 1)) : a("", !0), s("ul", Te, [(f(!0), o(n, null, m(t.links, (t, r) => (f(), o("li", {
|
|
387
|
+
key: t.id ?? r,
|
|
388
388
|
class: "mwnf-on-display__item"
|
|
389
|
-
}, [
|
|
389
|
+
}, [t.to || t.href ? (f(), i(e, {
|
|
390
390
|
key: 0,
|
|
391
|
-
to:
|
|
392
|
-
href:
|
|
393
|
-
external: !!
|
|
391
|
+
to: t.to,
|
|
392
|
+
href: t.href,
|
|
393
|
+
external: !!t.external
|
|
394
394
|
}, {
|
|
395
|
-
default: S(() => [
|
|
395
|
+
default: S(() => [t.external ? (f(), o(n, { key: 0 }, [c("↗ ")], 64)) : a("", !0), s("span", { innerHTML: t.label }, null, 8, Ee)]),
|
|
396
396
|
_: 2
|
|
397
397
|
}, 1032, [
|
|
398
398
|
"to",
|
|
399
399
|
"href",
|
|
400
400
|
"external"
|
|
401
|
-
])) : (f(), o(n, { key: 1 }, [s("span", { innerHTML:
|
|
401
|
+
])) : (f(), o(n, { key: 1 }, [s("span", { innerHTML: t.label }, null, 8, De), l.pendingLabel ? (f(), o(n, { key: 0 }, [d[0] ||= c(_(" "), -1), s("span", Oe, _(v(p)(l.pendingLabel)), 1)], 64)) : a("", !0)], 64))]))), 128))])]))), 128))]),
|
|
402
402
|
_: 1
|
|
403
403
|
}, 16, ["dir"])) : a("", !0);
|
|
404
404
|
}
|
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
import { a as e, c as t, d as n, i as r, n as ee, o as te, r as ne, s as re, t as ie } from "./GlossaryPopover-DcptyNWI.js";
|
|
2
|
+
import { Fragment as i, computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createSlots as u, createTextVNode as d, createVNode as f, guardReactiveProps as p, normalizeClass as ae, normalizeProps as m, openBlock as h, renderList as g, renderSlot as _, toDisplayString as v, unref as y, useSlots as b, withCtx as x } from "vue";
|
|
3
|
+
import { NotFoundView as oe, byId as se, citation as ce, entityRef as le, languageLabels as ue, pictureCredits as de, renderBlock as S, renderInline as C, renderPlain as w, sheetRows as T, sourceUrl as fe, useDataPackage as pe, useGlossaryPopup as me, useI18n as he, useProjects as ge, useRecordSheet as _e, useRelatedRecords as ve } from "@museumwnf/viewer-core";
|
|
4
|
+
import { useRoute as ye } from "vue-router";
|
|
5
|
+
//#region src/views/RecordView.vue
|
|
6
|
+
var be = ["dir", "innerHTML"], xe = { class: "mwnf-record__body" }, E = { class: "mwnf-record__main" }, Se = {
|
|
7
|
+
key: 1,
|
|
8
|
+
class: "mwnf-record__status"
|
|
9
|
+
}, D = {
|
|
10
|
+
key: 0,
|
|
11
|
+
class: "mwnf-record__aside"
|
|
12
|
+
}, O = {
|
|
13
|
+
key: 2,
|
|
14
|
+
class: "mwnf-record__status"
|
|
15
|
+
}, k = {
|
|
16
|
+
__name: "RecordView",
|
|
17
|
+
props: {
|
|
18
|
+
spec: {
|
|
19
|
+
type: Object,
|
|
20
|
+
required: !0
|
|
21
|
+
},
|
|
22
|
+
id: {
|
|
23
|
+
type: String,
|
|
24
|
+
required: !0
|
|
25
|
+
},
|
|
26
|
+
entity: {
|
|
27
|
+
type: String,
|
|
28
|
+
default: ""
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
setup(k) {
|
|
32
|
+
let A = k, { t: j, locale: Ce } = he(), M = pe(), we = ge(), Te = b(), Ee = ye(), N = A.spec.entity ?? A.entity, P = a(() => A.spec), De = le(N), Oe = se(N), F = a(() => Oe.value.get(A.id) ?? null), ke = a(() => De.value !== null), { language: I, languages: Ae, dir: L, select: R, text: z, ready: B, terms: je, glossary: V, attribution: H } = _e(F, {
|
|
33
|
+
entity: N,
|
|
34
|
+
translations: A.spec.translations ?? [],
|
|
35
|
+
attribution: A.spec.attribution ?? []
|
|
36
|
+
}), U = a(() => ue(Ae.value)), { active: W, onClick: G, close: Me } = me(je), Ne = a(() => W.value ? S(W.value.definition, { breaks: !0 }) : ""), K = (e, t) => M.tr(e, t, I.value, "en"), Pe = (e) => M.translations(e, I.value), q = a(() => ({
|
|
37
|
+
record: F.value,
|
|
38
|
+
text: z.value,
|
|
39
|
+
language: I.value,
|
|
40
|
+
languages: U.value,
|
|
41
|
+
select: R,
|
|
42
|
+
dir: L.value,
|
|
43
|
+
glossary: V.value,
|
|
44
|
+
ready: B.value,
|
|
45
|
+
attribution: H.value,
|
|
46
|
+
t: j,
|
|
47
|
+
tr: K,
|
|
48
|
+
translations: Pe
|
|
49
|
+
}));
|
|
50
|
+
function J(e) {
|
|
51
|
+
return ((typeof e == "function" ? e(q.value) : e) ?? []).map((e) => ({
|
|
52
|
+
...e,
|
|
53
|
+
label: e.label ? j(e.label) : ""
|
|
54
|
+
}));
|
|
55
|
+
}
|
|
56
|
+
let Fe = a(() => F.value ? T(J(P.value.fields), q.value) : []), Ie = a(() => F.value ? T(J(P.value.sections).map((e) => ({
|
|
57
|
+
render: "block",
|
|
58
|
+
...e
|
|
59
|
+
})), q.value) : []), Y = a(() => P.value.shortDescription === !1 ? "" : P.value.shortDescription ?? "short_description"), Le = a(() => {
|
|
60
|
+
let e = Y.value ? z.value[Y.value] : "";
|
|
61
|
+
return e ? { html: S(String(e), {
|
|
62
|
+
breaks: !0,
|
|
63
|
+
glossary: V.value
|
|
64
|
+
}) } : null;
|
|
65
|
+
}), Re = a(() => {
|
|
66
|
+
if (!F.value) return "";
|
|
67
|
+
if (P.value.title) return P.value.title(q.value);
|
|
68
|
+
let e = z.value.name ?? F.value.internal_name ?? F.value.id;
|
|
69
|
+
return C(String(e), { glossary: V.value });
|
|
70
|
+
}), X = a(() => {
|
|
71
|
+
if (!F.value) return [];
|
|
72
|
+
if (P.value.media) return P.value.media(F.value, q.value);
|
|
73
|
+
let e = w(String(z.value.name ?? F.value.internal_name ?? ""));
|
|
74
|
+
return (F.value.images ?? []).map((t) => ({
|
|
75
|
+
url: t.url,
|
|
76
|
+
alt: t.captions?.[I.value] ?? e,
|
|
77
|
+
caption: t.captions?.[I.value] ?? "",
|
|
78
|
+
...de(t, I.value)
|
|
79
|
+
}));
|
|
80
|
+
}), ze = [
|
|
81
|
+
{
|
|
82
|
+
field: "author",
|
|
83
|
+
label: "sheet.field.preparedBy"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
field: "copy_editor",
|
|
87
|
+
label: "sheet.field.copyeditedBy"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
field: "translator",
|
|
91
|
+
label: "sheet.field.translationBy"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
field: "translation_copy_editor",
|
|
95
|
+
label: "sheet.field.translationCopyeditedBy"
|
|
96
|
+
}
|
|
97
|
+
], Be = a(() => (P.value.credits ?? ze).map(({ field: e, label: t }) => ({
|
|
98
|
+
label: j(t),
|
|
99
|
+
value: z.value[e] ?? H.value[e] ?? ""
|
|
100
|
+
})).filter((e) => e.value)), Ve = a(() => String(F.value?.[P.value.workingNumber ?? "mwnf_reference"] ?? "")), He = a(() => {
|
|
101
|
+
let e = P.value.citation;
|
|
102
|
+
if (!F.value || e === !1) return "";
|
|
103
|
+
let t = typeof e?.project == "function" ? null : e?.project ?? F.value.project_id, n = typeof e?.project == "function" ? e.project(F.value, q.value) : we.label(t), r = e?.permalink === !1 ? void 0 : typeof e?.permalink == "string" ? e.permalink : fe(Ee) ?? void 0;
|
|
104
|
+
return ce({
|
|
105
|
+
author: z.value.author ?? H.value.author,
|
|
106
|
+
name: z.value.name ?? F.value.internal_name ?? "",
|
|
107
|
+
project: n,
|
|
108
|
+
permalink: r,
|
|
109
|
+
inWord: j("record.citation.in")
|
|
110
|
+
});
|
|
111
|
+
}), Z = ve(F, {
|
|
112
|
+
entity: N,
|
|
113
|
+
language: I
|
|
114
|
+
}), Q = a(() => P.value.related === !1 ? null : P.value.related ?? {}), $ = a(() => {
|
|
115
|
+
if (!Q.value) return [];
|
|
116
|
+
let e = Q.value.record ?? Ue;
|
|
117
|
+
return Z.value.inPackage.map((t) => e(t, q.value));
|
|
118
|
+
});
|
|
119
|
+
function Ue({ record: e, justification: t }) {
|
|
120
|
+
let n = K(N, e.id).name ?? e.internal_name ?? e.id;
|
|
121
|
+
return {
|
|
122
|
+
id: e.id,
|
|
123
|
+
image: e.images?.[0]?.url ?? "",
|
|
124
|
+
imageAlt: w(String(n)),
|
|
125
|
+
name: C(String(n)),
|
|
126
|
+
meta: t ? [t] : [],
|
|
127
|
+
badge: e.type ?? "",
|
|
128
|
+
to: {
|
|
129
|
+
name: P.value.route ?? (A.entity ? `${A.entity}-detail` : "item"),
|
|
130
|
+
params: { id: e.id }
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
let We = /* @__PURE__ */ new Set([
|
|
135
|
+
"header",
|
|
136
|
+
"before-sheet",
|
|
137
|
+
"after-sheet",
|
|
138
|
+
"aside",
|
|
139
|
+
"source",
|
|
140
|
+
"related",
|
|
141
|
+
"after",
|
|
142
|
+
"default"
|
|
143
|
+
]), Ge = a(() => Object.keys(Te).filter((e) => !We.has(e)));
|
|
144
|
+
return (a, b) => ke.value && !F.value ? (h(), o(y(oe), { key: 0 })) : F.value ? (h(), c("article", {
|
|
145
|
+
key: 1,
|
|
146
|
+
class: ae(["mwnf-record", { "mwnf-record--spaced": P.value.spaced }]),
|
|
147
|
+
onClick: b[0] ||= (...e) => y(G) && y(G)(...e)
|
|
148
|
+
}, [
|
|
149
|
+
_(a.$slots, "header", m(p(q.value)), () => [
|
|
150
|
+
P.value.back ? (h(), o(n, {
|
|
151
|
+
key: 0,
|
|
152
|
+
class: "mwnf-record__back",
|
|
153
|
+
to: P.value.back.to,
|
|
154
|
+
href: P.value.back.href
|
|
155
|
+
}, {
|
|
156
|
+
default: x(() => [d("← " + v(y(j)(P.value.back.label)), 1)]),
|
|
157
|
+
_: 1
|
|
158
|
+
}, 8, ["to", "href"])) : s("", !0),
|
|
159
|
+
f(t, {
|
|
160
|
+
languages: U.value,
|
|
161
|
+
language: y(I),
|
|
162
|
+
onSelect: y(R)
|
|
163
|
+
}, null, 8, [
|
|
164
|
+
"languages",
|
|
165
|
+
"language",
|
|
166
|
+
"onSelect"
|
|
167
|
+
]),
|
|
168
|
+
l("h1", {
|
|
169
|
+
class: "mwnf-record__title",
|
|
170
|
+
dir: y(L) || void 0,
|
|
171
|
+
innerHTML: Re.value
|
|
172
|
+
}, null, 8, be)
|
|
173
|
+
]),
|
|
174
|
+
l("div", xe, [l("div", E, [
|
|
175
|
+
X.value.length ? (h(), o(ee, {
|
|
176
|
+
key: 0,
|
|
177
|
+
images: X.value,
|
|
178
|
+
variant: P.value.mediaVariant ?? ""
|
|
179
|
+
}, null, 8, ["images", "variant"])) : s("", !0),
|
|
180
|
+
y(B) ? s("", !0) : (h(), c("p", Se, v(y(j)("core.status.loading")), 1)),
|
|
181
|
+
_(a.$slots, "before-sheet", m(p(q.value))),
|
|
182
|
+
f(re, {
|
|
183
|
+
rows: Fe.value,
|
|
184
|
+
layout: P.value.layout ?? "table",
|
|
185
|
+
dir: y(L),
|
|
186
|
+
"short-description": Le.value,
|
|
187
|
+
"short-description-after": P.value.shortDescriptionAfter ?? "description"
|
|
188
|
+
}, u({ _: 2 }, [g(Ge.value, (e) => ({
|
|
189
|
+
name: e,
|
|
190
|
+
fn: x((t) => [_(a.$slots, e, m(p({
|
|
191
|
+
...t,
|
|
192
|
+
...q.value
|
|
193
|
+
})))])
|
|
194
|
+
}))]), 1032, [
|
|
195
|
+
"rows",
|
|
196
|
+
"layout",
|
|
197
|
+
"dir",
|
|
198
|
+
"short-description",
|
|
199
|
+
"short-description-after"
|
|
200
|
+
]),
|
|
201
|
+
(h(!0), c(i, null, g(Ie.value, (e) => (h(), o(te, {
|
|
202
|
+
key: e.key,
|
|
203
|
+
heading: e.label,
|
|
204
|
+
html: e.html,
|
|
205
|
+
dir: y(L)
|
|
206
|
+
}, null, 8, [
|
|
207
|
+
"heading",
|
|
208
|
+
"html",
|
|
209
|
+
"dir"
|
|
210
|
+
]))), 128)),
|
|
211
|
+
_(a.$slots, "after-sheet", m(p(q.value))),
|
|
212
|
+
f(e, {
|
|
213
|
+
credits: Be.value,
|
|
214
|
+
"working-number": Ve.value,
|
|
215
|
+
"working-number-label": y(j)("sheet.field.workingNumber"),
|
|
216
|
+
citation: He.value,
|
|
217
|
+
"citation-heading": P.value.citation?.heading ? y(j)(P.value.citation.heading) : ""
|
|
218
|
+
}, null, 8, [
|
|
219
|
+
"credits",
|
|
220
|
+
"working-number",
|
|
221
|
+
"working-number-label",
|
|
222
|
+
"citation",
|
|
223
|
+
"citation-heading"
|
|
224
|
+
]),
|
|
225
|
+
_(a.$slots, "source", m(p(q.value)), () => [f(r)]),
|
|
226
|
+
_(a.$slots, "related", m(p({
|
|
227
|
+
...q.value,
|
|
228
|
+
records: $.value,
|
|
229
|
+
outside: y(Z).outside
|
|
230
|
+
})), () => [Q.value ? (h(), o(ne, {
|
|
231
|
+
key: 0,
|
|
232
|
+
heading: y(j)(Q.value.heading ?? "record.related.items"),
|
|
233
|
+
records: $.value,
|
|
234
|
+
variant: Q.value.variant ?? "list",
|
|
235
|
+
"action-label": Q.value.actionLabel ? y(j)(Q.value.actionLabel) : ""
|
|
236
|
+
}, null, 8, [
|
|
237
|
+
"heading",
|
|
238
|
+
"records",
|
|
239
|
+
"variant",
|
|
240
|
+
"action-label"
|
|
241
|
+
])) : s("", !0)])
|
|
242
|
+
]), a.$slots.aside ? (h(), c("aside", D, [_(a.$slots, "aside", m(p({
|
|
243
|
+
...q.value,
|
|
244
|
+
records: $.value,
|
|
245
|
+
outside: y(Z).outside
|
|
246
|
+
})))])) : s("", !0)]),
|
|
247
|
+
_(a.$slots, "after", m(p(q.value))),
|
|
248
|
+
f(ie, {
|
|
249
|
+
term: y(W),
|
|
250
|
+
html: Ne.value,
|
|
251
|
+
dir: y(L),
|
|
252
|
+
onClose: y(Me)
|
|
253
|
+
}, null, 8, [
|
|
254
|
+
"term",
|
|
255
|
+
"html",
|
|
256
|
+
"dir",
|
|
257
|
+
"onClose"
|
|
258
|
+
])
|
|
259
|
+
], 2)) : (h(), c("p", O, v(y(j)("core.status.loading")), 1));
|
|
260
|
+
}
|
|
261
|
+
};
|
|
262
|
+
//#endregion
|
|
263
|
+
export { k as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { o as n } from "./TimelineResultsView-
|
|
1
|
+
import { d as e, i as t } from "./GlossaryPopover-DcptyNWI.js";
|
|
2
|
+
import { o as n } from "./TimelineResultsView-C2-TnM71.js";
|
|
3
3
|
import { A as r, F as i, h as a, m as o } from "./data-CJlLA-Mf.js";
|
|
4
4
|
import { n as s, r as c, t as l } from "./themeSpecs-B885l456.js";
|
|
5
5
|
import { Fragment as u, computed as d, createBlock as f, createCommentVNode as p, createElementBlock as m, createElementVNode as h, createTextVNode as g, createVNode as _, normalizeClass as v, onMounted as ee, openBlock as y, ref as b, renderList as x, toDisplayString as S, unref as C, vModelCheckbox as w, watch as T, withCtx as E, withDirectives as D } from "vue";
|
|
@@ -67,8 +67,8 @@ var j = Object.defineProperty, M = (e, t) => {
|
|
|
67
67
|
}
|
|
68
68
|
},
|
|
69
69
|
emits: ["update:selectedId"],
|
|
70
|
-
setup(
|
|
71
|
-
let r =
|
|
70
|
+
setup(t, { emit: n }) {
|
|
71
|
+
let r = t, i = n, { t: a } = k(), o = d(() => r.pictures.find((e) => e.id === r.selectedId) ?? null), s = d(() => r.pictures.some((e) => e.backRelated?.length)), c = b(!1);
|
|
72
72
|
T(() => r.pictures, () => {
|
|
73
73
|
c.value = !1;
|
|
74
74
|
});
|
|
@@ -86,38 +86,38 @@ var j = Object.defineProperty, M = (e, t) => {
|
|
|
86
86
|
class: "mwnf-picture-gallery__detail"
|
|
87
87
|
}, [e.label ? (y(), m("span", B, S(e.label), 1)) : p("", !0), h("span", { innerHTML: e.value }, null, 8, V)]))), 128)),
|
|
88
88
|
o.value.detail ? (y(), m("div", H, S(o.value.detail), 1)) : p("", !0),
|
|
89
|
-
o.value.to ? (y(), f(
|
|
89
|
+
o.value.to ? (y(), f(e, {
|
|
90
90
|
key: 1,
|
|
91
91
|
class: "mwnf-picture-gallery__link",
|
|
92
92
|
to: o.value.to
|
|
93
93
|
}, {
|
|
94
|
-
default: E(() => [g(S(C(a)(
|
|
94
|
+
default: E(() => [g(S(C(a)(t.seeItemEntry)) + " →", 1)]),
|
|
95
95
|
_: 1
|
|
96
|
-
}, 8, ["to"])) : (y(), m("div", U, S(C(a)(
|
|
97
|
-
])])) : (y(), m("div", W, S(C(a)(
|
|
98
|
-
key:
|
|
96
|
+
}, 8, ["to"])) : (y(), m("div", U, S(C(a)(t.unresolvedEntry)), 1))
|
|
97
|
+
])])) : (y(), m("div", W, S(C(a)(t.emptyEntry)), 1)), t.pictures.length ? (y(), m("div", G, [h("ul", K, [(y(!0), m(u, null, x(l.value, (e) => (y(), m("li", {
|
|
98
|
+
key: e.id,
|
|
99
99
|
class: v(["mwnf-picture-gallery__thumb", {
|
|
100
|
-
"mwnf-picture-gallery__thumb--active":
|
|
101
|
-
"mwnf-picture-gallery__thumb--related":
|
|
100
|
+
"mwnf-picture-gallery__thumb--active": e.id === t.selectedId,
|
|
101
|
+
"mwnf-picture-gallery__thumb--related": e.backRelated?.length
|
|
102
102
|
}])
|
|
103
103
|
}, [h("button", {
|
|
104
104
|
type: "button",
|
|
105
|
-
onClick: (
|
|
105
|
+
onClick: (t) => _(e)
|
|
106
106
|
}, [h("img", {
|
|
107
|
-
src:
|
|
108
|
-
alt:
|
|
107
|
+
src: e.image,
|
|
108
|
+
alt: e.imageAlt ?? "",
|
|
109
109
|
loading: "lazy"
|
|
110
110
|
}, null, 8, J)], 8, q), h("div", Y, [
|
|
111
|
-
|
|
111
|
+
e.imageCaption ? (y(), m("span", X, S(e.imageCaption) + ", ", 1)) : p("", !0),
|
|
112
112
|
h("span", {
|
|
113
113
|
class: "mwnf-picture-gallery__thumb-name",
|
|
114
|
-
innerHTML:
|
|
114
|
+
innerHTML: e.name
|
|
115
115
|
}, null, 8, Z),
|
|
116
|
-
|
|
116
|
+
e.detail ? (y(), m("span", Q, ", " + S(e.detail), 1)) : p("", !0)
|
|
117
117
|
])], 2))), 128))]), s.value ? (y(), m("label", ie, [D(h("input", {
|
|
118
118
|
"onUpdate:modelValue": r[0] ||= (e) => c.value = e,
|
|
119
119
|
type: "checkbox"
|
|
120
|
-
}, null, 512), [[w, c.value]]), h("span", null, S(c.value ? C(a)(
|
|
120
|
+
}, null, 512), [[w, c.value]]), h("span", null, S(c.value ? C(a)(t.hideRelatedEntry) : C(a)(t.addRelatedEntry)), 1)])) : p("", !0)])) : p("", !0)]));
|
|
121
121
|
}
|
|
122
122
|
}, $ = {
|
|
123
123
|
key: 0,
|
|
@@ -211,8 +211,8 @@ var j = Object.defineProperty, M = (e, t) => {
|
|
|
211
211
|
type: Boolean,
|
|
212
212
|
default: !1
|
|
213
213
|
} },
|
|
214
|
-
setup(
|
|
215
|
-
let w =
|
|
214
|
+
setup(e) {
|
|
215
|
+
let w = e, { aboutTheme: D, owningTheme: O, romanFor: j, themeByRouteId: M, themeText: N, useThemePictures: re } = r, { t: P, locale: F } = k(), I = te(), L = ne(), R = d(() => w.aboutMode ? D.value : M(I.params.id)), z = d(() => {
|
|
216
216
|
let e = I.params.subtheme;
|
|
217
217
|
if (w.aboutMode || !e || e === "overview") return null;
|
|
218
218
|
let t = Number(e);
|
|
@@ -252,7 +252,7 @@ var j = Object.defineProperty, M = (e, t) => {
|
|
|
252
252
|
key: 0,
|
|
253
253
|
spec: H.value,
|
|
254
254
|
id: V.value.id,
|
|
255
|
-
class: v(["mwnf-dxa-theme", { "mwnf-dxa-theme--about":
|
|
255
|
+
class: v(["mwnf-dxa-theme", { "mwnf-dxa-theme--about": e.aboutMode }])
|
|
256
256
|
}, {
|
|
257
257
|
header: E(() => [h("div", je, [Q.value ? (y(), m("span", Me, S(C(P)("exhibition.theme.romanLabel")) + " " + S(Q.value) + " ▪ ", 1)) : p("", !0), g(S(X.value), 1)]), h("div", Ne, S(Z.value), 1)]),
|
|
258
258
|
panel: E(() => [_(ae, {
|
|
@@ -260,7 +260,7 @@ var j = Object.defineProperty, M = (e, t) => {
|
|
|
260
260
|
"selected-id": W.value,
|
|
261
261
|
"onUpdate:selectedId": J
|
|
262
262
|
}, null, 8, ["pictures", "selected-id"])]),
|
|
263
|
-
"after-body": E(() => [
|
|
263
|
+
"after-body": E(() => [e.aboutMode ? p("", !0) : (y(), f(ke, {
|
|
264
264
|
key: 0,
|
|
265
265
|
picture: q.value,
|
|
266
266
|
"contextual-description": ie.value,
|
|
@@ -300,13 +300,13 @@ var j = Object.defineProperty, M = (e, t) => {
|
|
|
300
300
|
_: 2
|
|
301
301
|
}, 1032, ["to", "class"])]))), 128))
|
|
302
302
|
])) : p("", !0)]),
|
|
303
|
-
after: E(({ next: n }) => [
|
|
303
|
+
after: E(({ next: n }) => [e.aboutMode && n ? (y(), m("div", ze, [i[0] ||= h("span", null, null, -1), _(C(A), {
|
|
304
304
|
to: C(s)(n),
|
|
305
305
|
class: "mwnf-dxa-theme__tour-link"
|
|
306
306
|
}, {
|
|
307
307
|
default: E(() => [g(S(C(P)("core.pagination.next")) + " " + S(Ve), 1)]),
|
|
308
308
|
_: 1
|
|
309
|
-
}, 8, ["to"])])) : p("", !0), _(
|
|
309
|
+
}, 8, ["to"])])) : p("", !0), _(t)]),
|
|
310
310
|
_: 1
|
|
311
311
|
}, 8, [
|
|
312
312
|
"spec",
|