@museumwnf/viewer-layout 3.59.0 → 3.60.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/dist/{FeaturedRecord-CTqnQFox.js → FeaturedRecord-DLYyyRey.js} +2 -3
- package/dist/{GlossaryPopover-B7E6BsjS.js → GlossaryPopover-DbQKXhx9.js} +1 -2
- package/dist/ItemDetailView-D5T3QXYJ.js +303 -0
- package/dist/{OnDisplayIn-DZHRKjL0.js → OnDisplayIn-CCM5Ahxy.js} +10 -5
- package/dist/{PageShell-CcaLOuXI.js → PageShell-CPtgzcxv.js} +1 -2
- package/dist/{PartnerMap-BIKd-AGP.js → PartnerMap-BuQo_FLl.js} +1 -2
- package/dist/{RecordView-DEKHp1A3.js → RecordView-n7bbQUg2.js} +14 -17
- package/dist/{SiteShell-CYQxXosD.js → SiteShell-qvsZO4Iz.js} +3 -4
- package/dist/{Theme-Co1bf81Z.js → Theme-0bsA_Abx.js} +29 -30
- package/dist/{TimelineEventList-CTJJOWGh.js → TimelineEventList-e1fNm28F.js} +3 -4
- package/dist/{TimelineResultsView-D15BMWZM.js → TimelineResultsView-Cl_LcM--.js} +264 -255
- package/dist/{chrome-DNsZQXrL.js → chrome-Bv_mLlHM.js} +1 -2
- package/dist/components.js +1 -2
- package/dist/{content-PQeMx8U5.js → content-BzSJircQ.js} +3 -4
- package/dist/content.js +6 -6
- package/dist/{data-CXRsGwLQ.js → data-EKYeMQcC.js} +16 -11
- package/dist/{data-BINc9QjV.js → data-kqAkoQvf.js} +2 -3
- package/dist/dxa.js +898 -673
- package/dist/index.js +8 -8
- package/dist/minisite.js +14 -26
- package/dist/standalone.js +209 -217
- package/dist/{themeSpecs-DP9xWiVJ.js → themeSpecs-CsDpl4rR.js} +2 -3
- package/dist/viewer-layout.css +1 -1
- package/dist/views.js +5 -6
- package/package.json +10 -10
- package/src/dxa/testing.js +71 -42
- package/src/styles/dxa-gallery.css +19 -1
- package/src/tokens.reference.css +11 -1
- package/dist/ItemDetailView-Bbn-uNaR.js +0 -304
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { d as e, i as t, l as n, n as r, u as i } from "./PartnerMap-
|
|
2
|
-
import { a, i as o, n as s, o as c, r as l, t as u } from "./TimelineEventList-
|
|
3
|
-
import { t as d } from "./GlossaryPopover-
|
|
4
|
-
import { Fragment as f, computed as p, createBlock as m, createCommentVNode as h, createElementBlock as g, createElementVNode as _, createSlots as v, createTextVNode as y, createVNode as b, guardReactiveProps as x, isRef as S, mergeProps as C, normalizeClass as ee, normalizeProps as w, openBlock as T, reactive as E, ref as D, renderList as O, renderSlot as k, resolveDynamicComponent as te, toDisplayString as A, unref as j, useSlots as M, vModelCheckbox as N, vModelRadio as P, vModelSelect as F, vModelText as ne, watch as
|
|
5
|
-
import { I18nText as
|
|
1
|
+
import { d as e, i as t, l as n, n as r, u as i } from "./PartnerMap-BuQo_FLl.js";
|
|
2
|
+
import { a, i as o, n as s, o as c, r as l, t as u } from "./TimelineEventList-e1fNm28F.js";
|
|
3
|
+
import { t as d } from "./GlossaryPopover-DbQKXhx9.js";
|
|
4
|
+
import { Fragment as f, computed as p, createBlock as m, createCommentVNode as h, createElementBlock as g, createElementVNode as _, createSlots as v, createTextVNode as y, createVNode as b, guardReactiveProps as x, isRef as S, mergeProps as C, normalizeClass as ee, normalizeProps as w, openBlock as T, reactive as E, ref as D, renderList as O, renderSlot as k, resolveDynamicComponent as te, toDisplayString as A, unref as j, useSlots as M, vModelCheckbox as N, vModelRadio as P, vModelSelect as F, vModelText as ne, watch as re, withCtx as I, withDirectives as L } from "vue";
|
|
5
|
+
import { I18nText as R, NotFoundView as z, byId as B, centuryPresets as V, dateRange as H, entityRef as ie, eventDateLabel as U, glossaryEntries as W, glossaryTermsForText as G, groupByCountry as K, md as q, mdInline as ae, partnerHierarchy as J, partnerView as Y, renderBlock as oe, renderInline as se, renderPlain as X, sortChronological as Z, useCollectionTree as ce, useDataPackage as le, useFacets as ue, useGlossaryPopup as Q, useI18n as de, useListQuery as fe, useLocale as pe, usePagination as me, useRecordLanguage as he, useSearchLanguage as ge, useTimelineEvents as _e, yearBuckets as ve } from "@museumwnf/viewer-core";
|
|
6
6
|
import { useRouter as ye } from "vue-router";
|
|
7
|
-
|
|
7
|
+
// src/views/CatalogueResultsView.vue
|
|
8
8
|
var be = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "mwnf-catalogue__title"
|
|
@@ -50,33 +50,33 @@ var be = {
|
|
|
50
50
|
}
|
|
51
51
|
},
|
|
52
52
|
setup(e) {
|
|
53
|
-
let t = e, { t: r, locale: s } = de(), u =
|
|
53
|
+
let t = e, { t: r, locale: s } = de(), u = le(), d = t.spec.entity ?? t.entity, S = p(() => t.spec), C = ie(d);
|
|
54
54
|
d && u.loadTranslations(d, "en");
|
|
55
55
|
let E = p(() => S.value.keys ?? [...Object.keys(S.value.facets ?? {}), ...D()]);
|
|
56
56
|
function D() {
|
|
57
57
|
let e = S.value.dates;
|
|
58
58
|
return e ? [e.begin ?? "begin", e.end ?? "end"] : [];
|
|
59
59
|
}
|
|
60
|
-
let { filters: M, page: N, active: P, apply: F, reset: ne, goToPage:
|
|
60
|
+
let { filters: M, page: N, active: P, apply: F, reset: ne, goToPage: re } = fe({ keys: E.value }), L = {
|
|
61
61
|
t: r,
|
|
62
62
|
locale: s,
|
|
63
63
|
tr: (e, t) => u.tr(e, t, s.value, "en"),
|
|
64
|
-
renderInline:
|
|
64
|
+
renderInline: se,
|
|
65
65
|
renderPlain: X
|
|
66
66
|
};
|
|
67
|
-
function
|
|
67
|
+
function R(e, t) {
|
|
68
68
|
if (typeof t.values == "function") return [t.values(e)].flat();
|
|
69
69
|
let n = e?.[t.field];
|
|
70
70
|
return Array.isArray(n) ? n : [n];
|
|
71
71
|
}
|
|
72
|
-
let
|
|
72
|
+
let z = p(() => {
|
|
73
73
|
let e = S.value, t = C.value ?? [];
|
|
74
|
-
e.scope && (t = t.filter((t) => e.scope(t, M,
|
|
74
|
+
e.scope && (t = t.filter((t) => e.scope(t, M, L)));
|
|
75
75
|
for (let [n, r] of Object.entries(e.facets ?? {})) {
|
|
76
76
|
let e = M[n];
|
|
77
|
-
e && (t = t.filter((t) =>
|
|
77
|
+
e && (t = t.filter((t) => R(t, r).map(String).includes(String(e))));
|
|
78
78
|
}
|
|
79
|
-
e.match && (t = t.filter((t) => e.match(t, M,
|
|
79
|
+
e.match && (t = t.filter((t) => e.match(t, M, L))), e.narrow && (t = e.narrow(t, M, L)), e.dates && (t = H(t, {
|
|
80
80
|
begin: M[e.dates.begin ?? "begin"],
|
|
81
81
|
end: M[e.dates.end ?? "end"],
|
|
82
82
|
mode: e.dates.mode ?? "overlap",
|
|
@@ -84,80 +84,80 @@ var be = {
|
|
|
84
84
|
}));
|
|
85
85
|
let n = e.sort ?? "chronological";
|
|
86
86
|
return typeof n == "function" ? n(t) : n === "chronological" ? Z(t) : n && typeof n == "object" ? Z(t, n) : t;
|
|
87
|
-
}),
|
|
87
|
+
}), B = p(() => S.value.facetScope === "matching" ? z.value : C.value ?? []), V = ue(B, () => S.value.facets ?? {}), U = me(z, {
|
|
88
88
|
page: N,
|
|
89
89
|
size: () => S.value.pageSize ?? 20
|
|
90
|
-
}),
|
|
91
|
-
function
|
|
92
|
-
let t =
|
|
90
|
+
}), W = p(() => S.value.recordRoute ?? (t.entity ? `${t.entity}-detail` : "item"));
|
|
91
|
+
function G(e) {
|
|
92
|
+
let t = L.tr(d, e.id).name ?? e.internal_name ?? e.id;
|
|
93
93
|
return {
|
|
94
94
|
id: e.id,
|
|
95
95
|
image: e.images?.[0]?.url ?? "",
|
|
96
96
|
imageAlt: X(String(t)),
|
|
97
|
-
name:
|
|
97
|
+
name: se(String(t)),
|
|
98
98
|
meta: [],
|
|
99
99
|
badge: e.type ?? "",
|
|
100
100
|
to: {
|
|
101
|
-
name:
|
|
101
|
+
name: W.value,
|
|
102
102
|
params: { id: e.id }
|
|
103
103
|
}
|
|
104
104
|
};
|
|
105
105
|
}
|
|
106
|
-
let
|
|
106
|
+
let K = p(() => U.value.rows.map((e) => (S.value.record ?? G)(e, L))), q = p(() => ({
|
|
107
107
|
filters: M,
|
|
108
108
|
active: P.value,
|
|
109
109
|
apply: F,
|
|
110
110
|
reset: ne,
|
|
111
|
-
goToPage:
|
|
112
|
-
matching:
|
|
111
|
+
goToPage: re,
|
|
112
|
+
matching: z.value,
|
|
113
113
|
pageInfo: U.value,
|
|
114
|
-
options:
|
|
115
|
-
})),
|
|
114
|
+
options: V.value
|
|
115
|
+
})), ae = p(() => {
|
|
116
116
|
let e = S.value;
|
|
117
117
|
return e.summary ? e.summary({
|
|
118
|
-
...
|
|
118
|
+
...q.value,
|
|
119
119
|
t: r,
|
|
120
120
|
total: (C.value ?? []).length
|
|
121
121
|
}) : [{
|
|
122
122
|
label: r(e.summaryLabel ?? "catalogue.results.itemsFound"),
|
|
123
123
|
count: U.value.total
|
|
124
124
|
}];
|
|
125
|
-
}),
|
|
125
|
+
}), J = p(() => S.value.filterMode ?? "apply"), Y = p(() => S.value.controls ?? []), oe = p(() => Y.value.length > 0 || !!S.value.panel);
|
|
126
126
|
function ce(e, t) {
|
|
127
|
-
|
|
127
|
+
J.value === "immediate" ? F({ [e]: t }) : M[e] = t;
|
|
128
128
|
}
|
|
129
|
-
let
|
|
129
|
+
let Q = p(() => r(S.value.empty ?? "catalogue.results.noResultsFilter")), pe = p(() => S.value.variant === "grid"), he = p(() => ({
|
|
130
130
|
window: 5,
|
|
131
131
|
jump: !1,
|
|
132
132
|
ends: !0,
|
|
133
133
|
...S.value.pagination ?? {}
|
|
134
134
|
}));
|
|
135
135
|
return (e, t) => (T(), g("section", { class: ee(["mwnf-catalogue", { "mwnf-catalogue--boxed": S.value.boxed }]) }, [
|
|
136
|
-
k(e.$slots, "before", w(x(
|
|
136
|
+
k(e.$slots, "before", w(x(q.value))),
|
|
137
137
|
S.value.title ? (T(), g("h1", be, A(j(r)(S.value.title)), 1)) : h("", !0),
|
|
138
|
-
|
|
138
|
+
oe.value || e.$slots.filters ? (T(), m(o, {
|
|
139
139
|
key: 1,
|
|
140
140
|
class: "mwnf-catalogue__filters",
|
|
141
|
-
mode:
|
|
141
|
+
mode: J.value,
|
|
142
142
|
title: S.value.filterTitle ? j(r)(S.value.filterTitle) : "",
|
|
143
143
|
"reset-label": S.value.resetLabel ? j(r)(S.value.resetLabel) : "",
|
|
144
144
|
onApply: t[2] ||= (e) => j(F)(),
|
|
145
145
|
onReset: t[3] ||= (e) => j(ne)()
|
|
146
146
|
}, {
|
|
147
|
-
default:
|
|
147
|
+
default: I(() => [(T(!0), g(f, null, O(Y.value, (e) => (T(), g(f, { key: e.key }, [e.type === "year" ? (T(), g("label", xe, [e.label ? (T(), g("span", Se, A(j(r)(e.label)), 1)) : h("", !0), _("input", {
|
|
148
148
|
type: "number",
|
|
149
149
|
class: "mwnf-facet__select",
|
|
150
150
|
value: j(M)[e.key],
|
|
151
151
|
placeholder: e.placeholder ? j(r)(e.placeholder) : "",
|
|
152
152
|
onInput: (t) => j(M)[e.key] = t.target.value,
|
|
153
|
-
onChange: t[0] ||= (e) =>
|
|
153
|
+
onChange: t[0] ||= (e) => J.value === "immediate" ? j(F)() : null
|
|
154
154
|
}, null, 40, Ce)])) : e.type === "query" ? (T(), g("label", we, [e.label ? (T(), g("span", Te, A(j(r)(e.label)), 1)) : h("", !0), _("input", {
|
|
155
155
|
type: "text",
|
|
156
156
|
class: "mwnf-facet__select",
|
|
157
157
|
value: j(M)[e.key],
|
|
158
158
|
placeholder: e.placeholder ? j(r)(e.placeholder) : "",
|
|
159
159
|
onInput: (t) => j(M)[e.key] = t.target.value,
|
|
160
|
-
onChange: t[1] ||= (e) =>
|
|
160
|
+
onChange: t[1] ||= (e) => J.value === "immediate" ? j(F)() : null
|
|
161
161
|
}, null, 40, Ee)])) : e.type === "checkbox" ? (T(), g("label", De, [_("input", {
|
|
162
162
|
type: "checkbox",
|
|
163
163
|
class: "mwnf-facet__checkbox",
|
|
@@ -167,7 +167,7 @@ var be = {
|
|
|
167
167
|
key: 3,
|
|
168
168
|
"model-value": j(M)[e.key],
|
|
169
169
|
label: e.label ? j(r)(e.label) : "",
|
|
170
|
-
options: j(
|
|
170
|
+
options: j(V)[e.key] ?? [],
|
|
171
171
|
placeholder: e.placeholder ? j(r)(e.placeholder) : "",
|
|
172
172
|
"any-label": e.anyLabel ? j(r)(e.anyLabel) : "",
|
|
173
173
|
"hide-empty": !!e.hideEmpty,
|
|
@@ -180,43 +180,43 @@ var be = {
|
|
|
180
180
|
"any-label",
|
|
181
181
|
"hide-empty",
|
|
182
182
|
"onUpdate:modelValue"
|
|
183
|
-
]))], 64))), 128)), k(e.$slots, "filters", w(x(
|
|
183
|
+
]))], 64))), 128)), k(e.$slots, "filters", w(x(q.value)))]),
|
|
184
184
|
_: 3
|
|
185
185
|
}, 8, [
|
|
186
186
|
"mode",
|
|
187
187
|
"title",
|
|
188
188
|
"reset-label"
|
|
189
189
|
])) : h("", !0),
|
|
190
|
-
b(l, { parts:
|
|
190
|
+
b(l, { parts: ae.value }, v({ _: 2 }, [e.$slots.actions ? {
|
|
191
191
|
name: "actions",
|
|
192
|
-
fn:
|
|
192
|
+
fn: I(() => [k(e.$slots, "actions", w(x(q.value)))]),
|
|
193
193
|
key: "0"
|
|
194
194
|
} : void 0]), 1032, ["parts"]),
|
|
195
195
|
_("div", Ae, [_("div", je, [k(e.$slots, "records", w(x({
|
|
196
|
-
...
|
|
197
|
-
rows:
|
|
198
|
-
empty:
|
|
196
|
+
...q.value,
|
|
197
|
+
rows: K.value,
|
|
198
|
+
empty: Q.value
|
|
199
199
|
})), () => [(T(), m(te(pe.value ? n : i), {
|
|
200
|
-
records:
|
|
200
|
+
records: K.value,
|
|
201
201
|
"action-label": S.value.actionLabel ? j(r)(S.value.actionLabel) : ""
|
|
202
202
|
}, {
|
|
203
|
-
empty:
|
|
203
|
+
empty: I(() => [k(e.$slots, "empty", w(x(q.value)), () => [y(A(Q.value), 1)])]),
|
|
204
204
|
_: 3
|
|
205
|
-
}, 8, ["records", "action-label"]))]), k(e.$slots, "pagination", w(x(
|
|
205
|
+
}, 8, ["records", "action-label"]))]), k(e.$slots, "pagination", w(x(q.value)), () => [e.$slots.pagination ? h("", !0) : (T(), m(c, {
|
|
206
206
|
key: 0,
|
|
207
207
|
"page-info": j(U),
|
|
208
208
|
window: he.value.window,
|
|
209
209
|
jump: he.value.jump,
|
|
210
210
|
ends: he.value.ends,
|
|
211
|
-
onNavigate: j(
|
|
211
|
+
onNavigate: j(re)
|
|
212
212
|
}, null, 8, [
|
|
213
213
|
"page-info",
|
|
214
214
|
"window",
|
|
215
215
|
"jump",
|
|
216
216
|
"ends",
|
|
217
217
|
"onNavigate"
|
|
218
|
-
]))])]), e.$slots.aside ? (T(), g("aside", Me, [k(e.$slots, "aside", w(x(
|
|
219
|
-
k(e.$slots, "after", w(x(
|
|
218
|
+
]))])]), e.$slots.aside ? (T(), g("aside", Me, [k(e.$slots, "aside", w(x(q.value)))])) : h("", !0)]),
|
|
219
|
+
k(e.$slots, "after", w(x(q.value)))
|
|
220
220
|
], 2));
|
|
221
221
|
}
|
|
222
222
|
}, Pe = ["dir"], Fe = {
|
|
@@ -268,7 +268,7 @@ var be = {
|
|
|
268
268
|
}
|
|
269
269
|
},
|
|
270
270
|
setup(i) {
|
|
271
|
-
let a = i, { t: o } = de(), s =
|
|
271
|
+
let a = i, { t: o } = de(), s = le(), c = M();
|
|
272
272
|
function l(e) {
|
|
273
273
|
return !!e && typeof e.walk == "function" && typeof e.children == "function";
|
|
274
274
|
}
|
|
@@ -285,46 +285,46 @@ var be = {
|
|
|
285
285
|
childType: S?.childType,
|
|
286
286
|
entity: C,
|
|
287
287
|
order: S?.order
|
|
288
|
-
}), te = ie(C), N = p(() => te.value !== null), P = p(() => a.spec), F = p(() => E.byId.value.get(a.id) ?? null), ne = p(() => E.parents(a.id).at(-1) ?? null),
|
|
288
|
+
}), te = ie(C), N = p(() => te.value !== null), P = p(() => a.spec), F = p(() => E.byId.value.get(a.id) ?? null), ne = p(() => E.parents(a.id).at(-1) ?? null), L = p(() => {
|
|
289
289
|
if (ne.value) return E.children(ne.value.id);
|
|
290
290
|
let e = E.root.value;
|
|
291
291
|
return e ? E.children(e.id) : E.walk().filter((e) => E.parents(e.id).length === 0);
|
|
292
|
-
}),
|
|
293
|
-
|
|
294
|
-
if (
|
|
295
|
-
|
|
292
|
+
}), R = p(() => L.value.findIndex((e) => e.id === a.id)), V = p(() => P.value.navigation || !1), H = p(() => V.value === "siblings" ? R.value > 0 ? L.value[R.value - 1] : null : V.value === "tree" ? E.previous(a.id) : null), U = p(() => V.value === "siblings" ? R.value !== -1 && R.value < L.value.length - 1 ? L.value[R.value + 1] : null : V.value === "tree" ? E.next(a.id) : null), { language: K, dir: q } = he(F, { entity: C }), ae = p(() => F.value ? s.tr(C, F.value.id, K.value, "en") : {}), J = D(!1);
|
|
293
|
+
re(() => [F.value?.id, K.value], async () => {
|
|
294
|
+
if (J.value = !1, !F.value) {
|
|
295
|
+
J.value = !0;
|
|
296
296
|
return;
|
|
297
297
|
}
|
|
298
|
-
let e =
|
|
299
|
-
await Promise.all([C, v].flatMap((t) => e.map((e) => s.loadTranslations(t, e)))),
|
|
298
|
+
let e = K.value === "en" ? ["en"] : [K.value, "en"];
|
|
299
|
+
await Promise.all([C, v].flatMap((t) => e.map((e) => s.loadTranslations(t, e)))), J.value = !0;
|
|
300
300
|
}, { immediate: !0 });
|
|
301
|
-
function
|
|
301
|
+
function Y(e) {
|
|
302
302
|
if (!e) return "";
|
|
303
|
-
let t = P.value.placeholder, n = (e) => !!e && !!t && t.test(e), r = s.tr(C, e.id,
|
|
303
|
+
let t = P.value.placeholder, n = (e) => !!e && !!t && t.test(e), r = s.tr(C, e.id, K.value, "en");
|
|
304
304
|
if (r.title && !n(r.title)) return r.title;
|
|
305
305
|
let i = s.tr(C, e.id, "en").title;
|
|
306
306
|
return i && !n(i) ? i : e.internal_name ?? e.id;
|
|
307
307
|
}
|
|
308
308
|
let Z = p(() => ({
|
|
309
309
|
node: F.value,
|
|
310
|
-
text:
|
|
311
|
-
language:
|
|
310
|
+
text: ae.value,
|
|
311
|
+
language: K.value,
|
|
312
312
|
tree: E,
|
|
313
313
|
select: dt,
|
|
314
314
|
t: o,
|
|
315
|
-
tr: (e, t) => s.tr(e, t,
|
|
315
|
+
tr: (e, t) => s.tr(e, t, K.value, "en")
|
|
316
316
|
}));
|
|
317
|
-
function
|
|
317
|
+
function ue(e, t) {
|
|
318
318
|
return t.split(".").reduce((e, t) => e?.[t], e);
|
|
319
319
|
}
|
|
320
320
|
function fe(e, t) {
|
|
321
|
-
return e === !1 || e == null ? "" : typeof e == "function" ? e(t) ?? "" :
|
|
321
|
+
return e === !1 || e == null ? "" : typeof e == "function" ? e(t) ?? "" : ue(t.text, e) ?? "";
|
|
322
322
|
}
|
|
323
323
|
let pe = p(() => fe(P.value.quote ?? "quote", Z.value)), me = p(() => fe(P.value.body ?? "description", Z.value)), ge = p(() => {
|
|
324
324
|
if (!P.value.glossary || !F.value) return [];
|
|
325
325
|
let e = [pe.value, me.value].filter(Boolean);
|
|
326
|
-
return
|
|
327
|
-
}), _e = p(() =>
|
|
326
|
+
return G(e.join("\n\n"), K.value);
|
|
327
|
+
}), _e = p(() => W(ge.value)), { active: ve, onClick: ye, close: be } = Q(ge), xe = p(() => ve.value ? oe(ve.value.definition, { breaks: !0 }) : ""), Se = p(() => F.value ? P.value.heading ? P.value.heading(Z.value) : se(String(Y(F.value)), { glossary: _e.value }) : ""), Ce = p(() => pe.value ? se(String(pe.value), { glossary: _e.value }) : ""), we = p(() => me.value ? oe(String(me.value), {
|
|
328
328
|
breaks: !0,
|
|
329
329
|
glossary: _e.value
|
|
330
330
|
}) : ""), Te = p(() => F.value ? P.value.about?.(F.value) ?? !1 : !1), Ee = p(() => !!Te.value);
|
|
@@ -355,17 +355,17 @@ var be = {
|
|
|
355
355
|
let Ae = p(() => {
|
|
356
356
|
let e = P.value.numbering;
|
|
357
357
|
if (!e || !F.value) return "";
|
|
358
|
-
let t = (
|
|
358
|
+
let t = (L.value.length ? L.value : [F.value]).findIndex((e) => e.id === a.id), n = t >= 0 ? t + 1 : 1;
|
|
359
359
|
return e === "roman" ? ke(n) : String(n);
|
|
360
360
|
});
|
|
361
361
|
function je(e) {
|
|
362
362
|
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) : [] : [];
|
|
363
363
|
}
|
|
364
|
-
let Me =
|
|
364
|
+
let Me = B(v), Ne = p(() => {
|
|
365
365
|
let e = P.value.items?.of ?? je;
|
|
366
366
|
return F.value ? e(F.value, Z.value) : [];
|
|
367
367
|
}), ct = p(() => Ne.value.map((e) => Me.value.get(e)).filter(Boolean)), lt = D(null);
|
|
368
|
-
|
|
368
|
+
re(ct, (e) => {
|
|
369
369
|
e.some((e) => e.id === lt.value) || (lt.value = e[0]?.id ?? null);
|
|
370
370
|
}, { immediate: !0 });
|
|
371
371
|
let ut = p(() => ct.value.find((e) => e.id === lt.value) ?? ct.value[0] ?? null);
|
|
@@ -388,9 +388,9 @@ var be = {
|
|
|
388
388
|
}
|
|
389
389
|
function mt(e) {
|
|
390
390
|
if (!e) return null;
|
|
391
|
-
let t = s.tr(v, e.id,
|
|
391
|
+
let t = s.tr(v, e.id, K.value, "en").name ?? e.internal_name ?? e.id;
|
|
392
392
|
return {
|
|
393
|
-
name:
|
|
393
|
+
name: se(String(t)),
|
|
394
394
|
image: e.images?.[0]?.url ?? "",
|
|
395
395
|
imageAlt: X(String(t))
|
|
396
396
|
};
|
|
@@ -421,7 +421,7 @@ var be = {
|
|
|
421
421
|
...e
|
|
422
422
|
}))];
|
|
423
423
|
}), vt = D(null);
|
|
424
|
-
|
|
424
|
+
re(_t, (e) => {
|
|
425
425
|
e.some((e) => e.id === vt.value) || (vt.value = e[0]?.id ?? null);
|
|
426
426
|
}, { immediate: !0 });
|
|
427
427
|
let yt = p(() => _t.value.find((e) => e.id === vt.value) ?? _t.value[0] ?? null);
|
|
@@ -445,7 +445,7 @@ var be = {
|
|
|
445
445
|
}));
|
|
446
446
|
}), wt = p(() => {
|
|
447
447
|
let e = yt.value?.caption?.justification;
|
|
448
|
-
return e ?
|
|
448
|
+
return e ? se(String(e)) : "";
|
|
449
449
|
}), Tt = p(() => ct.value.map((e) => {
|
|
450
450
|
let t = mt(e), n = P.value.items?.meta?.(e, Z.value) ?? [], r = P.value.items?.badge?.(e, Z.value) ?? "";
|
|
451
451
|
return {
|
|
@@ -459,7 +459,7 @@ var be = {
|
|
|
459
459
|
};
|
|
460
460
|
})), Et = p(() => P.value.breadcrumb && F.value ? E.parents(a.id) : []), Dt = p(() => {
|
|
461
461
|
let e = P.value.tabs;
|
|
462
|
-
return e ? e === "children" ? F.value ? E.children(F.value.id) : [] :
|
|
462
|
+
return e ? e === "children" ? F.value ? E.children(F.value.id) : [] : L.value : [];
|
|
463
463
|
}), Ot = p(() => P.value.previous ?? "core.pagination.previous"), kt = p(() => P.value.next ?? "core.pagination.next"), At = p(() => P.value.backTo ?? "record.action.backToResults"), jt = p(() => P.value.inThisTheme ?? "core.nav.inThisSection"), Mt = p(() => P.value.seeAll ?? "catalogue.results.seeDatabaseEntry"), $ = p(() => ({
|
|
464
464
|
...Z.value,
|
|
465
465
|
items: ct.value,
|
|
@@ -467,13 +467,13 @@ var be = {
|
|
|
467
467
|
selectedVariant: yt.value,
|
|
468
468
|
selectVariant: bt,
|
|
469
469
|
breadcrumb: Et.value,
|
|
470
|
-
previous:
|
|
470
|
+
previous: H.value,
|
|
471
471
|
next: U.value
|
|
472
|
-
})), Nt = p(() => Ee.value && !De("panel") ? !1 : gt.value || ct.value.length > 0 || !!c.aside), Pt = p(() => (!Ee.value || De("navigation")) && !!
|
|
473
|
-
return (a, s) => N.value && !F.value ? (T(), m(j(
|
|
472
|
+
})), Nt = p(() => Ee.value && !De("panel") ? !1 : gt.value || ct.value.length > 0 || !!c.aside), Pt = p(() => (!Ee.value || De("navigation")) && !!V.value && !!(H.value || U.value));
|
|
473
|
+
return (a, s) => N.value && !F.value ? (T(), m(j(z), { key: 0 })) : F.value ? (T(), g("article", {
|
|
474
474
|
key: 1,
|
|
475
475
|
class: ee(["mwnf-essay", { "mwnf-essay--about": Ee.value }]),
|
|
476
|
-
dir: j(
|
|
476
|
+
dir: j(q) || void 0,
|
|
477
477
|
onClick: s[0] ||= (...e) => j(ye) && j(ye)(...e)
|
|
478
478
|
}, [
|
|
479
479
|
k(a.$slots, "header", w(x($.value)), () => [
|
|
@@ -482,9 +482,9 @@ var be = {
|
|
|
482
482
|
to: pt(t),
|
|
483
483
|
class: "mwnf-essay__breadcrumb-link"
|
|
484
484
|
}, {
|
|
485
|
-
default:
|
|
485
|
+
default: I(() => [y(A(Y(t)), 1)]),
|
|
486
486
|
_: 2
|
|
487
|
-
}, 1032, ["to"])) : (T(), g("span", Le, A(
|
|
487
|
+
}, 1032, ["to"])) : (T(), g("span", Le, A(Y(t)), 1))], 64))), 128))])) : h("", !0),
|
|
488
488
|
Dt.value.length > 1 ? (T(), g("div", {
|
|
489
489
|
key: 1,
|
|
490
490
|
class: "mwnf-essay__tabs",
|
|
@@ -495,13 +495,13 @@ var be = {
|
|
|
495
495
|
to: pt(t),
|
|
496
496
|
class: ee(["mwnf-essay__tab", { "mwnf-essay__tab--active": t.id === i.id }])
|
|
497
497
|
}, {
|
|
498
|
-
default:
|
|
498
|
+
default: I(() => [y(A(Y(t)), 1)]),
|
|
499
499
|
_: 2
|
|
500
500
|
}, 1032, ["to", "class"]))), 128))], 8, Re)) : h("", !0),
|
|
501
501
|
_("h1", ze, [Ae.value ? (T(), g("span", Be, A(Ae.value), 1)) : h("", !0), _("span", { innerHTML: Se.value }, null, 8, Ve)])
|
|
502
502
|
]),
|
|
503
503
|
_("div", He, [_("div", Ue, [
|
|
504
|
-
|
|
504
|
+
J.value ? h("", !0) : (T(), g("p", We, A(j(o)("core.status.loading")), 1)),
|
|
505
505
|
Ce.value ? (T(), g("p", {
|
|
506
506
|
key: 1,
|
|
507
507
|
class: "mwnf-essay__quote",
|
|
@@ -515,19 +515,19 @@ var be = {
|
|
|
515
515
|
}, null, 8, Ke)) : h("", !0),
|
|
516
516
|
k(a.$slots, "after-body", w(x($.value))),
|
|
517
517
|
Ee.value ? h("", !0) : k(a.$slots, "justifications", w(x($.value)), void 0, void 0, 3),
|
|
518
|
-
Pt.value ? (T(), g("div", qe, [k(a.$slots, "navigation", w(x($.value)), () => [
|
|
518
|
+
Pt.value ? (T(), g("div", qe, [k(a.$slots, "navigation", w(x($.value)), () => [H.value ? (T(), m(e, {
|
|
519
519
|
key: 0,
|
|
520
|
-
to: pt(
|
|
520
|
+
to: pt(H.value),
|
|
521
521
|
class: "mwnf-essay__nav-link mwnf-essay__nav-link--previous"
|
|
522
522
|
}, {
|
|
523
|
-
default:
|
|
523
|
+
default: I(() => [y("← " + A(j(o)(Ot.value)), 1)]),
|
|
524
524
|
_: 1
|
|
525
525
|
}, 8, ["to"])) : (T(), g("span", Je)), U.value ? (T(), m(e, {
|
|
526
526
|
key: 2,
|
|
527
527
|
to: pt(U.value),
|
|
528
528
|
class: "mwnf-essay__nav-link mwnf-essay__nav-link--next"
|
|
529
529
|
}, {
|
|
530
|
-
default:
|
|
530
|
+
default: I(() => [y(A(j(o)(kt.value)) + " →", 1)]),
|
|
531
531
|
_: 1
|
|
532
532
|
}, 8, ["to"])) : h("", !0)])])) : h("", !0)
|
|
533
533
|
]), Nt.value ? (T(), g("div", Ye, [
|
|
@@ -562,7 +562,7 @@ var be = {
|
|
|
562
562
|
to: ft(ut.value),
|
|
563
563
|
class: "mwnf-essay__panel-link"
|
|
564
564
|
}, {
|
|
565
|
-
default:
|
|
565
|
+
default: I(() => [y(A(j(o)(Mt.value)) + " →", 1)]),
|
|
566
566
|
_: 1
|
|
567
567
|
}, 8, ["to"])) : h("", !0)
|
|
568
568
|
])) : h("", !0)]),
|
|
@@ -585,7 +585,7 @@ var be = {
|
|
|
585
585
|
b(d, {
|
|
586
586
|
term: j(ve),
|
|
587
587
|
html: xe.value,
|
|
588
|
-
dir: j(
|
|
588
|
+
dir: j(q),
|
|
589
589
|
onClose: j(be)
|
|
590
590
|
}, null, 8, [
|
|
591
591
|
"term",
|
|
@@ -626,7 +626,7 @@ var be = {
|
|
|
626
626
|
to: n.spec.back.to,
|
|
627
627
|
href: n.spec.back.href
|
|
628
628
|
}, {
|
|
629
|
-
default:
|
|
629
|
+
default: I(() => [y(" ← " + A(o.value), 1)]),
|
|
630
630
|
_: 1
|
|
631
631
|
}, 8, ["to", "href"])])) : h("", !0),
|
|
632
632
|
a.value ? (T(), g("h1", dt, A(a.value), 1)) : h("", !0),
|
|
@@ -642,12 +642,12 @@ var be = {
|
|
|
642
642
|
to: t.to,
|
|
643
643
|
href: t.href
|
|
644
644
|
}, {
|
|
645
|
-
default:
|
|
645
|
+
default: I(() => [_("span", { innerHTML: j(ae)(t.label) }, null, 8, ht)]),
|
|
646
646
|
_: 2
|
|
647
647
|
}, 1032, ["to", "href"]), t.note ? (T(), g("div", {
|
|
648
648
|
key: 0,
|
|
649
649
|
class: "mwnf-link-list__note",
|
|
650
|
-
innerHTML: j(
|
|
650
|
+
innerHTML: j(ae)(t.note)
|
|
651
651
|
}, null, 8, gt)) : h("", !0)]))), 128))])) : h("", !0)])]))), 128))])) : (T(), g("div", _t, A(s.value), 1)),
|
|
652
652
|
k(t.$slots, "after")
|
|
653
653
|
]));
|
|
@@ -683,13 +683,13 @@ var be = {
|
|
|
683
683
|
required: !0
|
|
684
684
|
} },
|
|
685
685
|
setup(e) {
|
|
686
|
-
let t = e, { t: n, locale: r } = de(), i =
|
|
686
|
+
let t = e, { t: n, locale: r } = de(), i = le(), a = p(() => t.spec), o = p(() => a.value.entity ?? "partners"), c = ie(o.value);
|
|
687
687
|
o.value && i.loadTranslations(o.value, "en");
|
|
688
688
|
let l = {
|
|
689
689
|
t: n,
|
|
690
690
|
locale: r,
|
|
691
691
|
tr: (e) => i.tr(o.value, e, r.value, "en"),
|
|
692
|
-
renderInline:
|
|
692
|
+
renderInline: se,
|
|
693
693
|
renderPlain: X
|
|
694
694
|
}, { filters: u, apply: d } = fe({
|
|
695
695
|
keys: ["order"],
|
|
@@ -711,7 +711,7 @@ var be = {
|
|
|
711
711
|
}
|
|
712
712
|
function D(e) {
|
|
713
713
|
let t = a.value.objectsRoute;
|
|
714
|
-
return
|
|
714
|
+
return Y(e, l.tr(e.id), {
|
|
715
715
|
route: E,
|
|
716
716
|
objectsRoute: t ? (e) => t(e, l) : null
|
|
717
717
|
});
|
|
@@ -719,7 +719,7 @@ var be = {
|
|
|
719
719
|
function j(e, t) {
|
|
720
720
|
let n = t.name ?? "";
|
|
721
721
|
return {
|
|
722
|
-
...
|
|
722
|
+
...Y(e, {}, {}),
|
|
723
723
|
name: n,
|
|
724
724
|
plainName: N(n),
|
|
725
725
|
city: t.city ?? "",
|
|
@@ -758,17 +758,17 @@ var be = {
|
|
|
758
758
|
function N(e) {
|
|
759
759
|
return String(e ?? "").replace(/<[^>]*>/g, "");
|
|
760
760
|
}
|
|
761
|
-
let P = p(() => a.value.nested ?
|
|
761
|
+
let P = p(() => a.value.nested ? J(S.value) : null), F = p(() => {
|
|
762
762
|
let e = a.value, t = e.group?.tier ?? !1, n = (e.group?.order ?? "country") === "name", r = n ? S.value.map((e) => ({
|
|
763
763
|
...e,
|
|
764
764
|
country_id: "\0"
|
|
765
|
-
})) : S.value, i =
|
|
765
|
+
})) : S.value, i = K(r, {
|
|
766
766
|
label: n ? () => "" : (t) => e.label ? e.label(t, l) : t,
|
|
767
767
|
tier: t,
|
|
768
768
|
order: v.value
|
|
769
|
-
}), o = (e, t) => N(e.row.name).localeCompare(N(t.row.name));
|
|
769
|
+
}), o = e.tiebreak ?? (() => ""), s = (e, t) => N(e.row.name).localeCompare(N(t.row.name)) || String(o(e.partner)).localeCompare(String(o(t.partner)));
|
|
770
770
|
return i.map((t) => {
|
|
771
|
-
let r = t.main.map(M).sort(
|
|
771
|
+
let r = t.main.map(M).sort(s), i = t.associated.map(M).sort(s);
|
|
772
772
|
if (n && v.value === "desc" && (r.reverse(), i.reverse()), e.nested && P.value) {
|
|
773
773
|
let e = new Set(i.map((e) => e.partner.id));
|
|
774
774
|
r = r.map((t) => {
|
|
@@ -787,11 +787,11 @@ var be = {
|
|
|
787
787
|
associated: i
|
|
788
788
|
};
|
|
789
789
|
});
|
|
790
|
-
}), ne = p(() => F.value.some((e) => e.main.length > 0 || e.associated.length > 0)),
|
|
790
|
+
}), ne = p(() => F.value.some((e) => e.main.length > 0 || e.associated.length > 0)), re = p(() => n(a.value.associatedLabel ?? "partner.list.associated")), L = p(() => ({
|
|
791
791
|
objectsLabel: a.value.objectsLabel ?? "partner.item.objectsInSite",
|
|
792
792
|
emptyLabel: a.value.emptyLabel ?? "",
|
|
793
793
|
show: { actions: !!a.value.actions }
|
|
794
|
-
})),
|
|
794
|
+
})), R = p(() => n(a.value.foundLabel ?? "partner.list.partnersFound")), z = p(() => n(a.value.sortAscendingLabel ?? "partner.list.sortAscending")), B = p(() => n(a.value.sortDescendingLabel ?? "partner.list.sortDescending")), V = p(() => n(a.value.empty ?? "catalogue.results.noResults")), H = p(() => a.value.title ? n(a.value.title) : ""), U = p(() => F.value.reduce((e, t) => e + t.main.length + t.associated.length, 0)), W = p(() => a.value.variant ?? "accordion"), G = p(() => ({
|
|
795
795
|
t: n,
|
|
796
796
|
locale: r,
|
|
797
797
|
groups: F.value,
|
|
@@ -799,21 +799,21 @@ var be = {
|
|
|
799
799
|
toggleOrder: y
|
|
800
800
|
}));
|
|
801
801
|
return (e, t) => (T(), g("section", yt, [
|
|
802
|
-
|
|
803
|
-
a.value.count ? (T(), g("div", xt, A(
|
|
804
|
-
k(e.$slots, "before", w(x(
|
|
802
|
+
H.value ? (T(), g("h1", bt, A(H.value), 1)) : h("", !0),
|
|
803
|
+
a.value.count ? (T(), g("div", xt, A(R.value) + ": " + A(U.value), 1)) : h("", !0),
|
|
804
|
+
k(e.$slots, "before", w(x(G.value))),
|
|
805
805
|
a.value.orderToggle ? (T(), g("div", St, [_("button", {
|
|
806
806
|
type: "button",
|
|
807
807
|
class: "mwnf-partner-list__toggle-button",
|
|
808
808
|
onClick: y
|
|
809
|
-
}, A(v.value === "asc" ?
|
|
810
|
-
ne.value ? (T(), g("div", Ct, [(T(!0), g(f, null, O(F.value, (t) => (T(), m(te(
|
|
809
|
+
}, A(v.value === "asc" ? B.value : z.value), 1)])) : h("", !0),
|
|
810
|
+
ne.value ? (T(), g("div", Ct, [(T(!0), g(f, null, O(F.value, (t) => (T(), m(te(W.value === "accordion" ? "details" : "section"), C({
|
|
811
811
|
key: t.country ?? "",
|
|
812
812
|
class: "mwnf-partner-list__group"
|
|
813
|
-
}, { ref_for: !0 },
|
|
814
|
-
default:
|
|
815
|
-
(T(), m(te(
|
|
816
|
-
default:
|
|
813
|
+
}, { ref_for: !0 }, W.value === "accordion" ? { open: !0 } : {}), {
|
|
814
|
+
default: I(() => [
|
|
815
|
+
(T(), m(te(W.value === "accordion" ? "summary" : "div"), { class: "mwnf-partner-list__group-heading" }, {
|
|
816
|
+
default: I(() => [k(e.$slots, "group-heading", C({ group: t }, { ref_for: !0 }, G.value), () => [t.label ? (T(), g("h2", wt, A(t.label), 1)) : h("", !0)])]),
|
|
817
817
|
_: 2
|
|
818
818
|
}, 1024)),
|
|
819
819
|
_("div", Tt, [(T(!0), g(f, null, O(t.main, (n) => (T(), g("div", {
|
|
@@ -824,10 +824,10 @@ var be = {
|
|
|
824
824
|
partner: n.partner,
|
|
825
825
|
row: n.row,
|
|
826
826
|
view: n.view
|
|
827
|
-
}, { ref_for: !0 },
|
|
827
|
+
}, { ref_for: !0 }, G.value), () => [b(s, C({
|
|
828
828
|
variant: "line",
|
|
829
829
|
partner: n.view
|
|
830
|
-
}, { ref_for: !0 },
|
|
830
|
+
}, { ref_for: !0 }, L.value), null, 16, ["partner"])])]), n.children?.length ? (T(), g("div", Dt, [(T(!0), g(f, null, O(n.children, (n) => (T(), g("div", {
|
|
831
831
|
key: n.partner.id,
|
|
832
832
|
class: "mwnf-partner-list__row mwnf-partner-list__row--child"
|
|
833
833
|
}, [k(e.$slots, "row", C({
|
|
@@ -835,11 +835,11 @@ var be = {
|
|
|
835
835
|
partner: n.partner,
|
|
836
836
|
row: n.row,
|
|
837
837
|
view: n.view
|
|
838
|
-
}, { ref_for: !0 },
|
|
838
|
+
}, { ref_for: !0 }, G.value), () => [b(s, C({
|
|
839
839
|
variant: "line",
|
|
840
840
|
partner: n.view
|
|
841
|
-
}, { ref_for: !0 },
|
|
842
|
-
t.associated.length ? (T(), g("div", Ot, [_("p", kt, A(
|
|
841
|
+
}, { ref_for: !0 }, L.value), null, 16, ["partner"])])]))), 128))])) : h("", !0)]))), 128))]),
|
|
842
|
+
t.associated.length ? (T(), g("div", Ot, [_("p", kt, A(re.value), 1), (T(!0), g(f, null, O(t.associated, (n) => (T(), g("div", {
|
|
843
843
|
key: n.partner.id,
|
|
844
844
|
class: "mwnf-partner-list__row"
|
|
845
845
|
}, [k(e.$slots, "row", C({
|
|
@@ -847,14 +847,14 @@ var be = {
|
|
|
847
847
|
partner: n.partner,
|
|
848
848
|
row: n.row,
|
|
849
849
|
view: n.view
|
|
850
|
-
}, { ref_for: !0 },
|
|
850
|
+
}, { ref_for: !0 }, G.value), () => [b(s, C({
|
|
851
851
|
variant: "line",
|
|
852
852
|
partner: n.view
|
|
853
|
-
}, { ref_for: !0 },
|
|
853
|
+
}, { ref_for: !0 }, L.value), null, 16, ["partner"])])]))), 128))])) : h("", !0)
|
|
854
854
|
]),
|
|
855
855
|
_: 2
|
|
856
|
-
}, 1040))), 128))])) : (T(), g("p", At, A(
|
|
857
|
-
k(e.$slots, "after", w(x(
|
|
856
|
+
}, 1040))), 128))])) : (T(), g("p", At, A(V.value), 1)),
|
|
857
|
+
k(e.$slots, "after", w(x(G.value)))
|
|
858
858
|
]));
|
|
859
859
|
}
|
|
860
860
|
}, Mt = { class: "mwnf-text-page" }, $ = {
|
|
@@ -870,21 +870,21 @@ var be = {
|
|
|
870
870
|
required: !0
|
|
871
871
|
} },
|
|
872
872
|
setup(t) {
|
|
873
|
-
let n = t, { t: r } = de(), i =
|
|
873
|
+
let n = t, { t: r } = de(), i = le(), a = pe(), o = p(() => n.spec.heading ? r(n.spec.heading) : ""), s = p(() => typeof n.spec.body == "string"), c = p(() => s.value ? n.spec.body : null), l = p(() => ({
|
|
874
874
|
t: r,
|
|
875
875
|
tr: (e, t) => i.tr(e, t, a.value, "en"),
|
|
876
876
|
language: a.value
|
|
877
|
-
})), u = p(() => s.value ? null : typeof n.spec.body == "function" ?
|
|
877
|
+
})), u = p(() => s.value ? null : typeof n.spec.body == "function" ? q(n.spec.body(l.value)) : null), d = p(() => n.spec.back === !1 ? null : n.spec.back === !0 ? r("core.action.back") : n.spec.back?.label ? r(n.spec.back.label) : null);
|
|
878
878
|
return (t, r) => (T(), g("div", Mt, [
|
|
879
879
|
d.value && (n.spec.back === !0 || n.spec.back?.to || n.spec.back?.href) ? (T(), g("div", $, [b(e, {
|
|
880
880
|
to: n.spec.back === !0 ? {} : n.spec.back?.to,
|
|
881
881
|
href: n.spec.back === !0 ? "#" : n.spec.back?.href
|
|
882
882
|
}, {
|
|
883
|
-
default:
|
|
883
|
+
default: I(() => [y(" ← " + A(d.value), 1)]),
|
|
884
884
|
_: 1
|
|
885
885
|
}, 8, ["to", "href"])])) : h("", !0),
|
|
886
886
|
o.value ? (T(), g("h1", Nt, A(o.value), 1)) : h("", !0),
|
|
887
|
-
_("div", Pt, [s.value ? (T(), m(j(
|
|
887
|
+
_("div", Pt, [s.value ? (T(), m(j(R), {
|
|
888
888
|
key: 0,
|
|
889
889
|
keypath: c.value
|
|
890
890
|
}, null, 8, ["keypath"])) : u.value ? (T(), g("div", {
|
|
@@ -916,7 +916,7 @@ var be = {
|
|
|
916
916
|
let e = s.value.dates;
|
|
917
917
|
if (!e || e === "buckets") return null;
|
|
918
918
|
let t = e.presets;
|
|
919
|
-
return typeof t == "function" ? t() : t ??
|
|
919
|
+
return typeof t == "function" ? t() : t ?? V();
|
|
920
920
|
});
|
|
921
921
|
function v(e) {
|
|
922
922
|
return (e ?? []).map((e) => ({
|
|
@@ -924,32 +924,32 @@ var be = {
|
|
|
924
924
|
label: String(e)
|
|
925
925
|
}));
|
|
926
926
|
}
|
|
927
|
-
let C = p(() => u.value ? ve(l.value,
|
|
927
|
+
let C = (e) => r(s.value.eraWords?.[e] ?? e), te = p(() => u.value ? ve(l.value, C) : []), M = p(() => u.value ? te.value : v(d.value?.from)), re = p(() => u.value ? te.value : v(d.value?.to)), R = p(() => !!s.value.dates), z = D(""), B = D(""), H = s.value.language ? ge(s.value.language) : null, U = p(() => H?.languages.value ?? []), W = H?.language ?? D(""), G = p(() => Object.fromEntries((s.value.facets ?? []).filter((e) => !e.options && e.type !== "year").map((e) => [e.key, { field: e.field ?? e.key }]))), K = ue(l, G), q = p(() => {
|
|
928
928
|
let e = {};
|
|
929
|
-
for (let t of s.value.facets ?? []) e[t.key] = t.options ??
|
|
929
|
+
for (let t of s.value.facets ?? []) e[t.key] = t.options ?? K.value[t.key] ?? [];
|
|
930
930
|
return e;
|
|
931
|
-
}),
|
|
931
|
+
}), ae = [{
|
|
932
932
|
key: "AND",
|
|
933
933
|
label: "catalogue.search.and"
|
|
934
934
|
}, {
|
|
935
935
|
key: "OR",
|
|
936
936
|
label: "catalogue.search.or"
|
|
937
|
-
}],
|
|
937
|
+
}], J = [
|
|
938
938
|
"catalogue.search.keywordOne",
|
|
939
939
|
"catalogue.search.keywordTwo",
|
|
940
940
|
"catalogue.search.keywordThree"
|
|
941
|
-
],
|
|
941
|
+
], Y = p(() => s.value.operators ?? ae), oe = D(Array.from({ length: s.value.rows ?? 3 }, () => ({
|
|
942
942
|
keyword: "",
|
|
943
943
|
field: s.value.fields?.[0]?.key ?? "",
|
|
944
|
-
cond: (s.value.operators ??
|
|
944
|
+
cond: (s.value.operators ?? ae)[0].key
|
|
945
945
|
})));
|
|
946
946
|
function se(e) {
|
|
947
|
-
return
|
|
947
|
+
return J[e] ? r(J[e]) : "";
|
|
948
948
|
}
|
|
949
|
-
let
|
|
950
|
-
function
|
|
949
|
+
let X = D(s.value.facets?.[0]?.key ?? ""), Z = E(Object.fromEntries((s.value.facets ?? []).map((e) => [e.key, ""]))), ce = E(Object.fromEntries((s.value.extras ?? []).map((e) => [e.key, !1])));
|
|
950
|
+
function le() {
|
|
951
951
|
let e = {};
|
|
952
|
-
for (let t of s.value.extras ?? [])
|
|
952
|
+
for (let t of s.value.extras ?? []) ce[t.key] && (e[t.key] = "1");
|
|
953
953
|
return e;
|
|
954
954
|
}
|
|
955
955
|
function Q(e) {
|
|
@@ -958,9 +958,9 @@ var be = {
|
|
|
958
958
|
query: e
|
|
959
959
|
});
|
|
960
960
|
}
|
|
961
|
-
function
|
|
961
|
+
function fe() {
|
|
962
962
|
let e = {};
|
|
963
|
-
if (c.value === "rows")
|
|
963
|
+
if (c.value === "rows") oe.value.forEach((t, n) => {
|
|
964
964
|
if (t.keyword) {
|
|
965
965
|
if (n === 0) e.q = t.keyword, t.field && (e.field = t.field);
|
|
966
966
|
else {
|
|
@@ -968,72 +968,72 @@ var be = {
|
|
|
968
968
|
e[`q${r}`] = t.keyword, t.field && (e[`field${r}`] = t.field), e[`op${r}`] = t.cond;
|
|
969
969
|
}
|
|
970
970
|
}
|
|
971
|
-
}), z.value && (e.from = String(z.value)), B.value && (e.to = String(B.value)),
|
|
971
|
+
}), z.value && (e.from = String(z.value)), B.value && (e.to = String(B.value)), W.value && (e.searchlanguage = W.value);
|
|
972
972
|
else if (c.value === "radio") {
|
|
973
|
-
let t =
|
|
973
|
+
let t = X.value, n = t ? Z[t] : "";
|
|
974
974
|
n && (e[t] = String(n));
|
|
975
975
|
}
|
|
976
|
-
return Object.assign(e,
|
|
976
|
+
return Object.assign(e, le()), Q(e);
|
|
977
977
|
}
|
|
978
|
-
function
|
|
978
|
+
function pe(e, t) {
|
|
979
979
|
if (t !== "" && t != null) return Q({
|
|
980
980
|
[e]: String(t),
|
|
981
|
-
...
|
|
981
|
+
...le()
|
|
982
982
|
});
|
|
983
983
|
}
|
|
984
|
-
function
|
|
985
|
-
return Q(
|
|
984
|
+
function me() {
|
|
985
|
+
return Q(le());
|
|
986
986
|
}
|
|
987
|
-
let
|
|
987
|
+
let he = p(() => c.value === "facets" ? "immediate" : "apply"), _e = p(() => c.value === "radio" ? "core.action.browse" : "core.action.search"), be = p(() => r(s.value.submitLabel ?? _e.value)), xe = p(() => r(s.value.showAllLabel ?? "core.action.reset")), Se = p(() => ({
|
|
988
988
|
mode: c.value,
|
|
989
|
-
submit:
|
|
990
|
-
showAll:
|
|
989
|
+
submit: fe,
|
|
990
|
+
showAll: me
|
|
991
991
|
}));
|
|
992
992
|
return (t, n) => (T(), g("section", { class: ee(["mwnf-search-form", `mwnf-search-form--${c.value}`]) }, [
|
|
993
|
-
k(t.$slots, "intro", w(x(
|
|
994
|
-
k(t.$slots, "before", w(x(
|
|
993
|
+
k(t.$slots, "intro", w(x(Se.value))),
|
|
994
|
+
k(t.$slots, "before", w(x(Se.value))),
|
|
995
995
|
b(o, {
|
|
996
996
|
class: "mwnf-search-form__panel",
|
|
997
|
-
mode:
|
|
998
|
-
"apply-label":
|
|
999
|
-
"reset-label":
|
|
1000
|
-
onApply:
|
|
1001
|
-
onReset:
|
|
997
|
+
mode: he.value,
|
|
998
|
+
"apply-label": be.value,
|
|
999
|
+
"reset-label": xe.value,
|
|
1000
|
+
onApply: fe,
|
|
1001
|
+
onReset: me
|
|
1002
1002
|
}, {
|
|
1003
|
-
default:
|
|
1003
|
+
default: I(() => [
|
|
1004
1004
|
c.value === "rows" ? (T(), g(f, { key: 0 }, [
|
|
1005
|
-
(T(!0), g(f, null, O(
|
|
1005
|
+
(T(!0), g(f, null, O(oe.value, (e, t) => (T(), g("div", {
|
|
1006
1006
|
key: t,
|
|
1007
1007
|
class: "mwnf-search-form__row"
|
|
1008
1008
|
}, [
|
|
1009
1009
|
_("span", Lt, A(se(t)), 1),
|
|
1010
|
-
t > 0 ?
|
|
1010
|
+
t > 0 ? L((T(), g("select", {
|
|
1011
1011
|
key: 0,
|
|
1012
1012
|
"onUpdate:modelValue": (t) => e.cond = t,
|
|
1013
1013
|
class: "mwnf-facet__select mwnf-search-form__operator"
|
|
1014
|
-
}, [(T(!0), g(f, null, O(
|
|
1014
|
+
}, [(T(!0), g(f, null, O(Y.value, (e) => (T(), g("option", {
|
|
1015
1015
|
key: e.key,
|
|
1016
1016
|
value: e.key
|
|
1017
1017
|
}, A(j(r)(e.label)), 9, zt))), 128))], 8, Rt)), [[F, e.cond]]) : h("", !0),
|
|
1018
|
-
|
|
1018
|
+
L(_("select", {
|
|
1019
1019
|
"onUpdate:modelValue": (t) => e.field = t,
|
|
1020
1020
|
class: "mwnf-facet__select mwnf-search-form__field"
|
|
1021
1021
|
}, [(T(!0), g(f, null, O(s.value.fields ?? [], (e) => (T(), g("option", {
|
|
1022
1022
|
key: e.key,
|
|
1023
1023
|
value: e.key
|
|
1024
1024
|
}, A(j(r)(e.label)), 9, Vt))), 128))], 8, Bt), [[F, e.field]]),
|
|
1025
|
-
|
|
1025
|
+
L(_("input", {
|
|
1026
1026
|
"onUpdate:modelValue": (t) => e.keyword = t,
|
|
1027
1027
|
type: "text",
|
|
1028
1028
|
class: "mwnf-search-form__keyword",
|
|
1029
1029
|
placeholder: j(r)("catalogue.search.keywordPlaceholder")
|
|
1030
1030
|
}, null, 8, Ht), [[ne, e.keyword]])
|
|
1031
1031
|
]))), 128)),
|
|
1032
|
-
|
|
1032
|
+
R.value ? (T(), g("div", Ut, [b(a, {
|
|
1033
1033
|
modelValue: z.value,
|
|
1034
1034
|
"onUpdate:modelValue": n[0] ||= (e) => z.value = e,
|
|
1035
1035
|
label: j(r)("catalogue.facet.dateFrom"),
|
|
1036
|
-
options:
|
|
1036
|
+
options: M.value,
|
|
1037
1037
|
"any-label": "—"
|
|
1038
1038
|
}, null, 8, [
|
|
1039
1039
|
"modelValue",
|
|
@@ -1043,37 +1043,37 @@ var be = {
|
|
|
1043
1043
|
modelValue: B.value,
|
|
1044
1044
|
"onUpdate:modelValue": n[1] ||= (e) => B.value = e,
|
|
1045
1045
|
label: j(r)("catalogue.facet.dateTo"),
|
|
1046
|
-
options:
|
|
1046
|
+
options: re.value,
|
|
1047
1047
|
"any-label": "—"
|
|
1048
1048
|
}, null, 8, [
|
|
1049
1049
|
"modelValue",
|
|
1050
1050
|
"label",
|
|
1051
1051
|
"options"
|
|
1052
1052
|
])])) : h("", !0),
|
|
1053
|
-
s.value.language ? (T(), g("label", Wt, [_("span", Gt, A(j(r)("catalogue.search.language")), 1),
|
|
1054
|
-
"onUpdate:modelValue": n[2] ||= (e) => S(
|
|
1053
|
+
s.value.language ? (T(), g("label", Wt, [_("span", Gt, A(j(r)("catalogue.search.language")), 1), L(_("select", {
|
|
1054
|
+
"onUpdate:modelValue": n[2] ||= (e) => S(W) ? W.value = e : null,
|
|
1055
1055
|
class: "mwnf-facet__select mwnf-search-form__language"
|
|
1056
|
-
}, [_("option", Kt, A(j(r)("catalogue.search.anyLanguage")), 1), (T(!0), g(f, null, O(
|
|
1056
|
+
}, [_("option", Kt, A(j(r)("catalogue.search.anyLanguage")), 1), (T(!0), g(f, null, O(U.value, (e) => (T(), g("option", {
|
|
1057
1057
|
key: e,
|
|
1058
1058
|
value: e
|
|
1059
|
-
}, A(e.toUpperCase()), 9, qt))), 128))], 512), [[F, j(
|
|
1059
|
+
}, A(e.toUpperCase()), 9, qt))), 128))], 512), [[F, j(W)]])])) : h("", !0)
|
|
1060
1060
|
], 64)) : c.value === "facets" ? (T(), g(f, { key: 1 }, [(T(!0), g(f, null, O(s.value.facets ?? [], (e) => (T(), m(a, {
|
|
1061
1061
|
key: e.key,
|
|
1062
1062
|
label: e.label ? j(r)(e.label) : "",
|
|
1063
|
-
options:
|
|
1064
|
-
"model-value":
|
|
1065
|
-
"onUpdate:modelValue": (t) =>
|
|
1063
|
+
options: q.value[e.key] ?? [],
|
|
1064
|
+
"model-value": Z[e.key],
|
|
1065
|
+
"onUpdate:modelValue": (t) => pe(e.key, t)
|
|
1066
1066
|
}, null, 8, [
|
|
1067
1067
|
"label",
|
|
1068
1068
|
"options",
|
|
1069
1069
|
"model-value",
|
|
1070
1070
|
"onUpdate:modelValue"
|
|
1071
|
-
]))), 128)),
|
|
1071
|
+
]))), 128)), R.value ? (T(), g("div", Jt, [b(a, {
|
|
1072
1072
|
"model-value": z.value,
|
|
1073
1073
|
label: j(r)("catalogue.facet.startDate"),
|
|
1074
|
-
options:
|
|
1074
|
+
options: M.value,
|
|
1075
1075
|
"onUpdate:modelValue": n[3] ||= (e) => {
|
|
1076
|
-
z.value = e,
|
|
1076
|
+
z.value = e, pe("from", e);
|
|
1077
1077
|
}
|
|
1078
1078
|
}, null, 8, [
|
|
1079
1079
|
"model-value",
|
|
@@ -1082,9 +1082,9 @@ var be = {
|
|
|
1082
1082
|
]), b(a, {
|
|
1083
1083
|
"model-value": B.value,
|
|
1084
1084
|
label: j(r)("catalogue.facet.endDate"),
|
|
1085
|
-
options:
|
|
1085
|
+
options: re.value,
|
|
1086
1086
|
"onUpdate:modelValue": n[4] ||= (e) => {
|
|
1087
|
-
B.value = e,
|
|
1087
|
+
B.value = e, pe("to", e);
|
|
1088
1088
|
}
|
|
1089
1089
|
}, null, 8, [
|
|
1090
1090
|
"model-value",
|
|
@@ -1093,23 +1093,23 @@ var be = {
|
|
|
1093
1093
|
])])) : h("", !0)], 64)) : c.value === "radio" ? (T(!0), g(f, { key: 2 }, O(s.value.facets ?? [], (e) => (T(), g("div", {
|
|
1094
1094
|
key: e.key,
|
|
1095
1095
|
class: "mwnf-search-form__radio-row"
|
|
1096
|
-
}, [_("label", Yt, [
|
|
1097
|
-
"onUpdate:modelValue": n[5] ||= (e) =>
|
|
1096
|
+
}, [_("label", Yt, [L(_("input", {
|
|
1097
|
+
"onUpdate:modelValue": n[5] ||= (e) => X.value = e,
|
|
1098
1098
|
type: "radio",
|
|
1099
1099
|
name: "mwnf-search-form-filter",
|
|
1100
1100
|
value: e.key
|
|
1101
|
-
}, null, 8, Xt), [[P,
|
|
1101
|
+
}, null, 8, Xt), [[P, X.value]]), y(" " + A(e.label ? j(r)(e.label) : ""), 1)]), e.type === "year" ? L((T(), g("input", {
|
|
1102
1102
|
key: 1,
|
|
1103
|
-
"onUpdate:modelValue": (t) =>
|
|
1103
|
+
"onUpdate:modelValue": (t) => Z[e.key] = t,
|
|
1104
1104
|
type: "number",
|
|
1105
1105
|
class: "mwnf-search-form__year",
|
|
1106
|
-
disabled:
|
|
1107
|
-
}, null, 8, Zt)), [[ne,
|
|
1106
|
+
disabled: X.value !== e.key
|
|
1107
|
+
}, null, 8, Zt)), [[ne, Z[e.key]]]) : (T(), m(a, {
|
|
1108
1108
|
key: 0,
|
|
1109
|
-
modelValue:
|
|
1110
|
-
"onUpdate:modelValue": (t) =>
|
|
1111
|
-
options:
|
|
1112
|
-
disabled:
|
|
1109
|
+
modelValue: Z[e.key],
|
|
1110
|
+
"onUpdate:modelValue": (t) => Z[e.key] = t,
|
|
1111
|
+
options: q.value[e.key] ?? [],
|
|
1112
|
+
disabled: X.value !== e.key
|
|
1113
1113
|
}, null, 8, [
|
|
1114
1114
|
"modelValue",
|
|
1115
1115
|
"onUpdate:modelValue",
|
|
@@ -1119,12 +1119,12 @@ var be = {
|
|
|
1119
1119
|
(T(!0), g(f, null, O(s.value.extras ?? [], (e) => (T(), g("label", {
|
|
1120
1120
|
key: e.key,
|
|
1121
1121
|
class: "mwnf-facet mwnf-facet--checkbox"
|
|
1122
|
-
}, [
|
|
1123
|
-
"onUpdate:modelValue": (t) =>
|
|
1122
|
+
}, [L(_("input", {
|
|
1123
|
+
"onUpdate:modelValue": (t) => ce[e.key] = t,
|
|
1124
1124
|
type: "checkbox",
|
|
1125
1125
|
class: "mwnf-facet__checkbox"
|
|
1126
|
-
}, null, 8, Qt), [[N,
|
|
1127
|
-
k(t.$slots, "extras", w(x(
|
|
1126
|
+
}, null, 8, Qt), [[N, ce[e.key]]]), _("span", $t, A(j(r)(e.label)), 1)]))), 128)),
|
|
1127
|
+
k(t.$slots, "extras", w(x(Se.value)))
|
|
1128
1128
|
]),
|
|
1129
1129
|
_: 3
|
|
1130
1130
|
}, 8, [
|
|
@@ -1133,10 +1133,10 @@ var be = {
|
|
|
1133
1133
|
"reset-label"
|
|
1134
1134
|
]),
|
|
1135
1135
|
s.value.howTo ? (T(), g("p", en, [b(e, { to: { name: s.value.howTo } }, {
|
|
1136
|
-
default:
|
|
1136
|
+
default: I(() => [y(A(j(r)("catalogue.search.howTo")), 1)]),
|
|
1137
1137
|
_: 1
|
|
1138
1138
|
}, 8, ["to"])])) : h("", !0),
|
|
1139
|
-
k(t.$slots, "actions", w(x(
|
|
1139
|
+
k(t.$slots, "actions", w(x(Se.value)))
|
|
1140
1140
|
], 2));
|
|
1141
1141
|
}
|
|
1142
1142
|
}, nn = { class: "mwnf-timeline" }, rn = {
|
|
@@ -1150,7 +1150,7 @@ var be = {
|
|
|
1150
1150
|
"placeholder",
|
|
1151
1151
|
"onInput"
|
|
1152
1152
|
], cn = {
|
|
1153
|
-
key:
|
|
1153
|
+
key: 3,
|
|
1154
1154
|
class: "mwnf-timeline__error"
|
|
1155
1155
|
}, ln = {
|
|
1156
1156
|
__name: "TimelineResultsView",
|
|
@@ -1170,18 +1170,18 @@ var be = {
|
|
|
1170
1170
|
t: r,
|
|
1171
1171
|
tr: n.spec.tr,
|
|
1172
1172
|
years: {
|
|
1173
|
-
min:
|
|
1174
|
-
max:
|
|
1173
|
+
min: z.value[0],
|
|
1174
|
+
max: z.value[1]
|
|
1175
1175
|
}
|
|
1176
1176
|
})), M = E(Object.fromEntries(C.value.map((e) => [e, ""]))), N = D(""), P = d.value ? null : fe({ keys: C.value }), F = d.value ? M : P.filters;
|
|
1177
1177
|
function ne(e) {
|
|
1178
1178
|
if (ee("collection") && e !== "" && e != null) return e === "pc" ? null : e;
|
|
1179
1179
|
}
|
|
1180
|
-
function
|
|
1180
|
+
function re() {
|
|
1181
1181
|
for (let e of C.value) M[e] = "";
|
|
1182
1182
|
N.value = "";
|
|
1183
1183
|
}
|
|
1184
|
-
function
|
|
1184
|
+
function L() {
|
|
1185
1185
|
N.value = "";
|
|
1186
1186
|
let e = !!F.begin && !!F.end;
|
|
1187
1187
|
if (e && Number(F.begin) >= Number(F.end)) {
|
|
@@ -1199,7 +1199,7 @@ var be = {
|
|
|
1199
1199
|
query: t
|
|
1200
1200
|
});
|
|
1201
1201
|
}
|
|
1202
|
-
let
|
|
1202
|
+
let R = p(() => {
|
|
1203
1203
|
if (d.value) return [];
|
|
1204
1204
|
let e = F;
|
|
1205
1205
|
return v.findEvents({
|
|
@@ -1208,55 +1208,55 @@ var be = {
|
|
|
1208
1208
|
begin: e.begin,
|
|
1209
1209
|
end: e.end
|
|
1210
1210
|
});
|
|
1211
|
-
}),
|
|
1211
|
+
}), z = p(() => {
|
|
1212
1212
|
let e = v.findEvents({
|
|
1213
1213
|
country: void 0,
|
|
1214
1214
|
collection: void 0
|
|
1215
|
-
}).map((e) => e.year_from).filter((e) =>
|
|
1216
|
-
return
|
|
1217
|
-
}),
|
|
1215
|
+
}), t = (e) => Number.isFinite(e) && e !== 0, n = e.map((e) => e.year_from).filter(t), r = e.map((e) => t(e.year_to) ? e.year_to : e.year_from).filter(t);
|
|
1216
|
+
return n.length ? [Math.min(...n), Math.max(...r)] : [null, null];
|
|
1217
|
+
}), B = me(R, {
|
|
1218
1218
|
page: () => P ? P.page.value : 1,
|
|
1219
1219
|
size: () => s.value.pageSize ?? 15
|
|
1220
|
-
});
|
|
1220
|
+
}), V = (e) => r(s.value.eraWords?.[e] ?? e);
|
|
1221
1221
|
function H(e) {
|
|
1222
1222
|
let t = s.value.countryLabel && e.country_id ? s.value.countryLabel(e.country_id) : "";
|
|
1223
1223
|
return {
|
|
1224
1224
|
id: e.id,
|
|
1225
|
-
date: U(e, e.text,
|
|
1226
|
-
caption: t ?
|
|
1227
|
-
description: e.text?.description ?
|
|
1225
|
+
date: U(e, e.text, V),
|
|
1226
|
+
caption: t ? se(String(t)) : "",
|
|
1227
|
+
description: e.text?.description ? oe(String(e.text.description), { breaks: !0 }) : ""
|
|
1228
1228
|
};
|
|
1229
1229
|
}
|
|
1230
|
-
let
|
|
1230
|
+
let ie = p(() => B.value.rows.map((e) => (s.value.event ?? H)(e, te.value))), W = p(() => (v.countries.value ?? []).map((e) => ({
|
|
1231
1231
|
value: e.value,
|
|
1232
1232
|
label: e.value === "all" ? r("timeline.form.allCountries") : e.label
|
|
1233
|
-
}))),
|
|
1233
|
+
}))), G = p(() => s.value.collections?.(te.value) ?? []), K = p(() => {
|
|
1234
1234
|
let e = {};
|
|
1235
1235
|
for (let t of S.value) (t.key === "begin" || t.key === "end") && t.options && (typeof t.options == "function" ? e[t.key] = t.options(te.value) : e[t.key] = t.options);
|
|
1236
1236
|
return e;
|
|
1237
|
-
}),
|
|
1237
|
+
}), q = p(() => ({
|
|
1238
1238
|
filters: F,
|
|
1239
1239
|
active: C.value.some((e) => F[e]),
|
|
1240
|
-
apply: d.value ?
|
|
1241
|
-
reset: d.value ?
|
|
1240
|
+
apply: d.value ? L : (e) => P.apply(e),
|
|
1241
|
+
reset: d.value ? re : P.reset,
|
|
1242
1242
|
goToPage: d.value ? () => {} : P.goToPage,
|
|
1243
|
-
events:
|
|
1244
|
-
pageInfo:
|
|
1245
|
-
countries:
|
|
1246
|
-
collections:
|
|
1243
|
+
events: R.value,
|
|
1244
|
+
pageInfo: B.value,
|
|
1245
|
+
countries: W.value,
|
|
1246
|
+
collections: G.value,
|
|
1247
1247
|
t: r,
|
|
1248
1248
|
tr: s.value.tr
|
|
1249
|
-
})),
|
|
1249
|
+
})), ae = p(() => {
|
|
1250
1250
|
let e = s.value.gallery;
|
|
1251
|
-
return !e || d.value ? null : !e.items || e.items(
|
|
1252
|
-
}),
|
|
1253
|
-
let e =
|
|
1251
|
+
return !e || d.value ? null : !e.items || e.items(q.value);
|
|
1252
|
+
}), J = p(() => {
|
|
1253
|
+
let e = ae.value;
|
|
1254
1254
|
return e == null ? !1 : Array.isArray(e) ? e.length > 0 : !!e;
|
|
1255
|
-
}),
|
|
1256
|
-
let e =
|
|
1255
|
+
}), Y = p(() => {
|
|
1256
|
+
let e = ae.value;
|
|
1257
1257
|
return Array.isArray(e) ? e.length : typeof e == "number" ? e : null;
|
|
1258
|
-
}),
|
|
1259
|
-
if (!
|
|
1258
|
+
}), X = p(() => {
|
|
1259
|
+
if (!J.value) return null;
|
|
1260
1260
|
let e = {};
|
|
1261
1261
|
for (let t of C.value) F[t] && (e[t] = F[t]);
|
|
1262
1262
|
return {
|
|
@@ -1264,40 +1264,50 @@ var be = {
|
|
|
1264
1264
|
name: s.value.gallery.route,
|
|
1265
1265
|
query: e
|
|
1266
1266
|
},
|
|
1267
|
-
count:
|
|
1267
|
+
count: Y.value,
|
|
1268
1268
|
label: r(s.value.gallery.label ?? "timeline.nav.seeGallery")
|
|
1269
1269
|
};
|
|
1270
|
-
}),
|
|
1271
|
-
...
|
|
1272
|
-
gallery:
|
|
1273
|
-
})),
|
|
1270
|
+
}), Z = p(() => ({
|
|
1271
|
+
...q.value,
|
|
1272
|
+
gallery: X.value
|
|
1273
|
+
})), ce = p(() => s.value.summary ? s.value.summary(Z.value) : [{
|
|
1274
1274
|
label: r(s.value.summaryLabel ?? "timeline.results.eventsFound"),
|
|
1275
|
-
count:
|
|
1276
|
-
}]),
|
|
1275
|
+
count: B.value.total
|
|
1276
|
+
}]), le = p(() => r(s.value.empty ?? "timeline.results.noResults")), ue = p(() => ({
|
|
1277
1277
|
window: 5,
|
|
1278
1278
|
jump: !1,
|
|
1279
1279
|
ends: !0,
|
|
1280
1280
|
...s.value.pagination ?? {}
|
|
1281
1281
|
}));
|
|
1282
|
-
function
|
|
1282
|
+
function Q(e, t) {
|
|
1283
1283
|
return e.label ? r(e.label) : t ? r(t) : "";
|
|
1284
1284
|
}
|
|
1285
1285
|
return (t, n) => (T(), g("section", nn, [
|
|
1286
|
-
k(t.$slots, "before", w(x(
|
|
1286
|
+
k(t.$slots, "before", w(x(Z.value))),
|
|
1287
1287
|
s.value.title ? (T(), g("h1", rn, A(j(r)(s.value.title)), 1)) : h("", !0),
|
|
1288
|
-
|
|
1288
|
+
d.value && t.$slots.form ? k(t.$slots, "form", {
|
|
1289
|
+
filters: j(F),
|
|
1290
|
+
countries: W.value,
|
|
1291
|
+
options: K.value,
|
|
1292
|
+
go: (e) => j(i).push({
|
|
1293
|
+
name: s.value.route,
|
|
1294
|
+
query: e
|
|
1295
|
+
}),
|
|
1296
|
+
t: j(r)
|
|
1297
|
+
}, void 0, void 0, 1) : (T(), m(o, {
|
|
1298
|
+
key: 2,
|
|
1289
1299
|
class: "mwnf-timeline__filters",
|
|
1290
1300
|
title: s.value.filterTitle ? j(r)(s.value.filterTitle) : "",
|
|
1291
1301
|
"apply-label": d.value ? j(r)(s.value.submitLabel ?? "core.action.search") : s.value.applyLabel ? j(r)(s.value.applyLabel) : "",
|
|
1292
1302
|
"reset-label": s.value.resetLabel ? j(r)(s.value.resetLabel) : "",
|
|
1293
|
-
onApply: n[2] ||= (e) => d.value ?
|
|
1294
|
-
onReset: n[3] ||= (e) => d.value ?
|
|
1303
|
+
onApply: n[2] ||= (e) => d.value ? L() : j(P).apply(),
|
|
1304
|
+
onReset: n[3] ||= (e) => d.value ? re() : j(P).reset()
|
|
1295
1305
|
}, {
|
|
1296
|
-
default:
|
|
1306
|
+
default: I(() => [(T(!0), g(f, null, O(S.value, (e) => (T(), g(f, { key: e.key }, [e.key === "country" ? (T(), m(a, {
|
|
1297
1307
|
key: 0,
|
|
1298
1308
|
"model-value": j(F).country,
|
|
1299
|
-
label:
|
|
1300
|
-
options:
|
|
1309
|
+
label: Q(e, "catalogue.facet.country"),
|
|
1310
|
+
options: W.value,
|
|
1301
1311
|
placeholder: e.placeholder ? j(r)(e.placeholder) : j(r)("catalogue.facet.selectCountry"),
|
|
1302
1312
|
"any-label": e.anyLabel ? j(r)(e.anyLabel) : "",
|
|
1303
1313
|
"hide-empty": !!e.hideEmpty,
|
|
@@ -1312,8 +1322,8 @@ var be = {
|
|
|
1312
1322
|
])) : e.key === "collection" ? (T(), m(a, {
|
|
1313
1323
|
key: 1,
|
|
1314
1324
|
"model-value": j(F).collection,
|
|
1315
|
-
label:
|
|
1316
|
-
options:
|
|
1325
|
+
label: Q(e),
|
|
1326
|
+
options: G.value,
|
|
1317
1327
|
placeholder: e.placeholder ? j(r)(e.placeholder) : "",
|
|
1318
1328
|
"any-label": e.anyLabel ? j(r)(e.anyLabel) : "",
|
|
1319
1329
|
"hide-empty": !!e.hideEmpty,
|
|
@@ -1325,11 +1335,11 @@ var be = {
|
|
|
1325
1335
|
"placeholder",
|
|
1326
1336
|
"any-label",
|
|
1327
1337
|
"hide-empty"
|
|
1328
|
-
])) : (e.key === "begin" || e.key === "end") &&
|
|
1338
|
+
])) : (e.key === "begin" || e.key === "end") && K.value[e.key] ? (T(), m(a, {
|
|
1329
1339
|
key: 2,
|
|
1330
1340
|
"model-value": j(F)[e.key],
|
|
1331
|
-
label:
|
|
1332
|
-
options:
|
|
1341
|
+
label: Q(e, e.key === "begin" ? "catalogue.facet.startDate" : "catalogue.facet.endDate"),
|
|
1342
|
+
options: K.value[e.key],
|
|
1333
1343
|
placeholder: e.placeholder ? j(r)(e.placeholder) : j(r)(e.key === "begin" ? "timeline.form.fromYearHint" : "timeline.form.toYearHint"),
|
|
1334
1344
|
"any-label": e.anyLabel ? j(r)(e.anyLabel) : "",
|
|
1335
1345
|
"hide-empty": !!e.hideEmpty,
|
|
@@ -1342,7 +1352,7 @@ var be = {
|
|
|
1342
1352
|
"any-label",
|
|
1343
1353
|
"hide-empty",
|
|
1344
1354
|
"onUpdate:modelValue"
|
|
1345
|
-
])) : (T(), g("label", an, [_("span", on, A(
|
|
1355
|
+
])) : (T(), g("label", an, [_("span", on, A(Q(e, e.key === "begin" ? "catalogue.facet.startDate" : "catalogue.facet.endDate")), 1), _("input", {
|
|
1346
1356
|
type: "number",
|
|
1347
1357
|
class: "mwnf-facet__select",
|
|
1348
1358
|
value: j(F)[e.key],
|
|
@@ -1354,27 +1364,27 @@ var be = {
|
|
|
1354
1364
|
"title",
|
|
1355
1365
|
"apply-label",
|
|
1356
1366
|
"reset-label"
|
|
1357
|
-
]),
|
|
1367
|
+
])),
|
|
1358
1368
|
d.value && N.value ? (T(), g("p", cn, A(N.value), 1)) : h("", !0),
|
|
1359
|
-
d.value ? h("", !0) : (T(), g(f, { key:
|
|
1360
|
-
k(t.$slots, "summary", w(x(
|
|
1361
|
-
|
|
1369
|
+
d.value ? h("", !0) : (T(), g(f, { key: 4 }, [
|
|
1370
|
+
k(t.$slots, "summary", w(x(Z.value)), () => [b(l, { parts: ce.value }, null, 8, ["parts"])]),
|
|
1371
|
+
X.value ? (T(), m(e, {
|
|
1362
1372
|
key: 0,
|
|
1363
1373
|
class: "mwnf-timeline__gallery",
|
|
1364
|
-
to:
|
|
1374
|
+
to: X.value.to
|
|
1365
1375
|
}, {
|
|
1366
|
-
default:
|
|
1376
|
+
default: I(() => [k(t.$slots, "cross-link", w(x(Z.value)), () => [y(A(X.value.label), 1), X.value.count == null ? h("", !0) : (T(), g(f, { key: 0 }, [y(" (" + A(X.value.count) + ")", 1)], 64))])]),
|
|
1367
1377
|
_: 3
|
|
1368
1378
|
}, 8, ["to"])) : h("", !0),
|
|
1369
|
-
k(t.$slots, "event", w(x(
|
|
1370
|
-
empty:
|
|
1379
|
+
k(t.$slots, "event", w(x(Z.value)), () => [b(u, { events: ie.value }, {
|
|
1380
|
+
empty: I(() => [k(t.$slots, "empty", w(x(Z.value)), () => [y(A(le.value), 1)])]),
|
|
1371
1381
|
_: 3
|
|
1372
1382
|
}, 8, ["events"])]),
|
|
1373
1383
|
b(c, {
|
|
1374
|
-
"page-info": j(
|
|
1375
|
-
window:
|
|
1376
|
-
jump:
|
|
1377
|
-
ends:
|
|
1384
|
+
"page-info": j(B),
|
|
1385
|
+
window: ue.value.window,
|
|
1386
|
+
jump: ue.value.jump,
|
|
1387
|
+
ends: ue.value.ends,
|
|
1378
1388
|
onNavigate: j(P).goToPage
|
|
1379
1389
|
}, null, 8, [
|
|
1380
1390
|
"page-info",
|
|
@@ -1384,9 +1394,8 @@ var be = {
|
|
|
1384
1394
|
"onNavigate"
|
|
1385
1395
|
])
|
|
1386
1396
|
], 64)),
|
|
1387
|
-
k(t.$slots, "after", w(x(
|
|
1397
|
+
k(t.$slots, "after", w(x(Z.value)))
|
|
1388
1398
|
]));
|
|
1389
1399
|
}
|
|
1390
1400
|
};
|
|
1391
|
-
//#endregion
|
|
1392
1401
|
export { vt as a, jt as i, tn as n, ct as o, It as r, Ne as s, ln as t };
|