UNPKG

@redocly/graphql-docs

Version:

Redocly GraphQL docs

2 lines (1 loc) 1.31 kB
var R=Object.create;var a=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var v=Object.getOwnPropertyNames;var T=Object.getPrototypeOf,g=Object.prototype.hasOwnProperty;var h=(t,m)=>{for(var e in m)a(t,e,{get:m[e],enumerable:!0})},f=(t,m,e,o)=>{if(m&&typeof m=="object"||typeof m=="function")for(let r of v(m))!g.call(t,r)&&r!==e&&a(t,r,{get:()=>m[r],enumerable:!(o=c(m,r))||o.enumerable});return t};var E=(t,m,e)=>(e=t!=null?R(T(t)):{},f(m||!t||!t.__esModule?a(e,"default",{value:t,enumerable:!0}):e,t)),N=t=>f(a({},"__esModule",{value:!0}),t);var x={};h(x,{renderIndividualSections:()=>w});module.exports=N(x);var i=E(require("react")),n=require("react-router-dom"),u=require("../../settings"),O=require("../constants"),d=require("./pagination-section"),p=require("./pagination-item"),I=require("./join");function w(t,{hidePaginationButtons:m,parentPath:e=O.ROOT_PATH}={}){return i.default.createElement(i.default.Fragment,null,m?t.map(o=>(0,p.toItemRoute)(o,e)):t.map((o,r,l)=>(0,p.withPaginationItem)(o,r,l,u.ROOT_LOCATION,"section")).map((o,r,l)=>(0,d.withNextSectionFirstItem)(o,r,l)).map(o=>(0,p.toItemRoute)(o,e)),i.default.createElement(n.Route,{path:"*",element:i.default.createElement(n.Navigate,{to:(0,I.joinPath)(e,t?.[0].props.path)})}))}0&&(module.exports={renderIndividualSections});