@media-quest/builder 0.0.6 → 0.0.8
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.mts +51 -39
- package/dist/public-api.d.ts +51 -39
- package/dist/public-api.js +152 -49
- package/dist/public-api.mjs +153 -50
- package/package.json +3 -3
- package/src/Builder-page.spec.ts +21 -15
- package/src/Builder-page.ts +21 -18
- package/src/Builder-schema.spec.ts +270 -268
- package/src/Builder-schema.ts +32 -31
- package/src/BuilderObject.ts +0 -8
- package/src/prefix.spec.ts +5 -0
- package/src/prefix.ts +107 -0
- package/src/rulebuilder/Builder-rule.spec.ts +64 -35
- package/src/rulebuilder/Builder-rule.ts +3 -3
- package/src/rulebuilder/RuleAction.ts +7 -5
- package/src/rulebuilder/RuleBuilder-test-utils.ts +61 -30
- package/src/rulebuilder/RuleVariable.ts +6 -2
- package/src/rulebuilder/condition/Builder-condition-group.ts +2 -2
- package/src/rulebuilder/condition/Builder-condition.spec.ts +38 -29
- package/src/rulebuilder/condition/Builder-condition.ts +2 -2
- package/src/theme/IDefaultTheme.ts +2 -2
- package/src/theme/default-theme-compiler.ts +9 -6
package/dist/public-api.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DStyle, Condition, PageQueRules, SchemaDto } from '@media-quest/engine';
|
|
1
|
+
import { DStyle, PageID, Condition, PageQueRules, SchemaID, SchemaDto } from '@media-quest/engine';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Builder objects are complex objects that are embedded inside
|
|
@@ -13,24 +13,12 @@ declare namespace BuilderObjectId {
|
|
|
13
13
|
type QuestionID = string & {
|
|
14
14
|
__QUESTION__ID__: true;
|
|
15
15
|
};
|
|
16
|
-
type VideoFileID = string & {
|
|
17
|
-
__VIDEO__ID__: true;
|
|
18
|
-
};
|
|
19
|
-
type AudioFileID = string & {
|
|
20
|
-
__AUDIO__ID__: true;
|
|
21
|
-
};
|
|
22
|
-
type ImageID = string & {
|
|
23
|
-
__IMAGE__ID__: true;
|
|
24
|
-
};
|
|
25
16
|
type TextID = string & {
|
|
26
17
|
__TEXT__ID__: true;
|
|
27
18
|
};
|
|
28
19
|
type MainTextID = string & {
|
|
29
20
|
__MAIN__TEXT__ID__: true;
|
|
30
21
|
};
|
|
31
|
-
type PageID = string & {
|
|
32
|
-
__PAGE__ID__: true;
|
|
33
|
-
};
|
|
34
22
|
type TagId = string & {
|
|
35
23
|
__TAG__ID__: true;
|
|
36
24
|
};
|
|
@@ -39,7 +27,6 @@ declare namespace BuilderObjectId {
|
|
|
39
27
|
const textId: () => TextID;
|
|
40
28
|
const questionOptionId: () => QuestionOptionID;
|
|
41
29
|
const questionId: () => QuestionID;
|
|
42
|
-
const pageId: () => PageID;
|
|
43
30
|
}
|
|
44
31
|
declare abstract class BuilderObject<T extends BuilderObjectType, Dto extends {}> {
|
|
45
32
|
abstract readonly objectType: T;
|
|
@@ -180,6 +167,31 @@ declare class BuilderMainText extends BuilderObject<"builder-main-text", Builder
|
|
|
180
167
|
set audioFile(audioFile: AudioFile | false);
|
|
181
168
|
}
|
|
182
169
|
|
|
170
|
+
type SchemaPrefixValue = string & {
|
|
171
|
+
__SCHEMA_PREFIX__: true;
|
|
172
|
+
};
|
|
173
|
+
type PagePrefixValue = string & {
|
|
174
|
+
__PAGE_PREFIX__: true;
|
|
175
|
+
};
|
|
176
|
+
type VarID = `${SchemaPrefixValue}_${PagePrefixValue}`;
|
|
177
|
+
declare const VarID: {
|
|
178
|
+
create: (schemaPrefix: SchemaPrefixValue, pagePrefix: PagePrefixValue) => VarID;
|
|
179
|
+
};
|
|
180
|
+
declare class SchemaPrefix {
|
|
181
|
+
private _value;
|
|
182
|
+
static readonly MIN_LENGTH = 1;
|
|
183
|
+
private static randomLen;
|
|
184
|
+
static readonly MAX_LENGTH = 16;
|
|
185
|
+
static fromValue: (value: SchemaPrefixValue) => SchemaPrefix;
|
|
186
|
+
static fromValueOrThrow: (value: string) => SchemaPrefix;
|
|
187
|
+
static fromString: (value: string) => SchemaPrefix | false;
|
|
188
|
+
static castOrCreateRandom: (value: string) => SchemaPrefix;
|
|
189
|
+
static isValid: (prefix: string | 999) => prefix is SchemaPrefixValue;
|
|
190
|
+
get value(): SchemaPrefixValue;
|
|
191
|
+
set value(value: string);
|
|
192
|
+
private constructor();
|
|
193
|
+
}
|
|
194
|
+
|
|
183
195
|
declare const BuilderVariableType: {
|
|
184
196
|
readonly numericWithOptions: true;
|
|
185
197
|
readonly numeric: true;
|
|
@@ -198,28 +210,28 @@ declare class BuilderVariableOption {
|
|
|
198
210
|
constructor(label: string, value: number);
|
|
199
211
|
}
|
|
200
212
|
declare class QuestionVariable {
|
|
201
|
-
readonly varId:
|
|
213
|
+
readonly varId: VarID;
|
|
202
214
|
readonly label: string;
|
|
203
215
|
readonly options: ReadonlyArray<BuilderVariableOption>;
|
|
204
216
|
readonly pageNumber: number;
|
|
205
217
|
readonly kind: "question-variable";
|
|
206
218
|
readonly dataType: BuilderVariableType;
|
|
207
|
-
constructor(varId:
|
|
219
|
+
constructor(varId: VarID, label: string, options: ReadonlyArray<BuilderVariableOption>, pageNumber: number);
|
|
208
220
|
}
|
|
209
221
|
declare class CustomVariable {
|
|
210
|
-
readonly varId:
|
|
222
|
+
readonly varId: VarID;
|
|
211
223
|
readonly label: string;
|
|
212
224
|
readonly options: ReadonlyArray<BuilderVariableOption>;
|
|
213
225
|
readonly kind: "configuration-variable";
|
|
214
226
|
readonly dataType: BuilderVariableType;
|
|
215
|
-
constructor(varId:
|
|
227
|
+
constructor(varId: VarID, label: string, options: ReadonlyArray<BuilderVariableOption>);
|
|
216
228
|
}
|
|
217
229
|
type BuilderVariable = QuestionVariable | CustomVariable;
|
|
218
230
|
|
|
219
231
|
type BuilderPageType = "info-page" | "question" | "multi-select" | "form";
|
|
220
232
|
interface BuilderPageDto {
|
|
221
|
-
readonly id:
|
|
222
|
-
prefix:
|
|
233
|
+
readonly id: PageID;
|
|
234
|
+
readonly prefix: PagePrefixValue;
|
|
223
235
|
_type: BuilderPageType;
|
|
224
236
|
mainText: BuilderMainTextDto;
|
|
225
237
|
nextButton: BuilderOptionDto;
|
|
@@ -231,7 +243,7 @@ interface BuilderPageDto {
|
|
|
231
243
|
}
|
|
232
244
|
declare class BuilderPage extends BuilderObject<"builder-page", BuilderPageDto> {
|
|
233
245
|
readonly objectType: "builder-page";
|
|
234
|
-
readonly id:
|
|
246
|
+
readonly id: PageID;
|
|
235
247
|
private _pageType;
|
|
236
248
|
private _prefix;
|
|
237
249
|
private _questions;
|
|
@@ -241,7 +253,7 @@ declare class BuilderPage extends BuilderObject<"builder-page", BuilderPageDto>
|
|
|
241
253
|
defaultQuestion: BuilderQuestion;
|
|
242
254
|
mainText: BuilderMainText;
|
|
243
255
|
nextButton: BuilderOption;
|
|
244
|
-
static create(type: BuilderPageType, _prefix:
|
|
256
|
+
static create(type: BuilderPageType, _prefix: PagePrefixValue): BuilderPage;
|
|
245
257
|
static fromJson(dto: BuilderPageDto): BuilderPage;
|
|
246
258
|
private constructor();
|
|
247
259
|
insertQuestion(question: BuilderQuestion, atIndex: number): boolean;
|
|
@@ -257,11 +269,11 @@ declare class BuilderPage extends BuilderObject<"builder-page", BuilderPageDto>
|
|
|
257
269
|
addTag(tag: string): void;
|
|
258
270
|
deleteTag(tag: string): void;
|
|
259
271
|
set pageType(value: BuilderPageType);
|
|
260
|
-
getQuestionVariables(modulePrefix:
|
|
272
|
+
getQuestionVariables(modulePrefix: SchemaPrefix, pageNumber: number): ReadonlyArray<QuestionVariable>;
|
|
261
273
|
get tags(): ReadonlyArray<string>;
|
|
262
274
|
get pageType(): BuilderPageType;
|
|
263
|
-
get prefix():
|
|
264
|
-
set prefix(value:
|
|
275
|
+
get prefix(): PagePrefixValue;
|
|
276
|
+
set prefix(value: PagePrefixValue);
|
|
265
277
|
toJson(): BuilderPageDto;
|
|
266
278
|
clone(): BuilderPageDto;
|
|
267
279
|
get backgroundColor(): string;
|
|
@@ -270,19 +282,19 @@ declare class BuilderPage extends BuilderObject<"builder-page", BuilderPageDto>
|
|
|
270
282
|
}
|
|
271
283
|
|
|
272
284
|
interface ExcludeByPageAction {
|
|
273
|
-
readonly kind:
|
|
274
|
-
readonly pageId:
|
|
285
|
+
readonly kind: "exclude-by-pageId";
|
|
286
|
+
readonly pageId: PageID;
|
|
275
287
|
readonly mainText: string;
|
|
276
288
|
readonly pageNumber: number;
|
|
277
289
|
}
|
|
278
290
|
interface JumpToPageAction {
|
|
279
|
-
readonly kind:
|
|
280
|
-
readonly pageId:
|
|
291
|
+
readonly kind: "jump-to-page";
|
|
292
|
+
readonly pageId: PageID;
|
|
281
293
|
readonly mainText: string;
|
|
282
294
|
readonly pageNumber: number;
|
|
283
295
|
}
|
|
284
296
|
interface ExcludeByTagAction {
|
|
285
|
-
readonly kind:
|
|
297
|
+
readonly kind: "exclude-by-tag";
|
|
286
298
|
readonly tag: string;
|
|
287
299
|
readonly description: string;
|
|
288
300
|
readonly pageCount: number;
|
|
@@ -445,7 +457,7 @@ declare class BuilderCondition extends BuilderObject<"builder-condition", Builde
|
|
|
445
457
|
isValid: false;
|
|
446
458
|
message: string;
|
|
447
459
|
};
|
|
448
|
-
toEngineCondition(
|
|
460
|
+
toEngineCondition(): Condition.Simple | false;
|
|
449
461
|
private findVariableInUniverse;
|
|
450
462
|
set operator(operator: BuilderOperator | "");
|
|
451
463
|
get operator(): BuilderOperator | "";
|
|
@@ -486,7 +498,7 @@ declare class BuilderConditionGroup extends BuilderObject<"builder-condition-gro
|
|
|
486
498
|
removeCondition(condition: BuilderCondition): boolean;
|
|
487
499
|
clone(): BuilderConditionGroupDto;
|
|
488
500
|
toJson(): BuilderConditionGroupDto;
|
|
489
|
-
toEngineConditionComplex(
|
|
501
|
+
toEngineConditionComplex(): Condition.Complex | false;
|
|
490
502
|
get type(): ConditionGroupType;
|
|
491
503
|
set type(conditionGroupType: ConditionGroupType);
|
|
492
504
|
}
|
|
@@ -564,7 +576,7 @@ declare class BuilderRule extends BuilderObject<"builder-rule", BuilderRuleDto>
|
|
|
564
576
|
addConditionGroup(): BuilderConditionGroup;
|
|
565
577
|
clone(): BuilderRuleDto;
|
|
566
578
|
toJson(): BuilderRuleDto;
|
|
567
|
-
toEngineRule(
|
|
579
|
+
toEngineRule(): PageQueRules;
|
|
568
580
|
}
|
|
569
581
|
|
|
570
582
|
declare class PageActionManager {
|
|
@@ -588,8 +600,8 @@ declare class TagActionManager {
|
|
|
588
600
|
}
|
|
589
601
|
|
|
590
602
|
interface BuilderSchemaDto {
|
|
591
|
-
readonly id:
|
|
592
|
-
readonly prefix:
|
|
603
|
+
readonly id: SchemaID;
|
|
604
|
+
readonly prefix: SchemaPrefixValue;
|
|
593
605
|
readonly mainImage: ImageFile | false;
|
|
594
606
|
readonly backgroundColor: string;
|
|
595
607
|
readonly name: string;
|
|
@@ -605,9 +617,9 @@ interface SchemaBuildOutput {
|
|
|
605
617
|
schemaConfig: Record<string, string>;
|
|
606
618
|
}
|
|
607
619
|
declare class BuilderSchema {
|
|
608
|
-
readonly id:
|
|
620
|
+
readonly id: SchemaID;
|
|
609
621
|
name: string;
|
|
610
|
-
|
|
622
|
+
private readonly _prefix;
|
|
611
623
|
baseHeight: number;
|
|
612
624
|
baseWidth: number;
|
|
613
625
|
backgroundColor: string;
|
|
@@ -615,9 +627,10 @@ declare class BuilderSchema {
|
|
|
615
627
|
mainImage: ImageFile | false;
|
|
616
628
|
private _rules;
|
|
617
629
|
get rules(): ReadonlyArray<BuilderRule>;
|
|
630
|
+
get prefix(): SchemaPrefixValue;
|
|
618
631
|
private readonly _tagCollection;
|
|
619
632
|
get tags(): ReadonlyArray<BuilderTag>;
|
|
620
|
-
static create(id:
|
|
633
|
+
static create(id: SchemaID, name: string, prefix: SchemaPrefixValue): BuilderSchema;
|
|
621
634
|
static fromJson(dto: BuilderSchemaDto): BuilderSchema;
|
|
622
635
|
toJson(): BuilderSchemaDto;
|
|
623
636
|
private constructor();
|
|
@@ -632,7 +645,6 @@ declare class BuilderSchema {
|
|
|
632
645
|
getRuleInput(): RuleInput;
|
|
633
646
|
deleteTags(tags: ReadonlyArray<BuilderTag>): void;
|
|
634
647
|
addTag(builderTag: BuilderTag): void;
|
|
635
|
-
private getQuestionVariables;
|
|
636
648
|
compile(): SchemaBuildOutput;
|
|
637
649
|
}
|
|
638
650
|
|
package/dist/public-api.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DStyle, Condition, PageQueRules, SchemaDto } from '@media-quest/engine';
|
|
1
|
+
import { DStyle, PageID, Condition, PageQueRules, SchemaID, SchemaDto } from '@media-quest/engine';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Builder objects are complex objects that are embedded inside
|
|
@@ -13,24 +13,12 @@ declare namespace BuilderObjectId {
|
|
|
13
13
|
type QuestionID = string & {
|
|
14
14
|
__QUESTION__ID__: true;
|
|
15
15
|
};
|
|
16
|
-
type VideoFileID = string & {
|
|
17
|
-
__VIDEO__ID__: true;
|
|
18
|
-
};
|
|
19
|
-
type AudioFileID = string & {
|
|
20
|
-
__AUDIO__ID__: true;
|
|
21
|
-
};
|
|
22
|
-
type ImageID = string & {
|
|
23
|
-
__IMAGE__ID__: true;
|
|
24
|
-
};
|
|
25
16
|
type TextID = string & {
|
|
26
17
|
__TEXT__ID__: true;
|
|
27
18
|
};
|
|
28
19
|
type MainTextID = string & {
|
|
29
20
|
__MAIN__TEXT__ID__: true;
|
|
30
21
|
};
|
|
31
|
-
type PageID = string & {
|
|
32
|
-
__PAGE__ID__: true;
|
|
33
|
-
};
|
|
34
22
|
type TagId = string & {
|
|
35
23
|
__TAG__ID__: true;
|
|
36
24
|
};
|
|
@@ -39,7 +27,6 @@ declare namespace BuilderObjectId {
|
|
|
39
27
|
const textId: () => TextID;
|
|
40
28
|
const questionOptionId: () => QuestionOptionID;
|
|
41
29
|
const questionId: () => QuestionID;
|
|
42
|
-
const pageId: () => PageID;
|
|
43
30
|
}
|
|
44
31
|
declare abstract class BuilderObject<T extends BuilderObjectType, Dto extends {}> {
|
|
45
32
|
abstract readonly objectType: T;
|
|
@@ -180,6 +167,31 @@ declare class BuilderMainText extends BuilderObject<"builder-main-text", Builder
|
|
|
180
167
|
set audioFile(audioFile: AudioFile | false);
|
|
181
168
|
}
|
|
182
169
|
|
|
170
|
+
type SchemaPrefixValue = string & {
|
|
171
|
+
__SCHEMA_PREFIX__: true;
|
|
172
|
+
};
|
|
173
|
+
type PagePrefixValue = string & {
|
|
174
|
+
__PAGE_PREFIX__: true;
|
|
175
|
+
};
|
|
176
|
+
type VarID = `${SchemaPrefixValue}_${PagePrefixValue}`;
|
|
177
|
+
declare const VarID: {
|
|
178
|
+
create: (schemaPrefix: SchemaPrefixValue, pagePrefix: PagePrefixValue) => VarID;
|
|
179
|
+
};
|
|
180
|
+
declare class SchemaPrefix {
|
|
181
|
+
private _value;
|
|
182
|
+
static readonly MIN_LENGTH = 1;
|
|
183
|
+
private static randomLen;
|
|
184
|
+
static readonly MAX_LENGTH = 16;
|
|
185
|
+
static fromValue: (value: SchemaPrefixValue) => SchemaPrefix;
|
|
186
|
+
static fromValueOrThrow: (value: string) => SchemaPrefix;
|
|
187
|
+
static fromString: (value: string) => SchemaPrefix | false;
|
|
188
|
+
static castOrCreateRandom: (value: string) => SchemaPrefix;
|
|
189
|
+
static isValid: (prefix: string | 999) => prefix is SchemaPrefixValue;
|
|
190
|
+
get value(): SchemaPrefixValue;
|
|
191
|
+
set value(value: string);
|
|
192
|
+
private constructor();
|
|
193
|
+
}
|
|
194
|
+
|
|
183
195
|
declare const BuilderVariableType: {
|
|
184
196
|
readonly numericWithOptions: true;
|
|
185
197
|
readonly numeric: true;
|
|
@@ -198,28 +210,28 @@ declare class BuilderVariableOption {
|
|
|
198
210
|
constructor(label: string, value: number);
|
|
199
211
|
}
|
|
200
212
|
declare class QuestionVariable {
|
|
201
|
-
readonly varId:
|
|
213
|
+
readonly varId: VarID;
|
|
202
214
|
readonly label: string;
|
|
203
215
|
readonly options: ReadonlyArray<BuilderVariableOption>;
|
|
204
216
|
readonly pageNumber: number;
|
|
205
217
|
readonly kind: "question-variable";
|
|
206
218
|
readonly dataType: BuilderVariableType;
|
|
207
|
-
constructor(varId:
|
|
219
|
+
constructor(varId: VarID, label: string, options: ReadonlyArray<BuilderVariableOption>, pageNumber: number);
|
|
208
220
|
}
|
|
209
221
|
declare class CustomVariable {
|
|
210
|
-
readonly varId:
|
|
222
|
+
readonly varId: VarID;
|
|
211
223
|
readonly label: string;
|
|
212
224
|
readonly options: ReadonlyArray<BuilderVariableOption>;
|
|
213
225
|
readonly kind: "configuration-variable";
|
|
214
226
|
readonly dataType: BuilderVariableType;
|
|
215
|
-
constructor(varId:
|
|
227
|
+
constructor(varId: VarID, label: string, options: ReadonlyArray<BuilderVariableOption>);
|
|
216
228
|
}
|
|
217
229
|
type BuilderVariable = QuestionVariable | CustomVariable;
|
|
218
230
|
|
|
219
231
|
type BuilderPageType = "info-page" | "question" | "multi-select" | "form";
|
|
220
232
|
interface BuilderPageDto {
|
|
221
|
-
readonly id:
|
|
222
|
-
prefix:
|
|
233
|
+
readonly id: PageID;
|
|
234
|
+
readonly prefix: PagePrefixValue;
|
|
223
235
|
_type: BuilderPageType;
|
|
224
236
|
mainText: BuilderMainTextDto;
|
|
225
237
|
nextButton: BuilderOptionDto;
|
|
@@ -231,7 +243,7 @@ interface BuilderPageDto {
|
|
|
231
243
|
}
|
|
232
244
|
declare class BuilderPage extends BuilderObject<"builder-page", BuilderPageDto> {
|
|
233
245
|
readonly objectType: "builder-page";
|
|
234
|
-
readonly id:
|
|
246
|
+
readonly id: PageID;
|
|
235
247
|
private _pageType;
|
|
236
248
|
private _prefix;
|
|
237
249
|
private _questions;
|
|
@@ -241,7 +253,7 @@ declare class BuilderPage extends BuilderObject<"builder-page", BuilderPageDto>
|
|
|
241
253
|
defaultQuestion: BuilderQuestion;
|
|
242
254
|
mainText: BuilderMainText;
|
|
243
255
|
nextButton: BuilderOption;
|
|
244
|
-
static create(type: BuilderPageType, _prefix:
|
|
256
|
+
static create(type: BuilderPageType, _prefix: PagePrefixValue): BuilderPage;
|
|
245
257
|
static fromJson(dto: BuilderPageDto): BuilderPage;
|
|
246
258
|
private constructor();
|
|
247
259
|
insertQuestion(question: BuilderQuestion, atIndex: number): boolean;
|
|
@@ -257,11 +269,11 @@ declare class BuilderPage extends BuilderObject<"builder-page", BuilderPageDto>
|
|
|
257
269
|
addTag(tag: string): void;
|
|
258
270
|
deleteTag(tag: string): void;
|
|
259
271
|
set pageType(value: BuilderPageType);
|
|
260
|
-
getQuestionVariables(modulePrefix:
|
|
272
|
+
getQuestionVariables(modulePrefix: SchemaPrefix, pageNumber: number): ReadonlyArray<QuestionVariable>;
|
|
261
273
|
get tags(): ReadonlyArray<string>;
|
|
262
274
|
get pageType(): BuilderPageType;
|
|
263
|
-
get prefix():
|
|
264
|
-
set prefix(value:
|
|
275
|
+
get prefix(): PagePrefixValue;
|
|
276
|
+
set prefix(value: PagePrefixValue);
|
|
265
277
|
toJson(): BuilderPageDto;
|
|
266
278
|
clone(): BuilderPageDto;
|
|
267
279
|
get backgroundColor(): string;
|
|
@@ -270,19 +282,19 @@ declare class BuilderPage extends BuilderObject<"builder-page", BuilderPageDto>
|
|
|
270
282
|
}
|
|
271
283
|
|
|
272
284
|
interface ExcludeByPageAction {
|
|
273
|
-
readonly kind:
|
|
274
|
-
readonly pageId:
|
|
285
|
+
readonly kind: "exclude-by-pageId";
|
|
286
|
+
readonly pageId: PageID;
|
|
275
287
|
readonly mainText: string;
|
|
276
288
|
readonly pageNumber: number;
|
|
277
289
|
}
|
|
278
290
|
interface JumpToPageAction {
|
|
279
|
-
readonly kind:
|
|
280
|
-
readonly pageId:
|
|
291
|
+
readonly kind: "jump-to-page";
|
|
292
|
+
readonly pageId: PageID;
|
|
281
293
|
readonly mainText: string;
|
|
282
294
|
readonly pageNumber: number;
|
|
283
295
|
}
|
|
284
296
|
interface ExcludeByTagAction {
|
|
285
|
-
readonly kind:
|
|
297
|
+
readonly kind: "exclude-by-tag";
|
|
286
298
|
readonly tag: string;
|
|
287
299
|
readonly description: string;
|
|
288
300
|
readonly pageCount: number;
|
|
@@ -445,7 +457,7 @@ declare class BuilderCondition extends BuilderObject<"builder-condition", Builde
|
|
|
445
457
|
isValid: false;
|
|
446
458
|
message: string;
|
|
447
459
|
};
|
|
448
|
-
toEngineCondition(
|
|
460
|
+
toEngineCondition(): Condition.Simple | false;
|
|
449
461
|
private findVariableInUniverse;
|
|
450
462
|
set operator(operator: BuilderOperator | "");
|
|
451
463
|
get operator(): BuilderOperator | "";
|
|
@@ -486,7 +498,7 @@ declare class BuilderConditionGroup extends BuilderObject<"builder-condition-gro
|
|
|
486
498
|
removeCondition(condition: BuilderCondition): boolean;
|
|
487
499
|
clone(): BuilderConditionGroupDto;
|
|
488
500
|
toJson(): BuilderConditionGroupDto;
|
|
489
|
-
toEngineConditionComplex(
|
|
501
|
+
toEngineConditionComplex(): Condition.Complex | false;
|
|
490
502
|
get type(): ConditionGroupType;
|
|
491
503
|
set type(conditionGroupType: ConditionGroupType);
|
|
492
504
|
}
|
|
@@ -564,7 +576,7 @@ declare class BuilderRule extends BuilderObject<"builder-rule", BuilderRuleDto>
|
|
|
564
576
|
addConditionGroup(): BuilderConditionGroup;
|
|
565
577
|
clone(): BuilderRuleDto;
|
|
566
578
|
toJson(): BuilderRuleDto;
|
|
567
|
-
toEngineRule(
|
|
579
|
+
toEngineRule(): PageQueRules;
|
|
568
580
|
}
|
|
569
581
|
|
|
570
582
|
declare class PageActionManager {
|
|
@@ -588,8 +600,8 @@ declare class TagActionManager {
|
|
|
588
600
|
}
|
|
589
601
|
|
|
590
602
|
interface BuilderSchemaDto {
|
|
591
|
-
readonly id:
|
|
592
|
-
readonly prefix:
|
|
603
|
+
readonly id: SchemaID;
|
|
604
|
+
readonly prefix: SchemaPrefixValue;
|
|
593
605
|
readonly mainImage: ImageFile | false;
|
|
594
606
|
readonly backgroundColor: string;
|
|
595
607
|
readonly name: string;
|
|
@@ -605,9 +617,9 @@ interface SchemaBuildOutput {
|
|
|
605
617
|
schemaConfig: Record<string, string>;
|
|
606
618
|
}
|
|
607
619
|
declare class BuilderSchema {
|
|
608
|
-
readonly id:
|
|
620
|
+
readonly id: SchemaID;
|
|
609
621
|
name: string;
|
|
610
|
-
|
|
622
|
+
private readonly _prefix;
|
|
611
623
|
baseHeight: number;
|
|
612
624
|
baseWidth: number;
|
|
613
625
|
backgroundColor: string;
|
|
@@ -615,9 +627,10 @@ declare class BuilderSchema {
|
|
|
615
627
|
mainImage: ImageFile | false;
|
|
616
628
|
private _rules;
|
|
617
629
|
get rules(): ReadonlyArray<BuilderRule>;
|
|
630
|
+
get prefix(): SchemaPrefixValue;
|
|
618
631
|
private readonly _tagCollection;
|
|
619
632
|
get tags(): ReadonlyArray<BuilderTag>;
|
|
620
|
-
static create(id:
|
|
633
|
+
static create(id: SchemaID, name: string, prefix: SchemaPrefixValue): BuilderSchema;
|
|
621
634
|
static fromJson(dto: BuilderSchemaDto): BuilderSchema;
|
|
622
635
|
toJson(): BuilderSchemaDto;
|
|
623
636
|
private constructor();
|
|
@@ -632,7 +645,6 @@ declare class BuilderSchema {
|
|
|
632
645
|
getRuleInput(): RuleInput;
|
|
633
646
|
deleteTags(tags: ReadonlyArray<BuilderTag>): void;
|
|
634
647
|
addTag(builderTag: BuilderTag): void;
|
|
635
|
-
private getQuestionVariables;
|
|
636
648
|
compile(): SchemaBuildOutput;
|
|
637
649
|
}
|
|
638
650
|
|