@museumwnf/viewer-layout 2.17.0 → 2.18.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@museumwnf/viewer-layout",
3
- "version": "2.17.0",
3
+ "version": "2.18.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",
@@ -35,12 +35,12 @@
35
35
  "test": "vitest run"
36
36
  },
37
37
  "peerDependencies": {
38
- "@museumwnf/viewer-core": "^2.1.0",
38
+ "@museumwnf/viewer-core": "^2.3.0",
39
39
  "vue": "^3.5.0",
40
40
  "vue-router": "^4.5.0 || ^5.0.0"
41
41
  },
42
42
  "devDependencies": {
43
- "@museumwnf/viewer-core": "^2.2.0",
43
+ "@museumwnf/viewer-core": "^2.3.0",
44
44
  "@vitejs/plugin-vue": "^6.0.8",
45
45
  "@vue/test-utils": "^2.4.11",
46
46
  "jsdom": "^30.0.1",
@@ -758,19 +758,21 @@
758
758
  /* --mwnf-chip-background: #1c1c1c; Chip background color (default fallback) */
759
759
  /* --mwnf-chip-radius: 0; Chip corner radius */
760
760
  /* --mwnf-project-ISLandEPM: #ffcc00; Discover Islamic Art / Exhibitions colours chip */
761
- /* --mwnf-project-ISLandEPM-text: #222222; Discover Islamic Art / Exhibitions chip text */
761
+ /* --mwnf-project-ISLandEPM-text: #000000; Discover Islamic Art / Exhibitions chip text */
762
762
  /* --mwnf-project-DBA: #001d66; Discover Baroque Art chip colour */
763
763
  /* --mwnf-project-DBA-text: #ffffff; Discover Baroque Art chip text */
764
764
  /* --mwnf-project-AWE: #900000; Sharing History chip colour */
765
765
  /* --mwnf-project-AWE-text: #ffffff; Sharing History chip text */
766
766
  /* --mwnf-project-DCA: #6b612b; Discover Carpets chip colour */
767
767
  /* --mwnf-project-DCA-text: #ffffff; Discover Carpets chip text */
768
- /* --mwnf-project-DGA: #263238; Discover Galleries chip colour */
769
- /* --mwnf-project-DGA-text: #ffffff; Discover Galleries chip text */
768
+ /* --mwnf-project-DGA: #0059bf; Discover Glass Art chip colour */
769
+ /* --mwnf-project-DGA-text: #ffffff; Discover Glass Art chip text */
770
770
  /* --mwnf-project-EXH: #7f01d4; Exhibitions chip colour */
771
771
  /* --mwnf-project-EXH-text: #ffffff; Exhibitions chip text */
772
772
  /* --mwnf-project-Galleries: #263238; Galleries chip colour */
773
773
  /* --mwnf-project-Galleries-text: #ffffff; Galleries chip text */
774
+ /* --mwnf-project-Explore: #006950; Explore chip colour (a record no project claims) */
775
+ /* --mwnf-project-Explore-text: #ffffff; Explore chip text */
774
776
 
775
777
  /* --mwnf-popout-padding: 1rem; Popout box padding */
776
778
  /* --mwnf-popout-background: #ffffff; Popout box background color */
@@ -785,4 +787,11 @@
785
787
  /* ---------- DXA family pages (src/dxa/) ---------- */
786
788
  /* --mwnf-dxa-heading-color: #1c1c1c; Partner name / profile heading color */
787
789
  /* --mwnf-dxa-band-background: #f0f0f0; Language switcher / tab strip / timeline-link box background */
790
+ /* --mwnf-dxa-item-background: #ffffff; Item page ground (white on a gallery's tinted page) */
791
+ /* --mwnf-dxa-item-link: var(--mwnf-color-accent); Item sheet value links */
792
+ /* --mwnf-dxa-theme-background: #ffffff; Exhibition theme pages: the ground (legacy's secondary colour) */
793
+ /* --mwnf-dxa-theme-text: #000000; Their text and tour links (secondary text colour) */
794
+ /* --mwnf-dxa-theme-contrast: #64bfd9; The heading band and link hover (contrast colour) */
795
+ /* --mwnf-dxa-theme-contrast-text: #000000; The heading band's text (contrast text colour) */
796
+ /* --mwnf-dxa-theme-main: #000000; The themes page's left half (main colour) */
788
797
  }
@@ -1,73 +0,0 @@
1
- import { v as e } from "./TimelineEventList-D5Hot788.js";
2
- import { computed as t, createBlock as n, createElementBlock as r, createElementVNode as i, createTextVNode as a, openBlock as o, renderSlot as s, toDisplayString as c, withCtx as l } from "vue";
3
- import { useRouter as u } from "vue-router";
4
- //#region src/content/BackLink.vue
5
- var d = ["href"], f = {
6
- class: "mwnf-back-bar__arrow",
7
- "aria-hidden": "true"
8
- }, p = {
9
- key: 1,
10
- class: "mwnf-back-link"
11
- }, m = {
12
- __name: "BackLink",
13
- props: {
14
- label: {
15
- type: String,
16
- default: "core.action.back"
17
- },
18
- to: {
19
- type: [String, Object],
20
- default: null
21
- },
22
- href: {
23
- type: String,
24
- default: ""
25
- },
26
- variant: {
27
- type: String,
28
- default: "button",
29
- validator: (e) => ["button", "bar"].includes(e)
30
- },
31
- arrow: {
32
- type: String,
33
- default: "←"
34
- }
35
- },
36
- setup(m) {
37
- let h = u(), g = m, _ = t(() => !!(g.to || g.href));
38
- function v() {
39
- return window.history.state?.back != null || !_.value && window.history.length > 1;
40
- }
41
- function y() {
42
- v() && h.back();
43
- }
44
- let b = t(() => g.to && h ? h.resolve(g.to).href : g.href || (typeof g.to == "string" ? g.to : "") || "#");
45
- function x(e) {
46
- e.button !== 0 || e.metaKey || e.ctrlKey || e.shiftKey || e.altKey || (v() ? (e.preventDefault(), h.back()) : g.to && h ? (e.preventDefault(), h.push(g.to)) : _.value || e.preventDefault());
47
- }
48
- return (t, u) => m.variant === "bar" ? (o(), r("a", {
49
- key: 0,
50
- href: b.value,
51
- class: "mwnf-back-bar mwnf-back-bar--link",
52
- onClick: x
53
- }, [
54
- i("span", f, c(m.arrow), 1),
55
- u[0] ||= a(),
56
- s(t.$slots, "default", {}, () => [a(c(t.$t(m.label)), 1)])
57
- ], 8, d)) : (o(), r("div", p, [_.value && !v() ? (o(), n(e, {
58
- key: 0,
59
- to: m.to,
60
- href: m.href,
61
- class: "mwnf-back-link__button"
62
- }, {
63
- default: l(() => [a(" ↩ " + c(t.$t(m.label)), 1)]),
64
- _: 1
65
- }, 8, ["to", "href"])) : (o(), r("button", {
66
- key: 1,
67
- class: "mwnf-back-link__button",
68
- onClick: y
69
- }, " ↩ " + c(t.$t(m.label)), 1))]));
70
- }
71
- };
72
- //#endregion
73
- export { m as t };
@@ -1,547 +0,0 @@
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 };