@okf/ootils 1.27.0 → 1.28.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.d.mts +77 -1
- package/dist/browser.d.ts +77 -1
- package/dist/browser.js +265 -1
- package/dist/browser.mjs +264 -1
- package/dist/node.d.mts +77 -1
- package/dist/node.d.ts +77 -1
- package/dist/node.js +265 -1
- package/dist/node.mjs +264 -1
- package/dist/universal.d.mts +77 -1
- package/dist/universal.d.ts +77 -1
- package/dist/universal.js +265 -1
- package/dist/universal.mjs +264 -1
- package/package.json +1 -1
package/dist/node.mjs
CHANGED
|
@@ -2607,6 +2607,7 @@ var buildFilterConfigurations = ({ groups, type, selectedTpls, allTpls, isRollup
|
|
|
2607
2607
|
filterKey,
|
|
2608
2608
|
contentType: element.contentType,
|
|
2609
2609
|
path: element.valuePath,
|
|
2610
|
+
...element.comp && { comp: element.comp },
|
|
2610
2611
|
source: {
|
|
2611
2612
|
filterType: "tplType",
|
|
2612
2613
|
contentType: element.contentType,
|
|
@@ -2632,6 +2633,7 @@ var buildFilterConfigurations = ({ groups, type, selectedTpls, allTpls, isRollup
|
|
|
2632
2633
|
filterKey: valuePathFilterKey,
|
|
2633
2634
|
contentType: element.contentType,
|
|
2634
2635
|
path: element.valuePath,
|
|
2636
|
+
...element.comp && { comp: element.comp },
|
|
2635
2637
|
source: {
|
|
2636
2638
|
filterType: "tplType",
|
|
2637
2639
|
contentType: element.contentType,
|
|
@@ -2657,6 +2659,7 @@ var buildFilterConfigurations = ({ groups, type, selectedTpls, allTpls, isRollup
|
|
|
2657
2659
|
filterKey: dateFilterKey,
|
|
2658
2660
|
contentType: element.contentType,
|
|
2659
2661
|
path: element.valuePath,
|
|
2662
|
+
...element.comp && { comp: element.comp },
|
|
2660
2663
|
source: { filterType: "dateRangeType" },
|
|
2661
2664
|
target: { filterType: "dateRangeType", valuePath: element.valuePath }
|
|
2662
2665
|
};
|
|
@@ -2674,6 +2677,7 @@ var buildFilterConfigurations = ({ groups, type, selectedTpls, allTpls, isRollup
|
|
|
2674
2677
|
filterKey: numberFilterKey,
|
|
2675
2678
|
contentType: element.contentType,
|
|
2676
2679
|
path: element.valuePath,
|
|
2680
|
+
...element.comp && { comp: element.comp },
|
|
2677
2681
|
source: { filterType: "numberRangeType", valuePath: element.valuePath },
|
|
2678
2682
|
target: { filterType: "numberRangeType", valuePath: element.valuePath }
|
|
2679
2683
|
};
|
|
@@ -2794,6 +2798,7 @@ var buildFilterConfigurations = ({ groups, type, selectedTpls, allTpls, isRollup
|
|
|
2794
2798
|
filterKey: tagFilterKey,
|
|
2795
2799
|
contentType: element.tagType,
|
|
2796
2800
|
path: `tags.${element.tagType}`,
|
|
2801
|
+
...element.comp && { comp: element.comp },
|
|
2797
2802
|
source: allProfileTpls.some(
|
|
2798
2803
|
(tpl) => tpl.kp_content_type === element.tagType
|
|
2799
2804
|
) ? {
|
|
@@ -2935,6 +2940,7 @@ var extractAndOrganizeBlocks = (selectedTpls, allTpls) => {
|
|
|
2935
2940
|
contentType: tpl.kp_content_type,
|
|
2936
2941
|
blocks: allBlocks.filter((block) => block.valuePath.startsWith("tags.")).map((block) => ({
|
|
2937
2942
|
tagType: block.props.tagType,
|
|
2943
|
+
comp: block.comp,
|
|
2938
2944
|
filterType: "tagType"
|
|
2939
2945
|
}))
|
|
2940
2946
|
};
|
|
@@ -2962,6 +2968,7 @@ var extractAndOrganizeBlocks = (selectedTpls, allTpls) => {
|
|
|
2962
2968
|
value: block.valuePath,
|
|
2963
2969
|
saveValueAsString: block.props?.saveValueAsString,
|
|
2964
2970
|
contentType: tpl.kp_content_type,
|
|
2971
|
+
comp: block.comp,
|
|
2965
2972
|
filterType: "valuePathType"
|
|
2966
2973
|
}))
|
|
2967
2974
|
};
|
|
@@ -2976,6 +2983,7 @@ var extractAndOrganizeBlocks = (selectedTpls, allTpls) => {
|
|
|
2976
2983
|
value: block.valuePath,
|
|
2977
2984
|
saveValueAsString: block.props?.saveValueAsString,
|
|
2978
2985
|
contentType: tpl.kp_content_type,
|
|
2986
|
+
comp: block.comp,
|
|
2979
2987
|
block,
|
|
2980
2988
|
filterType: "split_valuePathType"
|
|
2981
2989
|
}))
|
|
@@ -2990,6 +2998,7 @@ var extractAndOrganizeBlocks = (selectedTpls, allTpls) => {
|
|
|
2990
2998
|
display: block.props?.shortLabel || block.props?.label || block.valuePath,
|
|
2991
2999
|
value: block.valuePath,
|
|
2992
3000
|
contentType: tpl.kp_content_type,
|
|
3001
|
+
comp: block.comp,
|
|
2993
3002
|
filterType: "dateRangeType"
|
|
2994
3003
|
}))
|
|
2995
3004
|
};
|
|
@@ -3003,6 +3012,7 @@ var extractAndOrganizeBlocks = (selectedTpls, allTpls) => {
|
|
|
3003
3012
|
display: block.props?.shortLabel || block.props?.label || block.valuePath,
|
|
3004
3013
|
value: block.valuePath,
|
|
3005
3014
|
contentType: tpl.kp_content_type,
|
|
3015
|
+
comp: block.comp,
|
|
3006
3016
|
filterType: "numberRangeType"
|
|
3007
3017
|
}))
|
|
3008
3018
|
};
|
|
@@ -3249,6 +3259,240 @@ var _self_managed_buildAnnoHierarchyConfig = ({
|
|
|
3249
3259
|
};
|
|
3250
3260
|
};
|
|
3251
3261
|
|
|
3262
|
+
// src/utils/autoGenFilterConfigsFromTpl/utils/buildTagTypeParentMap.ts
|
|
3263
|
+
var buildTagTypeParentMap = (tagTypesInGroup, allTpls) => {
|
|
3264
|
+
const tagTypeSet = new Set(tagTypesInGroup);
|
|
3265
|
+
const parentMap = /* @__PURE__ */ new Map();
|
|
3266
|
+
for (const tagType of tagTypesInGroup) {
|
|
3267
|
+
const tpl = allTpls.find((t) => t.kp_content_type === tagType);
|
|
3268
|
+
if (!tpl) continue;
|
|
3269
|
+
const blocks = extractAllBlocksFromTpl({ tpl });
|
|
3270
|
+
const tagBlocks = blocks.filter(
|
|
3271
|
+
(block) => block.valuePath?.startsWith("tags.") && block.props?.tagType
|
|
3272
|
+
);
|
|
3273
|
+
for (const block of tagBlocks) {
|
|
3274
|
+
const referencedTagType = block.props.tagType;
|
|
3275
|
+
if (tagTypeSet.has(referencedTagType) && referencedTagType !== tagType) {
|
|
3276
|
+
parentMap.set(tagType, referencedTagType);
|
|
3277
|
+
break;
|
|
3278
|
+
}
|
|
3279
|
+
}
|
|
3280
|
+
}
|
|
3281
|
+
for (const child of parentMap.keys()) {
|
|
3282
|
+
const visited = /* @__PURE__ */ new Set();
|
|
3283
|
+
let current = child;
|
|
3284
|
+
while (current && parentMap.has(current)) {
|
|
3285
|
+
if (visited.has(current)) {
|
|
3286
|
+
parentMap.delete(current);
|
|
3287
|
+
break;
|
|
3288
|
+
}
|
|
3289
|
+
visited.add(current);
|
|
3290
|
+
current = parentMap.get(current);
|
|
3291
|
+
}
|
|
3292
|
+
}
|
|
3293
|
+
return parentMap;
|
|
3294
|
+
};
|
|
3295
|
+
var attachParentFields = (filters, allTpls) => {
|
|
3296
|
+
const tagTypeFilters = filters.filter(
|
|
3297
|
+
(f) => f.source?.filterType === "tagType" && f.source?.tagType
|
|
3298
|
+
);
|
|
3299
|
+
if (tagTypeFilters.length === 0) return filters;
|
|
3300
|
+
const tagTypesInGroup = tagTypeFilters.map((f) => f.source.tagType);
|
|
3301
|
+
const parentMap = buildTagTypeParentMap(tagTypesInGroup, allTpls);
|
|
3302
|
+
if (parentMap.size === 0) return filters;
|
|
3303
|
+
const tagTypeToFilterId = /* @__PURE__ */ new Map();
|
|
3304
|
+
for (const f of tagTypeFilters) {
|
|
3305
|
+
tagTypeToFilterId.set(f.source.tagType, f.filterId);
|
|
3306
|
+
}
|
|
3307
|
+
return filters.map((f) => {
|
|
3308
|
+
if (f.source?.filterType !== "tagType" || !f.source?.tagType) return f;
|
|
3309
|
+
const parentTagType = parentMap.get(f.source.tagType);
|
|
3310
|
+
if (!parentTagType) return f;
|
|
3311
|
+
const parentFilterId = tagTypeToFilterId.get(parentTagType);
|
|
3312
|
+
if (!parentFilterId) return f;
|
|
3313
|
+
return { ...f, parentFilterId };
|
|
3314
|
+
});
|
|
3315
|
+
};
|
|
3316
|
+
var sortFiltersHierarchically = (filters) => {
|
|
3317
|
+
if (filters.length <= 1) return filters;
|
|
3318
|
+
const hasHierarchy = filters.some((f) => f.parentFilterId);
|
|
3319
|
+
if (!hasHierarchy) return filters;
|
|
3320
|
+
const childrenOf = /* @__PURE__ */ new Map();
|
|
3321
|
+
const roots = [];
|
|
3322
|
+
for (const f of filters) {
|
|
3323
|
+
if (!f.parentFilterId) {
|
|
3324
|
+
roots.push(f);
|
|
3325
|
+
} else {
|
|
3326
|
+
const siblings = childrenOf.get(f.parentFilterId) || [];
|
|
3327
|
+
siblings.push(f);
|
|
3328
|
+
childrenOf.set(f.parentFilterId, siblings);
|
|
3329
|
+
}
|
|
3330
|
+
}
|
|
3331
|
+
const sorted = [];
|
|
3332
|
+
const visited = /* @__PURE__ */ new Set();
|
|
3333
|
+
const visit = (filter) => {
|
|
3334
|
+
if (visited.has(filter.filterId)) return;
|
|
3335
|
+
visited.add(filter.filterId);
|
|
3336
|
+
sorted.push(filter);
|
|
3337
|
+
const children = childrenOf.get(filter.filterId) || [];
|
|
3338
|
+
for (const child of children) {
|
|
3339
|
+
visit(child);
|
|
3340
|
+
}
|
|
3341
|
+
};
|
|
3342
|
+
for (const root of roots) {
|
|
3343
|
+
visit(root);
|
|
3344
|
+
}
|
|
3345
|
+
for (const f of filters) {
|
|
3346
|
+
if (!visited.has(f.filterId)) {
|
|
3347
|
+
sorted.push(f);
|
|
3348
|
+
}
|
|
3349
|
+
}
|
|
3350
|
+
return sorted;
|
|
3351
|
+
};
|
|
3352
|
+
|
|
3353
|
+
// src/utils/autoGenFilterConfigsFromTpl/utils/_self_managed_buildDocHierarchyConfig.ts
|
|
3354
|
+
var _self_managed_buildDocHierarchyConfig = ({
|
|
3355
|
+
combinedDocumentBlocks,
|
|
3356
|
+
docRollupBlocks,
|
|
3357
|
+
selectedTpls,
|
|
3358
|
+
allTpls,
|
|
3359
|
+
commonDocumentFilters,
|
|
3360
|
+
flatDocFilters = false
|
|
3361
|
+
}) => {
|
|
3362
|
+
const allGroups = compareAndGroupBlocks(combinedDocumentBlocks);
|
|
3363
|
+
const commonGroup = allGroups.find(
|
|
3364
|
+
(g) => g.contentTypes.length === selectedTpls.length
|
|
3365
|
+
);
|
|
3366
|
+
const commonFilterConfigs = commonGroup ? sortFiltersHierarchically(
|
|
3367
|
+
attachParentFields(
|
|
3368
|
+
buildFilterConfigurations({
|
|
3369
|
+
groups: [commonGroup],
|
|
3370
|
+
type: "tags",
|
|
3371
|
+
selectedTpls,
|
|
3372
|
+
allTpls,
|
|
3373
|
+
isRollup: false,
|
|
3374
|
+
isAnno: false
|
|
3375
|
+
}).flatMap((s) => s.configs),
|
|
3376
|
+
allTpls
|
|
3377
|
+
)
|
|
3378
|
+
) : [];
|
|
3379
|
+
const multiDatasetGroups = selectedTpls.length >= 2 ? allGroups.filter(
|
|
3380
|
+
(g) => g.contentTypes.length > 1 && g.contentTypes.length < selectedTpls.length
|
|
3381
|
+
) : [];
|
|
3382
|
+
const sharedAcrossMultiple = multiDatasetGroups.map((group) => {
|
|
3383
|
+
const groupFilterConfigs = sortFiltersHierarchically(
|
|
3384
|
+
attachParentFields(
|
|
3385
|
+
buildFilterConfigurations({
|
|
3386
|
+
groups: [group],
|
|
3387
|
+
type: "tags",
|
|
3388
|
+
selectedTpls,
|
|
3389
|
+
allTpls,
|
|
3390
|
+
isRollup: false,
|
|
3391
|
+
isAnno: false
|
|
3392
|
+
}).flatMap((s) => s.configs),
|
|
3393
|
+
allTpls
|
|
3394
|
+
)
|
|
3395
|
+
);
|
|
3396
|
+
const display = group.contentTypes.map((ct) => {
|
|
3397
|
+
const tplData = allTpls.find(
|
|
3398
|
+
(t) => t.kp_content_type === ct
|
|
3399
|
+
);
|
|
3400
|
+
return tplData?.general?.content?.title || ct;
|
|
3401
|
+
}).join(" + ");
|
|
3402
|
+
return {
|
|
3403
|
+
contentTypes: group.contentTypes,
|
|
3404
|
+
display,
|
|
3405
|
+
filters: groupFilterConfigs
|
|
3406
|
+
};
|
|
3407
|
+
}).filter((g) => g.filters.length > 0);
|
|
3408
|
+
const commonFilterIds = new Set(commonFilterConfigs.map((f) => f.filterId));
|
|
3409
|
+
const perDataset = selectedTpls.map((tpl) => {
|
|
3410
|
+
const tplBlocks = combinedDocumentBlocks.find(
|
|
3411
|
+
(b) => b.contentType === tpl.kp_content_type
|
|
3412
|
+
);
|
|
3413
|
+
const singleTplGroup = [
|
|
3414
|
+
{
|
|
3415
|
+
contentTypes: [tpl.kp_content_type],
|
|
3416
|
+
elements: tplBlocks?.blocks || []
|
|
3417
|
+
}
|
|
3418
|
+
];
|
|
3419
|
+
const filters = buildFilterConfigurations({
|
|
3420
|
+
groups: singleTplGroup,
|
|
3421
|
+
type: "tags",
|
|
3422
|
+
selectedTpls: [tpl],
|
|
3423
|
+
allTpls,
|
|
3424
|
+
isRollup: false,
|
|
3425
|
+
isAnno: false
|
|
3426
|
+
}).flatMap((s) => s.configs);
|
|
3427
|
+
const filtersWithCommonFlag = filters.map((f) => ({
|
|
3428
|
+
...f,
|
|
3429
|
+
isSharedFilter: commonFilterIds.has(f.filterId)
|
|
3430
|
+
}));
|
|
3431
|
+
const rollupData = docRollupBlocks?.find(
|
|
3432
|
+
(b) => b.contentType === tpl.kp_content_type
|
|
3433
|
+
);
|
|
3434
|
+
const rollupGroups = rollupData?.blocks?.length ? compareAndGroupBlocks([rollupData]) : [];
|
|
3435
|
+
const rollupConfigs = rollupGroups.length ? buildFilterConfigurations({
|
|
3436
|
+
groups: rollupGroups,
|
|
3437
|
+
type: "tags",
|
|
3438
|
+
selectedTpls: [tpl],
|
|
3439
|
+
allTpls,
|
|
3440
|
+
isRollup: true,
|
|
3441
|
+
isAnno: false
|
|
3442
|
+
}).flatMap((s) => s.configs) : [];
|
|
3443
|
+
const tplData = allTpls.find(
|
|
3444
|
+
(t) => t.kp_content_type === tpl.kp_content_type
|
|
3445
|
+
);
|
|
3446
|
+
const rollupSourceKeys = new Set(
|
|
3447
|
+
rollupConfigs.map((r) => JSON.stringify(r.source))
|
|
3448
|
+
);
|
|
3449
|
+
const dedupedFilters = filtersWithCommonFlag.filter(
|
|
3450
|
+
(f) => !rollupSourceKeys.has(JSON.stringify(f.source))
|
|
3451
|
+
);
|
|
3452
|
+
const combined = [...dedupedFilters, ...rollupConfigs];
|
|
3453
|
+
const combinedWithParents = sortFiltersHierarchically(
|
|
3454
|
+
attachParentFields(combined, allTpls)
|
|
3455
|
+
);
|
|
3456
|
+
const rollupFilterIds = new Set(rollupConfigs.map((r) => r.filterId));
|
|
3457
|
+
const filtersWithParents = combinedWithParents.filter(
|
|
3458
|
+
(f) => !rollupFilterIds.has(f.filterId)
|
|
3459
|
+
);
|
|
3460
|
+
const rollupsWithParents = combinedWithParents.filter(
|
|
3461
|
+
(f) => rollupFilterIds.has(f.filterId)
|
|
3462
|
+
);
|
|
3463
|
+
return {
|
|
3464
|
+
contentType: tpl.kp_content_type,
|
|
3465
|
+
display: tplData?.general?.content?.title || tpl.kp_content_type,
|
|
3466
|
+
filters: filtersWithParents,
|
|
3467
|
+
rollups: rollupsWithParents
|
|
3468
|
+
};
|
|
3469
|
+
});
|
|
3470
|
+
const filteredPerDataset = perDataset.filter(
|
|
3471
|
+
(d) => d.filters.length > 0 || d.rollups.length > 0
|
|
3472
|
+
);
|
|
3473
|
+
if (commonFilterConfigs.length === 0 && sharedAcrossMultiple.length === 0 && filteredPerDataset.every((d) => d.filters.length === 0)) {
|
|
3474
|
+
return null;
|
|
3475
|
+
}
|
|
3476
|
+
const flatCommonDocFilters = commonDocumentFilters.flatMap(
|
|
3477
|
+
(s) => s.configs || [s]
|
|
3478
|
+
);
|
|
3479
|
+
const shouldFlatten = flatDocFilters && selectedTpls.length === 1;
|
|
3480
|
+
return {
|
|
3481
|
+
filterId: "docHierarchy_document_filters",
|
|
3482
|
+
display: "Combined Content Filters",
|
|
3483
|
+
filterKey: "docHierarchyType::doc",
|
|
3484
|
+
source: {
|
|
3485
|
+
filterType: "docHierarchyType",
|
|
3486
|
+
flatDocFilters: shouldFlatten,
|
|
3487
|
+
commonFilters: commonFilterConfigs,
|
|
3488
|
+
sharedAcrossMultiple,
|
|
3489
|
+
commonDocumentFilters: flatCommonDocFilters,
|
|
3490
|
+
perDataset: filteredPerDataset
|
|
3491
|
+
},
|
|
3492
|
+
target: { filterType: "docHierarchyType" }
|
|
3493
|
+
};
|
|
3494
|
+
};
|
|
3495
|
+
|
|
3252
3496
|
// src/utils/autoGenFilterConfigsFromTpl/utils/TEMP_removeDuplicateFilters.ts
|
|
3253
3497
|
var TEMP_removeDuplicateFilters = (filterGroups) => {
|
|
3254
3498
|
return filterGroups.map((group) => {
|
|
@@ -3385,7 +3629,25 @@ var autoGenFilterConfigsFromTpl = ({
|
|
|
3385
3629
|
...annotationRollupSections
|
|
3386
3630
|
].filter((section) => Array.isArray(section.configs) ? section.configs.length > 0 : true)
|
|
3387
3631
|
};
|
|
3388
|
-
const
|
|
3632
|
+
const isSMTDocFilterUI = isSelfManagedTenant && filterScopes.includes("doc");
|
|
3633
|
+
const final_documentTagsFilterConfigs = isSMTDocFilterUI ? (() => {
|
|
3634
|
+
const docHierarchyConfig = _self_managed_buildDocHierarchyConfig({
|
|
3635
|
+
combinedDocumentBlocks: extractedBlocks.combinedDocumentBlocks,
|
|
3636
|
+
docRollupBlocks: extractedBlocks.docRollupBlocks,
|
|
3637
|
+
selectedTpls,
|
|
3638
|
+
allTpls,
|
|
3639
|
+
commonDocumentFilters
|
|
3640
|
+
});
|
|
3641
|
+
if (!docHierarchyConfig) return { sectionId: "documentTagsSection", sectionTitle: "Document Filters", configs: [] };
|
|
3642
|
+
return {
|
|
3643
|
+
sectionId: "documentTagsSection",
|
|
3644
|
+
// sectionTitle: 'Document Filters',
|
|
3645
|
+
configs: [{
|
|
3646
|
+
sectionId: "self_managed_consolidated_doc_filters",
|
|
3647
|
+
configs: [docHierarchyConfig]
|
|
3648
|
+
}]
|
|
3649
|
+
};
|
|
3650
|
+
})() : {
|
|
3389
3651
|
sectionId: "documentTagsSection",
|
|
3390
3652
|
sectionTitle: "Document Filters",
|
|
3391
3653
|
configs: [
|
|
@@ -3856,6 +4118,7 @@ export {
|
|
|
3856
4118
|
UI_CONTENT,
|
|
3857
4119
|
export_WorkerManager as WorkerManager,
|
|
3858
4120
|
_self_managed_buildAnnoHierarchyConfig,
|
|
4121
|
+
_self_managed_buildDocHierarchyConfig,
|
|
3859
4122
|
_self_managed_getFixedAnnoRollupBlocks,
|
|
3860
4123
|
_self_managed_getFixedAnnoTagBlock,
|
|
3861
4124
|
autoGenFilterConfigsFromTpl,
|
package/dist/universal.d.mts
CHANGED
|
@@ -1020,6 +1020,51 @@ declare const _self_managed_buildAnnoHierarchyConfig: ({ annotationTagsCount, }:
|
|
|
1020
1020
|
};
|
|
1021
1021
|
} | null;
|
|
1022
1022
|
|
|
1023
|
+
/**
|
|
1024
|
+
* Builds a consolidated docHierarchyType config for self-managed tenants.
|
|
1025
|
+
*
|
|
1026
|
+
* Produces a single filter config that contains:
|
|
1027
|
+
* - commonFilters: filters present in ALL selected templates
|
|
1028
|
+
* - sharedAcrossMultiple: groups of filters shared by 2+ (but not all) templates
|
|
1029
|
+
* - perDataset: each template's complete filter list + rollup configs
|
|
1030
|
+
* - commonDocumentFilters: Author, Published Date, etc.
|
|
1031
|
+
*
|
|
1032
|
+
* This is consumed by DocHierarchyFilter on the frontend to render the
|
|
1033
|
+
* drilldown-based document filter UI.
|
|
1034
|
+
*/
|
|
1035
|
+
declare const _self_managed_buildDocHierarchyConfig: ({ combinedDocumentBlocks, docRollupBlocks, selectedTpls, allTpls, commonDocumentFilters, flatDocFilters, }: {
|
|
1036
|
+
combinedDocumentBlocks: any[];
|
|
1037
|
+
docRollupBlocks: any[];
|
|
1038
|
+
selectedTpls: any[];
|
|
1039
|
+
allTpls: any[];
|
|
1040
|
+
commonDocumentFilters: any[];
|
|
1041
|
+
flatDocFilters?: boolean;
|
|
1042
|
+
}) => {
|
|
1043
|
+
filterId: string;
|
|
1044
|
+
display: string;
|
|
1045
|
+
filterKey: string;
|
|
1046
|
+
source: {
|
|
1047
|
+
filterType: string;
|
|
1048
|
+
flatDocFilters: boolean;
|
|
1049
|
+
commonFilters: any[];
|
|
1050
|
+
sharedAcrossMultiple: {
|
|
1051
|
+
contentTypes: any;
|
|
1052
|
+
display: any;
|
|
1053
|
+
filters: any[];
|
|
1054
|
+
}[];
|
|
1055
|
+
commonDocumentFilters: any[];
|
|
1056
|
+
perDataset: {
|
|
1057
|
+
contentType: any;
|
|
1058
|
+
display: any;
|
|
1059
|
+
filters: any[];
|
|
1060
|
+
rollups: any[];
|
|
1061
|
+
}[];
|
|
1062
|
+
};
|
|
1063
|
+
target: {
|
|
1064
|
+
filterType: string;
|
|
1065
|
+
};
|
|
1066
|
+
} | null;
|
|
1067
|
+
|
|
1023
1068
|
/**
|
|
1024
1069
|
* TEMP_removeDuplicateFilters - Removes duplicate rollup and tag-type filters
|
|
1025
1070
|
*
|
|
@@ -1114,6 +1159,37 @@ declare const autoGenFilterConfigsFromTpl: ({ selectedTpls, allTpls, filterScope
|
|
|
1114
1159
|
sectionId: string;
|
|
1115
1160
|
configs: any[];
|
|
1116
1161
|
}[];
|
|
1162
|
+
} | {
|
|
1163
|
+
sectionId: string;
|
|
1164
|
+
configs: {
|
|
1165
|
+
sectionId: string;
|
|
1166
|
+
configs: {
|
|
1167
|
+
filterId: string;
|
|
1168
|
+
display: string;
|
|
1169
|
+
filterKey: string;
|
|
1170
|
+
source: {
|
|
1171
|
+
filterType: string;
|
|
1172
|
+
flatDocFilters: boolean;
|
|
1173
|
+
commonFilters: any[];
|
|
1174
|
+
sharedAcrossMultiple: {
|
|
1175
|
+
contentTypes: any;
|
|
1176
|
+
display: any;
|
|
1177
|
+
filters: any[];
|
|
1178
|
+
}[];
|
|
1179
|
+
commonDocumentFilters: any[];
|
|
1180
|
+
perDataset: {
|
|
1181
|
+
contentType: any;
|
|
1182
|
+
display: any;
|
|
1183
|
+
filters: any[];
|
|
1184
|
+
rollups: any[];
|
|
1185
|
+
}[];
|
|
1186
|
+
};
|
|
1187
|
+
target: {
|
|
1188
|
+
filterType: string;
|
|
1189
|
+
};
|
|
1190
|
+
}[];
|
|
1191
|
+
}[];
|
|
1192
|
+
sectionTitle?: undefined;
|
|
1117
1193
|
} | {
|
|
1118
1194
|
sectionId: string;
|
|
1119
1195
|
sectionTitle: string;
|
|
@@ -1207,4 +1283,4 @@ declare const genCleanCamelCaseId: (id: string) => string;
|
|
|
1207
1283
|
*/
|
|
1208
1284
|
declare const genCleanIdForContentTypeAndValuePaths: (text: string, maxLength?: number, shortIdLength?: number) => string;
|
|
1209
1285
|
|
|
1210
|
-
export { BASE_BULLMQ_CONFIG, FILTER_IDS, TEMP_removeDuplicateFilters, UI_CONTENT, _self_managed_buildAnnoHierarchyConfig, _self_managed_getFixedAnnoRollupBlocks, _self_managed_getFixedAnnoTagBlock, autoGenFilterConfigsFromTpl, buildFilterConfigurations, compareAndGroupBlocks, deleteVal, extractAllBlocksFromTpl, extractAndOrganizeBlocks, genCleanCamelCaseId, genCleanIdForContentTypeAndValuePaths, genTagId, generateFilterKey, getFilterKeyForBlock, getPlatformContextContent, getRollupPossibilities, getRoutePathToEditContent, getRoutePathToModerateContent, getRoutePathToPublishedContent, getVal, mergeAnnoDataIntoAnnotationsTags, parseSpecialConfigSyntax, processAuthorAndCommonFilters, _recursExtractBlocks as recursivelyExtractBlocks, segrigateDocs, setVal, toArray };
|
|
1286
|
+
export { BASE_BULLMQ_CONFIG, FILTER_IDS, TEMP_removeDuplicateFilters, UI_CONTENT, _self_managed_buildAnnoHierarchyConfig, _self_managed_buildDocHierarchyConfig, _self_managed_getFixedAnnoRollupBlocks, _self_managed_getFixedAnnoTagBlock, autoGenFilterConfigsFromTpl, buildFilterConfigurations, compareAndGroupBlocks, deleteVal, extractAllBlocksFromTpl, extractAndOrganizeBlocks, genCleanCamelCaseId, genCleanIdForContentTypeAndValuePaths, genTagId, generateFilterKey, getFilterKeyForBlock, getPlatformContextContent, getRollupPossibilities, getRoutePathToEditContent, getRoutePathToModerateContent, getRoutePathToPublishedContent, getVal, mergeAnnoDataIntoAnnotationsTags, parseSpecialConfigSyntax, processAuthorAndCommonFilters, _recursExtractBlocks as recursivelyExtractBlocks, segrigateDocs, setVal, toArray };
|
package/dist/universal.d.ts
CHANGED
|
@@ -1020,6 +1020,51 @@ declare const _self_managed_buildAnnoHierarchyConfig: ({ annotationTagsCount, }:
|
|
|
1020
1020
|
};
|
|
1021
1021
|
} | null;
|
|
1022
1022
|
|
|
1023
|
+
/**
|
|
1024
|
+
* Builds a consolidated docHierarchyType config for self-managed tenants.
|
|
1025
|
+
*
|
|
1026
|
+
* Produces a single filter config that contains:
|
|
1027
|
+
* - commonFilters: filters present in ALL selected templates
|
|
1028
|
+
* - sharedAcrossMultiple: groups of filters shared by 2+ (but not all) templates
|
|
1029
|
+
* - perDataset: each template's complete filter list + rollup configs
|
|
1030
|
+
* - commonDocumentFilters: Author, Published Date, etc.
|
|
1031
|
+
*
|
|
1032
|
+
* This is consumed by DocHierarchyFilter on the frontend to render the
|
|
1033
|
+
* drilldown-based document filter UI.
|
|
1034
|
+
*/
|
|
1035
|
+
declare const _self_managed_buildDocHierarchyConfig: ({ combinedDocumentBlocks, docRollupBlocks, selectedTpls, allTpls, commonDocumentFilters, flatDocFilters, }: {
|
|
1036
|
+
combinedDocumentBlocks: any[];
|
|
1037
|
+
docRollupBlocks: any[];
|
|
1038
|
+
selectedTpls: any[];
|
|
1039
|
+
allTpls: any[];
|
|
1040
|
+
commonDocumentFilters: any[];
|
|
1041
|
+
flatDocFilters?: boolean;
|
|
1042
|
+
}) => {
|
|
1043
|
+
filterId: string;
|
|
1044
|
+
display: string;
|
|
1045
|
+
filterKey: string;
|
|
1046
|
+
source: {
|
|
1047
|
+
filterType: string;
|
|
1048
|
+
flatDocFilters: boolean;
|
|
1049
|
+
commonFilters: any[];
|
|
1050
|
+
sharedAcrossMultiple: {
|
|
1051
|
+
contentTypes: any;
|
|
1052
|
+
display: any;
|
|
1053
|
+
filters: any[];
|
|
1054
|
+
}[];
|
|
1055
|
+
commonDocumentFilters: any[];
|
|
1056
|
+
perDataset: {
|
|
1057
|
+
contentType: any;
|
|
1058
|
+
display: any;
|
|
1059
|
+
filters: any[];
|
|
1060
|
+
rollups: any[];
|
|
1061
|
+
}[];
|
|
1062
|
+
};
|
|
1063
|
+
target: {
|
|
1064
|
+
filterType: string;
|
|
1065
|
+
};
|
|
1066
|
+
} | null;
|
|
1067
|
+
|
|
1023
1068
|
/**
|
|
1024
1069
|
* TEMP_removeDuplicateFilters - Removes duplicate rollup and tag-type filters
|
|
1025
1070
|
*
|
|
@@ -1114,6 +1159,37 @@ declare const autoGenFilterConfigsFromTpl: ({ selectedTpls, allTpls, filterScope
|
|
|
1114
1159
|
sectionId: string;
|
|
1115
1160
|
configs: any[];
|
|
1116
1161
|
}[];
|
|
1162
|
+
} | {
|
|
1163
|
+
sectionId: string;
|
|
1164
|
+
configs: {
|
|
1165
|
+
sectionId: string;
|
|
1166
|
+
configs: {
|
|
1167
|
+
filterId: string;
|
|
1168
|
+
display: string;
|
|
1169
|
+
filterKey: string;
|
|
1170
|
+
source: {
|
|
1171
|
+
filterType: string;
|
|
1172
|
+
flatDocFilters: boolean;
|
|
1173
|
+
commonFilters: any[];
|
|
1174
|
+
sharedAcrossMultiple: {
|
|
1175
|
+
contentTypes: any;
|
|
1176
|
+
display: any;
|
|
1177
|
+
filters: any[];
|
|
1178
|
+
}[];
|
|
1179
|
+
commonDocumentFilters: any[];
|
|
1180
|
+
perDataset: {
|
|
1181
|
+
contentType: any;
|
|
1182
|
+
display: any;
|
|
1183
|
+
filters: any[];
|
|
1184
|
+
rollups: any[];
|
|
1185
|
+
}[];
|
|
1186
|
+
};
|
|
1187
|
+
target: {
|
|
1188
|
+
filterType: string;
|
|
1189
|
+
};
|
|
1190
|
+
}[];
|
|
1191
|
+
}[];
|
|
1192
|
+
sectionTitle?: undefined;
|
|
1117
1193
|
} | {
|
|
1118
1194
|
sectionId: string;
|
|
1119
1195
|
sectionTitle: string;
|
|
@@ -1207,4 +1283,4 @@ declare const genCleanCamelCaseId: (id: string) => string;
|
|
|
1207
1283
|
*/
|
|
1208
1284
|
declare const genCleanIdForContentTypeAndValuePaths: (text: string, maxLength?: number, shortIdLength?: number) => string;
|
|
1209
1285
|
|
|
1210
|
-
export { BASE_BULLMQ_CONFIG, FILTER_IDS, TEMP_removeDuplicateFilters, UI_CONTENT, _self_managed_buildAnnoHierarchyConfig, _self_managed_getFixedAnnoRollupBlocks, _self_managed_getFixedAnnoTagBlock, autoGenFilterConfigsFromTpl, buildFilterConfigurations, compareAndGroupBlocks, deleteVal, extractAllBlocksFromTpl, extractAndOrganizeBlocks, genCleanCamelCaseId, genCleanIdForContentTypeAndValuePaths, genTagId, generateFilterKey, getFilterKeyForBlock, getPlatformContextContent, getRollupPossibilities, getRoutePathToEditContent, getRoutePathToModerateContent, getRoutePathToPublishedContent, getVal, mergeAnnoDataIntoAnnotationsTags, parseSpecialConfigSyntax, processAuthorAndCommonFilters, _recursExtractBlocks as recursivelyExtractBlocks, segrigateDocs, setVal, toArray };
|
|
1286
|
+
export { BASE_BULLMQ_CONFIG, FILTER_IDS, TEMP_removeDuplicateFilters, UI_CONTENT, _self_managed_buildAnnoHierarchyConfig, _self_managed_buildDocHierarchyConfig, _self_managed_getFixedAnnoRollupBlocks, _self_managed_getFixedAnnoTagBlock, autoGenFilterConfigsFromTpl, buildFilterConfigurations, compareAndGroupBlocks, deleteVal, extractAllBlocksFromTpl, extractAndOrganizeBlocks, genCleanCamelCaseId, genCleanIdForContentTypeAndValuePaths, genTagId, generateFilterKey, getFilterKeyForBlock, getPlatformContextContent, getRollupPossibilities, getRoutePathToEditContent, getRoutePathToModerateContent, getRoutePathToPublishedContent, getVal, mergeAnnoDataIntoAnnotationsTags, parseSpecialConfigSyntax, processAuthorAndCommonFilters, _recursExtractBlocks as recursivelyExtractBlocks, segrigateDocs, setVal, toArray };
|