@okf/ootils 1.31.3 → 1.31.4

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.
@@ -214,6 +214,14 @@ declare const _recursExtractBlocks: ({ data, cb, sectionStack, blockPathPrefix }
214
214
  blockPathPrefix?: string;
215
215
  }) => void;
216
216
 
217
+ /**
218
+ * Returns true if annotation is enabled on this tpl. Two conditions must be met:
219
+ * 1. The tpl is in the publishing segment (annotation only makes sense for publishing).
220
+ * 2. At least one block on the tpl has the annotation capability in the registry
221
+ * (or legacy props.annotation.enable for unregistered blocks).
222
+ */
223
+ declare const isTplAnnotationEnabled: (tpl: any) => boolean;
224
+
217
225
  /**
218
226
  * Calculates all possible rollup relationships for a tag type
219
227
  *
@@ -1649,4 +1657,4 @@ declare class BlockRegistry {
1649
1657
  /** Singleton instance — the one registry shared across the app. */
1650
1658
  declare const blockRegistry: BlockRegistry;
1651
1659
 
1652
- export { BASE_BULLMQ_CONFIG, type BlockCapabilities, type BlockDef, BlockRegistry, CHUNKING_PRESETS, ELASTIC_MAPPING_PRESETS, FILTER_IDS, MONGO_SCHEMA_PRESETS, TEMP_removeDuplicateFilters, UI_CONTENT, _self_managed_buildAnnoHierarchyConfig, _self_managed_buildDocHierarchyConfig, _self_managed_getFixedAnnoRollupBlocks, _self_managed_getFixedAnnoTagBlock, autoGenFilterConfigsFromTpl, blockRegistry, buildFilterConfigurations, compareAndGroupBlocks, deleteVal, extractAllBlocksFromTpl, extractAndOrganizeBlocks, genCleanCamelCaseId, genTagId, generateFilterKey, getFilterKeyForBlock, getPlatformContextContent, getRollupPossibilities, getRoutePathToContentTypeLanding, getRoutePathToEditContent, getRoutePathToModerateContent, getRoutePathToMyContent, getRoutePathToPublishedContent, getRoutePathToReviewDashboard, getRoutePathToTCI, getRoutePathToTagCategoryLanding, getVal, mergeAnnoDataIntoAnnotationsTags, parseSpecialConfigSyntax, processAuthorAndCommonFilters, _recursExtractBlocks as recursivelyExtractBlocks, segrigateDocs, setVal, toArray };
1660
+ export { BASE_BULLMQ_CONFIG, type BlockCapabilities, type BlockDef, BlockRegistry, CHUNKING_PRESETS, ELASTIC_MAPPING_PRESETS, FILTER_IDS, MONGO_SCHEMA_PRESETS, TEMP_removeDuplicateFilters, UI_CONTENT, _self_managed_buildAnnoHierarchyConfig, _self_managed_buildDocHierarchyConfig, _self_managed_getFixedAnnoRollupBlocks, _self_managed_getFixedAnnoTagBlock, autoGenFilterConfigsFromTpl, blockRegistry, buildFilterConfigurations, compareAndGroupBlocks, deleteVal, extractAllBlocksFromTpl, extractAndOrganizeBlocks, genCleanCamelCaseId, genTagId, generateFilterKey, getFilterKeyForBlock, getPlatformContextContent, getRollupPossibilities, getRoutePathToContentTypeLanding, getRoutePathToEditContent, getRoutePathToModerateContent, getRoutePathToMyContent, getRoutePathToPublishedContent, getRoutePathToReviewDashboard, getRoutePathToTCI, getRoutePathToTagCategoryLanding, getVal, isTplAnnotationEnabled, mergeAnnoDataIntoAnnotationsTags, parseSpecialConfigSyntax, processAuthorAndCommonFilters, _recursExtractBlocks as recursivelyExtractBlocks, segrigateDocs, setVal, toArray };
package/dist/browser.d.ts CHANGED
@@ -214,6 +214,14 @@ declare const _recursExtractBlocks: ({ data, cb, sectionStack, blockPathPrefix }
214
214
  blockPathPrefix?: string;
215
215
  }) => void;
216
216
 
217
+ /**
218
+ * Returns true if annotation is enabled on this tpl. Two conditions must be met:
219
+ * 1. The tpl is in the publishing segment (annotation only makes sense for publishing).
220
+ * 2. At least one block on the tpl has the annotation capability in the registry
221
+ * (or legacy props.annotation.enable for unregistered blocks).
222
+ */
223
+ declare const isTplAnnotationEnabled: (tpl: any) => boolean;
224
+
217
225
  /**
218
226
  * Calculates all possible rollup relationships for a tag type
219
227
  *
@@ -1649,4 +1657,4 @@ declare class BlockRegistry {
1649
1657
  /** Singleton instance — the one registry shared across the app. */
1650
1658
  declare const blockRegistry: BlockRegistry;
1651
1659
 
1652
- export { BASE_BULLMQ_CONFIG, type BlockCapabilities, type BlockDef, BlockRegistry, CHUNKING_PRESETS, ELASTIC_MAPPING_PRESETS, FILTER_IDS, MONGO_SCHEMA_PRESETS, TEMP_removeDuplicateFilters, UI_CONTENT, _self_managed_buildAnnoHierarchyConfig, _self_managed_buildDocHierarchyConfig, _self_managed_getFixedAnnoRollupBlocks, _self_managed_getFixedAnnoTagBlock, autoGenFilterConfigsFromTpl, blockRegistry, buildFilterConfigurations, compareAndGroupBlocks, deleteVal, extractAllBlocksFromTpl, extractAndOrganizeBlocks, genCleanCamelCaseId, genTagId, generateFilterKey, getFilterKeyForBlock, getPlatformContextContent, getRollupPossibilities, getRoutePathToContentTypeLanding, getRoutePathToEditContent, getRoutePathToModerateContent, getRoutePathToMyContent, getRoutePathToPublishedContent, getRoutePathToReviewDashboard, getRoutePathToTCI, getRoutePathToTagCategoryLanding, getVal, mergeAnnoDataIntoAnnotationsTags, parseSpecialConfigSyntax, processAuthorAndCommonFilters, _recursExtractBlocks as recursivelyExtractBlocks, segrigateDocs, setVal, toArray };
1660
+ export { BASE_BULLMQ_CONFIG, type BlockCapabilities, type BlockDef, BlockRegistry, CHUNKING_PRESETS, ELASTIC_MAPPING_PRESETS, FILTER_IDS, MONGO_SCHEMA_PRESETS, TEMP_removeDuplicateFilters, UI_CONTENT, _self_managed_buildAnnoHierarchyConfig, _self_managed_buildDocHierarchyConfig, _self_managed_getFixedAnnoRollupBlocks, _self_managed_getFixedAnnoTagBlock, autoGenFilterConfigsFromTpl, blockRegistry, buildFilterConfigurations, compareAndGroupBlocks, deleteVal, extractAllBlocksFromTpl, extractAndOrganizeBlocks, genCleanCamelCaseId, genTagId, generateFilterKey, getFilterKeyForBlock, getPlatformContextContent, getRollupPossibilities, getRoutePathToContentTypeLanding, getRoutePathToEditContent, getRoutePathToModerateContent, getRoutePathToMyContent, getRoutePathToPublishedContent, getRoutePathToReviewDashboard, getRoutePathToTCI, getRoutePathToTagCategoryLanding, getVal, isTplAnnotationEnabled, mergeAnnoDataIntoAnnotationsTags, parseSpecialConfigSyntax, processAuthorAndCommonFilters, _recursExtractBlocks as recursivelyExtractBlocks, segrigateDocs, setVal, toArray };
package/dist/browser.js CHANGED
@@ -54,6 +54,7 @@ __export(browser_exports, {
54
54
  getRoutePathToTCI: () => getRoutePathToTCI,
55
55
  getRoutePathToTagCategoryLanding: () => getRoutePathToTagCategoryLanding,
56
56
  getVal: () => getVal,
57
+ isTplAnnotationEnabled: () => isTplAnnotationEnabled,
57
58
  mergeAnnoDataIntoAnnotationsTags: () => mergeAnnoDataIntoAnnotationsTags,
58
59
  parseSpecialConfigSyntax: () => parseSpecialConfigSyntax,
59
60
  processAuthorAndCommonFilters: () => processAuthorAndCommonFilters,
@@ -375,6 +376,210 @@ var _extractBlocksFromSomeBuilders = ({
375
376
  }
376
377
  };
377
378
 
379
+ // src/blockRegistry/schemaPresets.ts
380
+ var MONGO_SCHEMA_PRESETS = {
381
+ object: { type: Object },
382
+ string: { type: String }
383
+ };
384
+ var ELASTIC_MAPPING_PRESETS = {
385
+ largeText: {
386
+ properties: {
387
+ allText: {
388
+ type: "text",
389
+ analyzer: "LargeTextAnalyzer"
390
+ }
391
+ }
392
+ }
393
+ };
394
+ var CHUNKING_PRESETS = {
395
+ // Lexical-shaped text — uses semantic chunking on allText
396
+ lexicalSemantic: {
397
+ strategy: "semanticChunking",
398
+ windowSize: 3,
399
+ minSimilarityScore: 0.7
400
+ },
401
+ // Plain text input — single chunk per field
402
+ simpleText: {
403
+ strategy: "simpleChunking"
404
+ }
405
+ };
406
+
407
+ // src/blockRegistry/blocks/LexicalTextEditor.ts
408
+ var LexicalTextEditor = {
409
+ compName: "LexicalTextEditor",
410
+ // Identity
411
+ category: "text",
412
+ qualQuant: "qual",
413
+ // Schema
414
+ mongoSchemaType: MONGO_SCHEMA_PRESETS.object,
415
+ esMapping: ELASTIC_MAPPING_PRESETS.largeText,
416
+ // Capabilities
417
+ capabilities: {
418
+ hasPlainText: true,
419
+ annotation: true,
420
+ aiAnnotation: true,
421
+ aiEnrichment: true,
422
+ searchable: true,
423
+ directDataImport: true,
424
+ csvExport: true,
425
+ translatable: true,
426
+ documentSummarizer: true,
427
+ stripFromMainOnAnnoChunkSync: true,
428
+ excludeFromListingProjection: true
429
+ },
430
+ // Field paths
431
+ fieldPaths: {
432
+ plainTextString: "allText",
433
+ searchField: "allText",
434
+ displayValue: "allText"
435
+ },
436
+ // Validation
437
+ validation: {
438
+ populatedCheckFn: "lexicalTextEditorHasValue",
439
+ formValidationFn: "lexicalTextEditorHasValue"
440
+ },
441
+ // Translation
442
+ translation: {
443
+ handlerType: "LexicalBlockHandler"
444
+ },
445
+ // Table rendering
446
+ tableCell: {
447
+ cellComp: "RichTextAsPlainTextLex",
448
+ sortPathSuffix: "editorState.root.children.0.children.0.text"
449
+ },
450
+ // CSV export
451
+ csvExport: {
452
+ transformFn: "KPRichLexicalEditor"
453
+ },
454
+ // Slack
455
+ slackFormat: {
456
+ handlerFn: "lexicalRichText"
457
+ },
458
+ // Batch import
459
+ batchImport: {
460
+ valueInjectorFn: "toLexicalValue"
461
+ },
462
+ // Content block option — TCI template builder & direct import UI
463
+ contentBlockOption: {
464
+ display: "Rich Text Field",
465
+ icon: "TextAa",
466
+ directImportGroupsIdx: [2, 2]
467
+ },
468
+ // Chunking config — used by okf-sub CreateChunksHandler
469
+ chunkingConfig: CHUNKING_PRESETS.lexicalSemantic
470
+ };
471
+
472
+ // src/blockRegistry/registry.ts
473
+ var BlockRegistry = class {
474
+ constructor() {
475
+ this.blocks = /* @__PURE__ */ new Map();
476
+ this.register(LexicalTextEditor);
477
+ }
478
+ /** Register a block descriptor. */
479
+ register(descriptor) {
480
+ this.blocks.set(descriptor.compName, descriptor);
481
+ }
482
+ /** Get the full descriptor for a block type. Returns undefined if not registered. */
483
+ getBlock(compType) {
484
+ return this.blocks.get(compType);
485
+ }
486
+ /** Check if a block type is registered in the registry. */
487
+ isRegistered(compType) {
488
+ return this.blocks.has(compType);
489
+ }
490
+ /**
491
+ * Get all registered block descriptors that have a given capability set to a truthy value.
492
+ * Optionally pass a specific value to match (e.g. for enum-style capabilities).
493
+ */
494
+ getBlocksByCapability(capability, value = true) {
495
+ return Array.from(this.blocks.values()).filter((b) => {
496
+ const cap = b.capabilities[capability];
497
+ if (value === true) return !!cap;
498
+ return cap === value;
499
+ });
500
+ }
501
+ /**
502
+ * Get compType strings for all registered blocks with a given capability.
503
+ * Replaces scattered hardcoded arrays like:
504
+ * const TEXT_FIELD_COMPONENTS = ["TextInput", "LexicalTextEditor", ...]
505
+ * becomes:
506
+ * const TEXT_FIELD_COMPONENTS = blockRegistry.getComps('aiTextExtraction')
507
+ */
508
+ getComps(capability, value = true) {
509
+ return this.getBlocksByCapability(capability, value).map((b) => b.compName);
510
+ }
511
+ /** Get all registered blocks in a given category. */
512
+ getBlocksByCategory(category) {
513
+ return Array.from(this.blocks.values()).filter((b) => b.category === category);
514
+ }
515
+ /** Get compType strings for all qual blocks. */
516
+ getQualBlocks() {
517
+ return Array.from(this.blocks.values()).filter((b) => b.qualQuant === "qual").map((b) => b.compName);
518
+ }
519
+ /** Get compType strings for all quant blocks. */
520
+ getQuantBlocks() {
521
+ return Array.from(this.blocks.values()).filter((b) => b.qualQuant === "quant").map((b) => b.compName);
522
+ }
523
+ /** Check if a specific block has a specific capability. */
524
+ hasCapability(compType, capability) {
525
+ const block = this.blocks.get(compType);
526
+ if (!block) return false;
527
+ return !!block.capabilities[capability];
528
+ }
529
+ /** Get all registered block descriptors. */
530
+ getAll() {
531
+ return Array.from(this.blocks.values());
532
+ }
533
+ /**
534
+ * Get compName strings for all registered blocks that have a chunking config.
535
+ * Used by chunking pipelines and prompt-string injection (e.g. searchChunks tool
536
+ * description) to know which fields actually have chunks to search.
537
+ */
538
+ getCompsWithChunking() {
539
+ return Array.from(this.blocks.values()).filter((b) => !!b.chunkingConfig).map((b) => b.compName);
540
+ }
541
+ /**
542
+ * Filter a list of block instances down to those where annotation is enabled.
543
+ * A block is annotation-enabled if its registry capability `annotation` is true.
544
+ * For backwards compat with un-migrated blocks (e.g. deprecated KPRichInput/RichTextEditor),
545
+ * falls back to the legacy per-instance `props.annotation.enable` toggle.
546
+ *
547
+ * Today: every registered annotation-capable block (e.g. LexicalTextEditor) is auto-enabled.
548
+ */
549
+ getAnnotationEnabledBlocks(allBlocks) {
550
+ return allBlocks.filter((block) => {
551
+ const blockDef = this.blocks.get(block.comp);
552
+ if (blockDef) return !!blockDef.capabilities.annotation;
553
+ return block.props?.annotation?.enable === true;
554
+ });
555
+ }
556
+ /**
557
+ * Resolve the tagTypesConfig for a block instance.
558
+ *
559
+ * Resolution order:
560
+ * 1. `hardCodedTagTypesConfigForSM` — the intended self-managed default, which takes
561
+ * priority over per-instance values (justifies not persisting per-block on self-managed).
562
+ * Sourced from `GET_SELF_MANAGED_BASE_CONFIGS().annotation_tagTypesConfig` on BE,
563
+ * or `platformConfigs.SELF_MANAGED_BASE_CONFIGS.annotation_tagTypesConfig` on FE.
564
+ * Pass null/undefined for non-SM tenants.
565
+ * 2. `block.props.annotation.tagTypesConfig` — legacy per-instance persisted value.
566
+ * 3. Empty array.
567
+ */
568
+ getTagTypesConfig(block, hardCodedTagTypesConfigForSM) {
569
+ return hardCodedTagTypesConfigForSM || block.props?.annotation?.tagTypesConfig || [];
570
+ }
571
+ };
572
+ var blockRegistry = new BlockRegistry();
573
+
574
+ // src/utils/isTplAnnotationEnabled.ts
575
+ var isTplAnnotationEnabled = (tpl) => {
576
+ if (tpl?.general?.segment !== "publishing") return false;
577
+ const allBlocks = extractAllBlocksFromTpl({ tpl }).filter(
578
+ (b) => typeof b.comp === "string"
579
+ );
580
+ return blockRegistry.getAnnotationEnabledBlocks(allBlocks).length > 0;
581
+ };
582
+
378
583
  // src/utils/getRollupPossibilities.ts
379
584
  var MAX_DEPTH_ROLLUP_POSSIBILITIES = 10;
380
585
  function getRollupPossibilities({
@@ -1454,201 +1659,6 @@ var compareAndGroupBlocks = (blocksPerTpl) => {
1454
1659
  return Array.from(templateGroupToFilters.values());
1455
1660
  };
1456
1661
 
1457
- // src/blockRegistry/schemaPresets.ts
1458
- var MONGO_SCHEMA_PRESETS = {
1459
- object: { type: Object },
1460
- string: { type: String }
1461
- };
1462
- var ELASTIC_MAPPING_PRESETS = {
1463
- largeText: {
1464
- properties: {
1465
- allText: {
1466
- type: "text",
1467
- analyzer: "LargeTextAnalyzer"
1468
- }
1469
- }
1470
- }
1471
- };
1472
- var CHUNKING_PRESETS = {
1473
- // Lexical-shaped text — uses semantic chunking on allText
1474
- lexicalSemantic: {
1475
- strategy: "semanticChunking",
1476
- windowSize: 3,
1477
- minSimilarityScore: 0.7
1478
- },
1479
- // Plain text input — single chunk per field
1480
- simpleText: {
1481
- strategy: "simpleChunking"
1482
- }
1483
- };
1484
-
1485
- // src/blockRegistry/blocks/LexicalTextEditor.ts
1486
- var LexicalTextEditor = {
1487
- compName: "LexicalTextEditor",
1488
- // Identity
1489
- category: "text",
1490
- qualQuant: "qual",
1491
- // Schema
1492
- mongoSchemaType: MONGO_SCHEMA_PRESETS.object,
1493
- esMapping: ELASTIC_MAPPING_PRESETS.largeText,
1494
- // Capabilities
1495
- capabilities: {
1496
- hasPlainText: true,
1497
- annotation: true,
1498
- aiAnnotation: true,
1499
- aiEnrichment: true,
1500
- searchable: true,
1501
- directDataImport: true,
1502
- csvExport: true,
1503
- translatable: true,
1504
- documentSummarizer: true,
1505
- stripFromMainOnAnnoChunkSync: true,
1506
- excludeFromListingProjection: true
1507
- },
1508
- // Field paths
1509
- fieldPaths: {
1510
- plainTextString: "allText",
1511
- searchField: "allText",
1512
- displayValue: "allText"
1513
- },
1514
- // Validation
1515
- validation: {
1516
- populatedCheckFn: "lexicalTextEditorHasValue",
1517
- formValidationFn: "lexicalTextEditorHasValue"
1518
- },
1519
- // Translation
1520
- translation: {
1521
- handlerType: "LexicalBlockHandler"
1522
- },
1523
- // Table rendering
1524
- tableCell: {
1525
- cellComp: "RichTextAsPlainTextLex",
1526
- sortPathSuffix: "editorState.root.children.0.children.0.text"
1527
- },
1528
- // CSV export
1529
- csvExport: {
1530
- transformFn: "KPRichLexicalEditor"
1531
- },
1532
- // Slack
1533
- slackFormat: {
1534
- handlerFn: "lexicalRichText"
1535
- },
1536
- // Batch import
1537
- batchImport: {
1538
- valueInjectorFn: "toLexicalValue"
1539
- },
1540
- // Content block option — TCI template builder & direct import UI
1541
- contentBlockOption: {
1542
- display: "Rich Text Field",
1543
- icon: "TextAa",
1544
- directImportGroupsIdx: [2, 2]
1545
- },
1546
- // Chunking config — used by okf-sub CreateChunksHandler
1547
- chunkingConfig: CHUNKING_PRESETS.lexicalSemantic
1548
- };
1549
-
1550
- // src/blockRegistry/registry.ts
1551
- var BlockRegistry = class {
1552
- constructor() {
1553
- this.blocks = /* @__PURE__ */ new Map();
1554
- this.register(LexicalTextEditor);
1555
- }
1556
- /** Register a block descriptor. */
1557
- register(descriptor) {
1558
- this.blocks.set(descriptor.compName, descriptor);
1559
- }
1560
- /** Get the full descriptor for a block type. Returns undefined if not registered. */
1561
- getBlock(compType) {
1562
- return this.blocks.get(compType);
1563
- }
1564
- /** Check if a block type is registered in the registry. */
1565
- isRegistered(compType) {
1566
- return this.blocks.has(compType);
1567
- }
1568
- /**
1569
- * Get all registered block descriptors that have a given capability set to a truthy value.
1570
- * Optionally pass a specific value to match (e.g. for enum-style capabilities).
1571
- */
1572
- getBlocksByCapability(capability, value = true) {
1573
- return Array.from(this.blocks.values()).filter((b) => {
1574
- const cap = b.capabilities[capability];
1575
- if (value === true) return !!cap;
1576
- return cap === value;
1577
- });
1578
- }
1579
- /**
1580
- * Get compType strings for all registered blocks with a given capability.
1581
- * Replaces scattered hardcoded arrays like:
1582
- * const TEXT_FIELD_COMPONENTS = ["TextInput", "LexicalTextEditor", ...]
1583
- * becomes:
1584
- * const TEXT_FIELD_COMPONENTS = blockRegistry.getComps('aiTextExtraction')
1585
- */
1586
- getComps(capability, value = true) {
1587
- return this.getBlocksByCapability(capability, value).map((b) => b.compName);
1588
- }
1589
- /** Get all registered blocks in a given category. */
1590
- getBlocksByCategory(category) {
1591
- return Array.from(this.blocks.values()).filter((b) => b.category === category);
1592
- }
1593
- /** Get compType strings for all qual blocks. */
1594
- getQualBlocks() {
1595
- return Array.from(this.blocks.values()).filter((b) => b.qualQuant === "qual").map((b) => b.compName);
1596
- }
1597
- /** Get compType strings for all quant blocks. */
1598
- getQuantBlocks() {
1599
- return Array.from(this.blocks.values()).filter((b) => b.qualQuant === "quant").map((b) => b.compName);
1600
- }
1601
- /** Check if a specific block has a specific capability. */
1602
- hasCapability(compType, capability) {
1603
- const block = this.blocks.get(compType);
1604
- if (!block) return false;
1605
- return !!block.capabilities[capability];
1606
- }
1607
- /** Get all registered block descriptors. */
1608
- getAll() {
1609
- return Array.from(this.blocks.values());
1610
- }
1611
- /**
1612
- * Get compName strings for all registered blocks that have a chunking config.
1613
- * Used by chunking pipelines and prompt-string injection (e.g. searchChunks tool
1614
- * description) to know which fields actually have chunks to search.
1615
- */
1616
- getCompsWithChunking() {
1617
- return Array.from(this.blocks.values()).filter((b) => !!b.chunkingConfig).map((b) => b.compName);
1618
- }
1619
- /**
1620
- * Filter a list of block instances down to those where annotation is enabled.
1621
- * A block is annotation-enabled if its registry capability `annotation` is true.
1622
- * For backwards compat with un-migrated blocks (e.g. deprecated KPRichInput/RichTextEditor),
1623
- * falls back to the legacy per-instance `props.annotation.enable` toggle.
1624
- *
1625
- * Today: every registered annotation-capable block (e.g. LexicalTextEditor) is auto-enabled.
1626
- */
1627
- getAnnotationEnabledBlocks(allBlocks) {
1628
- return allBlocks.filter((block) => {
1629
- const blockDef = this.blocks.get(block.comp);
1630
- if (blockDef) return !!blockDef.capabilities.annotation;
1631
- return block.props?.annotation?.enable === true;
1632
- });
1633
- }
1634
- /**
1635
- * Resolve the tagTypesConfig for a block instance.
1636
- *
1637
- * Resolution order:
1638
- * 1. `hardCodedTagTypesConfigForSM` — the intended self-managed default, which takes
1639
- * priority over per-instance values (justifies not persisting per-block on self-managed).
1640
- * Sourced from `GET_SELF_MANAGED_BASE_CONFIGS().annotation_tagTypesConfig` on BE,
1641
- * or `platformConfigs.SELF_MANAGED_BASE_CONFIGS.annotation_tagTypesConfig` on FE.
1642
- * Pass null/undefined for non-SM tenants.
1643
- * 2. `block.props.annotation.tagTypesConfig` — legacy per-instance persisted value.
1644
- * 3. Empty array.
1645
- */
1646
- getTagTypesConfig(block, hardCodedTagTypesConfigForSM) {
1647
- return hardCodedTagTypesConfigForSM || block.props?.annotation?.tagTypesConfig || [];
1648
- }
1649
- };
1650
- var blockRegistry = new BlockRegistry();
1651
-
1652
1662
  // src/utils/autoGenFilterConfigsFromTpl/utils/extractAndOrganizeBlocks.ts
1653
1663
  var extractAndOrganizeBlocks = (selectedTpls, allTpls, { smTagTypesConfig } = {}) => {
1654
1664
  const extractedBlocks = {};
@@ -2488,6 +2498,7 @@ var genCleanCamelCaseId = (id) => {
2488
2498
  getRoutePathToTCI,
2489
2499
  getRoutePathToTagCategoryLanding,
2490
2500
  getVal,
2501
+ isTplAnnotationEnabled,
2491
2502
  mergeAnnoDataIntoAnnotationsTags,
2492
2503
  parseSpecialConfigSyntax,
2493
2504
  processAuthorAndCommonFilters,