diff --git a/demo-shell/resources/i18n/en.json b/demo-shell/resources/i18n/en.json index 0514695eed..1896f8ab17 100644 --- a/demo-shell/resources/i18n/en.json +++ b/demo-shell/resources/i18n/en.json @@ -61,7 +61,12 @@ "DESCRIPTION_UPLOAD" : "Enable upload", "ENABLE_INFINITE_SCROLL":"Enable Infinite Scrolling", "MULTISELECT_DESCRIPTION" : "Use Cmd (Mac) or Ctrl (Windows) to toggle selection of multiple items", - "RECENT" : "Recent Files", + "RECENT" : { + "EMPTY_STATE": { + "TITLE": "Recent is empty" + }, + "TITLE":"Recent Files" + }, "COLUMNS": { "DISPLAY_NAME": "Display name", "TAG": "Tag", diff --git a/demo-shell/src/app/app.component.css b/demo-shell/src/app/app.component.css deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/demo-shell/src/app/app.component.scss b/demo-shell/src/app/app.component.scss new file mode 100644 index 0000000000..b554b878f8 --- /dev/null +++ b/demo-shell/src/app/app.component.scss @@ -0,0 +1,35 @@ +.empty-list { + .adf-data-table { + height: 100%; + + tr:hover, tr:focus { + cursor: default; + } + } + + &__block { + display: flex; + flex-direction: column; + align-items: center; + + p { + line-height: 0; + } + } + + &__title { + font-size: 18px; + font-weight: 600; + } + + &__subtitle { + font-size: 14px; + font-weight: 300; + } + + &__block > mat-icon { + font-size: 52px; + height: 52px; + width: 52px; + } +} diff --git a/demo-shell/src/app/app.component.ts b/demo-shell/src/app/app.component.ts index 1354f1cdf9..d81659ea25 100644 --- a/demo-shell/src/app/app.component.ts +++ b/demo-shell/src/app/app.component.ts @@ -22,7 +22,7 @@ import { SettingsService, PageTitleService, StorageService, TranslationService } @Component({ selector: 'app-root', templateUrl: './app.component.html', - styleUrls: ['./app.component.css'], + styleUrls: ['./app.component.scss'], encapsulation: ViewEncapsulation.None }) export class AppComponent { diff --git a/demo-shell/src/app/components/files/custom-sources.component.html b/demo-shell/src/app/components/files/custom-sources.component.html index aad5bc2a5f..cbae81a06a 100644 --- a/demo-shell/src/app/components/files/custom-sources.component.html +++ b/demo-shell/src/app/components/files/custom-sources.component.html @@ -8,17 +8,6 @@ - -
- -
+ + + + + {{ 'DOCUMENT_LIST.RECENT.TITLE' | translate }}history + + + + + + +
+ history +

{{ 'DOCUMENT_LIST.RECENT.EMPTY_STATE.TITLE' | translate}}

+
+
+
+
+
+
+
diff --git a/demo-shell/src/app/components/files/files.component.scss b/demo-shell/src/app/components/files/files.component.scss index b2e09763b6..198feeded8 100644 --- a/demo-shell/src/app/components/files/files.component.scss +++ b/demo-shell/src/app/components/files/files.component.scss @@ -19,7 +19,7 @@ $minimumDocumentListWidth: 425px; } .adf-not-overlay-viewer { - height:900px; + height: 900px; } adf-document-list ::ng-deep adf-datatable tr.document-list__create { @@ -108,7 +108,7 @@ adf-document-list ::ng-deep .adf-datatable-selected > svg { margin-bottom: 20px; } -.adf-no-result-message{ +.adf-no-result-message { height: 32px; opacity: 0.26; font-size: 24px; @@ -116,12 +116,23 @@ adf-document-list ::ng-deep .adf-datatable-selected > svg { letter-spacing: -1px; } -.adf-recent-container{ - border: 1px solid rgba(0, 0, 0, 0.07); +.adf-container-recent { + mat-icon { + margin-left: 20px; + } + + .empty-list__block { + height: 100%; + padding: 0; + margin: 0; + display: flex; + align-items: center; + justify-content: center; + } } @media (max-width: $minimumDocumentListWidth) { - adf-document-list ::ng-deep adf-datatable { + adf-document-list ::ng-deep adf-datatable { & ::ng-deep .adf-data-table-cell--fileSize { display: none; } diff --git a/demo-shell/src/app/components/trashcan/trashcan.component.html b/demo-shell/src/app/components/trashcan/trashcan.component.html index c7002e8e05..d16e81eeea 100644 --- a/demo-shell/src/app/components/trashcan/trashcan.component.html +++ b/demo-shell/src/app/components/trashcan/trashcan.component.html @@ -17,25 +17,27 @@ +
+ [attr.class]="documentList.isEmpty() ? 'empty-list' : ''" + currentFolderId="-trashcan-" + selectionMode="multiple" + [multiselect]="true" + [navigate]="false" + locationFormat="/files" + [sorting]="[ 'archivedAt', 'desc' ]" + [contextMenuActions]="true" + [contentActions]="false"> @@ -90,7 +92,7 @@ + [target]="documentList">
diff --git a/demo-shell/src/app/components/trashcan/trashcan.component.scss b/demo-shell/src/app/components/trashcan/trashcan.component.scss index b554b878f8..e69de29bb2 100644 --- a/demo-shell/src/app/components/trashcan/trashcan.component.scss +++ b/demo-shell/src/app/components/trashcan/trashcan.component.scss @@ -1,35 +0,0 @@ -.empty-list { - .adf-data-table { - height: 100%; - - tr:hover, tr:focus { - cursor: default; - } - } - - &__block { - display: flex; - flex-direction: column; - align-items: center; - - p { - line-height: 0; - } - } - - &__title { - font-size: 18px; - font-weight: 600; - } - - &__subtitle { - font-size: 14px; - font-weight: 300; - } - - &__block > mat-icon { - font-size: 52px; - height: 52px; - width: 52px; - } -} diff --git a/demo-shell/src/app/material.module.ts b/demo-shell/src/app/material.module.ts index 5718993ca2..a4e6f15ed4 100644 --- a/demo-shell/src/app/material.module.ts +++ b/demo-shell/src/app/material.module.ts @@ -26,7 +26,8 @@ import { MatCardModule, MatListModule, MatMenuModule, - MatToolbarModule + MatToolbarModule, + MatExpansionModule } from '@angular/material'; const MATERIAL_MODULES = [ @@ -39,7 +40,8 @@ const MATERIAL_MODULES = [ MatCardModule, MatListModule, MatMenuModule, - MatToolbarModule + MatToolbarModule, + MatExpansionModule ]; @NgModule({ diff --git a/lib/core/datatable/components/datatable/datatable.component.html b/lib/core/datatable/components/datatable/datatable.component.html index 7c4a29e9c0..b59a55e650 100644 --- a/lib/core/datatable/components/datatable/datatable.component.html +++ b/lib/core/datatable/components/datatable/datatable.component.html @@ -33,7 +33,7 @@ - diff --git a/lib/core/datatable/components/datatable/datatable.component.ts b/lib/core/datatable/components/datatable/datatable.component.ts index 48e280a5e5..2b02ec9d12 100644 --- a/lib/core/datatable/components/datatable/datatable.component.ts +++ b/lib/core/datatable/components/datatable/datatable.component.ts @@ -524,6 +524,12 @@ export class DataTableComponent implements AfterContentInit, OnChanges, DoCheck return null; } + getSortableColumns() { + return this.data.getColumns().filter((currentColum) => { + return currentColum.sortable === true; + }); + } + private emitRowSelectionEvent(name: string, row: DataRow) { const domEvent = new CustomEvent(name, { detail: {