@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
package/dist/views.js
CHANGED
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a, g as
|
|
3
|
-
import { a as
|
|
4
|
-
import { Fragment as
|
|
5
|
-
import { I18nText as
|
|
1
|
+
import { c as e, i as t, n, o as r, r as i, s as a, t as o } from "./OnDisplayIn-ZfRUtPd1.js";
|
|
2
|
+
import { a as s, g as ee, i as c, n as l, o as u, s as d, v as f } from "./TimelineEventList-D5Hot788.js";
|
|
3
|
+
import { a as p, i as m, n as h, o as te, r as g, t as _ } from "./TimelineResultsView-DJo_yYEK.js";
|
|
4
|
+
import { Fragment as v, computed as y, createBlock as b, createCommentVNode as x, createElementBlock as S, createElementVNode as C, createSlots as ne, createTextVNode as w, createVNode as T, guardReactiveProps as E, mergeProps as D, normalizeClass as O, normalizeProps as k, openBlock as A, ref as j, renderList as M, renderSlot as N, toDisplayString as P, unref as F, useSlots as re, watch as ie, withCtx as I } from "vue";
|
|
5
|
+
import { I18nText as L, NotFoundView as ae, byId as oe, entityRef as se, glossaryEntries as ce, glossaryTermsForText as le, loadEntities as R, mdInline as z, mdStrip as B, mwnfLinks as V, partnerView as ue, renderBlock as de, renderInline as H, renderPlain as fe, useCollectionTree as pe, useDataPackage as me, useFeaturedRecord as he, useGlossaryPopup as ge, useI18n as _e, useProjects as ve, useRecordLanguage as ye, useSiteConfig as be } from "@museumwnf/viewer-core";
|
|
6
6
|
//#region src/views/HomeView.vue
|
|
7
|
-
var
|
|
8
|
-
key: 0,
|
|
9
|
-
class: "mwnf-home__welcome"
|
|
10
|
-
}, ye = {
|
|
7
|
+
var U = { class: "mwnf-home" }, xe = {
|
|
11
8
|
key: 0,
|
|
12
9
|
class: "mwnf-home__title"
|
|
13
|
-
},
|
|
10
|
+
}, Se = {
|
|
14
11
|
__name: "HomeView",
|
|
15
12
|
props: {
|
|
16
13
|
title: {
|
|
@@ -28,10 +25,14 @@ var V = { class: "mwnf-home" }, ve = {
|
|
|
28
25
|
featured: {
|
|
29
26
|
type: Object,
|
|
30
27
|
default: null
|
|
28
|
+
},
|
|
29
|
+
panels: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
default: null
|
|
31
32
|
}
|
|
32
33
|
},
|
|
33
34
|
setup(t) {
|
|
34
|
-
let n = t, { t:
|
|
35
|
+
let n = t, { t: r, locale: i } = _e(), o = be(), s = y(() => ({
|
|
35
36
|
...o.home ?? {},
|
|
36
37
|
...ee(n)
|
|
37
38
|
}));
|
|
@@ -41,90 +42,98 @@ var V = { class: "mwnf-home" }, ve = {
|
|
|
41
42
|
"title",
|
|
42
43
|
"intro",
|
|
43
44
|
"cards",
|
|
44
|
-
"featured"
|
|
45
|
+
"featured",
|
|
46
|
+
"panels"
|
|
45
47
|
]) e[n] != null && e[n] !== "" && (t[n] = e[n]);
|
|
46
48
|
return t;
|
|
47
49
|
}
|
|
48
|
-
let
|
|
50
|
+
let c = y(() => (s.value.cards ?? []).map((e) => ({
|
|
49
51
|
...e,
|
|
50
|
-
title: e.title ?
|
|
51
|
-
description: e.description ?
|
|
52
|
-
action: e.action ?
|
|
53
|
-
}))),
|
|
54
|
-
|
|
55
|
-
let
|
|
56
|
-
seed:
|
|
57
|
-
images:
|
|
58
|
-
|
|
59
|
-
|
|
52
|
+
title: e.title ? r(e.title) : "",
|
|
53
|
+
description: e.description ? r(e.description) : "",
|
|
54
|
+
action: e.action ? r(e.action) : ""
|
|
55
|
+
}))), l = y(() => s.value.featured ?? null), u = l.value?.entity ?? "", d = me();
|
|
56
|
+
u && d.loadTranslations(u, "en");
|
|
57
|
+
let f = u ? he(u, {
|
|
58
|
+
seed: l.value?.seed,
|
|
59
|
+
images: l.value?.images ?? "images",
|
|
60
|
+
filter: l.value?.filter
|
|
61
|
+
}) : y(() => null), p = y(() => f.value ? d.tr(u, f.value.id, i.value, "en") : {});
|
|
62
|
+
function m(e, t, n) {
|
|
60
63
|
return typeof e == "function" ? e(t, n) : typeof e != "string" || !e ? "" : n[e] ?? t[e] ?? "";
|
|
61
64
|
}
|
|
62
|
-
let
|
|
63
|
-
let e =
|
|
65
|
+
let h = y(() => {
|
|
66
|
+
let e = f.value, t = l.value;
|
|
64
67
|
if (!e || !t) return null;
|
|
65
|
-
let n =
|
|
68
|
+
let n = p.value.name ?? e.internal_name ?? e.id, i = typeof t.meta == "function" ? t.meta(e, p.value) : (t.meta ?? []).map((t) => m(t, e, p.value)), a = t.images ?? "images";
|
|
66
69
|
return {
|
|
67
|
-
heading: t.heading ?
|
|
70
|
+
heading: t.heading ? r(t.heading) : "",
|
|
68
71
|
image: e[a]?.[0]?.url ?? "",
|
|
69
72
|
imageAlt: fe(String(n)),
|
|
70
|
-
eyebrow: String(
|
|
71
|
-
name:
|
|
72
|
-
meta:
|
|
73
|
-
action: t.action ?
|
|
73
|
+
eyebrow: String(m(t.eyebrow, e, p.value) ?? ""),
|
|
74
|
+
name: H(String(n)),
|
|
75
|
+
meta: i.filter(Boolean).map(String),
|
|
76
|
+
action: t.action ? r(t.action) : "",
|
|
74
77
|
to: typeof t.to == "function" ? t.to(e) : {
|
|
75
78
|
name: t.route ?? "item",
|
|
76
79
|
params: { id: e.id }
|
|
77
80
|
}
|
|
78
81
|
};
|
|
79
82
|
});
|
|
80
|
-
return (t, n) => (
|
|
81
|
-
s.value.title || s.value.intro ? (
|
|
83
|
+
return (t, n) => (A(), S("section", U, [
|
|
84
|
+
s.value.title || s.value.intro ? (A(), S("header", {
|
|
85
|
+
key: 0,
|
|
86
|
+
class: O(["mwnf-home__welcome", { "mwnf-panel": s.value.panels }])
|
|
87
|
+
}, [s.value.title ? (A(), S("h1", xe, P(F(r)(s.value.title)), 1)) : x("", !0), s.value.intro ? (A(), b(F(L), {
|
|
82
88
|
key: 1,
|
|
83
89
|
tag: "div",
|
|
84
90
|
class: "mwnf-home__intro",
|
|
85
91
|
keypath: s.value.intro
|
|
86
|
-
}, null, 8, ["keypath"])) :
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
+
}, null, 8, ["keypath"])) : x("", !0)], 2)) : x("", !0),
|
|
93
|
+
N(t.$slots, "before"),
|
|
94
|
+
T(e, { cards: c.value }, null, 8, ["cards"]),
|
|
95
|
+
N(t.$slots, "default"),
|
|
96
|
+
h.value ? (A(), b(a, D({ key: 1 }, h.value, { class: { "mwnf-panel": s.value.panels } }), null, 16, ["class"])) : x("", !0),
|
|
97
|
+
N(t.$slots, "after")
|
|
92
98
|
]));
|
|
93
99
|
}
|
|
94
|
-
},
|
|
100
|
+
}, Ce = {
|
|
95
101
|
key: 0,
|
|
96
102
|
class: "mwnf-sheet-source"
|
|
97
|
-
},
|
|
103
|
+
}, we = {
|
|
98
104
|
key: 0,
|
|
99
105
|
class: "mwnf-sheet-source__line"
|
|
100
|
-
},
|
|
106
|
+
}, Te = {
|
|
101
107
|
key: 1,
|
|
102
108
|
class: "mwnf-sheet-source__uid"
|
|
103
|
-
},
|
|
109
|
+
}, Ee = {
|
|
104
110
|
key: 2,
|
|
105
111
|
class: "mwnf-sheet-source__collection"
|
|
106
|
-
},
|
|
112
|
+
}, De = ["href"], Oe = {
|
|
107
113
|
key: 1,
|
|
108
114
|
class: "mwnf-sheet-notice"
|
|
109
|
-
},
|
|
115
|
+
}, ke = {
|
|
116
|
+
key: "museum",
|
|
117
|
+
class: "mwnf-sheet-museum"
|
|
118
|
+
}, Ae = ["innerHTML"], je = {
|
|
110
119
|
key: 0,
|
|
111
120
|
class: "mwnf-sheet-related"
|
|
112
|
-
},
|
|
121
|
+
}, Me = {
|
|
113
122
|
key: 0,
|
|
114
123
|
class: "mwnf-sheet-related__heading mwnf-sheet-related__heading--caps"
|
|
115
|
-
},
|
|
124
|
+
}, Ne = {
|
|
116
125
|
key: 1,
|
|
117
126
|
class: "mwnf-sheet-related__description"
|
|
118
|
-
},
|
|
127
|
+
}, Pe = {
|
|
119
128
|
key: 0,
|
|
120
129
|
class: "mwnf-sheet-related__references"
|
|
121
|
-
},
|
|
130
|
+
}, W = { key: 2 }, Fe = {
|
|
122
131
|
key: 3,
|
|
123
132
|
class: "mwnf-sheet-related__unresolved"
|
|
124
|
-
},
|
|
133
|
+
}, Ie = {
|
|
125
134
|
key: 2,
|
|
126
135
|
class: "mwnf-sheet-related__line"
|
|
127
|
-
},
|
|
136
|
+
}, Le = ["href"], Re = { key: 6 }, ze = { class: "mwnf-sheet-related__heading" }, Be = { key: 7 }, Ve = { class: "mwnf-sheet-related__heading" }, G = { class: "mwnf-sheet-related__line" }, K = ["href"], q = { key: 8 }, He = { class: "mwnf-sheet-related__heading" }, Ue = { class: "mwnf-sheet-related__line" }, J = ["href"], We = { key: 9 }, Ge = { class: "mwnf-sheet-related__heading" }, Y = {
|
|
128
137
|
__name: "RecordSheetView",
|
|
129
138
|
props: {
|
|
130
139
|
spec: {
|
|
@@ -145,23 +154,23 @@ var V = { class: "mwnf-home" }, ve = {
|
|
|
145
154
|
}
|
|
146
155
|
},
|
|
147
156
|
setup(e) {
|
|
148
|
-
let
|
|
157
|
+
let a = e, s = re(), ee = /* @__PURE__ */ new Set([
|
|
149
158
|
"before-sheet",
|
|
150
159
|
"museum",
|
|
151
160
|
"related"
|
|
152
|
-
]),
|
|
161
|
+
]), c = y(() => Object.keys(s).filter((e) => !ee.has(e))), d = y(() => !a.dataGetter || a.dataGetter(a.id) != null), { t: f } = _e(), m = y(() => a.spec), h = ve(), te = (e, t) => (e.name ?? "").localeCompare(t.name ?? ""), g = (e) => (e.gallery_references ?? []).filter((e) => e.kind === "gallery").sort(te), _ = (e) => (e.gallery_references ?? []).filter((e) => e.kind === "exhibition").sort(te), D = (e) => h.links(e.project_id)?.artisticIntroductionUrl ?? null, j = (e) => h.links(e.project_id)?.relatedDatabaseUrl ?? null;
|
|
153
162
|
function ie(e, t) {
|
|
154
163
|
if (!e) return null;
|
|
155
|
-
let n =
|
|
164
|
+
let n = m.value.sourceDatabase === !1 ? null : m.value.sourceDatabase ?? null, r = null;
|
|
156
165
|
if (n) {
|
|
157
|
-
let i = n.chipClass ? n.chipClass(e, t) : null, a =
|
|
166
|
+
let i = n.chipClass ? n.chipClass(e, t) : null, a = h.label(e.project_id);
|
|
158
167
|
(i || a) && (r = {
|
|
159
168
|
chipClass: i,
|
|
160
169
|
name: a,
|
|
161
|
-
label:
|
|
170
|
+
label: f(n.label ?? "record.sheet.sourceDatabase")
|
|
162
171
|
});
|
|
163
172
|
}
|
|
164
|
-
let i = n && n.addToCollection !== !1 ?
|
|
173
|
+
let i = n && n.addToCollection !== !1 ? f(n.addToCollection?.label ?? "record.action.addToCollection") : null, a = n ? e.backward_compatibility ?? "" : "", o = m.value.notice === !1 ? null : m.value.notice ?? null, s = o && o.show(e, t) ? f(o.label) : null;
|
|
165
174
|
return {
|
|
166
175
|
source: r,
|
|
167
176
|
addToCollectionLabel: i,
|
|
@@ -169,104 +178,127 @@ var V = { class: "mwnf-home" }, ve = {
|
|
|
169
178
|
backwardCompatibility: a
|
|
170
179
|
};
|
|
171
180
|
}
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
181
|
+
let L = me(), se = oe("partners"), ce = oe("countries");
|
|
182
|
+
R(["partners", "countries"]), L.loadTranslations("countries", "en");
|
|
183
|
+
function le(e, t) {
|
|
184
|
+
let n = L.tr("countries", e, t, "en");
|
|
185
|
+
return B(n.name ?? ce.value?.get(e)?.internal_name ?? "");
|
|
186
|
+
}
|
|
187
|
+
function de(e) {
|
|
188
|
+
let t = e.text?.holder ? z(String(e.text.holder)) : "", n = m.value.museum === !1 ? null : m.value.museum ?? null, r = n ? se.value?.get(e.record?.partner_id) : null;
|
|
189
|
+
return {
|
|
190
|
+
holder: t,
|
|
191
|
+
view: r ? ue(r, L.tr("partners", r.id, e.language, "en"), {
|
|
192
|
+
countryLabel: (t) => le(t, e.language),
|
|
193
|
+
route: (t) => n.route ? n.route(t.id, e) : null
|
|
194
|
+
}) : null
|
|
177
195
|
};
|
|
178
196
|
}
|
|
179
|
-
function
|
|
197
|
+
function H(e, t) {
|
|
180
198
|
if (!e) return null;
|
|
181
|
-
let n =
|
|
199
|
+
let n = m.value.related ?? {}, r = t.records ?? [], i = t.outside ?? [], o = a.dataGetter ? r.filter((e) => a.dataGetter(e.id) != null) : r, s = a.dataGetter ? r.filter((e) => a.dataGetter(e.id) == null).map((t) => (e.related_items ?? []).find((e) => e.id === t.id)).filter(Boolean) : [], ee = [...i, ...s].map((e) => ({
|
|
182
200
|
...e,
|
|
183
|
-
name: e.project_id ?
|
|
201
|
+
name: e.project_id ? h.label(e.project_id) : null,
|
|
184
202
|
chipClass: n.outsideChip ? n.outsideChip(e, t) : null
|
|
185
|
-
})),
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
203
|
+
})), c = (e) => ({
|
|
204
|
+
id: e.id,
|
|
205
|
+
label: z(e.name ?? ""),
|
|
206
|
+
href: e.legacy_host || "",
|
|
207
|
+
external: !!e.legacy_host
|
|
208
|
+
}), l = n.onDisplayIn && n.onDisplayIn !== !1 ? {
|
|
209
|
+
pendingLabel: n.onDisplayIn.linkPendingLabel ?? "",
|
|
210
|
+
groups: [{
|
|
211
|
+
heading: "record.related.exhibitions",
|
|
212
|
+
links: _(e).map(c)
|
|
213
|
+
}, {
|
|
214
|
+
heading: "record.related.galleries",
|
|
215
|
+
links: g(e).map(c)
|
|
216
|
+
}].filter((e) => e.links.length)
|
|
217
|
+
} : null, u = n.databaseLabel && j(e) ? {
|
|
218
|
+
url: j(e),
|
|
219
|
+
label: f(n.databaseLabel),
|
|
220
|
+
name: h.label(e.project_id)
|
|
221
|
+
} : null, d = n.overallDatabase && n.overallDatabase !== !1 ? {
|
|
222
|
+
label: f(n.overallDatabase.label),
|
|
223
|
+
linkLabel: f(n.overallDatabase.linkLabel)
|
|
196
224
|
} : null;
|
|
197
225
|
return {
|
|
198
|
-
title: n.title ?
|
|
199
|
-
description: n.description ?
|
|
200
|
-
heading:
|
|
226
|
+
title: n.title ? f(n.title) : "",
|
|
227
|
+
description: n.description ? f(n.description) : "",
|
|
228
|
+
heading: f(n.heading ?? "record.related.items"),
|
|
201
229
|
variant: n.variant ?? "grid",
|
|
202
|
-
actionLabel: n.actionLabel ?
|
|
230
|
+
actionLabel: n.actionLabel ? f(n.actionLabel) : "",
|
|
203
231
|
inPackage: o,
|
|
204
232
|
references: ee,
|
|
205
|
-
notInPackageLabel: n.notInPackageLabel ?
|
|
206
|
-
artisticIntroduction: n.artisticIntroductionLabel &&
|
|
207
|
-
url:
|
|
208
|
-
label:
|
|
233
|
+
notInPackageLabel: n.notInPackageLabel ? f(n.notInPackageLabel) : "",
|
|
234
|
+
artisticIntroduction: n.artisticIntroductionLabel && D(e) ? {
|
|
235
|
+
url: D(e),
|
|
236
|
+
label: f(n.artisticIntroductionLabel)
|
|
209
237
|
} : null,
|
|
210
238
|
timeline: n.timeline ? n.timeline(e, t) : null,
|
|
211
239
|
glossary: n.glossary !== !1,
|
|
212
240
|
dynasties: n.dynasties ? n.dynasties(e, t.language, t) : null,
|
|
213
241
|
media: n.media === !1 ? [] : e.media ?? [],
|
|
214
|
-
onDisplayIn:
|
|
215
|
-
database:
|
|
216
|
-
overallDatabase:
|
|
242
|
+
onDisplayIn: l,
|
|
243
|
+
database: u,
|
|
244
|
+
overallDatabase: d,
|
|
217
245
|
download: n.download === !1 ? null : {
|
|
218
|
-
label:
|
|
219
|
-
pdfLabel:
|
|
246
|
+
label: f("record.action.download"),
|
|
247
|
+
pdfLabel: f("record.action.downloadPdf")
|
|
220
248
|
}
|
|
221
249
|
};
|
|
222
250
|
}
|
|
223
|
-
function
|
|
251
|
+
function fe() {
|
|
224
252
|
window.print();
|
|
225
253
|
}
|
|
226
|
-
return (
|
|
254
|
+
return (a, s) => d.value ? (A(), b(p, {
|
|
227
255
|
key: 0,
|
|
228
|
-
spec:
|
|
256
|
+
spec: m.value,
|
|
229
257
|
id: e.id,
|
|
230
258
|
entity: e.entity
|
|
231
|
-
},
|
|
232
|
-
"before-sheet":
|
|
233
|
-
t.source ? (
|
|
259
|
+
}, ne({
|
|
260
|
+
"before-sheet": I((e) => [N(a.$slots, "before-sheet", k(E(e)), () => [(A(!0), S(v, null, M([ie(e.record, e)], (t) => (A(), S(v, { key: "before-sheet" }, [t?.source || t?.backwardCompatibility || t?.addToCollectionLabel ? (A(), S("div", Ce, [
|
|
261
|
+
t.source ? (A(), S("p", we, [t.source.chipClass ? (A(), S("span", {
|
|
234
262
|
key: 0,
|
|
235
|
-
class:
|
|
263
|
+
class: O(["mwnf-chip", t.source.chipClass]),
|
|
236
264
|
"aria-hidden": "true"
|
|
237
|
-
}, null, 2)) :
|
|
238
|
-
t.backwardCompatibility ? (
|
|
239
|
-
t.addToCollectionLabel ? (
|
|
240
|
-
href:
|
|
265
|
+
}, null, 2)) : x("", !0), t.source.name ? (A(), S(v, { key: 1 }, [w(P(t.source.label) + ": " + P(t.source.name), 1)], 64)) : x("", !0)])) : x("", !0),
|
|
266
|
+
t.backwardCompatibility ? (A(), S("p", Te, [C("code", null, P(t.backwardCompatibility), 1)])) : x("", !0),
|
|
267
|
+
t.addToCollectionLabel ? (A(), S("p", Ee, [C("a", {
|
|
268
|
+
href: F(V).myCollection,
|
|
241
269
|
target: "_blank",
|
|
242
270
|
rel: "noopener"
|
|
243
|
-
}, "↗ " +
|
|
244
|
-
])) :
|
|
245
|
-
museum:
|
|
271
|
+
}, "↗ " + P(t.addToCollectionLabel), 9, De)])) : x("", !0)
|
|
272
|
+
])) : x("", !0), t?.notice ? (A(), S("div", Oe, [w(P(t.notice) + " ", 1), C("strong", null, [C("em", null, P(e.languages.map((e) => e.label).join(", ")), 1)])])) : x("", !0)], 64))), 128))])]),
|
|
273
|
+
museum: I((e) => [N(a.$slots, "museum", k(E(e)), () => [(A(!0), S(v, null, M([de(e)], (t) => (A(), S("div", ke, [t.holder ? (A(), S("p", {
|
|
246
274
|
key: 0,
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
275
|
+
class: "mwnf-sheet-museum__holder",
|
|
276
|
+
innerHTML: t.holder
|
|
277
|
+
}, null, 8, Ae)) : x("", !0), t.view ? (A(), b(l, {
|
|
278
|
+
key: 1,
|
|
279
|
+
variant: "summary",
|
|
280
|
+
partner: t.view,
|
|
281
|
+
label: "partner.info.about",
|
|
282
|
+
dir: e.dir
|
|
283
|
+
}, null, 8, ["partner", "dir"])) : x("", !0)]))), 128))])]),
|
|
284
|
+
related: I((e) => [N(a.$slots, "related", k(E(e)), () => [(A(!0), S(v, null, M([H(e.record, e)], (a) => (A(), S(v, { key: e.record?.id ?? "related" }, [a ? (A(), S("div", je, [
|
|
285
|
+
a.title ? (A(), S("p", Me, P(a.title), 1)) : x("", !0),
|
|
286
|
+
a.description ? (A(), S("p", Ne, P(a.description), 1)) : x("", !0),
|
|
287
|
+
T(u, {
|
|
288
|
+
heading: a.heading,
|
|
289
|
+
records: a.inPackage,
|
|
290
|
+
variant: a.variant,
|
|
291
|
+
"action-label": a.actionLabel
|
|
260
292
|
}, {
|
|
261
|
-
default:
|
|
262
|
-
e.chipClass ? (
|
|
293
|
+
default: I(() => [a.references.length ? (A(), S("ul", Pe, [(A(!0), S(v, null, M(a.references, (e) => (A(), S("li", { key: e.id }, [
|
|
294
|
+
e.chipClass ? (A(), S("span", {
|
|
263
295
|
key: 0,
|
|
264
|
-
class:
|
|
296
|
+
class: O(["mwnf-chip", e.chipClass]),
|
|
265
297
|
"aria-hidden": "true"
|
|
266
|
-
}, null, 2)) :
|
|
267
|
-
e.name ? (
|
|
268
|
-
|
|
269
|
-
]))), 128))])) :
|
|
298
|
+
}, null, 2)) : x("", !0),
|
|
299
|
+
e.name ? (A(), S(v, { key: 1 }, [w(P(e.name), 1)], 64)) : (A(), S("code", W, P(e.backward_compatibility), 1)),
|
|
300
|
+
a.notInPackageLabel ? (A(), S("span", Fe, P(a.notInPackageLabel), 1)) : x("", !0)
|
|
301
|
+
]))), 128))])) : x("", !0)]),
|
|
270
302
|
_: 2
|
|
271
303
|
}, 1032, [
|
|
272
304
|
"heading",
|
|
@@ -274,129 +306,109 @@ var V = { class: "mwnf-home" }, ve = {
|
|
|
274
306
|
"variant",
|
|
275
307
|
"action-label"
|
|
276
308
|
]),
|
|
277
|
-
|
|
278
|
-
href:
|
|
309
|
+
a.artisticIntroduction ? (A(), S("p", Ie, [C("a", {
|
|
310
|
+
href: a.artisticIntroduction.url,
|
|
279
311
|
target: "_blank",
|
|
280
312
|
rel: "noopener"
|
|
281
|
-
}, "↗ " +
|
|
282
|
-
|
|
313
|
+
}, "↗ " + P(a.artisticIntroduction.label), 9, Le)])) : x("", !0),
|
|
314
|
+
a.timeline ? (A(), b(i, {
|
|
283
315
|
key: e.record.id,
|
|
284
|
-
info:
|
|
285
|
-
}, null, 8, ["info"])) :
|
|
286
|
-
|
|
316
|
+
info: a.timeline
|
|
317
|
+
}, null, 8, ["info"])) : x("", !0),
|
|
318
|
+
a.glossary ? (A(), b(r, {
|
|
287
319
|
key: 4,
|
|
288
320
|
language: e.language,
|
|
289
321
|
dir: e.dir
|
|
290
|
-
}, null, 8, ["language", "dir"])) :
|
|
291
|
-
|
|
322
|
+
}, null, 8, ["language", "dir"])) : x("", !0),
|
|
323
|
+
a.dynasties?.records?.length ? (A(), b(t, {
|
|
292
324
|
key: 5,
|
|
293
|
-
heading:
|
|
294
|
-
dynasties:
|
|
295
|
-
tr:
|
|
325
|
+
heading: F(f)("record.dynasty.list"),
|
|
326
|
+
dynasties: a.dynasties.records,
|
|
327
|
+
tr: a.dynasties.tr,
|
|
296
328
|
dir: e.dir
|
|
297
329
|
}, null, 8, [
|
|
298
330
|
"heading",
|
|
299
331
|
"dynasties",
|
|
300
332
|
"tr",
|
|
301
333
|
"dir"
|
|
302
|
-
])) :
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
key: e.id,
|
|
321
|
-
class: "mwnf-sheet-related__line"
|
|
322
|
-
}, [e.legacy_host ? (O(), y("a", {
|
|
323
|
-
key: 0,
|
|
324
|
-
href: e.legacy_host,
|
|
325
|
-
target: "_blank",
|
|
326
|
-
rel: "noopener"
|
|
327
|
-
}, "↗ " + M(e.name), 9, Le)) : (O(), y("span", Re, [S(M(e.name) + " ", 1), b("span", ze, M(r.onDisplayIn.linkPendingLabel), 1)]))]))), 128))])) : v("", !0),
|
|
328
|
-
r.onDisplayIn.galleries.length ? (O(), y("div", Be, [b("p", K, M(N(d)("record.related.galleries")), 1), (O(!0), y(h, null, A(r.onDisplayIn.galleries, (e) => (O(), y("p", {
|
|
329
|
-
key: e.id,
|
|
330
|
-
class: "mwnf-sheet-related__line"
|
|
331
|
-
}, [e.legacy_host ? (O(), y("a", {
|
|
332
|
-
key: 0,
|
|
333
|
-
href: e.legacy_host,
|
|
334
|
-
target: "_blank",
|
|
335
|
-
rel: "noopener"
|
|
336
|
-
}, "↗ " + M(e.name), 9, q)) : (O(), y("span", J, [S(M(e.name) + " ", 1), b("span", Ve, M(r.onDisplayIn.linkPendingLabel), 1)]))]))), 128))])) : v("", !0)
|
|
337
|
-
])) : v("", !0),
|
|
338
|
-
r.database ? (O(), y("div", He, [b("p", Y, M(r.database.label), 1), b("p", Ue, [b("a", {
|
|
339
|
-
href: r.database.url,
|
|
334
|
+
])) : x("", !0),
|
|
335
|
+
T(n, {
|
|
336
|
+
media: a.media,
|
|
337
|
+
descriptions: !1,
|
|
338
|
+
dir: e.dir
|
|
339
|
+
}, null, 8, ["media", "dir"]),
|
|
340
|
+
a.onDisplayIn?.groups.length ? (A(), S("div", Re, [C("p", ze, P(F(f)("record.related.onDisplayIn")), 1), T(o, {
|
|
341
|
+
heading: "",
|
|
342
|
+
groups: a.onDisplayIn.groups,
|
|
343
|
+
"pending-label": a.onDisplayIn.pendingLabel,
|
|
344
|
+
dir: e.dir
|
|
345
|
+
}, null, 8, [
|
|
346
|
+
"groups",
|
|
347
|
+
"pending-label",
|
|
348
|
+
"dir"
|
|
349
|
+
])])) : x("", !0),
|
|
350
|
+
a.database ? (A(), S("div", Be, [C("p", Ve, P(a.database.label), 1), C("p", G, [C("a", {
|
|
351
|
+
href: a.database.url,
|
|
340
352
|
target: "_blank",
|
|
341
353
|
rel: "noopener"
|
|
342
|
-
}, "↗ " +
|
|
343
|
-
|
|
344
|
-
href:
|
|
354
|
+
}, "↗ " + P(a.database.name), 9, K)])])) : x("", !0),
|
|
355
|
+
a.overallDatabase ? (A(), S("div", q, [C("p", He, P(a.overallDatabase.label), 1), C("p", Ue, [C("a", {
|
|
356
|
+
href: F(V).overallDatabase,
|
|
345
357
|
target: "_blank",
|
|
346
358
|
rel: "noopener"
|
|
347
|
-
}, "↗ " +
|
|
348
|
-
|
|
359
|
+
}, "↗ " + P(a.overallDatabase.linkLabel), 9, J)])])) : x("", !0),
|
|
360
|
+
a.download ? (A(), S("div", We, [C("p", Ge, P(a.download.label), 1), C("p", {
|
|
349
361
|
class: "mwnf-sheet-related__line mwnf-sheet-related__line--action",
|
|
350
|
-
onClick:
|
|
351
|
-
}, "➤ " +
|
|
352
|
-
])) :
|
|
362
|
+
onClick: fe
|
|
363
|
+
}, "➤ " + P(a.download.pdfLabel), 1)])) : x("", !0)
|
|
364
|
+
])) : x("", !0)], 64))), 128))])]),
|
|
353
365
|
_: 2
|
|
354
|
-
}, [
|
|
366
|
+
}, [M(c.value, (e) => ({
|
|
355
367
|
name: e,
|
|
356
|
-
fn:
|
|
368
|
+
fn: I((t) => [N(a.$slots, e, k(E(t)))])
|
|
357
369
|
}))]), 1032, [
|
|
358
370
|
"spec",
|
|
359
371
|
"id",
|
|
360
372
|
"entity"
|
|
361
|
-
])) : (
|
|
373
|
+
])) : (A(), b(F(ae), { key: 1 }));
|
|
362
374
|
}
|
|
363
|
-
},
|
|
375
|
+
}, Ke = ["dir"], qe = {
|
|
364
376
|
key: 0,
|
|
365
377
|
class: "mwnf-essay__breadcrumb"
|
|
366
|
-
},
|
|
378
|
+
}, Je = { class: "mwnf-essay__breadcrumb-label" }, Ye = {
|
|
367
379
|
key: 1,
|
|
368
380
|
class: "mwnf-essay__breadcrumb-link"
|
|
369
|
-
},
|
|
381
|
+
}, Xe = ["aria-label"], Ze = { class: "mwnf-essay__title" }, Qe = {
|
|
370
382
|
key: 0,
|
|
371
383
|
class: "mwnf-essay__number"
|
|
372
|
-
},
|
|
384
|
+
}, $e = ["innerHTML"], et = { class: "mwnf-essay__body" }, tt = { class: "mwnf-essay__main" }, nt = {
|
|
373
385
|
key: 0,
|
|
374
386
|
class: "mwnf-essay__status"
|
|
375
|
-
},
|
|
387
|
+
}, rt = ["innerHTML"], it = ["innerHTML"], at = {
|
|
376
388
|
key: 4,
|
|
377
389
|
class: "mwnf-essay__nav"
|
|
378
|
-
},
|
|
390
|
+
}, ot = {
|
|
379
391
|
key: 1,
|
|
380
392
|
class: "mwnf-essay__nav-spacer"
|
|
381
|
-
},
|
|
393
|
+
}, st = {
|
|
382
394
|
key: 0,
|
|
383
395
|
class: "mwnf-essay__side"
|
|
384
|
-
},
|
|
396
|
+
}, ct = {
|
|
385
397
|
key: 0,
|
|
386
398
|
class: "mwnf-essay__panel"
|
|
387
|
-
},
|
|
399
|
+
}, lt = {
|
|
388
400
|
key: 0,
|
|
389
401
|
class: "mwnf-essay__variants"
|
|
390
|
-
},
|
|
402
|
+
}, ut = ["aria-pressed", "onClick"], dt = ["src", "alt"], ft = ["innerHTML"], pt = {
|
|
391
403
|
key: 0,
|
|
392
404
|
class: "mwnf-essay__panel-label"
|
|
393
|
-
},
|
|
405
|
+
}, mt = ["innerHTML"], ht = ["innerHTML"], gt = {
|
|
394
406
|
key: 0,
|
|
395
407
|
class: "mwnf-essay__thumbs"
|
|
396
|
-
},
|
|
408
|
+
}, _t = ["onClick"], vt = ["src"], yt = {
|
|
397
409
|
key: 2,
|
|
398
410
|
class: "mwnf-essay__status"
|
|
399
|
-
},
|
|
411
|
+
}, X = {
|
|
400
412
|
__name: "EssayView",
|
|
401
413
|
props: {
|
|
402
414
|
spec: {
|
|
@@ -409,71 +421,71 @@ var V = { class: "mwnf-home" }, ve = {
|
|
|
409
421
|
}
|
|
410
422
|
},
|
|
411
423
|
setup(e) {
|
|
412
|
-
let t = e, { t: n } =
|
|
413
|
-
function
|
|
424
|
+
let t = e, { t: n } = _e(), r = me(), i = re();
|
|
425
|
+
function a(e) {
|
|
414
426
|
return !!e && typeof e.walk == "function" && typeof e.children == "function";
|
|
415
427
|
}
|
|
416
|
-
function
|
|
428
|
+
function o(e) {
|
|
417
429
|
return typeof e == "string" ? e : "themes";
|
|
418
430
|
}
|
|
419
|
-
let
|
|
431
|
+
let l = t.spec.entity ?? "items", u = t.spec.tree, p = u?.entity ?? (u?.themes ? o(u.themes) : t.spec.entity ?? "collections"), m = a(u) ? u : u?.themes ? pe({
|
|
420
432
|
source: "themes",
|
|
421
|
-
entity:
|
|
422
|
-
childType:
|
|
433
|
+
entity: p,
|
|
434
|
+
childType: u.childType
|
|
423
435
|
}) : pe({
|
|
424
|
-
purpose:
|
|
425
|
-
rootId:
|
|
426
|
-
childType:
|
|
427
|
-
entity:
|
|
428
|
-
order:
|
|
429
|
-
}),
|
|
430
|
-
if (
|
|
431
|
-
let e =
|
|
432
|
-
return e ?
|
|
433
|
-
}), L =
|
|
434
|
-
|
|
435
|
-
if (
|
|
436
|
-
|
|
436
|
+
purpose: u?.purpose,
|
|
437
|
+
rootId: u?.rootId,
|
|
438
|
+
childType: u?.childType,
|
|
439
|
+
entity: p,
|
|
440
|
+
order: u?.order
|
|
441
|
+
}), h = se(p), te = y(() => h.value !== null), g = y(() => t.spec), _ = y(() => m.byId.value.get(t.id) ?? null), ne = y(() => m.parents(t.id).at(-1) ?? null), D = y(() => {
|
|
442
|
+
if (ne.value) return m.children(ne.value.id);
|
|
443
|
+
let e = m.root.value;
|
|
444
|
+
return e ? m.children(e.id) : m.walk().filter((e) => m.parents(e.id).length === 0);
|
|
445
|
+
}), L = y(() => D.value.findIndex((e) => e.id === t.id)), R = y(() => g.value.navigation || !1), z = y(() => R.value === "siblings" ? L.value > 0 ? D.value[L.value - 1] : null : R.value === "tree" ? m.previous(t.id) : null), B = y(() => R.value === "siblings" ? L.value !== -1 && L.value < D.value.length - 1 ? D.value[L.value + 1] : null : R.value === "tree" ? m.next(t.id) : null), { language: V, dir: ue } = ye(_, { entity: p }), he = y(() => _.value ? r.tr(p, _.value.id, V.value, "en") : {}), ve = j(!1);
|
|
446
|
+
ie(() => [_.value?.id, V.value], async () => {
|
|
447
|
+
if (ve.value = !1, !_.value) {
|
|
448
|
+
ve.value = !0;
|
|
437
449
|
return;
|
|
438
450
|
}
|
|
439
451
|
let e = V.value === "en" ? ["en"] : [V.value, "en"];
|
|
440
|
-
await Promise.all([
|
|
452
|
+
await Promise.all([p, l].flatMap((t) => e.map((e) => r.loadTranslations(t, e)))), ve.value = !0;
|
|
441
453
|
}, { immediate: !0 });
|
|
442
|
-
function
|
|
454
|
+
function be(e) {
|
|
443
455
|
if (!e) return "";
|
|
444
|
-
let t =
|
|
456
|
+
let t = g.value.placeholder, n = (e) => !!e && !!t && t.test(e), i = r.tr(p, e.id, V.value, "en");
|
|
445
457
|
if (i.title && !n(i.title)) return i.title;
|
|
446
|
-
let a = r.tr(
|
|
458
|
+
let a = r.tr(p, e.id, "en").title;
|
|
447
459
|
return a && !n(a) ? a : e.internal_name ?? e.id;
|
|
448
460
|
}
|
|
449
|
-
let
|
|
450
|
-
node:
|
|
451
|
-
text:
|
|
461
|
+
let U = y(() => ({
|
|
462
|
+
node: _.value,
|
|
463
|
+
text: he.value,
|
|
452
464
|
language: V.value,
|
|
453
|
-
tree:
|
|
454
|
-
select:
|
|
465
|
+
tree: m,
|
|
466
|
+
select: He,
|
|
455
467
|
t: n,
|
|
456
468
|
tr: (e, t) => r.tr(e, t, V.value, "en")
|
|
457
469
|
}));
|
|
458
|
-
function
|
|
470
|
+
function xe(e, t) {
|
|
459
471
|
return t.split(".").reduce((e, t) => e?.[t], e);
|
|
460
472
|
}
|
|
461
|
-
function
|
|
462
|
-
return e === !1 || e == null ? "" : typeof e == "function" ? e(t) ?? "" :
|
|
473
|
+
function Se(e, t) {
|
|
474
|
+
return e === !1 || e == null ? "" : typeof e == "function" ? e(t) ?? "" : xe(t.text, e) ?? "";
|
|
463
475
|
}
|
|
464
|
-
let
|
|
465
|
-
if (!
|
|
466
|
-
let e = [
|
|
476
|
+
let Ce = y(() => Se(g.value.quote ?? "quote", U.value)), we = y(() => Se(g.value.body ?? "description", U.value)), Te = y(() => {
|
|
477
|
+
if (!g.value.glossary || !_.value) return [];
|
|
478
|
+
let e = [Ce.value, we.value].filter(Boolean);
|
|
467
479
|
return le(e.join("\n\n"), V.value);
|
|
468
|
-
}),
|
|
480
|
+
}), Ee = y(() => ce(Te.value)), { active: De, onClick: Oe, close: ke } = ge(Te), Ae = y(() => De.value ? de(De.value.definition, { breaks: !0 }) : ""), je = y(() => _.value ? g.value.heading ? g.value.heading(U.value) : H(String(be(_.value)), { glossary: Ee.value }) : ""), Me = y(() => Ce.value ? H(String(Ce.value), { glossary: Ee.value }) : ""), Ne = y(() => we.value ? de(String(we.value), {
|
|
469
481
|
breaks: !0,
|
|
470
|
-
glossary:
|
|
471
|
-
}) : ""),
|
|
472
|
-
function
|
|
473
|
-
let t =
|
|
474
|
-
return t && typeof t == "object" ? !!t[e] : !!
|
|
482
|
+
glossary: Ee.value
|
|
483
|
+
}) : ""), Pe = y(() => _.value ? g.value.about?.(_.value) ?? !1 : !1), W = y(() => !!Pe.value);
|
|
484
|
+
function Fe(e) {
|
|
485
|
+
let t = Pe.value;
|
|
486
|
+
return t && typeof t == "object" ? !!t[e] : !!g.value.aboutKeeps?.includes(e);
|
|
475
487
|
}
|
|
476
|
-
let
|
|
488
|
+
let Ie = [
|
|
477
489
|
[1e3, "M"],
|
|
478
490
|
[900, "CM"],
|
|
479
491
|
[500, "D"],
|
|
@@ -488,66 +500,66 @@ var V = { class: "mwnf-home" }, ve = {
|
|
|
488
500
|
[4, "IV"],
|
|
489
501
|
[1, "I"]
|
|
490
502
|
];
|
|
491
|
-
function
|
|
503
|
+
function Le(e) {
|
|
492
504
|
let t = e, n = "";
|
|
493
|
-
for (let [e, r] of
|
|
505
|
+
for (let [e, r] of Ie) for (; t >= e;) n += r, t -= e;
|
|
494
506
|
return n;
|
|
495
507
|
}
|
|
496
|
-
let
|
|
497
|
-
let e =
|
|
498
|
-
if (!e || !
|
|
499
|
-
let n = (
|
|
500
|
-
return e === "roman" ?
|
|
508
|
+
let Re = y(() => {
|
|
509
|
+
let e = g.value.numbering;
|
|
510
|
+
if (!e || !_.value) return "";
|
|
511
|
+
let n = (D.value.length ? D.value : [_.value]).findIndex((e) => e.id === t.id), r = n >= 0 ? n + 1 : 1;
|
|
512
|
+
return e === "roman" ? Le(r) : String(r);
|
|
501
513
|
});
|
|
502
|
-
function
|
|
514
|
+
function ze(e) {
|
|
503
515
|
return e ? Array.isArray(e.items) ? e.items.map((e) => e && typeof e == "object" ? e.id : e).filter((e) => e != null) : Array.isArray(e.item_ids) ? e.item_ids.filter((e) => e != null) : Array.isArray(e.pictures) ? e.pictures.map((e) => e?.picture_item_id).filter((e) => e != null) : [] : [];
|
|
504
516
|
}
|
|
505
|
-
let
|
|
506
|
-
let e =
|
|
507
|
-
return
|
|
508
|
-
}),
|
|
509
|
-
|
|
510
|
-
e.some((e) => e.id ===
|
|
517
|
+
let Be = oe(l), Ve = y(() => {
|
|
518
|
+
let e = g.value.items?.of ?? ze;
|
|
519
|
+
return _.value ? e(_.value, U.value) : [];
|
|
520
|
+
}), G = y(() => Ve.value.map((e) => Be.value.get(e)).filter(Boolean)), K = j(null);
|
|
521
|
+
ie(G, (e) => {
|
|
522
|
+
e.some((e) => e.id === K.value) || (K.value = e[0]?.id ?? null);
|
|
511
523
|
}, { immediate: !0 });
|
|
512
|
-
let
|
|
513
|
-
function Ve(e) {
|
|
514
|
-
q.value = e;
|
|
515
|
-
}
|
|
524
|
+
let q = y(() => G.value.find((e) => e.id === K.value) ?? G.value[0] ?? null);
|
|
516
525
|
function He(e) {
|
|
517
|
-
|
|
518
|
-
|
|
526
|
+
K.value = e;
|
|
527
|
+
}
|
|
528
|
+
function Ue(e) {
|
|
529
|
+
let t = g.value.items?.route;
|
|
530
|
+
return !t || !e ? null : typeof t == "function" ? t(e, U.value) : {
|
|
519
531
|
name: t,
|
|
520
532
|
params: { id: e.id }
|
|
521
533
|
};
|
|
522
534
|
}
|
|
523
|
-
function
|
|
524
|
-
let t =
|
|
525
|
-
return !t || !e ? null : typeof t == "function" ? t(e,
|
|
535
|
+
function J(e) {
|
|
536
|
+
let t = g.value.route;
|
|
537
|
+
return !t || !e ? null : typeof t == "function" ? t(e, U.value) : {
|
|
526
538
|
name: t,
|
|
527
539
|
params: { id: e.id }
|
|
528
540
|
};
|
|
529
541
|
}
|
|
530
|
-
function
|
|
542
|
+
function We(e) {
|
|
531
543
|
if (!e) return null;
|
|
532
|
-
let t = r.tr(
|
|
544
|
+
let t = r.tr(l, e.id, V.value, "en").name ?? e.internal_name ?? e.id;
|
|
533
545
|
return {
|
|
534
|
-
name:
|
|
546
|
+
name: H(String(t)),
|
|
535
547
|
image: e.images?.[0]?.url ?? "",
|
|
536
548
|
imageAlt: fe(String(t))
|
|
537
549
|
};
|
|
538
550
|
}
|
|
539
|
-
let
|
|
540
|
-
let e =
|
|
551
|
+
let Ge = y(() => {
|
|
552
|
+
let e = q.value;
|
|
541
553
|
if (!e) return null;
|
|
542
|
-
let t =
|
|
554
|
+
let t = We(e), n = g.value.items?.caption?.(e, _.value, U.value);
|
|
543
555
|
return {
|
|
544
556
|
...t,
|
|
545
557
|
...n
|
|
546
558
|
};
|
|
547
|
-
}),
|
|
548
|
-
let e =
|
|
559
|
+
}), Y = y(() => !!g.value.panel), X = y(() => {
|
|
560
|
+
let e = q.value;
|
|
549
561
|
if (!e) return [];
|
|
550
|
-
let t =
|
|
562
|
+
let t = Ge.value, n = e.images?.[0]?.url ? [{
|
|
551
563
|
id: "__primary",
|
|
552
564
|
image: e.images[0].url,
|
|
553
565
|
alt: t?.imageAlt ?? "",
|
|
@@ -556,39 +568,39 @@ var V = { class: "mwnf-home" }, ve = {
|
|
|
556
568
|
justification: "",
|
|
557
569
|
fields: null
|
|
558
570
|
}
|
|
559
|
-
}] : [], r =
|
|
571
|
+
}] : [], r = g.value.panel?.variants?.(e, U.value) ?? [];
|
|
560
572
|
return [...n, ...r.map((e, t) => ({
|
|
561
573
|
id: e.id ?? `variant-${t}`,
|
|
562
574
|
...e
|
|
563
575
|
}))];
|
|
564
|
-
}),
|
|
565
|
-
|
|
566
|
-
e.some((e) => e.id ===
|
|
576
|
+
}), Z = j(null);
|
|
577
|
+
ie(X, (e) => {
|
|
578
|
+
e.some((e) => e.id === Z.value) || (Z.value = e[0]?.id ?? null);
|
|
567
579
|
}, { immediate: !0 });
|
|
568
|
-
let Q =
|
|
569
|
-
function
|
|
570
|
-
|
|
580
|
+
let Q = y(() => X.value.find((e) => e.id === Z.value) ?? X.value[0] ?? null);
|
|
581
|
+
function bt(e) {
|
|
582
|
+
Z.value = e;
|
|
571
583
|
}
|
|
572
|
-
let
|
|
584
|
+
let xt = y(() => {
|
|
573
585
|
let e = Q.value;
|
|
574
586
|
return e?.image ? [{
|
|
575
587
|
url: e.image,
|
|
576
588
|
alt: e.alt ?? ""
|
|
577
589
|
}] : [];
|
|
578
|
-
}),
|
|
579
|
-
let e =
|
|
580
|
-
return !e || !
|
|
581
|
-
}), Ct =
|
|
590
|
+
}), St = y(() => {
|
|
591
|
+
let e = q.value;
|
|
592
|
+
return !e || !g.value.panel?.fields ? [] : g.value.panel.fields(e, _.value, U.value) ?? [];
|
|
593
|
+
}), Ct = y(() => {
|
|
582
594
|
let e = Q.value?.caption?.fields;
|
|
583
|
-
return e == null ?
|
|
595
|
+
return e == null ? St.value : e.map((e) => ({
|
|
584
596
|
label: e.label ? n(e.label) : "",
|
|
585
597
|
value: e.value
|
|
586
598
|
}));
|
|
587
|
-
}), wt =
|
|
599
|
+
}), wt = y(() => {
|
|
588
600
|
let e = Q.value?.caption?.justification;
|
|
589
|
-
return e ?
|
|
590
|
-
}), Tt =
|
|
591
|
-
let t =
|
|
601
|
+
return e ? H(String(e)) : "";
|
|
602
|
+
}), Tt = y(() => G.value.map((e) => {
|
|
603
|
+
let t = We(e), n = g.value.items?.meta?.(e, U.value) ?? [], r = g.value.items?.badge?.(e, U.value) ?? "";
|
|
592
604
|
return {
|
|
593
605
|
id: e.id,
|
|
594
606
|
image: t.image,
|
|
@@ -596,203 +608,203 @@ var V = { class: "mwnf-home" }, ve = {
|
|
|
596
608
|
name: t.name,
|
|
597
609
|
meta: n,
|
|
598
610
|
badge: r,
|
|
599
|
-
to:
|
|
611
|
+
to: Ue(e)
|
|
600
612
|
};
|
|
601
|
-
})), Et =
|
|
602
|
-
let e =
|
|
603
|
-
return e ? e === "children" ?
|
|
604
|
-
}), Ot =
|
|
605
|
-
...
|
|
606
|
-
items:
|
|
607
|
-
selected:
|
|
613
|
+
})), Et = y(() => g.value.breadcrumb && _.value ? m.parents(t.id) : []), Dt = y(() => {
|
|
614
|
+
let e = g.value.tabs;
|
|
615
|
+
return e ? e === "children" ? _.value ? m.children(_.value.id) : [] : D.value : [];
|
|
616
|
+
}), Ot = y(() => g.value.previous ?? "exhibition.theme.previous"), kt = y(() => g.value.next ?? "exhibition.theme.next"), At = y(() => g.value.backTo ?? "record.action.backToResults"), jt = y(() => g.value.inThisTheme ?? "exhibition.theme.inThisTheme"), Mt = y(() => g.value.seeAll ?? "exhibition.theme.seeAllInTheme"), $ = y(() => ({
|
|
617
|
+
...U.value,
|
|
618
|
+
items: G.value,
|
|
619
|
+
selected: q.value,
|
|
608
620
|
selectedVariant: Q.value,
|
|
609
|
-
selectVariant:
|
|
621
|
+
selectVariant: bt,
|
|
610
622
|
breadcrumb: Et.value,
|
|
611
623
|
previous: z.value,
|
|
612
624
|
next: B.value
|
|
613
|
-
})), Nt =
|
|
614
|
-
return (t, r) =>
|
|
625
|
+
})), Nt = y(() => W.value && !Fe("panel") ? !1 : Y.value || G.value.length > 0 || !!i.aside), Pt = y(() => (!W.value || Fe("navigation")) && !!R.value && !!(z.value || B.value));
|
|
626
|
+
return (t, r) => te.value && !_.value ? (A(), b(F(ae), { key: 0 })) : _.value ? (A(), S("article", {
|
|
615
627
|
key: 1,
|
|
616
|
-
class:
|
|
617
|
-
dir:
|
|
618
|
-
onClick: r[0] ||= (...e) =>
|
|
628
|
+
class: O(["mwnf-essay", { "mwnf-essay--about": W.value }]),
|
|
629
|
+
dir: F(ue) || void 0,
|
|
630
|
+
onClick: r[0] ||= (...e) => F(Oe) && F(Oe)(...e)
|
|
619
631
|
}, [
|
|
620
|
-
|
|
621
|
-
Et.value.length ? (
|
|
632
|
+
N(t.$slots, "header", k(E($.value)), () => [
|
|
633
|
+
Et.value.length ? (A(), S("p", qe, [C("span", Je, P(F(n)(At.value)), 1), (A(!0), S(v, null, M(Et.value, (e) => (A(), S(v, { key: e.id }, [J(e) ? (A(), b(f, {
|
|
622
634
|
key: 0,
|
|
623
|
-
to:
|
|
635
|
+
to: J(e),
|
|
624
636
|
class: "mwnf-essay__breadcrumb-link"
|
|
625
637
|
}, {
|
|
626
|
-
default:
|
|
638
|
+
default: I(() => [w(P(be(e)), 1)]),
|
|
627
639
|
_: 2
|
|
628
|
-
}, 1032, ["to"])) : (
|
|
629
|
-
Dt.value.length > 1 ? (
|
|
640
|
+
}, 1032, ["to"])) : (A(), S("span", Ye, P(be(e)), 1))], 64))), 128))])) : x("", !0),
|
|
641
|
+
Dt.value.length > 1 ? (A(), S("div", {
|
|
630
642
|
key: 1,
|
|
631
643
|
class: "mwnf-essay__tabs",
|
|
632
644
|
role: "tablist",
|
|
633
|
-
"aria-label":
|
|
634
|
-
}, [(
|
|
645
|
+
"aria-label": F(n)(jt.value)
|
|
646
|
+
}, [(A(!0), S(v, null, M(Dt.value, (t) => (A(), b(f, {
|
|
635
647
|
key: t.id,
|
|
636
|
-
to:
|
|
637
|
-
class:
|
|
648
|
+
to: J(t),
|
|
649
|
+
class: O(["mwnf-essay__tab", { "mwnf-essay__tab--active": t.id === e.id }])
|
|
638
650
|
}, {
|
|
639
|
-
default:
|
|
651
|
+
default: I(() => [w(P(be(t)), 1)]),
|
|
640
652
|
_: 2
|
|
641
|
-
}, 1032, ["to", "class"]))), 128))], 8,
|
|
642
|
-
|
|
653
|
+
}, 1032, ["to", "class"]))), 128))], 8, Xe)) : x("", !0),
|
|
654
|
+
C("h1", Ze, [Re.value ? (A(), S("span", Qe, P(Re.value), 1)) : x("", !0), C("span", { innerHTML: je.value }, null, 8, $e)])
|
|
643
655
|
]),
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
656
|
+
C("div", et, [C("div", tt, [
|
|
657
|
+
ve.value ? x("", !0) : (A(), S("p", nt, P(F(n)("core.status.loading")), 1)),
|
|
658
|
+
Me.value ? (A(), S("p", {
|
|
647
659
|
key: 1,
|
|
648
660
|
class: "mwnf-essay__quote",
|
|
649
|
-
innerHTML:
|
|
650
|
-
}, null, 8,
|
|
651
|
-
|
|
652
|
-
|
|
661
|
+
innerHTML: Me.value
|
|
662
|
+
}, null, 8, rt)) : x("", !0),
|
|
663
|
+
N(t.$slots, "before-body", k(E($.value))),
|
|
664
|
+
Ne.value ? (A(), S("div", {
|
|
653
665
|
key: 2,
|
|
654
666
|
class: "mwnf-essay__prose mwnf-sheet__block",
|
|
655
|
-
innerHTML:
|
|
656
|
-
}, null, 8,
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
Pt.value ? (
|
|
667
|
+
innerHTML: Ne.value
|
|
668
|
+
}, null, 8, it)) : x("", !0),
|
|
669
|
+
N(t.$slots, "after-body", k(E($.value))),
|
|
670
|
+
W.value ? x("", !0) : N(t.$slots, "justifications", k(E($.value)), void 0, void 0, 3),
|
|
671
|
+
Pt.value ? (A(), S("div", at, [N(t.$slots, "navigation", k(E($.value)), () => [z.value ? (A(), b(f, {
|
|
660
672
|
key: 0,
|
|
661
|
-
to:
|
|
673
|
+
to: J(z.value),
|
|
662
674
|
class: "mwnf-essay__nav-link mwnf-essay__nav-link--previous"
|
|
663
675
|
}, {
|
|
664
|
-
default:
|
|
676
|
+
default: I(() => [w("← " + P(F(n)(Ot.value)), 1)]),
|
|
665
677
|
_: 1
|
|
666
|
-
}, 8, ["to"])) : (
|
|
678
|
+
}, 8, ["to"])) : (A(), S("span", ot)), B.value ? (A(), b(f, {
|
|
667
679
|
key: 2,
|
|
668
|
-
to:
|
|
680
|
+
to: J(B.value),
|
|
669
681
|
class: "mwnf-essay__nav-link mwnf-essay__nav-link--next"
|
|
670
682
|
}, {
|
|
671
|
-
default:
|
|
683
|
+
default: I(() => [w(P(F(n)(kt.value)) + " →", 1)]),
|
|
672
684
|
_: 1
|
|
673
|
-
}, 8, ["to"])) :
|
|
674
|
-
]), Nt.value ? (
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
685
|
+
}, 8, ["to"])) : x("", !0)])])) : x("", !0)
|
|
686
|
+
]), Nt.value ? (A(), S("div", st, [
|
|
687
|
+
N(t.$slots, "panel", k(E($.value)), () => [Y.value && Ge.value ? (A(), S("div", ct, [
|
|
688
|
+
T(s, { images: xt.value }, null, 8, ["images"]),
|
|
689
|
+
X.value.length > 1 ? (A(), S("ul", lt, [(A(!0), S(v, null, M(X.value, (e) => (A(), S("li", { key: e.id }, [C("button", {
|
|
678
690
|
type: "button",
|
|
679
|
-
class:
|
|
691
|
+
class: O(["mwnf-essay__variant", { "mwnf-essay__variant--active": e.id === Q.value?.id }]),
|
|
680
692
|
"aria-pressed": e.id === Q.value?.id ? "true" : "false",
|
|
681
|
-
onClick: (t) =>
|
|
682
|
-
}, [e.image ? (
|
|
693
|
+
onClick: (t) => bt(e.id)
|
|
694
|
+
}, [e.image ? (A(), S("img", {
|
|
683
695
|
key: 0,
|
|
684
696
|
src: e.image,
|
|
685
697
|
alt: e.alt ?? "",
|
|
686
698
|
loading: "lazy"
|
|
687
|
-
}, null, 8,
|
|
688
|
-
|
|
699
|
+
}, null, 8, dt)) : x("", !0)], 10, ut)]))), 128))])) : x("", !0),
|
|
700
|
+
C("h3", {
|
|
689
701
|
class: "mwnf-essay__panel-name",
|
|
690
|
-
innerHTML: Q.value?.caption?.title ||
|
|
691
|
-
}, null, 8,
|
|
692
|
-
(
|
|
702
|
+
innerHTML: Q.value?.caption?.title || Ge.value.name
|
|
703
|
+
}, null, 8, ft),
|
|
704
|
+
(A(!0), S(v, null, M(Ct.value, (e, t) => (A(), S("p", {
|
|
693
705
|
key: t,
|
|
694
706
|
class: "mwnf-essay__panel-field"
|
|
695
|
-
}, [e.label ? (
|
|
696
|
-
wt.value ? (
|
|
707
|
+
}, [e.label ? (A(), S("span", pt, P(e.label), 1)) : x("", !0), C("span", { innerHTML: e.value }, null, 8, mt)]))), 128)),
|
|
708
|
+
wt.value ? (A(), S("p", {
|
|
697
709
|
key: 1,
|
|
698
710
|
class: "mwnf-essay__panel-justification mwnf-sheet__block",
|
|
699
711
|
innerHTML: wt.value
|
|
700
|
-
}, null, 8,
|
|
701
|
-
|
|
712
|
+
}, null, 8, ht)) : x("", !0),
|
|
713
|
+
Ue(q.value) ? (A(), b(f, {
|
|
702
714
|
key: 2,
|
|
703
|
-
to:
|
|
715
|
+
to: Ue(q.value),
|
|
704
716
|
class: "mwnf-essay__panel-link"
|
|
705
717
|
}, {
|
|
706
|
-
default:
|
|
718
|
+
default: I(() => [w(P(F(n)(Mt.value)) + " →", 1)]),
|
|
707
719
|
_: 1
|
|
708
|
-
}, 8, ["to"])) :
|
|
709
|
-
])) :
|
|
710
|
-
|
|
720
|
+
}, 8, ["to"])) : x("", !0)
|
|
721
|
+
])) : x("", !0)]),
|
|
722
|
+
N(t.$slots, "thumbnails", k(E($.value)), () => [Y.value && G.value.length > 1 ? (A(), S("ul", gt, [(A(!0), S(v, null, M(G.value, (e) => (A(), S("li", { key: e.id }, [C("button", {
|
|
711
723
|
type: "button",
|
|
712
|
-
class:
|
|
713
|
-
onClick: (t) =>
|
|
714
|
-
}, [e.images?.[0]?.url ? (
|
|
724
|
+
class: O(["mwnf-essay__thumb", { "mwnf-essay__thumb--active": e.id === q.value?.id }]),
|
|
725
|
+
onClick: (t) => He(e.id)
|
|
726
|
+
}, [e.images?.[0]?.url ? (A(), S("img", {
|
|
715
727
|
key: 0,
|
|
716
728
|
src: e.images[0].url,
|
|
717
729
|
alt: "",
|
|
718
730
|
loading: "lazy"
|
|
719
|
-
}, null, 8,
|
|
731
|
+
}, null, 8, vt)) : x("", !0)], 10, _t)]))), 128))])) : !Y.value && Tt.value.length ? (A(), b(ee, {
|
|
720
732
|
key: 1,
|
|
721
733
|
records: Tt.value
|
|
722
|
-
}, null, 8, ["records"])) :
|
|
723
|
-
|
|
724
|
-
])) :
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
term:
|
|
728
|
-
html:
|
|
729
|
-
dir:
|
|
730
|
-
onClose:
|
|
734
|
+
}, null, 8, ["records"])) : x("", !0)]),
|
|
735
|
+
N(t.$slots, "aside", k(E($.value)))
|
|
736
|
+
])) : x("", !0)]),
|
|
737
|
+
N(t.$slots, "after", k(E($.value)), () => [T(d)]),
|
|
738
|
+
T(c, {
|
|
739
|
+
term: F(De),
|
|
740
|
+
html: Ae.value,
|
|
741
|
+
dir: F(ue),
|
|
742
|
+
onClose: F(ke)
|
|
731
743
|
}, null, 8, [
|
|
732
744
|
"term",
|
|
733
745
|
"html",
|
|
734
746
|
"dir",
|
|
735
747
|
"onClose"
|
|
736
748
|
])
|
|
737
|
-
], 10,
|
|
749
|
+
], 10, Ke)) : (A(), S("p", yt, P(F(n)("core.status.loading")), 1));
|
|
738
750
|
}
|
|
739
|
-
},
|
|
751
|
+
}, Z = { class: "mwnf-link-list" }, Q = {
|
|
740
752
|
key: 0,
|
|
741
753
|
class: "mwnf-link-list__back"
|
|
742
|
-
},
|
|
754
|
+
}, bt = {
|
|
743
755
|
key: 1,
|
|
744
756
|
class: "mwnf-link-list__title"
|
|
745
|
-
},
|
|
757
|
+
}, xt = {
|
|
746
758
|
key: 2,
|
|
747
759
|
class: "mwnf-link-list__groups"
|
|
748
|
-
},
|
|
760
|
+
}, St = {
|
|
749
761
|
key: 0,
|
|
750
762
|
class: "mwnf-link-list__heading"
|
|
751
|
-
},
|
|
763
|
+
}, Ct = {
|
|
752
764
|
key: 1,
|
|
753
765
|
class: "mwnf-link-list__links"
|
|
754
|
-
},
|
|
766
|
+
}, wt = ["innerHTML"], Tt = ["innerHTML"], Et = {
|
|
755
767
|
key: 3,
|
|
756
768
|
class: "mwnf-link-list__empty"
|
|
757
|
-
},
|
|
769
|
+
}, Dt = {
|
|
758
770
|
__name: "LinkListView",
|
|
759
771
|
props: { spec: {
|
|
760
772
|
type: Object,
|
|
761
773
|
required: !0
|
|
762
774
|
} },
|
|
763
775
|
setup(e) {
|
|
764
|
-
let t = e, { t: n } =
|
|
765
|
-
return (e,
|
|
766
|
-
t.spec.back && a.value ? (
|
|
776
|
+
let t = e, { t: n } = _e(), r = y(() => ((typeof t.spec.groups == "function" ? t.spec.groups({}) : t.spec.groups ?? []) ?? []).filter((e) => e.links?.length > 0)), i = y(() => t.spec.title ? n(t.spec.title) : ""), a = y(() => t.spec.back?.label ? n(t.spec.back.label) : ""), o = y(() => n(t.spec.empty ?? "catalogue.results.noResults"));
|
|
777
|
+
return (e, s) => (A(), S("div", Z, [
|
|
778
|
+
t.spec.back && a.value ? (A(), S("div", Q, [T(f, {
|
|
767
779
|
to: t.spec.back.to,
|
|
768
780
|
href: t.spec.back.href
|
|
769
781
|
}, {
|
|
770
|
-
default:
|
|
782
|
+
default: I(() => [w(" ← " + P(a.value), 1)]),
|
|
771
783
|
_: 1
|
|
772
|
-
}, 8, ["to", "href"])])) :
|
|
773
|
-
i.value ? (
|
|
774
|
-
|
|
775
|
-
r.value.length ? (
|
|
784
|
+
}, 8, ["to", "href"])])) : x("", !0),
|
|
785
|
+
i.value ? (A(), S("h1", bt, P(i.value), 1)) : x("", !0),
|
|
786
|
+
N(e.$slots, "before"),
|
|
787
|
+
r.value.length ? (A(), S("div", xt, [(A(!0), S(v, null, M(r.value, (t, r) => (A(), S("section", {
|
|
776
788
|
key: r,
|
|
777
789
|
class: "mwnf-link-list__group"
|
|
778
|
-
}, [
|
|
790
|
+
}, [N(e.$slots, "group", { group: t }, () => [t.heading ? (A(), S("h2", St, P(F(n)(t.heading)), 1)) : x("", !0), t.links?.length ? (A(), S("ul", Ct, [(A(!0), S(v, null, M(t.links, (e, t) => (A(), S("li", {
|
|
779
791
|
key: t,
|
|
780
792
|
class: "mwnf-link-list__item"
|
|
781
|
-
}, [
|
|
793
|
+
}, [T(f, {
|
|
782
794
|
class: "mwnf-link-list__link",
|
|
783
795
|
to: e.to,
|
|
784
796
|
href: e.href
|
|
785
797
|
}, {
|
|
786
|
-
default:
|
|
798
|
+
default: I(() => [C("span", { innerHTML: F(z)(e.label) }, null, 8, wt)]),
|
|
787
799
|
_: 2
|
|
788
|
-
}, 1032, ["to", "href"]), e.note ? (
|
|
800
|
+
}, 1032, ["to", "href"]), e.note ? (A(), S("div", {
|
|
789
801
|
key: 0,
|
|
790
802
|
class: "mwnf-link-list__note",
|
|
791
|
-
innerHTML:
|
|
792
|
-
}, null, 8,
|
|
793
|
-
|
|
803
|
+
innerHTML: F(z)(e.note)
|
|
804
|
+
}, null, 8, Tt)) : x("", !0)]))), 128))])) : x("", !0)])]))), 128))])) : (A(), S("div", Et, P(o.value), 1)),
|
|
805
|
+
N(e.$slots, "after")
|
|
794
806
|
]));
|
|
795
807
|
}
|
|
796
808
|
};
|
|
797
809
|
//#endregion
|
|
798
|
-
export {
|
|
810
|
+
export { te as CatalogueResultsView, X as EssayView, Se as HomeView, Dt as LinkListView, m as PartnerListView, Y as RecordSheetView, p as RecordView, h as SearchFormView, g as TextPageView, _ as TimelineResultsView };
|