@okf/ootils 1.32.6 → 1.32.7
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.d.mts +30 -1
- package/dist/browser.d.ts +30 -1
- package/dist/browser.js +11 -0
- package/dist/browser.mjs +10 -0
- package/dist/node.d.mts +30 -1
- package/dist/node.d.ts +30 -1
- package/dist/node.js +11 -0
- package/dist/node.mjs +10 -0
- package/dist/universal.d.mts +30 -1
- package/dist/universal.d.ts +30 -1
- package/dist/universal.js +11 -0
- package/dist/universal.mjs +10 -0
- package/package.json +1 -1
package/dist/browser.d.mts
CHANGED
|
@@ -1308,6 +1308,35 @@ declare const getFilterKeyForBlock: ({ block, scope }?: {
|
|
|
1308
1308
|
scope?: string;
|
|
1309
1309
|
}) => string | undefined;
|
|
1310
1310
|
|
|
1311
|
+
type AnnoFilterLevel = "themes" | "subThemes" | "tags";
|
|
1312
|
+
interface AnnoValueLike {
|
|
1313
|
+
parentThemeId?: string | null;
|
|
1314
|
+
parentSubThemeId?: string | null;
|
|
1315
|
+
}
|
|
1316
|
+
/**
|
|
1317
|
+
* Why annoFilterBucketKey exists
|
|
1318
|
+
* ------------------------------
|
|
1319
|
+
* In sub-themes/tags annotation filters, one activeFilter holds values that
|
|
1320
|
+
* span multiple ancestor groups (e.g. tags under different themes/sub-themes).
|
|
1321
|
+
* Each ancestor group is rendered as its own sidebar block. Without per-bucket
|
|
1322
|
+
* state, a single shared `intraFilterOperator` makes Match Any/All toggles
|
|
1323
|
+
* trickle across blocks and AND/OR every value across every group together.
|
|
1324
|
+
*
|
|
1325
|
+
* The bucketKey identifies which ancestor group a value belongs to. Sub-themes
|
|
1326
|
+
* and tags activeFilters carry `intraFilterOperator` as a map keyed by
|
|
1327
|
+
* bucketKey, so each block has its own independent operator. The frontend
|
|
1328
|
+
* grouping uses this for visual blocks; the backend uses it to build the
|
|
1329
|
+
* per-bucket Mongo query.
|
|
1330
|
+
*
|
|
1331
|
+
* Themes are exempt — there's only one themes block per activeFilter, so they
|
|
1332
|
+
* keep the simpler string `intraFilterOperator` (matching doc-filter behaviour).
|
|
1333
|
+
*
|
|
1334
|
+
* Pass the anno-hierarchy level name ("themes" / "subThemes" / "tags"). On the
|
|
1335
|
+
* frontend this comes from LEVEL_META.level on each block. On the backend this
|
|
1336
|
+
* is target.tagType / the leaf of rollupPath. Both carry it as that literal.
|
|
1337
|
+
*/
|
|
1338
|
+
declare const getAnnoFilterBucketKey: (level: AnnoFilterLevel | string, value?: AnnoValueLike) => string | null;
|
|
1339
|
+
|
|
1311
1340
|
/**
|
|
1312
1341
|
* Automatically generates filter configurations from template structures.
|
|
1313
1342
|
*
|
|
@@ -1802,4 +1831,4 @@ declare class BlockRegistry {
|
|
|
1802
1831
|
/** Singleton instance — the one registry shared across the app. */
|
|
1803
1832
|
declare const blockRegistry: BlockRegistry;
|
|
1804
1833
|
|
|
1805
|
-
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, plainTextToLexical, processAuthorAndCommonFilters, _recursExtractBlocks as recursivelyExtractBlocks, segrigateDocs, setVal, toArray };
|
|
1834
|
+
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, getAnnoFilterBucketKey, getFilterKeyForBlock, getPlatformContextContent, getRollupPossibilities, getRoutePathToContentTypeLanding, getRoutePathToEditContent, getRoutePathToModerateContent, getRoutePathToMyContent, getRoutePathToPublishedContent, getRoutePathToReviewDashboard, getRoutePathToTCI, getRoutePathToTagCategoryLanding, getVal, isTplAnnotationEnabled, mergeAnnoDataIntoAnnotationsTags, parseSpecialConfigSyntax, plainTextToLexical, processAuthorAndCommonFilters, _recursExtractBlocks as recursivelyExtractBlocks, segrigateDocs, setVal, toArray };
|
package/dist/browser.d.ts
CHANGED
|
@@ -1308,6 +1308,35 @@ declare const getFilterKeyForBlock: ({ block, scope }?: {
|
|
|
1308
1308
|
scope?: string;
|
|
1309
1309
|
}) => string | undefined;
|
|
1310
1310
|
|
|
1311
|
+
type AnnoFilterLevel = "themes" | "subThemes" | "tags";
|
|
1312
|
+
interface AnnoValueLike {
|
|
1313
|
+
parentThemeId?: string | null;
|
|
1314
|
+
parentSubThemeId?: string | null;
|
|
1315
|
+
}
|
|
1316
|
+
/**
|
|
1317
|
+
* Why annoFilterBucketKey exists
|
|
1318
|
+
* ------------------------------
|
|
1319
|
+
* In sub-themes/tags annotation filters, one activeFilter holds values that
|
|
1320
|
+
* span multiple ancestor groups (e.g. tags under different themes/sub-themes).
|
|
1321
|
+
* Each ancestor group is rendered as its own sidebar block. Without per-bucket
|
|
1322
|
+
* state, a single shared `intraFilterOperator` makes Match Any/All toggles
|
|
1323
|
+
* trickle across blocks and AND/OR every value across every group together.
|
|
1324
|
+
*
|
|
1325
|
+
* The bucketKey identifies which ancestor group a value belongs to. Sub-themes
|
|
1326
|
+
* and tags activeFilters carry `intraFilterOperator` as a map keyed by
|
|
1327
|
+
* bucketKey, so each block has its own independent operator. The frontend
|
|
1328
|
+
* grouping uses this for visual blocks; the backend uses it to build the
|
|
1329
|
+
* per-bucket Mongo query.
|
|
1330
|
+
*
|
|
1331
|
+
* Themes are exempt — there's only one themes block per activeFilter, so they
|
|
1332
|
+
* keep the simpler string `intraFilterOperator` (matching doc-filter behaviour).
|
|
1333
|
+
*
|
|
1334
|
+
* Pass the anno-hierarchy level name ("themes" / "subThemes" / "tags"). On the
|
|
1335
|
+
* frontend this comes from LEVEL_META.level on each block. On the backend this
|
|
1336
|
+
* is target.tagType / the leaf of rollupPath. Both carry it as that literal.
|
|
1337
|
+
*/
|
|
1338
|
+
declare const getAnnoFilterBucketKey: (level: AnnoFilterLevel | string, value?: AnnoValueLike) => string | null;
|
|
1339
|
+
|
|
1311
1340
|
/**
|
|
1312
1341
|
* Automatically generates filter configurations from template structures.
|
|
1313
1342
|
*
|
|
@@ -1802,4 +1831,4 @@ declare class BlockRegistry {
|
|
|
1802
1831
|
/** Singleton instance — the one registry shared across the app. */
|
|
1803
1832
|
declare const blockRegistry: BlockRegistry;
|
|
1804
1833
|
|
|
1805
|
-
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, plainTextToLexical, processAuthorAndCommonFilters, _recursExtractBlocks as recursivelyExtractBlocks, segrigateDocs, setVal, toArray };
|
|
1834
|
+
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, getAnnoFilterBucketKey, getFilterKeyForBlock, getPlatformContextContent, getRollupPossibilities, getRoutePathToContentTypeLanding, getRoutePathToEditContent, getRoutePathToModerateContent, getRoutePathToMyContent, getRoutePathToPublishedContent, getRoutePathToReviewDashboard, getRoutePathToTCI, getRoutePathToTagCategoryLanding, getVal, isTplAnnotationEnabled, mergeAnnoDataIntoAnnotationsTags, parseSpecialConfigSyntax, plainTextToLexical, processAuthorAndCommonFilters, _recursExtractBlocks as recursivelyExtractBlocks, segrigateDocs, setVal, toArray };
|
package/dist/browser.js
CHANGED
|
@@ -42,6 +42,7 @@ __export(browser_exports, {
|
|
|
42
42
|
genCleanCamelCaseId: () => genCleanCamelCaseId,
|
|
43
43
|
genTagId: () => genTagId,
|
|
44
44
|
generateFilterKey: () => generateFilterKey,
|
|
45
|
+
getAnnoFilterBucketKey: () => getAnnoFilterBucketKey,
|
|
45
46
|
getFilterKeyForBlock: () => getFilterKeyForBlock,
|
|
46
47
|
getPlatformContextContent: () => getPlatformContextContent,
|
|
47
48
|
getRollupPossibilities: () => getRollupPossibilities,
|
|
@@ -2503,6 +2504,15 @@ var getFilterKeyForBlock = ({ block, scope = "tags" } = {}) => {
|
|
|
2503
2504
|
return void 0;
|
|
2504
2505
|
};
|
|
2505
2506
|
|
|
2507
|
+
// src/utils/autoGenFilterConfigsFromTpl/utils/getAnnoFilterBucketKey.ts
|
|
2508
|
+
var getAnnoFilterBucketKey = (level, value = {}) => {
|
|
2509
|
+
if (level === "subThemes") return value.parentThemeId || "__independent__";
|
|
2510
|
+
if (level === "tags") {
|
|
2511
|
+
return `${value.parentThemeId || "_"}::${value.parentSubThemeId || "_"}`;
|
|
2512
|
+
}
|
|
2513
|
+
return null;
|
|
2514
|
+
};
|
|
2515
|
+
|
|
2506
2516
|
// src/utils/autoGenFilterConfigsFromTpl/index.ts
|
|
2507
2517
|
var autoGenFilterConfigsFromTpl = ({
|
|
2508
2518
|
selectedTpls,
|
|
@@ -2689,6 +2699,7 @@ var plainTextToLexical = (value) => {
|
|
|
2689
2699
|
genCleanCamelCaseId,
|
|
2690
2700
|
genTagId,
|
|
2691
2701
|
generateFilterKey,
|
|
2702
|
+
getAnnoFilterBucketKey,
|
|
2692
2703
|
getFilterKeyForBlock,
|
|
2693
2704
|
getPlatformContextContent,
|
|
2694
2705
|
getRollupPossibilities,
|
package/dist/browser.mjs
CHANGED
|
@@ -2435,6 +2435,15 @@ var getFilterKeyForBlock = ({ block, scope = "tags" } = {}) => {
|
|
|
2435
2435
|
return void 0;
|
|
2436
2436
|
};
|
|
2437
2437
|
|
|
2438
|
+
// src/utils/autoGenFilterConfigsFromTpl/utils/getAnnoFilterBucketKey.ts
|
|
2439
|
+
var getAnnoFilterBucketKey = (level, value = {}) => {
|
|
2440
|
+
if (level === "subThemes") return value.parentThemeId || "__independent__";
|
|
2441
|
+
if (level === "tags") {
|
|
2442
|
+
return `${value.parentThemeId || "_"}::${value.parentSubThemeId || "_"}`;
|
|
2443
|
+
}
|
|
2444
|
+
return null;
|
|
2445
|
+
};
|
|
2446
|
+
|
|
2438
2447
|
// src/utils/autoGenFilterConfigsFromTpl/index.ts
|
|
2439
2448
|
var autoGenFilterConfigsFromTpl = ({
|
|
2440
2449
|
selectedTpls,
|
|
@@ -2620,6 +2629,7 @@ export {
|
|
|
2620
2629
|
genCleanCamelCaseId,
|
|
2621
2630
|
genTagId,
|
|
2622
2631
|
generateFilterKey,
|
|
2632
|
+
getAnnoFilterBucketKey,
|
|
2623
2633
|
getFilterKeyForBlock,
|
|
2624
2634
|
getPlatformContextContent,
|
|
2625
2635
|
getRollupPossibilities,
|
package/dist/node.d.mts
CHANGED
|
@@ -1315,6 +1315,35 @@ declare const getFilterKeyForBlock: ({ block, scope }?: {
|
|
|
1315
1315
|
scope?: string;
|
|
1316
1316
|
}) => string | undefined;
|
|
1317
1317
|
|
|
1318
|
+
type AnnoFilterLevel = "themes" | "subThemes" | "tags";
|
|
1319
|
+
interface AnnoValueLike {
|
|
1320
|
+
parentThemeId?: string | null;
|
|
1321
|
+
parentSubThemeId?: string | null;
|
|
1322
|
+
}
|
|
1323
|
+
/**
|
|
1324
|
+
* Why annoFilterBucketKey exists
|
|
1325
|
+
* ------------------------------
|
|
1326
|
+
* In sub-themes/tags annotation filters, one activeFilter holds values that
|
|
1327
|
+
* span multiple ancestor groups (e.g. tags under different themes/sub-themes).
|
|
1328
|
+
* Each ancestor group is rendered as its own sidebar block. Without per-bucket
|
|
1329
|
+
* state, a single shared `intraFilterOperator` makes Match Any/All toggles
|
|
1330
|
+
* trickle across blocks and AND/OR every value across every group together.
|
|
1331
|
+
*
|
|
1332
|
+
* The bucketKey identifies which ancestor group a value belongs to. Sub-themes
|
|
1333
|
+
* and tags activeFilters carry `intraFilterOperator` as a map keyed by
|
|
1334
|
+
* bucketKey, so each block has its own independent operator. The frontend
|
|
1335
|
+
* grouping uses this for visual blocks; the backend uses it to build the
|
|
1336
|
+
* per-bucket Mongo query.
|
|
1337
|
+
*
|
|
1338
|
+
* Themes are exempt — there's only one themes block per activeFilter, so they
|
|
1339
|
+
* keep the simpler string `intraFilterOperator` (matching doc-filter behaviour).
|
|
1340
|
+
*
|
|
1341
|
+
* Pass the anno-hierarchy level name ("themes" / "subThemes" / "tags"). On the
|
|
1342
|
+
* frontend this comes from LEVEL_META.level on each block. On the backend this
|
|
1343
|
+
* is target.tagType / the leaf of rollupPath. Both carry it as that literal.
|
|
1344
|
+
*/
|
|
1345
|
+
declare const getAnnoFilterBucketKey: (level: AnnoFilterLevel | string, value?: AnnoValueLike) => string | null;
|
|
1346
|
+
|
|
1318
1347
|
/**
|
|
1319
1348
|
* Automatically generates filter configurations from template structures.
|
|
1320
1349
|
*
|
|
@@ -2543,4 +2572,4 @@ declare function GET_GLOBAL_BULLMQ_CONFIG({ env, redisCredentials }: {
|
|
|
2543
2572
|
};
|
|
2544
2573
|
}): Object;
|
|
2545
2574
|
|
|
2546
|
-
export { AIChatSchema, AnnosElasticSyncProducer, AnnotationSchema, BASE_BULLMQ_CONFIG, BaseProducer, BaseWorker, type BlockCapabilities, type BlockDef, BlockRegistry, CHUNKING_PRESETS, ChunksElasticSyncProducer, ELASTIC_MAPPING_PRESETS, ElasticSearchConnector, FILTER_IDS, GET_GLOBAL_BULLMQ_CONFIG, GeneratedEntitiesSchema, GeneratedTopicsSchema, MONGO_SCHEMA_PRESETS, MongoConnector, PlatformConfigsSchema, ProducerManager, RedisCacheConnector, SecretManagerConnector, TEMP_removeDuplicateFilters, TplSchema, UI_CONTENT, WorkerManager, _self_managed_buildAnnoHierarchyConfig, _self_managed_buildDocHierarchyConfig, _self_managed_getFixedAnnoRollupBlocks, _self_managed_getFixedAnnoTagBlock, autoGenFilterConfigsFromTpl, blockRegistry, buildFilterConfigurations, compareAndGroupBlocks, deleteVal, extractAllBlocksFromTpl, extractAndOrganizeBlocks, genCleanCamelCaseId, genTagId, generateFilterKey, getAIChatModelByTenant, getAnnotationsModelByTenant, getDbByTenant, getFilterKeyForBlock, getGeneratedEntitiesModelByTenant, getGeneratedTopicsModelByTenant, getModelByTenant, getPlatformConfigsModelByTenant, getPlatformContextContent, getRollupPossibilities, getRoutePathToContentTypeLanding, getRoutePathToEditContent, getRoutePathToModerateContent, getRoutePathToMyContent, getRoutePathToPublishedContent, getRoutePathToReviewDashboard, getRoutePathToTCI, getRoutePathToTagCategoryLanding, getTplModelByTenant, getVal, isTplAnnotationEnabled, mergeAnnoDataIntoAnnotationsTags, parseSpecialConfigSyntax, plainTextToLexical, processAuthorAndCommonFilters, _recursExtractBlocks as recursivelyExtractBlocks, segrigateDocs, setVal, toArray };
|
|
2575
|
+
export { AIChatSchema, AnnosElasticSyncProducer, AnnotationSchema, BASE_BULLMQ_CONFIG, BaseProducer, BaseWorker, type BlockCapabilities, type BlockDef, BlockRegistry, CHUNKING_PRESETS, ChunksElasticSyncProducer, ELASTIC_MAPPING_PRESETS, ElasticSearchConnector, FILTER_IDS, GET_GLOBAL_BULLMQ_CONFIG, GeneratedEntitiesSchema, GeneratedTopicsSchema, MONGO_SCHEMA_PRESETS, MongoConnector, PlatformConfigsSchema, ProducerManager, RedisCacheConnector, SecretManagerConnector, TEMP_removeDuplicateFilters, TplSchema, UI_CONTENT, WorkerManager, _self_managed_buildAnnoHierarchyConfig, _self_managed_buildDocHierarchyConfig, _self_managed_getFixedAnnoRollupBlocks, _self_managed_getFixedAnnoTagBlock, autoGenFilterConfigsFromTpl, blockRegistry, buildFilterConfigurations, compareAndGroupBlocks, deleteVal, extractAllBlocksFromTpl, extractAndOrganizeBlocks, genCleanCamelCaseId, genTagId, generateFilterKey, getAIChatModelByTenant, getAnnoFilterBucketKey, getAnnotationsModelByTenant, getDbByTenant, getFilterKeyForBlock, getGeneratedEntitiesModelByTenant, getGeneratedTopicsModelByTenant, getModelByTenant, getPlatformConfigsModelByTenant, getPlatformContextContent, getRollupPossibilities, getRoutePathToContentTypeLanding, getRoutePathToEditContent, getRoutePathToModerateContent, getRoutePathToMyContent, getRoutePathToPublishedContent, getRoutePathToReviewDashboard, getRoutePathToTCI, getRoutePathToTagCategoryLanding, getTplModelByTenant, getVal, isTplAnnotationEnabled, mergeAnnoDataIntoAnnotationsTags, parseSpecialConfigSyntax, plainTextToLexical, processAuthorAndCommonFilters, _recursExtractBlocks as recursivelyExtractBlocks, segrigateDocs, setVal, toArray };
|
package/dist/node.d.ts
CHANGED
|
@@ -1315,6 +1315,35 @@ declare const getFilterKeyForBlock: ({ block, scope }?: {
|
|
|
1315
1315
|
scope?: string;
|
|
1316
1316
|
}) => string | undefined;
|
|
1317
1317
|
|
|
1318
|
+
type AnnoFilterLevel = "themes" | "subThemes" | "tags";
|
|
1319
|
+
interface AnnoValueLike {
|
|
1320
|
+
parentThemeId?: string | null;
|
|
1321
|
+
parentSubThemeId?: string | null;
|
|
1322
|
+
}
|
|
1323
|
+
/**
|
|
1324
|
+
* Why annoFilterBucketKey exists
|
|
1325
|
+
* ------------------------------
|
|
1326
|
+
* In sub-themes/tags annotation filters, one activeFilter holds values that
|
|
1327
|
+
* span multiple ancestor groups (e.g. tags under different themes/sub-themes).
|
|
1328
|
+
* Each ancestor group is rendered as its own sidebar block. Without per-bucket
|
|
1329
|
+
* state, a single shared `intraFilterOperator` makes Match Any/All toggles
|
|
1330
|
+
* trickle across blocks and AND/OR every value across every group together.
|
|
1331
|
+
*
|
|
1332
|
+
* The bucketKey identifies which ancestor group a value belongs to. Sub-themes
|
|
1333
|
+
* and tags activeFilters carry `intraFilterOperator` as a map keyed by
|
|
1334
|
+
* bucketKey, so each block has its own independent operator. The frontend
|
|
1335
|
+
* grouping uses this for visual blocks; the backend uses it to build the
|
|
1336
|
+
* per-bucket Mongo query.
|
|
1337
|
+
*
|
|
1338
|
+
* Themes are exempt — there's only one themes block per activeFilter, so they
|
|
1339
|
+
* keep the simpler string `intraFilterOperator` (matching doc-filter behaviour).
|
|
1340
|
+
*
|
|
1341
|
+
* Pass the anno-hierarchy level name ("themes" / "subThemes" / "tags"). On the
|
|
1342
|
+
* frontend this comes from LEVEL_META.level on each block. On the backend this
|
|
1343
|
+
* is target.tagType / the leaf of rollupPath. Both carry it as that literal.
|
|
1344
|
+
*/
|
|
1345
|
+
declare const getAnnoFilterBucketKey: (level: AnnoFilterLevel | string, value?: AnnoValueLike) => string | null;
|
|
1346
|
+
|
|
1318
1347
|
/**
|
|
1319
1348
|
* Automatically generates filter configurations from template structures.
|
|
1320
1349
|
*
|
|
@@ -2543,4 +2572,4 @@ declare function GET_GLOBAL_BULLMQ_CONFIG({ env, redisCredentials }: {
|
|
|
2543
2572
|
};
|
|
2544
2573
|
}): Object;
|
|
2545
2574
|
|
|
2546
|
-
export { AIChatSchema, AnnosElasticSyncProducer, AnnotationSchema, BASE_BULLMQ_CONFIG, BaseProducer, BaseWorker, type BlockCapabilities, type BlockDef, BlockRegistry, CHUNKING_PRESETS, ChunksElasticSyncProducer, ELASTIC_MAPPING_PRESETS, ElasticSearchConnector, FILTER_IDS, GET_GLOBAL_BULLMQ_CONFIG, GeneratedEntitiesSchema, GeneratedTopicsSchema, MONGO_SCHEMA_PRESETS, MongoConnector, PlatformConfigsSchema, ProducerManager, RedisCacheConnector, SecretManagerConnector, TEMP_removeDuplicateFilters, TplSchema, UI_CONTENT, WorkerManager, _self_managed_buildAnnoHierarchyConfig, _self_managed_buildDocHierarchyConfig, _self_managed_getFixedAnnoRollupBlocks, _self_managed_getFixedAnnoTagBlock, autoGenFilterConfigsFromTpl, blockRegistry, buildFilterConfigurations, compareAndGroupBlocks, deleteVal, extractAllBlocksFromTpl, extractAndOrganizeBlocks, genCleanCamelCaseId, genTagId, generateFilterKey, getAIChatModelByTenant, getAnnotationsModelByTenant, getDbByTenant, getFilterKeyForBlock, getGeneratedEntitiesModelByTenant, getGeneratedTopicsModelByTenant, getModelByTenant, getPlatformConfigsModelByTenant, getPlatformContextContent, getRollupPossibilities, getRoutePathToContentTypeLanding, getRoutePathToEditContent, getRoutePathToModerateContent, getRoutePathToMyContent, getRoutePathToPublishedContent, getRoutePathToReviewDashboard, getRoutePathToTCI, getRoutePathToTagCategoryLanding, getTplModelByTenant, getVal, isTplAnnotationEnabled, mergeAnnoDataIntoAnnotationsTags, parseSpecialConfigSyntax, plainTextToLexical, processAuthorAndCommonFilters, _recursExtractBlocks as recursivelyExtractBlocks, segrigateDocs, setVal, toArray };
|
|
2575
|
+
export { AIChatSchema, AnnosElasticSyncProducer, AnnotationSchema, BASE_BULLMQ_CONFIG, BaseProducer, BaseWorker, type BlockCapabilities, type BlockDef, BlockRegistry, CHUNKING_PRESETS, ChunksElasticSyncProducer, ELASTIC_MAPPING_PRESETS, ElasticSearchConnector, FILTER_IDS, GET_GLOBAL_BULLMQ_CONFIG, GeneratedEntitiesSchema, GeneratedTopicsSchema, MONGO_SCHEMA_PRESETS, MongoConnector, PlatformConfigsSchema, ProducerManager, RedisCacheConnector, SecretManagerConnector, TEMP_removeDuplicateFilters, TplSchema, UI_CONTENT, WorkerManager, _self_managed_buildAnnoHierarchyConfig, _self_managed_buildDocHierarchyConfig, _self_managed_getFixedAnnoRollupBlocks, _self_managed_getFixedAnnoTagBlock, autoGenFilterConfigsFromTpl, blockRegistry, buildFilterConfigurations, compareAndGroupBlocks, deleteVal, extractAllBlocksFromTpl, extractAndOrganizeBlocks, genCleanCamelCaseId, genTagId, generateFilterKey, getAIChatModelByTenant, getAnnoFilterBucketKey, getAnnotationsModelByTenant, getDbByTenant, getFilterKeyForBlock, getGeneratedEntitiesModelByTenant, getGeneratedTopicsModelByTenant, getModelByTenant, getPlatformConfigsModelByTenant, getPlatformContextContent, getRollupPossibilities, getRoutePathToContentTypeLanding, getRoutePathToEditContent, getRoutePathToModerateContent, getRoutePathToMyContent, getRoutePathToPublishedContent, getRoutePathToReviewDashboard, getRoutePathToTCI, getRoutePathToTagCategoryLanding, getTplModelByTenant, getVal, isTplAnnotationEnabled, mergeAnnoDataIntoAnnotationsTags, parseSpecialConfigSyntax, plainTextToLexical, processAuthorAndCommonFilters, _recursExtractBlocks as recursivelyExtractBlocks, segrigateDocs, setVal, toArray };
|
package/dist/node.js
CHANGED
|
@@ -2069,6 +2069,7 @@ __export(node_exports, {
|
|
|
2069
2069
|
genTagId: () => genTagId,
|
|
2070
2070
|
generateFilterKey: () => generateFilterKey,
|
|
2071
2071
|
getAIChatModelByTenant: () => import_getModelByTenant2.getAIChatModelByTenant,
|
|
2072
|
+
getAnnoFilterBucketKey: () => getAnnoFilterBucketKey,
|
|
2072
2073
|
getAnnotationsModelByTenant: () => import_getModelByTenant2.getAnnotationsModelByTenant,
|
|
2073
2074
|
getDbByTenant: () => getDbByTenant,
|
|
2074
2075
|
getFilterKeyForBlock: () => getFilterKeyForBlock,
|
|
@@ -4101,6 +4102,15 @@ var getFilterKeyForBlock = ({ block, scope = "tags" } = {}) => {
|
|
|
4101
4102
|
return void 0;
|
|
4102
4103
|
};
|
|
4103
4104
|
|
|
4105
|
+
// src/utils/autoGenFilterConfigsFromTpl/utils/getAnnoFilterBucketKey.ts
|
|
4106
|
+
var getAnnoFilterBucketKey = (level, value = {}) => {
|
|
4107
|
+
if (level === "subThemes") return value.parentThemeId || "__independent__";
|
|
4108
|
+
if (level === "tags") {
|
|
4109
|
+
return `${value.parentThemeId || "_"}::${value.parentSubThemeId || "_"}`;
|
|
4110
|
+
}
|
|
4111
|
+
return null;
|
|
4112
|
+
};
|
|
4113
|
+
|
|
4104
4114
|
// src/utils/autoGenFilterConfigsFromTpl/index.ts
|
|
4105
4115
|
var autoGenFilterConfigsFromTpl = ({
|
|
4106
4116
|
selectedTpls,
|
|
@@ -4689,6 +4699,7 @@ var import_GET_GLOBAL_BULLMQ_CONFIG = __toESM(require_GET_GLOBAL_BULLMQ_CONFIG()
|
|
|
4689
4699
|
genTagId,
|
|
4690
4700
|
generateFilterKey,
|
|
4691
4701
|
getAIChatModelByTenant,
|
|
4702
|
+
getAnnoFilterBucketKey,
|
|
4692
4703
|
getAnnotationsModelByTenant,
|
|
4693
4704
|
getDbByTenant,
|
|
4694
4705
|
getFilterKeyForBlock,
|
package/dist/node.mjs
CHANGED
|
@@ -4032,6 +4032,15 @@ var getFilterKeyForBlock = ({ block, scope = "tags" } = {}) => {
|
|
|
4032
4032
|
return void 0;
|
|
4033
4033
|
};
|
|
4034
4034
|
|
|
4035
|
+
// src/utils/autoGenFilterConfigsFromTpl/utils/getAnnoFilterBucketKey.ts
|
|
4036
|
+
var getAnnoFilterBucketKey = (level, value = {}) => {
|
|
4037
|
+
if (level === "subThemes") return value.parentThemeId || "__independent__";
|
|
4038
|
+
if (level === "tags") {
|
|
4039
|
+
return `${value.parentThemeId || "_"}::${value.parentSubThemeId || "_"}`;
|
|
4040
|
+
}
|
|
4041
|
+
return null;
|
|
4042
|
+
};
|
|
4043
|
+
|
|
4035
4044
|
// src/utils/autoGenFilterConfigsFromTpl/index.ts
|
|
4036
4045
|
var autoGenFilterConfigsFromTpl = ({
|
|
4037
4046
|
selectedTpls,
|
|
@@ -4635,6 +4644,7 @@ export {
|
|
|
4635
4644
|
genTagId,
|
|
4636
4645
|
generateFilterKey,
|
|
4637
4646
|
export_getAIChatModelByTenant as getAIChatModelByTenant,
|
|
4647
|
+
getAnnoFilterBucketKey,
|
|
4638
4648
|
export_getAnnotationsModelByTenant as getAnnotationsModelByTenant,
|
|
4639
4649
|
getDbByTenant,
|
|
4640
4650
|
getFilterKeyForBlock,
|
package/dist/universal.d.mts
CHANGED
|
@@ -1308,6 +1308,35 @@ declare const getFilterKeyForBlock: ({ block, scope }?: {
|
|
|
1308
1308
|
scope?: string;
|
|
1309
1309
|
}) => string | undefined;
|
|
1310
1310
|
|
|
1311
|
+
type AnnoFilterLevel = "themes" | "subThemes" | "tags";
|
|
1312
|
+
interface AnnoValueLike {
|
|
1313
|
+
parentThemeId?: string | null;
|
|
1314
|
+
parentSubThemeId?: string | null;
|
|
1315
|
+
}
|
|
1316
|
+
/**
|
|
1317
|
+
* Why annoFilterBucketKey exists
|
|
1318
|
+
* ------------------------------
|
|
1319
|
+
* In sub-themes/tags annotation filters, one activeFilter holds values that
|
|
1320
|
+
* span multiple ancestor groups (e.g. tags under different themes/sub-themes).
|
|
1321
|
+
* Each ancestor group is rendered as its own sidebar block. Without per-bucket
|
|
1322
|
+
* state, a single shared `intraFilterOperator` makes Match Any/All toggles
|
|
1323
|
+
* trickle across blocks and AND/OR every value across every group together.
|
|
1324
|
+
*
|
|
1325
|
+
* The bucketKey identifies which ancestor group a value belongs to. Sub-themes
|
|
1326
|
+
* and tags activeFilters carry `intraFilterOperator` as a map keyed by
|
|
1327
|
+
* bucketKey, so each block has its own independent operator. The frontend
|
|
1328
|
+
* grouping uses this for visual blocks; the backend uses it to build the
|
|
1329
|
+
* per-bucket Mongo query.
|
|
1330
|
+
*
|
|
1331
|
+
* Themes are exempt — there's only one themes block per activeFilter, so they
|
|
1332
|
+
* keep the simpler string `intraFilterOperator` (matching doc-filter behaviour).
|
|
1333
|
+
*
|
|
1334
|
+
* Pass the anno-hierarchy level name ("themes" / "subThemes" / "tags"). On the
|
|
1335
|
+
* frontend this comes from LEVEL_META.level on each block. On the backend this
|
|
1336
|
+
* is target.tagType / the leaf of rollupPath. Both carry it as that literal.
|
|
1337
|
+
*/
|
|
1338
|
+
declare const getAnnoFilterBucketKey: (level: AnnoFilterLevel | string, value?: AnnoValueLike) => string | null;
|
|
1339
|
+
|
|
1311
1340
|
/**
|
|
1312
1341
|
* Automatically generates filter configurations from template structures.
|
|
1313
1342
|
*
|
|
@@ -1802,4 +1831,4 @@ declare class BlockRegistry {
|
|
|
1802
1831
|
/** Singleton instance — the one registry shared across the app. */
|
|
1803
1832
|
declare const blockRegistry: BlockRegistry;
|
|
1804
1833
|
|
|
1805
|
-
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, plainTextToLexical, processAuthorAndCommonFilters, _recursExtractBlocks as recursivelyExtractBlocks, segrigateDocs, setVal, toArray };
|
|
1834
|
+
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, getAnnoFilterBucketKey, getFilterKeyForBlock, getPlatformContextContent, getRollupPossibilities, getRoutePathToContentTypeLanding, getRoutePathToEditContent, getRoutePathToModerateContent, getRoutePathToMyContent, getRoutePathToPublishedContent, getRoutePathToReviewDashboard, getRoutePathToTCI, getRoutePathToTagCategoryLanding, getVal, isTplAnnotationEnabled, mergeAnnoDataIntoAnnotationsTags, parseSpecialConfigSyntax, plainTextToLexical, processAuthorAndCommonFilters, _recursExtractBlocks as recursivelyExtractBlocks, segrigateDocs, setVal, toArray };
|
package/dist/universal.d.ts
CHANGED
|
@@ -1308,6 +1308,35 @@ declare const getFilterKeyForBlock: ({ block, scope }?: {
|
|
|
1308
1308
|
scope?: string;
|
|
1309
1309
|
}) => string | undefined;
|
|
1310
1310
|
|
|
1311
|
+
type AnnoFilterLevel = "themes" | "subThemes" | "tags";
|
|
1312
|
+
interface AnnoValueLike {
|
|
1313
|
+
parentThemeId?: string | null;
|
|
1314
|
+
parentSubThemeId?: string | null;
|
|
1315
|
+
}
|
|
1316
|
+
/**
|
|
1317
|
+
* Why annoFilterBucketKey exists
|
|
1318
|
+
* ------------------------------
|
|
1319
|
+
* In sub-themes/tags annotation filters, one activeFilter holds values that
|
|
1320
|
+
* span multiple ancestor groups (e.g. tags under different themes/sub-themes).
|
|
1321
|
+
* Each ancestor group is rendered as its own sidebar block. Without per-bucket
|
|
1322
|
+
* state, a single shared `intraFilterOperator` makes Match Any/All toggles
|
|
1323
|
+
* trickle across blocks and AND/OR every value across every group together.
|
|
1324
|
+
*
|
|
1325
|
+
* The bucketKey identifies which ancestor group a value belongs to. Sub-themes
|
|
1326
|
+
* and tags activeFilters carry `intraFilterOperator` as a map keyed by
|
|
1327
|
+
* bucketKey, so each block has its own independent operator. The frontend
|
|
1328
|
+
* grouping uses this for visual blocks; the backend uses it to build the
|
|
1329
|
+
* per-bucket Mongo query.
|
|
1330
|
+
*
|
|
1331
|
+
* Themes are exempt — there's only one themes block per activeFilter, so they
|
|
1332
|
+
* keep the simpler string `intraFilterOperator` (matching doc-filter behaviour).
|
|
1333
|
+
*
|
|
1334
|
+
* Pass the anno-hierarchy level name ("themes" / "subThemes" / "tags"). On the
|
|
1335
|
+
* frontend this comes from LEVEL_META.level on each block. On the backend this
|
|
1336
|
+
* is target.tagType / the leaf of rollupPath. Both carry it as that literal.
|
|
1337
|
+
*/
|
|
1338
|
+
declare const getAnnoFilterBucketKey: (level: AnnoFilterLevel | string, value?: AnnoValueLike) => string | null;
|
|
1339
|
+
|
|
1311
1340
|
/**
|
|
1312
1341
|
* Automatically generates filter configurations from template structures.
|
|
1313
1342
|
*
|
|
@@ -1802,4 +1831,4 @@ declare class BlockRegistry {
|
|
|
1802
1831
|
/** Singleton instance — the one registry shared across the app. */
|
|
1803
1832
|
declare const blockRegistry: BlockRegistry;
|
|
1804
1833
|
|
|
1805
|
-
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, plainTextToLexical, processAuthorAndCommonFilters, _recursExtractBlocks as recursivelyExtractBlocks, segrigateDocs, setVal, toArray };
|
|
1834
|
+
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, getAnnoFilterBucketKey, getFilterKeyForBlock, getPlatformContextContent, getRollupPossibilities, getRoutePathToContentTypeLanding, getRoutePathToEditContent, getRoutePathToModerateContent, getRoutePathToMyContent, getRoutePathToPublishedContent, getRoutePathToReviewDashboard, getRoutePathToTCI, getRoutePathToTagCategoryLanding, getVal, isTplAnnotationEnabled, mergeAnnoDataIntoAnnotationsTags, parseSpecialConfigSyntax, plainTextToLexical, processAuthorAndCommonFilters, _recursExtractBlocks as recursivelyExtractBlocks, segrigateDocs, setVal, toArray };
|
package/dist/universal.js
CHANGED
|
@@ -42,6 +42,7 @@ __export(universal_exports, {
|
|
|
42
42
|
genCleanCamelCaseId: () => genCleanCamelCaseId,
|
|
43
43
|
genTagId: () => genTagId,
|
|
44
44
|
generateFilterKey: () => generateFilterKey,
|
|
45
|
+
getAnnoFilterBucketKey: () => getAnnoFilterBucketKey,
|
|
45
46
|
getFilterKeyForBlock: () => getFilterKeyForBlock,
|
|
46
47
|
getPlatformContextContent: () => getPlatformContextContent,
|
|
47
48
|
getRollupPossibilities: () => getRollupPossibilities,
|
|
@@ -2503,6 +2504,15 @@ var getFilterKeyForBlock = ({ block, scope = "tags" } = {}) => {
|
|
|
2503
2504
|
return void 0;
|
|
2504
2505
|
};
|
|
2505
2506
|
|
|
2507
|
+
// src/utils/autoGenFilterConfigsFromTpl/utils/getAnnoFilterBucketKey.ts
|
|
2508
|
+
var getAnnoFilterBucketKey = (level, value = {}) => {
|
|
2509
|
+
if (level === "subThemes") return value.parentThemeId || "__independent__";
|
|
2510
|
+
if (level === "tags") {
|
|
2511
|
+
return `${value.parentThemeId || "_"}::${value.parentSubThemeId || "_"}`;
|
|
2512
|
+
}
|
|
2513
|
+
return null;
|
|
2514
|
+
};
|
|
2515
|
+
|
|
2506
2516
|
// src/utils/autoGenFilterConfigsFromTpl/index.ts
|
|
2507
2517
|
var autoGenFilterConfigsFromTpl = ({
|
|
2508
2518
|
selectedTpls,
|
|
@@ -2689,6 +2699,7 @@ var plainTextToLexical = (value) => {
|
|
|
2689
2699
|
genCleanCamelCaseId,
|
|
2690
2700
|
genTagId,
|
|
2691
2701
|
generateFilterKey,
|
|
2702
|
+
getAnnoFilterBucketKey,
|
|
2692
2703
|
getFilterKeyForBlock,
|
|
2693
2704
|
getPlatformContextContent,
|
|
2694
2705
|
getRollupPossibilities,
|
package/dist/universal.mjs
CHANGED
|
@@ -2435,6 +2435,15 @@ var getFilterKeyForBlock = ({ block, scope = "tags" } = {}) => {
|
|
|
2435
2435
|
return void 0;
|
|
2436
2436
|
};
|
|
2437
2437
|
|
|
2438
|
+
// src/utils/autoGenFilterConfigsFromTpl/utils/getAnnoFilterBucketKey.ts
|
|
2439
|
+
var getAnnoFilterBucketKey = (level, value = {}) => {
|
|
2440
|
+
if (level === "subThemes") return value.parentThemeId || "__independent__";
|
|
2441
|
+
if (level === "tags") {
|
|
2442
|
+
return `${value.parentThemeId || "_"}::${value.parentSubThemeId || "_"}`;
|
|
2443
|
+
}
|
|
2444
|
+
return null;
|
|
2445
|
+
};
|
|
2446
|
+
|
|
2438
2447
|
// src/utils/autoGenFilterConfigsFromTpl/index.ts
|
|
2439
2448
|
var autoGenFilterConfigsFromTpl = ({
|
|
2440
2449
|
selectedTpls,
|
|
@@ -2620,6 +2629,7 @@ export {
|
|
|
2620
2629
|
genCleanCamelCaseId,
|
|
2621
2630
|
genTagId,
|
|
2622
2631
|
generateFilterKey,
|
|
2632
|
+
getAnnoFilterBucketKey,
|
|
2623
2633
|
getFilterKeyForBlock,
|
|
2624
2634
|
getPlatformContextContent,
|
|
2625
2635
|
getRollupPossibilities,
|