@gmb/bitmark-parser-generator 3.25.2 → 3.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (212) hide show
  1. package/README.md +1 -1
  2. package/dist/browser/bitmark-parser-generator.min.js +1 -1
  3. package/dist/browser/bundle-report.html +2 -2
  4. package/dist/cjs/BitmarkParserGenerator.js +9 -5
  5. package/dist/cjs/BitmarkParserGenerator.js.map +1 -1
  6. package/dist/cjs/ast/BaseBuilder.js +8 -8
  7. package/dist/cjs/ast/BaseBuilder.js.map +1 -1
  8. package/dist/cjs/ast/Builder.js +53 -46
  9. package/dist/cjs/ast/Builder.js.map +1 -1
  10. package/dist/cjs/ast/ResourceBuilder.js +19 -18
  11. package/dist/cjs/ast/ResourceBuilder.js.map +1 -1
  12. package/dist/cjs/breakscaping/Breakscape.js +59 -72
  13. package/dist/cjs/breakscaping/Breakscape.js.map +1 -1
  14. package/dist/cjs/config/Config.js +1 -1
  15. package/dist/cjs/config/Config.js.map +1 -1
  16. package/dist/cjs/config/raw/bits.js +26 -10
  17. package/dist/cjs/config/raw/bits.js.map +1 -1
  18. package/dist/cjs/config/raw/groups.js +5 -0
  19. package/dist/cjs/config/raw/groups.js.map +1 -1
  20. package/dist/cjs/config/raw/properties.js +145 -141
  21. package/dist/cjs/config/raw/properties.js.map +1 -1
  22. package/dist/cjs/generated/build-info.js +1 -1
  23. package/dist/cjs/generator/bitmark/BitmarkGenerator.js +116 -128
  24. package/dist/cjs/generator/bitmark/BitmarkGenerator.js.map +1 -1
  25. package/dist/cjs/generator/json/JsonGenerator.js +15 -10
  26. package/dist/cjs/generator/json/JsonGenerator.js.map +1 -1
  27. package/dist/cjs/generator/text/TextGenerator.js +14 -14
  28. package/dist/cjs/generator/text/TextGenerator.js.map +1 -1
  29. package/dist/cjs/model/ast/NodeType.js +2 -0
  30. package/dist/cjs/model/ast/NodeType.js.map +1 -1
  31. package/dist/cjs/model/config/enum/PropertyConfigKey.js +1 -0
  32. package/dist/cjs/model/config/enum/PropertyConfigKey.js.map +1 -1
  33. package/dist/cjs/model/enum/BitType.js +3 -0
  34. package/dist/cjs/model/enum/BitType.js.map +1 -1
  35. package/dist/cjs/model/enum/DeprecatedTextFormat.js +10 -0
  36. package/dist/cjs/model/enum/DeprecatedTextFormat.js.map +1 -0
  37. package/dist/cjs/model/enum/PropertyFormat.js +2 -4
  38. package/dist/cjs/model/enum/PropertyFormat.js.map +1 -1
  39. package/dist/cjs/model/enum/TextFormat.js +4 -12
  40. package/dist/cjs/model/enum/TextFormat.js.map +1 -1
  41. package/dist/cjs/parser/bitmark/peg/BitmarkPegParserHelper.js +2 -2
  42. package/dist/cjs/parser/bitmark/peg/BitmarkPegParserHelper.js.map +1 -1
  43. package/dist/cjs/parser/bitmark/peg/BitmarkPegParserProcessor.js +11 -4
  44. package/dist/cjs/parser/bitmark/peg/BitmarkPegParserProcessor.js.map +1 -1
  45. package/dist/cjs/parser/bitmark/peg/contentProcessors/BodyContentProcessor.js +4 -4
  46. package/dist/cjs/parser/bitmark/peg/contentProcessors/BodyContentProcessor.js.map +1 -1
  47. package/dist/cjs/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.js +1 -1
  48. package/dist/cjs/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.js.map +1 -1
  49. package/dist/cjs/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.js +2 -2
  50. package/dist/cjs/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.js.map +1 -1
  51. package/dist/cjs/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.js +8 -8
  52. package/dist/cjs/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.js.map +1 -1
  53. package/dist/cjs/parser/bitmark/peg/contentProcessors/ExampleTagContentProcessor.js +3 -3
  54. package/dist/cjs/parser/bitmark/peg/contentProcessors/ExampleTagContentProcessor.js.map +1 -1
  55. package/dist/cjs/parser/bitmark/peg/contentProcessors/FooterContentProcessor.js +4 -4
  56. package/dist/cjs/parser/bitmark/peg/contentProcessors/FooterContentProcessor.js.map +1 -1
  57. package/dist/cjs/parser/bitmark/peg/contentProcessors/ImageSourceChainContentProcessor.js +1 -1
  58. package/dist/cjs/parser/bitmark/peg/contentProcessors/ImageSourceChainContentProcessor.js.map +1 -1
  59. package/dist/cjs/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.js +2 -1
  60. package/dist/cjs/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.js.map +1 -1
  61. package/dist/cjs/parser/bitmark/peg/contentProcessors/MarkConfigChainContentProcessor.js +1 -1
  62. package/dist/cjs/parser/bitmark/peg/contentProcessors/MarkConfigChainContentProcessor.js.map +1 -1
  63. package/dist/cjs/parser/bitmark/peg/contentProcessors/PersonChainContentProcessor.js +1 -1
  64. package/dist/cjs/parser/bitmark/peg/contentProcessors/PersonChainContentProcessor.js.map +1 -1
  65. package/dist/cjs/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.js +10 -16
  66. package/dist/cjs/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.js.map +1 -1
  67. package/dist/cjs/parser/bitmark/peg/contentProcessors/RatingLevelChainContentProcessor.js +2 -1
  68. package/dist/cjs/parser/bitmark/peg/contentProcessors/RatingLevelChainContentProcessor.js.map +1 -1
  69. package/dist/cjs/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.js +2 -2
  70. package/dist/cjs/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.js.map +1 -1
  71. package/dist/cjs/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.js +2 -2
  72. package/dist/cjs/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.js.map +1 -1
  73. package/dist/cjs/parser/bitmark/peg/contentProcessors/TechnicalTermChainContentProcessor.js +1 -1
  74. package/dist/cjs/parser/bitmark/peg/contentProcessors/TechnicalTermChainContentProcessor.js.map +1 -1
  75. package/dist/cjs/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.js +2 -1
  76. package/dist/cjs/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.js.map +1 -1
  77. package/dist/cjs/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.js +1 -1
  78. package/dist/cjs/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.js.map +1 -1
  79. package/dist/cjs/parser/json/JsonParser.js +7 -1
  80. package/dist/cjs/parser/json/JsonParser.js.map +1 -1
  81. package/dist/cjs/parser/text/TextParser.js +4 -4
  82. package/dist/cjs/parser/text/TextParser.js.map +1 -1
  83. package/dist/cjs/utils/BitUtils.js +2 -1
  84. package/dist/cjs/utils/BitUtils.js.map +1 -1
  85. package/dist/esm/BitmarkParserGenerator.js +9 -5
  86. package/dist/esm/BitmarkParserGenerator.js.map +1 -1
  87. package/dist/esm/ast/BaseBuilder.js +8 -8
  88. package/dist/esm/ast/BaseBuilder.js.map +1 -1
  89. package/dist/esm/ast/Builder.js +53 -46
  90. package/dist/esm/ast/Builder.js.map +1 -1
  91. package/dist/esm/ast/ResourceBuilder.js +19 -18
  92. package/dist/esm/ast/ResourceBuilder.js.map +1 -1
  93. package/dist/esm/breakscaping/Breakscape.js +59 -72
  94. package/dist/esm/breakscaping/Breakscape.js.map +1 -1
  95. package/dist/esm/config/Config.js +1 -1
  96. package/dist/esm/config/Config.js.map +1 -1
  97. package/dist/esm/config/raw/bits.js +26 -10
  98. package/dist/esm/config/raw/bits.js.map +1 -1
  99. package/dist/esm/config/raw/groups.js +5 -0
  100. package/dist/esm/config/raw/groups.js.map +1 -1
  101. package/dist/esm/config/raw/properties.js +145 -141
  102. package/dist/esm/config/raw/properties.js.map +1 -1
  103. package/dist/esm/generated/build-info.js +1 -1
  104. package/dist/esm/generator/bitmark/BitmarkGenerator.js +116 -128
  105. package/dist/esm/generator/bitmark/BitmarkGenerator.js.map +1 -1
  106. package/dist/esm/generator/json/JsonGenerator.js +15 -10
  107. package/dist/esm/generator/json/JsonGenerator.js.map +1 -1
  108. package/dist/esm/generator/text/TextGenerator.js +14 -14
  109. package/dist/esm/generator/text/TextGenerator.js.map +1 -1
  110. package/dist/esm/model/ast/NodeType.js +2 -0
  111. package/dist/esm/model/ast/NodeType.js.map +1 -1
  112. package/dist/esm/model/config/enum/PropertyConfigKey.js +1 -0
  113. package/dist/esm/model/config/enum/PropertyConfigKey.js.map +1 -1
  114. package/dist/esm/model/enum/BitType.js +3 -0
  115. package/dist/esm/model/enum/BitType.js.map +1 -1
  116. package/dist/esm/model/enum/DeprecatedTextFormat.js +7 -0
  117. package/dist/esm/model/enum/DeprecatedTextFormat.js.map +1 -0
  118. package/dist/esm/model/enum/PropertyFormat.js +2 -4
  119. package/dist/esm/model/enum/PropertyFormat.js.map +1 -1
  120. package/dist/esm/model/enum/TextFormat.js +4 -12
  121. package/dist/esm/model/enum/TextFormat.js.map +1 -1
  122. package/dist/esm/parser/bitmark/peg/BitmarkPegParserHelper.js +2 -2
  123. package/dist/esm/parser/bitmark/peg/BitmarkPegParserHelper.js.map +1 -1
  124. package/dist/esm/parser/bitmark/peg/BitmarkPegParserProcessor.js +11 -4
  125. package/dist/esm/parser/bitmark/peg/BitmarkPegParserProcessor.js.map +1 -1
  126. package/dist/esm/parser/bitmark/peg/contentProcessors/BodyContentProcessor.js +4 -4
  127. package/dist/esm/parser/bitmark/peg/contentProcessors/BodyContentProcessor.js.map +1 -1
  128. package/dist/esm/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.js +1 -1
  129. package/dist/esm/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.js.map +1 -1
  130. package/dist/esm/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.js +2 -2
  131. package/dist/esm/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.js.map +1 -1
  132. package/dist/esm/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.js +8 -8
  133. package/dist/esm/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.js.map +1 -1
  134. package/dist/esm/parser/bitmark/peg/contentProcessors/ExampleTagContentProcessor.js +3 -3
  135. package/dist/esm/parser/bitmark/peg/contentProcessors/ExampleTagContentProcessor.js.map +1 -1
  136. package/dist/esm/parser/bitmark/peg/contentProcessors/FooterContentProcessor.js +4 -4
  137. package/dist/esm/parser/bitmark/peg/contentProcessors/FooterContentProcessor.js.map +1 -1
  138. package/dist/esm/parser/bitmark/peg/contentProcessors/ImageSourceChainContentProcessor.js +1 -1
  139. package/dist/esm/parser/bitmark/peg/contentProcessors/ImageSourceChainContentProcessor.js.map +1 -1
  140. package/dist/esm/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.js +2 -1
  141. package/dist/esm/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.js.map +1 -1
  142. package/dist/esm/parser/bitmark/peg/contentProcessors/MarkConfigChainContentProcessor.js +1 -1
  143. package/dist/esm/parser/bitmark/peg/contentProcessors/MarkConfigChainContentProcessor.js.map +1 -1
  144. package/dist/esm/parser/bitmark/peg/contentProcessors/PersonChainContentProcessor.js +1 -1
  145. package/dist/esm/parser/bitmark/peg/contentProcessors/PersonChainContentProcessor.js.map +1 -1
  146. package/dist/esm/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.js +10 -16
  147. package/dist/esm/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.js.map +1 -1
  148. package/dist/esm/parser/bitmark/peg/contentProcessors/RatingLevelChainContentProcessor.js +2 -1
  149. package/dist/esm/parser/bitmark/peg/contentProcessors/RatingLevelChainContentProcessor.js.map +1 -1
  150. package/dist/esm/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.js +2 -2
  151. package/dist/esm/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.js.map +1 -1
  152. package/dist/esm/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.js +2 -2
  153. package/dist/esm/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.js.map +1 -1
  154. package/dist/esm/parser/bitmark/peg/contentProcessors/TechnicalTermChainContentProcessor.js +1 -1
  155. package/dist/esm/parser/bitmark/peg/contentProcessors/TechnicalTermChainContentProcessor.js.map +1 -1
  156. package/dist/esm/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.js +2 -1
  157. package/dist/esm/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.js.map +1 -1
  158. package/dist/esm/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.js +1 -1
  159. package/dist/esm/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.js.map +1 -1
  160. package/dist/esm/parser/json/JsonParser.js +7 -1
  161. package/dist/esm/parser/json/JsonParser.js.map +1 -1
  162. package/dist/esm/parser/text/TextParser.js +4 -4
  163. package/dist/esm/parser/text/TextParser.js.map +1 -1
  164. package/dist/esm/utils/BitUtils.js +2 -1
  165. package/dist/esm/utils/BitUtils.js.map +1 -1
  166. package/dist/types/BitmarkParserGenerator.d.ts +5 -1
  167. package/dist/types/BitmarkParserGenerator.d.ts.map +1 -1
  168. package/dist/types/ast/BaseBuilder.d.ts +5 -3
  169. package/dist/types/ast/BaseBuilder.d.ts.map +1 -1
  170. package/dist/types/ast/Builder.d.ts +1 -0
  171. package/dist/types/ast/Builder.d.ts.map +1 -1
  172. package/dist/types/ast/ResourceBuilder.d.ts.map +1 -1
  173. package/dist/types/breakscaping/Breakscape.d.ts +2 -2
  174. package/dist/types/breakscaping/Breakscape.d.ts.map +1 -1
  175. package/dist/types/config/raw/bits.d.ts.map +1 -1
  176. package/dist/types/config/raw/groups.d.ts.map +1 -1
  177. package/dist/types/config/raw/properties.d.ts.map +1 -1
  178. package/dist/types/generator/bitmark/BitmarkGenerator.d.ts +0 -1
  179. package/dist/types/generator/bitmark/BitmarkGenerator.d.ts.map +1 -1
  180. package/dist/types/generator/json/JsonGenerator.d.ts +2 -2
  181. package/dist/types/generator/json/JsonGenerator.d.ts.map +1 -1
  182. package/dist/types/generator/text/TextGenerator.d.ts.map +1 -1
  183. package/dist/types/model/ast/NodeType.d.ts +4 -0
  184. package/dist/types/model/ast/NodeType.d.ts.map +1 -1
  185. package/dist/types/model/ast/Nodes.d.ts +1 -0
  186. package/dist/types/model/ast/Nodes.d.ts.map +1 -1
  187. package/dist/types/model/config/enum/ConfigKey.d.ts +2 -0
  188. package/dist/types/model/config/enum/ConfigKey.d.ts.map +1 -1
  189. package/dist/types/model/config/enum/PropertyConfigKey.d.ts +3 -0
  190. package/dist/types/model/config/enum/PropertyConfigKey.d.ts.map +1 -1
  191. package/dist/types/model/enum/BitType.d.ts +6 -0
  192. package/dist/types/model/enum/BitType.d.ts.map +1 -1
  193. package/dist/types/model/enum/DeprecatedTextFormat.d.ts +11 -0
  194. package/dist/types/model/enum/DeprecatedTextFormat.d.ts.map +1 -0
  195. package/dist/types/model/enum/PropertyFormat.d.ts +4 -6
  196. package/dist/types/model/enum/PropertyFormat.d.ts.map +1 -1
  197. package/dist/types/model/enum/PropertyTag.d.ts +2 -0
  198. package/dist/types/model/enum/PropertyTag.d.ts.map +1 -1
  199. package/dist/types/model/enum/TextFormat.d.ts +4 -6
  200. package/dist/types/model/enum/TextFormat.d.ts.map +1 -1
  201. package/dist/types/model/json/BitJson.d.ts +1 -0
  202. package/dist/types/model/json/BitJson.d.ts.map +1 -1
  203. package/dist/types/parser/bitmark/peg/BitmarkPegParserProcessor.d.ts.map +1 -1
  204. package/dist/types/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.d.ts.map +1 -1
  205. package/dist/types/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.d.ts.map +1 -1
  206. package/dist/types/parser/bitmark/peg/contentProcessors/RatingLevelChainContentProcessor.d.ts.map +1 -1
  207. package/dist/types/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.d.ts.map +1 -1
  208. package/dist/types/parser/json/JsonParser.d.ts.map +1 -1
  209. package/dist/types/parser/text/TextParser.d.ts +2 -1
  210. package/dist/types/parser/text/TextParser.d.ts.map +1 -1
  211. package/dist/types/utils/BitUtils.d.ts.map +1 -1
  212. package/package.json +26 -21
@@ -10,6 +10,7 @@ const Config_1 = require("../config/Config");
10
10
  const PropertyConfigKey_1 = require("../model/config/enum/PropertyConfigKey");
11
11
  const BitType_1 = require("../model/enum/BitType");
12
12
  const BodyBitType_1 = require("../model/enum/BodyBitType");
13
+ const DeprecatedTextFormat_1 = require("../model/enum/DeprecatedTextFormat");
13
14
  const ResourceTag_1 = require("../model/enum/ResourceTag");
14
15
  const TextFormat_1 = require("../model/enum/TextFormat");
15
16
  const TextLocation_1 = require("../model/enum/TextLocation");
@@ -57,7 +58,13 @@ class Builder extends BaseBuilder_1.BaseBuilder {
57
58
  var _a, _b, _c, _d, _e, _f, _g, _h;
58
59
  const bitConfig = Config_1.Config.getBitConfig(data.bitType);
59
60
  const bitType = data.bitType;
60
- const textFormat = (_a = TextFormat_1.TextFormat.fromValue(data.textFormat)) !== null && _a !== void 0 ? _a : bitConfig.textFormatDefault;
61
+ // Text Format (accepts deprecated values, and converts them to the new format)
62
+ const deprecatedTextFormat = DeprecatedTextFormat_1.DeprecatedTextFormat.fromValue(data.textFormat);
63
+ let textFormat = (_a = TextFormat_1.TextFormat.fromValue(data.textFormat)) !== null && _a !== void 0 ? _a : bitConfig.textFormatDefault;
64
+ if (deprecatedTextFormat === DeprecatedTextFormat_1.DeprecatedTextFormat.bitmarkMinusMinus ||
65
+ deprecatedTextFormat === DeprecatedTextFormat_1.DeprecatedTextFormat.bitmarkPlusPlus) {
66
+ textFormat = TextFormat_1.TextFormat.bitmarkText;
67
+ }
61
68
  const context = {
62
69
  bitConfig,
63
70
  bitType,
@@ -75,11 +82,11 @@ class Builder extends BaseBuilder_1.BaseBuilder {
75
82
  // NOTE: Node order is important and is defined here
76
83
  const node = Object.assign(Object.assign({ bitType, bitLevel: data.bitLevel, textFormat, resourceType: ResourceTag_1.ResourceTag.fromValue(data.resourceType), isCommented: data.isCommented,
77
84
  // Properties
78
- id: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.id, data.id), internalComment: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.internalComment, data.internalComment), customerId: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.customerId, data.customerId), customerExternalId: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.customerExternalId, data.customerExternalId), externalId: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.externalId, data.externalId), spaceId: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.spaceId, data.spaceId), padletId: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.padletId, data.padletId), jupyterId: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.jupyterId, data.jupyterId), jupyterExecutionCount: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.jupyterExecutionCount, data.jupyterExecutionCount), isPublic: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.isPublic, data.isPublic), aiGenerated: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.aiGenerated, data.aiGenerated), machineTranslated: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.machineTranslated, data.machineTranslated), searchIndex: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.searchIndex, data.searchIndex), analyticsTag: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.analyticsTag, data.analyticsTag), categoryTag: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.categoryTag, data.categoryTag), topicTag: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.topicTag, data.topicTag), altLangTag: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.altLangTag, data.altLangTag), feedbackEngine: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.feedbackEngine, data.feedbackEngine), feedbackType: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.feedbackType, data.feedbackType), disableFeedback: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.disableFeedback, data.disableFeedback), diffTo: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.diffTo, data.diffTo), diffOp: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.diffOp, data.diffOp), diffRef: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.diffRef, data.diffRef), diffContext: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.diffContext, data.diffContext), diffTime: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.diffTime, data.diffTime), path: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.path, data.path), releaseVersion: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.releaseVersion, data.releaseVersion), releaseKind: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.releaseKind, data.releaseKind), releaseDate: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.releaseDate, data.releaseDate), book: this.buildBooks(context, data.book), ageRange: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.ageRange, data.ageRange), lang: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.lang, data.lang), language: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.language, data.language), publisher: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.publisher, data.publisher), publisherName: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.publisherName, data.publisherName), theme: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.theme, data.theme), computerLanguage: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.computerLanguage, data.computerLanguage), target: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.target, data.target), slug: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.slug, data.slug), tag: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.tag, data.tag), reductionTag: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.reductionTag, data.reductionTag), bubbleTag: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.bubbleTag, data.bubbleTag), levelCEFRp: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.levelCEFRp, data.levelCEFRp), levelCEFR: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.levelCEFR, data.levelCEFR), levelILR: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.levelILR, data.levelILR), levelACTFL: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.levelACTFL, data.levelACTFL), icon: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.icon, data.icon), iconTag: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.iconTag, data.iconTag), colorTag: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.colorTag, data.colorTag), flashcardSet: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.flashcardSet, data.flashcardSet), subtype: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.subtype, data.subtype), bookAlias: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.bookAlias, data.bookAlias), bookDiff: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.bookDiff, data.bookDiff), coverImage: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.coverImage, data.coverImage), coverColor: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.coverColor, data.coverColor), publications: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.publications, data.publications), author: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.author, data.author), subject: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.subject, data.subject), date: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.date, data.date), dateEnd: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.dateEnd, data.dateEnd), location: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.location, data.location), kind: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.kind, data.kind), hasMarkAsDone: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.hasMarkAsDone, data.hasMarkAsDone), processHandIn: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.processHandIn, data.processHandIn), chatWithBook: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.chatWithBook, data.chatWithBook), chatWithBookBrainKey: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.chatWithBookBrainKey, data.chatWithBookBrainKey), action: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.action, data.action), showInIndex: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.showInIndex, data.showInIndex), refAuthor: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.refAuthor, data.refAuthor), refBookTitle: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.refBookTitle, data.refBookTitle), refPublisher: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.refPublisher, data.refPublisher), refPublicationYear: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.refPublicationYear, data.refPublicationYear), citationStyle: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.citationStyle, data.citationStyle), blockId: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.blockId, data.blockId), pageNo: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.pageNo, data.pageNo), x: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.x, data.x), y: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.y, data.y), width: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.width, data.width), height: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.height, data.height), index: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.index, data.index), classification: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.classification, data.classification), availableClassifications: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.availableClassifications, data.availableClassifications), allowedBit: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.allowedBit, data.allowedBit), tableFixedHeader: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.tableFixedHeader, data.tableFixedHeader), tableSearch: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.tableSearch, data.tableSearch), tableSort: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.tableSort, data.tableSort), tablePagination: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.tablePagination, data.tablePagination), tablePaginationLimit: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.tablePaginationLimit, data.tablePaginationLimit), tableHeight: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.tableHeight, data.tableHeight), tableWhitespaceNoWrap: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.tableWhitespaceNoWrap, data.tableWhitespaceNoWrap), tableAutoWidth: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.tableAutoWidth, data.tableAutoWidth), tableResizableColumns: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.tableResizableColumns, data.tableResizableColumns), tableColumnMinWidth: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.tableColumnMinWidth, data.tableColumnMinWidth), quizCountItems: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.quizCountItems, data.quizCountItems), quizStrikethroughSolutions: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.quizStrikethroughSolutions, data.quizStrikethroughSolutions), codeLineNumbers: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.codeLineNumbers, data.codeLineNumbers), codeMinimap: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.codeMinimap, data.codeMinimap), stripePricingTableId: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.stripePricingTableId, data.stripePricingTableId), stripePublishableKey: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.stripePublishableKey, data.stripePublishableKey), thumbImage: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.thumbImage, data.thumbImage), scormSource: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.scormSource, data.scormSource), posterImage: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.posterImage, data.posterImage), focusX: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.focusX, data.focusX), focusY: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.focusY, data.focusY), pointerLeft: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.pointerLeft, data.pointerLeft), pointerTop: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.pointerTop, data.pointerTop), listItemIndent: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.listItemIndent, data.listItemIndent), backgroundWallpaper: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.backgroundWallpaper, data.backgroundWallpaper), hasBookNavigation: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.hasBookNavigation, data.hasBookNavigation), duration: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.duration, data.duration), deeplink: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.deeplink, data.deeplink), externalLink: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.externalLink, data.externalLink), externalLinkText: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.externalLinkText, data.externalLinkText), videoCallLink: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.videoCallLink, data.videoCallLink), vendorDashboardId: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.vendorDashboardId, data.vendorDashboardId), vendorSurveyId: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.vendorSurveyId, data.vendorSurveyId), vendorUrl: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.vendorUrl, data.vendorUrl), search: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.search, data.search), list: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.list, data.list), layer: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.layer, data.layer), textReference: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.textReference, data.textReference), isTracked: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.isTracked, data.isTracked), isInfoOnly: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.isInfoOnly, data.isInfoOnly), imageFirst: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.imageFirst, data.imageFirst), activityType: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.activityType, data.activityType), labelTrue: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.labelTrue, data.labelTrue), labelFalse: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.labelFalse, data.labelFalse), content2Buy: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.content2Buy, data.content2Buy), mailingList: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.mailingList, data.mailingList), buttonCaption: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.buttonCaption, data.buttonCaption), callToActionUrl: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.callToActionUrl, data.callToActionUrl), caption: this.handleJsonText(context, true, data.caption), quotedPerson: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.quotedPerson, data.quotedPerson), reasonableNumOfChars: reasonableNumOfCharsProperty, resolved: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.resolved, data.resolved), resolvedDate: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.resolvedDate, data.resolvedDate), resolvedBy: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.resolvedBy, data.resolvedBy), handInAcceptFileType: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.handInAcceptFileType, data.handInAcceptFileType), handInRequirement: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.handInRequirement, data.handInRequirement), handInInstruction: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.handInInstruction, data.handInInstruction), maxCreatedBits: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.maxCreatedBits, data.maxCreatedBits), maxDisplayLevel: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.maxDisplayLevel, data.maxDisplayLevel), maxTocChapterLevel: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.maxTocChapterLevel, data.maxTocChapterLevel), page: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.page, data.page), productId: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.productId, data.productId), product: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.product, data.product), productList: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.productList, data.productList), productVideo: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.productVideo, data.productVideo), productVideoList: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.productVideoList, data.productVideoList), productFolder: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.productFolder, data.productFolder), technicalTerm: this.buildTechnicalTerm(context, data.technicalTerm), servings: this.buildServings(context, data.servings), ratingLevelStart: this.buildRatingLevelStartEnd(context, data.ratingLevelStart), ratingLevelEnd: this.buildRatingLevelStartEnd(context, data.ratingLevelEnd), ratingLevelSelected: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.ratingLevelSelected, data.ratingLevelSelected), markConfig: this.buildMarkConfigs(context, data.markConfig), imageSource: this.buildImageSource(context, data.imageSource), person: this.buildPerson(context, data.person), bot: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.bot, data.bot), referenceProperty: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.property_reference, data.referenceProperty),
85
+ id: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.id, data.id), internalComment: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.internalComment, data.internalComment), customerId: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.customerId, data.customerId), customerExternalId: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.customerExternalId, data.customerExternalId), externalId: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.externalId, data.externalId), spaceId: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.spaceId, data.spaceId), padletId: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.padletId, data.padletId), jupyterId: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.jupyterId, data.jupyterId), jupyterExecutionCount: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.jupyterExecutionCount, data.jupyterExecutionCount), isPublic: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.isPublic, data.isPublic), aiGenerated: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.aiGenerated, data.aiGenerated), machineTranslated: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.machineTranslated, data.machineTranslated), searchIndex: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.searchIndex, data.searchIndex), analyticsTag: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.analyticsTag, data.analyticsTag), categoryTag: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.categoryTag, data.categoryTag), topicTag: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.topicTag, data.topicTag), altLangTag: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.altLangTag, data.altLangTag), feedbackEngine: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.feedbackEngine, data.feedbackEngine), feedbackType: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.feedbackType, data.feedbackType), disableFeedback: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.disableFeedback, data.disableFeedback), diffTo: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.diffTo, data.diffTo), diffOp: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.diffOp, data.diffOp), diffRef: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.diffRef, data.diffRef), diffContext: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.diffContext, data.diffContext), diffTime: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.diffTime, data.diffTime), path: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.path, data.path), releaseVersion: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.releaseVersion, data.releaseVersion), releaseKind: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.releaseKind, data.releaseKind), releaseDate: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.releaseDate, data.releaseDate), book: this.buildBooks(context, data.book), ageRange: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.ageRange, data.ageRange), lang: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.lang, data.lang), language: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.language, data.language), publisher: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.publisher, data.publisher), publisherName: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.publisherName, data.publisherName), theme: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.theme, data.theme), computerLanguage: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.computerLanguage, data.computerLanguage), target: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.target, data.target), slug: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.slug, data.slug), tag: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.tag, data.tag), reductionTag: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.reductionTag, data.reductionTag), bubbleTag: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.bubbleTag, data.bubbleTag), levelCEFRp: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.levelCEFRp, data.levelCEFRp), levelCEFR: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.levelCEFR, data.levelCEFR), levelILR: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.levelILR, data.levelILR), levelACTFL: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.levelACTFL, data.levelACTFL), icon: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.icon, data.icon), iconTag: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.iconTag, data.iconTag), colorTag: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.colorTag, data.colorTag), flashcardSet: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.flashcardSet, data.flashcardSet), subtype: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.subtype, data.subtype), bookAlias: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.bookAlias, data.bookAlias), bookDiff: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.bookDiff, data.bookDiff), coverImage: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.coverImage, data.coverImage), coverColor: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.coverColor, data.coverColor), publications: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.publications, data.publications), author: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.author, data.author), subject: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.subject, data.subject), date: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.date, data.date), dateEnd: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.dateEnd, data.dateEnd), location: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.location, data.location), kind: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.kind, data.kind), hasMarkAsDone: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.hasMarkAsDone, data.hasMarkAsDone), processHandIn: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.processHandIn, data.processHandIn), chatWithBook: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.chatWithBook, data.chatWithBook), chatWithBookBrainKey: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.chatWithBookBrainKey, data.chatWithBookBrainKey), action: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.action, data.action), showInIndex: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.showInIndex, data.showInIndex), refAuthor: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.refAuthor, data.refAuthor), refBookTitle: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.refBookTitle, data.refBookTitle), refPublisher: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.refPublisher, data.refPublisher), refPublicationYear: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.refPublicationYear, data.refPublicationYear), citationStyle: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.citationStyle, data.citationStyle), blockId: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.blockId, data.blockId), pageNo: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.pageNo, data.pageNo), x: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.x, data.x), y: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.y, data.y), width: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.width, data.width), height: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.height, data.height), index: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.index, data.index), classification: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.classification, data.classification), availableClassifications: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.availableClassifications, data.availableClassifications), allowedBit: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.allowedBit, data.allowedBit), tableFixedHeader: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.tableFixedHeader, data.tableFixedHeader), tableSearch: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.tableSearch, data.tableSearch), tableSort: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.tableSort, data.tableSort), tablePagination: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.tablePagination, data.tablePagination), tablePaginationLimit: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.tablePaginationLimit, data.tablePaginationLimit), tableHeight: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.tableHeight, data.tableHeight), tableWhitespaceNoWrap: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.tableWhitespaceNoWrap, data.tableWhitespaceNoWrap), tableAutoWidth: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.tableAutoWidth, data.tableAutoWidth), tableResizableColumns: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.tableResizableColumns, data.tableResizableColumns), tableColumnMinWidth: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.tableColumnMinWidth, data.tableColumnMinWidth), quizCountItems: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.quizCountItems, data.quizCountItems), quizStrikethroughSolutions: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.quizStrikethroughSolutions, data.quizStrikethroughSolutions), codeLineNumbers: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.codeLineNumbers, data.codeLineNumbers), codeMinimap: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.codeMinimap, data.codeMinimap), stripePricingTableId: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.stripePricingTableId, data.stripePricingTableId), stripePublishableKey: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.stripePublishableKey, data.stripePublishableKey), thumbImage: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.thumbImage, data.thumbImage), scormSource: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.scormSource, data.scormSource), posterImage: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.posterImage, data.posterImage), focusX: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.focusX, data.focusX), focusY: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.focusY, data.focusY), pointerLeft: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.pointerLeft, data.pointerLeft), pointerTop: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.pointerTop, data.pointerTop), listItemIndent: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.listItemIndent, data.listItemIndent), backgroundWallpaper: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.backgroundWallpaper, data.backgroundWallpaper), hasBookNavigation: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.hasBookNavigation, data.hasBookNavigation), duration: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.duration, data.duration), deeplink: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.deeplink, data.deeplink), externalLink: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.externalLink, data.externalLink), externalLinkText: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.externalLinkText, data.externalLinkText), videoCallLink: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.videoCallLink, data.videoCallLink), vendorDashboardId: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.vendorDashboardId, data.vendorDashboardId), vendorSurveyId: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.vendorSurveyId, data.vendorSurveyId), vendorUrl: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.vendorUrl, data.vendorUrl), search: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.search, data.search), list: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.list, data.list), layer: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.layer, data.layer), layerRole: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.layerRole, data.layerRole), textReference: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.textReference, data.textReference), isTracked: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.isTracked, data.isTracked), isInfoOnly: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.isInfoOnly, data.isInfoOnly), imageFirst: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.imageFirst, data.imageFirst), activityType: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.activityType, data.activityType), labelTrue: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.labelTrue, data.labelTrue), labelFalse: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.labelFalse, data.labelFalse), content2Buy: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.content2Buy, data.content2Buy), mailingList: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.mailingList, data.mailingList), buttonCaption: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.buttonCaption, data.buttonCaption), callToActionUrl: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.callToActionUrl, data.callToActionUrl), caption: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.caption), quotedPerson: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.quotedPerson, data.quotedPerson), reasonableNumOfChars: reasonableNumOfCharsProperty, resolved: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.resolved, data.resolved), resolvedDate: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.resolvedDate, data.resolvedDate), resolvedBy: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.resolvedBy, data.resolvedBy), handInAcceptFileType: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.handInAcceptFileType, data.handInAcceptFileType), handInRequirement: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.handInRequirement, data.handInRequirement), handInInstruction: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.handInInstruction, data.handInInstruction), maxCreatedBits: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.maxCreatedBits, data.maxCreatedBits), maxDisplayLevel: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.maxDisplayLevel, data.maxDisplayLevel), maxTocChapterLevel: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.maxTocChapterLevel, data.maxTocChapterLevel), page: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.page, data.page), productId: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.productId, data.productId), product: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.product, data.product), productList: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.productList, data.productList), productVideo: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.productVideo, data.productVideo), productVideoList: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.productVideoList, data.productVideoList), productFolder: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.productFolder, data.productFolder), technicalTerm: this.buildTechnicalTerm(context, data.technicalTerm), servings: this.buildServings(context, data.servings), ratingLevelStart: this.buildRatingLevelStartEnd(context, data.ratingLevelStart), ratingLevelEnd: this.buildRatingLevelStartEnd(context, data.ratingLevelEnd), ratingLevelSelected: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.ratingLevelSelected, data.ratingLevelSelected), markConfig: this.buildMarkConfigs(context, data.markConfig), imageSource: this.buildImageSource(context, data.imageSource), person: this.buildPerson(context, data.person), bot: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.bot, data.bot), referenceProperty: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.property_reference, data.referenceProperty),
79
86
  // Book data
80
- title: this.handleJsonText(context, true, data.title), subtitle: this.handleJsonText(context, true, data.subtitle), level: NumberUtils_1.NumberUtils.asNumber(data.level), toc: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.toc, data.toc), progress: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.progress, data.progress), anchor: data.anchor, reference: data.reference, referenceEnd: data.referenceEnd, revealSolutions: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.revealSolutions, data.revealSolutions),
87
+ title: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.title), subtitle: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.subtitle), level: NumberUtils_1.NumberUtils.asNumber(data.level), toc: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.toc, data.toc), progress: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.progress, data.progress), anchor: data.anchor, reference: data.reference, referenceEnd: data.referenceEnd, revealSolutions: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.revealSolutions, data.revealSolutions),
81
88
  // Item, Lead, Hint, Instruction
82
- item: this.handleJsonText(context, true, data.item), lead: this.handleJsonText(context, true, data.lead), pageNumber: this.handleJsonText(context, true, data.pageNumber), marginNumber: this.handleJsonText(context, true, data.marginNumber), hint: this.handleJsonText(context, true, data.hint), instruction: this.handleJsonText(context, true, data.instruction), partialAnswer: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.partialAnswer, data.partialAnswer), sampleSolution: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.property_sampleSolution, data.sampleSolution), additionalSolutions: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.additionalSolutions, data.additionalSolutions) }, this.toExample(data.__isDefaultExample, data.example)), {
89
+ item: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.item), lead: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.lead), pageNumber: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.pageNumber), marginNumber: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.marginNumber), hint: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.hint), instruction: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.instruction), partialAnswer: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.partialAnswer, data.partialAnswer), sampleSolution: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.property_sampleSolution, data.sampleSolution), additionalSolutions: this.toAstProperty(PropertyConfigKey_1.PropertyConfigKey.additionalSolutions, data.additionalSolutions) }, this.toExample(data.__isDefaultExample, data.example)), {
83
90
  // Person
84
91
  imagePlaceholder: ArrayUtils_1.ArrayUtils.asSingle(this.resourceBuilder.resourceFromResourceDataJson(context, ResourceTag_1.ResourceTag.image, (_b = data.imagePlaceholder) === null || _b === void 0 ? void 0 : _b.image)), resources: ArrayUtils_1.ArrayUtils.asArray(this.resourceBuilder.resourceFromResourceJson(context, data.resources)),
85
92
  // Body, Card, Footer, must be after all other properties except the extraProperties and markup / parser
@@ -178,7 +185,7 @@ class Builder extends BaseBuilder_1.BaseBuilder {
178
185
  if (!data)
179
186
  return undefined;
180
187
  // NOTE: Node order is important and is defined here
181
- const node = Object.assign({ choice: (_a = data.choice) !== null && _a !== void 0 ? _a : '', requireReason: !!data.requireReason, item: this.handleJsonText(context, true, data.item), lead: this.handleJsonText(context, true, data.lead), hint: this.handleJsonText(context, true, data.hint), instruction: this.handleJsonText(context, true, data.instruction) }, this.toExample(data.__isDefaultExample, data.example, true));
188
+ const node = Object.assign({ choice: (_a = data.choice) !== null && _a !== void 0 ? _a : '', requireReason: !!data.requireReason, item: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.item), lead: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.lead), hint: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.hint), instruction: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.instruction) }, this.toExample(data.__isDefaultExample, data.example, true));
182
189
  // Remove Unset Optionals
183
190
  ObjectUtils_1.ObjectUtils.removeUnwantedProperties(node, {
184
191
  ignoreAllFalse: true,
@@ -199,9 +206,9 @@ class Builder extends BaseBuilder_1.BaseBuilder {
199
206
  return undefined;
200
207
  // Set default example
201
208
  // Not __testAst - there is no default example
202
- const defaultExample = this.handleJsonText(context, true, 'true');
209
+ const defaultExample = this.handleJsonText(context, TextLocation_1.TextLocation.tag, 'true');
203
210
  // NOTE: Node order is important and is defined here
204
- const node = Object.assign(Object.assign({ text: (_a = data.text) !== null && _a !== void 0 ? _a : '', reasonableNumOfChars: ((_b = data.reasonableNumOfChars) !== null && _b !== void 0 ? _b : undefined), item: this.handleJsonText(context, true, data.item), lead: this.handleJsonText(context, true, data.lead), hint: this.handleJsonText(context, true, data.hint), instruction: this.handleJsonText(context, true, data.instruction) }, this.toExample(data.__isDefaultExample, data.example, defaultExample)), { __textAst: data.__textAst });
211
+ const node = Object.assign(Object.assign({ text: (_a = data.text) !== null && _a !== void 0 ? _a : '', reasonableNumOfChars: ((_b = data.reasonableNumOfChars) !== null && _b !== void 0 ? _b : undefined), item: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.item), lead: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.lead), hint: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.hint), instruction: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.instruction) }, this.toExample(data.__isDefaultExample, data.example, defaultExample)), { __textAst: data.__textAst });
205
212
  // Remove Unset Optionals
206
213
  ObjectUtils_1.ObjectUtils.removeUnwantedProperties(node, {
207
214
  ignoreAllFalse: true,
@@ -233,7 +240,7 @@ class Builder extends BaseBuilder_1.BaseBuilder {
233
240
  if (!data)
234
241
  return undefined;
235
242
  // NOTE: Node order is important and is defined here
236
- const node = Object.assign({ choice: (_a = data.choice) !== null && _a !== void 0 ? _a : '', isCorrect: !!data.isCorrect, item: this.handleJsonText(context, true, data.item), lead: this.handleJsonText(context, true, data.lead), hint: this.handleJsonText(context, true, data.hint), instruction: this.handleJsonText(context, true, data.instruction) }, this.toExample(data.__isDefaultExample, data.example, !!data.isCorrect));
243
+ const node = Object.assign({ choice: (_a = data.choice) !== null && _a !== void 0 ? _a : '', isCorrect: !!data.isCorrect, item: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.item), lead: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.lead), hint: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.hint), instruction: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.instruction) }, this.toExample(data.__isDefaultExample, data.example, !!data.isCorrect));
237
244
  // Remove Unset Optionals
238
245
  ObjectUtils_1.ObjectUtils.removeUnwantedProperties(node, {
239
246
  ignoreAllFalse: true,
@@ -265,7 +272,7 @@ class Builder extends BaseBuilder_1.BaseBuilder {
265
272
  if (!data)
266
273
  return undefined;
267
274
  // NOTE: Node order is important and is defined here
268
- const node = Object.assign({ response: (_a = data.response) !== null && _a !== void 0 ? _a : '', isCorrect: !!data.isCorrect, item: this.handleJsonText(context, true, data.item), lead: this.handleJsonText(context, true, data.lead), hint: this.handleJsonText(context, true, data.hint), instruction: this.handleJsonText(context, true, data.instruction) }, this.toExample(data.__isDefaultExample, data.example, !!data.isCorrect));
275
+ const node = Object.assign({ response: (_a = data.response) !== null && _a !== void 0 ? _a : '', isCorrect: !!data.isCorrect, item: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.item), lead: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.lead), hint: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.hint), instruction: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.instruction) }, this.toExample(data.__isDefaultExample, data.example, !!data.isCorrect));
269
276
  // Remove Unset Optionals
270
277
  ObjectUtils_1.ObjectUtils.removeUnwantedProperties(node, {
271
278
  ignoreAllFalse: true,
@@ -301,9 +308,9 @@ class Builder extends BaseBuilder_1.BaseBuilder {
301
308
  response: (_a = data.response) !== null && _a !== void 0 ? _a : '',
302
309
  reaction: (_b = data.reaction) !== null && _b !== void 0 ? _b : '',
303
310
  feedback: (_c = data.feedback) !== null && _c !== void 0 ? _c : '',
304
- item: this.handleJsonText(context, true, data.item),
305
- lead: this.handleJsonText(context, true, data.lead),
306
- hint: this.handleJsonText(context, true, data.hint),
311
+ item: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.item),
312
+ lead: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.lead),
313
+ hint: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.hint),
307
314
  };
308
315
  // Remove Unset Optionals
309
316
  ObjectUtils_1.ObjectUtils.removeUnwantedProperties(node, {
@@ -351,10 +358,10 @@ class Builder extends BaseBuilder_1.BaseBuilder {
351
358
  }
352
359
  // NOTE: Node order is important and is defined here
353
360
  const node = {
354
- item: this.handleJsonText(context, true, data.item),
355
- lead: this.handleJsonText(context, true, data.lead),
356
- hint: this.handleJsonText(context, true, data.hint),
357
- instruction: this.handleJsonText(context, true, data.instruction),
361
+ item: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.item),
362
+ lead: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.lead),
363
+ hint: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.hint),
364
+ instruction: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.instruction),
358
365
  // isExample: !!data.__defaultExample,
359
366
  choices: choices,
360
367
  reason: reason, // Might be undefined
@@ -406,10 +413,10 @@ class Builder extends BaseBuilder_1.BaseBuilder {
406
413
  }
407
414
  // NOTE: Node order is important and is defined here
408
415
  const node = {
409
- item: this.handleJsonText(context, true, data.item),
410
- lead: this.handleJsonText(context, true, data.lead),
411
- hint: this.handleJsonText(context, true, data.hint),
412
- instruction: this.handleJsonText(context, true, data.instruction),
416
+ item: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.item),
417
+ lead: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.lead),
418
+ hint: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.hint),
419
+ instruction: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.instruction),
413
420
  isExample: !!data.__defaultExample,
414
421
  choices: choices,
415
422
  responses: responses,
@@ -475,7 +482,7 @@ class Builder extends BaseBuilder_1.BaseBuilder {
475
482
  const keyImage = this.resourceBuilder.resourceFromResourceJson(context, data.keyImage);
476
483
  // NOTE: Node order is important and is defined here
477
484
  const node = Object.assign(Object.assign({ key: (_a = data.key) !== null && _a !== void 0 ? _a : '', keyAudio,
478
- keyImage, item: this.handleJsonText(context, true, data.item), lead: this.handleJsonText(context, true, data.lead), hint: this.handleJsonText(context, true, data.hint), instruction: this.handleJsonText(context, true, data.instruction), isCaseSensitive: data.isCaseSensitive }, this.toExample(data.__isDefaultExample, data.example, defaultExample)), { values: (_b = data.values) !== null && _b !== void 0 ? _b : [], __valuesAst: data.__valuesAst });
485
+ keyImage, item: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.item), lead: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.lead), hint: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.hint), instruction: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.instruction), isCaseSensitive: data.isCaseSensitive }, this.toExample(data.__isDefaultExample, data.example, defaultExample)), { values: (_b = data.values) !== null && _b !== void 0 ? _b : [], __valuesAst: data.__valuesAst });
479
486
  // Remove Unset Optionals
480
487
  ObjectUtils_1.ObjectUtils.removeUnwantedProperties(node, {
481
488
  ignoreAllFalse: true,
@@ -535,10 +542,10 @@ class Builder extends BaseBuilder_1.BaseBuilder {
535
542
  // NOTE: Node order is important and is defined here
536
543
  const node = {
537
544
  key: (_b = data.key) !== null && _b !== void 0 ? _b : '',
538
- item: this.handleJsonText(context, true, data.item),
539
- lead: this.handleJsonText(context, true, data.lead),
540
- hint: this.handleJsonText(context, true, data.hint),
541
- instruction: this.handleJsonText(context, true, data.instruction),
545
+ item: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.item),
546
+ lead: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.lead),
547
+ hint: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.hint),
548
+ instruction: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.instruction),
542
549
  isExample,
543
550
  cells: ((_c = data.cells) !== null && _c !== void 0 ? _c : []).map((c) => this.buildMatrixCell(context, c)).filter((c) => c != null),
544
551
  };
@@ -563,7 +570,7 @@ class Builder extends BaseBuilder_1.BaseBuilder {
563
570
  // Set default example
564
571
  const defaultExample = Array.isArray(data.__valuesAst) && data.__valuesAst.length > 0 ? data.__valuesAst[0] : null;
565
572
  // NOTE: Node order is important and is defined here
566
- const node = Object.assign(Object.assign({ values: (_a = data.values) !== null && _a !== void 0 ? _a : [], item: this.handleJsonText(context, true, data.item), lead: this.handleJsonText(context, true, data.lead), hint: this.handleJsonText(context, true, data.hint), instruction: this.handleJsonText(context, true, data.instruction), isCaseSensitive: data.isCaseSensitive }, this.toExample(data.__isDefaultExample, data.example, defaultExample)), { __valuesAst: data.__valuesAst });
573
+ const node = Object.assign(Object.assign({ values: (_a = data.values) !== null && _a !== void 0 ? _a : [], item: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.item), lead: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.lead), hint: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.hint), instruction: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.instruction), isCaseSensitive: data.isCaseSensitive }, this.toExample(data.__isDefaultExample, data.example, defaultExample)), { __valuesAst: data.__valuesAst });
567
574
  // Remove Unset Optionals
568
575
  ObjectUtils_1.ObjectUtils.removeUnwantedProperties(node, {
569
576
  ignoreAllFalse: true,
@@ -588,8 +595,8 @@ class Builder extends BaseBuilder_1.BaseBuilder {
588
595
  // Process the audio resource
589
596
  const audio = this.resourceBuilder.resourceFromResourceJson(context, cell.audio);
590
597
  return {
591
- title: this.handleJsonText(context, true, cell.title),
592
- body: this.handleJsonText(context, true, cell.body),
598
+ title: this.handleJsonText(context, TextLocation_1.TextLocation.tag, cell.title),
599
+ body: this.handleJsonText(context, TextLocation_1.TextLocation.tag, cell.body),
593
600
  audio,
594
601
  };
595
602
  })),
@@ -612,8 +619,8 @@ class Builder extends BaseBuilder_1.BaseBuilder {
612
619
  return undefined;
613
620
  // NOTE: Node order is important and is defined here
614
621
  const node = {
615
- columns: ((_a = dataIn.columns) !== null && _a !== void 0 ? _a : []).map((col) => this.handleJsonText(context, true, col)),
616
- data: ((_b = dataIn.data) !== null && _b !== void 0 ? _b : []).map((row) => (row !== null && row !== void 0 ? row : []).map((cell) => this.handleJsonText(context, true, cell))),
622
+ columns: ((_a = dataIn.columns) !== null && _a !== void 0 ? _a : []).map((col) => this.handleJsonText(context, TextLocation_1.TextLocation.tag, col)),
623
+ data: ((_b = dataIn.data) !== null && _b !== void 0 ? _b : []).map((row) => (row !== null && row !== void 0 ? row : []).map((cell) => this.handleJsonText(context, TextLocation_1.TextLocation.tag, cell))),
617
624
  };
618
625
  // Remove Unset Optionals
619
626
  // ObjectUtils.removeUnwantedProperties(node, {
@@ -646,7 +653,7 @@ class Builder extends BaseBuilder_1.BaseBuilder {
646
653
  // Set default example
647
654
  const defaultExample = data.__sampleSolutionAst;
648
655
  // NOTE: Node order is important and is defined here
649
- const node = Object.assign(Object.assign({ question: (_a = data.question) !== null && _a !== void 0 ? _a : '', partialAnswer: (_b = data.partialAnswer) !== null && _b !== void 0 ? _b : '', sampleSolution: (_c = data.sampleSolution) !== null && _c !== void 0 ? _c : '', additionalSolutions: ((_d = data.additionalSolutions) !== null && _d !== void 0 ? _d : undefined), reasonableNumOfChars: ((_e = data.reasonableNumOfChars) !== null && _e !== void 0 ? _e : undefined), item: this.handleJsonText(context, true, data.item), lead: this.handleJsonText(context, true, data.lead), hint: this.handleJsonText(context, true, data.hint), instruction: this.handleJsonText(context, true, data.instruction) }, this.toExample(data.__isDefaultExample, data.example, defaultExample)), { __sampleSolutionAst: data.__sampleSolutionAst });
656
+ const node = Object.assign(Object.assign({ question: (_a = data.question) !== null && _a !== void 0 ? _a : '', partialAnswer: (_b = data.partialAnswer) !== null && _b !== void 0 ? _b : '', sampleSolution: (_c = data.sampleSolution) !== null && _c !== void 0 ? _c : '', additionalSolutions: ((_d = data.additionalSolutions) !== null && _d !== void 0 ? _d : undefined), reasonableNumOfChars: ((_e = data.reasonableNumOfChars) !== null && _e !== void 0 ? _e : undefined), item: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.item), lead: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.lead), hint: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.hint), instruction: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.instruction) }, this.toExample(data.__isDefaultExample, data.example, defaultExample)), { __sampleSolutionAst: data.__sampleSolutionAst });
650
657
  // Remove Unset Optionals
651
658
  ObjectUtils_1.ObjectUtils.removeUnwantedProperties(node, {
652
659
  ignoreAllFalse: true,
@@ -783,7 +790,7 @@ class Builder extends BaseBuilder_1.BaseBuilder {
783
790
  // Convert the body string to AST
784
791
  rawBody = this.textParser.toAst(bodyStr, {
785
792
  textFormat,
786
- isProperty: false,
793
+ textLocation: TextLocation_1.TextLocation.body,
787
794
  });
788
795
  const replaceBitsRecursive = (bodyText) => {
789
796
  for (let i = 0, len = bodyText.length; i < len; i++) {
@@ -840,7 +847,7 @@ class Builder extends BaseBuilder_1.BaseBuilder {
840
847
  const handlePlainTextBody = () => {
841
848
  body = data.body;
842
849
  };
843
- const isBitmarkText = textFormat === TextFormat_1.TextFormat.bitmarkMinusMinus || textFormat === TextFormat_1.TextFormat.bitmarkPlusPlus;
850
+ const isBitmarkText = textFormat === TextFormat_1.TextFormat.bitmarkText;
844
851
  if (textFormat === TextFormat_1.TextFormat.json) {
845
852
  // JSON
846
853
  handleJsonBody();
@@ -871,7 +878,7 @@ class Builder extends BaseBuilder_1.BaseBuilder {
871
878
  if (!data)
872
879
  return undefined;
873
880
  const node = {
874
- footer: this.handleJsonText(context, false, data.footer),
881
+ footer: this.handleJsonText(context, TextLocation_1.TextLocation.body, data.footer),
875
882
  };
876
883
  return node;
877
884
  }
@@ -890,7 +897,7 @@ class Builder extends BaseBuilder_1.BaseBuilder {
890
897
  // Copy any attributes from 'attrs' to the body bit (data is in 'attrs' when coming from JSON)
891
898
  data = this.bodyBitCopyFromAttrs(data);
892
899
  // NOTE: Node order is important and is defined here
893
- const node = Object.assign(Object.assign({ type: BodyBitType_1.BodyBitType.gap, solutions: (_a = data.solutions) !== null && _a !== void 0 ? _a : [], item: this.handleJsonText(context, true, data.item), lead: this.handleJsonText(context, true, data.lead), hint: this.handleJsonText(context, true, data.hint), instruction: this.handleJsonText(context, true, data.instruction), isCaseSensitive: data.isCaseSensitive }, this.toExample(data.__isDefaultExample, data.example, defaultExample)), { __solutionsAst: data.__solutionsAst, attrs: {} });
900
+ const node = Object.assign(Object.assign({ type: BodyBitType_1.BodyBitType.gap, solutions: (_a = data.solutions) !== null && _a !== void 0 ? _a : [], item: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.item), lead: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.lead), hint: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.hint), instruction: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.instruction), isCaseSensitive: data.isCaseSensitive }, this.toExample(data.__isDefaultExample, data.example, defaultExample)), { __solutionsAst: data.__solutionsAst, attrs: {} });
894
901
  // Remove Unset Optionals
895
902
  ObjectUtils_1.ObjectUtils.removeUnwantedProperties(node, {
896
903
  ignoreAllFalse: true,
@@ -946,7 +953,7 @@ class Builder extends BaseBuilder_1.BaseBuilder {
946
953
  // Copy any attributes from 'attrs' to the body bit (data is in 'attrs' when coming from JSON)
947
954
  data = this.bodyBitCopyFromAttrs(data);
948
955
  // NOTE: Node order is important and is defined here
949
- const node = Object.assign(Object.assign({ type: BodyBitType_1.BodyBitType.mark, solution: (_a = data.solution) !== null && _a !== void 0 ? _a : '', mark: (_b = data.mark) !== null && _b !== void 0 ? _b : '', item: this.handleJsonText(context, true, data.item), lead: this.handleJsonText(context, true, data.lead), hint: this.handleJsonText(context, true, data.hint), instruction: this.handleJsonText(context, true, data.instruction) }, this.toExample(data.__isDefaultExample, data.example, true)), { attrs: {} });
956
+ const node = Object.assign(Object.assign({ type: BodyBitType_1.BodyBitType.mark, solution: (_a = data.solution) !== null && _a !== void 0 ? _a : '', mark: (_b = data.mark) !== null && _b !== void 0 ? _b : '', item: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.item), lead: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.lead), hint: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.hint), instruction: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.instruction) }, this.toExample(data.__isDefaultExample, data.example, true)), { attrs: {} });
950
957
  // Remove Unset Optionals
951
958
  ObjectUtils_1.ObjectUtils.removeUnwantedProperties(node, {
952
959
  ignoreAllFalse: true,
@@ -969,7 +976,7 @@ class Builder extends BaseBuilder_1.BaseBuilder {
969
976
  // Copy any attributes from 'attrs' to the body bit (data is in 'attrs' when coming from JSON)
970
977
  data = this.bodyBitCopyFromAttrs(data);
971
978
  // NOTE: Node order is important and is defined here
972
- const node = Object.assign(Object.assign({ type: BodyBitType_1.BodyBitType.select, options: (_a = this.buildSelectOptions(context, data.options)) !== null && _a !== void 0 ? _a : [], prefix: (_b = data.prefix) !== null && _b !== void 0 ? _b : '', postfix: (_c = data.postfix) !== null && _c !== void 0 ? _c : '', item: this.handleJsonText(context, true, data.item), lead: this.handleJsonText(context, true, data.lead), hint: this.handleJsonText(context, true, data.hint), instruction: this.handleJsonText(context, true, data.instruction) }, this.toExample(false, undefined, undefined)), { __hintString: data.__hintString, __instructionString: data.__instructionString, attrs: {} });
979
+ const node = Object.assign(Object.assign({ type: BodyBitType_1.BodyBitType.select, options: (_a = this.buildSelectOptions(context, data.options)) !== null && _a !== void 0 ? _a : [], prefix: (_b = data.prefix) !== null && _b !== void 0 ? _b : '', postfix: (_c = data.postfix) !== null && _c !== void 0 ? _c : '', item: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.item), lead: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.lead), hint: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.hint), instruction: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.instruction) }, this.toExample(false, undefined, undefined)), { __hintString: data.__hintString, __instructionString: data.__instructionString, attrs: {} });
973
980
  // Remove Unset Optionals
974
981
  ObjectUtils_1.ObjectUtils.removeUnwantedProperties(node, {
975
982
  ignoreAllFalse: true,
@@ -1001,7 +1008,7 @@ class Builder extends BaseBuilder_1.BaseBuilder {
1001
1008
  if (!data)
1002
1009
  return undefined;
1003
1010
  // NOTE: Node order is important and is defined here
1004
- const node = Object.assign({ text: (_a = data.text) !== null && _a !== void 0 ? _a : '', isCorrect: !!data.isCorrect, item: this.handleJsonText(context, true, data.item), lead: this.handleJsonText(context, true, data.lead), hint: this.handleJsonText(context, true, data.hint), instruction: this.handleJsonText(context, true, data.instruction) }, this.toExample(data.__isDefaultExample, data.example, !!data.isCorrect));
1011
+ const node = Object.assign({ text: (_a = data.text) !== null && _a !== void 0 ? _a : '', isCorrect: !!data.isCorrect, item: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.item), lead: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.lead), hint: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.hint), instruction: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.instruction) }, this.toExample(data.__isDefaultExample, data.example, !!data.isCorrect));
1005
1012
  // Remove Unset Optionals
1006
1013
  ObjectUtils_1.ObjectUtils.removeUnwantedProperties(node, {
1007
1014
  ignoreAllFalse: true,
@@ -1023,7 +1030,7 @@ class Builder extends BaseBuilder_1.BaseBuilder {
1023
1030
  // Copy any attributes from 'attrs' to the body bit (data is in 'attrs' when coming from JSON)
1024
1031
  data = this.bodyBitCopyFromAttrs(data);
1025
1032
  // NOTE: Node order is important and is defined here
1026
- const node = Object.assign(Object.assign({ type: BodyBitType_1.BodyBitType.highlight, texts: (_a = this.buildHighlightTexts(context, data.texts)) !== null && _a !== void 0 ? _a : [], prefix: (_b = data.prefix) !== null && _b !== void 0 ? _b : '', postfix: (_c = data.postfix) !== null && _c !== void 0 ? _c : '', item: this.handleJsonText(context, true, data.item), lead: this.handleJsonText(context, true, data.lead), hint: this.handleJsonText(context, true, data.hint), instruction: this.handleJsonText(context, true, data.instruction) }, this.toExample(false, undefined, undefined)), { attrs: {} });
1033
+ const node = Object.assign(Object.assign({ type: BodyBitType_1.BodyBitType.highlight, texts: (_a = this.buildHighlightTexts(context, data.texts)) !== null && _a !== void 0 ? _a : [], prefix: (_b = data.prefix) !== null && _b !== void 0 ? _b : '', postfix: (_c = data.postfix) !== null && _c !== void 0 ? _c : '', item: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.item), lead: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.lead), hint: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.hint), instruction: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.instruction) }, this.toExample(false, undefined, undefined)), { attrs: {} });
1027
1034
  // Remove Unset Optionals
1028
1035
  ObjectUtils_1.ObjectUtils.removeUnwantedProperties(node, {
1029
1036
  ignoreAllFalse: true,
@@ -1055,7 +1062,7 @@ class Builder extends BaseBuilder_1.BaseBuilder {
1055
1062
  if (!data)
1056
1063
  return undefined;
1057
1064
  // NOTE: Node order is important and is defined here
1058
- const node = Object.assign({ text: (_a = data.text) !== null && _a !== void 0 ? _a : '', isCorrect: !!data.isCorrect, isHighlighted: !!data.isHighlighted, item: this.handleJsonText(context, true, data.item), lead: this.handleJsonText(context, true, data.lead), hint: this.handleJsonText(context, true, data.hint), instruction: this.handleJsonText(context, true, data.instruction) }, this.toExample(data.__isDefaultExample, data.example, !!data.isCorrect));
1065
+ const node = Object.assign({ text: (_a = data.text) !== null && _a !== void 0 ? _a : '', isCorrect: !!data.isCorrect, isHighlighted: !!data.isHighlighted, item: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.item), lead: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.lead), hint: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.hint), instruction: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.instruction) }, this.toExample(data.__isDefaultExample, data.example, !!data.isCorrect));
1059
1066
  // Remove Unset Optionals
1060
1067
  ObjectUtils_1.ObjectUtils.removeUnwantedProperties(node, {
1061
1068
  ignoreAllFalse: true,
@@ -1089,7 +1096,7 @@ class Builder extends BaseBuilder_1.BaseBuilder {
1089
1096
  // NOTE: Node order is important and is defined here
1090
1097
  const node = Object.assign({ question: this.buildTextAndIcon(context, data.question), answer: this.buildTextAndIcon(context, data.answer), alternativeAnswers: ((_a = data.alternativeAnswers) !== null && _a !== void 0 ? _a : [])
1091
1098
  .map((d) => this.buildTextAndIcon(context, d))
1092
- .filter((d) => d != null), item: this.handleJsonText(context, true, data.item), lead: this.handleJsonText(context, true, data.lead), hint: this.handleJsonText(context, true, data.hint), instruction: this.handleJsonText(context, true, data.instruction) }, this.toExample(data.__isDefaultExample, data.example, true));
1099
+ .filter((d) => d != null), item: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.item), lead: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.lead), hint: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.hint), instruction: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.instruction) }, this.toExample(data.__isDefaultExample, data.example, true));
1093
1100
  // Remove Unset Optionals
1094
1101
  ObjectUtils_1.ObjectUtils.removeUnwantedProperties(node, {
1095
1102
  ignoreAllFalse: true,
@@ -1125,7 +1132,7 @@ class Builder extends BaseBuilder_1.BaseBuilder {
1125
1132
  // NOTE: Node order is important and is defined here
1126
1133
  const node = Object.assign({ term: this.buildTextAndIcon(context, data.term, textAsStrings), definition: this.buildTextAndIcon(context, data.definition, textAsStrings), alternativeDefinitions: ((_a = data.alternativeDefinitions) !== null && _a !== void 0 ? _a : [])
1127
1134
  .map((d) => this.buildTextAndIcon(context, d, textAsStrings))
1128
- .filter((d) => d != null), item: this.handleJsonText(context, true, data.item), lead: this.handleJsonText(context, true, data.lead), hint: this.handleJsonText(context, true, data.hint), instruction: this.handleJsonText(context, true, data.instruction) }, this.toExample(data.__isDefaultExample, data.example, true));
1135
+ .filter((d) => d != null), item: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.item), lead: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.lead), hint: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.hint), instruction: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.instruction) }, this.toExample(data.__isDefaultExample, data.example, true));
1129
1136
  // Remove Unset Optionals
1130
1137
  ObjectUtils_1.ObjectUtils.removeUnwantedProperties(node, {
1131
1138
  ignoreAllFalse: true,
@@ -1137,11 +1144,11 @@ class Builder extends BaseBuilder_1.BaseBuilder {
1137
1144
  buildTextAndIcon(context, data, textAsStrings = false) {
1138
1145
  const icon = this.resourceBuilder.resourceFromResourceJson(context, data === null || data === void 0 ? void 0 : data.icon);
1139
1146
  // Ensure text is bitmark text
1140
- let text = this.handleJsonText(context, true, data === null || data === void 0 ? void 0 : data.text);
1147
+ let text = this.handleJsonText(context, TextLocation_1.TextLocation.tag, data === null || data === void 0 ? void 0 : data.text);
1141
1148
  if (textAsStrings) {
1142
1149
  // Convert the bitmark text to plain text (without breakscaping, as that will happen in the Bitmark Generator)
1143
1150
  text = this.textGenerator
1144
- .generateSync(text, TextFormat_1.TextFormat.text, TextLocation_1.TextLocation.body, {
1151
+ .generateSync(text, TextFormat_1.TextFormat.plainText, TextLocation_1.TextLocation.body, {
1145
1152
  noBreakscaping: true,
1146
1153
  })
1147
1154
  .trim();
@@ -1181,7 +1188,7 @@ class Builder extends BaseBuilder_1.BaseBuilder {
1181
1188
  if (!data)
1182
1189
  return undefined;
1183
1190
  // NOTE: Node order is important and is defined here
1184
- const node = Object.assign({ statement: (_a = data.statement) !== null && _a !== void 0 ? _a : '', isCorrect: !!data.isCorrect, item: this.handleJsonText(context, true, data.item), lead: this.handleJsonText(context, true, data.lead), hint: this.handleJsonText(context, true, data.hint), instruction: this.handleJsonText(context, true, data.instruction) }, this.toExample(data.__isDefaultExample, data.example, !!data.isCorrect));
1191
+ const node = Object.assign({ statement: (_a = data.statement) !== null && _a !== void 0 ? _a : '', isCorrect: !!data.isCorrect, item: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.item), lead: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.lead), hint: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.hint), instruction: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.instruction) }, this.toExample(data.__isDefaultExample, data.example, !!data.isCorrect));
1185
1192
  // Remove Unset Optionals
1186
1193
  ObjectUtils_1.ObjectUtils.removeUnwantedProperties(node, {
1187
1194
  ignoreAllFalse: true,
@@ -1301,7 +1308,7 @@ class Builder extends BaseBuilder_1.BaseBuilder {
1301
1308
  // NOTE: Node order is important and is defined here
1302
1309
  const node = {
1303
1310
  level: level !== null && level !== void 0 ? level : 0,
1304
- label: this.handleJsonText(context, true, label),
1311
+ label: this.handleJsonText(context, TextLocation_1.TextLocation.tag, label),
1305
1312
  };
1306
1313
  // Remove Unset Optionals
1307
1314
  ObjectUtils_1.ObjectUtils.removeUnwantedProperties(node, {