@explorer-1/vue 0.2.51 → 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 +48 -43
  65. package/src/components/SearchResultsList/SearchResultsList.vue +4 -1
  66. package/src/templates/edu/PageEduLesson/PageEduLesson.stories.js +1 -1
  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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@explorer-1/vue",
3
- "version": "0.2.51",
3
+ "version": "0.2.52",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -30,7 +30,7 @@
30
30
  "vue-bind-once": "^0.2.1",
31
31
  "vue3-compare-image": "^1.2.5",
32
32
  "vue3-observe-visibility": "^1.0.1",
33
- "@explorer-1/common": "1.1.12"
33
+ "@explorer-1/common": "1.1.13"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@vitejs/plugin-vue": "^5.0.4",
@@ -41,7 +41,7 @@
41
41
  </template>
42
42
  <div
43
43
  v-if="data.caption && data.caption.length > 2"
44
- class="lg:px-0 p-4 pb-0 print:pl-0"
44
+ class="caption-area lg:px-0 p-4 pb-0 print:pl-0"
45
45
  >
46
46
  <BaseImageCaption :data="data" />
47
47
  </div>
@@ -25,7 +25,10 @@ export default defineComponent({
25
25
  })
26
26
  </script>
27
27
  <template>
28
- <div v-if="data">
28
+ <div
29
+ v-if="data"
30
+ class="BlockImage"
31
+ >
29
32
  <template v-if="fullBleed && data.imageFullBleed">
30
33
  <BlockImageFullBleed
31
34
  :data="data.imageFullBleed"
@@ -105,7 +105,10 @@ export default defineComponent({
105
105
  })
106
106
  </script>
107
107
  <template>
108
- <div v-if="theData">
108
+ <div
109
+ v-if="theData"
110
+ class="BlockImageFullBleed"
111
+ >
109
112
  <div class="bg-gray-light">
110
113
  <div class="max-w-screen-3xl mx-auto">
111
114
  <MixinFancybox
@@ -137,7 +140,7 @@ export default defineComponent({
137
140
  </div>
138
141
  <div
139
142
  v-if="data && hasCaptionArea"
140
- class="max-w-screen-3xl p-4 pb-0 mx-auto"
143
+ class="caption-area max-w-screen-3xl p-4 pb-0 mx-auto"
141
144
  >
142
145
  <BaseImageCaption
143
146
  :data="theData"
@@ -95,7 +95,10 @@ export default defineComponent({
95
95
  })
96
96
  </script>
97
97
  <template>
98
- <div v-if="theData">
98
+ <div
99
+ v-if="theData"
100
+ class="BlockImageStandard"
101
+ >
99
102
  <MixinFancybox
100
103
  v-if="theData.src"
101
104
  :src="theData.original || theData.src?.url"
@@ -122,7 +125,7 @@ export default defineComponent({
122
125
  </MixinFancybox>
123
126
  <div
124
127
  v-if="theData && hasCaptionArea"
125
- class="lg:px-0 p-4 pb-0 print:pl-0"
128
+ class="caption-area pt-4 pb-0 print:pl-0"
126
129
  >
127
130
  <BaseImageCaption
128
131
  :data="theData"
@@ -1,5 +1,8 @@
1
1
  <template>
2
- <div v-if="theImageData">
2
+ <div
3
+ v-if="theImageData"
4
+ class="BlockImageCarouselItem"
5
+ >
3
6
  <MixinFancybox
4
7
  :src="theImageData.original || theImageData.src?.url"
5
8
  :caption="theImageData.caption"
@@ -28,7 +31,7 @@
28
31
  </MixinFancybox>
29
32
  <div
30
33
  v-if="theImageData && hasCaptionArea"
31
- class="lg:px-0 lg:pt-3 px-4 pt-10"
34
+ class="caption-area lg:px-0 lg:pt-3 px-4 pt-10"
32
35
  >
33
36
  <BaseImageCaption
34
37
  class="slide-caption"
@@ -1,5 +1,8 @@
1
1
  <template>
2
- <div v-if="data">
2
+ <div
3
+ v-if="data"
4
+ class="BlockImageComparison"
5
+ >
3
6
  <ClientOnly>
4
7
  <VueCompareImage
5
8
  v-if="theBeforeImageSrc && theAfterImageSrc"
@@ -12,7 +15,7 @@
12
15
  </ClientOnly>
13
16
  <div
14
17
  v-if="data.caption || customDetailUrl"
15
- class="lg:px-0 p-4 pb-0 print:pl-0"
18
+ class="caption-area lg:px-0 p-4 pb-0 print:pl-0"
16
19
  >
17
20
  <BaseImageCaption
18
21
  :data="{ caption: data.caption }"
@@ -44,14 +44,17 @@
44
44
  class="flex col-span-5"
45
45
  :class="data.alignTo === 'right' ? 'col-start-3 lg:order-1' : 'col-start-6 lg:order-2'"
46
46
  >
47
- <BlockText :text="data.text" />
47
+ <BlockText
48
+ :variant="variant"
49
+ :text="data.text"
50
+ />
48
51
  </div>
49
52
  </div>
50
53
  </div>
51
54
  </template>
52
55
 
53
56
  <script lang="ts">
54
- import { defineComponent } from 'vue'
57
+ import { defineComponent, type PropType } from 'vue'
55
58
  import type { ImageObject } from '../../interfaces'
56
59
  import { mixinGetSrcSet } from './../../utils/mixins'
57
60
  import MixinFancybox from './../MixinFancybox/MixinFancybox.vue'
@@ -73,6 +76,10 @@ export default defineComponent({
73
76
  data: {
74
77
  type: Object,
75
78
  required: false
79
+ },
80
+ variant: {
81
+ type: String as PropType<'small' | 'medium' | 'large'>,
82
+ default: 'large'
76
83
  }
77
84
  },
78
85
  computed: {
@@ -23,24 +23,28 @@
23
23
  v-else-if="block.blockType == 'RichTextBlock'"
24
24
  :key="`richText${index}`"
25
25
  indent="col-3"
26
- :class="seamlessText(index) ? 'lg:mb-8 mb-5' : 'lg:mb-18 mb-10'"
26
+ :class="seamlessText(index) ? 'lg:mb-8 mb-5' : marginBottom"
27
27
  >
28
- <BlockText :text="block.value" />
28
+ <BlockText
29
+ :text="block.value"
30
+ :variant="size"
31
+ />
29
32
  </LayoutHelper>
30
33
 
31
34
  <!-- custom margin bottom that matches BlockText styles if followed by RichTextBlock -->
32
35
  <BlockInlineImage
33
36
  v-else-if="block.blockType == 'InlineImageBlock'"
34
37
  :key="`inlineImageBlock${index}`"
35
- :class="seamlessText(index) ? 'lg:mb-8 mb-5' : 'lg:mb-18 mb-10'"
38
+ :class="seamlessText(index) ? 'lg:mb-8 mb-5' : marginBottom"
36
39
  :data="block"
40
+ :variant="size"
37
41
  />
38
42
 
39
43
  <LayoutHelper
40
44
  v-else-if="block.blockType == 'ListBlock' && block.field === 'content_card_list'"
41
45
  :key="`listBlock${index}`"
42
46
  indent="col-3"
43
- class="lg:mb-18 mb-10"
47
+ :class="marginBottom"
44
48
  >
45
49
  <BlockListCards :data="block" />
46
50
  </LayoutHelper>
@@ -49,7 +53,7 @@
49
53
  v-else-if="block.blockType == 'KeyPointBlock'"
50
54
  :key="`keyPointBlock${index}`"
51
55
  indent="col-3"
52
- class="lg:mb-18 mb-10"
56
+ :class="marginBottom"
53
57
  >
54
58
  <BlockKeyPoints :data="block" />
55
59
  </LayoutHelper>
@@ -58,7 +62,7 @@
58
62
  v-else-if="block.blockType == 'QuoteBlock'"
59
63
  :key="`quoteBlock${index}`"
60
64
  indent="col-4"
61
- class="lg:mb-18 mb-10"
65
+ :class="marginBottom"
62
66
  >
63
67
  <BlockQuote :data="block as unknown as BlockQuoteAttributes" />
64
68
  </LayoutHelper>
@@ -67,7 +71,7 @@
67
71
  v-else-if="block.blockType == 'CTABlock'"
68
72
  :key="`ctaBlock${index}`"
69
73
  indent="col-4"
70
- class="lg:mb-18 mb-10"
74
+ :class="marginBottom"
71
75
  >
72
76
  <BlockCta :data="block" />
73
77
  </LayoutHelper>
@@ -76,7 +80,7 @@
76
80
  v-else-if="block.blockType == 'TeaserBlock'"
77
81
  :key="`teaserBlock${index}`"
78
82
  indent="col-2"
79
- class="lg:mb-18 mb-10"
83
+ :class="marginBottom"
80
84
  >
81
85
  <BlockTeaser
82
86
  :custom-label="block.customLabel"
@@ -93,7 +97,7 @@
93
97
  v-else-if="block.blockType == 'CarouselBlock'"
94
98
  :key="`carouselBlock${index}`"
95
99
  indent="col-2"
96
- class="lg:mb-18 mb-10"
100
+ :class="marginBottom"
97
101
  >
98
102
  <BlockImageCarousel
99
103
  :items="block.blocks"
@@ -104,7 +108,8 @@
104
108
  <div
105
109
  v-else-if="block.blockType == 'ImageGalleryBlock'"
106
110
  :key="`imageGalleryBlock${index}`"
107
- class="max-w-screen-3xl lg:mb-18 mx-auto mb-10"
111
+ class="max-w-screen-3xl mx-auto"
112
+ :class="marginBottom"
108
113
  >
109
114
  <BlockImageGallery
110
115
  :title="block.galleryTitle"
@@ -119,7 +124,7 @@
119
124
  v-else-if="block.blockType == 'VideoBlock'"
120
125
  :key="`videoBlock${index}`"
121
126
  indent="col-2"
122
- class="lg:mb-18 mb-10"
127
+ :class="marginBottom"
123
128
  >
124
129
  <BlockVideo :data="block" />
125
130
  </LayoutHelper>
@@ -128,7 +133,7 @@
128
133
  v-else-if="block.blockType == 'VideoEmbedBlock'"
129
134
  :key="`videoEmbedBlock${index}`"
130
135
  indent="col-2"
131
- class="lg:mb-18 mb-10"
136
+ :class="marginBottom"
132
137
  >
133
138
  <BlockVideoEmbed :data="block as unknown as VideoBlockEmbedData" />
134
139
  </LayoutHelper>
@@ -136,7 +141,7 @@
136
141
  <BlockImage
137
142
  v-else-if="block.blockType == 'FullBleedImageBlock'"
138
143
  :key="`fullBleedImageBlock${index}`"
139
- class="lg:mb-18 mb-10"
144
+ :class="marginBottom"
140
145
  :data="block"
141
146
  :full-bleed="block.fullBleed"
142
147
  />
@@ -145,7 +150,7 @@
145
150
  v-else-if="block.blockType == 'ImageComparisonBlock'"
146
151
  :key="`imageComparisonBlock${index}`"
147
152
  indent="col-2"
148
- class="lg:mb-18 mb-10"
153
+ :class="marginBottom"
149
154
  >
150
155
  <BlockImageComparison :data="block" />
151
156
  </LayoutHelper>
@@ -154,7 +159,7 @@
154
159
  v-else-if="block.blockType == 'IframeEmbedBlock'"
155
160
  :key="`iframeEmbedBlock${index}`"
156
161
  indent="col-2"
157
- class="lg:mb-18 mb-10"
162
+ :class="marginBottom"
158
163
  >
159
164
  <BlockIframeEmbed :data="block" />
160
165
  </LayoutHelper>
@@ -163,7 +168,7 @@
163
168
  v-else-if="block.blockType == 'GitHubGistBlock'"
164
169
  :key="`GitHubGistBlock${index}`"
165
170
  indent="col-3"
166
- class="lg:mb-18 mb-10"
171
+ :class="marginBottom"
167
172
  >
168
173
  <BlockGist :data="block" />
169
174
  </LayoutHelper>
@@ -172,7 +177,7 @@
172
177
  v-else-if="block.blockType == 'TableBlock'"
173
178
  :key="`tableBlock${index}`"
174
179
  indent="col-3"
175
- class="lg:mb-18 mb-10"
180
+ :class="marginBottom"
176
181
  >
177
182
  <BlockTable :data="block" />
178
183
  </LayoutHelper>
@@ -181,7 +186,7 @@
181
186
  v-else-if="block.blockType == 'RelatedLinksBlock'"
182
187
  :key="`relatedLinksBlock${index}`"
183
188
  indent="col-3"
184
- class="lg:mb-18 mb-10"
189
+ :class="marginBottom"
185
190
  >
186
191
  <BlockRelatedLinks :data="block as any as BlockRelatedLinksObject" />
187
192
  </LayoutHelper>
@@ -195,7 +200,8 @@
195
200
  <div
196
201
  v-else-if="block.blockType == 'ListBlock' && block.field === 'card_grid'"
197
202
  :key="`cardGridBlock${index}`"
198
- class="LayoutHelper md:BaseGrid md:container md:mx-auto lg:mb-18 mb-10"
203
+ class="LayoutHelper md:BaseGrid md:container md:mx-auto"
204
+ :class="marginBottom"
199
205
  >
200
206
  <div class="lg:col-start-2 lg:col-end-12 md:col-span-full md:px-4 px-0 relative">
201
207
  <BlockCardGrid :cards="block.items" />
@@ -205,7 +211,7 @@
205
211
  <div
206
212
  v-else-if="block.blockType === 'LinkCarouselBlock' && block.blocks?.length"
207
213
  :key="`linkCarouselBlock${index}`"
208
- class="lg:mb-18 mb-10"
214
+ :class="marginBottom"
209
215
  >
210
216
  <BlockLinkCarousel :items="block.blocks" />
211
217
  </div>
@@ -214,7 +220,7 @@
214
220
  v-else-if="block.blockType === 'LinkCardListBlock' && block.blocks?.length"
215
221
  :key="`linkCardListBlock${index}`"
216
222
  indent="col-2"
217
- class="lg:mb-18 mb-10"
223
+ :class="marginBottom"
218
224
  >
219
225
  <BlockLinkCardList :items="block.blocks" />
220
226
  </LayoutHelper>
@@ -223,7 +229,7 @@
223
229
  v-else-if="block.blockType == 'AccordionBlock'"
224
230
  :key="`accordionBlock${index}`"
225
231
  indent="col-3"
226
- class="lg:mb-18 mb-10"
232
+ :class="marginBottom"
227
233
  >
228
234
  <BlockAccordion :data="block as unknown as AccordionBlockObject" />
229
235
  </LayoutHelper>
@@ -231,7 +237,8 @@
231
237
  <div
232
238
  v-else
233
239
  :key="index"
234
- class="lg:mb-18 p-3 mb-10 overflow-hidden border"
240
+ class="p-3 overflow-hidden border"
241
+ :class="marginBottom"
235
242
  >
236
243
  <pre>{{ block }}</pre>
237
244
  </div>
@@ -315,6 +322,11 @@ export default defineComponent({
315
322
  default: 'default',
316
323
  validator: (prop: string): boolean => Object.keys(variants).includes(prop)
317
324
  },
325
+ size: {
326
+ type: String as PropType<'small' | 'medium' | 'large'>,
327
+ required: false,
328
+ default: 'large'
329
+ },
318
330
  // eslint-disable-next-line vue/require-default-prop
319
331
  data: {
320
332
  type: Array as PropType<StreamfieldBlockData[]>,
@@ -324,6 +336,13 @@ export default defineComponent({
324
336
  computed: {
325
337
  layoutClass(): string {
326
338
  return variants[this.variant]
339
+ },
340
+ marginBottom() {
341
+ let margin = 'lg:mb-10 mb-6'
342
+ if (this.size === 'large') {
343
+ margin = 'lg:mb-18 mb-10'
344
+ }
345
+ return margin
327
346
  }
328
347
  },
329
348
  methods: {
@@ -366,6 +385,10 @@ export default defineComponent({
366
385
  @apply col-span-7;
367
386
  }
368
387
  }
388
+
389
+ .p-4.caption-area {
390
+ @apply px-0;
391
+ }
369
392
  }
370
393
  }
371
394
  </style>
@@ -10,7 +10,7 @@
10
10
 
11
11
  <div
12
12
  v-if="hasCaption"
13
- class="lg:px-0 p-4 pb-0 print:pl-0"
13
+ class="caption-area lg:px-0 p-4 pb-0 print:pl-0"
14
14
  >
15
15
  <BaseImageCaption
16
16
  :data="data"
@@ -11,7 +11,7 @@
11
11
  </BaseImagePlaceholder>
12
12
  <div
13
13
  v-if="data.caption || customDetailUrl"
14
- class="lg:px-0 p-4 print:pl-0"
14
+ class="caption-area lg:px-0 p-4 print:pl-0"
15
15
  >
16
16
  <BaseImageCaption
17
17
  :data="data"
@@ -1,5 +1,5 @@
1
1
  <script setup lang="ts">
2
- import { computed, reactive } from 'vue'
2
+ import { reactive } from 'vue'
3
3
  import BaseImagePlaceholder from './../BaseImagePlaceholder/BaseImagePlaceholder.vue'
4
4
  import BlockIframeEmbed from './../BlockIframeEmbed/BlockIframeEmbed.vue'
5
5
  import BlockImageComparison from './../BlockImageComparison/BlockImageComparison.vue'
@@ -19,28 +19,9 @@ const props = withDefaults(defineProps<HeroInlineMediaProps>(), {
19
19
  })
20
20
 
21
21
  const { heroBlocks, constrain } = reactive(props)
22
-
23
- const heroInline = computed(() => {
24
- // heroes with interactive elements have special handling
25
- if (heroBlocks?.length) {
26
- // excludes VideoBlock as this will autoplay
27
- if (heroBlocks[0].blockType === 'VideoBlock') {
28
- return false
29
- } else if (
30
- heroBlocks[0].blockType === 'HeroImageBlock' ||
31
- heroBlocks[0].blockType === 'CarouselBlock' ||
32
- heroBlocks[0].blockType === 'IframeEmbedBlock' ||
33
- heroBlocks[0].blockType === 'VideoEmbedBlock' ||
34
- heroBlocks[0].blockType === 'ImageComparisonBlock'
35
- ) {
36
- return true
37
- }
38
- }
39
- return false
40
- })
41
22
  </script>
42
23
  <template>
43
- <div v-if="heroBlocks?.length && heroInline">
24
+ <div v-if="heroBlocks?.length">
44
25
  <BlockImageStandard
45
26
  v-if="heroBlocks[0].blockType === 'HeroImageBlock'"
46
27
  :data="heroBlocks[0].imageInline"
@@ -44,7 +44,7 @@
44
44
  <div
45
45
  v-if="hasCaptionArea"
46
46
  :class="captionVisibilityClass"
47
- class="max-w-screen-3xl ThemeVariantGray bg-gray-light bg-opacity-90 lg:bg-opacity-100 ThemeVariantGray lg:block lg:pb-4 lg:px-3 xl:px-8 lg:pt-4 items-start p-4 mx-auto print:block"
47
+ class="caption-area max-w-screen-3xl ThemeVariantGray bg-gray-light bg-opacity-90 lg:bg-opacity-100 ThemeVariantGray lg:block lg:pb-4 lg:px-3 xl:px-8 lg:pt-4 items-start p-4 mx-auto print:block"
48
48
  >
49
49
  <BaseImageCaption :data="theImageData || customCaption" />
50
50
  </div>
@@ -84,7 +84,7 @@ interface SortedStandards {
84
84
  const sortedStandards = computed((): SortedStandards | undefined => {
85
85
  if (standards) {
86
86
  const sorted = standards.reduce<SortedStandards>((acc, item) => {
87
- const type = item.standard.type
87
+ const type = item.standard?.type
88
88
  // Initialize array for type if it doesn't exist
89
89
  if (!acc[type]) {
90
90
  acc[type] = []
@@ -164,61 +164,66 @@ const standardsIste = computed(() => {
164
164
  </div>
165
165
  </div>
166
166
  <div
167
- v-if="standards"
167
+ v-if="standards || $slots.metaInfo"
168
168
  v-show="metaPanelOpen"
169
169
  class="MetaPanel-panel col-start-container lg:col-start-indent-col-2 col-end-bleed lg:grid grid-cols-subgrid bg-gray-light pb-3 lg:pb-6"
170
170
  >
171
171
  <div
172
172
  class="container col-start-container lg:col-start-indent-col-2 col-end-container px-8 lg:px-[3rem] xl:px-[5.8rem]"
173
173
  >
174
- <div
175
- class="pt-6 lg:pt-7"
176
- :class="borderClass"
177
- >
174
+ <div :class="borderClass">
175
+ <div v-if="$slots.metaInfo">
176
+ <slot name="metaInfo" />
177
+ </div>
178
178
  <div
179
- class="text-subtitle mb-5"
180
- :class="headingClass"
179
+ v-if="standards"
180
+ class="pt-6 lg:pt-7"
181
181
  >
182
- Standards
183
- <span class="sr-only">.</span>
184
- </div>
185
- <div class="w-full lg:grid grid-cols-2 lg:gap-6 xl:gap-10">
186
- <div v-if="standardsEla">
187
- <div class="text-base font-semibold text-gray-dark mb-4">
188
- English Language Arts Standards (CCSS - ELA)
189
- </div>
182
+ <div
183
+ class="text-subtitle mb-5"
184
+ :class="headingClass"
185
+ >
186
+ Standards
190
187
  <span class="sr-only">.</span>
191
- <MetaPanelAccordion
192
- :standards="standardsEla"
193
- class="mb-6"
194
- />
195
188
  </div>
196
- <div v-if="standardsMath">
197
- <div class="text-base font-semibold text-gray-dark mb-4">
198
- Math Standards (CCSS - Math)
189
+ <div class="w-full lg:grid grid-cols-2 lg:gap-6 xl:gap-10">
190
+ <div v-if="standardsEla">
191
+ <div class="text-base font-semibold text-gray-dark mb-4">
192
+ English Language Arts Standards (CCSS - ELA)
193
+ </div>
194
+ <span class="sr-only">.</span>
195
+ <MetaPanelAccordion
196
+ :standards="standardsEla"
197
+ class="mb-6"
198
+ />
199
199
  </div>
200
- <span class="sr-only">.</span>
201
- <MetaPanelAccordion
202
- :standards="standardsMath"
203
- class="mb-6"
204
- />
205
- </div>
206
- <div v-if="standardsNgss">
207
- <div class="text-base font-semibold text-gray-dark mb-4">
208
- Science Standards (NGSS)
200
+ <div v-if="standardsMath">
201
+ <div class="text-base font-semibold text-gray-dark mb-4">
202
+ Math Standards (CCSS - Math)
203
+ </div>
204
+ <span class="sr-only">.</span>
205
+ <MetaPanelAccordion
206
+ :standards="standardsMath"
207
+ class="mb-6"
208
+ />
209
209
  </div>
210
- <span class="sr-only">.</span>
211
- <MetaPanelAccordion
212
- :standards="standardsNgss"
213
- class="mb-6"
214
- />
215
- </div>
216
- <div v-if="standardsIste">
217
- <div class="text-base font-semibold text-gray-dark mb-4">
218
- Technology Standards (ISTE)
210
+ <div v-if="standardsNgss">
211
+ <div class="text-base font-semibold text-gray-dark mb-4">
212
+ Science Standards (NGSS)
213
+ </div>
214
+ <span class="sr-only">.</span>
215
+ <MetaPanelAccordion
216
+ :standards="standardsNgss"
217
+ class="mb-6"
218
+ />
219
+ </div>
220
+ <div v-if="standardsIste">
221
+ <div class="text-base font-semibold text-gray-dark mb-4">
222
+ Technology Standards (ISTE)
223
+ </div>
224
+ <span class="sr-only">.</span>
225
+ <MetaPanelAccordion :standards="standardsIste" />
219
226
  </div>
220
- <span class="sr-only">.</span>
221
- <MetaPanelAccordion :standards="standardsIste" />
222
227
  </div>
223
228
  </div>
224
229
  </div>
@@ -166,7 +166,10 @@ export default defineComponent({
166
166
  } else if (handle.startsWith('edu_resources')) {
167
167
  date = null
168
168
  primarySubject = page._source[handle + '__primary_subject'] as PrimarySubjectObject
169
- if (page._source[handle + '__grade_levels']) {
169
+ if (
170
+ page._source[handle + '__grade_levels'] &&
171
+ handle !== 'edu_resources_edustudentprojectpage'
172
+ ) {
170
173
  gradeLevels = [] as GradeLevelsObject[]
171
174
  // @ts-expect-error
172
175
  page._source[handle + '__grade_levels'].forEach((level) => {
@@ -62,7 +62,7 @@ export const BaseStory = {
62
62
 
63
63
  studentProject: {
64
64
  title: 'Student Project',
65
- urlPath: '/path-to-student-project'
65
+ url: '/path-to-student-project'
66
66
  },
67
67
 
68
68
  primarySubject: {
@@ -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