@forestadmin/datasource-toolkit
Advanced tools
Comparing version 1.34.4 to 1.34.5
@@ -10,9 +10,13 @@ "use strict"; | ||
static byPrimaryKeys(collection) { | ||
return new _1.default(...schema_1.default.getPrimaryKeys(collection.schema).map(pk => ({ | ||
field: pk, | ||
ascending: true, | ||
}))); | ||
return new _1.default(...schema_1.default.getPrimaryKeys(collection.schema) | ||
.map(pk => collection.schema.fields[pk].isSortable | ||
? { | ||
field: pk, | ||
ascending: true, | ||
} | ||
: null) | ||
.filter(Boolean)); | ||
} | ||
} | ||
exports.default = SortFactory; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmFjdG9yeS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9pbnRlcmZhY2VzL3F1ZXJ5L3NvcnQvZmFjdG9yeS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUFBLHlDQUFxQjtBQUNyQixtRUFBZ0Q7QUFHaEQsTUFBcUIsV0FBVztJQUM5QixNQUFNLENBQUMsYUFBYSxDQUFDLFVBQXNCO1FBQ3pDLE9BQU8sSUFBSSxVQUFJLENBQ2IsR0FBRyxnQkFBVyxDQUFDLGNBQWMsQ0FBQyxVQUFVLENBQUMsTUFBTSxDQUFDLENBQUMsR0FBRyxDQUFDLEVBQUUsQ0FBQyxFQUFFLENBQUMsQ0FBQztZQUMxRCxLQUFLLEVBQUUsRUFBRTtZQUNULFNBQVMsRUFBRSxJQUFJO1NBQ2hCLENBQUMsQ0FBQyxDQUNKLENBQUM7SUFDSixDQUFDO0NBQ0Y7QUFURCw4QkFTQyJ9 | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmFjdG9yeS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9pbnRlcmZhY2VzL3F1ZXJ5L3NvcnQvZmFjdG9yeS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUFBLHlDQUFxQjtBQUNyQixtRUFBZ0Q7QUFJaEQsTUFBcUIsV0FBVztJQUM5QixNQUFNLENBQUMsYUFBYSxDQUFDLFVBQXNCO1FBQ3pDLE9BQU8sSUFBSSxVQUFJLENBQ2IsR0FBRyxnQkFBVyxDQUFDLGNBQWMsQ0FBQyxVQUFVLENBQUMsTUFBTSxDQUFDO2FBQzdDLEdBQUcsQ0FBQyxFQUFFLENBQUMsRUFBRSxDQUNQLFVBQVUsQ0FBQyxNQUFNLENBQUMsTUFBTSxDQUFDLEVBQUUsQ0FBa0IsQ0FBQyxVQUFVO1lBQ3ZELENBQUMsQ0FBQztnQkFDRSxLQUFLLEVBQUUsRUFBRTtnQkFDVCxTQUFTLEVBQUUsSUFBSTthQUNoQjtZQUNILENBQUMsQ0FBQyxJQUFJLENBQ1Q7YUFDQSxNQUFNLENBQUMsT0FBTyxDQUFDLENBQ25CLENBQUM7SUFDSixDQUFDO0NBQ0Y7QUFmRCw4QkFlQyJ9 |
{ | ||
"name": "@forestadmin/datasource-toolkit", | ||
"version": "1.34.4", | ||
"version": "1.34.5", | ||
"main": "dist/src/index.js", | ||
@@ -5,0 +5,0 @@ "license": "GPL-3.0", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
272835
3018