@okf/ootils 1.45.0 → 1.46.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 +32 -0
- package/dist/browser.d.ts +32 -0
- package/dist/browser.js +26 -1
- package/dist/browser.mjs +26 -1
- package/dist/node.d.mts +32 -0
- package/dist/node.d.ts +32 -0
- package/dist/node.js +26 -1
- package/dist/node.mjs +26 -1
- package/dist/universal.d.mts +32 -0
- package/dist/universal.d.ts +32 -0
- package/dist/universal.js +26 -1
- package/dist/universal.mjs +26 -1
- package/package.json +1 -1
package/dist/browser.d.mts
CHANGED
|
@@ -1334,6 +1334,21 @@ declare const processAuthorAndCommonFilters: (allTpls: any[], filterScopes: stri
|
|
|
1334
1334
|
filterType: string;
|
|
1335
1335
|
valuePath: string;
|
|
1336
1336
|
};
|
|
1337
|
+
} | {
|
|
1338
|
+
filterId: string;
|
|
1339
|
+
blockId: string;
|
|
1340
|
+
display: string;
|
|
1341
|
+
value: string;
|
|
1342
|
+
filterKey: string | undefined;
|
|
1343
|
+
source: {
|
|
1344
|
+
filterType: string;
|
|
1345
|
+
scope: string;
|
|
1346
|
+
profileTypes?: undefined;
|
|
1347
|
+
};
|
|
1348
|
+
target: {
|
|
1349
|
+
filterType: string;
|
|
1350
|
+
valuePath: string;
|
|
1351
|
+
};
|
|
1337
1352
|
})[];
|
|
1338
1353
|
}[];
|
|
1339
1354
|
};
|
|
@@ -1463,6 +1478,7 @@ declare const _self_managed_buildDocHierarchyConfig: ({ combinedDocumentBlocks,
|
|
|
1463
1478
|
filters: any[];
|
|
1464
1479
|
rollups: any[];
|
|
1465
1480
|
rollupDisplayMap: Record<string, string>;
|
|
1481
|
+
childByParentId: Record<string, any>;
|
|
1466
1482
|
}[];
|
|
1467
1483
|
};
|
|
1468
1484
|
target: {
|
|
@@ -1623,6 +1639,7 @@ declare const autoGenFilterConfigsFromTpl: ({ selectedTpls, allTpls, filterScope
|
|
|
1623
1639
|
filters: any[];
|
|
1624
1640
|
rollups: any[];
|
|
1625
1641
|
rollupDisplayMap: Record<string, string>;
|
|
1642
|
+
childByParentId: Record<string, any>;
|
|
1626
1643
|
}[];
|
|
1627
1644
|
};
|
|
1628
1645
|
target: {
|
|
@@ -1689,6 +1706,21 @@ declare const autoGenFilterConfigsFromTpl: ({ selectedTpls, allTpls, filterScope
|
|
|
1689
1706
|
filterType: string;
|
|
1690
1707
|
valuePath: string;
|
|
1691
1708
|
};
|
|
1709
|
+
} | {
|
|
1710
|
+
filterId: string;
|
|
1711
|
+
blockId: string;
|
|
1712
|
+
display: string;
|
|
1713
|
+
value: string;
|
|
1714
|
+
filterKey: string | undefined;
|
|
1715
|
+
source: {
|
|
1716
|
+
filterType: string;
|
|
1717
|
+
scope: string;
|
|
1718
|
+
profileTypes?: undefined;
|
|
1719
|
+
};
|
|
1720
|
+
target: {
|
|
1721
|
+
filterType: string;
|
|
1722
|
+
valuePath: string;
|
|
1723
|
+
};
|
|
1692
1724
|
})[];
|
|
1693
1725
|
})[];
|
|
1694
1726
|
} | null)[];
|
package/dist/browser.d.ts
CHANGED
|
@@ -1334,6 +1334,21 @@ declare const processAuthorAndCommonFilters: (allTpls: any[], filterScopes: stri
|
|
|
1334
1334
|
filterType: string;
|
|
1335
1335
|
valuePath: string;
|
|
1336
1336
|
};
|
|
1337
|
+
} | {
|
|
1338
|
+
filterId: string;
|
|
1339
|
+
blockId: string;
|
|
1340
|
+
display: string;
|
|
1341
|
+
value: string;
|
|
1342
|
+
filterKey: string | undefined;
|
|
1343
|
+
source: {
|
|
1344
|
+
filterType: string;
|
|
1345
|
+
scope: string;
|
|
1346
|
+
profileTypes?: undefined;
|
|
1347
|
+
};
|
|
1348
|
+
target: {
|
|
1349
|
+
filterType: string;
|
|
1350
|
+
valuePath: string;
|
|
1351
|
+
};
|
|
1337
1352
|
})[];
|
|
1338
1353
|
}[];
|
|
1339
1354
|
};
|
|
@@ -1463,6 +1478,7 @@ declare const _self_managed_buildDocHierarchyConfig: ({ combinedDocumentBlocks,
|
|
|
1463
1478
|
filters: any[];
|
|
1464
1479
|
rollups: any[];
|
|
1465
1480
|
rollupDisplayMap: Record<string, string>;
|
|
1481
|
+
childByParentId: Record<string, any>;
|
|
1466
1482
|
}[];
|
|
1467
1483
|
};
|
|
1468
1484
|
target: {
|
|
@@ -1623,6 +1639,7 @@ declare const autoGenFilterConfigsFromTpl: ({ selectedTpls, allTpls, filterScope
|
|
|
1623
1639
|
filters: any[];
|
|
1624
1640
|
rollups: any[];
|
|
1625
1641
|
rollupDisplayMap: Record<string, string>;
|
|
1642
|
+
childByParentId: Record<string, any>;
|
|
1626
1643
|
}[];
|
|
1627
1644
|
};
|
|
1628
1645
|
target: {
|
|
@@ -1689,6 +1706,21 @@ declare const autoGenFilterConfigsFromTpl: ({ selectedTpls, allTpls, filterScope
|
|
|
1689
1706
|
filterType: string;
|
|
1690
1707
|
valuePath: string;
|
|
1691
1708
|
};
|
|
1709
|
+
} | {
|
|
1710
|
+
filterId: string;
|
|
1711
|
+
blockId: string;
|
|
1712
|
+
display: string;
|
|
1713
|
+
value: string;
|
|
1714
|
+
filterKey: string | undefined;
|
|
1715
|
+
source: {
|
|
1716
|
+
filterType: string;
|
|
1717
|
+
scope: string;
|
|
1718
|
+
profileTypes?: undefined;
|
|
1719
|
+
};
|
|
1720
|
+
target: {
|
|
1721
|
+
filterType: string;
|
|
1722
|
+
valuePath: string;
|
|
1723
|
+
};
|
|
1692
1724
|
})[];
|
|
1693
1725
|
})[];
|
|
1694
1726
|
} | null)[];
|
package/dist/browser.js
CHANGED
|
@@ -2324,6 +2324,24 @@ var processAuthorAndCommonFilters = (allTpls, filterScopes, annoEnabledBlocks =
|
|
|
2324
2324
|
filterType: "dateRangeType",
|
|
2325
2325
|
valuePath: "kp_date_published"
|
|
2326
2326
|
}
|
|
2327
|
+
},
|
|
2328
|
+
// "Documents" filter — narrows results to specific chosen documents of the
|
|
2329
|
+
// datasets in view, matched on their own _id. Options list those datasets'
|
|
2330
|
+
// documents by title (documentsType fetch, which uses the ambient contentTypes);
|
|
2331
|
+
// the backend matches { _id: { $in: [ids] } } via target valuePath "_id"
|
|
2332
|
+
// (getValuePathQuery ObjectId-casts any `_id`-ending path).
|
|
2333
|
+
{
|
|
2334
|
+
filterId: "documentsFilter",
|
|
2335
|
+
blockId: "documentsFilter",
|
|
2336
|
+
display: "Documents",
|
|
2337
|
+
value: "documents",
|
|
2338
|
+
filterKey: generateFilterKey({
|
|
2339
|
+
filterType: "valuePathType",
|
|
2340
|
+
valuePath: "_id",
|
|
2341
|
+
scope: "doc"
|
|
2342
|
+
}),
|
|
2343
|
+
source: { filterType: "documentsType", scope: "tags" },
|
|
2344
|
+
target: { filterType: "valuePathType", valuePath: "_id" }
|
|
2327
2345
|
}
|
|
2328
2346
|
]
|
|
2329
2347
|
}] : [];
|
|
@@ -2684,12 +2702,19 @@ var _self_managed_buildDocHierarchyConfig = ({
|
|
|
2684
2702
|
const t = allTpls.find((tp) => tp.kp_content_type === ct);
|
|
2685
2703
|
if (t?.general?.content?.title) rollupDisplayMap[ct] = t.general.content.title;
|
|
2686
2704
|
}
|
|
2705
|
+
const childByParentId = {};
|
|
2706
|
+
for (const r of rollupsWithParents) {
|
|
2707
|
+
if (r.parentFilterId && r.isTagRollup && r.source?.filterType === "tagType") {
|
|
2708
|
+
childByParentId[r.parentFilterId] = r;
|
|
2709
|
+
}
|
|
2710
|
+
}
|
|
2687
2711
|
return {
|
|
2688
2712
|
contentType: tpl.kp_content_type,
|
|
2689
2713
|
display: tplData?.general?.content?.title || tpl.kp_content_type,
|
|
2690
2714
|
filters: filtersWithParents,
|
|
2691
2715
|
rollups: rollupsWithParents,
|
|
2692
|
-
rollupDisplayMap
|
|
2716
|
+
rollupDisplayMap,
|
|
2717
|
+
childByParentId
|
|
2693
2718
|
};
|
|
2694
2719
|
});
|
|
2695
2720
|
const filteredPerDataset = perDataset.filter(
|
package/dist/browser.mjs
CHANGED
|
@@ -2252,6 +2252,24 @@ var processAuthorAndCommonFilters = (allTpls, filterScopes, annoEnabledBlocks =
|
|
|
2252
2252
|
filterType: "dateRangeType",
|
|
2253
2253
|
valuePath: "kp_date_published"
|
|
2254
2254
|
}
|
|
2255
|
+
},
|
|
2256
|
+
// "Documents" filter — narrows results to specific chosen documents of the
|
|
2257
|
+
// datasets in view, matched on their own _id. Options list those datasets'
|
|
2258
|
+
// documents by title (documentsType fetch, which uses the ambient contentTypes);
|
|
2259
|
+
// the backend matches { _id: { $in: [ids] } } via target valuePath "_id"
|
|
2260
|
+
// (getValuePathQuery ObjectId-casts any `_id`-ending path).
|
|
2261
|
+
{
|
|
2262
|
+
filterId: "documentsFilter",
|
|
2263
|
+
blockId: "documentsFilter",
|
|
2264
|
+
display: "Documents",
|
|
2265
|
+
value: "documents",
|
|
2266
|
+
filterKey: generateFilterKey({
|
|
2267
|
+
filterType: "valuePathType",
|
|
2268
|
+
valuePath: "_id",
|
|
2269
|
+
scope: "doc"
|
|
2270
|
+
}),
|
|
2271
|
+
source: { filterType: "documentsType", scope: "tags" },
|
|
2272
|
+
target: { filterType: "valuePathType", valuePath: "_id" }
|
|
2255
2273
|
}
|
|
2256
2274
|
]
|
|
2257
2275
|
}] : [];
|
|
@@ -2612,12 +2630,19 @@ var _self_managed_buildDocHierarchyConfig = ({
|
|
|
2612
2630
|
const t = allTpls.find((tp) => tp.kp_content_type === ct);
|
|
2613
2631
|
if (t?.general?.content?.title) rollupDisplayMap[ct] = t.general.content.title;
|
|
2614
2632
|
}
|
|
2633
|
+
const childByParentId = {};
|
|
2634
|
+
for (const r of rollupsWithParents) {
|
|
2635
|
+
if (r.parentFilterId && r.isTagRollup && r.source?.filterType === "tagType") {
|
|
2636
|
+
childByParentId[r.parentFilterId] = r;
|
|
2637
|
+
}
|
|
2638
|
+
}
|
|
2615
2639
|
return {
|
|
2616
2640
|
contentType: tpl.kp_content_type,
|
|
2617
2641
|
display: tplData?.general?.content?.title || tpl.kp_content_type,
|
|
2618
2642
|
filters: filtersWithParents,
|
|
2619
2643
|
rollups: rollupsWithParents,
|
|
2620
|
-
rollupDisplayMap
|
|
2644
|
+
rollupDisplayMap,
|
|
2645
|
+
childByParentId
|
|
2621
2646
|
};
|
|
2622
2647
|
});
|
|
2623
2648
|
const filteredPerDataset = perDataset.filter(
|
package/dist/node.d.mts
CHANGED
|
@@ -1342,6 +1342,21 @@ declare const processAuthorAndCommonFilters: (allTpls: any[], filterScopes: stri
|
|
|
1342
1342
|
filterType: string;
|
|
1343
1343
|
valuePath: string;
|
|
1344
1344
|
};
|
|
1345
|
+
} | {
|
|
1346
|
+
filterId: string;
|
|
1347
|
+
blockId: string;
|
|
1348
|
+
display: string;
|
|
1349
|
+
value: string;
|
|
1350
|
+
filterKey: string | undefined;
|
|
1351
|
+
source: {
|
|
1352
|
+
filterType: string;
|
|
1353
|
+
scope: string;
|
|
1354
|
+
profileTypes?: undefined;
|
|
1355
|
+
};
|
|
1356
|
+
target: {
|
|
1357
|
+
filterType: string;
|
|
1358
|
+
valuePath: string;
|
|
1359
|
+
};
|
|
1345
1360
|
})[];
|
|
1346
1361
|
}[];
|
|
1347
1362
|
};
|
|
@@ -1471,6 +1486,7 @@ declare const _self_managed_buildDocHierarchyConfig: ({ combinedDocumentBlocks,
|
|
|
1471
1486
|
filters: any[];
|
|
1472
1487
|
rollups: any[];
|
|
1473
1488
|
rollupDisplayMap: Record<string, string>;
|
|
1489
|
+
childByParentId: Record<string, any>;
|
|
1474
1490
|
}[];
|
|
1475
1491
|
};
|
|
1476
1492
|
target: {
|
|
@@ -1631,6 +1647,7 @@ declare const autoGenFilterConfigsFromTpl: ({ selectedTpls, allTpls, filterScope
|
|
|
1631
1647
|
filters: any[];
|
|
1632
1648
|
rollups: any[];
|
|
1633
1649
|
rollupDisplayMap: Record<string, string>;
|
|
1650
|
+
childByParentId: Record<string, any>;
|
|
1634
1651
|
}[];
|
|
1635
1652
|
};
|
|
1636
1653
|
target: {
|
|
@@ -1697,6 +1714,21 @@ declare const autoGenFilterConfigsFromTpl: ({ selectedTpls, allTpls, filterScope
|
|
|
1697
1714
|
filterType: string;
|
|
1698
1715
|
valuePath: string;
|
|
1699
1716
|
};
|
|
1717
|
+
} | {
|
|
1718
|
+
filterId: string;
|
|
1719
|
+
blockId: string;
|
|
1720
|
+
display: string;
|
|
1721
|
+
value: string;
|
|
1722
|
+
filterKey: string | undefined;
|
|
1723
|
+
source: {
|
|
1724
|
+
filterType: string;
|
|
1725
|
+
scope: string;
|
|
1726
|
+
profileTypes?: undefined;
|
|
1727
|
+
};
|
|
1728
|
+
target: {
|
|
1729
|
+
filterType: string;
|
|
1730
|
+
valuePath: string;
|
|
1731
|
+
};
|
|
1700
1732
|
})[];
|
|
1701
1733
|
})[];
|
|
1702
1734
|
} | null)[];
|
package/dist/node.d.ts
CHANGED
|
@@ -1342,6 +1342,21 @@ declare const processAuthorAndCommonFilters: (allTpls: any[], filterScopes: stri
|
|
|
1342
1342
|
filterType: string;
|
|
1343
1343
|
valuePath: string;
|
|
1344
1344
|
};
|
|
1345
|
+
} | {
|
|
1346
|
+
filterId: string;
|
|
1347
|
+
blockId: string;
|
|
1348
|
+
display: string;
|
|
1349
|
+
value: string;
|
|
1350
|
+
filterKey: string | undefined;
|
|
1351
|
+
source: {
|
|
1352
|
+
filterType: string;
|
|
1353
|
+
scope: string;
|
|
1354
|
+
profileTypes?: undefined;
|
|
1355
|
+
};
|
|
1356
|
+
target: {
|
|
1357
|
+
filterType: string;
|
|
1358
|
+
valuePath: string;
|
|
1359
|
+
};
|
|
1345
1360
|
})[];
|
|
1346
1361
|
}[];
|
|
1347
1362
|
};
|
|
@@ -1471,6 +1486,7 @@ declare const _self_managed_buildDocHierarchyConfig: ({ combinedDocumentBlocks,
|
|
|
1471
1486
|
filters: any[];
|
|
1472
1487
|
rollups: any[];
|
|
1473
1488
|
rollupDisplayMap: Record<string, string>;
|
|
1489
|
+
childByParentId: Record<string, any>;
|
|
1474
1490
|
}[];
|
|
1475
1491
|
};
|
|
1476
1492
|
target: {
|
|
@@ -1631,6 +1647,7 @@ declare const autoGenFilterConfigsFromTpl: ({ selectedTpls, allTpls, filterScope
|
|
|
1631
1647
|
filters: any[];
|
|
1632
1648
|
rollups: any[];
|
|
1633
1649
|
rollupDisplayMap: Record<string, string>;
|
|
1650
|
+
childByParentId: Record<string, any>;
|
|
1634
1651
|
}[];
|
|
1635
1652
|
};
|
|
1636
1653
|
target: {
|
|
@@ -1697,6 +1714,21 @@ declare const autoGenFilterConfigsFromTpl: ({ selectedTpls, allTpls, filterScope
|
|
|
1697
1714
|
filterType: string;
|
|
1698
1715
|
valuePath: string;
|
|
1699
1716
|
};
|
|
1717
|
+
} | {
|
|
1718
|
+
filterId: string;
|
|
1719
|
+
blockId: string;
|
|
1720
|
+
display: string;
|
|
1721
|
+
value: string;
|
|
1722
|
+
filterKey: string | undefined;
|
|
1723
|
+
source: {
|
|
1724
|
+
filterType: string;
|
|
1725
|
+
scope: string;
|
|
1726
|
+
profileTypes?: undefined;
|
|
1727
|
+
};
|
|
1728
|
+
target: {
|
|
1729
|
+
filterType: string;
|
|
1730
|
+
valuePath: string;
|
|
1731
|
+
};
|
|
1700
1732
|
})[];
|
|
1701
1733
|
})[];
|
|
1702
1734
|
} | null)[];
|
package/dist/node.js
CHANGED
|
@@ -4167,6 +4167,24 @@ var processAuthorAndCommonFilters = (allTpls, filterScopes, annoEnabledBlocks =
|
|
|
4167
4167
|
filterType: "dateRangeType",
|
|
4168
4168
|
valuePath: "kp_date_published"
|
|
4169
4169
|
}
|
|
4170
|
+
},
|
|
4171
|
+
// "Documents" filter — narrows results to specific chosen documents of the
|
|
4172
|
+
// datasets in view, matched on their own _id. Options list those datasets'
|
|
4173
|
+
// documents by title (documentsType fetch, which uses the ambient contentTypes);
|
|
4174
|
+
// the backend matches { _id: { $in: [ids] } } via target valuePath "_id"
|
|
4175
|
+
// (getValuePathQuery ObjectId-casts any `_id`-ending path).
|
|
4176
|
+
{
|
|
4177
|
+
filterId: "documentsFilter",
|
|
4178
|
+
blockId: "documentsFilter",
|
|
4179
|
+
display: "Documents",
|
|
4180
|
+
value: "documents",
|
|
4181
|
+
filterKey: generateFilterKey({
|
|
4182
|
+
filterType: "valuePathType",
|
|
4183
|
+
valuePath: "_id",
|
|
4184
|
+
scope: "doc"
|
|
4185
|
+
}),
|
|
4186
|
+
source: { filterType: "documentsType", scope: "tags" },
|
|
4187
|
+
target: { filterType: "valuePathType", valuePath: "_id" }
|
|
4170
4188
|
}
|
|
4171
4189
|
]
|
|
4172
4190
|
}] : [];
|
|
@@ -4527,12 +4545,19 @@ var _self_managed_buildDocHierarchyConfig = ({
|
|
|
4527
4545
|
const t = allTpls.find((tp) => tp.kp_content_type === ct);
|
|
4528
4546
|
if (t?.general?.content?.title) rollupDisplayMap[ct] = t.general.content.title;
|
|
4529
4547
|
}
|
|
4548
|
+
const childByParentId = {};
|
|
4549
|
+
for (const r of rollupsWithParents) {
|
|
4550
|
+
if (r.parentFilterId && r.isTagRollup && r.source?.filterType === "tagType") {
|
|
4551
|
+
childByParentId[r.parentFilterId] = r;
|
|
4552
|
+
}
|
|
4553
|
+
}
|
|
4530
4554
|
return {
|
|
4531
4555
|
contentType: tpl.kp_content_type,
|
|
4532
4556
|
display: tplData?.general?.content?.title || tpl.kp_content_type,
|
|
4533
4557
|
filters: filtersWithParents,
|
|
4534
4558
|
rollups: rollupsWithParents,
|
|
4535
|
-
rollupDisplayMap
|
|
4559
|
+
rollupDisplayMap,
|
|
4560
|
+
childByParentId
|
|
4536
4561
|
};
|
|
4537
4562
|
});
|
|
4538
4563
|
const filteredPerDataset = perDataset.filter(
|
package/dist/node.mjs
CHANGED
|
@@ -4075,6 +4075,24 @@ var processAuthorAndCommonFilters = (allTpls, filterScopes, annoEnabledBlocks =
|
|
|
4075
4075
|
filterType: "dateRangeType",
|
|
4076
4076
|
valuePath: "kp_date_published"
|
|
4077
4077
|
}
|
|
4078
|
+
},
|
|
4079
|
+
// "Documents" filter — narrows results to specific chosen documents of the
|
|
4080
|
+
// datasets in view, matched on their own _id. Options list those datasets'
|
|
4081
|
+
// documents by title (documentsType fetch, which uses the ambient contentTypes);
|
|
4082
|
+
// the backend matches { _id: { $in: [ids] } } via target valuePath "_id"
|
|
4083
|
+
// (getValuePathQuery ObjectId-casts any `_id`-ending path).
|
|
4084
|
+
{
|
|
4085
|
+
filterId: "documentsFilter",
|
|
4086
|
+
blockId: "documentsFilter",
|
|
4087
|
+
display: "Documents",
|
|
4088
|
+
value: "documents",
|
|
4089
|
+
filterKey: generateFilterKey({
|
|
4090
|
+
filterType: "valuePathType",
|
|
4091
|
+
valuePath: "_id",
|
|
4092
|
+
scope: "doc"
|
|
4093
|
+
}),
|
|
4094
|
+
source: { filterType: "documentsType", scope: "tags" },
|
|
4095
|
+
target: { filterType: "valuePathType", valuePath: "_id" }
|
|
4078
4096
|
}
|
|
4079
4097
|
]
|
|
4080
4098
|
}] : [];
|
|
@@ -4435,12 +4453,19 @@ var _self_managed_buildDocHierarchyConfig = ({
|
|
|
4435
4453
|
const t = allTpls.find((tp) => tp.kp_content_type === ct);
|
|
4436
4454
|
if (t?.general?.content?.title) rollupDisplayMap[ct] = t.general.content.title;
|
|
4437
4455
|
}
|
|
4456
|
+
const childByParentId = {};
|
|
4457
|
+
for (const r of rollupsWithParents) {
|
|
4458
|
+
if (r.parentFilterId && r.isTagRollup && r.source?.filterType === "tagType") {
|
|
4459
|
+
childByParentId[r.parentFilterId] = r;
|
|
4460
|
+
}
|
|
4461
|
+
}
|
|
4438
4462
|
return {
|
|
4439
4463
|
contentType: tpl.kp_content_type,
|
|
4440
4464
|
display: tplData?.general?.content?.title || tpl.kp_content_type,
|
|
4441
4465
|
filters: filtersWithParents,
|
|
4442
4466
|
rollups: rollupsWithParents,
|
|
4443
|
-
rollupDisplayMap
|
|
4467
|
+
rollupDisplayMap,
|
|
4468
|
+
childByParentId
|
|
4444
4469
|
};
|
|
4445
4470
|
});
|
|
4446
4471
|
const filteredPerDataset = perDataset.filter(
|
package/dist/universal.d.mts
CHANGED
|
@@ -1334,6 +1334,21 @@ declare const processAuthorAndCommonFilters: (allTpls: any[], filterScopes: stri
|
|
|
1334
1334
|
filterType: string;
|
|
1335
1335
|
valuePath: string;
|
|
1336
1336
|
};
|
|
1337
|
+
} | {
|
|
1338
|
+
filterId: string;
|
|
1339
|
+
blockId: string;
|
|
1340
|
+
display: string;
|
|
1341
|
+
value: string;
|
|
1342
|
+
filterKey: string | undefined;
|
|
1343
|
+
source: {
|
|
1344
|
+
filterType: string;
|
|
1345
|
+
scope: string;
|
|
1346
|
+
profileTypes?: undefined;
|
|
1347
|
+
};
|
|
1348
|
+
target: {
|
|
1349
|
+
filterType: string;
|
|
1350
|
+
valuePath: string;
|
|
1351
|
+
};
|
|
1337
1352
|
})[];
|
|
1338
1353
|
}[];
|
|
1339
1354
|
};
|
|
@@ -1463,6 +1478,7 @@ declare const _self_managed_buildDocHierarchyConfig: ({ combinedDocumentBlocks,
|
|
|
1463
1478
|
filters: any[];
|
|
1464
1479
|
rollups: any[];
|
|
1465
1480
|
rollupDisplayMap: Record<string, string>;
|
|
1481
|
+
childByParentId: Record<string, any>;
|
|
1466
1482
|
}[];
|
|
1467
1483
|
};
|
|
1468
1484
|
target: {
|
|
@@ -1623,6 +1639,7 @@ declare const autoGenFilterConfigsFromTpl: ({ selectedTpls, allTpls, filterScope
|
|
|
1623
1639
|
filters: any[];
|
|
1624
1640
|
rollups: any[];
|
|
1625
1641
|
rollupDisplayMap: Record<string, string>;
|
|
1642
|
+
childByParentId: Record<string, any>;
|
|
1626
1643
|
}[];
|
|
1627
1644
|
};
|
|
1628
1645
|
target: {
|
|
@@ -1689,6 +1706,21 @@ declare const autoGenFilterConfigsFromTpl: ({ selectedTpls, allTpls, filterScope
|
|
|
1689
1706
|
filterType: string;
|
|
1690
1707
|
valuePath: string;
|
|
1691
1708
|
};
|
|
1709
|
+
} | {
|
|
1710
|
+
filterId: string;
|
|
1711
|
+
blockId: string;
|
|
1712
|
+
display: string;
|
|
1713
|
+
value: string;
|
|
1714
|
+
filterKey: string | undefined;
|
|
1715
|
+
source: {
|
|
1716
|
+
filterType: string;
|
|
1717
|
+
scope: string;
|
|
1718
|
+
profileTypes?: undefined;
|
|
1719
|
+
};
|
|
1720
|
+
target: {
|
|
1721
|
+
filterType: string;
|
|
1722
|
+
valuePath: string;
|
|
1723
|
+
};
|
|
1692
1724
|
})[];
|
|
1693
1725
|
})[];
|
|
1694
1726
|
} | null)[];
|
package/dist/universal.d.ts
CHANGED
|
@@ -1334,6 +1334,21 @@ declare const processAuthorAndCommonFilters: (allTpls: any[], filterScopes: stri
|
|
|
1334
1334
|
filterType: string;
|
|
1335
1335
|
valuePath: string;
|
|
1336
1336
|
};
|
|
1337
|
+
} | {
|
|
1338
|
+
filterId: string;
|
|
1339
|
+
blockId: string;
|
|
1340
|
+
display: string;
|
|
1341
|
+
value: string;
|
|
1342
|
+
filterKey: string | undefined;
|
|
1343
|
+
source: {
|
|
1344
|
+
filterType: string;
|
|
1345
|
+
scope: string;
|
|
1346
|
+
profileTypes?: undefined;
|
|
1347
|
+
};
|
|
1348
|
+
target: {
|
|
1349
|
+
filterType: string;
|
|
1350
|
+
valuePath: string;
|
|
1351
|
+
};
|
|
1337
1352
|
})[];
|
|
1338
1353
|
}[];
|
|
1339
1354
|
};
|
|
@@ -1463,6 +1478,7 @@ declare const _self_managed_buildDocHierarchyConfig: ({ combinedDocumentBlocks,
|
|
|
1463
1478
|
filters: any[];
|
|
1464
1479
|
rollups: any[];
|
|
1465
1480
|
rollupDisplayMap: Record<string, string>;
|
|
1481
|
+
childByParentId: Record<string, any>;
|
|
1466
1482
|
}[];
|
|
1467
1483
|
};
|
|
1468
1484
|
target: {
|
|
@@ -1623,6 +1639,7 @@ declare const autoGenFilterConfigsFromTpl: ({ selectedTpls, allTpls, filterScope
|
|
|
1623
1639
|
filters: any[];
|
|
1624
1640
|
rollups: any[];
|
|
1625
1641
|
rollupDisplayMap: Record<string, string>;
|
|
1642
|
+
childByParentId: Record<string, any>;
|
|
1626
1643
|
}[];
|
|
1627
1644
|
};
|
|
1628
1645
|
target: {
|
|
@@ -1689,6 +1706,21 @@ declare const autoGenFilterConfigsFromTpl: ({ selectedTpls, allTpls, filterScope
|
|
|
1689
1706
|
filterType: string;
|
|
1690
1707
|
valuePath: string;
|
|
1691
1708
|
};
|
|
1709
|
+
} | {
|
|
1710
|
+
filterId: string;
|
|
1711
|
+
blockId: string;
|
|
1712
|
+
display: string;
|
|
1713
|
+
value: string;
|
|
1714
|
+
filterKey: string | undefined;
|
|
1715
|
+
source: {
|
|
1716
|
+
filterType: string;
|
|
1717
|
+
scope: string;
|
|
1718
|
+
profileTypes?: undefined;
|
|
1719
|
+
};
|
|
1720
|
+
target: {
|
|
1721
|
+
filterType: string;
|
|
1722
|
+
valuePath: string;
|
|
1723
|
+
};
|
|
1692
1724
|
})[];
|
|
1693
1725
|
})[];
|
|
1694
1726
|
} | null)[];
|
package/dist/universal.js
CHANGED
|
@@ -2324,6 +2324,24 @@ var processAuthorAndCommonFilters = (allTpls, filterScopes, annoEnabledBlocks =
|
|
|
2324
2324
|
filterType: "dateRangeType",
|
|
2325
2325
|
valuePath: "kp_date_published"
|
|
2326
2326
|
}
|
|
2327
|
+
},
|
|
2328
|
+
// "Documents" filter — narrows results to specific chosen documents of the
|
|
2329
|
+
// datasets in view, matched on their own _id. Options list those datasets'
|
|
2330
|
+
// documents by title (documentsType fetch, which uses the ambient contentTypes);
|
|
2331
|
+
// the backend matches { _id: { $in: [ids] } } via target valuePath "_id"
|
|
2332
|
+
// (getValuePathQuery ObjectId-casts any `_id`-ending path).
|
|
2333
|
+
{
|
|
2334
|
+
filterId: "documentsFilter",
|
|
2335
|
+
blockId: "documentsFilter",
|
|
2336
|
+
display: "Documents",
|
|
2337
|
+
value: "documents",
|
|
2338
|
+
filterKey: generateFilterKey({
|
|
2339
|
+
filterType: "valuePathType",
|
|
2340
|
+
valuePath: "_id",
|
|
2341
|
+
scope: "doc"
|
|
2342
|
+
}),
|
|
2343
|
+
source: { filterType: "documentsType", scope: "tags" },
|
|
2344
|
+
target: { filterType: "valuePathType", valuePath: "_id" }
|
|
2327
2345
|
}
|
|
2328
2346
|
]
|
|
2329
2347
|
}] : [];
|
|
@@ -2684,12 +2702,19 @@ var _self_managed_buildDocHierarchyConfig = ({
|
|
|
2684
2702
|
const t = allTpls.find((tp) => tp.kp_content_type === ct);
|
|
2685
2703
|
if (t?.general?.content?.title) rollupDisplayMap[ct] = t.general.content.title;
|
|
2686
2704
|
}
|
|
2705
|
+
const childByParentId = {};
|
|
2706
|
+
for (const r of rollupsWithParents) {
|
|
2707
|
+
if (r.parentFilterId && r.isTagRollup && r.source?.filterType === "tagType") {
|
|
2708
|
+
childByParentId[r.parentFilterId] = r;
|
|
2709
|
+
}
|
|
2710
|
+
}
|
|
2687
2711
|
return {
|
|
2688
2712
|
contentType: tpl.kp_content_type,
|
|
2689
2713
|
display: tplData?.general?.content?.title || tpl.kp_content_type,
|
|
2690
2714
|
filters: filtersWithParents,
|
|
2691
2715
|
rollups: rollupsWithParents,
|
|
2692
|
-
rollupDisplayMap
|
|
2716
|
+
rollupDisplayMap,
|
|
2717
|
+
childByParentId
|
|
2693
2718
|
};
|
|
2694
2719
|
});
|
|
2695
2720
|
const filteredPerDataset = perDataset.filter(
|
package/dist/universal.mjs
CHANGED
|
@@ -2252,6 +2252,24 @@ var processAuthorAndCommonFilters = (allTpls, filterScopes, annoEnabledBlocks =
|
|
|
2252
2252
|
filterType: "dateRangeType",
|
|
2253
2253
|
valuePath: "kp_date_published"
|
|
2254
2254
|
}
|
|
2255
|
+
},
|
|
2256
|
+
// "Documents" filter — narrows results to specific chosen documents of the
|
|
2257
|
+
// datasets in view, matched on their own _id. Options list those datasets'
|
|
2258
|
+
// documents by title (documentsType fetch, which uses the ambient contentTypes);
|
|
2259
|
+
// the backend matches { _id: { $in: [ids] } } via target valuePath "_id"
|
|
2260
|
+
// (getValuePathQuery ObjectId-casts any `_id`-ending path).
|
|
2261
|
+
{
|
|
2262
|
+
filterId: "documentsFilter",
|
|
2263
|
+
blockId: "documentsFilter",
|
|
2264
|
+
display: "Documents",
|
|
2265
|
+
value: "documents",
|
|
2266
|
+
filterKey: generateFilterKey({
|
|
2267
|
+
filterType: "valuePathType",
|
|
2268
|
+
valuePath: "_id",
|
|
2269
|
+
scope: "doc"
|
|
2270
|
+
}),
|
|
2271
|
+
source: { filterType: "documentsType", scope: "tags" },
|
|
2272
|
+
target: { filterType: "valuePathType", valuePath: "_id" }
|
|
2255
2273
|
}
|
|
2256
2274
|
]
|
|
2257
2275
|
}] : [];
|
|
@@ -2612,12 +2630,19 @@ var _self_managed_buildDocHierarchyConfig = ({
|
|
|
2612
2630
|
const t = allTpls.find((tp) => tp.kp_content_type === ct);
|
|
2613
2631
|
if (t?.general?.content?.title) rollupDisplayMap[ct] = t.general.content.title;
|
|
2614
2632
|
}
|
|
2633
|
+
const childByParentId = {};
|
|
2634
|
+
for (const r of rollupsWithParents) {
|
|
2635
|
+
if (r.parentFilterId && r.isTagRollup && r.source?.filterType === "tagType") {
|
|
2636
|
+
childByParentId[r.parentFilterId] = r;
|
|
2637
|
+
}
|
|
2638
|
+
}
|
|
2615
2639
|
return {
|
|
2616
2640
|
contentType: tpl.kp_content_type,
|
|
2617
2641
|
display: tplData?.general?.content?.title || tpl.kp_content_type,
|
|
2618
2642
|
filters: filtersWithParents,
|
|
2619
2643
|
rollups: rollupsWithParents,
|
|
2620
|
-
rollupDisplayMap
|
|
2644
|
+
rollupDisplayMap,
|
|
2645
|
+
childByParentId
|
|
2621
2646
|
};
|
|
2622
2647
|
});
|
|
2623
2648
|
const filteredPerDataset = perDataset.filter(
|