@platforma-sdk/ui-vue 1.3.11 → 1.3.13

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/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # @platforma-sdk/ui-vue
2
2
 
3
+ ## 1.3.13
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [4fe1674]
8
+ - Updated dependencies [164fc89]
9
+ - @milaboratories/uikit@1.2.8
10
+ - @platforma-sdk/model@1.2.29
11
+
12
+ ## 1.3.12
13
+
14
+ ### Patch Changes
15
+
16
+ - 6994f68: upgrade playground for ui-vue
17
+
3
18
  ## 1.3.11
4
19
 
5
20
  ### Patch Changes
package/dist/lib.js CHANGED
@@ -49910,7 +49910,7 @@ async function a4(e, t, i, s) {
49910
49910
  for (let f = o.length - 1; f >= 0; --f) {
49911
49911
  const v = o[f];
49912
49912
  if (n[v].type !== "column" || n[v].spec.name !== "pl7.app/label") continue;
49913
- let w = e4(n[v].spec.axesSpec).map(Li.cloneDeep)[0], b = Li.findIndex(o, (S) => Li.isEqual(n[S].id, w));
49913
+ const w = e4(n[v].spec.axesSpec).map(Li.cloneDeep)[0], b = Li.findIndex(o, (S) => Li.isEqual(n[S].id, w));
49914
49914
  b !== -1 && (o[b] = v, o.splice(v, 1), r.splice(v, 1));
49915
49915
  }
49916
49916
  const a = r.map((f) => s4(f, n[f])), u = await t.getShape(i), c = u.rows;
@@ -50143,7 +50143,7 @@ const u4 = { class: "ap-ag-data-table-container" }, d4 = {
50143
50143
  ]);
50144
50144
  };
50145
50145
  }
50146
- }), d5 = /* @__PURE__ */ Gh(c4, [["__scopeId", "data-v-c5178e0f"]]), h4 = {
50146
+ }), d5 = /* @__PURE__ */ Gh(c4, [["__scopeId", "data-v-8c4f0cc9"]]), h4 = {
50147
50147
  key: 1,
50148
50148
  class: "alert-error"
50149
50149
  }, p4 = { key: 2 }, c5 = /* @__PURE__ */ pe({
package/dist/lib.umd.cjs CHANGED
@@ -245,4 +245,4 @@ __p += '`),Be&&(q+=`' +
245
245
  function print() { __p += __j.call(arguments, '') }
246
246
  `:`;
247
247
  `)+q+`return __p
248
- }`;var Me=Tw(function(){return ze(F,de+"return "+q).apply(i,E)});if(Me.source=q,Gh(Me))throw Me;return Me}function lK(l){return Ue(l).toLowerCase()}function aK(l){return Ue(l).toUpperCase()}function cK(l,u,p){if(l=Ue(l),l&&(p||u===i))return NC(l);if(!l||!(u=Xt(u)))return l;var C=Mi(l),w=Mi(u),F=BC(C,w),E=GC(C,w)+1;return Ys(C,F,E).join("")}function dK(l,u,p){if(l=Ue(l),l&&(p||u===i))return l.slice(0,WC(l)+1);if(!l||!(u=Xt(u)))return l;var C=Mi(l),w=GC(C,Mi(u))+1;return Ys(C,0,w).join("")}function uK(l,u,p){if(l=Ue(l),l&&(p||u===i))return l.replace(Gu,"");if(!l||!(u=Xt(u)))return l;var C=Mi(l),w=BC(C,Mi(u));return Ys(C,w).join("")}function hK(l,u){var p=z,C=H;if(it(u)){var w="separator"in u?u.separator:w;p="length"in u?De(u.length):p,C="omission"in u?Xt(u.omission):C}l=Ue(l);var F=l.length;if(go(l)){var E=Mi(l);F=E.length}if(p>=F)return l;var D=p-fo(C);if(D<1)return C;var L=E?Ys(E,0,D).join(""):l.slice(0,D);if(w===i)return L+C;if(E&&(D+=L.length-D),Hh(w)){if(l.slice(D).search(w)){var $,K=L;for(w.global||(w=sh(w.source,Ue(rC.exec(w))+"g")),w.lastIndex=0;$=w.exec(K);)var q=$.index;L=L.slice(0,q===i?D:q)}}else if(l.indexOf(Xt(w),D)!=D){var te=L.lastIndexOf(w);te>-1&&(L=L.slice(0,te))}return L+C}function pK(l){return l=Ue(l),l&&FH.test(l)?l.replace(sC,WW):l}var gK=bo(function(l,u,p){return l+(p?" ":"")+u.toUpperCase()}),Uh=Av("toUpperCase");function Dw(l,u,p){return l=Ue(l),u=p?i:u,u===i?VW(l)?$W(l):DW(l):l.match(u)||[]}var Tw=Ie(function(l,u){try{return Yt(l,i,u)}catch(p){return Gh(p)?p:new be(p)}}),fK=ps(function(l,u){return di(u,function(p){p=qi(p),us(l,p,Nh(l[p],l))}),l});function mK(l){var u=l==null?0:l.length,p=fe();return l=u?Je(l,function(C){if(typeof C[1]!="function")throw new ui(r);return[p(C[0]),C[1]]}):[],Ie(function(C){for(var w=-1;++w<u;){var F=l[w];if(Yt(F[0],this,C))return Yt(F[1],this,C)}})}function CK(l){return Wz(pi(l,f))}function $h(l){return function(){return l}}function vK(l,u){return l==null||l!==l?u:l}var wK=kv(),SK=kv(!0);function Ut(l){return l}function Kh(l){return av(typeof l=="function"?l:pi(l,f))}function yK(l){return dv(pi(l,f))}function bK(l,u){return uv(l,pi(u,f))}var RK=Ie(function(l,u){return function(p){return Yr(p,l,u)}}),FK=Ie(function(l,u){return function(p){return Yr(l,p,u)}});function jh(l,u,p){var C=pt(u),w=Wa(u,C);p==null&&!(it(u)&&(w.length||!C.length))&&(p=u,u=l,l=this,w=Wa(u,pt(u)));var F=!(it(p)&&"chain"in p)||!!p.chain,E=fs(l);return di(w,function(D){var L=u[D];l[D]=L,E&&(l.prototype[D]=function(){var $=this.__chain__;if(F||$){var K=l(this.__wrapped__),q=K.__actions__=Ht(this.__actions__);return q.push({func:L,args:arguments,thisArg:l}),K.__chain__=$,K}return L.apply(l,Us([this.value()],arguments))})}),l}function xK(){return ft._===this&&(ft._=QW),this}function Zh(){}function EK(l){return l=De(l),Ie(function(u){return hv(u,l)})}var PK=xh(Je),DK=xh(IC),TK=xh(Yu);function Aw(l){return kh(l)?Qu(qi(l)):o2(l)}function AK(l){return function(u){return l==null?i:En(l,u)}}var MK=Lv(),kK=Lv(!0);function qh(){return[]}function Yh(){return!1}function IK(){return{}}function LK(){return""}function _K(){return!0}function OK(l,u){if(l=De(l),l<1||l>_e)return[];var p=Gt,C=Ft(l,Gt);u=fe(u),l-=Gt;for(var w=eh(C,u);++p<l;)u(p);return w}function VK(l){return Re(l)?Je(l,qi):Jt(l)?[l]:Ht(Yv(Ue(l)))}function NK(l){var u=++qW;return Ue(l)+u}var BK=Za(function(l,u){return l+u},0),GK=Eh("ceil"),HK=Za(function(l,u){return l/u},1),WK=Eh("floor");function zK(l){return l&&l.length?Ha(l,Ut,uh):i}function UK(l,u){return l&&l.length?Ha(l,fe(u,2),uh):i}function $K(l){return OC(l,Ut)}function KK(l,u){return OC(l,fe(u,2))}function jK(l){return l&&l.length?Ha(l,Ut,fh):i}function ZK(l,u){return l&&l.length?Ha(l,fe(u,2),fh):i}var qK=Za(function(l,u){return l*u},1),YK=Eh("round"),QK=Za(function(l,u){return l-u},0);function XK(l){return l&&l.length?Ju(l,Ut):0}function JK(l,u){return l&&l.length?Ju(l,fe(u,2)):0}return b.after=y$,b.ary=lw,b.assign=a3,b.assignIn=yw,b.assignInWith=lc,b.assignWith=c3,b.at=d3,b.before=aw,b.bind=Nh,b.bindAll=fK,b.bindKey=cw,b.castArray=I$,b.chain=nw,b.chunk=W2,b.compact=z2,b.concat=U2,b.cond=mK,b.conforms=CK,b.constant=$h,b.countBy=XU,b.create=u3,b.curry=dw,b.curryRight=uw,b.debounce=hw,b.defaults=h3,b.defaultsDeep=p3,b.defer=b$,b.delay=R$,b.difference=$2,b.differenceBy=K2,b.differenceWith=j2,b.drop=Z2,b.dropRight=q2,b.dropRightWhile=Y2,b.dropWhile=Q2,b.fill=X2,b.filter=e$,b.flatMap=s$,b.flatMapDeep=n$,b.flatMapDepth=o$,b.flatten=ew,b.flattenDeep=J2,b.flattenDepth=eU,b.flip=F$,b.flow=wK,b.flowRight=SK,b.fromPairs=tU,b.functions=S3,b.functionsIn=y3,b.groupBy=r$,b.initial=sU,b.intersection=nU,b.intersectionBy=oU,b.intersectionWith=rU,b.invert=R3,b.invertBy=F3,b.invokeMap=a$,b.iteratee=Kh,b.keyBy=c$,b.keys=pt,b.keysIn=zt,b.map=tc,b.mapKeys=E3,b.mapValues=P3,b.matches=yK,b.matchesProperty=bK,b.memoize=sc,b.merge=D3,b.mergeWith=bw,b.method=RK,b.methodOf=FK,b.mixin=jh,b.negate=nc,b.nthArg=EK,b.omit=T3,b.omitBy=A3,b.once=x$,b.orderBy=d$,b.over=PK,b.overArgs=E$,b.overEvery=DK,b.overSome=TK,b.partial=Bh,b.partialRight=pw,b.partition=u$,b.pick=M3,b.pickBy=Rw,b.property=Aw,b.propertyOf=AK,b.pull=dU,b.pullAll=iw,b.pullAllBy=uU,b.pullAllWith=hU,b.pullAt=pU,b.range=MK,b.rangeRight=kK,b.rearg=P$,b.reject=g$,b.remove=gU,b.rest=D$,b.reverse=Oh,b.sampleSize=m$,b.set=I3,b.setWith=L3,b.shuffle=C$,b.slice=fU,b.sortBy=S$,b.sortedUniq=bU,b.sortedUniqBy=RU,b.split=sK,b.spread=T$,b.tail=FU,b.take=xU,b.takeRight=EU,b.takeRightWhile=PU,b.takeWhile=DU,b.tap=zU,b.throttle=A$,b.thru=ec,b.toArray=vw,b.toPairs=Fw,b.toPairsIn=xw,b.toPath=VK,b.toPlainObject=Sw,b.transform=_3,b.unary=M$,b.union=TU,b.unionBy=AU,b.unionWith=MU,b.uniq=kU,b.uniqBy=IU,b.uniqWith=LU,b.unset=O3,b.unzip=Vh,b.unzipWith=sw,b.update=V3,b.updateWith=N3,b.values=xo,b.valuesIn=B3,b.without=_U,b.words=Dw,b.wrap=k$,b.xor=OU,b.xorBy=VU,b.xorWith=NU,b.zip=BU,b.zipObject=GU,b.zipObjectDeep=HU,b.zipWith=WU,b.entries=Fw,b.entriesIn=xw,b.extend=yw,b.extendWith=lc,jh(b,b),b.add=BK,b.attempt=Tw,b.camelCase=z3,b.capitalize=Ew,b.ceil=GK,b.clamp=G3,b.clone=L$,b.cloneDeep=O$,b.cloneDeepWith=V$,b.cloneWith=_$,b.conformsTo=N$,b.deburr=Pw,b.defaultTo=vK,b.divide=HK,b.endsWith=U3,b.eq=Ii,b.escape=$3,b.escapeRegExp=K3,b.every=JU,b.find=t$,b.findIndex=Xv,b.findKey=g3,b.findLast=i$,b.findLastIndex=Jv,b.findLastKey=f3,b.floor=WK,b.forEach=ow,b.forEachRight=rw,b.forIn=m3,b.forInRight=C3,b.forOwn=v3,b.forOwnRight=w3,b.get=Wh,b.gt=B$,b.gte=G$,b.has=b3,b.hasIn=zh,b.head=tw,b.identity=Ut,b.includes=l$,b.indexOf=iU,b.inRange=H3,b.invoke=x3,b.isArguments=Tn,b.isArray=Re,b.isArrayBuffer=H$,b.isArrayLike=Wt,b.isArrayLikeObject=rt,b.isBoolean=W$,b.isBuffer=Qs,b.isDate=z$,b.isElement=U$,b.isEmpty=$$,b.isEqual=K$,b.isEqualWith=j$,b.isError=Gh,b.isFinite=Z$,b.isFunction=fs,b.isInteger=gw,b.isLength=oc,b.isMap=fw,b.isMatch=q$,b.isMatchWith=Y$,b.isNaN=Q$,b.isNative=X$,b.isNil=e3,b.isNull=J$,b.isNumber=mw,b.isObject=it,b.isObjectLike=nt,b.isPlainObject=il,b.isRegExp=Hh,b.isSafeInteger=t3,b.isSet=Cw,b.isString=rc,b.isSymbol=Jt,b.isTypedArray=Fo,b.isUndefined=i3,b.isWeakMap=s3,b.isWeakSet=n3,b.join=lU,b.kebabCase=j3,b.last=fi,b.lastIndexOf=aU,b.lowerCase=Z3,b.lowerFirst=q3,b.lt=o3,b.lte=r3,b.max=zK,b.maxBy=UK,b.mean=$K,b.meanBy=KK,b.min=jK,b.minBy=ZK,b.stubArray=qh,b.stubFalse=Yh,b.stubObject=IK,b.stubString=LK,b.stubTrue=_K,b.multiply=qK,b.nth=cU,b.noConflict=xK,b.noop=Zh,b.now=ic,b.pad=Y3,b.padEnd=Q3,b.padStart=X3,b.parseInt=J3,b.random=W3,b.reduce=h$,b.reduceRight=p$,b.repeat=eK,b.replace=tK,b.result=k3,b.round=YK,b.runInContext=k,b.sample=f$,b.size=v$,b.snakeCase=iK,b.some=w$,b.sortedIndex=mU,b.sortedIndexBy=CU,b.sortedIndexOf=vU,b.sortedLastIndex=wU,b.sortedLastIndexBy=SU,b.sortedLastIndexOf=yU,b.startCase=nK,b.startsWith=oK,b.subtract=QK,b.sum=XK,b.sumBy=JK,b.template=rK,b.times=OK,b.toFinite=ms,b.toInteger=De,b.toLength=ww,b.toLower=lK,b.toNumber=mi,b.toSafeInteger=l3,b.toString=Ue,b.toUpper=aK,b.trim=cK,b.trimEnd=dK,b.trimStart=uK,b.truncate=hK,b.unescape=pK,b.uniqueId=NK,b.upperCase=gK,b.upperFirst=Uh,b.each=ow,b.eachRight=rw,b.first=tw,jh(b,function(){var l={};return ji(b,function(u,p){$e.call(b.prototype,p)||(l[p]=u)}),l}(),{chain:!1}),b.VERSION=s,di(["bind","bindKey","curry","curryRight","partial","partialRight"],function(l){b[l].placeholder=b}),di(["drop","take"],function(l,u){Ne.prototype[l]=function(p){p=p===i?1:ct(De(p),0);var C=this.__filtered__&&!u?new Ne(this):this.clone();return C.__filtered__?C.__takeCount__=Ft(p,C.__takeCount__):C.__views__.push({size:Ft(p,Gt),type:l+(C.__dir__<0?"Right":"")}),C},Ne.prototype[l+"Right"]=function(p){return this.reverse()[l](p).reverse()}}),di(["filter","map","takeWhile"],function(l,u){var p=u+1,C=p==pe||p==ee;Ne.prototype[l]=function(w){var F=this.clone();return F.__iteratees__.push({iteratee:fe(w,3),type:p}),F.__filtered__=F.__filtered__||C,F}}),di(["head","last"],function(l,u){var p="take"+(u?"Right":"");Ne.prototype[l]=function(){return this[p](1).value()[0]}}),di(["initial","tail"],function(l,u){var p="drop"+(u?"":"Right");Ne.prototype[l]=function(){return this.__filtered__?new Ne(this):this[p](1)}}),Ne.prototype.compact=function(){return this.filter(Ut)},Ne.prototype.find=function(l){return this.filter(l).head()},Ne.prototype.findLast=function(l){return this.reverse().find(l)},Ne.prototype.invokeMap=Ie(function(l,u){return typeof l=="function"?new Ne(this):this.map(function(p){return Yr(p,l,u)})}),Ne.prototype.reject=function(l){return this.filter(nc(fe(l)))},Ne.prototype.slice=function(l,u){l=De(l);var p=this;return p.__filtered__&&(l>0||u<0)?new Ne(p):(l<0?p=p.takeRight(-l):l&&(p=p.drop(l)),u!==i&&(u=De(u),p=u<0?p.dropRight(-u):p.take(u-l)),p)},Ne.prototype.takeRightWhile=function(l){return this.reverse().takeWhile(l).reverse()},Ne.prototype.toArray=function(){return this.take(Gt)},ji(Ne.prototype,function(l,u){var p=/^(?:filter|find|map|reject)|While$/.test(u),C=/^(?:head|last)$/.test(u),w=b[C?"take"+(u=="last"?"Right":""):u],F=C||/^find/.test(u);w&&(b.prototype[u]=function(){var E=this.__wrapped__,D=C?[1]:arguments,L=E instanceof Ne,$=D[0],K=L||Re(E),q=function(Oe){var Be=w.apply(b,Us([Oe],D));return C&&te?Be[0]:Be};K&&p&&typeof $=="function"&&$.length!=1&&(L=K=!1);var te=this.__chain__,de=!!this.__actions__.length,me=F&&!te,Me=L&&!de;if(!F&&K){E=Me?E:new Ne(this);var Ce=l.apply(E,D);return Ce.__actions__.push({func:ec,args:[q],thisArg:i}),new hi(Ce,te)}return me&&Me?l.apply(this,D):(Ce=this.thru(q),me?C?Ce.value()[0]:Ce.value():Ce)})}),di(["pop","push","shift","sort","splice","unshift"],function(l){var u=Ea[l],p=/^(?:push|sort|unshift)$/.test(l)?"tap":"thru",C=/^(?:pop|shift)$/.test(l);b.prototype[l]=function(){var w=arguments;if(C&&!this.__chain__){var F=this.value();return u.apply(Re(F)?F:[],w)}return this[p](function(E){return u.apply(Re(E)?E:[],w)})}}),ji(Ne.prototype,function(l,u){var p=b[u];if(p){var C=p.name+"";$e.call(wo,C)||(wo[C]=[]),wo[C].push({name:u,func:p})}}),wo[ja(i,x).name]=[{name:"wrapper",func:i}],Ne.prototype.clone=pz,Ne.prototype.reverse=gz,Ne.prototype.value=fz,b.prototype.at=UU,b.prototype.chain=$U,b.prototype.commit=KU,b.prototype.next=jU,b.prototype.plant=qU,b.prototype.reverse=YU,b.prototype.toJSON=b.prototype.valueOf=b.prototype.value=QU,b.prototype.first=b.prototype.head,zr&&(b.prototype[zr]=ZU),b},mo=KW();yn?((yn.exports=mo)._=mo,Ku._=mo):ft._=mo}).call(Cr)}(ga,ga.exports);var ai=ga.exports;function ZG(e){return Pm({type:e.type,id:e.id})}function qG(e){return JSON.parse(e)}function YG(e,t){var i,s;return{colId:ZG(t),field:e.toString(),headerName:((s=(i=t.spec.annotations)==null?void 0:i["pl7.app/label"])==null?void 0:s.trim())??"Unlabeled "+t.type+" "+e.toString(),lockPosition:t.type==="axis",valueFormatter:n=>n?n.value===void 0?"NULL":n.value===null?"NA":n.value.toString():"ERROR",cellDataType:(n=>{switch(n){case"Int":case"Long":case"Float":case"Double":return"number";case"String":case"Bytes":return"text";default:throw Error(`unsupported data type: ${n}`)}})(t.type==="axis"?t.spec.type:t.spec.valueType)}}function QG(e,t){switch(t){case"Int":return e===HG;case"Long":return e===WG;case"Float":return e===zG;case"Double":return e===UG;case"String":return e===$G;case"Bytes":return e===KG;default:throw Error(`unsupported data type: ${t}`)}}function XG(e,t){const i=Math.floor(t/8),s=1<<7-t%8;return(e[i]&s)>0}function JG(e,t){switch(t){case"Int":return e;case"Long":return Number(e);case"Float":return e;case"Double":return e;case"String":return e;case"Bytes":return Buffer.from(e).toString("hex");default:throw Error(`unsupported data type: ${t}`)}}function eH(e,t){const i=t.length,s=[];for(let n=0;n<t[0].data.length;++n){const o={},r=[];for(let a=0;a<i;++a){const d=e[a].toString(),h=t[a].data[n],g=t[a].type;XG(t[a].absent,n)?o[d]=void 0:QG(h,g)||h===null?o[d]=null:o[d]=JG(h,g),r.push(g==="Long"?Number(h):h)}o.id=JSON.stringify(r),s.push(o)}return s}async function tH(e,t,i,s){const n=await t.getSpec(i),o=n.map((m,v)=>ai.find(s,S=>ai.isEqual(S.axis,m.id))?null:v).filter(m=>m!==null),r=ai.cloneDeep(o);for(let m=o.length-1;m>=0;--m){const v=o[m];if(n[v].type!=="column"||n[v].spec.name!=="pl7.app/label")continue;let S=jG(n[v].spec.axesSpec).map(ai.cloneDeep)[0],R=ai.findIndex(o,y=>ai.isEqual(n[y].id,S));R!==-1&&(o[R]=v,o.splice(v,1),r.splice(v,1))}const a=r.map(m=>YG(m,n[m])),d=await t.getShape(i),h=d.rows;let g;return{columnDefs:a,datasource:{rowCount:h,getRows:async m=>{e.setGridOption("loading",!0);try{if(h==0){m.successCallback([],h),e.setGridOption("loading",!1),e.showNoRowsOverlay();return}if(g&&!ai.isEqual(g.sortModel,m.sortModel)){g=void 0,m.failCallback();return}g=m;const v=m.endRow-m.startRow;let S=[];if(v>0){const R=await t.getData(i,o,{offset:m.startRow,length:v});S=eH(r,R)}m.successCallback(S,d.rows),e.setGridOption("loading",!1),e.autoSizeAllColumns()}catch{m.failCallback()}}}}}const iH={class:"ap-ag-data-table-container"},sH={key:0,class:"ap-ag-data-table-sheets"},nH=Yc(c.defineComponent({__name:"PlAgDataTable",props:c.mergeModels({settings:{}},{modelValue:{default:{gridState:{}}},modelModifiers:{}}),emits:["update:modelValue"],setup(e){ns.registerModules([TB,P1,GB,O1]);const t=c.useModel(e,"modelValue"),i=e,{settings:s}=c.toRefs(i);function n(v){if(s.value.sourceType==="ptable")return(v==null?void 0:v.sortModel.map(S=>({column:qG(S.colId),ascending:S.sort==="asc",naAndAbsentAreLeastValues:!0})))??[]}const o=c.computed({get:()=>{const v=t.value;return{columnOrder:v.gridState.columnOrder,sort:v.gridState.sort}},set:v=>{const S=n(v.sort),R=t.value;R.gridState.columnOrder=v.columnOrder,R.gridState.sort=v.sort,s.value.sourceType==="ptable"&&(R.pTableParams||(R.pTableParams={sorting:[],filters:[]}),R.pTableParams.sorting=S),t.value=R}}),r=v=>Pm(v);function a(v){var S;if(s.value.sourceType==="ptable")return((S=s.value.sheets)==null?void 0:S.map(R=>({type:"bySingleColumn",column:R.column?{type:"column",id:R.column}:{type:"axis",id:R.axis},predicate:{operator:"Equal",reference:v[r(R.axis)]}})))??[]}const d=c.computed({get:()=>t.value.gridState.sheets??{},set:v=>{const S=a(v),R=t.value;R.gridState.sheets=v,s.value.sourceType==="ptable"&&(R.pTableParams||(R.pTableParams={sorting:[],filters:[]}),R.pTableParams.filters=S),t.value=R}});c.watch(()=>s.value,(v,S)=>{if(v.sourceType==="ptable"&&(S==null?void 0:S.sourceType)==="ptable"&&ai.isEqual(v.sheets,S.sheets))return;if(v.sourceType!=="ptable"){d.value={};return}const R=d.value,y=v.sheets??[];for(const x of y){const P=r(x.axis);R[P]||(R[P]=x.defaultValue??x.options[0].value)}d.value=R},{immediate:!0});const h=c.shallowRef(),g={animateRows:!1,suppressColumnMoveAnimation:!0,enableRangeSelection:!0,initialState:t.value.gridState,onGridReady:v=>{h.value=v.api},onStateUpdated:v=>{o.value={columnOrder:v.state.columnOrder,sort:v.state.sort}},autoSizeStrategy:{type:"fitCellContents"},onRowDataUpdated:v=>{v.api.autoSizeAllColumns()},rowModelType:"infinite",maxBlocksInCache:1e4,cacheBlockSize:100,getRowId:v=>v.data.id,loading:!0,loadingOverlayComponentParams:{notReady:!0},loadingOverlayComponent:N1,noRowsOverlayComponent:W1},f=c.ref(0);c.watch(()=>[h.value,o.value],(v,S)=>{if(ai.isEqual(v,S))return;const[R,y]=v;if(!R)return;const x=R.getState();ai.isEqual(y.columnOrder,x.columnOrder)&&ai.isEqual(y.sort,x.sort)||(g.initialState=y,++f.value)});const m=(v,S)=>{const R=d.value;R[v]!==S&&(R[v]=S,d.value=R)};return c.watch(()=>[h.value,s.value],async(v,S)=>{if(ai.isEqual(v,S))return;const[R,y]=v;if(!R)return;const x=window.platforma;if(!x)throw Error("platforma not set");const P=y.sourceType;switch(P){case"ptable":{const T=x.pFrameDriver;if(!T)throw Error("platforma.pFrameDriver not set");const I=y.pTable;if(!(I!=null&&I.ok)||!I.value)return R.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!0},columnDefs:[],rowData:[]});const V=await tH(R,T,I.value,y.sheets??[]);return R.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!1},...V})}case"xsv":{const T=x.blobDriver;if(!T)throw Error("platforma.blobDriver not set");const I=y.xsvFile;if(!(I!=null&&I.ok)||!I.value)return R.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!0},columnDefs:[],rowData:[]});const V=await z1(R,T,I.value);return R.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!1},...V})}default:throw Error(`unsupported source type: ${P}`)}}),(v,S)=>{var R;return c.openBlock(),c.createElementBlock("div",iH,[c.unref(s).sourceType==="ptable"&&(((R=c.unref(s).sheets)==null?void 0:R.length)??0)>0?(c.openBlock(),c.createElementBlock("div",sH,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(c.unref(s).sheets,(y,x)=>(c.openBlock(),c.createBlock(c.unref(zp),{key:x,"model-value":d.value[r(y.axis)],options:y.options,"onUpdate:modelValue":P=>m(r(y.axis),P)},null,8,["model-value","options","onUpdate:modelValue"]))),128))])):c.createCommentVNode("",!0),c.createVNode(c.unref(e1),{class:"ap-ag-data-table-grid","grid-options":g})])}}}),[["__scopeId","data-v-c5178e0f"]]),oH={key:1,class:"alert-error"},rH={key:2},lH=c.defineComponent({__name:"ValueOrErrorsComponent",props:{valueOrError:{}},setup(e){const t=e,i=c.computed(()=>t.valueOrError&&t.valueOrError.ok?t.valueOrError.value:void 0),s=c.computed(()=>t.valueOrError&&!t.valueOrError.ok?t.valueOrError.errors:void 0),n=c.computed(()=>i.value===void 0&&s.value===void 0);return(o,r)=>(c.openBlock(),c.createElementBlock("div",null,[i.value!==void 0?c.renderSlot(o.$slots,"default",c.normalizeProps(c.mergeProps({key:0},{value:i.value}))):c.createCommentVNode("",!0),s.value?(c.openBlock(),c.createElementBlock("div",oH,c.toDisplayString(s.value),1)):c.createCommentVNode("",!0),n.value?(c.openBlock(),c.createElementBlock("div",rH,"Unresolved")):c.createCommentVNode("",!0)]))}}),fa=new Map;function aH(e,t){const i=c.getCurrentScope()??c.effectScope(),s=i.run(()=>(c.onScopeDispose(()=>{fa.delete(e)}),c.reactive(t())));return s[Symbol.dispose]=()=>{i.stop()},s}function cH(e){const t=Symbol();return()=>(fa.has(t)||fa.set(t,aH(t,e)),fa.get(t))}function dH(e){return c.computed(()=>{try{return ep(e())}catch(t){return{errors:[String(t)],value:void 0}}})}function uH(e,t){const i=c.reactive({value:void 0,errors:void 0}),s={version:0},n=async(o,r)=>({value:await t(o),version:r});return c.watch(e,async o=>{i.errors=void 0,i.value=void 0;try{const{value:r,version:a}=await n(o,++s.version);a===s.version&&(i.value=r)}catch(r){i.errors=[String(r)]}},{immediate:!0,deep:!0}),i}Y.BlockLayout=HD,Y.ContextProvider=YE,Y.DataTable=Ab,Y.DemoData=kD,Y.DropdownListItem=dl,Y.GridTable=Iy,Y.LongText=Hp,Y.MaskIcon16=To,Y.MaskIcon24=Ln,Y.MultiError=pc,Y.PlAgDataTable=nH,Y.PlAlert=nR,Y.PlBlockPage=zb,Y.PlBtnAccent=cR,Y.PlBtnGhost=Ap,Y.PlBtnGroup=MR,Y.PlBtnLink=pR,Y.PlBtnPrimary=Tp,Y.PlBtnSecondary=_c,Y.PlCheckbox=rx,Y.PlCheckboxGroup=dx,Y.PlChip=Hc,Y.PlContainer=$b,Y.PlDialogModal=Up,Y.PlDropdown=Wp,Y.PlDropdownLine=zp,Y.PlDropdownMulti=nx,Y.PlFileDialog=$p,Y.PlFileInput=qE,Y.PlGrid=Xb,Y.PlNumberField=zF,Y.PlProgressBar=OF,Y.PlRow=jb,Y.PlSlideModal=mx,Y.PlSpacer=Yb,Y.PlTextArea=eF,Y.PlTextField=Vp,Y.PlToggleSwitch=wx,Y.PlTooltip=ii,Y.Scrollable=HP,Y.Slider=lP,Y.SliderRange=VP,Y.SliderRangeTriple=xP,Y.ThemeSwitcher=Ob,Y.UnresolvedError=hc,Y.ValueOrErrorsComponent=lH,Y.animate=Sp,Y.animateInfinite=My,Y.call=fp,Y.computedResult=dH,Y.createModel=uc,Y.debounce=yp,Y.defineApp=Xw,Y.defineStore=cH,Y.delay=mp,Y.detectOutside=tF,Y.eventListener=Bc,Y.getElementScrollPosition=Bp,Y.getFilePathBreadcrumbs=Yw,Y.isDefined=qw,Y.isElementVisible=Np,Y.listToOptions=ky,Y.makeEaseInOut=Ay,Y.makeEaseOut=wp,Y.maskIcons16=AD,Y.maskIcons24=MD,Y.notEmpty=Fc,Y.randomInt=vp,Y.randomString=Ty,Y.requestTick=xc,Y.scrollIntoView=cl,Y.showContextMenu=Dc,Y.throttle=Ec,Y.timeout=Cp,Y.unwrapOptionalResult=Zw,Y.unwrapValueOrErrors=Jh,Y.useClickOutside=al,Y.useDraggable=gP,Y.useEventListener=st,Y.useFormState=hP,Y.useHover=Rc,Y.useInterval=uP,Y.useLabelNotch=en,Y.useLocalStorage=xp,Y.useMouse=bc,Y.useMouseCapture=Ss,Y.usePosition=Mp,Y.useQuery=pP,Y.useResizeObserver=rg,Y.useScroll=aP,Y.useSdkPlugin=gc,Y.useSortable=dP,Y.useTheme=Pp,Y.useWatchResult=uH,Y.wrapOptionalResult=ep,Y.wrapValueOrErrors=jw,Object.defineProperty(Y,Symbol.toStringTag,{value:"Module"})});
248
+ }`;var Me=Tw(function(){return ze(F,de+"return "+q).apply(i,E)});if(Me.source=q,Gh(Me))throw Me;return Me}function lK(l){return Ue(l).toLowerCase()}function aK(l){return Ue(l).toUpperCase()}function cK(l,u,p){if(l=Ue(l),l&&(p||u===i))return NC(l);if(!l||!(u=Xt(u)))return l;var C=Mi(l),w=Mi(u),F=BC(C,w),E=GC(C,w)+1;return Ys(C,F,E).join("")}function dK(l,u,p){if(l=Ue(l),l&&(p||u===i))return l.slice(0,WC(l)+1);if(!l||!(u=Xt(u)))return l;var C=Mi(l),w=GC(C,Mi(u))+1;return Ys(C,0,w).join("")}function uK(l,u,p){if(l=Ue(l),l&&(p||u===i))return l.replace(Gu,"");if(!l||!(u=Xt(u)))return l;var C=Mi(l),w=BC(C,Mi(u));return Ys(C,w).join("")}function hK(l,u){var p=z,C=H;if(it(u)){var w="separator"in u?u.separator:w;p="length"in u?De(u.length):p,C="omission"in u?Xt(u.omission):C}l=Ue(l);var F=l.length;if(go(l)){var E=Mi(l);F=E.length}if(p>=F)return l;var D=p-fo(C);if(D<1)return C;var L=E?Ys(E,0,D).join(""):l.slice(0,D);if(w===i)return L+C;if(E&&(D+=L.length-D),Hh(w)){if(l.slice(D).search(w)){var $,K=L;for(w.global||(w=sh(w.source,Ue(rC.exec(w))+"g")),w.lastIndex=0;$=w.exec(K);)var q=$.index;L=L.slice(0,q===i?D:q)}}else if(l.indexOf(Xt(w),D)!=D){var te=L.lastIndexOf(w);te>-1&&(L=L.slice(0,te))}return L+C}function pK(l){return l=Ue(l),l&&FH.test(l)?l.replace(sC,WW):l}var gK=bo(function(l,u,p){return l+(p?" ":"")+u.toUpperCase()}),Uh=Av("toUpperCase");function Dw(l,u,p){return l=Ue(l),u=p?i:u,u===i?VW(l)?$W(l):DW(l):l.match(u)||[]}var Tw=Ie(function(l,u){try{return Yt(l,i,u)}catch(p){return Gh(p)?p:new be(p)}}),fK=ps(function(l,u){return di(u,function(p){p=qi(p),us(l,p,Nh(l[p],l))}),l});function mK(l){var u=l==null?0:l.length,p=fe();return l=u?Je(l,function(C){if(typeof C[1]!="function")throw new ui(r);return[p(C[0]),C[1]]}):[],Ie(function(C){for(var w=-1;++w<u;){var F=l[w];if(Yt(F[0],this,C))return Yt(F[1],this,C)}})}function CK(l){return Wz(pi(l,f))}function $h(l){return function(){return l}}function vK(l,u){return l==null||l!==l?u:l}var wK=kv(),SK=kv(!0);function Ut(l){return l}function Kh(l){return av(typeof l=="function"?l:pi(l,f))}function yK(l){return dv(pi(l,f))}function bK(l,u){return uv(l,pi(u,f))}var RK=Ie(function(l,u){return function(p){return Yr(p,l,u)}}),FK=Ie(function(l,u){return function(p){return Yr(l,p,u)}});function jh(l,u,p){var C=pt(u),w=Wa(u,C);p==null&&!(it(u)&&(w.length||!C.length))&&(p=u,u=l,l=this,w=Wa(u,pt(u)));var F=!(it(p)&&"chain"in p)||!!p.chain,E=fs(l);return di(w,function(D){var L=u[D];l[D]=L,E&&(l.prototype[D]=function(){var $=this.__chain__;if(F||$){var K=l(this.__wrapped__),q=K.__actions__=Ht(this.__actions__);return q.push({func:L,args:arguments,thisArg:l}),K.__chain__=$,K}return L.apply(l,Us([this.value()],arguments))})}),l}function xK(){return ft._===this&&(ft._=QW),this}function Zh(){}function EK(l){return l=De(l),Ie(function(u){return hv(u,l)})}var PK=xh(Je),DK=xh(IC),TK=xh(Yu);function Aw(l){return kh(l)?Qu(qi(l)):o2(l)}function AK(l){return function(u){return l==null?i:En(l,u)}}var MK=Lv(),kK=Lv(!0);function qh(){return[]}function Yh(){return!1}function IK(){return{}}function LK(){return""}function _K(){return!0}function OK(l,u){if(l=De(l),l<1||l>_e)return[];var p=Gt,C=Ft(l,Gt);u=fe(u),l-=Gt;for(var w=eh(C,u);++p<l;)u(p);return w}function VK(l){return Re(l)?Je(l,qi):Jt(l)?[l]:Ht(Yv(Ue(l)))}function NK(l){var u=++qW;return Ue(l)+u}var BK=Za(function(l,u){return l+u},0),GK=Eh("ceil"),HK=Za(function(l,u){return l/u},1),WK=Eh("floor");function zK(l){return l&&l.length?Ha(l,Ut,uh):i}function UK(l,u){return l&&l.length?Ha(l,fe(u,2),uh):i}function $K(l){return OC(l,Ut)}function KK(l,u){return OC(l,fe(u,2))}function jK(l){return l&&l.length?Ha(l,Ut,fh):i}function ZK(l,u){return l&&l.length?Ha(l,fe(u,2),fh):i}var qK=Za(function(l,u){return l*u},1),YK=Eh("round"),QK=Za(function(l,u){return l-u},0);function XK(l){return l&&l.length?Ju(l,Ut):0}function JK(l,u){return l&&l.length?Ju(l,fe(u,2)):0}return b.after=y$,b.ary=lw,b.assign=a3,b.assignIn=yw,b.assignInWith=lc,b.assignWith=c3,b.at=d3,b.before=aw,b.bind=Nh,b.bindAll=fK,b.bindKey=cw,b.castArray=I$,b.chain=nw,b.chunk=W2,b.compact=z2,b.concat=U2,b.cond=mK,b.conforms=CK,b.constant=$h,b.countBy=XU,b.create=u3,b.curry=dw,b.curryRight=uw,b.debounce=hw,b.defaults=h3,b.defaultsDeep=p3,b.defer=b$,b.delay=R$,b.difference=$2,b.differenceBy=K2,b.differenceWith=j2,b.drop=Z2,b.dropRight=q2,b.dropRightWhile=Y2,b.dropWhile=Q2,b.fill=X2,b.filter=e$,b.flatMap=s$,b.flatMapDeep=n$,b.flatMapDepth=o$,b.flatten=ew,b.flattenDeep=J2,b.flattenDepth=eU,b.flip=F$,b.flow=wK,b.flowRight=SK,b.fromPairs=tU,b.functions=S3,b.functionsIn=y3,b.groupBy=r$,b.initial=sU,b.intersection=nU,b.intersectionBy=oU,b.intersectionWith=rU,b.invert=R3,b.invertBy=F3,b.invokeMap=a$,b.iteratee=Kh,b.keyBy=c$,b.keys=pt,b.keysIn=zt,b.map=tc,b.mapKeys=E3,b.mapValues=P3,b.matches=yK,b.matchesProperty=bK,b.memoize=sc,b.merge=D3,b.mergeWith=bw,b.method=RK,b.methodOf=FK,b.mixin=jh,b.negate=nc,b.nthArg=EK,b.omit=T3,b.omitBy=A3,b.once=x$,b.orderBy=d$,b.over=PK,b.overArgs=E$,b.overEvery=DK,b.overSome=TK,b.partial=Bh,b.partialRight=pw,b.partition=u$,b.pick=M3,b.pickBy=Rw,b.property=Aw,b.propertyOf=AK,b.pull=dU,b.pullAll=iw,b.pullAllBy=uU,b.pullAllWith=hU,b.pullAt=pU,b.range=MK,b.rangeRight=kK,b.rearg=P$,b.reject=g$,b.remove=gU,b.rest=D$,b.reverse=Oh,b.sampleSize=m$,b.set=I3,b.setWith=L3,b.shuffle=C$,b.slice=fU,b.sortBy=S$,b.sortedUniq=bU,b.sortedUniqBy=RU,b.split=sK,b.spread=T$,b.tail=FU,b.take=xU,b.takeRight=EU,b.takeRightWhile=PU,b.takeWhile=DU,b.tap=zU,b.throttle=A$,b.thru=ec,b.toArray=vw,b.toPairs=Fw,b.toPairsIn=xw,b.toPath=VK,b.toPlainObject=Sw,b.transform=_3,b.unary=M$,b.union=TU,b.unionBy=AU,b.unionWith=MU,b.uniq=kU,b.uniqBy=IU,b.uniqWith=LU,b.unset=O3,b.unzip=Vh,b.unzipWith=sw,b.update=V3,b.updateWith=N3,b.values=xo,b.valuesIn=B3,b.without=_U,b.words=Dw,b.wrap=k$,b.xor=OU,b.xorBy=VU,b.xorWith=NU,b.zip=BU,b.zipObject=GU,b.zipObjectDeep=HU,b.zipWith=WU,b.entries=Fw,b.entriesIn=xw,b.extend=yw,b.extendWith=lc,jh(b,b),b.add=BK,b.attempt=Tw,b.camelCase=z3,b.capitalize=Ew,b.ceil=GK,b.clamp=G3,b.clone=L$,b.cloneDeep=O$,b.cloneDeepWith=V$,b.cloneWith=_$,b.conformsTo=N$,b.deburr=Pw,b.defaultTo=vK,b.divide=HK,b.endsWith=U3,b.eq=Ii,b.escape=$3,b.escapeRegExp=K3,b.every=JU,b.find=t$,b.findIndex=Xv,b.findKey=g3,b.findLast=i$,b.findLastIndex=Jv,b.findLastKey=f3,b.floor=WK,b.forEach=ow,b.forEachRight=rw,b.forIn=m3,b.forInRight=C3,b.forOwn=v3,b.forOwnRight=w3,b.get=Wh,b.gt=B$,b.gte=G$,b.has=b3,b.hasIn=zh,b.head=tw,b.identity=Ut,b.includes=l$,b.indexOf=iU,b.inRange=H3,b.invoke=x3,b.isArguments=Tn,b.isArray=Re,b.isArrayBuffer=H$,b.isArrayLike=Wt,b.isArrayLikeObject=rt,b.isBoolean=W$,b.isBuffer=Qs,b.isDate=z$,b.isElement=U$,b.isEmpty=$$,b.isEqual=K$,b.isEqualWith=j$,b.isError=Gh,b.isFinite=Z$,b.isFunction=fs,b.isInteger=gw,b.isLength=oc,b.isMap=fw,b.isMatch=q$,b.isMatchWith=Y$,b.isNaN=Q$,b.isNative=X$,b.isNil=e3,b.isNull=J$,b.isNumber=mw,b.isObject=it,b.isObjectLike=nt,b.isPlainObject=il,b.isRegExp=Hh,b.isSafeInteger=t3,b.isSet=Cw,b.isString=rc,b.isSymbol=Jt,b.isTypedArray=Fo,b.isUndefined=i3,b.isWeakMap=s3,b.isWeakSet=n3,b.join=lU,b.kebabCase=j3,b.last=fi,b.lastIndexOf=aU,b.lowerCase=Z3,b.lowerFirst=q3,b.lt=o3,b.lte=r3,b.max=zK,b.maxBy=UK,b.mean=$K,b.meanBy=KK,b.min=jK,b.minBy=ZK,b.stubArray=qh,b.stubFalse=Yh,b.stubObject=IK,b.stubString=LK,b.stubTrue=_K,b.multiply=qK,b.nth=cU,b.noConflict=xK,b.noop=Zh,b.now=ic,b.pad=Y3,b.padEnd=Q3,b.padStart=X3,b.parseInt=J3,b.random=W3,b.reduce=h$,b.reduceRight=p$,b.repeat=eK,b.replace=tK,b.result=k3,b.round=YK,b.runInContext=k,b.sample=f$,b.size=v$,b.snakeCase=iK,b.some=w$,b.sortedIndex=mU,b.sortedIndexBy=CU,b.sortedIndexOf=vU,b.sortedLastIndex=wU,b.sortedLastIndexBy=SU,b.sortedLastIndexOf=yU,b.startCase=nK,b.startsWith=oK,b.subtract=QK,b.sum=XK,b.sumBy=JK,b.template=rK,b.times=OK,b.toFinite=ms,b.toInteger=De,b.toLength=ww,b.toLower=lK,b.toNumber=mi,b.toSafeInteger=l3,b.toString=Ue,b.toUpper=aK,b.trim=cK,b.trimEnd=dK,b.trimStart=uK,b.truncate=hK,b.unescape=pK,b.uniqueId=NK,b.upperCase=gK,b.upperFirst=Uh,b.each=ow,b.eachRight=rw,b.first=tw,jh(b,function(){var l={};return ji(b,function(u,p){$e.call(b.prototype,p)||(l[p]=u)}),l}(),{chain:!1}),b.VERSION=s,di(["bind","bindKey","curry","curryRight","partial","partialRight"],function(l){b[l].placeholder=b}),di(["drop","take"],function(l,u){Ne.prototype[l]=function(p){p=p===i?1:ct(De(p),0);var C=this.__filtered__&&!u?new Ne(this):this.clone();return C.__filtered__?C.__takeCount__=Ft(p,C.__takeCount__):C.__views__.push({size:Ft(p,Gt),type:l+(C.__dir__<0?"Right":"")}),C},Ne.prototype[l+"Right"]=function(p){return this.reverse()[l](p).reverse()}}),di(["filter","map","takeWhile"],function(l,u){var p=u+1,C=p==pe||p==ee;Ne.prototype[l]=function(w){var F=this.clone();return F.__iteratees__.push({iteratee:fe(w,3),type:p}),F.__filtered__=F.__filtered__||C,F}}),di(["head","last"],function(l,u){var p="take"+(u?"Right":"");Ne.prototype[l]=function(){return this[p](1).value()[0]}}),di(["initial","tail"],function(l,u){var p="drop"+(u?"":"Right");Ne.prototype[l]=function(){return this.__filtered__?new Ne(this):this[p](1)}}),Ne.prototype.compact=function(){return this.filter(Ut)},Ne.prototype.find=function(l){return this.filter(l).head()},Ne.prototype.findLast=function(l){return this.reverse().find(l)},Ne.prototype.invokeMap=Ie(function(l,u){return typeof l=="function"?new Ne(this):this.map(function(p){return Yr(p,l,u)})}),Ne.prototype.reject=function(l){return this.filter(nc(fe(l)))},Ne.prototype.slice=function(l,u){l=De(l);var p=this;return p.__filtered__&&(l>0||u<0)?new Ne(p):(l<0?p=p.takeRight(-l):l&&(p=p.drop(l)),u!==i&&(u=De(u),p=u<0?p.dropRight(-u):p.take(u-l)),p)},Ne.prototype.takeRightWhile=function(l){return this.reverse().takeWhile(l).reverse()},Ne.prototype.toArray=function(){return this.take(Gt)},ji(Ne.prototype,function(l,u){var p=/^(?:filter|find|map|reject)|While$/.test(u),C=/^(?:head|last)$/.test(u),w=b[C?"take"+(u=="last"?"Right":""):u],F=C||/^find/.test(u);w&&(b.prototype[u]=function(){var E=this.__wrapped__,D=C?[1]:arguments,L=E instanceof Ne,$=D[0],K=L||Re(E),q=function(Oe){var Be=w.apply(b,Us([Oe],D));return C&&te?Be[0]:Be};K&&p&&typeof $=="function"&&$.length!=1&&(L=K=!1);var te=this.__chain__,de=!!this.__actions__.length,me=F&&!te,Me=L&&!de;if(!F&&K){E=Me?E:new Ne(this);var Ce=l.apply(E,D);return Ce.__actions__.push({func:ec,args:[q],thisArg:i}),new hi(Ce,te)}return me&&Me?l.apply(this,D):(Ce=this.thru(q),me?C?Ce.value()[0]:Ce.value():Ce)})}),di(["pop","push","shift","sort","splice","unshift"],function(l){var u=Ea[l],p=/^(?:push|sort|unshift)$/.test(l)?"tap":"thru",C=/^(?:pop|shift)$/.test(l);b.prototype[l]=function(){var w=arguments;if(C&&!this.__chain__){var F=this.value();return u.apply(Re(F)?F:[],w)}return this[p](function(E){return u.apply(Re(E)?E:[],w)})}}),ji(Ne.prototype,function(l,u){var p=b[u];if(p){var C=p.name+"";$e.call(wo,C)||(wo[C]=[]),wo[C].push({name:u,func:p})}}),wo[ja(i,x).name]=[{name:"wrapper",func:i}],Ne.prototype.clone=pz,Ne.prototype.reverse=gz,Ne.prototype.value=fz,b.prototype.at=UU,b.prototype.chain=$U,b.prototype.commit=KU,b.prototype.next=jU,b.prototype.plant=qU,b.prototype.reverse=YU,b.prototype.toJSON=b.prototype.valueOf=b.prototype.value=QU,b.prototype.first=b.prototype.head,zr&&(b.prototype[zr]=ZU),b},mo=KW();yn?((yn.exports=mo)._=mo,Ku._=mo):ft._=mo}).call(Cr)}(ga,ga.exports);var ai=ga.exports;function ZG(e){return Pm({type:e.type,id:e.id})}function qG(e){return JSON.parse(e)}function YG(e,t){var i,s;return{colId:ZG(t),field:e.toString(),headerName:((s=(i=t.spec.annotations)==null?void 0:i["pl7.app/label"])==null?void 0:s.trim())??"Unlabeled "+t.type+" "+e.toString(),lockPosition:t.type==="axis",valueFormatter:n=>n?n.value===void 0?"NULL":n.value===null?"NA":n.value.toString():"ERROR",cellDataType:(n=>{switch(n){case"Int":case"Long":case"Float":case"Double":return"number";case"String":case"Bytes":return"text";default:throw Error(`unsupported data type: ${n}`)}})(t.type==="axis"?t.spec.type:t.spec.valueType)}}function QG(e,t){switch(t){case"Int":return e===HG;case"Long":return e===WG;case"Float":return e===zG;case"Double":return e===UG;case"String":return e===$G;case"Bytes":return e===KG;default:throw Error(`unsupported data type: ${t}`)}}function XG(e,t){const i=Math.floor(t/8),s=1<<7-t%8;return(e[i]&s)>0}function JG(e,t){switch(t){case"Int":return e;case"Long":return Number(e);case"Float":return e;case"Double":return e;case"String":return e;case"Bytes":return Buffer.from(e).toString("hex");default:throw Error(`unsupported data type: ${t}`)}}function eH(e,t){const i=t.length,s=[];for(let n=0;n<t[0].data.length;++n){const o={},r=[];for(let a=0;a<i;++a){const d=e[a].toString(),h=t[a].data[n],g=t[a].type;XG(t[a].absent,n)?o[d]=void 0:QG(h,g)||h===null?o[d]=null:o[d]=JG(h,g),r.push(g==="Long"?Number(h):h)}o.id=JSON.stringify(r),s.push(o)}return s}async function tH(e,t,i,s){const n=await t.getSpec(i),o=n.map((m,v)=>ai.find(s,S=>ai.isEqual(S.axis,m.id))?null:v).filter(m=>m!==null),r=ai.cloneDeep(o);for(let m=o.length-1;m>=0;--m){const v=o[m];if(n[v].type!=="column"||n[v].spec.name!=="pl7.app/label")continue;const S=jG(n[v].spec.axesSpec).map(ai.cloneDeep)[0],R=ai.findIndex(o,y=>ai.isEqual(n[y].id,S));R!==-1&&(o[R]=v,o.splice(v,1),r.splice(v,1))}const a=r.map(m=>YG(m,n[m])),d=await t.getShape(i),h=d.rows;let g;return{columnDefs:a,datasource:{rowCount:h,getRows:async m=>{e.setGridOption("loading",!0);try{if(h==0){m.successCallback([],h),e.setGridOption("loading",!1),e.showNoRowsOverlay();return}if(g&&!ai.isEqual(g.sortModel,m.sortModel)){g=void 0,m.failCallback();return}g=m;const v=m.endRow-m.startRow;let S=[];if(v>0){const R=await t.getData(i,o,{offset:m.startRow,length:v});S=eH(r,R)}m.successCallback(S,d.rows),e.setGridOption("loading",!1),e.autoSizeAllColumns()}catch{m.failCallback()}}}}}const iH={class:"ap-ag-data-table-container"},sH={key:0,class:"ap-ag-data-table-sheets"},nH=Yc(c.defineComponent({__name:"PlAgDataTable",props:c.mergeModels({settings:{}},{modelValue:{default:{gridState:{}}},modelModifiers:{}}),emits:["update:modelValue"],setup(e){ns.registerModules([TB,P1,GB,O1]);const t=c.useModel(e,"modelValue"),i=e,{settings:s}=c.toRefs(i);function n(v){if(s.value.sourceType==="ptable")return(v==null?void 0:v.sortModel.map(S=>({column:qG(S.colId),ascending:S.sort==="asc",naAndAbsentAreLeastValues:!0})))??[]}const o=c.computed({get:()=>{const v=t.value;return{columnOrder:v.gridState.columnOrder,sort:v.gridState.sort}},set:v=>{const S=n(v.sort),R=t.value;R.gridState.columnOrder=v.columnOrder,R.gridState.sort=v.sort,s.value.sourceType==="ptable"&&(R.pTableParams||(R.pTableParams={sorting:[],filters:[]}),R.pTableParams.sorting=S),t.value=R}}),r=v=>Pm(v);function a(v){var S;if(s.value.sourceType==="ptable")return((S=s.value.sheets)==null?void 0:S.map(R=>({type:"bySingleColumn",column:R.column?{type:"column",id:R.column}:{type:"axis",id:R.axis},predicate:{operator:"Equal",reference:v[r(R.axis)]}})))??[]}const d=c.computed({get:()=>t.value.gridState.sheets??{},set:v=>{const S=a(v),R=t.value;R.gridState.sheets=v,s.value.sourceType==="ptable"&&(R.pTableParams||(R.pTableParams={sorting:[],filters:[]}),R.pTableParams.filters=S),t.value=R}});c.watch(()=>s.value,(v,S)=>{if(v.sourceType==="ptable"&&(S==null?void 0:S.sourceType)==="ptable"&&ai.isEqual(v.sheets,S.sheets))return;if(v.sourceType!=="ptable"){d.value={};return}const R=d.value,y=v.sheets??[];for(const x of y){const P=r(x.axis);R[P]||(R[P]=x.defaultValue??x.options[0].value)}d.value=R},{immediate:!0});const h=c.shallowRef(),g={animateRows:!1,suppressColumnMoveAnimation:!0,enableRangeSelection:!0,initialState:t.value.gridState,onGridReady:v=>{h.value=v.api},onStateUpdated:v=>{o.value={columnOrder:v.state.columnOrder,sort:v.state.sort}},autoSizeStrategy:{type:"fitCellContents"},onRowDataUpdated:v=>{v.api.autoSizeAllColumns()},rowModelType:"infinite",maxBlocksInCache:1e4,cacheBlockSize:100,getRowId:v=>v.data.id,loading:!0,loadingOverlayComponentParams:{notReady:!0},loadingOverlayComponent:N1,noRowsOverlayComponent:W1},f=c.ref(0);c.watch(()=>[h.value,o.value],(v,S)=>{if(ai.isEqual(v,S))return;const[R,y]=v;if(!R)return;const x=R.getState();ai.isEqual(y.columnOrder,x.columnOrder)&&ai.isEqual(y.sort,x.sort)||(g.initialState=y,++f.value)});const m=(v,S)=>{const R=d.value;R[v]!==S&&(R[v]=S,d.value=R)};return c.watch(()=>[h.value,s.value],async(v,S)=>{if(ai.isEqual(v,S))return;const[R,y]=v;if(!R)return;const x=window.platforma;if(!x)throw Error("platforma not set");const P=y.sourceType;switch(P){case"ptable":{const T=x.pFrameDriver;if(!T)throw Error("platforma.pFrameDriver not set");const I=y.pTable;if(!(I!=null&&I.ok)||!I.value)return R.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!0},columnDefs:[],rowData:[]});const V=await tH(R,T,I.value,y.sheets??[]);return R.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!1},...V})}case"xsv":{const T=x.blobDriver;if(!T)throw Error("platforma.blobDriver not set");const I=y.xsvFile;if(!(I!=null&&I.ok)||!I.value)return R.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!0},columnDefs:[],rowData:[]});const V=await z1(R,T,I.value);return R.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!1},...V})}default:throw Error(`unsupported source type: ${P}`)}}),(v,S)=>{var R;return c.openBlock(),c.createElementBlock("div",iH,[c.unref(s).sourceType==="ptable"&&(((R=c.unref(s).sheets)==null?void 0:R.length)??0)>0?(c.openBlock(),c.createElementBlock("div",sH,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(c.unref(s).sheets,(y,x)=>(c.openBlock(),c.createBlock(c.unref(zp),{key:x,"model-value":d.value[r(y.axis)],options:y.options,"onUpdate:modelValue":P=>m(r(y.axis),P)},null,8,["model-value","options","onUpdate:modelValue"]))),128))])):c.createCommentVNode("",!0),c.createVNode(c.unref(e1),{class:"ap-ag-data-table-grid","grid-options":g})])}}}),[["__scopeId","data-v-8c4f0cc9"]]),oH={key:1,class:"alert-error"},rH={key:2},lH=c.defineComponent({__name:"ValueOrErrorsComponent",props:{valueOrError:{}},setup(e){const t=e,i=c.computed(()=>t.valueOrError&&t.valueOrError.ok?t.valueOrError.value:void 0),s=c.computed(()=>t.valueOrError&&!t.valueOrError.ok?t.valueOrError.errors:void 0),n=c.computed(()=>i.value===void 0&&s.value===void 0);return(o,r)=>(c.openBlock(),c.createElementBlock("div",null,[i.value!==void 0?c.renderSlot(o.$slots,"default",c.normalizeProps(c.mergeProps({key:0},{value:i.value}))):c.createCommentVNode("",!0),s.value?(c.openBlock(),c.createElementBlock("div",oH,c.toDisplayString(s.value),1)):c.createCommentVNode("",!0),n.value?(c.openBlock(),c.createElementBlock("div",rH,"Unresolved")):c.createCommentVNode("",!0)]))}}),fa=new Map;function aH(e,t){const i=c.getCurrentScope()??c.effectScope(),s=i.run(()=>(c.onScopeDispose(()=>{fa.delete(e)}),c.reactive(t())));return s[Symbol.dispose]=()=>{i.stop()},s}function cH(e){const t=Symbol();return()=>(fa.has(t)||fa.set(t,aH(t,e)),fa.get(t))}function dH(e){return c.computed(()=>{try{return ep(e())}catch(t){return{errors:[String(t)],value:void 0}}})}function uH(e,t){const i=c.reactive({value:void 0,errors:void 0}),s={version:0},n=async(o,r)=>({value:await t(o),version:r});return c.watch(e,async o=>{i.errors=void 0,i.value=void 0;try{const{value:r,version:a}=await n(o,++s.version);a===s.version&&(i.value=r)}catch(r){i.errors=[String(r)]}},{immediate:!0,deep:!0}),i}Y.BlockLayout=HD,Y.ContextProvider=YE,Y.DataTable=Ab,Y.DemoData=kD,Y.DropdownListItem=dl,Y.GridTable=Iy,Y.LongText=Hp,Y.MaskIcon16=To,Y.MaskIcon24=Ln,Y.MultiError=pc,Y.PlAgDataTable=nH,Y.PlAlert=nR,Y.PlBlockPage=zb,Y.PlBtnAccent=cR,Y.PlBtnGhost=Ap,Y.PlBtnGroup=MR,Y.PlBtnLink=pR,Y.PlBtnPrimary=Tp,Y.PlBtnSecondary=_c,Y.PlCheckbox=rx,Y.PlCheckboxGroup=dx,Y.PlChip=Hc,Y.PlContainer=$b,Y.PlDialogModal=Up,Y.PlDropdown=Wp,Y.PlDropdownLine=zp,Y.PlDropdownMulti=nx,Y.PlFileDialog=$p,Y.PlFileInput=qE,Y.PlGrid=Xb,Y.PlNumberField=zF,Y.PlProgressBar=OF,Y.PlRow=jb,Y.PlSlideModal=mx,Y.PlSpacer=Yb,Y.PlTextArea=eF,Y.PlTextField=Vp,Y.PlToggleSwitch=wx,Y.PlTooltip=ii,Y.Scrollable=HP,Y.Slider=lP,Y.SliderRange=VP,Y.SliderRangeTriple=xP,Y.ThemeSwitcher=Ob,Y.UnresolvedError=hc,Y.ValueOrErrorsComponent=lH,Y.animate=Sp,Y.animateInfinite=My,Y.call=fp,Y.computedResult=dH,Y.createModel=uc,Y.debounce=yp,Y.defineApp=Xw,Y.defineStore=cH,Y.delay=mp,Y.detectOutside=tF,Y.eventListener=Bc,Y.getElementScrollPosition=Bp,Y.getFilePathBreadcrumbs=Yw,Y.isDefined=qw,Y.isElementVisible=Np,Y.listToOptions=ky,Y.makeEaseInOut=Ay,Y.makeEaseOut=wp,Y.maskIcons16=AD,Y.maskIcons24=MD,Y.notEmpty=Fc,Y.randomInt=vp,Y.randomString=Ty,Y.requestTick=xc,Y.scrollIntoView=cl,Y.showContextMenu=Dc,Y.throttle=Ec,Y.timeout=Cp,Y.unwrapOptionalResult=Zw,Y.unwrapValueOrErrors=Jh,Y.useClickOutside=al,Y.useDraggable=gP,Y.useEventListener=st,Y.useFormState=hP,Y.useHover=Rc,Y.useInterval=uP,Y.useLabelNotch=en,Y.useLocalStorage=xp,Y.useMouse=bc,Y.useMouseCapture=Ss,Y.usePosition=Mp,Y.useQuery=pP,Y.useResizeObserver=rg,Y.useScroll=aP,Y.useSdkPlugin=gc,Y.useSortable=dP,Y.useTheme=Pp,Y.useWatchResult=uH,Y.wrapOptionalResult=ep,Y.wrapValueOrErrors=jw,Object.defineProperty(Y,Symbol.toStringTag,{value:"Module"})});
@@ -1 +1 @@
1
- {"version":3,"file":"PlAgDataTable.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/PlAgDataTable/PlAgDataTable.vue"],"names":[],"mappings":"AAAA,OAoSO,gBAAgB,CAAC;AAUxB,OAAO,KAAK,EAAU,gBAAgB,EAAqC,MAAM,sBAAsB,CAAC;AAMxG,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAQnD,QAAA,IAAI,eAAe,EAAG;IACpB,QAAQ,EAAE,QAAQ,CAAC,mBAAmB,CAAC,CAAC;CACzC,CAAC;AA+OF,KAAK,iBAAiB,GAAG;IACzB,UAAU,CAAC,EAAE,gBAAgB,CAAC;CAC7B,GAAG,OAAO,eAAe,CAAC;;;;;;AAoG3B,wBAOG"}
1
+ {"version":3,"file":"PlAgDataTable.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/PlAgDataTable/PlAgDataTable.vue"],"names":[],"mappings":"AAAA,OAsSO,gBAAgB,CAAC;AAUxB,OAAO,KAAK,EAAU,gBAAgB,EAAqC,MAAM,sBAAsB,CAAC;AAMxG,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAQnD,QAAA,IAAI,eAAe,EAAG;IACpB,QAAQ,EAAE,QAAQ,CAAC,mBAAmB,CAAC,CAAC;CACzC,CAAC;AAiPF,KAAK,iBAAiB,GAAG;IACzB,UAAU,CAAC,EAAE,gBAAgB,CAAC;CAC7B,GAAG,OAAO,eAAe,CAAC;;;;;;AAoG3B,wBAOG"}