@museumwnf/viewer-layout 2.12.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 -0
- package/README.md +433 -0
- package/dist/PageShell-CbJ9lQoQ.js +961 -0
- package/dist/TimelineEventList-59g_1ksf.js +1174 -0
- package/dist/components.js +154 -0
- package/dist/content-BvhCFMQ9.js +446 -0
- package/dist/content.js +3 -0
- package/dist/index.js +4 -0
- package/dist/viewer-layout.css +2 -0
- package/dist/views.js +1740 -0
- package/package.json +51 -0
- package/src/tokens.reference.css +684 -0
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { t as e } from "./PageShell-CbJ9lQoQ.js";
|
|
2
|
+
import { computed as t, createBlock as n, createSlots as r, mergeProps as i, openBlock as a, renderSlot as o, withCtx as s } from "vue";
|
|
3
|
+
import { useI18n as c, useSection as l, useSiteConfig as u, useSiteRights as d } from "@museumwnf/viewer-core";
|
|
4
|
+
import { useRouter as f } from "vue-router";
|
|
5
|
+
//#region src/components/SiteShell.vue
|
|
6
|
+
var p = /*@__PURE__*/ Object.assign({ inheritAttrs: !1 }, {
|
|
7
|
+
__name: "SiteShell",
|
|
8
|
+
props: {
|
|
9
|
+
config: {
|
|
10
|
+
type: Object,
|
|
11
|
+
default: null
|
|
12
|
+
},
|
|
13
|
+
logos: {
|
|
14
|
+
type: Array,
|
|
15
|
+
default: () => []
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
setup(p) {
|
|
19
|
+
let m = p, { t: h, locale: g } = c(), _ = f(), v = l(), y = u(), b = t(() => ({
|
|
20
|
+
...y,
|
|
21
|
+
...m.config ?? {}
|
|
22
|
+
})), x = t(() => b.value.navigation ?? {}), S = t(() => b.value.logos ?? null), C = t(() => b.value.banner ?? null), w = d(), T = t(() => w.holder ? {
|
|
23
|
+
label: h("record.source.rightsHolder"),
|
|
24
|
+
text: w.attribution ?? w.holder,
|
|
25
|
+
termsHref: w.termsUrl,
|
|
26
|
+
termsLabel: h("record.source.termsOfUse")
|
|
27
|
+
} : null);
|
|
28
|
+
function E(e) {
|
|
29
|
+
return e.href ? e.href : e.to ? _.resolve(e.to).href : "";
|
|
30
|
+
}
|
|
31
|
+
function D(e) {
|
|
32
|
+
return typeof e.when != "function" || !!e.when({
|
|
33
|
+
section: v.value,
|
|
34
|
+
locale: g.value
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
function O(e, { active: t = !1 } = {}) {
|
|
38
|
+
let n = {
|
|
39
|
+
label: h(e.label),
|
|
40
|
+
href: E(e),
|
|
41
|
+
external: !!e.external
|
|
42
|
+
};
|
|
43
|
+
return t && (n.active = e.section === v.value), n;
|
|
44
|
+
}
|
|
45
|
+
let k = t(() => Array.isArray(x.value.links) ? x.value.links.filter(D).map((e) => O(e, { active: !0 })) : null), A = t(() => Array.isArray(x.value.headerLinks) ? x.value.headerLinks.map((e) => O(e)) : null), j = t(() => Array.isArray(x.value.footerLinks) ? x.value.footerLinks.map((e) => O(e)) : null), M = t(() => {
|
|
46
|
+
let e = x.value.search;
|
|
47
|
+
return e ? {
|
|
48
|
+
placeholder: e.placeholder ? h(e.placeholder) : "",
|
|
49
|
+
submitLabel: e.submitLabel ? h(e.submitLabel) : ""
|
|
50
|
+
} : null;
|
|
51
|
+
});
|
|
52
|
+
function N(e) {
|
|
53
|
+
let t = x.value.search;
|
|
54
|
+
t?.route && _.push({
|
|
55
|
+
name: t.route,
|
|
56
|
+
query: { [t.key ?? "q"]: e || t.empty || "" }
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
function P(e) {
|
|
60
|
+
return typeof e == "function" ? e({
|
|
61
|
+
section: v.value,
|
|
62
|
+
locale: g.value,
|
|
63
|
+
t: h
|
|
64
|
+
}) : typeof e == "string" ? h(e) : e;
|
|
65
|
+
}
|
|
66
|
+
let F = t(() => {
|
|
67
|
+
let e = C.value ? P(C.value.title) : "";
|
|
68
|
+
if (e) return e;
|
|
69
|
+
let t = x.value.sectionTitles?.[v.value];
|
|
70
|
+
return t ? h(t) : "";
|
|
71
|
+
}), I = [
|
|
72
|
+
"variant",
|
|
73
|
+
"image",
|
|
74
|
+
"imageAlt",
|
|
75
|
+
"caption",
|
|
76
|
+
"captionLabel",
|
|
77
|
+
"subtitle",
|
|
78
|
+
"headline",
|
|
79
|
+
"enter",
|
|
80
|
+
"strapline"
|
|
81
|
+
], L = t(() => {
|
|
82
|
+
let e = {};
|
|
83
|
+
F.value && (e.bannerTitle = F.value);
|
|
84
|
+
for (let t of I) {
|
|
85
|
+
let n = C.value ? P(C.value[t]) : "";
|
|
86
|
+
n && (e[`banner${t[0].toUpperCase()}${t.slice(1)}`] = n);
|
|
87
|
+
}
|
|
88
|
+
return e;
|
|
89
|
+
}), R = t(() => {
|
|
90
|
+
let e = S.value?.header;
|
|
91
|
+
return typeof e == "function" ? m.logos.filter(e) : null;
|
|
92
|
+
}), z = t(() => {
|
|
93
|
+
let e = S.value?.headerTitle;
|
|
94
|
+
return e && R.value?.length ? h(e) : "";
|
|
95
|
+
}), B = t(() => {
|
|
96
|
+
let e = S.value?.sponsorGroups;
|
|
97
|
+
return typeof e == "function" ? e(m.logos, h) : null;
|
|
98
|
+
}), V = t(() => {
|
|
99
|
+
let e = { ...L.value };
|
|
100
|
+
return Array.isArray(x.value.languages) && (e.languages = x.value.languages), k.value && (e.navLinks = k.value), A.value && (e.headerLinks = A.value), j.value && (e.footerLinks = j.value), M.value && (e.search = M.value), R.value && (e.headerLogos = R.value, z.value && (e.headerLogosTitle = z.value)), B.value && (e.sponsorGroups = B.value), T.value && (e.footerAttributionLabel = T.value.label, e.footerAttributionText = T.value.text, e.footerTermsHref = T.value.termsHref, e.footerTermsLabel = T.value.termsLabel), e;
|
|
101
|
+
});
|
|
102
|
+
return (t, c) => (a(), n(e, i({
|
|
103
|
+
...t.$attrs,
|
|
104
|
+
...V.value
|
|
105
|
+
}, { onSearch: N }), r({ _: 2 }, [
|
|
106
|
+
t.$slots.header ? {
|
|
107
|
+
name: "header",
|
|
108
|
+
fn: s(() => [o(t.$slots, "header")]),
|
|
109
|
+
key: "0"
|
|
110
|
+
} : void 0,
|
|
111
|
+
t.$slots.brand ? {
|
|
112
|
+
name: "header-brand",
|
|
113
|
+
fn: s(() => [o(t.$slots, "brand")]),
|
|
114
|
+
key: "1"
|
|
115
|
+
} : void 0,
|
|
116
|
+
t.$slots.banner ? {
|
|
117
|
+
name: "banner",
|
|
118
|
+
fn: s(() => [o(t.$slots, "banner")]),
|
|
119
|
+
key: "2"
|
|
120
|
+
} : void 0,
|
|
121
|
+
t.$slots.navigation ? {
|
|
122
|
+
name: "navigation",
|
|
123
|
+
fn: s(() => [o(t.$slots, "navigation")]),
|
|
124
|
+
key: "3"
|
|
125
|
+
} : void 0,
|
|
126
|
+
t.$slots.default || t.$slots.notice || t.$slots["after-content"] ? {
|
|
127
|
+
name: "default",
|
|
128
|
+
fn: s(() => [
|
|
129
|
+
o(t.$slots, "notice"),
|
|
130
|
+
o(t.$slots, "default"),
|
|
131
|
+
o(t.$slots, "after-content")
|
|
132
|
+
]),
|
|
133
|
+
key: "4"
|
|
134
|
+
} : void 0,
|
|
135
|
+
t.$slots.hyperlinks ? {
|
|
136
|
+
name: "hyperlinks",
|
|
137
|
+
fn: s(() => [o(t.$slots, "hyperlinks")]),
|
|
138
|
+
key: "5"
|
|
139
|
+
} : void 0,
|
|
140
|
+
t.$slots.sponsors ? {
|
|
141
|
+
name: "sponsors",
|
|
142
|
+
fn: s(() => [o(t.$slots, "sponsors")]),
|
|
143
|
+
key: "6"
|
|
144
|
+
} : void 0,
|
|
145
|
+
t.$slots.footer ? {
|
|
146
|
+
name: "footer",
|
|
147
|
+
fn: s(() => [o(t.$slots, "footer")]),
|
|
148
|
+
key: "7"
|
|
149
|
+
} : void 0
|
|
150
|
+
]), 1040));
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
//#endregion
|
|
154
|
+
export { p as SiteShell };
|
|
@@ -0,0 +1,446 @@
|
|
|
1
|
+
import { v as e } from "./TimelineEventList-59g_1ksf.js";
|
|
2
|
+
import { Fragment as t, computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createTextVNode as s, normalizeClass as c, normalizeStyle as l, onBeforeUnmount as u, onMounted as d, openBlock as f, ref as p, renderList as m, toDisplayString as h, unref as g, vModelText as _, vShow as v, withCtx as y, withDirectives as b, withKeys as x } from "vue";
|
|
3
|
+
import { useI18n as S } from "@museumwnf/viewer-core/i18n";
|
|
4
|
+
import { md as C, mdInline as w, renderInline as T, searchGlossary as ee } from "@museumwnf/viewer-core";
|
|
5
|
+
import { useRouter as E } from "vue-router";
|
|
6
|
+
//#region src/content/PartnerMap.vue
|
|
7
|
+
var D = {
|
|
8
|
+
key: 0,
|
|
9
|
+
class: "mwnf-partner-map"
|
|
10
|
+
}, O = { class: "mwnf-partner-map__title" }, k = ["src", "title"], A = { class: "mwnf-partner-map__link" }, te = ["href"], ne = {
|
|
11
|
+
__name: "PartnerMap",
|
|
12
|
+
props: {
|
|
13
|
+
latitude: {
|
|
14
|
+
type: Number,
|
|
15
|
+
default: null
|
|
16
|
+
},
|
|
17
|
+
longitude: {
|
|
18
|
+
type: Number,
|
|
19
|
+
default: null
|
|
20
|
+
},
|
|
21
|
+
zoom: {
|
|
22
|
+
type: Number,
|
|
23
|
+
default: 15
|
|
24
|
+
},
|
|
25
|
+
mapTitleEntry: {
|
|
26
|
+
type: String,
|
|
27
|
+
default: "partner.map.map"
|
|
28
|
+
},
|
|
29
|
+
mapOfEntry: {
|
|
30
|
+
type: String,
|
|
31
|
+
default: "partner.map.mapOf"
|
|
32
|
+
},
|
|
33
|
+
openMapLinkEntry: {
|
|
34
|
+
type: String,
|
|
35
|
+
default: "partner.map.openInOpenStreetMap"
|
|
36
|
+
},
|
|
37
|
+
label: {
|
|
38
|
+
type: String,
|
|
39
|
+
default: ""
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
setup(e) {
|
|
43
|
+
let t = e, r = n(() => Number.isFinite(t.latitude) && Number.isFinite(t.longitude)), s = n(() => {
|
|
44
|
+
let e = 360 / 2 ** Math.max(1, Math.min(19, t.zoom || 15)), [n, r] = [t.latitude, t.longitude];
|
|
45
|
+
return [
|
|
46
|
+
r - e,
|
|
47
|
+
n - e / 2,
|
|
48
|
+
r + e,
|
|
49
|
+
n + e / 2
|
|
50
|
+
].join("%2C");
|
|
51
|
+
}), c = n(() => `https://www.openstreetmap.org/export/embed.html?bbox=${s.value}&layer=mapnik&marker=${t.latitude}%2C${t.longitude}`), l = n(() => `https://www.openstreetmap.org/?mlat=${t.latitude}&mlon=${t.longitude}#map=${t.zoom || 15}/${t.latitude}/${t.longitude}`);
|
|
52
|
+
return (t, n) => r.value ? (f(), a("div", D, [
|
|
53
|
+
o("p", O, h(t.$t(e.mapTitleEntry)), 1),
|
|
54
|
+
o("iframe", {
|
|
55
|
+
src: c.value,
|
|
56
|
+
title: e.label ? t.$t(e.mapOfEntry, { label: e.label }) : t.$t(e.mapTitleEntry),
|
|
57
|
+
loading: "lazy",
|
|
58
|
+
referrerpolicy: "no-referrer",
|
|
59
|
+
class: "mwnf-partner-map__embed"
|
|
60
|
+
}, null, 8, k),
|
|
61
|
+
o("p", A, [o("a", {
|
|
62
|
+
href: l.value,
|
|
63
|
+
target: "_blank",
|
|
64
|
+
rel: "noopener"
|
|
65
|
+
}, "↗ " + h(t.$t(e.openMapLinkEntry)), 9, te)])
|
|
66
|
+
])) : i("", !0);
|
|
67
|
+
}
|
|
68
|
+
}, j = {
|
|
69
|
+
key: 0,
|
|
70
|
+
class: "mwnf-featured-partners"
|
|
71
|
+
}, M = { class: "mwnf-featured-partners__heading" }, N = { class: "mwnf-featured-partners__carousel" }, P = {
|
|
72
|
+
key: 0,
|
|
73
|
+
class: "mwnf-featured-partners__image"
|
|
74
|
+
}, F = ["src", "alt"], I = { class: "mwnf-featured-partners__body" }, L = { class: "mwnf-featured-partners__name" }, R = { class: "mwnf-featured-partners__location" }, z = { key: 0 }, B = { class: "mwnf-featured-partners__description" }, V = {
|
|
75
|
+
key: 0,
|
|
76
|
+
class: "mwnf-featured-partners__controls"
|
|
77
|
+
}, H = ["aria-label", "onClick"], U = 8e3, W = {
|
|
78
|
+
__name: "FeaturedPartners",
|
|
79
|
+
props: {
|
|
80
|
+
records: {
|
|
81
|
+
type: Array,
|
|
82
|
+
default: () => []
|
|
83
|
+
},
|
|
84
|
+
headingEntry: {
|
|
85
|
+
type: String,
|
|
86
|
+
default: "partner.featured"
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
setup(n) {
|
|
90
|
+
let l = n, g = p(0), _ = null;
|
|
91
|
+
function x(e) {
|
|
92
|
+
g.value = e, S();
|
|
93
|
+
}
|
|
94
|
+
function S() {
|
|
95
|
+
_ && clearInterval(_), l.records.length > 0 && (_ = setInterval(() => {
|
|
96
|
+
g.value = (g.value + 1) % l.records.length;
|
|
97
|
+
}, U));
|
|
98
|
+
}
|
|
99
|
+
return d(S), u(() => _ && clearInterval(_)), (l, u) => n.records.length ? (f(), a("section", j, [
|
|
100
|
+
o("h2", M, h(l.$t(n.headingEntry)), 1),
|
|
101
|
+
o("div", N, [(f(!0), a(t, null, m(n.records, (t, n) => b((f(), r(e, {
|
|
102
|
+
key: t.id,
|
|
103
|
+
to: t.route,
|
|
104
|
+
class: "mwnf-featured-partners__card"
|
|
105
|
+
}, {
|
|
106
|
+
default: y(() => [t.logo ? (f(), a("span", P, [o("img", {
|
|
107
|
+
src: t.logo,
|
|
108
|
+
alt: t.name,
|
|
109
|
+
class: "mwnf-featured-partners__logo"
|
|
110
|
+
}, null, 8, F)])) : i("", !0), o("span", I, [
|
|
111
|
+
o("span", L, h(t.name), 1),
|
|
112
|
+
o("span", R, [t.city ? (f(), a("span", z, h(t.city) + ", ", 1)) : i("", !0), s(h(t.country), 1)]),
|
|
113
|
+
o("span", B, h(t.description), 1)
|
|
114
|
+
])]),
|
|
115
|
+
_: 2
|
|
116
|
+
}, 1032, ["to"])), [[v, n === g.value]])), 128))]),
|
|
117
|
+
n.records.length > 1 ? (f(), a("div", V, [(f(!0), a(t, null, m(n.records, (e, t) => (f(), a("button", {
|
|
118
|
+
key: e.id,
|
|
119
|
+
class: c(["mwnf-featured-partners__bullet", { "mwnf-featured-partners__bullet--active": t === g.value }]),
|
|
120
|
+
"aria-label": `${l.$t("core.action.show")} ${e.name}`,
|
|
121
|
+
onClick: (e) => x(t)
|
|
122
|
+
}, null, 10, H))), 128))])) : i("", !0)
|
|
123
|
+
])) : i("", !0);
|
|
124
|
+
}
|
|
125
|
+
}, G = { class: "mwnf-sibling-galleries" }, K = {
|
|
126
|
+
key: 0,
|
|
127
|
+
class: "mwnf-sibling-galleries__galleries"
|
|
128
|
+
}, q = { class: "mwnf-sibling-galleries__header" }, J = { class: "mwnf-sibling-galleries__heading" }, Y = ["href"], X = { class: "mwnf-sibling-galleries__grid" }, Z = {
|
|
129
|
+
key: 0,
|
|
130
|
+
class: "mwnf-sibling-galleries__image"
|
|
131
|
+
}, re = ["src", "alt"], ie = {
|
|
132
|
+
key: 1,
|
|
133
|
+
class: "mwnf-sibling-galleries__image mwnf-sibling-galleries__image--empty"
|
|
134
|
+
}, ae = { class: "mwnf-sibling-galleries__name" }, oe = {
|
|
135
|
+
key: 1,
|
|
136
|
+
class: "mwnf-sibling-galleries__museums"
|
|
137
|
+
}, se = { class: "mwnf-sibling-galleries__heading" }, ce = { class: "mwnf-sibling-galleries__museums-grid" }, le = ["href"], ue = { class: "mwnf-sibling-galleries__museum-image" }, de = { class: "mwnf-sibling-galleries__museum-name" }, fe = {
|
|
138
|
+
__name: "SiblingGalleries",
|
|
139
|
+
props: {
|
|
140
|
+
galleries: {
|
|
141
|
+
type: Array,
|
|
142
|
+
default: () => []
|
|
143
|
+
},
|
|
144
|
+
museums: {
|
|
145
|
+
type: Array,
|
|
146
|
+
default: () => []
|
|
147
|
+
},
|
|
148
|
+
galleriesHeadingEntry: {
|
|
149
|
+
type: String,
|
|
150
|
+
default: "sibling.galleries"
|
|
151
|
+
},
|
|
152
|
+
seeMoreGalleriesEntry: {
|
|
153
|
+
type: String,
|
|
154
|
+
default: "sibling.seeMoreGalleries"
|
|
155
|
+
},
|
|
156
|
+
seeMoreGalleriesHref: {
|
|
157
|
+
type: String,
|
|
158
|
+
default: ""
|
|
159
|
+
},
|
|
160
|
+
museumsHeadingEntry: {
|
|
161
|
+
type: String,
|
|
162
|
+
default: "sibling.otherVirtualMuseums"
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
setup(n) {
|
|
166
|
+
return (s, u) => (f(), a("section", G, [n.galleries.length ? (f(), a("div", K, [o("div", q, [o("p", J, h(s.$t(n.galleriesHeadingEntry)), 1), n.seeMoreGalleriesHref ? (f(), a("a", {
|
|
167
|
+
key: 0,
|
|
168
|
+
href: n.seeMoreGalleriesHref,
|
|
169
|
+
target: "_blank",
|
|
170
|
+
rel: "noopener",
|
|
171
|
+
class: "mwnf-sibling-galleries__see-more"
|
|
172
|
+
}, h(s.$t(n.seeMoreGalleriesEntry)) + " » ", 9, Y)) : i("", !0)]), o("div", X, [(f(!0), a(t, null, m(n.galleries, (t) => (f(), r(e, {
|
|
173
|
+
key: t.id,
|
|
174
|
+
to: t.route,
|
|
175
|
+
class: c(["mwnf-sibling-galleries__gallery", { "mwnf-sibling-galleries__gallery--no-link": !t.route }])
|
|
176
|
+
}, {
|
|
177
|
+
default: y(() => [t.image ? (f(), a("span", Z, [o("img", {
|
|
178
|
+
src: t.image,
|
|
179
|
+
alt: t.name
|
|
180
|
+
}, null, 8, re)])) : (f(), a("span", ie)), o("p", ae, h(t.name), 1)]),
|
|
181
|
+
_: 2
|
|
182
|
+
}, 1032, ["to", "class"]))), 128))])])) : i("", !0), n.museums.length ? (f(), a("div", oe, [o("div", se, h(s.$t(n.museumsHeadingEntry)), 1), o("div", ce, [(f(!0), a(t, null, m(n.museums, (e) => (f(), a("a", {
|
|
183
|
+
key: e.name,
|
|
184
|
+
href: e.href || e.to,
|
|
185
|
+
target: "_blank",
|
|
186
|
+
rel: "noopener",
|
|
187
|
+
class: "mwnf-sibling-galleries__museum",
|
|
188
|
+
style: l({
|
|
189
|
+
"--mwnf-museum-bg": e.accent || "var(--mwnf-color-border)",
|
|
190
|
+
"--mwnf-museum-text": e.textColor || "inherit"
|
|
191
|
+
})
|
|
192
|
+
}, [o("div", ue, h(e.name.split(" ").map((e) => e[0]).join("")), 1), o("p", de, h(e.name), 1)], 12, le))), 128))])])) : i("", !0)]));
|
|
193
|
+
}
|
|
194
|
+
}, pe = {
|
|
195
|
+
key: 0,
|
|
196
|
+
class: "mwnf-popup-logo"
|
|
197
|
+
}, me = ["aria-label"], he = ["innerHTML"], ge = ["innerHTML"], _e = {
|
|
198
|
+
__name: "PopupLogo",
|
|
199
|
+
props: {
|
|
200
|
+
content: {
|
|
201
|
+
type: String,
|
|
202
|
+
default: ""
|
|
203
|
+
},
|
|
204
|
+
rawHtml: {
|
|
205
|
+
type: Boolean,
|
|
206
|
+
default: !1
|
|
207
|
+
},
|
|
208
|
+
enabled: {
|
|
209
|
+
type: Boolean,
|
|
210
|
+
default: !0
|
|
211
|
+
},
|
|
212
|
+
closeLabel: {
|
|
213
|
+
type: String,
|
|
214
|
+
default: "core.action.close"
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
setup(e) {
|
|
218
|
+
let t = e, r = p(!1), s = n(() => t.rawHtml ? t.content : T(t.content)), c = n(() => t.enabled && !!t.content && !r.value);
|
|
219
|
+
return (t, n) => c.value ? (f(), a("div", pe, [o("button", {
|
|
220
|
+
class: "mwnf-popup-logo__close",
|
|
221
|
+
"aria-label": t.$t(e.closeLabel),
|
|
222
|
+
onClick: n[0] ||= (e) => r.value = !0
|
|
223
|
+
}, "✕", 8, me), e.rawHtml ? (f(), a("div", {
|
|
224
|
+
key: 0,
|
|
225
|
+
class: "mwnf-popup-logo__content",
|
|
226
|
+
innerHTML: s.value
|
|
227
|
+
}, null, 8, he)) : (f(), a("div", {
|
|
228
|
+
key: 1,
|
|
229
|
+
class: "mwnf-popup-logo__content",
|
|
230
|
+
innerHTML: s.value
|
|
231
|
+
}, null, 8, ge))])) : i("", !0);
|
|
232
|
+
}
|
|
233
|
+
}, ve = { class: "mwnf-back-link" }, ye = {
|
|
234
|
+
__name: "BackLink",
|
|
235
|
+
props: {
|
|
236
|
+
label: {
|
|
237
|
+
type: String,
|
|
238
|
+
default: "core.action.back"
|
|
239
|
+
},
|
|
240
|
+
to: {
|
|
241
|
+
type: [String, Object],
|
|
242
|
+
default: null
|
|
243
|
+
},
|
|
244
|
+
href: {
|
|
245
|
+
type: String,
|
|
246
|
+
default: ""
|
|
247
|
+
}
|
|
248
|
+
},
|
|
249
|
+
setup(t) {
|
|
250
|
+
let n = E();
|
|
251
|
+
function i() {
|
|
252
|
+
return window.history.length > 1;
|
|
253
|
+
}
|
|
254
|
+
function o(e) {
|
|
255
|
+
i() && (e.preventDefault(), n.back());
|
|
256
|
+
}
|
|
257
|
+
return (n, c) => (f(), a("div", ve, [!i() && (t.to || t.href) ? (f(), r(e, {
|
|
258
|
+
key: 0,
|
|
259
|
+
to: t.to,
|
|
260
|
+
href: t.href,
|
|
261
|
+
class: "mwnf-back-link__button"
|
|
262
|
+
}, {
|
|
263
|
+
default: y(() => [s(" ↩ " + h(n.$t(t.label)), 1)]),
|
|
264
|
+
_: 1
|
|
265
|
+
}, 8, ["to", "href"])) : (f(), a("button", {
|
|
266
|
+
key: 1,
|
|
267
|
+
class: "mwnf-back-link__button",
|
|
268
|
+
onClick: o
|
|
269
|
+
}, " ↩ " + h(n.$t(t.label)), 1))]));
|
|
270
|
+
}
|
|
271
|
+
}, be = ["dir"], xe = { class: "mwnf-glossary-tool__toggle" }, Se = { class: "mwnf-glossary-tool__panel" }, Ce = { class: "mwnf-glossary-tool__heading" }, we = { class: "mwnf-glossary-tool__instructions" }, Te = ["aria-expanded", "aria-label"], Ee = {
|
|
272
|
+
key: 0,
|
|
273
|
+
class: "mwnf-glossary-tool__hits",
|
|
274
|
+
role: "listbox"
|
|
275
|
+
}, De = [
|
|
276
|
+
"aria-selected",
|
|
277
|
+
"onClick",
|
|
278
|
+
"onKeydown"
|
|
279
|
+
], Oe = {
|
|
280
|
+
key: 1,
|
|
281
|
+
class: "mwnf-glossary-tool__no-results"
|
|
282
|
+
}, ke = {
|
|
283
|
+
key: 2,
|
|
284
|
+
class: "mwnf-glossary-tool__definition"
|
|
285
|
+
}, Ae = { class: "mwnf-glossary-tool__definition-label" }, je = ["innerHTML"], Me = {
|
|
286
|
+
__name: "GlossaryTool",
|
|
287
|
+
props: {
|
|
288
|
+
language: {
|
|
289
|
+
type: String,
|
|
290
|
+
default: ""
|
|
291
|
+
},
|
|
292
|
+
entity: {
|
|
293
|
+
type: String,
|
|
294
|
+
default: "glossary"
|
|
295
|
+
},
|
|
296
|
+
labels: {
|
|
297
|
+
type: Object,
|
|
298
|
+
default: () => ({})
|
|
299
|
+
},
|
|
300
|
+
dir: {
|
|
301
|
+
type: String,
|
|
302
|
+
default: ""
|
|
303
|
+
}
|
|
304
|
+
},
|
|
305
|
+
setup(e) {
|
|
306
|
+
let r = e, s = {
|
|
307
|
+
tool: "record.glossary.tool",
|
|
308
|
+
heading: "record.glossary.heading",
|
|
309
|
+
instructions: "record.glossary.instructions",
|
|
310
|
+
definition: "record.glossary.definition",
|
|
311
|
+
close: "record.glossary.close",
|
|
312
|
+
...r.labels
|
|
313
|
+
}, { t: l } = S(), u = p(""), d = p(null), v = p(-1), y = n(() => u.value.trim() ? ee(u.value, r.language, { entity: r.entity }) : []), w = n(() => y.value.length > 0 && !d.value), T = n(() => d.value ? C(d.value.definition) : ""), E = n(() => s.noResults ? l(s.noResults) : ""), D = n(() => !!E.value && u.value.trim() && !d.value && y.value.length === 0);
|
|
314
|
+
function O() {
|
|
315
|
+
d.value = null, v.value = -1;
|
|
316
|
+
}
|
|
317
|
+
function k(e) {
|
|
318
|
+
d.value = e, u.value = e.spelling, v.value = -1;
|
|
319
|
+
}
|
|
320
|
+
function A(e) {
|
|
321
|
+
w.value && (e.key === "ArrowDown" ? (e.preventDefault(), v.value = (v.value + 1) % y.value.length) : e.key === "ArrowUp" ? (e.preventDefault(), v.value = (v.value - 1 + y.value.length) % y.value.length) : e.key === "Enter" && v.value >= 0 ? (e.preventDefault(), k(y.value[v.value])) : e.key === "Escape" && (v.value = -1));
|
|
322
|
+
}
|
|
323
|
+
return (n, r) => (f(), a("details", {
|
|
324
|
+
class: "mwnf-glossary-tool",
|
|
325
|
+
dir: e.dir || void 0
|
|
326
|
+
}, [o("summary", xe, h(g(l)(s.tool)), 1), o("div", Se, [
|
|
327
|
+
o("p", Ce, h(g(l)(s.heading)), 1),
|
|
328
|
+
o("p", we, h(g(l)(s.instructions)), 1),
|
|
329
|
+
b(o("input", {
|
|
330
|
+
"onUpdate:modelValue": r[0] ||= (e) => u.value = e,
|
|
331
|
+
type: "text",
|
|
332
|
+
class: "mwnf-glossary-tool__input",
|
|
333
|
+
role: "combobox",
|
|
334
|
+
"aria-autocomplete": "list",
|
|
335
|
+
"aria-expanded": w.value,
|
|
336
|
+
"aria-label": g(l)(s.heading),
|
|
337
|
+
onInput: O,
|
|
338
|
+
onKeydown: A
|
|
339
|
+
}, null, 40, Te), [[_, u.value]]),
|
|
340
|
+
w.value ? (f(), a("ul", Ee, [(f(!0), a(t, null, m(y.value, (e, t) => (f(), a("li", {
|
|
341
|
+
key: e.id,
|
|
342
|
+
role: "option",
|
|
343
|
+
"aria-selected": t === v.value,
|
|
344
|
+
tabindex: "0",
|
|
345
|
+
class: c(["mwnf-glossary-tool__hit", { "mwnf-glossary-tool__hit--active": t === v.value }]),
|
|
346
|
+
onClick: (t) => k(e),
|
|
347
|
+
onKeydown: x((t) => k(e), ["enter"])
|
|
348
|
+
}, h(e.spelling), 43, De))), 128))])) : D.value ? (f(), a("p", Oe, h(E.value), 1)) : i("", !0),
|
|
349
|
+
d.value ? (f(), a("div", ke, [o("p", Ae, h(g(l)(s.definition)), 1), o("div", {
|
|
350
|
+
class: "mwnf-sheet__block",
|
|
351
|
+
innerHTML: T.value
|
|
352
|
+
}, null, 8, je)])) : i("", !0)
|
|
353
|
+
])], 8, be));
|
|
354
|
+
}
|
|
355
|
+
}, Ne = ["dir"], Pe = ["innerHTML"], Fe = { class: "mwnf-dynasty__body" }, Q = { class: "mwnf-dynasty__eyebrow" }, Ie = {
|
|
356
|
+
key: 0,
|
|
357
|
+
class: "mwnf-dynasty__field"
|
|
358
|
+
}, Le = { class: "mwnf-dynasty__label" }, Re = {
|
|
359
|
+
key: 1,
|
|
360
|
+
class: "mwnf-dynasty__field"
|
|
361
|
+
}, ze = { class: "mwnf-dynasty__label" }, Be = {
|
|
362
|
+
key: 2,
|
|
363
|
+
class: "mwnf-dynasty__dates"
|
|
364
|
+
}, Ve = {
|
|
365
|
+
key: 3,
|
|
366
|
+
class: "mwnf-dynasty__history"
|
|
367
|
+
}, He = { class: "mwnf-dynasty__label" }, Ue = ["innerHTML"], $ = {
|
|
368
|
+
__name: "DynastyPopout",
|
|
369
|
+
props: {
|
|
370
|
+
dynasty: {
|
|
371
|
+
type: Object,
|
|
372
|
+
required: !0
|
|
373
|
+
},
|
|
374
|
+
text: {
|
|
375
|
+
type: Object,
|
|
376
|
+
default: () => ({})
|
|
377
|
+
},
|
|
378
|
+
dir: {
|
|
379
|
+
type: String,
|
|
380
|
+
default: ""
|
|
381
|
+
}
|
|
382
|
+
},
|
|
383
|
+
setup(e) {
|
|
384
|
+
let t = e, { t: r } = S(), c = n(() => {
|
|
385
|
+
let { from_ad: e, to_ad: n, from_ah: r, to_ah: i } = t.dynasty ?? {};
|
|
386
|
+
return e == null && n == null ? "" : `${r != null || i != null ? `AH ${r ?? "?"}–${i ?? "?"} / ` : ""}AD ${e ?? "?"}–${n ?? "?"}`;
|
|
387
|
+
});
|
|
388
|
+
return (t, n) => (f(), a("details", {
|
|
389
|
+
class: "mwnf-dynasty",
|
|
390
|
+
dir: e.dir || void 0
|
|
391
|
+
}, [o("summary", {
|
|
392
|
+
class: "mwnf-dynasty__summary",
|
|
393
|
+
innerHTML: g(w)(e.text.name || e.dynasty.id)
|
|
394
|
+
}, null, 8, Pe), o("div", Fe, [
|
|
395
|
+
o("p", Q, h(g(r)("record.dynasty.heading")), 1),
|
|
396
|
+
e.text.also_known_as ? (f(), a("p", Ie, [o("span", Le, h(g(r)("sheet.field.alsoKnownAs")) + ":", 1), s(" " + h(e.text.also_known_as), 1)])) : i("", !0),
|
|
397
|
+
e.text.area ? (f(), a("p", Re, [o("span", ze, h(g(r)("sheet.field.area")) + ":", 1), s(" " + h(e.text.area), 1)])) : i("", !0),
|
|
398
|
+
c.value ? (f(), a("p", Be, h(c.value), 1)) : i("", !0),
|
|
399
|
+
e.text.history ? (f(), a("div", Ve, [o("p", He, h(g(r)("sheet.field.history")), 1), o("div", {
|
|
400
|
+
class: "mwnf-sheet__block",
|
|
401
|
+
innerHTML: g(C)(e.text.history)
|
|
402
|
+
}, null, 8, Ue)])) : i("", !0)
|
|
403
|
+
])], 8, Ne));
|
|
404
|
+
}
|
|
405
|
+
}, We = ["dir"], Ge = {
|
|
406
|
+
key: 0,
|
|
407
|
+
class: "mwnf-dynasty-list__heading"
|
|
408
|
+
}, Ke = {
|
|
409
|
+
__name: "DynastyList",
|
|
410
|
+
props: {
|
|
411
|
+
heading: {
|
|
412
|
+
type: String,
|
|
413
|
+
default: ""
|
|
414
|
+
},
|
|
415
|
+
dynasties: {
|
|
416
|
+
type: Array,
|
|
417
|
+
default: () => []
|
|
418
|
+
},
|
|
419
|
+
tr: {
|
|
420
|
+
type: Function,
|
|
421
|
+
default: null
|
|
422
|
+
},
|
|
423
|
+
dir: {
|
|
424
|
+
type: String,
|
|
425
|
+
default: ""
|
|
426
|
+
}
|
|
427
|
+
},
|
|
428
|
+
setup(e) {
|
|
429
|
+
return (n, o) => e.dynasties.length ? (f(), a("section", {
|
|
430
|
+
key: 0,
|
|
431
|
+
class: "mwnf-dynasty-list",
|
|
432
|
+
dir: e.dir || void 0
|
|
433
|
+
}, [e.heading ? (f(), a("h2", Ge, h(e.heading), 1)) : i("", !0), (f(!0), a(t, null, m(e.dynasties, (t) => (f(), r($, {
|
|
434
|
+
key: t.id,
|
|
435
|
+
dynasty: t,
|
|
436
|
+
text: e.tr ? e.tr(t) : t,
|
|
437
|
+
dir: e.dir
|
|
438
|
+
}, null, 8, [
|
|
439
|
+
"dynasty",
|
|
440
|
+
"text",
|
|
441
|
+
"dir"
|
|
442
|
+
]))), 128))], 8, We)) : i("", !0);
|
|
443
|
+
}
|
|
444
|
+
};
|
|
445
|
+
//#endregion
|
|
446
|
+
export { _e as a, ne as c, ye as i, $ as n, fe as o, Me as r, W as s, Ke as t };
|
package/dist/content.js
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { _ as e, a as t, c as n, d as r, f as i, g as a, h as o, i as s, l as c, m as l, n as u, o as d, p as f, r as p, s as m, t as h, u as g } from "./TimelineEventList-59g_1ksf.js";
|
|
2
|
+
import { a as _, c as v, i as y, n as b, o as x, r as S, s as C, t as w } from "./content-BvhCFMQ9.js";
|
|
3
|
+
export { y as BackLink, w as DynastyList, b as DynastyPopout, i as FacetSelect, C as FeaturedPartners, a as FeaturedRecord, r as FilterPanel, u as GlossaryPopover, S as GlossaryTool, p as MediaGallery, f as Pagination, v as PartnerMap, _ as PopupLogo, d as RecordCredits, l as RecordGrid, c as RecordLanguages, o as RecordList, n as RecordSheet, s as RelatedRecords, g as ResultsSummary, e as SectionCards, m as SheetSection, x as SiblingGalleries, t as SourceCredit, h as TimelineEventList };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { a as e, c as t, i as n, n as r, o as i, r as a, s as o, t as s } from "./PageShell-CbJ9lQoQ.js";
|
|
2
|
+
import { _ as c, a as l, c as u, d, f, g as p, h as m, i as h, l as g, m as _, n as v, o as y, p as b, r as x, s as S, t as C, u as w } from "./TimelineEventList-59g_1ksf.js";
|
|
3
|
+
import { a as T, c as E, i as D, n as O, o as k, r as A, s as j, t as M } from "./content-BvhCFMQ9.js";
|
|
4
|
+
export { o as AppBanner, e as AppContent, r as AppFooter, t as AppHeader, n as AppHyperlinks, i as AppNavigation, a as AppSponsors, D as BackLink, M as DynastyList, O as DynastyPopout, f as FacetSelect, j as FeaturedPartners, p as FeaturedRecord, d as FilterPanel, v as GlossaryPopover, A as GlossaryTool, x as MediaGallery, s as PageShell, b as Pagination, E as PartnerMap, T as PopupLogo, y as RecordCredits, _ as RecordGrid, g as RecordLanguages, m as RecordList, u as RecordSheet, h as RelatedRecords, w as ResultsSummary, c as SectionCards, S as SheetSection, k as SiblingGalleries, l as SourceCredit, C as TimelineEventList };
|