@museumwnf/viewer-layout 3.3.0 → 3.5.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.
Files changed (34) hide show
  1. package/README.md +191 -12
  2. package/dist/{FeaturedRecord-BJ8LaWGP.js → FeaturedRecord-DJfyvfqt.js} +1 -1
  3. package/dist/GlossaryPopover-DcptyNWI.js +654 -0
  4. package/dist/ItemDetailView-COWC8GDg.js +299 -0
  5. package/dist/{OnDisplayIn-Dv8i7uvH.js → OnDisplayIn-BfJoPonn.js} +38 -38
  6. package/dist/RecordView-C9rP8TyQ.js +263 -0
  7. package/dist/SiteShell-4vV2jIzf.js +192 -0
  8. package/dist/{Theme-Db88mckV.js → Theme-CZ-OVXao.js} +26 -26
  9. package/dist/TimelineEventList-gsoc-SBx.js +841 -0
  10. package/dist/TimelineResultsView-C2-TnM71.js +1386 -0
  11. package/dist/chrome-DPuPeWzV.js +1141 -0
  12. package/dist/components.js +1 -1
  13. package/dist/{content-p0tqKkcD.js → content-CtwBcSjU.js} +2 -2
  14. package/dist/content.js +6 -5
  15. package/dist/data-CJlLA-Mf.js +38 -0
  16. package/dist/data-DTbAYdr2.js +40 -0
  17. package/dist/dxa.js +638 -519
  18. package/dist/index.js +7 -6
  19. package/dist/standalone.js +762 -0
  20. package/dist/{themeSpecs-C_uGarTs.js → themeSpecs-B885l456.js} +3 -2
  21. package/dist/viewer-layout.css +1 -1
  22. package/dist/views.js +5 -4
  23. package/package.json +4 -3
  24. package/src/dxa/testing.js +37 -14
  25. package/src/styles/dxa-exhibition.css +25 -1
  26. package/src/styles/dxa-gallery.css +249 -2
  27. package/src/tokens.reference.css +78 -0
  28. package/dist/ItemDetailView-CfUtRLOV.js +0 -284
  29. package/dist/PageShell-CbJ9lQoQ.js +0 -961
  30. package/dist/SiteShell-C3OgZO8p.js +0 -154
  31. package/dist/TimelineEventList-COjkXEzS.js +0 -1487
  32. package/dist/TimelineResultsView-CmHomvV_.js +0 -1636
  33. package/dist/data-BfyYB8ff.js +0 -33
  34. package/dist/data-G8uXeEfE.js +0 -35
@@ -1,154 +0,0 @@
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 t };