[ACA-3796] - fixed error on sorting (#1575)

* [ACA-3796] - fixed error on sorting

* [ACA-3796] - fixed unit test

* [ACA-3796] - start fixing e2e plus fixed filter parent node

* Rebased and upgraded to the latest ADF

* [ACA-3796] - fixed pr comments

* last adf update

* remove unused loading

* clean unit test

* [ACA-3796] - reverted fix for filters parent

Co-authored-by: Eugenio Romano <eugenio.romano@alfresco.com>
Co-authored-by: Eugenio Romano <eromano@users.noreply.github.com>
This commit is contained in:
Vito 2020-08-10 21:13:28 +01:00 committed by GitHub
parent 382be8dae8
commit 053d2de069
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 61 additions and 22 deletions

View File

@ -979,6 +979,7 @@
{
"id": "app.files.size",
"key": "content.sizeInBytes",
"sortingKey": "sizeInBytes",
"title": "APP.DOCUMENT_LIST.COLUMNS.SIZE",
"type": "fileSize",
"sortable": true,
@ -996,6 +997,7 @@
{
"id": "app.files.modifiedBy",
"key": "modifiedByUser.displayName",
"sortingKey": "modifiedByUser",
"title": "APP.DOCUMENT_LIST.COLUMNS.MODIFIED_BY",
"type": "text",
"class": "adf-ellipsis-cell",
@ -1014,6 +1016,7 @@
{
"id": "app.libraries.name",
"key": "title",
"sortingKey": "name",
"title": "APP.DOCUMENT_LIST.COLUMNS.TITLE",
"type": "text",
"class": "adf-ellipsis-cell adf-expand-cell-5",
@ -1061,6 +1064,7 @@
{
"id": "app.shared.size",
"key": "content.sizeInBytes",
"sortingKey": "sizeInBytes",
"title": "APP.DOCUMENT_LIST.COLUMNS.SIZE",
"type": "fileSize",
"sortable": true,
@ -1078,6 +1082,7 @@
{
"id": "app.shared.modifiedBy",
"key": "modifiedByUser.displayName",
"sortingKey": "modifiedByUser",
"title": "APP.DOCUMENT_LIST.COLUMNS.MODIFIED_BY",
"type": "text",
"class": "adf-ellipsis-cell",
@ -1087,6 +1092,7 @@
{
"id": "app.shared.sharedBy",
"key": "sharedByUser.displayName",
"sortingKey": "sharedByUser",
"title": "APP.DOCUMENT_LIST.COLUMNS.SHARED_BY",
"type": "text",
"class": "adf-ellipsis-cell",
@ -1124,6 +1130,7 @@
{
"id": "app.recent.size",
"key": "content.sizeInBytes",
"sortingKey": "sizeInBytes",
"title": "APP.DOCUMENT_LIST.COLUMNS.SIZE",
"type": "fileSize",
"sortable": true,
@ -1186,6 +1193,7 @@
{
"id": "app.favorites.modifiedBy",
"key": "modifiedByUser.displayName",
"sortingKey": "modifiedByUser",
"title": "APP.DOCUMENT_LIST.COLUMNS.MODIFIED_BY",
"type": "text",
"class": "adf-ellipsis-cell",
@ -1223,6 +1231,7 @@
{
"id": "app.trashcan.size",
"key": "content.sizeInBytes",
"sortingKey": "sizeInBytes",
"title": "APP.DOCUMENT_LIST.COLUMNS.SIZE",
"type": "fileSize",
"sortable": true,
@ -1231,6 +1240,7 @@
{
"id": "app.trashcan.deletedOn",
"key": "archivedAt",
"sortingKey": "archivedAt",
"title": "APP.DOCUMENT_LIST.COLUMNS.DELETED_ON",
"type": "date",
"format": "timeAgo",

View File

@ -898,6 +898,7 @@
{
"id": "app.files.size",
"key": "content.sizeInBytes",
"sortingKey": "sizeInBytes",
"title": "APP.DOCUMENT_LIST.COLUMNS.SIZE",
"type": "fileSize",
"sortable": true,
@ -907,6 +908,7 @@
{
"id": "app.files.modifiedBy",
"key": "modifiedByUser.displayName",
"sortingKey": "modifiedByUser",
"title": "Test header",
"type": "text",
"class": "adf-ellipsis-cell",
@ -916,6 +918,7 @@
{
"id": "some.id.createdBy",
"key": "createdByUser.displayName",
"sortingKey": "createdByUser",
"title": "New column",
"type": "text",
"class": "adf-ellipsis-cell",
@ -934,6 +937,7 @@
{
"id": "app.libraries.name",
"key": "title",
"sortingKey": "name",
"title": "APP.DOCUMENT_LIST.COLUMNS.TITLE",
"type": "text",
"class": "adf-ellipsis-cell adf-expand-cell-5",
@ -981,6 +985,7 @@
{
"id": "app.shared.size",
"key": "content.sizeInBytes",
"sortingKey": "sizeInBytes",
"title": "APP.DOCUMENT_LIST.COLUMNS.SIZE",
"type": "fileSize",
"sortable": true,
@ -998,6 +1003,7 @@
{
"id": "app.shared.modifiedBy",
"key": "modifiedByUser.displayName",
"sortingKey": "modifiedByUser",
"title": "APP.DOCUMENT_LIST.COLUMNS.MODIFIED_BY",
"type": "text",
"class": "adf-ellipsis-cell",
@ -1007,6 +1013,7 @@
{
"id": "app.shared.sharedBy",
"key": "sharedByUser.displayName",
"sortingKey": "sharedByUser",
"title": "APP.DOCUMENT_LIST.COLUMNS.SHARED_BY",
"type": "text",
"class": "adf-ellipsis-cell",
@ -1044,6 +1051,7 @@
{
"id": "app.recent.size",
"key": "content.sizeInBytes",
"sortingKey": "sizeInBytes",
"title": "APP.DOCUMENT_LIST.COLUMNS.SIZE",
"type": "fileSize",
"sortable": true,
@ -1106,6 +1114,7 @@
{
"id": "app.favorites.modifiedBy",
"key": "modifiedByUser.displayName",
"sortingKey": "modifiedByUser",
"title": "APP.DOCUMENT_LIST.COLUMNS.MODIFIED_BY",
"type": "text",
"class": "adf-ellipsis-cell",
@ -1143,6 +1152,7 @@
{
"id": "app.trashcan.size",
"key": "content.sizeInBytes",
"sortingKey": "sizeInBytes",
"title": "APP.DOCUMENT_LIST.COLUMNS.SIZE",
"type": "fileSize",
"sortable": true,
@ -1151,6 +1161,7 @@
{
"id": "app.trashcan.deletedOn",
"key": "archivedAt",
"sortingKey": "archivedAt",
"title": "APP.DOCUMENT_LIST.COLUMNS.DELETED_ON",
"type": "date",
"format": "timeAgo",

View File

@ -562,6 +562,10 @@
"description": "Property key",
"type": "string"
},
"sortingKey": {
"description": "Property key for server sorting",
"type": "string"
},
"type": {
"description": "Column type",
"type": "string",

30
package-lock.json generated
View File

@ -5,9 +5,9 @@
"requires": true,
"dependencies": {
"@alfresco/adf-cli": {
"version": "3.10.0-61cac20ab3b1a76069dcfbfbe37619126d4b51ab",
"resolved": "https://registry.npmjs.org/@alfresco/adf-cli/-/adf-cli-3.10.0-61cac20ab3b1a76069dcfbfbe37619126d4b51ab.tgz",
"integrity": "sha512-Vq7J5D7YpvP7b8eJsauCykS3yNZElsUJwqQV9ZQ+B00HvHCMW2UUUd5VWLb9F/n82hKlsY9k8WSsDnP4aRcSIw==",
"version": "3.10.0-83786bf271c258bae09595811212e6df1141c0e8",
"resolved": "https://registry.npmjs.org/@alfresco/adf-cli/-/adf-cli-3.10.0-83786bf271c258bae09595811212e6df1141c0e8.tgz",
"integrity": "sha512-Bc6pupiKXQQYoeltgvkjuj60mVFfZ5t/3cy9TBDHbLt9513VUfozBe4O4bn0CJcvBCYb+/mQUBZIIMFxzwddyQ==",
"dev": true,
"requires": {
"@alfresco/js-api": "3.10.0-23b97d354151ced90eb2fc68f9d57cad852376d7",
@ -29,33 +29,33 @@
}
},
"@alfresco/adf-content-services": {
"version": "3.10.0-61cac20ab3b1a76069dcfbfbe37619126d4b51ab",
"resolved": "https://registry.npmjs.org/@alfresco/adf-content-services/-/adf-content-services-3.10.0-61cac20ab3b1a76069dcfbfbe37619126d4b51ab.tgz",
"integrity": "sha512-i89GrjsnhugcsNeAbBH/XEwAnEZI7fO9TezuAzBAw9pl2fr0jyjwvcHtrs0BmIT7+HsNv4AJ8ar9bCo7GDy0zg==",
"version": "3.10.0-83786bf271c258bae09595811212e6df1141c0e8",
"resolved": "https://registry.npmjs.org/@alfresco/adf-content-services/-/adf-content-services-3.10.0-83786bf271c258bae09595811212e6df1141c0e8.tgz",
"integrity": "sha512-ReSvsHGOAPf8YSFxFGiseiY8Xg3a5GNAQb2Tfer5ClnLxmksAcLo/MoWPNmfNxLc8P6hYp9tSH/1zYdjyclO/g==",
"requires": {
"tslib": "^2.0.0"
}
},
"@alfresco/adf-core": {
"version": "3.10.0-61cac20ab3b1a76069dcfbfbe37619126d4b51ab",
"resolved": "https://registry.npmjs.org/@alfresco/adf-core/-/adf-core-3.10.0-61cac20ab3b1a76069dcfbfbe37619126d4b51ab.tgz",
"integrity": "sha512-di++9RaUxJhHfb4N33+Bf/4QmxRG2b7FHZcS3qkTlk28S0GqobzsMizkccMHmwEU5nOF/yJHJGVpaFvF7zHNSg==",
"version": "3.10.0-83786bf271c258bae09595811212e6df1141c0e8",
"resolved": "https://registry.npmjs.org/@alfresco/adf-core/-/adf-core-3.10.0-83786bf271c258bae09595811212e6df1141c0e8.tgz",
"integrity": "sha512-A04h+OQphkFH6v4eWqUQFISE3hLqmqRM5WIvSlwbM5KqBamPBGottmjnIbwezpnxpJ+pL6ZRyT2U6XAIb1Vc6Q==",
"requires": {
"tslib": "^2.0.0"
}
},
"@alfresco/adf-extensions": {
"version": "3.10.0-61cac20ab3b1a76069dcfbfbe37619126d4b51ab",
"resolved": "https://registry.npmjs.org/@alfresco/adf-extensions/-/adf-extensions-3.10.0-61cac20ab3b1a76069dcfbfbe37619126d4b51ab.tgz",
"integrity": "sha512-ped6r42Exxl17MtXUjEyPh/U5kZGfeGcT80qhQ9aqPOjfAZnmcfSPz7u+/j5jScHWDRbgTFCltiwwxl3N+2m1w==",
"version": "3.10.0-83786bf271c258bae09595811212e6df1141c0e8",
"resolved": "https://registry.npmjs.org/@alfresco/adf-extensions/-/adf-extensions-3.10.0-83786bf271c258bae09595811212e6df1141c0e8.tgz",
"integrity": "sha512-CRS7lZIDr+lhBxixIzhz8spASHiZRH+GBlCpsMXx9ZvPqmgiSPhWozFJ65Bx5c8jDV3cKk7DILqkfHT6UuaSNA==",
"requires": {
"tslib": "^2.0.0"
}
},
"@alfresco/adf-testing": {
"version": "3.10.0-61cac20ab3b1a76069dcfbfbe37619126d4b51ab",
"resolved": "https://registry.npmjs.org/@alfresco/adf-testing/-/adf-testing-3.10.0-61cac20ab3b1a76069dcfbfbe37619126d4b51ab.tgz",
"integrity": "sha512-2hJpNATtoHN+YdLodnekmE9J6R6Qo9sxvwCyFRUYdbVCZiv4smWysOuuCNHQt1o2KD/syxYrwnG8HO2X9YZCRQ==",
"version": "3.10.0-83786bf271c258bae09595811212e6df1141c0e8",
"resolved": "https://registry.npmjs.org/@alfresco/adf-testing/-/adf-testing-3.10.0-83786bf271c258bae09595811212e6df1141c0e8.tgz",
"integrity": "sha512-JmscyECHb5GdK26sMzKA2nidQfVpsZVZ07UnmJEwgnS3iFLO6nUfsZRWmGXxyNauyuZRDB1FRjEyt2OVF7eHCA==",
"dev": true,
"requires": {
"tslib": "^2.0.0"

View File

@ -34,9 +34,9 @@
},
"private": true,
"dependencies": {
"@alfresco/adf-content-services": "3.10.0-61cac20ab3b1a76069dcfbfbe37619126d4b51ab",
"@alfresco/adf-core": "3.10.0-61cac20ab3b1a76069dcfbfbe37619126d4b51ab",
"@alfresco/adf-extensions": "3.10.0-61cac20ab3b1a76069dcfbfbe37619126d4b51ab",
"@alfresco/adf-content-services": "3.10.0-83786bf271c258bae09595811212e6df1141c0e8",
"@alfresco/adf-core": "3.10.0-83786bf271c258bae09595811212e6df1141c0e8",
"@alfresco/adf-extensions": "3.10.0-83786bf271c258bae09595811212e6df1141c0e8",
"@alfresco/js-api": "3.10.0-23b97d354151ced90eb2fc68f9d57cad852376d7",
"@angular-custom-builders/lite-serve": "^0.2.2",
"@angular/animations": "10.0.4",
@ -72,8 +72,8 @@
"zone.js": "~0.10.2"
},
"devDependencies": {
"@alfresco/adf-cli": "3.10.0-61cac20ab3b1a76069dcfbfbe37619126d4b51ab",
"@alfresco/adf-testing": "3.10.0-61cac20ab3b1a76069dcfbfbe37619126d4b51ab",
"@alfresco/adf-cli": "3.10.0-83786bf271c258bae09595811212e6df1141c0e8",
"@alfresco/adf-testing": "3.10.0-83786bf271c258bae09595811212e6df1141c0e8",
"@angular-devkit/build-angular": "~0.1000.4",
"@angular-devkit/build-ng-packagr": "~0.1000.5",
"@angular/cli": "^10.0.5",

View File

@ -21,13 +21,13 @@
acaDocumentList
acaContextActions
[display]="documentDisplayMode$ | async"
[sorting]="['modifiedAt', 'desc']"
selectionMode="multiple"
[currentFolderId]="node?.id"
[showHeader]="showHeader"
[node]="nodeResult"
[allowDropFiles]="true"
[navigate]="false"
[sorting]="['modifiedAt', 'DESC']"
[imageResolver]="imageResolver"
(node-dblclick)="navigateTo($event.detail?.node)"
(name-click)="navigateTo($event.detail?.node)"
@ -55,6 +55,7 @@
[format]="column.format"
[class]="column.class"
[sortable]="column.sortable"
[sortingKey]="column.sortingKey || column.key"
>
<ng-template let-context>
<adf-dynamic-column [id]="column.template" [context]="context"> </adf-dynamic-column>
@ -70,6 +71,7 @@
[format]="column.format"
[class]="column.class"
[sortable]="column.sortable"
[sortingKey]="column.sortingKey || column.key"
>
</data-column>
</ng-container>

View File

@ -139,7 +139,6 @@ describe('FilesComponent', () => {
beforeEach(() => {
spyOn(contentApi, 'getNode').and.returnValue(of({ entry: node }));
spyOn(component, 'reload');
fixture.detectChanges();
spyOn(component.documentList, 'loadFolder').and.callFake(() => {});

View File

@ -1149,6 +1149,7 @@
{
"id": "app.files.size",
"key": "content.sizeInBytes",
"sortingKey": "sizeInBytes",
"title": "APP.DOCUMENT_LIST.COLUMNS.SIZE",
"type": "fileSize",
"class": "adf-no-grow-cell adf-ellipsis-cell",
@ -1168,6 +1169,7 @@
{
"id": "app.files.modifiedBy",
"key": "modifiedByUser.displayName",
"sortingKey": "modifiedByUser",
"title": "APP.DOCUMENT_LIST.COLUMNS.MODIFIED_BY",
"type": "text",
"class": "adf-ellipsis-cell adf-no-grow-cell",
@ -1186,6 +1188,7 @@
{
"id": "app.libraries.name",
"key": "title",
"sortingKey": "name",
"title": "APP.DOCUMENT_LIST.COLUMNS.NAME",
"type": "text",
"class": "adf-ellipsis-cell adf-expand-cell-3",
@ -1234,6 +1237,7 @@
{
"id": "app.favorite.libraries.name",
"key": "title",
"sortingKey": "name",
"title": "APP.DOCUMENT_LIST.COLUMNS.NAME",
"type": "text",
"class": "adf-ellipsis-cell adf-expand-cell-3",
@ -1292,6 +1296,7 @@
{
"id": "app.shared.location",
"key": "path.name",
"sortingKey": "path",
"title": "APP.DOCUMENT_LIST.COLUMNS.LOCATION",
"type": "text",
"class": "adf-ellipsis-cell adf-no-grow-cell",
@ -1302,6 +1307,7 @@
{
"id": "app.shared.size",
"key": "content.sizeInBytes",
"sortingKey": "sizeInBytes",
"title": "APP.DOCUMENT_LIST.COLUMNS.SIZE",
"type": "fileSize",
"class": "adf-no-grow-cell adf-ellipsis-cell",
@ -1311,6 +1317,7 @@
{
"id": "app.shared.modifiedOn",
"key": "modifiedAt",
"sortingKey": "modifiedAt",
"title": "APP.DOCUMENT_LIST.COLUMNS.MODIFIED_ON",
"type": "date",
"class": "adf-ellipsis-cell",
@ -1321,6 +1328,7 @@
{
"id": "app.shared.modifiedBy",
"key": "modifiedByUser.displayName",
"sortingKey": "modifiedByUser",
"title": "APP.DOCUMENT_LIST.COLUMNS.MODIFIED_BY",
"type": "text",
"class": "adf-ellipsis-cell adf-no-grow-cell",
@ -1330,6 +1338,7 @@
{
"id": "app.shared.sharedBy",
"key": "sharedByUser.displayName",
"sortingKey": "sharedByUser",
"title": "APP.DOCUMENT_LIST.COLUMNS.SHARED_BY",
"type": "text",
"class": "adf-ellipsis-cell adf-no-grow-cell",
@ -1368,6 +1377,7 @@
{
"id": "app.recent.size",
"key": "content.sizeInBytes",
"sortingKey": "sizeInBytes",
"title": "APP.DOCUMENT_LIST.COLUMNS.SIZE",
"type": "fileSize",
"class": "adf-no-grow-cell adf-ellipsis-cell",
@ -1435,6 +1445,7 @@
{
"id": "app.favorites.modifiedBy",
"key": "modifiedByUser.displayName",
"sortingKey": "modifiedByUser",
"title": "APP.DOCUMENT_LIST.COLUMNS.MODIFIED_BY",
"type": "text",
"class": "adf-ellipsis-cell adf-no-grow-cell",
@ -1473,6 +1484,7 @@
{
"id": "app.trashcan.size",
"key": "content.sizeInBytes",
"sortingKey": "sizeInBytes",
"title": "APP.DOCUMENT_LIST.COLUMNS.SIZE",
"type": "fileSize",
"class": "adf-no-grow-cell adf-ellipsis-cell",
@ -1501,6 +1513,7 @@
{
"id": "app.libraries.name",
"key": "title",
"sortingKey": "name",
"title": "APP.DOCUMENT_LIST.COLUMNS.NAME",
"type": "text",
"class": "adf-ellipsis-cell adf-expand-cell-3",