@explorer-1/vue 1.1.0 → 1.1.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.
Files changed (188) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/components.d.ts +10 -2
  3. package/dist/explorer-1-vue.css +1 -1
  4. package/dist/explorer-1-vue.js +43157 -41849
  5. package/dist/explorer-1-vue.umd.cjs +44 -44
  6. package/dist/src/components/AsteroidWatchWidget/AsteroidWatchWidget.vue.d.ts +44 -0
  7. package/dist/src/components/AttractionCard/AttractionCard.vue.d.ts +146 -0
  8. package/dist/src/components/BaseButton/BaseButton.stories.d.ts +2 -2
  9. package/dist/src/components/BaseImageCaption/BaseImageCaption.vue.d.ts +44 -0
  10. package/dist/src/components/BaseLink/BaseLink.stories.d.ts +8 -0
  11. package/dist/src/components/BaseLink/BaseLink.vue.d.ts +50 -2
  12. package/dist/src/components/BlockCardGrid/BlockCardGrid.vue.d.ts +88 -0
  13. package/dist/src/components/BlockCardGridItem/BlockCardGridItem.vue.d.ts +44 -0
  14. package/dist/src/components/BlockCsrTable/BlockCsrTable.stories.d.ts +1 -1
  15. package/dist/src/components/BlockCsrTable/{CsrTestLimits.vue.d.ts → CsrDetails.vue.d.ts} +2 -2
  16. package/dist/src/components/BlockIframeEmbed/BlockIframeEmbed.vue.d.ts +44 -0
  17. package/dist/src/components/BlockImage/BlockImage.stories.d.ts +528 -0
  18. package/dist/src/components/BlockImage/BlockImage.vue.d.ts +88 -0
  19. package/dist/src/components/BlockImage/BlockImageFullBleed.vue.d.ts +44 -0
  20. package/dist/src/components/BlockImage/BlockImageStandard.vue.d.ts +44 -0
  21. package/dist/src/components/BlockImageCarousel/BlockImageCarousel.vue.d.ts +44 -0
  22. package/dist/src/components/BlockImageCarouselItem/BlockImageCarouselItem.vue.d.ts +44 -0
  23. package/dist/src/components/BlockImageComparison/BlockImageComparison.vue.d.ts +44 -0
  24. package/dist/src/components/BlockImageGallery/BlockImageGallery.vue.d.ts +44 -0
  25. package/dist/src/components/BlockInlineImage/BlockInlineImage.vue.d.ts +44 -0
  26. package/dist/src/components/BlockLinkCard/BlockLinkCard.vue.d.ts +44 -0
  27. package/dist/src/components/BlockLinkCarousel/BlockLinkCarousel.stories.d.ts +132 -0
  28. package/dist/src/components/BlockLinkCarousel/BlockLinkCarousel.vue.d.ts +132 -0
  29. package/dist/src/components/BlockLinkTile/BlockLinkTile.vue.d.ts +44 -0
  30. package/dist/src/components/BlockListCards/BlockListCards.vue.d.ts +44 -0
  31. package/dist/src/components/BlockQuote/BlockQuote.stories.d.ts +220 -0
  32. package/dist/src/components/BlockQuote/BlockQuote.vue.d.ts +44 -0
  33. package/dist/src/components/BlockRelatedLinks/BlockRelatedLinks.vue.d.ts +44 -0
  34. package/dist/src/components/BlockRelatedLinks/RelatedLink.vue.d.ts +44 -0
  35. package/dist/src/components/BlockRichTable/BlockRichTable.vue.d.ts +44 -0
  36. package/dist/src/components/BlockStreamfield/BlockStreamfield.stories.d.ts +2 -2
  37. package/dist/src/components/BlockStreamfield/BlockStreamfield.vue.d.ts +792 -0
  38. package/dist/src/components/BlockVideo/BlockVideo.vue.d.ts +44 -0
  39. package/dist/src/components/BlockVideoEmbed/BlockVideoEmbed.vue.d.ts +44 -0
  40. package/dist/src/components/DetailHeadline/DetailHeadline.vue.d.ts +44 -0
  41. package/dist/src/components/DsnWidget/DsnWidget.vue.d.ts +44 -0
  42. package/dist/src/components/EventCard/EventCard.vue.d.ts +44 -0
  43. package/dist/src/components/HeroListingIndex/HeroListingIndex.vue.d.ts +44 -0
  44. package/dist/src/components/HeroMedia/HeroMedia.vue.d.ts +44 -0
  45. package/dist/src/components/HeroMedium/HeroMedium.vue.d.ts +44 -0
  46. package/dist/src/components/HomepageCarousel/HomepageCarousel.vue.d.ts +88 -0
  47. package/dist/src/components/HomepageCarouselItem/HomepageCarouselItem.vue.d.ts +44 -0
  48. package/dist/src/components/HomepageEmbedBlock/HomepageEmbedBlock.vue.d.ts +44 -0
  49. package/dist/src/components/HomepageMissionsCarousel/HomepageMissionsCarousel.stories.d.ts +44 -0
  50. package/dist/src/components/HomepageMissionsCarousel/HomepageMissionsCarousel.vue.d.ts +88 -0
  51. package/dist/src/components/HomepageMissionsCarousel/HomepageMissionsCarouselItem.vue.d.ts +44 -0
  52. package/dist/src/components/HomepageStats/HomepageStats.stories.d.ts +528 -0
  53. package/dist/src/components/HomepageStats/HomepageStats.vue.d.ts +88 -0
  54. package/dist/src/components/HomepageTeaserBlock/HomepageTeaserBlock.vue.d.ts +44 -0
  55. package/dist/src/components/Icons/IconBookmark.vue.d.ts +2 -0
  56. package/dist/src/components/Icons/IconHourglass.vue.d.ts +2 -0
  57. package/dist/src/components/Icons/IconLocationCrosshairs.vue.d.ts +2 -0
  58. package/dist/src/components/Icons/IconMap.vue.d.ts +2 -0
  59. package/dist/src/components/Icons/Icons.stories.d.ts +33 -0
  60. package/dist/src/components/MetadataStacked/MetadataStacked.stories.d.ts +18 -0
  61. package/dist/src/components/MetadataStacked/MetadataStacked.vue.d.ts +65 -0
  62. package/dist/src/components/MissionDetailHighlights/MissionDetailHighlights.vue.d.ts +44 -0
  63. package/dist/src/components/MissionDetailHighlights/MissionDetailHighlightsCarousel.vue.d.ts +44 -0
  64. package/dist/src/components/MissionDetailHighlights/MissionDetailHighlightsCarouselItem.vue.d.ts +44 -0
  65. package/dist/src/components/MissionDetailInlineImage/MissionDetailInlineImage.vue.d.ts +44 -0
  66. package/dist/src/components/MissionDetailStreamfield/MissionDetailStreamfield.vue.d.ts +132 -0
  67. package/dist/src/components/MixinAnimationCaret/MixinAnimationCaret.stories.d.ts +22 -0
  68. package/dist/src/components/MixinAnimationCaret/MixinAnimationCaret.vue.d.ts +26 -0
  69. package/dist/src/components/MixinCarousel/MixinCarousel.stories.d.ts +88 -0
  70. package/dist/src/components/MixinCarousel/MixinCarousel.vue.d.ts +44 -0
  71. package/dist/src/components/NavDesktop/NavDesktop.stories.d.ts +1188 -0
  72. package/dist/src/components/NavDesktop/NavDesktop.vue.d.ts +352 -0
  73. package/dist/src/components/NavDesktop/NavDesktopDropdownContent.vue.d.ts +132 -0
  74. package/dist/src/components/NavDesktop/NavDesktopDropdownMore.vue.d.ts +176 -0
  75. package/dist/src/components/NavDesktop/NavDesktopTopHat.vue.d.ts +44 -0
  76. package/dist/src/components/NavDesktopEdu/NavDesktopEdu.stories.d.ts +220 -0
  77. package/dist/src/components/NavDesktopEdu/NavDesktopEdu.vue.d.ts +220 -0
  78. package/dist/src/components/NavHeading/NavHeading.vue.d.ts +44 -0
  79. package/dist/src/components/NavHighlight/NavHighlight.vue.d.ts +44 -0
  80. package/dist/src/components/NavJumpMenu/NavJumpMenu.vue.d.ts +98 -0
  81. package/dist/src/components/NavJumpMenu/NavJumpMenuContent.vue.d.ts +44 -0
  82. package/dist/src/components/NavLinkList/NavLinkList.vue.d.ts +88 -0
  83. package/dist/src/components/NavLogoLinks/NavLogoLinks.stories.d.ts +44 -0
  84. package/dist/src/components/NavLogoLinks/NavLogoLinks.vue.d.ts +44 -0
  85. package/dist/src/components/NavMobile/NavMobile.stories.d.ts +968 -0
  86. package/dist/src/components/NavMobile/NavMobile.vue.d.ts +220 -0
  87. package/dist/src/components/NavMobile/NavMobileDropdown.vue.d.ts +88 -0
  88. package/dist/src/components/NavMobile/NavMobileEdu.stories.d.ts +660 -0
  89. package/dist/src/components/NavMobile/NavMobileLink.vue.d.ts +44 -0
  90. package/dist/src/components/NavMobile/NavMobileSecondaryDropdown.vue.d.ts +44 -0
  91. package/dist/src/components/NavSecondary/NavSecondary.vue.d.ts +105 -0
  92. package/dist/src/components/NavSecondary/NavSecondaryDropdown.vue.d.ts +44 -0
  93. package/dist/src/components/NavSecondary/NavSecondaryDropdownContent.vue.d.ts +44 -0
  94. package/dist/src/components/NavSecondary/NavSecondaryLink.vue.d.ts +44 -0
  95. package/dist/src/components/PastEventsCarousel/PastEventsCarousel.vue.d.ts +88 -0
  96. package/dist/src/components/PodcastEpisodeCard/PodcastEpisodeCard.vue.d.ts +44 -0
  97. package/dist/src/components/PodcastSeriesCarousel/PodcastSeriesCarousel.vue.d.ts +176 -0
  98. package/dist/src/components/SearchResultCard/SearchResultCard.stories.d.ts +11 -0
  99. package/dist/src/components/SearchResultCard/SearchResultCard.vue.d.ts +310 -0
  100. package/dist/src/components/SearchResultGridItem/SearchResultGridItem.vue.d.ts +132 -0
  101. package/dist/src/components/SearchResultsList/SearchResultsList.stories.d.ts +191 -0
  102. package/dist/src/components/SearchResultsList/SearchResultsList.vue.d.ts +451 -0
  103. package/dist/src/components/SwimlaneCTA/SwimlaneCTA.vue.d.ts +44 -0
  104. package/dist/src/components/TheFooter/TheFooter.vue.d.ts +44 -0
  105. package/dist/src/components/ThumbnailCarousel/ThumbnailCarousel.vue.d.ts +176 -0
  106. package/dist/src/components/TimelineDialog/TimelineDialog.stories.d.ts +88 -0
  107. package/dist/src/components/TimelineDialog/TimelineDialog.vue.d.ts +88 -0
  108. package/dist/src/components/TopicDetailMissionCarousel/TopicDetailMissionCarousel.vue.d.ts +88 -0
  109. package/dist/src/components/TopicDetailMissionCarouselItem/TopicDetailMissionCarouselItem.vue.d.ts +44 -0
  110. package/dist/src/components/TopicDetailMore/TopicDetailMore.stories.d.ts +44 -0
  111. package/dist/src/components/TopicDetailMore/TopicDetailMore.vue.d.ts +44 -0
  112. package/dist/src/components/TopicDetailMoreItem/TopicDetailMoreItem.vue.d.ts +44 -0
  113. package/dist/src/components/TopicDetailStreamfield/TopicDetailStreamfield.vue.d.ts +132 -0
  114. package/dist/src/interfaces.d.ts +36 -1
  115. package/dist/src/templates/PageAudioDetail/PageAudioDetail.vue.d.ts +440 -0
  116. package/dist/src/templates/PageContent/PageContent.vue.d.ts +1199 -0
  117. package/dist/src/templates/PageEventDetail/PageEventDetail.vue.d.ts +1012 -0
  118. package/dist/src/templates/PageImageDetail/PageImageDetail.vue.d.ts +1188 -0
  119. package/dist/src/templates/PageNewsDetail/PageNewsDetail.vue.d.ts +1056 -0
  120. package/dist/src/templates/PageVideoDetail/PageVideoDetail.vue.d.ts +220 -0
  121. package/dist/src/templates/edu/PageEduCollectionsDetail/PageEduCollectionsDetail.vue.d.ts +98 -0
  122. package/dist/src/templates/edu/PageEduEventDetail/PageEduEventDetail.vue.d.ts +1012 -0
  123. package/dist/src/templates/edu/PageEduExplainerArticle/PageEduExplainerArticle.vue.d.ts +1154 -0
  124. package/dist/src/templates/edu/PageEduLesson/PageEduLesson.vue.d.ts +98 -0
  125. package/dist/src/templates/edu/PageEduNewsDetail/PageEduNewsDetail.vue.d.ts +98 -0
  126. package/dist/src/templates/edu/PageEduStudentProject/PageEduStudentProject.vue.d.ts +98 -0
  127. package/dist/src/templates/edu/PageEduTeachableMoment/PageEduTeachableMoment.vue.d.ts +98 -0
  128. package/dist/src/templates/explore-jpl/BaseExploreApp/BaseExploreApp.stories.d.ts +21 -0
  129. package/dist/src/templates/explore-jpl/BaseExploreApp/BaseExploreApp.vue.d.ts +41 -0
  130. package/dist/src/templates/explore-jpl/PageContentExploreApp/PageContentExploreApp.stories.d.ts +193 -0
  131. package/dist/src/templates/explore-jpl/PageContentExploreApp/PageContentExploreApp.vue.d.ts +15 -0
  132. package/dist/src/templates/explore-jpl/PageSiteExploreApp/PageSiteExploreApp.stories.d.ts +80 -0
  133. package/dist/src/templates/explore-jpl/PageSiteExploreApp/PageSiteExploreApp.vue.d.ts +15 -0
  134. package/dist/src/templates/www/PageAsteroidWatchIndex/PageAsteroidWatchIndex.vue.d.ts +1023 -2
  135. package/dist/src/templates/www/PageCuratedGallery/PageCuratedGallery.vue.d.ts +968 -0
  136. package/dist/src/templates/www/PageGoDirectory/PageGoDirectory.vue.d.ts +354 -0
  137. package/dist/src/templates/www/PageHomepage/PageHomepage.vue.d.ts +572 -0
  138. package/dist/src/templates/www/PageInfographicDetail/PageInfographicDetail.vue.d.ts +44 -0
  139. package/dist/src/templates/www/PageMissionDetail/PageMissionDetail.vue.d.ts +352 -0
  140. package/dist/src/templates/www/PagePodcast/PagePodcast.vue.d.ts +706 -0
  141. package/dist/src/templates/www/PagePodcastSeason/PagePodcastSeason.vue.d.ts +530 -0
  142. package/dist/src/templates/www/PagePressKitIndex/PagePressKitIndex.vue.d.ts +354 -0
  143. package/dist/src/templates/www/PageProfileDetail/PageProfileDetail.vue.d.ts +97 -0
  144. package/dist/src/templates/www/PageRoboticsDetail/PageRoboticsDetail.vue.d.ts +1056 -0
  145. package/dist/src/templates/www/PageTimeline/PageTimeline.vue.d.ts +185 -0
  146. package/dist/src/templates/www/PageTopicDetail/PageTopicDetail.vue.d.ts +396 -0
  147. package/package.json +2 -2
  148. package/src/components/AttractionCard/AttractionCard.vue +113 -0
  149. package/src/components/BaseButton/BaseButton.stories.ts +2 -2
  150. package/src/components/BaseButton/BaseButton.vue +6 -6
  151. package/src/components/BaseCarousel/BaseCarousel.vue +2 -2
  152. package/src/components/BaseLink/BaseLink.stories.js +8 -0
  153. package/src/components/BaseLink/BaseLink.vue +21 -1
  154. package/src/components/BlockCta/BlockCta.vue +1 -1
  155. package/src/components/BlockImageCarousel/BlockImageCarousel.vue +2 -2
  156. package/src/components/HomepageMissionsCarousel/HomepageMissionsCarousel.vue +2 -2
  157. package/src/components/Icons/IconBookmark.vue +25 -0
  158. package/src/components/Icons/IconHourglass.vue +35 -0
  159. package/src/components/Icons/IconLocationCrosshairs.vue +26 -0
  160. package/src/components/Icons/IconMap.vue +26 -0
  161. package/src/components/Icons/Icons.stories.ts +29 -0
  162. package/src/components/MetaPanel/MetaPanel.vue +1 -1
  163. package/src/components/MetadataStacked/MetadataStacked.stories.js +21 -0
  164. package/src/components/MetadataStacked/MetadataStacked.vue +71 -0
  165. package/src/components/MissionDetailHero/MissionDetailHero.vue +1 -1
  166. package/src/components/MissionDetailHighlights/MissionDetailHighlightsCarousel.vue +2 -2
  167. package/src/components/MixinAnimationCaret/MixinAnimationCaret.vue +34 -0
  168. package/src/components/MixinCarousel/MixinCarousel.vue +2 -2
  169. package/src/components/NavSecondary/NavSecondary.vue +11 -2
  170. package/src/components/NavSocial/NavSocial.vue +1 -1
  171. package/src/components/SearchFilterGroup/SearchFilterGroup.vue +10 -4
  172. package/src/components/SearchPagination/SearchPagination.vue +2 -2
  173. package/src/components/SearchResultCard/SearchResultCard.stories.js +11 -0
  174. package/src/components/SearchResultCard/SearchResultCard.vue +31 -1
  175. package/src/components/SearchResultsList/SearchResultsList.stories.js +870 -0
  176. package/src/components/SearchResultsList/SearchResultsList.vue +18 -1
  177. package/src/components/ShareButtons/ShareButtons.vue +4 -4
  178. package/src/components/TopicDetailMore/TopicDetailMore.vue +1 -1
  179. package/src/interfaces.ts +40 -1
  180. package/src/templates/PageAudioDetail/PageAudioDetail.vue +9 -8
  181. package/src/templates/PageContent/PageContent.vue +2 -0
  182. package/src/templates/explore-jpl/BaseExploreApp/BaseExploreApp.stories.js +22 -0
  183. package/src/templates/explore-jpl/BaseExploreApp/BaseExploreApp.vue +65 -0
  184. package/src/templates/explore-jpl/PageContentExploreApp/PageContentExploreApp.stories.js +102 -0
  185. package/src/templates/explore-jpl/PageContentExploreApp/PageContentExploreApp.vue +128 -0
  186. package/src/templates/explore-jpl/PageSiteExploreApp/PageSiteExploreApp.stories.js +90 -0
  187. package/src/templates/explore-jpl/PageSiteExploreApp/PageSiteExploreApp.vue +166 -0
  188. package/dist/src/components/BlockCsrTable/CsrAttachment.vue.d.ts +0 -19
@@ -17,6 +17,7 @@
17
17
  <SearchResultCard
18
18
  :is-events="isEvents"
19
19
  :is-profiles="isProfiles"
20
+ :is-attraction="isAttraction"
20
21
  :page-content-type="page.content_type"
21
22
  :url="page.url"
22
23
  :type="page.type"
@@ -34,6 +35,8 @@
34
35
  :ongoing="page.ongoing"
35
36
  :target-audience="page.targetAudience"
36
37
  :location="page.location"
38
+ :location-icon="page.locationIcon"
39
+ :wait="page.wait"
37
40
  :primary-subject="page.primarySubject as unknown as PrimarySubjectObject"
38
41
  :grade-levels="page.gradeLevels as unknown as GradeLevelsObject[]"
39
42
  :time="page.time as unknown as EduResourcesTime"
@@ -97,6 +100,10 @@ export default defineComponent({
97
100
  type: Boolean,
98
101
  default: false
99
102
  },
103
+ isAttraction: {
104
+ type: Boolean,
105
+ default: false
106
+ },
100
107
  grid: {
101
108
  type: Boolean,
102
109
  default: false
@@ -207,7 +214,9 @@ export default defineComponent({
207
214
  page.topic = topic
208
215
  // properties for event's page
209
216
  page.location =
210
- handle === 'events_eventpage' ? page._source[handle + '__location'] : location
217
+ handle === 'events_eventpage' || handle === 'explore_jpl_sites_explorejplsite'
218
+ ? page._source[handle + '__location']
219
+ : location
211
220
  page.startDate =
212
221
  handle === 'events_eventpage' || handle === 'edu_events_edueventpage'
213
222
  ? page._source[handle + '__start_date']
@@ -258,6 +267,14 @@ export default defineComponent({
258
267
  ? page._source[handle + '__job_title']
259
268
  : page._source[handle + '__summary']
260
269
  page.date = date
270
+ page.wait =
271
+ handle === 'explore_jpl_sites_explorejplsite'
272
+ ? page._source[handle + '__wait_time_label_filter']
273
+ : undefined
274
+ page.locationIcon =
275
+ handle === 'explore_jpl_sites_explorejplsite'
276
+ ? page._source[handle + '__map_icon']?.thumbnail_image
277
+ : undefined
261
278
  if (image) {
262
279
  page.image = {
263
280
  src: {
@@ -11,7 +11,7 @@
11
11
  target="_blank"
12
12
  rel="noopener"
13
13
  >
14
- <template #icon>
14
+ <template #iconRight>
15
15
  <IconSocialFacebook />
16
16
  </template>
17
17
  </BaseButton>
@@ -25,7 +25,7 @@
25
25
  target="_blank"
26
26
  rel="noopener"
27
27
  >
28
- <template #icon>
28
+ <template #iconRight>
29
29
  <IconSocialTwitter />
30
30
  </template>
31
31
  </BaseButton>
@@ -39,7 +39,7 @@
39
39
  target="_blank"
40
40
  rel="noopener"
41
41
  >
42
- <template #icon>
42
+ <template #iconRight>
43
43
  <IconSocialReddit />
44
44
  </template>
45
45
  </BaseButton>
@@ -53,7 +53,7 @@
53
53
  target="_blank"
54
54
  rel="noopener"
55
55
  >
56
- <template #icon>
56
+ <template #iconRight>
57
57
  <IconSocialEmail />
58
58
  </template>
59
59
  </BaseButton>
@@ -42,7 +42,7 @@
42
42
  :to="`/search?topics=${topic}`"
43
43
  >
44
44
  More
45
- <template #icon><IconCaret class="ml-1 text-sm" /></template>
45
+ <template #iconRight><IconCaret class="ml-1 text-sm" /></template>
46
46
  </BaseButton>
47
47
  </div>
48
48
  </div>
package/src/interfaces.ts CHANGED
@@ -58,6 +58,7 @@ export interface ThumbnailObject {
58
58
  original: string
59
59
  width: number
60
60
  height: number
61
+ url: string
61
62
  }
62
63
  export interface ImageObject {
63
64
  title?: string
@@ -102,8 +103,32 @@ export interface ImageBlock extends BlockData, ImageObject {
102
103
  constrain: boolean
103
104
  }
104
105
 
106
+ export interface SearchBucket {
107
+ key: string
108
+ doc_count: number
109
+ label?: string
110
+ }
111
+
112
+ export interface SearchAggregation {
113
+ buckets: SearchBucket[]
114
+ doc_count_error_upper_bound: number
115
+ sum_other_doc_count: number
116
+ }
117
+
118
+ export type SearchAggregations = Record<string, SearchAggregation>
119
+
120
+ export interface SearchData {
121
+ hits: {
122
+ total: {
123
+ value: number
124
+ }
125
+ hits: ElasticSearchPage[]
126
+ }
127
+ aggregations: SearchAggregations
128
+ }
129
+
105
130
  export interface ElasticSearchPage {
106
- _source: string
131
+ _source: Record<string, any>
107
132
  id: string | number
108
133
  content_type: string
109
134
  url: string
@@ -119,6 +144,8 @@ export interface ElasticSearchPage {
119
144
  startDatetime?: string
120
145
  endDatetime?: string
121
146
  location?: string
147
+ locationIcon?: string
148
+ wait?: string
122
149
  title: string
123
150
  summary?: string
124
151
  eventType?: string
@@ -304,14 +331,26 @@ export interface PageObject {
304
331
  topper?: string
305
332
  seoTitle?: string
306
333
  searchDescription?: string
334
+ heroImage?: ImageObject
307
335
  heroPosition?: 'full_bleed' | 'inline'
336
+ heroImageInline?: ImageObject
337
+ displayTitleInHero?: boolean
338
+ heroImageCaption?: string
339
+ heroSummary?: string
308
340
  heroConstrain?: boolean
341
+ showShareLinks?: boolean
309
342
  publicationDate?: string
310
343
  body?: StreamfieldBlockData[]
311
344
  thumbnailImage?: ThumbnailObject
312
345
  relatedLinks?: BlockRelatedLinksObject[]
313
346
  relatedContentHeading: string
314
347
  relatedContent?: any
348
+ location?: string
349
+ mapIcon?: Record<string, any>
350
+ waitTime?: string
351
+ waitTimeLabel?: string
352
+ relatedPagesForMoreSection?: any
353
+ id?: string
315
354
  }
316
355
 
317
356
  export interface EduResourcesSubject {
@@ -97,13 +97,14 @@
97
97
  :aria-expanded="collapseTranscript ? 'false' : 'true'"
98
98
  @click="toggleTranscript()"
99
99
  >
100
- <template v-if="collapseTranscript">
101
- <span>Read more</span>
102
- <IconDropdown class="text-sm ml-2" />
100
+ <template #default>
101
+ <span>{{ collapseTranscript ? 'Read More' : 'Collapse' }}</span>
103
102
  </template>
104
- <template v-else>
105
- <span>Collapse</span>
106
- <IconDropdown class="transform rotate-180 text-sm ml-2" />
103
+ <template #iconRight>
104
+ <IconDropdown
105
+ class="text-sm ml-2 transform"
106
+ :class="{ 'rotate-180': !collapseTranscript }"
107
+ />
107
108
  </template>
108
109
  </BaseButton>
109
110
  </template>
@@ -178,9 +179,9 @@
178
179
  Download
179
180
  {{ data.uploadedMedia.fileExtension || 'Audio' }}
180
181
  </span>
181
- <slot name="icon">
182
+ <template #iconRight>
182
183
  <IconDownload />
183
- </slot>
184
+ </template>
184
185
  </BaseButton>
185
186
  </div>
186
187
  </div>
@@ -51,12 +51,14 @@ export default defineComponent({
51
51
  ? this.data?.parent?.title
52
52
  : this.data?.displayLabel
53
53
  },
54
+ /** If the hero image is inline (treated as a regular block) */
54
55
  heroInline() {
55
56
  if (this.data?.heroPosition === 'inline') {
56
57
  return true
57
58
  }
58
59
  return false
59
60
  },
61
+ /** If the page title should overlay the hero image (does not apply to inline heroes) */
60
62
  heroTitle() {
61
63
  return this.data?.heroImage && !this.heroInline && this.data?.displayTitleInHero
62
64
  },
@@ -0,0 +1,22 @@
1
+ import BaseExploreApp from './BaseExploreApp.vue'
2
+
3
+ export default {
4
+ title: 'Templates/ExploreJPL/BaseExploreApp',
5
+ component: BaseExploreApp,
6
+ parameters: {
7
+ html: {
8
+ root: '#storyRoot'
9
+ },
10
+ layout: 'fullscreen',
11
+ slots: {
12
+ hero: 'Hero content (above the nav) `<template #hero>`',
13
+ default: 'Body content (below the nav) `<template #default>`'
14
+ }
15
+ },
16
+ excludeStories: /.*(Data)$/
17
+ }
18
+
19
+ // stories
20
+ export const BaseStory = {
21
+ name: 'BaseExploreApp'
22
+ }
@@ -0,0 +1,65 @@
1
+ <script setup lang="ts">
2
+ /**
3
+ * Wrapper template for all Explore JPL App pages.
4
+ * Provides the sticky navigation.
5
+ */
6
+ import NavSecondary from './../../../components/NavSecondary/NavSecondary.vue'
7
+
8
+ defineProps({
9
+ /** If hero content appears above the navigation (provided by parent component) */
10
+ hasIntro: {
11
+ type: Boolean,
12
+ default: false
13
+ },
14
+ navData: {
15
+ type: String,
16
+ default: undefined
17
+ }
18
+ })
19
+ </script>
20
+ <template>
21
+ <div class="BaseExploreApp">
22
+ <!-- @slot: hero content -->
23
+ <slot name="hero"></slot>
24
+ <!-- navigation -->
25
+ <NavSecondary
26
+ :breadcrumb="navData"
27
+ :has-intro="hasIntro"
28
+ show-on-mobile
29
+ />
30
+ <!-- @slot: page body -->
31
+ <slot>
32
+ <p class="text-center"></p>
33
+ </slot>
34
+ </div>
35
+ </template>
36
+ <style lang="scss">
37
+ @use 'sass:math';
38
+ // Conversion util for easier definition of font sizes by pixel size
39
+ @function pxToRem($pxValue) {
40
+ // Assumes font-size for body element is a constant 16px
41
+ @return math.div($pxValue, 16) * 1rem;
42
+ }
43
+
44
+ .BaseExploreApp {
45
+ .text-h1 {
46
+ // mimic text-h2
47
+ @apply font-display font-bold;
48
+ font-size: pxToRem(36);
49
+ line-height: 1.25;
50
+
51
+ @screen sm {
52
+ font-size: pxToRem(38);
53
+ }
54
+ @screen md {
55
+ font-size: pxToRem(40);
56
+ }
57
+ @screen lg {
58
+ font-size: pxToRem(42);
59
+ }
60
+ @screen xl {
61
+ font-size: pxToRem(44);
62
+ }
63
+ }
64
+ }
65
+ </style>
@@ -0,0 +1,102 @@
1
+ import { BlockHeadingData } from './../../../components/BlockHeading/BlockHeading.stories'
2
+ import { BlockKeyPointsData } from './../../../components/BlockKeyPoints/BlockKeyPoints.stories'
3
+ import { BlockImageComparisonData } from './../../../components/BlockImageComparison/BlockImageComparison.stories'
4
+ import { HeroMediaData } from './../../../components/HeroMedia/HeroMedia.stories'
5
+ import { BlockRelatedLinksData } from './../../../components/BlockRelatedLinks/BlockRelatedLinks.stories.js'
6
+ import { BlockLinkCardCarouselData } from './../../../components/BlockLinkCarousel/BlockLinkCarousel.stories.js'
7
+ import { NavSecondaryData } from './../../../components/NavSecondary/NavSecondary.stories.js'
8
+
9
+ import PageContentExploreApp from './PageContentExploreApp.vue'
10
+
11
+ export default {
12
+ title: 'Templates/ExploreJPL/PageContentExploreApp',
13
+ component: PageContentExploreApp,
14
+ tags: ['!autodocs'],
15
+ parameters: {
16
+ html: {
17
+ root: '#storyRoot'
18
+ },
19
+ layout: 'fullscreen'
20
+ },
21
+ excludeStories: /.*(Data)$/
22
+ }
23
+
24
+ // data
25
+ export const ExploreAppContentPageData = {
26
+ url: '/slug',
27
+ title: 'Sites',
28
+ displayLabel: 'Explore JPL',
29
+ showShareLinks: false,
30
+ // heroImageInline: HeroMediaData.imageInline,
31
+ body: [
32
+ BlockKeyPointsData,
33
+ BlockHeadingData,
34
+ {
35
+ blockType: 'RichTextBlock',
36
+ value:
37
+ '<p>Lorem ipsum <a href="/missions/test-mission/">dolor</a> sit amet, consectetur adipiscing elit. Quisque vitae justo quis justo malesuada molestie. Cras sed tincidunt dui.</p><p>Integer imperdiet blandit neque vitae euismod. Nulla aliquet lacus nibh, vel tincidunt urna efficitur non. In et eros vitae ex posuere maximus quis eget urna. Suspendisse fringilla posuere velit sit amet posuere. Morbi malesuada bibendum vehicula. Donec faucibus ut erat ut mattis. Suspendisse ornare, quam at placerat cursus, dolor mi lacinia nunc, eget maximus augue nulla in dolor.</p>\n'
38
+ },
39
+ BlockImageComparisonData,
40
+ BlockHeadingData,
41
+ {
42
+ blockType: 'RichTextBlock',
43
+ value:
44
+ '<p>Lorem ipsum <a href="/missions/test-mission/">dolor</a> sit amet, consectetur adipiscing elit. Quisque vitae justo quis justo malesuada molestie. Cras sed tincidunt dui.</p><p>Integer imperdiet blandit neque vitae euismod. Nulla aliquet lacus nibh, vel tincidunt urna efficitur non. In et eros vitae ex posuere maximus quis eget urna. Suspendisse fringilla posuere velit sit amet posuere. Morbi malesuada bibendum vehicula. Donec faucibus ut erat ut mattis. Suspendisse ornare, quam at placerat cursus, dolor mi lacinia nunc, eget maximus augue nulla in dolor.</p>\n'
45
+ }
46
+ ],
47
+ relatedLinks: [BlockRelatedLinksData.data],
48
+ relatedContentHeading: 'Related Activities',
49
+ relatedContent: [
50
+ // external link card, no image
51
+ {
52
+ label: 'Explore NASA',
53
+ thumbnailImage: null,
54
+ title: 'NASA website',
55
+ externalLink: 'https://www.nasa.gov'
56
+ },
57
+
58
+ // via page chooser
59
+ {
60
+ page: {
61
+ __typename: 'EDUExplainerArticlePage',
62
+ label: 'Mission',
63
+ thumbnailImage: {
64
+ src: {
65
+ url: 'https://picsum.photos/512/288',
66
+ width: 512,
67
+ height: 288
68
+ }
69
+ },
70
+ title: 'GRACE-FO',
71
+ url: '/mission/placeholder'
72
+ }
73
+ },
74
+ ...BlockLinkCardCarouselData
75
+ ]
76
+ }
77
+
78
+ // stories
79
+ export const BaseStory = {
80
+ args: {
81
+ data: ExploreAppContentPageData
82
+ }
83
+ }
84
+
85
+ export const WithHero = {
86
+ args: {
87
+ data: {
88
+ ...ExploreAppContentPageData,
89
+ heroPosition: 'full_bleed',
90
+ heroImage: HeroMediaData.image
91
+ }
92
+ }
93
+ }
94
+
95
+ export const CustomNav = {
96
+ args: {
97
+ data: {
98
+ ...ExploreAppContentPageData,
99
+ breadcrumb: NavSecondaryData.breadcrumb
100
+ }
101
+ }
102
+ }
@@ -0,0 +1,128 @@
1
+ <script setup lang="ts">
2
+ /** Explore JPL App's equivalent to PageContent */
3
+ import { computed, reactive } from 'vue'
4
+ import type { PageObject } from '../../../interfaces'
5
+ import { useThemeStore } from '../../../store/theme'
6
+ import HeroLarge from './../../../components/HeroLarge/HeroLarge.vue'
7
+ import HeroMedia from './../../../components/HeroMedia/HeroMedia.vue'
8
+ import LayoutHelper from './../../../components/LayoutHelper/LayoutHelper.vue'
9
+ import DetailHeadline from './../../../components/DetailHeadline/DetailHeadline.vue'
10
+ import BlockImageStandard from './../../../components/BlockImage/BlockImageStandard.vue'
11
+ import ShareButtons from './../../../components/ShareButtons/ShareButtons.vue'
12
+ import BlockStreamfield from './../../../components/BlockStreamfield/BlockStreamfield.vue'
13
+ import BlockRelatedLinks from './../../../components/BlockRelatedLinks/BlockRelatedLinks.vue'
14
+ import BlockLinkCarousel from './../../../components/BlockLinkCarousel/BlockLinkCarousel.vue'
15
+ import BaseExploreApp from './../../explore-jpl/BaseExploreApp/BaseExploreApp.vue'
16
+
17
+ const themeStore = useThemeStore()
18
+
19
+ const props = defineProps({
20
+ data: {
21
+ type: Object as () => PageObject,
22
+ default: undefined
23
+ }
24
+ })
25
+ const { data } = reactive(props)
26
+
27
+ /** If the hero image is inline (treated as a regular block) */
28
+ const heroInline = computed(() => {
29
+ if (data?.heroPosition === 'inline') {
30
+ return true
31
+ }
32
+ return false
33
+ })
34
+ /** If the page title should overlay the hero image (does not apply to inline heroes) */
35
+ const heroTitle = computed(() => {
36
+ return data?.heroImage && !heroInline.value && data?.displayTitleInHero
37
+ })
38
+ </script>
39
+ <template>
40
+ <div
41
+ v-if="data"
42
+ class="ThemeVariantLight"
43
+ :class="{ '-nav-offset': !heroInline && data.heroImage }"
44
+ >
45
+ <BaseExploreApp
46
+ :has-intro="data.heroImage && !heroInline"
47
+ :nav-data="data.breadcrumb"
48
+ >
49
+ <template #hero>
50
+ <!-- hero image -->
51
+ <HeroLarge
52
+ v-if="heroTitle"
53
+ :title="data.title"
54
+ :image="data.heroImage"
55
+ :summary="data.heroSummary"
56
+ />
57
+ <HeroMedia
58
+ v-else-if="!heroTitle && data.heroImage && !heroInline"
59
+ class="md:mb-0 mb-10"
60
+ :image="data.heroImage"
61
+ :caption="data.heroImageCaption"
62
+ :display-caption="!data.heroImageCaption ? false : true"
63
+ :constrain="data.heroConstrain"
64
+ />
65
+ </template>
66
+
67
+ <template #default>
68
+ <!-- page title area -->
69
+ <LayoutHelper
70
+ indent="col-2"
71
+ class="my-5 lg:mt-10 lg:mb-10"
72
+ >
73
+ <DetailHeadline
74
+ v-if="!heroTitle"
75
+ :title="data.title"
76
+ />
77
+ </LayoutHelper>
78
+
79
+ <!-- inline hero -->
80
+ <LayoutHelper
81
+ v-if="data.heroImageInline && heroInline"
82
+ indent="col-2"
83
+ class="mb-22 mt-10"
84
+ >
85
+ <BlockImageStandard
86
+ :data="data.heroImageInline"
87
+ :caption="data.heroImageCaption"
88
+ :display-caption="!data.heroImageCaption ? false : true"
89
+ :constrain="data.heroConstrain"
90
+ />
91
+ </LayoutHelper>
92
+
93
+ <!-- share buttons -->
94
+ <LayoutHelper
95
+ v-if="themeStore.theme !== 'ThemeEdu'"
96
+ indent="col-2"
97
+ class="lg:mb-0 relative mb-8"
98
+ >
99
+ <ShareButtons
100
+ v-if="data.showShareLinks && data.title && data.url && !themeStore.isEdu"
101
+ :title="data.title"
102
+ :url="data.url"
103
+ />
104
+ </LayoutHelper>
105
+
106
+ <!-- Body Streamfield -->
107
+ <BlockStreamfield :data="data.body" />
108
+
109
+ <!-- related links -->
110
+ <LayoutHelper
111
+ v-if="data.relatedLinks && data.relatedLinks.length"
112
+ indent="col-3"
113
+ class="lg:my-18 my-10"
114
+ >
115
+ <BlockRelatedLinks :data="data.relatedLinks[0]" />
116
+ </LayoutHelper>
117
+
118
+ <!-- related content -->
119
+ <BlockLinkCarousel
120
+ item-type="cards"
121
+ class="lg:my-24 my-12"
122
+ :heading="data.relatedContentHeading"
123
+ :items="data.relatedContent"
124
+ />
125
+ </template>
126
+ </BaseExploreApp>
127
+ </div>
128
+ </template>
@@ -0,0 +1,90 @@
1
+ import { BlockLinkCardCarouselData } from './../../../components/BlockLinkCarousel/BlockLinkCarousel.stories.js'
2
+
3
+ import PageSiteExploreApp from './PageSiteExploreApp.vue'
4
+
5
+ export default {
6
+ title: 'Templates/ExploreJPL/PageSiteExploreApp',
7
+ component: PageSiteExploreApp,
8
+ tags: ['!autodocs'],
9
+ parameters: {
10
+ html: {
11
+ root: '#storyRoot'
12
+ },
13
+ layout: 'fullscreen'
14
+ },
15
+ excludeStories: /.*(Data)$/
16
+ }
17
+
18
+ // data
19
+ export const ExploreAppSitePageData = {
20
+ id: '156',
21
+ url: '/slug',
22
+ title: 'Sites',
23
+ displayLabel: 'Explore JPL',
24
+ showShareLinks: false,
25
+ thumbnailImage: {
26
+ url: 'https://picsum.photos/512/288',
27
+ width: 512,
28
+ height: 288,
29
+ id: 12345
30
+ },
31
+ location: 'Cafe 186',
32
+ waitTime: '60',
33
+ waitTimeLabel: '60 minute wait',
34
+ locationIcon: '',
35
+ body: [
36
+ {
37
+ blockType: 'RichTextBlock',
38
+ value:
39
+ '<p>Lorem ipsum <a href="/missions/test-mission/">dolor</a> sit amet, consectetur adipiscing elit. Quisque vitae justo quis justo malesuada molestie. Cras sed tincidunt dui.</p><p>Integer imperdiet blandit neque vitae euismod. Nulla aliquet lacus nibh, vel tincidunt urna efficitur non. In et eros vitae ex posuere maximus quis eget urna. Suspendisse fringilla posuere velit sit amet posuere. Morbi malesuada bibendum vehicula. Donec faucibus ut erat ut mattis. Suspendisse ornare, quam at placerat cursus, dolor mi lacinia nunc, eget maximus augue nulla in dolor.</p>\n'
40
+ },
41
+ {
42
+ blockType: 'RichTextBlock',
43
+ value:
44
+ '<p>Lorem ipsum <a href="/missions/test-mission/">dolor</a> sit amet, consectetur adipiscing elit. Quisque vitae justo quis justo malesuada molestie. Cras sed tincidunt dui.</p><p>Integer imperdiet blandit neque vitae euismod. Nulla aliquet lacus nibh, vel tincidunt urna efficitur non. In et eros vitae ex posuere maximus quis eget urna. Suspendisse fringilla posuere velit sit amet posuere. Morbi malesuada bibendum vehicula. Donec faucibus ut erat ut mattis. Suspendisse ornare, quam at placerat cursus, dolor mi lacinia nunc, eget maximus augue nulla in dolor.</p>\n'
45
+ }
46
+ ],
47
+ relatedPagesForMoreSection: [
48
+ {
49
+ title: 'Cafeteria 303',
50
+ url: 'https://www.nasa.gov',
51
+ thumbnailImage: {
52
+ src: {
53
+ url: 'https://picsum.photos/512/288?random=1',
54
+ width: 512,
55
+ height: 288
56
+ }
57
+ }
58
+ },
59
+ {
60
+ title: 'Highbay 1',
61
+ url: 'https://www.nasa.gov',
62
+ thumbnailImage: {
63
+ src: {
64
+ url: 'https://picsum.photos/512/288?random=2',
65
+ width: 512,
66
+ height: 288
67
+ }
68
+ }
69
+ },
70
+ {
71
+ title: 'Building 111',
72
+ url: 'https://www.nasa.gov',
73
+ thumbnailImage: {
74
+ src: {
75
+ url: 'https://picsum.photos/512/288?random=3',
76
+ width: 512,
77
+ height: 288
78
+ }
79
+ }
80
+ },
81
+ ...BlockLinkCardCarouselData
82
+ ]
83
+ }
84
+
85
+ // stories
86
+ export const BaseStory = {
87
+ args: {
88
+ data: ExploreAppSitePageData
89
+ }
90
+ }