@media-quest/builder 0.0.39 → 0.0.40
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/public-api.d.ts +82 -99
- package/dist/public-api.js +36 -101
- package/dist/public-api.js.map +1 -1
- package/package.json +29 -29
- package/src/{theme → ARKIV}/button-bar/button-text-utils.ts +233 -233
- package/src/{theme → ARKIV}/button-bar/text-utils.spec.ts +105 -105
- package/src/Builder-option.ts +78 -62
- package/src/Builder-question.ts +98 -98
- package/src/Builder-schema.spec.ts +348 -348
- package/src/Builder-schema.ts +308 -306
- package/src/builder-compiler.ts +14 -20
- package/src/code-book/codebook-variable.ts +27 -27
- package/src/code-book/codebook.ts +89 -89
- package/src/media-files.ts +28 -32
- package/src/page/Builder-page-collection.spec.ts +219 -219
- package/src/page/Builder-page-collection.ts +129 -129
- package/src/page/Builder-page.spec.ts +177 -177
- package/src/page/Builder-page.ts +250 -250
- package/src/primitives/ID.ts +135 -135
- package/src/public-api.ts +29 -30
- package/src/rulebuilder/RuleAction.ts +105 -105
- package/src/schema-config.ts +25 -26
- package/src/sum-score/sum-score-variable-collection.spec.ts +68 -68
- package/src/sum-score/sum-score-variable-collection.ts +101 -101
- package/src/sum-score/sum-score-variable.ts +0 -1
- package/src/sum-score/sum-score.ts +166 -167
- package/src/tag/BuilderTag.ts +45 -45
- package/src/tag/Tag-Collection.ts +53 -53
- package/src/theme/Default-theme.ts +173 -188
- package/src/theme/IDefault-theme.ts +125 -125
- package/src/theme/ThemeCompiler.ts +10 -11
- package/src/theme/default-theme-compiler.spec.ts +31 -31
- package/src/theme/default-theme-compiler.ts +655 -652
- package/src/theme/icon-urls.ts +29 -29
- package/src/theme/icons.ts +117 -117
- package/src/theme/theme-utils.spec.ts +52 -52
- package/src/theme/theme-utils.ts +56 -56
- package/src/theme/theme2.ts +388 -386
- package/tsconfig.json +19 -19
- package/src/Builder-schema-dto.spec.ts +0 -155
- package/src/Builder-schema-dto.ts +0 -86
|
@@ -1,188 +1,173 @@
|
|
|
1
|
-
import { DCss, DStyle, PStyle } from "@media-quest/engine";
|
|
2
|
-
import { IconUrls } from "./icon-urls";
|
|
3
|
-
import { BuilderOptionTheme, IDefaultTheme } from "./IDefault-theme";
|
|
4
|
-
import { CssTheme } from "./css-theme";
|
|
5
|
-
|
|
6
|
-
namespace BuilderOptionTheme {
|
|
7
|
-
const GREEN = "#70AD47";
|
|
8
|
-
const YELLOW = "#FFC000";
|
|
9
|
-
const ORANGE = "#F4902C";
|
|
10
|
-
const RED = "#FF0000";
|
|
11
|
-
const LIGHT_BLUE = "#42719C";
|
|
12
|
-
const WHITE = "#ffffff";
|
|
13
|
-
const BLUE = "#2F5597";
|
|
14
|
-
const BTN_BORDER_WIDTH = 3;
|
|
15
|
-
const BTN_BORDER_RADIUS = 10;
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
const
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
left:
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
};
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
const
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
position: "absolute",
|
|
175
|
-
width: 100,
|
|
176
|
-
height: 15,
|
|
177
|
-
bottom: 0,
|
|
178
|
-
left: 0, // h: 10,
|
|
179
|
-
alignItems: "center",
|
|
180
|
-
// backgroundColor: "yellow",
|
|
181
|
-
},
|
|
182
|
-
whenSingle: { justifyContent: "space-evenly" },
|
|
183
|
-
whenMany: { justifyContent: "space-evenly" },
|
|
184
|
-
},
|
|
185
|
-
nextButtonTheme: BuilderOptionTheme.blueButton(),
|
|
186
|
-
responseButtons: BuilderOptionTheme.blueButton(),
|
|
187
|
-
},
|
|
188
|
-
};
|
|
1
|
+
import { DCss, DStyle, PStyle } from "@media-quest/engine";
|
|
2
|
+
import { IconUrls } from "./icon-urls";
|
|
3
|
+
import { BuilderOptionTheme, IDefaultTheme } from "./IDefault-theme";
|
|
4
|
+
import { CssTheme } from "./css-theme";
|
|
5
|
+
|
|
6
|
+
namespace BuilderOptionTheme {
|
|
7
|
+
const GREEN = "#70AD47";
|
|
8
|
+
const YELLOW = "#FFC000";
|
|
9
|
+
const ORANGE = "#F4902C";
|
|
10
|
+
const RED = "#FF0000";
|
|
11
|
+
const LIGHT_BLUE = "#42719C";
|
|
12
|
+
const WHITE = "#ffffff";
|
|
13
|
+
const BLUE = "#2F5597";
|
|
14
|
+
const BTN_BORDER_WIDTH = 3;
|
|
15
|
+
const BTN_BORDER_RADIUS = 10;
|
|
16
|
+
const BTN_BORDER_STYLE: DStyle["borderStyle"] = "solid";
|
|
17
|
+
const FONT_WEIGHT: DStyle["fontWeight"] = 600;
|
|
18
|
+
const FONT_SIZE: DCss.Px["value"] = 50;
|
|
19
|
+
const BTN_PADDING_LEFT = 40;
|
|
20
|
+
const BTN_PADDING_TOP = 40;
|
|
21
|
+
|
|
22
|
+
const buttonBaseCss = (): CssTheme => ({
|
|
23
|
+
css: {
|
|
24
|
+
fontWeight: FONT_WEIGHT,
|
|
25
|
+
fontSize: { _unit: "px", value: FONT_SIZE },
|
|
26
|
+
letterSpacing: { _unit: "px", value: 2 },
|
|
27
|
+
paddingLeft: { _unit: "px", value: BTN_PADDING_LEFT },
|
|
28
|
+
paddingTop: { _unit: "px", value: BTN_PADDING_TOP },
|
|
29
|
+
paddingBottom: { _unit: "px", value: BTN_PADDING_TOP },
|
|
30
|
+
paddingRight: { _unit: "px", value: BTN_PADDING_LEFT },
|
|
31
|
+
borderRadius: { _unit: "px", value: BTN_BORDER_RADIUS },
|
|
32
|
+
borderWidth: { _unit: "px", value: BTN_BORDER_WIDTH },
|
|
33
|
+
borderStyle: BTN_BORDER_STYLE,
|
|
34
|
+
// boxShadow: "3px 3px gray",
|
|
35
|
+
position: "relative",
|
|
36
|
+
display: "block",
|
|
37
|
+
},
|
|
38
|
+
cssDisabled: { opacity: 0.3, cursor: "not-allowed" },
|
|
39
|
+
cssEnabled: { opacity: 1, cursor: "pointer" },
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
export const blueButton = (): BuilderOptionTheme => {
|
|
43
|
+
const base = buttonBaseCss();
|
|
44
|
+
const { css, cssEnabled, cssDisabled } = base;
|
|
45
|
+
const optionTheme: BuilderOptionTheme = {
|
|
46
|
+
name: "blue-button-theme",
|
|
47
|
+
normal: {
|
|
48
|
+
btn: {
|
|
49
|
+
css: {
|
|
50
|
+
...css,
|
|
51
|
+
backgroundColor: BLUE,
|
|
52
|
+
borderColor: BLUE,
|
|
53
|
+
textColor: WHITE,
|
|
54
|
+
},
|
|
55
|
+
cssDisabled,
|
|
56
|
+
cssEnabled,
|
|
57
|
+
},
|
|
58
|
+
divider: {},
|
|
59
|
+
text1: {},
|
|
60
|
+
text2: {},
|
|
61
|
+
},
|
|
62
|
+
|
|
63
|
+
dontKnow: {
|
|
64
|
+
btn: {
|
|
65
|
+
css: {
|
|
66
|
+
...css,
|
|
67
|
+
backgroundColor: WHITE,
|
|
68
|
+
borderColor: LIGHT_BLUE,
|
|
69
|
+
textColor: BLUE,
|
|
70
|
+
},
|
|
71
|
+
cssDisabled,
|
|
72
|
+
cssEnabled,
|
|
73
|
+
},
|
|
74
|
+
text1: {},
|
|
75
|
+
text2: {},
|
|
76
|
+
divider: {},
|
|
77
|
+
},
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
return optionTheme;
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
const textHighTop = 25;
|
|
85
|
+
const textLowTop = 55;
|
|
86
|
+
const audioHighTop = 20;
|
|
87
|
+
const audioLowTop = 55;
|
|
88
|
+
|
|
89
|
+
const textBase: PStyle = {
|
|
90
|
+
width: 80,
|
|
91
|
+
top: textHighTop,
|
|
92
|
+
left: 10,
|
|
93
|
+
textAlign: "center",
|
|
94
|
+
textColor: "black",
|
|
95
|
+
fontSize: { _unit: "px", value: 40 },
|
|
96
|
+
};
|
|
97
|
+
const textHigh: PStyle = { ...textBase, top: textHighTop };
|
|
98
|
+
const textLow: PStyle = { ...textHigh, top: textLowTop };
|
|
99
|
+
|
|
100
|
+
const audioBase: PStyle = {
|
|
101
|
+
height: 6,
|
|
102
|
+
width: 6,
|
|
103
|
+
left: 4,
|
|
104
|
+
top: audioHighTop,
|
|
105
|
+
cursor: "pointer",
|
|
106
|
+
opacity: 0.8,
|
|
107
|
+
visibility: "visible",
|
|
108
|
+
};
|
|
109
|
+
const audioHigh: PStyle = { ...audioBase, top: audioHighTop };
|
|
110
|
+
const audioLow: PStyle = { ...audioBase, top: audioLowTop };
|
|
111
|
+
|
|
112
|
+
export const DefaultTheme: IDefaultTheme = {
|
|
113
|
+
name: "default-theme",
|
|
114
|
+
schemaBackgroundColor: "white",
|
|
115
|
+
dimensions: { baseHeight: 1300, baseWidth: 1024 },
|
|
116
|
+
videoPlayer: {
|
|
117
|
+
playButton: {
|
|
118
|
+
iconUrl: IconUrls.playCircleRegular,
|
|
119
|
+
css: { w: 5, h: 5, y: 48, x: 4 },
|
|
120
|
+
cssDisabled: { opacity: 0.3, cursor: "not-allowed" },
|
|
121
|
+
cssEnabled: { opacity: 0.8, cursor: "pointer" },
|
|
122
|
+
},
|
|
123
|
+
pauseButton: {
|
|
124
|
+
iconUrl: IconUrls.pauseSvg,
|
|
125
|
+
css: { w: 5, h: 5, y: 48, x: 4 },
|
|
126
|
+
cssDisabled: { opacity: 0.3, cursor: "not-allowed" },
|
|
127
|
+
cssEnabled: { opacity: 0.8, cursor: "pointer" },
|
|
128
|
+
},
|
|
129
|
+
videoElement: { css: { height: 41, top: 3, x: 0 } },
|
|
130
|
+
},
|
|
131
|
+
image: { style: { h: 50, w: 100, x: 0 } },
|
|
132
|
+
mainText: {
|
|
133
|
+
base: {
|
|
134
|
+
text: { ...textBase },
|
|
135
|
+
audio: {
|
|
136
|
+
iconUrl: IconUrls.volumeUpSvg,
|
|
137
|
+
css: { ...audioBase },
|
|
138
|
+
cssDisabled: { opacity: 0.3, cursor: "not-allowed" },
|
|
139
|
+
cssEnabled: { opacity: 0.8, cursor: "pointer" },
|
|
140
|
+
},
|
|
141
|
+
},
|
|
142
|
+
notMediaHasAudio: {
|
|
143
|
+
text: { ...textHigh },
|
|
144
|
+
audio: { ...audioHigh },
|
|
145
|
+
},
|
|
146
|
+
hasMediaNotAudio: {
|
|
147
|
+
text: { ...textHigh },
|
|
148
|
+
},
|
|
149
|
+
notMediaNotAudio: { text: { ...textHigh } },
|
|
150
|
+
hasMediaHasAudio: { text: { ...textLow }, audio: { ...audioLow } },
|
|
151
|
+
},
|
|
152
|
+
|
|
153
|
+
buttonBar: {
|
|
154
|
+
vibrateMs: false,
|
|
155
|
+
container: {
|
|
156
|
+
base: {
|
|
157
|
+
display: "flex",
|
|
158
|
+
justifyContent: "space-evenly",
|
|
159
|
+
position: "absolute",
|
|
160
|
+
width: 100,
|
|
161
|
+
height: 15,
|
|
162
|
+
bottom: 0,
|
|
163
|
+
left: 0, // h: 10,
|
|
164
|
+
alignItems: "center",
|
|
165
|
+
backgroundColor: "yellow",
|
|
166
|
+
},
|
|
167
|
+
whenSingle: { justifyContent: "space-evenly" },
|
|
168
|
+
whenMany: { justifyContent: "space-evenly" },
|
|
169
|
+
},
|
|
170
|
+
nextButtonTheme: BuilderOptionTheme.blueButton(),
|
|
171
|
+
responseButtons: BuilderOptionTheme.blueButton(),
|
|
172
|
+
},
|
|
173
|
+
};
|
|
@@ -1,125 +1,125 @@
|
|
|
1
|
-
import { DStyle } from "@media-quest/engine";
|
|
2
|
-
import type { CssTheme } from "./css-theme";
|
|
3
|
-
|
|
4
|
-
type PStyle = Partial<DStyle>;
|
|
5
|
-
export interface IDefaultTheme {
|
|
6
|
-
name: string;
|
|
7
|
-
schemaBackgroundColor: string;
|
|
8
|
-
dimensions: {
|
|
9
|
-
baseHeight: number;
|
|
10
|
-
baseWidth: number;
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
pageBackGroundImage?: { url: string; style: PStyle };
|
|
14
|
-
|
|
15
|
-
pageBackGround?: { style: PStyle };
|
|
16
|
-
|
|
17
|
-
backGroundArea1?: { style: PStyle };
|
|
18
|
-
|
|
19
|
-
backGroundArea2?: { style: PStyle };
|
|
20
|
-
|
|
21
|
-
backGroundArea3?: { style: PStyle };
|
|
22
|
-
|
|
23
|
-
progressBar?: {
|
|
24
|
-
width: number;
|
|
25
|
-
height: number;
|
|
26
|
-
bottom: number;
|
|
27
|
-
left: number;
|
|
28
|
-
backgroundStyles: PStyle;
|
|
29
|
-
progressStyles: PStyle;
|
|
30
|
-
text?: {
|
|
31
|
-
style: PStyle;
|
|
32
|
-
textType: "percent" | "page-progress";
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
image: { style: PStyle };
|
|
37
|
-
videoPlayer: {
|
|
38
|
-
playButton: {
|
|
39
|
-
iconUrl: string;
|
|
40
|
-
css: PStyle;
|
|
41
|
-
cssDisabled: PStyle;
|
|
42
|
-
cssEnabled: PStyle;
|
|
43
|
-
text?: { text: string; css: PStyle };
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
buttonBar?: PStyle;
|
|
47
|
-
|
|
48
|
-
pauseButton: {
|
|
49
|
-
iconUrl: string;
|
|
50
|
-
css: PStyle;
|
|
51
|
-
cssDisabled: PStyle;
|
|
52
|
-
cssEnabled: PStyle;
|
|
53
|
-
text?: { text: string; css: PStyle };
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
replayButton?: {
|
|
57
|
-
iconUrl: string;
|
|
58
|
-
css: PStyle;
|
|
59
|
-
cssDisabled: PStyle;
|
|
60
|
-
cssEnabled: PStyle;
|
|
61
|
-
text?: { text: string; css: PStyle };
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
muteButton?: {
|
|
65
|
-
iconUrl: string;
|
|
66
|
-
css: PStyle;
|
|
67
|
-
text?: { text: string; css: PStyle };
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
unMuteButton?: {
|
|
71
|
-
iconUrl: string;
|
|
72
|
-
css: PStyle;
|
|
73
|
-
text?: { text: string; css: PStyle };
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
videoElement: {
|
|
77
|
-
css: PStyle;
|
|
78
|
-
};
|
|
79
|
-
};
|
|
80
|
-
mainText: {
|
|
81
|
-
base: {
|
|
82
|
-
text: PStyle;
|
|
83
|
-
audio: { css: PStyle; cssDisabled: PStyle; cssEnabled: PStyle; iconUrl: string };
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
notMediaNotAudio: {
|
|
87
|
-
text: PStyle;
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
hasMediaNotAudio: {
|
|
91
|
-
text: PStyle;
|
|
92
|
-
};
|
|
93
|
-
|
|
94
|
-
hasMediaHasAudio: {
|
|
95
|
-
text: PStyle;
|
|
96
|
-
audio: PStyle;
|
|
97
|
-
};
|
|
98
|
-
|
|
99
|
-
notMediaHasAudio: {
|
|
100
|
-
text: PStyle;
|
|
101
|
-
audio: PStyle;
|
|
102
|
-
};
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
buttonBar: {
|
|
106
|
-
vibrateMs: number | false;
|
|
107
|
-
container: { base: PStyle; whenSingle: PStyle; whenMany: PStyle };
|
|
108
|
-
responseButtons: BuilderOptionTheme;
|
|
109
|
-
nextButtonTheme: BuilderOptionTheme;
|
|
110
|
-
};
|
|
111
|
-
// buttonThemes?: Array<BuilderOptionTheme>;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
interface ButtonTheme {
|
|
115
|
-
btn: CssTheme;
|
|
116
|
-
divider: PStyle;
|
|
117
|
-
text1: PStyle;
|
|
118
|
-
text2: PStyle;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
export interface BuilderOptionTheme {
|
|
122
|
-
name: string;
|
|
123
|
-
normal: ButtonTheme;
|
|
124
|
-
dontKnow: ButtonTheme;
|
|
125
|
-
}
|
|
1
|
+
import { DStyle } from "@media-quest/engine";
|
|
2
|
+
import type { CssTheme } from "./css-theme";
|
|
3
|
+
|
|
4
|
+
type PStyle = Partial<DStyle>;
|
|
5
|
+
export interface IDefaultTheme {
|
|
6
|
+
name: string;
|
|
7
|
+
schemaBackgroundColor: string;
|
|
8
|
+
dimensions: {
|
|
9
|
+
baseHeight: number;
|
|
10
|
+
baseWidth: number;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
pageBackGroundImage?: { url: string; style: PStyle };
|
|
14
|
+
|
|
15
|
+
pageBackGround?: { style: PStyle };
|
|
16
|
+
|
|
17
|
+
backGroundArea1?: { style: PStyle };
|
|
18
|
+
|
|
19
|
+
backGroundArea2?: { style: PStyle };
|
|
20
|
+
|
|
21
|
+
backGroundArea3?: { style: PStyle };
|
|
22
|
+
|
|
23
|
+
progressBar?: {
|
|
24
|
+
width: number;
|
|
25
|
+
height: number;
|
|
26
|
+
bottom: number;
|
|
27
|
+
left: number;
|
|
28
|
+
backgroundStyles: PStyle;
|
|
29
|
+
progressStyles: PStyle;
|
|
30
|
+
text?: {
|
|
31
|
+
style: PStyle;
|
|
32
|
+
textType: "percent" | "page-progress";
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
image: { style: PStyle };
|
|
37
|
+
videoPlayer: {
|
|
38
|
+
playButton: {
|
|
39
|
+
iconUrl: string;
|
|
40
|
+
css: PStyle;
|
|
41
|
+
cssDisabled: PStyle;
|
|
42
|
+
cssEnabled: PStyle;
|
|
43
|
+
text?: { text: string; css: PStyle };
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
buttonBar?: PStyle;
|
|
47
|
+
|
|
48
|
+
pauseButton: {
|
|
49
|
+
iconUrl: string;
|
|
50
|
+
css: PStyle;
|
|
51
|
+
cssDisabled: PStyle;
|
|
52
|
+
cssEnabled: PStyle;
|
|
53
|
+
text?: { text: string; css: PStyle };
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
replayButton?: {
|
|
57
|
+
iconUrl: string;
|
|
58
|
+
css: PStyle;
|
|
59
|
+
cssDisabled: PStyle;
|
|
60
|
+
cssEnabled: PStyle;
|
|
61
|
+
text?: { text: string; css: PStyle };
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
muteButton?: {
|
|
65
|
+
iconUrl: string;
|
|
66
|
+
css: PStyle;
|
|
67
|
+
text?: { text: string; css: PStyle };
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
unMuteButton?: {
|
|
71
|
+
iconUrl: string;
|
|
72
|
+
css: PStyle;
|
|
73
|
+
text?: { text: string; css: PStyle };
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
videoElement: {
|
|
77
|
+
css: PStyle;
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
mainText: {
|
|
81
|
+
base: {
|
|
82
|
+
text: PStyle;
|
|
83
|
+
audio: { css: PStyle; cssDisabled: PStyle; cssEnabled: PStyle; iconUrl: string };
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
notMediaNotAudio: {
|
|
87
|
+
text: PStyle;
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
hasMediaNotAudio: {
|
|
91
|
+
text: PStyle;
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
hasMediaHasAudio: {
|
|
95
|
+
text: PStyle;
|
|
96
|
+
audio: PStyle;
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
notMediaHasAudio: {
|
|
100
|
+
text: PStyle;
|
|
101
|
+
audio: PStyle;
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
buttonBar: {
|
|
106
|
+
vibrateMs: number | false;
|
|
107
|
+
container: { base: PStyle; whenSingle: PStyle; whenMany: PStyle };
|
|
108
|
+
responseButtons: BuilderOptionTheme;
|
|
109
|
+
nextButtonTheme: BuilderOptionTheme;
|
|
110
|
+
};
|
|
111
|
+
// buttonThemes?: Array<BuilderOptionTheme>;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
interface ButtonTheme {
|
|
115
|
+
btn: CssTheme;
|
|
116
|
+
divider: PStyle;
|
|
117
|
+
text1: PStyle;
|
|
118
|
+
text2: PStyle;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export interface BuilderOptionTheme {
|
|
122
|
+
name: string;
|
|
123
|
+
normal: ButtonTheme;
|
|
124
|
+
dontKnow: ButtonTheme;
|
|
125
|
+
}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
1
|
+
import type { BuilderSchemaDto } from "../Builder-schema";
|
|
2
|
+
import { SchemaDto } from "@media-quest/engine";
|
|
3
|
+
|
|
4
|
+
export interface ThemeCompiler<ThemeSchema> {
|
|
5
|
+
currentTheme: ThemeSchema;
|
|
6
|
+
allThemes: ThemeSchema[];
|
|
7
|
+
setTheme(theme: ThemeSchema): void;
|
|
8
|
+
// protected constructor(protected readonly theme: ThemeSchema) {}
|
|
9
|
+
compile(schema: BuilderSchemaDto): SchemaDto;
|
|
10
|
+
}
|