@museumwnf/viewer-layout 2.14.0 → 2.15.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.
@@ -1,452 +0,0 @@
1
- import { S as e } from "./TimelineLookup-D8qr1tmY.js";
2
- import { Fragment as t, computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createTextVNode as s, normalizeClass as c, normalizeStyle as l, onBeforeUnmount as u, onMounted as d, openBlock as f, ref as p, renderList as m, toDisplayString as h, unref as g, vModelCheckbox as _, vShow as v, watch as y, withCtx as b, withDirectives as x } from "vue";
3
- import { renderBlock as S, renderInline as C, useI18n as w } from "@museumwnf/viewer-core";
4
- import { useRouter as T } from "vue-router";
5
- //#region src/content/PartnerMap.vue
6
- var E = {
7
- key: 0,
8
- class: "mwnf-partner-map"
9
- }, D = { class: "mwnf-partner-map__title" }, O = ["src", "title"], ee = { class: "mwnf-partner-map__link" }, te = ["href"], k = {
10
- __name: "PartnerMap",
11
- props: {
12
- latitude: {
13
- type: Number,
14
- default: null
15
- },
16
- longitude: {
17
- type: Number,
18
- default: null
19
- },
20
- zoom: {
21
- type: Number,
22
- default: 15
23
- },
24
- mapTitleEntry: {
25
- type: String,
26
- default: "partner.map.map"
27
- },
28
- mapOfEntry: {
29
- type: String,
30
- default: "partner.map.mapOf"
31
- },
32
- openMapLinkEntry: {
33
- type: String,
34
- default: "partner.map.openInOpenStreetMap"
35
- },
36
- label: {
37
- type: String,
38
- default: ""
39
- }
40
- },
41
- setup(e) {
42
- let t = e, r = n(() => Number.isFinite(t.latitude) && Number.isFinite(t.longitude)), s = n(() => {
43
- let e = 360 / 2 ** Math.max(1, Math.min(19, t.zoom || 15)), [n, r] = [t.latitude, t.longitude];
44
- return [
45
- r - e,
46
- n - e / 2,
47
- r + e,
48
- n + e / 2
49
- ].join("%2C");
50
- }), c = n(() => `https://www.openstreetmap.org/export/embed.html?bbox=${s.value}&layer=mapnik&marker=${t.latitude}%2C${t.longitude}`), l = n(() => `https://www.openstreetmap.org/?mlat=${t.latitude}&mlon=${t.longitude}#map=${t.zoom || 15}/${t.latitude}/${t.longitude}`);
51
- return (t, n) => r.value ? (f(), a("div", E, [
52
- o("p", D, h(t.$t(e.mapTitleEntry)), 1),
53
- o("iframe", {
54
- src: c.value,
55
- title: e.label ? t.$t(e.mapOfEntry, { label: e.label }) : t.$t(e.mapTitleEntry),
56
- loading: "lazy",
57
- referrerpolicy: "no-referrer",
58
- class: "mwnf-partner-map__embed"
59
- }, null, 8, O),
60
- o("p", ee, [o("a", {
61
- href: l.value,
62
- target: "_blank",
63
- rel: "noopener"
64
- }, "↗ " + h(t.$t(e.openMapLinkEntry)), 9, te)])
65
- ])) : i("", !0);
66
- }
67
- }, A = {
68
- key: 0,
69
- class: "mwnf-featured-partners"
70
- }, j = { class: "mwnf-featured-partners__heading" }, M = { class: "mwnf-featured-partners__carousel" }, N = {
71
- key: 0,
72
- class: "mwnf-featured-partners__image"
73
- }, P = ["src", "alt"], F = { class: "mwnf-featured-partners__body" }, I = { class: "mwnf-featured-partners__name" }, L = { class: "mwnf-featured-partners__location" }, R = { key: 0 }, z = { class: "mwnf-featured-partners__description" }, B = {
74
- key: 0,
75
- class: "mwnf-featured-partners__controls"
76
- }, V = ["aria-label", "onClick"], H = 8e3, U = {
77
- __name: "FeaturedPartners",
78
- props: {
79
- records: {
80
- type: Array,
81
- default: () => []
82
- },
83
- headingEntry: {
84
- type: String,
85
- default: "partner.featured"
86
- }
87
- },
88
- setup(n) {
89
- let l = n, g = p(0), _ = null;
90
- function y(e) {
91
- g.value = e, S();
92
- }
93
- function S() {
94
- _ && clearInterval(_), l.records.length > 0 && (_ = setInterval(() => {
95
- g.value = (g.value + 1) % l.records.length;
96
- }, H));
97
- }
98
- return d(S), u(() => _ && clearInterval(_)), (l, u) => n.records.length ? (f(), a("section", A, [
99
- o("h2", j, h(l.$t(n.headingEntry)), 1),
100
- o("div", M, [(f(!0), a(t, null, m(n.records, (t, n) => x((f(), r(e, {
101
- key: t.id,
102
- to: t.route,
103
- class: "mwnf-featured-partners__card"
104
- }, {
105
- default: b(() => [t.logo ? (f(), a("span", N, [o("img", {
106
- src: t.logo,
107
- alt: t.name,
108
- class: "mwnf-featured-partners__logo"
109
- }, null, 8, P)])) : i("", !0), o("span", F, [
110
- o("span", I, h(t.name), 1),
111
- o("span", L, [t.city ? (f(), a("span", R, h(t.city) + ", ", 1)) : i("", !0), s(h(t.country), 1)]),
112
- o("span", z, h(t.description), 1)
113
- ])]),
114
- _: 2
115
- }, 1032, ["to"])), [[v, n === g.value]])), 128))]),
116
- n.records.length > 1 ? (f(), a("div", B, [(f(!0), a(t, null, m(n.records, (e, t) => (f(), a("button", {
117
- key: e.id,
118
- class: c(["mwnf-featured-partners__bullet", { "mwnf-featured-partners__bullet--active": t === g.value }]),
119
- "aria-label": `${l.$t("core.action.show")} ${e.name}`,
120
- onClick: (e) => y(t)
121
- }, null, 10, V))), 128))])) : i("", !0)
122
- ])) : i("", !0);
123
- }
124
- }, W = { class: "mwnf-sibling-galleries" }, G = {
125
- key: 0,
126
- class: "mwnf-sibling-galleries__galleries"
127
- }, K = { class: "mwnf-sibling-galleries__header" }, q = { class: "mwnf-sibling-galleries__heading" }, J = ["href"], Y = { class: "mwnf-sibling-galleries__grid" }, X = {
128
- key: 0,
129
- class: "mwnf-sibling-galleries__image"
130
- }, Z = ["src", "alt"], Q = {
131
- key: 1,
132
- class: "mwnf-sibling-galleries__image mwnf-sibling-galleries__image--empty"
133
- }, ne = { class: "mwnf-sibling-galleries__name" }, re = {
134
- key: 1,
135
- class: "mwnf-sibling-galleries__museums"
136
- }, ie = { class: "mwnf-sibling-galleries__heading" }, ae = { class: "mwnf-sibling-galleries__museums-grid" }, oe = ["href"], se = { class: "mwnf-sibling-galleries__museum-image" }, ce = { class: "mwnf-sibling-galleries__museum-name" }, le = {
137
- __name: "SiblingGalleries",
138
- props: {
139
- galleries: {
140
- type: Array,
141
- default: () => []
142
- },
143
- museums: {
144
- type: Array,
145
- default: () => []
146
- },
147
- galleriesHeadingEntry: {
148
- type: String,
149
- default: "sibling.galleries"
150
- },
151
- seeMoreGalleriesEntry: {
152
- type: String,
153
- default: "sibling.seeMoreGalleries"
154
- },
155
- seeMoreGalleriesHref: {
156
- type: String,
157
- default: ""
158
- },
159
- museumsHeadingEntry: {
160
- type: String,
161
- default: "sibling.otherVirtualMuseums"
162
- }
163
- },
164
- setup(n) {
165
- return (s, u) => (f(), a("section", W, [n.galleries.length ? (f(), a("div", G, [o("div", K, [o("p", q, h(s.$t(n.galleriesHeadingEntry)), 1), n.seeMoreGalleriesHref ? (f(), a("a", {
166
- key: 0,
167
- href: n.seeMoreGalleriesHref,
168
- target: "_blank",
169
- rel: "noopener",
170
- class: "mwnf-sibling-galleries__see-more"
171
- }, h(s.$t(n.seeMoreGalleriesEntry)) + " » ", 9, J)) : i("", !0)]), o("div", Y, [(f(!0), a(t, null, m(n.galleries, (t) => (f(), r(e, {
172
- key: t.id,
173
- to: t.route,
174
- class: c(["mwnf-sibling-galleries__gallery", { "mwnf-sibling-galleries__gallery--no-link": !t.route }])
175
- }, {
176
- default: b(() => [t.image ? (f(), a("span", X, [o("img", {
177
- src: t.image,
178
- alt: t.name
179
- }, null, 8, Z)])) : (f(), a("span", Q)), o("p", ne, h(t.name), 1)]),
180
- _: 2
181
- }, 1032, ["to", "class"]))), 128))])])) : i("", !0), n.museums.length ? (f(), a("div", re, [o("div", ie, h(s.$t(n.museumsHeadingEntry)), 1), o("div", ae, [(f(!0), a(t, null, m(n.museums, (e) => (f(), a("a", {
182
- key: e.name,
183
- href: e.href || e.to,
184
- target: "_blank",
185
- rel: "noopener",
186
- class: "mwnf-sibling-galleries__museum",
187
- style: l({
188
- "--mwnf-museum-bg": e.accent || "var(--mwnf-color-border)",
189
- "--mwnf-museum-text": e.textColor || "inherit"
190
- })
191
- }, [o("div", se, h(e.name.split(" ").map((e) => e[0]).join("")), 1), o("p", ce, h(e.name), 1)], 12, oe))), 128))])])) : i("", !0)]));
192
- }
193
- }, ue = {
194
- key: 0,
195
- class: "mwnf-popup-logo"
196
- }, de = ["aria-label"], fe = ["innerHTML"], pe = ["innerHTML"], me = {
197
- __name: "PopupLogo",
198
- props: {
199
- content: {
200
- type: String,
201
- default: ""
202
- },
203
- rawHtml: {
204
- type: Boolean,
205
- default: !1
206
- },
207
- enabled: {
208
- type: Boolean,
209
- default: !0
210
- },
211
- closeLabel: {
212
- type: String,
213
- default: "core.action.close"
214
- }
215
- },
216
- setup(e) {
217
- let t = e, r = p(!1), s = n(() => t.rawHtml ? t.content : C(t.content)), c = n(() => t.enabled && !!t.content && !r.value);
218
- return (t, n) => c.value ? (f(), a("div", ue, [o("button", {
219
- class: "mwnf-popup-logo__close",
220
- "aria-label": t.$t(e.closeLabel),
221
- onClick: n[0] ||= (e) => r.value = !0
222
- }, "✕", 8, de), e.rawHtml ? (f(), a("div", {
223
- key: 0,
224
- class: "mwnf-popup-logo__content",
225
- innerHTML: s.value
226
- }, null, 8, fe)) : (f(), a("div", {
227
- key: 1,
228
- class: "mwnf-popup-logo__content",
229
- innerHTML: s.value
230
- }, null, 8, pe))])) : i("", !0);
231
- }
232
- }, he = { class: "mwnf-back-link" }, ge = {
233
- __name: "BackLink",
234
- props: {
235
- label: {
236
- type: String,
237
- default: "core.action.back"
238
- },
239
- to: {
240
- type: [String, Object],
241
- default: null
242
- },
243
- href: {
244
- type: String,
245
- default: ""
246
- }
247
- },
248
- setup(t) {
249
- let n = T();
250
- function i() {
251
- return window.history.length > 1;
252
- }
253
- function o(e) {
254
- i() && (e.preventDefault(), n.back());
255
- }
256
- return (n, c) => (f(), a("div", he, [!i() && (t.to || t.href) ? (f(), r(e, {
257
- key: 0,
258
- to: t.to,
259
- href: t.href,
260
- class: "mwnf-back-link__button"
261
- }, {
262
- default: b(() => [s(" ↩ " + h(n.$t(t.label)), 1)]),
263
- _: 1
264
- }, 8, ["to", "href"])) : (f(), a("button", {
265
- key: 1,
266
- class: "mwnf-back-link__button",
267
- onClick: o
268
- }, " ↩ " + h(n.$t(t.label)), 1))]));
269
- }
270
- }, _e = { class: "mwnf-picture-gallery" }, ve = {
271
- key: 0,
272
- class: "mwnf-picture-gallery__selected"
273
- }, ye = { class: "mwnf-picture-gallery__image" }, be = ["src", "alt"], xe = { class: "mwnf-picture-gallery__details" }, Se = { class: "mwnf-picture-gallery__detail mwnf-picture-gallery__detail--title" }, Ce = { key: 0 }, we = ["innerHTML"], Te = {
274
- key: 0,
275
- class: "mwnf-picture-gallery__label"
276
- }, Ee = ["innerHTML"], De = {
277
- key: 0,
278
- class: "mwnf-picture-gallery__detail"
279
- }, Oe = {
280
- key: 2,
281
- class: "mwnf-picture-gallery__unresolved"
282
- }, ke = {
283
- key: 1,
284
- class: "mwnf-picture-gallery__empty"
285
- }, Ae = {
286
- key: 2,
287
- class: "mwnf-picture-gallery__strip"
288
- }, je = { class: "mwnf-picture-gallery__thumbs" }, Me = ["onClick"], Ne = ["src", "alt"], Pe = { class: "mwnf-picture-gallery__thumb-text" }, Fe = { key: 0 }, Ie = ["innerHTML"], Le = { key: 1 }, Re = {
289
- key: 0,
290
- class: "mwnf-picture-gallery__toggle"
291
- }, ze = {
292
- __name: "PictureGallery",
293
- props: {
294
- pictures: {
295
- type: Array,
296
- default: () => []
297
- },
298
- selectedId: {
299
- type: [String, Number],
300
- default: null
301
- },
302
- seeItemEntry: {
303
- type: String,
304
- default: "exhibition.theme.seeItemEntry"
305
- },
306
- unresolvedEntry: {
307
- type: String,
308
- default: "exhibition.theme.recordNotInSite"
309
- },
310
- emptyEntry: {
311
- type: String,
312
- default: "exhibition.theme.additionalContent"
313
- },
314
- addRelatedEntry: {
315
- type: String,
316
- default: "exhibition.theme.addRelatedWorks"
317
- },
318
- hideRelatedEntry: {
319
- type: String,
320
- default: "exhibition.theme.hideRelatedWorks"
321
- }
322
- },
323
- emits: ["update:selectedId"],
324
- setup(l, { emit: u }) {
325
- let d = l, v = u, { t: S } = w(), C = n(() => d.pictures.find((e) => e.id === d.selectedId) ?? null), T = n(() => d.pictures.some((e) => e.backRelated?.length)), E = p(!1);
326
- y(() => d.pictures, () => {
327
- E.value = !1;
328
- });
329
- let D = n(() => E.value ? d.pictures : d.pictures.filter((e) => !e.backRelated?.length));
330
- function O(e) {
331
- v("update:selectedId", e.id);
332
- }
333
- return (n, u) => (f(), a("div", _e, [C.value ? (f(), a("div", ve, [o("div", ye, [o("img", {
334
- src: C.value.image,
335
- alt: C.value.imageAlt ?? ""
336
- }, null, 8, be)]), o("div", xe, [
337
- o("div", Se, [C.value.imageCaption ? (f(), a("span", Ce, h(C.value.imageCaption) + ", ", 1)) : i("", !0), o("span", { innerHTML: C.value.name }, null, 8, we)]),
338
- (f(!0), a(t, null, m(C.value.fields ?? [], (e, t) => (f(), a("div", {
339
- key: t,
340
- class: "mwnf-picture-gallery__detail"
341
- }, [e.label ? (f(), a("span", Te, h(e.label), 1)) : i("", !0), o("span", { innerHTML: e.value }, null, 8, Ee)]))), 128)),
342
- C.value.detail ? (f(), a("div", De, h(C.value.detail), 1)) : i("", !0),
343
- C.value.to ? (f(), r(e, {
344
- key: 1,
345
- class: "mwnf-picture-gallery__link",
346
- to: C.value.to
347
- }, {
348
- default: b(() => [s(h(g(S)(l.seeItemEntry)) + " →", 1)]),
349
- _: 1
350
- }, 8, ["to"])) : (f(), a("div", Oe, h(g(S)(l.unresolvedEntry)), 1))
351
- ])])) : (f(), a("div", ke, h(g(S)(l.emptyEntry)), 1)), l.pictures.length ? (f(), a("div", Ae, [o("ul", je, [(f(!0), a(t, null, m(D.value, (e) => (f(), a("li", {
352
- key: e.id,
353
- class: c(["mwnf-picture-gallery__thumb", {
354
- "mwnf-picture-gallery__thumb--active": e.id === l.selectedId,
355
- "mwnf-picture-gallery__thumb--related": e.backRelated?.length
356
- }])
357
- }, [o("button", {
358
- type: "button",
359
- onClick: (t) => O(e)
360
- }, [o("img", {
361
- src: e.image,
362
- alt: e.imageAlt ?? "",
363
- loading: "lazy"
364
- }, null, 8, Ne)], 8, Me), o("div", Pe, [
365
- e.imageCaption ? (f(), a("span", Fe, h(e.imageCaption) + ", ", 1)) : i("", !0),
366
- o("span", {
367
- class: "mwnf-picture-gallery__thumb-name",
368
- innerHTML: e.name
369
- }, null, 8, Ie),
370
- e.detail ? (f(), a("span", Le, ", " + h(e.detail), 1)) : i("", !0)
371
- ])], 2))), 128))]), T.value ? (f(), a("label", Re, [x(o("input", {
372
- "onUpdate:modelValue": u[0] ||= (e) => E.value = e,
373
- type: "checkbox"
374
- }, null, 512), [[_, E.value]]), o("span", null, h(E.value ? g(S)(l.hideRelatedEntry) : g(S)(l.addRelatedEntry)), 1)])) : i("", !0)])) : i("", !0)]));
375
- }
376
- }, Be = {
377
- key: 0,
378
- class: "mwnf-picture-narrative"
379
- }, Ve = ["innerHTML"], He = {
380
- key: 1,
381
- class: "mwnf-picture-narrative__related"
382
- }, Ue = { class: "mwnf-picture-narrative__heading" }, We = { class: "mwnf-picture-narrative__images" }, Ge = { class: "mwnf-picture-narrative__image mwnf-picture-narrative__image--main" }, Ke = ["src", "alt"], qe = { class: "mwnf-picture-narrative__thumb-text" }, Je = ["innerHTML"], $ = { key: 0 }, Ye = ["onClick"], Xe = ["src", "alt"], Ze = { class: "mwnf-picture-narrative__thumb-text" }, Qe = ["innerHTML"], $e = { key: 0 }, et = {
383
- key: 0,
384
- class: "mwnf-picture-narrative__relation"
385
- }, tt = {
386
- key: 2,
387
- class: "mwnf-picture-narrative__related"
388
- }, nt = { class: "mwnf-picture-narrative__heading" }, rt = { class: "mwnf-picture-narrative__text mwnf-picture-narrative__text--reciprocal" }, it = { class: "mwnf-picture-narrative__image" }, at = ["src", "alt"], ot = { class: "mwnf-picture-narrative__thumb-text" }, st = ["innerHTML"], ct = { key: 0 }, lt = {
389
- __name: "PictureNarrative",
390
- props: {
391
- picture: {
392
- type: Object,
393
- default: null
394
- },
395
- contextualDescription: {
396
- type: String,
397
- default: ""
398
- },
399
- relatedHeadingEntry: {
400
- type: String,
401
- default: "exhibition.related.items"
402
- },
403
- reciprocalFallbackEntry: {
404
- type: String,
405
- default: "exhibition.related.reciprocal"
406
- }
407
- },
408
- emits: ["select"],
409
- setup(e, { emit: r }) {
410
- let s = e, c = r, { t: l } = w(), u = n(() => s.contextualDescription ? S(s.contextualDescription, { breaks: !0 }) : ""), d = n(() => s.picture?.related ?? []), p = n(() => s.picture?.backRelated?.[0] ?? null);
411
- function _(e) {
412
- c("select", e.id);
413
- }
414
- return (n, r) => e.picture ? (f(), a("div", Be, [
415
- u.value ? (f(), a("div", {
416
- key: 0,
417
- class: "mwnf-picture-narrative__text mwnf-sheet__block",
418
- innerHTML: u.value
419
- }, null, 8, Ve)) : i("", !0),
420
- d.value.length ? (f(), a("div", He, [o("div", Ue, h(g(l)(e.relatedHeadingEntry)), 1), o("div", We, [o("div", Ge, [o("img", {
421
- src: e.picture.image,
422
- alt: e.picture.imageAlt ?? ""
423
- }, null, 8, Ke), o("div", qe, [o("span", { innerHTML: e.picture.name }, null, 8, Je), e.picture.detail ? (f(), a("span", $, ", " + h(e.picture.detail), 1)) : i("", !0)])]), (f(!0), a(t, null, m(d.value, (e) => (f(), a("div", {
424
- key: e.picture.id,
425
- class: "mwnf-picture-narrative__image"
426
- }, [
427
- o("button", {
428
- type: "button",
429
- onClick: (t) => _(e.picture)
430
- }, [o("img", {
431
- src: e.picture.image,
432
- alt: e.picture.imageAlt ?? ""
433
- }, null, 8, Xe)], 8, Ye),
434
- o("div", Ze, [o("span", { innerHTML: e.picture.name }, null, 8, Qe), e.picture.detail ? (f(), a("span", $e, ", " + h(e.picture.detail), 1)) : i("", !0)]),
435
- e.text ? (f(), a("div", et, h(e.text), 1)) : i("", !0)
436
- ]))), 128))])])) : i("", !0),
437
- p.value ? (f(), a("div", tt, [
438
- o("div", nt, h(g(l)(e.relatedHeadingEntry)), 1),
439
- o("p", rt, h(p.value.reciprocalText || g(l)(e.reciprocalFallbackEntry)), 1),
440
- o("div", it, [o("button", {
441
- type: "button",
442
- onClick: r[0] ||= (e) => _(p.value.picture)
443
- }, [o("img", {
444
- src: p.value.picture.image,
445
- alt: p.value.picture.imageAlt ?? ""
446
- }, null, 8, at)]), o("div", ot, [o("span", { innerHTML: p.value.picture.name }, null, 8, st), p.value.picture.detail ? (f(), a("span", ct, ", " + h(p.value.picture.detail), 1)) : i("", !0)])])
447
- ])) : i("", !0)
448
- ])) : i("", !0);
449
- }
450
- };
451
- //#endregion
452
- export { le as a, me as i, ze as n, U as o, ge as r, k as s, lt as t };