@fern-api/fdr-sdk 1.2.42-23647d2912 → 1.2.42-304ea6b285
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/js/navigation/ledger-root-builder.js +0 -27
- package/dist/js/navigation/ledger-root-builder.js.map +1 -1
- package/dist/js/navigation/ledger-root-builder.mjs +0 -27
- package/dist/js/navigation/ledger-root-builder.mjs.map +1 -1
- package/dist/navigation/ledger-root-builder.js +0 -46
- package/dist/navigation/ledger-root-builder.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/navigation/__test__/ledger-root-builder.crossProductDedup.test.d.ts +0 -2
- package/dist/navigation/__test__/ledger-root-builder.crossProductDedup.test.d.ts.map +0 -1
- package/dist/navigation/__test__/ledger-root-builder.crossProductDedup.test.js +0 -267
- package/dist/navigation/__test__/ledger-root-builder.crossProductDedup.test.js.map +0 -1
- package/dist/types/navigation/__test__/ledger-root-builder.crossProductDedup.test.d.ts +0 -2
- package/dist/types/navigation/__test__/ledger-root-builder.crossProductDedup.test.d.ts.map +0 -1
|
@@ -2356,7 +2356,6 @@ function buildProductGroup(ctx, products, scoped, rootSlug, skipSharedSectionMer
|
|
|
2356
2356
|
};
|
|
2357
2357
|
return node;
|
|
2358
2358
|
});
|
|
2359
|
-
markCrossProductCanonicalSlugs(children);
|
|
2360
2359
|
return {
|
|
2361
2360
|
type: "productgroup",
|
|
2362
2361
|
id: ctx.nodeId("productgroup"),
|
|
@@ -2368,32 +2367,6 @@ function buildProductGroup(ctx, products, scoped, rootSlug, skipSharedSectionMer
|
|
|
2368
2367
|
children
|
|
2369
2368
|
};
|
|
2370
2369
|
}
|
|
2371
|
-
function markCrossProductCanonicalSlugs(productNodes) {
|
|
2372
|
-
const pageIdToCanonical = /* @__PURE__ */ new Map();
|
|
2373
|
-
const sorted = [...productNodes].sort((a, b) => {
|
|
2374
|
-
if (a.default !== b.default) {
|
|
2375
|
-
return a.default ? -1 : 1;
|
|
2376
|
-
}
|
|
2377
|
-
return 0;
|
|
2378
|
-
});
|
|
2379
|
-
for (const product of sorted) {
|
|
2380
|
-
traverseDF(product, (child) => {
|
|
2381
|
-
if (hasMetadata(child) && isPage(child)) {
|
|
2382
|
-
const pid = getPageId(child);
|
|
2383
|
-
if (pid == null) {
|
|
2384
|
-
return;
|
|
2385
|
-
}
|
|
2386
|
-
const key = `pid:${pid}`;
|
|
2387
|
-
const canonical = pageIdToCanonical.get(key);
|
|
2388
|
-
if (canonical != null && !product.default) {
|
|
2389
|
-
child.canonicalSlug = canonical;
|
|
2390
|
-
} else if (canonical == null) {
|
|
2391
|
-
pageIdToCanonical.set(key, child.canonicalSlug ?? child.slug);
|
|
2392
|
-
}
|
|
2393
|
-
}
|
|
2394
|
-
});
|
|
2395
|
-
}
|
|
2396
|
-
}
|
|
2397
2370
|
export {
|
|
2398
2371
|
apiLeafNodeFromNavRoute,
|
|
2399
2372
|
buildFullRootFromSegments,
|