@explorer-1/vue 0.3.6 → 0.3.8

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 (200) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/package.json +1 -1
  3. package/src/components/AboutTheAuthor/AboutTheAuthor.stories.js +1 -1
  4. package/src/components/AboutTheAuthor/AboutTheAuthor.vue +9 -9
  5. package/src/components/AsteroidWatchWidget/AsteroidWatchWidget.stories.js +0 -5
  6. package/src/components/AsteroidWatchWidget/AsteroidWatchWidget.vue +5 -1
  7. package/src/components/BackToTop/BackToTop.stories.js +1 -1
  8. package/src/components/BackToTop/BackToTop.vue +10 -0
  9. package/src/components/BaseAccordionItem/BaseAccordionItem.stories.js +5 -29
  10. package/src/components/BaseAccordionItem/BaseAccordionItem.vue +56 -17
  11. package/src/components/BaseAudio/BaseAudio.vue +6 -0
  12. package/src/components/BaseButton/BaseButton.stories.ts +1 -20
  13. package/src/components/BaseButton/BaseButton.vue +34 -10
  14. package/src/components/BaseCheckboxGroup/BaseCheckboxGroup.stories.js +2 -1
  15. package/src/components/BaseCheckboxGroup/BaseCheckboxGroup.vue +5 -0
  16. package/src/components/BaseHeading/BaseHeading.stories.js +0 -15
  17. package/src/components/BaseHeading/BaseHeading.vue +18 -8
  18. package/src/components/BaseImage/BaseImage.stories.ts +6 -21
  19. package/src/components/BaseImage/BaseImage.vue +26 -14
  20. package/src/components/BaseImageCaption/BaseImageCaption.vue +10 -6
  21. package/src/components/BaseImagePlaceholder/BaseImagePlaceholder.stories.js +3 -16
  22. package/src/components/BaseImagePlaceholder/BaseImagePlaceholder.vue +13 -9
  23. package/src/components/BaseLink/BaseLink.stories.js +4 -46
  24. package/src/components/BaseLink/BaseLink.vue +32 -21
  25. package/src/components/BaseModal/BaseModal.stories.js +4 -7
  26. package/src/components/BaseModal/BaseModal.vue +1 -0
  27. package/src/components/BaseModal/BaseModalDialog.vue +1 -6
  28. package/src/components/BasePill/BasePill.stories.js +2 -22
  29. package/src/components/BasePill/BasePill.vue +36 -17
  30. package/src/components/BasePlaceholder/BasePlaceholder.stories.js +4 -7
  31. package/src/components/BasePlaceholder/BasePlaceholder.vue +1 -1
  32. package/src/components/BaseRadioGroup/BaseRadioGroup.stories.js +1 -0
  33. package/src/components/BaseRadioGroup/BaseRadioGroup.vue +9 -2
  34. package/src/components/BaseSwimlane/BaseSwimlane.stories.js +2 -1
  35. package/src/components/BaseSwimlane/BaseSwimlane.vue +2 -0
  36. package/src/components/BaseTimer/BaseTimer.stories.js +6 -1
  37. package/src/components/BaseTimer/BaseTimer.vue +4 -2
  38. package/src/components/BaseUnitToggle/BaseUnitToggle.stories.js +1 -16
  39. package/src/components/BaseUnitToggle/BaseUnitToggle.vue +4 -0
  40. package/src/components/BaseVideo/BaseVideo.vue +7 -3
  41. package/src/components/BlockAccordion/BlockAccordion.stories.js +1 -1
  42. package/src/components/BlockAccordion/BlockAccordion.vue +3 -3
  43. package/src/components/BlockAudio/BlockAudio.stories.js +1 -0
  44. package/src/components/BlockAudio/BlockAudio.vue +11 -3
  45. package/src/components/BlockCardGrid/BlockCardGrid.stories.js +1 -1
  46. package/src/components/BlockCardGrid/BlockCardGrid.vue +1 -1
  47. package/src/components/BlockCardGridItem/BlockCardGridItem.stories.js +1 -1
  48. package/src/components/BlockCircleImageCard/BlockCircleImageCard.stories.js +1 -8
  49. package/src/components/BlockCsrTable/BlockCsrTable.stories.js +1 -0
  50. package/src/components/BlockCsrTable/BlockCsrTable.vue +1 -1
  51. package/src/components/BlockCta/BlockCta.stories.js +1 -0
  52. package/src/components/BlockCta/BlockCta.vue +9 -2
  53. package/src/components/BlockDialog/BlockDialog.stories.js +2 -1
  54. package/src/components/BlockGist/BlockGist.stories.js +3 -2
  55. package/src/components/BlockGist/BlockGist.vue +8 -6
  56. package/src/components/BlockHeading/BlockHeading.stories.js +1 -0
  57. package/src/components/BlockIframeEmbed/BlockIframeEmbed.stories.js +1 -0
  58. package/src/components/BlockIframeEmbed/BlockIframeEmbed.vue +9 -2
  59. package/src/components/BlockImage/BlockImage.stories.js +1 -5
  60. package/src/components/BlockImage/BlockImage.vue +5 -2
  61. package/src/components/BlockImageCarousel/BlockImageCarousel.stories.js +1 -13
  62. package/src/components/BlockImageCarousel/BlockImageCarousel.vue +2 -0
  63. package/src/components/BlockImageCarouselItem/BlockImageCarouselItem.stories.js +0 -14
  64. package/src/components/BlockImageCarouselItem/BlockImageCarouselItem.vue +7 -7
  65. package/src/components/BlockImageComparison/BlockImageComparison.stories.js +3 -1
  66. package/src/components/BlockImageComparison/BlockImageComparison.vue +11 -2
  67. package/src/components/BlockImageGallery/BlockImageGallery.stories.js +2 -9
  68. package/src/components/BlockImageGallery/BlockImageGallery.vue +5 -0
  69. package/src/components/BlockInlineImage/BlockInlineImage.stories.js +1 -8
  70. package/src/components/BlockInlineImage/BlockInlineImage.vue +20 -7
  71. package/src/components/BlockKeyPoints/BlockKeyPoints.stories.js +1 -0
  72. package/src/components/BlockKeyPoints/BlockKeyPoints.vue +12 -3
  73. package/src/components/BlockLinkCard/BlockLinkCard.stories.js +5 -18
  74. package/src/components/BlockLinkCard/BlockLinkCard.vue +27 -8
  75. package/src/components/BlockLinkCard/BlockLinkCardCollectionLg.vue +2 -2
  76. package/src/components/BlockLinkCardList/BlockLinkCardList.stories.js +1 -3
  77. package/src/components/BlockLinkCarousel/BlockLinkCarousel.stories.js +2 -14
  78. package/src/components/BlockLinkCarousel/BlockLinkCarousel.vue +8 -8
  79. package/src/components/BlockLinkTile/BlockLinkTile.stories.js +1 -11
  80. package/src/components/BlockLinkTile/BlockLinkTile.vue +26 -13
  81. package/src/components/BlockListCards/BlockListCards.stories.js +1 -0
  82. package/src/components/BlockListCards/BlockListCards.vue +5 -4
  83. package/src/components/BlockNewsletterSignup/BlockNewsletterSignup.stories.js +1 -0
  84. package/src/components/BlockNewsletterSignup/BlockNewsletterSignup.vue +3 -2
  85. package/src/components/BlockQuote/BlockQuote.stories.js +1 -0
  86. package/src/components/BlockQuote/BlockQuote.vue +3 -2
  87. package/src/components/BlockRelatedLinks/BlockRelatedLinks.stories.js +1 -0
  88. package/src/components/BlockRelatedLinks/BlockRelatedLinks.vue +6 -4
  89. package/src/components/BlockRichTable/BlockRichTable.stories.js +1 -1
  90. package/src/components/BlockRichTable/BlockRichTable.vue +23 -9
  91. package/src/components/BlockStreamfield/BlockStreamfield.stories.js +1 -11
  92. package/src/components/BlockStreamfield/BlockStreamfield.vue +34 -31
  93. package/src/components/BlockTeaser/BlockTeaser.stories.js +1 -0
  94. package/src/components/BlockTeaser/BlockTeaser.vue +20 -12
  95. package/src/components/BlockText/BlockText.stories.js +2 -9
  96. package/src/components/BlockText/BlockText.vue +21 -9
  97. package/src/components/BlockVideo/BlockVideo.stories.js +1 -0
  98. package/src/components/BlockVideo/BlockVideo.vue +14 -3
  99. package/src/components/BlockVideoEmbed/BlockVideoEmbed.stories.js +1 -0
  100. package/src/components/BlockVideoEmbed/BlockVideoEmbed.vue +6 -3
  101. package/src/components/CalendarButton/CalendarButton.vue +7 -0
  102. package/src/components/DetailHeadline/DetailHeadline.stories.js +2 -20
  103. package/src/components/DetailHeadline/DetailHeadline.vue +16 -4
  104. package/src/components/DsnWidget/DsnWidget.stories.js +2 -6
  105. package/src/components/DsnWidget/DsnWidget.vue +18 -4
  106. package/src/components/EventDetailHero/EventDetailHero.vue +4 -7
  107. package/src/components/FormContact/FormContact.stories.js +2 -1
  108. package/src/components/FormNewsletterSignup/FormNewsletterSignup.stories.js +2 -1
  109. package/src/components/HeroInlineMedia/HeroInlineMedia.vue +12 -8
  110. package/src/components/HeroLarge/HeroLarge.stories.js +1 -0
  111. package/src/components/HeroLarge/HeroLarge.vue +12 -7
  112. package/src/components/HeroListingIndex/HeroListingIndex.stories.js +1 -0
  113. package/src/components/HeroListingIndex/HeroListingIndex.vue +18 -13
  114. package/src/components/HeroMedia/HeroMedia.stories.js +13 -8
  115. package/src/components/HeroMedia/HeroMedia.vue +9 -8
  116. package/src/components/HeroMedium/HeroMedium.stories.js +1 -0
  117. package/src/components/HeroMedium/HeroMedium.vue +32 -14
  118. package/src/components/HeroMedium/HeroSmall.stories.js +2 -2
  119. package/src/components/HomepageCarousel/HomepageCarousel.stories.js +1 -1
  120. package/src/components/HomepageCarouselItem/HomepageCarouselItem.vue +2 -6
  121. package/src/components/HomepageEmbedBlock/HomepageEmbedBlock.vue +2 -2
  122. package/src/components/LogoCaltech/LogoCaltech.stories.js +14 -18
  123. package/src/components/LogoCaltech/LogoCaltech.vue +1 -0
  124. package/src/components/LogoTribrand/LogoTribrand.stories.js +66 -51
  125. package/src/components/LogoTribrand/LogoTribrand.vue +4 -2
  126. package/src/components/MetaPanel/MetaPanel.stories.js +4 -8
  127. package/src/components/MetaPanel/MetaPanel.vue +3 -0
  128. package/src/components/MetaPanelItems/MetaPanelItems.stories.js +9 -2
  129. package/src/components/MetaPanelItems/MetaPanelItems.vue +2 -0
  130. package/src/components/MetadataEduResource/MetadataEduResource.stories.js +12 -10
  131. package/src/components/MetadataEduResource/MetadataEduResource.vue +7 -3
  132. package/src/components/MetadataEvent/MetadataEvent.stories.js +1 -1
  133. package/src/components/MissionDetailAbout/MissionDetailAbout.vue +1 -1
  134. package/src/components/MissionDetailHighlights/MissionDetailHighlights.stories.js +1 -0
  135. package/src/components/MissionDetailInlineImage/MissionDetailInlineImage.stories.js +1 -6
  136. package/src/components/MissionDetailInlineImage/MissionDetailInlineImage.vue +10 -5
  137. package/src/components/MissionDetailStats/DistanceStats.vue +10 -5
  138. package/src/components/MissionDetailStats/MissionDetailStats.stories.js +2 -19
  139. package/src/components/MissionDetailStats/MissionDetailStats.vue +21 -5
  140. package/src/components/MissionDetailStreamfield/MissionDetailStreamfield.vue +4 -2
  141. package/src/components/MixinAnimationCaret/MixinAnimationCaret.stories.ts +7 -0
  142. package/src/components/MixinAnimationCaret/MixinAnimationCaret.vue +12 -6
  143. package/src/components/MixinCarousel/MixinCarousel.stories.js +2 -8
  144. package/src/components/MixinCarousel/MixinCarousel.vue +13 -16
  145. package/src/components/MixinVideoBg/MixinVideoBg.stories.js +1 -1
  146. package/src/components/MixinVideoBg/MixinVideoBg.vue +4 -7
  147. package/src/components/NavDesktop/NavDesktop.stories.js +1 -0
  148. package/src/components/NavDesktop/NavDesktop.vue +4 -4
  149. package/src/components/NavDesktop/NavDesktopTopHat.vue +4 -4
  150. package/src/components/NavDesktopEdu/NavDesktopEdu.stories.js +1 -5
  151. package/src/components/NavDesktopEdu/NavDesktopEdu.vue +4 -4
  152. package/src/components/NavHeading/NavHeading.stories.js +1 -0
  153. package/src/components/NavHighlight/NavHighlight.stories.js +1 -0
  154. package/src/components/NavJumpMenu/NavJumpMenu.stories.js +5 -2
  155. package/src/components/NavLinkList/NavLinkList.stories.js +1 -0
  156. package/src/components/NavLinkList/NavLinkList.vue +3 -3
  157. package/src/components/NavLogoLinks/NavLogoLinks.stories.js +1 -0
  158. package/src/components/NavMobile/NavMobile.stories.js +9 -3
  159. package/src/components/NavMobile/NavMobile.vue +18 -5
  160. package/src/components/NavMobile/NavMobileDropdown.vue +2 -2
  161. package/src/components/NavMobile/NavMobileEdu.stories.js +3 -2
  162. package/src/components/NavMobile/NavMobileLink.vue +4 -4
  163. package/src/components/NavSearchForm/NavSearchForm.stories.js +1 -0
  164. package/src/components/NavSecondary/NavSecondary.stories.js +1 -0
  165. package/src/components/NavSecondary/NavSecondary.vue +7 -4
  166. package/src/components/NavSecondary/NavSecondaryDropdownContent.vue +1 -1
  167. package/src/components/NavSocial/NavSocial.stories.js +1 -0
  168. package/src/components/NewsDetailMediaContact/NewsDetailMediaContact.stories.js +2 -1
  169. package/src/components/NewsDetailMediaContact/NewsDetailMediaContact.vue +1 -1
  170. package/src/components/ParallaxContainer/ParallaxContainer.vue +1 -0
  171. package/src/components/PodcastSeriesCarousel/PodcastSeriesCarousel.vue +6 -5
  172. package/src/components/RoboticsDetailStats/RoboticsDetailStats.stories.js +1 -6
  173. package/src/components/SearchFilterGroup/SearchFilterGroup.stories.js +1 -0
  174. package/src/components/SearchInput/SearchInput.stories.js +1 -0
  175. package/src/components/SearchPagination/SearchPagination.stories.js +1 -0
  176. package/src/components/SearchResultCard/SearchResultCard.stories.js +1 -10
  177. package/src/components/SearchResultCard/SearchResultCard.vue +1 -0
  178. package/src/components/SearchResultGridItem/SearchResultGridItem.stories.js +1 -10
  179. package/src/components/SearchResultGridItem/SearchResultGridItem.vue +5 -2
  180. package/src/components/SearchResultsList/SearchResultsList.stories.js +1 -1
  181. package/src/components/SearchSelectMenu/SearchSelectMenu.stories.js +2 -1
  182. package/src/components/SwimlaneCTA/SwimlaneCTA.vue +1 -0
  183. package/src/components/TextArea/TextArea.stories.js +2 -1
  184. package/src/components/TextInput/TextInput.stories.js +2 -1
  185. package/src/components/TheFooter/TheFooter.stories.js +1 -0
  186. package/src/components/TheFooter/TheFooter.vue +30 -4
  187. package/src/components/ThumbnailCarousel/ThumbnailCarousel.stories.js +1 -1
  188. package/src/components/ThumbnailCarousel/ThumbnailCarousel.vue +2 -1
  189. package/src/components/TimelineDialog/TimelineDialog.vue +2 -2
  190. package/src/components/TopicDetailMissionCarousel/TopicDetailMissionCarousel.stories.js +1 -0
  191. package/src/components/TopicDetailMore/TopicDetailMore.stories.js +1 -0
  192. package/src/components/TopicDetailMoreItem/TopicDetailMoreItem.stories.js +1 -0
  193. package/src/components/TopicDetailStreamfield/TopicDetailStreamfield.vue +2 -2
  194. package/src/constants.ts +3 -5
  195. package/src/interfaces.ts +31 -6
  196. package/src/templates/PageAudioDetail/PageAudioDetail.vue +2 -2
  197. package/src/templates/edu/PageEduGalleryDetail/PageEduGalleryDetail.vue +10 -6
  198. package/src/templates/edu/PageEduStudentProject/PageEduStudentProjectSection.vue +10 -6
  199. package/src/templates/www/PageTopicDetail/PageTopicDetail.vue +2 -1
  200. package/src/utils/mixins.ts +7 -7
@@ -52,6 +52,7 @@
52
52
  </div>
53
53
  </template>
54
54
  <script lang="ts">
55
+ /** A tabbed carousel of podcast seasons based on series. If a season `id` is provided, the carousel will default to showing that season. If the user is currently on an episode page within the displayed season, that episode will be the active slide in the carousel. */
55
56
  import { defineComponent } from 'vue'
56
57
  import { useRoute } from 'vue-router'
57
58
  import type { PropType } from 'vue'
@@ -61,25 +62,25 @@ import ThumbnailCarousel from './../ThumbnailCarousel/ThumbnailCarousel.vue'
61
62
 
62
63
  const route = useRoute()
63
64
 
64
- interface Slide {
65
+ export interface Slide {
65
66
  url: string
66
67
  title: string
67
68
  thumbnailImage: Partial<ImageObject>
68
69
  }
69
70
 
70
- interface Episode {
71
+ export interface Episode {
71
72
  url: string
72
73
  title: string
73
74
  publicationDate: any
74
75
  thumbnailImage: Partial<ImageObject>
75
76
  }
76
77
 
77
- interface ActiveTab {
78
+ export interface ActiveTab {
78
79
  title?: string
79
80
  episodes?: Episode[] | Season
80
81
  }
81
82
 
82
- interface Season {
83
+ export interface Season {
83
84
  id: string
84
85
  url?: string
85
86
  title?: string
@@ -87,7 +88,7 @@ interface Season {
87
88
  episodes?: Episode[]
88
89
  }
89
90
 
90
- interface Series {
91
+ export interface Series {
91
92
  id: string
92
93
  title?: string
93
94
  url?: string
@@ -15,12 +15,7 @@ export default {
15
15
  root: '#storyRoot'
16
16
  }
17
17
  },
18
- excludeStories: /.*Data$/,
19
- argTypes: {
20
- status: {
21
- control: { type: 'text' }
22
- }
23
- }
18
+ excludeStories: /.*Data$/
24
19
  }
25
20
 
26
21
  export const RoboticsDetailStatsData = {
@@ -3,6 +3,7 @@ import SearchFilterGroup from './SearchFilterGroup.vue'
3
3
  export default {
4
4
  title: 'Components/Search/SearchFilterGroup',
5
5
  component: SearchFilterGroup,
6
+ tags: ['search'],
6
7
  excludeStories: /.*Data$/
7
8
  }
8
9
 
@@ -3,6 +3,7 @@ import SearchInput from './SearchInput.vue'
3
3
  export default {
4
4
  title: 'Components/Search/SearchInput',
5
5
  component: SearchInput,
6
+ tags: ['forms', 'search'],
6
7
  excludeStories: /.*Data$/
7
8
  }
8
9
 
@@ -3,6 +3,7 @@ import SearchPagination from './SearchPagination.vue'
3
3
  export default {
4
4
  title: 'Components/Search/SearchPagination',
5
5
  component: SearchPagination,
6
+ tags: ['search'],
6
7
  excludeStories: /.*Data$/
7
8
  }
8
9
 
@@ -3,16 +3,7 @@ import SearchResultCard from './SearchResultCard.vue'
3
3
  export default {
4
4
  title: 'Components/Cards/SearchResultCards',
5
5
  component: SearchResultCard,
6
- argTypes: {
7
- headingLevel: {
8
- description:
9
- 'Change the heading level for semantic markup. This does not affect the style of the heading.',
10
- control: {
11
- type: 'select'
12
- },
13
- options: [null, 'h1', 'h2', 'h3', 'h4', 'h5']
14
- }
15
- },
6
+ tags: ['cards', 'search'],
16
7
  excludeStories: /.*Data$/
17
8
  }
18
9
 
@@ -289,6 +289,7 @@ export default defineComponent({
289
289
  required: false,
290
290
  default: false
291
291
  },
292
+ /** Change the heading level for semantic markup. This does not affect the style of the heading. */
292
293
  headingLevel: {
293
294
  type: (String as PropType<HeadingLevel>) || null,
294
295
  required: false,
@@ -3,21 +3,12 @@ import SearchResultGridItem from './SearchResultGridItem.vue'
3
3
  export default {
4
4
  title: 'Components/Cards/SearchResultGridItem',
5
5
  component: SearchResultGridItem,
6
+ tags: ['search', 'cards'],
6
7
  decorators: [
7
8
  () => ({
8
9
  template: `<div id="storyRoot" class="relative grid grid-cols-2 gap-3 lg:grid-cols-3"><story/></div>`
9
10
  })
10
11
  ],
11
- argTypes: {
12
- headingLevel: {
13
- description:
14
- 'Change the heading level for semantic markup. This does not affect the style of the heading.',
15
- control: {
16
- type: 'select',
17
- options: [null, 'h1', 'h2', 'h3', 'h4', 'h5']
18
- }
19
- }
20
- },
21
12
  parameters: {
22
13
  html: {
23
14
  root: '#storyRoot'
@@ -196,13 +196,16 @@ export default defineComponent({
196
196
  type: String,
197
197
  default: undefined
198
198
  },
199
+ /** Change the heading level for semantic markup. This does not affect the style of the heading. */
199
200
  headingLevel: {
200
201
  type: (String as PropType<HeadingLevel>) || null,
201
- required: false
202
+ required: false,
203
+ default: undefined
202
204
  },
203
205
  pageContentType: {
204
206
  type: String,
205
- required: false
207
+ required: false,
208
+ default: undefined
206
209
  },
207
210
  primarySubject: {
208
211
  type: Object as PropType<PrimarySubjectObject>,
@@ -3,12 +3,12 @@ import SearchResultsList from './SearchResultsList.vue'
3
3
  export default {
4
4
  title: 'Components/Search/SearchResultsList',
5
5
  component: SearchResultsList,
6
+ tags: ['search', 'listings'],
6
7
  decorators: [
7
8
  () => ({
8
9
  template: `<div id="storyRoot" class="max-w-screen-xl"><story/></div>`
9
10
  })
10
11
  ],
11
- tags: ['!autodocs'],
12
12
  parameters: {
13
13
  html: {
14
14
  root: '#storyRoot'
@@ -2,7 +2,8 @@ import SearchSelectMenu from './SearchSelectMenu.vue'
2
2
 
3
3
  export default {
4
4
  title: 'Components/Search/SearchSelectMenu',
5
- component: SearchSelectMenu
5
+ component: SearchSelectMenu,
6
+ tags: ['search']
6
7
  }
7
8
 
8
9
  export const BaseStory = {
@@ -122,6 +122,7 @@
122
122
  </template>
123
123
 
124
124
  <script lang="ts">
125
+ /** The SwimlaneCTA component combines BaseSwimlane with other elements (JPL logo, links, etc.) to create the component that is used on the WWW homepage. */
125
126
  import { defineComponent } from 'vue'
126
127
  import jplLogoSFFF from '@explorer-1/common/src/images/png/brand-jpl-logo-FFFFFF-S-94h28w@2x.png'
127
128
  import jplLogoFFF from '@explorer-1/common/src/images/png/brand-jpl-logo-FFFFFF-94h28w@2x.png'
@@ -2,7 +2,8 @@ import TextArea from './TextArea.vue'
2
2
 
3
3
  export default {
4
4
  title: 'Components/Forms/TextArea',
5
- component: TextArea
5
+ component: TextArea,
6
+ tags: ['forms']
6
7
  }
7
8
 
8
9
  // stories
@@ -2,7 +2,8 @@ import TextInput from './TextInput.vue'
2
2
 
3
3
  export default {
4
4
  title: 'Components/Forms/TextInput',
5
- component: TextInput
5
+ component: TextInput,
6
+ tags: ['forms']
6
7
  }
7
8
 
8
9
  // stories
@@ -3,6 +3,7 @@ import TheFooter from './TheFooter.vue'
3
3
  export default {
4
4
  title: 'Navigation/Footers/External Footer',
5
5
  component: TheFooter,
6
+ tags: ['navigation'],
6
7
  excludeStories: /.*Data$/,
7
8
  parameters: {
8
9
  docs: {
@@ -190,10 +190,10 @@
190
190
  </template>
191
191
  <script lang="ts">
192
192
  // @ts-nocheck
193
- import { defineComponent } from 'vue'
193
+ import { defineComponent, type PropType } from 'vue'
194
194
  import { mapStores } from 'pinia'
195
195
  import { useThemeStore } from './../../store/theme'
196
- import { mixinGetRouterLink, mixinGetLinkText } from './../../utils/mixins'
196
+ import { mixinGetRouterLink, mixinGetLinkText, type NavLinkObject } from './../../utils/mixins'
197
197
  import IconExternal from './../Icons/IconExternal.vue'
198
198
  import BaseLink from './../BaseLink/BaseLink.vue'
199
199
  import BaseButton from './../BaseButton/BaseButton.vue'
@@ -201,6 +201,31 @@ import NavSocial from './../NavSocial/NavSocial.vue'
201
201
  import TheFooterSignUp from './../TheFooter/TheFooterSignUp.vue'
202
202
  import LogoCaltech from './../LogoCaltech/LogoCaltech.vue'
203
203
 
204
+ export type FooterNavItem = {
205
+ titleLink: {
206
+ linkPage: {
207
+ title: string
208
+ url: string
209
+ }
210
+ title: string
211
+ }
212
+ links: NavLinkObject[]
213
+ }
214
+
215
+ export type FooterData = {
216
+ footerMoreFromJpl: NavLinkObject[]
217
+ footerNavigation: FooterNavItem[]
218
+ footerLinks: NavLinkObject[]
219
+ relatedNasaSites: {
220
+ title: string
221
+ path: string
222
+ }[]
223
+ footerMeta: {
224
+ label: string
225
+ text: string
226
+ }[]
227
+ }
228
+
204
229
  export default defineComponent({
205
230
  name: 'TheFooter',
206
231
  components: {
@@ -213,13 +238,14 @@ export default defineComponent({
213
238
  },
214
239
  props: {
215
240
  data: {
216
- type: Object || null,
241
+ type: Object as PropType<FooterData>,
217
242
  required: false,
218
243
  default: null
219
244
  },
220
245
  commitSha: {
221
246
  type: String,
222
- required: false
247
+ required: false,
248
+ default: undefined
223
249
  }
224
250
  },
225
251
  methods: {
@@ -3,7 +3,7 @@ import ThumbnailCarousel from './ThumbnailCarousel.vue'
3
3
  export default {
4
4
  title: 'Components/Utilities/ThumbnailCarousel',
5
5
  component: ThumbnailCarousel,
6
- tags: ['skip-test'],
6
+ tags: ['carousels', 'listings'],
7
7
  parameters: {
8
8
  docs: {
9
9
  description: {
@@ -17,13 +17,14 @@
17
17
  </MixinCarousel>
18
18
  </template>
19
19
  <script lang="ts">
20
+ /** Ideal for use in a tabbed carousel. See `PodcastSeriesCarousel` and `PageImageDetail` for usage examples. Styled with three cards and a basic card style with a square image. */
20
21
  import { defineComponent } from 'vue'
21
22
  import type { PropType } from 'vue'
22
23
  import type { ImageObject } from '../../interfaces'
23
24
  import MixinCarousel from './../MixinCarousel/MixinCarousel.vue'
24
25
  import SearchResultGridItem from './../SearchResultGridItem/SearchResultGridItem.vue'
25
26
 
26
- interface Slide {
27
+ export interface Slide {
27
28
  url: string
28
29
  title: string
29
30
  thumbnailImage: Partial<ImageObject>
@@ -52,7 +52,7 @@
52
52
  />
53
53
  </BaseImagePlaceholder>
54
54
  <!-- @ts-ignore -->
55
- <BlockVideoEmbed :data="data" />
55
+ <BlockVideoEmbed :data="data as unknown as BlockVideoEmbedData" />
56
56
  <BlockText
57
57
  variant="medium"
58
58
  :text="data.description"
@@ -80,7 +80,7 @@ import BaseImage from './../BaseImage/BaseImage.vue'
80
80
  import BaseImagePlaceholder from './../BaseImagePlaceholder/BaseImagePlaceholder.vue'
81
81
  import BaseLink from './../BaseLink/BaseLink.vue'
82
82
  import BlockText from './../BlockText/BlockText.vue'
83
- import BlockVideoEmbed from './../BlockVideoEmbed/BlockVideoEmbed.vue'
83
+ import BlockVideoEmbed, { type BlockVideoEmbedData } from './../BlockVideoEmbed/BlockVideoEmbed.vue'
84
84
 
85
85
  export default defineComponent({
86
86
  name: 'TimelineDialog',
@@ -2,6 +2,7 @@ import TopicDetailMissionCarousel from './TopicDetailMissionCarousel.vue'
2
2
  export default {
3
3
  title: 'Components/WWW/TopicDetail/MissionCarousel/TopicDetailMissionCarousel',
4
4
  component: TopicDetailMissionCarousel,
5
+ tags: ['carousels', 'listings'],
5
6
  excludeStories: /.*Data$/
6
7
  }
7
8
 
@@ -2,6 +2,7 @@ import TopicDetailMore from './TopicDetailMore.vue'
2
2
  export default {
3
3
  title: 'Components/WWW/TopicDetail/TopicDetailMore',
4
4
  component: TopicDetailMore,
5
+ tags: ['listings'],
5
6
  excludeStories: /.*Data$/
6
7
  }
7
8
 
@@ -2,6 +2,7 @@ import TopicDetailMoreItem from './TopicDetailMoreItem.vue'
2
2
  export default {
3
3
  title: 'Components/WWW/TopicDetail/TopicDetailMore/TopicDetailMoreItem',
4
4
  component: TopicDetailMoreItem,
5
+ tags: ['cards'],
5
6
  decorators: [
6
7
  () => ({
7
8
  template: `<div id="storyRoot" class="lg:w-1/3"><story/></div>`
@@ -67,7 +67,7 @@ import BlockRelatedLinks, {
67
67
  } from './../BlockRelatedLinks/BlockRelatedLinks.vue'
68
68
  import BlockImageGallery from './../BlockImageGallery/BlockImageGallery.vue'
69
69
 
70
- interface BlockData {
70
+ export interface TopicDetailStreamfieldBlockData {
71
71
  blockType: string
72
72
  heading: string
73
73
  galleryTitle: string
@@ -86,7 +86,7 @@ export default defineComponent({
86
86
  },
87
87
  props: {
88
88
  data: {
89
- type: Array as PropType<BlockData[]>,
89
+ type: Array as PropType<TopicDetailStreamfieldBlockData[]>,
90
90
  required: false
91
91
  },
92
92
  topic: {
package/src/constants.ts CHANGED
@@ -1,6 +1,4 @@
1
- import type { PillDictionaryInterface } from './interfaces'
2
-
3
- export const eduMetadataDictionary: PillDictionaryInterface = {
1
+ export const eduMetadataDictionary = {
4
2
  EDUNewsPage: {
5
3
  label: 'News',
6
4
  variant: 'primary',
@@ -73,7 +71,7 @@ export const eduMetadataDictionary: PillDictionaryInterface = {
73
71
  icons: 'secondary',
74
72
  type: 'resource'
75
73
  }
76
- }
74
+ } as const
77
75
 
78
76
  interface contentTypeObject {
79
77
  model: string
@@ -230,7 +228,7 @@ export const contentTypes: contentTypeObject[] = [
230
228
  model: 'edu_resources.EDUVideoDetailPage',
231
229
  label: 'EDU Videos'
232
230
  }
233
- ]
231
+ ] as const
234
232
 
235
233
  interface contentAliasObject extends contentTypeObject {
236
234
  interface?: string
package/src/interfaces.ts CHANGED
@@ -1,3 +1,7 @@
1
+ import { eduMetadataDictionary } from './constants'
2
+
3
+ export type ContentTypeKey = keyof typeof eduMetadataDictionary
4
+
1
5
  export interface BreadcrumbPathObject {
2
6
  path: string
3
7
  title: string
@@ -24,7 +28,7 @@ export interface StreamfieldBlockData extends BlockData {
24
28
  galleryDescription?: string
25
29
  coverImage?: ImageObject
26
30
  gallerySlides?: ImageObject[]
27
- blocks?: object[]
31
+ blocks?: StreamfieldBlockData[] | Card[] | ImageObject[] | VideoObject[]
28
32
  value?: string
29
33
  customLabel?: string
30
34
  introduction?: string
@@ -42,6 +46,7 @@ export interface StreamfieldBlockData extends BlockData {
42
46
  rowData?: any
43
47
  apiEndpoint?: string
44
48
  attachmentPrefix?: string
49
+ listingPageHeroImage?: ImageObject
45
50
  }
46
51
 
47
52
  export interface ImageSrcObject {
@@ -73,9 +78,29 @@ export interface ImageObject {
73
78
  cover?: string
74
79
  image?: ImageObject
75
80
  displayCaption?: boolean
81
+ listingPageHeroImage?: ImageObject
76
82
  }
77
83
 
78
- export interface ImageBlock extends BlockData, ImageObject {}
84
+ export interface VideoObject {
85
+ duration?: string
86
+ file: string
87
+ fileExtension?: string
88
+ fileOgg?: string // no webpack loader for ogg files
89
+ fileWebm?: string
90
+ height?: string | number
91
+ id: string
92
+ sources?: string
93
+ title: string
94
+ type?: string
95
+ width?: string | number
96
+ }
97
+
98
+ export interface ImageBlock extends BlockData, ImageObject {
99
+ fullBleed: boolean
100
+ imageFullBleed: ImageObject
101
+ displayCaption: boolean
102
+ constrain: boolean
103
+ }
79
104
 
80
105
  export interface ElasticSearchPage {
81
106
  _source: string
@@ -250,9 +275,7 @@ export interface LabelObject {
250
275
  icons?: string
251
276
  type?: MetadataType
252
277
  }
253
- export interface PillDictionaryInterface {
254
- [EDUExplainerArticlePage: string]: LabelObject
255
- }
278
+
256
279
  export interface DictionaryInterface {
257
280
  [key: string]: string
258
281
  }
@@ -263,8 +286,9 @@ export interface AccordionItemObject {
263
286
 
264
287
  export type MetaPanelTheme = 'primary' | 'secondary' | 'stars'
265
288
 
289
+ export type HeadingLevels = 'h2' | 'h3' | 'h4' | 'h5' | 'h6'
266
290
  export interface PageObject {
267
- __typename: string
291
+ __typename: ContentTypeKey
268
292
  contentType: string
269
293
  lastPublishedAt?: string
270
294
  breadcrumb?: string
@@ -275,6 +299,7 @@ export interface PageObject {
275
299
  getTopicsForDisplay?: Topic[]
276
300
  showJumpMenu?: boolean
277
301
  label?: string
302
+ topicLabel?: string
278
303
  summary?: string
279
304
  topper?: string
280
305
  seoTitle?: string
@@ -50,7 +50,7 @@
50
50
  />
51
51
  </template>
52
52
  </LayoutHelper>
53
- <BlockAudio :data="data" />
53
+ <BlockAudio :data="data as BlockAudioData" />
54
54
  <LayoutHelper
55
55
  indent="col-2"
56
56
  class="lg:pt-12 pt-4"
@@ -228,7 +228,7 @@ import DetailHeadline from './../../components/DetailHeadline/DetailHeadline.vue
228
228
  import BaseButton from './../../components/BaseButton/BaseButton.vue'
229
229
  import BlockRelatedLinks from './../../components/BlockRelatedLinks/BlockRelatedLinks.vue'
230
230
  import BlockText from './../../components/BlockText/BlockText.vue'
231
- import BlockAudio from './../../components/BlockAudio/BlockAudio.vue'
231
+ import BlockAudio, { type BlockAudioData } from './../../components/BlockAudio/BlockAudio.vue'
232
232
  import IconDownload from './../../components/Icons/IconDownload.vue'
233
233
  import IconDropdown from './../../components/Icons/IconDropdown.vue'
234
234
  import BlockLinkCarousel from './../../components/BlockLinkCarousel/BlockLinkCarousel.vue'
@@ -9,10 +9,14 @@ import LayoutHelper from './../../../components/LayoutHelper/LayoutHelper.vue'
9
9
  import BaseHeading from './../../../components/BaseHeading/BaseHeading.vue'
10
10
  import DetailHeadline from './../../../components/DetailHeadline/DetailHeadline.vue'
11
11
  import ShareButtonsEdu from './../../../components/ShareButtonsEdu/ShareButtonsEdu.vue'
12
- import BlockVideo from './../../../components/BlockVideo/BlockVideo.vue'
12
+ import BlockVideo, { type BlockVideoData } from './../../../components/BlockVideo/BlockVideo.vue'
13
13
  import BlockImageStandard from './../../../components/BlockImage/BlockImageStandard.vue'
14
- import BlockImageComparison from './../../../components/BlockImageComparison/BlockImageComparison.vue'
15
- import BlockVideoEmbed from './../../../components/BlockVideoEmbed/BlockVideoEmbed.vue'
14
+ import BlockImageComparison, {
15
+ type BlockImageComparisonData
16
+ } from './../../../components/BlockImageComparison/BlockImageComparison.vue'
17
+ import BlockVideoEmbed, {
18
+ type BlockVideoEmbedData
19
+ } from './../../../components/BlockVideoEmbed/BlockVideoEmbed.vue'
16
20
  import BlockRelatedLinks from './../../../components/BlockRelatedLinks/BlockRelatedLinks.vue'
17
21
  import BlockLinkCarousel from './../../../components/BlockLinkCarousel/BlockLinkCarousel.vue'
18
22
  import BlockText from './../../../components/BlockText/BlockText.vue'
@@ -134,7 +138,7 @@ const { data } = reactive(props)
134
138
  <template v-else-if="block.blockType === 'ImageComparisonBlock'">
135
139
  <LayoutHelper indent="col-2">
136
140
  <BlockImageComparison
137
- :data="block"
141
+ :data="block as BlockImageComparisonData"
138
142
  :custom-detail-url="item.externalLink"
139
143
  />
140
144
  </LayoutHelper>
@@ -142,7 +146,7 @@ const { data } = reactive(props)
142
146
  <template v-else-if="block.blockType === 'VideoBlock'">
143
147
  <LayoutHelper indent="col-2">
144
148
  <BlockVideo
145
- :data="block"
149
+ :data="block as BlockVideoData"
146
150
  :custom-detail-url="item.externalLink"
147
151
  />
148
152
  </LayoutHelper>
@@ -150,7 +154,7 @@ const { data } = reactive(props)
150
154
  <template v-else-if="block.blockType === 'VideoEmbedBlock'">
151
155
  <LayoutHelper indent="col-2">
152
156
  <BlockVideoEmbed
153
- :data="block"
157
+ :data="block as BlockVideoEmbedData"
154
158
  :custom-detail-url="item.externalLink"
155
159
  />
156
160
  </LayoutHelper>
@@ -8,7 +8,9 @@ import BlockHeading, {
8
8
  import type { EduStudentProjectStep } from './PageEduStudentProject.vue'
9
9
  import HeroInlineMedia from './../../../components/HeroInlineMedia/HeroInlineMedia.vue'
10
10
  import LayoutHelper from './../../../components/LayoutHelper/LayoutHelper.vue'
11
- import BlockInlineImage from './../../../components/BlockInlineImage/BlockInlineImage.vue'
11
+ import BlockInlineImage, {
12
+ type BlockInlineImageData
13
+ } from './../../../components/BlockInlineImage/BlockInlineImage.vue'
12
14
  import BlockImageStandard from './../../../components/BlockImage/BlockImageStandard.vue'
13
15
  import BlockStreamfield from './../../../components/BlockStreamfield/BlockStreamfield.vue'
14
16
  import { getHeadingId } from './../../../utils/getHeadingId'
@@ -52,11 +54,13 @@ const { heading, blocks, image, steps, stepsNumbering, text } = reactive(props)
52
54
  <!-- simple richtext -->
53
55
  <BlockInlineImage
54
56
  v-if="text"
55
- :data="{
56
- text: text,
57
- image: image,
58
- alignTo: 'right'
59
- }"
57
+ :data="
58
+ {
59
+ text: text,
60
+ image: image,
61
+ alignTo: 'right'
62
+ } as BlockInlineImageData
63
+ "
60
64
  class="lg:mb-18 mb-10"
61
65
  />
62
66
 
@@ -114,7 +114,8 @@ export default defineComponent({
114
114
  props: {
115
115
  data: {
116
116
  type: Object,
117
- required: false
117
+ required: false,
118
+ default: undefined
118
119
  }
119
120
  }
120
121
  })
@@ -15,13 +15,13 @@ export interface SrcSetDataValue {
15
15
  width: number
16
16
  }
17
17
  // nav link object
18
- export type LinkObject = {
19
- linkPage: {
18
+ export type NavLinkObject = {
19
+ linkPage?: {
20
20
  title: string
21
21
  url: string
22
- } | null
23
- title: string | null
24
- path: string | null
22
+ }
23
+ title?: string
24
+ path?: string
25
25
  }
26
26
  // breadcrumbs used for nav and secondary nav
27
27
  export type BreadcrumbObject = {
@@ -78,7 +78,7 @@ export const mixinTransparentHeader = () => {
78
78
  and provides a graceful fallback to use the page title
79
79
  if one exists.
80
80
  */
81
- export const mixinGetLinkText = (item: LinkObject): string => {
81
+ export const mixinGetLinkText = (item: NavLinkObject): string => {
82
82
  if (item.title) {
83
83
  return item.title
84
84
  } else if (item.linkPage) {
@@ -96,7 +96,7 @@ export const mixinGetLinkText = (item: LinkObject): string => {
96
96
  TODO: need to modify this to work with breadcrumb-passed objects too
97
97
  strategy: check if path starts with a slash.
98
98
  */
99
- export const mixinGetRouterLink = (link: LinkObject): string | undefined => {
99
+ export const mixinGetRouterLink = (link: NavLinkObject): string | undefined => {
100
100
  if (link.linkPage && link.linkPage.url) {
101
101
  return link.linkPage.url
102
102
  } else if (link.path) {