@museumwnf/viewer-layout 2.18.0 → 3.1.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/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { a as e, c as t, i as n, n as r, o as i, r as a, s as o, t as s } from "./PageShell-CbJ9lQoQ.js";
2
- import { t as c } from "./FeaturedRecord-mRyLN7Mt.js";
3
- import { C as l, S as u, _ as d, a as f, b as p, c as m, d as h, f as g, g as _, h as v, i as y, l as b, m as x, n as S, o as C, p as w, r as T, s as E, t as D, u as O, v as k, w as A, x as j, y as M } from "./OnDisplayIn-D6r_KvpI.js";
4
- import { a as N, i as P, n as F, o as I, r as L, t as R } from "./PictureNarrative-B_GPQvYP.js";
5
- import { t as z } from "./content-CHXh6D_q.js";
6
- export { o as AppBanner, e as AppContent, r as AppFooter, t as AppHeader, n as AppHyperlinks, i as AppNavigation, a as AppSponsors, I as BackLink, f as DynastyList, C as DynastyPopout, p as FacetSelect, N as FeaturedPartners, c as FeaturedRecord, M as FilterPanel, O as GlossaryPopover, E as GlossaryTool, h as MediaGallery, D as OnDisplayIn, s as PageShell, j as Pagination, b as PartnerMap, m as PartnerPanel, F as PictureGallery, R as PictureNarrative, L as PopupLogo, x as RecordCredits, u as RecordGrid, d as RecordLanguages, l as RecordList, _ as RecordSheet, S as RelatedMedia, g as RelatedRecords, k as ResultsSummary, A as SectionCards, v as SheetSection, P as SiblingGalleries, w as SourceCredit, z as SpecialFeatures, y as TimelineEventList, T as TimelineLookup };
2
+ import { t as c } from "./FeaturedRecord-Dw6uf3ax.js";
3
+ import { _ as l, a as u, c as d, d as f, f as p, g as m, h, i as g, l as _, m as v, n as y, o as b, p as x, r as S, s as C, t as w, u as T, v as E } from "./TimelineEventList-BhkWyY5-.js";
4
+ import { a as D, i as O, n as k, o as A, r as j, s as M, t as N } from "./OnDisplayIn-eSG5r48j.js";
5
+ import { t as P } from "./content-BxaDJIvY.js";
6
+ export { o as AppBanner, e as AppContent, r as AppFooter, t as AppHeader, n as AppHyperlinks, i as AppNavigation, a as AppSponsors, M as BackLink, O as DynastyList, D as DynastyPopout, v as FacetSelect, c as FeaturedRecord, x as FilterPanel, g as GlossaryPopover, A as GlossaryTool, u as MediaGallery, N as OnDisplayIn, s as PageShell, h as Pagination, S as PartnerMap, y as PartnerPanel, d as RecordCredits, m as RecordGrid, f as RecordLanguages, l as RecordList, T as RecordSheet, k as RelatedMedia, b as RelatedRecords, p as ResultsSummary, E as SectionCards, _ as SheetSection, C as SourceCredit, P as SpecialFeatures, w as TimelineEventList, j as TimelineLookup };
@@ -22,7 +22,9 @@ var s = {
22
22
  glossary: !0,
23
23
  panel: !0,
24
24
  navigation: "tree",
25
- numbering: !1
25
+ numbering: !1,
26
+ inThisTheme: "exhibition.theme.inThisTheme",
27
+ seeAll: "exhibition.theme.seeAllInTheme"
26
28
  }, c = {
27
29
  ...s,
28
30
  about: () => !1
package/dist/views.js CHANGED
@@ -1,13 +1,13 @@
1
- import { t as e } from "./FeaturedRecord-mRyLN7Mt.js";
2
- import { w as t } from "./OnDisplayIn-D6r_KvpI.js";
3
- import { a as n, c as r, i, l as a, n as o, o as s, r as c, s as l, t as u } from "./TimelineResultsView-CMqrkr9z.js";
4
- import { computed as d, createBlock as f, createCommentVNode as p, createElementBlock as m, createVNode as h, mergeProps as g, normalizeClass as _, openBlock as v, renderSlot as y, toDisplayString as b, unref as x } from "vue";
5
- import { I18nText as S, renderInline as C, renderPlain as w, useDataPackage as T, useFeaturedRecord as E, useI18n as D, useSiteConfig as O } from "@museumwnf/viewer-core";
1
+ import { t as e } from "./FeaturedRecord-Dw6uf3ax.js";
2
+ import { v as t } from "./TimelineEventList-BhkWyY5-.js";
3
+ import { a as n, c as r, i, n as a, o, r as s, s as c, t as l } from "./TimelineResultsView-DQsyJmPp.js";
4
+ import { computed as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createVNode as m, mergeProps as h, normalizeClass as g, openBlock as _, renderSlot as v, toDisplayString as y, unref as b } from "vue";
5
+ import { I18nText as x, renderInline as S, renderPlain as C, useDataPackage as w, useFeaturedRecord as T, useI18n as E, useSiteConfig as D } from "@museumwnf/viewer-core";
6
6
  //#region src/views/HomeView.vue
7
- var k = { class: "mwnf-home" }, A = {
7
+ var O = { class: "mwnf-home" }, k = {
8
8
  key: 0,
9
9
  class: "mwnf-home__title"
10
- }, j = {
10
+ }, A = {
11
11
  __name: "HomeView",
12
12
  props: {
13
13
  title: {
@@ -32,7 +32,7 @@ var k = { class: "mwnf-home" }, A = {
32
32
  }
33
33
  },
34
34
  setup(n) {
35
- let r = n, { t: i, locale: a } = D(), o = O(), s = d(() => ({
35
+ let r = n, { t: i, locale: a } = E(), o = D(), s = u(() => ({
36
36
  ...o.home ?? {},
37
37
  ...c(r)
38
38
  }));
@@ -47,31 +47,31 @@ var k = { class: "mwnf-home" }, A = {
47
47
  ]) e[n] != null && e[n] !== "" && (t[n] = e[n]);
48
48
  return t;
49
49
  }
50
- let l = d(() => (s.value.cards ?? []).map((e) => ({
50
+ let l = u(() => (s.value.cards ?? []).map((e) => ({
51
51
  ...e,
52
52
  title: e.title ? i(e.title) : "",
53
53
  description: e.description ? i(e.description) : "",
54
54
  action: e.action ? i(e.action) : ""
55
- }))), u = d(() => s.value.featured ?? null), j = u.value?.entity ?? "", M = T();
55
+ }))), A = u(() => s.value.featured ?? null), j = A.value?.entity ?? "", M = w();
56
56
  j && M.loadTranslations(j, "en");
57
- let N = j ? E(j, {
58
- seed: u.value?.seed,
59
- images: u.value?.images ?? "images",
60
- filter: u.value?.filter
61
- }) : d(() => null), P = d(() => N.value ? M.tr(j, N.value.id, a.value, "en") : {});
57
+ let N = j ? T(j, {
58
+ seed: A.value?.seed,
59
+ images: A.value?.images ?? "images",
60
+ filter: A.value?.filter
61
+ }) : u(() => null), P = u(() => N.value ? M.tr(j, N.value.id, a.value, "en") : {});
62
62
  function F(e, t, n) {
63
63
  return typeof e == "function" ? e(t, n) : typeof e != "string" || !e ? "" : n[e] ?? t[e] ?? "";
64
64
  }
65
- let I = d(() => {
66
- let e = N.value, t = u.value;
65
+ let I = u(() => {
66
+ let e = N.value, t = A.value;
67
67
  if (!e || !t) return null;
68
68
  let n = P.value.name ?? e.internal_name ?? e.id, r = typeof t.meta == "function" ? t.meta(e, P.value) : (t.meta ?? []).map((t) => F(t, e, P.value)), a = t.images ?? "images";
69
69
  return {
70
70
  heading: t.heading ? i(t.heading) : "",
71
71
  image: e[a]?.[0]?.url ?? "",
72
- imageAlt: w(String(n)),
72
+ imageAlt: C(String(n)),
73
73
  eyebrow: String(F(t.eyebrow, e, P.value) ?? ""),
74
- name: C(String(n)),
74
+ name: S(String(n)),
75
75
  meta: r.filter(Boolean).map(String),
76
76
  action: t.action ? i(t.action) : "",
77
77
  to: typeof t.to == "function" ? t.to(e) : {
@@ -80,23 +80,23 @@ var k = { class: "mwnf-home" }, A = {
80
80
  }
81
81
  };
82
82
  });
83
- return (n, r) => (v(), m("section", k, [
84
- s.value.title || s.value.intro ? (v(), m("header", {
83
+ return (n, r) => (_(), p("section", O, [
84
+ s.value.title || s.value.intro ? (_(), p("header", {
85
85
  key: 0,
86
- class: _(["mwnf-home__welcome", { "mwnf-panel": s.value.panels }])
87
- }, [s.value.title ? (v(), m("h1", A, b(x(i)(s.value.title)), 1)) : p("", !0), s.value.intro ? (v(), f(x(S), {
86
+ class: g(["mwnf-home__welcome", { "mwnf-panel": s.value.panels }])
87
+ }, [s.value.title ? (_(), p("h1", k, y(b(i)(s.value.title)), 1)) : f("", !0), s.value.intro ? (_(), d(b(x), {
88
88
  key: 1,
89
89
  tag: "div",
90
90
  class: "mwnf-home__intro",
91
91
  keypath: s.value.intro
92
- }, null, 8, ["keypath"])) : p("", !0)], 2)) : p("", !0),
93
- y(n.$slots, "before"),
94
- h(t, { cards: l.value }, null, 8, ["cards"]),
95
- y(n.$slots, "default"),
96
- I.value ? (v(), f(e, g({ key: 1 }, I.value, { class: { "mwnf-panel": s.value.panels } }), null, 16, ["class"])) : p("", !0),
97
- y(n.$slots, "after")
92
+ }, null, 8, ["keypath"])) : f("", !0)], 2)) : f("", !0),
93
+ v(n.$slots, "before"),
94
+ m(t, { cards: l.value }, null, 8, ["cards"]),
95
+ v(n.$slots, "default"),
96
+ I.value ? (_(), d(e, h({ key: 1 }, I.value, { class: { "mwnf-panel": s.value.panels } }), null, 16, ["class"])) : f("", !0),
97
+ v(n.$slots, "after")
98
98
  ]));
99
99
  }
100
100
  };
101
101
  //#endregion
102
- export { a as CatalogueResultsView, s as EssayView, j as HomeView, n as LinkListView, i as PartnerListView, l as RecordSheetView, r as RecordView, o as SearchFormView, c as TextPageView, u as TimelineResultsView };
102
+ export { r as CatalogueResultsView, o as EssayView, A as HomeView, n as LinkListView, i as PartnerListView, c as RecordView, a as SearchFormView, s as TextPageView, l as TimelineResultsView };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@museumwnf/viewer-layout",
3
- "version": "2.18.0",
3
+ "version": "3.1.0",
4
4
  "description": "Page structure for MWNF websites: PageShell composing seven optional, token-styled sections, the content components a page is made of, and the composed views a website names instead of writing a page.",
5
5
  "type": "module",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -315,7 +315,7 @@
315
315
  /* --mwnf-credits-color: #555555; Credits text color */
316
316
  /* --mwnf-credits-gap: 0.25rem 1rem; Gap in the credits list */
317
317
 
318
- /* ---------- Content: RecordSheetView (the DXA item sheet's own blocks) ---------- */
318
+ /* ---------- Content: ItemDetailView (the DXA item sheet's own blocks) ---------- */
319
319
  /* --mwnf-sheet-museum-gap: 0.25rem; Holder text to partner summary */
320
320
  /* --mwnf-sheet-source-size: 0.875rem; Source-database block text size */
321
321
  /* --mwnf-sheet-source-gap: 0.375rem; Gap between its lines */
@@ -1,444 +0,0 @@
1
- import { T as e } from "./OnDisplayIn-D6r_KvpI.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, renderSlot as h, toDisplayString as g, unref as _, vModelCheckbox as v, vShow as y, watch as b, withCtx as x, withDirectives as S } from "vue";
3
- import { renderBlock as C, renderInline as w, useI18n as T } from "@museumwnf/viewer-core";
4
- import { useRouter as E } from "vue-router";
5
- //#region src/content/BackLink.vue
6
- var D = ["href"], O = {
7
- class: "mwnf-back-bar__arrow",
8
- "aria-hidden": "true"
9
- }, ee = {
10
- key: 1,
11
- class: "mwnf-back-link"
12
- }, te = {
13
- __name: "BackLink",
14
- props: {
15
- label: {
16
- type: String,
17
- default: "core.action.back"
18
- },
19
- to: {
20
- type: [String, Object],
21
- default: null
22
- },
23
- href: {
24
- type: String,
25
- default: ""
26
- },
27
- variant: {
28
- type: String,
29
- default: "button",
30
- validator: (e) => ["button", "bar"].includes(e)
31
- },
32
- arrow: {
33
- type: String,
34
- default: "←"
35
- }
36
- },
37
- setup(t) {
38
- let i = E(), c = t, l = n(() => !!(c.to || c.href));
39
- function u() {
40
- return window.history.state?.back != null || !l.value && window.history.length > 1;
41
- }
42
- function d() {
43
- u() && i.back();
44
- }
45
- let p = n(() => c.to && i ? i.resolve(c.to).href : c.href || (typeof c.to == "string" ? c.to : "") || "#");
46
- function m(e) {
47
- e.button !== 0 || e.metaKey || e.ctrlKey || e.shiftKey || e.altKey || (u() ? (e.preventDefault(), i.back()) : c.to && i ? (e.preventDefault(), i.push(c.to)) : l.value || e.preventDefault());
48
- }
49
- return (n, i) => t.variant === "bar" ? (f(), a("a", {
50
- key: 0,
51
- href: p.value,
52
- class: "mwnf-back-bar mwnf-back-bar--link",
53
- onClick: m
54
- }, [
55
- o("span", O, g(t.arrow), 1),
56
- i[0] ||= s(),
57
- h(n.$slots, "default", {}, () => [s(g(n.$t(t.label)), 1)])
58
- ], 8, D)) : (f(), a("div", ee, [l.value && !u() ? (f(), r(e, {
59
- key: 0,
60
- to: t.to,
61
- href: t.href,
62
- class: "mwnf-back-link__button"
63
- }, {
64
- default: x(() => [s(" ↩ " + g(n.$t(t.label)), 1)]),
65
- _: 1
66
- }, 8, ["to", "href"])) : (f(), a("button", {
67
- key: 1,
68
- class: "mwnf-back-link__button",
69
- onClick: d
70
- }, " ↩ " + g(n.$t(t.label)), 1))]));
71
- }
72
- }, k = {
73
- key: 0,
74
- class: "mwnf-featured-partners"
75
- }, A = { class: "mwnf-featured-partners__heading" }, j = { class: "mwnf-featured-partners__carousel" }, M = {
76
- key: 0,
77
- class: "mwnf-featured-partners__image"
78
- }, N = ["src", "alt"], P = { class: "mwnf-featured-partners__body" }, F = { class: "mwnf-featured-partners__name" }, I = { class: "mwnf-featured-partners__location" }, L = { key: 0 }, R = { class: "mwnf-featured-partners__description" }, z = {
79
- key: 0,
80
- class: "mwnf-featured-partners__controls"
81
- }, B = ["aria-label", "onClick"], V = 8e3, H = {
82
- __name: "FeaturedPartners",
83
- props: {
84
- records: {
85
- type: Array,
86
- default: () => []
87
- },
88
- partners: {
89
- type: Array,
90
- default: () => []
91
- },
92
- descriptionLength: {
93
- type: Number,
94
- default: 420
95
- },
96
- headingEntry: {
97
- type: String,
98
- default: "partner.list.featured"
99
- }
100
- },
101
- setup(l) {
102
- let h = l;
103
- function _(e) {
104
- return String(e ?? "").replace(/<[^>]*>/g, " ").replace(/\s+/g, " ").trim();
105
- }
106
- function v(e, t) {
107
- if (!e || e.length <= t) return e;
108
- let n = e.lastIndexOf(" ", t);
109
- return `${e.slice(0, n > 0 ? n : t)}...`;
110
- }
111
- let b = n(() => h.partners.length ? h.partners.map((e) => ({
112
- id: e.id,
113
- name: e.plainName,
114
- logo: e.pictures?.[0]?.url ?? e.logos?.[0]?.url ?? null,
115
- city: e.city,
116
- country: e.country,
117
- description: v(_(e.description), h.descriptionLength),
118
- route: e.route
119
- })) : h.records), C = p(0), w = null;
120
- function T(e) {
121
- C.value = e, E();
122
- }
123
- function E() {
124
- w && clearInterval(w), b.value.length > 0 && (w = setInterval(() => {
125
- C.value = (C.value + 1) % b.value.length;
126
- }, V));
127
- }
128
- return d(E), u(() => w && clearInterval(w)), (n, u) => b.value.length ? (f(), a("section", k, [
129
- o("h2", A, g(n.$t(l.headingEntry)), 1),
130
- o("div", j, [(f(!0), a(t, null, m(b.value, (t, n) => S((f(), r(e, {
131
- key: t.id,
132
- to: t.route,
133
- class: "mwnf-featured-partners__card"
134
- }, {
135
- default: x(() => [t.logo ? (f(), a("span", M, [o("img", {
136
- src: t.logo,
137
- alt: t.name,
138
- class: "mwnf-featured-partners__logo"
139
- }, null, 8, N)])) : i("", !0), o("span", P, [
140
- o("span", F, g(t.name), 1),
141
- o("span", I, [t.city ? (f(), a("span", L, g(t.city) + ", ", 1)) : i("", !0), s(g(t.country), 1)]),
142
- o("span", R, g(t.description), 1)
143
- ])]),
144
- _: 2
145
- }, 1032, ["to"])), [[y, n === C.value]])), 128))]),
146
- b.value.length > 1 ? (f(), a("div", z, [(f(!0), a(t, null, m(b.value, (e, t) => (f(), a("button", {
147
- key: e.id,
148
- class: c(["mwnf-featured-partners__bullet", { "mwnf-featured-partners__bullet--active": t === C.value }]),
149
- "aria-label": `${n.$t("core.action.show")} ${e.name}`,
150
- onClick: (e) => T(t)
151
- }, null, 10, B))), 128))])) : i("", !0)
152
- ])) : i("", !0);
153
- }
154
- }, U = { class: "mwnf-sibling-galleries" }, W = {
155
- key: 0,
156
- class: "mwnf-sibling-galleries__galleries"
157
- }, G = { class: "mwnf-sibling-galleries__header" }, K = { class: "mwnf-sibling-galleries__heading" }, q = ["href"], J = { class: "mwnf-sibling-galleries__grid" }, Y = {
158
- key: 0,
159
- class: "mwnf-sibling-galleries__image"
160
- }, X = ["src", "alt"], Z = {
161
- key: 1,
162
- class: "mwnf-sibling-galleries__image mwnf-sibling-galleries__image--empty"
163
- }, Q = { class: "mwnf-sibling-galleries__name" }, ne = {
164
- key: 1,
165
- class: "mwnf-sibling-galleries__museums"
166
- }, re = { class: "mwnf-sibling-galleries__heading" }, ie = { class: "mwnf-sibling-galleries__museums-grid" }, ae = ["href"], oe = { class: "mwnf-sibling-galleries__museum-image" }, se = { class: "mwnf-sibling-galleries__museum-name" }, ce = {
167
- __name: "SiblingGalleries",
168
- props: {
169
- galleries: {
170
- type: Array,
171
- default: () => []
172
- },
173
- museums: {
174
- type: Array,
175
- default: () => []
176
- },
177
- galleriesHeadingEntry: {
178
- type: String,
179
- default: "sibling.galleries"
180
- },
181
- seeMoreGalleriesEntry: {
182
- type: String,
183
- default: "sibling.seeMoreGalleries"
184
- },
185
- seeMoreGalleriesHref: {
186
- type: String,
187
- default: ""
188
- },
189
- museumsHeadingEntry: {
190
- type: String,
191
- default: "sibling.otherVirtualMuseums"
192
- }
193
- },
194
- setup(n) {
195
- return (s, u) => (f(), a("section", U, [n.galleries.length ? (f(), a("div", W, [o("div", G, [o("p", K, g(s.$t(n.galleriesHeadingEntry)), 1), n.seeMoreGalleriesHref ? (f(), a("a", {
196
- key: 0,
197
- href: n.seeMoreGalleriesHref,
198
- target: "_blank",
199
- rel: "noopener",
200
- class: "mwnf-sibling-galleries__see-more"
201
- }, g(s.$t(n.seeMoreGalleriesEntry)) + " » ", 9, q)) : i("", !0)]), o("div", J, [(f(!0), a(t, null, m(n.galleries, (t) => (f(), r(e, {
202
- key: t.id,
203
- to: t.route,
204
- class: c(["mwnf-sibling-galleries__gallery", { "mwnf-sibling-galleries__gallery--no-link": !t.route }])
205
- }, {
206
- default: x(() => [t.image ? (f(), a("span", Y, [o("img", {
207
- src: t.image,
208
- alt: t.name
209
- }, null, 8, X)])) : (f(), a("span", Z)), o("p", Q, g(t.name), 1)]),
210
- _: 2
211
- }, 1032, ["to", "class"]))), 128))])])) : i("", !0), n.museums.length ? (f(), a("div", ne, [o("div", re, g(s.$t(n.museumsHeadingEntry)), 1), o("div", ie, [(f(!0), a(t, null, m(n.museums, (e) => (f(), a("a", {
212
- key: e.name,
213
- href: e.href || e.to,
214
- target: "_blank",
215
- rel: "noopener",
216
- class: "mwnf-sibling-galleries__museum",
217
- style: l({
218
- "--mwnf-museum-bg": e.accent || "var(--mwnf-color-border)",
219
- "--mwnf-museum-text": e.textColor || "inherit"
220
- })
221
- }, [o("div", oe, g(e.name.split(" ").map((e) => e[0]).join("")), 1), o("p", se, g(e.name), 1)], 12, ae))), 128))])])) : i("", !0)]));
222
- }
223
- }, le = {
224
- key: 0,
225
- class: "mwnf-popup-logo"
226
- }, ue = ["aria-label"], de = ["innerHTML"], fe = ["innerHTML"], pe = {
227
- __name: "PopupLogo",
228
- props: {
229
- content: {
230
- type: String,
231
- default: ""
232
- },
233
- rawHtml: {
234
- type: Boolean,
235
- default: !1
236
- },
237
- enabled: {
238
- type: Boolean,
239
- default: !0
240
- },
241
- closeLabel: {
242
- type: String,
243
- default: "core.action.close"
244
- }
245
- },
246
- setup(e) {
247
- let t = e, r = p(!1), s = n(() => t.rawHtml ? t.content : w(t.content)), c = n(() => t.enabled && !!t.content && !r.value);
248
- return (t, n) => c.value ? (f(), a("div", le, [o("button", {
249
- class: "mwnf-popup-logo__close",
250
- "aria-label": t.$t(e.closeLabel),
251
- onClick: n[0] ||= (e) => r.value = !0
252
- }, "✕", 8, ue), e.rawHtml ? (f(), a("div", {
253
- key: 0,
254
- class: "mwnf-popup-logo__content",
255
- innerHTML: s.value
256
- }, null, 8, de)) : (f(), a("div", {
257
- key: 1,
258
- class: "mwnf-popup-logo__content",
259
- innerHTML: s.value
260
- }, null, 8, fe))])) : i("", !0);
261
- }
262
- }, me = { class: "mwnf-picture-gallery" }, he = {
263
- key: 0,
264
- class: "mwnf-picture-gallery__selected"
265
- }, ge = { class: "mwnf-picture-gallery__image" }, _e = ["src", "alt"], ve = { class: "mwnf-picture-gallery__details" }, ye = { class: "mwnf-picture-gallery__detail mwnf-picture-gallery__detail--title" }, be = { key: 0 }, xe = ["innerHTML"], Se = {
266
- key: 0,
267
- class: "mwnf-picture-gallery__label"
268
- }, Ce = ["innerHTML"], we = {
269
- key: 0,
270
- class: "mwnf-picture-gallery__detail"
271
- }, Te = {
272
- key: 2,
273
- class: "mwnf-picture-gallery__unresolved"
274
- }, Ee = {
275
- key: 1,
276
- class: "mwnf-picture-gallery__empty"
277
- }, De = {
278
- key: 2,
279
- class: "mwnf-picture-gallery__strip"
280
- }, Oe = { class: "mwnf-picture-gallery__thumbs" }, ke = ["onClick"], Ae = ["src", "alt"], je = { class: "mwnf-picture-gallery__thumb-text" }, Me = { key: 0 }, Ne = ["innerHTML"], Pe = { key: 1 }, Fe = {
281
- key: 0,
282
- class: "mwnf-picture-gallery__toggle"
283
- }, Ie = {
284
- __name: "PictureGallery",
285
- props: {
286
- pictures: {
287
- type: Array,
288
- default: () => []
289
- },
290
- selectedId: {
291
- type: [String, Number],
292
- default: null
293
- },
294
- seeItemEntry: {
295
- type: String,
296
- default: "exhibition.theme.seeItemEntry"
297
- },
298
- unresolvedEntry: {
299
- type: String,
300
- default: "exhibition.theme.recordNotInSite"
301
- },
302
- emptyEntry: {
303
- type: String,
304
- default: "exhibition.theme.additionalContent"
305
- },
306
- addRelatedEntry: {
307
- type: String,
308
- default: "exhibition.theme.addRelatedWorks"
309
- },
310
- hideRelatedEntry: {
311
- type: String,
312
- default: "exhibition.theme.hideRelatedWorks"
313
- }
314
- },
315
- emits: ["update:selectedId"],
316
- setup(l, { emit: u }) {
317
- let d = l, h = u, { t: y } = T(), C = n(() => d.pictures.find((e) => e.id === d.selectedId) ?? null), w = n(() => d.pictures.some((e) => e.backRelated?.length)), E = p(!1);
318
- b(() => d.pictures, () => {
319
- E.value = !1;
320
- });
321
- let D = n(() => E.value ? d.pictures : d.pictures.filter((e) => !e.backRelated?.length));
322
- function O(e) {
323
- h("update:selectedId", e.id);
324
- }
325
- return (n, u) => (f(), a("div", me, [C.value ? (f(), a("div", he, [o("div", ge, [o("img", {
326
- src: C.value.image,
327
- alt: C.value.imageAlt ?? ""
328
- }, null, 8, _e)]), o("div", ve, [
329
- o("div", ye, [C.value.imageCaption ? (f(), a("span", be, g(C.value.imageCaption) + ", ", 1)) : i("", !0), o("span", { innerHTML: C.value.name }, null, 8, xe)]),
330
- (f(!0), a(t, null, m(C.value.fields ?? [], (e, t) => (f(), a("div", {
331
- key: t,
332
- class: "mwnf-picture-gallery__detail"
333
- }, [e.label ? (f(), a("span", Se, g(e.label), 1)) : i("", !0), o("span", { innerHTML: e.value }, null, 8, Ce)]))), 128)),
334
- C.value.detail ? (f(), a("div", we, g(C.value.detail), 1)) : i("", !0),
335
- C.value.to ? (f(), r(e, {
336
- key: 1,
337
- class: "mwnf-picture-gallery__link",
338
- to: C.value.to
339
- }, {
340
- default: x(() => [s(g(_(y)(l.seeItemEntry)) + " →", 1)]),
341
- _: 1
342
- }, 8, ["to"])) : (f(), a("div", Te, g(_(y)(l.unresolvedEntry)), 1))
343
- ])])) : (f(), a("div", Ee, g(_(y)(l.emptyEntry)), 1)), l.pictures.length ? (f(), a("div", De, [o("ul", Oe, [(f(!0), a(t, null, m(D.value, (e) => (f(), a("li", {
344
- key: e.id,
345
- class: c(["mwnf-picture-gallery__thumb", {
346
- "mwnf-picture-gallery__thumb--active": e.id === l.selectedId,
347
- "mwnf-picture-gallery__thumb--related": e.backRelated?.length
348
- }])
349
- }, [o("button", {
350
- type: "button",
351
- onClick: (t) => O(e)
352
- }, [o("img", {
353
- src: e.image,
354
- alt: e.imageAlt ?? "",
355
- loading: "lazy"
356
- }, null, 8, Ae)], 8, ke), o("div", je, [
357
- e.imageCaption ? (f(), a("span", Me, g(e.imageCaption) + ", ", 1)) : i("", !0),
358
- o("span", {
359
- class: "mwnf-picture-gallery__thumb-name",
360
- innerHTML: e.name
361
- }, null, 8, Ne),
362
- e.detail ? (f(), a("span", Pe, ", " + g(e.detail), 1)) : i("", !0)
363
- ])], 2))), 128))]), w.value ? (f(), a("label", Fe, [S(o("input", {
364
- "onUpdate:modelValue": u[0] ||= (e) => E.value = e,
365
- type: "checkbox"
366
- }, null, 512), [[v, E.value]]), o("span", null, g(E.value ? _(y)(l.hideRelatedEntry) : _(y)(l.addRelatedEntry)), 1)])) : i("", !0)])) : i("", !0)]));
367
- }
368
- }, Le = {
369
- key: 0,
370
- class: "mwnf-picture-narrative"
371
- }, Re = ["innerHTML"], ze = {
372
- key: 1,
373
- class: "mwnf-picture-narrative__related"
374
- }, Be = { class: "mwnf-picture-narrative__heading" }, Ve = { class: "mwnf-picture-narrative__images" }, He = { class: "mwnf-picture-narrative__image mwnf-picture-narrative__image--main" }, Ue = ["src", "alt"], We = { class: "mwnf-picture-narrative__thumb-text" }, Ge = ["innerHTML"], Ke = { key: 0 }, qe = ["onClick"], Je = ["src", "alt"], $ = { class: "mwnf-picture-narrative__thumb-text" }, Ye = ["innerHTML"], Xe = { key: 0 }, Ze = {
375
- key: 0,
376
- class: "mwnf-picture-narrative__relation"
377
- }, Qe = {
378
- key: 2,
379
- class: "mwnf-picture-narrative__related"
380
- }, $e = { class: "mwnf-picture-narrative__heading" }, et = { class: "mwnf-picture-narrative__text mwnf-picture-narrative__text--reciprocal" }, tt = { class: "mwnf-picture-narrative__image" }, nt = ["src", "alt"], rt = { class: "mwnf-picture-narrative__thumb-text" }, it = ["innerHTML"], at = { key: 0 }, ot = {
381
- __name: "PictureNarrative",
382
- props: {
383
- picture: {
384
- type: Object,
385
- default: null
386
- },
387
- contextualDescription: {
388
- type: String,
389
- default: ""
390
- },
391
- relatedHeadingEntry: {
392
- type: String,
393
- default: "exhibition.related.items"
394
- },
395
- reciprocalFallbackEntry: {
396
- type: String,
397
- default: "exhibition.related.reciprocal"
398
- }
399
- },
400
- emits: ["select"],
401
- setup(e, { emit: r }) {
402
- let s = e, c = r, { t: l } = T(), u = n(() => s.contextualDescription ? C(s.contextualDescription, { breaks: !0 }) : ""), d = n(() => s.picture?.related ?? []), p = n(() => s.picture?.backRelated?.[0] ?? null);
403
- function h(e) {
404
- c("select", e.id);
405
- }
406
- return (n, r) => e.picture ? (f(), a("div", Le, [
407
- u.value ? (f(), a("div", {
408
- key: 0,
409
- class: "mwnf-picture-narrative__text mwnf-sheet__block",
410
- innerHTML: u.value
411
- }, null, 8, Re)) : i("", !0),
412
- d.value.length ? (f(), a("div", ze, [o("div", Be, g(_(l)(e.relatedHeadingEntry)), 1), o("div", Ve, [o("div", He, [o("img", {
413
- src: e.picture.image,
414
- alt: e.picture.imageAlt ?? ""
415
- }, null, 8, Ue), o("div", We, [o("span", { innerHTML: e.picture.name }, null, 8, Ge), e.picture.detail ? (f(), a("span", Ke, ", " + g(e.picture.detail), 1)) : i("", !0)])]), (f(!0), a(t, null, m(d.value, (e) => (f(), a("div", {
416
- key: e.picture.id,
417
- class: "mwnf-picture-narrative__image"
418
- }, [
419
- o("button", {
420
- type: "button",
421
- onClick: (t) => h(e.picture)
422
- }, [o("img", {
423
- src: e.picture.image,
424
- alt: e.picture.imageAlt ?? ""
425
- }, null, 8, Je)], 8, qe),
426
- o("div", $, [o("span", { innerHTML: e.picture.name }, null, 8, Ye), e.picture.detail ? (f(), a("span", Xe, ", " + g(e.picture.detail), 1)) : i("", !0)]),
427
- e.text ? (f(), a("div", Ze, g(e.text), 1)) : i("", !0)
428
- ]))), 128))])])) : i("", !0),
429
- p.value ? (f(), a("div", Qe, [
430
- o("div", $e, g(_(l)(e.relatedHeadingEntry)), 1),
431
- o("p", et, g(p.value.reciprocalText || _(l)(e.reciprocalFallbackEntry)), 1),
432
- o("div", tt, [o("button", {
433
- type: "button",
434
- onClick: r[0] ||= (e) => h(p.value.picture)
435
- }, [o("img", {
436
- src: p.value.picture.image,
437
- alt: p.value.picture.imageAlt ?? ""
438
- }, null, 8, nt)]), o("div", rt, [o("span", { innerHTML: p.value.picture.name }, null, 8, it), p.value.picture.detail ? (f(), a("span", at, ", " + g(p.value.picture.detail), 1)) : i("", !0)])])
439
- ])) : i("", !0)
440
- ])) : i("", !0);
441
- }
442
- };
443
- //#endregion
444
- export { H as a, ce as i, Ie as n, te as o, pe as r, ot as t };