@hpcc-js/dgrid2 2.3.0 → 2.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es6.js +80 -80
- package/dist/index.es6.js.map +1 -1
- package/dist/index.js +80 -80
- 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 +8 -8
- 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.js
CHANGED
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
})(this, (function (exports, common) { 'use strict';
|
|
6
6
|
|
|
7
7
|
var PKG_NAME = "@hpcc-js/dgrid2";
|
|
8
|
-
var PKG_VERSION = "2.3.
|
|
9
|
-
var BUILD_VERSION = "2.104.
|
|
8
|
+
var PKG_VERSION = "2.3.2";
|
|
9
|
+
var BUILD_VERSION = "2.104.5";
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
/******************************************************************************
|
|
12
12
|
Copyright (c) Microsoft Corporation.
|
|
13
13
|
|
|
14
14
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -71,11 +71,11 @@
|
|
|
71
71
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
var n,l$1,u$1,t$1,o$2,r$1,f$1
|
|
74
|
+
var n,l$1,u$1,t$1,o$2,r$1,f$1={},e$2=[],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 _$1(n,l){if(null==l)return n.__?_$1(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?_$1(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?_$1(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$2,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,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$2(n,k,d,x,b,s),"function"==typeof u.type&&(u.__d=s)):s&&d.__e==s&&s.parentNode!=n&&(s=_$1(d));}for(u.__e=g,h=C;h--;)null!=x[h]&&("function"==typeof u.type&&null!=x[h].__e&&x[h].__e==u.__d&&(u.__d=_$1(i,h+1)),N(x[h],x[h]));if(w)for(h=0;h<w.length;h++)M(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$2(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$2(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 $$1(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||$$1(n.style,l,"");if(u)for(l in u)i&&u[l]===i[l]||$$1(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,o):n.removeEventListener(l,o?T$2:I,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||"a"===l[0]&&"r"===l[1])?n.setAttribute(l,u):n.removeAttribute(l));}}function I(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=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 H){if(g=u.props,m=(a=H.contextType)&&t[a.__c],x=a?m?m.props.value:a.__:t,i.__c?b=(h=u.__c=i.__c).__=h.__E:("prototype"in H&&H.prototype.render?u.__c=h=new H(g,x):(u.__c=h=new d$1(g,x),h.constructor=H,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=[]),null==h.__s&&(h.__s=h.state),null!=H.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=s$1({},h.__s)),s$1(h.__s,H.getDerivedStateFromProps(g,h.__s))),y=h.props,_=h.state,v)null==H.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else {if(null==H.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){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);}),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,A=l$1.__r,C=0,"prototype"in H&&H.prototype.render)h.state=h.__s,h.__d=!1,A&&A(u),a=h.render(h.props,h.state,h.context);else do{h.__d=!1,A&&A(u),a=h.render(h.props,h.state,h.context),h.state=h.__s;}while(h.__d&&++C<25);h.state=h.__s,null!=h.getChildContext&&(t=s$1(s$1({},t),h.getChildContext())),v||null==h.getSnapshotBeforeUpdate||(k=h.getSnapshotBeforeUpdate(y,_)),$=null!=a&&a.type===p$1&&null==a.key?a.props.children:a,w$2(n,Array.isArray($)?$:[$],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&&_$1(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(n,u,i){try{"function"==typeof n?n(u):n.current=u;}catch(n){l$1.__e(n,i);}}function N(n,u,i){var t,o;if(l$1.unmount&&l$1.unmount(n),(t=n.ref)&&(t.current&&t.current!==n.__e||M(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;}if(t=n.__k)for(o=0;o<t.length;o++)t[o]&&N(t[o],u,"function"!=typeof n.type);i||null==n.__e||a$1(n.__e),n.__e=n.__d=void 0;}function O$1(n,l,u){return this.constructor(n,u)}function P$1(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(n,l){var u={__c:l="__cC"+r$1++,__: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$2.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.__h.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$1=0;
|
|
75
75
|
|
|
76
|
-
var t,u,
|
|
76
|
+
var t,r,u,i,o$1=0,c=[],f=[],e$1=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,t,o$1||u),o$1=0;var i=r.__H||(r.__H={__:[],__h:[]});return t>=i.__.length&&i.__.push({__V:f}),i.__[t]}function p(n){return o$1=1,y(z$1,n)}function y(n,u,i){var o=d(t++,2);if(o.t=n,!o.__c&&(o.__=[i?i(u):z$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,!r.u)){r.u=!0;var c=r.shouldComponentUpdate;r.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 !c||c.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&&(!c||c.call(this,n,t,r))};}return o.__N||o.__}function h(u,i){var o=d(t++,3);!l$1.__s&&w$1(o.__H,i)&&(o.__=u,o.i=i,r.__H.__h.push(o));}function s(u,i){var o=d(t++,4);!l$1.__s&&w$1(o.__H,i)&&(o.__=u,o.i=i,r.__h.push(o));}function _(n){return o$1=5,F$1(function(){return {current:n}},[])}function A$1(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$1(n,r){var u=d(t++,7);return w$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$1(function(){return n},t)}function q$1(n){var u=r.context[n.__c],i=d(t++,9);return i.c=n,u?(null==i.__&&(i.__=!0,u.sub(r)),u.props.value):n.__}function b(){for(var t;t=c.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(j$1),t.__H.__h.forEach(k),t.__H.__h=[];}catch(r){t.__H.__h=[],l$1.__e(r,t.__v);}}l$1.__b=function(n){r=null,e$1&&e$1(n);},l$1.__r=function(n){a&&a(n),t=0;var i=(r=n.__c).__H;i&&(u===r?(i.__h=[],r.__h=[],i.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=f,n.__N=n.i=void 0;})):(i.__h.forEach(j$1),i.__h.forEach(k),i.__h=[])),u=r;},l$1.diffed=function(t){v&&v(t);var o=t.__c;o&&o.__H&&(o.__H.__h.length&&(1!==c.push(o)&&i===l$1.requestAnimationFrame||((i=l$1.requestAnimationFrame)||function(n){var t,r=function(){clearTimeout(u),g$1&&cancelAnimationFrame(t),setTimeout(n);},u=setTimeout(r,100);g$1&&(t=requestAnimationFrame(r));})(b)),o.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==f&&(n.__=n.__V),n.i=void 0,n.__V=f;})),u=r=null;},l$1.__c=function(t,r){r.some(function(t){try{t.__h.forEach(j$1),t.__h=t.__h.filter(function(n){return !n.__||k(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{j$1(n);}catch(n){r=n;}}),r&&l$1.__e(r,u.__v));};var g$1="function"==typeof requestAnimationFrame;function j$1(n){var t=r,u=n.__c;"function"==typeof u&&(n.__c=void 0,u()),r=t;}function k(n){var t=r;n.__c=n.__(),r=t;}function w$1(n,t){return !n||n.length!==t.length||t.some(function(t,r){return t!==n[r]})}function z$1(n,t){return "function"==typeof t?t(n):t}
|
|
77
77
|
|
|
78
|
-
function
|
|
78
|
+
function S(n,t){for(var e in t)n[e]=t[e];return n}function g(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 C(n){this.props=n;}function E(n,t){function e(n){var e=this.props.ref,r=e==n.ref;return !r&&e&&(e.call?e(null):e.current=null),t?!t(this.props,n)||!r:g(this.props,n)}function r(t){return this.shouldComponentUpdate=e,h$1(n,t)}return r.displayName="Memo("+(n.displayName||n.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(C.prototype=new d$1).isPureReactComponent=!0,C.prototype.shouldComponentUpdate=function(n,t){return g(this.props,n)||g(this.state,t)};var w=l$1.__b;l$1.__b=function(n){n.type&&n.type.__f&&n.ref&&(n.props.ref=n.ref,n.ref=null),w&&w(n);};var x="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function R(n){function t(t){var e=S({},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 A=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);A(n,t,e,r);};var O=l$1.unmount;function T(){this.__u=0,this.t=null,this.__b=null;}function L(n){var t=n.__.__c;return t&&t.__a&&t.__a(n)}function D(){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),O&&O(n);},(T.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=L(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]=function n(t,e,r){return t&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(t){return n(t,e,r)}),t.__c&&t.__c.__P===e&&(t.__e&&r.insertBefore(t.__e,t.__d),t.__c.__e=!0,t.__c.__P=r)),t}(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);},T.prototype.componentWillUnmount=function(){this.t=[];},T.prototype.render=function(n,t){if(this.__b){if(this.__v.__k){var e=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=function n(t,e,r){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(n){"function"==typeof n.__c&&n.__c();}),t.__c.__H=null),null!=(t=S({},t)).__c&&(t.__c.__P===r&&(t.__c.__P=e),t.__c=null),t.__k=t.__k&&t.__k.map(function(t){return n(t,e,r)})),t}(this.__b,e,r.__O=r.__P);}this.__b=null;}var u=t.__a&&h$1(p$1,null,n.fallback);return u&&(u.__h=null),[h$1(p$1,null,t.__a?null:n.children),u]};var F=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];}};(D.prototype=new d$1).__a=function(n){var t=this,e=L(t.__v),r=t.o.get(n);return r[0]++,function(u){var o=function(){t.props.revealOrder?(r.push(u),F(t,n,r)):u();};e?e(o):o();}},D.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},D.prototype.componentDidUpdate=D.prototype.componentDidMount=function(){var n=this;this.o.forEach(function(t,e){F(n,e,t);});};var W="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,P=/^(?: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]/,$="undefined"!=typeof document,j=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$1(n,t),"function"==typeof e&&e(),n?n.__c:null}d$1.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(n){Object.defineProperty(d$1.prototype,n,{configurable:!0,get:function(){return this["UNSAFE_"+n]},set:function(t){Object.defineProperty(this,n,{configurable:!0,writable:!0,value:t});}});});var H=l$1.event;function Z(){}function Y(){return this.cancelBubble}function q(){return this.defaultPrevented}l$1.event=function(n){return H&&(n=H(n)),n.persist=Z,n.isPropagationStopped=Y,n.isDefaultPrevented=q,n.nativeEvent=n};var J={configurable:!0,get:function(){return this.class}},K=l$1.vnode;l$1.vnode=function(n){var t=n.type,e=n.props,r=e;if("string"==typeof t){var u=-1===t.indexOf("-");for(var o in r={},e){var i=e[o];$&&"children"===o&&"noscript"===t||"value"===o&&"defaultValue"in e&&null==i||("defaultValue"===o&&"value"in e&&null==e.value?o="value":"download"===o&&!0===i?i="":/ondoubleclick/i.test(o)?o="ondblclick":/^onchange(textarea|input)/i.test(o+t)&&!j(e.type)?o="oninput":/^onfocus$/i.test(o)?o="onfocusin":/^onblur$/i.test(o)?o="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(o)?o=o.toLowerCase():u&&P.test(o)?o=o.replace(/[A-Z0-9]/g,"-$&").toLowerCase():null===i&&(i=void 0),/^oninput$/i.test(o)&&(o=o.toLowerCase(),r[o]&&(o="oninputCapture")),r[o]=i);}"select"==t&&r.multiple&&Array.isArray(r.value)&&(r.value=x$1(e.children).forEach(function(n){n.props.selected=-1!=r.value.indexOf(n.props.value);})),"select"==t&&null!=r.defaultValue&&(r.value=x$1(e.children).forEach(function(n){n.props.selected=r.multiple?-1!=r.defaultValue.indexOf(n.props.value):r.defaultValue==n.props.value;})),n.props=r,e.class!=e.className&&(J.enumerable="className"in e,null!=e.className&&(r.class=e.className),Object.defineProperty(r,"className",J));}n.$$typeof=W,K&&K(n);};var Q=l$1.__r;l$1.__r=function(n){Q&&Q(n),n.__c;};function un(n){return !!n.__k&&(P$1(null,n),!0)}
|
|
79
79
|
|
|
80
80
|
function toVal(mix) {
|
|
81
81
|
var k, y, str='';
|
|
@@ -187,7 +187,7 @@
|
|
|
187
187
|
const checkboxClassname = `rdg-checkbox ${checkbox}`;
|
|
188
188
|
const checkboxLabelDisabled = "cca4mwn700-beta12";
|
|
189
189
|
const checkboxLabelDisabledClassname = `rdg-checkbox-label-disabled ${checkboxLabelDisabled}`;
|
|
190
|
-
const CheckboxFormatter = /*#__PURE__*/
|
|
190
|
+
const CheckboxFormatter = /*#__PURE__*/R(function CheckboxFormatter({
|
|
191
191
|
onChange,
|
|
192
192
|
...props
|
|
193
193
|
}, ref) {
|
|
@@ -209,10 +209,10 @@
|
|
|
209
209
|
});
|
|
210
210
|
});
|
|
211
211
|
|
|
212
|
-
const useLayoutEffect = typeof window === 'undefined' ?
|
|
212
|
+
const useLayoutEffect = typeof window === 'undefined' ? h : s;
|
|
213
213
|
|
|
214
214
|
function useFocusRef(isSelected) {
|
|
215
|
-
const ref =
|
|
215
|
+
const ref = _(null);
|
|
216
216
|
useLayoutEffect(() => {
|
|
217
217
|
var _ref$current;
|
|
218
218
|
|
|
@@ -227,10 +227,10 @@
|
|
|
227
227
|
};
|
|
228
228
|
}
|
|
229
229
|
|
|
230
|
-
const DataGridDefaultComponentsContext = /*#__PURE__*/
|
|
230
|
+
const DataGridDefaultComponentsContext = /*#__PURE__*/B(undefined);
|
|
231
231
|
const DataGridDefaultComponentsProvider = DataGridDefaultComponentsContext.Provider;
|
|
232
232
|
function useDefaultComponents() {
|
|
233
|
-
return
|
|
233
|
+
return q$1(DataGridDefaultComponentsContext);
|
|
234
234
|
}
|
|
235
235
|
|
|
236
236
|
function SelectCellFormatter({
|
|
@@ -259,7 +259,7 @@
|
|
|
259
259
|
|
|
260
260
|
function ValueFormatter(props) {
|
|
261
261
|
try {
|
|
262
|
-
return /*#__PURE__*/e(
|
|
262
|
+
return /*#__PURE__*/e(p$1, {
|
|
263
263
|
children: props.row[props.column.key]
|
|
264
264
|
});
|
|
265
265
|
} catch {
|
|
@@ -312,13 +312,13 @@
|
|
|
312
312
|
});
|
|
313
313
|
}
|
|
314
314
|
|
|
315
|
-
const RowSelectionContext = /*#__PURE__*/
|
|
315
|
+
const RowSelectionContext = /*#__PURE__*/B(undefined);
|
|
316
316
|
const RowSelectionProvider = RowSelectionContext.Provider;
|
|
317
|
-
const RowSelectionChangeContext = /*#__PURE__*/
|
|
317
|
+
const RowSelectionChangeContext = /*#__PURE__*/B(undefined);
|
|
318
318
|
const RowSelectionChangeProvider = RowSelectionChangeContext.Provider;
|
|
319
319
|
function useRowSelection() {
|
|
320
|
-
const rowSelectionContext =
|
|
321
|
-
const rowSelectionChangeContext =
|
|
320
|
+
const rowSelectionContext = q$1(RowSelectionContext);
|
|
321
|
+
const rowSelectionChangeContext = q$1(RowSelectionChangeContext);
|
|
322
322
|
|
|
323
323
|
if (rowSelectionContext === undefined || rowSelectionChangeContext === undefined) {
|
|
324
324
|
throw new Error('useRowSelection must be used within DataGrid cells');
|
|
@@ -642,7 +642,7 @@
|
|
|
642
642
|
colSpanColumns,
|
|
643
643
|
lastFrozenColumnIndex,
|
|
644
644
|
groupBy
|
|
645
|
-
} =
|
|
645
|
+
} = F$1(() => {
|
|
646
646
|
const groupBy = [];
|
|
647
647
|
let lastFrozenColumnIndex = -1;
|
|
648
648
|
const columns = rawColumns.map(rawColumn => {
|
|
@@ -731,7 +731,7 @@
|
|
|
731
731
|
layoutCssVars,
|
|
732
732
|
totalFrozenColumnWidth,
|
|
733
733
|
columnMetrics
|
|
734
|
-
} =
|
|
734
|
+
} = F$1(() => {
|
|
735
735
|
const columnMetrics = new Map();
|
|
736
736
|
let left = 0;
|
|
737
737
|
let totalFrozenColumnWidth = 0;
|
|
@@ -799,7 +799,7 @@
|
|
|
799
799
|
columnMetrics
|
|
800
800
|
};
|
|
801
801
|
}, [columnWidths, columns, viewportWidth, lastFrozenColumnIndex]);
|
|
802
|
-
const [colOverscanStartIdx, colOverscanEndIdx] =
|
|
802
|
+
const [colOverscanStartIdx, colOverscanEndIdx] = F$1(() => {
|
|
803
803
|
if (!enableVirtualization) {
|
|
804
804
|
return [0, columns.length - 1];
|
|
805
805
|
}
|
|
@@ -880,9 +880,9 @@
|
|
|
880
880
|
}
|
|
881
881
|
|
|
882
882
|
function useGridDimensions() {
|
|
883
|
-
const gridRef =
|
|
884
|
-
const [inlineSize, setInlineSize] =
|
|
885
|
-
const [blockSize, setBlockSize] =
|
|
883
|
+
const gridRef = _(null);
|
|
884
|
+
const [inlineSize, setInlineSize] = p(1);
|
|
885
|
+
const [blockSize, setBlockSize] = p(1);
|
|
886
886
|
useLayoutEffect(() => {
|
|
887
887
|
const {
|
|
888
888
|
ResizeObserver
|
|
@@ -920,23 +920,23 @@
|
|
|
920
920
|
}
|
|
921
921
|
|
|
922
922
|
function useLatestFunc(fn) {
|
|
923
|
-
const ref =
|
|
924
|
-
|
|
923
|
+
const ref = _(fn);
|
|
924
|
+
h(() => {
|
|
925
925
|
ref.current = fn;
|
|
926
926
|
});
|
|
927
|
-
return
|
|
927
|
+
return T$1((...args) => {
|
|
928
928
|
ref.current(...args);
|
|
929
929
|
}, []);
|
|
930
930
|
}
|
|
931
931
|
|
|
932
932
|
function useRovingCellRef(isSelected) {
|
|
933
|
-
const [isChildFocused, setIsChildFocused] =
|
|
933
|
+
const [isChildFocused, setIsChildFocused] = p(false);
|
|
934
934
|
|
|
935
935
|
if (isChildFocused && !isSelected) {
|
|
936
936
|
setIsChildFocused(false);
|
|
937
937
|
}
|
|
938
938
|
|
|
939
|
-
const ref =
|
|
939
|
+
const ref = T$1(cell => {
|
|
940
940
|
if (cell === null || cell.contains(document.activeElement)) return;
|
|
941
941
|
cell.focus({
|
|
942
942
|
preventScroll: true
|
|
@@ -969,7 +969,7 @@
|
|
|
969
969
|
rowOverscanEndIdx,
|
|
970
970
|
isGroupRow
|
|
971
971
|
}) {
|
|
972
|
-
const startIdx =
|
|
972
|
+
const startIdx = F$1(() => {
|
|
973
973
|
if (colOverscanStartIdx === 0) return 0;
|
|
974
974
|
let startIdx = colOverscanStartIdx;
|
|
975
975
|
|
|
@@ -1018,7 +1018,7 @@
|
|
|
1018
1018
|
|
|
1019
1019
|
return startIdx;
|
|
1020
1020
|
}, [rowOverscanStartIdx, rowOverscanEndIdx, rows, summaryRows, colOverscanStartIdx, lastFrozenColumnIndex, colSpanColumns, isGroupRow]);
|
|
1021
|
-
return
|
|
1021
|
+
return F$1(() => {
|
|
1022
1022
|
const viewportColumns = [];
|
|
1023
1023
|
|
|
1024
1024
|
for (let colIdx = 0; colIdx <= colOverscanEndIdx; colIdx++) {
|
|
@@ -1045,7 +1045,7 @@
|
|
|
1045
1045
|
expandedGroupIds,
|
|
1046
1046
|
enableVirtualization
|
|
1047
1047
|
}) {
|
|
1048
|
-
const [groupedRows, rowsCount] =
|
|
1048
|
+
const [groupedRows, rowsCount] = F$1(() => {
|
|
1049
1049
|
if (groupBy.length === 0 || rowGrouper == null) return [undefined, rawRows.length];
|
|
1050
1050
|
|
|
1051
1051
|
const groupRows = (rows, [groupByKey, ...remainingGroupByKeys], startRowIndex) => {
|
|
@@ -1067,7 +1067,7 @@
|
|
|
1067
1067
|
|
|
1068
1068
|
return groupRows(rawRows, groupBy, 0);
|
|
1069
1069
|
}, [groupBy, rowGrouper, rawRows]);
|
|
1070
|
-
const [rows, isGroupRow] =
|
|
1070
|
+
const [rows, isGroupRow] = F$1(() => {
|
|
1071
1071
|
const allGroupRows = new Set();
|
|
1072
1072
|
if (!groupedRows) return [rawRows, isGroupRow];
|
|
1073
1073
|
const flattenedRows = [];
|
|
@@ -1121,7 +1121,7 @@
|
|
|
1121
1121
|
getRowTop,
|
|
1122
1122
|
getRowHeight,
|
|
1123
1123
|
findRowIdx
|
|
1124
|
-
} =
|
|
1124
|
+
} = F$1(() => {
|
|
1125
1125
|
if (typeof rowHeight === 'number') {
|
|
1126
1126
|
return {
|
|
1127
1127
|
totalRowHeight: rowHeight * rows.length,
|
|
@@ -1223,7 +1223,7 @@
|
|
|
1223
1223
|
onSort,
|
|
1224
1224
|
isCellSelected
|
|
1225
1225
|
}) {
|
|
1226
|
-
if (!column.sortable) return /*#__PURE__*/e(
|
|
1226
|
+
if (!column.sortable) return /*#__PURE__*/e(p$1, {
|
|
1227
1227
|
children: column.name
|
|
1228
1228
|
});
|
|
1229
1229
|
return /*#__PURE__*/e(SortableHeaderCell, {
|
|
@@ -1499,7 +1499,7 @@
|
|
|
1499
1499
|
});
|
|
1500
1500
|
}
|
|
1501
1501
|
|
|
1502
|
-
const HeaderRow$1 = /*#__PURE__*/
|
|
1502
|
+
const HeaderRow$1 = /*#__PURE__*/E(HeaderRow);
|
|
1503
1503
|
|
|
1504
1504
|
var css_248z$7 = ".c1bmg16t700-beta12,.ccpfvsn700-beta12{background-color:#ccf}.c1bmg16t700-beta12.ccpfvsn700-beta12{background-color:#99f}";
|
|
1505
1505
|
styleInject$1(css_248z$7,{"insertAt":"top"});
|
|
@@ -1568,7 +1568,7 @@
|
|
|
1568
1568
|
onContextMenu: handleContextMenu,
|
|
1569
1569
|
onFocus: onFocus,
|
|
1570
1570
|
...props,
|
|
1571
|
-
children: !column.rowGroup && /*#__PURE__*/e(
|
|
1571
|
+
children: !column.rowGroup && /*#__PURE__*/e(p$1, {
|
|
1572
1572
|
children: [/*#__PURE__*/e(column.formatter, {
|
|
1573
1573
|
column: column,
|
|
1574
1574
|
row: row,
|
|
@@ -1579,7 +1579,7 @@
|
|
|
1579
1579
|
});
|
|
1580
1580
|
}
|
|
1581
1581
|
|
|
1582
|
-
const Cell$1 = /*#__PURE__*/
|
|
1582
|
+
const Cell$1 = /*#__PURE__*/E(Cell);
|
|
1583
1583
|
|
|
1584
1584
|
function Row({
|
|
1585
1585
|
className,
|
|
@@ -1665,7 +1665,7 @@
|
|
|
1665
1665
|
});
|
|
1666
1666
|
}
|
|
1667
1667
|
|
|
1668
|
-
const Row$1 = /*#__PURE__*/
|
|
1668
|
+
const Row$1 = /*#__PURE__*/E( /*#__PURE__*/R(Row));
|
|
1669
1669
|
|
|
1670
1670
|
function GroupCell({
|
|
1671
1671
|
id,
|
|
@@ -1713,7 +1713,7 @@
|
|
|
1713
1713
|
}, column.key);
|
|
1714
1714
|
}
|
|
1715
1715
|
|
|
1716
|
-
const GroupCell$1 = /*#__PURE__*/
|
|
1716
|
+
const GroupCell$1 = /*#__PURE__*/E(GroupCell);
|
|
1717
1717
|
|
|
1718
1718
|
var css_248z$6 = ".gyxx7e9700-beta12:not([aria-selected=true]){background-color:var(--rdg-header-background-color)}.gyxx7e9700-beta12>.c1wupbe700-beta12:not(:last-child):not(.c9dpaye700-beta12){border-inline-end:none}";
|
|
1719
1719
|
styleInject$1(css_248z$6,{"insertAt":"top"});
|
|
@@ -1769,7 +1769,7 @@
|
|
|
1769
1769
|
});
|
|
1770
1770
|
}
|
|
1771
1771
|
|
|
1772
|
-
const GroupRowRenderer = /*#__PURE__*/
|
|
1772
|
+
const GroupRowRenderer = /*#__PURE__*/E(GroupedRow);
|
|
1773
1773
|
|
|
1774
1774
|
var css_248z$5 = ".s1n3hxke700-beta12{inset-block-end:var(--rdg-summary-row-bottom);inset-block-start:var(--rdg-summary-row-top)}";
|
|
1775
1775
|
styleInject$1(css_248z$5,{"insertAt":"top"});
|
|
@@ -1817,7 +1817,7 @@
|
|
|
1817
1817
|
});
|
|
1818
1818
|
}
|
|
1819
1819
|
|
|
1820
|
-
const SummaryCell$1 = /*#__PURE__*/
|
|
1820
|
+
const SummaryCell$1 = /*#__PURE__*/E(SummaryCell);
|
|
1821
1821
|
|
|
1822
1822
|
var css_248z$4 = ".snfqesz700-beta12.r1otpg64700-beta12{line-height:var(--rdg-summary-row-height)}.snfqesz700-beta12.r1otpg64700-beta12>.c1wupbe700-beta12{position:sticky}.s1jijrjz700-beta12>.c1wupbe700-beta12{border-block-start:2px solid var(--rdg-summary-border-color)}";
|
|
1823
1823
|
styleInject$1(css_248z$4,{"insertAt":"top"});
|
|
@@ -1873,7 +1873,7 @@
|
|
|
1873
1873
|
});
|
|
1874
1874
|
}
|
|
1875
1875
|
|
|
1876
|
-
const SummaryRow$1 = /*#__PURE__*/
|
|
1876
|
+
const SummaryRow$1 = /*#__PURE__*/E(SummaryRow);
|
|
1877
1877
|
|
|
1878
1878
|
var css_248z$3 = ".c1tngyp1700-beta12.rdg-cell{padding:0}";
|
|
1879
1879
|
styleInject$1(css_248z$3,{"insertAt":"top"});
|
|
@@ -1889,12 +1889,12 @@
|
|
|
1889
1889
|
}) {
|
|
1890
1890
|
var _column$editorOptions, _column$editorOptions4, _column$editorOptions5;
|
|
1891
1891
|
|
|
1892
|
-
const frameRequestRef =
|
|
1892
|
+
const frameRequestRef = _();
|
|
1893
1893
|
const commitOnOutsideClick = ((_column$editorOptions = column.editorOptions) == null ? void 0 : _column$editorOptions.commitOnOutsideClick) !== false;
|
|
1894
1894
|
const commitOnOutsideMouseDown = useLatestFunc(() => {
|
|
1895
1895
|
onClose(true);
|
|
1896
1896
|
});
|
|
1897
|
-
|
|
1897
|
+
h(() => {
|
|
1898
1898
|
if (!commitOnOutsideClick) return;
|
|
1899
1899
|
|
|
1900
1900
|
function onWindowCaptureMouseDown() {
|
|
@@ -1956,7 +1956,7 @@
|
|
|
1956
1956
|
style: getCellStyle(column, colSpan),
|
|
1957
1957
|
onKeyDown: onKeyDown,
|
|
1958
1958
|
onMouseDownCapture: commitOnOutsideClick ? cancelFrameRequest : undefined,
|
|
1959
|
-
children: column.editor != null && /*#__PURE__*/e(
|
|
1959
|
+
children: column.editor != null && /*#__PURE__*/e(p$1, {
|
|
1960
1960
|
children: [/*#__PURE__*/e(column.editor, {
|
|
1961
1961
|
column: column,
|
|
1962
1962
|
row: row,
|
|
@@ -2142,18 +2142,18 @@
|
|
|
2142
2142
|
const cellNavigationMode = rawCellNavigationMode != null ? rawCellNavigationMode : 'NONE';
|
|
2143
2143
|
(_enableVirtualization = enableVirtualization) != null ? _enableVirtualization : enableVirtualization = true;
|
|
2144
2144
|
(_direction = direction) != null ? _direction : direction = 'ltr';
|
|
2145
|
-
const [scrollTop, setScrollTop] =
|
|
2146
|
-
const [scrollLeft, setScrollLeft] =
|
|
2147
|
-
const [columnWidths, setColumnWidths] =
|
|
2148
|
-
const [selectedPosition, setSelectedPosition] =
|
|
2149
|
-
const [copiedCell, setCopiedCell] =
|
|
2150
|
-
const [isDragging, setDragging] =
|
|
2151
|
-
const [draggedOverRowIdx, setOverRowIdx] =
|
|
2152
|
-
const [autoResizeColumn, setAutoResizeColumn] =
|
|
2153
|
-
const prevSelectedPosition =
|
|
2154
|
-
const latestDraggedOverRowIdx =
|
|
2155
|
-
const lastSelectedRowIdx =
|
|
2156
|
-
const rowRef =
|
|
2145
|
+
const [scrollTop, setScrollTop] = p(0);
|
|
2146
|
+
const [scrollLeft, setScrollLeft] = p(0);
|
|
2147
|
+
const [columnWidths, setColumnWidths] = p(() => new Map());
|
|
2148
|
+
const [selectedPosition, setSelectedPosition] = p(initialPosition);
|
|
2149
|
+
const [copiedCell, setCopiedCell] = p(null);
|
|
2150
|
+
const [isDragging, setDragging] = p(false);
|
|
2151
|
+
const [draggedOverRowIdx, setOverRowIdx] = p(undefined);
|
|
2152
|
+
const [autoResizeColumn, setAutoResizeColumn] = p(null);
|
|
2153
|
+
const prevSelectedPosition = _(selectedPosition);
|
|
2154
|
+
const latestDraggedOverRowIdx = _(draggedOverRowIdx);
|
|
2155
|
+
const lastSelectedRowIdx = _(-1);
|
|
2156
|
+
const rowRef = _(null);
|
|
2157
2157
|
const [gridRef, gridWidth, gridHeight] = useGridDimensions();
|
|
2158
2158
|
const headerRowsCount = 1;
|
|
2159
2159
|
const summaryRowsCount = (_summaryRows$length = summaryRows == null ? void 0 : summaryRows.length) != null ? _summaryRows$length : 0;
|
|
@@ -2163,11 +2163,11 @@
|
|
|
2163
2163
|
const isRtl = direction === 'rtl';
|
|
2164
2164
|
const leftKey = isRtl ? 'ArrowRight' : 'ArrowLeft';
|
|
2165
2165
|
const rightKey = isRtl ? 'ArrowLeft' : 'ArrowRight';
|
|
2166
|
-
const defaultGridComponents =
|
|
2166
|
+
const defaultGridComponents = F$1(() => ({
|
|
2167
2167
|
sortIcon,
|
|
2168
2168
|
checkboxFormatter
|
|
2169
2169
|
}), [sortIcon, checkboxFormatter]);
|
|
2170
|
-
const allRowsSelected =
|
|
2170
|
+
const allRowsSelected = F$1(() => {
|
|
2171
2171
|
const {
|
|
2172
2172
|
length
|
|
2173
2173
|
} = rawRows;
|
|
@@ -2291,7 +2291,7 @@
|
|
|
2291
2291
|
setAutoResizeColumn(null);
|
|
2292
2292
|
onColumnResize == null ? void 0 : onColumnResize(autoResizeColumn.idx, width);
|
|
2293
2293
|
}, [autoResizeColumn, gridRef, onColumnResize]);
|
|
2294
|
-
|
|
2294
|
+
A$1(ref, () => ({
|
|
2295
2295
|
element: gridRef.current,
|
|
2296
2296
|
|
|
2297
2297
|
scrollToColumn(idx) {
|
|
@@ -2313,7 +2313,7 @@
|
|
|
2313
2313
|
|
|
2314
2314
|
selectCell
|
|
2315
2315
|
}));
|
|
2316
|
-
const handleColumnResize =
|
|
2316
|
+
const handleColumnResize = T$1((column, width) => {
|
|
2317
2317
|
if (width === 'auto') {
|
|
2318
2318
|
setAutoResizeColumn(column);
|
|
2319
2319
|
return;
|
|
@@ -2326,7 +2326,7 @@
|
|
|
2326
2326
|
});
|
|
2327
2327
|
onColumnResize == null ? void 0 : onColumnResize(column.idx, width);
|
|
2328
2328
|
}, [onColumnResize]);
|
|
2329
|
-
const setDraggedOverRowIdx =
|
|
2329
|
+
const setDraggedOverRowIdx = T$1(rowIdx => {
|
|
2330
2330
|
setOverRowIdx(rowIdx);
|
|
2331
2331
|
latestDraggedOverRowIdx.current = rowIdx;
|
|
2332
2332
|
}, []);
|
|
@@ -3099,7 +3099,7 @@
|
|
|
3099
3099
|
selectCell: selectHeaderCellLatest,
|
|
3100
3100
|
shouldFocusGrid: !selectedCellIsWithinSelectionBounds,
|
|
3101
3101
|
direction: direction
|
|
3102
|
-
}), rows.length === 0 && noRowsFallback ? noRowsFallback : /*#__PURE__*/e(
|
|
3102
|
+
}), rows.length === 0 && noRowsFallback ? noRowsFallback : /*#__PURE__*/e(p$1, {
|
|
3103
3103
|
children: [/*#__PURE__*/e(RowSelectionChangeProvider, {
|
|
3104
3104
|
value: selectRowLatest,
|
|
3105
3105
|
children: getViewportRows()
|
|
@@ -3131,16 +3131,16 @@
|
|
|
3131
3131
|
return p1.idx === p2.idx && p1.rowIdx === p2.rowIdx;
|
|
3132
3132
|
}
|
|
3133
3133
|
|
|
3134
|
-
const DataGrid$1 = /*#__PURE__*/
|
|
3134
|
+
const DataGrid$1 = /*#__PURE__*/R(DataGrid);
|
|
3135
3135
|
|
|
3136
3136
|
var css_248z$g = ".t16y9g8l700-beta12{appearance:none;background-color:var(--rdg-background-color);block-size:100%;border:2px solid #ccc;box-sizing:border-box;color:var(--rdg-color);font-family:inherit;font-size:var(--rdg-font-size);inline-size:100%;padding-block:0;padding-inline:6px;vertical-align:top}.t16y9g8l700-beta12:focus{border-color:var(--rdg-selection-color);outline:none}.t16y9g8l700-beta12::placeholder{color:#999;opacity:1}";
|
|
3137
3137
|
styleInject$1(css_248z$g,{"insertAt":"top"});
|
|
3138
3138
|
|
|
3139
3139
|
function useData(widget) {
|
|
3140
3140
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3141
|
-
var columns =
|
|
3141
|
+
var columns = F$1(function () { return widget.columns(); }, [widget, widget.dataChecksum()]);
|
|
3142
3142
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3143
|
-
var data =
|
|
3143
|
+
var data = F$1(function () { return widget.data(); }, [widget, widget.dataChecksum()]);
|
|
3144
3144
|
return [columns, data];
|
|
3145
3145
|
}
|
|
3146
3146
|
|
|
@@ -3158,9 +3158,9 @@
|
|
|
3158
3158
|
}
|
|
3159
3159
|
var EmptyRowsRenderer = function (_a) {
|
|
3160
3160
|
var message = _a.message;
|
|
3161
|
-
return
|
|
3161
|
+
return h$1("div", { style: { textAlign: "center", gridColumn: "1/-1" } },
|
|
3162
3162
|
message,
|
|
3163
|
-
|
|
3163
|
+
h$1("span", null, "--- * --- * ---"));
|
|
3164
3164
|
};
|
|
3165
3165
|
var ReactTable = function (_a) {
|
|
3166
3166
|
var table = _a.table, sort = _a.sort;
|
|
@@ -3169,12 +3169,12 @@
|
|
|
3169
3169
|
var columnTypes = table.columnTypes();
|
|
3170
3170
|
var columnPatterns = table.columnPatterns();
|
|
3171
3171
|
var columnFormats = table.columnFormats();
|
|
3172
|
-
var _c =
|
|
3173
|
-
var _d =
|
|
3174
|
-
var _e =
|
|
3175
|
-
var _f =
|
|
3172
|
+
var _c = p([]), listColumns = _c[0], setListColumns = _c[1];
|
|
3173
|
+
var _d = p(), sortColumn = _d[0], setSortColumn = _d[1];
|
|
3174
|
+
var _e = p([]), rows = _e[0], setRows = _e[1];
|
|
3175
|
+
var _f = p(new Set()), selectedRows = _f[0], setSelectedRows = _f[1];
|
|
3176
3176
|
// Columns ---
|
|
3177
|
-
|
|
3177
|
+
h(function () {
|
|
3178
3178
|
setListColumns(__spreadArray(__spreadArray([], multiSelect ? [SelectColumn] : [], true), columns.map(function (column) {
|
|
3179
3179
|
var _a;
|
|
3180
3180
|
var type = (_a = columnTypes[column]) !== null && _a !== void 0 ? _a : "string";
|
|
@@ -3188,7 +3188,7 @@
|
|
|
3188
3188
|
break;
|
|
3189
3189
|
case "number":
|
|
3190
3190
|
formatter = function (props) {
|
|
3191
|
-
return
|
|
3191
|
+
return h$1("div", { style: { textAlign: "right" } }, props.row[props.column.key]);
|
|
3192
3192
|
};
|
|
3193
3193
|
// eslint-disable-next-line no-fallthrough
|
|
3194
3194
|
default:
|
|
@@ -3206,24 +3206,24 @@
|
|
|
3206
3206
|
};
|
|
3207
3207
|
}), true));
|
|
3208
3208
|
}, [columnFormats, columnPatterns, columnTypes, columns, multiSelect]);
|
|
3209
|
-
var onSortColumnsChange =
|
|
3209
|
+
var onSortColumnsChange = T$1(function (sortColumns) {
|
|
3210
3210
|
var futureSortColumn = sortColumns.slice(-1)[0];
|
|
3211
3211
|
var sorted = futureSortColumn !== undefined;
|
|
3212
3212
|
var isSortedDescending = (futureSortColumn === null || futureSortColumn === void 0 ? void 0 : futureSortColumn.direction) === "DESC";
|
|
3213
3213
|
setSortColumn(futureSortColumn);
|
|
3214
3214
|
setRows(copyAndSort(rows, sorted ? futureSortColumn.columnKey : "key", sorted ? isSortedDescending : false));
|
|
3215
3215
|
}, [rows]);
|
|
3216
|
-
var rowKeyGetter =
|
|
3216
|
+
var rowKeyGetter = T$1(function (row) {
|
|
3217
3217
|
return row.key;
|
|
3218
3218
|
}, []);
|
|
3219
|
-
var onSelectedRowsChange =
|
|
3219
|
+
var onSelectedRowsChange = T$1(function (selectedRows) {
|
|
3220
3220
|
setSelectedRows(selectedRows);
|
|
3221
3221
|
}, []);
|
|
3222
|
-
var onRowClick =
|
|
3222
|
+
var onRowClick = T$1(function (row, column) {
|
|
3223
3223
|
table.onRowClickCallback(row, column.key);
|
|
3224
3224
|
}, [table]);
|
|
3225
3225
|
// Rows ---
|
|
3226
|
-
|
|
3226
|
+
h(function () {
|
|
3227
3227
|
var items = data.map(function (row, index) {
|
|
3228
3228
|
var retVal = {
|
|
3229
3229
|
key: index
|
|
@@ -3248,7 +3248,7 @@
|
|
|
3248
3248
|
}
|
|
3249
3249
|
setRows(items);
|
|
3250
3250
|
}, [listColumns, data, sort]);
|
|
3251
|
-
return
|
|
3251
|
+
return h$1(DataGrid$1, { columns: listColumns, headerRowHeight: 24, rows: rows, rowKeyGetter: rowKeyGetter, rowHeight: 20, components: { noRowsFallback: h$1(EmptyRowsRenderer, { message: table.noDataMessage() }) }, className: table.darkMode() ? "rdg-dark" : "rdg-light", sortColumns: sortColumn ? [sortColumn] : [], onSortColumnsChange: onSortColumnsChange, selectedRows: selectedRows, onSelectedRowsChange: multiSelect ? onSelectedRowsChange : undefined, onRowClick: multiSelect ? undefined : onRowClick, "aria-describedby": "", "aria-label": "", "aria-labelledby": "", style: { height: "100%" } });
|
|
3252
3252
|
};
|
|
3253
3253
|
|
|
3254
3254
|
function styleInject(css, ref) {
|
|
@@ -3327,7 +3327,7 @@
|
|
|
3327
3327
|
_super.prototype.update.call(this, domNode, element);
|
|
3328
3328
|
this._div.style("width", this.width() + "px");
|
|
3329
3329
|
this._div.style("height", this.height() + "px");
|
|
3330
|
-
|
|
3330
|
+
z(h$1(ReactTable, { table: this }), this._div.node());
|
|
3331
3331
|
};
|
|
3332
3332
|
Table.prototype.exit = function (domNode, element) {
|
|
3333
3333
|
un(this._div.node());
|