@asd20/ui 3.2.381 → 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
|
@@ -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) => {
|
|
@@ -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
|
},
|
|
@@ -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
|
}
|