@datagrok/webcomponents 1.4.6 → 1.5.0

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.
@@ -1,6 +1,6 @@
1
1
 
2
- > @datagrok/webcomponents@1.4.6 build /home/runner/work/public/public/packages/WebComponents
2
+ > @datagrok/webcomponents@1.5.0 build /home/runner/work/public/public/packages/WebComponents
3
3
  > grok build
4
4
 
5
5
  Rspack compiled successfully
6
- bundled WebComponents in 0.4s 132 KB
6
+ bundled WebComponents in 0.5s 128 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # WebComponents changelog
2
2
 
3
+ ## 1.5.0 (2026-11-27)
4
+
5
+ * Maintenance release: build toolchain and dependency updates
6
+
7
+ ## 1.5.0 (2026-11-27)
8
+
9
+ - InputForm: Removed the multiple choice overrides for condensed forms, outdated by the platform layout
10
+ - DockManager: Esc no longer closes the active panel
11
+ - Viewer: An options change no longer re-sets the frame and fires `viewer-data-frame-changed` for frames created in JS
12
+ - Viewer: A frame set on the viewer itself is kept on later options changes, and its `viewer-data-frame-changed` fires outside the Dart event
13
+ - Viewer: Removed the unused `viewer-type-changed` event and `getViewerEventObservable`
14
+ - Viewer: A failed viewer creation, or a throwing frame or options apply, no longer stops the element from applying later changes
15
+ - InputForm: `destroy()` cancels a form still being built
16
+ - ToggleInput: A value set by the host is no longer sent back as `value-changed`
17
+ - ValidationIcon: A `disabled` or `restricted` input whose value is consistent shows a link icon
18
+ - ValidationIcon: An inconsistent value shows a broken link icon instead of the handshake, matching the link icon of workflow-set values
19
+ - InputForm: Added the `skipLogic` property
20
+ - DockManager: Fixed views opened, or re-rendered, in the background splitting their panels evenly instead of by the declared ratios
21
+ - ValidationIcon: Advice actions send their `additionalParams` with the action request
22
+ - InputForm: Fixed a form opened with invalid or missing required values reporting itself valid
23
+
3
24
  ## 1.4.6 (2026-09-23)
4
25
 
5
26
  - Bundles webcomponents 0.3.7: InputForm funcCall swap and cleared-funcCall fixes, ValidationIcon retention, clearing and severity colors
@@ -1,4 +1,4 @@
1
- var webcomponents_test;(()=>{var e={397(e){!function(t,s){var o={};s(o);var i=o.default;for(var n in o)i[n]=o[n];"object"==typeof e.exports?e.exports=i:"function"==typeof define&&define.amd?define(function(){return i}):t.sha256=i}(this,function(e){"use strict";e.__esModule=!0,e.digestLength=32,e.blockSize=64;var t=new Uint32Array([0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5,0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5,0xd807aa98,0x12835b01,0x243185be,0x550c7dc3,0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174,0xe49b69c1,0xefbe4786,0xfc19dc6,0x240ca1cc,0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da,0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7,0xc6e00bf3,0xd5a79147,0x6ca6351,0x14292967,0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13,0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85,0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3,0xd192e819,0xd6990624,0xf40e3585,0x106aa070,0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5,0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3,0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208,0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2]);function s(e,s,o,i,n){for(var a,r,c,f,y,l,x,p,h,u,g,d,m;n>=64;){for(u=0,a=s[0],r=s[1],c=s[2],f=s[3],y=s[4],l=s[5],x=s[6],p=s[7];u<16;u++)g=i+4*u,e[u]=(255&o[g])<<24|(255&o[g+1])<<16|(255&o[g+2])<<8|255&o[g+3];for(u=16;u<64;u++)d=((h=e[u-2])>>>17|h<<15)^(h>>>19|h<<13)^h>>>10,m=((h=e[u-15])>>>7|h<<25)^(h>>>18|h<<14)^h>>>3,e[u]=(d+e[u-7]|0)+(m+e[u-16]|0);for(u=0;u<64;u++)d=(((y>>>6|y<<26)^(y>>>11|y<<21)^(y>>>25|y<<7))+(y&l^~y&x)|0)+(p+(t[u]+e[u]|0)|0)|0,m=((a>>>2|a<<30)^(a>>>13|a<<19)^(a>>>22|a<<10))+(a&r^a&c^r&c)|0,p=x,x=l,l=y,y=f+d|0,f=c,c=r,r=a,a=d+m|0;s[0]+=a,s[1]+=r,s[2]+=c,s[3]+=f,s[4]+=y,s[5]+=l,s[6]+=x,s[7]+=p,i+=64,n-=64}return i}var o=function(){function t(){this.digestLength=e.digestLength,this.blockSize=e.blockSize,this.state=new Int32Array(8),this.temp=new Int32Array(64),this.buffer=new Uint8Array(128),this.bufferLength=0,this.bytesHashed=0,this.finished=!1,this.reset()}return t.prototype.reset=function(){return this.state[0]=0x6a09e667,this.state[1]=0xbb67ae85,this.state[2]=0x3c6ef372,this.state[3]=0xa54ff53a,this.state[4]=0x510e527f,this.state[5]=0x9b05688c,this.state[6]=0x1f83d9ab,this.state[7]=0x5be0cd19,this.bufferLength=0,this.bytesHashed=0,this.finished=!1,this},t.prototype.clean=function(){for(var e=0;e<this.buffer.length;e++)this.buffer[e]=0;for(var e=0;e<this.temp.length;e++)this.temp[e]=0;this.reset()},t.prototype.update=function(e,t){if(void 0===t&&(t=e.length),this.finished)throw Error("SHA256: can't update because hash was finished.");var o=0;if(this.bytesHashed+=t,this.bufferLength>0){for(;this.bufferLength<64&&t>0;)this.buffer[this.bufferLength++]=e[o++],t--;64===this.bufferLength&&(s(this.temp,this.state,this.buffer,0,64),this.bufferLength=0)}for(t>=64&&(o=s(this.temp,this.state,e,o,t),t%=64);t>0;)this.buffer[this.bufferLength++]=e[o++],t--;return this},t.prototype.finish=function(e){if(!this.finished){var t=this.bytesHashed,o=this.bufferLength,i=t/0x20000000|0,n=t<<3,a=t%64<56?64:128;this.buffer[o]=128;for(var r=o+1;r<a-8;r++)this.buffer[r]=0;this.buffer[a-8]=i>>>24&255,this.buffer[a-7]=i>>>16&255,this.buffer[a-6]=i>>>8&255,this.buffer[a-5]=i>>>0&255,this.buffer[a-4]=n>>>24&255,this.buffer[a-3]=n>>>16&255,this.buffer[a-2]=n>>>8&255,this.buffer[a-1]=n>>>0&255,s(this.temp,this.state,this.buffer,0,a),this.finished=!0}for(var r=0;r<8;r++)e[4*r+0]=this.state[r]>>>24&255,e[4*r+1]=this.state[r]>>>16&255,e[4*r+2]=this.state[r]>>>8&255,e[4*r+3]=this.state[r]>>>0&255;return this},t.prototype.digest=function(){var e=new Uint8Array(this.digestLength);return this.finish(e),e},t.prototype._saveState=function(e){for(var t=0;t<this.state.length;t++)e[t]=this.state[t]},t.prototype._restoreState=function(e,t){for(var s=0;s<this.state.length;s++)this.state[s]=e[s];this.bytesHashed=t,this.finished=!1,this.bufferLength=0},t}();e.Hash=o;var i=function(){function e(e){this.inner=new o,this.outer=new o,this.blockSize=this.inner.blockSize,this.digestLength=this.inner.digestLength;var t=new Uint8Array(this.blockSize);if(e.length>this.blockSize)new o().update(e).finish(t).clean();else for(var s=0;s<e.length;s++)t[s]=e[s];for(var s=0;s<t.length;s++)t[s]^=54;this.inner.update(t);for(var s=0;s<t.length;s++)t[s]^=106;this.outer.update(t),this.istate=new Uint32Array(8),this.ostate=new Uint32Array(8),this.inner._saveState(this.istate),this.outer._saveState(this.ostate);for(var s=0;s<t.length;s++)t[s]=0}return e.prototype.reset=function(){return this.inner._restoreState(this.istate,this.inner.blockSize),this.outer._restoreState(this.ostate,this.outer.blockSize),this},e.prototype.clean=function(){for(var e=0;e<this.istate.length;e++)this.ostate[e]=this.istate[e]=0;this.inner.clean(),this.outer.clean()},e.prototype.update=function(e){return this.inner.update(e),this},e.prototype.finish=function(e){return this.outer.finished?this.outer.finish(e):(this.inner.finish(e),this.outer.update(e,this.digestLength).finish(e)),this},e.prototype.digest=function(){var e=new Uint8Array(this.digestLength);return this.finish(e),e},e}();function n(e){var t=new o().update(e),s=t.digest();return t.clean(),s}function a(e,t){var s=new i(e).update(t),o=s.digest();return s.clean(),o}e.HMAC=i,e.hash=n,e.default=n,e.hmac=a;var r=new Uint8Array(e.digestLength);e.hkdf=function(e,t,s,o){void 0===t&&(t=r),void 0===o&&(o=32);for(var n=new Uint8Array([1]),c=new i(a(t,e)),f=new Uint8Array(c.digestLength),y=f.length,l=new Uint8Array(o),x=0;x<o;x++)y===f.length&&(!function(e,t,s,o){var i=o[0];if(0===i)throw Error("hkdf: cannot expand more");t.reset(),i>1&&t.update(e),s&&t.update(s),t.update(o),t.finish(e),o[0]++}(f,c,s,n),y=0),l[x]=f[y++];return c.clean(),f.fill(0),n.fill(0),l},e.pbkdf2=function(e,t,s,o){for(var n=new i(e),a=n.digestLength,r=new Uint8Array(4),c=new Uint8Array(a),f=new Uint8Array(a),y=new Uint8Array(o),l=0;l*a<o;l++){var x=l+1;r[0]=x>>>24&255,r[1]=x>>>16&255,r[2]=x>>>8&255,r[3]=x>>>0&255,n.reset(),n.update(t),n.update(r),n.finish(f);for(var p=0;p<a;p++)c[p]=f[p];for(var p=2;p<=s;p++){n.reset(),n.update(f).finish(f);for(var h=0;h<a;h++)c[h]^=f[h]}for(var p=0;p<a&&l*a+p<o;p++)y[l*a+p]=c[p]}for(var l=0;l<a;l++)c[l]=f[l]=0;for(var l=0;l<4;l++)r[l]=0;return n.clean(),y}})}},t={};function s(o){var i=t[o];if(void 0!==i)return i.exports;var n=t[o]={exports:{}};return e[o].call(n.exports,n,n.exports,s),n.exports}s.d=(e,t)=>{for(var o in t)s.o(t,o)&&!s.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};(()=>{"use strict";var e;s.r(o),s.d(o,{tests:()=>f,test:()=>O,_package:()=>A,initAutoTests:()=>S});let t=DG;s(397);let i=DG.DataFrame.fromCsv(`countries,fasta,smiles,molregno,LON,Zip Code,Street Address Line 1,ImageUrl,user_id,error_message,xray,flag,magnitude,CS-id,pdb_id,accel_a,time_offset,chart,fit,Questions,empty_number,empty_string
1
+ var webcomponents_test;(()=>{var e={397(e){!function(t,n){var o={};n(o);var r=o.default;for(var s in o)r[s]=o[s];"object"==typeof e.exports?e.exports=r:"function"==typeof define&&define.amd?define(function(){return r}):t.sha256=r}(this,function(e){"use strict";e.__esModule=!0,e.digestLength=32,e.blockSize=64;var t=new Uint32Array([0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5,0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5,0xd807aa98,0x12835b01,0x243185be,0x550c7dc3,0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174,0xe49b69c1,0xefbe4786,0xfc19dc6,0x240ca1cc,0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da,0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7,0xc6e00bf3,0xd5a79147,0x6ca6351,0x14292967,0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13,0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85,0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3,0xd192e819,0xd6990624,0xf40e3585,0x106aa070,0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5,0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3,0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208,0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2]);function n(e,n,o,r,s){for(var i,a,l,c,u,f,y,x,p,d,h,g,m;s>=64;){for(d=0,i=n[0],a=n[1],l=n[2],c=n[3],u=n[4],f=n[5],y=n[6],x=n[7];d<16;d++)h=r+4*d,e[d]=(255&o[h])<<24|(255&o[h+1])<<16|(255&o[h+2])<<8|255&o[h+3];for(d=16;d<64;d++)g=((p=e[d-2])>>>17|p<<15)^(p>>>19|p<<13)^p>>>10,m=((p=e[d-15])>>>7|p<<25)^(p>>>18|p<<14)^p>>>3,e[d]=(g+e[d-7]|0)+(m+e[d-16]|0);for(d=0;d<64;d++)g=(((u>>>6|u<<26)^(u>>>11|u<<21)^(u>>>25|u<<7))+(u&f^~u&y)|0)+(x+(t[d]+e[d]|0)|0)|0,m=((i>>>2|i<<30)^(i>>>13|i<<19)^(i>>>22|i<<10))+(i&a^i&l^a&l)|0,x=y,y=f,f=u,u=c+g|0,c=l,l=a,a=i,i=g+m|0;n[0]+=i,n[1]+=a,n[2]+=l,n[3]+=c,n[4]+=u,n[5]+=f,n[6]+=y,n[7]+=x,r+=64,s-=64}return r}var o=function(){function t(){this.digestLength=e.digestLength,this.blockSize=e.blockSize,this.state=new Int32Array(8),this.temp=new Int32Array(64),this.buffer=new Uint8Array(128),this.bufferLength=0,this.bytesHashed=0,this.finished=!1,this.reset()}return t.prototype.reset=function(){return this.state[0]=0x6a09e667,this.state[1]=0xbb67ae85,this.state[2]=0x3c6ef372,this.state[3]=0xa54ff53a,this.state[4]=0x510e527f,this.state[5]=0x9b05688c,this.state[6]=0x1f83d9ab,this.state[7]=0x5be0cd19,this.bufferLength=0,this.bytesHashed=0,this.finished=!1,this},t.prototype.clean=function(){for(var e=0;e<this.buffer.length;e++)this.buffer[e]=0;for(var e=0;e<this.temp.length;e++)this.temp[e]=0;this.reset()},t.prototype.update=function(e,t){if(void 0===t&&(t=e.length),this.finished)throw Error("SHA256: can't update because hash was finished.");var o=0;if(this.bytesHashed+=t,this.bufferLength>0){for(;this.bufferLength<64&&t>0;)this.buffer[this.bufferLength++]=e[o++],t--;64===this.bufferLength&&(n(this.temp,this.state,this.buffer,0,64),this.bufferLength=0)}for(t>=64&&(o=n(this.temp,this.state,e,o,t),t%=64);t>0;)this.buffer[this.bufferLength++]=e[o++],t--;return this},t.prototype.finish=function(e){if(!this.finished){var t=this.bytesHashed,o=this.bufferLength,r=t/0x20000000|0,s=t<<3,i=t%64<56?64:128;this.buffer[o]=128;for(var a=o+1;a<i-8;a++)this.buffer[a]=0;this.buffer[i-8]=r>>>24&255,this.buffer[i-7]=r>>>16&255,this.buffer[i-6]=r>>>8&255,this.buffer[i-5]=r>>>0&255,this.buffer[i-4]=s>>>24&255,this.buffer[i-3]=s>>>16&255,this.buffer[i-2]=s>>>8&255,this.buffer[i-1]=s>>>0&255,n(this.temp,this.state,this.buffer,0,i),this.finished=!0}for(var a=0;a<8;a++)e[4*a+0]=this.state[a]>>>24&255,e[4*a+1]=this.state[a]>>>16&255,e[4*a+2]=this.state[a]>>>8&255,e[4*a+3]=this.state[a]>>>0&255;return this},t.prototype.digest=function(){var e=new Uint8Array(this.digestLength);return this.finish(e),e},t.prototype._saveState=function(e){for(var t=0;t<this.state.length;t++)e[t]=this.state[t]},t.prototype._restoreState=function(e,t){for(var n=0;n<this.state.length;n++)this.state[n]=e[n];this.bytesHashed=t,this.finished=!1,this.bufferLength=0},t}();e.Hash=o;var r=function(){function e(e){this.inner=new o,this.outer=new o,this.blockSize=this.inner.blockSize,this.digestLength=this.inner.digestLength;var t=new Uint8Array(this.blockSize);if(e.length>this.blockSize)new o().update(e).finish(t).clean();else for(var n=0;n<e.length;n++)t[n]=e[n];for(var n=0;n<t.length;n++)t[n]^=54;this.inner.update(t);for(var n=0;n<t.length;n++)t[n]^=106;this.outer.update(t),this.istate=new Uint32Array(8),this.ostate=new Uint32Array(8),this.inner._saveState(this.istate),this.outer._saveState(this.ostate);for(var n=0;n<t.length;n++)t[n]=0}return e.prototype.reset=function(){return this.inner._restoreState(this.istate,this.inner.blockSize),this.outer._restoreState(this.ostate,this.outer.blockSize),this},e.prototype.clean=function(){for(var e=0;e<this.istate.length;e++)this.ostate[e]=this.istate[e]=0;this.inner.clean(),this.outer.clean()},e.prototype.update=function(e){return this.inner.update(e),this},e.prototype.finish=function(e){return this.outer.finished?this.outer.finish(e):(this.inner.finish(e),this.outer.update(e,this.digestLength).finish(e)),this},e.prototype.digest=function(){var e=new Uint8Array(this.digestLength);return this.finish(e),e},e}();function s(e){var t=new o().update(e),n=t.digest();return t.clean(),n}function i(e,t){var n=new r(e).update(t),o=n.digest();return n.clean(),o}e.HMAC=r,e.hash=s,e.default=s,e.hmac=i;var a=new Uint8Array(e.digestLength);e.hkdf=function(e,t,n,o){void 0===t&&(t=a),void 0===o&&(o=32);for(var s=new Uint8Array([1]),l=new r(i(t,e)),c=new Uint8Array(l.digestLength),u=c.length,f=new Uint8Array(o),y=0;y<o;y++)u===c.length&&(!function(e,t,n,o){var r=o[0];if(0===r)throw Error("hkdf: cannot expand more");t.reset(),r>1&&t.update(e),n&&t.update(n),t.update(o),t.finish(e),o[0]++}(c,l,n,s),u=0),f[y]=c[u++];return l.clean(),c.fill(0),s.fill(0),f},e.pbkdf2=function(e,t,n,o){for(var s=new r(e),i=s.digestLength,a=new Uint8Array(4),l=new Uint8Array(i),c=new Uint8Array(i),u=new Uint8Array(o),f=0;f*i<o;f++){var y=f+1;a[0]=y>>>24&255,a[1]=y>>>16&255,a[2]=y>>>8&255,a[3]=y>>>0&255,s.reset(),s.update(t),s.update(a),s.finish(c);for(var x=0;x<i;x++)l[x]=c[x];for(var x=2;x<=n;x++){s.reset(),s.update(c).finish(c);for(var p=0;p<i;p++)l[p]^=c[p]}for(var x=0;x<i&&f*i+x<o;x++)u[f*i+x]=l[x]}for(var f=0;f<i;f++)l[f]=c[f]=0;for(var f=0;f<4;f++)a[f]=0;return s.clean(),u}})}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var s=t[o]={exports:{}};return e[o].call(s.exports,s,s.exports,n),s.exports}n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};(()=>{"use strict";var e;n.r(o),n.d(o,{tests:()=>d,test:()=>$,_package:()=>M,initAutoTests:()=>I});let t=DG;n(397);let r=DG.DataFrame.fromCsv(`countries,fasta,smiles,molregno,LON,Zip Code,Street Address Line 1,ImageUrl,user_id,error_message,xray,flag,magnitude,CS-id,pdb_id,accel_a,time_offset,chart,fit,Questions,empty_number,empty_string
2
2
  Belgium,MSNFHNEHVMQFYRNNLKTKGVFGRQ,CC(C(=O)OCCCc1cccnc1)c2cccc(c2)C(=O)c3ccccc3,1480014,36.276729583740234,995042300,14016 ROUTE 31W,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND
3
3
  ATOM
4
4
  END",flag,1,1,1QBS,1,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[2.497360340644872, 1.7058694986686864, 5.278052678195135, 0.16000320889028383],""points"":[{""x"":0.10000000149011612,""y"":2.374499797821045},{""x"":0.6000000238418579,""y"":2.6242473125457764},{""x"":1.100000023841858,""y"":2.367267608642578},{""x"":1.600000023841858,""y"":2.6723148822784424},{""x"":2.0999999046325684,""y"":2.6537344455718994},{""x"":2.5999999046325684,""y"":2.3651671409606934},{""x"":3.0999999046325684,""y"":2.5654284954071045},{""x"":3.5999999046325684,""y"":2.4160959720611572},{""x"":4.099999904632568,""y"":2.286726713180542},{""x"":4.599999904632568,""y"":2.5100042819976807},{""x"":5.099999904632568,""y"":1.6676985025405884},{""x"":5.599999904632568,""y"":0.680136501789093},{""x"":6.099999904632568,""y"":0.3391543924808502},{""x"":6.599999904632568,""y"":0.09038983285427094},{""x"":7.099999904632568,""y"":0.19802775979042053}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[7.525235855508179, 1.3186911876809984, 5.335672608564294, 0.7860743343958098],""points"":[{""x"":0.10000000149011612,""y"":7.988070487976074},{""x"":0.6000000238418579,""y"":7.018453121185303},{""x"":1.100000023841858,""y"":8.115279197692871},{""x"":1.600000023841858,""y"":7.486658096313477},{""x"":2.0999999046325684,""y"":7.396438121795654},{""x"":2.5999999046325684,""y"":7.477052211761475},{""x"":3.0999999046325684,""y"":6.913095474243164},{""x"":3.5999999046325684,""y"":8.01385498046875},{""x"":4.099999904632568,""y"":6.985900402069092},{""x"":4.599999904632568,""y"":6.970335960388184},{""x"":5.099999904632568,""y"":5.448817253112793},{""x"":5.599999904632568,""y"":2.5534818172454834},{""x"":6.099999904632568,""y"":1.893947958946228},{""x"":6.599999904632568,""y"":0.6340042352676392},{""x"":7.099999904632568,""y"":0.8403874039649963}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,100,abc
@@ -29,7 +29,7 @@ END",flag,9,9,2BDJ,9,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-
29
29
  Switzerland,IRVVGRYLIEVWKAAGMDMDKVLFLWSSDEI,CN1CCC(CC1)Oc2ccc(cc2)C(F)(F)F,1480028,36.33137130737305,99504,92-11 179TH PLACE,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND
30
30
  ATOM
31
31
  END",flag,9,10,1IAN,10,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[1.1190255865097471, 2.3163895161544437, 5.4968866182279195, 0.2035204047289052],""points"":[{""x"":0.10000000149011612,""y"":1.1057683229446411},{""x"":0.6000000238418579,""y"":1.1019697189331055},{""x"":1.100000023841858,""y"":1.0818607807159424},{""x"":1.600000023841858,""y"":1.062997817993164},{""x"":2.0999999046325684,""y"":1.046447515487671},{""x"":2.5999999046325684,""y"":1.1217249631881714},{""x"":3.0999999046325684,""y"":1.2166996002197266},{""x"":3.5999999046325684,""y"":1.215477705001831},{""x"":4.099999904632568,""y"":1.0581893920898438},{""x"":4.599999904632568,""y"":1.1747995615005493},{""x"":5.099999904632568,""y"":1.0181127786636353},{""x"":5.599999904632568,""y"":0.5344523191452026},{""x"":6.099999904632568,""y"":0.2569526433944702},{""x"":6.599999904632568,""y"":0.1912207305431366},{""x"":7.099999904632568,""y"":0.15060538053512573}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[3.1038581025805785, 2.0032224204185245, 5.087602825989163, 0.13277988512492753],""points"":[{""x"":0.10000000149011612,""y"":3.0498509407043457},{""x"":0.6000000238418579,""y"":2.805217742919922},{""x"":1.100000023841858,""y"":3.3415253162384033},{""x"":1.600000023841858,""y"":3.0549843311309814},{""x"":2.0999999046325684,""y"":3.250074863433838},{""x"":2.5999999046325684,""y"":3.0432586669921875},{""x"":3.0999999046325684,""y"":3.265852451324463},{""x"":3.5999999046325684,""y"":2.9475724697113037},{""x"":4.099999904632568,""y"":3.1929898262023926},{""x"":4.599999904632568,""y"":2.7460060119628906},{""x"":5.099999904632568,""y"":1.6175861358642578},{""x"":5.599999904632568,""y"":0.3006608486175537},{""x"":6.099999904632568,""y"":0.3444803059101105},{""x"":6.599999904632568,""y"":0.015537971630692482},{""x"":7.099999904632568,""y"":0.5527358055114746}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,
32
- ,,,,,,,,,,,,,,,,,,,,,`);i.columns.add(DG.Column.fromList(DG.TYPE.BYTE_ARRAY,"BinaryImage",Array.from(new Uint8Array(11))));let n=console.log.bind(console),a=console.info.bind(console),r=console.warn.bind(console),c=console.error.bind(console),f={},y="Auto Tests",l="Demo",x="Detectors",p="Core",h={};(e||(e={})).notNull=function(e,t){if(null==e)throw Error(`${null==t?"Value":t} not defined`)};class u{constructor(e,t,s){this.catchUnhandled=!0,this.report=!1,this.returnOnFail=!1,this.closeAll=!0,void 0!==e&&(this.catchUnhandled=e),void 0!==t&&(this.report=t),void 0!==s&&(this.returnOnFail=s)}}class g{constructor(e,t,s,o){this.category=e,this.name=t,o??(o={}),o.timeout??(o.timeout=3e4),this.options=o,this.test=async()=>new Promise(async(e,t)=>{let o="";try{DG.Test.isInDebug;let e=await s();try{o=e?.toString()??""}catch(e){o="Can't convert test's result to string",console.error(`Can't convert test's result to string in the ${this.category}:${this.name} test`)}}catch(e){t(e)}e(o)})}}function d(e,t=!0,s){if(s=s?`${s}, `:"",e!==t)throw Error(`${s}Expected "${t}", got "${e}"`)}function m(e,t,s){let o=e.options?.node??t.node??!1;return s.nodeOnly?o:!s.excludeNodeTests||!o}async function b(e,t){let s=e.id;if(h[s])return;let o=t?t.tests:f;if("DevTools"===e.name||t&&"DevTools"===t._package.name)for(let e of window.dartTests){let t=e.name.split(/\s*\|\s*!/g),s=t.pop()??e.name,i=t.length?p+": "+t.join(": "):p,n=s.split(" | ");s=n[n.length-1],n.unshift(i),n.pop(),void 0===o[i=n.join(": ")]&&(o[i]={tests:[],clear:!0}),o[i].tests.push(new g(i,s,e.test,{isAggregated:!1,timeout:e.options?.timeout??3e4,skipReason:e.options?.skipReason,owner:e.options?.owner,benchmark:e.options?.benchmark??!1}))}let n=[],a=[],r=[],c=await grok.dapi.functions.filter(`package.id = "${s}"`).list(),u=new RegExp(/skip:\s*([^,\s]+)|wait:\s*(\d+)|cat:\s*([^,\s]+)|timeout:\s*(\d+)/g);for(let t of c){let s=t.options.test,c=t.options.demoPath;if(s&&Array.isArray(s)&&s.length)for(let e=0;e<s.length;e++){let i=s[e].matchAll(u),a={};Array.from(i).forEach(e=>{e[0].startsWith("skip")?a.skip=e[1]:e[0].startsWith("wait")?a.wait=parseInt(e[2]):e[0].startsWith("cat")?a.cat=e[3]:e[0].startsWith("timeout")&&(a.timeout=parseInt(e[4]))});let r=new g(a.cat??y,1===s.length?t.name:`${t.name} ${e+1}`,async()=>{var o;let i=await grok.functions.eval((o=s[e],o.replace(RegExp(t.name,"gi"),t.nqName)));if(a.wait&&await v(a.wait),"boolean"==typeof i&&!i)throw`Failed: ${s[e]}, expected true, got ${i}`},{skipReason:a.skip,timeout:DG.Test.isInBenchmark?a.benchmarkTimeout??108e5:a.timeout??3e4,node:t instanceof DG.DataQuery});if(a.cat){let e=a.cat;void 0===o[e]&&(o[e]={tests:[],clear:!0}),o[e].tests||(o[e].tests=[]),o[e].tests.push(r)}else n.push(r)}if(c){let e=t.options.demoWait?parseInt(t.options.demoWait):void 0,s=new g(l,t.friendlyName,async()=>{await v(300),grok.shell.clearLastError(),await t.apply(),await v(e||2e3);let s=await grok.shell.lastError;if(s)throw Error(s)},{skipReason:t.options.demoSkip});a.push(s)}if(t.hasTag("semTypeDetector")){let s=i;t.options.testData&&(s=await grok.data.files.openTable(`System:AppData/${e.nqName}/${t.options.testData}`));let o=new g(x,t.friendlyName,async()=>{let o=[];for(let i of(console.log(`System:AppData/${e.nqName}/${t.options.testData}`),s.clone().columns)){let e=await t.apply([i]);o.push(e||i.semType)}let i=o.filter(e=>e);d(i.length,1),t.options.testDataColumnName&&d(i[0],t.options.testDataColumnName)},{skipReason:t.options.skipTest});r.push(o)}}h[s]=!0,n.length>0&&(o[y]={tests:n,clear:!0}),a.length>0&&(o[l]={tests:a,clear:!0}),r.length>0&&(o[x]={tests:r,clear:!1})}async function C(e){var t;let s,o=e?.nodeOptions?e.nodeOptions.package:grok.functions.getCurrentCall().func.package;if(!o)throw Error("Can't run tests outside of the package");let i=o.packageOwner?.match(/<([^>]*)>/),y=i?i[1]:"";void 0!=o&&await b(o);let l=[];console.log("Running tests..."),console.log(e),e??(e={}),(t=e).testContext??(t.testContext=new u),grok.shell.clearLastError();let x=(s=[],console.log=(...e)=>{s.push(...e),n(...e)},console.info=(...e)=>{s.push(...e),a(...e)},console.warn=(...e)=>{s.push(...e),r(...e)},console.error=(...e)=>{s.push(...e),c(...e)},s);for(let t of(await d(f,e),l))t.result=t.result.toString().replace(/"/g,"'"),void 0!=t.logs&&(t.logs=t.logs.toString().replace(/"/g,"'"));return l;async function p(e,t){let s;try{void 0!==e&&await D(async()=>{await e()},1e5,`before ${t}: timeout error`)}catch(e){s=await w(e)}return s}async function h(e,t,s){let i=(e.tests??[]).filter(s=>m(s,e,t)),n=[],a=g();if(e.clear){let r=s&&void 0!=t.skipToTest;for(let s=0;s<i.length;s++){i[s].options&&i[s].options?.benchmark===void 0&&(i[s].options||(i[s].options={}),i[s].options.benchmark=e.benchmarks??!1);let c=i[s];if(t.test&&t.test.toLowerCase()!==c.name.toLowerCase())continue;if(r)if(t?.skipToTest==void 0||c.name.toLowerCase().trim()!==t?.skipToTest.toLowerCase().trim())continue;else r=!1;c?.options&&(c.options.owner=i[s].options?.owner??e?.owner??y??"");let f=await k(c,t?.test,x,DG.Test.isInBenchmark?i[s].options?.benchmarkTimeout??108e5:i[s].options?.timeout??3e4,o.name,t.verbose);if(!c.options?.skipReason&&window.gc&&await window.gc(),f&&(n.push({...f,widgetsDifference:g()-a}),t.returnOnFail&&t.skipToTest!==c.name&&!f.success&&!f.skipped))break;t.nodeOptions||t.testContext?.closeAll===!1||(grok.shell.closeAll(),DG.Balloon.closeAll())}}else{let r=s&&void 0!=t.skipToTest;for(let s=0;s<i.length;s++){let c=i[s];if(t.test&&t.test.toLowerCase()!==c.name.toLowerCase())continue;if(r){t?.skipToTest!=void 0&&c.name.toLowerCase().trim()===t?.skipToTest.toLowerCase().trim()&&(r=!1);continue}c?.options&&(c.options.owner=i[s].options?.owner??e?.owner??y??"");let f=await k(c,t?.test,x,DG.Test.isInBenchmark?i[s].options?.benchmarkTimeout??108e5:i[s].options?.timeout,o.name,t.verbose);if(!c.options?.skipReason&&window.gc&&await window.gc(),f&&(n.push({...f,widgetsDifference:g()-a}),t.returnOnFail&&t.skipToTest!==c.name&&!f.success&&!f.skipped))break}}return n}function g(){if("u">typeof process)return 0;let e=-1;try{e=DG.Widget.getAll().length}catch(e){console.warn(e.message??e)}return e}async function d(e,t){try{let s=t?.skipToCategory!=void 0,i=!1;for(let[a,r]of Object.entries(e)){let e;if(t.exclude?.some(e=>a.startsWith(e))||t?.category!=null&&!a.toLowerCase().startsWith(t?.category.toLowerCase().trim()))continue;if(s)if(i)s=!1;else{if(t?.skipToCategory==null||a.toLowerCase().trim()!==t?.skipToCategory.toLowerCase().trim())continue;i=!0}let c=(r.tests??[]).filter(e=>m(e,r,t));if((t.nodeOnly||t.excludeNodeTests)&&0===c.length)continue;let f=void 0==r.tests?void 0:c.every(e=>e.options?.skipReason||t?.test!=null&&t.test.toLowerCase()!==e.name.toLowerCase());if(!f){let e=c.filter(e=>e.options?.skipReason||t?.test!=null&&t.test.toLowerCase()!==e.name.toLowerCase()).length;n(`Package testing: Started {{${a}}}${e>0?` skipped {{${e}}}`:""}`),r.beforeStatus=await p(r.before,a)}t.stressTest&&(c=c.filter(e=>e.options?.stressTest),c=function(e){let t=e.slice();return t.sort(()=>Math.random()-.5),t}(c)),(t.tags?.length??0)>0&&(c=c.filter(e=>e.options?.tags?.some(e=>(t?.tags??[]).includes(e)))),r.beforeStatus?(e=Array.from(c.map(e=>({date:new Date().toISOString(),category:a,name:e.name,success:!1,result:"before() failed",ms:0,skipped:!1,logs:"",owner:y,package:o.name,widgetsDifference:0,flaking:DG.Test.isReproducing})))).forEach(async e=>await grok.shell.reportTest("package",e)):e=await h(r,t,s);let x=e.filter(e=>"skipped"!=e.result);if(f||(r.afterStatus=await p(r.after,a)),r.afterStatus&&(n(`Package testing: Category after() {{${a}}} failed`),n(`Package testing: Result for {{${a}}} after: ${r.afterStatus}`),x.push({date:new Date().toISOString(),category:a,name:"after",success:!1,result:r.afterStatus,ms:0,skipped:!1,logs:"",owner:y,package:o.name,widgetsDifference:0,flaking:DG.Test.isReproducing})),r.beforeStatus&&(n(`Package testing: Category before() {{${a}}} failed`),n(`Package testing: Result for {{${a}}} before: ${r.beforeStatus}`),x.push({date:new Date().toISOString(),category:a,name:"before",success:!1,result:r.beforeStatus,ms:0,skipped:!1,logs:"",owner:y,package:o.name,widgetsDifference:0,flaking:DG.Test.isReproducing})),l.push(...x),t.returnOnFail&&x.some(e=>!e.success&&!e.skipped&&e.name!==t.skipToTest))break}}finally{console.log=n,console.info=a,console.warn=r,console.error=c}if(t.testContext.catchUnhandled&&!DG.Test.isInBenchmark){await v(1e3);let e=await grok.shell.lastError;if(void 0!=e){let t={logs:"",date:new Date().toISOString(),category:"Unhandled exceptions",name:"Exception",result:e??"",success:!e,ms:0,skipped:!1,owner:y??"",package:o.name,widgetsDifference:0};n(`Package testing: Unhandled Exception: ${e}`),l.push({...t,flaking:DG.Test.isReproducing&&!e}),t.package=o.name,await grok.shell.reportTest("package",t)}}}}async function w(e){return`${e.toString()}
33
- ${e.stack?await DG.Logger.translateStackTrace(e.stack):""}`}async function k(e,t,s,o,i,a){let r;s.length=0;let f=void 0!=t&&e.name.toLowerCase()!==t.toLowerCase(),y=e.options?.skipReason||f,l=f?"skipped":e.options?.skipReason;if(DG.Test.isInBenchmark&&!e.options?.benchmark)return void n(`Package testing: Skipped {{${e.category}}} {{${e.name}}} doesnt available in benchmark mode`);y&&!DG.Test.isInBenchmark&&n(`Package testing: Skipped {{${e.category}}} {{${e.name}}}`),y||n(`Package testing: Started {{${e.category}}} {{${e.name}}}`);let x=Date.now(),p=new Date(x).toISOString();try{y?r={name:e.name,owner:e.options?.owner??"",category:e.category,logs:"",date:p,success:!0,result:l,ms:0,skipped:!0,package:i??"",flaking:DG.Test.isReproducing}:(DG.Test.isProfiling&&console.profile(`${e.category}: ${e.name}`),r={name:e.name,owner:e.options?.owner??"",category:e.category,logs:"",date:p,success:!0,result:(await D(e.test,o??3e4)).toString()??"OK",ms:0,skipped:!1,package:i??"",flaking:DG.Test.isReproducing},DG.Test.isProfiling&&(console.profileEnd(`${e.category}: ${e.name}`),grok.shell.info(`Profiling of ${e.category}: ${e.name} finished
34
- Please ensure that you have opened DevTools (F12) / Performance panel before test starts.`)))}catch(t){c(t),r={name:e.name,owner:e.options?.owner??"",category:e.category,logs:"",date:p,success:!1,result:await w(t),ms:0,skipped:!1,package:i??"",flaking:!1}}if(e.options?.isAggregated&&r.result.constructor===DG.DataFrame){let e=r.result.col("success");if(e&&(r.success=e.stats.sum===e.length),!a){let e=r.result;e.columns.remove("stack"),e.rows.removeWhere(e=>e.get("success")),r.result=e}r.result=r.result.toCsv()}if(r.logs=s.join("\n"),r.ms=Date.now()-x,y||n(`Package testing: Finished {{${e.category}}} {{${e.name}}} with {{${r.success?"success":"error"}}} for ${r.ms} ms`),r.success||n(`Package testing: Result for {{${e.category}}} {{${e.name}}}: ${r.result}`),r.category=e.category,r.name=e.name,r.owner=e.options?.owner??"",!f){let t={success:r.success,result:r.result,ms:r.ms,date:r.date,skipped:r.skipped,category:e.category,name:e.name,logs:r.logs,owner:r.owner,flaking:DG.Test.isReproducing&&r.success,package:r.package};if(r.result.constructor==Object){let e=Object.keys(r.result).reduce((e,t)=>({...e,["result."+t]:r.result[t]}),{});t={...t,...e}}t.result instanceof DG.DataFrame&&(t.result=JSON.stringify(t.result?.toJson())||""),await grok.shell.reportTest("package",t)}return r}async function v(e){await new Promise(t=>setTimeout(t,e))}async function D(e,t,s="EXECUTION TIMEOUT"){let o=null,i=new Promise((e,i)=>{o=setTimeout(()=>{i(s)},t)});try{return await Promise.race([e(),i])}finally{o&&clearTimeout(o)}}function T(e,t,s,o,i,n,a){try{var r=e[n](a),c=r.value}catch(e){s(e);return}r.done?t(c):Promise.resolve(c).then(o,i)}function L(e){return function(){var t=this,s=arguments;return new Promise(function(o,i){var n=e.apply(t,s);function a(e){T(n,o,i,a,r,"next",e)}function r(e){T(n,o,i,a,r,"throw",e)}a(void 0)})}}DG.DataFrame.fromColumns([DG.Column.fromStrings("col",["val1","val2","val3"])]);let A=new t.Package;function O(e,s,o){return L(function*(){let i=yield C({category:e,test:s,testContext:o});return t.DataFrame.fromObjects(i)})()}function S(){return L(function*(){yield b(A,A.getModule("package-test.js"))})()}})(),webcomponents_test=o})();
32
+ ,,,,,,,,,,,,,,,,,,,,,`),s=Uint8Array.from(atob("iVBORw0KGgoAAAANSUhEUgAAABgAAAAQCAIAAACDRijCAAAAQElEQVR4nGO8Y2PDQA3ARBVTGKhoEAucpXz4MBn679ra0sxFaDYQBMqoPhh8gc00fA1iQeOTl5oYqOgixuGbaQF0Bgp24E7RmwAAAABJRU5ErkJggg=="),e=>e.charCodeAt(0));function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function a(e,t,n,o,r,s,i){try{var a=e[s](i),l=a.value}catch(e){n(e);return}a.done?t(l):Promise.resolve(l).then(o,r)}function l(e){return function(){var t=this,n=arguments;return new Promise(function(o,r){var s=e.apply(t,n);function i(e){a(s,o,r,i,l,"next",e)}function l(e){a(s,o,r,i,l,"throw",e)}i(void 0)})}}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),o.forEach(function(t){var o;o=n[t],t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o})}return e}function u(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}r.columns.add(DG.Column.fromList(DG.TYPE.BYTE_ARRAY,"BinaryImage",Array.from({length:11},()=>s)));let f=console.log.bind(console),y=console.info.bind(console),x=console.warn.bind(console),p=console.error.bind(console),d={},h="Auto Tests",g="Demo",m="Detectors",b="Core",v={};(e||(e={})).notNull=function(e,t){if(null==e)throw Error(`${null==t?"Value":t} not defined`)};class C{constructor(e,t,n){this.catchUnhandled=!0,this.report=!1,this.returnOnFail=!1,this.closeAll=!0,void 0!==e&&(this.catchUnhandled=e),void 0!==t&&(this.report=t),void 0!==n&&(this.returnOnFail=n)}}class w{constructor(e,t,n,o){this.category=e,this.name=t,null!=o||(o={}),null!=o.timeout||(o.timeout=3e4),this.options=o,this.test=()=>l(function*(){return new Promise((e,t)=>l(function*(){let o="";try{DG.Test.isInDebug;let e=yield n();try{var r;o=null!=(r=null==e?void 0:e.toString())?r:""}catch(e){o="Can't convert test's result to string",console.error(`Can't convert test's result to string in the ${this.category}:${this.name} test`)}}catch(e){t(e)}e(o)}).call(this))}).call(this)}}function k(e,t,n){let o=void 0===t||t;if(n=n?`${n}, `:"",e!==o)throw Error(`${n}Expected "${o}", got "${e}"`)}function A(e,t,n){var o,r,s;let i=null!=(o=null!=(r=null==(s=e.options)?void 0:s.node)?r:t.node)&&o;return n.nodeOnly?i:!n.excludeNodeTests||!i}function O(e,t){return l(function*(){let n=e.id;if(v[n])return;let o=t?t.tests:d;if("DevTools"===e.name||t&&"DevTools"===t._package.name){var s=!0,i=!1,a=void 0;try{for(var c,u,f,y,x,p,C,A,O=window.dartTests[Symbol.iterator]();!(s=(A=O.next()).done);s=!0){let e=A.value,t=e.name.split(/\s*\|\s*!/g),n=null!=(c=t.pop())?c:e.name,r=t.length?b+": "+t.join(": "):b,s=n.split(" | ");n=s[s.length-1],s.unshift(r),s.pop(),r=s.join(": "),void 0===o[r]&&(o[r]={tests:[],clear:!0}),o[r].tests.push(new w(r,n,e.test,{isAggregated:!1,timeout:null!=(u=null==(y=e.options)?void 0:y.timeout)?u:3e4,skipReason:null==(x=e.options)?void 0:x.skipReason,owner:null==(p=e.options)?void 0:p.owner,benchmark:null!=(f=null==(C=e.options)?void 0:C.benchmark)&&f}))}}catch(e){i=!0,a=e}finally{try{s||null==O.return||O.return()}finally{if(i)throw a}}}let D=[],T=[],S=null,L=[],E=yield grok.dapi.functions.filter(`package.id = "${n}"`).list(),R=new RegExp(/skip:\s*([^,\s]+)|wait:\s*(\d+)|cat:\s*([^,\s]+)|timeout:\s*(\d+)/g);var N=!0,M=!1,$=void 0;try{for(var I,F,G,U,j=E[Symbol.iterator]();!(N=(U=j.next()).done);N=!0){let t=U.value,n=t.options.test,s=t.options.demoPath;if(n&&Array.isArray(n)&&n.length)for(let e=0;e<n.length;e++){let r=n[e].matchAll(R),s={};Array.from(r).forEach(e=>{e[0].startsWith("skip")?s.skip=e[1]:e[0].startsWith("wait")?s.wait=parseInt(e[2]):e[0].startsWith("cat")?s.cat=e[3]:e[0].startsWith("timeout")&&(s.timeout=parseInt(e[4]))});let i=new w(null!=(I=s.cat)?I:h,1===n.length?t.name:`${t.name} ${e+1}`,()=>l(function*(){var o;let r=yield grok.functions.eval((o=n[e],o.replace(RegExp(t.name,"gi"),t.nqName)));if(s.wait&&(yield P(t.name)),"boolean"==typeof r&&!r)throw`Failed: ${n[e]}, expected true, got ${r}`})(),{skipReason:s.skip,timeout:DG.Test.isInBenchmark?null!=(F=s.benchmarkTimeout)?F:108e5:null!=(G=s.timeout)?G:3e4,node:t instanceof DG.DataQuery});if(s.cat){let e=s.cat;void 0===o[e]&&(o[e]={tests:[],clear:!0}),o[e].tests||(o[e].tests=[]),o[e].tests.push(i)}else D.push(i)}if(s){let e=new w(g,t.friendlyName,()=>l(function*(){yield P("the views the previous test closed");let e=S?yield grok.shell.lastError:null;if(grok.shell.clearLastError(),e)throw Error(`${S} raised an error after it finished: ${e}`);S=t.friendlyName,yield t.apply(),yield P(t.friendlyName);let n=yield grok.shell.lastError;if(grok.shell.clearLastError(),n)throw Error(n)})(),{skipReason:t.options.demoSkip});T.push(e)}if(t.hasTag("semTypeDetector")){let n=r;t.options.testData&&(n=yield grok.data.files.openTable(`System:AppData/${e.nqName}/${t.options.testData}`));let o=new w(m,t.friendlyName,()=>l(function*(){let o=[];console.log(`System:AppData/${e.nqName}/${t.options.testData}`);var r=!0,s=!1,i=void 0;try{for(var a,l=n.clone().columns[Symbol.iterator]();!(r=(a=l.next()).done);r=!0){let e=a.value,n=yield t.apply([e]);o.push(n||e.semType)}}catch(e){s=!0,i=e}finally{try{r||null==l.return||l.return()}finally{if(s)throw i}}let c=o.filter(e=>e);k(c.length,1),t.options.testDataColumnName&&k(c[0],t.options.testDataColumnName)})(),{skipReason:t.options.skipTest});L.push(o)}}}catch(e){M=!0,$=e}finally{try{N||null==j.return||j.return()}finally{if(M)throw $}}v[n]=!0,D.length>0&&(o[h]={tests:D,clear:!0}),T.length>0&&(o[g]={tests:T,clear:!0}),L.length>0&&(o[m]={tests:L,clear:!1})})()}class D{add(e,t){this.enabled&&(this.sent=this.sent.then(()=>grok.shell.reportTest(e,t)).catch(e=>{var t;return x(`A test result was not reported: ${null!=(t=null==e?void 0:e.message)?t:e}`)}))}constructor(e){this.enabled=void 0===e||e,this.sent=Promise.resolve()}}function T(e){return l(function*(){return`${e.toString()}
33
+ ${e.stack?yield DG.Logger.translateStackTrace(e.stack):""}`})()}function S(e,t,n,o,r,s){return l(function*(e,t,n,o,r,s,i){var a,l,y,x,d,h,g,m,b,v,C,w,k,A;let O,S=void 0===i?new D:i;n.length=0;let L=void 0!=t&&e.name.toLowerCase()!==t.toLowerCase(),P=(null==(l=e.options)?void 0:l.skipReason)||L,R=L?"skipped":null==(y=e.options)?void 0:y.skipReason;if(DG.Test.isInBenchmark&&!(null==(x=e.options)?void 0:x.benchmark))return void f(`Package testing: Skipped {{${e.category}}} {{${e.name}}} doesnt available in benchmark mode`);P&&!DG.Test.isInBenchmark&&f(`Package testing: Skipped {{${e.category}}} {{${e.name}}}`),P||f(`Package testing: Started {{${e.category}}} {{${e.name}}}`);let N=Date.now(),M=new Date(N).toISOString();try{P?O={name:e.name,owner:null!=(g=null==(m=e.options)?void 0:m.owner)?g:"",category:e.category,logs:"",date:M,success:!0,result:R,ms:0,skipped:!0,package:null!=r?r:"",flaking:DG.Test.isReproducing}:(DG.Test.isProfiling&&console.profile(`${e.category}: ${e.name}`),O={name:e.name,owner:null!=(b=null==(C=e.options)?void 0:C.owner)?b:"",category:e.category,logs:"",date:M,success:!0,result:null!=(v=(yield E(e.test,null!=o?o:3e4)).toString())?v:"OK",ms:0,skipped:!1,package:null!=r?r:"",flaking:DG.Test.isReproducing},DG.Test.isProfiling&&(console.profileEnd(`${e.category}: ${e.name}`),grok.shell.info(`Profiling of ${e.category}: ${e.name} finished
34
+ Please ensure that you have opened DevTools (F12) / Performance panel before test starts.`)))}catch(t){p(t),O={name:e.name,owner:null!=(w=null==(k=e.options)?void 0:k.owner)?w:"",category:e.category,logs:"",date:M,success:!1,result:yield T(t),ms:0,skipped:!1,package:null!=r?r:"",flaking:!1}}if((null==(d=e.options)?void 0:d.isAggregated)&&O.result.constructor===DG.DataFrame){let e=O.result.col("success");if(e&&(O.success=e.stats.sum===e.length),!s){let e=O.result;e.columns.remove("stack"),e.rows.removeWhere(e=>e.get("success")),O.result=e}O.result=O.result.toCsv()}if(O.logs=n.join("\n"),O.ms=Date.now()-N,P||f(`Package testing: Finished {{${e.category}}} {{${e.name}}} with {{${O.success?"success":"error"}}} for ${O.ms} ms`),O.success||f(`Package testing: Result for {{${e.category}}} {{${e.name}}}: ${O.result}`),O.category=e.category,O.name=e.name,O.owner=null!=(a=null==(h=e.options)?void 0:h.owner)?a:"",!L){let t={success:O.success,result:O.result,ms:O.ms,date:O.date,skipped:O.skipped,category:e.category,name:e.name,logs:O.logs,owner:O.owner,flaking:DG.Test.isReproducing&&O.success,package:O.package};if(O.result.constructor==Object){let e=Object.keys(O.result).reduce((e,t)=>u(c({},e),{["result."+t]:O.result[t]}),{});t=c({},t,e)}t.result instanceof DG.DataFrame&&(t.result=JSON.stringify(null==(A=t.result)?void 0:A.toJson())||""),S.add("package",t)}return O}).apply(this,arguments)}function L(e){return l(function*(){yield new Promise(t=>setTimeout(t,e))})()}function P(e,t){let n=void 0===t?2e4:t;return l(function*(){var t,o;let r;if("u">typeof process)return;let s=0;yield(t=()=>{var e;return(s=[null==(e=grok.shell.v)?void 0:e.root,...document.querySelectorAll(".d4-dialog")].some(e=>null!=e&&Array.from(e.querySelectorAll('.grok-wait .grok-loader, .d4-update-shadow, [aria-busy="true"]')).some(e=>null!==e.offsetParent))||Array.from(grok.shell.tableViews).some(e=>Array.from(e.viewers).some(e=>null!==e.root.offsetParent&&function(e){try{return e.isRenderPending}catch(e){return!1}}(e)))?0:s+1)>=2},o=`${e}: still loading`,r=void 0===n?1e4:n,l(function*(){let e=Date.now();for(;!t();){if(Date.now()-e>r)throw Error(`${"string"==typeof o?o:o()} (after ${r} ms)`);yield L(16)}})())})()}function E(e,t,n){let o=void 0===n?"EXECUTION TIMEOUT":n;return l(function*(){let n=null,r=new Promise((e,r)=>{n=setTimeout(()=>{r(o)},t)});try{return yield Promise.race([e(),r])}finally{n&&clearTimeout(n)}})()}function R(e,t,n,o,r,s,i){try{var a=e[s](i),l=a.value}catch(e){n(e);return}a.done?t(l):Promise.resolve(l).then(o,r)}function N(e){return function(){var t=this,n=arguments;return new Promise(function(o,r){var s=e.apply(t,n);function i(e){R(s,o,r,i,a,"next",e)}function a(e){R(s,o,r,i,a,"throw",e)}i(void 0)})}}DG.DataFrame.fromColumns([DG.Column.fromStrings("col",["val1","val2","val3"])]);let M=new t.Package;function $(e,n,o){return N(function*(){var r;let s=yield(r={category:e,test:n,testContext:o},l(function*(){let e,t=(null==r?void 0:r.nodeOptions)?r.nodeOptions.package:grok.functions.getCurrentCall().func.package;if(!t)throw Error("Can't run tests outside of the package");let n=null==(N=t.packageOwner)?void 0:N.match(/<([^>]*)>/),o=n?n[1]:"";void 0!=t&&(yield O(t));let s=[],a=Date.now(),h=new D(!(null==r?void 0:r.stressTest));console.log("Running tests..."),console.log(r),null!=r||(r={}),null!=(M=r).testContext||(M.testContext=new C),grok.shell.clearLastError();let g=(e=[],console.log=(...t)=>{e.push(...t),f(...t)},console.info=(...t)=>{e.push(...t),y(...t)},console.warn=(...t)=>{e.push(...t),x(...t)},console.error=(...t)=>{e.push(...t),p(...t)},e);yield(w=d,k=r,l(function*(){try{let y=(null==k?void 0:k.skipToCategory)!=void 0,x=!1;var e=!0,n=!1,r=void 0;try{for(var a,d,m,b,v,C,O=Object.entries(w)[Symbol.iterator]();!(e=(C=O.next()).done);e=!0){let e,n=(a=C.value,function(e){if(Array.isArray(e))return e}(a)||function(e){var t,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var r=[],s=!0,i=!1;try{for(o=o.call(e);!(s=(t=o.next()).done)&&(r.push(t.value),2!==r.length);s=!0);}catch(e){i=!0,n=e}finally{try{s||null==o.return||o.return()}finally{if(i)throw n}}return r}}(a)||function(e){if(e){if("string"==typeof e)return i(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return i(e,2)}}(a)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),r=n[0],p=n[1];if((null==(b=k.exclude)?void 0:b.some(e=>r.startsWith(e)))||(null==k?void 0:k.category)!=null&&!r.toLowerCase().startsWith(null==k?void 0:k.category.toLowerCase().trim()))continue;if(y)if(x)y=!1;else{if((null==k?void 0:k.skipToCategory)==null||r.toLowerCase().trim()!==(null==k?void 0:k.skipToCategory.toLowerCase().trim()))continue;x=!0}let w=(null!=(d=p.tests)?d:[]).filter(e=>A(e,p,k));if((k.nodeOnly||k.excludeNodeTests)&&0===w.length||DG.Test.isInBenchmark&&!w.some(e=>{var t,n,o;return null!=(t=null!=(n=null==(o=e.options)?void 0:o.benchmark)?n:p.benchmarks)&&t}))continue;let O=void 0==p.tests?void 0:w.every(e=>{var t;return(null==(t=e.options)?void 0:t.skipReason)||(null==k?void 0:k.test)!=null&&k.test.toLowerCase()!==e.name.toLowerCase()});if(!O){let e=w.filter(e=>{var t;return(null==(t=e.options)?void 0:t.skipReason)||(null==k?void 0:k.test)!=null&&k.test.toLowerCase()!==e.name.toLowerCase()}).length;f(`Package testing: Started {{${r}}}${e>0?` skipped {{${e}}}`:""}`),p.beforeStatus=yield F(p.before,r)}if(k.stressTest&&(w=w.filter(e=>{var t;return null==(t=e.options)?void 0:t.stressTest}),w=function(e){let t=e.slice();return t.sort(()=>Math.random()-.5),t}(w)),(null!=(m=null==(v=k.tags)?void 0:v.length)?m:0)>0&&(w=w.filter(e=>{var t,n;return null==(n=e.options)||null==(t=n.tags)?void 0:t.some(e=>{var t;return(null!=(t=null==k?void 0:k.tags)?t:[]).includes(e)})})),p.beforeStatus){let n=p.beforeStatus.split("\n")[0].trim();(e=Array.from(w.map(e=>({date:new Date().toISOString(),category:r,name:e.name,success:!1,result:n?`before() failed: ${n}`:"before() failed",ms:0,skipped:!1,logs:"",owner:o,package:t.name,widgetsDifference:0,flaking:DG.Test.isReproducing})))).forEach(e=>h.add("package",e))}else e=yield function(e,n,r){return l(function*(){var s,i,a,l,f,y,x,p,d,m,b,v,C,w,k,O,D,T,L;let P=(null!=(s=e.tests)?s:[]).filter(t=>A(t,e,n)),E=[],R=U();if(e.clear){let s=r&&void 0!=n.skipToTest;for(let r=0;r<P.length;r++){P[r].options&&(null==(x=P[r].options)?void 0:x.benchmark)===void 0&&(P[r].options||(P[r].options={}),P[r].options.benchmark=null!=(p=e.benchmarks)&&p);let C=P[r];if(n.test&&n.test.toLowerCase()!==C.name.toLowerCase())continue;if(s)if((null==n?void 0:n.skipToTest)==void 0||C.name.toLowerCase().trim()!==(null==n?void 0:n.skipToTest.toLowerCase().trim()))continue;else s=!1;(null==C?void 0:C.options)&&(C.options.owner=null!=(d=null!=(m=null!=(b=null==(v=P[r].options)?void 0:v.owner)?b:null==e?void 0:e.owner)?m:o)?d:"");let w=yield S(C,null==n?void 0:n.test,g,DG.Test.isInBenchmark?null!=(i=null==(l=P[r].options)?void 0:l.benchmarkTimeout)?i:108e5:null!=(a=null==(f=P[r].options)?void 0:f.timeout)?a:3e4,t.name,n.verbose,h);if(w&&!w.skipped&&(yield G()),w&&(E.push(u(c({},w),{widgetsDifference:U()-R})),n.returnOnFail&&n.skipToTest!==C.name&&!w.success&&!w.skipped))break;n.nodeOptions||(null==(y=n.testContext)?void 0:y.closeAll)===!1||(grok.shell.closeAll(),DG.Balloon.closeAll())}}else{let s=r&&void 0!=n.skipToTest;for(let r=0;r<P.length;r++){let i=P[r];if(n.test&&n.test.toLowerCase()!==i.name.toLowerCase())continue;if(s){(null==n?void 0:n.skipToTest)!=void 0&&i.name.toLowerCase().trim()===(null==n?void 0:n.skipToTest.toLowerCase().trim())&&(s=!1);continue}(null==i?void 0:i.options)&&(i.options.owner=null!=(O=null!=(D=null!=(T=null==(L=P[r].options)?void 0:L.owner)?T:null==e?void 0:e.owner)?D:o)?O:"");let a=yield S(i,null==n?void 0:n.test,g,DG.Test.isInBenchmark?null!=(C=null==(w=P[r].options)?void 0:w.benchmarkTimeout)?C:108e5:null==(k=P[r].options)?void 0:k.timeout,t.name,n.verbose,h);if(a&&!a.skipped&&(yield G()),a&&(E.push(u(c({},a),{widgetsDifference:U()-R})),n.returnOnFail&&n.skipToTest!==i.name&&!a.success&&!a.skipped))break}}return E})()}(p,k,y);let D=e.filter(e=>"skipped"!=e.result);if(O||(p.afterStatus=yield F(p.after,r)),p.afterStatus&&(f(`Package testing: Category after() {{${r}}} failed`),f(`Package testing: Result for {{${r}}} after: ${p.afterStatus}`),D.push({date:new Date().toISOString(),category:r,name:"after",success:!1,result:p.afterStatus,ms:0,skipped:!1,logs:"",owner:o,package:t.name,widgetsDifference:0,flaking:DG.Test.isReproducing})),p.beforeStatus&&(f(`Package testing: Category before() {{${r}}} failed`),f(`Package testing: Result for {{${r}}} before: ${p.beforeStatus}`),D.push({date:new Date().toISOString(),category:r,name:"before",success:!1,result:p.beforeStatus,ms:0,skipped:!1,logs:"",owner:o,package:t.name,widgetsDifference:0,flaking:DG.Test.isReproducing})),s.push(...D),k.returnOnFail&&D.some(e=>!e.success&&!e.skipped&&e.name!==k.skipToTest))break}}catch(e){n=!0,r=e}finally{try{e||null==O.return||O.return()}finally{if(n)throw r}}}finally{console.log=f,console.info=y,console.warn=x,console.error=p}if(k.testContext.catchUnhandled&&!DG.Test.isInBenchmark){let e;try{yield P("the last test"),e=yield grok.shell.lastError}catch(t){e=t.message}if(void 0!=e){let n={logs:"",date:new Date().toISOString(),category:"Unhandled exceptions",name:"Exception",result:null!=e?e:"",success:!e,ms:0,skipped:!1,owner:null!=o?o:"",package:t.name,widgetsDifference:0};f(`Package testing: Unhandled Exception: ${e}`),s.push(u(c({},n),{flaking:DG.Test.isReproducing&&!e})),n.package=t.name,h.add("package",n)}}})()),yield Promise.race([h.sent,L(6e4)]);var m=!0,b=!1,v=void 0;try{for(var w,k,R,N,M,$,I=s[Symbol.iterator]();!(m=($=I.next()).done);m=!0){let e=$.value;e.result=e.result.toString().replace(/"/g,"'"),void 0!=e.logs&&(e.logs=e.logs.toString().replace(/"/g,"'"))}}catch(e){b=!0,v=e}finally{try{m||null==I.return||I.return()}finally{if(b)throw v}}return s;function F(e,t){return l(function*(){let n;try{void 0!==e&&(yield E(()=>l(function*(){yield e()})(),1e5,`before ${t}: timeout error`))}catch(e){n=yield T(e)}return n})()}function G(){return l(function*(){let e=globalThis.gc;!e||Date.now()-a<5e3||(yield e(),a=Date.now())})()}function U(){if("u">typeof process)return 0;let e=-1;try{e=DG.Widget.getAll().length}catch(e){var t;console.warn(null!=(t=e.message)?t:e)}return e}})());return t.DataFrame.fromObjects(s)})()}function I(){return N(function*(){yield O(M,M.getModule("package-test.js"))})()}})(),webcomponents_test=o})();
35
35
  //# sourceMappingURL=package-test.js.map