@asd20/ui-next 2.7.0 → 2.7.2
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,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.7.2](https://github.com/academydistrict20/asd20-ui-next/compare/ui-next-v2.7.1...ui-next-v2.7.2) (2026-05-05)
|
|
4
|
+
|
|
5
|
+
## [2.7.1](https://github.com/academydistrict20/asd20-ui-next/compare/ui-next-v2.7.0...ui-next-v2.7.1) (2026-05-05)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* allow compose email modal to interpret AI rejection code ([411c383](https://github.com/academydistrict20/asd20-ui-next/commit/411c38300678a57c4eec6c5892206089b359202d))
|
|
11
|
+
|
|
3
12
|
# [2.7.0](https://github.com/academydistrict20/asd20-ui-next/compare/ui-next-v2.6.0...ui-next-v2.7.0) (2026-05-05)
|
|
4
13
|
|
|
5
14
|
|
package/package.json
CHANGED
|
@@ -91,7 +91,8 @@ $input-focus-color: var(--color__accent-t50);
|
|
|
91
91
|
margin: 0;
|
|
92
92
|
color: var(--website-card__reverse-background-color);
|
|
93
93
|
border: 2px solid var(--color__accent);
|
|
94
|
-
border-radius:
|
|
94
|
+
border-radius: var(--website-shape__radius-s);
|
|
95
|
+
font-family: var(--website-typography__font-family-body);
|
|
95
96
|
font-size: 1rem;
|
|
96
97
|
line-height: 1;
|
|
97
98
|
padding: space(0.25) space(0.25);
|
|
@@ -86,7 +86,8 @@ $input-focus-color: var(--color__accent-t50);
|
|
|
86
86
|
margin: 0;
|
|
87
87
|
color: var(--website-card__reverse-background-color);
|
|
88
88
|
border: 2px solid var(--color__accent);
|
|
89
|
-
border-radius:
|
|
89
|
+
border-radius: var(--website-shape__radius-s);
|
|
90
|
+
font-family: var(--website-typography__font-family-body);
|
|
90
91
|
font-size: 1rem;
|
|
91
92
|
line-height: 1;
|
|
92
93
|
padding: space(0.25) space(0.25);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<asd20-modal
|
|
3
3
|
:open="open"
|
|
4
|
-
title="
|
|
4
|
+
:title="modalTitle"
|
|
5
5
|
icon="email"
|
|
6
6
|
dismissable
|
|
7
7
|
windowed
|
|
@@ -141,6 +141,9 @@ export default {
|
|
|
141
141
|
},
|
|
142
142
|
}),
|
|
143
143
|
computed: {
|
|
144
|
+
modalTitle() {
|
|
145
|
+
return this.sendRejected ? 'Contact our Help Desk' : 'Send an Email'
|
|
146
|
+
},
|
|
144
147
|
isValid() {
|
|
145
148
|
return (
|
|
146
149
|
this.validationErrors.senderName.length === 0 &&
|
|
@@ -226,8 +229,23 @@ export default {
|
|
|
226
229
|
|
|
227
230
|
return 'Something went wrong while sending your email. Please try again later.'
|
|
228
231
|
},
|
|
232
|
+
getSendEmailResponseData(error) {
|
|
233
|
+
if (error?.response?.data) return error.response.data
|
|
234
|
+
|
|
235
|
+
const message = String(error?.message || '')
|
|
236
|
+
const jsonStart = message.indexOf('{')
|
|
237
|
+
if (jsonStart < 0) return null
|
|
238
|
+
|
|
239
|
+
try {
|
|
240
|
+
return JSON.parse(message.slice(jsonStart))
|
|
241
|
+
} catch (_error) {
|
|
242
|
+
return null
|
|
243
|
+
}
|
|
244
|
+
},
|
|
229
245
|
isHelpDeskRejection(error) {
|
|
230
|
-
return
|
|
246
|
+
return (
|
|
247
|
+
this.getSendEmailResponseData(error)?.code === 'moderation_rejected'
|
|
248
|
+
)
|
|
231
249
|
},
|
|
232
250
|
async sendEmail(captchaToken = '') {
|
|
233
251
|
if (!this.isValid) return
|
|
@@ -263,7 +281,8 @@ export default {
|
|
|
263
281
|
console.error('Email send failed:', error?.message || error)
|
|
264
282
|
if (this.isHelpDeskRejection(error)) {
|
|
265
283
|
this.helpDeskUrl =
|
|
266
|
-
error?.
|
|
284
|
+
this.getSendEmailResponseData(error)?.helpDeskUrl ||
|
|
285
|
+
'https://asd20.org/help-desk'
|
|
267
286
|
this.sendRejected = true
|
|
268
287
|
return
|
|
269
288
|
}
|
|
@@ -322,7 +341,8 @@ export default {
|
|
|
322
341
|
& :deep(.asd20-modal) {
|
|
323
342
|
margin-top: auto;
|
|
324
343
|
margin-bottom: auto;
|
|
325
|
-
|
|
344
|
+
height: 80vh;
|
|
345
|
+
max-width: 50vw;
|
|
326
346
|
}
|
|
327
347
|
}
|
|
328
348
|
}
|