comp-hub 0.28.5 → 0.28.7
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/README.md +132 -132
- package/bin/cli.js +53 -53
- package/bin/lib/commands.js +173 -173
- package/bin/lib/constants.js +22 -22
- package/bin/lib/http.js +62 -62
- package/bin/lib/startup.js +183 -183
- package/bin/lib/utils.js +112 -112
- package/dist/index.js +2 -2
- package/dist/website/container/assets/index-B6KfxMpe.css +1 -0
- package/dist/website/container/assets/{index-DW_KDaXl.js → index-DlqRVovH.js} +9 -9
- package/dist/website/container/index.html +32 -32
- package/dist/website/container/js/vue2-sfc-loader.js +260 -260
- package/dist/website/container/js/vue3-sfc-loader.js +289 -289
- package/dist/website/item/assets/index-BIgTOfbh.css +1 -0
- package/dist/website/item/assets/index-DOKUHdnc.js +39 -0
- package/dist/website/item/index.html +30 -30
- package/dist/website/main/assets/{CanvasAnimation.vue_vue_type_script_setup_true_lang-Xr4R8ONt.js → CanvasAnimation.vue_vue_type_script_setup_true_lang-CDdsQZ0-.js} +1 -1
- package/dist/website/main/assets/index-0jUB6F-4.js +1 -0
- package/dist/website/main/assets/index-5EYT6f8p.js +1 -0
- package/dist/website/main/assets/{index-BblV7ZcF.js → index-B-JCIDk_.js} +1 -1
- package/dist/website/main/assets/index-B329MLgw.js +2 -0
- package/dist/website/main/assets/index-B6QLWqnu.js +1 -0
- package/dist/website/main/assets/index-B8k-Kh_A.js +1 -0
- package/dist/website/main/assets/index-B9hCLAJk.js +1 -0
- package/dist/website/main/assets/index-BFKzKjpl.js +1 -0
- package/dist/website/main/assets/{index-DGaY7dL7.js → index-BRZurz58.js} +1 -1
- package/dist/website/main/assets/index-BrArZ42r.js +1 -0
- package/dist/website/main/assets/{index-tKPA5N_x.js → index-BwgMUal7.js} +1 -1
- package/dist/website/main/assets/index-CAsY0Xb9.js +1 -0
- package/dist/website/main/assets/index-CWJKxZCd.js +1 -0
- package/dist/website/main/assets/index-CY6_9tAe.js +1 -0
- package/dist/website/main/assets/{index-BGYcKO_k.js → index-CadXipX3.js} +2 -2
- package/dist/website/main/assets/index-CbfSiY9U.js +1 -0
- package/dist/website/main/assets/index-CdzjeO0x.js +1 -0
- package/dist/website/main/assets/index-CiSJMy_Y.js +1 -0
- package/dist/website/main/assets/{index-DxyEzkir.css → index-Cl0SK7oa.css} +1 -1
- package/dist/website/main/assets/index-CyPExloz.css +1 -0
- package/dist/website/main/assets/{index-CdLdwW7r.js → index-D88CvPWT.js} +13 -13
- package/dist/website/main/assets/index-DEGdQmAx.js +1 -0
- package/dist/website/main/assets/index-DJ4AvgpT.css +1 -0
- package/dist/website/main/assets/index-DOd1x8nw.js +1 -0
- package/dist/website/main/assets/index-DPdwbYvx.js +1 -0
- package/dist/website/main/assets/{index-Dfkpa19a.js → index-DquKS0_n.js} +1 -1
- package/dist/website/main/assets/{index-DbmFA7Z2.js → index-DrbX7elo.js} +1 -1
- package/dist/website/main/assets/{index-RcR0UXkh.js → index-EDA2t2OE.js} +1 -1
- package/dist/website/main/assets/{index-BqUY_Pbs.js → index-HkZs-IVV.js} +1 -1
- package/dist/website/main/assets/{index-Cc3zDN4S.js → index-IVEhJl2W.js} +1 -1
- package/dist/website/main/assets/index-U6TRHk8E.js +1 -0
- package/dist/website/main/assets/{index-BMSnGhSG.js → index-ZoaJ6v2i.js} +1 -1
- package/dist/website/main/assets/{index-bdWvkmhc.js → index-pjvH5dVi.js} +1 -1
- package/dist/website/main/assets/index-qAIxUXsY.css +1 -0
- package/dist/website/main/assets/{index-DIKKFNiV.css → index-qOVjc392.css} +1 -1
- package/dist/website/main/assets/{index.vue_vue_type_script_setup_true_lang-BYKlY94g.js → index.vue_vue_type_script_setup_true_lang-BAM6bQ14.js} +1 -1
- package/dist/website/main/assets/{index.vue_vue_type_script_setup_true_lang-DzvWwe2g.js → index.vue_vue_type_script_setup_true_lang-BWF3Tgxf.js} +1 -1
- package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-BXNbK11E.js +1 -0
- package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-CmmAEEXC.js +2 -0
- package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-D9A1RF52.js +1 -0
- package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-DTC1Qz-g.js +1 -0
- package/dist/website/main/assets/{index.vue_vue_type_style_index_0_lang-CwaGkvXy.js → index.vue_vue_type_style_index_0_lang-8e70e_fM.js} +1 -1
- package/dist/website/main/assets/{index.vue_vue_type_style_index_0_lang-BNPcBMvg.js → index.vue_vue_type_style_index_0_lang-BZ1LzI3x.js} +1 -1
- package/dist/website/main/assets/index.vue_vue_type_style_index_0_lang-BipgSalp.js +1 -0
- package/dist/website/main/assets/useCompEditStore-D7YXYpD3.css +1 -0
- package/dist/website/main/assets/{useCompEditStore-DI3vFtGm.js → useCompEditStore-DhXxYAqN.js} +135 -135
- package/dist/website/main/assets/{useKeyword-bWHMALoZ.js → useKeyword-CjhhChz4.js} +1 -1
- package/dist/website/main/assets/{useMessage-BVw3M4ej.js → useMessage-Cbhfk7Nk.js} +1 -1
- package/dist/website/main/assets/useVscodeOpen-BBdyQ3W2.js +1 -0
- package/dist/website/main/index.html +2 -2
- package/package.json +45 -45
- package/dist/website/container/assets/index-D6braxue.css +0 -1
- package/dist/website/item/assets/index-BWvMfSxu.css +0 -1
- package/dist/website/item/assets/index-Cqs5iLeY.js +0 -39
- package/dist/website/main/assets/index-9E0N8vk2.js +0 -1
- package/dist/website/main/assets/index-B8QVBEgQ.js +0 -1
- package/dist/website/main/assets/index-BEVcnNvI.js +0 -1
- package/dist/website/main/assets/index-BHUDEWGt.js +0 -1
- package/dist/website/main/assets/index-BVcp4iEn.js +0 -1
- package/dist/website/main/assets/index-BYC9CuLh.js +0 -1
- package/dist/website/main/assets/index-BwgqBNRu.js +0 -1
- package/dist/website/main/assets/index-CG7uKVdX.js +0 -1
- package/dist/website/main/assets/index-CsUtZbBp.js +0 -1
- package/dist/website/main/assets/index-CzTcYkCn.css +0 -1
- package/dist/website/main/assets/index-D-uwf4yo.css +0 -1
- package/dist/website/main/assets/index-D6MA33Hi.js +0 -1
- package/dist/website/main/assets/index-Dd8ha0TC.js +0 -1
- package/dist/website/main/assets/index-Diq3BceD.js +0 -1
- package/dist/website/main/assets/index-DkakQhTy.js +0 -1
- package/dist/website/main/assets/index-Dz2nPzxk.js +0 -1
- package/dist/website/main/assets/index-FFTkVbVX.css +0 -1
- package/dist/website/main/assets/index-X1ZIWbVW.js +0 -2
- package/dist/website/main/assets/index-qSRqezAW.js +0 -1
- package/dist/website/main/assets/index-qsIY_6aA.js +0 -1
- package/dist/website/main/assets/index-rWF_BNTH.js +0 -1
- package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-CCaH-GEy.js +0 -1
- package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-DPbqR98S.js +0 -1
- package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-DTrkhAMQ.js +0 -2
- package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-DtCu4Izc.js +0 -1
- package/dist/website/main/assets/index.vue_vue_type_style_index_0_lang-1ZphBFBL.js +0 -1
- package/dist/website/main/assets/useCompEditStore-EVZp94pg.css +0 -1
- package/dist/website/main/assets/useVscodeOpen-SZpyzVHG.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ac as B,aF as he,A as ge,e as Te,U as Ce,a7 as Ee,D as Se,ar as we,J as le,K as ye,aJ as be,b as Le,W as Re,g as xe,f as Me}from"./vendor-ui-CGT0cG1n.js";import{V as Y,t as ae,j as ke,u as W,B as Ne}from"./index-CdLdwW7r.js";/* empty css *//* empty css */import{v as oe,aA as re,aF as de,aM as $,aj as Ie,ab as O,l as K,i as y,ap as b,ax as _,r as c,aO as f,q as V,aP as ie,aK as Oe,j as Pe,aQ as Ae,k as Ge,af as L,g as m,Y as ne,aC as De,aD as Be,ac as ce,a9 as $e,y as Ve,ao as Z}from"./vendor-core-BKehvho7.js";import{b as ue,c as Ke,a as Ue}from"./index.vue_vue_type_script_setup_true_lang-DTrkhAMQ.js";import{u as pe}from"./useTeamHeaders-DxHN7-t0.js";import{v as Fe}from"./v4-EwEgHOG0.js";import{u as He}from"./useKeyword-bWHMALoZ.js";import{u as je,I as C,a as ee,e as ze}from"./useMessage-BVw3M4ej.js";import"./index-BYC9CuLh.js";import"./useCompMetaLocalStore-BKTMp_k8.js";import"./useVscodeOpen-SZpyzVHG.js";import"./BaseDialog.vue_vue_type_script_setup_true_lang-BROcUfEh.js";import"./useCacheOssStore-OAoLDVbw.js";import"./EmptyStatusContainer.vue_vue_type_script_setup_true_lang-pswB5SUz.js";const Je={class:"size-full flex flex-col overflow-auto"},We={class:"text-lg font-bold mb-2"},Ye={class:"flex gap-2"},Qe={class:"flex-1 flex flex-col gap-2 overflow-auto"},qe={class:"flex gap-1"},Xe={class:"flex items-center gap-1"},Ze={class:"custom-tree-node"},ea={key:1},aa={key:0},oa={class:"flex gap-2 items-center"},ta=oe({__name:"TreeMenu",setup(te){const{t:l}=re(),U={children:"children",label:"label",isLeaf:e=>!e.children||e.children.length===0},{headers:N,teamId:F}=pe(),t=ue(F)(),R=L(""),h=L([]),E=de("tree"),x=L({}),n=L([]),g=L("[]"),P=L({}),r=L(!1),T=m(()=>{const e=JSON.stringify(n.value),o=g.value;return e!==o||!we(t.selectedRowsToLeafNodeMap,P.value)}),A=m(()=>t.selectedRows.length>0),H=()=>({id:Fe(),label:l("team.defaultGroup"),children:[],isEdit:!1}),Q=(e,o)=>{e&&(x.value[o]=e)},j=e=>{h.value.includes(e)||(h.value=[...h.value,e])},q=e=>{const p=Y.getTreeAllChildren(n.value,e.id).map(i=>i.id).concat(e.id);h.value=h.value.filter(i=>!p.includes(i)),r.value=!1},X=e=>{j(e.id)},a=e=>{e.isEdit=!1},u=e=>{e.isEdit=!1},d=(e,o)=>e?o.label.includes(e):!0,S=()=>{const e={menuGroup:n.value,compIdInLeafNodeMap:t.selectedRowsToLeafNodeMap};ae.v1Team.teamcontrollerUpdatemenu(e,{headers:N}).then(()=>{le.success(l("message.success.save")),P.value=B(t.selectedRowsToLeafNodeMap),t.setTeamDetail({...t.teamDetail,menuGroup:B(n.value)})})},M=async e=>{e.isEdit=!0,await ne(),x.value[e.id]?.focus(),x.value[e.id]?.select()},G=async e=>{const o=H();e.children||(e.children=[]),e.children.push(o),n.value=[...n.value],await ne();const p={};for(const i in t.selectedRowsToLeafNodeMap)t.selectedRowsToLeafNodeMap[i]===e.id&&(p[i]=o.id);t.addSelectedRowsToLeafNodeMap(p),j(o.id)},I=async(e,o)=>{const D=Y.getTreeAllChildren(n.value,o.id).filter(s=>s.children?.length===0).map(s=>s.id).concat(o.id),k=[];for(const s in t.selectedRowsToLeafNodeMap)D.includes(t.selectedRowsToLeafNodeMap[s]??"")&&k.push(s);if(k?.length){if(await ye.confirm(l("team.deleteGroupConfirm"),l("common.info"),{confirmButtonText:l("common.delete"),cancelButtonText:l("common.cancel"),type:"warning"}).catch(()=>{})!=="confirm")return;t.delSelectedRowsToLeafNodeMap(k)}const z=e.parent,J=z?.data.children||z?.data,w=J.findIndex(s=>s.id===o.id);J.splice(w,1),n.value=[...n.value]},me=()=>{const e=H();n.value.push(e)},fe=()=>{if(!n.value.length)return;const e=n.value.map(o=>Y.getTreeAllChildren(n.value,o.id).map(i=>i.id)).reduce((o,p)=>o.concat(p),[]);e.length&&(h.value=e,r.value=!0)},_e=e=>{T.value&&e.preventDefault()},ve=e=>{const o=t.selectedRows.reduce((p,i)=>({...p,[i]:e.id}),{});t.addSelectedRowsToLeafNodeMap(o),t.setSelectedRows([]),le.success(l("team.addSuccess"))},se=e=>Object.values(t.selectedRowsToLeafNodeMap).filter(o=>o===e.id).length;return $(R,e=>{E.value.filter(e)}),$(()=>t.menuGroup,e=>{n.value=B(e),g.value=JSON.stringify(e)},{immediate:!0}),$(()=>JSON.stringify(n.value),()=>{t.setDataSourceCopy(B(n.value))},{immediate:!0}),$(()=>t.selectedRowsToLeafNodeMap,e=>{P.value=B(e)},{immediate:!0,once:!0}),$(()=>T.value,e=>{t.setCanSaveCopy(e)},{immediate:!0,deep:!0}),he(window,"beforeunload",_e),(e,o)=>{const p=ge,i=Te,D=Ie("Icon"),k=Se,z=Ee,J=Ce;return O(),K("div",Je,[y("h2",We,b(_(l)("team.groupConfig")),1),y("div",Ye,[c(p,{modelValue:R.value,"onUpdate:modelValue":o[0]||(o[0]=w=>R.value=w),class:"mb-2",placeholder:_(l)("team.pleaseInputGroupName")},null,8,["modelValue","placeholder"])]),y("div",Qe,[y("div",qe,[c(i,{size:"small",disabled:r.value,onClick:fe},{default:f(()=>[V(b(_(l)("team.expandAll")),1)]),_:1},8,["disabled"]),c(i,{type:"primary",size:"small",onClick:me},{default:f(()=>[V(b(_(l)("team.createGroup")),1)]),_:1}),y("div",Xe,[c(i,{type:"primary",disabled:!T.value,size:"small",onClick:S},{default:f(()=>[V(b(_(l)("common.save")),1)]),_:1},8,["disabled"]),ie(y("span",{class:"text-red-500 text-[12px]"},b(_(l)("team.unsaved")),513),[[Oe,T.value]])])]),c(J,{class:"flex-1"},{default:f(()=>[c(z,{ref:"tree",data:n.value,"default-expanded-keys":h.value,"expand-on-click-node":!1,"filter-node-method":d,props:U,"node-key":"id",onNodeExpand:X,onNodeCollapse:q},{default:f(({node:w,data:s})=>[y("div",Ze,[s.isEdit?(O(),Pe(p,{key:0,ref:v=>Q(v,s.id),modelValue:s.label,"onUpdate:modelValue":v=>s.label=v,autofocus:"",size:"small",onKeydown:Ae(v=>a(s),["enter"]),onBlur:v=>u(s),onChange:v=>a(s)},null,8,["modelValue","onUpdate:modelValue","onKeydown","onBlur","onChange"])):(O(),K("span",ea,[V(b(w.label)+" ",1),w.isLeaf&&se(s)>0?(O(),K("span",aa," ("+b(se(s))+") ",1)):Ge("",!0)])),y("div",oa,[c(k,{type:"info",link:"",onClick:v=>M(s)},{default:f(()=>[c(D,{icon:"material-symbols:edit-note"})]),_:1},8,["onClick"]),c(k,{type:"primary",link:"",onClick:v=>G(s)},{default:f(()=>[c(D,{icon:"material-symbols:add-box-rounded"})]),_:1},8,["onClick"]),c(k,{type:"danger",link:"",onClick:v=>I(w,s)},{default:f(()=>[c(D,{icon:"material-symbols:delete-rounded"})]),_:1},8,["onClick"]),c(i,{disabled:!w.isLeaf||!A.value,type:"primary",link:"",onClick:v=>ve(s)},{default:f(()=>[V(b(_(l)("team.addComp")),1)]),_:1},8,["disabled","onClick"])])])]),_:1},8,["data","default-expanded-keys"])]),_:1})])])}}}),sa=ke(ta,[["__scopeId","data-v-8a38bda5"]]),la=oe({__name:"CompGroupList",setup(te){const{t:l}=re(),U=Ve(),N=De(),{headers:F,teamId:t}=pe(),{sendMessageToTargetIframe:R,messageListener:h}=ze(),{addListener:E}=h(),x=je(!1,window.__GLOBAL_CONFIG__.subPort),n=Be(),g=Ke(`${N.path}_${W.SCOPE_ID_TEAM_COMP_GROUP_LIST}`)();ce(W.PROVIDE_KEY_COMP_LIST_STORE,g);const P=new Map;ce(W.PROVIDE_KEY_CALLBACKS,P);const r=ue(t)(),T=de("compIframeContainer"),A=L({data:[],search:{column:[{prop:"keyword",component:Z(Le),label:m(()=>l("common.keyword")),value:"",autoQuery:!1,attributes:{placeholder:m(()=>l("comp.keywordPlaceholder")),fetchSuggestions:Q,triggerOnFocus:!1,style:"width: 400px",fitInputWidth:!0}},{prop:"isGroup",label:m(()=>l("team.isGrouped")),component:Z(Re),value:"",attributes:{style:{width:"120px"},clearable:!0,options:m(()=>[{label:l("team.grouped"),value:"Yes"},{label:l("team.ungrouped"),value:"No"}])}},{prop:"group",component:Z(xe),label:m(()=>l("team.group")),value:"",attributes:{options:m(()=>r.menuGroup),clearable:!0,props:{value:"id",checkStrictly:!0}}}]},pagination:{total:0,attributes:{pageSizes:[10,20,30]}},autoLoading:!1,fetchData:j}),H=m(()=>A.value?.search?.column[0]?.value??"");He(H,T);function Q(a,u){if(a.length<=1)return u([]);ae.v1Keyword.keywordcontrollerQuerykeywordscomp({keyword:a,type:"compTeam"},{headers:F}).then(d=>{const{keywords:S=[]}=d.data||{};u(S)})}async function j(a){g.setLoading(!0);const{group:u=[]}=a||{};delete a.group;const d=u?.[u.length-1];if(d){let I=r.getSelectedGroupLeafNodes(d);I=I.length===0?[d]:I,a.leafNodeIds=I}const S=await ae.v1Team.teamcontrollerTeamcomps({...a,scene:"library"},{headers:F}),{rows:M,total:G}=S.data??{};g.renderList(M??[]),A.value.pagination.total=G||0,g.setLoading(!1)}function q(a){n.push({path:`/previewTeam/${t}/${a}`})}function X(a){const u=r.selectedRowsToLeafNodeMap[a];return u?Y.findTreeNodePathToRoot(r.dataSourceCopy,u).reverse().map(M=>M.label).join(" / "):""}return E(C.SELECTED_ROWS_TO_LEAF_NODE_MAP_GET,ee(m(()=>r.selectedRowsToLeafNodeMap),()=>{T.value?.sendMessageToTargetIframeByCompId(a=>{a&&R(a,C.SELECTED_ROWS_TO_LEAF_NODE_MAP_SET,r.selectedRowsToLeafNodeMap,x)})}).triggerCallback),E(C.SELECTED_ROWS_TO_LEAF_NODE_MAP_SET,a=>{r.setSelectedRowsToLeafNodeMap(a)}),E(C.SELECTED_ROWS_GET,ee(m(()=>r.selectedRows),()=>{T.value?.sendMessageToTargetIframeByCompId(a=>{a&&R(a,C.SELECTED_ROWS_SET,r.selectedRows,x)})}).triggerCallback),E(C.SELECTED_ROWS_SET,a=>{r.setSelectedRows(a)}),E(C.COMP_GROUP_PATH_GET,ee(m(()=>r.dataSourceCopy),a=>{const u=a.map(d=>({[d]:X(d)}));u.length>0&&T.value?.sendMessageToTargetIframeByCompId(d=>{if(d){const S=u.reduce((M,G)=>({...M,...G}),{});R(d,C.COMP_GROUP_PATH_SET,S,x)}})}).triggerCallback),E(C.COMP_GROUP_PATH_SET,a=>{r.setSelectedRowsToLeafNodeMap(a)}),$e(()=>{g.$reset()}),(a,u)=>{const d=be;return ie((O(),K("div",null,[c(_(Ne),{tableConfig:A.value},{table:f(()=>[c(Ue,{ref:"compIframeContainer",iuid:_(U)?.uid,compType:_(W).IFRAME_ROUTES.CONTAINER.TEAM_GROUP,onPreview:q},null,8,["iuid","compType"])]),_:1},8,["tableConfig"])])),[[d,_(g).loading]])}}}),na={class:"flex gap-3"},wa=oe({__name:"index",setup(te){return(l,U)=>{const N=Me;return O(),K("div",na,[c(N,{"body-class":"!p-0",class:"w-[400px] max-h-[60vh] overflow-hidden sticky top-10 p-2"},{default:f(()=>[c(sa)]),_:1}),c(N,{"body-class":"!p-0",class:"flex-1 p-2"},{default:f(()=>[c(la)]),_:1})])}}});export{wa as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{aJ as k,U as D,b as L}from"./vendor-ui-CGT0cG1n.js";import{u as a,B as b,t as c,p as P}from"./index-CdLdwW7r.js";import{c as M,a as A}from"./index.vue_vue_type_script_setup_true_lang-DTrkhAMQ.js";import{_ as U}from"./index.vue_vue_type_style_index_0_lang-1ZphBFBL.js";import{c as x}from"./useCompEditStore-DI3vFtGm.js";import{v as K,aA as B,y as N,aC as Y,aD as $,ac as m,aF as _,a9 as F,aP as H,ax as i,ab as V,l as z,r as p,aO as w,af as Q,g as l,ao as G}from"./vendor-core-BKehvho7.js";import{u as J}from"./useKeyword-bWHMALoZ.js";import"./index-BYC9CuLh.js";import"./useCompMetaLocalStore-BKTMp_k8.js";/* empty css */import"./useVscodeOpen-SZpyzVHG.js";import"./BaseDialog.vue_vue_type_script_setup_true_lang-BROcUfEh.js";import"./useCacheOssStore-OAoLDVbw.js";import"./useTeamHeaders-DxHN7-t0.js";import"./EmptyStatusContainer.vue_vue_type_script_setup_true_lang-pswB5SUz.js";import"./useMessage-BVw3M4ej.js";import"./v4-EwEgHOG0.js";/* empty css */import"./index.vue_vue_type_style_index_0_lang-BNPcBMvg.js";import"./core-CcVTMiBP.js";import"./PanelBackground.vue_vue_type_script_setup_true_lang-BELCrrRh.js";import"./BaseSegmented.vue_vue_type_script_setup_true_lang-DU79Plk1.js";import"./LoadingWrapper.vue_vue_type_script_setup_true_lang-kJcgjuK5.js";const W={class:"size-full p-[10px] pr-0"},ho=K({__name:"index",setup(j){const{t:u}=B(),C=N()?.uid,d=Y(),E=$(),e=M(d.path)();m(a.PROVIDE_KEY_COMP_LIST_STORE,e);const g=x(d.path,a.DIALOG_TYPE_EDIT)();m(a.PROVIDE_KEY_COMP_EDIT_STORE,g);const f=new Map;m(a.PROVIDE_KEY_CALLBACKS,f);const y=_("compUpdateDialog"),h=_("compIframeContainer"),n=Q({data:[],search:{column:[{prop:"keyword",component:G(L),label:l(()=>u("common.keyword")),value:"",autoQuery:!1,attributes:{placeholder:l(()=>u("comp.keywordPlaceholder")),fetchSuggestions:I,triggerOnFocus:!1,style:"width: 400px",fitInputWidth:!0}}]},pagination:{total:0,attributes:{pageSizes:[10,20,30]}},autoLoading:!1,fetchData:O}),v=l(()=>n.value?.search?.column[0]?.value??"");J(v,h);function I(o,t){if(o.length<=1)return t([]);c.v1Keyword.keywordcontrollerQuerykeywordscomp({keyword:o,type:"compMy"}).then(r=>{const{keywords:s=[]}=r.data||{};t(s)})}async function O(o){e.setLoading(!0),o.keyword&&window?.umami?.track(P.SEARCH_COMPONENT,{keyword:o.keyword,page:"mine"});const t=await c.v1Comp.compcontrollerMycomps(o),{rows:r,total:s}=t.data??{};e.renderList(r??[]),n.value.pagination.total=s??0,e.setLoading(!1)}function R(o){E.push({path:`/preview/${o}`})}async function S(o){y.value?.open(o)}function T(o){c.v1Comp.compcontrollerCompdetail({compId:o}).then(t=>{e.updateCompListItemById(o,t.data)})}return f.set(a.COMP_METHOD_KEY_AFTER_COMP_DEL,()=>{n.value.pagination.total--}),F(()=>{e.$reset()}),(o,t)=>{const r=D,s=k;return H((V(),z("div",W,[p(i(b),{tableConfig:n.value},{table:w(()=>[p(r,{always:"",wrapClass:"pr-[10px]"},{default:w(()=>[p(A,{ref:"compIframeContainer",iuid:i(C),compType:i(a).IFRAME_ROUTES.CONTAINER.MINE,onPreview:R,onUpdate:S},null,8,["iuid","compType"])]),_:1})]),_:1},8,["tableConfig"]),p(U,{ref:"compUpdateDialog",onUpdateSuccess:T},null,512)])),[[s,i(e).loading]])}}});export{ho as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{v as u,ab as d,l as _,r as n,ax as f,aC as L,ac as M,a7 as g,aO as w,af as P,g as m}from"./vendor-core-BKehvho7.js";import{c as T}from"./useCompMetaLocalStore-BKTMp_k8.js";import{u as v,q as r}from"./index-CdLdwW7r.js";import{_ as b}from"./index.vue_vue_type_script_setup_true_lang-DPbqR98S.js";import{_ as I}from"./EmptyStatusContainer.vue_vue_type_script_setup_true_lang-pswB5SUz.js";import"./vendor-ui-CGT0cG1n.js";import"./useVscodeOpen-SZpyzVHG.js";import"./useMessage-BVw3M4ej.js";const O={class:"size-full"},R=u({__name:"index",props:{version:{},compAttrs:{}},setup(a){return(l,t)=>(d(),_("div",O,[n(b,{compAttrs:a.compAttrs,version:a.version,compType:f(v).IFRAME_ROUTES.ITEM.PREVIEW_LOCAL},null,8,["compAttrs","version","compType"])]))}}),k={class:"size-full"},j=u({__name:"index",setup(a){const l=L(),{compId:t}=l.params,e=T(t)(),h=new Map;M(v.PROVIDE_KEY_CALLBACKS,h);const o=P(!1),s=m(()=>e.detail),A=m(()=>Object.keys(s.value??{}).length>0);async function y(){if(!t)return;o.value=!0;const c=await r.v1Comp.compcontrollerLocalcompdetailbypathhash({fullPathHash:t}),i=await r.v1Comp.compcontrollerDep({compPath:c.data.path}),{thirdParty:p=[]}=i.data,C=p.map(x=>x.name),E=await r.v1Module.modulecontrollerPrebuild({deps:C}),{entryNameToFile:D={}}=E.data;e.setDetail(c.data),e.setDep(p),e.setDepToFile(D),o.value=!1}return g(async()=>{await y()}),(c,i)=>(d(),_("div",k,[n(f(I),{isEmpty:!A.value,loading:o.value,class:"size-full"},{default:w(()=>[n(R,{compAttrs:s.value,version:s.value.version},null,8,["compAttrs","version"])]),_:1},8,["isEmpty","loading"])]))}});export{j as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a2 as R,e as $,W as H,L as F,b as q,K as z,J as C}from"./vendor-ui-CGT0cG1n.js";import{B as K,t as u,p as k}from"./index-CdLdwW7r.js";import"./el-table-column-CGzXlVpD.js";import{v as L,aA as Q,aD as W,a7 as j,ab as g,l as T,r as s,aO as r,_ as A,A as w,q as E,ap as v,ax as p,F as G,ah as J,j as X,i as Z,af as I,g as o,ao as ee}from"./vendor-core-BKehvho7.js";import{b as ae}from"./index.vue_vue_type_script_setup_true_lang-DTrkhAMQ.js";import{h as M}from"./moment-B-YVwB4U.js";import{u as te}from"./useTeamHeaders-DxHN7-t0.js";import{_ as oe}from"./LoadingWrapper.vue_vue_type_script_setup_true_lang-kJcgjuK5.js";import"./index-BYC9CuLh.js";import"./useCompMetaLocalStore-BKTMp_k8.js";/* empty css */import"./useVscodeOpen-SZpyzVHG.js";import"./BaseDialog.vue_vue_type_script_setup_true_lang-BROcUfEh.js";import"./useCacheOssStore-OAoLDVbw.js";import"./EmptyStatusContainer.vue_vue_type_script_setup_true_lang-pswB5SUz.js";import"./useMessage-BVw3M4ej.js";const ne={class:"size-full"},re={class:"text-gray-300"},Te=L({__name:"index",setup(le){const{t:a}=Q(),x=W(),{headers:i,teamId:f}=te(),_=ae(f)(),b=I([]),d=I({data:[],column:[{prop:"name",label:o(()=>a("comp.name")),align:"center"},{prop:"authorId.nickname",label:o(()=>a("common.author")),align:"center",formatter:e=>e.teamUserNickname||e.authorId?.nickname||"--"},{prop:"version",label:o(()=>a("comp.version")),align:"center"},{prop:"desc",label:o(()=>a("comp.desc")),align:"center",showOverflowTooltip:{popperClass:"table-text-tooltip"}},{prop:"createdAt",label:o(()=>a("team.createTime")),align:"center",formatter:e=>e.createdAt?M(e.createdAt).format("YYYY-MM-DD"):"--"},{prop:"updatedAt",label:o(()=>a("team.updateTime")),align:"center",formatter:e=>e.updatedAt?M(e.updatedAt).format("YYYY-MM-DD"):"--"},{slot:"canUpdateUsers",prop:"canUpdateUsers",label:o(()=>a("team.updateAuth")),align:"center"},{slot:"operation",prop:"operation",label:o(()=>a("common.operation")),align:"center"}],search:{column:[{prop:"keyword",component:ee(q),label:o(()=>a("common.keyword")),value:"",autoQuery:!1,attributes:{placeholder:o(()=>a("comp.keywordPlaceholder")),fetchSuggestions:D,triggerOnFocus:!1,style:"width: 400px",fitInputWidth:!0}}]},pagination:{total:0},fixedHeight:!1,fetchData:O}),B=o(()=>b.value.map(e=>({value:e._id,label:e.teamUserNickname||e.nickname||e.account})));function D(e,t){if(e.length<=1)return t([]);u.v1Keyword.keywordcontrollerQuerykeywordscomp({keyword:e,type:"compTeam"},{headers:i}).then(c=>{const{keywords:l=[]}=c.data||{};t(l)})}async function O(e){const t=await u.v1Team.teamcontrollerTeamcomps({...e,scene:"management"},{headers:i}),{rows:c,total:l}=t.data||{};d.value.data=c||[],d.value.pagination.total=l||0}async function N(e,t){t.start();try{if(await z.confirm(a("team.deleteCompConfirm",{name:e.name}),a("common.info"),{confirmButtonText:a("common.confirm"),cancelButtonText:a("common.cancel"),type:"warning"}).catch(()=>{})!=="confirm")return;await u.v1Team.teamcontrollerRemovecompfromteam({compIds:[e._id]},{headers:i}).then(()=>{C.success(a("message.success.delete")),d.value.data=d.value.data.filter(l=>l._id!==e._id),_.setTeamDetail({..._.teamDetail,compCount:_.teamDetail.compCount-1}),window?.umami?.track(k.TEAM_COMP_REMOVE,{teamId:f,compId:e._id,compName:e.name})})}finally{t.end()}}function S(e){x.push({path:`/previewTeam/${f}/${e._id}`})}function V(){u.v1Team.teamcontrollerAllmember({headers:i}).then(e=>{b.value=e.data?.rows||[]})}function Y(e){const t={compId:e._id,canUpdateUserIds:e.canUpdateUsers||[]};u.v1Team.teamcontrollerUpdatecompcanupdateusers(t,{headers:i}).then(()=>{C.success(a("message.success.update")),window?.umami?.track(k.TEAM_COMP_PERMISSION_CHANGE,{teamId:f,compId:e._id,userIds:t.canUpdateUserIds})})}return j(()=>{V()}),(e,t)=>{const c=F,l=H,U=R,y=$;return g(),T("div",ne,[s(p(K),{tableConfig:d.value,border:""},{canUpdateUsers:r(({col:h})=>[s(U,A(w(h)),{default:r(({row:m})=>[s(l,{modelValue:m.canUpdateUsers,"onUpdate:modelValue":n=>m.canUpdateUsers=n,multiple:"","collapse-tags":"","collapse-tags-tooltip":"",placeholder:p(a)("team.selectCanUpdateUser"),onChange:n=>Y(m)},{header:r(()=>[Z("span",re,v(p(a)("team.authorAutoAuth")),1)]),default:r(()=>[(g(!0),T(G,null,J(B.value,n=>(g(),X(c,{key:n.value,label:n.label,value:n.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","onUpdate:modelValue","placeholder","onChange"])]),_:1},16)]),operation:r(({col:h})=>[s(U,A(w(h)),{default:r(({row:m})=>[s(y,{type:"primary",onClick:n=>S(m)},{default:r(()=>[E(v(p(a)("common.preview")),1)]),_:1},8,["onClick"]),s(p(oe),null,{default:r(({instance:n,loading:P})=>[s(y,{type:"danger",loading:P,onClick:se=>N(m,n)},{default:r(()=>[E(v(p(a)("common.delete")),1)]),_:1},8,["loading","onClick"])]),_:2},1024)]),_:1},16)]),_:1},8,["tableConfig"])])}}});export{Te as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{aJ as L,U as C}from"./vendor-ui-CGT0cG1n.js";import{u as t,B as g,q as v}from"./index-CdLdwW7r.js";import{c as E,a as b}from"./index.vue_vue_type_script_setup_true_lang-DTrkhAMQ.js";import{v as w,aC as O,aD as h,ac as p,a9 as S,aP as T,ax as r,ab as P,l as R,r as n,aO as l,af as x}from"./vendor-core-BKehvho7.js";import"./index-BYC9CuLh.js";import"./useCompMetaLocalStore-BKTMp_k8.js";/* empty css */import"./useVscodeOpen-SZpyzVHG.js";import"./BaseDialog.vue_vue_type_script_setup_true_lang-BROcUfEh.js";import"./useCacheOssStore-OAoLDVbw.js";import"./useTeamHeaders-DxHN7-t0.js";import"./EmptyStatusContainer.vue_vue_type_script_setup_true_lang-pswB5SUz.js";import"./useMessage-BVw3M4ej.js";const A={class:"size-full p-[10px] pr-0"},F=w({__name:"index",setup(I){const m=O(),_=h(),a=E(m.path,t.COMP_LIST_TYPE_LOCAL)();p(t.PROVIDE_KEY_COMP_LIST_STORE,a);const u=new Map;p(t.PROVIDE_KEY_CALLBACKS,u);const i=x({data:[],pagination:{total:0,attributes:{pageSizes:[10,20,30]}},autoLoading:!1,fetchData:f});async function f(o){a.setLoading(!0);const c=await v.v1Comp.compcontrollerLocalcomps(o),{rows:e,total:s}=c.data||{};a.renderList(e),i.value.pagination.total=s||0,a.setLoading(!1)}function d(o){_.push({path:`/previewLocal/${o}`})}return S(()=>{a.$reset()}),(o,c)=>{const e=C,s=L;return T((P(),R("div",A,[n(r(g),{tableConfig:i.value},{table:l(()=>[n(e,{always:"",wrapClass:"pr-[10px]"},{default:l(()=>[n(b,{compType:r(t).IFRAME_ROUTES.CONTAINER.LOCAL,onPreviewLocal:d},null,8,["compType"])]),_:1})]),_:1},8,["tableConfig"])])),[[s,r(a).loading]])}}});export{F as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{w as M}from"./vendor-core-BKehvho7.js";import{n as p,u as o}from"./index-CdLdwW7r.js";const P=(a="")=>{if(!a)throw new Error("createCompMetaStore scopeId is required");return M(`compMeta_${a}`,{state:()=>({detail:{},depEntryNameToFile:{},versionToFileAccessPath:{},localCompInfo:[],latestVersion:""}),getters:{isLocalExist:e=>e.localCompInfo.length!==0,latestVersionToFileAccessPath:e=>e.versionToFileAccessPath[e.latestVersion]??[]},actions:{setLatestVersion(e){this.$patch(t=>{t.latestVersion=e})},setLocalCompInfo(e){this.$patch(t=>{t.localCompInfo=e})},setDetail(e,t){this.$patch(r=>{r.detail[e]={...r.detail[e],...t}})},setDepEntryNameToFile(e,t){this.$patch(r=>{r.depEntryNameToFile[e]=t})},setVersionToFileAccessPath(e,t){this.$patch(r=>{r.versionToFileAccessPath[e]=t})}}})};function f(a,e){return a.filter(t=>{const r=e.find(l=>l.name===t.name||l.name===t.parent?.name);if(!r)return!1;const{match:h}=r,{major:s,minor:n,patch:m}=p.parseVersion(t.version),{major:i,minor:c,patch:T}=p.parseVersion(r.version);switch(h){case o.COMP_MATCH_TYPE_ONLY_INSTALL:return!0;case o.COMP_MATCH_TYPE_MAJOR_VERSION:return s===i;case o.COMP_MATCH_TYPE_MINOR_VERSION:return s===i&&n===c;case o.COMP_MATCH_TYPE_EXACT_VERSION:return s===i&&n===c&&m===T}})}export{P as c,f as p};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{f as $,l as O,D as R,e as T,U as B}from"./vendor-ui-CGT0cG1n.js";import{u as m,A as N,e as F,q as w}from"./index-CdLdwW7r.js";import{v as b,aA as k,ab as L,l as z,r as e,aO as a,i as t,ax as l,ap as f,q as x,ac as j,aC as U,aD as q,a7 as K,aj as W,j as G,af as H,g}from"./vendor-core-BKehvho7.js";import{c as X}from"./useCompMetaLocalStore-BKTMp_k8.js";import{B as Y,_ as J}from"./index.vue_vue_type_script_setup_true_lang-CCaH-GEy.js";/* empty css *//* empty css */import{_ as Q}from"./index.vue_vue_type_script_setup_true_lang-DPbqR98S.js";import{u as Z}from"./useVscodeOpen-SZpyzVHG.js";import{_ as ee}from"./PanelBackground.vue_vue_type_script_setup_true_lang-BELCrrRh.js";import{_ as oe}from"./EmptyStatusContainer.vue_vue_type_script_setup_true_lang-pswB5SUz.js";import"./index.vue_vue_type_style_index_0_lang-BNPcBMvg.js";import"./core-CcVTMiBP.js";import"./useTeamHeaders-DxHN7-t0.js";import"./index.vue_vue_type_script_setup_true_lang-DTrkhAMQ.js";import"./index-BYC9CuLh.js";import"./BaseDialog.vue_vue_type_script_setup_true_lang-BROcUfEh.js";import"./useCacheOssStore-OAoLDVbw.js";import"./useMessage-BVw3M4ej.js";const te={class:"size-full overflow-hidden flex flex-col"},ae={class:"size-full"},se={class:"flex items-center"},ne={class:"flex-1"},le={class:"text-xs ml-auto"},ce=b({__name:"index",props:{version:{},compAttrs:{}},setup(s){const{openCompPathInVscode:v}=Z(),h=s,{t:p}=k();function C(){v(h.compAttrs.fullPath,`./${m.COMP_CONFIG_FILENAME}`)}return(P,c)=>{const r=$,i=O,o=R;return L(),z("div",te,[e(l(ee),{class:"size-full flex-1 shrink-0 flex flex-col gap-1",bg:s.compAttrs?.bgColor},{default:a(({bg:u,updateColor:d})=>[e(r,{"body-class":"!p-0 !overflow-visible",class:"flex-1 relative z-10"},{default:a(()=>[t("div",ae,[e(Q,{compAttrs:s.compAttrs,version:s.version,compType:l(m).IFRAME_ROUTES.ITEM.PREVIEW_LOCAL},null,8,["compAttrs","version","compType"])])]),_:1}),t("div",se,[t("div",ne,[t("span",null,f(s.compAttrs?.version),1)]),t("span",le,[t("span",null,f(l(p)("comp.bgPanel"))+":",1),e(i,{teleported:!0,modelValue:u,clearable:"",onChange:d,onActiveChange:d},null,8,["modelValue","onChange","onActiveChange"])])])]),_:1},8,["bg"]),t("div",null,[x(f(l(p)("comp.compLocation"))+": ",1),e(o,{href:"javascript:void(0)",type:"primary",underline:"always",onClick:C},{default:a(()=>[x(f(s.compAttrs.fullPath),1)]),_:1})])])}}}),re={class:"h-[50vh]"},Le=b({__name:"index",setup(s){const{t:v}=k(),h=new Map;j(m.PROVIDE_KEY_CALLBACKS,h);const p=U(),C=q(),P=N(),{compId:c}=p.params,r=X(c)(),i=H(!1),o=g(()=>r.detail),u=g(()=>Object.keys(o.value??{}).length>0),d=g(()=>{const n=F.getPreviewUrl(o.value.path,[`\\${m.COMP_README_FILENAME}`]);return`${m.COMP_PREVIEW_PREFIX_LOCAL}/${n}`});async function D(){if(!c)return;i.value=!0;const n=await w.v1Comp.compcontrollerLocalcompdetailbypathhash({fullPathHash:c}),y=await w.v1Comp.compcontrollerDep({compPath:n.data.path}),{thirdParty:_=[]}=y.data,A=_.map(S=>S.name),E=await w.v1Module.modulecontrollerPrebuild({deps:A}),{entryNameToFile:V={}}=E.data;r.setDetail(n.data),r.setDep(_),r.setDepToFile(V),i.value=!1}function I(){P.addPayLoad(`/previewLocal/${c}`,{name:`${o.value?.name??""}`})}function M(){const{href:n}=C.resolve({name:"previewLocalBlank",params:{compId:c}});window.open(n,"_blank")}return K(async()=>{u.value||await D(),I()}),(n,y)=>{const _=W("Icon"),A=T,E=B;return L(),G(E,{"wrap-class":"preview-container",class:"size-full p-[10px]"},{default:a(()=>[e(l(oe),{isEmpty:!u.value,loading:i.value},{default:a(()=>[t("div",re,[e(l(Y),{title:o.value?.name,actions:["maximize"]},{beforeActions:a(()=>[e(A,{type:"primary",circle:"",title:l(v)("common.newPage"),onClick:M},{default:a(()=>[e(_,{icon:"material-symbols:screen-share-rounded"})]),_:1},8,["title"])]),default:a(()=>[e(ce,{compAttrs:o.value,version:o.value.version},null,8,["compAttrs","version"])]),_:1},8,["title"])]),e(J,{mdSrc:d.value,scrollContainer:".preview-container",stickyTopDistance:0,showSimilarComp:!1},null,8,["mdSrc"])]),_:1},8,["isEmpty","loading"])]),_:1})}}});export{Le as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as e}from"./index.vue_vue_type_style_index_0_lang-CwaGkvXy.js";import{v as o,ab as t,l as r,r as s}from"./vendor-core-BKehvho7.js";import"./vendor-xterm-DbWxaMay.js";import"./index-CdLdwW7r.js";import"./vendor-ui-CGT0cG1n.js";const a={class:"size-full"},d=o({__name:"index",setup(n){return(_,c)=>(t(),r("div",a,[s(e)]))}});export{d as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{aH as I,b as x,W as D,aJ as P,U}from"./vendor-ui-CGT0cG1n.js";import{z as F,u as p,T as G,p as m,t as d,B as N,l as f}from"./index-CdLdwW7r.js";import{c as B,a as K}from"./index.vue_vue_type_script_setup_true_lang-DTrkhAMQ.js";import{v as $,aA as H,y as M,aC as z,aD as J,ac as _,aF as V,af as Q,g as r,ao as g,a9 as W,aP as Y,ax as c,ab as X,l as j,r as u,aO as w}from"./vendor-core-BKehvho7.js";import{u as Z}from"./useKeyword-bWHMALoZ.js";import"./index-BYC9CuLh.js";import"./useCompMetaLocalStore-BKTMp_k8.js";/* empty css */import"./useVscodeOpen-SZpyzVHG.js";import"./BaseDialog.vue_vue_type_script_setup_true_lang-BROcUfEh.js";import"./useCacheOssStore-OAoLDVbw.js";import"./useTeamHeaders-DxHN7-t0.js";import"./EmptyStatusContainer.vue_vue_type_script_setup_true_lang-pswB5SUz.js";import"./useMessage-BVw3M4ej.js";const q={class:"size-full p-[10px] pr-0"},_e=$({__name:"index",setup(ee){const{t:n}=H(),h=M()?.uid,v=z(),y=J(),C=F(),a=B(v.path)();_(p.PROVIDE_KEY_COMP_LIST_STORE,a);const E=new Map;_(p.PROVIDE_KEY_CALLBACKS,E);const i=I(`${G}`,"XTTJ"),T=V("compIframeContainer"),S=r(()=>f.DEFAULT_TAG_GROUP.map(e=>({label:n(e.label),value:e.value}))),l=Q({data:[],search:{column:[{prop:"keyword",component:g(x),label:r(()=>n("common.keyword")),value:"",autoQuery:!1,attributes:{placeholder:r(()=>n("comp.keywordPlaceholder")),fetchSuggestions:k,triggerOnFocus:!1,style:"width: 400px",fitInputWidth:!0}},{prop:"tag",component:g(D),label:r(()=>n("common.filter")),value:i.value,attributes:{options:S,style:"width: 200px",onChange:e=>{i.value=e,window?.umami?.track(m.FILTER_TAG,{tag:e,page:"share"})}}}]},pagination:{total:0,attributes:{pageSizes:[10,20,30]}},autoLoading:!1,fetchData:L}),b=r(()=>l.value?.search?.column[0]?.value??"");Z(b,T);function R(e){return e===f.DEFAULT_TAG_GROUP[0].value?JSON.stringify(C?.deps||[]):"[]"}function k(e,o){if(e.length<=1)return o([]);d.v1Keyword.keywordcontrollerQuerykeywordscomp({keyword:e,type:"compShare"}).then(s=>{const{keywords:t=[]}=s.data||{};o(t)})}async function L(e){a.setLoading(!0),e.keyword&&window?.umami?.track(m.SEARCH_COMPONENT,{keyword:e.keyword,tag:i.value,page:"share"});const o={...e,deps:R(i.value)},s=await d.v1Comp.compcontrollerComps({...o}),{rows:t,total:O}=s.data??{};a.renderList(t??[]),l.value.pagination.total=O??0,l.value.data=t??[],a.setLoading(!1)}function A(e){y.push({path:`/preview/${e}`})}return W(()=>{a.$reset()}),(e,o)=>{const s=U,t=P;return Y((X(),j("div",q,[u(c(N),{tableConfig:l.value},{table:w(()=>[u(s,{always:"",wrapClass:"pr-[10px]"},{default:w(()=>[u(K,{ref:"compIframeContainer",iuid:c(h),compType:c(p).IFRAME_ROUTES.CONTAINER.SHARE,onPreview:A},null,8,["iuid","compType"])]),_:1})]),_:1},8,["tableConfig"])])),[[t,c(a).loading]])}}});export{_e as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
[data-v-911ad151] .el-radio__input.is-checked+.el-radio__label span:first-child{box-shadow:0 0 8px currentColor}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.match-dot-green[data-v-ca24e35d]{background-color:#67c23a}.match-dot-blue[data-v-ca24e35d]{background-color:#409eff}.match-dot-orange[data-v-ca24e35d]{background-color:#e6a23c}.match-dot-red[data-v-ca24e35d]{background-color:#f56c6c}[data-v-ca24e35d] .not-matched{text-decoration:line-through;opacity:.6}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a3 as B,W as Ce,L as he,D as we,K as W,F as Te,J as Ee,a2 as Pe,f as ne,l as ye,aH as Me,e as be,d as Ve,U as Ae}from"./vendor-ui-CGT0cG1n.js";import{k as Se,u as w,n as k,j as xe,t as X,e as se,q as H,B as Oe,z as le,C as ke,A as $e,p as ae,i as De}from"./index-CdLdwW7r.js";import{_ as Ie}from"./el-table-column-CGzXlVpD.js";/* empty css */import{v as O,aA as R,ab as p,j as V,ax as u,aO as m,r as l,Z as N,l as P,k as I,q as $,ap as M,F as Y,ah as G,g as C,aB as Re,a7 as re,W as Ne,af as x,aN as Be,i as b,aF as He,ai as Ye,aC as ce,_ as q,A as J,ac as Le,aD as Fe,aM as te,aj as ze,Q as je,K as Ue,al as Ke}from"./vendor-core-BKehvho7.js";import{_ as We}from"./index.vue_vue_type_style_index_0_lang-CwaGkvXy.js";/* empty css */import{_ as qe}from"./index.vue_vue_type_script_setup_true_lang-DzvWwe2g.js";import{_ as Je}from"./index.vue_vue_type_script_setup_true_lang-DTrkhAMQ.js";import{u as Xe}from"./useTeamHeaders-DxHN7-t0.js";import{B as Ge,_ as Qe}from"./index.vue_vue_type_script_setup_true_lang-CCaH-GEy.js";import{c as Ze,p as eo}from"./index-BYC9CuLh.js";import{_ as oo}from"./index.vue_vue_type_script_setup_true_lang-DtCu4Izc.js";import{_ as ao}from"./PanelBackground.vue_vue_type_script_setup_true_lang-BELCrrRh.js";import{_ as to}from"./BaseSegmented.vue_vue_type_script_setup_true_lang-DU79Plk1.js";import{_ as no}from"./BaseDialog.vue_vue_type_script_setup_true_lang-BROcUfEh.js";import"./vendor-xterm-DbWxaMay.js";import"./useCompMetaLocalStore-BKTMp_k8.js";import"./useVscodeOpen-SZpyzVHG.js";import"./useCacheOssStore-OAoLDVbw.js";import"./EmptyStatusContainer.vue_vue_type_script_setup_true_lang-pswB5SUz.js";import"./useMessage-BVw3M4ej.js";import"./index.vue_vue_type_style_index_0_lang-BNPcBMvg.js";import"./core-CcVTMiBP.js";const so=O({__name:"CompDepsTags",props:{compDeps:{},depsSetting:{}},setup(_){const{t:c}=R(),a=_,i=C(()=>{const r=new Map;return a.depsSetting?.forEach(e=>{r.set(e.name,e)}),r});function f(r,e){const t=e.match;try{switch(t){case w.COMP_MATCH_TYPES.COMP_MATCH_TYPE_ONLY_INSTALL:return!0;case w.COMP_MATCH_TYPES.COMP_MATCH_TYPE_MAJOR_VERSION:{const n=k.parseVersion(r),o=k.parseVersion(e.version);return n.major===o.major}case w.COMP_MATCH_TYPES.COMP_MATCH_TYPE_MINOR_VERSION:{const n=k.parseVersion(r),o=k.parseVersion(e.version);return n.major===o.major&&n.minor===o.minor}case w.COMP_MATCH_TYPES.COMP_MATCH_TYPE_EXACT_VERSION:{const n=k.parseVersion(r),o=k.parseVersion(e.version);return n.major===o.major&&n.minor===o.minor&&n.patch===o.patch}default:return!1}}catch(n){return console.warn(`Version parse failed: ${r} or ${e.version}`,n),!1}}function s(r){const e=i.value.get(r.name);return e?f(r.version,e):!1}function d(r){const e=i.value.get(r.name);if(!e||!f(r.version,e))return"";switch(e.match){case w.COMP_MATCH_TYPES.COMP_MATCH_TYPE_ONLY_INSTALL:return"match-dot-green";case w.COMP_MATCH_TYPES.COMP_MATCH_TYPE_MAJOR_VERSION:return"match-dot-blue";case w.COMP_MATCH_TYPES.COMP_MATCH_TYPE_MINOR_VERSION:return"match-dot-orange";case w.COMP_MATCH_TYPES.COMP_MATCH_TYPE_EXACT_VERSION:return"match-dot-red";default:return""}}return(r,e)=>(p(),V(u(Se),{list:_.compDeps,getKey:t=>t.name,class:"flex items-center gap-1"},{display:m(({visibleList:t,overflow:n})=>[(p(!0),P(Y,null,G(t,o=>(p(),V(u(B),{key:o.name,type:"info","disable-transitions":"",size:"small",class:N({"not-matched":!s(o)})},{default:m(()=>[d(o)?(p(),P("span",{key:0,class:N(["inline-block w-2 h-2 rounded-full mr-1",d(o)])},null,2)):I("",!0),$(" "+M(o.name)+" "+M(o.version),1)]),_:2},1032,["class"]))),128)),n>0?(p(),V(u(B),{key:0,type:"info",size:"small","disable-transitions":""},{default:m(()=>[$("+"+M(n)+" "+M(u(c)("common.more")),1)]),_:2},1024)):I("",!0)]),measure:m(({item:t})=>[l(u(B),{type:"info",size:"small","disable-transitions":"",class:N({"not-matched":!s(t)})},{default:m(()=>[d(t)?(p(),P("span",{key:0,class:N(["inline-block w-2 h-2 rounded-full mr-1",d(t)])},null,2)):I("",!0),$(" "+M(t.name)+" "+M(t.version),1)]),_:2},1032,["class"])]),_:1},8,["list","getKey"]))}}),lo=xe(so,[["__scopeId","data-v-ca24e35d"]]),ro={class:"w-[100px]"},co=O({__name:"index",props:Ne({id:{type:String,default:""},version:{type:String,default:""}},{modelValue:{type:String,default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(_){const c=_,a=Re(_,"modelValue"),i=x([]),f=x(!1);function s(e){a.value=e}async function d(){if(f.value)return;const e=await X.v1Comp.compcontrollerVersions({compId:c.id});f.value=!0,i.value=e.data.rows.map(t=>({value:t.version,label:t.version}))}function r(){i.value=[{value:c.version,label:c.version}],a.value=c.version}return re(()=>{r()}),(e,t)=>{const n=he,o=Ce;return p(),P("div",ro,[l(o,{"model-value":a.value,onChange:s,onVisibleChange:d},{default:m(()=>[(p(!0),P(Y,null,G(i.value,T=>(p(),V(n,{key:T.value,label:T.label,value:T.value},null,8,["label","value"]))),128))]),_:1},8,["model-value"])])}}}),io={class:"size-full flex flex-col gap-5"},mo={class:"p-2"},uo={class:"flex flex-wrap gap-2"},po={class:"flex-1 border border-(--el-border-color-light) rounded-md overflow-hidden"},_o=O({__name:"index",props:{compId:{},getCompDetail:{type:Function}},setup(_){const c=_,a=x(),i=C(()=>se.handleDepData(a.value?.dep??[])),f=(s,d)=>`npm install ${s}@${d}`;return Be(async()=>{const s=await c.getCompDetail(c.compId);s&&(a.value=s)}),(s,d)=>{const r=B;return p(),P("div",io,[b("div",mo,[b("div",uo,[(p(!0),P(Y,null,G(i.value,e=>(p(),V(r,{key:e.name,type:"info","disable-transitions":!0},{default:m(()=>[l(u(Ie),{class:"text-sm",text:f(e.name,e.version)},null,8,["text"])]),_:2},1024))),128))])]),b("div",po,[l(We)])])}}}),ie=O({__name:"index",props:{id:{type:String,default:""},name:{type:String,default:""},version:{type:String,default:""}},emits:["downloadSuccess"],setup(_,{emit:c}){const{t:a}=R(),i=_,f=c,s=He("dialogVueFinder");async function d(e){!e()||await W.confirm(a("comp.downloadVersionConfirm",{version:i.version}),a("common.info"),{confirmButtonText:a("common.confirm"),cancelButtonText:a("common.cancel"),type:"warning"}).catch(()=>{})!=="confirm"||s.value?.open(r)}async function r(e){const t=Te.service({lock:!0,text:a("comp.downloading")});try{if(await W.confirm(a("comp.downloadPathConfirm",{path:e.path}),a("common.info"),{confirmButtonText:a("common.confirm"),cancelButtonText:a("common.cancel"),type:"warning"}).catch(()=>{})!=="confirm")return;const o=await H.v1Comp.compcontrollerDownload({compId:i.id,savePath:e.path,compName:i.name,version:i.version}),{isRepeat:T=!1}=o.data;if(T){if(await W.confirm(a("comp.downloadCoverConfirm",{name:i.name}),a("common.info"),{confirmButtonText:a("common.confirm"),cancelButtonText:a("common.cancel"),type:"warning"}).catch(()=>{})!=="confirm"){t.close();return}await H.v1Comp.compcontrollerDownload({compId:i.id,savePath:e.path,compName:i.name,isCover:!0,version:i.version})}Ee.success(a("message.success.download")),f("downloadSuccess"),s.value?.close()}finally{t.close()}}return(e,t)=>{const n=we;return p(),P(Y,null,[l(qe,null,{default:m(({isLogin:o})=>[Ye(e.$slots,"default",{downloadHandler:d,isLogin:o},()=>[l(n,{type:"primary",link:"",onClick:T=>d(o)},{default:m(()=>[$(M(u(a)("common.download")),1)]),_:1},8,["onClick"])])]),_:3}),l(Je,{ref:"dialogVueFinder",onDownload:r},null,512)],64)}}}),fo={class:"h-[calc(100vh-160px)]"},vo=O({__name:"index",props:{compName:{type:String,default:""}},setup(_){const{t:c}=R(),a=_,i=ce(),{compId:f}=i.params,s=x({data:[],column:[{prop:"prevVersion",label:C(()=>c("team.prevVersion")),align:"center"},{prop:"newVersion",label:C(()=>c("team.newVersion")),align:"center"},{prop:"upgradeDesc",label:C(()=>c("team.upgradeDesc")),align:"center",showOverflowTooltip:{popperClass:"table-text-tooltip"}},{slot:"operation",prop:"operation",label:C(()=>c("common.operation")),align:"center"}],pagination:{total:0},fixedHeight:!1,fetchData:r}),d=C(()=>({id:f,name:a.compName}));async function r(e){if(!f)return;const t=await X.v1Comp.compcontrollerUpgraderecords({compId:f,...e}),{rows:n,total:o}=t.data||{};s.value.data=n||[],s.value.pagination.total=o||0}return(e,t)=>{const n=Pe;return p(),P("div",fo,[l(u(Oe),{tableConfig:s.value,border:"",stripe:""},{operation:m(({col:o})=>[l(n,q(J(o)),{default:m(({row:T})=>[l(ie,q(J({version:T.newVersion,...d.value})),null,16)]),_:1},16)]),_:1},8,["tableConfig"])])}}}),go={class:"size-full"},Co={class:"flex items-center"},ho={class:"flex-1"},wo={class:"text-xs ml-auto"},To=O({__name:"index",props:{version:{type:String,default:""},compAttrs:{type:Object,default:()=>({})}},setup(_){const c=_,{t:a}=R(),i=le(),f=C(()=>se.handleDepData(c.compAttrs.dep??[]));return(s,d)=>{const r=ne,e=ye;return p(),V(u(ao),{class:"size-full flex-1 shrink-0 flex flex-col gap-1",bg:_.compAttrs?.bgColor},{default:m(({bg:t,updateColor:n})=>[l(r,{"body-class":"!p-0 !overflow-visible",class:"flex-1 relative z-10"},{default:m(()=>[b("div",go,[l(oo,{compAttrs:_.compAttrs,version:_.version,bgColor:t,compType:u(w).IFRAME_ROUTES.ITEM.PREVIEW_REMOTE},null,8,["compAttrs","version","bgColor","compType"])])]),_:2},1024),b("div",Co,[b("div",ho,[l(u(lo),{compDeps:f.value,depsSetting:u(i).deps},null,8,["compDeps","depsSetting"])]),b("span",wo,[b("span",null,M(u(a)("comp.bgPanel"))+":",1),l(e,{teleported:!0,modelValue:t,clearable:"",onChange:n,onActiveChange:n},null,8,["modelValue","onChange","onActiveChange"])])])]),_:1},8,["bg"])}}}),Eo={class:"size-full p-[10px] pr-0"},Po={key:0,class:"h-[50vh]"},yo={class:"flex-1"},Mo={class:"mt-2"},Xo=O({__name:"index",props:{isTeamPreview:{type:Boolean,default:!1}},setup(_){const{t:c}=R(),a=_,i=ce(),f=i.query[w.ROUTE_STATE_KEY_VERSION]!==void 0,{compId:s}=i.params,d=C(()=>[{label:c("common.doc"),value:"doc",component:Qe,visible:()=>!0},{label:c("common.upgradeRecord"),value:"upgradeRecord",component:vo,visible:()=>!0}]),r=new Map;Le(w.PROVIDE_KEY_CALLBACKS,r);const e=Fe(),{teamId:t}=Xe(),n=x(!1),o=Me(ke,d.value[0]?.value),T=le(),L=$e(),S=Ze(s)(),E=x(S.latestVersion),Q=x(!1),v=C(()=>S.detail[E.value]),me=C(()=>v.value?.desc??""),ue=C(()=>Object.keys(v.value??{}).length>0),Z=C(()=>S.versionToFileAccessPath[E.value]??[]),pe=C(()=>Z.value.length?d.value.find(g=>g.value===o.value)?.component:void 0),de=C(()=>o.value==="doc"?{mdSrc:_e.value,compDesc:me.value,scrollContainer:".preview-container"}:o.value==="upgradeRecord"?{compName:v.value?.name||""}:{}),_e=C(()=>Z.value.find(h=>h.path.endsWith(`/${w.COMP_README_FILENAME}`))?.signedUrl??"");async function ee(){if(await T.initSetting(),!s)throw new Error("compId is required");const h=await X.v1Comp.compcontrollerCompdetail({compId:s,version:E.value}),{objectId:g,version:A,files:D,dep:F}=h.data,z={objectId:g,version:A,files:D.map(K=>K.path)},j=await H.v1Comp.compcontrollerCompfilesosssignedurl(z),y=eo(F,T.deps).map(K=>K.name),U=await H.v1Module.modulecontrollerPrebuild({deps:y}),{entryNameToFile:oe={}}=U.data;S.setDepEntryNameToFile(A,oe),S.setVersionToFileAccessPath(A,j.data.signedUrls),S.setDetail(A,{...h.data,_id:s}),E.value||(S.setLatestVersion(A),E.value=A)}function fe(){return Promise.resolve(v.value)}function ve(){a.isTeamPreview?L.addPayLoad(`/previewTeam/${t}/${s}`,{name:v.value?.name??""}):L.addPayLoad(`/preview/${s}`,{name:v.value?.name??""})}function ge(){window?.umami?.track(ae.PREVIEW_OPEN_NEWTAB,{compId:s,version:E.value});const{href:h}=e.resolve({name:"previewBlank",params:{compId:s,version:E.value}});window.open(h,"_blank")}return te(E,async h=>{h!==v.value?.version&&await ee()}),te(o,(h,g)=>{g&&h!==g&&window?.umami?.track(ae.PREVIEW_TAB_CHANGE,{compId:s,from:g,to:h})}),re(async()=>{(!ue.value||f)&&await ee(),ve(),Q.value=!0}),(h,g)=>{const A=ze("Icon"),D=be,F=ne,z=Ve,j=Ae;return p(),P("div",Eo,[l(j,{"wrap-class":"preview-container",class:"size-full pr-[10px]"},{default:m(()=>[Q.value?(p(),P("div",Po,[l(u(Ge),{title:v.value?.name,actions:["maximize"]},{beforeActions:m(()=>[l(D,{type:"primary",circle:"",title:u(c)("common.openInNewPage"),onClick:ge},{default:m(()=>[l(A,{icon:"material-symbols:screen-share-rounded"})]),_:1},8,["title"])]),default:m(()=>[l(To,{compAttrs:v.value,version:E.value},null,8,["compAttrs","version"])]),_:1},8,["title"])])):I("",!0),l(F,{"body-class":"!p-0 flex items-center gap-1",class:"sticky top-0 mt-1 w-full z-10"},{default:m(()=>[b("div",yo,[l(u(to),{modelValue:u(o),"onUpdate:modelValue":g[0]||(g[0]=y=>je(o)?o.value=y:null),options:d.value},null,8,["modelValue","options"])]),l(D,{color:"#414141",onClick:g[1]||(g[1]=y=>n.value=!0)},{default:m(()=>[$(M(u(c)("common.terminal")),1)]),_:1}),l(co,{id:v.value?._id,modelValue:E.value,"onUpdate:modelValue":g[2]||(g[2]=y=>E.value=y),version:v.value?.version},null,8,["id","modelValue","version"]),l(ie,{id:v.value?._id,name:v.value?.name,version:v.value?.version},{default:m(({downloadHandler:y,isLogin:U})=>[l(D,{type:"primary",onClick:oe=>y(U)},{default:m(()=>[$(M(u(c)("common.download")),1)]),_:1},8,["onClick"])]),_:1},8,["id","name","version"])]),_:1}),b("div",Mo,[l(u(De),null,{default:m(()=>[(p(),V(Ue,null,[(p(),V(Ke(pe.value),q(J(de.value)),null,16))],1024))]),_:1})]),l(z,{right:100,bottom:100,target:".preview-container"})]),_:1}),l(u(no),{modelValue:n.value,"onUpdate:modelValue":g[3]||(g[3]=y=>n.value=y),title:u(c)("common.depInstall"),width:"70%",top:"5vh","destroy-on-close":""},{default:m(()=>[v.value?._id?(p(),V(_o,{key:0,class:"h-[70vh]",compId:v.value?._id,getCompDetail:fe},null,8,["compId"])):I("",!0)]),_:1},8,["modelValue","title"])])}}});export{Xo as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{R as le,P as ce,aH as Z,ac as I,x as ee,f as te,e as ne,y as ae,U as ie,K as de,J as ue}from"./vendor-ui-CGT0cG1n.js";import{u as x,j as me,z as fe,D as pe,p as L,q as H,f as _e,i as he}from"./index-CdLdwW7r.js";/* empty css */import{v as C,aA as M,aB as ve,ab as h,j as y,aO as u,r as m,ax as c,i as l,q as w,ap as f,a7 as be,aN as ge,l as N,F as K,ah as W,af as E,w as xe,a0 as we,Q as ye,K as De,al as Ee,g as T}from"./vendor-core-BKehvho7.js";import{_ as Ie}from"./BaseSegmented.vue_vue_type_script_setup_true_lang-DU79Plk1.js";const Be=C({__name:"RadioMatch",props:{modelValue:{default:""},modelModifiers:{}},emits:["update:modelValue"],setup(t){const{t:e}=M(),n=ve(t,"modelValue");function s(r){n.value=String(r??"")}return(r,o)=>{const a=ce,d=le;return h(),y(d,{"model-value":n.value,class:"flex flex-wrap gap-2",onChange:s},{default:u(()=>[m(a,{value:c(x).COMP_MATCH_TYPE_ONLY_INSTALL,class:"!flex !items-center !gap-1 !m-0 !h-auto"},{default:u(()=>[o[0]||(o[0]=l("span",{class:"inline-block w-2 h-2 rounded-full mr-1 bg-green-500 shadow-[0_0_4px_rgba(103,194,58,0.5)]"},null,-1)),w(" "+f(c(e)("deps.match.onlyInstall")),1)]),_:1},8,["value"]),m(a,{value:c(x).COMP_MATCH_TYPE_MAJOR_VERSION,class:"!flex !items-center !gap-1 !m-0 !h-auto"},{default:u(()=>[o[1]||(o[1]=l("span",{class:"inline-block w-2 h-2 rounded-full mr-1 bg-blue-500 shadow-[0_0_4px_rgba(64,158,255,0.5)]"},null,-1)),w(" "+f(c(e)("deps.match.majorVersion")),1)]),_:1},8,["value"]),m(a,{value:c(x).COMP_MATCH_TYPE_MINOR_VERSION,class:"!flex !items-center !gap-1 !m-0 !h-auto"},{default:u(()=>[o[2]||(o[2]=l("span",{class:"inline-block w-2 h-2 rounded-full mr-1 bg-orange-500 shadow-[0_0_4px_rgba(230,162,60,0.5)]"},null,-1)),w(" "+f(c(e)("deps.match.minorVersion")),1)]),_:1},8,["value"]),m(a,{value:c(x).COMP_MATCH_TYPE_EXACT_VERSION,class:"!flex !items-center !gap-1 !m-0 !h-auto"},{default:u(()=>[o[3]||(o[3]=l("span",{class:"inline-block w-2 h-2 rounded-full mr-1 bg-red-500 shadow-[0_0_4px_rgba(245,108,108,0.5)]"},null,-1)),w(" "+f(c(e)("deps.match.exactVersion")),1)]),_:1},8,["value"])]),_:1},8,["model-value"])}}}),B=me(Be,[["__scopeId","data-v-911ad151"]]),Ce={class:"flex gap-2"},Me={class:"text-xl font-medium"},Ve={class:"flex items-center gap-[10px] mb-[15px] pb-[10px] border-b border-solid border-gray-200"},Se={class:"text-[14px] font-medium"},Te={class:"border-b border-solid border-gray-300"},Ae={class:"flex"},Pe={class:"w-[100px]"},Le={class:"text-xl font-medium"},Ne={class:"flex items-center gap-[10px] mb-[15px] pb-[10px] border-b border-solid border-gray-200"},ke={class:"text-[14px] font-medium"},Re={class:"border-b border-solid border-gray-300"},Oe={class:"flex"},je={class:"w-[100px]"},Ue=C({__name:"index",setup(t){const{t:e}=M(),n=fe(),s=Z(pe,{dependencies:[],devDependencies:[]}),r=E([]),o=E([]),a=E(""),d=E("");function i(){r.value.forEach(v=>{v.match=a.value}),window?.umami?.track(L.SETTING_APPLY_RULE,{type:"dependencies",match:a.value})}function p(){o.value.forEach(v=>{v.match=d.value}),window?.umami?.track(L.SETTING_APPLY_RULE,{type:"devDependencies",match:d.value})}return be(async()=>{r.value=I(n.dependencies),o.value=I(n.devDependencies)}),ge(()=>{r.value.length&&n.setDependencies(I(r.value)),o.value.length&&n.setDevDependencies(I(o.value)),s.value={dependencies:r.value.length?r.value:s.value.dependencies,devDependencies:o.value.length?o.value:s.value.devDependencies}}),(v,b)=>{const z=ne,F=ae,$=te,Y=ee,re=ie;return h(),y(re,{"wrap-class":"size-full"},{default:u(()=>[l("div",Ce,[m(Y,{"label-position":"left","label-width":"auto"},{default:u(()=>[m($,{class:"rounded-sm"},{default:u(()=>[l("h1",Me,f(c(e)("deps.dependencies")),1),l("div",Ve,[l("span",Se,f(c(e)("deps.batchSetting"))+":",1),m(c(B),{modelValue:a.value,"onUpdate:modelValue":b[0]||(b[0]=_=>a.value=_)},null,8,["modelValue"]),m(z,{type:"primary",size:"small",onClick:i},{default:u(()=>[w(f(c(e)("common.apply")),1)]),_:1})]),(h(!0),N(K,null,W(r.value,_=>(h(),y(F,{key:_.name,class:"!mb-10"},{label:u(()=>[l("div",Te,[l("span",null,f(_.name),1)])]),default:u(()=>[l("div",Ae,[l("span",Pe,f(_.version),1)]),l("div",null,[m(c(B),{modelValue:_.match,"onUpdate:modelValue":S=>_.match=S},null,8,["modelValue","onUpdate:modelValue"])])]),_:2},1024))),128))]),_:1})]),_:1}),m(Y,{"label-position":"left","label-width":"auto"},{default:u(()=>[m($,{class:"rounded-sm"},{default:u(()=>[l("h1",Le,f(c(e)("deps.devDependencies")),1),l("div",Ne,[l("span",ke,f(c(e)("deps.batchSetting"))+":",1),m(c(B),{modelValue:d.value,"onUpdate:modelValue":b[1]||(b[1]=_=>d.value=_)},null,8,["modelValue"]),m(z,{type:"primary",size:"small",onClick:p},{default:u(()=>[w(f(c(e)("common.apply")),1)]),_:1})]),(h(!0),N(K,null,W(o.value,_=>(h(),y(F,{key:_.name,class:"!mb-10"},{label:u(()=>[l("div",Re,[l("span",null,f(_.name),1)])]),default:u(()=>[l("div",Oe,[l("span",je,f(_.version),1)]),l("div",null,[m(c(B),{modelValue:_.match,"onUpdate:modelValue":S=>_.match=S},null,8,["modelValue","onUpdate:modelValue"])])]),_:2},1024))),128))]),_:1})]),_:1})])]),_:1})}}}),k=(t,e)=>e.some(n=>t instanceof n);let G,X;function ze(){return G||(G=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Fe(){return X||(X=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const R=new WeakMap,A=new WeakMap,V=new WeakMap;function $e(t){const e=new Promise((n,s)=>{const r=()=>{t.removeEventListener("success",o),t.removeEventListener("error",a)},o=()=>{n(D(t.result)),r()},a=()=>{s(t.error),r()};t.addEventListener("success",o),t.addEventListener("error",a)});return V.set(e,t),e}function Ye(t){if(R.has(t))return;const e=new Promise((n,s)=>{const r=()=>{t.removeEventListener("complete",o),t.removeEventListener("error",a),t.removeEventListener("abort",a)},o=()=>{n(),r()},a=()=>{s(t.error||new DOMException("AbortError","AbortError")),r()};t.addEventListener("complete",o),t.addEventListener("error",a),t.addEventListener("abort",a)});R.set(t,e)}let O={get(t,e,n){if(t instanceof IDBTransaction){if(e==="done")return R.get(t);if(e==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return D(t[e])},set(t,e,n){return t[e]=n,!0},has(t,e){return t instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in t}};function oe(t){O=t(O)}function He(t){return Fe().includes(t)?function(...e){return t.apply(j(this),e),D(this.request)}:function(...e){return D(t.apply(j(this),e))}}function Ke(t){return typeof t=="function"?He(t):(t instanceof IDBTransaction&&Ye(t),k(t,ze())?new Proxy(t,O):t)}function D(t){if(t instanceof IDBRequest)return $e(t);if(A.has(t))return A.get(t);const e=Ke(t);return e!==t&&(A.set(t,e),V.set(e,t)),e}const j=t=>V.get(t);function We(t,e,{blocked:n,upgrade:s,blocking:r,terminated:o}={}){const a=indexedDB.open(t,e),d=D(a);return s&&a.addEventListener("upgradeneeded",i=>{s(D(a.result),i.oldVersion,i.newVersion,D(a.transaction),i)}),n&&a.addEventListener("blocked",i=>n(i.oldVersion,i.newVersion,i)),d.then(i=>{o&&i.addEventListener("close",()=>o()),r&&i.addEventListener("versionchange",p=>r(p.oldVersion,p.newVersion,p))}).catch(()=>{}),d}const Ge=["get","getKey","getAll","getAllKeys","count"],Xe=["put","add","delete","clear"],P=new Map;function J(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(P.get(e))return P.get(e);const n=e.replace(/FromIndex$/,""),s=e!==n,r=Xe.includes(n);if(!(n in(s?IDBIndex:IDBObjectStore).prototype)||!(r||Ge.includes(n)))return;const o=async function(a,...d){const i=this.transaction(a,r?"readwrite":"readonly");let p=i.store;return s&&(p=p.index(d.shift())),(await Promise.all([p[n](...d),r&&i.done]))[0]};return P.set(e,o),o}oe(t=>({...t,get:(e,n,s)=>J(e,n)||t.get(e,n,s),has:(e,n)=>!!J(e,n)||t.has(e,n)}));const Je=["continue","continuePrimaryKey","advance"],Q={},U=new WeakMap,se=new WeakMap,Qe={get(t,e){if(!Je.includes(e))return t[e];let n=Q[e];return n||(n=Q[e]=function(...s){U.set(this,se.get(this)[e](...s))}),n}};async function*qe(...t){let e=this;if(e instanceof IDBCursor||(e=await e.openCursor(...t)),!e)return;e=e;const n=new Proxy(e,Qe);for(se.set(n,e),V.set(n,j(e));e;)yield n,e=await(U.get(n)||e.continue()),U.delete(n)}function q(t,e){return e===Symbol.asyncIterator&&k(t,[IDBIndex,IDBObjectStore,IDBCursor])||e==="iterate"&&k(t,[IDBIndex,IDBObjectStore])}oe(t=>({...t,get(e,n,s){return q(e,n)?qe:t.get(e,n,s)},has(e,n){return q(e,n)||t.has(e,n)}}));let g=null;const Ze=xe("indexedDB",{actions:{async open(t=1){return g||(g=await We(x.INDEX_DB_NAME,t,{upgrade(e){e.objectStoreNames.contains(x.INDEX_DB_TABLE_NAME)||e.createObjectStore(x.INDEX_DB_TABLE_NAME,{keyPath:"hash",autoIncrement:!1}).createIndex("by-hash","hash")},blocked(){console.warn("IndexedDB 被其它标签页占用")}}),g)},async get(t,e){return(await this.open()).get(t,e)},async put(t,e){return(await this.open()).put(t,e)},async remove(t,e){return(await this.open()).delete(t,e)},close(){g?.close(),g=null},async deleteDatabase(){if(g){const t=g.name;this.close(),indexedDB.deleteDatabase(t)}}}}),et={class:"flex items-center"},tt={class:"ml-2"},nt=C({__name:"index",setup(t){const{t:e}=M(),n=Ze(),s=E("");async function r(){try{if(!navigator.storage||!navigator.storage.estimate)throw new Error(e("message.error.storageNotSupported"));return await navigator.storage.estimate()}catch(d){return console.error("获取存储统计失败:",d.message),null}}function o(){de.confirm(e("common.clearCacheConfirm"),e("common.info"),{confirmButtonText:e("common.confirm"),cancelButtonText:e("common.cancel"),type:"warning",beforeClose:async(d,i,p)=>{d==="confirm"&&(i.confirmButtonLoading=!0,await H.v1Module.modulecontrollerClearprebuild(),await n.deleteDatabase(),i.confirmButtonLoading=!1,await a(),ue.success(e("common.cacheCleared")),window?.umami?.track(L.CLEAR_CACHE)),p()}}).catch(()=>{})}async function a(){const d=await r(),i=await H.v1Module.modulecontrollerPrebuildsize(),{size:p=0}=i.data??{},{usage:v=0}=d??{},b=(v+p)/(1024*1024);s.value=`${b.toFixed(2)} MB`}return we(async()=>{await a()}),(d,i)=>{const p=ne,v=ae,b=ee;return h(),y(b,null,{default:u(()=>[m(v,{label:c(e)("common.cache")+":"},{default:u(()=>[l("div",et,[m(p,{onClick:o},{default:u(()=>[w(f(c(e)("common.clearCache")),1)]),_:1}),l("span",tt,f(c(e)("common.cacheSize"))+":"+f(s.value),1)])]),_:1},8,["label"])]),_:1})}}}),at={class:"size-full overflow-hidden flex flex-col rounded-sm"},ot={class:"flex-1 overflow-auto overflow-x-hidden p-1"},dt=C({__name:"index",setup(t){const{t:e}=M(),n=Z(_e,"previewRule"),s=[{label:T(()=>e("setting.previewRule")),value:"previewRule",component:Ue},{label:T(()=>e("setting.other")),value:"otherSetting",component:nt}],r=T(()=>s.find(a=>a.value===n.value)?.component||{render:()=>null});return(o,a)=>{const d=te;return h(),N("div",at,[m(d,{"body-class":"!p-0",class:"sticky top-0 w-full"},{default:u(()=>[m(c(Ie),{modelValue:c(n),"onUpdate:modelValue":a[0]||(a[0]=i=>ye(n)?n.value=i:null),options:s},null,8,["modelValue"])]),_:1}),l("div",ot,[m(c(he),null,{default:u(()=>[(h(),y(De,null,[(h(),y(Ee(r.value)))],1024))]),_:1})])])}}});export{dt as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{aJ as L,U as O,b as k}from"./vendor-ui-CGT0cG1n.js";import{u as s,B as R,t as u,p as T}from"./index-CdLdwW7r.js";import{c as b,a as I}from"./index.vue_vue_type_script_setup_true_lang-DTrkhAMQ.js";import{v as S,aA as P,y as A,aC as x,aD as M,ac as d,aF as B,a9 as D,aP as K,ax as n,ab as N,l as F,r as c,aO as f,af as $,g as l,ao as U}from"./vendor-core-BKehvho7.js";import{u as V}from"./useKeyword-bWHMALoZ.js";import"./index-BYC9CuLh.js";import"./useCompMetaLocalStore-BKTMp_k8.js";/* empty css */import"./useVscodeOpen-SZpyzVHG.js";import"./BaseDialog.vue_vue_type_script_setup_true_lang-BROcUfEh.js";import"./useCacheOssStore-OAoLDVbw.js";import"./useTeamHeaders-DxHN7-t0.js";import"./EmptyStatusContainer.vue_vue_type_script_setup_true_lang-pswB5SUz.js";import"./useMessage-BVw3M4ej.js";const Y={class:"size-full p-[10px] pr-0"},se=S({__name:"index",setup(z){const{t:p}=P(),_=A()?.uid,C=x(),w=M(),o=b(C.path)();d(s.PROVIDE_KEY_COMP_LIST_STORE,o);const m=new Map;d(s.PROVIDE_KEY_CALLBACKS,m);const y=B("compIframeContainer"),i=$({data:[],search:{column:[{prop:"keyword",component:U(k),label:l(()=>p("common.keyword")),value:"",autoQuery:!1,attributes:{placeholder:l(()=>p("comp.keywordPlaceholder")),fetchSuggestions:h,triggerOnFocus:!1,style:"width: 400px",fitInputWidth:!0}}]},pagination:{total:0,attributes:{pageSizes:[10,20,30]}},autoLoading:!1,fetchData:E}),g=l(()=>i.value?.search?.column[0]?.value??"");V(g,y);function h(e,t){if(e.length<=1)return t([]);u.v1Keyword.keywordcontrollerQuerykeywordscomp({keyword:e,type:"compMyCollect"}).then(a=>{const{keywords:r=[]}=a.data||{};t(r)})}async function E(e){o.setLoading(!0),e.keyword&&window?.umami?.track(T.SEARCH_COMPONENT,{keyword:e.keyword,page:"collect"});const t=await u.v1Comp.compcontrollerCollectedcomps(e),{rows:a,total:r}=t.data??{};o.renderList(a??[]),i.value.pagination.total=r??0,o.setLoading(!1)}function v(e){w.push({path:`/preview/${e}`})}return m.set(s.COMP_METHOD_KEY_AFTER_COMP_CANCEL_COLLECT,e=>{o.delCompListById(e)}),D(()=>{o.$reset()}),(e,t)=>{const a=O,r=L;return K((N(),F("div",Y,[c(n(R),{tableConfig:i.value},{table:f(()=>[c(a,{always:"",wrapClass:"pr-[10px]"},{default:f(()=>[c(I,{ref:"compIframeContainer",iuid:n(_),compType:n(s).IFRAME_ROUTES.CONTAINER.COLLECT,onPreview:v},null,8,["iuid","compType"])]),_:1})]),_:1},8,["tableConfig"])])),[[r,n(o).loading]])}}});export{se as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a3 as i}from"./vendor-ui-CGT0cG1n.js";import{z as u,F as d,j as l}from"./index-CdLdwW7r.js";import{v as _,aA as g,aD as m,ab as f,j as S,aO as x,i as b,Z as h,ax as s,ap as t,g as C}from"./vendor-core-BKehvho7.js";const k=_({__name:"index",setup(U){const{t:a}=g(),o=u(),e=d(),r=m(),n=C(()=>e.isUpgrade?a("upgrade.hasUpdate"):a("upgrade.betaVersion"));function p(){r.push({name:"upgrade"})}return(V,v)=>{const c=i;return f(),S(c,{type:"primary",round:"",class:"cursor-pointer","disable-transitions":"",onClick:p},{default:x(()=>[b("span",{class:h({"is-upgrade":s(e).isUpgrade})},t(n.value)+" "+t(s(o).compHubVersion),3)]),_:1})}}}),z=l(k,[["__scopeId","data-v-cb2ac669"]]);export{z as S};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{v as _,ab as v,l as C,r as c,ax as p,aC as x,ac as D,a7 as I,aO as R,k,af as P,g as O}from"./vendor-core-BKehvho7.js";import{c as V,p as $}from"./index-BYC9CuLh.js";import{u as E,z,t as F,q as f}from"./index-CdLdwW7r.js";import{_ as N}from"./index.vue_vue_type_script_setup_true_lang-DtCu4Izc.js";import{_ as B}from"./EmptyStatusContainer.vue_vue_type_script_setup_true_lang-pswB5SUz.js";import"./vendor-ui-CGT0cG1n.js";import"./useMessage-BVw3M4ej.js";const L={class:"size-full"},j=_({__name:"index",props:{version:{type:String,default:""},compAttrs:{type:Object,default:()=>({})}},setup(e){return(l,a)=>(v(),C("div",L,[c(N,{compAttrs:e.compAttrs,version:e.version,bgColor:e.compAttrs?.bgColor,compType:p(E).IFRAME_ROUTES.ITEM.PREVIEW_REMOTE},null,8,["compAttrs","version","bgColor","compType"])]))}}),q={key:0,class:"size-full"},Q=_({__name:"index",setup(e){const l=x(),a=z(),A=new Map;D(E.PROVIDE_KEY_CALLBACKS,A);const{compId:t,version:r=""}=l.params,m=P(!1),o=V(t)(),d=O(()=>o.detail[r]);async function g(){if(await a.initSetting(),!t)throw new Error("compId is required");const n=await F.v1Comp.compcontrollerCompdetail({compId:t,version:r}),{objectId:u,version:s,files:y,dep:b}=n.data,w={objectId:u,version:s,files:y.map(i=>i.path)},S=await f.v1Comp.compcontrollerCompfilesosssignedurl(w),h=$(b,a.deps).map(i=>i.name),M=await f.v1Module.modulecontrollerPrebuild({deps:h}),{entryNameToFile:T={}}=M.data;o.setDetail(s,{...n.data,_id:t}),o.setDepEntryNameToFile(s,T),o.setVersionToFileAccessPath(s,S.data.signedUrls)}return I(async()=>{await g(),m.value=!0}),(n,u)=>m.value?(v(),C("div",q,[c(p(B),{isEmpty:!d.value,class:"size-full"},{default:R(()=>[c(j,{compAttrs:d.value,version:p(r)},null,8,["compAttrs","version"])]),_:1},8,["isEmpty"])])):k("",!0)}});export{Q as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.pane-card[data-v-96c02aae] .pane-body{padding:0!important;display:flex;flex-direction:column;overflow:hidden}.pane-card[data-v-96c02aae] .pane-header{padding:0!important}.pane-maximized[data-v-96c02aae]{position:fixed;inset:0;z-index:50}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-qsIY_6aA.js","./vendor-ui-CGT0cG1n.js","./vendor-core-BKehvho7.js","./index-CdLdwW7r.js","./index-DIKKFNiV.css","./index.vue_vue_type_script_setup_true_lang-DTrkhAMQ.js","./index-BYC9CuLh.js","./useCompMetaLocalStore-BKTMp_k8.js","./useVscodeOpen-SZpyzVHG.js","./BaseDialog.vue_vue_type_script_setup_true_lang-BROcUfEh.js","./useCacheOssStore-OAoLDVbw.js","./useTeamHeaders-DxHN7-t0.js","./EmptyStatusContainer.vue_vue_type_script_setup_true_lang-pswB5SUz.js","./useMessage-BVw3M4ej.js","./el-link-CPQZ-olG.css","./useCompEditStore-DI3vFtGm.js","./v4-EwEgHOG0.js","./index.vue_vue_type_style_index_0_lang-BNPcBMvg.js","./core-CcVTMiBP.js","./index-Dj51p5I8.css","./PanelBackground.vue_vue_type_script_setup_true_lang-BELCrrRh.js","./BaseSegmented.vue_vue_type_script_setup_true_lang-DU79Plk1.js","./LoadingWrapper.vue_vue_type_script_setup_true_lang-kJcgjuK5.js","./useCompEditStore-EVZp94pg.css","./el-card-BAyktVMS.css","./index.vue_vue_type_style_index_0_lang-1ZphBFBL.js","./index-CdWXO9ks.css","./useKeyword-bWHMALoZ.js","./index-9E0N8vk2.js","./index-Dd9Tvz1_.css","./index-BHUDEWGt.js","./el-table-column-CGzXlVpD.js","./el-table-column-B3ZEEuPD.css","./moment-B-YVwB4U.js","./index-qSRqezAW.js","./index-bdWvkmhc.js","./index.vue_vue_type_script_setup_true_lang-BYKlY94g.js","./index-DOlF0Z_P.css","./index-BblV7ZcF.js","./index-Dfkpa19a.js","./AuthCodeSendBtn.vue_vue_type_script_setup_true_lang-CP9hjm3T.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{j as ce,B as q,u as P,i as X,t as B,I as L,A as de,g as me,p as pe,_ as S}from"./index-CdLdwW7r.js";import{X as ue,z as _e,a2 as fe,e as J,U as W,ac as ve,s as he,b as ge,W as ye,J as be,f as Z,c as Ce,a3 as we,aH as xe,d as Te,K as Ae}from"./vendor-ui-CGT0cG1n.js";import{_ as Ee}from"./el-table-column-CGzXlVpD.js";/* empty css */import{_ as ke}from"./index.vue_vue_type_script_setup_true_lang-BYKlY94g.js";import{v as M,ab as g,l as N,i as r,ap as f,ai as G,g as i,ay as Ie,j as E,ax as e,X as ee,aO as s,aB as Le,r as a,al as H,aA as z,_ as De,A as $e,q as D,aC as te,ac as j,aF as ae,aM as oe,a9 as se,y as Me,K as ne,af as F,ao as Y,aD as Se,a3 as Oe,a2 as Ve,a7 as Re,Q as Pe,u as O}from"./vendor-core-BKehvho7.js";import{c as Be,a as Ne,b as K}from"./index.vue_vue_type_script_setup_true_lang-DTrkhAMQ.js";import{_ as ze}from"./LoadingWrapper.vue_vue_type_script_setup_true_lang-kJcgjuK5.js";import{u as Ue}from"./useKeyword-bWHMALoZ.js";import{u as Fe,I as Q,e as Ge}from"./useMessage-BVw3M4ej.js";import{u as le}from"./useTeamHeaders-DxHN7-t0.js";import{I as ie}from"./index-BoIy-5_p.js";import{_ as He}from"./EmptyStatusContainer.vue_vue_type_script_setup_true_lang-pswB5SUz.js";import{_ as Ke}from"./BaseSegmented.vue_vue_type_script_setup_true_lang-DU79Plk1.js";import"./useCacheOssStore-OAoLDVbw.js";import"./index-BYC9CuLh.js";import"./useCompMetaLocalStore-BKTMp_k8.js";/* empty css */import"./useVscodeOpen-SZpyzVHG.js";import"./BaseDialog.vue_vue_type_script_setup_true_lang-BROcUfEh.js";const je={class:"flex items-center justify-center gap-[6px] leading-[15px]"},Ye={class:"text-xs leading-3 align-middle"},Qe={class:"inline-block align-middle shrink-0"},qe=M({__name:"UserAvatar",props:{nickname:{type:String,default:""},teamUserNickname:{type:String,default:""}},setup(d){const t=d,o=i(()=>t.teamUserNickname||t.nickname||"--");return(c,C)=>(g(),N("div",je,[r("span",Ye,f(o.value),1),r("div",Qe,[G(c.$slots,"avatar",{},void 0,!0)])]))}}),Xe=ce(qe,[["__scopeId","data-v-f90b87fa"]]),Je=M({__name:"SkeletonContainer",setup(d){const t=Ie();return(o,c)=>(g(),E(e(ue),ee({rows:3,animated:""},e(t)),{default:s(()=>[G(o.$slots,"default")]),template:s(()=>[G(o.$slots,"template")]),_:3},16))}}),We='<path class="cdj_y1r7t"/>',Ze={__name:"grid-view-rounded",props:["width","height"],setup(d){const t={width:24,height:24};return(o,c)=>(g(),E(e(ie),{width:d.width,height:d.height,viewBox:t,content:We,fallback:"material-symbols:grid-view-rounded"},null,8,["width","height"]))}},et='<path class="u2_fvl-wz"/>',tt={__name:"view-list",props:["width","height"],setup(d){const t={width:24,height:24};return(o,c)=>(g(),E(e(ie),{width:d.width,height:d.height,viewBox:t,content:et,fallback:"material-symbols:view-list"},null,8,["width","height"]))}},at=M({__name:"ViewToggle",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(d){const t=Le(d,"modelValue"),o=i(()=>t.value==="grid"?tt:Ze);function c(){t.value=t.value==="grid"?"list":"grid"}return(C,l)=>(g(),N("div",{class:"flex items-center rounded-sm cursor-pointer",onClick:c},[a(e(_e),{style:{"font-size":"25px"}},{default:s(()=>[(g(),E(H(o.value)))]),_:1})]))}}),ot={class:"size-full overflow-hidden"},st=M({__name:"ViewCompList",props:{data:{type:Array,default:()=>[]},selectedRows:{type:Array,default:()=>[]}},emits:["add-one-comp"],setup(d,{emit:t}){const{t:o}=z(),c=d,C=t,l=i(()=>({data:c.data,column:[{prop:"name",label:o("comp.name"),align:"center"},{prop:"version",label:o("comp.version"),align:"center"},{prop:"isAdd",label:o("team.added"),align:"center",formatter:m=>m.isAdd?o("common.yes"):o("common.no")},{prop:"desc",label:o("common.description"),align:"center",showOverflowTooltip:{popperClass:"table-text-tooltip"}},{slot:"operation",prop:"operation",label:o("common.operation"),align:"center"}],isPagination:!1,autoLoading:!1})),w=(m,p)=>{p.start(),C("add-one-comp",m._id,()=>{p.end()})};return(m,p)=>{const I=J,x=fe;return g(),N("div",ot,[a(e(q),{ref:"baseTable",tableConfig:l.value,border:"",stripe:""},{operation:s(({col:T})=>[a(x,De($e(T)),{default:s(({row:u})=>[r("div",null,[a(e(ze),null,{default:s(({instance:n,loading:_})=>[a(I,{type:"primary",disabled:u.isAdd,loading:_,onClick:$=>w(u,n)},{default:s(()=>[D(f(u.isAdd?e(o)("team.added"):e(o)("common.add")),1)]),_:2},1032,["disabled","loading","onClick"])]),_:2},1024)])]),_:1},16)]),_:1},8,["tableConfig"])])}}}),nt={class:"size-full overflow-hidden"},lt=M({__name:"ViewCompGrid",props:{data:{type:Array,default:()=>[]},keyword:{type:String,default:""}},emits:["add-one-comp"],setup(d,{emit:t}){const o=d,c=t,C=Me(),l=te(),{sendMessageToTargetIframe:w,messageListener:m}=Ge(),p=Fe(!1,window.__GLOBAL_CONFIG__.subPort),{addListener:I}=m(),x=Be(`${l.path}_${P.SCOPE_ID_TEAM_ADD_MY_COMP}`)();j(P.PROVIDE_KEY_COMP_LIST_STORE,x);const T=new Map;j(P.PROVIDE_KEY_CALLBACKS,T);const u=ae("compIframeContainer");Ue(i(()=>o.keyword),u);const n=async()=>{x.setLoading(!0);const _=ve(o.data);x.renderList(_??[]),x.setLoading(!1)};return I(Q.ACTION_ADD_COMP_START_LOADING,_=>{c("add-one-comp",_,()=>{u.value?.sendMessageToTargetIframeByCompId($=>{$&&w($,Q.ACTION_ADD_COMP_FINISH_LOADING,"",p)})})}),oe(()=>o.data,()=>n(),{immediate:!0,deep:!0}),se(()=>{x.$reset()}),(_,$)=>{const y=W;return g(),N("div",nt,[a(y,{always:"",wrapClass:"pr-[10px]"},{default:s(()=>[a(Ne,{ref:"compIframeContainer",iuid:e(C)?.uid,compType:e(P).IFRAME_ROUTES.CONTAINER.TEAM_ADD},null,8,["iuid","compType"])]),_:1})])}}}),it={class:"size-full flex flex-col overflow-auto overflow-x-hidden"},rt={class:"flex gap-2 pb-2"},ct=M({__name:"index",setup(d,{expose:t}){const{t:o}=z(),{headers:c,teamId:C}=le(),l=K(C)(),w=F(!1),m=F(""),p=F({data:[],search:{column:[{prop:"keyword",component:Y(ge),label:i(()=>o("common.keyword")),value:"",autoQuery:!1,attributes:{placeholder:i(()=>o("comp.keywordPlaceholder")),fetchSuggestions:x,triggerOnFocus:!1,style:"width: 350px",fitInputWidth:!0}},{prop:"status",label:i(()=>o("common.status")),component:Y(ye),value:"NotAdded",attributes:{style:{width:"120px"},clearable:!0,options:[{label:i(()=>o("team.added")),value:"Added"},{label:i(()=>o("team.notAdded")),value:"NotAdded"}]}}]},pagination:{total:0,attributes:{pageSizes:[10,20,30]}},fetchData:T}),I=i(()=>p.value?.search?.column[0]?.value??"");function x(y,b){if(y.length<=1)return b([]);B.v1Keyword.keywordcontrollerQuerykeywordscomp({keyword:y,type:"compMy"},{headers:c}).then(k=>{const{keywords:A=[]}=k.data||{};b(A)})}async function T(y){const b=await B.v1Team.teamcontrollerAddtoteammycomps({...y},{headers:c}),{rows:k,total:A}=b.data||{};p.value.data=k||[],p.value.pagination.total=A||0}function u(){w.value=!0}function n(){w.value=!1}function _(){m.value=m.value??"list"}function $(y,b){B.v1Team.teamcontrollerCopycomp({compIds:[y]},{headers:c}).then(()=>{p.value.data?.forEach(A=>{y===A._id&&(A.isAdd=!0)});const k=l.teamDetail.compCount+1;l.setTeamDetail({...l.teamDetail,compCount:k}),be.success(o("team.addSuccess"))}).finally(b)}return t({open:u,close:n}),(y,b)=>{const k=he;return g(),E(k,{modelValue:w.value,"onUpdate:modelValue":b[1]||(b[1]=A=>w.value=A),title:e(o)("team.addComp"),resizable:"","with-header":!1,size:"50%","append-to-body":"",onOpened:_},{default:s(()=>[r("div",it,[a(e(q),{tableConfig:p.value},{tableBefore:s(()=>[r("div",rt,[a(e(at),{modelValue:m.value,"onUpdate:modelValue":b[0]||(b[0]=A=>m.value=A),class:"ml-auto"},null,8,["modelValue"])])]),table:s(()=>[a(e(X),null,{default:s(()=>[(g(),E(ne,null,[(g(),E(H(m.value==="grid"?lt:st),{data:p.value.data,keyword:I.value,onAddOneComp:$},null,40,["data","keyword"]))],1024))]),_:1})]),_:1},8,["tableConfig"])])]),_:1},8,["modelValue","title"])}}}),dt={class:"size-full overflow-hidden flex items-center gap-6"},mt={class:"flex-shrink-0"},pt={class:"flex flex-1 flex-col gap-3 overflow-hidden"},ut={class:"flex items-center gap-3"},_t={class:"text-xl font-bold"},ft={class:"flex items-center gap-1 rounded-full px-3 py-0.5 text-xs"},vt={class:"flex flex-wrap items-center gap-3"},ht={class:"!flex items-center gap-1"},gt={class:"!flex items-center gap-1"},yt={class:"!flex items-center gap-1"},bt={class:"!flex items-center gap-1"},Ct={class:"!flex items-center gap-1"},wt={class:"flex items-center gap-3 flex-shrink-0"},xt=M({__name:"index",setup(d){const{t}=z(),o=te(),c=Se(),{teamId:C}=o.params,l=K(C)(),w=ae("teamAddCompDrawer");function m(){w.value?.open()}function p(){c.push({name:"uploadTeam",params:{teamId:C}})}return(I,x)=>{const T=Ce,u=we,n=J,_=Z;return g(),E(_,{"body-class":"!p-0",class:"size-full rounded-sm p-4"},{default:s(()=>[a(e(Je),{rows:4,loading:e(l).loading},{default:s(()=>[r("div",dt,[r("div",mt,[a(T,{size:64,class:"bg-indigo-100"},{default:s(()=>[a(e(L),{icon:"material-symbols:layers-rounded",class:"text-3xl"})]),_:1})]),r("div",pt,[r("div",ut,[r("h2",_t,f(e(l).teamName),1),r("span",ft,[a(e(L),{icon:"material-symbols:check-circle-rounded",class:"text-green-500"}),D(" "+f(e(l).description),1)])]),r("div",vt,[a(u,{round:"",type:"info","disable-transitions":""},{default:s(()=>[r("div",ht,[a(e(L),{icon:"material-symbols:person-rounded"}),D(" "+f(e(t)("team.creator"))+" ",1),a(e(Xe),ee(e(l).creator,{teamUserNickname:e(l).creatorNickname}),{avatar:s(()=>[a(ke,{size:15,src:e(l).creator?.avatar},null,8,["src"])]),_:1},16,["teamUserNickname"])])]),_:1}),a(u,{round:"",type:"info","disable-transitions":""},{default:s(()=>[r("div",gt,[a(e(L),{icon:"material-symbols:tag-rounded"}),D(" "+f(e(t)("team.code"))+" ",1),a(e(Ee),{class:"text-xs",text:e(l).code},null,8,["text"])])]),_:1}),a(u,{round:"",type:"info","disable-transitions":""},{default:s(()=>[r("div",yt,[a(e(L),{icon:"material-symbols:group-rounded"}),D(" "+f(e(t)("team.member"))+" "+f(e(l).memberCount)+" "+f(e(t)("common.person")),1)])]),_:1}),a(u,{round:"",type:"info","disable-transitions":""},{default:s(()=>[r("div",bt,[a(e(L),{icon:"material-symbols:widgets-rounded"}),D(" "+f(e(t)("team.compCount"))+" "+f(e(l).compCount)+" "+f(e(t)("common.unit")),1)])]),_:1}),a(u,{round:"",type:"info","disable-transitions":""},{default:s(()=>[r("div",Ct,[a(e(L),{icon:"material-symbols:download-rounded"}),D(" "+f(e(t)("team.downloadCount"))+" "+f(e(l).totalDownloadCount),1)])]),_:1})]),r("div",wt,[a(n,{class:"!rounded-full !px-5 !py-2 !h-auto",onClick:m},{default:s(()=>[a(e(L),{icon:"material-symbols:format-list-bulleted-rounded",class:"mr-1"}),D(" "+f(e(t)("team.addFromMine")),1)]),_:1}),a(n,{type:"primary",class:"!rounded-full !px-5 !py-2 !h-auto",onClick:p},{default:s(()=>[a(e(L),{icon:"material-symbols:upload-rounded",class:"mr-1"}),D(" "+f(e(t)("comp.upload")),1)]),_:1})])])])]),_:1},8,["loading"]),a(ct,{ref:"teamAddCompDrawer"},null,512)]),_:1})}}}),Tt={class:"mt-2"},Kt=M({__name:"index",setup(d){const{t}=z(),o=O(()=>S(()=>import("./index-qsIY_6aA.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27]),import.meta.url)),c=O(()=>S(()=>import("./index-9E0N8vk2.js"),__vite__mapDeps([28,1,2,3,4,5,6,7,8,9,10,11,12,13,14,16,27,29,24]),import.meta.url)),C=O(()=>S(()=>import("./index-BHUDEWGt.js"),__vite__mapDeps([30,1,2,3,4,31,32,5,6,7,8,9,10,11,12,13,14,33,22]),import.meta.url)),l=O(()=>S(()=>import("./index-qSRqezAW.js"),__vite__mapDeps([34,1,2,3,4,11,5,6,7,8,9,10,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27]),import.meta.url)),w=O(()=>S(()=>import("./index-bdWvkmhc.js"),__vite__mapDeps([35,1,2,3,4,31,32,5,6,7,8,9,10,11,12,13,14,36,37]),import.meta.url)),m=O(()=>S(()=>import("./index-BblV7ZcF.js"),__vite__mapDeps([38,1,2,3,4,31,32,5,6,7,8,9,10,11,12,13,14,36,37,22]),import.meta.url)),p=O(()=>S(()=>import("./index-Dfkpa19a.js"),__vite__mapDeps([39,1,2,3,4,5,6,7,8,9,10,11,12,13,14,40,22,24]),import.meta.url)),I=[{label:i(()=>t("team.compLib")),value:"TeamCompList",component:o,visible:()=>!0},{label:i(()=>t("team.groupConfig")),value:"TeamCompGroup",component:c,visible:()=>n.isCreator},{label:i(()=>t("team.compManage")),value:"TeamCompManage",component:C,visible:()=>n.isCreator},{label:i(()=>t("team.myCompList")),value:"TeamMyCompList",component:l,visible:()=>!0},{label:i(()=>t("team.member")),value:"TeamMemberList",component:w,visible:()=>!0},{label:i(()=>t("team.applyList")),value:"TeamApplyList",component:m,visible:()=>n.isCreator},{label:i(()=>t("common.setting")),value:"TeamSet",component:p,visible:()=>!0}],{headers:x,teamId:T}=le(),u=de(),n=K(T)(),_=xe(`${me}-${T}`,I[0]?.value),$=i(()=>Object.keys(n.teamDetail).length===0),y=i(()=>I.filter(v=>v.visible())),b=i(()=>y.value.find(h=>h.value===_.value)?.component||{render:()=>null}),k=async(v,h)=>{if(!n.canSaveCopy)return;const V=v.matched[v.matched.length-1],R=h.matched[h.matched.length-1];if(!(!V||!R)&&(!v.redirectedFrom||V.path===R.path)){const U={confirmButtonText:t("team.leave"),cancelButtonText:t("common.cancel"),type:"warning"};return await Ae.confirm(t("team.unsavedDataLeave"),t("common.info"),U).then(()=>!0).catch(()=>!1)}};function A(v,h){u.addPayLoad(`/team/${v}`,{name:h??""})}return Oe(k),Ve(k),Re(()=>{n.setLoading(!0),B.v1Team.teamcontrollerDetail({headers:x}).then(v=>{const{compIdInLeafNodeMap:h}=v.data;n.setTeamDetail(v.data),n.setSelectedRowsToLeafNodeMap(h||{}),A(T??"",n.teamDetail?.name??"")}).catch(()=>{n.$reset()}).finally(()=>{n.setLoading(!1)})}),oe(_,(v,h)=>{h&&v!==h&&window?.umami?.track(pe.TEAM_TAB_CHANGE,{teamId:T,from:h,to:v})}),se(()=>{n.$reset()}),(v,h)=>{const V=Z,R=Te,U=W;return g(),E(U,{"wrap-class":"team-container p-[10px] pt-0",class:"size-full overflow-x-hidden",always:""},{default:s(()=>[a(e(He),{isEmpty:$.value,loading:e(n).loading,emptyDescription:e(t)("team.noTeamInfo")},{default:s(()=>[a(xt,{class:"mt-[10px]"}),a(V,{"body-class":"!p-0",class:"sticky top-0 w-full z-100 mt-1"},{default:s(()=>[a(e(Ke),{modelValue:e(_),"onUpdate:modelValue":h[0]||(h[0]=re=>Pe(_)?_.value=re:null),options:y.value},null,8,["modelValue","options"])]),_:1}),r("div",Tt,[a(e(X),null,{default:s(()=>[(g(),E(ne,null,[(g(),E(H(b.value)))],1024))]),_:1})]),a(R,{right:100,bottom:100,target:".team-container"})]),_:1},8,["isEmpty","loading","emptyDescription"])]),_:1})}}});export{Kt as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{aJ as S,b as R}from"./vendor-ui-CGT0cG1n.js";import{u as t,B as L,t as c}from"./index-CdLdwW7r.js";import{v as A,aA as b,aD as k,aC as U,ac as p,aF as E,a9 as $,aP as x,ax as n,ab as K,l as Y,r as m,aO as B,y as F,af as N,g as l,ao as V}from"./vendor-core-BKehvho7.js";import{u as H}from"./useTeamHeaders-DxHN7-t0.js";import{c as Q,a as q}from"./index.vue_vue_type_script_setup_true_lang-DTrkhAMQ.js";import{c as z}from"./useCompEditStore-DI3vFtGm.js";import{_ as G}from"./index.vue_vue_type_style_index_0_lang-1ZphBFBL.js";import{u as J}from"./useKeyword-bWHMALoZ.js";import"./index-BYC9CuLh.js";import"./useCompMetaLocalStore-BKTMp_k8.js";/* empty css */import"./useVscodeOpen-SZpyzVHG.js";import"./BaseDialog.vue_vue_type_script_setup_true_lang-BROcUfEh.js";import"./useCacheOssStore-OAoLDVbw.js";import"./EmptyStatusContainer.vue_vue_type_script_setup_true_lang-pswB5SUz.js";import"./useMessage-BVw3M4ej.js";/* empty css */import"./v4-EwEgHOG0.js";import"./index.vue_vue_type_style_index_0_lang-BNPcBMvg.js";import"./core-CcVTMiBP.js";import"./PanelBackground.vue_vue_type_script_setup_true_lang-BELCrrRh.js";import"./BaseSegmented.vue_vue_type_script_setup_true_lang-DU79Plk1.js";import"./LoadingWrapper.vue_vue_type_script_setup_true_lang-kJcgjuK5.js";const W={class:"size-full"},ye=A({__name:"index",setup(j){const{t:u}=b(),h=F(),C=k(),d=U(),{headers:_,teamId:g}=H(),o=Q(`${d.path}_${t.SCOPE_ID_TEAM_MY_COMP_LIST}`)();p(t.PROVIDE_KEY_COMP_LIST_STORE,o);const T=z(`${d.path}_${t.SCOPE_ID_TEAM_MY_COMP_UPDATE}`,t.DIALOG_TYPE_EDIT)();p(t.PROVIDE_KEY_COMP_EDIT_STORE,T);const f=new Map;p(t.PROVIDE_KEY_CALLBACKS,f);const y=E("compUpdateDialog"),I=E("compIframeContainer"),s=N({data:[],search:{column:[{prop:"keyword",component:V(R),label:l(()=>u("common.keyword")),value:"",autoQuery:!1,attributes:{placeholder:l(()=>u("comp.keywordPlaceholder")),fetchSuggestions:w,triggerOnFocus:!1,style:"width: 400px",fitInputWidth:!0}}]},pagination:{total:0},fixedHeight:!1,autoLoading:!1,fetchData:O}),v=l(()=>s.value?.search?.column[0]?.value??"");J(v,I);function w(e,a){if(e.length<=1)return a([]);c.v1Keyword.keywordcontrollerQuerykeywordscomp({keyword:e,type:"compTeamMy"},{headers:_}).then(r=>{const{keywords:i=[]}=r.data||{};a(i)})}async function O(e){o.setLoading(!0);const a=await c.v1Team.teamcontrollerMyteamcomps({...e},{headers:_}),{rows:r,total:i}=a.data??{};o.renderList(r??[]),s.value.pagination.total=i??0,o.setLoading(!1)}function D(e){C.push({path:`/previewTeam/${g}/${e}`})}async function M(e){y.value?.open(e)}function P(e){c.v1Comp.compcontrollerCompdetail({compId:e}).then(a=>{o.updateCompListItemById(e,a.data)})}return f.set(t.COMP_METHOD_KEY_AFTER_COMP_DEL,()=>{s.value.pagination.total--}),$(()=>{o.$reset()}),(e,a)=>{const r=S;return x((K(),Y("div",W,[m(n(L),{tableConfig:s.value,border:""},{table:B(()=>[m(q,{ref:"compIframeContainer",iuid:n(h)?.uid,compType:n(t).IFRAME_ROUTES.CONTAINER.TEAM_MINE,onPreview:D,onUpdate:M},null,8,["iuid","compType"])]),_:1},8,["tableConfig"]),m(G,{ref:"compUpdateDialog",onUpdateSuccess:P},null,512)])),[[r,n(o).loading]])}}});export{ye as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{aJ as M,b as x,g as B,F as N,K as $}from"./vendor-ui-CGT0cG1n.js";import{u as n,B as K,t as m,p as E}from"./index-CdLdwW7r.js";import{v as F,y as G,aA as H,aC as V,aD as Y,ac as _,aF as T,a9 as z,aP as Q,ax as p,ab as J,l as W,r as g,aO as j,af as X,g as i,ao as C}from"./vendor-core-BKehvho7.js";import{c as Z,b as q,a as ee}from"./index.vue_vue_type_script_setup_true_lang-DTrkhAMQ.js";import{c as oe}from"./useCompEditStore-DI3vFtGm.js";import{_ as te}from"./index.vue_vue_type_style_index_0_lang-1ZphBFBL.js";import{u as ae}from"./useTeamHeaders-DxHN7-t0.js";import{u as re}from"./useKeyword-bWHMALoZ.js";import"./index-BYC9CuLh.js";import"./useCompMetaLocalStore-BKTMp_k8.js";/* empty css */import"./useVscodeOpen-SZpyzVHG.js";import"./BaseDialog.vue_vue_type_script_setup_true_lang-BROcUfEh.js";import"./useCacheOssStore-OAoLDVbw.js";import"./EmptyStatusContainer.vue_vue_type_script_setup_true_lang-pswB5SUz.js";import"./useMessage-BVw3M4ej.js";/* empty css */import"./v4-EwEgHOG0.js";import"./index.vue_vue_type_style_index_0_lang-BNPcBMvg.js";import"./core-CcVTMiBP.js";import"./PanelBackground.vue_vue_type_script_setup_true_lang-BELCrrRh.js";import"./BaseSegmented.vue_vue_type_script_setup_true_lang-DU79Plk1.js";import"./LoadingWrapper.vue_vue_type_script_setup_true_lang-kJcgjuK5.js";const ne={class:"size-full overflow-hidden"},be=F({__name:"index",setup(se){const y=G()?.uid,{t:a}=H(),h=V(),v=Y(),{headers:l,teamId:d}=ae(),r=Z(`${h.path}_${n.SCOPE_ID_TEAM_COMP_LIST}`)();_(n.PROVIDE_KEY_COMP_LIST_STORE,r);const I=new Map;_(n.PROVIDE_KEY_CALLBACKS,I);const S=oe(h.path,n.DIALOG_TYPE_EDIT)();_(n.PROVIDE_KEY_COMP_EDIT_STORE,S);const w=q(d)(),L=T("compUpdateDialog"),k=T("compIframeContainer"),u=X({data:[],search:{column:[{prop:"keyword",component:C(x),label:i(()=>a("common.keyword")),value:"",autoQuery:!1,attributes:{placeholder:i(()=>a("comp.keywordPlaceholder")),fetchSuggestions:R,triggerOnFocus:!1,style:"width: 400px",fitInputWidth:!0}},{prop:"group",component:C(B),label:i(()=>a("team.group")),value:"",attributes:{options:i(()=>w.menuGroup),clearable:!0,props:{value:"id",checkStrictly:!0}}}]},pagination:{total:0,attributes:{pageSizes:[10,20,30]}},autoLoading:!1,fetchData:b}),O=i(()=>u.value?.search?.column[0]?.value??"");re(O,k);function R(e,o){if(e.length<=1)return o([]);m.v1Keyword.keywordcontrollerQuerykeywordscomp({keyword:e,type:"compTeam"},{headers:l}).then(t=>{const{keywords:s=[]}=t.data||{};o(s)})}async function b(e){r.setLoading(!0),e.keyword&&window?.umami?.track(E.SEARCH_COMPONENT,{keyword:e.keyword,page:"team"});const{group:o=[]}=e||{};delete e.group,o.length&&window?.umami?.track(E.TEAM_FILTER_GROUP,{teamId:d,group:o});const t=o?.[o.length-1];if(t){let c=w.getSelectedGroupLeafNodes(t);c=c.length===0?[t]:c,e.leafNodeIds=c}const s=await m.v1Team.teamcontrollerTeamcomps({...e,scene:"library"},{headers:l}),{rows:f,total:U}=s.data??{};r.renderList(f??[]),u.value.pagination.total=U??0,r.setLoading(!1)}function P(e){v.push({path:`/previewTeam/${d}/${e}`})}async function D(e){const o=N.service({fullscreen:!0});try{const t=e,s=await m.v1Team.teamcontrollerCheckcompupdatepermission({compId:t},{headers:l}),{result:f}=s.data||{};if(f==="cannot_update"){$.confirm(a("message.noUpdatePermission"),a("common.info"),{confirmButtonText:a("common.confirm"),cancelButtonText:a("common.cancel"),type:"warning"}).finally(()=>{});return}L.value?.open(t)}finally{o.close()}}function A(e){m.v1Comp.compcontrollerCompdetail({compId:e}).then(o=>{r.updateCompListItemById(e,o.data)})}return z(()=>{r.$reset()}),(e,o)=>{const t=M;return Q((J(),W("div",ne,[g(p(K),{tableConfig:u.value},{table:j(()=>[g(ee,{ref:"compIframeContainer",iuid:p(y),compType:p(n).IFRAME_ROUTES.CONTAINER.TEAM_ALL,onPreview:P,onUpdate:D},null,8,["iuid","compType"])]),_:1},8,["tableConfig"]),g(te,{ref:"compUpdateDialog",onUpdateSuccess:A},null,512)])),[[t,p(r).loading]])}}});export{be as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{D as $,aH as z,x as R,y as J,A as M,e as K,J as T}from"./vendor-ui-CGT0cG1n.js";import{w as Y,J as Q,L as W,p,t as X,j as A}from"./index-CdLdwW7r.js";/* empty css */import{_ as Z}from"./index.vue_vue_type_script_setup_true_lang-CgaIiyg6.js";import{S as ee}from"./index-DkakQhTy.js";import{v as E,aA as D,ab as h,l as y,i as n,r as s,ap as _,ax as l,aO as c,q as C,aD as te,aF as se,ad as I,aN as ae,F as V,k as N,af as le,g as U}from"./vendor-core-BKehvho7.js";import{m as oe}from"./md5-ohq5q_Pj.js";import{_ as ne}from"./AuthCodeSendBtn.vue_vue_type_script_setup_true_lang-CP9hjm3T.js";import{_ as re}from"./CanvasAnimation.vue_vue_type_script_setup_true_lang-Xr4R8ONt.js";import"./LoadingWrapper.vue_vue_type_script_setup_true_lang-kJcgjuK5.js";const ie={class:"flex bg-gray-600 items-center justify-center overflow-hidden"},ue={class:"w-full rounded-2xl p-8 md:p-12"},ce={class:"flex mb-[10px]"},de={class:"text-2sm text-gray-300 mb-[50px] ml-2"},me={class:"relative pl-6 border-l-4 border-indigo-400 mb-8"},pe={class:"leading-relaxed text-gray-300"},fe={class:"flex items-center gap-2 mb-6"},_e=E({__name:"index",setup(S){const{t:e}=D(),g=Y();return(b,m)=>{const v=$;return h(),y("div",ie,[n("section",ue,[n("header",ce,[s(Z)]),n("h2",de,_(l(e)("common.siteSubtitle")),1),n("blockquote",me,[n("p",pe,_(l(e)("common.siteSlogan")),1),m[0]||(m[0]=n("footer",{class:"mt-4 text-sm text-gray-500"},null,-1))]),n("div",fe,[s(ee),s(v,{href:l(g),type:"primary",underline:"always",target:"_blank"},{default:c(()=>[C(_(l(e)("common.docsTutorial")),1)]),_:1},8,["href"])])])])}}}),ge={class:"flex items-center justify-center bg-[#0d0d0d] size-full overflow-hidden"},ve={class:"h-full"},he={class:"flex items-center gap-1 w-full"},ye={class:"flex justify-between"},xe=E({__name:"index",setup(S){const{t:e}=D(),g=te(),b=Q(),m=se("form"),v=z(W,"account"),x=le(!1),f=I([{name:e("user.accountLogin"),type:"account",select:v.value==="account"},{name:e("user.emailLogin"),type:"email",select:v.value==="email"}]),o=I({account:"",password:"",email:"",authCode:""}),F=I({account:[{required:!0,message:e("user.pleaseInputAccount"),trigger:"blur"}],password:[{required:!0,message:e("user.pleaseInputPassword"),trigger:"blur"}],email:[{required:!0,message:e("common.pleaseInput")+e("user.email"),trigger:"blur"},{type:"email",message:e("user.pleaseInputCorrectEmail"),trigger:"blur"}],authCode:[{required:!0,message:e("user.pleaseInputAuthCode"),trigger:"blur"}]}),k=U(()=>f.find(a=>!a.select)??f[1]),w=U(()=>f.find(a=>a.select)??f[0]);function O(a){f.forEach(t=>{t.select=!1}),a.select=!0}function P(){g.replace("/")}async function B({end:a,startCountdown:t}){if(w.value?.type==="email"&&o.email){if(!await m.value?.validateField("email").catch(()=>!1)){a();return}X.v1Email.emailcontrollerSendcode({email:o.email}).then(()=>{T.success(e("message.success.sendAuthCode")),t(),window?.umami?.track(p.SEND_AUTH_CODE_SUCCESS,{email:o.email})}).catch(()=>{window?.umami?.track(p.SEND_AUTH_CODE_FAILED,{email:o.email})}).finally(()=>{a()})}}function j(){m.value&&m.value.validate(a=>{if(!a)return;const t={account:{fields:["account","password"],getParams:i=>({account:i.account,password:oe(i.password)})},email:{fields:["email","authCode"],getParams:i=>({email:i.email,authCode:i.authCode})}},r=w.value?.type,d=r&&t[r];if(!d)return;d.fields.every(i=>!!o[i])&&q(d.getParams(o))})}function q(a){m.value&&m.value.validate(t=>{t&&(x.value=!0,b.login(a).then(()=>{g.replace("/").finally(()=>{x.value=!1,T.success(e("user.loginSuccess")),window?.umami?.track(p.LOGIN_BUTTON_SUCCESS,{form:a}),window?.umami?.identify({id:b.userId})})}).catch(r=>{window?.umami?.track(p.LOGIN_BUTTON_FAILED,{form:a,error:r})}).finally(()=>{x.value=!1}))})}return ae(()=>{f.forEach(a=>{a.select&&(v.value=a.type)})}),(a,t)=>{const r=M,d=J,L=K,i=$,H=R;return h(),y("div",ge,[s(H,{ref:"form",class:"w-[70%]",model:o,rules:F,"status-icon":""},{default:c(()=>[n("div",ve,[w.value.type==="account"?(h(),y(V,{key:0},[s(d,{prop:"account"},{default:c(()=>[s(r,{modelValue:o.account,"onUpdate:modelValue":t[0]||(t[0]=u=>o.account=u),placeholder:l(e)("user.pleaseInputUsername")},null,8,["modelValue","placeholder"])]),_:1}),s(d,{prop:"password"},{default:c(()=>[s(r,{modelValue:o.password,"onUpdate:modelValue":t[1]||(t[1]=u=>o.password=u),placeholder:l(e)("user.pleaseInputPassword"),type:"password"},null,8,["modelValue","placeholder"])]),_:1}),t[6]||(t[6]=n("div",{class:"toolbar"},null,-1))],64)):N("",!0),w.value.type==="email"?(h(),y(V,{key:1},[s(d,{prop:"email"},{default:c(()=>[s(r,{modelValue:o.email,"onUpdate:modelValue":t[2]||(t[2]=u=>o.email=u),placeholder:l(e)("common.pleaseInput")+l(e)("user.email")},null,8,["modelValue","placeholder"])]),_:1}),s(d,{prop:"authCode"},{default:c(()=>[n("div",he,[s(r,{modelValue:o.authCode,"onUpdate:modelValue":t[3]||(t[3]=u=>o.authCode=u),placeholder:l(e)("user.pleaseInputAuthCode")},null,8,["modelValue","placeholder"]),s(l(ne),{id:l(p).SEND_AUTH_CODE,disabled:!o.email,text:l(e)("user.sendAuthCode"),"countdown-text":"user.resendAfterSeconds",duration:60,onSend:t[4]||(t[4]=({end:u,startCountdown:G})=>B({end:u,startCountdown:G}))},null,8,["id","disabled","text"])])]),_:1})],64)):N("",!0),s(d,null,{default:c(()=>[s(L,{id:l(p).LOGIN_BUTTON,class:"w-full",loading:x.value,type:"primary",onClick:j},{default:c(()=>[C(_(l(e)("user.login")),1)]),_:1},8,["id","loading"])]),_:1})]),n("div",ye,[s(i,{id:l(p).SKIP_LOGIN,href:"javascript:void(0)",onClick:P},{default:c(()=>[C(_(l(e)("user.skip")),1)]),_:1},8,["id"]),s(i,{type:"primary",onClick:t[5]||(t[5]=u=>O(k.value))},{default:c(()=>[C(_(k.value.name),1)]),_:1})])]),_:1},8,["model","rules"])])}}}),we=A(xe,[["__scopeId","data-v-e00e8e6e"]]),Ce={class:"size-full relative"},be={class:"absolute inset-0 flex items-center justify-center"},Ie={class:"login-content-container"},Ee={class:"flex size-full"},Se=E({__name:"index",setup(S){return(e,g)=>(h(),y("div",Ce,[s(l(re)),n("div",be,[n("div",Ie,[n("div",Ee,[s(_e,{class:"size-full flex-1"}),s(we,{class:"flex-1"})])])])]))}}),Oe=A(Se,[["__scopeId","data-v-69bff7ed"]]);export{Oe as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{I as x,j as D,u as C,t as $}from"./index-CdLdwW7r.js";import{e as I,f as g,aG as B,r as L}from"./vendor-ui-CGT0cG1n.js";import{v as k,aA as z,ab as o,j as l,aO as c,l as R,ai as w,k as _,i as y,ap as h,ax as s,r as v,Z as M,af as S,aC as A,aD as O,ac as T,a7 as N,a9 as V,aF as P,p as j,q as b,g as K}from"./vendor-core-BKehvho7.js";/* empty css */import{_ as F}from"./index.vue_vue_type_style_index_0_lang-BNPcBMvg.js";import{u as E}from"./useTeamHeaders-DxHN7-t0.js";import{c as H,a as U}from"./index.vue_vue_type_script_setup_true_lang-DTrkhAMQ.js";const Y={class:"flex items-center justify-between px-3 py-2 select-none"},q={class:"text-sm font-medium"},G={class:"flex gap-[6px]"},Z={key:0,class:"flex-1 p-2 overflow-auto"},J=k({__name:"BasePane",props:{title:{type:String,default:""},actions:{type:Array,default:()=>["close","maximize","minimize"]}},emits:["close","maximize","minimize"],setup(t,{emit:i}){const{t:p}=z(),m=t,n=i,e=S(!1),d=S(!1);function f(){n("close")}function u(){e.value=!e.value,n("maximize",e.value)}function a(r){return m.actions.includes(r)}return(r,ee)=>(o(),l(s(g),{"body-class":"pane-body","header-class":"pane-header",class:M(["pane-card w-full h-full",{"pane-maximized":e.value}])},{header:c(()=>[y("div",Y,[y("div",q,h(t.title),1),y("div",G,[w(r.$slots,"beforeActions",{},void 0,!0),a("close")?(o(),l(s(I),{key:0,type:"primary",circle:"",onClick:f},{default:c(()=>[v(s(x),{icon:"material-symbols:close"})]),_:1})):_("",!0),a("maximize")?(o(),l(s(I),{key:1,type:"primary",circle:"",title:s(p)("common.maximizeRestore"),onClick:u},{default:c(()=>[e.value?(o(),l(s(x),{key:1,icon:"material-symbols:fullscreen-exit"})):(o(),l(s(x),{key:0,icon:"material-symbols:fullscreen"}))]),_:1},8,["title"])):_("",!0)])])]),default:c(()=>[d.value?_("",!0):(o(),R("div",Z,[w(r.$slots,"default",{isMaximized:e.value},void 0,!0)]))]),_:3},8,["class"]))}}),re=D(J,[["__scopeId","data-v-96c02aae"]]),Q={class:"min-h-[400px]"},W=k({__name:"index",setup(t){const i=A(),p=O(),{compId:m}=i.params,{headers:n}=E(),e=H(i.path)();T(C.PROVIDE_KEY_COMP_LIST_STORE,e);const d=new Map;T(C.PROVIDE_KEY_CALLBACKS,d);const f=async()=>{if(e.setLoading(!0),!m)return;const a=await $.v1Comp.compcontrollerSimilarcomps({compId:m},{headers:n}),{rows:r}=a.data||{};await e.renderList(r),e.setLoading(!1)};function u(a){p.push({path:`/preview/${a}`})}return N(()=>{f()}),V(()=>{e.$reset()}),(a,r)=>(o(),R("div",Q,[v(U,{compType:s(C).IFRAME_ROUTES.CONTAINER.SIMILAR,onPreview:u},null,8,["compType"])]))}}),X={ref:"similarComp",class:"mt-[10px] overflow-hidden"},le=k({__name:"index",props:{mdSrc:{type:String,default:""},compDesc:{type:String,default:""},scrollContainer:{type:String,default:""},stickyTopDistance:{type:Number,default:45},showSimilarComp:{type:Boolean,default:!0}},setup(t){const{t:i}=z(),{teamId:p}=E(),m=K(()=>i(p?"team.similarCompInTeam":"team.similarComp")),n=S(!1),e=P("similarComp");return B(e,([d])=>{n.value||(n.value=d?.isIntersecting||!1)}),(d,f)=>{const u=L,a=g;return o(),l(F,{showToc:!0,src:t.mdSrc,scrollContainer:t.scrollContainer,stickyTopDistance:t.stickyTopDistance},j({empty:c(()=>[b(h(t.compDesc||s(i)("common.noReadme")),1)]),_:2},[t.showSimilarComp?{name:"footer",fn:c(()=>[y("div",X,[v(u,{"content-position":"center"},{default:c(()=>[b(h(m.value),1)]),_:1}),v(a,{"body-class":"!p-1",class:"mt-[10px]"},{default:c(()=>[n.value?(o(),l(W,{key:0})):_("",!0)]),_:1})],512)]),key:"0"}:void 0]),1032,["src","scrollContainer","stickyTopDistance"])}}});export{re as B,le as _};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{J as A,u}from"./index-CdLdwW7r.js";import{c as m}from"./useCompMetaLocalStore-BKTMp_k8.js";import{aD as g}from"./vendor-ui-CGT0cG1n.js";import{u as O}from"./useVscodeOpen-SZpyzVHG.js";import{v as h,aF as C,aM as w,ab as k,l as D,i as N,ax as v,g as B}from"./vendor-core-BKehvho7.js";import{c as F,b as G,I as o,a as W,e as b}from"./useMessage-BVw3M4ej.js";const $={class:"size-full"},x=["src"],J=h({__name:"index",props:{compType:{},version:{},compAttrs:{},iuid:{}},setup(d){const s=d,f=A(),n=F(!1,window.__GLOBAL_CONFIG__.subPort),{instanceUid:I,messageListener:T,sendMessageToTargetIframe:l}=b(),{addListener:i}=T(),{createIframeParams:E}=G(),{openCompPathInVscode:S,handlePath:L}=O(),P=g().value,p=C("iframe"),M=(()=>{const e={topOrigin:window.location.origin,userId:f.userId??"",instanceUid:[I.value,s.iuid].join(",")??"",compId:s.compAttrs?._id??"",isSfc:!0},t={params:E(e),isDark:P.toString()},a=new URLSearchParams(t).toString();return`${n}/${u.WEBSITE_PATH_ITEM}/${s.compType}?${a}`})();async function _(){const e=p.value?.contentWindow;if(e){const t=m(s.compAttrs?._id)(),{dep:a,depToFile:r}=t,c={item:s.compAttrs,dep:a,depToFile:r};l(e,o.ITEM_INIT_SET_LOCAL,c,n)}}return i(o.ITEM_INIT_GET_LOCAL,()=>{_()}),i(o.ITEM_SITE_PATH_GET,e=>{const t=m(e)(),{stopWatch:a,triggerCallback:r}=W(B(()=>t.detail.fullPath),()=>{const c=p.value?.contentWindow;c?l(c,o.ITEM_SITE_PATH_SET,L(t.detail.fullPath,1),n):a()});r(e)}),i(o.ACTION_OPEN_VSCODE_LOCAL,e=>{const a=m(e)().detail.fullPath;S(a,`./${u.COMP_CONFIG_FILENAME}`)}),w(()=>s.compAttrs,e=>{e&&_()}),(e,t)=>(k(),D("div",$,[N("iframe",{ref:"iframe",class:"size-full",src:v(M),frameborder:"0"},null,8,x)]))}});export{J as _};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-BqUY_Pbs.js","./vendor-ui-CGT0cG1n.js","./vendor-core-BKehvho7.js","./index-CdLdwW7r.js","./index-DIKKFNiV.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{v as ce,aA as b,ab as ie,j as ye,aO as Y,i as G,r as K,ax as O,ap as oe,q as Me,u as Ne,af as P,w as re,H as A,aF as ae,aM as Pe,l as Ae,$ as Re,g as M}from"./vendor-core-BKehvho7.js";import{p as q,c as y}from"./index-BYC9CuLh.js";import{_ as Fe,z as j,q as v,u as w,J as le,t as V,p as N,V as Be,N as Ge}from"./index-CdLdwW7r.js";import{c as k}from"./useCompMetaLocalStore-BKTMp_k8.js";import{D as ke,K as x,F as J,J as X,aD as Ve}from"./vendor-ui-CGT0cG1n.js";/* empty css */import{u as me}from"./useVscodeOpen-SZpyzVHG.js";import{_ as xe}from"./BaseDialog.vue_vue_type_script_setup_true_lang-BROcUfEh.js";import{u as be}from"./useCacheOssStore-OAoLDVbw.js";import{u as $e}from"./useTeamHeaders-DxHN7-t0.js";import{_ as He}from"./EmptyStatusContainer.vue_vue_type_script_setup_true_lang-pswB5SUz.js";import{u as Ue,c as We,b as Ye,I as m,a as ne,e as Ke}from"./useMessage-BVw3M4ej.js";const je={class:"flex justify-between items-center"},ze={class:"h-[65vh]"},qe=ce({__name:"index",setup(C,{expose:e}){const{t}=b(),n=Ne(()=>Fe(()=>import("./index-BqUY_Pbs.js"),__vite__mapDeps([0,1,2,3,4]),import.meta.url)),{openCompPathInVscode:d}=me(),{cwd:_}=window.__GLOBAL_CONFIG__,r=P(!1),s=P(null),l=P(_);function i(){d(l.value,"./package.json")}const p=h=>{r.value=!0,s.value=h},u=()=>{r.value=!1,s.value=null},E=h=>{s.value&&s.value(h)};return e({open:p,close:u}),(h,g)=>{const R=ke;return ie(),ye(O(xe),{modelValue:r.value,"onUpdate:modelValue":g[0]||(g[0]=D=>r.value=D),width:"50%","show-close":""},{header:Y(()=>[G("div",je,[G("span",null,[G("span",null,oe(O(t)("file.projectPath"))+":",1),K(R,{href:"javascript:void(0)",type:"primary",underline:"always",title:l.value,class:"truncate",onClick:i},{default:Y(()=>[Me(oe(l.value),1)]),_:1},8,["title"])])])]),default:Y(()=>[G("div",ze,[K(O(n),{onSelect:E})])]),_:1},8,["modelValue"])}}}),Ct=(C,e)=>re(`compListStore_${C}`,{state:()=>({scopeId:C,list:[],localList:[],loading:!1,listType:e??w.COMP_LIST_TYPE_REMOTE}),getters:{isEmpty:t=>t.list.length===0,isRemote:t=>t.listType===w.COMP_LIST_TYPE_REMOTE,isLocal:t=>t.listType===w.COMP_LIST_TYPE_LOCAL},actions:{setLocalList(t){this.$patch(n=>{n.localList=t})},setLoading(t){this.$patch(n=>{n.loading=t})},setList(t){this.$patch(n=>{n.list=t})},delCompListById(t){this.$patch(n=>{n.list=n.list.filter(d=>d._id!==t)})},updateCompListItemById(t,n){this.$patch(d=>{d.list=d.list.map(_=>{if(_._id===t){const r={..._,...n};return y(t)().setDetail(r.version,r),r}return _})})},async getListDeps(t){const n=j(),r=t.map(i=>i.dep).map(i=>q(i,n.deps)).reduce((i,p)=>[...i,...p],[]).map(i=>i.name),s=await v.v1Module.modulecontrollerPrebuild({deps:[...new Set(r)]}),{entryNameToFile:l={}}=s.data;return l},async initCompMetas(t){const n=j(),d=await v.v1Comp.compcontrollerLocalcompsbyids({compIds:t.map(s=>s._id)}),{compInfos:_=[]}=d.data,r=await this.getListDeps(t);t.forEach(s=>{const i=q(s.dep,n.deps).reduce((E,h)=>(r[h.name]&&(E[h.name]=r[h.name]),E),{}),p=y(s._id)();p.setLatestVersion(s.version),p.setDetail(s.version,s);const u=_.filter(E=>E.id===s._id);p.setLocalCompInfo(u),p.setDepEntryNameToFile(s.version,i)})},async initCompMetasLocal(t){t.forEach(n=>{k(n._id)().setDetail(n)})},async renderList(t){t.length&&(this.isRemote?await this.initCompMetas(t):await this.initCompMetasLocal(t)),this.setList(t)}}});async function se(C){const e=j();async function t(i){const{objectId:p,version:u,files:E}=i,h={objectId:p,version:u,files:E.map(D=>D.path)},g=await v.v1Comp.compcontrollerCompfilesosssignedurl(h),{signedUrls:R}=g.data;return R}async function n(i){const{dep:p}=i,u=q(p,e.deps).map(g=>g.name),E=await v.v1Module.modulecontrollerPrebuild({deps:u}),{entryNameToFile:h={}}=E.data;return h}const{version:d,_id:_}=C,r=y(_)();let s=null,l=null;r.versionToFileAccessPath[d]||(s=await t(C),r.setVersionToFileAccessPath(d,s)),r.depEntryNameToFile[d]||(l=await n(C),r.setDepEntryNameToFile(d,l))}const pe=()=>{const C=le();function e(){const t=C.isRealUserLogin();return t||C.logoutDialog(),t}return{isLogin:e}};function Je(){const{isLogin:C}=pe(),e=A(w.PROVIDE_KEY_CALLBACKS),t=A(w.PROVIDE_KEY_COMP_LIST_STORE),{t:n}=b();async function d(_){if(!C()||!t.isRemote)return;const{id:r,isCollect:s}=_,l=t.list.find(p=>p._id===r);if(!l||!s&&await x.confirm(n("comp.uncollectConfirm",{name:l.name}),n("comp.uncollect"),{confirmButtonText:n("common.confirm"),cancelButtonText:n("common.cancel"),type:"warning"}).catch(()=>{})!=="confirm")return;const i=J.service({fullscreen:!0});V.v1Comp.compcontrollerCollect({compId:l._id,isCollect:s}).then(()=>{X.success(l.isCollect?n("message.success.uncollect"):n("message.success.collect")),window?.umami?.track(N.COMP_COLLECT_TOGGLE,{compId:l._id,name:l.name,action:s?"collect":"uncollect"});const p={...l,isCollect:s};s?t.updateCompListItemById(l._id,{...p,collectCount:l.collectCount+1}):(t.updateCompListItemById(l._id,{...p,collectCount:l.collectCount-1}),e.get(w.COMP_METHOD_KEY_AFTER_COMP_CANCEL_COLLECT)?.(l._id))}).finally(()=>{i.close()})}return{onCollect:d}}const Xe=(C="")=>{if(!C)throw new Error("createTeamHomeStore scopeId is required");return re(`teamHome_${C}`,{state:()=>({teamDetail:{},loading:!1,selectedRows:[],selectedRowsToLeafNodeMap:{},dataSourceCopy:[],canSaveCopy:!1}),getters:{teamName:e=>e.teamDetail.name,creator:e=>({nickname:e.teamDetail?.creatorId?.nickname||e.teamDetail?.creatorId?.account||"",avatar:e.teamDetail?.creatorId?.avatar||""}),creatorNickname:e=>e.teamDetail?.creatorNickname||"",memberCount:e=>e.teamDetail?.memberCount||0,compCount:e=>e.teamDetail?.compCount||0,totalDownloadCount:e=>e.teamDetail?.totalDownloadCount||0,isCreator:e=>e.teamDetail.isCreator,isMember:e=>e.teamDetail.isMember,isOutMember:e=>!e.teamDetail.isCreator&&!e.teamDetail.isMember,description:e=>e.teamDetail.description||"",isPublic:e=>e.teamDetail.isPublic,isApplyNeedAudit:e=>e.teamDetail.isApplyNeedAudit,isAllowCompAuthorDelete:e=>e.teamDetail.isAllowCompAuthorDelete,isShowRepeatComp:e=>e.teamDetail.isShowRepeatComp,code:e=>e.teamDetail.code||"",menuGroup:e=>e.teamDetail.menuGroup||[]},actions:{setCanSaveCopy(e){this.$patch(t=>{t.canSaveCopy=e})},setLoading(e){this.$patch(t=>{t.loading=e})},setTeamDetail(e){this.$patch(t=>{t.teamDetail=e})},setSelectedRows(e){this.$patch(t=>{t.selectedRows=e})},setDataSourceCopy(e){this.$patch(t=>{t.dataSourceCopy=e})},setSelectedRowsToLeafNodeMap(e){this.$patch(t=>{t.selectedRowsToLeafNodeMap=e})},addSelectedRowsToLeafNodeMap(e){this.$patch(t=>{t.selectedRowsToLeafNodeMap={...t.selectedRowsToLeafNodeMap,...e}})},delSelectedRowsToLeafNodeMap(e){this.$patch(t=>{const n={...t.selectedRowsToLeafNodeMap};e.forEach(d=>{delete n[d]}),t.selectedRowsToLeafNodeMap=n})},getSelectedGroupLeafNodes(e=""){return e?Be.getTreeAllChildren(this.menuGroup,e).filter(n=>n.children?.length===0).map(n=>n.id):[]}}})};function Qe(){const{isLogin:C}=pe(),e=A(w.PROVIDE_KEY_CALLBACKS),t=A(w.PROVIDE_KEY_COMP_LIST_STORE),{t:n}=b(),{headers:d,teamId:_}=$e();async function r(s){const l=J.service({fullscreen:!0});try{if(!C())return;const i=t.list.find(u=>u._id===s);if(!i){console.error("组件不存在");return}if(!i.name){console.error("组件名称不能为空");return}if(await x.confirm(n("comp.deleteConfirm",{name:i.name}),n("common.info"),{confirmButtonText:n("common.confirm"),cancelButtonText:n("common.cancel"),type:"warning"}).catch(()=>{})!=="confirm")return;if(_){const u=Xe(_)();await V.v1Team.teamcontrollerRemovemyteamcomp({compIds:[s]},{headers:d}).then(()=>{t.delCompListById(s),u.setTeamDetail({...u.teamDetail,compCount:u.teamDetail.compCount-1}),e.get(w.COMP_METHOD_KEY_AFTER_COMP_DEL)?.(s)})}else await V.v1Comp.compcontrollerDeletemycomp({compId:s}).then(()=>{t.delCompListById(s),e.get(w.COMP_METHOD_KEY_AFTER_COMP_DEL)?.(s)});X.success(n("message.success.delete")),window?.umami?.track(N.COMP_DELETE,{compId:s,compName:i.name,teamId:_||void 0})}finally{l.close()}}return{onDelete:r}}function Ze(C){const e=P(),t=A(w.PROVIDE_KEY_COMP_LIST_STORE),{t:n}=b();async function d(r){if(!t.isRemote)return;const s=J.service({lock:!0,text:n("comp.downloading")});try{if(await x.confirm(n("comp.downloadPathConfirm",{path:r.path}),n("common.info"),{confirmButtonText:n("common.confirm"),cancelButtonText:n("common.cancel"),type:"warning"}).catch(()=>{})!=="confirm")return;const i=t.list.find(E=>E._id===e.value?.id);if(!i)return;const p=await v.v1Comp.compcontrollerDownload({compId:e.value?.id??"",savePath:r.path,compName:i.name??"",version:e.value?.version??""}),{isRepeat:u=!1}=p.data;if(u){if(await x.confirm(n("comp.downloadCoverConfirm",{name:i.name??""}),n("common.info"),{confirmButtonText:n("common.confirm"),cancelButtonText:n("common.cancel"),type:"warning"}).catch(()=>{})!=="confirm"){s.close();return}await v.v1Comp.compcontrollerDownload({compId:e.value?.id??"",savePath:r.path,compName:i.name??"",isCover:!0,version:e.value?.version??""})}X.success(n("message.success.download")),window?.umami?.track(N.COMP_DOWNLOAD_SUCCESS,{compId:i._id,compName:i.name,savePath:r.path,version:e.value?.version,isCover:u}),t.updateCompListItemById(i._id,{totalDownloadCount:i.totalDownloadCount+1}),await _(i._id),C?.()}catch(l){window?.umami?.track(N.COMP_DOWNLOAD_FAILED,{compId:e.value?.id,error:String(l)})}finally{s.close()}}async function _(r){const s=y(r)(),l=await v.v1Comp.compcontrollerLocalcompsbyids({compIds:[r]}),{compInfos:i=[]}=l.data,p=i.filter(u=>u.id===r);s.setLocalCompInfo(p)}return{currDownloadCompItem:e,affirmDownload:d}}const et=["src"],Tt=ce({__name:"index",props:{compType:{},iuid:{default:-1}},emits:["preview","previewLocal","update"],setup(C,{expose:e,emit:t}){const n=C,d=t,{t:_,locale:r}=b(),s=A(w.PROVIDE_KEY_COMP_LIST_STORE),l=j(),i=le(),p=Ue(!1,window.__GLOBAL_CONFIG__.subPort),u=We(!1,window.__GLOBAL_CONFIG__.subPort),E=Ve(),h=E.value,{instanceUid:g,messageListener:R,sendMessageToTargetIframe:D}=Ke(),{createIframeParams:de}=Ye(),{addListener:I}=R(),{openCompPathInVscode:ue,handlePath:fe}=me(),Q=be(),$=ae("iframe"),Z=ae("dialogVueFinder"),{onCollect:_e}=Je(),{onDelete:Ce}=Qe(),{currDownloadCompItem:Te,affirmDownload:ee}=Ze(()=>Z.value?.close()),z=P(0),te=P({}),Ee=(()=>{const o={topOrigin:window.location.origin,compType:n.compType,userId:i.userId??"",instanceUid:[g.value,n.iuid].filter(Boolean).join(",")??""},a=new URLSearchParams({params:de(o),isDark:h.toString()}).toString();return`${p}/${w.WEBSITE_PATH_CONTAINER}/${n.compType}/?${a}`})(),Ie=M(()=>z.value?{height:`${z.value+10}px`}:{});function H(o){try{const a=$.value?.contentWindow;if(a)return a[o]}catch(a){console.log("findIframeByCompId error",a.message)}return null}async function Le(o){if(!s.isLocal)return;const a=s.list.find(W=>W._id===o);if(!a)return;const c=k(o)(),{data:f}=await v.v1Comp.compcontrollerDep({compPath:a.path}),{thirdParty:T}=f;c.setDep(T);const L=T.map(W=>W.name),S=await v.v1Module.modulecontrollerPrebuild({deps:L}),{entryNameToFile:B={}}=S.data;c.setDepToFile(B)}async function he(o){const a=s.list.find(c=>c._id===o);if(a){const c=H(o);if(c&&s.isRemote){await se(a);const f=y(a._id)(),T=f.depEntryNameToFile[a.version],L=f.versionToFileAccessPath[a.version],S={item:a,depEntryNameToFile:T,versionToFileAccessPath:L};D(c,m.ITEM_INIT_SET,S,u)}}}function we(o){o.forEach(a=>{const c=H(a._id);c&&s.isRemote&&se(a).then(()=>{const f=y(a._id)(),T=f.depEntryNameToFile[a.version],L=f.versionToFileAccessPath[a.version],S={item:a,depEntryNameToFile:T,versionToFileAccessPath:L};D(c,m.ITEM_INIT_SET,S,u)})})}async function Se(o){const a=s.list.find(c=>c._id===o);if(a){const c=H(o);if(c){await Le(o);const f=k(o)(),{dep:T,depToFile:L}=f,S={item:a,dep:T,depToFile:L};D(c,m.ITEM_INIT_SET_LOCAL,S,u)}}}function U(o,a,c){const f=$.value?.contentWindow;return f?(D(f,o,a,c),!0):!1}function ve(o,a,c){const f=$.value?.contentWindow;if(!f)return;const T=f.length??0;for(let L=0;L<T;L++){const S=f[L];S&&D(S,o,a,c)}}function F(o,a,c,f){const T=f?.origin??p;I(o,()=>{const{stopWatch:L,triggerCallback:S}=ne(c,()=>{const B=f?.transform?f.transform(c.value):c.value;if(U(a,B,T)){f?.onAfterSend?.(B);return}L()});S()})}function De(o,a){if(a){const c=H(a);c&&o(c)}else o($.value?.contentWindow)}return F(m.LIST_INIT_GET,m.LIST_INIT,M(()=>s.list)),F(m.SETTING_DATA_GET,m.SETTING_DATA_SET,M(()=>l.deps)),F(m.ITEM_SITE_PATH_GET,m.ITEM_SITE_PATH_SET,M(()=>s.list),{transform:o=>o.map(a=>{const c=k(a._id)();return{compId:a._id,fullPath:fe(c.detail.fullPath,1)}})}),F(m.LOCALE_GET,m.LOCALE_SET,M(()=>r.value),{origin:u}),F(m.THEME_CHANGE_GET,m.THEME_CHANGE_SET,M(()=>E.value),{transform:o=>({isDark:o}),origin:p,onAfterSend:o=>ve(m.THEME_CHANGE_SET,o,u)}),I(m.ACTION_COLLECT,_e),I(m.ACTION_DOWNLOAD,async o=>{const{version:a}=o;Te.value=o,await x.confirm(_("comp.downloadVersionConfirm",{version:a}),_("common.info"),{confirmButtonText:_("common.confirm"),cancelButtonText:_("common.cancel"),type:"warning"}).catch(()=>{})==="confirm"&&Z.value?.open(ee)}),I(m.ACTION_PREVIEW,o=>{window?.umami?.track(N.COMP_PREVIEW,{compId:o}),d("preview",o)}),I(m.ACTION_PREVIEW_LOCAL,o=>{d("previewLocal",o)}),I(m.ACTION_UPDATE,o=>{window?.umami?.track(N.COMP_UPDATE,{compId:o}),d("update",o)}),I(m.UPDATE_IFRAME_HEIGHT,o=>{z.value=o}),I(m.ITEM_INIT_GET,o=>{he(o)}),I(m.ITEM_INIT_GET_LOCAL,o=>{Se(o)}),I(m.ACTION_DELETE,Ce),I(m.ITEM_VERSION_CHANGE,async o=>{const{compId:a,version:c}=o;window?.umami?.track(N.COMP_VERSION_CHANGE,{compId:a,version:c});const T=y(a)().detail[c];if(T){const{totalDownloadCount:tt,collectCount:ot,isCollect:at,...Oe}=T;s.updateCompListItemById(a,{...Oe,_id:a});return}const{data:L}=await V.v1Comp.compcontrollerCompdetail({compId:a,version:c}),{totalDownloadCount:S,collectCount:B,isCollect:W,...ge}=L;s.updateCompListItemById(a,{...ge,_id:a})}),I(m.ITEM_VERSION_LIST_GET,async o=>{let a=te.value[o];a||(a=(await V.v1Comp.compcontrollerVersions({compId:o})).data.rows??[],te.value[o]=a),U(m.ITEM_VERSION_LIST_SET,{compId:o,versionList:a},p)}),I(m.LOCAL_EXIST_GET,o=>{const a=y(o)(),{stopWatch:c,triggerCallback:f}=ne(M(()=>a.isLocalExist),T=>{U(m.LOCAL_EXIST_SET,{compId:T,exist:a.isLocalExist},p)||c()});f(o)}),I(m.ACTION_OPEN_VSCODE_LOCAL,o=>{const c=k(o)().detail.fullPath;ue(c,`./${w.COMP_CONFIG_FILENAME}`)}),I(m.OSS_FILE_SIGN_URL_GET,async({objectId:o})=>{let a=Q.getCacheUrl(o);a||(a=(await v.v1Oss.osscontrollerFilesignurl({objectId:o})).data.signUrl,Q.setCacheUrl(o,a)),U(m.OSS_FILE_SIGN_URL_SET,{objectId:o,signUrl:a},p)}),Pe(()=>s.list,(o,a)=>{const{modifiedItems:c}=Ge.findChangedArrayItems(o,a);we(c)},{deep:!0}),e({sendMessageToTargetIframeByCompId:De}),(o,a)=>(ie(),Ae("div",{style:Re(Ie.value),class:"min-h-[390px]"},[K(O(He),{isEmpty:O(s).isEmpty,loading:O(s).loading,class:"size-full"},{default:Y(()=>[G("iframe",{ref:"iframe",class:"size-full min-h-[390px]",src:O(Ee),frameborder:"0"},null,8,et)]),_:1},8,["isEmpty","loading"]),K(qe,{ref:"dialogVueFinder",onDownload:O(ee)},null,8,["onDownload"])],4))}});export{qe as _,Tt as a,Xe as b,Ct as c};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{z as w,J as C,u as L}from"./index-CdLdwW7r.js";import{c as O}from"./index-BYC9CuLh.js";import{aD as G}from"./vendor-ui-CGT0cG1n.js";import{v as b,aA as k,aF as M,aM as P,ab as W,l as D,i as h,ax as B,g as m}from"./vendor-core-BKehvho7.js";import{c as N,b as F,I as a,a as l,e as y}from"./useMessage-BVw3M4ej.js";const R={class:"size-full"},x=["src"],V=b({__name:"index",props:{compType:{},version:{},compAttrs:{},iuid:{},bgColor:{}},setup(f){const s=f,{locale:d}=k(),u=w(),T=C(),r=N(!1,window.__GLOBAL_CONFIG__.subPort),{instanceUid:g,messageListener:E,sendMessageToTargetIframe:n}=y(),{addListener:i}=E(),{createIframeParams:I}=F(),S=G().value,c=M("iframe"),A=(()=>{const e={topOrigin:window.location.origin,userId:T.userId??"",instanceUid:[g.value,s.iuid].join(",")??"",compId:s.compAttrs?._id??"",isSfc:!0},t={params:I(e),isDark:S.toString()},o=new URLSearchParams(t).toString();return`${r}/${L.WEBSITE_PATH_ITEM}/${s.compType}?${o}`})();async function _(){const e=c.value?.contentWindow;if(e){const t=O(s.compAttrs?._id)(),o=t.depEntryNameToFile[s.version],p=t.versionToFileAccessPath[s.version],v={item:s.compAttrs,depEntryNameToFile:o,versionToFileAccessPath:p};n(e,a.ITEM_INIT_SET,v,r)}}return i(a.ITEM_INIT_GET,()=>{_()}),i(a.SETTING_DATA_GET,l(m(()=>u.deps),()=>{const e=c.value?.contentWindow;e&&n(e,a.SETTING_DATA_SET,u.deps,r)}).triggerCallback),i(a.LOCALE_GET,()=>{const{stopWatch:e,triggerCallback:t}=l(m(()=>d.value),()=>{const o=c.value?.contentWindow;o?n(o,a.LOCALE_SET,d.value,r):e()});t()}),i(a.BG_COLOR_GET,l(m(()=>s.bgColor??""),()=>{const e=c.value?.contentWindow;e&&n(e,a.BG_COLOR_SET,s.bgColor??"",r)}).triggerCallback),P([()=>s.version,()=>s.compAttrs],async([e,t])=>{e&&t&&_()}),(e,t)=>(W(),D("div",R,[h("iframe",{ref:"iframe",class:"size-full",src:B(A),frameborder:"0"},null,8,x)]))}});export{V as _};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{L as ee,D as te,W as oe,aH as ae,aJ as se,e as le,K as B,J as y}from"./vendor-ui-CGT0cG1n.js";import{u as m,b as ne,q as I,t as D,M as $,e as ce}from"./index-CdLdwW7r.js";import{C as re}from"./useCompEditStore-DI3vFtGm.js";import{c as ie}from"./index-BYC9CuLh.js";import{u as pe}from"./useTeamHeaders-DxHN7-t0.js";/* empty css */import{v as H,aB as me,ab as v,j as L,aO as f,l as A,F as de,ah as ue,ax as d,i as N,ap as b,r as x,aR as fe,q as Y,W as he,aA as Ce,H as ve,aP as _e,Z as ge,X as Pe,af as F,g as k,B as Ee,Y as Ue}from"./vendor-core-BKehvho7.js";import{u as ye}from"./useVscodeOpen-SZpyzVHG.js";import{_ as Ie}from"./BaseDialog.vue_vue_type_script_setup_true_lang-BROcUfEh.js";import{v as Te}from"./v4-EwEgHOG0.js";const we={class:"flex items-center justify-between"},Oe=["title"],Me=H({__name:"index",props:he({options:{type:Array,default:()=>[]},placeholderText:{type:String,default:""},openInVscodeText:{type:String,default:""}},{modelValue:{type:String,default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(u){const{openCompPathInVscode:T,handlePath:_}=ye(),c=me(u,"modelValue"),g=u;function w(r){const e=g.options.find(i=>i.fullPath===r);e&&T(e.fullPath,`./${m.COMP_CONFIG_FILENAME}`)}function P(r){c.value=r}return(r,e)=>{const i=te,h=ee,O=oe;return v(),L(O,{"model-value":c.value,placeholder:u.placeholderText,onChange:P},{default:f(()=>[(v(!0),A(de,null,ue(u.options,p=>(v(),L(h,{key:p.value,label:d(_)(p.fullPath),value:p.value},{default:f(()=>[N("div",we,[N("span",{title:p.fullPath},b(d(_)(p.fullPath)),9,Oe),x(i,{type:"primary",href:"javascript:void(0)",onClick:[e[0]||(e[0]=fe(()=>{},["stop"])),V=>w(p.fullPath)]},{default:f(()=>[Y(b(u.openInVscodeText),1)]),_:1},8,["onClick"])])]),_:2},1032,["label","value"]))),128))]),_:1},8,["model-value","placeholder"])}}}),Ne=H({__name:"index",emits:["updateSuccess"],setup(u,{expose:T,emit:_}){const{t:c}=Ce(),g=_,{headers:w,teamId:P}=pe(),r=ae(ne,!1),e=ve(m.PROVIDE_KEY_COMP_EDIT_STORE),i=F(!1),h=F(!0),O=k(()=>{const o=e.selectedFolder?.basename,t=e.compDetail?.name??"";return o?`${c("comp.compOnlineUpdate")}:${t}`:`${c("comp.compOfflineUpdate")}:${t}`}),p=k(()=>({title:O.value,fullscreen:r.value,top:"5vh",width:"70%"}));async function V(o){h.value=!0;try{const t=await I.v1Comp.compcontrollerLocalcompsbyids({compIds:[o]}),{compInfos:a}=t.data;if(a?.length){let s=a[0];if(a.length>1&&(s=await W(a),!s))return;e.setCompUpdateType(m.COMP_UPDATE_TYPE_ONLINE),i.value=!0,e.setSelectedFolder(s),await S(o,s.path)}else{if(await B.confirm(c("comp.compNotInLocal"),c("common.info"),{type:"warning"}).catch(()=>{})!=="confirm")return;e.setCompUpdateType(m.COMP_UPDATE_TYPE_OFFLINE),i.value=!0,await S(o)}}catch(t){console.error(t),y.error(t.message)}finally{h.value=!1}}async function W(o){const t=o.map(n=>({value:n.fullPathHash,label:n.fullPath,fullPath:n.fullPath})),a=F("");return await B({title:c("comp.selectUpdateFolder"),customClass:"select-message",message:()=>Ee(Me,{modelValue:a.value,"onUpdate:modelValue":n=>a.value=n,options:t,placeholderText:c("comp.selectUpdateFolder"),openInVscodeText:c("comp.openInVscode")}),beforeClose:(n,C,E)=>{if(n==="confirm"){if(!a.value){y.error(c("comp.selectUpdateFolder"));return}E()}else E()}}).catch(()=>{})!=="confirm"?void 0:o.find(n=>n.fullPathHash===a.value)}function M(){i.value=!1}function j(){e.$reset()}function z(o,t){const a=l=>{if(!l?.length||!o)return"";const n=Te(),C=ce.getPreviewUrl(o,l);return`${m.COMP_PREVIEW_PREFIX_LOCAL}/${C}?v=${n}`};return t.map(l=>({...l,activeTab:m.COMP_EDIT_TAB_TYPE_MINI,miniEntryUrl:a(l.miniPath),fullEntryUrl:a(l.fullPath)}))}function q(o,t){const a=new Map(o.map(({path:s,signedUrl:l})=>[s,l]));return t.map(s=>{const l=$.replaceBackslashWithSlash(s.miniPath.at(-1)??""),n=$.replaceBackslashWithSlash(s.fullPath?.at(-1)??"");return{...s,activeTab:m.COMP_EDIT_TAB_TYPE_MINI,miniEntryUrl:a.get(l)??"",fullEntryUrl:a.get(n)??""}})}async function S(o,t){e.setLoading(!0);const a=await D.v1Comp.compcontrollerCompdetail({compId:o}),{desc:s,previewConfigs:l,bgColor:n,dep:C,name:E,version:G}=a.data||{};if(e.setCompDetail(a.data),e.setOnlineCompDep(C),e.setCompBgColor(n??"#fff"),e.setExtraInfo({description:s,name:E}),e.setEditCompId(o),e.isOnlineUpdate&&t){const R=await D.v1Comp.compcontrollerComphash({compId:o}),U=await I.v1Comp.compcontrollerCompfilehash({compPath:t}),Z=await I.v1Comp.compcontrollerDep({compPath:t}),{thirdParty:Q}=Z.data;e.setCompDep(Q),e.setLocalCompHash(U.data.compHash),e.setRemoteCompHash(R.data.compHash),e.setPreviewCompList(z(t,l))}else{const U=ie(o)().versionToFileAccessPath[G]??[];e.setSignedUrls(U),e.setPreviewCompList(q(U,l)),e.setCompDep(C)}e.setLoading(!1)}function J({end:o}){const t=e.getCompSubmitParams();if(e.isOnlineUpdate)I.v1Comp.compcontrollerUpdate({compId:e.editCompId,...t,...P?{teamId:P}:{}}).then(()=>{y.success(c("message.success.update")),g("updateSuccess",e.editCompId),M()}).finally(()=>{o()});else if(e.isOfflineUpdate){const{name:a,desc:s,bgColor:l,previewConfigs:n}=t;D.v1Comp.compcontrollerUpdatebasicinfo({compId:e.editCompId,name:a,desc:s,bgColor:l,previewConfigs:n},{headers:w}).then(()=>{y.success(c("message.success.update")),g("updateSuccess",e.editCompId),M()}).finally(()=>{o()})}}async function K(){r.value=!r.value}async function X(){const o=e.editCompId,t=e.selectedFolder,a=e.compUpdateType;e.$reset(),await Ue(),e.setCompUpdateType(a),e.setSelectedFolder(t),S(o,t.path)}return T({open:V,close:M}),(o,t)=>{const a=le,s=se;return v(),L(d(Ie),Pe({modelValue:i.value,"onUpdate:modelValue":t[0]||(t[0]=l=>i.value=l),class:"comp-update-dialog"},p.value,{"destroy-on-close":"","show-close":"",onClose:j}),{footer:f(()=>[x(a,{onClick:K},{default:f(()=>[Y(b(d(r)?d(c)("common.exitFullscreen"):d(c)("common.fullscreen")),1)]),_:1})]),default:f(()=>[_e((v(),A("div",{class:ge(d(r)?"size-full":"h-[70vh]")},[x(re,{class:"h-full",onConfirmUpload:J,onReload:X})],2)),[[s,h.value]])]),_:1},16,["modelValue"])}}});export{Ne as _};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.loading-wrapper[data-v-7069e81b]{display:flex;align-items:center;justify-content:center;min-height:120px}.loading-inline[data-v-7069e81b]{min-height:unset;padding:40px 0}.loading-text[data-v-7069e81b]{font-size:13px;color:#909399}.loading-dots[data-v-7069e81b]{display:inline}.loading-dot[data-v-7069e81b]{display:inline-block;opacity:0;animation:dot-blink-7069e81b 1.2s infinite}@keyframes dot-blink-7069e81b{0%,40%{opacity:0}50%,90%{opacity:1}to{opacity:0}}.dot[data-v-3453529a]:after{content:"";position:absolute;top:0%;right:0%;transform:translate(var(--offsetX),var(--offsetY));width:7px;height:7px;border-radius:50%;background-color:#f5222d;border:1px solid #fff}.grid-container[data-v-404bcef7]{display:grid;grid-template-columns:repeat(auto-fill,minmax(var(--v58810582),1fr));gap:var(--v6c23f06a)}.list-move,.list-enter-active,.list-leave-active{transition:all .5s ease}.list-enter-from,.list-leave-to{opacity:0;transform:translate(30px)}.list-leave-active{position:absolute;width:var(--v58810582)}.diff-code-loading[data-v-cfbac8e5]{position:absolute;top:80px;left:50%;transform:translate(-50%)}[data-v-cfbac8e5] .highlight-file{animation:highlight-pulse-cfbac8e5 .5s ease;animation-iteration-count:3}@keyframes highlight-pulse-cfbac8e5{0%,to{box-shadow:none}50%{box-shadow:0 0 0 3px var(--el-color-primary-light-5)}}.d2h-file-wrapper{scroll-margin-top:20px}.no-diff{text-align:center;padding:20px;color:#999}.card-no-padding[data-v-d0e0d42a] .el-card__body{padding:0;overflow:hidden}.diff-container{display:flex;flex-direction:column;overflow:hidden}.diff-container .el-dialog__body{flex:1;overflow:hidden}.active[data-v-520b6ba3]{border:1px solid #23b2c5;border-radius:8px}.el-descriptions__label.el-descriptions__cell.is-bordered-label{color:var(--el-text-color-regular);background:var(--el-descriptions-item-bordered-label-background);font-weight:700}.el-descriptions__label:not(.is-bordered-label){color:var(--el-text-color-primary);margin-right:16px}.el-descriptions__label.el-descriptions__cell:not(.is-bordered-label).is-vertical-label{padding-bottom:6px}.el-descriptions__content.el-descriptions__cell.is-bordered-content{color:var(--el-text-color-primary)}.el-descriptions__content:not(.is-bordered-label){color:var(--el-text-color-regular)}.el-descriptions--large .el-descriptions__label:not(.is-bordered-label){margin-right:16px}.el-descriptions--large .el-descriptions__label.el-descriptions__cell:not(.is-bordered-label).is-vertical-label{padding-bottom:8px}.el-descriptions--small .el-descriptions__label:not(.is-bordered-label){margin-right:12px}.el-descriptions--small .el-descriptions__label.el-descriptions__cell:not(.is-bordered-label).is-vertical-label{padding-bottom:4px}.el-descriptions{--el-descriptions-table-border:1px solid var(--el-border-color-lighter);--el-descriptions-item-bordered-label-background:var(--el-fill-color-light);box-sizing:border-box;font-size:var(--el-font-size-base);color:var(--el-text-color-primary)}.el-descriptions__header{justify-content:space-between;align-items:center;margin-bottom:16px;display:flex}.el-descriptions__title{color:var(--el-text-color-primary);font-size:16px;font-weight:700}.el-descriptions__body{background-color:var(--el-fill-color-blank)}.el-descriptions__body .el-descriptions__table{border-collapse:collapse;width:100%}.el-descriptions__body .el-descriptions__table .el-descriptions__cell{box-sizing:border-box;text-align:left;font-size:14px;line-height:23px}.el-descriptions__body .el-descriptions__table .el-descriptions__cell.is-left{text-align:left}.el-descriptions__body .el-descriptions__table .el-descriptions__cell.is-center{text-align:center}.el-descriptions__body .el-descriptions__table .el-descriptions__cell.is-right{text-align:right}.el-descriptions__body .el-descriptions__table.is-bordered .el-descriptions__cell{border:var(--el-descriptions-table-border);padding:8px 11px}.el-descriptions__body .el-descriptions__table:not(.is-bordered) .el-descriptions__cell{padding-bottom:12px}.el-descriptions--large{font-size:14px}.el-descriptions--large .el-descriptions__header{margin-bottom:20px}.el-descriptions--large .el-descriptions__header .el-descriptions__title{font-size:16px}.el-descriptions--large .el-descriptions__body .el-descriptions__table .el-descriptions__cell{font-size:14px}.el-descriptions--large .el-descriptions__body .el-descriptions__table.is-bordered .el-descriptions__cell{padding:12px 15px}.el-descriptions--large .el-descriptions__body .el-descriptions__table:not(.is-bordered) .el-descriptions__cell{padding-bottom:16px}.el-descriptions--small{font-size:12px}.el-descriptions--small .el-descriptions__header{margin-bottom:12px}.el-descriptions--small .el-descriptions__header .el-descriptions__title{font-size:14px}.el-descriptions--small .el-descriptions__body .el-descriptions__table .el-descriptions__cell{font-size:12px}.el-descriptions--small .el-descriptions__body .el-descriptions__table.is-bordered .el-descriptions__cell{padding:4px 7px}.el-descriptions--small .el-descriptions__body .el-descriptions__table:not(.is-bordered) .el-descriptions__cell{padding-bottom:8px}[data-v-3db4fd48] .el-segmented__item-label{overflow:unset}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{F as c}from"./vendor-ui-CGT0cG1n.js";import{m as p,q as l}from"./index-CdLdwW7r.js";const{i18n:r}=p;function d(){function s(n,e){const o=c.service({lock:!0,text:r.global.t("comp.openingInEditor")});l.v1Comp.compcontrollerOpencomppathinvscode({folderPath:n,relativeFilePath:e}).finally(()=>{o.close()})}function i(n,e=2){const o=window.__GLOBAL_CONFIG__.sep,t=n.split(o);return t.length>e?`...${o}${t.slice(-e).join(o)}`:n}return{handlePath:i,openCompPathInVscode:s}}export{d as u};
|