@asd20/ui 3.4.2 → 3.4.4

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asd20/ui",
3
- "version": "3.4.2",
3
+ "version": "3.4.4",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "sideEffects": [
@@ -219,7 +219,7 @@ export default {
219
219
  flex-direction: column;
220
220
  flex-grow: 1;
221
221
  flex-shrink: 0;
222
- overflow-y: auto;
222
+ overflow: hidden;
223
223
  margin-top: space(2.25);
224
224
  nav {
225
225
  .asd20-picker {
@@ -246,7 +246,7 @@ export default {
246
246
  flex-direction: column;
247
247
  flex-grow: 1;
248
248
  flex-shrink: 0;
249
- overflow-y: auto;
249
+ overflow: hidden;
250
250
  margin-top: space(2.25);
251
251
 
252
252
  .asd20-video-header {
@@ -563,20 +563,6 @@ export default {
563
563
  .asd20-notification-group--floating {
564
564
  position: absolute;
565
565
  top: space(2.0375);
566
- // .bell {
567
- // box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.125) !important;
568
- // svg {
569
- // fill: var(--color__accent) !important;
570
- // }
571
- // span {
572
- // background: var(--color__accent) !important;
573
- // top: inherit !important;
574
- // right: inherit !important;
575
- // width: 1.2rem !important;
576
- // height: 1.2rem !important;
577
- // font-size: 0.75rem !important;
578
- // }
579
- // }
580
566
  }
581
567
  }
582
568
 
@@ -1,20 +1,19 @@
1
1
  <template>
2
2
  <div class="asd20-school-home-template">
3
3
  <!-- Skip Nav -->
4
- <asd20-skip-to></asd20-skip-to>
4
+ <asd20-skip-to/>
5
5
 
6
6
  <!-- Site Navigation -->
7
7
  <asd20-site-navigation
8
8
  :navigation="navigation"
9
9
  :action-items="actionItems"
10
- @update:menuOpen="$emit('update:menuOpen', $event)"
11
10
  :menu-open="menuOpen"
12
- @update:searchOpen="$emit('update:searchOpen', $event)"
13
11
  :search-open="searchOpen"
14
- :organization="organization"
15
12
  :organization-options="organizationOptions"
16
- >
17
- </asd20-site-navigation>
13
+ :organization="organization"
14
+ @update:menuOpen="$emit('update:menuOpen', $event)"
15
+ @update:searchOpen="$emit('update:searchOpen', $event)"
16
+ />
18
17
 
19
18
  <!-- Banner Notifications -->
20
19
  <client-only>
@@ -23,13 +22,13 @@
23
22
  group-type="banner"
24
23
  @dismiss="$emit('dismiss-notification', $event)"
25
24
  @toggle-all="$emit('toggle-all')"
26
- ></asd20-notification-group>
25
+ />
27
26
  </client-only>
28
27
 
29
28
  <!-- Page Header -->
30
29
  <asd20-school-homepage-header
31
- id="page-header"
32
30
  v-if="pageHeaderContent"
31
+ id="page-header"
33
32
  v-bind="pageHeaderContent"
34
33
  fullscreen
35
34
  >
@@ -41,7 +40,7 @@
41
40
  :organization-options="organizationOptions"
42
41
  :organization="organization"
43
42
  logo-size="lg"
44
- ></asd20-organization-picker>
43
+ />
45
44
  <a
46
45
  v-if="websiteLogoProps && showLogo"
47
46
  :href="websiteLogoProps.logoLink ? websiteLogoProps.logoLink : ''"
@@ -57,7 +56,7 @@
57
56
  :aria-label="
58
57
  websiteLogoProps.logoAlt ? websiteLogoProps.logoAlt : ''
59
58
  "
60
- />
59
+ >
61
60
  </a>
62
61
  <a
63
62
  v-if="websiteLogoProps2 && showLogo"
@@ -75,7 +74,7 @@
75
74
  :alt="
76
75
  websiteLogoProps2.logoAlt ? websiteLogoProps2.logoAlt : ''
77
76
  "
78
- />
77
+ >
79
78
  </a>
80
79
  </div>
81
80
  </client-only>
@@ -128,7 +127,7 @@
128
127
  group-type="floating"
129
128
  @dismiss="$emit('dismiss-notification', $event)"
130
129
  @toggle-all="$emit('toggle-all')"
131
- ></asd20-notification-group>
130
+ />
132
131
  </client-only>
133
132
  </div>
134
133
  </template>
@@ -140,30 +139,29 @@
140
139
  </asd20-quicklinks-menu>
141
140
 
142
141
  <!-- Page Content -->
143
- <asd20-page-content> </asd20-page-content>
144
142
 
145
143
  <!-- Feeds -->
146
144
  <asd20-feeds-section
147
145
  :announcements="announcements"
148
146
  :announcements-feed-props="announcementsFeedProps"
149
- @announcements-in-view="$emit('announcements-in-view')"
150
147
  :stories="stories"
151
148
  :stories-feed-props="storiesFeedProps"
152
- @stories-in-view="$emit('stories-in-view')"
153
- :events="events"
154
- :events-feed-props="eventsFeedProps"
155
- @events-in-view="$emit('events-in-view')"
156
149
  :organization="organization"
150
+ :events-feed-props="eventsFeedProps"
151
+ :events="events"
157
152
  :organization-options="organizationOptions"
158
- ></asd20-feeds-section>
153
+ @announcements-in-view="$emit('announcements-in-view')"
154
+ @stories-in-view="$emit('stories-in-view')"
155
+ @events-in-view="$emit('events-in-view')"
156
+ />
159
157
 
160
158
  <!-- Footer -->
161
159
  <asd20-page-footer
162
160
  :organization="organization"
163
- :socialLinks="socialLinks"
164
- :disclosureLinks="disclosureLinks"
165
- :websiteLogoProps="websiteLogoProps"
166
- :websiteLogoProps2="websiteLogoProps2"
161
+ :social-links="socialLinks"
162
+ :disclosure-links="disclosureLinks"
163
+ :website-logo-props="websiteLogoProps"
164
+ :website-logo-props2="websiteLogoProps2"
167
165
  >
168
166
  <slot name="page-footer" />
169
167
  </asd20-page-footer>
@@ -183,7 +181,7 @@ import Asd20SchoolHomepageHeader from '../../../components/organisms/Asd20School
183
181
  import Asd20PageFooter from '../../../components/organisms/Asd20PageFooter'
184
182
  import Asd20SiteNavigation from '../../../components/organisms/Asd20SiteNavigation'
185
183
  import Asd20QuicklinksMenu from '../../../components/organisms/Asd20QuicklinksMenu'
186
- import Asd20PageContent from '../../../components/organisms/Asd20PageContent'
184
+ // import Asd20PageContent from '../../../components/organisms/Asd20PageContent'
187
185
  import Asd20NotificationGroup from '../../../components/organisms/Asd20NotificationGroup'
188
186
  import Asd20FeedsSection from '../../../components/organisms/Asd20FeedsSection'
189
187
  import Asd20OrganizationPicker from '../../../components/organisms/Asd20OrganizationPicker'
@@ -196,14 +194,9 @@ import _get from 'lodash/get'
196
194
  export default {
197
195
  name: 'Asd20SchoolHomeTemplate',
198
196
 
199
- mixins: [pageTemplateMixin],
200
-
201
- directives: { scrollTrack },
202
-
203
197
  components: {
204
198
  Asd20SkipTo,
205
199
  Asd20SchoolHomepageHeader,
206
- Asd20PageContent,
207
200
  Asd20PageFooter,
208
201
  Asd20SiteNavigation,
209
202
  Asd20QuicklinksMenu,
@@ -213,6 +206,8 @@ export default {
213
206
  Asd20LanguageTranslation,
214
207
  Asd20BlockSchedule,
215
208
  },
209
+ directives: { scrollTrack },
210
+ mixins: [pageTemplateMixin],
216
211
  props: {
217
212
  languageCode: { type: String, default: 'en' },
218
213
  },
@@ -257,15 +252,30 @@ export default {
257
252
  },
258
253
  blockEvent() {
259
254
  if (!this.events || this.events.length === 0) return null
255
+
256
+ const isSameLocalDay = (a, b) =>
257
+ a.getFullYear() === b.getFullYear() &&
258
+ a.getMonth() === b.getMonth() &&
259
+ a.getDate() === b.getDate()
260
+
261
+ const today = new Date()
262
+
260
263
  return (
261
264
  this.events.find(
262
265
  e =>
263
266
  Array.isArray(e.calendarKeywords) &&
264
- e.calendarKeywords.includes('Block Schedule')
267
+ e.calendarKeywords.includes('Block Schedule') &&
268
+ isSameLocalDay(new Date(e.start), today)
265
269
  ) || null
266
270
  )
267
271
  },
268
272
  },
273
+ watch: {
274
+ // If the organization changes (picker, route change, etc.), refetch.
275
+ 'organization.id': function () {
276
+ this.$emit('events-in-view')
277
+ },
278
+ },
269
279
  mounted() {
270
280
  this.showLogo = window.innerWidth >= 1350
271
281
  window.addEventListener('resize', this.handleResize)
@@ -274,12 +284,6 @@ export default {
274
284
  this.$emit('events-in-view')
275
285
  }
276
286
  },
277
- watch: {
278
- // If the organization changes (picker, route change, etc.), refetch.
279
- 'organization.id': function () {
280
- this.$emit('events-in-view')
281
- },
282
- },
283
287
  methods: {
284
288
  handleResize() {
285
289
  this.showLogo = window.innerWidth >= 1350
@@ -303,7 +307,7 @@ export default {
303
307
  flex-direction: column;
304
308
  flex-grow: 1;
305
309
  flex-shrink: 0;
306
- overflow-y: auto;
310
+ overflow: hidden;
307
311
  margin-top: space(2.25);
308
312
  .weather-link {
309
313
  text-decoration: none;
@@ -7,14 +7,13 @@
7
7
  <asd20-site-navigation
8
8
  :navigation="navigation"
9
9
  :action-items="actionItems"
10
- @update:menuOpen="$emit('update:menuOpen', $event)"
11
10
  :menu-open="menuOpen"
12
- @update:searchOpen="$emit('update:searchOpen', $event)"
13
11
  :search-open="searchOpen"
14
12
  :organization="organization"
15
13
  :organization-options="organizationOptions"
16
- >
17
- </asd20-site-navigation>
14
+ @update:menuOpen="$emit('update:menuOpen', $event)"
15
+ @update:searchOpen="$emit('update:searchOpen', $event)"
16
+ />
18
17
 
19
18
  <!-- Banner Notifications -->
20
19
  <client-only>
@@ -23,7 +22,7 @@
23
22
  group-type="banner"
24
23
  @dismiss="$emit('dismiss-notification', $event)"
25
24
  @toggle-all="$emit('toggle-all')"
26
- ></asd20-notification-group>
25
+ />
27
26
  </client-only>
28
27
 
29
28
  <!-- Page Header -->
@@ -41,7 +40,7 @@
41
40
  :organization-options="organizationOptions"
42
41
  :organization="organization"
43
42
  logo-size="lg"
44
- ></asd20-organization-picker>
43
+ />
45
44
  <a
46
45
  v-if="websiteLogoProps"
47
46
  :href="websiteLogoProps.logoLink ? websiteLogoProps.logoLink : ''"
@@ -54,7 +53,7 @@
54
53
  : ''
55
54
  "
56
55
  :alt="websiteLogoProps.logoAlt ? websiteLogoProps.logoAlt : ''"
57
- />
56
+ >
58
57
  </a>
59
58
  <a
60
59
  v-if="websiteLogoProps2"
@@ -72,7 +71,7 @@
72
71
  :alt="
73
72
  websiteLogoProps2.logoAlt ? websiteLogoProps2.logoAlt : ''
74
73
  "
75
- />
74
+ >
76
75
  </a>
77
76
  </div>
78
77
  </client-only>
@@ -128,7 +127,7 @@
128
127
  group-type="floating"
129
128
  @dismiss="$emit('dismiss-notification', $event)"
130
129
  @toggle-all="$emit('toggle-all')"
131
- ></asd20-notification-group>
130
+ />
132
131
  </client-only>
133
132
  </div>
134
133
  </template>
@@ -140,30 +139,29 @@
140
139
  </asd20-quicklinks-menu>
141
140
 
142
141
  <!-- Page Content -->
143
- <asd20-page-content> </asd20-page-content>
144
142
 
145
143
  <!-- Feeds -->
146
144
  <asd20-feeds-section
147
145
  :announcements="announcements"
148
146
  :announcements-feed-props="announcementsFeedProps"
149
- @announcements-in-view="$emit('announcements-in-view')"
150
147
  :stories="stories"
151
148
  :stories-feed-props="storiesFeedProps"
152
- @stories-in-view="$emit('stories-in-view')"
153
149
  :events="events"
154
150
  :events-feed-props="eventsFeedProps"
155
- @events-in-view="$emit('events-in-view')"
156
151
  :organization="organization"
157
152
  :organization-options="organizationOptions"
158
- ></asd20-feeds-section>
153
+ @announcements-in-view="$emit('announcements-in-view')"
154
+ @stories-in-view="$emit('stories-in-view')"
155
+ @events-in-view="$emit('events-in-view')"
156
+ />
159
157
 
160
158
  <!-- Footer -->
161
159
  <asd20-page-footer
162
160
  :organization="organization"
163
- :socialLinks="socialLinks"
164
- :disclosureLinks="disclosureLinks"
165
- :websiteLogoProps="websiteLogoProps"
166
- :websiteLogoProps2="websiteLogoProps2"
161
+ :social-links="socialLinks"
162
+ :disclosure-links="disclosureLinks"
163
+ :website-logo-props="websiteLogoProps"
164
+ :website-logo-props2="websiteLogoProps2"
167
165
  >
168
166
  <slot name="page-footer" />
169
167
  </asd20-page-footer>
@@ -183,7 +181,7 @@ import Asd20SchoolHomepageVideoHeader from '../../../components/organisms/Asd20S
183
181
  import Asd20PageFooter from '../../../components/organisms/Asd20PageFooter'
184
182
  import Asd20SiteNavigation from '../../../components/organisms/Asd20SiteNavigation'
185
183
  import Asd20QuicklinksMenu from '../../../components/organisms/Asd20QuicklinksMenu'
186
- import Asd20PageContent from '../../../components/organisms/Asd20PageContent'
184
+ // import Asd20PageContent from '../../../components/organisms/Asd20PageContent'
187
185
  import Asd20NotificationGroup from '../../../components/organisms/Asd20NotificationGroup'
188
186
  import Asd20FeedsSection from '../../../components/organisms/Asd20FeedsSection'
189
187
  import Asd20OrganizationPicker from '../../../components/organisms/Asd20OrganizationPicker'
@@ -191,19 +189,13 @@ import Asd20LanguageTranslation from '../../molecules/Asd20LanguageTranslation'
191
189
  import Asd20BlockSchedule from '../../molecules/Asd20BlockSchedule'
192
190
 
193
191
  // Helpers
194
- import _get from 'lodash/get'
195
192
 
196
193
  export default {
197
194
  name: 'Asd20SchoolHomeVideoTemplate',
198
195
 
199
- mixins: [pageTemplateMixin],
200
-
201
- directives: { scrollTrack },
202
-
203
196
  components: {
204
197
  Asd20SkipTo,
205
198
  Asd20SchoolHomepageVideoHeader,
206
- Asd20PageContent,
207
199
  Asd20PageFooter,
208
200
  Asd20SiteNavigation,
209
201
  Asd20QuicklinksMenu,
@@ -213,33 +205,46 @@ export default {
213
205
  Asd20LanguageTranslation,
214
206
  Asd20BlockSchedule,
215
207
  },
208
+
209
+ mixins: [pageTemplateMixin],
210
+
211
+ directives: { scrollTrack },
216
212
  props: {
217
213
  languageCode: { type: String, default: 'en' },
218
214
  },
219
- mounted() {
220
- // If nothing is loaded yet, ask parent to load events now.
221
- if (!this.events || this.events.length === 0) {
222
- this.$emit('events-in-view')
223
- }
224
- },
225
- watch: {
226
- // If the organization changes (picker, route change, etc.), refetch.
227
- 'organization.id': function () {
228
- this.$emit('events-in-view')
229
- },
230
- },
231
215
  computed: {
232
216
  blockEvent() {
233
217
  if (!this.events || this.events.length === 0) return null
218
+
219
+ const isSameLocalDay = (a, b) =>
220
+ a.getFullYear() === b.getFullYear() &&
221
+ a.getMonth() === b.getMonth() &&
222
+ a.getDate() === b.getDate()
223
+
224
+ const today = new Date()
225
+
234
226
  return (
235
227
  this.events.find(
236
228
  e =>
237
229
  Array.isArray(e.calendarKeywords) &&
238
- e.calendarKeywords.includes('Block Schedule')
230
+ e.calendarKeywords.includes('Block Schedule') &&
231
+ isSameLocalDay(new Date(e.start), today)
239
232
  ) || null
240
233
  )
241
234
  },
242
235
  },
236
+ watch: {
237
+ // If the organization changes (picker, route change, etc.), refetch.
238
+ 'organization.id': function () {
239
+ this.$emit('events-in-view')
240
+ },
241
+ },
242
+ mounted() {
243
+ // If nothing is loaded yet, ask parent to load events now.
244
+ if (!this.events || this.events.length === 0) {
245
+ this.$emit('events-in-view')
246
+ }
247
+ },
243
248
  }
244
249
  </script>
245
250
 
@@ -258,7 +263,7 @@ export default {
258
263
  flex-direction: column;
259
264
  flex-grow: 1;
260
265
  flex-shrink: 0;
261
- overflow-y: auto;
266
+ overflow: hidden;
262
267
  margin-top: space(2.25);
263
268
  .notification-translation-container {
264
269
  display: flex;