@museumwnf/viewer-layout 3.9.0 → 3.10.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/dist/{ItemDetailView-Dko_grJr.js → ItemDetailView-CzIquvf7.js} +2 -2
- package/dist/RecordView-BvKoAB2j.js +275 -0
- package/dist/{SiteShell-CXMfLqzq.js → SiteShell-DmKiH3jM.js} +1 -1
- package/dist/{Theme-tF4wOaNa.js → Theme-pxrmYfo-.js} +2 -2
- package/dist/{chrome-i1DOEyLS.js → chrome-Co3f_Shw.js} +2 -1
- package/dist/components.js +1 -1
- package/dist/{data-CCcDVsTG.js → data-Dz9REf19.js} +1 -1
- package/dist/{data-CGFEbGab.js → data-d30zAska.js} +1 -1
- package/dist/dxa.js +71 -70
- package/dist/index.js +1 -1
- package/dist/standalone.js +113 -113
- package/dist/{themeSpecs-C2Y2abxd.js → themeSpecs-CXVCN8UV.js} +1 -1
- package/dist/views.js +1 -1
- package/package.json +3 -3
- package/dist/RecordView-CdKx9tFy.js +0 -270
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as e } from "./chrome-
|
|
1
|
+
import { t as e } from "./chrome-Co3f_Shw.js";
|
|
2
2
|
import { r as t } from "./GlossaryPopover-DcptyNWI.js";
|
|
3
3
|
import { n } from "./TimelineEventList-gsoc-SBx.js";
|
|
4
4
|
import { i as r, n as i, o as a, r as o, t as s } from "./OnDisplayIn-2ctLMfvw.js";
|
|
5
|
-
import { t as c } from "./RecordView-
|
|
5
|
+
import { t as c } from "./RecordView-BvKoAB2j.js";
|
|
6
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
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
8
|
//#region src/dxa/ItemDetailView.vue
|
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
import { a as e, c as t, d as n, i as r, n as ee, o as te, r as ne, s as re, t as ie } from "./GlossaryPopover-DcptyNWI.js";
|
|
2
|
+
import { Fragment as ae, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createSlots as oe, createTextVNode as se, createVNode as l, guardReactiveProps as u, normalizeClass as ce, normalizeProps as d, openBlock as f, renderList as p, renderSlot as m, toDisplayString as h, unref as g, useSlots as _, withCtx as v } from "vue";
|
|
3
|
+
import { NotFoundView as le, byId as ue, citation as de, creditLine as fe, entityRef as pe, languageLabels as me, pictureCredits as he, picturesInLanguage as ge, renderBlock as y, renderInline as b, renderPlain as x, sheetRows as S, sourceUrl as _e, useDataPackage as ve, useGlossaryPopup as ye, useI18n as be, useProjects as xe, useRecordSheet as Se, useRelatedRecords as Ce } from "@museumwnf/viewer-core";
|
|
4
|
+
import { useRoute as we } from "vue-router";
|
|
5
|
+
//#region src/views/pictureLimit.js
|
|
6
|
+
function C(e, t, n) {
|
|
7
|
+
let r = typeof t == "function" ? t(n) : t;
|
|
8
|
+
return Number.isInteger(r) && r > 0 ? e.slice(0, r) : e;
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
11
|
+
//#region src/views/RecordView.vue
|
|
12
|
+
var Te = ["dir", "innerHTML"], Ee = { class: "mwnf-record__body" }, De = { class: "mwnf-record__main" }, w = {
|
|
13
|
+
key: 1,
|
|
14
|
+
class: "mwnf-record__status"
|
|
15
|
+
}, T = {
|
|
16
|
+
key: 0,
|
|
17
|
+
class: "mwnf-record__aside"
|
|
18
|
+
}, E = {
|
|
19
|
+
key: 2,
|
|
20
|
+
class: "mwnf-record__status"
|
|
21
|
+
}, D = {
|
|
22
|
+
__name: "RecordView",
|
|
23
|
+
props: {
|
|
24
|
+
spec: {
|
|
25
|
+
type: Object,
|
|
26
|
+
required: !0
|
|
27
|
+
},
|
|
28
|
+
id: {
|
|
29
|
+
type: String,
|
|
30
|
+
required: !0
|
|
31
|
+
},
|
|
32
|
+
entity: {
|
|
33
|
+
type: String,
|
|
34
|
+
default: ""
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
setup(D) {
|
|
38
|
+
let O = D, { t: k, locale: Oe } = be(), A = ve(), ke = xe(), Ae = _(), je = we(), j = O.spec.entity ?? O.entity, M = i(() => O.spec), Me = pe(j), Ne = ue(j), N = i(() => Ne.value.get(O.id) ?? null), Pe = i(() => Me.value !== null), { language: P, languages: Fe, dir: F, select: I, text: L, ready: R, terms: Ie, glossary: z, attribution: B } = Se(N, {
|
|
39
|
+
entity: j,
|
|
40
|
+
translations: O.spec.translations ?? [],
|
|
41
|
+
attribution: O.spec.attribution ?? []
|
|
42
|
+
}), V = i(() => me(Fe.value)), { active: H, onClick: U, close: Le } = ye(Ie), Re = i(() => H.value ? y(H.value.definition, { breaks: !0 }) : ""), W = (e, t) => A.tr(e, t, P.value, "en"), ze = (e) => A.translations(e, P.value), G = i(() => ({
|
|
43
|
+
record: N.value,
|
|
44
|
+
text: L.value,
|
|
45
|
+
language: P.value,
|
|
46
|
+
languages: V.value,
|
|
47
|
+
select: I,
|
|
48
|
+
dir: F.value,
|
|
49
|
+
glossary: z.value,
|
|
50
|
+
ready: R.value,
|
|
51
|
+
attribution: B.value,
|
|
52
|
+
t: k,
|
|
53
|
+
tr: W,
|
|
54
|
+
translations: ze
|
|
55
|
+
}));
|
|
56
|
+
function K(e) {
|
|
57
|
+
return ((typeof e == "function" ? e(G.value) : e) ?? []).map((e) => ({
|
|
58
|
+
...e,
|
|
59
|
+
label: e.label ? k(e.label) : ""
|
|
60
|
+
}));
|
|
61
|
+
}
|
|
62
|
+
let Be = i(() => N.value ? S(K(M.value.fields), G.value) : []), Ve = i(() => N.value ? S(K(M.value.sections).map((e) => ({
|
|
63
|
+
render: "block",
|
|
64
|
+
...e
|
|
65
|
+
})), G.value) : []), q = i(() => M.value.shortDescription === !1 ? "" : M.value.shortDescription ?? "short_description"), He = i(() => {
|
|
66
|
+
let e = q.value ? L.value[q.value] : "";
|
|
67
|
+
return e ? { html: y(String(e), {
|
|
68
|
+
breaks: !0,
|
|
69
|
+
glossary: z.value
|
|
70
|
+
}) } : null;
|
|
71
|
+
}), Ue = i(() => {
|
|
72
|
+
if (!N.value) return "";
|
|
73
|
+
if (M.value.title) return M.value.title(G.value);
|
|
74
|
+
let e = L.value.name ?? N.value.internal_name ?? N.value.id;
|
|
75
|
+
return b(String(e), { glossary: z.value });
|
|
76
|
+
}), J = i(() => N.value ? C(We(), M.value.pictureLimit, G.value) : []);
|
|
77
|
+
function We() {
|
|
78
|
+
if (M.value.media) return M.value.media(N.value, G.value);
|
|
79
|
+
let e = x(String(L.value.name ?? N.value.internal_name ?? ""));
|
|
80
|
+
return ge(N.value.images, P.value).map((t) => ({
|
|
81
|
+
url: t.url,
|
|
82
|
+
alt: t.captions?.[P.value] ?? e,
|
|
83
|
+
caption: t.captions?.[P.value] ?? "",
|
|
84
|
+
...he(t, P.value)
|
|
85
|
+
}));
|
|
86
|
+
}
|
|
87
|
+
let Ge = [
|
|
88
|
+
{
|
|
89
|
+
field: "author",
|
|
90
|
+
label: "sheet.field.preparedBy"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
field: "copy_editor",
|
|
94
|
+
label: "sheet.field.copyeditedBy"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
field: "translator",
|
|
98
|
+
label: "sheet.field.translationBy"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
field: "translation_copy_editor",
|
|
102
|
+
label: "sheet.field.translationCopyeditedBy"
|
|
103
|
+
}
|
|
104
|
+
];
|
|
105
|
+
function Y(e) {
|
|
106
|
+
let t = M.value.creditNames ? L.value.credit_names?.[e] : null;
|
|
107
|
+
return t?.length ? fe(t) : L.value[e] ?? B.value[e] ?? "";
|
|
108
|
+
}
|
|
109
|
+
let Ke = i(() => (M.value.credits ?? Ge).map(({ field: e, label: t }) => ({
|
|
110
|
+
label: k(t),
|
|
111
|
+
value: Y(e)
|
|
112
|
+
})).filter((e) => e.value)), qe = i(() => String(N.value?.[M.value.workingNumber ?? "mwnf_reference"] ?? "")), X = i(() => {
|
|
113
|
+
let e = M.value.citation;
|
|
114
|
+
if (!N.value || e === !1) return "";
|
|
115
|
+
let t = typeof e?.project == "function" ? null : e?.project ?? N.value.project_id, n = typeof e?.project == "function" ? e.project(N.value, G.value) : ke.label(t), r = e?.permalink === !1 ? void 0 : typeof e?.permalink == "string" ? e.permalink : _e(je) ?? void 0;
|
|
116
|
+
return de({
|
|
117
|
+
author: Y("author") || void 0,
|
|
118
|
+
name: L.value.name ?? N.value.internal_name ?? "",
|
|
119
|
+
project: n,
|
|
120
|
+
permalink: r,
|
|
121
|
+
inWord: k("record.citation.in")
|
|
122
|
+
});
|
|
123
|
+
}), Z = Ce(N, {
|
|
124
|
+
entity: j,
|
|
125
|
+
language: P
|
|
126
|
+
}), Q = i(() => M.value.related === !1 ? null : M.value.related ?? {}), $ = i(() => {
|
|
127
|
+
if (!Q.value) return [];
|
|
128
|
+
let e = Q.value.record ?? Je;
|
|
129
|
+
return Z.value.inPackage.map((t) => e(t, G.value));
|
|
130
|
+
});
|
|
131
|
+
function Je({ record: e, justification: t }) {
|
|
132
|
+
let n = W(j, e.id).name ?? e.internal_name ?? e.id;
|
|
133
|
+
return {
|
|
134
|
+
id: e.id,
|
|
135
|
+
image: e.images?.[0]?.url ?? "",
|
|
136
|
+
imageAlt: x(String(n)),
|
|
137
|
+
name: b(String(n)),
|
|
138
|
+
meta: t ? [t] : [],
|
|
139
|
+
badge: e.type ?? "",
|
|
140
|
+
to: {
|
|
141
|
+
name: M.value.route ?? (O.entity ? `${O.entity}-detail` : "item"),
|
|
142
|
+
params: { id: e.id }
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
let Ye = /* @__PURE__ */ new Set([
|
|
147
|
+
"header",
|
|
148
|
+
"before-sheet",
|
|
149
|
+
"after-sheet",
|
|
150
|
+
"aside",
|
|
151
|
+
"source",
|
|
152
|
+
"related",
|
|
153
|
+
"after",
|
|
154
|
+
"default"
|
|
155
|
+
]), Xe = i(() => Object.keys(Ae).filter((e) => !Ye.has(e)));
|
|
156
|
+
return (i, _) => Pe.value && !N.value ? (f(), a(g(le), { key: 0 })) : N.value ? (f(), s("article", {
|
|
157
|
+
key: 1,
|
|
158
|
+
class: ce(["mwnf-record", { "mwnf-record--spaced": M.value.spaced }]),
|
|
159
|
+
onClick: _[0] ||= (...e) => g(U) && g(U)(...e)
|
|
160
|
+
}, [
|
|
161
|
+
m(i.$slots, "header", d(u(G.value)), () => [
|
|
162
|
+
M.value.back ? (f(), a(n, {
|
|
163
|
+
key: 0,
|
|
164
|
+
class: "mwnf-record__back",
|
|
165
|
+
to: M.value.back.to,
|
|
166
|
+
href: M.value.back.href
|
|
167
|
+
}, {
|
|
168
|
+
default: v(() => [se("← " + h(g(k)(M.value.back.label)), 1)]),
|
|
169
|
+
_: 1
|
|
170
|
+
}, 8, ["to", "href"])) : o("", !0),
|
|
171
|
+
l(t, {
|
|
172
|
+
languages: V.value,
|
|
173
|
+
language: g(P),
|
|
174
|
+
onSelect: g(I)
|
|
175
|
+
}, null, 8, [
|
|
176
|
+
"languages",
|
|
177
|
+
"language",
|
|
178
|
+
"onSelect"
|
|
179
|
+
]),
|
|
180
|
+
c("h1", {
|
|
181
|
+
class: "mwnf-record__title",
|
|
182
|
+
dir: g(F) || void 0,
|
|
183
|
+
innerHTML: Ue.value
|
|
184
|
+
}, null, 8, Te)
|
|
185
|
+
]),
|
|
186
|
+
c("div", Ee, [c("div", De, [
|
|
187
|
+
J.value.length ? (f(), a(ee, {
|
|
188
|
+
key: 0,
|
|
189
|
+
images: J.value,
|
|
190
|
+
variant: M.value.mediaVariant ?? ""
|
|
191
|
+
}, null, 8, ["images", "variant"])) : o("", !0),
|
|
192
|
+
g(R) ? o("", !0) : (f(), s("p", w, h(g(k)("core.status.loading")), 1)),
|
|
193
|
+
m(i.$slots, "before-sheet", d(u(G.value))),
|
|
194
|
+
l(re, {
|
|
195
|
+
rows: Be.value,
|
|
196
|
+
layout: M.value.layout ?? "table",
|
|
197
|
+
dir: g(F),
|
|
198
|
+
"short-description": He.value,
|
|
199
|
+
"short-description-after": M.value.shortDescriptionAfter ?? "description"
|
|
200
|
+
}, oe({ _: 2 }, [p(Xe.value, (e) => ({
|
|
201
|
+
name: e,
|
|
202
|
+
fn: v((t) => [m(i.$slots, e, d(u({
|
|
203
|
+
...t,
|
|
204
|
+
...G.value
|
|
205
|
+
})))])
|
|
206
|
+
}))]), 1032, [
|
|
207
|
+
"rows",
|
|
208
|
+
"layout",
|
|
209
|
+
"dir",
|
|
210
|
+
"short-description",
|
|
211
|
+
"short-description-after"
|
|
212
|
+
]),
|
|
213
|
+
(f(!0), s(ae, null, p(Ve.value, (e) => (f(), a(te, {
|
|
214
|
+
key: e.key,
|
|
215
|
+
heading: e.label,
|
|
216
|
+
html: e.html,
|
|
217
|
+
dir: g(F)
|
|
218
|
+
}, null, 8, [
|
|
219
|
+
"heading",
|
|
220
|
+
"html",
|
|
221
|
+
"dir"
|
|
222
|
+
]))), 128)),
|
|
223
|
+
m(i.$slots, "after-sheet", d(u(G.value))),
|
|
224
|
+
l(e, {
|
|
225
|
+
credits: Ke.value,
|
|
226
|
+
"working-number": qe.value,
|
|
227
|
+
"working-number-label": g(k)("sheet.field.workingNumber"),
|
|
228
|
+
citation: X.value,
|
|
229
|
+
"citation-heading": M.value.citation?.heading ? g(k)(M.value.citation.heading) : ""
|
|
230
|
+
}, null, 8, [
|
|
231
|
+
"credits",
|
|
232
|
+
"working-number",
|
|
233
|
+
"working-number-label",
|
|
234
|
+
"citation",
|
|
235
|
+
"citation-heading"
|
|
236
|
+
]),
|
|
237
|
+
m(i.$slots, "source", d(u(G.value)), () => [l(r)]),
|
|
238
|
+
m(i.$slots, "related", d(u({
|
|
239
|
+
...G.value,
|
|
240
|
+
records: $.value,
|
|
241
|
+
outside: g(Z).outside
|
|
242
|
+
})), () => [Q.value ? (f(), a(ne, {
|
|
243
|
+
key: 0,
|
|
244
|
+
heading: g(k)(Q.value.heading ?? "record.related.items"),
|
|
245
|
+
records: $.value,
|
|
246
|
+
variant: Q.value.variant ?? "list",
|
|
247
|
+
"action-label": Q.value.actionLabel ? g(k)(Q.value.actionLabel) : ""
|
|
248
|
+
}, null, 8, [
|
|
249
|
+
"heading",
|
|
250
|
+
"records",
|
|
251
|
+
"variant",
|
|
252
|
+
"action-label"
|
|
253
|
+
])) : o("", !0)])
|
|
254
|
+
]), i.$slots.aside ? (f(), s("aside", T, [m(i.$slots, "aside", d(u({
|
|
255
|
+
...G.value,
|
|
256
|
+
records: $.value,
|
|
257
|
+
outside: g(Z).outside
|
|
258
|
+
})))])) : o("", !0)]),
|
|
259
|
+
m(i.$slots, "after", d(u(G.value))),
|
|
260
|
+
l(ie, {
|
|
261
|
+
term: g(H),
|
|
262
|
+
html: Re.value,
|
|
263
|
+
dir: g(F),
|
|
264
|
+
onClose: g(Le)
|
|
265
|
+
}, null, 8, [
|
|
266
|
+
"term",
|
|
267
|
+
"html",
|
|
268
|
+
"dir",
|
|
269
|
+
"onClose"
|
|
270
|
+
])
|
|
271
|
+
], 2)) : (f(), s("p", E, h(g(k)("core.status.loading")), 1));
|
|
272
|
+
}
|
|
273
|
+
};
|
|
274
|
+
//#endregion
|
|
275
|
+
export { C as n, D as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as e, r as t } from "./chrome-
|
|
1
|
+
import { a as e, r as t } from "./chrome-Co3f_Shw.js";
|
|
2
2
|
import { computed as n, createBlock as r, createSlots as i, mergeProps as a, openBlock as o, renderSlot as s, useAttrs as c, withCtx as l } from "vue";
|
|
3
3
|
import { mwnfLinks as u, useI18n as d, useSection as f, useSiteConfig as p, useSiteRights as m } from "@museumwnf/viewer-core";
|
|
4
4
|
import { useRouter as h } from "vue-router";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { d as e, i as t } from "./GlossaryPopover-DcptyNWI.js";
|
|
2
2
|
import { o as n } from "./TimelineResultsView-C2-TnM71.js";
|
|
3
|
-
import { A as r, F as i, h as a, m as o } from "./data-
|
|
4
|
-
import { n as s, r as c, t as l } from "./themeSpecs-
|
|
3
|
+
import { A as r, F as i, h as a, m as o } from "./data-d30zAska.js";
|
|
4
|
+
import { n as s, r as c, t as l } from "./themeSpecs-CXVCN8UV.js";
|
|
5
5
|
import { Fragment as u, computed as d, createBlock as f, createCommentVNode as p, createElementBlock as m, createElementVNode as h, createTextVNode as g, createVNode as _, normalizeClass as v, onMounted as ee, openBlock as y, ref as b, renderList as x, toDisplayString as S, unref as C, vModelCheckbox as w, watch as T, withCtx as E, withDirectives as D } from "vue";
|
|
6
6
|
import { renderBlock as O, useI18n as k } from "@museumwnf/viewer-core";
|
|
7
7
|
import { RouterLink as A, useRoute as te, useRouter as ne } from "vue-router";
|
|
@@ -300,8 +300,9 @@ var w = {
|
|
|
300
300
|
let e = c.caption;
|
|
301
301
|
if (!e) return null;
|
|
302
302
|
let t = typeof e == "string" ? e : e.name ?? "", n = typeof e == "string" ? "" : [
|
|
303
|
-
e.partner,
|
|
303
|
+
e.holder ?? e.partner,
|
|
304
304
|
e.location,
|
|
305
|
+
e.province,
|
|
305
306
|
e.country
|
|
306
307
|
].filter(Boolean).join(", ");
|
|
307
308
|
return {
|
package/dist/components.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "./SiteShell-
|
|
1
|
+
import { t as e } from "./SiteShell-DmKiH3jM.js";
|
|
2
2
|
export { e as SiteShell };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as e } from "./chrome-
|
|
1
|
+
import { n as e } from "./chrome-Co3f_Shw.js";
|
|
2
2
|
import { partnerView as t, useSiteConfig as n } from "@museumwnf/viewer-core";
|
|
3
3
|
import { FACET_CATEGORIES as r, FACET_LABEL_KEYS as i, PAGE_SIZE as a, useFacetLabels as o, useGalleryCollection as s, useGalleryData as c, useGalleryItemDetail as l, useGalleryPartner as u, useGalleryTimeline as d } from "@museumwnf/viewer-core/dxa";
|
|
4
4
|
//#region src/dxa/gallery/data.js
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as e } from "./chrome-
|
|
1
|
+
import { n as e } from "./chrome-Co3f_Shw.js";
|
|
2
2
|
import { partnerView as t, useSiteConfig as n } from "@museumwnf/viewer-core";
|
|
3
3
|
import { FACET_CATEGORIES as r, FACET_LABEL_KEYS as i, PAGE_SIZE as a, useExhibitionCollection as ee, useExhibitionData as o, useExhibitionItemDetail as s, useExhibitionPartner as c, useExhibitionThemes as l, useExhibitionTimeline as u, useFacetLabels as d } from "@museumwnf/viewer-core/dxa";
|
|
4
4
|
//#region src/dxa/exhibition/data.js
|