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