@museumwnf/viewer-layout 3.58.0 → 3.60.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 -3
- package/dist/{FeaturedRecord-CTqnQFox.js → FeaturedRecord-DLYyyRey.js} +2 -3
- package/dist/{GlossaryPopover-B7E6BsjS.js → GlossaryPopover-DbQKXhx9.js} +1 -2
- package/dist/ItemDetailView-D5T3QXYJ.js +303 -0
- package/dist/{OnDisplayIn-DZHRKjL0.js → OnDisplayIn-CCM5Ahxy.js} +10 -5
- package/dist/{PageShell-CcaLOuXI.js → PageShell-CPtgzcxv.js} +1 -2
- package/dist/{PartnerMap-BIKd-AGP.js → PartnerMap-BuQo_FLl.js} +1 -2
- package/dist/{RecordView-DEKHp1A3.js → RecordView-n7bbQUg2.js} +14 -17
- package/dist/{SiteShell-CYQxXosD.js → SiteShell-qvsZO4Iz.js} +3 -4
- package/dist/{Theme-Co1bf81Z.js → Theme-0bsA_Abx.js} +29 -30
- package/dist/{TimelineEventList-CTJJOWGh.js → TimelineEventList-e1fNm28F.js} +3 -4
- package/dist/{TimelineResultsView-D15BMWZM.js → TimelineResultsView-Cl_LcM--.js} +264 -255
- package/dist/{chrome-DNsZQXrL.js → chrome-Bv_mLlHM.js} +1 -2
- package/dist/components.js +1 -2
- package/dist/{content-PQeMx8U5.js → content-BzSJircQ.js} +3 -4
- package/dist/content.js +6 -6
- package/dist/{data-CXRsGwLQ.js → data-EKYeMQcC.js} +16 -11
- package/dist/{data-BINc9QjV.js → data-kqAkoQvf.js} +2 -3
- package/dist/dxa.js +898 -673
- package/dist/index.js +8 -8
- package/dist/minisite.js +347 -341
- package/dist/standalone.js +209 -217
- package/dist/{themeSpecs-DP9xWiVJ.js → themeSpecs-CsDpl4rR.js} +2 -3
- package/dist/viewer-layout.css +1 -1
- package/dist/views.js +5 -6
- package/package.json +10 -10
- package/src/dxa/testing.js +71 -42
- package/src/styles/dxa-gallery.css +19 -1
- package/src/tokens.reference.css +11 -1
- package/dist/ItemDetailView-Bbn-uNaR.js +0 -304
package/dist/views.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { t as e } from "./FeaturedRecord-
|
|
2
|
-
import { s as t } from "./TimelineEventList-
|
|
3
|
-
import { a as n, i as r, n as i, o as a, r as o, s, t as c } from "./TimelineResultsView-
|
|
4
|
-
import { t as l } from "./RecordView-
|
|
1
|
+
import { t as e } from "./FeaturedRecord-DLYyyRey.js";
|
|
2
|
+
import { s as t } from "./TimelineEventList-e1fNm28F.js";
|
|
3
|
+
import { a as n, i as r, n as i, o as a, r as o, s, t as c } from "./TimelineResultsView-Cl_LcM--.js";
|
|
4
|
+
import { t as l } from "./RecordView-n7bbQUg2.js";
|
|
5
5
|
import { computed as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createVNode as m, mergeProps as h, normalizeClass as g, openBlock as _, renderSlot as v, toDisplayString as y, unref as b } from "vue";
|
|
6
6
|
import { I18nText as x, renderInline as S, renderPlain as C, useDataPackage as w, useFeaturedRecord as T, useI18n as E, useSiteConfig as D } from "@museumwnf/viewer-core";
|
|
7
|
-
|
|
7
|
+
// src/views/HomeView.vue
|
|
8
8
|
var O = { class: "mwnf-home" }, k = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "mwnf-home__title"
|
|
@@ -99,5 +99,4 @@ var O = { class: "mwnf-home" }, k = {
|
|
|
99
99
|
]));
|
|
100
100
|
}
|
|
101
101
|
};
|
|
102
|
-
//#endregion
|
|
103
102
|
export { s as CatalogueResultsView, a as EssayView, A as HomeView, n as LinkListView, r as PartnerListView, l as RecordView, i as SearchFormView, o as TextPageView, c as TimelineResultsView };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@museumwnf/viewer-layout",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.60.0",
|
|
4
4
|
"description": "Page structure for MWNF websites: PageShell composing seven optional, token-styled sections, the content components a page is made of, and the composed views a website names instead of writing a page.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -43,18 +43,18 @@
|
|
|
43
43
|
"test": "vitest run"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
|
-
"@museumwnf/viewer-core": "^2.
|
|
46
|
+
"@museumwnf/viewer-core": "^2.16.0",
|
|
47
47
|
"vue": "^3.5.0",
|
|
48
48
|
"vue-router": "^4.5.0 || ^5.0.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@museumwnf/viewer-core": "^2.
|
|
52
|
-
"@vitejs/plugin-vue": "^6.0.
|
|
53
|
-
"@vue/test-utils": "^2.
|
|
54
|
-
"jsdom": "^30.
|
|
55
|
-
"vite": "^8.
|
|
56
|
-
"vitest": "^
|
|
57
|
-
"vue": "^3.5.
|
|
58
|
-
"vue-router": "^5.
|
|
51
|
+
"@museumwnf/viewer-core": "^2.16.0",
|
|
52
|
+
"@vitejs/plugin-vue": "^6.0.10",
|
|
53
|
+
"@vue/test-utils": "^2.5.1",
|
|
54
|
+
"jsdom": "^30.1.3",
|
|
55
|
+
"vite": "^8.3.5",
|
|
56
|
+
"vitest": "^5.1.0",
|
|
57
|
+
"vue": "^3.5.44",
|
|
58
|
+
"vue-router": "^5.4.0"
|
|
59
59
|
}
|
|
60
60
|
}
|
package/src/dxa/testing.js
CHANGED
|
@@ -55,29 +55,49 @@ function rightsTest(mountSite, manifest, messages) {
|
|
|
55
55
|
}, 20000)
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
+
// A gallery's tiles (legacy's ObjectGrid, dxa/gallery/ObjectGrid.vue), and
|
|
59
|
+
// how many a first page holds: legacy's twenty, or fewer when there are
|
|
60
|
+
// fewer (inventory-app#2423).
|
|
61
|
+
const TILE = '.mwnf-dxa-grid__entry'
|
|
62
|
+
const GALLERY_PAGE = 20
|
|
63
|
+
const firstPage = (count) => Math.min(GALLERY_PAGE, Number(count))
|
|
64
|
+
|
|
65
|
+
// An exhibition's tiles: the platform's record grid, nine a page.
|
|
66
|
+
const EXHIBITION_TILE = '.mwnf-grid__tile'
|
|
67
|
+
|
|
58
68
|
// The collection results: the tiles, the "filter further by" column, the
|
|
59
|
-
// summary and the page links. A
|
|
60
|
-
|
|
69
|
+
// summary and the page links. A gallery's first page holds twenty tiles, or
|
|
70
|
+
// every object when there are fewer, and offers page links only when there
|
|
71
|
+
// is a second page, as legacy; a site may pin its count of page links.
|
|
72
|
+
// (A gallery's `collection.tiles` is no longer read: it counted the old nine
|
|
73
|
+
// a page. An exhibition may still pin its own.)
|
|
74
|
+
function collectionTest(mountSite, collection = {}, { gallery = false } = {}) {
|
|
75
|
+
const tile = gallery ? TILE : EXHIBITION_TILE
|
|
61
76
|
it('renders the collection results on the composed results view', async () => {
|
|
62
77
|
const { app, host } = await mountSite('#/collection-results')
|
|
63
|
-
await vi.waitFor(() => expect(host.querySelector(
|
|
78
|
+
await vi.waitFor(() => expect(host.querySelector(tile)).not.toBeNull(), WAIT)
|
|
64
79
|
expect(host.querySelector('.mwnf-catalogue')).not.toBeNull()
|
|
65
80
|
expect(host.querySelector('.mwnf-catalogue__aside .mwnf-filter')).not.toBeNull()
|
|
66
|
-
|
|
67
|
-
|
|
81
|
+
const count = host.querySelector('.mwnf-summary__count')
|
|
82
|
+
expect(count).not.toBeNull()
|
|
83
|
+
const objects = Number(count.textContent.replace(/\D/g, ''))
|
|
84
|
+
const tiles = host.querySelectorAll(tile).length
|
|
68
85
|
const paginations = host.querySelectorAll('.mwnf-pagination').length
|
|
69
|
-
if (
|
|
86
|
+
if (gallery) expect(tiles).toBe(firstPage(objects))
|
|
87
|
+
else if (collection.tiles) expect(tiles).toBe(collection.tiles)
|
|
70
88
|
else expect(tiles).toBeGreaterThan(0)
|
|
71
|
-
if (
|
|
89
|
+
if (gallery && objects <= GALLERY_PAGE) expect(paginations).toBe(0)
|
|
90
|
+
else if (collection.paginations) expect(paginations).toBe(collection.paginations)
|
|
72
91
|
else expect(paginations).toBeGreaterThan(0)
|
|
73
92
|
app.unmount()
|
|
74
93
|
}, 60000)
|
|
75
94
|
}
|
|
76
95
|
|
|
77
|
-
function searchTests(mountSite, loadItems) {
|
|
96
|
+
function searchTests(mountSite, loadItems, { gallery = false } = {}) {
|
|
97
|
+
const tile = gallery ? TILE : EXHIBITION_TILE
|
|
78
98
|
it('returns every renderable object for the all-objects sentinel', async () => {
|
|
79
99
|
const { app, host } = await mountSite('#/search?q=all-objects')
|
|
80
|
-
await vi.waitFor(() => expect(host.querySelector(
|
|
100
|
+
await vi.waitFor(() => expect(host.querySelector(tile)).not.toBeNull(), WAIT)
|
|
81
101
|
expect(host.textContent).toContain('All objects')
|
|
82
102
|
app.unmount()
|
|
83
103
|
}, 30000)
|
|
@@ -86,7 +106,7 @@ function searchTests(mountSite, loadItems) {
|
|
|
86
106
|
const item = await loadItems()
|
|
87
107
|
const term = firstWord(item.internal_name)
|
|
88
108
|
const { app, host } = await mountSite(`#/search?q=${encodeURIComponent(term)}`)
|
|
89
|
-
await vi.waitFor(() => expect(host.querySelector(
|
|
109
|
+
await vi.waitFor(() => expect(host.querySelector(tile)).not.toBeNull(), WAIT)
|
|
90
110
|
expect(host.textContent).toContain(`“${term}”`)
|
|
91
111
|
app.unmount()
|
|
92
112
|
}, 30000)
|
|
@@ -175,13 +195,15 @@ function configTests(config, routes) {
|
|
|
175
195
|
* items in: its legacy two-letter code, its inventory id, its name; and,
|
|
176
196
|
* optionally, the exact `rows` the results' first page shows, the events
|
|
177
197
|
* `found` when that is more, an `event` text, the `gallery` count the
|
|
178
|
-
* results offer
|
|
179
|
-
* `galleryItem` text on it;
|
|
198
|
+
* results offer and a `galleryItem` text on the gallery's first page;
|
|
180
199
|
* - `partner`: `{ id, name, city, country, objects }` — a partner with
|
|
181
|
-
* objects, a position and a translated city
|
|
182
|
-
*
|
|
183
|
-
*
|
|
184
|
-
*
|
|
200
|
+
* objects, a position and a translated city;
|
|
201
|
+
* - optionally `collection: { paginations }` (read only when the results
|
|
202
|
+
* have a second page), and the `about` and `credits` texts their pages
|
|
203
|
+
* show.
|
|
204
|
+
* A first page of tiles holds legacy's twenty, or every object when there
|
|
205
|
+
* are fewer; the suite counts that itself, so `collection.tiles`,
|
|
206
|
+
* `timeline.galleryTiles` and `partner.tiles` are no longer read.
|
|
185
207
|
*/
|
|
186
208
|
export function describeGallerySmoke({ config, sharedTexts, ownTexts, manifest, namespace, picks }) {
|
|
187
209
|
const { messages, mountSite } = mounter(config, sharedTexts, ownTexts)
|
|
@@ -200,7 +222,7 @@ export function describeGallerySmoke({ config, sharedTexts, ownTexts, manifest,
|
|
|
200
222
|
app.unmount()
|
|
201
223
|
}, 20000)
|
|
202
224
|
|
|
203
|
-
collectionTest(mountSite, picks.collection)
|
|
225
|
+
collectionTest(mountSite, picks.collection, { gallery: true })
|
|
204
226
|
|
|
205
227
|
it('renders the collection entrance on the composed search form view', async () => {
|
|
206
228
|
const { app, host } = await mountSite('#/collection')
|
|
@@ -213,19 +235,19 @@ export function describeGallerySmoke({ config, sharedTexts, ownTexts, manifest,
|
|
|
213
235
|
app.unmount()
|
|
214
236
|
}, 30000)
|
|
215
237
|
|
|
216
|
-
searchTests(mountSite, async () => (await loadEntities(['items']))[0][0])
|
|
238
|
+
searchTests(mountSite, async () => (await loadEntities(['items']))[0][0], { gallery: true })
|
|
217
239
|
|
|
218
|
-
it(
|
|
240
|
+
it("renders the about page as legacy's text page", async () => {
|
|
219
241
|
const { app, host } = await mountSite('#/about')
|
|
220
|
-
const prose = host.querySelector('.mwnf-
|
|
242
|
+
const prose = host.querySelector('.mwnf-dxa-gallery-text__body')
|
|
221
243
|
expect(prose.textContent.trim().length).toBeGreaterThan(0)
|
|
222
244
|
if (picks.about) expect(host.textContent).toContain(picks.about)
|
|
223
245
|
app.unmount()
|
|
224
246
|
}, 20000)
|
|
225
247
|
|
|
226
|
-
it(
|
|
248
|
+
it("renders the credits page as legacy's text page", async () => {
|
|
227
249
|
const { app, host } = await mountSite('#/credits')
|
|
228
|
-
const prose = host.querySelector('.mwnf-
|
|
250
|
+
const prose = host.querySelector('.mwnf-dxa-gallery-text__body')
|
|
229
251
|
expect(prose.textContent.trim().length).toBeGreaterThan(0)
|
|
230
252
|
if (picks.credits) expect(host.textContent).toContain(picks.credits)
|
|
231
253
|
app.unmount()
|
|
@@ -297,14 +319,14 @@ export function describeGallerySmoke({ config, sharedTexts, ownTexts, manifest,
|
|
|
297
319
|
app.unmount()
|
|
298
320
|
}, 60000)
|
|
299
321
|
|
|
300
|
-
// A borrowed item's tile names its project
|
|
301
|
-
// the tile, so a prefix is matched.
|
|
322
|
+
// A borrowed item's tile names its project on its card.
|
|
302
323
|
it('shows the source project on a collection-results tile, from the manifest', async () => {
|
|
303
324
|
const [items] = await loadEntities(['items'])
|
|
304
325
|
const item = items.find((i) => i.id === chip.item)
|
|
305
326
|
const { app, host } = await mountSite(`#/search?q=${encodeURIComponent(item.internal_name.replace(/[*_]/g, ''))}`)
|
|
306
|
-
await vi.waitFor(() => expect(host.querySelector(
|
|
307
|
-
|
|
327
|
+
await vi.waitFor(() => expect(host.querySelector(TILE)).not.toBeNull(), WAIT)
|
|
328
|
+
const projects = [...host.querySelectorAll('.mwnf-dxa-grid__project span')].map((span) => span.textContent)
|
|
329
|
+
expect(projects.some((name) => name.startsWith(chip.project.slice(0, 15)))).toBe(true)
|
|
308
330
|
app.unmount()
|
|
309
331
|
}, 30000)
|
|
310
332
|
|
|
@@ -345,37 +367,43 @@ export function describeGallerySmoke({ config, sharedTexts, ownTexts, manifest,
|
|
|
345
367
|
}, 60000)
|
|
346
368
|
}
|
|
347
369
|
|
|
370
|
+
// (`timeline.galleryTiles` is no longer read: it counted the old nine a
|
|
371
|
+
// page. The `gallery` count is the results' own period's, while this
|
|
372
|
+
// address takes every date, so only legacy's twenty a page is checked.)
|
|
348
373
|
it('renders the timeline gallery on the composed results view', async () => {
|
|
349
374
|
const { app, host } = await mountSite(`#/timeline/gallery?country=${timeline.code}`)
|
|
350
|
-
await vi.waitFor(() => expect(host.querySelectorAll(
|
|
351
|
-
|
|
375
|
+
await vi.waitFor(() => expect(host.querySelectorAll(TILE).length).toBeGreaterThan(0), WAIT)
|
|
376
|
+
expect(host.querySelectorAll(TILE).length).toBeLessThanOrEqual(GALLERY_PAGE)
|
|
352
377
|
expect(host.querySelector('.mwnf-summary').textContent).toContain(timeline.country)
|
|
353
378
|
if (timeline.galleryItem) expect(host.textContent).toContain(timeline.galleryItem)
|
|
354
379
|
app.unmount()
|
|
355
380
|
}, 60000)
|
|
356
381
|
|
|
357
|
-
//
|
|
358
|
-
//
|
|
359
|
-
|
|
382
|
+
// Legacy's entrance (TimelinePage.vue): the country list, then Go, which
|
|
383
|
+
// fills in the first and last dates on offer; the results filter on the
|
|
384
|
+
// country chosen.
|
|
385
|
+
it("submits the timeline entrance's country with Go to results that actually filter", async () => {
|
|
360
386
|
const { app, host } = await mountSite('#/timeline')
|
|
361
|
-
await vi.waitFor(() => expect(host.
|
|
362
|
-
const countrySelect = host.
|
|
363
|
-
countrySelect.value
|
|
387
|
+
await vi.waitFor(() => expect(host.querySelectorAll('.mwnf-dxa-timeline__country option').length).toBeGreaterThan(2), WAIT)
|
|
388
|
+
const countrySelect = host.querySelector('.mwnf-dxa-timeline__country')
|
|
389
|
+
const option = [...countrySelect.options].find((o) => o.value === timeline.id || o.value === timeline.code)
|
|
390
|
+
countrySelect.value = option.value
|
|
364
391
|
countrySelect.dispatchEvent(new window.Event('change', { bubbles: true }))
|
|
365
|
-
host.querySelector('
|
|
392
|
+
host.querySelector('.mwnf-dxa-timeline__go button').click()
|
|
366
393
|
await vi.waitFor(() => expect(host.querySelectorAll('.mwnf-timeline__row').length).toBeGreaterThan(0), WAIT)
|
|
367
|
-
if (timeline.rows) expect(host.querySelectorAll('.mwnf-timeline__row').length).toBe(timeline.rows)
|
|
368
394
|
expect(host.querySelector('.mwnf-timeline__caption').textContent).toContain(timeline.country)
|
|
369
395
|
app.unmount()
|
|
370
396
|
}, 60000)
|
|
371
397
|
|
|
372
|
-
//
|
|
373
|
-
|
|
398
|
+
// Legacy's list (PartnersPage.vue): each partner's name and its links,
|
|
399
|
+
// View objects for one holding something; no object count.
|
|
400
|
+
it("renders the partners list as legacy's", async () => {
|
|
374
401
|
const { app, host } = await mountSite('#/partners')
|
|
375
|
-
await vi.waitFor(() => expect(host.querySelector('.mwnf-
|
|
402
|
+
await vi.waitFor(() => expect(host.querySelector('.mwnf-dxa-gallery-partners__partner')).not.toBeNull(), WAIT)
|
|
376
403
|
expect(host.textContent).toContain(partner.country)
|
|
377
404
|
expect(host.textContent).toContain(partner.name)
|
|
378
|
-
expect(host.
|
|
405
|
+
expect(host.querySelector(`.mwnf-dxa-gallery-partners__links a[href="#/partner/${partner.id}/objects"]`)).not.toBeNull()
|
|
406
|
+
expect(host.textContent).not.toContain('object(s) in this site')
|
|
379
407
|
app.unmount()
|
|
380
408
|
}, 60000)
|
|
381
409
|
|
|
@@ -390,9 +418,10 @@ export function describeGallerySmoke({ config, sharedTexts, ownTexts, manifest,
|
|
|
390
418
|
app.unmount()
|
|
391
419
|
}, 60000)
|
|
392
420
|
|
|
393
|
-
|
|
421
|
+
// (`partner.tiles` is no longer read: the first page holds twenty, or all.)
|
|
422
|
+
it("renders a partner's objects on legacy's grid", async () => {
|
|
394
423
|
const { app, host } = await mountSite(`#/partner/${partner.id}/objects`)
|
|
395
|
-
await vi.waitFor(() => expect(host.querySelectorAll(
|
|
424
|
+
await vi.waitFor(() => expect(host.querySelectorAll(TILE).length).toBe(firstPage(partner.objects)), WAIT)
|
|
396
425
|
expect(host.textContent).toContain(partner.name)
|
|
397
426
|
app.unmount()
|
|
398
427
|
}, 60000)
|
|
@@ -24,7 +24,10 @@
|
|
|
24
24
|
* gallery's value wins. Legacy drew white text on both menu shades and on the
|
|
25
25
|
* header buttons whatever the palette, and so does this file.
|
|
26
26
|
*/
|
|
27
|
-
|
|
27
|
+
/* Roboto Condensed upright only, as legacy loaded it (400 and 700): its
|
|
28
|
+
italics are the upright face slanted, as wide as the upright text. A true
|
|
29
|
+
italic face is narrower (inventory-app#2423, the partner badges). */
|
|
30
|
+
@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');
|
|
28
31
|
|
|
29
32
|
/* ── Theme: the family's tokens, read from the palette ───────────────────── */
|
|
30
33
|
:root {
|
|
@@ -346,6 +349,21 @@ a { color: inherit; }
|
|
|
346
349
|
.mwnf-nav__toggle { width: 100%; justify-content: center; font-size: 20px; }
|
|
347
350
|
}
|
|
348
351
|
|
|
352
|
+
/* Back as legacy's BackComponent: bold, flush left with 8px after the label;
|
|
353
|
+
the arrow takes the place of its icon, 20px wide and 4px from the label,
|
|
354
|
+
and no taller than the text (the glyph comes from a fallback font whose
|
|
355
|
+
line is taller). */
|
|
356
|
+
.mwnf-back-link__button {
|
|
357
|
+
padding: 2px 8px 2px 0;
|
|
358
|
+
}
|
|
359
|
+
.mwnf-back-link__arrow {
|
|
360
|
+
display: inline-block;
|
|
361
|
+
width: 20px;
|
|
362
|
+
margin-inline-end: 4px;
|
|
363
|
+
line-height: 0;
|
|
364
|
+
text-align: center;
|
|
365
|
+
}
|
|
366
|
+
|
|
349
367
|
/* ── The header mark and tools, the footer's icons (inventory-app#2233) ──── */
|
|
350
368
|
|
|
351
369
|
/* The tools keep to the row's end whether or not a title cell sits between
|
package/src/tokens.reference.css
CHANGED
|
@@ -717,6 +717,7 @@
|
|
|
717
717
|
/* --mwnf-back-link-size: 0.875rem; Back link text size */
|
|
718
718
|
/* --mwnf-back-link-line-height: 1; Back link line height */
|
|
719
719
|
/* --mwnf-back-link-color: var(--mwnf-link-text); Back link color */
|
|
720
|
+
/* --mwnf-back-link-arrow-gap: 0.25em; Back link: the space after its arrow */
|
|
720
721
|
|
|
721
722
|
/* ---------- Content: SearchFormView ---------- */
|
|
722
723
|
/* --mwnf-search-form-row-gap: 0.5rem; Gap between a row's own parts, and between facet columns */
|
|
@@ -821,7 +822,16 @@
|
|
|
821
822
|
|
|
822
823
|
/* ---------- DXA family pages (src/dxa/) ---------- */
|
|
823
824
|
/* --mwnf-dxa-heading-color: #1c1c1c; Partner name / profile heading color */
|
|
824
|
-
/* --mwnf-dxa-band-background: #f0f0f0; Language switcher / tab strip / timeline-link box background */
|
|
825
|
+
/* --mwnf-dxa-band-background: #f0f0f0; Language switcher / tab strip / timeline-link box / gallery partner list country band background */
|
|
826
|
+
/* --mwnf-dxa-gallery-partners-background: #ffffff; The gallery partner list's page ground */
|
|
827
|
+
/* --mwnf-dxa-gallery-text-background: #ffffff; A gallery's About / Credits / How to search / Timeline panel */
|
|
828
|
+
/* --mwnf-dxa-timeline-go-background: var(--theme-light); A gallery's Timeline: the Go button */ /* --mwnf-dxa-badge-dga: #0059bf; Partner badge colours by project, as legacy's (white text): Discover Glass Art */
|
|
829
|
+
/* --mwnf-dxa-badge-isl: #ffcc00; Discover Islamic Art, Explore Islamic Art Collections (black text) */
|
|
830
|
+
/* --mwnf-dxa-badge-awe: #900000; Sharing History */
|
|
831
|
+
/* --mwnf-dxa-badge-dba: #001d66; Discover Baroque Art */
|
|
832
|
+
/* --mwnf-dxa-badge-galleries: #263238; MWNF Galleries */
|
|
833
|
+
/* --mwnf-dxa-badge-dca: #6b612b; Discover Carpet Art */
|
|
834
|
+
/* --mwnf-dxa-badge-exh: #7f01d4; Any online exhibition's project */
|
|
825
835
|
/* --mwnf-dxa-item-background: #ffffff; Item page ground (white on a gallery's tinted page) */
|
|
826
836
|
/* --mwnf-dxa-item-link: var(--mwnf-link-text); Item sheet value links */
|
|
827
837
|
/* --mwnf-dxa-item-padding: 3.125rem 1.25rem; Item page: the photo and sheet columns' side padding */
|
|
@@ -1,304 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./chrome-DNsZQXrL.js";
|
|
2
|
-
import { r as t } from "./PartnerMap-BIKd-AGP.js";
|
|
3
|
-
import { n } from "./TimelineEventList-CTJJOWGh.js";
|
|
4
|
-
import { i as r, n as i, o as a, r as o, t as s } from "./OnDisplayIn-DZHRKjL0.js";
|
|
5
|
-
import { t as c } from "./RecordView-DEKHp1A3.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
|
-
//#region 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" }, he = ["href"], ge = { key: 9 }, _e = { class: "mwnf-sheet-related__heading" }, ve = { class: "mwnf-sheet-related__line" }, ye = ["href"], be = { key: 10 }, xe = { class: "mwnf-sheet-related__heading" }, Se = "sheet.field.", W = {
|
|
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(W) {
|
|
63
|
-
let G = W, Ce = ne(), we = /* @__PURE__ */ new Set([
|
|
64
|
-
"before-sheet",
|
|
65
|
-
"museum",
|
|
66
|
-
"related",
|
|
67
|
-
"aside"
|
|
68
|
-
]), Te = u(() => Object.keys(Ce).filter((e) => !we.has(e))), Ee = u(() => !G.dataGetter || G.dataGetter(G.id) != null), { t: K } = ce();
|
|
69
|
-
function De(e) {
|
|
70
|
-
if (typeof e != "string" || !e.startsWith(Se)) return e;
|
|
71
|
-
let t = `sheet.dxa.${e.slice(12)}`;
|
|
72
|
-
return K(t) === t ? e : t;
|
|
73
|
-
}
|
|
74
|
-
let q = u(() => Array.isArray(G.spec.fields) ? {
|
|
75
|
-
...G.spec,
|
|
76
|
-
fields: G.spec.fields.map((e) => ({
|
|
77
|
-
...e,
|
|
78
|
-
label: De(e.label)
|
|
79
|
-
}))
|
|
80
|
-
} : G.spec), J = le(), Y = (e, t) => (e.name ?? "").localeCompare(t.name ?? ""), Oe = (e) => (e.gallery_references ?? []).filter((e) => e.kind === "gallery").sort(Y), X = (e) => (e.gallery_references ?? []).filter((e) => e.kind === "exhibition").sort(Y), Z = (e) => J.links(e.project_id)?.artisticIntroductionUrl ?? null, Q = (e) => J.links(e.project_id)?.relatedDatabaseUrl ?? null;
|
|
81
|
-
function ke(e, t) {
|
|
82
|
-
if (!e) return null;
|
|
83
|
-
let n = q.value.sourceDatabase === !1 ? null : q.value.sourceDatabase ?? null, r = null;
|
|
84
|
-
if (n) {
|
|
85
|
-
let i = n.chipClass ? n.chipClass(e, t) : null, a = J.label(e.project_id);
|
|
86
|
-
(i || a) && (r = {
|
|
87
|
-
chipClass: i,
|
|
88
|
-
name: a,
|
|
89
|
-
label: K(n.label ?? "record.sheet.sourceDatabase")
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
let i = n && n.addToCollection !== !1 ? K(n.addToCollection?.label ?? "record.action.addToCollection") : null, a = q.value.notice === !1 ? null : q.value.notice ?? null, o = a && a.show(e, t) ? K(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 = q.value.museum === !1 ? null : q.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 = q.value.related ?? {}, r = t.records ?? [], i = t.outside ?? [], a = G.dataGetter ? r.filter((e) => G.dataGetter(e.id) != null) : r, o = G.dataGetter ? r.filter((e) => G.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 ? J.label(e.project_id) : null,
|
|
120
|
-
chipClass: n.outsideChip ? n.outsideChip(e, t) : null
|
|
121
|
-
})), c = (e) => ({
|
|
122
|
-
id: e.id,
|
|
123
|
-
label: D(e.name ?? ""),
|
|
124
|
-
href: e.legacy_host || "",
|
|
125
|
-
external: !!e.legacy_host
|
|
126
|
-
}), l = n.onDisplayIn && n.onDisplayIn !== !1 ? {
|
|
127
|
-
pendingLabel: n.onDisplayIn.linkPendingLabel ?? "",
|
|
128
|
-
groups: [{
|
|
129
|
-
heading: "record.related.exhibitions",
|
|
130
|
-
links: X(e).map(c)
|
|
131
|
-
}, {
|
|
132
|
-
heading: "record.related.galleries",
|
|
133
|
-
links: Oe(e).map(c)
|
|
134
|
-
}].filter((e) => e.links.length)
|
|
135
|
-
} : null, u = n.databaseLabel && Q(e) ? {
|
|
136
|
-
url: Q(e),
|
|
137
|
-
label: K(n.databaseLabel),
|
|
138
|
-
name: J.label(e.project_id)
|
|
139
|
-
} : null, d = n.overallDatabase && n.overallDatabase !== !1 ? {
|
|
140
|
-
label: K(n.overallDatabase.label),
|
|
141
|
-
linkLabel: K(n.overallDatabase.linkLabel)
|
|
142
|
-
} : null;
|
|
143
|
-
return {
|
|
144
|
-
title: n.title ? K(n.title) : "",
|
|
145
|
-
description: n.description ? K(n.description) : "",
|
|
146
|
-
heading: K(n.heading ?? "record.related.items"),
|
|
147
|
-
variant: n.variant ?? "grid",
|
|
148
|
-
actionLabel: n.actionLabel ? K(n.actionLabel) : "",
|
|
149
|
-
inPackage: a,
|
|
150
|
-
references: s,
|
|
151
|
-
notInPackageLabel: n.notInPackageLabel ? K(n.notInPackageLabel) : "",
|
|
152
|
-
artisticIntroduction: n.artisticIntroductionLabel && Z(e) ? {
|
|
153
|
-
url: Z(e),
|
|
154
|
-
label: K(n.artisticIntroductionLabel)
|
|
155
|
-
} : null,
|
|
156
|
-
timeline: n.timeline ? n.timeline(e, t) : null,
|
|
157
|
-
glossary: n.glossary !== !1,
|
|
158
|
-
dynasties: n.dynasties ? n.dynasties(e, t.language, t) : null,
|
|
159
|
-
media: n.media === !1 ? [] : e.media ?? [],
|
|
160
|
-
onDisplayIn: l,
|
|
161
|
-
database: u,
|
|
162
|
-
overallDatabase: d,
|
|
163
|
-
download: n.download === !1 ? null : {
|
|
164
|
-
label: K("record.action.download"),
|
|
165
|
-
pdfLabel: K("record.action.downloadPdf")
|
|
166
|
-
}
|
|
167
|
-
};
|
|
168
|
-
}
|
|
169
|
-
let Fe = ue(), Ie = u(() => {
|
|
170
|
-
let t = e(Fe.chrome, "world.png");
|
|
171
|
-
return t ? { "--mwnf-dxa-glossary-image": `url("${t}")` } : null;
|
|
172
|
-
});
|
|
173
|
-
function Le() {
|
|
174
|
-
window.print();
|
|
175
|
-
}
|
|
176
|
-
return (e, u) => Ee.value ? (b(), d(c, {
|
|
177
|
-
key: 0,
|
|
178
|
-
spec: q.value,
|
|
179
|
-
id: W.id,
|
|
180
|
-
entity: W.entity,
|
|
181
|
-
style: te(Ie.value)
|
|
182
|
-
}, ee({
|
|
183
|
-
"before-sheet": T((t) => [S(e.$slots, "before-sheet", y(_(t)), () => [(b(!0), p(l, null, x([ke(t.record, t)], (e) => (b(), p(l, { key: "before-sheet" }, [e?.source || e?.addToCollectionLabel ? (b(), p("div", k, [e.source ? (b(), p("p", A, [e.source.chipClass ? (b(), p("span", {
|
|
184
|
-
key: 0,
|
|
185
|
-
class: v(["mwnf-chip", e.source.chipClass]),
|
|
186
|
-
"aria-hidden": "true"
|
|
187
|
-
}, null, 2)) : f("", !0), e.source.name ? (b(), p(l, { key: 1 }, [h(C(e.source.label) + ": " + C(e.source.name), 1)], 64)) : f("", !0)])) : f("", !0), e.addToCollectionLabel ? (b(), p("p", j, [m("a", {
|
|
188
|
-
href: w(O).myCollection,
|
|
189
|
-
target: "_blank",
|
|
190
|
-
rel: "noopener"
|
|
191
|
-
}, "↗ " + C(e.addToCollectionLabel), 9, M)])) : f("", !0)])) : f("", !0), e?.notice ? (b(), p("div", N, [h(C(e.notice) + " ", 1), m("strong", null, [m("em", null, C(t.languages.map((e) => e.label).join(", ")), 1)])])) : f("", !0)], 64))), 128))])]),
|
|
192
|
-
museum: T((t) => [S(e.$slots, "museum", y(_(t)), () => [(b(!0), p(l, null, x([Ne(t)], (e) => (b(), p("div", P, [e.holder ? (b(), p("p", {
|
|
193
|
-
key: 0,
|
|
194
|
-
class: "mwnf-sheet-museum__holder",
|
|
195
|
-
innerHTML: e.holder
|
|
196
|
-
}, null, 8, F)) : f("", !0), e.view ? (b(), d(n, {
|
|
197
|
-
key: 1,
|
|
198
|
-
variant: "summary",
|
|
199
|
-
partner: e.view,
|
|
200
|
-
label: "partner.info.about",
|
|
201
|
-
dir: t.dir
|
|
202
|
-
}, null, 8, ["partner", "dir"])) : f("", !0)]))), 128))])]),
|
|
203
|
-
related: T(() => []),
|
|
204
|
-
aside: T((n) => [S(e.$slots, "related", y(_(n)), () => [(b(!0), p(l, null, x([Pe(n.record, n)], (e) => (b(), p(l, { key: n.record?.id ?? "related" }, [e ? (b(), p("div", I, [
|
|
205
|
-
e.title ? (b(), p("p", L, C(e.title), 1)) : f("", !0),
|
|
206
|
-
e.description ? (b(), p("p", R, C(e.description), 1)) : f("", !0),
|
|
207
|
-
e.inPackage.length || e.references.length ? (b(), d(t, {
|
|
208
|
-
key: 2,
|
|
209
|
-
heading: e.heading,
|
|
210
|
-
records: e.inPackage,
|
|
211
|
-
variant: e.variant,
|
|
212
|
-
"action-label": e.actionLabel
|
|
213
|
-
}, {
|
|
214
|
-
default: T(() => [e.references.length ? (b(), p("ul", z, [(b(!0), p(l, null, x(e.references, (t) => (b(), p("li", { key: t.id }, [
|
|
215
|
-
t.chipClass ? (b(), p("span", {
|
|
216
|
-
key: 0,
|
|
217
|
-
class: v(["mwnf-chip", t.chipClass]),
|
|
218
|
-
"aria-hidden": "true"
|
|
219
|
-
}, null, 2)) : f("", !0),
|
|
220
|
-
t.name ? (b(), p(l, { key: 1 }, [h(C(t.name), 1)], 64)) : f("", !0),
|
|
221
|
-
e.notInPackageLabel ? (b(), p("span", B, C(e.notInPackageLabel), 1)) : f("", !0)
|
|
222
|
-
]))), 128))])) : f("", !0)]),
|
|
223
|
-
_: 2
|
|
224
|
-
}, 1032, [
|
|
225
|
-
"heading",
|
|
226
|
-
"records",
|
|
227
|
-
"variant",
|
|
228
|
-
"action-label"
|
|
229
|
-
])) : f("", !0),
|
|
230
|
-
e.artisticIntroduction ? (b(), p("p", V, [m("a", {
|
|
231
|
-
href: e.artisticIntroduction.url,
|
|
232
|
-
target: "_blank",
|
|
233
|
-
rel: "noopener"
|
|
234
|
-
}, "↗ " + C(e.artisticIntroduction.label), 9, H)])) : f("", !0),
|
|
235
|
-
e.timeline ? (b(), d(o, {
|
|
236
|
-
key: n.record.id,
|
|
237
|
-
info: e.timeline
|
|
238
|
-
}, null, 8, ["info"])) : f("", !0),
|
|
239
|
-
e.glossary ? (b(), d(a, {
|
|
240
|
-
key: 5,
|
|
241
|
-
language: n.language,
|
|
242
|
-
dir: n.dir
|
|
243
|
-
}, null, 8, ["language", "dir"])) : f("", !0),
|
|
244
|
-
e.dynasties?.records?.length ? (b(), d(r, {
|
|
245
|
-
key: 6,
|
|
246
|
-
heading: w(K)("record.dynasty.list"),
|
|
247
|
-
dynasties: e.dynasties.records,
|
|
248
|
-
tr: e.dynasties.tr,
|
|
249
|
-
dir: n.dir
|
|
250
|
-
}, null, 8, [
|
|
251
|
-
"heading",
|
|
252
|
-
"dynasties",
|
|
253
|
-
"tr",
|
|
254
|
-
"dir"
|
|
255
|
-
])) : f("", !0),
|
|
256
|
-
g(i, {
|
|
257
|
-
media: e.media,
|
|
258
|
-
language: n.language,
|
|
259
|
-
descriptions: !1,
|
|
260
|
-
dir: n.dir
|
|
261
|
-
}, null, 8, [
|
|
262
|
-
"media",
|
|
263
|
-
"language",
|
|
264
|
-
"dir"
|
|
265
|
-
]),
|
|
266
|
-
e.onDisplayIn?.groups.length ? (b(), p("div", U, [m("p", de, C(w(K)("record.related.onDisplayIn")), 1), g(s, {
|
|
267
|
-
heading: "",
|
|
268
|
-
groups: e.onDisplayIn.groups,
|
|
269
|
-
"pending-label": e.onDisplayIn.pendingLabel,
|
|
270
|
-
dir: n.dir
|
|
271
|
-
}, null, 8, [
|
|
272
|
-
"groups",
|
|
273
|
-
"pending-label",
|
|
274
|
-
"dir"
|
|
275
|
-
])])) : f("", !0),
|
|
276
|
-
e.database ? (b(), p("div", fe, [m("p", pe, C(e.database.label), 1), m("p", me, [m("a", {
|
|
277
|
-
href: e.database.url,
|
|
278
|
-
target: "_blank",
|
|
279
|
-
rel: "noopener"
|
|
280
|
-
}, "↗ " + C(e.database.name), 9, he)])])) : f("", !0),
|
|
281
|
-
e.overallDatabase ? (b(), p("div", ge, [m("p", _e, C(e.overallDatabase.label), 1), m("p", ve, [m("a", {
|
|
282
|
-
href: w(O).overallDatabase,
|
|
283
|
-
target: "_blank",
|
|
284
|
-
rel: "noopener"
|
|
285
|
-
}, "↗ " + C(e.overallDatabase.linkLabel), 9, ye)])])) : f("", !0),
|
|
286
|
-
e.download ? (b(), p("div", be, [m("p", xe, C(e.download.label), 1), m("p", {
|
|
287
|
-
class: "mwnf-sheet-related__line mwnf-sheet-related__line--action",
|
|
288
|
-
onClick: Le
|
|
289
|
-
}, "➤ " + C(e.download.pdfLabel), 1)])) : f("", !0)
|
|
290
|
-
])) : f("", !0)], 64))), 128))])]),
|
|
291
|
-
_: 2
|
|
292
|
-
}, [x(Te.value, (t) => ({
|
|
293
|
-
name: t,
|
|
294
|
-
fn: T((n) => [S(e.$slots, t, y(_(n)))])
|
|
295
|
-
}))]), 1032, [
|
|
296
|
-
"spec",
|
|
297
|
-
"id",
|
|
298
|
-
"entity",
|
|
299
|
-
"style"
|
|
300
|
-
])) : (b(), d(w(re), { key: 1 }));
|
|
301
|
-
}
|
|
302
|
-
};
|
|
303
|
-
//#endregion
|
|
304
|
-
export { W as t };
|