@museumwnf/viewer-layout 3.87.0 → 3.88.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,26 +1,26 @@
1
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, normalizeClass as u, normalizeProps as d, normalizeStyle as f, openBlock as p, renderList as m, renderSlot as h, toDisplayString as g, unref as _, useSlots as v, withCtx as y } from "vue";
2
2
  import { RouterLink as b, useRoute as x } from "vue-router";
3
- import { NotFoundView as S, byId as C, loadEntities as w, mdInline as T, mdStrip as E, mwnfLinks as D, partnerView as O, renderInline as k, siblingSiteUrl as A, sourceUrl as ee, useCatalogue as te, useDataPackage as ne, useI18n as j, useProjects as M, useSiteConfig as N } from "@museumwnf/viewer-core";
4
- import { i as P, n as F, o as I, r as L, s as R, t as re } from "./OnDisplayIn-Ct8xxMwQ.js";
5
- import { c as z, d as B, r as ie } from "./PartnerMap-DdyMLtgH.js";
6
- import { n as ae } from "./TimelineEventList-CIkKxyQu.js";
7
- import { t as oe } from "./RecordView-DAvWufWV.js";
8
- import { t as se } from "./chrome-Bv_mLlHM.js";
3
+ import { NotFoundView as S, byId as C, loadEntities as w, mdInline as T, mdStrip as ee, mwnfLinks as E, partnerView as D, renderInline as O, siblingSiteUrl as k, sourceUrl as te, useCatalogue as ne, useDataPackage as re, useI18n as ie, useProjects as A, useSiteConfig as j } from "@museumwnf/viewer-core";
4
+ import { i as M, n as N, o as P, r as F, s as I, t as ae } from "./OnDisplayIn-Ct8xxMwQ.js";
5
+ import { c as L, d as R, r as oe } from "./PartnerMap-DdyMLtgH.js";
6
+ import { n as se } from "./TimelineEventList-CIkKxyQu.js";
7
+ import { t as ce } from "./RecordView-DAvWufWV.js";
8
+ import { t as le } from "./chrome-Bv_mLlHM.js";
9
9
  // src/dxa/RelatedObjects.vue
10
- var V = {
10
+ var z = {
11
11
  key: 0,
12
12
  class: "mwnf-related-objects"
13
- }, H = {
13
+ }, B = {
14
14
  key: 0,
15
15
  class: "mwnf-related-objects__heading"
16
- }, U = { class: "mwnf-related-objects__tiles" }, W = ["src"], G = {
16
+ }, V = { class: "mwnf-related-objects__tiles" }, H = ["src"], U = {
17
17
  key: 1,
18
18
  class: "mwnf-related-objects__empty",
19
19
  "aria-hidden": "true"
20
- }, K = ["innerHTML"], ce = {
20
+ }, W = ["innerHTML"], G = {
21
21
  class: "mwnf-related-objects__tooltip",
22
22
  "aria-hidden": "true"
23
- }, le = ["innerHTML"], ue = { key: 0 }, de = {
23
+ }, ue = ["innerHTML"], de = { key: 0 }, fe = {
24
24
  __name: "RelatedObjects",
25
25
  props: {
26
26
  heading: {
@@ -33,10 +33,10 @@ var V = {
33
33
  }
34
34
  },
35
35
  setup(t) {
36
- return (n, o) => t.tiles.length ? (p(), i("div", V, [t.heading ? (p(), i("p", H, g(t.heading), 1)) : r("", !0), a("ul", U, [(p(!0), i(e, null, m(t.tiles, (t) => (p(), i("li", {
36
+ return (n, o) => t.tiles.length ? (p(), i("div", z, [t.heading ? (p(), i("p", B, g(t.heading), 1)) : r("", !0), a("ul", V, [(p(!0), i(e, null, m(t.tiles, (t) => (p(), i("li", {
37
37
  key: t.id,
38
38
  class: "mwnf-related-objects__tile"
39
- }, [c(B, {
39
+ }, [c(R, {
40
40
  to: t.to,
41
41
  href: t.href,
42
42
  external: !!t.href,
@@ -47,51 +47,51 @@ var V = {
47
47
  src: t.image,
48
48
  alt: "",
49
49
  loading: "lazy"
50
- }, null, 8, W)) : (p(), i("span", G)), a("span", {
50
+ }, null, 8, H)) : (p(), i("span", U)), a("span", {
51
51
  class: "mwnf-related-objects__name-sr",
52
52
  innerHTML: t.name
53
- }, null, 8, K)]),
53
+ }, null, 8, W)]),
54
54
  _: 2
55
55
  }, 1032, [
56
56
  "to",
57
57
  "href",
58
58
  "external"
59
- ]), a("div", ce, [a("div", null, [a("span", { innerHTML: t.name }, null, 8, le), t.country ? (p(), i(e, { key: 0 }, [s(", " + g(t.country), 1)], 64)) : r("", !0)]), t.justification ? (p(), i("div", ue, g(t.justification), 1)) : r("", !0)])]))), 128))])])) : r("", !0);
59
+ ]), a("div", G, [a("div", null, [a("span", { innerHTML: t.name }, null, 8, ue), t.country ? (p(), i(e, { key: 0 }, [s(", " + g(t.country), 1)], 64)) : r("", !0)]), t.justification ? (p(), i("div", de, g(t.justification), 1)) : r("", !0)])]))), 128))])])) : r("", !0);
60
60
  }
61
- }, fe = {
61
+ }, pe = {
62
62
  key: 0,
63
63
  class: "mwnf-sheet-source"
64
- }, pe = {
64
+ }, me = {
65
65
  key: 0,
66
66
  class: "mwnf-sheet-source__line"
67
- }, me = {
67
+ }, he = {
68
68
  key: 1,
69
69
  class: "mwnf-sheet-source__collection"
70
- }, he = ["href"], ge = {
70
+ }, ge = ["href"], _e = {
71
71
  key: 1,
72
72
  class: "mwnf-sheet-notice"
73
- }, _e = {
73
+ }, ve = {
74
74
  key: "museum",
75
75
  class: "mwnf-sheet-museum"
76
- }, ve = ["innerHTML"], ye = {
76
+ }, ye = ["innerHTML"], be = {
77
77
  key: 0,
78
78
  class: "mwnf-sheet-related"
79
- }, be = {
79
+ }, xe = {
80
80
  key: 0,
81
81
  class: "mwnf-sheet-related__heading mwnf-sheet-related__heading--caps"
82
- }, xe = {
82
+ }, Se = {
83
83
  key: 1,
84
84
  class: "mwnf-sheet-related__description"
85
- }, Se = {
85
+ }, Ce = {
86
86
  key: 0,
87
87
  class: "mwnf-sheet-related__references"
88
- }, Ce = {
88
+ }, we = {
89
89
  key: 2,
90
90
  class: "mwnf-sheet-related__unresolved"
91
- }, we = {
91
+ }, Te = {
92
92
  key: 5,
93
93
  class: "mwnf-sheet-related__line"
94
- }, Te = ["href"], Ee = { class: "mwnf-sheet-related__heading" }, De = ["href"], Oe = { key: 11 }, ke = { class: "mwnf-sheet-related__heading" }, Ae = { key: 12 }, je = { class: "mwnf-sheet-related__heading" }, Me = { class: "mwnf-sheet-related__line" }, Ne = ["href"], Pe = { key: 13 }, Fe = { class: "mwnf-sheet-related__heading" }, Ie = { class: "mwnf-sheet-related__line" }, Le = ["href"], Re = { key: 14 }, ze = { class: "mwnf-sheet-related__heading" }, Be = "sheet.field.", q = {
94
+ }, Ee = ["href"], De = { class: "mwnf-sheet-related__heading" }, Oe = ["href"], ke = { key: 11 }, Ae = { class: "mwnf-sheet-related__heading" }, je = { key: 12 }, Me = { class: "mwnf-sheet-related__heading" }, Ne = { class: "mwnf-sheet-related__line" }, Pe = ["href"], Fe = { key: 13 }, Ie = { class: "mwnf-sheet-related__heading" }, Le = { class: "mwnf-sheet-related__line" }, Re = ["href"], ze = { key: 14 }, Be = { class: "mwnf-sheet-related__heading" }, Ve = "sheet.field.", K = {
95
95
  __name: "ItemDetailView",
96
96
  props: {
97
97
  spec: {
@@ -112,23 +112,23 @@ var V = {
112
112
  }
113
113
  },
114
114
  setup(b) {
115
- let x = b, k = v(), A = /* @__PURE__ */ new Set([
115
+ let x = b, O = v(), k = /* @__PURE__ */ new Set([
116
116
  "before-sheet",
117
117
  "museum",
118
118
  "related",
119
119
  "aside"
120
- ]), ee = t(() => Object.keys(k).filter((e) => !A.has(e))), te = t(() => !x.dataGetter || x.dataGetter(x.id) != null), { t: R } = j();
121
- function z(e) {
122
- if (typeof e != "string" || !e.startsWith(Be)) return e;
120
+ ]), te = t(() => Object.keys(O).filter((e) => !k.has(e))), ne = t(() => !x.dataGetter || x.dataGetter(x.id) != null), { t: I } = ie();
121
+ function L(e) {
122
+ if (typeof e != "string" || !e.startsWith(Ve)) return e;
123
123
  let t = `sheet.dxa.${e.slice(12)}`;
124
- return R(t) === t ? e : t;
124
+ return I(t) === t ? e : t;
125
125
  }
126
- let B = t(() => {
126
+ let R = t(() => {
127
127
  let e = Array.isArray(x.spec.fields) ? {
128
128
  ...x.spec,
129
129
  fields: x.spec.fields.map((e) => ({
130
130
  ...e,
131
- label: z(e.label)
131
+ label: L(e.label)
132
132
  }))
133
133
  } : x.spec;
134
134
  return e.related === !1 ? e : {
@@ -138,57 +138,60 @@ var V = {
138
138
  inline: !1
139
139
  }
140
140
  };
141
- }), V = M(), H = (e, t) => (e.name ?? "").localeCompare(t.name ?? ""), U = (e) => (e.gallery_references ?? []).filter((e) => e.kind === "gallery").sort(H), W = (e) => (e.gallery_references ?? []).filter((e) => e.kind === "exhibition").sort(H), G = (e) => V.links(e.project_id)?.artisticIntroductionUrl ?? null, K = (e) => V.links(e.project_id)?.relatedDatabaseUrl ?? null, ce = {
141
+ }), z = A(), B = (e, t) => e.names?.[t] || e.names?.en || e.name || "", V = (e, t, n) => (e.gallery_references ?? []).filter((e) => e.kind === t).map((e) => ({
142
+ ...e,
143
+ name: B(e, n)
144
+ })).sort((e, t) => e.name.localeCompare(t.name)), H = (e, t) => V(e, "gallery", t), U = (e, t) => V(e, "exhibition", t), W = (e) => z.links(e.project_id)?.artisticIntroductionUrl ?? null, G = (e) => z.links(e.project_id)?.relatedDatabaseUrl ?? null, ue = {
142
145
  "islamicart.museumwnf.org": "core.project.islamicArt",
143
146
  "baroqueart.museumwnf.org": "core.project.baroqueArt",
144
147
  "sharinghistory.museumwnf.org": "core.project.sharingHistory"
145
148
  };
146
- function le(e) {
149
+ function de(e) {
147
150
  try {
148
- let t = ce[new URL(K(e)).host];
149
- if (t) return R(t);
151
+ let t = ue[new URL(G(e)).host];
152
+ if (t) return I(t);
150
153
  } catch {}
151
- return V.label(e.project_id);
154
+ return z.label(e.project_id);
152
155
  }
153
- function ue(e, t) {
156
+ function K(e, t) {
154
157
  if (!e) return null;
155
- let n = B.value.sourceDatabase === !1 ? null : B.value.sourceDatabase ?? null, r = null;
158
+ let n = R.value.sourceDatabase === !1 ? null : R.value.sourceDatabase ?? null, r = null;
156
159
  if (n) {
157
- let i = n.chipClass ? n.chipClass(e, t) : null, a = V.label(e.project_id);
160
+ let i = n.chipClass ? n.chipClass(e, t) : null, a = z.label(e.project_id);
158
161
  (i || a) && (r = {
159
162
  chipClass: i,
160
163
  name: a,
161
- label: R(n.label ?? "record.sheet.sourceDatabase")
164
+ label: I(n.label ?? "record.sheet.sourceDatabase")
162
165
  });
163
166
  }
164
- let i = n && n.addToCollection !== !1 ? R(n.addToCollection?.label ?? "record.action.addToCollection") : null, a = B.value.notice === !1 ? null : B.value.notice ?? null, o = a && a.show(e, t) ? R(a.label) : null;
167
+ let i = n && n.addToCollection !== !1 ? I(n.addToCollection?.label ?? "record.action.addToCollection") : null, a = R.value.notice === !1 ? null : R.value.notice ?? null, o = a && a.show(e, t) ? I(a.label) : null;
165
168
  return {
166
169
  source: r,
167
170
  addToCollectionLabel: i,
168
171
  notice: o
169
172
  };
170
173
  }
171
- let q = ne(), Ve = C("partners"), J = C("countries");
174
+ let q = re(), J = C("partners"), Y = C("countries");
172
175
  w(["partners", "countries"]), q.loadTranslations("countries", "en");
173
- function Y(e, t) {
176
+ function X(e, t) {
174
177
  let n = q.tr("countries", e, t, "en");
175
- return E(n.name ?? J.value?.get(e)?.internal_name ?? "");
178
+ return ee(n.name ?? Y.value?.get(e)?.internal_name ?? "");
176
179
  }
177
- function X(e) {
178
- let t = e.text?.holder ? T(String(e.text.holder)) : "", n = B.value.museum === !1 ? null : B.value.museum ?? null, r = n ? Ve.value?.get(e.record?.partner_id) : null;
180
+ function Z(e) {
181
+ let t = e.text?.holder ? T(String(e.text.holder)) : "", n = R.value.museum === !1 ? null : R.value.museum ?? null, r = n ? J.value?.get(e.record?.partner_id) : null;
179
182
  return {
180
183
  holder: t,
181
- view: r ? O(r, q.tr("partners", r.id, e.language, "en"), {
182
- countryLabel: (t) => Y(t, e.language),
184
+ view: r ? D(r, q.tr("partners", r.id, e.language, "en"), {
185
+ countryLabel: (t) => X(t, e.language),
183
186
  route: (t) => n.route ? n.route(t.id, e) : null
184
187
  }) : null
185
188
  };
186
189
  }
187
- function Z(e, t) {
190
+ function Q(e, t) {
188
191
  if (!e) return null;
189
- let n = B.value.related ?? {}, r = t.records ?? [], i = t.outside ?? [], a = x.dataGetter ? r.filter((e) => x.dataGetter(e.id) != null) : r, o = x.dataGetter ? r.filter((e) => x.dataGetter(e.id) == null).map((t) => (e.related_items ?? []).find((e) => e.id === t.id)).filter(Boolean) : [], s = [...i, ...o].map((e) => ({
192
+ let n = R.value.related ?? {}, r = t.records ?? [], i = t.outside ?? [], a = x.dataGetter ? r.filter((e) => x.dataGetter(e.id) != null) : r, o = x.dataGetter ? r.filter((e) => x.dataGetter(e.id) == null).map((t) => (e.related_items ?? []).find((e) => e.id === t.id)).filter(Boolean) : [], s = [...i, ...o].map((e) => ({
190
193
  ...e,
191
- name: e.project_id ? V.label(e.project_id) : null,
194
+ name: e.project_id ? z.label(e.project_id) : null,
192
195
  chipClass: n.outsideChip ? n.outsideChip(e, t) : null
193
196
  })), c = (t) => (n.onDisplayIn?.href ? n.onDisplayIn.href(t, e) : t.legacy_host) || "", l = (e) => ({
194
197
  id: e.id,
@@ -202,18 +205,18 @@ var V = {
202
205
  sections: n.onDisplayIn.exhibitions(e, t)
203
206
  } : {
204
207
  heading: n.onDisplayIn.exhibitionsHeading ?? "record.related.exhibitions",
205
- links: W(e).map(l)
208
+ links: U(e, t.language).map(l)
206
209
  }, {
207
210
  heading: n.onDisplayIn.galleriesHeading ?? "record.related.galleries",
208
- links: U(e).map(l)
211
+ links: H(e, t.language).map(l)
209
212
  }].filter((e) => (e.sections ?? [e]).some((e) => e.links?.length))
210
- } : null, d = n.databaseLabel && K(e) ? {
211
- url: K(e),
212
- label: R(n.databaseLabel),
213
- name: le(e)
213
+ } : null, d = n.databaseLabel && G(e) ? {
214
+ url: G(e),
215
+ label: I(n.databaseLabel),
216
+ name: de(e)
214
217
  } : null, f = n.overallDatabase && n.overallDatabase !== !1 ? {
215
- label: R(n.overallDatabase.label),
216
- linkLabel: R(n.overallDatabase.linkLabel)
218
+ label: I(n.overallDatabase.label),
219
+ linkLabel: I(n.overallDatabase.linkLabel)
217
220
  } : null, p = n.objectTiles ? n.objectTiles({
218
221
  record: e,
219
222
  inPackage: a,
@@ -221,97 +224,97 @@ var V = {
221
224
  ctx: t
222
225
  }) : null, m = !!(p && n.monumentsHeading);
223
226
  return {
224
- title: n.title ? R(n.title) : "",
225
- description: n.description ? R(n.description) : "",
226
- heading: R(n.heading ?? "record.related.items"),
227
+ title: n.title ? I(n.title) : "",
228
+ description: n.description ? I(n.description) : "",
229
+ heading: I(n.heading ?? "record.related.items"),
227
230
  tiles: m ? p.filter((e) => e.kind !== "monument") : p,
228
- monumentsHeading: m ? R(n.monumentsHeading) : "",
231
+ monumentsHeading: m ? I(n.monumentsHeading) : "",
229
232
  monumentTiles: m ? p.filter((e) => e.kind === "monument") : [],
230
233
  variant: n.variant ?? "grid",
231
- actionLabel: n.actionLabel ? R(n.actionLabel) : "",
234
+ actionLabel: n.actionLabel ? I(n.actionLabel) : "",
232
235
  inPackage: a,
233
236
  references: s,
234
- notInPackageLabel: n.notInPackageLabel ? R(n.notInPackageLabel) : "",
235
- artisticIntroduction: n.artisticIntroductionLabel && G(e) ? {
236
- url: G(e),
237
- label: R(n.artisticIntroductionLabel)
237
+ notInPackageLabel: n.notInPackageLabel ? I(n.notInPackageLabel) : "",
238
+ artisticIntroduction: n.artisticIntroductionLabel && W(e) ? {
239
+ url: W(e),
240
+ label: I(n.artisticIntroductionLabel)
238
241
  } : null,
239
242
  timeline: n.timeline ? n.timeline(e, t) : null,
240
243
  glossary: n.glossary !== !1,
241
244
  glossaryLabels: n.glossaryLabels ?? {},
242
245
  dynasties: n.dynasties ? n.dynasties(e, t.language, t) : null,
243
- dynastiesHeading: R(n.dynastiesHeading ?? "record.dynasty.list"),
246
+ dynastiesHeading: I(n.dynastiesHeading ?? "record.dynasty.list"),
244
247
  media: n.media === !1 ? [] : e.media ?? [],
245
248
  mediaGroups: n.mediaHeadings && n.media !== !1 ? ["audio", "video"].map((r) => ({
246
249
  type: r,
247
- heading: R(n.mediaHeadings[r]),
250
+ heading: I(n.mediaHeadings[r]),
248
251
  entries: (e.media ?? []).filter((e) => e?.url && e.type === r && (!e.language || !t.language || e.language === t.language))
249
252
  })).filter((e) => e.entries.length) : null,
250
253
  onDisplayIn: u,
251
254
  database: d,
252
255
  overallDatabase: f,
253
256
  download: n.download === !1 ? null : {
254
- label: R("record.action.download"),
255
- pdfLabel: R("record.action.downloadPdf")
257
+ label: I("record.action.download"),
258
+ pdfLabel: I("record.action.downloadPdf")
256
259
  }
257
260
  };
258
261
  }
259
- let Q = N(), $ = t(() => {
260
- let e = se(Q.chrome, "world.png");
262
+ let $ = j(), He = t(() => {
263
+ let e = le($.chrome, "world.png");
261
264
  return e ? { "--mwnf-dxa-glossary-image": `url("${e}")` } : null;
262
265
  });
263
- function He() {
266
+ function Ue() {
264
267
  window.print();
265
268
  }
266
- return (t, v) => te.value ? (p(), n(oe, {
269
+ return (t, v) => ne.value ? (p(), n(ce, {
267
270
  key: 0,
268
- spec: B.value,
271
+ spec: R.value,
269
272
  id: b.id,
270
273
  entity: b.entity,
271
- style: f($.value)
274
+ style: f(He.value)
272
275
  }, o({
273
- "before-sheet": y((n) => [h(t.$slots, "before-sheet", d(l(n)), () => [(p(!0), i(e, null, m([ue(n.record, n)], (t) => (p(), i(e, { key: "before-sheet" }, [t?.source || t?.addToCollectionLabel ? (p(), i("div", fe, [t.source ? (p(), i("p", pe, [t.source.chipClass ? (p(), i("span", {
276
+ "before-sheet": y((n) => [h(t.$slots, "before-sheet", d(l(n)), () => [(p(!0), i(e, null, m([K(n.record, n)], (t) => (p(), i(e, { key: "before-sheet" }, [t?.source || t?.addToCollectionLabel ? (p(), i("div", pe, [t.source ? (p(), i("p", me, [t.source.chipClass ? (p(), i("span", {
274
277
  key: 0,
275
278
  class: u(["mwnf-chip", t.source.chipClass]),
276
279
  "aria-hidden": "true"
277
- }, null, 2)) : r("", !0), t.source.name ? (p(), i(e, { key: 1 }, [s(g(t.source.label) + ": " + g(t.source.name), 1)], 64)) : r("", !0)])) : r("", !0), t.addToCollectionLabel ? (p(), i("p", me, [a("a", {
278
- href: _(D).myCollection,
280
+ }, null, 2)) : r("", !0), t.source.name ? (p(), i(e, { key: 1 }, [s(g(t.source.label) + ": " + g(t.source.name), 1)], 64)) : r("", !0)])) : r("", !0), t.addToCollectionLabel ? (p(), i("p", he, [a("a", {
281
+ href: _(E).myCollection,
279
282
  target: "_blank",
280
283
  rel: "noopener"
281
- }, "↗ " + g(t.addToCollectionLabel), 9, he)])) : r("", !0)])) : r("", !0), t?.notice ? (p(), i("div", ge, [s(g(t.notice) + " ", 1), a("strong", null, [a("em", null, g(n.languages.map((e) => e.label).join(", ")), 1)])])) : r("", !0)], 64))), 128))])]),
282
- museum: y((a) => [h(t.$slots, "museum", d(l(a)), () => [(p(!0), i(e, null, m([X(a)], (e) => (p(), i("div", _e, [e.holder ? (p(), i("p", {
284
+ }, "↗ " + g(t.addToCollectionLabel), 9, ge)])) : r("", !0)])) : r("", !0), t?.notice ? (p(), i("div", _e, [s(g(t.notice) + " ", 1), a("strong", null, [a("em", null, g(n.languages.map((e) => e.label).join(", ")), 1)])])) : r("", !0)], 64))), 128))])]),
285
+ museum: y((a) => [h(t.$slots, "museum", d(l(a)), () => [(p(!0), i(e, null, m([Z(a)], (e) => (p(), i("div", ve, [e.holder ? (p(), i("p", {
283
286
  key: 0,
284
287
  class: "mwnf-sheet-museum__holder",
285
288
  innerHTML: e.holder
286
- }, null, 8, ve)) : r("", !0), e.view ? (p(), n(ae, {
289
+ }, null, 8, ye)) : r("", !0), e.view ? (p(), n(se, {
287
290
  key: 1,
288
291
  variant: "summary",
289
292
  partner: e.view,
290
293
  label: "partner.info.about",
291
294
  dir: a.dir
292
295
  }, null, 8, ["partner", "dir"])) : r("", !0)]))), 128))])]),
293
- aside: y((o) => [h(t.$slots, "related", d(l(o)), () => [(p(!0), i(e, null, m([Z(o.record, o)], (t) => (p(), i(e, { key: o.record?.id ?? "related" }, [t ? (p(), i("div", ye, [
294
- t.title ? (p(), i("p", be, g(t.title), 1)) : r("", !0),
295
- t.description ? (p(), i("p", xe, g(t.description), 1)) : r("", !0),
296
- t.tiles ? (p(), n(de, {
296
+ aside: y((o) => [h(t.$slots, "related", d(l(o)), () => [(p(!0), i(e, null, m([Q(o.record, o)], (t) => (p(), i(e, { key: o.record?.id ?? "related" }, [t ? (p(), i("div", be, [
297
+ t.title ? (p(), i("p", xe, g(t.title), 1)) : r("", !0),
298
+ t.description ? (p(), i("p", Se, g(t.description), 1)) : r("", !0),
299
+ t.tiles ? (p(), n(fe, {
297
300
  key: 2,
298
301
  heading: t.heading,
299
302
  tiles: t.tiles
300
- }, null, 8, ["heading", "tiles"])) : t.inPackage.length || t.references.length ? (p(), n(ie, {
303
+ }, null, 8, ["heading", "tiles"])) : t.inPackage.length || t.references.length ? (p(), n(oe, {
301
304
  key: 3,
302
305
  heading: t.heading,
303
306
  records: t.inPackage,
304
307
  variant: t.variant,
305
308
  "action-label": t.actionLabel
306
309
  }, {
307
- default: y(() => [t.references.length ? (p(), i("ul", Se, [(p(!0), i(e, null, m(t.references, (n) => (p(), i("li", { key: n.id }, [
310
+ default: y(() => [t.references.length ? (p(), i("ul", Ce, [(p(!0), i(e, null, m(t.references, (n) => (p(), i("li", { key: n.id }, [
308
311
  n.chipClass ? (p(), i("span", {
309
312
  key: 0,
310
313
  class: u(["mwnf-chip", n.chipClass]),
311
314
  "aria-hidden": "true"
312
315
  }, null, 2)) : r("", !0),
313
316
  n.name ? (p(), i(e, { key: 1 }, [s(g(n.name), 1)], 64)) : r("", !0),
314
- t.notInPackageLabel ? (p(), i("span", Ce, g(t.notInPackageLabel), 1)) : r("", !0)
317
+ t.notInPackageLabel ? (p(), i("span", we, g(t.notInPackageLabel), 1)) : r("", !0)
315
318
  ]))), 128))])) : r("", !0)]),
316
319
  _: 2
317
320
  }, 1032, [
@@ -320,22 +323,22 @@ var V = {
320
323
  "variant",
321
324
  "action-label"
322
325
  ])) : r("", !0),
323
- t.monumentTiles.length ? (p(), n(de, {
326
+ t.monumentTiles.length ? (p(), n(fe, {
324
327
  key: 4,
325
328
  heading: t.monumentsHeading,
326
329
  tiles: t.monumentTiles,
327
330
  class: "mwnf-related-objects--monuments"
328
331
  }, null, 8, ["heading", "tiles"])) : r("", !0),
329
- t.artisticIntroduction ? (p(), i("p", we, [a("a", {
332
+ t.artisticIntroduction ? (p(), i("p", Te, [a("a", {
330
333
  href: t.artisticIntroduction.url,
331
334
  target: "_blank",
332
335
  rel: "noopener"
333
- }, "↗ " + g(t.artisticIntroduction.label), 9, Te)])) : r("", !0),
334
- t.timeline ? (p(), n(L, {
336
+ }, "↗ " + g(t.artisticIntroduction.label), 9, Ee)])) : r("", !0),
337
+ t.timeline ? (p(), n(F, {
335
338
  key: o.record.id,
336
339
  info: t.timeline
337
340
  }, null, 8, ["info"])) : r("", !0),
338
- t.glossary ? (p(), n(I, {
341
+ t.glossary ? (p(), n(P, {
339
342
  key: 7,
340
343
  language: o.language,
341
344
  labels: t.glossaryLabels,
@@ -345,7 +348,7 @@ var V = {
345
348
  "labels",
346
349
  "dir"
347
350
  ])) : r("", !0),
348
- t.dynasties?.records?.length ? (p(), n(P, {
351
+ t.dynasties?.records?.length ? (p(), n(M, {
349
352
  key: 8,
350
353
  heading: t.dynastiesHeading,
351
354
  dynasties: t.dynasties.records,
@@ -360,14 +363,14 @@ var V = {
360
363
  t.mediaGroups ? (p(!0), i(e, { key: 9 }, m(t.mediaGroups, (t) => (p(), i("div", {
361
364
  key: t.type,
362
365
  class: u(["mwnf-sheet-related__media", `mwnf-sheet-related__media--${t.type}`])
363
- }, [a("p", Ee, g(t.heading), 1), (p(!0), i(e, null, m(t.entries, (e) => (p(), i("p", {
366
+ }, [a("p", De, g(t.heading), 1), (p(!0), i(e, null, m(t.entries, (e) => (p(), i("p", {
364
367
  key: e.url,
365
368
  class: "mwnf-sheet-related__line"
366
369
  }, [a("a", {
367
370
  href: e.url,
368
371
  target: "_blank",
369
372
  rel: "noopener"
370
- }, "↗ " + g(e.title || e.url), 9, De)]))), 128))], 2))), 128)) : (p(), n(F, {
373
+ }, "↗ " + g(e.title || e.url), 9, Oe)]))), 128))], 2))), 128)) : (p(), n(N, {
371
374
  key: 10,
372
375
  media: t.media,
373
376
  language: o.language,
@@ -378,7 +381,7 @@ var V = {
378
381
  "language",
379
382
  "dir"
380
383
  ])),
381
- t.onDisplayIn?.groups.length ? (p(), i("div", Oe, [a("p", ke, g(_(R)("record.related.onDisplayIn")), 1), c(re, {
384
+ t.onDisplayIn?.groups.length ? (p(), i("div", ke, [a("p", Ae, g(_(I)("record.related.onDisplayIn")), 1), c(ae, {
382
385
  heading: "",
383
386
  groups: t.onDisplayIn.groups,
384
387
  "pending-label": t.onDisplayIn.pendingLabel,
@@ -388,23 +391,23 @@ var V = {
388
391
  "pending-label",
389
392
  "dir"
390
393
  ])])) : r("", !0),
391
- t.database ? (p(), i("div", Ae, [a("p", je, g(t.database.label), 1), a("p", Me, [a("a", {
394
+ t.database ? (p(), i("div", je, [a("p", Me, g(t.database.label), 1), a("p", Ne, [a("a", {
392
395
  href: t.database.url,
393
396
  target: "_blank",
394
397
  rel: "noopener"
395
- }, "↗ " + g(t.database.name), 9, Ne)])])) : r("", !0),
396
- t.overallDatabase ? (p(), i("div", Pe, [a("p", Fe, g(t.overallDatabase.label), 1), a("p", Ie, [a("a", {
397
- href: _(D).overallDatabase,
398
+ }, "↗ " + g(t.database.name), 9, Pe)])])) : r("", !0),
399
+ t.overallDatabase ? (p(), i("div", Fe, [a("p", Ie, g(t.overallDatabase.label), 1), a("p", Le, [a("a", {
400
+ href: _(E).overallDatabase,
398
401
  target: "_blank",
399
402
  rel: "noopener"
400
- }, "↗ " + g(t.overallDatabase.linkLabel), 9, Le)])])) : r("", !0),
401
- t.download ? (p(), i("div", Re, [a("p", ze, g(t.download.label), 1), a("p", {
403
+ }, "↗ " + g(t.overallDatabase.linkLabel), 9, Re)])])) : r("", !0),
404
+ t.download ? (p(), i("div", ze, [a("p", Be, g(t.download.label), 1), a("p", {
402
405
  class: "mwnf-sheet-related__line mwnf-sheet-related__line--action",
403
- onClick: He
406
+ onClick: Ue
404
407
  }, "➤ " + g(t.download.pdfLabel), 1)])) : r("", !0)
405
408
  ])) : r("", !0)], 64))), 128))])]),
406
409
  _: 2
407
- }, [m(ee.value, (e) => ({
410
+ }, [m(te.value, (e) => ({
408
411
  name: e,
409
412
  fn: y((n) => [h(t.$slots, e, d(l(n)))])
410
413
  }))]), 1032, [
@@ -414,7 +417,7 @@ var V = {
414
417
  "style"
415
418
  ])) : (p(), n(_(S), { key: 1 }));
416
419
  }
417
- }, Ve = "mwnf-on-display__theme", J = (e) => k(e ?? ""), Y = (e) => e?.titles?.en ?? Object.values(e?.titles ?? {})[0] ?? "", X = (e) => `<span class="${Ve}">${e}</span>`;
420
+ }, q = "mwnf-on-display__theme", J = (e) => O(e ?? ""), Y = (e) => e?.titles?.en ?? Object.values(e?.titles ?? {})[0] ?? "", X = (e) => `<span class="${q}">${e}</span>`;
418
421
  function Z(e, t, n) {
419
422
  return n && e.site === n ? {
420
423
  id: e.path,
@@ -423,7 +426,7 @@ function Z(e, t, n) {
423
426
  } : {
424
427
  id: `${e.site}${e.path}`,
425
428
  label: t,
426
- href: e.url ?? A(e.site, e.path),
429
+ href: e.url ?? k(e.site, e.path),
427
430
  external: !0
428
431
  };
429
432
  }
@@ -463,7 +466,7 @@ function He(e, t, n = null) {
463
466
  return i;
464
467
  }
465
468
  function Ue(e, t) {
466
- return e?.item_url ? e.item_url : e?.site ? A(e.site, `/item/${t.id}`) : e?.legacy_host;
469
+ return e?.item_url ? e.item_url : e?.site ? k(e.site, `/item/${t.id}`) : e?.legacy_host;
467
470
  }
468
471
  // src/dxa/relatedKind.js
469
472
  function We(e, t) {
@@ -471,10 +474,10 @@ function We(e, t) {
471
474
  }
472
475
  // src/dxa/homeLinks.js
473
476
  function Ge(e, { homeSite: t, siteKey: n } = {}) {
474
- return e && "source_url" in e ? e.source_url ?? null : t && t !== n ? A(t, `/item/${e.id}`) : null;
477
+ return e && "source_url" in e ? e.source_url ?? null : t && t !== n ? k(t, `/item/${e.id}`) : null;
475
478
  }
476
479
  function Ke(e, t) {
477
- return "url" in e ? e.url ?? "" : t ? A(t, `/item/${e.id}`) : "";
480
+ return "url" in e ? e.url ?? "" : t ? k(t, `/item/${e.id}`) : "";
478
481
  }
479
482
  // src/dxa/LegacyItemSheet.vue
480
483
  var qe = { class: "mwnf-dxa-item__languages" }, Je = ["dir"], Ye = ["href"], Xe = ["href"], Ze = ["innerHTML"], Qe = ["innerHTML"], $e = ["dir"], et = { class: "mwnf-dxa-gallery-item__label" }, tt = {
@@ -504,9 +507,9 @@ var qe = { class: "mwnf-dxa-item__languages" }, Je = ["dir"], Ye = ["href"], Xe
504
507
  }
505
508
  },
506
509
  setup(o) {
507
- let l = o, { t: d } = j(), f = x(), h = M(), v = ne(), S = N(), C = te(), w = (e, t) => e?.[t] ?? e?.en ?? Object.values(e ?? {})[0] ?? "";
508
- function O({ record: e, inPackage: t, references: n, ctx: r }) {
509
- let i = r.language, a = new Map((e.related_items ?? []).map((e) => [e.id, e])), o = (e) => E(w(a.get(e)?.justifications, i)), s = (e) => We(a.get(e) ?? { id: e }, C.itemById.value), c = (e) => (e ?? "").replace(/\.$/, ""), l = t.map((e) => ({
510
+ let l = o, { t: d } = ie(), f = x(), h = A(), v = re(), S = j(), C = ne(), w = (e, t) => e?.[t] ?? e?.en ?? Object.values(e ?? {})[0] ?? "";
511
+ function D({ record: e, inPackage: t, references: n, ctx: r }) {
512
+ let i = r.language, a = new Map((e.related_items ?? []).map((e) => [e.id, e])), o = (e) => ee(w(a.get(e)?.justifications, i)), s = (e) => We(a.get(e) ?? { id: e }, C.itemById.value), c = (e) => (e ?? "").replace(/\.$/, ""), l = t.map((e) => ({
510
513
  id: e.id,
511
514
  kind: s(e.id),
512
515
  image: e.image,
@@ -528,7 +531,7 @@ var qe = { class: "mwnf-dxa-item__languages" }, Je = ["dir"], Ye = ["href"], Xe
528
531
  }), d = (e.related_items ?? []).map((e) => e.id);
529
532
  return [...l, ...u].sort((e, t) => d.indexOf(e.id) - d.indexOf(t.id));
530
533
  }
531
- let k = t(() => ({
534
+ let O = t(() => ({
532
535
  ...l.itemDetail,
533
536
  sourceDatabase: !1,
534
537
  sourceCredit: !1,
@@ -548,7 +551,7 @@ var qe = { class: "mwnf-dxa-item__languages" }, Je = ["dir"], Ye = ["href"], Xe
548
551
  },
549
552
  ...l.words.relatedObjects ? {
550
553
  heading: l.words.relatedObjects,
551
- objectTiles: O
554
+ objectTiles: D
552
555
  } : {},
553
556
  ...l.words.relatedMonuments ? { monumentsHeading: l.words.relatedMonuments } : {},
554
557
  onDisplayIn: {
@@ -560,13 +563,13 @@ var qe = { class: "mwnf-dxa-item__languages" }, Je = ["dir"], Ye = ["href"], Xe
560
563
  }
561
564
  }
562
565
  }));
563
- function A(e) {
566
+ function k(e) {
564
567
  return Ge(e, {
565
568
  homeSite: h.links(e?.project_id)?.homeSite,
566
569
  siteKey: v.manifest?.site?.key
567
- }) ?? ee(f);
570
+ }) ?? te(f);
568
571
  }
569
- function P(e) {
572
+ function M(e) {
570
573
  try {
571
574
  let { host: t, pathname: n } = new URL(e), r = n.split("/").find(Boolean);
572
575
  return r ? `${t}/${r}` : t;
@@ -574,8 +577,8 @@ var qe = { class: "mwnf-dxa-item__languages" }, Je = ["dir"], Ye = ["href"], Xe
574
577
  return e;
575
578
  }
576
579
  }
577
- let F = (e) => S.projectColors?.[e?.project_id] ?? "";
578
- function I(e, t) {
580
+ let N = (e) => S.projectColors?.[e?.project_id] ?? "";
581
+ function P(e, t) {
579
582
  let n = h.label(t?.project_id) ?? "", r = n ? e.indexOf(` ${n},`) : -1;
580
583
  return r < 0 ? {
581
584
  before: e,
@@ -587,19 +590,19 @@ var qe = { class: "mwnf-dxa-item__languages" }, Je = ["dir"], Ye = ["href"], Xe
587
590
  after: e.slice(r + 1 + n.length)
588
591
  };
589
592
  }
590
- function L(e) {
593
+ function F(e) {
591
594
  return {
592
595
  to: l.itemDetail.museum?.route?.(e.record?.partner_id) ?? null,
593
596
  holder: e.text?.holder ? T(String(e.text.holder)) : ""
594
597
  };
595
598
  }
596
- return (t, l) => (p(), n(q, {
597
- spec: k.value,
599
+ return (t, l) => (p(), n(K, {
600
+ spec: O.value,
598
601
  id: o.id,
599
602
  "data-getter": o.dataGetter,
600
603
  class: "mwnf-dxa-item mwnf-dxa-gallery-item"
601
604
  }, {
602
- header: y(({ languages: e, language: t, select: n }) => [a("div", qe, [c(z, {
605
+ header: y(({ languages: e, language: t, select: n }) => [a("div", qe, [c(L, {
603
606
  languages: e,
604
607
  language: t,
605
608
  from: 1,
@@ -608,27 +611,27 @@ var qe = { class: "mwnf-dxa-item__languages" }, Je = ["dir"], Ye = ["href"], Xe
608
611
  "languages",
609
612
  "language",
610
613
  "onSelect"
611
- ])]), c(R)]),
614
+ ])]), c(I)]),
612
615
  "after-media": y(({ record: e, dir: t }) => [e ? (p(), i("div", {
613
616
  key: 0,
614
617
  class: "mwnf-dxa-gallery-item__links",
615
618
  dir: t || void 0
616
619
  }, [a("p", null, [a("a", {
617
- href: A(e),
620
+ href: k(e),
618
621
  target: "_blank",
619
622
  rel: "noopener"
620
623
  }, [l[0] ||= a("span", {
621
624
  class: "mwnf-dxa-gallery-item__icon",
622
625
  "aria-hidden": "true"
623
- }, "↗", -1), a("bdi", null, [s(g(_(d)("record.source.label")) + " ", 1), a("span", null, "(" + g(P(A(e))) + ")", 1)])], 8, Ye)]), a("p", null, [a("a", {
624
- href: _(D).myCollection,
626
+ }, "↗", -1), a("bdi", null, [s(g(_(d)("record.source.label")) + " ", 1), a("span", null, "(" + g(M(k(e))) + ")", 1)])], 8, Ye)]), a("p", null, [a("a", {
627
+ href: _(E).myCollection,
625
628
  target: "_blank",
626
629
  rel: "noopener"
627
630
  }, [l[1] ||= a("span", {
628
631
  class: "mwnf-dxa-gallery-item__icon",
629
632
  "aria-hidden": "true"
630
633
  }, "↗", -1), s(g(_(d)("record.action.addToCollection")), 1)], 8, Xe)])], 8, Je)) : r("", !0)]),
631
- museum: y((t) => [(p(!0), i(e, null, m([L(t)], (t) => (p(), i(e, { key: "museum" }, [t.to && t.holder ? (p(), n(_(b), {
634
+ museum: y((t) => [(p(!0), i(e, null, m([F(t)], (t) => (p(), i(e, { key: "museum" }, [t.to && t.holder ? (p(), n(_(b), {
632
635
  key: 0,
633
636
  to: t.to,
634
637
  class: "mwnf-dxa-gallery-item__museum"
@@ -647,22 +650,22 @@ var qe = { class: "mwnf-dxa-item__languages" }, Je = ["dir"], Ye = ["href"], Xe
647
650
  class: "mwnf-dxa-gallery-item__credits",
648
651
  dir: f || void 0
649
652
  }, [
650
- l ? (p(), i(e, { key: 0 }, [a("p", et, g(_(d)("record.citation.ofThisPage")), 1), (p(!0), i(e, null, m([I(l, t)], (e) => (p(), i("p", tt, [
653
+ l ? (p(), i(e, { key: 0 }, [a("p", et, g(_(d)("record.citation.ofThisPage")), 1), (p(!0), i(e, null, m([P(l, t)], (e) => (p(), i("p", tt, [
651
654
  s(g(e.before), 1),
652
655
  a("span", nt, g(e.project), 1),
653
656
  s(g(e.after) + " ", 1),
654
- a("span", rt, g(A(t)), 1)
657
+ a("span", rt, g(k(t)), 1)
655
658
  ]))), 128))], 64)) : r("", !0),
656
659
  (p(!0), i(e, null, m(n, (e) => (p(), i("p", {
657
660
  key: e.label,
658
661
  class: "mwnf-dxa-gallery-item__credit"
659
662
  }, [a("span", it, g(e.label), 1), a("span", null, g(e.value), 1)]))), 128)),
660
663
  c ? (p(), i("p", at, [a("span", ot, g(_(d)(o.words.workingNumber)), 1), s(g(" ") + g(c), 1)])) : r("", !0),
661
- a("div", { class: u(["mwnf-dxa-gallery-item__source", F(t)]) }, [a("p", null, g(_(d)("record.source.label")), 1), a("p", null, [a("a", {
662
- href: A(t),
664
+ a("div", { class: u(["mwnf-dxa-gallery-item__source", N(t)]) }, [a("p", null, g(_(d)("record.source.label")), 1), a("p", null, [a("a", {
665
+ href: k(t),
663
666
  target: "_blank",
664
667
  rel: "noopener"
665
- }, g(A(t)), 9, st)])], 2)
668
+ }, g(k(t)), 9, st)])], 2)
666
669
  ], 8, $e)) : r("", !0)]),
667
670
  _: 1
668
671
  }, 8, [
@@ -672,4 +675,4 @@ var qe = { class: "mwnf-dxa-item__languages" }, Je = ["dir"], Ye = ["href"], Xe
672
675
  ]));
673
676
  }
674
677
  };
675
- export { q as n, ct as t };
678
+ export { K as n, ct as t };
package/dist/dxa.js CHANGED
@@ -12,7 +12,7 @@ import { romanFor as Ot } from "@museumwnf/viewer-core/dxa";
12
12
  import { t as kt } from "./SiteShell-D0u1FGMu.js";
13
13
  import { i as At, n as jt, r as Mt, t as Nt } from "./chrome-Bv_mLlHM.js";
14
14
  import { i as Pt } from "./PageShell-BAtk_qcb.js";
15
- import { n as Ft, t as It } from "./LegacyItemSheet-Bk-3fiQP.js";
15
+ import { n as Ft, t as It } from "./LegacyItemSheet-BPI7vIv2.js";
16
16
  import { n as Lt, r as X } from "./Theme-BUfsZDdm.js";
17
17
  import { n as Rt, r as zt, t as Bt } from "./themeSpecs-C0tSNkSd.js";
18
18
  // src/dxa/PartnerDetail.vue
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@museumwnf/viewer-layout",
3
- "version": "3.87.0",
3
+ "version": "3.88.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",