@explorer-1/vue 0.2.40 → 0.2.41
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.
- package/components.d.ts +3 -0
- package/dist/explorer-1-vue.js +4912 -4553
- package/dist/explorer-1-vue.umd.cjs +13 -13
- package/dist/src/components/BasePill/BasePill.vue.d.ts +4 -10
- package/dist/src/components/BaseSwimlane/BaseSwimlane.vue.d.ts +2 -2
- package/dist/src/components/BlockIframeEmbed/BlockIframeEmbed.vue.d.ts +9 -1
- package/dist/src/components/BlockImage/BlockImageFullBleed.vue.d.ts +23 -4
- package/dist/src/components/BlockImage/BlockImageStandard.vue.d.ts +23 -4
- package/dist/src/components/BlockImageComparison/BlockImageComparison.vue.d.ts +11 -1
- package/dist/src/components/BlockVideo/BlockVideo.vue.d.ts +19 -1
- package/dist/src/components/BlockVideoEmbed/BlockVideoEmbed.vue.d.ts +9 -0
- package/dist/src/components/DetailHeadline/DetailHeadline.vue.d.ts +9 -0
- package/dist/src/components/HeroListingIndex/HeroListingIndex.stories.d.ts +82 -93
- package/dist/src/components/MetadataEduResource/MetadataEduResource.vue.d.ts +4 -0
- package/dist/src/components/MetadataEvent/MetadataEvent.stories.d.ts +1 -0
- package/dist/src/components/MixinCarousel/MixinCarousel.stories.d.ts +4 -4
- package/dist/src/components/MixinCarousel/MixinCarousel.vue.d.ts +2 -2
- package/dist/src/components/MixinFancybox/MixinFancybox.vue.d.ts +1 -1
- package/dist/src/components/NavDesktop/NavDesktop.stories.d.ts +4 -4
- package/dist/src/components/NavDesktop/NavDesktop.vue.d.ts +2 -2
- package/dist/src/components/NavDesktopEdu/NavDesktopEdu.stories.d.ts +2 -2
- package/dist/src/components/NavMobile/NavMobile.stories.d.ts +3 -3
- package/dist/src/components/NavMobile/NavMobile.vue.d.ts +1 -1
- package/dist/src/components/NavMobile/NavMobileEdu.stories.d.ts +3 -3
- package/dist/src/components/NavSecondary/NavSecondaryDropdown.vue.d.ts +4 -4
- package/dist/src/components/NewsDetailMediaContact/NewsDetailMediaContact.vue.d.ts +1 -1
- package/dist/src/components/SearchFilterGroup/SearchFilterGroup.vue.d.ts +7 -0
- package/dist/src/components/SearchResultCard/SearchResultCard.vue.d.ts +54 -5
- package/dist/src/components/SearchResultGridItem/SearchResultGridItem.vue.d.ts +42 -4
- package/dist/src/components/TextArea/TextArea.vue.d.ts +9 -9
- package/dist/src/components/TextInput/TextInput.vue.d.ts +9 -9
- package/dist/src/constants.d.ts +12 -2
- package/dist/src/interfaces.d.ts +16 -9
- package/dist/src/templates/edu/PageEduGalleryDetail/PageEduGalleryDetail.stories.d.ts +284 -0
- package/dist/src/templates/edu/PageEduLesson/PageEduLesson.stories.d.ts +8 -2
- package/dist/src/templates/edu/PageEduMultimediaDetail/PageEduMultimediaDetail.stories.d.ts +359 -0
- package/dist/src/utils/getHeadingId.d.ts +1 -3
- package/dist/src/utils/lookupContentType.d.ts +3 -0
- package/dist/src/utils/mixins.d.ts +1 -1
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/src/components/BaseButton/BaseButton.vue +3 -3
- package/src/components/BaseImageCaption/BaseImageCaption.vue +10 -7
- package/src/components/BlockImage/BlockImageFullBleed.vue +37 -7
- package/src/components/BlockImage/BlockImageStandard.vue +36 -8
- package/src/components/BlockImageComparison/BlockImageComparison.vue +23 -20
- package/src/components/BlockRelatedLinks/RelatedLink.vue +2 -2
- package/src/components/BlockVideo/BlockVideo.vue +22 -2
- package/src/components/BlockVideoEmbed/BlockVideoEmbed.vue +10 -2
- package/src/components/DetailHeadline/DetailHeadline.vue +11 -6
- package/src/templates/edu/PageEduGalleryDetail/PageEduGalleryDetail.stories.js +13 -4
- package/src/templates/edu/PageEduGalleryDetail/PageEduGalleryDetail.vue +36 -18
- package/src/templates/edu/PageEduMultimediaDetail/PageEduMultimediaDetail.vue +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@explorer-1/vue",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.41",
|
|
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.
|
|
33
|
+
"@explorer-1/common": "1.1.12"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@vitejs/plugin-vue": "^5.0.4",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { defineComponent } from 'vue'
|
|
2
|
+
import { defineComponent, resolveComponent } from 'vue'
|
|
3
3
|
|
|
4
4
|
interface Variants {
|
|
5
5
|
[key: string]: string
|
|
@@ -54,11 +54,11 @@ export default defineComponent({
|
|
|
54
54
|
},
|
|
55
55
|
emits: ['click'],
|
|
56
56
|
computed: {
|
|
57
|
-
tag()
|
|
57
|
+
tag() {
|
|
58
58
|
if (this.disabled) {
|
|
59
59
|
return 'button'
|
|
60
60
|
} else if (this.to) {
|
|
61
|
-
return '
|
|
61
|
+
return resolveComponent('NuxtLink')
|
|
62
62
|
} else if (this.href) {
|
|
63
63
|
return 'a'
|
|
64
64
|
} else {
|
|
@@ -31,7 +31,10 @@ export default defineComponent({
|
|
|
31
31
|
v-if="data"
|
|
32
32
|
class="BaseImageCaption text-body-sm"
|
|
33
33
|
>
|
|
34
|
-
<div
|
|
34
|
+
<div
|
|
35
|
+
v-if="data.caption || data.credit"
|
|
36
|
+
class="inline mr-2"
|
|
37
|
+
>
|
|
35
38
|
<div
|
|
36
39
|
class="the-caption-text inline"
|
|
37
40
|
v-html="data.caption"
|
|
@@ -44,20 +47,20 @@ export default defineComponent({
|
|
|
44
47
|
</span>
|
|
45
48
|
</div>
|
|
46
49
|
<BaseLink
|
|
47
|
-
v-if="
|
|
50
|
+
v-if="customLink"
|
|
48
51
|
class="inline-block"
|
|
49
52
|
variant="default"
|
|
50
|
-
:to="
|
|
53
|
+
:to="customLink"
|
|
51
54
|
>
|
|
52
|
-
|
|
55
|
+
{{ customLinkText }}
|
|
53
56
|
</BaseLink>
|
|
54
57
|
<BaseLink
|
|
55
|
-
v-else-if="
|
|
58
|
+
v-else-if="data.detailUrl"
|
|
56
59
|
class="inline-block"
|
|
57
60
|
variant="default"
|
|
58
|
-
:to="
|
|
61
|
+
:to="data.detailUrl"
|
|
59
62
|
>
|
|
60
|
-
|
|
63
|
+
Full Image Details
|
|
61
64
|
</BaseLink>
|
|
62
65
|
</div>
|
|
63
66
|
</template>
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { defineComponent } from 'vue'
|
|
3
3
|
import type { PropType } from 'vue'
|
|
4
|
+
import { mapStores } from 'pinia'
|
|
5
|
+
import { useThemeStore } from '../../store/theme'
|
|
6
|
+
|
|
4
7
|
import MixinFancybox from './../MixinFancybox/MixinFancybox.vue'
|
|
5
8
|
import BaseImage from './../BaseImage/BaseImage.vue'
|
|
6
9
|
import BaseImagePlaceholder from './../BaseImagePlaceholder/BaseImagePlaceholder.vue'
|
|
@@ -19,7 +22,7 @@ export default defineComponent({
|
|
|
19
22
|
props: {
|
|
20
23
|
data: {
|
|
21
24
|
type: Object as PropType<ImageObject>,
|
|
22
|
-
|
|
25
|
+
default: undefined
|
|
23
26
|
},
|
|
24
27
|
// if a caption should even be visible
|
|
25
28
|
displayCaption: {
|
|
@@ -29,7 +32,12 @@ export default defineComponent({
|
|
|
29
32
|
// overrides caption provided with image model
|
|
30
33
|
caption: {
|
|
31
34
|
type: String,
|
|
32
|
-
|
|
35
|
+
default: undefined
|
|
36
|
+
},
|
|
37
|
+
// overrides detail url provided with image model. Also forces hasCaption to be true
|
|
38
|
+
customDetailUrl: {
|
|
39
|
+
type: String,
|
|
40
|
+
default: undefined
|
|
33
41
|
},
|
|
34
42
|
// if the image should be constrained to a fixed aspect ratio (21:9 on smaller screens, 2:1 on larger screens)
|
|
35
43
|
constrain: {
|
|
@@ -43,6 +51,7 @@ export default defineComponent({
|
|
|
43
51
|
}
|
|
44
52
|
},
|
|
45
53
|
computed: {
|
|
54
|
+
...mapStores(useThemeStore),
|
|
46
55
|
theCaption(): string | undefined {
|
|
47
56
|
if (this.caption && this.caption.length > 2 && this.displayCaption) {
|
|
48
57
|
return this.caption
|
|
@@ -59,19 +68,36 @@ export default defineComponent({
|
|
|
59
68
|
theSrcSet(): string | undefined {
|
|
60
69
|
return this.theData ? mixinGetSrcSet(this.theData) : undefined
|
|
61
70
|
},
|
|
71
|
+
theCredit() {
|
|
72
|
+
if (this.themeStore.isEdu && !this.displayCaption) {
|
|
73
|
+
return undefined
|
|
74
|
+
}
|
|
75
|
+
return this.data?.credit
|
|
76
|
+
},
|
|
62
77
|
// reform the data object with the computed caption
|
|
63
78
|
theData(): ImageObject | undefined {
|
|
64
79
|
if (this.data) {
|
|
65
80
|
return {
|
|
66
81
|
...this.data,
|
|
67
|
-
caption: this.theCaption
|
|
82
|
+
caption: this.theCaption,
|
|
83
|
+
credit: this.theCredit,
|
|
84
|
+
detailUrl: this.customDetailUrl
|
|
68
85
|
}
|
|
69
86
|
}
|
|
70
87
|
return undefined
|
|
71
88
|
},
|
|
72
89
|
hasCaptionArea(): boolean {
|
|
73
|
-
if (this.data
|
|
74
|
-
|
|
90
|
+
if (this.data) {
|
|
91
|
+
if (this.themeStore.isEdu) {
|
|
92
|
+
return this.theData?.caption || this.customDetailUrl ? true : false
|
|
93
|
+
} else if (
|
|
94
|
+
this.theData?.caption ||
|
|
95
|
+
this.theData?.credit ||
|
|
96
|
+
this.theData?.detailUrl ||
|
|
97
|
+
this.customDetailUrl
|
|
98
|
+
) {
|
|
99
|
+
return true
|
|
100
|
+
}
|
|
75
101
|
}
|
|
76
102
|
return false
|
|
77
103
|
}
|
|
@@ -87,7 +113,7 @@ export default defineComponent({
|
|
|
87
113
|
:src="theData.original || theData.src?.url"
|
|
88
114
|
:caption="theData.caption"
|
|
89
115
|
:credit="theData.credit"
|
|
90
|
-
:detail-url="theData.detailUrl"
|
|
116
|
+
:detail-url="customDetailUrl || theData.detailUrl"
|
|
91
117
|
>
|
|
92
118
|
<BaseImagePlaceholder
|
|
93
119
|
:aspect-ratio="constrain ? '16:9' : 'none'"
|
|
@@ -113,7 +139,11 @@ export default defineComponent({
|
|
|
113
139
|
v-if="data && hasCaptionArea"
|
|
114
140
|
class="max-w-screen-3xl p-4 pb-0 mx-auto"
|
|
115
141
|
>
|
|
116
|
-
<BaseImageCaption
|
|
142
|
+
<BaseImageCaption
|
|
143
|
+
:data="theData"
|
|
144
|
+
:custom-link="customDetailUrl"
|
|
145
|
+
custom-link-text="Full Image Details"
|
|
146
|
+
/>
|
|
117
147
|
</div>
|
|
118
148
|
</div>
|
|
119
149
|
</template>
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { defineComponent } from 'vue'
|
|
3
3
|
import type { PropType } from 'vue'
|
|
4
|
-
|
|
4
|
+
import { mapStores } from 'pinia'
|
|
5
|
+
import { useThemeStore } from '../../store/theme'
|
|
5
6
|
import type { ImageObject } from './../../interfaces'
|
|
6
7
|
import MixinFancybox from './../MixinFancybox/MixinFancybox.vue'
|
|
7
8
|
import BaseImage from './../BaseImage/BaseImage.vue'
|
|
@@ -19,7 +20,7 @@ export default defineComponent({
|
|
|
19
20
|
props: {
|
|
20
21
|
data: {
|
|
21
22
|
type: Object as PropType<ImageObject>,
|
|
22
|
-
|
|
23
|
+
default: undefined
|
|
23
24
|
},
|
|
24
25
|
// if a caption should even be visible
|
|
25
26
|
displayCaption: {
|
|
@@ -29,7 +30,12 @@ export default defineComponent({
|
|
|
29
30
|
// overrides caption provided with image model
|
|
30
31
|
caption: {
|
|
31
32
|
type: String,
|
|
32
|
-
|
|
33
|
+
default: undefined
|
|
34
|
+
},
|
|
35
|
+
// overrides detail url provided with image model. Also forces hasCaption to be true
|
|
36
|
+
customDetailUrl: {
|
|
37
|
+
type: String,
|
|
38
|
+
default: undefined
|
|
33
39
|
},
|
|
34
40
|
// if the image should be constrained to a 16:9 aspect ratio
|
|
35
41
|
constrain: {
|
|
@@ -38,6 +44,7 @@ export default defineComponent({
|
|
|
38
44
|
}
|
|
39
45
|
},
|
|
40
46
|
computed: {
|
|
47
|
+
...mapStores(useThemeStore),
|
|
41
48
|
theCaption(): string | undefined {
|
|
42
49
|
if (this.caption && this.caption.length > 2 && this.displayCaption) {
|
|
43
50
|
return this.caption
|
|
@@ -51,19 +58,36 @@ export default defineComponent({
|
|
|
51
58
|
}
|
|
52
59
|
return undefined
|
|
53
60
|
},
|
|
61
|
+
theCredit() {
|
|
62
|
+
if (this.themeStore.isEdu && !this.displayCaption) {
|
|
63
|
+
return undefined
|
|
64
|
+
}
|
|
65
|
+
return this.data?.credit
|
|
66
|
+
},
|
|
54
67
|
// reform the data object with the computed caption
|
|
55
68
|
theData(): ImageObject | undefined {
|
|
56
69
|
if (this.data) {
|
|
57
70
|
return {
|
|
58
71
|
...this.data,
|
|
59
|
-
caption: this.theCaption
|
|
72
|
+
caption: this.theCaption,
|
|
73
|
+
credit: this.theCredit,
|
|
74
|
+
detailUrl: this.customDetailUrl
|
|
60
75
|
}
|
|
61
76
|
}
|
|
62
77
|
return undefined
|
|
63
78
|
},
|
|
64
79
|
hasCaptionArea(): boolean {
|
|
65
|
-
if (this.
|
|
66
|
-
|
|
80
|
+
if (this.theData) {
|
|
81
|
+
if (this.themeStore.isEdu) {
|
|
82
|
+
return this.theData.caption || this.customDetailUrl ? true : false
|
|
83
|
+
} else if (
|
|
84
|
+
this.theData.caption ||
|
|
85
|
+
this.theData.credit ||
|
|
86
|
+
this.theData.detailUrl ||
|
|
87
|
+
this.customDetailUrl
|
|
88
|
+
) {
|
|
89
|
+
return true
|
|
90
|
+
}
|
|
67
91
|
}
|
|
68
92
|
return false
|
|
69
93
|
}
|
|
@@ -77,7 +101,7 @@ export default defineComponent({
|
|
|
77
101
|
:src="theData.original || theData.src?.url"
|
|
78
102
|
:caption="theData.caption"
|
|
79
103
|
:credit="theData.credit"
|
|
80
|
-
:detail-url="theData.detailUrl"
|
|
104
|
+
:detail-url="customDetailUrl || theData.detailUrl"
|
|
81
105
|
>
|
|
82
106
|
<BaseImagePlaceholder
|
|
83
107
|
:aspect-ratio="constrain ? '16:9' : 'none'"
|
|
@@ -100,7 +124,11 @@ export default defineComponent({
|
|
|
100
124
|
v-if="theData && hasCaptionArea"
|
|
101
125
|
class="lg:px-0 p-4 pb-0 print:pl-0"
|
|
102
126
|
>
|
|
103
|
-
<BaseImageCaption
|
|
127
|
+
<BaseImageCaption
|
|
128
|
+
:data="theData"
|
|
129
|
+
:custom-link="customDetailUrl"
|
|
130
|
+
custom-link-text="Full Image Details"
|
|
131
|
+
/>
|
|
104
132
|
</div>
|
|
105
133
|
</div>
|
|
106
134
|
</template>
|
|
@@ -1,38 +1,41 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div v-if="data">
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
/>
|
|
12
|
-
</client-only>
|
|
3
|
+
<VueCompareImage
|
|
4
|
+
v-if="theBeforeImageSrc && theAfterImageSrc"
|
|
5
|
+
class="h-full animate-fadeIn"
|
|
6
|
+
:left-image="theBeforeImageSrc.url"
|
|
7
|
+
left-image-alt="Left image"
|
|
8
|
+
:right-image="theAfterImageSrc.url"
|
|
9
|
+
right-image-alt="Right image"
|
|
10
|
+
/>
|
|
13
11
|
<div
|
|
14
|
-
v-if="data.caption
|
|
15
|
-
class="
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
v-if="data.caption || customDetailUrl"
|
|
13
|
+
class="lg:px-0 p-4 pb-0 print:pl-0"
|
|
14
|
+
>
|
|
15
|
+
<BaseImageCaption
|
|
16
|
+
:data="{ caption: data.caption }"
|
|
17
|
+
:custom-link="customDetailUrl"
|
|
18
|
+
custom-link-text="Full Image Details"
|
|
19
|
+
/>
|
|
20
|
+
</div>
|
|
18
21
|
</div>
|
|
19
22
|
</template>
|
|
20
23
|
|
|
21
24
|
<script lang="ts">
|
|
22
25
|
import { defineComponent } from 'vue'
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
// const VueCompareImage = process.browser ? require('vue3-compare-image') : null
|
|
26
|
+
import BaseImageCaption from './../BaseImageCaption/BaseImageCaption.vue'
|
|
26
27
|
|
|
27
28
|
export default defineComponent({
|
|
28
29
|
name: 'BlockImageComparison',
|
|
29
|
-
|
|
30
|
-
// VueCompareImage,
|
|
31
|
-
// },
|
|
30
|
+
components: { BaseImageCaption },
|
|
32
31
|
props: {
|
|
33
32
|
data: {
|
|
34
33
|
type: Object,
|
|
35
34
|
required: true
|
|
35
|
+
},
|
|
36
|
+
customDetailUrl: {
|
|
37
|
+
type: String,
|
|
38
|
+
default: undefined
|
|
36
39
|
}
|
|
37
40
|
},
|
|
38
41
|
computed: {
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
</component>
|
|
19
19
|
</template>
|
|
20
20
|
<script lang="ts">
|
|
21
|
-
import { defineComponent } from 'vue'
|
|
21
|
+
import { defineComponent, resolveComponent } from 'vue'
|
|
22
22
|
import IconArrow from './../Icons/IconArrow.vue'
|
|
23
23
|
import IconDownload from './../Icons/IconDownload.vue'
|
|
24
24
|
import IconExternal from './../Icons/IconExternal.vue'
|
|
@@ -59,7 +59,7 @@ export default defineComponent({
|
|
|
59
59
|
computed: {
|
|
60
60
|
tag() {
|
|
61
61
|
if (this.to) {
|
|
62
|
-
return '
|
|
62
|
+
return resolveComponent('NuxtLink')
|
|
63
63
|
} else {
|
|
64
64
|
return 'a'
|
|
65
65
|
}
|
|
@@ -9,15 +9,21 @@
|
|
|
9
9
|
/>
|
|
10
10
|
|
|
11
11
|
<div
|
|
12
|
-
v-if="
|
|
12
|
+
v-if="hasCaption"
|
|
13
13
|
class="lg:px-0 p-4 pb-0 print:pl-0"
|
|
14
14
|
>
|
|
15
|
-
<BaseImageCaption
|
|
15
|
+
<BaseImageCaption
|
|
16
|
+
:data="data"
|
|
17
|
+
:custom-link="customDetailUrl"
|
|
18
|
+
custom-link-text="Full Video Details"
|
|
19
|
+
/>
|
|
16
20
|
</div>
|
|
17
21
|
</div>
|
|
18
22
|
</template>
|
|
19
23
|
<script lang="ts">
|
|
20
24
|
import { defineComponent } from 'vue'
|
|
25
|
+
import { mapStores } from 'pinia'
|
|
26
|
+
import { useThemeStore } from '../../store/theme'
|
|
21
27
|
import BaseVideo from './../BaseVideo/BaseVideo.vue'
|
|
22
28
|
import BaseImageCaption from './../BaseImageCaption/BaseImageCaption.vue'
|
|
23
29
|
|
|
@@ -35,6 +41,20 @@ export default defineComponent({
|
|
|
35
41
|
autoplay: {
|
|
36
42
|
type: Boolean,
|
|
37
43
|
default: false
|
|
44
|
+
},
|
|
45
|
+
customDetailUrl: {
|
|
46
|
+
type: String,
|
|
47
|
+
default: undefined
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
computed: {
|
|
51
|
+
...mapStores(useThemeStore),
|
|
52
|
+
hasCaption() {
|
|
53
|
+
if (this.themeStore.isEdu) {
|
|
54
|
+
return this.data?.caption || this.customDetailUrl
|
|
55
|
+
} else {
|
|
56
|
+
return this.data?.caption || this.data?.credit || this.customDetailUrl
|
|
57
|
+
}
|
|
38
58
|
}
|
|
39
59
|
}
|
|
40
60
|
})
|
|
@@ -10,10 +10,14 @@
|
|
|
10
10
|
<div v-html="data.embed.embed"></div>
|
|
11
11
|
</BaseImagePlaceholder>
|
|
12
12
|
<div
|
|
13
|
-
v-if="data.caption"
|
|
13
|
+
v-if="data.caption || customDetailUrl"
|
|
14
14
|
class="lg:px-0 p-4 print:pl-0"
|
|
15
15
|
>
|
|
16
|
-
<BaseImageCaption
|
|
16
|
+
<BaseImageCaption
|
|
17
|
+
:data="data"
|
|
18
|
+
:custom-link="customDetailUrl"
|
|
19
|
+
custom-link-text="Full Video Details"
|
|
20
|
+
/>
|
|
17
21
|
</div>
|
|
18
22
|
</div>
|
|
19
23
|
</template>
|
|
@@ -45,6 +49,10 @@ export default defineComponent({
|
|
|
45
49
|
type: Object as PropType<Partial<BlockData>>,
|
|
46
50
|
required: false,
|
|
47
51
|
default: undefined
|
|
52
|
+
},
|
|
53
|
+
customDetailUrl: {
|
|
54
|
+
type: String,
|
|
55
|
+
default: undefined
|
|
48
56
|
}
|
|
49
57
|
},
|
|
50
58
|
mounted() {
|
|
@@ -100,12 +100,13 @@
|
|
|
100
100
|
<span :itemprop="schema ? 'name' : undefined"> Jet Propulsion Laboratory </span>
|
|
101
101
|
<span :itemprop="schema ? 'url' : undefined"> https://www.jpl.nasa.gov/ </span>
|
|
102
102
|
</span>
|
|
103
|
-
<
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
103
|
+
<meta
|
|
104
|
+
v-if="schema && publicationDate"
|
|
105
|
+
itemprop="datePublished"
|
|
106
|
+
:content="pubDatetime"
|
|
107
|
+
/>
|
|
108
|
+
|
|
109
|
+
<span v-if="publicationDate && !hideDate">
|
|
109
110
|
{{
|
|
110
111
|
// @ts-ignore
|
|
111
112
|
$filters.displayDate(publicationDate)
|
|
@@ -186,6 +187,10 @@ export default defineComponent({
|
|
|
186
187
|
schema: {
|
|
187
188
|
type: Boolean,
|
|
188
189
|
default: false
|
|
190
|
+
},
|
|
191
|
+
hideDate: {
|
|
192
|
+
type: Boolean,
|
|
193
|
+
default: false
|
|
189
194
|
}
|
|
190
195
|
},
|
|
191
196
|
computed: {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { BlockKeyPointsData } from './../../../components/BlockKeyPoints/BlockKeyPoints.stories'
|
|
2
1
|
import { BlockLinkCardCarouselData } from './../../../components/BlockLinkCarousel/BlockLinkCarousel.stories.js'
|
|
3
2
|
import { EventsBlockLinkCarouselData } from './../../../components/BlockLinkCarousel/BlockLinkCarousel.stories'
|
|
4
3
|
import { AboutTheAuthorData } from './../../../components/AboutTheAuthor/AboutTheAuthor.stories'
|
|
@@ -33,6 +32,12 @@ const PageEduGalleryDetailData = {
|
|
|
33
32
|
authors: AboutTheAuthorData,
|
|
34
33
|
|
|
35
34
|
body: [
|
|
35
|
+
{
|
|
36
|
+
blockType: 'HeadingBlock',
|
|
37
|
+
heading: 'Gallery Body',
|
|
38
|
+
level: 'h2',
|
|
39
|
+
size: 'h2'
|
|
40
|
+
},
|
|
36
41
|
{
|
|
37
42
|
blockType: 'RichTextBlock',
|
|
38
43
|
value:
|
|
@@ -75,6 +80,7 @@ export const BaseStory = {
|
|
|
75
80
|
{
|
|
76
81
|
blockId: `${Math.random().toString(36).slice(2)}`,
|
|
77
82
|
heading: 'Gallery Item Heading',
|
|
83
|
+
externalLink: 'https://nasa.gov',
|
|
78
84
|
description:
|
|
79
85
|
'<p data-block-key="53wg6">Description that is <strong>rich text</strong>.</p>',
|
|
80
86
|
media: [{ ...BlockImageData, blockType: 'ImageBlock' }]
|
|
@@ -82,22 +88,25 @@ export const BaseStory = {
|
|
|
82
88
|
{
|
|
83
89
|
blockId: `${Math.random().toString(36).slice(2)}`,
|
|
84
90
|
heading: 'Gallery Item Heading',
|
|
91
|
+
externalLink: 'https://nasa.gov',
|
|
85
92
|
description:
|
|
86
|
-
'<p data-block-key="
|
|
93
|
+
'<p data-block-key="5f55p">Description with richtext images.</p><img alt="Perseverance Looks Back at &#x27;Bright Angel&#x27;" class="richtext-image full-width" height="600" src="https://picsum.photos/800/600" width="800"><p data-block-key="89jcq">More text and an image that's full width (above)</p><p data-block-key="6jsp"></p><img alt="Carbon Mapper Coalition&#x27;s Tanager Satellite" class="richtext-image right" height="263" src="https://picsum.photos/500/263" width="500"><p data-block-key="4409g">More text and an image that's right-aligned. Morbi mollis magna erat, a tristique libero laoreet ut. Curabitur sit amet arcu laoreet, aliquet nibh at, dictum sapien. Duis a tempus nibh. Phasellus porta felis id diam fringilla tincidunt. Curabitur eget gravida leo. Vestibulum sapien nibh, pharetra eget ornare eu, tristique at purus.</p><p data-block-key="bid36"></p><img alt="Lecture Brings Galileo&#x27;s Travels into Final Focus" class="richtext-image left" height="273" src="https://picsum.photos/500/273" width="500"><p data-block-key="1f4rd">More text and an image that's left-aligned. Morbi mollis magna erat, a tristique libero laoreet ut. Curabitur sit amet arcu laoreet, aliquet nibh at, dictum sapien. Duis a tempus nibh. Phasellus porta felis id diam fringilla tincidunt. Curabitur eget gravida leo. Vestibulum sapien nibh, pharetra eget ornare eu, tristique at purus. Duis id risus sit amet est maximus placerat a quis sem. Donec lacus sem, cursus at quam sit amet, consequat vestibulum nulla. </p>',
|
|
87
94
|
media: [BlockImageComparisonData]
|
|
88
95
|
},
|
|
89
96
|
{
|
|
90
97
|
blockId: `${Math.random().toString(36).slice(2)}`,
|
|
91
98
|
heading: 'Gallery Item Heading',
|
|
99
|
+
externalLink: 'https://nasa.gov',
|
|
92
100
|
description:
|
|
93
|
-
'<p data-block-key="
|
|
101
|
+
'<p data-block-key="5f55p">Description with a richtext embedded video below it.</p><div>\n <iframe width="200" height="113" src="https://www.youtube.com/embed/C5aC-U9jHDE?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen title="How Do We Know Where Faraway Spacecraft Are?"></iframe>\n</div>\n<p data-block-key="4t2tv">More text below the embedded video.</p>',
|
|
94
102
|
media: [BlockVideoData.block]
|
|
95
103
|
},
|
|
96
104
|
{
|
|
97
105
|
blockId: `${Math.random().toString(36).slice(2)}`,
|
|
98
106
|
heading: 'Gallery Item Heading',
|
|
107
|
+
externalLink: 'https://nasa.gov',
|
|
99
108
|
description:
|
|
100
|
-
'<p data-block-key="
|
|
109
|
+
'<p data-block-key="5f55p">Description with richtext images.</p><img alt="Perseverance Looks Back at &#x27;Bright Angel&#x27;" class="richtext-image full-width" height="600" src="https://picsum.photos/800/600" width="800"><p data-block-key="89jcq">More text and another image that's full width (above)</p><p data-block-key="6jsp"></p><img alt="Carbon Mapper Coalition&#x27;s Tanager Satellite" class="richtext-image right" height="263" src="https://picsum.photos/500/263" width="500"><p data-block-key="4409g">Short text in-between two floating images.</p><p data-block-key="bid36"></p><img alt="Lecture Brings Galileo&#x27;s Travels into Final Focus" class="richtext-image left" height="273" src="https://picsum.photos/500/273" width="500"><p data-block-key="1f4rd">More text and something that's left-aligned. Morbi mollis magna erat, a tristique libero laoreet ut. Curabitur sit amet arcu laoreet, aliquet nibh at, dictum sapien. Duis a tempus nibh. Phasellus porta felis id diam fringilla tincidunt. Curabitur eget gravida leo. Vestibulum sapien nibh, pharetra eget ornare eu, tristique at purus.</p>',
|
|
101
110
|
media: [BlockVideoEmbedData.data]
|
|
102
111
|
}
|
|
103
112
|
]
|
|
@@ -16,6 +16,7 @@ import BlockVideoEmbed from './../../../components/BlockVideoEmbed/BlockVideoEmb
|
|
|
16
16
|
import BlockRelatedLinks from './../../../components/BlockRelatedLinks/BlockRelatedLinks.vue'
|
|
17
17
|
import BlockLinkCarousel from './../../../components/BlockLinkCarousel/BlockLinkCarousel.vue'
|
|
18
18
|
import BlockText from './../../../components/BlockText/BlockText.vue'
|
|
19
|
+
import BlockStreamfield from './../../../components/BlockStreamfield/BlockStreamfield.vue'
|
|
19
20
|
import NavJumpMenu from './../../../components/NavJumpMenu/NavJumpMenu.vue'
|
|
20
21
|
import AboutTheAuthor from './../../../components/AboutTheAuthor/AboutTheAuthor.vue'
|
|
21
22
|
import { getHeadingId } from '../../../utils/getHeadingId'
|
|
@@ -25,6 +26,7 @@ interface PageEduGalleryObject extends PageEduResourcesObject {
|
|
|
25
26
|
blockId: string
|
|
26
27
|
heading?: string
|
|
27
28
|
description?: string
|
|
29
|
+
externalLink?: string
|
|
28
30
|
media: StreamfieldBlockData[]
|
|
29
31
|
}[]
|
|
30
32
|
}
|
|
@@ -57,6 +59,7 @@ const jumpMenuHeadings = computed((): BreadcrumbPathObject[] => {
|
|
|
57
59
|
}
|
|
58
60
|
return itemHeadings
|
|
59
61
|
})
|
|
62
|
+
|
|
60
63
|
const { data } = reactive(props)
|
|
61
64
|
</script>
|
|
62
65
|
<template>
|
|
@@ -77,6 +80,7 @@ const { data } = reactive(props)
|
|
|
77
80
|
:publication-date="data.publicationDate"
|
|
78
81
|
schema
|
|
79
82
|
pill
|
|
83
|
+
hide-date
|
|
80
84
|
/>
|
|
81
85
|
<ShareButtonsEdu
|
|
82
86
|
v-if="data?.url"
|
|
@@ -104,7 +108,10 @@ const { data } = reactive(props)
|
|
|
104
108
|
:key="index"
|
|
105
109
|
class="PageEduGalleryDetailItem"
|
|
106
110
|
>
|
|
107
|
-
<
|
|
111
|
+
<div
|
|
112
|
+
v-if="item.media?.length"
|
|
113
|
+
class="PageEduGalleryDetailItem__media mb-5 lg:mb-12"
|
|
114
|
+
>
|
|
108
115
|
<template
|
|
109
116
|
v-for="(block, _media_index) in item.media"
|
|
110
117
|
:key="_media_index"
|
|
@@ -113,41 +120,41 @@ const { data } = reactive(props)
|
|
|
113
120
|
<LayoutHelper
|
|
114
121
|
v-if="block.image"
|
|
115
122
|
indent="col-2"
|
|
116
|
-
class="mb-5 lg:mb-10"
|
|
117
123
|
>
|
|
118
124
|
<BlockImageStandard
|
|
119
125
|
:data="block.image"
|
|
120
126
|
:caption="block.caption"
|
|
121
127
|
:display-caption="block.displayCaption"
|
|
128
|
+
:custom-detail-url="item.externalLink"
|
|
122
129
|
/>
|
|
123
130
|
</LayoutHelper>
|
|
124
131
|
</template>
|
|
125
132
|
<template v-else-if="block.blockType === 'ImageComparisonBlock'">
|
|
126
|
-
<LayoutHelper
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
133
|
+
<LayoutHelper indent="col-2">
|
|
134
|
+
<BlockImageComparison
|
|
135
|
+
:data="block"
|
|
136
|
+
:custom-detail-url="item.externalLink"
|
|
137
|
+
/>
|
|
131
138
|
</LayoutHelper>
|
|
132
139
|
</template>
|
|
133
140
|
<template v-else-if="block.blockType === 'VideoBlock'">
|
|
134
|
-
<LayoutHelper
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
141
|
+
<LayoutHelper indent="col-2">
|
|
142
|
+
<BlockVideo
|
|
143
|
+
:data="block"
|
|
144
|
+
:custom-detail-url="item.externalLink"
|
|
145
|
+
/>
|
|
139
146
|
</LayoutHelper>
|
|
140
147
|
</template>
|
|
141
148
|
<template v-else-if="block.blockType === 'VideoEmbedBlock'">
|
|
142
|
-
<LayoutHelper
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
149
|
+
<LayoutHelper indent="col-2">
|
|
150
|
+
<BlockVideoEmbed
|
|
151
|
+
:data="block"
|
|
152
|
+
:custom-detail-url="item.externalLink"
|
|
153
|
+
/>
|
|
147
154
|
</LayoutHelper>
|
|
148
155
|
</template>
|
|
149
156
|
</template>
|
|
150
|
-
</
|
|
157
|
+
</div>
|
|
151
158
|
<LayoutHelper
|
|
152
159
|
v-if="item.heading || item.description"
|
|
153
160
|
indent="col-3"
|
|
@@ -164,6 +171,7 @@ const { data } = reactive(props)
|
|
|
164
171
|
/>
|
|
165
172
|
</LayoutHelper>
|
|
166
173
|
<LayoutHelper
|
|
174
|
+
v-if="index + 1 !== data.galleryItems?.length"
|
|
167
175
|
indent="col-2"
|
|
168
176
|
class="pt-10 lg:pt-18 mb-10 lg:mb-18"
|
|
169
177
|
>
|
|
@@ -171,6 +179,16 @@ const { data } = reactive(props)
|
|
|
171
179
|
</LayoutHelper>
|
|
172
180
|
</div>
|
|
173
181
|
|
|
182
|
+
<div
|
|
183
|
+
v-if="data.body?.length"
|
|
184
|
+
class="my-10 lg:my-18"
|
|
185
|
+
>
|
|
186
|
+
<BlockStreamfield
|
|
187
|
+
v-if="data.body?.length"
|
|
188
|
+
:data="data.body"
|
|
189
|
+
/>
|
|
190
|
+
</div>
|
|
191
|
+
|
|
174
192
|
<!-- related links -->
|
|
175
193
|
<LayoutHelper
|
|
176
194
|
v-if="data.relatedLinks && data.relatedLinks.length"
|