@explorer-1/vue 0.2.42 → 0.2.43
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 +0 -1
- package/dist/explorer-1-vue.js +4561 -4754
- package/dist/explorer-1-vue.umd.cjs +15 -15
- package/dist/src/components/BaseButton/BaseButton.stories.d.ts +2 -1
- package/dist/src/components/BaseButton/BaseButton.vue.d.ts +2 -1
- package/dist/src/components/BaseLink/BaseLink.vue.d.ts +1 -0
- package/dist/src/components/BaseModal/BaseModal.stories.d.ts +4 -2
- package/dist/src/components/BlockRelatedLinks/RelatedLink.vue.d.ts +1 -1
- package/dist/src/components/HomepageCarouselItem/HomepageCarouselItem.vue.d.ts +8 -4
- package/dist/style.css +1 -1
- package/lib/main.ts +0 -2
- package/package.json +2 -1
- package/src/components/BaseButton/BaseButton.vue +9 -1
- package/src/components/BlockRelatedLinks/BlockRelatedLinks.vue +6 -6
- package/src/components/BlockRelatedLinks/RelatedLink.vue +5 -1
- package/src/components/BlockStreamfield/BlockStreamfield.vue +0 -9
- package/src/components/HeroMedium/HeroMedium.vue +3 -2
- package/src/components/HomepageCarouselItem/HomepageCarouselItem.vue +12 -3
- package/src/components/MissionDetailAbout/MissionDetailAbout.vue +0 -4
- package/src/components/MissionDetailHighlights/MissionDetailHighlights.vue +0 -4
- package/src/components/NavSearchForm/NavSearchForm.vue +1 -1
- package/src/components/SwimlaneCTA/SwimlaneCTA.vue +2 -2
- package/src/components/TopicDetailMissionCarouselItem/TopicDetailMissionCarouselItem.vue +6 -3
- package/src/components/TopicDetailMore/TopicDetailMoreVisibility.vue +0 -4
- package/dist/src/components/BlockTwitterEmbed/BlockTwitterEmbed.stories.d.ts +0 -17
- package/dist/src/components/BlockTwitterEmbed/BlockTwitterEmbed.vue.d.ts +0 -14
- package/src/components/BlockTwitterEmbed/BlockTwitterEmbed.stories.js +0 -19
- package/src/components/BlockTwitterEmbed/BlockTwitterEmbed.vue +0 -61
package/lib/main.ts
CHANGED
|
@@ -76,7 +76,6 @@ import BlockStreamfield from './../src/components/BlockStreamfield/BlockStreamfi
|
|
|
76
76
|
import BlockTable from './../src/components/BlockTable/BlockTable.vue'
|
|
77
77
|
import BlockTeaser from './../src/components/BlockTeaser/BlockTeaser.vue'
|
|
78
78
|
import BlockText from './../src/components/BlockText/BlockText.vue'
|
|
79
|
-
import BlockTwitterEmbed from './../src/components/BlockTwitterEmbed/BlockTwitterEmbed.vue'
|
|
80
79
|
import BlockVideo from './../src/components/BlockVideo/BlockVideo.vue'
|
|
81
80
|
import BlockVideoEmbed from './../src/components/BlockVideoEmbed/BlockVideoEmbed.vue'
|
|
82
81
|
import CalendarButton from './../src/components/CalendarButton/CalendarButton.vue'
|
|
@@ -280,7 +279,6 @@ export {
|
|
|
280
279
|
BlockTable,
|
|
281
280
|
BlockTeaser,
|
|
282
281
|
BlockText,
|
|
283
|
-
BlockTwitterEmbed,
|
|
284
282
|
BlockVideo,
|
|
285
283
|
BlockVideoEmbed,
|
|
286
284
|
CalendarButton,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@explorer-1/vue",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.43",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -30,6 +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
|
+
"vue3-observe-visibility": "^1.0.1",
|
|
33
34
|
"@explorer-1/common": "1.1.12"
|
|
34
35
|
},
|
|
35
36
|
"devDependencies": {
|
|
@@ -75,6 +75,14 @@ export default defineComponent({
|
|
|
75
75
|
}
|
|
76
76
|
return undefined
|
|
77
77
|
},
|
|
78
|
+
computedTo() {
|
|
79
|
+
let toValue = this.to
|
|
80
|
+
// filter out unnecessary `/home/` prefix from wagtail default site urlPaths
|
|
81
|
+
if (toValue && typeof toValue === 'string' && toValue.startsWith('/home/')) {
|
|
82
|
+
toValue = toValue.replace('/home/', '/')
|
|
83
|
+
}
|
|
84
|
+
return toValue
|
|
85
|
+
},
|
|
78
86
|
variantClass(): string {
|
|
79
87
|
let classes = variants[this.variant]
|
|
80
88
|
if (!this.$slots.default && this.$slots.icon) {
|
|
@@ -99,7 +107,7 @@ export default defineComponent({
|
|
|
99
107
|
:aria-label="ariaLabel"
|
|
100
108
|
:disabled="disabled"
|
|
101
109
|
:href="theHref"
|
|
102
|
-
:to="
|
|
110
|
+
:to="computedTo ? computedTo : undefined"
|
|
103
111
|
@click="$emit('click')"
|
|
104
112
|
>
|
|
105
113
|
<span class="label block">
|
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
>
|
|
9
9
|
{{ data.heading }}
|
|
10
10
|
</BaseHeading>
|
|
11
|
-
<ul
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
<ul class="sm:w-3/4 md:w-2/3 lg:w-3/4 xl:w-2/3 print:list-disc print:ml-4">
|
|
12
|
+
<li
|
|
13
|
+
v-for="(link, index) in data.links"
|
|
14
|
+
:key="index"
|
|
15
|
+
class="mb-2"
|
|
16
|
+
>
|
|
17
17
|
<template v-if="link.externalLink">
|
|
18
18
|
<RelatedLink
|
|
19
19
|
variant="external"
|
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
<component
|
|
3
3
|
:is="tag"
|
|
4
4
|
:to="to"
|
|
5
|
+
variant="none"
|
|
5
6
|
:href="href"
|
|
6
7
|
class="bg-gray-light group text-body-lg flex items-center justify-between px-4 py-4 cursor-pointer print:px-0 print:py-0 print:block"
|
|
8
|
+
link-class="bg-gray-light group text-body-lg flex items-center justify-between w-full print:block"
|
|
7
9
|
:target="target"
|
|
8
10
|
rel="noopener"
|
|
9
11
|
>
|
|
@@ -19,6 +21,7 @@
|
|
|
19
21
|
</template>
|
|
20
22
|
<script lang="ts">
|
|
21
23
|
import { defineComponent, resolveComponent } from 'vue'
|
|
24
|
+
import BaseLink from './../BaseLink/BaseLink.vue'
|
|
22
25
|
import IconArrow from './../Icons/IconArrow.vue'
|
|
23
26
|
import IconDownload from './../Icons/IconDownload.vue'
|
|
24
27
|
import IconExternal from './../Icons/IconExternal.vue'
|
|
@@ -36,6 +39,7 @@ export const variants: Variants = {
|
|
|
36
39
|
export default defineComponent({
|
|
37
40
|
name: 'BlockRelatedLinks',
|
|
38
41
|
components: {
|
|
42
|
+
BaseLink,
|
|
39
43
|
IconArrow,
|
|
40
44
|
IconDownload,
|
|
41
45
|
IconExternal
|
|
@@ -59,7 +63,7 @@ export default defineComponent({
|
|
|
59
63
|
computed: {
|
|
60
64
|
tag() {
|
|
61
65
|
if (this.to) {
|
|
62
|
-
return resolveComponent('
|
|
66
|
+
return resolveComponent('BaseLink')
|
|
63
67
|
} else {
|
|
64
68
|
return 'a'
|
|
65
69
|
}
|
|
@@ -150,13 +150,6 @@
|
|
|
150
150
|
<BlockImageComparison :data="block" />
|
|
151
151
|
</LayoutHelper>
|
|
152
152
|
|
|
153
|
-
<BlockTwitterEmbed
|
|
154
|
-
v-else-if="block.blockType == 'TwitterEmbedBlock'"
|
|
155
|
-
:key="`twitterEmbedBlock${index}`"
|
|
156
|
-
class="lg:mb-18 mb-10"
|
|
157
|
-
:data="block"
|
|
158
|
-
/>
|
|
159
|
-
|
|
160
153
|
<LayoutHelper
|
|
161
154
|
v-else-if="block.blockType == 'IframeEmbedBlock'"
|
|
162
155
|
:key="`iframeEmbedBlock${index}`"
|
|
@@ -271,7 +264,6 @@ import BlockRelatedLinks, {
|
|
|
271
264
|
import BlockTable from './../BlockTable/BlockTable.vue'
|
|
272
265
|
import BlockTeaser from './../BlockTeaser/BlockTeaser.vue'
|
|
273
266
|
import BlockText from './../BlockText/BlockText.vue'
|
|
274
|
-
import BlockTwitterEmbed from './../BlockTwitterEmbed/BlockTwitterEmbed.vue'
|
|
275
267
|
import BlockIframeEmbed from './../BlockIframeEmbed/BlockIframeEmbed.vue'
|
|
276
268
|
import BlockGist from './../BlockGist/BlockGist.vue'
|
|
277
269
|
import BlockVideo from './../BlockVideo/BlockVideo.vue'
|
|
@@ -311,7 +303,6 @@ export default defineComponent({
|
|
|
311
303
|
BlockTable,
|
|
312
304
|
BlockTeaser,
|
|
313
305
|
BlockText,
|
|
314
|
-
BlockTwitterEmbed,
|
|
315
306
|
BlockIframeEmbed,
|
|
316
307
|
BlockGist,
|
|
317
308
|
BlockVideo,
|
|
@@ -47,7 +47,8 @@
|
|
|
47
47
|
'my-6 lg:mt-0 lg:mb-10': compact
|
|
48
48
|
}"
|
|
49
49
|
>
|
|
50
|
-
<
|
|
50
|
+
<BaseLink
|
|
51
|
+
variant="none"
|
|
51
52
|
:to="feature.url"
|
|
52
53
|
class="lg:w-1/2 xl:w-5/12 block"
|
|
53
54
|
>
|
|
@@ -79,7 +80,7 @@
|
|
|
79
80
|
<IconArrow class="inline" />
|
|
80
81
|
</span>
|
|
81
82
|
</p>
|
|
82
|
-
</
|
|
83
|
+
</BaseLink>
|
|
83
84
|
<BaseLink
|
|
84
85
|
:to="feature.url"
|
|
85
86
|
class="lg:block hidden"
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
<span class="sr-only">.</span>
|
|
67
67
|
</p>
|
|
68
68
|
<component
|
|
69
|
-
:is="
|
|
69
|
+
:is="tag"
|
|
70
70
|
variant="none"
|
|
71
71
|
link-class="block"
|
|
72
72
|
:href="item.externalLink ? item.externalLink : null"
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
</div>
|
|
99
99
|
</template>
|
|
100
100
|
<script lang="ts">
|
|
101
|
-
import { defineComponent } from 'vue'
|
|
101
|
+
import { defineComponent, resolveComponent } from 'vue'
|
|
102
102
|
import type { PropType } from 'vue'
|
|
103
103
|
import type { ImageObject } from '../../interfaces'
|
|
104
104
|
import BaseLink from './../BaseLink/BaseLink.vue'
|
|
@@ -128,7 +128,16 @@ export default defineComponent({
|
|
|
128
128
|
props: {
|
|
129
129
|
item: {
|
|
130
130
|
type: Object as PropType<Slide>,
|
|
131
|
-
|
|
131
|
+
default: undefined
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
computed: {
|
|
135
|
+
tag() {
|
|
136
|
+
if (this.item?.externalLink || (this.item?.page && this.item?.page.url)) {
|
|
137
|
+
return resolveComponent('BaseLink')
|
|
138
|
+
} else {
|
|
139
|
+
return 'div'
|
|
140
|
+
}
|
|
132
141
|
}
|
|
133
142
|
}
|
|
134
143
|
})
|
|
@@ -42,7 +42,6 @@
|
|
|
42
42
|
<script lang="ts">
|
|
43
43
|
import { defineComponent } from 'vue'
|
|
44
44
|
import type { PropType } from 'vue'
|
|
45
|
-
import { ObserveVisibility } from 'vue-observe-visibility'
|
|
46
45
|
import BaseHeading from './../BaseHeading/BaseHeading.vue'
|
|
47
46
|
import BlockText from './../BlockText/BlockText.vue'
|
|
48
47
|
|
|
@@ -56,9 +55,6 @@ export default defineComponent({
|
|
|
56
55
|
BaseHeading,
|
|
57
56
|
BlockText
|
|
58
57
|
},
|
|
59
|
-
directives: {
|
|
60
|
-
ObserveVisibility
|
|
61
|
-
},
|
|
62
58
|
props: {
|
|
63
59
|
descriptionHeading: {
|
|
64
60
|
type: String,
|
|
@@ -169,7 +169,6 @@ import type { DebouncedFunc } from 'lodash'
|
|
|
169
169
|
import type { Slide } from './MissionDetailHighlightsCarouselItem.vue'
|
|
170
170
|
// @ts-ignore
|
|
171
171
|
import anime from 'animejs'
|
|
172
|
-
import { ObserveVisibility } from 'vue-observe-visibility'
|
|
173
172
|
import MissionDetailHighlightsCarousel from './MissionDetailHighlightsCarousel.vue'
|
|
174
173
|
import BaseHeading from './../BaseHeading/BaseHeading.vue'
|
|
175
174
|
|
|
@@ -179,9 +178,6 @@ export default defineComponent({
|
|
|
179
178
|
BaseHeading,
|
|
180
179
|
MissionDetailHighlightsCarousel
|
|
181
180
|
},
|
|
182
|
-
directives: {
|
|
183
|
-
ObserveVisibility
|
|
184
|
-
},
|
|
185
181
|
props: {
|
|
186
182
|
missionTitle: {
|
|
187
183
|
type: String,
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
link-class="max-w-screen-3xl block w-full mx-auto"
|
|
11
11
|
>
|
|
12
12
|
<div
|
|
13
|
+
v-bind-once="{ style: 'background-image: url(' + randomizeImage + ');' }"
|
|
13
14
|
role="presentation"
|
|
14
15
|
:class="'SwimlaneCTA lg:block hidden' + computedClass"
|
|
15
|
-
:style="'background-image: url(' + randomizeImage + ');'"
|
|
16
16
|
>
|
|
17
17
|
<div class="absolute inset-0 z-10 bg-black bg-opacity-25"></div>
|
|
18
18
|
<div
|
|
@@ -61,9 +61,9 @@
|
|
|
61
61
|
</div>
|
|
62
62
|
</div>
|
|
63
63
|
<div
|
|
64
|
+
v-bind-once="{ style: 'background-image: url(' + randomizeImageSmall + ');' }"
|
|
64
65
|
role="presentation"
|
|
65
66
|
:class="'SwimlaneCTA lg:hidden block' + computedClass"
|
|
66
|
-
:style="'background-image: url(' + randomizeImageSmall + ');'"
|
|
67
67
|
>
|
|
68
68
|
<div
|
|
69
69
|
class="lg:flex-row lg:pr-12 lg:py-5 flex flex-col justify-center w-full px-5 py-6 bg-black bg-opacity-25"
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<BaseLink
|
|
3
3
|
v-if="data"
|
|
4
|
+
variant="none"
|
|
4
5
|
:to="data.url"
|
|
5
6
|
class="TopicDetailMissionCarouselItem ThemeVariantLight group block cursor-pointer"
|
|
6
7
|
>
|
|
@@ -59,7 +60,7 @@
|
|
|
59
60
|
/>
|
|
60
61
|
</div>
|
|
61
62
|
</div>
|
|
62
|
-
</
|
|
63
|
+
</BaseLink>
|
|
63
64
|
</template>
|
|
64
65
|
|
|
65
66
|
<script lang="ts">
|
|
@@ -69,6 +70,7 @@ import type { ClockType } from '../MissionDetailStats/MissionDetailStats.vue'
|
|
|
69
70
|
import type { PropType } from 'vue'
|
|
70
71
|
import type { ImageObject } from '../../interfaces'
|
|
71
72
|
import MissionDetailStatsMicro from './../MissionDetailStats/MissionDetailStatsMicro.vue'
|
|
73
|
+
import BaseLink from './../BaseLink/BaseLink.vue'
|
|
72
74
|
import BaseImage from './../BaseImage/BaseImage.vue'
|
|
73
75
|
import BaseImagePlaceholder from './../BaseImagePlaceholder/BaseImagePlaceholder.vue'
|
|
74
76
|
|
|
@@ -87,7 +89,8 @@ export default defineComponent({
|
|
|
87
89
|
components: {
|
|
88
90
|
MissionDetailStatsMicro,
|
|
89
91
|
BaseImage,
|
|
90
|
-
BaseImagePlaceholder
|
|
92
|
+
BaseImagePlaceholder,
|
|
93
|
+
BaseLink
|
|
91
94
|
},
|
|
92
95
|
props: {
|
|
93
96
|
data: {
|
|
@@ -13,13 +13,9 @@
|
|
|
13
13
|
</template>
|
|
14
14
|
<script lang="ts">
|
|
15
15
|
import { defineComponent } from 'vue'
|
|
16
|
-
import { ObserveVisibility } from 'vue-observe-visibility'
|
|
17
16
|
|
|
18
17
|
export default defineComponent({
|
|
19
18
|
name: 'TopicDetailMoreVisibility',
|
|
20
|
-
directives: {
|
|
21
|
-
ObserveVisibility
|
|
22
|
-
},
|
|
23
19
|
data() {
|
|
24
20
|
return {
|
|
25
21
|
isVisible: false,
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { default as BlockTwitterEmbed } from './BlockTwitterEmbed.vue';
|
|
2
|
-
declare namespace _default {
|
|
3
|
-
export let title: string;
|
|
4
|
-
export { BlockTwitterEmbed as component };
|
|
5
|
-
export let excludeStories: RegExp;
|
|
6
|
-
}
|
|
7
|
-
export default _default;
|
|
8
|
-
export namespace BlockTwitterEmbedData {
|
|
9
|
-
let blockType: string;
|
|
10
|
-
let username: string;
|
|
11
|
-
}
|
|
12
|
-
export namespace BaseStory {
|
|
13
|
-
let name: string;
|
|
14
|
-
namespace args {
|
|
15
|
-
export { BlockTwitterEmbedData as data };
|
|
16
|
-
}
|
|
17
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
declare const _default: import('vue').DefineComponent<{
|
|
2
|
-
data: {
|
|
3
|
-
type: ObjectConstructor;
|
|
4
|
-
required: false;
|
|
5
|
-
};
|
|
6
|
-
}, unknown, unknown, {}, {
|
|
7
|
-
render(): void;
|
|
8
|
-
}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
9
|
-
data: {
|
|
10
|
-
type: ObjectConstructor;
|
|
11
|
-
required: false;
|
|
12
|
-
};
|
|
13
|
-
}>>, {}, {}>;
|
|
14
|
-
export default _default;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import BlockTwitterEmbed from './BlockTwitterEmbed.vue'
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
title: 'Components/Blocks/BlockTwitterEmbed',
|
|
5
|
-
component: BlockTwitterEmbed,
|
|
6
|
-
excludeStories: /.*Data$/
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export const BlockTwitterEmbedData = {
|
|
10
|
-
blockType: 'TwitterEmbedBlock',
|
|
11
|
-
username: 'NASAJPL'
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export const BaseStory = {
|
|
15
|
-
name: 'BlockTwitterEmbed',
|
|
16
|
-
args: {
|
|
17
|
-
data: BlockTwitterEmbedData
|
|
18
|
-
}
|
|
19
|
-
}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
v-if="data"
|
|
4
|
-
class="BlockTwitterEmbed lg:px-0 px-8"
|
|
5
|
-
>
|
|
6
|
-
<div
|
|
7
|
-
ref="timeline"
|
|
8
|
-
class="border-gray-light-mid mx-auto border"
|
|
9
|
-
></div>
|
|
10
|
-
</div>
|
|
11
|
-
</template>
|
|
12
|
-
|
|
13
|
-
<script lang="ts">
|
|
14
|
-
// @ts-nocheck
|
|
15
|
-
export default {
|
|
16
|
-
name: 'BlockTwitterEmbed',
|
|
17
|
-
props: {
|
|
18
|
-
data: {
|
|
19
|
-
type: Object,
|
|
20
|
-
required: false
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
mounted() {
|
|
24
|
-
this.render()
|
|
25
|
-
},
|
|
26
|
-
methods: {
|
|
27
|
-
render() {
|
|
28
|
-
// TODO: VUE3 -- find another way to make this client-only
|
|
29
|
-
if (typeof require !== 'undefined') {
|
|
30
|
-
require('twitter-widgets').load((err, twttr) => {
|
|
31
|
-
if (err) {
|
|
32
|
-
console.log('[twitter-widgets] Error: ' + err)
|
|
33
|
-
return
|
|
34
|
-
}
|
|
35
|
-
twttr.widgets.createTimeline(
|
|
36
|
-
{
|
|
37
|
-
sourceType: 'profile',
|
|
38
|
-
screenName: this.data.username
|
|
39
|
-
},
|
|
40
|
-
this.$refs.timeline
|
|
41
|
-
)
|
|
42
|
-
})
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
</script>
|
|
48
|
-
|
|
49
|
-
<style lang="scss">
|
|
50
|
-
.BlockTwitterEmbed {
|
|
51
|
-
> div {
|
|
52
|
-
height: 400px;
|
|
53
|
-
max-height: 60vh;
|
|
54
|
-
@apply overflow-y-auto;
|
|
55
|
-
@screen md {
|
|
56
|
-
height: 600px;
|
|
57
|
-
@apply w-xl max-h-none;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
</style>
|