@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.
- package/README.md +191 -12
- package/dist/{FeaturedRecord-BJ8LaWGP.js → FeaturedRecord-DJfyvfqt.js} +1 -1
- package/dist/GlossaryPopover-DcptyNWI.js +654 -0
- package/dist/ItemDetailView-COWC8GDg.js +299 -0
- package/dist/{OnDisplayIn-Dv8i7uvH.js → OnDisplayIn-BfJoPonn.js} +38 -38
- package/dist/RecordView-C9rP8TyQ.js +263 -0
- package/dist/SiteShell-4vV2jIzf.js +192 -0
- package/dist/{Theme-Db88mckV.js → Theme-CZ-OVXao.js} +26 -26
- package/dist/TimelineEventList-gsoc-SBx.js +841 -0
- package/dist/TimelineResultsView-C2-TnM71.js +1386 -0
- package/dist/chrome-DPuPeWzV.js +1141 -0
- package/dist/components.js +1 -1
- package/dist/{content-p0tqKkcD.js → content-CtwBcSjU.js} +2 -2
- package/dist/content.js +6 -5
- package/dist/data-CJlLA-Mf.js +38 -0
- package/dist/data-DTbAYdr2.js +40 -0
- package/dist/dxa.js +638 -519
- package/dist/index.js +7 -6
- package/dist/standalone.js +762 -0
- package/dist/{themeSpecs-C_uGarTs.js → themeSpecs-B885l456.js} +3 -2
- package/dist/viewer-layout.css +1 -1
- package/dist/views.js +5 -4
- package/package.json +4 -3
- package/src/dxa/testing.js +37 -14
- package/src/styles/dxa-exhibition.css +25 -1
- package/src/styles/dxa-gallery.css +249 -2
- package/src/tokens.reference.css +78 -0
- package/dist/ItemDetailView-CfUtRLOV.js +0 -284
- package/dist/PageShell-CbJ9lQoQ.js +0 -961
- package/dist/SiteShell-C3OgZO8p.js +0 -154
- package/dist/TimelineEventList-COjkXEzS.js +0 -1487
- package/dist/TimelineResultsView-CmHomvV_.js +0 -1636
- package/dist/data-BfyYB8ff.js +0 -33
- package/dist/data-G8uXeEfE.js +0 -35
|
@@ -1,284 +0,0 @@
|
|
|
1
|
-
import { n as e, o as t } from "./TimelineEventList-COjkXEzS.js";
|
|
2
|
-
import { i as n, n as r, o as i, r as a, t as o } from "./OnDisplayIn-Dv8i7uvH.js";
|
|
3
|
-
import { s } from "./TimelineResultsView-CmHomvV_.js";
|
|
4
|
-
import { Fragment as c, computed as l, createBlock as u, createCommentVNode as d, createElementBlock as f, createElementVNode as p, createSlots as ee, createTextVNode as m, createVNode as h, guardReactiveProps as g, normalizeClass as _, normalizeProps as v, openBlock as y, renderList as b, renderSlot as x, toDisplayString as S, unref as C, useSlots as te, withCtx as w } from "vue";
|
|
5
|
-
import { NotFoundView as ne, byId as T, loadEntities as re, mdInline as E, mdStrip as ie, mwnfLinks as D, partnerView as ae, useDataPackage as oe, useI18n as se, useProjects as ce } from "@museumwnf/viewer-core";
|
|
6
|
-
//#region src/dxa/ItemDetailView.vue
|
|
7
|
-
var le = {
|
|
8
|
-
key: 0,
|
|
9
|
-
class: "mwnf-sheet-source"
|
|
10
|
-
}, ue = {
|
|
11
|
-
key: 0,
|
|
12
|
-
class: "mwnf-sheet-source__line"
|
|
13
|
-
}, O = {
|
|
14
|
-
key: 1,
|
|
15
|
-
class: "mwnf-sheet-source__uid"
|
|
16
|
-
}, k = {
|
|
17
|
-
key: 2,
|
|
18
|
-
class: "mwnf-sheet-source__collection"
|
|
19
|
-
}, A = ["href"], j = {
|
|
20
|
-
key: 1,
|
|
21
|
-
class: "mwnf-sheet-notice"
|
|
22
|
-
}, M = {
|
|
23
|
-
key: "museum",
|
|
24
|
-
class: "mwnf-sheet-museum"
|
|
25
|
-
}, N = ["innerHTML"], P = {
|
|
26
|
-
key: 0,
|
|
27
|
-
class: "mwnf-sheet-related"
|
|
28
|
-
}, F = {
|
|
29
|
-
key: 0,
|
|
30
|
-
class: "mwnf-sheet-related__heading mwnf-sheet-related__heading--caps"
|
|
31
|
-
}, I = {
|
|
32
|
-
key: 1,
|
|
33
|
-
class: "mwnf-sheet-related__description"
|
|
34
|
-
}, L = {
|
|
35
|
-
key: 0,
|
|
36
|
-
class: "mwnf-sheet-related__references"
|
|
37
|
-
}, R = { key: 2 }, z = {
|
|
38
|
-
key: 3,
|
|
39
|
-
class: "mwnf-sheet-related__unresolved"
|
|
40
|
-
}, B = {
|
|
41
|
-
key: 2,
|
|
42
|
-
class: "mwnf-sheet-related__line"
|
|
43
|
-
}, V = ["href"], H = { key: 6 }, U = { class: "mwnf-sheet-related__heading" }, de = { key: 7 }, fe = { class: "mwnf-sheet-related__heading" }, pe = { class: "mwnf-sheet-related__line" }, me = ["href"], W = { key: 8 }, he = { class: "mwnf-sheet-related__heading" }, ge = { class: "mwnf-sheet-related__line" }, _e = ["href"], ve = { key: 9 }, ye = { class: "mwnf-sheet-related__heading" }, G = {
|
|
44
|
-
__name: "ItemDetailView",
|
|
45
|
-
props: {
|
|
46
|
-
spec: {
|
|
47
|
-
type: Object,
|
|
48
|
-
required: !0
|
|
49
|
-
},
|
|
50
|
-
id: {
|
|
51
|
-
type: String,
|
|
52
|
-
required: !0
|
|
53
|
-
},
|
|
54
|
-
entity: {
|
|
55
|
-
type: String,
|
|
56
|
-
default: ""
|
|
57
|
-
},
|
|
58
|
-
dataGetter: {
|
|
59
|
-
type: Function,
|
|
60
|
-
default: null
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
setup(G) {
|
|
64
|
-
let K = G, be = te(), xe = /* @__PURE__ */ new Set([
|
|
65
|
-
"before-sheet",
|
|
66
|
-
"museum",
|
|
67
|
-
"related"
|
|
68
|
-
]), Se = l(() => Object.keys(be).filter((e) => !xe.has(e))), Ce = l(() => !K.dataGetter || K.dataGetter(K.id) != null), { t: q } = se(), J = l(() => K.spec), Y = ce(), X = (e, t) => (e.name ?? "").localeCompare(t.name ?? ""), we = (e) => (e.gallery_references ?? []).filter((e) => e.kind === "gallery").sort(X), Te = (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;
|
|
69
|
-
function Ee(e, t) {
|
|
70
|
-
if (!e) return null;
|
|
71
|
-
let n = J.value.sourceDatabase === !1 ? null : J.value.sourceDatabase ?? null, r = null;
|
|
72
|
-
if (n) {
|
|
73
|
-
let i = n.chipClass ? n.chipClass(e, t) : null, a = Y.label(e.project_id);
|
|
74
|
-
(i || a) && (r = {
|
|
75
|
-
chipClass: i,
|
|
76
|
-
name: a,
|
|
77
|
-
label: q(n.label ?? "record.sheet.sourceDatabase")
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
let i = n && n.addToCollection !== !1 ? q(n.addToCollection?.label ?? "record.action.addToCollection") : null, a = n ? e.backward_compatibility ?? "" : "", o = J.value.notice === !1 ? null : J.value.notice ?? null, s = o && o.show(e, t) ? q(o.label) : null;
|
|
81
|
-
return {
|
|
82
|
-
source: r,
|
|
83
|
-
addToCollectionLabel: i,
|
|
84
|
-
notice: s,
|
|
85
|
-
backwardCompatibility: a
|
|
86
|
-
};
|
|
87
|
-
}
|
|
88
|
-
let $ = oe(), De = T("partners"), Oe = T("countries");
|
|
89
|
-
re(["partners", "countries"]), $.loadTranslations("countries", "en");
|
|
90
|
-
function ke(e, t) {
|
|
91
|
-
let n = $.tr("countries", e, t, "en");
|
|
92
|
-
return ie(n.name ?? Oe.value?.get(e)?.internal_name ?? "");
|
|
93
|
-
}
|
|
94
|
-
function Ae(e) {
|
|
95
|
-
let t = e.text?.holder ? E(String(e.text.holder)) : "", n = J.value.museum === !1 ? null : J.value.museum ?? null, r = n ? De.value?.get(e.record?.partner_id) : null;
|
|
96
|
-
return {
|
|
97
|
-
holder: t,
|
|
98
|
-
view: r ? ae(r, $.tr("partners", r.id, e.language, "en"), {
|
|
99
|
-
countryLabel: (t) => ke(t, e.language),
|
|
100
|
-
route: (t) => n.route ? n.route(t.id, e) : null
|
|
101
|
-
}) : null
|
|
102
|
-
};
|
|
103
|
-
}
|
|
104
|
-
function je(e, t) {
|
|
105
|
-
if (!e) return null;
|
|
106
|
-
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) => ({
|
|
107
|
-
...e,
|
|
108
|
-
name: e.project_id ? Y.label(e.project_id) : null,
|
|
109
|
-
chipClass: n.outsideChip ? n.outsideChip(e, t) : null
|
|
110
|
-
})), c = (e) => ({
|
|
111
|
-
id: e.id,
|
|
112
|
-
label: E(e.name ?? ""),
|
|
113
|
-
href: e.legacy_host || "",
|
|
114
|
-
external: !!e.legacy_host
|
|
115
|
-
}), l = n.onDisplayIn && n.onDisplayIn !== !1 ? {
|
|
116
|
-
pendingLabel: n.onDisplayIn.linkPendingLabel ?? "",
|
|
117
|
-
groups: [{
|
|
118
|
-
heading: "record.related.exhibitions",
|
|
119
|
-
links: Te(e).map(c)
|
|
120
|
-
}, {
|
|
121
|
-
heading: "record.related.galleries",
|
|
122
|
-
links: we(e).map(c)
|
|
123
|
-
}].filter((e) => e.links.length)
|
|
124
|
-
} : null, u = n.databaseLabel && Q(e) ? {
|
|
125
|
-
url: Q(e),
|
|
126
|
-
label: q(n.databaseLabel),
|
|
127
|
-
name: Y.label(e.project_id)
|
|
128
|
-
} : null, d = n.overallDatabase && n.overallDatabase !== !1 ? {
|
|
129
|
-
label: q(n.overallDatabase.label),
|
|
130
|
-
linkLabel: q(n.overallDatabase.linkLabel)
|
|
131
|
-
} : null;
|
|
132
|
-
return {
|
|
133
|
-
title: n.title ? q(n.title) : "",
|
|
134
|
-
description: n.description ? q(n.description) : "",
|
|
135
|
-
heading: q(n.heading ?? "record.related.items"),
|
|
136
|
-
variant: n.variant ?? "grid",
|
|
137
|
-
actionLabel: n.actionLabel ? q(n.actionLabel) : "",
|
|
138
|
-
inPackage: a,
|
|
139
|
-
references: s,
|
|
140
|
-
notInPackageLabel: n.notInPackageLabel ? q(n.notInPackageLabel) : "",
|
|
141
|
-
artisticIntroduction: n.artisticIntroductionLabel && Z(e) ? {
|
|
142
|
-
url: Z(e),
|
|
143
|
-
label: q(n.artisticIntroductionLabel)
|
|
144
|
-
} : null,
|
|
145
|
-
timeline: n.timeline ? n.timeline(e, t) : null,
|
|
146
|
-
glossary: n.glossary !== !1,
|
|
147
|
-
dynasties: n.dynasties ? n.dynasties(e, t.language, t) : null,
|
|
148
|
-
media: n.media === !1 ? [] : e.media ?? [],
|
|
149
|
-
onDisplayIn: l,
|
|
150
|
-
database: u,
|
|
151
|
-
overallDatabase: d,
|
|
152
|
-
download: n.download === !1 ? null : {
|
|
153
|
-
label: q("record.action.download"),
|
|
154
|
-
pdfLabel: q("record.action.downloadPdf")
|
|
155
|
-
}
|
|
156
|
-
};
|
|
157
|
-
}
|
|
158
|
-
function Me() {
|
|
159
|
-
window.print();
|
|
160
|
-
}
|
|
161
|
-
return (l, te) => Ce.value ? (y(), u(s, {
|
|
162
|
-
key: 0,
|
|
163
|
-
spec: J.value,
|
|
164
|
-
id: G.id,
|
|
165
|
-
entity: G.entity
|
|
166
|
-
}, ee({
|
|
167
|
-
"before-sheet": w((e) => [x(l.$slots, "before-sheet", v(g(e)), () => [(y(!0), f(c, null, b([Ee(e.record, e)], (t) => (y(), f(c, { key: "before-sheet" }, [t?.source || t?.backwardCompatibility || t?.addToCollectionLabel ? (y(), f("div", le, [
|
|
168
|
-
t.source ? (y(), f("p", ue, [t.source.chipClass ? (y(), f("span", {
|
|
169
|
-
key: 0,
|
|
170
|
-
class: _(["mwnf-chip", t.source.chipClass]),
|
|
171
|
-
"aria-hidden": "true"
|
|
172
|
-
}, null, 2)) : d("", !0), t.source.name ? (y(), f(c, { key: 1 }, [m(S(t.source.label) + ": " + S(t.source.name), 1)], 64)) : d("", !0)])) : d("", !0),
|
|
173
|
-
t.backwardCompatibility ? (y(), f("p", O, [p("code", null, S(t.backwardCompatibility), 1)])) : d("", !0),
|
|
174
|
-
t.addToCollectionLabel ? (y(), f("p", k, [p("a", {
|
|
175
|
-
href: C(D).myCollection,
|
|
176
|
-
target: "_blank",
|
|
177
|
-
rel: "noopener"
|
|
178
|
-
}, "↗ " + S(t.addToCollectionLabel), 9, A)])) : d("", !0)
|
|
179
|
-
])) : d("", !0), t?.notice ? (y(), f("div", j, [m(S(t.notice) + " ", 1), p("strong", null, [p("em", null, S(e.languages.map((e) => e.label).join(", ")), 1)])])) : d("", !0)], 64))), 128))])]),
|
|
180
|
-
museum: w((t) => [x(l.$slots, "museum", v(g(t)), () => [(y(!0), f(c, null, b([Ae(t)], (n) => (y(), f("div", M, [n.holder ? (y(), f("p", {
|
|
181
|
-
key: 0,
|
|
182
|
-
class: "mwnf-sheet-museum__holder",
|
|
183
|
-
innerHTML: n.holder
|
|
184
|
-
}, null, 8, N)) : d("", !0), n.view ? (y(), u(e, {
|
|
185
|
-
key: 1,
|
|
186
|
-
variant: "summary",
|
|
187
|
-
partner: n.view,
|
|
188
|
-
label: "partner.info.about",
|
|
189
|
-
dir: t.dir
|
|
190
|
-
}, null, 8, ["partner", "dir"])) : d("", !0)]))), 128))])]),
|
|
191
|
-
related: w((e) => [x(l.$slots, "related", v(g(e)), () => [(y(!0), f(c, null, b([je(e.record, e)], (s) => (y(), f(c, { key: e.record?.id ?? "related" }, [s ? (y(), f("div", P, [
|
|
192
|
-
s.title ? (y(), f("p", F, S(s.title), 1)) : d("", !0),
|
|
193
|
-
s.description ? (y(), f("p", I, S(s.description), 1)) : d("", !0),
|
|
194
|
-
h(t, {
|
|
195
|
-
heading: s.heading,
|
|
196
|
-
records: s.inPackage,
|
|
197
|
-
variant: s.variant,
|
|
198
|
-
"action-label": s.actionLabel
|
|
199
|
-
}, {
|
|
200
|
-
default: w(() => [s.references.length ? (y(), f("ul", L, [(y(!0), f(c, null, b(s.references, (e) => (y(), f("li", { key: e.id }, [
|
|
201
|
-
e.chipClass ? (y(), f("span", {
|
|
202
|
-
key: 0,
|
|
203
|
-
class: _(["mwnf-chip", e.chipClass]),
|
|
204
|
-
"aria-hidden": "true"
|
|
205
|
-
}, null, 2)) : d("", !0),
|
|
206
|
-
e.name ? (y(), f(c, { key: 1 }, [m(S(e.name), 1)], 64)) : (y(), f("code", R, S(e.backward_compatibility), 1)),
|
|
207
|
-
s.notInPackageLabel ? (y(), f("span", z, S(s.notInPackageLabel), 1)) : d("", !0)
|
|
208
|
-
]))), 128))])) : d("", !0)]),
|
|
209
|
-
_: 2
|
|
210
|
-
}, 1032, [
|
|
211
|
-
"heading",
|
|
212
|
-
"records",
|
|
213
|
-
"variant",
|
|
214
|
-
"action-label"
|
|
215
|
-
]),
|
|
216
|
-
s.artisticIntroduction ? (y(), f("p", B, [p("a", {
|
|
217
|
-
href: s.artisticIntroduction.url,
|
|
218
|
-
target: "_blank",
|
|
219
|
-
rel: "noopener"
|
|
220
|
-
}, "↗ " + S(s.artisticIntroduction.label), 9, V)])) : d("", !0),
|
|
221
|
-
s.timeline ? (y(), u(a, {
|
|
222
|
-
key: e.record.id,
|
|
223
|
-
info: s.timeline
|
|
224
|
-
}, null, 8, ["info"])) : d("", !0),
|
|
225
|
-
s.glossary ? (y(), u(i, {
|
|
226
|
-
key: 4,
|
|
227
|
-
language: e.language,
|
|
228
|
-
dir: e.dir
|
|
229
|
-
}, null, 8, ["language", "dir"])) : d("", !0),
|
|
230
|
-
s.dynasties?.records?.length ? (y(), u(n, {
|
|
231
|
-
key: 5,
|
|
232
|
-
heading: C(q)("record.dynasty.list"),
|
|
233
|
-
dynasties: s.dynasties.records,
|
|
234
|
-
tr: s.dynasties.tr,
|
|
235
|
-
dir: e.dir
|
|
236
|
-
}, null, 8, [
|
|
237
|
-
"heading",
|
|
238
|
-
"dynasties",
|
|
239
|
-
"tr",
|
|
240
|
-
"dir"
|
|
241
|
-
])) : d("", !0),
|
|
242
|
-
h(r, {
|
|
243
|
-
media: s.media,
|
|
244
|
-
descriptions: !1,
|
|
245
|
-
dir: e.dir
|
|
246
|
-
}, null, 8, ["media", "dir"]),
|
|
247
|
-
s.onDisplayIn?.groups.length ? (y(), f("div", H, [p("p", U, S(C(q)("record.related.onDisplayIn")), 1), h(o, {
|
|
248
|
-
heading: "",
|
|
249
|
-
groups: s.onDisplayIn.groups,
|
|
250
|
-
"pending-label": s.onDisplayIn.pendingLabel,
|
|
251
|
-
dir: e.dir
|
|
252
|
-
}, null, 8, [
|
|
253
|
-
"groups",
|
|
254
|
-
"pending-label",
|
|
255
|
-
"dir"
|
|
256
|
-
])])) : d("", !0),
|
|
257
|
-
s.database ? (y(), f("div", de, [p("p", fe, S(s.database.label), 1), p("p", pe, [p("a", {
|
|
258
|
-
href: s.database.url,
|
|
259
|
-
target: "_blank",
|
|
260
|
-
rel: "noopener"
|
|
261
|
-
}, "↗ " + S(s.database.name), 9, me)])])) : d("", !0),
|
|
262
|
-
s.overallDatabase ? (y(), f("div", W, [p("p", he, S(s.overallDatabase.label), 1), p("p", ge, [p("a", {
|
|
263
|
-
href: C(D).overallDatabase,
|
|
264
|
-
target: "_blank",
|
|
265
|
-
rel: "noopener"
|
|
266
|
-
}, "↗ " + S(s.overallDatabase.linkLabel), 9, _e)])])) : d("", !0),
|
|
267
|
-
s.download ? (y(), f("div", ve, [p("p", ye, S(s.download.label), 1), p("p", {
|
|
268
|
-
class: "mwnf-sheet-related__line mwnf-sheet-related__line--action",
|
|
269
|
-
onClick: Me
|
|
270
|
-
}, "➤ " + S(s.download.pdfLabel), 1)])) : d("", !0)
|
|
271
|
-
])) : d("", !0)], 64))), 128))])]),
|
|
272
|
-
_: 2
|
|
273
|
-
}, [b(Se.value, (e) => ({
|
|
274
|
-
name: e,
|
|
275
|
-
fn: w((t) => [x(l.$slots, e, v(g(t)))])
|
|
276
|
-
}))]), 1032, [
|
|
277
|
-
"spec",
|
|
278
|
-
"id",
|
|
279
|
-
"entity"
|
|
280
|
-
])) : (y(), u(C(ne), { key: 1 }));
|
|
281
|
-
}
|
|
282
|
-
};
|
|
283
|
-
//#endregion
|
|
284
|
-
export { G as t };
|