From 4abe8a774a2d6abe409f7b155384297fd03e893f Mon Sep 17 00:00:00 2001 From: ysh Date: Thu, 19 Sep 2024 07:53:08 +0900 Subject: [PATCH 1/3] update file --- script/Dockerfile | 2 +- src/main/resources/application.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/script/Dockerfile b/script/Dockerfile index 38e1c68..2378d1c 100644 --- a/script/Dockerfile +++ b/script/Dockerfile @@ -1,4 +1,4 @@ FROM docker.io/library/openjdk:17-jdk-slim ENV TZ=Asia/Seoul -COPY ./build/libs/mc-workflow-manager-0.2.1.jar /mc-workflow-manager-0.2.1.jar +COPY build/libs/mc-workflow-manager-0.2.1.jar /mc-workflow-manager-0.2.1.jar ENTRYPOINT ["java", "-jar", "/mc-workflow-manager-0.2.1.jar"] diff --git a/src/main/resources/application.yaml b/src/main/resources/application.yaml index 124fba9..4cbc485 100644 --- a/src/main/resources/application.yaml +++ b/src/main/resources/application.yaml @@ -13,7 +13,7 @@ spring: url: jdbc:h2:file:./document/workflow # 프로젝트 루트/db/ 안에 h2.db파일(test.mv.db) 생성 driver-class-name: org.h2.Driver username: ${DB_ID:workflow} - password: ${DB_PW:tjxjfkxh!23} + password: ${DB_PW:workflow!23} h2: console: enabled: true # http://localhost:18083/h2-console/으로 접속가능 From 576e47f9026e2d4cdd55e38204d3cfcc44d6fe0c Mon Sep 17 00:00:00 2001 From: ysh Date: Thu, 19 Sep 2024 11:28:09 +0900 Subject: [PATCH 2/3] OSS management UI debugging --- workflowFE/src/views/oss/components/ossForm.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/workflowFE/src/views/oss/components/ossForm.vue b/workflowFE/src/views/oss/components/ossForm.vue index 981b574..41259a4 100644 --- a/workflowFE/src/views/oss/components/ossForm.vue +++ b/workflowFE/src/views/oss/components/ossForm.vue @@ -120,6 +120,7 @@ watch(() => props.mode, async () => { }) onMounted(async () => { + await _getOssTypeList('init') await setInit(); }) @@ -174,7 +175,7 @@ const setInit = async () => { const ossTypeList = ref([] as Array) const _getOssTypeList = async (mode:String) => { try { - if (mode === 'new') { + if (mode === 'new' || mode === 'init') { const { data } = await getOssTypeFilteredList() ossTypeList.value = data } From 2667c5a8b78bb2fdbdb7974b8efefec3aefbd1aa Mon Sep 17 00:00:00 2001 From: ysh Date: Thu, 19 Sep 2024 11:28:42 +0900 Subject: [PATCH 3/3] UI build file update --- ...ICWN8i5.js => EventListenerList-DsuTxzkw.js} | 2 +- .../resources/static/assets/OssList-Bihra8rt.js | 17 +++++++++++++++++ .../resources/static/assets/OssList-DmGZYf1p.js | 17 ----------------- ...amForm-GfNtapPc.js => ParamForm-B0X0LuP1.js} | 2 +- ...vue_vue_type_style_index_0_lang-C7rKatiE.js} | 2 +- ...orm-pY442Q74.js => WorkflowForm-D9_x4AT4.js} | 2 +- ...ist-CGtSpEBv.js => WorkflowList-DDPYhQ5l.js} | 2 +- ...2qcn6Su.js => WorkflowStageList-CRZNBYbq.js} | 2 +- .../{index-7DKFovtK.js => index-BVWm2Zu7.js} | 4 ++-- .../assets/{oss-Duyjg-W4.js => oss-jllykI1q.js} | 2 +- ...{request-DpggpHyD.js => request-a_yWYQ73.js} | 2 +- src/main/resources/static/index.html | 2 +- 12 files changed, 28 insertions(+), 28 deletions(-) rename src/main/resources/static/assets/{EventListenerList-2ICWN8i5.js => EventListenerList-DsuTxzkw.js} (98%) create mode 100644 src/main/resources/static/assets/OssList-Bihra8rt.js delete mode 100644 src/main/resources/static/assets/OssList-DmGZYf1p.js rename src/main/resources/static/assets/{ParamForm-GfNtapPc.js => ParamForm-B0X0LuP1.js} (95%) rename src/main/resources/static/assets/{Tabulator.vue_vue_type_style_index_0_lang-DQj6hD_W.js => Tabulator.vue_vue_type_style_index_0_lang-C7rKatiE.js} (99%) rename src/main/resources/static/assets/{WorkflowForm-pY442Q74.js => WorkflowForm-D9_x4AT4.js} (99%) rename src/main/resources/static/assets/{WorkflowList-CGtSpEBv.js => WorkflowList-DDPYhQ5l.js} (95%) rename src/main/resources/static/assets/{WorkflowStageList-D2qcn6Su.js => WorkflowStageList-CRZNBYbq.js} (98%) rename src/main/resources/static/assets/{index-7DKFovtK.js => index-BVWm2Zu7.js} (99%) rename src/main/resources/static/assets/{oss-Duyjg-W4.js => oss-jllykI1q.js} (89%) rename src/main/resources/static/assets/{request-DpggpHyD.js => request-a_yWYQ73.js} (87%) diff --git a/src/main/resources/static/assets/EventListenerList-2ICWN8i5.js b/src/main/resources/static/assets/EventListenerList-DsuTxzkw.js similarity index 98% rename from src/main/resources/static/assets/EventListenerList-2ICWN8i5.js rename to src/main/resources/static/assets/EventListenerList-DsuTxzkw.js index 430967f..0d0740a 100644 --- a/src/main/resources/static/assets/EventListenerList-2ICWN8i5.js +++ b/src/main/resources/static/assets/EventListenerList-DsuTxzkw.js @@ -1,4 +1,4 @@ -import{_ as C,a as D}from"./Tabulator.vue_vue_type_style_index_0_lang-DQj6hD_W.js";import{s as L}from"./request-DpggpHyD.js";import{d as k,u as $,c as U,w as I,o as N,r as m,a as f,b as e,t as x,e as y,g as E,h as g,i as h}from"./index-7DKFovtK.js";const F=()=>L.get("/eventlistener/list");function B(n){return L.get("/eventlistener/"+n)}function R(n){return L.get(`/eventlistener/duplicate?eventlistenerName=${n.eventListenerName}&eventListenerUrl=${n.eventListenerUrl}`)}function V(n){return L.post("/eventlistener",n)}function q(n){return L.patch(`/eventlistener/${n.eventListenerIdx}`,n)}function M(n){return L.delete(`/eventlistener/${n}`)}const A={class:"modal",id:"eventListenerForm",tabindex:"-1"},G={class:"modal-dialog modal-lg",role:"document"},S={class:"modal-content"},T=e("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"},null,-1),j={class:"modal-body text-left py-4"},z={class:"mb-5"},H={class:"row mb-3"},J=e("label",{class:"form-label required"},"Event Listener 명",-1),K={class:"grid gap-0 column-gap-3"},O={key:1,class:"btn btn-success",style:{margin:"3px"}},P={class:"mb-3"},Q=e("label",{class:"form-label required"},"Event Listener 설명",-1),W={class:"mb-3"},X=e("label",{class:"form-label required"},"URL",-1),Y={class:"modal-footer"},Z=k({__name:"eventListenerForm",props:{mode:{},eventListenerIdx:{}},emits:["get-event-listener-list"],setup(n,{emit:b}){const a=$(),i=n,r=b,d=U(()=>i.eventListenerIdx);I(d,async()=>{await o()}),N(async()=>{await o()});const t=m({}),o=async()=>{if(i.mode==="new")t.value.eventListenerName="",t.value.eventListenerDesc="",t.value.eventListenerUrl="",t.value.workflowIdx=0,v.value=!1;else{const{data:l}=await B(i.eventListenerIdx);t.value=l,v.value=!0}},v=m(!1),_=async()=>{const l={eventListenerName:t.value.eventListenerName,eventListenerUrl:t.value.eventListenerUrl},{data:s}=await R(l);s?a.error("이미 사용중인 이름입니다."):(a.success("사용 가능한 이름입니다."),v.value=!0)},w=async()=>{i.mode==="new"?await c().then(()=>{r("get-event-listener-list")}):await p().then(()=>{r("get-event-listener-list")}),o()},c=async()=>{const{data:l}=await V(t.value);l?a.success("등록되었습니다."):a.error("등록 할 수 없습니다.")},p=async()=>{const{data:l}=await q(t.value);l?a.success("등록되었습니다."):a.error("등록 할 수 없습니다.")};return(l,s)=>(g(),f("div",A,[e("div",G,[e("div",S,[T,e("div",j,[e("h3",z," Event Listener "+x(i.mode==="new"?"생성":"수정"),1),e("div",null,[e("div",H,[J,e("div",K,[y(e("input",{type:"text",class:"form-control p-2 g-col-11",placeholder:"Event Listener 명을 입력하세요","onUpdate:modelValue":s[0]||(s[0]=u=>t.value.eventListenerName=u)},null,512),[[E,t.value.eventListenerName]]),v.value?(g(),f("button",O,"중복 체크")):(g(),f("button",{key:0,class:"btn btn-primary chk",onClick:_,style:{margin:"3px"}},"중복 체크"))])]),e("div",P,[Q,y(e("input",{type:"text",class:"form-control p-2 g-col-11",placeholder:"Event Listener 설명을 입력하세요","onUpdate:modelValue":s[1]||(s[1]=u=>t.value.eventListenerDesc=u)},null,512),[[E,t.value.eventListenerDesc]])]),e("div",W,[X,y(e("input",{type:"text",class:"form-control p-2 g-col-11",placeholder:"서버 URL을 입력하세요","onUpdate:modelValue":s[2]||(s[2]=u=>t.value.eventListenerUrl=u)},null,512),[[E,t.value.eventListenerUrl]])])])]),e("div",Y,[e("a",{href:"#",class:"btn btn-link link-secondary","data-bs-dismiss":"modal",onClick:s[3]||(s[3]=u=>o())}," Cancel "),e("a",{href:"#",class:"btn btn-primary ms-auto","data-bs-dismiss":"modal",onClick:s[4]||(s[4]=u=>w())},x(i.mode==="new"?"생성":"수정"),1)])])])]))}}),ee={class:"modal",id:"deleteEventListener",tabindex:"-1"},te={class:"modal-dialog modal-lg",role:"document"},ne={class:"modal-content"},se=e("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"},null,-1),ae=e("div",{class:"modal-status bg-danger"},null,-1),ie={class:"modal-body text-left py-4"},le=e("h3",{class:"mb-5"}," Event Listener 삭제 ",-1),oe={class:"modal-footer"},re=e("a",{href:"#",class:"btn btn-link link-secondary","data-bs-dismiss":"modal"}," Cancel ",-1),de=k({__name:"deleteEventListener",props:{eventListenerName:{},eventListenerIdx:{}},emits:["get-event-listener-list"],setup(n,{emit:b}){const a=$(),i=n,r=b,d=async()=>{const{data:t}=await M(i.eventListenerIdx);t?a.success("삭제되었습니다."):a.error("삭제하지 못했습니다."),r("get-event-listener-list")};return(t,o)=>(g(),f("div",ee,[e("div",te,[e("div",ne,[se,ae,e("div",ie,[le,e("h4",null,x(i.eventListenerName)+"을(를) 정말 삭제하시겠습니까?",1)]),e("div",oe,[re,e("a",{href:"#",class:"btn btn-primary ms-auto","data-bs-dismiss":"modal",onClick:o[0]||(o[0]=v=>d())}," 삭제 ")])])])]))}}),ce={class:"card card-flush w-100"},Le=k({__name:"EventListenerList",setup(n){const b=$(),a=m([]),i=m([]);N(async()=>{o(),await r()});const r=async()=>{try{const{data:c}=await F();a.value=c}catch(c){console.log(c),b.error("데이터를 가져올 수 없습니다.")}},d=m(0),t=m(""),o=()=>{i.value=[{title:"Event Listener Name",field:"eventListenerName",width:400},{title:"Event Listener Desc",field:"eventListenerDesc",width:500},{title:"URL",field:"eventListenerUrl",width:600},{title:"Action",width:400,formatter:v,cellClick:function(c,p){const l=c.target,s=l==null?void 0:l.getAttribute("id");d.value=p.getRow().getData().eventListenerIdx,s==="edit-btn"?_.value="edit":t.value=p.getRow().getData().eventListenerName}}]},v=()=>` +import{_ as C,a as D}from"./Tabulator.vue_vue_type_style_index_0_lang-C7rKatiE.js";import{s as L}from"./request-a_yWYQ73.js";import{d as k,u as $,c as U,w as I,o as N,r as m,a as f,b as e,t as x,e as y,g as E,h as g,i as h}from"./index-BVWm2Zu7.js";const F=()=>L.get("/eventlistener/list");function B(n){return L.get("/eventlistener/"+n)}function R(n){return L.get(`/eventlistener/duplicate?eventlistenerName=${n.eventListenerName}&eventListenerUrl=${n.eventListenerUrl}`)}function V(n){return L.post("/eventlistener",n)}function q(n){return L.patch(`/eventlistener/${n.eventListenerIdx}`,n)}function M(n){return L.delete(`/eventlistener/${n}`)}const A={class:"modal",id:"eventListenerForm",tabindex:"-1"},G={class:"modal-dialog modal-lg",role:"document"},S={class:"modal-content"},T=e("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"},null,-1),j={class:"modal-body text-left py-4"},z={class:"mb-5"},H={class:"row mb-3"},J=e("label",{class:"form-label required"},"Event Listener 명",-1),K={class:"grid gap-0 column-gap-3"},O={key:1,class:"btn btn-success",style:{margin:"3px"}},P={class:"mb-3"},Q=e("label",{class:"form-label required"},"Event Listener 설명",-1),W={class:"mb-3"},X=e("label",{class:"form-label required"},"URL",-1),Y={class:"modal-footer"},Z=k({__name:"eventListenerForm",props:{mode:{},eventListenerIdx:{}},emits:["get-event-listener-list"],setup(n,{emit:b}){const a=$(),i=n,r=b,d=U(()=>i.eventListenerIdx);I(d,async()=>{await o()}),N(async()=>{await o()});const t=m({}),o=async()=>{if(i.mode==="new")t.value.eventListenerName="",t.value.eventListenerDesc="",t.value.eventListenerUrl="",t.value.workflowIdx=0,v.value=!1;else{const{data:l}=await B(i.eventListenerIdx);t.value=l,v.value=!0}},v=m(!1),_=async()=>{const l={eventListenerName:t.value.eventListenerName,eventListenerUrl:t.value.eventListenerUrl},{data:s}=await R(l);s?a.error("이미 사용중인 이름입니다."):(a.success("사용 가능한 이름입니다."),v.value=!0)},w=async()=>{i.mode==="new"?await c().then(()=>{r("get-event-listener-list")}):await p().then(()=>{r("get-event-listener-list")}),o()},c=async()=>{const{data:l}=await V(t.value);l?a.success("등록되었습니다."):a.error("등록 할 수 없습니다.")},p=async()=>{const{data:l}=await q(t.value);l?a.success("등록되었습니다."):a.error("등록 할 수 없습니다.")};return(l,s)=>(g(),f("div",A,[e("div",G,[e("div",S,[T,e("div",j,[e("h3",z," Event Listener "+x(i.mode==="new"?"생성":"수정"),1),e("div",null,[e("div",H,[J,e("div",K,[y(e("input",{type:"text",class:"form-control p-2 g-col-11",placeholder:"Event Listener 명을 입력하세요","onUpdate:modelValue":s[0]||(s[0]=u=>t.value.eventListenerName=u)},null,512),[[E,t.value.eventListenerName]]),v.value?(g(),f("button",O,"중복 체크")):(g(),f("button",{key:0,class:"btn btn-primary chk",onClick:_,style:{margin:"3px"}},"중복 체크"))])]),e("div",P,[Q,y(e("input",{type:"text",class:"form-control p-2 g-col-11",placeholder:"Event Listener 설명을 입력하세요","onUpdate:modelValue":s[1]||(s[1]=u=>t.value.eventListenerDesc=u)},null,512),[[E,t.value.eventListenerDesc]])]),e("div",W,[X,y(e("input",{type:"text",class:"form-control p-2 g-col-11",placeholder:"서버 URL을 입력하세요","onUpdate:modelValue":s[2]||(s[2]=u=>t.value.eventListenerUrl=u)},null,512),[[E,t.value.eventListenerUrl]])])])]),e("div",Y,[e("a",{href:"#",class:"btn btn-link link-secondary","data-bs-dismiss":"modal",onClick:s[3]||(s[3]=u=>o())}," Cancel "),e("a",{href:"#",class:"btn btn-primary ms-auto","data-bs-dismiss":"modal",onClick:s[4]||(s[4]=u=>w())},x(i.mode==="new"?"생성":"수정"),1)])])])]))}}),ee={class:"modal",id:"deleteEventListener",tabindex:"-1"},te={class:"modal-dialog modal-lg",role:"document"},ne={class:"modal-content"},se=e("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"},null,-1),ae=e("div",{class:"modal-status bg-danger"},null,-1),ie={class:"modal-body text-left py-4"},le=e("h3",{class:"mb-5"}," Event Listener 삭제 ",-1),oe={class:"modal-footer"},re=e("a",{href:"#",class:"btn btn-link link-secondary","data-bs-dismiss":"modal"}," Cancel ",-1),de=k({__name:"deleteEventListener",props:{eventListenerName:{},eventListenerIdx:{}},emits:["get-event-listener-list"],setup(n,{emit:b}){const a=$(),i=n,r=b,d=async()=>{const{data:t}=await M(i.eventListenerIdx);t?a.success("삭제되었습니다."):a.error("삭제하지 못했습니다."),r("get-event-listener-list")};return(t,o)=>(g(),f("div",ee,[e("div",te,[e("div",ne,[se,ae,e("div",ie,[le,e("h4",null,x(i.eventListenerName)+"을(를) 정말 삭제하시겠습니까?",1)]),e("div",oe,[re,e("a",{href:"#",class:"btn btn-primary ms-auto","data-bs-dismiss":"modal",onClick:o[0]||(o[0]=v=>d())}," 삭제 ")])])])]))}}),ce={class:"card card-flush w-100"},Le=k({__name:"EventListenerList",setup(n){const b=$(),a=m([]),i=m([]);N(async()=>{o(),await r()});const r=async()=>{try{const{data:c}=await F();a.value=c}catch(c){console.log(c),b.error("데이터를 가져올 수 없습니다.")}},d=m(0),t=m(""),o=()=>{i.value=[{title:"Event Listener Name",field:"eventListenerName",width:400},{title:"Event Listener Desc",field:"eventListenerDesc",width:500},{title:"URL",field:"eventListenerUrl",width:600},{title:"Action",width:400,formatter:v,cellClick:function(c,p){const l=c.target,s=l==null?void 0:l.getAttribute("id");d.value=p.getRow().getData().eventListenerIdx,s==="edit-btn"?_.value="edit":t.value=p.getRow().getData().eventListenerName}}]},v=()=>`
+ +
`,b=m("new"),k=()=>{v.value=0,b.value="new"};return(c,g)=>(u(),r("div",Vs,[O(q,{"header-title":"OSS","new-btn-title":"New OSS","popup-flag":!0,"popup-target":"#ossForm",onClickNewBtn:k}),O(B,{columns:n.value,"table-data":l.value},null,8,["columns","table-data"]),O(Cs,{mode:b.value,"oss-idx":v.value,onGetOssList:p},null,8,["mode","oss-idx"]),O(Es,{"oss-name":e.value,"oss-idx":v.value,onGetOssList:p},null,8,["oss-name","oss-idx"])]))}});export{Ms as default}; diff --git a/src/main/resources/static/assets/OssList-DmGZYf1p.js b/src/main/resources/static/assets/OssList-DmGZYf1p.js deleted file mode 100644 index 83eefcc..0000000 --- a/src/main/resources/static/assets/OssList-DmGZYf1p.js +++ /dev/null @@ -1,17 +0,0 @@ -import{_ as B,a as q}from"./Tabulator.vue_vue_type_style_index_0_lang-DQj6hD_W.js";import{g as R,d as A,o as M,r as G,u as W,a as j,b as z,c as H,e as J}from"./oss-Duyjg-W4.js";import{d as D,u as U,c as K,w as I,o as T,r as m,a as r,b as s,t as S,e as b,v as Q,F as X,f as Y,g as w,h as u,i as O}from"./index-7DKFovtK.js";import"./request-DpggpHyD.js";const Z={class:"modal",id:"ossForm",tabindex:"-1"},ss={class:"modal-dialog modal-xl",role:"document"},es={class:"modal-content"},ts=s("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"},null,-1),os={class:"modal-body text-left py-4"},as={class:"mb-5"},ls={class:"mb-3"},ns=s("label",{class:"form-label required"},"OSS Type",-1),cs={class:"grid gap-0 column-gap-3"},is=s("option",{value:0},"Select OSS Type",-1),ds=["value"],rs={class:"row mb-3"},us=s("label",{class:"form-label required"},"OSS Name",-1),ms={class:"grid gap-0 column-gap-3"},ps={class:"mb-3"},vs=s("label",{class:"form-label required"},"OSS Description",-1),_s={class:"mb-3"},bs=s("label",{class:"form-label required"},"URL",-1),hs={class:"row"},fs={class:"col"},gs=s("label",{class:"form-label required"},"OSS ID",-1),ws={class:"col"},ys=s("label",{class:"form-label required"},"OSS PW",-1),Os={class:"col mt-4 row"},Ss={key:1,class:"btn btn-success col",style:{"margin-right":"3px"}},ks={key:3,class:"btn btn-success col"},xs={class:"modal-footer"},Cs=D({__name:"ossForm",props:{mode:{},ossIdx:{}},emits:["get-oss-list"],setup(y,{emit:h}){const l=U(),n=y,p=h,v=K(()=>n.ossIdx);I(v,async()=>{await d()}),I(()=>n.mode,async()=>{await f(n.mode)}),T(async()=>{await d()});const e=m({}),d=async()=>{if(n.mode==="new")e.value.ossTypeIdx=0,e.value.ossName="",e.value.ossDesc="",e.value.ossUrl="",e.value.ossUsername="",e.value.ossPassword="",c.value=!1,i.value=!1;else{const{data:o}=await R(n.ossIdx);e.value=o,e.value.ossPassword=E(e.value.ossPassword),c.value=!0,i.value=!0}},_=m([]),f=async o=>{try{if(o==="new"){const{data:t}=await j();_.value=t}else{const{data:t}=await z();_.value=t}}catch(t){console.log(t)}},k=()=>{e.value.ossPassword="",i.value=!1},c=m(!1),g=async()=>{const o={ossName:e.value.ossName,ossUrl:e.value.ossUrl,ossUsername:e.value.ossUsername},{data:t}=await A(o);t?l.error("이미 사용중인 이름입니다."):(l.success("사용 가능한 이름입니다."),c.value=!0)},i=m(!1),x=async()=>{const o={ossUrl:e.value.ossUrl,ossUsername:e.value.ossUsername,ossPassword:N(e.value.ossPassword),ossTypeIdx:e.value.ossTypeIdx},{data:t}=await M(o);t?(l.success("사용 가능한 OSS입니다."),i.value=!0):l.error("사용 불가능한 OSS입니다.")},$=()=>{c.value=!1},C=()=>{i.value=!1},L=async()=>{e.value.ossPassword=N(e.value.ossPassword),n.mode==="new"?await P().then(()=>{p("get-oss-list")}):await F().then(()=>{p("get-oss-list")}),d()},P=async()=>{const{data:o}=await G(e.value);o?l.success("등록되었습니다."):l.error("등록 할 수 없습니다.")},F=async()=>{const{data:o}=await W(e.value);o?l.success("등록되었습니다."):l.error("등록 할 수 없습니다.")},N=o=>btoa(o),E=o=>atob(o);return(o,t)=>(u(),r("div",Z,[s("div",ss,[s("div",es,[ts,s("div",os,[s("h3",as,S(n.mode==="new"?"New":"Edit")+" OSS ",1),s("div",null,[s("div",ls,[ns,s("div",cs,[b(s("select",{"onUpdate:modelValue":t[0]||(t[0]=a=>e.value.ossTypeIdx=a),class:"form-select p-2 g-col-12"},[is,(u(!0),r(X,null,Y(_.value,(a,V)=>(u(),r("option",{value:a.ossTypeIdx,key:V},S(a.ossTypeName),9,ds))),128))],512),[[Q,e.value.ossTypeIdx]])])]),s("div",rs,[us,s("div",ms,[b(s("input",{type:"text",class:"form-control p-2 g-col-11",placeholder:"Enter the OSS Name","onUpdate:modelValue":t[1]||(t[1]=a=>e.value.ossName=a),onChange:$},null,544),[[w,e.value.ossName]])])]),s("div",ps,[vs,b(s("input",{type:"text",class:"form-control p-2 g-col-11",placeholder:"Enter the OSS Description","onUpdate:modelValue":t[2]||(t[2]=a=>e.value.ossDesc=a)},null,512),[[w,e.value.ossDesc]])]),s("div",_s,[bs,b(s("input",{type:"text",class:"form-control p-2 g-col-7",placeholder:"Enter the Server URL","onUpdate:modelValue":t[3]||(t[3]=a=>e.value.ossUrl=a),onFocus:C},null,544),[[w,e.value.ossUrl]])]),s("div",hs,[s("div",fs,[gs,b(s("input",{type:"text",class:"form-control p-2 g-col-7",placeholder:"Enter the OSS ID","onUpdate:modelValue":t[4]||(t[4]=a=>e.value.ossUsername=a),onFocus:C},null,544),[[w,e.value.ossUsername]])]),s("div",ws,[ys,b(s("input",{type:"password",class:"form-control p-2 g-col-11",placeholder:"Enter the OSS Password","onUpdate:modelValue":t[5]||(t[5]=a=>e.value.ossPassword=a),onClick:k,onFocus:C},null,544),[[w,e.value.ossPassword]])]),s("div",Os,[c.value?(u(),r("button",Ss,"Duplicate Check")):(u(),r("button",{key:0,class:"btn btn-primary col",onClick:g,style:{"margin-right":"3px"}},"Duplicate Check")),i.value?(u(),r("button",ks,"Connection Check")):(u(),r("button",{key:2,class:"btn btn-primary col",onClick:x},"Connection Check"))])])])]),s("div",xs,[s("a",{href:"#",class:"btn btn-link link-secondary","data-bs-dismiss":"modal",onClick:t[6]||(t[6]=a=>d())}," Cancel "),s("a",{href:"#",class:"btn btn-primary ms-auto","data-bs-dismiss":"modal",onClick:t[7]||(t[7]=a=>L())},S(n.mode==="new"?"Regist":"Edit"),1)])])])]))}}),Ds={class:"modal",id:"deleteOss",tabindex:"-1"},Us={class:"modal-dialog modal-lg",role:"document"},Ns={class:"modal-content"},Is=s("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"},null,-1),Ts=s("div",{class:"modal-status bg-danger"},null,-1),$s={class:"modal-body text-left py-4"},Ls=s("h3",{class:"mb-5"}," Delete OSS ",-1),Ps={class:"modal-footer"},Fs=s("a",{href:"#",class:"btn btn-link link-secondary","data-bs-dismiss":"modal"}," Cancel ",-1),Es=D({__name:"deleteOss",props:{ossName:{},ossIdx:{}},emits:["get-oss-list"],setup(y,{emit:h}){const l=U(),n=y,p=h,v=async()=>{const{data:e}=await H(n.ossIdx);e?l.success("삭제되었습니다."):l.error("삭제하지 못했습니다."),p("get-oss-list")};return(e,d)=>(u(),r("div",Ds,[s("div",Us,[s("div",Ns,[Is,Ts,s("div",$s,[Ls,s("h4",null,"Are you sure you want to delete "+S(n.ossName)+"?",1)]),s("div",Ps,[Fs,s("a",{href:"#",class:"btn btn-primary ms-auto","data-bs-dismiss":"modal",onClick:d[0]||(d[0]=_=>v())}," Delete ")])])])]))}}),Vs={class:"card card-flush w-100"},Ms=D({__name:"OssList",setup(y){const h=U(),l=m([]),n=m([]);T(async()=>{d(),await p()});const p=async()=>{try{const{data:c}=await J();l.value=c}catch(c){console.log(c),h.error("데이터를 가져올 수 없습니다.")}},v=m(0),e=m(""),d=()=>{n.value=[{title:"OSS Name",field:"ossName",width:400},{title:"OSS Desc",field:"ossDesc",width:500},{title:"URL",field:"ossUrl",width:600},{title:"Action",width:400,formatter:_,cellClick:function(c,g){const i=c.target,x=i==null?void 0:i.getAttribute("id");v.value=g.getRow().getData().ossIdx,x==="edit-btn"?f.value="edit":e.value=g.getRow().getData().ossName}}]},_=()=>` -
- - -
`,f=m("new"),k=()=>{v.value=0,f.value="new"};return(c,g)=>(u(),r("div",Vs,[O(q,{"header-title":"OSS","new-btn-title":"New OSS","popup-flag":!0,"popup-target":"#ossForm",onClickNewBtn:k}),O(B,{columns:n.value,"table-data":l.value},null,8,["columns","table-data"]),O(Cs,{mode:f.value,"oss-idx":v.value,onGetOssList:p},null,8,["mode","oss-idx"]),O(Es,{"oss-name":e.value,"oss-idx":v.value,onGetOssList:p},null,8,["oss-name","oss-idx"])]))}});export{Ms as default}; diff --git a/src/main/resources/static/assets/ParamForm-GfNtapPc.js b/src/main/resources/static/assets/ParamForm-B0X0LuP1.js similarity index 95% rename from src/main/resources/static/assets/ParamForm-GfNtapPc.js rename to src/main/resources/static/assets/ParamForm-B0X0LuP1.js index 024b888..c736a2e 100644 --- a/src/main/resources/static/assets/ParamForm-GfNtapPc.js +++ b/src/main/resources/static/assets/ParamForm-B0X0LuP1.js @@ -1 +1 @@ -import{s as o}from"./request-DpggpHyD.js";import{d as v,u as b,c as y,o as x,a as r,F as V,f as I,j as d,h as s,b as n,e as f,g as h,C as k,G as P,H as $}from"./index-7DKFovtK.js";const J=e=>o.get(`/eventlistener/workflowList/${e}`);function Q(e){return o.get(`/workflow/name/duplicate?workflowName=${e}`)}function R(e){return o.get(`/workflow/template/${e}`)}function X(){return o.get("/workflow/workflowStageList")}function Y(e,i){return o.get(`/eventlistener/workflowDetail/${e}/${i}`)}function Z(e){return o.post("/workflow",e)}function ee(e){return o.patch(`/workflow/${e.workflowInfo.workflowIdx}`,e)}function oe(e){return o.delete(`/workflow/${e}`)}function te(e){return o.post("/workflow/run",e)}function ae(e){return o.get(`/workflow/log/${e}`)}const l=e=>(P("data-v-8c3bbb70"),e=e(),$(),e),W={key:0,class:"mt-5 mb-5"},C=l(()=>n("label",{class:"form-label"}," Parameter ",-1)),M={class:"grid gap-0 column-gap-3 mb-2"},B=["onUpdate:modelValue","disabled"],D=["onUpdate:modelValue"],L={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-plus",style:{margin:"0 !important"}},K=l(()=>n("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),S=l(()=>n("path",{d:"M12 5l0 14"},null,-1)),F=l(()=>n("path",{d:"M5 12l14 0"},null,-1)),U=[K,S,F],j=["onClick"],z={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-minus",style:{margin:"0 !important"}},H=l(()=>n("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),N=l(()=>n("path",{d:"M5 12l14 0"},null,-1)),T=[H,N],E=v({__name:"ParamForm",props:{popup:{type:Boolean},workflowParamData:{}},setup(e){const i=b(),t=e,a=y(()=>t.workflowParamData);x(()=>{u()});const u=()=>{a.value.length===0&&a.value.push({paramIdx:0,paramKey:"",paramValue:""})},_=()=>{a.value.push({paramIdx:0,paramKey:"",paramValue:""})},g=m=>{a.value.length!==1?a.value.splice(m,1):i.error("비워두셔도 됩니다.")};return(m,O)=>a.value?(s(),r("div",W,[C,(s(!0),r(V,null,I(a.value,(c,w)=>(s(),r("div",{key:w},[n("div",M,[f(n("input",{class:k(["form-control p-2",t.popup?"g-col-6":"g-col-5"]),type:"text",placeholder:"Key","onUpdate:modelValue":p=>c.paramKey=p,disabled:t.popup},null,10,B),[[h,c.paramKey]]),f(n("input",{class:k(["form-control p-2",t.popup?"g-col-6":"g-col-5"]),type:"text",placeholder:"Value","onUpdate:modelValue":p=>c.paramValue=p},null,10,D),[[h,c.paramValue]]),t.popup?d("",!0):(s(),r("button",{key:0,class:"btn btn-primary",onClick:_,style:{"text-align":"center !important"}},[(s(),r("svg",L,U))])),t.popup?d("",!0):(s(),r("button",{key:1,class:"btn btn-primary",onClick:p=>g(w)},[(s(),r("svg",z,T))],8,j))])]))),128))])):d("",!0)}}),G=(e,i)=>{const t=e.__vccOpts||e;for(const[a,u]of i)t[a]=u;return t},ne=G(E,[["__scopeId","data-v-8c3bbb70"]]);export{ne as P,G as _,ae as a,J as b,X as c,oe as d,Q as e,Z as f,Y as g,R as h,te as r,ee as u}; +import{s as o}from"./request-a_yWYQ73.js";import{d as v,u as b,c as y,o as x,a as r,F as V,f as I,j as d,h as s,b as n,e as f,g as h,C as k,G as P,H as $}from"./index-BVWm2Zu7.js";const J=e=>o.get(`/eventlistener/workflowList/${e}`);function Q(e){return o.get(`/workflow/name/duplicate?workflowName=${e}`)}function R(e){return o.get(`/workflow/template/${e}`)}function X(){return o.get("/workflow/workflowStageList")}function Y(e,i){return o.get(`/eventlistener/workflowDetail/${e}/${i}`)}function Z(e){return o.post("/workflow",e)}function ee(e){return o.patch(`/workflow/${e.workflowInfo.workflowIdx}`,e)}function oe(e){return o.delete(`/workflow/${e}`)}function te(e){return o.post("/workflow/run",e)}function ae(e){return o.get(`/workflow/log/${e}`)}const l=e=>(P("data-v-8c3bbb70"),e=e(),$(),e),W={key:0,class:"mt-5 mb-5"},C=l(()=>n("label",{class:"form-label"}," Parameter ",-1)),M={class:"grid gap-0 column-gap-3 mb-2"},B=["onUpdate:modelValue","disabled"],D=["onUpdate:modelValue"],L={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-plus",style:{margin:"0 !important"}},K=l(()=>n("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),S=l(()=>n("path",{d:"M12 5l0 14"},null,-1)),F=l(()=>n("path",{d:"M5 12l14 0"},null,-1)),U=[K,S,F],j=["onClick"],z={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-minus",style:{margin:"0 !important"}},H=l(()=>n("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),N=l(()=>n("path",{d:"M5 12l14 0"},null,-1)),T=[H,N],E=v({__name:"ParamForm",props:{popup:{type:Boolean},workflowParamData:{}},setup(e){const i=b(),t=e,a=y(()=>t.workflowParamData);x(()=>{u()});const u=()=>{a.value.length===0&&a.value.push({paramIdx:0,paramKey:"",paramValue:""})},_=()=>{a.value.push({paramIdx:0,paramKey:"",paramValue:""})},g=m=>{a.value.length!==1?a.value.splice(m,1):i.error("비워두셔도 됩니다.")};return(m,O)=>a.value?(s(),r("div",W,[C,(s(!0),r(V,null,I(a.value,(c,w)=>(s(),r("div",{key:w},[n("div",M,[f(n("input",{class:k(["form-control p-2",t.popup?"g-col-6":"g-col-5"]),type:"text",placeholder:"Key","onUpdate:modelValue":p=>c.paramKey=p,disabled:t.popup},null,10,B),[[h,c.paramKey]]),f(n("input",{class:k(["form-control p-2",t.popup?"g-col-6":"g-col-5"]),type:"text",placeholder:"Value","onUpdate:modelValue":p=>c.paramValue=p},null,10,D),[[h,c.paramValue]]),t.popup?d("",!0):(s(),r("button",{key:0,class:"btn btn-primary",onClick:_,style:{"text-align":"center !important"}},[(s(),r("svg",L,U))])),t.popup?d("",!0):(s(),r("button",{key:1,class:"btn btn-primary",onClick:p=>g(w)},[(s(),r("svg",z,T))],8,j))])]))),128))])):d("",!0)}}),G=(e,i)=>{const t=e.__vccOpts||e;for(const[a,u]of i)t[a]=u;return t},ne=G(E,[["__scopeId","data-v-8c3bbb70"]]);export{ne as P,G as _,ae as a,J as b,X as c,oe as d,Q as e,Z as f,Y as g,R as h,te as r,ee as u}; diff --git a/src/main/resources/static/assets/Tabulator.vue_vue_type_style_index_0_lang-DQj6hD_W.js b/src/main/resources/static/assets/Tabulator.vue_vue_type_style_index_0_lang-C7rKatiE.js similarity index 99% rename from src/main/resources/static/assets/Tabulator.vue_vue_type_style_index_0_lang-DQj6hD_W.js rename to src/main/resources/static/assets/Tabulator.vue_vue_type_style_index_0_lang-C7rKatiE.js index 153cef1..72160e1 100644 --- a/src/main/resources/static/assets/Tabulator.vue_vue_type_style_index_0_lang-DQj6hD_W.js +++ b/src/main/resources/static/assets/Tabulator.vue_vue_type_style_index_0_lang-C7rKatiE.js @@ -1,4 +1,4 @@ -var Tt=Object.defineProperty;var kt=(l,e,t)=>e in l?Tt(l,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):l[e]=t;var b=(l,e,t)=>kt(l,typeof e!="symbol"?e+"":e,t);import{d as et,h as oe,a as ae,b as H,t as fe,n as Je,l as Ke,r as qe,w as Ye}from"./index-7DKFovtK.js";const Mt={class:"page-header"},Lt={class:"row align-items-center"},St={class:"col"},Dt={class:"page-title"},zt={class:"col-auto ms-auto"},Ht={class:"btn-list"},Ft=H("svg",{xmlns:"http://www.w3.org/2000/svg",class:"icon icon-tabler icon-tabler-plus",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[H("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),H("path",{d:"M12 5l0 14"}),H("path",{d:"M5 12l14 0"})],-1),Pt=["data-bs-target"],Ot=H("svg",{xmlns:"http://www.w3.org/2000/svg",class:"icon icon-tabler icon-tabler-plus",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[H("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),H("path",{d:"M12 5l0 14"}),H("path",{d:"M5 12l14 0"})],-1),tn=et({__name:"TableHeader",props:{headerTitle:{},newBtnTitle:{},popupFlag:{type:Boolean},popupTarget:{}},emits:["click-new-btn"],setup(l,{emit:e}){const t=l,i=e,s=()=>{i("click-new-btn")};return(n,r)=>(oe(),ae("div",Mt,[H("div",Lt,[H("div",St,[H("h2",Dt,fe(t.headerTitle),1)]),H("div",zt,[H("div",Ht,[t.popupFlag?(oe(),ae("a",{key:1,class:"btn btn-primary d-none d-sm-inline-block","data-bs-toggle":"modal","data-bs-target":t.popupTarget,onClick:Je(s,["prevent","stop"])},[Ot,Ke(" "+fe(t.newBtnTitle),1)],8,Pt)):(oe(),ae("a",{key:0,class:"btn btn-primary d-none d-sm-inline-block",onClick:Je(s,["prevent","stop"])},[Ft,Ke(" "+fe(t.newBtnTitle),1)]))])])])]))}});class M{constructor(e){this.table=e}reloadData(e,t,i){return this.table.dataLoader.load(e,void 0,void 0,void 0,t,i)}langText(){return this.table.modules.localize.getText(...arguments)}langBind(){return this.table.modules.localize.bind(...arguments)}langLocale(){return this.table.modules.localize.getLocale(...arguments)}commsConnections(){return this.table.modules.comms.getConnections(...arguments)}commsSend(){return this.table.modules.comms.send(...arguments)}layoutMode(){return this.table.modules.layout.getMode()}layoutRefresh(e){return this.table.modules.layout.layout(e)}subscribe(){return this.table.eventBus.subscribe(...arguments)}unsubscribe(){return this.table.eventBus.unsubscribe(...arguments)}subscribed(e){return this.table.eventBus.subscribed(e)}subscriptionChange(){return this.table.eventBus.subscriptionChange(...arguments)}dispatch(){return this.table.eventBus.dispatch(...arguments)}chain(){return this.table.eventBus.chain(...arguments)}confirm(){return this.table.eventBus.confirm(...arguments)}dispatchExternal(){return this.table.externalEvents.dispatch(...arguments)}subscribedExternal(e){return this.table.externalEvents.subscribed(e)}subscriptionChangeExternal(){return this.table.externalEvents.subscriptionChange(...arguments)}options(e){return this.table.options[e]}setOption(e,t){return typeof t<"u"&&(this.table.options[e]=t),this.table.options[e]}deprecationCheck(e,t,i){return this.table.deprecationAdvisor.check(e,t,i)}deprecationCheckMsg(e,t){return this.table.deprecationAdvisor.checkMsg(e,t)}deprecationMsg(e){return this.table.deprecationAdvisor.msg(e)}module(e){return this.table.module(e)}}class x{static elVisible(e){return!(e.offsetWidth<=0&&e.offsetHeight<=0)}static elOffset(e){var t=e.getBoundingClientRect();return{top:t.top+window.pageYOffset-document.documentElement.clientTop,left:t.left+window.pageXOffset-document.documentElement.clientLeft}}static retrieveNestedData(e,t,i){var s=e?t.split(e):[t],n=s.length,r;for(let o=0;od.subject===o),a>-1?t[r]=i[a].copy:(h=Object.assign(Array.isArray(o)?[]:{},o),i.unshift({subject:o,copy:h}),t[r]=this.deepClone(o,h,i)))}return t}}let At=class tt extends M{constructor(e,t,i){super(e),this.element=t,this.container=this._lookupContainer(),this.parent=i,this.reversedX=!1,this.childPopup=null,this.blurable=!1,this.blurCallback=null,this.blurEventsBound=!1,this.renderedCallback=null,this.visible=!1,this.hideable=!0,this.element.classList.add("tabulator-popup-container"),this.blurEvent=this.hide.bind(this,!1),this.escEvent=this._escapeCheck.bind(this),this.destroyBinding=this.tableDestroyed.bind(this),this.destroyed=!1}tableDestroyed(){this.destroyed=!0,this.hide(!0)}_lookupContainer(){var e=this.table.options.popupContainer;return typeof e=="string"?(e=document.querySelector(e),e||console.warn("Menu Error - no container element found matching selector:",this.table.options.popupContainer,"(defaulting to document body)")):e===!0&&(e=this.table.element),e&&!this._checkContainerIsParent(e)&&(e=!1,console.warn("Menu Error - container element does not contain this table:",this.table.options.popupContainer,"(defaulting to document body)")),e||(e=document.body),e}_checkContainerIsParent(e,t=this.table.element){return e===t?!0:t.parentNode?this._checkContainerIsParent(e,t.parentNode):!1}renderCallback(e){this.renderedCallback=e}containerEventCoords(e){var t=!(e instanceof MouseEvent),i=t?e.touches[0].pageX:e.pageX,s=t?e.touches[0].pageY:e.pageY;if(this.container!==document.body){let n=x.elOffset(this.container);i-=n.left,s-=n.top}return{x:i,y:s}}elementPositionCoords(e,t="right"){var i=x.elOffset(e),s,n,r;switch(this.container!==document.body&&(s=x.elOffset(this.container),i.left-=s.left,i.top-=s.top),t){case"right":n=i.left+e.offsetWidth,r=i.top-1;break;case"bottom":n=i.left,r=i.top+e.offsetHeight;break;case"left":n=i.left,r=i.top-1;break;case"top":n=i.left,r=i.top;break;case"center":n=i.left+e.offsetWidth/2,r=i.top+e.offsetHeight/2;break}return{x:n,y:r,offset:i}}show(e,t){var i,s,n,r,o;return this.destroyed||this.table.destroyed?this:(e instanceof HTMLElement?(n=e,o=this.elementPositionCoords(e,t),r=o.offset,i=o.x,s=o.y):typeof e=="number"?(r={top:0,left:0},i=e,s=t):(o=this.containerEventCoords(e),i=o.x,s=o.y,this.reversedX=!1),this.element.style.top=s+"px",this.element.style.left=i+"px",this.container.appendChild(this.element),typeof this.renderedCallback=="function"&&this.renderedCallback(),this._fitToScreen(i,s,n,r,t),this.visible=!0,this.subscribe("table-destroy",this.destroyBinding),this.element.addEventListener("mousedown",a=>{a.stopPropagation()}),this)}_fitToScreen(e,t,i,s,n){var r=this.container===document.body?document.documentElement.scrollTop:this.container.scrollTop;(e+this.element.offsetWidth>=this.container.offsetWidth||this.reversedX)&&(this.element.style.left="",i?this.element.style.right=this.container.offsetWidth-s.left+"px":this.element.style.right=this.container.offsetWidth-e+"px",this.reversedX=!0);let o=Math.max(this.container.offsetHeight,r?this.container.scrollHeight:0);if(t+this.element.offsetHeight>o)if(i)switch(n){case"bottom":this.element.style.top=parseInt(this.element.style.top)-this.element.offsetHeight-i.offsetHeight-1+"px";break;default:this.element.style.top=parseInt(this.element.style.top)-this.element.offsetHeight+i.offsetHeight+1+"px"}else this.element.style.height=o+"px"}isVisible(){return this.visible}hideOnBlur(e){return this.blurable=!0,this.visible&&(setTimeout(()=>{this.visible&&(this.table.rowManager.element.addEventListener("scroll",this.blurEvent),this.subscribe("cell-editing",this.blurEvent),document.body.addEventListener("click",this.blurEvent),document.body.addEventListener("contextmenu",this.blurEvent),document.body.addEventListener("mousedown",this.blurEvent),window.addEventListener("resize",this.blurEvent),document.body.addEventListener("keydown",this.escEvent),this.blurEventsBound=!0)},100),this.blurCallback=e),this}_escapeCheck(e){e.keyCode==27&&this.hide()}blockHide(){this.hideable=!1}restoreHide(){this.hideable=!0}hide(e=!1){return this.visible&&this.hideable&&(this.blurable&&this.blurEventsBound&&(document.body.removeEventListener("keydown",this.escEvent),document.body.removeEventListener("click",this.blurEvent),document.body.removeEventListener("contextmenu",this.blurEvent),document.body.removeEventListener("mousedown",this.blurEvent),window.removeEventListener("resize",this.blurEvent),this.table.rowManager.element.removeEventListener("scroll",this.blurEvent),this.unsubscribe("cell-editing",this.blurEvent),this.blurEventsBound=!1),this.childPopup&&this.childPopup.hide(),this.parent&&(this.parent.childPopup=null),this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.visible=!1,this.blurCallback&&!e&&this.blurCallback(),this.unsubscribe("table-destroy",this.destroyBinding)),this}child(e){return this.childPopup&&this.childPopup.hide(),this.childPopup=new tt(this.table,e,this),this.childPopup}};class w extends M{constructor(e,t){super(e),this._handler=null}initialize(){}registerTableOption(e,t){this.table.optionsList.register(e,t)}registerColumnOption(e,t){this.table.columnManager.optionsList.register(e,t)}registerTableFunction(e,t){typeof this.table[e]>"u"?this.table[e]=(...i)=>(this.table.initGuard(e),t(...i)):console.warn("Unable to bind table function, name already in use",e)}registerComponentFunction(e,t,i){return this.table.componentFunctionBinder.bind(e,t,i)}registerDataHandler(e,t){this.table.rowManager.registerDataPipelineHandler(e,t),this._handler=e}registerDisplayHandler(e,t){this.table.rowManager.registerDisplayPipelineHandler(e,t),this._handler=e}displayRows(e){var t=this.table.rowManager.displayRows.length-1,i;if(this._handler&&(i=this.table.rowManager.displayPipeline.findIndex(s=>s.handler===this._handler),i>-1&&(t=i)),e&&(t=t+e),this._handler)return t>-1?this.table.rowManager.getDisplayRows(t):this.activeRows()}activeRows(){return this.table.rowManager.activeRows}refreshData(e,t){t||(t=this._handler),t&&this.table.rowManager.refreshActiveData(t,!1,e)}footerAppend(e){return this.table.footerManager.append(e)}footerPrepend(e){return this.table.footerManager.prepend(e)}footerRemove(e){return this.table.footerManager.remove(e)}popup(e,t){return new At(this.table,e,t)}alert(e,t){return this.table.alertManager.alert(e,t)}clearAlert(){return this.table.alertManager.clear()}}var _t={rownum:function(l,e,t,i,s,n){return n.getPosition()}};const q=class q extends w{constructor(e){super(e),this.allowedTypes=["","data","download","clipboard","print","htmlOutput"],this.registerColumnOption("accessor"),this.registerColumnOption("accessorParams"),this.registerColumnOption("accessorData"),this.registerColumnOption("accessorDataParams"),this.registerColumnOption("accessorDownload"),this.registerColumnOption("accessorDownloadParams"),this.registerColumnOption("accessorClipboard"),this.registerColumnOption("accessorClipboardParams"),this.registerColumnOption("accessorPrint"),this.registerColumnOption("accessorPrintParams"),this.registerColumnOption("accessorHtmlOutput"),this.registerColumnOption("accessorHtmlOutputParams")}initialize(){this.subscribe("column-layout",this.initializeColumn.bind(this)),this.subscribe("row-data-retrieve",this.transformRow.bind(this))}initializeColumn(e){var t=!1,i={};this.allowedTypes.forEach(s=>{var n="accessor"+(s.charAt(0).toUpperCase()+s.slice(1)),r;e.definition[n]&&(r=this.lookupAccessor(e.definition[n]),r&&(t=!0,i[n]={accessor:r,params:e.definition[n+"Params"]||{}}))}),t&&(e.modules.accessor=i)}lookupAccessor(e){var t=!1;switch(typeof e){case"string":q.accessors[e]?t=q.accessors[e]:console.warn("Accessor Error - No such accessor found, ignoring: ",e);break;case"function":t=e;break}return t}transformRow(e,t){var i="accessor"+(t.charAt(0).toUpperCase()+t.slice(1)),s=e.getComponent(),n=x.deepClone(e.data||{});return this.table.columnManager.traverse(function(r){var o,a,h,d;r.modules.accessor&&(a=r.modules.accessor[i]||r.modules.accessor.accessor||!1,a&&(o=r.getFieldValue(n),o!="undefined"&&(d=r.getComponent(),h=typeof a.params=="function"?a.params(o,n,t,d,s):a.params,r.setFieldValue(n,a.accessor(o,n,t,h,d,s)))))}),n}};b(q,"moduleName","accessor"),b(q,"accessors",_t);let ge=q;var Bt={method:"GET"};function be(l,e){var t=[];if(e=e||"",Array.isArray(l))l.forEach((s,n)=>{t=t.concat(be(s,e?e+"["+n+"]":n))});else if(typeof l=="object")for(var i in l)t=t.concat(be(l[i],e?e+"["+i+"]":i));else t.push({key:e,value:l});return t}function Vt(l){var e=be(l),t=[];return e.forEach(function(i){t.push(encodeURIComponent(i.key)+"="+encodeURIComponent(i.value))}),t.join("&")}function it(l,e,t){return l&&t&&Object.keys(t).length&&(!e.method||e.method.toLowerCase()=="get")&&(e.method="get",l+=(l.includes("?")?"&":"?")+Vt(t)),l}function It(l,e,t){var i;return new Promise((s,n)=>{if(l=this.urlGenerator.call(this.table,l,e,t),e.method.toUpperCase()!="GET")if(i=typeof this.table.options.ajaxContentType=="object"?this.table.options.ajaxContentType:this.contentTypeFormatters[this.table.options.ajaxContentType],i){for(var r in i.headers)e.headers||(e.headers={}),typeof e.headers[r]>"u"&&(e.headers[r]=i.headers[r]);e.body=i.body.call(this,l,e,t)}else console.warn("Ajax Error - Invalid ajaxContentType value:",this.table.options.ajaxContentType);l?(typeof e.headers>"u"&&(e.headers={}),typeof e.headers.Accept>"u"&&(e.headers.Accept="application/json"),typeof e.headers["X-Requested-With"]>"u"&&(e.headers["X-Requested-With"]="XMLHttpRequest"),typeof e.mode>"u"&&(e.mode="cors"),e.mode=="cors"?(typeof e.headers.Origin>"u"&&(e.headers.Origin=window.location.origin),typeof e.credentials>"u"&&(e.credentials="same-origin")):typeof e.credentials>"u"&&(e.credentials="include"),fetch(l,e).then(o=>{o.ok?o.json().then(a=>{s(a)}).catch(a=>{n(a),console.warn("Ajax Load Error - Invalid JSON returned",a)}):(console.error("Ajax Load Error - Connection Error: "+o.status,o.statusText),n(o))}).catch(o=>{console.error("Ajax Load Error - Connection Error: ",o),n(o)})):(console.warn("Ajax Load Error - No URL Set"),s([]))})}function ve(l,e){var t=[];if(e=e||"",Array.isArray(l))l.forEach((s,n)=>{t=t.concat(ve(s,e?e+"["+n+"]":n))});else if(typeof l=="object")for(var i in l)t=t.concat(ve(l[i],e?e+"["+i+"]":i));else t.push({key:e,value:l});return t}var Nt={json:{headers:{"Content-Type":"application/json"},body:function(l,e,t){return JSON.stringify(t)}},form:{headers:{},body:function(l,e,t){var i=ve(t),s=new FormData;return i.forEach(function(n){s.append(n.key,n.value)}),s}}};const P=class P extends w{constructor(e){super(e),this.config={},this.url="",this.urlGenerator=!1,this.params=!1,this.loaderPromise=!1,this.registerTableOption("ajaxURL",!1),this.registerTableOption("ajaxURLGenerator",!1),this.registerTableOption("ajaxParams",{}),this.registerTableOption("ajaxConfig","get"),this.registerTableOption("ajaxContentType","form"),this.registerTableOption("ajaxRequestFunc",!1),this.registerTableOption("ajaxRequesting",function(){}),this.registerTableOption("ajaxResponse",!1),this.contentTypeFormatters=P.contentTypeFormatters}initialize(){this.loaderPromise=this.table.options.ajaxRequestFunc||P.defaultLoaderPromise,this.urlGenerator=this.table.options.ajaxURLGenerator||P.defaultURLGenerator,this.table.options.ajaxURL&&this.setUrl(this.table.options.ajaxURL),this.setDefaultConfig(this.table.options.ajaxConfig),this.registerTableFunction("getAjaxUrl",this.getUrl.bind(this)),this.subscribe("data-loading",this.requestDataCheck.bind(this)),this.subscribe("data-params",this.requestParams.bind(this)),this.subscribe("data-load",this.requestData.bind(this))}requestParams(e,t,i,s){var n=this.table.options.ajaxParams;return n&&(typeof n=="function"&&(n=n.call(this.table)),s=Object.assign(Object.assign({},n),s)),s}requestDataCheck(e,t,i,s){return!!(!e&&this.url||typeof e=="string")}requestData(e,t,i,s,n){var r;return!n&&this.requestDataCheck(e)?(e&&this.setUrl(e),r=this.generateConfig(i),this.sendRequest(this.url,t,r)):n}setDefaultConfig(e={}){this.config=Object.assign({},P.defaultConfig),typeof e=="string"?this.config.method=e:Object.assign(this.config,e)}generateConfig(e={}){var t=Object.assign({},this.config);return typeof e=="string"?t.method=e:Object.assign(t,e),t}setUrl(e){this.url=e}getUrl(){return this.url}sendRequest(e,t,i){return this.table.options.ajaxRequesting.call(this.table,e,t)!==!1?this.loaderPromise(e,i,t).then(s=>(this.table.options.ajaxResponse&&(s=this.table.options.ajaxResponse.call(this.table,e,t,s)),s)):Promise.reject()}};b(P,"moduleName","ajax"),b(P,"defaultConfig",Bt),b(P,"defaultURLGenerator",it),b(P,"defaultLoaderPromise",It),b(P,"contentTypeFormatters",Nt);let we=P;var Wt={replace:function(l){return this.table.setData(l)},update:function(l){return this.table.updateOrAddData(l)},insert:function(l){return this.table.addData(l)}},Gt={table:function(l){var e=[],t=!0,i=this.table.columnManager.columns,s=[],n=[];return l=l.split(` +var Tt=Object.defineProperty;var kt=(l,e,t)=>e in l?Tt(l,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):l[e]=t;var b=(l,e,t)=>kt(l,typeof e!="symbol"?e+"":e,t);import{d as et,h as oe,a as ae,b as H,t as fe,n as Je,l as Ke,r as qe,w as Ye}from"./index-BVWm2Zu7.js";const Mt={class:"page-header"},Lt={class:"row align-items-center"},St={class:"col"},Dt={class:"page-title"},zt={class:"col-auto ms-auto"},Ht={class:"btn-list"},Ft=H("svg",{xmlns:"http://www.w3.org/2000/svg",class:"icon icon-tabler icon-tabler-plus",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[H("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),H("path",{d:"M12 5l0 14"}),H("path",{d:"M5 12l14 0"})],-1),Pt=["data-bs-target"],Ot=H("svg",{xmlns:"http://www.w3.org/2000/svg",class:"icon icon-tabler icon-tabler-plus",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[H("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),H("path",{d:"M12 5l0 14"}),H("path",{d:"M5 12l14 0"})],-1),tn=et({__name:"TableHeader",props:{headerTitle:{},newBtnTitle:{},popupFlag:{type:Boolean},popupTarget:{}},emits:["click-new-btn"],setup(l,{emit:e}){const t=l,i=e,s=()=>{i("click-new-btn")};return(n,r)=>(oe(),ae("div",Mt,[H("div",Lt,[H("div",St,[H("h2",Dt,fe(t.headerTitle),1)]),H("div",zt,[H("div",Ht,[t.popupFlag?(oe(),ae("a",{key:1,class:"btn btn-primary d-none d-sm-inline-block","data-bs-toggle":"modal","data-bs-target":t.popupTarget,onClick:Je(s,["prevent","stop"])},[Ot,Ke(" "+fe(t.newBtnTitle),1)],8,Pt)):(oe(),ae("a",{key:0,class:"btn btn-primary d-none d-sm-inline-block",onClick:Je(s,["prevent","stop"])},[Ft,Ke(" "+fe(t.newBtnTitle),1)]))])])])]))}});class M{constructor(e){this.table=e}reloadData(e,t,i){return this.table.dataLoader.load(e,void 0,void 0,void 0,t,i)}langText(){return this.table.modules.localize.getText(...arguments)}langBind(){return this.table.modules.localize.bind(...arguments)}langLocale(){return this.table.modules.localize.getLocale(...arguments)}commsConnections(){return this.table.modules.comms.getConnections(...arguments)}commsSend(){return this.table.modules.comms.send(...arguments)}layoutMode(){return this.table.modules.layout.getMode()}layoutRefresh(e){return this.table.modules.layout.layout(e)}subscribe(){return this.table.eventBus.subscribe(...arguments)}unsubscribe(){return this.table.eventBus.unsubscribe(...arguments)}subscribed(e){return this.table.eventBus.subscribed(e)}subscriptionChange(){return this.table.eventBus.subscriptionChange(...arguments)}dispatch(){return this.table.eventBus.dispatch(...arguments)}chain(){return this.table.eventBus.chain(...arguments)}confirm(){return this.table.eventBus.confirm(...arguments)}dispatchExternal(){return this.table.externalEvents.dispatch(...arguments)}subscribedExternal(e){return this.table.externalEvents.subscribed(e)}subscriptionChangeExternal(){return this.table.externalEvents.subscriptionChange(...arguments)}options(e){return this.table.options[e]}setOption(e,t){return typeof t<"u"&&(this.table.options[e]=t),this.table.options[e]}deprecationCheck(e,t,i){return this.table.deprecationAdvisor.check(e,t,i)}deprecationCheckMsg(e,t){return this.table.deprecationAdvisor.checkMsg(e,t)}deprecationMsg(e){return this.table.deprecationAdvisor.msg(e)}module(e){return this.table.module(e)}}class x{static elVisible(e){return!(e.offsetWidth<=0&&e.offsetHeight<=0)}static elOffset(e){var t=e.getBoundingClientRect();return{top:t.top+window.pageYOffset-document.documentElement.clientTop,left:t.left+window.pageXOffset-document.documentElement.clientLeft}}static retrieveNestedData(e,t,i){var s=e?t.split(e):[t],n=s.length,r;for(let o=0;od.subject===o),a>-1?t[r]=i[a].copy:(h=Object.assign(Array.isArray(o)?[]:{},o),i.unshift({subject:o,copy:h}),t[r]=this.deepClone(o,h,i)))}return t}}let At=class tt extends M{constructor(e,t,i){super(e),this.element=t,this.container=this._lookupContainer(),this.parent=i,this.reversedX=!1,this.childPopup=null,this.blurable=!1,this.blurCallback=null,this.blurEventsBound=!1,this.renderedCallback=null,this.visible=!1,this.hideable=!0,this.element.classList.add("tabulator-popup-container"),this.blurEvent=this.hide.bind(this,!1),this.escEvent=this._escapeCheck.bind(this),this.destroyBinding=this.tableDestroyed.bind(this),this.destroyed=!1}tableDestroyed(){this.destroyed=!0,this.hide(!0)}_lookupContainer(){var e=this.table.options.popupContainer;return typeof e=="string"?(e=document.querySelector(e),e||console.warn("Menu Error - no container element found matching selector:",this.table.options.popupContainer,"(defaulting to document body)")):e===!0&&(e=this.table.element),e&&!this._checkContainerIsParent(e)&&(e=!1,console.warn("Menu Error - container element does not contain this table:",this.table.options.popupContainer,"(defaulting to document body)")),e||(e=document.body),e}_checkContainerIsParent(e,t=this.table.element){return e===t?!0:t.parentNode?this._checkContainerIsParent(e,t.parentNode):!1}renderCallback(e){this.renderedCallback=e}containerEventCoords(e){var t=!(e instanceof MouseEvent),i=t?e.touches[0].pageX:e.pageX,s=t?e.touches[0].pageY:e.pageY;if(this.container!==document.body){let n=x.elOffset(this.container);i-=n.left,s-=n.top}return{x:i,y:s}}elementPositionCoords(e,t="right"){var i=x.elOffset(e),s,n,r;switch(this.container!==document.body&&(s=x.elOffset(this.container),i.left-=s.left,i.top-=s.top),t){case"right":n=i.left+e.offsetWidth,r=i.top-1;break;case"bottom":n=i.left,r=i.top+e.offsetHeight;break;case"left":n=i.left,r=i.top-1;break;case"top":n=i.left,r=i.top;break;case"center":n=i.left+e.offsetWidth/2,r=i.top+e.offsetHeight/2;break}return{x:n,y:r,offset:i}}show(e,t){var i,s,n,r,o;return this.destroyed||this.table.destroyed?this:(e instanceof HTMLElement?(n=e,o=this.elementPositionCoords(e,t),r=o.offset,i=o.x,s=o.y):typeof e=="number"?(r={top:0,left:0},i=e,s=t):(o=this.containerEventCoords(e),i=o.x,s=o.y,this.reversedX=!1),this.element.style.top=s+"px",this.element.style.left=i+"px",this.container.appendChild(this.element),typeof this.renderedCallback=="function"&&this.renderedCallback(),this._fitToScreen(i,s,n,r,t),this.visible=!0,this.subscribe("table-destroy",this.destroyBinding),this.element.addEventListener("mousedown",a=>{a.stopPropagation()}),this)}_fitToScreen(e,t,i,s,n){var r=this.container===document.body?document.documentElement.scrollTop:this.container.scrollTop;(e+this.element.offsetWidth>=this.container.offsetWidth||this.reversedX)&&(this.element.style.left="",i?this.element.style.right=this.container.offsetWidth-s.left+"px":this.element.style.right=this.container.offsetWidth-e+"px",this.reversedX=!0);let o=Math.max(this.container.offsetHeight,r?this.container.scrollHeight:0);if(t+this.element.offsetHeight>o)if(i)switch(n){case"bottom":this.element.style.top=parseInt(this.element.style.top)-this.element.offsetHeight-i.offsetHeight-1+"px";break;default:this.element.style.top=parseInt(this.element.style.top)-this.element.offsetHeight+i.offsetHeight+1+"px"}else this.element.style.height=o+"px"}isVisible(){return this.visible}hideOnBlur(e){return this.blurable=!0,this.visible&&(setTimeout(()=>{this.visible&&(this.table.rowManager.element.addEventListener("scroll",this.blurEvent),this.subscribe("cell-editing",this.blurEvent),document.body.addEventListener("click",this.blurEvent),document.body.addEventListener("contextmenu",this.blurEvent),document.body.addEventListener("mousedown",this.blurEvent),window.addEventListener("resize",this.blurEvent),document.body.addEventListener("keydown",this.escEvent),this.blurEventsBound=!0)},100),this.blurCallback=e),this}_escapeCheck(e){e.keyCode==27&&this.hide()}blockHide(){this.hideable=!1}restoreHide(){this.hideable=!0}hide(e=!1){return this.visible&&this.hideable&&(this.blurable&&this.blurEventsBound&&(document.body.removeEventListener("keydown",this.escEvent),document.body.removeEventListener("click",this.blurEvent),document.body.removeEventListener("contextmenu",this.blurEvent),document.body.removeEventListener("mousedown",this.blurEvent),window.removeEventListener("resize",this.blurEvent),this.table.rowManager.element.removeEventListener("scroll",this.blurEvent),this.unsubscribe("cell-editing",this.blurEvent),this.blurEventsBound=!1),this.childPopup&&this.childPopup.hide(),this.parent&&(this.parent.childPopup=null),this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.visible=!1,this.blurCallback&&!e&&this.blurCallback(),this.unsubscribe("table-destroy",this.destroyBinding)),this}child(e){return this.childPopup&&this.childPopup.hide(),this.childPopup=new tt(this.table,e,this),this.childPopup}};class w extends M{constructor(e,t){super(e),this._handler=null}initialize(){}registerTableOption(e,t){this.table.optionsList.register(e,t)}registerColumnOption(e,t){this.table.columnManager.optionsList.register(e,t)}registerTableFunction(e,t){typeof this.table[e]>"u"?this.table[e]=(...i)=>(this.table.initGuard(e),t(...i)):console.warn("Unable to bind table function, name already in use",e)}registerComponentFunction(e,t,i){return this.table.componentFunctionBinder.bind(e,t,i)}registerDataHandler(e,t){this.table.rowManager.registerDataPipelineHandler(e,t),this._handler=e}registerDisplayHandler(e,t){this.table.rowManager.registerDisplayPipelineHandler(e,t),this._handler=e}displayRows(e){var t=this.table.rowManager.displayRows.length-1,i;if(this._handler&&(i=this.table.rowManager.displayPipeline.findIndex(s=>s.handler===this._handler),i>-1&&(t=i)),e&&(t=t+e),this._handler)return t>-1?this.table.rowManager.getDisplayRows(t):this.activeRows()}activeRows(){return this.table.rowManager.activeRows}refreshData(e,t){t||(t=this._handler),t&&this.table.rowManager.refreshActiveData(t,!1,e)}footerAppend(e){return this.table.footerManager.append(e)}footerPrepend(e){return this.table.footerManager.prepend(e)}footerRemove(e){return this.table.footerManager.remove(e)}popup(e,t){return new At(this.table,e,t)}alert(e,t){return this.table.alertManager.alert(e,t)}clearAlert(){return this.table.alertManager.clear()}}var _t={rownum:function(l,e,t,i,s,n){return n.getPosition()}};const q=class q extends w{constructor(e){super(e),this.allowedTypes=["","data","download","clipboard","print","htmlOutput"],this.registerColumnOption("accessor"),this.registerColumnOption("accessorParams"),this.registerColumnOption("accessorData"),this.registerColumnOption("accessorDataParams"),this.registerColumnOption("accessorDownload"),this.registerColumnOption("accessorDownloadParams"),this.registerColumnOption("accessorClipboard"),this.registerColumnOption("accessorClipboardParams"),this.registerColumnOption("accessorPrint"),this.registerColumnOption("accessorPrintParams"),this.registerColumnOption("accessorHtmlOutput"),this.registerColumnOption("accessorHtmlOutputParams")}initialize(){this.subscribe("column-layout",this.initializeColumn.bind(this)),this.subscribe("row-data-retrieve",this.transformRow.bind(this))}initializeColumn(e){var t=!1,i={};this.allowedTypes.forEach(s=>{var n="accessor"+(s.charAt(0).toUpperCase()+s.slice(1)),r;e.definition[n]&&(r=this.lookupAccessor(e.definition[n]),r&&(t=!0,i[n]={accessor:r,params:e.definition[n+"Params"]||{}}))}),t&&(e.modules.accessor=i)}lookupAccessor(e){var t=!1;switch(typeof e){case"string":q.accessors[e]?t=q.accessors[e]:console.warn("Accessor Error - No such accessor found, ignoring: ",e);break;case"function":t=e;break}return t}transformRow(e,t){var i="accessor"+(t.charAt(0).toUpperCase()+t.slice(1)),s=e.getComponent(),n=x.deepClone(e.data||{});return this.table.columnManager.traverse(function(r){var o,a,h,d;r.modules.accessor&&(a=r.modules.accessor[i]||r.modules.accessor.accessor||!1,a&&(o=r.getFieldValue(n),o!="undefined"&&(d=r.getComponent(),h=typeof a.params=="function"?a.params(o,n,t,d,s):a.params,r.setFieldValue(n,a.accessor(o,n,t,h,d,s)))))}),n}};b(q,"moduleName","accessor"),b(q,"accessors",_t);let ge=q;var Bt={method:"GET"};function be(l,e){var t=[];if(e=e||"",Array.isArray(l))l.forEach((s,n)=>{t=t.concat(be(s,e?e+"["+n+"]":n))});else if(typeof l=="object")for(var i in l)t=t.concat(be(l[i],e?e+"["+i+"]":i));else t.push({key:e,value:l});return t}function Vt(l){var e=be(l),t=[];return e.forEach(function(i){t.push(encodeURIComponent(i.key)+"="+encodeURIComponent(i.value))}),t.join("&")}function it(l,e,t){return l&&t&&Object.keys(t).length&&(!e.method||e.method.toLowerCase()=="get")&&(e.method="get",l+=(l.includes("?")?"&":"?")+Vt(t)),l}function It(l,e,t){var i;return new Promise((s,n)=>{if(l=this.urlGenerator.call(this.table,l,e,t),e.method.toUpperCase()!="GET")if(i=typeof this.table.options.ajaxContentType=="object"?this.table.options.ajaxContentType:this.contentTypeFormatters[this.table.options.ajaxContentType],i){for(var r in i.headers)e.headers||(e.headers={}),typeof e.headers[r]>"u"&&(e.headers[r]=i.headers[r]);e.body=i.body.call(this,l,e,t)}else console.warn("Ajax Error - Invalid ajaxContentType value:",this.table.options.ajaxContentType);l?(typeof e.headers>"u"&&(e.headers={}),typeof e.headers.Accept>"u"&&(e.headers.Accept="application/json"),typeof e.headers["X-Requested-With"]>"u"&&(e.headers["X-Requested-With"]="XMLHttpRequest"),typeof e.mode>"u"&&(e.mode="cors"),e.mode=="cors"?(typeof e.headers.Origin>"u"&&(e.headers.Origin=window.location.origin),typeof e.credentials>"u"&&(e.credentials="same-origin")):typeof e.credentials>"u"&&(e.credentials="include"),fetch(l,e).then(o=>{o.ok?o.json().then(a=>{s(a)}).catch(a=>{n(a),console.warn("Ajax Load Error - Invalid JSON returned",a)}):(console.error("Ajax Load Error - Connection Error: "+o.status,o.statusText),n(o))}).catch(o=>{console.error("Ajax Load Error - Connection Error: ",o),n(o)})):(console.warn("Ajax Load Error - No URL Set"),s([]))})}function ve(l,e){var t=[];if(e=e||"",Array.isArray(l))l.forEach((s,n)=>{t=t.concat(ve(s,e?e+"["+n+"]":n))});else if(typeof l=="object")for(var i in l)t=t.concat(ve(l[i],e?e+"["+i+"]":i));else t.push({key:e,value:l});return t}var Nt={json:{headers:{"Content-Type":"application/json"},body:function(l,e,t){return JSON.stringify(t)}},form:{headers:{},body:function(l,e,t){var i=ve(t),s=new FormData;return i.forEach(function(n){s.append(n.key,n.value)}),s}}};const P=class P extends w{constructor(e){super(e),this.config={},this.url="",this.urlGenerator=!1,this.params=!1,this.loaderPromise=!1,this.registerTableOption("ajaxURL",!1),this.registerTableOption("ajaxURLGenerator",!1),this.registerTableOption("ajaxParams",{}),this.registerTableOption("ajaxConfig","get"),this.registerTableOption("ajaxContentType","form"),this.registerTableOption("ajaxRequestFunc",!1),this.registerTableOption("ajaxRequesting",function(){}),this.registerTableOption("ajaxResponse",!1),this.contentTypeFormatters=P.contentTypeFormatters}initialize(){this.loaderPromise=this.table.options.ajaxRequestFunc||P.defaultLoaderPromise,this.urlGenerator=this.table.options.ajaxURLGenerator||P.defaultURLGenerator,this.table.options.ajaxURL&&this.setUrl(this.table.options.ajaxURL),this.setDefaultConfig(this.table.options.ajaxConfig),this.registerTableFunction("getAjaxUrl",this.getUrl.bind(this)),this.subscribe("data-loading",this.requestDataCheck.bind(this)),this.subscribe("data-params",this.requestParams.bind(this)),this.subscribe("data-load",this.requestData.bind(this))}requestParams(e,t,i,s){var n=this.table.options.ajaxParams;return n&&(typeof n=="function"&&(n=n.call(this.table)),s=Object.assign(Object.assign({},n),s)),s}requestDataCheck(e,t,i,s){return!!(!e&&this.url||typeof e=="string")}requestData(e,t,i,s,n){var r;return!n&&this.requestDataCheck(e)?(e&&this.setUrl(e),r=this.generateConfig(i),this.sendRequest(this.url,t,r)):n}setDefaultConfig(e={}){this.config=Object.assign({},P.defaultConfig),typeof e=="string"?this.config.method=e:Object.assign(this.config,e)}generateConfig(e={}){var t=Object.assign({},this.config);return typeof e=="string"?t.method=e:Object.assign(t,e),t}setUrl(e){this.url=e}getUrl(){return this.url}sendRequest(e,t,i){return this.table.options.ajaxRequesting.call(this.table,e,t)!==!1?this.loaderPromise(e,i,t).then(s=>(this.table.options.ajaxResponse&&(s=this.table.options.ajaxResponse.call(this.table,e,t,s)),s)):Promise.reject()}};b(P,"moduleName","ajax"),b(P,"defaultConfig",Bt),b(P,"defaultURLGenerator",it),b(P,"defaultLoaderPromise",It),b(P,"contentTypeFormatters",Nt);let we=P;var Wt={replace:function(l){return this.table.setData(l)},update:function(l){return this.table.updateOrAddData(l)},insert:function(l){return this.table.addData(l)}},Gt={table:function(l){var e=[],t=!0,i=this.table.columnManager.columns,s=[],n=[];return l=l.split(` `),l.forEach(function(r){e.push(r.split(" "))}),e.length&&!(e.length===1&&e[0].length<2)?(e[0].forEach(function(r){var o=i.find(function(a){return r&&a.definition.title&&r.trim()&&a.definition.title.trim()===r.trim()});o?s.push(o):t=!1}),t||(t=!0,s=[],e[0].forEach(function(r){var o=i.find(function(a){return r&&a.field&&r.trim()&&a.field.trim()===r.trim()});o?s.push(o):t=!1}),t||(s=this.table.columnManager.columnsByIndex)),t&&e.shift(),e.forEach(function(r){var o={};r.forEach(function(a,h){s[h]&&(o[s[h].field]=a)}),n.push(o)}),n):!1}},jt={copyToClipboard:["ctrl + 67","meta + 67"]},Ut={copyToClipboard:function(l){this.table.modules.edit.currentCell||this.table.modExists("clipboard",!0)&&this.table.modules.clipboard.copy(!1,!0)}},Xt={keybindings:{bindings:jt,actions:Ut}};const B=class B extends w{constructor(e){super(e),this.mode=!0,this.pasteParser=function(){},this.pasteAction=function(){},this.customSelection=!1,this.rowRange=!1,this.blocked=!0,this.registerTableOption("clipboard",!1),this.registerTableOption("clipboardCopyStyled",!0),this.registerTableOption("clipboardCopyConfig",!1),this.registerTableOption("clipboardCopyFormatter",!1),this.registerTableOption("clipboardCopyRowRange","active"),this.registerTableOption("clipboardPasteParser","table"),this.registerTableOption("clipboardPasteAction","insert"),this.registerColumnOption("clipboard"),this.registerColumnOption("titleClipboard")}initialize(){this.mode=this.table.options.clipboard,this.rowRange=this.table.options.clipboardCopyRowRange,(this.mode===!0||this.mode==="copy")&&this.table.element.addEventListener("copy",e=>{var t,i,s;this.blocked||(e.preventDefault(),this.customSelection?(t=this.customSelection,this.table.options.clipboardCopyFormatter&&(t=this.table.options.clipboardCopyFormatter("plain",t))):(s=this.table.modules.export.generateExportList(this.table.options.clipboardCopyConfig,this.table.options.clipboardCopyStyled,this.rowRange,"clipboard"),i=this.table.modules.export.generateHTMLTable(s),t=i?this.generatePlainContent(s):"",this.table.options.clipboardCopyFormatter&&(t=this.table.options.clipboardCopyFormatter("plain",t),i=this.table.options.clipboardCopyFormatter("html",i))),window.clipboardData&&window.clipboardData.setData?window.clipboardData.setData("Text",t):e.clipboardData&&e.clipboardData.setData?(e.clipboardData.setData("text/plain",t),i&&e.clipboardData.setData("text/html",i)):e.originalEvent&&e.originalEvent.clipboardData.setData&&(e.originalEvent.clipboardData.setData("text/plain",t),i&&e.originalEvent.clipboardData.setData("text/html",i)),this.dispatchExternal("clipboardCopied",t,i),this.reset())}),(this.mode===!0||this.mode==="paste")&&this.table.element.addEventListener("paste",e=>{this.paste(e)}),this.setPasteParser(this.table.options.clipboardPasteParser),this.setPasteAction(this.table.options.clipboardPasteAction),this.registerTableFunction("copyToClipboard",this.copy.bind(this))}reset(){this.blocked=!0,this.customSelection=!1}generatePlainContent(e){var t=[];return e.forEach(i=>{var s=[];i.columns.forEach(n=>{var r="";if(n)if(i.type==="group"&&(n.value=n.component.getKey()),n.value===null)r="";else switch(typeof n.value){case"object":r=JSON.stringify(n.value);break;case"undefined":r="";break;default:r=n.value}s.push(r)}),t.push(s.join(" "))}),t.join(` `)}copy(e,t){var i,s;this.blocked=!1,this.customSelection=!1,(this.mode===!0||this.mode==="copy")&&(this.rowRange=e||this.table.options.clipboardCopyRowRange,typeof window.getSelection<"u"&&typeof document.createRange<"u"?(e=document.createRange(),e.selectNodeContents(this.table.element),i=window.getSelection(),i.toString()&&t&&(this.customSelection=i.toString()),i.removeAllRanges(),i.addRange(e)):typeof document.selection<"u"&&typeof document.body.createTextRange<"u"&&(s=document.body.createTextRange(),s.moveToElementText(this.table.element),s.select()),document.execCommand("copy"),i&&i.removeAllRanges())}setPasteAction(e){switch(typeof e){case"string":this.pasteAction=B.pasteActions[e],this.pasteAction||console.warn("Clipboard Error - No such paste action found:",e);break;case"function":this.pasteAction=e;break}}setPasteParser(e){switch(typeof e){case"string":this.pasteParser=B.pasteParsers[e],this.pasteParser||console.warn("Clipboard Error - No such paste parser found:",e);break;case"function":this.pasteParser=e;break}}paste(e){var t,i,s;this.checkPasteOrigin(e)&&(t=this.getPasteData(e),i=this.pasteParser.call(this,t),i?(e.preventDefault(),this.table.modExists("mutator")&&(i=this.mutateData(i)),s=this.pasteAction.call(this,i),this.dispatchExternal("clipboardPasted",t,i,s)):this.dispatchExternal("clipboardPasteError",t))}mutateData(e){var t=[];return Array.isArray(e)?e.forEach(i=>{t.push(this.table.modules.mutator.transformRow(i,"clipboard"))}):t=e,t}checkPasteOrigin(e){var t=!0,i=this.confirm("clipboard-paste",[e]);return(i||!["DIV","SPAN"].includes(e.target.tagName))&&(t=!1),t}getPasteData(e){var t;return window.clipboardData&&window.clipboardData.getData?t=window.clipboardData.getData("Text"):e.clipboardData&&e.clipboardData.getData?t=e.clipboardData.getData("text/plain"):e.originalEvent&&e.originalEvent.clipboardData.getData&&(t=e.originalEvent.clipboardData.getData("text/plain")),t}};b(B,"moduleName","clipboard"),b(B,"moduleExtensions",Xt),b(B,"pasteActions",Wt),b(B,"pasteParsers",Gt);let Ce=B;class Jt{constructor(e){return this._row=e,new Proxy(this,{get:function(t,i,s){return typeof t[i]<"u"?t[i]:t._row.table.componentFunctionBinder.handle("row",t._row,i)}})}getData(e){return this._row.getData(e)}getElement(){return this._row.getElement()}getTable(){return this._row.table}getCells(){var e=[];return this._row.getCells().forEach(function(t){e.push(t.getComponent())}),e}getCell(e){var t=this._row.getCell(e);return t?t.getComponent():!1}_getSelf(){return this._row}}class st{constructor(e){return this._cell=e,new Proxy(this,{get:function(t,i,s){return typeof t[i]<"u"?t[i]:t._cell.table.componentFunctionBinder.handle("cell",t._cell,i)}})}getValue(){return this._cell.getValue()}getOldValue(){return this._cell.getOldValue()}getInitialValue(){return this._cell.initialValue}getElement(){return this._cell.getElement()}getRow(){return this._cell.row.getComponent()}getData(e){return this._cell.row.getData(e)}getType(){return"cell"}getField(){return this._cell.column.getField()}getColumn(){return this._cell.column.getComponent()}setValue(e,t){typeof t>"u"&&(t=!0),this._cell.setValue(e,t)}restoreOldValue(){this._cell.setValueActual(this._cell.getOldValue())}restoreInitialValue(){this._cell.setValueActual(this._cell.initialValue)}checkHeight(){this._cell.checkHeight()}getTable(){return this._cell.table}_getSelf(){return this._cell}}class re extends M{constructor(e,t){super(e.table),this.table=e.table,this.column=e,this.row=t,this.element=null,this.value=null,this.initialValue,this.oldValue=null,this.modules={},this.height=null,this.width=null,this.minWidth=null,this.component=null,this.loaded=!1,this.build()}build(){this.generateElement(),this.setWidth(),this._configureCell(),this.setValueActual(this.column.getFieldValue(this.row.data)),this.initialValue=this.value}generateElement(){this.element=document.createElement("div"),this.element.className="tabulator-cell",this.element.setAttribute("role","gridcell"),this.column.isRowHeader&&this.element.classList.add("tabulator-row-header")}_configureCell(){var e=this.element,t=this.column.getField(),i={top:"flex-start",bottom:"flex-end",middle:"center"},s={left:"flex-start",right:"flex-end",center:"center"};if(e.style.textAlign=this.column.hozAlign,this.column.vertAlign&&(e.style.display="inline-flex",e.style.alignItems=i[this.column.vertAlign]||"",this.column.hozAlign&&(e.style.justifyContent=s[this.column.hozAlign]||"")),t&&e.setAttribute("tabulator-field",t),this.column.definition.cssClass){var n=this.column.definition.cssClass.split(" ");n.forEach(r=>{e.classList.add(r)})}this.dispatch("cell-init",this),this.column.visible||this.hide()}_generateContents(){var e;switch(e=this.chain("cell-format",this,null,()=>this.element.innerHTML=this.value),typeof e){case"object":if(e instanceof Node){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.element.appendChild(e)}else this.element.innerHTML="",e!=null&&console.warn("Format Error - Formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:",e);break;case"undefined":this.element.innerHTML="";break;default:this.element.innerHTML=e}}cellRendered(){this.dispatch("cell-rendered",this)}getElement(e){return this.loaded||(this.loaded=!0,e||this.layoutElement()),this.element}getValue(){return this.value}getOldValue(){return this.oldValue}setValue(e,t,i){var s=this.setValueProcessData(e,t,i);s&&(this.dispatch("cell-value-updated",this),this.cellRendered(),this.column.definition.cellEdited&&this.column.definition.cellEdited.call(this.table,this.getComponent()),this.dispatchExternal("cellEdited",this.getComponent()),this.subscribedExternal("dataChanged")&&this.dispatchExternal("dataChanged",this.table.rowManager.getData()))}setValueProcessData(e,t,i){var s=!1;return(this.value!==e||i)&&(s=!0,t&&(e=this.chain("cell-value-changing",[this,e],null,e))),this.setValueActual(e),s&&this.dispatch("cell-value-changed",this),s}setValueActual(e){this.oldValue=this.value,this.value=e,this.dispatch("cell-value-save-before",this),this.column.setFieldValue(this.row.data,e),this.dispatch("cell-value-save-after",this),this.loaded&&this.layoutElement()}layoutElement(){this._generateContents(),this.dispatch("cell-layout",this)}setWidth(){this.width=this.column.width,this.element.style.width=this.column.widthStyled}clearWidth(){this.width="",this.element.style.width=""}getWidth(){return this.width||this.element.offsetWidth}setMinWidth(){this.minWidth=this.column.minWidth,this.element.style.minWidth=this.column.minWidthStyled}setMaxWidth(){this.maxWidth=this.column.maxWidth,this.element.style.maxWidth=this.column.maxWidthStyled}checkHeight(){this.row.reinitializeHeight()}clearHeight(){this.element.style.height="",this.height=null,this.dispatch("cell-height",this,"")}setHeight(){this.height=this.row.height,this.element.style.height=this.row.heightStyled,this.dispatch("cell-height",this,this.row.heightStyled)}getHeight(){return this.height||this.element.offsetHeight}show(){this.element.style.display=this.column.vertAlign?"inline-flex":""}hide(){this.element.style.display="none"}delete(){this.dispatch("cell-delete",this),!this.table.rowManager.redrawBlock&&this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.element=!1,this.column.deleteCell(this),this.row.deleteCell(this),this.calcs={}}getIndex(){return this.row.getCellIndex(this)}getComponent(){return this.component||(this.component=new st(this)),this.component}}class nt{constructor(e){return this._column=e,this.type="ColumnComponent",new Proxy(this,{get:function(t,i,s){return typeof t[i]<"u"?t[i]:t._column.table.componentFunctionBinder.handle("column",t._column,i)}})}getElement(){return this._column.getElement()}getDefinition(){return this._column.getDefinition()}getField(){return this._column.getField()}getTitleDownload(){return this._column.getTitleDownload()}getCells(){var e=[];return this._column.cells.forEach(function(t){e.push(t.getComponent())}),e}isVisible(){return this._column.visible}show(){this._column.isGroup?this._column.columns.forEach(function(e){e.show()}):this._column.show()}hide(){this._column.isGroup?this._column.columns.forEach(function(e){e.hide()}):this._column.hide()}toggle(){this._column.visible?this.hide():this.show()}delete(){return this._column.delete()}getSubColumns(){var e=[];return this._column.columns.length&&this._column.columns.forEach(function(t){e.push(t.getComponent())}),e}getParentColumn(){return this._column.getParentComponent()}_getSelf(){return this._column}scrollTo(e,t){return this._column.table.columnManager.scrollToColumn(this._column,e,t)}getTable(){return this._column.table}move(e,t){var i=this._column.table.columnManager.findColumn(e);i?this._column.table.columnManager.moveColumn(this._column,i,t):console.warn("Move Error - No matching column found:",i)}getNextColumn(){var e=this._column.nextColumn();return e?e.getComponent():!1}getPrevColumn(){var e=this._column.prevColumn();return e?e.getComponent():!1}updateDefinition(e){return this._column.updateDefinition(e)}getWidth(){return this._column.getWidth()}setWidth(e){var t;return e===!0?t=this._column.reinitializeWidth(!0):t=this._column.setWidth(e),this._column.table.columnManager.rerenderColumns(!0),t}}var rt={title:void 0,field:void 0,columns:void 0,visible:void 0,hozAlign:void 0,vertAlign:void 0,width:void 0,minWidth:40,maxWidth:void 0,maxInitialWidth:void 0,cssClass:void 0,variableHeight:void 0,headerVertical:void 0,headerHozAlign:void 0,headerWordWrap:!1,editableTitle:void 0};const G=class G extends M{constructor(e,t,i){super(t.table),this.definition=e,this.parent=t,this.type="column",this.columns=[],this.cells=[],this.isGroup=!1,this.isRowHeader=i,this.element=this.createElement(),this.contentElement=!1,this.titleHolderElement=!1,this.titleElement=!1,this.groupElement=this.createGroupElement(),this.hozAlign="",this.vertAlign="",this.field="",this.fieldStructure="",this.getFieldValue="",this.setFieldValue="",this.titleDownload=null,this.titleFormatterRendered=!1,this.mapDefinitions(),this.setField(this.definition.field),this.modules={},this.width=null,this.widthStyled="",this.maxWidth=null,this.maxWidthStyled="",this.maxInitialWidth=null,this.minWidth=null,this.minWidthStyled="",this.widthFixed=!1,this.visible=!0,this.component=null,this.definition.columns?(this.isGroup=!0,this.definition.columns.forEach((s,n)=>{var r=new G(s,this);this.attachColumn(r)}),this.checkColumnVisibility()):t.registerColumnField(this),this._initialize()}createElement(){var e=document.createElement("div");switch(e.classList.add("tabulator-col"),e.setAttribute("role","columnheader"),e.setAttribute("aria-sort","none"),this.isRowHeader&&e.classList.add("tabulator-row-header"),this.table.options.columnHeaderVertAlign){case"middle":e.style.justifyContent="center";break;case"bottom":e.style.justifyContent="flex-end";break}return e}createGroupElement(){var e=document.createElement("div");return e.classList.add("tabulator-col-group-cols"),e}mapDefinitions(){var e=this.table.options.columnDefaults;if(e)for(let t in e)typeof this.definition[t]>"u"&&(this.definition[t]=e[t]);this.definition=this.table.columnManager.optionsList.generate(G.defaultOptionList,this.definition)}checkDefinition(){Object.keys(this.definition).forEach(e=>{G.defaultOptionList.indexOf(e)===-1&&console.warn("Invalid column definition option in '"+(this.field||this.definition.title)+"' column:",e)})}setField(e){this.field=e,this.fieldStructure=e?this.table.options.nestedFieldSeparator?e.split(this.table.options.nestedFieldSeparator):[e]:[],this.getFieldValue=this.fieldStructure.length>1?this._getNestedData:this._getFlatData,this.setFieldValue=this.fieldStructure.length>1?this._setNestedData:this._setFlatData}registerColumnPosition(e){this.parent.registerColumnPosition(e)}registerColumnField(e){this.parent.registerColumnField(e)}reRegisterPosition(){this.isGroup?this.columns.forEach(function(e){e.reRegisterPosition()}):this.registerColumnPosition(this)}_initialize(){for(var e=this.definition;this.element.firstChild;)this.element.removeChild(this.element.firstChild);e.headerVertical&&(this.element.classList.add("tabulator-col-vertical"),e.headerVertical==="flip"&&this.element.classList.add("tabulator-col-vertical-flip")),this.contentElement=this._buildColumnHeaderContent(),this.element.appendChild(this.contentElement),this.isGroup?this._buildGroupHeader():this._buildColumnHeader(),this.dispatch("column-init",this)}_buildColumnHeader(){var e=this.definition;if(this.dispatch("column-layout",this),typeof e.visible<"u"&&(e.visible?this.show(!0):this.hide(!0)),e.cssClass){var t=e.cssClass.split(" ");t.forEach(i=>{this.element.classList.add(i)})}e.field&&this.element.setAttribute("tabulator-field",e.field),this.setMinWidth(parseInt(e.minWidth)),e.maxInitialWidth&&(this.maxInitialWidth=parseInt(e.maxInitialWidth)),e.maxWidth&&this.setMaxWidth(parseInt(e.maxWidth)),this.reinitializeWidth(),this.hozAlign=this.definition.hozAlign,this.vertAlign=this.definition.vertAlign,this.titleElement.style.textAlign=this.definition.headerHozAlign}_buildColumnHeaderContent(){var e=document.createElement("div");return e.classList.add("tabulator-col-content"),this.titleHolderElement=document.createElement("div"),this.titleHolderElement.classList.add("tabulator-col-title-holder"),e.appendChild(this.titleHolderElement),this.titleElement=this._buildColumnHeaderTitle(),this.titleHolderElement.appendChild(this.titleElement),e}_buildColumnHeaderTitle(){var e=this.definition,t=document.createElement("div");if(t.classList.add("tabulator-col-title"),e.headerWordWrap&&t.classList.add("tabulator-col-title-wrap"),e.editableTitle){var i=document.createElement("input");i.classList.add("tabulator-title-editor"),i.addEventListener("click",s=>{s.stopPropagation(),i.focus()}),i.addEventListener("mousedown",s=>{s.stopPropagation()}),i.addEventListener("change",()=>{e.title=i.value,this.dispatchExternal("columnTitleChanged",this.getComponent())}),t.appendChild(i),e.field?this.langBind("columns|"+e.field,s=>{i.value=s||e.title||" "}):i.value=e.title||" "}else e.field?this.langBind("columns|"+e.field,s=>{this._formatColumnHeaderTitle(t,s||e.title||" ")}):this._formatColumnHeaderTitle(t,e.title||" ");return t}_formatColumnHeaderTitle(e,t){var i=this.chain("column-format",[this,t,e],null,()=>t);switch(typeof i){case"object":i instanceof Node?e.appendChild(i):(e.innerHTML="",console.warn("Format Error - Title formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:",i));break;case"undefined":e.innerHTML="";break;default:e.innerHTML=i}}_buildGroupHeader(){if(this.element.classList.add("tabulator-col-group"),this.element.setAttribute("role","columngroup"),this.element.setAttribute("aria-title",this.definition.title),this.definition.cssClass){var e=this.definition.cssClass.split(" ");e.forEach(t=>{this.element.classList.add(t)})}this.titleElement.style.textAlign=this.definition.headerHozAlign,this.element.appendChild(this.groupElement)}_getFlatData(e){return e[this.field]}_getNestedData(e){var t=e,i=this.fieldStructure,s=i.length,n;for(let r=0;r{t.push(i),t=t.concat(i.getColumns(!0))}):t=this.columns,t}getCells(){return this.cells}getTopColumn(){return this.parent.isGroup?this.parent.getTopColumn():this}getDefinition(e){var t=[];return this.isGroup&&e&&(this.columns.forEach(function(i){t.push(i.getDefinition(!0))}),this.definition.columns=t),this.definition}checkColumnVisibility(){var e=!1;this.columns.forEach(function(t){t.visible&&(e=!0)}),e?(this.show(),this.dispatchExternal("columnVisibilityChanged",this.getComponent(),!1)):this.hide()}show(e,t){this.visible||(this.visible=!0,this.element.style.display="",this.parent.isGroup&&this.parent.checkColumnVisibility(),this.cells.forEach(function(i){i.show()}),!this.isGroup&&this.width===null&&this.reinitializeWidth(),this.table.columnManager.verticalAlignHeaders(),this.dispatch("column-show",this,t),e||this.dispatchExternal("columnVisibilityChanged",this.getComponent(),!0),this.parent.isGroup&&this.parent.matchChildWidths(),this.silent||this.table.columnManager.rerenderColumns())}hide(e,t){this.visible&&(this.visible=!1,this.element.style.display="none",this.table.columnManager.verticalAlignHeaders(),this.parent.isGroup&&this.parent.checkColumnVisibility(),this.cells.forEach(function(i){i.hide()}),this.dispatch("column-hide",this,t),e||this.dispatchExternal("columnVisibilityChanged",this.getComponent(),!1),this.parent.isGroup&&this.parent.matchChildWidths(),this.silent||this.table.columnManager.rerenderColumns())}matchChildWidths(){var e=0;this.contentElement&&this.columns.length&&(this.columns.forEach(function(t){t.visible&&(e+=t.getWidth())}),this.contentElement.style.maxWidth=e-1+"px",this.parent.isGroup&&this.parent.matchChildWidths())}removeChild(e){var t=this.columns.indexOf(e);t>-1&&this.columns.splice(t,1),this.columns.length||this.delete()}setWidth(e){this.widthFixed=!0,this.setWidthActual(e)}setWidthActual(e){isNaN(e)&&(e=Math.floor(this.table.element.clientWidth/100*parseInt(e))),e=Math.max(this.minWidth,e),this.maxWidth&&(e=Math.min(this.maxWidth,e)),this.width=e,this.widthStyled=e?e+"px":"",this.element.style.width=this.widthStyled,this.isGroup||this.cells.forEach(function(t){t.setWidth()}),this.parent.isGroup&&this.parent.matchChildWidths(),this.dispatch("column-width",this),this.subscribedExternal("columnWidth")&&this.dispatchExternal("columnWidth",this.getComponent())}checkCellHeights(){var e=[];this.cells.forEach(function(t){t.row.heightInitialized&&(t.row.getElement().offsetParent!==null?(e.push(t.row),t.row.clearCellHeight()):t.row.heightInitialized=!1)}),e.forEach(function(t){t.calcHeight()}),e.forEach(function(t){t.setCellHeight()})}getWidth(){var e=0;return this.isGroup?this.columns.forEach(function(t){t.visible&&(e+=t.getWidth())}):e=this.width,e}getLeftOffset(){var e=this.element.offsetLeft;return this.parent.isGroup&&(e+=this.parent.getLeftOffset()),e}getHeight(){return Math.ceil(this.element.getBoundingClientRect().height)}setMinWidth(e){this.maxWidth&&e>this.maxWidth&&(e=this.maxWidth,console.warn("the minWidth ("+e+"px) for column '"+this.field+"' cannot be bigger that its maxWidth ("+this.maxWidthStyled+")")),this.minWidth=e,this.minWidthStyled=e?e+"px":"",this.element.style.minWidth=this.minWidthStyled,this.cells.forEach(function(t){t.setMinWidth()})}setMaxWidth(e){this.minWidth&&e{this.isGroup&&this.columns.forEach(function(s){s.delete()}),this.dispatch("column-delete",this);var i=this.cells.length;for(let s=0;s-1?this._nextVisibleColumn(e+1):!1}_nextVisibleColumn(e){var t=this.table.columnManager.getColumnByIndex(e);return!t||t.visible?t:this._nextVisibleColumn(e+1)}prevColumn(){var e=this.table.columnManager.findColumnIndex(this);return e>-1?this._prevVisibleColumn(e-1):!1}_prevVisibleColumn(e){var t=this.table.columnManager.getColumnByIndex(e);return!t||t.visible?t:this._prevVisibleColumn(e-1)}reinitializeWidth(e){this.widthFixed=!1,typeof this.definition.width<"u"&&!e&&this.setWidth(this.definition.width),this.dispatch("column-width-fit-before",this),this.fitToData(e),this.dispatch("column-width-fit-after",this)}fitToData(e){if(!this.isGroup){this.widthFixed||(this.element.style.width="",this.cells.forEach(s=>{s.clearWidth()}));var t=this.element.offsetWidth;if((!this.width||!this.widthFixed)&&(this.cells.forEach(s=>{var n=s.getWidth();n>t&&(t=n)}),t)){var i=t+1;this.maxInitialWidth&&!e&&(i=Math.min(i,this.maxInitialWidth)),this.setWidthActual(i)}}}updateDefinition(e){var t;return this.isGroup||this.parent.isGroup?(console.error("Column Update Error - The updateDefinition function is only available on ungrouped columns"),Promise.reject("Column Update Error - The updateDefinition function is only available on columns, not column groups")):(t=Object.assign({},this.getDefinition()),t=Object.assign(t,e),this.table.columnManager.addColumn(t,!1,this).then(i=>(t.field==this.field&&(this.field=!1),this.delete().then(()=>i.getComponent()))))}deleteCell(e){var t=this.cells.indexOf(e);t>-1&&this.cells.splice(t,1)}getComponent(){return this.component||(this.component=new nt(this)),this.component}getPosition(){return this.table.columnManager.getVisibleColumnsByIndex().indexOf(this)+1}getParentComponent(){return this.parent instanceof G?this.parent.getComponent():!1}};b(G,"defaultOptionList",rt);let X=G;class he{constructor(e){return this._row=e,new Proxy(this,{get:function(t,i,s){return typeof t[i]<"u"?t[i]:t._row.table.componentFunctionBinder.handle("row",t._row,i)}})}getData(e){return this._row.getData(e)}getElement(){return this._row.getElement()}getCells(){var e=[];return this._row.getCells().forEach(function(t){e.push(t.getComponent())}),e}getCell(e){var t=this._row.getCell(e);return t?t.getComponent():!1}getIndex(){return this._row.getData("data")[this._row.table.options.index]}getPosition(){return this._row.getPosition()}watchPosition(e){return this._row.watchPosition(e)}delete(){return this._row.delete()}scrollTo(e,t){return this._row.table.rowManager.scrollToRow(this._row,e,t)}move(e,t){this._row.moveToRow(e,t)}update(e){return this._row.updateData(e)}normalizeHeight(){this._row.normalizeHeight(!0)}_getSelf(){return this._row}reformat(){return this._row.reinitialize()}getTable(){return this._row.table}getNextRow(){var e=this._row.nextRow();return e&&e.getComponent()}getPrevRow(){var e=this._row.prevRow();return e&&e.getComponent()}}class S extends M{constructor(e,t,i="row"){super(t.table),this.parent=t,this.data={},this.type=i,this.element=!1,this.modules={},this.cells=[],this.height=0,this.heightStyled="",this.manualHeight=!1,this.outerHeight=0,this.initialized=!1,this.heightInitialized=!1,this.position=0,this.positionWatchers=[],this.component=null,this.created=!1,this.setData(e)}create(){this.created||(this.created=!0,this.generateElement())}createElement(){var e=document.createElement("div");e.classList.add("tabulator-row"),e.setAttribute("role","row"),this.element=e}getElement(){return this.create(),this.element}detachElement(){this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)}generateElement(){this.createElement(),this.dispatch("row-init",this)}generateCells(){this.cells=this.table.columnManager.generateCells(this)}initialize(e,t){if(this.create(),!this.initialized||e){for(this.deleteCells();this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.dispatch("row-layout-before",this),this.generateCells(),this.initialized=!0,this.table.columnManager.renderer.renderRowCells(this,t),e&&this.normalizeHeight(),this.dispatch("row-layout",this),this.table.options.rowFormatter&&this.table.options.rowFormatter(this.getComponent()),this.dispatch("row-layout-after",this)}else this.table.columnManager.renderer.rerenderRowCells(this,t)}rendered(){this.cells.forEach(e=>{e.cellRendered()})}reinitializeHeight(){this.heightInitialized=!1,this.element&&this.element.offsetParent!==null&&this.normalizeHeight(!0)}deinitialize(){this.initialized=!1}deinitializeHeight(){this.heightInitialized=!1}reinitialize(e){this.initialized=!1,this.heightInitialized=!1,this.manualHeight||(this.height=0,this.heightStyled=""),this.element&&this.element.offsetParent!==null&&this.initialize(!0),this.dispatch("row-relayout",this)}calcHeight(e){var t=0,i=0;this.table.options.rowHeight?this.height=this.table.options.rowHeight:(i=this.calcMinHeight(),t=this.calcMaxHeight(),e?this.height=Math.max(t,i):this.height=this.manualHeight?this.height:Math.max(t,i)),this.heightStyled=this.height?this.height+"px":"",this.outerHeight=this.element.offsetHeight}calcMinHeight(){return this.table.options.resizableRows?this.element.clientHeight:0}calcMaxHeight(){var e=0;return this.cells.forEach(function(t){var i=t.getHeight();i>e&&(e=i)}),e}setCellHeight(){this.cells.forEach(function(e){e.setHeight()}),this.heightInitialized=!0}clearCellHeight(){this.cells.forEach(function(e){e.clearHeight()})}normalizeHeight(e){e&&!this.table.options.rowHeight&&this.clearCellHeight(),this.calcHeight(e),this.setCellHeight()}setHeight(e,t){(this.height!=e||t)&&(this.manualHeight=!0,this.height=e,this.heightStyled=e?e+"px":"",this.setCellHeight(),this.outerHeight=this.element.offsetHeight,this.subscribedExternal("rowHeight")&&this.dispatchExternal("rowHeight",this.getComponent()))}getHeight(){return this.outerHeight}getWidth(){return this.element.offsetWidth}deleteCell(e){var t=this.cells.indexOf(e);t>-1&&this.cells.splice(t,1)}setData(e){this.data=this.chain("row-data-init-before",[this,e],void 0,e),this.dispatch("row-data-init-after",this)}updateData(e){var t=this.element&&x.elVisible(this.element),i={},s;return new Promise((n,r)=>{typeof e=="string"&&(e=JSON.parse(e)),this.dispatch("row-data-save-before",this),this.subscribed("row-data-changing")&&(i=Object.assign(i,this.data),i=Object.assign(i,e)),s=this.chain("row-data-changing",[this,i,e],null,e);for(let o in s)this.data[o]=s[o];this.dispatch("row-data-save-after",this);for(let o in e)this.table.columnManager.getColumnsByFieldRoot(o).forEach(h=>{let d=this.getCell(h.getField());if(d){let u=h.getFieldValue(s);d.getValue()!==u&&(d.setValueProcessData(u),t&&d.cellRendered())}});t?(this.normalizeHeight(!0),this.table.options.rowFormatter&&this.table.options.rowFormatter(this.getComponent())):(this.initialized=!1,this.height=0,this.heightStyled=""),this.dispatch("row-data-changed",this,t,e),this.dispatchExternal("rowUpdated",this.getComponent()),this.subscribedExternal("dataChanged")&&this.dispatchExternal("dataChanged",this.table.rowManager.getData()),n()})}getData(e){return e?this.chain("row-data-retrieve",[this,e],null,this.data):this.data}getCell(e){var t=!1;return e=this.table.columnManager.findColumn(e),!this.initialized&&this.cells.length===0&&this.generateCells(),t=this.cells.find(function(i){return i.column===e}),t}getCellIndex(e){return this.cells.findIndex(function(t){return t===e})}findCell(e){return this.cells.find(t=>t.element===e)}getCells(){return!this.initialized&&this.cells.length===0&&this.generateCells(),this.cells}nextRow(){var e=this.table.rowManager.nextDisplayRow(this,!0);return e||!1}prevRow(){var e=this.table.rowManager.prevDisplayRow(this,!0);return e||!1}moveToRow(e,t){var i=this.table.rowManager.findRow(e);i?(this.table.rowManager.moveRowActual(this,i,!t),this.table.rowManager.refreshActiveData("display",!1,!0)):console.warn("Move Error - No matching row found:",e)}delete(){return this.dispatch("row-delete",this),this.deleteActual(),Promise.resolve()}deleteActual(e){this.detachModules(),this.table.rowManager.deleteRow(this,e),this.deleteCells(),this.initialized=!1,this.heightInitialized=!1,this.element=!1,this.dispatch("row-deleted",this)}detachModules(){this.dispatch("row-deleting",this)}deleteCells(){var e=this.cells.length;for(let t=0;t{t(this.position)}))}watchPosition(e){this.positionWatchers.push(e),e(this.position)}getGroup(){return this.modules.group||!1}getComponent(){return this.component||(this.component=new he(this)),this.component}}var Kt={avg:function(l,e,t){var i=0,s=typeof t.precision<"u"?t.precision:2;return l.length&&(i=l.reduce(function(n,r){return Number(n)+Number(r)}),i=i/l.length,i=s!==!1?i.toFixed(s):i),parseFloat(i).toString()},max:function(l,e,t){var i=null,s=typeof t.precision<"u"?t.precision:!1;return l.forEach(function(n){n=Number(n),(n>i||i===null)&&(i=n)}),i!==null?s!==!1?i.toFixed(s):i:""},min:function(l,e,t){var i=null,s=typeof t.precision<"u"?t.precision:!1;return l.forEach(function(n){n=Number(n),(n(l||s===0)&&l.indexOf(s)===n);return i.length}};const V=class V extends w{constructor(e){super(e),this.topCalcs=[],this.botCalcs=[],this.genColumn=!1,this.topElement=this.createElement(),this.botElement=this.createElement(),this.topRow=!1,this.botRow=!1,this.topInitialized=!1,this.botInitialized=!1,this.blocked=!1,this.recalcAfterBlock=!1,this.registerTableOption("columnCalcs",!0),this.registerColumnOption("topCalc"),this.registerColumnOption("topCalcParams"),this.registerColumnOption("topCalcFormatter"),this.registerColumnOption("topCalcFormatterParams"),this.registerColumnOption("bottomCalc"),this.registerColumnOption("bottomCalcParams"),this.registerColumnOption("bottomCalcFormatter"),this.registerColumnOption("bottomCalcFormatterParams")}createElement(){var e=document.createElement("div");return e.classList.add("tabulator-calcs-holder"),e}initialize(){this.genColumn=new X({field:"value"},this),this.subscribe("cell-value-changed",this.cellValueChanged.bind(this)),this.subscribe("column-init",this.initializeColumnCheck.bind(this)),this.subscribe("row-deleted",this.rowsUpdated.bind(this)),this.subscribe("scroll-horizontal",this.scrollHorizontal.bind(this)),this.subscribe("row-added",this.rowsUpdated.bind(this)),this.subscribe("column-moved",this.recalcActiveRows.bind(this)),this.subscribe("column-add",this.recalcActiveRows.bind(this)),this.subscribe("data-refreshed",this.recalcActiveRowsRefresh.bind(this)),this.subscribe("table-redraw",this.tableRedraw.bind(this)),this.subscribe("rows-visible",this.visibleRows.bind(this)),this.subscribe("scrollbar-vertical",this.adjustForScrollbar.bind(this)),this.subscribe("redraw-blocked",this.blockRedraw.bind(this)),this.subscribe("redraw-restored",this.restoreRedraw.bind(this)),this.subscribe("table-redrawing",this.resizeHolderWidth.bind(this)),this.subscribe("column-resized",this.resizeHolderWidth.bind(this)),this.subscribe("column-show",this.resizeHolderWidth.bind(this)),this.subscribe("column-hide",this.resizeHolderWidth.bind(this)),this.registerTableFunction("getCalcResults",this.getResults.bind(this)),this.registerTableFunction("recalc",this.userRecalc.bind(this)),this.resizeHolderWidth()}resizeHolderWidth(){this.topElement.style.minWidth=this.table.columnManager.headersElement.offsetWidth+"px"}tableRedraw(e){this.recalc(this.table.rowManager.activeRows),e&&this.redraw()}blockRedraw(){this.blocked=!0,this.recalcAfterBlock=!1}restoreRedraw(){this.blocked=!1,this.recalcAfterBlock&&(this.recalcAfterBlock=!1,this.recalcActiveRowsRefresh())}userRecalc(){this.recalc(this.table.rowManager.activeRows)}blockCheck(){return this.blocked&&(this.recalcAfterBlock=!0),this.blocked}visibleRows(e,t){return this.topRow&&t.unshift(this.topRow),this.botRow&&t.push(this.botRow),t}rowsUpdated(e){this.table.options.groupBy?this.recalcRowGroup(e):this.recalcActiveRows()}recalcActiveRowsRefresh(){this.table.options.groupBy&&this.table.options.dataTreeStartExpanded&&this.table.options.dataTree?this.recalcAll():this.recalcActiveRows()}recalcActiveRows(){this.recalc(this.table.rowManager.activeRows)}cellValueChanged(e){(e.column.definition.topCalc||e.column.definition.bottomCalc)&&(this.table.options.groupBy?((this.table.options.columnCalcs=="table"||this.table.options.columnCalcs=="both")&&this.recalcActiveRows(),this.table.options.columnCalcs!="table"&&this.recalcRowGroup(e.row)):this.recalcActiveRows())}initializeColumnCheck(e){(e.definition.topCalc||e.definition.bottomCalc)&&this.initializeColumn(e)}initializeColumn(e){var t=e.definition,i={topCalcParams:t.topCalcParams||{},botCalcParams:t.bottomCalcParams||{}};if(t.topCalc){switch(typeof t.topCalc){case"string":V.calculations[t.topCalc]?i.topCalc=V.calculations[t.topCalc]:console.warn("Column Calc Error - No such calculation found, ignoring: ",t.topCalc);break;case"function":i.topCalc=t.topCalc;break}i.topCalc&&(e.modules.columnCalcs=i,this.topCalcs.push(e),this.table.options.columnCalcs!="group"&&this.initializeTopRow())}if(t.bottomCalc){switch(typeof t.bottomCalc){case"string":V.calculations[t.bottomCalc]?i.botCalc=V.calculations[t.bottomCalc]:console.warn("Column Calc Error - No such calculation found, ignoring: ",t.bottomCalc);break;case"function":i.botCalc=t.bottomCalc;break}i.botCalc&&(e.modules.columnCalcs=i,this.botCalcs.push(e),this.table.options.columnCalcs!="group"&&this.initializeBottomRow())}}registerColumnField(){}removeCalcs(){var e=!1;this.topInitialized&&(this.topInitialized=!1,this.topElement.parentNode.removeChild(this.topElement),e=!0),this.botInitialized&&(this.botInitialized=!1,this.footerRemove(this.botElement),e=!0),e&&this.table.rowManager.adjustTableSize()}reinitializeCalcs(){this.topCalcs.length&&this.initializeTopRow(),this.botCalcs.length&&this.initializeBottomRow()}initializeTopRow(){var e=document.createDocumentFragment();this.topInitialized||(e.appendChild(document.createElement("br")),e.appendChild(this.topElement),this.table.columnManager.getContentsElement().insertBefore(e,this.table.columnManager.headersElement.nextSibling),this.topInitialized=!0)}initializeBottomRow(){this.botInitialized||(this.footerPrepend(this.botElement),this.botInitialized=!0)}scrollHorizontal(e){this.botInitialized&&this.botRow&&(this.botElement.scrollLeft=e)}recalc(e){var t,i;if(!this.blockCheck()&&(this.topInitialized||this.botInitialized)){if(t=this.rowsToData(e),this.topInitialized){for(this.topRow&&this.topRow.deleteCells(),i=this.generateRow("top",t),this.topRow=i;this.topElement.firstChild;)this.topElement.removeChild(this.topElement.firstChild);this.topElement.appendChild(i.getElement()),i.initialize(!0)}if(this.botInitialized){for(this.botRow&&this.botRow.deleteCells(),i=this.generateRow("bottom",t),this.botRow=i;this.botElement.firstChild;)this.botElement.removeChild(this.botElement.firstChild);this.botElement.appendChild(i.getElement()),i.initialize(!0)}this.table.rowManager.adjustTableSize(),this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layout()}}recalcRowGroup(e){this.recalcGroup(this.table.modules.groupRows.getRowGroup(e))}recalcAll(){if((this.topCalcs.length||this.botCalcs.length)&&(this.table.options.columnCalcs!=="group"&&this.recalcActiveRows(),this.table.options.groupBy&&this.table.options.columnCalcs!=="table")){var e=this.table.modules.groupRows.getChildGroups();e.forEach(t=>{this.recalcGroup(t)})}}recalcGroup(e){var t,i;this.blockCheck()||e&&e.calcs&&(e.calcs.bottom&&(t=this.rowsToData(e.rows),i=this.generateRowData("bottom",t),e.calcs.bottom.updateData(i),e.calcs.bottom.reinitialize()),e.calcs.top&&(t=this.rowsToData(e.rows),i=this.generateRowData("top",t),e.calcs.top.updateData(i),e.calcs.top.reinitialize()))}generateTopRow(e){return this.generateRow("top",this.rowsToData(e))}generateBottomRow(e){return this.generateRow("bottom",this.rowsToData(e))}rowsToData(e){var t=[],i=this.table.options.dataTree&&this.table.options.dataTreeChildColumnCalcs,s=this.table.modules.dataTree;return e.forEach(n=>{var r;t.push(n.getData()),i&&((r=n.modules.dataTree)!=null&&r.open)&&this.rowsToData(s.getFilteredTreeChildren(n)).forEach(o=>{t.push(n)})}),t}generateRow(e,t){var i=this.generateRowData(e,t),s;return this.table.modExists("mutator")&&this.table.modules.mutator.disable(),s=new S(i,this,"calc"),this.table.modExists("mutator")&&this.table.modules.mutator.enable(),s.getElement().classList.add("tabulator-calcs","tabulator-calcs-"+e),s.component=!1,s.getComponent=()=>(s.component||(s.component=new Jt(s)),s.component),s.generateCells=()=>{var n=[];this.table.columnManager.columnsByIndex.forEach(r=>{this.genColumn.setField(r.getField()),this.genColumn.hozAlign=r.hozAlign,r.definition[e+"CalcFormatter"]&&this.table.modExists("format")?this.genColumn.modules.format={formatter:this.table.modules.format.getFormatter(r.definition[e+"CalcFormatter"]),params:r.definition[e+"CalcFormatterParams"]||{}}:this.genColumn.modules.format={formatter:this.table.modules.format.getFormatter("plaintext"),params:{}},this.genColumn.definition.cssClass=r.definition.cssClass;var o=new re(this.genColumn,s);o.getElement(),o.column=r,o.setWidth(),r.cells.push(o),n.push(o),r.visible||o.hide()}),s.cells=n},s}generateRowData(e,t){var i={},s=e=="top"?this.topCalcs:this.botCalcs,n=e=="top"?"topCalc":"botCalc",r,o;return s.forEach(function(a){var h=[];a.modules.columnCalcs&&a.modules.columnCalcs[n]&&(t.forEach(function(d){h.push(a.getFieldValue(d))}),o=n+"Params",r=typeof a.modules.columnCalcs[o]=="function"?a.modules.columnCalcs[o](h,t):a.modules.columnCalcs[o],a.setFieldValue(i,a.modules.columnCalcs[n](h,t,r)))}),i}hasTopCalcs(){return!!this.topCalcs.length}hasBottomCalcs(){return!!this.botCalcs.length}redraw(){this.topRow&&this.topRow.normalizeHeight(!0),this.botRow&&this.botRow.normalizeHeight(!0)}getResults(){var e={},t;return this.table.options.groupBy&&this.table.modExists("groupRows")?(t=this.table.modules.groupRows.getGroups(!0),t.forEach(i=>{e[i.getKey()]=this.getGroupResults(i)})):e={top:this.topRow?this.topRow.getData():{},bottom:this.botRow?this.botRow.getData():{}},e}getGroupResults(e){var t=e._getSelf(),i=e.getSubGroups(),s={},n={};return i.forEach(r=>{s[r.getKey()]=this.getGroupResults(r)}),n={top:t.calcs.top?t.calcs.top.getData():{},bottom:t.calcs.bottom?t.calcs.bottom.getData():{},groups:s},n}adjustForScrollbar(e){this.botRow&&(this.table.rtl?this.botElement.style.paddingLeft=e+"px":this.botElement.style.paddingRight=e+"px")}};b(V,"moduleName","columnCalcs"),b(V,"calculations",Kt);let Ee=V;class ot extends w{constructor(e){super(e),this.indent=10,this.field="",this.collapseEl=null,this.expandEl=null,this.branchEl=null,this.elementField=!1,this.startOpen=function(){},this.registerTableOption("dataTree",!1),this.registerTableOption("dataTreeFilter",!0),this.registerTableOption("dataTreeSort",!0),this.registerTableOption("dataTreeElementColumn",!1),this.registerTableOption("dataTreeBranchElement",!0),this.registerTableOption("dataTreeChildIndent",9),this.registerTableOption("dataTreeChildField","_children"),this.registerTableOption("dataTreeCollapseElement",!1),this.registerTableOption("dataTreeExpandElement",!1),this.registerTableOption("dataTreeStartExpanded",!1),this.registerTableOption("dataTreeChildColumnCalcs",!1),this.registerTableOption("dataTreeSelectPropagate",!1),this.registerComponentFunction("row","treeCollapse",this.collapseRow.bind(this)),this.registerComponentFunction("row","treeExpand",this.expandRow.bind(this)),this.registerComponentFunction("row","treeToggle",this.toggleRow.bind(this)),this.registerComponentFunction("row","getTreeParent",this.getTreeParent.bind(this)),this.registerComponentFunction("row","getTreeChildren",this.getRowChildren.bind(this)),this.registerComponentFunction("row","addTreeChild",this.addTreeChildRow.bind(this)),this.registerComponentFunction("row","isTreeExpanded",this.isRowExpanded.bind(this))}initialize(){if(this.table.options.dataTree){var e=null,t=this.table.options;switch(this.field=t.dataTreeChildField,this.indent=t.dataTreeChildIndent,this.options("movableRows")&&console.warn("The movableRows option is not available with dataTree enabled, moving of child rows could result in unpredictable behavior"),t.dataTreeBranchElement?t.dataTreeBranchElement===!0?(this.branchEl=document.createElement("div"),this.branchEl.classList.add("tabulator-data-tree-branch")):typeof t.dataTreeBranchElement=="string"?(e=document.createElement("div"),e.innerHTML=t.dataTreeBranchElement,this.branchEl=e.firstChild):this.branchEl=t.dataTreeBranchElement:(this.branchEl=document.createElement("div"),this.branchEl.classList.add("tabulator-data-tree-branch-empty")),t.dataTreeCollapseElement?typeof t.dataTreeCollapseElement=="string"?(e=document.createElement("div"),e.innerHTML=t.dataTreeCollapseElement,this.collapseEl=e.firstChild):this.collapseEl=t.dataTreeCollapseElement:(this.collapseEl=document.createElement("div"),this.collapseEl.classList.add("tabulator-data-tree-control"),this.collapseEl.tabIndex=0,this.collapseEl.innerHTML="
"),t.dataTreeExpandElement?typeof t.dataTreeExpandElement=="string"?(e=document.createElement("div"),e.innerHTML=t.dataTreeExpandElement,this.expandEl=e.firstChild):this.expandEl=t.dataTreeExpandElement:(this.expandEl=document.createElement("div"),this.expandEl.classList.add("tabulator-data-tree-control"),this.expandEl.tabIndex=0,this.expandEl.innerHTML="
"),typeof t.dataTreeStartExpanded){case"boolean":this.startOpen=function(i,s){return t.dataTreeStartExpanded};break;case"function":this.startOpen=t.dataTreeStartExpanded;break;default:this.startOpen=function(i,s){return t.dataTreeStartExpanded[s]};break}this.subscribe("row-init",this.initializeRow.bind(this)),this.subscribe("row-layout-after",this.layoutRow.bind(this)),this.subscribe("row-deleted",this.rowDelete.bind(this),0),this.subscribe("row-data-changed",this.rowDataChanged.bind(this),10),this.subscribe("cell-value-updated",this.cellValueChanged.bind(this)),this.subscribe("edit-cancelled",this.cellValueChanged.bind(this)),this.subscribe("column-moving-rows",this.columnMoving.bind(this)),this.subscribe("table-built",this.initializeElementField.bind(this)),this.subscribe("table-redrawing",this.tableRedrawing.bind(this)),this.registerDisplayHandler(this.getRows.bind(this),30)}}tableRedrawing(e){var t;e&&(t=this.table.rowManager.getRows(),t.forEach(i=>{this.reinitializeRowChildren(i)}))}initializeElementField(){var e=this.table.columnManager.getFirstVisibleColumn();this.elementField=this.table.options.dataTreeElementColumn||(e?e.field:!1)}getRowChildren(e){return this.getTreeChildren(e,!0)}columnMoving(){var e=[];return this.table.rowManager.rows.forEach(t=>{e=e.concat(this.getTreeChildren(t,!1,!0))}),e}rowDataChanged(e,t,i){this.redrawNeeded(i)&&(this.initializeRow(e),t&&(this.layoutRow(e),this.refreshData(!0)))}cellValueChanged(e){var t=e.column.getField();t===this.elementField&&this.layoutRow(e.row)}initializeRow(e){var t=e.getData()[this.field],i=Array.isArray(t),s=i||!i&&typeof t=="object"&&t!==null;!s&&e.modules.dataTree&&e.modules.dataTree.branchEl&&e.modules.dataTree.branchEl.parentNode.removeChild(e.modules.dataTree.branchEl),!s&&e.modules.dataTree&&e.modules.dataTree.controlEl&&e.modules.dataTree.controlEl.parentNode.removeChild(e.modules.dataTree.controlEl),e.modules.dataTree={index:e.modules.dataTree?e.modules.dataTree.index:0,open:s?e.modules.dataTree?e.modules.dataTree.open:this.startOpen(e.getComponent(),0):!1,controlEl:e.modules.dataTree&&s?e.modules.dataTree.controlEl:!1,branchEl:e.modules.dataTree&&s?e.modules.dataTree.branchEl:!1,parent:e.modules.dataTree?e.modules.dataTree.parent:!1,children:s}}reinitializeRowChildren(e){var t=this.getTreeChildren(e,!1,!0);t.forEach(function(i){i.reinitialize(!0)})}layoutRow(e){var t=this.elementField?e.getCell(this.elementField):e.getCells()[0],i=t.getElement(),s=e.modules.dataTree;s.branchEl&&(s.branchEl.parentNode&&s.branchEl.parentNode.removeChild(s.branchEl),s.branchEl=!1),s.controlEl&&(s.controlEl.parentNode&&s.controlEl.parentNode.removeChild(s.controlEl),s.controlEl=!1),this.generateControlElement(e,i),e.getElement().classList.add("tabulator-tree-level-"+s.index),s.index&&(this.branchEl?(s.branchEl=this.branchEl.cloneNode(!0),i.insertBefore(s.branchEl,i.firstChild),this.table.rtl?s.branchEl.style.marginRight=(s.branchEl.offsetWidth+s.branchEl.style.marginLeft)*(s.index-1)+s.index*this.indent+"px":s.branchEl.style.marginLeft=(s.branchEl.offsetWidth+s.branchEl.style.marginRight)*(s.index-1)+s.index*this.indent+"px"):this.table.rtl?i.style.paddingRight=parseInt(window.getComputedStyle(i,null).getPropertyValue("padding-right"))+s.index*this.indent+"px":i.style.paddingLeft=parseInt(window.getComputedStyle(i,null).getPropertyValue("padding-left"))+s.index*this.indent+"px")}generateControlElement(e,t){var i=e.modules.dataTree,s=i.controlEl;t=t||e.getCells()[0].getElement(),i.children!==!1&&(i.open?(i.controlEl=this.collapseEl.cloneNode(!0),i.controlEl.addEventListener("click",n=>{n.stopPropagation(),this.collapseRow(e)})):(i.controlEl=this.expandEl.cloneNode(!0),i.controlEl.addEventListener("click",n=>{n.stopPropagation(),this.expandRow(e)})),i.controlEl.addEventListener("mousedown",n=>{n.stopPropagation()}),s&&s.parentNode===t?s.parentNode.replaceChild(i.controlEl,s):t.insertBefore(i.controlEl,t.firstChild))}getRows(e){var t=[];return e.forEach((i,s)=>{var n,r;t.push(i),i instanceof S&&(i.create(),n=i.modules.dataTree,!n.index&&n.children!==!1&&(r=this.getChildren(i,!1,!0),r.forEach(o=>{o.create(),t.push(o)})))}),t}getChildren(e,t,i){var s=e.modules.dataTree,n=[],r=[];return s.children!==!1&&(s.open||t)&&(Array.isArray(s.children)||(s.children=this.generateChildren(e)),this.table.modExists("filter")&&this.table.options.dataTreeFilter?n=this.table.modules.filter.filter(s.children):n=s.children,this.table.modExists("sort")&&this.table.options.dataTreeSort&&this.table.modules.sort.sort(n,i),n.forEach(o=>{r.push(o);var a=this.getChildren(o,!1,!0);a.forEach(h=>{r.push(h)})})),r}generateChildren(e){var t=[],i=e.getData()[this.field];return Array.isArray(i)||(i=[i]),i.forEach(s=>{var n=new S(s||{},this.table.rowManager);n.create(),n.modules.dataTree.index=e.modules.dataTree.index+1,n.modules.dataTree.parent=e,n.modules.dataTree.children&&(n.modules.dataTree.open=this.startOpen(n.getComponent(),n.modules.dataTree.index)),t.push(n)}),t}expandRow(e,t){var i=e.modules.dataTree;i.children!==!1&&(i.open=!0,e.reinitialize(),this.refreshData(!0),this.dispatchExternal("dataTreeRowExpanded",e.getComponent(),e.modules.dataTree.index))}collapseRow(e){var t=e.modules.dataTree;t.children!==!1&&(t.open=!1,e.reinitialize(),this.refreshData(!0),this.dispatchExternal("dataTreeRowCollapsed",e.getComponent(),e.modules.dataTree.index))}toggleRow(e){var t=e.modules.dataTree;t.children!==!1&&(t.open?this.collapseRow(e):this.expandRow(e))}isRowExpanded(e){return e.modules.dataTree.open}getTreeParent(e){return e.modules.dataTree.parent?e.modules.dataTree.parent.getComponent():!1}getTreeParentRoot(e){return e.modules.dataTree&&e.modules.dataTree.parent?this.getTreeParentRoot(e.modules.dataTree.parent):e}getFilteredTreeChildren(e){var t=e.modules.dataTree,i=[],s;return t.children&&(Array.isArray(t.children)||(t.children=this.generateChildren(e)),this.table.modExists("filter")&&this.table.options.dataTreeFilter?s=this.table.modules.filter.filter(t.children):s=t.children,s.forEach(n=>{n instanceof S&&i.push(n)})),i}rowDelete(e){var t=e.modules.dataTree.parent,i;t&&(i=this.findChildIndex(e,t),i!==!1&&t.data[this.field].splice(i,1),t.data[this.field].length||delete t.data[this.field],this.initializeRow(t),this.layoutRow(t)),this.refreshData(!0)}addTreeChildRow(e,t,i,s){var n=!1;typeof t=="string"&&(t=JSON.parse(t)),Array.isArray(e.data[this.field])||(e.data[this.field]=[],e.modules.dataTree.open=this.startOpen(e.getComponent(),e.modules.dataTree.index)),typeof s<"u"&&(n=this.findChildIndex(s,e),n!==!1&&e.data[this.field].splice(i?n:n+1,0,t)),n===!1&&(i?e.data[this.field].unshift(t):e.data[this.field].push(t)),this.initializeRow(e),this.layoutRow(e),this.refreshData(!0)}findChildIndex(e,t){var i=!1;return typeof e=="object"?e instanceof S?i=e.data:e instanceof he?i=e._getSelf().data:typeof HTMLElement<"u"&&e instanceof HTMLElement?t.modules.dataTree&&(i=t.modules.dataTree.children.find(s=>s instanceof S?s.element===e:!1),i&&(i=i.data)):e===null&&(i=!1):typeof e>"u"?i=!1:i=t.data[this.field].find(s=>s.data[this.table.options.index]==e),i&&(Array.isArray(t.data[this.field])&&(i=t.data[this.field].indexOf(i)),i==-1&&(i=!1)),i}getTreeChildren(e,t,i){var s=e.modules.dataTree,n=[];return s&&s.children&&(Array.isArray(s.children)||(s.children=this.generateChildren(e)),s.children.forEach(r=>{r instanceof S&&(n.push(t?r.getComponent():r),i&&this.getTreeChildren(r,t,i).forEach(o=>{n.push(o)}))})),n}getChildField(){return this.field}redrawNeeded(e){return(this.field?typeof e[this.field]<"u":!1)||(this.elementField?typeof e[this.elementField]<"u":!1)}}b(ot,"moduleName","dataTree");function qt(l,e={},t){var i=e.delimiter?e.delimiter:",",s=[],n=[];l.forEach(r=>{var o=[];switch(r.type){case"group":console.warn("Download Warning - CSV downloader cannot process row groups");break;case"calc":console.warn("Download Warning - CSV downloader cannot process column calculations");break;case"header":r.columns.forEach((a,h)=>{a&&a.depth===1&&(n[h]=typeof a.value>"u"||a.value===null?"":'"'+String(a.value).split('"').join('""')+'"')});break;case"row":r.columns.forEach(a=>{if(a){switch(typeof a.value){case"object":a.value=a.value!==null?JSON.stringify(a.value):"";break;case"undefined":a.value="";break}o.push('"'+String(a.value).split('"').join('""')+'"')}}),s.push(o.join(i));break}}),n.length&&s.unshift(n.join(i)),s=s.join(` `),e.bom&&(s="\uFEFF"+s),t(s,"text/csv")}function Yt(l,e,t){var i=[];l.forEach(s=>{var n={};switch(s.type){case"header":break;case"group":console.warn("Download Warning - JSON downloader cannot process row groups");break;case"calc":console.warn("Download Warning - JSON downloader cannot process column calculations");break;case"row":s.columns.forEach(r=>{r&&(n[r.component.getTitleDownload()||r.component.getField()]=r.value)}),i.push(n);break}}),i=JSON.stringify(i,null," "),t(i,"application/json")}function $t(l,e={},t){var i=[],s=[],n={},r=e.rowGroupStyles||{fontStyle:"bold",fontSize:12,cellPadding:6,fillColor:220},o=e.rowCalcStyles||{fontStyle:"bold",fontSize:10,cellPadding:4,fillColor:232},a=e.jsPDF||{},h=e.title?e.title:"";a.orientation||(a.orientation=e.orientation||"landscape"),a.unit||(a.unit="pt"),l.forEach(c=>{switch(c.type){case"header":i.push(d(c));break;case"group":s.push(d(c,r));break;case"calc":s.push(d(c,o));break;case"row":s.push(d(c));break}});function d(c,f){var g=[];return c.columns.forEach(p=>{var v;if(p){switch(typeof p.value){case"object":p.value=p.value!==null?JSON.stringify(p.value):"";break;case"undefined":p.value="";break}v={content:p.value,colSpan:p.width,rowSpan:p.height},f&&(v.styles=f),g.push(v)}}),g}var u=new jspdf.jsPDF(a);e.autoTable&&(typeof e.autoTable=="function"?n=e.autoTable(u)||{}:n=e.autoTable),h&&(n.didDrawPage=function(c){u.text(h,40,30)}),n.head=i,n.body=s,u.autoTable(n),e.documentProcessing&&e.documentProcessing(u),t(u.output("arraybuffer"),"application/pdf")}function Qt(l,e,t){var i=this,s=e.sheetName||"Sheet1",n=XLSX.utils.book_new(),r=new M(this),o="compress"in e?e.compress:!0,a=e.writeOptions||{bookType:"xlsx",bookSST:!0,compression:o},h;a.type="binary",n.SheetNames=[],n.Sheets={};function d(){var f=[],g=[],p={},v={s:{c:0,r:0},e:{c:l[0]?l[0].columns.reduce((m,C)=>m+(C&&C.width?C.width:1),0):0,r:l.length}};return l.forEach((m,C)=>{var T=[];m.columns.forEach(function(y,k){y?(T.push(!(y.value instanceof Date)&&typeof y.value=="object"?JSON.stringify(y.value):y.value),(y.width>1||y.height>-1)&&(y.height>1||y.width>1)&&g.push({s:{r:C,c:k},e:{r:C+y.height-1,c:k+y.width-1}})):T.push("")}),f.push(T)}),XLSX.utils.sheet_add_aoa(p,f),p["!ref"]=XLSX.utils.encode_range(v),g.length&&(p["!merges"]=g),p}if(e.sheetOnly){t(d());return}if(e.sheets)for(var u in e.sheets)e.sheets[u]===!0?(n.SheetNames.push(u),n.Sheets[u]=d()):(n.SheetNames.push(u),r.commsSend(e.sheets[u],"download","intercept",{type:"xlsx",options:{sheetOnly:!0},active:i.active,intercept:function(f){n.Sheets[u]=f}}));else n.SheetNames.push(s),n.Sheets[s]=d();e.documentProcessing&&(n=e.documentProcessing(n));function c(f){for(var g=new ArrayBuffer(f.length),p=new Uint8Array(g),v=0;v!=f.length;++v)p[v]=f.charCodeAt(v)&255;return g}h=XLSX.write(n,a),t(c(h),"application/octet-stream")}function Zt(l,e,t){this.modExists("export",!0)&&t(this.modules.export.generateHTMLTable(l),"text/html")}function ei(l,e,t){const i=[];l.forEach(s=>{const n={};switch(s.type){case"header":break;case"group":console.warn("Download Warning - JSON downloader cannot process row groups");break;case"calc":console.warn("Download Warning - JSON downloader cannot process column calculations");break;case"row":s.columns.forEach(r=>{r&&(n[r.component.getTitleDownload()||r.component.getField()]=r.value)}),i.push(JSON.stringify(n));break}}),t(i.join(` diff --git a/src/main/resources/static/assets/WorkflowForm-pY442Q74.js b/src/main/resources/static/assets/WorkflowForm-D9_x4AT4.js similarity index 99% rename from src/main/resources/static/assets/WorkflowForm-pY442Q74.js rename to src/main/resources/static/assets/WorkflowForm-D9_x4AT4.js index b307499..542fde1 100644 --- a/src/main/resources/static/assets/WorkflowForm-pY442Q74.js +++ b/src/main/resources/static/assets/WorkflowForm-D9_x4AT4.js @@ -1,4 +1,4 @@ -import{d as bi,p as Ts,q as kc,s as Dm,x as Fm,y as Wm,z as Nm,A as Rc,r as $n,w as Bm,o as Ws,h as ht,a as ft,b as Me,t as vi,B as nt,j as Ic,i as Qn,C as Pm,D as Ni,F as Yr,f as Xr,E as Oc,u as Dc,G as Hm,H as zm,I as Um,J as Gm,K as Vm,e as mc,g as Km,v as Ym}from"./index-7DKFovtK.js";import{f as Xm}from"./oss-Duyjg-W4.js";import{_ as Ns,c as jm,g as Zm,P as Qm,e as Jm,f as qm,u as ew,h as tw}from"./ParamForm-GfNtapPc.js";import"./request-DpggpHyD.js";/*! +import{d as bi,p as Ts,q as kc,s as Dm,x as Fm,y as Wm,z as Nm,A as Rc,r as $n,w as Bm,o as Ws,h as ht,a as ft,b as Me,t as vi,B as nt,j as Ic,i as Qn,C as Pm,D as Ni,F as Yr,f as Xr,E as Oc,u as Dc,G as Hm,H as zm,I as Um,J as Gm,K as Vm,e as mc,g as Km,v as Ym}from"./index-BVWm2Zu7.js";import{f as Xm}from"./oss-jllykI1q.js";import{_ as Ns,c as jm,g as Zm,P as Qm,e as Jm,f as qm,u as ew,h as tw}from"./ParamForm-B0X0LuP1.js";import"./request-a_yWYQ73.js";/*! * vue-draggable-next v2.2.0 * (c) 2023 Anish George * @license MIT diff --git a/src/main/resources/static/assets/WorkflowList-CGtSpEBv.js b/src/main/resources/static/assets/WorkflowList-DDPYhQ5l.js similarity index 95% rename from src/main/resources/static/assets/WorkflowList-CGtSpEBv.js rename to src/main/resources/static/assets/WorkflowList-DDPYhQ5l.js index 7bec8ef..bc6a1bd 100644 --- a/src/main/resources/static/assets/WorkflowList-CGtSpEBv.js +++ b/src/main/resources/static/assets/WorkflowList-DDPYhQ5l.js @@ -1,4 +1,4 @@ -import{_ as W,a as I}from"./Tabulator.vue_vue_type_style_index_0_lang-DQj6hD_W.js";import{d as N,P as D,r as L,g as B,a as F,b as P}from"./ParamForm-GfNtapPc.js";import{d as h,u as v,a as c,b as t,t as x,h as i,c as $,r as w,w as C,k as R,j as g,l as E,F as T,f as V,o as A,m as y,i as b}from"./index-7DKFovtK.js";import"./request-DpggpHyD.js";const G={class:"modal",id:"deleteWorkflow",tabindex:"-1"},j={class:"modal-dialog modal-lg",role:"document"},M={class:"modal-content"},O=t("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"},null,-1),S=t("div",{class:"modal-status bg-danger"},null,-1),U={class:"modal-body text-left py-4"},q=t("h3",{class:"mb-5"}," Delete Workflow ",-1),z={class:"modal-footer"},H=t("a",{href:"#",class:"btn btn-link link-secondary","data-bs-dismiss":"modal"}," Cancel ",-1),J=h({__name:"DeleteWorkflow",props:{workflowName:{},workflowIdx:{}},emits:["get-workflow-list"],setup(f,{emit:m}){const d=v(),a=f,l=m,s=async()=>{const{data:n}=await N(a.workflowIdx);n?d.success("삭제되었습니다."):d.error("삭제하지 못했습니다."),l("get-workflow-list")};return(n,u)=>(i(),c("div",G,[t("div",j,[t("div",M,[O,S,t("div",U,[q,t("h4",null,"Are you sure you want to delete "+x(a.workflowName)+"?",1)]),t("div",z,[H,t("a",{href:"#",class:"btn btn-primary ms-auto","data-bs-dismiss":"modal",onClick:u[0]||(u[0]=e=>s())}," Delete ")])])])]))}}),K={class:"modal",id:"runWorkflow",tabindex:"-1"},Q={class:"modal-dialog modal-lg",role:"document"},X={class:"modal-content"},Y=t("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"},null,-1),Z=t("div",{class:"modal-status bg-danger"},null,-1),tt={class:"modal-body text-left py-4"},ot=t("h3",{class:"mb-5"}," Run Workflow ",-1),st={class:"modal-footer"},et=t("a",{href:"#",class:"btn btn-link link-secondary","data-bs-dismiss":"modal"}," Cancel ",-1),at=h({__name:"RunWorkflow",props:{workflowIdx:{}},emits:["get-workflow-list"],setup(f,{emit:m}){const d=v(),a=f,l=m,s=$(()=>a.workflowIdx),n=w({});C(()=>s.value,async()=>{const{data:e}=await B(s.value,"N");n.value=e});const u=async()=>{const{data:e}=await L(n.value);e?d.success("실행되었습니다."):d.error("실행하지 못했습니다."),l("get-workflow-list")};return(e,_)=>(i(),c("div",K,[t("div",Q,[t("div",X,[Y,Z,t("div",tt,[ot,n.value.workflowParams?(i(),R(D,{key:0,popup:!0,"workflow-param-data":n.value.workflowParams},null,8,["workflow-param-data"])):g("",!0)]),t("div",st,[et,t("a",{href:"#",class:"btn btn-primary ms-auto","data-bs-dismiss":"modal",onClick:_[0]||(_[0]=o=>u())}," Run ")])])])]))}}),lt={class:"modal",id:"workflowLog",tabindex:"-1"},nt={class:"modal-dialog modal-xl",role:"document"},dt={class:"modal-content"},it=t("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"},null,-1),rt={class:"modal-body text-left py-4"},ct={class:"mb-5"},ut={key:0,class:"spinner-border",role:"status"},wt=t("span",{class:"visually-hidden"},"Loading...",-1),mt=[wt],ft={key:0},_t=t("p",{class:"text-secondary"},"No Data",-1),kt=[_t],bt={class:"card mb-3"},ht=["onClick"],vt={class:"card-title"},pt={key:0,class:"card-body"},gt=["value"],yt=h({__name:"WorkflowLog",props:{workflowIdx:{}},emits:["get-oss-list"],setup(f,{emit:m}){v();const d=f,a=w(!1),l=$(()=>d.workflowIdx);C(l,async()=>{a.value=!1,await n()});const s=w([]),n=async()=>{s.value=[],await F(l.value).then(({data:o})=>{s.value=o,a.value=!0})},u=()=>{s.value=[],e.value=1},e=w(1),_=o=>{e.value===o?e.value=0:e.value=o};return(o,k)=>(i(),c("div",lt,[t("div",nt,[t("div",dt,[it,t("div",rt,[t("h3",ct,[E(" Workflow Log "),a.value?g("",!0):(i(),c("div",ut,mt))]),t("div",null,[s.value.length<=0?(i(),c("div",ft,kt)):(i(!0),c(T,{key:1},V(s.value,r=>(i(),c("div",{key:r.buildIdx},[t("div",bt,[t("div",{class:"card-header",onClick:p=>_(r.buildIdx),style:{cursor:"pointer"}},[t("h3",vt,x(r.buildIdx),1)],8,ht),e.value===r.buildIdx?(i(),c("div",pt,[t("textarea",{value:r.buildLog,disabled:"",style:{width:"100%"},rows:"20"},null,8,gt)])):g("",!0)])]))),128))])]),t("div",{class:"modal-footer"},[t("a",{href:"#",class:"btn btn-link link-secondary","data-bs-dismiss":"modal",onClick:u}," Cancel ")])])])]))}}),xt={class:"card card-flush w-100"},Nt=h({__name:"WorkflowList",setup(f){v();const m=w([]),d=w([]);A(async()=>{n(),await a()});const a=async()=>{try{const{data:o}=await P("N");m.value=o}catch(o){console.log(o)}},l=w(0),s=w(""),n=()=>{d.value=[{title:"Workflow Name",field:"workflowInfo.workflowName",width:500},{title:"Workflow Purpose",field:"workflowInfo.workflowPurpose",width:200},{title:"Params Count",formatter:e,width:400},{title:"Created Date",field:"regDate",width:400},{title:"Action",width:400,formatter:_,cellClick:async(o,k)=>{const r=o.target,p=r==null?void 0:r.getAttribute("id");l.value=k.getRow().getData().workflowInfo.workflowIdx,p==="edit-btn"?y.push("/web/workflow/edit/"+l.value):p==="delete-btn"&&(s.value=k.getRow().getData().workflowInfo.workflowName)}}]},u=()=>{y.push("/web/workflow/new")},e=o=>`${o._cell.row.data.workflowParams.length}`,_=()=>` +import{_ as W,a as I}from"./Tabulator.vue_vue_type_style_index_0_lang-C7rKatiE.js";import{d as N,P as D,r as L,g as B,a as F,b as P}from"./ParamForm-B0X0LuP1.js";import{d as h,u as v,a as c,b as t,t as x,h as i,c as $,r as w,w as C,k as R,j as g,l as E,F as T,f as V,o as A,m as y,i as b}from"./index-BVWm2Zu7.js";import"./request-a_yWYQ73.js";const G={class:"modal",id:"deleteWorkflow",tabindex:"-1"},j={class:"modal-dialog modal-lg",role:"document"},M={class:"modal-content"},O=t("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"},null,-1),S=t("div",{class:"modal-status bg-danger"},null,-1),U={class:"modal-body text-left py-4"},q=t("h3",{class:"mb-5"}," Delete Workflow ",-1),z={class:"modal-footer"},H=t("a",{href:"#",class:"btn btn-link link-secondary","data-bs-dismiss":"modal"}," Cancel ",-1),J=h({__name:"DeleteWorkflow",props:{workflowName:{},workflowIdx:{}},emits:["get-workflow-list"],setup(f,{emit:m}){const d=v(),a=f,l=m,s=async()=>{const{data:n}=await N(a.workflowIdx);n?d.success("삭제되었습니다."):d.error("삭제하지 못했습니다."),l("get-workflow-list")};return(n,u)=>(i(),c("div",G,[t("div",j,[t("div",M,[O,S,t("div",U,[q,t("h4",null,"Are you sure you want to delete "+x(a.workflowName)+"?",1)]),t("div",z,[H,t("a",{href:"#",class:"btn btn-primary ms-auto","data-bs-dismiss":"modal",onClick:u[0]||(u[0]=e=>s())}," Delete ")])])])]))}}),K={class:"modal",id:"runWorkflow",tabindex:"-1"},Q={class:"modal-dialog modal-lg",role:"document"},X={class:"modal-content"},Y=t("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"},null,-1),Z=t("div",{class:"modal-status bg-danger"},null,-1),tt={class:"modal-body text-left py-4"},ot=t("h3",{class:"mb-5"}," Run Workflow ",-1),st={class:"modal-footer"},et=t("a",{href:"#",class:"btn btn-link link-secondary","data-bs-dismiss":"modal"}," Cancel ",-1),at=h({__name:"RunWorkflow",props:{workflowIdx:{}},emits:["get-workflow-list"],setup(f,{emit:m}){const d=v(),a=f,l=m,s=$(()=>a.workflowIdx),n=w({});C(()=>s.value,async()=>{const{data:e}=await B(s.value,"N");n.value=e});const u=async()=>{const{data:e}=await L(n.value);e?d.success("실행되었습니다."):d.error("실행하지 못했습니다."),l("get-workflow-list")};return(e,_)=>(i(),c("div",K,[t("div",Q,[t("div",X,[Y,Z,t("div",tt,[ot,n.value.workflowParams?(i(),R(D,{key:0,popup:!0,"workflow-param-data":n.value.workflowParams},null,8,["workflow-param-data"])):g("",!0)]),t("div",st,[et,t("a",{href:"#",class:"btn btn-primary ms-auto","data-bs-dismiss":"modal",onClick:_[0]||(_[0]=o=>u())}," Run ")])])])]))}}),lt={class:"modal",id:"workflowLog",tabindex:"-1"},nt={class:"modal-dialog modal-xl",role:"document"},dt={class:"modal-content"},it=t("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"},null,-1),rt={class:"modal-body text-left py-4"},ct={class:"mb-5"},ut={key:0,class:"spinner-border",role:"status"},wt=t("span",{class:"visually-hidden"},"Loading...",-1),mt=[wt],ft={key:0},_t=t("p",{class:"text-secondary"},"No Data",-1),kt=[_t],bt={class:"card mb-3"},ht=["onClick"],vt={class:"card-title"},pt={key:0,class:"card-body"},gt=["value"],yt=h({__name:"WorkflowLog",props:{workflowIdx:{}},emits:["get-oss-list"],setup(f,{emit:m}){v();const d=f,a=w(!1),l=$(()=>d.workflowIdx);C(l,async()=>{a.value=!1,await n()});const s=w([]),n=async()=>{s.value=[],await F(l.value).then(({data:o})=>{s.value=o,a.value=!0})},u=()=>{s.value=[],e.value=1},e=w(1),_=o=>{e.value===o?e.value=0:e.value=o};return(o,k)=>(i(),c("div",lt,[t("div",nt,[t("div",dt,[it,t("div",rt,[t("h3",ct,[E(" Workflow Log "),a.value?g("",!0):(i(),c("div",ut,mt))]),t("div",null,[s.value.length<=0?(i(),c("div",ft,kt)):(i(!0),c(T,{key:1},V(s.value,r=>(i(),c("div",{key:r.buildIdx},[t("div",bt,[t("div",{class:"card-header",onClick:p=>_(r.buildIdx),style:{cursor:"pointer"}},[t("h3",vt,x(r.buildIdx),1)],8,ht),e.value===r.buildIdx?(i(),c("div",pt,[t("textarea",{value:r.buildLog,disabled:"",style:{width:"100%"},rows:"20"},null,8,gt)])):g("",!0)])]))),128))])]),t("div",{class:"modal-footer"},[t("a",{href:"#",class:"btn btn-link link-secondary","data-bs-dismiss":"modal",onClick:u}," Cancel ")])])])]))}}),xt={class:"card card-flush w-100"},Nt=h({__name:"WorkflowList",setup(f){v();const m=w([]),d=w([]);A(async()=>{n(),await a()});const a=async()=>{try{const{data:o}=await P("N");m.value=o}catch(o){console.log(o)}},l=w(0),s=w(""),n=()=>{d.value=[{title:"Workflow Name",field:"workflowInfo.workflowName",width:500},{title:"Workflow Purpose",field:"workflowInfo.workflowPurpose",width:200},{title:"Params Count",formatter:e,width:400},{title:"Created Date",field:"regDate",width:400},{title:"Action",width:400,formatter:_,cellClick:async(o,k)=>{const r=o.target,p=r==null?void 0:r.getAttribute("id");l.value=k.getRow().getData().workflowInfo.workflowIdx,p==="edit-btn"?y.push("/web/workflow/edit/"+l.value):p==="delete-btn"&&(s.value=k.getRow().getData().workflowInfo.workflowName)}}]},u=()=>{y.push("/web/workflow/new")},e=o=>`${o._cell.row.data.workflowParams.length}`,_=()=>`