@asd20/ui-next 2.21.0 → 2.21.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 +14 -0
- package/package.json +1 -1
- package/src/components/atoms/Asd20RichBodyContent/index.vue +9 -0
- package/src/components/atoms/Asd20RichBodyContent/messageDocumentRenderer.js +4 -4
- package/src/components/organisms/Asd20FeedsSection/index.vue +6 -1
- package/src/components/organisms/Asd20SwiperFeed/index.vue +18 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.21.2](https://github.com/academydistrict20/asd20-ui-next/compare/ui-next-v2.21.1...ui-next-v2.21.2) (2026-08-12)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* constrain single message images to message container ([18a1065](https://github.com/academydistrict20/asd20-ui-next/commit/18a1065ab9295e377c2ae9e879fe8ef557d0d396))
|
|
9
|
+
|
|
10
|
+
## [2.21.1](https://github.com/academydistrict20/asd20-ui-next/compare/ui-next-v2.21.0...ui-next-v2.21.1) (2026-08-12)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* rename 'commtool' button; add 'submit good news button' ([5f6a976](https://github.com/academydistrict20/asd20-ui-next/commit/5f6a9761975d7f79f51d3801089a889a7ec0395f))
|
|
16
|
+
|
|
3
17
|
# [2.21.0](https://github.com/academydistrict20/asd20-ui-next/compare/ui-next-v2.20.1...ui-next-v2.21.0) (2026-08-10)
|
|
4
18
|
|
|
5
19
|
|
package/package.json
CHANGED
|
@@ -158,6 +158,15 @@ export default {
|
|
|
158
158
|
margin-bottom: 0;
|
|
159
159
|
}
|
|
160
160
|
|
|
161
|
+
:deep(.asd20-message-image) {
|
|
162
|
+
box-sizing: border-box;
|
|
163
|
+
display: block;
|
|
164
|
+
max-width: 100%;
|
|
165
|
+
height: auto;
|
|
166
|
+
margin: 1rem auto;
|
|
167
|
+
object-fit: contain;
|
|
168
|
+
}
|
|
169
|
+
|
|
161
170
|
:deep(.asd20-message-image-gallery) {
|
|
162
171
|
box-sizing: border-box;
|
|
163
172
|
max-width: 100%;
|
|
@@ -771,8 +771,8 @@ function renderTable(node) {
|
|
|
771
771
|
)}</tbody></table></div>`
|
|
772
772
|
}
|
|
773
773
|
|
|
774
|
-
function renderImage(attrs) {
|
|
775
|
-
return `<img${attribute('src', attrs.src)}${attribute(
|
|
774
|
+
function renderImage(attrs, className = '') {
|
|
775
|
+
return `<img${attribute('class', className)}${attribute('src', attrs.src)}${attribute(
|
|
776
776
|
'alt',
|
|
777
777
|
attrs.alt,
|
|
778
778
|
true
|
|
@@ -811,11 +811,11 @@ function renderStandardNode(node) {
|
|
|
811
811
|
}
|
|
812
812
|
if (node.type === 'listItem') return `<li>${renderChildren(node)}</li>`
|
|
813
813
|
if (node.type === 'image') {
|
|
814
|
-
return renderImage(node.attrs)
|
|
814
|
+
return renderImage(node.attrs, 'asd20-message-image')
|
|
815
815
|
}
|
|
816
816
|
if (node.type === 'imageGallery') {
|
|
817
817
|
return `<figure class="asd20-message-image-gallery" data-cc-node="image-gallery"><div class="asd20-message-image-gallery__images" data-cc-gallery-images="">${node.attrs.images
|
|
818
|
-
.map(renderImage)
|
|
818
|
+
.map(image => renderImage(image))
|
|
819
819
|
.join('')}</div></figure>`
|
|
820
820
|
}
|
|
821
821
|
if (node.type === 'videoEmbed') {
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
:loading="!Array.isArray(stories)"
|
|
45
45
|
:cards="storyCards"
|
|
46
46
|
:slides-per-view="3"
|
|
47
|
+
:show-good-news-button="isEmployeeWebsite"
|
|
47
48
|
card-type="Feature"
|
|
48
49
|
></Asd20SwiperFeed>
|
|
49
50
|
</intersect>
|
|
@@ -109,7 +110,7 @@ export default {
|
|
|
109
110
|
if (!Array.isArray(this.announcements)) return []
|
|
110
111
|
|
|
111
112
|
// If the organization id is not the employee org:
|
|
112
|
-
if (this.
|
|
113
|
+
if (!this.isEmployeeWebsite) {
|
|
113
114
|
return this.announcements.map(a =>
|
|
114
115
|
mapMessageToCard(
|
|
115
116
|
a,
|
|
@@ -144,6 +145,10 @@ export default {
|
|
|
144
145
|
})
|
|
145
146
|
},
|
|
146
147
|
|
|
148
|
+
isEmployeeWebsite() {
|
|
149
|
+
return this.organizationId === '7ab6f0b0-3304-11ef-92d6-ed16a99dd422'
|
|
150
|
+
},
|
|
151
|
+
|
|
147
152
|
storyCards() {
|
|
148
153
|
if (!Array.isArray(this.stories)) return []
|
|
149
154
|
return this.stories.map(s =>
|
|
@@ -66,7 +66,11 @@
|
|
|
66
66
|
<div class="feed-buttons">
|
|
67
67
|
<asd20-button
|
|
68
68
|
v-if="link && linkLabel && (cards.length >= 10 || cardType === 'Event')"
|
|
69
|
-
:class="
|
|
69
|
+
:class="
|
|
70
|
+
showProtectedContentButtons || showGoodNewsButton
|
|
71
|
+
? 'secondary-button'
|
|
72
|
+
: ''
|
|
73
|
+
"
|
|
70
74
|
:label="linkLabel"
|
|
71
75
|
:link="link"
|
|
72
76
|
size="md"
|
|
@@ -89,7 +93,7 @@
|
|
|
89
93
|
<asd20-button
|
|
90
94
|
v-if="showProtectedContentButtons"
|
|
91
95
|
class="secondary-button"
|
|
92
|
-
label="
|
|
96
|
+
label="Request an Announcement"
|
|
93
97
|
link="https://forms.office.com/Pages/ResponsePage.aspx?id=zcp1lGYYyky2X9rtmQDNB-eqaTnt2ZBNtZ1N5vhrzHNUNFBHNlNBOUJaN1VXQjhDRzBVQVdOS1pVQSQlQCN0PWcu"
|
|
94
98
|
size="md"
|
|
95
99
|
horizontal
|
|
@@ -97,6 +101,17 @@
|
|
|
97
101
|
transparent
|
|
98
102
|
centered
|
|
99
103
|
/>
|
|
104
|
+
<asd20-button
|
|
105
|
+
v-if="showGoodNewsButton"
|
|
106
|
+
class="secondary-button"
|
|
107
|
+
label="Submit Good News"
|
|
108
|
+
link="https://forms.cloud.microsoft/r/kxvn15bNEA"
|
|
109
|
+
size="md"
|
|
110
|
+
horizontal
|
|
111
|
+
bordered
|
|
112
|
+
transparent
|
|
113
|
+
centered
|
|
114
|
+
/>
|
|
100
115
|
</div>
|
|
101
116
|
</component>
|
|
102
117
|
</template>
|
|
@@ -126,6 +141,7 @@ export default {
|
|
|
126
141
|
tag: { type: String, default: 'div' },
|
|
127
142
|
cardType: { type: String, default: '' },
|
|
128
143
|
hasProtectedContent: { type: Boolean, default: false },
|
|
144
|
+
showGoodNewsButton: { type: Boolean, default: false },
|
|
129
145
|
},
|
|
130
146
|
|
|
131
147
|
data: () => ({
|