@okf/ootils 1.44.1 → 1.44.2
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.js +28 -17
- package/dist/browser.mjs +28 -17
- package/dist/node.js +28 -17
- package/dist/node.mjs +28 -17
- package/dist/universal.js +28 -17
- package/dist/universal.mjs +28 -17
- package/package.json +1 -1
package/dist/browser.js
CHANGED
|
@@ -2506,6 +2506,13 @@ var deduplicateRollupTagFilters = (rollups) => {
|
|
|
2506
2506
|
var injectFilterOptionsBy = (filters) => filters.map(
|
|
2507
2507
|
(f) => f.parentFilterId ? { ...f, source: { ...f.source, filterOptionsBy: { filterId: f.parentFilterId } } } : f
|
|
2508
2508
|
);
|
|
2509
|
+
var isRollupConfig = (f) => !!f.target?.rollupPath || f.target?.filterType === "rollupValuePathType";
|
|
2510
|
+
var dedupeSharedGroupConfigs = (configs) => {
|
|
2511
|
+
const rollups = configs.filter(isRollupConfig);
|
|
2512
|
+
const rollupSourceKeys = new Set(rollups.map((r) => JSON.stringify(r.source)));
|
|
2513
|
+
const directFilters = configs.filter((f) => !isRollupConfig(f)).filter((f) => !rollupSourceKeys.has(JSON.stringify(f.source)));
|
|
2514
|
+
return [...directFilters, ...deduplicateRollupTagFilters(rollups)];
|
|
2515
|
+
};
|
|
2509
2516
|
var _self_managed_buildDocHierarchyConfig = ({
|
|
2510
2517
|
combinedDocumentBlocks,
|
|
2511
2518
|
docRollupBlocks,
|
|
@@ -2518,17 +2525,19 @@ var _self_managed_buildDocHierarchyConfig = ({
|
|
|
2518
2525
|
const commonGroup = allGroups.find(
|
|
2519
2526
|
(g) => g.contentTypes.length === selectedTpls.length
|
|
2520
2527
|
);
|
|
2521
|
-
const commonFilterConfigs = commonGroup ? injectFilterOptionsBy(
|
|
2528
|
+
const commonFilterConfigs = commonGroup && selectedTpls.length >= 2 ? injectFilterOptionsBy(
|
|
2522
2529
|
sortFiltersHierarchically(
|
|
2523
2530
|
attachParentFields(
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2531
|
+
dedupeSharedGroupConfigs(
|
|
2532
|
+
buildFilterConfigurations({
|
|
2533
|
+
groups: [commonGroup],
|
|
2534
|
+
type: "tags",
|
|
2535
|
+
selectedTpls,
|
|
2536
|
+
allTpls,
|
|
2537
|
+
isRollup: false,
|
|
2538
|
+
isAnno: false
|
|
2539
|
+
}).flatMap((s) => s.configs)
|
|
2540
|
+
),
|
|
2532
2541
|
allTpls
|
|
2533
2542
|
)
|
|
2534
2543
|
)
|
|
@@ -2540,14 +2549,16 @@ var _self_managed_buildDocHierarchyConfig = ({
|
|
|
2540
2549
|
const groupFilterConfigs = injectFilterOptionsBy(
|
|
2541
2550
|
sortFiltersHierarchically(
|
|
2542
2551
|
attachParentFields(
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2552
|
+
dedupeSharedGroupConfigs(
|
|
2553
|
+
buildFilterConfigurations({
|
|
2554
|
+
groups: [group],
|
|
2555
|
+
type: "tags",
|
|
2556
|
+
selectedTpls,
|
|
2557
|
+
allTpls,
|
|
2558
|
+
isRollup: false,
|
|
2559
|
+
isAnno: false
|
|
2560
|
+
}).flatMap((s) => s.configs)
|
|
2561
|
+
),
|
|
2551
2562
|
allTpls
|
|
2552
2563
|
)
|
|
2553
2564
|
)
|
package/dist/browser.mjs
CHANGED
|
@@ -2436,6 +2436,13 @@ var deduplicateRollupTagFilters = (rollups) => {
|
|
|
2436
2436
|
var injectFilterOptionsBy = (filters) => filters.map(
|
|
2437
2437
|
(f) => f.parentFilterId ? { ...f, source: { ...f.source, filterOptionsBy: { filterId: f.parentFilterId } } } : f
|
|
2438
2438
|
);
|
|
2439
|
+
var isRollupConfig = (f) => !!f.target?.rollupPath || f.target?.filterType === "rollupValuePathType";
|
|
2440
|
+
var dedupeSharedGroupConfigs = (configs) => {
|
|
2441
|
+
const rollups = configs.filter(isRollupConfig);
|
|
2442
|
+
const rollupSourceKeys = new Set(rollups.map((r) => JSON.stringify(r.source)));
|
|
2443
|
+
const directFilters = configs.filter((f) => !isRollupConfig(f)).filter((f) => !rollupSourceKeys.has(JSON.stringify(f.source)));
|
|
2444
|
+
return [...directFilters, ...deduplicateRollupTagFilters(rollups)];
|
|
2445
|
+
};
|
|
2439
2446
|
var _self_managed_buildDocHierarchyConfig = ({
|
|
2440
2447
|
combinedDocumentBlocks,
|
|
2441
2448
|
docRollupBlocks,
|
|
@@ -2448,17 +2455,19 @@ var _self_managed_buildDocHierarchyConfig = ({
|
|
|
2448
2455
|
const commonGroup = allGroups.find(
|
|
2449
2456
|
(g) => g.contentTypes.length === selectedTpls.length
|
|
2450
2457
|
);
|
|
2451
|
-
const commonFilterConfigs = commonGroup ? injectFilterOptionsBy(
|
|
2458
|
+
const commonFilterConfigs = commonGroup && selectedTpls.length >= 2 ? injectFilterOptionsBy(
|
|
2452
2459
|
sortFiltersHierarchically(
|
|
2453
2460
|
attachParentFields(
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2461
|
+
dedupeSharedGroupConfigs(
|
|
2462
|
+
buildFilterConfigurations({
|
|
2463
|
+
groups: [commonGroup],
|
|
2464
|
+
type: "tags",
|
|
2465
|
+
selectedTpls,
|
|
2466
|
+
allTpls,
|
|
2467
|
+
isRollup: false,
|
|
2468
|
+
isAnno: false
|
|
2469
|
+
}).flatMap((s) => s.configs)
|
|
2470
|
+
),
|
|
2462
2471
|
allTpls
|
|
2463
2472
|
)
|
|
2464
2473
|
)
|
|
@@ -2470,14 +2479,16 @@ var _self_managed_buildDocHierarchyConfig = ({
|
|
|
2470
2479
|
const groupFilterConfigs = injectFilterOptionsBy(
|
|
2471
2480
|
sortFiltersHierarchically(
|
|
2472
2481
|
attachParentFields(
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2482
|
+
dedupeSharedGroupConfigs(
|
|
2483
|
+
buildFilterConfigurations({
|
|
2484
|
+
groups: [group],
|
|
2485
|
+
type: "tags",
|
|
2486
|
+
selectedTpls,
|
|
2487
|
+
allTpls,
|
|
2488
|
+
isRollup: false,
|
|
2489
|
+
isAnno: false
|
|
2490
|
+
}).flatMap((s) => s.configs)
|
|
2491
|
+
),
|
|
2481
2492
|
allTpls
|
|
2482
2493
|
)
|
|
2483
2494
|
)
|
package/dist/node.js
CHANGED
|
@@ -4346,6 +4346,13 @@ var deduplicateRollupTagFilters = (rollups) => {
|
|
|
4346
4346
|
var injectFilterOptionsBy = (filters) => filters.map(
|
|
4347
4347
|
(f) => f.parentFilterId ? { ...f, source: { ...f.source, filterOptionsBy: { filterId: f.parentFilterId } } } : f
|
|
4348
4348
|
);
|
|
4349
|
+
var isRollupConfig = (f) => !!f.target?.rollupPath || f.target?.filterType === "rollupValuePathType";
|
|
4350
|
+
var dedupeSharedGroupConfigs = (configs) => {
|
|
4351
|
+
const rollups = configs.filter(isRollupConfig);
|
|
4352
|
+
const rollupSourceKeys = new Set(rollups.map((r) => JSON.stringify(r.source)));
|
|
4353
|
+
const directFilters = configs.filter((f) => !isRollupConfig(f)).filter((f) => !rollupSourceKeys.has(JSON.stringify(f.source)));
|
|
4354
|
+
return [...directFilters, ...deduplicateRollupTagFilters(rollups)];
|
|
4355
|
+
};
|
|
4349
4356
|
var _self_managed_buildDocHierarchyConfig = ({
|
|
4350
4357
|
combinedDocumentBlocks,
|
|
4351
4358
|
docRollupBlocks,
|
|
@@ -4358,17 +4365,19 @@ var _self_managed_buildDocHierarchyConfig = ({
|
|
|
4358
4365
|
const commonGroup = allGroups.find(
|
|
4359
4366
|
(g) => g.contentTypes.length === selectedTpls.length
|
|
4360
4367
|
);
|
|
4361
|
-
const commonFilterConfigs = commonGroup ? injectFilterOptionsBy(
|
|
4368
|
+
const commonFilterConfigs = commonGroup && selectedTpls.length >= 2 ? injectFilterOptionsBy(
|
|
4362
4369
|
sortFiltersHierarchically(
|
|
4363
4370
|
attachParentFields(
|
|
4364
|
-
|
|
4365
|
-
|
|
4366
|
-
|
|
4367
|
-
|
|
4368
|
-
|
|
4369
|
-
|
|
4370
|
-
|
|
4371
|
-
|
|
4371
|
+
dedupeSharedGroupConfigs(
|
|
4372
|
+
buildFilterConfigurations({
|
|
4373
|
+
groups: [commonGroup],
|
|
4374
|
+
type: "tags",
|
|
4375
|
+
selectedTpls,
|
|
4376
|
+
allTpls,
|
|
4377
|
+
isRollup: false,
|
|
4378
|
+
isAnno: false
|
|
4379
|
+
}).flatMap((s) => s.configs)
|
|
4380
|
+
),
|
|
4372
4381
|
allTpls
|
|
4373
4382
|
)
|
|
4374
4383
|
)
|
|
@@ -4380,14 +4389,16 @@ var _self_managed_buildDocHierarchyConfig = ({
|
|
|
4380
4389
|
const groupFilterConfigs = injectFilterOptionsBy(
|
|
4381
4390
|
sortFiltersHierarchically(
|
|
4382
4391
|
attachParentFields(
|
|
4383
|
-
|
|
4384
|
-
|
|
4385
|
-
|
|
4386
|
-
|
|
4387
|
-
|
|
4388
|
-
|
|
4389
|
-
|
|
4390
|
-
|
|
4392
|
+
dedupeSharedGroupConfigs(
|
|
4393
|
+
buildFilterConfigurations({
|
|
4394
|
+
groups: [group],
|
|
4395
|
+
type: "tags",
|
|
4396
|
+
selectedTpls,
|
|
4397
|
+
allTpls,
|
|
4398
|
+
isRollup: false,
|
|
4399
|
+
isAnno: false
|
|
4400
|
+
}).flatMap((s) => s.configs)
|
|
4401
|
+
),
|
|
4391
4402
|
allTpls
|
|
4392
4403
|
)
|
|
4393
4404
|
)
|
package/dist/node.mjs
CHANGED
|
@@ -4259,6 +4259,13 @@ var deduplicateRollupTagFilters = (rollups) => {
|
|
|
4259
4259
|
var injectFilterOptionsBy = (filters) => filters.map(
|
|
4260
4260
|
(f) => f.parentFilterId ? { ...f, source: { ...f.source, filterOptionsBy: { filterId: f.parentFilterId } } } : f
|
|
4261
4261
|
);
|
|
4262
|
+
var isRollupConfig = (f) => !!f.target?.rollupPath || f.target?.filterType === "rollupValuePathType";
|
|
4263
|
+
var dedupeSharedGroupConfigs = (configs) => {
|
|
4264
|
+
const rollups = configs.filter(isRollupConfig);
|
|
4265
|
+
const rollupSourceKeys = new Set(rollups.map((r) => JSON.stringify(r.source)));
|
|
4266
|
+
const directFilters = configs.filter((f) => !isRollupConfig(f)).filter((f) => !rollupSourceKeys.has(JSON.stringify(f.source)));
|
|
4267
|
+
return [...directFilters, ...deduplicateRollupTagFilters(rollups)];
|
|
4268
|
+
};
|
|
4262
4269
|
var _self_managed_buildDocHierarchyConfig = ({
|
|
4263
4270
|
combinedDocumentBlocks,
|
|
4264
4271
|
docRollupBlocks,
|
|
@@ -4271,17 +4278,19 @@ var _self_managed_buildDocHierarchyConfig = ({
|
|
|
4271
4278
|
const commonGroup = allGroups.find(
|
|
4272
4279
|
(g) => g.contentTypes.length === selectedTpls.length
|
|
4273
4280
|
);
|
|
4274
|
-
const commonFilterConfigs = commonGroup ? injectFilterOptionsBy(
|
|
4281
|
+
const commonFilterConfigs = commonGroup && selectedTpls.length >= 2 ? injectFilterOptionsBy(
|
|
4275
4282
|
sortFiltersHierarchically(
|
|
4276
4283
|
attachParentFields(
|
|
4277
|
-
|
|
4278
|
-
|
|
4279
|
-
|
|
4280
|
-
|
|
4281
|
-
|
|
4282
|
-
|
|
4283
|
-
|
|
4284
|
-
|
|
4284
|
+
dedupeSharedGroupConfigs(
|
|
4285
|
+
buildFilterConfigurations({
|
|
4286
|
+
groups: [commonGroup],
|
|
4287
|
+
type: "tags",
|
|
4288
|
+
selectedTpls,
|
|
4289
|
+
allTpls,
|
|
4290
|
+
isRollup: false,
|
|
4291
|
+
isAnno: false
|
|
4292
|
+
}).flatMap((s) => s.configs)
|
|
4293
|
+
),
|
|
4285
4294
|
allTpls
|
|
4286
4295
|
)
|
|
4287
4296
|
)
|
|
@@ -4293,14 +4302,16 @@ var _self_managed_buildDocHierarchyConfig = ({
|
|
|
4293
4302
|
const groupFilterConfigs = injectFilterOptionsBy(
|
|
4294
4303
|
sortFiltersHierarchically(
|
|
4295
4304
|
attachParentFields(
|
|
4296
|
-
|
|
4297
|
-
|
|
4298
|
-
|
|
4299
|
-
|
|
4300
|
-
|
|
4301
|
-
|
|
4302
|
-
|
|
4303
|
-
|
|
4305
|
+
dedupeSharedGroupConfigs(
|
|
4306
|
+
buildFilterConfigurations({
|
|
4307
|
+
groups: [group],
|
|
4308
|
+
type: "tags",
|
|
4309
|
+
selectedTpls,
|
|
4310
|
+
allTpls,
|
|
4311
|
+
isRollup: false,
|
|
4312
|
+
isAnno: false
|
|
4313
|
+
}).flatMap((s) => s.configs)
|
|
4314
|
+
),
|
|
4304
4315
|
allTpls
|
|
4305
4316
|
)
|
|
4306
4317
|
)
|
package/dist/universal.js
CHANGED
|
@@ -2506,6 +2506,13 @@ var deduplicateRollupTagFilters = (rollups) => {
|
|
|
2506
2506
|
var injectFilterOptionsBy = (filters) => filters.map(
|
|
2507
2507
|
(f) => f.parentFilterId ? { ...f, source: { ...f.source, filterOptionsBy: { filterId: f.parentFilterId } } } : f
|
|
2508
2508
|
);
|
|
2509
|
+
var isRollupConfig = (f) => !!f.target?.rollupPath || f.target?.filterType === "rollupValuePathType";
|
|
2510
|
+
var dedupeSharedGroupConfigs = (configs) => {
|
|
2511
|
+
const rollups = configs.filter(isRollupConfig);
|
|
2512
|
+
const rollupSourceKeys = new Set(rollups.map((r) => JSON.stringify(r.source)));
|
|
2513
|
+
const directFilters = configs.filter((f) => !isRollupConfig(f)).filter((f) => !rollupSourceKeys.has(JSON.stringify(f.source)));
|
|
2514
|
+
return [...directFilters, ...deduplicateRollupTagFilters(rollups)];
|
|
2515
|
+
};
|
|
2509
2516
|
var _self_managed_buildDocHierarchyConfig = ({
|
|
2510
2517
|
combinedDocumentBlocks,
|
|
2511
2518
|
docRollupBlocks,
|
|
@@ -2518,17 +2525,19 @@ var _self_managed_buildDocHierarchyConfig = ({
|
|
|
2518
2525
|
const commonGroup = allGroups.find(
|
|
2519
2526
|
(g) => g.contentTypes.length === selectedTpls.length
|
|
2520
2527
|
);
|
|
2521
|
-
const commonFilterConfigs = commonGroup ? injectFilterOptionsBy(
|
|
2528
|
+
const commonFilterConfigs = commonGroup && selectedTpls.length >= 2 ? injectFilterOptionsBy(
|
|
2522
2529
|
sortFiltersHierarchically(
|
|
2523
2530
|
attachParentFields(
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2531
|
+
dedupeSharedGroupConfigs(
|
|
2532
|
+
buildFilterConfigurations({
|
|
2533
|
+
groups: [commonGroup],
|
|
2534
|
+
type: "tags",
|
|
2535
|
+
selectedTpls,
|
|
2536
|
+
allTpls,
|
|
2537
|
+
isRollup: false,
|
|
2538
|
+
isAnno: false
|
|
2539
|
+
}).flatMap((s) => s.configs)
|
|
2540
|
+
),
|
|
2532
2541
|
allTpls
|
|
2533
2542
|
)
|
|
2534
2543
|
)
|
|
@@ -2540,14 +2549,16 @@ var _self_managed_buildDocHierarchyConfig = ({
|
|
|
2540
2549
|
const groupFilterConfigs = injectFilterOptionsBy(
|
|
2541
2550
|
sortFiltersHierarchically(
|
|
2542
2551
|
attachParentFields(
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2552
|
+
dedupeSharedGroupConfigs(
|
|
2553
|
+
buildFilterConfigurations({
|
|
2554
|
+
groups: [group],
|
|
2555
|
+
type: "tags",
|
|
2556
|
+
selectedTpls,
|
|
2557
|
+
allTpls,
|
|
2558
|
+
isRollup: false,
|
|
2559
|
+
isAnno: false
|
|
2560
|
+
}).flatMap((s) => s.configs)
|
|
2561
|
+
),
|
|
2551
2562
|
allTpls
|
|
2552
2563
|
)
|
|
2553
2564
|
)
|
package/dist/universal.mjs
CHANGED
|
@@ -2436,6 +2436,13 @@ var deduplicateRollupTagFilters = (rollups) => {
|
|
|
2436
2436
|
var injectFilterOptionsBy = (filters) => filters.map(
|
|
2437
2437
|
(f) => f.parentFilterId ? { ...f, source: { ...f.source, filterOptionsBy: { filterId: f.parentFilterId } } } : f
|
|
2438
2438
|
);
|
|
2439
|
+
var isRollupConfig = (f) => !!f.target?.rollupPath || f.target?.filterType === "rollupValuePathType";
|
|
2440
|
+
var dedupeSharedGroupConfigs = (configs) => {
|
|
2441
|
+
const rollups = configs.filter(isRollupConfig);
|
|
2442
|
+
const rollupSourceKeys = new Set(rollups.map((r) => JSON.stringify(r.source)));
|
|
2443
|
+
const directFilters = configs.filter((f) => !isRollupConfig(f)).filter((f) => !rollupSourceKeys.has(JSON.stringify(f.source)));
|
|
2444
|
+
return [...directFilters, ...deduplicateRollupTagFilters(rollups)];
|
|
2445
|
+
};
|
|
2439
2446
|
var _self_managed_buildDocHierarchyConfig = ({
|
|
2440
2447
|
combinedDocumentBlocks,
|
|
2441
2448
|
docRollupBlocks,
|
|
@@ -2448,17 +2455,19 @@ var _self_managed_buildDocHierarchyConfig = ({
|
|
|
2448
2455
|
const commonGroup = allGroups.find(
|
|
2449
2456
|
(g) => g.contentTypes.length === selectedTpls.length
|
|
2450
2457
|
);
|
|
2451
|
-
const commonFilterConfigs = commonGroup ? injectFilterOptionsBy(
|
|
2458
|
+
const commonFilterConfigs = commonGroup && selectedTpls.length >= 2 ? injectFilterOptionsBy(
|
|
2452
2459
|
sortFiltersHierarchically(
|
|
2453
2460
|
attachParentFields(
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2461
|
+
dedupeSharedGroupConfigs(
|
|
2462
|
+
buildFilterConfigurations({
|
|
2463
|
+
groups: [commonGroup],
|
|
2464
|
+
type: "tags",
|
|
2465
|
+
selectedTpls,
|
|
2466
|
+
allTpls,
|
|
2467
|
+
isRollup: false,
|
|
2468
|
+
isAnno: false
|
|
2469
|
+
}).flatMap((s) => s.configs)
|
|
2470
|
+
),
|
|
2462
2471
|
allTpls
|
|
2463
2472
|
)
|
|
2464
2473
|
)
|
|
@@ -2470,14 +2479,16 @@ var _self_managed_buildDocHierarchyConfig = ({
|
|
|
2470
2479
|
const groupFilterConfigs = injectFilterOptionsBy(
|
|
2471
2480
|
sortFiltersHierarchically(
|
|
2472
2481
|
attachParentFields(
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2482
|
+
dedupeSharedGroupConfigs(
|
|
2483
|
+
buildFilterConfigurations({
|
|
2484
|
+
groups: [group],
|
|
2485
|
+
type: "tags",
|
|
2486
|
+
selectedTpls,
|
|
2487
|
+
allTpls,
|
|
2488
|
+
isRollup: false,
|
|
2489
|
+
isAnno: false
|
|
2490
|
+
}).flatMap((s) => s.configs)
|
|
2491
|
+
),
|
|
2481
2492
|
allTpls
|
|
2482
2493
|
)
|
|
2483
2494
|
)
|