@explorer-1/vue 0.2.34 → 0.2.36
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/package.json +1 -1
- package/src/components/BasePill/BasePill.vue +5 -2
- package/src/components/BlockLinkCard/BlockLinkCard.vue +3 -4
- package/src/components/BlockLinkCardList/BlockLinkCardList.vue +1 -0
- package/src/components/DetailHeadline/DetailHeadline.vue +2 -3
- package/src/components/HeroLarge/HeroLarge.vue +2 -3
- package/src/components/HeroMedium/HeroMedium.vue +2 -3
- package/src/components/SearchResultCard/SearchResultCard.vue +13 -1
- package/src/components/SearchResultsList/SearchResultsList.vue +34 -4
- package/src/constants.ts +6 -5
- package/src/interfaces.ts +12 -9
- package/src/templates/edu/PageEduEventDetail/PageEduEventDetail.vue +2 -3
- package/src/templates/edu/PageEduGalleryDetail/PageEduGalleryDetail.vue +5 -1
- package/src/templates/edu/PageEduMultimediaDetail/PageEduMultimediaDetail.vue +13 -7
package/package.json
CHANGED
|
@@ -18,6 +18,7 @@ const sizeMap: Attributes = {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
interface BasePillProps {
|
|
21
|
+
text?: string
|
|
21
22
|
variant?: string
|
|
22
23
|
size?: string
|
|
23
24
|
contentType?: string
|
|
@@ -44,14 +45,16 @@ const metadataAttrs = computed(() => {
|
|
|
44
45
|
}
|
|
45
46
|
return { variant: undefined, label: undefined }
|
|
46
47
|
})
|
|
48
|
+
const theText = computed(() => {
|
|
49
|
+
return props.text || metadataAttrs.value.label
|
|
50
|
+
})
|
|
47
51
|
</script>
|
|
48
52
|
<template>
|
|
49
53
|
<p
|
|
50
54
|
:class="`${variantMap[metadataAttrs.variant || props.variant]} ${sizeMap[props.size]}`"
|
|
51
55
|
class="ThemeVariantLight text-contrast-none inline-block text-white font-bold edu:font-extrabold rounded-full leading-tight m-0 uppercase print:border-none print:px-0"
|
|
52
56
|
>
|
|
53
|
-
|
|
54
|
-
<template v-else> <slot /></template>
|
|
57
|
+
{{ theText }}
|
|
55
58
|
<span class="sr-only">.</span>
|
|
56
59
|
</p>
|
|
57
60
|
</template>
|
|
@@ -47,9 +47,8 @@
|
|
|
47
47
|
:class="{ 'mb-2': !large, 'mb-4': large }"
|
|
48
48
|
size="sm"
|
|
49
49
|
:content-type="metadataType"
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
</BasePill>
|
|
50
|
+
:text="(theItem as EventCardObject).eventType"
|
|
51
|
+
/>
|
|
53
52
|
</template>
|
|
54
53
|
<template
|
|
55
54
|
v-else-if="themeStore.isEdu && theItem.parent?.title && theItem.parent?.title !== 'EDU'"
|
|
@@ -117,7 +116,7 @@
|
|
|
117
116
|
<MetadataEvent
|
|
118
117
|
v-if="metadataType === 'EDUEventPage'"
|
|
119
118
|
:event="theItem"
|
|
120
|
-
:show-time="
|
|
119
|
+
:show-time="large"
|
|
121
120
|
:show-location="false"
|
|
122
121
|
compact
|
|
123
122
|
/>
|
|
@@ -20,10 +20,13 @@
|
|
|
20
20
|
startDate,
|
|
21
21
|
endTime,
|
|
22
22
|
endDate,
|
|
23
|
+
customDate,
|
|
23
24
|
location,
|
|
24
|
-
eventType: eventType
|
|
25
|
+
eventType: eventType,
|
|
26
|
+
ongoing
|
|
25
27
|
}
|
|
26
28
|
}"
|
|
29
|
+
show-calendar-chip
|
|
27
30
|
/>
|
|
28
31
|
<EventCard
|
|
29
32
|
v-else-if="isEvents"
|
|
@@ -320,6 +323,11 @@ export default defineComponent({
|
|
|
320
323
|
required: false,
|
|
321
324
|
default: undefined
|
|
322
325
|
},
|
|
326
|
+
customDate: {
|
|
327
|
+
type: String,
|
|
328
|
+
required: false,
|
|
329
|
+
default: undefined
|
|
330
|
+
},
|
|
323
331
|
location: {
|
|
324
332
|
type: String,
|
|
325
333
|
required: false,
|
|
@@ -328,6 +336,10 @@ export default defineComponent({
|
|
|
328
336
|
pageContentType: {
|
|
329
337
|
type: String,
|
|
330
338
|
default: undefined
|
|
339
|
+
},
|
|
340
|
+
ongoing: {
|
|
341
|
+
type: Boolean,
|
|
342
|
+
default: false
|
|
331
343
|
}
|
|
332
344
|
},
|
|
333
345
|
computed: {
|
|
@@ -23,10 +23,13 @@
|
|
|
23
23
|
:topic="page.topic"
|
|
24
24
|
:image="page.image"
|
|
25
25
|
:date="page.date"
|
|
26
|
+
:custom-date="page.customDate"
|
|
26
27
|
:start-date="page.startDate"
|
|
27
28
|
:end-date="page.endDate"
|
|
28
29
|
:start-time="page.startTime"
|
|
29
30
|
:end-time="page.endTime"
|
|
31
|
+
:event-type="page.eventType"
|
|
32
|
+
:ongoing="page.ongoing"
|
|
30
33
|
:location="page.location"
|
|
31
34
|
:title="page.title"
|
|
32
35
|
:summary="page.summary"
|
|
@@ -57,6 +60,7 @@
|
|
|
57
60
|
<script lang="ts">
|
|
58
61
|
import { defineComponent } from 'vue'
|
|
59
62
|
import type { ElasticSearchPage } from '../../interfaces'
|
|
63
|
+
|
|
60
64
|
// @ts-ignore
|
|
61
65
|
import dayjs from 'dayjs'
|
|
62
66
|
import SearchResultCard from './../SearchResultCard/SearchResultCard.vue'
|
|
@@ -131,6 +135,8 @@ export default defineComponent({
|
|
|
131
135
|
const pageType = page._source[handle + '__label']
|
|
132
136
|
if (handle === 'events_eventpage') {
|
|
133
137
|
date = 'Event date: ' + parseDate(page._source[handle + '__start_datetime'])
|
|
138
|
+
} else if (handle === 'edu_events_edueventpage') {
|
|
139
|
+
date = null
|
|
134
140
|
} else if (handle === 'missions_mission') {
|
|
135
141
|
date = page._source.display_date_filter
|
|
136
142
|
? 'Launch date: ' + page._source.display_date_filter
|
|
@@ -155,13 +161,37 @@ export default defineComponent({
|
|
|
155
161
|
page.topic = topic
|
|
156
162
|
// properties for event's page
|
|
157
163
|
page.location =
|
|
158
|
-
handle === 'events_eventpage'
|
|
164
|
+
handle === 'events_eventpage' || handle === 'edu_events_edueventpage'
|
|
165
|
+
? page._source[handle + '__location'] | page._source[handle + '__location_name']
|
|
166
|
+
: null
|
|
159
167
|
page.startDate =
|
|
160
|
-
handle === 'events_eventpage'
|
|
168
|
+
handle === 'events_eventpage' || handle === 'edu_events_edueventpage'
|
|
169
|
+
? page._source[handle + '__start_datetime']
|
|
170
|
+
: null
|
|
161
171
|
page.endDate =
|
|
162
|
-
handle === 'events_eventpage'
|
|
172
|
+
handle === 'events_eventpage' || handle === 'edu_events_edueventpage'
|
|
173
|
+
? page._source[handle + '__end_datetime']
|
|
174
|
+
: null
|
|
163
175
|
page.startTime =
|
|
164
|
-
handle === 'events_eventpage'
|
|
176
|
+
handle === 'events_eventpage' || handle === 'edu_events_edueventpage'
|
|
177
|
+
? page._source[handle + '__start_time_string']
|
|
178
|
+
: null
|
|
179
|
+
page.endTime =
|
|
180
|
+
handle === 'events_eventpage' || handle === 'edu_events_edueventpage'
|
|
181
|
+
? page._source[handle + '__end_time_string']
|
|
182
|
+
: null
|
|
183
|
+
page.eventType =
|
|
184
|
+
handle === 'edu_events_edueventpage'
|
|
185
|
+
? page._source.edu_events_edueventpage__event_type_label_filter
|
|
186
|
+
: undefined
|
|
187
|
+
page.customDate =
|
|
188
|
+
handle === 'edu_events_edueventpage'
|
|
189
|
+
? page._source.edu_events_edueventpage__custom_date
|
|
190
|
+
: undefined
|
|
191
|
+
page.ongoing =
|
|
192
|
+
handle === 'edu_events_edueventpage'
|
|
193
|
+
? page._source.edu_events_edueventpage__ongoing
|
|
194
|
+
: undefined
|
|
165
195
|
// properties that are different for profiles page
|
|
166
196
|
page.summary =
|
|
167
197
|
handle === 'profiles_profilepage'
|
package/src/constants.ts
CHANGED
|
@@ -2,6 +2,7 @@ import type { DictionaryInterface, PillDictionaryInterface } from './interfaces'
|
|
|
2
2
|
|
|
3
3
|
export const eduMetadataDictionary: PillDictionaryInterface = {
|
|
4
4
|
EDUEventPage: {
|
|
5
|
+
label: 'Event',
|
|
5
6
|
variant: 'primary',
|
|
6
7
|
icons: 'primary',
|
|
7
8
|
type: 'event'
|
|
@@ -73,9 +74,9 @@ export const searchContentTypeToPageType: DictionaryInterface = {
|
|
|
73
74
|
news_news: 'News',
|
|
74
75
|
events_eventpage: 'EventPage',
|
|
75
76
|
missions_mission: 'Mission',
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
77
|
+
edu_events_edueventpage: 'EDUEventPage',
|
|
78
|
+
edu_resources_educollectionsdetailpage: 'EDUCollectionsDetailPage',
|
|
79
|
+
edu_resources_eduexplainerarticlepage: 'EDUExplainerArticlePage',
|
|
80
|
+
edu_resources_edulessonpage: 'EDULessonPage',
|
|
81
|
+
edu_resources_eduteachablemomentpage: 'EDUTeachableMomentPage'
|
|
81
82
|
}
|
package/src/interfaces.ts
CHANGED
|
@@ -79,16 +79,19 @@ export interface ElasticSearchPage {
|
|
|
79
79
|
content_type: string
|
|
80
80
|
url: string
|
|
81
81
|
type: string
|
|
82
|
-
topic
|
|
83
|
-
image
|
|
84
|
-
date
|
|
85
|
-
startDate
|
|
86
|
-
endDate
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
82
|
+
topic?: string
|
|
83
|
+
image?: string | any
|
|
84
|
+
date?: string
|
|
85
|
+
startDate?: string
|
|
86
|
+
endDate?: string
|
|
87
|
+
customDate?: string
|
|
88
|
+
startTime?: string
|
|
89
|
+
endTime?: string
|
|
90
|
+
location?: string
|
|
90
91
|
title: string
|
|
91
|
-
summary
|
|
92
|
+
summary?: string
|
|
93
|
+
eventType?: string
|
|
94
|
+
ongoing?: boolean
|
|
92
95
|
}
|
|
93
96
|
|
|
94
97
|
export interface FormOption {
|
|
@@ -115,7 +115,11 @@ const { data } = reactive(props)
|
|
|
115
115
|
indent="col-2"
|
|
116
116
|
class="mb-5 lg:mb-10"
|
|
117
117
|
>
|
|
118
|
-
<BlockImageStandard
|
|
118
|
+
<BlockImageStandard
|
|
119
|
+
:data="block.image"
|
|
120
|
+
:caption="block.caption"
|
|
121
|
+
:display-caption="block.displayCaption"
|
|
122
|
+
/>
|
|
119
123
|
</LayoutHelper>
|
|
120
124
|
</template>
|
|
121
125
|
<template v-else-if="block.blockType === 'ImageComparisonBlock'">
|
|
@@ -5,7 +5,7 @@ import LayoutHelper from './../../../components/LayoutHelper/LayoutHelper.vue'
|
|
|
5
5
|
import BaseHeading from './../../../components/BaseHeading/BaseHeading.vue'
|
|
6
6
|
import DetailHeadline from './../../../components/DetailHeadline/DetailHeadline.vue'
|
|
7
7
|
import ShareButtonsEdu from './../../../components/ShareButtonsEdu/ShareButtonsEdu.vue'
|
|
8
|
-
import
|
|
8
|
+
import BlockVideo from './../../../components/BlockVideo/BlockVideo.vue'
|
|
9
9
|
import BlockImageStandard from './../../../components/BlockImage/BlockImageStandard.vue'
|
|
10
10
|
import BlockVideoEmbed from './../../../components/BlockVideoEmbed/BlockVideoEmbed.vue'
|
|
11
11
|
import BaseButton from './../../../components/BaseButton/BaseButton.vue'
|
|
@@ -143,7 +143,7 @@ const creditText = computed(() => {
|
|
|
143
143
|
case 'image':
|
|
144
144
|
return heroImage.value?.credit
|
|
145
145
|
case 'video':
|
|
146
|
-
return videoBlock.value?.
|
|
146
|
+
return videoBlock.value?.credit
|
|
147
147
|
case 'document':
|
|
148
148
|
return data.credit
|
|
149
149
|
default:
|
|
@@ -263,8 +263,8 @@ const { data } = reactive(props)
|
|
|
263
263
|
/>
|
|
264
264
|
<template v-if="videoBlock.blockType === 'VideoBlock' && videoBlock.video">
|
|
265
265
|
<div class="max-w-screen-2xl lg:mb-24 mx-auto mt-10 mb-8">
|
|
266
|
-
<
|
|
267
|
-
:data="videoBlock
|
|
266
|
+
<BlockVideo
|
|
267
|
+
:data="videoBlock"
|
|
268
268
|
schema
|
|
269
269
|
/>
|
|
270
270
|
</div>
|
|
@@ -297,7 +297,6 @@ const { data } = reactive(props)
|
|
|
297
297
|
/>
|
|
298
298
|
|
|
299
299
|
<div class="max-w-screen-3xl lg:mb-24 mx-auto mt-10 mb-8">
|
|
300
|
-
<!-- inline hero content -->
|
|
301
300
|
<LayoutHelper
|
|
302
301
|
v-if="heroImage"
|
|
303
302
|
indent="col-2"
|
|
@@ -311,8 +310,6 @@ const { data } = reactive(props)
|
|
|
311
310
|
</div>
|
|
312
311
|
</template>
|
|
313
312
|
|
|
314
|
-
<!-- !Gallery body -->
|
|
315
|
-
|
|
316
313
|
<LayoutHelper indent="col-2">
|
|
317
314
|
<div class="lg:grid grid-cols-12">
|
|
318
315
|
<div
|
|
@@ -430,5 +427,14 @@ const { data } = reactive(props)
|
|
|
430
427
|
.bg-stars .MixinCarousel__Heading {
|
|
431
428
|
@apply text-white;
|
|
432
429
|
}
|
|
430
|
+
.BlockVideo,
|
|
431
|
+
.BlockVideoEmbed {
|
|
432
|
+
.BaseImageCaption {
|
|
433
|
+
@apply px-4 sm:px-5;
|
|
434
|
+
@screen 3xl {
|
|
435
|
+
@apply px-0;
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
}
|
|
433
439
|
}
|
|
434
440
|
</style>
|