@media-quest/builder 0.0.35 → 0.0.36

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@media-quest/builder",
3
- "version": "0.0.35",
3
+ "version": "0.0.36",
4
4
  "description": "Builder library for Media-quest schemas",
5
5
  "main": "dist/public-api.js",
6
6
  "types": "dist/public-api.d.js",
@@ -24,6 +24,6 @@
24
24
  "dts": true
25
25
  },
26
26
  "peerDependencies": {
27
- "@media-quest/engine": "0.0.35"
27
+ "@media-quest/engine": "0.0.36"
28
28
  }
29
29
  }
@@ -68,6 +68,7 @@ export class SumScoreVariable extends BuilderObject<
68
68
  /** @internal*/
69
69
  _update(data: { name?: string; description?: string; useAvg?: boolean }) {
70
70
  const d = data ?? {};
71
+
71
72
  if (DUtil.isString(d.name)) {
72
73
  this._name = d.name;
73
74
  }
@@ -13,15 +13,22 @@ namespace BuilderOptionTheme {
13
13
  const BLUE = "#2F5597";
14
14
  const BTN_BORDER_WIDTH = 3;
15
15
  const BTN_BORDER_RADIUS = 10;
16
+ const BTN_HEIGHT = 130;
17
+ const BTN_WIDTH_LONG: DCss.Percent = { _unit: "percent", value: 19 };
18
+ const BTN_WIDTH_SHORT: DCss.Percent = { _unit: "percent", value: 15 };
16
19
  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;
20
+ const FONT_WEIGHT: DStyle["fontWeight"] = 500;
21
+ const FONT_SIZE: DCss.Px["value"] = 36;
22
+ const MAIN_TEXT_FONT_SIZE: DCss.Px = { _unit: "px", value: 36 };
23
+ const MAIN_TEXT_WIDTH: DCss.Percent = { _unit: "percent", value: 80 };
24
+
25
+ const BTN_PADDING_LEFT = 10;
26
+ const BTN_PADDING_TOP = 10;
21
27
 
22
28
  const buttonBaseCss = (): CssTheme => ({
23
29
  css: {
24
30
  fontWeight: FONT_WEIGHT,
31
+
25
32
  fontSize: { _unit: "px", value: FONT_SIZE },
26
33
  letterSpacing: { _unit: "px", value: 2 },
27
34
  paddingLeft: { _unit: "px", value: BTN_PADDING_LEFT },
@@ -30,6 +37,8 @@ namespace BuilderOptionTheme {
30
37
  paddingRight: { _unit: "px", value: BTN_PADDING_LEFT },
31
38
  borderRadius: { _unit: "px", value: BTN_BORDER_RADIUS },
32
39
  borderWidth: { _unit: "px", value: BTN_BORDER_WIDTH },
40
+ width: BTN_WIDTH_LONG,
41
+ height: { _unit: "px", value: BTN_HEIGHT },
33
42
  borderStyle: BTN_BORDER_STYLE,
34
43
  // boxShadow: "3px 3px gray",
35
44
  position: "relative",
@@ -67,6 +76,7 @@ namespace BuilderOptionTheme {
67
76
  backgroundColor: WHITE,
68
77
  borderColor: LIGHT_BLUE,
69
78
  textColor: BLUE,
79
+ width: BTN_WIDTH_SHORT,
70
80
  },
71
81
  cssDisabled,
72
82
  cssEnabled,
@@ -87,9 +97,10 @@ const audioHighTop = 20;
87
97
  const audioLowTop = 55;
88
98
 
89
99
  const textBase: PStyle = {
90
- width: 80,
100
+ width: 76,
101
+ // backgroundColor: "red",
91
102
  top: textHighTop,
92
- left: 10,
103
+ left: 12,
93
104
  textAlign: "center",
94
105
  textColor: "black",
95
106
  fontSize: { _unit: "px", value: 40 },
@@ -162,7 +173,7 @@ export const DefaultTheme: IDefaultTheme = {
162
173
  bottom: 0,
163
174
  left: 0, // h: 10,
164
175
  alignItems: "center",
165
- backgroundColor: "yellow",
176
+ // backgroundColor: "yellow",
166
177
  },
167
178
  whenSingle: { justifyContent: "space-evenly" },
168
179
  whenMany: { justifyContent: "space-evenly" },
@@ -31,7 +31,7 @@ export class DefaultThemeCompiler implements ThemeCompiler<IDefaultTheme> {
31
31
  readonly name = "Ispe default theme.";
32
32
  readonly defaultTheme = DefaultTheme;
33
33
  readonly theme2 = Theme2;
34
- currentTheme = Theme2;
34
+ currentTheme = DefaultTheme;
35
35
  allThemes = [DefaultTheme, Theme2];
36
36
  private readonly TAG = "[ DEFAULT_THEME_COMPILER ]: ";
37
37
 
@@ -118,6 +118,7 @@ export class DefaultThemeCompiler implements ThemeCompiler<IDefaultTheme> {
118
118
  let initialVideoTaskList: Array<PlayVideoTask | DelayTask> = [];
119
119
  const newPage: PageDto = {
120
120
  background: "white",
121
+ pageNumber,
121
122
  elements,
122
123
  id,
123
124
  prefix,
@@ -22,6 +22,7 @@ const Colors = {
22
22
  backgroundWhite: "white",
23
23
  // progressBackGround: "#164AC4",
24
24
  // progressForGround: "#F5F5F5",
25
+
25
26
  // red: "red",
26
27
  // yellow: "yellow",
27
28
  };