@xibosignage/xibo-layout-renderer 1.0.19 → 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.
- package/dist/src/Modules/Generators/Generators.d.ts +12 -0
- package/dist/src/Modules/SplashScreen/SplashScreen.d.ts +1 -0
- package/dist/src/Types/Layout/Layout.types.d.ts +11 -2
- package/dist/src/Types/Region/Region.types.d.ts +1 -0
- package/dist/src/Types/XLR/XLR.types.d.ts +20 -4
- package/dist/src/Types/XLR/index.d.ts +1 -1
- package/dist/xibo-layout-renderer.cjs.js +456 -346
- package/dist/xibo-layout-renderer.cjs.js.map +1 -1
- package/dist/xibo-layout-renderer.d.ts +37 -7
- package/dist/xibo-layout-renderer.esm.js +456 -346
- package/dist/xibo-layout-renderer.esm.js.map +1 -1
- package/dist/xibo-layout-renderer.js +456 -346
- package/dist/xibo-layout-renderer.min.js +8 -8
- package/dist/xibo-layout-renderer.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -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 {};
|
|
@@ -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
|
-
|
|
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
|
|
40
|
+
layoutId: number;
|
|
34
41
|
scheduleId?: number;
|
|
35
42
|
sw: number | null;
|
|
36
43
|
sh: number | null;
|
|
@@ -74,6 +81,7 @@ export interface ILayout {
|
|
|
74
81
|
xlr: IXlr;
|
|
75
82
|
finishAllRegions(): Promise<void[]>;
|
|
76
83
|
inLoop: boolean;
|
|
84
|
+
removeLayout(): void;
|
|
77
85
|
}
|
|
78
86
|
export declare const initialLayout: ILayout;
|
|
79
87
|
export type GetLayoutParamType = {
|
|
@@ -82,6 +90,7 @@ export type GetLayoutParamType = {
|
|
|
82
90
|
};
|
|
83
91
|
export type GetLayoutType = {
|
|
84
92
|
currentLayoutIndex: number;
|
|
93
|
+
nextLayoutIndex: number;
|
|
85
94
|
inputLayouts: InputLayoutType[];
|
|
86
95
|
current: ILayout | undefined;
|
|
87
96
|
next: ILayout | undefined;
|
|
@@ -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:
|
|
24
|
+
layouts: {
|
|
25
|
+
[key: string]: ILayout;
|
|
26
|
+
};
|
|
17
27
|
currentLayoutIndex: number;
|
|
18
|
-
currentLayoutId: number
|
|
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';
|