@gmb/bitmark-parser-generator 5.18.0 → 5.20.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.
- package/dist/browser/bitmark-parser-generator.min.js +1 -1
- package/dist/browser/bundle-report.html +2 -2
- package/dist/browser/cjs/index.cjs +222 -110
- package/dist/browser/cjs/index.cjs.map +1 -1
- package/dist/browser/cjs/index.d.cts +20 -8
- package/dist/browser/esm/index.d.ts +20 -8
- package/dist/browser/esm/index.js +222 -110
- package/dist/browser/esm/index.js.map +1 -1
- package/dist/cli/main.js +292 -267
- package/dist/cli/main.js.map +1 -1
- package/dist/index.cjs +292 -267
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +20 -8
- package/dist/index.d.ts +20 -8
- package/dist/index.js +292 -267
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -267,6 +267,7 @@ var BitType2 = {
|
|
|
267
267
|
extractorPageWithBlocks: "extractor-page-with-blocks",
|
|
268
268
|
extractorPageWithBlocksCollapsible: "extractor-page-with-blocks-collapsible",
|
|
269
269
|
extractorRepeatedText: "extractor-repeated-text",
|
|
270
|
+
extractorRule: "extractor-rule",
|
|
270
271
|
extractorTheme: "extractor-theme",
|
|
271
272
|
featured: "featured",
|
|
272
273
|
feedback: "feedback",
|
|
@@ -787,8 +788,6 @@ var AbstractTagConfig = class {
|
|
|
787
788
|
__publicField(this, "chain");
|
|
788
789
|
__publicField(this, "jsonKey");
|
|
789
790
|
// If the json key is different from the tag
|
|
790
|
-
__publicField(this, "secondaryJsonKey");
|
|
791
|
-
// Heading card alternate path
|
|
792
791
|
__publicField(this, "deprecated");
|
|
793
792
|
this.type = params.type;
|
|
794
793
|
this.configKey = params.configKey;
|
|
@@ -797,7 +796,6 @@ var AbstractTagConfig = class {
|
|
|
797
796
|
this.minCount = params.minCount;
|
|
798
797
|
this.chain = params.chain;
|
|
799
798
|
this.jsonKey = params.jsonKey;
|
|
800
|
-
this.secondaryJsonKey = params.secondaryJsonKey;
|
|
801
799
|
this.deprecated = params.deprecated;
|
|
802
800
|
}
|
|
803
801
|
};
|
|
@@ -958,12 +956,14 @@ ${tag.toString(opts)}`;
|
|
|
958
956
|
|
|
959
957
|
// src/model/config/CardSideConfig.ts
|
|
960
958
|
var CardSideConfig = class {
|
|
961
|
-
constructor(name, repeat, variants) {
|
|
959
|
+
constructor(name, repeat, variants, jsonKey) {
|
|
962
960
|
__publicField(this, "name");
|
|
963
961
|
__publicField(this, "repeat");
|
|
962
|
+
__publicField(this, "jsonKey");
|
|
964
963
|
__publicField(this, "variants");
|
|
965
964
|
this.name = name;
|
|
966
965
|
this.repeat = repeat;
|
|
966
|
+
this.jsonKey = jsonKey;
|
|
967
967
|
this.variants = variants;
|
|
968
968
|
}
|
|
969
969
|
toString(options) {
|
|
@@ -985,15 +985,13 @@ var CardSideConfig = class {
|
|
|
985
985
|
|
|
986
986
|
// src/model/config/CardSetConfig.ts
|
|
987
987
|
var CardSetConfig = class {
|
|
988
|
-
constructor(configKey, jsonKey,
|
|
988
|
+
constructor(configKey, jsonKey, sections, sides) {
|
|
989
989
|
__publicField(this, "configKey");
|
|
990
990
|
__publicField(this, "jsonKey");
|
|
991
|
-
__publicField(this, "itemType");
|
|
992
991
|
__publicField(this, "sections");
|
|
993
992
|
__publicField(this, "sides");
|
|
994
993
|
this.configKey = configKey;
|
|
995
994
|
this.jsonKey = jsonKey;
|
|
996
|
-
this.itemType = itemType;
|
|
997
995
|
this.sections = sections;
|
|
998
996
|
this.sides = sides;
|
|
999
997
|
}
|
|
@@ -1008,8 +1006,6 @@ var CardSetConfig = class {
|
|
|
1008
1006
|
s += `[CardSet: ${this.configKey}]`;
|
|
1009
1007
|
s += `
|
|
1010
1008
|
jsonKey: ${this.jsonKey}`;
|
|
1011
|
-
s += `
|
|
1012
|
-
itemType: ${this.itemType}`;
|
|
1013
1009
|
for (const side of this.sides) {
|
|
1014
1010
|
s += `
|
|
1015
1011
|
${side.toString(opts)}`;
|
|
@@ -1137,6 +1133,7 @@ import { Enum } from "@ncoderz/superenum";
|
|
|
1137
1133
|
import "@ncoderz/superenum";
|
|
1138
1134
|
var groupKeys = {
|
|
1139
1135
|
group_standardAllBits: "group_standardAllBits",
|
|
1136
|
+
group_standardItemLead: "group_standardItemLead",
|
|
1140
1137
|
group_standardItemLeadInstructionHint: "group_standardItemLeadInstructionHint",
|
|
1141
1138
|
group_standardTags: "group_standardTags",
|
|
1142
1139
|
group_imageSource: "group_imageSource",
|
|
@@ -1220,6 +1217,7 @@ var propertyKeys = {
|
|
|
1220
1217
|
property_bot: "@bot",
|
|
1221
1218
|
property_bubbleTag: "@bubbleTag",
|
|
1222
1219
|
property_extractorTag: "@extractorTag",
|
|
1220
|
+
property_extractorInternal: "@extractorInternal",
|
|
1223
1221
|
property_buttonCaption: "@buttonCaption",
|
|
1224
1222
|
property_callToActionUrl: "@callToActionUrl",
|
|
1225
1223
|
property_caption: "@caption",
|
|
@@ -1434,6 +1432,7 @@ var propertyKeys = {
|
|
|
1434
1432
|
property_subject: "@subject",
|
|
1435
1433
|
property_subtype: "@subtype",
|
|
1436
1434
|
property_tableAutoWidth: "@tableAutoWidth",
|
|
1435
|
+
property_tableColWidth: "@tableColWidth",
|
|
1437
1436
|
property_tableColumnMinWidth: "@tableColumnMinWidth",
|
|
1438
1437
|
property_tableFixedHeader: "@tableFixedHeader",
|
|
1439
1438
|
property_tableHeaderWhitespaceNoWrap: "@tableHeaderWhitespaceNoWrap",
|
|
@@ -2259,7 +2258,7 @@ var CARDSETS = {
|
|
|
2259
2258
|
{
|
|
2260
2259
|
key: ConfigKey.tag_title,
|
|
2261
2260
|
description: "Title of the definition.",
|
|
2262
|
-
|
|
2261
|
+
jsonKey: "^heading.forKeys"
|
|
2263
2262
|
},
|
|
2264
2263
|
{
|
|
2265
2264
|
key: ConfigKey.group_resourceIcon,
|
|
@@ -2283,7 +2282,7 @@ var CARDSETS = {
|
|
|
2283
2282
|
{
|
|
2284
2283
|
key: ConfigKey.tag_title,
|
|
2285
2284
|
description: "Title of the definition.",
|
|
2286
|
-
|
|
2285
|
+
jsonKey: "^heading.forValues"
|
|
2287
2286
|
},
|
|
2288
2287
|
{
|
|
2289
2288
|
key: ConfigKey.group_resourceIcon,
|
|
@@ -2333,7 +2332,7 @@ var CARDSETS = {
|
|
|
2333
2332
|
{
|
|
2334
2333
|
key: ConfigKey.tag_title,
|
|
2335
2334
|
description: "Title of the match pair.",
|
|
2336
|
-
|
|
2335
|
+
jsonKey: "^heading.forKeys"
|
|
2337
2336
|
},
|
|
2338
2337
|
{
|
|
2339
2338
|
key: ConfigKey.property_isCaseSensitive,
|
|
@@ -2368,7 +2367,7 @@ var CARDSETS = {
|
|
|
2368
2367
|
{
|
|
2369
2368
|
key: ConfigKey.tag_title,
|
|
2370
2369
|
description: "Title of the match pair.",
|
|
2371
|
-
|
|
2370
|
+
jsonKey: "^heading.forValues"
|
|
2372
2371
|
},
|
|
2373
2372
|
{
|
|
2374
2373
|
key: ConfigKey.property_isCaseSensitive,
|
|
@@ -2401,7 +2400,7 @@ var CARDSETS = {
|
|
|
2401
2400
|
{
|
|
2402
2401
|
key: ConfigKey.tag_title,
|
|
2403
2402
|
description: "Title of the audio match pair.",
|
|
2404
|
-
|
|
2403
|
+
jsonKey: "^heading.forKeys"
|
|
2405
2404
|
},
|
|
2406
2405
|
{
|
|
2407
2406
|
key: ConfigKey.resource_audio,
|
|
@@ -2426,7 +2425,7 @@ var CARDSETS = {
|
|
|
2426
2425
|
{
|
|
2427
2426
|
key: ConfigKey.tag_title,
|
|
2428
2427
|
description: "Title of the audio match pair.",
|
|
2429
|
-
|
|
2428
|
+
jsonKey: "^heading.forValues"
|
|
2430
2429
|
},
|
|
2431
2430
|
{
|
|
2432
2431
|
key: ConfigKey.resource_audio,
|
|
@@ -2458,7 +2457,7 @@ var CARDSETS = {
|
|
|
2458
2457
|
{
|
|
2459
2458
|
key: ConfigKey.tag_title,
|
|
2460
2459
|
description: "Title of the image match pair.",
|
|
2461
|
-
|
|
2460
|
+
jsonKey: "^heading.forKeys"
|
|
2462
2461
|
},
|
|
2463
2462
|
{
|
|
2464
2463
|
key: ConfigKey.resource_image,
|
|
@@ -2483,7 +2482,7 @@ var CARDSETS = {
|
|
|
2483
2482
|
{
|
|
2484
2483
|
key: ConfigKey.tag_title,
|
|
2485
2484
|
description: "Title of the image match pair.",
|
|
2486
|
-
|
|
2485
|
+
jsonKey: "^heading.forValues"
|
|
2487
2486
|
},
|
|
2488
2487
|
{
|
|
2489
2488
|
key: ConfigKey.resource_image,
|
|
@@ -2520,7 +2519,7 @@ var CARDSETS = {
|
|
|
2520
2519
|
{
|
|
2521
2520
|
key: ConfigKey.tag_title,
|
|
2522
2521
|
description: "Title of the match matrix.",
|
|
2523
|
-
|
|
2522
|
+
jsonKey: "^heading.forKeys"
|
|
2524
2523
|
},
|
|
2525
2524
|
{
|
|
2526
2525
|
key: ConfigKey.property_isCaseSensitive,
|
|
@@ -2550,7 +2549,7 @@ var CARDSETS = {
|
|
|
2550
2549
|
{
|
|
2551
2550
|
key: ConfigKey.tag_title,
|
|
2552
2551
|
description: "Title of the match matrix.",
|
|
2553
|
-
|
|
2552
|
+
jsonKey: "^heading.forValues"
|
|
2554
2553
|
},
|
|
2555
2554
|
{
|
|
2556
2555
|
key: ConfigKey.property_isCaseSensitive,
|
|
@@ -2579,11 +2578,13 @@ var CARDSETS = {
|
|
|
2579
2578
|
{
|
|
2580
2579
|
key: ConfigKey.tag_true,
|
|
2581
2580
|
description: "Tag for true statements.",
|
|
2581
|
+
jsonKey: "statement|set(isCorrect=true)",
|
|
2582
2582
|
maxCount: 1
|
|
2583
2583
|
},
|
|
2584
2584
|
{
|
|
2585
2585
|
key: ConfigKey.tag_false,
|
|
2586
2586
|
description: "Tag for false statements.",
|
|
2587
|
+
jsonKey: "statement|set(isCorrect=false)",
|
|
2587
2588
|
maxCount: 1
|
|
2588
2589
|
},
|
|
2589
2590
|
{
|
|
@@ -2647,7 +2648,7 @@ var CARDSETS = {
|
|
|
2647
2648
|
{
|
|
2648
2649
|
key: ConfigKey.tag_title,
|
|
2649
2650
|
description: "Title of the feedback.",
|
|
2650
|
-
|
|
2651
|
+
jsonKey: "^heading.forKeys"
|
|
2651
2652
|
}
|
|
2652
2653
|
],
|
|
2653
2654
|
bodyAllowed: false
|
|
@@ -2677,7 +2678,7 @@ var CARDSETS = {
|
|
|
2677
2678
|
{
|
|
2678
2679
|
key: ConfigKey.tag_title,
|
|
2679
2680
|
description: "Title of the feedback.",
|
|
2680
|
-
|
|
2681
|
+
jsonKey: "^heading.forValues"
|
|
2681
2682
|
}
|
|
2682
2683
|
],
|
|
2683
2684
|
bodyAllowed: true
|
|
@@ -2767,7 +2768,6 @@ var CARDSETS = {
|
|
|
2767
2768
|
//
|
|
2768
2769
|
[CardSetConfigKey.table]: {
|
|
2769
2770
|
jsonKey: "table.data",
|
|
2770
|
-
itemType: "array",
|
|
2771
2771
|
sides: [
|
|
2772
2772
|
{
|
|
2773
2773
|
name: "cell",
|
|
@@ -2782,8 +2782,8 @@ var CARDSETS = {
|
|
|
2782
2782
|
},
|
|
2783
2783
|
{
|
|
2784
2784
|
key: ConfigKey.tag_title,
|
|
2785
|
-
|
|
2786
|
-
|
|
2785
|
+
jsonKey: "^table.columns[]",
|
|
2786
|
+
description: "Title of the table."
|
|
2787
2787
|
},
|
|
2788
2788
|
{
|
|
2789
2789
|
key: ConfigKey.property_tableCellType,
|
|
@@ -2804,6 +2804,11 @@ var CARDSETS = {
|
|
|
2804
2804
|
key: ConfigKey.property_tableScope,
|
|
2805
2805
|
description: "Scope attribute for header cells.",
|
|
2806
2806
|
format: TagFormat.plainText
|
|
2807
|
+
},
|
|
2808
|
+
{
|
|
2809
|
+
key: ConfigKey.property_tableColWidth,
|
|
2810
|
+
description: "Width for the column.",
|
|
2811
|
+
format: TagFormat.number
|
|
2807
2812
|
}
|
|
2808
2813
|
],
|
|
2809
2814
|
repeatCount: Count.infinity
|
|
@@ -2818,14 +2823,15 @@ var CARDSETS = {
|
|
|
2818
2823
|
[CardSetConfigKey.tableExtended]: {
|
|
2819
2824
|
jsonKey: null,
|
|
2820
2825
|
sections: {
|
|
2821
|
-
|
|
2822
|
-
"table-
|
|
2823
|
-
"table-footer": { jsonKey: "
|
|
2826
|
+
"table-header": { jsonKey: "table.header.rows", sideJsonKey: "cells[{s}]|set(title=true)" },
|
|
2827
|
+
"table-body": { jsonKey: "table.body.rows", isDefault: true },
|
|
2828
|
+
"table-footer": { jsonKey: "table.footer.rows", sideJsonKey: "cells[{s}]|set(title=true)" }
|
|
2824
2829
|
},
|
|
2825
2830
|
sides: [
|
|
2826
2831
|
{
|
|
2827
2832
|
name: "cell",
|
|
2828
2833
|
repeat: true,
|
|
2834
|
+
jsonKey: "cells[{s}]",
|
|
2829
2835
|
variants: [
|
|
2830
2836
|
{
|
|
2831
2837
|
jsonKey: "content",
|
|
@@ -2836,27 +2842,37 @@ var CARDSETS = {
|
|
|
2836
2842
|
},
|
|
2837
2843
|
{
|
|
2838
2844
|
key: ConfigKey.tag_title,
|
|
2845
|
+
jsonKey: ".",
|
|
2839
2846
|
description: "Title of the table cell."
|
|
2840
2847
|
},
|
|
2841
2848
|
{
|
|
2842
2849
|
key: ConfigKey.property_tableCellType,
|
|
2850
|
+
jsonKey: "title|bool(th)",
|
|
2843
2851
|
description: "Table cell type (th/td).",
|
|
2844
2852
|
format: TagFormat.plainText
|
|
2845
2853
|
},
|
|
2846
2854
|
{
|
|
2847
2855
|
key: ConfigKey.property_tableRowSpan,
|
|
2856
|
+
jsonKey: "rowspan",
|
|
2848
2857
|
description: "Number of rows the cell spans.",
|
|
2849
2858
|
format: TagFormat.number
|
|
2850
2859
|
},
|
|
2851
2860
|
{
|
|
2852
2861
|
key: ConfigKey.property_tableColSpan,
|
|
2862
|
+
jsonKey: "colspan",
|
|
2853
2863
|
description: "Number of columns the cell spans.",
|
|
2854
2864
|
format: TagFormat.number
|
|
2855
2865
|
},
|
|
2856
2866
|
{
|
|
2857
2867
|
key: ConfigKey.property_tableScope,
|
|
2868
|
+
jsonKey: "scope",
|
|
2858
2869
|
description: "Scope attribute for header cells.",
|
|
2859
2870
|
format: TagFormat.plainText
|
|
2871
|
+
},
|
|
2872
|
+
{
|
|
2873
|
+
key: ConfigKey.property_tableColWidth,
|
|
2874
|
+
description: "Width for the column.",
|
|
2875
|
+
format: TagFormat.number
|
|
2860
2876
|
}
|
|
2861
2877
|
],
|
|
2862
2878
|
repeatCount: Count.infinity
|
|
@@ -2870,7 +2886,6 @@ var CARDSETS = {
|
|
|
2870
2886
|
//
|
|
2871
2887
|
[CardSetConfigKey.pronunciationTable]: {
|
|
2872
2888
|
jsonKey: "pronunciationTable.data",
|
|
2873
|
-
itemType: "array",
|
|
2874
2889
|
sides: [
|
|
2875
2890
|
{
|
|
2876
2891
|
name: "cell",
|
|
@@ -2917,15 +2932,8 @@ var CARDSETS = {
|
|
|
2917
2932
|
format: TagFormat.plainText
|
|
2918
2933
|
},
|
|
2919
2934
|
{
|
|
2920
|
-
key: ConfigKey.
|
|
2921
|
-
description: "
|
|
2922
|
-
chain: [
|
|
2923
|
-
{
|
|
2924
|
-
key: ConfigKey.tag_item,
|
|
2925
|
-
description: "The lead, page number, source page number, and margin number.",
|
|
2926
|
-
maxCount: 4
|
|
2927
|
-
}
|
|
2928
|
-
]
|
|
2935
|
+
key: ConfigKey.group_standardItemLead,
|
|
2936
|
+
description: "Item, lead, page number, and margin number for the bot action response."
|
|
2929
2937
|
},
|
|
2930
2938
|
{
|
|
2931
2939
|
key: ConfigKey.tag_instruction,
|
|
@@ -3012,19 +3020,20 @@ var CARDSETS = {
|
|
|
3012
3020
|
description: "Title of the ingredient."
|
|
3013
3021
|
},
|
|
3014
3022
|
{
|
|
3015
|
-
key: ConfigKey.
|
|
3016
|
-
description: "
|
|
3023
|
+
key: ConfigKey.tag_true,
|
|
3024
|
+
description: "Checked state for the ingredient.",
|
|
3025
|
+
jsonKey: "ingredient|set(checked=true)",
|
|
3026
|
+
maxCount: 1
|
|
3017
3027
|
},
|
|
3018
3028
|
{
|
|
3019
|
-
key: ConfigKey.
|
|
3020
|
-
description: "
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
]
|
|
3029
|
+
key: ConfigKey.tag_false,
|
|
3030
|
+
description: "Unchecked state for the ingredient.",
|
|
3031
|
+
jsonKey: "ingredient|set(checked=false)",
|
|
3032
|
+
maxCount: 1
|
|
3033
|
+
},
|
|
3034
|
+
{
|
|
3035
|
+
key: ConfigKey.group_standardItemLead,
|
|
3036
|
+
description: "Item, lead, page number, and margin number for the ingredient."
|
|
3028
3037
|
},
|
|
3029
3038
|
{
|
|
3030
3039
|
key: ConfigKey.tag_instruction,
|
|
@@ -3163,8 +3172,7 @@ var GROUPS = {
|
|
|
3163
3172
|
{
|
|
3164
3173
|
key: ConfigKey.property_validationDate,
|
|
3165
3174
|
description: "The date when the bit was validated",
|
|
3166
|
-
format: TagFormat.plainText
|
|
3167
|
-
defaultValue: ""
|
|
3175
|
+
format: TagFormat.plainText
|
|
3168
3176
|
},
|
|
3169
3177
|
{
|
|
3170
3178
|
key: ConfigKey.property_aiGenerated,
|
|
@@ -3309,6 +3317,7 @@ var GROUPS = {
|
|
|
3309
3317
|
},
|
|
3310
3318
|
{
|
|
3311
3319
|
key: ConfigKey.property_groupTag,
|
|
3320
|
+
jsonKey: "groupTag.name",
|
|
3312
3321
|
description: "The group tag(s) for the bit",
|
|
3313
3322
|
format: TagFormat.plainText,
|
|
3314
3323
|
maxCount: Count.infinity,
|
|
@@ -3339,6 +3348,12 @@ var GROUPS = {
|
|
|
3339
3348
|
format: TagFormat.plainText,
|
|
3340
3349
|
maxCount: Count.infinity
|
|
3341
3350
|
},
|
|
3351
|
+
{
|
|
3352
|
+
key: ConfigKey.property_extractorInternal,
|
|
3353
|
+
description: "Internal metadata used by the extractor for processing purposes",
|
|
3354
|
+
format: TagFormat.plainText,
|
|
3355
|
+
maxCount: Count.infinity
|
|
3356
|
+
},
|
|
3342
3357
|
{
|
|
3343
3358
|
key: ConfigKey.property_levelCEFRp,
|
|
3344
3359
|
description: "The CEFRp level for the bit",
|
|
@@ -3405,20 +3420,48 @@ var GROUPS = {
|
|
|
3405
3420
|
}
|
|
3406
3421
|
]
|
|
3407
3422
|
},
|
|
3408
|
-
[ConfigKey.
|
|
3423
|
+
[ConfigKey.group_standardItemLead]: {
|
|
3409
3424
|
type: GroupConfigType.standard,
|
|
3410
|
-
description: "Standard group for item, lead, page number,
|
|
3425
|
+
description: "Standard group for item, lead, page number, and margin number tags",
|
|
3411
3426
|
tags: [
|
|
3412
3427
|
{
|
|
3413
3428
|
key: ConfigKey.tag_item,
|
|
3429
|
+
jsonKey: "item",
|
|
3414
3430
|
description: "The item for the bit",
|
|
3415
3431
|
chain: [
|
|
3416
3432
|
{
|
|
3417
3433
|
key: ConfigKey.tag_item,
|
|
3418
|
-
|
|
3419
|
-
|
|
3434
|
+
jsonKey: "lead",
|
|
3435
|
+
description: "The lead for the bit",
|
|
3436
|
+
maxCount: 1,
|
|
3437
|
+
chain: [
|
|
3438
|
+
{
|
|
3439
|
+
key: ConfigKey.tag_item,
|
|
3440
|
+
jsonKey: "pageNumber",
|
|
3441
|
+
description: "The page number for the bit",
|
|
3442
|
+
maxCount: 1,
|
|
3443
|
+
chain: [
|
|
3444
|
+
{
|
|
3445
|
+
key: ConfigKey.tag_item,
|
|
3446
|
+
jsonKey: "marginNumber",
|
|
3447
|
+
description: "The margin number for the bit",
|
|
3448
|
+
maxCount: 1
|
|
3449
|
+
}
|
|
3450
|
+
]
|
|
3451
|
+
}
|
|
3452
|
+
]
|
|
3420
3453
|
}
|
|
3421
3454
|
]
|
|
3455
|
+
}
|
|
3456
|
+
]
|
|
3457
|
+
},
|
|
3458
|
+
[ConfigKey.group_standardItemLeadInstructionHint]: {
|
|
3459
|
+
type: GroupConfigType.standard,
|
|
3460
|
+
description: "Standard group for item, lead, page number, margin number, instruction and hint tags",
|
|
3461
|
+
tags: [
|
|
3462
|
+
{
|
|
3463
|
+
key: ConfigKey.group_standardItemLead,
|
|
3464
|
+
description: "Item, lead, page number, and margin number tags"
|
|
3422
3465
|
},
|
|
3423
3466
|
{
|
|
3424
3467
|
key: ConfigKey.tag_instruction,
|
|
@@ -3457,6 +3500,7 @@ var GROUPS = {
|
|
|
3457
3500
|
tags: [
|
|
3458
3501
|
{
|
|
3459
3502
|
key: ConfigKey.property_imageSource,
|
|
3503
|
+
jsonKey: "imageSource.url",
|
|
3460
3504
|
description: "The source of an image",
|
|
3461
3505
|
format: TagFormat.plainText,
|
|
3462
3506
|
chain: [
|
|
@@ -3490,6 +3534,7 @@ var GROUPS = {
|
|
|
3490
3534
|
tags: [
|
|
3491
3535
|
{
|
|
3492
3536
|
key: ConfigKey.property_technicalTerm,
|
|
3537
|
+
jsonKey: "technicalTerm.technicalTerm",
|
|
3493
3538
|
description: "The technical term",
|
|
3494
3539
|
format: TagFormat.plainText,
|
|
3495
3540
|
chain: [
|
|
@@ -3508,6 +3553,7 @@ var GROUPS = {
|
|
|
3508
3553
|
tags: [
|
|
3509
3554
|
{
|
|
3510
3555
|
key: ConfigKey.property_person,
|
|
3556
|
+
jsonKey: "person.name",
|
|
3511
3557
|
description: "A person",
|
|
3512
3558
|
format: TagFormat.plainText,
|
|
3513
3559
|
chain: [
|
|
@@ -3525,6 +3571,7 @@ var GROUPS = {
|
|
|
3525
3571
|
{
|
|
3526
3572
|
// Deprecated (parter renamed to person)
|
|
3527
3573
|
key: ConfigKey.property_partner,
|
|
3574
|
+
jsonKey: "partner.name",
|
|
3528
3575
|
description: "A partner",
|
|
3529
3576
|
format: TagFormat.plainText,
|
|
3530
3577
|
chain: [
|
|
@@ -3552,6 +3599,7 @@ var GROUPS = {
|
|
|
3552
3599
|
chain: [
|
|
3553
3600
|
{
|
|
3554
3601
|
key: ConfigKey.tag_gap,
|
|
3602
|
+
jsonKey: "solutions[]",
|
|
3555
3603
|
description: "Alternative values for the gaps in the content",
|
|
3556
3604
|
maxCount: Count.infinity
|
|
3557
3605
|
},
|
|
@@ -3561,13 +3609,16 @@ var GROUPS = {
|
|
|
3561
3609
|
},
|
|
3562
3610
|
{
|
|
3563
3611
|
key: ConfigKey.property_example,
|
|
3612
|
+
jsonKey: "example",
|
|
3564
3613
|
description: "An example for the gap",
|
|
3565
3614
|
format: TagFormat.plainText
|
|
3566
3615
|
},
|
|
3567
3616
|
{
|
|
3568
3617
|
key: ConfigKey.property_isCaseSensitive,
|
|
3618
|
+
jsonKey: "isCaseSensitive",
|
|
3569
3619
|
description: "If true, the gap text is case sensitive",
|
|
3570
|
-
format: TagFormat.boolean
|
|
3620
|
+
format: TagFormat.boolean,
|
|
3621
|
+
defaultValue: "true"
|
|
3571
3622
|
}
|
|
3572
3623
|
]
|
|
3573
3624
|
}
|
|
@@ -3584,11 +3635,13 @@ var GROUPS = {
|
|
|
3584
3635
|
chain: [
|
|
3585
3636
|
{
|
|
3586
3637
|
key: ConfigKey.tag_true,
|
|
3638
|
+
jsonKey: "choices[]|set(isCorrect=true)",
|
|
3587
3639
|
description: "True values for a true/false statement/question",
|
|
3588
3640
|
maxCount: Count.infinity
|
|
3589
3641
|
},
|
|
3590
3642
|
{
|
|
3591
3643
|
key: ConfigKey.tag_false,
|
|
3644
|
+
jsonKey: "choices[]|set(isCorrect=false)",
|
|
3592
3645
|
description: "False values for a true/false statement/question",
|
|
3593
3646
|
maxCount: Count.infinity
|
|
3594
3647
|
},
|
|
@@ -3598,6 +3651,7 @@ var GROUPS = {
|
|
|
3598
3651
|
},
|
|
3599
3652
|
{
|
|
3600
3653
|
key: ConfigKey.property_example,
|
|
3654
|
+
jsonKey: "example",
|
|
3601
3655
|
description: "An example for the true/false statement/question",
|
|
3602
3656
|
format: TagFormat.plainText
|
|
3603
3657
|
}
|
|
@@ -3610,11 +3664,13 @@ var GROUPS = {
|
|
|
3610
3664
|
chain: [
|
|
3611
3665
|
{
|
|
3612
3666
|
key: ConfigKey.tag_true,
|
|
3667
|
+
jsonKey: "choices[]|set(isCorrect=true)",
|
|
3613
3668
|
description: "True values for a true/false statement/question",
|
|
3614
3669
|
maxCount: Count.infinity
|
|
3615
3670
|
},
|
|
3616
3671
|
{
|
|
3617
3672
|
key: ConfigKey.tag_false,
|
|
3673
|
+
jsonKey: "choices[]|set(isCorrect=false)",
|
|
3618
3674
|
description: "False values for a true/false statement/question",
|
|
3619
3675
|
maxCount: Count.infinity
|
|
3620
3676
|
},
|
|
@@ -3624,6 +3680,7 @@ var GROUPS = {
|
|
|
3624
3680
|
},
|
|
3625
3681
|
{
|
|
3626
3682
|
key: ConfigKey.property_example,
|
|
3683
|
+
jsonKey: "example",
|
|
3627
3684
|
description: "An example for the true/false statement/question",
|
|
3628
3685
|
format: TagFormat.plainText
|
|
3629
3686
|
}
|
|
@@ -3637,6 +3694,7 @@ var GROUPS = {
|
|
|
3637
3694
|
tags: [
|
|
3638
3695
|
{
|
|
3639
3696
|
key: ConfigKey.property_mark,
|
|
3697
|
+
jsonKey: "marks.mark",
|
|
3640
3698
|
description: "The mark configuration",
|
|
3641
3699
|
format: TagFormat.plainText,
|
|
3642
3700
|
maxCount: Count.infinity,
|
|
@@ -3666,11 +3724,13 @@ var GROUPS = {
|
|
|
3666
3724
|
chain: [
|
|
3667
3725
|
{
|
|
3668
3726
|
key: ConfigKey.property_mark,
|
|
3727
|
+
jsonKey: "mark",
|
|
3669
3728
|
description: "The mark configuration",
|
|
3670
3729
|
format: TagFormat.plainText
|
|
3671
3730
|
},
|
|
3672
3731
|
{
|
|
3673
3732
|
key: ConfigKey.property_example,
|
|
3733
|
+
jsonKey: "example",
|
|
3674
3734
|
description: "An example for the marked content",
|
|
3675
3735
|
format: TagFormat.plainText
|
|
3676
3736
|
}
|
|
@@ -3841,7 +3901,8 @@ var GROUPS = {
|
|
|
3841
3901
|
{
|
|
3842
3902
|
key: ConfigKey.property_maxTocChapterLevel,
|
|
3843
3903
|
description: "The maximum table of contents chapter level",
|
|
3844
|
-
format: TagFormat.number
|
|
3904
|
+
format: TagFormat.number,
|
|
3905
|
+
defaultValue: "-1"
|
|
3845
3906
|
},
|
|
3846
3907
|
{
|
|
3847
3908
|
key: ConfigKey.property_sourceDocument,
|
|
@@ -3923,12 +3984,14 @@ var GROUPS = {
|
|
|
3923
3984
|
{
|
|
3924
3985
|
key: ConfigKey.property_isTracked,
|
|
3925
3986
|
description: "If true, the learning path is tracked",
|
|
3926
|
-
format: TagFormat.boolean
|
|
3987
|
+
format: TagFormat.boolean,
|
|
3988
|
+
defaultValue: "true"
|
|
3927
3989
|
},
|
|
3928
3990
|
{
|
|
3929
3991
|
key: ConfigKey.property_isInfoOnly,
|
|
3930
3992
|
description: "If true, the learning path is info only",
|
|
3931
|
-
format: TagFormat.boolean
|
|
3993
|
+
format: TagFormat.boolean,
|
|
3994
|
+
defaultValue: "false"
|
|
3932
3995
|
},
|
|
3933
3996
|
{
|
|
3934
3997
|
key: ConfigKey.property_deeplink,
|
|
@@ -4272,6 +4335,7 @@ var GROUPS = {
|
|
|
4272
4335
|
},
|
|
4273
4336
|
{
|
|
4274
4337
|
key: ConfigKey.property_posterImage,
|
|
4338
|
+
jsonKey: "posterImage.src",
|
|
4275
4339
|
description: "The poster image for the video",
|
|
4276
4340
|
format: TagFormat.plainText,
|
|
4277
4341
|
chain: [
|
|
@@ -4797,27 +4861,24 @@ var ConfigHydrator = class {
|
|
|
4797
4861
|
const v = this.hydrateCardVariantConfig(_variant);
|
|
4798
4862
|
variantsOfSide.push(v);
|
|
4799
4863
|
}
|
|
4800
|
-
const sideConfig = new CardSideConfig(
|
|
4864
|
+
const sideConfig = new CardSideConfig(
|
|
4865
|
+
_side.name,
|
|
4866
|
+
_side.repeat ?? false,
|
|
4867
|
+
variantsOfSide,
|
|
4868
|
+
_side.jsonKey
|
|
4869
|
+
);
|
|
4801
4870
|
sides.push(sideConfig);
|
|
4802
4871
|
}
|
|
4803
4872
|
const cardSetConfig = new CardSetConfig(
|
|
4804
4873
|
_cardSet,
|
|
4805
4874
|
_cardSetConfig.jsonKey,
|
|
4806
|
-
_cardSetConfig.itemType ?? "object",
|
|
4807
4875
|
_cardSetConfig.sections,
|
|
4808
4876
|
sides
|
|
4809
4877
|
);
|
|
4810
4878
|
return cardSetConfig;
|
|
4811
4879
|
}
|
|
4812
4880
|
hydrateTagConfig(_tag) {
|
|
4813
|
-
const {
|
|
4814
|
-
key: _configKey,
|
|
4815
|
-
maxCount,
|
|
4816
|
-
minCount,
|
|
4817
|
-
chain: _chain,
|
|
4818
|
-
secondaryJsonKey,
|
|
4819
|
-
deprecated
|
|
4820
|
-
} = _tag;
|
|
4881
|
+
const { key: _configKey, maxCount, minCount, chain: _chain, deprecated } = _tag;
|
|
4821
4882
|
const configKey = Enum2(ConfigKey).fromValue(_configKey) || ConfigKey._unknown;
|
|
4822
4883
|
if (!configKey) throw new Error(`No tag key found for config key '${configKey}'`);
|
|
4823
4884
|
const tag = Enum2(Tag).fromValue(configKey);
|
|
@@ -4832,7 +4893,6 @@ var ConfigHydrator = class {
|
|
|
4832
4893
|
maxCount: maxCount ?? MAX_COUNT_DEFAULT,
|
|
4833
4894
|
minCount: minCount ?? MIN_COUNT_DEFAULT,
|
|
4834
4895
|
chain,
|
|
4835
|
-
secondaryJsonKey,
|
|
4836
4896
|
deprecated
|
|
4837
4897
|
});
|
|
4838
4898
|
return {
|
|
@@ -4851,8 +4911,7 @@ var ConfigHydrator = class {
|
|
|
4851
4911
|
format,
|
|
4852
4912
|
values,
|
|
4853
4913
|
defaultValue,
|
|
4854
|
-
jsonKey
|
|
4855
|
-
secondaryJsonKey
|
|
4914
|
+
jsonKey
|
|
4856
4915
|
} = _tag;
|
|
4857
4916
|
const configKey = Enum2(ConfigKey).fromValue(_configKey) || ConfigKey._unknown;
|
|
4858
4917
|
if (!configKey) throw new Error(`No property key found for config key '${configKey}'`);
|
|
@@ -4868,7 +4927,6 @@ var ConfigHydrator = class {
|
|
|
4868
4927
|
minCount: minCount ?? MIN_COUNT_DEFAULT,
|
|
4869
4928
|
chain,
|
|
4870
4929
|
jsonKey,
|
|
4871
|
-
secondaryJsonKey,
|
|
4872
4930
|
format,
|
|
4873
4931
|
values,
|
|
4874
4932
|
defaultValue,
|
|
@@ -4881,15 +4939,7 @@ var ConfigHydrator = class {
|
|
|
4881
4939
|
};
|
|
4882
4940
|
}
|
|
4883
4941
|
hydrateResourceTagConfig(_tag) {
|
|
4884
|
-
const {
|
|
4885
|
-
key: _configKey,
|
|
4886
|
-
maxCount,
|
|
4887
|
-
minCount,
|
|
4888
|
-
chain: _chain,
|
|
4889
|
-
deprecated,
|
|
4890
|
-
jsonKey,
|
|
4891
|
-
secondaryJsonKey
|
|
4892
|
-
} = _tag;
|
|
4942
|
+
const { key: _configKey, maxCount, minCount, chain: _chain, deprecated, jsonKey } = _tag;
|
|
4893
4943
|
const configKey = Enum2(ConfigKey).fromValue(_configKey) || ConfigKey._unknown;
|
|
4894
4944
|
if (!configKey) throw new Error(`No resource key found for config key '${configKey}'`);
|
|
4895
4945
|
const tag = _configKey.substring(1);
|
|
@@ -4904,7 +4954,6 @@ var ConfigHydrator = class {
|
|
|
4904
4954
|
minCount: minCount ?? MIN_COUNT_DEFAULT,
|
|
4905
4955
|
chain,
|
|
4906
4956
|
jsonKey,
|
|
4907
|
-
secondaryJsonKey,
|
|
4908
4957
|
deprecated
|
|
4909
4958
|
});
|
|
4910
4959
|
return {
|
|
@@ -6205,7 +6254,8 @@ var BITS = {
|
|
|
6205
6254
|
{
|
|
6206
6255
|
key: ConfigKey.property_isCaseSensitive,
|
|
6207
6256
|
description: "If the cloze answers are case sensitive",
|
|
6208
|
-
format: TagFormat.boolean
|
|
6257
|
+
format: TagFormat.boolean,
|
|
6258
|
+
defaultValue: "true"
|
|
6209
6259
|
},
|
|
6210
6260
|
{
|
|
6211
6261
|
key: ConfigKey.property_quizCountItems,
|
|
@@ -6651,6 +6701,7 @@ var BITS = {
|
|
|
6651
6701
|
},
|
|
6652
6702
|
{
|
|
6653
6703
|
key: ConfigKey.property_servings,
|
|
6704
|
+
jsonKey: "servings.servings",
|
|
6654
6705
|
description: "The number of servings for the ingredients",
|
|
6655
6706
|
format: TagFormat.number,
|
|
6656
6707
|
chain: [
|
|
@@ -7838,6 +7889,24 @@ var BITS = {
|
|
|
7838
7889
|
baseBitType: BitType2.article,
|
|
7839
7890
|
description: "Extractor repeated text bit, used to define repeated text in extractor pages"
|
|
7840
7891
|
},
|
|
7892
|
+
[BitType2.extractorRule]: {
|
|
7893
|
+
since: "5.17.0",
|
|
7894
|
+
baseBitType: BitType2._standard,
|
|
7895
|
+
description: "Extractor rule bit, used to define extraction rules with reference images and instructions",
|
|
7896
|
+
tags: [
|
|
7897
|
+
{
|
|
7898
|
+
key: ConfigKey.group_resourceBitTags,
|
|
7899
|
+
description: "Resource bit tags for extraction rule images"
|
|
7900
|
+
},
|
|
7901
|
+
{
|
|
7902
|
+
key: ConfigKey.group_resourceImage,
|
|
7903
|
+
description: "Resource image tags for the rule reference image",
|
|
7904
|
+
minCount: 1
|
|
7905
|
+
}
|
|
7906
|
+
],
|
|
7907
|
+
resourceAttachmentAllowed: false,
|
|
7908
|
+
textFormatDefault: TextFormat2.plainText
|
|
7909
|
+
},
|
|
7841
7910
|
[BitType2.extractorPageNumber]: {
|
|
7842
7911
|
since: "1.5.21",
|
|
7843
7912
|
baseBitType: BitType2.article,
|
|
@@ -8888,7 +8957,8 @@ var BITS = {
|
|
|
8888
8957
|
{
|
|
8889
8958
|
key: ConfigKey.property_isCaseSensitive,
|
|
8890
8959
|
description: "Case sensitivity for matching pairs, used to define if matches are case-sensitive",
|
|
8891
|
-
format: TagFormat.boolean
|
|
8960
|
+
format: TagFormat.boolean,
|
|
8961
|
+
defaultValue: "true"
|
|
8892
8962
|
}
|
|
8893
8963
|
],
|
|
8894
8964
|
cardSet: CardSetConfigKey.matchPairs
|
|
@@ -9338,7 +9408,8 @@ var BITS = {
|
|
|
9338
9408
|
{
|
|
9339
9409
|
key: ConfigKey.property_platformBrandTarget,
|
|
9340
9410
|
description: 'The platform brand target (typically "light", "dark" or "none")',
|
|
9341
|
-
format: TagFormat.plainText
|
|
9411
|
+
format: TagFormat.plainText,
|
|
9412
|
+
defaultValue: "none"
|
|
9342
9413
|
}
|
|
9343
9414
|
]
|
|
9344
9415
|
},
|
|
@@ -9361,7 +9432,8 @@ var BITS = {
|
|
|
9361
9432
|
{
|
|
9362
9433
|
key: ConfigKey.property_platformLogoMaxHeight,
|
|
9363
9434
|
description: "Maximum height for the platform logo",
|
|
9364
|
-
format: TagFormat.number
|
|
9435
|
+
format: TagFormat.number,
|
|
9436
|
+
defaultValue: "40"
|
|
9365
9437
|
},
|
|
9366
9438
|
{
|
|
9367
9439
|
key: ConfigKey.group_platformStylesCommon,
|
|
@@ -9534,7 +9606,8 @@ var BITS = {
|
|
|
9534
9606
|
{
|
|
9535
9607
|
key: ConfigKey.property_resolved,
|
|
9536
9608
|
description: "Resolved status for the review note, used to indicate if the note is resolved",
|
|
9537
|
-
format: TagFormat.boolean
|
|
9609
|
+
format: TagFormat.boolean,
|
|
9610
|
+
defaultValue: "false"
|
|
9538
9611
|
},
|
|
9539
9612
|
{
|
|
9540
9613
|
key: ConfigKey.property_resolvedDate,
|
|
@@ -9721,6 +9794,7 @@ var BITS = {
|
|
|
9721
9794
|
tags: [
|
|
9722
9795
|
{
|
|
9723
9796
|
key: ConfigKey.property_ratingLevelStart,
|
|
9797
|
+
jsonKey: "ratingLevelStart.level",
|
|
9724
9798
|
description: "Start level for the rating survey, used to define the lowest rating",
|
|
9725
9799
|
format: TagFormat.number,
|
|
9726
9800
|
chain: [
|
|
@@ -9733,6 +9807,7 @@ var BITS = {
|
|
|
9733
9807
|
},
|
|
9734
9808
|
{
|
|
9735
9809
|
key: ConfigKey.property_ratingLevelEnd,
|
|
9810
|
+
jsonKey: "ratingLevelEnd.level",
|
|
9736
9811
|
description: "End level for the rating survey, used to define the highest rating",
|
|
9737
9812
|
format: TagFormat.number,
|
|
9738
9813
|
chain: [
|
|
@@ -9801,28 +9876,32 @@ var BITS = {
|
|
|
9801
9876
|
{
|
|
9802
9877
|
key: ConfigKey.property_tableFixedHeader,
|
|
9803
9878
|
description: "Fixed header for the table, used to keep the header visible while scrolling",
|
|
9804
|
-
format: TagFormat.boolean
|
|
9879
|
+
format: TagFormat.boolean,
|
|
9880
|
+
defaultValue: "false"
|
|
9805
9881
|
},
|
|
9806
9882
|
{
|
|
9807
9883
|
key: ConfigKey.property_tableHeaderWhitespaceNoWrap,
|
|
9808
9884
|
description: "No wrap for table header whitespace, used to prevent header text wrapping",
|
|
9809
|
-
format: TagFormat.boolean
|
|
9810
|
-
|
|
9885
|
+
format: TagFormat.boolean,
|
|
9886
|
+
defaultValue: "false"
|
|
9811
9887
|
},
|
|
9812
9888
|
{
|
|
9813
9889
|
key: ConfigKey.property_tableSearch,
|
|
9814
9890
|
description: "Search functionality for the table, used to enable searching within the table",
|
|
9815
|
-
format: TagFormat.boolean
|
|
9891
|
+
format: TagFormat.boolean,
|
|
9892
|
+
defaultValue: "false"
|
|
9816
9893
|
},
|
|
9817
9894
|
{
|
|
9818
9895
|
key: ConfigKey.property_tableSort,
|
|
9819
9896
|
description: "Sorting functionality for the table, used to enable sorting of table columns",
|
|
9820
|
-
format: TagFormat.boolean
|
|
9897
|
+
format: TagFormat.boolean,
|
|
9898
|
+
defaultValue: "false"
|
|
9821
9899
|
},
|
|
9822
9900
|
{
|
|
9823
9901
|
key: ConfigKey.property_tablePagination,
|
|
9824
9902
|
description: "Pagination for the table, used to limit the number of rows displayed at once",
|
|
9825
|
-
format: TagFormat.boolean
|
|
9903
|
+
format: TagFormat.boolean,
|
|
9904
|
+
defaultValue: "false"
|
|
9826
9905
|
},
|
|
9827
9906
|
{
|
|
9828
9907
|
key: ConfigKey.property_tablePaginationLimit,
|
|
@@ -9839,24 +9918,26 @@ var BITS = {
|
|
|
9839
9918
|
{
|
|
9840
9919
|
key: ConfigKey.property_tableWhitespaceNoWrap,
|
|
9841
9920
|
description: "No wrap for table whitespace, used to prevent text wrapping in table cells",
|
|
9842
|
-
format: TagFormat.boolean
|
|
9843
|
-
|
|
9921
|
+
format: TagFormat.boolean,
|
|
9922
|
+
defaultValue: "false"
|
|
9844
9923
|
},
|
|
9845
9924
|
{
|
|
9846
9925
|
key: ConfigKey.property_tableAutoWidth,
|
|
9847
9926
|
description: "Auto width for table columns, used to automatically adjust column widths",
|
|
9848
|
-
format: TagFormat.boolean
|
|
9849
|
-
|
|
9927
|
+
format: TagFormat.boolean,
|
|
9928
|
+
defaultValue: "true"
|
|
9850
9929
|
},
|
|
9851
9930
|
{
|
|
9852
9931
|
key: ConfigKey.property_tableResizableColumns,
|
|
9853
9932
|
description: "Resizable columns for the table, used to allow users to resize table columns",
|
|
9854
|
-
format: TagFormat.boolean
|
|
9933
|
+
format: TagFormat.boolean,
|
|
9934
|
+
defaultValue: "false"
|
|
9855
9935
|
},
|
|
9856
9936
|
{
|
|
9857
9937
|
key: ConfigKey.property_tableColumnMinWidth,
|
|
9858
9938
|
description: "Minimum width for table columns, used to define the minimum width of columns",
|
|
9859
|
-
format: TagFormat.number
|
|
9939
|
+
format: TagFormat.number,
|
|
9940
|
+
defaultValue: "0"
|
|
9860
9941
|
}
|
|
9861
9942
|
],
|
|
9862
9943
|
cardSet: CardSetConfigKey.table
|
|
@@ -9864,7 +9945,8 @@ var BITS = {
|
|
|
9864
9945
|
[BitType2.tableExtended]: {
|
|
9865
9946
|
since: "4.14.0",
|
|
9866
9947
|
baseBitType: BitType2.table,
|
|
9867
|
-
description: "Extended table bit, used to create complex tables with all HTML table features"
|
|
9948
|
+
description: "Extended table bit, used to create complex tables with all HTML table features",
|
|
9949
|
+
cardSet: CardSetConfigKey.tableExtended
|
|
9868
9950
|
},
|
|
9869
9951
|
[BitType2.tableExtendedImage]: {
|
|
9870
9952
|
since: "5.13.0",
|
|
@@ -10830,7 +10912,6 @@ var Config = class {
|
|
|
10830
10912
|
maxCount: 1,
|
|
10831
10913
|
chain: tag.chain,
|
|
10832
10914
|
jsonKey: tag.jsonKey,
|
|
10833
|
-
secondaryJsonKey: tag.secondaryJsonKey,
|
|
10834
10915
|
deprecated: tag.deprecated
|
|
10835
10916
|
});
|
|
10836
10917
|
finalResourceTags[k] = newTag;
|
|
@@ -10935,7 +11016,7 @@ var instance2 = new Config();
|
|
|
10935
11016
|
// src/generated/package_info.ts
|
|
10936
11017
|
var PACKAGE_INFO = {
|
|
10937
11018
|
"name": "@gmb/bitmark-parser-generator",
|
|
10938
|
-
"version": "5.
|
|
11019
|
+
"version": "5.20.0",
|
|
10939
11020
|
"author": "Get More Brain Ltd",
|
|
10940
11021
|
"license": "ISC",
|
|
10941
11022
|
"description": "A bitmark parser and generator using Peggy.js"
|
|
@@ -11496,6 +11577,8 @@ var NodeType = {
|
|
|
11496
11577
|
extractorExtractionTimestampValue: "extractorExtractionTimestampValue",
|
|
11497
11578
|
extractorTag: "extractorTag",
|
|
11498
11579
|
extractorTagValue: "extractorTagValue",
|
|
11580
|
+
extractorInternal: "extractorInternal",
|
|
11581
|
+
extractorInternalValue: "extractorInternalValue",
|
|
11499
11582
|
extraProperties: "extraProperties",
|
|
11500
11583
|
feedback: "feedback",
|
|
11501
11584
|
feedbackEngine: "feedbackEngine",
|
|
@@ -11901,6 +11984,8 @@ var NodeType = {
|
|
|
11901
11984
|
table: "table",
|
|
11902
11985
|
tableAutoWidth: "tableAutoWidth",
|
|
11903
11986
|
tableAutoWidthValue: "tableAutoWidthValue",
|
|
11987
|
+
tableColWidth: "tableColWidth",
|
|
11988
|
+
tableColWidthValue: "tableColWidthValue",
|
|
11904
11989
|
tableColumnMinWidth: "tableColumnMinWidth",
|
|
11905
11990
|
tableColumnMinWidthValue: "tableColumnMinWidthValue",
|
|
11906
11991
|
tableFixedHeader: "tableFixedHeader",
|
|
@@ -24893,6 +24978,12 @@ var Builder = class extends BaseBuilder {
|
|
|
24893
24978
|
data.extractorTag,
|
|
24894
24979
|
options
|
|
24895
24980
|
),
|
|
24981
|
+
extractorInternal: this.toAstProperty(
|
|
24982
|
+
bitType,
|
|
24983
|
+
ConfigKey.property_extractorInternal,
|
|
24984
|
+
data.extractorInternal,
|
|
24985
|
+
options
|
|
24986
|
+
),
|
|
24896
24987
|
levelCEFRp: this.toAstProperty(
|
|
24897
24988
|
bitType,
|
|
24898
24989
|
ConfigKey.property_levelCEFRp,
|
|
@@ -26380,6 +26471,7 @@ var Builder = class extends BaseBuilder {
|
|
|
26380
26471
|
if (cell.rowspan != null) tableCell.rowspan = cell.rowspan;
|
|
26381
26472
|
if (cell.colspan != null) tableCell.colspan = cell.colspan;
|
|
26382
26473
|
if (cell.scope) tableCell.scope = cell.scope;
|
|
26474
|
+
if (cell.colwidth != null) tableCell.colwidth = cell.colwidth;
|
|
26383
26475
|
return tableCell;
|
|
26384
26476
|
});
|
|
26385
26477
|
return {
|
|
@@ -28675,6 +28767,10 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
|
|
|
28675
28767
|
this.writeTableCellProperty("tableScope", cell.scope);
|
|
28676
28768
|
this.writeNL();
|
|
28677
28769
|
}
|
|
28770
|
+
if (cell.colwidth && cell.colwidth > 0) {
|
|
28771
|
+
this.writeTableCellProperty("tableColWidth", cell.colwidth);
|
|
28772
|
+
this.writeNL();
|
|
28773
|
+
}
|
|
28678
28774
|
const content = cell.content ?? instance3.EMPTY_STRING;
|
|
28679
28775
|
this.writeTextOrValue(content, this.textFormat, TextLocation2.body);
|
|
28680
28776
|
}
|
|
@@ -31237,7 +31333,8 @@ var JsonGenerator = class extends AstWalkerGenerator {
|
|
|
31237
31333
|
if (bitJson.isTracked == null) bitJson.isTracked = true;
|
|
31238
31334
|
if (bitJson.isInfoOnly == null) bitJson.isInfoOnly = false;
|
|
31239
31335
|
}
|
|
31240
|
-
|
|
31336
|
+
const tableImageHasTable = instance2.isOfBitType(bitType, BitType2.tableImage) && !this.tableIsEmpty(bitJson.table);
|
|
31337
|
+
if (instance2.isOfBitType(bitType, BitType2.table) && !instance2.isOfBitType(bitType, BitType2.tableImage) || tableImageHasTable) {
|
|
31241
31338
|
if (bitJson.tableFixedHeader == null) bitJson.tableFixedHeader = false;
|
|
31242
31339
|
if (bitJson.tableHeaderWhitespaceNoWrap == null) {
|
|
31243
31340
|
bitJson.tableHeaderWhitespaceNoWrap = false;
|
|
@@ -31252,10 +31349,8 @@ var JsonGenerator = class extends AstWalkerGenerator {
|
|
|
31252
31349
|
if (bitJson.tableResizableColumns == null) bitJson.tableResizableColumns = false;
|
|
31253
31350
|
if (bitJson.tableColumnMinWidth == null) bitJson.tableColumnMinWidth = 0;
|
|
31254
31351
|
}
|
|
31255
|
-
if (instance2.isOfBitType(bitType, BitType2.tableImage)) {
|
|
31256
|
-
|
|
31257
|
-
delete bitJson.table;
|
|
31258
|
-
}
|
|
31352
|
+
if (instance2.isOfBitType(bitType, BitType2.tableImage) && !tableImageHasTable) {
|
|
31353
|
+
delete bitJson.table;
|
|
31259
31354
|
}
|
|
31260
31355
|
if (instance2.isOfBitType(bitType, BitType2.bookReference)) {
|
|
31261
31356
|
if (bitJson.refAuthor == null) bitJson.refAuthor = [];
|
|
@@ -34055,11 +34150,19 @@ function parseTable(context, _bitType, cardSet) {
|
|
|
34055
34150
|
const rowSpanRaw = tags2.tableRowSpan ?? readExtraProperty(tags2.extraProperties, "tableRowSpan");
|
|
34056
34151
|
const colSpanRaw = tags2.tableColSpan ?? readExtraProperty(tags2.extraProperties, "tableColSpan");
|
|
34057
34152
|
const scopeRaw = tags2.tableScope ?? readExtraProperty(tags2.extraProperties, "tableScope");
|
|
34058
|
-
|
|
34153
|
+
const colWidthRaw = tags2.tableColWidth ?? readExtraProperty(tags2.extraProperties, "tableColWidth");
|
|
34154
|
+
cleanupExtraProperties(tags2, [
|
|
34155
|
+
"tableCellType",
|
|
34156
|
+
"tableRowSpan",
|
|
34157
|
+
"tableColSpan",
|
|
34158
|
+
"tableScope",
|
|
34159
|
+
"tableColWidth"
|
|
34160
|
+
]);
|
|
34059
34161
|
const cellType = normalizeCellType(cellTypeRaw, section);
|
|
34060
34162
|
const rowspan = normalizeSpan(rowSpanRaw, "rowspan");
|
|
34061
34163
|
const colspan = normalizeSpan(colSpanRaw, "colspan");
|
|
34062
34164
|
const scope = normalizeScope(scopeRaw);
|
|
34165
|
+
const colwidth = instance6.asNumber(colWidthRaw) ?? 0;
|
|
34063
34166
|
const cell = {
|
|
34064
34167
|
content
|
|
34065
34168
|
};
|
|
@@ -34067,6 +34170,7 @@ function parseTable(context, _bitType, cardSet) {
|
|
|
34067
34170
|
if (rowspan > 1) cell.rowspan = rowspan;
|
|
34068
34171
|
if (colspan > 1) cell.colspan = colspan;
|
|
34069
34172
|
if (scope) cell.scope = scope;
|
|
34173
|
+
if (colwidth > 0) cell.colwidth = colwidth;
|
|
34070
34174
|
return cell;
|
|
34071
34175
|
};
|
|
34072
34176
|
const resolveSectionQualifier = (card) => {
|
|
@@ -34453,6 +34557,15 @@ function itemLeadTagContentProcessor(context, _contentDepth, _tagsConfig, conten
|
|
|
34453
34557
|
}
|
|
34454
34558
|
|
|
34455
34559
|
// src/parser/bitmark/peg/contentProcessors/ItemLeadChainContentProcessor.ts
|
|
34560
|
+
function flattenChainContent(content) {
|
|
34561
|
+
const result = [content];
|
|
34562
|
+
if (content.chain) {
|
|
34563
|
+
for (const child of content.chain) {
|
|
34564
|
+
result.push(...flattenChainContent(child));
|
|
34565
|
+
}
|
|
34566
|
+
}
|
|
34567
|
+
return result;
|
|
34568
|
+
}
|
|
34456
34569
|
function itemLeadChainContentProcessor(context, contentDepth, tagsConfig, content, target) {
|
|
34457
34570
|
if (contentDepth === ContentDepth.Chain) {
|
|
34458
34571
|
itemLeadTagContentProcessor(context, contentDepth, tagsConfig, content, target);
|
|
@@ -34463,7 +34576,7 @@ function itemLeadChainContentProcessor(context, contentDepth, tagsConfig, conten
|
|
|
34463
34576
|
function buildItemLead(context, _contentDepth, tagsConfig, content, target) {
|
|
34464
34577
|
if (context.DEBUG_CHAIN_CONTENT) context.debugPrint("item lead content", content);
|
|
34465
34578
|
const itemLeadConfig = instance2.getTagConfigForTag(tagsConfig, Enum15(Tag).fromValue(content.type));
|
|
34466
|
-
const chainContent =
|
|
34579
|
+
const chainContent = flattenChainContent(content);
|
|
34467
34580
|
const chainTags = context.bitContentProcessor(
|
|
34468
34581
|
ContentDepth.Chain,
|
|
34469
34582
|
itemLeadConfig?.chain,
|
|
@@ -35020,7 +35133,6 @@ function propertyContentProcessor(context, contentDepth, tagsConfig, content, ta
|
|
|
35020
35133
|
minCount: 1,
|
|
35021
35134
|
chain: void 0,
|
|
35022
35135
|
jsonKey: void 0,
|
|
35023
|
-
secondaryJsonKey: void 0,
|
|
35024
35136
|
format: TagFormat.bitmarkText,
|
|
35025
35137
|
values: void 0,
|
|
35026
35138
|
defaultValue: void 0,
|