oc-webkit-xiamen 0.10.0 → 0.10.2
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
import e,{useContext as
|
|
1
|
+
import e,{useContext as y,useState as v}from"react";import{Form as m,Select as f,Modal as N,Input as u,Button as b,message as h}from"antd";import O from"classnames";import a from"./create-evaluation.module.less.js";import _ from"../../../../../../assets/svg/evaluation/quick.svg.js";import x from"../../../../../../assets/svg/evaluation/customize.svg.js";import E from"../../../../../../assets/svg/evaluation/part.svg.js";import C from"../../../../../../assets/svg/evaluation/done.svg.js";import{CN as F}from"country-flag-icons/react/3x2";import{OcContext as z}from"../../../../../../providers/OcContext.js";import{OcConfigContext as q}from"../../../../../../providers/OcConfigContext.js";var j=Object.defineProperty,k=Object.getOwnPropertySymbols,I=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable,P=(l,t,r)=>t in l?j(l,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):l[t]=r,B=(l,t)=>{for(var r in t||(t={}))I.call(t,r)&&P(l,r,t[r]);if(k)for(var r of k(t))A.call(t,r)&&P(l,r,t[r]);return l},L=(l,t,r)=>new Promise((p,c)=>{var g=n=>{try{o(r.next(n))}catch(i){c(i)}},d=n=>{try{o(r.throw(n))}catch(i){c(i)}},o=n=>n.done?p(n.value):Promise.resolve(n.value).then(g,d);o((r=r.apply(l,t)).next())});const{Option:M}=f,w=e.createElement(m.Item,{name:"prefix",noStyle:!0},e.createElement(f,{style:{width:100}},e.createElement(M,{value:"+86"},e.createElement(F,{style:{width:16,marginRight:4}}),"+86"))),$=l=>{const{locales:t}=y(z),{config:r}=y(q),{applyAbilityEval:p}=r,[c]=m.useForm(),[g,d]=v(!1),[o,n]=v(!1),i=()=>{d(!1),c.resetFields()},S=()=>{c.validateFields().then(s=>L(void 0,null,function*(){n(!0),(yield p({orgName:s.orgName,modelName:s.modelName,modelScenarios:s.modelScenarios,phoneNumber:s.phoneNumber,email:s.email})).success&&(h.success(t.submitSuccess),d(!1),c.resetFields()),n(!1)})).catch(s=>{n(!1),h.error(s==null?void 0:s.message)})};return e.createElement(e.Fragment,null,e.createElement(N,B({centered:!0,className:a.modal,width:800,footer:[e.createElement("div",{className:a.footerContainer},l.goPrevStep&&e.createElement("button",{key:"cancel",className:a.prevStep,onClick:l.goPrevStep},t.prevStep),e.createElement("div",{className:a.right},e.createElement("button",{key:"cancel",className:a.cancel,onClick:l.onCancel},t.cancel),e.createElement("button",{key:"create",onClick:l.onOk,className:a.submit},t.create)))]},l),e.createElement("div",{className:a.content},e.createElement("div",{className:O(a.work,l.type===0&&a.active),onClick:()=>l.onTypeChange(0)},e.createElement("img",{src:_,alt:""}),e.createElement("div",{className:a.title},t.quick),e.createElement("div",{className:a.introduce},e.createElement("div",{className:a.part},e.createElement("img",{src:E,alt:""}),e.createElement("span",null,t.quickFeatures2,e.createElement("span",{style:{fontWeight:600}},t.quickFeatures21))),e.createElement("div",{className:a.part},e.createElement("img",{src:E,alt:""}),e.createElement("span",null,t.quickFeatures1)),e.createElement("div",{className:a.done},e.createElement("img",{src:C,alt:""}),e.createElement("span",null,t.quickFeatures3)))),e.createElement("div",{className:O(a.work,l.type===2&&a.active),onClick:()=>l.onTypeChange(2)},e.createElement("img",{src:x,alt:""}),e.createElement("div",{className:a.title},t.customize),e.createElement("div",{className:a.introduce},e.createElement("div",{className:a.introduce},e.createElement("div",{className:a.part},e.createElement("img",{src:E,alt:""}),e.createElement("span",null,t.customFeature2)),e.createElement("div",{className:a.part},e.createElement("img",{src:E,alt:""}),e.createElement("span",null,t.customFeature1)),e.createElement("div",{className:a.done},e.createElement("img",{src:C,alt:""}),e.createElement("span",null,t.customFeature3))))))),e.createElement(N,{open:g,centered:!0,className:a.applyModal,width:800,onCancel:i,title:t.abilityPermissionApply,footer:!1},e.createElement("div",{className:a.content},e.createElement(m,{form:c,layout:"vertical",variant:"filled",initialValues:{prefix:"+86"},className:a.form},e.createElement(m.Item,{label:t.orgName,name:"orgName",rules:[{required:!0,message:t.abilityOrganizeNameError}]},e.createElement(u,{maxLength:50,showCount:!0,placeholder:t.abilityOrganizeNameError})),e.createElement(m.Item,{label:t.abilityBaseNameEN,name:"modelName",rules:[{required:!0,message:t.abilityBaseNameENError1}]},e.createElement(u,{maxLength:40,showCount:!0,placeholder:t.abilityBaseNameENError1})),e.createElement(m.Item,{label:t.abilityModelUsage,name:"modelScenarios",rules:[{required:!0,message:t.abilityModelPlaceholder}]},e.createElement(u,{maxLength:100,showCount:!0,placeholder:t.abilityModelPlaceholder})),e.createElement(m.Item,{name:"phoneNumber",label:t.abilityOrganizePhone,rules:[{required:!0,message:t.abilityOrganizePhonePlaceholder},{pattern:/^1[3-9]\d{9}$/,message:t.abilityOrganizeError}]},e.createElement(u,{addonBefore:w,style:{width:"100%"},placeholder:t.abilityOrganizePhonePlaceholder})),e.createElement(m.Item,{label:t.abilityOrganizeEmail,name:"email",rules:[{required:!0,message:t.abilityOrganizeEmailError},{type:"email",message:t.abilityOrganizeEmailError}]},e.createElement(u,{placeholder:t.abilityOrganizeEmailPlaceholder})))),e.createElement("div",{className:a.footer},e.createElement("div",{className:a.footerWarning},t.abilityApplyWarning),e.createElement("div",null,e.createElement(b,{key:"cancel",onClick:i},t.cancel),e.createElement(b,{key:"submit",onClick:S,style:{background:"#1B3882",marginLeft:12,color:"#fff"},disabled:o},t.abilityApplySubmit)))))};export{$ as default,w as prefixSelector};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useContext as p,useState as e,useEffect as
|
|
1
|
+
import{useContext as p,useState as e,useEffect as _}from"react";import{OcConfigContext as c}from"../../../providers/OcConfigContext.js";import{envTypeEnum as s}from"../../../index.js";const a=()=>{const{config:t}=p(c),[n,o]=e();return _(()=>{(t==null?void 0:t.envType)===s.development?o({VITE_SSO_URL:"https://sso.dev.openxlab.org.cn",VITE_COMPASS_URL:"http://106.14.169.128/arena/",VITE_RANK_URL:"http://106.14.169.128/rank",VITE_HUB_URL:"http://106.14.169.128/hub",VITE_DOC_URL:"http://doc.dev.opencompass.org.cn",VITE_DOC_URL_ZH:"http://doc.dev.opencompass.org.cn/zh_CN/",VITE_DATA_URL:"http://collaboration.dev.opencompass.org.cn",VITE_SPECIAL_LIST_URL:"https://specialist.dev.opencompass.org.cn/"}):(t==null?void 0:t.envType)===s.staging?o({VITE_COMPASS_URL:"http://106.14.169.128/arena/",VITE_RANK_URL:"http://106.14.169.128/rank",VITE_HUB_URL:"http://106.14.169.128/hub",VITE_SSO_URL:"https://sso.staging.openxlab.org.cn",VITE_DOC_URL:"https://doc.staging.opencompass.org.cn",VITE_DOC_URL_ZH:"http://doc.staging.opencompass.org.cn/zh_CN/",VITE_DATA_URL:"https://collaboration.staging.opencompass.org.cn",VITE_SPECIAL_LIST_URL:"https://specialist.staging.opencompass.org.cn/"}):o({VITE_COMPASS_URL:"http://106.14.169.128/arena/",VITE_RANK_URL:"http://106.14.169.128/rank",VITE_HUB_URL:"http://106.14.169.128/hub",VITE_SSO_URL:"https://sso.openxlab.org.cn",VITE_DOC_URL:"https://doc.opencompass.org.cn",VITE_DOC_URL_ZH:"https://doc.opencompass.org.cn/zh_CN/",VITE_DATA_URL:"https://collaboration.opencompass.org.cn",VITE_SPECIAL_LIST_URL:"https://specialist.opencompass.org.cn/"})},[t.envType]),{urls:n}};export{a as default};
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"react";var L="data:image/svg+xml,%3csvg width='40' height='40' viewBox='0 0 40 40' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cg id='Logo_%26%23229%3b%26%23155%3b%26%23190%3b%26%23229%3b%26%23189%3b%26%23162%3b_%26%23232%3b%26%23147%3b%26%23157%3b'%3e%3cg id='Group 1312318385'%3e%3cg id='Subtract'%3e%3cpath d='M9.45409 9.09622L12.9367 10.6714L15.2567 6.26638C15.2567 6.26638 10.6115 8.53217 9.45409 9.09622Z' fill='%231B3882'/%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M20.2303 3.84082L17.7435 5.05361L14.5375 11.141C14.0757 11.1927 13.5948 11.3328 13.1111 11.5687C12.6274 11.8046 12.18 12.1173 11.7798 12.4858L6.96728 10.309L4.48047 11.5218L4.97871 14.0848L9.79128 16.2616C9.7239 16.7807 9.73319 17.2999 9.8301 17.7984C9.92702 18.297 10.1037 18.7345 10.3438 19.1037L7.13774 25.191L7.63598 27.754L10.1228 26.5412L13.3288 20.4539C13.7905 20.4021 14.2715 20.262 14.7552 20.0261C15.2389 19.7902 15.6863 19.4776 16.0864 19.109L20.899 21.2858L23.3858 20.0731L22.8876 17.5101L18.075 15.3333C18.1424 14.8142 18.1331 14.295 18.0362 13.7964C17.9393 13.2979 17.7626 12.8603 17.5225 12.4912L20.7285 6.4038L20.2303 3.84082ZM14.2008 17.0756C14.8806 16.744 15.3213 15.9073 15.1851 15.2066C15.0489 14.506 14.3874 14.2068 13.7076 14.5383C13.0278 14.8699 12.5871 15.7066 12.7233 16.4072C12.8595 17.1079 13.521 17.4071 14.2008 17.0756Z' fill='%231B3882'/%3e%3cpath d='M18.9068 13.3718L21.2268 8.96678L22.3893 14.9471L18.9068 13.3718Z' fill='%231B3882'/%3e%3cpath d='M18.4122 22.4986L14.9296 20.9234L12.6096 25.3284L18.4122 22.4986Z' fill='%231B3882'/%3e%3cpath d='M8.95951 18.223L6.6395 22.6281L5.47695 16.6478L8.95951 18.223Z' fill='%231B3882'/%3e%3c/g%3e%3cg id='Subtract_2'%3e%3cpath d='M13.501 26.9341L18.3311 26.7717L19.3035 24.1043C19.3035 24.1043 14.6585 26.3699 13.501 26.9341Z' fill='%235878B4'/%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M24.2772 21.6787L21.7903 22.8915L20.4466 26.5776C19.9135 26.7214 19.3937 26.9117 18.9099 27.1476C18.4262 27.3835 18.0177 27.646 17.689 27.9225L11.0142 28.1469L8.52734 29.3597L10.1807 30.4333L16.8555 30.2089C16.9883 30.4698 17.2132 30.7111 17.5348 30.9199C17.8563 31.1287 18.2486 31.2883 18.6889 31.3993L17.3451 35.0855L18.9984 36.1591L21.4852 34.9463L22.829 31.2601C23.3621 31.1163 23.8819 30.9261 24.3656 30.6902C24.8494 30.4543 25.2579 30.1918 25.5866 29.9153L32.2614 29.6909L34.7483 28.4781L33.0949 27.4045L26.4201 27.6289C26.2873 27.3679 26.0624 27.1267 25.7408 26.9179C25.4192 26.7091 25.0269 26.5495 24.5867 26.4384L25.9305 22.7523L24.2772 21.6787ZM22.4854 29.4493C23.1652 29.1178 23.3499 28.6111 22.8979 28.3176C22.4459 28.0241 21.5285 28.055 20.8486 28.3865C20.1688 28.718 19.9841 29.2247 20.4361 29.5182C20.8881 29.8117 21.8055 29.7808 22.4854 29.4493Z' fill='%235878B4'/%3e%3cpath d='M26.6114 26.4933L27.5838 23.8259L31.4416 26.3309L26.6114 26.4933Z' fill='%235878B4'/%3e%3cpath d='M29.7746 30.9036L24.9444 31.066L23.972 33.7335L29.7746 30.9036Z' fill='%235878B4'/%3e%3cpath d='M16.6642 31.3445L15.6918 34.0119L11.834 31.5069L16.6642 31.3445Z' fill='%235878B4'/%3e%3c/g%3e%3cg id='Subtract_3'%3e%3cpath d='M25.3753 6.0226L27.839 10.235L29.14 8.4672C29.14 8.4672 26.1263 6.51054 25.3753 6.0226Z' fill='%2336569B'/%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M32.3669 10.5626L30.7535 9.5149L28.9555 11.9579C28.6451 11.6179 28.3272 11.3361 28.0134 11.1323C27.6996 10.9285 27.4152 10.8192 27.1664 10.7961L23.7619 4.97493L22.1484 3.92725L22.6467 6.49023L26.0512 12.3114C26.0378 12.6908 26.0765 13.1339 26.1734 13.6324C26.2703 14.131 26.4176 14.6446 26.6037 15.1535L24.8057 17.5965L25.304 20.1595L26.9174 21.2072L28.7154 18.7642C29.0257 19.1041 29.3437 19.3859 29.6575 19.5897C29.9713 19.7935 30.2557 19.9028 30.5045 19.9259L33.909 25.7471L35.5225 26.7948L35.0242 24.2318L31.6197 18.4106C31.6331 18.0313 31.5944 17.5882 31.4975 17.0896C31.4006 16.5911 31.2533 16.0774 31.0672 15.5686L32.8652 13.1256L32.3669 10.5626ZM29.097 16.6551C29.538 16.9415 29.7852 16.6057 29.649 15.9051C29.5128 15.2044 29.0448 14.4043 28.6037 14.1179C28.1627 13.8315 27.9155 14.1673 28.0517 14.8679C28.1879 15.5686 28.6559 16.3687 29.097 16.6551Z' fill='%2336569B'/%3e%3cpath d='M32.0623 17.4564L33.3634 15.6885L34.526 21.6688L32.0623 17.4564Z' fill='%2336569B'/%3e%3cpath d='M32.2956 24.6994L29.8319 20.487L28.5308 22.2548L32.2956 24.6994Z' fill='%2336569B'/%3e%3cpath d='M25.6085 13.2656L24.3075 15.0335L23.1449 9.05321L25.6085 13.2656Z' fill='%2336569B'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e";export{L as default};
|