@hpcc-js/dgrid2 2.3.5 → 2.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es6.js +57 -57
- package/dist/index.es6.js.map +1 -1
- package/dist/index.js +57 -57
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/package.json +4 -4
- package/src/__package__.ts +2 -2
- package/types/__package__.d.ts +2 -2
- package/types-3.4/__package__.d.ts +2 -2
package/dist/index.es6.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { format, timeParse, timeFormat, publish, HTMLWidget } from '@hpcc-js/common';
|
|
2
2
|
|
|
3
3
|
var PKG_NAME = "@hpcc-js/dgrid2";
|
|
4
|
-
var PKG_VERSION = "2.3.
|
|
5
|
-
var BUILD_VERSION = "2.104.
|
|
4
|
+
var PKG_VERSION = "2.3.6";
|
|
5
|
+
var BUILD_VERSION = "2.104.13";
|
|
6
6
|
|
|
7
7
|
/******************************************************************************
|
|
8
8
|
Copyright (c) Microsoft Corporation.
|
|
@@ -67,11 +67,11 @@ function __spreadArray(to, from, pack) {
|
|
|
67
67
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
var n,l$1,u$1,t,o$2,r$2,f$1={},e$1=[],c$1=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function s$1(n,l){for(var u in l)n[u]=l[u];return n}function a$1(n){var l=n.parentNode;l&&l.removeChild(n);}function h$1(l,u,i){var t,o,r,f={};for(r in u)"key"==r?t=u[r]:"ref"==r?o=u[r]:f[r]=u[r];if(arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):i),"function"==typeof l&&null!=l.defaultProps)for(r in l.defaultProps)void 0===f[r]&&(f[r]=l.defaultProps[r]);return v$1(l,f,t,o,null)}function v$1(n,i,t,o,r){var f={type:n,props:i,key:t,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==r?++u$1:r};return null==r&&null!=l$1.vnode&&l$1.vnode(f),f}function p$1(n){return n.children}function d$1(n,l){this.props=n,this.context=l;}function _$2(n,l){if(null==l)return n.__?_$2(n.__,n.__.__k.indexOf(n)+1):null;for(var u;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e)return u.__e;return "function"==typeof n.type?_$2(n):null}function k$1(n){var l,u;if(null!=(n=n.__)&&null!=n.__c){for(n.__e=n.__c.base=null,l=0;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e){n.__e=n.__c.base=u.__e;break}return k$1(n)}}function b(n){(!n.__d&&(n.__d=!0)&&t.push(n)&&!g$2.__r++||o$2!==l$1.debounceRendering)&&((o$2=l$1.debounceRendering)||setTimeout)(g$2);}function g$2(){for(var n;g$2.__r=t.length;)n=t.sort(function(n,l){return n.__v.__b-l.__v.__b}),t=[],n.some(function(n){var l,u,i,t,o,r;n.__d&&(o=(t=(l=n).__v).__e,(r=l.__P)&&(u=[],(i=s$1({},t)).__v=t.__v+1,j$2(r,t,i,l.__n,void 0!==r.ownerSVGElement,null!=t.__h?[o]:null,u,null==o?_$2(t):o,t.__h),z$2(u,t),t.__e!=o&&k$1(t)));});}function w$2(n,l,u,i,t,o,r,c,s,a){var h,y,d,k,b,g,w,x=i&&i.__k||e$1,C=x.length;for(u.__k=[],h=0;h<l.length;h++)if(null!=(k=u.__k[h]=null==(k=l[h])||"boolean"==typeof k?null:"string"==typeof k||"number"==typeof k||"bigint"==typeof k?v$1(null,k,null,null,k):Array.isArray(k)?v$1(p$1,{children:k},null,null,null):k.__b>0?v$1(k.type,k.props,k.key,k.ref?k.ref:null,k.__v):k)){if(k.__=u,k.__b=u.__b+1,null===(d=x[h])||d&&k.key==d.key&&k.type===d.type)x[h]=void 0;else for(y=0;y<C;y++){if((d=x[y])&&k.key==d.key&&k.type===d.type){x[y]=void 0;break}d=null;}j$2(n,k,d=d||f$1,t,o,r,c,s,a),b=k.__e,(y=k.ref)&&d.ref!=y&&(w||(w=[]),d.ref&&w.push(d.ref,null,k),w.push(y,k.__c||b,k)),null!=b?(null==g&&(g=b),"function"==typeof k.type&&k.__k===d.__k?k.__d=s=m$1(k,s,n):s=A$1(n,k,d,x,b,s),"function"==typeof u.type&&(u.__d=s)):s&&d.__e==s&&s.parentNode!=n&&(s=_$2(d));}for(u.__e=g,h=C;h--;)null!=x[h]&&
|
|
70
|
+
var n,l$1,u$1,t$1,o$2,r$2,f$1={},e$1=[],c$1=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function s$1(n,l){for(var u in l)n[u]=l[u];return n}function a$1(n){var l=n.parentNode;l&&l.removeChild(n);}function h$1(l,u,i){var t,o,r,f={};for(r in u)"key"==r?t=u[r]:"ref"==r?o=u[r]:f[r]=u[r];if(arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):i),"function"==typeof l&&null!=l.defaultProps)for(r in l.defaultProps)void 0===f[r]&&(f[r]=l.defaultProps[r]);return v$1(l,f,t,o,null)}function v$1(n,i,t,o,r){var f={type:n,props:i,key:t,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==r?++u$1:r};return null==r&&null!=l$1.vnode&&l$1.vnode(f),f}function p$1(n){return n.children}function d$1(n,l){this.props=n,this.context=l;}function _$2(n,l){if(null==l)return n.__?_$2(n.__,n.__.__k.indexOf(n)+1):null;for(var u;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e)return u.__e;return "function"==typeof n.type?_$2(n):null}function k$1(n){var l,u;if(null!=(n=n.__)&&null!=n.__c){for(n.__e=n.__c.base=null,l=0;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e){n.__e=n.__c.base=u.__e;break}return k$1(n)}}function b$1(n){(!n.__d&&(n.__d=!0)&&t$1.push(n)&&!g$2.__r++||o$2!==l$1.debounceRendering)&&((o$2=l$1.debounceRendering)||setTimeout)(g$2);}function g$2(){for(var n;g$2.__r=t$1.length;)n=t$1.sort(function(n,l){return n.__v.__b-l.__v.__b}),t$1=[],n.some(function(n){var l,u,i,t,o,r;n.__d&&(o=(t=(l=n).__v).__e,(r=l.__P)&&(u=[],(i=s$1({},t)).__v=t.__v+1,j$2(r,t,i,l.__n,void 0!==r.ownerSVGElement,null!=t.__h?[o]:null,u,null==o?_$2(t):o,t.__h),z$2(u,t),t.__e!=o&&k$1(t)));});}function w$2(n,l,u,i,t,o,r,c,s,a){var h,y,d,k,b,g,w,x=i&&i.__k||e$1,C=x.length;for(u.__k=[],h=0;h<l.length;h++)if(null!=(k=u.__k[h]=null==(k=l[h])||"boolean"==typeof k?null:"string"==typeof k||"number"==typeof k||"bigint"==typeof k?v$1(null,k,null,null,k):Array.isArray(k)?v$1(p$1,{children:k},null,null,null):k.__b>0?v$1(k.type,k.props,k.key,k.ref?k.ref:null,k.__v):k)){if(k.__=u,k.__b=u.__b+1,null===(d=x[h])||d&&k.key==d.key&&k.type===d.type)x[h]=void 0;else for(y=0;y<C;y++){if((d=x[y])&&k.key==d.key&&k.type===d.type){x[y]=void 0;break}d=null;}j$2(n,k,d=d||f$1,t,o,r,c,s,a),b=k.__e,(y=k.ref)&&d.ref!=y&&(w||(w=[]),d.ref&&w.push(d.ref,null,k),w.push(y,k.__c||b,k)),null!=b?(null==g&&(g=b),"function"==typeof k.type&&k.__k===d.__k?k.__d=s=m$1(k,s,n):s=A$1(n,k,d,x,b,s),"function"==typeof u.type&&(u.__d=s)):s&&d.__e==s&&s.parentNode!=n&&(s=_$2(d));}for(u.__e=g,h=C;h--;)null!=x[h]&&N$1(x[h],x[h]);if(w)for(h=0;h<w.length;h++)M$1(w[h],w[++h],w[++h]);}function m$1(n,l,u){for(var i,t=n.__k,o=0;t&&o<t.length;o++)(i=t[o])&&(i.__=n,l="function"==typeof i.type?m$1(i,l,u):A$1(u,i,i,t,i.__e,l));return l}function x$1(n,l){return l=l||[],null==n||"boolean"==typeof n||(Array.isArray(n)?n.some(function(n){x$1(n,l);}):l.push(n)),l}function A$1(n,l,u,i,t,o){var r,f,e;if(void 0!==l.__d)r=l.__d,l.__d=void 0;else if(null==u||t!=o||null==t.parentNode)n:if(null==o||o.parentNode!==n)n.appendChild(t),r=null;else {for(f=o,e=0;(f=f.nextSibling)&&e<i.length;e+=2)if(f==t)break n;n.insertBefore(t,o),r=o;}return void 0!==r?r:t.nextSibling}function C$1(n,l,u,i,t){var o;for(o in u)"children"===o||"key"===o||o in l||H$1(n,o,null,u[o],i);for(o in l)t&&"function"!=typeof l[o]||"children"===o||"key"===o||"value"===o||"checked"===o||u[o]===l[o]||H$1(n,o,l[o],u[o],i);}function $(n,l,u){"-"===l[0]?n.setProperty(l,u):n[l]=null==u?"":"number"!=typeof u||c$1.test(l)?u:u+"px";}function H$1(n,l,u,i,t){var o;n:if("style"===l)if("string"==typeof u)n.style.cssText=u;else {if("string"==typeof i&&(n.style.cssText=i=""),i)for(l in i)u&&l in u||$(n.style,l,"");if(u)for(l in u)i&&u[l]===i[l]||$(n.style,l,u[l]);}else if("o"===l[0]&&"n"===l[1])o=l!==(l=l.replace(/Capture$/,"")),l=l.toLowerCase()in n?l.toLowerCase().slice(2):l.slice(2),n.l||(n.l={}),n.l[l+o]=u,u?i||n.addEventListener(l,o?T$2:I$1,o):n.removeEventListener(l,o?T$2:I$1,o);else if("dangerouslySetInnerHTML"!==l){if(t)l=l.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("href"!==l&&"list"!==l&&"form"!==l&&"tabIndex"!==l&&"download"!==l&&l in n)try{n[l]=null==u?"":u;break n}catch(n){}"function"==typeof u||(null==u||!1===u&&-1==l.indexOf("-")?n.removeAttribute(l):n.setAttribute(l,u));}}function I$1(n){this.l[n.type+!1](l$1.event?l$1.event(n):n);}function T$2(n){this.l[n.type+!0](l$1.event?l$1.event(n):n);}function j$2(n,u,i,t,o,r,f,e,c){var a,h,v,y,_,k,b,g,m,x,A,C,$,H,I,T=u.type;if(void 0!==u.constructor)return null;null!=i.__h&&(c=i.__h,e=u.__e=i.__e,u.__h=null,r=[e]),(a=l$1.__b)&&a(u);try{n:if("function"==typeof T){if(g=u.props,m=(a=T.contextType)&&t[a.__c],x=a?m?m.props.value:a.__:t,i.__c?b=(h=u.__c=i.__c).__=h.__E:("prototype"in T&&T.prototype.render?u.__c=h=new T(g,x):(u.__c=h=new d$1(g,x),h.constructor=T,h.render=O$1),m&&m.sub(h),h.props=g,h.state||(h.state={}),h.context=x,h.__n=t,v=h.__d=!0,h.__h=[],h._sb=[]),null==h.__s&&(h.__s=h.state),null!=T.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=s$1({},h.__s)),s$1(h.__s,T.getDerivedStateFromProps(g,h.__s))),y=h.props,_=h.state,v)null==T.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else {if(null==T.getDerivedStateFromProps&&g!==y&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(g,x),!h.__e&&null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(g,h.__s,x)||u.__v===i.__v){for(h.props=g,h.state=h.__s,u.__v!==i.__v&&(h.__d=!1),h.__v=u,u.__e=i.__e,u.__k=i.__k,u.__k.forEach(function(n){n&&(n.__=u);}),A=0;A<h._sb.length;A++)h.__h.push(h._sb[A]);h._sb=[],h.__h.length&&f.push(h);break n}null!=h.componentWillUpdate&&h.componentWillUpdate(g,h.__s,x),null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(y,_,k);});}if(h.context=x,h.props=g,h.__v=u,h.__P=n,C=l$1.__r,$=0,"prototype"in T&&T.prototype.render){for(h.state=h.__s,h.__d=!1,C&&C(u),a=h.render(h.props,h.state,h.context),H=0;H<h._sb.length;H++)h.__h.push(h._sb[H]);h._sb=[];}else do{h.__d=!1,C&&C(u),a=h.render(h.props,h.state,h.context),h.state=h.__s;}while(h.__d&&++$<25);h.state=h.__s,null!=h.getChildContext&&(t=s$1(s$1({},t),h.getChildContext())),v||null==h.getSnapshotBeforeUpdate||(k=h.getSnapshotBeforeUpdate(y,_)),I=null!=a&&a.type===p$1&&null==a.key?a.props.children:a,w$2(n,Array.isArray(I)?I:[I],u,i,t,o,r,f,e,c),h.base=u.__e,u.__h=null,h.__h.length&&f.push(h),b&&(h.__E=h.__=null),h.__e=!1;}else null==r&&u.__v===i.__v?(u.__k=i.__k,u.__e=i.__e):u.__e=L$1(i.__e,u,i,t,o,r,f,c);(a=l$1.diffed)&&a(u);}catch(n){u.__v=null,(c||null!=r)&&(u.__e=e,u.__h=!!c,r[r.indexOf(e)]=null),l$1.__e(n,u,i);}}function z$2(n,u){l$1.__c&&l$1.__c(u,n),n.some(function(u){try{n=u.__h,u.__h=[],n.some(function(n){n.call(u);});}catch(n){l$1.__e(n,u.__v);}});}function L$1(l,u,i,t,o,r,e,c){var s,h,v,y=i.props,p=u.props,d=u.type,k=0;if("svg"===d&&(o=!0),null!=r)for(;k<r.length;k++)if((s=r[k])&&"setAttribute"in s==!!d&&(d?s.localName===d:3===s.nodeType)){l=s,r[k]=null;break}if(null==l){if(null===d)return document.createTextNode(p);l=o?document.createElementNS("http://www.w3.org/2000/svg",d):document.createElement(d,p.is&&p),r=null,c=!1;}if(null===d)y===p||c&&l.data===p||(l.data=p);else {if(r=r&&n.call(l.childNodes),h=(y=i.props||f$1).dangerouslySetInnerHTML,v=p.dangerouslySetInnerHTML,!c){if(null!=r)for(y={},k=0;k<l.attributes.length;k++)y[l.attributes[k].name]=l.attributes[k].value;(v||h)&&(v&&(h&&v.__html==h.__html||v.__html===l.innerHTML)||(l.innerHTML=v&&v.__html||""));}if(C$1(l,p,y,o,c),v)u.__k=[];else if(k=u.props.children,w$2(l,Array.isArray(k)?k:[k],u,i,t,o&&"foreignObject"!==d,r,e,r?r[0]:i.__k&&_$2(i,0),c),null!=r)for(k=r.length;k--;)null!=r[k]&&a$1(r[k]);c||("value"in p&&void 0!==(k=p.value)&&(k!==l.value||"progress"===d&&!k||"option"===d&&k!==y.value)&&H$1(l,"value",k,y.value,!1),"checked"in p&&void 0!==(k=p.checked)&&k!==l.checked&&H$1(l,"checked",k,y.checked,!1));}return l}function M$1(n,u,i){try{"function"==typeof n?n(u):n.current=u;}catch(n){l$1.__e(n,i);}}function N$1(n,u,i){var t,o;if(l$1.unmount&&l$1.unmount(n),(t=n.ref)&&(t.current&&t.current!==n.__e||M$1(t,null,u)),null!=(t=n.__c)){if(t.componentWillUnmount)try{t.componentWillUnmount();}catch(n){l$1.__e(n,u);}t.base=t.__P=null,n.__c=void 0;}if(t=n.__k)for(o=0;o<t.length;o++)t[o]&&N$1(t[o],u,i||"function"!=typeof n.type);i||null==n.__e||a$1(n.__e),n.__=n.__e=n.__d=void 0;}function O$1(n,l,u){return this.constructor(n,u)}function P(u,i,t){var o,r,e;l$1.__&&l$1.__(u,i),r=(o="function"==typeof t)?null:t&&t.__k||i.__k,e=[],j$2(i,u=(!o&&t||i).__k=h$1(p$1,null,[u]),r||f$1,f$1,void 0!==i.ownerSVGElement,!o&&t?[t]:r?null:i.firstChild?n.call(i.childNodes):null,e,!o&&t?t:r?r.__e:i.firstChild,o),z$2(e,u);}function B$2(n,l){var u={__c:l="__cC"+r$2++,__:n,Consumer:function(n,l){return n.children(l)},Provider:function(n){var u,i;return this.getChildContext||(u=[],(i={})[l]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(n){this.props.value!==n.value&&u.some(b$1);},this.sub=function(n){u.push(n);var l=n.componentWillUnmount;n.componentWillUnmount=function(){u.splice(u.indexOf(n),1),l&&l.call(n);};}),n.children}};return u.Provider.__=u.Consumer.contextType=u}n=e$1.slice,l$1={__e:function(n,l,u,i){for(var t,o,r;l=l.__;)if((t=l.__c)&&!t.__)try{if((o=t.constructor)&&null!=o.getDerivedStateFromError&&(t.setState(o.getDerivedStateFromError(n)),r=t.__d),null!=t.componentDidCatch&&(t.componentDidCatch(n,i||{}),r=t.__d),r)return t.__E=t}catch(l){n=l;}throw n}},u$1=0,d$1.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=s$1({},this.state),"function"==typeof n&&(n=n(s$1({},u),this.props)),n&&s$1(u,n),null!=n&&this.__v&&(l&&this._sb.push(l),b$1(this));},d$1.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),b$1(this));},d$1.prototype.render=p$1,t$1=[],g$2.__r=0,r$2=0;
|
|
71
71
|
|
|
72
|
-
var r$1,u,i,o$1
|
|
72
|
+
var t,r$1,u,i,o$1=0,f=[],c=[],e=l$1.__b,a=l$1.__r,v=l$1.diffed,l=l$1.__c,m=l$1.unmount;function d(t,u){l$1.__h&&l$1.__h(r$1,t,o$1||u),o$1=0;var i=r$1.__H||(r$1.__H={__:[],__h:[]});return t>=i.__.length&&i.__.push({__V:c}),i.__[t]}function p(n){return o$1=1,y(B$1,n)}function y(n,u,i){var o=d(t++,2);if(o.t=n,!o.__c&&(o.__=[i?i(u):B$1(void 0,u),function(n){var t=o.__N?o.__N[0]:o.__[0],r=o.t(t,n);t!==r&&(o.__N=[r,o.__[1]],o.__c.setState({}));}],o.__c=r$1,!r$1.u)){r$1.u=!0;var f=r$1.shouldComponentUpdate;r$1.shouldComponentUpdate=function(n,t,r){if(!o.__c.__H)return !0;var u=o.__c.__H.__.filter(function(n){return n.__c});if(u.every(function(n){return !n.__N}))return !f||f.call(this,n,t,r);var i=!1;return u.forEach(function(n){if(n.__N){var t=n.__[0];n.__=n.__N,n.__N=void 0,t!==n.__[0]&&(i=!0);}}),!(!i&&o.__c.props===n)&&(!f||f.call(this,n,t,r))};}return o.__N||o.__}function h(u,i){var o=d(t++,3);!l$1.__s&&z$1(o.__H,i)&&(o.__=u,o.i=i,r$1.__H.__h.push(o));}function s(u,i){var o=d(t++,4);!l$1.__s&&z$1(o.__H,i)&&(o.__=u,o.i=i,r$1.__h.push(o));}function _$1(n){return o$1=5,F(function(){return {current:n}},[])}function A(n,t,r){o$1=6,s(function(){return "function"==typeof n?(n(t()),function(){return n(null)}):n?(n.current=t(),function(){return n.current=null}):void 0},null==r?r:r.concat(n));}function F(n,r){var u=d(t++,7);return z$1(u.__H,r)?(u.__V=n(),u.i=r,u.__h=n,u.__V):u.__}function T$1(n,t){return o$1=8,F(function(){return n},t)}function q$1(n){var u=r$1.context[n.__c],i=d(t++,9);return i.c=n,u?(null==i.__&&(i.__=!0,u.sub(r$1)),u.props.value):n.__}function b(){for(var t;t=f.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(k),t.__H.__h.forEach(w$1),t.__H.__h=[];}catch(r){t.__H.__h=[],l$1.__e(r,t.__v);}}l$1.__b=function(n){"function"!=typeof n.type||n.__m||null===n.__?n.__m||(n.__m=n.__&&n.__.__m?n.__.__m:""):n.__m=(n.__&&n.__.__m?n.__.__m:"")+(n.__&&n.__.__k?n.__.__k.indexOf(n):0),r$1=null,e&&e(n);},l$1.__r=function(n){a&&a(n),t=0;var i=(r$1=n.__c).__H;i&&(u===r$1?(i.__h=[],r$1.__h=[],i.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=c,n.__N=n.i=void 0;})):(i.__h.forEach(k),i.__h.forEach(w$1),i.__h=[])),u=r$1;},l$1.diffed=function(t){v&&v(t);var o=t.__c;o&&o.__H&&(o.__H.__h.length&&(1!==f.push(o)&&i===l$1.requestAnimationFrame||((i=l$1.requestAnimationFrame)||j$1)(b)),o.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==c&&(n.__=n.__V),n.i=void 0,n.__V=c;})),u=r$1=null;},l$1.__c=function(t,r){r.some(function(t){try{t.__h.forEach(k),t.__h=t.__h.filter(function(n){return !n.__||w$1(n)});}catch(u){r.some(function(n){n.__h&&(n.__h=[]);}),r=[],l$1.__e(u,t.__v);}}),l&&l(t,r);},l$1.unmount=function(t){m&&m(t);var r,u=t.__c;u&&u.__H&&(u.__H.__.forEach(function(n){try{k(n);}catch(n){r=n;}}),u.__H=void 0,r&&l$1.__e(r,u.__v));};var g$1="function"==typeof requestAnimationFrame;function j$1(n){var t,r=function(){clearTimeout(u),g$1&&cancelAnimationFrame(t),setTimeout(n);},u=setTimeout(r,100);g$1&&(t=requestAnimationFrame(r));}function k(n){var t=r$1,u=n.__c;"function"==typeof u&&(n.__c=void 0,u()),r$1=t;}function w$1(n){var t=r$1;n.__c=n.__(),r$1=t;}function z$1(n,t){return !n||n.length!==t.length||t.some(function(t,r){return t!==n[r]})}function B$1(n,t){return "function"==typeof t?t(n):t}
|
|
73
73
|
|
|
74
|
-
function g(n,t){for(var e in t)n[e]=t[e];return n}function C(n,t){for(var e in n)if("__source"!==e&&!(e in t))return !0;for(var r in t)if("__source"!==r&&n[r]!==t[r])return !0;return !1}function E(n){this.props=n;}function w(n,e){function r(n){var t=this.props.ref,r=t==n.ref;return !r&&t&&(t.call?t(null):t.current=null),e?!e(this.props,n)||!r:C(this.props,n)}function u(e){return this.shouldComponentUpdate=r,h$1(n,e)}return u.displayName="Memo("+(n.displayName||n.name)+")",u.prototype.isReactComponent=!0,u.__f=!0,u}(E.prototype=new d$1).isPureReactComponent=!0,E.prototype.shouldComponentUpdate=function(n,t){return C(this.props,n)||C(this.state,t)};var R=l$1.__b;l$1.__b=function(n){n.type&&n.type.__f&&n.ref&&(n.props.ref=n.ref,n.ref=null),R&&R(n);};var x="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function N(n){function t(t){var e=g({},t);return delete e.ref,n(e,t.ref||null)}return t.$$typeof=x,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(n.displayName||n.name)+")",t}var O=l$1.__e;l$1.__e=function(n,t,e,r){if(n.then)for(var u,o=t;o=o.__;)if((u=o.__c)&&u.__c)return null==t.__e&&(t.__e=e.__e,t.__k=e.__k),u.__c(n,t);O(n,t,e,r);};var T=l$1.unmount;function I(n,t,e){return n&&(n.__c&&n.__c.__H&&(n.__c.__H.__.forEach(function(n){"function"==typeof n.__c&&n.__c();}),n.__c.__H=null),null!=(n=g({},n)).__c&&(n.__c.__P===e&&(n.__c.__P=t),n.__c=null),n.__k=n.__k&&n.__k.map(function(n){return I(n,t,e)})),n}function L(n,t,e){return n&&(n.__v=null,n.__k=n.__k&&n.__k.map(function(n){return L(n,t,e)}),n.__c&&n.__c.__P===t&&(n.__e&&e.insertBefore(n.__e,n.__d),n.__c.__e=!0,n.__c.__P=e)),n}function U(){this.__u=0,this.t=null,this.__b=null;}function D(n){var t=n.__.__c;return t&&t.__a&&t.__a(n)}function M(){this.u=null,this.o=null;}l$1.unmount=function(n){var t=n.__c;t&&t.__R&&t.__R(),t&&!0===n.__h&&(n.type=null),T&&T(n);},(U.prototype=new d$1).__c=function(n,t){var e=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(e);var u=D(r.__v),o=!1,i=function(){o||(o=!0,e.__R=null,u?u(l):l());};e.__R=i;var l=function(){if(!--r.__u){if(r.state.__a){var n=r.state.__a;r.__v.__k[0]=L(n,n.__c.__P,n.__c.__O);}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate();}},c=!0===t.__h;r.__u++||c||r.setState({__a:r.__b=r.__v.__k[0]}),n.then(i,i);},U.prototype.componentWillUnmount=function(){this.t=[];},U.prototype.render=function(n,e){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),o=this.__v.__k[0].__c;this.__v.__k[0]=I(this.__b,r,o.__O=o.__P);}this.__b=null;}var i=e.__a&&h$1(p$1,null,n.fallback);return i&&(i.__h=null),[h$1(p$1,null,e.__a?null:n.children),i]};var V=function(n,t,e){if(++e[1]===e[0]&&n.o.delete(t),n.props.revealOrder&&("t"!==n.props.revealOrder[0]||!n.o.size))for(e=n.u;e;){for(;e.length>3;)e.pop()();if(e[1]<e[0])break;n.u=e=e[2];}};(M.prototype=new d$1).__a=function(n){var t=this,e=D(t.__v),r=t.o.get(n);return r[0]++,function(u){var o=function(){t.props.revealOrder?(r.push(u),V(t,n,r)):u();};e?e(o):o();}},M.prototype.render=function(n){this.u=null,this.o=new Map;var t=x$
|
|
74
|
+
function g(n,t){for(var e in t)n[e]=t[e];return n}function C(n,t){for(var e in n)if("__source"!==e&&!(e in t))return !0;for(var r in t)if("__source"!==r&&n[r]!==t[r])return !0;return !1}function E(n){this.props=n;}function w(n,e){function r(n){var t=this.props.ref,r=t==n.ref;return !r&&t&&(t.call?t(null):t.current=null),e?!e(this.props,n)||!r:C(this.props,n)}function u(e){return this.shouldComponentUpdate=r,h$1(n,e)}return u.displayName="Memo("+(n.displayName||n.name)+")",u.prototype.isReactComponent=!0,u.__f=!0,u}(E.prototype=new d$1).isPureReactComponent=!0,E.prototype.shouldComponentUpdate=function(n,t){return C(this.props,n)||C(this.state,t)};var R=l$1.__b;l$1.__b=function(n){n.type&&n.type.__f&&n.ref&&(n.props.ref=n.ref,n.ref=null),R&&R(n);};var x="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function N(n){function t(t){var e=g({},t);return delete e.ref,n(e,t.ref||null)}return t.$$typeof=x,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(n.displayName||n.name)+")",t}var O=l$1.__e;l$1.__e=function(n,t,e,r){if(n.then)for(var u,o=t;o=o.__;)if((u=o.__c)&&u.__c)return null==t.__e&&(t.__e=e.__e,t.__k=e.__k),u.__c(n,t);O(n,t,e,r);};var T=l$1.unmount;function I(n,t,e){return n&&(n.__c&&n.__c.__H&&(n.__c.__H.__.forEach(function(n){"function"==typeof n.__c&&n.__c();}),n.__c.__H=null),null!=(n=g({},n)).__c&&(n.__c.__P===e&&(n.__c.__P=t),n.__c=null),n.__k=n.__k&&n.__k.map(function(n){return I(n,t,e)})),n}function L(n,t,e){return n&&(n.__v=null,n.__k=n.__k&&n.__k.map(function(n){return L(n,t,e)}),n.__c&&n.__c.__P===t&&(n.__e&&e.insertBefore(n.__e,n.__d),n.__c.__e=!0,n.__c.__P=e)),n}function U(){this.__u=0,this.t=null,this.__b=null;}function D(n){var t=n.__.__c;return t&&t.__a&&t.__a(n)}function M(){this.u=null,this.o=null;}l$1.unmount=function(n){var t=n.__c;t&&t.__R&&t.__R(),t&&!0===n.__h&&(n.type=null),T&&T(n);},(U.prototype=new d$1).__c=function(n,t){var e=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(e);var u=D(r.__v),o=!1,i=function(){o||(o=!0,e.__R=null,u?u(l):l());};e.__R=i;var l=function(){if(!--r.__u){if(r.state.__a){var n=r.state.__a;r.__v.__k[0]=L(n,n.__c.__P,n.__c.__O);}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate();}},c=!0===t.__h;r.__u++||c||r.setState({__a:r.__b=r.__v.__k[0]}),n.then(i,i);},U.prototype.componentWillUnmount=function(){this.t=[];},U.prototype.render=function(n,e){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),o=this.__v.__k[0].__c;this.__v.__k[0]=I(this.__b,r,o.__O=o.__P);}this.__b=null;}var i=e.__a&&h$1(p$1,null,n.fallback);return i&&(i.__h=null),[h$1(p$1,null,e.__a?null:n.children),i]};var V=function(n,t,e){if(++e[1]===e[0]&&n.o.delete(t),n.props.revealOrder&&("t"!==n.props.revealOrder[0]||!n.o.size))for(e=n.u;e;){for(;e.length>3;)e.pop()();if(e[1]<e[0])break;n.u=e=e[2];}};(M.prototype=new d$1).__a=function(n){var t=this,e=D(t.__v),r=t.o.get(n);return r[0]++,function(u){var o=function(){t.props.revealOrder?(r.push(u),V(t,n,r)):u();};e?e(o):o();}},M.prototype.render=function(n){this.u=null,this.o=new Map;var t=x$1(n.children);n.revealOrder&&"b"===n.revealOrder[0]&&t.reverse();for(var e=t.length;e--;)this.o.set(t[e],this.u=[1,0,this.u]);return n.children},M.prototype.componentDidUpdate=M.prototype.componentDidMount=function(){var n=this;this.o.forEach(function(t,e){V(n,e,t);});};var j="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,z=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,B="undefined"!=typeof document,H=function(n){return ("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(n)};function Z(n,t,e){return null==t.__k&&(t.textContent=""),P(n,t),"function"==typeof e&&e(),n?n.__c:null}d$1.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(d$1.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(n){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:n});}});});var q=l$1.event;function G(){}function J(){return this.cancelBubble}function K(){return this.defaultPrevented}l$1.event=function(n){return q&&(n=q(n)),n.persist=G,n.isPropagationStopped=J,n.isDefaultPrevented=K,n.nativeEvent=n};var X={configurable:!0,get:function(){return this.class}},nn=l$1.vnode;l$1.vnode=function(n){var t=n.type,e=n.props,u=e;if("string"==typeof t){var o=-1===t.indexOf("-");for(var i in u={},e){var l=e[i];B&&"children"===i&&"noscript"===t||"value"===i&&"defaultValue"in e&&null==l||("defaultValue"===i&&"value"in e&&null==e.value?i="value":"download"===i&&!0===l?l="":/ondoubleclick/i.test(i)?i="ondblclick":/^onchange(textarea|input)/i.test(i+t)&&!H(e.type)?i="oninput":/^onfocus$/i.test(i)?i="onfocusin":/^onblur$/i.test(i)?i="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(i)?i=i.toLowerCase():o&&z.test(i)?i=i.replace(/[A-Z0-9]/g,"-$&").toLowerCase():null===l&&(l=void 0),/^oninput$/i.test(i)&&(i=i.toLowerCase(),u[i]&&(i="oninputCapture")),u[i]=l);}"select"==t&&u.multiple&&Array.isArray(u.value)&&(u.value=x$1(e.children).forEach(function(n){n.props.selected=-1!=u.value.indexOf(n.props.value);})),"select"==t&&null!=u.defaultValue&&(u.value=x$1(e.children).forEach(function(n){n.props.selected=u.multiple?-1!=u.defaultValue.indexOf(n.props.value):u.defaultValue==n.props.value;})),n.props=u,e.class!=e.className&&(X.enumerable="className"in e,null!=e.className&&(u.class=e.className),Object.defineProperty(u,"className",X));}n.$$typeof=j,nn&&nn(n);};var tn=l$1.__r;l$1.__r=function(n){tn&&tn(n),n.__c;};function cn(n){return !!n.__k&&(P(null,n),!0)}
|
|
75
75
|
|
|
76
76
|
function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function clsx(){for(var e,t,f=0,n="";f<arguments.length;)(e=arguments[f++])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
|
|
77
77
|
|
|
@@ -166,10 +166,10 @@ const CheckboxFormatter = /*#__PURE__*/N(function CheckboxFormatter({
|
|
|
166
166
|
});
|
|
167
167
|
});
|
|
168
168
|
|
|
169
|
-
const useLayoutEffect = typeof window === 'undefined' ?
|
|
169
|
+
const useLayoutEffect = typeof window === 'undefined' ? h : s;
|
|
170
170
|
|
|
171
171
|
function useFocusRef(isSelected) {
|
|
172
|
-
const ref =
|
|
172
|
+
const ref = _$1(null);
|
|
173
173
|
useLayoutEffect(() => {
|
|
174
174
|
var _ref$current;
|
|
175
175
|
|
|
@@ -187,7 +187,7 @@ function useFocusRef(isSelected) {
|
|
|
187
187
|
const DataGridDefaultComponentsContext = /*#__PURE__*/B$2(undefined);
|
|
188
188
|
const DataGridDefaultComponentsProvider = DataGridDefaultComponentsContext.Provider;
|
|
189
189
|
function useDefaultComponents() {
|
|
190
|
-
return
|
|
190
|
+
return q$1(DataGridDefaultComponentsContext);
|
|
191
191
|
}
|
|
192
192
|
|
|
193
193
|
function SelectCellFormatter({
|
|
@@ -274,8 +274,8 @@ const RowSelectionProvider = RowSelectionContext.Provider;
|
|
|
274
274
|
const RowSelectionChangeContext = /*#__PURE__*/B$2(undefined);
|
|
275
275
|
const RowSelectionChangeProvider = RowSelectionChangeContext.Provider;
|
|
276
276
|
function useRowSelection() {
|
|
277
|
-
const rowSelectionContext =
|
|
278
|
-
const rowSelectionChangeContext =
|
|
277
|
+
const rowSelectionContext = q$1(RowSelectionContext);
|
|
278
|
+
const rowSelectionChangeContext = q$1(RowSelectionChangeContext);
|
|
279
279
|
|
|
280
280
|
if (rowSelectionContext === undefined || rowSelectionChangeContext === undefined) {
|
|
281
281
|
throw new Error('useRowSelection must be used within DataGrid cells');
|
|
@@ -599,7 +599,7 @@ function useCalculatedColumns({
|
|
|
599
599
|
colSpanColumns,
|
|
600
600
|
lastFrozenColumnIndex,
|
|
601
601
|
groupBy
|
|
602
|
-
} =
|
|
602
|
+
} = F(() => {
|
|
603
603
|
const groupBy = [];
|
|
604
604
|
let lastFrozenColumnIndex = -1;
|
|
605
605
|
const columns = rawColumns.map(rawColumn => {
|
|
@@ -688,7 +688,7 @@ function useCalculatedColumns({
|
|
|
688
688
|
layoutCssVars,
|
|
689
689
|
totalFrozenColumnWidth,
|
|
690
690
|
columnMetrics
|
|
691
|
-
} =
|
|
691
|
+
} = F(() => {
|
|
692
692
|
const columnMetrics = new Map();
|
|
693
693
|
let left = 0;
|
|
694
694
|
let totalFrozenColumnWidth = 0;
|
|
@@ -756,7 +756,7 @@ function useCalculatedColumns({
|
|
|
756
756
|
columnMetrics
|
|
757
757
|
};
|
|
758
758
|
}, [columnWidths, columns, viewportWidth, lastFrozenColumnIndex]);
|
|
759
|
-
const [colOverscanStartIdx, colOverscanEndIdx] =
|
|
759
|
+
const [colOverscanStartIdx, colOverscanEndIdx] = F(() => {
|
|
760
760
|
if (!enableVirtualization) {
|
|
761
761
|
return [0, columns.length - 1];
|
|
762
762
|
}
|
|
@@ -837,9 +837,9 @@ function getSpecifiedWidth({
|
|
|
837
837
|
}
|
|
838
838
|
|
|
839
839
|
function useGridDimensions() {
|
|
840
|
-
const gridRef =
|
|
841
|
-
const [inlineSize, setInlineSize] =
|
|
842
|
-
const [blockSize, setBlockSize] =
|
|
840
|
+
const gridRef = _$1(null);
|
|
841
|
+
const [inlineSize, setInlineSize] = p(1);
|
|
842
|
+
const [blockSize, setBlockSize] = p(1);
|
|
843
843
|
useLayoutEffect(() => {
|
|
844
844
|
const {
|
|
845
845
|
ResizeObserver
|
|
@@ -877,23 +877,23 @@ function handleDevicePixelRatio(size) {
|
|
|
877
877
|
}
|
|
878
878
|
|
|
879
879
|
function useLatestFunc(fn) {
|
|
880
|
-
const ref =
|
|
881
|
-
|
|
880
|
+
const ref = _$1(fn);
|
|
881
|
+
h(() => {
|
|
882
882
|
ref.current = fn;
|
|
883
883
|
});
|
|
884
|
-
return
|
|
884
|
+
return T$1((...args) => {
|
|
885
885
|
ref.current(...args);
|
|
886
886
|
}, []);
|
|
887
887
|
}
|
|
888
888
|
|
|
889
889
|
function useRovingCellRef(isSelected) {
|
|
890
|
-
const [isChildFocused, setIsChildFocused] =
|
|
890
|
+
const [isChildFocused, setIsChildFocused] = p(false);
|
|
891
891
|
|
|
892
892
|
if (isChildFocused && !isSelected) {
|
|
893
893
|
setIsChildFocused(false);
|
|
894
894
|
}
|
|
895
895
|
|
|
896
|
-
const ref =
|
|
896
|
+
const ref = T$1(cell => {
|
|
897
897
|
if (cell === null || cell.contains(document.activeElement)) return;
|
|
898
898
|
cell.focus({
|
|
899
899
|
preventScroll: true
|
|
@@ -926,7 +926,7 @@ function useViewportColumns({
|
|
|
926
926
|
rowOverscanEndIdx,
|
|
927
927
|
isGroupRow
|
|
928
928
|
}) {
|
|
929
|
-
const startIdx =
|
|
929
|
+
const startIdx = F(() => {
|
|
930
930
|
if (colOverscanStartIdx === 0) return 0;
|
|
931
931
|
let startIdx = colOverscanStartIdx;
|
|
932
932
|
|
|
@@ -975,7 +975,7 @@ function useViewportColumns({
|
|
|
975
975
|
|
|
976
976
|
return startIdx;
|
|
977
977
|
}, [rowOverscanStartIdx, rowOverscanEndIdx, rows, summaryRows, colOverscanStartIdx, lastFrozenColumnIndex, colSpanColumns, isGroupRow]);
|
|
978
|
-
return
|
|
978
|
+
return F(() => {
|
|
979
979
|
const viewportColumns = [];
|
|
980
980
|
|
|
981
981
|
for (let colIdx = 0; colIdx <= colOverscanEndIdx; colIdx++) {
|
|
@@ -1002,7 +1002,7 @@ function useViewportRows({
|
|
|
1002
1002
|
expandedGroupIds,
|
|
1003
1003
|
enableVirtualization
|
|
1004
1004
|
}) {
|
|
1005
|
-
const [groupedRows, rowsCount] =
|
|
1005
|
+
const [groupedRows, rowsCount] = F(() => {
|
|
1006
1006
|
if (groupBy.length === 0 || rowGrouper == null) return [undefined, rawRows.length];
|
|
1007
1007
|
|
|
1008
1008
|
const groupRows = (rows, [groupByKey, ...remainingGroupByKeys], startRowIndex) => {
|
|
@@ -1024,7 +1024,7 @@ function useViewportRows({
|
|
|
1024
1024
|
|
|
1025
1025
|
return groupRows(rawRows, groupBy, 0);
|
|
1026
1026
|
}, [groupBy, rowGrouper, rawRows]);
|
|
1027
|
-
const [rows, isGroupRow] =
|
|
1027
|
+
const [rows, isGroupRow] = F(() => {
|
|
1028
1028
|
const allGroupRows = new Set();
|
|
1029
1029
|
if (!groupedRows) return [rawRows, isGroupRow];
|
|
1030
1030
|
const flattenedRows = [];
|
|
@@ -1078,7 +1078,7 @@ function useViewportRows({
|
|
|
1078
1078
|
getRowTop,
|
|
1079
1079
|
getRowHeight,
|
|
1080
1080
|
findRowIdx
|
|
1081
|
-
} =
|
|
1081
|
+
} = F(() => {
|
|
1082
1082
|
if (typeof rowHeight === 'number') {
|
|
1083
1083
|
return {
|
|
1084
1084
|
totalRowHeight: rowHeight * rows.length,
|
|
@@ -1846,12 +1846,12 @@ function EditCell({
|
|
|
1846
1846
|
}) {
|
|
1847
1847
|
var _column$editorOptions, _column$editorOptions4, _column$editorOptions5;
|
|
1848
1848
|
|
|
1849
|
-
const frameRequestRef =
|
|
1849
|
+
const frameRequestRef = _$1();
|
|
1850
1850
|
const commitOnOutsideClick = ((_column$editorOptions = column.editorOptions) == null ? void 0 : _column$editorOptions.commitOnOutsideClick) !== false;
|
|
1851
1851
|
const commitOnOutsideMouseDown = useLatestFunc(() => {
|
|
1852
1852
|
onClose(true);
|
|
1853
1853
|
});
|
|
1854
|
-
|
|
1854
|
+
h(() => {
|
|
1855
1855
|
if (!commitOnOutsideClick) return;
|
|
1856
1856
|
|
|
1857
1857
|
function onWindowCaptureMouseDown() {
|
|
@@ -2099,18 +2099,18 @@ function DataGrid({
|
|
|
2099
2099
|
const cellNavigationMode = rawCellNavigationMode != null ? rawCellNavigationMode : 'NONE';
|
|
2100
2100
|
(_enableVirtualization = enableVirtualization) != null ? _enableVirtualization : enableVirtualization = true;
|
|
2101
2101
|
(_direction = direction) != null ? _direction : direction = 'ltr';
|
|
2102
|
-
const [scrollTop, setScrollTop] =
|
|
2103
|
-
const [scrollLeft, setScrollLeft] =
|
|
2104
|
-
const [columnWidths, setColumnWidths] =
|
|
2105
|
-
const [selectedPosition, setSelectedPosition] =
|
|
2106
|
-
const [copiedCell, setCopiedCell] =
|
|
2107
|
-
const [isDragging, setDragging] =
|
|
2108
|
-
const [draggedOverRowIdx, setOverRowIdx] =
|
|
2109
|
-
const [autoResizeColumn, setAutoResizeColumn] =
|
|
2110
|
-
const prevSelectedPosition =
|
|
2111
|
-
const latestDraggedOverRowIdx =
|
|
2112
|
-
const lastSelectedRowIdx =
|
|
2113
|
-
const rowRef =
|
|
2102
|
+
const [scrollTop, setScrollTop] = p(0);
|
|
2103
|
+
const [scrollLeft, setScrollLeft] = p(0);
|
|
2104
|
+
const [columnWidths, setColumnWidths] = p(() => new Map());
|
|
2105
|
+
const [selectedPosition, setSelectedPosition] = p(initialPosition);
|
|
2106
|
+
const [copiedCell, setCopiedCell] = p(null);
|
|
2107
|
+
const [isDragging, setDragging] = p(false);
|
|
2108
|
+
const [draggedOverRowIdx, setOverRowIdx] = p(undefined);
|
|
2109
|
+
const [autoResizeColumn, setAutoResizeColumn] = p(null);
|
|
2110
|
+
const prevSelectedPosition = _$1(selectedPosition);
|
|
2111
|
+
const latestDraggedOverRowIdx = _$1(draggedOverRowIdx);
|
|
2112
|
+
const lastSelectedRowIdx = _$1(-1);
|
|
2113
|
+
const rowRef = _$1(null);
|
|
2114
2114
|
const [gridRef, gridWidth, gridHeight] = useGridDimensions();
|
|
2115
2115
|
const headerRowsCount = 1;
|
|
2116
2116
|
const summaryRowsCount = (_summaryRows$length = summaryRows == null ? void 0 : summaryRows.length) != null ? _summaryRows$length : 0;
|
|
@@ -2120,11 +2120,11 @@ function DataGrid({
|
|
|
2120
2120
|
const isRtl = direction === 'rtl';
|
|
2121
2121
|
const leftKey = isRtl ? 'ArrowRight' : 'ArrowLeft';
|
|
2122
2122
|
const rightKey = isRtl ? 'ArrowLeft' : 'ArrowRight';
|
|
2123
|
-
const defaultGridComponents =
|
|
2123
|
+
const defaultGridComponents = F(() => ({
|
|
2124
2124
|
sortIcon,
|
|
2125
2125
|
checkboxFormatter
|
|
2126
2126
|
}), [sortIcon, checkboxFormatter]);
|
|
2127
|
-
const allRowsSelected =
|
|
2127
|
+
const allRowsSelected = F(() => {
|
|
2128
2128
|
const {
|
|
2129
2129
|
length
|
|
2130
2130
|
} = rawRows;
|
|
@@ -2248,7 +2248,7 @@ function DataGrid({
|
|
|
2248
2248
|
setAutoResizeColumn(null);
|
|
2249
2249
|
onColumnResize == null ? void 0 : onColumnResize(autoResizeColumn.idx, width);
|
|
2250
2250
|
}, [autoResizeColumn, gridRef, onColumnResize]);
|
|
2251
|
-
|
|
2251
|
+
A(ref, () => ({
|
|
2252
2252
|
element: gridRef.current,
|
|
2253
2253
|
|
|
2254
2254
|
scrollToColumn(idx) {
|
|
@@ -2270,7 +2270,7 @@ function DataGrid({
|
|
|
2270
2270
|
|
|
2271
2271
|
selectCell
|
|
2272
2272
|
}));
|
|
2273
|
-
const handleColumnResize =
|
|
2273
|
+
const handleColumnResize = T$1((column, width) => {
|
|
2274
2274
|
if (width === 'auto') {
|
|
2275
2275
|
setAutoResizeColumn(column);
|
|
2276
2276
|
return;
|
|
@@ -2283,7 +2283,7 @@ function DataGrid({
|
|
|
2283
2283
|
});
|
|
2284
2284
|
onColumnResize == null ? void 0 : onColumnResize(column.idx, width);
|
|
2285
2285
|
}, [onColumnResize]);
|
|
2286
|
-
const setDraggedOverRowIdx =
|
|
2286
|
+
const setDraggedOverRowIdx = T$1(rowIdx => {
|
|
2287
2287
|
setOverRowIdx(rowIdx);
|
|
2288
2288
|
latestDraggedOverRowIdx.current = rowIdx;
|
|
2289
2289
|
}, []);
|
|
@@ -3095,9 +3095,9 @@ styleInject$1(css_248z$g,{"insertAt":"top"});
|
|
|
3095
3095
|
|
|
3096
3096
|
function useData(widget) {
|
|
3097
3097
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3098
|
-
var columns =
|
|
3098
|
+
var columns = F(function () { return widget.columns(); }, [widget, widget.dataChecksum()]);
|
|
3099
3099
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3100
|
-
var data =
|
|
3100
|
+
var data = F(function () { return widget.data(); }, [widget, widget.dataChecksum()]);
|
|
3101
3101
|
return [columns, data];
|
|
3102
3102
|
}
|
|
3103
3103
|
|
|
@@ -3126,12 +3126,12 @@ var ReactTable = function (_a) {
|
|
|
3126
3126
|
var columnTypes = table.columnTypes();
|
|
3127
3127
|
var columnPatterns = table.columnPatterns();
|
|
3128
3128
|
var columnFormats = table.columnFormats();
|
|
3129
|
-
var _c =
|
|
3130
|
-
var _d =
|
|
3131
|
-
var _e =
|
|
3132
|
-
var _f =
|
|
3129
|
+
var _c = p([]), listColumns = _c[0], setListColumns = _c[1];
|
|
3130
|
+
var _d = p(), sortColumn = _d[0], setSortColumn = _d[1];
|
|
3131
|
+
var _e = p([]), rows = _e[0], setRows = _e[1];
|
|
3132
|
+
var _f = p(new Set()), selectedRows = _f[0], setSelectedRows = _f[1];
|
|
3133
3133
|
// Columns ---
|
|
3134
|
-
|
|
3134
|
+
h(function () {
|
|
3135
3135
|
setListColumns(__spreadArray(__spreadArray([], multiSelect ? [SelectColumn] : [], true), columns.map(function (column) {
|
|
3136
3136
|
var _a;
|
|
3137
3137
|
var type = (_a = columnTypes[column]) !== null && _a !== void 0 ? _a : "string";
|
|
@@ -3163,24 +3163,24 @@ var ReactTable = function (_a) {
|
|
|
3163
3163
|
};
|
|
3164
3164
|
}), true));
|
|
3165
3165
|
}, [columnFormats, columnPatterns, columnTypes, columns, multiSelect]);
|
|
3166
|
-
var onSortColumnsChange =
|
|
3166
|
+
var onSortColumnsChange = T$1(function (sortColumns) {
|
|
3167
3167
|
var futureSortColumn = sortColumns.slice(-1)[0];
|
|
3168
3168
|
var sorted = futureSortColumn !== undefined;
|
|
3169
3169
|
var isSortedDescending = (futureSortColumn === null || futureSortColumn === void 0 ? void 0 : futureSortColumn.direction) === "DESC";
|
|
3170
3170
|
setSortColumn(futureSortColumn);
|
|
3171
3171
|
setRows(copyAndSort(rows, sorted ? futureSortColumn.columnKey : "key", sorted ? isSortedDescending : false));
|
|
3172
3172
|
}, [rows]);
|
|
3173
|
-
var rowKeyGetter =
|
|
3173
|
+
var rowKeyGetter = T$1(function (row) {
|
|
3174
3174
|
return row.key;
|
|
3175
3175
|
}, []);
|
|
3176
|
-
var onSelectedRowsChange =
|
|
3176
|
+
var onSelectedRowsChange = T$1(function (selectedRows) {
|
|
3177
3177
|
setSelectedRows(selectedRows);
|
|
3178
3178
|
}, []);
|
|
3179
|
-
var onRowClick =
|
|
3179
|
+
var onRowClick = T$1(function (row, column) {
|
|
3180
3180
|
table.onRowClickCallback(row, column.key);
|
|
3181
3181
|
}, [table]);
|
|
3182
3182
|
// Rows ---
|
|
3183
|
-
|
|
3183
|
+
h(function () {
|
|
3184
3184
|
var items = data.map(function (row, index) {
|
|
3185
3185
|
var retVal = {
|
|
3186
3186
|
key: index
|