mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
Code cleanup and optimisations (#3383)
* cleanup unused css * remove unused store/reducer blocks * fix typo in toolbar ("tool-bar") * toolbar action: break dependency on adf-core * unified toolbar component * break dependency on adf toolbar module * update e2e * update e2e * update e2e * update e2e * update e2e * fix search results toolbar spacing * cleanup unused app state * cleanup unused code * fix toolbar divider color * fix missing buttons in the info drawer * fix css nesting * fix search results css
This commit is contained in:
@@ -28,9 +28,7 @@
|
||||
</adf-viewer-open-with>
|
||||
|
||||
<adf-viewer-toolbar-actions *ngIf="!simplestMode">
|
||||
<ng-container *ngFor="let action of viewerToolbarActions; trackBy: trackByActionId">
|
||||
<aca-toolbar-action [actionRef]="action"></aca-toolbar-action>
|
||||
</ng-container>
|
||||
<aca-toolbar [items]="viewerToolbarActions"></aca-toolbar>
|
||||
</adf-viewer-toolbar-actions>
|
||||
</adf-alfresco-viewer>
|
||||
</ng-container>
|
||||
|
@@ -83,7 +83,6 @@ export const INITIAL_APP_STATE: AppState = {
|
||||
infoDrawerMetadataAspect: '',
|
||||
showFacetFilter: true,
|
||||
fileUploadingDialog: true,
|
||||
documentDisplayMode: 'list',
|
||||
showLoader: false,
|
||||
repository: {
|
||||
status: {
|
||||
|
@@ -34,7 +34,7 @@ import {
|
||||
ContentApiService,
|
||||
InfoDrawerComponent,
|
||||
ToolbarMenuItemComponent,
|
||||
ToolbarActionComponent
|
||||
ToolbarComponent
|
||||
} from '@alfresco/aca-shared';
|
||||
import { ContentActionRef, ViewerExtensionRef } from '@alfresco/adf-extensions';
|
||||
import { SearchRequest } from '@alfresco/js-api';
|
||||
@@ -44,7 +44,7 @@ import { AlfrescoViewerModule, NodesApiService } from '@alfresco/adf-content-ser
|
||||
|
||||
@Component({
|
||||
standalone: true,
|
||||
imports: [CommonModule, ViewerModule, AlfrescoViewerModule, InfoDrawerComponent, ToolbarMenuItemComponent, ToolbarActionComponent],
|
||||
imports: [CommonModule, ViewerModule, AlfrescoViewerModule, InfoDrawerComponent, ToolbarMenuItemComponent, ToolbarComponent],
|
||||
selector: 'app-preview',
|
||||
templateUrl: './preview.component.html',
|
||||
styleUrls: ['./preview.component.scss'],
|
||||
|
@@ -1,12 +1,7 @@
|
||||
<aca-page-layout>
|
||||
<div class="aca-page-layout-header">
|
||||
<adf-breadcrumb [root]="title" [folderNode]="node" (navigate)="goBack()"> </adf-breadcrumb>
|
||||
|
||||
<adf-toolbar class="adf-toolbar--inline">
|
||||
<ng-container *ngFor="let entry of actions; trackBy: trackByActionId">
|
||||
<aca-toolbar-action [actionRef]="entry"></aca-toolbar-action>
|
||||
</ng-container>
|
||||
</adf-toolbar>
|
||||
<aca-toolbar [items]="actions"></aca-toolbar>
|
||||
</div>
|
||||
|
||||
<div class="aca-page-layout-content">
|
||||
|
@@ -24,11 +24,10 @@
|
||||
|
||||
import { Component, OnInit, ViewEncapsulation, OnDestroy } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { ContentApiService, PageComponent, PageLayoutComponent, ToolbarActionComponent } from '@alfresco/aca-shared';
|
||||
import { ContentApiService, PageComponent, PageLayoutComponent, ToolbarComponent } from '@alfresco/aca-shared';
|
||||
import { NavigateToPreviousPage, SetSelectedNodesAction } from '@alfresco/aca-shared/store';
|
||||
import { Subject } from 'rxjs';
|
||||
import { BreadcrumbModule, PermissionManagerModule } from '@alfresco/adf-content-services';
|
||||
import { ToolbarModule } from '@alfresco/adf-core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
@@ -45,15 +44,14 @@ import { CommentsTabComponent } from '../info-drawer/comments-tab/comments-tab.c
|
||||
TranslateModule,
|
||||
PermissionManagerModule,
|
||||
BreadcrumbModule,
|
||||
ToolbarModule,
|
||||
MatIconModule,
|
||||
MatTabsModule,
|
||||
MatProgressBarModule,
|
||||
MatButtonModule,
|
||||
MetadataTabComponent,
|
||||
CommentsTabComponent,
|
||||
ToolbarActionComponent,
|
||||
PageLayoutComponent
|
||||
PageLayoutComponent,
|
||||
ToolbarComponent
|
||||
],
|
||||
selector: 'app-details-manager',
|
||||
templateUrl: './details.component.html',
|
||||
|
@@ -1,12 +1,7 @@
|
||||
<aca-page-layout>
|
||||
<div class="aca-page-layout-header">
|
||||
<h1 class="aca-page-title">{{ 'APP.BROWSE.LIBRARIES.MENU.FAVORITE_LIBRARIES.TITLE' | translate }}</h1>
|
||||
|
||||
<adf-toolbar class="adf-toolbar--inline">
|
||||
<ng-container *ngFor="let entry of actions; trackBy: trackByActionId">
|
||||
<aca-toolbar-action [actionRef]="entry"></aca-toolbar-action>
|
||||
</ng-container>
|
||||
</adf-toolbar>
|
||||
<aca-toolbar [items]="actions"></aca-toolbar>
|
||||
</div>
|
||||
|
||||
<div class="aca-page-layout-content">
|
||||
@@ -15,7 +10,6 @@
|
||||
#documentList
|
||||
acaDocumentList
|
||||
acaContextActions
|
||||
[display]="documentDisplayMode$ | async"
|
||||
[node]="$any(list)"
|
||||
[loading]="isLoading"
|
||||
[selectionMode]="'single'"
|
||||
|
@@ -31,10 +31,10 @@ import {
|
||||
InfoDrawerComponent,
|
||||
PageComponent,
|
||||
PageLayoutComponent,
|
||||
ToolbarActionComponent
|
||||
ToolbarComponent
|
||||
} from '@alfresco/aca-shared';
|
||||
import { NavigateLibraryAction } from '@alfresco/aca-shared/store';
|
||||
import { DataTableModule, PaginationModule, TemplateModule, ToolbarModule, UserPreferencesService } from '@alfresco/adf-core';
|
||||
import { DataTableModule, PaginationModule, TemplateModule, UserPreferencesService } from '@alfresco/adf-core';
|
||||
import { DocumentListPresetRef, ExtensionsModule } from '@alfresco/adf-extensions';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { DocumentListModule } from '@alfresco/adf-content-services';
|
||||
@@ -45,7 +45,6 @@ import { TranslateModule } from '@ngx-translate/core';
|
||||
standalone: true,
|
||||
imports: [
|
||||
CommonModule,
|
||||
ToolbarModule,
|
||||
DocumentListModule,
|
||||
DocumentListDirective,
|
||||
ContextActionsDirective,
|
||||
@@ -54,9 +53,9 @@ import { TranslateModule } from '@ngx-translate/core';
|
||||
ExtensionsModule,
|
||||
PaginationModule,
|
||||
InfoDrawerComponent,
|
||||
ToolbarActionComponent,
|
||||
PageLayoutComponent,
|
||||
TranslateModule
|
||||
TranslateModule,
|
||||
ToolbarComponent
|
||||
],
|
||||
templateUrl: './favorite-libraries.component.html',
|
||||
encapsulation: ViewEncapsulation.None
|
||||
|
@@ -1,12 +1,7 @@
|
||||
<aca-page-layout>
|
||||
<div class="aca-page-layout-header">
|
||||
<h1 class="aca-page-title">{{ 'APP.BROWSE.FAVORITES.TITLE' | translate }}</h1>
|
||||
|
||||
<adf-toolbar class="adf-toolbar--inline">
|
||||
<ng-container *ngFor="let entry of actions; trackBy: trackByActionId">
|
||||
<aca-toolbar-action [actionRef]="entry"></aca-toolbar-action>
|
||||
</ng-container>
|
||||
</adf-toolbar>
|
||||
<aca-toolbar [items]="actions"></aca-toolbar>
|
||||
</div>
|
||||
|
||||
<div class="aca-page-layout-content">
|
||||
@@ -15,7 +10,6 @@
|
||||
#documentList
|
||||
acaDocumentList
|
||||
acaContextActions
|
||||
[display]="documentDisplayMode$ | async"
|
||||
[currentFolderId]="'-favorites-'"
|
||||
[selectionMode]="'multiple'"
|
||||
[navigate]="false"
|
||||
|
@@ -29,7 +29,7 @@ import {
|
||||
PageComponent,
|
||||
PageLayoutComponent,
|
||||
PaginationDirective,
|
||||
ToolbarActionComponent
|
||||
ToolbarComponent
|
||||
} from '@alfresco/aca-shared';
|
||||
import { MinimalNodeEntity, MinimalNodeEntryEntity, PathElementEntity, PathInfo } from '@alfresco/js-api';
|
||||
import { Component, OnInit, ViewEncapsulation } from '@angular/core';
|
||||
@@ -37,7 +37,7 @@ import { debounceTime, map } from 'rxjs/operators';
|
||||
import { DocumentListPresetRef, ExtensionsModule } from '@alfresco/adf-extensions';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { DocumentListModule } from '@alfresco/adf-content-services';
|
||||
import { DataTableModule, PaginationModule, TemplateModule, ToolbarModule } from '@alfresco/adf-core';
|
||||
import { DataTableModule, PaginationModule, TemplateModule } from '@alfresco/adf-core';
|
||||
import { DocumentListDirective } from '../../directives/document-list.directive';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
@@ -45,7 +45,6 @@ import { TranslateModule } from '@ngx-translate/core';
|
||||
standalone: true,
|
||||
imports: [
|
||||
CommonModule,
|
||||
ToolbarModule,
|
||||
DocumentListModule,
|
||||
DocumentListDirective,
|
||||
ContextActionsDirective,
|
||||
@@ -55,9 +54,9 @@ import { TranslateModule } from '@ngx-translate/core';
|
||||
PaginationModule,
|
||||
PaginationDirective,
|
||||
InfoDrawerComponent,
|
||||
ToolbarActionComponent,
|
||||
PageLayoutComponent,
|
||||
TranslateModule
|
||||
TranslateModule,
|
||||
ToolbarComponent
|
||||
],
|
||||
templateUrl: './favorites.component.html',
|
||||
encapsulation: ViewEncapsulation.None
|
||||
|
@@ -1,12 +1,7 @@
|
||||
<aca-page-layout [hasError]="!isValidPath">
|
||||
<div class="aca-page-layout-header">
|
||||
<adf-breadcrumb [root]="title" [folderNode]="node" [maxItems]="isSmallScreen ? 1 : 0" (navigate)="onBreadcrumbNavigate($event)"> </adf-breadcrumb>
|
||||
|
||||
<adf-toolbar class="adf-toolbar--inline">
|
||||
<ng-container *ngFor="let entry of actions; trackBy: trackByActionId">
|
||||
<aca-toolbar-action [actionRef]="entry"></aca-toolbar-action>
|
||||
</ng-container>
|
||||
</adf-toolbar>
|
||||
<aca-toolbar [items]="actions"></aca-toolbar>
|
||||
</div>
|
||||
|
||||
<div class="aca-page-layout-error">
|
||||
@@ -20,7 +15,6 @@
|
||||
#documentList
|
||||
acaDocumentList
|
||||
acaContextActions
|
||||
[display]="documentDisplayMode$ | async"
|
||||
[selectionMode]="'multiple'"
|
||||
[multiselect]="false"
|
||||
[currentFolderId]="node?.id"
|
||||
|
@@ -22,7 +22,7 @@
|
||||
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { DataTableModule, PaginationModule, ShowHeaderMode, ToolbarModule } from '@alfresco/adf-core';
|
||||
import { DataTableModule, PaginationModule, ShowHeaderMode } from '@alfresco/adf-core';
|
||||
import { Component, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core';
|
||||
import { ActivatedRoute, Params } from '@angular/router';
|
||||
import { MinimalNodeEntity, MinimalNodeEntryEntity, PathElement, PathElementEntity } from '@alfresco/js-api';
|
||||
@@ -35,7 +35,7 @@ import {
|
||||
PageComponent,
|
||||
PageLayoutComponent,
|
||||
PaginationDirective,
|
||||
ToolbarActionComponent
|
||||
ToolbarComponent
|
||||
} from '@alfresco/aca-shared';
|
||||
import { SetCurrentFolderAction, isAdmin, UploadFileVersionAction, showLoaderSelector } from '@alfresco/aca-shared/store';
|
||||
import { debounceTime, takeUntil } from 'rxjs/operators';
|
||||
@@ -52,7 +52,6 @@ import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
||||
CommonModule,
|
||||
TranslateModule,
|
||||
BreadcrumbModule,
|
||||
ToolbarModule,
|
||||
GenericErrorComponent,
|
||||
UploadModule,
|
||||
DocumentListModule,
|
||||
@@ -63,9 +62,9 @@ import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
||||
PaginationModule,
|
||||
MatProgressSpinnerModule,
|
||||
InfoDrawerComponent,
|
||||
ToolbarActionComponent,
|
||||
PaginationDirective,
|
||||
PageLayoutComponent
|
||||
PageLayoutComponent,
|
||||
ToolbarComponent
|
||||
],
|
||||
templateUrl: './files.component.html',
|
||||
encapsulation: ViewEncapsulation.None
|
||||
|
@@ -1,12 +1,7 @@
|
||||
<aca-page-layout>
|
||||
<div class="aca-page-layout-header">
|
||||
<h1 class="aca-page-title">{{ 'APP.BROWSE.LIBRARIES.MENU.MY_LIBRARIES.TITLE' | translate }}</h1>
|
||||
|
||||
<adf-toolbar class="adf-toolbar--inline">
|
||||
<ng-container *ngFor="let entry of actions; trackBy: trackByActionId">
|
||||
<aca-toolbar-action [actionRef]="entry"></aca-toolbar-action>
|
||||
</ng-container>
|
||||
</adf-toolbar>
|
||||
<aca-toolbar [items]="actions"></aca-toolbar>
|
||||
</div>
|
||||
|
||||
<div class="aca-page-layout-content">
|
||||
@@ -15,7 +10,6 @@
|
||||
#documentList
|
||||
acaDocumentList
|
||||
acaContextActions
|
||||
[display]="documentDisplayMode$ | async"
|
||||
[currentFolderId]="'-mysites-'"
|
||||
[selectionMode]="'single'"
|
||||
[navigate]="false"
|
||||
|
@@ -32,12 +32,12 @@ import {
|
||||
PageComponent,
|
||||
PageLayoutComponent,
|
||||
PaginationDirective,
|
||||
ToolbarActionComponent
|
||||
ToolbarComponent
|
||||
} from '@alfresco/aca-shared';
|
||||
import { DocumentListPresetRef, ExtensionsModule } from '@alfresco/adf-extensions';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { DocumentListModule } from '@alfresco/adf-content-services';
|
||||
import { DataTableModule, PaginationModule, TemplateModule, ToolbarModule } from '@alfresco/adf-core';
|
||||
import { DataTableModule, PaginationModule, TemplateModule } from '@alfresco/adf-core';
|
||||
import { DocumentListDirective } from '../../directives/document-list.directive';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
@@ -45,7 +45,6 @@ import { TranslateModule } from '@ngx-translate/core';
|
||||
standalone: true,
|
||||
imports: [
|
||||
CommonModule,
|
||||
ToolbarModule,
|
||||
DocumentListModule,
|
||||
DocumentListDirective,
|
||||
ContextActionsDirective,
|
||||
@@ -55,9 +54,9 @@ import { TranslateModule } from '@ngx-translate/core';
|
||||
PaginationModule,
|
||||
PaginationDirective,
|
||||
InfoDrawerComponent,
|
||||
ToolbarActionComponent,
|
||||
PageLayoutComponent,
|
||||
TranslateModule
|
||||
TranslateModule,
|
||||
ToolbarComponent
|
||||
],
|
||||
templateUrl: './libraries.component.html',
|
||||
encapsulation: ViewEncapsulation.None
|
||||
|
@@ -1,12 +1,7 @@
|
||||
<aca-page-layout>
|
||||
<div class="aca-page-layout-header">
|
||||
<h1 class="aca-page-title">{{ 'APP.BROWSE.RECENT.TITLE' | translate }}</h1>
|
||||
|
||||
<adf-toolbar class="adf-toolbar--inline">
|
||||
<ng-container *ngFor="let entry of actions; trackBy: trackByActionId">
|
||||
<aca-toolbar-action [actionRef]="entry"></aca-toolbar-action>
|
||||
</ng-container>
|
||||
</adf-toolbar>
|
||||
<aca-toolbar [items]="actions"></aca-toolbar>
|
||||
</div>
|
||||
|
||||
<div class="aca-page-layout-content">
|
||||
@@ -15,7 +10,6 @@
|
||||
#documentList
|
||||
acaDocumentList
|
||||
acaContextActions
|
||||
[display]="documentDisplayMode$ | async"
|
||||
[currentFolderId]="'-recent-'"
|
||||
[selectionMode]="'multiple'"
|
||||
[navigate]="false"
|
||||
|
@@ -31,12 +31,12 @@ import {
|
||||
PageComponent,
|
||||
PageLayoutComponent,
|
||||
PaginationDirective,
|
||||
ToolbarActionComponent
|
||||
ToolbarComponent
|
||||
} from '@alfresco/aca-shared';
|
||||
import { DocumentListPresetRef, ExtensionsModule } from '@alfresco/adf-extensions';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { DocumentListModule } from '@alfresco/adf-content-services';
|
||||
import { DataTableModule, PaginationModule, TemplateModule, ToolbarModule } from '@alfresco/adf-core';
|
||||
import { DataTableModule, PaginationModule, TemplateModule } from '@alfresco/adf-core';
|
||||
import { DocumentListDirective } from '../../directives/document-list.directive';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
@@ -44,7 +44,6 @@ import { TranslateModule } from '@ngx-translate/core';
|
||||
standalone: true,
|
||||
imports: [
|
||||
CommonModule,
|
||||
ToolbarModule,
|
||||
DocumentListModule,
|
||||
DocumentListDirective,
|
||||
ContextActionsDirective,
|
||||
@@ -54,9 +53,9 @@ import { TranslateModule } from '@ngx-translate/core';
|
||||
PaginationModule,
|
||||
PaginationDirective,
|
||||
InfoDrawerComponent,
|
||||
ToolbarActionComponent,
|
||||
PageLayoutComponent,
|
||||
TranslateModule
|
||||
TranslateModule,
|
||||
ToolbarComponent
|
||||
],
|
||||
templateUrl: './recent-files.component.html',
|
||||
encapsulation: ViewEncapsulation.None
|
||||
|
@@ -1,12 +1,8 @@
|
||||
<aca-page-layout>
|
||||
<div class="aca-page-layout-header">
|
||||
<aca-search-input></aca-search-input>
|
||||
<div class="adf-toolbar--spacer adf-toolbar-divider"></div>
|
||||
<adf-toolbar class="adf-toolbar--inline">
|
||||
<ng-container *ngFor="let entry of actions; trackBy: trackByActionId">
|
||||
<aca-toolbar-action [actionRef]="entry"></aca-toolbar-action>
|
||||
</ng-container>
|
||||
</adf-toolbar>
|
||||
<div class="aca-search-toolbar-spacer"></div>
|
||||
<aca-toolbar [items]="actions"></aca-toolbar>
|
||||
</div>
|
||||
|
||||
<div class="aca-page-layout-content">
|
||||
|
@@ -1,6 +1,10 @@
|
||||
@import '../../../ui/mixins';
|
||||
|
||||
aca-search-results {
|
||||
.aca-search-toolbar-spacer {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.adf-search-results {
|
||||
@include flex-row;
|
||||
|
||||
|
@@ -35,13 +35,13 @@ import {
|
||||
PageComponent,
|
||||
PageLayoutComponent,
|
||||
PaginationDirective,
|
||||
ToolbarActionComponent
|
||||
ToolbarComponent
|
||||
} from '@alfresco/aca-shared';
|
||||
import { DocumentListPresetRef, ExtensionsModule } from '@alfresco/adf-extensions';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { SearchInputComponent } from '../search-input/search-input.component';
|
||||
import { DataTableModule, PaginationModule, ToolbarModule } from '@alfresco/adf-core';
|
||||
import { DataTableModule, PaginationModule } from '@alfresco/adf-core';
|
||||
import { MatProgressBarModule } from '@angular/material/progress-bar';
|
||||
import { DocumentListModule } from '@alfresco/adf-content-services';
|
||||
import { DocumentListDirective } from '../../../directives/document-list.directive';
|
||||
@@ -52,7 +52,6 @@ import { DocumentListDirective } from '../../../directives/document-list.directi
|
||||
CommonModule,
|
||||
TranslateModule,
|
||||
SearchInputComponent,
|
||||
ToolbarModule,
|
||||
MatProgressBarModule,
|
||||
DocumentListModule,
|
||||
DataTableModule,
|
||||
@@ -61,9 +60,9 @@ import { DocumentListDirective } from '../../../directives/document-list.directi
|
||||
InfoDrawerComponent,
|
||||
ContextActionsDirective,
|
||||
DocumentListDirective,
|
||||
ToolbarActionComponent,
|
||||
PaginationDirective,
|
||||
PageLayoutComponent
|
||||
PageLayoutComponent,
|
||||
ToolbarComponent
|
||||
],
|
||||
selector: 'aca-search-results',
|
||||
templateUrl: './search-libraries-results.component.html',
|
||||
|
@@ -1,12 +1,8 @@
|
||||
<aca-page-layout>
|
||||
<div class="aca-page-layout-header">
|
||||
<aca-search-input></aca-search-input>
|
||||
<div class="adf-toolbar--spacer adf-toolbar-divider"></div>
|
||||
<adf-toolbar class="adf-toolbar--inline">
|
||||
<ng-container *ngFor="let entry of actions; trackBy: trackByActionId">
|
||||
<aca-toolbar-action [actionRef]="entry"></aca-toolbar-action>
|
||||
</ng-container>
|
||||
</adf-toolbar>
|
||||
<div class="aca-search-toolbar-spacer"></div>
|
||||
<aca-toolbar [items]="actions"></aca-toolbar>
|
||||
</div>
|
||||
|
||||
<div class="aca-page-layout-content">
|
||||
|
@@ -1,5 +1,11 @@
|
||||
@import '../../../ui/mixins';
|
||||
|
||||
aca-search-results {
|
||||
.aca-search-toolbar-spacer {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.adf-search-results {
|
||||
@include flex-row;
|
||||
|
||||
|
@@ -35,7 +35,7 @@ import {
|
||||
ShowInfoDrawerPreviewAction,
|
||||
SnackbarErrorAction
|
||||
} from '@alfresco/aca-shared/store';
|
||||
import { DataTableModule, PaginationModule, ToolbarModule, TranslationService, ViewerModule } from '@alfresco/adf-core';
|
||||
import { DataTableModule, PaginationModule, TranslationService, ViewerModule } from '@alfresco/adf-core';
|
||||
import { combineLatest } from 'rxjs';
|
||||
import {
|
||||
ContextActionsDirective,
|
||||
@@ -43,7 +43,7 @@ import {
|
||||
PageComponent,
|
||||
PageLayoutComponent,
|
||||
PaginationDirective,
|
||||
ToolbarActionComponent
|
||||
ToolbarComponent
|
||||
} from '@alfresco/aca-shared';
|
||||
import { SearchSortingDefinition } from '@alfresco/adf-content-services/lib/search/models/search-sorting-definition.interface';
|
||||
import { takeUntil } from 'rxjs/operators';
|
||||
@@ -66,7 +66,6 @@ import { SearchResultsRowComponent } from '../search-results-row/search-results-
|
||||
CommonModule,
|
||||
TranslateModule,
|
||||
SearchInputComponent,
|
||||
ToolbarModule,
|
||||
MatProgressBarModule,
|
||||
SearchModule,
|
||||
MatDividerModule,
|
||||
@@ -85,8 +84,8 @@ import { SearchResultsRowComponent } from '../search-results-row/search-results-
|
||||
SearchResultsRowComponent,
|
||||
PaginationDirective,
|
||||
ViewerModule,
|
||||
ToolbarActionComponent,
|
||||
PageLayoutComponent
|
||||
PageLayoutComponent,
|
||||
ToolbarComponent
|
||||
],
|
||||
selector: 'aca-search-results',
|
||||
templateUrl: './search-results.component.html',
|
||||
|
@@ -1,12 +1,7 @@
|
||||
<aca-page-layout>
|
||||
<div class="aca-page-layout-header">
|
||||
<h1 class="aca-page-title">{{ 'APP.BROWSE.SHARED.TITLE' | translate }}</h1>
|
||||
|
||||
<adf-toolbar class="adf-toolbar--inline">
|
||||
<ng-container *ngFor="let entry of actions; trackBy: trackByActionId">
|
||||
<aca-toolbar-action [actionRef]="entry"></aca-toolbar-action>
|
||||
</ng-container>
|
||||
</adf-toolbar>
|
||||
<aca-toolbar [items]="actions"></aca-toolbar>
|
||||
</div>
|
||||
|
||||
<div class="aca-page-layout-content">
|
||||
@@ -15,7 +10,6 @@
|
||||
#documentList
|
||||
acaDocumentList
|
||||
acaContextActions
|
||||
[display]="documentDisplayMode$ | async"
|
||||
[currentFolderId]="'-sharedlinks-'"
|
||||
[selectionMode]="'multiple'"
|
||||
[sorting]="['modifiedAt', 'desc']"
|
||||
|
@@ -32,12 +32,12 @@ import {
|
||||
PageComponent,
|
||||
PageLayoutComponent,
|
||||
PaginationDirective,
|
||||
ToolbarActionComponent
|
||||
ToolbarComponent
|
||||
} from '@alfresco/aca-shared';
|
||||
import { DocumentListPresetRef, ExtensionsModule } from '@alfresco/adf-extensions';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { DocumentListModule } from '@alfresco/adf-content-services';
|
||||
import { DataTableModule, PaginationModule, TemplateModule, ToolbarModule } from '@alfresco/adf-core';
|
||||
import { DataTableModule, PaginationModule, TemplateModule } from '@alfresco/adf-core';
|
||||
import { DocumentListDirective } from '../../directives/document-list.directive';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
@@ -45,7 +45,6 @@ import { TranslateModule } from '@ngx-translate/core';
|
||||
standalone: true,
|
||||
imports: [
|
||||
CommonModule,
|
||||
ToolbarModule,
|
||||
DocumentListModule,
|
||||
DocumentListDirective,
|
||||
ContextActionsDirective,
|
||||
@@ -55,9 +54,9 @@ import { TranslateModule } from '@ngx-translate/core';
|
||||
PaginationModule,
|
||||
InfoDrawerComponent,
|
||||
PaginationDirective,
|
||||
ToolbarActionComponent,
|
||||
PageLayoutComponent,
|
||||
TranslateModule
|
||||
TranslateModule,
|
||||
ToolbarComponent
|
||||
],
|
||||
templateUrl: './shared-files.component.html',
|
||||
encapsulation: ViewEncapsulation.None
|
||||
|
@@ -1,9 +1,7 @@
|
||||
<ng-container *ngIf="sharedLinkId">
|
||||
<adf-alfresco-viewer [allowPrint]="false" [allowDownload]="false" [allowFullScreen]="false" [sharedLinkId]="sharedLinkId" [allowGoBack]="false">
|
||||
<adf-viewer-toolbar-actions>
|
||||
<ng-container *ngFor="let action of viewerToolbarActions; trackBy: trackByActionId">
|
||||
<aca-toolbar-action [actionRef]="action"></aca-toolbar-action>
|
||||
</ng-container>
|
||||
<aca-toolbar [items]="viewerToolbarActions"></aca-toolbar>
|
||||
</adf-viewer-toolbar-actions>
|
||||
</adf-alfresco-viewer>
|
||||
</ng-container>
|
||||
|
@@ -31,13 +31,13 @@ import { ActivatedRoute } from '@angular/router';
|
||||
import { Store } from '@ngrx/store';
|
||||
import { forkJoin, from, of, Subject } from 'rxjs';
|
||||
import { catchError, mergeMap, takeUntil } from 'rxjs/operators';
|
||||
import { AppExtensionService, AppService, ToolbarActionComponent } from '@alfresco/aca-shared';
|
||||
import { AppExtensionService, AppService, ToolbarComponent } from '@alfresco/aca-shared';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { AlfrescoViewerModule } from '@alfresco/adf-content-services';
|
||||
|
||||
@Component({
|
||||
standalone: true,
|
||||
imports: [CommonModule, ViewerModule, AlfrescoViewerModule, ToolbarActionComponent],
|
||||
imports: [CommonModule, ViewerModule, AlfrescoViewerModule, ToolbarComponent],
|
||||
selector: 'app-shared-link-view',
|
||||
templateUrl: './shared-link-view.component.html',
|
||||
styleUrls: ['shared-link-view.component.scss'],
|
||||
@@ -87,8 +87,4 @@ export class SharedLinkViewComponent implements OnInit, OnDestroy {
|
||||
this.onDestroy$.next(true);
|
||||
this.onDestroy$.complete();
|
||||
}
|
||||
|
||||
trackByActionId(_: number, action: ContentActionRef) {
|
||||
return action.id;
|
||||
}
|
||||
}
|
||||
|
@@ -14,8 +14,6 @@
|
||||
{{ appName$ | async | translate }}
|
||||
</div>
|
||||
|
||||
<ng-container *ngFor="let actionRef of actions; trackBy: trackByActionId">
|
||||
<aca-toolbar-action [actionRef]="actionRef"></aca-toolbar-action>
|
||||
</ng-container>
|
||||
<aca-toolbar [items]="actions"></aca-toolbar>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -22,13 +22,13 @@
|
||||
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Component, EventEmitter, OnDestroy, OnInit, Output, ViewEncapsulation } from '@angular/core';
|
||||
import { Component, EventEmitter, inject, OnDestroy, OnInit, Output, ViewEncapsulation } from '@angular/core';
|
||||
import { Store } from '@ngrx/store';
|
||||
import { Observable, Subject } from 'rxjs';
|
||||
import { Subject } from 'rxjs';
|
||||
import { AppStore, getAppName, getLogoPath } from '@alfresco/aca-shared/store';
|
||||
import { AppConfigService } from '@alfresco/adf-core';
|
||||
import { ContentActionRef } from '@alfresco/adf-extensions';
|
||||
import { AppExtensionService, ToolbarActionComponent } from '@alfresco/aca-shared';
|
||||
import { AppExtensionService, ToolbarComponent } from '@alfresco/aca-shared';
|
||||
import { takeUntil } from 'rxjs/operators';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
@@ -36,7 +36,7 @@ import { RouterModule } from '@angular/router';
|
||||
|
||||
@Component({
|
||||
standalone: true,
|
||||
imports: [CommonModule, TranslateModule, RouterModule, ToolbarActionComponent],
|
||||
imports: [CommonModule, TranslateModule, RouterModule, ToolbarComponent],
|
||||
selector: 'app-sidenav-header',
|
||||
templateUrl: `./sidenav-header.component.html`,
|
||||
encapsulation: ViewEncapsulation.None,
|
||||
@@ -44,21 +44,18 @@ import { RouterModule } from '@angular/router';
|
||||
})
|
||||
export class SidenavHeaderComponent implements OnInit, OnDestroy {
|
||||
private onDestroy$ = new Subject<boolean>();
|
||||
private store = inject<Store<AppStore>>(Store);
|
||||
private appConfigService = inject(AppConfigService);
|
||||
private appExtensions = inject(AppExtensionService);
|
||||
|
||||
appName$: Observable<string>;
|
||||
logo$: Observable<string>;
|
||||
landingPage: string;
|
||||
appName$ = this.store.select(getAppName);
|
||||
logo$ = this.store.select(getLogoPath);
|
||||
landingPage = this.appConfigService.get('landingPage', '/personal-files');
|
||||
actions: Array<ContentActionRef> = [];
|
||||
|
||||
@Output()
|
||||
toggleNavBar = new EventEmitter();
|
||||
|
||||
constructor(public store: Store<AppStore>, private appConfigService: AppConfigService, private appExtensions: AppExtensionService) {
|
||||
this.appName$ = store.select(getAppName);
|
||||
this.logo$ = store.select(getLogoPath);
|
||||
this.landingPage = this.appConfigService.get('landingPage', '/personal-files');
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.appExtensions
|
||||
.getHeaderActions()
|
||||
@@ -72,8 +69,4 @@ export class SidenavHeaderComponent implements OnInit, OnDestroy {
|
||||
this.onDestroy$.next(true);
|
||||
this.onDestroy$.complete();
|
||||
}
|
||||
|
||||
trackByActionId(_: number, action: ContentActionRef) {
|
||||
return action.id;
|
||||
}
|
||||
}
|
||||
|
@@ -1,12 +1,7 @@
|
||||
<aca-page-layout>
|
||||
<div class="aca-page-layout-header">
|
||||
<h1 class="aca-page-title">{{ 'APP.BROWSE.TRASHCAN.TITLE' | translate }}</h1>
|
||||
|
||||
<adf-toolbar class="adf-toolbar--inline">
|
||||
<ng-container *ngFor="let entry of actions; trackBy: trackByActionId">
|
||||
<aca-toolbar-action [actionRef]="entry"></aca-toolbar-action>
|
||||
</ng-container>
|
||||
</adf-toolbar>
|
||||
<aca-toolbar [items]="actions"></aca-toolbar>
|
||||
</div>
|
||||
|
||||
<div class="aca-page-layout-content">
|
||||
@@ -15,7 +10,6 @@
|
||||
#documentList
|
||||
acaDocumentList
|
||||
acaContextActions
|
||||
[display]="documentDisplayMode$ | async"
|
||||
[currentFolderId]="'-trashcan-'"
|
||||
[selectionMode]="'multiple'"
|
||||
[multiselect]="false"
|
||||
|
@@ -25,11 +25,11 @@
|
||||
import { getUserProfile } from '@alfresco/aca-shared/store';
|
||||
import { DocumentListPresetRef, ExtensionsModule } from '@alfresco/adf-extensions';
|
||||
import { Component, OnInit, ViewEncapsulation } from '@angular/core';
|
||||
import { ContextActionsDirective, PageComponent, PageLayoutComponent, PaginationDirective, ToolbarActionComponent } from '@alfresco/aca-shared';
|
||||
import { ContextActionsDirective, PageComponent, PageLayoutComponent, PaginationDirective, ToolbarComponent } from '@alfresco/aca-shared';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { DocumentListModule } from '@alfresco/adf-content-services';
|
||||
import { DataTableModule, PaginationModule, TemplateModule, ToolbarModule } from '@alfresco/adf-core';
|
||||
import { DataTableModule, PaginationModule, TemplateModule } from '@alfresco/adf-core';
|
||||
import { DocumentListDirective } from '../../directives/document-list.directive';
|
||||
|
||||
@Component({
|
||||
@@ -37,7 +37,6 @@ import { DocumentListDirective } from '../../directives/document-list.directive'
|
||||
imports: [
|
||||
CommonModule,
|
||||
TranslateModule,
|
||||
ToolbarModule,
|
||||
DocumentListModule,
|
||||
TemplateModule,
|
||||
PaginationModule,
|
||||
@@ -46,8 +45,8 @@ import { DocumentListDirective } from '../../directives/document-list.directive'
|
||||
DocumentListDirective,
|
||||
ContextActionsDirective,
|
||||
PaginationDirective,
|
||||
ToolbarActionComponent,
|
||||
PageLayoutComponent
|
||||
PageLayoutComponent,
|
||||
ToolbarComponent
|
||||
],
|
||||
templateUrl: './trashcan.component.html',
|
||||
encapsulation: ViewEncapsulation.None
|
||||
|
@@ -51,7 +51,6 @@ export const INITIAL_APP_STATE: AppState = {
|
||||
infoDrawerMetadataAspect: '',
|
||||
showFacetFilter: true,
|
||||
fileUploadingDialog: true,
|
||||
documentDisplayMode: 'list',
|
||||
showLoader: false,
|
||||
repository: {
|
||||
status: {
|
||||
|
@@ -73,9 +73,6 @@ export function appReducer(state: AppState = INITIAL_APP_STATE, action: Action):
|
||||
case AppActionTypes.SetInfoDrawerMetadataAspect:
|
||||
newState = setInfoDrawerAspect(state, action as SetInfoDrawerMetadataAspectAction);
|
||||
break;
|
||||
case AppActionTypes.ToggleDocumentDisplayMode:
|
||||
newState = toggleDocumentDisplayMode(state);
|
||||
break;
|
||||
case AppActionTypes.SetRepositoryInfo:
|
||||
newState = updateRepositoryStatus(state, action as SetRepositoryInfoAction);
|
||||
break;
|
||||
@@ -173,11 +170,6 @@ function showInfoDrawerPreview(state: AppState) {
|
||||
return newState;
|
||||
}
|
||||
|
||||
const toggleDocumentDisplayMode = (state: AppState) => ({
|
||||
...state,
|
||||
documentDisplayMode: state.documentDisplayMode === 'list' ? 'gallery' : 'list'
|
||||
});
|
||||
|
||||
function updateSelectedNodes(state: AppState, action: SetSelectedNodesAction): AppState {
|
||||
const newState = { ...state };
|
||||
const nodes = [...action.payload];
|
||||
|
@@ -2,7 +2,6 @@
|
||||
@use '@angular/material' as mat;
|
||||
@import 'mixins';
|
||||
@import 'theme';
|
||||
@import 'variables/font-family';
|
||||
|
||||
$foreground: map-get($custom-theme, foreground);
|
||||
|
||||
@@ -11,7 +10,7 @@ body {
|
||||
@include flex-column;
|
||||
|
||||
font-size: 14px;
|
||||
font-family: $default-font-family;
|
||||
font-family: 'Open Sans', serif;
|
||||
color: mat.get-color-from-palette($foreground, text, 0.87);
|
||||
margin: 0;
|
||||
|
||||
|
@@ -1,14 +0,0 @@
|
||||
/* stylelint-disable scss/no-global-function-names */
|
||||
@function get-custom-background-color($background-color, $theme) {
|
||||
$background: map-get($theme, background);
|
||||
$card: map-get($background, card);
|
||||
$new-card-color: lighten($background-color, 10%);
|
||||
$new-selected-button: lighten($background-color, 5%);
|
||||
$background: map_merge($background, (background: $background-color));
|
||||
$background: map_merge($background, (card: $new-card-color));
|
||||
$background: map_merge($background, (modal: $new-card-color));
|
||||
$background: map_merge($background, (dialog: $new-card-color));
|
||||
$background: map_merge($background, (selected-button: $new-selected-button));
|
||||
|
||||
@return $background;
|
||||
}
|
@@ -1,132 +0,0 @@
|
||||
/* stylelint-disable scss/dollar-variable-pattern */
|
||||
/* stylelint-disable scss/no-global-function-names */
|
||||
/* stylelint-disable value-keyword-case */
|
||||
@use "sass:math";
|
||||
|
||||
@function multiply($fore, $back) {
|
||||
$red: red($back) * red($fore) / 255;
|
||||
$green: green($back) * green($fore) / 255;
|
||||
$blue: blue($back) * blue($fore) / 255;
|
||||
|
||||
@return rgb($red, $green, $blue);
|
||||
}
|
||||
|
||||
@function get-color-luminance($color) {
|
||||
$colors: (
|
||||
'red': red($color),
|
||||
'green': green($color),
|
||||
'blue': blue($color)
|
||||
);
|
||||
|
||||
@each $name, $value in $colors {
|
||||
$adjusted: 0;
|
||||
$value: $value / 255;
|
||||
|
||||
@if $value < 0.0393 {
|
||||
$value: $value / 12.92;
|
||||
} @else {
|
||||
$value: ($value + .055) / 1.055;
|
||||
$value: math.pow($value, 2.4);
|
||||
}
|
||||
|
||||
$colors: map-merge($colors, ($name: $value));
|
||||
}
|
||||
|
||||
@return (map-get($colors, 'red') * .2126) + (map-get($colors, 'green') * .7152) + (map-get($colors, 'blue') * .0722);
|
||||
}
|
||||
|
||||
@function create-text-color($color, $color-type: 'primary') {
|
||||
$red: red($color);
|
||||
$green: green($color);
|
||||
$blue: blue($color);
|
||||
$light-text: $light-primary-text;
|
||||
$dark-text: $dark-primary-text;
|
||||
|
||||
@if $color-type == 'accent' {
|
||||
$light-text: $light-secondary-text;
|
||||
$dark-text: $dark-secondary-text;
|
||||
}
|
||||
|
||||
$light-text-luminance: get-color-luminance($light-text);
|
||||
$dark-text-luminance: get-color-luminance($dark-text);
|
||||
$background-color-luminance: get-color-luminance($color);
|
||||
$light-text-luminance: $light-text-luminance + 0.5;
|
||||
$dark-text-luminance: $dark-text-luminance + 0.5;
|
||||
$background-color-luminance: $background-color-luminance + 0.5;
|
||||
$luminance-contrast-for-light-text: $light-text-luminance / $background-color-luminance;
|
||||
$luminance-contrast-for-dark-text: $background-color-luminance / $dark-text-luminance;
|
||||
$text-colour: $light-text;
|
||||
|
||||
@if $luminance-contrast-for-dark-text > $luminance-contrast-for-light-text {
|
||||
$text-colour: $dark-text;
|
||||
}
|
||||
|
||||
@return $text-colour;
|
||||
}
|
||||
|
||||
@function create-color-palette($color, $color-type: 'primary') {
|
||||
$light: #fff;
|
||||
$dark: multiply($color, $color);
|
||||
$color50: mix($light, $color, 88%);
|
||||
$color100: mix($light, $color, 70%);
|
||||
$color200: mix($light, $color, 50%);
|
||||
$color300: mix($light, $color, 30%);
|
||||
$color400: mix($light, $color, 15%);
|
||||
$color500: mix($light, $color, 0%);
|
||||
$color600: mix($dark, $color, 13%);
|
||||
$color700: mix($dark, $color, 30%);
|
||||
$color800: mix($dark, $color, 46%);
|
||||
$color900: mix($dark, $color, 75%);
|
||||
$colorA100: lighten(saturate(mix($dark, $color, 15%), 80%), 45.6%);
|
||||
$colorA200: lighten(saturate(mix($dark, $color, 15%), 80%), 35.6%);
|
||||
$colorA400: lighten(saturate(mix($dark, $color, 15%), 100%), 25.6%);
|
||||
$colorA700: lighten(saturate(mix($dark, $color, 15%), 100%), 20.5%);
|
||||
$contrast50: create-text-color($color50, $color-type);
|
||||
$contrast100: create-text-color($color100, $color-type);
|
||||
$contrast200: create-text-color($color200, $color-type);
|
||||
$contrast300: create-text-color($color300, $color-type);
|
||||
$contrast400: create-text-color($color400, $color-type);
|
||||
$contrast500: create-text-color($color500, $color-type);
|
||||
$contrast600: create-text-color($color600, $color-type);
|
||||
$contrast700: create-text-color($color700, $color-type);
|
||||
$contrast800: create-text-color($color800, $color-type);
|
||||
$contrast900: create-text-color($color900, $color-type);
|
||||
$contrastA100: create-text-color($colorA100, $color-type);
|
||||
$contrastA200: create-text-color($colorA200, $color-type);
|
||||
$contrastA400: create-text-color($colorA400, $color-type);
|
||||
$contrastA700: create-text-color($colorA700, $color-type);
|
||||
$palette: (
|
||||
50: $color50,
|
||||
100: $color50,
|
||||
200: $color50,
|
||||
300: $color50,
|
||||
400: $color400,
|
||||
500: $color500,
|
||||
600: $color600,
|
||||
700: $color700,
|
||||
800: $color800,
|
||||
900: $color900,
|
||||
A100: $colorA100,
|
||||
A200: $colorA200,
|
||||
A400: $colorA400,
|
||||
A700: $colorA700,
|
||||
contrast: (
|
||||
50: $contrast50,
|
||||
100: $contrast100,
|
||||
200: $contrast200,
|
||||
300: $contrast300,
|
||||
400: $contrast400,
|
||||
500: $contrast500,
|
||||
600: $contrast600,
|
||||
700: $contrast700,
|
||||
800: $contrast800,
|
||||
900: $contrast900,
|
||||
A100: $contrastA100,
|
||||
A200: $contrastA200,
|
||||
A400: $contrastA400,
|
||||
A700: $contrastA700
|
||||
)
|
||||
);
|
||||
|
||||
@return $palette;
|
||||
}
|
@@ -1,8 +0,0 @@
|
||||
/* stylelint-disable scss/no-global-function-names */
|
||||
@function get-custom-text-color($text-color, $theme) {
|
||||
$foreground: map-get($custom-theme, foreground);
|
||||
$foreground: map_merge($foreground, (text: $text-color));
|
||||
$foreground: map_merge($foreground, (secondary-text: $text-color));
|
||||
|
||||
@return $foreground;
|
||||
}
|
@@ -1,33 +0,0 @@
|
||||
/* stylelint-disable value-keyword-case */
|
||||
|
||||
@use '@angular/material' as mat;
|
||||
@import '../colors';
|
||||
@import './custom-palette-creator';
|
||||
|
||||
@function get-mat-palettes($primary-color, $accent-color) {
|
||||
$mat-primary-palette: null;
|
||||
|
||||
@if $primary-color {
|
||||
$custom-theme-primary-palette: create-color-palette($primary-color, 'primary');
|
||||
$mat-primary-palette: mat.define-palette($custom-theme-primary-palette, 500);
|
||||
} @else {
|
||||
$mat-primary-palette: mat.define-palette($aca-primary-blue, A100);
|
||||
}
|
||||
|
||||
$mat-accent-palette: null;
|
||||
|
||||
@if $accent-color {
|
||||
$custom-theme-accent-palette: create-color-palette($accent-color, 'accent');
|
||||
$mat-accent-palette: mat.define-palette($custom-theme-accent-palette, 500);
|
||||
} @else {
|
||||
$mat-accent-palette: mat.define-palette($aca-accent-green, A200);
|
||||
}
|
||||
|
||||
$mat-warn-palette: mat.define-palette($aca-warn, A100);
|
||||
|
||||
@return (
|
||||
primary: $mat-primary-palette,
|
||||
accent: $mat-accent-palette,
|
||||
warning: $mat-warn-palette,
|
||||
)
|
||||
}
|
@@ -1,72 +0,0 @@
|
||||
@import '@angular/material/theming';
|
||||
@import './overrides/adf-style-fixes.theme';
|
||||
@import './overrides/adf-pagination.theme';
|
||||
@import './overrides/adf-about.theme.scss';
|
||||
@import "./dynamic-theme/theme-configuration";
|
||||
@import "./dynamic-theme/typography";
|
||||
@import "./dynamic-theme/custom-theme-palettes";
|
||||
@import "./dynamic-theme/custom-background-color";
|
||||
@import "./dynamic-theme/custom-text-color";
|
||||
|
||||
$primary-color: map-get($theme-config, 'primaryColor');
|
||||
$accent-color: map-get($theme-config, 'accentColor');
|
||||
$background-color: map-get($theme-config, 'backgroundColor');
|
||||
$text-color: map-get($theme-config, 'textColor');
|
||||
$base-font-size: map-get($theme-config, 'baseFontSize');
|
||||
$font-family: map-get($theme-config, 'fontFamily');
|
||||
|
||||
$app-typography: get-mat-typography(
|
||||
$base-font-size,
|
||||
$font-family
|
||||
);
|
||||
|
||||
@include mat-core();
|
||||
|
||||
$palettes: get-mat-palettes($primary-color, $accent-color);
|
||||
$custom-theme: mat-light-theme(
|
||||
(
|
||||
color: (
|
||||
primary: map-get($palettes, primary),
|
||||
accent: map-get($palettes, accent),
|
||||
warn: map-get($palettes, warning)
|
||||
),
|
||||
typography: $app-typography
|
||||
)
|
||||
);
|
||||
|
||||
@if $background-color {
|
||||
$custom-background: get-custom-background-color($background-color, $custom-theme);
|
||||
$custom-theme: map_merge($custom-theme, (background: $custom-background));
|
||||
|
||||
$color: map_get($custom-theme, color);
|
||||
$new-color: map_merge($color, (background: $custom-background));
|
||||
$custom-theme: map_merge($custom-theme, (color: $new-color));
|
||||
}
|
||||
|
||||
@if $text-color {
|
||||
$custom-foreground: get-custom-text-color($text-color, $custom-theme);
|
||||
$custom-theme: map_merge($custom-theme, (foreground: $custom-foreground));
|
||||
|
||||
$color: map_get($custom-theme, color);
|
||||
$new-color: map_merge($color, (foreground: $custom-foreground));
|
||||
$custom-theme: map_merge($custom-theme, (color: $new-color));
|
||||
}
|
||||
|
||||
@mixin custom-theme($theme) {
|
||||
@include angular-material-theme($theme);
|
||||
|
||||
@if $base-font-size {
|
||||
@include adf-core-theme($theme, get-custom-adf-font-sizes());
|
||||
@include base-font-size($base-font-size);
|
||||
} @else {
|
||||
@include adf-core-theme($theme);
|
||||
}
|
||||
|
||||
@if $font-family {
|
||||
@include base-font-family($font-family);
|
||||
}
|
||||
|
||||
@include adf-style-fixes($theme);
|
||||
@include adf-pagination-theme($theme);
|
||||
@include adf-about-theme($theme);
|
||||
}
|
@@ -1 +0,0 @@
|
||||
@import '../theme';
|
@@ -1,14 +0,0 @@
|
||||
/*
|
||||
Specify theme parameters e.g.:
|
||||
|
||||
$theme-config: (
|
||||
primaryColor: #5175d2,
|
||||
backgroundColor: #FAFAFA,
|
||||
textColor: #793942,
|
||||
accentColor: #C64F73,
|
||||
baseFontSize: 26px,
|
||||
fontFamily: Cursive
|
||||
);
|
||||
*/
|
||||
|
||||
${THEME_CONFIGURATION}
|
@@ -1,94 +0,0 @@
|
||||
/* stylelint-disable scss/no-global-function-names */
|
||||
@use '@angular/material' as mat;
|
||||
@import '../variables/font-family';
|
||||
|
||||
@function get-mat-typography($base-font-size, $font-family) {
|
||||
$custom-typography: mat.define-typography-config(
|
||||
$font-family: 'Muli, Roboto, "Helvetica Neue", sans-serif',
|
||||
$display-4: mat.define-typography-level(112px, 112px, 300),
|
||||
$display-3: mat.define-typography-level(56px, 56px, 400),
|
||||
$display-2: mat.define-typography-level(45px, 48px, 400),
|
||||
$display-1: mat.define-typography-level(34px, 40px, 400),
|
||||
$headline: mat.define-typography-level(24px, 32px, 400),
|
||||
$title: mat.define-typography-level(20px, 32px, 500),
|
||||
$subheading-2: mat.define-typography-level(16px, 28px, 400),
|
||||
$subheading-1: mat.define-typography-level(15px, 24px, 400),
|
||||
$body-2: mat.define-typography-level(14px, 24px, 500),
|
||||
$body-1: mat.define-typography-level(14px, 20px, 400),
|
||||
$caption: mat.define-typography-level(12px, 20px, 400),
|
||||
$button: mat.define-typography-level(14px, 14px, 500),
|
||||
// Line-height must be unit-less fraction of the font-size.
|
||||
$input: mat.define-typography-level(16px, 1.25, 400)
|
||||
);
|
||||
|
||||
@if $base-font-size {
|
||||
$custom-typography: mat.define-typography-config(
|
||||
$display-4: mat.define-typography-level(8rem, 8rem, 300),
|
||||
$display-3: mat.define-typography-level(4rem, 4rem, 400),
|
||||
$display-2: mat.define-typography-level(3.21rem, 3.21rem, 400),
|
||||
$display-1: mat.define-typography-level(2.42rem, 2.85rem, 400),
|
||||
$headline: mat.define-typography-level(1.71rem, 2.28rem, 400),
|
||||
$title: mat.define-typography-level(1.42rem, 2.28rem, 500),
|
||||
$subheading-2: mat.define-typography-level(1.14rem, 2rem, 400),
|
||||
$subheading-1: mat.define-typography-level(1.07rem, 1.71rem, 400),
|
||||
$body-2: mat.define-typography-level(1rem, 1.71rem, 500),
|
||||
$body-1: mat.define-typography-level(1rem, 1.42rem, 400),
|
||||
$caption: mat.define-typography-level(0.86rem, 1.42rem, 400),
|
||||
$button: mat.define-typography-level(1rem, 1rem, 500),
|
||||
$font-family: $default-font-family,
|
||||
$input: mat.define-typography-level(1.14em, 1.25, 400)
|
||||
);
|
||||
}
|
||||
|
||||
@if $font-family {
|
||||
@each $key, $level in $custom-typography {
|
||||
@if type-of($level) == 'map' {
|
||||
$new-level: map-merge(
|
||||
$level,
|
||||
(
|
||||
font-family: $font-family
|
||||
)
|
||||
);
|
||||
$custom-typography: map-merge(
|
||||
$custom-typography,
|
||||
(
|
||||
$key: $new-level
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
$custom-typography: map-merge(
|
||||
$custom-typography,
|
||||
(
|
||||
font-family: $font-family
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@return $custom-typography;
|
||||
}
|
||||
|
||||
@function get-custom-adf-font-sizes() {
|
||||
@return (
|
||||
'theme-adf-icon-1-font-size': 1.2rem,
|
||||
'theme-adf-picture-1-font-size': 1.28rem,
|
||||
'theme-adf-task-footer-font-size': 1.28rem,
|
||||
'theme-adf-task-title-font-size': 1.28rem,
|
||||
'theme-adf-spacing': 16px
|
||||
);
|
||||
}
|
||||
|
||||
@mixin base-font-size($font-size) {
|
||||
html,
|
||||
body {
|
||||
font-size: $font-size;
|
||||
}
|
||||
}
|
||||
|
||||
@mixin base-font-family($font-family) {
|
||||
html,
|
||||
body {
|
||||
font-family: $font-family;
|
||||
}
|
||||
}
|
@@ -1 +0,0 @@
|
||||
$default-font-family: "Open Sans";
|
@@ -30,9 +30,7 @@
|
||||
</adf-viewer-open-with>
|
||||
|
||||
<adf-viewer-toolbar-actions>
|
||||
<ng-container *ngFor="let action of toolbarActions; trackBy: trackByActionId">
|
||||
<aca-toolbar-action [actionRef]="action"></aca-toolbar-action>
|
||||
</ng-container>
|
||||
<aca-toolbar [items]="toolbarActions"></aca-toolbar>
|
||||
</adf-viewer-toolbar-actions>
|
||||
</adf-alfresco-viewer>
|
||||
</ng-container>
|
||||
|
@@ -27,7 +27,7 @@ import {
|
||||
AppHookService,
|
||||
ContentApiService,
|
||||
InfoDrawerComponent,
|
||||
ToolbarActionComponent,
|
||||
ToolbarComponent,
|
||||
ToolbarMenuItemComponent
|
||||
} from '@alfresco/aca-shared';
|
||||
import {
|
||||
@@ -56,7 +56,7 @@ import { CommonModule } from '@angular/common';
|
||||
|
||||
@Component({
|
||||
standalone: true,
|
||||
imports: [CommonModule, ViewerModule, AlfrescoViewerModule, InfoDrawerComponent, AppConfigModule, ToolbarMenuItemComponent, ToolbarActionComponent],
|
||||
imports: [CommonModule, ViewerModule, AlfrescoViewerModule, InfoDrawerComponent, AppConfigModule, ToolbarMenuItemComponent, ToolbarComponent],
|
||||
selector: 'aca-viewer',
|
||||
templateUrl: './viewer.component.html',
|
||||
styleUrls: ['./viewer.component.scss'],
|
||||
|
@@ -25,7 +25,7 @@
|
||||
import { BaseComponent } from './base.component';
|
||||
import { Page } from '@playwright/test';
|
||||
export class AcaHeader extends BaseComponent {
|
||||
private static rootElement = 'adf-toolbar';
|
||||
private static rootElement = 'aca-toolbar';
|
||||
private moreActionsButton = this.getChild('button[id="app.viewer.toolbar.more"]');
|
||||
public createButton = this.getChild('[id="app.toolbar.create"]');
|
||||
public viewDetails = this.getChild('[title="View Details"]');
|
||||
|
@@ -36,7 +36,6 @@ import {
|
||||
ReloadDocumentListAction,
|
||||
getCurrentFolder,
|
||||
getAppSelection,
|
||||
getDocumentDisplayMode,
|
||||
isInfoDrawerOpened,
|
||||
getSharedUrl,
|
||||
ViewNodeAction,
|
||||
@@ -61,7 +60,6 @@ export abstract class PageComponent implements OnInit, OnDestroy, OnChanges {
|
||||
infoDrawerOpened$: Observable<boolean>;
|
||||
node: MinimalNodeEntryEntity;
|
||||
selection: SelectionState;
|
||||
documentDisplayMode$: Observable<string>;
|
||||
sharedPreviewUrl$: Observable<string>;
|
||||
actions: Array<ContentActionRef> = [];
|
||||
viewerToolbarActions: Array<ContentActionRef> = [];
|
||||
@@ -94,8 +92,6 @@ export abstract class PageComponent implements OnInit, OnDestroy, OnChanges {
|
||||
this.sharedPreviewUrl$ = this.store.select(getSharedUrl);
|
||||
this.infoDrawerOpened$ = this.store.select(isInfoDrawerOpened).pipe(map((infoDrawerState) => !this.isOutletPreviewUrl() && infoDrawerState));
|
||||
|
||||
this.documentDisplayMode$ = this.store.select(getDocumentDisplayMode);
|
||||
|
||||
this.store
|
||||
.select(getAppSelection)
|
||||
.pipe(takeUntil(this.onDestroy$))
|
||||
|
@@ -66,7 +66,6 @@ export const INITIAL_APP_STATE: AppState = {
|
||||
infoDrawerMetadataAspect: '',
|
||||
showFacetFilter: true,
|
||||
fileUploadingDialog: true,
|
||||
documentDisplayMode: 'list',
|
||||
showLoader: false,
|
||||
repository: {
|
||||
status: {
|
||||
|
@@ -3,11 +3,7 @@
|
||||
</div>
|
||||
<ng-container *ngIf="!isLoading && !!displayNode">
|
||||
<adf-info-drawer [title]="'APP.INFO_DRAWER.TITLE'" cdkTrapFocus cdkTrapFocusAutoCapture>
|
||||
<adf-toolbar class="adf-toolbar--inline" info-drawer-buttons>
|
||||
<ng-container *ngFor="let entry of actions; trackBy: trackByActionId">
|
||||
<aca-toolbar-action [actionRef]="entry" [color]="getEntryColor(entry)"></aca-toolbar-action>
|
||||
</ng-container>
|
||||
</adf-toolbar>
|
||||
<aca-toolbar [items]="actions" info-drawer-buttons></aca-toolbar>
|
||||
|
||||
<adf-info-drawer-tab *ngFor="let tab of tabs" [icon]="tab.icon" [label]="tab.title">
|
||||
<adf-dynamic-tab [node]="$any(displayNode)" [id]="tab.component" [attr.data-automation-id]="tab.component"> </adf-dynamic-tab>
|
||||
|
@@ -31,26 +31,16 @@ import { AppExtensionService } from '../../services/app.extension.service';
|
||||
import { ContentApiService } from '../../services/content-api.service';
|
||||
import { takeUntil } from 'rxjs/operators';
|
||||
import { Subject } from 'rxjs';
|
||||
import { ThemePalette } from '@angular/material/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { MatProgressBarModule } from '@angular/material/progress-bar';
|
||||
import { InfoDrawerModule, ToolbarModule } from '@alfresco/adf-core';
|
||||
import { InfoDrawerModule } from '@alfresco/adf-core';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { A11yModule } from '@angular/cdk/a11y';
|
||||
import { ToolbarActionComponent } from '../tool-bar/toolbar-action/toolbar-action.component';
|
||||
import { ToolbarComponent } from '../toolbar/toolbar.component';
|
||||
|
||||
@Component({
|
||||
standalone: true,
|
||||
imports: [
|
||||
CommonModule,
|
||||
TranslateModule,
|
||||
MatProgressBarModule,
|
||||
InfoDrawerModule,
|
||||
ExtensionsModule,
|
||||
ToolbarModule,
|
||||
A11yModule,
|
||||
ToolbarActionComponent
|
||||
],
|
||||
imports: [CommonModule, TranslateModule, MatProgressBarModule, InfoDrawerModule, ExtensionsModule, A11yModule, ToolbarComponent],
|
||||
selector: 'aca-info-drawer',
|
||||
templateUrl: './info-drawer.component.html',
|
||||
encapsulation: ViewEncapsulation.None
|
||||
@@ -114,14 +104,6 @@ export class InfoDrawerComponent implements OnChanges, OnInit, OnDestroy {
|
||||
}
|
||||
}
|
||||
|
||||
trackByActionId(_: number, action: ContentActionRef) {
|
||||
return action.id;
|
||||
}
|
||||
|
||||
getEntryColor(entry: any): ThemePalette {
|
||||
return entry?.color;
|
||||
}
|
||||
|
||||
private close() {
|
||||
this.store.dispatch(new ToggleInfoDrawerAction());
|
||||
}
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<app-toolbar-button [type]="data?.buttonType || type" [actionRef]="actionRef" [color]="color" [data]="actionRef.data"> </app-toolbar-button>
|
||||
</ng-container>
|
||||
|
||||
<adf-toolbar-divider *ngSwitchCase="'separator'" [id]="actionRef.id"></adf-toolbar-divider>
|
||||
<div *ngSwitchCase="'separator'" [id]="actionRef.id" class="aca-toolbar-divider"></div>
|
||||
|
||||
<ng-container *ngSwitchCase="'menu'">
|
||||
<app-toolbar-menu [actionRef]="actionRef" [color]="color" [data]="actionRef.data"></app-toolbar-menu>
|
@@ -27,12 +27,11 @@ import { ContentActionRef, ExtensionsModule } from '@alfresco/adf-extensions';
|
||||
import { ToolbarButtonComponent, ToolbarButtonType } from '../toolbar-button/toolbar-button.component';
|
||||
import { ThemePalette } from '@angular/material/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { ToolbarModule } from '@alfresco/adf-core';
|
||||
import { ToolbarMenuComponent } from '../toolbar-menu/toolbar-menu.component';
|
||||
|
||||
@Component({
|
||||
standalone: true,
|
||||
imports: [CommonModule, ExtensionsModule, ToolbarModule, ToolbarButtonComponent, ToolbarMenuComponent],
|
||||
imports: [CommonModule, ExtensionsModule, ToolbarButtonComponent, ToolbarMenuComponent],
|
||||
selector: 'aca-toolbar-action',
|
||||
templateUrl: './toolbar-action.component.html',
|
||||
styleUrls: ['./toolbar-action.component.scss'],
|
@@ -0,0 +1,5 @@
|
||||
<mat-toolbar>
|
||||
<ng-container *ngFor="let item of items; trackBy: trackByActionId">
|
||||
<aca-toolbar-action [actionRef]="item"></aca-toolbar-action>
|
||||
</ng-container>
|
||||
</mat-toolbar>
|
@@ -0,0 +1,27 @@
|
||||
aca-toolbar {
|
||||
.mat-toolbar {
|
||||
min-height: 48px;
|
||||
color: var(--adf-theme-foreground-text-color-054);
|
||||
background-color: inherit;
|
||||
border: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.mat-toolbar-row {
|
||||
height: 48px;
|
||||
font-size: var(--theme-body-1-font-size);
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.mat-toolbar-single-row {
|
||||
height: 64px;
|
||||
}
|
||||
|
||||
.aca-toolbar-divider {
|
||||
height: 24px;
|
||||
width: 1px;
|
||||
background: var(--adf-theme-foreground-text-color-025);
|
||||
margin-left: 5px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
@@ -0,0 +1,45 @@
|
||||
/*!
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Alfresco Example Content Application
|
||||
*
|
||||
* This file is part of the Alfresco Example Content Application.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Component, Input, ViewEncapsulation } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { ContentActionRef } from '@alfresco/adf-extensions';
|
||||
import { ToolbarActionComponent } from './toolbar-action/toolbar-action.component';
|
||||
import { MatToolbarModule } from '@angular/material/toolbar';
|
||||
|
||||
@Component({
|
||||
selector: 'aca-toolbar',
|
||||
standalone: true,
|
||||
imports: [CommonModule, ToolbarActionComponent, MatToolbarModule],
|
||||
templateUrl: './toolbar.component.html',
|
||||
styleUrls: ['./toolbar.component.scss'],
|
||||
encapsulation: ViewEncapsulation.None
|
||||
})
|
||||
export class ToolbarComponent {
|
||||
@Input() items: ContentActionRef[];
|
||||
|
||||
trackByActionId(_: number, action: ContentActionRef) {
|
||||
return action.id;
|
||||
}
|
||||
}
|
@@ -26,10 +26,10 @@ import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { CoreModule } from '@alfresco/adf-core';
|
||||
import { ExtensionsModule } from '@alfresco/adf-extensions';
|
||||
import { ToolbarButtonComponent } from '../components/tool-bar/toolbar-button/toolbar-button.component';
|
||||
import { ToolbarActionComponent } from '../components/tool-bar/toolbar-action/toolbar-action.component';
|
||||
import { ToolbarMenuItemComponent } from '../components/tool-bar/toolbar-menu-item/toolbar-menu-item.component';
|
||||
import { ToolbarMenuComponent } from '../components/tool-bar/toolbar-menu/toolbar-menu.component';
|
||||
import { ToolbarButtonComponent } from '../components/toolbar/toolbar-button/toolbar-button.component';
|
||||
import { ToolbarActionComponent } from '../components/toolbar/toolbar-action/toolbar-action.component';
|
||||
import { ToolbarMenuItemComponent } from '../components/toolbar/toolbar-menu-item/toolbar-menu-item.component';
|
||||
import { ToolbarMenuComponent } from '../components/toolbar/toolbar-menu/toolbar-menu.component';
|
||||
|
||||
// @deprecated
|
||||
@NgModule({
|
||||
|
@@ -64,7 +64,6 @@ export const initialState = {
|
||||
infoDrawerOpened: false,
|
||||
infoDrawerMetadataAspect: '',
|
||||
showFacetFilter: true,
|
||||
documentDisplayMode: 'list',
|
||||
repository: {
|
||||
status: {
|
||||
isQuickShareEnabled: true
|
||||
|
@@ -30,10 +30,11 @@ export * from './lib/components/page-layout/page-layout.component';
|
||||
export * from './lib/components/page-layout/page-layout.module';
|
||||
export * from './lib/components/locked-by/locked-by.component';
|
||||
export * from './lib/components/generic-error/generic-error.component';
|
||||
export * from './lib/components/tool-bar/toolbar-action/toolbar-action.component';
|
||||
export * from './lib/components/tool-bar/toolbar-button/toolbar-button.component';
|
||||
export * from './lib/components/tool-bar/toolbar-menu/toolbar-menu.component';
|
||||
export * from './lib/components/tool-bar/toolbar-menu-item/toolbar-menu-item.component';
|
||||
export * from './lib/components/toolbar/toolbar.component';
|
||||
export * from './lib/components/toolbar/toolbar-action/toolbar-action.component';
|
||||
export * from './lib/components/toolbar/toolbar-button/toolbar-button.component';
|
||||
export * from './lib/components/toolbar/toolbar-menu/toolbar-menu.component';
|
||||
export * from './lib/components/toolbar/toolbar-menu-item/toolbar-menu-item.component';
|
||||
export * from './lib/components/info-drawer/info-drawer.component';
|
||||
export * from './lib/components/document-base-page/document-base-page.component';
|
||||
export * from './lib/components/document-base-page/document-base-page.service';
|
||||
|
@@ -23,7 +23,6 @@
|
||||
*/
|
||||
|
||||
export enum AppActionTypes {
|
||||
SetSettingsParameter = 'SET_SETTINGS_PARAMETER',
|
||||
SetInitialState = 'SET_INITIAL_STATE',
|
||||
SetCurrentFolder = 'SET_CURRENT_FOLDER',
|
||||
SetCurrentVersion = 'SET_CURRENT_VERSION',
|
||||
@@ -31,7 +30,6 @@ export enum AppActionTypes {
|
||||
SetUserProfile = 'SET_USER_PROFILE',
|
||||
SetRepositoryInfo = 'SET_REPOSITORY_INFO',
|
||||
ToggleInfoDrawer = 'TOGGLE_INFO_DRAWER',
|
||||
ToggleDocumentDisplayMode = 'TOGGLE_DOCUMENT_DISPLAY_MODE',
|
||||
Logout = 'LOGOUT',
|
||||
ReloadDocumentList = 'RELOAD_DOCUMENT_LIST',
|
||||
ResetSelection = 'RESET_SELECTION',
|
||||
|
@@ -27,12 +27,6 @@ import { Node, Person, Group, RepositoryInfo, VersionEntry } from '@alfresco/js-
|
||||
import { AppState } from '../states/app.state';
|
||||
import { AppActionTypes } from './app-action-types';
|
||||
|
||||
export class SetSettingsParameterAction implements Action {
|
||||
readonly type = AppActionTypes.SetSettingsParameter;
|
||||
|
||||
constructor(public payload: { name: string; value: any }) {}
|
||||
}
|
||||
|
||||
export class SetInitialStateAction implements Action {
|
||||
readonly type = AppActionTypes.SetInitialState;
|
||||
|
||||
@@ -67,10 +61,6 @@ export class ToggleInfoDrawerAction implements Action {
|
||||
readonly type = AppActionTypes.ToggleInfoDrawer;
|
||||
}
|
||||
|
||||
export class ToggleDocumentDisplayMode implements Action {
|
||||
readonly type = AppActionTypes.ToggleDocumentDisplayMode;
|
||||
}
|
||||
|
||||
export class LogoutAction implements Action {
|
||||
readonly type = AppActionTypes.Logout;
|
||||
}
|
||||
|
@@ -40,7 +40,6 @@ export const getNavigationState = createSelector(selectApp, (state) => state.nav
|
||||
export const isInfoDrawerOpened = createSelector(selectApp, (state) => state.infoDrawerOpened);
|
||||
export const infoDrawerPreview = createSelector(selectApp, (state) => state.infoDrawerPreview);
|
||||
export const showFacetFilter = createSelector(selectApp, (state) => state.showFacetFilter);
|
||||
export const getDocumentDisplayMode = createSelector(selectApp, (state) => state.documentDisplayMode);
|
||||
export const getRepositoryStatus = createSelector(selectApp, (state) => state.repository);
|
||||
export const isQuickShareEnabled = createSelector(getRepositoryStatus, (info) => info.status.isQuickShareEnabled);
|
||||
export const isAdmin = createSelector(selectApp, (state) => state.user.isAdmin);
|
||||
|
@@ -42,7 +42,6 @@ export interface AppState {
|
||||
infoDrawerPreview: boolean;
|
||||
infoDrawerMetadataAspect: string;
|
||||
showFacetFilter: boolean;
|
||||
documentDisplayMode: string;
|
||||
repository: RepositoryInfo;
|
||||
fileUploadingDialog: boolean;
|
||||
showLoader: boolean;
|
||||
|
@@ -29,6 +29,7 @@ import { CommentsTab } from './info-drawer-comments-tab';
|
||||
import { LibraryMetadata } from './info-drawer-metadata-library';
|
||||
import { ContentMetadata } from './info-drawer-metadata-content';
|
||||
import { waitForPresence } from '../../utilities/utils';
|
||||
import { Toolbar } from '../toolbar/toolbar';
|
||||
|
||||
export class InfoDrawer extends Component {
|
||||
commentsTab = new CommentsTab('adf-info-drawer');
|
||||
@@ -43,6 +44,7 @@ export class InfoDrawer extends Component {
|
||||
selectedTab = TestElement.byCss(`.mat-tab-list [aria-selected='true'] div`);
|
||||
expandedDetailsPermissionsTab = TestElement.byText('.acs-details-container .mat-tab-label-content', 'Permissions');
|
||||
previewButton = TestElement.byCss(`button[title='Preview File']`);
|
||||
toolbar = new Toolbar('adf-info-drawer');
|
||||
|
||||
constructor(ancestor?: string) {
|
||||
super('adf-info-drawer', ancestor);
|
||||
@@ -113,9 +115,7 @@ export class InfoDrawer extends Component {
|
||||
try {
|
||||
await BrowserActions.click(this.getTabByTitle('Comments'));
|
||||
await this.commentsTab.waitForCommentsContainer();
|
||||
await Promise.all([
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.commentsTab.component),
|
||||
]);
|
||||
await Promise.all([BrowserVisibility.waitUntilElementIsVisible(this.commentsTab.component)]);
|
||||
} catch (error) {
|
||||
Logger.error('--- info-drawer clickCommentsTab catch error: ', error);
|
||||
}
|
||||
|
@@ -48,7 +48,7 @@ export class Toolbar extends Component {
|
||||
viewerDownloadButton = element(By.css('[id="app.viewer.download"]'));
|
||||
|
||||
constructor(ancestor?: string) {
|
||||
super('.adf-toolbar', ancestor);
|
||||
super('aca-toolbar', ancestor);
|
||||
}
|
||||
|
||||
async isEmpty(): Promise<boolean> {
|
||||
@@ -118,11 +118,6 @@ export class Toolbar extends Component {
|
||||
await BrowserActions.click(this.menu.createFolderAction);
|
||||
}
|
||||
|
||||
async openCreateLibraryDialog(): Promise<void> {
|
||||
await this.openCreateMenu();
|
||||
await BrowserActions.click(this.menu.createLibraryAction);
|
||||
}
|
||||
|
||||
async openCreateFileFromTemplateDialog(): Promise<void> {
|
||||
await this.openCreateMenu();
|
||||
await BrowserActions.click(this.menu.createFileFromTemplateAction);
|
||||
|
@@ -29,7 +29,7 @@ import { Page } from './page';
|
||||
export class BrowsingPage extends Page {
|
||||
header = new Header(this.appRoot);
|
||||
sidenav = new Sidenav(this.appRoot);
|
||||
toolbar = new Toolbar(this.appRoot);
|
||||
toolbar = new Toolbar('.aca-page-layout');
|
||||
breadcrumb = new Breadcrumb(this.appRoot);
|
||||
pageLayoutHeader = new PageLayoutHeader(this.appRoot);
|
||||
dataTable = new DataTable(this.appRoot);
|
||||
|
Reference in New Issue
Block a user