@media-quest/builder 0.0.38 → 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.
Files changed (41) hide show
  1. package/dist/public-api.d.ts +82 -99
  2. package/dist/public-api.js +36 -101
  3. package/dist/public-api.js.map +1 -1
  4. package/package.json +29 -29
  5. package/src/{theme → ARKIV}/button-bar/button-text-utils.ts +233 -233
  6. package/src/{theme → ARKIV}/button-bar/text-utils.spec.ts +105 -105
  7. package/src/Builder-option.ts +78 -62
  8. package/src/Builder-question.ts +98 -98
  9. package/src/Builder-schema.spec.ts +348 -348
  10. package/src/Builder-schema.ts +308 -306
  11. package/src/builder-compiler.ts +14 -20
  12. package/src/code-book/codebook-variable.ts +27 -27
  13. package/src/code-book/codebook.ts +89 -89
  14. package/src/media-files.ts +28 -32
  15. package/src/page/Builder-page-collection.spec.ts +219 -219
  16. package/src/page/Builder-page-collection.ts +129 -129
  17. package/src/page/Builder-page.spec.ts +177 -177
  18. package/src/page/Builder-page.ts +250 -250
  19. package/src/primitives/ID.ts +135 -135
  20. package/src/public-api.ts +29 -30
  21. package/src/rulebuilder/RuleAction.ts +105 -105
  22. package/src/schema-config.ts +25 -26
  23. package/src/sum-score/sum-score-variable-collection.spec.ts +68 -68
  24. package/src/sum-score/sum-score-variable-collection.ts +101 -101
  25. package/src/sum-score/sum-score-variable.ts +0 -1
  26. package/src/sum-score/sum-score.ts +166 -167
  27. package/src/tag/BuilderTag.ts +45 -45
  28. package/src/tag/Tag-Collection.ts +53 -53
  29. package/src/theme/Default-theme.ts +173 -188
  30. package/src/theme/IDefault-theme.ts +125 -125
  31. package/src/theme/ThemeCompiler.ts +10 -11
  32. package/src/theme/default-theme-compiler.spec.ts +31 -31
  33. package/src/theme/default-theme-compiler.ts +655 -652
  34. package/src/theme/icon-urls.ts +29 -29
  35. package/src/theme/icons.ts +117 -117
  36. package/src/theme/theme-utils.spec.ts +52 -52
  37. package/src/theme/theme-utils.ts +56 -56
  38. package/src/theme/theme2.ts +388 -386
  39. package/tsconfig.json +19 -19
  40. package/src/Builder-schema-dto.spec.ts +0 -155
  41. package/src/Builder-schema-dto.ts +0 -86
@@ -1,31 +1,31 @@
1
- import { DefaultThemeCompiler } from "./default-theme-compiler";
2
- import { BuilderSchema } from "../Builder-schema";
3
- import { SchemaID } from "../primitives/ID";
4
- import { SchemaPrefix } from "../primitives/schema-prefix";
5
- import { Theme2 } from "./theme2";
6
-
7
- let builder = BuilderSchema.create(
8
- SchemaID.create(),
9
- "test-schema",
10
- SchemaPrefix.fromValueOrThrow("prefix").value,
11
- );
12
-
13
- beforeEach(() => {
14
- builder = BuilderSchema.create(
15
- SchemaID.create(),
16
- "test-schema",
17
- SchemaPrefix.fromValueOrThrow("prefix").value,
18
- );
19
- });
20
- describe("Default Theme compiler works", () => {
21
- test("Dimensions from theme is used.", () => {
22
- const compiler = new DefaultThemeCompiler();
23
- compiler.setTheme(Theme2);
24
- builder.baseHeight = 100;
25
- builder.baseWidth = 100;
26
-
27
- const compiledSchema = compiler.compile(builder.toJson());
28
- expect(compiledSchema.baseHeight).toBe(Theme2.dimensions.baseHeight);
29
- expect(compiledSchema.baseWidth).toBe(Theme2.dimensions.baseWidth);
30
- });
31
- });
1
+ import { DefaultThemeCompiler } from "./default-theme-compiler";
2
+ import { BuilderSchema } from "../Builder-schema";
3
+ import { SchemaID } from "../primitives/ID";
4
+ import { SchemaPrefix } from "../primitives/schema-prefix";
5
+ import { Theme2 } from "./theme2";
6
+
7
+ let builder = BuilderSchema.create(
8
+ SchemaID.create(),
9
+ "test-schema",
10
+ SchemaPrefix.fromValueOrThrow("prefix").value,
11
+ );
12
+
13
+ beforeEach(() => {
14
+ builder = BuilderSchema.create(
15
+ SchemaID.create(),
16
+ "test-schema",
17
+ SchemaPrefix.fromValueOrThrow("prefix").value,
18
+ );
19
+ });
20
+ describe("Default Theme compiler works", () => {
21
+ test("Dimensions from theme is used.", () => {
22
+ const compiler = new DefaultThemeCompiler();
23
+ compiler.setTheme(Theme2);
24
+ builder.baseHeight = 100;
25
+ builder.baseWidth = 100;
26
+
27
+ const compiledSchema = compiler.compile(builder.toJson());
28
+ expect(compiledSchema.baseHeight).toBe(Theme2.dimensions.baseHeight);
29
+ expect(compiledSchema.baseWidth).toBe(Theme2.dimensions.baseWidth);
30
+ });
31
+ });