@explorer-1/vue 0.2.26 → 0.2.28

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 (50) hide show
  1. package/components.d.ts +3 -0
  2. package/dist/explorer-1-vue.js +1162 -1112
  3. package/dist/explorer-1-vue.umd.cjs +13 -13
  4. package/dist/src/components/AboutTheAuthor/AboutTheAuthor.stories.d.ts +30 -0
  5. package/dist/src/components/BaseImage/BaseImage.stories.d.ts +1 -1
  6. package/dist/src/components/BaseImage/BaseImage.vue.d.ts +1 -1
  7. package/dist/src/components/BasePill/BasePill.vue.d.ts +4 -0
  8. package/dist/src/components/BlockLinkCard/BlockLinkCard.vue.d.ts +3 -3
  9. package/dist/src/components/DetailHeadline/DetailHeadline.vue.d.ts +10 -7
  10. package/dist/src/components/EventCard/EventCard.vue.d.ts +1 -1
  11. package/dist/src/components/HeroLarge/HeroLarge.vue.d.ts +45 -3
  12. package/dist/src/components/HeroMedium/HeroMedium.vue.d.ts +1 -1
  13. package/dist/src/components/MetadataEduResource/MetadataEduResource.vue.d.ts +1 -1
  14. package/dist/src/components/MetadataEvent/MetadataEvent.vue.d.ts +1 -1
  15. package/dist/src/components/MixinAnimationCaret/MixinAnimationCaret.stories.d.ts +1 -1
  16. package/dist/src/components/MixinAnimationCaret/MixinAnimationCaret.vue.d.ts +1 -1
  17. package/dist/src/components/SearchResultCard/SearchResultCard.vue.d.ts +3 -3
  18. package/dist/src/components/TextInput/TextInput.vue.d.ts +9 -9
  19. package/dist/src/interfaces.d.ts +9 -1
  20. package/dist/src/templates/edu/PageEduCollectionsDetail/PageEduCollectionsDetail.stories.d.ts +123 -0
  21. package/dist/src/templates/edu/PageEduLesson/PageEduLesson.stories.d.ts +3 -0
  22. package/dist/src/templates/edu/PageEduNewsDetail/PageEduNewsDetail.stories.d.ts +30 -0
  23. package/dist/src/templates/edu/PageEduTeachableMoment/PageEduTeachableMoment.stories.d.ts +3 -0
  24. package/dist/style.css +1 -1
  25. package/package.json +2 -2
  26. package/src/components/AboutTheAuthor/AboutTheAuthor.stories.js +50 -0
  27. package/src/components/AboutTheAuthor/AboutTheAuthor.vue +90 -0
  28. package/src/components/BasePill/BasePill.vue +4 -1
  29. package/src/components/BlockLinkCard/BlockLinkCard.vue +2 -2
  30. package/src/components/BlockText/BlockText.vue +3 -3
  31. package/src/components/DetailHeadline/DetailHeadline.vue +2 -3
  32. package/src/components/HeroInlineMedia/HeroInlineMedia.vue +77 -0
  33. package/src/components/HeroLarge/HeroLarge.vue +49 -10
  34. package/src/components/HeroMedium/HeroMedium.vue +1 -1
  35. package/src/components/MetaPanel/MetaPanel.vue +1 -1
  36. package/src/components/MetaPanelItems/MetaPanelItems.vue +11 -8
  37. package/src/constants.ts +11 -0
  38. package/src/interfaces.ts +6 -1
  39. package/src/templates/edu/PageEduCollectionsDetail/PageEduCollectionsDetail.stories.js +103 -0
  40. package/src/templates/edu/PageEduCollectionsDetail/PageEduCollectionsDetail.vue +146 -0
  41. package/src/templates/edu/PageEduExplainerArticle/PageEduExplainerArticle.stories.js +3 -1
  42. package/src/templates/edu/PageEduExplainerArticle/PageEduExplainerArticle.vue +28 -42
  43. package/src/templates/edu/PageEduLesson/PageEduLesson.stories.js +2 -0
  44. package/src/templates/edu/PageEduLesson/PageEduLesson.vue +13 -37
  45. package/src/templates/edu/PageEduNewsDetail/PageEduNewsDetail.stories.js +3 -8
  46. package/src/templates/edu/PageEduNewsDetail/PageEduNewsDetail.vue +10 -1
  47. package/src/templates/edu/PageEduTeachableMoment/PageEduTeachableMoment.stories.js +2 -0
  48. package/src/templates/edu/PageEduTeachableMoment/PageEduTeachableMoment.vue +11 -50
  49. package/src/templates/www/PageRoboticsDetail/PageRoboticsDetail.vue +1 -1
  50. package/src/templates/www/PageTopicDetail/PageTopicDetail.vue +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@explorer-1/vue",
3
- "version": "0.2.26",
3
+ "version": "0.2.28",
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
  "vue-observe-visibility": "^1.0.0",
32
32
  "vue3-compare-image": "^1.2.5",
33
- "@explorer-1/common": "1.1.7"
33
+ "@explorer-1/common": "1.1.8"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@vitejs/plugin-vue": "^5.0.4",
@@ -0,0 +1,50 @@
1
+ import AboutTheAuthor from './AboutTheAuthor.vue'
2
+
3
+ export default {
4
+ title: 'Components/Utilities/AboutTheAuthor',
5
+ component: AboutTheAuthor,
6
+ tags: ['!autodocs'],
7
+ excludeStories: /.*Data$/
8
+ }
9
+
10
+ export const AboutTheAuthorData = [
11
+ {
12
+ author: {
13
+ biography:
14
+ '<p data-block-key="8meb7">I&#x27;m someone that has a bio! Test <a href="http://localhost:3000/edu/news">link</a>.</p>',
15
+ image: {
16
+ src: {
17
+ url: 'https://picsum.photos/512/512',
18
+ width: 512,
19
+ height: 512
20
+ },
21
+ alt: ''
22
+ },
23
+ jobTitle: 'Job title',
24
+ name: 'Author name',
25
+ organization: 'Organization'
26
+ }
27
+ },
28
+ {
29
+ author: {
30
+ biography:
31
+ '<p data-block-key="8meb7">I&#x27;m someone that has a bio! Test <a href="http://localhost:3000/edu/news">link</a>. Lorem ipsum dolor sit amet long author bio here.</p><p>Lorem ipsum dolor site amet consectatur.</p>',
32
+ image: {
33
+ src: {
34
+ url: 'https://picsum.photos/512/512',
35
+ width: 512,
36
+ height: 512
37
+ },
38
+ alt: ''
39
+ },
40
+ jobTitle: 'Job title',
41
+ name: 'Another author',
42
+ organization: 'Organization'
43
+ }
44
+ }
45
+ ]
46
+ // stories
47
+ export const BaseStory = {
48
+ name: 'AboutTheAuthor',
49
+ args: { authors: AboutTheAuthorData }
50
+ }
@@ -0,0 +1,90 @@
1
+ <script setup lang="ts">
2
+ import { computed, reactive } from 'vue'
3
+ import type { AuthorObject } from '../../interfaces'
4
+ import BlockText from './../BlockText/BlockText.vue'
5
+ import BaseImage from './../BaseImage/BaseImage.vue'
6
+ import BaseImagePlaceholder from './../BaseImagePlaceholder/BaseImagePlaceholder.vue'
7
+
8
+ interface AboutTheAuthorProps {
9
+ authors: {
10
+ author?: AuthorObject
11
+ }[]
12
+ }
13
+
14
+ // define props
15
+ const props = withDefaults(defineProps<AboutTheAuthorProps>(), {
16
+ authors: undefined
17
+ })
18
+
19
+ const { authors } = reactive(props)
20
+
21
+ const headingString = computed(() => {
22
+ let noun = 'Author'
23
+ if (authors?.length > 1) {
24
+ noun = 'Authors'
25
+ }
26
+ return `About the ${noun}`
27
+ })
28
+ </script>
29
+ <template>
30
+ <div class="AboutTheAuthor">
31
+ <h3 class="text-h4 sm:ml-[130px] pl-10 mb-6">
32
+ {{ headingString }}
33
+ </h3>
34
+ <template
35
+ v-for="(author, index) in authors"
36
+ :key="index"
37
+ >
38
+ <div
39
+ v-if="author.author"
40
+ class="sm:flex flex-row"
41
+ :class="{ ' mb-10 sm:mb-12': index + 1 !== authors.length }"
42
+ >
43
+ <div class="sm:mr-10">
44
+ <BaseImagePlaceholder
45
+ aspect-ratio="1:1"
46
+ class="relative mb-6 sm:mb-0 overflow-hidden rounded-full w-[130px]"
47
+ transparent-mode
48
+ no-logo
49
+ >
50
+ <BaseImage
51
+ v-if="author.author.image?.src"
52
+ :src="author.author.image.src.url"
53
+ :width="author.author.image.src.width"
54
+ :height="author.author.image.src.height"
55
+ :alt="author.author.name"
56
+ object-fit-class="cover"
57
+ image-class="can-hover:group-hover:delay-200 can-hover:group-hover:scale-100 absolute top-0 left-0 w-full transition-all duration-200 ease-in transform scale-105"
58
+ loading="lazy"
59
+ />
60
+ </BaseImagePlaceholder>
61
+ </div>
62
+ <div>
63
+ <div class="mb-4">
64
+ <h3
65
+ v-if="author.author.name"
66
+ class="!font-medium !tracking-normal !text-lg mb-1"
67
+ >
68
+ {{ author.author.name }}
69
+ </h3>
70
+ <p
71
+ v-if="author.author.jobTitle || author.author.organization"
72
+ class="text-lg"
73
+ >
74
+ {{
75
+ (author.author.jobTitle ? author.author.jobTitle : '') +
76
+ (author.author.jobTitle && author.author.organization ? ', ' : '')
77
+ }}
78
+ {{ author.author.organization }}
79
+ </p>
80
+ </div>
81
+ <BlockText
82
+ v-if="author.author.biography"
83
+ :text="author.author.biography"
84
+ variant="small"
85
+ />
86
+ </div>
87
+ </div>
88
+ </template>
89
+ </div>
90
+ </template>
@@ -6,6 +6,7 @@ import { eduMetadataDictionary } from './../../constants'
6
6
  // using borders to vertically center wonky font face
7
7
  const variantMap: Attributes = {
8
8
  primary: 'bg-primary border-primary',
9
+ 'primary-inverted': 'bg-gray-light-mid !text-primary-darker border-gray-light-mid',
9
10
  secondary: 'bg-secondary border-secondary',
10
11
  action: 'bg-action border-action'
11
12
  }
@@ -20,13 +21,15 @@ interface BasePillProps {
20
21
  variant?: string
21
22
  size?: string
22
23
  contentType?: string
24
+ invert?: boolean
23
25
  }
24
26
 
25
27
  // define props
26
28
  const props = withDefaults(defineProps<BasePillProps>(), {
27
29
  variant: 'primary',
28
30
  size: 'md',
29
- contentType: undefined
31
+ contentType: undefined,
32
+ invert: false
30
33
  })
31
34
 
32
35
  const metadataType = computed(() => {
@@ -124,7 +124,7 @@
124
124
  <MetadataEduResource
125
125
  v-else-if="metadataAttrs.type === 'resource'"
126
126
  :resource="theItem as EduResourceCardObject"
127
- :variant="metadataAttrs.variant"
127
+ :variant="metadataAttrs.icons"
128
128
  compact
129
129
  />
130
130
  </div>
@@ -132,7 +132,7 @@
132
132
  <div
133
133
  v-if="!large"
134
134
  class="BlockLinkCard__CardArrow ThemeVariantLight can-hover:block can-hover:-ml-3 can-hover:group-hover:delay-200 can-hover:opacity-0 can-hover:group-hover:ml-0 can-hover:group-hover:opacity-100 hidden -mt-1 text-2xl leading-normal transition-all duration-200 ease-in"
135
- :class="metadataAttrs ? `text-${metadataAttrs.variant}` : 'text-primary'"
135
+ :class="metadataAttrs ? `text-${metadataAttrs.icons}` : 'text-primary'"
136
136
  >
137
137
  <IconArrow />
138
138
  </div>
@@ -13,9 +13,9 @@ interface Variants {
13
13
  }
14
14
 
15
15
  export const variants: Variants = {
16
- small: 'text-body-sm',
17
- medium: 'text-body-md',
18
- large: 'text-body-lg'
16
+ small: 'text-body-sm -small',
17
+ medium: 'text-body-md -medium',
18
+ large: 'text-body-lg -large'
19
19
  }
20
20
 
21
21
  export default defineComponent({
@@ -140,7 +140,7 @@ export default defineComponent({
140
140
  default: undefined
141
141
  },
142
142
  author: {
143
- type: Object as PropType<AuthorObject | AuthorObject[]>,
143
+ type: Object as PropType<AuthorObject | { author: AuthorObject }[]>,
144
144
  required: false,
145
145
  default: undefined
146
146
  },
@@ -208,11 +208,10 @@ export default defineComponent({
208
208
  const returnDate = new Date(this.publicationDate + ' ' + currentTime)
209
209
  return returnDate.toISOString()
210
210
  },
211
- authors(): { name: string; organization: string }[] | undefined {
211
+ authors(): AuthorObject[] | undefined {
212
212
  let authors: AuthorObject[] | undefined = undefined
213
213
  if (this.author && this.author.constructor === Array) {
214
214
  authors = []
215
- // @ts-expect-error we know it's an array at this point
216
215
  this.author.forEach((author: { author: AuthorObject }) => {
217
216
  // @ts-expect-error authors array is defined above
218
217
  authors.push(author.author)
@@ -0,0 +1,77 @@
1
+ <script setup lang="ts">
2
+ import { computed, reactive } from 'vue'
3
+ import BaseImagePlaceholder from './../BaseImagePlaceholder/BaseImagePlaceholder.vue'
4
+ import BlockIframeEmbed from './../BlockIframeEmbed/BlockIframeEmbed.vue'
5
+ import BlockImageComparison from './../BlockImageComparison/BlockImageComparison.vue'
6
+ import BlockImageCarousel from './../BlockImageCarousel/BlockImageCarousel.vue'
7
+ import BlockImageStandard from './../BlockImage/BlockImageStandard.vue'
8
+ import BlockVideo from './../BlockVideo/BlockVideo.vue'
9
+ import type { StreamfieldBlockData } from './../../interfaces'
10
+
11
+ interface HeroInlineMediaProps {
12
+ heroBlocks: StreamfieldBlockData[]
13
+ constrain?: boolean
14
+ }
15
+
16
+ const props = withDefaults(defineProps<HeroInlineMediaProps>(), {
17
+ heroBlocks: undefined,
18
+ constrain: false
19
+ })
20
+
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
+ </script>
42
+ <template>
43
+ <div v-if="heroBlocks?.length && heroInline">
44
+ <BlockImageStandard
45
+ v-if="heroBlocks[0].blockType === 'HeroImageBlock'"
46
+ :data="heroBlocks[0].imageInline"
47
+ :display-caption="heroBlocks[0].displayCaption"
48
+ :caption="heroBlocks[0].caption"
49
+ :constrain="constrain"
50
+ />
51
+ <BlockImageCarousel
52
+ v-else-if="heroBlocks[0].blockType === 'CarouselBlock'"
53
+ :items="heroBlocks[0].blocks"
54
+ :block-id="heroBlocks[0].id"
55
+ />
56
+ <BlockIframeEmbed
57
+ v-else-if="heroBlocks[0].blockType === 'IframeEmbedBlock'"
58
+ :data="heroBlocks[0]"
59
+ />
60
+ <BlockVideo
61
+ v-else-if="heroBlocks[0].blockType === 'VideoBlock'"
62
+ :data="heroBlocks[0]"
63
+ autoplay
64
+ />
65
+ <BaseImagePlaceholder
66
+ v-else-if="heroBlocks[0].blockType === 'VideoEmbedBlock'"
67
+ aspect-ratio="16:9"
68
+ dark-mode
69
+ >
70
+ <div v-html="heroBlocks[0].embed?.embed"></div>
71
+ </BaseImagePlaceholder>
72
+ <BlockImageComparison
73
+ v-else-if="heroBlocks[0].blockType === 'ImageComparisonBlock'"
74
+ :data="heroBlocks[0]"
75
+ />
76
+ </div>
77
+ </template>
@@ -31,15 +31,30 @@
31
31
  :class="{ 'pt-10': hasOverlay }"
32
32
  >
33
33
  <div
34
- v-if="eyebrow"
35
- class="lg:mb-6 font-secondary mb-4 text-base font-semibold tracking-wider no-underline uppercase"
34
+ v-if="customPill || customPillType || label"
35
+ class="lg:mb-6 mb-4"
36
36
  >
37
- {{ eyebrow }}
38
- <span class="sr-only">.</span>
37
+ <BasePill
38
+ v-if="customPill || customPillType"
39
+ variant="primary"
40
+ size="lg"
41
+ class="mr-3"
42
+ :content-type="customPillType"
43
+ >
44
+ {{ customPill }}
45
+ </BasePill>
46
+ <div
47
+ v-else-if="label"
48
+ class="font-secondary text-base font-semibold tracking-wider no-underline uppercase"
49
+ >
50
+ {{ label }}
51
+ <span class="sr-only">.</span>
52
+ </div>
39
53
  </div>
40
54
  <h1
41
55
  v-if="title"
42
- class="lg:w-3/4 xl:w-3/5 xl:text-10xl lg:text-9xl md:text-8xl text-7xl lg:tracking-tightest lg:leading-tighter mb-5 font-bold leading-tight uppercase"
56
+ class="lg:w-3/4 xl:w-3/5 xl:text-10xl lg:text-9xl md:text-8xl text-7xl lg:tracking-tightest lg:leading-tighter mb-5 font-bold leading-tight"
57
+ :class="{ uppercase: !themeStore.isEdu }"
43
58
  >
44
59
  {{ title }}
45
60
  </h1>
@@ -58,24 +73,45 @@
58
73
  <script lang="ts">
59
74
  import { defineComponent } from 'vue'
60
75
  import { mixinTransparentHeader } from './../../utils/mixins'
76
+ import { mapStores } from 'pinia'
77
+ import { useThemeStore } from '../../store/theme'
78
+ import BasePill from './../BasePill/BasePill.vue'
79
+
61
80
  export default defineComponent({
62
81
  name: 'HeroLarge',
82
+ components: {
83
+ BasePill
84
+ },
63
85
  props: {
64
- eyebrow: {
86
+ label: {
87
+ type: String,
88
+ required: false,
89
+ default: undefined
90
+ },
91
+ customPill: {
65
92
  type: String,
66
- required: false
93
+ required: false,
94
+ default: undefined
95
+ },
96
+ customPillType: {
97
+ type: String,
98
+ required: false,
99
+ default: undefined
67
100
  },
68
101
  title: {
69
102
  type: String,
70
- required: false
103
+ required: false,
104
+ default: undefined
71
105
  },
72
106
  summary: {
73
107
  type: String,
74
- required: false
108
+ required: false,
109
+ default: undefined
75
110
  },
76
111
  image: {
77
112
  type: Object,
78
- required: false
113
+ required: false,
114
+ default: undefined
79
115
  },
80
116
  // If secondary nav is also on this page, will add more space above hero text
81
117
  hasOverlay: {
@@ -83,6 +119,9 @@ export default defineComponent({
83
119
  default: false
84
120
  }
85
121
  },
122
+ computed: {
123
+ ...mapStores(useThemeStore)
124
+ },
86
125
  mounted() {
87
126
  mixinTransparentHeader()
88
127
  }
@@ -52,7 +52,7 @@
52
52
  class="lg:w-1/2 xl:w-5/12 block"
53
53
  >
54
54
  <div
55
- v-if="customPill || customLabel || feature.label"
55
+ v-if="customPill || customPillType || customLabel || feature.label"
56
56
  class="flex items-center lg:mb-3 mb-2"
57
57
  >
58
58
  <BasePill
@@ -126,7 +126,7 @@ const standardsIste = computed(() => {
126
126
  class="col-start-container lg:col-start-indent-col-2 col-end-bleed lg:grid grid-cols-subgrid"
127
127
  :class="backgroundClass"
128
128
  >
129
- <div class="is-this-needed col-start-container lg:col-start-indent-col-2 col-end-container">
129
+ <div class="col-start-container lg:col-start-indent-col-2 col-end-container">
130
130
  <div class="MetaPanel-heading lg:grid grid-cols-12 col-end-container container">
131
131
  <div class="col-start-1 col-end-10 xl:col-end-9 pl-4 lg:pl-10 pr-2 py-6 lg:py-10">
132
132
  <MetaPanelItems
@@ -13,7 +13,7 @@ import IconTime from './../Icons/IconTime.vue'
13
13
 
14
14
  interface MetaPanelProps {
15
15
  theme?: MetaPanelTheme
16
- primarySubject: EduResourcesSubject
16
+ primarySubject?: EduResourcesSubject
17
17
  additionalSubjects?: EduResourcesSubject[]
18
18
  gradeLevels?: EduResourcesGradeLevel[]
19
19
  time?: EduResourcesTime
@@ -35,14 +35,17 @@ const audience = computed(() => {
35
35
  })
36
36
 
37
37
  const subjects = computed(() => {
38
- let combinedArray = [primarySubject.subject]
39
- let output = undefined
40
- if (additionalSubjects) {
41
- const filteredArray = additionalSubjects.map((item) => item.subject)
42
- combinedArray = combinedArray.concat(filteredArray)
38
+ if (primarySubject?.subject) {
39
+ let combinedArray = [primarySubject.subject]
40
+ let output = undefined
41
+ if (additionalSubjects) {
42
+ const filteredArray = additionalSubjects.map((item) => item.subject)
43
+ combinedArray = combinedArray.concat(filteredArray)
44
+ }
45
+ output = combinedArray.join(', ')
46
+ return output
43
47
  }
44
- output = combinedArray.join(', ')
45
- return output
48
+ return undefined
46
49
  })
47
50
 
48
51
  const iconColor = computed(() => {
package/src/constants.ts CHANGED
@@ -1,23 +1,33 @@
1
1
  import type { DictionaryInterface, PillDictionaryInterface } from './interfaces'
2
2
 
3
3
  export const eduMetadataDictionary: PillDictionaryInterface = {
4
+ EDUCollectionsDetailPage: {
5
+ label: 'Collection',
6
+ variant: 'primary-inverted',
7
+ icons: 'primary',
8
+ type: 'resource'
9
+ },
4
10
  EDUExplainerArticlePage: {
5
11
  label: 'Explainer Article',
6
12
  variant: 'secondary',
13
+ icons: 'secondary',
7
14
  type: 'resource'
8
15
  },
9
16
  EDULessonPage: {
10
17
  label: 'Lesson',
11
18
  variant: 'primary',
19
+ icons: 'primary',
12
20
  type: 'resource'
13
21
  },
14
22
  EDUTeachableMomentPage: {
15
23
  label: 'Teachable Moment',
16
24
  variant: 'primary',
25
+ icons: 'primary',
17
26
  type: 'resource'
18
27
  },
19
28
  EDUEventPage: {
20
29
  variant: 'primary',
30
+ icons: 'primary',
21
31
  type: 'event'
22
32
  }
23
33
  }
@@ -28,6 +38,7 @@ export const searchContentTypeToPageType: DictionaryInterface = {
28
38
  events_eventpage: 'EventPage',
29
39
  missions_mission: 'Mission',
30
40
  eduevents_edueventpage: 'EDUEventPage',
41
+ eduresources_educollectionsdetailpage: 'EDUCollectionsDetailPage',
31
42
  eduresources_eduexplainerarticlepage: 'EDUExplainerArticlePage',
32
43
  eduresources_edulessonpage: 'EDULessonPage',
33
44
  eduresources_eduteachablemomentpage: 'EDUTeachableMomentPage'
package/src/interfaces.ts CHANGED
@@ -183,7 +183,10 @@ export interface Attributes {
183
183
 
184
184
  export interface AuthorObject {
185
185
  name: string
186
- organization: string
186
+ organization?: string
187
+ image?: ImageObject
188
+ jobTitle?: string
189
+ biography?: string
187
190
  }
188
191
 
189
192
  export interface Topic {
@@ -196,6 +199,7 @@ export type MetadataType = 'event' | 'resource'
196
199
  export interface LabelObject {
197
200
  label?: string
198
201
  variant: string
202
+ icons?: string
199
203
  type?: MetadataType
200
204
  }
201
205
  export interface PillDictionaryInterface {
@@ -261,6 +265,7 @@ export interface EduResourceStandardItem {
261
265
 
262
266
  export interface PageEduResourcesObject extends PageObject {
263
267
  hero?: StreamfieldBlockData[]
268
+ authors?: { author: AuthorObject }[]
264
269
  primarySubject?: EduResourcesSubject
265
270
  additionalSubjects?: EduResourcesSubject[]
266
271
  gradeLevels?: EduResourcesGradeLevel[]
@@ -0,0 +1,103 @@
1
+ import { BlockRelatedLinksData } from './../../../components/BlockRelatedLinks/BlockRelatedLinks.stories.js'
2
+ import { BlockLinkCardCarouselData } from './../../../components/BlockLinkCarousel/BlockLinkCarousel.stories.js'
3
+ import { BlockStreamfieldMinimalData } from './../../../components/BlockStreamfield/BlockStreamfield.stories'
4
+ import PageEduCollectionsDetail from './PageEduCollectionsDetail.vue'
5
+
6
+ export default {
7
+ title: 'Templates/EDU/PageEduCollectionsDetail',
8
+ component: PageEduCollectionsDetail,
9
+ tags: ['!autodocs'],
10
+ decorators: [
11
+ () => ({
12
+ template: `<div id="storyDecorator" class="disable-nav-offset"><story/></div>`
13
+ })
14
+ ],
15
+ parameters: {
16
+ layout: 'fullscreen',
17
+ html: {
18
+ root: '#storyDecorator'
19
+ }
20
+ },
21
+ excludeStories: /.*Data$/
22
+ }
23
+
24
+ export const BaseStory = {
25
+ name: 'PageEduCollectionsDetail',
26
+ args: {
27
+ data: {
28
+ __typename: 'EDUCollectionsDetailPage',
29
+ title: 'A collections page',
30
+ lastPublishedAt: '2024-08-22T02:33:13.507206+00:00',
31
+ url: 'http://localhost:3000/edu/resources/collections-detail',
32
+ pageType: 'EDUCollectionsDetailPage',
33
+ contentType: 'edu_resources.EDUCollectionsDetailPage',
34
+ showJumpMenu: true,
35
+ showMetaPanel: true,
36
+ thumbnailImage: {
37
+ __typename: 'CustomImage',
38
+ original: 'http://127.0.0.1:9000/media/original_images/imagessirtfsirtf-090303-16.jpg',
39
+ alt: ''
40
+ },
41
+ heroImage: {
42
+ src: {
43
+ url: 'https://picsum.photos/id/973/1800/1200',
44
+ width: 1800,
45
+ height: 1200
46
+ },
47
+ srcSet:
48
+ 'https://picsum.photos/id/865/768/548 768w, https://picsum.photos/id/865/1024/684 1024w, https://picsum.photos/id/865/1440/770 1440w, https://picsum.photos/id/865/1800/963 1800w',
49
+ screenMd: {
50
+ url: 'https://picsum.photos/id/921/800/640'
51
+ },
52
+ screenSm: {
53
+ url: 'https://picsum.photos/id/247/640/900'
54
+ },
55
+ alt: 'The alt text'
56
+ },
57
+ heroImageCaption: '<p>Lorem ipsum dolor sit amet</p>',
58
+ heroConstrain: true,
59
+ heroPosition: 'full_bleed',
60
+ primarySubject: {
61
+ subject: 'Arts'
62
+ },
63
+ additionalSubjects: [
64
+ {
65
+ subject: 'Science'
66
+ }
67
+ ],
68
+ gradeLevels: [
69
+ {
70
+ gradeLevel: 'K'
71
+ },
72
+ {
73
+ gradeLevel: '1'
74
+ }
75
+ ],
76
+
77
+ body: BlockStreamfieldMinimalData.body,
78
+
79
+ relatedLinks: BlockRelatedLinksData.data,
80
+ relatedContentHeading: 'Related Content',
81
+ relatedContent: BlockLinkCardCarouselData
82
+ }
83
+ }
84
+ }
85
+
86
+ export const Inline = {
87
+ args: {
88
+ data: {
89
+ ...BaseStory.args.data,
90
+ heroPosition: 'inline',
91
+ heroConstrain: false
92
+ }
93
+ }
94
+ }
95
+
96
+ export const NoMetaPanel = {
97
+ args: {
98
+ data: {
99
+ ...BaseStory.args.data,
100
+ showMetaPanel: false
101
+ }
102
+ }
103
+ }