@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
@@ -5,7 +5,7 @@
5
5
  "*.scss",
6
6
  "*.vue"
7
7
  ],
8
- "version": "3.2.814",
8
+ "version": "3.2.815",
9
9
  "private": false,
10
10
  "license": "MIT",
11
11
  "repository": {
@@ -2,7 +2,9 @@
2
2
  <asd20-modal
3
3
  v-if="event"
4
4
  :open="open"
5
- :title="`${event.calendarOrganizationTitle || event.calendarLocation} Event`"
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
- // Remove text between the ">" backwards to the first "." or ":" and replace '>Multiple Schools' with '.'
131
- description = description.replace(/([.:][^>]*?)>([^>]*Multiple Schools)/, '$1.')
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
- // Separate capital letters preceded by lowercase letters with ', '
134
- description = description.replace(/([a-z])([A-Z])/g, '$1, $2')
140
+ // Separate capital letters preceded by lowercase letters with ', '
141
+ description = description.replace(/([a-z])([A-Z])/g, '$1, $2')
135
142
 
136
- // Remove unmatched quotes between "." or ":" and ">"
137
- const quotePattern = /[.:][^>]*['"][^'"]*$|[^'"]*['"][^>]*['"]>Multiple Schools/g
138
- description = description.replace(quotePattern, match => {
139
- const quotes = match.match(/['"]/g) || []
140
- return quotes.length % 2 !== 0 ? match.replace(/['"]/g, '') : match
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
- // Remove text between the ">" backwards to the first "." or ":"
17
- description = description.replace(/([.:][^>]*?)>([^>]*Multiple Schools)/, '$1>$2')
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
- // Separate capital letters preceded by lowercase letters with ', '
20
- description = description.replace(/([a-z])([A-Z])/g, '$1, $2')
24
+ // Separate capital letters preceded by lowercase letters with ', '
25
+ description = description.replace(/([a-z])([A-Z])/g, '$1, $2')
21
26
 
22
- // Remove unmatched quotes between "." or ":" and ">"
23
- const quotePattern = /[.:][^>]*['"][^'"]*$|[^'"]*['"][^>]*['"]>Multiple Schools/g
24
- description = description.replace(quotePattern, match => {
25
- const quotes = match.match(/['"]/g) || []
26
- return quotes.length % 2 !== 0 ? match.replace(/['"]/g, '') : match
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 (startTime.getTime() === endTime.getTime() && (startHour >= 23 || startHour < 3)) {
61
+ if (
62
+ startTime.getTime() === endTime.getTime() &&
63
+ (startHour >= 23 || startHour < 3)
64
+ ) {
56
65
  return 'TBD'
57
66
  }
58
67