@museumwnf/viewer-layout 2.14.0 → 2.15.1
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/README.md +24 -0
- package/dist/BackLink-BJ16COHd.js +106 -0
- package/dist/TimelineEventList-BmfLBaTT.js +967 -0
- package/dist/TimelineLookup-DRc43FkL.js +444 -0
- package/dist/TimelineResultsView-D78PPWk-.js +1220 -0
- package/dist/content-DUXrQ-l8.js +353 -0
- package/dist/content.js +5 -3
- package/dist/dxa.js +1116 -0
- package/dist/index.js +5 -3
- package/dist/viewer-layout.css +1 -1
- package/dist/views.js +400 -1609
- package/package.json +4 -3
- package/src/tokens.reference.css +4 -0
- package/dist/TimelineLookup-D8qr1tmY.js +0 -1403
- package/dist/content-G-g7U3_2.js +0 -452
|
@@ -0,0 +1,967 @@
|
|
|
1
|
+
import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createTextVNode as o, createVNode as s, getCurrentInstance as c, mergeProps as l, normalizeClass as u, onBeforeUnmount as d, openBlock as f, ref as p, renderList as m, renderSlot as h, resolveDynamicComponent as g, toDisplayString as _, unref as v, useId as y, useSlots as b, vModelText as x, watch as S, withCtx as C, withDirectives as w, withKeys as T, withModifiers as E } from "vue";
|
|
2
|
+
import { useI18n as D } from "@museumwnf/viewer-core/i18n";
|
|
3
|
+
import { sourceUrl as ee } from "@museumwnf/viewer-core";
|
|
4
|
+
import { useRoute as O } from "vue-router";
|
|
5
|
+
//#region src/content/SmartLink.vue
|
|
6
|
+
var te = [
|
|
7
|
+
"href",
|
|
8
|
+
"target",
|
|
9
|
+
"rel"
|
|
10
|
+
], k = {
|
|
11
|
+
__name: "SmartLink",
|
|
12
|
+
props: {
|
|
13
|
+
to: {
|
|
14
|
+
type: [String, Object],
|
|
15
|
+
default: null
|
|
16
|
+
},
|
|
17
|
+
href: {
|
|
18
|
+
type: String,
|
|
19
|
+
default: ""
|
|
20
|
+
},
|
|
21
|
+
external: {
|
|
22
|
+
type: Boolean,
|
|
23
|
+
default: !1
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
setup(e) {
|
|
27
|
+
let r = e, a = c()?.appContext.components.RouterLink ?? null, o = t(() => !!(r.to && a)), s = t(() => r.href || (typeof r.to == "string" ? r.to : ""));
|
|
28
|
+
return (t, r) => o.value ? (f(), n(g(v(a)), l({
|
|
29
|
+
key: 0,
|
|
30
|
+
to: e.to
|
|
31
|
+
}, t.$attrs), {
|
|
32
|
+
default: C(() => [h(t.$slots, "default")]),
|
|
33
|
+
_: 3
|
|
34
|
+
}, 16, ["to"])) : (f(), i("a", l({
|
|
35
|
+
key: 1,
|
|
36
|
+
href: s.value || void 0,
|
|
37
|
+
target: e.external ? "_blank" : void 0,
|
|
38
|
+
rel: e.external ? "noopener" : void 0
|
|
39
|
+
}, t.$attrs), [h(t.$slots, "default")], 16, te));
|
|
40
|
+
}
|
|
41
|
+
}, ne = ["aria-busy"], A = {
|
|
42
|
+
key: 0,
|
|
43
|
+
class: "mwnf-list__status"
|
|
44
|
+
}, j = {
|
|
45
|
+
key: 1,
|
|
46
|
+
class: "mwnf-list__rows"
|
|
47
|
+
}, M = { class: "mwnf-list__thumb" }, N = ["src", "alt"], P = { class: "mwnf-list__body" }, F = ["innerHTML"], I = {
|
|
48
|
+
key: 0,
|
|
49
|
+
class: "mwnf-list__meta"
|
|
50
|
+
}, L = {
|
|
51
|
+
key: 0,
|
|
52
|
+
class: "mwnf-list__badge"
|
|
53
|
+
}, R = {
|
|
54
|
+
key: 2,
|
|
55
|
+
class: "mwnf-list__empty"
|
|
56
|
+
}, z = {
|
|
57
|
+
__name: "RecordList",
|
|
58
|
+
props: {
|
|
59
|
+
records: {
|
|
60
|
+
type: Array,
|
|
61
|
+
default: () => []
|
|
62
|
+
},
|
|
63
|
+
loading: {
|
|
64
|
+
type: Boolean,
|
|
65
|
+
default: !1
|
|
66
|
+
},
|
|
67
|
+
loadingText: {
|
|
68
|
+
type: String,
|
|
69
|
+
default: ""
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
setup(t) {
|
|
73
|
+
let n = !!b().empty;
|
|
74
|
+
return (o, c) => (f(), i("div", {
|
|
75
|
+
class: u(["mwnf-list", { "mwnf-list--loading": t.loading }]),
|
|
76
|
+
"aria-busy": t.loading ? "true" : void 0
|
|
77
|
+
}, [t.loading && t.loadingText ? (f(), i("p", A, _(t.loadingText), 1)) : t.records.length ? (f(), i("ul", j, [(f(!0), i(e, null, m(t.records, (t) => (f(), i("li", {
|
|
78
|
+
key: t.id,
|
|
79
|
+
class: "mwnf-list__row"
|
|
80
|
+
}, [s(k, {
|
|
81
|
+
class: "mwnf-list__link",
|
|
82
|
+
to: t.to,
|
|
83
|
+
href: t.href
|
|
84
|
+
}, {
|
|
85
|
+
default: C(() => [a("span", M, [t.image ? (f(), i("img", {
|
|
86
|
+
key: 0,
|
|
87
|
+
src: t.image,
|
|
88
|
+
alt: t.imageAlt ?? "",
|
|
89
|
+
loading: "lazy"
|
|
90
|
+
}, null, 8, N)) : r("", !0)]), a("span", P, [a("span", {
|
|
91
|
+
class: "mwnf-list__name",
|
|
92
|
+
innerHTML: t.name
|
|
93
|
+
}, null, 8, F), t.meta?.length || t.badge ? (f(), i("span", I, [(f(!0), i(e, null, m(t.meta ?? [], (e, t) => (f(), i("span", {
|
|
94
|
+
key: t,
|
|
95
|
+
class: "mwnf-list__meta-item"
|
|
96
|
+
}, _(e), 1))), 128)), t.badge ? (f(), i("span", L, _(t.badge), 1)) : r("", !0)])) : r("", !0)])]),
|
|
97
|
+
_: 2
|
|
98
|
+
}, 1032, ["to", "href"])]))), 128))])) : v(n) ? (f(), i("div", R, [h(o.$slots, "empty")])) : r("", !0)], 10, ne));
|
|
99
|
+
}
|
|
100
|
+
}, B = ["aria-busy"], V = {
|
|
101
|
+
key: 0,
|
|
102
|
+
class: "mwnf-grid__status"
|
|
103
|
+
}, H = {
|
|
104
|
+
key: 1,
|
|
105
|
+
class: "mwnf-grid__tiles"
|
|
106
|
+
}, U = ["onMouseenter", "onFocusin"], W = { class: "mwnf-grid__media" }, G = ["src", "alt"], K = {
|
|
107
|
+
key: 1,
|
|
108
|
+
class: "mwnf-grid__image mwnf-grid__image--empty",
|
|
109
|
+
"aria-hidden": "true"
|
|
110
|
+
}, q = { class: "mwnf-grid__card" }, J = ["src"], Y = { class: "mwnf-grid__card-body" }, X = ["innerHTML"], Z = {
|
|
111
|
+
key: 0,
|
|
112
|
+
class: "mwnf-grid__badge"
|
|
113
|
+
}, re = {
|
|
114
|
+
key: 2,
|
|
115
|
+
class: "mwnf-grid__empty"
|
|
116
|
+
}, Q = {
|
|
117
|
+
__name: "RecordGrid",
|
|
118
|
+
props: {
|
|
119
|
+
records: {
|
|
120
|
+
type: Array,
|
|
121
|
+
default: () => []
|
|
122
|
+
},
|
|
123
|
+
loading: {
|
|
124
|
+
type: Boolean,
|
|
125
|
+
default: !1
|
|
126
|
+
},
|
|
127
|
+
loadingText: {
|
|
128
|
+
type: String,
|
|
129
|
+
default: ""
|
|
130
|
+
},
|
|
131
|
+
actionLabel: {
|
|
132
|
+
type: String,
|
|
133
|
+
default: ""
|
|
134
|
+
},
|
|
135
|
+
dateCutoff: {
|
|
136
|
+
type: Number,
|
|
137
|
+
default: 80
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
setup(t) {
|
|
141
|
+
let n = t, c = !!b().empty, l = p(null);
|
|
142
|
+
function d(e) {
|
|
143
|
+
let t = String(e ?? "");
|
|
144
|
+
return t.length > n.dateCutoff ? `${t.slice(0, n.dateCutoff - 1)}[...]` : t;
|
|
145
|
+
}
|
|
146
|
+
return (n, p) => (f(), i("div", {
|
|
147
|
+
class: u(["mwnf-grid", { "mwnf-grid--loading": t.loading }]),
|
|
148
|
+
"aria-busy": t.loading ? "true" : void 0
|
|
149
|
+
}, [t.loading && t.loadingText ? (f(), i("p", V, _(t.loadingText), 1)) : t.records.length ? (f(), i("ul", H, [(f(!0), i(e, null, m(t.records, (n) => (f(), i("li", {
|
|
150
|
+
key: n.id,
|
|
151
|
+
class: u(["mwnf-grid__tile", { "mwnf-grid__tile--hover": l.value === n.id }]),
|
|
152
|
+
onMouseenter: (e) => l.value = n.id,
|
|
153
|
+
onMouseleave: p[0] ||= (e) => l.value = null,
|
|
154
|
+
onFocusin: (e) => l.value = n.id,
|
|
155
|
+
onFocusout: p[1] ||= (e) => l.value = null
|
|
156
|
+
}, [a("span", W, [n.image ? (f(), i("img", {
|
|
157
|
+
key: 0,
|
|
158
|
+
class: "mwnf-grid__image",
|
|
159
|
+
src: n.image,
|
|
160
|
+
alt: n.imageAlt ?? "",
|
|
161
|
+
loading: "lazy"
|
|
162
|
+
}, null, 8, G)) : (f(), i("span", K))]), a("div", q, [s(k, {
|
|
163
|
+
class: "mwnf-grid__card-media",
|
|
164
|
+
to: n.to,
|
|
165
|
+
href: n.href,
|
|
166
|
+
tabindex: "-1",
|
|
167
|
+
"aria-hidden": "true"
|
|
168
|
+
}, {
|
|
169
|
+
default: C(() => [n.image ? (f(), i("img", {
|
|
170
|
+
key: 0,
|
|
171
|
+
src: n.image,
|
|
172
|
+
alt: ""
|
|
173
|
+
}, null, 8, J)) : r("", !0)]),
|
|
174
|
+
_: 2
|
|
175
|
+
}, 1032, ["to", "href"]), a("div", Y, [
|
|
176
|
+
a("p", {
|
|
177
|
+
class: "mwnf-grid__name",
|
|
178
|
+
innerHTML: n.name
|
|
179
|
+
}, null, 8, X),
|
|
180
|
+
(f(!0), i(e, null, m(n.meta ?? [], (e, t) => (f(), i("p", {
|
|
181
|
+
key: t,
|
|
182
|
+
class: "mwnf-grid__meta"
|
|
183
|
+
}, _(d(e)), 1))), 128)),
|
|
184
|
+
n.badge ? (f(), i("p", Z, _(n.badge), 1)) : r("", !0),
|
|
185
|
+
s(k, {
|
|
186
|
+
class: "mwnf-grid__action",
|
|
187
|
+
to: n.to,
|
|
188
|
+
href: n.href
|
|
189
|
+
}, {
|
|
190
|
+
default: C(() => [o(_(t.actionLabel || n.name.replace(/<[^>]+>/g, "")) + " › ", 1)]),
|
|
191
|
+
_: 2
|
|
192
|
+
}, 1032, ["to", "href"])
|
|
193
|
+
])])], 42, U))), 128))])) : v(c) ? (f(), i("div", re, [h(n.$slots, "empty")])) : r("", !0)], 10, B));
|
|
194
|
+
}
|
|
195
|
+
}, ie = ["aria-label"], ae = ["disabled"], oe = ["disabled"], se = ["aria-current", "onClick"], ce = ["disabled"], le = ["disabled"], ue = { class: "mwnf-pagination__position" }, de = { class: "mwnf-pagination__jump" }, fe = ["max"], pe = {
|
|
196
|
+
__name: "Pagination",
|
|
197
|
+
props: {
|
|
198
|
+
pageInfo: {
|
|
199
|
+
type: Object,
|
|
200
|
+
required: !0
|
|
201
|
+
},
|
|
202
|
+
window: {
|
|
203
|
+
type: Number,
|
|
204
|
+
default: 5
|
|
205
|
+
},
|
|
206
|
+
jump: {
|
|
207
|
+
type: Boolean,
|
|
208
|
+
default: !1
|
|
209
|
+
},
|
|
210
|
+
ends: {
|
|
211
|
+
type: Boolean,
|
|
212
|
+
default: !0
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
emits: ["navigate"],
|
|
216
|
+
setup(n, { emit: s }) {
|
|
217
|
+
let c = n, l = s, { t: d } = D(), h = t(() => c.pageInfo?.currentPage ?? 1), g = t(() => c.pageInfo?.lastPage ?? 1), y = t(() => {
|
|
218
|
+
let e = Math.max(1, c.window), t = Math.max(1, h.value - Math.floor(e / 2)), n = Math.min(g.value, t + e - 1);
|
|
219
|
+
t = Math.max(1, n - e + 1);
|
|
220
|
+
let r = [];
|
|
221
|
+
for (let e = t; e <= n; e++) r.push(e);
|
|
222
|
+
return r;
|
|
223
|
+
}), b = p(String(h.value));
|
|
224
|
+
S(h, (e) => {
|
|
225
|
+
b.value = String(e);
|
|
226
|
+
});
|
|
227
|
+
function C(e) {
|
|
228
|
+
let t = Math.min(Math.max(1, Number.parseInt(e, 10) || 1), g.value);
|
|
229
|
+
t !== h.value && l("navigate", t);
|
|
230
|
+
}
|
|
231
|
+
return (t, s) => g.value > 1 ? (f(), i("nav", {
|
|
232
|
+
key: 0,
|
|
233
|
+
class: "mwnf-pagination",
|
|
234
|
+
"aria-label": v(d)("catalogue.pagination.page")
|
|
235
|
+
}, [
|
|
236
|
+
n.ends ? (f(), i("button", {
|
|
237
|
+
key: 0,
|
|
238
|
+
type: "button",
|
|
239
|
+
class: "mwnf-pagination__button",
|
|
240
|
+
disabled: h.value === 1,
|
|
241
|
+
onClick: s[0] ||= (e) => C(1)
|
|
242
|
+
}, " « " + _(v(d)("catalogue.pagination.first")), 9, ae)) : r("", !0),
|
|
243
|
+
a("button", {
|
|
244
|
+
type: "button",
|
|
245
|
+
class: "mwnf-pagination__button",
|
|
246
|
+
disabled: h.value === 1,
|
|
247
|
+
onClick: s[1] ||= (e) => C(h.value - 1)
|
|
248
|
+
}, " ‹ " + _(v(d)("core.pagination.previous")), 9, oe),
|
|
249
|
+
(f(!0), i(e, null, m(y.value, (e) => (f(), i("button", {
|
|
250
|
+
key: e,
|
|
251
|
+
type: "button",
|
|
252
|
+
class: u(["mwnf-pagination__button mwnf-pagination__number", { "mwnf-pagination__button--active": e === h.value }]),
|
|
253
|
+
"aria-current": e === h.value ? "page" : void 0,
|
|
254
|
+
onClick: (t) => C(e)
|
|
255
|
+
}, _(e), 11, se))), 128)),
|
|
256
|
+
a("button", {
|
|
257
|
+
type: "button",
|
|
258
|
+
class: "mwnf-pagination__button",
|
|
259
|
+
disabled: h.value === g.value,
|
|
260
|
+
onClick: s[2] ||= (e) => C(h.value + 1)
|
|
261
|
+
}, _(v(d)("core.pagination.next")) + " › ", 9, ce),
|
|
262
|
+
n.ends ? (f(), i("button", {
|
|
263
|
+
key: 1,
|
|
264
|
+
type: "button",
|
|
265
|
+
class: "mwnf-pagination__button",
|
|
266
|
+
disabled: h.value === g.value,
|
|
267
|
+
onClick: s[3] ||= (e) => C(g.value)
|
|
268
|
+
}, _(v(d)("catalogue.pagination.last")) + " » ", 9, le)) : r("", !0),
|
|
269
|
+
a("span", ue, [n.jump ? (f(), i(e, { key: 0 }, [
|
|
270
|
+
a("label", de, [a("span", null, _(v(d)("catalogue.pagination.page")), 1), w(a("input", {
|
|
271
|
+
"onUpdate:modelValue": s[4] ||= (e) => b.value = e,
|
|
272
|
+
class: "mwnf-pagination__jump-field",
|
|
273
|
+
type: "number",
|
|
274
|
+
min: "1",
|
|
275
|
+
max: g.value,
|
|
276
|
+
onKeyup: s[5] ||= T((e) => C(b.value), ["enter"])
|
|
277
|
+
}, null, 40, fe), [[x, b.value]])]),
|
|
278
|
+
a("span", null, "/ " + _(g.value), 1),
|
|
279
|
+
a("button", {
|
|
280
|
+
type: "button",
|
|
281
|
+
class: "mwnf-pagination__button",
|
|
282
|
+
onClick: s[6] ||= (e) => C(b.value)
|
|
283
|
+
}, _(v(d)("catalogue.pagination.go")), 1)
|
|
284
|
+
], 64)) : (f(), i(e, { key: 1 }, [o(_(h.value) + " / " + _(g.value), 1)], 64))])
|
|
285
|
+
], 8, ie)) : r("", !0);
|
|
286
|
+
}
|
|
287
|
+
}, me = ["for"], he = {
|
|
288
|
+
key: 0,
|
|
289
|
+
class: "mwnf-facet__label"
|
|
290
|
+
}, ge = [
|
|
291
|
+
"id",
|
|
292
|
+
"value",
|
|
293
|
+
"disabled"
|
|
294
|
+
], _e = {
|
|
295
|
+
key: 0,
|
|
296
|
+
value: "",
|
|
297
|
+
disabled: ""
|
|
298
|
+
}, ve = {
|
|
299
|
+
key: 1,
|
|
300
|
+
value: ""
|
|
301
|
+
}, ye = ["value"], be = {
|
|
302
|
+
__name: "FacetSelect",
|
|
303
|
+
props: {
|
|
304
|
+
label: {
|
|
305
|
+
type: String,
|
|
306
|
+
default: ""
|
|
307
|
+
},
|
|
308
|
+
options: {
|
|
309
|
+
type: Array,
|
|
310
|
+
default: () => []
|
|
311
|
+
},
|
|
312
|
+
modelValue: {
|
|
313
|
+
type: [String, Number],
|
|
314
|
+
default: ""
|
|
315
|
+
},
|
|
316
|
+
placeholder: {
|
|
317
|
+
type: String,
|
|
318
|
+
default: ""
|
|
319
|
+
},
|
|
320
|
+
anyLabel: {
|
|
321
|
+
type: String,
|
|
322
|
+
default: ""
|
|
323
|
+
},
|
|
324
|
+
disabled: {
|
|
325
|
+
type: Boolean,
|
|
326
|
+
default: !1
|
|
327
|
+
},
|
|
328
|
+
hideEmpty: {
|
|
329
|
+
type: Boolean,
|
|
330
|
+
default: !1
|
|
331
|
+
}
|
|
332
|
+
},
|
|
333
|
+
emits: ["update:modelValue"],
|
|
334
|
+
setup(n, { emit: o }) {
|
|
335
|
+
let s = n, c = o, l = y(), u = t(() => !s.hideEmpty || s.options.length > 0);
|
|
336
|
+
return (t, o) => u.value ? (f(), i("label", {
|
|
337
|
+
key: 0,
|
|
338
|
+
class: "mwnf-facet",
|
|
339
|
+
for: v(l)
|
|
340
|
+
}, [n.label ? (f(), i("span", he, _(n.label), 1)) : r("", !0), a("select", {
|
|
341
|
+
id: v(l),
|
|
342
|
+
class: "mwnf-facet__select",
|
|
343
|
+
value: String(n.modelValue ?? ""),
|
|
344
|
+
disabled: n.disabled,
|
|
345
|
+
onChange: o[0] ||= (e) => c("update:modelValue", e.target.value)
|
|
346
|
+
}, [
|
|
347
|
+
n.placeholder ? (f(), i("option", _e, _(n.placeholder), 1)) : r("", !0),
|
|
348
|
+
n.anyLabel ? (f(), i("option", ve, _(n.anyLabel), 1)) : r("", !0),
|
|
349
|
+
(f(!0), i(e, null, m(n.options, (e) => (f(), i("option", {
|
|
350
|
+
key: e.value,
|
|
351
|
+
value: String(e.value)
|
|
352
|
+
}, _(e.label), 9, ye))), 128))
|
|
353
|
+
], 40, ge)], 8, me)) : r("", !0);
|
|
354
|
+
}
|
|
355
|
+
}, xe = {
|
|
356
|
+
key: 0,
|
|
357
|
+
class: "mwnf-filter__title"
|
|
358
|
+
}, Se = ["disabled"], Ce = { class: "mwnf-filter__actions" }, we = {
|
|
359
|
+
key: 0,
|
|
360
|
+
type: "submit",
|
|
361
|
+
class: "mwnf-filter__button mwnf-filter__button--apply"
|
|
362
|
+
}, Te = {
|
|
363
|
+
__name: "FilterPanel",
|
|
364
|
+
props: {
|
|
365
|
+
title: {
|
|
366
|
+
type: String,
|
|
367
|
+
default: ""
|
|
368
|
+
},
|
|
369
|
+
mode: {
|
|
370
|
+
type: String,
|
|
371
|
+
default: "apply"
|
|
372
|
+
},
|
|
373
|
+
applyLabel: {
|
|
374
|
+
type: String,
|
|
375
|
+
default: ""
|
|
376
|
+
},
|
|
377
|
+
resetLabel: {
|
|
378
|
+
type: String,
|
|
379
|
+
default: ""
|
|
380
|
+
},
|
|
381
|
+
disabled: {
|
|
382
|
+
type: Boolean,
|
|
383
|
+
default: !1
|
|
384
|
+
}
|
|
385
|
+
},
|
|
386
|
+
emits: ["apply", "reset"],
|
|
387
|
+
setup(e, { emit: t }) {
|
|
388
|
+
let n = t, { t: o } = D();
|
|
389
|
+
return (t, s) => (f(), i("form", {
|
|
390
|
+
class: u(["mwnf-filter", `mwnf-filter--${e.mode}`]),
|
|
391
|
+
onSubmit: s[1] ||= E((e) => n("apply"), ["prevent"])
|
|
392
|
+
}, [
|
|
393
|
+
e.title ? (f(), i("p", xe, _(e.title), 1)) : r("", !0),
|
|
394
|
+
a("fieldset", {
|
|
395
|
+
class: "mwnf-filter__controls",
|
|
396
|
+
disabled: e.disabled
|
|
397
|
+
}, [h(t.$slots, "default")], 8, Se),
|
|
398
|
+
a("div", Ce, [e.mode === "apply" ? (f(), i("button", we, _(e.applyLabel || v(o)("core.action.apply")), 1)) : r("", !0), a("button", {
|
|
399
|
+
type: "button",
|
|
400
|
+
class: "mwnf-filter__button mwnf-filter__button--reset",
|
|
401
|
+
onClick: s[0] ||= (e) => n("reset")
|
|
402
|
+
}, _(e.resetLabel || v(o)("core.action.reset")), 1)])
|
|
403
|
+
], 34));
|
|
404
|
+
}
|
|
405
|
+
}, Ee = {
|
|
406
|
+
key: 0,
|
|
407
|
+
class: "mwnf-summary"
|
|
408
|
+
}, De = {
|
|
409
|
+
key: 0,
|
|
410
|
+
class: "mwnf-summary__parts"
|
|
411
|
+
}, Oe = {
|
|
412
|
+
key: 0,
|
|
413
|
+
class: "mwnf-summary__label"
|
|
414
|
+
}, ke = {
|
|
415
|
+
key: 1,
|
|
416
|
+
class: "mwnf-summary__count"
|
|
417
|
+
}, Ae = {
|
|
418
|
+
key: 2,
|
|
419
|
+
class: "mwnf-summary__value"
|
|
420
|
+
}, je = {
|
|
421
|
+
key: 1,
|
|
422
|
+
class: "mwnf-summary__actions"
|
|
423
|
+
}, Me = {
|
|
424
|
+
__name: "ResultsSummary",
|
|
425
|
+
props: { parts: {
|
|
426
|
+
type: Array,
|
|
427
|
+
default: () => []
|
|
428
|
+
} },
|
|
429
|
+
setup(t) {
|
|
430
|
+
let n = !!b().actions;
|
|
431
|
+
return (a, s) => t.parts.length || a.$slots.default || v(n) ? (f(), i("div", Ee, [
|
|
432
|
+
t.parts.length ? (f(), i("p", De, [(f(!0), i(e, null, m(t.parts, (e, t) => (f(), i("span", {
|
|
433
|
+
key: t,
|
|
434
|
+
class: "mwnf-summary__part"
|
|
435
|
+
}, [
|
|
436
|
+
e.label ? (f(), i("span", Oe, _(e.label), 1)) : r("", !0),
|
|
437
|
+
s[0] ||= o(_(" "), -1),
|
|
438
|
+
e.count == null ? r("", !0) : (f(), i("span", ke, _(e.count), 1)),
|
|
439
|
+
s[1] ||= o(_(" "), -1),
|
|
440
|
+
e.value ? (f(), i("span", Ae, _(e.value), 1)) : r("", !0)
|
|
441
|
+
]))), 128))])) : r("", !0),
|
|
442
|
+
h(a.$slots, "default"),
|
|
443
|
+
v(n) ? (f(), i("div", je, [h(a.$slots, "actions")])) : r("", !0)
|
|
444
|
+
])) : r("", !0);
|
|
445
|
+
}
|
|
446
|
+
}, Ne = ["aria-label"], Pe = [
|
|
447
|
+
"aria-pressed",
|
|
448
|
+
"lang",
|
|
449
|
+
"onClick"
|
|
450
|
+
], Fe = {
|
|
451
|
+
__name: "RecordLanguages",
|
|
452
|
+
props: {
|
|
453
|
+
languages: {
|
|
454
|
+
type: Array,
|
|
455
|
+
default: () => []
|
|
456
|
+
},
|
|
457
|
+
language: {
|
|
458
|
+
type: String,
|
|
459
|
+
default: ""
|
|
460
|
+
}
|
|
461
|
+
},
|
|
462
|
+
emits: ["select"],
|
|
463
|
+
setup(n, { emit: a }) {
|
|
464
|
+
let o = n, s = a, { t: c } = D(), l = t(() => o.languages.map((e) => typeof e == "string" ? {
|
|
465
|
+
code: e,
|
|
466
|
+
label: e.toUpperCase()
|
|
467
|
+
} : e));
|
|
468
|
+
return (t, a) => l.value.length > 1 ? (f(), i("div", {
|
|
469
|
+
key: 0,
|
|
470
|
+
class: "mwnf-languages",
|
|
471
|
+
role: "group",
|
|
472
|
+
"aria-label": v(c)("record.sheet.languages")
|
|
473
|
+
}, [(f(!0), i(e, null, m(l.value, (e) => (f(), i("button", {
|
|
474
|
+
key: e.code,
|
|
475
|
+
type: "button",
|
|
476
|
+
class: u(["mwnf-languages__button", { "mwnf-languages__button--active": e.code === n.language }]),
|
|
477
|
+
"aria-pressed": e.code === n.language ? "true" : "false",
|
|
478
|
+
lang: e.code,
|
|
479
|
+
onClick: (t) => s("select", e.code)
|
|
480
|
+
}, _(e.label), 11, Pe))), 128))], 8, Ne)) : r("", !0);
|
|
481
|
+
}
|
|
482
|
+
}, Ie = ["dir"], Le = { key: 0 }, Re = {
|
|
483
|
+
class: "mwnf-sheet__label",
|
|
484
|
+
scope: "row"
|
|
485
|
+
}, ze = { class: "mwnf-sheet__value" }, Be = ["href"], Ve = ["innerHTML"], He = {
|
|
486
|
+
key: 0,
|
|
487
|
+
class: "mwnf-sheet__row mwnf-sheet__row--short"
|
|
488
|
+
}, Ue = {
|
|
489
|
+
class: "mwnf-sheet__label",
|
|
490
|
+
scope: "row"
|
|
491
|
+
}, We = ["aria-expanded"], Ge = { class: "mwnf-sheet__value" }, Ke = ["innerHTML"], qe = { class: "mwnf-sheet__value" }, Je = ["href"], Ye = ["innerHTML"], Xe = { class: "mwnf-sheet__label mwnf-sheet__label--short" }, Ze = ["aria-expanded"], Qe = { class: "mwnf-sheet__value" }, $e = ["innerHTML"], et = {
|
|
492
|
+
__name: "RecordSheet",
|
|
493
|
+
props: {
|
|
494
|
+
rows: {
|
|
495
|
+
type: Array,
|
|
496
|
+
default: () => []
|
|
497
|
+
},
|
|
498
|
+
layout: {
|
|
499
|
+
type: String,
|
|
500
|
+
default: "table"
|
|
501
|
+
},
|
|
502
|
+
dir: {
|
|
503
|
+
type: String,
|
|
504
|
+
default: ""
|
|
505
|
+
},
|
|
506
|
+
shortDescription: {
|
|
507
|
+
type: Object,
|
|
508
|
+
default: null
|
|
509
|
+
},
|
|
510
|
+
shortDescriptionAfter: {
|
|
511
|
+
type: String,
|
|
512
|
+
default: "description"
|
|
513
|
+
},
|
|
514
|
+
shortDescriptionOpen: {
|
|
515
|
+
type: Boolean,
|
|
516
|
+
default: !1
|
|
517
|
+
}
|
|
518
|
+
},
|
|
519
|
+
setup(t) {
|
|
520
|
+
let o = t, { t: s } = D(), c = p(o.shortDescriptionOpen);
|
|
521
|
+
S(() => o.shortDescription, () => {
|
|
522
|
+
c.value = o.shortDescriptionOpen;
|
|
523
|
+
});
|
|
524
|
+
let l = (e) => e.render === "custom" || e.render === "link";
|
|
525
|
+
return (o, d) => (f(), i("div", {
|
|
526
|
+
class: u(["mwnf-sheet", `mwnf-sheet--${t.layout}`]),
|
|
527
|
+
dir: t.dir || void 0
|
|
528
|
+
}, [(f(), n(g(t.layout === "list" ? "dl" : "table"), { class: "mwnf-sheet__rows" }, {
|
|
529
|
+
default: C(() => [t.layout === "list" ? (f(!0), i(e, { key: 1 }, m(t.rows, (n) => (f(), i(e, { key: n.key }, [
|
|
530
|
+
a("dt", { class: u(["mwnf-sheet__label", `mwnf-sheet__label--${n.key}`]) }, _(n.label), 3),
|
|
531
|
+
a("dd", qe, [l(n) ? h(o.$slots, n.key, { row: n }, () => [n.render === "link" ? (f(), i("a", {
|
|
532
|
+
key: 0,
|
|
533
|
+
href: n.value,
|
|
534
|
+
target: "_blank",
|
|
535
|
+
rel: "noopener"
|
|
536
|
+
}, _(n.value), 9, Je)) : r("", !0)], void 0, 0) : (f(), i("span", {
|
|
537
|
+
key: 1,
|
|
538
|
+
class: u(`mwnf-sheet__${n.render}`),
|
|
539
|
+
innerHTML: n.html
|
|
540
|
+
}, null, 10, Ye))]),
|
|
541
|
+
t.shortDescription && n.key === t.shortDescriptionAfter ? (f(), i(e, { key: 0 }, [a("dt", Xe, [a("button", {
|
|
542
|
+
type: "button",
|
|
543
|
+
class: "mwnf-sheet__toggle",
|
|
544
|
+
"aria-expanded": c.value ? "true" : "false",
|
|
545
|
+
onClick: d[1] ||= (e) => c.value = !c.value
|
|
546
|
+
}, _(c.value ? v(s)("record.action.hideShortDescription") : v(s)("record.action.viewShortDescription")), 9, Ze)]), a("dd", Qe, [c.value ? (f(), i("div", {
|
|
547
|
+
key: 0,
|
|
548
|
+
class: "mwnf-sheet__block",
|
|
549
|
+
innerHTML: t.shortDescription.html
|
|
550
|
+
}, null, 8, $e)) : r("", !0)])], 64)) : r("", !0)
|
|
551
|
+
], 64))), 128)) : (f(), i("tbody", Le, [(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", Re, _(n.label), 1), a("td", ze, [l(n) ? h(o.$slots, n.key, { row: n }, () => [n.render === "link" ? (f(), i("a", {
|
|
552
|
+
key: 0,
|
|
553
|
+
href: n.value,
|
|
554
|
+
target: "_blank",
|
|
555
|
+
rel: "noopener"
|
|
556
|
+
}, _(n.value), 9, Be)) : r("", !0)], void 0, 0) : (f(), i("span", {
|
|
557
|
+
key: 1,
|
|
558
|
+
class: u(`mwnf-sheet__${n.render}`),
|
|
559
|
+
innerHTML: n.html
|
|
560
|
+
}, null, 10, Ve))])], 2), t.shortDescription && n.key === t.shortDescriptionAfter ? (f(), i("tr", He, [a("th", Ue, [a("button", {
|
|
561
|
+
type: "button",
|
|
562
|
+
class: "mwnf-sheet__toggle",
|
|
563
|
+
"aria-expanded": c.value ? "true" : "false",
|
|
564
|
+
onClick: d[0] ||= (e) => c.value = !c.value
|
|
565
|
+
}, _(c.value ? v(s)("record.action.hideShortDescription") : v(s)("record.action.viewShortDescription")), 9, We)]), a("td", Ge, [c.value ? (f(), i("div", {
|
|
566
|
+
key: 0,
|
|
567
|
+
class: "mwnf-sheet__block",
|
|
568
|
+
innerHTML: t.shortDescription.html
|
|
569
|
+
}, null, 8, Ke)) : r("", !0)])])) : r("", !0)], 64))), 128))]))]),
|
|
570
|
+
_: 3
|
|
571
|
+
}))], 10, Ie));
|
|
572
|
+
}
|
|
573
|
+
}, tt = ["dir"], nt = {
|
|
574
|
+
key: 0,
|
|
575
|
+
class: "mwnf-sheet-section__heading"
|
|
576
|
+
}, rt = ["innerHTML"], it = {
|
|
577
|
+
__name: "SheetSection",
|
|
578
|
+
props: {
|
|
579
|
+
heading: {
|
|
580
|
+
type: String,
|
|
581
|
+
default: ""
|
|
582
|
+
},
|
|
583
|
+
html: {
|
|
584
|
+
type: String,
|
|
585
|
+
default: ""
|
|
586
|
+
},
|
|
587
|
+
dir: {
|
|
588
|
+
type: String,
|
|
589
|
+
default: ""
|
|
590
|
+
}
|
|
591
|
+
},
|
|
592
|
+
setup(e) {
|
|
593
|
+
return (t, n) => (f(), i("section", {
|
|
594
|
+
class: "mwnf-sheet-section",
|
|
595
|
+
dir: e.dir || void 0
|
|
596
|
+
}, [
|
|
597
|
+
e.heading ? (f(), i("h2", nt, _(e.heading), 1)) : r("", !0),
|
|
598
|
+
e.html ? (f(), i("div", {
|
|
599
|
+
key: 1,
|
|
600
|
+
class: "mwnf-sheet-section__body mwnf-sheet__block",
|
|
601
|
+
innerHTML: e.html
|
|
602
|
+
}, null, 8, rt)) : r("", !0),
|
|
603
|
+
h(t.$slots, "default")
|
|
604
|
+
], 8, tt));
|
|
605
|
+
}
|
|
606
|
+
}, at = {
|
|
607
|
+
key: 0,
|
|
608
|
+
class: "mwnf-credits"
|
|
609
|
+
}, ot = {
|
|
610
|
+
key: 0,
|
|
611
|
+
class: "mwnf-credits__heading"
|
|
612
|
+
}, st = {
|
|
613
|
+
key: 1,
|
|
614
|
+
class: "mwnf-credits__list"
|
|
615
|
+
}, ct = { class: "mwnf-credits__label" }, lt = { class: "mwnf-credits__value" }, ut = {
|
|
616
|
+
key: 2,
|
|
617
|
+
class: "mwnf-credits__number"
|
|
618
|
+
}, dt = {
|
|
619
|
+
key: 0,
|
|
620
|
+
class: "mwnf-credits__label"
|
|
621
|
+
}, ft = { class: "mwnf-credits__heading" }, pt = { class: "mwnf-credits__citation" }, mt = {
|
|
622
|
+
__name: "RecordCredits",
|
|
623
|
+
props: {
|
|
624
|
+
credits: {
|
|
625
|
+
type: Array,
|
|
626
|
+
default: () => []
|
|
627
|
+
},
|
|
628
|
+
workingNumber: {
|
|
629
|
+
type: String,
|
|
630
|
+
default: ""
|
|
631
|
+
},
|
|
632
|
+
workingNumberLabel: {
|
|
633
|
+
type: String,
|
|
634
|
+
default: ""
|
|
635
|
+
},
|
|
636
|
+
citation: {
|
|
637
|
+
type: String,
|
|
638
|
+
default: ""
|
|
639
|
+
},
|
|
640
|
+
heading: {
|
|
641
|
+
type: String,
|
|
642
|
+
default: ""
|
|
643
|
+
},
|
|
644
|
+
citationHeading: {
|
|
645
|
+
type: String,
|
|
646
|
+
default: ""
|
|
647
|
+
}
|
|
648
|
+
},
|
|
649
|
+
setup(n) {
|
|
650
|
+
let o = n, { t: s } = D(), c = t(() => o.credits.length > 0 || o.workingNumber || o.citation);
|
|
651
|
+
return (t, o) => c.value ? (f(), i("section", at, [
|
|
652
|
+
n.credits.length || n.workingNumber ? (f(), i("h2", ot, _(n.heading || v(s)("record.sheet.credits")), 1)) : r("", !0),
|
|
653
|
+
n.credits.length ? (f(), i("dl", st, [(f(!0), i(e, null, m(n.credits, (t) => (f(), i(e, { key: t.label }, [a("dt", ct, _(t.label), 1), a("dd", lt, _(t.value), 1)], 64))), 128))])) : r("", !0),
|
|
654
|
+
n.workingNumber ? (f(), i("p", ut, [n.workingNumberLabel ? (f(), i("span", dt, _(n.workingNumberLabel), 1)) : r("", !0), a("strong", null, _(n.workingNumber), 1)])) : r("", !0),
|
|
655
|
+
n.citation ? (f(), i(e, { key: 3 }, [a("h2", ft, _(n.citationHeading || v(s)("record.citation.heading")), 1), a("p", pt, _(n.citation), 1)], 64)) : r("", !0)
|
|
656
|
+
])) : r("", !0);
|
|
657
|
+
}
|
|
658
|
+
}, ht = {
|
|
659
|
+
key: 0,
|
|
660
|
+
class: "mwnf-source-credit"
|
|
661
|
+
}, gt = { class: "mwnf-source-credit__label" }, _t = ["href"], vt = {
|
|
662
|
+
__name: "SourceCredit",
|
|
663
|
+
props: {
|
|
664
|
+
route: {
|
|
665
|
+
type: [Object, String],
|
|
666
|
+
default: null
|
|
667
|
+
},
|
|
668
|
+
labelEntry: {
|
|
669
|
+
type: String,
|
|
670
|
+
default: "record.source.label"
|
|
671
|
+
}
|
|
672
|
+
},
|
|
673
|
+
setup(e) {
|
|
674
|
+
let n = e, { t: s } = D(), c = O(), l = t(() => ee(n.route ?? c));
|
|
675
|
+
return (t, n) => l.value ? (f(), i("p", ht, [
|
|
676
|
+
a("span", gt, _(v(s)(e.labelEntry)), 1),
|
|
677
|
+
n[0] ||= o(),
|
|
678
|
+
a("a", { href: l.value }, _(l.value), 9, _t)
|
|
679
|
+
])) : r("", !0);
|
|
680
|
+
}
|
|
681
|
+
}, yt = {
|
|
682
|
+
key: 0,
|
|
683
|
+
class: "mwnf-related"
|
|
684
|
+
}, bt = {
|
|
685
|
+
key: 0,
|
|
686
|
+
class: "mwnf-related__heading"
|
|
687
|
+
}, xt = {
|
|
688
|
+
__name: "RelatedRecords",
|
|
689
|
+
props: {
|
|
690
|
+
heading: {
|
|
691
|
+
type: String,
|
|
692
|
+
default: ""
|
|
693
|
+
},
|
|
694
|
+
records: {
|
|
695
|
+
type: Array,
|
|
696
|
+
default: () => []
|
|
697
|
+
},
|
|
698
|
+
variant: {
|
|
699
|
+
type: String,
|
|
700
|
+
default: "list"
|
|
701
|
+
},
|
|
702
|
+
actionLabel: {
|
|
703
|
+
type: String,
|
|
704
|
+
default: ""
|
|
705
|
+
}
|
|
706
|
+
},
|
|
707
|
+
setup(e) {
|
|
708
|
+
return (t, a) => e.records.length || t.$slots.default ? (f(), i("section", yt, [
|
|
709
|
+
e.heading ? (f(), i("h2", bt, _(e.heading), 1)) : r("", !0),
|
|
710
|
+
e.variant === "grid" ? (f(), n(Q, {
|
|
711
|
+
key: 1,
|
|
712
|
+
records: e.records,
|
|
713
|
+
"action-label": e.actionLabel
|
|
714
|
+
}, null, 8, ["records", "action-label"])) : (f(), n(z, {
|
|
715
|
+
key: 2,
|
|
716
|
+
records: e.records
|
|
717
|
+
}, null, 8, ["records"])),
|
|
718
|
+
h(t.$slots, "default")
|
|
719
|
+
])) : r("", !0);
|
|
720
|
+
}
|
|
721
|
+
}, St = ["src", "alt"], Ct = {
|
|
722
|
+
key: 0,
|
|
723
|
+
class: "mwnf-media__caption"
|
|
724
|
+
}, wt = { key: 0 }, Tt = {
|
|
725
|
+
key: 1,
|
|
726
|
+
class: "mwnf-media__credit"
|
|
727
|
+
}, Et = {
|
|
728
|
+
key: 2,
|
|
729
|
+
class: "mwnf-media__credit"
|
|
730
|
+
}, Dt = ["src", "alt"], Ot = {
|
|
731
|
+
key: 0,
|
|
732
|
+
class: "mwnf-media__thumbs"
|
|
733
|
+
}, kt = [
|
|
734
|
+
"aria-pressed",
|
|
735
|
+
"title",
|
|
736
|
+
"onClick"
|
|
737
|
+
], At = ["src", "alt"], jt = {
|
|
738
|
+
key: 1,
|
|
739
|
+
class: "mwnf-media__caption"
|
|
740
|
+
}, Mt = { key: 0 }, Nt = {
|
|
741
|
+
key: 1,
|
|
742
|
+
class: "mwnf-media__credit"
|
|
743
|
+
}, Pt = ["aria-label"], Ft = ["aria-label"], It = ["src", "alt"], Lt = ["aria-label"], Rt = {
|
|
744
|
+
__name: "MediaGallery",
|
|
745
|
+
props: {
|
|
746
|
+
images: {
|
|
747
|
+
type: Array,
|
|
748
|
+
default: () => []
|
|
749
|
+
},
|
|
750
|
+
start: {
|
|
751
|
+
type: Number,
|
|
752
|
+
default: 0
|
|
753
|
+
},
|
|
754
|
+
variant: {
|
|
755
|
+
type: String,
|
|
756
|
+
default: ""
|
|
757
|
+
}
|
|
758
|
+
},
|
|
759
|
+
setup(n) {
|
|
760
|
+
let o = n, { t: s } = D(), c = p(Math.min(o.start, Math.max(0, o.images.length - 1)));
|
|
761
|
+
S(() => o.images, () => {
|
|
762
|
+
c.value = 0;
|
|
763
|
+
});
|
|
764
|
+
let l = t(() => o.images[c.value] ?? null), h = t(() => {
|
|
765
|
+
let e = [];
|
|
766
|
+
return l.value?.photographer && e.push(`${s("record.media.photograph")}: ${l.value.photographer}`), l.value?.copyright && e.push(`© ${l.value.copyright}`), e.join(" — ");
|
|
767
|
+
}), g = p(!1), y = null, b = p(null);
|
|
768
|
+
function x(e) {
|
|
769
|
+
c.value = (e + o.images.length) % o.images.length;
|
|
770
|
+
}
|
|
771
|
+
function C() {
|
|
772
|
+
l.value && (y = document.activeElement, g.value = !0, document.addEventListener("keydown", T), requestAnimationFrame(() => b.value?.focus?.()));
|
|
773
|
+
}
|
|
774
|
+
function w() {
|
|
775
|
+
g.value = !1, document.removeEventListener("keydown", T), y?.focus?.(), y = null;
|
|
776
|
+
}
|
|
777
|
+
function T(e) {
|
|
778
|
+
e.key === "Escape" ? w() : e.key === "ArrowRight" ? x(c.value + 1) : e.key === "ArrowLeft" && x(c.value - 1);
|
|
779
|
+
}
|
|
780
|
+
return d(() => document.removeEventListener("keydown", T)), (t, o) => n.images.length ? (f(), i("div", {
|
|
781
|
+
key: 0,
|
|
782
|
+
class: u(["mwnf-media", n.variant ? `mwnf-media--${n.variant}` : ""])
|
|
783
|
+
}, [n.variant === "row" ? (f(!0), i(e, { key: 0 }, m(n.images, (e, t) => (f(), i("figure", {
|
|
784
|
+
key: e.url ?? t,
|
|
785
|
+
class: "mwnf-media__figure"
|
|
786
|
+
}, [a("img", {
|
|
787
|
+
class: "mwnf-media__image",
|
|
788
|
+
src: e.url,
|
|
789
|
+
alt: e.alt ?? "",
|
|
790
|
+
loading: "lazy"
|
|
791
|
+
}, null, 8, St), e.caption || e.photographer || e.copyright ? (f(), i("figcaption", Ct, [
|
|
792
|
+
e.caption ? (f(), i("span", wt, _(e.caption), 1)) : r("", !0),
|
|
793
|
+
e.photographer ? (f(), i("span", Tt, _(v(s)("record.media.photograph")) + ": " + _(e.photographer), 1)) : r("", !0),
|
|
794
|
+
e.copyright ? (f(), i("span", Et, "© " + _(e.copyright), 1)) : r("", !0)
|
|
795
|
+
])) : r("", !0)]))), 128)) : (f(), i(e, { key: 1 }, [
|
|
796
|
+
a("button", {
|
|
797
|
+
type: "button",
|
|
798
|
+
class: "mwnf-media__main",
|
|
799
|
+
onClick: C
|
|
800
|
+
}, [a("img", {
|
|
801
|
+
class: "mwnf-media__image",
|
|
802
|
+
src: l.value.url,
|
|
803
|
+
alt: l.value.alt ?? ""
|
|
804
|
+
}, null, 8, Dt)]),
|
|
805
|
+
n.images.length > 1 ? (f(), i("ul", Ot, [(f(!0), i(e, null, m(n.images, (e, t) => (f(), i("li", { key: e.url ?? t }, [a("button", {
|
|
806
|
+
type: "button",
|
|
807
|
+
class: u(["mwnf-media__thumb", { "mwnf-media__thumb--active": t === c.value }]),
|
|
808
|
+
"aria-pressed": t === c.value ? "true" : "false",
|
|
809
|
+
title: [e.photographer, e.copyright].filter(Boolean).join(" — ") || void 0,
|
|
810
|
+
onClick: (e) => x(t)
|
|
811
|
+
}, [a("img", {
|
|
812
|
+
src: e.url,
|
|
813
|
+
alt: e.alt ?? "",
|
|
814
|
+
loading: "lazy"
|
|
815
|
+
}, null, 8, At)], 10, kt)]))), 128))])) : r("", !0),
|
|
816
|
+
l.value.caption || h.value ? (f(), i("p", jt, [l.value.caption ? (f(), i("span", Mt, _(l.value.caption), 1)) : r("", !0), h.value ? (f(), i("span", Nt, _(h.value), 1)) : r("", !0)])) : r("", !0),
|
|
817
|
+
g.value ? (f(), i("div", {
|
|
818
|
+
key: 2,
|
|
819
|
+
class: "mwnf-lightbox",
|
|
820
|
+
role: "dialog",
|
|
821
|
+
"aria-modal": "true",
|
|
822
|
+
onClick: E(w, ["self"])
|
|
823
|
+
}, [
|
|
824
|
+
a("button", {
|
|
825
|
+
ref_key: "closeButton",
|
|
826
|
+
ref: b,
|
|
827
|
+
type: "button",
|
|
828
|
+
class: "mwnf-lightbox__close",
|
|
829
|
+
"aria-label": v(s)("core.action.close"),
|
|
830
|
+
onClick: w
|
|
831
|
+
}, "✕", 8, Pt),
|
|
832
|
+
n.images.length > 1 ? (f(), i("button", {
|
|
833
|
+
key: 0,
|
|
834
|
+
type: "button",
|
|
835
|
+
class: "mwnf-lightbox__control mwnf-lightbox__control--previous",
|
|
836
|
+
"aria-label": v(s)("core.pagination.previous"),
|
|
837
|
+
onClick: o[0] ||= E((e) => x(c.value - 1), ["stop"])
|
|
838
|
+
}, "‹", 8, Ft)) : r("", !0),
|
|
839
|
+
a("img", {
|
|
840
|
+
class: "mwnf-lightbox__image",
|
|
841
|
+
src: l.value.url,
|
|
842
|
+
alt: l.value.alt ?? ""
|
|
843
|
+
}, null, 8, It),
|
|
844
|
+
n.images.length > 1 ? (f(), i("button", {
|
|
845
|
+
key: 1,
|
|
846
|
+
type: "button",
|
|
847
|
+
class: "mwnf-lightbox__control mwnf-lightbox__control--next",
|
|
848
|
+
"aria-label": v(s)("core.pagination.next"),
|
|
849
|
+
onClick: o[1] ||= E((e) => x(c.value + 1), ["stop"])
|
|
850
|
+
}, "›", 8, Lt)) : r("", !0)
|
|
851
|
+
])) : r("", !0)
|
|
852
|
+
], 64))], 2)) : r("", !0);
|
|
853
|
+
}
|
|
854
|
+
}, zt = ["aria-label", "dir"], Bt = { class: "mwnf-popover__title" }, $ = ["aria-label"], Vt = { class: "mwnf-popover__body" }, Ht = { class: "mwnf-popover__term" }, Ut = ["innerHTML"], Wt = {
|
|
855
|
+
key: 1,
|
|
856
|
+
class: "mwnf-popover__definition"
|
|
857
|
+
}, Gt = {
|
|
858
|
+
__name: "GlossaryPopover",
|
|
859
|
+
props: {
|
|
860
|
+
term: {
|
|
861
|
+
type: Object,
|
|
862
|
+
default: null
|
|
863
|
+
},
|
|
864
|
+
html: {
|
|
865
|
+
type: String,
|
|
866
|
+
default: ""
|
|
867
|
+
},
|
|
868
|
+
dir: {
|
|
869
|
+
type: String,
|
|
870
|
+
default: ""
|
|
871
|
+
}
|
|
872
|
+
},
|
|
873
|
+
emits: ["close"],
|
|
874
|
+
setup(e, { emit: t }) {
|
|
875
|
+
let n = e, o = t, { t: s } = D(), c = p(null), l = null;
|
|
876
|
+
function u() {
|
|
877
|
+
o("close");
|
|
878
|
+
}
|
|
879
|
+
function m(e) {
|
|
880
|
+
e.key === "Escape" && u();
|
|
881
|
+
}
|
|
882
|
+
return S(() => n.term, (e, t) => {
|
|
883
|
+
e && !t ? (l = document.activeElement, document.addEventListener("keydown", m), requestAnimationFrame(() => c.value?.focus?.())) : !e && t && (document.removeEventListener("keydown", m), l?.focus?.(), l = null);
|
|
884
|
+
}, { immediate: !0 }), d(() => document.removeEventListener("keydown", m)), (t, n) => e.term ? (f(), i("aside", {
|
|
885
|
+
key: 0,
|
|
886
|
+
class: "mwnf-popover",
|
|
887
|
+
role: "dialog",
|
|
888
|
+
"aria-label": v(s)("record.glossary.heading"),
|
|
889
|
+
dir: e.dir || void 0
|
|
890
|
+
}, [a("div", Bt, [a("span", null, _(v(s)("record.glossary.heading")), 1), a("button", {
|
|
891
|
+
ref_key: "closeButton",
|
|
892
|
+
ref: c,
|
|
893
|
+
type: "button",
|
|
894
|
+
class: "mwnf-popover__close",
|
|
895
|
+
"aria-label": v(s)("record.glossary.close"),
|
|
896
|
+
onClick: u
|
|
897
|
+
}, "✕", 8, $)]), a("div", Vt, [a("p", Ht, _(e.term.spelling || e.term.word), 1), e.html ? (f(), i("div", {
|
|
898
|
+
key: 0,
|
|
899
|
+
class: "mwnf-popover__definition mwnf-sheet__block",
|
|
900
|
+
innerHTML: e.html
|
|
901
|
+
}, null, 8, Ut)) : e.term.definition ? (f(), i("p", Wt, _(e.term.definition), 1)) : r("", !0)])], 8, zt)) : r("", !0);
|
|
902
|
+
}
|
|
903
|
+
}, Kt = {
|
|
904
|
+
key: 0,
|
|
905
|
+
class: "mwnf-timeline__rows"
|
|
906
|
+
}, qt = { class: "mwnf-timeline__date" }, Jt = { class: "mwnf-timeline__body" }, Yt = {
|
|
907
|
+
key: 0,
|
|
908
|
+
class: "mwnf-timeline__caption"
|
|
909
|
+
}, Xt = ["innerHTML"], Zt = ["innerHTML"], Qt = {
|
|
910
|
+
key: 2,
|
|
911
|
+
class: "mwnf-timeline__media"
|
|
912
|
+
}, $t = ["src", "alt"], en = ["innerHTML"], tn = {
|
|
913
|
+
key: 3,
|
|
914
|
+
class: "mwnf-timeline__actions"
|
|
915
|
+
}, nn = {
|
|
916
|
+
key: 1,
|
|
917
|
+
class: "mwnf-timeline__empty"
|
|
918
|
+
}, rn = {
|
|
919
|
+
__name: "TimelineEventList",
|
|
920
|
+
props: { events: {
|
|
921
|
+
type: Array,
|
|
922
|
+
default: () => []
|
|
923
|
+
} },
|
|
924
|
+
setup(t) {
|
|
925
|
+
let s = !!b().empty;
|
|
926
|
+
return (c, l) => t.events.length ? (f(), i("ul", Kt, [(f(!0), i(e, null, m(t.events, (t) => (f(), i("li", {
|
|
927
|
+
key: t.id,
|
|
928
|
+
class: "mwnf-timeline__row"
|
|
929
|
+
}, [a("div", qt, [h(c.$slots, "date", { event: t }, () => [o(_(t.date), 1)])]), a("div", Jt, [
|
|
930
|
+
t.caption || c.$slots.caption ? (f(), i("div", Yt, [h(c.$slots, "caption", { event: t }, () => [a("span", { innerHTML: t.caption }, null, 8, Xt)])])) : r("", !0),
|
|
931
|
+
t.description ? (f(), i("div", {
|
|
932
|
+
key: 1,
|
|
933
|
+
class: "mwnf-timeline__description mwnf-sheet__block",
|
|
934
|
+
innerHTML: t.description
|
|
935
|
+
}, null, 8, Zt)) : r("", !0),
|
|
936
|
+
t.media?.length || c.$slots.media ? (f(), i("div", Qt, [h(c.$slots, "media", { event: t }, () => [(f(!0), i(e, null, m(t.media ?? [], (e, t) => (f(), n(k, {
|
|
937
|
+
key: t,
|
|
938
|
+
class: "mwnf-timeline__media-item",
|
|
939
|
+
to: e.to,
|
|
940
|
+
href: e.href
|
|
941
|
+
}, {
|
|
942
|
+
default: C(() => [e.image ? (f(), i("img", {
|
|
943
|
+
key: 0,
|
|
944
|
+
src: e.image,
|
|
945
|
+
alt: e.alt ?? "",
|
|
946
|
+
loading: "lazy"
|
|
947
|
+
}, null, 8, $t)) : r("", !0), e.caption ? (f(), i("span", {
|
|
948
|
+
key: 1,
|
|
949
|
+
class: "mwnf-timeline__media-caption",
|
|
950
|
+
innerHTML: e.caption
|
|
951
|
+
}, null, 8, en)) : r("", !0)]),
|
|
952
|
+
_: 2
|
|
953
|
+
}, 1032, ["to", "href"]))), 128))])])) : r("", !0),
|
|
954
|
+
t.actions?.length || c.$slots.actions ? (f(), i("div", tn, [h(c.$slots, "actions", { event: t }, () => [(f(!0), i(e, null, m(t.actions ?? [], (e, t) => (f(), n(k, {
|
|
955
|
+
key: t,
|
|
956
|
+
class: "mwnf-timeline__action",
|
|
957
|
+
to: e.to,
|
|
958
|
+
href: e.href
|
|
959
|
+
}, {
|
|
960
|
+
default: C(() => [o(_(e.label) + " →", 1)]),
|
|
961
|
+
_: 2
|
|
962
|
+
}, 1032, ["to", "href"]))), 128))])])) : r("", !0)
|
|
963
|
+
])]))), 128))])) : v(s) ? (f(), i("div", nn, [h(c.$slots, "empty")])) : r("", !0);
|
|
964
|
+
}
|
|
965
|
+
};
|
|
966
|
+
//#endregion
|
|
967
|
+
export { vt as a, et as c, Te as d, be as f, k as g, z as h, xt as i, Fe as l, Q as m, Gt as n, mt as o, pe as p, Rt as r, it as s, rn as t, Me as u };
|