@museumwnf/viewer-layout 2.13.0 → 2.15.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 +40 -4
- package/dist/BackLink-BJ16COHd.js +106 -0
- package/dist/{TimelineEventList-59g_1ksf.js → TimelineEventList-BmfLBaTT.js} +156 -363
- package/dist/TimelineLookup-DRc43FkL.js +444 -0
- package/dist/TimelineResultsView-D78PPWk-.js +1220 -0
- package/dist/content-DUXrQ-l8.js +353 -0
- package/dist/content.js +5 -3
- package/dist/dxa.js +1116 -0
- package/dist/index.js +5 -3
- package/dist/viewer-layout.css +1 -1
- package/dist/views.js +488 -1430
- package/package.json +4 -3
- package/src/tokens.reference.css +58 -0
- package/dist/content-BvhCFMQ9.js +0 -446
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@museumwnf/viewer-layout",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.15.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",
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
"./content": "./dist/content.js",
|
|
24
24
|
"./views": "./dist/views.js",
|
|
25
25
|
"./components": "./dist/components.js",
|
|
26
|
+
"./dxa": "./dist/dxa.js",
|
|
26
27
|
"./style.css": "./dist/viewer-layout.css",
|
|
27
28
|
"./tokens.reference.css": "./src/tokens.reference.css"
|
|
28
29
|
},
|
|
@@ -34,12 +35,12 @@
|
|
|
34
35
|
"test": "vitest run"
|
|
35
36
|
},
|
|
36
37
|
"peerDependencies": {
|
|
37
|
-
"@museumwnf/viewer-core": "^1.
|
|
38
|
+
"@museumwnf/viewer-core": "^1.16.0",
|
|
38
39
|
"vue": "^3.5.0",
|
|
39
40
|
"vue-router": "^4.5.0 || ^5.0.0"
|
|
40
41
|
},
|
|
41
42
|
"devDependencies": {
|
|
42
|
-
"@museumwnf/viewer-core": "^1.
|
|
43
|
+
"@museumwnf/viewer-core": "^1.16.0",
|
|
43
44
|
"@vitejs/plugin-vue": "^6.0.8",
|
|
44
45
|
"@vue/test-utils": "^2.4.11",
|
|
45
46
|
"jsdom": "^30.0.1",
|
package/src/tokens.reference.css
CHANGED
|
@@ -315,6 +315,41 @@
|
|
|
315
315
|
/* --mwnf-credits-color: #555555; Credits text color */
|
|
316
316
|
/* --mwnf-credits-gap: 0.25rem 1rem; Gap in the credits list */
|
|
317
317
|
|
|
318
|
+
/* ---------- Content: RecordSheetView (the DXA item sheet's own blocks) ---------- */
|
|
319
|
+
/* --mwnf-sheet-source-size: 0.875rem; Source-database block text size */
|
|
320
|
+
/* --mwnf-sheet-source-gap: 0.375rem; Gap between its lines */
|
|
321
|
+
/* --mwnf-sheet-source-uid-size: 0.75rem; backward_compatibility code size */
|
|
322
|
+
/* --mwnf-sheet-source-uid-color: #666666; backward_compatibility code color */
|
|
323
|
+
/* --mwnf-sheet-notice-padding: 0.625rem 0.75rem; Explore-partner notice padding */
|
|
324
|
+
/* --mwnf-sheet-notice-size: 0.8125rem; Explore-partner notice text size */
|
|
325
|
+
/* --mwnf-sheet-notice-background: #f5f5f5; Explore-partner notice background */
|
|
326
|
+
/* --mwnf-sheet-related-padding: 1rem; Related block padding under its top border */
|
|
327
|
+
/* --mwnf-sheet-related-border: 3px solid #dddddd; Related block top border */
|
|
328
|
+
/* --mwnf-sheet-related-heading-size: 1rem; Related block sub-heading size */
|
|
329
|
+
/* --mwnf-sheet-related-heading-gap: 0.25rem; Space under a related block sub-heading */
|
|
330
|
+
/* --mwnf-sheet-related-heading-border: 1px solid #eeeeee; Its underline */
|
|
331
|
+
/* --mwnf-sheet-related-subheading-gap: 0.5rem; Space above a related block sub-subheading */
|
|
332
|
+
/* --mwnf-sheet-related-description-size: 0.8125rem; Related block intro/reference text size */
|
|
333
|
+
/* --mwnf-sheet-related-description-color: #555555; Related block intro/reference text color */
|
|
334
|
+
/* --mwnf-sheet-related-description-gap: 0.375rem; Space above the related block's intro line */
|
|
335
|
+
/* --mwnf-sheet-related-line-gap: 0.375rem; Space above one related-block line */
|
|
336
|
+
/* --mwnf-sheet-related-action-color: inherit; The "download as PDF" action's color */
|
|
337
|
+
/* --mwnf-sheet-related-reference-gap: 0.5rem; Gap in an outside-reference row */
|
|
338
|
+
/* --mwnf-sheet-related-reference-padding: 0.1875rem 0; Padding of an outside-reference row */
|
|
339
|
+
/* --mwnf-sheet-related-unresolved-color: #8a8a8a; "Not in this gallery/exhibition" note color */
|
|
340
|
+
/* --mwnf-sheet-related-unresolved-size: 0.75rem; Its text size */
|
|
341
|
+
/* --mwnf-sheet-timeline-trigger-color: inherit; The "timeline for this item" trigger line */
|
|
342
|
+
/* --mwnf-sheet-timeline-popout-width: 40rem; Timeline popout max width */
|
|
343
|
+
/* --mwnf-sheet-timeline-popout-margin: 0.5rem 0 0.875rem; Timeline popout margin */
|
|
344
|
+
/* --mwnf-sheet-timeline-close-offset: 0.25rem; Its close button's top offset */
|
|
345
|
+
/* --mwnf-sheet-timeline-close-inline-offset: 0.5rem; Its close button's inline offset */
|
|
346
|
+
/* --mwnf-sheet-timeline-close-size: 1rem; Its close button's text size */
|
|
347
|
+
/* --mwnf-sheet-timeline-scroll-height: 20rem; Its scrollable event list's max height */
|
|
348
|
+
/* --mwnf-sheet-timeline-empty-color: #777777; Its "no events" text color */
|
|
349
|
+
/* --mwnf-sheet-timeline-event-gap: 0.625rem; Gap between an event's date and its description */
|
|
350
|
+
/* --mwnf-sheet-timeline-event-padding: 0.3125rem 0; Padding of one event row */
|
|
351
|
+
/* --mwnf-sheet-timeline-event-border: 1px solid #eeeeee; Border under one event row */
|
|
352
|
+
|
|
318
353
|
/* ---------- Content: SourceCredit ---------- */
|
|
319
354
|
/* --mwnf-source-credit-size: 0.8125rem; Text size */
|
|
320
355
|
/* --mwnf-source-credit-color: #555555; Text color */
|
|
@@ -502,6 +537,25 @@
|
|
|
502
537
|
/* --mwnf-view-essay-variant-border: 2px solid transparent; Variant thumbnail border */
|
|
503
538
|
/* --mwnf-view-essay-variant-active-border: #1c1c1c; The selected variant's border color */
|
|
504
539
|
|
|
540
|
+
/* ---------- Content: PictureGallery, PictureNarrative ---------- */
|
|
541
|
+
/* --mwnf-picture-gallery-image-max-height: 26.25rem; The selected picture's max height */
|
|
542
|
+
/* --mwnf-picture-gallery-detail-size: 0.9375rem; Panel detail text size */
|
|
543
|
+
/* --mwnf-picture-gallery-link-color: inherit; The "see item entry" link color */
|
|
544
|
+
/* --mwnf-picture-gallery-empty-padding: 2.5rem 0; Padding around the "no picture selected" message */
|
|
545
|
+
/* --mwnf-picture-gallery-thumb-gap: 0.875rem; Gap between thumbnails, in the strip and the related blocks */
|
|
546
|
+
/* --mwnf-picture-gallery-thumb-size: 8.125rem; Thumbnail width and height, shared by both components */
|
|
547
|
+
/* --mwnf-picture-gallery-thumb-active-outline: #1c1c1c; The selected thumbnail's outline color */
|
|
548
|
+
/* --mwnf-picture-gallery-related-opacity: 0.75; Opacity of a thumbnail hidden behind "Add related works" */
|
|
549
|
+
/* --mwnf-picture-gallery-caption-width: 16.25rem; Width of the hover caption shown under a thumbnail */
|
|
550
|
+
/* --mwnf-picture-gallery-caption-padding: 0.5rem; Hover caption padding */
|
|
551
|
+
/* --mwnf-picture-gallery-caption-size: 0.8125rem; Hover caption text size */
|
|
552
|
+
/* --mwnf-picture-gallery-caption-background: #ffffff; Hover caption background */
|
|
553
|
+
/* --mwnf-picture-gallery-caption-color: inherit; Hover caption text color */
|
|
554
|
+
/* --mwnf-picture-gallery-toggle-gap: 0.5rem; Gap around the "Add related works" toggle */
|
|
555
|
+
/* --mwnf-picture-narrative-heading-gap: 0.5rem; Gap under a "Related items" heading */
|
|
556
|
+
/* --mwnf-picture-narrative-relation-size: 0.75rem; The forward relation text's size */
|
|
557
|
+
/* --mwnf-picture-narrative-relation-gap: 0.25rem; Gap above the forward relation text */
|
|
558
|
+
|
|
505
559
|
/* ---------- Content: PartnerMap ---------- */
|
|
506
560
|
/* --mwnf-partner-map-padding: 1.25rem 0; Vertical padding */
|
|
507
561
|
/* --mwnf-partner-map-title-size: 1rem; Title size */
|
|
@@ -681,4 +735,8 @@
|
|
|
681
735
|
/* --mwnf-loader-size: 0.875rem; Loader text size */
|
|
682
736
|
|
|
683
737
|
/* --mwnf-link-text: #0000ff; Link text color */
|
|
738
|
+
|
|
739
|
+
/* ---------- DXA family pages (src/dxa/) ---------- */
|
|
740
|
+
/* --mwnf-dxa-heading-color: #1c1c1c; Partner name / profile heading color */
|
|
741
|
+
/* --mwnf-dxa-band-background: #f0f0f0; Language switcher / tab strip / timeline-link box background */
|
|
684
742
|
}
|
package/dist/content-BvhCFMQ9.js
DELETED
|
@@ -1,446 +0,0 @@
|
|
|
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 };
|