@museumwnf/viewer-layout 2.15.1 → 2.16.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 +108 -28
- package/dist/BackLink-LfSIuXnL.js +45 -0
- package/dist/TimelineEventList-D5Hot788.js +1362 -0
- package/dist/{TimelineLookup-DRc43FkL.js → TimelineLookup-D-p1aQ_Z.js} +1 -1
- package/dist/TimelineResultsView-DJo_yYEK.js +1203 -0
- package/dist/{content-DUXrQ-l8.js → content-DncTPD5P.js} +46 -21
- package/dist/content.js +5 -5
- package/dist/dxa.js +418 -562
- package/dist/index.js +5 -5
- package/dist/viewer-layout.css +1 -1
- package/dist/views.js +287 -271
- package/package.json +3 -3
- package/src/tokens.reference.css +26 -0
- package/dist/BackLink-BJ16COHd.js +0 -106
- package/dist/TimelineEventList-BmfLBaTT.js +0 -967
- package/dist/TimelineResultsView-D78PPWk-.js +0 -1220
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./TimelineLookup-
|
|
2
|
-
import {
|
|
1
|
+
import "./TimelineLookup-D-p1aQ_Z.js";
|
|
2
|
+
import { v as e } from "./TimelineEventList-D5Hot788.js";
|
|
3
3
|
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, vModelCheckbox as _, vShow as v, watch as y, withCtx as b, withDirectives as x } from "vue";
|
|
4
4
|
import { renderBlock as S, renderInline as C, useI18n as w } from "@museumwnf/viewer-core";
|
|
5
5
|
//#region src/content/FeaturedPartners.vue
|
|
@@ -9,7 +9,7 @@ var T = {
|
|
|
9
9
|
}, E = { class: "mwnf-featured-partners__heading" }, D = { class: "mwnf-featured-partners__carousel" }, O = {
|
|
10
10
|
key: 0,
|
|
11
11
|
class: "mwnf-featured-partners__image"
|
|
12
|
-
},
|
|
12
|
+
}, k = ["src", "alt"], A = { class: "mwnf-featured-partners__body" }, ee = { class: "mwnf-featured-partners__name" }, te = { class: "mwnf-featured-partners__location" }, j = { key: 0 }, M = { class: "mwnf-featured-partners__description" }, N = {
|
|
13
13
|
key: 0,
|
|
14
14
|
class: "mwnf-featured-partners__controls"
|
|
15
15
|
}, P = ["aria-label", "onClick"], F = 8e3, I = {
|
|
@@ -19,24 +19,49 @@ var T = {
|
|
|
19
19
|
type: Array,
|
|
20
20
|
default: () => []
|
|
21
21
|
},
|
|
22
|
+
partners: {
|
|
23
|
+
type: Array,
|
|
24
|
+
default: () => []
|
|
25
|
+
},
|
|
26
|
+
descriptionLength: {
|
|
27
|
+
type: Number,
|
|
28
|
+
default: 420
|
|
29
|
+
},
|
|
22
30
|
headingEntry: {
|
|
23
31
|
type: String,
|
|
24
32
|
default: "partner.featured"
|
|
25
33
|
}
|
|
26
34
|
},
|
|
27
|
-
setup(
|
|
28
|
-
let
|
|
29
|
-
function
|
|
30
|
-
g
|
|
35
|
+
setup(l) {
|
|
36
|
+
let g = l;
|
|
37
|
+
function _(e) {
|
|
38
|
+
return String(e ?? "").replace(/<[^>]*>/g, " ").replace(/\s+/g, " ").trim();
|
|
39
|
+
}
|
|
40
|
+
function y(e, t) {
|
|
41
|
+
if (!e || e.length <= t) return e;
|
|
42
|
+
let n = e.lastIndexOf(" ", t);
|
|
43
|
+
return `${e.slice(0, n > 0 ? n : t)}...`;
|
|
44
|
+
}
|
|
45
|
+
let S = n(() => g.partners.length ? g.partners.map((e) => ({
|
|
46
|
+
id: e.id,
|
|
47
|
+
name: e.plainName,
|
|
48
|
+
logo: e.pictures?.[0]?.url ?? e.logos?.[0]?.url ?? null,
|
|
49
|
+
city: e.city,
|
|
50
|
+
country: e.country,
|
|
51
|
+
description: y(_(e.description), g.descriptionLength),
|
|
52
|
+
route: e.route
|
|
53
|
+
})) : g.records), C = p(0), w = null;
|
|
54
|
+
function I(e) {
|
|
55
|
+
C.value = e, L();
|
|
31
56
|
}
|
|
32
|
-
function
|
|
33
|
-
|
|
34
|
-
|
|
57
|
+
function L() {
|
|
58
|
+
w && clearInterval(w), S.value.length > 0 && (w = setInterval(() => {
|
|
59
|
+
C.value = (C.value + 1) % S.value.length;
|
|
35
60
|
}, F));
|
|
36
61
|
}
|
|
37
|
-
return d(
|
|
38
|
-
o("h2", E, h(
|
|
39
|
-
o("div", D, [(f(!0), a(t, null, m(
|
|
62
|
+
return d(L), u(() => w && clearInterval(w)), (n, u) => S.value.length ? (f(), a("section", T, [
|
|
63
|
+
o("h2", E, h(n.$t(l.headingEntry)), 1),
|
|
64
|
+
o("div", D, [(f(!0), a(t, null, m(S.value, (t, n) => x((f(), r(e, {
|
|
40
65
|
key: t.id,
|
|
41
66
|
to: t.route,
|
|
42
67
|
class: "mwnf-featured-partners__card"
|
|
@@ -45,18 +70,18 @@ var T = {
|
|
|
45
70
|
src: t.logo,
|
|
46
71
|
alt: t.name,
|
|
47
72
|
class: "mwnf-featured-partners__logo"
|
|
48
|
-
}, null, 8,
|
|
49
|
-
o("span",
|
|
50
|
-
o("span",
|
|
73
|
+
}, null, 8, k)])) : i("", !0), o("span", A, [
|
|
74
|
+
o("span", ee, h(t.name), 1),
|
|
75
|
+
o("span", te, [t.city ? (f(), a("span", j, h(t.city) + ", ", 1)) : i("", !0), s(h(t.country), 1)]),
|
|
51
76
|
o("span", M, h(t.description), 1)
|
|
52
77
|
])]),
|
|
53
78
|
_: 2
|
|
54
|
-
}, 1032, ["to"])), [[v, n ===
|
|
55
|
-
|
|
79
|
+
}, 1032, ["to"])), [[v, n === C.value]])), 128))]),
|
|
80
|
+
S.value.length > 1 ? (f(), a("div", N, [(f(!0), a(t, null, m(S.value, (e, t) => (f(), a("button", {
|
|
56
81
|
key: e.id,
|
|
57
|
-
class: c(["mwnf-featured-partners__bullet", { "mwnf-featured-partners__bullet--active": t ===
|
|
58
|
-
"aria-label": `${
|
|
59
|
-
onClick: (e) =>
|
|
82
|
+
class: c(["mwnf-featured-partners__bullet", { "mwnf-featured-partners__bullet--active": t === C.value }]),
|
|
83
|
+
"aria-label": `${n.$t("core.action.show")} ${e.name}`,
|
|
84
|
+
onClick: (e) => I(t)
|
|
60
85
|
}, null, 10, P))), 128))])) : i("", !0)
|
|
61
86
|
])) : i("", !0);
|
|
62
87
|
}
|
package/dist/content.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as e, i as t, n, o as r, r as i, t as a } from "./TimelineLookup-
|
|
2
|
-
import {
|
|
3
|
-
import { n as
|
|
4
|
-
import {
|
|
5
|
-
export {
|
|
1
|
+
import { a as e, i as t, n, o as r, r as i, t as a } from "./TimelineLookup-D-p1aQ_Z.js";
|
|
2
|
+
import { _ as o, a as s, c, d as l, f as u, g as d, h as f, i as p, l as m, m as h, n as g, o as _, p as v, r as y, s as b, t as x, u as S } from "./TimelineEventList-D5Hot788.js";
|
|
3
|
+
import { a as C, i as w, n as T, r as E, t as D } from "./content-DncTPD5P.js";
|
|
4
|
+
import { t as O } from "./BackLink-LfSIuXnL.js";
|
|
5
|
+
export { O as BackLink, n as DynastyList, i as DynastyPopout, h as FacetSelect, C as FeaturedPartners, e as FeaturedRecord, v as FilterPanel, p as GlossaryPopover, t as GlossaryTool, s as MediaGallery, f as Pagination, y as PartnerMap, g as PartnerPanel, T as PictureGallery, D as PictureNarrative, E as PopupLogo, c as RecordCredits, d as RecordGrid, l as RecordLanguages, o as RecordList, S as RecordSheet, _ as RelatedRecords, u as ResultsSummary, r as SectionCards, m as SheetSection, w as SiblingGalleries, b as SourceCredit, x as TimelineEventList, a as TimelineLookup };
|