|
1 | | -import"./lit-html-BUQgm8fs.js";import{B as U,T as C,u as S,J as X,f as o,z as be,V as I,N as z,c as Z,d as ee,C as ue,W as fe,S as ye,a as ge,b as $e,G as we,F as ve,I as he}from"./index-DAd_Xb3m.js";import"./index-CG13lMFw.js";import{c as Te,d as D,a as M,b as V,t as ke,v as xe,e as Se}from"./index-BnaeDa9G.js";import{e as Y}from"./ref-CLKbrLVk.js";const Ie={dueDate:e=>{if(typeof e=="string"&&e.trim()!=="")return new Date(e)},status:e=>{if(Array.isArray(e)&&e.length!==0)return e[0]},type:e=>{if(Array.isArray(e)&&e.length!==0)return e[0]},priority:e=>{if(Array.isArray(e)&&e.length!==0)return e[0]},stage:e=>{if(Array.isArray(e)&&e.length!==0)return e[0]},assignedTo:e=>{if(Array.isArray(e)&&e.length!==0)return e[0]},labels:e=>{if(Array.isArray(e))return new Set(e)}},te=e=>{const{components:l,topic:t,value:i,onCancel:n,onSubmit:s,styles:r}=e,m=s??(()=>{}),d=l.get(U),v=(i==null?void 0:i.title)??(t==null?void 0:t.title)??C.default.title,p=(i==null?void 0:i.status)??(t==null?void 0:t.status)??C.default.status,b=(i==null?void 0:i.type)??(t==null?void 0:t.type)??C.default.type,a=(i==null?void 0:i.priority)??(t==null?void 0:t.priority)??C.default.priority,y=(i==null?void 0:i.assignedTo)??(t==null?void 0:t.assignedTo)??C.default.assignedTo,u=(i==null?void 0:i.labels)??(t==null?void 0:t.labels)??C.default.labels,g=(i==null?void 0:i.stage)??(t==null?void 0:t.stage)??C.default.stage,k=(i==null?void 0:i.description)??(t==null?void 0:t.description)??C.default.description,$=t!=null&&t.dueDate?t.dueDate.toISOString().split("T")[0]:null,f=new Set([...d.config.statuses]);p&&f.add(p);const h=new Set([...d.config.types]);b&&h.add(b);const w=new Set([...d.config.priorities]);a&&w.add(a);const j=new Set([...d.config.users]);y&&j.add(y);const W=new Set([...d.config.labels]);if(u)for(const c of u)W.add(c);const G=new Set([...d.config.stages]);g&&G.add(g);const J=Y(),me=async()=>{const{value:c}=J;if(!c)return;const x=be(c,Ie);if(t)t.set(x),await m(t);else{const B=d.create(x);await m(B)}},H=Y(),de=c=>{const{value:x}=H;if(!x)return;const B=c.target;x.disabled=B.value.trim()===""},Q=`btn-${S.newRandomId()}`,O=`btn-${S.newRandomId()}`;return o` |
| 1 | +import"./lit-html-BUQgm8fs.js";import{B as U,T as C,u as S,J as X,f as o,z as be,V as I,N as z,c as Z,d as ee,C as ue,W as fe,S as ye,a as ge,O as $e,G as we,F as ve,I as he}from"./index-DAd_Xb3m.js";import"./index-CG13lMFw.js";import{c as Te,d as D,a as M,b as V,t as ke,v as xe,e as Se}from"./index-CAHkfBk_.js";import{e as Y}from"./ref-CLKbrLVk.js";const Ie={dueDate:e=>{if(typeof e=="string"&&e.trim()!=="")return new Date(e)},status:e=>{if(Array.isArray(e)&&e.length!==0)return e[0]},type:e=>{if(Array.isArray(e)&&e.length!==0)return e[0]},priority:e=>{if(Array.isArray(e)&&e.length!==0)return e[0]},stage:e=>{if(Array.isArray(e)&&e.length!==0)return e[0]},assignedTo:e=>{if(Array.isArray(e)&&e.length!==0)return e[0]},labels:e=>{if(Array.isArray(e))return new Set(e)}},te=e=>{const{components:l,topic:t,value:i,onCancel:n,onSubmit:s,styles:r}=e,m=s??(()=>{}),d=l.get(U),v=(i==null?void 0:i.title)??(t==null?void 0:t.title)??C.default.title,p=(i==null?void 0:i.status)??(t==null?void 0:t.status)??C.default.status,b=(i==null?void 0:i.type)??(t==null?void 0:t.type)??C.default.type,a=(i==null?void 0:i.priority)??(t==null?void 0:t.priority)??C.default.priority,y=(i==null?void 0:i.assignedTo)??(t==null?void 0:t.assignedTo)??C.default.assignedTo,u=(i==null?void 0:i.labels)??(t==null?void 0:t.labels)??C.default.labels,g=(i==null?void 0:i.stage)??(t==null?void 0:t.stage)??C.default.stage,k=(i==null?void 0:i.description)??(t==null?void 0:t.description)??C.default.description,$=t!=null&&t.dueDate?t.dueDate.toISOString().split("T")[0]:null,f=new Set([...d.config.statuses]);p&&f.add(p);const h=new Set([...d.config.types]);b&&h.add(b);const w=new Set([...d.config.priorities]);a&&w.add(a);const j=new Set([...d.config.users]);y&&j.add(y);const W=new Set([...d.config.labels]);if(u)for(const c of u)W.add(c);const G=new Set([...d.config.stages]);g&&G.add(g);const J=Y(),me=async()=>{const{value:c}=J;if(!c)return;const x=be(c,Ie);if(t)t.set(x),await m(t);else{const B=d.create(x);await m(B)}},H=Y(),de=c=>{const{value:x}=H;if(!x)return;const B=c.target;x.disabled=B.value.trim()===""},Q=`btn-${S.newRandomId()}`,E=`btn-${S.newRandomId()}`;return o` |
2 | 2 | <div ${X(J)} style="display: flex; flex-direction: column; gap: 0.75rem;"> |
3 | 3 | <div style="display: flex; gap: 0.375rem"> |
4 | 4 | <bim-text-input @input=${de} vertical label="Title" name="title" .value=${v}></bim-text-input> |
@@ -32,19 +32,19 @@ import"./lit-html-BUQgm8fs.js";import{B as U,T as C,u as S,J as X,f as o,z as be |
32 | 32 | <bim-text-input vertical label="Description" name="description" type="area" .value=${k??null}></bim-text-input> |
33 | 33 | <div style="justify-content: right; display: flex; gap: 0.375rem"> |
34 | 34 | <style> |
35 | | - #${O} { |
| 35 | + #${E} { |
36 | 36 | background-color: transparent; |
37 | 37 | } |
38 | 38 |
|
39 | | - #${O}:hover { |
| 39 | + #${E}:hover { |
40 | 40 | --bim-label--c: #FF5252; |
41 | 41 | } |
42 | 42 |
|
43 | 43 | #${Q}:hover { |
44 | 44 | background-color: #329936; |
45 | 45 | } |
46 | 46 | </style> |
47 | | - <bim-button id=${O} style="flex: 0" @click=${n} label="Cancel"></bim-button> |
| 47 | + <bim-button id=${E} style="flex: 0" @click=${n} label="Cancel"></bim-button> |
48 | 48 | <bim-button id=${Q} style="flex: 0" @click=${me} ${X(H)} label=${t?"Update Topic":"Add Topic"} icon=${t?"tabler:refresh":"mi:add"}></bim-button> |
49 | 49 | </div> |
50 | 50 | </div> |
@@ -228,7 +228,7 @@ import"./lit-html-BUQgm8fs.js";import{B as U,T as C,u as S,J as X,f as o,z as be |
228 | 228 | <bim-panel-section fixed label="New Topic" name="topic"> |
229 | 229 | ${te(e)} |
230 | 230 | </bim-panel-section> |
231 | | - `,Fe=e=>I.create(Pe,e),Ee=Object.freeze(Object.defineProperty({__proto__: null,topic: Fe},Symbol.toStringTag,{value: "Module"})),Oe={... Ee};S.init();const q=document.createElement("bim-viewport"),T=new ue,ze=T.get(fe),A=ze.create(),se=new ye(T);se.setup();A.scene=se;const ae=new ge(T,q);A.renderer=ae;const K=new $e(T);A.camera=K;K.controls.setLookAt(10,5.5,5,-4,-1,-6.5);q.addEventListener("resize",()=>{ae.resize(),K.updateAspect()});T.init();const Me=T.get(we);Me.create(A);const P=T.get(ve);P.init("https://thatopen.github.io/engine_fragment/resources/worker.mjs");A.camera.controls.addEventListener("rest",()=>P.core.update(!0));P.list.onItemSet.add(async({value: e})=>{e.useCamera(A.camera.three),A.scene.three.add(e.object),await P.core.update(!0)});const re=T.get(he);await re.setup({autoSetWasm: !1,wasm: {path: "https://unpkg.com/[email protected]/",absolute: !0}});const Ve=await fetch("https://thatopen.github.io/engine_ui-components/resources/small.ifc"),Ue=await Ve.arrayBuffer(),qe=new Uint8Array(Ue);await re.load(qe,!0,"small");const E={"[email protected]": {name: "Jhon Doe",picture: "https://www.profilebakery.com/wp-content/uploads/2023/04/Profile-Image-AI.jpg"},"[email protected]": {name: "User A",picture: "https://www.profilebakery.com/wp-content/uploads/2023/04/Portrait-Photography.jpg"},"[email protected]": {name: "User B",picture: "https://www.profilebakery.com/wp-content/uploads/2023/04/AI-Portrait.jpg"}},_=T.get(U);_.setup({users: new Set(Object.keys(E)),labels: new Set(["Architecture","Structure","MEP"])});const Ke=T.get(ee);_.list.onItemSet.add(({value: e})=>{const l=Ke.create();l.world=A,e.viewpoints.add(l.guid)});const[L]=Se.topicsList({components: T,dataStyles: {users: E}});L.selectableRows=!0;const[Ne,We]=Oe.topic({components: T,styles: {users: E}}),F=I.create(()=>o` |
| 231 | + `,Fe=e=>I.create(Pe,e),Oe=Object.freeze(Object.defineProperty({__proto__: null,topic: Fe},Symbol.toStringTag,{value: "Module"})),Ee={... Oe};S.init();const q=document.createElement("bim-viewport"),T=new ue,ze=T.get(fe),A=ze.create(),se=new ye(T);se.setup();A.scene=se;const ae=new ge(T,q);A.renderer=ae;const K=new $e(T);A.camera=K;K.controls.setLookAt(10,5.5,5,-4,-1,-6.5);q.addEventListener("resize",()=>{ae.resize(),K.updateAspect()});T.init();const Me=T.get(we);Me.create(A);const P=T.get(ve);P.init("https://thatopen.github.io/engine_fragment/resources/worker.mjs");A.camera.controls.addEventListener("rest",()=>P.core.update(!0));P.list.onItemSet.add(async({value: e})=>{e.useCamera(A.camera.three),A.scene.three.add(e.object),await P.core.update(!0)});const re=T.get(he);await re.setup({autoSetWasm: !1,wasm: {path: "https://unpkg.com/[email protected]/",absolute: !0}});const Ve=await fetch("https://thatopen.github.io/engine_ui-components/resources/small.ifc"),Ue=await Ve.arrayBuffer(),qe=new Uint8Array(Ue);await re.load(qe,!0,"small");const O={"[email protected]": {name: "Jhon Doe",picture: "https://www.profilebakery.com/wp-content/uploads/2023/04/Profile-Image-AI.jpg"},"[email protected]": {name: "User A",picture: "https://www.profilebakery.com/wp-content/uploads/2023/04/Portrait-Photography.jpg"},"[email protected]": {name: "User B",picture: "https://www.profilebakery.com/wp-content/uploads/2023/04/AI-Portrait.jpg"}},_=T.get(U);_.setup({users: new Set(Object.keys(O)),labels: new Set(["Architecture","Structure","MEP"])});const Ke=T.get(ee);_.list.onItemSet.add(({value: e})=>{const l=Ke.create();l.world=A,e.viewpoints.add(l.guid)});const[L]=Se.topicsList({components: T,dataStyles: {users: O}});L.selectableRows=!0;const[Ne,We]=Ee.topic({components: T,styles: {users: O}}),F=I.create(()=>o` |
232 | 232 | <dialog class="form-dialog"> |
233 | 233 | <bim-panel style="border-radius: var(--bim-ui_size-base); width: 22rem;"> |
234 | 234 | ${Ne} |
@@ -266,7 +266,7 @@ import"./lit-html-BUQgm8fs.js";import{B as U,T as C,u as S,J as X,f as o,z as be |
266 | 266 | ${m} |
267 | 267 | ${r} |
268 | 268 | </bim-panel> |
269 | | - `},{components:T,world:A,styles:{users:E}});_.list.onItemUpdated.add(()=>ce());L.addEventListener("rowcreated",e=>{const{row:l}=e.detail;l.addEventListener("click",()=>{const{Guid:t}=l.data;if(!t)return;const i=_.list.get(t);i&&ce({topic:i})}),l.style.cursor="pointer",l.addEventListener("mouseover",()=>{l.style.backgroundColor=`color-mix( |
| 269 | + `},{components:T,world:A,styles:{users:O}});_.list.onItemUpdated.add(()=>ce());L.addEventListener("rowcreated",e=>{const{row:l}=e.detail;l.addEventListener("click",()=>{const{Guid:t}=l.data;if(!t)return;const i=_.list.get(t);i&&ce({topic:i})}),l.style.cursor="pointer",l.addEventListener("mouseover",()=>{l.style.backgroundColor=`color-mix( |
270 | 270 | in lab, |
271 | 271 | var(--bim-ui_bg-contrast-20) 30%, |
272 | 272 | var(--bim-ui_main-base) 10% |
|
0 commit comments