@museumwnf/viewer-layout 3.76.1 → 3.78.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 +5 -53
- package/dist/{LegacyItemSheet-B4Ob4upz.js → LegacyItemSheet-CNooycyz.js} +112 -97
- package/dist/{Theme-DvCv48p7.js → Theme-BCn6_VkI.js} +13 -13
- package/dist/data-D9H1tB75.js +98 -0
- package/dist/dxa.js +602 -596
- package/dist/{themeSpecs-CKgLOhlP.js → themeSpecs-BJ82RvA1.js} +1 -1
- package/dist/viewer-layout.css +1 -1
- package/package.json +2 -3
- package/src/dxa/relatedKind.js +11 -0
- package/src/dxa/testing.js +26 -13
- package/dist/data-BI5v-QYD.js +0 -81
- package/dist/publications.js +0 -1017
- package/dist/travels.js +0 -742
package/README.md
CHANGED
|
@@ -23,8 +23,6 @@ all the packages:
|
|
|
23
23
|
| `@museumwnf/viewer-layout/standalone` | standalone family layer | the chrome, home page, item sheet, text page and blocks of Discover Islamic Art, Discover Baroque Art and Sharing History | the entries above and `@museumwnf/viewer-core` |
|
|
24
24
|
| `@museumwnf/viewer-layout/minisite` | mini-site family layer | legacy's virtual exhibitions, one website each: the frame, the home page, the introduction, the exhibition pages, legacy's three windows, the caption rules, `minisiteRoutes` / `minisiteNavigation` / `minisiteSettings` | the entries above and `@museumwnf/viewer-core` |
|
|
25
25
|
| `@museumwnf/viewer-layout/minisite/testing` | mini-site family layer | the family's smoke test, `describeMinisiteSmoke` | the site's config, settings, texts and chrome, in the site's own Vitest |
|
|
26
|
-
| `@museumwnf/viewer-layout/publications` | site layer | the Publications site (legacy books.museumwnf.org): its frame, home page, category and results lists, a publication's page, `publicationsConfig` | the entries above and `@museumwnf/viewer-core` |
|
|
27
|
-
| `@museumwnf/viewer-layout/travels` | site layer | the Travels site (legacy travels.museumwnf.org's Exhibition Trails): its frame, the trails' lists, a trail's and an itinerary's pages, `travelsConfig` | the entries above and `@museumwnf/viewer-core` |
|
|
28
26
|
| `@museumwnf/viewer-layout/style.css` | — | one stylesheet for every entry, the family styles included | — |
|
|
29
27
|
| `@museumwnf/viewer-layout/tokens.reference.css` | — | every token the package reads, with its fallback | — |
|
|
30
28
|
|
|
@@ -975,57 +973,11 @@ export default {
|
|
|
975
973
|
|
|
976
974
|
## Publications and Travels sites
|
|
977
975
|
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
travels-data-package.md in inventory-app) and their viewer-i18n bundle
|
|
984
|
-
(`publications`, `travels`). A site's `dataset.config.js` is one call:
|
|
985
|
-
|
|
986
|
-
```js
|
|
987
|
-
import { publicationsConfig } from '@museumwnf/viewer-layout/publications'
|
|
988
|
-
const chrome = import.meta.glob('../theme/assets/**/*.{jpg,png,gif,svg}', { eager: true, query: '?url', import: 'default' })
|
|
989
|
-
export default publicationsConfig({
|
|
990
|
-
datasetPackage: '@museumwnf/publications-data',
|
|
991
|
-
origin: 'https://museumwithnofrontiers.github.io/publications',
|
|
992
|
-
siteName: 'MWNF Books',
|
|
993
|
-
chrome, // legacy/logo-blue.png, legacy/logo-white.png
|
|
994
|
-
})
|
|
995
|
-
```
|
|
996
|
-
|
|
997
|
-
```js
|
|
998
|
-
import { travelsConfig } from '@museumwnf/viewer-layout/travels'
|
|
999
|
-
export default travelsConfig({
|
|
1000
|
-
datasetPackage: '@museumwnf/travels-data',
|
|
1001
|
-
origin: 'https://museumwithnofrontiers.github.io/travels',
|
|
1002
|
-
})
|
|
1003
|
-
```
|
|
1004
|
-
|
|
1005
|
-
| Site | Route | Legacy page | Reads |
|
|
1006
|
-
| --- | --- | --- | --- |
|
|
1007
|
-
| Publications | `/` | HomePage.vue: a band per category | `publications.json`, `editions.json`, `countries`, `languages` |
|
|
1008
|
-
| Publications | `/category/:category?page=` | CategoryPage.vue (`/category/<name>/<page>`), legacy's names (`travel-books`, …) | the same |
|
|
1009
|
-
| Publications | `/results?title=&author=&isbn=&language=&country=&subject=&type=&publisher=` | ResultsPage.vue | the same, `tags.json` (subjects) |
|
|
1010
|
-
| Publications | `/publication/:id/:language?` | BookPage.vue (`/book/<id>/<language>`) | a publication, its editions' covers and `/doc` PDFs, `translations/publications.<lang>.json` |
|
|
1011
|
-
| Travels | `/` | travel_et_home.php | `collections.json` (trails), `items.json` (their projects), `countries` |
|
|
1012
|
-
| Travels | `/trails?country=` / `?project=` | travel_et_trail.php (`cid` / `tid`) | trails, locations, the trail's `publications` |
|
|
1013
|
-
| Travels | `/trail/:id?tab=desc\|its\|cur` | travel_et_trailDetail.php (`fl`) | a trail's texts and `extra` (subtitle, region, curators, photographers), its itineraries and locations |
|
|
1014
|
-
| Travels | `/itinerary/:id?tab=des\|vl` | travel_et_itenary.php (`fl`) | an itinerary's texts, its locations' and monuments' pictures |
|
|
1015
|
-
|
|
1016
|
-
The Publications site offers English, as legacy did; a publication's page
|
|
1017
|
-
reads its labels in the version's language (`tIn`), English where legacy had
|
|
1018
|
-
none. The Travels site offers the languages of its trails' texts, labels and
|
|
1019
|
-
texts alike, as legacy's trail pages were drawn in the trail's language. A
|
|
1020
|
-
trail's book links to its page on the Publications site in the page's
|
|
1021
|
-
language (`<url>/<lang>`, legacy's `/book/<id>/<lang>`).
|
|
1022
|
-
|
|
1023
|
-
What legacy drew from data the packages do not carry is not drawn: the books'
|
|
1024
|
-
stock line ("AVAILABLE"), the "NEW" list (a site may give a `match` for it in
|
|
1025
|
-
`publications.categories`), the shop links (D-P8), the publisher popup; the
|
|
1026
|
-
Travels pages' tours, "Related Tours" and the itineraries' "AVAILABLE SOON"
|
|
1027
|
-
tabs (the tours are out, inventory-app#2515), and the trail's "Starting
|
|
1028
|
-
point", which legacy had commented out.
|
|
976
|
+
The Publications site (legacy books.museumwnf.org) and the Travels site (the
|
|
977
|
+
Exhibition Trails of legacy travels.museumwnf.org) keep their pages in their
|
|
978
|
+
own repositories, on Explore's model: each is a single product, so its code
|
|
979
|
+
lives with it (museumwithnofrontiers/publications, museumwithnofrontiers/travels).
|
|
980
|
+
This package's `./publications` and `./travels` entries were removed in 3.77.0.
|
|
1029
981
|
## Theming
|
|
1030
982
|
|
|
1031
983
|
Every color, font, spacing, radius comes from a `--mwnf-*` CSS custom property with a neutral fallback. Full list: [`tokens.reference.css`](src/tokens.reference.css) (also exported as `@museumwnf/viewer-layout/tokens.reference.css`) — copy it into your website as `theme/tokens.css` and set values.
|
|
@@ -3,8 +3,8 @@ import { c as o, d as s, r as c } from "./PartnerMap-DdyMLtgH.js";
|
|
|
3
3
|
import { n as l } from "./TimelineEventList-CIkKxyQu.js";
|
|
4
4
|
import { t as u } from "./RecordView-CBC7tBCX.js";
|
|
5
5
|
import { t as d } from "./chrome-Bv_mLlHM.js";
|
|
6
|
-
import { Fragment as f, computed as p, createBlock as m, createCommentVNode as h, createElementBlock as g, createElementVNode as _, createSlots as v, createTextVNode as y, createVNode as b, guardReactiveProps as x, normalizeClass as S, normalizeProps as C, normalizeStyle as
|
|
7
|
-
import { NotFoundView as
|
|
6
|
+
import { Fragment as f, computed as p, createBlock as m, createCommentVNode as h, createElementBlock as g, createElementVNode as _, createSlots as v, createTextVNode as y, createVNode as b, guardReactiveProps as x, normalizeClass as S, normalizeProps as C, normalizeStyle as w, openBlock as T, renderList as E, renderSlot as D, toDisplayString as O, unref as k, useSlots as A, withCtx as j } from "vue";
|
|
7
|
+
import { NotFoundView as ee, byId as te, loadEntities as ne, mdInline as M, mdStrip as re, mwnfLinks as N, partnerView as ie, renderInline as P, siblingSiteUrl as F, sourceUrl as I, useCatalogue as L, useDataPackage as R, useI18n as z, useProjects as B, useSiteConfig as V } from "@museumwnf/viewer-core";
|
|
8
8
|
import { RouterLink as H, useRoute as U } from "vue-router";
|
|
9
9
|
// src/dxa/RelatedObjects.vue
|
|
10
10
|
var W = {
|
|
@@ -33,7 +33,7 @@ var W = {
|
|
|
33
33
|
}
|
|
34
34
|
},
|
|
35
35
|
setup(e) {
|
|
36
|
-
return (t, n) => e.tiles.length ? (
|
|
36
|
+
return (t, n) => e.tiles.length ? (T(), g("div", W, [e.heading ? (T(), g("p", G, O(e.heading), 1)) : h("", !0), _("ul", ae, [(T(!0), g(f, null, E(e.tiles, (e) => (T(), g("li", {
|
|
37
37
|
key: e.id,
|
|
38
38
|
class: "mwnf-related-objects__tile"
|
|
39
39
|
}, [b(s, {
|
|
@@ -42,12 +42,12 @@ var W = {
|
|
|
42
42
|
external: !!e.href,
|
|
43
43
|
class: "mwnf-related-objects__link"
|
|
44
44
|
}, {
|
|
45
|
-
default:
|
|
45
|
+
default: j(() => [e.image ? (T(), g("img", {
|
|
46
46
|
key: 0,
|
|
47
47
|
src: e.image,
|
|
48
48
|
alt: "",
|
|
49
49
|
loading: "lazy"
|
|
50
|
-
}, null, 8, oe)) : (
|
|
50
|
+
}, null, 8, oe)) : (T(), g("span", K)), _("span", {
|
|
51
51
|
class: "mwnf-related-objects__name-sr",
|
|
52
52
|
innerHTML: e.name
|
|
53
53
|
}, null, 8, q)]),
|
|
@@ -56,7 +56,7 @@ var W = {
|
|
|
56
56
|
"to",
|
|
57
57
|
"href",
|
|
58
58
|
"external"
|
|
59
|
-
]), _("div", se, [_("div", null, [_("span", { innerHTML: e.name }, null, 8, ce), e.country ? (
|
|
59
|
+
]), _("div", se, [_("div", null, [_("span", { innerHTML: e.name }, null, 8, ce), e.country ? (T(), g(f, { key: 0 }, [y(", " + O(e.country), 1)], 64)) : h("", !0)]), e.justification ? (T(), g("div", le, O(e.justification), 1)) : h("", !0)])]))), 128))])])) : h("", !0);
|
|
60
60
|
}
|
|
61
61
|
}, de = {
|
|
62
62
|
key: 0,
|
|
@@ -89,9 +89,9 @@ var W = {
|
|
|
89
89
|
key: 2,
|
|
90
90
|
class: "mwnf-sheet-related__unresolved"
|
|
91
91
|
}, Ce = {
|
|
92
|
-
key:
|
|
92
|
+
key: 5,
|
|
93
93
|
class: "mwnf-sheet-related__line"
|
|
94
|
-
}, we = ["href"], Te = { class: "mwnf-sheet-related__heading" }, Ee = ["href"], De = { key:
|
|
94
|
+
}, we = ["href"], Te = { class: "mwnf-sheet-related__heading" }, Ee = ["href"], De = { key: 11 }, Oe = { class: "mwnf-sheet-related__heading" }, ke = { key: 12 }, Ae = { class: "mwnf-sheet-related__heading" }, je = { class: "mwnf-sheet-related__line" }, Me = ["href"], Ne = { key: 13 }, Pe = { class: "mwnf-sheet-related__heading" }, Fe = { class: "mwnf-sheet-related__line" }, Ie = ["href"], Le = { key: 14 }, Re = { class: "mwnf-sheet-related__heading" }, ze = "sheet.field.", J = {
|
|
95
95
|
__name: "ItemDetailView",
|
|
96
96
|
props: {
|
|
97
97
|
spec: {
|
|
@@ -112,7 +112,7 @@ var W = {
|
|
|
112
112
|
}
|
|
113
113
|
},
|
|
114
114
|
setup(i) {
|
|
115
|
-
let o = i, s =
|
|
115
|
+
let o = i, s = A(), P = /* @__PURE__ */ new Set([
|
|
116
116
|
"before-sheet",
|
|
117
117
|
"museum",
|
|
118
118
|
"related",
|
|
@@ -168,14 +168,14 @@ var W = {
|
|
|
168
168
|
notice: o
|
|
169
169
|
};
|
|
170
170
|
}
|
|
171
|
-
let J = R(), Be =
|
|
172
|
-
|
|
171
|
+
let J = R(), Be = te("partners"), Y = te("countries");
|
|
172
|
+
ne(["partners", "countries"]), J.loadTranslations("countries", "en");
|
|
173
173
|
function X(e, t) {
|
|
174
174
|
let n = J.tr("countries", e, t, "en");
|
|
175
|
-
return
|
|
175
|
+
return re(n.name ?? Y.value?.get(e)?.internal_name ?? "");
|
|
176
176
|
}
|
|
177
177
|
function Z(e) {
|
|
178
|
-
let t = e.text?.holder ?
|
|
178
|
+
let t = e.text?.holder ? M(String(e.text.holder)) : "", n = U.value.museum === !1 ? null : U.value.museum ?? null, r = n ? Be.value?.get(e.record?.partner_id) : null;
|
|
179
179
|
return {
|
|
180
180
|
holder: t,
|
|
181
181
|
view: r ? ie(r, J.tr("partners", r.id, e.language, "en"), {
|
|
@@ -192,7 +192,7 @@ var W = {
|
|
|
192
192
|
chipClass: n.outsideChip ? n.outsideChip(e, t) : null
|
|
193
193
|
})), l = (t) => (n.onDisplayIn?.href ? n.onDisplayIn.href(t, e) : t.legacy_host) || "", u = (e) => ({
|
|
194
194
|
id: e.id,
|
|
195
|
-
label:
|
|
195
|
+
label: M(e.name ?? ""),
|
|
196
196
|
href: l(e),
|
|
197
197
|
external: !!l(e)
|
|
198
198
|
}), d = n.onDisplayIn && n.onDisplayIn !== !1 ? {
|
|
@@ -214,17 +214,19 @@ var W = {
|
|
|
214
214
|
} : null, p = n.overallDatabase && n.overallDatabase !== !1 ? {
|
|
215
215
|
label: L(n.overallDatabase.label),
|
|
216
216
|
linkLabel: L(n.overallDatabase.linkLabel)
|
|
217
|
-
} : null
|
|
217
|
+
} : null, m = n.objectTiles ? n.objectTiles({
|
|
218
|
+
record: e,
|
|
219
|
+
inPackage: a,
|
|
220
|
+
references: c,
|
|
221
|
+
ctx: t
|
|
222
|
+
}) : null, h = !!(m && n.monumentsHeading);
|
|
218
223
|
return {
|
|
219
224
|
title: n.title ? L(n.title) : "",
|
|
220
225
|
description: n.description ? L(n.description) : "",
|
|
221
226
|
heading: L(n.heading ?? "record.related.items"),
|
|
222
|
-
tiles:
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
references: c,
|
|
226
|
-
ctx: t
|
|
227
|
-
}) : null,
|
|
227
|
+
tiles: h ? m.filter((e) => e.kind !== "monument") : m,
|
|
228
|
+
monumentsHeading: h ? L(n.monumentsHeading) : "",
|
|
229
|
+
monumentTiles: h ? m.filter((e) => e.kind === "monument") : [],
|
|
228
230
|
variant: n.variant ?? "grid",
|
|
229
231
|
actionLabel: n.actionLabel ? L(n.actionLabel) : "",
|
|
230
232
|
inPackage: a,
|
|
@@ -261,55 +263,55 @@ var W = {
|
|
|
261
263
|
function He() {
|
|
262
264
|
window.print();
|
|
263
265
|
}
|
|
264
|
-
return (o, s) => I.value ? (
|
|
266
|
+
return (o, s) => I.value ? (T(), m(u, {
|
|
265
267
|
key: 0,
|
|
266
268
|
spec: U.value,
|
|
267
269
|
id: i.id,
|
|
268
270
|
entity: i.entity,
|
|
269
|
-
style:
|
|
271
|
+
style: w(Ve.value)
|
|
270
272
|
}, v({
|
|
271
|
-
"before-sheet":
|
|
273
|
+
"before-sheet": j((e) => [D(o.$slots, "before-sheet", C(x(e)), () => [(T(!0), g(f, null, E([le(e.record, e)], (t) => (T(), g(f, { key: "before-sheet" }, [t?.source || t?.addToCollectionLabel ? (T(), g("div", de, [t.source ? (T(), g("p", fe, [t.source.chipClass ? (T(), g("span", {
|
|
272
274
|
key: 0,
|
|
273
275
|
class: S(["mwnf-chip", t.source.chipClass]),
|
|
274
276
|
"aria-hidden": "true"
|
|
275
|
-
}, null, 2)) : h("", !0), t.source.name ? (
|
|
276
|
-
href:
|
|
277
|
+
}, null, 2)) : h("", !0), t.source.name ? (T(), g(f, { key: 1 }, [y(O(t.source.label) + ": " + O(t.source.name), 1)], 64)) : h("", !0)])) : h("", !0), t.addToCollectionLabel ? (T(), g("p", pe, [_("a", {
|
|
278
|
+
href: k(N).myCollection,
|
|
277
279
|
target: "_blank",
|
|
278
280
|
rel: "noopener"
|
|
279
|
-
}, "↗ " +
|
|
280
|
-
museum:
|
|
281
|
+
}, "↗ " + O(t.addToCollectionLabel), 9, me)])) : h("", !0)])) : h("", !0), t?.notice ? (T(), g("div", he, [y(O(t.notice) + " ", 1), _("strong", null, [_("em", null, O(e.languages.map((e) => e.label).join(", ")), 1)])])) : h("", !0)], 64))), 128))])]),
|
|
282
|
+
museum: j((e) => [D(o.$slots, "museum", C(x(e)), () => [(T(!0), g(f, null, E([Z(e)], (t) => (T(), g("div", ge, [t.holder ? (T(), g("p", {
|
|
281
283
|
key: 0,
|
|
282
284
|
class: "mwnf-sheet-museum__holder",
|
|
283
285
|
innerHTML: t.holder
|
|
284
|
-
}, null, 8, _e)) : h("", !0), t.view ? (
|
|
286
|
+
}, null, 8, _e)) : h("", !0), t.view ? (T(), m(l, {
|
|
285
287
|
key: 1,
|
|
286
288
|
variant: "summary",
|
|
287
289
|
partner: t.view,
|
|
288
290
|
label: "partner.info.about",
|
|
289
291
|
dir: e.dir
|
|
290
292
|
}, null, 8, ["partner", "dir"])) : h("", !0)]))), 128))])]),
|
|
291
|
-
aside:
|
|
292
|
-
o.title ? (
|
|
293
|
-
o.description ? (
|
|
294
|
-
o.tiles ? (
|
|
293
|
+
aside: j((i) => [D(o.$slots, "related", C(x(i)), () => [(T(!0), g(f, null, E([Q(i.record, i)], (o) => (T(), g(f, { key: i.record?.id ?? "related" }, [o ? (T(), g("div", ve, [
|
|
294
|
+
o.title ? (T(), g("p", ye, O(o.title), 1)) : h("", !0),
|
|
295
|
+
o.description ? (T(), g("p", be, O(o.description), 1)) : h("", !0),
|
|
296
|
+
o.tiles ? (T(), m(ue, {
|
|
295
297
|
key: 2,
|
|
296
298
|
heading: o.heading,
|
|
297
299
|
tiles: o.tiles
|
|
298
|
-
}, null, 8, ["heading", "tiles"])) : o.inPackage.length || o.references.length ? (
|
|
300
|
+
}, null, 8, ["heading", "tiles"])) : o.inPackage.length || o.references.length ? (T(), m(c, {
|
|
299
301
|
key: 3,
|
|
300
302
|
heading: o.heading,
|
|
301
303
|
records: o.inPackage,
|
|
302
304
|
variant: o.variant,
|
|
303
305
|
"action-label": o.actionLabel
|
|
304
306
|
}, {
|
|
305
|
-
default:
|
|
306
|
-
e.chipClass ? (
|
|
307
|
+
default: j(() => [o.references.length ? (T(), g("ul", xe, [(T(!0), g(f, null, E(o.references, (e) => (T(), g("li", { key: e.id }, [
|
|
308
|
+
e.chipClass ? (T(), g("span", {
|
|
307
309
|
key: 0,
|
|
308
310
|
class: S(["mwnf-chip", e.chipClass]),
|
|
309
311
|
"aria-hidden": "true"
|
|
310
312
|
}, null, 2)) : h("", !0),
|
|
311
|
-
e.name ? (
|
|
312
|
-
o.notInPackageLabel ? (
|
|
313
|
+
e.name ? (T(), g(f, { key: 1 }, [y(O(e.name), 1)], 64)) : h("", !0),
|
|
314
|
+
o.notInPackageLabel ? (T(), g("span", Se, O(o.notInPackageLabel), 1)) : h("", !0)
|
|
313
315
|
]))), 128))])) : h("", !0)]),
|
|
314
316
|
_: 2
|
|
315
317
|
}, 1032, [
|
|
@@ -318,17 +320,23 @@ var W = {
|
|
|
318
320
|
"variant",
|
|
319
321
|
"action-label"
|
|
320
322
|
])) : h("", !0),
|
|
321
|
-
o.
|
|
323
|
+
o.monumentTiles.length ? (T(), m(ue, {
|
|
324
|
+
key: 4,
|
|
325
|
+
heading: o.monumentsHeading,
|
|
326
|
+
tiles: o.monumentTiles,
|
|
327
|
+
class: "mwnf-related-objects--monuments"
|
|
328
|
+
}, null, 8, ["heading", "tiles"])) : h("", !0),
|
|
329
|
+
o.artisticIntroduction ? (T(), g("p", Ce, [_("a", {
|
|
322
330
|
href: o.artisticIntroduction.url,
|
|
323
331
|
target: "_blank",
|
|
324
332
|
rel: "noopener"
|
|
325
|
-
}, "↗ " +
|
|
326
|
-
o.timeline ? (
|
|
333
|
+
}, "↗ " + O(o.artisticIntroduction.label), 9, we)])) : h("", !0),
|
|
334
|
+
o.timeline ? (T(), m(r, {
|
|
327
335
|
key: i.record.id,
|
|
328
336
|
info: o.timeline
|
|
329
337
|
}, null, 8, ["info"])) : h("", !0),
|
|
330
|
-
o.glossary ? (
|
|
331
|
-
key:
|
|
338
|
+
o.glossary ? (T(), m(n, {
|
|
339
|
+
key: 7,
|
|
332
340
|
language: i.language,
|
|
333
341
|
labels: o.glossaryLabels,
|
|
334
342
|
dir: i.dir
|
|
@@ -337,8 +345,8 @@ var W = {
|
|
|
337
345
|
"labels",
|
|
338
346
|
"dir"
|
|
339
347
|
])) : h("", !0),
|
|
340
|
-
o.dynasties?.records?.length ? (
|
|
341
|
-
key:
|
|
348
|
+
o.dynasties?.records?.length ? (T(), m(e, {
|
|
349
|
+
key: 8,
|
|
342
350
|
heading: o.dynastiesHeading,
|
|
343
351
|
dynasties: o.dynasties.records,
|
|
344
352
|
tr: o.dynasties.tr,
|
|
@@ -349,18 +357,18 @@ var W = {
|
|
|
349
357
|
"tr",
|
|
350
358
|
"dir"
|
|
351
359
|
])) : h("", !0),
|
|
352
|
-
o.mediaGroups ? (
|
|
360
|
+
o.mediaGroups ? (T(!0), g(f, { key: 9 }, E(o.mediaGroups, (e) => (T(), g("div", {
|
|
353
361
|
key: e.type,
|
|
354
362
|
class: S(["mwnf-sheet-related__media", `mwnf-sheet-related__media--${e.type}`])
|
|
355
|
-
}, [_("p", Te,
|
|
363
|
+
}, [_("p", Te, O(e.heading), 1), (T(!0), g(f, null, E(e.entries, (e) => (T(), g("p", {
|
|
356
364
|
key: e.url,
|
|
357
365
|
class: "mwnf-sheet-related__line"
|
|
358
366
|
}, [_("a", {
|
|
359
367
|
href: e.url,
|
|
360
368
|
target: "_blank",
|
|
361
369
|
rel: "noopener"
|
|
362
|
-
}, "↗ " +
|
|
363
|
-
key:
|
|
370
|
+
}, "↗ " + O(e.title || e.url), 9, Ee)]))), 128))], 2))), 128)) : (T(), m(t, {
|
|
371
|
+
key: 10,
|
|
364
372
|
media: o.media,
|
|
365
373
|
language: i.language,
|
|
366
374
|
descriptions: !1,
|
|
@@ -370,7 +378,7 @@ var W = {
|
|
|
370
378
|
"language",
|
|
371
379
|
"dir"
|
|
372
380
|
])),
|
|
373
|
-
o.onDisplayIn?.groups.length ? (
|
|
381
|
+
o.onDisplayIn?.groups.length ? (T(), g("div", De, [_("p", Oe, O(k(L)("record.related.onDisplayIn")), 1), b(a, {
|
|
374
382
|
heading: "",
|
|
375
383
|
groups: o.onDisplayIn.groups,
|
|
376
384
|
"pending-label": o.onDisplayIn.pendingLabel,
|
|
@@ -380,31 +388,31 @@ var W = {
|
|
|
380
388
|
"pending-label",
|
|
381
389
|
"dir"
|
|
382
390
|
])])) : h("", !0),
|
|
383
|
-
o.database ? (
|
|
391
|
+
o.database ? (T(), g("div", ke, [_("p", Ae, O(o.database.label), 1), _("p", je, [_("a", {
|
|
384
392
|
href: o.database.url,
|
|
385
393
|
target: "_blank",
|
|
386
394
|
rel: "noopener"
|
|
387
|
-
}, "↗ " +
|
|
388
|
-
o.overallDatabase ? (
|
|
389
|
-
href:
|
|
395
|
+
}, "↗ " + O(o.database.name), 9, Me)])])) : h("", !0),
|
|
396
|
+
o.overallDatabase ? (T(), g("div", Ne, [_("p", Pe, O(o.overallDatabase.label), 1), _("p", Fe, [_("a", {
|
|
397
|
+
href: k(N).overallDatabase,
|
|
390
398
|
target: "_blank",
|
|
391
399
|
rel: "noopener"
|
|
392
|
-
}, "↗ " +
|
|
393
|
-
o.download ? (
|
|
400
|
+
}, "↗ " + O(o.overallDatabase.linkLabel), 9, Ie)])])) : h("", !0),
|
|
401
|
+
o.download ? (T(), g("div", Le, [_("p", Re, O(o.download.label), 1), _("p", {
|
|
394
402
|
class: "mwnf-sheet-related__line mwnf-sheet-related__line--action",
|
|
395
403
|
onClick: He
|
|
396
|
-
}, "➤ " +
|
|
404
|
+
}, "➤ " + O(o.download.pdfLabel), 1)])) : h("", !0)
|
|
397
405
|
])) : h("", !0)], 64))), 128))])]),
|
|
398
406
|
_: 2
|
|
399
|
-
}, [
|
|
407
|
+
}, [E(F.value, (e) => ({
|
|
400
408
|
name: e,
|
|
401
|
-
fn:
|
|
409
|
+
fn: j((t) => [D(o.$slots, e, C(x(t)))])
|
|
402
410
|
}))]), 1032, [
|
|
403
411
|
"spec",
|
|
404
412
|
"id",
|
|
405
413
|
"entity",
|
|
406
414
|
"style"
|
|
407
|
-
])) : (
|
|
415
|
+
])) : (T(), m(k(ee), { key: 1 }));
|
|
408
416
|
}
|
|
409
417
|
}, Be = "mwnf-on-display__theme", Y = (e) => P(e ?? ""), X = (e) => e?.titles?.en ?? Object.values(e?.titles ?? {})[0] ?? "", Z = (e) => `<span class="${Be}">${e}</span>`;
|
|
410
418
|
function Q(e, t, n) {
|
|
@@ -453,14 +461,18 @@ function Ve(e, t, n = null) {
|
|
|
453
461
|
}
|
|
454
462
|
return i;
|
|
455
463
|
}
|
|
464
|
+
// src/dxa/relatedKind.js
|
|
465
|
+
function He(e, t) {
|
|
466
|
+
return (e?.type ?? t?.get(e?.id)?.type) === "monument" ? "monument" : "object";
|
|
467
|
+
}
|
|
456
468
|
// src/dxa/LegacyItemSheet.vue
|
|
457
|
-
var
|
|
469
|
+
var Ue = { class: "mwnf-dxa-item__languages" }, We = ["dir"], Ge = ["href"], Ke = ["href"], qe = ["innerHTML"], Je = ["innerHTML"], Ye = ["dir"], Xe = { class: "mwnf-dxa-gallery-item__label" }, Ze = {
|
|
458
470
|
key: "citation",
|
|
459
471
|
class: "mwnf-dxa-gallery-item__citation"
|
|
460
|
-
},
|
|
472
|
+
}, Qe = { class: "mwnf-dxa-gallery-item__project" }, $e = { class: "mwnf-dxa-gallery-item__address" }, et = { class: "mwnf-dxa-gallery-item__credit-label" }, tt = {
|
|
461
473
|
key: 1,
|
|
462
474
|
class: "mwnf-dxa-gallery-item__number"
|
|
463
|
-
},
|
|
475
|
+
}, nt = { class: "mwnf-dxa-gallery-item__number-label" }, rt = ["href"], it = {
|
|
464
476
|
__name: "LegacyItemSheet",
|
|
465
477
|
props: {
|
|
466
478
|
id: {
|
|
@@ -483,25 +495,27 @@ var He = { class: "mwnf-dxa-item__languages" }, Ue = ["dir"], We = ["href"], Ge
|
|
|
483
495
|
setup(e) {
|
|
484
496
|
let t = e, { t: n } = z(), r = U(), a = B(), s = R(), c = V(), l = L(), u = (e, t) => e?.[t] ?? e?.en ?? Object.values(e ?? {})[0] ?? "";
|
|
485
497
|
function d({ record: e, inPackage: t, references: n, ctx: r }) {
|
|
486
|
-
let i = r.language, o = new Map((e.related_items ?? []).map((e) => [e.id, e])), s = (e) =>
|
|
498
|
+
let i = r.language, o = new Map((e.related_items ?? []).map((e) => [e.id, e])), s = (e) => re(u(o.get(e)?.justifications, i)), c = (e) => He(o.get(e) ?? { id: e }, l.itemById.value), d = (e) => (e ?? "").replace(/\.$/, ""), f = t.map((e) => ({
|
|
487
499
|
id: e.id,
|
|
500
|
+
kind: c(e.id),
|
|
488
501
|
image: e.image,
|
|
489
|
-
name: e.name,
|
|
502
|
+
name: d(e.name),
|
|
490
503
|
country: l.countryLabel(l.itemById.value.get(e.id)?.country_id),
|
|
491
504
|
justification: s(e.id),
|
|
492
505
|
to: e.to
|
|
493
|
-
})),
|
|
506
|
+
})), p = n.map((e) => {
|
|
494
507
|
let t = a.links(e.project_id)?.homeSite;
|
|
495
508
|
return {
|
|
496
509
|
id: e.id,
|
|
510
|
+
kind: c(e.id),
|
|
497
511
|
image: e.image ?? "",
|
|
498
|
-
name:
|
|
512
|
+
name: d(M(u(e.names, i))),
|
|
499
513
|
country: l.countryLabel(e.country_id),
|
|
500
514
|
justification: s(e.id),
|
|
501
515
|
href: t ? F(t, `/item/${e.id}`) : ""
|
|
502
516
|
};
|
|
503
|
-
}),
|
|
504
|
-
return [...
|
|
517
|
+
}), m = (e.related_items ?? []).map((e) => e.id);
|
|
518
|
+
return [...f, ...p].sort((e, t) => m.indexOf(e.id) - m.indexOf(t.id));
|
|
505
519
|
}
|
|
506
520
|
let v = p(() => ({
|
|
507
521
|
...t.itemDetail,
|
|
@@ -525,6 +539,7 @@ var He = { class: "mwnf-dxa-item__languages" }, Ue = ["dir"], We = ["href"], Ge
|
|
|
525
539
|
heading: t.words.relatedObjects,
|
|
526
540
|
objectTiles: d
|
|
527
541
|
} : {},
|
|
542
|
+
...t.words.relatedMonuments ? { monumentsHeading: t.words.relatedMonuments } : {},
|
|
528
543
|
onDisplayIn: {
|
|
529
544
|
...t.itemDetail.related?.onDisplayIn,
|
|
530
545
|
exhibitionsHeading: t.words.exhibitions,
|
|
@@ -546,8 +561,8 @@ var He = { class: "mwnf-dxa-item__languages" }, Ue = ["dir"], We = ["href"], Ge
|
|
|
546
561
|
return e;
|
|
547
562
|
}
|
|
548
563
|
}
|
|
549
|
-
let
|
|
550
|
-
function
|
|
564
|
+
let w = (e) => c.projectColors?.[e?.project_id] ?? "";
|
|
565
|
+
function D(e, t) {
|
|
551
566
|
let n = a.label(t?.project_id) ?? "", r = n ? e.indexOf(` ${n},`) : -1;
|
|
552
567
|
return r < 0 ? {
|
|
553
568
|
before: e,
|
|
@@ -559,19 +574,19 @@ var He = { class: "mwnf-dxa-item__languages" }, Ue = ["dir"], We = ["href"], Ge
|
|
|
559
574
|
after: e.slice(r + 1 + n.length)
|
|
560
575
|
};
|
|
561
576
|
}
|
|
562
|
-
function
|
|
577
|
+
function A(e) {
|
|
563
578
|
return {
|
|
564
579
|
to: t.itemDetail.museum?.route?.(e.record?.partner_id) ?? null,
|
|
565
|
-
holder: e.text?.holder ?
|
|
580
|
+
holder: e.text?.holder ? M(String(e.text.holder)) : ""
|
|
566
581
|
};
|
|
567
582
|
}
|
|
568
|
-
return (t, r) => (
|
|
583
|
+
return (t, r) => (T(), m(J, {
|
|
569
584
|
spec: v.value,
|
|
570
585
|
id: e.id,
|
|
571
586
|
"data-getter": e.dataGetter,
|
|
572
587
|
class: "mwnf-dxa-item mwnf-dxa-gallery-item"
|
|
573
588
|
}, {
|
|
574
|
-
header:
|
|
589
|
+
header: j(({ languages: e, language: t, select: n }) => [_("div", Ue, [b(o, {
|
|
575
590
|
languages: e,
|
|
576
591
|
language: t,
|
|
577
592
|
from: 1,
|
|
@@ -581,7 +596,7 @@ var He = { class: "mwnf-dxa-item__languages" }, Ue = ["dir"], We = ["href"], Ge
|
|
|
581
596
|
"language",
|
|
582
597
|
"onSelect"
|
|
583
598
|
])]), b(i)]),
|
|
584
|
-
"after-media":
|
|
599
|
+
"after-media": j(({ record: e, dir: t }) => [e ? (T(), g("div", {
|
|
585
600
|
key: 0,
|
|
586
601
|
class: "mwnf-dxa-gallery-item__links",
|
|
587
602
|
dir: t || void 0
|
|
@@ -592,50 +607,50 @@ var He = { class: "mwnf-dxa-item__languages" }, Ue = ["dir"], We = ["href"], Ge
|
|
|
592
607
|
}, [r[0] ||= _("span", {
|
|
593
608
|
class: "mwnf-dxa-gallery-item__icon",
|
|
594
609
|
"aria-hidden": "true"
|
|
595
|
-
}, "↗", -1), _("bdi", null, [y(
|
|
596
|
-
href:
|
|
610
|
+
}, "↗", -1), _("bdi", null, [y(O(k(n)("record.source.label")) + " ", 1), _("span", null, "(" + O(C(x(e))) + ")", 1)])], 8, Ge)]), _("p", null, [_("a", {
|
|
611
|
+
href: k(N).myCollection,
|
|
597
612
|
target: "_blank",
|
|
598
613
|
rel: "noopener"
|
|
599
614
|
}, [r[1] ||= _("span", {
|
|
600
615
|
class: "mwnf-dxa-gallery-item__icon",
|
|
601
616
|
"aria-hidden": "true"
|
|
602
|
-
}, "↗", -1), y(
|
|
603
|
-
museum:
|
|
617
|
+
}, "↗", -1), y(O(k(n)("record.action.addToCollection")), 1)], 8, Ke)])], 8, We)) : h("", !0)]),
|
|
618
|
+
museum: j((e) => [(T(!0), g(f, null, E([A(e)], (e) => (T(), g(f, { key: "museum" }, [e.to && e.holder ? (T(), m(k(H), {
|
|
604
619
|
key: 0,
|
|
605
620
|
to: e.to,
|
|
606
621
|
class: "mwnf-dxa-gallery-item__museum"
|
|
607
622
|
}, {
|
|
608
|
-
default:
|
|
623
|
+
default: j(() => [r[2] ||= _("span", {
|
|
609
624
|
class: "mwnf-dxa-gallery-item__icon",
|
|
610
625
|
"aria-hidden": "true"
|
|
611
|
-
}, "↗", -1), _("span", { innerHTML: e.holder }, null, 8,
|
|
626
|
+
}, "↗", -1), _("span", { innerHTML: e.holder }, null, 8, qe)]),
|
|
612
627
|
_: 2
|
|
613
|
-
}, 1032, ["to"])) : e.holder ? (
|
|
628
|
+
}, 1032, ["to"])) : e.holder ? (T(), g("span", {
|
|
614
629
|
key: 1,
|
|
615
630
|
innerHTML: e.holder
|
|
616
|
-
}, null, 8,
|
|
617
|
-
credits:
|
|
631
|
+
}, null, 8, Je)) : h("", !0)], 64))), 128))]),
|
|
632
|
+
credits: j(({ record: t, credits: r, workingNumber: i, citation: a, dir: o }) => [t ? (T(), g("div", {
|
|
618
633
|
key: 0,
|
|
619
634
|
class: "mwnf-dxa-gallery-item__credits",
|
|
620
635
|
dir: o || void 0
|
|
621
636
|
}, [
|
|
622
|
-
a ? (
|
|
623
|
-
y(
|
|
624
|
-
_("span",
|
|
625
|
-
y(
|
|
626
|
-
_("span",
|
|
637
|
+
a ? (T(), g(f, { key: 0 }, [_("p", Xe, O(k(n)("record.citation.ofThisPage")), 1), (T(!0), g(f, null, E([D(a, t)], (e) => (T(), g("p", Ze, [
|
|
638
|
+
y(O(e.before), 1),
|
|
639
|
+
_("span", Qe, O(e.project), 1),
|
|
640
|
+
y(O(e.after) + " ", 1),
|
|
641
|
+
_("span", $e, O(x(t)), 1)
|
|
627
642
|
]))), 128))], 64)) : h("", !0),
|
|
628
|
-
(
|
|
643
|
+
(T(!0), g(f, null, E(r, (e) => (T(), g("p", {
|
|
629
644
|
key: e.label,
|
|
630
645
|
class: "mwnf-dxa-gallery-item__credit"
|
|
631
|
-
}, [_("span",
|
|
632
|
-
i ? (
|
|
633
|
-
_("div", { class: S(["mwnf-dxa-gallery-item__source",
|
|
646
|
+
}, [_("span", et, O(e.label), 1), _("span", null, O(e.value), 1)]))), 128)),
|
|
647
|
+
i ? (T(), g("p", tt, [_("span", nt, O(k(n)(e.words.workingNumber)), 1), y(O(" ") + O(i), 1)])) : h("", !0),
|
|
648
|
+
_("div", { class: S(["mwnf-dxa-gallery-item__source", w(t)]) }, [_("p", null, O(k(n)("record.source.label")), 1), _("p", null, [_("a", {
|
|
634
649
|
href: x(t),
|
|
635
650
|
target: "_blank",
|
|
636
651
|
rel: "noopener"
|
|
637
|
-
},
|
|
638
|
-
], 8,
|
|
652
|
+
}, O(x(t)), 9, rt)])], 2)
|
|
653
|
+
], 8, Ye)) : h("", !0)]),
|
|
639
654
|
_: 1
|
|
640
655
|
}, 8, [
|
|
641
656
|
"spec",
|
|
@@ -644,4 +659,4 @@ var He = { class: "mwnf-dxa-item__languages" }, Ue = ["dir"], We = ["href"], Ge
|
|
|
644
659
|
]));
|
|
645
660
|
}
|
|
646
661
|
};
|
|
647
|
-
export { J as n,
|
|
662
|
+
export { J as n, it as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as e } from "./GlossaryPopover-DbQKXhx9.js";
|
|
2
|
-
import {
|
|
3
|
-
import { n as s } from "./themeSpecs-
|
|
2
|
+
import { M as t, c as n, d as r, k as i, u as a, v as o } from "./data-D9H1tB75.js";
|
|
3
|
+
import { n as s } from "./themeSpecs-BJ82RvA1.js";
|
|
4
4
|
import { Fragment as c, computed as l, createBlock as u, createCommentVNode as d, createElementBlock as f, createElementVNode as p, createTextVNode as m, createVNode as h, nextTick as ee, normalizeClass as g, normalizeStyle as _, onBeforeUnmount as te, onMounted as ne, openBlock as v, ref as y, renderList as b, toDisplayString as x, unref as S, vModelCheckbox as re, watch as ie, withCtx as C, withDirectives as ae } from "vue";
|
|
5
5
|
import { glossaryEntries as oe, glossaryTermsForText as se, renderBlock as w, renderInline as T, useGlossaryPopup as ce, useI18n as le } from "@museumwnf/viewer-core";
|
|
6
6
|
import { RouterLink as E, useRoute as ue, useRouter as de } from "vue-router";
|
|
@@ -107,7 +107,7 @@ var D = Object.defineProperty, O = (e, t) => {
|
|
|
107
107
|
default: !1
|
|
108
108
|
} },
|
|
109
109
|
setup(_) {
|
|
110
|
-
let D = _, { aboutTheme: O, listedThemes: fe, pictureById: pe, pictureParent: he, romanFor: k, themeByRouteId: _t, themeText: A, useThemePictures: vt } =
|
|
110
|
+
let D = _, { aboutTheme: O, listedThemes: fe, pictureById: pe, pictureParent: he, romanFor: k, themeByRouteId: _t, themeText: A, useThemePictures: vt } = i, { t: j, locale: M } = le(), N = ue(), yt = de(), P = l(() => D.aboutMode ? O.value : _t(N.params.id)), F = l(() => {
|
|
111
111
|
let e = N.params.subtheme;
|
|
112
112
|
if (D.aboutMode || !e || e === "overview") return null;
|
|
113
113
|
let t = Number(e);
|
|
@@ -165,20 +165,20 @@ var D = Object.defineProperty, O = (e, t) => {
|
|
|
165
165
|
let jt = y(!1), Y = l(() => {
|
|
166
166
|
let e = J.value;
|
|
167
167
|
if (!e) return null;
|
|
168
|
-
let
|
|
168
|
+
let n = pe.value.get(e.id), r = n ? he(n) : null, i = r ? t("items", r.id, M.value) : {}, a = Array.isArray(i.materials) ? i.materials.join(", ") : i.materials ?? "";
|
|
169
169
|
return {
|
|
170
170
|
caption: q.value ? "" : e.imageCaption ?? "",
|
|
171
171
|
name: e.name ?? "",
|
|
172
|
-
alsoKnownAs:
|
|
173
|
-
artist:
|
|
172
|
+
alsoKnownAs: i.alternate_name ? T(i.alternate_name) : "",
|
|
173
|
+
artist: i.artist ? T(i.artist) : "",
|
|
174
174
|
materials: a ? T(a) : "",
|
|
175
|
-
date:
|
|
176
|
-
dynasty:
|
|
175
|
+
date: i.dates ? T(i.dates) : "",
|
|
176
|
+
dynasty: i.dynasty ? T(i.dynasty) : "",
|
|
177
177
|
place: [
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
178
|
+
i.holder || (r ? o("partners", r.partner_id) : ""),
|
|
179
|
+
i.location,
|
|
180
|
+
i.province,
|
|
181
|
+
r ? o("countries", r.country_id) : ""
|
|
182
182
|
].filter(Boolean).join(", "),
|
|
183
183
|
to: e.to ?? null
|
|
184
184
|
};
|
|
@@ -186,7 +186,7 @@ var D = Object.defineProperty, O = (e, t) => {
|
|
|
186
186
|
if (D.aboutMode) return r(M.value);
|
|
187
187
|
let e = A(P.value, M.value).title ?? P.value?.internal_name ?? "";
|
|
188
188
|
return P.value ? `${k(P.value.display_order)} ▪ ${e}` : e;
|
|
189
|
-
}), Nt = l(() => D.aboutMode ? a(M.value) : I.value ? A(I.value, M.value).title ?? I.value.internal_name ?? "" : j("exhibition.theme.overview")), Pt = l(() => !L.value?.id || !K.value?.id || q.value ? "" :
|
|
189
|
+
}), Nt = l(() => D.aboutMode ? a(M.value) : I.value ? A(I.value, M.value).title ?? I.value.internal_name ?? "" : j("exhibition.theme.overview")), Pt = l(() => !L.value?.id || !K.value?.id || q.value ? "" : t("themes", `${L.value.id}/${K.value.id}`, M.value).contextual_description ?? ""), Ft = l(() => I.value ? X.value.quote : X.value.presentation), It = l(() => se([Ft.value, Pt.value].filter(Boolean).join("\n\n"), M.value)), Lt = l(() => oe(It.value)), { active: Rt, onClick: zt, close: Bt } = ce(It), Vt = l(() => Rt.value ? w(Rt.value.definition, { breaks: !0 }) : ""), Ht = l(() => X.value.quote ? T(String(X.value.quote), { glossary: I.value ? Lt.value : [] }) : ""), Ut = l(() => X.value.presentation ? w(String(X.value.presentation), {
|
|
190
190
|
breaks: !0,
|
|
191
191
|
glossary: I.value ? [] : Lt.value
|
|
192
192
|
}) : ""), Wt = l(() => Pt.value ? w(String(Pt.value), {
|