[AAE-5874] Re-evaluate extension rules when context changes (#2296)

* [AAE-5874] Re-evaluate extension rules when context changes

* [AAE-5874] Add disabled attribute to toolbar actions

* [AAE-5874] Fix unit tests
This commit is contained in:
Pablo Martinez Garcia
2021-09-16 15:48:43 +02:00
committed by GitHub
parent f89833461c
commit fb140531f4
17 changed files with 408 additions and 238 deletions

View File

@@ -27,7 +27,7 @@ import { Component, HostListener, Input, OnChanges, OnDestroy, OnInit } from '@a
import { MinimalNodeEntity, MinimalNodeEntryEntity, SiteEntry } from '@alfresco/js-api';
import { ContentActionRef, SidebarTabRef } from '@alfresco/adf-extensions';
import { Store } from '@ngrx/store';
import { getAppSelection, SetInfoDrawerStateAction, ToggleInfoDrawerAction, infoDrawerPreview } from '@alfresco/aca-shared/store';
import { SetInfoDrawerStateAction, ToggleInfoDrawerAction, infoDrawerPreview } from '@alfresco/aca-shared/store';
import { AppExtensionService } from '../../services/app.extension.service';
import { ContentApiService } from '../../services/content-api.service';
import { takeUntil } from 'rxjs/operators';
@@ -60,11 +60,11 @@ export class InfoDrawerComponent implements OnChanges, OnInit, OnDestroy {
ngOnInit() {
this.tabs = this.extensions.getSidebarTabs();
this.store
.select(getAppSelection)
this.extensions
.getAllowedSidebarActions()
.pipe(takeUntil(this.onDestroy$))
.subscribe(() => {
this.actions = this.extensions.getAllowedSidebarActions();
.subscribe((actions) => {
this.actions = actions;
});
this.store