c2-mongoose 2.1.448 → 2.1.449
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.
|
@@ -77,17 +77,9 @@ var GroupV3FlowItem = /** @class */ (function () {
|
|
|
77
77
|
if (detailed && (filters === null || filters === void 0 ? void 0 : filters.docsOrderBy)) {
|
|
78
78
|
var ordenation = (_b = filters.docsOrderBy) === null || _b === void 0 ? void 0 : _b.split(',').map(function (field) { return field === null || field === void 0 ? void 0 : field.trim(); });
|
|
79
79
|
var sortByFields_1 = {};
|
|
80
|
-
ordenation === null || ordenation === void 0 ? void 0 : ordenation.
|
|
81
|
-
sortByFields_1[order
|
|
80
|
+
ordenation === null || ordenation === void 0 ? void 0 : ordenation.forEach(function (order) {
|
|
81
|
+
sortByFields_1[order] = filters.docsOrderSense === 'desc' ? -1 : 1;
|
|
82
82
|
});
|
|
83
|
-
// const groupOrderBy = Array.isArray(filters.groupOrderBy) ? filters.groupOrderBy : [filters.groupOrderBy]
|
|
84
|
-
// const docgroupOrderBy = groupOrderBy.filter((o: string) => typeof o === 'string' && o.startsWith('docs.'))
|
|
85
|
-
// const sortByFields: Record<string, 1 | -1> = {}
|
|
86
|
-
// for (const o of docgroupOrderBy) {
|
|
87
|
-
// sortByFields[o.replace(/^doc\./, '')] = filters.orderSense === 'desc' ? -1 : 1
|
|
88
|
-
// }
|
|
89
|
-
// const remaininggroupOrderBy = ordenation.filter((o: string) => typeof o !== 'string' || !o.startsWith('docs.'))
|
|
90
|
-
// filters.groupOrderBy = remaininggroupOrderBy.length ? remaininggroupOrderBy.join(',') : undefined
|
|
91
83
|
if (Object.keys(sortByFields_1).length > 0) {
|
|
92
84
|
groupsClauses.push({
|
|
93
85
|
$set: {
|
package/package.json
CHANGED
|
@@ -81,25 +81,13 @@ class GroupV3FlowItem {
|
|
|
81
81
|
|
|
82
82
|
if (detailed && filters?.docsOrderBy) {
|
|
83
83
|
|
|
84
|
-
|
|
85
84
|
const ordenation = filters.docsOrderBy?.split(',').map((field: string) => field?.trim())
|
|
86
85
|
|
|
87
86
|
const sortByFields: Record<string, 1 | -1> = {}
|
|
88
|
-
ordenation?.
|
|
89
|
-
sortByFields[order
|
|
87
|
+
ordenation?.forEach((order: string) => {
|
|
88
|
+
sortByFields[order] = filters.docsOrderSense === 'desc' ? -1 : 1
|
|
90
89
|
})
|
|
91
90
|
|
|
92
|
-
|
|
93
|
-
// const groupOrderBy = Array.isArray(filters.groupOrderBy) ? filters.groupOrderBy : [filters.groupOrderBy]
|
|
94
|
-
// const docgroupOrderBy = groupOrderBy.filter((o: string) => typeof o === 'string' && o.startsWith('docs.'))
|
|
95
|
-
// const sortByFields: Record<string, 1 | -1> = {}
|
|
96
|
-
// for (const o of docgroupOrderBy) {
|
|
97
|
-
// sortByFields[o.replace(/^doc\./, '')] = filters.orderSense === 'desc' ? -1 : 1
|
|
98
|
-
// }
|
|
99
|
-
|
|
100
|
-
// const remaininggroupOrderBy = ordenation.filter((o: string) => typeof o !== 'string' || !o.startsWith('docs.'))
|
|
101
|
-
// filters.groupOrderBy = remaininggroupOrderBy.length ? remaininggroupOrderBy.join(',') : undefined
|
|
102
|
-
|
|
103
91
|
if (Object.keys(sortByFields).length > 0) {
|
|
104
92
|
groupsClauses.push({
|
|
105
93
|
$set: {
|