@explorer-1/vue 0.2.6 → 0.2.8

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 (38) hide show
  1. package/dist/explorer-1-vue.js +2612 -2556
  2. package/dist/explorer-1-vue.umd.cjs +14 -12
  3. package/dist/src/components/CalendarButton/CalendarButton.vue.d.ts +3 -2
  4. package/dist/src/components/EventCard/EventCard.vue.d.ts +9 -4
  5. package/dist/src/components/EventDetailHero/EventDetailHero.vue.d.ts +11 -0
  6. package/dist/src/components/NavDesktopEdu/NavDesktopEdu.stories.d.ts +58 -11
  7. package/dist/src/templates/edu/PageEduEventDetail/PageEduEventDetail.stories.d.ts +57 -29
  8. package/dist/src/utils/mixins.d.ts +2 -0
  9. package/dist/style.css +1 -1
  10. package/package.json +2 -2
  11. package/src/components/BaseButton/BaseButton.vue +1 -1
  12. package/src/components/BaseImage/BaseImage.vue +1 -1
  13. package/src/components/BaseTag/BaseTag.vue +2 -2
  14. package/src/components/BlockIframeEmbed/BlockIframeEmbed.vue +3 -2
  15. package/src/components/BlockImage/BlockImageStandard.vue +1 -1
  16. package/src/components/BlockKeyPoints/BlockKeyPoints.vue +2 -2
  17. package/src/components/BlockLinkCard/BlockLinkCard.vue +1 -0
  18. package/src/components/BlockRelatedLinks/BlockRelatedLinks.vue +29 -27
  19. package/src/components/BlockRelatedLinks/RelatedLink.vue +3 -3
  20. package/src/components/BlockVideo/BlockVideo.vue +1 -1
  21. package/src/components/BlockVideoEmbed/BlockVideoEmbed.vue +1 -1
  22. package/src/components/CalendarButton/CalendarButton.vue +9 -10
  23. package/src/components/EventCard/EventCard.vue +22 -8
  24. package/src/components/EventDetailHero/EventDetailHero.vue +45 -21
  25. package/src/components/HeroMedia/HeroMedia.vue +2 -2
  26. package/src/components/MixinCarousel/MixinCarousel.vue +2 -2
  27. package/src/components/NavDesktopEdu/NavDesktopEdu.vue +11 -1
  28. package/src/components/NavMobile/NavMobile.vue +22 -11
  29. package/src/components/ShareButtons/ShareButtons.vue +1 -1
  30. package/src/components/ShareButtonsEdu/ShareButtonsEdu.vue +1 -1
  31. package/src/components/TheFooter/TheFooter.vue +3 -1
  32. package/src/templates/PageEventDetail/PageEventDetail.vue +2 -1
  33. package/src/templates/PageNewsDetail/PageNewsDetail.vue +3 -1
  34. package/src/templates/edu/PageEduEventDetail/PageEduEventDetail.stories.js +146 -104
  35. package/src/templates/edu/PageEduEventDetail/PageEduEventDetail.vue +101 -50
  36. package/src/templates/edu/PageEduExplainerArticle/PageEduExplainerArticle.vue +1 -1
  37. package/src/utils/mixins.ts +18 -14
  38. package/tsconfig.json +1 -1
@@ -57,6 +57,8 @@ export type lightboxGalleryObject = {
57
57
 
58
58
  export interface EventDateObject {
59
59
  day: string
60
+ month: string
61
+ year: string
60
62
  monthAndYear: string
61
63
  }
62
64
 
@@ -285,6 +287,8 @@ export const mixinFormatSplitEventDates = (
285
287
  const startDateDayjs = dayjs(startDatetime)
286
288
 
287
289
  let day = startDateDayjs.format('D')
290
+ const month = startDateDayjs.format('MMM').replace('.', '')
291
+ const year = startDateDayjs.format('YYYY')
288
292
  const monthAndYear = startDateDayjs.format('MMM YYYY')
289
293
 
290
294
  if (endDatetime) {
@@ -299,7 +303,7 @@ export const mixinFormatSplitEventDates = (
299
303
  }
300
304
  // Otherwise, we only show the start date
301
305
  }
302
- return { day, monthAndYear }
306
+ return { day, month, year, monthAndYear }
303
307
  }
304
308
 
305
309
  // return event dates formatted for listing cards
@@ -335,27 +339,27 @@ export const mixinFormatEventTimeInHoursAndMinutes = (
335
339
  endDatetime?: string,
336
340
  endTime?: string
337
341
  ): string => {
338
- // Only display time if event spans less than one day
339
342
  const startDateDayjs = dayjs(startDatetime)
340
343
  let time = ''
341
344
 
342
345
  if (endDatetime) {
343
346
  const endDateDayjs = dayjs(endDatetime)
344
- if (
345
- endDateDayjs.diff(startDateDayjs, 'hour') <= 24 &&
346
- endDateDayjs.diff(startDateDayjs, 'day') === 0
347
- ) {
348
- // Event is less than 24 hours and spans 1 day
349
- if (endTime) {
350
- if (startDateDayjs.format('a') === endDateDayjs.format('a')) {
351
- time = `${startDateDayjs.format('h:mm')}-${endDateDayjs.format('h:mm a z')}`
352
- } else {
353
- time = `${startDateDayjs.format('h:mm a')} - ${endDateDayjs.format('h:mm a z')}`
354
- }
347
+ // Only display time if event spans less than one day
348
+ // if (
349
+ // endDateDayjs.diff(startDateDayjs, 'hour') <= 24 &&
350
+ // endDateDayjs.diff(startDateDayjs, 'day') === 0
351
+ // ) {
352
+ // Event is less than 24 hours and spans 1 day
353
+ if (endTime) {
354
+ if (startDateDayjs.format('a') === endDateDayjs.format('a')) {
355
+ time = `${startDateDayjs.format('h:mm')}-${endDateDayjs.format('h:mm a z')}`
355
356
  } else {
356
- time = `${startDateDayjs.format('h:mm a z')}`
357
+ time = `${startDateDayjs.format('h:mm a')} - ${endDateDayjs.format('h:mm a z')}`
357
358
  }
359
+ } else {
360
+ time = `${startDateDayjs.format('h:mm a z')}`
358
361
  }
362
+ // }
359
363
  }
360
364
  return time
361
365
  }
package/tsconfig.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "target": "ES2020",
4
4
  "useDefineForClassFields": true,
5
5
  "module": "ESNext",
6
- "lib": ["ES2020", "DOM", "DOM.Iterable"],
6
+ "lib": ["ES2021", "DOM", "DOM.Iterable"],
7
7
  "skipLibCheck": true,
8
8
 
9
9
  /* Bundler mode */