@asd20/ui 3.2.594 → 3.2.595
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/organisms/Asd20FeedsSection/index.vue +1 -1
- package/src/components/templates/Asd20ArticleDigestTemplate/index.vue +22 -7
- package/src/components/templates/Asd20ArticleListTemplate/index.vue +15 -4
- package/src/components/templates/Asd20ClubsTemplate/index.stories.js +82 -0
- package/src/components/templates/Asd20ClubsTemplate/index.vue +547 -0
- package/src/data/messages/announcements.json +767 -1
package/package.json
CHANGED
|
@@ -87,13 +87,13 @@
|
|
|
87
87
|
@input="$emit('update:keywords', $event)"
|
|
88
88
|
medium
|
|
89
89
|
/>
|
|
90
|
-
|
|
90
|
+
<asd20-multiselect-input
|
|
91
91
|
label="Categories"
|
|
92
92
|
:taggable="false"
|
|
93
93
|
:value="selectedCategories"
|
|
94
94
|
:items="categoryOptions"
|
|
95
95
|
@input="$emit('update:selected-categories', $event)"
|
|
96
|
-
/>
|
|
96
|
+
/>
|
|
97
97
|
</div>
|
|
98
98
|
|
|
99
99
|
<div v-if="cards.length < 1">
|
|
@@ -101,7 +101,11 @@
|
|
|
101
101
|
<p>There are currently no featues to view.</p>
|
|
102
102
|
</div>
|
|
103
103
|
<div class="feed" v-if="cards.length > 0">
|
|
104
|
-
<div
|
|
104
|
+
<div
|
|
105
|
+
v-if="cards.length > numberToShow"
|
|
106
|
+
id="list-start"
|
|
107
|
+
class="article-pagination"
|
|
108
|
+
>
|
|
105
109
|
<p class="result-count">
|
|
106
110
|
Viewing article {{ counter }}
|
|
107
111
|
{{ counter === cards.length ? '' : '-' }}
|
|
@@ -154,7 +158,7 @@
|
|
|
154
158
|
zoom
|
|
155
159
|
></asd20-card>
|
|
156
160
|
</div>
|
|
157
|
-
<div class="article-pagination">
|
|
161
|
+
<div v-if="cards.length > numberToShow" class="article-pagination">
|
|
158
162
|
<p class="result-count">
|
|
159
163
|
Viewing article {{ counter }}
|
|
160
164
|
{{ counter === cards.length ? '' : '-' }}
|
|
@@ -266,7 +270,7 @@ import Asd20QuicklinksMenu from '../../../components/organisms/Asd20QuicklinksMe
|
|
|
266
270
|
import Asd20NotificationGroup from '@asd20/notifications-ui/src/components/Asd20NotificationGroup'
|
|
267
271
|
|
|
268
272
|
import Asd20SearchField from '../../../components/molecules/Asd20SearchField'
|
|
269
|
-
|
|
273
|
+
import Asd20MultiselectInput from '../../../components/atoms/Asd20MultiselectInput'
|
|
270
274
|
import Asd20Card from '../../../components/molecules/Asd20Card'
|
|
271
275
|
import Asd20Button from '../../../components/atoms/Asd20Button'
|
|
272
276
|
|
|
@@ -292,7 +296,7 @@ export default {
|
|
|
292
296
|
Asd20NotificationGroup,
|
|
293
297
|
Asd20QuicklinksMenu,
|
|
294
298
|
Asd20SearchField,
|
|
295
|
-
|
|
299
|
+
Asd20MultiselectInput,
|
|
296
300
|
Asd20Card,
|
|
297
301
|
Asd20Button,
|
|
298
302
|
Intersect,
|
|
@@ -317,11 +321,16 @@ export default {
|
|
|
317
321
|
return this.stories.map(s =>
|
|
318
322
|
mapMessageToCard(s, {
|
|
319
323
|
// reversed: true,
|
|
320
|
-
|
|
324
|
+
date: '',
|
|
325
|
+
time: '',
|
|
326
|
+
description: '',
|
|
321
327
|
// image: '',
|
|
322
328
|
pinned: false,
|
|
323
329
|
})
|
|
324
330
|
)
|
|
331
|
+
|
|
332
|
+
// .sort((a, b) => (a.title > b.title ? 1 : b.title > a.title ? -1 : 0))
|
|
333
|
+
|
|
325
334
|
// .map(c => ({
|
|
326
335
|
// ...c,
|
|
327
336
|
// link: c.link.replace('/stories', '/announcements'),
|
|
@@ -421,6 +430,12 @@ export default {
|
|
|
421
430
|
}
|
|
422
431
|
.asd20-card {
|
|
423
432
|
margin-bottom: space(0.5);
|
|
433
|
+
// &__date-time {
|
|
434
|
+
// display: none;
|
|
435
|
+
// }
|
|
436
|
+
// &__description {
|
|
437
|
+
// display: none;
|
|
438
|
+
// }
|
|
424
439
|
}
|
|
425
440
|
.article-pagination {
|
|
426
441
|
display: flex;
|
|
@@ -98,6 +98,13 @@
|
|
|
98
98
|
@input="$emit('update:keywords', $event)"
|
|
99
99
|
medium
|
|
100
100
|
/>
|
|
101
|
+
<asd20-multiselect-input
|
|
102
|
+
label="Categories"
|
|
103
|
+
:taggable="false"
|
|
104
|
+
:value="selectedCategories"
|
|
105
|
+
:items="categoryOptions"
|
|
106
|
+
@input="$emit('update:selected-categories', $event)"
|
|
107
|
+
/>
|
|
101
108
|
<!-- <asd20-multiselect-input
|
|
102
109
|
role="listbox"
|
|
103
110
|
aria-label="Choose a Category to Sort By"
|
|
@@ -131,7 +138,11 @@
|
|
|
131
138
|
<p>There are currently no announcements to view.</p>
|
|
132
139
|
</div>
|
|
133
140
|
<div class="feed" v-if="cards.length > 0">
|
|
134
|
-
<div
|
|
141
|
+
<div
|
|
142
|
+
v-if="cards.length > numberToShow"
|
|
143
|
+
id="list-start"
|
|
144
|
+
class="article-pagination"
|
|
145
|
+
>
|
|
135
146
|
<p class="result-count">
|
|
136
147
|
Viewing article {{ counter }}
|
|
137
148
|
{{ counter === cards.length ? '' : '-' }}
|
|
@@ -185,7 +196,7 @@
|
|
|
185
196
|
expanded-description
|
|
186
197
|
></asd20-card>
|
|
187
198
|
</div>
|
|
188
|
-
<div class="article-pagination">
|
|
199
|
+
<div v-if="cards.length > numberToShow" class="article-pagination">
|
|
189
200
|
<p class="result-count">
|
|
190
201
|
Viewing article {{ counter }}
|
|
191
202
|
{{ counter === cards.length ? '' : '-' }}
|
|
@@ -304,7 +315,7 @@ import Asd20QuicklinksMenu from '../../../components/organisms/Asd20QuicklinksMe
|
|
|
304
315
|
import Asd20NotificationGroup from '@asd20/notifications-ui/src/components/Asd20NotificationGroup'
|
|
305
316
|
|
|
306
317
|
import Asd20SearchField from '../../../components/molecules/Asd20SearchField'
|
|
307
|
-
|
|
318
|
+
import Asd20MultiselectInput from '../../../components/atoms/Asd20MultiselectInput'
|
|
308
319
|
import Asd20Card from '../../../components/molecules/Asd20Card'
|
|
309
320
|
import Asd20Button from '../../../components/atoms/Asd20Button'
|
|
310
321
|
|
|
@@ -330,7 +341,7 @@ export default {
|
|
|
330
341
|
Asd20NotificationGroup,
|
|
331
342
|
Asd20QuicklinksMenu,
|
|
332
343
|
Asd20SearchField,
|
|
333
|
-
|
|
344
|
+
Asd20MultiselectInput,
|
|
334
345
|
Asd20Card,
|
|
335
346
|
Asd20Button,
|
|
336
347
|
Intersect,
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { storiesOf } from '@storybook/vue'
|
|
2
|
+
import { withKnobs, boolean } from '@storybook/addon-knobs'
|
|
3
|
+
|
|
4
|
+
import mockPageMixin from '../../../mixins/mockPageMixin'
|
|
5
|
+
|
|
6
|
+
import Asd20ClubsTemplate from '.'
|
|
7
|
+
import pageQueryResult from '../../../data/page-queries/digest-page-query-result.json'
|
|
8
|
+
import notifications from '../../../data/messages/notifications'
|
|
9
|
+
import debounce from 'lodash-es/debounce'
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
const info = {
|
|
13
|
+
summary: 'Clubs Template',
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const wrapper = {
|
|
17
|
+
mixins: [mockPageMixin],
|
|
18
|
+
components: {
|
|
19
|
+
Asd20ClubsTemplate,
|
|
20
|
+
},
|
|
21
|
+
|
|
22
|
+
data: () => ({
|
|
23
|
+
pageQueryResult,
|
|
24
|
+
keywords: '',
|
|
25
|
+
selectedCategories: [],
|
|
26
|
+
categoryOptions: [],
|
|
27
|
+
languageCode: 'en',
|
|
28
|
+
}),
|
|
29
|
+
|
|
30
|
+
computed: {
|
|
31
|
+
activeNotificationsByType() {
|
|
32
|
+
const empty = {
|
|
33
|
+
inline: [],
|
|
34
|
+
banner: [],
|
|
35
|
+
floating: [],
|
|
36
|
+
status: [],
|
|
37
|
+
}
|
|
38
|
+
return boolean('Show Notifications', true)
|
|
39
|
+
? notifications || empty
|
|
40
|
+
: empty
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
watch: {
|
|
44
|
+
keywords: debounce(function(newVal, oldVal) {
|
|
45
|
+
if (newVal !== oldVal) {
|
|
46
|
+
this.loadAnnouncements(this.keywords, this.selectedCategories)
|
|
47
|
+
}
|
|
48
|
+
}, 500),
|
|
49
|
+
selectedCategories: debounce(function(newVal, oldVal) {
|
|
50
|
+
if (newVal !== oldVal) {
|
|
51
|
+
this.loadAnnouncements(this.keywords, this.selectedCategories)
|
|
52
|
+
}
|
|
53
|
+
}, 500),
|
|
54
|
+
},
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const stories = storiesOf('Templates - Asd20ClubsTemplate', module)
|
|
58
|
+
stories.addDecorator(withKnobs)
|
|
59
|
+
|
|
60
|
+
stories.add(
|
|
61
|
+
'Default',
|
|
62
|
+
() => ({
|
|
63
|
+
...wrapper,
|
|
64
|
+
template: `
|
|
65
|
+
<Asd20ClubsTemplate
|
|
66
|
+
v-bind="templateProps"
|
|
67
|
+
:menu-open.sync="menuOpen"
|
|
68
|
+
:search-open.sync="searchOpen"
|
|
69
|
+
:keywords.sync="keywords"
|
|
70
|
+
:selected-categories.sync="selectedCategories"
|
|
71
|
+
:languageCode.sync="languageCode"
|
|
72
|
+
|
|
73
|
+
@announcements-in-view="loadAnnouncements"
|
|
74
|
+
@stories-in-view="loadStories"
|
|
75
|
+
@events-in-view="loadEvents"
|
|
76
|
+
@files-in-view="loadFiles"
|
|
77
|
+
|
|
78
|
+
:categoryOptions="categoryOptions"
|
|
79
|
+
/>`,
|
|
80
|
+
}),
|
|
81
|
+
{ info }
|
|
82
|
+
)
|