@explorer-1/vue 0.2.10 → 0.2.12

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 (24) hide show
  1. package/dist/explorer-1-vue.js +2621 -2647
  2. package/dist/explorer-1-vue.umd.cjs +12 -12
  3. package/dist/src/components/BaseTimer/BaseTimer.vue.d.ts +1 -1
  4. package/dist/src/components/EventCard/EventCard.vue.d.ts +0 -4
  5. package/dist/src/components/HeroLarge/HeroLarge.stories.d.ts +25 -0
  6. package/dist/src/components/HomepageCarousel/HomepageCarousel.stories.d.ts +12 -12
  7. package/dist/src/components/HomepageCarouselItem/HomepageCarouselItem.stories.d.ts +1 -1
  8. package/dist/src/components/HomepageCarouselItem/HomepageCarouselItem.vue.d.ts +1 -1
  9. package/dist/src/components/NavSearchForm/NavSearchForm.vue.d.ts +31 -16
  10. package/dist/src/interfaces.d.ts +1 -0
  11. package/dist/src/templates/PageEventDetail/PageEventDetail.vue.d.ts +5 -4
  12. package/dist/src/templates/PageVideoDetail/PageVideoDetail.stories.d.ts +1 -1
  13. package/dist/src/templates/www/PageAsteroidWatchIndex/PageAsteroidWatchIndex.stories.d.ts +25 -47
  14. package/dist/src/templates/www/PageHomepage/PageHomepage.stories.d.ts +6 -6
  15. package/dist/src/templates/www/PageInfographicDetail/PageInfographicDetail.stories.d.ts +1 -1
  16. package/dist/src/templates/www/PagePodcastSeason/PagePodcastSeason.stories.d.ts +1 -1
  17. package/dist/src/templates/www/PageRoboticsDetail/PageRoboticsDetail.stories.d.ts +15 -0
  18. package/dist/src/templates/www/PageTopicDetail/PageTopicDetail.stories.d.ts +1 -1
  19. package/dist/src/utils/rangeifyGrades.d.ts +1 -1
  20. package/package.json +1 -1
  21. package/src/components/BaseTimer/BaseTimer.vue +4 -3
  22. package/src/components/NavSearchForm/NavSearchForm.vue +30 -41
  23. package/src/components/PastEventsCarousel/PastEventsCarousel.vue +3 -1
  24. package/src/interfaces.ts +1 -0
@@ -1,5 +1,5 @@
1
1
  import { PropType } from 'vue';
2
- import { Duration } from 'dayjs/plugin/duration';
2
+ import { Duration } from 'dayjs/plugin/duration.js';
3
3
 
4
4
  export declare const timerUnits: {
5
5
  readonly years: {
@@ -1,5 +1,4 @@
1
1
  import { PropType } from 'vue';
2
- import { EventDateObject } from './../../utils/mixins';
3
2
  import { HeadingLevel } from './../BaseHeading/BaseHeading.vue';
4
3
 
5
4
  declare const _default: import('vue').DefineComponent<{
@@ -50,9 +49,6 @@ declare const _default: import('vue').DefineComponent<{
50
49
  default: string;
51
50
  };
52
51
  }, unknown, unknown, {
53
- splitDate(): EventDateObject | null;
54
- displayTime(): string | undefined;
55
- formattedEventDates(): string | undefined;
56
52
  themeStore: () => import('pinia').Store<"theme", import('../../store/theme').State, {
57
53
  isEdu(state: {
58
54
  theme: import('../../interfaces').Explorer1Theme | null;
@@ -29,6 +29,31 @@ export namespace HeroLargeData {
29
29
  }
30
30
  let alt: string;
31
31
  }
32
+ export namespace listingPageHeroImage {
33
+ export namespace src_1 {
34
+ let url_3: string;
35
+ export { url_3 as url };
36
+ let width_1: number;
37
+ export { width_1 as width };
38
+ let height_1: number;
39
+ export { height_1 as height };
40
+ }
41
+ export { src_1 as src };
42
+ let srcSet_1: string;
43
+ export { srcSet_1 as srcSet };
44
+ export namespace screenMd_1 {
45
+ let url_4: string;
46
+ export { url_4 as url };
47
+ }
48
+ export { screenMd_1 as screenMd };
49
+ export namespace screenSm_1 {
50
+ let url_5: string;
51
+ export { url_5 as url };
52
+ }
53
+ export { screenSm_1 as screenSm };
54
+ let alt_1: string;
55
+ export { alt_1 as alt };
56
+ }
32
57
  }
33
58
  export namespace BaseStory {
34
59
  let name: string;
@@ -16,7 +16,7 @@ export const HomepageCarouselData: ({
16
16
  page: {
17
17
  url: string;
18
18
  };
19
- image: {
19
+ listingPageHeroImage: {
20
20
  src: {
21
21
  url: string;
22
22
  width: number;
@@ -48,7 +48,7 @@ export const HomepageCarouselData: ({
48
48
  type: string;
49
49
  width: null;
50
50
  };
51
- image: {
51
+ listingPageHeroImage: {
52
52
  src: {
53
53
  url: string;
54
54
  width: number;
@@ -68,7 +68,7 @@ export const HomepageCarouselData: ({
68
68
  slideTitle: string;
69
69
  heading: string;
70
70
  externalLink: string;
71
- image: {
71
+ listingPageHeroImage: {
72
72
  src: {
73
73
  url: string;
74
74
  width: number;
@@ -102,7 +102,7 @@ export namespace Shuffled {
102
102
  page: {
103
103
  url: string;
104
104
  };
105
- image: {
105
+ listingPageHeroImage: {
106
106
  src: {
107
107
  url: string;
108
108
  width: number;
@@ -134,7 +134,7 @@ export namespace Shuffled {
134
134
  type: string;
135
135
  width: null;
136
136
  };
137
- image: {
137
+ listingPageHeroImage: {
138
138
  src: {
139
139
  url: string;
140
140
  width: number;
@@ -154,7 +154,7 @@ export namespace Shuffled {
154
154
  slideTitle: string;
155
155
  heading: string;
156
156
  externalLink: string;
157
- image: {
157
+ listingPageHeroImage: {
158
158
  src: {
159
159
  url: string;
160
160
  width: number;
@@ -192,7 +192,7 @@ export namespace OneSlide {
192
192
  page: {
193
193
  url: string;
194
194
  };
195
- image: {
195
+ listingPageHeroImage: {
196
196
  src: {
197
197
  url: string;
198
198
  width: number;
@@ -224,7 +224,7 @@ export namespace OneSlide {
224
224
  type: string;
225
225
  width: null;
226
226
  };
227
- image: {
227
+ listingPageHeroImage: {
228
228
  src: {
229
229
  url: string;
230
230
  width: number;
@@ -244,7 +244,7 @@ export namespace OneSlide {
244
244
  slideTitle: string;
245
245
  heading: string;
246
246
  externalLink: string;
247
- image: {
247
+ listingPageHeroImage: {
248
248
  src: {
249
249
  url: string;
250
250
  width: number;
@@ -277,7 +277,7 @@ export namespace FewSlides {
277
277
  page: {
278
278
  url: string;
279
279
  };
280
- image: {
280
+ listingPageHeroImage: {
281
281
  src: {
282
282
  url: string;
283
283
  width: number;
@@ -309,7 +309,7 @@ export namespace FewSlides {
309
309
  type: string;
310
310
  width: null;
311
311
  };
312
- image: {
312
+ listingPageHeroImage: {
313
313
  src: {
314
314
  url: string;
315
315
  width: number;
@@ -329,7 +329,7 @@ export namespace FewSlides {
329
329
  slideTitle: string;
330
330
  heading: string;
331
331
  externalLink: string;
332
- image: {
332
+ listingPageHeroImage: {
333
333
  src: {
334
334
  url: string;
335
335
  width: number;
@@ -24,7 +24,7 @@ export namespace HomepageCarouselItemData {
24
24
  export let externalLink: string;
25
25
  export let slideTitle: string;
26
26
  export { BaseVideoData as video };
27
- export namespace image {
27
+ export namespace listingPageHeroImage {
28
28
  namespace src {
29
29
  let url_1: string;
30
30
  export { url_1 as url };
@@ -13,7 +13,7 @@ export interface Slide {
13
13
  fileOgg: string;
14
14
  fileWebm: string;
15
15
  };
16
- image: Partial<ImageObject>;
16
+ listingPageHeroImage: Partial<ImageObject>;
17
17
  }
18
18
  declare const _default: import('vue').DefineComponent<{
19
19
  item: {
@@ -1,19 +1,34 @@
1
- declare const _default: import('vue').DefineComponent<{
2
- mobile: {
3
- type: BooleanConstructor;
4
- default: boolean;
5
- };
6
- }, unknown, {
7
- searchQuery: undefined;
8
- }, {}, {
9
- clearSearch(): void;
10
- submitSearch(): void;
11
- }, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
12
- mobile: {
13
- type: BooleanConstructor;
14
- default: boolean;
15
- };
16
- }>>, {
1
+ interface NavSearchFormProps {
2
+ mobile?: boolean;
3
+ }
4
+ declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<NavSearchFormProps>, {
5
+ mobile: boolean;
6
+ }>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
7
+ clearSearch: (...args: any[]) => void;
8
+ submitForm: (...args: any[]) => void;
9
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<NavSearchFormProps>, {
10
+ mobile: boolean;
11
+ }>>> & {
12
+ onClearSearch?: ((...args: any[]) => any) | undefined;
13
+ onSubmitForm?: ((...args: any[]) => any) | undefined;
14
+ }, {
17
15
  mobile: boolean;
18
16
  }, {}>;
19
17
  export default _default;
18
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
19
+ type __VLS_TypePropsToRuntimeProps<T> = {
20
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
21
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
22
+ } : {
23
+ type: import('vue').PropType<T[K]>;
24
+ required: true;
25
+ };
26
+ };
27
+ type __VLS_WithDefaults<P, D> = {
28
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
29
+ default: D[K];
30
+ }> : P[K];
31
+ };
32
+ type __VLS_Prettify<T> = {
33
+ [K in keyof T]: T[K];
34
+ } & {};
@@ -47,6 +47,7 @@ export interface ImageObject {
47
47
  export interface ImageBlock extends BlockData, ImageObject {
48
48
  }
49
49
  export interface ElasticSearchPage {
50
+ _source: string;
50
51
  id: string | number;
51
52
  content_type: string;
52
53
  url: string;
@@ -1,21 +1,22 @@
1
1
  import { EventCardObject } from './../../interfaces';
2
- import { EventDateObject } from './../../utils/mixins';
3
2
 
4
3
  declare const _default: import('vue').DefineComponent<{
5
4
  data: {
6
5
  type: ObjectConstructor;
7
6
  required: false;
7
+ default: undefined;
8
8
  };
9
9
  }, unknown, {
10
10
  PlaceholderPortrait: string;
11
11
  }, {
12
12
  moreEvents(): EventCardObject[];
13
- startDateTimeForFormatting(): string;
14
- formattedSplitEventDates(): string | EventDateObject | undefined;
15
13
  }, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
16
14
  data: {
17
15
  type: ObjectConstructor;
18
16
  required: false;
17
+ default: undefined;
19
18
  };
20
- }>>, {}, {}>;
19
+ }>>, {
20
+ data: Record<string, any>;
21
+ }, {}>;
21
22
  export default _default;
@@ -15,7 +15,7 @@ export namespace BaseStory {
15
15
  namespace args {
16
16
  namespace data {
17
17
  export let block: never[];
18
- export let body: string;
18
+ export let videoDetailBody: string;
19
19
  export let firstPublishedAt: string;
20
20
  export let id: string;
21
21
  export let label: string;
@@ -1,4 +1,5 @@
1
1
  import { default as PageAsteroidWatchIndex } from './PageAsteroidWatchIndex.vue';
2
+ import { BlockLinkCardCarouselData } from './../../../components/BlockLinkCarousel/BlockLinkCarousel.stories.js';
2
3
  declare namespace _default {
3
4
  export let title: string;
4
5
  export { PageAsteroidWatchIndex as component };
@@ -18,9 +19,28 @@ export default _default;
18
19
  export namespace BaseStory {
19
20
  let name: string;
20
21
  namespace args {
21
- let data: {
22
- title: string;
23
- body: ({
22
+ namespace data {
23
+ export let description: string;
24
+ export namespace listingPageHeroImage {
25
+ namespace src {
26
+ let url: string;
27
+ let width: number;
28
+ let height: number;
29
+ }
30
+ let srcSet: string;
31
+ namespace screenMd {
32
+ let url_1: string;
33
+ export { url_1 as url };
34
+ }
35
+ namespace screenSm {
36
+ let url_2: string;
37
+ export { url_2 as url };
38
+ }
39
+ let alt: string;
40
+ }
41
+ let title_1: string;
42
+ export { title_1 as title };
43
+ export let body: ({
24
44
  blockType: string;
25
45
  heading: string;
26
46
  text: string;
@@ -408,49 +428,7 @@ export namespace BaseStory {
408
428
  level?: undefined;
409
429
  showTitle?: undefined;
410
430
  })[];
411
- latestAsteroidNews: ({
412
- url: string;
413
- title: string;
414
- slug: string;
415
- label: string;
416
- thumbnailImage: {
417
- src: {
418
- url: string;
419
- width: number;
420
- height: number;
421
- };
422
- alt: string;
423
- };
424
- } | {
425
- url: string;
426
- title: string;
427
- slug: string;
428
- thumbnailImage: {
429
- src: {
430
- url: string;
431
- width: number;
432
- height: number;
433
- };
434
- alt: string;
435
- };
436
- label?: undefined;
437
- })[];
438
- description: string;
439
- heroImage: {
440
- src: {
441
- url: string;
442
- width: number;
443
- height: number;
444
- };
445
- srcSet: string;
446
- screenMd: {
447
- url: string;
448
- };
449
- screenSm: {
450
- url: string;
451
- };
452
- alt: string;
453
- };
454
- };
431
+ export { BlockLinkCardCarouselData as latestAsteroidNews };
432
+ }
455
433
  }
456
434
  }
@@ -57,7 +57,7 @@ export const PageHomepageData: {
57
57
  page: {
58
58
  url: string;
59
59
  };
60
- image: {
60
+ listingPageHeroImage: {
61
61
  src: {
62
62
  url: string;
63
63
  width: number;
@@ -89,7 +89,7 @@ export const PageHomepageData: {
89
89
  type: string;
90
90
  width: null;
91
91
  };
92
- image: {
92
+ listingPageHeroImage: {
93
93
  src: {
94
94
  url: string;
95
95
  width: number;
@@ -109,7 +109,7 @@ export const PageHomepageData: {
109
109
  slideTitle: string;
110
110
  heading: string;
111
111
  externalLink: string;
112
- image: {
112
+ listingPageHeroImage: {
113
113
  src: {
114
114
  url: string;
115
115
  width: number;
@@ -408,7 +408,7 @@ export namespace LiveEvent {
408
408
  page: {
409
409
  url: string;
410
410
  };
411
- image: {
411
+ listingPageHeroImage: {
412
412
  src: {
413
413
  url: string;
414
414
  width: number;
@@ -440,7 +440,7 @@ export namespace LiveEvent {
440
440
  type: string;
441
441
  width: null;
442
442
  };
443
- image: {
443
+ listingPageHeroImage: {
444
444
  src: {
445
445
  url: string;
446
446
  width: number;
@@ -460,7 +460,7 @@ export namespace LiveEvent {
460
460
  slideTitle: string;
461
461
  heading: string;
462
462
  externalLink: string;
463
- image: {
463
+ listingPageHeroImage: {
464
464
  src: {
465
465
  url: string;
466
466
  width: number;
@@ -35,7 +35,7 @@ export namespace BaseStory {
35
35
  let title_1: string;
36
36
  export { title_1 as title };
37
37
  export let topicLabel: string;
38
- export let description: string;
38
+ export let descriptionString: string;
39
39
  }
40
40
  }
41
41
  }
@@ -41,7 +41,7 @@ export namespace PagePodcastSeasonData {
41
41
  };
42
42
  };
43
43
  };
44
- export namespace heroImage {
44
+ export namespace listingPageHeroImage {
45
45
  namespace src {
46
46
  let url: string;
47
47
  let width: number;
@@ -209,6 +209,21 @@ export namespace Template {
209
209
  };
210
210
  alt: string;
211
211
  };
212
+ listingPageHeroImage: {
213
+ src: {
214
+ url: string;
215
+ width: number;
216
+ height: number;
217
+ };
218
+ srcSet: string;
219
+ screenMd: {
220
+ url: string;
221
+ };
222
+ screenSm: {
223
+ url: string;
224
+ };
225
+ alt: string;
226
+ };
212
227
  };
213
228
  }
214
229
  }
@@ -224,7 +224,7 @@ export const TopicDetailData: {
224
224
  displayTitle: string;
225
225
  parentDisplayTitle: string;
226
226
  strapline: string;
227
- heroImage: {
227
+ listingPageHeroImage: {
228
228
  src: {
229
229
  url: string;
230
230
  width: number;
@@ -1,3 +1,3 @@
1
1
  import { GradeLevelsObject } from './../interfaces';
2
2
 
3
- export declare const rangeifyGrades: (gradeLevels: GradeLevelsObject[]) => string;
3
+ export declare const rangeifyGrades: (gradeLevels: GradeLevelsObject[]) => string | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@explorer-1/vue",
3
- "version": "0.2.10",
3
+ "version": "0.2.12",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -51,9 +51,10 @@
51
51
  <script lang="ts">
52
52
  import type { PropType } from 'vue'
53
53
  import { defineComponent } from 'vue'
54
- import dayjs, { type Dayjs } from 'dayjs'
55
- import duration, { type Duration } from 'dayjs/plugin/duration'
56
- import minMax from 'dayjs/plugin/minMax'
54
+ import dayjs from './../../utils/dayjs'
55
+ import { type Dayjs } from 'dayjs'
56
+ import duration, { type Duration } from 'dayjs/plugin/duration.js'
57
+ import minMax from 'dayjs/plugin/minMax.js'
57
58
 
58
59
  dayjs.extend(duration)
59
60
  dayjs.extend(minMax)
@@ -1,3 +1,29 @@
1
+ <script setup lang="ts">
2
+ import { ref } from 'vue'
3
+ import { useRouter } from 'vue-router'
4
+ import SearchInput from './../SearchInput/SearchInput.vue'
5
+ const router = useRouter()
6
+
7
+ interface NavSearchFormProps {
8
+ mobile?: boolean
9
+ }
10
+ const props = withDefaults(defineProps<NavSearchFormProps>(), {
11
+ mobile: false
12
+ })
13
+ const emit = defineEmits(['clearSearch', 'submitForm'])
14
+
15
+ const searchQuery = ref()
16
+
17
+ const clearSearch = () => {
18
+ searchQuery.value = undefined
19
+ emit('clearSearch')
20
+ }
21
+ const submitSearch = () => {
22
+ emit('submitForm')
23
+ console.log(searchQuery.value)
24
+ router.push({ path: '/search', query: searchQuery.value })
25
+ }
26
+ </script>
1
27
  <template>
2
28
  <form
3
29
  class="NavSearchForm"
@@ -6,11 +32,11 @@
6
32
  <SearchInput
7
33
  v-model="searchQuery"
8
34
  placeholder="Search JPL"
9
- :underlined-input="!mobile"
35
+ :underlined-input="!props.mobile"
10
36
  :underlined-input-value="searchQuery"
11
- :auto-focus="!mobile"
12
- :inline="!mobile"
13
- :default-colors="mobile"
37
+ :auto-focus="!props.mobile"
38
+ :inline="!props.mobile"
39
+ :default-colors="props.mobile"
14
40
  @esc="clearSearch()"
15
41
  />
16
42
  <button
@@ -22,43 +48,6 @@
22
48
  </button>
23
49
  </form>
24
50
  </template>
25
- <script lang="ts">
26
- import { defineComponent } from 'vue'
27
- import SearchInput from './../SearchInput/SearchInput.vue'
28
-
29
- export default defineComponent({
30
- name: 'NavSearchForm',
31
- components: {
32
- SearchInput
33
- },
34
- props: {
35
- mobile: {
36
- type: Boolean,
37
- default: false
38
- }
39
- },
40
- data() {
41
- return {
42
- searchQuery: undefined
43
- }
44
- },
45
- methods: {
46
- clearSearch() {
47
- this.searchQuery = undefined
48
- this.$emit('clearSearch')
49
- },
50
- submitSearch() {
51
- this.$emit('submitForm')
52
- if (this.$router) {
53
- this.$router.push({
54
- name: 'search',
55
- query: { query: this.searchQuery }
56
- })
57
- }
58
- }
59
- }
60
- })
61
- </script>
62
51
  <style lang="scss">
63
52
  .NavSearchForm {
64
53
  ::placeholder {
@@ -4,7 +4,7 @@
4
4
  heading="Past Events"
5
5
  variant="cards"
6
6
  :link="{
7
- path: '/events',
7
+ // path: 'events',
8
8
  query: {
9
9
  event_status: 'Past events',
10
10
  sortBy: 'eventStartDateLatest',
@@ -28,7 +28,9 @@
28
28
  </MixinCarousel>
29
29
  </template>
30
30
  <script lang="ts">
31
+ // relative link to view past events assumes that this component will only be used on an events index page.
31
32
  // @ts-nocheck
33
+ // @ts-expect-error Elastic search response is not fully typed
32
34
  import { defineComponent } from 'vue'
33
35
  import type { ElasticSearchPage } from '../../interfaces'
34
36
  import MixinCarousel from './../MixinCarousel/MixinCarousel.vue'
package/src/interfaces.ts CHANGED
@@ -49,6 +49,7 @@ export interface ImageObject {
49
49
  export interface ImageBlock extends BlockData, ImageObject {}
50
50
 
51
51
  export interface ElasticSearchPage {
52
+ _source: string
52
53
  id: string | number
53
54
  content_type: string
54
55
  url: string