@museumwnf/viewer-core 2.4.0 → 2.5.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@museumwnf/viewer-core",
3
- "version": "2.4.0",
3
+ "version": "2.5.1",
4
4
  "description": "Application engine for MWNF websites: turns a dataset.config.js into a mounted Vue application.",
5
5
  "type": "module",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -156,14 +156,14 @@ export function useExhibitionCollection(data, config = {}) {
156
156
  pageSize: PAGE_SIZE,
157
157
  variant: 'grid',
158
158
  recordRoute: 'item',
159
- actionLabel: 'exhibition.action.seeDatabaseEntry',
159
+ actionLabel: 'catalogue.results.seeDatabaseEntry',
160
160
  empty: 'catalogue.results.noResults',
161
161
  pagination: { jump: true },
162
162
 
163
163
  record: (item, { t }) => tile(item, t),
164
164
 
165
165
  summary: ({ filters, pageInfo, t }) => [
166
- { label: t('exhibition.section.collection'), value: filterSummary(filters, t) },
166
+ { label: t('core.section.collection'), value: filterSummary(filters, t) },
167
167
  { count: pageInfo.total, value: `${t('catalogue.results.outOf')} ${itemById.value.size} ${t('catalogue.results.objects')}` },
168
168
  ],
169
169
  }
@@ -79,7 +79,7 @@ export function useExhibitionItemDetail(data, timeline) {
79
79
 
80
80
  notice: {
81
81
  show: (record) => (useSiteConfig().noticeProjects ?? []).includes(record.project_id),
82
- label: 'exhibition.item.explorePartnerNote',
82
+ label: 'partner.item.explorePartnerNote',
83
83
  },
84
84
 
85
85
  // A hidden museum keeps its name on the sheet and loses the link: it has
@@ -95,14 +95,14 @@ export function useExhibitionItemDetail(data, timeline) {
95
95
 
96
96
  related: {
97
97
  ...platformSheet.related,
98
- title: 'exhibition.related.title',
99
- description: 'exhibition.related.description',
98
+ title: 'record.related.title',
99
+ description: 'record.related.description',
100
100
  outsideChip: (ref) => chipClass(ref),
101
101
  notInPackageLabel: 'exhibition.results.notInThisExhibition',
102
- artisticIntroductionLabel: 'exhibition.nav.artisticIntroduction',
103
- databaseLabel: 'exhibition.search.relatedDatabase',
104
- overallDatabase: { label: 'exhibition.search.overallDatabase', linkLabel: 'exhibition.nav.overallDatabase' },
105
- onDisplayIn: { linkPendingLabel: 'exhibition.item.linkPending' },
102
+ artisticIntroductionLabel: 'core.nav.artisticIntroduction',
103
+ databaseLabel: 'catalogue.search.relatedDatabase',
104
+ overallDatabase: { label: 'catalogue.search.overallDatabase', linkLabel: 'core.nav.overallDatabase' },
105
+ onDisplayIn: { linkPendingLabel: 'record.related.linkPending' },
106
106
  dynasties: (record, language) => ({
107
107
  records: dynastiesWithHistory(record, language),
108
108
  tr: (d) => dynastyTr(d, language),
@@ -115,7 +115,7 @@ export function useExhibitionItemDetail(data, timeline) {
115
115
  const range = roundOutward(record.start_date, record.end_date)
116
116
  if (range[0] == null) return null
117
117
  return {
118
- heading: 'exhibition.section.timeline',
118
+ heading: 'core.section.timeline',
119
119
  countries: timelineCountries.value.map((c) => ({ value: c.value, label: c.label ?? ctx.t('timeline.form.allCountries') })),
120
120
  defaultCountry: () => countryOf(record.country_id) ?? 'all',
121
121
  events: (country) => findEvents({ country, begin: range[0], end: range[1] }),
@@ -113,7 +113,7 @@ export function useExhibitionSheet(data, config = {}) {
113
113
  related: {
114
114
  variant: 'grid',
115
115
  heading: 'exhibition.related.objects',
116
- actionLabel: 'exhibition.action.seeDatabaseEntry',
116
+ actionLabel: 'catalogue.results.seeDatabaseEntry',
117
117
  record: ({ record: other, justification }) => ({
118
118
  id: other.id,
119
119
  image: other.images?.[0]?.url ?? '',
@@ -144,7 +144,7 @@ export function useExhibitionTimeline(data, collection, config = {}) {
144
144
  pageSize: PAGE_SIZE,
145
145
  variant: 'grid',
146
146
  recordRoute: 'item',
147
- actionLabel: 'exhibition.action.seeDatabaseEntry',
147
+ actionLabel: 'catalogue.results.seeDatabaseEntry',
148
148
  empty: 'exhibition.results.noObjectsInPeriod',
149
149
  record: (item, { t }) => tile(item, t),
150
150
  summary: ({ filters, pageInfo, t }) => [
@@ -153,14 +153,14 @@ export function useGalleryCollection(data, config = {}) {
153
153
  pageSize: PAGE_SIZE,
154
154
  variant: 'grid',
155
155
  recordRoute: 'item',
156
- actionLabel: 'gallery.action.seeDatabaseEntry',
156
+ actionLabel: 'catalogue.results.seeDatabaseEntry',
157
157
  empty: 'catalogue.results.noResults',
158
158
  pagination: { jump: true },
159
159
 
160
160
  record: (item, { t }) => tile(item, t),
161
161
 
162
162
  summary: ({ filters, pageInfo, t, total }) => [
163
- { label: t('gallery.section.collection'), value: filterSummary(filters, t) },
163
+ { label: t('core.section.collection'), value: filterSummary(filters, t) },
164
164
  { count: pageInfo.total, value: `${t('catalogue.results.outOf')} ${total} ${t('catalogue.results.objects')}` },
165
165
  ],
166
166
  }
@@ -61,7 +61,7 @@ export function useGalleryItemDetail(data, timeline) {
61
61
  const [from, to] = roundOutward(record.start_date, record.end_date)
62
62
  if (from == null) return null
63
63
  return {
64
- heading: 'gallery.section.timeline',
64
+ heading: 'core.section.timeline',
65
65
  countries: timelineCountries.value.map((c) => ({ value: c.value, label: c.label ?? ctx.t('timeline.form.allCountries') })),
66
66
  defaultCountry: () => {
67
67
  for (const { value: code } of timelineCountries.value) {
@@ -83,7 +83,7 @@ export function useGalleryItemDetail(data, timeline) {
83
83
  },
84
84
  notice: {
85
85
  show: (record) => (useSiteConfig().noticeProjects ?? []).includes(record.project_id),
86
- label: 'gallery.item.explorePartnerNote',
86
+ label: 'partner.item.explorePartnerNote',
87
87
  },
88
88
  museum: {
89
89
  route: (partnerId) => museumRoute(partnerId),
@@ -91,16 +91,16 @@ export function useGalleryItemDetail(data, timeline) {
91
91
  },
92
92
  related: {
93
93
  ...platformSheet.related,
94
- title: 'gallery.related.title',
95
- description: 'gallery.related.description',
94
+ title: 'record.related.title',
95
+ description: 'record.related.description',
96
96
  notInPackageLabel: 'gallery.results.notInThisGallery',
97
97
  // An outside `related_items` reference carries its `project_id`
98
98
  // (inventory-app#1807), so it reads the same `projectColors` map.
99
99
  outsideChip: chipClass,
100
- artisticIntroductionLabel: 'gallery.nav.artisticIntroduction',
101
- databaseLabel: 'gallery.search.relatedDatabase',
102
- overallDatabase: { label: 'gallery.search.overallDatabase', linkLabel: 'gallery.nav.overallDatabase' },
103
- onDisplayIn: { linkPendingLabel: 'gallery.item.linkPending' },
100
+ artisticIntroductionLabel: 'core.nav.artisticIntroduction',
101
+ databaseLabel: 'catalogue.search.relatedDatabase',
102
+ overallDatabase: { label: 'catalogue.search.overallDatabase', linkLabel: 'core.nav.overallDatabase' },
103
+ onDisplayIn: { linkPendingLabel: 'record.related.linkPending' },
104
104
  dynasties: (record, language) => itemDynasties(record, language),
105
105
  timeline: itemTimeline,
106
106
  },
@@ -66,7 +66,7 @@ export function useGalleryPartner(data, collection, config = {}) {
66
66
  pageSize: PAGE_SIZE,
67
67
  variant: 'grid',
68
68
  recordRoute: 'item',
69
- actionLabel: 'gallery.action.seeDatabaseEntry',
69
+ actionLabel: 'catalogue.results.seeDatabaseEntry',
70
70
  empty: 'gallery.partner.noObjects',
71
71
  pagination: { jump: true },
72
72
  record: (item, { t }) => tile(item, t),
@@ -105,7 +105,7 @@ export function useGallerySheet(data, config = {}) {
105
105
  related: {
106
106
  variant: 'grid',
107
107
  heading: 'record.related.items',
108
- actionLabel: 'gallery.action.seeDatabaseEntry',
108
+ actionLabel: 'catalogue.results.seeDatabaseEntry',
109
109
  record: ({ record: other, justification }) => ({
110
110
  id: other.id,
111
111
  image: other.images?.[0]?.url ?? '',
@@ -112,7 +112,7 @@ export function useGalleryTimeline(data, collection, config = {}) {
112
112
  pageSize: PAGE_SIZE,
113
113
  variant: 'grid',
114
114
  recordRoute: 'item',
115
- actionLabel: 'gallery.action.seeDatabaseEntry',
115
+ actionLabel: 'catalogue.results.seeDatabaseEntry',
116
116
  empty: 'gallery.results.noObjectsInPeriod',
117
117
  pagination: { jump: true },
118
118