You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
NewEduCoderBuild/static/js/async/9905.6d3f25a0.js

2 lines
6.6 KiB

"use strict";(self.webpackChunk_coze_studio_app=self.webpackChunk_coze_studio_app||[]).push([["9905"],{163206:function(e,o,i){i.r(o),i.d(o,{ResourceTreeModal:()=>J});var r=i("825955"),t=i("151064"),l=i("455069"),a=i("664319"),n=i("252237"),s=i.n(n),c=i("149528"),d=i("562392"),m=i("66860"),p=i("336205"),x=i("567282"),h=i("382534"),g=i("873183"),u=i("659596"),f=i("9430"),w=i("962622"),v=i("794800"),_=i("407821"),k=i.n(_),b=i("472772"),j=i.n(b),y=i("395245"),B=i.n(y),z=i("297998"),T=i.n(z),Z=i("646576"),N=i.n(Z),S=i("606121"),I=i.n(S),U=i("240234"),H={};H.styleTagTransform=I(),H.setAttributes=T(),H.insert=B().bind(null,"head"),H.domAPI=j(),H.insertStyleElement=N(),k()(U.Z,H);var Y=U.Z&&U.Z.locals?U.Z.locals:void 0,C=e=>{var{data:o,spaceId:i,projectId:r,onRetry:a}=e,n=(0,w.Wp)(o),s=(0,l.useCallback)(e=>(0,t.jsx)(d.GR,{extraInfo:e,spaceId:i,projectId:r}),[i,r]);return n?(0,t.jsx)(u.ub,{size:"full_screen",icon:(0,t.jsx)(v.Zo,{}),title:p.o.t("reference_graph_tip_current_workflow_has_no_reference")}):(0,t.jsx)(f.SV,{fallback:(0,t.jsx)(u.ub,{size:"full_screen",icon:(0,t.jsx)(v.JD,{}),title:p.o.t("reference_graph_tip_fail_to_load"),buttonProps:{icon:(0,t.jsx)(g.mxP,{}),color:"primary"},buttonText:p.o.t("reference_graph_tip_fail_to_load_retry_needed"),onButtonClick:a}),children:(0,t.jsx)(w.XK,{className:Y["resource-tree"],data:o,renderLinkNode:s})})},{Text:E}=u.ZT,Q={node_list:[]},J=e=>{var o,i,{modalVisible:n,setModalVisible:f}=e,{selectedResource:w}=(0,m.Un)((0,a.N)(e=>({selectedResource:e.selectedResource}))),{workflowResource:v}=(0,m.rA)(),[_,k]=(0,l.useState)(!0),[b,j]=(0,l.useState)(Q),[y,B]=(0,l.useState)(w||(null==v?void 0:null===(i=v[0])||void 0===i?void 0:i.id)),z=(0,c.aQ)(),T=(0,c.vp)(),{version:Z}=(0,c.jo)(),{iconRender:N}=(0,d.qn)(),S=e=>{B(e)};var I=(o=(0,r._)(function*(e){k(!0);var o=yield h.OH.DependencyTree({type:x.EC.Project,project_info:{workflow_id:e,space_id:z,project_id:T,draft:!Z,project_version:Z||void 0}});y===e&&j((null==o?void 0:o.data)||Q),k(!1)}),function(e){return o.apply(this,arguments)});return(0,l.useEffect)(()=>{y&&I(y)},[y]),(0,t.jsx)(u.u_,{className:Y.modal,visible:n,type:"dialog",hasScroll:!1,children:(0,t.jsxs)("div",{className:Y["modal-container"],children:[(0,t.jsxs)("div",{className:Y["workflow-list"],children:[(0,t.jsxs)("div",{className:Y["list-header-container"],children:[p.o.t("reference_graph_modal_title"),(0,t.jsx)(u.u,{theme:"dark",content:(0,t.jsx)(d.cS,{}),children:(0,t.jsx)(g.L03,{color:"secondary",fontSize:16})})]}),(0,t.jsxs)("div",{style:{height:0,flexGrow:1},children:[(0,t.jsx)("div",{className:Y["list-title"],children:p.o.t("reference_graph_modal_subtitle_view_relationship_given_workflow")}),(0,t.jsx)("div",{className:Y.list,children:v.map(e=>(0,t.jsxs)("div",{className:s()(Y["list-item"],y===e.id&&Y.selected),onClick:()=>S(e.id),children:[null==N?void 0:N({resource:e}),(0,t.jsx)(E,{ellipsis:{showTooltip:{type:"tooltip",opts:{position:"right",theme:"dark"}}},children:e.name})]},e.id))})]})]}),(0,t.jsx)("div",{className:Y["resource-tree-container"],children:_?(0,t.jsx)("div",{className:Y["loading-container"],children:(0,t.jsx)(u.gb,{loading:!0,size:"large",color:"default",className:Y.loading})}):(0,t.jsx)(C,{data:b,spaceId:z,projectId:T,onRetry:()=>{I(y)}})}),(0,t.jsx)(u.zx,{className:Y["close-icon"],color:"secondary",size:"large",onClick:()=>{f(!1)},children:(0,t.jsx)(g.rmE,{fontSize:20})})]})})}},240234:function(e,o,i){var r=i(125161),t=i.n(r),l=i(404442),a=i.n(l)()(t());a.push([e.id,".modal-QmZc6q .semi-modal{width:calc(100vw - 80px)!important;height:calc(100vh - 80px)!important;margin:40px!important}.modal-QmZc6q .semi-modal-body-wrapper{height:100%;margin:0}.modal-QmZc6q .semi-modal-content{padding:6px!important}.modal-QmZc6q .semi-modal-body{height:100%}.modal-QmZc6q .semi-modal-footer{display:none}.close-icon-Wa0wMO{z-index:999;width:40px;height:40px;position:absolute;top:16px;right:16px;background-color:var(--coz-bg-max)!important;border:1px solid var(--coz-stroke-primary)!important}.close-icon-Wa0wMO:hover{background-color:#f2f3f7!important}.close-icon-Wa0wMO:active{background-color:#e9ebf2!important}.loading-container-RnaE6d{background-color:var(--coz-bg-primary);justify-content:center;align-items:center;width:100%;height:100%;display:flex}.loading-container-RnaE6d .loading-lr5Neh{color:var(--coz-fg-dim)}.workflow-list-TYlmB4{flex-direction:column;width:200px;padding:6px;display:flex}.workflow-list-TYlmB4 .list-header-container-vaAZGg{-moz-column-gap:4px;align-items:center;column-gap:4px;margin:8px 0 12px 12px;font-size:20px;font-weight:500;line-height:28px;display:flex}.workflow-list-TYlmB4 .list-title-BQFbMx{color:var(--coz-fg-secondary);margin-bottom:4px;padding:4.5px 12px;font-size:12px;line-height:16px}.workflow-list-TYlmB4 .list-dBrHJl{flex-direction:column;justify-content:flex-start;gap:4px;height:100%;display:flex;overflow-y:auto}.workflow-list-TYlmB4 .list-dBrHJl .list-item-gUSIwU{cursor:pointer;-moz-column-gap:4px;border-radius:4px;align-items:center;column-gap:4px;width:100%;height:28px;padding:4px 8px 4px 12px;display:flex}.workflow-list-TYlmB4 .list-dBrHJl .list-item-gUSIwU svg{flex-shrink:0}.workflow-list-TYlmB4 .list-dBrHJl .list-item-gUSIwU .semi-typography{font-weight:500}.workflow-list-TYlmB4 .list-dBrHJl .list-item-gUSIwU:hover{background-color:var(--coz-mg-secondary-hovered)}.workflow-list-TYlmB4 .list-dBrHJl .list-item-gUSIwU:active,.workflow-list-TYlmB4 .list-dBrHJl .selected-H6bmOn{background-color:var(--coz-mg-primary)}.modal-container-Pc4GE5{width:100%;height:100%;display:flex}.resource-tree-container-cc3Z66{border:1px solid var(--coz-stroke-primary);border-radius:8px;width:100%;position:relative}.resource-tree-container-cc3Z66 .resource-tree-hxtKm6{border:1px solid var(--coz-stroke-primary);border-radius:8px;flex-grow:1;width:100%}",""]),a.locals={modal:"modal-QmZc6q","close-icon":"close-icon-Wa0wMO",closeIcon:"close-icon-Wa0wMO","loading-container":"loading-container-RnaE6d",loadingContainer:"loading-container-RnaE6d",loading:"loading-lr5Neh","workflow-list":"workflow-list-TYlmB4",workflowList:"workflow-list-TYlmB4","list-header-container":"list-header-container-vaAZGg",listHeaderContainer:"list-header-container-vaAZGg","list-title":"list-title-BQFbMx",listTitle:"list-title-BQFbMx",list:"list-dBrHJl","list-item":"list-item-gUSIwU",listItem:"list-item-gUSIwU",selected:"selected-H6bmOn","modal-container":"modal-container-Pc4GE5",modalContainer:"modal-container-Pc4GE5","resource-tree-container":"resource-tree-container-cc3Z66",resourceTreeContainer:"resource-tree-container-cc3Z66","resource-tree":"resource-tree-hxtKm6",resourceTree:"resource-tree-hxtKm6"},o.Z=a}}]);
//# sourceMappingURL=9905.6d3f25a0.js.map