@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
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import { a as e, r as t } from "./chrome-DPuPeWzV.js";
|
|
2
|
+
import { computed as n, createBlock as r, createSlots as i, mergeProps as a, openBlock as o, renderSlot as s, useAttrs as c, withCtx as l } from "vue";
|
|
3
|
+
import { mwnfLinks as u, useI18n as d, useSection as f, useSiteConfig as p, useSiteRights as m } from "@museumwnf/viewer-core";
|
|
4
|
+
import { useRouter as h } from "vue-router";
|
|
5
|
+
//#region src/components/SiteShell.vue
|
|
6
|
+
var g = /*@__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(g) {
|
|
19
|
+
let _ = g, { t: v, locale: y } = d(), b = h(), x = f(), S = p(), C = n(() => ({
|
|
20
|
+
...S,
|
|
21
|
+
..._.config ?? {}
|
|
22
|
+
})), w = n(() => C.value.navigation ?? {}), T = n(() => C.value.logos ?? null), E = n(() => C.value.banner ?? null), D = c(), O = [
|
|
23
|
+
{
|
|
24
|
+
label: "core.footer.aboutMwnf",
|
|
25
|
+
href: u.about,
|
|
26
|
+
external: !0
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
label: "core.footer.contact",
|
|
30
|
+
href: u.contact,
|
|
31
|
+
external: !0
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
label: "core.footer.legalNotice",
|
|
35
|
+
href: u.legalNotice,
|
|
36
|
+
external: !0
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
label: "core.footer.credits",
|
|
40
|
+
href: u.credits,
|
|
41
|
+
external: !0
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
label: "core.footer.cookies",
|
|
45
|
+
href: u.cookies,
|
|
46
|
+
external: !0
|
|
47
|
+
}
|
|
48
|
+
], k = (/* @__PURE__ */ new Date()).getFullYear(), A = n(() => D.footerText === void 0 && D["footer-text"] === void 0 ? `${v("core.footer.copyright")} 2004–${k}` : null), j = m(), M = n(() => C.value.footer?.rightsHolder !== !0 || !j.holder ? null : {
|
|
49
|
+
label: v("record.source.rightsHolder"),
|
|
50
|
+
text: j.attribution ?? j.holder,
|
|
51
|
+
termsHref: j.termsUrl,
|
|
52
|
+
termsLabel: v("record.source.termsOfUse")
|
|
53
|
+
});
|
|
54
|
+
function N(e) {
|
|
55
|
+
return e.href ? e.href : e.to ? b.resolve(e.to).href : "";
|
|
56
|
+
}
|
|
57
|
+
function P(e) {
|
|
58
|
+
return typeof e.when != "function" || !!e.when({
|
|
59
|
+
section: x.value,
|
|
60
|
+
locale: y.value
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
function F(e, { active: t = !1 } = {}) {
|
|
64
|
+
let n = {
|
|
65
|
+
label: v(e.label),
|
|
66
|
+
href: N(e),
|
|
67
|
+
external: !!e.external
|
|
68
|
+
};
|
|
69
|
+
return t && (n.active = e.section === x.value), n;
|
|
70
|
+
}
|
|
71
|
+
let I = n(() => Array.isArray(w.value.links) ? w.value.links.filter(P).map((e) => F(e, { active: !0 })) : null), L = n(() => Array.isArray(w.value.headerLinks) ? w.value.headerLinks.map((e) => F(e)) : null), R = n(() => (Array.isArray(w.value.footerLinks) ? w.value.footerLinks : O).map((e) => F(e))), z = n(() => {
|
|
72
|
+
let e = w.value.search;
|
|
73
|
+
return e ? {
|
|
74
|
+
placeholder: e.placeholder ? v(e.placeholder) : "",
|
|
75
|
+
submitLabel: e.submitLabel ? v(e.submitLabel) : ""
|
|
76
|
+
} : null;
|
|
77
|
+
});
|
|
78
|
+
function B(e) {
|
|
79
|
+
let t = w.value.search;
|
|
80
|
+
t?.route && b.push({
|
|
81
|
+
name: t.route,
|
|
82
|
+
query: { [t.key ?? "q"]: e || t.empty || "" }
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
function V(e) {
|
|
86
|
+
return typeof e == "function" ? e({
|
|
87
|
+
section: x.value,
|
|
88
|
+
locale: y.value,
|
|
89
|
+
t: v
|
|
90
|
+
}) : typeof e == "string" ? v(e) : e;
|
|
91
|
+
}
|
|
92
|
+
let H = n(() => {
|
|
93
|
+
let e = E.value ? V(E.value.title) : "";
|
|
94
|
+
if (e) return e;
|
|
95
|
+
let t = w.value.sectionTitles?.[x.value];
|
|
96
|
+
return t ? v(t) : "";
|
|
97
|
+
}), U = [
|
|
98
|
+
"variant",
|
|
99
|
+
"image",
|
|
100
|
+
"imageAlt",
|
|
101
|
+
"caption",
|
|
102
|
+
"captionLabel",
|
|
103
|
+
"subtitle",
|
|
104
|
+
"headline",
|
|
105
|
+
"enter",
|
|
106
|
+
"strapline"
|
|
107
|
+
], W = n(() => {
|
|
108
|
+
let e = {};
|
|
109
|
+
H.value && (e.bannerTitle = H.value);
|
|
110
|
+
for (let t of U) {
|
|
111
|
+
let n = E.value ? V(E.value[t]) : "";
|
|
112
|
+
n && (e[`banner${t[0].toUpperCase()}${t.slice(1)}`] = n);
|
|
113
|
+
}
|
|
114
|
+
return e;
|
|
115
|
+
}), G = n(() => {
|
|
116
|
+
let e = C.value.brand, n = e ? t(C.value.chrome, e.logo) : null;
|
|
117
|
+
return n ? {
|
|
118
|
+
src: n,
|
|
119
|
+
alt: e.alt ? v(e.alt) : ""
|
|
120
|
+
} : null;
|
|
121
|
+
}), K = n(() => {
|
|
122
|
+
let e = w.value.placement;
|
|
123
|
+
return typeof e == "function" ? e({
|
|
124
|
+
section: x.value,
|
|
125
|
+
locale: y.value
|
|
126
|
+
}) : e;
|
|
127
|
+
}), q = n(() => Array.isArray(w.value.socialLinks) ? w.value.socialLinks : null), J = n(() => {
|
|
128
|
+
let e = T.value?.header;
|
|
129
|
+
return typeof e == "function" ? _.logos.filter(e) : null;
|
|
130
|
+
}), Y = n(() => {
|
|
131
|
+
let e = T.value?.headerTitle;
|
|
132
|
+
return e && J.value?.length ? v(e) : "";
|
|
133
|
+
}), X = n(() => {
|
|
134
|
+
let e = T.value?.sponsorGroups;
|
|
135
|
+
return typeof e == "function" ? e(_.logos, v) : null;
|
|
136
|
+
}), Z = n(() => {
|
|
137
|
+
let e = { ...W.value };
|
|
138
|
+
return Array.isArray(w.value.languages) && (e.languages = w.value.languages), I.value && (e.navLinks = I.value), L.value && (e.headerLinks = L.value), R.value && (e.footerLinks = R.value), A.value && (e.footerText = A.value), z.value && (e.search = z.value), J.value && (e.headerLogos = J.value, Y.value && (e.headerLogosTitle = Y.value)), X.value && (e.sponsorGroups = X.value), G.value && (e.headerBrandLogo = G.value), K.value && (e.navigationPlacement = K.value), q.value && (e.footerSocial = q.value), M.value && (e.footerAttributionLabel = M.value.label, e.footerAttributionText = M.value.text, e.footerTermsHref = M.value.termsHref, e.footerTermsLabel = M.value.termsLabel), e;
|
|
139
|
+
});
|
|
140
|
+
return (t, n) => (o(), r(e, a({
|
|
141
|
+
...t.$attrs,
|
|
142
|
+
...Z.value
|
|
143
|
+
}, { onSearch: B }), i({ _: 2 }, [
|
|
144
|
+
t.$slots.header ? {
|
|
145
|
+
name: "header",
|
|
146
|
+
fn: l(() => [s(t.$slots, "header")]),
|
|
147
|
+
key: "0"
|
|
148
|
+
} : void 0,
|
|
149
|
+
t.$slots.brand ? {
|
|
150
|
+
name: "header-brand",
|
|
151
|
+
fn: l(() => [s(t.$slots, "brand")]),
|
|
152
|
+
key: "1"
|
|
153
|
+
} : void 0,
|
|
154
|
+
t.$slots.banner ? {
|
|
155
|
+
name: "banner",
|
|
156
|
+
fn: l(() => [s(t.$slots, "banner")]),
|
|
157
|
+
key: "2"
|
|
158
|
+
} : void 0,
|
|
159
|
+
t.$slots.navigation ? {
|
|
160
|
+
name: "navigation",
|
|
161
|
+
fn: l(() => [s(t.$slots, "navigation")]),
|
|
162
|
+
key: "3"
|
|
163
|
+
} : void 0,
|
|
164
|
+
t.$slots.default || t.$slots.notice || t.$slots["after-content"] ? {
|
|
165
|
+
name: "default",
|
|
166
|
+
fn: l(() => [
|
|
167
|
+
s(t.$slots, "notice"),
|
|
168
|
+
s(t.$slots, "default"),
|
|
169
|
+
s(t.$slots, "after-content")
|
|
170
|
+
]),
|
|
171
|
+
key: "4"
|
|
172
|
+
} : void 0,
|
|
173
|
+
t.$slots.hyperlinks ? {
|
|
174
|
+
name: "hyperlinks",
|
|
175
|
+
fn: l(() => [s(t.$slots, "hyperlinks")]),
|
|
176
|
+
key: "5"
|
|
177
|
+
} : void 0,
|
|
178
|
+
t.$slots.sponsors ? {
|
|
179
|
+
name: "sponsors",
|
|
180
|
+
fn: l(() => [s(t.$slots, "sponsors")]),
|
|
181
|
+
key: "6"
|
|
182
|
+
} : void 0,
|
|
183
|
+
t.$slots.footer ? {
|
|
184
|
+
name: "footer",
|
|
185
|
+
fn: l(() => [s(t.$slots, "footer")]),
|
|
186
|
+
key: "7"
|
|
187
|
+
} : void 0
|
|
188
|
+
]), 1040));
|
|
189
|
+
}
|
|
190
|
+
});
|
|
191
|
+
//#endregion
|
|
192
|
+
export { g as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { s as e, y as t } from "./TimelineEventList-COjkXEzS.js";
|
|
2
|
-
import { o as n } from "./TimelineResultsView-
|
|
3
|
-
import { A as r, F as i, h as a, m as o } from "./data-
|
|
4
|
-
import { n as s, r as c, t as l } from "./themeSpecs-
|
|
2
|
+
import { o as n } from "./TimelineResultsView-ChkBn27W.js";
|
|
3
|
+
import { A as r, F as i, h as a, m as o } from "./data-CJlLA-Mf.js";
|
|
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";
|
|
6
6
|
import { renderBlock as O, useI18n as k } from "@museumwnf/viewer-core";
|
|
7
7
|
import { RouterLink as A, useRoute as te, useRouter as ne } from "vue-router";
|