@opengis/admin 0.1.63 → 0.1.65
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/{add-page-LONm322L.js → add-page-Dl_bGhPC.js} +1 -1
- package/dist/{admin-interface-eocB4uF3.js → admin-interface-Dma-D4A9.js} +1 -1
- package/dist/{admin-view-CEePX3t5.js → admin-view-TeTAUVK1.js} +1 -1
- package/dist/admin.js +1 -1
- package/dist/admin.umd.cjs +1 -1
- package/dist/{card-page-CnQufGpK.js → card-page-D-3aubBo.js} +1 -1
- package/dist/{card-view-MKU1ijjK.js → card-view-CZjPaUKx.js} +1 -1
- package/dist/{edit-page-C1wXXuPF.js → edit-page-RhKgRai9.js} +1 -1
- package/dist/{import-file-BkyTVz51.js → import-file-DgJqxKyF.js} +2228 -2228
- package/package.json +1 -1
- package/server/plugins/hook.js +5 -3
- package/server/routes/templates/controllers/getTemplate.js +2 -1
@@ -1,4 +1,4 @@
|
|
1
|
-
import { _ as m, u as b, a as c } from "./import-file-
|
1
|
+
import { _ as m, u as b, a as c } from "./import-file-DgJqxKyF.js";
|
2
2
|
import { resolveComponent as h, openBlock as i, createElementBlock as d, createElementVNode as a, createBlock as p, createCommentVNode as f } from "vue";
|
3
3
|
const g = {
|
4
4
|
data() {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { _ as m, b as ue, a as A, c as he, d as pe, e as be, f as fe, I as me, u as te } from "./import-file-
|
1
|
+
import { _ as m, b as ue, a as A, c as he, d as pe, e as be, f as fe, I as me, u as te } from "./import-file-DgJqxKyF.js";
|
2
2
|
import { openBlock as s, createElementBlock as i, createTextVNode as F, toDisplayString as I, createCommentVNode as v, createStaticVNode as j, Fragment as C, createElementVNode as l, resolveComponent as c, createVNode as b, withCtx as y, createBlock as x, withModifiers as ge, renderList as T, withDirectives as z, vModelCheckbox as xe, resolveDynamicComponent as ye, Transition as P, renderSlot as _e, vShow as ne, normalizeClass as S, normalizeStyle as re } from "vue";
|
3
3
|
const ke = {
|
4
4
|
data() {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { _ as v, I as F, u as B, V as P, a as O } from "./import-file-
|
1
|
+
import { _ as v, I as F, u as B, V as P, a as O } from "./import-file-DgJqxKyF.js";
|
2
2
|
import { openBlock as s, createElementBlock as r, createElementVNode as t, createStaticVNode as R, resolveComponent as b, normalizeClass as E, createTextVNode as M, toDisplayString as y, createVNode as u, Transition as T, withCtx as $, withDirectives as q, Fragment as N, renderList as S, vShow as G, ref as D, createCommentVNode as V, watch as J, onBeforeUnmount as K, createBlock as W, withModifiers as X } from "vue";
|
3
3
|
const Y = {}, ee = {
|
4
4
|
xmlns: "http://www.w3.org/2000/svg",
|
package/dist/admin.js
CHANGED
package/dist/admin.umd.cjs
CHANGED
@@ -33,7 +33,7 @@ Use slot props instead:
|
|
33
33
|
- Location:`,Te),G({});let Ke;if(Te.path!=null)process.env.NODE_ENV!=="production"&&"params"in Te&&!("name"in Te)&&Object.keys(Te.params).length&&tn(`Path "${Te.path}" was passed with params but they will be ignored. Use a named route alongside params instead.`),Ke=wn({},Te,{path:gg(n,Te.path,Ue.path).path});else{const At=wn({},Te.params);for(const cn in At)At[cn]==null&&delete At[cn];Ke=wn({},Te,{params:E(At)}),Ue.params=E(Ue.params)}const ct=e.resolve(Ke,Ue),Lt=Te.hash||"";process.env.NODE_ENV!=="production"&&Lt&&!Lt.startsWith("#")&&tn(`A \`hash\` should always start with the character "#". Replace "${Lt}" with "#${Lt}".`),ct.params=S(C(ct.params));const sn=pM(i,wn({},Te,{hash:aM(Lt),path:ct.path})),Dt=r.createHref(sn);return process.env.NODE_ENV!=="production"&&(Dt.startsWith("//")?tn(`Location "${Te}" resolved to "${Dt}". A resolved location cannot start with multiple slashes.`):ct.matched.length||tn(`No match found for location with path "${Te.path!=null?Te.path:Te}"`)),wn({fullPath:sn,hash:Lt,query:i===kx?GM(Te.query):Te.query||{}},ct,{redirectedFrom:void 0,href:Dt})}function ie(Te){return typeof Te=="string"?gg(n,Te,g.value.path):wn({},Te)}function le(Te,Ue){if(b!==Te)return fc(8,{from:Ue,to:Te})}function J(Te){return Ae(Te)}function Ce(Te){return J(wn(ie(Te),{replace:!0}))}function xe(Te){const Ue=Te.matched[Te.matched.length-1];if(Ue&&Ue.redirect){const{redirect:Ke}=Ue;let ct=typeof Ke=="function"?Ke(Te):Ke;if(typeof ct=="string"&&(ct=ct.includes("?")||ct.includes("#")?ct=ie(ct):{path:ct},ct.params={}),process.env.NODE_ENV!=="production"&&ct.path==null&&!("name"in ct))throw tn(`Invalid redirect found:
|
34
34
|
${JSON.stringify(ct,null,2)}
|
35
35
|
when navigating to "${Te.fullPath}". A redirect must contain a name or path. This will break in production.`),new Error("Invalid redirect");return wn({query:Te.query,hash:Te.hash,params:ct.path!=null?{}:Te.params},ct)}}function Ae(Te,Ue){const Ke=b=G(Te),ct=g.value,Lt=Te.state,sn=Te.force,Dt=Te.replace===!0,At=xe(Ke);if(At)return Ae(wn(ie(At),{state:typeof At=="object"?wn({},Lt,At.state):Lt,force:sn,replace:Dt}),Ue||Ke);const cn=Ke;cn.redirectedFrom=Ue;let ke;return!sn&&ax(i,ct,Ke)&&(ke=fc(16,{to:cn,from:ct}),En(ct,ct,!0,!1)),(ke?Promise.resolve(ke):Xe(cn,ct)).catch(Cn=>vo(Cn)?vo(Cn,2)?Cn:Tt(Cn):Kt(Cn,cn,ct)).then(Cn=>{if(Cn){if(vo(Cn,2))return process.env.NODE_ENV!=="production"&&ax(i,G(Cn.to),cn)&&Ue&&(Ue._count=Ue._count?Ue._count+1:1)>30?(tn(`Detected a possibly infinite redirection in a navigation guard when going from "${ct.fullPath}" to "${cn.fullPath}". Aborting to avoid a Stack Overflow.
|
36
|
-
Are you always returning a new location within a navigation guard? That would lead to this error. Only return when redirecting or aborting, that should fix this. This might break in production if not fixed.`),Promise.reject(new Error("Infinite redirect in navigation guard"))):Ae(wn({replace:Dt},ie(Cn.to),{state:typeof Cn.to=="object"?wn({},Lt,Cn.to.state):Lt,force:sn}),Ue||cn)}else Cn=Rt(cn,ct,!0,Dt,Lt);return rt(cn,ct,Cn),Cn})}function $e(Te,Ue){const Ke=le(Te,Ue);return Ke?Promise.reject(Ke):Promise.resolve()}function Pe(Te){const Ue=Bn.values().next().value;return Ue&&typeof Ue.runWithContext=="function"?Ue.runWithContext(Te):Te()}function Xe(Te,Ue){let Ke;const[ct,Lt,sn]=fA(Te,Ue);Ke=wg(ct.reverse(),"beforeRouteLeave",Te,Ue);for(const At of ct)At.leaveGuards.forEach(cn=>{Ke.push(oa(cn,Te,Ue))});const Dt=$e.bind(null,Te,Ue);return Ke.push(Dt),qn(Ke).then(()=>{Ke=[];for(const At of a.list())Ke.push(oa(At,Te,Ue));return Ke.push(Dt),qn(Ke)}).then(()=>{Ke=wg(Lt,"beforeRouteUpdate",Te,Ue);for(const At of Lt)At.updateGuards.forEach(cn=>{Ke.push(oa(cn,Te,Ue))});return Ke.push(Dt),qn(Ke)}).then(()=>{Ke=[];for(const At of sn)if(At.beforeEnter)if(Hr(At.beforeEnter))for(const cn of At.beforeEnter)Ke.push(oa(cn,Te,Ue));else Ke.push(oa(At.beforeEnter,Te,Ue));return Ke.push(Dt),qn(Ke)}).then(()=>(Te.matched.forEach(At=>At.enterCallbacks={}),Ke=wg(sn,"beforeRouteEnter",Te,Ue,Pe),Ke.push(Dt),qn(Ke))).then(()=>{Ke=[];for(const At of u.list())Ke.push(oa(At,Te,Ue));return Ke.push(Dt),qn(Ke)}).catch(At=>vo(At,8)?At:Promise.reject(At))}function rt(Te,Ue,Ke){l.list().forEach(ct=>Pe(()=>ct(Te,Ue,Ke)))}function Rt(Te,Ue,Ke,ct,Lt){const sn=le(Te,Ue);if(sn)return sn;const Dt=Ue===sa,At=xo?history.state:{};Ke&&(ct||Dt?r.replace(Te.fullPath,wn({scroll:Dt&&At&&At.scroll},Lt)):r.push(Te.fullPath,Lt)),g.value=Te,En(Te,Ue,Ke,Dt),Tt()}let dt;function Nt(){dt||(dt=r.listen((Te,Ue,Ke)=>{if(!Pn.listening)return;const ct=G(Te),Lt=xe(ct);if(Lt){Ae(wn(Lt,{replace:!0}),ct).catch(Ju);return}b=ct;const sn=g.value;xo&&vM(ux(sn.fullPath,Ke.delta),dp()),Xe(ct,sn).catch(Dt=>vo(Dt,12)?Dt:vo(Dt,2)?(Ae(Dt.to,ct).then(At=>{vo(At,20)&&!Ke.delta&&Ke.type===Qu.pop&&r.go(-1,!1)}).catch(Ju),Promise.reject()):(Ke.delta&&r.go(-Ke.delta,!1),Kt(Dt,ct,sn))).then(Dt=>{Dt=Dt||Rt(ct,sn,!1),Dt&&(Ke.delta&&!vo(Dt,8)?r.go(-Ke.delta,!1):Ke.type===Qu.pop&&vo(Dt,20)&&r.go(-1,!1)),rt(ct,sn,Dt)}).catch(Ju)}))}let Xt=th(),rn=th(),jt;function Kt(Te,Ue,Ke){Tt(Te);const ct=rn.list();return ct.length?ct.forEach(Lt=>Lt(Te,Ue,Ke)):(process.env.NODE_ENV!=="production"&&tn("uncaught error during route navigation:"),console.error(Te)),Promise.reject(Te)}function Sn(){return jt&&g.value!==sa?Promise.resolve():new Promise((Te,Ue)=>{Xt.add([Te,Ue])})}function Tt(Te){return jt||(jt=!Te,Nt(),Xt.list().forEach(([Ue,Ke])=>Te?Ke(Te):Ue()),Xt.reset()),Te}function En(Te,Ue,Ke,ct){const{scrollBehavior:Lt}=t;if(!xo||!Lt)return Promise.resolve();const sn=!Ke&&wM(ux(Te.fullPath,0))||(ct||!Ke)&&history.state&&history.state.scroll||null;return m.nextTick().then(()=>Lt(Te,Ue,sn)).then(Dt=>Dt&&xM(Dt)).catch(Dt=>Kt(Dt,Te,Ue))}const dn=Te=>r.go(Te);let ti;const Bn=new Set,Pn={currentRoute:g,listening:!0,addRoute:P,removeRoute:D,clearRoutes:e.clearRoutes,hasRoute:j,getRoutes:F,resolve:G,options:t,push:J,replace:Ce,go:dn,back:()=>dn(-1),forward:()=>dn(1),beforeEach:a.add,beforeResolve:u.add,afterEach:l.add,onError:rn.add,isReady:Sn,install(Te){const Ue=this;Te.component("RouterLink",XM),Te.component("RouterView",eA),Te.config.globalProperties.$router=Ue,Object.defineProperty(Te.config.globalProperties,"$route",{enumerable:!0,get:()=>m.unref(g)}),xo&&!ti&&g.value===sa&&(ti=!0,J(r.location).catch(Lt=>{process.env.NODE_ENV!=="production"&&tn("Unexpected error when starting the router:",Lt)}));const Ke={};for(const Lt in sa)Object.defineProperty(Ke,Lt,{get:()=>g.value[Lt],enumerable:!0});Te.provide(fp,Ue),Te.provide(xg,m.shallowReactive(Ke)),Te.provide(vg,g);const ct=Te.unmount;Bn.add(Te),Te.unmount=function(){Bn.delete(Te),Bn.size<1&&(b=sa,dt&&dt(),dt=null,g.value=sa,ti=!1,jt=!1),ct()},process.env.NODE_ENV!=="production"&&xo&&iA(Te,Ue,e)}};function qn(Te){return Te.reduce((Ue,Ke)=>Ue.then(()=>Pe(Ke)),Promise.resolve())}return Pn}function fA(t,e){const n=[],i=[],r=[],a=Math.max(e.matched.length,t.matched.length);for(let u=0;u<a;u++){const l=e.matched[u];l&&(t.matched.find(b=>ra(b,l))?i.push(l):n.push(l));const g=t.matched[u];g&&(e.matched.find(b=>ra(b,g))||r.push(g))}return[n,i,r]}function mA(){return m.inject(fp)}function gA(t){return m.inject(xg)}const yA=[{name:"edit",path:"/edit",component:()=>Promise.resolve().then(()=>rj)},{name:"add",path:"/add",component:()=>Promise.resolve().then(()=>dj)},{name:"card-view",path:"/card",component:()=>Promise.resolve().then(()=>MS),children:[{name:"table",path:":table",component:()=>Promise.resolve().then(()=>MS),children:[{name:"card",path:":id",component:()=>Promise.resolve().then(()=>Nj)}]}]}],_A={},bA={class:"bg-gray-200 w-full px-16 md:px-0 h-screen flex items-center justify-center"},xA={class:"bg-white border border-gray-200 flex flex-col items-center justify-center px-4 md:px-8 lg:px-24 py-8 rounded-lg shadow-2xl"};function vA(t,e,n,i,r,a){return m.openBlock(),m.createElementBlock("div",bA,[m.createElementVNode("div",xA,[e[2]||(e[2]=m.createElementVNode("p",{class:"text-6xl md:text-7xl lg:text-9xl font-bold tracking-wider text-gray-300"}," 404 ",-1)),e[3]||(e[3]=m.createElementVNode("p",{class:"text-2xl md:text-3xl lg:text-5xl font-bold tracking-wider text-gray-500 mt-4"}," Сторінку не знайдено ",-1)),e[4]||(e[4]=m.createElementVNode("p",{class:"text-gray-500 mt-4 pb-4 border-b-2 text-center"}," Вибачте, така сторінка не існує ",-1)),m.createElementVNode("div",{onClick:e[0]||(e[0]=u=>t.$router.push("/")),class:"flex cursor-pointer items-center space-x-2 bg-blue-600 hover:bg-blue-700 text-gray-100 px-4 py-2 mt-6 rounded transition duration-150",title:"Return Home"},e[1]||(e[1]=[m.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor"},[m.createElementVNode("path",{"fill-rule":"evenodd",d:"M9.707 14.707a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 1.414L7.414 9H15a1 1 0 110 2H7.414l2.293 2.293a1 1 0 010 1.414z","clip-rule":"evenodd"})],-1),m.createElementVNode("span",null,"Повернутись на головну",-1)]))])])}const wA=Fe(_A,[["render",vA]]),kA=t=>{const e=yA.map(i=>({...i}));return{router:pA({history:CM(),routes:[{path:"/404",name:"404",component:wA},{path:"/",name:"home",component:()=>Promise.resolve().then(()=>u9),children:[...e,...t,{path:"/:catchAll(.*)",component:()=>Promise.resolve().then(()=>DH)}]}]}),routerData:e}},SA={props:{value:{type:null,default:()=>""},data:{type:Object},table:{type:String},name:String,edit:{type:null,default:()=>!1},column:Object},methods:{async changeData(t){var e;try{await gt.put(`/api/table/${this.table}/${(e=this.data)==null?void 0:e.id}`,{...this.data,[this.name]:t}),await this.$emit("update-table")}catch(n){console.log(n)}}}},EA={class:"underline text-start decoration-dashed"},CA={key:1,class:"text-start"};function TA(t,e,n,i,r,a){var l,g;const u=m.resolveComponent("VsInlineEdit");return n.edit?(m.openBlock(),m.createBlock(u,{key:0,"model-value":n.value,onUpdateValue:a.changeData,title:((l=n.column)==null?void 0:l.ua)||((g=n.column)==null?void 0:g.text)},{default:m.withCtx(()=>[m.createElementVNode("button",EA,m.toDisplayString(n.value),1)]),_:1},8,["model-value","onUpdateValue","title"])):(m.openBlock(),m.createElementBlock("div",CA,m.toDisplayString(n.value),1))}const Bx=Fe(SA,[["render",TA]]),MA={},AA={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round"};function IA(t,e,n,i,r,a){return m.openBlock(),m.createElementBlock("svg",AA,e[0]||(e[0]=[m.createElementVNode("path",{d:"M20 6 9 17l-5-5"},null,-1)]))}const PA=Fe(MA,[["render",IA]]),DA={class:"w-[170px]"},OA={key:0,class:"p-1 border-b border-gray-200 dark:border-neutral-800"},zA={class:"grid gap-y-0.5 p-1 max-h-[220px] overflow-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},NA=["value","onChange"],BA={class:"text-sm text-gray-800 ms-2"},RA={key:0,class:"flex items-center px-3 text-[13px] py-1 rounded-md cursor-pointer group"},Rx={__name:"admin-badge-edit",props:{options:Array,value:String},emits:["update:value"],setup(t,{emit:e}){const n=e,i=t,r=m.ref(i.value),a=m.ref(""),u=m.useTemplateRef("popover"),l=m.computed(()=>{var b;return(b=i.options)==null?void 0:b.filter(S=>{var E,C,P;return(P=(E=S==null?void 0:S.text)==null?void 0:E.toLowerCase())==null?void 0:P.includes((C=a.value)==null?void 0:C.toLowerCase())})}),g=b=>{r.value===b?r.value="":r.value=b,n("update:value",r),u.value.togglePopover()};return(b,S)=>{const E=m.resolveComponent("VsPopover");return m.openBlock(),m.createBlock(E,{ref_key:"popover",ref:u},{reference:m.withCtx(()=>[m.renderSlot(b.$slots,"default")]),default:m.withCtx(()=>{var C,P;return[m.createElementVNode("div",DA,[((C=t.options)==null?void 0:C.length)>6?(m.openBlock(),m.createElementBlock("div",OA,[m.withDirectives(m.createElementVNode("input",{"onUpdate:modelValue":S[0]||(S[0]=D=>a.value=D),type:"text",placeholder:"Пошук",class:"py-1.5 px-3 block w-full bg-gray-100 border-transparent rounded-lg text-sm placeholder:text-gray-500 focus:outline-none focus:border-teal-500 focus:ring-teal-500 focus:bg-white disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-transparent dark:text-neutral-400 dark:placeholder:text-neutral-400 dark:focus:ring-neutral-600 dark:focus:bg-neutral-900"},null,512),[[m.vModelText,a.value]])])):m.createCommentVNode("",!0),m.createElementVNode("div",zA,[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(l.value,D=>(m.openBlock(),m.createElementBlock("label",{key:D==null?void 0:D.id,class:m.normalizeClass(["flex items-center px-3 py-1 rounded-md cursor-pointer group hover:bg-gray-100",{"bg-gray-100":r.value===(D==null?void 0:D.id)}])},[m.withDirectives(m.createElementVNode("input",{"onUpdate:modelValue":S[1]||(S[1]=F=>r.value=F),value:D==null?void 0:D.id,type:"checkbox",class:"w-1 h-3 border-0 rounded-full appearance-none shrink-0 checked:bg-none",style:m.normalizeStyle({backgroundColor:(D==null?void 0:D.color)||"#ffffff"}),onChange:F=>g(D==null?void 0:D.id)},null,44,NA),[[m.vModelCheckbox,r.value]]),m.createElementVNode("span",BA,m.toDisplayString(D==null?void 0:D.text),1),r.value===(D==null?void 0:D.id)?(m.openBlock(),m.createBlock(PA,{key:0,class:"ml-auto size-3 shrink-0"})):m.createCommentVNode("",!0)],2))),128)),(P=l.value)!=null&&P.length?m.createCommentVNode("",!0):(m.openBlock(),m.createElementBlock("div",RA," Нічього не знайдено "))])])]}),_:3},512)}}},LA={components:{AdminBadgeEdit:Rx},props:{value:{type:[String,Number],default:()=>""},data:Object,name:String,table:String,column:Object,edit:{type:null,default:()=>!1}},computed:{getData(){var t;return(t=this.data)==null?void 0:t[this.name+"_data"]}},watch:{value(t){typeof t=="string"&&this.changeData(t)}},data(){var t,e;return{optionsList:[],value:(e=(t=this.data)==null?void 0:t[this.name+"_data"])==null?void 0:e.id}},methods:{async getOptions(){var t;try{const{data:e}=await gt.get(`/api/suggest/${(t=this.column)==null?void 0:t.data}`);this.optionsList=e}catch{}},getBGColor(t){if(t!=null&&t.includes("#")){let e;if(/^#([A-Fa-f0-9]{3}){1,2}$/.test(t))return e=t.substring(1).split(""),e.length==3&&(e=[e[0],e[0],e[1],e[1],e[2],e[2]]),e="0x"+e.join(""),"rgba("+[e>>16&255,e>>8&255,e&255].join(",")+",0.2)";throw new Error("Bad Hex")}else if(typeof t=="string"){const e=document.createElement("div");e.style.color=t,document.body.appendChild(e);const n=getComputedStyle(e).color;return document.body.removeChild(e),n.replace("rgb","rgba").replace(")",", 0.2)")}else throw new Error("Invalid color format")},async changeData(t){var e;try{await gt.put(`/api/table/${this.table}/${(e=this.data)==null?void 0:e.id}`,{...this.data,[this.name]:t}),await this.$emit("update-table")}catch(n){console.log(n)}}}},VA={key:1},FA={key:1,class:"flex justify-start w-full"},$A={key:1};function jA(t,e,n,i,r,a){var l,g,b;const u=m.resolveComponent("AdminBadgeEdit");return n.edit?(m.openBlock(),m.createBlock(u,{key:0,options:r.optionsList,value:r.value,"onUpdate:value":e[1]||(e[1]=S=>r.value=S)},{default:m.withCtx(()=>{var S,E,C;return[m.createElementVNode("div",{class:"flex justify-start w-full cursor-pointer",onClick:e[0]||(e[0]=(...P)=>a.getOptions&&a.getOptions(...P))},[a.getData?(m.openBlock(),m.createElementBlock("div",{key:0,class:"py-1 px-2.5 inline-flex items-center gap-x-1.5 text-xs font-medium bg-green-100 text-green-800 rounded-full",style:m.normalizeStyle({backgroundColor:a.getBGColor((S=a.getData)==null?void 0:S.color),color:(E=a.getData)==null?void 0:E.color})},m.toDisplayString((C=a.getData)==null?void 0:C.text),5)):(m.openBlock(),m.createElementBlock("div",VA,"-"))])]}),_:1},8,["options","value"])):(m.openBlock(),m.createElementBlock("div",FA,[a.getData?(m.openBlock(),m.createElementBlock("div",{key:0,class:"py-1 px-2.5 inline-flex items-center gap-x-1.5 text-xs font-medium bg-green-100 text-green-800 rounded-full",style:m.normalizeStyle({backgroundColor:a.getBGColor((l=a.getData)==null?void 0:l.color),color:(g=a.getData)==null?void 0:g.color})},m.toDisplayString((b=a.getData)==null?void 0:b.text),5)):(m.openBlock(),m.createElementBlock("div",$A,"-"))]))}const UA=Fe(LA,[["render",jA]]),HA={},qA={xmlns:"http://www.w3.org/2000/svg",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-check"};function WA(t,e,n,i,r,a){return m.openBlock(),m.createElementBlock("svg",qA,e[0]||(e[0]=[m.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),m.createElementVNode("path",{d:"M5 12l5 5l10 -10"},null,-1)]))}const Lx=Fe(HA,[["render",WA]]),GA={components:{IconCheck:Lx},props:{value:Boolean}},ZA={class:"px-[20px]"},YA={key:1};function XA(t,e,n,i,r,a){const u=m.resolveComponent("IconCheck");return m.openBlock(),m.createElementBlock("div",ZA,[n.value?(m.openBlock(),m.createBlock(u,{key:0,height:"24",width:"24",class:"text-blue-500"})):(m.openBlock(),m.createElementBlock("div",YA))])}const Vx=Fe(GA,[["render",XA]]),KA={components:{AdminBadgeEdit:Rx},props:{data:Object,name:String,column:Object,table:String,edit:{type:Boolean,default:()=>!1}},data(){var t,e;return{optionsList:[],value:(e=(t=this.data)==null?void 0:t[this.name+"_data"])==null?void 0:e.id}},watch:{value(t){typeof t=="string"&&this.changeData(t)}},computed:{getData(){var t,e,n;return((e=(t=this.data)==null?void 0:t[this.name+"_data"])==null?void 0:e.text)||((n=this.data)==null?void 0:n[this.name+"_text"])}},methods:{async getOptions(){var t;try{const{data:e}=await gt.get(`/api/suggest/${(t=this.column)==null?void 0:t.data}`);this.optionsList=e}catch{}},async changeData(t){var e;try{await gt.put(`/api/table/${this.table}/${(e=this.data)==null?void 0:e.id}`,{...this.data,[this.name]:t}),await this.$emit("update-table")}catch(n){console.log(n)}}}},JA={class:""},QA={key:1,class:"cursor-pointer"},eI={key:1,class:"cursor-pointer"},tI={key:0},nI={key:1},iI={key:1};function rI(t,e,n,i,r,a){const u=m.resolveComponent("AdminBadgeEdit");return m.openBlock(),m.createElementBlock("div",JA,[n.edit?(m.openBlock(),m.createBlock(u,{key:0,options:r.optionsList,value:r.value,"onUpdate:value":e[1]||(e[1]=l=>r.value=l)},{default:m.withCtx(()=>[a.getData?(m.openBlock(),m.createElementBlock("div",{key:0,onClick:e[0]||(e[0]=(...l)=>a.getOptions&&a.getOptions(...l))},[typeof a.getData=="object"?(m.openBlock(!0),m.createElementBlock(m.Fragment,{key:0},m.renderList(a.getData,(l,g)=>(m.openBlock(),m.createElementBlock("div",{key:g,class:"cursor-pointer"},m.toDisplayString(l),1))),128)):(m.openBlock(),m.createElementBlock("div",QA,m.toDisplayString(a.getData),1))])):(m.openBlock(),m.createElementBlock("div",eI,"-"))]),_:1},8,["options","value"])):(m.openBlock(),m.createElementBlock(m.Fragment,{key:1},[a.getData?(m.openBlock(),m.createElementBlock("div",tI,[typeof a.getData=="object"?(m.openBlock(!0),m.createElementBlock(m.Fragment,{key:0},m.renderList(a.getData,(l,g)=>(m.openBlock(),m.createElementBlock("div",{key:g},m.toDisplayString(l),1))),128)):(m.openBlock(),m.createElementBlock("div",nI,m.toDisplayString(a.getData),1))])):(m.openBlock(),m.createElementBlock("div",iI,"-"))],64))])}const sI=Fe(KA,[["render",rI]]),oI={props:{value:{type:[String,Number],default:()=>""},data:Object,name:String},computed:{getData(){var t,e;return((t=this.data)==null?void 0:t[this.name])||((e=this.data)==null?void 0:e[this.name+"_data"])}},methods:{}},aI={class:"w-full flex justify-start"},lI={key:0,class:"js-clipboard [--is-toggle-tooltip:false] hs-tooltip p-2 bg-stone-100 text-stone-800 text-xs rounded-md cursor-pointer"},cI={key:1};function uI(t,e,n,i,r,a){return m.openBlock(),m.createElementBlock("div",aI,[a.getData?(m.openBlock(),m.createElementBlock("div",lI,m.toDisplayString(a.getData),1)):(m.openBlock(),m.createElementBlock("div",cI,"-"))])}const hI=Fe(oI,[["render",uI]]);//! moment.js
|
36
|
+
Are you always returning a new location within a navigation guard? That would lead to this error. Only return when redirecting or aborting, that should fix this. This might break in production if not fixed.`),Promise.reject(new Error("Infinite redirect in navigation guard"))):Ae(wn({replace:Dt},ie(Cn.to),{state:typeof Cn.to=="object"?wn({},Lt,Cn.to.state):Lt,force:sn}),Ue||cn)}else Cn=Rt(cn,ct,!0,Dt,Lt);return rt(cn,ct,Cn),Cn})}function $e(Te,Ue){const Ke=le(Te,Ue);return Ke?Promise.reject(Ke):Promise.resolve()}function Pe(Te){const Ue=Bn.values().next().value;return Ue&&typeof Ue.runWithContext=="function"?Ue.runWithContext(Te):Te()}function Xe(Te,Ue){let Ke;const[ct,Lt,sn]=fA(Te,Ue);Ke=wg(ct.reverse(),"beforeRouteLeave",Te,Ue);for(const At of ct)At.leaveGuards.forEach(cn=>{Ke.push(oa(cn,Te,Ue))});const Dt=$e.bind(null,Te,Ue);return Ke.push(Dt),qn(Ke).then(()=>{Ke=[];for(const At of a.list())Ke.push(oa(At,Te,Ue));return Ke.push(Dt),qn(Ke)}).then(()=>{Ke=wg(Lt,"beforeRouteUpdate",Te,Ue);for(const At of Lt)At.updateGuards.forEach(cn=>{Ke.push(oa(cn,Te,Ue))});return Ke.push(Dt),qn(Ke)}).then(()=>{Ke=[];for(const At of sn)if(At.beforeEnter)if(Hr(At.beforeEnter))for(const cn of At.beforeEnter)Ke.push(oa(cn,Te,Ue));else Ke.push(oa(At.beforeEnter,Te,Ue));return Ke.push(Dt),qn(Ke)}).then(()=>(Te.matched.forEach(At=>At.enterCallbacks={}),Ke=wg(sn,"beforeRouteEnter",Te,Ue,Pe),Ke.push(Dt),qn(Ke))).then(()=>{Ke=[];for(const At of u.list())Ke.push(oa(At,Te,Ue));return Ke.push(Dt),qn(Ke)}).catch(At=>vo(At,8)?At:Promise.reject(At))}function rt(Te,Ue,Ke){l.list().forEach(ct=>Pe(()=>ct(Te,Ue,Ke)))}function Rt(Te,Ue,Ke,ct,Lt){const sn=le(Te,Ue);if(sn)return sn;const Dt=Ue===sa,At=xo?history.state:{};Ke&&(ct||Dt?r.replace(Te.fullPath,wn({scroll:Dt&&At&&At.scroll},Lt)):r.push(Te.fullPath,Lt)),g.value=Te,En(Te,Ue,Ke,Dt),Tt()}let dt;function Nt(){dt||(dt=r.listen((Te,Ue,Ke)=>{if(!Pn.listening)return;const ct=G(Te),Lt=xe(ct);if(Lt){Ae(wn(Lt,{replace:!0}),ct).catch(Ju);return}b=ct;const sn=g.value;xo&&vM(ux(sn.fullPath,Ke.delta),dp()),Xe(ct,sn).catch(Dt=>vo(Dt,12)?Dt:vo(Dt,2)?(Ae(Dt.to,ct).then(At=>{vo(At,20)&&!Ke.delta&&Ke.type===Qu.pop&&r.go(-1,!1)}).catch(Ju),Promise.reject()):(Ke.delta&&r.go(-Ke.delta,!1),Kt(Dt,ct,sn))).then(Dt=>{Dt=Dt||Rt(ct,sn,!1),Dt&&(Ke.delta&&!vo(Dt,8)?r.go(-Ke.delta,!1):Ke.type===Qu.pop&&vo(Dt,20)&&r.go(-1,!1)),rt(ct,sn,Dt)}).catch(Ju)}))}let Xt=th(),rn=th(),jt;function Kt(Te,Ue,Ke){Tt(Te);const ct=rn.list();return ct.length?ct.forEach(Lt=>Lt(Te,Ue,Ke)):(process.env.NODE_ENV!=="production"&&tn("uncaught error during route navigation:"),console.error(Te)),Promise.reject(Te)}function Sn(){return jt&&g.value!==sa?Promise.resolve():new Promise((Te,Ue)=>{Xt.add([Te,Ue])})}function Tt(Te){return jt||(jt=!Te,Nt(),Xt.list().forEach(([Ue,Ke])=>Te?Ke(Te):Ue()),Xt.reset()),Te}function En(Te,Ue,Ke,ct){const{scrollBehavior:Lt}=t;if(!xo||!Lt)return Promise.resolve();const sn=!Ke&&wM(ux(Te.fullPath,0))||(ct||!Ke)&&history.state&&history.state.scroll||null;return m.nextTick().then(()=>Lt(Te,Ue,sn)).then(Dt=>Dt&&xM(Dt)).catch(Dt=>Kt(Dt,Te,Ue))}const dn=Te=>r.go(Te);let ti;const Bn=new Set,Pn={currentRoute:g,listening:!0,addRoute:P,removeRoute:D,clearRoutes:e.clearRoutes,hasRoute:j,getRoutes:F,resolve:G,options:t,push:J,replace:Ce,go:dn,back:()=>dn(-1),forward:()=>dn(1),beforeEach:a.add,beforeResolve:u.add,afterEach:l.add,onError:rn.add,isReady:Sn,install(Te){const Ue=this;Te.component("RouterLink",XM),Te.component("RouterView",eA),Te.config.globalProperties.$router=Ue,Object.defineProperty(Te.config.globalProperties,"$route",{enumerable:!0,get:()=>m.unref(g)}),xo&&!ti&&g.value===sa&&(ti=!0,J(r.location).catch(Lt=>{process.env.NODE_ENV!=="production"&&tn("Unexpected error when starting the router:",Lt)}));const Ke={};for(const Lt in sa)Object.defineProperty(Ke,Lt,{get:()=>g.value[Lt],enumerable:!0});Te.provide(fp,Ue),Te.provide(xg,m.shallowReactive(Ke)),Te.provide(vg,g);const ct=Te.unmount;Bn.add(Te),Te.unmount=function(){Bn.delete(Te),Bn.size<1&&(b=sa,dt&&dt(),dt=null,g.value=sa,ti=!1,jt=!1),ct()},process.env.NODE_ENV!=="production"&&xo&&iA(Te,Ue,e)}};function qn(Te){return Te.reduce((Ue,Ke)=>Ue.then(()=>Pe(Ke)),Promise.resolve())}return Pn}function fA(t,e){const n=[],i=[],r=[],a=Math.max(e.matched.length,t.matched.length);for(let u=0;u<a;u++){const l=e.matched[u];l&&(t.matched.find(b=>ra(b,l))?i.push(l):n.push(l));const g=t.matched[u];g&&(e.matched.find(b=>ra(b,g))||r.push(g))}return[n,i,r]}function mA(){return m.inject(fp)}function gA(t){return m.inject(xg)}const yA=[{name:"edit",path:"/edit",component:()=>Promise.resolve().then(()=>rj)},{name:"add",path:"/add",component:()=>Promise.resolve().then(()=>dj)},{name:"card-view",path:"/card",component:()=>Promise.resolve().then(()=>MS),children:[{name:"table",path:":table",component:()=>Promise.resolve().then(()=>MS),children:[{name:"card",path:":id",component:()=>Promise.resolve().then(()=>Nj)}]}]}],_A={},bA={class:"bg-gray-200 w-full px-16 md:px-0 h-screen flex items-center justify-center"},xA={class:"bg-white border border-gray-200 flex flex-col items-center justify-center px-4 md:px-8 lg:px-24 py-8 rounded-lg shadow-2xl"};function vA(t,e,n,i,r,a){return m.openBlock(),m.createElementBlock("div",bA,[m.createElementVNode("div",xA,[e[2]||(e[2]=m.createElementVNode("p",{class:"text-6xl md:text-7xl lg:text-9xl font-bold tracking-wider text-gray-300"}," 404 ",-1)),e[3]||(e[3]=m.createElementVNode("p",{class:"text-2xl md:text-3xl lg:text-5xl font-bold tracking-wider text-gray-500 mt-4"}," Сторінку не знайдено ",-1)),e[4]||(e[4]=m.createElementVNode("p",{class:"text-gray-500 mt-4 pb-4 border-b-2 text-center"}," Вибачте, така сторінка не існує ",-1)),m.createElementVNode("div",{onClick:e[0]||(e[0]=u=>t.$router.push("/")),class:"flex cursor-pointer items-center space-x-2 bg-blue-600 hover:bg-blue-700 text-gray-100 px-4 py-2 mt-6 rounded transition duration-150",title:"Return Home"},e[1]||(e[1]=[m.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor"},[m.createElementVNode("path",{"fill-rule":"evenodd",d:"M9.707 14.707a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 1.414L7.414 9H15a1 1 0 110 2H7.414l2.293 2.293a1 1 0 010 1.414z","clip-rule":"evenodd"})],-1),m.createElementVNode("span",null,"Повернутись на головну",-1)]))])])}const wA=Fe(_A,[["render",vA]]),kA=t=>{const e=yA.map(i=>({...i}));return{router:pA({history:CM(),routes:[{path:"/404",name:"404",component:wA},{path:"/",name:"home",component:()=>Promise.resolve().then(()=>u9),children:[...e,...t,{path:"/:catchAll(.*)",component:()=>Promise.resolve().then(()=>DH)}]}]}),routerData:e}},SA={props:{value:{type:null,default:()=>""},data:{type:Object},table:{type:String},name:String,edit:{type:null,default:()=>!1},column:Object},methods:{async changeData(t){var e;try{await gt.put(`/api/table/${this.table}/${(e=this.data)==null?void 0:e.id}`,{...this.data,[this.name]:t}),await this.$emit("update-table")}catch(n){console.log(n)}}}},EA={class:"underline text-start decoration-dashed"},CA={key:1,class:"text-start"};function TA(t,e,n,i,r,a){var l,g;const u=m.resolveComponent("VsInlineEdit");return n.edit?(m.openBlock(),m.createBlock(u,{key:0,"model-value":n.value,onUpdateValue:a.changeData,title:((l=n.column)==null?void 0:l.ua)||((g=n.column)==null?void 0:g.text)},{default:m.withCtx(()=>[m.createElementVNode("button",EA,m.toDisplayString(n.value),1)]),_:1},8,["model-value","onUpdateValue","title"])):(m.openBlock(),m.createElementBlock("div",CA,m.toDisplayString(n.value),1))}const Bx=Fe(SA,[["render",TA]]),MA={},AA={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round"};function IA(t,e,n,i,r,a){return m.openBlock(),m.createElementBlock("svg",AA,e[0]||(e[0]=[m.createElementVNode("path",{d:"M20 6 9 17l-5-5"},null,-1)]))}const PA=Fe(MA,[["render",IA]]),DA={class:"w-[170px]"},OA={key:0,class:"p-1 border-b border-gray-200 dark:border-neutral-800"},zA={class:"grid gap-y-0.5 p-1 max-h-[220px] overflow-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},NA=["value","onChange"],BA={class:"text-sm text-gray-800 ms-2"},RA={key:0,class:"flex items-center px-3 text-[13px] py-1 rounded-md cursor-pointer group"},Rx={__name:"admin-badge-edit",props:{options:Array,value:String},emits:["update:value"],setup(t,{emit:e}){const n=e,i=t,r=m.ref(i.value),a=m.ref(""),u=m.ref("popover"),l=m.computed(()=>{var b;return(b=i.options)==null?void 0:b.filter(S=>{var E,C,P;return(P=(E=S==null?void 0:S.text)==null?void 0:E.toLowerCase())==null?void 0:P.includes((C=a.value)==null?void 0:C.toLowerCase())})}),g=b=>{r.value===b?r.value="":r.value=b,n("update:value",r),u.value.togglePopover()};return(b,S)=>{const E=m.resolveComponent("VsPopover");return m.openBlock(),m.createBlock(E,{ref_key:"popover",ref:u},{reference:m.withCtx(()=>[m.renderSlot(b.$slots,"default")]),default:m.withCtx(()=>{var C,P;return[m.createElementVNode("div",DA,[((C=t.options)==null?void 0:C.length)>6?(m.openBlock(),m.createElementBlock("div",OA,[m.withDirectives(m.createElementVNode("input",{"onUpdate:modelValue":S[0]||(S[0]=D=>a.value=D),type:"text",placeholder:"Пошук",class:"py-1.5 px-3 block w-full bg-gray-100 border-transparent rounded-lg text-sm placeholder:text-gray-500 focus:outline-none focus:border-teal-500 focus:ring-teal-500 focus:bg-white disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-transparent dark:text-neutral-400 dark:placeholder:text-neutral-400 dark:focus:ring-neutral-600 dark:focus:bg-neutral-900"},null,512),[[m.vModelText,a.value]])])):m.createCommentVNode("",!0),m.createElementVNode("div",zA,[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(l.value,D=>(m.openBlock(),m.createElementBlock("label",{key:D==null?void 0:D.id,class:m.normalizeClass(["flex items-center px-3 py-1 rounded-md cursor-pointer group hover:bg-gray-100",{"bg-gray-100":r.value===(D==null?void 0:D.id)}])},[m.withDirectives(m.createElementVNode("input",{"onUpdate:modelValue":S[1]||(S[1]=F=>r.value=F),value:D==null?void 0:D.id,type:"checkbox",class:"w-1 h-3 border-0 rounded-full appearance-none shrink-0 checked:bg-none",style:m.normalizeStyle({backgroundColor:(D==null?void 0:D.color)||"#ffffff"}),onChange:F=>g(D==null?void 0:D.id)},null,44,NA),[[m.vModelCheckbox,r.value]]),m.createElementVNode("span",BA,m.toDisplayString(D==null?void 0:D.text),1),r.value===(D==null?void 0:D.id)?(m.openBlock(),m.createBlock(PA,{key:0,class:"ml-auto size-3 shrink-0"})):m.createCommentVNode("",!0)],2))),128)),(P=l.value)!=null&&P.length?m.createCommentVNode("",!0):(m.openBlock(),m.createElementBlock("div",RA," Нічього не знайдено "))])])]}),_:3},512)}}},LA={components:{AdminBadgeEdit:Rx},props:{value:{type:[String,Number],default:()=>""},data:Object,name:String,table:String,column:Object,edit:{type:null,default:()=>!1}},computed:{getData(){var t;return(t=this.data)==null?void 0:t[this.name+"_data"]}},watch:{value(t){typeof t=="string"&&this.changeData(t)}},data(){var t,e;return{optionsList:[],value:(e=(t=this.data)==null?void 0:t[this.name+"_data"])==null?void 0:e.id}},methods:{async getOptions(){var t;try{const{data:e}=await gt.get(`/api/suggest/${(t=this.column)==null?void 0:t.data}`);this.optionsList=e}catch{}},getBGColor(t){if(t!=null&&t.includes("#")){let e;if(/^#([A-Fa-f0-9]{3}){1,2}$/.test(t))return e=t.substring(1).split(""),e.length==3&&(e=[e[0],e[0],e[1],e[1],e[2],e[2]]),e="0x"+e.join(""),"rgba("+[e>>16&255,e>>8&255,e&255].join(",")+",0.2)";throw new Error("Bad Hex")}else if(typeof t=="string"){const e=document.createElement("div");e.style.color=t,document.body.appendChild(e);const n=getComputedStyle(e).color;return document.body.removeChild(e),n.replace("rgb","rgba").replace(")",", 0.2)")}else throw new Error("Invalid color format")},async changeData(t){var e;try{await gt.put(`/api/table/${this.table}/${(e=this.data)==null?void 0:e.id}`,{...this.data,[this.name]:t}),await this.$emit("update-table")}catch(n){console.log(n)}}}},VA={key:1},FA={key:1,class:"flex justify-start w-full"},$A={key:1};function jA(t,e,n,i,r,a){var l,g,b;const u=m.resolveComponent("AdminBadgeEdit");return n.edit?(m.openBlock(),m.createBlock(u,{key:0,options:r.optionsList,value:r.value,"onUpdate:value":e[1]||(e[1]=S=>r.value=S)},{default:m.withCtx(()=>{var S,E,C;return[m.createElementVNode("div",{class:"flex justify-start w-full cursor-pointer",onClick:e[0]||(e[0]=(...P)=>a.getOptions&&a.getOptions(...P))},[a.getData?(m.openBlock(),m.createElementBlock("div",{key:0,class:"py-1 px-2.5 inline-flex items-center gap-x-1.5 text-xs font-medium bg-green-100 text-green-800 rounded-full",style:m.normalizeStyle({backgroundColor:a.getBGColor((S=a.getData)==null?void 0:S.color),color:(E=a.getData)==null?void 0:E.color})},m.toDisplayString((C=a.getData)==null?void 0:C.text),5)):(m.openBlock(),m.createElementBlock("div",VA,"-"))])]}),_:1},8,["options","value"])):(m.openBlock(),m.createElementBlock("div",FA,[a.getData?(m.openBlock(),m.createElementBlock("div",{key:0,class:"py-1 px-2.5 inline-flex items-center gap-x-1.5 text-xs font-medium bg-green-100 text-green-800 rounded-full",style:m.normalizeStyle({backgroundColor:a.getBGColor((l=a.getData)==null?void 0:l.color),color:(g=a.getData)==null?void 0:g.color})},m.toDisplayString((b=a.getData)==null?void 0:b.text),5)):(m.openBlock(),m.createElementBlock("div",$A,"-"))]))}const UA=Fe(LA,[["render",jA]]),HA={},qA={xmlns:"http://www.w3.org/2000/svg",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-check"};function WA(t,e,n,i,r,a){return m.openBlock(),m.createElementBlock("svg",qA,e[0]||(e[0]=[m.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),m.createElementVNode("path",{d:"M5 12l5 5l10 -10"},null,-1)]))}const Lx=Fe(HA,[["render",WA]]),GA={components:{IconCheck:Lx},props:{value:Boolean}},ZA={class:"px-[20px]"},YA={key:1};function XA(t,e,n,i,r,a){const u=m.resolveComponent("IconCheck");return m.openBlock(),m.createElementBlock("div",ZA,[n.value?(m.openBlock(),m.createBlock(u,{key:0,height:"24",width:"24",class:"text-blue-500"})):(m.openBlock(),m.createElementBlock("div",YA))])}const Vx=Fe(GA,[["render",XA]]),KA={components:{AdminBadgeEdit:Rx},props:{data:Object,name:String,column:Object,table:String,edit:{type:Boolean,default:()=>!1}},data(){var t,e;return{optionsList:[],value:(e=(t=this.data)==null?void 0:t[this.name+"_data"])==null?void 0:e.id}},watch:{value(t){typeof t=="string"&&this.changeData(t)}},computed:{getData(){var t,e,n;return((e=(t=this.data)==null?void 0:t[this.name+"_data"])==null?void 0:e.text)||((n=this.data)==null?void 0:n[this.name+"_text"])}},methods:{async getOptions(){var t;try{const{data:e}=await gt.get(`/api/suggest/${(t=this.column)==null?void 0:t.data}`);this.optionsList=e}catch{}},async changeData(t){var e;try{await gt.put(`/api/table/${this.table}/${(e=this.data)==null?void 0:e.id}`,{...this.data,[this.name]:t}),await this.$emit("update-table")}catch(n){console.log(n)}}}},JA={class:""},QA={key:1,class:"cursor-pointer"},eI={key:1,class:"cursor-pointer"},tI={key:0},nI={key:1},iI={key:1};function rI(t,e,n,i,r,a){const u=m.resolveComponent("AdminBadgeEdit");return m.openBlock(),m.createElementBlock("div",JA,[n.edit?(m.openBlock(),m.createBlock(u,{key:0,options:r.optionsList,value:r.value,"onUpdate:value":e[1]||(e[1]=l=>r.value=l)},{default:m.withCtx(()=>[a.getData?(m.openBlock(),m.createElementBlock("div",{key:0,onClick:e[0]||(e[0]=(...l)=>a.getOptions&&a.getOptions(...l))},[typeof a.getData=="object"?(m.openBlock(!0),m.createElementBlock(m.Fragment,{key:0},m.renderList(a.getData,(l,g)=>(m.openBlock(),m.createElementBlock("div",{key:g,class:"cursor-pointer"},m.toDisplayString(l),1))),128)):(m.openBlock(),m.createElementBlock("div",QA,m.toDisplayString(a.getData),1))])):(m.openBlock(),m.createElementBlock("div",eI,"-"))]),_:1},8,["options","value"])):(m.openBlock(),m.createElementBlock(m.Fragment,{key:1},[a.getData?(m.openBlock(),m.createElementBlock("div",tI,[typeof a.getData=="object"?(m.openBlock(!0),m.createElementBlock(m.Fragment,{key:0},m.renderList(a.getData,(l,g)=>(m.openBlock(),m.createElementBlock("div",{key:g},m.toDisplayString(l),1))),128)):(m.openBlock(),m.createElementBlock("div",nI,m.toDisplayString(a.getData),1))])):(m.openBlock(),m.createElementBlock("div",iI,"-"))],64))])}const sI=Fe(KA,[["render",rI]]),oI={props:{value:{type:[String,Number],default:()=>""},data:Object,name:String},computed:{getData(){var t,e;return((t=this.data)==null?void 0:t[this.name])||((e=this.data)==null?void 0:e[this.name+"_data"])}},methods:{}},aI={class:"w-full flex justify-start"},lI={key:0,class:"js-clipboard [--is-toggle-tooltip:false] hs-tooltip p-2 bg-stone-100 text-stone-800 text-xs rounded-md cursor-pointer"},cI={key:1};function uI(t,e,n,i,r,a){return m.openBlock(),m.createElementBlock("div",aI,[a.getData?(m.openBlock(),m.createElementBlock("div",lI,m.toDisplayString(a.getData),1)):(m.openBlock(),m.createElementBlock("div",cI,"-"))])}const hI=Fe(oI,[["render",uI]]);//! moment.js
|
37
37
|
//! version : 2.30.1
|
38
38
|
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
|
39
39
|
//! license : MIT
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { g as L, h as R, _ as V, u as H, a as A } from "./import-file-
|
1
|
+
import { g as L, h as R, _ as V, u as H, a as A } from "./import-file-DgJqxKyF.js";
|
2
2
|
import { computed as q, resolveComponent as $, openBlock as s, createElementBlock as a, createElementVNode as p, toDisplayString as j, createVNode as z, withCtx as B, createTextVNode as N, createBlock as m, createCommentVNode as v, normalizeClass as M, Fragment as w, renderList as D, resolveDynamicComponent as T } from "vue";
|
3
3
|
const E = { class: "h-[76px] bg-white border rounded-xl flex items-center justify-between px-[15px] mb-[16px]" }, S = { class: "text-lg font-semibold md:text-xl text-stone-800 dark:text-neutral-200" }, G = { class: "flex items-center gap-[6px]" }, O = {
|
4
4
|
__name: "admin-card-header",
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { _ as b, u as h, a as c } from "./import-file-
|
1
|
+
import { _ as b, u as h, a as c } from "./import-file-DgJqxKyF.js";
|
2
2
|
import { resolveComponent as d, openBlock as m, createElementBlock as p, createElementVNode as l, createBlock as f, createCommentVNode as g } from "vue";
|
3
3
|
const x = {
|
4
4
|
data() {
|