@jpmorganchase/elemental 7.1.1 → 8.0.1

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.
@@ -11,6 +11,7 @@ declare type SidebarLayoutProps = {
11
11
  hideSchemas?: boolean;
12
12
  hideInternal?: boolean;
13
13
  hideExport?: boolean;
14
+ hideInlineExamples?: boolean;
14
15
  hideServerInfo?: boolean;
15
16
  hideSecurityInfo?: boolean;
16
17
  exportProps?: ExportButtonProps;
@@ -20,6 +21,8 @@ declare type SidebarLayoutProps = {
20
21
  renderExtensionAddon?: ExtensionAddonRenderer;
21
22
  basePath?: string;
22
23
  outerRouter?: boolean;
24
+ tryItOutDefaultServer?: string;
25
+ useCustomNav?: boolean;
23
26
  };
24
27
  export declare const APIWithResponsiveSidebarLayout: React.FC<SidebarLayoutProps>;
25
28
  export {};
package/index.esm.js CHANGED
@@ -265,7 +265,7 @@ const Item = React.memo(({ item }) => {
265
265
  React.createElement(Tab, null, "TryIt")),
266
266
  React.createElement(TabPanels, null,
267
267
  React.createElement(TabPanel, null,
268
- React.createElement(ParsedDocs, { className: "sl-px-4", node: item, location: location, layoutOptions: { noHeading: true, hideTryItPanel: false, hideSamples, hideTryIt } })),
268
+ React.createElement(ParsedDocs, { className: "sl-px-4", node: item, location: location, layoutOptions: { noHeading: true, hideTryItPanel: false, hideSamples, hideTryIt, hideInlineExamples: hideInlineExamples }, tryItOutDefaultServer: tryItOutDefaultServer })),
269
269
  React.createElement(TabPanel, null,
270
270
  React.createElement(TryItWithRequestSamples, { httpOperation: item.data, hideInlineExamples: hideInlineExamples, tryItCredentialsPolicy: tryItCredentialsPolicy, tryItOutDefaultServer: tryItOutDefaultServer, corsProxy: corsProxy, hideSamples: hideSamples, hideTryIt: hideTryIt }))))))));
271
271
  });
@@ -277,14 +277,21 @@ const Collapse = ({ isOpen, children }) => {
277
277
  };
278
278
  Collapse.displayName = 'Collapse';
279
279
 
280
- const APIWithResponsiveSidebarLayout = ({ serviceNode, logo, hideTryItPanel, hideTryIt, hideSamples, compact, hideSchemas, hideInternal, hideExport, hideServerInfo, hideSecurityInfo, exportProps, tryItCredentialsPolicy, tryItCorsProxy, renderExtensionAddon, basePath = '/', outerRouter = false, }) => {
280
+ const APIWithResponsiveSidebarLayout = ({ serviceNode, logo, hideTryItPanel, hideTryIt, hideSamples, compact, hideSchemas, hideInternal, hideExport, hideInlineExamples = false, hideServerInfo, hideSecurityInfo, exportProps, tryItCredentialsPolicy, tryItCorsProxy, renderExtensionAddon, basePath = '/', outerRouter = false, tryItOutDefaultServer, useCustomNav }) => {
281
281
  const container = React.useRef(null);
282
- const tree = React.useMemo(() => computeAPITree(serviceNode, { hideSchemas, hideInternal }), [serviceNode, hideSchemas, hideInternal]);
282
+ const tree = React.useMemo(() => {
283
+ if (!useCustomNav)
284
+ return computeAPITree(serviceNode, { hideSchemas, hideInternal });
285
+ else
286
+ return [];
287
+ }, [serviceNode, hideSchemas, hideInternal, useCustomNav]);
283
288
  const location = useLocation();
284
289
  const { pathname: currentPath } = location;
285
290
  const relativePath = resolveRelativePath(currentPath, basePath, outerRouter);
286
291
  const isRootPath = relativePath === '/';
287
292
  const node = isRootPath ? serviceNode : serviceNode.children.find(child => child.uri === relativePath);
293
+ React.useEffect(() => {
294
+ }, [currentPath]);
288
295
  const layoutOptions = React.useMemo(() => ({
289
296
  hideTryIt: hideTryIt,
290
297
  hideTryItPanel,
@@ -293,7 +300,8 @@ const APIWithResponsiveSidebarLayout = ({ serviceNode, logo, hideTryItPanel, hid
293
300
  hideServerInfo: hideServerInfo,
294
301
  compact: compact,
295
302
  hideExport: hideExport || (node === null || node === void 0 ? void 0 : node.type) !== NodeType.HttpService,
296
- }), [hideTryIt, hideSecurityInfo, hideServerInfo, compact, hideExport, hideTryItPanel, hideSamples, node === null || node === void 0 ? void 0 : node.type]);
303
+ hideInlineExamples
304
+ }), [hideTryIt, hideSecurityInfo, hideServerInfo, compact, hideExport, hideTryItPanel, hideSamples, node === null || node === void 0 ? void 0 : node.type, hideInlineExamples]);
297
305
  if (!node) {
298
306
  const firstSlug = findFirstNodeSlug(tree);
299
307
  if (firstSlug) {
@@ -308,8 +316,8 @@ const APIWithResponsiveSidebarLayout = ({ serviceNode, logo, hideTryItPanel, hid
308
316
  container.current.scrollIntoView();
309
317
  }
310
318
  };
311
- return (React.createElement(ResponsiveSidebarLayout, { onTocClick: handleTocClick, tree: tree, logo: logo !== null && logo !== void 0 ? logo : serviceNode.data.logo, ref: container, name: serviceNode.name }, node && (React.createElement(ElementsOptionsProvider, { renderExtensionAddon: renderExtensionAddon },
312
- React.createElement(ParsedDocs, { key: relativePath, uri: relativePath, node: node, nodeTitle: node.name, layoutOptions: layoutOptions, location: location, exportProps: exportProps, tryItCredentialsPolicy: tryItCredentialsPolicy, tryItCorsProxy: tryItCorsProxy, renderExtensionAddon: renderExtensionAddon })))));
319
+ return (React.createElement(ResponsiveSidebarLayout, { onTocClick: handleTocClick, tree: tree, logo: logo !== null && logo !== void 0 ? logo : serviceNode.data.logo, ref: container, name: serviceNode.name, renderSideBar: !useCustomNav }, node && (React.createElement(ElementsOptionsProvider, { renderExtensionAddon: renderExtensionAddon },
320
+ React.createElement(ParsedDocs, { key: relativePath, uri: relativePath, node: node, nodeTitle: node.name, layoutOptions: layoutOptions, location: location, exportProps: exportProps, tryItCredentialsPolicy: tryItCredentialsPolicy, tryItCorsProxy: tryItCorsProxy, renderExtensionAddon: renderExtensionAddon, tryItOutDefaultServer: tryItOutDefaultServer })))));
313
321
  };
314
322
 
315
323
  const APIWithSidebarLayout = ({ serviceNode, logo, hideTryItPanel, hideTryIt, hideSamples, hideSchemas, hideSecurityInfo, hideServerInfo, hideInternal, hideExport, hideInlineExamples = false, exportProps, tryItCredentialsPolicy, tryItCorsProxy, renderExtensionAddon, basePath = '/', outerRouter = false, tryItOutDefaultServer, useCustomNav, layout, }) => {
@@ -657,7 +665,7 @@ const APIImpl = props => {
657
665
  return (React.createElement(InlineRefResolverProvider, { document: parsedDocument, maxRefDepth: maxRefDepth },
658
666
  layout === 'stacked' && (React.createElement(APIWithStackedLayout, { serviceNode: serviceNode, hideTryIt: hideTryIt, hideSamples: hideSamples, hideTryItPanel: hideTryItPanel, hideSecurityInfo: hideSecurityInfo, hideServerInfo: hideServerInfo, hideExport: hideExport, hideInlineExamples: hideInlineExamples, exportProps: exportProps, tryItCredentialsPolicy: tryItCredentialsPolicy, tryItCorsProxy: tryItCorsProxy, renderExtensionAddon: renderExtensionAddon, location: location, tryItOutDefaultServer: tryItOutDefaultServer })),
659
667
  layout === 'sidebar' && (React.createElement(APIWithSidebarLayout, { logo: logo, serviceNode: serviceNode, hideTryItPanel: hideTryItPanel, hideTryIt: hideTryIt, hideSamples: hideSamples, hideSecurityInfo: hideSecurityInfo, hideServerInfo: hideServerInfo, hideSchemas: hideSchemas, hideInternal: hideInternal, hideExport: hideExport, hideInlineExamples: hideInlineExamples, exportProps: exportProps, tryItCredentialsPolicy: tryItCredentialsPolicy, tryItCorsProxy: tryItCorsProxy, renderExtensionAddon: renderExtensionAddon, basePath: basePath, outerRouter: outerRouter, tryItOutDefaultServer: tryItOutDefaultServer, useCustomNav: useCustomNav, layout: layout })),
660
- layout === 'responsive' && (React.createElement(APIWithResponsiveSidebarLayout, { logo: logo, serviceNode: serviceNode, hideTryItPanel: hideTryItPanel, hideTryIt: hideTryIt, hideSamples: hideSamples, hideSecurityInfo: hideSecurityInfo, hideServerInfo: hideServerInfo, hideSchemas: hideSchemas, hideInternal: hideInternal, hideExport: hideExport, exportProps: exportProps, tryItCredentialsPolicy: tryItCredentialsPolicy, tryItCorsProxy: tryItCorsProxy, renderExtensionAddon: renderExtensionAddon, compact: isResponsiveLayoutEnabled, basePath: basePath, outerRouter: outerRouter }))));
668
+ layout === 'responsive' && (React.createElement(APIWithResponsiveSidebarLayout, { logo: logo, serviceNode: serviceNode, hideTryItPanel: hideTryItPanel, hideTryIt: hideTryIt, hideSamples: hideSamples, hideSecurityInfo: hideSecurityInfo, hideServerInfo: hideServerInfo, hideSchemas: hideSchemas, hideInternal: hideInternal, hideExport: hideExport, hideInlineExamples: hideInlineExamples, exportProps: exportProps, tryItCredentialsPolicy: tryItCredentialsPolicy, tryItCorsProxy: tryItCorsProxy, renderExtensionAddon: renderExtensionAddon, compact: isResponsiveLayoutEnabled, basePath: basePath, outerRouter: outerRouter, tryItOutDefaultServer: tryItOutDefaultServer, useCustomNav: useCustomNav }))));
661
669
  };
662
670
  const API = flow(withRouter, withStyles, withPersistenceBoundary, withMosaicProvider, withQueryClientProvider)(APIImpl);
663
671
 
package/index.js CHANGED
@@ -286,7 +286,7 @@ const Item = React__namespace.memo(({ item }) => {
286
286
  React__namespace.createElement(mosaic.Tab, null, "TryIt")),
287
287
  React__namespace.createElement(mosaic.TabPanels, null,
288
288
  React__namespace.createElement(mosaic.TabPanel, null,
289
- React__namespace.createElement(elementalCore.ParsedDocs, { className: "sl-px-4", node: item, location: location, layoutOptions: { noHeading: true, hideTryItPanel: false, hideSamples, hideTryIt } })),
289
+ React__namespace.createElement(elementalCore.ParsedDocs, { className: "sl-px-4", node: item, location: location, layoutOptions: { noHeading: true, hideTryItPanel: false, hideSamples, hideTryIt, hideInlineExamples: hideInlineExamples }, tryItOutDefaultServer: tryItOutDefaultServer })),
290
290
  React__namespace.createElement(mosaic.TabPanel, null,
291
291
  React__namespace.createElement(elementalCore.TryItWithRequestSamples, { httpOperation: item.data, hideInlineExamples: hideInlineExamples, tryItCredentialsPolicy: tryItCredentialsPolicy, tryItOutDefaultServer: tryItOutDefaultServer, corsProxy: corsProxy, hideSamples: hideSamples, hideTryIt: hideTryIt }))))))));
292
292
  });
@@ -298,14 +298,21 @@ const Collapse = ({ isOpen, children }) => {
298
298
  };
299
299
  Collapse.displayName = 'Collapse';
300
300
 
301
- const APIWithResponsiveSidebarLayout = ({ serviceNode, logo, hideTryItPanel, hideTryIt, hideSamples, compact, hideSchemas, hideInternal, hideExport, hideServerInfo, hideSecurityInfo, exportProps, tryItCredentialsPolicy, tryItCorsProxy, renderExtensionAddon, basePath = '/', outerRouter = false, }) => {
301
+ const APIWithResponsiveSidebarLayout = ({ serviceNode, logo, hideTryItPanel, hideTryIt, hideSamples, compact, hideSchemas, hideInternal, hideExport, hideInlineExamples = false, hideServerInfo, hideSecurityInfo, exportProps, tryItCredentialsPolicy, tryItCorsProxy, renderExtensionAddon, basePath = '/', outerRouter = false, tryItOutDefaultServer, useCustomNav }) => {
302
302
  const container = React__namespace.useRef(null);
303
- const tree = React__namespace.useMemo(() => computeAPITree(serviceNode, { hideSchemas, hideInternal }), [serviceNode, hideSchemas, hideInternal]);
303
+ const tree = React__namespace.useMemo(() => {
304
+ if (!useCustomNav)
305
+ return computeAPITree(serviceNode, { hideSchemas, hideInternal });
306
+ else
307
+ return [];
308
+ }, [serviceNode, hideSchemas, hideInternal, useCustomNav]);
304
309
  const location = reactRouterDom.useLocation();
305
310
  const { pathname: currentPath } = location;
306
311
  const relativePath = resolveRelativePath(currentPath, basePath, outerRouter);
307
312
  const isRootPath = relativePath === '/';
308
313
  const node = isRootPath ? serviceNode : serviceNode.children.find(child => child.uri === relativePath);
314
+ React__namespace.useEffect(() => {
315
+ }, [currentPath]);
309
316
  const layoutOptions = React__namespace.useMemo(() => ({
310
317
  hideTryIt: hideTryIt,
311
318
  hideTryItPanel,
@@ -314,7 +321,8 @@ const APIWithResponsiveSidebarLayout = ({ serviceNode, logo, hideTryItPanel, hid
314
321
  hideServerInfo: hideServerInfo,
315
322
  compact: compact,
316
323
  hideExport: hideExport || (node === null || node === void 0 ? void 0 : node.type) !== types.NodeType.HttpService,
317
- }), [hideTryIt, hideSecurityInfo, hideServerInfo, compact, hideExport, hideTryItPanel, hideSamples, node === null || node === void 0 ? void 0 : node.type]);
324
+ hideInlineExamples
325
+ }), [hideTryIt, hideSecurityInfo, hideServerInfo, compact, hideExport, hideTryItPanel, hideSamples, node === null || node === void 0 ? void 0 : node.type, hideInlineExamples]);
318
326
  if (!node) {
319
327
  const firstSlug = findFirstNodeSlug(tree);
320
328
  if (firstSlug) {
@@ -329,8 +337,8 @@ const APIWithResponsiveSidebarLayout = ({ serviceNode, logo, hideTryItPanel, hid
329
337
  container.current.scrollIntoView();
330
338
  }
331
339
  };
332
- return (React__namespace.createElement(elementalCore.ResponsiveSidebarLayout, { onTocClick: handleTocClick, tree: tree, logo: logo !== null && logo !== void 0 ? logo : serviceNode.data.logo, ref: container, name: serviceNode.name }, node && (React__namespace.createElement(elementalCore.ElementsOptionsProvider, { renderExtensionAddon: renderExtensionAddon },
333
- React__namespace.createElement(elementalCore.ParsedDocs, { key: relativePath, uri: relativePath, node: node, nodeTitle: node.name, layoutOptions: layoutOptions, location: location, exportProps: exportProps, tryItCredentialsPolicy: tryItCredentialsPolicy, tryItCorsProxy: tryItCorsProxy, renderExtensionAddon: renderExtensionAddon })))));
340
+ return (React__namespace.createElement(elementalCore.ResponsiveSidebarLayout, { onTocClick: handleTocClick, tree: tree, logo: logo !== null && logo !== void 0 ? logo : serviceNode.data.logo, ref: container, name: serviceNode.name, renderSideBar: !useCustomNav }, node && (React__namespace.createElement(elementalCore.ElementsOptionsProvider, { renderExtensionAddon: renderExtensionAddon },
341
+ React__namespace.createElement(elementalCore.ParsedDocs, { key: relativePath, uri: relativePath, node: node, nodeTitle: node.name, layoutOptions: layoutOptions, location: location, exportProps: exportProps, tryItCredentialsPolicy: tryItCredentialsPolicy, tryItCorsProxy: tryItCorsProxy, renderExtensionAddon: renderExtensionAddon, tryItOutDefaultServer: tryItOutDefaultServer })))));
334
342
  };
335
343
 
336
344
  const APIWithSidebarLayout = ({ serviceNode, logo, hideTryItPanel, hideTryIt, hideSamples, hideSchemas, hideSecurityInfo, hideServerInfo, hideInternal, hideExport, hideInlineExamples = false, exportProps, tryItCredentialsPolicy, tryItCorsProxy, renderExtensionAddon, basePath = '/', outerRouter = false, tryItOutDefaultServer, useCustomNav, layout, }) => {
@@ -678,7 +686,7 @@ const APIImpl = props => {
678
686
  return (React__namespace.createElement(elementalCore.InlineRefResolverProvider, { document: parsedDocument, maxRefDepth: maxRefDepth },
679
687
  layout === 'stacked' && (React__namespace.createElement(APIWithStackedLayout, { serviceNode: serviceNode, hideTryIt: hideTryIt, hideSamples: hideSamples, hideTryItPanel: hideTryItPanel, hideSecurityInfo: hideSecurityInfo, hideServerInfo: hideServerInfo, hideExport: hideExport, hideInlineExamples: hideInlineExamples, exportProps: exportProps, tryItCredentialsPolicy: tryItCredentialsPolicy, tryItCorsProxy: tryItCorsProxy, renderExtensionAddon: renderExtensionAddon, location: location, tryItOutDefaultServer: tryItOutDefaultServer })),
680
688
  layout === 'sidebar' && (React__namespace.createElement(APIWithSidebarLayout, { logo: logo, serviceNode: serviceNode, hideTryItPanel: hideTryItPanel, hideTryIt: hideTryIt, hideSamples: hideSamples, hideSecurityInfo: hideSecurityInfo, hideServerInfo: hideServerInfo, hideSchemas: hideSchemas, hideInternal: hideInternal, hideExport: hideExport, hideInlineExamples: hideInlineExamples, exportProps: exportProps, tryItCredentialsPolicy: tryItCredentialsPolicy, tryItCorsProxy: tryItCorsProxy, renderExtensionAddon: renderExtensionAddon, basePath: basePath, outerRouter: outerRouter, tryItOutDefaultServer: tryItOutDefaultServer, useCustomNav: useCustomNav, layout: layout })),
681
- layout === 'responsive' && (React__namespace.createElement(APIWithResponsiveSidebarLayout, { logo: logo, serviceNode: serviceNode, hideTryItPanel: hideTryItPanel, hideTryIt: hideTryIt, hideSamples: hideSamples, hideSecurityInfo: hideSecurityInfo, hideServerInfo: hideServerInfo, hideSchemas: hideSchemas, hideInternal: hideInternal, hideExport: hideExport, exportProps: exportProps, tryItCredentialsPolicy: tryItCredentialsPolicy, tryItCorsProxy: tryItCorsProxy, renderExtensionAddon: renderExtensionAddon, compact: isResponsiveLayoutEnabled, basePath: basePath, outerRouter: outerRouter }))));
689
+ layout === 'responsive' && (React__namespace.createElement(APIWithResponsiveSidebarLayout, { logo: logo, serviceNode: serviceNode, hideTryItPanel: hideTryItPanel, hideTryIt: hideTryIt, hideSamples: hideSamples, hideSecurityInfo: hideSecurityInfo, hideServerInfo: hideServerInfo, hideSchemas: hideSchemas, hideInternal: hideInternal, hideExport: hideExport, hideInlineExamples: hideInlineExamples, exportProps: exportProps, tryItCredentialsPolicy: tryItCredentialsPolicy, tryItCorsProxy: tryItCorsProxy, renderExtensionAddon: renderExtensionAddon, compact: isResponsiveLayoutEnabled, basePath: basePath, outerRouter: outerRouter, tryItOutDefaultServer: tryItOutDefaultServer, useCustomNav: useCustomNav }))));
682
690
  };
683
691
  const API = flow(elementalCore.withRouter, elementalCore.withStyles, elementalCore.withPersistenceBoundary, elementalCore.withMosaicProvider, elementalCore.withQueryClientProvider)(APIImpl);
684
692
 
package/index.mjs CHANGED
@@ -265,7 +265,7 @@ const Item = React.memo(({ item }) => {
265
265
  React.createElement(Tab, null, "TryIt")),
266
266
  React.createElement(TabPanels, null,
267
267
  React.createElement(TabPanel, null,
268
- React.createElement(ParsedDocs, { className: "sl-px-4", node: item, location: location, layoutOptions: { noHeading: true, hideTryItPanel: false, hideSamples, hideTryIt } })),
268
+ React.createElement(ParsedDocs, { className: "sl-px-4", node: item, location: location, layoutOptions: { noHeading: true, hideTryItPanel: false, hideSamples, hideTryIt, hideInlineExamples: hideInlineExamples }, tryItOutDefaultServer: tryItOutDefaultServer })),
269
269
  React.createElement(TabPanel, null,
270
270
  React.createElement(TryItWithRequestSamples, { httpOperation: item.data, hideInlineExamples: hideInlineExamples, tryItCredentialsPolicy: tryItCredentialsPolicy, tryItOutDefaultServer: tryItOutDefaultServer, corsProxy: corsProxy, hideSamples: hideSamples, hideTryIt: hideTryIt }))))))));
271
271
  });
@@ -277,14 +277,21 @@ const Collapse = ({ isOpen, children }) => {
277
277
  };
278
278
  Collapse.displayName = 'Collapse';
279
279
 
280
- const APIWithResponsiveSidebarLayout = ({ serviceNode, logo, hideTryItPanel, hideTryIt, hideSamples, compact, hideSchemas, hideInternal, hideExport, hideServerInfo, hideSecurityInfo, exportProps, tryItCredentialsPolicy, tryItCorsProxy, renderExtensionAddon, basePath = '/', outerRouter = false, }) => {
280
+ const APIWithResponsiveSidebarLayout = ({ serviceNode, logo, hideTryItPanel, hideTryIt, hideSamples, compact, hideSchemas, hideInternal, hideExport, hideInlineExamples = false, hideServerInfo, hideSecurityInfo, exportProps, tryItCredentialsPolicy, tryItCorsProxy, renderExtensionAddon, basePath = '/', outerRouter = false, tryItOutDefaultServer, useCustomNav }) => {
281
281
  const container = React.useRef(null);
282
- const tree = React.useMemo(() => computeAPITree(serviceNode, { hideSchemas, hideInternal }), [serviceNode, hideSchemas, hideInternal]);
282
+ const tree = React.useMemo(() => {
283
+ if (!useCustomNav)
284
+ return computeAPITree(serviceNode, { hideSchemas, hideInternal });
285
+ else
286
+ return [];
287
+ }, [serviceNode, hideSchemas, hideInternal, useCustomNav]);
283
288
  const location = useLocation();
284
289
  const { pathname: currentPath } = location;
285
290
  const relativePath = resolveRelativePath(currentPath, basePath, outerRouter);
286
291
  const isRootPath = relativePath === '/';
287
292
  const node = isRootPath ? serviceNode : serviceNode.children.find(child => child.uri === relativePath);
293
+ React.useEffect(() => {
294
+ }, [currentPath]);
288
295
  const layoutOptions = React.useMemo(() => ({
289
296
  hideTryIt: hideTryIt,
290
297
  hideTryItPanel,
@@ -293,7 +300,8 @@ const APIWithResponsiveSidebarLayout = ({ serviceNode, logo, hideTryItPanel, hid
293
300
  hideServerInfo: hideServerInfo,
294
301
  compact: compact,
295
302
  hideExport: hideExport || (node === null || node === void 0 ? void 0 : node.type) !== NodeType.HttpService,
296
- }), [hideTryIt, hideSecurityInfo, hideServerInfo, compact, hideExport, hideTryItPanel, hideSamples, node === null || node === void 0 ? void 0 : node.type]);
303
+ hideInlineExamples
304
+ }), [hideTryIt, hideSecurityInfo, hideServerInfo, compact, hideExport, hideTryItPanel, hideSamples, node === null || node === void 0 ? void 0 : node.type, hideInlineExamples]);
297
305
  if (!node) {
298
306
  const firstSlug = findFirstNodeSlug(tree);
299
307
  if (firstSlug) {
@@ -308,8 +316,8 @@ const APIWithResponsiveSidebarLayout = ({ serviceNode, logo, hideTryItPanel, hid
308
316
  container.current.scrollIntoView();
309
317
  }
310
318
  };
311
- return (React.createElement(ResponsiveSidebarLayout, { onTocClick: handleTocClick, tree: tree, logo: logo !== null && logo !== void 0 ? logo : serviceNode.data.logo, ref: container, name: serviceNode.name }, node && (React.createElement(ElementsOptionsProvider, { renderExtensionAddon: renderExtensionAddon },
312
- React.createElement(ParsedDocs, { key: relativePath, uri: relativePath, node: node, nodeTitle: node.name, layoutOptions: layoutOptions, location: location, exportProps: exportProps, tryItCredentialsPolicy: tryItCredentialsPolicy, tryItCorsProxy: tryItCorsProxy, renderExtensionAddon: renderExtensionAddon })))));
319
+ return (React.createElement(ResponsiveSidebarLayout, { onTocClick: handleTocClick, tree: tree, logo: logo !== null && logo !== void 0 ? logo : serviceNode.data.logo, ref: container, name: serviceNode.name, renderSideBar: !useCustomNav }, node && (React.createElement(ElementsOptionsProvider, { renderExtensionAddon: renderExtensionAddon },
320
+ React.createElement(ParsedDocs, { key: relativePath, uri: relativePath, node: node, nodeTitle: node.name, layoutOptions: layoutOptions, location: location, exportProps: exportProps, tryItCredentialsPolicy: tryItCredentialsPolicy, tryItCorsProxy: tryItCorsProxy, renderExtensionAddon: renderExtensionAddon, tryItOutDefaultServer: tryItOutDefaultServer })))));
313
321
  };
314
322
 
315
323
  const APIWithSidebarLayout = ({ serviceNode, logo, hideTryItPanel, hideTryIt, hideSamples, hideSchemas, hideSecurityInfo, hideServerInfo, hideInternal, hideExport, hideInlineExamples = false, exportProps, tryItCredentialsPolicy, tryItCorsProxy, renderExtensionAddon, basePath = '/', outerRouter = false, tryItOutDefaultServer, useCustomNav, layout, }) => {
@@ -657,7 +665,7 @@ const APIImpl = props => {
657
665
  return (React.createElement(InlineRefResolverProvider, { document: parsedDocument, maxRefDepth: maxRefDepth },
658
666
  layout === 'stacked' && (React.createElement(APIWithStackedLayout, { serviceNode: serviceNode, hideTryIt: hideTryIt, hideSamples: hideSamples, hideTryItPanel: hideTryItPanel, hideSecurityInfo: hideSecurityInfo, hideServerInfo: hideServerInfo, hideExport: hideExport, hideInlineExamples: hideInlineExamples, exportProps: exportProps, tryItCredentialsPolicy: tryItCredentialsPolicy, tryItCorsProxy: tryItCorsProxy, renderExtensionAddon: renderExtensionAddon, location: location, tryItOutDefaultServer: tryItOutDefaultServer })),
659
667
  layout === 'sidebar' && (React.createElement(APIWithSidebarLayout, { logo: logo, serviceNode: serviceNode, hideTryItPanel: hideTryItPanel, hideTryIt: hideTryIt, hideSamples: hideSamples, hideSecurityInfo: hideSecurityInfo, hideServerInfo: hideServerInfo, hideSchemas: hideSchemas, hideInternal: hideInternal, hideExport: hideExport, hideInlineExamples: hideInlineExamples, exportProps: exportProps, tryItCredentialsPolicy: tryItCredentialsPolicy, tryItCorsProxy: tryItCorsProxy, renderExtensionAddon: renderExtensionAddon, basePath: basePath, outerRouter: outerRouter, tryItOutDefaultServer: tryItOutDefaultServer, useCustomNav: useCustomNav, layout: layout })),
660
- layout === 'responsive' && (React.createElement(APIWithResponsiveSidebarLayout, { logo: logo, serviceNode: serviceNode, hideTryItPanel: hideTryItPanel, hideTryIt: hideTryIt, hideSamples: hideSamples, hideSecurityInfo: hideSecurityInfo, hideServerInfo: hideServerInfo, hideSchemas: hideSchemas, hideInternal: hideInternal, hideExport: hideExport, exportProps: exportProps, tryItCredentialsPolicy: tryItCredentialsPolicy, tryItCorsProxy: tryItCorsProxy, renderExtensionAddon: renderExtensionAddon, compact: isResponsiveLayoutEnabled, basePath: basePath, outerRouter: outerRouter }))));
668
+ layout === 'responsive' && (React.createElement(APIWithResponsiveSidebarLayout, { logo: logo, serviceNode: serviceNode, hideTryItPanel: hideTryItPanel, hideTryIt: hideTryIt, hideSamples: hideSamples, hideSecurityInfo: hideSecurityInfo, hideServerInfo: hideServerInfo, hideSchemas: hideSchemas, hideInternal: hideInternal, hideExport: hideExport, hideInlineExamples: hideInlineExamples, exportProps: exportProps, tryItCredentialsPolicy: tryItCredentialsPolicy, tryItCorsProxy: tryItCorsProxy, renderExtensionAddon: renderExtensionAddon, compact: isResponsiveLayoutEnabled, basePath: basePath, outerRouter: outerRouter, tryItOutDefaultServer: tryItOutDefaultServer, useCustomNav: useCustomNav }))));
661
669
  };
662
670
  const API = flow(withRouter, withStyles, withPersistenceBoundary, withMosaicProvider, withQueryClientProvider)(APIImpl);
663
671
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jpmorganchase/elemental",
3
- "version": "7.1.1",
3
+ "version": "8.0.1",
4
4
  "description": "UI components for composing beautiful developer documentation.",
5
5
  "keywords": [],
6
6
  "main": "./index.js",
@@ -26,7 +26,7 @@
26
26
  "react-dom": ">=16.8"
27
27
  },
28
28
  "dependencies": {
29
- "@jpmorganchase/elemental-core": "^1.18.1",
29
+ "@jpmorganchase/elemental-core": "^1.19.1",
30
30
  "@stoplight/http-spec": "^7.1.0",
31
31
  "@stoplight/json": "^3.18.1",
32
32
  "@stoplight/mosaic": "^1.53.4",