overgrid-vue 1.9.1 → 1.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -1
- package/dist/overgrid.es.js +49 -45
- package/dist/overgrid.umd.js +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -343,7 +343,7 @@ export declare interface OverGridConfig {
|
|
|
343
343
|
* @param filters List of filters. Each filter has a key, an operator and a value.
|
|
344
344
|
* @returns The modified URLSearchParams object.
|
|
345
345
|
*/
|
|
346
|
-
serverTransformation?: (orders: any, pagination: any, filters: any, searchQuery?: string) => URLSearchParams;
|
|
346
|
+
serverTransformation?: (orders: any, pagination: any, filters: any, config: OverGridConfig, fields: OverGridFields, searchQuery?: string) => URLSearchParams;
|
|
347
347
|
/**
|
|
348
348
|
* You can modify the axios instance before sending the request to the server. This function is called before the request is sent. You can modify the axios instance in order to your needs. If not set, the grid will use the default axios instance.
|
|
349
349
|
* Use this function to set custom headers, base URL, or any other axios configuration.
|
package/dist/overgrid.es.js
CHANGED
|
@@ -23433,78 +23433,82 @@ const {
|
|
|
23433
23433
|
formToJSON: Vk,
|
|
23434
23434
|
getAdapter: Hk,
|
|
23435
23435
|
mergeConfig: Yk
|
|
23436
|
-
} = wt, OF = (e) => e ? e(wt) : wt, bF = (e, t, r, n) => {
|
|
23437
|
-
let
|
|
23438
|
-
return t && t.active && (t.page || t.page === 0) && t.pageSize && (
|
|
23439
|
-
}, DF = (e) => {
|
|
23440
|
-
const
|
|
23441
|
-
|
|
23442
|
-
let
|
|
23436
|
+
} = wt, OF = (e) => e ? e(wt) : wt, bF = (e, t, r, n, a, i) => {
|
|
23437
|
+
let s = new URLSearchParams();
|
|
23438
|
+
return t && t.active && (t.page || t.page === 0) && t.pageSize && (s.set("page", t.page.toString()), s.set("size", t.pageSize.toString())), e && Array.isArray(e) && e.length > 0 && s.set("orders", JSON.stringify(e)), r && Array.isArray(r) && r.length > 0 && s.set("filters", JSON.stringify(r)), i && typeof i == "string" && i.trim().length > 0 && s.set("query", i.trim()), s;
|
|
23439
|
+
}, DF = (e, t) => {
|
|
23440
|
+
const r = be([]), n = jE(e.pagination, e.gridUniqueId), a = XE(e.orderConfiguration), i = qE(e.columnFilters), s = ZE(e.search), o = Bs(), l = be(!1), f = OF(e.axiosConfigurator), u = async () => {
|
|
23441
|
+
l.value = !0;
|
|
23442
|
+
let h = await f.get(e.endpoint, {
|
|
23443
23443
|
params: e.serverTransformation ? e.serverTransformation(
|
|
23444
|
-
|
|
23445
|
-
|
|
23446
|
-
|
|
23447
|
-
|
|
23444
|
+
a.rawState.value,
|
|
23445
|
+
n.state,
|
|
23446
|
+
i.filters.value,
|
|
23447
|
+
e,
|
|
23448
|
+
t,
|
|
23449
|
+
s.query.value
|
|
23448
23450
|
) : bF(
|
|
23449
|
-
|
|
23450
|
-
|
|
23451
|
-
|
|
23452
|
-
|
|
23451
|
+
a.rawState.value,
|
|
23452
|
+
n.state,
|
|
23453
|
+
i.filters.value,
|
|
23454
|
+
e,
|
|
23455
|
+
t,
|
|
23456
|
+
s.query.value
|
|
23453
23457
|
),
|
|
23454
23458
|
responseType: "json"
|
|
23455
23459
|
});
|
|
23456
|
-
|
|
23457
|
-
let
|
|
23458
|
-
if (Array.isArray(
|
|
23460
|
+
n.setByResponse(h.data);
|
|
23461
|
+
let d = e.rootkey && h.data[e.rootkey] ? h.data[e.rootkey] : h.data;
|
|
23462
|
+
if (Array.isArray(d) || (o.error(
|
|
23459
23463
|
'The response data is not an array. Please check your server response format and the "rootkey" configuration.'
|
|
23460
|
-
),
|
|
23461
|
-
let
|
|
23462
|
-
typeof
|
|
23464
|
+
), d = []), e.events && e.events.onDataLoad) {
|
|
23465
|
+
let m = e.events.onDataLoad(d);
|
|
23466
|
+
typeof m == "object" && (d = m);
|
|
23463
23467
|
}
|
|
23464
|
-
if (e.events && e.events.onDataLoadWithFullResponse && e.events.onDataLoadWithFullResponse(
|
|
23465
|
-
|
|
23468
|
+
if (e.events && e.events.onDataLoadWithFullResponse && e.events.onDataLoadWithFullResponse(h), r.value = d || [], n.state.page > n.state.totalPages && n.state.totalPages > 0) {
|
|
23469
|
+
l.value = !1, n.lastPage();
|
|
23466
23470
|
return;
|
|
23467
23471
|
}
|
|
23468
23472
|
sf(function() {
|
|
23469
|
-
var
|
|
23470
|
-
e.events && e.events.readyAfterRefresh && ((
|
|
23471
|
-
}),
|
|
23472
|
-
},
|
|
23473
|
+
var m;
|
|
23474
|
+
e.events && e.events.readyAfterRefresh && ((m = e.events) == null || m.readyAfterRefresh());
|
|
23475
|
+
}), l.value = !1;
|
|
23476
|
+
}, c = KE(e.refreshable, e.gridUniqueId, u);
|
|
23473
23477
|
return ir(
|
|
23474
|
-
() => [
|
|
23475
|
-
(
|
|
23476
|
-
|
|
23478
|
+
() => [n.state.page, n.state.pageSize],
|
|
23479
|
+
(h) => {
|
|
23480
|
+
o.info("Page changed to:", h), u();
|
|
23477
23481
|
}
|
|
23478
23482
|
), ir(
|
|
23479
|
-
() =>
|
|
23483
|
+
() => a.rawState,
|
|
23480
23484
|
() => {
|
|
23481
|
-
|
|
23485
|
+
u();
|
|
23482
23486
|
},
|
|
23483
23487
|
{ deep: !0 }
|
|
23484
23488
|
// Deep watch to capture changes in the orders array
|
|
23485
23489
|
), ir(
|
|
23486
|
-
() =>
|
|
23490
|
+
() => i.filters,
|
|
23487
23491
|
() => {
|
|
23488
|
-
|
|
23492
|
+
u();
|
|
23489
23493
|
},
|
|
23490
23494
|
{ deep: !0 }
|
|
23491
23495
|
// Deep watch to capture changes in the filters array
|
|
23492
23496
|
), ir(
|
|
23493
|
-
() =>
|
|
23497
|
+
() => s.query.value,
|
|
23494
23498
|
() => {
|
|
23495
|
-
|
|
23499
|
+
s.debounce(u);
|
|
23496
23500
|
},
|
|
23497
23501
|
{ deep: !0 }
|
|
23498
23502
|
// Deep watch to capture changes in the filters array
|
|
23499
23503
|
), {
|
|
23500
|
-
records:
|
|
23501
|
-
fetchRecords:
|
|
23502
|
-
pagination:
|
|
23503
|
-
ordering:
|
|
23504
|
-
loading:
|
|
23505
|
-
autoRefresh:
|
|
23506
|
-
columnFilters:
|
|
23507
|
-
search:
|
|
23504
|
+
records: r,
|
|
23505
|
+
fetchRecords: u,
|
|
23506
|
+
pagination: n,
|
|
23507
|
+
ordering: a,
|
|
23508
|
+
loading: l,
|
|
23509
|
+
autoRefresh: c,
|
|
23510
|
+
columnFilters: i,
|
|
23511
|
+
search: s
|
|
23508
23512
|
};
|
|
23509
23513
|
}, CF = (e, t) => {
|
|
23510
23514
|
const r = be(!1), n = be(null);
|
|
@@ -24022,7 +24026,7 @@ const {
|
|
|
24022
24026
|
var m, x;
|
|
24023
24027
|
const r = e;
|
|
24024
24028
|
be(document.documentElement.clientWidth);
|
|
24025
|
-
const n = be(null), a = Pt(r.config.locale || "en"), i = GE(), s = DF(r.config), o = CF(r.config.columnSelector, r.config.gridUniqueId), l = RF(r.config.currentPageExport), f = MF((m = r.config) != null && m.hideAboutWindow ? r.config.hideAboutWindow : !1), u = PF(
|
|
24029
|
+
const n = be(null), a = Pt(r.config.locale || "en"), i = GE(), s = DF(r.config, i), o = CF(r.config.columnSelector, r.config.gridUniqueId), l = RF(r.config.currentPageExport), f = MF((m = r.config) != null && m.hideAboutWindow ? r.config.hideAboutWindow : !1), u = PF(
|
|
24026
24030
|
r.config.bulkOperations,
|
|
24027
24031
|
r.config.idkey,
|
|
24028
24032
|
(x = r.config.events) == null ? void 0 : x.onBulkSelectChanges
|
package/dist/overgrid.umd.js
CHANGED
|
@@ -148,4 +148,4 @@ se.version="2.30.1",X2(Je),se.fn=Q,se.min=Pw,se.max=Iw,se.now=Lw,se.utc=br,se.un
|
|
|
148
148
|
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(a=>n.set(a)),n}static accessor(t){const n=(this[ru]=this[ru]={accessors:{}}).accessors,a=this.prototype;function i(s){const o=Ga(s);n[o]||(tS(a,s),n[o]=!0)}return Y.isArray(t)?t.forEach(i):i(t),this}};Jt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Y.reduceDescriptors(Jt.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}}),Y.freezeMethods(Jt);function cl(e,t){const r=this||Ya,n=t||r,a=Jt.from(n.headers);let i=n.data;return Y.forEach(e,function(o){i=o.call(r,i,a.normalize(),t?t.status:void 0)}),a.normalize(),i}function nu(e){return!!(e&&e.__CANCEL__)}function ca(e,t,r){ke.call(this,e??"canceled",ke.ERR_CANCELED,t,r),this.name="CanceledError"}Y.inherits(ca,ke,{__CANCEL__:!0});function au(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new ke("Request failed with status code "+r.status,[ke.ERR_BAD_REQUEST,ke.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function rS(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function nS(e,t){e=e||10;const r=new Array(e),n=new Array(e);let a=0,i=0,s;return t=t!==void 0?t:1e3,function(f){const c=Date.now(),u=n[i];s||(s=c),r[a]=f,n[a]=c;let h=i,d=0;for(;h!==a;)d+=r[h++],h=h%e;if(a=(a+1)%e,a===i&&(i=(i+1)%e),c-s<t)return;const m=u&&c-u;return m?Math.round(d*1e3/m):void 0}}function aS(e,t){let r=0,n=1e3/t,a,i;const s=(c,u=Date.now())=>{r=u,a=null,i&&(clearTimeout(i),i=null),e.apply(null,c)};return[(...c)=>{const u=Date.now(),h=u-r;h>=n?s(c,u):(a=c,i||(i=setTimeout(()=>{i=null,s(a)},n-h)))},()=>a&&s(a)]}const ps=(e,t,r=3)=>{let n=0;const a=nS(50,250);return aS(i=>{const s=i.loaded,o=i.lengthComputable?i.total:void 0,f=s-n,c=a(f),u=s<=o;n=s;const h={loaded:s,total:o,progress:o?s/o:void 0,bytes:f,rate:c||void 0,estimated:c&&o&&u?(o-s)/c:void 0,event:i,lengthComputable:o!=null,[t?"download":"upload"]:!0};e(h)},r)},iu=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},su=e=>(...t)=>Y.asap(()=>e(...t)),iS=Lt.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,Lt.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(Lt.origin),Lt.navigator&&/(msie|trident)/i.test(Lt.navigator.userAgent)):()=>!0,sS=Lt.hasStandardBrowserEnv?{write(e,t,r,n,a,i){const s=[e+"="+encodeURIComponent(t)];Y.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),Y.isString(n)&&s.push("path="+n),Y.isString(a)&&s.push("domain="+a),i===!0&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function oS(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function lS(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function ou(e,t,r){let n=!oS(t);return e&&(n||r==!1)?lS(e,t):t}const lu=e=>e instanceof Jt?{...e}:e;function bn(e,t){t=t||{};const r={};function n(c,u,h,d){return Y.isPlainObject(c)&&Y.isPlainObject(u)?Y.merge.call({caseless:d},c,u):Y.isPlainObject(u)?Y.merge({},u):Y.isArray(u)?u.slice():u}function a(c,u,h,d){if(Y.isUndefined(u)){if(!Y.isUndefined(c))return n(void 0,c,h,d)}else return n(c,u,h,d)}function i(c,u){if(!Y.isUndefined(u))return n(void 0,u)}function s(c,u){if(Y.isUndefined(u)){if(!Y.isUndefined(c))return n(void 0,c)}else return n(void 0,u)}function o(c,u,h){if(h in t)return n(c,u);if(h in e)return n(void 0,c)}const f={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:o,headers:(c,u,h)=>a(lu(c),lu(u),h,!0)};return Y.forEach(Object.keys(Object.assign({},e,t)),function(u){const h=f[u]||a,d=h(e[u],t[u],u);Y.isUndefined(d)&&h!==o||(r[u]=d)}),r}const fu=e=>{const t=bn({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:a,xsrfCookieName:i,headers:s,auth:o}=t;t.headers=s=Jt.from(s),t.url=Jc(ou(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),o&&s.set("Authorization","Basic "+btoa((o.username||"")+":"+(o.password?unescape(encodeURIComponent(o.password)):"")));let f;if(Y.isFormData(r)){if(Lt.hasStandardBrowserEnv||Lt.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if((f=s.getContentType())!==!1){const[c,...u]=f?f.split(";").map(h=>h.trim()).filter(Boolean):[];s.setContentType([c||"multipart/form-data",...u].join("; "))}}if(Lt.hasStandardBrowserEnv&&(n&&Y.isFunction(n)&&(n=n(t)),n||n!==!1&&iS(t.url))){const c=a&&i&&sS.read(i);c&&s.set(a,c)}return t},fS=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(r,n){const a=fu(e);let i=a.data;const s=Jt.from(a.headers).normalize();let{responseType:o,onUploadProgress:f,onDownloadProgress:c}=a,u,h,d,m,p;function _(){m&&m(),p&&p(),a.cancelToken&&a.cancelToken.unsubscribe(u),a.signal&&a.signal.removeEventListener("abort",u)}let x=new XMLHttpRequest;x.open(a.method.toUpperCase(),a.url,!0),x.timeout=a.timeout;function g(){if(!x)return;const T=Jt.from("getAllResponseHeaders"in x&&x.getAllResponseHeaders()),M={data:!o||o==="text"||o==="json"?x.responseText:x.response,status:x.status,statusText:x.statusText,headers:T,config:e,request:x};au(function(E){r(E),_()},function(E){n(E),_()},M),x=null}"onloadend"in x?x.onloadend=g:x.onreadystatechange=function(){!x||x.readyState!==4||x.status===0&&!(x.responseURL&&x.responseURL.indexOf("file:")===0)||setTimeout(g)},x.onabort=function(){x&&(n(new ke("Request aborted",ke.ECONNABORTED,e,x)),x=null)},x.onerror=function(){n(new ke("Network Error",ke.ERR_NETWORK,e,x)),x=null},x.ontimeout=function(){let B=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const M=a.transitional||eu;a.timeoutErrorMessage&&(B=a.timeoutErrorMessage),n(new ke(B,M.clarifyTimeoutError?ke.ETIMEDOUT:ke.ECONNABORTED,e,x)),x=null},i===void 0&&s.setContentType(null),"setRequestHeader"in x&&Y.forEach(s.toJSON(),function(B,M){x.setRequestHeader(M,B)}),Y.isUndefined(a.withCredentials)||(x.withCredentials=!!a.withCredentials),o&&o!=="json"&&(x.responseType=a.responseType),c&&([d,p]=ps(c,!0),x.addEventListener("progress",d)),f&&x.upload&&([h,m]=ps(f),x.upload.addEventListener("progress",h),x.upload.addEventListener("loadend",m)),(a.cancelToken||a.signal)&&(u=T=>{x&&(n(!T||T.type?new ca(null,e,x):T),x.abort(),x=null)},a.cancelToken&&a.cancelToken.subscribe(u),a.signal&&(a.signal.aborted?u():a.signal.addEventListener("abort",u)));const S=rS(a.url);if(S&&Lt.protocols.indexOf(S)===-1){n(new ke("Unsupported protocol "+S+":",ke.ERR_BAD_REQUEST,e));return}x.send(i||null)})},cS=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,a;const i=function(c){if(!a){a=!0,o();const u=c instanceof Error?c:this.reason;n.abort(u instanceof ke?u:new ca(u instanceof Error?u.message:u))}};let s=t&&setTimeout(()=>{s=null,i(new ke(`timeout ${t} of ms exceeded`,ke.ETIMEDOUT))},t);const o=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(i):c.removeEventListener("abort",i)}),e=null)};e.forEach(c=>c.addEventListener("abort",i));const{signal:f}=n;return f.unsubscribe=()=>Y.asap(o),f}},uS=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let n=0,a;for(;n<r;)a=n+t,yield e.slice(n,a),n=a},hS=async function*(e,t){for await(const r of dS(e))yield*uS(r,t)},dS=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:r,value:n}=await t.read();if(r)break;yield n}}finally{await t.cancel()}},cu=(e,t,r,n)=>{const a=hS(e,t);let i=0,s,o=f=>{s||(s=!0,n&&n(f))};return new ReadableStream({async pull(f){try{const{done:c,value:u}=await a.next();if(c){o(),f.close();return}let h=u.byteLength;if(r){let d=i+=h;r(d)}f.enqueue(new Uint8Array(u))}catch(c){throw o(c),c}},cancel(f){return o(f),a.return()}},{highWaterMark:2})},xs=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",uu=xs&&typeof ReadableStream=="function",mS=xs&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),hu=(e,...t)=>{try{return!!e(...t)}catch{return!1}},pS=uu&&hu(()=>{let e=!1;const t=new Request(Lt.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),du=64*1024,ul=uu&&hu(()=>Y.isReadableStream(new Response("").body)),_s={stream:ul&&(e=>e.body)};xs&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!_s[t]&&(_s[t]=Y.isFunction(e[t])?r=>r[t]():(r,n)=>{throw new ke(`Response type '${t}' is not supported`,ke.ERR_NOT_SUPPORT,n)})})})(new Response);const xS=async e=>{if(e==null)return 0;if(Y.isBlob(e))return e.size;if(Y.isSpecCompliantForm(e))return(await new Request(Lt.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(Y.isArrayBufferView(e)||Y.isArrayBuffer(e))return e.byteLength;if(Y.isURLSearchParams(e)&&(e=e+""),Y.isString(e))return(await mS(e)).byteLength},_S=async(e,t)=>{const r=Y.toFiniteNumber(e.getContentLength());return r??xS(t)},hl={http:LT,xhr:fS,fetch:xs&&(async e=>{let{url:t,method:r,data:n,signal:a,cancelToken:i,timeout:s,onDownloadProgress:o,onUploadProgress:f,responseType:c,headers:u,withCredentials:h="same-origin",fetchOptions:d}=fu(e);c=c?(c+"").toLowerCase():"text";let m=cS([a,i&&i.toAbortSignal()],s),p;const _=m&&m.unsubscribe&&(()=>{m.unsubscribe()});let x;try{if(f&&pS&&r!=="get"&&r!=="head"&&(x=await _S(u,n))!==0){let M=new Request(t,{method:"POST",body:n,duplex:"half"}),R;if(Y.isFormData(n)&&(R=M.headers.get("content-type"))&&u.setContentType(R),M.body){const[E,D]=iu(x,ps(su(f)));n=cu(M.body,du,E,D)}}Y.isString(h)||(h=h?"include":"omit");const g="credentials"in Request.prototype;p=new Request(t,{...d,signal:m,method:r.toUpperCase(),headers:u.normalize().toJSON(),body:n,duplex:"half",credentials:g?h:void 0});let S=await fetch(p,d);const T=ul&&(c==="stream"||c==="response");if(ul&&(o||T&&_)){const M={};["status","statusText","headers"].forEach(N=>{M[N]=S[N]});const R=Y.toFiniteNumber(S.headers.get("content-length")),[E,D]=o&&iu(R,ps(su(o),!0))||[];S=new Response(cu(S.body,du,E,()=>{D&&D(),_&&_()}),M)}c=c||"text";let B=await _s[Y.findKey(_s,c)||"text"](S,e);return!T&&_&&_(),await new Promise((M,R)=>{au(M,R,{data:B,headers:Jt.from(S.headers),status:S.status,statusText:S.statusText,config:e,request:p})})}catch(g){throw _&&_(),g&&g.name==="TypeError"&&/Load failed|fetch/i.test(g.message)?Object.assign(new ke("Network Error",ke.ERR_NETWORK,e,p),{cause:g.cause||g}):ke.from(g,g&&g.code,e,p)}})};Y.forEach(hl,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const mu=e=>`- ${e}`,gS=e=>Y.isFunction(e)||e===null||e===!1,pu={getAdapter:e=>{e=Y.isArray(e)?e:[e];const{length:t}=e;let r,n;const a={};for(let i=0;i<t;i++){r=e[i];let s;if(n=r,!gS(r)&&(n=hl[(s=String(r)).toLowerCase()],n===void 0))throw new ke(`Unknown adapter '${s}'`);if(n)break;a[s||"#"+i]=n}if(!n){const i=Object.entries(a).map(([o,f])=>`adapter ${o} `+(f===!1?"is not supported by the environment":"is not available in the build"));let s=t?i.length>1?`since :
|
|
149
149
|
`+i.map(mu).join(`
|
|
150
150
|
`):" "+mu(i[0]):"as no adapter specified";throw new ke("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return n},adapters:hl};function dl(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ca(null,e)}function xu(e){return dl(e),e.headers=Jt.from(e.headers),e.data=cl.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),pu.getAdapter(e.adapter||Ya.adapter)(e).then(function(n){return dl(e),n.data=cl.call(e,e.transformResponse,n),n.headers=Jt.from(n.headers),n},function(n){return nu(n)||(dl(e),n&&n.response&&(n.response.data=cl.call(e,e.transformResponse,n.response),n.response.headers=Jt.from(n.response.headers))),Promise.reject(n)})}const _u="1.10.0",gs={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{gs[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const gu={};gs.transitional=function(t,r,n){function a(i,s){return"[Axios v"+_u+"] Transitional option '"+i+"'"+s+(n?". "+n:"")}return(i,s,o)=>{if(t===!1)throw new ke(a(s," has been removed"+(r?" in "+r:"")),ke.ERR_DEPRECATED);return r&&!gu[s]&&(gu[s]=!0,console.warn(a(s," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(i,s,o):!0}},gs.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function vS(e,t,r){if(typeof e!="object")throw new ke("options must be an object",ke.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let a=n.length;for(;a-- >0;){const i=n[a],s=t[i];if(s){const o=e[i],f=o===void 0||s(o,i,e);if(f!==!0)throw new ke("option "+i+" must be "+f,ke.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new ke("Unknown option "+i,ke.ERR_BAD_OPTION)}}const vs={assertOptions:vS,validators:gs},Rr=vs.validators;let Cn=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Qc,response:new Qc}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let a={};Error.captureStackTrace?Error.captureStackTrace(a):a=new Error;const i=a.stack?a.stack.replace(/^.+\n/,""):"";try{n.stack?i&&!String(n.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(n.stack+=`
|
|
151
|
-
`+i):n.stack=i}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=bn(this.defaults,r);const{transitional:n,paramsSerializer:a,headers:i}=r;n!==void 0&&vs.assertOptions(n,{silentJSONParsing:Rr.transitional(Rr.boolean),forcedJSONParsing:Rr.transitional(Rr.boolean),clarifyTimeoutError:Rr.transitional(Rr.boolean)},!1),a!=null&&(Y.isFunction(a)?r.paramsSerializer={serialize:a}:vs.assertOptions(a,{encode:Rr.function,serialize:Rr.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),vs.assertOptions(r,{baseUrl:Rr.spelling("baseURL"),withXsrfToken:Rr.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let s=i&&Y.merge(i.common,i[r.method]);i&&Y.forEach(["delete","get","head","post","put","patch","common"],p=>{delete i[p]}),r.headers=Jt.concat(s,i);const o=[];let f=!0;this.interceptors.request.forEach(function(_){typeof _.runWhen=="function"&&_.runWhen(r)===!1||(f=f&&_.synchronous,o.unshift(_.fulfilled,_.rejected))});const c=[];this.interceptors.response.forEach(function(_){c.push(_.fulfilled,_.rejected)});let u,h=0,d;if(!f){const p=[xu.bind(this),void 0];for(p.unshift.apply(p,o),p.push.apply(p,c),d=p.length,u=Promise.resolve(r);h<d;)u=u.then(p[h++],p[h++]);return u}d=o.length;let m=r;for(h=0;h<d;){const p=o[h++],_=o[h++];try{m=p(m)}catch(x){_.call(this,x);break}}try{u=xu.call(this,m)}catch(p){return Promise.reject(p)}for(h=0,d=c.length;h<d;)u=u.then(c[h++],c[h++]);return u}getUri(t){t=bn(this.defaults,t);const r=ou(t.baseURL,t.url,t.allowAbsoluteUrls);return Jc(r,t.params,t.paramsSerializer)}};Y.forEach(["delete","get","head","options"],function(t){Cn.prototype[t]=function(r,n){return this.request(bn(n||{},{method:t,url:r,data:(n||{}).data}))}}),Y.forEach(["post","put","patch"],function(t){function r(n){return function(i,s,o){return this.request(bn(o||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}Cn.prototype[t]=r(),Cn.prototype[t+"Form"]=r(!0)});let wS=class Tu{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(i){r=i});const n=this;this.promise.then(a=>{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](a);n._listeners=null}),this.promise.then=a=>{let i;const s=new Promise(o=>{n.subscribe(o),i=o}).then(a);return s.cancel=function(){n.unsubscribe(i)},s},t(function(i,s,o){n.reason||(n.reason=new ca(i,s,o),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new Tu(function(a){t=a}),cancel:t}}};function yS(e){return function(r){return e.apply(null,r)}}function ES(e){return Y.isObject(e)&&e.isAxiosError===!0}const ml={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ml).forEach(([e,t])=>{ml[t]=e});function vu(e){const t=new Cn(e),r=Ic(Cn.prototype.request,t);return Y.extend(r,Cn.prototype,t,{allOwnKeys:!0}),Y.extend(r,t,null,{allOwnKeys:!0}),r.create=function(a){return vu(bn(e,a))},r}const ot=vu(Ya);ot.Axios=Cn,ot.CanceledError=ca,ot.CancelToken=wS,ot.isCancel=nu,ot.VERSION=_u,ot.toFormData=ds,ot.AxiosError=ke,ot.Cancel=ot.CanceledError,ot.all=function(t){return Promise.all(t)},ot.spread=yS,ot.isAxiosError=ES,ot.mergeConfig=bn,ot.AxiosHeaders=Jt,ot.formToJSON=e=>tu(Y.isHTMLForm(e)?new FormData(e):e),ot.getAdapter=pu.getAdapter,ot.HttpStatusCode=ml,ot.default=ot;const{Axios:Hk,AxiosError:zk,CanceledError:Yk,isCancel:Gk,CancelToken:jk,VERSION:Xk,all:Kk,Cancel:qk,isAxiosError:Zk,spread:Jk,toFormData:Qk,AxiosHeaders:eF,HttpStatusCode:tF,formToJSON:rF,getAdapter:nF,mergeConfig:aF}=ot,TS=e=>e?e(ot):ot,SS=(e,t,r,n)=>{let a=new URLSearchParams;return t&&t.active&&(t.page||t.page===0)&&t.pageSize&&(a.set("page",t.page.toString()),a.set("size",t.pageSize.toString())),e&&Array.isArray(e)&&e.length>0&&a.set("orders",JSON.stringify(e)),r&&Array.isArray(r)&&r.length>0&&a.set("filters",JSON.stringify(r)),n&&typeof n=="string"&&n.trim().length>0&&a.set("query",n.trim()),a},kS=e=>{const t=l.ref([]),r=K4(e.pagination,e.gridUniqueId),n=q4(e.orderConfiguration),a=J4(e.columnFilters),i=Q4(e.search),s=os(),o=l.ref(!1),f=TS(e.axiosConfigurator),c=async()=>{o.value=!0;let h=await f.get(e.endpoint,{params:e.serverTransformation?e.serverTransformation(n.rawState.value,r.state,a.filters.value,i.query.value):SS(n.rawState.value,r.state,a.filters.value,i.query.value),responseType:"json"});r.setByResponse(h.data);let d=e.rootkey&&h.data[e.rootkey]?h.data[e.rootkey]:h.data;if(Array.isArray(d)||(s.error('The response data is not an array. Please check your server response format and the "rootkey" configuration.'),d=[]),e.events&&e.events.onDataLoad){let m=e.events.onDataLoad(d);typeof m=="object"&&(d=m)}if(e.events&&e.events.onDataLoadWithFullResponse&&e.events.onDataLoadWithFullResponse(h),t.value=d||[],r.state.page>r.state.totalPages&&r.state.totalPages>0){o.value=!1,r.lastPage();return}l.nextTick(function(){var m;e.events&&e.events.readyAfterRefresh&&((m=e.events)==null||m.readyAfterRefresh())}),o.value=!1},u=Z4(e.refreshable,e.gridUniqueId,c);return l.watch(()=>[r.state.page,r.state.pageSize],h=>{s.info("Page changed to:",h),c()}),l.watch(()=>n.rawState,()=>{c()},{deep:!0}),l.watch(()=>a.filters,()=>{c()},{deep:!0}),l.watch(()=>i.query.value,()=>{i.debounce(c)},{deep:!0}),{records:t,fetchRecords:c,pagination:r,ordering:n,loading:o,autoRefresh:u,columnFilters:a,search:i}},FS=(e,t)=>{const r=l.ref(!1),n=l.ref(null);function a(){r.value=!0}function i(){r.value=!1}function s(c){n.value=c,localStorage.setItem("overgrid-column-selector-"+t,JSON.stringify(n.value))}function o(c){return n.value===null?c:c.filter(u=>{var h;return(h=n.value)==null?void 0:h.includes(u.key)})}if(localStorage.getItem("overgrid-column-selector-"+t)){const c=JSON.parse(localStorage.getItem("overgrid-column-selector-"+t)||"[]");n.value=c.length>0?c:null}const f=l.computed(()=>!!(e&&e.active));return{showModal:a,closeModal:i,isModalShown:r,selectedFields:n,setColumns:s,filter:o,isToolbarOptionEnabled:f}},AS=e=>{const t=l.ref(!1);function r(){t.value=!0}function n(){t.value=!1}const a=l.computed(()=>!!(e!=null&&e.active&&(e!=null&&e.xlsxEnabled||e!=null&&e.csvEnabled)));return{showModal:r,closeModal:n,isModalShown:t,isToolbarOptionEnabled:a}},OS=e=>{const t=os();function r(n,a=""){let i=a+" ";return e!=null&&e.active?e!=null&&e.fn&&typeof e.fn=="function"&&(e!=null&&e.fn(n))?i+(e.classList+" overgrid-row-highlighted"||""):(t.warn('Row highlighter configuration is not defined a function in "fn" key.'),i.trim()):i.trim()}return{getClassList:r}},bS=e=>{const t=l.ref(!1);function r(){t.value=!0}function n(){t.value=!1}const a=l.computed(()=>e!==!0);return{showModal:r,closeModal:n,isModalShown:t,isToolbarOptionEnabled:a}},CS=(e,t,r)=>{const n=l.ref([]),a=os();e&&e.active&&!t&&a.warn("Bulk operations are active, but no idkey is provided. Please provide an idkey to enable bulk operations."),l.watch(()=>n.value,()=>{r&&typeof r=="function"&&r(n.value)},{deep:!0});const i=l.computed(()=>{var s;return!!(e&&e.active&&((s=e.methods)==null?void 0:s.length)>0&&t)});return{checkedRows:n,isToolbarOptionEnabled:i}},NS=l.defineComponent({__name:"BulkOperationsDropdown",props:{config:{},bulkOperator:{}},setup(e){const t=wt(),r=e,n=l.ref("");function a(){let i;if(r.config){for(var s in r.config.methods)if(r.config.methods[s].key==n.value){i=r.config.methods[s].action;break}i&&i(r.bulkOperator.checkedRows.value,()=>{n.value="",r.bulkOperator.checkedRows.value=[]})}}return(i,s)=>{var o;return l.openBlock(),l.createBlock(is,{rounded:"full",variant:"primary",size:"sm",customClass:"overgrid-select min-w-32 sm:min-w-48",disabled:r.bulkOperator.checkedRows.value.length<=0,modelValue:n.value,"onUpdate:modelValue":s[0]||(s[0]=f=>n.value=f),options:(o=r.config)!=null&&o.methods?r.config.methods.map(f=>({key:f.key,text:f.title})):[],onChange:a,enableNullOption:!0,nullOptionText:l.unref(t).l("selected_rows",{selectedCount:r.bulkOperator.checkedRows.value.length.toString()})},null,8,["disabled","modelValue","options","nullOptionText"])}}}),DS=(e,t)=>{const r=os(),n=l.ref([]);e&&e.active&&!t&&r.warn("Extra row functionality is active in configuration, but no idkey is provided (its required). Please provide an idkey to enable extra row functionality.");function a(f){f&&n.value.push(f)}function i(f){if(!f)return;const c=n.value.indexOf(f);c!==-1&&n.value.splice(c,1)}function s(f){f&&(o(f)?i(f):a(f))}function o(f){return f?n.value.includes(f):!1}return{openedRows:n,isRowOpened:o,toggleRow:s,openRow:a,closeRow:i}},RS={key:1,class:"flex flex-row gap-1"},BS=l.defineComponent({__name:"EnumFormatter",props:{data:{},l:{type:Function},formatterConfig:{},rowid:{},fieldKey:{},record:{},refreshGrid:{type:Function},openExtraRow:{type:Function}},setup(e){return(t,r)=>{var n,a,i,s,o,f,c,u,h,d,m,p;return Array.isArray(t.data)?(l.openBlock(),l.createElementBlock("span",RS,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(t.data,(_,x)=>{var g,S,T,B,M,R,E,D,N,z,L,X;return l.openBlock(),l.createElementBlock("span",{key:x,class:l.normalizeClass(((B=(T=(S=(g=t.formatterConfig)==null?void 0:g.config)==null?void 0:S.mapping)==null?void 0:T[_])==null?void 0:B.class)||"")},l.toDisplayString((D=(E=(R=(M=t.formatterConfig)==null?void 0:M.config)==null?void 0:R.mapping)==null?void 0:E[_])!=null&&D.title?(X=(L=(z=(N=t.formatterConfig)==null?void 0:N.config)==null?void 0:z.mapping)==null?void 0:L[_])==null?void 0:X.title:_),3)}),128))])):(l.openBlock(),l.createElementBlock("span",{key:0,class:l.normalizeClass(((s=(i=(a=(n=t.formatterConfig)==null?void 0:n.config)==null?void 0:a.mapping)==null?void 0:i[t.data])==null?void 0:s.class)||"")},l.toDisplayString((u=(c=(f=(o=t.formatterConfig)==null?void 0:o.config)==null?void 0:f.mapping)==null?void 0:c[t.data])!=null&&u.title?(p=(m=(d=(h=t.formatterConfig)==null?void 0:h.config)==null?void 0:d.mapping)==null?void 0:m[t.data])==null?void 0:p.title:t.data),3))}}}),MS=l.defineComponent({__name:"BooleanFormatter",props:{data:{},l:{type:Function},formatterConfig:{},rowid:{},fieldKey:{},record:{},refreshGrid:{type:Function},openExtraRow:{type:Function}},setup(e){return(t,r)=>{var n,a,i,s;return l.toDisplayString(t.data?(n=t.formatterConfig.config)!=null&&n.trueText?(a=t.formatterConfig.config)==null?void 0:a.trueText:t.l("yes"):(i=t.formatterConfig.config)!=null&&i.falseText?(s=t.formatterConfig.config)==null?void 0:s.falseText:t.l("no"))}}}),PS=l.defineComponent({__name:"ClassFormatter",props:{data:{},l:{type:Function},formatterConfig:{},rowid:{},fieldKey:{},record:{},refreshGrid:{type:Function},openExtraRow:{type:Function}},setup(e){return(t,r)=>{var n,a;return l.openBlock(),l.createElementBlock("span",{class:l.normalizeClass(((a=(n=t.formatterConfig)==null?void 0:n.config)==null?void 0:a.class)||"")},l.toDisplayString(t.data),3)}}}),IS=l.defineComponent({__name:"DateFormatter",props:{data:{},l:{type:Function},formatterConfig:{},rowid:{},fieldKey:{},record:{},refreshGrid:{type:Function},openExtraRow:{type:Function}},setup(e){return(t,r)=>{var n,a,i,s,o,f;return l.openBlock(),l.createElementBlock("span",{class:l.normalizeClass(((a=(n=t.formatterConfig)==null?void 0:n.config)==null?void 0:a.class)||"")},l.toDisplayString(l.unref(se)(t.data,((s=(i=t.formatterConfig)==null?void 0:i.config)==null?void 0:s.inputFormat)||"YYYY-MM-DD").format(((f=(o=t.formatterConfig)==null?void 0:o.config)==null?void 0:f.outputFormat)||"YYYY-MM-DD")),3)}}}),LS=l.defineComponent({__name:"NumberFormatter",props:{data:{},l:{type:Function},formatterConfig:{},rowid:{},fieldKey:{},record:{},refreshGrid:{type:Function},openExtraRow:{type:Function}},setup(e){const t=e,r=l.computed(()=>{var a,i,s,o,f,c,u,h,d,m,p,_,x,g;return t.data?parseFloat(t.data).toLocaleString((i=(a=t.formatterConfig)==null?void 0:a.config)!=null&&i.locale?(o=(s=t.formatterConfig)==null?void 0:s.config)==null?void 0:o.locale:"en-EN",{minimumFractionDigits:((c=(f=t.formatterConfig)==null?void 0:f.config)==null?void 0:c.minimumFractionDigits)||0,maximumFractionDigits:((h=(u=t.formatterConfig)==null?void 0:u.config)==null?void 0:h.maximumFractionDigits)||2,useGrouping:((m=(d=t.formatterConfig)==null?void 0:d.config)==null?void 0:m.useGrouping)!==void 0&&typeof((_=(p=t.formatterConfig)==null?void 0:p.config)==null?void 0:_.useGrouping)=="boolean"?(g=(x=t.formatterConfig)==null?void 0:x.config)==null?void 0:g.useGrouping:!0}):""});return(n,a)=>{var i,s;return l.openBlock(),l.createElementBlock("span",{class:l.normalizeClass(((s=(i=n.formatterConfig)==null?void 0:i.config)==null?void 0:s.class)||"")},l.toDisplayString(r.value),3)}}}),US={key:0,class:"flex flex-row items-center gap-1.5 pr-1"},VS=["innerHTML"],WS={key:1,class:"flex items-center ml-1.5"},$S={class:"!rounded-md font-inter w-full"},HS={class:"my-1 rounded-lg"},zS=["disabled","data-test-value","onClick"],YS=l.defineComponent({__name:"ActionButtonsFormatter",props:{data:{},l:{type:Function},formatterConfig:{},rowid:{},fieldKey:{},record:{},refreshGrid:{type:Function},openExtraRow:{type:Function}},setup(e){const t=e,r=l.computed(()=>{var i,s,o,f,c,u,h,d;return!t.formatterConfig||!((s=(i=t.formatterConfig)==null?void 0:i.config)!=null&&s.buttons)?[]:typeof((f=(o=t.formatterConfig)==null?void 0:o.config)==null?void 0:f.buttons)=="function"?(u=(c=t.formatterConfig)==null?void 0:c.config)==null?void 0:u.buttons(t.record):(d=(h=t.formatterConfig)==null?void 0:h.config)==null?void 0:d.buttons}),n=l.computed(()=>{var i=r.value,s=[];for(var o in i)i[o].dropdowned&&s.push(i[o]);return s}),a=l.computed(()=>{var i=r.value,s=[];for(var o in i)i[o].dropdowned||s.push(i[o]);return s});return(i,s)=>{var o,f,c,u;return l.openBlock(),l.createElementBlock("div",{"data-test":"",class:"flex flex-row overflow-y-visible",onMousedown:s[0]||(s[0]=l.withModifiers(()=>{},["stop"]))},[a.value.length>0?(l.openBlock(),l.createElementBlock("span",US,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(a.value,(h,d)=>(l.openBlock(),l.createBlock(Wt,{rounded:"",iconOnly:!h.title,variant:h.variant,onClick:m=>{h.action(m,i.fieldKey,i.data,i.record)},disabled:h.disabled?h.disabled:!1,"data-test":"overgrid-action-button","data-test-value":h.testValueAttribute,key:d,customClass:h.classList},l.createSlots({default:l.withCtx(()=>[l.createElementVNode("span",null,l.toDisplayString(h.title),1)]),_:2},[h.icon?{name:"iconLeft",fn:l.withCtx(()=>[l.createElementVNode("span",{innerHTML:h.icon},null,8,VS)]),key:"0"}:void 0]),1032,["iconOnly","variant","onClick","disabled","data-test-value","customClass"]))),128))])):l.createCommentVNode("",!0),n.value.length>0?(l.openBlock(),l.createElementBlock("span",WS,[l.createVNode(Ts,{orientation:(f=(o=t.formatterConfig)==null?void 0:o.config)!=null&&f.dropdownOrientation?(u=(c=t.formatterConfig)==null?void 0:c.config)==null?void 0:u.dropdownOrientation:"right"},{iconButton:l.withCtx(()=>[l.createVNode(Wt,{rounded:"",iconOnly:"",variant:"ghost","data-test":"overgrid-action-button-dropdown"},{iconLeft:l.withCtx(()=>s[1]||(s[1]=[l.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-4 min-w-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[l.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 5v.01M12 12v.01M12 19v.01M12 6a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2z"})],-1)])),_:1})]),content:l.withCtx(()=>[l.createElementVNode("div",$S,[l.createElementVNode("ul",HS,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(n.value,(h,d)=>(l.openBlock(),l.createElementBlock("li",{class:"hover:bg-black/5",key:d},[l.createElementVNode("a",{href:"javascript:void(null);",disabled:h.disabled?h.disabled:!1,"data-test-value":h.testValueAttribute,onClick:m=>{h.action(m,i.fieldKey,i.data,i.record)},class:"font-normal text-left flex flex-row items-center p-3 py-1.5 gap-1"},l.toDisplayString(h.title),9,zS)]))),128))])])]),_:1},8,["orientation"])])):l.createCommentVNode("",!0)],32)}}}),GS=["innerHTML"],jS=l.defineComponent({__name:"HtmlFormatter",props:{data:{},l:{type:Function},formatterConfig:{},rowid:{},fieldKey:{},record:{},refreshGrid:{type:Function},openExtraRow:{type:Function}},setup(e){const t=e;return(r,n)=>(l.openBlock(),l.createElementBlock("div",{innerHTML:t.data},null,8,GS))}}),XS=l.defineComponent({__name:"RootFormatter",props:{theme:{},type:{},data:{},rowid:{},formatterConfig:{},fieldKey:{},record:{},refreshGrid:{type:Function},openExtraRow:{type:Function},customFormatters:{}},setup(e){const t=wt(),r=e,n=[{name:"EnumFormatter",component:BS},{name:"BooleanFormatter",component:MS},{name:"ClassFormatter",component:PS},{name:"DateFormatter",component:IS},{name:"NumberFormatter",component:LS},{name:"ActionButtonsFormatter",component:YS},{name:"HtmlFormatter",component:jS}].concat(r.customFormatters||[]);return(a,i)=>(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(n),s=>(l.openBlock(),l.createElementBlock(l.Fragment,null,[a.type===s.name?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(s.component),{key:0,l:l.unref(t).l,data:r.data,formatterConfig:a.formatterConfig,rowid:a.rowid,fieldKey:a.fieldKey,record:a.record,refreshGrid:a.refreshGrid,openExtraRow:a.openExtraRow},null,8,["l","data","formatterConfig","rowid","fieldKey","record","refreshGrid","openExtraRow"])):l.createCommentVNode("",!0)],64))),256))}}),KS=["data-theme","grid-unique-id"],qS={key:0,class:"overgrid-toolbar flex flex-row items-center justify-center h-12"},ZS={class:"flex flex-row gap-2 items-center justify-center overgrid-toolbar-right-section"},JS={class:"overgrid-scroller w-full max-w-full overflow-x-auto"},QS={class:"overgrid-table w-full rounded-xl overflow-hidden"},ek={class:"overgrid-header h-12"},tk={key:0,class:"overgrid-cell h-12 overgrid-extra-row-cell text-sm w-12"},rk={key:1,class:"overgrid-cell h-12 overgrid-checkbox-cell text-sm w-12"},nk=["onClick"],ak={class:"overgrid-column-title whitespace-nowrap"},ik={class:"flex flex-row items-center justify-center gap-2"},sk={key:0,class:"overgrid-orderer-container flex flex-row items-center justify-center"},ok={key:1,class:"overgrid-column-filters-container flex flex-row items-center justify-center"},lk={key:0,class:"overgrid-body"},fk=["rownum"],ck={key:0,class:"overgrid-cell px-4 overgrid-btn-extra-row text-sm"},uk={key:1,class:"overgrid-cell px-4 overgrid-checkbox-cell text-sm"},hk={class:"overgrid-checkbox-label flex items-center justify-center"},dk={key:0,class:"overgrid-extra-row"},mk=["colspan"],pk={key:1},xk=["colspan"],_k={key:2,class:"overgrid-ui-loader absolute w-full h-full top-0 left-0 flex items-center justify-center"},gk={class:"overgrid-ui-loader-message"},vk=l.defineComponent({__name:"OverGrid",props:{config:{},customFormatters:{}},setup(e,{expose:t}){var p,_;const r=e;l.ref(document.documentElement.clientWidth);const n=l.ref(null),a=wt(r.config.locale||"en"),i=X4(),s=kS(r.config),o=FS(r.config.columnSelector,r.config.gridUniqueId),f=AS(r.config.currentPageExport),c=bS((p=r.config)!=null&&p.hideAboutWindow?r.config.hideAboutWindow:!1),u=CS(r.config.bulkOperations,r.config.idkey,(_=r.config.events)==null?void 0:_.onBulkSelectChanges),h=DS(r.config.extraRow,r.config.idkey),d=OS(r.config.rowHighlighter);l.onMounted(()=>{s.fetchRecords()});const m=l.computed(()=>{var x;return s.search.isToolbarOptionEnabled.value||u.isToolbarOptionEnabled.value||((x=r.config.refreshable)==null?void 0:x.manualActive)||o.isToolbarOptionEnabled.value||f.isToolbarOptionEnabled.value||c.isToolbarOptionEnabled.value||s.autoRefresh.isToolbarOptionEnabled.value||s.pagination.isToolbarOptionEnabled.value});return t({fields:i,records:s,refresh:s.fetchRecords}),(x,g)=>{var S,T,B,M;return l.openBlock(),l.createElementBlock("div",{class:"overgrid relative w-full max-w-full","data-theme":r.config.theme||"default","grid-unique-id":r.config.gridUniqueId},[m.value?(l.openBlock(),l.createElementBlock("div",qS,[l.unref(s).search.isToolbarOptionEnabled.value?(l.openBlock(),l.createBlock(Y4,{key:0,searchConfig:r.config.search,searcher:l.unref(s).search},null,8,["searchConfig","searcher"])):l.createCommentVNode("",!0),g[1]||(g[1]=l.createElementVNode("span",{class:"overgrid-toolbar-spacer flex grow"},null,-1)),l.createElementVNode("div",ZS,[l.unref(u).isToolbarOptionEnabled.value?(l.openBlock(),l.createBlock(NS,{key:0,config:r.config.bulkOperations,bulkOperator:l.unref(u)},null,8,["config","bulkOperator"])):l.createCommentVNode("",!0),(S=r.config.refreshable)!=null&&S.manualActive?(l.openBlock(),l.createBlock(Wt,{key:1,onClick:l.unref(s).fetchRecords,customClass:"overgrid-btn-manual-refresh",variant:"primary",size:"sm",iconOnly:"",rounded:""},{iconLeft:l.withCtx(()=>[l.createVNode(dt,{type:"refresh",class:"w-4 h-4"})]),_:1},8,["onClick"])):l.createCommentVNode("",!0),l.unref(o).isToolbarOptionEnabled.value||l.unref(f).isToolbarOptionEnabled.value||l.unref(c).isToolbarOptionEnabled.value||l.unref(s).autoRefresh.isToolbarOptionEnabled.value||l.unref(s).pagination.isToolbarOptionEnabled.value?(l.openBlock(),l.createBlock(Ts,{key:2,orientation:"left",ref_key:"operationsDropdown",ref:n,class:"overgrid-operations-dropdown"},{iconButton:l.withCtx(()=>[l.createVNode(Wt,{customClass:"overgrid-btn-operations",variant:"primary",size:"sm",iconOnly:"",rounded:""},{iconLeft:l.withCtx(()=>[l.createVNode(dt,{type:"horizontal-dots",class:"w-4 h-4"})]),_:1})]),content:l.withCtx(()=>{var R,E,D,N,z;return[l.unref(o).isToolbarOptionEnabled.value||l.unref(f).isToolbarOptionEnabled.value||l.unref(c).isToolbarOptionEnabled.value?(l.openBlock(),l.createBlock(Qu,{key:0,config:r.config,columnSelector:l.unref(o),currentPageExporter:l.unref(f),aboutModal:l.unref(c),closeDropdown:(R=n.value)==null?void 0:R.close,ref:"baseOperations"},null,8,["config","columnSelector","currentPageExporter","aboutModal","closeDropdown"])):l.createCommentVNode("",!0),l.unref(s).autoRefresh.isToolbarOptionEnabled.value?(l.openBlock(),l.createBlock(sh,{key:1,autoRefresher:l.unref(s).autoRefresh,config:(E=r.config)==null?void 0:E.refreshable,closeDropdown:(D=n.value)==null?void 0:D.close},null,8,["autoRefresher","config","closeDropdown"])):l.createCommentVNode("",!0),l.unref(s).pagination.isToolbarOptionEnabled.value?(l.openBlock(),l.createBlock(uh,{key:2,paginator:l.unref(s).pagination,config:(N=r.config)==null?void 0:N.pagination,closeDropdown:(z=n.value)==null?void 0:z.close},null,8,["paginator","config","closeDropdown"])):l.createCommentVNode("",!0)]}),_:1},512)):l.createCommentVNode("",!0)])])):l.createCommentVNode("",!0),l.createElementVNode("div",JS,[l.createElementVNode("table",QS,[l.createElementVNode("thead",ek,[l.createElementVNode("tr",null,[r.config.extraRow&&r.config.extraRow.active&&r.config.idkey?(l.openBlock(),l.createElementBlock("th",tk,g[2]||(g[2]=[l.createElementVNode("label",{class:""},null,-1)]))):l.createCommentVNode("",!0),r.config.bulkOperations&&r.config.bulkOperations.active&&((T=r.config.bulkOperations.methods)==null?void 0:T.length)>0&&r.config.idkey?(l.openBlock(),l.createElementBlock("th",rk,g[3]||(g[3]=[l.createElementVNode("label",{class:""},null,-1)]))):l.createCommentVNode("",!0),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(o).filter(l.unref(i).mappingVisible()),R=>{var E,D,N,z;return l.openBlock(),l.createElementBlock("th",{style:l.normalizeStyle({width:R.width||"auto"}),class:"overgrid-cell text-sm h-12",key:"head_"+R.key},[l.createElementVNode("div",{class:l.normalizeClass(["flex flex-row items-center overgrid-column-title-container h-12 px-4",{"overgrid-column-title-container-hoverable cursor-pointer":((E=r.config.orderConfiguration)==null?void 0:E.active)&&R.orderable}]),onClick:()=>l.unref(s).ordering.toggleField(R)},[l.createElementVNode("span",ak,l.toDisplayString(R.title),1),g[4]||(g[4]=l.createElementVNode("span",{class:"grow min-w-3"},null,-1)),l.createElementVNode("div",ik,[(D=r.config.orderConfiguration)!=null&&D.active&&R.orderable?(l.openBlock(),l.createElementBlock("div",sk,[l.createVNode(Iu,{orderer:l.unref(s).ordering,field:R,config:r.config.orderConfiguration},null,8,["orderer","field","config"])])):l.createCommentVNode("",!0),(N=r.config.columnFilters)!=null&&N.active&&((z=R.columnFilter)!=null&&z.active)?(l.openBlock(),l.createElementBlock("div",ok,[l.createVNode(zu,{columnFilter:l.unref(s).columnFilters,field:R,config:r.config.columnFilters},null,8,["columnFilter","field","config"])])):l.createCommentVNode("",!0)])],10,nk)],4)}),128))])]),l.unref(s).records.value&&l.unref(s).records.value.length>0?(l.openBlock(),l.createElementBlock("tbody",lk,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(s).records.value,(R,E)=>{var D,N;return l.openBlock(),l.createElementBlock(l.Fragment,{key:"record_"+E},[l.createElementVNode("tr",{rownum:E,class:l.normalizeClass(l.unref(d).getClassList(R,"overgrid-row h-12 "+(E%2===0?"overgrid-row-odd":"overgrid-row-even")))},[r.config.extraRow&&r.config.extraRow.active&&r.config.idkey?(l.openBlock(),l.createElementBlock("td",ck,[l.createVNode(Wt,{onClick:z=>{var L;return l.unref(h).toggleRow((L=R[r.config.idkey])==null?void 0:L.toString())},customClass:"overgrid-btn-manual-refresh",variant:"light",size:"sm",iconOnly:"",rounded:""},{iconLeft:l.withCtx(()=>{var z;return[l.unref(h).isRowOpened((z=R[r.config.idkey])==null?void 0:z.toString())?(l.openBlock(),l.createBlock(dt,{key:1,type:"chevron-down",class:"w-3 h-3"})):(l.openBlock(),l.createBlock(dt,{key:0,type:"chevron-right",class:"w-3 h-3"}))]}),_:2},1032,["onClick"])])):l.createCommentVNode("",!0),r.config.bulkOperations&&r.config.bulkOperations.active&&((D=r.config.bulkOperations.methods)==null?void 0:D.length)>0&&r.config.idkey?(l.openBlock(),l.createElementBlock("td",uk,[l.createElementVNode("label",hk,[l.createVNode(Ja,{value:(N=R[r.config.idkey])==null?void 0:N.toString(),modelValue:l.unref(u).checkedRows.value,"onUpdate:modelValue":g[0]||(g[0]=z=>l.unref(u).checkedRows.value=z),variant:"secondary"},null,8,["value","modelValue"])])])):l.createCommentVNode("",!0),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(o).filter(l.unref(i).mappingVisible()),z=>(l.openBlock(),l.createElementBlock("td",{class:"overgrid-cell px-4 text-sm",key:"body_"+z.key},[z.formatter&&typeof z.formatter=="object"&&z.formatter.type?(l.openBlock(),l.createBlock(XS,{key:0,theme:r.config.theme?r.config.theme:"default",type:z.formatter.type,data:z.middleware?z.middleware(R[z.key],R):R[z.key],formatterConfig:z.formatter,rowid:r.config.idkey?R[r.config.idkey]:null,fieldKey:z.key,record:R,refreshGrid:()=>{l.unref(s).fetchRecords()},customFormatters:r.customFormatters,openExtraRow:L=>{r.config.idkey&&l.unref(h).toggleRow(L)}},null,8,["theme","type","data","formatterConfig","rowid","fieldKey","record","refreshGrid","customFormatters","openExtraRow"])):(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[l.createTextVNode(l.toDisplayString(z.middleware?z.middleware(R[z.key],R):R[z.key]),1)],64))]))),128))],10,fk),l.createVNode(l.Transition,{name:"overgrid-anim-extra-row"},{default:l.withCtx(()=>{var z,L,X;return[r.config.extraRow&&r.config.extraRow.active&&r.config.idkey?l.withDirectives((l.openBlock(),l.createElementBlock("tr",dk,[l.createElementVNode("td",{class:"overgrid-extra-row-cell",colspan:l.unref(o).filter(l.unref(i).mappingVisible()).length+(r.config.bulkOperations&&r.config.bulkOperations.active&&((z=r.config.bulkOperations.methods)==null?void 0:z.length)>0&&r.config.idkey?1:0)+1},[l.renderSlot(x.$slots,"extraRow",{record:R,extraSlotParams:(L=r.config.extraRow)==null?void 0:L.extraSlotParams})],8,mk)],512)),[[l.vShow,l.unref(h).isRowOpened((X=R[r.config.idkey])==null?void 0:X.toString())]]):l.createCommentVNode("",!0)]}),_:2},1024)],64)}),128))])):(l.openBlock(),l.createElementBlock("tbody",pk,[l.createElementVNode("tr",null,[l.createElementVNode("td",{colspan:l.unref(o).filter(l.unref(i).mappingVisible()).length+(r.config.bulkOperations&&r.config.bulkOperations.active&&((B=r.config.bulkOperations.methods)==null?void 0:B.length)>0&&r.config.idkey?1:0)+1},[l.renderSlot(x.$slots,"emptyResult")],8,xk)])]))])]),(M=r.config.pagination)!=null&&M.active?(l.openBlock(),l.createBlock(Ru,{key:1,paginator:l.unref(s).pagination},null,8,["paginator"])):l.createCommentVNode("",!0),l.unref(s).loading.value?(l.openBlock(),l.createElementBlock("div",_k,[l.createElementVNode("span",gk,l.toDisplayString(l.unref(a).l("loading_data")),1)])):l.createCommentVNode("",!0),l.createVNode(Ah,{mappingVisible:l.unref(i).mappingVisible(),columnSelector:l.unref(o)},null,8,["mappingVisible","columnSelector"]),l.createVNode(t4,{currentPageExporterConfig:r.config.currentPageExport,mappingVisible:l.unref(o).filter(l.unref(i).mappingVisible()),currentPageExporter:l.unref(f),currentRecords:l.unref(s).records},null,8,["currentPageExporterConfig","mappingVisible","currentPageExporter","currentRecords"]),l.createVNode(G4,{aboutModal:l.unref(c)},null,8,["aboutModal"]),l.createVNode(d4,{columnFilters:l.unref(s).columnFilters},null,8,["columnFilters"]),l.createVNode(E4,{columnFilters:l.unref(s).columnFilters},null,8,["columnFilters"]),l.createVNode(R4,{columnFilters:l.unref(s).columnFilters},null,8,["columnFilters"]),l.createVNode(V4,{columnFilters:l.unref(s).columnFilters},null,8,["columnFilters"]),l.createVNode(H4,{columnFilters:l.unref(s).columnFilters},null,8,["columnFilters"])],8,KS)}}});Qt.OverGrid=vk,Object.defineProperty(Qt,Symbol.toStringTag,{value:"Module"})});
|
|
151
|
+
`+i):n.stack=i}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=bn(this.defaults,r);const{transitional:n,paramsSerializer:a,headers:i}=r;n!==void 0&&vs.assertOptions(n,{silentJSONParsing:Rr.transitional(Rr.boolean),forcedJSONParsing:Rr.transitional(Rr.boolean),clarifyTimeoutError:Rr.transitional(Rr.boolean)},!1),a!=null&&(Y.isFunction(a)?r.paramsSerializer={serialize:a}:vs.assertOptions(a,{encode:Rr.function,serialize:Rr.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),vs.assertOptions(r,{baseUrl:Rr.spelling("baseURL"),withXsrfToken:Rr.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let s=i&&Y.merge(i.common,i[r.method]);i&&Y.forEach(["delete","get","head","post","put","patch","common"],p=>{delete i[p]}),r.headers=Jt.concat(s,i);const o=[];let f=!0;this.interceptors.request.forEach(function(_){typeof _.runWhen=="function"&&_.runWhen(r)===!1||(f=f&&_.synchronous,o.unshift(_.fulfilled,_.rejected))});const c=[];this.interceptors.response.forEach(function(_){c.push(_.fulfilled,_.rejected)});let u,h=0,d;if(!f){const p=[xu.bind(this),void 0];for(p.unshift.apply(p,o),p.push.apply(p,c),d=p.length,u=Promise.resolve(r);h<d;)u=u.then(p[h++],p[h++]);return u}d=o.length;let m=r;for(h=0;h<d;){const p=o[h++],_=o[h++];try{m=p(m)}catch(x){_.call(this,x);break}}try{u=xu.call(this,m)}catch(p){return Promise.reject(p)}for(h=0,d=c.length;h<d;)u=u.then(c[h++],c[h++]);return u}getUri(t){t=bn(this.defaults,t);const r=ou(t.baseURL,t.url,t.allowAbsoluteUrls);return Jc(r,t.params,t.paramsSerializer)}};Y.forEach(["delete","get","head","options"],function(t){Cn.prototype[t]=function(r,n){return this.request(bn(n||{},{method:t,url:r,data:(n||{}).data}))}}),Y.forEach(["post","put","patch"],function(t){function r(n){return function(i,s,o){return this.request(bn(o||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}Cn.prototype[t]=r(),Cn.prototype[t+"Form"]=r(!0)});let wS=class Tu{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(i){r=i});const n=this;this.promise.then(a=>{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](a);n._listeners=null}),this.promise.then=a=>{let i;const s=new Promise(o=>{n.subscribe(o),i=o}).then(a);return s.cancel=function(){n.unsubscribe(i)},s},t(function(i,s,o){n.reason||(n.reason=new ca(i,s,o),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new Tu(function(a){t=a}),cancel:t}}};function yS(e){return function(r){return e.apply(null,r)}}function ES(e){return Y.isObject(e)&&e.isAxiosError===!0}const ml={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ml).forEach(([e,t])=>{ml[t]=e});function vu(e){const t=new Cn(e),r=Ic(Cn.prototype.request,t);return Y.extend(r,Cn.prototype,t,{allOwnKeys:!0}),Y.extend(r,t,null,{allOwnKeys:!0}),r.create=function(a){return vu(bn(e,a))},r}const ot=vu(Ya);ot.Axios=Cn,ot.CanceledError=ca,ot.CancelToken=wS,ot.isCancel=nu,ot.VERSION=_u,ot.toFormData=ds,ot.AxiosError=ke,ot.Cancel=ot.CanceledError,ot.all=function(t){return Promise.all(t)},ot.spread=yS,ot.isAxiosError=ES,ot.mergeConfig=bn,ot.AxiosHeaders=Jt,ot.formToJSON=e=>tu(Y.isHTMLForm(e)?new FormData(e):e),ot.getAdapter=pu.getAdapter,ot.HttpStatusCode=ml,ot.default=ot;const{Axios:Hk,AxiosError:zk,CanceledError:Yk,isCancel:Gk,CancelToken:jk,VERSION:Xk,all:Kk,Cancel:qk,isAxiosError:Zk,spread:Jk,toFormData:Qk,AxiosHeaders:eF,HttpStatusCode:tF,formToJSON:rF,getAdapter:nF,mergeConfig:aF}=ot,TS=e=>e?e(ot):ot,SS=(e,t,r,n,a,i)=>{let s=new URLSearchParams;return t&&t.active&&(t.page||t.page===0)&&t.pageSize&&(s.set("page",t.page.toString()),s.set("size",t.pageSize.toString())),e&&Array.isArray(e)&&e.length>0&&s.set("orders",JSON.stringify(e)),r&&Array.isArray(r)&&r.length>0&&s.set("filters",JSON.stringify(r)),i&&typeof i=="string"&&i.trim().length>0&&s.set("query",i.trim()),s},kS=(e,t)=>{const r=l.ref([]),n=K4(e.pagination,e.gridUniqueId),a=q4(e.orderConfiguration),i=J4(e.columnFilters),s=Q4(e.search),o=os(),f=l.ref(!1),c=TS(e.axiosConfigurator),u=async()=>{f.value=!0;let d=await c.get(e.endpoint,{params:e.serverTransformation?e.serverTransformation(a.rawState.value,n.state,i.filters.value,e,t,s.query.value):SS(a.rawState.value,n.state,i.filters.value,e,t,s.query.value),responseType:"json"});n.setByResponse(d.data);let m=e.rootkey&&d.data[e.rootkey]?d.data[e.rootkey]:d.data;if(Array.isArray(m)||(o.error('The response data is not an array. Please check your server response format and the "rootkey" configuration.'),m=[]),e.events&&e.events.onDataLoad){let p=e.events.onDataLoad(m);typeof p=="object"&&(m=p)}if(e.events&&e.events.onDataLoadWithFullResponse&&e.events.onDataLoadWithFullResponse(d),r.value=m||[],n.state.page>n.state.totalPages&&n.state.totalPages>0){f.value=!1,n.lastPage();return}l.nextTick(function(){var p;e.events&&e.events.readyAfterRefresh&&((p=e.events)==null||p.readyAfterRefresh())}),f.value=!1},h=Z4(e.refreshable,e.gridUniqueId,u);return l.watch(()=>[n.state.page,n.state.pageSize],d=>{o.info("Page changed to:",d),u()}),l.watch(()=>a.rawState,()=>{u()},{deep:!0}),l.watch(()=>i.filters,()=>{u()},{deep:!0}),l.watch(()=>s.query.value,()=>{s.debounce(u)},{deep:!0}),{records:r,fetchRecords:u,pagination:n,ordering:a,loading:f,autoRefresh:h,columnFilters:i,search:s}},FS=(e,t)=>{const r=l.ref(!1),n=l.ref(null);function a(){r.value=!0}function i(){r.value=!1}function s(c){n.value=c,localStorage.setItem("overgrid-column-selector-"+t,JSON.stringify(n.value))}function o(c){return n.value===null?c:c.filter(u=>{var h;return(h=n.value)==null?void 0:h.includes(u.key)})}if(localStorage.getItem("overgrid-column-selector-"+t)){const c=JSON.parse(localStorage.getItem("overgrid-column-selector-"+t)||"[]");n.value=c.length>0?c:null}const f=l.computed(()=>!!(e&&e.active));return{showModal:a,closeModal:i,isModalShown:r,selectedFields:n,setColumns:s,filter:o,isToolbarOptionEnabled:f}},AS=e=>{const t=l.ref(!1);function r(){t.value=!0}function n(){t.value=!1}const a=l.computed(()=>!!(e!=null&&e.active&&(e!=null&&e.xlsxEnabled||e!=null&&e.csvEnabled)));return{showModal:r,closeModal:n,isModalShown:t,isToolbarOptionEnabled:a}},OS=e=>{const t=os();function r(n,a=""){let i=a+" ";return e!=null&&e.active?e!=null&&e.fn&&typeof e.fn=="function"&&(e!=null&&e.fn(n))?i+(e.classList+" overgrid-row-highlighted"||""):(t.warn('Row highlighter configuration is not defined a function in "fn" key.'),i.trim()):i.trim()}return{getClassList:r}},bS=e=>{const t=l.ref(!1);function r(){t.value=!0}function n(){t.value=!1}const a=l.computed(()=>e!==!0);return{showModal:r,closeModal:n,isModalShown:t,isToolbarOptionEnabled:a}},CS=(e,t,r)=>{const n=l.ref([]),a=os();e&&e.active&&!t&&a.warn("Bulk operations are active, but no idkey is provided. Please provide an idkey to enable bulk operations."),l.watch(()=>n.value,()=>{r&&typeof r=="function"&&r(n.value)},{deep:!0});const i=l.computed(()=>{var s;return!!(e&&e.active&&((s=e.methods)==null?void 0:s.length)>0&&t)});return{checkedRows:n,isToolbarOptionEnabled:i}},NS=l.defineComponent({__name:"BulkOperationsDropdown",props:{config:{},bulkOperator:{}},setup(e){const t=wt(),r=e,n=l.ref("");function a(){let i;if(r.config){for(var s in r.config.methods)if(r.config.methods[s].key==n.value){i=r.config.methods[s].action;break}i&&i(r.bulkOperator.checkedRows.value,()=>{n.value="",r.bulkOperator.checkedRows.value=[]})}}return(i,s)=>{var o;return l.openBlock(),l.createBlock(is,{rounded:"full",variant:"primary",size:"sm",customClass:"overgrid-select min-w-32 sm:min-w-48",disabled:r.bulkOperator.checkedRows.value.length<=0,modelValue:n.value,"onUpdate:modelValue":s[0]||(s[0]=f=>n.value=f),options:(o=r.config)!=null&&o.methods?r.config.methods.map(f=>({key:f.key,text:f.title})):[],onChange:a,enableNullOption:!0,nullOptionText:l.unref(t).l("selected_rows",{selectedCount:r.bulkOperator.checkedRows.value.length.toString()})},null,8,["disabled","modelValue","options","nullOptionText"])}}}),DS=(e,t)=>{const r=os(),n=l.ref([]);e&&e.active&&!t&&r.warn("Extra row functionality is active in configuration, but no idkey is provided (its required). Please provide an idkey to enable extra row functionality.");function a(f){f&&n.value.push(f)}function i(f){if(!f)return;const c=n.value.indexOf(f);c!==-1&&n.value.splice(c,1)}function s(f){f&&(o(f)?i(f):a(f))}function o(f){return f?n.value.includes(f):!1}return{openedRows:n,isRowOpened:o,toggleRow:s,openRow:a,closeRow:i}},RS={key:1,class:"flex flex-row gap-1"},BS=l.defineComponent({__name:"EnumFormatter",props:{data:{},l:{type:Function},formatterConfig:{},rowid:{},fieldKey:{},record:{},refreshGrid:{type:Function},openExtraRow:{type:Function}},setup(e){return(t,r)=>{var n,a,i,s,o,f,c,u,h,d,m,p;return Array.isArray(t.data)?(l.openBlock(),l.createElementBlock("span",RS,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(t.data,(_,x)=>{var g,S,T,B,M,R,E,D,N,z,L,X;return l.openBlock(),l.createElementBlock("span",{key:x,class:l.normalizeClass(((B=(T=(S=(g=t.formatterConfig)==null?void 0:g.config)==null?void 0:S.mapping)==null?void 0:T[_])==null?void 0:B.class)||"")},l.toDisplayString((D=(E=(R=(M=t.formatterConfig)==null?void 0:M.config)==null?void 0:R.mapping)==null?void 0:E[_])!=null&&D.title?(X=(L=(z=(N=t.formatterConfig)==null?void 0:N.config)==null?void 0:z.mapping)==null?void 0:L[_])==null?void 0:X.title:_),3)}),128))])):(l.openBlock(),l.createElementBlock("span",{key:0,class:l.normalizeClass(((s=(i=(a=(n=t.formatterConfig)==null?void 0:n.config)==null?void 0:a.mapping)==null?void 0:i[t.data])==null?void 0:s.class)||"")},l.toDisplayString((u=(c=(f=(o=t.formatterConfig)==null?void 0:o.config)==null?void 0:f.mapping)==null?void 0:c[t.data])!=null&&u.title?(p=(m=(d=(h=t.formatterConfig)==null?void 0:h.config)==null?void 0:d.mapping)==null?void 0:m[t.data])==null?void 0:p.title:t.data),3))}}}),MS=l.defineComponent({__name:"BooleanFormatter",props:{data:{},l:{type:Function},formatterConfig:{},rowid:{},fieldKey:{},record:{},refreshGrid:{type:Function},openExtraRow:{type:Function}},setup(e){return(t,r)=>{var n,a,i,s;return l.toDisplayString(t.data?(n=t.formatterConfig.config)!=null&&n.trueText?(a=t.formatterConfig.config)==null?void 0:a.trueText:t.l("yes"):(i=t.formatterConfig.config)!=null&&i.falseText?(s=t.formatterConfig.config)==null?void 0:s.falseText:t.l("no"))}}}),PS=l.defineComponent({__name:"ClassFormatter",props:{data:{},l:{type:Function},formatterConfig:{},rowid:{},fieldKey:{},record:{},refreshGrid:{type:Function},openExtraRow:{type:Function}},setup(e){return(t,r)=>{var n,a;return l.openBlock(),l.createElementBlock("span",{class:l.normalizeClass(((a=(n=t.formatterConfig)==null?void 0:n.config)==null?void 0:a.class)||"")},l.toDisplayString(t.data),3)}}}),IS=l.defineComponent({__name:"DateFormatter",props:{data:{},l:{type:Function},formatterConfig:{},rowid:{},fieldKey:{},record:{},refreshGrid:{type:Function},openExtraRow:{type:Function}},setup(e){return(t,r)=>{var n,a,i,s,o,f;return l.openBlock(),l.createElementBlock("span",{class:l.normalizeClass(((a=(n=t.formatterConfig)==null?void 0:n.config)==null?void 0:a.class)||"")},l.toDisplayString(l.unref(se)(t.data,((s=(i=t.formatterConfig)==null?void 0:i.config)==null?void 0:s.inputFormat)||"YYYY-MM-DD").format(((f=(o=t.formatterConfig)==null?void 0:o.config)==null?void 0:f.outputFormat)||"YYYY-MM-DD")),3)}}}),LS=l.defineComponent({__name:"NumberFormatter",props:{data:{},l:{type:Function},formatterConfig:{},rowid:{},fieldKey:{},record:{},refreshGrid:{type:Function},openExtraRow:{type:Function}},setup(e){const t=e,r=l.computed(()=>{var a,i,s,o,f,c,u,h,d,m,p,_,x,g;return t.data?parseFloat(t.data).toLocaleString((i=(a=t.formatterConfig)==null?void 0:a.config)!=null&&i.locale?(o=(s=t.formatterConfig)==null?void 0:s.config)==null?void 0:o.locale:"en-EN",{minimumFractionDigits:((c=(f=t.formatterConfig)==null?void 0:f.config)==null?void 0:c.minimumFractionDigits)||0,maximumFractionDigits:((h=(u=t.formatterConfig)==null?void 0:u.config)==null?void 0:h.maximumFractionDigits)||2,useGrouping:((m=(d=t.formatterConfig)==null?void 0:d.config)==null?void 0:m.useGrouping)!==void 0&&typeof((_=(p=t.formatterConfig)==null?void 0:p.config)==null?void 0:_.useGrouping)=="boolean"?(g=(x=t.formatterConfig)==null?void 0:x.config)==null?void 0:g.useGrouping:!0}):""});return(n,a)=>{var i,s;return l.openBlock(),l.createElementBlock("span",{class:l.normalizeClass(((s=(i=n.formatterConfig)==null?void 0:i.config)==null?void 0:s.class)||"")},l.toDisplayString(r.value),3)}}}),US={key:0,class:"flex flex-row items-center gap-1.5 pr-1"},VS=["innerHTML"],WS={key:1,class:"flex items-center ml-1.5"},$S={class:"!rounded-md font-inter w-full"},HS={class:"my-1 rounded-lg"},zS=["disabled","data-test-value","onClick"],YS=l.defineComponent({__name:"ActionButtonsFormatter",props:{data:{},l:{type:Function},formatterConfig:{},rowid:{},fieldKey:{},record:{},refreshGrid:{type:Function},openExtraRow:{type:Function}},setup(e){const t=e,r=l.computed(()=>{var i,s,o,f,c,u,h,d;return!t.formatterConfig||!((s=(i=t.formatterConfig)==null?void 0:i.config)!=null&&s.buttons)?[]:typeof((f=(o=t.formatterConfig)==null?void 0:o.config)==null?void 0:f.buttons)=="function"?(u=(c=t.formatterConfig)==null?void 0:c.config)==null?void 0:u.buttons(t.record):(d=(h=t.formatterConfig)==null?void 0:h.config)==null?void 0:d.buttons}),n=l.computed(()=>{var i=r.value,s=[];for(var o in i)i[o].dropdowned&&s.push(i[o]);return s}),a=l.computed(()=>{var i=r.value,s=[];for(var o in i)i[o].dropdowned||s.push(i[o]);return s});return(i,s)=>{var o,f,c,u;return l.openBlock(),l.createElementBlock("div",{"data-test":"",class:"flex flex-row overflow-y-visible",onMousedown:s[0]||(s[0]=l.withModifiers(()=>{},["stop"]))},[a.value.length>0?(l.openBlock(),l.createElementBlock("span",US,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(a.value,(h,d)=>(l.openBlock(),l.createBlock(Wt,{rounded:"",iconOnly:!h.title,variant:h.variant,onClick:m=>{h.action(m,i.fieldKey,i.data,i.record)},disabled:h.disabled?h.disabled:!1,"data-test":"overgrid-action-button","data-test-value":h.testValueAttribute,key:d,customClass:h.classList},l.createSlots({default:l.withCtx(()=>[l.createElementVNode("span",null,l.toDisplayString(h.title),1)]),_:2},[h.icon?{name:"iconLeft",fn:l.withCtx(()=>[l.createElementVNode("span",{innerHTML:h.icon},null,8,VS)]),key:"0"}:void 0]),1032,["iconOnly","variant","onClick","disabled","data-test-value","customClass"]))),128))])):l.createCommentVNode("",!0),n.value.length>0?(l.openBlock(),l.createElementBlock("span",WS,[l.createVNode(Ts,{orientation:(f=(o=t.formatterConfig)==null?void 0:o.config)!=null&&f.dropdownOrientation?(u=(c=t.formatterConfig)==null?void 0:c.config)==null?void 0:u.dropdownOrientation:"right"},{iconButton:l.withCtx(()=>[l.createVNode(Wt,{rounded:"",iconOnly:"",variant:"ghost","data-test":"overgrid-action-button-dropdown"},{iconLeft:l.withCtx(()=>s[1]||(s[1]=[l.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-4 min-w-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[l.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 5v.01M12 12v.01M12 19v.01M12 6a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2z"})],-1)])),_:1})]),content:l.withCtx(()=>[l.createElementVNode("div",$S,[l.createElementVNode("ul",HS,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(n.value,(h,d)=>(l.openBlock(),l.createElementBlock("li",{class:"hover:bg-black/5",key:d},[l.createElementVNode("a",{href:"javascript:void(null);",disabled:h.disabled?h.disabled:!1,"data-test-value":h.testValueAttribute,onClick:m=>{h.action(m,i.fieldKey,i.data,i.record)},class:"font-normal text-left flex flex-row items-center p-3 py-1.5 gap-1"},l.toDisplayString(h.title),9,zS)]))),128))])])]),_:1},8,["orientation"])])):l.createCommentVNode("",!0)],32)}}}),GS=["innerHTML"],jS=l.defineComponent({__name:"HtmlFormatter",props:{data:{},l:{type:Function},formatterConfig:{},rowid:{},fieldKey:{},record:{},refreshGrid:{type:Function},openExtraRow:{type:Function}},setup(e){const t=e;return(r,n)=>(l.openBlock(),l.createElementBlock("div",{innerHTML:t.data},null,8,GS))}}),XS=l.defineComponent({__name:"RootFormatter",props:{theme:{},type:{},data:{},rowid:{},formatterConfig:{},fieldKey:{},record:{},refreshGrid:{type:Function},openExtraRow:{type:Function},customFormatters:{}},setup(e){const t=wt(),r=e,n=[{name:"EnumFormatter",component:BS},{name:"BooleanFormatter",component:MS},{name:"ClassFormatter",component:PS},{name:"DateFormatter",component:IS},{name:"NumberFormatter",component:LS},{name:"ActionButtonsFormatter",component:YS},{name:"HtmlFormatter",component:jS}].concat(r.customFormatters||[]);return(a,i)=>(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(n),s=>(l.openBlock(),l.createElementBlock(l.Fragment,null,[a.type===s.name?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(s.component),{key:0,l:l.unref(t).l,data:r.data,formatterConfig:a.formatterConfig,rowid:a.rowid,fieldKey:a.fieldKey,record:a.record,refreshGrid:a.refreshGrid,openExtraRow:a.openExtraRow},null,8,["l","data","formatterConfig","rowid","fieldKey","record","refreshGrid","openExtraRow"])):l.createCommentVNode("",!0)],64))),256))}}),KS=["data-theme","grid-unique-id"],qS={key:0,class:"overgrid-toolbar flex flex-row items-center justify-center h-12"},ZS={class:"flex flex-row gap-2 items-center justify-center overgrid-toolbar-right-section"},JS={class:"overgrid-scroller w-full max-w-full overflow-x-auto"},QS={class:"overgrid-table w-full rounded-xl overflow-hidden"},ek={class:"overgrid-header h-12"},tk={key:0,class:"overgrid-cell h-12 overgrid-extra-row-cell text-sm w-12"},rk={key:1,class:"overgrid-cell h-12 overgrid-checkbox-cell text-sm w-12"},nk=["onClick"],ak={class:"overgrid-column-title whitespace-nowrap"},ik={class:"flex flex-row items-center justify-center gap-2"},sk={key:0,class:"overgrid-orderer-container flex flex-row items-center justify-center"},ok={key:1,class:"overgrid-column-filters-container flex flex-row items-center justify-center"},lk={key:0,class:"overgrid-body"},fk=["rownum"],ck={key:0,class:"overgrid-cell px-4 overgrid-btn-extra-row text-sm"},uk={key:1,class:"overgrid-cell px-4 overgrid-checkbox-cell text-sm"},hk={class:"overgrid-checkbox-label flex items-center justify-center"},dk={key:0,class:"overgrid-extra-row"},mk=["colspan"],pk={key:1},xk=["colspan"],_k={key:2,class:"overgrid-ui-loader absolute w-full h-full top-0 left-0 flex items-center justify-center"},gk={class:"overgrid-ui-loader-message"},vk=l.defineComponent({__name:"OverGrid",props:{config:{},customFormatters:{}},setup(e,{expose:t}){var p,_;const r=e;l.ref(document.documentElement.clientWidth);const n=l.ref(null),a=wt(r.config.locale||"en"),i=X4(),s=kS(r.config,i),o=FS(r.config.columnSelector,r.config.gridUniqueId),f=AS(r.config.currentPageExport),c=bS((p=r.config)!=null&&p.hideAboutWindow?r.config.hideAboutWindow:!1),u=CS(r.config.bulkOperations,r.config.idkey,(_=r.config.events)==null?void 0:_.onBulkSelectChanges),h=DS(r.config.extraRow,r.config.idkey),d=OS(r.config.rowHighlighter);l.onMounted(()=>{s.fetchRecords()});const m=l.computed(()=>{var x;return s.search.isToolbarOptionEnabled.value||u.isToolbarOptionEnabled.value||((x=r.config.refreshable)==null?void 0:x.manualActive)||o.isToolbarOptionEnabled.value||f.isToolbarOptionEnabled.value||c.isToolbarOptionEnabled.value||s.autoRefresh.isToolbarOptionEnabled.value||s.pagination.isToolbarOptionEnabled.value});return t({fields:i,records:s,refresh:s.fetchRecords}),(x,g)=>{var S,T,B,M;return l.openBlock(),l.createElementBlock("div",{class:"overgrid relative w-full max-w-full","data-theme":r.config.theme||"default","grid-unique-id":r.config.gridUniqueId},[m.value?(l.openBlock(),l.createElementBlock("div",qS,[l.unref(s).search.isToolbarOptionEnabled.value?(l.openBlock(),l.createBlock(Y4,{key:0,searchConfig:r.config.search,searcher:l.unref(s).search},null,8,["searchConfig","searcher"])):l.createCommentVNode("",!0),g[1]||(g[1]=l.createElementVNode("span",{class:"overgrid-toolbar-spacer flex grow"},null,-1)),l.createElementVNode("div",ZS,[l.unref(u).isToolbarOptionEnabled.value?(l.openBlock(),l.createBlock(NS,{key:0,config:r.config.bulkOperations,bulkOperator:l.unref(u)},null,8,["config","bulkOperator"])):l.createCommentVNode("",!0),(S=r.config.refreshable)!=null&&S.manualActive?(l.openBlock(),l.createBlock(Wt,{key:1,onClick:l.unref(s).fetchRecords,customClass:"overgrid-btn-manual-refresh",variant:"primary",size:"sm",iconOnly:"",rounded:""},{iconLeft:l.withCtx(()=>[l.createVNode(dt,{type:"refresh",class:"w-4 h-4"})]),_:1},8,["onClick"])):l.createCommentVNode("",!0),l.unref(o).isToolbarOptionEnabled.value||l.unref(f).isToolbarOptionEnabled.value||l.unref(c).isToolbarOptionEnabled.value||l.unref(s).autoRefresh.isToolbarOptionEnabled.value||l.unref(s).pagination.isToolbarOptionEnabled.value?(l.openBlock(),l.createBlock(Ts,{key:2,orientation:"left",ref_key:"operationsDropdown",ref:n,class:"overgrid-operations-dropdown"},{iconButton:l.withCtx(()=>[l.createVNode(Wt,{customClass:"overgrid-btn-operations",variant:"primary",size:"sm",iconOnly:"",rounded:""},{iconLeft:l.withCtx(()=>[l.createVNode(dt,{type:"horizontal-dots",class:"w-4 h-4"})]),_:1})]),content:l.withCtx(()=>{var R,E,D,N,z;return[l.unref(o).isToolbarOptionEnabled.value||l.unref(f).isToolbarOptionEnabled.value||l.unref(c).isToolbarOptionEnabled.value?(l.openBlock(),l.createBlock(Qu,{key:0,config:r.config,columnSelector:l.unref(o),currentPageExporter:l.unref(f),aboutModal:l.unref(c),closeDropdown:(R=n.value)==null?void 0:R.close,ref:"baseOperations"},null,8,["config","columnSelector","currentPageExporter","aboutModal","closeDropdown"])):l.createCommentVNode("",!0),l.unref(s).autoRefresh.isToolbarOptionEnabled.value?(l.openBlock(),l.createBlock(sh,{key:1,autoRefresher:l.unref(s).autoRefresh,config:(E=r.config)==null?void 0:E.refreshable,closeDropdown:(D=n.value)==null?void 0:D.close},null,8,["autoRefresher","config","closeDropdown"])):l.createCommentVNode("",!0),l.unref(s).pagination.isToolbarOptionEnabled.value?(l.openBlock(),l.createBlock(uh,{key:2,paginator:l.unref(s).pagination,config:(N=r.config)==null?void 0:N.pagination,closeDropdown:(z=n.value)==null?void 0:z.close},null,8,["paginator","config","closeDropdown"])):l.createCommentVNode("",!0)]}),_:1},512)):l.createCommentVNode("",!0)])])):l.createCommentVNode("",!0),l.createElementVNode("div",JS,[l.createElementVNode("table",QS,[l.createElementVNode("thead",ek,[l.createElementVNode("tr",null,[r.config.extraRow&&r.config.extraRow.active&&r.config.idkey?(l.openBlock(),l.createElementBlock("th",tk,g[2]||(g[2]=[l.createElementVNode("label",{class:""},null,-1)]))):l.createCommentVNode("",!0),r.config.bulkOperations&&r.config.bulkOperations.active&&((T=r.config.bulkOperations.methods)==null?void 0:T.length)>0&&r.config.idkey?(l.openBlock(),l.createElementBlock("th",rk,g[3]||(g[3]=[l.createElementVNode("label",{class:""},null,-1)]))):l.createCommentVNode("",!0),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(o).filter(l.unref(i).mappingVisible()),R=>{var E,D,N,z;return l.openBlock(),l.createElementBlock("th",{style:l.normalizeStyle({width:R.width||"auto"}),class:"overgrid-cell text-sm h-12",key:"head_"+R.key},[l.createElementVNode("div",{class:l.normalizeClass(["flex flex-row items-center overgrid-column-title-container h-12 px-4",{"overgrid-column-title-container-hoverable cursor-pointer":((E=r.config.orderConfiguration)==null?void 0:E.active)&&R.orderable}]),onClick:()=>l.unref(s).ordering.toggleField(R)},[l.createElementVNode("span",ak,l.toDisplayString(R.title),1),g[4]||(g[4]=l.createElementVNode("span",{class:"grow min-w-3"},null,-1)),l.createElementVNode("div",ik,[(D=r.config.orderConfiguration)!=null&&D.active&&R.orderable?(l.openBlock(),l.createElementBlock("div",sk,[l.createVNode(Iu,{orderer:l.unref(s).ordering,field:R,config:r.config.orderConfiguration},null,8,["orderer","field","config"])])):l.createCommentVNode("",!0),(N=r.config.columnFilters)!=null&&N.active&&((z=R.columnFilter)!=null&&z.active)?(l.openBlock(),l.createElementBlock("div",ok,[l.createVNode(zu,{columnFilter:l.unref(s).columnFilters,field:R,config:r.config.columnFilters},null,8,["columnFilter","field","config"])])):l.createCommentVNode("",!0)])],10,nk)],4)}),128))])]),l.unref(s).records.value&&l.unref(s).records.value.length>0?(l.openBlock(),l.createElementBlock("tbody",lk,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(s).records.value,(R,E)=>{var D,N;return l.openBlock(),l.createElementBlock(l.Fragment,{key:"record_"+E},[l.createElementVNode("tr",{rownum:E,class:l.normalizeClass(l.unref(d).getClassList(R,"overgrid-row h-12 "+(E%2===0?"overgrid-row-odd":"overgrid-row-even")))},[r.config.extraRow&&r.config.extraRow.active&&r.config.idkey?(l.openBlock(),l.createElementBlock("td",ck,[l.createVNode(Wt,{onClick:z=>{var L;return l.unref(h).toggleRow((L=R[r.config.idkey])==null?void 0:L.toString())},customClass:"overgrid-btn-manual-refresh",variant:"light",size:"sm",iconOnly:"",rounded:""},{iconLeft:l.withCtx(()=>{var z;return[l.unref(h).isRowOpened((z=R[r.config.idkey])==null?void 0:z.toString())?(l.openBlock(),l.createBlock(dt,{key:1,type:"chevron-down",class:"w-3 h-3"})):(l.openBlock(),l.createBlock(dt,{key:0,type:"chevron-right",class:"w-3 h-3"}))]}),_:2},1032,["onClick"])])):l.createCommentVNode("",!0),r.config.bulkOperations&&r.config.bulkOperations.active&&((D=r.config.bulkOperations.methods)==null?void 0:D.length)>0&&r.config.idkey?(l.openBlock(),l.createElementBlock("td",uk,[l.createElementVNode("label",hk,[l.createVNode(Ja,{value:(N=R[r.config.idkey])==null?void 0:N.toString(),modelValue:l.unref(u).checkedRows.value,"onUpdate:modelValue":g[0]||(g[0]=z=>l.unref(u).checkedRows.value=z),variant:"secondary"},null,8,["value","modelValue"])])])):l.createCommentVNode("",!0),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(o).filter(l.unref(i).mappingVisible()),z=>(l.openBlock(),l.createElementBlock("td",{class:"overgrid-cell px-4 text-sm",key:"body_"+z.key},[z.formatter&&typeof z.formatter=="object"&&z.formatter.type?(l.openBlock(),l.createBlock(XS,{key:0,theme:r.config.theme?r.config.theme:"default",type:z.formatter.type,data:z.middleware?z.middleware(R[z.key],R):R[z.key],formatterConfig:z.formatter,rowid:r.config.idkey?R[r.config.idkey]:null,fieldKey:z.key,record:R,refreshGrid:()=>{l.unref(s).fetchRecords()},customFormatters:r.customFormatters,openExtraRow:L=>{r.config.idkey&&l.unref(h).toggleRow(L)}},null,8,["theme","type","data","formatterConfig","rowid","fieldKey","record","refreshGrid","customFormatters","openExtraRow"])):(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[l.createTextVNode(l.toDisplayString(z.middleware?z.middleware(R[z.key],R):R[z.key]),1)],64))]))),128))],10,fk),l.createVNode(l.Transition,{name:"overgrid-anim-extra-row"},{default:l.withCtx(()=>{var z,L,X;return[r.config.extraRow&&r.config.extraRow.active&&r.config.idkey?l.withDirectives((l.openBlock(),l.createElementBlock("tr",dk,[l.createElementVNode("td",{class:"overgrid-extra-row-cell",colspan:l.unref(o).filter(l.unref(i).mappingVisible()).length+(r.config.bulkOperations&&r.config.bulkOperations.active&&((z=r.config.bulkOperations.methods)==null?void 0:z.length)>0&&r.config.idkey?1:0)+1},[l.renderSlot(x.$slots,"extraRow",{record:R,extraSlotParams:(L=r.config.extraRow)==null?void 0:L.extraSlotParams})],8,mk)],512)),[[l.vShow,l.unref(h).isRowOpened((X=R[r.config.idkey])==null?void 0:X.toString())]]):l.createCommentVNode("",!0)]}),_:2},1024)],64)}),128))])):(l.openBlock(),l.createElementBlock("tbody",pk,[l.createElementVNode("tr",null,[l.createElementVNode("td",{colspan:l.unref(o).filter(l.unref(i).mappingVisible()).length+(r.config.bulkOperations&&r.config.bulkOperations.active&&((B=r.config.bulkOperations.methods)==null?void 0:B.length)>0&&r.config.idkey?1:0)+1},[l.renderSlot(x.$slots,"emptyResult")],8,xk)])]))])]),(M=r.config.pagination)!=null&&M.active?(l.openBlock(),l.createBlock(Ru,{key:1,paginator:l.unref(s).pagination},null,8,["paginator"])):l.createCommentVNode("",!0),l.unref(s).loading.value?(l.openBlock(),l.createElementBlock("div",_k,[l.createElementVNode("span",gk,l.toDisplayString(l.unref(a).l("loading_data")),1)])):l.createCommentVNode("",!0),l.createVNode(Ah,{mappingVisible:l.unref(i).mappingVisible(),columnSelector:l.unref(o)},null,8,["mappingVisible","columnSelector"]),l.createVNode(t4,{currentPageExporterConfig:r.config.currentPageExport,mappingVisible:l.unref(o).filter(l.unref(i).mappingVisible()),currentPageExporter:l.unref(f),currentRecords:l.unref(s).records},null,8,["currentPageExporterConfig","mappingVisible","currentPageExporter","currentRecords"]),l.createVNode(G4,{aboutModal:l.unref(c)},null,8,["aboutModal"]),l.createVNode(d4,{columnFilters:l.unref(s).columnFilters},null,8,["columnFilters"]),l.createVNode(E4,{columnFilters:l.unref(s).columnFilters},null,8,["columnFilters"]),l.createVNode(R4,{columnFilters:l.unref(s).columnFilters},null,8,["columnFilters"]),l.createVNode(V4,{columnFilters:l.unref(s).columnFilters},null,8,["columnFilters"]),l.createVNode(H4,{columnFilters:l.unref(s).columnFilters},null,8,["columnFilters"])],8,KS)}}});Qt.OverGrid=vk,Object.defineProperty(Qt,Symbol.toStringTag,{value:"Module"})});
|