@museumwnf/viewer-layout 3.61.0 → 3.63.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 (32) hide show
  1. package/dist/FeaturedRecord-Fe19w6_G.js +213 -0
  2. package/dist/LegacyItemSheet-Bmg8etGz.js +532 -0
  3. package/dist/{OnDisplayIn-DW4iC5BB.js → OnDisplayIn-BH3Bqope.js} +16 -9
  4. package/dist/{PageShell-CPtgzcxv.js → PageShell-CIGVv7sK.js} +144 -111
  5. package/dist/{PartnerMap-U-Hi2FBi.js → PartnerMap-DdyMLtgH.js} +5 -1
  6. package/dist/RecordView-Bgd5mm_e.js +384 -0
  7. package/dist/{SiteShell-qvsZO4Iz.js → SiteShell-UsZ_cpe9.js} +3 -2
  8. package/dist/Theme-Daezwp0p.js +391 -0
  9. package/dist/{TimelineEventList-1feZA5t7.js → TimelineEventList-CIkKxyQu.js} +122 -238
  10. package/dist/TimelineResultsView-BF3VoCs_.js +686 -0
  11. package/dist/components.js +1 -1
  12. package/dist/{content-BNS5U0Xv.js → content-hV5uyd-b.js} +2 -2
  13. package/dist/content.js +6 -6
  14. package/dist/data-CsMfGCkv.js +77 -0
  15. package/dist/data-DzrH9ikw.js +45 -0
  16. package/dist/dxa.js +2046 -1008
  17. package/dist/index.js +7 -7
  18. package/dist/standalone.js +3 -3
  19. package/dist/{themeSpecs-CsDpl4rR.js → themeSpecs-DIdmAEc3.js} +1 -1
  20. package/dist/viewer-layout.css +1 -1
  21. package/dist/views.js +755 -37
  22. package/package.json +1 -1
  23. package/src/dxa/testing.js +176 -120
  24. package/src/styles/dxa-exhibition.css +2289 -32
  25. package/src/styles/dxa-gallery.css +17 -2
  26. package/dist/FeaturedRecord-DaGLHyhD.js +0 -87
  27. package/dist/ItemDetailView-D7m2C1Mg.js +0 -310
  28. package/dist/RecordView-BE4mbj6G.js +0 -363
  29. package/dist/Theme-4RmyRY0x.js +0 -318
  30. package/dist/TimelineResultsView-CkH3NDqL.js +0 -1401
  31. package/dist/data-EKYeMQcC.js +0 -45
  32. package/dist/data-kqAkoQvf.js +0 -37
@@ -32,11 +32,26 @@
32
32
  italic face is narrower (inventory-app#2423, the partner badges). */
33
33
  @import url('https://fonts.googleapis.com/css2?family=Roboto+Condensed:wght@300;400;700&family=Roboto:ital,wght@0,300;0,400;0,500;0,700;1,400&display=swap');
34
34
 
35
+ /* The arrows the pages print before a link (↗, ➤, ➦), which Roboto Condensed
36
+ lacks: from a symbol font the system has, held within Roboto Condensed's
37
+ own line, so a line with an arrow keeps the normal height of legacy's lines
38
+ (legacy drew its arrows as icons). Without one of these fonts, the browser
39
+ picks its own, as before. */
40
+ @font-face {
41
+ font-family: 'mwnf-arrows';
42
+ src: local('Segoe UI Symbol'), local('SegoeUISymbol'), local('Apple Symbols'), local('DejaVu Sans'),
43
+ local('Noto Sans Symbols 2'), local('Noto Sans Symbols'), local('Arial Unicode MS');
44
+ unicode-range: U+2197, U+27A4, U+27A6;
45
+ ascent-override: 75%;
46
+ descent-override: 15%;
47
+ line-gap-override: 0%;
48
+ }
49
+
35
50
  /* ── Theme: the family's tokens, read from the palette ───────────────────── */
36
51
  :root {
37
52
  /* ---------- Global ---------- */
38
- --mwnf-font-body: 'Roboto Condensed', 'Roboto', Arial, sans-serif;
39
- --mwnf-font-heading: 'Roboto Condensed', 'Roboto', Arial, sans-serif;
53
+ --mwnf-font-body: 'Roboto Condensed', 'mwnf-arrows', 'Roboto', Arial, sans-serif;
54
+ --mwnf-font-heading: 'Roboto Condensed', 'mwnf-arrows', 'Roboto', Arial, sans-serif;
40
55
  --mwnf-line-height: 1.4;
41
56
  --mwnf-weight-heading: 700;
42
57
  --mwnf-color-text: #1a1a1a;
@@ -1,87 +0,0 @@
1
- import { d as e } from "./PartnerMap-U-Hi2FBi.js";
2
- import { Fragment as t, computed as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createVNode as o, openBlock as s, renderList as c, renderSlot as l, toDisplayString as u, useSlots as d, withCtx as f } from "vue";
3
- // src/content/FeaturedRecord.vue
4
- var p = {
5
- key: 0,
6
- class: "mwnf-featured"
7
- }, m = {
8
- key: 0,
9
- class: "mwnf-featured__heading"
10
- }, h = {
11
- key: 0,
12
- class: "mwnf-featured__media"
13
- }, g = ["src", "alt"], _ = { class: "mwnf-featured__body" }, v = {
14
- key: 0,
15
- class: "mwnf-featured__eyebrow"
16
- }, y = ["innerHTML"], b = {
17
- key: 1,
18
- class: "mwnf-featured__action"
19
- }, x = {
20
- __name: "FeaturedRecord",
21
- props: {
22
- image: {
23
- type: String,
24
- default: ""
25
- },
26
- imageAlt: {
27
- type: String,
28
- default: ""
29
- },
30
- eyebrow: {
31
- type: String,
32
- default: ""
33
- },
34
- name: {
35
- type: String,
36
- default: ""
37
- },
38
- meta: {
39
- type: Array,
40
- default: () => []
41
- },
42
- action: {
43
- type: String,
44
- default: ""
45
- },
46
- to: {
47
- type: [String, Object],
48
- default: null
49
- },
50
- href: {
51
- type: String,
52
- default: ""
53
- },
54
- heading: {
55
- type: String,
56
- default: ""
57
- }
58
- },
59
- setup(x) {
60
- let S = x, C = d(), w = n(() => !!(S.name || S.image || C.default));
61
- return (n, d) => w.value ? (s(), i("section", p, [x.heading ? (s(), i("h2", m, u(x.heading), 1)) : r("", !0), l(n.$slots, "default", {}, () => [o(e, {
62
- class: "mwnf-featured__link",
63
- to: x.to,
64
- href: x.href
65
- }, {
66
- default: f(() => [x.image ? (s(), i("span", h, [a("img", {
67
- class: "mwnf-featured__image",
68
- src: x.image,
69
- alt: x.imageAlt,
70
- loading: "eager"
71
- }, null, 8, g)])) : r("", !0), a("span", _, [
72
- x.eyebrow ? (s(), i("span", v, u(x.eyebrow), 1)) : r("", !0),
73
- a("span", {
74
- class: "mwnf-featured__name",
75
- innerHTML: x.name
76
- }, null, 8, y),
77
- (s(!0), i(t, null, c(x.meta, (e, t) => (s(), i("span", {
78
- key: t,
79
- class: "mwnf-featured__meta"
80
- }, u(e), 1))), 128)),
81
- x.action ? (s(), i("span", b, u(x.action) + " →", 1)) : r("", !0)
82
- ])]),
83
- _: 1
84
- }, 8, ["to", "href"])])])) : r("", !0);
85
- }
86
- };
87
- export { x as t };
@@ -1,310 +0,0 @@
1
- import { i as e, n as t, o as n, r, t as i } from "./OnDisplayIn-DW4iC5BB.js";
2
- import { n as a } from "./TimelineEventList-1feZA5t7.js";
3
- import { r as o } from "./PartnerMap-U-Hi2FBi.js";
4
- import { t as s } from "./RecordView-BE4mbj6G.js";
5
- import { t as c } from "./chrome-Bv_mLlHM.js";
6
- import { Fragment as l, computed as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createElementVNode as m, createSlots as ee, createTextVNode as h, createVNode as g, guardReactiveProps as _, normalizeClass as v, normalizeProps as y, normalizeStyle as te, openBlock as b, renderList as x, renderSlot as S, toDisplayString as C, unref as w, useSlots as ne, withCtx as T } from "vue";
7
- import { NotFoundView as re, byId as E, loadEntities as ie, mdInline as D, mdStrip as ae, mwnfLinks as O, partnerView as oe, useDataPackage as se, useI18n as ce, useProjects as le, useSiteConfig as ue } from "@museumwnf/viewer-core";
8
- // src/dxa/ItemDetailView.vue
9
- var k = {
10
- key: 0,
11
- class: "mwnf-sheet-source"
12
- }, A = {
13
- key: 0,
14
- class: "mwnf-sheet-source__line"
15
- }, j = {
16
- key: 1,
17
- class: "mwnf-sheet-source__collection"
18
- }, M = ["href"], N = {
19
- key: 1,
20
- class: "mwnf-sheet-notice"
21
- }, P = {
22
- key: "museum",
23
- class: "mwnf-sheet-museum"
24
- }, F = ["innerHTML"], I = {
25
- key: 0,
26
- class: "mwnf-sheet-related"
27
- }, L = {
28
- key: 0,
29
- class: "mwnf-sheet-related__heading mwnf-sheet-related__heading--caps"
30
- }, R = {
31
- key: 1,
32
- class: "mwnf-sheet-related__description"
33
- }, z = {
34
- key: 0,
35
- class: "mwnf-sheet-related__references"
36
- }, B = {
37
- key: 2,
38
- class: "mwnf-sheet-related__unresolved"
39
- }, V = {
40
- key: 3,
41
- class: "mwnf-sheet-related__line"
42
- }, H = ["href"], U = { key: 7 }, de = { class: "mwnf-sheet-related__heading" }, fe = { key: 8 }, pe = { class: "mwnf-sheet-related__heading" }, me = { class: "mwnf-sheet-related__line" }, W = ["href"], he = { key: 9 }, ge = { class: "mwnf-sheet-related__heading" }, _e = { class: "mwnf-sheet-related__line" }, ve = ["href"], ye = { key: 10 }, be = { class: "mwnf-sheet-related__heading" }, xe = "sheet.field.", G = {
43
- __name: "ItemDetailView",
44
- props: {
45
- spec: {
46
- type: Object,
47
- required: !0
48
- },
49
- id: {
50
- type: String,
51
- required: !0
52
- },
53
- entity: {
54
- type: String,
55
- default: ""
56
- },
57
- dataGetter: {
58
- type: Function,
59
- default: null
60
- }
61
- },
62
- setup(G) {
63
- let K = G, Se = ne(), Ce = /* @__PURE__ */ new Set([
64
- "before-sheet",
65
- "museum",
66
- "related",
67
- "aside"
68
- ]), we = u(() => Object.keys(Se).filter((e) => !Ce.has(e))), Te = u(() => !K.dataGetter || K.dataGetter(K.id) != null), { t: q } = ce();
69
- function Ee(e) {
70
- if (typeof e != "string" || !e.startsWith(xe)) return e;
71
- let t = `sheet.dxa.${e.slice(12)}`;
72
- return q(t) === t ? e : t;
73
- }
74
- let J = u(() => Array.isArray(K.spec.fields) ? {
75
- ...K.spec,
76
- fields: K.spec.fields.map((e) => ({
77
- ...e,
78
- label: Ee(e.label)
79
- }))
80
- } : K.spec), Y = le(), X = (e, t) => (e.name ?? "").localeCompare(t.name ?? ""), De = (e) => (e.gallery_references ?? []).filter((e) => e.kind === "gallery").sort(X), Oe = (e) => (e.gallery_references ?? []).filter((e) => e.kind === "exhibition").sort(X), Z = (e) => Y.links(e.project_id)?.artisticIntroductionUrl ?? null, Q = (e) => Y.links(e.project_id)?.relatedDatabaseUrl ?? null;
81
- function ke(e, t) {
82
- if (!e) return null;
83
- let n = J.value.sourceDatabase === !1 ? null : J.value.sourceDatabase ?? null, r = null;
84
- if (n) {
85
- let i = n.chipClass ? n.chipClass(e, t) : null, a = Y.label(e.project_id);
86
- (i || a) && (r = {
87
- chipClass: i,
88
- name: a,
89
- label: q(n.label ?? "record.sheet.sourceDatabase")
90
- });
91
- }
92
- let i = n && n.addToCollection !== !1 ? q(n.addToCollection?.label ?? "record.action.addToCollection") : null, a = J.value.notice === !1 ? null : J.value.notice ?? null, o = a && a.show(e, t) ? q(a.label) : null;
93
- return {
94
- source: r,
95
- addToCollectionLabel: i,
96
- notice: o
97
- };
98
- }
99
- let $ = se(), Ae = E("partners"), je = E("countries");
100
- ie(["partners", "countries"]), $.loadTranslations("countries", "en");
101
- function Me(e, t) {
102
- let n = $.tr("countries", e, t, "en");
103
- return ae(n.name ?? je.value?.get(e)?.internal_name ?? "");
104
- }
105
- function Ne(e) {
106
- let t = e.text?.holder ? D(String(e.text.holder)) : "", n = J.value.museum === !1 ? null : J.value.museum ?? null, r = n ? Ae.value?.get(e.record?.partner_id) : null;
107
- return {
108
- holder: t,
109
- view: r ? oe(r, $.tr("partners", r.id, e.language, "en"), {
110
- countryLabel: (t) => Me(t, e.language),
111
- route: (t) => n.route ? n.route(t.id, e) : null
112
- }) : null
113
- };
114
- }
115
- function Pe(e, t) {
116
- if (!e) return null;
117
- let n = J.value.related ?? {}, r = t.records ?? [], i = t.outside ?? [], a = K.dataGetter ? r.filter((e) => K.dataGetter(e.id) != null) : r, o = K.dataGetter ? r.filter((e) => K.dataGetter(e.id) == null).map((t) => (e.related_items ?? []).find((e) => e.id === t.id)).filter(Boolean) : [], s = [...i, ...o].map((e) => ({
118
- ...e,
119
- name: e.project_id ? Y.label(e.project_id) : null,
120
- chipClass: n.outsideChip ? n.outsideChip(e, t) : null
121
- })), c = (t) => (n.onDisplayIn?.href ? n.onDisplayIn.href(t, e) : t.legacy_host) || "", l = (e) => ({
122
- id: e.id,
123
- label: D(e.name ?? ""),
124
- href: c(e),
125
- external: !!c(e)
126
- }), u = n.onDisplayIn && n.onDisplayIn !== !1 ? {
127
- pendingLabel: n.onDisplayIn.linkPendingLabel ?? "",
128
- groups: [{
129
- heading: n.onDisplayIn.exhibitionsHeading ?? "record.related.exhibitions",
130
- links: Oe(e).map(l)
131
- }, {
132
- heading: n.onDisplayIn.galleriesHeading ?? "record.related.galleries",
133
- links: De(e).map(l)
134
- }].filter((e) => e.links.length)
135
- } : null, d = n.databaseLabel && Q(e) ? {
136
- url: Q(e),
137
- label: q(n.databaseLabel),
138
- name: Y.label(e.project_id)
139
- } : null, f = n.overallDatabase && n.overallDatabase !== !1 ? {
140
- label: q(n.overallDatabase.label),
141
- linkLabel: q(n.overallDatabase.linkLabel)
142
- } : null;
143
- return {
144
- title: n.title ? q(n.title) : "",
145
- description: n.description ? q(n.description) : "",
146
- heading: q(n.heading ?? "record.related.items"),
147
- variant: n.variant ?? "grid",
148
- actionLabel: n.actionLabel ? q(n.actionLabel) : "",
149
- inPackage: a,
150
- references: s,
151
- notInPackageLabel: n.notInPackageLabel ? q(n.notInPackageLabel) : "",
152
- artisticIntroduction: n.artisticIntroductionLabel && Z(e) ? {
153
- url: Z(e),
154
- label: q(n.artisticIntroductionLabel)
155
- } : null,
156
- timeline: n.timeline ? n.timeline(e, t) : null,
157
- glossary: n.glossary !== !1,
158
- glossaryLabels: n.glossaryLabels ?? {},
159
- dynasties: n.dynasties ? n.dynasties(e, t.language, t) : null,
160
- dynastiesHeading: q(n.dynastiesHeading ?? "record.dynasty.list"),
161
- media: n.media === !1 ? [] : e.media ?? [],
162
- onDisplayIn: u,
163
- database: d,
164
- overallDatabase: f,
165
- download: n.download === !1 ? null : {
166
- label: q("record.action.download"),
167
- pdfLabel: q("record.action.downloadPdf")
168
- }
169
- };
170
- }
171
- let Fe = ue(), Ie = u(() => {
172
- let e = c(Fe.chrome, "world.png");
173
- return e ? { "--mwnf-dxa-glossary-image": `url("${e}")` } : null;
174
- });
175
- function Le() {
176
- window.print();
177
- }
178
- return (c, u) => Te.value ? (b(), d(s, {
179
- key: 0,
180
- spec: J.value,
181
- id: G.id,
182
- entity: G.entity,
183
- style: te(Ie.value)
184
- }, ee({
185
- "before-sheet": T((e) => [S(c.$slots, "before-sheet", y(_(e)), () => [(b(!0), p(l, null, x([ke(e.record, e)], (t) => (b(), p(l, { key: "before-sheet" }, [t?.source || t?.addToCollectionLabel ? (b(), p("div", k, [t.source ? (b(), p("p", A, [t.source.chipClass ? (b(), p("span", {
186
- key: 0,
187
- class: v(["mwnf-chip", t.source.chipClass]),
188
- "aria-hidden": "true"
189
- }, null, 2)) : f("", !0), t.source.name ? (b(), p(l, { key: 1 }, [h(C(t.source.label) + ": " + C(t.source.name), 1)], 64)) : f("", !0)])) : f("", !0), t.addToCollectionLabel ? (b(), p("p", j, [m("a", {
190
- href: w(O).myCollection,
191
- target: "_blank",
192
- rel: "noopener"
193
- }, "↗ " + C(t.addToCollectionLabel), 9, M)])) : f("", !0)])) : f("", !0), t?.notice ? (b(), p("div", N, [h(C(t.notice) + " ", 1), m("strong", null, [m("em", null, C(e.languages.map((e) => e.label).join(", ")), 1)])])) : f("", !0)], 64))), 128))])]),
194
- museum: T((e) => [S(c.$slots, "museum", y(_(e)), () => [(b(!0), p(l, null, x([Ne(e)], (t) => (b(), p("div", P, [t.holder ? (b(), p("p", {
195
- key: 0,
196
- class: "mwnf-sheet-museum__holder",
197
- innerHTML: t.holder
198
- }, null, 8, F)) : f("", !0), t.view ? (b(), d(a, {
199
- key: 1,
200
- variant: "summary",
201
- partner: t.view,
202
- label: "partner.info.about",
203
- dir: e.dir
204
- }, null, 8, ["partner", "dir"])) : f("", !0)]))), 128))])]),
205
- related: T(() => []),
206
- aside: T((a) => [S(c.$slots, "related", y(_(a)), () => [(b(!0), p(l, null, x([Pe(a.record, a)], (s) => (b(), p(l, { key: a.record?.id ?? "related" }, [s ? (b(), p("div", I, [
207
- s.title ? (b(), p("p", L, C(s.title), 1)) : f("", !0),
208
- s.description ? (b(), p("p", R, C(s.description), 1)) : f("", !0),
209
- s.inPackage.length || s.references.length ? (b(), d(o, {
210
- key: 2,
211
- heading: s.heading,
212
- records: s.inPackage,
213
- variant: s.variant,
214
- "action-label": s.actionLabel
215
- }, {
216
- default: T(() => [s.references.length ? (b(), p("ul", z, [(b(!0), p(l, null, x(s.references, (e) => (b(), p("li", { key: e.id }, [
217
- e.chipClass ? (b(), p("span", {
218
- key: 0,
219
- class: v(["mwnf-chip", e.chipClass]),
220
- "aria-hidden": "true"
221
- }, null, 2)) : f("", !0),
222
- e.name ? (b(), p(l, { key: 1 }, [h(C(e.name), 1)], 64)) : f("", !0),
223
- s.notInPackageLabel ? (b(), p("span", B, C(s.notInPackageLabel), 1)) : f("", !0)
224
- ]))), 128))])) : f("", !0)]),
225
- _: 2
226
- }, 1032, [
227
- "heading",
228
- "records",
229
- "variant",
230
- "action-label"
231
- ])) : f("", !0),
232
- s.artisticIntroduction ? (b(), p("p", V, [m("a", {
233
- href: s.artisticIntroduction.url,
234
- target: "_blank",
235
- rel: "noopener"
236
- }, "↗ " + C(s.artisticIntroduction.label), 9, H)])) : f("", !0),
237
- s.timeline ? (b(), d(r, {
238
- key: a.record.id,
239
- info: s.timeline
240
- }, null, 8, ["info"])) : f("", !0),
241
- s.glossary ? (b(), d(n, {
242
- key: 5,
243
- language: a.language,
244
- labels: s.glossaryLabels,
245
- dir: a.dir
246
- }, null, 8, [
247
- "language",
248
- "labels",
249
- "dir"
250
- ])) : f("", !0),
251
- s.dynasties?.records?.length ? (b(), d(e, {
252
- key: 6,
253
- heading: s.dynastiesHeading,
254
- dynasties: s.dynasties.records,
255
- tr: s.dynasties.tr,
256
- dir: a.dir
257
- }, null, 8, [
258
- "heading",
259
- "dynasties",
260
- "tr",
261
- "dir"
262
- ])) : f("", !0),
263
- g(t, {
264
- media: s.media,
265
- language: a.language,
266
- descriptions: !1,
267
- dir: a.dir
268
- }, null, 8, [
269
- "media",
270
- "language",
271
- "dir"
272
- ]),
273
- s.onDisplayIn?.groups.length ? (b(), p("div", U, [m("p", de, C(w(q)("record.related.onDisplayIn")), 1), g(i, {
274
- heading: "",
275
- groups: s.onDisplayIn.groups,
276
- "pending-label": s.onDisplayIn.pendingLabel,
277
- dir: a.dir
278
- }, null, 8, [
279
- "groups",
280
- "pending-label",
281
- "dir"
282
- ])])) : f("", !0),
283
- s.database ? (b(), p("div", fe, [m("p", pe, C(s.database.label), 1), m("p", me, [m("a", {
284
- href: s.database.url,
285
- target: "_blank",
286
- rel: "noopener"
287
- }, "↗ " + C(s.database.name), 9, W)])])) : f("", !0),
288
- s.overallDatabase ? (b(), p("div", he, [m("p", ge, C(s.overallDatabase.label), 1), m("p", _e, [m("a", {
289
- href: w(O).overallDatabase,
290
- target: "_blank",
291
- rel: "noopener"
292
- }, "↗ " + C(s.overallDatabase.linkLabel), 9, ve)])])) : f("", !0),
293
- s.download ? (b(), p("div", ye, [m("p", be, C(s.download.label), 1), m("p", {
294
- class: "mwnf-sheet-related__line mwnf-sheet-related__line--action",
295
- onClick: Le
296
- }, "➤ " + C(s.download.pdfLabel), 1)])) : f("", !0)
297
- ])) : f("", !0)], 64))), 128))])]),
298
- _: 2
299
- }, [x(we.value, (e) => ({
300
- name: e,
301
- fn: T((t) => [S(c.$slots, e, y(_(t)))])
302
- }))]), 1032, [
303
- "spec",
304
- "id",
305
- "entity",
306
- "style"
307
- ])) : (b(), d(w(re), { key: 1 }));
308
- }
309
- };
310
- export { G as t };