UI: refactoring widgetActionTypes
This commit is contained in:
		
							parent
							
								
									439c59e289
								
							
						
					
					
						commit
						0d27c18efb
					
				@ -28,6 +28,7 @@ import { Component, ElementRef, forwardRef, Input, OnInit, ViewChild } from '@an
 | 
			
		||||
import {
 | 
			
		||||
  WidgetAction,
 | 
			
		||||
  WidgetActionType,
 | 
			
		||||
  widgetActionTypes,
 | 
			
		||||
  widgetActionTypeTranslationMap,
 | 
			
		||||
  widgetType
 | 
			
		||||
} from '@shared/models/widget.models';
 | 
			
		||||
@ -88,7 +89,7 @@ export class WidgetActionComponent implements ControlValueAccessor, OnInit, Vali
 | 
			
		||||
  @Input()
 | 
			
		||||
  callbacks: WidgetActionCallbacks;
 | 
			
		||||
 | 
			
		||||
  widgetActionTypes = Object.keys(WidgetActionType);
 | 
			
		||||
  widgetActionTypes = widgetActionTypes;
 | 
			
		||||
  widgetActionTypeTranslations = widgetActionTypeTranslationMap;
 | 
			
		||||
  widgetActionType = WidgetActionType;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -553,6 +553,8 @@ export enum WidgetMobileActionType {
 | 
			
		||||
  takeScreenshot = 'takeScreenshot'
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export const widgetActionTypes = Object.keys(WidgetActionType);
 | 
			
		||||
 | 
			
		||||
export const widgetActionTypeTranslationMap = new Map<WidgetActionType, string>(
 | 
			
		||||
  [
 | 
			
		||||
    [ WidgetActionType.openDashboardState, 'widget-action.open-dashboard-state' ],
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user