@museumwnf/viewer-layout 2.16.0 → 2.18.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 +63 -33
- package/dist/FeaturedRecord-mRyLN7Mt.js +88 -0
- package/dist/OnDisplayIn-D6r_KvpI.js +1819 -0
- package/dist/PictureNarrative-B_GPQvYP.js +444 -0
- package/dist/SiteShell-C3OgZO8p.js +154 -0
- package/dist/Theme-Caz0E8w1.js +140 -0
- package/dist/TimelineResultsView-CMqrkr9z.js +1911 -0
- package/dist/components.js +2 -154
- package/dist/content-CHXh6D_q.js +84 -0
- package/dist/content.js +5 -5
- package/dist/data-BfyYB8ff.js +33 -0
- package/dist/data-G8uXeEfE.js +35 -0
- package/dist/dxa.js +1216 -343
- package/dist/index.js +5 -5
- package/dist/themeSpecs-Bgn-K6R6.js +34 -0
- package/dist/viewer-layout.css +1 -1
- package/dist/views.js +44 -756
- package/package.json +3 -3
- package/src/tokens.reference.css +33 -4
- package/dist/BackLink-LfSIuXnL.js +0 -45
- package/dist/TimelineEventList-D5Hot788.js +0 -1362
- package/dist/TimelineLookup-D-p1aQ_Z.js +0 -444
- package/dist/TimelineResultsView-DJo_yYEK.js +0 -1203
- package/dist/content-DncTPD5P.js +0 -378
package/README.md
CHANGED
|
@@ -17,7 +17,7 @@ all the packages:
|
|
|
17
17
|
| `@museumwnf/viewer-layout/content` | building blocks | the blocks alone, without the shell | the same |
|
|
18
18
|
| `@museumwnf/viewer-layout/views` | composed views | whole pages driven by a spec the website declares, with slots it fills | viewer-core's data layer, the site config and the router |
|
|
19
19
|
| `@museumwnf/viewer-layout/components` | composed views | `SiteShell`, the frame composed from `dataset.config.js` | the site config and the current route |
|
|
20
|
-
| `@museumwnf/viewer-layout/dxa` | DXA family layer | the gallery and exhibition pages, `standardRoutes` | the entries above, `@museumwnf/viewer-core` and `@museumwnf/viewer-core/dxa` |
|
|
20
|
+
| `@museumwnf/viewer-layout/dxa` | DXA family layer | the gallery and exhibition pages and shells, the family-only blocks, `standardRoutes`, `galleryConfig` / `exhibitionConfig` | the entries above, `@museumwnf/viewer-core` and `@museumwnf/viewer-core/dxa` |
|
|
21
21
|
| `@museumwnf/viewer-layout/style.css` | — | one stylesheet for every entry, the family styles included | — |
|
|
22
22
|
| `@museumwnf/viewer-layout/tokens.reference.css` | — | every token the package reads, with its fallback | — |
|
|
23
23
|
|
|
@@ -46,14 +46,15 @@ entries publish, and `@museumwnf/viewer-core`. A component that moves
|
|
|
46
46
|
between entries keeps its old export as an alias until the websites have
|
|
47
47
|
moved; a major release then removes the alias.
|
|
48
48
|
|
|
49
|
-
Where the package does not follow these rules yet, milestone M10 moves it:
|
|
50
49
|
`FeaturedPartners`, `SiblingGalleries`, `PopupLogo`, `PictureGallery`,
|
|
51
|
-
`PictureNarrative` (blocks) and `
|
|
52
|
-
only by the DXA family and
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
does not
|
|
50
|
+
`PictureNarrative` (blocks) and `ItemDetailView` (the composed view that was
|
|
51
|
+
`RecordSheetView`) are used only by the DXA family and live under `/dxa`
|
|
52
|
+
since 2.18.0; `/content` and `/views` keep their old names as deprecated
|
|
53
|
+
aliases until the next major
|
|
54
|
+
([inventory-app#2055](https://github.com/museumwithnofrontiers/inventory-app/issues/2055)).
|
|
55
|
+
Where the package does not follow the rules yet: `PictureGallery`,
|
|
56
|
+
`PictureNarrative` and `EssayView` default to `exhibition.*` entries
|
|
57
|
+
(inventory-app#2019).
|
|
57
58
|
|
|
58
59
|
Two companion docs give a more scannable version of who-owns-what and the
|
|
59
60
|
full slot list: [`docs/designer-contract.md`](docs/designer-contract.md) (the
|
|
@@ -322,7 +323,7 @@ the application registered, without any router coupling here.
|
|
|
322
323
|
| `FeaturedPartners` | `records: [{ id, name, logo, city, country, description, route }]`, or `partners` (view-models from viewer-core's `partnerView()`: the first picture or logo, "city, country", the description as plain text cut at `descriptionLength`, 420), `headingEntry` ('partner.featured') | a carousel of partners with bullet controls, rotated on an 8-second timer; the site provides filtered/shuffled records and routes |
|
|
323
324
|
| `SiblingGalleries` | `galleries: [{ id, name, image?, route }]`, `museums: [{ name, to \| href, accent?, textColor? }]`, `galleriesHeadingEntry`, `seeMoreGalleriesEntry`, `seeMoreGalleriesHref`, `museumsHeadingEntry` | two blocks of links: sibling galleries (may be unresolved, rendering as non-clickable tiles) and MWNF virtual museums (text initials over a coloured background) |
|
|
324
325
|
| `PopupLogo` | `content` (Markdown or raw HTML), `rawHtml` (false), `enabled` (true), `closeLabel` ('core.action.close') | a dismissible fixed modal for sponsor notices; renders content through `renderInline` by default (escaping, Markdown); when `rawHtml: true`, passes content as-is (for trusted HTML from the importer) |
|
|
325
|
-
| `BackLink` | `label` ('core.action.back'), `to \| href` (fallback
|
|
326
|
+
| `BackLink` | `label` ('core.action.back'), `to \| href` (the fallback), `variant: 'button' \| 'bar'`, `arrow` ('←', the bar's leading mark) | a "back" link: `router.back()` when the previous page is one of this website's own (vue-router's `history.state.back`), the fallback otherwise, so a visitor who arrived from another site stays on this one; with no fallback, back through whatever history the tab has. The default is a button (`.mwnf-back-link`); `bar` is a link carrying `.mwnf-back-bar`, addressed to the fallback so it also opens in a new tab, whose default slot replaces the label |
|
|
326
327
|
| `GlossaryTool` | `language`, `entity` ('glossary'), `labels` (entry-name overrides), `dir` | the search box four item sheets and a theme page each wrote for themselves: an input, the hits viewer-core's `searchGlossary` finds, the chosen definition as Markdown; a native `<details>` toggle |
|
|
327
328
|
| `DynastyPopout` | `dynasty` (record: `from_ah`/`to_ah`/`from_ad`/`to_ad`), `text` (its translation: `name`, `also_known_as`, `area`, `history`), `dir` | one dynasty, collapsed behind a native `<details>` toggle: name, also known as, area, AH/AD dates, history as Markdown |
|
|
328
329
|
| `DynastyList` | `heading`, `dynasties`, `tr` (dynasty → its translation), `dir` | one `DynastyPopout` per dynasty of a record, `RelatedRecords`'s shape |
|
|
@@ -330,7 +331,9 @@ the application registered, without any router coupling here.
|
|
|
330
331
|
| `PictureGallery` | `pictures: [{ id, image, imageAlt?, name (inline HTML), imageCaption?, detail?, fields?: [{ label, value }], to (route \| null), backRelated?: [{ picture, reciprocalText }] }]`, `selectedId` (v-model), `seeItemEntry`/`unresolvedEntry`/`emptyEntry`/`addRelatedEntry`/`hideRelatedEntry` (entry names) | a DXA exhibition theme page's curated-picture side panel + thumbnail strip: the selected picture large, its fields, a link to the parent record (or the "not in this exhibition" message when `to` is `null`); a picture that is the target of some other picture's related link (`backRelated`) starts hidden behind an "Add related works" toggle |
|
|
331
332
|
| `PictureNarrative` | `picture` (the selected picture, `PictureGallery`'s shape plus `related: [{ picture, text }]` and `backRelated: [{ picture, reciprocalText }]`), `contextualDescription` (Markdown), `relatedHeadingEntry`/`reciprocalFallbackEntry` (entry names); emits `select(id)` | the same page's narrative body, below `EssayView`'s own prose: the selected picture's own curated text, then the pictures it relates to (forward) and, when one points at it, the one it is related to (backward) — either direction may cross a theme boundary, which is why the website resolves the target/source picture rather than this component |
|
|
332
333
|
| `TimelineLookup` | `info: { trigger? (entry, default `record.related.timelineForItem`), heading (entry), countries: [{ value, label }], defaultCountry?() => value, events(value) => [{ id?, year_from, text: { description } }], range: [from, to], era?(year) => string, searchTo(value, range) => to }` | the timeline popout `RecordSheetView`'s related block opens onto (see below): a trigger line, a country select, the events for the chosen country within the record's own date range (rendered through `md()`), and a "begin a full search" link — the DXA gallery/exhibition pair's shared shape, parameterized by the site's own timeline composable |
|
|
333
|
-
|
|
334
|
+
| `SpecialFeatures` | `features` (the record's `details`: `{ id, internal_name, display_order, images, artist_names }`), `tr` (feature → its translation: `name`, `location`, `dates`, `description`), `language` (the pictures' captions), `glossary` (`RecordView`'s), `heading` ('sheet.field.specialFeatures'), `dir` | a monument's sub-details, as the data package embeds them on it: each one's name, location, dates and artists, its description as Markdown with the record's glossary terms, its pictures in a row; `DynastyList`'s shape |
|
|
335
|
+
| `RelatedMedia` | `media` (the record's `media`: `{ title, description, url, language }`), `language` (the entries in it when there are any, all otherwise), `descriptions` (true), `heading` ('record.related.audioVideo'), `dir` | a record's audio and video, each a ↗ link opening elsewhere, its description under it |
|
|
336
|
+
| `OnDisplayIn` | `groups: [{ heading? (entry), links: [{ id?, label (inline HTML), to? \| href?, external? }] }]`, `heading` ('record.related.onDisplayIn'; '' renders the groups alone), `pendingLabel` (entry, after a name with no address), `dir` | the exhibitions, chapters and galleries that show a record: a route links inside the site, an `external` address opens elsewhere marked ↗, a name with neither is plain text |
|
|
334
337
|
The record contract `RecordList`, `RecordGrid` and `RelatedRecords` share:
|
|
335
338
|
`{ id, image?, imageAlt?, name (inline HTML), meta: [string], badge?, href? | to? }`.
|
|
336
339
|
`PictureGallery` and `PictureNarrative` share a narrower one — a curated
|
|
@@ -345,7 +348,7 @@ every bundle of `@museumwnf/viewer-i18n` from 1.7.0. `GlossaryTool` also reads
|
|
|
345
348
|
`record.glossary.instructions`, `.definition` (1.7.0) and `record.glossary.tool`
|
|
346
349
|
(2.3.0); `PartnerPanel` reads `partner.info.about`, `.contact`, `.logo`,
|
|
347
350
|
`.addresses`, `.phone`, `.fax`, `partner.nav.homepage`,
|
|
348
|
-
`partner.item.objectsInSite` and `partner.action.readMore`, `.viewObjects` (4.2.0); `DynastyPopout` reads `record.dynasty.heading` (2.3.0) and
|
|
351
|
+
`partner.item.objectsInSite` and `partner.action.readMore`, `.viewObjects` (4.2.0); `SpecialFeatures`, `RelatedMedia` and `OnDisplayIn` default to `sheet.field.specialFeatures`, `record.related.audioVideo` and `record.related.onDisplayIn`; `DynastyPopout` reads `record.dynasty.heading` (2.3.0) and
|
|
349
352
|
`sheet.field.alsoKnownAs`, `.area`, `.history`. `SourceCredit` reads
|
|
350
353
|
`record.source.label` (2.5.0); the footer attribution (`SiteShell`) reads
|
|
351
354
|
`record.source.rightsHolder` and `.termsOfUse` (2.5.0). `PictureGallery`/
|
|
@@ -353,14 +356,15 @@ every bundle of `@museumwnf/viewer-i18n` from 1.7.0. `GlossaryTool` also reads
|
|
|
353
356
|
`.additionalContent`, `.addRelatedWorks`, `.hideRelatedWorks` and
|
|
354
357
|
`exhibition.related.items`, `.reciprocal`, which only the `exhibition` and
|
|
355
358
|
`standalone` bundles of `@museumwnf/viewer-i18n` carry — a family default
|
|
356
|
-
in
|
|
359
|
+
in the family's entry now, where the two live since 2.18.0 (see
|
|
357
360
|
[Entry points and layers](#entry-points-and-layers)). Every other text is a
|
|
358
361
|
prop.
|
|
359
362
|
|
|
360
363
|
`FeaturedPartners`, `SiblingGalleries`, `PopupLogo`, `PictureGallery` and
|
|
361
|
-
`PictureNarrative` are used only by the DXA family, and
|
|
362
|
-
|
|
363
|
-
|
|
364
|
+
`PictureNarrative` are used only by the DXA family, and live under `/dxa`
|
|
365
|
+
since 2.18.0; their exports here are deprecated aliases until the next
|
|
366
|
+
major. `FeaturedPartners`' heading defaults to `partner.list.featured`
|
|
367
|
+
(viewer-i18n 4.3.0).
|
|
364
368
|
|
|
365
369
|
## Content classes
|
|
366
370
|
|
|
@@ -373,7 +377,7 @@ Building blocks copied from the legacy sites' own `site.css` files, available as
|
|
|
373
377
|
| `.mwnf-form-table` | Table layout for label/value pairs in search and filter forms; header cells left-aligned, data cells right-padded |
|
|
374
378
|
| `.mwnf-button` | Styled button for primary actions; variant `.mwnf-button--secondary` for secondary/destructive actions |
|
|
375
379
|
| `.mwnf-select` | Legacy-styled select element with fixed height and padding |
|
|
376
|
-
| `.mwnf-back-bar` | Container for back-link buttons with standard padding and hover styling |
|
|
380
|
+
| `.mwnf-back-bar` | Container for back-link buttons with standard padding and hover styling; `.mwnf-back-bar--link` is `BackLink`'s `bar` variant, the link itself as the bar (`--mwnf-back-bar-margin`) |
|
|
377
381
|
| `.mwnf-chip` | Inline project/source chip; variants `.mwnf-chip--<family>` where family is one of `ISLandEPM`, `DBA`, `AWE`, `DCA`, `DGA`, `EXH`, or `Galleries`, each with its own project-colour token |
|
|
378
382
|
| `.mwnf-popout` | Detail box for sheet data; used in record detail popups and panels |
|
|
379
383
|
| `.mwnf-loader` | Loading/spinner message container with centered text and standard padding |
|
|
@@ -384,8 +388,9 @@ Building blocks copied from the legacy sites' own `site.css` files, available as
|
|
|
384
388
|
Whole pages, made of the content components on viewer-core's
|
|
385
389
|
composables and driven by a declaration the website writes instead of a
|
|
386
390
|
page. They are the broad page structures every kind of website shares;
|
|
387
|
-
`RecordSheetView`, used only by the DXA family,
|
|
388
|
-
|
|
391
|
+
`RecordSheetView`, used only by the DXA family, is `/dxa`'s `ItemDetailView`
|
|
392
|
+
since 2.18.0, and stays here as a deprecated alias until the next major.
|
|
393
|
+
They are exported from `@museumwnf/viewer-layout/views` — and only from
|
|
389
394
|
there: they read the records and the engine from `@museumwnf/viewer-core`
|
|
390
395
|
itself, whose entry point carries `.vue` files, and a website's test runner
|
|
391
396
|
that loads this package natively would fail on the first one if the package
|
|
@@ -425,7 +430,7 @@ export default {
|
|
|
425
430
|
|
|
426
431
|
| View | Declaration | Slots |
|
|
427
432
|
|---|---|---|
|
|
428
|
-
| `HomeView` | `config.home` or the same as props: `title`, `intro` (Markdown), `cards: [{ title, description, action, to \| href }]`, `featured: { entity, heading, action, route, eyebrow, meta, seed }` — the pick is `useFeaturedRecord` | `before`, default, `after` |
|
|
433
|
+
| `HomeView` | `config.home` or the same as props: `title`, `intro` (Markdown), `cards: [{ title, description, action, to \| href }]`, `featured: { entity, heading, action, route, eyebrow, meta, seed, filter }` — the pick is `useFeaturedRecord`, among the records `filter` keeps (viewer-core 2.2.0) — `panels` (the welcome and the record as `.mwnf-panel` boxes) | `before`, default, `after` |
|
|
429
434
|
| `CatalogueResultsView` | `spec`: `entity`, `keys`, `facets` (viewer-core's facet spec), `facetScope: 'all' \| 'matching'`, `controls: [{ key, type: 'select' \| 'year' \| 'query' \| 'checkbox', label, placeholder, anyLabel, hideEmpty }]`, `filterMode: 'apply' \| 'immediate'`, `scope(record, filters)`, `match(record, filters)`, `narrow(list, filters, helpers)` (a rule over the whole list — a keyword index, say), `dates: { mode, begin, end }`, `sort`, `pageSize`, `variant: 'list' \| 'grid'`, `record(record, helpers)`, `recordRoute`, `summary(context)`, `title`, `filterTitle`, `empty`, `actionLabel`, `pagination` | `before`, `filters`, `actions`, `aside`, `empty`, `after` — each given `{ filters, active, apply, reset, goToPage, matching, pageInfo, options }`, enough to compose the panel in the aside or a second pagination |
|
|
430
435
|
| `RecordView` | `spec` and `id`: `entity`, `translations`, `attribution`, `fields` (viewer-core's `sheetRows` spec, or a function of the context), `sections`, `layout`, `shortDescription`, `media(record, ctx)`, `mediaVariant`, `credits`, `workingNumber`, `citation: { project, permalink: true \| false \| string, heading } \| false` (the permalink is `sourceUrl(currentRoute)` — null, so no address, until the website declares `site.origin` — unless the spec disables it with `false` or overrides it with a string), `related: { variant, heading, record, route } \| false`, `back: { label, to \| href }`, `title(ctx)` | `header`, `before-sheet`, `after-sheet`, `aside`, `source` (under the citation; default `SourceCredit`), `related`, `after`, and one named after every `custom` or `link` row — each given `{ record, text, language, languages, select, dir, glossary, ready, attribution, t, tr }`; `related` also `records` (the rows) and `outside` (the related records the package does not carry) |
|
|
431
436
|
| `RecordSheetView` | Every `RecordView` prop (`spec`, `id`, `entity`) plus `dataGetter(id) => record \| null \| undefined` — a website's own language-subset record lookup (an exhibition's per-build `itemById.get`); omitted, every `id` `RecordView` itself finds is treated as present (the gallery shape); supplied and it reports `id` missing, `NotFoundView` renders before `RecordView` ever mounts (the exhibition shape's per-language-build 404), and it also narrows the related block's `records`/outside-reference split the same way. The DXA gallery/exhibition item sheet's own blocks, on top of `spec`: `sourceDatabase: { label?, chipClass(record, ctx), addToCollection: { label? } \| false } \| false` (the source-database line + `backward_compatibility` code + "add to my collection" link — `chipClass` is a site's own project→colour map, the name comes from `useProjects()`), `notice: { show(record, ctx), label } \| false` (the Explore-partner notice), `museum: { route(partnerId, ctx) } \| false` (the holding-museum row: the item's holder text, then the partner as `PartnerPanel`'s `summary` — "About {name}, {city}, {country}" — linked through `route`; `route` returning null keeps the name without a link, for a hidden partner; `false` keeps the holder text alone; decision D3), and on `spec.related`: `title`, `description` (entries, above the block), `notInPackageLabel`, `outsideChip(ref, ctx)` (an outside reference's chip — `TODO(#1727)`, no `project_id` on a stub yet), `artisticIntroductionLabel` (with `useProjects().links(record.project_id).artisticIntroductionUrl`), `databaseLabel` (ditto, `.relatedDatabaseUrl`), `overallDatabase: { label, linkLabel } \| false` (`mwnfLinks.overallDatabase`), `onDisplayIn: { linkPendingLabel } \| false` (`record.gallery_references`, by `kind`), `download: false` (default on, `record.action.download`/`.downloadPdf`, prints), `glossary: false` (default on, `GlossaryTool`), `dynasties(record, language, ctx) => { records, tr } \| null` (`DynastyList`), `media: false` (default on, `record.media`, a `SheetSection`), `timeline(record, ctx) => TimelineInfo \| null` (`TimelineLookup` — see `docs/slot-catalogue.md`) | Every `RecordView` slot, forwarded straight through by name, unmodified, **except** `before-sheet`/`museum`/`related`: each always has this view's own default content (above), which a website's own slot still replaces entirely — "a slot fills, the default content renders otherwise" |
|
|
@@ -503,24 +508,49 @@ it, and a website can still replace any family page with its own component
|
|
|
503
508
|
on the same route name. Texts stay in `@museumwnf/viewer-i18n`'s `gallery`
|
|
504
509
|
and `exhibition` sections.
|
|
505
510
|
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
families: `PartnerDetail`, the partner page (`PartnerPanel`'s `full`
|
|
509
|
-
variant), fed by each family's own half — `galleryPartnerDetail` /
|
|
510
|
-
`exhibitionPartnerDetail`, which `standardRoutes` passes as its `family`
|
|
511
|
-
prop; `GalleryPartnerProfile`/`ExhibitionPartnerProfile` are the same page
|
|
512
|
-
under their old names.
|
|
511
|
+
Since 2.18.0 it holds a whole DXA site but its values. A gallery's or an
|
|
512
|
+
exhibition's `dataset.config.js` is one call:
|
|
513
513
|
|
|
514
514
|
```js
|
|
515
|
-
import {
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
515
|
+
import { galleryConfig } from '@museumwnf/viewer-layout/dxa'
|
|
516
|
+
|
|
517
|
+
export default galleryConfig({
|
|
518
|
+
datasetPackage: '@museumwnf/carpets-data',
|
|
519
|
+
siteName: 'Carpets', // for a package without manifest.site
|
|
520
|
+
origin: 'https://museumwithnofrontiers.github.io/carpets',
|
|
521
|
+
projectColors: { '<project id>': 'mwnf-chip--DCA' }, // one of the mwnf-chip--* classes
|
|
522
|
+
noticeProjects: ['<project id>'], // sheets with the Explore-partner notice
|
|
523
|
+
creditsBody: 'carpets.credits.body',
|
|
524
|
+
})
|
|
522
525
|
```
|
|
523
526
|
|
|
527
|
+
`exhibitionConfig` takes the same values (and `partnerObjects`, overrides of
|
|
528
|
+
the shared `exhibition.partnerObjects.*` entries). The config carries the
|
|
529
|
+
family's shell (`GalleryShell` / `ExhibitionShell`), menu, banner, sponsor
|
|
530
|
+
strip, legacy redirects, and every page through
|
|
531
|
+
`standardRoutes(family, { pages: true, … })`:
|
|
532
|
+
|
|
533
|
+
- the eleven pages every site of a family already served from here
|
|
534
|
+
(search, partners, partner and institution pages, timeline results and
|
|
535
|
+
gallery, collection search and results, and a gallery's about and
|
|
536
|
+
credits);
|
|
537
|
+
- with `pages: true`, the pages each site used to carry itself: the home
|
|
538
|
+
page, the item page (`GalleryItemDetail` / `ExhibitionItemDetail`, on
|
|
539
|
+
`ItemDetailView` and viewer-core's `useGalleryItemDetail` /
|
|
540
|
+
`useExhibitionItemDetail`), the timeline entrance, and an exhibition's
|
|
541
|
+
about page, themes, theme pages, theme galleries, related content and
|
|
542
|
+
credits.
|
|
543
|
+
|
|
544
|
+
One page serves both families: `PartnerDetail`, the partner page
|
|
545
|
+
(`PartnerPanel`'s `full` variant), fed by each family's own half —
|
|
546
|
+
`galleryPartnerDetail` / `exhibitionPartnerDetail`, which `standardRoutes`
|
|
547
|
+
passes as its `family` prop; `GalleryPartnerProfile` /
|
|
548
|
+
`ExhibitionPartnerProfile` are the same page under their old names.
|
|
549
|
+
|
|
550
|
+
An exhibition's theme pages read its three theme colours as
|
|
551
|
+
`--mwnf-dxa-theme-*` tokens; a record with no project gets the
|
|
552
|
+
`mwnf-chip--Explore` chip.
|
|
553
|
+
|
|
524
554
|
Route names and paths are pinned to what every live DXA site already
|
|
525
555
|
registers, so adopting the factory keeps every existing deep link (and
|
|
526
556
|
every `legacyRoutes` resolver targeting those names) working unmodified.
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { T as e } from "./OnDisplayIn-D6r_KvpI.js";
|
|
2
|
+
import { Fragment as t, computed as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createVNode as o, openBlock as s, renderList as c, renderSlot as l, toDisplayString as u, useSlots as d, withCtx as f } from "vue";
|
|
3
|
+
//#region src/content/FeaturedRecord.vue
|
|
4
|
+
var p = {
|
|
5
|
+
key: 0,
|
|
6
|
+
class: "mwnf-featured"
|
|
7
|
+
}, m = {
|
|
8
|
+
key: 0,
|
|
9
|
+
class: "mwnf-featured__heading"
|
|
10
|
+
}, h = {
|
|
11
|
+
key: 0,
|
|
12
|
+
class: "mwnf-featured__media"
|
|
13
|
+
}, g = ["src", "alt"], _ = { class: "mwnf-featured__body" }, v = {
|
|
14
|
+
key: 0,
|
|
15
|
+
class: "mwnf-featured__eyebrow"
|
|
16
|
+
}, y = ["innerHTML"], b = {
|
|
17
|
+
key: 1,
|
|
18
|
+
class: "mwnf-featured__action"
|
|
19
|
+
}, x = {
|
|
20
|
+
__name: "FeaturedRecord",
|
|
21
|
+
props: {
|
|
22
|
+
image: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: ""
|
|
25
|
+
},
|
|
26
|
+
imageAlt: {
|
|
27
|
+
type: String,
|
|
28
|
+
default: ""
|
|
29
|
+
},
|
|
30
|
+
eyebrow: {
|
|
31
|
+
type: String,
|
|
32
|
+
default: ""
|
|
33
|
+
},
|
|
34
|
+
name: {
|
|
35
|
+
type: String,
|
|
36
|
+
default: ""
|
|
37
|
+
},
|
|
38
|
+
meta: {
|
|
39
|
+
type: Array,
|
|
40
|
+
default: () => []
|
|
41
|
+
},
|
|
42
|
+
action: {
|
|
43
|
+
type: String,
|
|
44
|
+
default: ""
|
|
45
|
+
},
|
|
46
|
+
to: {
|
|
47
|
+
type: [String, Object],
|
|
48
|
+
default: null
|
|
49
|
+
},
|
|
50
|
+
href: {
|
|
51
|
+
type: String,
|
|
52
|
+
default: ""
|
|
53
|
+
},
|
|
54
|
+
heading: {
|
|
55
|
+
type: String,
|
|
56
|
+
default: ""
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
setup(x) {
|
|
60
|
+
let S = x, C = d(), w = n(() => !!(S.name || S.image || C.default));
|
|
61
|
+
return (n, d) => w.value ? (s(), i("section", p, [x.heading ? (s(), i("h2", m, u(x.heading), 1)) : r("", !0), l(n.$slots, "default", {}, () => [o(e, {
|
|
62
|
+
class: "mwnf-featured__link",
|
|
63
|
+
to: x.to,
|
|
64
|
+
href: x.href
|
|
65
|
+
}, {
|
|
66
|
+
default: f(() => [x.image ? (s(), i("span", h, [a("img", {
|
|
67
|
+
class: "mwnf-featured__image",
|
|
68
|
+
src: x.image,
|
|
69
|
+
alt: x.imageAlt,
|
|
70
|
+
loading: "eager"
|
|
71
|
+
}, null, 8, g)])) : r("", !0), a("span", _, [
|
|
72
|
+
x.eyebrow ? (s(), i("span", v, u(x.eyebrow), 1)) : r("", !0),
|
|
73
|
+
a("span", {
|
|
74
|
+
class: "mwnf-featured__name",
|
|
75
|
+
innerHTML: x.name
|
|
76
|
+
}, null, 8, y),
|
|
77
|
+
(s(!0), i(t, null, c(x.meta, (e, t) => (s(), i("span", {
|
|
78
|
+
key: t,
|
|
79
|
+
class: "mwnf-featured__meta"
|
|
80
|
+
}, u(e), 1))), 128)),
|
|
81
|
+
x.action ? (s(), i("span", b, u(x.action) + " →", 1)) : r("", !0)
|
|
82
|
+
])]),
|
|
83
|
+
_: 1
|
|
84
|
+
}, 8, ["to", "href"])])])) : r("", !0);
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
//#endregion
|
|
88
|
+
export { x as t };
|