@xcpcio/board-app 0.42.1 → 0.44.0

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.
Files changed (44) hide show
  1. package/dist/404.html +1 -1
  2. package/dist/assets/Board-4e99f3b0.js +3 -0
  3. package/dist/assets/{Board-a97da662.css → Board-916a327e.css} +1 -1
  4. package/dist/assets/DataSourceInput.vue_vue_type_script_setup_true_lang-6f721c51.js +1 -0
  5. package/dist/assets/TheInput.vue_vue_type_script_setup_true_lang-2baa4cb9.js +1 -0
  6. package/dist/assets/_...all_-43e0e546.js +1 -0
  7. package/dist/assets/_name_-0c7a5e9a.js +1 -0
  8. package/dist/assets/{about-d2a0bbf5.js → about-8e75730a.js} +1 -1
  9. package/dist/assets/board-1c696495.js +1 -0
  10. package/dist/assets/{board-layout-63b169c0.js → board-layout-a459854f.js} +1 -1
  11. package/dist/assets/{headless-62373911.js → headless-a892fa96.js} +1 -1
  12. package/dist/assets/{home-2a1feeb6.js → home-7372e007.js} +1 -1
  13. package/dist/assets/{index-6e725f83.css → index-06792736.css} +1 -1
  14. package/dist/assets/{index-899b891a.js → index-07dee158.js} +65 -65
  15. package/dist/assets/index-514de2ad.js +1 -0
  16. package/dist/assets/index-cdc3411c.js +1 -0
  17. package/dist/assets/{index-layout-c5de32dd.js → index-layout-d26ccb52.js} +1 -1
  18. package/dist/assets/query-059e99b1.js +1 -0
  19. package/dist/assets/{test-eafc8541.js → test-2e2b5680.js} +1 -1
  20. package/dist/assets/{user-1450ac23.js → user-6d6fe1a1.js} +1 -1
  21. package/dist/assets/{virtual_pwa-register-749ff62f.js → virtual_pwa-register-7a6bd0e7.js} +1 -1
  22. package/dist/index.html +1 -1
  23. package/dist/sw.js +1 -1
  24. package/package.json +3 -3
  25. package/src/auto-imports.d.ts +3 -0
  26. package/src/components/TheCheckbox.vue +21 -0
  27. package/src/components/TheInput.vue +8 -3
  28. package/src/components/battle-of-giants/GiantsOptions.vue +138 -0
  29. package/src/components/battle-of-giants/GiantsScoreBoard.vue +79 -0
  30. package/src/components/board/Board.vue +10 -0
  31. package/src/components/board/OptionsModal.vue +168 -70
  32. package/src/components/board/Standings.vue +115 -0
  33. package/src/components/board/TeamUI.vue +15 -2
  34. package/src/components.d.ts +3 -0
  35. package/src/composables/query.ts +8 -0
  36. package/dist/assets/Board-e8123300.js +0 -3
  37. package/dist/assets/DataSourceInput.vue_vue_type_script_setup_true_lang-5fef6eb5.js +0 -1
  38. package/dist/assets/TheInput.vue_vue_type_script_setup_true_lang-16068874.js +0 -1
  39. package/dist/assets/_...all_-2c6aed90.js +0 -1
  40. package/dist/assets/_name_-61215807.js +0 -1
  41. package/dist/assets/board-4a7523cf.js +0 -1
  42. package/dist/assets/index-736d7bff.js +0 -1
  43. package/dist/assets/index-9e02c4dd.js +0 -1
  44. package/dist/assets/useQueryBoardData-32e95c39.js +0 -1
@@ -0,0 +1 @@
1
+ import{g as w,s as h,i,v as L,o,c as t,l as e,n as V,d as s,x as D,t as v,m as y,h as F,B as C,u as R,w as A,j as O,y as q,z as M,A as Q,k as X,F as I,D as G,E as H,R as J,b as B,a as K,q as S}from"./index-07dee158.js";import{u as P,g as W}from"./query-059e99b1.js";import{_ as Y}from"./DataSourceInput.vue_vue_type_script_setup_true_lang-6f721c51.js";import"./TheInput.vue_vue_type_script_setup_true_lang-2baa4cb9.js";const Z={flex:"","flex-1":"","flex-col":"","justify-center":"","items-start":""},ee={class:"resolver-team-name",truncate:"","overflow-hidden":""},oe=s("div",{flex:"","flex-row":"","text-sm":"","items-start":"","gap-x-2":""},null,-1),te={"w-32":"",flex:"","flex-shrink-0":"","flex-row":"","justify-start":"","items-center":""},se=w({__name:"BalloonBlock",props:{index:null,balloon:null},setup(m){const n=m,u=h(()=>n.index),a=h(()=>n.balloon),l=i(null),r=L(l);function x(c){return[c.location,c.organization,c.name].filter(k=>k).join(" - ")}const f=h(()=>a.value.problem.balloonColor);return(c,p)=>(o(),t("div",{ref_key:"el",ref:l,"h-24":""},[e(r)?(o(),t("div",{key:0,"h-24":"",flex:"","flex-row":"","gap-x-4":"","font-mono":"","text-4xl":"",class:V([e(u)%2===0?"bg-resolver-bg-zero":"bg-resolver-bg-one"])},[s("div",{"w-20":"",flex:"","flex-shrink-0":"","justify-center":"","items-center":"",style:D({backgroundColor:e(f).background_color})},[s("div",{style:D({color:e(f).color})},v(e(a).problem.label),5)],4),s("div",Z,[s("div",ee,v(x(e(a).team)),1),oe]),s("div",te,v(e(a).submission.timestampToMinute),1)],2)):y("",!0)],512))}}),ne={class:"bg-[#323443]","text-gray-200":""},ae={key:0},le={flex:"","flex-col":"","justify-center":"","items-center":"","w-screen":"","h-screen":"","text-xl":"",italic:""},re={key:0},ce={key:1},ie={flex:"","flex-col":"","justify-between":""},ue=w({__name:"Balloon",props:{dataSourceUrl:null},setup(m){const n=m,u=F(C),{t:a}=R(),l=i(!1),r=i({}),x=i([]),f=i([]),c=i({}),p=i(new Date);function k(){const d=new J(r.value,x.value,f.value);d.buildBalloons(),c.value=d}const{data:_,isError:N,error:T}=P(n.dataSourceUrl,p);A(_,async()=>{var d,g,b;_.value===null||_.value===void 0||(r.value=O((d=_.value)==null?void 0:d.contest),u.value=`${r.value.name} | ${C}`,x.value=q((g=_.value)==null?void 0:g.teams),f.value=M((b=_.value)==null?void 0:b.submissions),k(),l.value=!0)});const U=h(()=>c.value.balloons.sort(Q.compare).reverse().slice(0,256)),z=setInterval(()=>{p.value=new Date},1e3);return X(()=>{clearInterval(z)}),(d,g)=>{const b=se;return o(),t("div",ne,[e(l)?(o(),t("div",ce,[s("div",ie,[(o(!0),t(I,null,G(e(U),($,E)=>(o(),H(b,{key:$.key,index:E,balloon:$},null,8,["index","balloon"]))),128))])])):(o(),t("div",ae,[s("div",le,[s("div",null,v(e(a)("common.loading"))+"... ",1),e(N)?(o(),t("div",re,v(e(T)),1)):y("",!0)])]))])}}}),_e={key:0},de={"mt-20":""},me={key:1},fe=w({__name:"CustomBalloon",setup(m){const n=W();return(u,a)=>{const l=Y,r=ue;return o(),t(I,null,[e(n).length===0?(o(),t("div",_e,[s("div",de,[B(l)])])):y("",!0),e(n).length>0?(o(),t("div",me,[B(r,{"data-source-url":e(n)},null,8,["data-source-url"])])):y("",!0)],64)}}}),j={};function ve(m,n){const u=fe;return o(),t("div",null,[B(u)])}typeof S=="function"&&S(j);const ye=K(j,[["render",ve]]);export{ye as default};
@@ -0,0 +1 @@
1
+ import{g as x,u as D,h as N,C as g,i as d,w as $,j as U,k as T,o,c as s,l as t,d as c,t as r,m,n as h,p as b,a as y,b as p,F as E,q as C}from"./index-07dee158.js";import{u as B,g as F}from"./query-059e99b1.js";import{_ as j}from"./DataSourceInput.vue_vue_type_script_setup_true_lang-6f721c51.js";import"./TheInput.vue_vue_type_script_setup_true_lang-2baa4cb9.js";const V={class:"background","text-gray-200":"","w-screen":"","h-screen":""},L={key:0},O={flex:"","flex-col":"","justify-center":"","items-center":"","w-screen":"","h-screen":"","text-xl":"",italic:""},P={key:0},q={key:1},z={flex:"","flex-col":"","items-center":"","justify-center":"","font-mono":""},G={key:0},Q={key:1},W=x({__name:"Countdown",props:{dataSourceUrl:null},setup(l){const a=l,{t:_}=D(),v=N(g),e=d(new Date),n=d({}),f=d(!1),{data:i,isError:w,error:k}=B(a.dataSourceUrl,e);$(i,async()=>{var u;i.value===null||i.value===void 0||(n.value=U((u=i.value)==null?void 0:u.contest),v.value=`${n.value.name} | ${g}`,f.value=!0)});const I=setInterval(()=>{e.value=new Date},1e3);return T(()=>{clearInterval(I)}),(u,R)=>(o(),s("div",V,[t(f)?(o(),s("div",q,[c("div",z,[c("div",{"mt-20":"","text-6xl":"",class:h([t(n).getContestState(t(e)).toString()])},r(t(n).getContestState(t(e))),3),c("div",{"mt-20":"",class:h(["text-[320px]",[t(n).getContestState(t(e)).toString()]])},[t(n).getContestState(t(e))===t(b).PENDING?(o(),s("div",G,r(t(n).getContestPendingTime(t(e))),1)):(o(),s("div",Q,r(t(n).getContestElapsedTime(t(e))),1))],2)])])):(o(),s("div",L,[c("div",O,[c("div",null,r(t(_)("common.loading"))+"... ",1),t(w)?(o(),s("div",P,r(t(k)),1)):m("",!0)])]))]))}});const X=y(W,[["__scopeId","data-v-03b5a196"]]),A={key:0},H={"mt-20":""},J={key:1},K=x({__name:"CustomCountdown",setup(l){const a=F();return(_,v)=>{const e=j,n=X;return o(),s(E,null,[t(a).length===0?(o(),s("div",A,[c("div",H,[p(e)])])):m("",!0),t(a).length>0?(o(),s("div",J,[p(n,{"data-source-url":t(a)},null,8,["data-source-url"])])):m("",!0)],64)}}}),S={};function M(l,a){const _=K;return o(),s("div",null,[p(_)])}typeof C=="function"&&C(S);const nt=y(S,[["render",M]]);export{nt as default};
@@ -1 +1 @@
1
- import{a as s,r as a,o as c,c as r,b as e,d as _,F as m,e as p,f as l}from"./index-899b891a.js";const i={},d={class:"lg:mt-[-52px]","py-2":"","text-gray-700":"","dark:text-gray-200":""};function u(x,f){const o=p,t=a("RouterView"),n=l;return c(),r(m,null,[e(o,{width:"sm:w-[1024px] lg:w-screen"}),_("main",d,[e(t),e(n,{class:"sm:w-[1024px] lg:w-screen"})])],64)}const w=s(i,[["render",u]]);export{w as default};
1
+ import{a as s,r as a,o as c,c as r,b as e,d as _,F as m,e as p,f as l}from"./index-07dee158.js";const i={},d={class:"lg:mt-[-52px]","py-2":"","text-gray-700":"","dark:text-gray-200":""};function u(x,f){const o=p,t=a("RouterView"),n=l;return c(),r(m,null,[e(o,{width:"sm:w-[1024px] lg:w-screen"}),_("main",d,[e(t),e(n,{class:"sm:w-[1024px] lg:w-screen"})])],64)}const w=s(i,[["render",u]]);export{w as default};
@@ -0,0 +1 @@
1
+ import{at as K,au as S,av as B,aw as U,ax as D,ay as W,az as N,aA as V,aB as A,aC as z,aD as H,aE as $,aF as G,aG as J,s as P,aH as Y,w as b,aI as x,aJ as _,aK as X,aL as Z,aM as ee,l as C,aN as te,aO as se,ai as j}from"./index-07dee158.js";class re extends K{constructor(e,t){super(),this.client=e,this.options=t,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.currentQuery.addObserver(this),k(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return E(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return E(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(e,t){const s=this.options,n=this.currentQuery;if(this.options=this.client.defaultQueryOptions(e),S(s,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=s.queryKey),this.updateQuery();const i=this.hasListeners();i&&L(this.currentQuery,n,this.options,s)&&this.executeFetch(),this.updateResult(t),i&&(this.currentQuery!==n||this.options.enabled!==s.enabled||this.options.staleTime!==s.staleTime)&&this.updateStaleTimeout();const u=this.computeRefetchInterval();i&&(this.currentQuery!==n||this.options.enabled!==s.enabled||u!==this.currentRefetchInterval)&&this.updateRefetchInterval(u)}getOptimisticResult(e){const t=this.client.getQueryCache().build(this.client,e),s=this.createResult(t,e);return ne(this,s,e)&&(this.currentResult=s,this.currentResultOptions=this.options,this.currentResultState=this.currentQuery.state),s}getCurrentResult(){return this.currentResult}trackResult(e){const t={};return Object.keys(e).forEach(s=>{Object.defineProperty(t,s,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(s),e[s])})}),t}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:e,...t}={}){return this.fetch({...t,meta:{refetchPage:e}})}fetchOptimistic(e){const t=this.client.defaultQueryOptions(e),s=this.client.getQueryCache().build(this.client,t);return s.isFetchingOptimistic=!0,s.fetch().then(()=>this.createResult(s,t))}fetch(e){var t;return this.executeFetch({...e,cancelRefetch:(t=e.cancelRefetch)!=null?t:!0}).then(()=>(this.updateResult(),this.currentResult))}executeFetch(e){this.updateQuery();let t=this.currentQuery.fetch(this.options,e);return e!=null&&e.throwOnError||(t=t.catch(B)),t}updateStaleTimeout(){if(this.clearStaleTimeout(),U||this.currentResult.isStale||!D(this.options.staleTime))return;const t=W(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},t)}computeRefetchInterval(){var e;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(e=this.options.refetchInterval)!=null?e:!1}updateRefetchInterval(e){this.clearRefetchInterval(),this.currentRefetchInterval=e,!(U||this.options.enabled===!1||!D(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||N.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(e,t){const s=this.currentQuery,n=this.options,i=this.currentResult,u=this.currentResultState,a=this.currentResultOptions,l=e!==s,h=l?e.state:this.currentQueryInitialState,c=l?this.currentResult:this.previousQueryResult,{state:o}=e;let{dataUpdatedAt:d,error:R,errorUpdatedAt:m,fetchStatus:v,status:f}=o,w=!1,F=!1,y;if(t._optimisticResults){const p=this.hasListeners(),O=!p&&k(e,t),q=p&&L(e,s,t,n);(O||q)&&(v=V(e.options.networkMode)?"fetching":"paused",d||(f="loading")),t._optimisticResults==="isRestoring"&&(v="idle")}if(t.keepPreviousData&&!o.dataUpdatedAt&&c!=null&&c.isSuccess&&f!=="error")y=c.data,d=c.dataUpdatedAt,f=c.status,w=!0;else if(t.select&&typeof o.data<"u")if(i&&o.data===(u==null?void 0:u.data)&&t.select===this.selectFn)y=this.selectResult;else try{this.selectFn=t.select,y=t.select(o.data),y=A(i==null?void 0:i.data,y,t),this.selectResult=y,this.selectError=null}catch(p){this.selectError=p}else y=o.data;if(typeof t.placeholderData<"u"&&typeof y>"u"&&f==="loading"){let p;if(i!=null&&i.isPlaceholderData&&t.placeholderData===(a==null?void 0:a.placeholderData))p=i.data;else if(p=typeof t.placeholderData=="function"?t.placeholderData():t.placeholderData,t.select&&typeof p<"u")try{p=t.select(p),this.selectError=null}catch(O){this.selectError=O}typeof p<"u"&&(f="success",y=A(i==null?void 0:i.data,p,t),F=!0)}this.selectError&&(R=this.selectError,y=this.selectResult,m=Date.now(),f="error");const Q=v==="fetching",g=f==="loading",I=f==="error";return{status:f,fetchStatus:v,isLoading:g,isSuccess:f==="success",isError:I,isInitialLoading:g&&Q,data:y,dataUpdatedAt:d,error:R,errorUpdatedAt:m,failureCount:o.fetchFailureCount,failureReason:o.fetchFailureReason,errorUpdateCount:o.errorUpdateCount,isFetched:o.dataUpdateCount>0||o.errorUpdateCount>0,isFetchedAfterMount:o.dataUpdateCount>h.dataUpdateCount||o.errorUpdateCount>h.errorUpdateCount,isFetching:Q,isRefetching:Q&&!g,isLoadingError:I&&o.dataUpdatedAt===0,isPaused:v==="paused",isPlaceholderData:F,isPreviousData:w,isRefetchError:I&&o.dataUpdatedAt!==0,isStale:T(e,t),refetch:this.refetch,remove:this.remove}}updateResult(e){const t=this.currentResult,s=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,S(s,t))return;this.currentResult=s;const n={cache:!0},i=()=>{if(!t)return!0;const{notifyOnChangeProps:u}=this.options,a=typeof u=="function"?u():u;if(a==="all"||!a&&!this.trackedProps.size)return!0;const l=new Set(a??this.trackedProps);return this.options.useErrorBoundary&&l.add("error"),Object.keys(this.currentResult).some(h=>{const c=h;return this.currentResult[c]!==t[c]&&l.has(c)})};(e==null?void 0:e.listeners)!==!1&&i()&&(n.listeners=!0),this.notify({...n,...e})}updateQuery(){const e=this.client.getQueryCache().build(this.client,this.options);if(e===this.currentQuery)return;const t=this.currentQuery;this.currentQuery=e,this.currentQueryInitialState=e.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(t==null||t.removeObserver(this),e.addObserver(this))}onQueryUpdate(e){const t={};e.type==="success"?t.onSuccess=!e.manual:e.type==="error"&&!z(e.error)&&(t.onError=!0),this.updateResult(t),this.hasListeners()&&this.updateTimers()}notify(e){H.batch(()=>{if(e.onSuccess){var t,s,n,i;(t=(s=this.options).onSuccess)==null||t.call(s,this.currentResult.data),(n=(i=this.options).onSettled)==null||n.call(i,this.currentResult.data,null)}else if(e.onError){var u,a,l,h;(u=(a=this.options).onError)==null||u.call(a,this.currentResult.error),(l=(h=this.options).onSettled)==null||l.call(h,void 0,this.currentResult.error)}e.listeners&&this.listeners.forEach(({listener:c})=>{c(this.currentResult)}),e.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function ie(r,e){return e.enabled!==!1&&!r.state.dataUpdatedAt&&!(r.state.status==="error"&&e.retryOnMount===!1)}function k(r,e){return ie(r,e)||r.state.dataUpdatedAt>0&&E(r,e,e.refetchOnMount)}function E(r,e,t){if(e.enabled!==!1){const s=typeof t=="function"?t(r):t;return s==="always"||s!==!1&&T(r,e)}return!1}function L(r,e,t,s){return t.enabled!==!1&&(r!==e||s.enabled===!1)&&(!t.suspense||r.state.status!=="error")&&T(r,t)}function T(r,e){return r.isStaleByTime(e.staleTime)}function ne(r,e,t){return t.keepPreviousData?!1:t.placeholderData!==void 0?e.isPlaceholderData:!S(r.getCurrentResult(),e)}function ue(r=""){var e;if(!((e=$())==null?void 0:e.proxy))throw new Error("vue-query hooks can only be used inside setup() function.");const s=J(r),n=G(s);if(!n)throw new Error("No 'queryClient' found in Vue context, use 'VueQueryPlugin' to properly initialize the library.");return n}function ae(r,e,t={},s={}){var n;const i=P(()=>ce(e,t,s)),u=(n=i.value.queryClient)!=null?n:ue(i.value.queryClientKey),a=P(()=>{const d=u.defaultQueryOptions(i.value);return d._optimisticResults=u.isRestoring.value?"isRestoring":"optimistic",d}),l=new r(u,a.value),h=Y(l.getCurrentResult());let c=()=>{};b(u.isRestoring,d=>{d||(c(),c=l.subscribe(R=>{x(h,R)}))},{immediate:!0}),b(a,()=>{l.setOptions(a.value),x(h,l.getCurrentResult())}),_(()=>{c()});const o=()=>new Promise((d,R)=>{let m=()=>{};const v=()=>{if(a.value.enabled!==!1){const f=l.getOptimisticResult(a.value);f.isStale?(m(),l.fetchOptimistic(a.value).then(d,R)):(m(),d(f))}};v(),m=b(a,v,{deep:!0})});return b(()=>h.error,d=>{if(h.isError&&!h.isFetching&&X(a.value.useErrorBoundary,[d,l.getCurrentQuery()]))throw d}),{...Z(ee(h)),suspense:o}}function ce(r,e={},t={}){const s=C(r),n=C(e),i=C(t);let u=s;return te(s)?typeof n=="function"?u={...i,queryKey:s,queryFn:n}:u={...n,queryKey:s}:u=s,se(u)}function le(r,e,t){const s=ae(re,r,e,t);return{...s,refetch:s.refetch.value,remove:s.remove.value}}const oe=3,M=30*1e3;async function he(r,e){const t=r.startsWith("/")?r.slice(1):r;let s=`${window.DATA_HOST}${t}`;r.startsWith("http")&&(s=r),s.endsWith("/")&&(s=s.slice(0,-1));const n=await fetch(`${s}/config.json?t=${e??0}`),i=await fetch(`${s}/team.json?t=${e??0}`),u=await fetch(`${s}/run.json?t=${e??0}`),{status:a,statusText:l}=n;if(a>=300||a<200)throw new Error(`fetch data failed. [status=${a}] [statusText=${l}]`);return Promise.all([n.json(),i.json(),u.json()]).then(c=>({contest:c[0],teams:c[1],submissions:c[2]}))}function pe(r,e){return le({queryKey:[r,e.value.getTime()],queryFn:()=>he(r,e.value.getTime()),retry:oe,staleTime:M,refetchInterval:M})}function ye(){return j("data-source","",{transform:String})}function ve(){return j("battle-of-giants","",{transform:String})}export{ve as a,ye as g,pe as u};
@@ -1 +1 @@
1
- import{_ as m}from"./TheInput.vue_vue_type_script_setup_true_lang-16068874.js";import{g as _,i as p,G as f,u as h,o as b,c as v,d as e,t as n,l as o,b as y,H as x,I as g,q as l}from"./index-899b891a.js";import{u as w}from"./user-1450ac23.js";const V={flex:"","flex-col":"","justify-center":"","items-center":""},k=e("div",{"text-4xl":""},[e("div",{"i-carbon-campsite":""})],-1),I=e("p",null,[e("a",{rel:"noreferrer",href:"https://github.com/antfu/vitesse",target:"_blank"}," Vitesse ")],-1),B={"text-sm":"","opacity-75":""},C=e("div",{"py-4":""},null,-1),K={"w-48":""},N={class:"hidden",for:"input"},R=["disabled"],U=_({name:"IndexPage",__name:"test",setup(S){const r=w(),t=p(r.savedName),c=f();function a(){t.value&&c.push(`/hi/${encodeURIComponent(t.value)}`)}const{t:s}=h();return($,i)=>{const u=m;return b(),v("div",V,[k,I,e("p",null,[e("em",B,n(o(s)("intro.desc")),1)]),C,e("div",K,[y(u,{modelValue:o(t),"onUpdate:modelValue":i[0]||(i[0]=d=>x(t)?t.value=d:null),placeholder:o(s)("intro.whats-your-name"),autocomplete:"false",onKeydown:g(a,["enter"])},null,8,["modelValue","placeholder","onKeydown"]),e("label",N,n(o(s)("intro.whats-your-name")),1)]),e("div",null,[e("button",{"m-3":"","text-sm":"",btn:"",disabled:!o(t),onClick:a},n(o(s)("button.go")),9,R)])])}}});typeof l=="function"&&l(U);export{U as default};
1
+ import{_ as m}from"./TheInput.vue_vue_type_script_setup_true_lang-2baa4cb9.js";import{g as _,i as p,G as f,u as h,o as b,c as v,d as e,t as n,l as o,b as y,H as x,I as g,q as l}from"./index-07dee158.js";import{u as w}from"./user-6d6fe1a1.js";const V={flex:"","flex-col":"","justify-center":"","items-center":""},k=e("div",{"text-4xl":""},[e("div",{"i-carbon-campsite":""})],-1),I=e("p",null,[e("a",{rel:"noreferrer",href:"https://github.com/antfu/vitesse",target:"_blank"}," Vitesse ")],-1),B={"text-sm":"","opacity-75":""},C=e("div",{"py-4":""},null,-1),K={"w-48":""},N={class:"hidden",for:"input"},R=["disabled"],U=_({name:"IndexPage",__name:"test",setup(S){const r=w(),t=p(r.savedName),c=f();function a(){t.value&&c.push(`/hi/${encodeURIComponent(t.value)}`)}const{t:s}=h();return($,i)=>{const u=m;return b(),v("div",V,[k,I,e("p",null,[e("em",B,n(o(s)("intro.desc")),1)]),C,e("div",K,[y(u,{modelValue:o(t),"onUpdate:modelValue":i[0]||(i[0]=d=>x(t)?t.value=d:null),placeholder:o(s)("intro.whats-your-name"),autocomplete:"false",onKeydown:g(a,["enter"])},null,8,["modelValue","placeholder","onKeydown"]),e("label",N,n(o(s)("intro.whats-your-name")),1)]),e("div",null,[e("button",{"m-3":"","text-sm":"",btn:"",disabled:!o(t),onClick:a},n(o(s)("button.go")),9,R)])])}}});typeof l=="function"&&l(U);export{U as default};
@@ -1 +1 @@
1
- import{aP as m,i as r,s as t}from"./index-899b891a.js";const l=m("user",()=>{const e=r(""),s=r(new Set),o=t(()=>Array.from(s.value)),u=t(()=>o.value.filter(a=>a!==e.value));function n(a){e.value&&s.value.add(e.value),e.value=a}return{setNewName:n,otherNames:u,savedName:e}});export{l as u};
1
+ import{aS as m,i as r,s as t}from"./index-07dee158.js";const l=m("user",()=>{const e=r(""),s=r(new Set),o=t(()=>Array.from(s.value)),u=t(()=>o.value.filter(a=>a!==e.value));function n(a){e.value&&s.value.add(e.value),e.value=a}return{setNewName:n,otherNames:u,savedName:e}});export{l as u};
@@ -1 +1 @@
1
- import{_ as u}from"./index-899b891a.js";function p(d={}){const{immediate:l=!1,onNeedRefresh:v,onOfflineReady:t,onRegistered:r,onRegisteredSW:o,onRegisterError:s}=d;let i,n;const c=async(a=!0)=>{await n};async function f(){if("serviceWorker"in navigator){const{Workbox:a}=await u(()=>import("./workbox-window.prod.es5-a7b12eab.js"),[],import.meta.url);i=new a("/sw.js",{scope:"/",type:"classic"}),i.addEventListener("activated",e=>{(e.isUpdate||e.isExternal)&&window.location.reload()}),i.addEventListener("installed",e=>{e.isUpdate||t==null||t()}),i.register({immediate:l}).then(e=>{o?o("/sw.js",e):r==null||r(e)}).catch(e=>{s==null||s(e)})}}return n=f(),c}export{p as registerSW};
1
+ import{_ as u}from"./index-07dee158.js";function p(d={}){const{immediate:l=!1,onNeedRefresh:v,onOfflineReady:t,onRegistered:r,onRegisteredSW:o,onRegisterError:s}=d;let i,n;const c=async(a=!0)=>{await n};async function f(){if("serviceWorker"in navigator){const{Workbox:a}=await u(()=>import("./workbox-window.prod.es5-a7b12eab.js"),[],import.meta.url);i=new a("/sw.js",{scope:"/",type:"classic"}),i.addEventListener("activated",e=>{(e.isUpdate||e.isExternal)&&window.location.reload()}),i.addEventListener("installed",e=>{e.isUpdate||t==null||t()}),i.register({immediate:l}).then(e=>{o?o("/sw.js",e):r==null||r(e)}).catch(e=>{s==null||s(e)})}}return n=f(),c}export{p as registerSW};
package/dist/index.html CHANGED
@@ -1 +1 @@
1
- <!doctype html><html lang="en"><head><meta charset="UTF-8"><link rel="apple-touch-icon" href="https://cdn.jsdelivr.net/npm/@xcpcio/board-app@0.42.1/dist/balloon-192x192.png"><link rel="mask-icon" href="https://cdn.jsdelivr.net/npm/@xcpcio/board-app@0.42.1/dist/balloon-512x512.svg" color="#00aba9"><meta name="msapplication-TileColor" content="#00aba9"><script>function normalizePath(_){for(;_.endsWith("/");)_=_.slice(0,-1);return`${_}/`}{let _="https://cdn.jsdelivr.net/npm/@xcpcio/board-app@0.42.1/dist";_=normalizePath(_),window.CDN_HOST=_}try{let _=__DATA_HOST__;_=normalizePath(_),window.DATA_HOST=_}catch(_){window.DATA_HOST="/data/"}try{let _=__DATA_REGION__;window.DATA_REGION=_}catch(_){window.DATA_REGION="CN"}try{let _=__DEFAULT_LANG__;window.DEFAULT_LANG=_}catch(_){window.DEFAULT_LANG="en"}</script><script>!function(){localStorage.getItem("vueuse-color-scheme")||localStorage.setItem("vueuse-color-scheme","light");const e=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches,o=localStorage.getItem("vueuse-color-scheme")||"auto";("dark"===o||e&&"light"!==o)&&document.documentElement.classList.toggle("dark",!0)}()</script><script type="module" crossorigin src="https://cdn.jsdelivr.net/npm/@xcpcio/board-app@0.42.1/dist/assets/index-899b891a.js"></script><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@xcpcio/board-app@0.42.1/dist/assets/index-6e725f83.css"><link rel="manifest" href="/manifest.webmanifest"><style></style></head><body class="font-sans"><div id="app"></div><noscript>This website requires JavaScript to function properly. Please enable JavaScript to continue.</noscript><script>try{var umamiJSUrl=__UMAMI_JS_URL__,umamiWebsiteId=__UMAMI_WEBSITE_ID__;!function(){var e=document.createElement("script");e.src=umamiJSUrl,e.defer=!0,e.setAttribute("data-website-id",umamiWebsiteId);var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)}()}catch(e){}try{var plausibleJSUrl=__PLAUSIBLE_JS_URL__,plausibleDataDomain=__PLAUSIBLE_DATA_DOMAIN__;!function(){var e=document.createElement("script");e.src=plausibleJSUrl,e.defer=!0,e.setAttribute("data-domain",plausibleDataDomain);var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)}()}catch(e){}try{var baiduAnalyticsId=__BAIDU_ANALYTICS_ID__,_hmt=_hmt||[];!function(){var e=document.createElement("script");e.src=`https://hm.baidu.com/hm.js?${baiduAnalyticsId}`;var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)}()}catch(e){}try{var googleAnalyticsId=__GOOGLE_ANALYTICS_ID__;!function(){var e,t,a,r,c,n;location.port||(e=window,t=document,a="script",r="ga",e.GoogleAnalyticsObject=r,e[r]=e[r]||function(){(e[r].q=e[r].q||[]).push(arguments)},e[r].l=1*new Date,c=t.createElement(a),n=t.getElementsByTagName(a)[0],c.async=1,c.src="//www.google-analytics.com/analytics.js",n.parentNode.insertBefore(c,n),ga("create",`${googleAnalyticsId}`,"auto"),ga("send","pageview"))}()}catch(e){}</script></body></html>
1
+ <!doctype html><html lang="en"><head><meta charset="UTF-8"><link rel="apple-touch-icon" href="https://cdn.jsdelivr.net/npm/@xcpcio/board-app@0.44.0/dist/balloon-192x192.png"><link rel="mask-icon" href="https://cdn.jsdelivr.net/npm/@xcpcio/board-app@0.44.0/dist/balloon-512x512.svg" color="#00aba9"><meta name="msapplication-TileColor" content="#00aba9"><script>function normalizePath(_){for(;_.endsWith("/");)_=_.slice(0,-1);return`${_}/`}{let _="https://cdn.jsdelivr.net/npm/@xcpcio/board-app@0.44.0/dist";_=normalizePath(_),window.CDN_HOST=_}try{let _=__DATA_HOST__;_=normalizePath(_),window.DATA_HOST=_}catch(_){window.DATA_HOST="/data/"}try{let _=__DATA_REGION__;window.DATA_REGION=_}catch(_){window.DATA_REGION="CN"}try{let _=__DEFAULT_LANG__;window.DEFAULT_LANG=_}catch(_){window.DEFAULT_LANG="en"}</script><script>!function(){localStorage.getItem("vueuse-color-scheme")||localStorage.setItem("vueuse-color-scheme","light");const e=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches,o=localStorage.getItem("vueuse-color-scheme")||"auto";("dark"===o||e&&"light"!==o)&&document.documentElement.classList.toggle("dark",!0)}()</script><script type="module" crossorigin src="https://cdn.jsdelivr.net/npm/@xcpcio/board-app@0.44.0/dist/assets/index-07dee158.js"></script><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@xcpcio/board-app@0.44.0/dist/assets/index-06792736.css"><link rel="manifest" href="/manifest.webmanifest"><style></style></head><body class="font-sans"><div id="app"></div><noscript>This website requires JavaScript to function properly. Please enable JavaScript to continue.</noscript><script>try{var umamiJSUrl=__UMAMI_JS_URL__,umamiWebsiteId=__UMAMI_WEBSITE_ID__;!function(){var e=document.createElement("script");e.src=umamiJSUrl,e.defer=!0,e.setAttribute("data-website-id",umamiWebsiteId);var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)}()}catch(e){}try{var plausibleJSUrl=__PLAUSIBLE_JS_URL__,plausibleDataDomain=__PLAUSIBLE_DATA_DOMAIN__;!function(){var e=document.createElement("script");e.src=plausibleJSUrl,e.defer=!0,e.setAttribute("data-domain",plausibleDataDomain);var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)}()}catch(e){}try{var baiduAnalyticsId=__BAIDU_ANALYTICS_ID__,_hmt=_hmt||[];!function(){var e=document.createElement("script");e.src=`https://hm.baidu.com/hm.js?${baiduAnalyticsId}`;var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)}()}catch(e){}try{var googleAnalyticsId=__GOOGLE_ANALYTICS_ID__;!function(){var e,t,a,r,c,n;location.port||(e=window,t=document,a="script",r="ga",e.GoogleAnalyticsObject=r,e[r]=e[r]||function(){(e[r].q=e[r].q||[]).push(arguments)},e[r].l=1*new Date,c=t.createElement(a),n=t.getElementsByTagName(a)[0],c.async=1,c.src="//www.google-analytics.com/analytics.js",n.parentNode.insertBefore(c,n),ga("create",`${googleAnalyticsId}`,"auto"),ga("send","pageview"))}()}catch(e){}</script></body></html>
package/dist/sw.js CHANGED
@@ -1 +1 @@
1
- if(!self.define){let s,e={};const l=(l,n)=>(l=new URL(l+".js",n).href,e[l]||new Promise((e=>{if("document"in self){const s=document.createElement("script");s.src=l,s.onload=e,document.head.appendChild(s)}else s=l,importScripts(l),e()})).then((()=>{let s=e[l];if(!s)throw new Error(`Module ${l} didn’t register its module`);return s})));self.define=(n,r)=>{const i=s||("document"in self?document.currentScript.src:"")||location.href;if(e[i])return;let u={};const a=s=>l(s,i),t={module:{uri:i},exports:u,require:a};e[i]=Promise.all(n.map((s=>t[s]||a(s)))).then((s=>(r(...s),u)))}}define(["./workbox-b8d87ee1"],(function(s){"use strict";self.skipWaiting(),s.clientsClaim(),s.precacheAndRoute([{url:"assets/_...all_-2c6aed90.js",revision:null},{url:"assets/_name_-61215807.js",revision:null},{url:"assets/about-d2a0bbf5.js",revision:null},{url:"assets/board-4a7523cf.js",revision:null},{url:"assets/Board-a97da662.css",revision:null},{url:"assets/Board-e8123300.js",revision:null},{url:"assets/board-layout-63b169c0.js",revision:null},{url:"assets/DataSourceInput.vue_vue_type_script_setup_true_lang-5fef6eb5.js",revision:null},{url:"assets/en-c9a8dbb5.js",revision:null},{url:"assets/headless-62373911.js",revision:null},{url:"assets/home-2a1feeb6.js",revision:null},{url:"assets/index-39ee8a2c.css",revision:null},{url:"assets/index-6e725f83.css",revision:null},{url:"assets/index-736d7bff.js",revision:null},{url:"assets/index-899b891a.js",revision:null},{url:"assets/index-9e02c4dd.js",revision:null},{url:"assets/index-layout-c5de32dd.js",revision:null},{url:"assets/test-eafc8541.js",revision:null},{url:"assets/TheInput.vue_vue_type_script_setup_true_lang-16068874.js",revision:null},{url:"assets/useQueryBoardData-32e95c39.js",revision:null},{url:"assets/user-1450ac23.js",revision:null},{url:"assets/virtual_pwa-register-749ff62f.js",revision:null},{url:"assets/workbox-window.prod.es5-a7b12eab.js",revision:null},{url:"assets/zh-CN-8e545f66.js",revision:null},{url:"index.html",revision:"0054ebc6bd103df3fe87b1e413ee5fc7"},{url:"favicon.svg",revision:"5a744f4ccbb122d4a0575be779ddcd43"},{url:"safari-pinned-tab.svg",revision:"5eaf74d1c43d30e0af743b68a3f48504"},{url:"balloon2-192x192.png",revision:"c857ae6d9dfae118ab4397d4358422bd"},{url:"balloon2-512x512.png",revision:"065594f4f743fe3884793c03d3fe7d9e"},{url:"manifest.webmanifest",revision:"3082e8d8ebc9619c6c1055ff243a02a8"}],{}),s.cleanupOutdatedCaches(),s.registerRoute(new s.NavigationRoute(s.createHandlerBoundToURL("index.html")))}));
1
+ if(!self.define){let s,e={};const l=(l,n)=>(l=new URL(l+".js",n).href,e[l]||new Promise((e=>{if("document"in self){const s=document.createElement("script");s.src=l,s.onload=e,document.head.appendChild(s)}else s=l,importScripts(l),e()})).then((()=>{let s=e[l];if(!s)throw new Error(`Module ${l} didn’t register its module`);return s})));self.define=(n,i)=>{const r=s||("document"in self?document.currentScript.src:"")||location.href;if(e[r])return;let u={};const a=s=>l(s,r),t={module:{uri:r},exports:u,require:a};e[r]=Promise.all(n.map((s=>t[s]||a(s)))).then((s=>(i(...s),u)))}}define(["./workbox-b8d87ee1"],(function(s){"use strict";self.skipWaiting(),s.clientsClaim(),s.precacheAndRoute([{url:"assets/_...all_-43e0e546.js",revision:null},{url:"assets/_name_-0c7a5e9a.js",revision:null},{url:"assets/about-8e75730a.js",revision:null},{url:"assets/board-1c696495.js",revision:null},{url:"assets/Board-4e99f3b0.js",revision:null},{url:"assets/Board-916a327e.css",revision:null},{url:"assets/board-layout-a459854f.js",revision:null},{url:"assets/DataSourceInput.vue_vue_type_script_setup_true_lang-6f721c51.js",revision:null},{url:"assets/en-c9a8dbb5.js",revision:null},{url:"assets/headless-a892fa96.js",revision:null},{url:"assets/home-7372e007.js",revision:null},{url:"assets/index-06792736.css",revision:null},{url:"assets/index-07dee158.js",revision:null},{url:"assets/index-39ee8a2c.css",revision:null},{url:"assets/index-514de2ad.js",revision:null},{url:"assets/index-cdc3411c.js",revision:null},{url:"assets/index-layout-d26ccb52.js",revision:null},{url:"assets/query-059e99b1.js",revision:null},{url:"assets/test-2e2b5680.js",revision:null},{url:"assets/TheInput.vue_vue_type_script_setup_true_lang-2baa4cb9.js",revision:null},{url:"assets/user-6d6fe1a1.js",revision:null},{url:"assets/virtual_pwa-register-7a6bd0e7.js",revision:null},{url:"assets/workbox-window.prod.es5-a7b12eab.js",revision:null},{url:"assets/zh-CN-8e545f66.js",revision:null},{url:"index.html",revision:"21893f576b0f128f0bf5babf9cbc9583"},{url:"favicon.svg",revision:"5a744f4ccbb122d4a0575be779ddcd43"},{url:"safari-pinned-tab.svg",revision:"5eaf74d1c43d30e0af743b68a3f48504"},{url:"balloon2-192x192.png",revision:"c857ae6d9dfae118ab4397d4358422bd"},{url:"balloon2-512x512.png",revision:"065594f4f743fe3884793c03d3fe7d9e"},{url:"manifest.webmanifest",revision:"3082e8d8ebc9619c6c1055ff243a02a8"}],{}),s.cleanupOutdatedCaches(),s.registerRoute(new s.NavigationRoute(s.createHandlerBoundToURL("index.html")))}));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@xcpcio/board-app",
3
3
  "type": "module",
4
- "version": "0.42.1",
4
+ "version": "0.44.0",
5
5
  "description": "XCPCIO Board App",
6
6
  "author": "Dup4 <lyuzhi.pan@gmail.com>",
7
7
  "license": "MIT",
@@ -53,8 +53,8 @@
53
53
  "vue-router": "^4.2.4",
54
54
  "vue-search-select": "^3.1.2",
55
55
  "vue-toast-notification": "^3",
56
- "@xcpcio/core": "0.42.1",
57
- "@xcpcio/types": "0.42.1"
56
+ "@xcpcio/core": "0.44.0",
57
+ "@xcpcio/types": "0.44.0"
58
58
  },
59
59
  "devDependencies": {
60
60
  "@antfu/eslint-config": "^0.39.8",
@@ -249,6 +249,7 @@ declare global {
249
249
  const useRefHistory: typeof import('@vueuse/core')['useRefHistory']
250
250
  const useResizeObserver: typeof import('@vueuse/core')['useResizeObserver']
251
251
  const useRoute: typeof import('vue-router')['useRoute']
252
+ const useRouteQueryForBattleOfGiants: typeof import('./composables/query')['useRouteQueryForBattleOfGiants']
252
253
  const useRouter: typeof import('vue-router')['useRouter']
253
254
  const useScreenOrientation: typeof import('@vueuse/core')['useScreenOrientation']
254
255
  const useScreenSafeArea: typeof import('@vueuse/core')['useScreenSafeArea']
@@ -562,6 +563,7 @@ declare module 'vue' {
562
563
  readonly useRefHistory: UnwrapRef<typeof import('@vueuse/core')['useRefHistory']>
563
564
  readonly useResizeObserver: UnwrapRef<typeof import('@vueuse/core')['useResizeObserver']>
564
565
  readonly useRoute: UnwrapRef<typeof import('vue-router')['useRoute']>
566
+ readonly useRouteQueryForBattleOfGiants: UnwrapRef<typeof import('./composables/query')['useRouteQueryForBattleOfGiants']>
565
567
  readonly useRouter: UnwrapRef<typeof import('vue-router')['useRouter']>
566
568
  readonly useScreenOrientation: UnwrapRef<typeof import('@vueuse/core')['useScreenOrientation']>
567
569
  readonly useScreenSafeArea: UnwrapRef<typeof import('@vueuse/core')['useScreenSafeArea']>
@@ -869,6 +871,7 @@ declare module '@vue/runtime-core' {
869
871
  readonly useRefHistory: UnwrapRef<typeof import('@vueuse/core')['useRefHistory']>
870
872
  readonly useResizeObserver: UnwrapRef<typeof import('@vueuse/core')['useResizeObserver']>
871
873
  readonly useRoute: UnwrapRef<typeof import('vue-router')['useRoute']>
874
+ readonly useRouteQueryForBattleOfGiants: UnwrapRef<typeof import('./composables/query')['useRouteQueryForBattleOfGiants']>
872
875
  readonly useRouter: UnwrapRef<typeof import('vue-router')['useRouter']>
873
876
  readonly useScreenOrientation: UnwrapRef<typeof import('@vueuse/core')['useScreenOrientation']>
874
877
  readonly useScreenSafeArea: UnwrapRef<typeof import('@vueuse/core')['useScreenSafeArea']>
@@ -0,0 +1,21 @@
1
+ <script setup lang="ts">
2
+ const { modelValue } = defineModels<{
3
+ modelValue: boolean
4
+ }>();
5
+ </script>
6
+
7
+ <template>
8
+ <label
9
+ relative inline-flex items-center cursor-pointer
10
+ >
11
+ <input
12
+ v-model="modelValue"
13
+ type="checkbox"
14
+ class="sr-only peer"
15
+ >
16
+ <div
17
+ class="w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 rounded-full peer dark:bg-gray-700 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600"
18
+ />
19
+ <slot />
20
+ </label>
21
+ </template>
@@ -1,6 +1,11 @@
1
1
  <script setup lang="ts">
2
+ const props = defineProps<{
3
+ textAlign?: "left" | "center" | "right"
4
+ textType?: "text" | "number"
5
+ }>();
6
+
2
7
  const { modelValue } = defineModels<{
3
- modelValue: string
8
+ modelValue: string | number
4
9
  }>();
5
10
  </script>
6
11
 
@@ -8,11 +13,11 @@ const { modelValue } = defineModels<{
8
13
  <input
9
14
  id="input"
10
15
  v-model="modelValue"
11
- type="text"
12
16
  v-bind="$attrs"
17
+ :type="props.textType ?? 'text'"
18
+ :text="props.textAlign ?? 'center'"
13
19
  p="x-4 y-2"
14
20
  w-full
15
- text="center"
16
21
  bg="transparent"
17
22
  border="~ rounded gray-200 dark:gray-700"
18
23
  outline="none active:none"
@@ -0,0 +1,138 @@
1
+ <script setup lang="ts">
2
+ import { MultiSelect } from "vue-search-select";
3
+ import { type Giants, GiantsType, type Rank, type SelectOptionItem } from "@xcpcio/core";
4
+
5
+ const props = defineProps<{
6
+ rank: Rank,
7
+ orgOptions: SelectOptionItem[],
8
+ teamsOptions: SelectOptionItem[],
9
+ giants: Giants,
10
+ }>();
11
+
12
+ const emit = defineEmits([
13
+ "update:giants",
14
+ ]);
15
+
16
+ const giants = computed({
17
+ get() {
18
+ return props.giants;
19
+ },
20
+ set(value) {
21
+ emit("update:giants", value);
22
+ },
23
+ });
24
+
25
+ const orgSelectedItems = ref<Array<SelectOptionItem>>(giants.value.filterOrganizations);
26
+ function orgOnSelect(selectedItems: Array<SelectOptionItem>, _lastSelectItem: SelectOptionItem) {
27
+ orgSelectedItems.value = selectedItems;
28
+ giants.value.setFilterOrganizations(selectedItems);
29
+ }
30
+
31
+ const teamsSelectedItems = ref<Array<SelectOptionItem>>(giants.value.filterTeams);
32
+ function teamsOnSelect(selectedItems: Array<SelectOptionItem>, _lastSelectItem: SelectOptionItem) {
33
+ teamsSelectedItems.value = selectedItems;
34
+ giants.value.setFilterTeams(selectedItems);
35
+ }
36
+
37
+ const title = computed(() => {
38
+ return `${giants.value.type === GiantsType.BLUE ? "Blue" : "Red"} Team`;
39
+ });
40
+
41
+ const color = computed(() => {
42
+ return giants.value.type === GiantsType.BLUE ? "#0000FF" : "#FF0000";
43
+ });
44
+ </script>
45
+
46
+ <template>
47
+ <div
48
+ ml-4 mt-2
49
+ >
50
+ <div
51
+ flex text-sm
52
+ :style="{
53
+ color,
54
+ }"
55
+ >
56
+ {{ title }}
57
+ </div>
58
+
59
+ <div
60
+ ml-4 mt-2
61
+ grid grid-cols-6 gap-y-4
62
+ >
63
+ <div
64
+ flex items-center
65
+ text-sm
66
+ >
67
+ Name:
68
+ </div>
69
+
70
+ <div
71
+ flex items-center
72
+ w-full
73
+ col-span-5
74
+ >
75
+ <TheInput
76
+ v-model="giants.name"
77
+ text-align="left"
78
+ />
79
+
80
+ <Tooltip>
81
+ <div
82
+ i-material-symbols-refresh
83
+ cursor-pointer btn
84
+ text-3xl
85
+ ml-2
86
+ @click="giants.refreshName()"
87
+ />
88
+
89
+ <template #popper>
90
+ <div>
91
+ Refresh Name
92
+ </div>
93
+ </template>
94
+ </Tooltip>
95
+ </div>
96
+
97
+ <div
98
+ v-if="rank.contest.organization"
99
+ flex items-center
100
+ text-sm
101
+ >
102
+ {{ rank.contest.organization }}:
103
+ </div>
104
+
105
+ <div
106
+ v-if="rank.contest.organization"
107
+ flex items-center
108
+ w-full
109
+ col-span-5
110
+ >
111
+ <MultiSelect
112
+ :options="orgOptions"
113
+ :selected-options="orgSelectedItems"
114
+ @select="orgOnSelect"
115
+ />
116
+ </div>
117
+
118
+ <div
119
+ text-sm
120
+ flex items-center
121
+ >
122
+ Team:
123
+ </div>
124
+
125
+ <div
126
+ flex items-center
127
+ w-full
128
+ col-span-5
129
+ >
130
+ <MultiSelect
131
+ :options="teamsOptions"
132
+ :selected-options="teamsSelectedItems"
133
+ @select="teamsOnSelect"
134
+ />
135
+ </div>
136
+ </div>
137
+ </div>
138
+ </template>
@@ -0,0 +1,79 @@
1
+ <script setup lang="ts">
2
+ import type { BattleOfGiants } from "@xcpcio/core/index";
3
+
4
+ const props = defineProps<{
5
+ battleOfGiants: BattleOfGiants
6
+ }>();
7
+
8
+ const battleOfGiants = computed(() => props.battleOfGiants);
9
+ </script>
10
+
11
+ <template>
12
+ <div>
13
+ <div
14
+ text-8xl font-mono
15
+ flex justify-center items-center
16
+ >
17
+ <div
18
+ flex justify-end items-center
19
+ text-blue-400
20
+ >
21
+ <div>
22
+ {{ battleOfGiants.blueTeam.name }}
23
+ </div>
24
+
25
+ <div
26
+ flex flex-col
27
+ items-center justify-center
28
+ ml-4
29
+ >
30
+ <div
31
+ text-6xl
32
+ >
33
+ {{ battleOfGiants.blueTeam.totalSolvedProblemNum }}
34
+ </div>
35
+
36
+ <div
37
+ text-4xl
38
+ >
39
+ {{ battleOfGiants.blueTeam.totalPenaltyToString }}
40
+ </div>
41
+ </div>
42
+ </div>
43
+
44
+ <div
45
+ flex justify-center items-center
46
+ ml-4 mr-4
47
+ >
48
+ :
49
+ </div>
50
+
51
+ <div
52
+ flex justify-start items-center
53
+ text-red-400
54
+ >
55
+ <div
56
+ flex flex-col
57
+ items-center justify-center
58
+ mr-4
59
+ >
60
+ <div
61
+ text-6xl
62
+ >
63
+ {{ battleOfGiants.redTeam.totalSolvedProblemNum }}
64
+ </div>
65
+
66
+ <div
67
+ text-4xl
68
+ >
69
+ {{ battleOfGiants.redTeam.totalPenaltyToString }}
70
+ </div>
71
+ </div>
72
+
73
+ <div>
74
+ {{ battleOfGiants.redTeam.name }}
75
+ </div>
76
+ </div>
77
+ </div>
78
+ </div>
79
+ </template>
@@ -41,6 +41,16 @@ const enableAutoScroll = ref(false);
41
41
  }
42
42
  })();
43
43
 
44
+ (() => {
45
+ const routeQueryForBattleOfGiants = useRouteQueryForBattleOfGiants();
46
+ if (
47
+ routeQueryForBattleOfGiants.value !== null
48
+ && routeQueryForBattleOfGiants.value !== undefined
49
+ ) {
50
+ rankOptions.value.battleOfGiants.FromBase64(routeQueryForBattleOfGiants.value);
51
+ }
52
+ })();
53
+
44
54
  const currentGroup = ref("all");
45
55
  function onChangeCurrentGroup(nextGroup: string) {
46
56
  if (nextGroup === rankOptions.value.group) {