import { Action } from '@ngrx/store' ; import { MinimalNodeEntity } from '@alfresco/js-api' ; export enum ViewerActionTypes { ViewFile = 'VIEW_FILE' , ViewNode = 'VIEW_NODE' , ViewNodeVersion = 'VIEW_NODE_VERSION' , FullScreen = 'FULLSCREEN_VIEWER' , ClosePreview = 'CLOSE_PREVIEW' , RefreshPreview = 'REFRESH_PREVIEW' , PluginPreview = 'PLUGIN_PREVIEW' } export interface ViewNodeExtras { location ? : string ; path ? : string ; } export class ViewFileAction implements Action { readonly type = ViewerActionTypes . ViewFile ; constructor ( public payload ? , public parentId ? ) { } } export class ViewNodeAction implements Action { readonly type = ViewerActionTypes . ViewNode ; constructor ( public nodeId , public viewNodeExtras ? ) { } } export class ViewNodeVersionAction implements Action { readonly type = ViewerActionTypes . ViewNodeVersion ; constructor ( public nodeId , public versionId , public viewNodeExtras ? ) { } } export class FullscreenViewerAction implements Action { readonly type = ViewerActionTypes . FullScreen ; constructor ( public payload ) { } } export class ClosePreviewAction implements Action { readonly type = ViewerActionTypes . ClosePreview ; constructor ( public payload ? ) { } } export class RefreshPreviewAction implements Action { readonly type = ViewerActionTypes . RefreshPreview ; constructor ( public payload ? ) { } } export class PluginPreviewAction implements Action { readonly type = ViewerActionTypes . PluginPreview ; constructor ( public pluginRoute , public nodeId ) { } }