mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
improve compatibility (#2256)
* improve compatibility * fix * fix * fix * fix
This commit is contained in:
@@ -2,28 +2,15 @@
|
||||
<mat-progress-bar mode="indeterminate"></mat-progress-bar>
|
||||
</div>
|
||||
<ng-container *ngIf="!isLoading && !!displayNode">
|
||||
<adf-info-drawer
|
||||
[title]="'APP.INFO_DRAWER.TITLE'"
|
||||
cdkTrapFocus
|
||||
cdkTrapFocusAutoCapture
|
||||
>
|
||||
<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>
|
||||
|
||||
<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>
|
||||
<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>
|
||||
</adf-info-drawer-tab>
|
||||
</adf-info-drawer>
|
||||
</ng-container>
|
||||
|
@@ -1,28 +1,19 @@
|
||||
<ng-container [ngSwitch]="actionRef.type">
|
||||
<ng-container *ngSwitchCase="'default'">
|
||||
<app-toolbar-button [type]="type" [actionRef]="actionRef" [color]="color">
|
||||
</app-toolbar-button>
|
||||
<app-toolbar-button [type]="type" [actionRef]="actionRef" [color]="color"> </app-toolbar-button>
|
||||
</ng-container>
|
||||
|
||||
<ng-container *ngSwitchCase="'button'">
|
||||
<app-toolbar-button [type]="type" [actionRef]="actionRef" [color]="color">
|
||||
</app-toolbar-button>
|
||||
<app-toolbar-button [type]="type" [actionRef]="actionRef" [color]="color"> </app-toolbar-button>
|
||||
</ng-container>
|
||||
|
||||
<adf-toolbar-divider
|
||||
*ngSwitchCase="'separator'"
|
||||
[id]="actionRef.id"
|
||||
></adf-toolbar-divider>
|
||||
<adf-toolbar-divider *ngSwitchCase="'separator'" [id]="actionRef.id"></adf-toolbar-divider>
|
||||
|
||||
<ng-container *ngSwitchCase="'menu'">
|
||||
<app-toolbar-menu [actionRef]="actionRef" [color]="color">
|
||||
</app-toolbar-menu>
|
||||
<app-toolbar-menu [actionRef]="actionRef" [color]="color"> </app-toolbar-menu>
|
||||
</ng-container>
|
||||
|
||||
<ng-container *ngSwitchCase="'custom'">
|
||||
<adf-dynamic-component
|
||||
[data]="actionRef.data"
|
||||
[id]="actionRef.component"
|
||||
></adf-dynamic-component>
|
||||
<adf-dynamic-component [data]="actionRef.data" [id]="actionRef.component"></adf-dynamic-component>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
|
@@ -58,28 +58,62 @@ import { map } from 'rxjs/operators';
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class ContentApiService {
|
||||
private nodesApi: NodesApi;
|
||||
private trashcanApi: TrashcanApi;
|
||||
private sharedLinksApi: SharedlinksApi;
|
||||
private discoveryApi: DiscoveryApi;
|
||||
private favoritesApi: FavoritesApi;
|
||||
private contentApi: ContentApi;
|
||||
private sitesApi: SitesApi;
|
||||
private searchApi: SearchApi;
|
||||
private peopleApi: PeopleApi;
|
||||
|
||||
constructor(private api: AlfrescoApiService, private preferences: UserPreferencesService) {
|
||||
this.nodesApi = new NodesApi(this.api.getInstance());
|
||||
this.trashcanApi = new TrashcanApi(this.api.getInstance());
|
||||
this.sharedLinksApi = new SharedlinksApi(this.api.getInstance());
|
||||
this.discoveryApi = new DiscoveryApi(this.api.getInstance());
|
||||
this.favoritesApi = new FavoritesApi(this.api.getInstance());
|
||||
this.contentApi = new ContentApi(this.api.getInstance());
|
||||
this.sitesApi = new SitesApi(this.api.getInstance());
|
||||
this.searchApi = new SearchApi(this.api.getInstance());
|
||||
this.peopleApi = new PeopleApi(this.api.getInstance());
|
||||
_nodesApi: NodesApi;
|
||||
get nodesApi(): NodesApi {
|
||||
this._nodesApi = this._nodesApi ?? new NodesApi(this.api.getInstance());
|
||||
return this._nodesApi;
|
||||
}
|
||||
|
||||
_trashcanApi: TrashcanApi;
|
||||
get trashcanApi(): TrashcanApi {
|
||||
this._trashcanApi = this._trashcanApi ?? new TrashcanApi(this.api.getInstance());
|
||||
return this._trashcanApi;
|
||||
}
|
||||
|
||||
_sharedLinksApi: SharedlinksApi;
|
||||
get sharedLinksApi(): SharedlinksApi {
|
||||
this._sharedLinksApi = this._sharedLinksApi ?? new SharedlinksApi(this.api.getInstance());
|
||||
return this._sharedLinksApi;
|
||||
}
|
||||
|
||||
_discoveryApi: DiscoveryApi;
|
||||
get discoveryApi(): DiscoveryApi {
|
||||
this._discoveryApi = this._discoveryApi ?? new DiscoveryApi(this.api.getInstance());
|
||||
return this._discoveryApi;
|
||||
}
|
||||
|
||||
_favoritesApi: FavoritesApi;
|
||||
get favoritesApi(): FavoritesApi {
|
||||
this._favoritesApi = this._favoritesApi ?? new FavoritesApi(this.api.getInstance());
|
||||
return this._favoritesApi;
|
||||
}
|
||||
|
||||
_contentApi: ContentApi;
|
||||
get contentApi(): ContentApi {
|
||||
this._contentApi = this._contentApi ?? new ContentApi(this.api.getInstance());
|
||||
return this._contentApi;
|
||||
}
|
||||
|
||||
_sitesApi: SitesApi;
|
||||
get sitesApi(): SitesApi {
|
||||
this._sitesApi = this._sitesApi ?? new SitesApi(this.api.getInstance());
|
||||
return this._sitesApi;
|
||||
}
|
||||
|
||||
_searchApi: SearchApi;
|
||||
get searchApi(): SearchApi {
|
||||
this._searchApi = this._searchApi ?? new SearchApi(this.api.getInstance());
|
||||
return this._searchApi;
|
||||
}
|
||||
|
||||
_peopleApi: PeopleApi;
|
||||
get peopleApi(): PeopleApi {
|
||||
this._peopleApi = this._peopleApi ?? new PeopleApi(this.api.getInstance());
|
||||
return this._peopleApi;
|
||||
}
|
||||
|
||||
constructor(private api: AlfrescoApiService, private preferences: UserPreferencesService) {}
|
||||
|
||||
/**
|
||||
* Moves a node to the trashcan.
|
||||
* @param nodeId ID of the target node
|
||||
|
Reference in New Issue
Block a user