@explorer-1/vue 1.1.15 → 1.1.17

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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @explorer-1/vue
2
2
 
3
+ ## 1.1.17
4
+
5
+ ### Patch Changes
6
+
7
+ - 873cf1d: Fixing bug in AttractionCard with nested BaseLink components
8
+
9
+ ## 1.1.16
10
+
11
+ ### Patch Changes
12
+
13
+ - b50fa5b: Fixing attraction theme labels'
14
+
3
15
  ## 1.1.15
4
16
 
5
17
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@explorer-1/vue",
3
- "version": "1.1.15",
3
+ "version": "1.1.17",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -94,7 +94,7 @@ const props = defineProps({
94
94
  >
95
95
  <div class="col-span-9">
96
96
  <div
97
- v-if="theme"
97
+ v-if="props.theme"
98
98
  class="text-subtitle-sm md:text-subtitle mb-3 md:mb-5 text-gray-mid-dark"
99
99
  >
100
100
  {{ props.theme }}
@@ -121,6 +121,7 @@ const props = defineProps({
121
121
  </div>
122
122
  <BaseLink
123
123
  v-if="props.url"
124
+ custom-element-type="div"
124
125
  class="mt-5"
125
126
  variant="primary"
126
127
  :href="props.url"
@@ -135,7 +136,7 @@ const props = defineProps({
135
136
  >
136
137
  <BaseImagePlaceholder aspect-ratio="square">
137
138
  <BaseImage
138
- v-if="props.image.src"
139
+ v-if="props.image?.src"
139
140
  :src="props.image.src.url"
140
141
  :width="props.image.src.width"
141
142
  :height="props.image.src.height"
@@ -154,6 +155,7 @@ const props = defineProps({
154
155
  </div>
155
156
  <BaseLink
156
157
  v-if="props.url"
158
+ custom-element-type="div"
157
159
  class="mt-5"
158
160
  variant="primary"
159
161
  :href="props.url"
@@ -30,6 +30,13 @@ export default defineComponent({
30
30
  MixinAnimationCaret
31
31
  },
32
32
  props: {
33
+ /** Override html element (useful for things that should look like a link but aren't links) */
34
+ customElementType: {
35
+ type: String,
36
+ default: undefined,
37
+ validator: (prop: string): boolean => ['span', 'button', 'div'].includes(prop)
38
+ },
39
+ /** Style of link: primary, secondary, default, none */
33
40
  variant: {
34
41
  type: String as PropType<VariantsKey>,
35
42
  required: false,
@@ -263,7 +270,8 @@ export default defineComponent({
263
270
  <template>
264
271
  <div>
265
272
  <!-- annoyingly repetive due to complexities around `to` and @click.native -->
266
- <nuxt-link
273
+ <component
274
+ :is="customElementType || 'nuxt-link'"
267
275
  v-if="computedTo"
268
276
  class="group"
269
277
  :class="computedClass"
@@ -302,8 +310,9 @@ export default defineComponent({
302
310
  <template v-else>
303
311
  <slot></slot>
304
312
  </template>
305
- </nuxt-link>
306
- <a
313
+ </component>
314
+ <component
315
+ :is="customElementType || 'a'"
307
316
  v-else-if="computedHref"
308
317
  :href="computedHref"
309
318
  class="group"
@@ -341,6 +350,6 @@ export default defineComponent({
341
350
  <template v-else>
342
351
  <slot></slot>
343
352
  </template>
344
- </a>
353
+ </component>
345
354
  </div>
346
355
  </template>
@@ -283,7 +283,7 @@ export default defineComponent({
283
283
  : undefined
284
284
  page.theme =
285
285
  handle === 'explore_jpl_sites_explorejplsite'
286
- ? page._source[handle + '__theme_type_filter']
286
+ ? page._source[handle + '__theme_type_label']
287
287
  : undefined
288
288
  if (image) {
289
289
  page.image = {
package/src/interfaces.ts CHANGED
@@ -358,6 +358,7 @@ export interface PageObject {
358
358
  waitTimeLabel?: string
359
359
  relatedPagesForMoreSection?: any
360
360
  id?: string
361
+ themeTypeLabel?: string
361
362
  }
362
363
 
363
364
  export interface EduResourcesSubject {
@@ -22,6 +22,7 @@ export const ExploreAppSitePageData = {
22
22
  title: 'Sites',
23
23
  displayLabel: 'Explore JPL',
24
24
  showShareLinks: false,
25
+ themeTypeLabel: 'Missions That Changed the World',
25
26
  thumbnailImage: {
26
27
  original: 'https://picsum.photos/512/288',
27
28
  src: {
@@ -54,6 +54,7 @@ const mapPath = computed(() => {
54
54
  <LayoutHelper indent="col-2">
55
55
  <DetailHeadline
56
56
  :title="data.title"
57
+ :label="data.themeTypeLabel"
57
58
  class="my-5 lg:mt-10"
58
59
  />
59
60
  <MetadataStacked