@museumwnf/viewer-layout 2.16.0 → 2.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +63 -33
- package/dist/FeaturedRecord-mRyLN7Mt.js +88 -0
- package/dist/OnDisplayIn-D6r_KvpI.js +1819 -0
- package/dist/PictureNarrative-B_GPQvYP.js +444 -0
- package/dist/SiteShell-C3OgZO8p.js +154 -0
- package/dist/Theme-Caz0E8w1.js +140 -0
- package/dist/TimelineResultsView-CMqrkr9z.js +1911 -0
- package/dist/components.js +2 -154
- package/dist/content-CHXh6D_q.js +84 -0
- package/dist/content.js +5 -5
- package/dist/data-BfyYB8ff.js +33 -0
- package/dist/data-G8uXeEfE.js +35 -0
- package/dist/dxa.js +1216 -343
- package/dist/index.js +5 -5
- package/dist/themeSpecs-Bgn-K6R6.js +34 -0
- package/dist/viewer-layout.css +1 -1
- package/dist/views.js +44 -756
- package/package.json +3 -3
- package/src/tokens.reference.css +33 -4
- package/dist/BackLink-LfSIuXnL.js +0 -45
- package/dist/TimelineEventList-D5Hot788.js +0 -1362
- package/dist/TimelineLookup-D-p1aQ_Z.js +0 -444
- package/dist/TimelineResultsView-DJo_yYEK.js +0 -1203
- package/dist/content-DncTPD5P.js +0 -378
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { p as e } from "./OnDisplayIn-D6r_KvpI.js";
|
|
2
|
+
import { n as t, t as n } from "./PictureNarrative-B_GPQvYP.js";
|
|
3
|
+
import { o as r } from "./TimelineResultsView-CMqrkr9z.js";
|
|
4
|
+
import { A as ee, F as i, h as te, m as ne } from "./data-BfyYB8ff.js";
|
|
5
|
+
import { n as a, r as o, t as s } from "./themeSpecs-Bgn-K6R6.js";
|
|
6
|
+
import { Fragment as c, computed as l, createBlock as u, createCommentVNode as d, createElementBlock as f, createElementVNode as p, createTextVNode as m, createVNode as h, normalizeClass as g, onMounted as re, openBlock as _, ref as ie, renderList as v, toDisplayString as y, unref as b, watch as x, withCtx as S } from "vue";
|
|
7
|
+
import { useI18n as C } from "@museumwnf/viewer-core";
|
|
8
|
+
import { RouterLink as w, useRoute as ae, useRouter as oe } from "vue-router";
|
|
9
|
+
//#region \0rolldown/runtime.js
|
|
10
|
+
var T = Object.defineProperty, E = (e, t) => {
|
|
11
|
+
let n = {};
|
|
12
|
+
for (var r in e) T(n, r, {
|
|
13
|
+
get: e[r],
|
|
14
|
+
enumerable: !0
|
|
15
|
+
});
|
|
16
|
+
return t || T(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
17
|
+
}, D = /* @__PURE__ */ E({ default: () => P }), se = { class: "mwnf-dxa-theme__heading" }, ce = {
|
|
18
|
+
key: 0,
|
|
19
|
+
class: "mwnf-dxa-theme__numeral"
|
|
20
|
+
}, le = { class: "mwnf-dxa-theme__subheading" }, ue = { class: "mwnf-dxa-theme__tour" }, de = { key: 1 }, O = {
|
|
21
|
+
key: 0,
|
|
22
|
+
class: "mwnf-dxa-theme__subthemes"
|
|
23
|
+
}, k = { class: "mwnf-dxa-theme__subthemes-label" }, A = { class: "mwnf-dxa-theme__subtheme" }, j = {
|
|
24
|
+
key: 0,
|
|
25
|
+
class: "mwnf-dxa-theme__tour"
|
|
26
|
+
}, M = {
|
|
27
|
+
key: 1,
|
|
28
|
+
class: "mwnf-loader"
|
|
29
|
+
}, N = "→", P = {
|
|
30
|
+
__name: "Theme",
|
|
31
|
+
props: { aboutMode: {
|
|
32
|
+
type: Boolean,
|
|
33
|
+
default: !1
|
|
34
|
+
} },
|
|
35
|
+
setup(T) {
|
|
36
|
+
let E = T, { aboutTheme: D, owningTheme: P, romanFor: F, themeByRouteId: I, themeText: L, useThemePictures: R } = ee, { t: z, locale: B } = C(), V = ae(), H = oe(), U = l(() => E.aboutMode ? D.value : I(V.params.id)), W = l(() => {
|
|
37
|
+
let e = V.params.subtheme;
|
|
38
|
+
if (E.aboutMode || !e || e === "overview") return null;
|
|
39
|
+
let t = Number(e);
|
|
40
|
+
return Number.isInteger(t) && t >= 1 ? t : null;
|
|
41
|
+
}), G = l(() => W.value === null ? null : (U.value?.sub_themes ?? [])[W.value - 1] ?? null), K = l(() => G.value ?? U.value), fe = l(() => E.aboutMode ? s : o), q = R(K), J = ie(null);
|
|
42
|
+
function pe() {
|
|
43
|
+
let e = Number(V.params.image);
|
|
44
|
+
return (q.value.find((t) => t.displayOrder === e) ?? q.value[0])?.id ?? null;
|
|
45
|
+
}
|
|
46
|
+
function Y() {
|
|
47
|
+
J.value = pe();
|
|
48
|
+
}
|
|
49
|
+
re(Y), x(() => [
|
|
50
|
+
V.params.id,
|
|
51
|
+
V.params.subtheme,
|
|
52
|
+
E.aboutMode
|
|
53
|
+
], Y);
|
|
54
|
+
let X = l(() => q.value.find((e) => e.id === J.value) ?? null);
|
|
55
|
+
function Z(e) {
|
|
56
|
+
if (J.value = e, E.aboutMode) return;
|
|
57
|
+
let t = q.value.find((t) => t.id === e);
|
|
58
|
+
t && H.replace({
|
|
59
|
+
name: "theme",
|
|
60
|
+
params: {
|
|
61
|
+
id: V.params.id,
|
|
62
|
+
subtheme: V.params.subtheme ?? "overview",
|
|
63
|
+
image: String(t.displayOrder)
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
let me = l(() => L(U.value, B.value).title ?? U.value?.internal_name ?? ""), he = l(() => E.aboutMode ? te(B.value) : me.value), ge = l(() => E.aboutMode ? ne(B.value) : G.value ? L(G.value, B.value).title ?? G.value.internal_name ?? "" : z("exhibition.theme.overview")), Q = l(() => F(P(U.value)?.display_order ?? 1)), _e = l(() => !K.value?.id || !X.value?.id ? "" : i("themes", `${K.value.id}/${X.value.id}`, B.value).contextual_description ?? ""), $ = l(() => (U.value?.sub_themes ?? []).map((e, t) => ({
|
|
68
|
+
index: t + 1,
|
|
69
|
+
title: L(e, B.value).title ?? e.internal_name ?? "",
|
|
70
|
+
to: a(e)
|
|
71
|
+
}))), ve = l(() => U.value ? a(U.value) : null);
|
|
72
|
+
return (ee, i) => K.value ? (_(), u(r, {
|
|
73
|
+
key: 0,
|
|
74
|
+
spec: fe.value,
|
|
75
|
+
id: K.value.id,
|
|
76
|
+
class: g(["mwnf-dxa-theme", { "mwnf-dxa-theme--about": T.aboutMode }])
|
|
77
|
+
}, {
|
|
78
|
+
header: S(() => [p("div", se, [Q.value ? (_(), f("span", ce, y(b(z)("exhibition.theme.romanLabel")) + " " + y(Q.value) + " ▪ ", 1)) : d("", !0), m(y(he.value), 1)]), p("div", le, y(ge.value), 1)]),
|
|
79
|
+
panel: S(() => [h(t, {
|
|
80
|
+
pictures: b(q),
|
|
81
|
+
"selected-id": J.value,
|
|
82
|
+
"onUpdate:selectedId": Z
|
|
83
|
+
}, null, 8, ["pictures", "selected-id"])]),
|
|
84
|
+
"after-body": S(() => [T.aboutMode ? d("", !0) : (_(), u(n, {
|
|
85
|
+
key: 0,
|
|
86
|
+
picture: X.value,
|
|
87
|
+
"contextual-description": _e.value,
|
|
88
|
+
onSelect: Z
|
|
89
|
+
}, null, 8, ["picture", "contextual-description"]))]),
|
|
90
|
+
navigation: S(({ previous: e, next: t }) => [p("div", ue, [e ? (_(), u(b(w), {
|
|
91
|
+
key: 0,
|
|
92
|
+
to: b(a)(e),
|
|
93
|
+
class: "mwnf-dxa-theme__tour-link"
|
|
94
|
+
}, {
|
|
95
|
+
default: S(() => [m("← " + y(b(z)("exhibition.theme.previous")), 1)]),
|
|
96
|
+
_: 1
|
|
97
|
+
}, 8, ["to"])) : (_(), f("span", de)), t ? (_(), u(b(w), {
|
|
98
|
+
key: 2,
|
|
99
|
+
to: b(a)(t),
|
|
100
|
+
class: "mwnf-dxa-theme__tour-link"
|
|
101
|
+
}, {
|
|
102
|
+
default: S(() => [m(y(b(z)("exhibition.theme.next")) + " " + y(N), 1)]),
|
|
103
|
+
_: 1
|
|
104
|
+
}, 8, ["to"])) : d("", !0)]), $.value.length ? (_(), f("div", O, [
|
|
105
|
+
p("div", k, y(b(z)("exhibition.theme.inThisTheme")), 1),
|
|
106
|
+
p("div", A, [h(b(w), {
|
|
107
|
+
to: ve.value,
|
|
108
|
+
class: g({ "mwnf-dxa-theme__subtheme--current": W.value === null })
|
|
109
|
+
}, {
|
|
110
|
+
default: S(() => [m(y(b(z)("exhibition.theme.overview")), 1)]),
|
|
111
|
+
_: 1
|
|
112
|
+
}, 8, ["to", "class"])]),
|
|
113
|
+
(_(!0), f(c, null, v($.value, (e) => (_(), f("div", {
|
|
114
|
+
key: e.index,
|
|
115
|
+
class: "mwnf-dxa-theme__subtheme"
|
|
116
|
+
}, [h(b(w), {
|
|
117
|
+
to: e.to,
|
|
118
|
+
class: g({ "mwnf-dxa-theme__subtheme--current": W.value === e.index })
|
|
119
|
+
}, {
|
|
120
|
+
default: S(() => [m(y(e.index) + ". " + y(e.title), 1)]),
|
|
121
|
+
_: 2
|
|
122
|
+
}, 1032, ["to", "class"])]))), 128))
|
|
123
|
+
])) : d("", !0)]),
|
|
124
|
+
after: S(({ next: t }) => [T.aboutMode && t ? (_(), f("div", j, [i[0] ||= p("span", null, null, -1), h(b(w), {
|
|
125
|
+
to: b(a)(t),
|
|
126
|
+
class: "mwnf-dxa-theme__tour-link"
|
|
127
|
+
}, {
|
|
128
|
+
default: S(() => [m(y(b(z)("exhibition.theme.next")) + " " + y(N), 1)]),
|
|
129
|
+
_: 1
|
|
130
|
+
}, 8, ["to"])])) : d("", !0), h(e)]),
|
|
131
|
+
_: 1
|
|
132
|
+
}, 8, [
|
|
133
|
+
"spec",
|
|
134
|
+
"id",
|
|
135
|
+
"class"
|
|
136
|
+
])) : (_(), f("div", M, y(b(z)("exhibition.theme.notInExhibition")), 1));
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
//#endregion
|
|
140
|
+
export { P as n, E as r, D as t };
|