@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,384 @@
|
|
|
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, mergeProps as ee, normalizeClass as te, normalizeProps as u, openBlock as d, ref as f, renderList as p, renderSlot as m, toDisplayString as h, unref as g, useSlots as ne, watch as _, withCtx as re } from "vue";
|
|
2
|
+
import { useRoute as ie } from "vue-router";
|
|
3
|
+
import { NotFoundView as ae, byId as v, citation as oe, creditLine as se, entityRef as y, languageLabels as ce, loadEntities as le, pictureCredits as ue, picturesInLanguage as de, renderBlock as fe, renderInline as pe, renderPlain as b, sheetRows as x, sourceUrl as me, useDataPackage as he, useGlossaryPopup as ge, useI18n as _e, useProjects as ve, useRecordSheet as ye, useRelatedRecords as be } from "@museumwnf/viewer-core";
|
|
4
|
+
import { t as xe } from "./GlossaryPopover-DbQKXhx9.js";
|
|
5
|
+
import { a as Se, c as Ce, d as we, i as Te, n as S, o as Ee, r as De, s as Oe } from "./PartnerMap-DdyMLtgH.js";
|
|
6
|
+
import { useI18n as C } from "@museumwnf/viewer-core/i18n";
|
|
7
|
+
// src/content/ShortDescription.vue
|
|
8
|
+
var w = ["dir"], ke = ["aria-expanded"], T = ["innerHTML"], Ae = {
|
|
9
|
+
__name: "ShortDescription",
|
|
10
|
+
props: {
|
|
11
|
+
html: {
|
|
12
|
+
type: String,
|
|
13
|
+
required: !0
|
|
14
|
+
},
|
|
15
|
+
dir: {
|
|
16
|
+
type: String,
|
|
17
|
+
default: void 0
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
setup(e) {
|
|
21
|
+
let t = e, { t: n } = C(), o = f(!1);
|
|
22
|
+
return _(() => t.html, () => {
|
|
23
|
+
o.value = !1;
|
|
24
|
+
}), (t, s) => (d(), i("div", {
|
|
25
|
+
class: "mwnf-sheet__short",
|
|
26
|
+
dir: e.dir
|
|
27
|
+
}, [a("button", {
|
|
28
|
+
type: "button",
|
|
29
|
+
class: "mwnf-sheet__toggle",
|
|
30
|
+
"aria-expanded": o.value ? "true" : "false",
|
|
31
|
+
onClick: s[0] ||= (e) => o.value = !o.value
|
|
32
|
+
}, h(o.value ? g(n)("record.action.hideShortDescription") : g(n)("record.action.viewShortDescription")), 9, ke), o.value ? (d(), i("div", {
|
|
33
|
+
key: 0,
|
|
34
|
+
class: "mwnf-sheet__block",
|
|
35
|
+
innerHTML: e.html
|
|
36
|
+
}, null, 8, T)) : r("", !0)], 8, w));
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
// src/views/pictureLimit.js
|
|
40
|
+
function E(e, t, n) {
|
|
41
|
+
let r = typeof t == "function" ? t(n) : t;
|
|
42
|
+
return Number.isInteger(r) && r > 0 ? e.slice(0, r) : e;
|
|
43
|
+
}
|
|
44
|
+
// src/views/RecordView.vue
|
|
45
|
+
var je = ["dir", "innerHTML"], Me = { class: "mwnf-record__body" }, Ne = { class: "mwnf-record__main" }, Pe = {
|
|
46
|
+
key: 0,
|
|
47
|
+
class: "mwnf-record__media"
|
|
48
|
+
}, Fe = {
|
|
49
|
+
key: 2,
|
|
50
|
+
class: "mwnf-record__status"
|
|
51
|
+
}, Ie = {
|
|
52
|
+
key: 0,
|
|
53
|
+
class: "mwnf-record__aside"
|
|
54
|
+
}, Le = {
|
|
55
|
+
key: 2,
|
|
56
|
+
class: "mwnf-record__status"
|
|
57
|
+
}, Re = {
|
|
58
|
+
__name: "RecordView",
|
|
59
|
+
props: {
|
|
60
|
+
spec: {
|
|
61
|
+
type: Object,
|
|
62
|
+
required: !0
|
|
63
|
+
},
|
|
64
|
+
id: {
|
|
65
|
+
type: String,
|
|
66
|
+
required: !0
|
|
67
|
+
},
|
|
68
|
+
entity: {
|
|
69
|
+
type: String,
|
|
70
|
+
default: ""
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
setup(f) {
|
|
74
|
+
let _ = f, { t: C, tIn: w, locale: ke } = _e(), T = he(), Re = ve(), ze = ne(), Be = ie(), D = _.spec.entity ?? _.entity, O = t(() => _.spec), Ve = y(D), He = v(D), k = t(() => He.value.get(_.id) ?? null), Ue = t(() => Ve.value !== null), A = _.spec.creditPeople ? _.spec.creditPeople.entity ?? "authors" : null;
|
|
75
|
+
A && le([A]).catch(() => {});
|
|
76
|
+
let We = A ? v(A) : null, { language: j, languages: Ge, dir: M, select: Ke, text: N, ready: P, terms: qe, glossary: F, attribution: I } = ye(k, {
|
|
77
|
+
entity: D,
|
|
78
|
+
translations: [..._.spec.translations ?? [], ...A ? [A] : []],
|
|
79
|
+
attribution: _.spec.attribution ?? []
|
|
80
|
+
}), Je = y("languages"), L = t(() => ce(Ge.value).map((e) => {
|
|
81
|
+
if (e.label !== e.code.toUpperCase()) return e;
|
|
82
|
+
let t = (Je.value ?? []).find((t) => t.code === e.code)?.names?.[e.code];
|
|
83
|
+
return t ? {
|
|
84
|
+
...e,
|
|
85
|
+
label: t
|
|
86
|
+
} : e;
|
|
87
|
+
})), { active: R, onClick: z, close: Ye } = ge(qe), Xe = t(() => R.value ? fe(R.value.definition, { breaks: !0 }) : ""), B = (e, t) => T.tr(e, t, j.value, "en"), V = (e) => T.translations(e, j.value), H = t(() => ({
|
|
88
|
+
record: k.value,
|
|
89
|
+
text: N.value,
|
|
90
|
+
language: j.value,
|
|
91
|
+
languages: L.value,
|
|
92
|
+
select: Ke,
|
|
93
|
+
dir: M.value,
|
|
94
|
+
glossary: F.value,
|
|
95
|
+
ready: P.value,
|
|
96
|
+
attribution: I.value,
|
|
97
|
+
t: C,
|
|
98
|
+
tIn: (e) => w ? w(j.value, e) : C(e),
|
|
99
|
+
tr: B,
|
|
100
|
+
translations: V
|
|
101
|
+
})), U = (e) => O.value.labelsInRecordLanguage && w ? w(j.value, e) : C(e);
|
|
102
|
+
function W(e) {
|
|
103
|
+
return ((typeof e == "function" ? e(H.value) : e) ?? []).map((e) => ({
|
|
104
|
+
...e,
|
|
105
|
+
label: e.label ? U(e.label) : ""
|
|
106
|
+
}));
|
|
107
|
+
}
|
|
108
|
+
let G = t(() => k.value ? x(W(O.value.fields), H.value) : []), K = t(() => k.value ? x(W(O.value.sections).map((e) => ({
|
|
109
|
+
render: "block",
|
|
110
|
+
...e
|
|
111
|
+
})), H.value) : []), q = t(() => O.value.shortDescriptionAfter ?? "description"), Ze = t(() => !G.value.some((e) => e.key === q.value) && K.value.some((e) => e.key === q.value)), J = t(() => O.value.shortDescription === !1 ? "" : O.value.shortDescription ?? "short_description"), Y = t(() => {
|
|
112
|
+
let e = J.value ? N.value[J.value] : "";
|
|
113
|
+
return e ? { html: fe(String(e), {
|
|
114
|
+
breaks: !0,
|
|
115
|
+
glossary: F.value
|
|
116
|
+
}) } : null;
|
|
117
|
+
}), Qe = t(() => {
|
|
118
|
+
if (!k.value) return "";
|
|
119
|
+
if (O.value.title) return O.value.title(H.value);
|
|
120
|
+
let e = N.value.name ?? k.value.internal_name ?? k.value.id;
|
|
121
|
+
return pe(String(e), { glossary: F.value });
|
|
122
|
+
}), X = t(() => k.value ? E($e(), O.value.pictureLimit, H.value) : []);
|
|
123
|
+
function $e() {
|
|
124
|
+
if (O.value.media) return O.value.media(k.value, H.value);
|
|
125
|
+
let e = b(String(N.value.name ?? k.value.internal_name ?? ""));
|
|
126
|
+
return de(k.value.images, j.value).map((t) => ({
|
|
127
|
+
url: t.url,
|
|
128
|
+
alt: t.captions?.[j.value] ?? e,
|
|
129
|
+
caption: t.captions?.[j.value] ?? "",
|
|
130
|
+
...ue(t, j.value)
|
|
131
|
+
}));
|
|
132
|
+
}
|
|
133
|
+
let et = [
|
|
134
|
+
{
|
|
135
|
+
field: "author",
|
|
136
|
+
label: "sheet.field.preparedBy"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
field: "copy_editor",
|
|
140
|
+
label: "sheet.field.copyeditedBy"
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
field: "translator",
|
|
144
|
+
label: "sheet.field.translationBy"
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
field: "translation_copy_editor",
|
|
148
|
+
label: "sheet.field.translationCopyeditedBy"
|
|
149
|
+
}
|
|
150
|
+
];
|
|
151
|
+
function tt(e) {
|
|
152
|
+
let t = O.value.creditNames ? N.value.credit_names?.[e] : null;
|
|
153
|
+
return t?.length ? se(t) : N.value[e] ?? I.value[e] ?? "";
|
|
154
|
+
}
|
|
155
|
+
function nt(e) {
|
|
156
|
+
let t = We ? N.value.credit_ids?.[e] : null;
|
|
157
|
+
if (!t?.length) return null;
|
|
158
|
+
let n = V(A), r = t.map((e) => {
|
|
159
|
+
let t = We.value.get(e);
|
|
160
|
+
if (!t) return null;
|
|
161
|
+
let r = t.name ?? "";
|
|
162
|
+
return {
|
|
163
|
+
name: j.value === "ar" && t.originalname ? t.originalname : r,
|
|
164
|
+
heading: [t.firstname, t.lastname].filter(Boolean).join(" ") || r,
|
|
165
|
+
biography: n?.[e]?.curriculum ?? ""
|
|
166
|
+
};
|
|
167
|
+
});
|
|
168
|
+
return r.every(Boolean) ? r : null;
|
|
169
|
+
}
|
|
170
|
+
let rt = t(() => (O.value.credits ?? et).map(({ field: e, label: t }) => ({
|
|
171
|
+
label: U(t),
|
|
172
|
+
value: tt(e),
|
|
173
|
+
people: nt(e)
|
|
174
|
+
})).filter((e) => e.value)), it = t(() => String(k.value?.[O.value.workingNumber ?? "mwnf_reference"] ?? ""));
|
|
175
|
+
function at(e) {
|
|
176
|
+
if (e?.permalink !== !1) return typeof e?.permalink == "string" ? e.permalink : me(Be) ?? void 0;
|
|
177
|
+
}
|
|
178
|
+
let ot = t(() => {
|
|
179
|
+
let e = O.value.citation;
|
|
180
|
+
return !k.value || typeof e?.format != "function" ? "" : e.format(H.value, {
|
|
181
|
+
permalink: at(e),
|
|
182
|
+
year: (/* @__PURE__ */ new Date()).getFullYear()
|
|
183
|
+
});
|
|
184
|
+
}), st = t(() => {
|
|
185
|
+
let e = O.value.citation;
|
|
186
|
+
if (!k.value || e === !1 || typeof e?.format == "function") return "";
|
|
187
|
+
let t = typeof e?.project == "function" ? null : e?.project ?? k.value.project_id, n = typeof e?.project == "function" ? e.project(k.value, H.value) : Re.label(t);
|
|
188
|
+
return oe({
|
|
189
|
+
author: tt("author") || void 0,
|
|
190
|
+
name: N.value.name ?? k.value.internal_name ?? "",
|
|
191
|
+
project: n,
|
|
192
|
+
permalink: at(e),
|
|
193
|
+
inWord: C("record.citation.in")
|
|
194
|
+
});
|
|
195
|
+
}), Z = be(k, {
|
|
196
|
+
entity: D,
|
|
197
|
+
language: j
|
|
198
|
+
}), Q = t(() => O.value.related === !1 ? null : O.value.related ?? {}), $ = t(() => {
|
|
199
|
+
if (!Q.value) return [];
|
|
200
|
+
let e = Q.value.record ?? ct;
|
|
201
|
+
return Z.value.inPackage.map((t) => e(t, H.value));
|
|
202
|
+
});
|
|
203
|
+
function ct({ record: e, justification: t }) {
|
|
204
|
+
let n = B(D, e.id).name ?? e.internal_name ?? e.id;
|
|
205
|
+
return {
|
|
206
|
+
id: e.id,
|
|
207
|
+
image: e.images?.[0]?.url ?? "",
|
|
208
|
+
imageAlt: b(String(n)),
|
|
209
|
+
name: pe(String(n)),
|
|
210
|
+
meta: t ? [t] : [],
|
|
211
|
+
badge: e.type ?? "",
|
|
212
|
+
to: {
|
|
213
|
+
name: O.value.route ?? (_.entity ? `${_.entity}-detail` : "item"),
|
|
214
|
+
params: { id: e.id }
|
|
215
|
+
}
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
let lt = /* @__PURE__ */ new Set([
|
|
219
|
+
"header",
|
|
220
|
+
"before-sheet",
|
|
221
|
+
"after-sheet",
|
|
222
|
+
"after-media",
|
|
223
|
+
"credits",
|
|
224
|
+
"aside",
|
|
225
|
+
"source",
|
|
226
|
+
"related",
|
|
227
|
+
"after",
|
|
228
|
+
"default"
|
|
229
|
+
]), ut = t(() => Object.keys(ze).filter((e) => !lt.has(e)));
|
|
230
|
+
return (t, f) => Ue.value && !k.value ? (d(), n(g(ae), { key: 0 })) : k.value ? (d(), i("article", {
|
|
231
|
+
key: 1,
|
|
232
|
+
class: te(["mwnf-record", { "mwnf-record--spaced": O.value.spaced }]),
|
|
233
|
+
onClick: f[0] ||= (...e) => g(z) && g(z)(...e)
|
|
234
|
+
}, [
|
|
235
|
+
m(t.$slots, "header", u(l(H.value)), () => [
|
|
236
|
+
O.value.back ? (d(), n(we, {
|
|
237
|
+
key: 0,
|
|
238
|
+
class: "mwnf-record__back",
|
|
239
|
+
to: O.value.back.to,
|
|
240
|
+
href: O.value.back.href
|
|
241
|
+
}, {
|
|
242
|
+
default: re(() => [s("← " + h(g(C)(O.value.back.label)), 1)]),
|
|
243
|
+
_: 1
|
|
244
|
+
}, 8, ["to", "href"])) : r("", !0),
|
|
245
|
+
c(Ce, {
|
|
246
|
+
languages: L.value,
|
|
247
|
+
language: g(j),
|
|
248
|
+
onSelect: g(Ke)
|
|
249
|
+
}, null, 8, [
|
|
250
|
+
"languages",
|
|
251
|
+
"language",
|
|
252
|
+
"onSelect"
|
|
253
|
+
]),
|
|
254
|
+
a("h1", {
|
|
255
|
+
class: "mwnf-record__title",
|
|
256
|
+
dir: g(M) || void 0,
|
|
257
|
+
innerHTML: Qe.value
|
|
258
|
+
}, null, 8, je)
|
|
259
|
+
]),
|
|
260
|
+
a("div", Me, [a("div", Ne, [
|
|
261
|
+
t.$slots["after-media"] ? (d(), i("div", Pe, [X.value.length ? (d(), n(S, {
|
|
262
|
+
key: 0,
|
|
263
|
+
images: X.value,
|
|
264
|
+
variant: O.value.mediaVariant ?? "",
|
|
265
|
+
"thumbs-from": O.value.mediaThumbsFrom ?? 2,
|
|
266
|
+
"credit-caption": O.value.mediaCreditCaption ?? !0
|
|
267
|
+
}, null, 8, [
|
|
268
|
+
"images",
|
|
269
|
+
"variant",
|
|
270
|
+
"thumbs-from",
|
|
271
|
+
"credit-caption"
|
|
272
|
+
])) : r("", !0), m(t.$slots, "after-media", u(l(H.value)))])) : X.value.length ? (d(), n(S, {
|
|
273
|
+
key: 1,
|
|
274
|
+
images: X.value,
|
|
275
|
+
variant: O.value.mediaVariant ?? "",
|
|
276
|
+
"thumbs-from": O.value.mediaThumbsFrom ?? 2,
|
|
277
|
+
"credit-caption": O.value.mediaCreditCaption ?? !0
|
|
278
|
+
}, null, 8, [
|
|
279
|
+
"images",
|
|
280
|
+
"variant",
|
|
281
|
+
"thumbs-from",
|
|
282
|
+
"credit-caption"
|
|
283
|
+
])) : r("", !0),
|
|
284
|
+
g(P) ? r("", !0) : (d(), i("p", Fe, h(g(C)("core.status.loading")), 1)),
|
|
285
|
+
m(t.$slots, "before-sheet", u(l(H.value))),
|
|
286
|
+
c(Oe, {
|
|
287
|
+
rows: G.value,
|
|
288
|
+
layout: O.value.layout ?? "table",
|
|
289
|
+
dir: g(M),
|
|
290
|
+
"short-description": Y.value,
|
|
291
|
+
"short-description-after": q.value,
|
|
292
|
+
"toggle-labels": O.value.shortDescriptionLabels ?? {}
|
|
293
|
+
}, o({ _: 2 }, [p(ut.value, (e) => ({
|
|
294
|
+
name: e,
|
|
295
|
+
fn: re((n) => [m(t.$slots, e, u(l({
|
|
296
|
+
...n,
|
|
297
|
+
...H.value
|
|
298
|
+
})))])
|
|
299
|
+
}))]), 1032, [
|
|
300
|
+
"rows",
|
|
301
|
+
"layout",
|
|
302
|
+
"dir",
|
|
303
|
+
"short-description",
|
|
304
|
+
"short-description-after",
|
|
305
|
+
"toggle-labels"
|
|
306
|
+
]),
|
|
307
|
+
(d(!0), i(e, null, p(K.value, (a) => (d(), i(e, { key: a.key }, [
|
|
308
|
+
c(Ee, {
|
|
309
|
+
heading: a.label,
|
|
310
|
+
html: a.html,
|
|
311
|
+
dir: g(M)
|
|
312
|
+
}, null, 8, [
|
|
313
|
+
"heading",
|
|
314
|
+
"html",
|
|
315
|
+
"dir"
|
|
316
|
+
]),
|
|
317
|
+
Y.value && Ze.value && a.key === q.value ? (d(), n(Ae, {
|
|
318
|
+
key: 0,
|
|
319
|
+
html: Y.value.html,
|
|
320
|
+
dir: g(M)
|
|
321
|
+
}, null, 8, ["html", "dir"])) : r("", !0),
|
|
322
|
+
m(t.$slots, `after-${a.key}`, ee({ ref_for: !0 }, H.value))
|
|
323
|
+
], 64))), 128)),
|
|
324
|
+
m(t.$slots, "after-sheet", u(l(H.value))),
|
|
325
|
+
m(t.$slots, "credits", u(l({
|
|
326
|
+
...H.value,
|
|
327
|
+
credits: rt.value,
|
|
328
|
+
workingNumber: it.value,
|
|
329
|
+
workingNumberLabel: U(O.value.workingNumberLabel ?? "sheet.field.workingNumber"),
|
|
330
|
+
citation: st.value,
|
|
331
|
+
citationHtml: ot.value
|
|
332
|
+
})), () => [c(Se, {
|
|
333
|
+
credits: rt.value,
|
|
334
|
+
"working-number": it.value,
|
|
335
|
+
"working-number-label": U(O.value.workingNumberLabel ?? "sheet.field.workingNumber"),
|
|
336
|
+
citation: st.value,
|
|
337
|
+
"citation-html": ot.value,
|
|
338
|
+
"citation-heading": O.value.citation?.heading ? U(O.value.citation.heading) : ""
|
|
339
|
+
}, null, 8, [
|
|
340
|
+
"credits",
|
|
341
|
+
"working-number",
|
|
342
|
+
"working-number-label",
|
|
343
|
+
"citation",
|
|
344
|
+
"citation-html",
|
|
345
|
+
"citation-heading"
|
|
346
|
+
])]),
|
|
347
|
+
m(t.$slots, "source", u(l(H.value)), () => [O.value.sourceCredit === !1 ? r("", !0) : (d(), n(Te, { key: 0 }))]),
|
|
348
|
+
m(t.$slots, "related", u(l({
|
|
349
|
+
...H.value,
|
|
350
|
+
records: $.value,
|
|
351
|
+
outside: g(Z).outside
|
|
352
|
+
})), () => [Q.value && Q.value.inline !== !1 ? (d(), n(De, {
|
|
353
|
+
key: 0,
|
|
354
|
+
heading: g(C)(Q.value.heading ?? "record.related.items"),
|
|
355
|
+
records: $.value,
|
|
356
|
+
variant: Q.value.variant ?? "list",
|
|
357
|
+
"action-label": Q.value.actionLabel ? g(C)(Q.value.actionLabel) : ""
|
|
358
|
+
}, null, 8, [
|
|
359
|
+
"heading",
|
|
360
|
+
"records",
|
|
361
|
+
"variant",
|
|
362
|
+
"action-label"
|
|
363
|
+
])) : r("", !0)])
|
|
364
|
+
]), t.$slots.aside ? (d(), i("aside", Ie, [m(t.$slots, "aside", u(l({
|
|
365
|
+
...H.value,
|
|
366
|
+
records: $.value,
|
|
367
|
+
outside: g(Z).outside
|
|
368
|
+
})))])) : r("", !0)]),
|
|
369
|
+
m(t.$slots, "after", u(l(H.value))),
|
|
370
|
+
c(xe, {
|
|
371
|
+
term: g(R),
|
|
372
|
+
html: Xe.value,
|
|
373
|
+
dir: g(M),
|
|
374
|
+
onClose: g(Ye)
|
|
375
|
+
}, null, 8, [
|
|
376
|
+
"term",
|
|
377
|
+
"html",
|
|
378
|
+
"dir",
|
|
379
|
+
"onClose"
|
|
380
|
+
])
|
|
381
|
+
], 2)) : (d(), i("p", Le, h(g(C)("core.status.loading")), 1));
|
|
382
|
+
}
|
|
383
|
+
};
|
|
384
|
+
export { E as n, Re as t };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { computed as e, createBlock as t, createSlots as n, mergeProps as r, openBlock as i, renderSlot as a, useAttrs as o, withCtx as s } from "vue";
|
|
2
|
+
import { mwnfLinks as c, useI18n as l, useSection as u, useSiteConfig as d, useSiteRights as f } from "@museumwnf/viewer-core";
|
|
3
|
+
import { useRouter as p } from "vue-router";
|
|
4
|
+
import { t as m } from "./PageShell-BAtk_qcb.js";
|
|
5
|
+
import { r as h } from "./chrome-Bv_mLlHM.js";
|
|
6
6
|
// src/components/SiteShell.vue
|
|
7
7
|
var g = /*@__PURE__*/ Object.assign({ inheritAttrs: !1 }, {
|
|
8
8
|
__name: "SiteShell",
|
|
@@ -17,36 +17,36 @@ var g = /*@__PURE__*/ Object.assign({ inheritAttrs: !1 }, {
|
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
19
|
setup(g) {
|
|
20
|
-
let _ = g, { t: v, locale: y } =
|
|
20
|
+
let _ = g, { t: v, locale: y } = l(), b = p(), x = u(), S = d(), C = e(() => ({
|
|
21
21
|
...S,
|
|
22
22
|
..._.config ?? {}
|
|
23
|
-
})), w =
|
|
23
|
+
})), w = e(() => C.value.navigation ?? {}), T = e(() => C.value.logos ?? null), E = e(() => C.value.banner ?? null), D = o(), O = [
|
|
24
24
|
{
|
|
25
25
|
label: "core.footer.aboutMwnf",
|
|
26
|
-
href:
|
|
26
|
+
href: c.about,
|
|
27
27
|
external: !0
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
30
|
label: "core.footer.contact",
|
|
31
|
-
href:
|
|
31
|
+
href: c.contact,
|
|
32
32
|
external: !0
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
35
|
label: "core.footer.legalNotice",
|
|
36
|
-
href:
|
|
36
|
+
href: c.legalNotice,
|
|
37
37
|
external: !0
|
|
38
38
|
},
|
|
39
39
|
{
|
|
40
40
|
label: "core.footer.credits",
|
|
41
|
-
href:
|
|
41
|
+
href: c.credits,
|
|
42
42
|
external: !0
|
|
43
43
|
},
|
|
44
44
|
{
|
|
45
45
|
label: "core.footer.cookies",
|
|
46
|
-
href:
|
|
46
|
+
href: c.cookies,
|
|
47
47
|
external: !0
|
|
48
48
|
}
|
|
49
|
-
], k = (/* @__PURE__ */ new Date()).getFullYear(), A =
|
|
49
|
+
], k = (/* @__PURE__ */ new Date()).getFullYear(), A = e(() => D.footerText === void 0 && D["footer-text"] === void 0 ? `${v("core.footer.copyright")} 2004–${k}` : null), j = f(), M = e(() => C.value.footer?.rightsHolder !== !0 || !j.holder ? null : {
|
|
50
50
|
label: v("record.source.rightsHolder"),
|
|
51
51
|
text: j.attribution ?? j.holder,
|
|
52
52
|
termsHref: j.termsUrl,
|
|
@@ -71,7 +71,7 @@ var g = /*@__PURE__*/ Object.assign({ inheritAttrs: !1 }, {
|
|
|
71
71
|
let r = typeof e.children == "function" ? e.children() : e.children;
|
|
72
72
|
return Array.isArray(r) && r.length && (n.children = r.filter(P).map((e) => F(e))), n;
|
|
73
73
|
}
|
|
74
|
-
let I =
|
|
74
|
+
let I = e(() => Array.isArray(w.value.links) ? w.value.links.filter(P).map((e) => F(e, { active: !0 })) : null), L = e(() => Array.isArray(w.value.headerLinks) ? w.value.headerLinks.map((e) => F(e)) : null), R = e(() => (Array.isArray(w.value.footerLinks) ? w.value.footerLinks : O).map((e) => F(e))), z = e(() => {
|
|
75
75
|
let e = w.value.search;
|
|
76
76
|
return e ? {
|
|
77
77
|
placeholder: e.placeholder ? v(e.placeholder) : "",
|
|
@@ -93,7 +93,7 @@ var g = /*@__PURE__*/ Object.assign({ inheritAttrs: !1 }, {
|
|
|
93
93
|
route: b.currentRoute.value
|
|
94
94
|
}) : typeof e == "string" ? v(e) : e;
|
|
95
95
|
}
|
|
96
|
-
let H =
|
|
96
|
+
let H = e(() => {
|
|
97
97
|
let e = E.value ? V(E.value.title) : "";
|
|
98
98
|
if (e) return e;
|
|
99
99
|
let t = w.value.sectionTitles?.[x.value];
|
|
@@ -108,7 +108,7 @@ var g = /*@__PURE__*/ Object.assign({ inheritAttrs: !1 }, {
|
|
|
108
108
|
"headline",
|
|
109
109
|
"enter",
|
|
110
110
|
"strapline"
|
|
111
|
-
], W =
|
|
111
|
+
], W = e(() => {
|
|
112
112
|
let e = {};
|
|
113
113
|
H.value && (e.bannerTitle = H.value);
|
|
114
114
|
for (let t of U) {
|
|
@@ -116,77 +116,77 @@ var g = /*@__PURE__*/ Object.assign({ inheritAttrs: !1 }, {
|
|
|
116
116
|
n && (e[`banner${t[0].toUpperCase()}${t.slice(1)}`] = n);
|
|
117
117
|
}
|
|
118
118
|
return e;
|
|
119
|
-
}), G =
|
|
120
|
-
let e = C.value.brand,
|
|
121
|
-
return
|
|
122
|
-
src:
|
|
119
|
+
}), G = e(() => {
|
|
120
|
+
let e = C.value.brand, t = e ? h(C.value.chrome, e.logo) : null;
|
|
121
|
+
return t ? {
|
|
122
|
+
src: t,
|
|
123
123
|
alt: e.alt ? v(e.alt) : ""
|
|
124
124
|
} : null;
|
|
125
|
-
}), K =
|
|
125
|
+
}), K = e(() => {
|
|
126
126
|
let e = w.value.placement;
|
|
127
127
|
return typeof e == "function" ? e({
|
|
128
128
|
section: x.value,
|
|
129
129
|
locale: y.value
|
|
130
130
|
}) : e;
|
|
131
|
-
}), q =
|
|
131
|
+
}), q = e(() => Array.isArray(w.value.socialLinks) ? w.value.socialLinks : null), J = e(() => {
|
|
132
132
|
let e = T.value?.header;
|
|
133
133
|
return typeof e == "function" ? _.logos.filter(e) : null;
|
|
134
|
-
}), Y =
|
|
134
|
+
}), Y = e(() => {
|
|
135
135
|
let e = T.value?.headerTitle;
|
|
136
136
|
return e && J.value?.length ? v(e) : "";
|
|
137
|
-
}), X =
|
|
137
|
+
}), X = e(() => {
|
|
138
138
|
let e = T.value?.sponsorGroups;
|
|
139
139
|
return typeof e == "function" ? e(_.logos, v) : null;
|
|
140
|
-
}), Z =
|
|
140
|
+
}), Z = e(() => {
|
|
141
141
|
let e = { ...W.value };
|
|
142
142
|
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;
|
|
143
143
|
});
|
|
144
|
-
return (
|
|
145
|
-
...
|
|
144
|
+
return (e, o) => (i(), t(m, r({
|
|
145
|
+
...e.$attrs,
|
|
146
146
|
...Z.value
|
|
147
|
-
}, { onSearch: B }),
|
|
148
|
-
|
|
147
|
+
}, { onSearch: B }), n({ _: 2 }, [
|
|
148
|
+
e.$slots.header ? {
|
|
149
149
|
name: "header",
|
|
150
|
-
fn:
|
|
150
|
+
fn: s(() => [a(e.$slots, "header")]),
|
|
151
151
|
key: "0"
|
|
152
152
|
} : void 0,
|
|
153
|
-
|
|
153
|
+
e.$slots.brand ? {
|
|
154
154
|
name: "header-brand",
|
|
155
|
-
fn:
|
|
155
|
+
fn: s(() => [a(e.$slots, "brand")]),
|
|
156
156
|
key: "1"
|
|
157
157
|
} : void 0,
|
|
158
|
-
|
|
158
|
+
e.$slots.banner ? {
|
|
159
159
|
name: "banner",
|
|
160
|
-
fn:
|
|
160
|
+
fn: s(() => [a(e.$slots, "banner")]),
|
|
161
161
|
key: "2"
|
|
162
162
|
} : void 0,
|
|
163
|
-
|
|
163
|
+
e.$slots.navigation ? {
|
|
164
164
|
name: "navigation",
|
|
165
|
-
fn:
|
|
165
|
+
fn: s(() => [a(e.$slots, "navigation")]),
|
|
166
166
|
key: "3"
|
|
167
167
|
} : void 0,
|
|
168
|
-
|
|
168
|
+
e.$slots.default || e.$slots.notice || e.$slots["after-content"] ? {
|
|
169
169
|
name: "default",
|
|
170
|
-
fn:
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
170
|
+
fn: s(() => [
|
|
171
|
+
a(e.$slots, "notice"),
|
|
172
|
+
a(e.$slots, "default"),
|
|
173
|
+
a(e.$slots, "after-content")
|
|
174
174
|
]),
|
|
175
175
|
key: "4"
|
|
176
176
|
} : void 0,
|
|
177
|
-
|
|
177
|
+
e.$slots.hyperlinks ? {
|
|
178
178
|
name: "hyperlinks",
|
|
179
|
-
fn:
|
|
179
|
+
fn: s(() => [a(e.$slots, "hyperlinks")]),
|
|
180
180
|
key: "5"
|
|
181
181
|
} : void 0,
|
|
182
|
-
|
|
182
|
+
e.$slots.sponsors ? {
|
|
183
183
|
name: "sponsors",
|
|
184
|
-
fn:
|
|
184
|
+
fn: s(() => [a(e.$slots, "sponsors")]),
|
|
185
185
|
key: "6"
|
|
186
186
|
} : void 0,
|
|
187
|
-
|
|
187
|
+
e.$slots.footer ? {
|
|
188
188
|
name: "footer",
|
|
189
|
-
fn:
|
|
189
|
+
fn: s(() => [a(e.$slots, "footer")]),
|
|
190
190
|
key: "7"
|
|
191
191
|
} : void 0
|
|
192
192
|
]), 1040));
|