@museumwnf/viewer-layout 3.76.1 → 3.78.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 +5 -53
- package/dist/{LegacyItemSheet-B4Ob4upz.js → LegacyItemSheet-CNooycyz.js} +112 -97
- package/dist/{Theme-DvCv48p7.js → Theme-BCn6_VkI.js} +13 -13
- package/dist/data-D9H1tB75.js +98 -0
- package/dist/dxa.js +602 -596
- package/dist/{themeSpecs-CKgLOhlP.js → themeSpecs-BJ82RvA1.js} +1 -1
- package/dist/viewer-layout.css +1 -1
- package/package.json +2 -3
- package/src/dxa/relatedKind.js +11 -0
- package/src/dxa/testing.js +26 -13
- package/dist/data-BI5v-QYD.js +0 -81
- package/dist/publications.js +0 -1017
- package/dist/travels.js +0 -742
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { n as e } from "./chrome-Bv_mLlHM.js";
|
|
2
|
+
import { t } from "./legacyFacets-CQw2NYL4.js";
|
|
3
|
+
import { computed as n } from "vue";
|
|
4
|
+
import { partnerView as r, renderInline as i, useSiteConfig as ee } from "@museumwnf/viewer-core";
|
|
5
|
+
import { useExhibitionCollection as a, useExhibitionData as o, useExhibitionItemDetail as s, useExhibitionPartner as c, useExhibitionThemes as l, useExhibitionTimeline as te } from "@museumwnf/viewer-core/dxa";
|
|
6
|
+
// src/dxa/exhibition/data.js
|
|
7
|
+
var u = o(), d = a(u), f = te(u, d), p = c(u), m = l(u), { itemDetail: h } = s(u, f), { defaultLang: g, tr: _, md: v, mdInline: y, mdStrip: ne, labelOf: b, loadEnglish: x, exhibition: S, relatedContent: C, items: w, itemById: T, countries: E, timelines: re, visiblePartners: D, visiblePartnerById: O, isHiddenPartner: k, itemRoute: A, partnerRoute: j, partnerObjectsRoute: M, countryLabelFromCode: N, exhibitionTitle: P, exhibitionSubtitle: F, exhibitionHeadline: I, bannerCaption: L, projectName: ie } = u;
|
|
8
|
+
function R(t, n = "hi_res") {
|
|
9
|
+
return e(ee().chrome, t) ?? u.chromeImage(t, n);
|
|
10
|
+
}
|
|
11
|
+
var { haystack: z, tile: ae, countryIdForCode: oe } = d, B = t(d.FACETS), V = {
|
|
12
|
+
...d.collectionResults,
|
|
13
|
+
facets: B
|
|
14
|
+
}, H = (e, t) => String(e ?? "").localeCompare(String(t ?? ""), "en", { sensitivity: "base" });
|
|
15
|
+
function U(e, t) {
|
|
16
|
+
let n = String(e ?? "").split(":"), r = String(t ?? "").split(":");
|
|
17
|
+
for (let e = 0; e < Math.max(n.length, r.length); e++) {
|
|
18
|
+
let t = n[e] ?? "", i = r[e] ?? "";
|
|
19
|
+
if (t !== i) return /^\d+$/.test(t) && /^\d+$/.test(i) ? Number(t) - Number(i) : t.localeCompare(i, "en");
|
|
20
|
+
}
|
|
21
|
+
return 0;
|
|
22
|
+
}
|
|
23
|
+
function W(e, t) {
|
|
24
|
+
return H(b("countries", e.country_id), b("countries", t.country_id)) || H(b("partners", e.partner_id), b("partners", t.partner_id)) || U(e.backward_compatibility, t.backward_compatibility);
|
|
25
|
+
}
|
|
26
|
+
var G = {
|
|
27
|
+
pageSize: 20,
|
|
28
|
+
sort: {
|
|
29
|
+
undated: "first",
|
|
30
|
+
tiebreak: (e, t) => W(e, t)
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
function K(e) {
|
|
34
|
+
let t = _("items", e.id, g), n = e.type === "monument" ? "" : t.dates ?? "";
|
|
35
|
+
return {
|
|
36
|
+
id: e.id,
|
|
37
|
+
image: e.images?.[0]?.url ?? "",
|
|
38
|
+
imageAlt: b("items", e.id),
|
|
39
|
+
name: i(t.name ?? e.internal_name ?? ""),
|
|
40
|
+
date: n.length > 80 ? `${n.slice(0, 80)}...` : n,
|
|
41
|
+
partner: b("partners", e.partner_id),
|
|
42
|
+
place: [t.location, b("countries", e.country_id)].filter(Boolean).join(", "),
|
|
43
|
+
project: ie(e, g) ?? "",
|
|
44
|
+
to: A(e)
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
var { hasTimeline: q, timelineSpec: J, timelineGallerySpec: Y } = f, { partnerListSpec: X, partnerSheetSpec: Z } = p, se = {
|
|
48
|
+
countryLabel: (e) => b("countries", e),
|
|
49
|
+
md: v,
|
|
50
|
+
mdInline: y,
|
|
51
|
+
route: j,
|
|
52
|
+
objectsRoute: M,
|
|
53
|
+
hidden: k
|
|
54
|
+
}, ce = n(() => {
|
|
55
|
+
let e = /* @__PURE__ */ new Map();
|
|
56
|
+
for (let t of w.value ?? []) t.partner_id && (e.has(t.partner_id) || e.set(t.partner_id, /* @__PURE__ */ new Set()), e.get(t.partner_id).add(t.type));
|
|
57
|
+
return e;
|
|
58
|
+
}), Q = {
|
|
59
|
+
both: "exhibition.action.viewItems",
|
|
60
|
+
monuments: "exhibition.action.viewMonuments",
|
|
61
|
+
objects: "exhibition.action.viewObjects"
|
|
62
|
+
};
|
|
63
|
+
function le(e = []) {
|
|
64
|
+
let t = [...e], n = t.includes("monument"), r = t.some((e) => e !== "monument");
|
|
65
|
+
return n && r ? Q.both : n ? Q.monuments : Q.objects;
|
|
66
|
+
}
|
|
67
|
+
function $(e) {
|
|
68
|
+
return le(ce.value.get(e?.id));
|
|
69
|
+
}
|
|
70
|
+
var ue = {
|
|
71
|
+
spec: {
|
|
72
|
+
...Z,
|
|
73
|
+
media: () => [],
|
|
74
|
+
sourceCredit: !1
|
|
75
|
+
},
|
|
76
|
+
visible: (e) => !!O(e),
|
|
77
|
+
view: (e, t) => r(e, {
|
|
78
|
+
..._("partners", e.id, g),
|
|
79
|
+
...t
|
|
80
|
+
}, se),
|
|
81
|
+
labels: {
|
|
82
|
+
partner: {
|
|
83
|
+
objects: (e) => $(e),
|
|
84
|
+
homepage: "exhibition.partner.homepage"
|
|
85
|
+
},
|
|
86
|
+
institution: {
|
|
87
|
+
objects: (e) => $(e),
|
|
88
|
+
homepage: "exhibition.action.institutionHomepage"
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
className: "mwnf-dxa-exhibition-profile",
|
|
92
|
+
media: {
|
|
93
|
+
thumbsFrom: 1,
|
|
94
|
+
creditCaption: !1
|
|
95
|
+
},
|
|
96
|
+
legacyMap: { label: "exhibition.partner.mapLabel" }
|
|
97
|
+
};
|
|
98
|
+
export { Y as A, ue as C, j as D, M as E, _ as M, O as N, C as O, D as P, v as S, X as T, w as _, E as a, K as b, S as c, P as d, q as f, A as g, h, V as i, J as j, m as k, I as l, T as m, L as n, N as o, z as p, R as r, g as s, B as t, F as u, b as v, $ as w, x, G as y };
|