@asd20/ui 3.2.379 → 3.2.382

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.379",
8
+ "version": "3.2.382",
9
9
  "private": false,
10
10
  "license": "MIT",
11
11
  "repository": {
@@ -35,6 +35,7 @@ export default {
35
35
  url: { type: String, default: '' },
36
36
  groupByOwner: { type: Boolean, default: false },
37
37
  groupByCategory: { type: Boolean, default: false },
38
+ groupByCategoryDescending: { type: Boolean, default: false },
38
39
  groupByTag: { type: Boolean, default: false },
39
40
  groupByDate: { type: Boolean, default: false },
40
41
  maxHeight: { type: String, default: '320px' },
@@ -63,6 +64,8 @@ export default {
63
64
  return this.fileItemsGroupedByOwner
64
65
  } else if (this.groupByTag) {
65
66
  return this.fileItemsGroupedByTag
67
+ } else if (this.groupByCategoryDescending) {
68
+ return this.fileItemsGroupedByCategoryDescending
66
69
  }
67
70
  return this.fileItemsGroupedByCategory
68
71
  },
@@ -108,6 +111,47 @@ export default {
108
111
  })
109
112
  },
110
113
 
114
+ fileItemsGroupedByCategoryDescending() {
115
+ return this.computedFiles
116
+ .reduce((a, c) => {
117
+ let categories =
118
+ c.categories && c.categories.length > 0
119
+ ? c.categories
120
+ : ['Uncategorized']
121
+ for (const category of categories) {
122
+ if (a.indexOf(category) === -1) a.push(category)
123
+ }
124
+ return a
125
+ }, [])
126
+ .sort((a, b) => (a > b ? -1 : b > a ? 1 : 0))
127
+ .map(c => {
128
+ return {
129
+ name: c,
130
+ items: mapFilesToListItems(
131
+ this.computedFiles
132
+ .map(f => ({
133
+ ...f,
134
+ categories:
135
+ f.categories && f.categories.length > 0
136
+ ? f.categories
137
+ : ['Uncategorized'],
138
+ }))
139
+ .filter(f => f.categories.indexOf(c) > -1)
140
+ )
141
+ .sort((a, b) =>
142
+ a.label > b.label ? 1 : b.label > a.label ? -1 : 0
143
+ )
144
+ .map(t => ({
145
+ ...t,
146
+ bordered: false,
147
+ alignTop: false,
148
+ condensed: false,
149
+ tags: [],
150
+ })),
151
+ }
152
+ })
153
+ },
154
+
111
155
  fileItemsGroupedByTag() {
112
156
  return this.computedFiles
113
157
  .reduce((a, t) => {
@@ -19,7 +19,9 @@
19
19
  target="_blank"
20
20
  >
21
21
  <img :src="image.thumbnailUrl" :alt="image.alt" />
22
- <p class="grid-overlay">{{ truncatedDescription(image.credits) }}</p>
22
+ <p v-if="image.credits" class="grid-overlay">
23
+ {{ truncatedDescription(image.credits) }}
24
+ </p>
23
25
  </a>
24
26
  </asd20-grid>
25
27
 
@@ -39,7 +41,7 @@
39
41
  :key="index"
40
42
  >
41
43
  <img :src="image.url" :alt="image.alt" />
42
- <p class="text-overlay">{{ image.credits }}</p>
44
+ <p v-if="image.credits" class="text-overlay">{{ image.credits }}</p>
43
45
  </asd20-swipe-item>
44
46
  </asd20-swipe>
45
47
  </transition>
@@ -172,12 +172,16 @@
172
172
  <asd20-list
173
173
  v-if="organization.awardsHonors.length > 0"
174
174
  :items="
175
- organization.awardsHonors.map(a => ({
176
- label: a,
177
- alignTop: true,
178
- checked: true,
179
- condensed: true,
180
- }))
175
+ organization.awardsHonors
176
+ .map(a => ({
177
+ label: a,
178
+ alignTop: true,
179
+ checked: true,
180
+ condensed: true,
181
+ }))
182
+ .sort((a, b) =>
183
+ a.label > b.label ? 1 : b.label > a.label ? -1 : 0
184
+ )
181
185
  "
182
186
  class="asd20-school-details__awards-honors"
183
187
  icon="award"
@@ -187,12 +191,16 @@
187
191
  <asd20-list
188
192
  v-if="organization.uniqueOfferings.length > 0"
189
193
  :items="
190
- organization.uniqueOfferings.map(u => ({
191
- label: u,
192
- alignTop: true,
193
- checked: true,
194
- condensed: true,
195
- }))
194
+ organization.uniqueOfferings
195
+ .map(u => ({
196
+ label: u,
197
+ alignTop: true,
198
+ checked: true,
199
+ condensed: true,
200
+ }))
201
+ .sort((a, b) =>
202
+ a.label > b.label ? 1 : b.label > a.label ? -1 : 0
203
+ )
196
204
  "
197
205
  class="asd20-school-details__unique-offerings"
198
206
  headline="Unique Offerings"
@@ -374,7 +382,6 @@ export default {
374
382
  .map(oc => oc.category.title)
375
383
  .includes('Academics')
376
384
  )
377
-
378
385
  .map(a => ({
379
386
  label: a.offering.title,
380
387
  description: a.offering.description,
@@ -383,13 +390,13 @@ export default {
383
390
  condensed: true,
384
391
  checked: true,
385
392
  }))
393
+ .sort((a, b) => (a.label > b.label ? 1 : b.label > a.label ? -1 : 0))
386
394
  },
387
395
  artsListItems() {
388
396
  return this.organization.offerings
389
397
  .filter(o =>
390
398
  o.offering.categories.map(oc => oc.category.title).includes('Arts')
391
399
  )
392
-
393
400
  .map(a => ({
394
401
  label: a.offering.title,
395
402
  alignTop: true,
@@ -397,6 +404,7 @@ export default {
397
404
  condensed: true,
398
405
  checked: true,
399
406
  }))
407
+ .sort((a, b) => (a.label > b.label ? 1 : b.label > a.label ? -1 : 0))
400
408
  },
401
409
  athleticsListItems() {
402
410
  return this.organization.offerings
@@ -412,6 +420,7 @@ export default {
412
420
  condensed: true,
413
421
  checked: true,
414
422
  }))
423
+ .sort((a, b) => (a.label > b.label ? 1 : b.label > a.label ? -1 : 0))
415
424
  },
416
425
  },
417
426
  }
@@ -1597,7 +1597,7 @@
1597
1597
  "id": "55ac8326-ae3c-4b6d-912b-46231ee2132c",
1598
1598
  "title": "File Feed",
1599
1599
  "type": "text",
1600
- "value": "[{\"title\":\"Related Files\",\"limit\":20,\"keywords\":\"\",\"owners\":[],\"categories\":[\"Food and Nutrition\"],\"tags\":[\"application,alternate application,information release\"],\"groupByDate\":false,\"groupByOwner\":false,\"groupByCategory\":true,\"groupByTag\":false}]",
1600
+ "value": "[{\"title\":\"Related Files\",\"limit\":20,\"keywords\":\"\",\"owners\":[],\"categories\":[\"Food and Nutrition\"],\"tags\":[\"application,alternate application,information release\"],\"groupByDate\":false,\"groupByOwner\":false,\"groupByCategory\":false,\"groupByCategoryDescending\":true,\"groupByTag\":false}]",
1601
1601
  "validationPattern": null,
1602
1602
  "required": false
1603
1603
  },
@@ -92,8 +92,7 @@
92
92
  }
93
93
  ],
94
94
  "metadata": {
95
- "alt": "This is ALT text.",
96
- "credits": "The Discovery Canyon Campus swimming pool."
95
+ "alt": "This is ALT text."
97
96
  }
98
97
  }
99
98
  ],
@@ -126,6 +126,8 @@ export default function mapPageQueryResultToPageTemplateProps(queryResult) {
126
126
  linkLabel: firstFilesFeedConfiguration.linkLabel || 'More Files',
127
127
  groupByOwner: firstFilesFeedConfiguration.groupByOwner || false,
128
128
  groupByCategory: firstFilesFeedConfiguration.groupByCategory || true,
129
+ groupByCategoryDescending:
130
+ firstFilesFeedConfiguration.groupByCategoryDescending || false,
129
131
  groupByTag: firstFilesFeedConfiguration.groupByTag || false,
130
132
  groupByDate: firstFilesFeedConfiguration.groupByDate || false,
131
133
  }