@museumwnf/viewer-layout 2.12.0 → 2.14.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/LICENSE.md +44 -44
- package/README.md +445 -433
- package/dist/{TimelineEventList-59g_1ksf.js → TimelineLookup-D8qr1tmY.js} +471 -242
- package/dist/content-G-g7U3_2.js +452 -0
- package/dist/content.js +3 -3
- package/dist/index.js +3 -3
- package/dist/viewer-layout.css +1 -1
- package/dist/views.js +1058 -791
- package/package.json +51 -51
- package/src/tokens.reference.css +738 -684
- package/dist/content-BvhCFMQ9.js +0 -446
package/dist/views.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Fragment as
|
|
3
|
-
import { I18nText as
|
|
4
|
-
import { useRoute as
|
|
1
|
+
import { S as e, _ as t, a as n, b as r, c as i, d as a, f as o, g as s, h as c, l, m as u, n as d, o as f, p, r as m, s as ee, t as h, u as g, v as _, x as v, y } from "./TimelineLookup-D8qr1tmY.js";
|
|
2
|
+
import { Fragment as b, computed as x, createBlock as S, createCommentVNode as C, createElementBlock as w, createElementVNode as T, createSlots as E, createTextVNode as D, createVNode as O, guardReactiveProps as k, isRef as A, mergeProps as j, normalizeClass as M, normalizeProps as N, openBlock as P, reactive as F, ref as I, renderList as L, renderSlot as R, resolveDynamicComponent as z, toDisplayString as B, unref as V, useSlots as H, vModelCheckbox as U, vModelRadio as te, vModelSelect as W, vModelText as ne, watch as G, withCtx as K, withDirectives as q } from "vue";
|
|
3
|
+
import { I18nText as J, NotFoundView as re, byId as ie, centuryPresets as Y, citation as X, dateRange as ae, entityRef as oe, eventDateLabel as Z, glossaryEntries as se, glossaryTermsForText as Q, groupByCountry as ce, languageLabels as le, md as ue, mdInline as de, mwnfLinks as fe, partnerHierarchy as pe, projectName as me, renderBlock as he, renderInline as $, renderPlain as ge, sheetRows as _e, sortChronological as ve, sourceUrl as ye, useCollectionTree as be, useDataPackage as xe, useFacets as Se, useFeaturedRecord as Ce, useGlossaryPopup as we, useI18n as Te, useListQuery as Ee, useLocale as De, usePagination as Oe, useProjects as ke, useRecordLanguage as Ae, useRecordSheet as je, useRelatedRecords as Me, useSearchLanguage as Ne, useSiteConfig as Pe, useTimelineEvents as Fe, yearBuckets as Ie } from "@museumwnf/viewer-core";
|
|
4
|
+
import { useRoute as Le, useRouter as Re } from "vue-router";
|
|
5
5
|
//#region src/views/HomeView.vue
|
|
6
|
-
var
|
|
6
|
+
var ze = { class: "mwnf-home" }, Be = {
|
|
7
7
|
key: 0,
|
|
8
8
|
class: "mwnf-home__welcome"
|
|
9
|
-
},
|
|
9
|
+
}, Ve = {
|
|
10
10
|
key: 0,
|
|
11
11
|
class: "mwnf-home__title"
|
|
12
|
-
},
|
|
12
|
+
}, He = {
|
|
13
13
|
__name: "HomeView",
|
|
14
14
|
props: {
|
|
15
15
|
title: {
|
|
@@ -29,12 +29,12 @@ var Pe = { class: "mwnf-home" }, Fe = {
|
|
|
29
29
|
default: null
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
|
-
setup(
|
|
33
|
-
let
|
|
34
|
-
...
|
|
35
|
-
...
|
|
32
|
+
setup(e) {
|
|
33
|
+
let t = e, { t: n, locale: i } = Te(), a = Pe(), o = x(() => ({
|
|
34
|
+
...a.home ?? {},
|
|
35
|
+
...s(t)
|
|
36
36
|
}));
|
|
37
|
-
function
|
|
37
|
+
function s(e) {
|
|
38
38
|
let t = {};
|
|
39
39
|
for (let n of [
|
|
40
40
|
"title",
|
|
@@ -44,85 +44,85 @@ var Pe = { class: "mwnf-home" }, Fe = {
|
|
|
44
44
|
]) e[n] != null && e[n] !== "" && (t[n] = e[n]);
|
|
45
45
|
return t;
|
|
46
46
|
}
|
|
47
|
-
let
|
|
47
|
+
let c = x(() => (o.value.cards ?? []).map((e) => ({
|
|
48
48
|
...e,
|
|
49
|
-
title: e.title ?
|
|
50
|
-
description: e.description ?
|
|
51
|
-
action: e.action ?
|
|
52
|
-
}))),
|
|
53
|
-
|
|
54
|
-
let
|
|
55
|
-
seed:
|
|
56
|
-
images:
|
|
57
|
-
}) :
|
|
58
|
-
function
|
|
49
|
+
title: e.title ? n(e.title) : "",
|
|
50
|
+
description: e.description ? n(e.description) : "",
|
|
51
|
+
action: e.action ? n(e.action) : ""
|
|
52
|
+
}))), l = x(() => o.value.featured ?? null), u = l.value?.entity ?? "", d = xe();
|
|
53
|
+
u && d.loadTranslations(u, "en");
|
|
54
|
+
let f = u ? Ce(u, {
|
|
55
|
+
seed: l.value?.seed,
|
|
56
|
+
images: l.value?.images ?? "images"
|
|
57
|
+
}) : x(() => null), p = x(() => f.value ? d.tr(u, f.value.id, i.value, "en") : {});
|
|
58
|
+
function m(e, t, n) {
|
|
59
59
|
return typeof e == "function" ? e(t, n) : typeof e != "string" || !e ? "" : n[e] ?? t[e] ?? "";
|
|
60
60
|
}
|
|
61
|
-
let
|
|
62
|
-
let e =
|
|
61
|
+
let ee = x(() => {
|
|
62
|
+
let e = f.value, t = l.value;
|
|
63
63
|
if (!e || !t) return null;
|
|
64
|
-
let
|
|
64
|
+
let r = 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";
|
|
65
65
|
return {
|
|
66
|
-
heading: t.heading ?
|
|
66
|
+
heading: t.heading ? n(t.heading) : "",
|
|
67
67
|
image: e[a]?.[0]?.url ?? "",
|
|
68
|
-
imageAlt:
|
|
69
|
-
eyebrow: String(
|
|
70
|
-
name: $(String(
|
|
68
|
+
imageAlt: ge(String(r)),
|
|
69
|
+
eyebrow: String(m(t.eyebrow, e, p.value) ?? ""),
|
|
70
|
+
name: $(String(r)),
|
|
71
71
|
meta: i.filter(Boolean).map(String),
|
|
72
|
-
action: t.action ?
|
|
72
|
+
action: t.action ? n(t.action) : "",
|
|
73
73
|
to: typeof t.to == "function" ? t.to(e) : {
|
|
74
74
|
name: t.route ?? "item",
|
|
75
75
|
params: { id: e.id }
|
|
76
76
|
}
|
|
77
77
|
};
|
|
78
78
|
});
|
|
79
|
-
return (
|
|
80
|
-
|
|
79
|
+
return (e, t) => (P(), w("section", ze, [
|
|
80
|
+
o.value.title || o.value.intro ? (P(), w("header", Be, [o.value.title ? (P(), w("h1", Ve, B(V(n)(o.value.title)), 1)) : C("", !0), o.value.intro ? (P(), S(V(J), {
|
|
81
81
|
key: 1,
|
|
82
82
|
tag: "div",
|
|
83
83
|
class: "mwnf-home__intro",
|
|
84
|
-
keypath:
|
|
85
|
-
}, null, 8, ["keypath"])) :
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
84
|
+
keypath: o.value.intro
|
|
85
|
+
}, null, 8, ["keypath"])) : C("", !0)])) : C("", !0),
|
|
86
|
+
R(e.$slots, "before"),
|
|
87
|
+
O(v, { cards: c.value }, null, 8, ["cards"]),
|
|
88
|
+
R(e.$slots, "default"),
|
|
89
|
+
ee.value ? (P(), S(r, N(j({ key: 1 }, ee.value)), null, 16)) : C("", !0),
|
|
90
|
+
R(e.$slots, "after")
|
|
91
91
|
]));
|
|
92
92
|
}
|
|
93
|
-
},
|
|
93
|
+
}, Ue = { class: "mwnf-catalogue" }, We = {
|
|
94
94
|
key: 0,
|
|
95
95
|
class: "mwnf-catalogue__title"
|
|
96
|
-
},
|
|
96
|
+
}, Ge = {
|
|
97
97
|
key: 0,
|
|
98
98
|
class: "mwnf-facet"
|
|
99
|
-
},
|
|
99
|
+
}, Ke = {
|
|
100
100
|
key: 0,
|
|
101
101
|
class: "mwnf-facet__label"
|
|
102
|
-
},
|
|
102
|
+
}, qe = [
|
|
103
103
|
"value",
|
|
104
104
|
"placeholder",
|
|
105
105
|
"onInput"
|
|
106
|
-
],
|
|
106
|
+
], Je = {
|
|
107
107
|
key: 1,
|
|
108
108
|
class: "mwnf-facet"
|
|
109
|
-
},
|
|
109
|
+
}, Ye = {
|
|
110
110
|
key: 0,
|
|
111
111
|
class: "mwnf-facet__label"
|
|
112
|
-
},
|
|
112
|
+
}, Xe = [
|
|
113
113
|
"value",
|
|
114
114
|
"placeholder",
|
|
115
115
|
"onInput"
|
|
116
|
-
],
|
|
116
|
+
], Ze = {
|
|
117
117
|
key: 2,
|
|
118
118
|
class: "mwnf-facet mwnf-facet--checkbox"
|
|
119
|
-
},
|
|
119
|
+
}, Qe = ["checked", "onChange"], $e = {
|
|
120
120
|
key: 0,
|
|
121
121
|
class: "mwnf-facet__label"
|
|
122
|
-
},
|
|
122
|
+
}, et = { class: "mwnf-catalogue__body" }, tt = { class: "mwnf-catalogue__results" }, nt = {
|
|
123
123
|
key: 0,
|
|
124
124
|
class: "mwnf-catalogue__aside"
|
|
125
|
-
},
|
|
125
|
+
}, rt = {
|
|
126
126
|
__name: "CatalogueResultsView",
|
|
127
127
|
props: {
|
|
128
128
|
spec: {
|
|
@@ -135,50 +135,50 @@ var Pe = { class: "mwnf-home" }, Fe = {
|
|
|
135
135
|
}
|
|
136
136
|
},
|
|
137
137
|
setup(e) {
|
|
138
|
-
let
|
|
139
|
-
|
|
140
|
-
let
|
|
141
|
-
function
|
|
142
|
-
let e =
|
|
138
|
+
let n = e, { t: r, locale: i } = Te(), a = xe(), o = n.spec.entity ?? n.entity, l = x(() => n.spec), d = oe(o);
|
|
139
|
+
o && a.loadTranslations(o, "en");
|
|
140
|
+
let f = x(() => l.value.keys ?? [...Object.keys(l.value.facets ?? {}), ...p()]);
|
|
141
|
+
function p() {
|
|
142
|
+
let e = l.value.dates;
|
|
143
143
|
return e ? [e.begin ?? "begin", e.end ?? "end"] : [];
|
|
144
144
|
}
|
|
145
|
-
let { filters:
|
|
146
|
-
t:
|
|
147
|
-
locale:
|
|
148
|
-
tr: (e, t) =>
|
|
145
|
+
let { filters: m, page: ee, active: h, apply: g, reset: v, goToPage: A } = Ee({ keys: f.value }), j = {
|
|
146
|
+
t: r,
|
|
147
|
+
locale: i,
|
|
148
|
+
tr: (e, t) => a.tr(e, t, i.value, "en"),
|
|
149
149
|
renderInline: $,
|
|
150
|
-
renderPlain:
|
|
150
|
+
renderPlain: ge
|
|
151
151
|
};
|
|
152
|
-
function
|
|
152
|
+
function M(e, t) {
|
|
153
153
|
if (typeof t.values == "function") return [t.values(e)].flat();
|
|
154
154
|
let n = e?.[t.field];
|
|
155
155
|
return Array.isArray(n) ? n : [n];
|
|
156
156
|
}
|
|
157
|
-
let
|
|
158
|
-
let e =
|
|
159
|
-
e.scope && (t = t.filter((t) => e.scope(t,
|
|
157
|
+
let F = x(() => {
|
|
158
|
+
let e = l.value, t = d.value ?? [];
|
|
159
|
+
e.scope && (t = t.filter((t) => e.scope(t, m, j)));
|
|
160
160
|
for (let [n, r] of Object.entries(e.facets ?? {})) {
|
|
161
|
-
let e =
|
|
162
|
-
e && (t = t.filter((t) =>
|
|
161
|
+
let e = m[n];
|
|
162
|
+
e && (t = t.filter((t) => M(t, r).map(String).includes(String(e))));
|
|
163
163
|
}
|
|
164
|
-
e.match && (t = t.filter((t) => e.match(t,
|
|
165
|
-
begin:
|
|
166
|
-
end:
|
|
164
|
+
e.match && (t = t.filter((t) => e.match(t, m, j))), e.narrow && (t = e.narrow(t, m, j)), e.dates && (t = ae(t, {
|
|
165
|
+
begin: m[e.dates.begin ?? "begin"],
|
|
166
|
+
end: m[e.dates.end ?? "end"],
|
|
167
167
|
mode: e.dates.mode ?? "overlap",
|
|
168
168
|
fields: e.dates.fields
|
|
169
169
|
}));
|
|
170
170
|
let n = e.sort ?? "chronological";
|
|
171
|
-
return typeof n == "function" ? n(t) : n === "chronological" ?
|
|
172
|
-
}),
|
|
173
|
-
page:
|
|
174
|
-
size: () =>
|
|
175
|
-
}), te =
|
|
176
|
-
function
|
|
177
|
-
let t =
|
|
171
|
+
return typeof n == "function" ? n(t) : n === "chronological" ? ve(t) : n && typeof n == "object" ? ve(t, n) : t;
|
|
172
|
+
}), I = x(() => l.value.facetScope === "matching" ? F.value : d.value ?? []), H = Se(I, () => l.value.facets ?? {}), U = Oe(F, {
|
|
173
|
+
page: ee,
|
|
174
|
+
size: () => l.value.pageSize ?? 20
|
|
175
|
+
}), te = x(() => l.value.recordRoute ?? (n.entity ? `${n.entity}-detail` : "item"));
|
|
176
|
+
function W(e) {
|
|
177
|
+
let t = j.tr(o, e.id).name ?? e.internal_name ?? e.id;
|
|
178
178
|
return {
|
|
179
179
|
id: e.id,
|
|
180
180
|
image: e.images?.[0]?.url ?? "",
|
|
181
|
-
imageAlt:
|
|
181
|
+
imageAlt: ge(String(t)),
|
|
182
182
|
name: $(String(t)),
|
|
183
183
|
meta: [],
|
|
184
184
|
badge: e.type ?? "",
|
|
@@ -188,73 +188,73 @@ var Pe = { class: "mwnf-home" }, Fe = {
|
|
|
188
188
|
}
|
|
189
189
|
};
|
|
190
190
|
}
|
|
191
|
-
let ne =
|
|
192
|
-
filters:
|
|
193
|
-
active:
|
|
194
|
-
apply:
|
|
195
|
-
reset:
|
|
196
|
-
goToPage:
|
|
197
|
-
matching:
|
|
191
|
+
let ne = x(() => U.value.rows.map((e) => (l.value.record ?? W)(e, j))), G = x(() => ({
|
|
192
|
+
filters: m,
|
|
193
|
+
active: h.value,
|
|
194
|
+
apply: g,
|
|
195
|
+
reset: v,
|
|
196
|
+
goToPage: A,
|
|
197
|
+
matching: F.value,
|
|
198
198
|
pageInfo: U.value,
|
|
199
199
|
options: H.value
|
|
200
|
-
})),
|
|
201
|
-
let e =
|
|
200
|
+
})), q = x(() => {
|
|
201
|
+
let e = l.value;
|
|
202
202
|
return e.summary ? e.summary({
|
|
203
|
-
...
|
|
204
|
-
t:
|
|
203
|
+
...G.value,
|
|
204
|
+
t: r,
|
|
205
205
|
total: (d.value ?? []).length
|
|
206
206
|
}) : [{
|
|
207
|
-
label:
|
|
207
|
+
label: r(e.summaryLabel ?? "catalogue.results.itemsFound"),
|
|
208
208
|
count: U.value.total
|
|
209
209
|
}];
|
|
210
|
-
}),
|
|
210
|
+
}), J = x(() => l.value.filterMode ?? "apply"), re = x(() => l.value.controls ?? []), ie = x(() => re.value.length > 0 || !!l.value.panel);
|
|
211
211
|
function Y(e, t) {
|
|
212
|
-
|
|
212
|
+
J.value === "immediate" ? g({ [e]: t }) : m[e] = t;
|
|
213
213
|
}
|
|
214
|
-
let
|
|
214
|
+
let X = x(() => r(l.value.empty ?? "catalogue.results.noResultsFilter")), Z = x(() => l.value.variant === "grid"), se = x(() => ({
|
|
215
215
|
window: 5,
|
|
216
216
|
jump: !1,
|
|
217
217
|
ends: !0,
|
|
218
|
-
...
|
|
218
|
+
...l.value.pagination ?? {}
|
|
219
219
|
}));
|
|
220
|
-
return (e,
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
220
|
+
return (e, n) => (P(), w("section", Ue, [
|
|
221
|
+
R(e.$slots, "before", N(k(G.value))),
|
|
222
|
+
l.value.title ? (P(), w("h1", We, B(V(r)(l.value.title)), 1)) : C("", !0),
|
|
223
|
+
ie.value || e.$slots.filters ? (P(), S(c, {
|
|
224
224
|
key: 1,
|
|
225
225
|
class: "mwnf-catalogue__filters",
|
|
226
|
-
mode:
|
|
227
|
-
title:
|
|
228
|
-
"reset-label":
|
|
229
|
-
onApply:
|
|
230
|
-
onReset:
|
|
226
|
+
mode: J.value,
|
|
227
|
+
title: l.value.filterTitle ? V(r)(l.value.filterTitle) : "",
|
|
228
|
+
"reset-label": l.value.resetLabel ? V(r)(l.value.resetLabel) : "",
|
|
229
|
+
onApply: n[2] ||= (e) => V(g)(),
|
|
230
|
+
onReset: n[3] ||= (e) => V(v)()
|
|
231
231
|
}, {
|
|
232
|
-
default:
|
|
232
|
+
default: K(() => [(P(!0), w(b, null, L(re.value, (e) => (P(), w(b, { key: e.key }, [e.type === "year" ? (P(), w("label", Ge, [e.label ? (P(), w("span", Ke, B(V(r)(e.label)), 1)) : C("", !0), T("input", {
|
|
233
233
|
type: "number",
|
|
234
234
|
class: "mwnf-facet__select",
|
|
235
|
-
value:
|
|
236
|
-
placeholder: e.placeholder ?
|
|
237
|
-
onInput: (t) =>
|
|
238
|
-
onChange:
|
|
239
|
-
}, null, 40,
|
|
235
|
+
value: V(m)[e.key],
|
|
236
|
+
placeholder: e.placeholder ? V(r)(e.placeholder) : "",
|
|
237
|
+
onInput: (t) => V(m)[e.key] = t.target.value,
|
|
238
|
+
onChange: n[0] ||= (e) => J.value === "immediate" ? V(g)() : null
|
|
239
|
+
}, null, 40, qe)])) : e.type === "query" ? (P(), w("label", Je, [e.label ? (P(), w("span", Ye, B(V(r)(e.label)), 1)) : C("", !0), T("input", {
|
|
240
240
|
type: "text",
|
|
241
241
|
class: "mwnf-facet__select",
|
|
242
|
-
value:
|
|
243
|
-
placeholder: e.placeholder ?
|
|
244
|
-
onInput: (t) =>
|
|
245
|
-
onChange:
|
|
246
|
-
}, null, 40,
|
|
242
|
+
value: V(m)[e.key],
|
|
243
|
+
placeholder: e.placeholder ? V(r)(e.placeholder) : "",
|
|
244
|
+
onInput: (t) => V(m)[e.key] = t.target.value,
|
|
245
|
+
onChange: n[1] ||= (e) => J.value === "immediate" ? V(g)() : null
|
|
246
|
+
}, null, 40, Xe)])) : e.type === "checkbox" ? (P(), w("label", Ze, [T("input", {
|
|
247
247
|
type: "checkbox",
|
|
248
248
|
class: "mwnf-facet__checkbox",
|
|
249
|
-
checked:
|
|
249
|
+
checked: V(m)[e.key] === "1",
|
|
250
250
|
onChange: (t) => Y(e.key, t.target.checked ? "1" : "")
|
|
251
|
-
}, null, 40,
|
|
251
|
+
}, null, 40, Qe), e.label ? (P(), w("span", $e, B(V(r)(e.label)), 1)) : C("", !0)])) : (P(), S(s, {
|
|
252
252
|
key: 3,
|
|
253
|
-
"model-value":
|
|
254
|
-
label: e.label ?
|
|
255
|
-
options:
|
|
256
|
-
placeholder: e.placeholder ?
|
|
257
|
-
"any-label": e.anyLabel ?
|
|
253
|
+
"model-value": V(m)[e.key],
|
|
254
|
+
label: e.label ? V(r)(e.label) : "",
|
|
255
|
+
options: V(H)[e.key] ?? [],
|
|
256
|
+
placeholder: e.placeholder ? V(r)(e.placeholder) : "",
|
|
257
|
+
"any-label": e.anyLabel ? V(r)(e.anyLabel) : "",
|
|
258
258
|
"hide-empty": !!e.hideEmpty,
|
|
259
259
|
"onUpdate:modelValue": (t) => Y(e.key, t)
|
|
260
260
|
}, null, 8, [
|
|
@@ -265,50 +265,50 @@ var Pe = { class: "mwnf-home" }, Fe = {
|
|
|
265
265
|
"any-label",
|
|
266
266
|
"hide-empty",
|
|
267
267
|
"onUpdate:modelValue"
|
|
268
|
-
]))], 64))), 128)),
|
|
268
|
+
]))], 64))), 128)), R(e.$slots, "filters", N(k(G.value)))]),
|
|
269
269
|
_: 3
|
|
270
270
|
}, 8, [
|
|
271
271
|
"mode",
|
|
272
272
|
"title",
|
|
273
273
|
"reset-label"
|
|
274
|
-
])) :
|
|
275
|
-
|
|
274
|
+
])) : C("", !0),
|
|
275
|
+
O(u, { parts: q.value }, E({ _: 2 }, [e.$slots.actions ? {
|
|
276
276
|
name: "actions",
|
|
277
|
-
fn:
|
|
277
|
+
fn: K(() => [R(e.$slots, "actions", N(k(G.value)))]),
|
|
278
278
|
key: "0"
|
|
279
279
|
} : void 0]), 1032, ["parts"]),
|
|
280
|
-
|
|
280
|
+
T("div", et, [T("div", tt, [(P(), S(z(Z.value ? _ : y), {
|
|
281
281
|
records: ne.value,
|
|
282
|
-
"action-label":
|
|
282
|
+
"action-label": l.value.actionLabel ? V(r)(l.value.actionLabel) : ""
|
|
283
283
|
}, {
|
|
284
|
-
empty:
|
|
284
|
+
empty: K(() => [R(e.$slots, "empty", N(k(G.value)), () => [D(B(X.value), 1)])]),
|
|
285
285
|
_: 3
|
|
286
|
-
}, 8, ["records", "action-label"])),
|
|
287
|
-
"page-info":
|
|
288
|
-
window:
|
|
289
|
-
jump:
|
|
290
|
-
ends:
|
|
291
|
-
onNavigate:
|
|
286
|
+
}, 8, ["records", "action-label"])), O(t, {
|
|
287
|
+
"page-info": V(U),
|
|
288
|
+
window: se.value.window,
|
|
289
|
+
jump: se.value.jump,
|
|
290
|
+
ends: se.value.ends,
|
|
291
|
+
onNavigate: V(A)
|
|
292
292
|
}, null, 8, [
|
|
293
293
|
"page-info",
|
|
294
294
|
"window",
|
|
295
295
|
"jump",
|
|
296
296
|
"ends",
|
|
297
297
|
"onNavigate"
|
|
298
|
-
])]), e.$slots.aside ? (
|
|
299
|
-
|
|
298
|
+
])]), e.$slots.aside ? (P(), w("aside", nt, [R(e.$slots, "aside", N(k(G.value)))])) : C("", !0)]),
|
|
299
|
+
R(e.$slots, "after", N(k(G.value)))
|
|
300
300
|
]));
|
|
301
301
|
}
|
|
302
|
-
},
|
|
302
|
+
}, it = ["dir", "innerHTML"], at = { class: "mwnf-record__body" }, ot = { class: "mwnf-record__main" }, st = {
|
|
303
303
|
key: 1,
|
|
304
304
|
class: "mwnf-record__status"
|
|
305
|
-
},
|
|
305
|
+
}, ct = {
|
|
306
306
|
key: 0,
|
|
307
307
|
class: "mwnf-record__aside"
|
|
308
|
-
},
|
|
308
|
+
}, lt = {
|
|
309
309
|
key: 2,
|
|
310
310
|
class: "mwnf-record__status"
|
|
311
|
-
},
|
|
311
|
+
}, ut = {
|
|
312
312
|
__name: "RecordView",
|
|
313
313
|
props: {
|
|
314
314
|
spec: {
|
|
@@ -324,56 +324,56 @@ var Pe = { class: "mwnf-home" }, Fe = {
|
|
|
324
324
|
default: ""
|
|
325
325
|
}
|
|
326
326
|
},
|
|
327
|
-
setup(
|
|
328
|
-
let
|
|
327
|
+
setup(t) {
|
|
328
|
+
let n = t, { t: r, locale: s } = Te(), c = xe(), u = ke(), d = H(), m = Le(), h = n.spec.entity ?? n.entity, _ = x(() => n.spec), v = oe(h), y = ie(h), A = x(() => y.value.get(n.id) ?? null), j = x(() => v.value !== null), { language: M, languages: F, dir: I, select: z, text: U, ready: te, terms: W, glossary: ne, attribution: G } = je(A, {
|
|
329
329
|
entity: h,
|
|
330
|
-
translations:
|
|
331
|
-
attribution:
|
|
332
|
-
}), q =
|
|
330
|
+
translations: n.spec.translations ?? [],
|
|
331
|
+
attribution: n.spec.attribution ?? []
|
|
332
|
+
}), q = x(() => le(F.value)), { active: J, onClick: Y, close: ae } = we(W), Z = x(() => J.value ? he(J.value.definition, { breaks: !0 }) : ""), se = (e, t) => c.tr(e, t, M.value, "en"), Q = x(() => ({
|
|
333
333
|
record: A.value,
|
|
334
|
-
text:
|
|
335
|
-
language:
|
|
334
|
+
text: U.value,
|
|
335
|
+
language: M.value,
|
|
336
336
|
languages: q.value,
|
|
337
|
-
select:
|
|
338
|
-
dir:
|
|
339
|
-
glossary:
|
|
340
|
-
ready:
|
|
341
|
-
attribution:
|
|
342
|
-
t:
|
|
343
|
-
tr:
|
|
337
|
+
select: z,
|
|
338
|
+
dir: I.value,
|
|
339
|
+
glossary: ne.value,
|
|
340
|
+
ready: te.value,
|
|
341
|
+
attribution: G.value,
|
|
342
|
+
t: r,
|
|
343
|
+
tr: se
|
|
344
344
|
}));
|
|
345
345
|
function ce(e) {
|
|
346
346
|
return ((typeof e == "function" ? e(Q.value) : e) ?? []).map((e) => ({
|
|
347
347
|
...e,
|
|
348
|
-
label: e.label ?
|
|
348
|
+
label: e.label ? r(e.label) : ""
|
|
349
349
|
}));
|
|
350
350
|
}
|
|
351
|
-
let
|
|
351
|
+
let ue = x(() => A.value ? _e(ce(_.value.fields), Q.value) : []), de = x(() => A.value ? _e(ce(_.value.sections).map((e) => ({
|
|
352
352
|
render: "block",
|
|
353
353
|
...e
|
|
354
|
-
})), Q.value) : []),
|
|
355
|
-
let e =
|
|
356
|
-
return e ? { html:
|
|
354
|
+
})), Q.value) : []), fe = x(() => _.value.shortDescription === !1 ? "" : _.value.shortDescription ?? "short_description"), pe = x(() => {
|
|
355
|
+
let e = fe.value ? U.value[fe.value] : "";
|
|
356
|
+
return e ? { html: he(String(e), {
|
|
357
357
|
breaks: !0,
|
|
358
|
-
glossary:
|
|
358
|
+
glossary: ne.value
|
|
359
359
|
}) } : null;
|
|
360
|
-
}),
|
|
360
|
+
}), ve = x(() => {
|
|
361
361
|
if (!A.value) return "";
|
|
362
|
-
if (
|
|
363
|
-
let e =
|
|
364
|
-
return $(String(e), { glossary:
|
|
365
|
-
}),
|
|
362
|
+
if (_.value.title) return _.value.title(Q.value);
|
|
363
|
+
let e = U.value.name ?? A.value.internal_name ?? A.value.id;
|
|
364
|
+
return $(String(e), { glossary: ne.value });
|
|
365
|
+
}), be = x(() => {
|
|
366
366
|
if (!A.value) return [];
|
|
367
|
-
if (
|
|
368
|
-
let e =
|
|
367
|
+
if (_.value.media) return _.value.media(A.value, Q.value);
|
|
368
|
+
let e = ge(String(U.value.name ?? A.value.internal_name ?? ""));
|
|
369
369
|
return (A.value.images ?? []).map((t) => ({
|
|
370
370
|
url: t.url,
|
|
371
|
-
alt: t.captions?.[
|
|
372
|
-
caption: t.captions?.[
|
|
371
|
+
alt: t.captions?.[M.value] ?? e,
|
|
372
|
+
caption: t.captions?.[M.value] ?? t.captions?.en ?? "",
|
|
373
373
|
photographer: t.photographer ?? "",
|
|
374
374
|
copyright: t.copyright ?? ""
|
|
375
375
|
}));
|
|
376
|
-
}),
|
|
376
|
+
}), Se = [
|
|
377
377
|
{
|
|
378
378
|
field: "author",
|
|
379
379
|
label: "sheet.field.preparedBy"
|
|
@@ -390,44 +390,44 @@ var Pe = { class: "mwnf-home" }, Fe = {
|
|
|
390
390
|
field: "translation_copy_editor",
|
|
391
391
|
label: "sheet.field.translationCopyeditedBy"
|
|
392
392
|
}
|
|
393
|
-
],
|
|
394
|
-
label:
|
|
395
|
-
value:
|
|
396
|
-
})).filter((e) => e.value)),
|
|
397
|
-
let e =
|
|
393
|
+
], Ce = x(() => (_.value.credits ?? Se).map(({ field: e, label: t }) => ({
|
|
394
|
+
label: r(t),
|
|
395
|
+
value: U.value[e] ?? G.value[e] ?? ""
|
|
396
|
+
})).filter((e) => e.value)), Ee = x(() => String(A.value?.[_.value.workingNumber ?? "mwnf_reference"] ?? "")), De = x(() => {
|
|
397
|
+
let e = _.value.citation;
|
|
398
398
|
if (!A.value || e === !1) return "";
|
|
399
|
-
let t = typeof e?.project == "function" ? e.project(A.value, Q.value) :
|
|
400
|
-
return
|
|
401
|
-
author:
|
|
402
|
-
name:
|
|
403
|
-
project:
|
|
404
|
-
permalink:
|
|
405
|
-
inWord:
|
|
399
|
+
let t = typeof e?.project == "function" ? null : e?.project ?? A.value.project_id, n = typeof e?.project == "function" ? e.project(A.value, Q.value) : u.label(t) ?? me(e?.project ?? A.value.project_key, r), i = e?.permalink === !1 ? void 0 : typeof e?.permalink == "string" ? e.permalink : ye(m) ?? void 0;
|
|
400
|
+
return X({
|
|
401
|
+
author: U.value.author ?? G.value.author,
|
|
402
|
+
name: U.value.name ?? A.value.internal_name ?? "",
|
|
403
|
+
project: n,
|
|
404
|
+
permalink: i,
|
|
405
|
+
inWord: r("record.citation.in")
|
|
406
406
|
});
|
|
407
|
-
}),
|
|
407
|
+
}), Oe = Me(A, {
|
|
408
408
|
entity: h,
|
|
409
|
-
language:
|
|
410
|
-
}), Ae =
|
|
409
|
+
language: M
|
|
410
|
+
}), Ae = x(() => _.value.related === !1 ? null : _.value.related ?? {}), Ne = x(() => {
|
|
411
411
|
if (!Ae.value) return [];
|
|
412
|
-
let e = Ae.value.record ??
|
|
413
|
-
return
|
|
412
|
+
let e = Ae.value.record ?? Pe;
|
|
413
|
+
return Oe.value.inPackage.map((t) => e(t, Q.value));
|
|
414
414
|
});
|
|
415
|
-
function
|
|
416
|
-
let
|
|
415
|
+
function Pe({ record: e, justification: t }) {
|
|
416
|
+
let r = se(h, e.id).name ?? e.internal_name ?? e.id;
|
|
417
417
|
return {
|
|
418
418
|
id: e.id,
|
|
419
419
|
image: e.images?.[0]?.url ?? "",
|
|
420
|
-
imageAlt:
|
|
421
|
-
name: $(String(
|
|
420
|
+
imageAlt: ge(String(r)),
|
|
421
|
+
name: $(String(r)),
|
|
422
422
|
meta: t ? [t] : [],
|
|
423
423
|
badge: e.type ?? "",
|
|
424
424
|
to: {
|
|
425
|
-
name:
|
|
425
|
+
name: _.value.route ?? (n.entity ? `${n.entity}-detail` : "item"),
|
|
426
426
|
params: { id: e.id }
|
|
427
427
|
}
|
|
428
428
|
};
|
|
429
429
|
}
|
|
430
|
-
let
|
|
430
|
+
let Fe = /* @__PURE__ */ new Set([
|
|
431
431
|
"header",
|
|
432
432
|
"before-sheet",
|
|
433
433
|
"after-sheet",
|
|
@@ -436,54 +436,54 @@ var Pe = { class: "mwnf-home" }, Fe = {
|
|
|
436
436
|
"related",
|
|
437
437
|
"after",
|
|
438
438
|
"default"
|
|
439
|
-
]),
|
|
440
|
-
return (
|
|
439
|
+
]), Ie = x(() => Object.keys(d).filter((e) => !Fe.has(e)));
|
|
440
|
+
return (t, n) => j.value && !A.value ? (P(), S(V(re), { key: 0 })) : A.value ? (P(), w("article", {
|
|
441
441
|
key: 1,
|
|
442
442
|
class: "mwnf-record",
|
|
443
|
-
onClick:
|
|
443
|
+
onClick: n[0] ||= (...e) => V(Y) && V(Y)(...e)
|
|
444
444
|
}, [
|
|
445
|
-
|
|
446
|
-
|
|
445
|
+
R(t.$slots, "header", N(k(Q.value)), () => [
|
|
446
|
+
_.value.back ? (P(), S(e, {
|
|
447
447
|
key: 0,
|
|
448
448
|
class: "mwnf-record__back",
|
|
449
|
-
to:
|
|
450
|
-
href:
|
|
449
|
+
to: _.value.back.to,
|
|
450
|
+
href: _.value.back.href
|
|
451
451
|
}, {
|
|
452
|
-
default:
|
|
452
|
+
default: K(() => [D("← " + B(V(r)(_.value.back.label)), 1)]),
|
|
453
453
|
_: 1
|
|
454
|
-
}, 8, ["to", "href"])) :
|
|
455
|
-
|
|
454
|
+
}, 8, ["to", "href"])) : C("", !0),
|
|
455
|
+
O(p, {
|
|
456
456
|
languages: q.value,
|
|
457
|
-
language:
|
|
458
|
-
onSelect: z
|
|
457
|
+
language: V(M),
|
|
458
|
+
onSelect: V(z)
|
|
459
459
|
}, null, 8, [
|
|
460
460
|
"languages",
|
|
461
461
|
"language",
|
|
462
462
|
"onSelect"
|
|
463
463
|
]),
|
|
464
|
-
|
|
464
|
+
T("h1", {
|
|
465
465
|
class: "mwnf-record__title",
|
|
466
|
-
dir:
|
|
467
|
-
innerHTML:
|
|
468
|
-
}, null, 8,
|
|
466
|
+
dir: V(I) || void 0,
|
|
467
|
+
innerHTML: ve.value
|
|
468
|
+
}, null, 8, it)
|
|
469
469
|
]),
|
|
470
|
-
|
|
471
|
-
|
|
470
|
+
T("div", at, [T("div", ot, [
|
|
471
|
+
be.value.length ? (P(), S(ee, {
|
|
472
472
|
key: 0,
|
|
473
|
-
images:
|
|
474
|
-
variant:
|
|
475
|
-
}, null, 8, ["images", "variant"])) :
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
rows:
|
|
480
|
-
layout:
|
|
481
|
-
dir:
|
|
482
|
-
"short-description":
|
|
483
|
-
"short-description-after":
|
|
484
|
-
},
|
|
485
|
-
name:
|
|
486
|
-
fn:
|
|
473
|
+
images: be.value,
|
|
474
|
+
variant: _.value.mediaVariant ?? ""
|
|
475
|
+
}, null, 8, ["images", "variant"])) : C("", !0),
|
|
476
|
+
V(te) ? C("", !0) : (P(), w("p", st, B(V(r)("core.status.loading")), 1)),
|
|
477
|
+
R(t.$slots, "before-sheet", N(k(Q.value))),
|
|
478
|
+
O(o, {
|
|
479
|
+
rows: ue.value,
|
|
480
|
+
layout: _.value.layout ?? "table",
|
|
481
|
+
dir: V(I),
|
|
482
|
+
"short-description": pe.value,
|
|
483
|
+
"short-description-after": _.value.shortDescriptionAfter ?? "description"
|
|
484
|
+
}, E({ _: 2 }, [L(Ie.value, (e) => ({
|
|
485
|
+
name: e,
|
|
486
|
+
fn: K((n) => [R(t.$slots, e, N(k({
|
|
487
487
|
...n,
|
|
488
488
|
...Q.value
|
|
489
489
|
})))])
|
|
@@ -494,23 +494,23 @@ var Pe = { class: "mwnf-home" }, Fe = {
|
|
|
494
494
|
"short-description",
|
|
495
495
|
"short-description-after"
|
|
496
496
|
]),
|
|
497
|
-
(
|
|
497
|
+
(P(!0), w(b, null, L(de.value, (e) => (P(), S(a, {
|
|
498
498
|
key: e.key,
|
|
499
499
|
heading: e.label,
|
|
500
500
|
html: e.html,
|
|
501
|
-
dir:
|
|
501
|
+
dir: V(I)
|
|
502
502
|
}, null, 8, [
|
|
503
503
|
"heading",
|
|
504
504
|
"html",
|
|
505
505
|
"dir"
|
|
506
506
|
]))), 128)),
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
credits:
|
|
510
|
-
"working-number":
|
|
511
|
-
"working-number-label":
|
|
512
|
-
citation:
|
|
513
|
-
"citation-heading":
|
|
507
|
+
R(t.$slots, "after-sheet", N(k(Q.value))),
|
|
508
|
+
O(g, {
|
|
509
|
+
credits: Ce.value,
|
|
510
|
+
"working-number": Ee.value,
|
|
511
|
+
"working-number-label": V(r)("sheet.field.workingNumber"),
|
|
512
|
+
citation: De.value,
|
|
513
|
+
"citation-heading": _.value.citation?.heading ? V(r)(_.value.citation.heading) : ""
|
|
514
514
|
}, null, 8, [
|
|
515
515
|
"credits",
|
|
516
516
|
"working-number",
|
|
@@ -518,75 +518,342 @@ var Pe = { class: "mwnf-home" }, Fe = {
|
|
|
518
518
|
"citation",
|
|
519
519
|
"citation-heading"
|
|
520
520
|
]),
|
|
521
|
-
|
|
522
|
-
|
|
521
|
+
R(t.$slots, "source", N(k(Q.value)), () => [O(l)]),
|
|
522
|
+
R(t.$slots, "related", N(k({
|
|
523
523
|
...Q.value,
|
|
524
|
-
records:
|
|
525
|
-
outside:
|
|
526
|
-
})), () => [Ae.value ? (
|
|
524
|
+
records: Ne.value,
|
|
525
|
+
outside: V(Oe).outside
|
|
526
|
+
})), () => [Ae.value ? (P(), S(i, {
|
|
527
527
|
key: 0,
|
|
528
|
-
heading:
|
|
529
|
-
records:
|
|
528
|
+
heading: V(r)(Ae.value.heading ?? "record.related.items"),
|
|
529
|
+
records: Ne.value,
|
|
530
530
|
variant: Ae.value.variant ?? "list",
|
|
531
|
-
"action-label": Ae.value.actionLabel ?
|
|
531
|
+
"action-label": Ae.value.actionLabel ? V(r)(Ae.value.actionLabel) : ""
|
|
532
532
|
}, null, 8, [
|
|
533
533
|
"heading",
|
|
534
534
|
"records",
|
|
535
535
|
"variant",
|
|
536
536
|
"action-label"
|
|
537
|
-
])) :
|
|
538
|
-
]),
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
term:
|
|
542
|
-
html:
|
|
543
|
-
dir:
|
|
544
|
-
onClose:
|
|
537
|
+
])) : C("", !0)])
|
|
538
|
+
]), t.$slots.aside ? (P(), w("aside", ct, [R(t.$slots, "aside", N(k(Q.value)))])) : C("", !0)]),
|
|
539
|
+
R(t.$slots, "after", N(k(Q.value))),
|
|
540
|
+
O(f, {
|
|
541
|
+
term: V(J),
|
|
542
|
+
html: Z.value,
|
|
543
|
+
dir: V(I),
|
|
544
|
+
onClose: V(ae)
|
|
545
545
|
}, null, 8, [
|
|
546
546
|
"term",
|
|
547
547
|
"html",
|
|
548
548
|
"dir",
|
|
549
549
|
"onClose"
|
|
550
550
|
])
|
|
551
|
-
])) : (
|
|
551
|
+
])) : (P(), w("p", lt, B(V(r)("core.status.loading")), 1));
|
|
552
|
+
}
|
|
553
|
+
}, dt = {
|
|
554
|
+
key: 0,
|
|
555
|
+
class: "mwnf-sheet-source"
|
|
556
|
+
}, ft = {
|
|
557
|
+
key: 0,
|
|
558
|
+
class: "mwnf-sheet-source__line"
|
|
559
|
+
}, pt = {
|
|
560
|
+
key: 1,
|
|
561
|
+
class: "mwnf-sheet-source__uid"
|
|
562
|
+
}, mt = {
|
|
563
|
+
key: 2,
|
|
564
|
+
class: "mwnf-sheet-source__collection"
|
|
565
|
+
}, ht = ["href"], gt = {
|
|
566
|
+
key: 1,
|
|
567
|
+
class: "mwnf-sheet-notice"
|
|
568
|
+
}, _t = { key: 1 }, vt = {
|
|
569
|
+
key: 0,
|
|
570
|
+
class: "mwnf-sheet-related"
|
|
571
|
+
}, yt = {
|
|
572
|
+
key: 0,
|
|
573
|
+
class: "mwnf-sheet-related__heading mwnf-sheet-related__heading--caps"
|
|
574
|
+
}, bt = {
|
|
575
|
+
key: 1,
|
|
576
|
+
class: "mwnf-sheet-related__description"
|
|
577
|
+
}, xt = {
|
|
578
|
+
key: 0,
|
|
579
|
+
class: "mwnf-sheet-related__references"
|
|
580
|
+
}, St = {
|
|
581
|
+
key: 1,
|
|
582
|
+
class: "mwnf-sheet-related__unresolved"
|
|
583
|
+
}, Ct = {
|
|
584
|
+
key: 2,
|
|
585
|
+
class: "mwnf-sheet-related__line"
|
|
586
|
+
}, wt = ["href"], Tt = ["href"], Et = { key: 7 }, Dt = { class: "mwnf-sheet-related__heading" }, Ot = { key: 0 }, kt = { class: "mwnf-sheet-related__subheading" }, At = ["href"], jt = { key: 1 }, Mt = { class: "mwnf-sheet-related__unresolved" }, Nt = { key: 1 }, Pt = { class: "mwnf-sheet-related__subheading" }, Ft = ["href"], It = { key: 1 }, Lt = { class: "mwnf-sheet-related__unresolved" }, Rt = { key: 8 }, zt = { class: "mwnf-sheet-related__heading" }, Bt = { class: "mwnf-sheet-related__line" }, Vt = ["href"], Ht = { key: 9 }, Ut = { class: "mwnf-sheet-related__heading" }, Wt = { class: "mwnf-sheet-related__line" }, Gt = ["href"], Kt = { key: 10 }, qt = { class: "mwnf-sheet-related__heading" }, Jt = {
|
|
587
|
+
__name: "RecordSheetView",
|
|
588
|
+
props: {
|
|
589
|
+
spec: {
|
|
590
|
+
type: Object,
|
|
591
|
+
required: !0
|
|
592
|
+
},
|
|
593
|
+
id: {
|
|
594
|
+
type: String,
|
|
595
|
+
required: !0
|
|
596
|
+
},
|
|
597
|
+
entity: {
|
|
598
|
+
type: String,
|
|
599
|
+
default: ""
|
|
600
|
+
},
|
|
601
|
+
dataGetter: {
|
|
602
|
+
type: Function,
|
|
603
|
+
default: null
|
|
604
|
+
}
|
|
605
|
+
},
|
|
606
|
+
setup(t) {
|
|
607
|
+
let r = t, o = H(), s = /* @__PURE__ */ new Set([
|
|
608
|
+
"before-sheet",
|
|
609
|
+
"museum",
|
|
610
|
+
"related"
|
|
611
|
+
]), c = x(() => Object.keys(o).filter((e) => !s.has(e))), l = x(() => !r.dataGetter || r.dataGetter(r.id) != null), { t: u } = Te(), d = x(() => r.spec), f = ke(), p = (e, t) => (e.name ?? "").localeCompare(t.name ?? ""), ee = (e) => (e.gallery_references ?? []).filter((e) => e.kind === "gallery").sort(p), g = (e) => (e.gallery_references ?? []).filter((e) => e.kind === "exhibition").sort(p), _ = (e) => f.links(e.project_id)?.artisticIntroductionUrl ?? null, v = (e) => f.links(e.project_id)?.relatedDatabaseUrl ?? null;
|
|
612
|
+
function y(e, t) {
|
|
613
|
+
if (!e) return null;
|
|
614
|
+
let n = d.value.sourceDatabase === !1 ? null : d.value.sourceDatabase ?? null, r = null;
|
|
615
|
+
if (n) {
|
|
616
|
+
let i = n.chipClass ? n.chipClass(e, t) : null, a = f.label(e.project_id);
|
|
617
|
+
(i || a) && (r = {
|
|
618
|
+
chipClass: i,
|
|
619
|
+
name: a,
|
|
620
|
+
label: u(n.label ?? "record.sheet.sourceDatabase")
|
|
621
|
+
});
|
|
622
|
+
}
|
|
623
|
+
let i = n && n.addToCollection !== !1 ? u(n.addToCollection?.label ?? "record.action.addToCollection") : null, a = n ? e.backward_compatibility ?? "" : "", o = d.value.notice === !1 ? null : d.value.notice ?? null, s = o && o.show(e, t) ? u(o.label) : null;
|
|
624
|
+
return {
|
|
625
|
+
source: r,
|
|
626
|
+
addToCollectionLabel: i,
|
|
627
|
+
notice: s,
|
|
628
|
+
backwardCompatibility: a
|
|
629
|
+
};
|
|
630
|
+
}
|
|
631
|
+
function A(e, t) {
|
|
632
|
+
let n = d.value.museum === !1 ? null : d.value.museum ?? null;
|
|
633
|
+
return !n || !e ? null : {
|
|
634
|
+
to: n.route ? n.route(e, t) : null,
|
|
635
|
+
label: n.label ? n.label(e, t) : ""
|
|
636
|
+
};
|
|
637
|
+
}
|
|
638
|
+
function j(e, t) {
|
|
639
|
+
if (!e) return null;
|
|
640
|
+
let n = d.value.related ?? {}, i = t.records ?? [], a = t.outside ?? [], o = r.dataGetter ? i.filter((e) => r.dataGetter(e.id) != null) : i, s = r.dataGetter ? i.filter((e) => r.dataGetter(e.id) == null).map((t) => (e.related_items ?? []).find((e) => e.id === t.id)).filter(Boolean) : [], c = [...a, ...s].map((e) => ({
|
|
641
|
+
...e,
|
|
642
|
+
chipClass: n.outsideChip ? n.outsideChip(e, t) : null
|
|
643
|
+
})), l = n.onDisplayIn && n.onDisplayIn !== !1 ? {
|
|
644
|
+
linkPendingLabel: u(n.onDisplayIn.linkPendingLabel),
|
|
645
|
+
galleries: ee(e),
|
|
646
|
+
exhibitions: g(e)
|
|
647
|
+
} : null, p = n.databaseLabel && v(e) ? {
|
|
648
|
+
url: v(e),
|
|
649
|
+
label: u(n.databaseLabel),
|
|
650
|
+
name: f.label(e.project_id)
|
|
651
|
+
} : null, m = n.overallDatabase && n.overallDatabase !== !1 ? {
|
|
652
|
+
label: u(n.overallDatabase.label),
|
|
653
|
+
linkLabel: u(n.overallDatabase.linkLabel)
|
|
654
|
+
} : null;
|
|
655
|
+
return {
|
|
656
|
+
title: n.title ? u(n.title) : "",
|
|
657
|
+
description: n.description ? u(n.description) : "",
|
|
658
|
+
heading: u(n.heading ?? "record.related.items"),
|
|
659
|
+
variant: n.variant ?? "grid",
|
|
660
|
+
actionLabel: n.actionLabel ? u(n.actionLabel) : "",
|
|
661
|
+
inPackage: o,
|
|
662
|
+
references: c,
|
|
663
|
+
notInPackageLabel: n.notInPackageLabel ? u(n.notInPackageLabel) : "",
|
|
664
|
+
artisticIntroduction: n.artisticIntroductionLabel && _(e) ? {
|
|
665
|
+
url: _(e),
|
|
666
|
+
label: u(n.artisticIntroductionLabel)
|
|
667
|
+
} : null,
|
|
668
|
+
timeline: n.timeline ? n.timeline(e, t) : null,
|
|
669
|
+
glossary: n.glossary !== !1,
|
|
670
|
+
dynasties: n.dynasties ? n.dynasties(e, t.language, t) : null,
|
|
671
|
+
media: n.media === !1 ? [] : e.media ?? [],
|
|
672
|
+
onDisplayIn: l,
|
|
673
|
+
database: p,
|
|
674
|
+
overallDatabase: m,
|
|
675
|
+
download: n.download === !1 ? null : {
|
|
676
|
+
label: u("record.action.download"),
|
|
677
|
+
pdfLabel: u("record.action.downloadPdf")
|
|
678
|
+
}
|
|
679
|
+
};
|
|
680
|
+
}
|
|
681
|
+
function F() {
|
|
682
|
+
window.print();
|
|
683
|
+
}
|
|
684
|
+
return (r, o) => l.value ? (P(), S(ut, {
|
|
685
|
+
key: 0,
|
|
686
|
+
spec: d.value,
|
|
687
|
+
id: t.id,
|
|
688
|
+
entity: t.entity
|
|
689
|
+
}, E({
|
|
690
|
+
"before-sheet": K((e) => [R(r.$slots, "before-sheet", N(k(e)), () => [(P(!0), w(b, null, L([y(e.record, e)], (t) => (P(), w(b, { key: "before-sheet" }, [t?.source || t?.backwardCompatibility || t?.addToCollectionLabel ? (P(), w("div", dt, [
|
|
691
|
+
t.source ? (P(), w("p", ft, [t.source.chipClass ? (P(), w("span", {
|
|
692
|
+
key: 0,
|
|
693
|
+
class: M(["mwnf-chip", t.source.chipClass]),
|
|
694
|
+
"aria-hidden": "true"
|
|
695
|
+
}, null, 2)) : C("", !0), t.source.name ? (P(), w(b, { key: 1 }, [D(B(t.source.label) + ": " + B(t.source.name), 1)], 64)) : C("", !0)])) : C("", !0),
|
|
696
|
+
t.backwardCompatibility ? (P(), w("p", pt, [T("code", null, B(t.backwardCompatibility), 1)])) : C("", !0),
|
|
697
|
+
t.addToCollectionLabel ? (P(), w("p", mt, [T("a", {
|
|
698
|
+
href: V(fe).myCollection,
|
|
699
|
+
target: "_blank",
|
|
700
|
+
rel: "noopener"
|
|
701
|
+
}, "↗ " + B(t.addToCollectionLabel), 9, ht)])) : C("", !0)
|
|
702
|
+
])) : C("", !0), t?.notice ? (P(), w("div", gt, [D(B(t.notice) + " ", 1), T("strong", null, [T("em", null, B(e.languages.map((e) => e.label).join(", ")), 1)])])) : C("", !0)], 64))), 128))])]),
|
|
703
|
+
museum: K((t) => [R(r.$slots, "museum", N(k(t)), () => [(P(!0), w(b, null, L([A(t.row?.value, t)], (t) => (P(), w(b, { key: "museum" }, [t?.to ? (P(), S(e, {
|
|
704
|
+
key: 0,
|
|
705
|
+
to: t.to
|
|
706
|
+
}, {
|
|
707
|
+
default: K(() => [D(B(t.label), 1)]),
|
|
708
|
+
_: 2
|
|
709
|
+
}, 1032, ["to"])) : t ? (P(), w("span", _t, B(t.label), 1)) : C("", !0)], 64))), 128))])]),
|
|
710
|
+
related: K((e) => [R(r.$slots, "related", N(k(e)), () => [(P(!0), w(b, null, L([j(e.record, e)], (t) => (P(), w(b, { key: e.record?.id ?? "related" }, [t ? (P(), w("div", vt, [
|
|
711
|
+
t.title ? (P(), w("p", yt, B(t.title), 1)) : C("", !0),
|
|
712
|
+
t.description ? (P(), w("p", bt, B(t.description), 1)) : C("", !0),
|
|
713
|
+
O(i, {
|
|
714
|
+
heading: t.heading,
|
|
715
|
+
records: t.inPackage,
|
|
716
|
+
variant: t.variant,
|
|
717
|
+
"action-label": t.actionLabel
|
|
718
|
+
}, {
|
|
719
|
+
default: K(() => [t.references.length ? (P(), w("ul", xt, [(P(!0), w(b, null, L(t.references, (e) => (P(), w("li", { key: e.id }, [
|
|
720
|
+
e.chipClass ? (P(), w("span", {
|
|
721
|
+
key: 0,
|
|
722
|
+
class: M(["mwnf-chip", e.chipClass])
|
|
723
|
+
}, B(e.project_key), 3)) : C("", !0),
|
|
724
|
+
T("code", null, B(e.backward_compatibility), 1),
|
|
725
|
+
t.notInPackageLabel ? (P(), w("span", St, B(t.notInPackageLabel), 1)) : C("", !0)
|
|
726
|
+
]))), 128))])) : C("", !0)]),
|
|
727
|
+
_: 2
|
|
728
|
+
}, 1032, [
|
|
729
|
+
"heading",
|
|
730
|
+
"records",
|
|
731
|
+
"variant",
|
|
732
|
+
"action-label"
|
|
733
|
+
]),
|
|
734
|
+
t.artisticIntroduction ? (P(), w("p", Ct, [T("a", {
|
|
735
|
+
href: t.artisticIntroduction.url,
|
|
736
|
+
target: "_blank",
|
|
737
|
+
rel: "noopener"
|
|
738
|
+
}, "↗ " + B(t.artisticIntroduction.label), 9, wt)])) : C("", !0),
|
|
739
|
+
t.timeline ? (P(), S(h, {
|
|
740
|
+
key: e.record.id,
|
|
741
|
+
info: t.timeline
|
|
742
|
+
}, null, 8, ["info"])) : C("", !0),
|
|
743
|
+
t.glossary ? (P(), S(n, {
|
|
744
|
+
key: 4,
|
|
745
|
+
language: e.language,
|
|
746
|
+
dir: e.dir
|
|
747
|
+
}, null, 8, ["language", "dir"])) : C("", !0),
|
|
748
|
+
t.dynasties?.records?.length ? (P(), S(m, {
|
|
749
|
+
key: 5,
|
|
750
|
+
heading: V(u)("record.dynasty.list"),
|
|
751
|
+
dynasties: t.dynasties.records,
|
|
752
|
+
tr: t.dynasties.tr,
|
|
753
|
+
dir: e.dir
|
|
754
|
+
}, null, 8, [
|
|
755
|
+
"heading",
|
|
756
|
+
"dynasties",
|
|
757
|
+
"tr",
|
|
758
|
+
"dir"
|
|
759
|
+
])) : C("", !0),
|
|
760
|
+
t.media.length ? (P(), S(a, {
|
|
761
|
+
key: 6,
|
|
762
|
+
heading: V(u)("record.related.audioVideo")
|
|
763
|
+
}, {
|
|
764
|
+
default: K(() => [(P(!0), w(b, null, L(t.media, (e) => (P(), w("p", {
|
|
765
|
+
key: e.url,
|
|
766
|
+
class: "mwnf-sheet-related__line"
|
|
767
|
+
}, [T("a", {
|
|
768
|
+
href: e.url,
|
|
769
|
+
target: "_blank",
|
|
770
|
+
rel: "noopener"
|
|
771
|
+
}, "↗ " + B(e.title ?? e.url), 9, Tt)]))), 128))]),
|
|
772
|
+
_: 2
|
|
773
|
+
}, 1032, ["heading"])) : C("", !0),
|
|
774
|
+
t.onDisplayIn && (t.onDisplayIn.galleries.length || t.onDisplayIn.exhibitions.length) ? (P(), w("div", Et, [
|
|
775
|
+
T("p", Dt, B(V(u)("record.related.onDisplayIn")), 1),
|
|
776
|
+
t.onDisplayIn.exhibitions.length ? (P(), w("div", Ot, [T("p", kt, B(V(u)("record.related.exhibitions")), 1), (P(!0), w(b, null, L(t.onDisplayIn.exhibitions, (e) => (P(), w("p", {
|
|
777
|
+
key: e.id,
|
|
778
|
+
class: "mwnf-sheet-related__line"
|
|
779
|
+
}, [e.legacy_host ? (P(), w("a", {
|
|
780
|
+
key: 0,
|
|
781
|
+
href: e.legacy_host,
|
|
782
|
+
target: "_blank",
|
|
783
|
+
rel: "noopener"
|
|
784
|
+
}, "↗ " + B(e.name), 9, At)) : (P(), w("span", jt, [D(B(e.name) + " ", 1), T("span", Mt, B(t.onDisplayIn.linkPendingLabel), 1)]))]))), 128))])) : C("", !0),
|
|
785
|
+
t.onDisplayIn.galleries.length ? (P(), w("div", Nt, [T("p", Pt, B(V(u)("record.related.galleries")), 1), (P(!0), w(b, null, L(t.onDisplayIn.galleries, (e) => (P(), w("p", {
|
|
786
|
+
key: e.id,
|
|
787
|
+
class: "mwnf-sheet-related__line"
|
|
788
|
+
}, [e.legacy_host ? (P(), w("a", {
|
|
789
|
+
key: 0,
|
|
790
|
+
href: e.legacy_host,
|
|
791
|
+
target: "_blank",
|
|
792
|
+
rel: "noopener"
|
|
793
|
+
}, "↗ " + B(e.name), 9, Ft)) : (P(), w("span", It, [D(B(e.name) + " ", 1), T("span", Lt, B(t.onDisplayIn.linkPendingLabel), 1)]))]))), 128))])) : C("", !0)
|
|
794
|
+
])) : C("", !0),
|
|
795
|
+
t.database ? (P(), w("div", Rt, [T("p", zt, B(t.database.label), 1), T("p", Bt, [T("a", {
|
|
796
|
+
href: t.database.url,
|
|
797
|
+
target: "_blank",
|
|
798
|
+
rel: "noopener"
|
|
799
|
+
}, "↗ " + B(t.database.name), 9, Vt)])])) : C("", !0),
|
|
800
|
+
t.overallDatabase ? (P(), w("div", Ht, [T("p", Ut, B(t.overallDatabase.label), 1), T("p", Wt, [T("a", {
|
|
801
|
+
href: V(fe).overallDatabase,
|
|
802
|
+
target: "_blank",
|
|
803
|
+
rel: "noopener"
|
|
804
|
+
}, "↗ " + B(t.overallDatabase.linkLabel), 9, Gt)])])) : C("", !0),
|
|
805
|
+
t.download ? (P(), w("div", Kt, [T("p", qt, B(t.download.label), 1), T("p", {
|
|
806
|
+
class: "mwnf-sheet-related__line mwnf-sheet-related__line--action",
|
|
807
|
+
onClick: F
|
|
808
|
+
}, "➤ " + B(t.download.pdfLabel), 1)])) : C("", !0)
|
|
809
|
+
])) : C("", !0)], 64))), 128))])]),
|
|
810
|
+
_: 2
|
|
811
|
+
}, [L(c.value, (e) => ({
|
|
812
|
+
name: e,
|
|
813
|
+
fn: K((t) => [R(r.$slots, e, N(k(t)))])
|
|
814
|
+
}))]), 1032, [
|
|
815
|
+
"spec",
|
|
816
|
+
"id",
|
|
817
|
+
"entity"
|
|
818
|
+
])) : (P(), S(V(re), { key: 1 }));
|
|
552
819
|
}
|
|
553
|
-
},
|
|
820
|
+
}, Yt = ["dir"], Xt = {
|
|
554
821
|
key: 0,
|
|
555
822
|
class: "mwnf-essay__breadcrumb"
|
|
556
|
-
},
|
|
823
|
+
}, Zt = { class: "mwnf-essay__breadcrumb-label" }, Qt = {
|
|
557
824
|
key: 1,
|
|
558
825
|
class: "mwnf-essay__breadcrumb-link"
|
|
559
|
-
},
|
|
826
|
+
}, $t = ["aria-label"], en = { class: "mwnf-essay__title" }, tn = {
|
|
560
827
|
key: 0,
|
|
561
828
|
class: "mwnf-essay__number"
|
|
562
|
-
},
|
|
829
|
+
}, nn = ["innerHTML"], rn = { class: "mwnf-essay__body" }, an = { class: "mwnf-essay__main" }, on = {
|
|
563
830
|
key: 0,
|
|
564
831
|
class: "mwnf-essay__status"
|
|
565
|
-
},
|
|
832
|
+
}, sn = ["innerHTML"], cn = ["innerHTML"], ln = {
|
|
566
833
|
key: 4,
|
|
567
834
|
class: "mwnf-essay__nav"
|
|
568
|
-
},
|
|
835
|
+
}, un = {
|
|
569
836
|
key: 1,
|
|
570
837
|
class: "mwnf-essay__nav-spacer"
|
|
571
|
-
},
|
|
838
|
+
}, dn = {
|
|
572
839
|
key: 0,
|
|
573
840
|
class: "mwnf-essay__side"
|
|
574
|
-
},
|
|
841
|
+
}, fn = {
|
|
575
842
|
key: 0,
|
|
576
843
|
class: "mwnf-essay__panel"
|
|
577
|
-
},
|
|
844
|
+
}, pn = {
|
|
578
845
|
key: 0,
|
|
579
846
|
class: "mwnf-essay__variants"
|
|
580
|
-
},
|
|
847
|
+
}, mn = ["aria-pressed", "onClick"], hn = ["src", "alt"], gn = ["innerHTML"], _n = {
|
|
581
848
|
key: 0,
|
|
582
849
|
class: "mwnf-essay__panel-label"
|
|
583
|
-
},
|
|
850
|
+
}, vn = ["innerHTML"], yn = ["innerHTML"], bn = {
|
|
584
851
|
key: 0,
|
|
585
852
|
class: "mwnf-essay__thumbs"
|
|
586
|
-
},
|
|
853
|
+
}, xn = ["onClick"], Sn = ["src"], Cn = {
|
|
587
854
|
key: 2,
|
|
588
855
|
class: "mwnf-essay__status"
|
|
589
|
-
},
|
|
856
|
+
}, wn = {
|
|
590
857
|
__name: "EssayView",
|
|
591
858
|
props: {
|
|
592
859
|
spec: {
|
|
@@ -598,72 +865,72 @@ var Pe = { class: "mwnf-home" }, Fe = {
|
|
|
598
865
|
required: !0
|
|
599
866
|
}
|
|
600
867
|
},
|
|
601
|
-
setup(
|
|
602
|
-
let n =
|
|
868
|
+
setup(t) {
|
|
869
|
+
let n = t, { t: r } = Te(), i = xe(), a = H();
|
|
603
870
|
function o(e) {
|
|
604
871
|
return !!e && typeof e.walk == "function" && typeof e.children == "function";
|
|
605
872
|
}
|
|
606
873
|
function s(e) {
|
|
607
874
|
return typeof e == "string" ? e : "themes";
|
|
608
875
|
}
|
|
609
|
-
let c = n.spec.entity ?? "items",
|
|
876
|
+
let c = n.spec.entity ?? "items", u = n.spec.tree, d = u?.entity ?? (u?.themes ? s(u.themes) : n.spec.entity ?? "collections"), p = o(u) ? u : u?.themes ? be({
|
|
610
877
|
source: "themes",
|
|
611
|
-
entity:
|
|
612
|
-
childType:
|
|
613
|
-
}) :
|
|
614
|
-
purpose:
|
|
615
|
-
rootId:
|
|
616
|
-
childType:
|
|
617
|
-
entity:
|
|
618
|
-
order:
|
|
619
|
-
}),
|
|
620
|
-
if (
|
|
621
|
-
let e =
|
|
622
|
-
return e ?
|
|
623
|
-
}),
|
|
624
|
-
|
|
625
|
-
if (
|
|
626
|
-
|
|
878
|
+
entity: d,
|
|
879
|
+
childType: u.childType
|
|
880
|
+
}) : be({
|
|
881
|
+
purpose: u?.purpose,
|
|
882
|
+
rootId: u?.rootId,
|
|
883
|
+
childType: u?.childType,
|
|
884
|
+
entity: d,
|
|
885
|
+
order: u?.order
|
|
886
|
+
}), m = oe(d), h = x(() => m.value !== null), g = x(() => n.spec), v = x(() => p.byId.value.get(n.id) ?? null), y = x(() => p.parents(n.id).at(-1) ?? null), E = x(() => {
|
|
887
|
+
if (y.value) return p.children(y.value.id);
|
|
888
|
+
let e = p.root.value;
|
|
889
|
+
return e ? p.children(e.id) : p.walk().filter((e) => p.parents(e.id).length === 0);
|
|
890
|
+
}), A = x(() => E.value.findIndex((e) => e.id === n.id)), j = x(() => g.value.navigation || !1), F = x(() => j.value === "siblings" ? A.value > 0 ? E.value[A.value - 1] : null : j.value === "tree" ? p.previous(n.id) : null), z = x(() => j.value === "siblings" ? A.value !== -1 && A.value < E.value.length - 1 ? E.value[A.value + 1] : null : j.value === "tree" ? p.next(n.id) : null), { language: U, dir: te } = Ae(v, { entity: d }), W = x(() => v.value ? i.tr(d, v.value.id, U.value, "en") : {}), ne = I(!1);
|
|
891
|
+
G(() => [v.value?.id, U.value], async () => {
|
|
892
|
+
if (ne.value = !1, !v.value) {
|
|
893
|
+
ne.value = !0;
|
|
627
894
|
return;
|
|
628
895
|
}
|
|
629
896
|
let e = U.value === "en" ? ["en"] : [U.value, "en"];
|
|
630
|
-
await Promise.all([
|
|
897
|
+
await Promise.all([d, c].flatMap((t) => e.map((e) => i.loadTranslations(t, e)))), ne.value = !0;
|
|
631
898
|
}, { immediate: !0 });
|
|
632
|
-
function
|
|
899
|
+
function q(e) {
|
|
633
900
|
if (!e) return "";
|
|
634
|
-
let t =
|
|
901
|
+
let t = g.value.placeholder, n = (e) => !!e && !!t && t.test(e), r = i.tr(d, e.id, U.value, "en");
|
|
635
902
|
if (r.title && !n(r.title)) return r.title;
|
|
636
|
-
let a = i.tr(
|
|
903
|
+
let a = i.tr(d, e.id, "en").title;
|
|
637
904
|
return a && !n(a) ? a : e.internal_name ?? e.id;
|
|
638
905
|
}
|
|
639
|
-
let J =
|
|
640
|
-
node:
|
|
641
|
-
text:
|
|
906
|
+
let J = x(() => ({
|
|
907
|
+
node: v.value,
|
|
908
|
+
text: W.value,
|
|
642
909
|
language: U.value,
|
|
643
|
-
tree:
|
|
910
|
+
tree: p,
|
|
644
911
|
select: Ie,
|
|
645
912
|
t: r,
|
|
646
913
|
tr: (e, t) => i.tr(e, t, U.value, "en")
|
|
647
914
|
}));
|
|
648
|
-
function
|
|
915
|
+
function Y(e, t) {
|
|
649
916
|
return t.split(".").reduce((e, t) => e?.[t], e);
|
|
650
917
|
}
|
|
651
918
|
function X(e, t) {
|
|
652
|
-
return e === !1 || e == null ? "" : typeof e == "function" ? e(t) ?? "" :
|
|
919
|
+
return e === !1 || e == null ? "" : typeof e == "function" ? e(t) ?? "" : Y(t.text, e) ?? "";
|
|
653
920
|
}
|
|
654
|
-
let
|
|
655
|
-
if (!
|
|
656
|
-
let e = [
|
|
657
|
-
return
|
|
658
|
-
}), le =
|
|
921
|
+
let ae = x(() => X(g.value.quote ?? "quote", J.value)), Z = x(() => X(g.value.body ?? "description", J.value)), ce = x(() => {
|
|
922
|
+
if (!g.value.glossary || !v.value) return [];
|
|
923
|
+
let e = [ae.value, Z.value].filter(Boolean);
|
|
924
|
+
return Q(e.join("\n\n"), U.value);
|
|
925
|
+
}), le = x(() => se(ce.value)), { active: ue, onClick: de, close: fe } = we(ce), pe = x(() => ue.value ? he(ue.value.definition, { breaks: !0 }) : ""), me = x(() => v.value ? g.value.heading ? g.value.heading(J.value) : $(String(q(v.value)), { glossary: le.value }) : ""), _e = x(() => ae.value ? $(String(ae.value), { glossary: le.value }) : ""), ve = x(() => Z.value ? he(String(Z.value), {
|
|
659
926
|
breaks: !0,
|
|
660
927
|
glossary: le.value
|
|
661
|
-
}) : ""),
|
|
662
|
-
function
|
|
663
|
-
let t =
|
|
664
|
-
return t && typeof t == "object" ? !!t[e] : !!
|
|
928
|
+
}) : ""), ye = x(() => v.value ? g.value.about?.(v.value) ?? !1 : !1), Se = x(() => !!ye.value);
|
|
929
|
+
function Ce(e) {
|
|
930
|
+
let t = ye.value;
|
|
931
|
+
return t && typeof t == "object" ? !!t[e] : !!g.value.aboutKeeps?.includes(e);
|
|
665
932
|
}
|
|
666
|
-
let
|
|
933
|
+
let Ee = [
|
|
667
934
|
[1e3, "M"],
|
|
668
935
|
[900, "CM"],
|
|
669
936
|
[500, "D"],
|
|
@@ -678,40 +945,40 @@ var Pe = { class: "mwnf-home" }, Fe = {
|
|
|
678
945
|
[4, "IV"],
|
|
679
946
|
[1, "I"]
|
|
680
947
|
];
|
|
681
|
-
function
|
|
948
|
+
function De(e) {
|
|
682
949
|
let t = e, n = "";
|
|
683
|
-
for (let [e, r] of
|
|
950
|
+
for (let [e, r] of Ee) for (; t >= e;) n += r, t -= e;
|
|
684
951
|
return n;
|
|
685
952
|
}
|
|
686
|
-
let
|
|
687
|
-
let e =
|
|
688
|
-
if (!e || !
|
|
689
|
-
let t = (
|
|
690
|
-
return e === "roman" ?
|
|
953
|
+
let Oe = x(() => {
|
|
954
|
+
let e = g.value.numbering;
|
|
955
|
+
if (!e || !v.value) return "";
|
|
956
|
+
let t = (E.value.length ? E.value : [v.value]).findIndex((e) => e.id === n.id), r = t >= 0 ? t + 1 : 1;
|
|
957
|
+
return e === "roman" ? De(r) : String(r);
|
|
691
958
|
});
|
|
692
|
-
function
|
|
959
|
+
function ke(e) {
|
|
693
960
|
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) : [] : [];
|
|
694
961
|
}
|
|
695
|
-
let je =
|
|
696
|
-
let e =
|
|
697
|
-
return
|
|
698
|
-
}), Ne =
|
|
699
|
-
|
|
962
|
+
let je = ie(c), Me = x(() => {
|
|
963
|
+
let e = g.value.items?.of ?? ke;
|
|
964
|
+
return v.value ? e(v.value, J.value) : [];
|
|
965
|
+
}), Ne = x(() => Me.value.map((e) => je.value.get(e)).filter(Boolean)), Pe = I(null);
|
|
966
|
+
G(Ne, (e) => {
|
|
700
967
|
e.some((e) => e.id === Pe.value) || (Pe.value = e[0]?.id ?? null);
|
|
701
968
|
}, { immediate: !0 });
|
|
702
|
-
let Fe =
|
|
969
|
+
let Fe = x(() => Ne.value.find((e) => e.id === Pe.value) ?? Ne.value[0] ?? null);
|
|
703
970
|
function Ie(e) {
|
|
704
971
|
Pe.value = e;
|
|
705
972
|
}
|
|
706
973
|
function Le(e) {
|
|
707
|
-
let t =
|
|
974
|
+
let t = g.value.items?.route;
|
|
708
975
|
return !t || !e ? null : typeof t == "function" ? t(e, J.value) : {
|
|
709
976
|
name: t,
|
|
710
977
|
params: { id: e.id }
|
|
711
978
|
};
|
|
712
979
|
}
|
|
713
980
|
function Re(e) {
|
|
714
|
-
let t =
|
|
981
|
+
let t = g.value.route;
|
|
715
982
|
return !t || !e ? null : typeof t == "function" ? t(e, J.value) : {
|
|
716
983
|
name: t,
|
|
717
984
|
params: { id: e.id }
|
|
@@ -723,18 +990,18 @@ var Pe = { class: "mwnf-home" }, Fe = {
|
|
|
723
990
|
return {
|
|
724
991
|
name: $(String(t)),
|
|
725
992
|
image: e.images?.[0]?.url ?? "",
|
|
726
|
-
imageAlt:
|
|
993
|
+
imageAlt: ge(String(t))
|
|
727
994
|
};
|
|
728
995
|
}
|
|
729
|
-
let Be =
|
|
996
|
+
let Be = x(() => {
|
|
730
997
|
let e = Fe.value;
|
|
731
998
|
if (!e) return null;
|
|
732
|
-
let t = ze(e), n =
|
|
999
|
+
let t = ze(e), n = g.value.items?.caption?.(e, v.value, J.value);
|
|
733
1000
|
return {
|
|
734
1001
|
...t,
|
|
735
1002
|
...n
|
|
736
1003
|
};
|
|
737
|
-
}), Ve =
|
|
1004
|
+
}), Ve = x(() => !!g.value.panel), He = x(() => {
|
|
738
1005
|
let e = Fe.value;
|
|
739
1006
|
if (!e) return [];
|
|
740
1007
|
let t = Be.value, n = e.images?.[0]?.url ? [{
|
|
@@ -746,39 +1013,39 @@ var Pe = { class: "mwnf-home" }, Fe = {
|
|
|
746
1013
|
justification: "",
|
|
747
1014
|
fields: null
|
|
748
1015
|
}
|
|
749
|
-
}] : [], r =
|
|
1016
|
+
}] : [], r = g.value.panel?.variants?.(e, J.value) ?? [];
|
|
750
1017
|
return [...n, ...r.map((e, t) => ({
|
|
751
1018
|
id: e.id ?? `variant-${t}`,
|
|
752
1019
|
...e
|
|
753
1020
|
}))];
|
|
754
|
-
}), Ue =
|
|
755
|
-
|
|
1021
|
+
}), Ue = I(null);
|
|
1022
|
+
G(He, (e) => {
|
|
756
1023
|
e.some((e) => e.id === Ue.value) || (Ue.value = e[0]?.id ?? null);
|
|
757
1024
|
}, { immediate: !0 });
|
|
758
|
-
let We =
|
|
1025
|
+
let We = x(() => He.value.find((e) => e.id === Ue.value) ?? He.value[0] ?? null);
|
|
759
1026
|
function Ge(e) {
|
|
760
1027
|
Ue.value = e;
|
|
761
1028
|
}
|
|
762
|
-
let Ke =
|
|
1029
|
+
let Ke = x(() => {
|
|
763
1030
|
let e = We.value;
|
|
764
1031
|
return e?.image ? [{
|
|
765
1032
|
url: e.image,
|
|
766
1033
|
alt: e.alt ?? ""
|
|
767
1034
|
}] : [];
|
|
768
|
-
}), qe =
|
|
1035
|
+
}), qe = x(() => {
|
|
769
1036
|
let e = Fe.value;
|
|
770
|
-
return !e || !
|
|
771
|
-
}), Je =
|
|
1037
|
+
return !e || !g.value.panel?.fields ? [] : g.value.panel.fields(e, v.value, J.value) ?? [];
|
|
1038
|
+
}), Je = x(() => {
|
|
772
1039
|
let e = We.value?.caption?.fields;
|
|
773
1040
|
return e == null ? qe.value : e.map((e) => ({
|
|
774
1041
|
label: e.label ? r(e.label) : "",
|
|
775
1042
|
value: e.value
|
|
776
1043
|
}));
|
|
777
|
-
}), Ye =
|
|
1044
|
+
}), Ye = x(() => {
|
|
778
1045
|
let e = We.value?.caption?.justification;
|
|
779
1046
|
return e ? $(String(e)) : "";
|
|
780
|
-
}), Xe =
|
|
781
|
-
let t = ze(e), n =
|
|
1047
|
+
}), Xe = x(() => Ne.value.map((e) => {
|
|
1048
|
+
let t = ze(e), n = g.value.items?.meta?.(e, J.value) ?? [], r = g.value.items?.badge?.(e, J.value) ?? "";
|
|
782
1049
|
return {
|
|
783
1050
|
id: e.id,
|
|
784
1051
|
image: t.image,
|
|
@@ -788,263 +1055,263 @@ var Pe = { class: "mwnf-home" }, Fe = {
|
|
|
788
1055
|
badge: r,
|
|
789
1056
|
to: Le(e)
|
|
790
1057
|
};
|
|
791
|
-
})), Ze =
|
|
792
|
-
let e =
|
|
793
|
-
return e ? e === "children" ?
|
|
794
|
-
}), $e =
|
|
1058
|
+
})), Ze = x(() => g.value.breadcrumb && v.value ? p.parents(n.id) : []), Qe = x(() => {
|
|
1059
|
+
let e = g.value.tabs;
|
|
1060
|
+
return e ? e === "children" ? v.value ? p.children(v.value.id) : [] : E.value : [];
|
|
1061
|
+
}), $e = x(() => g.value.previous ?? "exhibition.theme.previous"), et = x(() => g.value.next ?? "exhibition.theme.next"), tt = x(() => g.value.backTo ?? "record.action.backToResults"), nt = x(() => g.value.inThisTheme ?? "exhibition.theme.inThisTheme"), rt = x(() => g.value.seeAll ?? "exhibition.theme.seeAllInTheme"), it = x(() => ({
|
|
795
1062
|
...J.value,
|
|
796
1063
|
items: Ne.value,
|
|
797
1064
|
selected: Fe.value,
|
|
798
1065
|
selectedVariant: We.value,
|
|
799
1066
|
selectVariant: Ge,
|
|
800
1067
|
breadcrumb: Ze.value,
|
|
801
|
-
previous:
|
|
802
|
-
next:
|
|
803
|
-
})), at =
|
|
804
|
-
return (n, i) =>
|
|
1068
|
+
previous: F.value,
|
|
1069
|
+
next: z.value
|
|
1070
|
+
})), at = x(() => Se.value && !Ce("panel") ? !1 : Ve.value || Ne.value.length > 0 || !!a.aside), ot = x(() => (!Se.value || Ce("navigation")) && !!j.value && !!(F.value || z.value));
|
|
1071
|
+
return (n, i) => h.value && !v.value ? (P(), S(V(re), { key: 0 })) : v.value ? (P(), w("article", {
|
|
805
1072
|
key: 1,
|
|
806
|
-
class:
|
|
807
|
-
dir:
|
|
808
|
-
onClick: i[0] ||= (...e) =>
|
|
1073
|
+
class: M(["mwnf-essay", { "mwnf-essay--about": Se.value }]),
|
|
1074
|
+
dir: V(te) || void 0,
|
|
1075
|
+
onClick: i[0] ||= (...e) => V(de) && V(de)(...e)
|
|
809
1076
|
}, [
|
|
810
|
-
|
|
811
|
-
Ze.value.length ? (
|
|
1077
|
+
R(n.$slots, "header", N(k(it.value)), () => [
|
|
1078
|
+
Ze.value.length ? (P(), w("p", Xt, [T("span", Zt, B(V(r)(tt.value)), 1), (P(!0), w(b, null, L(Ze.value, (t) => (P(), w(b, { key: t.id }, [Re(t) ? (P(), S(e, {
|
|
812
1079
|
key: 0,
|
|
813
|
-
to: Re(
|
|
1080
|
+
to: Re(t),
|
|
814
1081
|
class: "mwnf-essay__breadcrumb-link"
|
|
815
1082
|
}, {
|
|
816
|
-
default:
|
|
1083
|
+
default: K(() => [D(B(q(t)), 1)]),
|
|
817
1084
|
_: 2
|
|
818
|
-
}, 1032, ["to"])) : (
|
|
819
|
-
Qe.value.length > 1 ? (
|
|
1085
|
+
}, 1032, ["to"])) : (P(), w("span", Qt, B(q(t)), 1))], 64))), 128))])) : C("", !0),
|
|
1086
|
+
Qe.value.length > 1 ? (P(), w("div", {
|
|
820
1087
|
key: 1,
|
|
821
1088
|
class: "mwnf-essay__tabs",
|
|
822
1089
|
role: "tablist",
|
|
823
|
-
"aria-label":
|
|
824
|
-
}, [(
|
|
825
|
-
key:
|
|
826
|
-
to: Re(
|
|
827
|
-
class:
|
|
1090
|
+
"aria-label": V(r)(nt.value)
|
|
1091
|
+
}, [(P(!0), w(b, null, L(Qe.value, (n) => (P(), S(e, {
|
|
1092
|
+
key: n.id,
|
|
1093
|
+
to: Re(n),
|
|
1094
|
+
class: M(["mwnf-essay__tab", { "mwnf-essay__tab--active": n.id === t.id }])
|
|
828
1095
|
}, {
|
|
829
|
-
default:
|
|
1096
|
+
default: K(() => [D(B(q(n)), 1)]),
|
|
830
1097
|
_: 2
|
|
831
|
-
}, 1032, ["to", "class"]))), 128))], 8,
|
|
832
|
-
|
|
1098
|
+
}, 1032, ["to", "class"]))), 128))], 8, $t)) : C("", !0),
|
|
1099
|
+
T("h1", en, [Oe.value ? (P(), w("span", tn, B(Oe.value), 1)) : C("", !0), T("span", { innerHTML: me.value }, null, 8, nn)])
|
|
833
1100
|
]),
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
1101
|
+
T("div", rn, [T("div", an, [
|
|
1102
|
+
ne.value ? C("", !0) : (P(), w("p", on, B(V(r)("core.status.loading")), 1)),
|
|
1103
|
+
_e.value ? (P(), w("p", {
|
|
837
1104
|
key: 1,
|
|
838
1105
|
class: "mwnf-essay__quote",
|
|
839
|
-
innerHTML:
|
|
840
|
-
}, null, 8,
|
|
841
|
-
|
|
842
|
-
|
|
1106
|
+
innerHTML: _e.value
|
|
1107
|
+
}, null, 8, sn)) : C("", !0),
|
|
1108
|
+
R(n.$slots, "before-body", N(k(it.value))),
|
|
1109
|
+
ve.value ? (P(), w("div", {
|
|
843
1110
|
key: 2,
|
|
844
1111
|
class: "mwnf-essay__prose mwnf-sheet__block",
|
|
845
|
-
innerHTML:
|
|
846
|
-
}, null, 8,
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
1112
|
+
innerHTML: ve.value
|
|
1113
|
+
}, null, 8, cn)) : C("", !0),
|
|
1114
|
+
R(n.$slots, "after-body", N(k(it.value))),
|
|
1115
|
+
Se.value ? C("", !0) : R(n.$slots, "justifications", N(k(it.value)), void 0, void 0, 3),
|
|
1116
|
+
ot.value ? (P(), w("div", ln, [R(n.$slots, "navigation", N(k(it.value)), () => [F.value ? (P(), S(e, {
|
|
850
1117
|
key: 0,
|
|
851
|
-
to: Re(
|
|
1118
|
+
to: Re(F.value),
|
|
852
1119
|
class: "mwnf-essay__nav-link mwnf-essay__nav-link--previous"
|
|
853
1120
|
}, {
|
|
854
|
-
default:
|
|
1121
|
+
default: K(() => [D("← " + B(V(r)($e.value)), 1)]),
|
|
855
1122
|
_: 1
|
|
856
|
-
}, 8, ["to"])) : (
|
|
1123
|
+
}, 8, ["to"])) : (P(), w("span", un)), z.value ? (P(), S(e, {
|
|
857
1124
|
key: 2,
|
|
858
|
-
to: Re(
|
|
1125
|
+
to: Re(z.value),
|
|
859
1126
|
class: "mwnf-essay__nav-link mwnf-essay__nav-link--next"
|
|
860
1127
|
}, {
|
|
861
|
-
default:
|
|
1128
|
+
default: K(() => [D(B(V(r)(et.value)) + " →", 1)]),
|
|
862
1129
|
_: 1
|
|
863
|
-
}, 8, ["to"])) :
|
|
864
|
-
]), at.value ? (
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
He.value.length > 1 ? (
|
|
1130
|
+
}, 8, ["to"])) : C("", !0)])])) : C("", !0)
|
|
1131
|
+
]), at.value ? (P(), w("div", dn, [
|
|
1132
|
+
R(n.$slots, "panel", N(k(it.value)), () => [Ve.value && Be.value ? (P(), w("div", fn, [
|
|
1133
|
+
O(ee, { images: Ke.value }, null, 8, ["images"]),
|
|
1134
|
+
He.value.length > 1 ? (P(), w("ul", pn, [(P(!0), w(b, null, L(He.value, (e) => (P(), w("li", { key: e.id }, [T("button", {
|
|
868
1135
|
type: "button",
|
|
869
|
-
class:
|
|
1136
|
+
class: M(["mwnf-essay__variant", { "mwnf-essay__variant--active": e.id === We.value?.id }]),
|
|
870
1137
|
"aria-pressed": e.id === We.value?.id ? "true" : "false",
|
|
871
1138
|
onClick: (t) => Ge(e.id)
|
|
872
|
-
}, [e.image ? (
|
|
1139
|
+
}, [e.image ? (P(), w("img", {
|
|
873
1140
|
key: 0,
|
|
874
1141
|
src: e.image,
|
|
875
1142
|
alt: e.alt ?? "",
|
|
876
1143
|
loading: "lazy"
|
|
877
|
-
}, null, 8,
|
|
878
|
-
|
|
1144
|
+
}, null, 8, hn)) : C("", !0)], 10, mn)]))), 128))])) : C("", !0),
|
|
1145
|
+
T("h3", {
|
|
879
1146
|
class: "mwnf-essay__panel-name",
|
|
880
1147
|
innerHTML: We.value?.caption?.title || Be.value.name
|
|
881
|
-
}, null, 8,
|
|
882
|
-
(
|
|
1148
|
+
}, null, 8, gn),
|
|
1149
|
+
(P(!0), w(b, null, L(Je.value, (e, t) => (P(), w("p", {
|
|
883
1150
|
key: t,
|
|
884
1151
|
class: "mwnf-essay__panel-field"
|
|
885
|
-
}, [e.label ? (
|
|
886
|
-
Ye.value ? (
|
|
1152
|
+
}, [e.label ? (P(), w("span", _n, B(e.label), 1)) : C("", !0), T("span", { innerHTML: e.value }, null, 8, vn)]))), 128)),
|
|
1153
|
+
Ye.value ? (P(), w("p", {
|
|
887
1154
|
key: 1,
|
|
888
1155
|
class: "mwnf-essay__panel-justification mwnf-sheet__block",
|
|
889
1156
|
innerHTML: Ye.value
|
|
890
|
-
}, null, 8,
|
|
891
|
-
Le(Fe.value) ? (
|
|
1157
|
+
}, null, 8, yn)) : C("", !0),
|
|
1158
|
+
Le(Fe.value) ? (P(), S(e, {
|
|
892
1159
|
key: 2,
|
|
893
1160
|
to: Le(Fe.value),
|
|
894
1161
|
class: "mwnf-essay__panel-link"
|
|
895
1162
|
}, {
|
|
896
|
-
default:
|
|
1163
|
+
default: K(() => [D(B(V(r)(rt.value)) + " →", 1)]),
|
|
897
1164
|
_: 1
|
|
898
|
-
}, 8, ["to"])) :
|
|
899
|
-
])) :
|
|
900
|
-
|
|
1165
|
+
}, 8, ["to"])) : C("", !0)
|
|
1166
|
+
])) : C("", !0)]),
|
|
1167
|
+
R(n.$slots, "thumbnails", N(k(it.value)), () => [Ve.value && Ne.value.length > 1 ? (P(), w("ul", bn, [(P(!0), w(b, null, L(Ne.value, (e) => (P(), w("li", { key: e.id }, [T("button", {
|
|
901
1168
|
type: "button",
|
|
902
|
-
class:
|
|
1169
|
+
class: M(["mwnf-essay__thumb", { "mwnf-essay__thumb--active": e.id === Fe.value?.id }]),
|
|
903
1170
|
onClick: (t) => Ie(e.id)
|
|
904
|
-
}, [e.images?.[0]?.url ? (
|
|
1171
|
+
}, [e.images?.[0]?.url ? (P(), w("img", {
|
|
905
1172
|
key: 0,
|
|
906
1173
|
src: e.images[0].url,
|
|
907
1174
|
alt: "",
|
|
908
1175
|
loading: "lazy"
|
|
909
|
-
}, null, 8,
|
|
1176
|
+
}, null, 8, Sn)) : C("", !0)], 10, xn)]))), 128))])) : !Ve.value && Xe.value.length ? (P(), S(_, {
|
|
910
1177
|
key: 1,
|
|
911
1178
|
records: Xe.value
|
|
912
|
-
}, null, 8, ["records"])) :
|
|
913
|
-
|
|
914
|
-
])) :
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
term:
|
|
918
|
-
html:
|
|
919
|
-
dir:
|
|
920
|
-
onClose:
|
|
1179
|
+
}, null, 8, ["records"])) : C("", !0)]),
|
|
1180
|
+
R(n.$slots, "aside", N(k(it.value)))
|
|
1181
|
+
])) : C("", !0)]),
|
|
1182
|
+
R(n.$slots, "after", N(k(it.value)), () => [O(l)]),
|
|
1183
|
+
O(f, {
|
|
1184
|
+
term: V(ue),
|
|
1185
|
+
html: pe.value,
|
|
1186
|
+
dir: V(te),
|
|
1187
|
+
onClose: V(fe)
|
|
921
1188
|
}, null, 8, [
|
|
922
1189
|
"term",
|
|
923
1190
|
"html",
|
|
924
1191
|
"dir",
|
|
925
1192
|
"onClose"
|
|
926
1193
|
])
|
|
927
|
-
], 10,
|
|
1194
|
+
], 10, Yt)) : (P(), w("p", Cn, B(V(r)("core.status.loading")), 1));
|
|
928
1195
|
}
|
|
929
|
-
},
|
|
1196
|
+
}, Tn = { class: "mwnf-link-list" }, En = {
|
|
930
1197
|
key: 0,
|
|
931
1198
|
class: "mwnf-link-list__back"
|
|
932
|
-
},
|
|
1199
|
+
}, Dn = {
|
|
933
1200
|
key: 1,
|
|
934
1201
|
class: "mwnf-link-list__title"
|
|
935
|
-
},
|
|
1202
|
+
}, On = {
|
|
936
1203
|
key: 2,
|
|
937
1204
|
class: "mwnf-link-list__groups"
|
|
938
|
-
},
|
|
1205
|
+
}, kn = {
|
|
939
1206
|
key: 0,
|
|
940
1207
|
class: "mwnf-link-list__heading"
|
|
941
|
-
},
|
|
1208
|
+
}, An = {
|
|
942
1209
|
key: 1,
|
|
943
1210
|
class: "mwnf-link-list__links"
|
|
944
|
-
},
|
|
1211
|
+
}, jn = ["innerHTML"], Mn = ["innerHTML"], Nn = {
|
|
945
1212
|
key: 3,
|
|
946
1213
|
class: "mwnf-link-list__empty"
|
|
947
|
-
},
|
|
1214
|
+
}, Pn = {
|
|
948
1215
|
__name: "LinkListView",
|
|
949
1216
|
props: { spec: {
|
|
950
1217
|
type: Object,
|
|
951
1218
|
required: !0
|
|
952
1219
|
} },
|
|
953
|
-
setup(
|
|
954
|
-
let
|
|
955
|
-
return (
|
|
956
|
-
|
|
957
|
-
to:
|
|
958
|
-
href:
|
|
1220
|
+
setup(t) {
|
|
1221
|
+
let n = t, { t: r } = Te(), i = x(() => ((typeof n.spec.groups == "function" ? n.spec.groups({}) : n.spec.groups ?? []) ?? []).filter((e) => e.links?.length > 0)), a = x(() => n.spec.title ? r(n.spec.title) : ""), o = x(() => n.spec.back?.label ? r(n.spec.back.label) : ""), s = x(() => r(n.spec.empty ?? "catalogue.results.noResults"));
|
|
1222
|
+
return (t, c) => (P(), w("div", Tn, [
|
|
1223
|
+
n.spec.back && o.value ? (P(), w("div", En, [O(e, {
|
|
1224
|
+
to: n.spec.back.to,
|
|
1225
|
+
href: n.spec.back.href
|
|
959
1226
|
}, {
|
|
960
|
-
default:
|
|
1227
|
+
default: K(() => [D(" ← " + B(o.value), 1)]),
|
|
961
1228
|
_: 1
|
|
962
|
-
}, 8, ["to", "href"])])) :
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
key:
|
|
1229
|
+
}, 8, ["to", "href"])])) : C("", !0),
|
|
1230
|
+
a.value ? (P(), w("h1", Dn, B(a.value), 1)) : C("", !0),
|
|
1231
|
+
R(t.$slots, "before"),
|
|
1232
|
+
i.value.length ? (P(), w("div", On, [(P(!0), w(b, null, L(i.value, (n, i) => (P(), w("section", {
|
|
1233
|
+
key: i,
|
|
967
1234
|
class: "mwnf-link-list__group"
|
|
968
|
-
}, [
|
|
969
|
-
key:
|
|
1235
|
+
}, [R(t.$slots, "group", { group: n }, () => [n.heading ? (P(), w("h2", kn, B(V(r)(n.heading)), 1)) : C("", !0), n.links?.length ? (P(), w("ul", An, [(P(!0), w(b, null, L(n.links, (t, n) => (P(), w("li", {
|
|
1236
|
+
key: n,
|
|
970
1237
|
class: "mwnf-link-list__item"
|
|
971
|
-
}, [
|
|
1238
|
+
}, [O(e, {
|
|
972
1239
|
class: "mwnf-link-list__link",
|
|
973
|
-
to:
|
|
974
|
-
href:
|
|
1240
|
+
to: t.to,
|
|
1241
|
+
href: t.href
|
|
975
1242
|
}, {
|
|
976
|
-
default:
|
|
1243
|
+
default: K(() => [T("span", { innerHTML: V(de)(t.label) }, null, 8, jn)]),
|
|
977
1244
|
_: 2
|
|
978
|
-
}, 1032, ["to", "href"]),
|
|
1245
|
+
}, 1032, ["to", "href"]), t.note ? (P(), w("div", {
|
|
979
1246
|
key: 0,
|
|
980
1247
|
class: "mwnf-link-list__note",
|
|
981
|
-
innerHTML:
|
|
982
|
-
}, null, 8,
|
|
983
|
-
|
|
1248
|
+
innerHTML: V(de)(t.note)
|
|
1249
|
+
}, null, 8, Mn)) : C("", !0)]))), 128))])) : C("", !0)])]))), 128))])) : (P(), w("div", Nn, B(s.value), 1)),
|
|
1250
|
+
R(t.$slots, "after")
|
|
984
1251
|
]));
|
|
985
1252
|
}
|
|
986
|
-
},
|
|
1253
|
+
}, Fn = { class: "mwnf-partner-list" }, In = {
|
|
987
1254
|
key: 0,
|
|
988
1255
|
class: "mwnf-partner-list__title"
|
|
989
|
-
},
|
|
1256
|
+
}, Ln = {
|
|
990
1257
|
key: 1,
|
|
991
1258
|
class: "mwnf-partner-list__count"
|
|
992
|
-
},
|
|
1259
|
+
}, Rn = {
|
|
993
1260
|
key: 2,
|
|
994
1261
|
class: "mwnf-partner-list__toggle"
|
|
995
|
-
},
|
|
1262
|
+
}, zn = {
|
|
996
1263
|
key: 3,
|
|
997
1264
|
class: "mwnf-partner-list__groups"
|
|
998
|
-
},
|
|
1265
|
+
}, Bn = {
|
|
999
1266
|
key: 0,
|
|
1000
1267
|
class: "mwnf-partner-list__group-title"
|
|
1001
|
-
},
|
|
1268
|
+
}, Vn = { class: "mwnf-partner-list__tier" }, Hn = { class: "mwnf-partner-list__row" }, Un = ["src", "alt"], Wn = ["innerHTML"], Gn = { key: 0 }, Kn = {
|
|
1002
1269
|
key: 1,
|
|
1003
1270
|
class: "mwnf-partner-list__meta"
|
|
1004
|
-
},
|
|
1271
|
+
}, qn = {
|
|
1005
1272
|
key: 0,
|
|
1006
1273
|
class: "mwnf-partner-list__children"
|
|
1007
|
-
},
|
|
1274
|
+
}, Jn = ["src", "alt"], Yn = ["innerHTML"], Xn = { key: 0 }, Zn = {
|
|
1008
1275
|
key: 1,
|
|
1009
1276
|
class: "mwnf-partner-list__meta"
|
|
1010
|
-
},
|
|
1277
|
+
}, Qn = {
|
|
1011
1278
|
key: 0,
|
|
1012
1279
|
class: "mwnf-partner-list__tier mwnf-partner-list__tier--associated"
|
|
1013
|
-
},
|
|
1280
|
+
}, $n = { class: "mwnf-partner-list__tier-label" }, er = ["src", "alt"], tr = ["innerHTML"], nr = { key: 0 }, rr = {
|
|
1014
1281
|
key: 1,
|
|
1015
1282
|
class: "mwnf-partner-list__meta"
|
|
1016
|
-
},
|
|
1283
|
+
}, ir = {
|
|
1017
1284
|
key: 4,
|
|
1018
1285
|
class: "mwnf-partner-list__empty"
|
|
1019
|
-
},
|
|
1286
|
+
}, ar = {
|
|
1020
1287
|
__name: "PartnerListView",
|
|
1021
1288
|
props: { spec: {
|
|
1022
1289
|
type: Object,
|
|
1023
1290
|
required: !0
|
|
1024
1291
|
} },
|
|
1025
|
-
setup(
|
|
1026
|
-
let
|
|
1027
|
-
|
|
1028
|
-
let
|
|
1029
|
-
t:
|
|
1030
|
-
locale:
|
|
1031
|
-
tr: (e) =>
|
|
1292
|
+
setup(t) {
|
|
1293
|
+
let n = t, { t: r, locale: i } = Te(), a = xe(), o = x(() => n.spec), s = x(() => o.value.entity ?? "partners"), c = oe(s.value);
|
|
1294
|
+
s.value && a.loadTranslations(s.value, "en");
|
|
1295
|
+
let l = {
|
|
1296
|
+
t: r,
|
|
1297
|
+
locale: i,
|
|
1298
|
+
tr: (e) => a.tr(s.value, e, i.value, "en"),
|
|
1032
1299
|
renderInline: $,
|
|
1033
|
-
renderPlain:
|
|
1034
|
-
}, { filters:
|
|
1300
|
+
renderPlain: ge
|
|
1301
|
+
}, { filters: u, apply: d } = Ee({
|
|
1035
1302
|
keys: ["order"],
|
|
1036
1303
|
page: !1
|
|
1037
|
-
}),
|
|
1038
|
-
function
|
|
1039
|
-
|
|
1304
|
+
}), f = x(() => u.order === "desc" ? "desc" : "asc");
|
|
1305
|
+
function p() {
|
|
1306
|
+
d({ order: f.value === "asc" ? "desc" : "asc" });
|
|
1040
1307
|
}
|
|
1041
|
-
let
|
|
1042
|
-
let e =
|
|
1043
|
-
return e.scope ? t.filter((t) => e.scope(t,
|
|
1044
|
-
}),
|
|
1308
|
+
let m = x(() => {
|
|
1309
|
+
let e = o.value, t = c.value ?? [];
|
|
1310
|
+
return e.scope ? t.filter((t) => e.scope(t, l)) : t;
|
|
1311
|
+
}), ee = x(() => o.value.route);
|
|
1045
1312
|
function h(e) {
|
|
1046
|
-
let t =
|
|
1047
|
-
return t ? typeof t == "function" ? t(e,
|
|
1313
|
+
let t = ee.value;
|
|
1314
|
+
return t ? typeof t == "function" ? t(e, l) : {
|
|
1048
1315
|
name: t,
|
|
1049
1316
|
params: { id: e.id }
|
|
1050
1317
|
} : null;
|
|
@@ -1059,39 +1326,39 @@ var Pe = { class: "mwnf-home" }, Fe = {
|
|
|
1059
1326
|
route: h(e)
|
|
1060
1327
|
};
|
|
1061
1328
|
}
|
|
1062
|
-
function
|
|
1063
|
-
return (
|
|
1329
|
+
function _(e) {
|
|
1330
|
+
return (o.value.record ?? g)(e, l);
|
|
1064
1331
|
}
|
|
1065
|
-
function
|
|
1332
|
+
function v(e) {
|
|
1066
1333
|
return String(e ?? "").replace(/<[^>]*>/g, "");
|
|
1067
1334
|
}
|
|
1068
|
-
let
|
|
1069
|
-
let e =
|
|
1335
|
+
let y = x(() => o.value.nested ? pe(m.value) : null), E = x(() => {
|
|
1336
|
+
let e = o.value, t = e.group?.tier ?? !1, n = (e.group?.order ?? "country") === "name", r = n ? m.value.map((e) => ({
|
|
1070
1337
|
...e,
|
|
1071
1338
|
country_id: "\0"
|
|
1072
|
-
})) :
|
|
1073
|
-
label: n ? () => "" : (t) => e.label ? e.label(t,
|
|
1339
|
+
})) : m.value, i = ce(r, {
|
|
1340
|
+
label: n ? () => "" : (t) => e.label ? e.label(t, l) : t,
|
|
1074
1341
|
tier: t,
|
|
1075
|
-
order:
|
|
1076
|
-
}),
|
|
1342
|
+
order: f.value
|
|
1343
|
+
}), a = (e, t) => v(e.row.name).localeCompare(v(t.row.name));
|
|
1077
1344
|
return i.map((t) => {
|
|
1078
1345
|
let r = t.main.map((e) => ({
|
|
1079
1346
|
partner: e,
|
|
1080
|
-
row:
|
|
1081
|
-
})).sort(
|
|
1347
|
+
row: _(e)
|
|
1348
|
+
})).sort(a), i = t.associated.map((e) => ({
|
|
1082
1349
|
partner: e,
|
|
1083
|
-
row:
|
|
1084
|
-
})).sort(
|
|
1085
|
-
if (n &&
|
|
1350
|
+
row: _(e)
|
|
1351
|
+
})).sort(a);
|
|
1352
|
+
if (n && f.value === "desc" && (r.reverse(), i.reverse()), e.nested && y.value) {
|
|
1086
1353
|
let e = new Set(i.map((e) => e.partner.id));
|
|
1087
1354
|
r = r.map((t) => {
|
|
1088
|
-
let n =
|
|
1355
|
+
let n = y.value.children(t.partner.id).filter((t) => e.has(t.id));
|
|
1089
1356
|
for (let t of n) e.delete(t.id);
|
|
1090
1357
|
return {
|
|
1091
1358
|
...t,
|
|
1092
1359
|
children: n.map((e) => ({
|
|
1093
1360
|
partner: e,
|
|
1094
|
-
row:
|
|
1361
|
+
row: _(e)
|
|
1095
1362
|
}))
|
|
1096
1363
|
};
|
|
1097
1364
|
}), i = i.filter((t) => e.has(t.partner.id));
|
|
@@ -1103,212 +1370,212 @@ var Pe = { class: "mwnf-home" }, Fe = {
|
|
|
1103
1370
|
associated: i
|
|
1104
1371
|
};
|
|
1105
1372
|
});
|
|
1106
|
-
}),
|
|
1107
|
-
t:
|
|
1108
|
-
locale:
|
|
1109
|
-
groups:
|
|
1110
|
-
orderDir:
|
|
1111
|
-
toggleOrder:
|
|
1373
|
+
}), D = x(() => E.value.some((e) => e.main.length > 0 || e.associated.length > 0)), O = x(() => r(o.value.associatedLabel ?? "partner.list.associated")), A = x(() => r(o.value.objectsLabel ?? "partner.item.objectsInSite")), M = x(() => r(o.value.foundLabel ?? "partner.list.partnersFound")), F = x(() => r(o.value.sortAscendingLabel ?? "partner.list.sortAscending")), I = x(() => r(o.value.sortDescendingLabel ?? "partner.list.sortDescending")), V = x(() => r(o.value.empty ?? "catalogue.results.noResults")), H = x(() => o.value.title ? r(o.value.title) : ""), U = x(() => E.value.reduce((e, t) => e + t.main.length + t.associated.length, 0)), te = x(() => o.value.variant ?? "accordion"), W = x(() => ({
|
|
1374
|
+
t: r,
|
|
1375
|
+
locale: i,
|
|
1376
|
+
groups: E.value,
|
|
1377
|
+
orderDir: f.value,
|
|
1378
|
+
toggleOrder: p
|
|
1112
1379
|
}));
|
|
1113
|
-
return (
|
|
1114
|
-
H.value ? (
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1380
|
+
return (t, n) => (P(), w("section", Fn, [
|
|
1381
|
+
H.value ? (P(), w("h1", In, B(H.value), 1)) : C("", !0),
|
|
1382
|
+
o.value.count ? (P(), w("div", Ln, B(M.value) + ": " + B(U.value), 1)) : C("", !0),
|
|
1383
|
+
R(t.$slots, "before", N(k(W.value))),
|
|
1384
|
+
o.value.orderToggle ? (P(), w("div", Rn, [T("button", {
|
|
1118
1385
|
type: "button",
|
|
1119
1386
|
class: "mwnf-partner-list__toggle-button",
|
|
1120
|
-
onClick:
|
|
1121
|
-
},
|
|
1122
|
-
|
|
1123
|
-
key:
|
|
1387
|
+
onClick: p
|
|
1388
|
+
}, B(f.value === "asc" ? I.value : F.value), 1)])) : C("", !0),
|
|
1389
|
+
D.value ? (P(), w("div", zn, [(P(!0), w(b, null, L(E.value, (n) => (P(), S(z(te.value === "accordion" ? "details" : "section"), j({
|
|
1390
|
+
key: n.country ?? "",
|
|
1124
1391
|
class: "mwnf-partner-list__group"
|
|
1125
1392
|
}, { ref_for: !0 }, te.value === "accordion" ? { open: !0 } : {}), {
|
|
1126
|
-
default:
|
|
1127
|
-
(
|
|
1128
|
-
default:
|
|
1393
|
+
default: K(() => [
|
|
1394
|
+
(P(), S(z(te.value === "accordion" ? "summary" : "div"), { class: "mwnf-partner-list__group-heading" }, {
|
|
1395
|
+
default: K(() => [R(t.$slots, "group-heading", j({ group: n }, { ref_for: !0 }, W.value), () => [n.label ? (P(), w("h2", Bn, B(n.label), 1)) : C("", !0)])]),
|
|
1129
1396
|
_: 2
|
|
1130
1397
|
}, 1024)),
|
|
1131
|
-
|
|
1132
|
-
key:
|
|
1398
|
+
T("div", Vn, [(P(!0), w(b, null, L(n.main, (r) => (P(), w("div", {
|
|
1399
|
+
key: r.partner.id,
|
|
1133
1400
|
class: "mwnf-partner-list__row-block"
|
|
1134
|
-
}, [
|
|
1135
|
-
group:
|
|
1136
|
-
partner:
|
|
1137
|
-
row:
|
|
1138
|
-
}, { ref_for: !0 },
|
|
1139
|
-
|
|
1401
|
+
}, [T("div", Hn, [R(t.$slots, "row", j({
|
|
1402
|
+
group: n,
|
|
1403
|
+
partner: r.partner,
|
|
1404
|
+
row: r.row
|
|
1405
|
+
}, { ref_for: !0 }, W.value), () => [
|
|
1406
|
+
r.row.logo ? (P(), w("img", {
|
|
1140
1407
|
key: 0,
|
|
1141
1408
|
class: "mwnf-partner-list__logo",
|
|
1142
|
-
src:
|
|
1143
|
-
alt:
|
|
1409
|
+
src: r.row.logo,
|
|
1410
|
+
alt: v(r.row.name),
|
|
1144
1411
|
loading: "lazy"
|
|
1145
|
-
}, null, 8,
|
|
1146
|
-
(
|
|
1412
|
+
}, null, 8, Un)) : C("", !0),
|
|
1413
|
+
(P(), S(z(r.row.route ? e : "span"), {
|
|
1147
1414
|
class: "mwnf-partner-list__name",
|
|
1148
|
-
to:
|
|
1415
|
+
to: r.row.route
|
|
1149
1416
|
}, {
|
|
1150
|
-
default:
|
|
1417
|
+
default: K(() => [T("span", { innerHTML: r.row.name }, null, 8, Wn), r.row.city ? (P(), w("span", Gn, ", " + B(r.row.city), 1)) : C("", !0)]),
|
|
1151
1418
|
_: 2
|
|
1152
1419
|
}, 1032, ["to"])),
|
|
1153
|
-
|
|
1154
|
-
])]),
|
|
1155
|
-
key:
|
|
1420
|
+
r.row.count ? (P(), w("span", Kn, B(r.row.count) + " " + B(A.value), 1)) : C("", !0)
|
|
1421
|
+
])]), r.children?.length ? (P(), w("div", qn, [(P(!0), w(b, null, L(r.children, (r) => (P(), w("div", {
|
|
1422
|
+
key: r.partner.id,
|
|
1156
1423
|
class: "mwnf-partner-list__row mwnf-partner-list__row--child"
|
|
1157
|
-
}, [
|
|
1158
|
-
group:
|
|
1159
|
-
partner:
|
|
1160
|
-
row:
|
|
1161
|
-
}, { ref_for: !0 },
|
|
1162
|
-
|
|
1424
|
+
}, [R(t.$slots, "row", j({
|
|
1425
|
+
group: n,
|
|
1426
|
+
partner: r.partner,
|
|
1427
|
+
row: r.row
|
|
1428
|
+
}, { ref_for: !0 }, W.value), () => [
|
|
1429
|
+
r.row.logo ? (P(), w("img", {
|
|
1163
1430
|
key: 0,
|
|
1164
1431
|
class: "mwnf-partner-list__logo",
|
|
1165
|
-
src:
|
|
1166
|
-
alt:
|
|
1432
|
+
src: r.row.logo,
|
|
1433
|
+
alt: v(r.row.name),
|
|
1167
1434
|
loading: "lazy"
|
|
1168
|
-
}, null, 8,
|
|
1169
|
-
(
|
|
1435
|
+
}, null, 8, Jn)) : C("", !0),
|
|
1436
|
+
(P(), S(z(r.row.route ? e : "span"), {
|
|
1170
1437
|
class: "mwnf-partner-list__name",
|
|
1171
|
-
to:
|
|
1438
|
+
to: r.row.route
|
|
1172
1439
|
}, {
|
|
1173
|
-
default:
|
|
1440
|
+
default: K(() => [T("span", { innerHTML: r.row.name }, null, 8, Yn), r.row.city ? (P(), w("span", Xn, ", " + B(r.row.city), 1)) : C("", !0)]),
|
|
1174
1441
|
_: 2
|
|
1175
1442
|
}, 1032, ["to"])),
|
|
1176
|
-
|
|
1177
|
-
])]))), 128))])) :
|
|
1178
|
-
|
|
1179
|
-
key:
|
|
1443
|
+
r.row.count ? (P(), w("span", Zn, B(r.row.count) + " " + B(A.value), 1)) : C("", !0)
|
|
1444
|
+
])]))), 128))])) : C("", !0)]))), 128))]),
|
|
1445
|
+
n.associated.length ? (P(), w("div", Qn, [T("p", $n, B(O.value), 1), (P(!0), w(b, null, L(n.associated, (r) => (P(), w("div", {
|
|
1446
|
+
key: r.partner.id,
|
|
1180
1447
|
class: "mwnf-partner-list__row"
|
|
1181
|
-
}, [
|
|
1182
|
-
group:
|
|
1183
|
-
partner:
|
|
1184
|
-
row:
|
|
1185
|
-
}, { ref_for: !0 },
|
|
1186
|
-
|
|
1448
|
+
}, [R(t.$slots, "row", j({
|
|
1449
|
+
group: n,
|
|
1450
|
+
partner: r.partner,
|
|
1451
|
+
row: r.row
|
|
1452
|
+
}, { ref_for: !0 }, W.value), () => [
|
|
1453
|
+
r.row.logo ? (P(), w("img", {
|
|
1187
1454
|
key: 0,
|
|
1188
1455
|
class: "mwnf-partner-list__logo",
|
|
1189
|
-
src:
|
|
1190
|
-
alt:
|
|
1456
|
+
src: r.row.logo,
|
|
1457
|
+
alt: v(r.row.name),
|
|
1191
1458
|
loading: "lazy"
|
|
1192
|
-
}, null, 8,
|
|
1193
|
-
(
|
|
1459
|
+
}, null, 8, er)) : C("", !0),
|
|
1460
|
+
(P(), S(z(r.row.route ? e : "span"), {
|
|
1194
1461
|
class: "mwnf-partner-list__name",
|
|
1195
|
-
to:
|
|
1462
|
+
to: r.row.route
|
|
1196
1463
|
}, {
|
|
1197
|
-
default:
|
|
1464
|
+
default: K(() => [T("span", { innerHTML: r.row.name }, null, 8, tr), r.row.city ? (P(), w("span", nr, ", " + B(r.row.city), 1)) : C("", !0)]),
|
|
1198
1465
|
_: 2
|
|
1199
1466
|
}, 1032, ["to"])),
|
|
1200
|
-
|
|
1201
|
-
])]))), 128))])) :
|
|
1467
|
+
r.row.count ? (P(), w("span", rr, B(r.row.count) + " " + B(A.value), 1)) : C("", !0)
|
|
1468
|
+
])]))), 128))])) : C("", !0)
|
|
1202
1469
|
]),
|
|
1203
1470
|
_: 2
|
|
1204
|
-
}, 1040))), 128))])) : (
|
|
1205
|
-
|
|
1471
|
+
}, 1040))), 128))])) : (P(), w("p", ir, B(V.value), 1)),
|
|
1472
|
+
R(t.$slots, "after", N(k(W.value)))
|
|
1206
1473
|
]));
|
|
1207
1474
|
}
|
|
1208
|
-
},
|
|
1475
|
+
}, or = { class: "mwnf-text-page" }, sr = {
|
|
1209
1476
|
key: 0,
|
|
1210
1477
|
class: "mwnf-text-page__back"
|
|
1211
|
-
},
|
|
1478
|
+
}, cr = {
|
|
1212
1479
|
key: 1,
|
|
1213
1480
|
class: "mwnf-text-page__heading"
|
|
1214
|
-
},
|
|
1481
|
+
}, lr = { class: "mwnf-prose" }, ur = ["innerHTML"], dr = {
|
|
1215
1482
|
__name: "TextPageView",
|
|
1216
1483
|
props: { spec: {
|
|
1217
1484
|
type: Object,
|
|
1218
1485
|
required: !0
|
|
1219
1486
|
} },
|
|
1220
|
-
setup(
|
|
1221
|
-
let
|
|
1222
|
-
t:
|
|
1223
|
-
tr: (e, t) =>
|
|
1224
|
-
language:
|
|
1225
|
-
})),
|
|
1226
|
-
return (
|
|
1227
|
-
|
|
1228
|
-
to:
|
|
1229
|
-
href:
|
|
1487
|
+
setup(t) {
|
|
1488
|
+
let n = t, { t: r } = Te(), i = xe(), a = De(), o = x(() => n.spec.heading ? r(n.spec.heading) : ""), s = x(() => typeof n.spec.body == "string"), c = x(() => s.value ? n.spec.body : null), l = x(() => ({
|
|
1489
|
+
t: r,
|
|
1490
|
+
tr: (e, t) => i.tr(e, t, a.value, "en"),
|
|
1491
|
+
language: a.value
|
|
1492
|
+
})), u = x(() => s.value ? null : typeof n.spec.body == "function" ? ue(n.spec.body(l.value)) : null), d = x(() => n.spec.back === !1 ? null : n.spec.back === !0 ? r("core.action.back") : n.spec.back?.label ? r(n.spec.back.label) : null);
|
|
1493
|
+
return (t, r) => (P(), w("div", or, [
|
|
1494
|
+
d.value && (n.spec.back === !0 || n.spec.back?.to || n.spec.back?.href) ? (P(), w("div", sr, [O(e, {
|
|
1495
|
+
to: n.spec.back === !0 ? {} : n.spec.back?.to,
|
|
1496
|
+
href: n.spec.back === !0 ? "#" : n.spec.back?.href
|
|
1230
1497
|
}, {
|
|
1231
|
-
default:
|
|
1498
|
+
default: K(() => [D(" ← " + B(d.value), 1)]),
|
|
1232
1499
|
_: 1
|
|
1233
|
-
}, 8, ["to", "href"])])) :
|
|
1234
|
-
|
|
1235
|
-
|
|
1500
|
+
}, 8, ["to", "href"])])) : C("", !0),
|
|
1501
|
+
o.value ? (P(), w("h1", cr, B(o.value), 1)) : C("", !0),
|
|
1502
|
+
T("div", lr, [s.value ? (P(), S(V(J), {
|
|
1236
1503
|
key: 0,
|
|
1237
|
-
keypath:
|
|
1238
|
-
}, null, 8, ["keypath"])) :
|
|
1504
|
+
keypath: c.value
|
|
1505
|
+
}, null, 8, ["keypath"])) : u.value ? (P(), w("div", {
|
|
1239
1506
|
key: 1,
|
|
1240
|
-
innerHTML:
|
|
1241
|
-
}, null, 8,
|
|
1507
|
+
innerHTML: u.value
|
|
1508
|
+
}, null, 8, ur)) : C("", !0)])
|
|
1242
1509
|
]));
|
|
1243
1510
|
}
|
|
1244
|
-
},
|
|
1511
|
+
}, fr = { class: "mwnf-search-form__row-label" }, pr = ["onUpdate:modelValue"], mr = ["value"], hr = ["onUpdate:modelValue"], gr = ["value"], _r = ["onUpdate:modelValue", "placeholder"], vr = {
|
|
1245
1512
|
key: 0,
|
|
1246
1513
|
class: "mwnf-search-form__dates"
|
|
1247
|
-
},
|
|
1514
|
+
}, yr = {
|
|
1248
1515
|
key: 1,
|
|
1249
1516
|
class: "mwnf-facet"
|
|
1250
|
-
},
|
|
1517
|
+
}, br = { class: "mwnf-facet__label" }, xr = { value: "" }, Sr = ["value"], Cr = {
|
|
1251
1518
|
key: 0,
|
|
1252
1519
|
class: "mwnf-search-form__dates"
|
|
1253
|
-
},
|
|
1520
|
+
}, wr = { class: "mwnf-search-form__radio-choice" }, Tr = ["value"], Er = ["onUpdate:modelValue", "disabled"], Dr = ["onUpdate:modelValue"], Or = { class: "mwnf-facet__label" }, kr = {
|
|
1254
1521
|
key: 0,
|
|
1255
1522
|
class: "mwnf-search-form__how-to"
|
|
1256
|
-
},
|
|
1523
|
+
}, Ar = {
|
|
1257
1524
|
__name: "SearchFormView",
|
|
1258
1525
|
props: { spec: {
|
|
1259
1526
|
type: Object,
|
|
1260
1527
|
required: !0
|
|
1261
1528
|
} },
|
|
1262
|
-
setup(
|
|
1263
|
-
let
|
|
1264
|
-
let e =
|
|
1529
|
+
setup(t) {
|
|
1530
|
+
let n = t, { t: r } = Te(), i = Re(), a = x(() => n.spec), o = x(() => a.value.mode), l = x(() => a.value.entity ? oe(a.value.entity).value ?? [] : []), u = x(() => a.value.dates === "buckets"), d = x(() => {
|
|
1531
|
+
let e = a.value.dates;
|
|
1265
1532
|
if (!e || e === "buckets") return null;
|
|
1266
1533
|
let t = e.presets;
|
|
1267
|
-
return typeof t == "function" ? t() : t ??
|
|
1534
|
+
return typeof t == "function" ? t() : t ?? Y();
|
|
1268
1535
|
});
|
|
1269
|
-
function
|
|
1536
|
+
function f(e) {
|
|
1270
1537
|
return (e ?? []).map((e) => ({
|
|
1271
1538
|
value: e,
|
|
1272
1539
|
label: String(e)
|
|
1273
1540
|
}));
|
|
1274
1541
|
}
|
|
1275
|
-
let
|
|
1542
|
+
let p = x(() => u.value ? Ie(l.value, r) : []), m = x(() => u.value ? p.value : f(d.value?.from)), ee = x(() => u.value ? p.value : f(d.value?.to)), h = x(() => !!a.value.dates), g = I(""), _ = I(""), v = a.value.language ? Ne(a.value.language) : null, y = x(() => v?.languages.value ?? []), E = v?.language ?? I(""), j = x(() => Object.fromEntries((a.value.facets ?? []).filter((e) => !e.options && e.type !== "year").map((e) => [e.key, { field: e.field ?? e.key }]))), z = Se(l, j), H = x(() => {
|
|
1276
1543
|
let e = {};
|
|
1277
|
-
for (let t of
|
|
1544
|
+
for (let t of a.value.facets ?? []) e[t.key] = t.options ?? z.value[t.key] ?? [];
|
|
1278
1545
|
return e;
|
|
1279
|
-
}),
|
|
1546
|
+
}), G = [{
|
|
1280
1547
|
key: "AND",
|
|
1281
1548
|
label: "catalogue.search.and"
|
|
1282
1549
|
}, {
|
|
1283
1550
|
key: "OR",
|
|
1284
1551
|
label: "catalogue.search.or"
|
|
1285
|
-
}],
|
|
1552
|
+
}], J = [
|
|
1286
1553
|
"catalogue.search.keywordOne",
|
|
1287
1554
|
"catalogue.search.keywordTwo",
|
|
1288
1555
|
"catalogue.search.keywordThree"
|
|
1289
|
-
],
|
|
1556
|
+
], re = x(() => a.value.operators ?? G), ie = I(Array.from({ length: a.value.rows ?? 3 }, () => ({
|
|
1290
1557
|
keyword: "",
|
|
1291
|
-
field:
|
|
1292
|
-
cond: (
|
|
1558
|
+
field: a.value.fields?.[0]?.key ?? "",
|
|
1559
|
+
cond: (a.value.operators ?? G)[0].key
|
|
1293
1560
|
})));
|
|
1294
|
-
function
|
|
1295
|
-
return
|
|
1561
|
+
function X(e) {
|
|
1562
|
+
return J[e] ? r(J[e]) : "";
|
|
1296
1563
|
}
|
|
1297
|
-
let
|
|
1564
|
+
let ae = I(a.value.facets?.[0]?.key ?? ""), Z = F(Object.fromEntries((a.value.facets ?? []).map((e) => [e.key, ""]))), se = F(Object.fromEntries((a.value.extras ?? []).map((e) => [e.key, !1])));
|
|
1298
1565
|
function Q() {
|
|
1299
1566
|
let e = {};
|
|
1300
|
-
for (let t of
|
|
1567
|
+
for (let t of a.value.extras ?? []) se[t.key] && (e[t.key] = "1");
|
|
1301
1568
|
return e;
|
|
1302
1569
|
}
|
|
1303
1570
|
function ce(e) {
|
|
1304
|
-
return
|
|
1305
|
-
name:
|
|
1571
|
+
return i.push({
|
|
1572
|
+
name: a.value.target,
|
|
1306
1573
|
query: e
|
|
1307
1574
|
});
|
|
1308
1575
|
}
|
|
1309
1576
|
function le() {
|
|
1310
1577
|
let e = {};
|
|
1311
|
-
if (
|
|
1578
|
+
if (o.value === "rows") ie.value.forEach((t, n) => {
|
|
1312
1579
|
if (t.keyword) {
|
|
1313
1580
|
if (n === 0) e.q = t.keyword, t.field && (e.field = t.field);
|
|
1314
1581
|
else {
|
|
@@ -1316,9 +1583,9 @@ var Pe = { class: "mwnf-home" }, Fe = {
|
|
|
1316
1583
|
e[`q${r}`] = t.keyword, t.field && (e[`field${r}`] = t.field), e[`op${r}`] = t.cond;
|
|
1317
1584
|
}
|
|
1318
1585
|
}
|
|
1319
|
-
}), g.value && (e.from = String(g.value)),
|
|
1320
|
-
else if (
|
|
1321
|
-
let t =
|
|
1586
|
+
}), g.value && (e.from = String(g.value)), _.value && (e.to = String(_.value)), E.value && (e.lang = E.value);
|
|
1587
|
+
else if (o.value === "radio") {
|
|
1588
|
+
let t = ae.value, n = t ? Z[t] : "";
|
|
1322
1589
|
n && (e[t] = String(n));
|
|
1323
1590
|
}
|
|
1324
1591
|
return Object.assign(e, Q()), ce(e);
|
|
@@ -1332,147 +1599,147 @@ var Pe = { class: "mwnf-home" }, Fe = {
|
|
|
1332
1599
|
function de() {
|
|
1333
1600
|
return ce(Q());
|
|
1334
1601
|
}
|
|
1335
|
-
let
|
|
1336
|
-
mode:
|
|
1602
|
+
let fe = x(() => o.value === "facets" ? "immediate" : "apply"), pe = x(() => o.value === "radio" ? "core.action.browse" : "core.action.search"), me = x(() => r(a.value.submitLabel ?? pe.value)), he = x(() => r(a.value.showAllLabel ?? "core.action.reset")), $ = x(() => ({
|
|
1603
|
+
mode: o.value,
|
|
1337
1604
|
submit: le,
|
|
1338
1605
|
showAll: de
|
|
1339
1606
|
}));
|
|
1340
|
-
return (
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1607
|
+
return (t, n) => (P(), w("section", { class: M(["mwnf-search-form", `mwnf-search-form--${o.value}`]) }, [
|
|
1608
|
+
R(t.$slots, "intro", N(k($.value))),
|
|
1609
|
+
R(t.$slots, "before", N(k($.value))),
|
|
1610
|
+
O(c, {
|
|
1344
1611
|
class: "mwnf-search-form__panel",
|
|
1345
|
-
mode:
|
|
1346
|
-
"apply-label":
|
|
1347
|
-
"reset-label":
|
|
1612
|
+
mode: fe.value,
|
|
1613
|
+
"apply-label": me.value,
|
|
1614
|
+
"reset-label": he.value,
|
|
1348
1615
|
onApply: le,
|
|
1349
1616
|
onReset: de
|
|
1350
1617
|
}, {
|
|
1351
|
-
default:
|
|
1352
|
-
|
|
1353
|
-
(
|
|
1618
|
+
default: K(() => [
|
|
1619
|
+
o.value === "rows" ? (P(), w(b, { key: 0 }, [
|
|
1620
|
+
(P(!0), w(b, null, L(ie.value, (e, t) => (P(), w("div", {
|
|
1354
1621
|
key: t,
|
|
1355
1622
|
class: "mwnf-search-form__row"
|
|
1356
1623
|
}, [
|
|
1357
|
-
|
|
1358
|
-
t > 0 ?
|
|
1624
|
+
T("span", fr, B(X(t)), 1),
|
|
1625
|
+
t > 0 ? q((P(), w("select", {
|
|
1359
1626
|
key: 0,
|
|
1360
1627
|
"onUpdate:modelValue": (t) => e.cond = t,
|
|
1361
1628
|
class: "mwnf-facet__select mwnf-search-form__operator"
|
|
1362
|
-
}, [(
|
|
1629
|
+
}, [(P(!0), w(b, null, L(re.value, (e) => (P(), w("option", {
|
|
1363
1630
|
key: e.key,
|
|
1364
1631
|
value: e.key
|
|
1365
|
-
},
|
|
1366
|
-
|
|
1632
|
+
}, B(V(r)(e.label)), 9, mr))), 128))], 8, pr)), [[W, e.cond]]) : C("", !0),
|
|
1633
|
+
q(T("select", {
|
|
1367
1634
|
"onUpdate:modelValue": (t) => e.field = t,
|
|
1368
1635
|
class: "mwnf-facet__select mwnf-search-form__field"
|
|
1369
|
-
}, [(
|
|
1636
|
+
}, [(P(!0), w(b, null, L(a.value.fields ?? [], (e) => (P(), w("option", {
|
|
1370
1637
|
key: e.key,
|
|
1371
1638
|
value: e.key
|
|
1372
|
-
},
|
|
1373
|
-
|
|
1639
|
+
}, B(V(r)(e.label)), 9, gr))), 128))], 8, hr), [[W, e.field]]),
|
|
1640
|
+
q(T("input", {
|
|
1374
1641
|
"onUpdate:modelValue": (t) => e.keyword = t,
|
|
1375
1642
|
type: "text",
|
|
1376
1643
|
class: "mwnf-search-form__keyword",
|
|
1377
|
-
placeholder:
|
|
1378
|
-
}, null, 8,
|
|
1644
|
+
placeholder: V(r)("catalogue.search.keywordPlaceholder")
|
|
1645
|
+
}, null, 8, _r), [[ne, e.keyword]])
|
|
1379
1646
|
]))), 128)),
|
|
1380
|
-
h.value ? (
|
|
1647
|
+
h.value ? (P(), w("div", vr, [O(s, {
|
|
1381
1648
|
modelValue: g.value,
|
|
1382
|
-
"onUpdate:modelValue":
|
|
1383
|
-
label:
|
|
1384
|
-
options:
|
|
1649
|
+
"onUpdate:modelValue": n[0] ||= (e) => g.value = e,
|
|
1650
|
+
label: V(r)("catalogue.facet.dateFrom"),
|
|
1651
|
+
options: m.value,
|
|
1385
1652
|
"any-label": "—"
|
|
1386
1653
|
}, null, 8, [
|
|
1387
1654
|
"modelValue",
|
|
1388
1655
|
"label",
|
|
1389
1656
|
"options"
|
|
1390
|
-
]),
|
|
1391
|
-
modelValue:
|
|
1392
|
-
"onUpdate:modelValue":
|
|
1393
|
-
label:
|
|
1394
|
-
options:
|
|
1657
|
+
]), O(s, {
|
|
1658
|
+
modelValue: _.value,
|
|
1659
|
+
"onUpdate:modelValue": n[1] ||= (e) => _.value = e,
|
|
1660
|
+
label: V(r)("catalogue.facet.dateTo"),
|
|
1661
|
+
options: ee.value,
|
|
1395
1662
|
"any-label": "—"
|
|
1396
1663
|
}, null, 8, [
|
|
1397
1664
|
"modelValue",
|
|
1398
1665
|
"label",
|
|
1399
1666
|
"options"
|
|
1400
|
-
])])) :
|
|
1401
|
-
|
|
1402
|
-
"onUpdate:modelValue":
|
|
1667
|
+
])])) : C("", !0),
|
|
1668
|
+
a.value.language ? (P(), w("label", yr, [T("span", br, B(V(r)("catalogue.search.language")), 1), q(T("select", {
|
|
1669
|
+
"onUpdate:modelValue": n[2] ||= (e) => A(E) ? E.value = e : null,
|
|
1403
1670
|
class: "mwnf-facet__select mwnf-search-form__language"
|
|
1404
|
-
}, [
|
|
1671
|
+
}, [T("option", xr, B(V(r)("catalogue.search.anyLanguage")), 1), (P(!0), w(b, null, L(y.value, (e) => (P(), w("option", {
|
|
1405
1672
|
key: e,
|
|
1406
1673
|
value: e
|
|
1407
|
-
},
|
|
1408
|
-
], 64)) :
|
|
1674
|
+
}, B(e.toUpperCase()), 9, Sr))), 128))], 512), [[W, V(E)]])])) : C("", !0)
|
|
1675
|
+
], 64)) : o.value === "facets" ? (P(), w(b, { key: 1 }, [(P(!0), w(b, null, L(a.value.facets ?? [], (e) => (P(), S(s, {
|
|
1409
1676
|
key: e.key,
|
|
1410
|
-
label: e.label ?
|
|
1411
|
-
options:
|
|
1412
|
-
"model-value":
|
|
1677
|
+
label: e.label ? V(r)(e.label) : "",
|
|
1678
|
+
options: H.value[e.key] ?? [],
|
|
1679
|
+
"model-value": Z[e.key],
|
|
1413
1680
|
"onUpdate:modelValue": (t) => ue(e.key, t)
|
|
1414
1681
|
}, null, 8, [
|
|
1415
1682
|
"label",
|
|
1416
1683
|
"options",
|
|
1417
1684
|
"model-value",
|
|
1418
1685
|
"onUpdate:modelValue"
|
|
1419
|
-
]))), 128)), h.value ? (
|
|
1686
|
+
]))), 128)), h.value ? (P(), w("div", Cr, [O(s, {
|
|
1420
1687
|
"model-value": g.value,
|
|
1421
|
-
label:
|
|
1422
|
-
options:
|
|
1423
|
-
"onUpdate:modelValue":
|
|
1688
|
+
label: V(r)("catalogue.facet.startDate"),
|
|
1689
|
+
options: m.value,
|
|
1690
|
+
"onUpdate:modelValue": n[3] ||= (e) => {
|
|
1424
1691
|
g.value = e, ue("from", e);
|
|
1425
1692
|
}
|
|
1426
1693
|
}, null, 8, [
|
|
1427
1694
|
"model-value",
|
|
1428
1695
|
"label",
|
|
1429
1696
|
"options"
|
|
1430
|
-
]),
|
|
1431
|
-
"model-value":
|
|
1432
|
-
label:
|
|
1433
|
-
options:
|
|
1434
|
-
"onUpdate:modelValue":
|
|
1435
|
-
|
|
1697
|
+
]), O(s, {
|
|
1698
|
+
"model-value": _.value,
|
|
1699
|
+
label: V(r)("catalogue.facet.endDate"),
|
|
1700
|
+
options: ee.value,
|
|
1701
|
+
"onUpdate:modelValue": n[4] ||= (e) => {
|
|
1702
|
+
_.value = e, ue("to", e);
|
|
1436
1703
|
}
|
|
1437
1704
|
}, null, 8, [
|
|
1438
1705
|
"model-value",
|
|
1439
1706
|
"label",
|
|
1440
1707
|
"options"
|
|
1441
|
-
])])) :
|
|
1708
|
+
])])) : C("", !0)], 64)) : o.value === "radio" ? (P(!0), w(b, { key: 2 }, L(a.value.facets ?? [], (e) => (P(), w("div", {
|
|
1442
1709
|
key: e.key,
|
|
1443
1710
|
class: "mwnf-search-form__radio-row"
|
|
1444
|
-
}, [
|
|
1445
|
-
"onUpdate:modelValue":
|
|
1711
|
+
}, [T("label", wr, [q(T("input", {
|
|
1712
|
+
"onUpdate:modelValue": n[5] ||= (e) => ae.value = e,
|
|
1446
1713
|
type: "radio",
|
|
1447
1714
|
name: "mwnf-search-form-filter",
|
|
1448
1715
|
value: e.key
|
|
1449
|
-
}, null, 8,
|
|
1716
|
+
}, null, 8, Tr), [[te, ae.value]]), D(" " + B(e.label ? V(r)(e.label) : ""), 1)]), e.type === "year" ? q((P(), w("input", {
|
|
1450
1717
|
key: 1,
|
|
1451
|
-
"onUpdate:modelValue": (t) =>
|
|
1718
|
+
"onUpdate:modelValue": (t) => Z[e.key] = t,
|
|
1452
1719
|
type: "number",
|
|
1453
1720
|
class: "mwnf-search-form__year",
|
|
1454
|
-
disabled:
|
|
1455
|
-
}, null, 8,
|
|
1721
|
+
disabled: ae.value !== e.key
|
|
1722
|
+
}, null, 8, Er)), [[ne, Z[e.key]]]) : (P(), S(s, {
|
|
1456
1723
|
key: 0,
|
|
1457
|
-
modelValue:
|
|
1458
|
-
"onUpdate:modelValue": (t) =>
|
|
1459
|
-
options:
|
|
1460
|
-
disabled:
|
|
1724
|
+
modelValue: Z[e.key],
|
|
1725
|
+
"onUpdate:modelValue": (t) => Z[e.key] = t,
|
|
1726
|
+
options: H.value[e.key] ?? [],
|
|
1727
|
+
disabled: ae.value !== e.key
|
|
1461
1728
|
}, null, 8, [
|
|
1462
1729
|
"modelValue",
|
|
1463
1730
|
"onUpdate:modelValue",
|
|
1464
1731
|
"options",
|
|
1465
1732
|
"disabled"
|
|
1466
|
-
]))]))), 128)) :
|
|
1467
|
-
(
|
|
1733
|
+
]))]))), 128)) : C("", !0),
|
|
1734
|
+
(P(!0), w(b, null, L(a.value.extras ?? [], (e) => (P(), w("label", {
|
|
1468
1735
|
key: e.key,
|
|
1469
1736
|
class: "mwnf-facet mwnf-facet--checkbox"
|
|
1470
|
-
}, [
|
|
1471
|
-
"onUpdate:modelValue": (t) =>
|
|
1737
|
+
}, [q(T("input", {
|
|
1738
|
+
"onUpdate:modelValue": (t) => se[e.key] = t,
|
|
1472
1739
|
type: "checkbox",
|
|
1473
1740
|
class: "mwnf-facet__checkbox"
|
|
1474
|
-
}, null, 8,
|
|
1475
|
-
|
|
1741
|
+
}, null, 8, Dr), [[U, se[e.key]]]), T("span", Or, B(V(r)(e.label)), 1)]))), 128)),
|
|
1742
|
+
R(t.$slots, "extras", N(k($.value)))
|
|
1476
1743
|
]),
|
|
1477
1744
|
_: 3
|
|
1478
1745
|
}, 8, [
|
|
@@ -1480,176 +1747,176 @@ var Pe = { class: "mwnf-home" }, Fe = {
|
|
|
1480
1747
|
"apply-label",
|
|
1481
1748
|
"reset-label"
|
|
1482
1749
|
]),
|
|
1483
|
-
|
|
1484
|
-
default:
|
|
1750
|
+
a.value.howTo ? (P(), w("p", kr, [O(e, { to: { name: a.value.howTo } }, {
|
|
1751
|
+
default: K(() => [D(B(V(r)("catalogue.search.howTo")), 1)]),
|
|
1485
1752
|
_: 1
|
|
1486
|
-
}, 8, ["to"])])) :
|
|
1487
|
-
|
|
1753
|
+
}, 8, ["to"])])) : C("", !0),
|
|
1754
|
+
R(t.$slots, "actions", N(k($.value)))
|
|
1488
1755
|
], 2));
|
|
1489
1756
|
}
|
|
1490
|
-
},
|
|
1757
|
+
}, jr = { class: "mwnf-timeline" }, Mr = {
|
|
1491
1758
|
key: 0,
|
|
1492
1759
|
class: "mwnf-timeline__title"
|
|
1493
|
-
},
|
|
1760
|
+
}, Nr = {
|
|
1494
1761
|
key: 3,
|
|
1495
1762
|
class: "mwnf-facet"
|
|
1496
|
-
},
|
|
1763
|
+
}, Pr = { class: "mwnf-facet__label" }, Fr = [
|
|
1497
1764
|
"value",
|
|
1498
1765
|
"placeholder",
|
|
1499
1766
|
"onInput"
|
|
1500
|
-
],
|
|
1767
|
+
], Ir = {
|
|
1501
1768
|
key: 1,
|
|
1502
1769
|
class: "mwnf-timeline__error"
|
|
1503
|
-
},
|
|
1770
|
+
}, Lr = {
|
|
1504
1771
|
__name: "TimelineResultsView",
|
|
1505
1772
|
props: { spec: {
|
|
1506
1773
|
type: Object,
|
|
1507
1774
|
required: !0
|
|
1508
1775
|
} },
|
|
1509
|
-
setup(
|
|
1510
|
-
let
|
|
1511
|
-
scope:
|
|
1512
|
-
countryLabel:
|
|
1513
|
-
countryIdForCode:
|
|
1514
|
-
tr:
|
|
1515
|
-
timelinesEntity:
|
|
1516
|
-
eventsEntity:
|
|
1517
|
-
}),
|
|
1518
|
-
t:
|
|
1519
|
-
tr:
|
|
1776
|
+
setup(n) {
|
|
1777
|
+
let r = n, { t: i } = Te(), a = Re(), o = x(() => r.spec), l = x(() => !!o.value.entrance), f = Fe({
|
|
1778
|
+
scope: r.spec.scope ?? "country",
|
|
1779
|
+
countryLabel: r.spec.countryLabel,
|
|
1780
|
+
countryIdForCode: r.spec.countryIdForCode,
|
|
1781
|
+
tr: r.spec.tr,
|
|
1782
|
+
timelinesEntity: r.spec.timelinesEntity,
|
|
1783
|
+
eventsEntity: r.spec.eventsEntity
|
|
1784
|
+
}), p = x(() => o.value.controls ?? []), m = x(() => o.value.keys ?? p.value.map((e) => e.key)), ee = (e) => p.value.some((t) => t.key === e), h = x(() => ({
|
|
1785
|
+
t: i,
|
|
1786
|
+
tr: r.spec.tr,
|
|
1520
1787
|
years: {
|
|
1521
|
-
min:
|
|
1522
|
-
max:
|
|
1788
|
+
min: z.value[0],
|
|
1789
|
+
max: z.value[1]
|
|
1523
1790
|
}
|
|
1524
|
-
})),
|
|
1525
|
-
function
|
|
1526
|
-
if (
|
|
1791
|
+
})), g = F(Object.fromEntries(m.value.map((e) => [e, ""]))), _ = I(""), v = l.value ? null : Ee({ keys: m.value }), y = l.value ? g : v.filters;
|
|
1792
|
+
function E(e) {
|
|
1793
|
+
if (ee("collection") && e !== "" && e != null) return e === "pc" ? null : e;
|
|
1527
1794
|
}
|
|
1528
|
-
function
|
|
1529
|
-
for (let e of
|
|
1530
|
-
|
|
1795
|
+
function A() {
|
|
1796
|
+
for (let e of m.value) g[e] = "";
|
|
1797
|
+
_.value = "";
|
|
1531
1798
|
}
|
|
1532
|
-
function
|
|
1533
|
-
|
|
1534
|
-
let e = !!
|
|
1535
|
-
if (e && Number(
|
|
1536
|
-
|
|
1799
|
+
function j() {
|
|
1800
|
+
_.value = "";
|
|
1801
|
+
let e = !!y.begin && !!y.end;
|
|
1802
|
+
if (e && Number(y.begin) >= Number(y.end)) {
|
|
1803
|
+
_.value = i(o.value.errorPeriod ?? "timeline.form.errorPeriod");
|
|
1537
1804
|
return;
|
|
1538
1805
|
}
|
|
1539
|
-
if (!
|
|
1540
|
-
|
|
1806
|
+
if (!y.country && !e) {
|
|
1807
|
+
_.value = i(o.value.errorSelect ?? "timeline.form.errorSelect");
|
|
1541
1808
|
return;
|
|
1542
1809
|
}
|
|
1543
1810
|
let t = {};
|
|
1544
|
-
for (let e of
|
|
1811
|
+
for (let e of m.value) y[e] && (t[e] = y[e]);
|
|
1545
1812
|
a.push({
|
|
1546
1813
|
name: o.value.route,
|
|
1547
1814
|
query: t
|
|
1548
1815
|
});
|
|
1549
1816
|
}
|
|
1550
|
-
let
|
|
1551
|
-
if (
|
|
1552
|
-
let e =
|
|
1553
|
-
return
|
|
1817
|
+
let M = x(() => {
|
|
1818
|
+
if (l.value) return [];
|
|
1819
|
+
let e = y;
|
|
1820
|
+
return f.findEvents({
|
|
1554
1821
|
country: e.country || void 0,
|
|
1555
|
-
collection:
|
|
1822
|
+
collection: E(e.collection),
|
|
1556
1823
|
begin: e.begin,
|
|
1557
1824
|
end: e.end
|
|
1558
1825
|
});
|
|
1559
|
-
}),
|
|
1560
|
-
let e =
|
|
1826
|
+
}), z = x(() => {
|
|
1827
|
+
let e = f.findEvents({
|
|
1561
1828
|
country: void 0,
|
|
1562
1829
|
collection: void 0
|
|
1563
1830
|
}).map((e) => e.year_from).filter((e) => Number.isFinite(e) && e !== 0);
|
|
1564
1831
|
return e.length ? [Math.min(...e), Math.max(...e)] : [null, null];
|
|
1565
|
-
}), H =
|
|
1566
|
-
page: () =>
|
|
1832
|
+
}), H = Oe(M, {
|
|
1833
|
+
page: () => v ? v.page.value : 1,
|
|
1567
1834
|
size: () => o.value.pageSize ?? 15
|
|
1568
1835
|
});
|
|
1569
1836
|
function U(e) {
|
|
1570
1837
|
let t = o.value.countryLabel && e.country_id ? o.value.countryLabel(e.country_id) : "";
|
|
1571
1838
|
return {
|
|
1572
1839
|
id: e.id,
|
|
1573
|
-
date:
|
|
1840
|
+
date: Z(e, e.text, i),
|
|
1574
1841
|
caption: t ? $(String(t)) : "",
|
|
1575
|
-
description: e.text?.description ?
|
|
1842
|
+
description: e.text?.description ? he(String(e.text.description), { breaks: !0 }) : ""
|
|
1576
1843
|
};
|
|
1577
1844
|
}
|
|
1578
|
-
let te =
|
|
1845
|
+
let te = x(() => H.value.rows.map((e) => (o.value.event ?? U)(e, h.value))), W = x(() => (f.countries.value ?? []).map((e) => ({
|
|
1579
1846
|
value: e.value,
|
|
1580
|
-
label: e.value === "all" ?
|
|
1581
|
-
}))), ne =
|
|
1847
|
+
label: e.value === "all" ? i("timeline.form.allCountries") : e.label
|
|
1848
|
+
}))), ne = x(() => o.value.collections?.(h.value) ?? []), G = x(() => {
|
|
1582
1849
|
let e = {};
|
|
1583
|
-
for (let t of
|
|
1850
|
+
for (let t of p.value) (t.key === "begin" || t.key === "end") && t.options && (typeof t.options == "function" ? e[t.key] = t.options(h.value) : e[t.key] = t.options);
|
|
1584
1851
|
return e;
|
|
1585
|
-
}),
|
|
1586
|
-
filters:
|
|
1587
|
-
active:
|
|
1588
|
-
apply:
|
|
1589
|
-
reset:
|
|
1590
|
-
goToPage:
|
|
1591
|
-
events:
|
|
1852
|
+
}), q = x(() => ({
|
|
1853
|
+
filters: y,
|
|
1854
|
+
active: m.value.some((e) => y[e]),
|
|
1855
|
+
apply: l.value ? j : (e) => v.apply(e),
|
|
1856
|
+
reset: l.value ? A : v.reset,
|
|
1857
|
+
goToPage: l.value ? () => {} : v.goToPage,
|
|
1858
|
+
events: M.value,
|
|
1592
1859
|
pageInfo: H.value,
|
|
1593
|
-
countries:
|
|
1860
|
+
countries: W.value,
|
|
1594
1861
|
collections: ne.value,
|
|
1595
|
-
t:
|
|
1862
|
+
t: i,
|
|
1596
1863
|
tr: o.value.tr
|
|
1597
|
-
})),
|
|
1864
|
+
})), J = x(() => {
|
|
1598
1865
|
let e = o.value.gallery;
|
|
1599
|
-
return !e ||
|
|
1600
|
-
}),
|
|
1601
|
-
let e =
|
|
1866
|
+
return !e || l.value ? null : !e.items || e.items(q.value);
|
|
1867
|
+
}), re = x(() => {
|
|
1868
|
+
let e = J.value;
|
|
1602
1869
|
return e == null ? !1 : Array.isArray(e) ? e.length > 0 : !!e;
|
|
1603
|
-
}),
|
|
1604
|
-
let e =
|
|
1870
|
+
}), ie = x(() => {
|
|
1871
|
+
let e = J.value;
|
|
1605
1872
|
return Array.isArray(e) ? e.length : typeof e == "number" ? e : null;
|
|
1606
|
-
}),
|
|
1607
|
-
if (!
|
|
1873
|
+
}), Y = x(() => {
|
|
1874
|
+
if (!re.value) return null;
|
|
1608
1875
|
let e = {};
|
|
1609
|
-
for (let t of
|
|
1876
|
+
for (let t of m.value) y[t] && (e[t] = y[t]);
|
|
1610
1877
|
return {
|
|
1611
1878
|
to: {
|
|
1612
1879
|
name: o.value.gallery.route,
|
|
1613
1880
|
query: e
|
|
1614
1881
|
},
|
|
1615
|
-
count:
|
|
1616
|
-
label:
|
|
1882
|
+
count: ie.value,
|
|
1883
|
+
label: i(o.value.gallery.label ?? "timeline.nav.seeGallery")
|
|
1617
1884
|
};
|
|
1618
|
-
}),
|
|
1619
|
-
...
|
|
1620
|
-
gallery:
|
|
1621
|
-
})),
|
|
1622
|
-
label:
|
|
1885
|
+
}), X = x(() => ({
|
|
1886
|
+
...q.value,
|
|
1887
|
+
gallery: Y.value
|
|
1888
|
+
})), ae = x(() => o.value.summary ? o.value.summary(X.value) : [{
|
|
1889
|
+
label: i(o.value.summaryLabel ?? "timeline.results.eventsFound"),
|
|
1623
1890
|
count: H.value.total
|
|
1624
|
-
}]),
|
|
1891
|
+
}]), oe = x(() => i(o.value.empty ?? "timeline.results.noResults")), se = x(() => ({
|
|
1625
1892
|
window: 5,
|
|
1626
1893
|
jump: !1,
|
|
1627
1894
|
ends: !0,
|
|
1628
1895
|
...o.value.pagination ?? {}
|
|
1629
1896
|
}));
|
|
1630
1897
|
function Q(e, t) {
|
|
1631
|
-
return e.label ?
|
|
1898
|
+
return e.label ? i(e.label) : t ? i(t) : "";
|
|
1632
1899
|
}
|
|
1633
|
-
return (
|
|
1634
|
-
|
|
1635
|
-
o.value.title ? (
|
|
1636
|
-
|
|
1900
|
+
return (n, r) => (P(), w("section", jr, [
|
|
1901
|
+
R(n.$slots, "before", N(k(X.value))),
|
|
1902
|
+
o.value.title ? (P(), w("h1", Mr, B(V(i)(o.value.title)), 1)) : C("", !0),
|
|
1903
|
+
O(c, {
|
|
1637
1904
|
class: "mwnf-timeline__filters",
|
|
1638
|
-
title: o.value.filterTitle ?
|
|
1639
|
-
"apply-label":
|
|
1640
|
-
"reset-label": o.value.resetLabel ?
|
|
1641
|
-
onApply:
|
|
1642
|
-
onReset:
|
|
1905
|
+
title: o.value.filterTitle ? V(i)(o.value.filterTitle) : "",
|
|
1906
|
+
"apply-label": l.value ? V(i)(o.value.submitLabel ?? "core.action.search") : o.value.applyLabel ? V(i)(o.value.applyLabel) : "",
|
|
1907
|
+
"reset-label": o.value.resetLabel ? V(i)(o.value.resetLabel) : "",
|
|
1908
|
+
onApply: r[2] ||= (e) => l.value ? j() : V(v).apply(),
|
|
1909
|
+
onReset: r[3] ||= (e) => l.value ? A() : V(v).reset()
|
|
1643
1910
|
}, {
|
|
1644
|
-
default:
|
|
1911
|
+
default: K(() => [(P(!0), w(b, null, L(p.value, (e) => (P(), w(b, { key: e.key }, [e.key === "country" ? (P(), S(s, {
|
|
1645
1912
|
key: 0,
|
|
1646
|
-
"model-value":
|
|
1913
|
+
"model-value": V(y).country,
|
|
1647
1914
|
label: Q(e, "catalogue.facet.country"),
|
|
1648
|
-
options:
|
|
1649
|
-
placeholder: e.placeholder ?
|
|
1650
|
-
"any-label": e.anyLabel ?
|
|
1915
|
+
options: W.value,
|
|
1916
|
+
placeholder: e.placeholder ? V(i)(e.placeholder) : V(i)("timeline.form.selectCountry"),
|
|
1917
|
+
"any-label": e.anyLabel ? V(i)(e.anyLabel) : "",
|
|
1651
1918
|
"hide-empty": !!e.hideEmpty,
|
|
1652
|
-
"onUpdate:modelValue":
|
|
1919
|
+
"onUpdate:modelValue": r[0] ||= (e) => V(y).country = e
|
|
1653
1920
|
}, null, 8, [
|
|
1654
1921
|
"model-value",
|
|
1655
1922
|
"label",
|
|
@@ -1657,15 +1924,15 @@ var Pe = { class: "mwnf-home" }, Fe = {
|
|
|
1657
1924
|
"placeholder",
|
|
1658
1925
|
"any-label",
|
|
1659
1926
|
"hide-empty"
|
|
1660
|
-
])) : e.key === "collection" ? (
|
|
1927
|
+
])) : e.key === "collection" ? (P(), S(s, {
|
|
1661
1928
|
key: 1,
|
|
1662
|
-
"model-value":
|
|
1929
|
+
"model-value": V(y).collection,
|
|
1663
1930
|
label: Q(e),
|
|
1664
1931
|
options: ne.value,
|
|
1665
|
-
placeholder: e.placeholder ?
|
|
1666
|
-
"any-label": e.anyLabel ?
|
|
1932
|
+
placeholder: e.placeholder ? V(i)(e.placeholder) : "",
|
|
1933
|
+
"any-label": e.anyLabel ? V(i)(e.anyLabel) : "",
|
|
1667
1934
|
"hide-empty": !!e.hideEmpty,
|
|
1668
|
-
"onUpdate:modelValue":
|
|
1935
|
+
"onUpdate:modelValue": r[1] ||= (e) => V(y).collection = e
|
|
1669
1936
|
}, null, 8, [
|
|
1670
1937
|
"model-value",
|
|
1671
1938
|
"label",
|
|
@@ -1673,15 +1940,15 @@ var Pe = { class: "mwnf-home" }, Fe = {
|
|
|
1673
1940
|
"placeholder",
|
|
1674
1941
|
"any-label",
|
|
1675
1942
|
"hide-empty"
|
|
1676
|
-
])) : (e.key === "begin" || e.key === "end") &&
|
|
1943
|
+
])) : (e.key === "begin" || e.key === "end") && G.value[e.key] ? (P(), S(s, {
|
|
1677
1944
|
key: 2,
|
|
1678
|
-
"model-value":
|
|
1945
|
+
"model-value": V(y)[e.key],
|
|
1679
1946
|
label: Q(e, e.key === "begin" ? "timeline.form.startDate" : "timeline.form.endDate"),
|
|
1680
|
-
options:
|
|
1681
|
-
placeholder: e.placeholder ?
|
|
1682
|
-
"any-label": e.anyLabel ?
|
|
1947
|
+
options: G.value[e.key],
|
|
1948
|
+
placeholder: e.placeholder ? V(i)(e.placeholder) : V(i)(e.key === "begin" ? "timeline.form.fromYearHint" : "timeline.form.toYearHint"),
|
|
1949
|
+
"any-label": e.anyLabel ? V(i)(e.anyLabel) : "",
|
|
1683
1950
|
"hide-empty": !!e.hideEmpty,
|
|
1684
|
-
"onUpdate:modelValue": (t) =>
|
|
1951
|
+
"onUpdate:modelValue": (t) => V(y)[e.key] = t
|
|
1685
1952
|
}, null, 8, [
|
|
1686
1953
|
"model-value",
|
|
1687
1954
|
"label",
|
|
@@ -1690,40 +1957,40 @@ var Pe = { class: "mwnf-home" }, Fe = {
|
|
|
1690
1957
|
"any-label",
|
|
1691
1958
|
"hide-empty",
|
|
1692
1959
|
"onUpdate:modelValue"
|
|
1693
|
-
])) : (
|
|
1960
|
+
])) : (P(), w("label", Nr, [T("span", Pr, B(Q(e, e.key === "begin" ? "timeline.form.startDate" : "timeline.form.endDate")), 1), T("input", {
|
|
1694
1961
|
type: "number",
|
|
1695
1962
|
class: "mwnf-facet__select",
|
|
1696
|
-
value:
|
|
1697
|
-
placeholder: e.placeholder ?
|
|
1698
|
-
onInput: (t) =>
|
|
1699
|
-
}, null, 40,
|
|
1963
|
+
value: V(y)[e.key],
|
|
1964
|
+
placeholder: e.placeholder ? V(i)(e.placeholder) : V(i)(e.key === "begin" ? "timeline.form.fromYearHint" : "timeline.form.toYearHint"),
|
|
1965
|
+
onInput: (t) => V(y)[e.key] = t.target.value
|
|
1966
|
+
}, null, 40, Fr)]))], 64))), 128))]),
|
|
1700
1967
|
_: 1
|
|
1701
1968
|
}, 8, [
|
|
1702
1969
|
"title",
|
|
1703
1970
|
"apply-label",
|
|
1704
1971
|
"reset-label"
|
|
1705
1972
|
]),
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1973
|
+
l.value && _.value ? (P(), w("p", Ir, B(_.value), 1)) : C("", !0),
|
|
1974
|
+
l.value ? C("", !0) : (P(), w(b, { key: 2 }, [
|
|
1975
|
+
R(n.$slots, "summary", N(k(X.value)), () => [O(u, { parts: ae.value }, null, 8, ["parts"])]),
|
|
1976
|
+
Y.value ? (P(), S(e, {
|
|
1710
1977
|
key: 0,
|
|
1711
1978
|
class: "mwnf-timeline__gallery",
|
|
1712
|
-
to:
|
|
1979
|
+
to: Y.value.to
|
|
1713
1980
|
}, {
|
|
1714
|
-
default:
|
|
1981
|
+
default: K(() => [R(n.$slots, "cross-link", N(k(X.value)), () => [D(B(Y.value.label), 1), Y.value.count == null ? C("", !0) : (P(), w(b, { key: 0 }, [D(" (" + B(Y.value.count) + ")", 1)], 64))])]),
|
|
1715
1982
|
_: 3
|
|
1716
|
-
}, 8, ["to"])) :
|
|
1717
|
-
|
|
1718
|
-
empty:
|
|
1983
|
+
}, 8, ["to"])) : C("", !0),
|
|
1984
|
+
R(n.$slots, "event", N(k(X.value)), () => [O(d, { events: te.value }, {
|
|
1985
|
+
empty: K(() => [R(n.$slots, "empty", N(k(X.value)), () => [D(B(oe.value), 1)])]),
|
|
1719
1986
|
_: 3
|
|
1720
1987
|
}, 8, ["events"])]),
|
|
1721
|
-
|
|
1722
|
-
"page-info":
|
|
1723
|
-
window:
|
|
1724
|
-
jump:
|
|
1725
|
-
ends:
|
|
1726
|
-
onNavigate:
|
|
1988
|
+
O(t, {
|
|
1989
|
+
"page-info": V(H),
|
|
1990
|
+
window: se.value.window,
|
|
1991
|
+
jump: se.value.jump,
|
|
1992
|
+
ends: se.value.ends,
|
|
1993
|
+
onNavigate: V(v).goToPage
|
|
1727
1994
|
}, null, 8, [
|
|
1728
1995
|
"page-info",
|
|
1729
1996
|
"window",
|
|
@@ -1732,9 +1999,9 @@ var Pe = { class: "mwnf-home" }, Fe = {
|
|
|
1732
1999
|
"onNavigate"
|
|
1733
2000
|
])
|
|
1734
2001
|
], 64)),
|
|
1735
|
-
|
|
2002
|
+
R(n.$slots, "after", N(k(X.value)))
|
|
1736
2003
|
]));
|
|
1737
2004
|
}
|
|
1738
2005
|
};
|
|
1739
2006
|
//#endregion
|
|
1740
|
-
export {
|
|
2007
|
+
export { rt as CatalogueResultsView, wn as EssayView, He as HomeView, Pn as LinkListView, ar as PartnerListView, Jt as RecordSheetView, ut as RecordView, Ar as SearchFormView, dr as TextPageView, Lr as TimelineResultsView };
|