@asd20/ui 3.2.880 → 3.2.882

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
@@ -5,7 +5,7 @@
5
5
  "*.scss",
6
6
  "*.vue"
7
7
  ],
8
- "version": "3.2.880",
8
+ "version": "3.2.882",
9
9
  "private": false,
10
10
  "license": "MIT",
11
11
  "repository": {
@@ -106,7 +106,7 @@ import mapFilesToListItems from '../../../helpers/mapFilesToListItems'
106
106
  import globalPropMixinFactory from '../../../mixins/globalPropMixinFactory.js'
107
107
 
108
108
  export default {
109
- name: 'Asd20SearchMenu',
109
+ name: 'Asd20SiteSearch',
110
110
 
111
111
  mixins: [
112
112
  globalPropMixinFactory(
@@ -29,9 +29,9 @@
29
29
  "summary": "Winter Break - No School",
30
30
  "description": "No School",
31
31
  "location": "AAHS",
32
- "start": "2022-12-19T07:00:00Z",
33
- "end": "2023-01-05T07:00:00Z",
34
- "dtstamp": "2022-12-19T07:00:00Z",
32
+ "start": "2024-12-19T07:00:00Z",
33
+ "end": "2025-01-05T07:00:00Z",
34
+ "dtstamp": "2024-12-19T07:00:00Z",
35
35
  "class": "",
36
36
  "priority": "",
37
37
  "transparency": "",
@@ -48,6 +48,33 @@
48
48
  "calendarFormat": "ical",
49
49
  "calendarColor": "#213f94"
50
50
  },
51
+ {
52
+ "@search.score": 1,
53
+ "id": null,
54
+ "uid": "MDQwMDAwMDA4MjAwRTAwMDc0QzVCNzEwMUE4MkUwMDgwMDAwMDAwMERFRTE5NzcxNThBQ0RBMDEwMDAwMDAwMDAwMDAwMDAwMTAwMDAwMDBFOEVBMjc5NkM0MDI3RjRGODFFNzY1QzQ0M0VGMDA0Mw==",
55
+ "type": "event",
56
+ "summary": "Winter Break - Break",
57
+ "description": "",
58
+ "location": "AAHS",
59
+ "start": "2024-12-25T17:00:00Z",
60
+ "end": "2024-12-25T17:30:00Z",
61
+ "dtstamp": "2024-12-25T17:00:00Z",
62
+ "class": "",
63
+ "priority": "",
64
+ "transparency": "",
65
+ "status": "",
66
+ "sequence": "",
67
+ "url": null,
68
+ "calendarId": "a0c92470-27a0-11ec-a6e3-c76d885e64a4",
69
+ "calendarName": "Choir",
70
+ "calendarOrganizationId": "bb6e9cd6-da25-9e6f-5e8d-072b9a7df4f0",
71
+ "calendarOrganizationTitle": "Air Academy High School",
72
+ "calendarCategories": [],
73
+ "calendarKeywords": [],
74
+ "calendarUrl": "https://outlook.office365.com/owa/calendar/6a1a45f079b7416f8b301747cd731778@asd20.org/93eb354f1a6b446bb533e2f40613f8a310360980508845501669/calendar.ics",
75
+ "calendarFormat": "ical",
76
+ "calendarColor": "#eb28c7"
77
+ },
51
78
  {
52
79
  "@search.score": 1,
53
80
  "id": null,
@@ -56,9 +83,9 @@
56
83
  "summary": "All State Choir",
57
84
  "description": "",
58
85
  "location": "Denver Center for the Performing Arts (1101 13th St, Denver, CO 80204, United States)",
59
- "start": "2023-01-09T17:00:00Z",
60
- "end": "2023-01-11T17:30:00Z",
61
- "dtstamp": "2023-01-09T17:00:00Z",
86
+ "start": "2025-01-09T17:00:00Z",
87
+ "end": "2025-01-11T17:30:00Z",
88
+ "dtstamp": "2025-01-09T17:00:00Z",
62
89
  "class": "",
63
90
  "priority": "",
64
91
  "transparency": "",
@@ -83,9 +110,9 @@
83
110
  "summary": "First day of second semester",
84
111
  "description": "<ul><li>In-person attendance is limited to boardroom capacity of 70 audience members per the Colorado Springs Fire Marshall.</li><li>Note, those who attend in person may be captured on camera during the live feed and recorded versions of the meeting.</li><li>The meeting link will be available the week of the meeting.</li></ul><br/>We invite public comment at our meetings.<br/><br/><ul><li>You must sign-up to speak between 7 a.m. and 1 p.m., the day of the board meeting by completing our Public <a href=\"https://forms.office.com/r/4nRw9yhyeS\" target=\"_blank\">Comment Form</a>.</li><li>You must be present and available to speak in-person at the podium when called upon.</li><li>You cannot provide virtual public comment.</li><li>If you cannot attend in-person, we invite you to submit your comments in writing via the Public <a href=\"https://forms.office.com/r/4nRw9yhyeS\" target=\"_blank\">Comment Form</a>. Written comments submitted through the Public Comment Form will not be read publicly at the board meeting, but they will be included as part of the public record in the minutes for the meeting.</li></ul>",
85
112
  "location": "AAHS",
86
- "start": "2023-01-05T07:00:00Z",
87
- "end": "2023-01-06T07:00:00Z",
88
- "dtstamp": "2023-01-05T07:00:00Z",
113
+ "start": "2025-01-05T07:00:00Z",
114
+ "end": "2025-01-06T07:00:00Z",
115
+ "dtstamp": "2025-01-05T07:00:00Z",
89
116
  "class": "",
90
117
  "priority": "",
91
118
  "transparency": "",
@@ -110,9 +137,9 @@
110
137
  "summary": "Boys Varsity vs. CoronadoDohertyLibertyMullenPalmer RidgePine CreekPueblo WestRampartRock CanyonThunderRidge'>Multiple Schools (Home)",
111
138
  "description": "Type: Kadet Kickoff Tournament Opponent: CoronadoDohertyLibertyMullenPalmer RidgePine CreekPueblo WestRampartRock CanyonThunderRidge'>Multiple Schools Comments: Confirmed",
112
139
  "location": "AAHS Media Center",
113
- "start": "2023-01-19T08:20:00Z",
114
- "end": "2023-01-19T08:20:00Z",
115
- "dtstamp": "2023-01-19T20:20:00Z",
140
+ "start": "2025-01-19T08:20:00Z",
141
+ "end": "2025-01-19T08:20:00Z",
142
+ "dtstamp": "2025-01-19T20:20:00Z",
116
143
  "class": "",
117
144
  "priority": "",
118
145
  "transparency": "",
@@ -137,9 +164,9 @@
137
164
  "summary": "Choice Night",
138
165
  "description": "",
139
166
  "location": "AAHS Media Center",
140
- "start": "2023-01-20T01:00:00Z",
141
- "end": "2023-01-20T03:00:00Z",
142
- "dtstamp": "2023-01-20T01:00:00Z",
167
+ "start": "2025-01-20T01:00:00Z",
168
+ "end": "2025-01-20T03:00:00Z",
169
+ "dtstamp": "2025-01-20T01:00:00Z",
143
170
  "class": "",
144
171
  "priority": "",
145
172
  "transparency": "",
@@ -164,9 +191,9 @@
164
191
  "summary": "8th Grade Information Night",
165
192
  "description": "",
166
193
  "location": "AAHS Gyms",
167
- "start": "2023-02-10T01:00:00Z",
168
- "end": "2023-02-10T03:00:00Z",
169
- "dtstamp": "2023-02-10T01:00:00Z",
194
+ "start": "2025-02-10T01:00:00Z",
195
+ "end": "2025-02-10T03:00:00Z",
196
+ "dtstamp": "2025-02-10T01:00:00Z",
170
197
  "class": "",
171
198
  "priority": "",
172
199
  "transparency": "",
@@ -191,9 +218,9 @@
191
218
  "summary": "Parent-teacher Conferences",
192
219
  "description": "",
193
220
  "location": "",
194
- "start": "2023-03-22T21:30:00Z",
195
- "end": "2023-03-23T01:30:00Z",
196
- "dtstamp": "2023-03-22T21:30:00Z",
221
+ "start": "2025-03-22T21:30:00Z",
222
+ "end": "2025-03-23T01:30:00Z",
223
+ "dtstamp": "2025-03-22T21:30:00Z",
197
224
  "class": "",
198
225
  "priority": "",
199
226
  "transparency": "",
@@ -218,9 +245,9 @@
218
245
  "summary": "Parent-Teacher Conferences",
219
246
  "description": "",
220
247
  "location": "",
221
- "start": "2023-03-23T22:00:00Z",
222
- "end": "2023-03-24T01:00:00Z",
223
- "dtstamp": "2023-03-23T22:00:00Z",
248
+ "start": "2025-03-23T22:00:00Z",
249
+ "end": "2025-03-24T01:00:00Z",
250
+ "dtstamp": "2025-03-23T22:00:00Z",
224
251
  "class": "",
225
252
  "priority": "",
226
253
  "transparency": "",
@@ -245,9 +272,9 @@
245
272
  "summary": "No school",
246
273
  "description": "",
247
274
  "location": "",
248
- "start": "2023-03-24T06:00:00Z",
249
- "end": "2023-03-25T06:00:00Z",
250
- "dtstamp": "2023-03-24T06:00:00Z",
275
+ "start": "2025-03-24T06:00:00Z",
276
+ "end": "2025-03-25T06:00:00Z",
277
+ "dtstamp": "2025-03-24T06:00:00Z",
251
278
  "class": "",
252
279
  "priority": "",
253
280
  "transparency": "",
@@ -272,9 +299,9 @@
272
299
  "summary": "No school - Spring Break",
273
300
  "description": "",
274
301
  "location": "",
275
- "start": "2023-03-27T06:00:00Z",
276
- "end": "2023-03-28T06:00:00Z",
277
- "dtstamp": "2023-03-27T06:00:00Z",
302
+ "start": "2025-03-27T06:00:00Z",
303
+ "end": "2025-03-28T06:00:00Z",
304
+ "dtstamp": "2025-03-27T06:00:00Z",
278
305
  "class": "",
279
306
  "priority": "",
280
307
  "transparency": "",
@@ -299,9 +326,9 @@
299
326
  "summary": "No school - Spring Break",
300
327
  "description": "",
301
328
  "location": "",
302
- "start": "2023-03-28T06:00:00Z",
303
- "end": "2023-03-29T06:00:00Z",
304
- "dtstamp": "2023-03-28T06:00:00Z",
329
+ "start": "2025-03-28T06:00:00Z",
330
+ "end": "2025-03-29T06:00:00Z",
331
+ "dtstamp": "2025-03-28T06:00:00Z",
305
332
  "class": "",
306
333
  "priority": "",
307
334
  "transparency": "",
@@ -14,65 +14,82 @@ import isSameDay from 'date-fns/is_same_day'
14
14
  export default function expandEvents(events) {
15
15
  return events
16
16
  .reduce((a, event) => {
17
- // Handle multi-day events
18
- const diffTime = Math.abs(
19
- parse(event.end || event.start).getTime() - parse(event.start).getTime()
20
- )
17
+ // Parse the event start and end times
18
+ const start = parse(event.start)
19
+ const end = event.end ? parse(event.end) : start
20
+
21
+ // Normalize today's date to ignore time
22
+ const today = new Date()
23
+ today.setHours(0, 0, 0, 0)
24
+ console.log('Today:', today)
25
+
26
+ const diffTime = Math.abs(end.getTime() - start.getTime())
21
27
  const diffHours = Math.ceil(diffTime / (1000 * 60 * 60))
22
28
  const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24))
23
- const multiDay = !isSameDay(event.start, event.end)
29
+ const multiDay = !isSameDay(start, end)
24
30
  const allDay = !event.end || (diffHours > 23 && diffHours < 25)
25
31
  const endTimeUndetermined = event.end && event.end === event.start
26
32
 
27
33
  if (multiDay && !allDay) {
34
+ // Expand multi-day events
28
35
  for (let d = 0; d < diffDays; d++) {
29
- const today = new Date()
30
- today.setDate(today.getDate() - 1)
31
- const newStart = addDays(event.start, d)
32
- if (newStart > today) {
33
- a.push(
34
- Object.assign({}, event, {
35
- start: newStart,
36
- end: event.end ? event.end : null,
37
- originalStart: event.start,
38
- allDay: parse(event.start).getHours() === 0,
39
- endTimeUndetermined,
40
- multiDay,
41
- weekday: format(parse(newStart), 'dddd'),
42
- day: format(parse(newStart), 'DD'),
43
- number: format(parse(newStart), 'D'),
44
- month: format(parse(newStart), 'MMMM'),
45
- year: format(parse(newStart), 'YYYY'),
46
- })
47
- )
36
+ const newStart = addDays(start, d)
37
+ // Normalize newStart to ignore time
38
+ newStart.setHours(0, 0, 0, 0)
39
+ console.log('newStart:', newStart)
40
+
41
+ if (newStart >= today) {
42
+ a.push({
43
+ ...event,
44
+ start: newStart,
45
+ end: end,
46
+ originalStart: start,
47
+ allDay: start.getHours() === 0,
48
+ endTimeUndetermined,
49
+ multiDay,
50
+ weekday: format(newStart, 'dddd'),
51
+ day: format(newStart, 'DD'),
52
+ number: format(newStart, 'D'),
53
+ month: format(newStart, 'MMMM'),
54
+ year: format(newStart, 'YYYY'),
55
+ })
48
56
  }
49
57
  }
50
58
  } else {
51
- a.push(
52
- Object.assign({}, event, {
53
- start: event.start,
54
- end: event.end ? event.end : null,
59
+ // Normalize start date for single-day events
60
+ const normalizedStart = new Date(start)
61
+ normalizedStart.setHours(0, 0, 0, 0)
62
+ console.log('normailizedStart:', normalizedStart)
63
+
64
+ if (normalizedStart >= today) {
65
+ a.push({
66
+ ...event,
67
+ start: start,
68
+ end: end,
55
69
  originalStart: null,
56
70
  allDay,
57
71
  endTimeUndetermined,
58
72
  multiDay,
59
- weekday: format(parse(event.start), 'dddd'),
60
- day: format(parse(event.start), 'DD'),
61
- number: format(parse(event.start), 'D'),
62
- month: format(parse(event.start), 'MMMM'),
63
- year: format(parse(event.start), 'YYYY'),
73
+ weekday: format(start, 'dddd'),
74
+ day: format(start, 'DD'),
75
+ number: format(start, 'D'),
76
+ month: format(start, 'MMMM'),
77
+ year: format(start, 'YYYY'),
64
78
  })
65
- )
79
+ }
66
80
  }
67
81
  return a
68
82
  }, [])
69
83
  .reduce((a, e) => {
70
- const hasDuplicate =
71
- a.filter(
72
- ae =>
73
- ae.summary === e.summary && ae.start === e.start && ae.end === e.end
74
- ).length > 0
84
+ // Remove duplicates
85
+ const hasDuplicate = a.some(
86
+ ae => ae.summary === e.summary && ae.start.getTime() === e.start.getTime() && ae.end.getTime() === e.end.getTime()
87
+ )
75
88
  if (!hasDuplicate) a.push(e)
76
89
  return a
77
90
  }, [])
91
+ .sort((a, b) => {
92
+ // Sort events by start date
93
+ return a.start.getTime() - b.start.getTime()
94
+ })
78
95
  }