@explorer-1/vue 0.2.50 → 0.2.52

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 (71) hide show
  1. package/components.d.ts +2 -0
  2. package/dist/explorer-1-vue.js +3228 -3167
  3. package/dist/explorer-1-vue.umd.cjs +10 -10
  4. package/dist/img/SwimlaneCTA/backgroundImages/JPL_is__Artists.jpg +0 -0
  5. package/dist/img/SwimlaneCTA/backgroundImages/JPL_is__Communicators.jpg +0 -0
  6. package/dist/img/SwimlaneCTA/backgroundImages/JPL_is__Designers.jpg +0 -0
  7. package/dist/img/SwimlaneCTA/backgroundImages/JPL_is__Disruptors.jpg +0 -0
  8. package/dist/img/SwimlaneCTA/backgroundImages/JPL_is__Dreamers.jpg +0 -0
  9. package/dist/img/SwimlaneCTA/backgroundImages/JPL_is__Educators.jpg +0 -0
  10. package/dist/img/SwimlaneCTA/backgroundImages/JPL_is__Innovators.jpg +0 -0
  11. package/dist/img/SwimlaneCTA/backgroundImages/JPL_is__Inventors.jpg +0 -0
  12. package/dist/img/SwimlaneCTA/backgroundImages/JPL_is__Makers.jpg +0 -0
  13. package/dist/img/SwimlaneCTA/backgroundImages/JPL_is__Problem_Solvers.jpg +0 -0
  14. package/dist/img/SwimlaneCTA/backgroundImages/JPL_is__Robiticists.jpg +0 -0
  15. package/dist/img/SwimlaneCTA/backgroundImages/JPL_is__Scientists.jpg +0 -0
  16. package/dist/img/SwimlaneCTA/backgroundImages/JPL_is__Software_Engineers.jpg +0 -0
  17. package/dist/img/SwimlaneCTA/backgroundImages/JPL_is__Thinkers.jpg +0 -0
  18. package/dist/img/SwimlaneCTA/backgroundImages/JPL_is__Visualizers.jpg +0 -0
  19. package/dist/img/SwimlaneCTA/backgroundImagesSmall/JPL_is__Artists.jpg +0 -0
  20. package/dist/img/SwimlaneCTA/backgroundImagesSmall/JPL_is__Communicators.jpg +0 -0
  21. package/dist/img/SwimlaneCTA/backgroundImagesSmall/JPL_is__Designers.jpg +0 -0
  22. package/dist/img/SwimlaneCTA/backgroundImagesSmall/JPL_is__Disruptors.jpg +0 -0
  23. package/dist/img/SwimlaneCTA/backgroundImagesSmall/JPL_is__Dreamers.jpg +0 -0
  24. package/dist/img/SwimlaneCTA/backgroundImagesSmall/JPL_is__Educators.jpg +0 -0
  25. package/dist/img/SwimlaneCTA/backgroundImagesSmall/JPL_is__Innovators.jpg +0 -0
  26. package/dist/img/SwimlaneCTA/backgroundImagesSmall/JPL_is__Inventors.jpg +0 -0
  27. package/dist/img/SwimlaneCTA/backgroundImagesSmall/JPL_is__Makers.jpg +0 -0
  28. package/dist/img/SwimlaneCTA/backgroundImagesSmall/JPL_is__Problem_Solvers.jpg +0 -0
  29. package/dist/img/SwimlaneCTA/backgroundImagesSmall/JPL_is__Robiticists.jpg +0 -0
  30. package/dist/img/SwimlaneCTA/backgroundImagesSmall/JPL_is__Scientists.jpg +0 -0
  31. package/dist/img/SwimlaneCTA/backgroundImagesSmall/JPL_is__Software_Engineers.jpg +0 -0
  32. package/dist/img/SwimlaneCTA/backgroundImagesSmall/JPL_is__Thinkers.jpg +0 -0
  33. package/dist/img/SwimlaneCTA/backgroundImagesSmall/JPL_is__Visualizers.jpg +0 -0
  34. package/dist/src/components/BaseButton/BaseButton.stories.d.ts +1 -1
  35. package/dist/src/components/BaseButton/BaseButton.vue.d.ts +1 -1
  36. package/dist/src/components/BaseModal/BaseModal.stories.d.ts +2 -2
  37. package/dist/src/components/BlockStreamfield/BlockStreamfield.vue.d.ts +12 -0
  38. package/dist/src/components/HomepageMissionsCarousel/HomepageMissionsCarousel.stories.d.ts +5 -1
  39. package/dist/src/components/HomepageMissionsCarousel/HomepageMissionsCarouselItem.vue.d.ts +5 -1
  40. package/dist/src/components/SearchFilterGroup/SearchFilterGroup.vue.d.ts +1 -0
  41. package/dist/src/components/SearchResultCard/SearchResultCard.vue.d.ts +9 -0
  42. package/dist/src/components/SearchResultGridItem/SearchResultGridItem.vue.d.ts +9 -0
  43. package/dist/src/components/TextInput/TextInput.vue.d.ts +5 -2
  44. package/dist/src/components/YearTicker/YearTicker.stories.d.ts +1 -0
  45. package/dist/src/components/YearTicker/YearTicker.vue.d.ts +1 -0
  46. package/dist/src/interfaces.d.ts +4 -2
  47. package/dist/src/templates/edu/PageEduLesson/PageEduLesson.stories.d.ts +3 -5
  48. package/dist/src/templates/edu/PageEduStudentProject/PageEduStudentProject.stories.d.ts +601 -0
  49. package/dist/src/utils/generateHash.d.ts +1 -0
  50. package/dist/style.css +1 -1
  51. package/package.json +2 -2
  52. package/src/components/BlockIframeEmbed/BlockIframeEmbed.vue +1 -1
  53. package/src/components/BlockImage/BlockImage.vue +4 -1
  54. package/src/components/BlockImage/BlockImageFullBleed.vue +5 -2
  55. package/src/components/BlockImage/BlockImageStandard.vue +5 -2
  56. package/src/components/BlockImageCarouselItem/BlockImageCarouselItem.vue +5 -2
  57. package/src/components/BlockImageComparison/BlockImageComparison.vue +5 -2
  58. package/src/components/BlockInlineImage/BlockInlineImage.vue +9 -2
  59. package/src/components/BlockStreamfield/BlockStreamfield.vue +46 -23
  60. package/src/components/BlockVideo/BlockVideo.vue +1 -1
  61. package/src/components/BlockVideoEmbed/BlockVideoEmbed.vue +1 -1
  62. package/src/components/HeroInlineMedia/HeroInlineMedia.vue +2 -21
  63. package/src/components/HeroMedia/HeroMedia.vue +1 -1
  64. package/src/components/MetaPanel/MetaPanel.vue +49 -44
  65. package/src/components/SearchResultsList/SearchResultsList.vue +4 -1
  66. package/src/templates/edu/PageEduLesson/PageEduLesson.stories.js +3 -3
  67. package/src/templates/edu/PageEduLesson/PageEduLesson.vue +9 -7
  68. package/src/templates/edu/PageEduLesson/PageEduLessonSection.vue +3 -8
  69. package/src/templates/edu/PageEduStudentProject/PageEduStudentProject.stories.js +253 -0
  70. package/src/templates/edu/PageEduStudentProject/PageEduStudentProject.vue +419 -0
  71. package/src/templates/edu/PageEduStudentProject/PageEduStudentProjectSection.vue +179 -0
@@ -38,7 +38,7 @@ interface PageEduLessonObject extends PageEduResourcesObject {
38
38
  [key: string]: any
39
39
  studentProject: {
40
40
  title: string
41
- urlPath: string
41
+ url: string
42
42
  }
43
43
  overview: StreamfieldBlockData[]
44
44
  overviewHeading: string
@@ -273,19 +273,18 @@ const consolidatedSections = computed((): EduLessonSectionObject[] => {
273
273
  :title="data.title"
274
274
  :image="data.thumbnailImage?.original"
275
275
  />
276
- <p
277
- v-if="data.studentProject"
276
+ <div
277
+ v-if="data.studentProject?.url"
278
278
  class="mt-8 font-bold text-body-lg"
279
279
  >
280
280
  Find out what’s involved for students:
281
281
  <BaseLink
282
282
  class="font-normal inline text-action underline hover:text-action-dark cursor-pointer"
283
283
  variant="none"
284
- :to="data.studentProject.urlPath"
285
284
  >
286
285
  View the Project Steps
287
286
  </BaseLink>
288
- </p>
287
+ </div>
289
288
  </LayoutHelper>
290
289
  <MetaPanel
291
290
  button="View Standards"
@@ -293,7 +292,7 @@ const consolidatedSections = computed((): EduLessonSectionObject[] => {
293
292
  :class="{ 'mb-10 lg:mb-14': heroInline || data?.hero?.length === 0 }"
294
293
  :primary-subject="data.primarySubject"
295
294
  :additional-subjects="data.additionalSubjects"
296
- :time="data.time"
295
+ :time="data.customTime ? { time: data.customTime } : data.time"
297
296
  :grade-levels="data.gradeLevels"
298
297
  :standards="data.standards"
299
298
  :negative-bottom="heroInline || data?.hero?.length !== 0"
@@ -353,7 +352,10 @@ const consolidatedSections = computed((): EduLessonSectionObject[] => {
353
352
  </template>
354
353
 
355
354
  <!-- streamfield blocks -->
356
- <BlockStreamfield :data="data.body" />
355
+ <BlockStreamfield
356
+ v-if="data.body?.length"
357
+ :data="data.body"
358
+ />
357
359
 
358
360
  <!-- related links -->
359
361
  <LayoutHelper
@@ -1,6 +1,5 @@
1
1
  <script setup lang="ts">
2
- import { computed, reactive } from 'vue'
3
- import { camelCase } from 'lodash'
2
+ import { reactive } from 'vue'
4
3
  import type { ImageObject, StreamfieldBlockData } from './../../../interfaces'
5
4
  import BlockHeading, {
6
5
  type BlockHeadingObject
@@ -28,19 +27,15 @@ const props = withDefaults(defineProps<PageEduLessonSectionProps>(), {
28
27
  image: undefined
29
28
  })
30
29
 
31
- const { heading, blocks, image } = reactive(props)
32
-
33
- const anchorId = computed(() => {
34
- return 'lesson_' + camelCase(heading?.heading)
35
- })
30
+ const { heading, blocks, image, procedures, text } = reactive(props)
36
31
  </script>
37
32
  <template>
38
33
  <section
39
- :id="anchorId"
40
34
  class="PageEduLessonSection"
41
35
  :aria-label="heading?.heading"
42
36
  >
43
37
  <LayoutHelper
38
+ v-if="heading"
44
39
  indent="col-3"
45
40
  class="lg:mb-8 mb-5"
46
41
  >
@@ -0,0 +1,253 @@
1
+ import { HeroMediaData } from './../../../components/HeroMedia/HeroMedia.stories'
2
+ import { BlockIframeEmbedData } from './../../../components/BlockIframeEmbed/BlockIframeEmbed.stories.js'
3
+ import { BlockImageCarouselData } from './../../../components/BlockImageCarousel/BlockImageCarousel.stories'
4
+ import { BlockImageData } from './../../../components/BlockImage/BlockImage.stories'
5
+ import { BlockInlineImageData } from './../../../components/BlockInlineImage/BlockInlineImage.stories'
6
+ import { BlockHeadingData } from './../../../components/BlockHeading/BlockHeading.stories'
7
+ import { BlockImageComparisonData } from './../../../components/BlockImageComparison/BlockImageComparison.stories'
8
+ import { BaseVideoData } from './../../../components/BaseVideo/BaseVideo.stories'
9
+ import { BlockVideoEmbedData } from './../../../components/BlockVideoEmbed/BlockVideoEmbed.stories'
10
+ import { BlockRelatedLinksData } from './../../../components/BlockRelatedLinks/BlockRelatedLinks.stories.js'
11
+ import { BlockLinkCardCarouselData } from './../../../components/BlockLinkCarousel/BlockLinkCarousel.stories.js'
12
+ import {
13
+ BlockStreamfieldTruncatedData,
14
+ BlockStreamfieldMinimalData
15
+ } from './../../../components/BlockStreamfield/BlockStreamfield.stories'
16
+ import PageEduStudentProject from './PageEduStudentProject.vue'
17
+ import { AboutTheAuthorData } from './../../../components/AboutTheAuthor/AboutTheAuthor.stories'
18
+
19
+ export default {
20
+ title: 'Templates/EDU/PageEduStudentProject',
21
+ component: PageEduStudentProject,
22
+ tags: ['!autodocs'],
23
+ decorators: [
24
+ () => ({
25
+ template: `<div id="storyDecorator" class="disable-nav-offset"><story/></div>`
26
+ })
27
+ ],
28
+ parameters: {
29
+ layout: 'fullscreen',
30
+ html: {
31
+ root: '#storyDecorator'
32
+ }
33
+ },
34
+ excludeStories: /.*Data$/
35
+ }
36
+
37
+ export const BaseStory = {
38
+ args: {
39
+ data: {
40
+ __typename: 'EDUStudentProjectPage',
41
+ title: 'Test Student Project',
42
+ url: '/edu/resources/test-student-project',
43
+ pageType: 'EDUStudentProjectPage',
44
+ contentType: 'edu_resources.EDUStudentProjectPage',
45
+ searchDescription: '',
46
+ seoTitle: 'Test Student Project',
47
+ slug: 'test-student-project',
48
+ publicationDate: '2024-08-16',
49
+ lastPublishedAt: '2024-08-22T02:33:13.507206+00:00',
50
+ thumbnailImage: {
51
+ __typename: 'CustomImage',
52
+ original: 'http://127.0.0.1:9000/media/original_images/imagessirtfsirtf-090303-16.jpg',
53
+ alt: ''
54
+ },
55
+ authors: AboutTheAuthorData,
56
+ hero: [
57
+ {
58
+ ...HeroMediaData,
59
+ blockType: 'HeroImageBlock'
60
+ }
61
+ ],
62
+
63
+ lesson: {
64
+ title: 'Lesson',
65
+ url: '/path-to-student-project'
66
+ },
67
+
68
+ primarySubject: {
69
+ subject: 'Arts'
70
+ },
71
+ additionalSubjects: [
72
+ {
73
+ subject: 'Science'
74
+ }
75
+ ],
76
+ gradeLevels: [
77
+ {
78
+ gradeLevel: 'K'
79
+ },
80
+ {
81
+ gradeLevel: '1'
82
+ }
83
+ ],
84
+ time: {
85
+ time: 'Under 30 mins'
86
+ },
87
+ customTime: undefined,
88
+ standards: [
89
+ {
90
+ standard: {
91
+ code: 'CCRA.R.1',
92
+ definition:
93
+ 'Read closely to determine what the text says explicitly and to make logical inferences from it; cite specific textual evidence when writing or speaking to support conclusions drawn from the text.',
94
+ domain: {
95
+ domain: 'College and Career Readiness Anchor Standards for Reading'
96
+ },
97
+ type: 'ccss_english_language_arts'
98
+ }
99
+ },
100
+ {
101
+ standard: {
102
+ code: 'RL.1.5',
103
+ definition:
104
+ 'Explain major differences between books that tell stories and books that give information, drawing on a wide reading of a range of text types.',
105
+ domain: {
106
+ domain: 'Reading Standards for Literature'
107
+ },
108
+ type: 'ccss_english_language_arts'
109
+ }
110
+ },
111
+ {
112
+ standard: {
113
+ code: 'K-PS2-1',
114
+ definition:
115
+ 'Plan and conduct an investigation to compare the effects of different strengths or different directions of pushes and pulls on the motion of an object.',
116
+ domain: {
117
+ domain: 'Physical Sciences'
118
+ },
119
+ type: 'ngss'
120
+ }
121
+ }
122
+ ],
123
+
124
+ overview: BlockStreamfieldMinimalData.body,
125
+ overviewHeading: undefined,
126
+ overviewImage: BlockImageData.image,
127
+
128
+ materials:
129
+ '<ul><li data-block-key="nvq4l">list item one</li><li data-block-key="efmt7">list item two</li><li data-block-key="d0f66">list item three this one is really long and the text just keeps on going lorem ipsum dolor sit amet consectatur</li></ul><p data-block-key="bksrq">Paragraph to appear below.</p>',
130
+ materialsHeading: 'Custom Materials Heading',
131
+ materialsImage: BlockImageData.image,
132
+
133
+ stepsNumbering: false,
134
+
135
+ steps: [
136
+ {
137
+ heading: 'Lorem ipsum dolor no media',
138
+ media: [],
139
+ content: [BlockImageData, ...BlockStreamfieldMinimalData.body, BlockInlineImageData.block]
140
+ },
141
+ {
142
+ heading: 'Sit amet',
143
+ media: [
144
+ {
145
+ blockType: 'VideoBlock',
146
+ video: BaseVideoData,
147
+ caption: 'Lorem ipsum dolor sit amet',
148
+ credit: 'NASA/JPL'
149
+ }
150
+ ],
151
+ content: BlockStreamfieldMinimalData.body
152
+ },
153
+ {
154
+ heading: 'Consectatur adipscing',
155
+ media: [BlockImageComparisonData],
156
+ content: BlockStreamfieldMinimalData.body
157
+ }
158
+ ],
159
+
160
+ customSections: [
161
+ {
162
+ blockType: 'EDUStudentProjectCustomSectionBlock',
163
+ content: BlockStreamfieldTruncatedData.body,
164
+ heading: BlockHeadingData,
165
+ position: 'after_overview'
166
+ }
167
+ ],
168
+
169
+ body: BlockStreamfieldTruncatedData.body,
170
+
171
+ relatedLinks: BlockRelatedLinksData.data,
172
+ relatedContentHeading: 'Related Content',
173
+ relatedContent: BlockLinkCardCarouselData
174
+ }
175
+ }
176
+ }
177
+
178
+ export const HeroCarousel = {
179
+ args: {
180
+ data: {
181
+ ...BaseStory.args.data,
182
+ hero: [{ blockType: 'CarouselBlock', blocks: BlockImageCarouselData }]
183
+ }
184
+ }
185
+ }
186
+
187
+ export const HeroImageComparison = {
188
+ args: {
189
+ data: {
190
+ ...BaseStory.args.data,
191
+ hero: [
192
+ {
193
+ ...BlockImageComparisonData
194
+ }
195
+ ]
196
+ }
197
+ }
198
+ }
199
+
200
+ export const HeroVideo = {
201
+ args: {
202
+ data: {
203
+ ...BaseStory.args.data,
204
+ hero: [
205
+ {
206
+ blockType: 'VideoBlock',
207
+ video: BaseVideoData,
208
+ caption: 'Lorem ipsum dolor sit amet',
209
+ credit: 'NASA/JPL'
210
+ }
211
+ ]
212
+ }
213
+ }
214
+ }
215
+
216
+ export const HeroVideoEmbed = {
217
+ args: {
218
+ data: {
219
+ ...BaseStory.args.data,
220
+ hero: [
221
+ {
222
+ ...BlockVideoEmbedData.data,
223
+ embed: {
224
+ embed: `<iframe title="Meet NASA's Diana Trujillo - Embedded Hero" width="480" height="270" src="https://www.youtube.com/embed/vUuUyYqI83Q?feature=oembed" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>`
225
+ },
226
+ blockType: 'VideoEmbedBlock'
227
+ }
228
+ ]
229
+ }
230
+ }
231
+ }
232
+
233
+ export const HeroIframeEmbed = {
234
+ args: {
235
+ data: {
236
+ ...BaseStory.args.data,
237
+ hero: [
238
+ {
239
+ ...BlockIframeEmbedData
240
+ }
241
+ ]
242
+ }
243
+ }
244
+ }
245
+
246
+ export const NoHero = {
247
+ args: {
248
+ data: {
249
+ ...BaseStory.args.data,
250
+ hero: []
251
+ }
252
+ }
253
+ }