@museumwnf/viewer-layout 3.80.2 → 3.82.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.
@@ -17,10 +17,10 @@ var V = {
17
17
  key: 1,
18
18
  class: "mwnf-related-objects__empty",
19
19
  "aria-hidden": "true"
20
- }, K = ["innerHTML"], q = {
20
+ }, K = ["innerHTML"], ce = {
21
21
  class: "mwnf-related-objects__tooltip",
22
22
  "aria-hidden": "true"
23
- }, ce = ["innerHTML"], le = { key: 0 }, ue = {
23
+ }, le = ["innerHTML"], ue = { key: 0 }, de = {
24
24
  __name: "RelatedObjects",
25
25
  props: {
26
26
  heading: {
@@ -56,42 +56,42 @@ var V = {
56
56
  "to",
57
57
  "href",
58
58
  "external"
59
- ]), a("div", q, [a("div", null, [a("span", { innerHTML: t.name }, null, 8, ce), t.country ? (p(), i(e, { key: 0 }, [s(", " + g(t.country), 1)], 64)) : r("", !0)]), t.justification ? (p(), i("div", le, g(t.justification), 1)) : r("", !0)])]))), 128))])])) : r("", !0);
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);
60
60
  }
61
- }, de = {
61
+ }, fe = {
62
62
  key: 0,
63
63
  class: "mwnf-sheet-source"
64
- }, fe = {
64
+ }, pe = {
65
65
  key: 0,
66
66
  class: "mwnf-sheet-source__line"
67
- }, pe = {
67
+ }, me = {
68
68
  key: 1,
69
69
  class: "mwnf-sheet-source__collection"
70
- }, me = ["href"], he = {
70
+ }, he = ["href"], ge = {
71
71
  key: 1,
72
72
  class: "mwnf-sheet-notice"
73
- }, ge = {
73
+ }, _e = {
74
74
  key: "museum",
75
75
  class: "mwnf-sheet-museum"
76
- }, _e = ["innerHTML"], ve = {
76
+ }, ve = ["innerHTML"], ye = {
77
77
  key: 0,
78
78
  class: "mwnf-sheet-related"
79
- }, ye = {
79
+ }, be = {
80
80
  key: 0,
81
81
  class: "mwnf-sheet-related__heading mwnf-sheet-related__heading--caps"
82
- }, be = {
82
+ }, xe = {
83
83
  key: 1,
84
84
  class: "mwnf-sheet-related__description"
85
- }, xe = {
85
+ }, Se = {
86
86
  key: 0,
87
87
  class: "mwnf-sheet-related__references"
88
- }, Se = {
88
+ }, Ce = {
89
89
  key: 2,
90
90
  class: "mwnf-sheet-related__unresolved"
91
- }, Ce = {
91
+ }, we = {
92
92
  key: 5,
93
93
  class: "mwnf-sheet-related__line"
94
- }, we = ["href"], Te = { class: "mwnf-sheet-related__heading" }, Ee = ["href"], De = { key: 11 }, Oe = { class: "mwnf-sheet-related__heading" }, ke = { key: 12 }, Ae = { class: "mwnf-sheet-related__heading" }, je = { class: "mwnf-sheet-related__line" }, Me = ["href"], Ne = { key: 13 }, Pe = { class: "mwnf-sheet-related__heading" }, Fe = { class: "mwnf-sheet-related__line" }, Ie = ["href"], Le = { key: 14 }, Re = { class: "mwnf-sheet-related__heading" }, ze = "sheet.field.", J = {
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 = {
95
95
  __name: "ItemDetailView",
96
96
  props: {
97
97
  spec: {
@@ -119,7 +119,7 @@ var V = {
119
119
  "aside"
120
120
  ]), A = t(() => Object.keys(O).filter((e) => !k.has(e))), j = t(() => !x.dataGetter || x.dataGetter(x.id) != null), { t: L } = ne();
121
121
  function z(e) {
122
- if (typeof e != "string" || !e.startsWith(ze)) return e;
122
+ if (typeof e != "string" || !e.startsWith(Be)) return e;
123
123
  let t = `sheet.dxa.${e.slice(12)}`;
124
124
  return L(t) === t ? e : t;
125
125
  }
@@ -138,19 +138,19 @@ var V = {
138
138
  inline: !1
139
139
  }
140
140
  };
141
- }), V = re(), 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, q = {
141
+ }), V = re(), 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 = {
142
142
  "islamicart.museumwnf.org": "core.project.islamicArt",
143
143
  "baroqueart.museumwnf.org": "core.project.baroqueArt",
144
144
  "sharinghistory.museumwnf.org": "core.project.sharingHistory"
145
145
  };
146
- function ce(e) {
146
+ function le(e) {
147
147
  try {
148
- let t = q[new URL(K(e)).host];
148
+ let t = ce[new URL(K(e)).host];
149
149
  if (t) return L(t);
150
150
  } catch {}
151
151
  return V.label(e.project_id);
152
152
  }
153
- function le(e, t) {
153
+ function ue(e, t) {
154
154
  if (!e) return null;
155
155
  let n = B.value.sourceDatabase === !1 ? null : B.value.sourceDatabase ?? null, r = null;
156
156
  if (n) {
@@ -168,23 +168,23 @@ var V = {
168
168
  notice: o
169
169
  };
170
170
  }
171
- let J = te(), Be = C("partners"), Y = C("countries");
172
- w(["partners", "countries"]), J.loadTranslations("countries", "en");
173
- function X(e, t) {
174
- let n = J.tr("countries", e, t, "en");
175
- return E(n.name ?? Y.value?.get(e)?.internal_name ?? "");
171
+ let q = te(), Ve = C("partners"), J = C("countries");
172
+ w(["partners", "countries"]), q.loadTranslations("countries", "en");
173
+ function Y(e, t) {
174
+ let n = q.tr("countries", e, t, "en");
175
+ return E(n.name ?? J.value?.get(e)?.internal_name ?? "");
176
176
  }
177
- function Z(e) {
178
- let t = e.text?.holder ? T(String(e.text.holder)) : "", n = B.value.museum === !1 ? null : B.value.museum ?? null, r = n ? Be.value?.get(e.record?.partner_id) : null;
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;
179
179
  return {
180
180
  holder: t,
181
- view: r ? ee(r, J.tr("partners", r.id, e.language, "en"), {
182
- countryLabel: (t) => X(t, e.language),
181
+ view: r ? ee(r, q.tr("partners", r.id, e.language, "en"), {
182
+ countryLabel: (t) => Y(t, e.language),
183
183
  route: (t) => n.route ? n.route(t.id, e) : null
184
184
  }) : null
185
185
  };
186
186
  }
187
- function Q(e, t) {
187
+ function Z(e, t) {
188
188
  if (!e) return null;
189
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) => ({
190
190
  ...e,
@@ -210,7 +210,7 @@ var V = {
210
210
  } : null, d = n.databaseLabel && K(e) ? {
211
211
  url: K(e),
212
212
  label: L(n.databaseLabel),
213
- name: ce(e)
213
+ name: le(e)
214
214
  } : null, f = n.overallDatabase && n.overallDatabase !== !1 ? {
215
215
  label: L(n.overallDatabase.label),
216
216
  linkLabel: L(n.overallDatabase.linkLabel)
@@ -256,8 +256,8 @@ var V = {
256
256
  }
257
257
  };
258
258
  }
259
- let $ = M(), Ve = t(() => {
260
- let e = se($.chrome, "world.png");
259
+ let Q = M(), $ = t(() => {
260
+ let e = se(Q.chrome, "world.png");
261
261
  return e ? { "--mwnf-dxa-glossary-image": `url("${e}")` } : null;
262
262
  });
263
263
  function He() {
@@ -268,32 +268,32 @@ var V = {
268
268
  spec: B.value,
269
269
  id: b.id,
270
270
  entity: b.entity,
271
- style: f(Ve.value)
271
+ style: f($.value)
272
272
  }, o({
273
- "before-sheet": y((n) => [h(t.$slots, "before-sheet", d(l(n)), () => [(p(!0), i(e, null, m([le(n.record, n)], (t) => (p(), i(e, { key: "before-sheet" }, [t?.source || t?.addToCollectionLabel ? (p(), i("div", de, [t.source ? (p(), i("p", fe, [t.source.chipClass ? (p(), i("span", {
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", {
274
274
  key: 0,
275
275
  class: u(["mwnf-chip", t.source.chipClass]),
276
276
  "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", pe, [a("a", {
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
278
  href: _(D).myCollection,
279
279
  target: "_blank",
280
280
  rel: "noopener"
281
- }, "↗ " + g(t.addToCollectionLabel), 9, me)])) : r("", !0)])) : r("", !0), t?.notice ? (p(), i("div", he, [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([Z(a)], (e) => (p(), i("div", ge, [e.holder ? (p(), i("p", {
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", {
283
283
  key: 0,
284
284
  class: "mwnf-sheet-museum__holder",
285
285
  innerHTML: e.holder
286
- }, null, 8, _e)) : r("", !0), e.view ? (p(), n(ae, {
286
+ }, null, 8, ve)) : r("", !0), e.view ? (p(), n(ae, {
287
287
  key: 1,
288
288
  variant: "summary",
289
289
  partner: e.view,
290
290
  label: "partner.info.about",
291
291
  dir: a.dir
292
292
  }, null, 8, ["partner", "dir"])) : r("", !0)]))), 128))])]),
293
- 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", ve, [
294
- t.title ? (p(), i("p", ye, g(t.title), 1)) : r("", !0),
295
- t.description ? (p(), i("p", be, g(t.description), 1)) : r("", !0),
296
- t.tiles ? (p(), n(ue, {
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, {
297
297
  key: 2,
298
298
  heading: t.heading,
299
299
  tiles: t.tiles
@@ -304,14 +304,14 @@ var V = {
304
304
  variant: t.variant,
305
305
  "action-label": t.actionLabel
306
306
  }, {
307
- default: y(() => [t.references.length ? (p(), i("ul", xe, [(p(!0), i(e, null, m(t.references, (n) => (p(), i("li", { key: n.id }, [
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 }, [
308
308
  n.chipClass ? (p(), i("span", {
309
309
  key: 0,
310
310
  class: u(["mwnf-chip", n.chipClass]),
311
311
  "aria-hidden": "true"
312
312
  }, null, 2)) : r("", !0),
313
313
  n.name ? (p(), i(e, { key: 1 }, [s(g(n.name), 1)], 64)) : r("", !0),
314
- t.notInPackageLabel ? (p(), i("span", Se, g(t.notInPackageLabel), 1)) : r("", !0)
314
+ t.notInPackageLabel ? (p(), i("span", Ce, g(t.notInPackageLabel), 1)) : r("", !0)
315
315
  ]))), 128))])) : r("", !0)]),
316
316
  _: 2
317
317
  }, 1032, [
@@ -320,17 +320,17 @@ var V = {
320
320
  "variant",
321
321
  "action-label"
322
322
  ])) : r("", !0),
323
- t.monumentTiles.length ? (p(), n(ue, {
323
+ t.monumentTiles.length ? (p(), n(de, {
324
324
  key: 4,
325
325
  heading: t.monumentsHeading,
326
326
  tiles: t.monumentTiles,
327
327
  class: "mwnf-related-objects--monuments"
328
328
  }, null, 8, ["heading", "tiles"])) : r("", !0),
329
- t.artisticIntroduction ? (p(), i("p", Ce, [a("a", {
329
+ t.artisticIntroduction ? (p(), i("p", we, [a("a", {
330
330
  href: t.artisticIntroduction.url,
331
331
  target: "_blank",
332
332
  rel: "noopener"
333
- }, "↗ " + g(t.artisticIntroduction.label), 9, we)])) : r("", !0),
333
+ }, "↗ " + g(t.artisticIntroduction.label), 9, Te)])) : r("", !0),
334
334
  t.timeline ? (p(), n(I, {
335
335
  key: o.record.id,
336
336
  info: t.timeline
@@ -360,14 +360,14 @@ var V = {
360
360
  t.mediaGroups ? (p(!0), i(e, { key: 9 }, m(t.mediaGroups, (t) => (p(), i("div", {
361
361
  key: t.type,
362
362
  class: u(["mwnf-sheet-related__media", `mwnf-sheet-related__media--${t.type}`])
363
- }, [a("p", Te, g(t.heading), 1), (p(!0), i(e, null, m(t.entries, (e) => (p(), i("p", {
363
+ }, [a("p", Ee, g(t.heading), 1), (p(!0), i(e, null, m(t.entries, (e) => (p(), i("p", {
364
364
  key: e.url,
365
365
  class: "mwnf-sheet-related__line"
366
366
  }, [a("a", {
367
367
  href: e.url,
368
368
  target: "_blank",
369
369
  rel: "noopener"
370
- }, "↗ " + g(e.title || e.url), 9, Ee)]))), 128))], 2))), 128)) : (p(), n(P, {
370
+ }, "↗ " + g(e.title || e.url), 9, De)]))), 128))], 2))), 128)) : (p(), n(P, {
371
371
  key: 10,
372
372
  media: t.media,
373
373
  language: o.language,
@@ -378,7 +378,7 @@ var V = {
378
378
  "language",
379
379
  "dir"
380
380
  ])),
381
- t.onDisplayIn?.groups.length ? (p(), i("div", De, [a("p", Oe, g(_(L)("record.related.onDisplayIn")), 1), c(R, {
381
+ t.onDisplayIn?.groups.length ? (p(), i("div", Oe, [a("p", ke, g(_(L)("record.related.onDisplayIn")), 1), c(R, {
382
382
  heading: "",
383
383
  groups: t.onDisplayIn.groups,
384
384
  "pending-label": t.onDisplayIn.pendingLabel,
@@ -388,17 +388,17 @@ var V = {
388
388
  "pending-label",
389
389
  "dir"
390
390
  ])])) : r("", !0),
391
- t.database ? (p(), i("div", ke, [a("p", Ae, g(t.database.label), 1), a("p", je, [a("a", {
391
+ t.database ? (p(), i("div", Ae, [a("p", je, g(t.database.label), 1), a("p", Me, [a("a", {
392
392
  href: t.database.url,
393
393
  target: "_blank",
394
394
  rel: "noopener"
395
- }, "↗ " + g(t.database.name), 9, Me)])])) : r("", !0),
396
- t.overallDatabase ? (p(), i("div", Ne, [a("p", Pe, g(t.overallDatabase.label), 1), a("p", Fe, [a("a", {
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
397
  href: _(D).overallDatabase,
398
398
  target: "_blank",
399
399
  rel: "noopener"
400
- }, "↗ " + g(t.overallDatabase.linkLabel), 9, Ie)])])) : r("", !0),
401
- t.download ? (p(), i("div", Le, [a("p", Re, g(t.download.label), 1), a("p", {
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", {
402
402
  class: "mwnf-sheet-related__line mwnf-sheet-related__line--action",
403
403
  onClick: He
404
404
  }, "➤ " + g(t.download.pdfLabel), 1)])) : r("", !0)
@@ -414,8 +414,8 @@ var V = {
414
414
  "style"
415
415
  ])) : (p(), n(_(S), { key: 1 }));
416
416
  }
417
- }, Be = "mwnf-on-display__theme", Y = (e) => O(e ?? ""), X = (e) => e?.titles?.en ?? Object.values(e?.titles ?? {})[0] ?? "", Z = (e) => `<span class="${Be}">${e}</span>`;
418
- function Q(e, t, n) {
417
+ }, Ve = "mwnf-on-display__theme", J = (e) => O(e ?? ""), Y = (e) => e?.titles?.en ?? Object.values(e?.titles ?? {})[0] ?? "", X = (e) => `<span class="${Ve}">${e}</span>`;
418
+ function Z(e, t, n) {
419
419
  return n && e.site === n ? {
420
420
  id: e.path,
421
421
  label: t,
@@ -423,10 +423,11 @@ function Q(e, t, n) {
423
423
  } : {
424
424
  id: `${e.site}${e.path}`,
425
425
  label: t,
426
- href: k(e.site, e.path),
426
+ href: e.url ?? k(e.site, e.path),
427
427
  external: !0
428
428
  };
429
429
  }
430
+ var Q = (e) => e.order ?? e.legacy_order?.[0] ?? 0;
430
431
  function $(e) {
431
432
  return e.toLowerCase().split(" ").filter((e) => ![
432
433
  "a",
@@ -434,14 +435,14 @@ function $(e) {
434
435
  "the"
435
436
  ].includes(e)).join(" ");
436
437
  }
437
- function Ve(e, t, n = null) {
438
+ function He(e, t, n = null) {
438
439
  let r = e?.exhibition_references ?? [], i = [], a = r.filter((e) => e.list === "virtual" || e.list === "sharing_history");
439
440
  a.length && i.push({
440
- caption: a[0].project ? Y(a[0].project.name) : "",
441
- links: a.map((e) => Q(e, [
442
- Y(X(e.exhibition)),
443
- Z(Y(X(e.theme))),
444
- ...e.subtheme ? [Z(Y(X(e.subtheme)))] : []
441
+ caption: a[0].project ? J(a[0].project.name) : "",
442
+ links: a.map((e) => Z(e, [
443
+ J(Y(e.exhibition)),
444
+ X(J(Y(e.theme))),
445
+ ...e.subtheme ? [X(J(Y(e.subtheme)))] : []
445
446
  ].join(" | "), n))
446
447
  });
447
448
  let o = r.filter((e) => e.list === "exhibition"), s = o.filter((e) => e.exhibition?.titles?.[t]), c = s.length ? {
@@ -450,9 +451,9 @@ function Ve(e, t, n = null) {
450
451
  } : {
451
452
  refs: o.filter((e) => e.exhibition?.titles?.en),
452
453
  lang: "en"
453
- }, l = (e) => e?.titles?.[c.lang] ?? e?.titles?.en ?? "", u = [...c.refs].sort((e, t) => $(l(e.exhibition)).localeCompare($(l(t.exhibition)), "en", { sensitivity: "base" }) || (e.legacy_order?.[0] ?? 0) - (t.legacy_order?.[0] ?? 0));
454
+ }, l = (e) => e?.titles?.[c.lang] ?? e?.titles?.en ?? "", u = [...c.refs].sort((e, t) => $(l(e.exhibition)).localeCompare($(l(t.exhibition)), "en", { sensitivity: "base" }) || Q(e) - Q(t));
454
455
  for (let e of u) {
455
- let t = Y(l(e.exhibition)), r = Q(e, `${Y(l(e.theme))} | ${Z(Y(l(e.subtheme)))}`, n), a = i[i.length - 1];
456
+ let t = J(l(e.exhibition)), r = Z(e, `${J(l(e.theme))} | ${X(J(l(e.subtheme)))}`, n), a = i[i.length - 1];
456
457
  a?.exhibition === e.exhibition.id ? a.links.push(r) : i.push({
457
458
  exhibition: e.exhibition.id,
458
459
  caption: t,
@@ -461,18 +462,21 @@ function Ve(e, t, n = null) {
461
462
  }
462
463
  return i;
463
464
  }
465
+ function Ue(e, t) {
466
+ return e?.item_url ? e.item_url : e?.site ? k(e.site, `/item/${t.id}`) : e?.legacy_host;
467
+ }
464
468
  // src/dxa/relatedKind.js
465
- function He(e, t) {
469
+ function We(e, t) {
466
470
  return (e?.type ?? t?.get(e?.id)?.type) === "monument" ? "monument" : "object";
467
471
  }
468
472
  // src/dxa/LegacyItemSheet.vue
469
- var Ue = { class: "mwnf-dxa-item__languages" }, We = ["dir"], Ge = ["href"], Ke = ["href"], qe = ["innerHTML"], Je = ["innerHTML"], Ye = ["dir"], Xe = { class: "mwnf-dxa-gallery-item__label" }, Ze = {
473
+ var Ge = { class: "mwnf-dxa-item__languages" }, Ke = ["dir"], qe = ["href"], Je = ["href"], Ye = ["innerHTML"], Xe = ["innerHTML"], Ze = ["dir"], Qe = { class: "mwnf-dxa-gallery-item__label" }, $e = {
470
474
  key: "citation",
471
475
  class: "mwnf-dxa-gallery-item__citation"
472
- }, Qe = { class: "mwnf-dxa-gallery-item__project" }, $e = { class: "mwnf-dxa-gallery-item__address" }, et = { class: "mwnf-dxa-gallery-item__credit-label" }, tt = {
476
+ }, et = { class: "mwnf-dxa-gallery-item__project" }, tt = { class: "mwnf-dxa-gallery-item__address" }, nt = { class: "mwnf-dxa-gallery-item__credit-label" }, rt = {
473
477
  key: 1,
474
478
  class: "mwnf-dxa-gallery-item__number"
475
- }, nt = { class: "mwnf-dxa-gallery-item__number-label" }, rt = ["href"], it = {
479
+ }, it = { class: "mwnf-dxa-gallery-item__number-label" }, at = ["href"], ot = {
476
480
  __name: "LegacyItemSheet",
477
481
  props: {
478
482
  id: {
@@ -495,7 +499,7 @@ var Ue = { class: "mwnf-dxa-item__languages" }, We = ["dir"], Ge = ["href"], Ke
495
499
  setup(o) {
496
500
  let l = o, { t: d } = ne(), f = x(), h = re(), v = te(), S = M(), C = j(), w = (e, t) => e?.[t] ?? e?.en ?? Object.values(e ?? {})[0] ?? "";
497
501
  function ee({ record: e, inPackage: t, references: n, ctx: r }) {
498
- 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) => He(a.get(e) ?? { id: e }, C.itemById.value), c = (e) => (e ?? "").replace(/\.$/, ""), l = t.map((e) => ({
502
+ 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) => ({
499
503
  id: e.id,
500
504
  kind: s(e.id),
501
505
  image: e.image,
@@ -544,8 +548,8 @@ var Ue = { class: "mwnf-dxa-item__languages" }, We = ["dir"], Ge = ["href"], Ke
544
548
  ...l.itemDetail.related?.onDisplayIn,
545
549
  exhibitionsHeading: l.words.exhibitions,
546
550
  galleriesHeading: "core.project.galleries",
547
- href: (e, t) => e.site ? k(e.site, `/item/${t.id}`) : e.legacy_host,
548
- exhibitions: (e, t) => Ve(e, t.language, v.manifest?.site?.key)
551
+ href: Ue,
552
+ exhibitions: (e, t) => He(e, t.language, v.manifest?.site?.key)
549
553
  }
550
554
  }
551
555
  }));
@@ -580,13 +584,13 @@ var Ue = { class: "mwnf-dxa-item__languages" }, We = ["dir"], Ge = ["href"], Ke
580
584
  holder: e.text?.holder ? T(String(e.text.holder)) : ""
581
585
  };
582
586
  }
583
- return (t, l) => (p(), n(J, {
587
+ return (t, l) => (p(), n(q, {
584
588
  spec: O.value,
585
589
  id: o.id,
586
590
  "data-getter": o.dataGetter,
587
591
  class: "mwnf-dxa-item mwnf-dxa-gallery-item"
588
592
  }, {
589
- header: y(({ languages: e, language: t, select: n }) => [a("div", Ue, [c(z, {
593
+ header: y(({ languages: e, language: t, select: n }) => [a("div", Ge, [c(z, {
590
594
  languages: e,
591
595
  language: t,
592
596
  from: 1,
@@ -607,14 +611,14 @@ var Ue = { class: "mwnf-dxa-item__languages" }, We = ["dir"], Ge = ["href"], Ke
607
611
  }, [l[0] ||= a("span", {
608
612
  class: "mwnf-dxa-gallery-item__icon",
609
613
  "aria-hidden": "true"
610
- }, "↗", -1), a("bdi", null, [s(g(_(d)("record.source.label")) + " ", 1), a("span", null, "(" + g(P(N(e))) + ")", 1)])], 8, Ge)]), a("p", null, [a("a", {
614
+ }, "↗", -1), a("bdi", null, [s(g(_(d)("record.source.label")) + " ", 1), a("span", null, "(" + g(P(N(e))) + ")", 1)])], 8, qe)]), a("p", null, [a("a", {
611
615
  href: _(D).myCollection,
612
616
  target: "_blank",
613
617
  rel: "noopener"
614
618
  }, [l[1] ||= a("span", {
615
619
  class: "mwnf-dxa-gallery-item__icon",
616
620
  "aria-hidden": "true"
617
- }, "↗", -1), s(g(_(d)("record.action.addToCollection")), 1)], 8, Ke)])], 8, We)) : r("", !0)]),
621
+ }, "↗", -1), s(g(_(d)("record.action.addToCollection")), 1)], 8, Je)])], 8, Ke)) : r("", !0)]),
618
622
  museum: y((t) => [(p(!0), i(e, null, m([R(t)], (t) => (p(), i(e, { key: "museum" }, [t.to && t.holder ? (p(), n(_(b), {
619
623
  key: 0,
620
624
  to: t.to,
@@ -623,34 +627,34 @@ var Ue = { class: "mwnf-dxa-item__languages" }, We = ["dir"], Ge = ["href"], Ke
623
627
  default: y(() => [l[2] ||= a("span", {
624
628
  class: "mwnf-dxa-gallery-item__icon",
625
629
  "aria-hidden": "true"
626
- }, "↗", -1), a("span", { innerHTML: t.holder }, null, 8, qe)]),
630
+ }, "↗", -1), a("span", { innerHTML: t.holder }, null, 8, Ye)]),
627
631
  _: 2
628
632
  }, 1032, ["to"])) : t.holder ? (p(), i("span", {
629
633
  key: 1,
630
634
  innerHTML: t.holder
631
- }, null, 8, Je)) : r("", !0)], 64))), 128))]),
635
+ }, null, 8, Xe)) : r("", !0)], 64))), 128))]),
632
636
  credits: y(({ record: t, credits: n, workingNumber: c, citation: l, dir: f }) => [t ? (p(), i("div", {
633
637
  key: 0,
634
638
  class: "mwnf-dxa-gallery-item__credits",
635
639
  dir: f || void 0
636
640
  }, [
637
- l ? (p(), i(e, { key: 0 }, [a("p", Xe, g(_(d)("record.citation.ofThisPage")), 1), (p(!0), i(e, null, m([I(l, t)], (e) => (p(), i("p", Ze, [
641
+ l ? (p(), i(e, { key: 0 }, [a("p", Qe, g(_(d)("record.citation.ofThisPage")), 1), (p(!0), i(e, null, m([I(l, t)], (e) => (p(), i("p", $e, [
638
642
  s(g(e.before), 1),
639
- a("span", Qe, g(e.project), 1),
643
+ a("span", et, g(e.project), 1),
640
644
  s(g(e.after) + " ", 1),
641
- a("span", $e, g(N(t)), 1)
645
+ a("span", tt, g(N(t)), 1)
642
646
  ]))), 128))], 64)) : r("", !0),
643
647
  (p(!0), i(e, null, m(n, (e) => (p(), i("p", {
644
648
  key: e.label,
645
649
  class: "mwnf-dxa-gallery-item__credit"
646
- }, [a("span", et, g(e.label), 1), a("span", null, g(e.value), 1)]))), 128)),
647
- c ? (p(), i("p", tt, [a("span", nt, g(_(d)(o.words.workingNumber)), 1), s(g(" ") + g(c), 1)])) : r("", !0),
650
+ }, [a("span", nt, g(e.label), 1), a("span", null, g(e.value), 1)]))), 128)),
651
+ c ? (p(), i("p", rt, [a("span", it, g(_(d)(o.words.workingNumber)), 1), s(g(" ") + g(c), 1)])) : r("", !0),
648
652
  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", {
649
653
  href: N(t),
650
654
  target: "_blank",
651
655
  rel: "noopener"
652
- }, g(N(t)), 9, rt)])], 2)
653
- ], 8, Ye)) : r("", !0)]),
656
+ }, g(N(t)), 9, at)])], 2)
657
+ ], 8, Ze)) : r("", !0)]),
654
658
  _: 1
655
659
  }, 8, [
656
660
  "spec",
@@ -659,4 +663,4 @@ var Ue = { class: "mwnf-dxa-item__languages" }, We = ["dir"], Ge = ["href"], Ke
659
663
  ]));
660
664
  }
661
665
  };
662
- export { J as n, it as t };
666
+ export { q as n, ot as t };
package/dist/dxa.js CHANGED
@@ -12,7 +12,7 @@ import { romanFor as Dt } from "@museumwnf/viewer-core/dxa";
12
12
  import { t as Ot } from "./SiteShell-D0u1FGMu.js";
13
13
  import { i as kt, n as At, r as jt, t as Mt } from "./chrome-Bv_mLlHM.js";
14
14
  import { i as Nt } from "./PageShell-BAtk_qcb.js";
15
- import { n as Pt, t as Ft } from "./LegacyItemSheet-DKgLfAz_.js";
15
+ import { n as Pt, t as Ft } from "./LegacyItemSheet-YTByn-Aa.js";
16
16
  import { n as It, r as X } from "./Theme-BUfsZDdm.js";
17
17
  import { n as Lt, r as Rt, t as zt } 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.80.2",
3
+ "version": "3.82.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",