@museumwnf/viewer-layout 3.80.1 → 3.80.2
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/LegacyItemSheet-DKgLfAz_.js +662 -0
- package/dist/RecordView-DAvWufWV.js +384 -0
- package/dist/{SiteShell-CzKgoOBm.js → SiteShell-D0u1FGMu.js} +47 -47
- package/dist/Theme-BUfsZDdm.js +408 -0
- package/dist/components.js +1 -1
- package/dist/{content-hV5uyd-b.js → content-B1458eb-.js} +6 -6
- package/dist/content.js +1 -1
- package/dist/{data-D9H1tB75.js → data-CD0QmDAc.js} +13 -13
- package/dist/{data-DlmKSxgh.js → data-CxiuR3R_.js} +16 -17
- package/dist/dxa.js +1075 -1075
- package/dist/index.js +1 -1
- package/dist/minisite.js +1159 -1159
- package/dist/standalone.js +967 -967
- package/dist/{themeSpecs-BJ82RvA1.js → themeSpecs-C0tSNkSd.js} +1 -1
- package/dist/views.js +298 -298
- package/package.json +9 -4
- package/dist/LegacyItemSheet-CNooycyz.js +0 -662
- package/dist/RecordView-CBC7tBCX.js +0 -384
- package/dist/Theme-BCn6_VkI.js +0 -408
|
@@ -0,0 +1,662 @@
|
|
|
1
|
+
import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createSlots as o, createTextVNode as s, createVNode as c, guardReactiveProps as l, normalizeClass as u, normalizeProps as d, normalizeStyle as f, openBlock as p, renderList as m, renderSlot as h, toDisplayString as g, unref as _, useSlots as v, withCtx as y } from "vue";
|
|
2
|
+
import { RouterLink as b, useRoute as x } from "vue-router";
|
|
3
|
+
import { NotFoundView as S, byId as C, loadEntities as w, mdInline as T, mdStrip as E, mwnfLinks as D, partnerView as ee, renderInline as O, siblingSiteUrl as k, sourceUrl as A, useCatalogue as j, useDataPackage as te, useI18n as ne, useProjects as re, useSiteConfig as M } from "@museumwnf/viewer-core";
|
|
4
|
+
import { i as N, n as P, o as F, r as I, s as L, t as R } from "./OnDisplayIn-BH3Bqope.js";
|
|
5
|
+
import { c as z, d as B, r as ie } from "./PartnerMap-DdyMLtgH.js";
|
|
6
|
+
import { n as ae } from "./TimelineEventList-CIkKxyQu.js";
|
|
7
|
+
import { t as oe } from "./RecordView-DAvWufWV.js";
|
|
8
|
+
import { t as se } from "./chrome-Bv_mLlHM.js";
|
|
9
|
+
// src/dxa/RelatedObjects.vue
|
|
10
|
+
var V = {
|
|
11
|
+
key: 0,
|
|
12
|
+
class: "mwnf-related-objects"
|
|
13
|
+
}, H = {
|
|
14
|
+
key: 0,
|
|
15
|
+
class: "mwnf-related-objects__heading"
|
|
16
|
+
}, U = { class: "mwnf-related-objects__tiles" }, W = ["src"], G = {
|
|
17
|
+
key: 1,
|
|
18
|
+
class: "mwnf-related-objects__empty",
|
|
19
|
+
"aria-hidden": "true"
|
|
20
|
+
}, K = ["innerHTML"], q = {
|
|
21
|
+
class: "mwnf-related-objects__tooltip",
|
|
22
|
+
"aria-hidden": "true"
|
|
23
|
+
}, ce = ["innerHTML"], le = { key: 0 }, ue = {
|
|
24
|
+
__name: "RelatedObjects",
|
|
25
|
+
props: {
|
|
26
|
+
heading: {
|
|
27
|
+
type: String,
|
|
28
|
+
default: ""
|
|
29
|
+
},
|
|
30
|
+
tiles: {
|
|
31
|
+
type: Array,
|
|
32
|
+
default: () => []
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
setup(t) {
|
|
36
|
+
return (n, o) => t.tiles.length ? (p(), i("div", V, [t.heading ? (p(), i("p", H, g(t.heading), 1)) : r("", !0), a("ul", U, [(p(!0), i(e, null, m(t.tiles, (t) => (p(), i("li", {
|
|
37
|
+
key: t.id,
|
|
38
|
+
class: "mwnf-related-objects__tile"
|
|
39
|
+
}, [c(B, {
|
|
40
|
+
to: t.to,
|
|
41
|
+
href: t.href,
|
|
42
|
+
external: !!t.href,
|
|
43
|
+
class: "mwnf-related-objects__link"
|
|
44
|
+
}, {
|
|
45
|
+
default: y(() => [t.image ? (p(), i("img", {
|
|
46
|
+
key: 0,
|
|
47
|
+
src: t.image,
|
|
48
|
+
alt: "",
|
|
49
|
+
loading: "lazy"
|
|
50
|
+
}, null, 8, W)) : (p(), i("span", G)), a("span", {
|
|
51
|
+
class: "mwnf-related-objects__name-sr",
|
|
52
|
+
innerHTML: t.name
|
|
53
|
+
}, null, 8, K)]),
|
|
54
|
+
_: 2
|
|
55
|
+
}, 1032, [
|
|
56
|
+
"to",
|
|
57
|
+
"href",
|
|
58
|
+
"external"
|
|
59
|
+
]), a("div", q, [a("div", null, [a("span", { innerHTML: t.name }, null, 8, ce), t.country ? (p(), i(e, { key: 0 }, [s(", " + g(t.country), 1)], 64)) : r("", !0)]), t.justification ? (p(), i("div", le, g(t.justification), 1)) : r("", !0)])]))), 128))])])) : r("", !0);
|
|
60
|
+
}
|
|
61
|
+
}, de = {
|
|
62
|
+
key: 0,
|
|
63
|
+
class: "mwnf-sheet-source"
|
|
64
|
+
}, fe = {
|
|
65
|
+
key: 0,
|
|
66
|
+
class: "mwnf-sheet-source__line"
|
|
67
|
+
}, pe = {
|
|
68
|
+
key: 1,
|
|
69
|
+
class: "mwnf-sheet-source__collection"
|
|
70
|
+
}, me = ["href"], he = {
|
|
71
|
+
key: 1,
|
|
72
|
+
class: "mwnf-sheet-notice"
|
|
73
|
+
}, ge = {
|
|
74
|
+
key: "museum",
|
|
75
|
+
class: "mwnf-sheet-museum"
|
|
76
|
+
}, _e = ["innerHTML"], ve = {
|
|
77
|
+
key: 0,
|
|
78
|
+
class: "mwnf-sheet-related"
|
|
79
|
+
}, ye = {
|
|
80
|
+
key: 0,
|
|
81
|
+
class: "mwnf-sheet-related__heading mwnf-sheet-related__heading--caps"
|
|
82
|
+
}, be = {
|
|
83
|
+
key: 1,
|
|
84
|
+
class: "mwnf-sheet-related__description"
|
|
85
|
+
}, xe = {
|
|
86
|
+
key: 0,
|
|
87
|
+
class: "mwnf-sheet-related__references"
|
|
88
|
+
}, Se = {
|
|
89
|
+
key: 2,
|
|
90
|
+
class: "mwnf-sheet-related__unresolved"
|
|
91
|
+
}, Ce = {
|
|
92
|
+
key: 5,
|
|
93
|
+
class: "mwnf-sheet-related__line"
|
|
94
|
+
}, we = ["href"], Te = { class: "mwnf-sheet-related__heading" }, Ee = ["href"], De = { key: 11 }, Oe = { class: "mwnf-sheet-related__heading" }, ke = { key: 12 }, Ae = { class: "mwnf-sheet-related__heading" }, je = { class: "mwnf-sheet-related__line" }, Me = ["href"], Ne = { key: 13 }, Pe = { class: "mwnf-sheet-related__heading" }, Fe = { class: "mwnf-sheet-related__line" }, Ie = ["href"], Le = { key: 14 }, Re = { class: "mwnf-sheet-related__heading" }, ze = "sheet.field.", J = {
|
|
95
|
+
__name: "ItemDetailView",
|
|
96
|
+
props: {
|
|
97
|
+
spec: {
|
|
98
|
+
type: Object,
|
|
99
|
+
required: !0
|
|
100
|
+
},
|
|
101
|
+
id: {
|
|
102
|
+
type: String,
|
|
103
|
+
required: !0
|
|
104
|
+
},
|
|
105
|
+
entity: {
|
|
106
|
+
type: String,
|
|
107
|
+
default: ""
|
|
108
|
+
},
|
|
109
|
+
dataGetter: {
|
|
110
|
+
type: Function,
|
|
111
|
+
default: null
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
setup(b) {
|
|
115
|
+
let x = b, O = v(), k = /* @__PURE__ */ new Set([
|
|
116
|
+
"before-sheet",
|
|
117
|
+
"museum",
|
|
118
|
+
"related",
|
|
119
|
+
"aside"
|
|
120
|
+
]), A = t(() => Object.keys(O).filter((e) => !k.has(e))), j = t(() => !x.dataGetter || x.dataGetter(x.id) != null), { t: L } = ne();
|
|
121
|
+
function z(e) {
|
|
122
|
+
if (typeof e != "string" || !e.startsWith(ze)) return e;
|
|
123
|
+
let t = `sheet.dxa.${e.slice(12)}`;
|
|
124
|
+
return L(t) === t ? e : t;
|
|
125
|
+
}
|
|
126
|
+
let B = t(() => {
|
|
127
|
+
let e = Array.isArray(x.spec.fields) ? {
|
|
128
|
+
...x.spec,
|
|
129
|
+
fields: x.spec.fields.map((e) => ({
|
|
130
|
+
...e,
|
|
131
|
+
label: z(e.label)
|
|
132
|
+
}))
|
|
133
|
+
} : x.spec;
|
|
134
|
+
return e.related === !1 ? e : {
|
|
135
|
+
...e,
|
|
136
|
+
related: {
|
|
137
|
+
...e.related,
|
|
138
|
+
inline: !1
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
}), V = re(), H = (e, t) => (e.name ?? "").localeCompare(t.name ?? ""), U = (e) => (e.gallery_references ?? []).filter((e) => e.kind === "gallery").sort(H), W = (e) => (e.gallery_references ?? []).filter((e) => e.kind === "exhibition").sort(H), G = (e) => V.links(e.project_id)?.artisticIntroductionUrl ?? null, K = (e) => V.links(e.project_id)?.relatedDatabaseUrl ?? null, q = {
|
|
142
|
+
"islamicart.museumwnf.org": "core.project.islamicArt",
|
|
143
|
+
"baroqueart.museumwnf.org": "core.project.baroqueArt",
|
|
144
|
+
"sharinghistory.museumwnf.org": "core.project.sharingHistory"
|
|
145
|
+
};
|
|
146
|
+
function ce(e) {
|
|
147
|
+
try {
|
|
148
|
+
let t = q[new URL(K(e)).host];
|
|
149
|
+
if (t) return L(t);
|
|
150
|
+
} catch {}
|
|
151
|
+
return V.label(e.project_id);
|
|
152
|
+
}
|
|
153
|
+
function le(e, t) {
|
|
154
|
+
if (!e) return null;
|
|
155
|
+
let n = B.value.sourceDatabase === !1 ? null : B.value.sourceDatabase ?? null, r = null;
|
|
156
|
+
if (n) {
|
|
157
|
+
let i = n.chipClass ? n.chipClass(e, t) : null, a = V.label(e.project_id);
|
|
158
|
+
(i || a) && (r = {
|
|
159
|
+
chipClass: i,
|
|
160
|
+
name: a,
|
|
161
|
+
label: L(n.label ?? "record.sheet.sourceDatabase")
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
let i = n && n.addToCollection !== !1 ? L(n.addToCollection?.label ?? "record.action.addToCollection") : null, a = B.value.notice === !1 ? null : B.value.notice ?? null, o = a && a.show(e, t) ? L(a.label) : null;
|
|
165
|
+
return {
|
|
166
|
+
source: r,
|
|
167
|
+
addToCollectionLabel: i,
|
|
168
|
+
notice: o
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
let J = te(), Be = C("partners"), Y = C("countries");
|
|
172
|
+
w(["partners", "countries"]), J.loadTranslations("countries", "en");
|
|
173
|
+
function X(e, t) {
|
|
174
|
+
let n = J.tr("countries", e, t, "en");
|
|
175
|
+
return E(n.name ?? Y.value?.get(e)?.internal_name ?? "");
|
|
176
|
+
}
|
|
177
|
+
function Z(e) {
|
|
178
|
+
let t = e.text?.holder ? T(String(e.text.holder)) : "", n = B.value.museum === !1 ? null : B.value.museum ?? null, r = n ? Be.value?.get(e.record?.partner_id) : null;
|
|
179
|
+
return {
|
|
180
|
+
holder: t,
|
|
181
|
+
view: r ? ee(r, J.tr("partners", r.id, e.language, "en"), {
|
|
182
|
+
countryLabel: (t) => X(t, e.language),
|
|
183
|
+
route: (t) => n.route ? n.route(t.id, e) : null
|
|
184
|
+
}) : null
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
function Q(e, t) {
|
|
188
|
+
if (!e) return null;
|
|
189
|
+
let n = B.value.related ?? {}, r = t.records ?? [], i = t.outside ?? [], a = x.dataGetter ? r.filter((e) => x.dataGetter(e.id) != null) : r, o = x.dataGetter ? r.filter((e) => x.dataGetter(e.id) == null).map((t) => (e.related_items ?? []).find((e) => e.id === t.id)).filter(Boolean) : [], s = [...i, ...o].map((e) => ({
|
|
190
|
+
...e,
|
|
191
|
+
name: e.project_id ? V.label(e.project_id) : null,
|
|
192
|
+
chipClass: n.outsideChip ? n.outsideChip(e, t) : null
|
|
193
|
+
})), c = (t) => (n.onDisplayIn?.href ? n.onDisplayIn.href(t, e) : t.legacy_host) || "", l = (e) => ({
|
|
194
|
+
id: e.id,
|
|
195
|
+
label: T(e.name ?? ""),
|
|
196
|
+
href: c(e),
|
|
197
|
+
external: !!c(e)
|
|
198
|
+
}), u = n.onDisplayIn && n.onDisplayIn !== !1 ? {
|
|
199
|
+
pendingLabel: n.onDisplayIn.linkPendingLabel ?? "",
|
|
200
|
+
groups: [n.onDisplayIn.exhibitions ? {
|
|
201
|
+
heading: n.onDisplayIn.exhibitionsHeading ?? "record.related.exhibitions",
|
|
202
|
+
sections: n.onDisplayIn.exhibitions(e, t)
|
|
203
|
+
} : {
|
|
204
|
+
heading: n.onDisplayIn.exhibitionsHeading ?? "record.related.exhibitions",
|
|
205
|
+
links: W(e).map(l)
|
|
206
|
+
}, {
|
|
207
|
+
heading: n.onDisplayIn.galleriesHeading ?? "record.related.galleries",
|
|
208
|
+
links: U(e).map(l)
|
|
209
|
+
}].filter((e) => (e.sections ?? [e]).some((e) => e.links?.length))
|
|
210
|
+
} : null, d = n.databaseLabel && K(e) ? {
|
|
211
|
+
url: K(e),
|
|
212
|
+
label: L(n.databaseLabel),
|
|
213
|
+
name: ce(e)
|
|
214
|
+
} : null, f = n.overallDatabase && n.overallDatabase !== !1 ? {
|
|
215
|
+
label: L(n.overallDatabase.label),
|
|
216
|
+
linkLabel: L(n.overallDatabase.linkLabel)
|
|
217
|
+
} : null, p = n.objectTiles ? n.objectTiles({
|
|
218
|
+
record: e,
|
|
219
|
+
inPackage: a,
|
|
220
|
+
references: s,
|
|
221
|
+
ctx: t
|
|
222
|
+
}) : null, m = !!(p && n.monumentsHeading);
|
|
223
|
+
return {
|
|
224
|
+
title: n.title ? L(n.title) : "",
|
|
225
|
+
description: n.description ? L(n.description) : "",
|
|
226
|
+
heading: L(n.heading ?? "record.related.items"),
|
|
227
|
+
tiles: m ? p.filter((e) => e.kind !== "monument") : p,
|
|
228
|
+
monumentsHeading: m ? L(n.monumentsHeading) : "",
|
|
229
|
+
monumentTiles: m ? p.filter((e) => e.kind === "monument") : [],
|
|
230
|
+
variant: n.variant ?? "grid",
|
|
231
|
+
actionLabel: n.actionLabel ? L(n.actionLabel) : "",
|
|
232
|
+
inPackage: a,
|
|
233
|
+
references: s,
|
|
234
|
+
notInPackageLabel: n.notInPackageLabel ? L(n.notInPackageLabel) : "",
|
|
235
|
+
artisticIntroduction: n.artisticIntroductionLabel && G(e) ? {
|
|
236
|
+
url: G(e),
|
|
237
|
+
label: L(n.artisticIntroductionLabel)
|
|
238
|
+
} : null,
|
|
239
|
+
timeline: n.timeline ? n.timeline(e, t) : null,
|
|
240
|
+
glossary: n.glossary !== !1,
|
|
241
|
+
glossaryLabels: n.glossaryLabels ?? {},
|
|
242
|
+
dynasties: n.dynasties ? n.dynasties(e, t.language, t) : null,
|
|
243
|
+
dynastiesHeading: L(n.dynastiesHeading ?? "record.dynasty.list"),
|
|
244
|
+
media: n.media === !1 ? [] : e.media ?? [],
|
|
245
|
+
mediaGroups: n.mediaHeadings && n.media !== !1 ? ["audio", "video"].map((r) => ({
|
|
246
|
+
type: r,
|
|
247
|
+
heading: L(n.mediaHeadings[r]),
|
|
248
|
+
entries: (e.media ?? []).filter((e) => e?.url && e.type === r && (!e.language || !t.language || e.language === t.language))
|
|
249
|
+
})).filter((e) => e.entries.length) : null,
|
|
250
|
+
onDisplayIn: u,
|
|
251
|
+
database: d,
|
|
252
|
+
overallDatabase: f,
|
|
253
|
+
download: n.download === !1 ? null : {
|
|
254
|
+
label: L("record.action.download"),
|
|
255
|
+
pdfLabel: L("record.action.downloadPdf")
|
|
256
|
+
}
|
|
257
|
+
};
|
|
258
|
+
}
|
|
259
|
+
let $ = M(), Ve = t(() => {
|
|
260
|
+
let e = se($.chrome, "world.png");
|
|
261
|
+
return e ? { "--mwnf-dxa-glossary-image": `url("${e}")` } : null;
|
|
262
|
+
});
|
|
263
|
+
function He() {
|
|
264
|
+
window.print();
|
|
265
|
+
}
|
|
266
|
+
return (t, v) => j.value ? (p(), n(oe, {
|
|
267
|
+
key: 0,
|
|
268
|
+
spec: B.value,
|
|
269
|
+
id: b.id,
|
|
270
|
+
entity: b.entity,
|
|
271
|
+
style: f(Ve.value)
|
|
272
|
+
}, o({
|
|
273
|
+
"before-sheet": y((n) => [h(t.$slots, "before-sheet", d(l(n)), () => [(p(!0), i(e, null, m([le(n.record, n)], (t) => (p(), i(e, { key: "before-sheet" }, [t?.source || t?.addToCollectionLabel ? (p(), i("div", de, [t.source ? (p(), i("p", fe, [t.source.chipClass ? (p(), i("span", {
|
|
274
|
+
key: 0,
|
|
275
|
+
class: u(["mwnf-chip", t.source.chipClass]),
|
|
276
|
+
"aria-hidden": "true"
|
|
277
|
+
}, null, 2)) : r("", !0), t.source.name ? (p(), i(e, { key: 1 }, [s(g(t.source.label) + ": " + g(t.source.name), 1)], 64)) : r("", !0)])) : r("", !0), t.addToCollectionLabel ? (p(), i("p", pe, [a("a", {
|
|
278
|
+
href: _(D).myCollection,
|
|
279
|
+
target: "_blank",
|
|
280
|
+
rel: "noopener"
|
|
281
|
+
}, "↗ " + g(t.addToCollectionLabel), 9, me)])) : r("", !0)])) : r("", !0), t?.notice ? (p(), i("div", he, [s(g(t.notice) + " ", 1), a("strong", null, [a("em", null, g(n.languages.map((e) => e.label).join(", ")), 1)])])) : r("", !0)], 64))), 128))])]),
|
|
282
|
+
museum: y((a) => [h(t.$slots, "museum", d(l(a)), () => [(p(!0), i(e, null, m([Z(a)], (e) => (p(), i("div", ge, [e.holder ? (p(), i("p", {
|
|
283
|
+
key: 0,
|
|
284
|
+
class: "mwnf-sheet-museum__holder",
|
|
285
|
+
innerHTML: e.holder
|
|
286
|
+
}, null, 8, _e)) : r("", !0), e.view ? (p(), n(ae, {
|
|
287
|
+
key: 1,
|
|
288
|
+
variant: "summary",
|
|
289
|
+
partner: e.view,
|
|
290
|
+
label: "partner.info.about",
|
|
291
|
+
dir: a.dir
|
|
292
|
+
}, null, 8, ["partner", "dir"])) : r("", !0)]))), 128))])]),
|
|
293
|
+
aside: y((o) => [h(t.$slots, "related", d(l(o)), () => [(p(!0), i(e, null, m([Q(o.record, o)], (t) => (p(), i(e, { key: o.record?.id ?? "related" }, [t ? (p(), i("div", ve, [
|
|
294
|
+
t.title ? (p(), i("p", ye, g(t.title), 1)) : r("", !0),
|
|
295
|
+
t.description ? (p(), i("p", be, g(t.description), 1)) : r("", !0),
|
|
296
|
+
t.tiles ? (p(), n(ue, {
|
|
297
|
+
key: 2,
|
|
298
|
+
heading: t.heading,
|
|
299
|
+
tiles: t.tiles
|
|
300
|
+
}, null, 8, ["heading", "tiles"])) : t.inPackage.length || t.references.length ? (p(), n(ie, {
|
|
301
|
+
key: 3,
|
|
302
|
+
heading: t.heading,
|
|
303
|
+
records: t.inPackage,
|
|
304
|
+
variant: t.variant,
|
|
305
|
+
"action-label": t.actionLabel
|
|
306
|
+
}, {
|
|
307
|
+
default: y(() => [t.references.length ? (p(), i("ul", xe, [(p(!0), i(e, null, m(t.references, (n) => (p(), i("li", { key: n.id }, [
|
|
308
|
+
n.chipClass ? (p(), i("span", {
|
|
309
|
+
key: 0,
|
|
310
|
+
class: u(["mwnf-chip", n.chipClass]),
|
|
311
|
+
"aria-hidden": "true"
|
|
312
|
+
}, null, 2)) : r("", !0),
|
|
313
|
+
n.name ? (p(), i(e, { key: 1 }, [s(g(n.name), 1)], 64)) : r("", !0),
|
|
314
|
+
t.notInPackageLabel ? (p(), i("span", Se, g(t.notInPackageLabel), 1)) : r("", !0)
|
|
315
|
+
]))), 128))])) : r("", !0)]),
|
|
316
|
+
_: 2
|
|
317
|
+
}, 1032, [
|
|
318
|
+
"heading",
|
|
319
|
+
"records",
|
|
320
|
+
"variant",
|
|
321
|
+
"action-label"
|
|
322
|
+
])) : r("", !0),
|
|
323
|
+
t.monumentTiles.length ? (p(), n(ue, {
|
|
324
|
+
key: 4,
|
|
325
|
+
heading: t.monumentsHeading,
|
|
326
|
+
tiles: t.monumentTiles,
|
|
327
|
+
class: "mwnf-related-objects--monuments"
|
|
328
|
+
}, null, 8, ["heading", "tiles"])) : r("", !0),
|
|
329
|
+
t.artisticIntroduction ? (p(), i("p", Ce, [a("a", {
|
|
330
|
+
href: t.artisticIntroduction.url,
|
|
331
|
+
target: "_blank",
|
|
332
|
+
rel: "noopener"
|
|
333
|
+
}, "↗ " + g(t.artisticIntroduction.label), 9, we)])) : r("", !0),
|
|
334
|
+
t.timeline ? (p(), n(I, {
|
|
335
|
+
key: o.record.id,
|
|
336
|
+
info: t.timeline
|
|
337
|
+
}, null, 8, ["info"])) : r("", !0),
|
|
338
|
+
t.glossary ? (p(), n(F, {
|
|
339
|
+
key: 7,
|
|
340
|
+
language: o.language,
|
|
341
|
+
labels: t.glossaryLabels,
|
|
342
|
+
dir: o.dir
|
|
343
|
+
}, null, 8, [
|
|
344
|
+
"language",
|
|
345
|
+
"labels",
|
|
346
|
+
"dir"
|
|
347
|
+
])) : r("", !0),
|
|
348
|
+
t.dynasties?.records?.length ? (p(), n(N, {
|
|
349
|
+
key: 8,
|
|
350
|
+
heading: t.dynastiesHeading,
|
|
351
|
+
dynasties: t.dynasties.records,
|
|
352
|
+
tr: t.dynasties.tr,
|
|
353
|
+
dir: o.dir
|
|
354
|
+
}, null, 8, [
|
|
355
|
+
"heading",
|
|
356
|
+
"dynasties",
|
|
357
|
+
"tr",
|
|
358
|
+
"dir"
|
|
359
|
+
])) : r("", !0),
|
|
360
|
+
t.mediaGroups ? (p(!0), i(e, { key: 9 }, m(t.mediaGroups, (t) => (p(), i("div", {
|
|
361
|
+
key: t.type,
|
|
362
|
+
class: u(["mwnf-sheet-related__media", `mwnf-sheet-related__media--${t.type}`])
|
|
363
|
+
}, [a("p", Te, g(t.heading), 1), (p(!0), i(e, null, m(t.entries, (e) => (p(), i("p", {
|
|
364
|
+
key: e.url,
|
|
365
|
+
class: "mwnf-sheet-related__line"
|
|
366
|
+
}, [a("a", {
|
|
367
|
+
href: e.url,
|
|
368
|
+
target: "_blank",
|
|
369
|
+
rel: "noopener"
|
|
370
|
+
}, "↗ " + g(e.title || e.url), 9, Ee)]))), 128))], 2))), 128)) : (p(), n(P, {
|
|
371
|
+
key: 10,
|
|
372
|
+
media: t.media,
|
|
373
|
+
language: o.language,
|
|
374
|
+
descriptions: !1,
|
|
375
|
+
dir: o.dir
|
|
376
|
+
}, null, 8, [
|
|
377
|
+
"media",
|
|
378
|
+
"language",
|
|
379
|
+
"dir"
|
|
380
|
+
])),
|
|
381
|
+
t.onDisplayIn?.groups.length ? (p(), i("div", De, [a("p", Oe, g(_(L)("record.related.onDisplayIn")), 1), c(R, {
|
|
382
|
+
heading: "",
|
|
383
|
+
groups: t.onDisplayIn.groups,
|
|
384
|
+
"pending-label": t.onDisplayIn.pendingLabel,
|
|
385
|
+
dir: o.dir
|
|
386
|
+
}, null, 8, [
|
|
387
|
+
"groups",
|
|
388
|
+
"pending-label",
|
|
389
|
+
"dir"
|
|
390
|
+
])])) : r("", !0),
|
|
391
|
+
t.database ? (p(), i("div", ke, [a("p", Ae, g(t.database.label), 1), a("p", je, [a("a", {
|
|
392
|
+
href: t.database.url,
|
|
393
|
+
target: "_blank",
|
|
394
|
+
rel: "noopener"
|
|
395
|
+
}, "↗ " + g(t.database.name), 9, Me)])])) : r("", !0),
|
|
396
|
+
t.overallDatabase ? (p(), i("div", Ne, [a("p", Pe, g(t.overallDatabase.label), 1), a("p", Fe, [a("a", {
|
|
397
|
+
href: _(D).overallDatabase,
|
|
398
|
+
target: "_blank",
|
|
399
|
+
rel: "noopener"
|
|
400
|
+
}, "↗ " + g(t.overallDatabase.linkLabel), 9, Ie)])])) : r("", !0),
|
|
401
|
+
t.download ? (p(), i("div", Le, [a("p", Re, g(t.download.label), 1), a("p", {
|
|
402
|
+
class: "mwnf-sheet-related__line mwnf-sheet-related__line--action",
|
|
403
|
+
onClick: He
|
|
404
|
+
}, "➤ " + g(t.download.pdfLabel), 1)])) : r("", !0)
|
|
405
|
+
])) : r("", !0)], 64))), 128))])]),
|
|
406
|
+
_: 2
|
|
407
|
+
}, [m(A.value, (e) => ({
|
|
408
|
+
name: e,
|
|
409
|
+
fn: y((n) => [h(t.$slots, e, d(l(n)))])
|
|
410
|
+
}))]), 1032, [
|
|
411
|
+
"spec",
|
|
412
|
+
"id",
|
|
413
|
+
"entity",
|
|
414
|
+
"style"
|
|
415
|
+
])) : (p(), n(_(S), { key: 1 }));
|
|
416
|
+
}
|
|
417
|
+
}, Be = "mwnf-on-display__theme", Y = (e) => O(e ?? ""), X = (e) => e?.titles?.en ?? Object.values(e?.titles ?? {})[0] ?? "", Z = (e) => `<span class="${Be}">${e}</span>`;
|
|
418
|
+
function Q(e, t, n) {
|
|
419
|
+
return n && e.site === n ? {
|
|
420
|
+
id: e.path,
|
|
421
|
+
label: t,
|
|
422
|
+
to: e.path
|
|
423
|
+
} : {
|
|
424
|
+
id: `${e.site}${e.path}`,
|
|
425
|
+
label: t,
|
|
426
|
+
href: k(e.site, e.path),
|
|
427
|
+
external: !0
|
|
428
|
+
};
|
|
429
|
+
}
|
|
430
|
+
function $(e) {
|
|
431
|
+
return e.toLowerCase().split(" ").filter((e) => ![
|
|
432
|
+
"a",
|
|
433
|
+
"an",
|
|
434
|
+
"the"
|
|
435
|
+
].includes(e)).join(" ");
|
|
436
|
+
}
|
|
437
|
+
function Ve(e, t, n = null) {
|
|
438
|
+
let r = e?.exhibition_references ?? [], i = [], a = r.filter((e) => e.list === "virtual" || e.list === "sharing_history");
|
|
439
|
+
a.length && i.push({
|
|
440
|
+
caption: a[0].project ? Y(a[0].project.name) : "",
|
|
441
|
+
links: a.map((e) => Q(e, [
|
|
442
|
+
Y(X(e.exhibition)),
|
|
443
|
+
Z(Y(X(e.theme))),
|
|
444
|
+
...e.subtheme ? [Z(Y(X(e.subtheme)))] : []
|
|
445
|
+
].join(" | "), n))
|
|
446
|
+
});
|
|
447
|
+
let o = r.filter((e) => e.list === "exhibition"), s = o.filter((e) => e.exhibition?.titles?.[t]), c = s.length ? {
|
|
448
|
+
refs: s,
|
|
449
|
+
lang: t
|
|
450
|
+
} : {
|
|
451
|
+
refs: o.filter((e) => e.exhibition?.titles?.en),
|
|
452
|
+
lang: "en"
|
|
453
|
+
}, l = (e) => e?.titles?.[c.lang] ?? e?.titles?.en ?? "", u = [...c.refs].sort((e, t) => $(l(e.exhibition)).localeCompare($(l(t.exhibition)), "en", { sensitivity: "base" }) || (e.legacy_order?.[0] ?? 0) - (t.legacy_order?.[0] ?? 0));
|
|
454
|
+
for (let e of u) {
|
|
455
|
+
let t = Y(l(e.exhibition)), r = Q(e, `${Y(l(e.theme))} | ${Z(Y(l(e.subtheme)))}`, n), a = i[i.length - 1];
|
|
456
|
+
a?.exhibition === e.exhibition.id ? a.links.push(r) : i.push({
|
|
457
|
+
exhibition: e.exhibition.id,
|
|
458
|
+
caption: t,
|
|
459
|
+
links: [r]
|
|
460
|
+
});
|
|
461
|
+
}
|
|
462
|
+
return i;
|
|
463
|
+
}
|
|
464
|
+
// src/dxa/relatedKind.js
|
|
465
|
+
function He(e, t) {
|
|
466
|
+
return (e?.type ?? t?.get(e?.id)?.type) === "monument" ? "monument" : "object";
|
|
467
|
+
}
|
|
468
|
+
// src/dxa/LegacyItemSheet.vue
|
|
469
|
+
var Ue = { class: "mwnf-dxa-item__languages" }, We = ["dir"], Ge = ["href"], Ke = ["href"], qe = ["innerHTML"], Je = ["innerHTML"], Ye = ["dir"], Xe = { class: "mwnf-dxa-gallery-item__label" }, Ze = {
|
|
470
|
+
key: "citation",
|
|
471
|
+
class: "mwnf-dxa-gallery-item__citation"
|
|
472
|
+
}, Qe = { class: "mwnf-dxa-gallery-item__project" }, $e = { class: "mwnf-dxa-gallery-item__address" }, et = { class: "mwnf-dxa-gallery-item__credit-label" }, tt = {
|
|
473
|
+
key: 1,
|
|
474
|
+
class: "mwnf-dxa-gallery-item__number"
|
|
475
|
+
}, nt = { class: "mwnf-dxa-gallery-item__number-label" }, rt = ["href"], it = {
|
|
476
|
+
__name: "LegacyItemSheet",
|
|
477
|
+
props: {
|
|
478
|
+
id: {
|
|
479
|
+
type: String,
|
|
480
|
+
required: !0
|
|
481
|
+
},
|
|
482
|
+
itemDetail: {
|
|
483
|
+
type: Object,
|
|
484
|
+
required: !0
|
|
485
|
+
},
|
|
486
|
+
dataGetter: {
|
|
487
|
+
type: Function,
|
|
488
|
+
default: null
|
|
489
|
+
},
|
|
490
|
+
words: {
|
|
491
|
+
type: Object,
|
|
492
|
+
required: !0
|
|
493
|
+
}
|
|
494
|
+
},
|
|
495
|
+
setup(o) {
|
|
496
|
+
let l = o, { t: d } = ne(), f = x(), h = re(), v = te(), S = M(), C = j(), w = (e, t) => e?.[t] ?? e?.en ?? Object.values(e ?? {})[0] ?? "";
|
|
497
|
+
function ee({ record: e, inPackage: t, references: n, ctx: r }) {
|
|
498
|
+
let i = r.language, a = new Map((e.related_items ?? []).map((e) => [e.id, e])), o = (e) => E(w(a.get(e)?.justifications, i)), s = (e) => He(a.get(e) ?? { id: e }, C.itemById.value), c = (e) => (e ?? "").replace(/\.$/, ""), l = t.map((e) => ({
|
|
499
|
+
id: e.id,
|
|
500
|
+
kind: s(e.id),
|
|
501
|
+
image: e.image,
|
|
502
|
+
name: c(e.name),
|
|
503
|
+
country: C.countryLabel(C.itemById.value.get(e.id)?.country_id),
|
|
504
|
+
justification: o(e.id),
|
|
505
|
+
to: e.to
|
|
506
|
+
})), u = n.map((e) => {
|
|
507
|
+
let t = h.links(e.project_id)?.homeSite;
|
|
508
|
+
return {
|
|
509
|
+
id: e.id,
|
|
510
|
+
kind: s(e.id),
|
|
511
|
+
image: e.image ?? "",
|
|
512
|
+
name: c(T(w(e.names, i))),
|
|
513
|
+
country: C.countryLabel(e.country_id),
|
|
514
|
+
justification: o(e.id),
|
|
515
|
+
href: t ? k(t, `/item/${e.id}`) : ""
|
|
516
|
+
};
|
|
517
|
+
}), d = (e.related_items ?? []).map((e) => e.id);
|
|
518
|
+
return [...l, ...u].sort((e, t) => d.indexOf(e.id) - d.indexOf(t.id));
|
|
519
|
+
}
|
|
520
|
+
let O = t(() => ({
|
|
521
|
+
...l.itemDetail,
|
|
522
|
+
sourceDatabase: !1,
|
|
523
|
+
sourceCredit: !1,
|
|
524
|
+
mediaThumbsFrom: 1,
|
|
525
|
+
mediaCreditCaption: !1,
|
|
526
|
+
shortDescriptionLabels: {
|
|
527
|
+
view: l.words.viewShortDescription,
|
|
528
|
+
hide: l.words.hideShortDescription
|
|
529
|
+
},
|
|
530
|
+
related: {
|
|
531
|
+
...l.itemDetail.related,
|
|
532
|
+
glossaryLabels: { tool: l.words.glossary },
|
|
533
|
+
dynastiesHeading: l.words.dynasties,
|
|
534
|
+
mediaHeadings: {
|
|
535
|
+
audio: l.words.relatedAudio,
|
|
536
|
+
video: l.words.relatedVideos
|
|
537
|
+
},
|
|
538
|
+
...l.words.relatedObjects ? {
|
|
539
|
+
heading: l.words.relatedObjects,
|
|
540
|
+
objectTiles: ee
|
|
541
|
+
} : {},
|
|
542
|
+
...l.words.relatedMonuments ? { monumentsHeading: l.words.relatedMonuments } : {},
|
|
543
|
+
onDisplayIn: {
|
|
544
|
+
...l.itemDetail.related?.onDisplayIn,
|
|
545
|
+
exhibitionsHeading: l.words.exhibitions,
|
|
546
|
+
galleriesHeading: "core.project.galleries",
|
|
547
|
+
href: (e, t) => e.site ? k(e.site, `/item/${t.id}`) : e.legacy_host,
|
|
548
|
+
exhibitions: (e, t) => Ve(e, t.language, v.manifest?.site?.key)
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
}));
|
|
552
|
+
function N(e) {
|
|
553
|
+
let t = h.links(e?.project_id)?.homeSite;
|
|
554
|
+
return (t && t !== v.manifest?.site?.key ? k(t, `/item/${e.id}`) : null) ?? A(f);
|
|
555
|
+
}
|
|
556
|
+
function P(e) {
|
|
557
|
+
try {
|
|
558
|
+
let { host: t, pathname: n } = new URL(e), r = n.split("/").find(Boolean);
|
|
559
|
+
return r ? `${t}/${r}` : t;
|
|
560
|
+
} catch {
|
|
561
|
+
return e;
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
let F = (e) => S.projectColors?.[e?.project_id] ?? "";
|
|
565
|
+
function I(e, t) {
|
|
566
|
+
let n = h.label(t?.project_id) ?? "", r = n ? e.indexOf(` ${n},`) : -1;
|
|
567
|
+
return r < 0 ? {
|
|
568
|
+
before: e,
|
|
569
|
+
project: "",
|
|
570
|
+
after: ""
|
|
571
|
+
} : {
|
|
572
|
+
before: e.slice(0, r + 1),
|
|
573
|
+
project: n,
|
|
574
|
+
after: e.slice(r + 1 + n.length)
|
|
575
|
+
};
|
|
576
|
+
}
|
|
577
|
+
function R(e) {
|
|
578
|
+
return {
|
|
579
|
+
to: l.itemDetail.museum?.route?.(e.record?.partner_id) ?? null,
|
|
580
|
+
holder: e.text?.holder ? T(String(e.text.holder)) : ""
|
|
581
|
+
};
|
|
582
|
+
}
|
|
583
|
+
return (t, l) => (p(), n(J, {
|
|
584
|
+
spec: O.value,
|
|
585
|
+
id: o.id,
|
|
586
|
+
"data-getter": o.dataGetter,
|
|
587
|
+
class: "mwnf-dxa-item mwnf-dxa-gallery-item"
|
|
588
|
+
}, {
|
|
589
|
+
header: y(({ languages: e, language: t, select: n }) => [a("div", Ue, [c(z, {
|
|
590
|
+
languages: e,
|
|
591
|
+
language: t,
|
|
592
|
+
from: 1,
|
|
593
|
+
onSelect: n
|
|
594
|
+
}, null, 8, [
|
|
595
|
+
"languages",
|
|
596
|
+
"language",
|
|
597
|
+
"onSelect"
|
|
598
|
+
])]), c(L)]),
|
|
599
|
+
"after-media": y(({ record: e, dir: t }) => [e ? (p(), i("div", {
|
|
600
|
+
key: 0,
|
|
601
|
+
class: "mwnf-dxa-gallery-item__links",
|
|
602
|
+
dir: t || void 0
|
|
603
|
+
}, [a("p", null, [a("a", {
|
|
604
|
+
href: N(e),
|
|
605
|
+
target: "_blank",
|
|
606
|
+
rel: "noopener"
|
|
607
|
+
}, [l[0] ||= a("span", {
|
|
608
|
+
class: "mwnf-dxa-gallery-item__icon",
|
|
609
|
+
"aria-hidden": "true"
|
|
610
|
+
}, "↗", -1), a("bdi", null, [s(g(_(d)("record.source.label")) + " ", 1), a("span", null, "(" + g(P(N(e))) + ")", 1)])], 8, Ge)]), a("p", null, [a("a", {
|
|
611
|
+
href: _(D).myCollection,
|
|
612
|
+
target: "_blank",
|
|
613
|
+
rel: "noopener"
|
|
614
|
+
}, [l[1] ||= a("span", {
|
|
615
|
+
class: "mwnf-dxa-gallery-item__icon",
|
|
616
|
+
"aria-hidden": "true"
|
|
617
|
+
}, "↗", -1), s(g(_(d)("record.action.addToCollection")), 1)], 8, Ke)])], 8, We)) : r("", !0)]),
|
|
618
|
+
museum: y((t) => [(p(!0), i(e, null, m([R(t)], (t) => (p(), i(e, { key: "museum" }, [t.to && t.holder ? (p(), n(_(b), {
|
|
619
|
+
key: 0,
|
|
620
|
+
to: t.to,
|
|
621
|
+
class: "mwnf-dxa-gallery-item__museum"
|
|
622
|
+
}, {
|
|
623
|
+
default: y(() => [l[2] ||= a("span", {
|
|
624
|
+
class: "mwnf-dxa-gallery-item__icon",
|
|
625
|
+
"aria-hidden": "true"
|
|
626
|
+
}, "↗", -1), a("span", { innerHTML: t.holder }, null, 8, qe)]),
|
|
627
|
+
_: 2
|
|
628
|
+
}, 1032, ["to"])) : t.holder ? (p(), i("span", {
|
|
629
|
+
key: 1,
|
|
630
|
+
innerHTML: t.holder
|
|
631
|
+
}, null, 8, Je)) : r("", !0)], 64))), 128))]),
|
|
632
|
+
credits: y(({ record: t, credits: n, workingNumber: c, citation: l, dir: f }) => [t ? (p(), i("div", {
|
|
633
|
+
key: 0,
|
|
634
|
+
class: "mwnf-dxa-gallery-item__credits",
|
|
635
|
+
dir: f || void 0
|
|
636
|
+
}, [
|
|
637
|
+
l ? (p(), i(e, { key: 0 }, [a("p", Xe, g(_(d)("record.citation.ofThisPage")), 1), (p(!0), i(e, null, m([I(l, t)], (e) => (p(), i("p", Ze, [
|
|
638
|
+
s(g(e.before), 1),
|
|
639
|
+
a("span", Qe, g(e.project), 1),
|
|
640
|
+
s(g(e.after) + " ", 1),
|
|
641
|
+
a("span", $e, g(N(t)), 1)
|
|
642
|
+
]))), 128))], 64)) : r("", !0),
|
|
643
|
+
(p(!0), i(e, null, m(n, (e) => (p(), i("p", {
|
|
644
|
+
key: e.label,
|
|
645
|
+
class: "mwnf-dxa-gallery-item__credit"
|
|
646
|
+
}, [a("span", et, g(e.label), 1), a("span", null, g(e.value), 1)]))), 128)),
|
|
647
|
+
c ? (p(), i("p", tt, [a("span", nt, g(_(d)(o.words.workingNumber)), 1), s(g(" ") + g(c), 1)])) : r("", !0),
|
|
648
|
+
a("div", { class: u(["mwnf-dxa-gallery-item__source", F(t)]) }, [a("p", null, g(_(d)("record.source.label")), 1), a("p", null, [a("a", {
|
|
649
|
+
href: N(t),
|
|
650
|
+
target: "_blank",
|
|
651
|
+
rel: "noopener"
|
|
652
|
+
}, g(N(t)), 9, rt)])], 2)
|
|
653
|
+
], 8, Ye)) : r("", !0)]),
|
|
654
|
+
_: 1
|
|
655
|
+
}, 8, [
|
|
656
|
+
"spec",
|
|
657
|
+
"id",
|
|
658
|
+
"data-getter"
|
|
659
|
+
]));
|
|
660
|
+
}
|
|
661
|
+
};
|
|
662
|
+
export { J as n, it as t };
|