Skip to content
Snippets Groups Projects
Commit 4b415bc7 authored by jojohoch's avatar jojohoch
Browse files

[player] Fix the player's executability

- Remove SanitazationService from player
- Extend interface ButtonEvent
parent 2a0859f0
No related branches found
No related tags found
No related merge requests found
...@@ -3,6 +3,7 @@ import { UIElement, UIElementProperties, UIElementType } from 'common/models/ele ...@@ -3,6 +3,7 @@ import { UIElement, UIElementProperties, UIElementType } from 'common/models/ele
import { ButtonComponent } from 'common/components/button/button.component'; import { ButtonComponent } from 'common/components/button/button.component';
import { ElementComponent } from 'common/directives/element-component.directive'; import { ElementComponent } from 'common/directives/element-component.directive';
import { BasicStyles, BorderStyles } from 'common/models/elements/property-group-interfaces'; import { BasicStyles, BorderStyles } from 'common/models/elements/property-group-interfaces';
import { StateVariable } from 'common/models/state-variable';
export class ButtonElement extends UIElement implements ButtonProperties { export class ButtonElement extends UIElement implements ButtonProperties {
type: UIElementType = 'button'; type: UIElementType = 'button';
...@@ -39,8 +40,8 @@ export interface ButtonProperties extends UIElementProperties { ...@@ -39,8 +40,8 @@ export interface ButtonProperties extends UIElementProperties {
export interface ButtonEvent { export interface ButtonEvent {
action: ButtonAction; action: ButtonAction;
param: UnitNavParam | number | string; param: UnitNavParam | number | string | StateVariable
} }
export type ButtonAction = 'unitNav' | 'pageNav' | 'highlightText'; export type ButtonAction = 'unitNav' | 'pageNav' | 'highlightText' | 'stateVariableChange';
export type UnitNavParam = 'previous' | 'next' | 'first' | 'last' | 'end'; export type UnitNavParam = 'previous' | 'next' | 'first' | 'last' | 'end';
...@@ -44,9 +44,7 @@ export class UnitComponent implements OnInit { ...@@ -44,9 +44,7 @@ export class UnitComponent implements OnInit {
this.reset(); this.reset();
if (message.unitDefinition) { if (message.unitDefinition) {
const unitDefinition: Unit = new Unit( const unitDefinition: Unit = new Unit(JSON.parse(message.unitDefinition));
this.sanitizationService.sanitizeUnitDefinition(JSON.parse(message.unitDefinition))
);
LogService.debug('player: unitDefinition', unitDefinition); LogService.debug('player: unitDefinition', unitDefinition);
this.pages = unitDefinition.pages; this.pages = unitDefinition.pages;
this.playerConfig = message.playerConfig || {}; this.playerConfig = message.playerConfig || {};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment