@fern-api/fdr-sdk 1.2.45-3a874ebe1e → 1.2.45-932269c163
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 +6 -14
- package/dist/js/navigation/ledger-root-builder.js.map +1 -1
- package/dist/js/navigation/ledger-root-builder.mjs +6 -14
- package/dist/js/navigation/ledger-root-builder.mjs.map +1 -1
- package/dist/navigation/__test__/ledger-root-builder.unversionedPointsTo.test.js +1 -59
- package/dist/navigation/__test__/ledger-root-builder.unversionedPointsTo.test.js.map +1 -1
- package/dist/navigation/ledger-root-builder.d.ts.map +1 -1
- package/dist/navigation/ledger-root-builder.js +8 -22
- package/dist/navigation/ledger-root-builder.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/navigation/ledger-root-builder.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/navigation/__test__/ledger-root-builder.landingPageRedirect.test.d.ts +0 -2
- package/dist/navigation/__test__/ledger-root-builder.landingPageRedirect.test.d.ts.map +0 -1
- package/dist/navigation/__test__/ledger-root-builder.landingPageRedirect.test.js +0 -227
- package/dist/navigation/__test__/ledger-root-builder.landingPageRedirect.test.js.map +0 -1
- package/dist/types/navigation/__test__/ledger-root-builder.landingPageRedirect.test.d.ts +0 -2
- package/dist/types/navigation/__test__/ledger-root-builder.landingPageRedirect.test.d.ts.map +0 -1
|
@@ -1347,7 +1347,7 @@ function mergeChildrenByPosition(ctx, nav, sectionChildren) {
|
|
|
1347
1347
|
function sectionNode(ctx, scoped, sectionChildren, scopePrefix) {
|
|
1348
1348
|
const { seg, nav } = scoped;
|
|
1349
1349
|
const overview = overviewRoute(nav) ?? overviewRouteFromSegmentMeta(seg, nav);
|
|
1350
|
-
const overviewPageId = metaStr(
|
|
1350
|
+
const overviewPageId = overview != null ? metaStr(overview.metadata, "pageId") : void 0;
|
|
1351
1351
|
const relSection = stripLeadingScopePrefix(seg.section, scopePrefix);
|
|
1352
1352
|
let slug = structuralNodeSlug(ctx, overview?.fullPath, relSection, scopePrefix);
|
|
1353
1353
|
if (relSection === "" && overview?.fullPath == null) {
|
|
@@ -1360,6 +1360,7 @@ function sectionNode(ctx, scoped, sectionChildren, scopePrefix) {
|
|
|
1360
1360
|
}
|
|
1361
1361
|
}
|
|
1362
1362
|
}
|
|
1363
|
+
const metaPointsTo = metaStr(seg.metadata, "pointsTo");
|
|
1363
1364
|
const defaults = withMetadataDefaults({
|
|
1364
1365
|
id: ctx.nodeId(`section:${slug}`),
|
|
1365
1366
|
title: metaStr(seg.metadata, "title") ?? "",
|
|
@@ -1380,10 +1381,7 @@ function sectionNode(ctx, scoped, sectionChildren, scopePrefix) {
|
|
|
1380
1381
|
collapsible: metaBool(seg.metadata, "collapsible") ?? (metaCollapsed(seg.metadata) === true ? true : void 0),
|
|
1381
1382
|
collapsedByDefault: metaBool(seg.metadata, "collapsedByDefault") ?? (metaCollapsed(seg.metadata) === true ? true : void 0),
|
|
1382
1383
|
availability: metaAvailability(seg.metadata),
|
|
1383
|
-
|
|
1384
|
-
// mutableUpdatePointsTo compute it via followRedirect so that
|
|
1385
|
-
// self-referencing redirects are cleared, matching v2 behavior.
|
|
1386
|
-
pointsTo: void 0,
|
|
1384
|
+
pointsTo: metaPointsTo != null ? pointsToSlug(metaPointsTo) : void 0,
|
|
1387
1385
|
children: mergeChildrenByPosition(ctx, nav, sectionChildren)
|
|
1388
1386
|
};
|
|
1389
1387
|
}
|
|
@@ -2024,19 +2022,13 @@ function buildFullRootFromSegments(options) {
|
|
|
2024
2022
|
}
|
|
2025
2023
|
let rootPointsTo;
|
|
2026
2024
|
if (child.type === "productgroup") {
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
} else {
|
|
2030
|
-
const defaultProduct = child.children.find((p) => p.default) ?? child.children[0];
|
|
2031
|
-
rootPointsTo = defaultProduct?.type === "product" ? defaultProduct.pointsTo : void 0;
|
|
2032
|
-
}
|
|
2025
|
+
const defaultProduct = child.children.find((p) => p.default) ?? child.children[0];
|
|
2026
|
+
rootPointsTo = defaultProduct?.type === "product" ? defaultProduct.pointsTo : void 0;
|
|
2033
2027
|
} else if (child.type === "versioned") {
|
|
2034
2028
|
const defaultVersion = child.children.find((v) => v.default) ?? child.children[0];
|
|
2035
2029
|
rootPointsTo = defaultVersion?.pointsTo;
|
|
2036
2030
|
} else if (child.type === "unversioned") {
|
|
2037
|
-
if (
|
|
2038
|
-
rootPointsTo = child.landingPage.slug;
|
|
2039
|
-
} else if (tabs.length > 0) {
|
|
2031
|
+
if (tabs.length > 0) {
|
|
2040
2032
|
const firstTab = tabs[0];
|
|
2041
2033
|
const pt = firstTab != null ? metaStr(firstTab.metadata, "pointsTo") : void 0;
|
|
2042
2034
|
rootPointsTo = pt != null ? pointsToSlug(pt) : void 0;
|