@techdocs/cli 0.0.0-nightly-20221022025638 → 0.0.0-nightly-20221023025938
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/CHANGELOG.md +5 -5
- package/dist/embedded-app/index.html +1 -1
- package/dist/embedded-app/static/{main.a4e9ad35.js → main.901521aa.js} +1 -1
- package/dist/embedded-app/static/{main.a4e9ad35.js.map → main.901521aa.js.map} +1 -1
- package/dist/embedded-app/static/{runtime.a4e9ad35.js → runtime.901521aa.js} +1 -1
- package/dist/embedded-app/static/{runtime.a4e9ad35.js.map → runtime.901521aa.js.map} +1 -1
- package/dist/embedded-app/static/{vendor.a4e9ad35.js → vendor.901521aa.js} +1 -1
- package/dist/embedded-app/static/{vendor.a4e9ad35.js.map → vendor.901521aa.js.map} +1 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
# @techdocs/cli
|
|
2
2
|
|
|
3
|
-
## 0.0.0-nightly-
|
|
3
|
+
## 0.0.0-nightly-20221023025938
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
7
|
- Updated dependencies
|
|
8
|
-
- @backstage/backend-common@0.0.0-nightly-
|
|
9
|
-
- @backstage/plugin-techdocs-node@0.0.0-nightly-
|
|
10
|
-
- @backstage/catalog-model@0.0.0-nightly-
|
|
8
|
+
- @backstage/backend-common@0.0.0-nightly-20221023025938
|
|
9
|
+
- @backstage/plugin-techdocs-node@0.0.0-nightly-20221023025938
|
|
10
|
+
- @backstage/catalog-model@0.0.0-nightly-20221023025938
|
|
11
11
|
- @backstage/cli-common@0.1.10
|
|
12
|
-
- @backstage/config@0.0.0-nightly-
|
|
12
|
+
- @backstage/config@0.0.0-nightly-20221023025938
|
|
13
13
|
|
|
14
14
|
## 1.2.2
|
|
15
15
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Backstage is an open platform for building developer portals"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json" crossorigin="use-credentials"/><link rel="icon" href="/favicon.ico"/><link rel="shortcut icon" href="/favicon.ico"/><link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"/><link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"/><link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"/><link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5"/><title>Techdocs Preview App</title><script defer="defer" src="/static/runtime.
|
|
1
|
+
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Backstage is an open platform for building developer portals"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json" crossorigin="use-credentials"/><link rel="icon" href="/favicon.ico"/><link rel="shortcut icon" href="/favicon.ico"/><link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"/><link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"/><link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"/><link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5"/><title>Techdocs Preview App</title><script defer="defer" src="/static/runtime.901521aa.js"></script><script defer="defer" src="/static/module-material-ui.e3edf608.js"></script><script defer="defer" src="/static/module-lodash.0cada415.js"></script><script defer="defer" src="/static/module-date-fns.d70f4cc3.js"></script><script defer="defer" src="/static/module-yaml.b5c4d531.js"></script><script defer="defer" src="/static/module-ajv.fca02de5.js"></script><script defer="defer" src="/static/module-material-table.5d56e1cb.js"></script><script defer="defer" src="/static/module-luxon.f67513b2.js"></script><script defer="defer" src="/static/module-octokit.9fb0d235.js"></script><script defer="defer" src="/static/module-react-dom.5abdac04.js"></script><script defer="defer" src="/static/module-zod.49ffd80f.js"></script><script defer="defer" src="/static/module-react-beautiful-dnd.97cccd01.js"></script><script defer="defer" src="/static/vendor.901521aa.js"></script><script defer="defer" src="/static/main.901521aa.js"></script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|
|
@@ -489,4 +489,4 @@ ${se.href}
|
|
|
489
489
|
|
|
490
490
|
Feedback:`),yt=(Ie==null?void 0:Ie.type)==="github"?(0,ln.BT)(xe.href,"blob"):xe.href,nt=Wt()(yt),ht=`/${nt.organization}/${nt.name}`,xt=se.cloneNode();switch(Ie==null?void 0:Ie.type){case"gitlab":xt.href=`${xe.origin}${ht}/issues/new?issue[title]=${it}&issue[description]=${jt}`;break;case"github":xt.href=`${xe.origin}${ht}/issues/new?title=${it}&body=${jt}`;break;default:return H}return pn.render(n.createElement(Ln.Z),xt),xt.style.paddingLeft="5px",xt.title="Leave feedback for this page",xt.id="git-feedback-link",se==null||se.insertAdjacentElement("beforebegin",xt),H};var kn=t(44882);const Ht=()=>S=>{const H=S.querySelector('.md-header label[for="__drawer"]'),ue=S.querySelector("article");if(!H||!ue)return S;const se=H.cloneNode();return pn.render(n.createElement(kn.Z),se),se.id="toggle-sidebar",se.title="Toggle Sidebar",se.classList.add("md-content__button"),se.style.setProperty("padding","0 0 0 5px"),se.style.setProperty("margin","0.4rem 0 0.4rem 0.4rem"),ue==null||ue.prepend(se),S},fn=()=>S=>(((ue,se)=>{Array.from(ue).filter(xe=>xe.hasAttribute(se)).forEach(xe=>{const Ie=xe.getAttribute(se);if(Ie){Ie.match(/^https?:\/\//i)&&xe.setAttribute("target","_blank");try{const De=cn(window.location.href);xe.setAttribute(se,new URL(Ie,De).toString())}catch{xe.replaceWith(xe.textContent||Ie)}}})})(Array.from(S.getElementsByTagName("a")),"href"),S);function cn(S){const H=new URL(S);return!H.pathname.endsWith("/")&&!H.pathname.endsWith(".html")&&(H.pathname+="/"),H.toString()}const jn=({baseUrl:S,onClick:H})=>ue=>(Array.from(ue.getElementsByTagName("a")).forEach(se=>{se.addEventListener("click",xe=>{const De=se.getAttribute("href");!De||De.startsWith(S)&&!se.hasAttribute("download")&&(xe.preventDefault(),H(xe,De))})}),ue);var On=t(15459),bn=t(80030),ge=t(72379),ee=t(41547);const Ee=(0,On.Z)(S=>({tooltip:{fontSize:"inherit",color:S.palette.text.primary,margin:0,padding:S.spacing(.5),backgroundColor:"transparent",boxShadow:"none"}}))(bn.ZP),Fe=()=>(0,h.jsx)(ge.Z,{children:(0,h.jsx)("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"})}),qe=({text:S})=>{const[H,ue]=(0,n.useState)(!1),se=(0,n.useCallback)(()=>{navigator.clipboard.writeText(S),ue(!0)},[S]),xe=(0,n.useCallback)(()=>{ue(!1)},[ue]);return(0,h.jsx)(Ee,{title:"Copied to clipboard",placement:"left",open:H,onClose:xe,leaveDelay:1e3,children:(0,h.jsx)("button",{className:"md-clipboard md-icon",onClick:se,children:(0,h.jsx)(Fe,{})})})},vt=S=>H=>{const ue=H.querySelectorAll("pre > code");for(const xe of ue){var se;const Ie=xe.textContent||"",De=document.createElement("div");xe==null||(se=xe.parentElement)===null||se===void 0||se.prepend(De),pn.render((0,h.jsx)(ee.Z,{theme:S,children:(0,h.jsx)(qe,{text:Ie})}),De)}return H},ie=()=>S=>{var H;return(H=S.querySelector(".md-header"))===null||H===void 0||H.remove(),S},I=()=>S=>{var H,ue;return(H=S.querySelector(".md-footer .md-copyright"))===null||H===void 0||H.remove(),(ue=S.querySelector(".md-footer-copyright"))===null||ue===void 0||ue.remove(),S},Y=({onLoading:S,onLoaded:H})=>ue=>(S(),ue.addEventListener(V.Ox,function se(){H(),ue.removeEventListener(V.Ox,se)}),ue),We=()=>S=>(setTimeout(()=>{if(window.location.hash){var H;const ue=window.location.hash.slice(1);(H=S==null?void 0:S.querySelector(`[id="${ue}"]`))===null||H===void 0||H.scrollIntoView()}},200),S),U=()=>S=>(setTimeout(()=>{const H=S==null?void 0:S.querySelectorAll("li.md-nav__item--active");H.length!==0&&(H.forEach(se=>{const xe=se==null?void 0:se.querySelector("input");xe!=null&&xe.checked||xe==null||xe.click()}),H[H.length-1].scrollIntoView())},200),S),Z=async(S,H)=>{let ue;if(typeof S=="string")ue=new DOMParser().parseFromString(S,"text/html").documentElement;else if(S instanceof Element)ue=S;else throw new Error("dom is not a recognized type");for(const se of H)ue=await se(ue);return ue},pe="screen and (max-width: 76.1875em)",ve=S=>{const H=(0,Ke.s0)(),ue=(0,Me.Z)(),se=(0,je.Z)(pe),xe=Pe(),Ie=hn(),De=(0,B.h_)(V.Dl),it=(0,B.h_)(_e.q3),{state:jt,path:yt,content:nt}=(0,T.DK)(),[ht,xt]=(0,n.useState)(null),Et=(0,V.ux)(ht),It=(0,n.useCallback)(()=>{if(!ht)return;ht.querySelectorAll(".md-sidebar").forEach(Dt=>{if(se)Dt.style.top="0px";else{const mn=document==null?void 0:document.querySelector(".techdocs-reader-page");var nn;const w=(nn=mn==null?void 0:mn.getBoundingClientRect().top)!==null&&nn!==void 0?nn:0;var gn;let u=(gn=ht.getBoundingClientRect().top)!==null&&gn!==void 0?gn:0;const b=ht.querySelector(".md-container > .md-tabs");var rn;const E=(rn=b==null?void 0:b.getBoundingClientRect().height)!==null&&rn!==void 0?rn:0;u<w&&(u=w),Dt.style.top=`${Math.max(u,0)+E}px`}Dt.style.setProperty("opacity","1")})},[ht,se]);(0,n.useEffect)(()=>(window.addEventListener("resize",It),window.addEventListener("scroll",It,!0),()=>{window.removeEventListener("resize",It),window.removeEventListener("scroll",It,!0)}),[ht,It]);const Ft=(0,n.useCallback)(()=>{if(!ht)return;const Gt=ht.querySelector(".md-footer");Gt&&(Gt.style.width=`${ht.getBoundingClientRect().width}px`)},[ht]);(0,n.useEffect)(()=>(window.addEventListener("resize",Ft),()=>{window.removeEventListener("resize",Ft)}),[ht,Ft]),(0,n.useEffect)(()=>{Et||(Ft(),It())},[jt,Et,Ft,It]);const Hn=(0,n.useCallback)((Gt,Dt)=>Z(Gt,[xe,Pn({techdocsStorageApi:De,entityId:S,path:Dt}),fn(),Ht(),ie(),I(),wn(it),Ie]),[S,it,De,xe,Ie]),Un=(0,n.useCallback)(async Gt=>Z(Gt,[We(),U(),vt(ue),jn({baseUrl:window.location.origin,onClick:(Dt,nn)=>{const gn=Dt.ctrlKey||Dt.metaKey,rn=new URL(nn),mn=`${rn.pathname}${rn.search}${rn.hash}`;if(rn.hash)if(gn)window.open(mn,"_blank");else{var w;H(mn),(w=Gt==null?void 0:Gt.querySelector(`[id="${rn.hash.slice(1)}"]`))===null||w===void 0||w.scrollIntoView()}else gn?window.open(mn,"_blank"):H(mn)}}),Y({onLoading:()=>{},onLoaded:()=>{var Dt;(Dt=Gt.querySelector(".md-nav__title"))===null||Dt===void 0||Dt.removeAttribute("for")}}),Y({onLoading:()=>{Array.from(Gt.querySelectorAll(".md-sidebar")).forEach(nn=>{nn.style.setProperty("opacity","0")})},onLoaded:()=>{}})]),[ue,H]);return(0,n.useEffect)(()=>{if(!nt)return()=>{};let Gt=!0;return Hn(nt,yt).then(async Dt=>{if(!(Dt!=null&&Dt.innerHTML)||!Gt)return;window.scroll({top:0});const nn=await Un(Dt);xt(nn)}),()=>{Gt=!1}},[nt,yt,Hn,Un]),ht};var Se=t(8560);const Ze=()=>{const S=(0,V.$L)(),{shadowRoot:H}=(0,V.x1)(),ue=H==null?void 0:H.querySelector('[data-md-component="content"]'),se=H==null?void 0:H.querySelector('div[data-md-component="sidebar"][data-md-type="navigation"], div[data-md-component="navigation"]');let xe=se==null?void 0:se.querySelector('[data-techdocs-addons-location="primary sidebar"]');xe||(xe=document.createElement("div"),xe.setAttribute("data-techdocs-addons-location","primary sidebar"),se==null||se.prepend(xe));const Ie=H==null?void 0:H.querySelector('div[data-md-component="sidebar"][data-md-type="toc"], div[data-md-component="toc"]');let De=Ie==null?void 0:Ie.querySelector('[data-techdocs-addons-location="secondary sidebar"]');return De||(De=document.createElement("div"),De.setAttribute("data-techdocs-addons-location","secondary sidebar"),Ie==null||Ie.prepend(De)),(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(Se.Z,{container:xe,children:S.renderComponentsByLocation(V.oZ.PrimarySidebar)}),(0,h.jsx)(Se.Z,{container:ue,children:S.renderComponentsByLocation(V.oZ.Content)}),(0,h.jsx)(Se.Z,{container:De,children:S.renderComponentsByLocation(V.oZ.SecondarySidebar)})]})},Be=(0,g.Z)({search:{width:"100%","@media (min-width: 76.1875em)":{width:"calc(100% - 34.4rem)",margin:"0 auto"}}}),He=(0,T.m1)(S=>{var H;const{withSearch:ue=!0,onReady:se}=S,xe=Be(),{entityMetadata:{value:Ie,loading:De},entityRef:it,setShadowRoot:jt}=(0,V.x1)(),yt=ve(it),nt=(0,n.useCallback)(ht=>{jt(ht),se instanceof Function&&se()},[jt,se]);return De===!1&&!Ie?(0,h.jsx)(x.mf,{status:"404",statusMessage:"PAGE NOT FOUND"}):yt?(0,h.jsx)(x.VY,{children:(0,h.jsxs)(L.Z,{container:!0,children:[(0,h.jsx)(L.Z,{xs:12,item:!0,children:(0,h.jsx)(Te,{})}),ue&&(0,h.jsx)(L.Z,{className:xe.search,xs:"auto",item:!0,children:(0,h.jsx)(l.S,{entityId:it,entityTitle:Ie==null||(H=Ie.metadata)===null||H===void 0?void 0:H.title})}),(0,h.jsx)(L.Z,{xs:12,item:!0,children:(0,h.jsx)(V.VA,{element:yt,onAppend:nt,children:(0,h.jsx)(Ze,{})})})]})}):(0,h.jsx)(x.VY,{children:(0,h.jsx)(L.Z,{container:!0,children:(0,h.jsx)(L.Z,{xs:12,item:!0,children:(0,h.jsx)(Te,{})})})})}),tt=null},93225:function(wt,Ue,t){"use strict";t.d(Ue,{S:function(){return Q}});var h=t(52322),n=t(2784),g=t(18671),L=t(98069),V=t(73250),x=t(61886),l=t(43297),k=t(25271),te=t(93414),X=t(25248),_=t(95573);const F=(0,h.jsx)(L.Z,{animation:"wave",variant:"text",height:40}),Q=J=>{const{children:he}=J,de=(0,x.$L)(),A=(0,X.h_)(X.Ds),{title:R,setTitle:B,subtitle:j,setSubtitle:T,entityRef:ne,metadata:{value:Te,loading:Ke},entityMetadata:{value:Me,loading:je}}=(0,x.x1)();(0,n.useEffect)(()=>{!Te||(B(Te.site_name),T(()=>{let{site_description:dt}=Te;return(!dt||dt==="None")&&(dt="Home"),dt}))},[Te,B,T]);const _e=A.getOptional("app.title")||"Backstage",ft=[R,j,_e].filter(Boolean).join(" | "),{locationMetadata:$e,spec:Re}=Me||{},rt=Re==null?void 0:Re.lifecycle,at=Me?(0,l.hF)(Me,k.S4):[],st=(0,X.tg)(_._Z)(),ct=(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(te.i9,{label:"Component",value:(0,h.jsx)(l.dx,{color:"inherit",entityRef:ne,title:Me==null?void 0:Me.metadata.title,defaultKind:"Component"})}),at.length>0&&(0,h.jsx)(te.i9,{label:"Owner",value:(0,h.jsx)(l.rI,{color:"inherit",entityRefs:at,defaultKind:"group"})}),rt?(0,h.jsx)(te.i9,{label:"Lifecycle",value:rt}):null,$e&&$e.type!=="dir"&&$e.type!=="file"?(0,h.jsx)(te.i9,{label:"",value:(0,h.jsx)("a",{href:$e.target,target:"_blank",rel:"noopener noreferrer",children:(0,h.jsx)(V.Z,{style:{marginTop:"-25px",fill:"#fff"}})})}):null]});return!je&&Me===void 0||!Ke&&Te===void 0?null:(0,h.jsxs)(te.h4,{type:"Documentation",typeLink:st,title:R||F,subtitle:j||F,children:[(0,h.jsx)(g.Z,{titleTemplate:"%s",children:(0,h.jsx)("title",{children:ft})}),ct,he,de.renderComponentsByLocation(x.oZ.Header)]})}},65124:function(wt,Ue,t){"use strict";t.d(Ue,{b:function(){return F}});var h=t(52322),n=t(2784),g=t(79692),L=t(15223),V=t(95544),x=t(80030),l=t(61837),k=t(48348),te=t(47603),X=t(61886);const _=(0,g.Z)(Q=>({root:{gridArea:"pageSubheader",flexDirection:"column",minHeight:"auto",padding:Q.spacing(3,3,0)}})),F=Q=>{const J=_(),[he,de]=(0,n.useState)(null),A=(0,n.useCallback)(Ke=>{de(Ke.currentTarget)},[]),R=(0,n.useCallback)(()=>{de(null)},[]),{entityMetadata:{value:B,loading:j}}=(0,X.x1)(),T=(0,X.$L)(),ne=T.renderComponentsByLocation(X.oZ.Subheader),Te=T.renderComponentsByLocation(X.oZ.Settings);return!ne&&!Te||j===!1&&!B?null:(0,h.jsx)(L.Z,{classes:J,...Q.toolbarProps,children:(0,h.jsxs)(V.Z,{display:"flex",justifyContent:"flex-end",width:"100%",flexWrap:"wrap",children:[ne,Te?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(x.ZP,{title:"Settings",children:(0,h.jsx)(l.Z,{"aria-controls":"tech-docs-reader-page-settings","aria-haspopup":"true",onClick:A,children:(0,h.jsx)(te.Z,{})})}),(0,h.jsx)(k.Z,{id:"tech-docs-reader-page-settings",getContentAnchorEl:null,anchorEl:he,anchorOrigin:{vertical:"bottom",horizontal:"right"},open:Boolean(he),onClose:R,keepMounted:!0,children:Te})]}):null]})})}},95481:function(wt,Ue,t){"use strict";t.d(Ue,{DK:function(){return F},m1:function(){return J}});var h=t(52322),n=t(2784),g=t(10289),L=t(61886),V=t(25248),x=t(64279),l=t(77446);function k({contentLoading:he,content:de,activeSyncState:A}){return he||A==="BUILD_READY_RELOAD"||!de&&A==="CHECKING"?"CHECKING":!de&&A==="BUILDING"?"INITIAL_BUILD":de?A==="BUILDING"?"CONTENT_STALE_REFRESHING":A==="BUILD_READY"?"CONTENT_STALE_READY":A==="ERROR"?"CONTENT_STALE_ERROR":"CONTENT_FRESH":"CONTENT_NOT_FOUND"}function te(he,de){const A={...he};switch(de.type){case"sync":de.state==="CHECKING"&&(A.buildLog=[]),A.activeSyncState=de.state,A.syncError=de.syncError;break;case"contentLoading":A.contentLoading=!0,A.contentError=void 0;break;case"content":typeof de.path=="string"&&(A.path=de.path),A.contentLoading=!1,A.content=de.content,A.contentError=de.contentError;break;case"buildLog":A.buildLog=A.buildLog.concat(de.log);break;default:throw new Error}return["BUILD_READY","BUILD_READY_RELOAD"].includes(A.activeSyncState)&&["contentLoading","content"].includes(de.type)&&(A.activeSyncState="UP_TO_DATE",A.buildLog=[]),A}function X(he,de,A,R){var B,j;const[T,ne]=(0,n.useReducer)(te,{activeSyncState:"CHECKING",path:R,contentLoading:!0,buildLog:[]}),Te=(0,V.h_)(L.Dl),{retry:Ke}=(0,l.Z)(async()=>{ne({type:"contentLoading"});try{const _e=await Te.getEntityDocs({kind:he,namespace:de,name:A},R);return ne({type:"content",content:_e,path:R}),_e}catch(_e){ne({type:"content",contentError:_e,path:R})}},[Te,he,de,A,R]),Me=(0,n.useRef)({content:void 0,reload:()=>{}});return Me.current={content:T.content,reload:Ke},(0,x.default)(async()=>{ne({type:"sync",state:"CHECKING"});const _e=setTimeout(()=>{ne({type:"sync",state:"BUILDING"})},1e3);try{switch(await Te.syncEntityDocs({kind:he,namespace:de,name:A},$e=>{ne({type:"buildLog",log:$e})})){case"updated":Me.current.content?ne({type:"sync",state:"BUILD_READY"}):(Me.current.reload(),ne({type:"sync",state:"BUILD_READY_RELOAD"}));break;case"cached":ne({type:"sync",state:"UP_TO_DATE"});break;default:ne({type:"sync",state:"ERROR",syncError:new Error("Unexpected return state")});break}}catch(ft){ne({type:"sync",state:"ERROR",syncError:ft})}finally{clearTimeout(_e)}},[he,A,de,Te,ne,Me]),{state:(0,n.useMemo)(()=>k({activeSyncState:T.activeSyncState,contentLoading:T.contentLoading,content:T.content}),[T.activeSyncState,T.content,T.contentLoading]),contentReload:Ke,path:T.path,content:T.content,contentErrorMessage:(B=T.contentError)===null||B===void 0?void 0:B.toString(),syncErrorMessage:(j=T.syncError)===null||j===void 0?void 0:j.toString(),buildLog:T.buildLog}}const _=(0,n.createContext)({}),F=()=>(0,n.useContext)(_),Q=({children:he})=>{const{"*":de=""}=(0,g.UO)(),{entityRef:A}=(0,L.x1)(),{kind:R,namespace:B,name:j}=A,T=X(R,B,j,de);return(0,h.jsx)(_.Provider,{value:T,children:he instanceof Function?he(T):he})},J=he=>de=>(0,h.jsx)(Q,{children:(0,h.jsx)(he,{...de})})},95573:function(wt,Ue,t){"use strict";t.d(Ue,{Fw:function(){return g},_Z:function(){return n},pd:function(){return L}});var h=t(25248);const n=(0,h.NT)({id:"techdocs:index-page"}),g=(0,h.NT)({id:"techdocs:reader-page",params:["namespace","kind","name"]}),L=(0,h.NT)({id:"techdocs:catalog-reader-view"})},17339:function(wt,Ue,t){"use strict";t.d(Ue,{S:function(){return R}});var h=t(52322),n=t(2784),g=t(79692),L=t(49378),V=t(38402),x=t(86136),l=t(85256),k=t(93414),te=t(25248),X=t(65826);const _=(0,g.Z)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",marginBottom:"1rem"}}),F=B=>{const{result:j,highlight:T,rank:ne,lineClamp:Te=5,asListItem:Ke=!0,asLink:Me=!0,title:je,icon:_e}=B,ft=_(),$e=(0,te.z$)(),Re=()=>{$e.captureEvent("discover",j.title,{attributes:{to:j.location},value:ne})},rt=()=>{const ct=T!=null&&T.fields.title?(0,h.jsx)(X.FA,{text:T.fields.title,preTag:T.preTag,postTag:T.postTag}):j.title,lt=T!=null&&T.fields.entityTitle?(0,h.jsx)(X.FA,{text:T.fields.entityTitle,preTag:T.preTag,postTag:T.postTag}):j.entityTitle,gt=T!=null&&T.fields.name?(0,h.jsx)(X.FA,{text:T.fields.name,preTag:T.preTag,postTag:T.postTag}):j.name;return(0,h.jsx)(L.Z,{className:ft.itemText,primaryTypographyProps:{variant:"h6"},primary:je||(0,h.jsxs)(h.Fragment,{children:[ct," | ",lt!=null?lt:gt," docs"]}),secondary:(0,h.jsx)("span",{style:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:Te,overflow:"hidden"},children:T!=null&&T.fields.text?(0,h.jsx)(X.FA,{text:T.fields.text,preTag:T.preTag,postTag:T.postTag}):j.text})})},at=({children:ct})=>Me?(0,h.jsx)(k.rU,{noTrack:!0,to:j.location,onClick:Re,children:ct}):(0,h.jsx)(h.Fragment,{children:ct}),st=({children:ct})=>Ke?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)(V.Z,{alignItems:"flex-start",children:[_e&&(0,h.jsx)(x.Z,{children:_e}),(0,h.jsx)("div",{className:ft.flexContainer,children:ct})]}),(0,h.jsx)(l.Z,{component:"li"})]}):(0,h.jsx)(h.Fragment,{children:ct});return(0,h.jsx)(at,{children:(0,h.jsx)(st,{children:(0,h.jsx)(rt,{})})})};var Q=t(27556),J=t(10289);const he=(0,g.Z)(B=>({root:{width:"100%"},bar:{padding:B.spacing(1)}})),de=B=>B==null?void 0:B.document,A=B=>{const{entityId:j,entityTitle:T,debounceTime:ne=150}=B,[Te,Ke]=(0,n.useState)(!1),Me=(0,J.s0)(),{setFilters:je,result:{loading:_e,value:ft}}=(0,X.Rx)(),$e=he(),[Re,rt]=(0,n.useState)([]);(0,n.useEffect)(()=>{let gt=!0;if(gt&&ft){const dt=ft.results.slice(0,10);rt(dt)}return()=>{gt=!1}},[_e,ft]);const{kind:at,name:st,namespace:ct}=j;(0,n.useEffect)(()=>{je(gt=>({...gt,kind:at,namespace:ct,name:st}))},[at,ct,st,je]);const lt=(gt,dt)=>{if(de(dt)){const{location:Ge}=dt.document;Me(Ge)}};return(0,h.jsx)(Q.Z,{className:$e.bar,variant:"outlined",children:(0,h.jsx)(X.qO,{classes:{root:$e.root},"data-testid":"techdocs-search-bar",size:"small",open:Te,getOptionLabel:()=>"",filterOptions:gt=>gt,onClose:()=>{Ke(!1)},onFocus:()=>{Ke(!0)},onChange:lt,blurOnSelect:!0,noOptionsText:"No results found",value:null,options:Re,renderOption:({document:gt,highlight:dt})=>(0,h.jsx)(F,{result:gt,lineClamp:3,asListItem:!1,asLink:!1,title:gt.title,highlight:dt}),loading:_e,inputDebounceTime:ne,inputPlaceholder:`Search ${T||j.name} docs`,freeSolo:!1})})},R=B=>{const j={term:"",types:["techdocs"],pageCursor:"",filters:B.entityId};return(0,h.jsx)(X.Nd,{initialState:j,children:(0,h.jsx)(A,{...B})})}},53260:function(){}},function(wt){var Ue=function(h){return wt(wt.s=h)};wt.O(0,[2370,6202,9284,9035,2126,7012,2194,1410,427,6816,5218,4736],function(){return Ue(96215)});var t=wt.O()}]);})();
|
|
491
491
|
|
|
492
|
-
//# sourceMappingURL=main.
|
|
492
|
+
//# sourceMappingURL=main.901521aa.js.map
|