@asd20/ui 3.2.814 → 3.2.815
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
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
<asd20-modal
|
|
3
3
|
v-if="event"
|
|
4
4
|
:open="open"
|
|
5
|
-
:title="
|
|
5
|
+
:title="
|
|
6
|
+
`${event.calendarOrganizationTitle || event.calendarLocation} Event`
|
|
7
|
+
"
|
|
6
8
|
icon="calendar-alt"
|
|
7
9
|
dismissable
|
|
8
10
|
class="asd20-event-modal"
|
|
@@ -127,18 +129,24 @@ export default {
|
|
|
127
129
|
sanitizeDescription(description) {
|
|
128
130
|
if (!description) return description
|
|
129
131
|
|
|
130
|
-
//
|
|
131
|
-
|
|
132
|
+
// Check if the description contains ">Multiple Schools"
|
|
133
|
+
if (description.includes('>Multiple Schools')) {
|
|
134
|
+
// Remove text between the ">" backwards to the first "." or ":" and replace '>Multiple Schools' with '.'
|
|
135
|
+
description = description.replace(
|
|
136
|
+
/([.:][^>]*?)>([^>]*Multiple Schools)/,
|
|
137
|
+
'$1.'
|
|
138
|
+
)
|
|
132
139
|
|
|
133
|
-
|
|
134
|
-
|
|
140
|
+
// Separate capital letters preceded by lowercase letters with ', '
|
|
141
|
+
description = description.replace(/([a-z])([A-Z])/g, '$1, $2')
|
|
135
142
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
143
|
+
// Remove unmatched quotes between "." or ":" and ">"
|
|
144
|
+
const quotePattern = /[.:][^>]*['"][^'"]*$|[^'"]*['"][^>]*['"]>Multiple Schools/g
|
|
145
|
+
description = description.replace(quotePattern, match => {
|
|
146
|
+
const quotes = match.match(/['"]/g) || []
|
|
147
|
+
return quotes.length % 2 !== 0 ? match.replace(/['"]/g, '') : match
|
|
148
|
+
})
|
|
149
|
+
}
|
|
142
150
|
|
|
143
151
|
return description
|
|
144
152
|
},
|
|
@@ -13,18 +13,24 @@ const sanitizeSummary = summary => {
|
|
|
13
13
|
const sanitizeDescription = description => {
|
|
14
14
|
if (!description) return description
|
|
15
15
|
|
|
16
|
-
//
|
|
17
|
-
|
|
16
|
+
// Check if the description contains ">Multiple Schools"
|
|
17
|
+
if (description.includes('>Multiple Schools')) {
|
|
18
|
+
// Remove text between the ">" backwards to the first "." or ":" and replace '>Multiple Schools' with '.'
|
|
19
|
+
description = description.replace(
|
|
20
|
+
/([.:][^>]*?)>([^>]*Multiple Schools)/,
|
|
21
|
+
'$1.'
|
|
22
|
+
)
|
|
18
23
|
|
|
19
|
-
|
|
20
|
-
|
|
24
|
+
// Separate capital letters preceded by lowercase letters with ', '
|
|
25
|
+
description = description.replace(/([a-z])([A-Z])/g, '$1, $2')
|
|
21
26
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
// Remove unmatched quotes between "." or ":" and ">"
|
|
28
|
+
const quotePattern = /[.:][^>]*['"][^'"]*$|[^'"]*['"][^>]*['"]>Multiple Schools/g
|
|
29
|
+
description = description.replace(quotePattern, match => {
|
|
30
|
+
const quotes = match.match(/['"]/g) || []
|
|
31
|
+
return quotes.length % 2 !== 0 ? match.replace(/['"]/g, '') : match
|
|
32
|
+
})
|
|
33
|
+
}
|
|
28
34
|
|
|
29
35
|
return description
|
|
30
36
|
}
|
|
@@ -52,7 +58,10 @@ const formattedTime = event => {
|
|
|
52
58
|
const endTime = parse(event.end, "yyyy-MM-dd'T'HH:mm:ssX", new Date())
|
|
53
59
|
const startHour = startTime.getHours()
|
|
54
60
|
|
|
55
|
-
if (
|
|
61
|
+
if (
|
|
62
|
+
startTime.getTime() === endTime.getTime() &&
|
|
63
|
+
(startHour >= 23 || startHour < 3)
|
|
64
|
+
) {
|
|
56
65
|
return 'TBD'
|
|
57
66
|
}
|
|
58
67
|
|