@espresso-lab/mantine-data-table 1.9.26 → 1.9.27
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.es.js +206 -206
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -140,5 +140,5 @@ __p += '`),Ke&&(xe+=`' +
|
|
|
140
140
|
function print() { __p += __j.call(arguments, '') }
|
|
141
141
|
`:`;
|
|
142
142
|
`)+xe+`return __p
|
|
143
|
-
}`;var Ue=gh(function(){return Qe(x,Le+"return "+xe).apply(r,P)});if(Ue.source=xe,qa(Ue))throw Ue;return Ue}function h2(e){return Xe(e).toLowerCase()}function d2(e){return Xe(e).toUpperCase()}function p2(e,t,o){if(e=Xe(e),e&&(o||t===r))return Cc(e);if(!e||!(t=rn(t)))return e;var a=kn(e),y=kn(t),x=Sc(a,y),P=Ac(a,y)+1;return vr(a,x,P).join("")}function g2(e,t,o){if(e=Xe(e),e&&(o||t===r))return e.slice(0,Oc(e)+1);if(!e||!(t=rn(t)))return e;var a=kn(e),y=Ac(a,kn(t))+1;return vr(a,0,y).join("")}function v2(e,t,o){if(e=Xe(e),e&&(o||t===r))return e.replace(ut,"");if(!e||!(t=rn(t)))return e;var a=kn(e),y=Sc(a,kn(t));return vr(a,y).join("")}function m2(e,t){var o=he,a=re;if(ft(t)){var y="separator"in t?t.separator:y;o="length"in t?We(t.length):o,a="omission"in t?rn(t.omission):a}e=Xe(e);var x=e.length;if(Ur(e)){var P=kn(e);x=P.length}if(o>=x)return e;var j=o-zr(a);if(j<1)return a;var q=P?vr(P,0,j).join(""):e.slice(0,j);if(y===r)return q+a;if(P&&(j+=q.length-j),Ha(y)){if(e.slice(j).search(y)){var pe,ge=q;for(y.global||(y=ua(y.source,Xe(vn.exec(y))+"g")),y.lastIndex=0;pe=y.exec(ge);)var xe=pe.index;q=q.slice(0,xe===r?j:xe)}}else if(e.indexOf(rn(y),j)!=j){var Ee=q.lastIndexOf(y);Ee>-1&&(q=q.slice(0,Ee))}return q+a}function y2(e){return e=Xe(e),e&&yt.test(e)?e.replace(Wt,G0):e}var _2=Qr(function(e,t,o){return e+(o?" ":"")+t.toUpperCase()}),Ka=vf("toUpperCase");function ph(e,t,o){return e=Xe(e),t=o?r:t,t===r?W0(e)?Z0(e):k0(e):e.match(t)||[]}var gh=qe(function(e,t){try{return tn(e,r,t)}catch(o){return qa(o)?o:new Ye(o)}}),w2=Zn(function(e,t){return yn(t,function(o){o=zn(o),Vn(e,o,Ua(e[o],e))}),e});function b2(e){var t=e==null?0:e.length,o=Ne();return e=t?ct(e,function(a){if(typeof a[1]!="function")throw new _n(m);return[o(a[0]),a[1]]}):[],qe(function(a){for(var y=-1;++y<t;){var x=e[y];if(tn(x[0],this,a))return tn(x[1],this,a)}})}function x2(e){return Gv(bn(e,N))}function Za(e){return function(){return e}}function C2(e,t){return e==null||e!==e?t:e}var S2=yf(),A2=yf(!0);function Qt(e){return e}function Qa(e){return Gc(typeof e=="function"?e:bn(e,N))}function D2(e){return Kc(bn(e,N))}function O2(e,t){return Zc(e,bn(t,N))}var E2=qe(function(e,t){return function(o){return Ti(o,e,t)}}),T2=qe(function(e,t){return function(o){return Ti(e,o,t)}});function Ja(e,t,o){var a=Ct(t),y=$o(t,a);o==null&&!(ft(t)&&(y.length||!a.length))&&(o=t,t=e,e=this,y=$o(t,Ct(t)));var x=!(ft(o)&&"chain"in o)||!!o.chain,P=Jn(e);return yn(y,function(j){var q=t[j];e[j]=q,P&&(e.prototype[j]=function(){var pe=this.__chain__;if(x||pe){var ge=e(this.__wrapped__),xe=ge.__actions__=Vt(this.__actions__);return xe.push({func:q,args:arguments,thisArg:e}),ge.__chain__=pe,ge}return q.apply(e,cr([this.value()],arguments))})}),e}function P2(){return Ot._===this&&(Ot._=nv),this}function Xa(){}function M2(e){return e=We(e),qe(function(t){return Qc(t,e)})}var R2=Pa(ct),k2=Pa(yc),L2=Pa(ta);function vh(e){return $a(e)?na(zn(e)):cm(e)}function N2(e){return function(t){return e==null?r:Or(e,t)}}var I2=wf(),$2=wf(!0);function eu(){return[]}function tu(){return!1}function B2(){return{}}function j2(){return""}function Y2(){return!0}function F2(e,t){if(e=We(e),e<1||e>p)return[];var o=v,a=Mt(e,v);t=Ne(t),e-=v;for(var y=oa(a,t);++o<e;)t(o);return y}function W2(e){return Fe(e)?ct(e,zn):on(e)?[e]:Vt(If(Xe(e)))}function U2(e){var t=++ev;return Xe(e)+t}var z2=Uo(function(e,t){return e+t},0),q2=Ma("ceil"),H2=Uo(function(e,t){return e/t},1),G2=Ma("floor");function V2(e){return e&&e.length?Io(e,Qt,va):r}function K2(e,t){return e&&e.length?Io(e,Ne(t,2),va):r}function Z2(e){return bc(e,Qt)}function Q2(e,t){return bc(e,Ne(t,2))}function J2(e){return e&&e.length?Io(e,Qt,wa):r}function X2(e,t){return e&&e.length?Io(e,Ne(t,2),wa):r}var eb=Uo(function(e,t){return e*t},1),tb=Ma("round"),nb=Uo(function(e,t){return e-t},0);function rb(e){return e&&e.length?ia(e,Qt):0}function ib(e,t){return e&&e.length?ia(e,Ne(t,2)):0}return w.after=D_,w.ary=Gf,w.assign=dw,w.assignIn=ah,w.assignInWith=ns,w.assignWith=pw,w.at=gw,w.before=Vf,w.bind=Ua,w.bindAll=w2,w.bindKey=Kf,w.castArray=B_,w.chain=zf,w.chunk=Gm,w.compact=Vm,w.concat=Km,w.cond=b2,w.conforms=x2,w.constant=Za,w.countBy=r_,w.create=vw,w.curry=Zf,w.curryRight=Qf,w.debounce=Jf,w.defaults=mw,w.defaultsDeep=yw,w.defer=O_,w.delay=E_,w.difference=Zm,w.differenceBy=Qm,w.differenceWith=Jm,w.drop=Xm,w.dropRight=ey,w.dropRightWhile=ty,w.dropWhile=ny,w.fill=ry,w.filter=o_,w.flatMap=u_,w.flatMapDeep=l_,w.flatMapDepth=c_,w.flatten=Yf,w.flattenDeep=iy,w.flattenDepth=oy,w.flip=T_,w.flow=S2,w.flowRight=A2,w.fromPairs=sy,w.functions=Aw,w.functionsIn=Dw,w.groupBy=f_,w.initial=uy,w.intersection=ly,w.intersectionBy=cy,w.intersectionWith=fy,w.invert=Ew,w.invertBy=Tw,w.invokeMap=d_,w.iteratee=Qa,w.keyBy=p_,w.keys=Ct,w.keysIn=Zt,w.map=Zo,w.mapKeys=Mw,w.mapValues=Rw,w.matches=D2,w.matchesProperty=O2,w.memoize=Jo,w.merge=kw,w.mergeWith=uh,w.method=E2,w.methodOf=T2,w.mixin=Ja,w.negate=Xo,w.nthArg=M2,w.omit=Lw,w.omitBy=Nw,w.once=P_,w.orderBy=g_,w.over=R2,w.overArgs=M_,w.overEvery=k2,w.overSome=L2,w.partial=za,w.partialRight=Xf,w.partition=v_,w.pick=Iw,w.pickBy=lh,w.property=vh,w.propertyOf=N2,w.pull=gy,w.pullAll=Wf,w.pullAllBy=vy,w.pullAllWith=my,w.pullAt=yy,w.range=I2,w.rangeRight=$2,w.rearg=R_,w.reject=__,w.remove=_y,w.rest=k_,w.reverse=Fa,w.sampleSize=b_,w.set=Bw,w.setWith=jw,w.shuffle=x_,w.slice=wy,w.sortBy=A_,w.sortedUniq=Oy,w.sortedUniqBy=Ey,w.split=u2,w.spread=L_,w.tail=Ty,w.take=Py,w.takeRight=My,w.takeRightWhile=Ry,w.takeWhile=ky,w.tap=Vy,w.throttle=N_,w.thru=Ko,w.toArray=ih,w.toPairs=ch,w.toPairsIn=fh,w.toPath=W2,w.toPlainObject=sh,w.transform=Yw,w.unary=I_,w.union=Ly,w.unionBy=Ny,w.unionWith=Iy,w.uniq=$y,w.uniqBy=By,w.uniqWith=jy,w.unset=Fw,w.unzip=Wa,w.unzipWith=Uf,w.update=Ww,w.updateWith=Uw,w.values=ei,w.valuesIn=zw,w.without=Yy,w.words=ph,w.wrap=$_,w.xor=Fy,w.xorBy=Wy,w.xorWith=Uy,w.zip=zy,w.zipObject=qy,w.zipObjectDeep=Hy,w.zipWith=Gy,w.entries=ch,w.entriesIn=fh,w.extend=ah,w.extendWith=ns,Ja(w,w),w.add=z2,w.attempt=gh,w.camelCase=Vw,w.capitalize=hh,w.ceil=q2,w.clamp=qw,w.clone=j_,w.cloneDeep=F_,w.cloneDeepWith=W_,w.cloneWith=Y_,w.conformsTo=U_,w.deburr=dh,w.defaultTo=C2,w.divide=H2,w.endsWith=Kw,w.eq=Nn,w.escape=Zw,w.escapeRegExp=Qw,w.every=i_,w.find=s_,w.findIndex=Bf,w.findKey=_w,w.findLast=a_,w.findLastIndex=jf,w.findLastKey=ww,w.floor=G2,w.forEach=qf,w.forEachRight=Hf,w.forIn=bw,w.forInRight=xw,w.forOwn=Cw,w.forOwnRight=Sw,w.get=Ga,w.gt=z_,w.gte=q_,w.has=Ow,w.hasIn=Va,w.head=Ff,w.identity=Qt,w.includes=h_,w.indexOf=ay,w.inRange=Hw,w.invoke=Pw,w.isArguments=Pr,w.isArray=Fe,w.isArrayBuffer=H_,w.isArrayLike=Kt,w.isArrayLikeObject=gt,w.isBoolean=G_,w.isBuffer=mr,w.isDate=V_,w.isElement=K_,w.isEmpty=Z_,w.isEqual=Q_,w.isEqualWith=J_,w.isError=qa,w.isFinite=X_,w.isFunction=Jn,w.isInteger=eh,w.isLength=es,w.isMap=th,w.isMatch=ew,w.isMatchWith=tw,w.isNaN=nw,w.isNative=rw,w.isNil=ow,w.isNull=iw,w.isNumber=nh,w.isObject=ft,w.isObjectLike=dt,w.isPlainObject=Ni,w.isRegExp=Ha,w.isSafeInteger=sw,w.isSet=rh,w.isString=ts,w.isSymbol=on,w.isTypedArray=Xr,w.isUndefined=aw,w.isWeakMap=uw,w.isWeakSet=lw,w.join=hy,w.kebabCase=Jw,w.last=Cn,w.lastIndexOf=dy,w.lowerCase=Xw,w.lowerFirst=e2,w.lt=cw,w.lte=fw,w.max=V2,w.maxBy=K2,w.mean=Z2,w.meanBy=Q2,w.min=J2,w.minBy=X2,w.stubArray=eu,w.stubFalse=tu,w.stubObject=B2,w.stubString=j2,w.stubTrue=Y2,w.multiply=eb,w.nth=py,w.noConflict=P2,w.noop=Xa,w.now=Qo,w.pad=t2,w.padEnd=n2,w.padStart=r2,w.parseInt=i2,w.random=Gw,w.reduce=m_,w.reduceRight=y_,w.repeat=o2,w.replace=s2,w.result=$w,w.round=tb,w.runInContext=z,w.sample=w_,w.size=C_,w.snakeCase=a2,w.some=S_,w.sortedIndex=by,w.sortedIndexBy=xy,w.sortedIndexOf=Cy,w.sortedLastIndex=Sy,w.sortedLastIndexBy=Ay,w.sortedLastIndexOf=Dy,w.startCase=l2,w.startsWith=c2,w.subtract=nb,w.sum=rb,w.sumBy=ib,w.template=f2,w.times=F2,w.toFinite=Xn,w.toInteger=We,w.toLength=oh,w.toLower=h2,w.toNumber=Sn,w.toSafeInteger=hw,w.toString=Xe,w.toUpper=d2,w.trim=p2,w.trimEnd=g2,w.trimStart=v2,w.truncate=m2,w.unescape=y2,w.uniqueId=U2,w.upperCase=_2,w.upperFirst=Ka,w.each=qf,w.eachRight=Hf,w.first=Ff,Ja(w,function(){var e={};return Wn(w,function(t,o){nt.call(w.prototype,o)||(e[o]=t)}),e}(),{chain:!1}),w.VERSION=s,yn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){w[e].placeholder=w}),yn(["drop","take"],function(e,t){Ge.prototype[e]=function(o){o=o===r?1:xt(We(o),0);var a=this.__filtered__&&!t?new Ge(this):this.clone();return a.__filtered__?a.__takeCount__=Mt(o,a.__takeCount__):a.__views__.push({size:Mt(o,v),type:e+(a.__dir__<0?"Right":"")}),a},Ge.prototype[e+"Right"]=function(o){return this.reverse()[e](o).reverse()}}),yn(["filter","map","takeWhile"],function(e,t){var o=t+1,a=o==k||o==S;Ge.prototype[e]=function(y){var x=this.clone();return x.__iteratees__.push({iteratee:Ne(y,3),type:o}),x.__filtered__=x.__filtered__||a,x}}),yn(["head","last"],function(e,t){var o="take"+(t?"Right":"");Ge.prototype[e]=function(){return this[o](1).value()[0]}}),yn(["initial","tail"],function(e,t){var o="drop"+(t?"":"Right");Ge.prototype[e]=function(){return this.__filtered__?new Ge(this):this[o](1)}}),Ge.prototype.compact=function(){return this.filter(Qt)},Ge.prototype.find=function(e){return this.filter(e).head()},Ge.prototype.findLast=function(e){return this.reverse().find(e)},Ge.prototype.invokeMap=qe(function(e,t){return typeof e=="function"?new Ge(this):this.map(function(o){return Ti(o,e,t)})}),Ge.prototype.reject=function(e){return this.filter(Xo(Ne(e)))},Ge.prototype.slice=function(e,t){e=We(e);var o=this;return o.__filtered__&&(e>0||t<0)?new Ge(o):(e<0?o=o.takeRight(-e):e&&(o=o.drop(e)),t!==r&&(t=We(t),o=t<0?o.dropRight(-t):o.take(t-e)),o)},Ge.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Ge.prototype.toArray=function(){return this.take(v)},Wn(Ge.prototype,function(e,t){var o=/^(?:filter|find|map|reject)|While$/.test(t),a=/^(?:head|last)$/.test(t),y=w[a?"take"+(t=="last"?"Right":""):t],x=a||/^find/.test(t);y&&(w.prototype[t]=function(){var P=this.__wrapped__,j=a?[1]:arguments,q=P instanceof Ge,pe=j[0],ge=q||Fe(P),xe=function(He){var Ke=y.apply(w,cr([He],j));return a&&Ee?Ke[0]:Ke};ge&&o&&typeof pe=="function"&&pe.length!=1&&(q=ge=!1);var Ee=this.__chain__,Le=!!this.__actions__.length,$e=x&&!Ee,Ue=q&&!Le;if(!x&&ge){P=Ue?P:new Ge(this);var Be=e.apply(P,j);return Be.__actions__.push({func:Ko,args:[xe],thisArg:r}),new wn(Be,Ee)}return $e&&Ue?e.apply(this,j):(Be=this.thru(xe),$e?a?Be.value()[0]:Be.value():Be)})}),yn(["pop","push","shift","sort","splice","unshift"],function(e){var t=bo[e],o=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",a=/^(?:pop|shift)$/.test(e);w.prototype[e]=function(){var y=arguments;if(a&&!this.__chain__){var x=this.value();return t.apply(Fe(x)?x:[],y)}return this[o](function(P){return t.apply(Fe(P)?P:[],y)})}}),Wn(Ge.prototype,function(e,t){var o=w[t];if(o){var a=o.name+"";nt.call(Vr,a)||(Vr[a]=[]),Vr[a].push({name:t,func:o})}}),Vr[Wo(r,se).name]=[{name:"wrapper",func:r}],Ge.prototype.clone=yv,Ge.prototype.reverse=_v,Ge.prototype.value=wv,w.prototype.at=Ky,w.prototype.chain=Zy,w.prototype.commit=Qy,w.prototype.next=Jy,w.prototype.plant=e_,w.prototype.reverse=t_,w.prototype.toJSON=w.prototype.valueOf=w.prototype.value=n_,w.prototype.first=w.prototype.head,xi&&(w.prototype[xi]=Xy),w},qr=Q0();xr?((xr.exports=qr)._=qr,Qs._=qr):Ot._=qr}).call(q1)}(vi,vi.exports)),vi.exports}var G1=H1();const V1=rs(G1),tc=(i,n,r="asc")=>V1.orderBy(i,[s=>{if(s[n]===null||s[n]===void 0||s[n]==="")return r==="asc"?Number.MIN_SAFE_INTEGER:Number.MAX_SAFE_INTEGER;const l=s[n];return typeof l=="string"&&/^\d{4}-\d{2}-\d{2}T/.test(l)?new Date(l).getTime():l}],[r]),nc=[10,15,20,50,100,500];function K1(i){const n=An.c(147),{title:r,queryKey:s,connectedQueryKeys:l,apiPath:g,buttons:m,fields:h,selection:C,pagination:D,filters:E,actions:N,steps:R,defaultSort:L,createButtonText:I,queryParams:$,tabs:H,defaultTab:se,activeTab:ue,onActiveTabChange:ae}=i,[ce,Q]=ye.useState(se||(H&&H.length>0?H[0].value:null)),ne=ue!==void 0?ue:ce;let J;n[0]!==ue||n[1]!==ae?(J=ot=>{ue===void 0&&Q(ot),ae&&ae(ot)},n[0]=ue,n[1]=ae,n[2]=J):J=n[2];const V=J;let de,he;if(n[3]!==ne||n[4]!==$||n[5]!==H){const ot=H?.find(tt=>tt.value===ne)?.queryParams||{};de={...$,...ot},he=de?"?"+Object.entries(de).filter(s0).map(o0).join("&"):"",n[3]=ne,n[4]=$,n[5]=H,n[6]=de,n[7]=he}else de=n[6],he=n[7];const re=he;let De;n[8]!==ne||n[9]!==s?(De=ne?[...s,ne]:s,n[8]=ne,n[9]=s,n[10]=De):De=n[10];const Oe=De,{data:k,isLoading:T,isError:S,isRefetching:d,refetch:p}=gl(g+re,Oe);let b;n[11]===Symbol.for("react.memo_cache_sentinel")?(b=[],n[11]=b):b=n[11];const[f,v]=ye.useState(b),{queryClient:A}=rr();let Y;n[12]!==k||n[13]!==l||n[14]!==E||n[15]!==A?(Y=()=>{if(!(!k||!Array.isArray(k))){if(l?.forEach(ot=>A.invalidateQueries({queryKey:ot})),!E||E.length===0){v(k);return}v(k.filter(ot=>E.every(tt=>{if(tt.value===void 0)return!0;const Gt=tt.id;if(tt.type==="query"){const Pt=ot[Gt];return Array.isArray(tt.value)?Array.isArray(Pt)?Pt.some(wt=>{if(typeof wt=="string"||typeof wt=="number")return tt.value.includes(String(wt));if(wt&&typeof wt=="object"){if("id"in wt&&tt.value.includes(wt.id))return!0;for(const Bt in wt){const en=wt[Bt];if(typeof en=="string"&&tt.value.includes(en)||en&&typeof en=="object"&&"id"in en&&tt.value.includes(en.id))return!0}}return!1}):Pt&&typeof Pt=="object"&&"id"in Pt?tt.value.includes(Pt.id):!1:typeof Pt=="string"&&Pt.includes(tt.value)}else if(tt.type==="date"){const Pt=tt.value;if(!Pt)return!0;const[wt,Bt]=Pt;if(!wt&&!Bt)return!0;const en=ot[Gt];if(typeof en=="string"){const Rn=en.split(" ")[0];if(wt&&Bt)return Rn>=wt&&Rn<=Bt;if(wt&&!Bt)return Rn>=wt;if(!wt&&Bt)return Rn<=Bt}return!0}else if(tt.type==="boolean")return ot[Gt]===tt.value;return!0})))}},n[12]=k,n[13]=l,n[14]=E,n[15]=A,n[16]=Y):Y=n[16];let G;n[17]!==k||n[18]!==de||n[19]!==E?(G=[k,E,de],n[17]=k,n[18]=de,n[19]=E,n[20]=G):G=n[20],ye.useEffect(Y,G);const oe=L?.field??h[0].id,le=L?.direction??"desc";let we;n[21]!==oe||n[22]!==le?(we={columnAccessor:oe,direction:le},n[21]=oe,n[22]=le,n[23]=we):we=n[23];const[X,be]=ye.useState(we);let _e;n[24]!==f||n[25]!==L?.direction||n[26]!==L?.field||n[27]!==h[0]?(_e=()=>tc(f,L?.field??h[0].id,L?.direction??"desc"),n[24]=f,n[25]=L?.direction,n[26]=L?.field,n[27]=h[0],n[28]=_e):_e=n[28];const[ve,B]=ye.useState(_e);let Z;n[29]!==f||n[30]!==X.columnAccessor||n[31]!==X.direction?(Z=()=>{B(tc(f,X.columnAccessor,X.direction))},n[29]=f,n[30]=X.columnAccessor,n[31]=X.direction,n[32]=Z):Z=n[32];let W;n[33]!==f||n[34]!==X?(W=[X,f],n[33]=f,n[34]=X,n[35]=W):W=n[35],ye.useEffect(Z,W);const[K,ee]=Xl(nc[1],"mantine-table-page-size"),[Se,u]=ye.useState(1);let c;n[36]!==K||n[37]!==D||n[38]!==ve?(c=D?ve.slice(0,K):ve,n[36]=K,n[37]=D,n[38]=ve,n[39]=c):c=n[39];const[_,M]=ye.useState(c);let U;n[40]===Symbol.for("react.memo_cache_sentinel")?(U=()=>{u(1)},n[40]=U):U=n[40];let te;n[41]!==K?(te=[K],n[41]=K,n[42]=te):te=n[42],ye.useEffect(U,te);let Ae,Ce;n[43]!==Se||n[44]!==K||n[45]!==D||n[46]!==ve?(Ae=()=>{if(D){const ot=(Se-1)*K,tt=ot+K;M(ve.slice(ot,tt))}else M(ve)},Ce=[Se,ve,D,K],n[43]=Se,n[44]=K,n[45]=D,n[46]=ve,n[47]=Ae,n[48]=Ce):(Ae=n[47],Ce=n[48]),ye.useEffect(Ae,Ce);let Pe;n[49]===Symbol.for("react.memo_cache_sentinel")?(Pe=[],n[49]=Pe):Pe=n[49];const[me,Re]=ye.useState(Pe);let Ie;n[50]!==me||n[51]!==C||n[52]!==ve?(Ie=()=>{C&&Re(ve.filter(ot=>me.some(tt=>tt.id===ot.id)))},n[50]=me,n[51]=C,n[52]=ve,n[53]=Ie):Ie=n[53];let ke;n[54]!==ve?(ke=[ve],n[54]=ve,n[55]=ke):ke=n[55],ye.useEffect(Ie,ke);let Je;n[56]===Symbol.for("react.memo_cache_sentinel")?(Je=()=>{Re([])},n[56]=Je):Je=n[56];let Ze;n[57]!==ne?(Ze=[ne],n[57]=ne,n[58]=Ze):Ze=n[58],ye.useEffect(Je,Ze);const[rt,Tt]=ye.useState(!1),[pt,it]=ye.useState(!1),[Tn,At]=ye.useState(!1),Pn=r?"space-between":"end";let Dt;n[59]!==r?(Dt=r&&(typeof r=="string"?O.jsx(F.Title,{order:4,children:r}):r),n[59]=r,n[60]=Dt):Dt=n[60];let Wt;n[61]!==p?(Wt=()=>p(),n[61]=p,n[62]=Wt):Wt=n[62];let Mn;n[63]===Symbol.for("react.memo_cache_sentinel")?(Mn=O.jsx(ti.IconRefresh,{}),n[63]=Mn):Mn=n[63];let yt;n[64]!==Wt?(yt=O.jsx(F.ActionIcon,{variant:"subtle",onClick:Wt,"aria-label":"Neuladen",children:Mn}),n[64]=Wt,n[65]=yt):yt=n[65];let fn;n[66]!==N||n[67]!==h||n[68]!==me||n[69]!==C?(fn=(h.some(i0)||C)&&O.jsxs(F.Menu,{shadow:"md",children:[O.jsx(F.Menu.Target,{children:O.jsx(F.Button,{variant:"outline",rightSection:O.jsx(ti.IconCaretDownFilled,{size:14}),disabled:!me.length,children:"Aktionen"})}),O.jsxs(F.Menu.Dropdown,{children:[h.find(r0)&&O.jsx(F.Menu.Item,{leftSection:O.jsx(ti.IconPencil,{size:14}),onClick:()=>it(!0),disabled:me.length!==1,children:"Bearbeiten"}),(N??[]).map((ot,tt)=>ye.createElement(F.Menu.Item,{...ot.icon&&{leftSection:ot.icon},key:`custom_action_${tt}`,onClick:()=>ot.onClick(me)},ot.label)),h.find(n0)&&O.jsx(F.Menu.Item,{leftSection:O.jsx(ti.IconTrash,{size:14}),onClick:()=>At(!0),color:"red",children:"Löschen"})]})]}),n[66]=N,n[67]=h,n[68]=me,n[69]=C,n[70]=fn):fn=n[70];let hn;n[71]!==I||n[72]!==h||n[73]!==T?(hn=h.find(t0)&&O.jsx(F.Button,{onClick:()=>Tt(!0),disabled:T,children:I??"Erstellen"}),n[71]=I,n[72]=h,n[73]=T,n[74]=hn):hn=n[74];let Ut;n[75]!==m||n[76]!==yt||n[77]!==fn||n[78]!==hn?(Ut=O.jsxs(F.Group,{align:"center",gap:"xs",children:[yt,fn,hn,m]}),n[75]=m,n[76]=yt,n[77]=fn,n[78]=hn,n[79]=Ut):Ut=n[79];let It;n[80]!==Pn||n[81]!==Dt||n[82]!==Ut?(It=O.jsxs(F.Group,{gap:"xs",justify:Pn,align:"center",children:[Dt,Ut]}),n[80]=Pn,n[81]=Dt,n[82]=Ut,n[83]=It):It=n[83];let zt;n[84]!==ne||n[85]!==V||n[86]!==H?(zt=H&&H.length>0&&O.jsx(F.Tabs,{value:ne,onChange:V,mt:"md",children:O.jsx(F.Tabs.List,{children:H.map(e0)})}),n[84]=ne,n[85]=V,n[86]=H,n[87]=zt):zt=n[87];let qt;n[88]!==S?(qt=S&&O.jsx(F.Alert,{mt:"md",variant:"light",color:"red",title:"Es ist ein Fehler aufgetreten.",icon:O.jsx(ti.IconInfoCircle,{}),children:"Bitte versuche es später erneut oder sende eine Nachricht an unseren Support."}),n[88]=S,n[89]=qt):qt=n[89];let Jt;n[90]!==T||n[91]!==d?(Jt=(T||d)&&O.jsxs(F.Stack,{my:"md",children:[O.jsx(F.Skeleton,{height:40}),Array(5).fill(0).map(X1)]}),n[90]=T,n[91]=d,n[92]=Jt):Jt=n[92];let Ht;n[93]!==h||n[94]!==S||n[95]!==T||n[96]!==d||n[97]!==Se||n[98]!==K||n[99]!==D||n[100]!==_||n[101]!==me||n[102]!==C||n[103]!==ee||n[104]!==X||n[105]!==ve?(Ht=!T&&!d&&O.jsx(B1,{my:"md",striped:!0,minHeight:150,fetching:S,records:_,sortStatus:X,onSortStatusChange:be,...C&&{selectedRecords:me,onSelectedRecordsChange:Re},...D&&_.length&&{totalRecords:ve.length,recordsPerPage:K,onPageChange:u,page:Se,recordsPerPageOptions:nc,onRecordsPerPageChange:ee,recordsPerPageLabel:"Einträge pro Seite"},columns:h.map(J1),noRecordsText:"Keine Einträge gefunden"}),n[93]=h,n[94]=S,n[95]=T,n[96]=d,n[97]=Se,n[98]=K,n[99]=D,n[100]=_,n[101]=me,n[102]=C,n[103]=ee,n[104]=X,n[105]=ve,n[106]=Ht):Ht=n[106];let ze;n[107]===Symbol.for("react.memo_cache_sentinel")?(ze=()=>{it(!1),Re([])},n[107]=ze):ze=n[107];const ut=r??"Bearbeiten";let $t;n[108]!==g||n[109]!==h||n[110]!==s||n[111]!==me[0]||n[112]!==me.length||n[113]!==R?($t=me.length>0&&O.jsx(Ql,{fields:h.filter(Q1),queryKey:s,apiPath:g,id:me[0].id,onClose:()=>{it(!1),Re([])},steps:R}),n[108]=g,n[109]=h,n[110]=s,n[111]=me[0],n[112]=me.length,n[113]=R,n[114]=$t):$t=n[114];let Xt;n[115]!==ut||n[116]!==$t||n[117]!==pt?(Xt=O.jsx(F.Modal,{opened:pt,onClose:ze,title:ut,children:$t}),n[115]=ut,n[116]=$t,n[117]=pt,n[118]=Xt):Xt=n[118];let $n;n[119]!==g||n[120]!==Tn||n[121]!==s||n[122]!==me||n[123]!==r?($n=me.length>0&&O.jsx(F.Modal,{opened:Tn,onClose:()=>{At(!1),Re([])},title:r??"Löschen",children:O.jsx(Jl,{onClose:()=>{At(!1),Re([])},queryKey:s,apiPath:g,selectedRecords:me})}),n[119]=g,n[120]=Tn,n[121]=s,n[122]=me,n[123]=r,n[124]=$n):$n=n[124];let dn;n[125]===Symbol.for("react.memo_cache_sentinel")?(dn=()=>{Tt(!1)},n[125]=dn):dn=n[125];const wr=r??"Anlegen";let pn;n[126]===Symbol.for("react.memo_cache_sentinel")?(pn=()=>{Tt(!1)},n[126]=pn):pn=n[126];let Bn;n[127]!==h?(Bn=h.filter(Z1),n[127]=h,n[128]=Bn):Bn=n[128];let gn;n[129]!==g||n[130]!==s||n[131]!==R||n[132]!==Bn?(gn=O.jsx(jl,{queryKey:s,apiPath:g,onClose:pn,fields:Bn,steps:R}),n[129]=g,n[130]=s,n[131]=R,n[132]=Bn,n[133]=gn):gn=n[133];let vn;n[134]!==rt||n[135]!==wr||n[136]!==gn?(vn=O.jsx(F.Modal,{opened:rt,onClose:dn,title:wr,children:gn}),n[134]=rt,n[135]=wr,n[136]=gn,n[137]=vn):vn=n[137];let _t;return n[138]!==It||n[139]!==zt||n[140]!==qt||n[141]!==Jt||n[142]!==Ht||n[143]!==Xt||n[144]!==$n||n[145]!==vn?(_t=O.jsxs(O.Fragment,{children:[It,zt,qt,Jt,Ht,Xt,$n,vn]}),n[138]=It,n[139]=zt,n[140]=qt,n[141]=Jt,n[142]=Ht,n[143]=Xt,n[144]=$n,n[145]=vn,n[146]=_t):_t=n[146],_t}function Z1(i){return i.create}function Q1(i){return i.update}function J1(i){return i.column}function X1(i,n){return O.jsx(F.Skeleton,{height:35},`skeleton-${n}`)}function e0(i){return O.jsx(F.Tabs.Tab,{value:i.value,leftSection:i.icon,children:i.label},i.value)}function t0(i){return i.create}function n0(i){return i.delete}function r0(i){return i.update}function i0(i){return i.update}function o0(i){const[n,r]=i;return`${n}=${encodeURIComponent(r??"")}`}function s0(i){const[,n]=i;return n!=null}function a0(i){const n=An.c(5),{queryClient:r}=rr();let s;n[0]!==i?(s=O.jsx(K1,{...i}),n[0]=i,n[1]=s):s=n[1];let l;return n[2]!==r||n[3]!==s?(l=O.jsx(wu,{client:r,children:s}),n[2]=r,n[3]=s,n[4]=l):l=n[4],l}et.CreateModal=jl,et.DataTable=a0,et.DataTableProvider=zp,et.DeleteModal=Jl,et.UpdateModal=Ql,et.api=Hp,et.createOne=hl,et.deleteOne=fl,et.getAll=ll,et.getApiHeaders=_r,et.getOne=cl,et.updateOne=dl,et.useAddOne=vl,et.useDataTable=rr,et.useDeleteOne=ml,et.useGetAll=gl,et.useGetOne=pl,et.usePersistentState=Xl,et.useUpdateOne=Ms,Object.defineProperty(et,Symbol.toStringTag,{value:"Module"})});
|
|
143
|
+
}`;var Ue=gh(function(){return Qe(x,Le+"return "+xe).apply(r,P)});if(Ue.source=xe,qa(Ue))throw Ue;return Ue}function h2(e){return Xe(e).toLowerCase()}function d2(e){return Xe(e).toUpperCase()}function p2(e,t,o){if(e=Xe(e),e&&(o||t===r))return Cc(e);if(!e||!(t=rn(t)))return e;var a=kn(e),y=kn(t),x=Sc(a,y),P=Ac(a,y)+1;return vr(a,x,P).join("")}function g2(e,t,o){if(e=Xe(e),e&&(o||t===r))return e.slice(0,Oc(e)+1);if(!e||!(t=rn(t)))return e;var a=kn(e),y=Ac(a,kn(t))+1;return vr(a,0,y).join("")}function v2(e,t,o){if(e=Xe(e),e&&(o||t===r))return e.replace(ut,"");if(!e||!(t=rn(t)))return e;var a=kn(e),y=Sc(a,kn(t));return vr(a,y).join("")}function m2(e,t){var o=he,a=re;if(ft(t)){var y="separator"in t?t.separator:y;o="length"in t?We(t.length):o,a="omission"in t?rn(t.omission):a}e=Xe(e);var x=e.length;if(Ur(e)){var P=kn(e);x=P.length}if(o>=x)return e;var j=o-zr(a);if(j<1)return a;var q=P?vr(P,0,j).join(""):e.slice(0,j);if(y===r)return q+a;if(P&&(j+=q.length-j),Ha(y)){if(e.slice(j).search(y)){var pe,ge=q;for(y.global||(y=ua(y.source,Xe(vn.exec(y))+"g")),y.lastIndex=0;pe=y.exec(ge);)var xe=pe.index;q=q.slice(0,xe===r?j:xe)}}else if(e.indexOf(rn(y),j)!=j){var Ee=q.lastIndexOf(y);Ee>-1&&(q=q.slice(0,Ee))}return q+a}function y2(e){return e=Xe(e),e&&yt.test(e)?e.replace(Wt,G0):e}var _2=Qr(function(e,t,o){return e+(o?" ":"")+t.toUpperCase()}),Ka=vf("toUpperCase");function ph(e,t,o){return e=Xe(e),t=o?r:t,t===r?W0(e)?Z0(e):k0(e):e.match(t)||[]}var gh=qe(function(e,t){try{return tn(e,r,t)}catch(o){return qa(o)?o:new Ye(o)}}),w2=Zn(function(e,t){return yn(t,function(o){o=zn(o),Vn(e,o,Ua(e[o],e))}),e});function b2(e){var t=e==null?0:e.length,o=Ne();return e=t?ct(e,function(a){if(typeof a[1]!="function")throw new _n(m);return[o(a[0]),a[1]]}):[],qe(function(a){for(var y=-1;++y<t;){var x=e[y];if(tn(x[0],this,a))return tn(x[1],this,a)}})}function x2(e){return Gv(bn(e,N))}function Za(e){return function(){return e}}function C2(e,t){return e==null||e!==e?t:e}var S2=yf(),A2=yf(!0);function Qt(e){return e}function Qa(e){return Gc(typeof e=="function"?e:bn(e,N))}function D2(e){return Kc(bn(e,N))}function O2(e,t){return Zc(e,bn(t,N))}var E2=qe(function(e,t){return function(o){return Ti(o,e,t)}}),T2=qe(function(e,t){return function(o){return Ti(e,o,t)}});function Ja(e,t,o){var a=Ct(t),y=$o(t,a);o==null&&!(ft(t)&&(y.length||!a.length))&&(o=t,t=e,e=this,y=$o(t,Ct(t)));var x=!(ft(o)&&"chain"in o)||!!o.chain,P=Jn(e);return yn(y,function(j){var q=t[j];e[j]=q,P&&(e.prototype[j]=function(){var pe=this.__chain__;if(x||pe){var ge=e(this.__wrapped__),xe=ge.__actions__=Vt(this.__actions__);return xe.push({func:q,args:arguments,thisArg:e}),ge.__chain__=pe,ge}return q.apply(e,cr([this.value()],arguments))})}),e}function P2(){return Ot._===this&&(Ot._=nv),this}function Xa(){}function M2(e){return e=We(e),qe(function(t){return Qc(t,e)})}var R2=Pa(ct),k2=Pa(yc),L2=Pa(ta);function vh(e){return $a(e)?na(zn(e)):cm(e)}function N2(e){return function(t){return e==null?r:Or(e,t)}}var I2=wf(),$2=wf(!0);function eu(){return[]}function tu(){return!1}function B2(){return{}}function j2(){return""}function Y2(){return!0}function F2(e,t){if(e=We(e),e<1||e>p)return[];var o=v,a=Mt(e,v);t=Ne(t),e-=v;for(var y=oa(a,t);++o<e;)t(o);return y}function W2(e){return Fe(e)?ct(e,zn):on(e)?[e]:Vt(If(Xe(e)))}function U2(e){var t=++ev;return Xe(e)+t}var z2=Uo(function(e,t){return e+t},0),q2=Ma("ceil"),H2=Uo(function(e,t){return e/t},1),G2=Ma("floor");function V2(e){return e&&e.length?Io(e,Qt,va):r}function K2(e,t){return e&&e.length?Io(e,Ne(t,2),va):r}function Z2(e){return bc(e,Qt)}function Q2(e,t){return bc(e,Ne(t,2))}function J2(e){return e&&e.length?Io(e,Qt,wa):r}function X2(e,t){return e&&e.length?Io(e,Ne(t,2),wa):r}var eb=Uo(function(e,t){return e*t},1),tb=Ma("round"),nb=Uo(function(e,t){return e-t},0);function rb(e){return e&&e.length?ia(e,Qt):0}function ib(e,t){return e&&e.length?ia(e,Ne(t,2)):0}return w.after=D_,w.ary=Gf,w.assign=dw,w.assignIn=ah,w.assignInWith=ns,w.assignWith=pw,w.at=gw,w.before=Vf,w.bind=Ua,w.bindAll=w2,w.bindKey=Kf,w.castArray=B_,w.chain=zf,w.chunk=Gm,w.compact=Vm,w.concat=Km,w.cond=b2,w.conforms=x2,w.constant=Za,w.countBy=r_,w.create=vw,w.curry=Zf,w.curryRight=Qf,w.debounce=Jf,w.defaults=mw,w.defaultsDeep=yw,w.defer=O_,w.delay=E_,w.difference=Zm,w.differenceBy=Qm,w.differenceWith=Jm,w.drop=Xm,w.dropRight=ey,w.dropRightWhile=ty,w.dropWhile=ny,w.fill=ry,w.filter=o_,w.flatMap=u_,w.flatMapDeep=l_,w.flatMapDepth=c_,w.flatten=Yf,w.flattenDeep=iy,w.flattenDepth=oy,w.flip=T_,w.flow=S2,w.flowRight=A2,w.fromPairs=sy,w.functions=Aw,w.functionsIn=Dw,w.groupBy=f_,w.initial=uy,w.intersection=ly,w.intersectionBy=cy,w.intersectionWith=fy,w.invert=Ew,w.invertBy=Tw,w.invokeMap=d_,w.iteratee=Qa,w.keyBy=p_,w.keys=Ct,w.keysIn=Zt,w.map=Zo,w.mapKeys=Mw,w.mapValues=Rw,w.matches=D2,w.matchesProperty=O2,w.memoize=Jo,w.merge=kw,w.mergeWith=uh,w.method=E2,w.methodOf=T2,w.mixin=Ja,w.negate=Xo,w.nthArg=M2,w.omit=Lw,w.omitBy=Nw,w.once=P_,w.orderBy=g_,w.over=R2,w.overArgs=M_,w.overEvery=k2,w.overSome=L2,w.partial=za,w.partialRight=Xf,w.partition=v_,w.pick=Iw,w.pickBy=lh,w.property=vh,w.propertyOf=N2,w.pull=gy,w.pullAll=Wf,w.pullAllBy=vy,w.pullAllWith=my,w.pullAt=yy,w.range=I2,w.rangeRight=$2,w.rearg=R_,w.reject=__,w.remove=_y,w.rest=k_,w.reverse=Fa,w.sampleSize=b_,w.set=Bw,w.setWith=jw,w.shuffle=x_,w.slice=wy,w.sortBy=A_,w.sortedUniq=Oy,w.sortedUniqBy=Ey,w.split=u2,w.spread=L_,w.tail=Ty,w.take=Py,w.takeRight=My,w.takeRightWhile=Ry,w.takeWhile=ky,w.tap=Vy,w.throttle=N_,w.thru=Ko,w.toArray=ih,w.toPairs=ch,w.toPairsIn=fh,w.toPath=W2,w.toPlainObject=sh,w.transform=Yw,w.unary=I_,w.union=Ly,w.unionBy=Ny,w.unionWith=Iy,w.uniq=$y,w.uniqBy=By,w.uniqWith=jy,w.unset=Fw,w.unzip=Wa,w.unzipWith=Uf,w.update=Ww,w.updateWith=Uw,w.values=ei,w.valuesIn=zw,w.without=Yy,w.words=ph,w.wrap=$_,w.xor=Fy,w.xorBy=Wy,w.xorWith=Uy,w.zip=zy,w.zipObject=qy,w.zipObjectDeep=Hy,w.zipWith=Gy,w.entries=ch,w.entriesIn=fh,w.extend=ah,w.extendWith=ns,Ja(w,w),w.add=z2,w.attempt=gh,w.camelCase=Vw,w.capitalize=hh,w.ceil=q2,w.clamp=qw,w.clone=j_,w.cloneDeep=F_,w.cloneDeepWith=W_,w.cloneWith=Y_,w.conformsTo=U_,w.deburr=dh,w.defaultTo=C2,w.divide=H2,w.endsWith=Kw,w.eq=Nn,w.escape=Zw,w.escapeRegExp=Qw,w.every=i_,w.find=s_,w.findIndex=Bf,w.findKey=_w,w.findLast=a_,w.findLastIndex=jf,w.findLastKey=ww,w.floor=G2,w.forEach=qf,w.forEachRight=Hf,w.forIn=bw,w.forInRight=xw,w.forOwn=Cw,w.forOwnRight=Sw,w.get=Ga,w.gt=z_,w.gte=q_,w.has=Ow,w.hasIn=Va,w.head=Ff,w.identity=Qt,w.includes=h_,w.indexOf=ay,w.inRange=Hw,w.invoke=Pw,w.isArguments=Pr,w.isArray=Fe,w.isArrayBuffer=H_,w.isArrayLike=Kt,w.isArrayLikeObject=gt,w.isBoolean=G_,w.isBuffer=mr,w.isDate=V_,w.isElement=K_,w.isEmpty=Z_,w.isEqual=Q_,w.isEqualWith=J_,w.isError=qa,w.isFinite=X_,w.isFunction=Jn,w.isInteger=eh,w.isLength=es,w.isMap=th,w.isMatch=ew,w.isMatchWith=tw,w.isNaN=nw,w.isNative=rw,w.isNil=ow,w.isNull=iw,w.isNumber=nh,w.isObject=ft,w.isObjectLike=dt,w.isPlainObject=Ni,w.isRegExp=Ha,w.isSafeInteger=sw,w.isSet=rh,w.isString=ts,w.isSymbol=on,w.isTypedArray=Xr,w.isUndefined=aw,w.isWeakMap=uw,w.isWeakSet=lw,w.join=hy,w.kebabCase=Jw,w.last=Cn,w.lastIndexOf=dy,w.lowerCase=Xw,w.lowerFirst=e2,w.lt=cw,w.lte=fw,w.max=V2,w.maxBy=K2,w.mean=Z2,w.meanBy=Q2,w.min=J2,w.minBy=X2,w.stubArray=eu,w.stubFalse=tu,w.stubObject=B2,w.stubString=j2,w.stubTrue=Y2,w.multiply=eb,w.nth=py,w.noConflict=P2,w.noop=Xa,w.now=Qo,w.pad=t2,w.padEnd=n2,w.padStart=r2,w.parseInt=i2,w.random=Gw,w.reduce=m_,w.reduceRight=y_,w.repeat=o2,w.replace=s2,w.result=$w,w.round=tb,w.runInContext=z,w.sample=w_,w.size=C_,w.snakeCase=a2,w.some=S_,w.sortedIndex=by,w.sortedIndexBy=xy,w.sortedIndexOf=Cy,w.sortedLastIndex=Sy,w.sortedLastIndexBy=Ay,w.sortedLastIndexOf=Dy,w.startCase=l2,w.startsWith=c2,w.subtract=nb,w.sum=rb,w.sumBy=ib,w.template=f2,w.times=F2,w.toFinite=Xn,w.toInteger=We,w.toLength=oh,w.toLower=h2,w.toNumber=Sn,w.toSafeInteger=hw,w.toString=Xe,w.toUpper=d2,w.trim=p2,w.trimEnd=g2,w.trimStart=v2,w.truncate=m2,w.unescape=y2,w.uniqueId=U2,w.upperCase=_2,w.upperFirst=Ka,w.each=qf,w.eachRight=Hf,w.first=Ff,Ja(w,function(){var e={};return Wn(w,function(t,o){nt.call(w.prototype,o)||(e[o]=t)}),e}(),{chain:!1}),w.VERSION=s,yn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){w[e].placeholder=w}),yn(["drop","take"],function(e,t){Ge.prototype[e]=function(o){o=o===r?1:xt(We(o),0);var a=this.__filtered__&&!t?new Ge(this):this.clone();return a.__filtered__?a.__takeCount__=Mt(o,a.__takeCount__):a.__views__.push({size:Mt(o,v),type:e+(a.__dir__<0?"Right":"")}),a},Ge.prototype[e+"Right"]=function(o){return this.reverse()[e](o).reverse()}}),yn(["filter","map","takeWhile"],function(e,t){var o=t+1,a=o==k||o==S;Ge.prototype[e]=function(y){var x=this.clone();return x.__iteratees__.push({iteratee:Ne(y,3),type:o}),x.__filtered__=x.__filtered__||a,x}}),yn(["head","last"],function(e,t){var o="take"+(t?"Right":"");Ge.prototype[e]=function(){return this[o](1).value()[0]}}),yn(["initial","tail"],function(e,t){var o="drop"+(t?"":"Right");Ge.prototype[e]=function(){return this.__filtered__?new Ge(this):this[o](1)}}),Ge.prototype.compact=function(){return this.filter(Qt)},Ge.prototype.find=function(e){return this.filter(e).head()},Ge.prototype.findLast=function(e){return this.reverse().find(e)},Ge.prototype.invokeMap=qe(function(e,t){return typeof e=="function"?new Ge(this):this.map(function(o){return Ti(o,e,t)})}),Ge.prototype.reject=function(e){return this.filter(Xo(Ne(e)))},Ge.prototype.slice=function(e,t){e=We(e);var o=this;return o.__filtered__&&(e>0||t<0)?new Ge(o):(e<0?o=o.takeRight(-e):e&&(o=o.drop(e)),t!==r&&(t=We(t),o=t<0?o.dropRight(-t):o.take(t-e)),o)},Ge.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Ge.prototype.toArray=function(){return this.take(v)},Wn(Ge.prototype,function(e,t){var o=/^(?:filter|find|map|reject)|While$/.test(t),a=/^(?:head|last)$/.test(t),y=w[a?"take"+(t=="last"?"Right":""):t],x=a||/^find/.test(t);y&&(w.prototype[t]=function(){var P=this.__wrapped__,j=a?[1]:arguments,q=P instanceof Ge,pe=j[0],ge=q||Fe(P),xe=function(He){var Ke=y.apply(w,cr([He],j));return a&&Ee?Ke[0]:Ke};ge&&o&&typeof pe=="function"&&pe.length!=1&&(q=ge=!1);var Ee=this.__chain__,Le=!!this.__actions__.length,$e=x&&!Ee,Ue=q&&!Le;if(!x&&ge){P=Ue?P:new Ge(this);var Be=e.apply(P,j);return Be.__actions__.push({func:Ko,args:[xe],thisArg:r}),new wn(Be,Ee)}return $e&&Ue?e.apply(this,j):(Be=this.thru(xe),$e?a?Be.value()[0]:Be.value():Be)})}),yn(["pop","push","shift","sort","splice","unshift"],function(e){var t=bo[e],o=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",a=/^(?:pop|shift)$/.test(e);w.prototype[e]=function(){var y=arguments;if(a&&!this.__chain__){var x=this.value();return t.apply(Fe(x)?x:[],y)}return this[o](function(P){return t.apply(Fe(P)?P:[],y)})}}),Wn(Ge.prototype,function(e,t){var o=w[t];if(o){var a=o.name+"";nt.call(Vr,a)||(Vr[a]=[]),Vr[a].push({name:t,func:o})}}),Vr[Wo(r,se).name]=[{name:"wrapper",func:r}],Ge.prototype.clone=yv,Ge.prototype.reverse=_v,Ge.prototype.value=wv,w.prototype.at=Ky,w.prototype.chain=Zy,w.prototype.commit=Qy,w.prototype.next=Jy,w.prototype.plant=e_,w.prototype.reverse=t_,w.prototype.toJSON=w.prototype.valueOf=w.prototype.value=n_,w.prototype.first=w.prototype.head,xi&&(w.prototype[xi]=Xy),w},qr=Q0();xr?((xr.exports=qr)._=qr,Qs._=qr):Ot._=qr}).call(q1)}(vi,vi.exports)),vi.exports}var G1=H1();const V1=rs(G1),tc=(i,n,r="asc")=>V1.orderBy(i,[s=>{if(s[n]===null||s[n]===void 0||s[n]==="")return r==="asc"?Number.MIN_SAFE_INTEGER:Number.MAX_SAFE_INTEGER;const l=s[n];return typeof l=="string"&&/^\d{4}-\d{2}-\d{2}T/.test(l)?new Date(l).getTime():typeof l=="string"?l.toLowerCase():l}],[r]),nc=[10,15,20,50,100,500];function K1(i){const n=An.c(147),{title:r,queryKey:s,connectedQueryKeys:l,apiPath:g,buttons:m,fields:h,selection:C,pagination:D,filters:E,actions:N,steps:R,defaultSort:L,createButtonText:I,queryParams:$,tabs:H,defaultTab:se,activeTab:ue,onActiveTabChange:ae}=i,[ce,Q]=ye.useState(se||(H&&H.length>0?H[0].value:null)),ne=ue!==void 0?ue:ce;let J;n[0]!==ue||n[1]!==ae?(J=ot=>{ue===void 0&&Q(ot),ae&&ae(ot)},n[0]=ue,n[1]=ae,n[2]=J):J=n[2];const V=J;let de,he;if(n[3]!==ne||n[4]!==$||n[5]!==H){const ot=H?.find(tt=>tt.value===ne)?.queryParams||{};de={...$,...ot},he=de?"?"+Object.entries(de).filter(s0).map(o0).join("&"):"",n[3]=ne,n[4]=$,n[5]=H,n[6]=de,n[7]=he}else de=n[6],he=n[7];const re=he;let De;n[8]!==ne||n[9]!==s?(De=ne?[...s,ne]:s,n[8]=ne,n[9]=s,n[10]=De):De=n[10];const Oe=De,{data:k,isLoading:T,isError:S,isRefetching:d,refetch:p}=gl(g+re,Oe);let b;n[11]===Symbol.for("react.memo_cache_sentinel")?(b=[],n[11]=b):b=n[11];const[f,v]=ye.useState(b),{queryClient:A}=rr();let Y;n[12]!==k||n[13]!==l||n[14]!==E||n[15]!==A?(Y=()=>{if(!(!k||!Array.isArray(k))){if(l?.forEach(ot=>A.invalidateQueries({queryKey:ot})),!E||E.length===0){v(k);return}v(k.filter(ot=>E.every(tt=>{if(tt.value===void 0)return!0;const Gt=tt.id;if(tt.type==="query"){const Pt=ot[Gt];return Array.isArray(tt.value)?Array.isArray(Pt)?Pt.some(wt=>{if(typeof wt=="string"||typeof wt=="number")return tt.value.includes(String(wt));if(wt&&typeof wt=="object"){if("id"in wt&&tt.value.includes(wt.id))return!0;for(const Bt in wt){const en=wt[Bt];if(typeof en=="string"&&tt.value.includes(en)||en&&typeof en=="object"&&"id"in en&&tt.value.includes(en.id))return!0}}return!1}):Pt&&typeof Pt=="object"&&"id"in Pt?tt.value.includes(Pt.id):!1:typeof Pt=="string"&&Pt.includes(tt.value)}else if(tt.type==="date"){const Pt=tt.value;if(!Pt)return!0;const[wt,Bt]=Pt;if(!wt&&!Bt)return!0;const en=ot[Gt];if(typeof en=="string"){const Rn=en.split(" ")[0];if(wt&&Bt)return Rn>=wt&&Rn<=Bt;if(wt&&!Bt)return Rn>=wt;if(!wt&&Bt)return Rn<=Bt}return!0}else if(tt.type==="boolean")return ot[Gt]===tt.value;return!0})))}},n[12]=k,n[13]=l,n[14]=E,n[15]=A,n[16]=Y):Y=n[16];let G;n[17]!==k||n[18]!==de||n[19]!==E?(G=[k,E,de],n[17]=k,n[18]=de,n[19]=E,n[20]=G):G=n[20],ye.useEffect(Y,G);const oe=L?.field??h[0].id,le=L?.direction??"desc";let we;n[21]!==oe||n[22]!==le?(we={columnAccessor:oe,direction:le},n[21]=oe,n[22]=le,n[23]=we):we=n[23];const[X,be]=ye.useState(we);let _e;n[24]!==f||n[25]!==L?.direction||n[26]!==L?.field||n[27]!==h[0]?(_e=()=>tc(f,L?.field??h[0].id,L?.direction??"desc"),n[24]=f,n[25]=L?.direction,n[26]=L?.field,n[27]=h[0],n[28]=_e):_e=n[28];const[ve,B]=ye.useState(_e);let Z;n[29]!==f||n[30]!==X.columnAccessor||n[31]!==X.direction?(Z=()=>{B(tc(f,X.columnAccessor,X.direction))},n[29]=f,n[30]=X.columnAccessor,n[31]=X.direction,n[32]=Z):Z=n[32];let W;n[33]!==f||n[34]!==X?(W=[X,f],n[33]=f,n[34]=X,n[35]=W):W=n[35],ye.useEffect(Z,W);const[K,ee]=Xl(nc[1],"mantine-table-page-size"),[Se,u]=ye.useState(1);let c;n[36]!==K||n[37]!==D||n[38]!==ve?(c=D?ve.slice(0,K):ve,n[36]=K,n[37]=D,n[38]=ve,n[39]=c):c=n[39];const[_,M]=ye.useState(c);let U;n[40]===Symbol.for("react.memo_cache_sentinel")?(U=()=>{u(1)},n[40]=U):U=n[40];let te;n[41]!==K?(te=[K],n[41]=K,n[42]=te):te=n[42],ye.useEffect(U,te);let Ae,Ce;n[43]!==Se||n[44]!==K||n[45]!==D||n[46]!==ve?(Ae=()=>{if(D){const ot=(Se-1)*K,tt=ot+K;M(ve.slice(ot,tt))}else M(ve)},Ce=[Se,ve,D,K],n[43]=Se,n[44]=K,n[45]=D,n[46]=ve,n[47]=Ae,n[48]=Ce):(Ae=n[47],Ce=n[48]),ye.useEffect(Ae,Ce);let Pe;n[49]===Symbol.for("react.memo_cache_sentinel")?(Pe=[],n[49]=Pe):Pe=n[49];const[me,Re]=ye.useState(Pe);let Ie;n[50]!==me||n[51]!==C||n[52]!==ve?(Ie=()=>{C&&Re(ve.filter(ot=>me.some(tt=>tt.id===ot.id)))},n[50]=me,n[51]=C,n[52]=ve,n[53]=Ie):Ie=n[53];let ke;n[54]!==ve?(ke=[ve],n[54]=ve,n[55]=ke):ke=n[55],ye.useEffect(Ie,ke);let Je;n[56]===Symbol.for("react.memo_cache_sentinel")?(Je=()=>{Re([])},n[56]=Je):Je=n[56];let Ze;n[57]!==ne?(Ze=[ne],n[57]=ne,n[58]=Ze):Ze=n[58],ye.useEffect(Je,Ze);const[rt,Tt]=ye.useState(!1),[pt,it]=ye.useState(!1),[Tn,At]=ye.useState(!1),Pn=r?"space-between":"end";let Dt;n[59]!==r?(Dt=r&&(typeof r=="string"?O.jsx(F.Title,{order:4,children:r}):r),n[59]=r,n[60]=Dt):Dt=n[60];let Wt;n[61]!==p?(Wt=()=>p(),n[61]=p,n[62]=Wt):Wt=n[62];let Mn;n[63]===Symbol.for("react.memo_cache_sentinel")?(Mn=O.jsx(ti.IconRefresh,{}),n[63]=Mn):Mn=n[63];let yt;n[64]!==Wt?(yt=O.jsx(F.ActionIcon,{variant:"subtle",onClick:Wt,"aria-label":"Neuladen",children:Mn}),n[64]=Wt,n[65]=yt):yt=n[65];let fn;n[66]!==N||n[67]!==h||n[68]!==me||n[69]!==C?(fn=(h.some(i0)||C)&&O.jsxs(F.Menu,{shadow:"md",children:[O.jsx(F.Menu.Target,{children:O.jsx(F.Button,{variant:"outline",rightSection:O.jsx(ti.IconCaretDownFilled,{size:14}),disabled:!me.length,children:"Aktionen"})}),O.jsxs(F.Menu.Dropdown,{children:[h.find(r0)&&O.jsx(F.Menu.Item,{leftSection:O.jsx(ti.IconPencil,{size:14}),onClick:()=>it(!0),disabled:me.length!==1,children:"Bearbeiten"}),(N??[]).map((ot,tt)=>ye.createElement(F.Menu.Item,{...ot.icon&&{leftSection:ot.icon},key:`custom_action_${tt}`,onClick:()=>ot.onClick(me)},ot.label)),h.find(n0)&&O.jsx(F.Menu.Item,{leftSection:O.jsx(ti.IconTrash,{size:14}),onClick:()=>At(!0),color:"red",children:"Löschen"})]})]}),n[66]=N,n[67]=h,n[68]=me,n[69]=C,n[70]=fn):fn=n[70];let hn;n[71]!==I||n[72]!==h||n[73]!==T?(hn=h.find(t0)&&O.jsx(F.Button,{onClick:()=>Tt(!0),disabled:T,children:I??"Erstellen"}),n[71]=I,n[72]=h,n[73]=T,n[74]=hn):hn=n[74];let Ut;n[75]!==m||n[76]!==yt||n[77]!==fn||n[78]!==hn?(Ut=O.jsxs(F.Group,{align:"center",gap:"xs",children:[yt,fn,hn,m]}),n[75]=m,n[76]=yt,n[77]=fn,n[78]=hn,n[79]=Ut):Ut=n[79];let It;n[80]!==Pn||n[81]!==Dt||n[82]!==Ut?(It=O.jsxs(F.Group,{gap:"xs",justify:Pn,align:"center",children:[Dt,Ut]}),n[80]=Pn,n[81]=Dt,n[82]=Ut,n[83]=It):It=n[83];let zt;n[84]!==ne||n[85]!==V||n[86]!==H?(zt=H&&H.length>0&&O.jsx(F.Tabs,{value:ne,onChange:V,mt:"md",children:O.jsx(F.Tabs.List,{children:H.map(e0)})}),n[84]=ne,n[85]=V,n[86]=H,n[87]=zt):zt=n[87];let qt;n[88]!==S?(qt=S&&O.jsx(F.Alert,{mt:"md",variant:"light",color:"red",title:"Es ist ein Fehler aufgetreten.",icon:O.jsx(ti.IconInfoCircle,{}),children:"Bitte versuche es später erneut oder sende eine Nachricht an unseren Support."}),n[88]=S,n[89]=qt):qt=n[89];let Jt;n[90]!==T||n[91]!==d?(Jt=(T||d)&&O.jsxs(F.Stack,{my:"md",children:[O.jsx(F.Skeleton,{height:40}),Array(5).fill(0).map(X1)]}),n[90]=T,n[91]=d,n[92]=Jt):Jt=n[92];let Ht;n[93]!==h||n[94]!==S||n[95]!==T||n[96]!==d||n[97]!==Se||n[98]!==K||n[99]!==D||n[100]!==_||n[101]!==me||n[102]!==C||n[103]!==ee||n[104]!==X||n[105]!==ve?(Ht=!T&&!d&&O.jsx(B1,{my:"md",striped:!0,minHeight:150,fetching:S,records:_,sortStatus:X,onSortStatusChange:be,...C&&{selectedRecords:me,onSelectedRecordsChange:Re},...D&&_.length&&{totalRecords:ve.length,recordsPerPage:K,onPageChange:u,page:Se,recordsPerPageOptions:nc,onRecordsPerPageChange:ee,recordsPerPageLabel:"Einträge pro Seite"},columns:h.map(J1),noRecordsText:"Keine Einträge gefunden"}),n[93]=h,n[94]=S,n[95]=T,n[96]=d,n[97]=Se,n[98]=K,n[99]=D,n[100]=_,n[101]=me,n[102]=C,n[103]=ee,n[104]=X,n[105]=ve,n[106]=Ht):Ht=n[106];let ze;n[107]===Symbol.for("react.memo_cache_sentinel")?(ze=()=>{it(!1),Re([])},n[107]=ze):ze=n[107];const ut=r??"Bearbeiten";let $t;n[108]!==g||n[109]!==h||n[110]!==s||n[111]!==me[0]||n[112]!==me.length||n[113]!==R?($t=me.length>0&&O.jsx(Ql,{fields:h.filter(Q1),queryKey:s,apiPath:g,id:me[0].id,onClose:()=>{it(!1),Re([])},steps:R}),n[108]=g,n[109]=h,n[110]=s,n[111]=me[0],n[112]=me.length,n[113]=R,n[114]=$t):$t=n[114];let Xt;n[115]!==ut||n[116]!==$t||n[117]!==pt?(Xt=O.jsx(F.Modal,{opened:pt,onClose:ze,title:ut,children:$t}),n[115]=ut,n[116]=$t,n[117]=pt,n[118]=Xt):Xt=n[118];let $n;n[119]!==g||n[120]!==Tn||n[121]!==s||n[122]!==me||n[123]!==r?($n=me.length>0&&O.jsx(F.Modal,{opened:Tn,onClose:()=>{At(!1),Re([])},title:r??"Löschen",children:O.jsx(Jl,{onClose:()=>{At(!1),Re([])},queryKey:s,apiPath:g,selectedRecords:me})}),n[119]=g,n[120]=Tn,n[121]=s,n[122]=me,n[123]=r,n[124]=$n):$n=n[124];let dn;n[125]===Symbol.for("react.memo_cache_sentinel")?(dn=()=>{Tt(!1)},n[125]=dn):dn=n[125];const wr=r??"Anlegen";let pn;n[126]===Symbol.for("react.memo_cache_sentinel")?(pn=()=>{Tt(!1)},n[126]=pn):pn=n[126];let Bn;n[127]!==h?(Bn=h.filter(Z1),n[127]=h,n[128]=Bn):Bn=n[128];let gn;n[129]!==g||n[130]!==s||n[131]!==R||n[132]!==Bn?(gn=O.jsx(jl,{queryKey:s,apiPath:g,onClose:pn,fields:Bn,steps:R}),n[129]=g,n[130]=s,n[131]=R,n[132]=Bn,n[133]=gn):gn=n[133];let vn;n[134]!==rt||n[135]!==wr||n[136]!==gn?(vn=O.jsx(F.Modal,{opened:rt,onClose:dn,title:wr,children:gn}),n[134]=rt,n[135]=wr,n[136]=gn,n[137]=vn):vn=n[137];let _t;return n[138]!==It||n[139]!==zt||n[140]!==qt||n[141]!==Jt||n[142]!==Ht||n[143]!==Xt||n[144]!==$n||n[145]!==vn?(_t=O.jsxs(O.Fragment,{children:[It,zt,qt,Jt,Ht,Xt,$n,vn]}),n[138]=It,n[139]=zt,n[140]=qt,n[141]=Jt,n[142]=Ht,n[143]=Xt,n[144]=$n,n[145]=vn,n[146]=_t):_t=n[146],_t}function Z1(i){return i.create}function Q1(i){return i.update}function J1(i){return i.column}function X1(i,n){return O.jsx(F.Skeleton,{height:35},`skeleton-${n}`)}function e0(i){return O.jsx(F.Tabs.Tab,{value:i.value,leftSection:i.icon,children:i.label},i.value)}function t0(i){return i.create}function n0(i){return i.delete}function r0(i){return i.update}function i0(i){return i.update}function o0(i){const[n,r]=i;return`${n}=${encodeURIComponent(r??"")}`}function s0(i){const[,n]=i;return n!=null}function a0(i){const n=An.c(5),{queryClient:r}=rr();let s;n[0]!==i?(s=O.jsx(K1,{...i}),n[0]=i,n[1]=s):s=n[1];let l;return n[2]!==r||n[3]!==s?(l=O.jsx(wu,{client:r,children:s}),n[2]=r,n[3]=s,n[4]=l):l=n[4],l}et.CreateModal=jl,et.DataTable=a0,et.DataTableProvider=zp,et.DeleteModal=Jl,et.UpdateModal=Ql,et.api=Hp,et.createOne=hl,et.deleteOne=fl,et.getAll=ll,et.getApiHeaders=_r,et.getOne=cl,et.updateOne=dl,et.useAddOne=vl,et.useDataTable=rr,et.useDeleteOne=ml,et.useGetAll=gl,et.useGetOne=pl,et.usePersistentState=Xl,et.useUpdateOne=Ms,Object.defineProperty(et,Symbol.toStringTag,{value:"Module"})});
|
|
144
144
|
//# sourceMappingURL=index.umd.js.map
|