@museumwnf/viewer-layout 2.15.2 → 2.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +114 -32
- package/dist/BackLink-CYgmd0iX.js +73 -0
- package/dist/OnDisplayIn-ZfRUtPd1.js +547 -0
- package/dist/TimelineEventList-D5Hot788.js +1362 -0
- package/dist/TimelineResultsView-DJo_yYEK.js +1203 -0
- package/dist/content-CvUktO-g.js +454 -0
- package/dist/content.js +5 -5
- package/dist/dxa.js +418 -570
- package/dist/index.js +5 -5
- package/dist/viewer-layout.css +1 -1
- package/dist/views.js +402 -390
- package/package.json +3 -3
- package/src/tokens.reference.css +47 -1
- package/dist/BackLink-BJ16COHd.js +0 -106
- package/dist/TimelineEventList-BmfLBaTT.js +0 -967
- package/dist/TimelineLookup-DRc43FkL.js +0 -444
- package/dist/TimelineResultsView-D78PPWk-.js +0 -1220
- package/dist/content-DUXrQ-l8.js +0 -353
|
@@ -0,0 +1,547 @@
|
|
|
1
|
+
import { l as e, v as t } from "./TimelineEventList-D5Hot788.js";
|
|
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, useSlots as y, vModelSelect as b, vModelText as x, watch as S, withCtx as C, withDirectives as w, withKeys as T } from "vue";
|
|
3
|
+
import { useI18n as E } from "@museumwnf/viewer-core/i18n";
|
|
4
|
+
import { md as D, mdInline as O, searchGlossary as ee } from "@museumwnf/viewer-core";
|
|
5
|
+
//#region src/content/SectionCards.vue
|
|
6
|
+
var k = ["innerHTML"], A = ["innerHTML"], te = {
|
|
7
|
+
key: 1,
|
|
8
|
+
class: "mwnf-cards__action"
|
|
9
|
+
}, ne = {
|
|
10
|
+
key: 0,
|
|
11
|
+
class: "mwnf-cards__image-container"
|
|
12
|
+
}, j = ["src", "alt"], M = { class: "mwnf-cards__content" }, N = {
|
|
13
|
+
key: 0,
|
|
14
|
+
class: "mwnf-cards__number"
|
|
15
|
+
}, P = ["innerHTML"], F = ["innerHTML"], I = {
|
|
16
|
+
key: 0,
|
|
17
|
+
class: "mwnf-cards__image-container"
|
|
18
|
+
}, L = ["src", "alt"], R = {
|
|
19
|
+
key: 1,
|
|
20
|
+
class: "mwnf-cards__number"
|
|
21
|
+
}, z = ["innerHTML"], B = {
|
|
22
|
+
key: 3,
|
|
23
|
+
class: "mwnf-cards__details"
|
|
24
|
+
}, V = { class: "mwnf-cards__summary" }, H = {
|
|
25
|
+
key: 0,
|
|
26
|
+
class: "mwnf-cards__number"
|
|
27
|
+
}, U = ["innerHTML"], W = {
|
|
28
|
+
key: 0,
|
|
29
|
+
class: "mwnf-cards__children"
|
|
30
|
+
}, G = {
|
|
31
|
+
__name: "SectionCards",
|
|
32
|
+
props: {
|
|
33
|
+
cards: {
|
|
34
|
+
type: Array,
|
|
35
|
+
default: () => []
|
|
36
|
+
},
|
|
37
|
+
variant: {
|
|
38
|
+
type: String,
|
|
39
|
+
default: "cards",
|
|
40
|
+
validate: (e) => [
|
|
41
|
+
"cards",
|
|
42
|
+
"rows",
|
|
43
|
+
"covers",
|
|
44
|
+
"accordion"
|
|
45
|
+
].includes(e)
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
setup(e) {
|
|
49
|
+
return (r, u) => e.cards.length ? (f(), o("ul", {
|
|
50
|
+
key: 0,
|
|
51
|
+
class: d(["mwnf-cards", `mwnf-cards--${e.variant}`])
|
|
52
|
+
}, [(f(!0), o(n, null, m(e.cards, (r) => (f(), o("li", {
|
|
53
|
+
key: r.href ?? r.title,
|
|
54
|
+
class: d(["mwnf-cards__card"])
|
|
55
|
+
}, [e.variant === "cards" ? (f(), i(t, {
|
|
56
|
+
key: 0,
|
|
57
|
+
class: "mwnf-cards__link",
|
|
58
|
+
to: r.to,
|
|
59
|
+
href: r.href
|
|
60
|
+
}, {
|
|
61
|
+
default: C(() => [
|
|
62
|
+
s("span", {
|
|
63
|
+
class: "mwnf-cards__title",
|
|
64
|
+
innerHTML: v(O)(r.title)
|
|
65
|
+
}, null, 8, k),
|
|
66
|
+
r.description ? (f(), o("span", {
|
|
67
|
+
key: 0,
|
|
68
|
+
class: "mwnf-cards__text",
|
|
69
|
+
innerHTML: v(O)(r.description)
|
|
70
|
+
}, null, 8, A)) : a("", !0),
|
|
71
|
+
r.action ? (f(), o("span", te, _(r.action) + " →", 1)) : a("", !0)
|
|
72
|
+
]),
|
|
73
|
+
_: 2
|
|
74
|
+
}, 1032, ["to", "href"])) : e.variant === "rows" ? (f(), i(t, {
|
|
75
|
+
key: 1,
|
|
76
|
+
class: "mwnf-cards__link",
|
|
77
|
+
to: r.to,
|
|
78
|
+
href: r.href
|
|
79
|
+
}, {
|
|
80
|
+
default: C(() => [r.image ? (f(), o("div", ne, [s("img", {
|
|
81
|
+
class: "mwnf-cards__image",
|
|
82
|
+
src: r.image,
|
|
83
|
+
alt: r.alt || ""
|
|
84
|
+
}, null, 8, j)])) : a("", !0), s("div", M, [
|
|
85
|
+
r.number ? (f(), o("span", N, _(r.number), 1)) : a("", !0),
|
|
86
|
+
s("span", {
|
|
87
|
+
class: "mwnf-cards__title",
|
|
88
|
+
innerHTML: v(O)(r.title)
|
|
89
|
+
}, null, 8, P),
|
|
90
|
+
r.description ? (f(), o("span", {
|
|
91
|
+
key: 1,
|
|
92
|
+
class: "mwnf-cards__text",
|
|
93
|
+
innerHTML: v(O)(r.description)
|
|
94
|
+
}, null, 8, F)) : a("", !0)
|
|
95
|
+
])]),
|
|
96
|
+
_: 2
|
|
97
|
+
}, 1032, ["to", "href"])) : e.variant === "covers" ? (f(), i(t, {
|
|
98
|
+
key: 2,
|
|
99
|
+
class: "mwnf-cards__link",
|
|
100
|
+
to: r.to,
|
|
101
|
+
href: r.href
|
|
102
|
+
}, {
|
|
103
|
+
default: C(() => [
|
|
104
|
+
r.image ? (f(), o("div", I, [s("img", {
|
|
105
|
+
class: "mwnf-cards__image",
|
|
106
|
+
src: r.image,
|
|
107
|
+
alt: r.alt || ""
|
|
108
|
+
}, null, 8, L)])) : a("", !0),
|
|
109
|
+
r.number ? (f(), o("span", R, _(r.number), 1)) : a("", !0),
|
|
110
|
+
s("span", {
|
|
111
|
+
class: "mwnf-cards__title",
|
|
112
|
+
innerHTML: v(O)(r.title)
|
|
113
|
+
}, null, 8, z)
|
|
114
|
+
]),
|
|
115
|
+
_: 2
|
|
116
|
+
}, 1032, ["to", "href"])) : e.variant === "accordion" ? (f(), o("details", B, [s("summary", V, [r.number ? (f(), o("span", H, _(r.number), 1)) : a("", !0), s("span", {
|
|
117
|
+
class: "mwnf-cards__title",
|
|
118
|
+
innerHTML: v(O)(r.title)
|
|
119
|
+
}, null, 8, U)]), r.children?.length ? (f(), o("ul", W, [(f(!0), o(n, null, m(r.children, (e) => (f(), o("li", {
|
|
120
|
+
key: e.href ?? e.title,
|
|
121
|
+
class: "mwnf-cards__child"
|
|
122
|
+
}, [l(t, {
|
|
123
|
+
class: "mwnf-cards__child-link",
|
|
124
|
+
to: e.to,
|
|
125
|
+
href: e.href
|
|
126
|
+
}, {
|
|
127
|
+
default: C(() => [c(_(e.title), 1)]),
|
|
128
|
+
_: 2
|
|
129
|
+
}, 1032, ["to", "href"])]))), 128))])) : a("", !0)])) : a("", !0)]))), 128))], 2)) : a("", !0);
|
|
130
|
+
}
|
|
131
|
+
}, K = {
|
|
132
|
+
key: 0,
|
|
133
|
+
class: "mwnf-featured"
|
|
134
|
+
}, q = {
|
|
135
|
+
key: 0,
|
|
136
|
+
class: "mwnf-featured__heading"
|
|
137
|
+
}, J = {
|
|
138
|
+
key: 0,
|
|
139
|
+
class: "mwnf-featured__media"
|
|
140
|
+
}, Y = ["src", "alt"], X = { class: "mwnf-featured__body" }, Z = {
|
|
141
|
+
key: 0,
|
|
142
|
+
class: "mwnf-featured__eyebrow"
|
|
143
|
+
}, re = ["innerHTML"], ie = {
|
|
144
|
+
key: 1,
|
|
145
|
+
class: "mwnf-featured__action"
|
|
146
|
+
}, ae = {
|
|
147
|
+
__name: "FeaturedRecord",
|
|
148
|
+
props: {
|
|
149
|
+
image: {
|
|
150
|
+
type: String,
|
|
151
|
+
default: ""
|
|
152
|
+
},
|
|
153
|
+
imageAlt: {
|
|
154
|
+
type: String,
|
|
155
|
+
default: ""
|
|
156
|
+
},
|
|
157
|
+
eyebrow: {
|
|
158
|
+
type: String,
|
|
159
|
+
default: ""
|
|
160
|
+
},
|
|
161
|
+
name: {
|
|
162
|
+
type: String,
|
|
163
|
+
default: ""
|
|
164
|
+
},
|
|
165
|
+
meta: {
|
|
166
|
+
type: Array,
|
|
167
|
+
default: () => []
|
|
168
|
+
},
|
|
169
|
+
action: {
|
|
170
|
+
type: String,
|
|
171
|
+
default: ""
|
|
172
|
+
},
|
|
173
|
+
to: {
|
|
174
|
+
type: [String, Object],
|
|
175
|
+
default: null
|
|
176
|
+
},
|
|
177
|
+
href: {
|
|
178
|
+
type: String,
|
|
179
|
+
default: ""
|
|
180
|
+
},
|
|
181
|
+
heading: {
|
|
182
|
+
type: String,
|
|
183
|
+
default: ""
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
setup(e) {
|
|
187
|
+
let i = e, c = y(), u = r(() => !!(i.name || i.image || c.default));
|
|
188
|
+
return (r, i) => u.value ? (f(), o("section", K, [e.heading ? (f(), o("h2", q, _(e.heading), 1)) : a("", !0), h(r.$slots, "default", {}, () => [l(t, {
|
|
189
|
+
class: "mwnf-featured__link",
|
|
190
|
+
to: e.to,
|
|
191
|
+
href: e.href
|
|
192
|
+
}, {
|
|
193
|
+
default: C(() => [e.image ? (f(), o("span", J, [s("img", {
|
|
194
|
+
class: "mwnf-featured__image",
|
|
195
|
+
src: e.image,
|
|
196
|
+
alt: e.imageAlt,
|
|
197
|
+
loading: "eager"
|
|
198
|
+
}, null, 8, Y)])) : a("", !0), s("span", X, [
|
|
199
|
+
e.eyebrow ? (f(), o("span", Z, _(e.eyebrow), 1)) : a("", !0),
|
|
200
|
+
s("span", {
|
|
201
|
+
class: "mwnf-featured__name",
|
|
202
|
+
innerHTML: e.name
|
|
203
|
+
}, null, 8, re),
|
|
204
|
+
(f(!0), o(n, null, m(e.meta, (e, t) => (f(), o("span", {
|
|
205
|
+
key: t,
|
|
206
|
+
class: "mwnf-featured__meta"
|
|
207
|
+
}, _(e), 1))), 128)),
|
|
208
|
+
e.action ? (f(), o("span", ie, _(e.action) + " →", 1)) : a("", !0)
|
|
209
|
+
])]),
|
|
210
|
+
_: 1
|
|
211
|
+
}, 8, ["to", "href"])])])) : a("", !0);
|
|
212
|
+
}
|
|
213
|
+
}, oe = ["dir"], se = { class: "mwnf-glossary-tool__toggle" }, ce = { class: "mwnf-glossary-tool__panel" }, le = { class: "mwnf-glossary-tool__heading" }, ue = { class: "mwnf-glossary-tool__instructions" }, de = ["aria-expanded", "aria-label"], fe = {
|
|
214
|
+
key: 0,
|
|
215
|
+
class: "mwnf-glossary-tool__hits",
|
|
216
|
+
role: "listbox"
|
|
217
|
+
}, pe = [
|
|
218
|
+
"aria-selected",
|
|
219
|
+
"onClick",
|
|
220
|
+
"onKeydown"
|
|
221
|
+
], me = {
|
|
222
|
+
key: 1,
|
|
223
|
+
class: "mwnf-glossary-tool__no-results"
|
|
224
|
+
}, he = {
|
|
225
|
+
key: 2,
|
|
226
|
+
class: "mwnf-glossary-tool__definition"
|
|
227
|
+
}, ge = { class: "mwnf-glossary-tool__definition-label" }, _e = ["innerHTML"], ve = {
|
|
228
|
+
__name: "GlossaryTool",
|
|
229
|
+
props: {
|
|
230
|
+
language: {
|
|
231
|
+
type: String,
|
|
232
|
+
default: ""
|
|
233
|
+
},
|
|
234
|
+
entity: {
|
|
235
|
+
type: String,
|
|
236
|
+
default: "glossary"
|
|
237
|
+
},
|
|
238
|
+
labels: {
|
|
239
|
+
type: Object,
|
|
240
|
+
default: () => ({})
|
|
241
|
+
},
|
|
242
|
+
dir: {
|
|
243
|
+
type: String,
|
|
244
|
+
default: ""
|
|
245
|
+
}
|
|
246
|
+
},
|
|
247
|
+
setup(e) {
|
|
248
|
+
let t = e, i = {
|
|
249
|
+
tool: "record.glossary.tool",
|
|
250
|
+
heading: "record.glossary.heading",
|
|
251
|
+
instructions: "record.glossary.instructions",
|
|
252
|
+
definition: "record.glossary.definition",
|
|
253
|
+
close: "record.glossary.close",
|
|
254
|
+
...t.labels
|
|
255
|
+
}, { t: c } = E(), l = p(""), u = p(null), h = p(-1), g = r(() => l.value.trim() ? ee(l.value, t.language, { entity: t.entity }) : []), y = r(() => g.value.length > 0 && !u.value), b = r(() => u.value ? D(u.value.definition) : ""), S = r(() => i.noResults ? c(i.noResults) : ""), C = r(() => !!S.value && l.value.trim() && !u.value && g.value.length === 0);
|
|
256
|
+
function O() {
|
|
257
|
+
u.value = null, h.value = -1;
|
|
258
|
+
}
|
|
259
|
+
function k(e) {
|
|
260
|
+
u.value = e, l.value = e.spelling, h.value = -1;
|
|
261
|
+
}
|
|
262
|
+
function A(e) {
|
|
263
|
+
y.value && (e.key === "ArrowDown" ? (e.preventDefault(), h.value = (h.value + 1) % g.value.length) : e.key === "ArrowUp" ? (e.preventDefault(), h.value = (h.value - 1 + g.value.length) % g.value.length) : e.key === "Enter" && h.value >= 0 ? (e.preventDefault(), k(g.value[h.value])) : e.key === "Escape" && (h.value = -1));
|
|
264
|
+
}
|
|
265
|
+
return (t, r) => (f(), o("details", {
|
|
266
|
+
class: "mwnf-glossary-tool",
|
|
267
|
+
dir: e.dir || void 0
|
|
268
|
+
}, [s("summary", se, _(v(c)(i.tool)), 1), s("div", ce, [
|
|
269
|
+
s("p", le, _(v(c)(i.heading)), 1),
|
|
270
|
+
s("p", ue, _(v(c)(i.instructions)), 1),
|
|
271
|
+
w(s("input", {
|
|
272
|
+
"onUpdate:modelValue": r[0] ||= (e) => l.value = e,
|
|
273
|
+
type: "text",
|
|
274
|
+
class: "mwnf-glossary-tool__input",
|
|
275
|
+
role: "combobox",
|
|
276
|
+
"aria-autocomplete": "list",
|
|
277
|
+
"aria-expanded": y.value,
|
|
278
|
+
"aria-label": v(c)(i.heading),
|
|
279
|
+
onInput: O,
|
|
280
|
+
onKeydown: A
|
|
281
|
+
}, null, 40, de), [[x, l.value]]),
|
|
282
|
+
y.value ? (f(), o("ul", fe, [(f(!0), o(n, null, m(g.value, (e, t) => (f(), o("li", {
|
|
283
|
+
key: e.id,
|
|
284
|
+
role: "option",
|
|
285
|
+
"aria-selected": t === h.value,
|
|
286
|
+
tabindex: "0",
|
|
287
|
+
class: d(["mwnf-glossary-tool__hit", { "mwnf-glossary-tool__hit--active": t === h.value }]),
|
|
288
|
+
onClick: (t) => k(e),
|
|
289
|
+
onKeydown: T((t) => k(e), ["enter"])
|
|
290
|
+
}, _(e.spelling), 43, pe))), 128))])) : C.value ? (f(), o("p", me, _(S.value), 1)) : a("", !0),
|
|
291
|
+
u.value ? (f(), o("div", he, [s("p", ge, _(v(c)(i.definition)), 1), s("div", {
|
|
292
|
+
class: "mwnf-sheet__block",
|
|
293
|
+
innerHTML: b.value
|
|
294
|
+
}, null, 8, _e)])) : a("", !0)
|
|
295
|
+
])], 8, oe));
|
|
296
|
+
}
|
|
297
|
+
}, ye = ["dir"], be = ["innerHTML"], xe = { class: "mwnf-dynasty__body" }, Se = { class: "mwnf-dynasty__eyebrow" }, Ce = {
|
|
298
|
+
key: 0,
|
|
299
|
+
class: "mwnf-dynasty__field"
|
|
300
|
+
}, we = { class: "mwnf-dynasty__label" }, Te = {
|
|
301
|
+
key: 1,
|
|
302
|
+
class: "mwnf-dynasty__field"
|
|
303
|
+
}, Ee = { class: "mwnf-dynasty__label" }, De = {
|
|
304
|
+
key: 2,
|
|
305
|
+
class: "mwnf-dynasty__dates"
|
|
306
|
+
}, Oe = {
|
|
307
|
+
key: 3,
|
|
308
|
+
class: "mwnf-dynasty__history"
|
|
309
|
+
}, ke = { class: "mwnf-dynasty__label" }, Ae = ["innerHTML"], Q = {
|
|
310
|
+
__name: "DynastyPopout",
|
|
311
|
+
props: {
|
|
312
|
+
dynasty: {
|
|
313
|
+
type: Object,
|
|
314
|
+
required: !0
|
|
315
|
+
},
|
|
316
|
+
text: {
|
|
317
|
+
type: Object,
|
|
318
|
+
default: () => ({})
|
|
319
|
+
},
|
|
320
|
+
dir: {
|
|
321
|
+
type: String,
|
|
322
|
+
default: ""
|
|
323
|
+
}
|
|
324
|
+
},
|
|
325
|
+
setup(e) {
|
|
326
|
+
let t = e, { t: n } = E(), i = r(() => {
|
|
327
|
+
let { from_ad: e, to_ad: n, from_ah: r, to_ah: i } = t.dynasty ?? {};
|
|
328
|
+
return e == null && n == null ? "" : `${r != null || i != null ? `AH ${r ?? "?"}–${i ?? "?"} / ` : ""}AD ${e ?? "?"}–${n ?? "?"}`;
|
|
329
|
+
});
|
|
330
|
+
return (t, r) => (f(), o("details", {
|
|
331
|
+
class: "mwnf-dynasty",
|
|
332
|
+
dir: e.dir || void 0
|
|
333
|
+
}, [s("summary", {
|
|
334
|
+
class: "mwnf-dynasty__summary",
|
|
335
|
+
innerHTML: v(O)(e.text.name || e.dynasty.id)
|
|
336
|
+
}, null, 8, be), s("div", xe, [
|
|
337
|
+
s("p", Se, _(v(n)("record.dynasty.heading")), 1),
|
|
338
|
+
e.text.also_known_as ? (f(), o("p", Ce, [s("span", we, _(v(n)("sheet.field.alsoKnownAs")) + ":", 1), c(" " + _(e.text.also_known_as), 1)])) : a("", !0),
|
|
339
|
+
e.text.area ? (f(), o("p", Te, [s("span", Ee, _(v(n)("sheet.field.area")) + ":", 1), c(" " + _(e.text.area), 1)])) : a("", !0),
|
|
340
|
+
i.value ? (f(), o("p", De, _(i.value), 1)) : a("", !0),
|
|
341
|
+
e.text.history ? (f(), o("div", Oe, [s("p", ke, _(v(n)("sheet.field.history")), 1), s("div", {
|
|
342
|
+
class: "mwnf-sheet__block",
|
|
343
|
+
innerHTML: v(D)(e.text.history)
|
|
344
|
+
}, null, 8, Ae)])) : a("", !0)
|
|
345
|
+
])], 8, ye));
|
|
346
|
+
}
|
|
347
|
+
}, je = ["dir"], Me = {
|
|
348
|
+
key: 0,
|
|
349
|
+
class: "mwnf-dynasty-list__heading"
|
|
350
|
+
}, Ne = {
|
|
351
|
+
__name: "DynastyList",
|
|
352
|
+
props: {
|
|
353
|
+
heading: {
|
|
354
|
+
type: String,
|
|
355
|
+
default: ""
|
|
356
|
+
},
|
|
357
|
+
dynasties: {
|
|
358
|
+
type: Array,
|
|
359
|
+
default: () => []
|
|
360
|
+
},
|
|
361
|
+
tr: {
|
|
362
|
+
type: Function,
|
|
363
|
+
default: null
|
|
364
|
+
},
|
|
365
|
+
dir: {
|
|
366
|
+
type: String,
|
|
367
|
+
default: ""
|
|
368
|
+
}
|
|
369
|
+
},
|
|
370
|
+
setup(e) {
|
|
371
|
+
return (t, r) => e.dynasties.length ? (f(), o("section", {
|
|
372
|
+
key: 0,
|
|
373
|
+
class: "mwnf-dynasty-list",
|
|
374
|
+
dir: e.dir || void 0
|
|
375
|
+
}, [e.heading ? (f(), o("h2", Me, _(e.heading), 1)) : a("", !0), (f(!0), o(n, null, m(e.dynasties, (t) => (f(), i(Q, {
|
|
376
|
+
key: t.id,
|
|
377
|
+
dynasty: t,
|
|
378
|
+
text: e.tr ? e.tr(t) : t,
|
|
379
|
+
dir: e.dir
|
|
380
|
+
}, null, 8, [
|
|
381
|
+
"dynasty",
|
|
382
|
+
"text",
|
|
383
|
+
"dir"
|
|
384
|
+
]))), 128))], 8, je)) : a("", !0);
|
|
385
|
+
}
|
|
386
|
+
}, Pe = { class: "mwnf-sheet-timeline" }, Fe = {
|
|
387
|
+
key: 0,
|
|
388
|
+
class: "mwnf-sheet-timeline__popout",
|
|
389
|
+
dir: "ltr"
|
|
390
|
+
}, Ie = ["aria-label"], Le = { class: "mwnf-sheet-timeline__title" }, Re = { class: "mwnf-sheet-timeline__option" }, ze = ["value"], Be = { class: "mwnf-sheet-timeline__scroll" }, Ve = { class: "mwnf-sheet-timeline__subheader" }, $ = {
|
|
391
|
+
key: 0,
|
|
392
|
+
class: "mwnf-sheet-timeline__empty"
|
|
393
|
+
}, He = { class: "mwnf-sheet-timeline__date" }, Ue = ["innerHTML"], We = {
|
|
394
|
+
__name: "TimelineLookup",
|
|
395
|
+
props: { info: {
|
|
396
|
+
type: Object,
|
|
397
|
+
required: !0
|
|
398
|
+
} },
|
|
399
|
+
setup(e) {
|
|
400
|
+
let i = e, { t: u } = E(), d = p(!1), h = p(i.info.defaultCountry ? i.info.defaultCountry() : "all");
|
|
401
|
+
S(() => i.info, (e) => {
|
|
402
|
+
h.value = e.defaultCountry ? e.defaultCountry() : "all";
|
|
403
|
+
});
|
|
404
|
+
let g = r(() => i.info.range ?? [null, null]), y = r(() => i.info.events(h.value)), x = r(() => i.info.countries.find((e) => e.value === h.value)?.label ?? ""), T = (e) => i.info.era ? i.info.era(e) : String(e ?? "");
|
|
405
|
+
return (r, i) => (f(), o("div", Pe, [s("p", {
|
|
406
|
+
class: "mwnf-sheet-timeline__trigger",
|
|
407
|
+
onClick: i[0] ||= (e) => d.value = !d.value
|
|
408
|
+
}, "➤ " + _(v(u)(e.info.trigger ?? "record.related.timelineForItem")), 1), d.value ? (f(), o("div", Fe, [
|
|
409
|
+
s("button", {
|
|
410
|
+
type: "button",
|
|
411
|
+
class: "mwnf-sheet-timeline__close",
|
|
412
|
+
"aria-label": v(u)("core.action.close"),
|
|
413
|
+
onClick: i[1] ||= (e) => d.value = !1
|
|
414
|
+
}, "✕", 8, Ie),
|
|
415
|
+
s("p", Le, _(v(u)(e.info.heading)), 1),
|
|
416
|
+
s("div", Re, [w(s("select", {
|
|
417
|
+
"onUpdate:modelValue": i[2] ||= (e) => h.value = e,
|
|
418
|
+
class: "mwnf-sheet-timeline__select"
|
|
419
|
+
}, [(f(!0), o(n, null, m(e.info.countries, (e) => (f(), o("option", {
|
|
420
|
+
key: e.value,
|
|
421
|
+
value: e.value
|
|
422
|
+
}, _(e.label), 9, ze))), 128))], 512), [[b, h.value]]), l(t, {
|
|
423
|
+
class: "mwnf-sheet-timeline__link",
|
|
424
|
+
to: e.info.searchTo(h.value, g.value)
|
|
425
|
+
}, {
|
|
426
|
+
default: C(() => [c("➤ " + _(v(u)("timeline.action.beginFullSearch")), 1)]),
|
|
427
|
+
_: 1
|
|
428
|
+
}, 8, ["to"])]),
|
|
429
|
+
s("div", Be, [
|
|
430
|
+
s("p", Ve, _(x.value) + ", " + _(T(g.value[0])) + " – " + _(T(g.value[1])), 1),
|
|
431
|
+
y.value.length ? a("", !0) : (f(), o("p", $, _(v(u)("timeline.results.noEvents")), 1)),
|
|
432
|
+
(f(!0), o(n, null, m(y.value, (e, t) => (f(), o("div", {
|
|
433
|
+
key: e.id ?? t,
|
|
434
|
+
class: "mwnf-sheet-timeline__event"
|
|
435
|
+
}, [s("div", He, _(T(e.year_from)), 1), s("div", {
|
|
436
|
+
class: "mwnf-sheet-timeline__description",
|
|
437
|
+
innerHTML: v(D)(e.text.description)
|
|
438
|
+
}, null, 8, Ue)]))), 128))
|
|
439
|
+
])
|
|
440
|
+
])) : a("", !0)]));
|
|
441
|
+
}
|
|
442
|
+
}, Ge = ["href"], Ke = {
|
|
443
|
+
key: 0,
|
|
444
|
+
class: "mwnf-related-media__description"
|
|
445
|
+
}, qe = {
|
|
446
|
+
__name: "RelatedMedia",
|
|
447
|
+
props: {
|
|
448
|
+
media: {
|
|
449
|
+
type: Array,
|
|
450
|
+
default: () => []
|
|
451
|
+
},
|
|
452
|
+
language: {
|
|
453
|
+
type: String,
|
|
454
|
+
default: ""
|
|
455
|
+
},
|
|
456
|
+
descriptions: {
|
|
457
|
+
type: Boolean,
|
|
458
|
+
default: !0
|
|
459
|
+
},
|
|
460
|
+
heading: {
|
|
461
|
+
type: String,
|
|
462
|
+
default: "record.related.audioVideo"
|
|
463
|
+
},
|
|
464
|
+
dir: {
|
|
465
|
+
type: String,
|
|
466
|
+
default: ""
|
|
467
|
+
}
|
|
468
|
+
},
|
|
469
|
+
setup(t) {
|
|
470
|
+
let c = t, { t: l } = E(), u = r(() => {
|
|
471
|
+
let e = c.media.filter((e) => e?.url);
|
|
472
|
+
if (!c.language) return e;
|
|
473
|
+
let t = e.filter((e) => e.language === c.language);
|
|
474
|
+
return t.length ? t : e;
|
|
475
|
+
});
|
|
476
|
+
return (r, c) => u.value.length ? (f(), i(e, {
|
|
477
|
+
key: 0,
|
|
478
|
+
heading: t.heading ? v(l)(t.heading) : "",
|
|
479
|
+
dir: t.dir,
|
|
480
|
+
class: "mwnf-related-media"
|
|
481
|
+
}, {
|
|
482
|
+
default: C(() => [(f(!0), o(n, null, m(u.value, (e) => (f(), o("div", {
|
|
483
|
+
key: e.url,
|
|
484
|
+
class: "mwnf-related-media__entry"
|
|
485
|
+
}, [s("a", {
|
|
486
|
+
href: e.url,
|
|
487
|
+
target: "_blank",
|
|
488
|
+
rel: "noopener",
|
|
489
|
+
class: "mwnf-related-media__link"
|
|
490
|
+
}, "↗ " + _(e.title || e.url), 9, Ge), t.descriptions && e.description ? (f(), o("p", Ke, _(e.description), 1)) : a("", !0)]))), 128))]),
|
|
491
|
+
_: 1
|
|
492
|
+
}, 8, ["heading", "dir"])) : a("", !0);
|
|
493
|
+
}
|
|
494
|
+
}, Je = {
|
|
495
|
+
key: 0,
|
|
496
|
+
class: "mwnf-on-display__subheading"
|
|
497
|
+
}, Ye = { class: "mwnf-on-display__list" }, Xe = ["innerHTML"], Ze = ["innerHTML"], Qe = { class: "mwnf-on-display__pending" }, $e = {
|
|
498
|
+
__name: "OnDisplayIn",
|
|
499
|
+
props: {
|
|
500
|
+
groups: {
|
|
501
|
+
type: Array,
|
|
502
|
+
default: () => []
|
|
503
|
+
},
|
|
504
|
+
heading: {
|
|
505
|
+
type: String,
|
|
506
|
+
default: "record.related.onDisplayIn"
|
|
507
|
+
},
|
|
508
|
+
pendingLabel: {
|
|
509
|
+
type: String,
|
|
510
|
+
default: ""
|
|
511
|
+
},
|
|
512
|
+
dir: {
|
|
513
|
+
type: String,
|
|
514
|
+
default: ""
|
|
515
|
+
}
|
|
516
|
+
},
|
|
517
|
+
setup(l) {
|
|
518
|
+
let d = l, { t: p } = E(), h = r(() => d.groups.filter((e) => e.links?.length));
|
|
519
|
+
return (r, d) => h.value.length ? (f(), i(g(l.heading ? e : "div"), u({ key: 0 }, l.heading ? { heading: v(p)(l.heading) } : {}, {
|
|
520
|
+
dir: l.dir || void 0,
|
|
521
|
+
class: "mwnf-on-display"
|
|
522
|
+
}), {
|
|
523
|
+
default: C(() => [(f(!0), o(n, null, m(h.value, (e, r) => (f(), o("div", {
|
|
524
|
+
key: e.heading ?? r,
|
|
525
|
+
class: "mwnf-on-display__group"
|
|
526
|
+
}, [e.heading ? (f(), o("p", Je, _(v(p)(e.heading)), 1)) : a("", !0), s("ul", Ye, [(f(!0), o(n, null, m(e.links, (e, r) => (f(), o("li", {
|
|
527
|
+
key: e.id ?? r,
|
|
528
|
+
class: "mwnf-on-display__item"
|
|
529
|
+
}, [e.to || e.href ? (f(), i(t, {
|
|
530
|
+
key: 0,
|
|
531
|
+
to: e.to,
|
|
532
|
+
href: e.href,
|
|
533
|
+
external: !!e.external
|
|
534
|
+
}, {
|
|
535
|
+
default: C(() => [e.external ? (f(), o(n, { key: 0 }, [c("↗ ")], 64)) : a("", !0), s("span", { innerHTML: e.label }, null, 8, Xe)]),
|
|
536
|
+
_: 2
|
|
537
|
+
}, 1032, [
|
|
538
|
+
"to",
|
|
539
|
+
"href",
|
|
540
|
+
"external"
|
|
541
|
+
])) : (f(), o(n, { key: 1 }, [s("span", { innerHTML: e.label }, null, 8, Ze), l.pendingLabel ? (f(), o(n, { key: 0 }, [d[0] ||= c(_(" "), -1), s("span", Qe, _(v(p)(l.pendingLabel)), 1)], 64)) : a("", !0)], 64))]))), 128))])]))), 128))]),
|
|
542
|
+
_: 1
|
|
543
|
+
}, 16, ["dir"])) : a("", !0);
|
|
544
|
+
}
|
|
545
|
+
};
|
|
546
|
+
//#endregion
|
|
547
|
+
export { Q as a, G as c, Ne as i, qe as n, ve as o, We as r, ae as s, $e as t };
|