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 {
|
import {
|
||||||
WidgetAction,
|
WidgetAction,
|
||||||
WidgetActionType,
|
WidgetActionType,
|
||||||
|
widgetActionTypes,
|
||||||
widgetActionTypeTranslationMap,
|
widgetActionTypeTranslationMap,
|
||||||
widgetType
|
widgetType
|
||||||
} from '@shared/models/widget.models';
|
} from '@shared/models/widget.models';
|
||||||
@ -88,7 +89,7 @@ export class WidgetActionComponent implements ControlValueAccessor, OnInit, Vali
|
|||||||
@Input()
|
@Input()
|
||||||
callbacks: WidgetActionCallbacks;
|
callbacks: WidgetActionCallbacks;
|
||||||
|
|
||||||
widgetActionTypes = Object.keys(WidgetActionType);
|
widgetActionTypes = widgetActionTypes;
|
||||||
widgetActionTypeTranslations = widgetActionTypeTranslationMap;
|
widgetActionTypeTranslations = widgetActionTypeTranslationMap;
|
||||||
widgetActionType = WidgetActionType;
|
widgetActionType = WidgetActionType;
|
||||||
|
|
||||||
|
|||||||
@ -553,6 +553,8 @@ export enum WidgetMobileActionType {
|
|||||||
takeScreenshot = 'takeScreenshot'
|
takeScreenshot = 'takeScreenshot'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const widgetActionTypes = Object.keys(WidgetActionType);
|
||||||
|
|
||||||
export const widgetActionTypeTranslationMap = new Map<WidgetActionType, string>(
|
export const widgetActionTypeTranslationMap = new Map<WidgetActionType, string>(
|
||||||
[
|
[
|
||||||
[ WidgetActionType.openDashboardState, 'widget-action.open-dashboard-state' ],
|
[ WidgetActionType.openDashboardState, 'widget-action.open-dashboard-state' ],
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user