@media-quest/builder 0.0.39 → 0.0.41

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 (42) hide show
  1. package/dist/public-api.d.ts +82 -100
  2. package/dist/public-api.js +68 -128
  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 +77 -62
  8. package/src/Builder-question.spec.ts +1 -0
  9. package/src/Builder-question.ts +97 -98
  10. package/src/Builder-schema.spec.ts +348 -348
  11. package/src/Builder-schema.ts +308 -306
  12. package/src/builder-compiler.ts +14 -20
  13. package/src/code-book/codebook-variable.ts +27 -27
  14. package/src/code-book/codebook.ts +89 -89
  15. package/src/media-files.ts +28 -32
  16. package/src/page/Builder-page-collection.spec.ts +224 -219
  17. package/src/page/Builder-page-collection.ts +129 -129
  18. package/src/page/Builder-page.spec.ts +177 -177
  19. package/src/page/Builder-page.ts +250 -250
  20. package/src/primitives/ID.ts +135 -135
  21. package/src/public-api.ts +29 -30
  22. package/src/rulebuilder/RuleAction.ts +105 -105
  23. package/src/schema-config.ts +25 -26
  24. package/src/sum-score/sum-score-variable-collection.spec.ts +68 -68
  25. package/src/sum-score/sum-score-variable-collection.ts +101 -101
  26. package/src/sum-score/sum-score-variable.ts +0 -1
  27. package/src/sum-score/sum-score.ts +166 -167
  28. package/src/tag/BuilderTag.ts +45 -45
  29. package/src/tag/Tag-Collection.ts +53 -53
  30. package/src/theme/Default-theme.ts +173 -188
  31. package/src/theme/IDefault-theme.ts +124 -125
  32. package/src/theme/ThemeCompiler.ts +10 -11
  33. package/src/theme/default-theme-compiler.spec.ts +31 -31
  34. package/src/theme/default-theme-compiler.ts +660 -652
  35. package/src/theme/icon-urls.ts +29 -29
  36. package/src/theme/icons.ts +117 -117
  37. package/src/theme/theme-utils.spec.ts +52 -52
  38. package/src/theme/theme-utils.ts +56 -56
  39. package/src/theme/theme2.ts +399 -386
  40. package/tsconfig.json +19 -19
  41. package/src/Builder-schema-dto.spec.ts +0 -155
  42. package/src/Builder-schema-dto.ts +0 -86
@@ -1,135 +1,135 @@
1
- // The default length of an ID
2
- const ID_LENGTH = 32;
3
-
4
- // The minimum length of an ID
5
- const MIN_LENGTH = 10;
6
-
7
- export type ID<B extends string> = string & { __ID__: B };
8
-
9
- const isID = <const B extends string>(idName: B, id?: string): id is ID<B> => {
10
- if (typeof id !== "string") return false;
11
- return id.length >= MIN_LENGTH;
12
- };
13
-
14
- const createIDByName = <const B extends string>(idName: B): ID<B> => {
15
- const letters = "abcdefghijklmnopqrstuvyz";
16
- const all = letters + letters.toUpperCase();
17
- let result = "";
18
-
19
- for (let i = 0; i < ID_LENGTH; i++) {
20
- const char = all.charAt(Math.floor(Math.random() * all.length));
21
- result += char;
22
- }
23
-
24
- return result as ID<B>;
25
- };
26
- const createDummyID = <const B extends string>(idName: B, letter: string): ID<B> => {
27
- return letter.repeat(ID_LENGTH) as ID<B>;
28
- };
29
- interface Id<T extends string> {
30
- name: T;
31
- is: (id: string) => id is ID<T>;
32
- validateOrCreate: (id: string) => ID<T>;
33
- validateOrThrow: (id: string) => ID<T>;
34
- create: () => ID<T>;
35
- dummy: {
36
- a: ID<T>;
37
- b: ID<T>;
38
- c: ID<T>;
39
- d: ID<T>;
40
- e: ID<T>;
41
- f: ID<T>;
42
- g: ID<T>;
43
- h: ID<T>;
44
- i: ID<T>;
45
- j: ID<T>;
46
- };
47
- }
48
-
49
- /**
50
- * Creates a object with helper functions for a specific ID type
51
- * @param idName
52
- */
53
- export const createTypedIdSingleton = <const B extends string>(idName: B): Id<B> => {
54
- /**
55
- * Creates a new ID of the correct type
56
- */
57
- const create = (): ID<B> => createIDByName(idName);
58
-
59
- /**
60
- * Checks if the id is of the correct type
61
- * @param id
62
- */
63
- const is = (id: string): id is ID<B> => isID(idName, id);
64
-
65
- /**
66
- * Checks if the id is of the correct type, if not it throws an error
67
- * @param id
68
- */
69
- const validateOrThrow = (id: string): ID<B> => {
70
- if (!is(id)) {
71
- throw new Error(`Invalid id: ${id}`);
72
- }
73
- return id;
74
- };
75
-
76
- /**
77
- * The lowercase name of the id (SCHEMA, PAGE, etc)
78
- */
79
- const name: B = idName;
80
-
81
- /**
82
- * Ensures that the id is of the correct type, if not it creates a new one
83
- * @param id
84
- */
85
- const validateOrCreate = (id: string): ID<B> => {
86
- return is(id) ? id : create();
87
- };
88
-
89
- const a = createDummyID(idName, "a");
90
- const b = createDummyID(idName, "b");
91
- const c = createDummyID(idName, "c");
92
- const d = createDummyID(idName, "d");
93
- const e = createDummyID(idName, "e");
94
- const f = createDummyID(idName, "f");
95
- const g = createDummyID(idName, "g");
96
- const h = createDummyID(idName, "h");
97
- const i = createDummyID(idName, "i");
98
- const j = createDummyID(idName, "j");
99
- const list = [a, b, c, d, e, f, g, h, i, j];
100
-
101
- const dummy = {
102
- a,
103
- b,
104
- c,
105
- d,
106
- e,
107
- f,
108
- g,
109
- h,
110
- i,
111
- j,
112
- list,
113
- };
114
-
115
- return Object.freeze({ create, is, validateOrCreate, validateOrThrow, name, dummy });
116
- };
117
-
118
- export type SchemaID = ID<"SCHEMA">;
119
- export const SchemaID = createTypedIdSingleton("SCHEMA");
120
-
121
- export type PageID = ID<"PAGE">;
122
- export const PageID = createTypedIdSingleton("PAGE");
123
-
124
- export type TagID = ID<"TAG">;
125
- export const TagID = createTypedIdSingleton("TAG");
126
- export type OptionID = ID<"OPTION">;
127
- export const OptionID = createTypedIdSingleton("OPTION");
128
-
129
- export type TextID = ID<"TEXT">;
130
- export const TextID = createTypedIdSingleton("TEXT");
131
- export type QuestionID = ID<"QUESTION">;
132
- export const QuestionID = createTypedIdSingleton("QUESTION");
133
-
134
- export type SumScoreVariableID = ID<"SUM_SCORE_VARIABLE">;
135
- export const SumScoreVariableID = createTypedIdSingleton("SUM_SCORE_VARIABLE");
1
+ // The default length of an ID
2
+ const ID_LENGTH = 32;
3
+
4
+ // The minimum length of an ID
5
+ const MIN_LENGTH = 10;
6
+
7
+ export type ID<B extends string> = string & { __ID__: B };
8
+
9
+ const isID = <const B extends string>(idName: B, id?: string): id is ID<B> => {
10
+ if (typeof id !== "string") return false;
11
+ return id.length >= MIN_LENGTH;
12
+ };
13
+
14
+ const createIDByName = <const B extends string>(idName: B): ID<B> => {
15
+ const letters = "abcdefghijklmnopqrstuvyz";
16
+ const all = letters + letters.toUpperCase();
17
+ let result = "";
18
+
19
+ for (let i = 0; i < ID_LENGTH; i++) {
20
+ const char = all.charAt(Math.floor(Math.random() * all.length));
21
+ result += char;
22
+ }
23
+
24
+ return result as ID<B>;
25
+ };
26
+ const createDummyID = <const B extends string>(idName: B, letter: string): ID<B> => {
27
+ return letter.repeat(ID_LENGTH) as ID<B>;
28
+ };
29
+ interface Id<T extends string> {
30
+ name: T;
31
+ is: (id: string) => id is ID<T>;
32
+ validateOrCreate: (id: string) => ID<T>;
33
+ validateOrThrow: (id: string) => ID<T>;
34
+ create: () => ID<T>;
35
+ dummy: {
36
+ a: ID<T>;
37
+ b: ID<T>;
38
+ c: ID<T>;
39
+ d: ID<T>;
40
+ e: ID<T>;
41
+ f: ID<T>;
42
+ g: ID<T>;
43
+ h: ID<T>;
44
+ i: ID<T>;
45
+ j: ID<T>;
46
+ };
47
+ }
48
+
49
+ /**
50
+ * Creates a object with helper functions for a specific ID type
51
+ * @param idName
52
+ */
53
+ export const createTypedIdSingleton = <const B extends string>(idName: B): Id<B> => {
54
+ /**
55
+ * Creates a new ID of the correct type
56
+ */
57
+ const create = (): ID<B> => createIDByName(idName);
58
+
59
+ /**
60
+ * Checks if the id is of the correct type
61
+ * @param id
62
+ */
63
+ const is = (id: string): id is ID<B> => isID(idName, id);
64
+
65
+ /**
66
+ * Checks if the id is of the correct type, if not it throws an error
67
+ * @param id
68
+ */
69
+ const validateOrThrow = (id: string): ID<B> => {
70
+ if (!is(id)) {
71
+ throw new Error(`Invalid id: ${id}`);
72
+ }
73
+ return id;
74
+ };
75
+
76
+ /**
77
+ * The lowercase name of the id (SCHEMA, PAGE, etc)
78
+ */
79
+ const name: B = idName;
80
+
81
+ /**
82
+ * Ensures that the id is of the correct type, if not it creates a new one
83
+ * @param id
84
+ */
85
+ const validateOrCreate = (id: string): ID<B> => {
86
+ return is(id) ? id : create();
87
+ };
88
+
89
+ const a = createDummyID(idName, "a");
90
+ const b = createDummyID(idName, "b");
91
+ const c = createDummyID(idName, "c");
92
+ const d = createDummyID(idName, "d");
93
+ const e = createDummyID(idName, "e");
94
+ const f = createDummyID(idName, "f");
95
+ const g = createDummyID(idName, "g");
96
+ const h = createDummyID(idName, "h");
97
+ const i = createDummyID(idName, "i");
98
+ const j = createDummyID(idName, "j");
99
+ const list = [a, b, c, d, e, f, g, h, i, j];
100
+
101
+ const dummy = {
102
+ a,
103
+ b,
104
+ c,
105
+ d,
106
+ e,
107
+ f,
108
+ g,
109
+ h,
110
+ i,
111
+ j,
112
+ list,
113
+ };
114
+
115
+ return Object.freeze({ create, is, validateOrCreate, validateOrThrow, name, dummy });
116
+ };
117
+
118
+ export type SchemaID = ID<"SCHEMA">;
119
+ export const SchemaID = createTypedIdSingleton("SCHEMA");
120
+
121
+ export type PageID = ID<"PAGE">;
122
+ export const PageID = createTypedIdSingleton("PAGE");
123
+
124
+ export type TagID = ID<"TAG">;
125
+ export const TagID = createTypedIdSingleton("TAG");
126
+ export type OptionID = ID<"OPTION">;
127
+ export const OptionID = createTypedIdSingleton("OPTION");
128
+
129
+ export type TextID = ID<"TEXT">;
130
+ export const TextID = createTypedIdSingleton("TEXT");
131
+ export type QuestionID = ID<"QUESTION">;
132
+ export const QuestionID = createTypedIdSingleton("QUESTION");
133
+
134
+ export type SumScoreVariableID = ID<"SUM_SCORE_VARIABLE">;
135
+ export const SumScoreVariableID = createTypedIdSingleton("SUM_SCORE_VARIABLE");
package/src/public-api.ts CHANGED
@@ -1,30 +1,29 @@
1
- export { type BuilderOptionDto, BuilderOption } from "./Builder-option";
2
- export { type BuilderPageDto, type BuilderPageType, BuilderPage } from "./page/Builder-page";
3
- export {
4
- type BuilderQuestionDto,
5
- BuilderQuestion,
6
- type BuilderQuestionType,
7
- } from "./Builder-question";
8
- export { BuilderSchema } from "./Builder-schema";
9
- export { BuilderText, type BuilderTextDto } from "./Builder-text";
10
- export { type BuilderMainImageDto } from "./BuilderMainImageDto";
11
- export { BuilderMainText, type BuilderMainTextDto } from "./BuilderMainText";
12
- export { type BuilderMainVideoDto } from "./BuilderMainVideoDto";
13
- export { type BuilderTagDto, BuilderTag } from "./tag/BuilderTag";
14
- export { type AudioFile, type ImageFile, type VideoFile } from "./media-files";
15
- // Public Api of rule-builder
16
- export * from "./rulebuilder";
17
- export { PagePrefix, PagePrefixValue } from "./primitives/page-prefix";
18
- export { SchemaPrefix, SchemaPrefixValue } from "./primitives/schema-prefix";
19
- export * from "./schema-config";
20
- export * from "./code-book/codebook";
21
- export { VarID } from "./primitives/varID";
22
- export * from "./primitives/ID";
23
- export * from "./code-book/codebook-variable";
24
- export * from "./builder-compiler";
25
- export * from "./sum-score/sum-score";
26
- export { SumScoreVariableDto, SumScoreVariable } from "./sum-score/sum-score-variable";
27
- export { SumScoreAnswer } from "./sum-score/sum-score-answer";
28
- export { TagCollection } from "./tag/Tag-Collection";
29
- export * from "./theme/Default-theme";
30
- export { BuilderSchemaDto } from "./Builder-schema-dto";
1
+ export { type BuilderOptionDto, BuilderOption } from "./Builder-option";
2
+ export { type BuilderPageDto, type BuilderPageType, BuilderPage } from "./page/Builder-page";
3
+ export {
4
+ type BuilderQuestionDto,
5
+ BuilderQuestion,
6
+ type BuilderQuestionType,
7
+ } from "./Builder-question";
8
+ export { BuilderSchema, type BuilderSchemaDto } from "./Builder-schema";
9
+ export { BuilderText, type BuilderTextDto } from "./Builder-text";
10
+ export { type BuilderMainImageDto } from "./BuilderMainImageDto";
11
+ export { BuilderMainText, type BuilderMainTextDto } from "./BuilderMainText";
12
+ export { type BuilderMainVideoDto } from "./BuilderMainVideoDto";
13
+ export { type BuilderTagDto, BuilderTag } from "./tag/BuilderTag";
14
+ export { type AudioFile, type ImageFile, type VideoFile } from "./media-files";
15
+ // Public Api of rule-builder
16
+ export * from "./rulebuilder";
17
+ export { PagePrefix, PagePrefixValue } from "./primitives/page-prefix";
18
+ export { SchemaPrefix, SchemaPrefixValue } from "./primitives/schema-prefix";
19
+ export * from "./schema-config";
20
+ export * from "./code-book/codebook";
21
+ export { VarID } from "./primitives/varID";
22
+ export * from "./primitives/ID";
23
+ export * from "./code-book/codebook-variable";
24
+ export * from "./builder-compiler";
25
+ export * from "./sum-score/sum-score";
26
+ export { SumScoreVariableDto, SumScoreVariable } from "./sum-score/sum-score-variable";
27
+ export { SumScoreAnswer } from "./sum-score/sum-score-answer";
28
+ export { TagCollection } from "./tag/Tag-Collection";
29
+ export * from "./theme/Default-theme";
@@ -1,105 +1,105 @@
1
- import { PagePrefixValue } from "../primitives/page-prefix";
2
- import { PageID } from "../primitives/ID";
3
-
4
- export interface ExcludeByPageAction {
5
- readonly kind: "exclude-by-pageId";
6
- readonly pageId: PageID;
7
- readonly pagePrefix: PagePrefixValue;
8
- readonly mainText: string;
9
- readonly pageNumber: number;
10
- }
11
-
12
- export interface JumpToPageAction {
13
- readonly kind: "jump-to-page";
14
- readonly pageId: PageID;
15
- readonly pagePrefix: PagePrefixValue;
16
- readonly mainText: string;
17
- readonly pageNumber: number;
18
- }
19
-
20
- export interface ExcludeByTagAction {
21
- readonly kind: "exclude-by-tag";
22
- readonly tag: string;
23
- readonly description: string;
24
- readonly pageCount: number;
25
- }
26
-
27
- // interface ISearchable {
28
- // getLabel(): string;
29
- // getTooltip(): string;
30
- // getSearchString(): string;
31
- // }
32
- // interface ISelectable {
33
- // isSelected: boolean;
34
- // }
35
- //
36
- // export class PageAction implements ISearchable, ISelectable {
37
- // public readonly description = "Will exclude this page from the survey.";
38
- // private _isSelected: boolean = false;
39
- // get isSelected(): boolean {
40
- // return this._isSelected;
41
- // }
42
- // set isSelected(value: boolean) {
43
- // const casted = value as unknown;
44
- // if (typeof casted === "boolean") {
45
- // this._isSelected = casted;
46
- // }
47
- // }
48
- // get pageId(): PageID {
49
- // return this.data.pageId;
50
- // }
51
- // get pagePrefix(): PagePrefixValue {
52
- // return this.data.pagePrefix;
53
- // }
54
- // get mainText(): string {
55
- // return this.data.mainText;
56
- // }
57
- // get pageNumber(): number {
58
- // return this.data.pageNumber;
59
- // }
60
- // constructor(
61
- // private readonly data: {
62
- // pageId: PageID;
63
- // pagePrefix: PagePrefixValue;
64
- // mainText: string;
65
- // pageNumber: number;
66
- // isSelected: boolean;
67
- // },
68
- // ) {
69
- // this.isSelected = this.data.isSelected;
70
- // }
71
- //
72
- // getLabel(): string {
73
- // return this.data.pagePrefix + " (" + this.data.pageNumber + ")";
74
- // }
75
- // getTooltip(): string {
76
- // return this.data.mainText;
77
- // }
78
- // getSearchString(): string {
79
- // return this.data.pagePrefix + this.data.mainText;
80
- // }
81
- // }
82
- // export class TagAction implements ISearchable {
83
- // constructor(
84
- // readonly tag: string,
85
- // readonly description: string,
86
- // readonly usedInPages: { pageNumber: number; pagePrefix: PagePrefixValue }[],
87
- // ) {}
88
- // getLabel(): string {
89
- // return this.tag + " (" + this.usedInPages.length + ")";
90
- // }
91
- // getTooltip(): string {
92
- // return this.description;
93
- // }
94
- // getSearchString(): string {
95
- // return this.tag;
96
- // }
97
- // }
98
-
99
- // class SelectableCollection<T> {
100
- // private readonly _items: Array<T>;
101
- // private selected: T | false = false;
102
- // constructor(items: ReadonlyArray<T>) {
103
- // this._items = [...items];
104
- // }
105
- // }
1
+ import { PagePrefixValue } from "../primitives/page-prefix";
2
+ import { PageID } from "../primitives/ID";
3
+
4
+ export interface ExcludeByPageAction {
5
+ readonly kind: "exclude-by-pageId";
6
+ readonly pageId: PageID;
7
+ readonly pagePrefix: PagePrefixValue;
8
+ readonly mainText: string;
9
+ readonly pageNumber: number;
10
+ }
11
+
12
+ export interface JumpToPageAction {
13
+ readonly kind: "jump-to-page";
14
+ readonly pageId: PageID;
15
+ readonly pagePrefix: PagePrefixValue;
16
+ readonly mainText: string;
17
+ readonly pageNumber: number;
18
+ }
19
+
20
+ export interface ExcludeByTagAction {
21
+ readonly kind: "exclude-by-tag";
22
+ readonly tag: string;
23
+ readonly description: string;
24
+ readonly pageCount: number;
25
+ }
26
+
27
+ // interface ISearchable {
28
+ // getLabel(): string;
29
+ // getTooltip(): string;
30
+ // getSearchString(): string;
31
+ // }
32
+ // interface ISelectable {
33
+ // isSelected: boolean;
34
+ // }
35
+ //
36
+ // export class PageAction implements ISearchable, ISelectable {
37
+ // public readonly description = "Will exclude this page from the survey.";
38
+ // private _isSelected: boolean = false;
39
+ // get isSelected(): boolean {
40
+ // return this._isSelected;
41
+ // }
42
+ // set isSelected(value: boolean) {
43
+ // const casted = value as unknown;
44
+ // if (typeof casted === "boolean") {
45
+ // this._isSelected = casted;
46
+ // }
47
+ // }
48
+ // get pageId(): PageID {
49
+ // return this.data.pageId;
50
+ // }
51
+ // get pagePrefix(): PagePrefixValue {
52
+ // return this.data.pagePrefix;
53
+ // }
54
+ // get mainText(): string {
55
+ // return this.data.mainText;
56
+ // }
57
+ // get pageNumber(): number {
58
+ // return this.data.pageNumber;
59
+ // }
60
+ // constructor(
61
+ // private readonly data: {
62
+ // pageId: PageID;
63
+ // pagePrefix: PagePrefixValue;
64
+ // mainText: string;
65
+ // pageNumber: number;
66
+ // isSelected: boolean;
67
+ // },
68
+ // ) {
69
+ // this.isSelected = this.data.isSelected;
70
+ // }
71
+ //
72
+ // getLabel(): string {
73
+ // return this.data.pagePrefix + " (" + this.data.pageNumber + ")";
74
+ // }
75
+ // getTooltip(): string {
76
+ // return this.data.mainText;
77
+ // }
78
+ // getSearchString(): string {
79
+ // return this.data.pagePrefix + this.data.mainText;
80
+ // }
81
+ // }
82
+ // export class TagAction implements ISearchable {
83
+ // constructor(
84
+ // readonly tag: string,
85
+ // readonly description: string,
86
+ // readonly usedInPages: { pageNumber: number; pagePrefix: PagePrefixValue }[],
87
+ // ) {}
88
+ // getLabel(): string {
89
+ // return this.tag + " (" + this.usedInPages.length + ")";
90
+ // }
91
+ // getTooltip(): string {
92
+ // return this.description;
93
+ // }
94
+ // getSearchString(): string {
95
+ // return this.tag;
96
+ // }
97
+ // }
98
+
99
+ // class SelectableCollection<T> {
100
+ // private readonly _items: Array<T>;
101
+ // private selected: T | false = false;
102
+ // constructor(items: ReadonlyArray<T>) {
103
+ // this._items = [...items];
104
+ // }
105
+ // }
@@ -1,26 +1,25 @@
1
- import { CodebookPredefinedVariable } from "./code-book/codebook-variable";
2
-
3
- import { BuilderSchemaDto } from "./Builder-schema-dto";
4
-
5
- /**
6
- * This interface is ment to define all information that a schema-admin app
7
- * needs to generate a dynamic form for setting values for predefined variables.
8
- */
9
- export interface SchemaConfig {
10
- readonly schemaName: string;
11
- readonly schemaId: string;
12
- readonly schemaPrefix: string;
13
- readonly variables: ReadonlyArray<CodebookPredefinedVariable>;
14
- }
15
-
16
- export const SchemaConfig = {
17
- fromSchema: (schema: BuilderSchemaDto): SchemaConfig => {
18
- const variables = schema.predefinedVariables ?? [];
19
- return {
20
- schemaId: schema.id,
21
- schemaName: schema.name,
22
- schemaPrefix: schema.prefix,
23
- variables,
24
- };
25
- },
26
- } as const;
1
+ import { CodebookPredefinedVariable } from "./code-book/codebook-variable";
2
+ import { BuilderSchemaDto } from "./Builder-schema";
3
+
4
+ /**
5
+ * This interface is ment to define all information that a schema-admin app
6
+ * needs to generate a dynamic form for setting values for predefined variables.
7
+ */
8
+ export interface SchemaConfig {
9
+ readonly schemaName: string;
10
+ readonly schemaId: string;
11
+ readonly schemaPrefix: string;
12
+ readonly variables: ReadonlyArray<CodebookPredefinedVariable>;
13
+ }
14
+
15
+ export const SchemaConfig = {
16
+ fromSchema: (schema: BuilderSchemaDto): SchemaConfig => {
17
+ const variables = schema.predefinedVariables ?? [];
18
+ return {
19
+ schemaId: schema.id,
20
+ schemaName: schema.name,
21
+ schemaPrefix: schema.prefix,
22
+ variables,
23
+ };
24
+ },
25
+ } as const;