diff --git a/apps/red-ui/src/app/components/downloads-list-screen/downloads-list-screen.component.html b/apps/red-ui/src/app/components/downloads-list-screen/downloads-list-screen.component.html index cc8b6956e..34208c997 100644 --- a/apps/red-ui/src/app/components/downloads-list-screen/downloads-list-screen.component.html +++ b/apps/red-ui/src/app/components/downloads-list-screen/downloads-list-screen.component.html @@ -7,7 +7,7 @@ [bulkActions]="bulkActions" [hasEmptyColumn]="true" [selectionEnabled]="true" - [tableColConfigs]="tableColConfigs" + [tableColumnConfigs]="tableColConfigs" [tableHeaderLabel]="tableHeaderLabel" > diff --git a/apps/red-ui/src/app/components/downloads-list-screen/downloads-list-screen.component.ts b/apps/red-ui/src/app/components/downloads-list-screen/downloads-list-screen.component.ts index c9b53783d..54a4f9de0 100644 --- a/apps/red-ui/src/app/components/downloads-list-screen/downloads-list-screen.component.ts +++ b/apps/red-ui/src/app/components/downloads-list-screen/downloads-list-screen.component.ts @@ -3,9 +3,8 @@ import { FileDownloadService } from '@upload-download/services/file-download.ser import { DownloadStatusWrapper } from '@upload-download/model/download-status.wrapper'; import { DownloadControllerService } from '@redaction/red-ui-http'; import { BaseListingComponent, DefaultListingServices } from '@shared/base/base-listing.component'; -import { CircleButtonTypes } from '@iqser/common-ui'; +import { CircleButtonTypes, TableColumnConfig } from '@iqser/common-ui'; import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; -import { TableColConfig } from '@shared/components/table-col-name/table-col-name.component'; @Component({ selector: 'redaction-downloads-list-screen', @@ -16,14 +15,14 @@ import { TableColConfig } from '@shared/components/table-col-name/table-col-name export class DownloadsListScreenComponent extends BaseListingComponent implements OnInit { readonly circleButtonTypes = CircleButtonTypes; readonly itemSize = 80; - readonly tableColConfigs: TableColConfig[] = [ + protected readonly _primaryKey = 'storageId'; + readonly tableHeaderLabel = _('downloads-list.table-header.title'); + readonly tableColConfigs: TableColumnConfig[] = [ { label: _('downloads-list.table-col-names.name') }, { label: _('downloads-list.table-col-names.size') }, { label: _('downloads-list.table-col-names.date') }, { label: _('downloads-list.table-col-names.status') } ]; - protected readonly _primaryKey = 'storageId'; - protected readonly _tableHeaderLabel = _('downloads-list.table-header.title'); constructor( readonly fileDownloadService: FileDownloadService, diff --git a/apps/red-ui/src/app/modules/admin/dialogs/file-attributes-csv-import-dialog/active-fields-listing/active-fields-listing.component.html b/apps/red-ui/src/app/modules/admin/dialogs/file-attributes-csv-import-dialog/active-fields-listing/active-fields-listing.component.html index e036c7165..162b8475f 100644 --- a/apps/red-ui/src/app/modules/admin/dialogs/file-attributes-csv-import-dialog/active-fields-listing/active-fields-listing.component.html +++ b/apps/red-ui/src/app/modules/admin/dialogs/file-attributes-csv-import-dialog/active-fields-listing/active-fields-listing.component.html @@ -54,25 +54,22 @@
- + - + - + > - + >
diff --git a/apps/red-ui/src/app/modules/admin/dialogs/file-attributes-csv-import-dialog/active-fields-listing/active-fields-listing.component.scss b/apps/red-ui/src/app/modules/admin/dialogs/file-attributes-csv-import-dialog/active-fields-listing/active-fields-listing.component.scss index 300d530d8..7af2b2f30 100644 --- a/apps/red-ui/src/app/modules/admin/dialogs/file-attributes-csv-import-dialog/active-fields-listing/active-fields-listing.component.scss +++ b/apps/red-ui/src/app/modules/admin/dialogs/file-attributes-csv-import-dialog/active-fields-listing/active-fields-listing.component.scss @@ -1,6 +1,6 @@ @import '../../../../../../assets/styles/variables'; -redaction-table-col-name::ng-deep { +iqser-table-column-name::ng-deep { > div { padding: 0 13px 0 10px !important; diff --git a/apps/red-ui/src/app/modules/admin/screens/audit/audit-screen.component.html b/apps/red-ui/src/app/modules/admin/screens/audit/audit-screen.component.html index c72caa634..08f230fa5 100644 --- a/apps/red-ui/src/app/modules/admin/screens/audit/audit-screen.component.html +++ b/apps/red-ui/src/app/modules/admin/screens/audit/audit-screen.component.html @@ -87,23 +87,23 @@
- - + - + - + + >
diff --git a/apps/red-ui/src/app/modules/admin/screens/default-colors/default-colors-screen.component.html b/apps/red-ui/src/app/modules/admin/screens/default-colors/default-colors-screen.component.html index 13f4e0f18..0113d7aab 100644 --- a/apps/red-ui/src/app/modules/admin/screens/default-colors/default-colors-screen.component.html +++ b/apps/red-ui/src/app/modules/admin/screens/default-colors/default-colors-screen.component.html @@ -27,16 +27,16 @@
- + > - + >
diff --git a/apps/red-ui/src/app/modules/admin/screens/dictionary-listing/dictionary-listing-screen.component.html b/apps/red-ui/src/app/modules/admin/screens/dictionary-listing/dictionary-listing-screen.component.html index 972b7fc2b..4bfce719e 100644 --- a/apps/red-ui/src/app/modules/admin/screens/dictionary-listing/dictionary-listing-screen.component.html +++ b/apps/red-ui/src/app/modules/admin/screens/dictionary-listing/dictionary-listing-screen.component.html @@ -60,23 +60,23 @@
- + > - + > - + >
diff --git a/apps/red-ui/src/app/modules/admin/screens/dictionary-listing/dictionary-listing-screen.component.scss b/apps/red-ui/src/app/modules/admin/screens/dictionary-listing/dictionary-listing-screen.component.scss index 950836853..18cdad7f0 100644 --- a/apps/red-ui/src/app/modules/admin/screens/dictionary-listing/dictionary-listing-screen.component.scss +++ b/apps/red-ui/src/app/modules/admin/screens/dictionary-listing/dictionary-listing-screen.component.scss @@ -15,7 +15,7 @@ } } -redaction-table-col-name::ng-deep { +iqser-table-column-name::ng-deep { > div { padding-left: 10px !important; } diff --git a/apps/red-ui/src/app/modules/admin/screens/dossier-attributes-listing/dossier-attributes-listing-screen.component.html b/apps/red-ui/src/app/modules/admin/screens/dossier-attributes-listing/dossier-attributes-listing-screen.component.html index cfad15a4d..d3be62bb8 100644 --- a/apps/red-ui/src/app/modules/admin/screens/dossier-attributes-listing/dossier-attributes-listing-screen.component.html +++ b/apps/red-ui/src/app/modules/admin/screens/dossier-attributes-listing/dossier-attributes-listing-screen.component.html @@ -62,21 +62,21 @@
- + > - + > - + >
diff --git a/apps/red-ui/src/app/modules/admin/screens/dossier-attributes-listing/dossier-attributes-listing-screen.component.scss b/apps/red-ui/src/app/modules/admin/screens/dossier-attributes-listing/dossier-attributes-listing-screen.component.scss index 2dcca5af9..2016db53d 100644 --- a/apps/red-ui/src/app/modules/admin/screens/dossier-attributes-listing/dossier-attributes-listing-screen.component.scss +++ b/apps/red-ui/src/app/modules/admin/screens/dossier-attributes-listing/dossier-attributes-listing-screen.component.scss @@ -9,7 +9,7 @@ padding: 0 24px 0 10px; } -redaction-table-col-name::ng-deep { +iqser-table-column-name::ng-deep { > div { padding-left: 10px !important; } diff --git a/apps/red-ui/src/app/modules/admin/screens/dossier-template-listing/dossier-templates-listing-screen.component.html b/apps/red-ui/src/app/modules/admin/screens/dossier-template-listing/dossier-templates-listing-screen.component.html index ed7af38bd..31131457a 100644 --- a/apps/red-ui/src/app/modules/admin/screens/dossier-template-listing/dossier-templates-listing-screen.component.html +++ b/apps/red-ui/src/app/modules/admin/screens/dossier-template-listing/dossier-templates-listing-screen.component.html @@ -53,25 +53,25 @@
- - + - + - + + >
diff --git a/apps/red-ui/src/app/modules/admin/screens/dossier-template-listing/dossier-templates-listing-screen.component.scss b/apps/red-ui/src/app/modules/admin/screens/dossier-template-listing/dossier-templates-listing-screen.component.scss index 6fd6360f8..5d6ba5f25 100644 --- a/apps/red-ui/src/app/modules/admin/screens/dossier-template-listing/dossier-templates-listing-screen.component.scss +++ b/apps/red-ui/src/app/modules/admin/screens/dossier-template-listing/dossier-templates-listing-screen.component.scss @@ -5,7 +5,7 @@ padding: 0 24px 0 10px; } -redaction-table-col-name::ng-deep { +iqser-table-column-name::ng-deep { > div { padding-left: 10px !important; } diff --git a/apps/red-ui/src/app/modules/admin/screens/file-attributes-listing/file-attributes-listing-screen.component.html b/apps/red-ui/src/app/modules/admin/screens/file-attributes-listing/file-attributes-listing-screen.component.html index 69db731d0..bf302b737 100644 --- a/apps/red-ui/src/app/modules/admin/screens/file-attributes-listing/file-attributes-listing-screen.component.html +++ b/apps/red-ui/src/app/modules/admin/screens/file-attributes-listing/file-attributes-listing-screen.component.html @@ -71,35 +71,35 @@
- + > - + > - + > - + > - + >
diff --git a/apps/red-ui/src/app/modules/admin/screens/file-attributes-listing/file-attributes-listing-screen.component.scss b/apps/red-ui/src/app/modules/admin/screens/file-attributes-listing/file-attributes-listing-screen.component.scss index b4d8ef8d5..89eddfa02 100644 --- a/apps/red-ui/src/app/modules/admin/screens/file-attributes-listing/file-attributes-listing-screen.component.scss +++ b/apps/red-ui/src/app/modules/admin/screens/file-attributes-listing/file-attributes-listing-screen.component.scss @@ -9,7 +9,7 @@ padding: 0 24px 0 10px; } -redaction-table-col-name::ng-deep { +iqser-table-column-name::ng-deep { > div { padding-left: 10px !important; } diff --git a/apps/red-ui/src/app/modules/admin/screens/trash/trash-screen.component.html b/apps/red-ui/src/app/modules/admin/screens/trash/trash-screen.component.html index 4d1ada6e4..aafbcf221 100644 --- a/apps/red-ui/src/app/modules/admin/screens/trash/trash-screen.component.html +++ b/apps/red-ui/src/app/modules/admin/screens/trash/trash-screen.component.html @@ -36,25 +36,22 @@
- - - + + - + + >
diff --git a/apps/red-ui/src/app/modules/admin/screens/trash/trash-screen.component.scss b/apps/red-ui/src/app/modules/admin/screens/trash/trash-screen.component.scss index f2e81812c..41c1395e0 100644 --- a/apps/red-ui/src/app/modules/admin/screens/trash/trash-screen.component.scss +++ b/apps/red-ui/src/app/modules/admin/screens/trash/trash-screen.component.scss @@ -9,7 +9,7 @@ } } -redaction-table-col-name::ng-deep { +iqser-table-column-name::ng-deep { > div { padding-left: 10px !important; } diff --git a/apps/red-ui/src/app/modules/admin/screens/user-listing/user-listing-screen.component.html b/apps/red-ui/src/app/modules/admin/screens/user-listing/user-listing-screen.component.html index 5ba720302..f1cd91a66 100644 --- a/apps/red-ui/src/app/modules/admin/screens/user-listing/user-listing-screen.component.html +++ b/apps/red-ui/src/app/modules/admin/screens/user-listing/user-listing-screen.component.html @@ -62,16 +62,16 @@
- + - + - + > - +
diff --git a/apps/red-ui/src/app/modules/admin/screens/user-listing/user-listing-screen.component.scss b/apps/red-ui/src/app/modules/admin/screens/user-listing/user-listing-screen.component.scss index 4c9b955f9..40aa50b5f 100644 --- a/apps/red-ui/src/app/modules/admin/screens/user-listing/user-listing-screen.component.scss +++ b/apps/red-ui/src/app/modules/admin/screens/user-listing/user-listing-screen.component.scss @@ -3,7 +3,7 @@ padding: 0 24px 0 10px; } - redaction-table-col-name::ng-deep { + iqser-table-column-name::ng-deep { > div { padding: 0 13px 0 10px !important; } diff --git a/apps/red-ui/src/app/modules/dossier/screens/dossier-listing-screen/dossier-listing-screen.component.html b/apps/red-ui/src/app/modules/dossier/screens/dossier-listing-screen/dossier-listing-screen.component.html index 8f4cbdf44..42721ebdc 100644 --- a/apps/red-ui/src/app/modules/dossier/screens/dossier-listing-screen/dossier-listing-screen.component.html +++ b/apps/red-ui/src/app/modules/dossier/screens/dossier-listing-screen/dossier-listing-screen.component.html @@ -8,7 +8,10 @@
- + [] = [ { label: _('dossier-listing.table-col-names.name'), withSort: true, @@ -70,8 +71,6 @@ export class DossierListingScreenComponent ]; dossiersChartData: DoughnutChartConfig[] = []; documentsChartData: DoughnutChartConfig[] = []; - protected readonly _primaryKey = 'numberOfMembers'; - protected _tableHeaderLabel = _('dossier-listing.table-header.title'); private _lastScrollPosition: number; @ViewChild('needsWorkTemplate', { read: TemplateRef, static: true }) private readonly _needsWorkTemplate: TemplateRef; diff --git a/apps/red-ui/src/app/modules/dossier/screens/dossier-overview-screen/dossier-overview-screen.component.html b/apps/red-ui/src/app/modules/dossier/screens/dossier-overview-screen/dossier-overview-screen.component.html index 5e8fdf75b..7d43be517 100644 --- a/apps/red-ui/src/app/modules/dossier/screens/dossier-overview-screen/dossier-overview-screen.component.html +++ b/apps/red-ui/src/app/modules/dossier/screens/dossier-overview-screen/dossier-overview-screen.component.html @@ -39,7 +39,7 @@ diff --git a/apps/red-ui/src/app/modules/dossier/screens/dossier-overview-screen/dossier-overview-screen.component.scss b/apps/red-ui/src/app/modules/dossier/screens/dossier-overview-screen/dossier-overview-screen.component.scss index 2ada265a7..b28ed76bb 100644 --- a/apps/red-ui/src/app/modules/dossier/screens/dossier-overview-screen/dossier-overview-screen.component.scss +++ b/apps/red-ui/src/app/modules/dossier/screens/dossier-overview-screen/dossier-overview-screen.component.scss @@ -9,7 +9,7 @@ padding: 0 24px 0 10px; } -redaction-table-col-name::ng-deep { +iqser-table-column-name::ng-deep { > div { padding-left: 10px !important; } diff --git a/apps/red-ui/src/app/modules/dossier/screens/dossier-overview-screen/dossier-overview-screen.component.ts b/apps/red-ui/src/app/modules/dossier/screens/dossier-overview-screen/dossier-overview-screen.component.ts index e1a40cd1b..7d799cea7 100644 --- a/apps/red-ui/src/app/modules/dossier/screens/dossier-overview-screen/dossier-overview-screen.component.ts +++ b/apps/red-ui/src/app/modules/dossier/screens/dossier-overview-screen/dossier-overview-screen.component.ts @@ -21,7 +21,7 @@ import { DossierWrapper } from '@state/model/dossier.wrapper'; import { OnAttach, OnDetach } from '@utils/custom-route-reuse.strategy'; import { AppConfigKey, AppConfigService } from '@app-config/app-config.service'; import { ActionConfig } from '@shared/components/page-header/models/action-config.model'; -import { CircleButtonTypes, keyChecker, NestedFilter } from '@iqser/common-ui'; +import { CircleButtonTypes, keyChecker, NestedFilter, TableColumnConfig } from '@iqser/common-ui'; import { BaseListingComponent, DefaultListingServices } from '@shared/base/base-listing.component'; import { LoadingService } from '@services/loading.service'; import { DossierAttributesService } from '@shared/services/controller-wrappers/dossier-attributes.service'; @@ -30,7 +30,6 @@ import { UserPreferenceService } from '@services/user-preference.service'; import { workloadTranslations } from '../../translations/workload-translations'; import { fileStatusTranslations } from '../../translations/file-status-translations'; import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; -import { TableColConfig } from '@shared/components/table-col-name/table-col-name.component'; import { annotationFilterChecker } from '@shared/components/filters/popup-filter/utils/filter-utils'; @Component({ @@ -42,13 +41,12 @@ export class DossierOverviewScreenComponent extends BaseListingComponent implements OnInit, OnDestroy, OnDetach, OnAttach { - private readonly _lastOpenedFileKey = 'Dossier-Recent-' + this.activeDossier.dossierId; - protected readonly _primaryKey = 'filename'; readonly circleButtonTypes = CircleButtonTypes; - protected readonly _tableHeaderLabel = _('dossier-overview.table-header.title'); - readonly itemSize = 80; - collapsedDetails = false; + protected readonly _primaryKey = 'filename'; + readonly tableHeaderLabel = _('dossier-overview.table-header.title'); + private readonly _lastOpenedFileKey = 'Dossier-Recent-' + this.activeDossier.dossierId; + readonly actionConfigs: ActionConfig[] = [ { label: this._translateService.instant('dossier-overview.header-actions.edit'), @@ -57,8 +55,7 @@ export class DossierOverviewScreenComponent hide: !this.permissionsService.isManager() } ]; - dossierAttributes: DossierAttributeWithValue[] = []; - readonly tableColConfigs: TableColConfig[] = [ + readonly tableColumnConfigs: TableColumnConfig[] = [ { label: _('dossier-overview.table-col-names.name'), withSort: true, @@ -90,6 +87,9 @@ export class DossierOverviewScreenComponent column: 'statusSort' } ]; + + collapsedDetails = false; + dossierAttributes: DossierAttributeWithValue[] = []; @ViewChild(DossierDetailsComponent, { static: false }) private readonly _dossierDetailsComponent: DossierDetailsComponent; private _lastScrollPosition: number; diff --git a/apps/red-ui/src/app/modules/dossier/screens/search-screen/search-screen.component.html b/apps/red-ui/src/app/modules/dossier/screens/search-screen/search-screen.component.html index bce8ba1ad..c3f629476 100644 --- a/apps/red-ui/src/app/modules/dossier/screens/search-screen/search-screen.component.html +++ b/apps/red-ui/src/app/modules/dossier/screens/search-screen/search-screen.component.html @@ -10,7 +10,10 @@
- + implem readonly searchPositions = SearchPositions; readonly itemSize = 85; + protected readonly _primaryKey = 'filename'; + readonly tableHeaderLabel = _('search-screen.table-header'); + readonly tableColumnConfigs: TableColumnConfig[] = [ + { label: _('search-screen.cols.document') }, + { label: _('search-screen.cols.status') }, + { label: _('search-screen.cols.dossier') }, + { label: _('search-screen.cols.pages') } + ]; readonly search$ = new BehaviorSubject(null); readonly searchResults$: Observable = this.search$.asObservable().pipe( switchMap(query => this._search(query)), @@ -49,22 +56,6 @@ export class SearchScreenComponent extends BaseListingComponent implem tap(result => this.screenStateService.setEntities(result)), tap(() => this._loadingService.stop()) ); - readonly tableColConfigs: TableColConfig[] = [ - { - label: _('search-screen.cols.document') - }, - { - label: _('search-screen.cols.status') - }, - { - label: _('search-screen.cols.dossier') - }, - { - label: _('search-screen.cols.pages') - } - ]; - protected readonly _primaryKey = 'filename'; - protected readonly _tableHeaderLabel = _('search-screen.table-header'); constructor( protected readonly _injector: Injector, diff --git a/apps/red-ui/src/app/modules/icons/icons.module.ts b/apps/red-ui/src/app/modules/icons/icons.module.ts index 6401b72b9..7e2e39b94 100644 --- a/apps/red-ui/src/app/modules/icons/icons.module.ts +++ b/apps/red-ui/src/app/modules/icons/icons.module.ts @@ -70,8 +70,6 @@ export class IconsModule { 'report', 'search', 'secret', - 'sort-asc', - 'sort-desc', 'status', 'status-collapse', 'status-expand', diff --git a/apps/red-ui/src/app/modules/shared/base/base-listing.component.ts b/apps/red-ui/src/app/modules/shared/base/base-listing.component.ts index 79ac0396b..4ace3e486 100644 --- a/apps/red-ui/src/app/modules/shared/base/base-listing.component.ts +++ b/apps/red-ui/src/app/modules/shared/base/base-listing.component.ts @@ -1,5 +1,13 @@ import { Component, Injector, OnDestroy, ViewChild } from '@angular/core'; -import { AutoUnsubscribeComponent, FilterService, KeysOf, SearchService, SortingOrders, SortingService } from '@iqser/common-ui'; +import { + AutoUnsubscribeComponent, + FilterService, + KeysOf, + SearchService, + SortingOrders, + SortingService, + TableColumnConfig +} from '@iqser/common-ui'; import { CdkVirtualScrollViewport } from '@angular/cdk/scrolling'; import { ScreenStateService } from '../services/screen-state.service'; import { combineLatest, Observable } from 'rxjs'; @@ -22,7 +30,7 @@ export abstract class BaseListingComponent extends AutoUnsubsc readonly sortedDisplayedEntities$ = this._sortedDisplayedEntities$; readonly noMatch$ = this._noMatch$; - protected readonly _tableHeaderLabel: string; + readonly tableColumnConfigs: TableColumnConfig[]; /** * Key used in the *trackBy* function with **ngFor* or **cdkVirtualFor* * and in the default sorting and as the search field @@ -36,22 +44,14 @@ export abstract class BaseListingComponent extends AutoUnsubsc setTimeout(() => this.setInitialConfig()); } - get tableHeaderLabel(): string { - if (!this._tableHeaderLabel) { - throw new Error('Not implemented'); - } - - return this._tableHeaderLabel; - } - get allEntities(): T[] { return this.screenStateService.allEntities; } private get _sortedDisplayedEntities$(): Observable { - return this.sortingService.sortingOption$.pipe( - switchMap(() => this.screenStateService.displayedEntities$.pipe(map(entities => this.sortingService.defaultSort(entities)))) - ); + const sort = entities => this.sortingService.defaultSort(entities); + const sortedEntities = () => this.screenStateService.displayedEntities$.pipe(map(sort)); + return this.sortingService.sortingOption$.pipe(switchMap(sortedEntities)); } private get _noMatch$(): Observable { @@ -69,10 +69,6 @@ export abstract class BaseListingComponent extends AutoUnsubsc this.searchService.setSearchKey(this._primaryKey); } - ngOnDestroy(): void { - super.ngOnDestroy(); - } - canBulkDelete$(hasPermission = true): Observable { return this.screenStateService.areSomeEntitiesSelected$.pipe( map(areSomeEntitiesSelected => areSomeEntitiesSelected && hasPermission), diff --git a/apps/red-ui/src/app/modules/shared/components/table-col-name/table-col-name.component.html b/apps/red-ui/src/app/modules/shared/components/table-col-name/table-col-name.component.html deleted file mode 100644 index da89f5a0d..000000000 --- a/apps/red-ui/src/app/modules/shared/components/table-col-name/table-col-name.component.html +++ /dev/null @@ -1,12 +0,0 @@ -
- - {{ label }} - - - -
- - -
-
-
diff --git a/apps/red-ui/src/app/modules/shared/components/table-col-name/table-col-name.component.scss b/apps/red-ui/src/app/modules/shared/components/table-col-name/table-col-name.component.scss deleted file mode 100644 index b8d3cb571..000000000 --- a/apps/red-ui/src/app/modules/shared/components/table-col-name/table-col-name.component.scss +++ /dev/null @@ -1,51 +0,0 @@ -@import '../../../../../assets/styles/variables'; - -:host { - display: flex; - height: 30px; - flex: 1; - - > div { - align-items: center; - display: flex; - width: 100%; - line-height: 11px; - padding: 0 24px; - - > mat-icon { - width: 10px; - height: 10px; - margin-right: 6px; - opacity: 0.7; - - &:not(:first-child) { - margin-left: 6px; - } - } - } - - .flex-end { - min-width: 58px; - } - - .sort-arrows-container { - display: none; - color: $primary; - margin-left: 8px; - - mat-icon { - height: 14px; - width: 6px; - } - } - - &:hover { - .sort-arrows-container { - display: initial; - } - } - - .sort-arrows-container.force-display { - display: initial; - } -} diff --git a/apps/red-ui/src/app/modules/shared/components/table-col-name/table-col-name.component.ts b/apps/red-ui/src/app/modules/shared/components/table-col-name/table-col-name.component.ts deleted file mode 100644 index 39b6985ac..000000000 --- a/apps/red-ui/src/app/modules/shared/components/table-col-name/table-col-name.component.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { Component, Input, Optional } from '@angular/core'; -import { KeysOf, SortingService } from '@iqser/common-ui'; - -export interface TableColConfig { - readonly column?: string; - readonly label: string; - readonly withSort?: boolean; - readonly class?: string; - readonly leftIcon?: string; - readonly rightIcon?: string; - readonly rightIconTooltip?: string; -} - -@Component({ - selector: 'redaction-table-col-name', - templateUrl: './table-col-name.component.html', - styleUrls: ['./table-col-name.component.scss'] -}) -export class TableColNameComponent { - @Input() column: KeysOf; - @Input() label: string; - @Input() withSort = false; - @Input() class: string; - @Input() leftIcon: string; - @Input() rightIcon: string; - @Input() rightIconTooltip: string; - - constructor(@Optional() readonly sortingService: SortingService) {} -} diff --git a/apps/red-ui/src/app/modules/shared/components/table-header/table-header.component.html b/apps/red-ui/src/app/modules/shared/components/table-header/table-header.component.html index bf7465f3f..a7adb19b3 100644 --- a/apps/red-ui/src/app/modules/shared/components/table-header/table-header.component.html +++ b/apps/red-ui/src/app/modules/shared/components/table-header/table-header.component.html @@ -18,8 +18,8 @@
- + >
diff --git a/apps/red-ui/src/app/modules/shared/components/table-header/table-header.component.ts b/apps/red-ui/src/app/modules/shared/components/table-header/table-header.component.ts index ff2b6bd94..06ffcd60b 100644 --- a/apps/red-ui/src/app/modules/shared/components/table-header/table-header.component.ts +++ b/apps/red-ui/src/app/modules/shared/components/table-header/table-header.component.ts @@ -1,6 +1,6 @@ import { ChangeDetectionStrategy, Component, Input, TemplateRef } from '@angular/core'; -import { TableColConfig } from '@shared/components/table-col-name/table-col-name.component'; import { ScreenStateService } from '@shared/services/screen-state.service'; +import { TableColumnConfig } from '@iqser/common-ui'; @Component({ selector: 'redaction-table-header', @@ -10,7 +10,7 @@ import { ScreenStateService } from '@shared/services/screen-state.service'; }) export class TableHeaderComponent { @Input() tableHeaderLabel: string; - @Input() tableColConfigs: TableColConfig[]; + @Input() tableColumnConfigs: TableColumnConfig[]; @Input() hasEmptyColumn = false; @Input() selectionEnabled = false; @Input() bulkActions: TemplateRef; diff --git a/apps/red-ui/src/app/modules/shared/shared.module.ts b/apps/red-ui/src/app/modules/shared/shared.module.ts index ff6820f6c..35ebd9184 100644 --- a/apps/red-ui/src/app/modules/shared/shared.module.ts +++ b/apps/red-ui/src/app/modules/shared/shared.module.ts @@ -4,7 +4,6 @@ import { FullPageLoadingIndicatorComponent } from './components/full-page-loadin import { TranslateModule } from '@ngx-translate/core'; import { InitialsAvatarComponent } from './components/initials-avatar/initials-avatar.component'; import { ScrollingModule } from '@angular/cdk/scrolling'; -import { TableColNameComponent } from './components/table-col-name/table-col-name.component'; import { PaginationComponent } from './components/pagination/pagination.component'; import { FileDownloadBtnComponent } from './components/buttons/file-download-btn/file-download-btn.component'; import { UserButtonComponent } from './components/buttons/user-button/user-button.component'; @@ -41,7 +40,7 @@ const buttons = [FileDownloadBtnComponent, UserButtonComponent]; const components = [ FullPageLoadingIndicatorComponent, InitialsAvatarComponent, - TableColNameComponent, + TableHeaderComponent, PaginationComponent, InputWithActionComponent, AnnotationIconComponent, diff --git a/apps/red-ui/src/assets/icons/general/sort-asc.svg b/apps/red-ui/src/assets/icons/general/sort-asc.svg deleted file mode 100644 index 812184785..000000000 --- a/apps/red-ui/src/assets/icons/general/sort-asc.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - diff --git a/apps/red-ui/src/assets/icons/general/sort-desc.svg b/apps/red-ui/src/assets/icons/general/sort-desc.svg deleted file mode 100644 index f9211f8d1..000000000 --- a/apps/red-ui/src/assets/icons/general/sort-desc.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - diff --git a/apps/red-ui/src/assets/styles/red-tables.scss b/apps/red-ui/src/assets/styles/red-tables.scss index f0ec2d474..c745443f2 100644 --- a/apps/red-ui/src/assets/styles/red-tables.scss +++ b/apps/red-ui/src/assets/styles/red-tables.scss @@ -12,25 +12,6 @@ } } -.table-header { - display: flex; - border-bottom: 1px solid $separator; - - &.no-data:not([synced='true']) { - padding-left: 30px; - } - - redaction-table-col-name:last-of-type { - > div { - padding-right: 13px; - } - } - - &.selection-enabled redaction-table-col-name > div { - padding-left: 10px; - } -} - cdk-virtual-scroll-viewport { height: calc(100vh - 50px - 31px - 111px); overflow-y: hidden !important; diff --git a/apps/red-ui/src/assets/styles/red-text-styles.scss b/apps/red-ui/src/assets/styles/red-text-styles.scss index 6da1afefc..52c509f6a 100644 --- a/apps/red-ui/src/assets/styles/red-text-styles.scss +++ b/apps/red-ui/src/assets/styles/red-text-styles.scss @@ -55,29 +55,6 @@ pre { padding: 0 20px; } -.all-caps-label { - text-transform: uppercase; - opacity: 0.7; - font-size: 11px; - font-weight: 600; - letter-spacing: 0; - line-height: 14px; - transition: opacity 0.2s; - - &.cancel { - cursor: pointer; - - &:hover { - opacity: 1; - } - - &.disabled { - opacity: 0.3; - cursor: default; - } - } -} - .small-label { opacity: 0.7; font-size: 11px;