@museumwnf/viewer-layout 2.16.0 → 2.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -5
- package/dist/BackLink-CYgmd0iX.js +73 -0
- package/dist/OnDisplayIn-ZfRUtPd1.js +547 -0
- package/dist/content-CvUktO-g.js +454 -0
- package/dist/content.js +5 -5
- package/dist/dxa.js +1 -1
- package/dist/index.js +5 -5
- package/dist/viewer-layout.css +1 -1
- package/dist/views.js +395 -399
- package/package.json +2 -2
- package/src/tokens.reference.css +21 -1
- package/dist/BackLink-LfSIuXnL.js +0 -45
- package/dist/TimelineLookup-D-p1aQ_Z.js +0 -444
- package/dist/content-DncTPD5P.js +0 -378
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@museumwnf/viewer-layout",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.17.0",
|
|
4
4
|
"description": "Page structure for MWNF websites: PageShell composing seven optional, token-styled sections, the content components a page is made of, and the composed views a website names instead of writing a page.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"vue-router": "^4.5.0 || ^5.0.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@museumwnf/viewer-core": "^2.
|
|
43
|
+
"@museumwnf/viewer-core": "^2.2.0",
|
|
44
44
|
"@vitejs/plugin-vue": "^6.0.8",
|
|
45
45
|
"@vue/test-utils": "^2.4.11",
|
|
46
46
|
"jsdom": "^30.0.1",
|
package/src/tokens.reference.css
CHANGED
|
@@ -338,7 +338,26 @@
|
|
|
338
338
|
/* --mwnf-sheet-related-reference-gap: 0.5rem; Gap in an outside-reference row */
|
|
339
339
|
/* --mwnf-sheet-related-reference-padding: 0.1875rem 0; Padding of an outside-reference row */
|
|
340
340
|
/* --mwnf-sheet-related-unresolved-color: #8a8a8a; "Not in this gallery/exhibition" note color */
|
|
341
|
-
/* --mwnf-sheet-related-unresolved-size: 0.75rem; Its text size */
|
|
341
|
+
/* --mwnf-sheet-related-unresolved-size: 0.75rem; Its text size (also OnDisplayIn's pending note) */
|
|
342
|
+
|
|
343
|
+
/* ---------- Content: item-page blocks ---------- */
|
|
344
|
+
/* --mwnf-special-features-gap: 1rem; Space under one special feature */
|
|
345
|
+
/* --mwnf-special-features-name-gap: 0.25rem; Space under its name and each meta line */
|
|
346
|
+
/* --mwnf-special-features-name-size: 0.9375rem; Its name's size */
|
|
347
|
+
/* --mwnf-special-features-name-weight: 500; Its name's weight */
|
|
348
|
+
/* --mwnf-special-features-name-color: inherit; Its name's color */
|
|
349
|
+
/* --mwnf-special-features-meta-size: 0.75rem; Location, dates and artists: size */
|
|
350
|
+
/* --mwnf-special-features-meta-color: #555555; Their color */
|
|
351
|
+
/* --mwnf-related-media-gap: 0.375rem; Space above one audio/video entry */
|
|
352
|
+
/* --mwnf-related-media-link-size: inherit; Its title link's size */
|
|
353
|
+
/* --mwnf-related-media-link-weight: inherit; Its title link's weight */
|
|
354
|
+
/* --mwnf-related-media-link-color: var(--mwnf-link-text, #0000ff); Its title link's color */
|
|
355
|
+
/* --mwnf-related-media-description-gap: 0.125rem; Space above its description */
|
|
356
|
+
/* --mwnf-related-media-description-size: 0.75rem; Its description's size */
|
|
357
|
+
/* --mwnf-related-media-description-color: #555555; Its description's color */
|
|
358
|
+
/* --mwnf-on-display-size: inherit; On display in: the list's text size */
|
|
359
|
+
/* --mwnf-on-display-gap: 0.375rem; Space above one place */
|
|
360
|
+
/* --mwnf-on-display-link-color: var(--mwnf-link-text, #0000ff); A place's link color */
|
|
342
361
|
/* --mwnf-sheet-timeline-trigger-color: inherit; The "timeline for this item" trigger line */
|
|
343
362
|
/* --mwnf-sheet-timeline-popout-width: 40rem; Timeline popout max width */
|
|
344
363
|
/* --mwnf-sheet-timeline-popout-margin: 0.5rem 0 0.875rem; Timeline popout margin */
|
|
@@ -731,6 +750,7 @@
|
|
|
731
750
|
/* --mwnf-back-bar-text: inherit; Back bar text color */
|
|
732
751
|
/* --mwnf-back-bar-size: 0.9375rem; Back bar text size */
|
|
733
752
|
/* --mwnf-back-bar-hover-text: inherit; Back bar hover text color */
|
|
753
|
+
/* --mwnf-back-bar-margin: 0; BackLink variant="bar": the link's margin */
|
|
734
754
|
|
|
735
755
|
/* --mwnf-chip-padding: 0.0625rem 0.5rem; Chip padding */
|
|
736
756
|
/* --mwnf-chip-size: 0.75rem; Chip text size */
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { v as e } from "./TimelineEventList-D5Hot788.js";
|
|
2
|
-
import { createBlock as t, createElementBlock as n, createTextVNode as r, openBlock as i, toDisplayString as a, withCtx as o } from "vue";
|
|
3
|
-
import { useRouter as s } from "vue-router";
|
|
4
|
-
//#region src/content/BackLink.vue
|
|
5
|
-
var c = { class: "mwnf-back-link" }, l = {
|
|
6
|
-
__name: "BackLink",
|
|
7
|
-
props: {
|
|
8
|
-
label: {
|
|
9
|
-
type: String,
|
|
10
|
-
default: "core.action.back"
|
|
11
|
-
},
|
|
12
|
-
to: {
|
|
13
|
-
type: [String, Object],
|
|
14
|
-
default: null
|
|
15
|
-
},
|
|
16
|
-
href: {
|
|
17
|
-
type: String,
|
|
18
|
-
default: ""
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
setup(l) {
|
|
22
|
-
let u = s();
|
|
23
|
-
function d() {
|
|
24
|
-
return window.history.length > 1;
|
|
25
|
-
}
|
|
26
|
-
function f(e) {
|
|
27
|
-
d() && (e.preventDefault(), u.back());
|
|
28
|
-
}
|
|
29
|
-
return (s, u) => (i(), n("div", c, [!d() && (l.to || l.href) ? (i(), t(e, {
|
|
30
|
-
key: 0,
|
|
31
|
-
to: l.to,
|
|
32
|
-
href: l.href,
|
|
33
|
-
class: "mwnf-back-link__button"
|
|
34
|
-
}, {
|
|
35
|
-
default: o(() => [r(" ↩ " + a(s.$t(l.label)), 1)]),
|
|
36
|
-
_: 1
|
|
37
|
-
}, 8, ["to", "href"])) : (i(), n("button", {
|
|
38
|
-
key: 1,
|
|
39
|
-
class: "mwnf-back-link__button",
|
|
40
|
-
onClick: f
|
|
41
|
-
}, " ↩ " + a(s.$t(l.label)), 1))]));
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
//#endregion
|
|
45
|
-
export { l as t };
|
|
@@ -1,444 +0,0 @@
|
|
|
1
|
-
import { v as e } from "./TimelineEventList-D5Hot788.js";
|
|
2
|
-
import { Fragment as t, computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createTextVNode as s, createVNode as c, normalizeClass as l, openBlock as u, ref as d, renderList as f, renderSlot as p, toDisplayString as m, unref as h, useSlots as g, vModelSelect as _, vModelText as v, watch as y, withCtx as b, withDirectives as x, withKeys as S } from "vue";
|
|
3
|
-
import { useI18n as C } from "@museumwnf/viewer-core/i18n";
|
|
4
|
-
import { md as w, mdInline as T, searchGlossary as E } from "@museumwnf/viewer-core";
|
|
5
|
-
//#region src/content/SectionCards.vue
|
|
6
|
-
var D = ["innerHTML"], O = ["innerHTML"], k = {
|
|
7
|
-
key: 1,
|
|
8
|
-
class: "mwnf-cards__action"
|
|
9
|
-
}, A = {
|
|
10
|
-
key: 0,
|
|
11
|
-
class: "mwnf-cards__image-container"
|
|
12
|
-
}, j = ["src", "alt"], ee = { class: "mwnf-cards__content" }, te = {
|
|
13
|
-
key: 0,
|
|
14
|
-
class: "mwnf-cards__number"
|
|
15
|
-
}, ne = ["innerHTML"], M = ["innerHTML"], N = {
|
|
16
|
-
key: 0,
|
|
17
|
-
class: "mwnf-cards__image-container"
|
|
18
|
-
}, P = ["src", "alt"], F = {
|
|
19
|
-
key: 1,
|
|
20
|
-
class: "mwnf-cards__number"
|
|
21
|
-
}, I = ["innerHTML"], L = {
|
|
22
|
-
key: 3,
|
|
23
|
-
class: "mwnf-cards__details"
|
|
24
|
-
}, R = { class: "mwnf-cards__summary" }, z = {
|
|
25
|
-
key: 0,
|
|
26
|
-
class: "mwnf-cards__number"
|
|
27
|
-
}, B = ["innerHTML"], V = {
|
|
28
|
-
key: 0,
|
|
29
|
-
class: "mwnf-cards__children"
|
|
30
|
-
}, H = {
|
|
31
|
-
__name: "SectionCards",
|
|
32
|
-
props: {
|
|
33
|
-
cards: {
|
|
34
|
-
type: Array,
|
|
35
|
-
default: () => []
|
|
36
|
-
},
|
|
37
|
-
variant: {
|
|
38
|
-
type: String,
|
|
39
|
-
default: "cards",
|
|
40
|
-
validate: (e) => [
|
|
41
|
-
"cards",
|
|
42
|
-
"rows",
|
|
43
|
-
"covers",
|
|
44
|
-
"accordion"
|
|
45
|
-
].includes(e)
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
setup(n) {
|
|
49
|
-
return (d, p) => n.cards.length ? (u(), a("ul", {
|
|
50
|
-
key: 0,
|
|
51
|
-
class: l(["mwnf-cards", `mwnf-cards--${n.variant}`])
|
|
52
|
-
}, [(u(!0), a(t, null, f(n.cards, (d) => (u(), a("li", {
|
|
53
|
-
key: d.href ?? d.title,
|
|
54
|
-
class: l(["mwnf-cards__card"])
|
|
55
|
-
}, [n.variant === "cards" ? (u(), r(e, {
|
|
56
|
-
key: 0,
|
|
57
|
-
class: "mwnf-cards__link",
|
|
58
|
-
to: d.to,
|
|
59
|
-
href: d.href
|
|
60
|
-
}, {
|
|
61
|
-
default: b(() => [
|
|
62
|
-
o("span", {
|
|
63
|
-
class: "mwnf-cards__title",
|
|
64
|
-
innerHTML: h(T)(d.title)
|
|
65
|
-
}, null, 8, D),
|
|
66
|
-
d.description ? (u(), a("span", {
|
|
67
|
-
key: 0,
|
|
68
|
-
class: "mwnf-cards__text",
|
|
69
|
-
innerHTML: h(T)(d.description)
|
|
70
|
-
}, null, 8, O)) : i("", !0),
|
|
71
|
-
d.action ? (u(), a("span", k, m(d.action) + " →", 1)) : i("", !0)
|
|
72
|
-
]),
|
|
73
|
-
_: 2
|
|
74
|
-
}, 1032, ["to", "href"])) : n.variant === "rows" ? (u(), r(e, {
|
|
75
|
-
key: 1,
|
|
76
|
-
class: "mwnf-cards__link",
|
|
77
|
-
to: d.to,
|
|
78
|
-
href: d.href
|
|
79
|
-
}, {
|
|
80
|
-
default: b(() => [d.image ? (u(), a("div", A, [o("img", {
|
|
81
|
-
class: "mwnf-cards__image",
|
|
82
|
-
src: d.image,
|
|
83
|
-
alt: d.alt || ""
|
|
84
|
-
}, null, 8, j)])) : i("", !0), o("div", ee, [
|
|
85
|
-
d.number ? (u(), a("span", te, m(d.number), 1)) : i("", !0),
|
|
86
|
-
o("span", {
|
|
87
|
-
class: "mwnf-cards__title",
|
|
88
|
-
innerHTML: h(T)(d.title)
|
|
89
|
-
}, null, 8, ne),
|
|
90
|
-
d.description ? (u(), a("span", {
|
|
91
|
-
key: 1,
|
|
92
|
-
class: "mwnf-cards__text",
|
|
93
|
-
innerHTML: h(T)(d.description)
|
|
94
|
-
}, null, 8, M)) : i("", !0)
|
|
95
|
-
])]),
|
|
96
|
-
_: 2
|
|
97
|
-
}, 1032, ["to", "href"])) : n.variant === "covers" ? (u(), r(e, {
|
|
98
|
-
key: 2,
|
|
99
|
-
class: "mwnf-cards__link",
|
|
100
|
-
to: d.to,
|
|
101
|
-
href: d.href
|
|
102
|
-
}, {
|
|
103
|
-
default: b(() => [
|
|
104
|
-
d.image ? (u(), a("div", N, [o("img", {
|
|
105
|
-
class: "mwnf-cards__image",
|
|
106
|
-
src: d.image,
|
|
107
|
-
alt: d.alt || ""
|
|
108
|
-
}, null, 8, P)])) : i("", !0),
|
|
109
|
-
d.number ? (u(), a("span", F, m(d.number), 1)) : i("", !0),
|
|
110
|
-
o("span", {
|
|
111
|
-
class: "mwnf-cards__title",
|
|
112
|
-
innerHTML: h(T)(d.title)
|
|
113
|
-
}, null, 8, I)
|
|
114
|
-
]),
|
|
115
|
-
_: 2
|
|
116
|
-
}, 1032, ["to", "href"])) : n.variant === "accordion" ? (u(), a("details", L, [o("summary", R, [d.number ? (u(), a("span", z, m(d.number), 1)) : i("", !0), o("span", {
|
|
117
|
-
class: "mwnf-cards__title",
|
|
118
|
-
innerHTML: h(T)(d.title)
|
|
119
|
-
}, null, 8, B)]), d.children?.length ? (u(), a("ul", V, [(u(!0), a(t, null, f(d.children, (t) => (u(), a("li", {
|
|
120
|
-
key: t.href ?? t.title,
|
|
121
|
-
class: "mwnf-cards__child"
|
|
122
|
-
}, [c(e, {
|
|
123
|
-
class: "mwnf-cards__child-link",
|
|
124
|
-
to: t.to,
|
|
125
|
-
href: t.href
|
|
126
|
-
}, {
|
|
127
|
-
default: b(() => [s(m(t.title), 1)]),
|
|
128
|
-
_: 2
|
|
129
|
-
}, 1032, ["to", "href"])]))), 128))])) : i("", !0)])) : i("", !0)]))), 128))], 2)) : i("", !0);
|
|
130
|
-
}
|
|
131
|
-
}, U = {
|
|
132
|
-
key: 0,
|
|
133
|
-
class: "mwnf-featured"
|
|
134
|
-
}, W = {
|
|
135
|
-
key: 0,
|
|
136
|
-
class: "mwnf-featured__heading"
|
|
137
|
-
}, G = {
|
|
138
|
-
key: 0,
|
|
139
|
-
class: "mwnf-featured__media"
|
|
140
|
-
}, K = ["src", "alt"], q = { class: "mwnf-featured__body" }, J = {
|
|
141
|
-
key: 0,
|
|
142
|
-
class: "mwnf-featured__eyebrow"
|
|
143
|
-
}, Y = ["innerHTML"], X = {
|
|
144
|
-
key: 1,
|
|
145
|
-
class: "mwnf-featured__action"
|
|
146
|
-
}, Z = {
|
|
147
|
-
__name: "FeaturedRecord",
|
|
148
|
-
props: {
|
|
149
|
-
image: {
|
|
150
|
-
type: String,
|
|
151
|
-
default: ""
|
|
152
|
-
},
|
|
153
|
-
imageAlt: {
|
|
154
|
-
type: String,
|
|
155
|
-
default: ""
|
|
156
|
-
},
|
|
157
|
-
eyebrow: {
|
|
158
|
-
type: String,
|
|
159
|
-
default: ""
|
|
160
|
-
},
|
|
161
|
-
name: {
|
|
162
|
-
type: String,
|
|
163
|
-
default: ""
|
|
164
|
-
},
|
|
165
|
-
meta: {
|
|
166
|
-
type: Array,
|
|
167
|
-
default: () => []
|
|
168
|
-
},
|
|
169
|
-
action: {
|
|
170
|
-
type: String,
|
|
171
|
-
default: ""
|
|
172
|
-
},
|
|
173
|
-
to: {
|
|
174
|
-
type: [String, Object],
|
|
175
|
-
default: null
|
|
176
|
-
},
|
|
177
|
-
href: {
|
|
178
|
-
type: String,
|
|
179
|
-
default: ""
|
|
180
|
-
},
|
|
181
|
-
heading: {
|
|
182
|
-
type: String,
|
|
183
|
-
default: ""
|
|
184
|
-
}
|
|
185
|
-
},
|
|
186
|
-
setup(r) {
|
|
187
|
-
let s = r, l = g(), d = n(() => !!(s.name || s.image || l.default));
|
|
188
|
-
return (n, s) => d.value ? (u(), a("section", U, [r.heading ? (u(), a("h2", W, m(r.heading), 1)) : i("", !0), p(n.$slots, "default", {}, () => [c(e, {
|
|
189
|
-
class: "mwnf-featured__link",
|
|
190
|
-
to: r.to,
|
|
191
|
-
href: r.href
|
|
192
|
-
}, {
|
|
193
|
-
default: b(() => [r.image ? (u(), a("span", G, [o("img", {
|
|
194
|
-
class: "mwnf-featured__image",
|
|
195
|
-
src: r.image,
|
|
196
|
-
alt: r.imageAlt,
|
|
197
|
-
loading: "eager"
|
|
198
|
-
}, null, 8, K)])) : i("", !0), o("span", q, [
|
|
199
|
-
r.eyebrow ? (u(), a("span", J, m(r.eyebrow), 1)) : i("", !0),
|
|
200
|
-
o("span", {
|
|
201
|
-
class: "mwnf-featured__name",
|
|
202
|
-
innerHTML: r.name
|
|
203
|
-
}, null, 8, Y),
|
|
204
|
-
(u(!0), a(t, null, f(r.meta, (e, t) => (u(), a("span", {
|
|
205
|
-
key: t,
|
|
206
|
-
class: "mwnf-featured__meta"
|
|
207
|
-
}, m(e), 1))), 128)),
|
|
208
|
-
r.action ? (u(), a("span", X, m(r.action) + " →", 1)) : i("", !0)
|
|
209
|
-
])]),
|
|
210
|
-
_: 1
|
|
211
|
-
}, 8, ["to", "href"])])])) : i("", !0);
|
|
212
|
-
}
|
|
213
|
-
}, re = ["dir"], ie = { class: "mwnf-glossary-tool__toggle" }, ae = { class: "mwnf-glossary-tool__panel" }, oe = { class: "mwnf-glossary-tool__heading" }, se = { class: "mwnf-glossary-tool__instructions" }, ce = ["aria-expanded", "aria-label"], le = {
|
|
214
|
-
key: 0,
|
|
215
|
-
class: "mwnf-glossary-tool__hits",
|
|
216
|
-
role: "listbox"
|
|
217
|
-
}, ue = [
|
|
218
|
-
"aria-selected",
|
|
219
|
-
"onClick",
|
|
220
|
-
"onKeydown"
|
|
221
|
-
], de = {
|
|
222
|
-
key: 1,
|
|
223
|
-
class: "mwnf-glossary-tool__no-results"
|
|
224
|
-
}, fe = {
|
|
225
|
-
key: 2,
|
|
226
|
-
class: "mwnf-glossary-tool__definition"
|
|
227
|
-
}, pe = { class: "mwnf-glossary-tool__definition-label" }, me = ["innerHTML"], he = {
|
|
228
|
-
__name: "GlossaryTool",
|
|
229
|
-
props: {
|
|
230
|
-
language: {
|
|
231
|
-
type: String,
|
|
232
|
-
default: ""
|
|
233
|
-
},
|
|
234
|
-
entity: {
|
|
235
|
-
type: String,
|
|
236
|
-
default: "glossary"
|
|
237
|
-
},
|
|
238
|
-
labels: {
|
|
239
|
-
type: Object,
|
|
240
|
-
default: () => ({})
|
|
241
|
-
},
|
|
242
|
-
dir: {
|
|
243
|
-
type: String,
|
|
244
|
-
default: ""
|
|
245
|
-
}
|
|
246
|
-
},
|
|
247
|
-
setup(e) {
|
|
248
|
-
let r = e, s = {
|
|
249
|
-
tool: "record.glossary.tool",
|
|
250
|
-
heading: "record.glossary.heading",
|
|
251
|
-
instructions: "record.glossary.instructions",
|
|
252
|
-
definition: "record.glossary.definition",
|
|
253
|
-
close: "record.glossary.close",
|
|
254
|
-
...r.labels
|
|
255
|
-
}, { t: c } = C(), p = d(""), g = d(null), _ = d(-1), y = n(() => p.value.trim() ? E(p.value, r.language, { entity: r.entity }) : []), b = n(() => y.value.length > 0 && !g.value), T = n(() => g.value ? w(g.value.definition) : ""), D = n(() => s.noResults ? c(s.noResults) : ""), O = n(() => !!D.value && p.value.trim() && !g.value && y.value.length === 0);
|
|
256
|
-
function k() {
|
|
257
|
-
g.value = null, _.value = -1;
|
|
258
|
-
}
|
|
259
|
-
function A(e) {
|
|
260
|
-
g.value = e, p.value = e.spelling, _.value = -1;
|
|
261
|
-
}
|
|
262
|
-
function j(e) {
|
|
263
|
-
b.value && (e.key === "ArrowDown" ? (e.preventDefault(), _.value = (_.value + 1) % y.value.length) : e.key === "ArrowUp" ? (e.preventDefault(), _.value = (_.value - 1 + y.value.length) % y.value.length) : e.key === "Enter" && _.value >= 0 ? (e.preventDefault(), A(y.value[_.value])) : e.key === "Escape" && (_.value = -1));
|
|
264
|
-
}
|
|
265
|
-
return (n, r) => (u(), a("details", {
|
|
266
|
-
class: "mwnf-glossary-tool",
|
|
267
|
-
dir: e.dir || void 0
|
|
268
|
-
}, [o("summary", ie, m(h(c)(s.tool)), 1), o("div", ae, [
|
|
269
|
-
o("p", oe, m(h(c)(s.heading)), 1),
|
|
270
|
-
o("p", se, m(h(c)(s.instructions)), 1),
|
|
271
|
-
x(o("input", {
|
|
272
|
-
"onUpdate:modelValue": r[0] ||= (e) => p.value = e,
|
|
273
|
-
type: "text",
|
|
274
|
-
class: "mwnf-glossary-tool__input",
|
|
275
|
-
role: "combobox",
|
|
276
|
-
"aria-autocomplete": "list",
|
|
277
|
-
"aria-expanded": b.value,
|
|
278
|
-
"aria-label": h(c)(s.heading),
|
|
279
|
-
onInput: k,
|
|
280
|
-
onKeydown: j
|
|
281
|
-
}, null, 40, ce), [[v, p.value]]),
|
|
282
|
-
b.value ? (u(), a("ul", le, [(u(!0), a(t, null, f(y.value, (e, t) => (u(), a("li", {
|
|
283
|
-
key: e.id,
|
|
284
|
-
role: "option",
|
|
285
|
-
"aria-selected": t === _.value,
|
|
286
|
-
tabindex: "0",
|
|
287
|
-
class: l(["mwnf-glossary-tool__hit", { "mwnf-glossary-tool__hit--active": t === _.value }]),
|
|
288
|
-
onClick: (t) => A(e),
|
|
289
|
-
onKeydown: S((t) => A(e), ["enter"])
|
|
290
|
-
}, m(e.spelling), 43, ue))), 128))])) : O.value ? (u(), a("p", de, m(D.value), 1)) : i("", !0),
|
|
291
|
-
g.value ? (u(), a("div", fe, [o("p", pe, m(h(c)(s.definition)), 1), o("div", {
|
|
292
|
-
class: "mwnf-sheet__block",
|
|
293
|
-
innerHTML: T.value
|
|
294
|
-
}, null, 8, me)])) : i("", !0)
|
|
295
|
-
])], 8, re));
|
|
296
|
-
}
|
|
297
|
-
}, ge = ["dir"], _e = ["innerHTML"], ve = { class: "mwnf-dynasty__body" }, ye = { class: "mwnf-dynasty__eyebrow" }, be = {
|
|
298
|
-
key: 0,
|
|
299
|
-
class: "mwnf-dynasty__field"
|
|
300
|
-
}, xe = { class: "mwnf-dynasty__label" }, Se = {
|
|
301
|
-
key: 1,
|
|
302
|
-
class: "mwnf-dynasty__field"
|
|
303
|
-
}, Ce = { class: "mwnf-dynasty__label" }, we = {
|
|
304
|
-
key: 2,
|
|
305
|
-
class: "mwnf-dynasty__dates"
|
|
306
|
-
}, Te = {
|
|
307
|
-
key: 3,
|
|
308
|
-
class: "mwnf-dynasty__history"
|
|
309
|
-
}, Ee = { class: "mwnf-dynasty__label" }, De = ["innerHTML"], Q = {
|
|
310
|
-
__name: "DynastyPopout",
|
|
311
|
-
props: {
|
|
312
|
-
dynasty: {
|
|
313
|
-
type: Object,
|
|
314
|
-
required: !0
|
|
315
|
-
},
|
|
316
|
-
text: {
|
|
317
|
-
type: Object,
|
|
318
|
-
default: () => ({})
|
|
319
|
-
},
|
|
320
|
-
dir: {
|
|
321
|
-
type: String,
|
|
322
|
-
default: ""
|
|
323
|
-
}
|
|
324
|
-
},
|
|
325
|
-
setup(e) {
|
|
326
|
-
let t = e, { t: r } = C(), c = n(() => {
|
|
327
|
-
let { from_ad: e, to_ad: n, from_ah: r, to_ah: i } = t.dynasty ?? {};
|
|
328
|
-
return e == null && n == null ? "" : `${r != null || i != null ? `AH ${r ?? "?"}–${i ?? "?"} / ` : ""}AD ${e ?? "?"}–${n ?? "?"}`;
|
|
329
|
-
});
|
|
330
|
-
return (t, n) => (u(), a("details", {
|
|
331
|
-
class: "mwnf-dynasty",
|
|
332
|
-
dir: e.dir || void 0
|
|
333
|
-
}, [o("summary", {
|
|
334
|
-
class: "mwnf-dynasty__summary",
|
|
335
|
-
innerHTML: h(T)(e.text.name || e.dynasty.id)
|
|
336
|
-
}, null, 8, _e), o("div", ve, [
|
|
337
|
-
o("p", ye, m(h(r)("record.dynasty.heading")), 1),
|
|
338
|
-
e.text.also_known_as ? (u(), a("p", be, [o("span", xe, m(h(r)("sheet.field.alsoKnownAs")) + ":", 1), s(" " + m(e.text.also_known_as), 1)])) : i("", !0),
|
|
339
|
-
e.text.area ? (u(), a("p", Se, [o("span", Ce, m(h(r)("sheet.field.area")) + ":", 1), s(" " + m(e.text.area), 1)])) : i("", !0),
|
|
340
|
-
c.value ? (u(), a("p", we, m(c.value), 1)) : i("", !0),
|
|
341
|
-
e.text.history ? (u(), a("div", Te, [o("p", Ee, m(h(r)("sheet.field.history")), 1), o("div", {
|
|
342
|
-
class: "mwnf-sheet__block",
|
|
343
|
-
innerHTML: h(w)(e.text.history)
|
|
344
|
-
}, null, 8, De)])) : i("", !0)
|
|
345
|
-
])], 8, ge));
|
|
346
|
-
}
|
|
347
|
-
}, Oe = ["dir"], ke = {
|
|
348
|
-
key: 0,
|
|
349
|
-
class: "mwnf-dynasty-list__heading"
|
|
350
|
-
}, Ae = {
|
|
351
|
-
__name: "DynastyList",
|
|
352
|
-
props: {
|
|
353
|
-
heading: {
|
|
354
|
-
type: String,
|
|
355
|
-
default: ""
|
|
356
|
-
},
|
|
357
|
-
dynasties: {
|
|
358
|
-
type: Array,
|
|
359
|
-
default: () => []
|
|
360
|
-
},
|
|
361
|
-
tr: {
|
|
362
|
-
type: Function,
|
|
363
|
-
default: null
|
|
364
|
-
},
|
|
365
|
-
dir: {
|
|
366
|
-
type: String,
|
|
367
|
-
default: ""
|
|
368
|
-
}
|
|
369
|
-
},
|
|
370
|
-
setup(e) {
|
|
371
|
-
return (n, o) => e.dynasties.length ? (u(), a("section", {
|
|
372
|
-
key: 0,
|
|
373
|
-
class: "mwnf-dynasty-list",
|
|
374
|
-
dir: e.dir || void 0
|
|
375
|
-
}, [e.heading ? (u(), a("h2", ke, m(e.heading), 1)) : i("", !0), (u(!0), a(t, null, f(e.dynasties, (t) => (u(), r(Q, {
|
|
376
|
-
key: t.id,
|
|
377
|
-
dynasty: t,
|
|
378
|
-
text: e.tr ? e.tr(t) : t,
|
|
379
|
-
dir: e.dir
|
|
380
|
-
}, null, 8, [
|
|
381
|
-
"dynasty",
|
|
382
|
-
"text",
|
|
383
|
-
"dir"
|
|
384
|
-
]))), 128))], 8, Oe)) : i("", !0);
|
|
385
|
-
}
|
|
386
|
-
}, je = { class: "mwnf-sheet-timeline" }, Me = {
|
|
387
|
-
key: 0,
|
|
388
|
-
class: "mwnf-sheet-timeline__popout",
|
|
389
|
-
dir: "ltr"
|
|
390
|
-
}, Ne = ["aria-label"], Pe = { class: "mwnf-sheet-timeline__title" }, $ = { class: "mwnf-sheet-timeline__option" }, Fe = ["value"], Ie = { class: "mwnf-sheet-timeline__scroll" }, Le = { class: "mwnf-sheet-timeline__subheader" }, Re = {
|
|
391
|
-
key: 0,
|
|
392
|
-
class: "mwnf-sheet-timeline__empty"
|
|
393
|
-
}, ze = { class: "mwnf-sheet-timeline__date" }, Be = ["innerHTML"], Ve = {
|
|
394
|
-
__name: "TimelineLookup",
|
|
395
|
-
props: { info: {
|
|
396
|
-
type: Object,
|
|
397
|
-
required: !0
|
|
398
|
-
} },
|
|
399
|
-
setup(r) {
|
|
400
|
-
let l = r, { t: p } = C(), g = d(!1), v = d(l.info.defaultCountry ? l.info.defaultCountry() : "all");
|
|
401
|
-
y(() => l.info, (e) => {
|
|
402
|
-
v.value = e.defaultCountry ? e.defaultCountry() : "all";
|
|
403
|
-
});
|
|
404
|
-
let S = n(() => l.info.range ?? [null, null]), T = n(() => l.info.events(v.value)), E = n(() => l.info.countries.find((e) => e.value === v.value)?.label ?? ""), D = (e) => l.info.era ? l.info.era(e) : String(e ?? "");
|
|
405
|
-
return (n, l) => (u(), a("div", je, [o("p", {
|
|
406
|
-
class: "mwnf-sheet-timeline__trigger",
|
|
407
|
-
onClick: l[0] ||= (e) => g.value = !g.value
|
|
408
|
-
}, "➤ " + m(h(p)(r.info.trigger ?? "record.related.timelineForItem")), 1), g.value ? (u(), a("div", Me, [
|
|
409
|
-
o("button", {
|
|
410
|
-
type: "button",
|
|
411
|
-
class: "mwnf-sheet-timeline__close",
|
|
412
|
-
"aria-label": h(p)("core.action.close"),
|
|
413
|
-
onClick: l[1] ||= (e) => g.value = !1
|
|
414
|
-
}, "✕", 8, Ne),
|
|
415
|
-
o("p", Pe, m(h(p)(r.info.heading)), 1),
|
|
416
|
-
o("div", $, [x(o("select", {
|
|
417
|
-
"onUpdate:modelValue": l[2] ||= (e) => v.value = e,
|
|
418
|
-
class: "mwnf-sheet-timeline__select"
|
|
419
|
-
}, [(u(!0), a(t, null, f(r.info.countries, (e) => (u(), a("option", {
|
|
420
|
-
key: e.value,
|
|
421
|
-
value: e.value
|
|
422
|
-
}, m(e.label), 9, Fe))), 128))], 512), [[_, v.value]]), c(e, {
|
|
423
|
-
class: "mwnf-sheet-timeline__link",
|
|
424
|
-
to: r.info.searchTo(v.value, S.value)
|
|
425
|
-
}, {
|
|
426
|
-
default: b(() => [s("➤ " + m(h(p)("timeline.action.beginFullSearch")), 1)]),
|
|
427
|
-
_: 1
|
|
428
|
-
}, 8, ["to"])]),
|
|
429
|
-
o("div", Ie, [
|
|
430
|
-
o("p", Le, m(E.value) + ", " + m(D(S.value[0])) + " – " + m(D(S.value[1])), 1),
|
|
431
|
-
T.value.length ? i("", !0) : (u(), a("p", Re, m(h(p)("timeline.results.noEvents")), 1)),
|
|
432
|
-
(u(!0), a(t, null, f(T.value, (e, t) => (u(), a("div", {
|
|
433
|
-
key: e.id ?? t,
|
|
434
|
-
class: "mwnf-sheet-timeline__event"
|
|
435
|
-
}, [o("div", ze, m(D(e.year_from)), 1), o("div", {
|
|
436
|
-
class: "mwnf-sheet-timeline__description",
|
|
437
|
-
innerHTML: h(w)(e.text.description)
|
|
438
|
-
}, null, 8, Be)]))), 128))
|
|
439
|
-
])
|
|
440
|
-
])) : i("", !0)]));
|
|
441
|
-
}
|
|
442
|
-
};
|
|
443
|
-
//#endregion
|
|
444
|
-
export { Z as a, he as i, Ae as n, H as o, Q as r, Ve as t };
|