@gmb/bitmark-parser-generator 1.5.7 → 1.5.9
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/browser/bitmark-parser-generator.min.js +1 -1
- package/dist/browser/bundle-report.html +2 -2
- package/dist/cjs/ast/Builder.js +41 -39
- package/dist/cjs/ast/Builder.js.map +1 -1
- package/dist/cjs/config/raw/bits.js +11 -0
- package/dist/cjs/config/raw/bits.js.map +1 -1
- package/dist/cjs/config/raw/groups.js +11 -10
- package/dist/cjs/config/raw/groups.js.map +1 -1
- package/dist/cjs/generated/build-info.js +1 -1
- package/dist/cjs/generator/bitmark/BitmarkGenerator.js +13 -3
- package/dist/cjs/generator/bitmark/BitmarkGenerator.js.map +1 -1
- package/dist/cjs/generator/json/JsonGenerator.js +119 -47
- package/dist/cjs/generator/json/JsonGenerator.js.map +1 -1
- package/dist/cjs/model/ast/NodeType.js +8 -4
- package/dist/cjs/model/ast/NodeType.js.map +1 -1
- package/dist/cjs/model/enum/BitType.js +1 -0
- package/dist/cjs/model/enum/BitType.js.map +1 -1
- package/dist/cjs/model/enum/TextFormat.js +2 -1
- package/dist/cjs/model/enum/TextFormat.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/BitmarkPegParserProcessor.js +79 -14
- package/dist/cjs/parser/bitmark/peg/BitmarkPegParserProcessor.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/BitmarkPegParserTypes.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/BitmarkPegParserValidator.js +28 -1
- package/dist/cjs/parser/bitmark/peg/BitmarkPegParserValidator.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.js +4 -4
- package/dist/cjs/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/CardContentProcessor.js +4 -4
- package/dist/cjs/parser/bitmark/peg/contentProcessors/CardContentProcessor.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.js +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.js +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ExampleTagContentProcessor.js +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ExampleTagContentProcessor.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/GapChainContentProcessor.js +5 -5
- package/dist/cjs/parser/bitmark/peg/contentProcessors/GapChainContentProcessor.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ImageSourceChainContentProcessor.js +7 -7
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ImageSourceChainContentProcessor.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ItemLeadChainContentProcessor.js +7 -9
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ItemLeadChainContentProcessor.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.js +4 -2
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/MarkChainContentProcessor.js +5 -5
- package/dist/cjs/parser/bitmark/peg/contentProcessors/MarkChainContentProcessor.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/MarkConfigChainContentProcessor.js +2 -2
- package/dist/cjs/parser/bitmark/peg/contentProcessors/MarkConfigChainContentProcessor.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/PartnerChainContentProcessor.js +2 -2
- package/dist/cjs/parser/bitmark/peg/contentProcessors/PartnerChainContentProcessor.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.js +6 -6
- package/dist/cjs/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.js +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.js +2 -2
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.js +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/TrueFalseChainContentProcessor.js +16 -16
- package/dist/cjs/parser/bitmark/peg/contentProcessors/TrueFalseChainContentProcessor.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.js +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.js.map +1 -1
- package/dist/cjs/parser/json/JsonParser.js +40 -51
- package/dist/cjs/parser/json/JsonParser.js.map +1 -1
- package/dist/esm/ast/Builder.js +41 -39
- package/dist/esm/ast/Builder.js.map +1 -1
- package/dist/esm/config/raw/bits.js +11 -0
- package/dist/esm/config/raw/bits.js.map +1 -1
- package/dist/esm/config/raw/groups.js +11 -10
- package/dist/esm/config/raw/groups.js.map +1 -1
- package/dist/esm/generated/build-info.js +1 -1
- package/dist/esm/generator/bitmark/BitmarkGenerator.js +13 -3
- package/dist/esm/generator/bitmark/BitmarkGenerator.js.map +1 -1
- package/dist/esm/generator/json/JsonGenerator.js +119 -47
- package/dist/esm/generator/json/JsonGenerator.js.map +1 -1
- package/dist/esm/model/ast/NodeType.js +8 -4
- package/dist/esm/model/ast/NodeType.js.map +1 -1
- package/dist/esm/model/enum/BitType.js +1 -0
- package/dist/esm/model/enum/BitType.js.map +1 -1
- package/dist/esm/model/enum/TextFormat.js +2 -1
- package/dist/esm/model/enum/TextFormat.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/BitmarkPegParserProcessor.js +79 -14
- package/dist/esm/parser/bitmark/peg/BitmarkPegParserProcessor.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/BitmarkPegParserTypes.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/BitmarkPegParserValidator.js +28 -1
- package/dist/esm/parser/bitmark/peg/BitmarkPegParserValidator.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.js +4 -4
- package/dist/esm/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/CardContentProcessor.js +4 -4
- package/dist/esm/parser/bitmark/peg/contentProcessors/CardContentProcessor.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.js +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.js +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/ExampleTagContentProcessor.js +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/ExampleTagContentProcessor.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/GapChainContentProcessor.js +5 -5
- package/dist/esm/parser/bitmark/peg/contentProcessors/GapChainContentProcessor.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/ImageSourceChainContentProcessor.js +7 -7
- package/dist/esm/parser/bitmark/peg/contentProcessors/ImageSourceChainContentProcessor.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/ItemLeadChainContentProcessor.js +7 -9
- package/dist/esm/parser/bitmark/peg/contentProcessors/ItemLeadChainContentProcessor.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.js +4 -2
- package/dist/esm/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/MarkChainContentProcessor.js +5 -5
- package/dist/esm/parser/bitmark/peg/contentProcessors/MarkChainContentProcessor.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/MarkConfigChainContentProcessor.js +2 -2
- package/dist/esm/parser/bitmark/peg/contentProcessors/MarkConfigChainContentProcessor.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/PartnerChainContentProcessor.js +2 -2
- package/dist/esm/parser/bitmark/peg/contentProcessors/PartnerChainContentProcessor.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.js +6 -6
- package/dist/esm/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.js +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.js +2 -2
- package/dist/esm/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.js +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/TrueFalseChainContentProcessor.js +16 -16
- package/dist/esm/parser/bitmark/peg/contentProcessors/TrueFalseChainContentProcessor.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.js +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.js.map +1 -1
- package/dist/esm/parser/json/JsonParser.js +40 -51
- package/dist/esm/parser/json/JsonParser.js.map +1 -1
- package/dist/types/ast/Builder.d.ts +38 -2
- package/dist/types/ast/Builder.d.ts.map +1 -1
- package/dist/types/config/raw/bits.d.ts.map +1 -1
- package/dist/types/config/raw/groups.d.ts.map +1 -1
- package/dist/types/generator/bitmark/BitmarkGenerator.d.ts.map +1 -1
- package/dist/types/generator/json/JsonGenerator.d.ts +4 -0
- package/dist/types/generator/json/JsonGenerator.d.ts.map +1 -1
- package/dist/types/model/ast/NodeType.d.ts +16 -8
- package/dist/types/model/ast/NodeType.d.ts.map +1 -1
- package/dist/types/model/ast/Nodes.d.ts +4 -2
- package/dist/types/model/ast/Nodes.d.ts.map +1 -1
- package/dist/types/model/enum/BitType.d.ts +2 -0
- package/dist/types/model/enum/BitType.d.ts.map +1 -1
- package/dist/types/model/enum/TextFormat.d.ts +2 -0
- package/dist/types/model/enum/TextFormat.d.ts.map +1 -1
- package/dist/types/model/json/BitJson.d.ts +24 -0
- package/dist/types/model/json/BitJson.d.ts.map +1 -1
- package/dist/types/model/json/BodyBitJson.d.ts +8 -0
- package/dist/types/model/json/BodyBitJson.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/BitmarkPegParserProcessor.d.ts +12 -1
- package/dist/types/parser/bitmark/peg/BitmarkPegParserProcessor.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/BitmarkPegParserTypes.d.ts +4 -1
- package/dist/types/parser/bitmark/peg/BitmarkPegParserTypes.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/BitmarkPegParserValidator.d.ts +2 -1
- package/dist/types/parser/bitmark/peg/BitmarkPegParserValidator.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.d.ts +2 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/CardContentProcessor.d.ts +2 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/CardContentProcessor.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.d.ts +2 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.d.ts +2 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/ExampleTagContentProcessor.d.ts +2 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/ExampleTagContentProcessor.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/GapChainContentProcessor.d.ts +2 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/GapChainContentProcessor.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/ImageSourceChainContentProcessor.d.ts +2 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/ImageSourceChainContentProcessor.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/ItemLeadChainContentProcessor.d.ts +2 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/ItemLeadChainContentProcessor.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.d.ts +2 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/MarkChainContentProcessor.d.ts +2 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/MarkChainContentProcessor.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/MarkConfigChainContentProcessor.d.ts +2 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/MarkConfigChainContentProcessor.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/PartnerChainContentProcessor.d.ts +2 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/PartnerChainContentProcessor.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.d.ts +2 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.d.ts +2 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.d.ts +2 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.d.ts +2 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/TrueFalseChainContentProcessor.d.ts +2 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/TrueFalseChainContentProcessor.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.d.ts +2 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.d.ts.map +1 -1
- package/dist/types/parser/json/JsonParser.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -307,7 +307,7 @@ class JsonGenerator {
|
|
|
307
307
|
// bitmarkAst -> bits -> bitsValue -> itemLead
|
|
308
308
|
enter_itemLead(node, parent, _route) {
|
|
309
309
|
const itemLead = node.value;
|
|
310
|
-
const { item, lead } = itemLead;
|
|
310
|
+
const { item, lead, pageNumber, marginNumber } = itemLead;
|
|
311
311
|
// Ignore item / lead that are not at the bit level as they are handled elsewhere
|
|
312
312
|
if ((parent === null || parent === void 0 ? void 0 : parent.key) !== NodeType_1.NodeType.bitsValue)
|
|
313
313
|
return;
|
|
@@ -317,6 +317,12 @@ class JsonGenerator {
|
|
|
317
317
|
if (lead != null) {
|
|
318
318
|
this.bitJson.lead = this.convertBreakscapedStringToJsonText(lead, TextFormat_1.TextFormat.bitmarkMinusMinus);
|
|
319
319
|
}
|
|
320
|
+
if (pageNumber != null) {
|
|
321
|
+
this.bitJson.pageNumber = this.convertBreakscapedStringToJsonText(pageNumber, TextFormat_1.TextFormat.bitmarkMinusMinus);
|
|
322
|
+
}
|
|
323
|
+
if (marginNumber != null) {
|
|
324
|
+
this.bitJson.marginNumber = this.convertBreakscapedStringToJsonText(marginNumber, TextFormat_1.TextFormat.bitmarkMinusMinus);
|
|
325
|
+
}
|
|
320
326
|
}
|
|
321
327
|
// bitmarkAst -> bits -> bitsValue -> extraProperties
|
|
322
328
|
enter_extraProperties(node, _parent, _route) {
|
|
@@ -351,6 +357,13 @@ class JsonGenerator {
|
|
|
351
357
|
}
|
|
352
358
|
// Create this list item
|
|
353
359
|
this.listItem = Object.assign(Object.assign({}, this.toItemLeadHintInstruction(node.value)), { body: this.bodyDefault });
|
|
360
|
+
// Delete unwanted properties
|
|
361
|
+
const nv = node.value;
|
|
362
|
+
const li = this.listItem;
|
|
363
|
+
if (nv.pageNumber == null)
|
|
364
|
+
delete li.pageNumber;
|
|
365
|
+
if (nv.marginNumber == null)
|
|
366
|
+
delete li.marginNumber;
|
|
354
367
|
listItems.push(this.listItem);
|
|
355
368
|
}
|
|
356
369
|
exit_cardBitsValue(_node, _parent, _route) {
|
|
@@ -486,7 +499,7 @@ class JsonGenerator {
|
|
|
486
499
|
}
|
|
487
500
|
// bitmarkAst -> bits -> bitsValue -> cardNode -> flashcards -> flashcardsValue
|
|
488
501
|
enter_flashcards(node, parent, _route) {
|
|
489
|
-
var _a, _b, _c, _d;
|
|
502
|
+
var _a, _b, _c, _d, _e, _f;
|
|
490
503
|
const flashcards = node.value;
|
|
491
504
|
// Ignore responses that are not at the correct level as they are potentially handled elsewhere
|
|
492
505
|
if ((parent === null || parent === void 0 ? void 0 : parent.key) !== NodeType_1.NodeType.cardNode)
|
|
@@ -502,6 +515,10 @@ class JsonGenerator {
|
|
|
502
515
|
// Delete unwanted properties
|
|
503
516
|
if (((_d = c.itemLead) === null || _d === void 0 ? void 0 : _d.lead) == null)
|
|
504
517
|
delete flashcardJson.lead;
|
|
518
|
+
if (((_e = c.itemLead) === null || _e === void 0 ? void 0 : _e.pageNumber) == null)
|
|
519
|
+
delete flashcardJson.pageNumber;
|
|
520
|
+
if (((_f = c.itemLead) === null || _f === void 0 ? void 0 : _f.marginNumber) == null)
|
|
521
|
+
delete flashcardJson.marginNumber;
|
|
505
522
|
flashcardsJson.push(flashcardJson);
|
|
506
523
|
}
|
|
507
524
|
}
|
|
@@ -523,7 +540,7 @@ class JsonGenerator {
|
|
|
523
540
|
}
|
|
524
541
|
// bitmarkAst -> bits -> bitsValue -> cardNode -> statements -> statementsValue
|
|
525
542
|
enter_statements(node, parent, _route) {
|
|
526
|
-
var _a, _b, _c;
|
|
543
|
+
var _a, _b, _c, _d, _e;
|
|
527
544
|
const statements = node.value;
|
|
528
545
|
// Ignore statements that are not at the card node level as they are handled elsewhere
|
|
529
546
|
if ((parent === null || parent === void 0 ? void 0 : parent.key) !== NodeType_1.NodeType.cardNode)
|
|
@@ -541,6 +558,10 @@ class JsonGenerator {
|
|
|
541
558
|
delete statementJson.item;
|
|
542
559
|
if (((_c = s.itemLead) === null || _c === void 0 ? void 0 : _c.lead) == null)
|
|
543
560
|
delete statementJson.lead;
|
|
561
|
+
if (((_d = s.itemLead) === null || _d === void 0 ? void 0 : _d.pageNumber) == null)
|
|
562
|
+
delete statementJson.pageNumber;
|
|
563
|
+
if (((_e = s.itemLead) === null || _e === void 0 ? void 0 : _e.marginNumber) == null)
|
|
564
|
+
delete statementJson.marginNumber;
|
|
544
565
|
if ((s === null || s === void 0 ? void 0 : s.hint) == null)
|
|
545
566
|
delete statementJson.hint;
|
|
546
567
|
if ((s === null || s === void 0 ? void 0 : s.instruction) == null)
|
|
@@ -555,7 +576,7 @@ class JsonGenerator {
|
|
|
555
576
|
// bitmarkAst -> bits -> bitsValue -> choices
|
|
556
577
|
// X bitmarkAst -> bits -> bitsValue -> cardNode -> quizzes -> quizzesValue -> choices
|
|
557
578
|
enter_choices(node, parent, _route) {
|
|
558
|
-
var _a, _b, _c;
|
|
579
|
+
var _a, _b, _c, _d, _e;
|
|
559
580
|
const choices = node.value;
|
|
560
581
|
// Ignore choices that are not at the bit level as they are handled elsewhere as quizzes
|
|
561
582
|
if ((parent === null || parent === void 0 ? void 0 : parent.key) !== NodeType_1.NodeType.cardNode)
|
|
@@ -571,6 +592,10 @@ class JsonGenerator {
|
|
|
571
592
|
// Delete unwanted properties
|
|
572
593
|
if (((_c = c.itemLead) === null || _c === void 0 ? void 0 : _c.lead) == null)
|
|
573
594
|
delete choiceJson.lead;
|
|
595
|
+
if (((_d = c.itemLead) === null || _d === void 0 ? void 0 : _d.pageNumber) == null)
|
|
596
|
+
delete choiceJson.pageNumber;
|
|
597
|
+
if (((_e = c.itemLead) === null || _e === void 0 ? void 0 : _e.marginNumber) == null)
|
|
598
|
+
delete choiceJson.marginNumber;
|
|
574
599
|
choicesJson.push(choiceJson);
|
|
575
600
|
}
|
|
576
601
|
}
|
|
@@ -581,7 +606,7 @@ class JsonGenerator {
|
|
|
581
606
|
// bitmarkAst -> bits -> bitsValue -> responses
|
|
582
607
|
// X bitmarkAst -> bits -> bitsValue -> cardNode -> quizzes -> quizzesValue -> responses
|
|
583
608
|
enter_responses(node, parent, _route) {
|
|
584
|
-
var _a, _b, _c;
|
|
609
|
+
var _a, _b, _c, _d, _e;
|
|
585
610
|
const responses = node.value;
|
|
586
611
|
// Ignore responses that are not at the correct level as they are handled elsewhere as quizzes
|
|
587
612
|
if ((parent === null || parent === void 0 ? void 0 : parent.key) !== NodeType_1.NodeType.cardNode)
|
|
@@ -597,6 +622,10 @@ class JsonGenerator {
|
|
|
597
622
|
// Delete unwanted properties
|
|
598
623
|
if (((_c = r.itemLead) === null || _c === void 0 ? void 0 : _c.lead) == null)
|
|
599
624
|
delete responseJson.lead;
|
|
625
|
+
if (((_d = r.itemLead) === null || _d === void 0 ? void 0 : _d.pageNumber) == null)
|
|
626
|
+
delete responseJson.pageNumber;
|
|
627
|
+
if (((_e = r.itemLead) === null || _e === void 0 ? void 0 : _e.marginNumber) == null)
|
|
628
|
+
delete responseJson.marginNumber;
|
|
600
629
|
responsesJson.push(responseJson);
|
|
601
630
|
}
|
|
602
631
|
}
|
|
@@ -606,7 +635,7 @@ class JsonGenerator {
|
|
|
606
635
|
}
|
|
607
636
|
// bitmarkAst -> bits -> bitsValue -> cardNode -> quizzes
|
|
608
637
|
enter_quizzes(node, _parent, _route) {
|
|
609
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
638
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
610
639
|
const quizzes = node.value;
|
|
611
640
|
const quizzesJson = [];
|
|
612
641
|
if (quizzes) {
|
|
@@ -623,6 +652,10 @@ class JsonGenerator {
|
|
|
623
652
|
// Delete unwanted properties
|
|
624
653
|
if (((_c = q.itemLead) === null || _c === void 0 ? void 0 : _c.lead) == null)
|
|
625
654
|
delete choiceJson.lead;
|
|
655
|
+
if (((_d = q.itemLead) === null || _d === void 0 ? void 0 : _d.pageNumber) == null)
|
|
656
|
+
delete choiceJson.pageNumber;
|
|
657
|
+
if (((_e = q.itemLead) === null || _e === void 0 ? void 0 : _e.marginNumber) == null)
|
|
658
|
+
delete choiceJson.marginNumber;
|
|
626
659
|
choicesJson.push(choiceJson);
|
|
627
660
|
}
|
|
628
661
|
}
|
|
@@ -631,21 +664,29 @@ class JsonGenerator {
|
|
|
631
664
|
if (q.responses) {
|
|
632
665
|
for (const r of q.responses) {
|
|
633
666
|
// Create the choice
|
|
634
|
-
const responseJson = Object.assign(Object.assign({ response: (
|
|
667
|
+
const responseJson = Object.assign(Object.assign({ response: (_f = Breakscape_1.Breakscape.unbreakscape(r.text)) !== null && _f !== void 0 ? _f : '', isCorrect: (_g = r.isCorrect) !== null && _g !== void 0 ? _g : false }, this.toItemLeadHintInstruction(r)), this.toExample(r, {
|
|
635
668
|
defaultExample: !!r.isCorrect,
|
|
636
669
|
isBoolean: true,
|
|
637
670
|
}));
|
|
638
671
|
// Delete unwanted properties
|
|
639
|
-
if (((
|
|
672
|
+
if (((_h = q.itemLead) === null || _h === void 0 ? void 0 : _h.lead) == null)
|
|
640
673
|
delete responseJson.lead;
|
|
674
|
+
if (((_j = q.itemLead) === null || _j === void 0 ? void 0 : _j.pageNumber) == null)
|
|
675
|
+
delete responseJson.pageNumber;
|
|
676
|
+
if (((_k = q.itemLead) === null || _k === void 0 ? void 0 : _k.marginNumber) == null)
|
|
677
|
+
delete responseJson.marginNumber;
|
|
641
678
|
responsesJson.push(responseJson);
|
|
642
679
|
}
|
|
643
680
|
}
|
|
644
681
|
// Create the quiz
|
|
645
|
-
const quizJson = Object.assign(Object.assign({}, this.toItemLeadHintInstruction(q)), { isExample: (
|
|
682
|
+
const quizJson = Object.assign(Object.assign({}, this.toItemLeadHintInstruction(q)), { isExample: (_l = q.isExample) !== null && _l !== void 0 ? _l : false, choices: q.choices ? choicesJson : undefined, responses: q.responses ? responsesJson : undefined });
|
|
646
683
|
// Delete unwanted properties
|
|
647
|
-
if (((
|
|
684
|
+
if (((_m = q.itemLead) === null || _m === void 0 ? void 0 : _m.lead) == null)
|
|
648
685
|
delete quizJson.lead;
|
|
686
|
+
if (((_o = q.itemLead) === null || _o === void 0 ? void 0 : _o.pageNumber) == null)
|
|
687
|
+
delete quizJson.pageNumber;
|
|
688
|
+
if (((_p = q.itemLead) === null || _p === void 0 ? void 0 : _p.marginNumber) == null)
|
|
689
|
+
delete quizJson.marginNumber;
|
|
649
690
|
quizzesJson.push(quizJson);
|
|
650
691
|
}
|
|
651
692
|
}
|
|
@@ -687,7 +728,7 @@ class JsonGenerator {
|
|
|
687
728
|
}
|
|
688
729
|
// bitmarkAst -> bits -> bitsValue -> cardNode -> pairs
|
|
689
730
|
enter_pairs(node, _parent, route) {
|
|
690
|
-
var _a, _b, _c, _d;
|
|
731
|
+
var _a, _b, _c, _d, _e, _f;
|
|
691
732
|
const pairs = node.value;
|
|
692
733
|
const pairsJson = [];
|
|
693
734
|
const bitType = this.getBitType(route);
|
|
@@ -703,6 +744,10 @@ class JsonGenerator {
|
|
|
703
744
|
// Delete unwanted properties
|
|
704
745
|
if (((_d = p.itemLead) === null || _d === void 0 ? void 0 : _d.lead) == null)
|
|
705
746
|
delete pairJson.lead;
|
|
747
|
+
if (((_e = p.itemLead) === null || _e === void 0 ? void 0 : _e.pageNumber) == null)
|
|
748
|
+
delete pairJson.pageNumber;
|
|
749
|
+
if (((_f = p.itemLead) === null || _f === void 0 ? void 0 : _f.marginNumber) == null)
|
|
750
|
+
delete pairJson.marginNumber;
|
|
706
751
|
if (pairJson.key) {
|
|
707
752
|
delete pairJson.keyAudio;
|
|
708
753
|
delete pairJson.keyImage;
|
|
@@ -724,7 +769,7 @@ class JsonGenerator {
|
|
|
724
769
|
}
|
|
725
770
|
// bitmarkAst -> bits -> bitsValue -> cardNode -> matrix
|
|
726
771
|
enter_matrix(node, _parent, _route) {
|
|
727
|
-
var _a, _b, _c, _d, _e, _f;
|
|
772
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
728
773
|
const matrix = node.value;
|
|
729
774
|
const matrixJsonArray = [];
|
|
730
775
|
if (matrix) {
|
|
@@ -743,18 +788,26 @@ class JsonGenerator {
|
|
|
743
788
|
// Delete unwanted properties
|
|
744
789
|
if (((_c = c.itemLead) === null || _c === void 0 ? void 0 : _c.lead) == null)
|
|
745
790
|
delete matrixCellJson.lead;
|
|
791
|
+
if (((_d = c.itemLead) === null || _d === void 0 ? void 0 : _d.pageNumber) == null)
|
|
792
|
+
delete matrixCellJson.pageNumber;
|
|
793
|
+
if (((_e = c.itemLead) === null || _e === void 0 ? void 0 : _e.marginNumber) == null)
|
|
794
|
+
delete matrixCellJson.marginNumber;
|
|
746
795
|
if (c.hint == null)
|
|
747
796
|
delete matrixCellJson.hint;
|
|
748
797
|
matrixCellsJson.push(matrixCellJson);
|
|
749
798
|
}
|
|
750
799
|
}
|
|
751
800
|
// Create the matrix
|
|
752
|
-
const matrixJson = Object.assign(Object.assign({ key: (
|
|
801
|
+
const matrixJson = Object.assign(Object.assign({ key: (_f = Breakscape_1.Breakscape.unbreakscape(m.key)) !== null && _f !== void 0 ? _f : '', cells: matrixCellsJson !== null && matrixCellsJson !== void 0 ? matrixCellsJson : [] }, this.toItemLeadHintInstruction(m)), {
|
|
753
802
|
// ...this.toExample(m.example, m.isExample),
|
|
754
|
-
isExample: (
|
|
803
|
+
isExample: (_g = m.isExample) !== null && _g !== void 0 ? _g : false });
|
|
755
804
|
// Delete unwanted properties
|
|
756
|
-
if (((
|
|
805
|
+
if (((_h = m.itemLead) === null || _h === void 0 ? void 0 : _h.lead) == null)
|
|
757
806
|
delete matrixJson.lead;
|
|
807
|
+
if (((_j = m.itemLead) === null || _j === void 0 ? void 0 : _j.pageNumber) == null)
|
|
808
|
+
delete matrixJson.pageNumber;
|
|
809
|
+
if (((_k = m.itemLead) === null || _k === void 0 ? void 0 : _k.marginNumber) == null)
|
|
810
|
+
delete matrixJson.marginNumber;
|
|
758
811
|
if (m.instruction == null)
|
|
759
812
|
delete matrixJson.instruction;
|
|
760
813
|
matrixJsonArray.push(matrixJson);
|
|
@@ -766,7 +819,7 @@ class JsonGenerator {
|
|
|
766
819
|
}
|
|
767
820
|
// bitmarkAst -> bits -> bitsValue -> cardNode -> questions
|
|
768
821
|
enter_questions(node, _parent, _route) {
|
|
769
|
-
var _a, _b, _c, _d;
|
|
822
|
+
var _a, _b, _c, _d, _e, _f;
|
|
770
823
|
const questions = node.value;
|
|
771
824
|
const questionsJson = [];
|
|
772
825
|
if (questions) {
|
|
@@ -779,6 +832,10 @@ class JsonGenerator {
|
|
|
779
832
|
// Delete unwanted properties
|
|
780
833
|
if (((_d = q.itemLead) === null || _d === void 0 ? void 0 : _d.lead) == null)
|
|
781
834
|
delete questionJson.lead;
|
|
835
|
+
if (((_e = q.itemLead) === null || _e === void 0 ? void 0 : _e.pageNumber) == null)
|
|
836
|
+
delete questionJson.pageNumber;
|
|
837
|
+
if (((_f = q.itemLead) === null || _f === void 0 ? void 0 : _f.marginNumber) == null)
|
|
838
|
+
delete questionJson.marginNumber;
|
|
782
839
|
questionsJson.push(questionJson);
|
|
783
840
|
}
|
|
784
841
|
}
|
|
@@ -788,7 +845,7 @@ class JsonGenerator {
|
|
|
788
845
|
}
|
|
789
846
|
// bitmarkAst -> bits -> bitsValue -> cardNode -> botResponses
|
|
790
847
|
enter_botResponses(node, parent, _route) {
|
|
791
|
-
var _a, _b, _c, _d;
|
|
848
|
+
var _a, _b, _c, _d, _e, _f;
|
|
792
849
|
const botResponses = node.value;
|
|
793
850
|
// Ignore responses that are not at the cardNode level as they are handled elsewhere
|
|
794
851
|
if ((parent === null || parent === void 0 ? void 0 : parent.key) !== NodeType_1.NodeType.cardNode)
|
|
@@ -801,6 +858,10 @@ class JsonGenerator {
|
|
|
801
858
|
// Delete unwanted properties
|
|
802
859
|
if (((_d = r.itemLead) === null || _d === void 0 ? void 0 : _d.lead) == null)
|
|
803
860
|
delete responseJson.lead;
|
|
861
|
+
if (((_e = r.itemLead) === null || _e === void 0 ? void 0 : _e.pageNumber) == null)
|
|
862
|
+
delete responseJson.pageNumber;
|
|
863
|
+
if (((_f = r.itemLead) === null || _f === void 0 ? void 0 : _f.marginNumber) == null)
|
|
864
|
+
delete responseJson.marginNumber;
|
|
804
865
|
if (r.hint == null)
|
|
805
866
|
delete responseJson.hint;
|
|
806
867
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -1038,8 +1099,9 @@ class JsonGenerator {
|
|
|
1038
1099
|
isBoolean: false,
|
|
1039
1100
|
})), { solutions: Breakscape_1.Breakscape.unbreakscape(data.solutions) });
|
|
1040
1101
|
// Remove unwanted properties
|
|
1041
|
-
if (!gapJson.lead
|
|
1042
|
-
|
|
1102
|
+
// if (!data.itemLead?.lead) delete gapJson.lead;
|
|
1103
|
+
// if (!data.itemLead?.pageNumber) delete gapJson.pageNumber;
|
|
1104
|
+
// if (!data.itemLead?.marginNumber) delete gapJson.marginNumber;
|
|
1043
1105
|
return gapJson;
|
|
1044
1106
|
}
|
|
1045
1107
|
createMarkJson(mark) {
|
|
@@ -1050,8 +1112,9 @@ class JsonGenerator {
|
|
|
1050
1112
|
isBoolean: true,
|
|
1051
1113
|
}));
|
|
1052
1114
|
// Remove unwanted properties
|
|
1053
|
-
if (!markJson.lead
|
|
1054
|
-
|
|
1115
|
+
// if (!data.itemLead?.lead) delete markJson.lead;
|
|
1116
|
+
// if (!data.itemLead?.pageNumber) delete markJson.pageNumber;
|
|
1117
|
+
// if (!data.itemLead?.marginNumber) delete markJson.marginNumber;
|
|
1055
1118
|
return markJson;
|
|
1056
1119
|
}
|
|
1057
1120
|
createSelectJson(select) {
|
|
@@ -1065,19 +1128,19 @@ class JsonGenerator {
|
|
|
1065
1128
|
isBoolean: true,
|
|
1066
1129
|
}));
|
|
1067
1130
|
// Remove unwanted properties
|
|
1068
|
-
if (!optionJson.item
|
|
1069
|
-
|
|
1070
|
-
if (!optionJson.
|
|
1071
|
-
|
|
1072
|
-
if (!optionJson.instruction
|
|
1073
|
-
delete optionJson.instruction;
|
|
1131
|
+
// if (!option.itemLead?.item) delete optionJson.item;
|
|
1132
|
+
// if (!option.itemLead?.lead) delete optionJson.lead;
|
|
1133
|
+
// if (!option.itemLead?.pageNumber) delete optionJson.pageNumber;
|
|
1134
|
+
// if (!option.itemLead?.marginNumber) delete optionJson.marginNumber;
|
|
1135
|
+
// if (!option.instruction) delete optionJson.instruction;
|
|
1074
1136
|
options.push(optionJson);
|
|
1075
1137
|
}
|
|
1076
1138
|
// Create the select
|
|
1077
1139
|
const selectJson = Object.assign(Object.assign({ type: 'select', prefix: (_b = Breakscape_1.Breakscape.unbreakscape(data.prefix)) !== null && _b !== void 0 ? _b : '', postfix: (_c = Breakscape_1.Breakscape.unbreakscape(data.postfix)) !== null && _c !== void 0 ? _c : '' }, this.toItemLeadHintInstruction(data)), { isExample: (_d = data.isExample) !== null && _d !== void 0 ? _d : false, options });
|
|
1078
1140
|
// Remove unwanted properties
|
|
1079
|
-
if (!selectJson.lead
|
|
1080
|
-
|
|
1141
|
+
// if (!data.itemLead?.lead) delete selectJson.lead;
|
|
1142
|
+
// if (!data.itemLead?.pageNumber) delete selectJson.pageNumber;
|
|
1143
|
+
// if (!data.itemLead?.marginNumber) delete selectJson.marginNumber;
|
|
1081
1144
|
return selectJson;
|
|
1082
1145
|
}
|
|
1083
1146
|
createHighlightJson(highlight) {
|
|
@@ -1091,19 +1154,17 @@ class JsonGenerator {
|
|
|
1091
1154
|
isBoolean: true,
|
|
1092
1155
|
}));
|
|
1093
1156
|
// Remove unwanted properties
|
|
1094
|
-
if (!textJson.item
|
|
1095
|
-
|
|
1096
|
-
if (!textJson.
|
|
1097
|
-
|
|
1098
|
-
if (!textJson.hint
|
|
1099
|
-
delete textJson.hint;
|
|
1157
|
+
// if (!text.itemLead?.item) delete textJson.item;
|
|
1158
|
+
// if (!text.itemLead?.lead) delete textJson.lead;
|
|
1159
|
+
// if (!text.itemLead?.pageNumber) delete textJson.pageNumber;
|
|
1160
|
+
// if (!text.itemLead?.marginNumber) delete textJson.marginNumber;
|
|
1161
|
+
// if (!text.hint) delete textJson.hint;
|
|
1100
1162
|
texts.push(textJson);
|
|
1101
1163
|
}
|
|
1102
1164
|
// Create the select
|
|
1103
1165
|
const highlightJson = Object.assign(Object.assign({ type: 'highlight', prefix: (_c = Breakscape_1.Breakscape.unbreakscape(data.prefix)) !== null && _c !== void 0 ? _c : '', postfix: (_d = Breakscape_1.Breakscape.unbreakscape(data.postfix)) !== null && _d !== void 0 ? _d : '' }, this.toItemLeadHintInstruction(data)), { isExample: (_e = data.isExample) !== null && _e !== void 0 ? _e : false, texts });
|
|
1104
1166
|
// Remove unwanted properties
|
|
1105
|
-
if (!highlightJson.lead
|
|
1106
|
-
delete highlightJson.lead;
|
|
1167
|
+
// if (!data.itemLead?.lead) delete highlightJson.lead;
|
|
1107
1168
|
return highlightJson;
|
|
1108
1169
|
}
|
|
1109
1170
|
parseResourceToJson(bitType, resource) {
|
|
@@ -1622,12 +1683,14 @@ class JsonGenerator {
|
|
|
1622
1683
|
return resourceJson;
|
|
1623
1684
|
}
|
|
1624
1685
|
toItemLeadHintInstruction(item) {
|
|
1625
|
-
var _a, _b, _c, _d, _e, _f;
|
|
1686
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
1626
1687
|
return {
|
|
1627
1688
|
item: this.convertBreakscapedStringToJsonText((_b = (_a = item.itemLead) === null || _a === void 0 ? void 0 : _a.item) !== null && _b !== void 0 ? _b : Breakscape_1.Breakscape.EMPTY_STRING, TextFormat_1.TextFormat.bitmarkMinusMinus),
|
|
1628
1689
|
lead: this.convertBreakscapedStringToJsonText((_d = (_c = item.itemLead) === null || _c === void 0 ? void 0 : _c.lead) !== null && _d !== void 0 ? _d : Breakscape_1.Breakscape.EMPTY_STRING, TextFormat_1.TextFormat.bitmarkMinusMinus),
|
|
1629
|
-
|
|
1630
|
-
|
|
1690
|
+
pageNumber: this.convertBreakscapedStringToJsonText((_f = (_e = item.itemLead) === null || _e === void 0 ? void 0 : _e.pageNumber) !== null && _f !== void 0 ? _f : Breakscape_1.Breakscape.EMPTY_STRING, TextFormat_1.TextFormat.bitmarkMinusMinus),
|
|
1691
|
+
marginNumber: this.convertBreakscapedStringToJsonText((_h = (_g = item.itemLead) === null || _g === void 0 ? void 0 : _g.marginNumber) !== null && _h !== void 0 ? _h : Breakscape_1.Breakscape.EMPTY_STRING, TextFormat_1.TextFormat.bitmarkMinusMinus),
|
|
1692
|
+
hint: this.convertBreakscapedStringToJsonText((_j = item.hint) !== null && _j !== void 0 ? _j : Breakscape_1.Breakscape.EMPTY_STRING, TextFormat_1.TextFormat.bitmarkMinusMinus),
|
|
1693
|
+
instruction: this.convertBreakscapedStringToJsonText((_k = item.instruction) !== null && _k !== void 0 ? _k : Breakscape_1.Breakscape.EMPTY_STRING, TextFormat_1.TextFormat.bitmarkMinusMinus),
|
|
1631
1694
|
};
|
|
1632
1695
|
}
|
|
1633
1696
|
toExample(node, options) {
|
|
@@ -1769,6 +1832,8 @@ class JsonGenerator {
|
|
|
1769
1832
|
* Input:
|
|
1770
1833
|
* - breakscaped string
|
|
1771
1834
|
* Output:
|
|
1835
|
+
* - text: plain text
|
|
1836
|
+
* - json: bitmark text JSON
|
|
1772
1837
|
* - Bitmark v2: breakscaped string
|
|
1773
1838
|
* - Bitmark v3: bitmark text JSON (TextAst)
|
|
1774
1839
|
*
|
|
@@ -1780,7 +1845,8 @@ class JsonGenerator {
|
|
|
1780
1845
|
convertBreakscapedStringToJsonText(text, format) {
|
|
1781
1846
|
if (!text)
|
|
1782
1847
|
undefined;
|
|
1783
|
-
|
|
1848
|
+
const asPlainText = this.options.textAsPlainText || format === TextFormat_1.TextFormat.text || format === TextFormat_1.TextFormat.json;
|
|
1849
|
+
if (asPlainText) {
|
|
1784
1850
|
return text || Breakscape_1.Breakscape.EMPTY_STRING;
|
|
1785
1851
|
}
|
|
1786
1852
|
// Use the text parser to parse the text
|
|
@@ -1870,6 +1936,8 @@ class JsonGenerator {
|
|
|
1870
1936
|
ageRange: undefined,
|
|
1871
1937
|
lang: undefined,
|
|
1872
1938
|
language: undefined,
|
|
1939
|
+
publisher: undefined,
|
|
1940
|
+
theme: undefined,
|
|
1873
1941
|
computerLanguage: undefined,
|
|
1874
1942
|
target: undefined,
|
|
1875
1943
|
tag: undefined,
|
|
@@ -1880,13 +1948,11 @@ class JsonGenerator {
|
|
|
1880
1948
|
subtype: undefined,
|
|
1881
1949
|
bookAlias: undefined,
|
|
1882
1950
|
coverImage: undefined,
|
|
1883
|
-
publisher: undefined,
|
|
1884
1951
|
publications: undefined,
|
|
1885
1952
|
author: undefined,
|
|
1886
1953
|
subject: undefined,
|
|
1887
1954
|
date: undefined,
|
|
1888
1955
|
location: undefined,
|
|
1889
|
-
theme: undefined,
|
|
1890
1956
|
kind: undefined,
|
|
1891
1957
|
action: undefined,
|
|
1892
1958
|
thumbImage: undefined,
|
|
@@ -1929,6 +1995,8 @@ class JsonGenerator {
|
|
|
1929
1995
|
// Item, Lead, Hint, Instruction
|
|
1930
1996
|
item: undefined,
|
|
1931
1997
|
lead: undefined,
|
|
1998
|
+
pageNumber: undefined,
|
|
1999
|
+
marginNumber: undefined,
|
|
1932
2000
|
hint: undefined,
|
|
1933
2001
|
instruction: undefined,
|
|
1934
2002
|
// Example
|
|
@@ -2242,6 +2310,10 @@ class JsonGenerator {
|
|
|
2242
2310
|
delete bitJson.lang;
|
|
2243
2311
|
if (bitJson.language == null)
|
|
2244
2312
|
delete bitJson.language;
|
|
2313
|
+
if (bitJson.publisher == null)
|
|
2314
|
+
delete bitJson.publisher;
|
|
2315
|
+
if (bitJson.theme == null)
|
|
2316
|
+
delete bitJson.theme;
|
|
2245
2317
|
if (bitJson.computerLanguage == null)
|
|
2246
2318
|
delete bitJson.computerLanguage;
|
|
2247
2319
|
if (bitJson.target == null)
|
|
@@ -2262,8 +2334,6 @@ class JsonGenerator {
|
|
|
2262
2334
|
delete bitJson.bookAlias;
|
|
2263
2335
|
if (bitJson.coverImage == null)
|
|
2264
2336
|
delete bitJson.coverImage;
|
|
2265
|
-
if (bitJson.publisher == null)
|
|
2266
|
-
delete bitJson.publisher;
|
|
2267
2337
|
if (bitJson.publications == null)
|
|
2268
2338
|
delete bitJson.publications;
|
|
2269
2339
|
if (bitJson.author == null)
|
|
@@ -2274,8 +2344,6 @@ class JsonGenerator {
|
|
|
2274
2344
|
delete bitJson.date;
|
|
2275
2345
|
if (bitJson.location == null)
|
|
2276
2346
|
delete bitJson.location;
|
|
2277
|
-
if (bitJson.theme == null)
|
|
2278
|
-
delete bitJson.theme;
|
|
2279
2347
|
if (bitJson.kind == null)
|
|
2280
2348
|
delete bitJson.kind;
|
|
2281
2349
|
if (bitJson.action == null)
|
|
@@ -2356,6 +2424,10 @@ class JsonGenerator {
|
|
|
2356
2424
|
delete bitJson.item;
|
|
2357
2425
|
if (bitJson.lead == null)
|
|
2358
2426
|
delete bitJson.lead;
|
|
2427
|
+
if (bitJson.pageNumber == null)
|
|
2428
|
+
delete bitJson.pageNumber;
|
|
2429
|
+
if (bitJson.marginNumber == null)
|
|
2430
|
+
delete bitJson.marginNumber;
|
|
2359
2431
|
if (bitJson.hint == null)
|
|
2360
2432
|
delete bitJson.hint;
|
|
2361
2433
|
if (bitJson.instruction == null)
|