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