[ACA-1115] Quick Share (#492)

* share file

* fix

* fix test dependency

* experimental guard
This commit is contained in:
Cilibiu Bogdan
2018-07-06 12:42:13 +03:00
committed by Denys Vuika
parent e5bc3bb755
commit 3e123bee62
21 changed files with 175 additions and 6 deletions

View File

@@ -31,9 +31,10 @@ import { MinimalNodeEntity, MinimalNodeEntryEntity } from 'alfresco-js-api';
import { takeUntil } from 'rxjs/operators';
import { Subject, Subscription } from 'rxjs/Rx';
import { SnackbarErrorAction, ViewNodeAction, SetSelectedNodesAction } from '../store/actions';
import { appSelection } from '../store/selectors/app.selectors';
import { appSelection, sharedUrl } from '../store/selectors/app.selectors';
import { AppStore } from '../store/states/app.state';
import { SelectionState } from '../store/states/selection.state';
import { Observable } from 'rxjs/Rx';
export abstract class PageComponent implements OnInit, OnDestroy {
@@ -47,6 +48,7 @@ export abstract class PageComponent implements OnInit, OnDestroy {
node: MinimalNodeEntryEntity;
selection: SelectionState;
displayMode = DisplayMode.List;
sharedPreviewUrl$: Observable<string>;
protected subscriptions: Subscription[] = [];
@@ -57,6 +59,8 @@ export abstract class PageComponent implements OnInit, OnDestroy {
constructor(protected store: Store<AppStore>) {}
ngOnInit() {
this.sharedPreviewUrl$ = this.store.select(sharedUrl);
this.store
.select(appSelection)
.pipe(takeUntil(this.onDestroy$))