@media-quest/builder 0.0.26 → 0.0.28
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 +820 -0
- package/dist/public-api.js +2740 -0
- package/dist/public-api.js.map +1 -0
- package/package.json +29 -15
- package/src/Builder-question.ts +0 -4
- package/src/Builder-schema.spec.ts +79 -60
- package/src/Builder-schema.ts +73 -63
- package/src/code-book/codebook-variable.ts +27 -29
- package/src/code-book/codebook.ts +81 -72
- package/src/page/Builder-page-collection.spec.ts +219 -0
- package/src/page/Builder-page-collection.ts +129 -0
- package/src/{Builder-page.spec.ts → page/Builder-page.spec.ts} +21 -6
- package/src/{Builder-page.ts → page/Builder-page.ts} +84 -16
- package/src/primitives/ID.ts +135 -138
- package/src/public-api.ts +28 -28
- package/src/rulebuilder/RuleAction.ts +105 -106
- package/src/sum-score/sum-score-variable-collection.spec.ts +68 -0
- package/src/sum-score/sum-score-variable-collection.ts +101 -0
- package/src/sum-score/sum-score-variable.spec.ts +308 -151
- package/src/sum-score/sum-score-variable.ts +102 -36
- package/src/sum-score/sum-score.ts +161 -122
- package/src/tag/BuilderTag.ts +45 -0
- package/src/tag/Tag-Collection.ts +53 -0
- package/src/theme/default-theme-compiler.ts +358 -358
- package/tsconfig.json +19 -15
- package/src/BuilderTag.ts +0 -96
- package/src/sum-score/sum-score-manager.spec.ts +0 -189
- package/src/sum-score/sum-score-manager.ts +0 -154
- package/src/sum-score/sum-score-membership.ts +0 -45
- package/tsconfig.tsbuildinfo +0 -1
|
@@ -0,0 +1,820 @@
|
|
|
1
|
+
import { Condition, PageQueRules, SchemaDto } from '@media-quest/engine';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Builder objects are complex objects that are embedded inside
|
|
5
|
+
* a Builder-schema, and needs to be serialized to json. Often these objects
|
|
6
|
+
* are used in collections, and that is why most of them need an id.
|
|
7
|
+
*/
|
|
8
|
+
type BuilderObjectType = "builder-page" | "builder-question-option" | "builder-question" | "builder-main-text" | "builder-text" | "builder-rule" | "builder-tag" | "builder-sum-score-variable" | "builder-sum-score-membership" | "builder-condition" | "builder-variable" | "builder-condition-group";
|
|
9
|
+
declare abstract class BuilderObject<T extends BuilderObjectType, Dto extends {}> {
|
|
10
|
+
abstract readonly objectType: T;
|
|
11
|
+
abstract toJson(): Dto;
|
|
12
|
+
abstract clone(): Dto;
|
|
13
|
+
protected readonly originalDto: Dto;
|
|
14
|
+
protected constructor(dto: Dto);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
interface AudioFile {
|
|
18
|
+
readonly kind: "audio-file";
|
|
19
|
+
readonly id: string;
|
|
20
|
+
readonly downloadUrl: string;
|
|
21
|
+
readonly duration: number;
|
|
22
|
+
readonly originalFileName: string;
|
|
23
|
+
readonly name: string;
|
|
24
|
+
readonly size: number;
|
|
25
|
+
}
|
|
26
|
+
interface VideoFile {
|
|
27
|
+
readonly kind: "video-file";
|
|
28
|
+
readonly id: string;
|
|
29
|
+
readonly downloadUrl: string;
|
|
30
|
+
readonly duration: number;
|
|
31
|
+
readonly name: string;
|
|
32
|
+
readonly size: number;
|
|
33
|
+
readonly type: string;
|
|
34
|
+
readonly originalFileName: string;
|
|
35
|
+
}
|
|
36
|
+
interface ImageFile {
|
|
37
|
+
readonly kind: "image-file";
|
|
38
|
+
readonly id: string;
|
|
39
|
+
readonly downloadUrl: string;
|
|
40
|
+
readonly name: string;
|
|
41
|
+
readonly size: number;
|
|
42
|
+
readonly type: string;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
type ID<B extends string> = string & {
|
|
46
|
+
__ID__: B;
|
|
47
|
+
};
|
|
48
|
+
interface Id<T extends string> {
|
|
49
|
+
name: T;
|
|
50
|
+
is: (id: string) => id is ID<T>;
|
|
51
|
+
validateOrCreate: (id: string) => ID<T>;
|
|
52
|
+
validateOrThrow: (id: string) => ID<T>;
|
|
53
|
+
create: () => ID<T>;
|
|
54
|
+
dummy: {
|
|
55
|
+
a: ID<T>;
|
|
56
|
+
b: ID<T>;
|
|
57
|
+
c: ID<T>;
|
|
58
|
+
d: ID<T>;
|
|
59
|
+
e: ID<T>;
|
|
60
|
+
f: ID<T>;
|
|
61
|
+
g: ID<T>;
|
|
62
|
+
h: ID<T>;
|
|
63
|
+
i: ID<T>;
|
|
64
|
+
j: ID<T>;
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Creates a object with helper functions for a specific ID type
|
|
69
|
+
* @param idName
|
|
70
|
+
*/
|
|
71
|
+
declare const createTypedIdSingleton: <const B extends string>(idName: B) => Id<B>;
|
|
72
|
+
type SchemaID = ID<"SCHEMA">;
|
|
73
|
+
declare const SchemaID: Id<"SCHEMA">;
|
|
74
|
+
type PageID = ID<"PAGE">;
|
|
75
|
+
declare const PageID: Id<"PAGE">;
|
|
76
|
+
type TagID = ID<"TAG">;
|
|
77
|
+
declare const TagID: Id<"TAG">;
|
|
78
|
+
type OptionID = ID<"OPTION">;
|
|
79
|
+
declare const OptionID: Id<"OPTION">;
|
|
80
|
+
type TextID = ID<"TEXT">;
|
|
81
|
+
declare const TextID: Id<"TEXT">;
|
|
82
|
+
type QuestionID = ID<"QUESTION">;
|
|
83
|
+
declare const QuestionID: Id<"QUESTION">;
|
|
84
|
+
type SumScoreVariableID = ID<"SUM_SCORE_VARIABLE">;
|
|
85
|
+
declare const SumScoreVariableID: Id<"SUM_SCORE_VARIABLE">;
|
|
86
|
+
|
|
87
|
+
interface BuilderOptionDto {
|
|
88
|
+
readonly id: OptionID;
|
|
89
|
+
readonly value: number;
|
|
90
|
+
readonly label: string;
|
|
91
|
+
readonly labelAudio?: AudioFile;
|
|
92
|
+
}
|
|
93
|
+
declare class BuilderOption extends BuilderObject<"builder-question-option", BuilderOptionDto> {
|
|
94
|
+
readonly objectType = "builder-question-option";
|
|
95
|
+
id: OptionID;
|
|
96
|
+
value: number;
|
|
97
|
+
label: string;
|
|
98
|
+
private _labelAudioFile;
|
|
99
|
+
get labelAudioFile(): AudioFile | false;
|
|
100
|
+
set labelAudioFile(audioFile: AudioFile | false);
|
|
101
|
+
private constructor();
|
|
102
|
+
static create(value: number, label: string): BuilderOption;
|
|
103
|
+
static fromJson(dto: BuilderOptionDto): BuilderOption;
|
|
104
|
+
toJson(): BuilderOptionDto;
|
|
105
|
+
clone(): BuilderOptionDto;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
type BuilderQuestionType = "select-one" | "select-many" | "text" | "time" | "textarea" | "date" | "numeric-range" | "duration";
|
|
109
|
+
interface BuilderQuestionDto {
|
|
110
|
+
readonly id: QuestionID;
|
|
111
|
+
_type: BuilderQuestionType;
|
|
112
|
+
text: string;
|
|
113
|
+
options: ReadonlyArray<BuilderOptionDto>;
|
|
114
|
+
prefix: string;
|
|
115
|
+
}
|
|
116
|
+
declare class BuilderQuestion extends BuilderObject<"builder-question", BuilderQuestionDto> {
|
|
117
|
+
readonly objectType = "builder-question";
|
|
118
|
+
id: QuestionID;
|
|
119
|
+
type: BuilderQuestionType;
|
|
120
|
+
questionText: string;
|
|
121
|
+
options: BuilderOption[];
|
|
122
|
+
prefix: string;
|
|
123
|
+
static create: (type: BuilderQuestionType) => BuilderQuestion;
|
|
124
|
+
static fromJson(dto: BuilderQuestionDto): BuilderQuestion;
|
|
125
|
+
private constructor();
|
|
126
|
+
addOption(label: string, value: number, atIndex?: number): BuilderOption;
|
|
127
|
+
deleteOption(option: BuilderOption): boolean;
|
|
128
|
+
toJson(): BuilderQuestionDto;
|
|
129
|
+
clone(): BuilderQuestionDto;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
interface BuilderMainVideoDto {
|
|
133
|
+
readonly kind: "main-video";
|
|
134
|
+
readonly file: VideoFile;
|
|
135
|
+
mode: "autoplay" | "required" | "optional" | "gif-mode";
|
|
136
|
+
preDelay: number;
|
|
137
|
+
volume: number;
|
|
138
|
+
controls: boolean;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
interface BuilderMainImageDto {
|
|
142
|
+
readonly kind: "main-image";
|
|
143
|
+
readonly file: ImageFile;
|
|
144
|
+
readonly overlay: {
|
|
145
|
+
text: string;
|
|
146
|
+
fontsize: number;
|
|
147
|
+
xPos: number;
|
|
148
|
+
yPos: number;
|
|
149
|
+
} | false;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
interface BuilderMainTextDto {
|
|
153
|
+
text: string;
|
|
154
|
+
audioFile: AudioFile | false;
|
|
155
|
+
autoplay: boolean;
|
|
156
|
+
autoplayDelay: number;
|
|
157
|
+
}
|
|
158
|
+
declare class BuilderMainText extends BuilderObject<"builder-main-text", BuilderMainTextDto> {
|
|
159
|
+
readonly objectType: "builder-main-text";
|
|
160
|
+
autoplay: boolean;
|
|
161
|
+
private _audioFile;
|
|
162
|
+
autoplayDelay: number;
|
|
163
|
+
text: string;
|
|
164
|
+
private constructor();
|
|
165
|
+
get autoplayDelayInSeconds(): string;
|
|
166
|
+
get durationTag(): string;
|
|
167
|
+
static fromJson(dto: BuilderMainTextDto): BuilderMainText;
|
|
168
|
+
static create: () => BuilderMainText;
|
|
169
|
+
clone(): BuilderMainTextDto;
|
|
170
|
+
toJson(): BuilderMainTextDto;
|
|
171
|
+
get audioFile(): AudioFile | false;
|
|
172
|
+
set audioFile(audioFile: AudioFile | false);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
declare const BuilderOperatorSymbols: {
|
|
176
|
+
readonly equal: true;
|
|
177
|
+
readonly notEqual: true;
|
|
178
|
+
readonly lessThan: true;
|
|
179
|
+
readonly lessThanOrEqual: true;
|
|
180
|
+
readonly greaterThan: true;
|
|
181
|
+
readonly greaterThanOrEqual: true;
|
|
182
|
+
readonly between: true;
|
|
183
|
+
readonly notBetween: true;
|
|
184
|
+
readonly in: true;
|
|
185
|
+
readonly notIn: true;
|
|
186
|
+
readonly missing: true;
|
|
187
|
+
readonly notMissing: true;
|
|
188
|
+
readonly contains: true;
|
|
189
|
+
readonly notContains: true;
|
|
190
|
+
readonly empty: true;
|
|
191
|
+
readonly notEmpty: true;
|
|
192
|
+
readonly startsWith: true;
|
|
193
|
+
readonly endsWith: true;
|
|
194
|
+
};
|
|
195
|
+
type BuilderOperator = keyof typeof BuilderOperatorSymbols;
|
|
196
|
+
declare namespace BuilderOperator {
|
|
197
|
+
const is: (symbol?: string) => symbol is "equal" | "notEqual" | "lessThan" | "lessThanOrEqual" | "greaterThan" | "greaterThanOrEqual" | "between" | "notBetween" | "in" | "notIn" | "missing" | "notMissing" | "contains" | "notContains" | "empty" | "notEmpty" | "startsWith" | "endsWith";
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
type PagePrefixValue = string & {
|
|
201
|
+
__PAGE_PREFIX__: true;
|
|
202
|
+
};
|
|
203
|
+
declare class PagePrefix {
|
|
204
|
+
private _value;
|
|
205
|
+
static readonly MIN_LENGTH = 1;
|
|
206
|
+
private static randomLen;
|
|
207
|
+
static readonly MAX_LENGTH = 16;
|
|
208
|
+
static create: () => PagePrefix;
|
|
209
|
+
static fromString: (value: string) => PagePrefix | false;
|
|
210
|
+
static fromStringOrThrow: (value: string) => PagePrefixValue;
|
|
211
|
+
static castOrCreateRandom: (value: string) => PagePrefix;
|
|
212
|
+
static isValid: (prefix: string | 999) => prefix is PagePrefixValue;
|
|
213
|
+
get value(): PagePrefixValue;
|
|
214
|
+
set value(value: string);
|
|
215
|
+
private constructor();
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
type SchemaPrefixValue = string & {
|
|
219
|
+
__SCHEMA_PREFIX__: true;
|
|
220
|
+
};
|
|
221
|
+
declare class SchemaPrefix {
|
|
222
|
+
private _value;
|
|
223
|
+
static readonly MIN_LENGTH = 1;
|
|
224
|
+
private static randomLen;
|
|
225
|
+
static readonly MAX_LENGTH = 16;
|
|
226
|
+
static fromValue: (value: SchemaPrefixValue) => SchemaPrefix;
|
|
227
|
+
static fromValueOrThrow: (value: string) => SchemaPrefix;
|
|
228
|
+
static fromString: (value: string) => SchemaPrefix | false;
|
|
229
|
+
static castOrCreateRandom: (value: string) => SchemaPrefix;
|
|
230
|
+
static isValid: (prefix: string | 999) => prefix is SchemaPrefixValue;
|
|
231
|
+
get value(): SchemaPrefixValue;
|
|
232
|
+
get isValid(): boolean;
|
|
233
|
+
set value(value: string);
|
|
234
|
+
private constructor();
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
type VarID = `${SchemaPrefixValue}_${PagePrefixValue}`;
|
|
238
|
+
declare const VarID: {
|
|
239
|
+
create: (schemaPrefix: SchemaPrefixValue, pagePrefix: PagePrefixValue) => VarID;
|
|
240
|
+
};
|
|
241
|
+
|
|
242
|
+
/*******************************************
|
|
243
|
+
** ONLY USE THESE TYPES IN RULE-BUILDER **
|
|
244
|
+
******************************************/
|
|
245
|
+
declare class RuleVariableOption {
|
|
246
|
+
readonly label: string;
|
|
247
|
+
readonly value: number;
|
|
248
|
+
constructor(label: string, value: number);
|
|
249
|
+
}
|
|
250
|
+
declare class RuleQuestionVariable {
|
|
251
|
+
readonly varId: VarID;
|
|
252
|
+
readonly label: string;
|
|
253
|
+
readonly options: ReadonlyArray<RuleVariableOption>;
|
|
254
|
+
readonly pageNumber: number;
|
|
255
|
+
readonly kind: "question-variable";
|
|
256
|
+
constructor(varId: VarID, label: string, options: ReadonlyArray<RuleVariableOption>, pageNumber: number);
|
|
257
|
+
}
|
|
258
|
+
declare class RuleCustomVariable {
|
|
259
|
+
readonly varId: string;
|
|
260
|
+
readonly label: string;
|
|
261
|
+
readonly options: ReadonlyArray<RuleVariableOption>;
|
|
262
|
+
readonly kind: "configuration-variable";
|
|
263
|
+
constructor(varId: string, label: string, options: ReadonlyArray<RuleVariableOption>);
|
|
264
|
+
}
|
|
265
|
+
type RuleVariable = RuleQuestionVariable | RuleCustomVariable;
|
|
266
|
+
|
|
267
|
+
interface ExcludeByPageAction {
|
|
268
|
+
readonly kind: "exclude-by-pageId";
|
|
269
|
+
readonly pageId: PageID;
|
|
270
|
+
readonly pagePrefix: PagePrefixValue;
|
|
271
|
+
readonly mainText: string;
|
|
272
|
+
readonly pageNumber: number;
|
|
273
|
+
}
|
|
274
|
+
interface JumpToPageAction {
|
|
275
|
+
readonly kind: "jump-to-page";
|
|
276
|
+
readonly pageId: PageID;
|
|
277
|
+
readonly pagePrefix: PagePrefixValue;
|
|
278
|
+
readonly mainText: string;
|
|
279
|
+
readonly pageNumber: number;
|
|
280
|
+
}
|
|
281
|
+
interface ExcludeByTagAction {
|
|
282
|
+
readonly kind: "exclude-by-tag";
|
|
283
|
+
readonly tag: string;
|
|
284
|
+
readonly description: string;
|
|
285
|
+
readonly pageCount: number;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
declare abstract class SingleSelectItem<T> {
|
|
289
|
+
readonly data: T;
|
|
290
|
+
private readonly _selectLabel;
|
|
291
|
+
private readonly _toolTip;
|
|
292
|
+
private readonly _searchString;
|
|
293
|
+
get selectLabel(): string;
|
|
294
|
+
get tooltip(): string;
|
|
295
|
+
get searchString(): string;
|
|
296
|
+
protected constructor(data: T);
|
|
297
|
+
protected abstract getSelectLabel(): string;
|
|
298
|
+
protected abstract getTooltip(): string;
|
|
299
|
+
protected abstract getSearchString(): string;
|
|
300
|
+
}
|
|
301
|
+
declare class RuleVariableSelectItem extends SingleSelectItem<RuleVariable> {
|
|
302
|
+
readonly data: RuleVariable;
|
|
303
|
+
static create: (data: RuleVariable) => RuleVariableSelectItem;
|
|
304
|
+
readonly options: ReadonlyArray<RuleOptionSelectItem>;
|
|
305
|
+
constructor(data: RuleVariable);
|
|
306
|
+
protected getSearchString(): string;
|
|
307
|
+
getSelectLabel(): string;
|
|
308
|
+
getTooltip(): string;
|
|
309
|
+
}
|
|
310
|
+
declare class RuleOptionSelectItem extends SingleSelectItem<RuleVariableOption> {
|
|
311
|
+
static create: (option: RuleVariableOption) => RuleOptionSelectItem;
|
|
312
|
+
private constructor();
|
|
313
|
+
protected getSearchString(): string;
|
|
314
|
+
protected getSelectLabel(): string;
|
|
315
|
+
protected getTooltip(): string;
|
|
316
|
+
}
|
|
317
|
+
declare class OperatorSelectItem extends SingleSelectItem<BuilderOperator | ""> {
|
|
318
|
+
static readonly EQ: OperatorSelectItem;
|
|
319
|
+
static readonly NOT_EQ: OperatorSelectItem;
|
|
320
|
+
static readonly fromSymbol: (symbol: BuilderOperator | Omit<string, BuilderOperator>) => OperatorSelectItem | false;
|
|
321
|
+
private constructor();
|
|
322
|
+
protected getSearchString(): string;
|
|
323
|
+
protected getSelectLabel(): string;
|
|
324
|
+
protected getTooltip(): string;
|
|
325
|
+
}
|
|
326
|
+
declare class JumpToPageSelectItem extends SingleSelectItem<JumpToPageAction> {
|
|
327
|
+
static readonly create: (pageData: JumpToPageAction) => JumpToPageSelectItem;
|
|
328
|
+
protected constructor(pageData: JumpToPageAction);
|
|
329
|
+
protected getSearchString(): string;
|
|
330
|
+
protected getSelectLabel(): string;
|
|
331
|
+
protected getTooltip(): string;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
interface BuilderConditionDto {
|
|
335
|
+
readonly kind: "condition";
|
|
336
|
+
readonly operator: BuilderOperator | "";
|
|
337
|
+
readonly name: string;
|
|
338
|
+
readonly variableId: string;
|
|
339
|
+
readonly value: number | string | boolean;
|
|
340
|
+
}
|
|
341
|
+
declare class BuilderCondition extends BuilderObject<"builder-condition", BuilderConditionDto> {
|
|
342
|
+
readonly objectType: "builder-condition";
|
|
343
|
+
static readonly NUMBER_OPERATORS: ReadonlyArray<OperatorSelectItem>;
|
|
344
|
+
private initialDto;
|
|
345
|
+
name: string;
|
|
346
|
+
static create: (variableList: ReadonlyArray<RuleVariable>) => BuilderCondition;
|
|
347
|
+
static fromDto: (dto: BuilderConditionDto, variables: ReadonlyArray<RuleVariable>) => BuilderCondition;
|
|
348
|
+
private _variable;
|
|
349
|
+
private _operator;
|
|
350
|
+
private _value;
|
|
351
|
+
private _variableList;
|
|
352
|
+
/**
|
|
353
|
+
* Can only set variables that exist in variableList.
|
|
354
|
+
* @param variable
|
|
355
|
+
*/
|
|
356
|
+
set variable(variable: RuleVariable | false);
|
|
357
|
+
get variable(): RuleVariable | false;
|
|
358
|
+
set value(variableValue: RuleVariableOption | false);
|
|
359
|
+
get value(): RuleVariableOption | false;
|
|
360
|
+
validate(): {
|
|
361
|
+
isValid: true;
|
|
362
|
+
} | {
|
|
363
|
+
isValid: false;
|
|
364
|
+
message: string;
|
|
365
|
+
};
|
|
366
|
+
toEngineCondition(): Condition.Simple | false;
|
|
367
|
+
private findVariableInUniverse;
|
|
368
|
+
set operator(operator: BuilderOperator | "");
|
|
369
|
+
get operator(): BuilderOperator | "";
|
|
370
|
+
private constructor();
|
|
371
|
+
get variableSelectItemsInUniverse(): ReadonlyArray<RuleVariableSelectItem>;
|
|
372
|
+
get operatorsSelectItems(): ReadonlyArray<OperatorSelectItem>;
|
|
373
|
+
get selectValueItems(): ReadonlyArray<RuleOptionSelectItem>;
|
|
374
|
+
clone(): BuilderConditionDto;
|
|
375
|
+
private _setVariableList;
|
|
376
|
+
toJson(): BuilderConditionDto;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
declare const ConditionGroupType: {
|
|
380
|
+
all: boolean;
|
|
381
|
+
any: boolean;
|
|
382
|
+
count: boolean;
|
|
383
|
+
};
|
|
384
|
+
type ConditionGroupType = keyof typeof ConditionGroupType;
|
|
385
|
+
interface BuilderConditionGroupDto {
|
|
386
|
+
readonly kind: "condition-group";
|
|
387
|
+
readonly name: string;
|
|
388
|
+
readonly count?: number;
|
|
389
|
+
readonly type: ConditionGroupType;
|
|
390
|
+
readonly conditions: ReadonlyArray<BuilderConditionDto>;
|
|
391
|
+
}
|
|
392
|
+
declare class BuilderConditionGroup extends BuilderObject<"builder-condition-group", BuilderConditionGroupDto> {
|
|
393
|
+
static readonly isConditionGroupType: (value: string | symbol) => value is "all" | "any" | "count";
|
|
394
|
+
readonly objectType: "builder-condition-group";
|
|
395
|
+
private _type;
|
|
396
|
+
name: string;
|
|
397
|
+
private readonly _conditions;
|
|
398
|
+
private readonly _variableList;
|
|
399
|
+
static readonly fromDto: (dto: BuilderConditionGroupDto, variableList: ReadonlyArray<RuleVariable>) => BuilderConditionGroup;
|
|
400
|
+
protected constructor(dto: BuilderConditionGroupDto, variableList: ReadonlyArray<RuleVariable>);
|
|
401
|
+
get conditions(): ReadonlyArray<BuilderCondition>;
|
|
402
|
+
get conditionCount(): number;
|
|
403
|
+
addCondition(): BuilderCondition;
|
|
404
|
+
removeCondition(condition: BuilderCondition): boolean;
|
|
405
|
+
clone(): BuilderConditionGroupDto;
|
|
406
|
+
toJson(): BuilderConditionGroupDto;
|
|
407
|
+
toEngineConditionComplex(): Condition.Complex | false;
|
|
408
|
+
get type(): ConditionGroupType;
|
|
409
|
+
set type(conditionGroupType: ConditionGroupType);
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
declare abstract class MultiSelectItem<T> {
|
|
413
|
+
readonly data: T;
|
|
414
|
+
private readonly _isSelectedInitially;
|
|
415
|
+
private readonly _selectLabel;
|
|
416
|
+
private readonly _toolTip;
|
|
417
|
+
private readonly _searchString;
|
|
418
|
+
isSelected: boolean;
|
|
419
|
+
get selectLabel(): string;
|
|
420
|
+
get tooltip(): string;
|
|
421
|
+
get searchString(): string;
|
|
422
|
+
protected constructor(data: T, isSelected: boolean);
|
|
423
|
+
protected abstract getSelectLabel(): string;
|
|
424
|
+
protected abstract getTooltip(): string;
|
|
425
|
+
protected abstract getSearchString(): string;
|
|
426
|
+
}
|
|
427
|
+
declare class ExcludeByTagSelectItem extends MultiSelectItem<ExcludeByTagAction> {
|
|
428
|
+
static readonly create: (tagData: ExcludeByTagAction, isSelected: boolean) => ExcludeByTagSelectItem;
|
|
429
|
+
protected constructor(data: ExcludeByTagAction, isSelected: boolean);
|
|
430
|
+
protected getSearchString(): string;
|
|
431
|
+
protected getSelectLabel(): string;
|
|
432
|
+
protected getTooltip(): string;
|
|
433
|
+
}
|
|
434
|
+
declare class ExcludeByPageIdSelectItem extends MultiSelectItem<ExcludeByPageAction> {
|
|
435
|
+
static create: (ruleActionPage: ExcludeByPageAction, isSelected: boolean) => ExcludeByPageIdSelectItem;
|
|
436
|
+
protected constructor(data: ExcludeByPageAction, isSelected: boolean);
|
|
437
|
+
protected getSearchString(): string;
|
|
438
|
+
protected getSelectLabel(): string;
|
|
439
|
+
protected getTooltip(): string;
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
/**
|
|
443
|
+
* TODO Crate filters for "cardinality" or "order" of a sum-score;
|
|
444
|
+
* Return legal lists of variables.
|
|
445
|
+
*/
|
|
446
|
+
declare class RuleInput {
|
|
447
|
+
private readonly _questionVariables;
|
|
448
|
+
private readonly _customVariables;
|
|
449
|
+
private readonly _pageIdActions;
|
|
450
|
+
private readonly _tagActions;
|
|
451
|
+
private readonly _jumpActions;
|
|
452
|
+
constructor(_questionVariables: ReadonlyArray<RuleQuestionVariable>, _customVariables: ReadonlyArray<RuleCustomVariable>, _pageIdActions: ReadonlyArray<ExcludeByPageAction>, _tagActions: ReadonlyArray<ExcludeByTagAction>, _jumpActions: ReadonlyArray<JumpToPageAction>);
|
|
453
|
+
get questionVars(): ReadonlyArray<RuleVariable>;
|
|
454
|
+
getConditionInput(): ReadonlyArray<RuleVariable>;
|
|
455
|
+
getJumpToPageOptions(): ReadonlyArray<JumpToPageSelectItem>;
|
|
456
|
+
get customVars(): ReadonlyArray<RuleCustomVariable>;
|
|
457
|
+
get excludeByPageIdActions(): readonly ExcludeByPageAction[];
|
|
458
|
+
get excludeByTagActions(): readonly ExcludeByTagAction[];
|
|
459
|
+
get jumpToPageActions(): readonly JumpToPageAction[];
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
declare class JumpToActionManager {
|
|
463
|
+
private readonly validOptions;
|
|
464
|
+
private readonly initialSelection;
|
|
465
|
+
readonly options: ReadonlyArray<JumpToPageSelectItem>;
|
|
466
|
+
private _selected;
|
|
467
|
+
constructor(validOptions: RuleInput["_jumpActions"], initialSelection: string | false | undefined);
|
|
468
|
+
get selected(): JumpToPageSelectItem | false;
|
|
469
|
+
set selected(selected: JumpToPageSelectItem | false);
|
|
470
|
+
getSelectedPageId(): string | false;
|
|
471
|
+
private findSelected;
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
interface BuilderRuleDto {
|
|
475
|
+
readonly type: ConditionGroupType;
|
|
476
|
+
readonly name: string;
|
|
477
|
+
readonly conditions: ReadonlyArray<BuilderConditionDto | BuilderConditionGroupDto>;
|
|
478
|
+
readonly excludeTags: ReadonlyArray<string>;
|
|
479
|
+
readonly excludePages: ReadonlyArray<PageID>;
|
|
480
|
+
readonly jumpToPage: string | false;
|
|
481
|
+
}
|
|
482
|
+
declare class BuilderRule extends BuilderObject<"builder-rule", BuilderRuleDto> {
|
|
483
|
+
private readonly dto;
|
|
484
|
+
private readonly _ruleInput;
|
|
485
|
+
readonly objectType: "builder-rule";
|
|
486
|
+
private _type;
|
|
487
|
+
name: string;
|
|
488
|
+
private readonly _conditions;
|
|
489
|
+
private readonly _tagActionManager;
|
|
490
|
+
private _pageActionManager;
|
|
491
|
+
readonly jumpToActionManager: JumpToActionManager;
|
|
492
|
+
static readonly fromDto: (dto: BuilderRuleDto, input: RuleInput) => BuilderRule;
|
|
493
|
+
protected constructor(dto: BuilderRuleDto, _ruleInput: RuleInput);
|
|
494
|
+
get conditions(): ReadonlyArray<BuilderConditionGroup | BuilderCondition>;
|
|
495
|
+
getTagActions(): readonly ExcludeByTagSelectItem[];
|
|
496
|
+
getValidPageActions(): readonly ExcludeByPageIdSelectItem[];
|
|
497
|
+
get conditionCount(): number;
|
|
498
|
+
set type(type: ConditionGroupType);
|
|
499
|
+
get type(): ConditionGroupType;
|
|
500
|
+
deleteCondition(condition: BuilderCondition | BuilderConditionGroup): boolean;
|
|
501
|
+
addCondition(): BuilderCondition;
|
|
502
|
+
addConditionGroup(): BuilderConditionGroup;
|
|
503
|
+
clone(): BuilderRuleDto;
|
|
504
|
+
toJson(): BuilderRuleDto;
|
|
505
|
+
toEngineRule(): PageQueRules;
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
declare class PageActionManager {
|
|
509
|
+
readonly validOptions: RuleInput["_pageIdActions"];
|
|
510
|
+
readonly initialSelection: ReadonlyArray<string>;
|
|
511
|
+
private readonly _initialSelection;
|
|
512
|
+
readonly selectItems: ReadonlyArray<ExcludeByPageIdSelectItem>;
|
|
513
|
+
constructor(validOptions: RuleInput["_pageIdActions"], initialSelection: ReadonlyArray<string>);
|
|
514
|
+
getCurrentSelection(): ReadonlyArray<PageID>;
|
|
515
|
+
getEngineAction(): ReadonlyArray<ExcludeByPageAction>;
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
declare class TagActionManager {
|
|
519
|
+
readonly validOptions: RuleInput["_tagActions"];
|
|
520
|
+
readonly initialSelection: ReadonlyArray<string>;
|
|
521
|
+
private readonly _initialSelection;
|
|
522
|
+
readonly selectItems: ReadonlyArray<ExcludeByTagSelectItem>;
|
|
523
|
+
constructor(validOptions: RuleInput["_tagActions"], initialSelection: ReadonlyArray<string>);
|
|
524
|
+
getCurrentSelection(): ReadonlyArray<string>;
|
|
525
|
+
getEngineActions(): ReadonlyArray<ExcludeByTagAction>;
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
type BuilderPageType = "info-page" | "question";
|
|
529
|
+
interface BuilderPageDto {
|
|
530
|
+
readonly id: PageID;
|
|
531
|
+
readonly prefix: PagePrefixValue;
|
|
532
|
+
_type: BuilderPageType;
|
|
533
|
+
mainText: BuilderMainTextDto;
|
|
534
|
+
nextButton: BuilderOptionDto;
|
|
535
|
+
defaultQuestion: BuilderQuestionDto;
|
|
536
|
+
mainMedia?: BuilderMainImageDto | BuilderMainVideoDto;
|
|
537
|
+
includedInSumScores: Array<{
|
|
538
|
+
sumScoreVariableId: SumScoreVariableID;
|
|
539
|
+
weight: number;
|
|
540
|
+
}>;
|
|
541
|
+
autoplaySequence: Array<string>;
|
|
542
|
+
tags: ReadonlyArray<string>;
|
|
543
|
+
}
|
|
544
|
+
declare class BuilderPage extends BuilderObject<"builder-page", BuilderPageDto> {
|
|
545
|
+
readonly objectType: "builder-page";
|
|
546
|
+
readonly id: PageID;
|
|
547
|
+
private _pageType;
|
|
548
|
+
private _prefix;
|
|
549
|
+
private readonly _tags;
|
|
550
|
+
private _backgroundColor;
|
|
551
|
+
private _includedInSumScores;
|
|
552
|
+
mainMedia: BuilderMainVideoDto | BuilderMainImageDto | false;
|
|
553
|
+
defaultQuestion: BuilderQuestion;
|
|
554
|
+
mainText: BuilderMainText;
|
|
555
|
+
nextButton: BuilderOption;
|
|
556
|
+
static create(type: BuilderPageType, _prefix: PagePrefixValue): BuilderPage;
|
|
557
|
+
static fromJson(dto: BuilderPageDto): BuilderPage;
|
|
558
|
+
private constructor();
|
|
559
|
+
addTag(tag: string): void;
|
|
560
|
+
deleteTag(tag: string): void;
|
|
561
|
+
set pageType(value: BuilderPageType);
|
|
562
|
+
get includedInSumScores(): {
|
|
563
|
+
sumScoreVariableId: SumScoreVariableID;
|
|
564
|
+
weight: number;
|
|
565
|
+
name: string;
|
|
566
|
+
description: string;
|
|
567
|
+
}[];
|
|
568
|
+
getQuestionVariables(modulePrefix: SchemaPrefix, pageNumber: number): ReadonlyArray<RuleQuestionVariable>;
|
|
569
|
+
get tags(): ReadonlyArray<string>;
|
|
570
|
+
get pageType(): BuilderPageType;
|
|
571
|
+
get prefix(): PagePrefixValue;
|
|
572
|
+
set prefix(value: PagePrefixValue);
|
|
573
|
+
toJson(): BuilderPageDto;
|
|
574
|
+
clone(): BuilderPageDto;
|
|
575
|
+
get backgroundColor(): string;
|
|
576
|
+
set backgroundColor(color: string);
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
interface BuilderTagDto {
|
|
580
|
+
readonly id: TagID;
|
|
581
|
+
readonly tag: string;
|
|
582
|
+
readonly description: string;
|
|
583
|
+
}
|
|
584
|
+
declare class BuilderTag extends BuilderObject<"builder-tag", BuilderTagDto> {
|
|
585
|
+
readonly objectType: "builder-tag";
|
|
586
|
+
readonly id: TagID;
|
|
587
|
+
tagText: string;
|
|
588
|
+
tagDescription: string;
|
|
589
|
+
static readonly MAX_LENGTH = 20;
|
|
590
|
+
static readonly MIN_LENGTH = 1;
|
|
591
|
+
static readonly create: (tag: string, description?: string) => BuilderTag;
|
|
592
|
+
static readonly fromDto: (dto: BuilderTagDto) => BuilderTag;
|
|
593
|
+
protected constructor(dto: BuilderTagDto);
|
|
594
|
+
clone(): BuilderTagDto;
|
|
595
|
+
toJson(): BuilderTagDto;
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
interface SumScoreVariableDto {
|
|
599
|
+
id: SumScoreVariableID;
|
|
600
|
+
name: string;
|
|
601
|
+
description: string;
|
|
602
|
+
useAvg: boolean;
|
|
603
|
+
}
|
|
604
|
+
declare class SumScoreVariable extends BuilderObject<"builder-sum-score-variable", SumScoreVariableDto> {
|
|
605
|
+
readonly objectType = "builder-sum-score-variable";
|
|
606
|
+
readonly id: SumScoreVariableID;
|
|
607
|
+
private _useAvg;
|
|
608
|
+
private _name;
|
|
609
|
+
private _description;
|
|
610
|
+
private _error;
|
|
611
|
+
private _usedIn;
|
|
612
|
+
get usedIn(): BuilderPage[];
|
|
613
|
+
static readonly create: (data: {
|
|
614
|
+
name: string;
|
|
615
|
+
description: string;
|
|
616
|
+
useAvg: boolean;
|
|
617
|
+
}) => SumScoreVariable;
|
|
618
|
+
get hasErrors(): boolean;
|
|
619
|
+
static fromDto: (dto: SumScoreVariableDto) => SumScoreVariable;
|
|
620
|
+
private constructor();
|
|
621
|
+
toJson(): SumScoreVariableDto;
|
|
622
|
+
clone(): SumScoreVariableDto;
|
|
623
|
+
get name(): string;
|
|
624
|
+
get description(): string;
|
|
625
|
+
get useAvg(): boolean;
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
/**
|
|
629
|
+
* Interface representing a code book question sum-score.
|
|
630
|
+
*
|
|
631
|
+
* @interface
|
|
632
|
+
*/
|
|
633
|
+
interface CodeBookQuestionVariable {
|
|
634
|
+
readonly kind: "codebook-question-variable";
|
|
635
|
+
readonly label: string;
|
|
636
|
+
readonly varId: string;
|
|
637
|
+
readonly pageId: PageID;
|
|
638
|
+
readonly pagePrefix: string;
|
|
639
|
+
readonly modulePrefix: string;
|
|
640
|
+
readonly pagePosition: number;
|
|
641
|
+
readonly options: ReadonlyArray<{
|
|
642
|
+
label: string;
|
|
643
|
+
value: number;
|
|
644
|
+
}>;
|
|
645
|
+
readonly includedInSumScores: ReadonlyArray<SumScoreVariableDto>;
|
|
646
|
+
}
|
|
647
|
+
interface CodebookPredefinedVariable {
|
|
648
|
+
readonly kind: "codebook-predefined-variable";
|
|
649
|
+
readonly modulePrefix: string;
|
|
650
|
+
readonly moduleID: string;
|
|
651
|
+
defaultValue: number;
|
|
652
|
+
options: Array<{
|
|
653
|
+
label: string;
|
|
654
|
+
value: number;
|
|
655
|
+
}>;
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
interface Codebook {
|
|
659
|
+
readonly predefinedVariables: ReadonlyArray<CodebookPredefinedVariable>;
|
|
660
|
+
readonly pageVariables: ReadonlyArray<CodeBookQuestionVariable>;
|
|
661
|
+
}
|
|
662
|
+
declare const _CodeBook: {
|
|
663
|
+
readonly fromSchema: (schema: BuilderSchemaDto) => Codebook;
|
|
664
|
+
};
|
|
665
|
+
declare const CodeBook: Readonly<{
|
|
666
|
+
readonly fromSchema: (schema: BuilderSchemaDto) => Codebook;
|
|
667
|
+
}>;
|
|
668
|
+
|
|
669
|
+
/**
|
|
670
|
+
* This interface is ment to define all information that a schema-admin app
|
|
671
|
+
* needs to generate a dynamic form for setting values for predefined variables.
|
|
672
|
+
*/
|
|
673
|
+
interface SchemaConfig {
|
|
674
|
+
readonly schemaName: string;
|
|
675
|
+
readonly schemaId: string;
|
|
676
|
+
readonly schemaPrefix: string;
|
|
677
|
+
readonly variables: ReadonlyArray<CodebookPredefinedVariable>;
|
|
678
|
+
}
|
|
679
|
+
declare const SchemaConfig: {
|
|
680
|
+
readonly fromSchema: (schema: BuilderSchemaDto) => SchemaConfig;
|
|
681
|
+
};
|
|
682
|
+
|
|
683
|
+
interface CompilerOutput {
|
|
684
|
+
schema: SchemaDto;
|
|
685
|
+
codebook: Codebook;
|
|
686
|
+
schemaConfig: SchemaConfig;
|
|
687
|
+
}
|
|
688
|
+
interface CompilerOption {
|
|
689
|
+
blockAutoplayQuestion: boolean;
|
|
690
|
+
blockAutoplayVideo: boolean;
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
interface BuilderSchemaDto {
|
|
694
|
+
readonly id: SchemaID;
|
|
695
|
+
readonly prefix: SchemaPrefixValue;
|
|
696
|
+
readonly mainImage: ImageFile | false;
|
|
697
|
+
readonly backgroundColor: string;
|
|
698
|
+
readonly name: string;
|
|
699
|
+
readonly pages: ReadonlyArray<BuilderPageDto>;
|
|
700
|
+
readonly baseHeight: number;
|
|
701
|
+
readonly baseWidth: number;
|
|
702
|
+
readonly predefinedVariables?: Array<CodebookPredefinedVariable>;
|
|
703
|
+
readonly sumScoreVariables?: ReadonlyArray<SumScoreVariableDto>;
|
|
704
|
+
readonly rules: ReadonlyArray<BuilderRuleDto>;
|
|
705
|
+
readonly tags: ReadonlyArray<BuilderTagDto>;
|
|
706
|
+
}
|
|
707
|
+
declare class BuilderSchema {
|
|
708
|
+
readonly id: SchemaID;
|
|
709
|
+
name: string;
|
|
710
|
+
readonly prefix: SchemaPrefix;
|
|
711
|
+
baseHeight: number;
|
|
712
|
+
baseWidth: number;
|
|
713
|
+
backgroundColor: string;
|
|
714
|
+
private readonly _pageCollection;
|
|
715
|
+
mainImage: ImageFile | false;
|
|
716
|
+
predefinedVariables: CodebookPredefinedVariable[];
|
|
717
|
+
private _rules;
|
|
718
|
+
private readonly _sumScoreCollection;
|
|
719
|
+
get rules(): ReadonlyArray<BuilderRule>;
|
|
720
|
+
get pages(): ReadonlyArray<BuilderPage>;
|
|
721
|
+
get sumScoreVariables(): ReadonlyArray<SumScoreVariable>;
|
|
722
|
+
private readonly _tagCollection;
|
|
723
|
+
get tags(): ReadonlyArray<BuilderTag>;
|
|
724
|
+
static create(id: SchemaID, name: string, prefix: SchemaPrefixValue): BuilderSchema;
|
|
725
|
+
static fromJson(dto: BuilderSchemaDto): BuilderSchema;
|
|
726
|
+
toJson(): BuilderSchemaDto;
|
|
727
|
+
private constructor();
|
|
728
|
+
addPage(type: BuilderPageType, atIndex?: number): BuilderPage;
|
|
729
|
+
sumScoreVariableCreate(options: {
|
|
730
|
+
name: string;
|
|
731
|
+
description: string;
|
|
732
|
+
useAvg: boolean;
|
|
733
|
+
}): SumScoreVariable;
|
|
734
|
+
sumScoreVariableAddToPage(sumScoreVariable: SumScoreVariable, page: BuilderPage, weight: number): boolean;
|
|
735
|
+
private updateSumScoreRelations;
|
|
736
|
+
sumScoreVariableUpdate(id: SumScoreVariableID, data: Partial<SumScoreVariableDto>): boolean;
|
|
737
|
+
sumScoreVariableDeleteFromPage(pageId: PageID, sumScoreVariableId: SumScoreVariableID): void;
|
|
738
|
+
insertPage(page: BuilderPage, atIndex: number): boolean;
|
|
739
|
+
private insertPageAtIndex;
|
|
740
|
+
addRule(): BuilderRule;
|
|
741
|
+
deleteRule(rule: BuilderRule): void;
|
|
742
|
+
movePage(page: BuilderPage, toIndex: number): boolean;
|
|
743
|
+
deletePage(page: BuilderPage): boolean;
|
|
744
|
+
reevaluateRules(): void;
|
|
745
|
+
getRuleInput(): RuleInput;
|
|
746
|
+
deleteTags(tags: ReadonlyArray<BuilderTag>): void;
|
|
747
|
+
addTag(builderTag: BuilderTag): void;
|
|
748
|
+
compile(options?: CompilerOption): CompilerOutput;
|
|
749
|
+
sumScoreVariableDelete(id: SumScoreVariableID): boolean;
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
interface BuilderTextDto {
|
|
753
|
+
readonly id: TextID;
|
|
754
|
+
text: string;
|
|
755
|
+
name: string;
|
|
756
|
+
translationRequired: boolean;
|
|
757
|
+
}
|
|
758
|
+
declare class BuilderText extends BuilderObject<"builder-text", BuilderTextDto> {
|
|
759
|
+
readonly objectType = "builder-text";
|
|
760
|
+
id: TextID;
|
|
761
|
+
text: string;
|
|
762
|
+
name: string;
|
|
763
|
+
translateRequired: boolean;
|
|
764
|
+
private constructor();
|
|
765
|
+
static create(name: string): BuilderText;
|
|
766
|
+
static fromJson(dto: BuilderTextDto): BuilderText;
|
|
767
|
+
clone(): BuilderTextDto;
|
|
768
|
+
toJson(): BuilderTextDto;
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
interface SumScoreAnswer {
|
|
772
|
+
readonly varId: string;
|
|
773
|
+
readonly varLabel: string;
|
|
774
|
+
readonly value: number;
|
|
775
|
+
readonly valueLabel: string;
|
|
776
|
+
}
|
|
777
|
+
|
|
778
|
+
interface SumScore {
|
|
779
|
+
sumScore: number;
|
|
780
|
+
avg: number;
|
|
781
|
+
useAvg: boolean;
|
|
782
|
+
includedAnswerCount: number;
|
|
783
|
+
missingAnswerCount: number;
|
|
784
|
+
skippedBy9Count: number;
|
|
785
|
+
basedOn: Array<{
|
|
786
|
+
varId: string;
|
|
787
|
+
value: number;
|
|
788
|
+
weight: number;
|
|
789
|
+
varLabel: string;
|
|
790
|
+
}>;
|
|
791
|
+
errorMessages: string[];
|
|
792
|
+
}
|
|
793
|
+
declare const SumScore: {
|
|
794
|
+
ALLOWED_VALUES: number[];
|
|
795
|
+
calculate: (sumScoreVariable: SumScoreVariableDto, basedOnVariables: Array<{
|
|
796
|
+
varId: string;
|
|
797
|
+
weight: number;
|
|
798
|
+
}>, answers: Array<SumScoreAnswer>) => SumScore;
|
|
799
|
+
calculateAll: (schemaDto: BuilderSchemaDto, answers: Array<SumScoreAnswer>) => ReadonlyArray<SumScore>;
|
|
800
|
+
isAllowedValue: (num: number) => boolean;
|
|
801
|
+
createVariable: () => SumScoreVariableDto;
|
|
802
|
+
};
|
|
803
|
+
|
|
804
|
+
declare class TagCollection implements Iterable<BuilderTag> {
|
|
805
|
+
private readonly _tags;
|
|
806
|
+
static readonly create: () => TagCollection;
|
|
807
|
+
[Symbol.iterator](): IterableIterator<BuilderTag>;
|
|
808
|
+
private constructor();
|
|
809
|
+
init(tags: ReadonlyArray<BuilderTagDto>): void;
|
|
810
|
+
add(tag: BuilderTag): void;
|
|
811
|
+
/**
|
|
812
|
+
* Delete this tag from collection;
|
|
813
|
+
* @param tag
|
|
814
|
+
*/
|
|
815
|
+
delete(tag: BuilderTag): void;
|
|
816
|
+
toJson(): ReadonlyArray<BuilderTagDto>;
|
|
817
|
+
deleteAll(tags: Iterable<BuilderTag>): void;
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
export { type AudioFile, BuilderCondition, type BuilderConditionDto, BuilderConditionGroup, type BuilderConditionGroupDto, type BuilderMainImageDto, BuilderMainText, type BuilderMainTextDto, type BuilderMainVideoDto, BuilderOperator, BuilderOption, type BuilderOptionDto, BuilderPage, type BuilderPageDto, type BuilderPageType, BuilderQuestion, type BuilderQuestionDto, type BuilderQuestionType, BuilderRule, type BuilderRuleDto, BuilderSchema, type BuilderSchemaDto, BuilderTag, type BuilderTagDto, BuilderText, type BuilderTextDto, CodeBook, type CodeBookQuestionVariable, type Codebook, type CodebookPredefinedVariable, type CompilerOption, type CompilerOutput, ConditionGroupType, type ExcludeByPageAction, ExcludeByPageIdSelectItem, type ExcludeByTagAction, ExcludeByTagSelectItem, type ID, type ImageFile, JumpToActionManager, type JumpToPageAction, JumpToPageSelectItem, MultiSelectItem, OperatorSelectItem, OptionID, PageActionManager, PageID, PagePrefix, type PagePrefixValue, QuestionID, RuleCustomVariable, RuleInput, RuleOptionSelectItem, RuleQuestionVariable, type RuleVariable, RuleVariableOption, RuleVariableSelectItem, SchemaConfig, SchemaID, SchemaPrefix, type SchemaPrefixValue, SingleSelectItem, SumScore, type SumScoreAnswer, SumScoreVariable, type SumScoreVariableDto, SumScoreVariableID, TagActionManager, TagCollection, TagID, TextID, VarID, type VideoFile, _CodeBook, createTypedIdSingleton };
|