@asd20/ui 3.2.1020 → 3.2.1022
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 +1 -1
- package/src/components/atoms/Asd20Icon/index.stories.js +42 -48
- package/src/components/atoms/icons/Asd20FinanceSvg.vue +2 -2
- package/src/components/atoms/icons/Asd20ParentsquareSvg.vue +9 -9
- package/src/components/molecules/Asd20CheckboxList/index.vue +1 -0
- package/src/components/organisms/Asd20NotificationGroup/index.vue +3 -3
- package/src/components/templates/Asd20ProfileTemplate/index.vue +117 -79
package/package.json
CHANGED
|
@@ -36,8 +36,7 @@ storiesOf('Atoms - Asd20Icon', module)
|
|
|
36
36
|
/>`,
|
|
37
37
|
}),
|
|
38
38
|
{
|
|
39
|
-
info:
|
|
40
|
-
'Makes it accessible, by takeing the name and passing it as a title, declares it as an image and provides aria roles.',
|
|
39
|
+
info: 'Makes it accessible, by takeing the name and passing it as a title, declares it as an image and provides aria roles.',
|
|
41
40
|
}
|
|
42
41
|
)
|
|
43
42
|
.add(
|
|
@@ -77,88 +76,83 @@ storiesOf('Atoms - Asd20Icon', module)
|
|
|
77
76
|
...wrapper,
|
|
78
77
|
data: () => ({
|
|
79
78
|
icons: [
|
|
80
|
-
'gallery',
|
|
81
|
-
'video',
|
|
82
79
|
'cards',
|
|
83
|
-
'
|
|
80
|
+
'chevron',
|
|
81
|
+
'close',
|
|
82
|
+
'contact',
|
|
84
83
|
'email',
|
|
84
|
+
'external',
|
|
85
|
+
'facebook',
|
|
86
|
+
'fax',
|
|
85
87
|
'file',
|
|
86
88
|
'filter',
|
|
87
|
-
|
|
88
|
-
'
|
|
89
|
+
'gallery',
|
|
90
|
+
'group-alt',
|
|
89
91
|
'heart',
|
|
90
|
-
'
|
|
91
|
-
'pin',
|
|
92
|
-
'star-filled',
|
|
93
|
-
'star',
|
|
94
|
-
'thumb',
|
|
95
|
-
'thumb-filled',
|
|
96
|
-
'info-alt',
|
|
97
|
-
|
|
98
|
-
'phone-alt',
|
|
92
|
+
'heart-filled',
|
|
99
93
|
'hours-alt',
|
|
100
|
-
'
|
|
94
|
+
'info-alt',
|
|
95
|
+
'instagram',
|
|
96
|
+
'linkedin',
|
|
97
|
+
'list',
|
|
101
98
|
'map',
|
|
102
|
-
'external',
|
|
103
|
-
'contact',
|
|
104
|
-
'fax',
|
|
105
|
-
'chevron',
|
|
106
99
|
'menu',
|
|
107
|
-
'
|
|
100
|
+
'phone-alt',
|
|
101
|
+
'pin',
|
|
102
|
+
'pin-filled',
|
|
108
103
|
'search',
|
|
109
|
-
|
|
110
|
-
'
|
|
111
|
-
'
|
|
112
|
-
'
|
|
104
|
+
'star',
|
|
105
|
+
'star-filled',
|
|
106
|
+
'thumb',
|
|
107
|
+
'thumb-filled',
|
|
113
108
|
'twitter',
|
|
114
|
-
'
|
|
109
|
+
'video',
|
|
110
|
+
'youtube',
|
|
111
|
+
|
|
115
112
|
'accessibility',
|
|
116
113
|
'alert',
|
|
114
|
+
'arts',
|
|
115
|
+
'athletics',
|
|
117
116
|
'award',
|
|
118
117
|
'bell',
|
|
119
|
-
'
|
|
118
|
+
'bus',
|
|
120
119
|
'calendar',
|
|
120
|
+
'calendar-alt',
|
|
121
121
|
'committee',
|
|
122
|
+
'cora',
|
|
122
123
|
'danger',
|
|
123
124
|
'directions',
|
|
124
125
|
'directory',
|
|
125
126
|
'district',
|
|
126
127
|
'files',
|
|
127
128
|
'finance',
|
|
129
|
+
'food',
|
|
130
|
+
'group',
|
|
128
131
|
'hours',
|
|
129
132
|
'info',
|
|
133
|
+
'ix',
|
|
130
134
|
'jobs',
|
|
131
135
|
'language',
|
|
136
|
+
'library',
|
|
132
137
|
'link',
|
|
133
138
|
'login',
|
|
139
|
+
'parentsquare',
|
|
134
140
|
'personalize',
|
|
135
141
|
'phone',
|
|
142
|
+
'printer',
|
|
136
143
|
'register',
|
|
137
144
|
'school',
|
|
138
|
-
'staff',
|
|
139
|
-
'website',
|
|
140
|
-
'vendors',
|
|
141
|
-
'cora',
|
|
142
|
-
'weather-snow',
|
|
143
|
-
'weather-sun',
|
|
144
|
-
'athletics',
|
|
145
|
-
'arts',
|
|
146
|
-
'food',
|
|
147
|
-
'group',
|
|
148
|
-
'library',
|
|
149
|
-
|
|
150
|
-
'translate',
|
|
151
|
-
|
|
152
|
-
'technology',
|
|
153
145
|
'schoology',
|
|
154
|
-
'ix',
|
|
155
|
-
|
|
156
|
-
'bus',
|
|
157
|
-
'printer',
|
|
158
146
|
'share',
|
|
159
147
|
'share-alt',
|
|
160
|
-
'
|
|
148
|
+
'staff',
|
|
149
|
+
'technology',
|
|
150
|
+
'translate',
|
|
151
|
+
'vendors',
|
|
161
152
|
'video-alt',
|
|
153
|
+
'weather-snow',
|
|
154
|
+
'weather-sun',
|
|
155
|
+
'website',
|
|
162
156
|
],
|
|
163
157
|
}),
|
|
164
158
|
template: `
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
<rect x="15" y="21" width="2" height="2" rx="0.7" class="line" fill="currentColor"/>
|
|
37
37
|
<rect x="19" y="21" width="2" height="2" rx="0.7" class="line" fill="currentColor"/>
|
|
38
38
|
<!-- Dollar sign ($) in display (line color) -->
|
|
39
|
-
<text
|
|
39
|
+
<!-- <text
|
|
40
40
|
x="16"
|
|
41
41
|
y="12.5"
|
|
42
42
|
text-anchor="middle"
|
|
@@ -46,6 +46,6 @@
|
|
|
46
46
|
font-weight="bold"
|
|
47
47
|
class="fill"
|
|
48
48
|
style="pointer-events: none;"
|
|
49
|
-
>$</text>
|
|
49
|
+
>$</text> -->
|
|
50
50
|
</g>
|
|
51
51
|
</template>
|
|
@@ -17,23 +17,23 @@
|
|
|
17
17
|
/>
|
|
18
18
|
<!-- Rectangle -->
|
|
19
19
|
<rect
|
|
20
|
-
x="9"
|
|
21
|
-
y="9"
|
|
22
|
-
width="
|
|
23
|
-
height="
|
|
20
|
+
x="9.5"
|
|
21
|
+
y="9.5"
|
|
22
|
+
width="13"
|
|
23
|
+
height="13"
|
|
24
24
|
rx="2"
|
|
25
25
|
stroke="#000000"
|
|
26
|
-
stroke-width="
|
|
26
|
+
stroke-width="3"
|
|
27
27
|
stroke-linecap="round"
|
|
28
28
|
stroke-linejoin="round"
|
|
29
29
|
fill="none"
|
|
30
30
|
/>
|
|
31
31
|
|
|
32
32
|
<!-- Corner dots -->
|
|
33
|
-
<circle cx="10" cy="10" r="
|
|
34
|
-
<circle cx="22" cy="10" r="
|
|
35
|
-
<circle cx="10" cy="22" r="
|
|
36
|
-
<circle cx="22" cy="22" r="
|
|
33
|
+
<circle cx="10" cy="10" r="3.5" class="line" stroke="currentColor" stroke-width="1" />
|
|
34
|
+
<circle cx="22" cy="10" r="3.5" class="line" stroke="currentColor" stroke-width="1" />
|
|
35
|
+
<circle cx="10" cy="22" r="3.5" class="line" stroke="currentColor" stroke-width="1" />
|
|
36
|
+
<circle cx="22" cy="22" r="3.5" class="line" stroke="currentColor" stroke-width="1" />
|
|
37
37
|
</g>
|
|
38
38
|
</g>
|
|
39
39
|
</template>
|
|
@@ -36,10 +36,10 @@
|
|
|
36
36
|
:class="{ open: open }"
|
|
37
37
|
:title="
|
|
38
38
|
totalDismissedNotifications
|
|
39
|
-
? '
|
|
40
|
-
: '
|
|
39
|
+
? 'Show all notifications'
|
|
40
|
+
: 'Dismiss all notifications'
|
|
41
41
|
"
|
|
42
|
-
@click="$emit('toggle-all')"
|
|
42
|
+
@click.native="$emit('toggle-all')"
|
|
43
43
|
>
|
|
44
44
|
<span v-if="totalDismissedNotifications > 0" aria-hidden="true">{{ totalDismissedNotifications }}</span>
|
|
45
45
|
</asd20-button>
|
|
@@ -245,29 +245,16 @@
|
|
|
245
245
|
class="asd20-school-details__secondary-content"
|
|
246
246
|
aria-label="Program Offerings"
|
|
247
247
|
>
|
|
248
|
-
<
|
|
249
|
-
v-if="academicsListItems.length > 0"
|
|
250
|
-
:items="academicsListItems"
|
|
251
|
-
class="asd20-school-details__academics-offerings"
|
|
252
|
-
headline="Academics Offerings"
|
|
253
|
-
icon="library"
|
|
254
|
-
/>
|
|
255
|
-
<div class="otherOfferings">
|
|
256
|
-
<asd20-list
|
|
257
|
-
v-if="artsListItems.length > 0"
|
|
258
|
-
:items="artsListItems"
|
|
259
|
-
class="asd20-school-details__arts-offerings"
|
|
260
|
-
headline="Arts Offerings"
|
|
261
|
-
icon="arts"
|
|
262
|
-
/>
|
|
248
|
+
<template v-for="cat in dynamicCategoryOrder">
|
|
263
249
|
<asd20-list
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
250
|
+
:key="'cat-' + cat"
|
|
251
|
+
v-if="(orgOfferingsByCategory[cat] || []).length > 0"
|
|
252
|
+
:items="orgOfferingsByCategory[cat]"
|
|
253
|
+
class="asd20-school-details__category-offerings"
|
|
254
|
+
:headline="cat"
|
|
255
|
+
:icon="iconForCategory(cat)"
|
|
269
256
|
/>
|
|
270
|
-
</
|
|
257
|
+
</template>
|
|
271
258
|
</section>
|
|
272
259
|
</section>
|
|
273
260
|
|
|
@@ -381,66 +368,104 @@ export default {
|
|
|
381
368
|
return this.organization.openSeats.map(g => JSON.parse(g))
|
|
382
369
|
},
|
|
383
370
|
|
|
384
|
-
//
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
)
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
371
|
+
// Categories present on THIS organization, ordered with preferred first.
|
|
372
|
+
dynamicCategoryOrder: function () {
|
|
373
|
+
var org = this.organization || {}
|
|
374
|
+
var offs = org.offerings || []
|
|
375
|
+
var set = {}
|
|
376
|
+
var list = []
|
|
377
|
+
|
|
378
|
+
function getCategoryTitle(c) {
|
|
379
|
+
if (!c) return null
|
|
380
|
+
if (c.category && c.category.title) return c.category.title
|
|
381
|
+
if (c.title) return c.title
|
|
382
|
+
return null
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
for (var i = 0; i < offs.length; i++) {
|
|
386
|
+
var wrap = offs[i]
|
|
387
|
+
var o = wrap && wrap.offering ? wrap.offering : wrap
|
|
388
|
+
if (!o) continue
|
|
389
|
+
var cats = o.categories && o.categories.length ? o.categories : []
|
|
390
|
+
for (var j = 0; j < cats.length; j++) {
|
|
391
|
+
var t = getCategoryTitle(cats[j])
|
|
392
|
+
if (t && !set[t]) {
|
|
393
|
+
set[t] = true
|
|
394
|
+
list.push(t)
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
var preferred = ['Academics', 'Arts', 'Athletics']
|
|
400
|
+
var preferredPresent = []
|
|
401
|
+
for (var p = 0; p < preferred.length; p++) {
|
|
402
|
+
if (set[preferred[p]]) preferredPresent.push(preferred[p])
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
var rest = []
|
|
406
|
+
for (var k = 0; k < list.length; k++) {
|
|
407
|
+
if (preferred.indexOf(list[k]) === -1) rest.push(list[k])
|
|
408
|
+
}
|
|
409
|
+
rest.sort(function (a, b) {
|
|
410
|
+
if (typeof a.localeCompare === 'function') return a.localeCompare(b)
|
|
411
|
+
return a < b ? -1 : a > b ? 1 : 0
|
|
412
|
+
})
|
|
413
|
+
|
|
414
|
+
return preferredPresent.concat(rest)
|
|
427
415
|
},
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
416
|
+
|
|
417
|
+
// Items grouped by category for THIS organization
|
|
418
|
+
orgOfferingsByCategory: function () {
|
|
419
|
+
var org = this.organization || {}
|
|
420
|
+
var offs = org.offerings || []
|
|
421
|
+
var out = {}
|
|
422
|
+
|
|
423
|
+
function getCategoryTitle(c) {
|
|
424
|
+
if (!c) return null
|
|
425
|
+
if (c.category && c.category.title) return c.category.title
|
|
426
|
+
if (c.title) return c.title
|
|
427
|
+
return null
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
for (var i = 0; i < offs.length; i++) {
|
|
431
|
+
var wrap = offs[i]
|
|
432
|
+
var o = wrap && wrap.offering ? wrap.offering : wrap
|
|
433
|
+
if (!o) continue
|
|
434
|
+
|
|
435
|
+
var label = o.title || ''
|
|
436
|
+
var desc = o.description || ''
|
|
437
|
+
var cats = o.categories && o.categories.length ? o.categories : []
|
|
438
|
+
|
|
439
|
+
for (var j = 0; j < cats.length; j++) {
|
|
440
|
+
var cat = getCategoryTitle(cats[j])
|
|
441
|
+
if (!cat) continue
|
|
442
|
+
if (!out[cat]) out[cat] = []
|
|
443
|
+
out[cat].push({
|
|
444
|
+
label: label,
|
|
445
|
+
description: desc, // keep description like your Academics list
|
|
446
|
+
alignTop: true,
|
|
447
|
+
actionable: false,
|
|
448
|
+
condensed: true,
|
|
449
|
+
checked: true,
|
|
450
|
+
})
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
// Sort items A→Z within each category
|
|
455
|
+
for (var name in out) {
|
|
456
|
+
if (!out.hasOwnProperty(name)) continue
|
|
457
|
+
out[name].sort(function (a, b) {
|
|
458
|
+
var al = a.label || '',
|
|
459
|
+
bl = b.label || ''
|
|
460
|
+
if (typeof al.localeCompare === 'function')
|
|
461
|
+
return al.localeCompare(bl)
|
|
462
|
+
return al < bl ? -1 : al > bl ? 1 : 0
|
|
463
|
+
})
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
return out
|
|
443
467
|
},
|
|
468
|
+
|
|
444
469
|
getGradeRange() {
|
|
445
470
|
let levels = this.organization.educationLevels
|
|
446
471
|
let gradeRange = []
|
|
@@ -502,6 +527,19 @@ export default {
|
|
|
502
527
|
}
|
|
503
528
|
},
|
|
504
529
|
},
|
|
530
|
+
methods: {
|
|
531
|
+
iconForCategory: function (cat) {
|
|
532
|
+
// Known icons first
|
|
533
|
+
if (cat === 'Academics') return 'library'
|
|
534
|
+
if (cat === 'Arts') return 'arts'
|
|
535
|
+
if (cat === 'Athletics') return 'athletics'
|
|
536
|
+
// Common new ones (adjust to your icon set)
|
|
537
|
+
if (cat === 'Support') return 'vendors'
|
|
538
|
+
if (cat === 'Community') return 'group'
|
|
539
|
+
// Fallback
|
|
540
|
+
return 'list'
|
|
541
|
+
},
|
|
542
|
+
},
|
|
505
543
|
}
|
|
506
544
|
</script>
|
|
507
545
|
|