@explorer-1/vue 1.1.8 → 1.1.10

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/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @explorer-1/vue
2
2
 
3
+ ## 1.1.10
4
+
5
+ ### Patch Changes
6
+
7
+ - eceeea8: Changing color of nav heading to grayscale
8
+
9
+ ## 1.1.9
10
+
11
+ ### Patch Changes
12
+
13
+ - af34894: Updating background color of a featured search result.
14
+ - 78f717a: Changing desktop nav dropdown background color to 95% black.
15
+ - 1d12008: Showing last publish date on EDU resource page templates.
16
+
3
17
  ## 1.1.8
4
18
 
5
19
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@explorer-1/vue",
3
- "version": "1.1.8",
3
+ "version": "1.1.10",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -44,6 +44,11 @@ export const DarkButton = {
44
44
  args: {
45
45
  ...BaseButtonData,
46
46
  variant: 'dark'
47
- }
47
+ },
48
+ decorators: [
49
+ () => ({
50
+ template: `<div id="storyRoot" class="p-8 bg-gray-dark edu:bg-primary-dark"><story/></div>`
51
+ })
52
+ ]
48
53
  // globals: { themeVariant: 'ThemeVariantDark' }
49
54
  }
@@ -105,13 +105,22 @@
105
105
  itemprop="datePublished"
106
106
  :content="pubDatetime"
107
107
  />
108
-
109
- <span v-if="publicationDate && !hideDate">
110
- {{
111
- // @ts-ignore
112
- $filters.displayDate(publicationDate)
113
- }}
114
- </span>
108
+ <template v-if="!hideDate">
109
+ <span v-if="publicationDate">
110
+ {{
111
+ // @ts-ignore
112
+ $filters.displayDate(publicationDate)
113
+ }}
114
+ </span>
115
+ <span v-if="publicationDate && lastPublishedDate"> | </span>
116
+ <span v-if="lastPublishedDate">
117
+ Last Updated:
118
+ {{
119
+ // @ts-ignore
120
+ $filters.displayDate(lastPublishedDate)
121
+ }}
122
+ </span>
123
+ </template>
115
124
  </div>
116
125
  </div>
117
126
  </template>
@@ -159,6 +168,12 @@ export default defineComponent({
159
168
  required: false,
160
169
  default: undefined
161
170
  },
171
+ /** Last published date */
172
+ lastPublishedDate: {
173
+ type: String,
174
+ required: false,
175
+ default: undefined
176
+ },
162
177
  /** Approximate read time */
163
178
  readTime: {
164
179
  type: String,
@@ -214,7 +229,7 @@ export default defineComponent({
214
229
  return this.hasTag || this.readTime ? true : false
215
230
  },
216
231
  hasByline(): boolean {
217
- return this.authors?.length || this.publicationDate ? true : false
232
+ return this.authors?.length || this.publicationDate || this.lastPublishedDate ? true : false
218
233
  },
219
234
  hasData(): boolean {
220
235
  return this.title || this.hasEyebrow || this.hasByline ? true : false
@@ -194,7 +194,7 @@ export const NavInverted = {
194
194
  return { args }
195
195
  },
196
196
  template: `<div class="absolute inset-0">
197
- <div style="height:2500px" class="nav-offset bg-jpl-blue-darker">
197
+ <div style="height:2500px" class="nav-offset bg-gray-dark">
198
198
  <NavDesktop v-bind="args" />
199
199
  <div v-if="invertOverride" class="-nav-offset max-w-screen-3xl mx-auto">
200
200
  <img class="w-full h-auto block" src="https://picsum.photos/1600/900" alt="Example Hero" />
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div
3
3
  v-if="data"
4
- class="NavDesktopDropdownContent bg-jpl-blue-darker bg-opacity-98 edu:bg-primary-dark 3xl:px-0 px-4 py-10 text-white"
4
+ class="NavDesktopDropdownContent bg-black bg-opacity-95 edu:bg-primary-dark 3xl:px-0 px-4 py-10 text-white"
5
5
  >
6
6
  <div
7
7
  v-if="data.menuColumns"
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div
3
3
  v-if="data"
4
- class="NavDesktopDropdownMore bg-jpl-blue-darker bg-opacity-98 3xl:px-0 w-full px-4 py-10 text-white"
4
+ class="NavDesktopDropdownMore bg-black bg-opacity-95 3xl:px-0 w-full px-4 py-10 text-white"
5
5
  >
6
6
  <div class="BaseGrid container mx-auto">
7
7
  <div
@@ -7,7 +7,7 @@ export default {
7
7
  tags: ['navigation'],
8
8
  decorators: [
9
9
  () => ({
10
- template: `<div id="storyRoot" class="p-8 bg-jpl-blue-darker edu:bg-primary-dark"><story/></div>`
10
+ template: `<div id="storyRoot" class="p-8 bg-gray-dark edu:bg-primary-dark"><story/></div>`
11
11
  })
12
12
  ],
13
13
  parameters: {
@@ -6,7 +6,7 @@
6
6
  <template v-if="data.headingPage && data.heading">
7
7
  <BaseLink
8
8
  variant="none"
9
- class="text-subtitle text-jpl-blue-lighter edu:text-purple-300 inline-block mb-4"
9
+ class="text-subtitle text-gray-400 edu:text-purple-300 inline-block mb-4"
10
10
  link-class="px-2 block"
11
11
  :to="data.headingPage.url"
12
12
  >
@@ -14,7 +14,7 @@
14
14
  </BaseLink>
15
15
  </template>
16
16
  <template v-else-if="data.heading">
17
- <div class="text-subtitle text-jpl-blue-lighter edu:text-purple-300 inline-block mb-4">
17
+ <div class="text-subtitle text-gray-400 edu:text-purple-300 inline-block mb-4">
18
18
  <span class="px-2 block">{{ data.heading }}</span>
19
19
  </div>
20
20
  </template>
@@ -6,7 +6,7 @@ export default {
6
6
  tags: ['navigation'],
7
7
  decorators: [
8
8
  () => ({
9
- template: `<div id="storyRoot" class="bg-jpl-blue-darker p-8"><story/></div>`
9
+ template: `<div id="storyRoot" class="bg-gray-dark p-8"><story/></div>`
10
10
  })
11
11
  ],
12
12
  parameters: {
@@ -16,6 +16,6 @@ export const Dark = {
16
16
  setup() {
17
17
  return { args }
18
18
  },
19
- template: `<div class="bg-jpl-blue-darker p-8"><NavSocial v-bind="args" /></div>`
19
+ template: `<div class="bg-gray-dark p-8"><NavSocial v-bind="args" /></div>`
20
20
  })
21
21
  }
@@ -168,7 +168,7 @@
168
168
  </div>
169
169
  <div
170
170
  v-else
171
- class="bg-jpl-blue-darker edu:bg-stars edu:bg-primary xl:grid-cols-9 relative grid grid-cols-5 mb-10 text-white"
171
+ class="bg-gray-dark edu:bg-stars edu:bg-primary xl:grid-cols-9 relative grid grid-cols-5 mb-10 text-white"
172
172
  >
173
173
  <div class="xl:col-span-7 flex items-center col-span-3 p-10">
174
174
  <div class="">
@@ -93,13 +93,14 @@ const computedClass = computed((): string => {
93
93
  >
94
94
  <DetailHeadline
95
95
  :title="data.title"
96
+ :last-published-date="data.lastPublishedAt"
96
97
  label="Collection"
97
98
  pill
98
99
  pill-color="primary-inverted"
99
100
  />
100
101
 
101
102
  <ShareButtonsEdu
102
- class="mt-4"
103
+ class="mt-5"
103
104
  :title="data.title"
104
105
  :url="data.url"
105
106
  />
@@ -135,6 +136,13 @@ const computedClass = computed((): string => {
135
136
  class="mb-6 lg:mb-12"
136
137
  :class="{ '-mt-4': data.showMetaPanel }"
137
138
  >
139
+ <p class="text-gray-mid-dark">
140
+ Last Updated:
141
+ {{
142
+ // @ts-ignore
143
+ $filters.displayDate(data.lastPublishedAt)
144
+ }}
145
+ </p>
138
146
  <ShareButtonsEdu
139
147
  class="mt-4"
140
148
  :title="data.title"
@@ -154,19 +162,6 @@ const computedClass = computed((): string => {
154
162
  <BlockRelatedLinks :data="data.relatedLinks[0]" />
155
163
  </LayoutHelper>
156
164
 
157
- <LayoutHelper
158
- v-if="data.lastPublishedAt"
159
- indent="col-3"
160
- class="lg:my-18 my-10"
161
- >
162
- <p class="border-t border-gray-light-mid pt-8">
163
- <strong>Collection Last Updated:</strong>
164
- {{
165
- // @ts-ignore
166
- $filters.displayDate(data.lastPublishedAt)
167
- }}
168
- </p>
169
- </LayoutHelper>
170
165
  <!-- explore more -->
171
166
  <div
172
167
  v-if="data.relatedContent?.length"
@@ -146,15 +146,25 @@ export default defineComponent({
146
146
  :read-time="data.readTime"
147
147
  :publication-date="data.publicationDate"
148
148
  :publication-time="data.publicationTime"
149
+ :last-published-date="data.lastPublishedAt"
149
150
  :author="data.author"
150
151
  label="Explainer Article"
151
152
  pill-color="secondary"
152
153
  schema
153
154
  pill
154
155
  />
156
+ <template v-if="heroTitle && data.lastPublishedAt">
157
+ <p class="text-gray-mid-dark mt-10">
158
+ Last Updated:
159
+ {{
160
+ // @ts-ignore
161
+ $filters.displayDate(data.lastPublishedAt)
162
+ }}
163
+ </p>
164
+ </template>
155
165
  <ShareButtonsEdu
156
166
  v-if="data?.url"
157
- :class="heroTitle ? 'mt-10' : 'mt-4'"
167
+ :class="heroTitle && data.lastPublishedAt ? 'mt-4' : heroTitle ? 'mt-10' : 'mt-4'"
158
168
  :url="data.url"
159
169
  :title="data.title"
160
170
  :image="data.thumbnailImage?.original"
@@ -219,13 +229,6 @@ export default defineComponent({
219
229
  indent="col-3"
220
230
  class="lg:my-18 my-10"
221
231
  >
222
- <p class="border-t border-gray-light-mid pt-8">
223
- <strong>Explainer Article Last Updated:</strong>
224
- {{
225
- // @ts-ignore
226
- $filters.displayDate(data.lastPublishedAt)
227
- }}
228
- </p>
229
232
  </LayoutHelper>
230
233
  </div>
231
234
  </template>
@@ -89,10 +89,10 @@ const { data } = reactive(props)
89
89
  :title="data.title"
90
90
  label="Gallery"
91
91
  :publication-date="data.publicationDate"
92
+ :last-published-date="data.lastPublishedAt"
92
93
  pill-color="secondary"
93
94
  schema
94
95
  pill
95
- hide-date
96
96
  />
97
97
  <ShareButtonsEdu
98
98
  v-if="data?.url"
@@ -215,23 +215,11 @@ const { data } = reactive(props)
215
215
  <LayoutHelper
216
216
  v-if="data.authors?.length"
217
217
  indent="col-3"
218
+ class="lg:mb-18 mb-10"
218
219
  >
219
220
  <AboutTheAuthor :authors="data.authors" />
220
221
  </LayoutHelper>
221
222
 
222
- <LayoutHelper
223
- v-if="data.lastPublishedAt"
224
- indent="col-3"
225
- class="lg:my-18 my-10"
226
- >
227
- <p class="border-t border-gray-light-mid pt-8">
228
- <strong class="capitalize">Gallery Last Updated:</strong>
229
- {{
230
- // @ts-ignore
231
- $filters.displayDate(data.lastPublishedAt)
232
- }}
233
- </p>
234
- </LayoutHelper>
235
223
  <!-- Explore More -->
236
224
  <!-- <div
237
225
  v-if="data.relatedContent?.length"
@@ -316,12 +316,22 @@ const computedClass = computed((): string => {
316
316
  <DetailHeadline
317
317
  v-if="data.title && !heroTitle"
318
318
  :title="data.title"
319
+ :last-published-date="data.lastPublishedAt"
319
320
  label="Lesson"
320
321
  pill
321
322
  />
323
+ <template v-if="heroTitle && data.lastPublishedAt">
324
+ <p class="text-gray-mid-dark mt-10">
325
+ Last Updated:
326
+ {{
327
+ // @ts-ignore
328
+ $filters.displayDate(data.lastPublishedAt)
329
+ }}
330
+ </p>
331
+ </template>
322
332
  <ShareButtonsEdu
323
333
  v-if="data?.url"
324
- :class="heroTitle ? 'mt-10' : 'mt-4'"
334
+ :class="heroTitle && data.lastPublishedAt ? 'mt-4' : heroTitle ? 'mt-10' : 'mt-4'"
325
335
  :url="data.url"
326
336
  :title="data.title"
327
337
  :image="data.thumbnailImage?.original"
@@ -427,19 +437,5 @@ const computedClass = computed((): string => {
427
437
  >
428
438
  <AboutTheAuthor :authors="data.authors" />
429
439
  </LayoutHelper>
430
-
431
- <LayoutHelper
432
- v-if="data.lastPublishedAt"
433
- indent="col-3"
434
- class="lg:my-18 my-10"
435
- >
436
- <p class="border-t border-gray-light-mid pt-8">
437
- <strong>Lesson Last Updated:</strong>
438
- {{
439
- // @ts-ignore
440
- $filters.displayDate(data.lastPublishedAt)
441
- }}
442
- </p>
443
- </LayoutHelper>
444
440
  </div>
445
441
  </template>
@@ -36,7 +36,7 @@ interface PageEduMultimediaObject extends PageEduResourcesObject {
36
36
  }
37
37
 
38
38
  interface PageEduMultimediaDetailProps {
39
- data: PageEduMultimediaObject
39
+ data?: PageEduMultimediaObject
40
40
  }
41
41
 
42
42
  // define props
@@ -84,7 +84,7 @@ const typeMapping: {
84
84
  }
85
85
  }
86
86
  const mediaType = computed(() => {
87
- const type = data.__typename
87
+ const type = data?.__typename
88
88
  if (type) {
89
89
  return typeMapping[type]?.type
90
90
  }
@@ -92,7 +92,7 @@ const mediaType = computed(() => {
92
92
  })
93
93
 
94
94
  const mediaLabel = computed(() => {
95
- const type = data.__typename
95
+ const type = data?.__typename
96
96
  if (type) {
97
97
  return typeMapping[type]?.label
98
98
  }
@@ -100,7 +100,7 @@ const mediaLabel = computed(() => {
100
100
  })
101
101
 
102
102
  const schemaType = computed(() => {
103
- const type = data.__typename
103
+ const type = data?.__typename
104
104
  if (type) {
105
105
  return typeMapping[type]?.schema
106
106
  }
@@ -110,17 +110,17 @@ const schemaType = computed(() => {
110
110
  const heroImage = computed(() => {
111
111
  switch (mediaType.value) {
112
112
  case 'image':
113
- return data.imageAsHero
113
+ return data?.imageAsHero
114
114
  case 'document':
115
- return data.heroImage
115
+ return data?.heroImage
116
116
  default:
117
117
  return undefined
118
118
  }
119
119
  })
120
120
 
121
121
  const videoBlock = computed(() => {
122
- if (mediaType.value === 'video' && data.video?.length) {
123
- return data.video[0]
122
+ if (mediaType.value === 'video' && data?.video?.length) {
123
+ return data?.video[0]
124
124
  }
125
125
  return undefined
126
126
  })
@@ -132,7 +132,7 @@ const downloadUrl = computed(() => {
132
132
  case 'video':
133
133
  return videoBlock.value?.video?.file
134
134
  case 'document':
135
- return data.document?.url
135
+ return data?.document?.url
136
136
  default:
137
137
  return undefined
138
138
  }
@@ -145,15 +145,15 @@ const creditText = computed(() => {
145
145
  case 'video':
146
146
  return videoBlock.value?.credit
147
147
  case 'document':
148
- return data.credit
148
+ return data?.credit
149
149
  default:
150
150
  return undefined
151
151
  }
152
152
  })
153
153
 
154
154
  const relatedContentHeading = computed(() => {
155
- const type = data.__typename
156
- let text = data.relatedContentHeading
155
+ const type = data?.__typename
156
+ let text = data?.relatedContentHeading
157
157
  if (type && !text) {
158
158
  text = typeMapping[type]?.relatedContentHeading
159
159
  }
@@ -178,9 +178,9 @@ const { data } = reactive(props)
178
178
  :title="data.title"
179
179
  :label="mediaLabel"
180
180
  :publication-date="data.publicationDate"
181
+ :last-published-date="data.lastPublishedAt"
181
182
  schema
182
183
  pill
183
- hide-date
184
184
  />
185
185
  <ShareButtonsEdu
186
186
  v-if="data?.url"
@@ -396,19 +396,6 @@ const { data } = reactive(props)
396
396
  <AboutTheAuthor :authors="data.authors" />
397
397
  </LayoutHelper>
398
398
 
399
- <LayoutHelper
400
- v-if="data.lastPublishedAt"
401
- indent="col-3"
402
- class="lg:my-18 my-10"
403
- >
404
- <p class="border-t border-gray-light-mid pt-8">
405
- <strong class="capitalize">{{ mediaLabel }} Last Updated:</strong>
406
- {{
407
- // @ts-ignore
408
- $filters.displayDate(data.lastPublishedAt)
409
- }}
410
- </p>
411
- </LayoutHelper>
412
399
  <!-- Explore More -->
413
400
  <!-- <div
414
401
  v-if="data.relatedContent?.length"
@@ -283,13 +283,23 @@ const computedClass = computed((): string => {
283
283
  <DetailHeadline
284
284
  v-if="data.title && !heroTitle"
285
285
  :title="data.title"
286
+ :last-published-date="data.lastPublishedAt"
286
287
  label="Student Project"
287
288
  pill
288
289
  pill-color="secondary"
289
290
  />
291
+ <template v-if="heroTitle && data.lastPublishedAt">
292
+ <p class="text-gray-mid-dark mt-10">
293
+ Last Updated:
294
+ {{
295
+ // @ts-ignore
296
+ $filters.displayDate(data.lastPublishedAt)
297
+ }}
298
+ </p>
299
+ </template>
290
300
  <ShareButtonsEdu
291
301
  v-if="data?.url"
292
- :class="heroTitle ? 'mt-10' : 'mt-4'"
302
+ :class="heroTitle && data.lastPublishedAt ? 'mt-4' : heroTitle ? 'mt-10' : 'mt-4'"
293
303
  :url="data.url"
294
304
  :title="data.title"
295
305
  :image="data.thumbnailImage?.original"
@@ -131,12 +131,22 @@ const computedClass = computed((): string => {
131
131
  v-if="!heroTitle"
132
132
  :title="data.title"
133
133
  :read-time="data.readTime"
134
+ :last-published-date="data.lastPublishedAt"
134
135
  label="Teachable Moment"
135
136
  pill
136
137
  />
138
+ <template v-if="heroTitle && data.lastPublishedAt">
139
+ <p class="text-gray-mid-dark mt-10">
140
+ Last Updated:
141
+ {{
142
+ // @ts-ignore
143
+ $filters.displayDate(data.lastPublishedAt)
144
+ }}
145
+ </p>
146
+ </template>
137
147
  <ShareButtonsEdu
138
148
  v-if="data?.url"
139
- :class="heroTitle ? 'mt-10' : 'mt-4'"
149
+ :class="heroTitle && data.lastPublishedAt ? 'mt-4' : heroTitle ? 'mt-10' : 'mt-4'"
140
150
  :url="data.url"
141
151
  :title="data.title"
142
152
  :image="data.thumbnailImage?.original"
@@ -180,23 +190,11 @@ const computedClass = computed((): string => {
180
190
  <LayoutHelper
181
191
  v-if="data.authors?.length"
182
192
  indent="col-3"
193
+ class="lg:mb-18 mb-10"
183
194
  >
184
195
  <AboutTheAuthor :authors="data.authors" />
185
196
  </LayoutHelper>
186
197
 
187
- <LayoutHelper
188
- v-if="data.lastPublishedAt"
189
- indent="col-3"
190
- class="lg:my-18 my-10"
191
- >
192
- <p class="border-t border-gray-light-mid pt-8">
193
- <strong>Teachable Moment Last Updated:</strong>
194
- {{
195
- // @ts-ignore
196
- $filters.displayDate(data.lastPublishedAt)
197
- }}
198
- </p>
199
- </LayoutHelper>
200
198
  <!-- explore more -->
201
199
  <div
202
200
  v-if="data.relatedContent?.length"