@museumwnf/viewer-layout 3.2.2 → 3.4.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 +167 -12
- package/dist/ItemDetailView-I__hm63H.js +298 -0
- package/dist/SiteShell-4vV2jIzf.js +192 -0
- package/dist/{Theme-Dd8G1RA3.js → Theme-B5J0XRe1.js} +3 -3
- package/dist/{TimelineResultsView-5Cy-OkZY.js → TimelineResultsView-ChkBn27W.js} +489 -485
- package/dist/chrome-DPuPeWzV.js +1141 -0
- package/dist/components.js +1 -1
- package/dist/data-CJlLA-Mf.js +38 -0
- package/dist/data-DTbAYdr2.js +40 -0
- package/dist/dxa.js +619 -502
- package/dist/index.js +6 -6
- package/dist/{themeSpecs-C_uGarTs.js → themeSpecs-B885l456.js} +3 -2
- package/dist/viewer-layout.css +1 -1
- package/dist/views.js +1 -1
- package/package.json +8 -2
- package/src/dxa/testing.js +857 -0
- package/src/styles/dxa-exhibition.css +389 -0
- package/src/styles/dxa-gallery.css +589 -0
- package/src/tokens.reference.css +25 -7
- package/dist/ItemDetailView-C-X-LgJU.js +0 -284
- package/dist/PageShell-CbJ9lQoQ.js +0 -961
- package/dist/SiteShell-C3OgZO8p.js +0 -154
- package/dist/data-BfyYB8ff.js +0 -33
- package/dist/data-G8uXeEfE.js +0 -35
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./PageShell-CbJ9lQoQ.js";
|
|
2
|
-
import { computed as t, createBlock as n, createSlots as r, mergeProps as i, openBlock as a, renderSlot as o, withCtx as s } from "vue";
|
|
3
|
-
import { useI18n as c, useSection as l, useSiteConfig as u, useSiteRights as d } from "@museumwnf/viewer-core";
|
|
4
|
-
import { useRouter as f } from "vue-router";
|
|
5
|
-
//#region src/components/SiteShell.vue
|
|
6
|
-
var p = /*@__PURE__*/ Object.assign({ inheritAttrs: !1 }, {
|
|
7
|
-
__name: "SiteShell",
|
|
8
|
-
props: {
|
|
9
|
-
config: {
|
|
10
|
-
type: Object,
|
|
11
|
-
default: null
|
|
12
|
-
},
|
|
13
|
-
logos: {
|
|
14
|
-
type: Array,
|
|
15
|
-
default: () => []
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
setup(p) {
|
|
19
|
-
let m = p, { t: h, locale: g } = c(), _ = f(), v = l(), y = u(), b = t(() => ({
|
|
20
|
-
...y,
|
|
21
|
-
...m.config ?? {}
|
|
22
|
-
})), x = t(() => b.value.navigation ?? {}), S = t(() => b.value.logos ?? null), C = t(() => b.value.banner ?? null), w = d(), T = t(() => w.holder ? {
|
|
23
|
-
label: h("record.source.rightsHolder"),
|
|
24
|
-
text: w.attribution ?? w.holder,
|
|
25
|
-
termsHref: w.termsUrl,
|
|
26
|
-
termsLabel: h("record.source.termsOfUse")
|
|
27
|
-
} : null);
|
|
28
|
-
function E(e) {
|
|
29
|
-
return e.href ? e.href : e.to ? _.resolve(e.to).href : "";
|
|
30
|
-
}
|
|
31
|
-
function D(e) {
|
|
32
|
-
return typeof e.when != "function" || !!e.when({
|
|
33
|
-
section: v.value,
|
|
34
|
-
locale: g.value
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
function O(e, { active: t = !1 } = {}) {
|
|
38
|
-
let n = {
|
|
39
|
-
label: h(e.label),
|
|
40
|
-
href: E(e),
|
|
41
|
-
external: !!e.external
|
|
42
|
-
};
|
|
43
|
-
return t && (n.active = e.section === v.value), n;
|
|
44
|
-
}
|
|
45
|
-
let k = t(() => Array.isArray(x.value.links) ? x.value.links.filter(D).map((e) => O(e, { active: !0 })) : null), A = t(() => Array.isArray(x.value.headerLinks) ? x.value.headerLinks.map((e) => O(e)) : null), j = t(() => Array.isArray(x.value.footerLinks) ? x.value.footerLinks.map((e) => O(e)) : null), M = t(() => {
|
|
46
|
-
let e = x.value.search;
|
|
47
|
-
return e ? {
|
|
48
|
-
placeholder: e.placeholder ? h(e.placeholder) : "",
|
|
49
|
-
submitLabel: e.submitLabel ? h(e.submitLabel) : ""
|
|
50
|
-
} : null;
|
|
51
|
-
});
|
|
52
|
-
function N(e) {
|
|
53
|
-
let t = x.value.search;
|
|
54
|
-
t?.route && _.push({
|
|
55
|
-
name: t.route,
|
|
56
|
-
query: { [t.key ?? "q"]: e || t.empty || "" }
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
function P(e) {
|
|
60
|
-
return typeof e == "function" ? e({
|
|
61
|
-
section: v.value,
|
|
62
|
-
locale: g.value,
|
|
63
|
-
t: h
|
|
64
|
-
}) : typeof e == "string" ? h(e) : e;
|
|
65
|
-
}
|
|
66
|
-
let F = t(() => {
|
|
67
|
-
let e = C.value ? P(C.value.title) : "";
|
|
68
|
-
if (e) return e;
|
|
69
|
-
let t = x.value.sectionTitles?.[v.value];
|
|
70
|
-
return t ? h(t) : "";
|
|
71
|
-
}), I = [
|
|
72
|
-
"variant",
|
|
73
|
-
"image",
|
|
74
|
-
"imageAlt",
|
|
75
|
-
"caption",
|
|
76
|
-
"captionLabel",
|
|
77
|
-
"subtitle",
|
|
78
|
-
"headline",
|
|
79
|
-
"enter",
|
|
80
|
-
"strapline"
|
|
81
|
-
], L = t(() => {
|
|
82
|
-
let e = {};
|
|
83
|
-
F.value && (e.bannerTitle = F.value);
|
|
84
|
-
for (let t of I) {
|
|
85
|
-
let n = C.value ? P(C.value[t]) : "";
|
|
86
|
-
n && (e[`banner${t[0].toUpperCase()}${t.slice(1)}`] = n);
|
|
87
|
-
}
|
|
88
|
-
return e;
|
|
89
|
-
}), R = t(() => {
|
|
90
|
-
let e = S.value?.header;
|
|
91
|
-
return typeof e == "function" ? m.logos.filter(e) : null;
|
|
92
|
-
}), z = t(() => {
|
|
93
|
-
let e = S.value?.headerTitle;
|
|
94
|
-
return e && R.value?.length ? h(e) : "";
|
|
95
|
-
}), B = t(() => {
|
|
96
|
-
let e = S.value?.sponsorGroups;
|
|
97
|
-
return typeof e == "function" ? e(m.logos, h) : null;
|
|
98
|
-
}), V = t(() => {
|
|
99
|
-
let e = { ...L.value };
|
|
100
|
-
return Array.isArray(x.value.languages) && (e.languages = x.value.languages), k.value && (e.navLinks = k.value), A.value && (e.headerLinks = A.value), j.value && (e.footerLinks = j.value), M.value && (e.search = M.value), R.value && (e.headerLogos = R.value, z.value && (e.headerLogosTitle = z.value)), B.value && (e.sponsorGroups = B.value), T.value && (e.footerAttributionLabel = T.value.label, e.footerAttributionText = T.value.text, e.footerTermsHref = T.value.termsHref, e.footerTermsLabel = T.value.termsLabel), e;
|
|
101
|
-
});
|
|
102
|
-
return (t, c) => (a(), n(e, i({
|
|
103
|
-
...t.$attrs,
|
|
104
|
-
...V.value
|
|
105
|
-
}, { onSearch: N }), r({ _: 2 }, [
|
|
106
|
-
t.$slots.header ? {
|
|
107
|
-
name: "header",
|
|
108
|
-
fn: s(() => [o(t.$slots, "header")]),
|
|
109
|
-
key: "0"
|
|
110
|
-
} : void 0,
|
|
111
|
-
t.$slots.brand ? {
|
|
112
|
-
name: "header-brand",
|
|
113
|
-
fn: s(() => [o(t.$slots, "brand")]),
|
|
114
|
-
key: "1"
|
|
115
|
-
} : void 0,
|
|
116
|
-
t.$slots.banner ? {
|
|
117
|
-
name: "banner",
|
|
118
|
-
fn: s(() => [o(t.$slots, "banner")]),
|
|
119
|
-
key: "2"
|
|
120
|
-
} : void 0,
|
|
121
|
-
t.$slots.navigation ? {
|
|
122
|
-
name: "navigation",
|
|
123
|
-
fn: s(() => [o(t.$slots, "navigation")]),
|
|
124
|
-
key: "3"
|
|
125
|
-
} : void 0,
|
|
126
|
-
t.$slots.default || t.$slots.notice || t.$slots["after-content"] ? {
|
|
127
|
-
name: "default",
|
|
128
|
-
fn: s(() => [
|
|
129
|
-
o(t.$slots, "notice"),
|
|
130
|
-
o(t.$slots, "default"),
|
|
131
|
-
o(t.$slots, "after-content")
|
|
132
|
-
]),
|
|
133
|
-
key: "4"
|
|
134
|
-
} : void 0,
|
|
135
|
-
t.$slots.hyperlinks ? {
|
|
136
|
-
name: "hyperlinks",
|
|
137
|
-
fn: s(() => [o(t.$slots, "hyperlinks")]),
|
|
138
|
-
key: "5"
|
|
139
|
-
} : void 0,
|
|
140
|
-
t.$slots.sponsors ? {
|
|
141
|
-
name: "sponsors",
|
|
142
|
-
fn: s(() => [o(t.$slots, "sponsors")]),
|
|
143
|
-
key: "6"
|
|
144
|
-
} : void 0,
|
|
145
|
-
t.$slots.footer ? {
|
|
146
|
-
name: "footer",
|
|
147
|
-
fn: s(() => [o(t.$slots, "footer")]),
|
|
148
|
-
key: "7"
|
|
149
|
-
} : void 0
|
|
150
|
-
]), 1040));
|
|
151
|
-
}
|
|
152
|
-
});
|
|
153
|
-
//#endregion
|
|
154
|
-
export { p as t };
|
package/dist/data-BfyYB8ff.js
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { partnerView as e } from "@museumwnf/viewer-core";
|
|
2
|
-
import { FACET_CATEGORIES as t, FACET_LABEL_KEYS as n, PAGE_SIZE as r, useExhibitionCollection as i, useExhibitionData as a, useExhibitionItemDetail as o, useExhibitionPartner as s, useExhibitionThemes as c, useExhibitionTimeline as l, useFacetLabels as u } from "@museumwnf/viewer-core/dxa";
|
|
3
|
-
//#region src/dxa/exhibition/data.js
|
|
4
|
-
var d = a(), f = i(d), p = l(d, f), m = s(d), h = c(d), { itemDetail: g } = o(d, p), { defaultLang: _, tr: v, md: y, mdInline: b, mdStrip: x, labelOf: S, loadEnglish: C, exhibition: w, relatedContent: T, items: E, itemById: D, countries: O, timelines: k, visiblePartners: A, visiblePartnerById: j, isHiddenPartner: M, itemRoute: N, partnerRoute: P, partnerObjectsRoute: F, chromeImage: I, countryLabelFromCode: L, exhibitionTitle: R, exhibitionSubtitle: z, exhibitionHeadline: B, bannerCaption: V } = d, { FACETS: H, haystack: U, tile: W, collectionResults: G, countryIdForCode: K } = f, { hasTimeline: q, timelineSpec: J, timelineGallerySpec: Y } = p, { partnerListSpec: X, partnerSheetSpec: Z } = m, Q = {
|
|
5
|
-
countryLabel: (e) => S("countries", e),
|
|
6
|
-
md: y,
|
|
7
|
-
mdInline: b,
|
|
8
|
-
route: P,
|
|
9
|
-
objectsRoute: F,
|
|
10
|
-
hidden: M
|
|
11
|
-
}, $ = {
|
|
12
|
-
spec: {
|
|
13
|
-
...Z,
|
|
14
|
-
media: () => []
|
|
15
|
-
},
|
|
16
|
-
visible: (e) => !!j(e),
|
|
17
|
-
view: (t, n) => e(t, {
|
|
18
|
-
...v("partners", t.id, _),
|
|
19
|
-
...n
|
|
20
|
-
}, Q),
|
|
21
|
-
labels: {
|
|
22
|
-
partner: {
|
|
23
|
-
objects: "partner.action.viewObjects",
|
|
24
|
-
homepage: "partner.nav.homepage"
|
|
25
|
-
},
|
|
26
|
-
institution: {
|
|
27
|
-
objects: "exhibition.action.viewItems",
|
|
28
|
-
homepage: "exhibition.action.institutionHomepage"
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
//#endregion
|
|
33
|
-
export { h as A, y as C, F as D, X as E, v as F, u as I, j as L, Y as M, J as N, P as O, k as P, A as R, C as S, $ as T, U as _, V as a, E as b, O as c, _ as d, w as f, q as g, R as h, r as i, W as j, T as k, K as l, z as m, t as n, I as o, B as p, n as r, G as s, H as t, L as u, D as v, x as w, S as x, g as y };
|
package/dist/data-G8uXeEfE.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { partnerView as e } from "@museumwnf/viewer-core";
|
|
2
|
-
import { FACET_CATEGORIES as t, FACET_LABEL_KEYS as n, PAGE_SIZE as r, useFacetLabels as i, useGalleryCollection as a, useGalleryData as o, useGalleryItemDetail as s, useGalleryPartner as c, useGalleryTimeline as l } from "@museumwnf/viewer-core/dxa";
|
|
3
|
-
//#region src/dxa/gallery/data.js
|
|
4
|
-
var u = o(), d = a(u), f = l(u, d), p = c(u, d), { itemDetail: m } = s(u, f), { manifest: h, defaultLang: g, tr: _, md: v, mdInline: y, loadEnglish: b, labelOf: x, gallery: S, items: C, itemById: w, partners: T, countries: E, timelines: D, partnerById: O, itemRoute: k, partnerRoute: A, partnerObjectsRoute: j, itemFromUidPath: M, partnerFromKey: N, chromeImage: P, pickSiblings: F, siblingUrl: I } = u, { FACETS: L, haystack: R, tile: z, collectionResults: B, countryIdForCode: V } = d, { timelineResults: H, timelineGallery: U } = f, { partnerList: W, partnerSheet: G, partnerObjects: K } = p, q = {
|
|
5
|
-
countryLabel: (e) => x("countries", e),
|
|
6
|
-
md: v,
|
|
7
|
-
mdInline: y,
|
|
8
|
-
route: A,
|
|
9
|
-
objectsRoute: j
|
|
10
|
-
};
|
|
11
|
-
function J(t) {
|
|
12
|
-
let n = (T.value ?? []).filter((e) => e.featured);
|
|
13
|
-
for (let e = n.length - 1; e > 0; e--) {
|
|
14
|
-
let t = Math.floor(Math.random() * (e + 1));
|
|
15
|
-
[n[e], n[t]] = [n[t], n[e]];
|
|
16
|
-
}
|
|
17
|
-
return n.slice(0, t).map((t) => e(t, _("partners", t.id, g), q));
|
|
18
|
-
}
|
|
19
|
-
var Y = {
|
|
20
|
-
spec: {
|
|
21
|
-
...G,
|
|
22
|
-
media: () => []
|
|
23
|
-
},
|
|
24
|
-
visible: () => !0,
|
|
25
|
-
view: (t, n) => e(t, {
|
|
26
|
-
..._("partners", t.id, g),
|
|
27
|
-
...n
|
|
28
|
-
}, q),
|
|
29
|
-
labels: { partner: {
|
|
30
|
-
objects: "partner.action.viewObjects",
|
|
31
|
-
homepage: "partner.nav.homepage"
|
|
32
|
-
} }
|
|
33
|
-
};
|
|
34
|
-
//#endregion
|
|
35
|
-
export { H as A, K as C, I as D, F as E, _ as M, i as N, z as O, W as S, A as T, b as _, P as a, Y as b, g as c, R as d, w as f, x as g, C as h, r as i, D as j, U as k, J as l, M as m, t as n, B as o, m as p, n as r, V as s, L as t, S as u, h as v, j as w, N as x, O as y };
|