@xibosignage/xibo-layout-renderer 1.0.18 → 1.0.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -39,4 +39,16 @@ export declare function getAllAttributes(elem: Element): {
39
39
  * @returns JSON string format of date
40
40
  */
41
41
  export declare function setExpiry(numDays: number): string;
42
+ /**
43
+ * Check if given layout exists in the loop using layoutId
44
+ * @param layouts Schedule loop unique layouts (uniqueLayouts)
45
+ * @param layoutId Layout ID of the layout to look for
46
+ *
47
+ * @return boolean
48
+ */
49
+ export declare function isLayoutValid(layouts: {
50
+ [p: string]: InputLayoutType;
51
+ }, layoutId: number | undefined): boolean;
52
+ export declare function hasDefaultOnly(inputLayouts: InputLayoutType[]): boolean;
53
+ export declare function isDefaultLayout(inputLayout: InputLayoutType): boolean;
42
54
  export {};
@@ -7,5 +7,6 @@ export interface ISplashScreen {
7
7
  }
8
8
  export interface PreviewSplashElement extends HTMLDivElement {
9
9
  hide: () => void;
10
+ show: () => void;
10
11
  }
11
12
  export default function SplashScreen($parent: Element | null, config?: OptionsType): ISplashScreen;
@@ -4,8 +4,11 @@ import { ILayoutEvents } from '../../Modules/Layout';
4
4
  import { IXlr } from '../XLR';
5
5
  import InteractiveActions, { Action } from '../../Modules/ActionController';
6
6
  export type InputLayoutType = {
7
- layoutId: number | null;
7
+ response: any;
8
+ layoutId: number;
8
9
  path?: string;
10
+ index?: number;
11
+ id?: number;
9
12
  };
10
13
  export type OptionsType = {
11
14
  xlfUrl: string;
@@ -27,10 +30,14 @@ export type OptionsType = {
27
30
  previewTranslations?: {
28
31
  [k: string]: any;
29
32
  };
33
+ icons?: {
34
+ splashScreen: string;
35
+ logo: string;
36
+ };
30
37
  };
31
38
  export interface ILayout {
32
39
  id: number | null;
33
- layoutId: number | null;
40
+ layoutId: number;
34
41
  scheduleId?: number;
35
42
  sw: number | null;
36
43
  sh: number | null;
@@ -73,6 +80,8 @@ export interface ILayout {
73
80
  enableStat: boolean;
74
81
  xlr: IXlr;
75
82
  finishAllRegions(): Promise<void[]>;
83
+ inLoop: boolean;
84
+ removeLayout(): void;
76
85
  }
77
86
  export declare const initialLayout: ILayout;
78
87
  export type GetLayoutParamType = {
@@ -81,6 +90,7 @@ export type GetLayoutParamType = {
81
90
  };
82
91
  export type GetLayoutType = {
83
92
  currentLayoutIndex: number;
93
+ nextLayoutIndex: number;
84
94
  inputLayouts: InputLayoutType[];
85
95
  current: ILayout | undefined;
86
96
  next: ILayout | undefined;
@@ -47,5 +47,6 @@ export interface IRegion {
47
47
  on<E extends keyof IRegionEvents>(event: E, callback: IRegionEvents[E]): Unsubscribe;
48
48
  prepareMediaObjects(): void;
49
49
  reset(): void;
50
+ html: HTMLDivElement;
50
51
  }
51
52
  export declare const initialRegion: IRegion;
@@ -10,12 +10,22 @@ export declare enum ELayoutType {
10
10
  export type IXlrEvents = {
11
11
  layoutChange: (layoutId: number) => void;
12
12
  };
13
+ export interface IXlrPlayback {
14
+ currentLayout: ILayout | undefined;
15
+ nextLayout: ILayout | undefined;
16
+ currentLayoutIndex: number;
17
+ nextLayoutIndex: number;
18
+ isCurrentLayoutValid: boolean;
19
+ hasDefaultOnly: boolean;
20
+ }
13
21
  export interface IXlr {
14
22
  inputLayouts: InputLayoutType[];
15
23
  config: OptionsType;
16
- layouts: ILayout[];
24
+ layouts: {
25
+ [key: string]: ILayout;
26
+ };
17
27
  currentLayoutIndex: number;
18
- currentLayoutId: number | null;
28
+ currentLayoutId: number;
19
29
  currentLayout: ILayout | undefined;
20
30
  nextLayout: ILayout | undefined;
21
31
  emitter: Emitter<IXlrEvents>;
@@ -23,10 +33,16 @@ export interface IXlr {
23
33
  init(): Promise<IXlr>;
24
34
  playSchedules(xlr: IXlr): void;
25
35
  prepareLayoutXlf(inputLayout: ILayout | undefined): Promise<ILayout>;
26
- prepareLayouts(): Promise<IXlr>;
36
+ prepareLayouts(playback: IXlrPlayback): Promise<IXlr>;
27
37
  updateLayouts(inputLayouts: InputLayoutType[]): void;
28
- updateLoop(inputLayouts: InputLayoutType[]): void;
38
+ updateLoop(inputLayouts: InputLayoutType[]): Promise<void>;
29
39
  gotoPrevLayout(): void;
30
40
  gotoNextLayout(): void;
41
+ uniqueLayouts: {
42
+ [layoutId: string]: InputLayoutType;
43
+ };
44
+ getLayout(inputLayout: InputLayoutType): ILayout | undefined;
45
+ updateScheduleLayouts(scheduleLayouts: InputLayoutType[]): Promise<void>;
46
+ parseLayouts(loopUpdate?: boolean): IXlrPlayback;
31
47
  }
32
48
  export declare const initialXlr: IXlr;
@@ -1 +1 @@
1
- export { ELayoutType, IXlr, initialXlr, } from './XLR.types';
1
+ export { ELayoutType, IXlr, initialXlr, IXlrEvents, PrepareLayoutsType, } from './XLR.types';