@techdocs/cli 0.0.0-nightly-20220407023218 → 0.0.0-nightly-20220408023622
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 +4 -4
- package/dist/embedded-app/index.html +1 -1
- package/dist/embedded-app/static/{main.a260d25c.js → main.15ea64e8.js} +1 -1
- package/dist/embedded-app/static/{main.a260d25c.js.map → main.15ea64e8.js.map} +1 -1
- package/dist/embedded-app/static/{runtime.a260d25c.js → runtime.15ea64e8.js} +1 -1
- package/dist/embedded-app/static/{runtime.a260d25c.js.map → runtime.15ea64e8.js.map} +1 -1
- package/dist/embedded-app/static/vendor.15ea64e8.js +140 -0
- package/dist/embedded-app/static/vendor.15ea64e8.js.map +1 -0
- package/package.json +5 -5
- package/dist/embedded-app/static/vendor.a260d25c.js +0 -140
- package/dist/embedded-app/static/vendor.a260d25c.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @techdocs/cli
|
|
2
2
|
|
|
3
|
-
## 0.0.0-nightly-
|
|
3
|
+
## 0.0.0-nightly-20220408023622
|
|
4
4
|
|
|
5
5
|
### Minor Changes
|
|
6
6
|
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
- 230ad0826f: Bump to using `@types/node` v16
|
|
19
19
|
- eb470ea54c: Adds a new flag to override the entrypoint when using a custom docker image. It could be used to reuse existing images with different entrypoints.
|
|
20
20
|
- Updated dependencies
|
|
21
|
-
- @backstage/catalog-model@0.0.0-nightly-
|
|
22
|
-
- @backstage/backend-common@0.0.0-nightly-
|
|
23
|
-
- @backstage/plugin-techdocs-node@0.0.0-nightly-
|
|
21
|
+
- @backstage/catalog-model@0.0.0-nightly-20220408023622
|
|
22
|
+
- @backstage/backend-common@0.0.0-nightly-20220408023622
|
|
23
|
+
- @backstage/plugin-techdocs-node@0.0.0-nightly-20220408023622
|
|
24
24
|
|
|
25
25
|
## 1.0.1-next.0
|
|
26
26
|
|
|
@@ -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.15ea64e8.js"></script><script defer="defer" src="/static/module-material-ui.a1b91103.js"></script><script defer="defer" src="/static/module-lodash.f158b49a.js"></script><script defer="defer" src="/static/module-date-fns.a08d117e.js"></script><script defer="defer" src="/static/module-ajv.d6f6d109.js"></script><script defer="defer" src="/static/module-material-table.cbad0c40.js"></script><script defer="defer" src="/static/module-yaml.574c3290.js"></script><script defer="defer" src="/static/module-hot-loader.7c7a4226.js"></script><script defer="defer" src="/static/module-react-beautiful-dnd.a9014a2e.js"></script><script defer="defer" src="/static/vendor.15ea64e8.js"></script><script defer="defer" src="/static/main.15ea64e8.js"></script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|
|
@@ -486,4 +486,4 @@ Feedback:`),vt=(Te==null?void 0:Te.type)==="github"?(0,C.Pb)(ie.href,"blob"):ie.
|
|
|
486
486
|
`})]),[Fe,vt,Ee,Te,De,ie,U,j,qe]),ht=(0,r.useCallback)(async st=>Bt(st,[Zt(),rt(U),oe({baseUrl:window.location.origin,onClick:(Ue,N)=>{var H,k;const y=Ue.ctrlKey||Ue.metaKey,x=new URL(N);x.hash?y?window.open(`${x.pathname}${x.hash}`,"_blank"):(J(`${x.pathname}${x.hash}`),(H=st==null?void 0:st.querySelector(`[id='${x.hash.slice(1)}']`))==null||H.scrollIntoView()):y?window.open(x.pathname,"_blank"):(J(x.pathname),(k=st==null?void 0:st.querySelector(".md-content__inner"))==null||k.scrollIntoView())}}),xe({docStorageUrl:await ie.getApiOrigin(),onLoading:Ue=>{Ue.style.setProperty("opacity","0")},onLoaded:Ue=>{var N;Ue.style.removeProperty("opacity"),(N=Ue.querySelector(".md-nav__title"))==null||N.removeAttribute("for"),ge(Array.from(Ue.querySelectorAll(".md-sidebar")))}})]),[U,J,ie]);return(0,r.useEffect)(()=>{if(!S)return()=>{};let st=!0;return Je(S,B).then(async Ue=>{if(!(Ue!=null&&Ue.innerHTML)||!st)return;window.scroll({top:0});const N=await ht(Ue);Se(N)}),()=>{st=!1}},[S,B,Je,ht]),me},$e=({entityRef:te,onReady:J=()=>{},withSearch:U=!0})=>{var Fe,vt;const ie=X(),Te=Ze(te),De=(0,r.useRef)(null),Ee=(0,r.useRef)(J);return(0,r.useEffect)(()=>{Ee.current=J},[J]),(0,r.useEffect)(()=>{if(!Te||!De.current)return;const xt=De.current,B=xt.shadowRoot||xt.attachShadow({mode:"open"});Array.from(B.children).forEach(S=>B.removeChild(S)),B.appendChild(Te),Ee.current()},[Te]),r.createElement(r.Fragment,null,r.createElement(ze.N,null),U&&((vt=(Fe=De==null?void 0:De.current)==null?void 0:Fe.shadowRoot)==null?void 0:vt.innerHTML)&&r.createElement(i.Z,{container:!0,className:ie.searchBar},r.createElement(Lt.S,{entityId:te})),r.createElement("div",{"data-testid":"techdocs-content-shadowroot",ref:De}))},nt=te=>{const{entityRef:J,onReady:U=()=>{},withSearch:ie=!0}=te;return r.createElement(ne,{entityRef:J},r.createElement($e,{entityRef:J,onReady:U,withSearch:ie}))}},75733:function(_,s,e){"use strict";e.r(s),e.d(s,{TechDocsReaderPage:function(){return u}});var r=e(2784),t=e(10289),l=e(64279),f=e(53242),E=e(75505),i=e(3337),o=e(36964),m=e(9118);const u=h=>{const{children:g}=h,{NotFoundErrorPage:R}=(0,o.useApp)().getComponents(),C=(0,t.pC)(),[M,b]=(0,r.useState)(!1),{namespace:Q,kind:I,name:P}=(0,t.UO)(),L=(0,o.useApi)(i.g),{value:z}=(0,l.default)(()=>M?L.getTechDocsMetadata({kind:I,namespace:Q,name:P}):Promise.resolve(void 0),[I,Q,P,L,M]),{value:W,error:q}=(0,l.default)(()=>L.getEntityMetadata({kind:I,namespace:Q,name:P}),[I,Q,P,L]),oe=(0,r.useCallback)(()=>{b(!0)},[b]);return q?r.createElement(R,null):g?r.createElement(m.Page,{themeId:"documentation"},g instanceof Function?g({techdocsMetadataValue:z,entityMetadataValue:W,entityRef:{kind:I,namespace:Q,name:P},onReady:oe}):g):C||r.createElement(m.Page,{themeId:"documentation"},r.createElement(E.S,{techDocsMetadata:z,entityMetadata:W,entityRef:{kind:I,namespace:Q,name:P}}),r.createElement(m.Content,{"data-testid":"techdocs-content"},r.createElement(f.Ej,{onReady:oe,entityRef:{kind:I,namespace:Q,name:P}})))}},75505:function(_,s,e){"use strict";e.d(s,{S:function(){return m}});var r=e(2784),t=e(73250),l=e(36964),f=e(9118),E=e(48023),i=e(53479),o=e(68725);const m=u=>{const{entityRef:h,entityMetadata:g,techDocsMetadata:R,children:C}=u,{name:M}=h,{site_name:b,site_description:Q}=R||{},{locationMetadata:I,spec:P}=g||{},L=P==null?void 0:P.lifecycle,z=g?(0,i.getEntityRelations)(g,E.S4):[],W=(0,l.useRouteRef)(o._Z)(),q=r.createElement(r.Fragment,null,r.createElement(f.HeaderLabel,{label:"Component",value:r.createElement(i.EntityRefLink,{color:"inherit",entityRef:h,defaultKind:"Component"})}),z.length>0&&r.createElement(f.HeaderLabel,{label:"Owner",value:r.createElement(i.EntityRefLinks,{color:"inherit",entityRefs:z,defaultKind:"group"})}),L?r.createElement(f.HeaderLabel,{label:"Lifecycle",value:L}):null,I&&I.type!=="dir"&&I.type!=="file"?r.createElement(f.HeaderLabel,{label:"",value:r.createElement("a",{href:I.target,target:"_blank",rel:"noopener noreferrer"},r.createElement(t.Z,{style:{marginTop:"-25px",fill:"#fff"}}))}):null);return r.createElement(f.Header,{title:b||".",pageTitleOverride:b||M,subtitle:Q&&Q!=="None"?Q:"",type:"Docs",typeLink:W},q,C)}},23738:function(_,s,e){"use strict";e.d(s,{N:function(){return z}});var r=e(2784),t=e(9118),l=e(79692),f=e(4614),E=e(77277),i=e(99688),o=e(12420),m=e(60905),u=e(90436),h=e(61837),g=e(4190),R=e(87685);const C=(0,l.Z)(W=>(0,o.Z)({paper:{width:"100%",[W.breakpoints.up("sm")]:{width:"75%"},[W.breakpoints.up("md")]:{width:"50%"},padding:W.spacing(2.5)},root:{height:"100%",overflow:"hidden"},logs:{background:W.palette.background.default}})),M=({buildLog:W,onClose:q})=>{const oe=C(),ve=W.length===0?"Waiting for logs...":W.join(`
|
|
487
487
|
`);return r.createElement(m.Z,{container:!0,direction:"column",className:oe.root,spacing:0,wrap:"nowrap"},r.createElement(m.Z,{item:!0,container:!0,justifyContent:"space-between",alignItems:"center",spacing:0,wrap:"nowrap"},r.createElement(u.Z,{variant:"h5"},"Build Details"),r.createElement(h.Z,{key:"dismiss",title:"Close the drawer",onClick:q,color:"inherit"},r.createElement(R.Z,null))),r.createElement(t.LogViewer,{text:ve,classes:{root:oe.logs}}))},b=({buildLog:W})=>{const q=C(),[oe,ve]=(0,r.useState)(!1);return r.createElement(r.Fragment,null,r.createElement(E.Z,{color:"inherit",onClick:()=>ve(!0)},"Show Build Logs"),r.createElement(g.ZP,{classes:{paper:q.paper},anchor:"right",open:oe,onClose:()=>ve(!1)},r.createElement(M,{buildLog:W,onClose:()=>ve(!1)})))};var Q=e(36964);const I=({errorMessage:W})=>{const q=(0,Q.useApi)(Q.configApiRef).getOptionalString("techdocs.builder");let oe="";return q!=="local"&&(oe="Note that techdocs.builder is not set to 'local' in your config, which means this Backstage app will not generate docs if they are not found. Make sure the project's docs are generated and published by some external process (e.g. CI/CD pipeline). Or change techdocs.builder to 'local' to generate docs from this Backstage instance."),r.createElement(t.ErrorPage,{status:"404",statusMessage:W||"Documentation not found",additionalInfo:oe})};var P=e(53242);const L=(0,l.Z)(W=>({root:{marginBottom:W.spacing(2)},message:{wordBreak:"break-word",overflowWrap:"anywhere"}})),z=()=>{let W=null;const q=L(),{state:oe,contentReload:ve,contentErrorMessage:Le,syncErrorMessage:we,buildLog:fe}=(0,P.DK)(),Ke=oe==="CHECKING"?r.createElement(t.Progress,null):null;return oe==="INITIAL_BUILD"&&(W=r.createElement(i.Z,{classes:{root:q.root},variant:"outlined",severity:"info",icon:r.createElement(f.Z,{size:"24px"}),action:r.createElement(b,{buildLog:fe})},"Documentation is accessed for the first time and is being prepared. The subsequent loads are much faster.")),oe==="CONTENT_STALE_REFRESHING"&&(W=r.createElement(i.Z,{variant:"outlined",severity:"info",icon:r.createElement(f.Z,{size:"24px"}),action:r.createElement(b,{buildLog:fe}),classes:{root:q.root}},"A newer version of this documentation is being prepared and will be available shortly.")),oe==="CONTENT_STALE_READY"&&(W=r.createElement(i.Z,{variant:"outlined",severity:"success",action:r.createElement(E.Z,{color:"inherit",onClick:()=>ve()},"Refresh"),classes:{root:q.root}},"A newer version of this documentation is now available, please refresh to view.")),oe==="CONTENT_STALE_ERROR"&&(W=r.createElement(i.Z,{variant:"outlined",severity:"error",action:r.createElement(b,{buildLog:fe}),classes:{root:q.root,message:q.message}},"Building a newer version of this documentation failed."," ",we)),oe==="CONTENT_NOT_FOUND"&&(W=r.createElement(r.Fragment,null,we&&r.createElement(i.Z,{variant:"outlined",severity:"error",action:r.createElement(b,{buildLog:fe}),classes:{root:q.root,message:q.message}},"Building a newer version of this documentation failed."," ",we),r.createElement(I,{errorMessage:Le}))),r.createElement(r.Fragment,null,Ke,W)}},96393:function(_,s,e){"use strict";e.d(s,{Ej:function(){return r.Ej},SE:function(){return t.S}});var r=e(53242),t=e(75505),l=e(23738)},68725:function(_,s,e){"use strict";e.d(s,{Fw:function(){return l},_Z:function(){return t},pd:function(){return f}});var r=e(36964);const t=(0,r.createRouteRef)({id:"techdocs:index-page"}),l=(0,r.createRouteRef)({id:"techdocs:reader-page",params:["namespace","kind","name"]}),f=(0,r.createRouteRef)({id:"techdocs:catalog-reader-view"})},93566:function(_,s,e){"use strict";e.d(s,{S:function(){return xt}});var r=e(2784),t=e(79692),l=e(49378),f=e(38402),E=e(85256),i=e(9118),o=e(15277),m=e.n(o);const u=(0,t.Z)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",marginBottom:"1rem"}}),h=B=>{const{result:S,lineClamp:j=5,asListItem:ue=!0,asLink:ge=!0,title:me}=B,Se=u(),qe=()=>{var Je;return r.createElement(l.Z,{className:Se.itemText,primaryTypographyProps:{variant:"h6"},primary:me||`${S.title} | ${(Je=S.entityTitle)!=null?Je:S.name} docs`,secondary:r.createElement(m(),{line:j,truncateText:"\u2026",text:S.text,element:"span"})})},ot=({children:Je})=>ge?r.createElement(i.Link,{to:S.location},Je):r.createElement(r.Fragment,null,Je),Ve=({children:Je})=>ue?r.createElement(r.Fragment,null,r.createElement(f.Z,{alignItems:"flex-start",className:Se.flexContainer},Je),r.createElement(E.Z,{component:"li"})):r.createElement(r.Fragment,null,Je);return r.createElement(ot,null,r.createElement(Ve,null,r.createElement(qe,null)))};var g=e(91512);const R=(0,t.Z)(B=>({filters:{width:"250px",display:"flex"},icon:{margin:B.spacing(-1,0,0,0)}})),C=({numberOfSelectedFilters:B,handleToggleFilters:S})=>{const j=R();return React.createElement("div",{className:j.filters},React.createElement(IconButton,{className:j.icon,"aria-label":"settings",onClick:S},React.createElement(FilterListIcon,null)),React.createElement(Typography,{variant:"h6"},"Filters (",B||0,")"))},M=(0,t.Z)(B=>({filters:{background:"transparent",boxShadow:"0px 0px 0px 0px"},checkbox:{padding:B.spacing(0,1,0,1)},dropdown:{width:"100%"}})),b=({filters:B,filterOptions:S,resetFilters:j,updateSelected:ue,updateChecked:ge})=>{const me=M();return React.createElement(Card,{className:me.filters},React.createElement(CardHeader,{title:React.createElement(Typography,{variant:"h6"},"Filters"),action:React.createElement(Button,{color:"primary",onClick:()=>j()},"CLEAR ALL")}),React.createElement(Divider,null),S.kind.length===0&&S.lifecycle.length===0&&React.createElement(CardContent,null,React.createElement(Typography,{variant:"subtitle2"},"Filters cannot be applied to available results")),S.kind.length>0&&React.createElement(CardContent,null,React.createElement(Typography,{variant:"subtitle2"},"Kind"),React.createElement(Select,{id:"outlined-select",onChange:Se=>{var qe;return ue((qe=Se==null?void 0:Se.target)==null?void 0:qe.value)},variant:"outlined",className:me.dropdown,value:B.selected},S.kind.map(Se=>React.createElement(MenuItem,{selected:Se==="",dense:!0,key:Se,value:Se},Se)))),S.lifecycle.length>0&&React.createElement(CardContent,null,React.createElement(Typography,{variant:"subtitle2"},"Lifecycle"),React.createElement(List,{disablePadding:!0,dense:!0},S.lifecycle.map(Se=>React.createElement(ListItem,{key:Se,dense:!0,button:!0,onClick:()=>ge(Se)},React.createElement(Checkbox,{edge:"start",disableRipple:!0,className:me.checkbox,color:"primary",checked:B.checked.includes(Se),tabIndex:-1,value:Se,name:Se}),React.createElement(ListItemText,{id:Se,primary:Se}))))))};var Q=e(1795),I=e(22313),P=e(42494),L=e(84899),z=e(5806),W=e(21324),q=e(56939),oe=e(73698),ve=e(12231),Le=e(86619),we=e(7089),fe=e(88013),Ke=e(69294),_e=e(48760);const ut=(B,S,j=[],ue=250)=>{const ge=(0,r.useRef)({}),me=B||(()=>Promise.resolve([])),[Se,qe]=(0,Ke.default)(me,[S],{loading:!0});if((0,_e.Z)(()=>{ge.current[S]===void 0&&(ge.current[S]=qe(S).then(Ve=>(ge.current[S]=Ve,Ve)))},ue,[qe,S]),j.length)return{loading:!1,value:j};const ot=ge.current[S];return Array.isArray(ot)?{loading:!1,value:ot}:Se},rt=(B,S)=>{const{setFilters:j}=(0,I.Rx)();(0,r.useEffect)(()=>{S&&[S].flat().length>0&&j(ue=>({...ue,[B]:S}))},[])},at=B=>{const{className:S,defaultValue:j,name:ue,values:ge,valuesDebounceMs:me,label:Se,filterSelectedOptions:qe,limitTags:ot,multiple:Ve}=B,[Je,ht]=(0,r.useState)("");rt(ue,j);const st=typeof ge=="function"?ge:void 0,Ue=typeof ge=="function"?void 0:ge,{value:N,loading:y}=ut(st,Je,Ue,me),{filters:x,setFilters:H}=(0,I.Rx)(),k=x[ue]||(Ve?[]:null),Oe=(He,ft)=>{H(Ht=>{const{[ue]:qt,...Mn}=Ht;return ft?{...Mn,[ue]:ft}:{...Mn}})},Ae=He=>r.createElement(Le.Z,{...He,name:"search",variant:"outlined",label:Se,fullWidth:!0}),Ie=(He,ft)=>He.map((Ht,qt)=>r.createElement(we.Z,{label:Ht,color:"primary",...ft({index:qt})}));return r.createElement(fe.ZP,{filterSelectedOptions:qe,limitTags:ot,multiple:Ve,className:S,id:`${Ve?"multi-":""}select-filter-${ue}--select`,options:N||[],loading:y,value:k,onChange:Oe,onInputChange:(He,ft)=>ht(ft),renderInput:Ae,renderTags:Ie})},gt=(0,t.Z)({label:{textTransform:"capitalize"}}),xe=B=>{const{className:S,defaultValue:j,label:ue,name:ge,values:me=[],valuesDebounceMs:Se}=B,qe=gt(),{filters:ot,setFilters:Ve}=(0,I.Rx)();rt(ge,j);const Je=typeof me=="function"?me:void 0,ht=typeof me=="function"?void 0:me,{value:st=[],loading:Ue}=ut(Je,"",ht,Se),N=y=>{const{target:{value:x,checked:H}}=y;Ve(k=>{const{[ge]:Oe,...Ae}=k,Ie=(Oe||[]).filter(ft=>ft!==x),He=H?[...Ie,x]:Ie;return He.length?{...Ae,[ge]:He}:Ae})};return r.createElement(P.Z,{className:S,disabled:Ue,fullWidth:!0,"data-testid":"search-checkboxfilter-next"},ue?r.createElement(L.Z,{className:qe.label},ue):null,st.map(y=>{var x;return r.createElement(z.Z,{key:y,control:r.createElement(W.Z,{color:"primary",tabIndex:-1,inputProps:{"aria-labelledby":y},value:y,name:y,onChange:N,checked:((x=ot[ge])!=null?x:[]).includes(y)}),label:y})}))},Qe=B=>{const{className:S,defaultValue:j,label:ue,name:ge,values:me,valuesDebounceMs:Se}=B,qe=gt();rt(ge,j);const ot=typeof me=="function"?me:void 0,Ve=typeof me=="function"?void 0:me,{value:Je=[],loading:ht}=ut(ot,"",Ve,Se),{filters:st,setFilters:Ue}=(0,I.Rx)(),N=y=>{const{target:{value:x}}=y;Ue(H=>{const{[ge]:k,...Oe}=H;return x?{...Oe,[ge]:x}:Oe})};return r.createElement(P.Z,{disabled:ht,className:S,variant:"filled",fullWidth:!0,"data-testid":"search-selectfilter-next"},ue?r.createElement(q.Z,{className:qe.label,margin:"dense"},ue):null,r.createElement(oe.Z,{variant:"outlined",value:st[ge]||"",onChange:N},r.createElement(ve.Z,{value:""},r.createElement("em",null,"All")),Je.map(y=>r.createElement(ve.Z,{key:y,value:y},y))))},Ye=({component:B,...S})=>r.createElement(B,{...S});Ye.Checkbox=B=>r.createElement(Ye,{...B,component:xe}),Ye.Select=B=>r.createElement(Ye,{...B,component:Qe}),Ye.Autocomplete=B=>r.createElement(Ye,{...B,component:at});const Rt=null;var pt=e(73032),St=e(3992),it=e(8542),yt=e(62155),It=e(94339),Pt=e(32552),Zt=e(24579),Bt=e(27616),Lt=e(8284),ze=e(70660),lt=e(11776),ke=e(86136),Ct=e(38016),ct=e(56881);const Et=(0,t.Z)(B=>({card:{backgroundColor:"rgba(0, 0, 0, .11)"},cardContent:{paddingTop:B.spacing(1)},icon:{color:B.palette.common.black},list:{width:"100%"},listItemIcon:{width:"24px",height:"24px"},accordion:{backgroundColor:B.palette.background.paper},accordionSummary:{minHeight:"auto","&.Mui-expanded":{minHeight:"auto"}},accordionSummaryContent:{margin:B.spacing(2,0),"&.Mui-expanded":{margin:B.spacing(2,0)}},accordionDetails:{padding:B.spacing(0,0,1)}})),X=B=>{const S=Et(),{setPageCursor:j,setTypes:ue,types:ge}=(0,I.Rx)(),[me,Se]=(0,r.useState)(!0),{defaultValue:qe,name:ot,types:Ve}=B,Je=()=>Se(N=>!N),ht=N=>()=>{ue(N!==""?[N]:[]),j(void 0),Se(!1)};(0,r.useEffect)(()=>{qe&&ue([qe])},[]);const st=[{value:"",name:"All",icon:r.createElement(ct.Z,null)},...Ve],Ue=ge[0]||"";return r.createElement(It.Z,{className:S.card},r.createElement(Pt.Z,{title:ot,titleTypographyProps:{variant:"overline"}}),r.createElement(Zt.Z,{className:S.cardContent},r.createElement(Bt.Z,{className:S.accordion,expanded:me,onChange:Je},r.createElement(Lt.Z,{classes:{root:S.accordionSummary,content:S.accordionSummaryContent},expandIcon:r.createElement(Ct.Z,{className:S.icon}),IconButtonProps:{size:"small"}},me?"Collapse":st.filter(N=>N.value===Ue)[0].name),r.createElement(ze.Z,{classes:{root:S.accordionDetails}},r.createElement(lt.Z,{className:S.list,component:"nav","aria-label":"filter by type",disablePadding:!0,dense:!0},st.map(N=>r.createElement(r.Fragment,{key:N.value},r.createElement(E.Z,null),r.createElement(f.Z,{selected:ge[0]===N.value||ge.length===0&&N.value==="",onClick:ht(N.value),button:!0},r.createElement(ke.Z,null,(0,r.cloneElement)(N.icon,{className:S.listItemIcon})),r.createElement(l.Z,{primary:N.name})))))))))};var Z=e(99152),ne=e(6487);const ce=(0,t.Z)(B=>({tabs:{borderBottom:`1px solid ${B.palette.textVerySubtle}`,padding:B.spacing(0,4)},tab:{height:"50px",fontWeight:B.typography.fontWeightBold,fontSize:B.typography.pxToRem(13),color:B.palette.textSubtle,minWidth:"130px"}})),se=B=>{const S=ce(),{setPageCursor:j,setTypes:ue,types:ge}=(0,I.Rx)(),{defaultValue:me,types:Se}=B,qe=(Ve,Je)=>{ue(Je!==""?[Je]:[]),j(void 0)};(0,r.useEffect)(()=>{me&&ue([me])},[]);const ot=[{value:"",name:"All"},...Se];return r.createElement(Z.Z,{className:S.tabs,indicatorColor:"primary",value:ge.length===0?"":ge[0],onChange:qe},ot.map(Ve=>r.createElement(ne.Z,{className:S.tab,disableRipple:!0,label:Ve.name,value:Ve.value})))},ye=(0,t.Z)(B=>({label:{textTransform:"capitalize"},chips:{display:"flex",flexWrap:"wrap",marginTop:B.spacing(1)},chip:{margin:2}})),Ze=B=>{const{className:S,defaultValue:j,name:ue,values:ge=[]}=B,me=ye(),{types:Se,setTypes:qe}=(0,I.Rx)();(0,yt.Z)(()=>{Se.length||(j&&Array.isArray(j)?qe(j):j&&qe([j]))});const ot=Ve=>{const Je=Ve.target.value;qe(Je)};return r.createElement(P.Z,{className:S,variant:"filled",fullWidth:!0,"data-testid":"search-typefilter-next"},r.createElement(q.Z,{className:me.label,margin:"dense"},ue),r.createElement(oe.Z,{multiple:!0,variant:"outlined",value:Se,onChange:ot,placeholder:"All Results",renderValue:Ve=>r.createElement("div",{className:me.chips},Ve.map(Je=>r.createElement(we.Z,{key:Je,label:Je,className:me.chip,size:"small"})))},ge.map(Ve=>r.createElement(ve.Z,{key:Ve,value:Ve},r.createElement(W.Z,{checked:Se.indexOf(Ve)>-1}),r.createElement(l.Z,{primary:Ve})))))};Ze.Accordion=B=>r.createElement(X,{...B}),Ze.Tabs=B=>r.createElement(se,{...B});var $e=e(19126),nt=e(20863),te=e(36964);const J=B=>{const S=useRouteRef(rootRouteRef),{focusContent:j}=useContent(),ue=useNavigate(),ge=useCallback(me=>{const Se=qs.stringify({query:me},{addQueryPrefix:!0});j(),ue(`${S()}${Se}`)},[j,ue,S]);return React.createElement(SidebarSearchField,{icon:B.icon,onSearch:ge,to:"/search"})};var U=e(50581),ie=e(61837),Te=e(4614),De=e(21853),Ee=e(10289);const Fe=(0,t.Z)({root:{width:"100%"}}),vt=B=>{const{entityId:S,debounceTime:j=150}=B,[ue,ge]=(0,r.useState)(!1),me=(0,Ee.s0)(),{term:Se,setTerm:qe,setFilters:ot,result:{loading:Ve,value:Je}}=(0,I.Rx)(),ht=Fe(),[st,Ue]=(0,r.useState)([]);(0,r.useEffect)(()=>{let Ie=!0;if(Ie&&Je){const He=Je.results.slice(0,10);Ue(He)}return()=>{Ie=!1}},[Ve,Je]);const[N,y]=(0,r.useState)(Se);(0,_e.Z)(()=>qe(N),j,[N]);const{kind:x,name:H,namespace:k}=S;(0,r.useEffect)(()=>{ot(Ie=>({...Ie,kind:x,namespace:k,name:H}))},[x,k,H,ot]);const Oe=Ie=>{ue||ge(!0),y(Ie.target.value)},Ae=(Ie,He)=>{if(He!=null&&He.document){const{location:ft}=He.document;me(ft)}};return r.createElement(fe.ZP,{classes:{root:ht.root},"data-testid":"techdocs-search-bar",size:"small",open:ue,getOptionLabel:()=>"",filterOptions:Ie=>Ie,onClose:()=>{ge(!1)},onFocus:()=>{ge(!0)},onChange:Ae,blurOnSelect:!0,noOptionsText:"No results found",value:null,options:st,renderOption:({document:Ie})=>r.createElement(h,{result:Ie,lineClamp:3,asListItem:!1,asLink:!1,title:Ie.title}),loading:Ve,renderInput:Ie=>r.createElement(Le.Z,{...Ie,"data-testid":"techdocs-search-bar-input",variant:"outlined",fullWidth:!0,placeholder:`Search ${S.name} docs`,value:N,onChange:Oe,InputProps:{...Ie.InputProps,startAdornment:r.createElement(U.Z,{position:"start"},r.createElement(ie.Z,{"aria-label":"Query",disabled:!0},r.createElement(De.Z,null))),endAdornment:r.createElement(r.Fragment,null,Ve?r.createElement(Te.Z,{color:"inherit",size:20}):null,Ie.InputProps.endAdornment)}})})},xt=B=>{const S={term:"",types:["techdocs"],pageCursor:"",filters:B.entityId};return r.createElement(I.Nd,{initialState:S},r.createElement(vt,{...B}))}},98157:function(){},19133:function(_,s,e){"use strict";_.exports=e.p+"static/createComponent.975d1e1e..svg"},86284:function(_,s,e){"use strict";_.exports=e.p+"static/missingAnnotation.67f79e98..svg"},3871:function(_,s,e){"use strict";_.exports=e.p+"static/noBuild.1715fa71..svg"},96465:function(_,s,e){"use strict";_.exports=e.p+"static/noInformation.4b426325..svg"},29788:function(_,s,e){"use strict";_.exports=e.p+"static/mic-drop.fe3ef4d0..svg"},53260:function(){}},function(_){var s=function(r){return _(_.s=r)};_.O(0,[2370,6202,9284,2126,7012,9035,4983,5218,4736],function(){return s(88649),s(46054)});var e=_.O()}]);})();
|
|
488
488
|
|
|
489
|
-
//# sourceMappingURL=main.
|
|
489
|
+
//# sourceMappingURL=main.15ea64e8.js.map
|