@asd20/ui 3.2.468 → 3.2.469

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.468",
8
+ "version": "3.2.469",
9
9
  "private": false,
10
10
  "license": "MIT",
11
11
  "repository": {
@@ -81,7 +81,7 @@
81
81
 
82
82
  <!-- Page Content -->
83
83
  <asd20-page-content
84
- :primary-messages="primaryMessages"
84
+ :primary-messages="primaryDetailMessages"
85
85
  :secondary-messages="secondaryMessages"
86
86
  omit-detail-links
87
87
  omit-calls-to-action
@@ -67,7 +67,7 @@
67
67
 
68
68
  <!-- Page Content -->
69
69
  <asd20-page-content
70
- :primary-messages="primaryMessages"
70
+ :primary-messages="primaryDetailMessages"
71
71
  :secondary-messages="secondaryMessages"
72
72
  omit-detail-links
73
73
  omit-calls-to-action
@@ -67,7 +67,7 @@
67
67
 
68
68
  <!-- Page Content -->
69
69
  <asd20-page-content
70
- :primary-messages="primaryMessages"
70
+ :primary-messages="primaryDetailMessages"
71
71
  :secondary-messages="secondaryMessages"
72
72
  omit-detail-links
73
73
  omit-calls-to-action
@@ -152,6 +152,52 @@
152
152
  }
153
153
  ]
154
154
  }
155
+ },
156
+ {
157
+ "message": {
158
+ "id": "bb29d2d0-d74f-11ea-8543-fb6b6a5a4032",
159
+ "title": "District Announcements",
160
+ "channels": [],
161
+ "links": [],
162
+ "categories": [],
163
+ "bodyHtml": "<p>Academy District 20 believes in the power of clear, consistent and regular communication.</p>",
164
+ "bodyJson": null,
165
+ "callsToAction": null,
166
+ "images": [],
167
+ "isDistrictFeatured": false,
168
+ "isFeatured": false,
169
+ "ownerOrganizationId": "26eaf390-d8ab-11e9-a3a8-5de5bba4f125",
170
+ "slug": "return-to-school-overview",
171
+ "status": "Published",
172
+ "summary": "Be in the know.",
173
+ "tags": [],
174
+ "translations": null,
175
+ "videos": [],
176
+ "expireDateTime": "2021-08-05T19:12:33.037Z"
177
+ }
178
+ },
179
+ {
180
+ "message": {
181
+ "id": "bb29d2d0-d74f-11ea-8543-fb6b6a5a4032",
182
+ "title": "More District Announcements",
183
+ "channels": [],
184
+ "links": [],
185
+ "categories": [],
186
+ "bodyHtml": "<p>Academy District 20 still believes in the power of clear, consistent and regular communication.</p>",
187
+ "bodyJson": null,
188
+ "callsToAction": null,
189
+ "images": [],
190
+ "isDistrictFeatured": false,
191
+ "isFeatured": false,
192
+ "ownerOrganizationId": "26eaf390-d8ab-11e9-a3a8-5de5bba4f125",
193
+ "slug": "return-to-school-overview",
194
+ "status": "Published",
195
+ "summary": "Be in the know.",
196
+ "tags": [],
197
+ "translations": null,
198
+ "videos": [],
199
+ "expireDateTime": "2021-08-05T19:12:33.037Z"
200
+ }
155
201
  }
156
202
  ],
157
203
  "ownerOrganization": {
@@ -90,6 +90,7 @@ export default {
90
90
  // If there are fewer than 2 messages, no primary messages are available.
91
91
  // The first message is always used in headers
92
92
  // if (this.messages.length < 2) return []
93
+ // --Wayfinding Pages --
93
94
 
94
95
  let originalMessages = JSON.parse(JSON.stringify(this.messages))
95
96
 
@@ -102,7 +103,7 @@ export default {
102
103
  messageWithFirstMessageTitleRemoved.unshift(firstMessage)
103
104
  return messageWithFirstMessageTitleRemoved
104
105
  } else {
105
- // article template & detail template
106
+ // article template & detail templates using a single message
106
107
  let firstMessage = originalMessages[0]
107
108
  delete firstMessage.title
108
109
  delete firstMessage.heading
@@ -129,6 +130,27 @@ export default {
129
130
  }
130
131
  },
131
132
 
133
+ primaryDetailMessages() {
134
+ // If there are more than 2 or more messages on a detail page
135
+ // -- Detail Pages
136
+
137
+ let originalMessages = JSON.parse(JSON.stringify(this.messages))
138
+
139
+ let firstMessage = originalMessages[0]
140
+ delete firstMessage.title
141
+ delete firstMessage.heading
142
+ delete firstMessage.summary
143
+ delete firstMessage.shortDescription
144
+
145
+ let messagesArray = originalMessages.slice(1)
146
+ messagesArray.unshift(firstMessage)
147
+ messagesArray.slice(
148
+ 1,
149
+ Math.min(originalMessages.length, this.primaryMessageLimit + 1)
150
+ )
151
+ return messagesArray
152
+ },
153
+
132
154
  secondaryMessages() {
133
155
  // Ensure there are enough messages for secondary
134
156
  if (this.messages.length < this.primaryMessageLimit + 2) return []