@museumwnf/viewer-layout 3.59.0 → 3.61.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.
Files changed (30) hide show
  1. package/dist/{FeaturedRecord-CTqnQFox.js → FeaturedRecord-DaGLHyhD.js} +2 -3
  2. package/dist/{GlossaryPopover-B7E6BsjS.js → GlossaryPopover-DbQKXhx9.js} +1 -2
  3. package/dist/ItemDetailView-D7m2C1Mg.js +310 -0
  4. package/dist/{OnDisplayIn-DZHRKjL0.js → OnDisplayIn-DW4iC5BB.js} +10 -5
  5. package/dist/{PageShell-CcaLOuXI.js → PageShell-CPtgzcxv.js} +1 -2
  6. package/dist/{PartnerMap-BIKd-AGP.js → PartnerMap-U-Hi2FBi.js} +17 -14
  7. package/dist/RecordView-BE4mbj6G.js +363 -0
  8. package/dist/{SiteShell-CYQxXosD.js → SiteShell-qvsZO4Iz.js} +3 -4
  9. package/dist/{Theme-Co1bf81Z.js → Theme-4RmyRY0x.js} +29 -30
  10. package/dist/{TimelineEventList-CTJJOWGh.js → TimelineEventList-1feZA5t7.js} +3 -4
  11. package/dist/{TimelineResultsView-D15BMWZM.js → TimelineResultsView-CkH3NDqL.js} +264 -255
  12. package/dist/{chrome-DNsZQXrL.js → chrome-Bv_mLlHM.js} +1 -2
  13. package/dist/components.js +1 -2
  14. package/dist/{content-PQeMx8U5.js → content-BNS5U0Xv.js} +3 -4
  15. package/dist/content.js +6 -6
  16. package/dist/{data-CXRsGwLQ.js → data-EKYeMQcC.js} +16 -11
  17. package/dist/{data-BINc9QjV.js → data-kqAkoQvf.js} +2 -3
  18. package/dist/dxa.js +1006 -669
  19. package/dist/index.js +8 -8
  20. package/dist/minisite.js +14 -26
  21. package/dist/standalone.js +209 -217
  22. package/dist/{themeSpecs-DP9xWiVJ.js → themeSpecs-CsDpl4rR.js} +2 -3
  23. package/dist/viewer-layout.css +1 -1
  24. package/dist/views.js +5 -6
  25. package/package.json +10 -10
  26. package/src/dxa/testing.js +98 -57
  27. package/src/styles/dxa-gallery.css +32 -4
  28. package/src/tokens.reference.css +12 -1
  29. package/dist/ItemDetailView-Bbn-uNaR.js +0 -304
  30. package/dist/RecordView-DEKHp1A3.js +0 -348
@@ -1,6 +1,6 @@
1
- import { d as e } from "./PartnerMap-BIKd-AGP.js";
1
+ import { d as e } from "./PartnerMap-U-Hi2FBi.js";
2
2
  import { Fragment as t, computed as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createVNode as o, openBlock as s, renderList as c, renderSlot as l, toDisplayString as u, useSlots as d, withCtx as f } from "vue";
3
- //#region src/content/FeaturedRecord.vue
3
+ // src/content/FeaturedRecord.vue
4
4
  var p = {
5
5
  key: 0,
6
6
  class: "mwnf-featured"
@@ -84,5 +84,4 @@ var p = {
84
84
  }, 8, ["to", "href"])])])) : r("", !0);
85
85
  }
86
86
  };
87
- //#endregion
88
87
  export { x as t };
@@ -1,6 +1,6 @@
1
1
  import { createCommentVNode as e, createElementBlock as t, createElementVNode as n, onBeforeUnmount as r, openBlock as i, ref as a, toDisplayString as o, unref as s, watch as c } from "vue";
2
2
  import { useI18n as l } from "@museumwnf/viewer-core/i18n";
3
- //#region src/content/GlossaryPopover.vue
3
+ // src/content/GlossaryPopover.vue
4
4
  var u = ["aria-label", "dir"], d = { class: "mwnf-popover__title" }, f = ["aria-label"], p = { class: "mwnf-popover__body" }, m = { class: "mwnf-popover__term" }, h = ["innerHTML"], g = {
5
5
  key: 1,
6
6
  class: "mwnf-popover__definition"
@@ -51,5 +51,4 @@ var u = ["aria-label", "dir"], d = { class: "mwnf-popover__title" }, f = ["aria-
51
51
  }, null, 8, h)) : _.term.definition ? (i(), t("p", g, o(_.term.definition), 1)) : e("", !0)])], 8, u)) : e("", !0);
52
52
  }
53
53
  };
54
- //#endregion
55
54
  export { _ as t };
@@ -0,0 +1,310 @@
1
+ import { i as e, n as t, o as n, r, t as i } from "./OnDisplayIn-DW4iC5BB.js";
2
+ import { n as a } from "./TimelineEventList-1feZA5t7.js";
3
+ import { r as o } from "./PartnerMap-U-Hi2FBi.js";
4
+ import { t as s } from "./RecordView-BE4mbj6G.js";
5
+ import { t as c } from "./chrome-Bv_mLlHM.js";
6
+ import { Fragment as l, computed as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createElementVNode as m, createSlots as ee, createTextVNode as h, createVNode as g, guardReactiveProps as _, normalizeClass as v, normalizeProps as y, normalizeStyle as te, openBlock as b, renderList as x, renderSlot as S, toDisplayString as C, unref as w, useSlots as ne, withCtx as T } from "vue";
7
+ import { NotFoundView as re, byId as E, loadEntities as ie, mdInline as D, mdStrip as ae, mwnfLinks as O, partnerView as oe, useDataPackage as se, useI18n as ce, useProjects as le, useSiteConfig as ue } from "@museumwnf/viewer-core";
8
+ // src/dxa/ItemDetailView.vue
9
+ var k = {
10
+ key: 0,
11
+ class: "mwnf-sheet-source"
12
+ }, A = {
13
+ key: 0,
14
+ class: "mwnf-sheet-source__line"
15
+ }, j = {
16
+ key: 1,
17
+ class: "mwnf-sheet-source__collection"
18
+ }, M = ["href"], N = {
19
+ key: 1,
20
+ class: "mwnf-sheet-notice"
21
+ }, P = {
22
+ key: "museum",
23
+ class: "mwnf-sheet-museum"
24
+ }, F = ["innerHTML"], I = {
25
+ key: 0,
26
+ class: "mwnf-sheet-related"
27
+ }, L = {
28
+ key: 0,
29
+ class: "mwnf-sheet-related__heading mwnf-sheet-related__heading--caps"
30
+ }, R = {
31
+ key: 1,
32
+ class: "mwnf-sheet-related__description"
33
+ }, z = {
34
+ key: 0,
35
+ class: "mwnf-sheet-related__references"
36
+ }, B = {
37
+ key: 2,
38
+ class: "mwnf-sheet-related__unresolved"
39
+ }, V = {
40
+ key: 3,
41
+ class: "mwnf-sheet-related__line"
42
+ }, H = ["href"], U = { key: 7 }, de = { class: "mwnf-sheet-related__heading" }, fe = { key: 8 }, pe = { class: "mwnf-sheet-related__heading" }, me = { class: "mwnf-sheet-related__line" }, W = ["href"], he = { key: 9 }, ge = { class: "mwnf-sheet-related__heading" }, _e = { class: "mwnf-sheet-related__line" }, ve = ["href"], ye = { key: 10 }, be = { class: "mwnf-sheet-related__heading" }, xe = "sheet.field.", G = {
43
+ __name: "ItemDetailView",
44
+ props: {
45
+ spec: {
46
+ type: Object,
47
+ required: !0
48
+ },
49
+ id: {
50
+ type: String,
51
+ required: !0
52
+ },
53
+ entity: {
54
+ type: String,
55
+ default: ""
56
+ },
57
+ dataGetter: {
58
+ type: Function,
59
+ default: null
60
+ }
61
+ },
62
+ setup(G) {
63
+ let K = G, Se = ne(), Ce = /* @__PURE__ */ new Set([
64
+ "before-sheet",
65
+ "museum",
66
+ "related",
67
+ "aside"
68
+ ]), we = u(() => Object.keys(Se).filter((e) => !Ce.has(e))), Te = u(() => !K.dataGetter || K.dataGetter(K.id) != null), { t: q } = ce();
69
+ function Ee(e) {
70
+ if (typeof e != "string" || !e.startsWith(xe)) return e;
71
+ let t = `sheet.dxa.${e.slice(12)}`;
72
+ return q(t) === t ? e : t;
73
+ }
74
+ let J = u(() => Array.isArray(K.spec.fields) ? {
75
+ ...K.spec,
76
+ fields: K.spec.fields.map((e) => ({
77
+ ...e,
78
+ label: Ee(e.label)
79
+ }))
80
+ } : K.spec), Y = le(), X = (e, t) => (e.name ?? "").localeCompare(t.name ?? ""), De = (e) => (e.gallery_references ?? []).filter((e) => e.kind === "gallery").sort(X), Oe = (e) => (e.gallery_references ?? []).filter((e) => e.kind === "exhibition").sort(X), Z = (e) => Y.links(e.project_id)?.artisticIntroductionUrl ?? null, Q = (e) => Y.links(e.project_id)?.relatedDatabaseUrl ?? null;
81
+ function ke(e, t) {
82
+ if (!e) return null;
83
+ let n = J.value.sourceDatabase === !1 ? null : J.value.sourceDatabase ?? null, r = null;
84
+ if (n) {
85
+ let i = n.chipClass ? n.chipClass(e, t) : null, a = Y.label(e.project_id);
86
+ (i || a) && (r = {
87
+ chipClass: i,
88
+ name: a,
89
+ label: q(n.label ?? "record.sheet.sourceDatabase")
90
+ });
91
+ }
92
+ let i = n && n.addToCollection !== !1 ? q(n.addToCollection?.label ?? "record.action.addToCollection") : null, a = J.value.notice === !1 ? null : J.value.notice ?? null, o = a && a.show(e, t) ? q(a.label) : null;
93
+ return {
94
+ source: r,
95
+ addToCollectionLabel: i,
96
+ notice: o
97
+ };
98
+ }
99
+ let $ = se(), Ae = E("partners"), je = E("countries");
100
+ ie(["partners", "countries"]), $.loadTranslations("countries", "en");
101
+ function Me(e, t) {
102
+ let n = $.tr("countries", e, t, "en");
103
+ return ae(n.name ?? je.value?.get(e)?.internal_name ?? "");
104
+ }
105
+ function Ne(e) {
106
+ let t = e.text?.holder ? D(String(e.text.holder)) : "", n = J.value.museum === !1 ? null : J.value.museum ?? null, r = n ? Ae.value?.get(e.record?.partner_id) : null;
107
+ return {
108
+ holder: t,
109
+ view: r ? oe(r, $.tr("partners", r.id, e.language, "en"), {
110
+ countryLabel: (t) => Me(t, e.language),
111
+ route: (t) => n.route ? n.route(t.id, e) : null
112
+ }) : null
113
+ };
114
+ }
115
+ function Pe(e, t) {
116
+ if (!e) return null;
117
+ let n = J.value.related ?? {}, r = t.records ?? [], i = t.outside ?? [], a = K.dataGetter ? r.filter((e) => K.dataGetter(e.id) != null) : r, o = K.dataGetter ? r.filter((e) => K.dataGetter(e.id) == null).map((t) => (e.related_items ?? []).find((e) => e.id === t.id)).filter(Boolean) : [], s = [...i, ...o].map((e) => ({
118
+ ...e,
119
+ name: e.project_id ? Y.label(e.project_id) : null,
120
+ chipClass: n.outsideChip ? n.outsideChip(e, t) : null
121
+ })), c = (t) => (n.onDisplayIn?.href ? n.onDisplayIn.href(t, e) : t.legacy_host) || "", l = (e) => ({
122
+ id: e.id,
123
+ label: D(e.name ?? ""),
124
+ href: c(e),
125
+ external: !!c(e)
126
+ }), u = n.onDisplayIn && n.onDisplayIn !== !1 ? {
127
+ pendingLabel: n.onDisplayIn.linkPendingLabel ?? "",
128
+ groups: [{
129
+ heading: n.onDisplayIn.exhibitionsHeading ?? "record.related.exhibitions",
130
+ links: Oe(e).map(l)
131
+ }, {
132
+ heading: n.onDisplayIn.galleriesHeading ?? "record.related.galleries",
133
+ links: De(e).map(l)
134
+ }].filter((e) => e.links.length)
135
+ } : null, d = n.databaseLabel && Q(e) ? {
136
+ url: Q(e),
137
+ label: q(n.databaseLabel),
138
+ name: Y.label(e.project_id)
139
+ } : null, f = n.overallDatabase && n.overallDatabase !== !1 ? {
140
+ label: q(n.overallDatabase.label),
141
+ linkLabel: q(n.overallDatabase.linkLabel)
142
+ } : null;
143
+ return {
144
+ title: n.title ? q(n.title) : "",
145
+ description: n.description ? q(n.description) : "",
146
+ heading: q(n.heading ?? "record.related.items"),
147
+ variant: n.variant ?? "grid",
148
+ actionLabel: n.actionLabel ? q(n.actionLabel) : "",
149
+ inPackage: a,
150
+ references: s,
151
+ notInPackageLabel: n.notInPackageLabel ? q(n.notInPackageLabel) : "",
152
+ artisticIntroduction: n.artisticIntroductionLabel && Z(e) ? {
153
+ url: Z(e),
154
+ label: q(n.artisticIntroductionLabel)
155
+ } : null,
156
+ timeline: n.timeline ? n.timeline(e, t) : null,
157
+ glossary: n.glossary !== !1,
158
+ glossaryLabels: n.glossaryLabels ?? {},
159
+ dynasties: n.dynasties ? n.dynasties(e, t.language, t) : null,
160
+ dynastiesHeading: q(n.dynastiesHeading ?? "record.dynasty.list"),
161
+ media: n.media === !1 ? [] : e.media ?? [],
162
+ onDisplayIn: u,
163
+ database: d,
164
+ overallDatabase: f,
165
+ download: n.download === !1 ? null : {
166
+ label: q("record.action.download"),
167
+ pdfLabel: q("record.action.downloadPdf")
168
+ }
169
+ };
170
+ }
171
+ let Fe = ue(), Ie = u(() => {
172
+ let e = c(Fe.chrome, "world.png");
173
+ return e ? { "--mwnf-dxa-glossary-image": `url("${e}")` } : null;
174
+ });
175
+ function Le() {
176
+ window.print();
177
+ }
178
+ return (c, u) => Te.value ? (b(), d(s, {
179
+ key: 0,
180
+ spec: J.value,
181
+ id: G.id,
182
+ entity: G.entity,
183
+ style: te(Ie.value)
184
+ }, ee({
185
+ "before-sheet": T((e) => [S(c.$slots, "before-sheet", y(_(e)), () => [(b(!0), p(l, null, x([ke(e.record, e)], (t) => (b(), p(l, { key: "before-sheet" }, [t?.source || t?.addToCollectionLabel ? (b(), p("div", k, [t.source ? (b(), p("p", A, [t.source.chipClass ? (b(), p("span", {
186
+ key: 0,
187
+ class: v(["mwnf-chip", t.source.chipClass]),
188
+ "aria-hidden": "true"
189
+ }, null, 2)) : f("", !0), t.source.name ? (b(), p(l, { key: 1 }, [h(C(t.source.label) + ": " + C(t.source.name), 1)], 64)) : f("", !0)])) : f("", !0), t.addToCollectionLabel ? (b(), p("p", j, [m("a", {
190
+ href: w(O).myCollection,
191
+ target: "_blank",
192
+ rel: "noopener"
193
+ }, "↗ " + C(t.addToCollectionLabel), 9, M)])) : f("", !0)])) : f("", !0), t?.notice ? (b(), p("div", N, [h(C(t.notice) + " ", 1), m("strong", null, [m("em", null, C(e.languages.map((e) => e.label).join(", ")), 1)])])) : f("", !0)], 64))), 128))])]),
194
+ museum: T((e) => [S(c.$slots, "museum", y(_(e)), () => [(b(!0), p(l, null, x([Ne(e)], (t) => (b(), p("div", P, [t.holder ? (b(), p("p", {
195
+ key: 0,
196
+ class: "mwnf-sheet-museum__holder",
197
+ innerHTML: t.holder
198
+ }, null, 8, F)) : f("", !0), t.view ? (b(), d(a, {
199
+ key: 1,
200
+ variant: "summary",
201
+ partner: t.view,
202
+ label: "partner.info.about",
203
+ dir: e.dir
204
+ }, null, 8, ["partner", "dir"])) : f("", !0)]))), 128))])]),
205
+ related: T(() => []),
206
+ aside: T((a) => [S(c.$slots, "related", y(_(a)), () => [(b(!0), p(l, null, x([Pe(a.record, a)], (s) => (b(), p(l, { key: a.record?.id ?? "related" }, [s ? (b(), p("div", I, [
207
+ s.title ? (b(), p("p", L, C(s.title), 1)) : f("", !0),
208
+ s.description ? (b(), p("p", R, C(s.description), 1)) : f("", !0),
209
+ s.inPackage.length || s.references.length ? (b(), d(o, {
210
+ key: 2,
211
+ heading: s.heading,
212
+ records: s.inPackage,
213
+ variant: s.variant,
214
+ "action-label": s.actionLabel
215
+ }, {
216
+ default: T(() => [s.references.length ? (b(), p("ul", z, [(b(!0), p(l, null, x(s.references, (e) => (b(), p("li", { key: e.id }, [
217
+ e.chipClass ? (b(), p("span", {
218
+ key: 0,
219
+ class: v(["mwnf-chip", e.chipClass]),
220
+ "aria-hidden": "true"
221
+ }, null, 2)) : f("", !0),
222
+ e.name ? (b(), p(l, { key: 1 }, [h(C(e.name), 1)], 64)) : f("", !0),
223
+ s.notInPackageLabel ? (b(), p("span", B, C(s.notInPackageLabel), 1)) : f("", !0)
224
+ ]))), 128))])) : f("", !0)]),
225
+ _: 2
226
+ }, 1032, [
227
+ "heading",
228
+ "records",
229
+ "variant",
230
+ "action-label"
231
+ ])) : f("", !0),
232
+ s.artisticIntroduction ? (b(), p("p", V, [m("a", {
233
+ href: s.artisticIntroduction.url,
234
+ target: "_blank",
235
+ rel: "noopener"
236
+ }, "↗ " + C(s.artisticIntroduction.label), 9, H)])) : f("", !0),
237
+ s.timeline ? (b(), d(r, {
238
+ key: a.record.id,
239
+ info: s.timeline
240
+ }, null, 8, ["info"])) : f("", !0),
241
+ s.glossary ? (b(), d(n, {
242
+ key: 5,
243
+ language: a.language,
244
+ labels: s.glossaryLabels,
245
+ dir: a.dir
246
+ }, null, 8, [
247
+ "language",
248
+ "labels",
249
+ "dir"
250
+ ])) : f("", !0),
251
+ s.dynasties?.records?.length ? (b(), d(e, {
252
+ key: 6,
253
+ heading: s.dynastiesHeading,
254
+ dynasties: s.dynasties.records,
255
+ tr: s.dynasties.tr,
256
+ dir: a.dir
257
+ }, null, 8, [
258
+ "heading",
259
+ "dynasties",
260
+ "tr",
261
+ "dir"
262
+ ])) : f("", !0),
263
+ g(t, {
264
+ media: s.media,
265
+ language: a.language,
266
+ descriptions: !1,
267
+ dir: a.dir
268
+ }, null, 8, [
269
+ "media",
270
+ "language",
271
+ "dir"
272
+ ]),
273
+ s.onDisplayIn?.groups.length ? (b(), p("div", U, [m("p", de, C(w(q)("record.related.onDisplayIn")), 1), g(i, {
274
+ heading: "",
275
+ groups: s.onDisplayIn.groups,
276
+ "pending-label": s.onDisplayIn.pendingLabel,
277
+ dir: a.dir
278
+ }, null, 8, [
279
+ "groups",
280
+ "pending-label",
281
+ "dir"
282
+ ])])) : f("", !0),
283
+ s.database ? (b(), p("div", fe, [m("p", pe, C(s.database.label), 1), m("p", me, [m("a", {
284
+ href: s.database.url,
285
+ target: "_blank",
286
+ rel: "noopener"
287
+ }, "↗ " + C(s.database.name), 9, W)])])) : f("", !0),
288
+ s.overallDatabase ? (b(), p("div", he, [m("p", ge, C(s.overallDatabase.label), 1), m("p", _e, [m("a", {
289
+ href: w(O).overallDatabase,
290
+ target: "_blank",
291
+ rel: "noopener"
292
+ }, "↗ " + C(s.overallDatabase.linkLabel), 9, ve)])])) : f("", !0),
293
+ s.download ? (b(), p("div", ye, [m("p", be, C(s.download.label), 1), m("p", {
294
+ class: "mwnf-sheet-related__line mwnf-sheet-related__line--action",
295
+ onClick: Le
296
+ }, "➤ " + C(s.download.pdfLabel), 1)])) : f("", !0)
297
+ ])) : f("", !0)], 64))), 128))])]),
298
+ _: 2
299
+ }, [x(we.value, (e) => ({
300
+ name: e,
301
+ fn: T((t) => [S(c.$slots, e, y(_(t)))])
302
+ }))]), 1032, [
303
+ "spec",
304
+ "id",
305
+ "entity",
306
+ "style"
307
+ ])) : (b(), d(w(re), { key: 1 }));
308
+ }
309
+ };
310
+ export { G as t };
@@ -1,9 +1,9 @@
1
- import { d as e, o as t } from "./PartnerMap-BIKd-AGP.js";
1
+ import { d as e, o as t } from "./PartnerMap-U-Hi2FBi.js";
2
2
  import { Fragment as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, createVNode as l, mergeProps as u, normalizeClass as d, openBlock as f, ref as p, renderList as m, renderSlot as h, resolveDynamicComponent as g, toDisplayString as _, unref as v, vModelSelect as y, vModelText as b, watch as x, withCtx as S, withDirectives as C, withKeys as w } from "vue";
3
3
  import { useI18n as T } from "@museumwnf/viewer-core/i18n";
4
4
  import { md as E, mdInline as D, renderInline as O, searchGlossary as ee } from "@museumwnf/viewer-core";
5
5
  import { useRouter as k } from "vue-router";
6
- //#region src/content/BackLink.vue
6
+ // src/content/BackLink.vue
7
7
  var A = ["href"], te = {
8
8
  class: "mwnf-back-bar__arrow",
9
9
  "aria-hidden": "true"
@@ -62,13 +62,19 @@ var A = ["href"], te = {
62
62
  href: t.href,
63
63
  class: "mwnf-back-link__button"
64
64
  }, {
65
- default: S(() => [c(" ↩ " + _(n.$t(t.label)), 1)]),
65
+ default: S(() => [r[1] ||= s("span", {
66
+ class: "mwnf-back-link__arrow",
67
+ "aria-hidden": "true"
68
+ }, "↩", -1), c(_(n.$t(t.label)), 1)]),
66
69
  _: 1
67
70
  }, 8, ["to", "href"])) : (f(), o("button", {
68
71
  key: 1,
69
72
  class: "mwnf-back-link__button",
70
73
  onClick: d
71
- }, " ↩ " + _(n.$t(t.label)), 1))]));
74
+ }, [r[2] ||= s("span", {
75
+ class: "mwnf-back-link__arrow",
76
+ "aria-hidden": "true"
77
+ }, "↩", -1), c(_(n.$t(t.label)), 1)]))]));
72
78
  }
73
79
  }, M = ["dir"], N = { class: "mwnf-glossary-tool__toggle" }, P = { class: "mwnf-glossary-tool__panel" }, F = { class: "mwnf-glossary-tool__heading" }, I = { class: "mwnf-glossary-tool__instructions" }, L = ["aria-expanded", "aria-label"], R = {
74
80
  key: 0,
@@ -402,5 +408,4 @@ var A = ["href"], te = {
402
408
  }, 16, ["dir"])) : a("", !0);
403
409
  }
404
410
  };
405
- //#endregion
406
411
  export { Q as a, ue as i, we as n, W as o, xe as r, j as s, Ae as t };
@@ -1,6 +1,6 @@
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, normalizeClass as l, openBlock as u, ref as d, renderList as f, renderSlot as p, resolveDynamicComponent as m, toDisplayString as h, unref as g, useSlots as _, vModelText as v, withCtx as y, withDirectives as b, withModifiers as x } from "vue";
2
2
  import { renderBlock as S, useI18n as C } from "@museumwnf/viewer-core/i18n";
3
- //#region src/sections/AppHeader.vue
3
+ // src/sections/AppHeader.vue
4
4
  var w = {
5
5
  key: 0,
6
6
  class: "mwnf-header"
@@ -1157,5 +1157,4 @@ var w = {
1157
1157
  ]));
1158
1158
  }
1159
1159
  };
1160
- //#endregion
1161
1160
  export { Y as a, K as c, $e as i, G as l, $ as n, J as o, Z as r, q as s, ft as t, I as u };
@@ -2,7 +2,7 @@ import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r
2
2
  import { useI18n as C } from "@museumwnf/viewer-core/i18n";
3
3
  import { renderInline as w, sourceUrl as T } from "@museumwnf/viewer-core";
4
4
  import { useRoute as E } from "vue-router";
5
- //#region src/content/SmartLink.vue
5
+ // src/content/SmartLink.vue
6
6
  var D = [
7
7
  "href",
8
8
  "target",
@@ -267,21 +267,25 @@ var D = [
267
267
  shortDescriptionOpen: {
268
268
  type: Boolean,
269
269
  default: !1
270
+ },
271
+ toggleLabels: {
272
+ type: Object,
273
+ default: () => ({})
270
274
  }
271
275
  },
272
276
  setup(t) {
273
- let o = t, { t: s } = C(), c = p(o.shortDescriptionOpen);
277
+ let o = t, { t: s } = C(), c = (e) => s(e ? o.toggleLabels.hide ?? "record.action.hideShortDescription" : o.toggleLabels.view ?? "record.action.viewShortDescription"), l = p(o.shortDescriptionOpen);
274
278
  b(() => o.shortDescription, () => {
275
- c.value = o.shortDescriptionOpen;
279
+ l.value = o.shortDescriptionOpen;
276
280
  });
277
- let l = (e) => e.render === "custom" || e.render === "link";
278
- return (o, d) => (f(), i("div", {
281
+ let d = (e) => e.render === "custom" || e.render === "link";
282
+ return (o, s) => (f(), i("div", {
279
283
  class: u(["mwnf-sheet", `mwnf-sheet--${t.layout}`]),
280
284
  dir: t.dir || void 0
281
285
  }, [(f(), n(g(t.layout === "list" ? "dl" : "table"), { class: "mwnf-sheet__rows" }, {
282
286
  default: x(() => [t.layout === "list" ? (f(!0), i(e, { key: 1 }, m(t.rows, (n) => (f(), i(e, { key: n.key }, [
283
287
  a("dt", { class: u(["mwnf-sheet__label", `mwnf-sheet__label--${n.key}`]) }, _(n.label), 3),
284
- a("dd", he, [l(n) ? h(o.$slots, n.key, { row: n }, () => [n.render === "link" ? (f(), i("a", {
288
+ a("dd", he, [d(n) ? h(o.$slots, n.key, { row: n }, () => [n.render === "link" ? (f(), i("a", {
285
289
  key: 0,
286
290
  href: n.value,
287
291
  target: "_blank",
@@ -294,14 +298,14 @@ var D = [
294
298
  t.shortDescription && n.key === t.shortDescriptionAfter ? (f(), i(e, { key: 0 }, [a("dt", ve, [a("button", {
295
299
  type: "button",
296
300
  class: "mwnf-sheet__toggle",
297
- "aria-expanded": c.value ? "true" : "false",
298
- onClick: d[1] ||= (e) => c.value = !c.value
299
- }, _(c.value ? v(s)("record.action.hideShortDescription") : v(s)("record.action.viewShortDescription")), 9, ye)]), a("dd", be, [c.value ? (f(), i("div", {
301
+ "aria-expanded": l.value ? "true" : "false",
302
+ onClick: s[1] ||= (e) => l.value = !l.value
303
+ }, _(c(l.value)), 9, ye)]), a("dd", be, [l.value ? (f(), i("div", {
300
304
  key: 0,
301
305
  class: "mwnf-sheet__block",
302
306
  innerHTML: t.shortDescription.html
303
307
  }, null, 8, xe)) : r("", !0)])], 64)) : r("", !0)
304
- ], 64))), 128)) : (f(), i("tbody", ae, [(f(!0), i(e, null, m(t.rows, (n) => (f(), i(e, { key: n.key }, [a("tr", { class: u(["mwnf-sheet__row", `mwnf-sheet__row--${n.key}`]) }, [a("th", oe, _(n.label), 1), a("td", se, [l(n) ? h(o.$slots, n.key, { row: n }, () => [n.render === "link" ? (f(), i("a", {
308
+ ], 64))), 128)) : (f(), i("tbody", ae, [(f(!0), i(e, null, m(t.rows, (n) => (f(), i(e, { key: n.key }, [a("tr", { class: u(["mwnf-sheet__row", `mwnf-sheet__row--${n.key}`]) }, [a("th", oe, _(n.label), 1), a("td", se, [d(n) ? h(o.$slots, n.key, { row: n }, () => [n.render === "link" ? (f(), i("a", {
305
309
  key: 0,
306
310
  href: n.value,
307
311
  target: "_blank",
@@ -313,9 +317,9 @@ var D = [
313
317
  }, null, 10, le))])], 2), t.shortDescription && n.key === t.shortDescriptionAfter ? (f(), i("tr", ue, [a("th", de, [a("button", {
314
318
  type: "button",
315
319
  class: "mwnf-sheet__toggle",
316
- "aria-expanded": c.value ? "true" : "false",
317
- onClick: d[0] ||= (e) => c.value = !c.value
318
- }, _(c.value ? v(s)("record.action.hideShortDescription") : v(s)("record.action.viewShortDescription")), 9, fe)]), a("td", pe, [c.value ? (f(), i("div", {
320
+ "aria-expanded": l.value ? "true" : "false",
321
+ onClick: s[0] ||= (e) => l.value = !l.value
322
+ }, _(c(l.value)), 9, fe)]), a("td", pe, [l.value ? (f(), i("div", {
319
323
  key: 0,
320
324
  class: "mwnf-sheet__block",
321
325
  innerHTML: t.shortDescription.html
@@ -710,5 +714,4 @@ var D = [
710
714
  ], 2)) : r("", !0);
711
715
  }
712
716
  };
713
- //#endregion
714
717
  export { Ve as a, re as c, O as d, Ge as i, Z as l, ut as n, Ee as o, Je as r, Se as s, ht as t, L as u };