@hpcc-js/dgrid2 2.2.0 → 2.3.1
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.es6.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
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.
|
|
5
|
-
var BUILD_VERSION = "2.
|
|
4
|
+
var PKG_VERSION = "2.3.1";
|
|
5
|
+
var BUILD_VERSION = "2.104.2";
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
/******************************************************************************
|
|
8
8
|
Copyright (c) Microsoft Corporation.
|
|
9
9
|
|
|
10
10
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -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$1,o$2,r$1,f$1
|
|
70
|
+
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;
|
|
71
71
|
|
|
72
|
-
var t,u,
|
|
72
|
+
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});return u.every(function(n){return !n.__N})?!c||c.call(this,n,t,r):!u.every(function(n){if(!n.__N)return !0;var t=n.__[0];return n.__=n.__N,n.__N=void 0,t===n.__[0]})&&(!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}
|
|
73
73
|
|
|
74
|
-
function
|
|
74
|
+
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)}
|
|
75
75
|
|
|
76
76
|
function toVal(mix) {
|
|
77
77
|
var k, y, str='';
|
|
@@ -183,7 +183,7 @@ const checkbox = "cdwjxv8700-beta12";
|
|
|
183
183
|
const checkboxClassname = `rdg-checkbox ${checkbox}`;
|
|
184
184
|
const checkboxLabelDisabled = "cca4mwn700-beta12";
|
|
185
185
|
const checkboxLabelDisabledClassname = `rdg-checkbox-label-disabled ${checkboxLabelDisabled}`;
|
|
186
|
-
const CheckboxFormatter = /*#__PURE__*/
|
|
186
|
+
const CheckboxFormatter = /*#__PURE__*/R(function CheckboxFormatter({
|
|
187
187
|
onChange,
|
|
188
188
|
...props
|
|
189
189
|
}, ref) {
|
|
@@ -205,10 +205,10 @@ const CheckboxFormatter = /*#__PURE__*/x(function CheckboxFormatter({
|
|
|
205
205
|
});
|
|
206
206
|
});
|
|
207
207
|
|
|
208
|
-
const useLayoutEffect = typeof window === 'undefined' ?
|
|
208
|
+
const useLayoutEffect = typeof window === 'undefined' ? h : s;
|
|
209
209
|
|
|
210
210
|
function useFocusRef(isSelected) {
|
|
211
|
-
const ref =
|
|
211
|
+
const ref = _(null);
|
|
212
212
|
useLayoutEffect(() => {
|
|
213
213
|
var _ref$current;
|
|
214
214
|
|
|
@@ -223,10 +223,10 @@ function useFocusRef(isSelected) {
|
|
|
223
223
|
};
|
|
224
224
|
}
|
|
225
225
|
|
|
226
|
-
const DataGridDefaultComponentsContext = /*#__PURE__*/
|
|
226
|
+
const DataGridDefaultComponentsContext = /*#__PURE__*/B(undefined);
|
|
227
227
|
const DataGridDefaultComponentsProvider = DataGridDefaultComponentsContext.Provider;
|
|
228
228
|
function useDefaultComponents() {
|
|
229
|
-
return
|
|
229
|
+
return q$1(DataGridDefaultComponentsContext);
|
|
230
230
|
}
|
|
231
231
|
|
|
232
232
|
function SelectCellFormatter({
|
|
@@ -255,7 +255,7 @@ function SelectCellFormatter({
|
|
|
255
255
|
|
|
256
256
|
function ValueFormatter(props) {
|
|
257
257
|
try {
|
|
258
|
-
return /*#__PURE__*/e(
|
|
258
|
+
return /*#__PURE__*/e(p$1, {
|
|
259
259
|
children: props.row[props.column.key]
|
|
260
260
|
});
|
|
261
261
|
} catch {
|
|
@@ -308,13 +308,13 @@ function ToggleGroupFormatter({
|
|
|
308
308
|
});
|
|
309
309
|
}
|
|
310
310
|
|
|
311
|
-
const RowSelectionContext = /*#__PURE__*/
|
|
311
|
+
const RowSelectionContext = /*#__PURE__*/B(undefined);
|
|
312
312
|
const RowSelectionProvider = RowSelectionContext.Provider;
|
|
313
|
-
const RowSelectionChangeContext = /*#__PURE__*/
|
|
313
|
+
const RowSelectionChangeContext = /*#__PURE__*/B(undefined);
|
|
314
314
|
const RowSelectionChangeProvider = RowSelectionChangeContext.Provider;
|
|
315
315
|
function useRowSelection() {
|
|
316
|
-
const rowSelectionContext =
|
|
317
|
-
const rowSelectionChangeContext =
|
|
316
|
+
const rowSelectionContext = q$1(RowSelectionContext);
|
|
317
|
+
const rowSelectionChangeContext = q$1(RowSelectionChangeContext);
|
|
318
318
|
|
|
319
319
|
if (rowSelectionContext === undefined || rowSelectionChangeContext === undefined) {
|
|
320
320
|
throw new Error('useRowSelection must be used within DataGrid cells');
|
|
@@ -638,7 +638,7 @@ function useCalculatedColumns({
|
|
|
638
638
|
colSpanColumns,
|
|
639
639
|
lastFrozenColumnIndex,
|
|
640
640
|
groupBy
|
|
641
|
-
} =
|
|
641
|
+
} = F$1(() => {
|
|
642
642
|
const groupBy = [];
|
|
643
643
|
let lastFrozenColumnIndex = -1;
|
|
644
644
|
const columns = rawColumns.map(rawColumn => {
|
|
@@ -727,7 +727,7 @@ function useCalculatedColumns({
|
|
|
727
727
|
layoutCssVars,
|
|
728
728
|
totalFrozenColumnWidth,
|
|
729
729
|
columnMetrics
|
|
730
|
-
} =
|
|
730
|
+
} = F$1(() => {
|
|
731
731
|
const columnMetrics = new Map();
|
|
732
732
|
let left = 0;
|
|
733
733
|
let totalFrozenColumnWidth = 0;
|
|
@@ -795,7 +795,7 @@ function useCalculatedColumns({
|
|
|
795
795
|
columnMetrics
|
|
796
796
|
};
|
|
797
797
|
}, [columnWidths, columns, viewportWidth, lastFrozenColumnIndex]);
|
|
798
|
-
const [colOverscanStartIdx, colOverscanEndIdx] =
|
|
798
|
+
const [colOverscanStartIdx, colOverscanEndIdx] = F$1(() => {
|
|
799
799
|
if (!enableVirtualization) {
|
|
800
800
|
return [0, columns.length - 1];
|
|
801
801
|
}
|
|
@@ -876,9 +876,9 @@ function getSpecifiedWidth({
|
|
|
876
876
|
}
|
|
877
877
|
|
|
878
878
|
function useGridDimensions() {
|
|
879
|
-
const gridRef =
|
|
880
|
-
const [inlineSize, setInlineSize] =
|
|
881
|
-
const [blockSize, setBlockSize] =
|
|
879
|
+
const gridRef = _(null);
|
|
880
|
+
const [inlineSize, setInlineSize] = p(1);
|
|
881
|
+
const [blockSize, setBlockSize] = p(1);
|
|
882
882
|
useLayoutEffect(() => {
|
|
883
883
|
const {
|
|
884
884
|
ResizeObserver
|
|
@@ -916,23 +916,23 @@ function handleDevicePixelRatio(size) {
|
|
|
916
916
|
}
|
|
917
917
|
|
|
918
918
|
function useLatestFunc(fn) {
|
|
919
|
-
const ref =
|
|
920
|
-
|
|
919
|
+
const ref = _(fn);
|
|
920
|
+
h(() => {
|
|
921
921
|
ref.current = fn;
|
|
922
922
|
});
|
|
923
|
-
return
|
|
923
|
+
return T$1((...args) => {
|
|
924
924
|
ref.current(...args);
|
|
925
925
|
}, []);
|
|
926
926
|
}
|
|
927
927
|
|
|
928
928
|
function useRovingCellRef(isSelected) {
|
|
929
|
-
const [isChildFocused, setIsChildFocused] =
|
|
929
|
+
const [isChildFocused, setIsChildFocused] = p(false);
|
|
930
930
|
|
|
931
931
|
if (isChildFocused && !isSelected) {
|
|
932
932
|
setIsChildFocused(false);
|
|
933
933
|
}
|
|
934
934
|
|
|
935
|
-
const ref =
|
|
935
|
+
const ref = T$1(cell => {
|
|
936
936
|
if (cell === null || cell.contains(document.activeElement)) return;
|
|
937
937
|
cell.focus({
|
|
938
938
|
preventScroll: true
|
|
@@ -965,7 +965,7 @@ function useViewportColumns({
|
|
|
965
965
|
rowOverscanEndIdx,
|
|
966
966
|
isGroupRow
|
|
967
967
|
}) {
|
|
968
|
-
const startIdx =
|
|
968
|
+
const startIdx = F$1(() => {
|
|
969
969
|
if (colOverscanStartIdx === 0) return 0;
|
|
970
970
|
let startIdx = colOverscanStartIdx;
|
|
971
971
|
|
|
@@ -1014,7 +1014,7 @@ function useViewportColumns({
|
|
|
1014
1014
|
|
|
1015
1015
|
return startIdx;
|
|
1016
1016
|
}, [rowOverscanStartIdx, rowOverscanEndIdx, rows, summaryRows, colOverscanStartIdx, lastFrozenColumnIndex, colSpanColumns, isGroupRow]);
|
|
1017
|
-
return
|
|
1017
|
+
return F$1(() => {
|
|
1018
1018
|
const viewportColumns = [];
|
|
1019
1019
|
|
|
1020
1020
|
for (let colIdx = 0; colIdx <= colOverscanEndIdx; colIdx++) {
|
|
@@ -1041,7 +1041,7 @@ function useViewportRows({
|
|
|
1041
1041
|
expandedGroupIds,
|
|
1042
1042
|
enableVirtualization
|
|
1043
1043
|
}) {
|
|
1044
|
-
const [groupedRows, rowsCount] =
|
|
1044
|
+
const [groupedRows, rowsCount] = F$1(() => {
|
|
1045
1045
|
if (groupBy.length === 0 || rowGrouper == null) return [undefined, rawRows.length];
|
|
1046
1046
|
|
|
1047
1047
|
const groupRows = (rows, [groupByKey, ...remainingGroupByKeys], startRowIndex) => {
|
|
@@ -1063,7 +1063,7 @@ function useViewportRows({
|
|
|
1063
1063
|
|
|
1064
1064
|
return groupRows(rawRows, groupBy, 0);
|
|
1065
1065
|
}, [groupBy, rowGrouper, rawRows]);
|
|
1066
|
-
const [rows, isGroupRow] =
|
|
1066
|
+
const [rows, isGroupRow] = F$1(() => {
|
|
1067
1067
|
const allGroupRows = new Set();
|
|
1068
1068
|
if (!groupedRows) return [rawRows, isGroupRow];
|
|
1069
1069
|
const flattenedRows = [];
|
|
@@ -1117,7 +1117,7 @@ function useViewportRows({
|
|
|
1117
1117
|
getRowTop,
|
|
1118
1118
|
getRowHeight,
|
|
1119
1119
|
findRowIdx
|
|
1120
|
-
} =
|
|
1120
|
+
} = F$1(() => {
|
|
1121
1121
|
if (typeof rowHeight === 'number') {
|
|
1122
1122
|
return {
|
|
1123
1123
|
totalRowHeight: rowHeight * rows.length,
|
|
@@ -1219,7 +1219,7 @@ function HeaderRenderer({
|
|
|
1219
1219
|
onSort,
|
|
1220
1220
|
isCellSelected
|
|
1221
1221
|
}) {
|
|
1222
|
-
if (!column.sortable) return /*#__PURE__*/e(
|
|
1222
|
+
if (!column.sortable) return /*#__PURE__*/e(p$1, {
|
|
1223
1223
|
children: column.name
|
|
1224
1224
|
});
|
|
1225
1225
|
return /*#__PURE__*/e(SortableHeaderCell, {
|
|
@@ -1495,7 +1495,7 @@ function HeaderRow({
|
|
|
1495
1495
|
});
|
|
1496
1496
|
}
|
|
1497
1497
|
|
|
1498
|
-
const HeaderRow$1 = /*#__PURE__*/
|
|
1498
|
+
const HeaderRow$1 = /*#__PURE__*/E(HeaderRow);
|
|
1499
1499
|
|
|
1500
1500
|
var css_248z$7 = ".c1bmg16t700-beta12,.ccpfvsn700-beta12{background-color:#ccf}.c1bmg16t700-beta12.ccpfvsn700-beta12{background-color:#99f}";
|
|
1501
1501
|
styleInject$1(css_248z$7,{"insertAt":"top"});
|
|
@@ -1564,7 +1564,7 @@ function Cell({
|
|
|
1564
1564
|
onContextMenu: handleContextMenu,
|
|
1565
1565
|
onFocus: onFocus,
|
|
1566
1566
|
...props,
|
|
1567
|
-
children: !column.rowGroup && /*#__PURE__*/e(
|
|
1567
|
+
children: !column.rowGroup && /*#__PURE__*/e(p$1, {
|
|
1568
1568
|
children: [/*#__PURE__*/e(column.formatter, {
|
|
1569
1569
|
column: column,
|
|
1570
1570
|
row: row,
|
|
@@ -1575,7 +1575,7 @@ function Cell({
|
|
|
1575
1575
|
});
|
|
1576
1576
|
}
|
|
1577
1577
|
|
|
1578
|
-
const Cell$1 = /*#__PURE__*/
|
|
1578
|
+
const Cell$1 = /*#__PURE__*/E(Cell);
|
|
1579
1579
|
|
|
1580
1580
|
function Row({
|
|
1581
1581
|
className,
|
|
@@ -1661,7 +1661,7 @@ function Row({
|
|
|
1661
1661
|
});
|
|
1662
1662
|
}
|
|
1663
1663
|
|
|
1664
|
-
const Row$1 = /*#__PURE__*/
|
|
1664
|
+
const Row$1 = /*#__PURE__*/E( /*#__PURE__*/R(Row));
|
|
1665
1665
|
|
|
1666
1666
|
function GroupCell({
|
|
1667
1667
|
id,
|
|
@@ -1709,7 +1709,7 @@ function GroupCell({
|
|
|
1709
1709
|
}, column.key);
|
|
1710
1710
|
}
|
|
1711
1711
|
|
|
1712
|
-
const GroupCell$1 = /*#__PURE__*/
|
|
1712
|
+
const GroupCell$1 = /*#__PURE__*/E(GroupCell);
|
|
1713
1713
|
|
|
1714
1714
|
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}";
|
|
1715
1715
|
styleInject$1(css_248z$6,{"insertAt":"top"});
|
|
@@ -1765,7 +1765,7 @@ function GroupedRow({
|
|
|
1765
1765
|
});
|
|
1766
1766
|
}
|
|
1767
1767
|
|
|
1768
|
-
const GroupRowRenderer = /*#__PURE__*/
|
|
1768
|
+
const GroupRowRenderer = /*#__PURE__*/E(GroupedRow);
|
|
1769
1769
|
|
|
1770
1770
|
var css_248z$5 = ".s1n3hxke700-beta12{inset-block-end:var(--rdg-summary-row-bottom);inset-block-start:var(--rdg-summary-row-top)}";
|
|
1771
1771
|
styleInject$1(css_248z$5,{"insertAt":"top"});
|
|
@@ -1813,7 +1813,7 @@ function SummaryCell({
|
|
|
1813
1813
|
});
|
|
1814
1814
|
}
|
|
1815
1815
|
|
|
1816
|
-
const SummaryCell$1 = /*#__PURE__*/
|
|
1816
|
+
const SummaryCell$1 = /*#__PURE__*/E(SummaryCell);
|
|
1817
1817
|
|
|
1818
1818
|
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)}";
|
|
1819
1819
|
styleInject$1(css_248z$4,{"insertAt":"top"});
|
|
@@ -1869,7 +1869,7 @@ function SummaryRow({
|
|
|
1869
1869
|
});
|
|
1870
1870
|
}
|
|
1871
1871
|
|
|
1872
|
-
const SummaryRow$1 = /*#__PURE__*/
|
|
1872
|
+
const SummaryRow$1 = /*#__PURE__*/E(SummaryRow);
|
|
1873
1873
|
|
|
1874
1874
|
var css_248z$3 = ".c1tngyp1700-beta12.rdg-cell{padding:0}";
|
|
1875
1875
|
styleInject$1(css_248z$3,{"insertAt":"top"});
|
|
@@ -1885,12 +1885,12 @@ function EditCell({
|
|
|
1885
1885
|
}) {
|
|
1886
1886
|
var _column$editorOptions, _column$editorOptions4, _column$editorOptions5;
|
|
1887
1887
|
|
|
1888
|
-
const frameRequestRef =
|
|
1888
|
+
const frameRequestRef = _();
|
|
1889
1889
|
const commitOnOutsideClick = ((_column$editorOptions = column.editorOptions) == null ? void 0 : _column$editorOptions.commitOnOutsideClick) !== false;
|
|
1890
1890
|
const commitOnOutsideMouseDown = useLatestFunc(() => {
|
|
1891
1891
|
onClose(true);
|
|
1892
1892
|
});
|
|
1893
|
-
|
|
1893
|
+
h(() => {
|
|
1894
1894
|
if (!commitOnOutsideClick) return;
|
|
1895
1895
|
|
|
1896
1896
|
function onWindowCaptureMouseDown() {
|
|
@@ -1952,7 +1952,7 @@ function EditCell({
|
|
|
1952
1952
|
style: getCellStyle(column, colSpan),
|
|
1953
1953
|
onKeyDown: onKeyDown,
|
|
1954
1954
|
onMouseDownCapture: commitOnOutsideClick ? cancelFrameRequest : undefined,
|
|
1955
|
-
children: column.editor != null && /*#__PURE__*/e(
|
|
1955
|
+
children: column.editor != null && /*#__PURE__*/e(p$1, {
|
|
1956
1956
|
children: [/*#__PURE__*/e(column.editor, {
|
|
1957
1957
|
column: column,
|
|
1958
1958
|
row: row,
|
|
@@ -2138,18 +2138,18 @@ function DataGrid({
|
|
|
2138
2138
|
const cellNavigationMode = rawCellNavigationMode != null ? rawCellNavigationMode : 'NONE';
|
|
2139
2139
|
(_enableVirtualization = enableVirtualization) != null ? _enableVirtualization : enableVirtualization = true;
|
|
2140
2140
|
(_direction = direction) != null ? _direction : direction = 'ltr';
|
|
2141
|
-
const [scrollTop, setScrollTop] =
|
|
2142
|
-
const [scrollLeft, setScrollLeft] =
|
|
2143
|
-
const [columnWidths, setColumnWidths] =
|
|
2144
|
-
const [selectedPosition, setSelectedPosition] =
|
|
2145
|
-
const [copiedCell, setCopiedCell] =
|
|
2146
|
-
const [isDragging, setDragging] =
|
|
2147
|
-
const [draggedOverRowIdx, setOverRowIdx] =
|
|
2148
|
-
const [autoResizeColumn, setAutoResizeColumn] =
|
|
2149
|
-
const prevSelectedPosition =
|
|
2150
|
-
const latestDraggedOverRowIdx =
|
|
2151
|
-
const lastSelectedRowIdx =
|
|
2152
|
-
const rowRef =
|
|
2141
|
+
const [scrollTop, setScrollTop] = p(0);
|
|
2142
|
+
const [scrollLeft, setScrollLeft] = p(0);
|
|
2143
|
+
const [columnWidths, setColumnWidths] = p(() => new Map());
|
|
2144
|
+
const [selectedPosition, setSelectedPosition] = p(initialPosition);
|
|
2145
|
+
const [copiedCell, setCopiedCell] = p(null);
|
|
2146
|
+
const [isDragging, setDragging] = p(false);
|
|
2147
|
+
const [draggedOverRowIdx, setOverRowIdx] = p(undefined);
|
|
2148
|
+
const [autoResizeColumn, setAutoResizeColumn] = p(null);
|
|
2149
|
+
const prevSelectedPosition = _(selectedPosition);
|
|
2150
|
+
const latestDraggedOverRowIdx = _(draggedOverRowIdx);
|
|
2151
|
+
const lastSelectedRowIdx = _(-1);
|
|
2152
|
+
const rowRef = _(null);
|
|
2153
2153
|
const [gridRef, gridWidth, gridHeight] = useGridDimensions();
|
|
2154
2154
|
const headerRowsCount = 1;
|
|
2155
2155
|
const summaryRowsCount = (_summaryRows$length = summaryRows == null ? void 0 : summaryRows.length) != null ? _summaryRows$length : 0;
|
|
@@ -2159,11 +2159,11 @@ function DataGrid({
|
|
|
2159
2159
|
const isRtl = direction === 'rtl';
|
|
2160
2160
|
const leftKey = isRtl ? 'ArrowRight' : 'ArrowLeft';
|
|
2161
2161
|
const rightKey = isRtl ? 'ArrowLeft' : 'ArrowRight';
|
|
2162
|
-
const defaultGridComponents =
|
|
2162
|
+
const defaultGridComponents = F$1(() => ({
|
|
2163
2163
|
sortIcon,
|
|
2164
2164
|
checkboxFormatter
|
|
2165
2165
|
}), [sortIcon, checkboxFormatter]);
|
|
2166
|
-
const allRowsSelected =
|
|
2166
|
+
const allRowsSelected = F$1(() => {
|
|
2167
2167
|
const {
|
|
2168
2168
|
length
|
|
2169
2169
|
} = rawRows;
|
|
@@ -2287,7 +2287,7 @@ function DataGrid({
|
|
|
2287
2287
|
setAutoResizeColumn(null);
|
|
2288
2288
|
onColumnResize == null ? void 0 : onColumnResize(autoResizeColumn.idx, width);
|
|
2289
2289
|
}, [autoResizeColumn, gridRef, onColumnResize]);
|
|
2290
|
-
|
|
2290
|
+
A$1(ref, () => ({
|
|
2291
2291
|
element: gridRef.current,
|
|
2292
2292
|
|
|
2293
2293
|
scrollToColumn(idx) {
|
|
@@ -2309,7 +2309,7 @@ function DataGrid({
|
|
|
2309
2309
|
|
|
2310
2310
|
selectCell
|
|
2311
2311
|
}));
|
|
2312
|
-
const handleColumnResize =
|
|
2312
|
+
const handleColumnResize = T$1((column, width) => {
|
|
2313
2313
|
if (width === 'auto') {
|
|
2314
2314
|
setAutoResizeColumn(column);
|
|
2315
2315
|
return;
|
|
@@ -2322,7 +2322,7 @@ function DataGrid({
|
|
|
2322
2322
|
});
|
|
2323
2323
|
onColumnResize == null ? void 0 : onColumnResize(column.idx, width);
|
|
2324
2324
|
}, [onColumnResize]);
|
|
2325
|
-
const setDraggedOverRowIdx =
|
|
2325
|
+
const setDraggedOverRowIdx = T$1(rowIdx => {
|
|
2326
2326
|
setOverRowIdx(rowIdx);
|
|
2327
2327
|
latestDraggedOverRowIdx.current = rowIdx;
|
|
2328
2328
|
}, []);
|
|
@@ -3095,7 +3095,7 @@ function DataGrid({
|
|
|
3095
3095
|
selectCell: selectHeaderCellLatest,
|
|
3096
3096
|
shouldFocusGrid: !selectedCellIsWithinSelectionBounds,
|
|
3097
3097
|
direction: direction
|
|
3098
|
-
}), rows.length === 0 && noRowsFallback ? noRowsFallback : /*#__PURE__*/e(
|
|
3098
|
+
}), rows.length === 0 && noRowsFallback ? noRowsFallback : /*#__PURE__*/e(p$1, {
|
|
3099
3099
|
children: [/*#__PURE__*/e(RowSelectionChangeProvider, {
|
|
3100
3100
|
value: selectRowLatest,
|
|
3101
3101
|
children: getViewportRows()
|
|
@@ -3127,16 +3127,16 @@ function isSamePosition(p1, p2) {
|
|
|
3127
3127
|
return p1.idx === p2.idx && p1.rowIdx === p2.rowIdx;
|
|
3128
3128
|
}
|
|
3129
3129
|
|
|
3130
|
-
const DataGrid$1 = /*#__PURE__*/
|
|
3130
|
+
const DataGrid$1 = /*#__PURE__*/R(DataGrid);
|
|
3131
3131
|
|
|
3132
3132
|
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}";
|
|
3133
3133
|
styleInject$1(css_248z$g,{"insertAt":"top"});
|
|
3134
3134
|
|
|
3135
3135
|
function useData(widget) {
|
|
3136
3136
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3137
|
-
var columns =
|
|
3137
|
+
var columns = F$1(function () { return widget.columns(); }, [widget, widget.dataChecksum()]);
|
|
3138
3138
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3139
|
-
var data =
|
|
3139
|
+
var data = F$1(function () { return widget.data(); }, [widget, widget.dataChecksum()]);
|
|
3140
3140
|
return [columns, data];
|
|
3141
3141
|
}
|
|
3142
3142
|
|
|
@@ -3154,9 +3154,9 @@ function copyAndSort(items, attribute, descending) {
|
|
|
3154
3154
|
}
|
|
3155
3155
|
var EmptyRowsRenderer = function (_a) {
|
|
3156
3156
|
var message = _a.message;
|
|
3157
|
-
return
|
|
3157
|
+
return h$1("div", { style: { textAlign: "center", gridColumn: "1/-1" } },
|
|
3158
3158
|
message,
|
|
3159
|
-
|
|
3159
|
+
h$1("span", null, "--- * --- * ---"));
|
|
3160
3160
|
};
|
|
3161
3161
|
var ReactTable = function (_a) {
|
|
3162
3162
|
var table = _a.table, sort = _a.sort;
|
|
@@ -3165,12 +3165,12 @@ var ReactTable = function (_a) {
|
|
|
3165
3165
|
var columnTypes = table.columnTypes();
|
|
3166
3166
|
var columnPatterns = table.columnPatterns();
|
|
3167
3167
|
var columnFormats = table.columnFormats();
|
|
3168
|
-
var _c =
|
|
3169
|
-
var _d =
|
|
3170
|
-
var _e =
|
|
3171
|
-
var _f =
|
|
3168
|
+
var _c = p([]), listColumns = _c[0], setListColumns = _c[1];
|
|
3169
|
+
var _d = p(), sortColumn = _d[0], setSortColumn = _d[1];
|
|
3170
|
+
var _e = p([]), rows = _e[0], setRows = _e[1];
|
|
3171
|
+
var _f = p(new Set()), selectedRows = _f[0], setSelectedRows = _f[1];
|
|
3172
3172
|
// Columns ---
|
|
3173
|
-
|
|
3173
|
+
h(function () {
|
|
3174
3174
|
setListColumns(__spreadArray(__spreadArray([], multiSelect ? [SelectColumn] : [], true), columns.map(function (column) {
|
|
3175
3175
|
var _a;
|
|
3176
3176
|
var type = (_a = columnTypes[column]) !== null && _a !== void 0 ? _a : "string";
|
|
@@ -3184,7 +3184,7 @@ var ReactTable = function (_a) {
|
|
|
3184
3184
|
break;
|
|
3185
3185
|
case "number":
|
|
3186
3186
|
formatter = function (props) {
|
|
3187
|
-
return
|
|
3187
|
+
return h$1("div", { style: { textAlign: "right" } }, props.row[props.column.key]);
|
|
3188
3188
|
};
|
|
3189
3189
|
// eslint-disable-next-line no-fallthrough
|
|
3190
3190
|
default:
|
|
@@ -3202,24 +3202,24 @@ var ReactTable = function (_a) {
|
|
|
3202
3202
|
};
|
|
3203
3203
|
}), true));
|
|
3204
3204
|
}, [columnFormats, columnPatterns, columnTypes, columns, multiSelect]);
|
|
3205
|
-
var onSortColumnsChange =
|
|
3205
|
+
var onSortColumnsChange = T$1(function (sortColumns) {
|
|
3206
3206
|
var futureSortColumn = sortColumns.slice(-1)[0];
|
|
3207
3207
|
var sorted = futureSortColumn !== undefined;
|
|
3208
3208
|
var isSortedDescending = (futureSortColumn === null || futureSortColumn === void 0 ? void 0 : futureSortColumn.direction) === "DESC";
|
|
3209
3209
|
setSortColumn(futureSortColumn);
|
|
3210
3210
|
setRows(copyAndSort(rows, sorted ? futureSortColumn.columnKey : "key", sorted ? isSortedDescending : false));
|
|
3211
3211
|
}, [rows]);
|
|
3212
|
-
var rowKeyGetter =
|
|
3212
|
+
var rowKeyGetter = T$1(function (row) {
|
|
3213
3213
|
return row.key;
|
|
3214
3214
|
}, []);
|
|
3215
|
-
var onSelectedRowsChange =
|
|
3215
|
+
var onSelectedRowsChange = T$1(function (selectedRows) {
|
|
3216
3216
|
setSelectedRows(selectedRows);
|
|
3217
3217
|
}, []);
|
|
3218
|
-
var onRowClick =
|
|
3218
|
+
var onRowClick = T$1(function (row, column) {
|
|
3219
3219
|
table.onRowClickCallback(row, column.key);
|
|
3220
3220
|
}, [table]);
|
|
3221
3221
|
// Rows ---
|
|
3222
|
-
|
|
3222
|
+
h(function () {
|
|
3223
3223
|
var items = data.map(function (row, index) {
|
|
3224
3224
|
var retVal = {
|
|
3225
3225
|
key: index
|
|
@@ -3244,7 +3244,7 @@ var ReactTable = function (_a) {
|
|
|
3244
3244
|
}
|
|
3245
3245
|
setRows(items);
|
|
3246
3246
|
}, [listColumns, data, sort]);
|
|
3247
|
-
return
|
|
3247
|
+
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%" } });
|
|
3248
3248
|
};
|
|
3249
3249
|
|
|
3250
3250
|
function styleInject(css, ref) {
|
|
@@ -3323,7 +3323,7 @@ var Table = /** @class */ (function (_super) {
|
|
|
3323
3323
|
_super.prototype.update.call(this, domNode, element);
|
|
3324
3324
|
this._div.style("width", this.width() + "px");
|
|
3325
3325
|
this._div.style("height", this.height() + "px");
|
|
3326
|
-
|
|
3326
|
+
z(h$1(ReactTable, { table: this }), this._div.node());
|
|
3327
3327
|
};
|
|
3328
3328
|
Table.prototype.exit = function (domNode, element) {
|
|
3329
3329
|
un(this._div.node());
|