@hpcc-js/dgrid2 2.3.2 → 2.3.3
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 +129 -168
- package/dist/index.es6.js.map +1 -1
- package/dist/index.js +129 -168
- 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 +3 -3
- 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,8 +5,8 @@
|
|
|
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.3";
|
|
9
|
+
var BUILD_VERSION = "2.104.7";
|
|
10
10
|
|
|
11
11
|
/******************************************************************************
|
|
12
12
|
Copyright (c) Microsoft Corporation.
|
|
@@ -71,54 +71,15 @@
|
|
|
71
71
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
var n,l$1,u$1,t
|
|
75
|
-
|
|
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
|
-
|
|
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
|
-
|
|
80
|
-
function toVal(mix) {
|
|
81
|
-
var k, y, str='';
|
|
82
|
-
|
|
83
|
-
if (typeof mix === 'string' || typeof mix === 'number') {
|
|
84
|
-
str += mix;
|
|
85
|
-
} else if (typeof mix === 'object') {
|
|
86
|
-
if (Array.isArray(mix)) {
|
|
87
|
-
for (k=0; k < mix.length; k++) {
|
|
88
|
-
if (mix[k]) {
|
|
89
|
-
if (y = toVal(mix[k])) {
|
|
90
|
-
str && (str += ' ');
|
|
91
|
-
str += y;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
} else {
|
|
96
|
-
for (k in mix) {
|
|
97
|
-
if (mix[k]) {
|
|
98
|
-
str && (str += ' ');
|
|
99
|
-
str += k;
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
return str;
|
|
106
|
-
}
|
|
74
|
+
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]&&("function"==typeof u.type&&null!=x[h].__e&&x[h].__e==u.__d&&(u.__d=_$2(i,h+1)),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$2(n,l){return l=l||[],null==n||"boolean"==typeof n||(Array.isArray(n)?n.some(function(n){x$2(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$2(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||"a"===l[0]&&"r"===l[1])?n.setAttribute(l,u):n.removeAttribute(l));}}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=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$2(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,"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);},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.__h.push(l),b(this));},d$1.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),b(this));},d$1.prototype.render=p$1,t=[],g$2.__r=0,r$2=0;
|
|
107
75
|
|
|
108
|
-
function
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
str && (str += ' ');
|
|
114
|
-
str += x;
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
return str;
|
|
119
|
-
}
|
|
76
|
+
var r$1,u,i,o$1,f=0,c=[],e=[],a=l$1.__b,v=l$1.__r,l=l$1.diffed,m=l$1.__c,d=l$1.unmount;function p(t,r){l$1.__h&&l$1.__h(u,t,f||r),f=0;var i=u.__H||(u.__H={__:[],__h:[]});return t>=i.__.length&&i.__.push({__V:e}),i.__[t]}function y(n){return f=1,h(C$1,n)}function h(n,t,i){var o=p(r$1++,2);if(o.t=n,!o.__c&&(o.__=[i?i(t):C$1(void 0,t),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=u,!u.u)){u.u=!0;var f=u.shouldComponentUpdate;u.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&&(!f||f.call(this,n,t,r))};}return o.__N||o.__}function s(t,i){var o=p(r$1++,3);!l$1.__s&&B$1(o.__H,i)&&(o.__=t,o.i=i,u.__H.__h.push(o));}function _$1(t,i){var o=p(r$1++,4);!l$1.__s&&B$1(o.__H,i)&&(o.__=t,o.i=i,u.__h.push(o));}function A(n){return f=5,T$1(function(){return {current:n}},[])}function F(n,t,r){f=6,_$1(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 T$1(n,t){var u=p(r$1++,7);return B$1(u.__H,t)?(u.__V=n(),u.i=t,u.__h=n,u.__V):u.__}function q$1(n,t){return f=8,T$1(function(){return n},t)}function x$1(n){var t=u.context[n.__c],i=p(r$1++,9);return i.c=n,t?(null==i.__&&(i.__=!0,t.sub(u)),t.props.value):n.__}function g$1(){for(var t;t=c.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(w$1),t.__H.__h.forEach(z$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.o||n.type===p$1?n.o||(n.o=n.__&&n.__.o?n.__.o:""):n.o=(n.__&&n.__.o?n.__.o:"")+(n.__&&n.__.__k?n.__.__k.indexOf(n):0),u=null,a&&a(n);},l$1.__r=function(n){v&&v(n),r$1=0;var t=(u=n.__c).__H;t&&(i===u?(t.__h=[],u.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=e,n.__N=n.i=void 0;})):(t.__h.forEach(w$1),t.__h.forEach(z$1),t.__h=[])),i=u;},l$1.diffed=function(t){l&&l(t);var r=t.__c;r&&r.__H&&(r.__H.__h.length&&(1!==c.push(r)&&o$1===l$1.requestAnimationFrame||((o$1=l$1.requestAnimationFrame)||k)(g$1)),r.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==e&&(n.__=n.__V),n.i=void 0,n.__V=e;})),i=u=null;},l$1.__c=function(t,r){r.some(function(t){try{t.__h.forEach(w$1),t.__h=t.__h.filter(function(n){return !n.__||z$1(n)});}catch(u){r.some(function(n){n.__h&&(n.__h=[]);}),r=[],l$1.__e(u,t.__v);}}),m&&m(t,r);},l$1.unmount=function(t){d&&d(t);var r,u=t.__c;u&&u.__H&&(u.__H.__.forEach(function(n){try{w$1(n);}catch(n){r=n;}}),u.__H=void 0,r&&l$1.__e(r,u.__v));};var j$1="function"==typeof requestAnimationFrame;function k(n){var t,r=function(){clearTimeout(u),j$1&&cancelAnimationFrame(t),setTimeout(n);},u=setTimeout(r,100);j$1&&(t=requestAnimationFrame(r));}function w$1(n){var t=u,r=n.__c;"function"==typeof r&&(n.__c=void 0,r()),u=t;}function z$1(n){var t=u;n.__c=n.__(),u=t;}function B$1(n,t){return !n||n.length!==t.length||t.some(function(t,r){return t!==n[r]})}function C$1(n,t){return "function"==typeof t?t(n):t}
|
|
77
|
+
|
|
78
|
+
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$2(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$2(e.children).forEach(function(n){n.props.selected=-1!=u.value.indexOf(n.props.value);})),"select"==t&&null!=u.defaultValue&&(u.value=x$2(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)}
|
|
79
|
+
|
|
80
|
+
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}
|
|
120
81
|
|
|
121
|
-
var
|
|
82
|
+
var _=0;function o(o,e,n,t,f){var l,s,u={};for(s in e)"ref"==s?l=e[s]:u[s]=e[s];var a={type:o,props:u,key:n,ref:l,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--_,__source:f,__self:t};if("function"==typeof o&&(l=o.defaultProps))for(s in l)void 0===u[s]&&(u[s]=l[s]);return l$1.vnode&&l$1.vnode(a),a}
|
|
122
83
|
|
|
123
84
|
function styleInject$1(css, ref) {
|
|
124
85
|
if ( ref === void 0 ) ref = {};
|
|
@@ -187,7 +148,7 @@
|
|
|
187
148
|
const checkboxClassname = `rdg-checkbox ${checkbox}`;
|
|
188
149
|
const checkboxLabelDisabled = "cca4mwn700-beta12";
|
|
189
150
|
const checkboxLabelDisabledClassname = `rdg-checkbox-label-disabled ${checkboxLabelDisabled}`;
|
|
190
|
-
const CheckboxFormatter = /*#__PURE__*/
|
|
151
|
+
const CheckboxFormatter = /*#__PURE__*/N(function CheckboxFormatter({
|
|
191
152
|
onChange,
|
|
192
153
|
...props
|
|
193
154
|
}, ref) {
|
|
@@ -195,24 +156,24 @@
|
|
|
195
156
|
onChange(e.target.checked, e.nativeEvent.shiftKey);
|
|
196
157
|
}
|
|
197
158
|
|
|
198
|
-
return /*#__PURE__*/
|
|
159
|
+
return /*#__PURE__*/o("label", {
|
|
199
160
|
className: clsx(checkboxLabelClassname, props.disabled && checkboxLabelDisabledClassname),
|
|
200
|
-
children: [/*#__PURE__*/
|
|
161
|
+
children: [/*#__PURE__*/o("input", {
|
|
201
162
|
type: "checkbox",
|
|
202
163
|
ref: ref,
|
|
203
164
|
...props,
|
|
204
165
|
className: checkboxInputClassname,
|
|
205
166
|
onChange: handleChange
|
|
206
|
-
}), /*#__PURE__*/
|
|
167
|
+
}), /*#__PURE__*/o("div", {
|
|
207
168
|
className: checkboxClassname
|
|
208
169
|
})]
|
|
209
170
|
});
|
|
210
171
|
});
|
|
211
172
|
|
|
212
|
-
const useLayoutEffect = typeof window === 'undefined' ?
|
|
173
|
+
const useLayoutEffect = typeof window === 'undefined' ? s : _$1;
|
|
213
174
|
|
|
214
175
|
function useFocusRef(isSelected) {
|
|
215
|
-
const ref =
|
|
176
|
+
const ref = A(null);
|
|
216
177
|
useLayoutEffect(() => {
|
|
217
178
|
var _ref$current;
|
|
218
179
|
|
|
@@ -227,10 +188,10 @@
|
|
|
227
188
|
};
|
|
228
189
|
}
|
|
229
190
|
|
|
230
|
-
const DataGridDefaultComponentsContext = /*#__PURE__*/B(undefined);
|
|
191
|
+
const DataGridDefaultComponentsContext = /*#__PURE__*/B$2(undefined);
|
|
231
192
|
const DataGridDefaultComponentsProvider = DataGridDefaultComponentsContext.Provider;
|
|
232
193
|
function useDefaultComponents() {
|
|
233
|
-
return
|
|
194
|
+
return x$1(DataGridDefaultComponentsContext);
|
|
234
195
|
}
|
|
235
196
|
|
|
236
197
|
function SelectCellFormatter({
|
|
@@ -246,7 +207,7 @@
|
|
|
246
207
|
tabIndex
|
|
247
208
|
} = useFocusRef(isCellSelected);
|
|
248
209
|
const Formatter = useDefaultComponents().checkboxFormatter;
|
|
249
|
-
return /*#__PURE__*/
|
|
210
|
+
return /*#__PURE__*/o(Formatter, {
|
|
250
211
|
"aria-label": ariaLabel,
|
|
251
212
|
"aria-labelledby": ariaLabelledBy,
|
|
252
213
|
ref: ref,
|
|
@@ -259,7 +220,7 @@
|
|
|
259
220
|
|
|
260
221
|
function ValueFormatter(props) {
|
|
261
222
|
try {
|
|
262
|
-
return /*#__PURE__*/
|
|
223
|
+
return /*#__PURE__*/o(p$1, {
|
|
263
224
|
children: props.row[props.column.key]
|
|
264
225
|
});
|
|
265
226
|
} catch {
|
|
@@ -294,31 +255,31 @@
|
|
|
294
255
|
}
|
|
295
256
|
|
|
296
257
|
const d = isExpanded ? 'M1 1 L 7 7 L 13 1' : 'M1 7 L 7 1 L 13 7';
|
|
297
|
-
return /*#__PURE__*/
|
|
258
|
+
return /*#__PURE__*/o("span", {
|
|
298
259
|
ref: ref,
|
|
299
260
|
className: groupCellContentClassname,
|
|
300
261
|
tabIndex: tabIndex,
|
|
301
262
|
onKeyDown: handleKeyDown,
|
|
302
|
-
children: [groupKey, /*#__PURE__*/
|
|
263
|
+
children: [groupKey, /*#__PURE__*/o("svg", {
|
|
303
264
|
viewBox: "0 0 14 8",
|
|
304
265
|
width: "14",
|
|
305
266
|
height: "8",
|
|
306
267
|
className: caretClassname,
|
|
307
268
|
"aria-hidden": true,
|
|
308
|
-
children: /*#__PURE__*/
|
|
269
|
+
children: /*#__PURE__*/o("path", {
|
|
309
270
|
d: d
|
|
310
271
|
})
|
|
311
272
|
})]
|
|
312
273
|
});
|
|
313
274
|
}
|
|
314
275
|
|
|
315
|
-
const RowSelectionContext = /*#__PURE__*/B(undefined);
|
|
276
|
+
const RowSelectionContext = /*#__PURE__*/B$2(undefined);
|
|
316
277
|
const RowSelectionProvider = RowSelectionContext.Provider;
|
|
317
|
-
const RowSelectionChangeContext = /*#__PURE__*/B(undefined);
|
|
278
|
+
const RowSelectionChangeContext = /*#__PURE__*/B$2(undefined);
|
|
318
279
|
const RowSelectionChangeProvider = RowSelectionChangeContext.Provider;
|
|
319
280
|
function useRowSelection() {
|
|
320
|
-
const rowSelectionContext =
|
|
321
|
-
const rowSelectionChangeContext =
|
|
281
|
+
const rowSelectionContext = x$1(RowSelectionContext);
|
|
282
|
+
const rowSelectionChangeContext = x$1(RowSelectionChangeContext);
|
|
322
283
|
|
|
323
284
|
if (rowSelectionContext === undefined || rowSelectionChangeContext === undefined) {
|
|
324
285
|
throw new Error('useRowSelection must be used within DataGrid cells');
|
|
@@ -331,7 +292,7 @@
|
|
|
331
292
|
|
|
332
293
|
function SelectFormatter(props) {
|
|
333
294
|
const [isRowSelected, onRowSelectionChange] = useRowSelection();
|
|
334
|
-
return /*#__PURE__*/
|
|
295
|
+
return /*#__PURE__*/o(SelectCellFormatter, {
|
|
335
296
|
"aria-label": "Select",
|
|
336
297
|
isCellSelected: props.isCellSelected,
|
|
337
298
|
value: isRowSelected,
|
|
@@ -347,7 +308,7 @@
|
|
|
347
308
|
|
|
348
309
|
function SelectGroupFormatter(props) {
|
|
349
310
|
const [isRowSelected, onRowSelectionChange] = useRowSelection();
|
|
350
|
-
return /*#__PURE__*/
|
|
311
|
+
return /*#__PURE__*/o(SelectCellFormatter, {
|
|
351
312
|
"aria-label": "Select Group",
|
|
352
313
|
isCellSelected: props.isCellSelected,
|
|
353
314
|
value: isRowSelected,
|
|
@@ -372,7 +333,7 @@
|
|
|
372
333
|
frozen: true,
|
|
373
334
|
|
|
374
335
|
headerRenderer(props) {
|
|
375
|
-
return /*#__PURE__*/
|
|
336
|
+
return /*#__PURE__*/o(SelectCellFormatter, {
|
|
376
337
|
"aria-label": "Select All",
|
|
377
338
|
isCellSelected: props.isCellSelected,
|
|
378
339
|
value: props.allRowsSelected,
|
|
@@ -642,7 +603,7 @@
|
|
|
642
603
|
colSpanColumns,
|
|
643
604
|
lastFrozenColumnIndex,
|
|
644
605
|
groupBy
|
|
645
|
-
} =
|
|
606
|
+
} = T$1(() => {
|
|
646
607
|
const groupBy = [];
|
|
647
608
|
let lastFrozenColumnIndex = -1;
|
|
648
609
|
const columns = rawColumns.map(rawColumn => {
|
|
@@ -731,7 +692,7 @@
|
|
|
731
692
|
layoutCssVars,
|
|
732
693
|
totalFrozenColumnWidth,
|
|
733
694
|
columnMetrics
|
|
734
|
-
} =
|
|
695
|
+
} = T$1(() => {
|
|
735
696
|
const columnMetrics = new Map();
|
|
736
697
|
let left = 0;
|
|
737
698
|
let totalFrozenColumnWidth = 0;
|
|
@@ -799,7 +760,7 @@
|
|
|
799
760
|
columnMetrics
|
|
800
761
|
};
|
|
801
762
|
}, [columnWidths, columns, viewportWidth, lastFrozenColumnIndex]);
|
|
802
|
-
const [colOverscanStartIdx, colOverscanEndIdx] =
|
|
763
|
+
const [colOverscanStartIdx, colOverscanEndIdx] = T$1(() => {
|
|
803
764
|
if (!enableVirtualization) {
|
|
804
765
|
return [0, columns.length - 1];
|
|
805
766
|
}
|
|
@@ -880,9 +841,9 @@
|
|
|
880
841
|
}
|
|
881
842
|
|
|
882
843
|
function useGridDimensions() {
|
|
883
|
-
const gridRef =
|
|
884
|
-
const [inlineSize, setInlineSize] =
|
|
885
|
-
const [blockSize, setBlockSize] =
|
|
844
|
+
const gridRef = A(null);
|
|
845
|
+
const [inlineSize, setInlineSize] = y(1);
|
|
846
|
+
const [blockSize, setBlockSize] = y(1);
|
|
886
847
|
useLayoutEffect(() => {
|
|
887
848
|
const {
|
|
888
849
|
ResizeObserver
|
|
@@ -920,23 +881,23 @@
|
|
|
920
881
|
}
|
|
921
882
|
|
|
922
883
|
function useLatestFunc(fn) {
|
|
923
|
-
const ref =
|
|
924
|
-
|
|
884
|
+
const ref = A(fn);
|
|
885
|
+
s(() => {
|
|
925
886
|
ref.current = fn;
|
|
926
887
|
});
|
|
927
|
-
return
|
|
888
|
+
return q$1((...args) => {
|
|
928
889
|
ref.current(...args);
|
|
929
890
|
}, []);
|
|
930
891
|
}
|
|
931
892
|
|
|
932
893
|
function useRovingCellRef(isSelected) {
|
|
933
|
-
const [isChildFocused, setIsChildFocused] =
|
|
894
|
+
const [isChildFocused, setIsChildFocused] = y(false);
|
|
934
895
|
|
|
935
896
|
if (isChildFocused && !isSelected) {
|
|
936
897
|
setIsChildFocused(false);
|
|
937
898
|
}
|
|
938
899
|
|
|
939
|
-
const ref =
|
|
900
|
+
const ref = q$1(cell => {
|
|
940
901
|
if (cell === null || cell.contains(document.activeElement)) return;
|
|
941
902
|
cell.focus({
|
|
942
903
|
preventScroll: true
|
|
@@ -969,7 +930,7 @@
|
|
|
969
930
|
rowOverscanEndIdx,
|
|
970
931
|
isGroupRow
|
|
971
932
|
}) {
|
|
972
|
-
const startIdx =
|
|
933
|
+
const startIdx = T$1(() => {
|
|
973
934
|
if (colOverscanStartIdx === 0) return 0;
|
|
974
935
|
let startIdx = colOverscanStartIdx;
|
|
975
936
|
|
|
@@ -1018,7 +979,7 @@
|
|
|
1018
979
|
|
|
1019
980
|
return startIdx;
|
|
1020
981
|
}, [rowOverscanStartIdx, rowOverscanEndIdx, rows, summaryRows, colOverscanStartIdx, lastFrozenColumnIndex, colSpanColumns, isGroupRow]);
|
|
1021
|
-
return
|
|
982
|
+
return T$1(() => {
|
|
1022
983
|
const viewportColumns = [];
|
|
1023
984
|
|
|
1024
985
|
for (let colIdx = 0; colIdx <= colOverscanEndIdx; colIdx++) {
|
|
@@ -1045,7 +1006,7 @@
|
|
|
1045
1006
|
expandedGroupIds,
|
|
1046
1007
|
enableVirtualization
|
|
1047
1008
|
}) {
|
|
1048
|
-
const [groupedRows, rowsCount] =
|
|
1009
|
+
const [groupedRows, rowsCount] = T$1(() => {
|
|
1049
1010
|
if (groupBy.length === 0 || rowGrouper == null) return [undefined, rawRows.length];
|
|
1050
1011
|
|
|
1051
1012
|
const groupRows = (rows, [groupByKey, ...remainingGroupByKeys], startRowIndex) => {
|
|
@@ -1067,7 +1028,7 @@
|
|
|
1067
1028
|
|
|
1068
1029
|
return groupRows(rawRows, groupBy, 0);
|
|
1069
1030
|
}, [groupBy, rowGrouper, rawRows]);
|
|
1070
|
-
const [rows, isGroupRow] =
|
|
1031
|
+
const [rows, isGroupRow] = T$1(() => {
|
|
1071
1032
|
const allGroupRows = new Set();
|
|
1072
1033
|
if (!groupedRows) return [rawRows, isGroupRow];
|
|
1073
1034
|
const flattenedRows = [];
|
|
@@ -1121,7 +1082,7 @@
|
|
|
1121
1082
|
getRowTop,
|
|
1122
1083
|
getRowHeight,
|
|
1123
1084
|
findRowIdx
|
|
1124
|
-
} =
|
|
1085
|
+
} = T$1(() => {
|
|
1125
1086
|
if (typeof rowHeight === 'number') {
|
|
1126
1087
|
return {
|
|
1127
1088
|
totalRowHeight: rowHeight * rows.length,
|
|
@@ -1223,10 +1184,10 @@
|
|
|
1223
1184
|
onSort,
|
|
1224
1185
|
isCellSelected
|
|
1225
1186
|
}) {
|
|
1226
|
-
if (!column.sortable) return /*#__PURE__*/
|
|
1187
|
+
if (!column.sortable) return /*#__PURE__*/o(p$1, {
|
|
1227
1188
|
children: column.name
|
|
1228
1189
|
});
|
|
1229
|
-
return /*#__PURE__*/
|
|
1190
|
+
return /*#__PURE__*/o(SortableHeaderCell, {
|
|
1230
1191
|
onSort: onSort,
|
|
1231
1192
|
sortDirection: sortDirection,
|
|
1232
1193
|
priority: priority,
|
|
@@ -1259,17 +1220,17 @@
|
|
|
1259
1220
|
onSort(event.ctrlKey || event.metaKey);
|
|
1260
1221
|
}
|
|
1261
1222
|
|
|
1262
|
-
return /*#__PURE__*/
|
|
1223
|
+
return /*#__PURE__*/o("span", {
|
|
1263
1224
|
ref: ref,
|
|
1264
1225
|
tabIndex: tabIndex,
|
|
1265
1226
|
className: headerSortCellClassname,
|
|
1266
1227
|
onClick: handleClick,
|
|
1267
1228
|
onKeyDown: handleKeyDown,
|
|
1268
|
-
children: [/*#__PURE__*/
|
|
1229
|
+
children: [/*#__PURE__*/o("span", {
|
|
1269
1230
|
className: headerSortNameClassname,
|
|
1270
1231
|
children: children
|
|
1271
|
-
}), /*#__PURE__*/
|
|
1272
|
-
children: [/*#__PURE__*/
|
|
1232
|
+
}), /*#__PURE__*/o("span", {
|
|
1233
|
+
children: [/*#__PURE__*/o(SortIcon, {
|
|
1273
1234
|
sortDirection: sortDirection
|
|
1274
1235
|
}), priority]
|
|
1275
1236
|
})]
|
|
@@ -1415,7 +1376,7 @@
|
|
|
1415
1376
|
}
|
|
1416
1377
|
}
|
|
1417
1378
|
|
|
1418
|
-
return /*#__PURE__*/
|
|
1379
|
+
return /*#__PURE__*/o("div", {
|
|
1419
1380
|
role: "columnheader",
|
|
1420
1381
|
"aria-colindex": column.idx + 1,
|
|
1421
1382
|
"aria-selected": isCellSelected,
|
|
@@ -1432,7 +1393,7 @@
|
|
|
1432
1393
|
onClick: onClick,
|
|
1433
1394
|
onDoubleClick: column.resizable ? onDoubleClick : undefined,
|
|
1434
1395
|
onPointerDown: column.resizable ? onPointerDown : undefined,
|
|
1435
|
-
children: /*#__PURE__*/
|
|
1396
|
+
children: /*#__PURE__*/o(HeaderRenderer$1, {
|
|
1436
1397
|
column: column,
|
|
1437
1398
|
sortDirection: sortDirection,
|
|
1438
1399
|
priority: priority,
|
|
@@ -1475,7 +1436,7 @@
|
|
|
1475
1436
|
index += colSpan - 1;
|
|
1476
1437
|
}
|
|
1477
1438
|
|
|
1478
|
-
cells.push( /*#__PURE__*/
|
|
1439
|
+
cells.push( /*#__PURE__*/o(HeaderCell, {
|
|
1479
1440
|
column: column,
|
|
1480
1441
|
colSpan: colSpan,
|
|
1481
1442
|
isCellSelected: selectedCellIdx === column.idx,
|
|
@@ -1490,7 +1451,7 @@
|
|
|
1490
1451
|
}, column.key));
|
|
1491
1452
|
}
|
|
1492
1453
|
|
|
1493
|
-
return /*#__PURE__*/
|
|
1454
|
+
return /*#__PURE__*/o("div", {
|
|
1494
1455
|
role: "row",
|
|
1495
1456
|
"aria-rowindex": 1,
|
|
1496
1457
|
className: clsx(headerRowClassname, selectedCellIdx === -1 && rowSelectedClassname),
|
|
@@ -1499,7 +1460,7 @@
|
|
|
1499
1460
|
});
|
|
1500
1461
|
}
|
|
1501
1462
|
|
|
1502
|
-
const HeaderRow$1 = /*#__PURE__*/
|
|
1463
|
+
const HeaderRow$1 = /*#__PURE__*/w(HeaderRow);
|
|
1503
1464
|
|
|
1504
1465
|
var css_248z$7 = ".c1bmg16t700-beta12,.ccpfvsn700-beta12{background-color:#ccf}.c1bmg16t700-beta12.ccpfvsn700-beta12{background-color:#99f}";
|
|
1505
1466
|
styleInject$1(css_248z$7,{"insertAt":"top"});
|
|
@@ -1553,7 +1514,7 @@
|
|
|
1553
1514
|
onRowDoubleClick == null ? void 0 : onRowDoubleClick(row, column);
|
|
1554
1515
|
}
|
|
1555
1516
|
|
|
1556
|
-
return /*#__PURE__*/
|
|
1517
|
+
return /*#__PURE__*/o("div", {
|
|
1557
1518
|
role: "gridcell",
|
|
1558
1519
|
"aria-colindex": column.idx + 1,
|
|
1559
1520
|
"aria-selected": isCellSelected,
|
|
@@ -1568,8 +1529,8 @@
|
|
|
1568
1529
|
onContextMenu: handleContextMenu,
|
|
1569
1530
|
onFocus: onFocus,
|
|
1570
1531
|
...props,
|
|
1571
|
-
children: !column.rowGroup && /*#__PURE__*/
|
|
1572
|
-
children: [/*#__PURE__*/
|
|
1532
|
+
children: !column.rowGroup && /*#__PURE__*/o(p$1, {
|
|
1533
|
+
children: [/*#__PURE__*/o(column.formatter, {
|
|
1573
1534
|
column: column,
|
|
1574
1535
|
row: row,
|
|
1575
1536
|
isCellSelected: isCellSelected,
|
|
@@ -1579,7 +1540,7 @@
|
|
|
1579
1540
|
});
|
|
1580
1541
|
}
|
|
1581
1542
|
|
|
1582
|
-
const Cell$1 = /*#__PURE__*/
|
|
1543
|
+
const Cell$1 = /*#__PURE__*/w(Cell);
|
|
1583
1544
|
|
|
1584
1545
|
function Row({
|
|
1585
1546
|
className,
|
|
@@ -1635,7 +1596,7 @@
|
|
|
1635
1596
|
if (isCellSelected && selectedCellEditor) {
|
|
1636
1597
|
cells.push(selectedCellEditor);
|
|
1637
1598
|
} else {
|
|
1638
|
-
cells.push( /*#__PURE__*/
|
|
1599
|
+
cells.push( /*#__PURE__*/o(Cell$1, {
|
|
1639
1600
|
column: column,
|
|
1640
1601
|
colSpan: colSpan,
|
|
1641
1602
|
row: row,
|
|
@@ -1651,9 +1612,9 @@
|
|
|
1651
1612
|
}
|
|
1652
1613
|
}
|
|
1653
1614
|
|
|
1654
|
-
return /*#__PURE__*/
|
|
1615
|
+
return /*#__PURE__*/o(RowSelectionProvider, {
|
|
1655
1616
|
value: isRowSelected,
|
|
1656
|
-
children: /*#__PURE__*/
|
|
1617
|
+
children: /*#__PURE__*/o("div", {
|
|
1657
1618
|
role: "row",
|
|
1658
1619
|
ref: ref,
|
|
1659
1620
|
className: className,
|
|
@@ -1665,7 +1626,7 @@
|
|
|
1665
1626
|
});
|
|
1666
1627
|
}
|
|
1667
1628
|
|
|
1668
|
-
const Row$1 = /*#__PURE__*/
|
|
1629
|
+
const Row$1 = /*#__PURE__*/w( /*#__PURE__*/N(Row));
|
|
1669
1630
|
|
|
1670
1631
|
function GroupCell({
|
|
1671
1632
|
id,
|
|
@@ -1689,7 +1650,7 @@
|
|
|
1689
1650
|
}
|
|
1690
1651
|
|
|
1691
1652
|
const isLevelMatching = column.rowGroup && groupColumnIndex === column.idx;
|
|
1692
|
-
return /*#__PURE__*/
|
|
1653
|
+
return /*#__PURE__*/o("div", {
|
|
1693
1654
|
role: "gridcell",
|
|
1694
1655
|
"aria-colindex": column.idx + 1,
|
|
1695
1656
|
"aria-selected": isCellSelected,
|
|
@@ -1701,7 +1662,7 @@
|
|
|
1701
1662
|
},
|
|
1702
1663
|
onClick: isLevelMatching ? toggleGroup : undefined,
|
|
1703
1664
|
onFocus: onFocus,
|
|
1704
|
-
children: (!column.rowGroup || groupColumnIndex === column.idx) && column.groupFormatter && /*#__PURE__*/
|
|
1665
|
+
children: (!column.rowGroup || groupColumnIndex === column.idx) && column.groupFormatter && /*#__PURE__*/o(column.groupFormatter, {
|
|
1705
1666
|
groupKey: groupKey,
|
|
1706
1667
|
childRows: childRows,
|
|
1707
1668
|
column: column,
|
|
@@ -1713,7 +1674,7 @@
|
|
|
1713
1674
|
}, column.key);
|
|
1714
1675
|
}
|
|
1715
1676
|
|
|
1716
|
-
const GroupCell$1 = /*#__PURE__*/
|
|
1677
|
+
const GroupCell$1 = /*#__PURE__*/w(GroupCell);
|
|
1717
1678
|
|
|
1718
1679
|
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
1680
|
styleInject$1(css_248z$6,{"insertAt":"top"});
|
|
@@ -1744,9 +1705,9 @@
|
|
|
1744
1705
|
selectGroup(rowIdx);
|
|
1745
1706
|
}
|
|
1746
1707
|
|
|
1747
|
-
return /*#__PURE__*/
|
|
1708
|
+
return /*#__PURE__*/o(RowSelectionProvider, {
|
|
1748
1709
|
value: isRowSelected,
|
|
1749
|
-
children: /*#__PURE__*/
|
|
1710
|
+
children: /*#__PURE__*/o("div", {
|
|
1750
1711
|
role: "row",
|
|
1751
1712
|
"aria-level": level,
|
|
1752
1713
|
"aria-expanded": isExpanded,
|
|
@@ -1754,7 +1715,7 @@
|
|
|
1754
1715
|
onClick: handleSelectGroup,
|
|
1755
1716
|
style: getRowStyle(gridRowStart, height),
|
|
1756
1717
|
...props,
|
|
1757
|
-
children: viewportColumns.map(column => /*#__PURE__*/
|
|
1718
|
+
children: viewportColumns.map(column => /*#__PURE__*/o(GroupCell$1, {
|
|
1758
1719
|
id: id,
|
|
1759
1720
|
groupKey: groupKey,
|
|
1760
1721
|
childRows: childRows,
|
|
@@ -1769,7 +1730,7 @@
|
|
|
1769
1730
|
});
|
|
1770
1731
|
}
|
|
1771
1732
|
|
|
1772
|
-
const GroupRowRenderer = /*#__PURE__*/
|
|
1733
|
+
const GroupRowRenderer = /*#__PURE__*/w(GroupedRow);
|
|
1773
1734
|
|
|
1774
1735
|
var css_248z$5 = ".s1n3hxke700-beta12{inset-block-end:var(--rdg-summary-row-bottom);inset-block-start:var(--rdg-summary-row-top)}";
|
|
1775
1736
|
styleInject$1(css_248z$5,{"insertAt":"top"});
|
|
@@ -1798,7 +1759,7 @@
|
|
|
1798
1759
|
selectCell(row, column);
|
|
1799
1760
|
}
|
|
1800
1761
|
|
|
1801
|
-
return /*#__PURE__*/
|
|
1762
|
+
return /*#__PURE__*/o("div", {
|
|
1802
1763
|
role: "gridcell",
|
|
1803
1764
|
"aria-colindex": column.idx + 1,
|
|
1804
1765
|
"aria-colspan": colSpan,
|
|
@@ -1809,7 +1770,7 @@
|
|
|
1809
1770
|
style: getCellStyle(column, colSpan),
|
|
1810
1771
|
onClick: onClick,
|
|
1811
1772
|
onFocus: onFocus,
|
|
1812
|
-
children: SummaryFormatter && /*#__PURE__*/
|
|
1773
|
+
children: SummaryFormatter && /*#__PURE__*/o(SummaryFormatter, {
|
|
1813
1774
|
column: column,
|
|
1814
1775
|
row: row,
|
|
1815
1776
|
isCellSelected: isCellSelected
|
|
@@ -1817,7 +1778,7 @@
|
|
|
1817
1778
|
});
|
|
1818
1779
|
}
|
|
1819
1780
|
|
|
1820
|
-
const SummaryCell$1 = /*#__PURE__*/
|
|
1781
|
+
const SummaryCell$1 = /*#__PURE__*/w(SummaryCell);
|
|
1821
1782
|
|
|
1822
1783
|
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
1784
|
styleInject$1(css_248z$4,{"insertAt":"top"});
|
|
@@ -1852,7 +1813,7 @@
|
|
|
1852
1813
|
}
|
|
1853
1814
|
|
|
1854
1815
|
const isCellSelected = selectedCellIdx === column.idx;
|
|
1855
|
-
cells.push( /*#__PURE__*/
|
|
1816
|
+
cells.push( /*#__PURE__*/o(SummaryCell$1, {
|
|
1856
1817
|
column: column,
|
|
1857
1818
|
colSpan: colSpan,
|
|
1858
1819
|
row: row,
|
|
@@ -1861,7 +1822,7 @@
|
|
|
1861
1822
|
}, column.key));
|
|
1862
1823
|
}
|
|
1863
1824
|
|
|
1864
|
-
return /*#__PURE__*/
|
|
1825
|
+
return /*#__PURE__*/o("div", {
|
|
1865
1826
|
role: "row",
|
|
1866
1827
|
"aria-rowindex": ariaRowIndex,
|
|
1867
1828
|
className: clsx(rowClassname, `rdg-row-${rowIdx % 2 === 0 ? 'even' : 'odd'}`, summaryRowClassname, rowIdx === 0 && summaryRowBorderClassname, selectedCellIdx === -1 && rowSelectedClassname),
|
|
@@ -1873,7 +1834,7 @@
|
|
|
1873
1834
|
});
|
|
1874
1835
|
}
|
|
1875
1836
|
|
|
1876
|
-
const SummaryRow$1 = /*#__PURE__*/
|
|
1837
|
+
const SummaryRow$1 = /*#__PURE__*/w(SummaryRow);
|
|
1877
1838
|
|
|
1878
1839
|
var css_248z$3 = ".c1tngyp1700-beta12.rdg-cell{padding:0}";
|
|
1879
1840
|
styleInject$1(css_248z$3,{"insertAt":"top"});
|
|
@@ -1889,12 +1850,12 @@
|
|
|
1889
1850
|
}) {
|
|
1890
1851
|
var _column$editorOptions, _column$editorOptions4, _column$editorOptions5;
|
|
1891
1852
|
|
|
1892
|
-
const frameRequestRef =
|
|
1853
|
+
const frameRequestRef = A();
|
|
1893
1854
|
const commitOnOutsideClick = ((_column$editorOptions = column.editorOptions) == null ? void 0 : _column$editorOptions.commitOnOutsideClick) !== false;
|
|
1894
1855
|
const commitOnOutsideMouseDown = useLatestFunc(() => {
|
|
1895
1856
|
onClose(true);
|
|
1896
1857
|
});
|
|
1897
|
-
|
|
1858
|
+
s(() => {
|
|
1898
1859
|
if (!commitOnOutsideClick) return;
|
|
1899
1860
|
|
|
1900
1861
|
function onWindowCaptureMouseDown() {
|
|
@@ -1947,7 +1908,7 @@
|
|
|
1947
1908
|
cellClass
|
|
1948
1909
|
} = column;
|
|
1949
1910
|
const className = getCellClassname(column, 'rdg-editor-container', typeof cellClass === 'function' ? cellClass(row) : cellClass, !((_column$editorOptions4 = column.editorOptions) != null && _column$editorOptions4.renderFormatter) && cellEditing);
|
|
1950
|
-
return /*#__PURE__*/
|
|
1911
|
+
return /*#__PURE__*/o("div", {
|
|
1951
1912
|
role: "gridcell",
|
|
1952
1913
|
"aria-colindex": column.idx + 1,
|
|
1953
1914
|
"aria-colspan": colSpan,
|
|
@@ -1956,13 +1917,13 @@
|
|
|
1956
1917
|
style: getCellStyle(column, colSpan),
|
|
1957
1918
|
onKeyDown: onKeyDown,
|
|
1958
1919
|
onMouseDownCapture: commitOnOutsideClick ? cancelFrameRequest : undefined,
|
|
1959
|
-
children: column.editor != null && /*#__PURE__*/
|
|
1960
|
-
children: [/*#__PURE__*/
|
|
1920
|
+
children: column.editor != null && /*#__PURE__*/o(p$1, {
|
|
1921
|
+
children: [/*#__PURE__*/o(column.editor, {
|
|
1961
1922
|
column: column,
|
|
1962
1923
|
row: row,
|
|
1963
1924
|
onRowChange: onRowChange,
|
|
1964
1925
|
onClose: onClose
|
|
1965
|
-
}), ((_column$editorOptions5 = column.editorOptions) == null ? void 0 : _column$editorOptions5.renderFormatter) && /*#__PURE__*/
|
|
1926
|
+
}), ((_column$editorOptions5 = column.editorOptions) == null ? void 0 : _column$editorOptions5.renderFormatter) && /*#__PURE__*/o(column.formatter, {
|
|
1966
1927
|
column: column,
|
|
1967
1928
|
row: row,
|
|
1968
1929
|
isCellSelected: true,
|
|
@@ -2059,7 +2020,7 @@
|
|
|
2059
2020
|
}
|
|
2060
2021
|
}
|
|
2061
2022
|
|
|
2062
|
-
return /*#__PURE__*/
|
|
2023
|
+
return /*#__PURE__*/o("div", {
|
|
2063
2024
|
className: cellDragHandleClassname,
|
|
2064
2025
|
onMouseDown: handleMouseDown,
|
|
2065
2026
|
onDoubleClick: handleDoubleClick
|
|
@@ -2074,13 +2035,13 @@
|
|
|
2074
2035
|
function SortIcon({
|
|
2075
2036
|
sortDirection
|
|
2076
2037
|
}) {
|
|
2077
|
-
return sortDirection !== undefined ? /*#__PURE__*/
|
|
2038
|
+
return sortDirection !== undefined ? /*#__PURE__*/o("svg", {
|
|
2078
2039
|
viewBox: "0 0 12 8",
|
|
2079
2040
|
width: "12",
|
|
2080
2041
|
height: "8",
|
|
2081
2042
|
className: arrowClassname,
|
|
2082
2043
|
"aria-hidden": true,
|
|
2083
|
-
children: /*#__PURE__*/
|
|
2044
|
+
children: /*#__PURE__*/o("path", {
|
|
2084
2045
|
d: sortDirection === 'ASC' ? 'M0 8 6 0 12 8' : 'M0 0 6 8 12 0'
|
|
2085
2046
|
})
|
|
2086
2047
|
}) : null;
|
|
@@ -2142,18 +2103,18 @@
|
|
|
2142
2103
|
const cellNavigationMode = rawCellNavigationMode != null ? rawCellNavigationMode : 'NONE';
|
|
2143
2104
|
(_enableVirtualization = enableVirtualization) != null ? _enableVirtualization : enableVirtualization = true;
|
|
2144
2105
|
(_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 =
|
|
2106
|
+
const [scrollTop, setScrollTop] = y(0);
|
|
2107
|
+
const [scrollLeft, setScrollLeft] = y(0);
|
|
2108
|
+
const [columnWidths, setColumnWidths] = y(() => new Map());
|
|
2109
|
+
const [selectedPosition, setSelectedPosition] = y(initialPosition);
|
|
2110
|
+
const [copiedCell, setCopiedCell] = y(null);
|
|
2111
|
+
const [isDragging, setDragging] = y(false);
|
|
2112
|
+
const [draggedOverRowIdx, setOverRowIdx] = y(undefined);
|
|
2113
|
+
const [autoResizeColumn, setAutoResizeColumn] = y(null);
|
|
2114
|
+
const prevSelectedPosition = A(selectedPosition);
|
|
2115
|
+
const latestDraggedOverRowIdx = A(draggedOverRowIdx);
|
|
2116
|
+
const lastSelectedRowIdx = A(-1);
|
|
2117
|
+
const rowRef = A(null);
|
|
2157
2118
|
const [gridRef, gridWidth, gridHeight] = useGridDimensions();
|
|
2158
2119
|
const headerRowsCount = 1;
|
|
2159
2120
|
const summaryRowsCount = (_summaryRows$length = summaryRows == null ? void 0 : summaryRows.length) != null ? _summaryRows$length : 0;
|
|
@@ -2163,11 +2124,11 @@
|
|
|
2163
2124
|
const isRtl = direction === 'rtl';
|
|
2164
2125
|
const leftKey = isRtl ? 'ArrowRight' : 'ArrowLeft';
|
|
2165
2126
|
const rightKey = isRtl ? 'ArrowLeft' : 'ArrowRight';
|
|
2166
|
-
const defaultGridComponents =
|
|
2127
|
+
const defaultGridComponents = T$1(() => ({
|
|
2167
2128
|
sortIcon,
|
|
2168
2129
|
checkboxFormatter
|
|
2169
2130
|
}), [sortIcon, checkboxFormatter]);
|
|
2170
|
-
const allRowsSelected =
|
|
2131
|
+
const allRowsSelected = T$1(() => {
|
|
2171
2132
|
const {
|
|
2172
2133
|
length
|
|
2173
2134
|
} = rawRows;
|
|
@@ -2291,7 +2252,7 @@
|
|
|
2291
2252
|
setAutoResizeColumn(null);
|
|
2292
2253
|
onColumnResize == null ? void 0 : onColumnResize(autoResizeColumn.idx, width);
|
|
2293
2254
|
}, [autoResizeColumn, gridRef, onColumnResize]);
|
|
2294
|
-
|
|
2255
|
+
F(ref, () => ({
|
|
2295
2256
|
element: gridRef.current,
|
|
2296
2257
|
|
|
2297
2258
|
scrollToColumn(idx) {
|
|
@@ -2313,7 +2274,7 @@
|
|
|
2313
2274
|
|
|
2314
2275
|
selectCell
|
|
2315
2276
|
}));
|
|
2316
|
-
const handleColumnResize =
|
|
2277
|
+
const handleColumnResize = q$1((column, width) => {
|
|
2317
2278
|
if (width === 'auto') {
|
|
2318
2279
|
setAutoResizeColumn(column);
|
|
2319
2280
|
return;
|
|
@@ -2326,7 +2287,7 @@
|
|
|
2326
2287
|
});
|
|
2327
2288
|
onColumnResize == null ? void 0 : onColumnResize(column.idx, width);
|
|
2328
2289
|
}, [onColumnResize]);
|
|
2329
|
-
const setDraggedOverRowIdx =
|
|
2290
|
+
const setDraggedOverRowIdx = q$1(rowIdx => {
|
|
2330
2291
|
setOverRowIdx(rowIdx);
|
|
2331
2292
|
latestDraggedOverRowIdx.current = rowIdx;
|
|
2332
2293
|
}, []);
|
|
@@ -2871,7 +2832,7 @@
|
|
|
2871
2832
|
return;
|
|
2872
2833
|
}
|
|
2873
2834
|
|
|
2874
|
-
return /*#__PURE__*/
|
|
2835
|
+
return /*#__PURE__*/o(DragHandle, {
|
|
2875
2836
|
rows: rawRows,
|
|
2876
2837
|
columns: columns,
|
|
2877
2838
|
selectedPosition: selectedPosition,
|
|
@@ -2922,7 +2883,7 @@
|
|
|
2922
2883
|
closeEditor();
|
|
2923
2884
|
}
|
|
2924
2885
|
|
|
2925
|
-
return /*#__PURE__*/
|
|
2886
|
+
return /*#__PURE__*/o(EditCell, {
|
|
2926
2887
|
column: column,
|
|
2927
2888
|
colSpan: colSpan,
|
|
2928
2889
|
row: row,
|
|
@@ -2976,7 +2937,7 @@
|
|
|
2976
2937
|
startRowIndex
|
|
2977
2938
|
} = row);
|
|
2978
2939
|
const isGroupRowSelected = isSelectable && row.childRows.every(cr => selectedRows.has(rowKeyGetter(cr)));
|
|
2979
|
-
rowElements.push( /*#__PURE__*/
|
|
2940
|
+
rowElements.push( /*#__PURE__*/o(GroupRowRenderer, {
|
|
2980
2941
|
"aria-level": row.level + 1,
|
|
2981
2942
|
"aria-setsize": row.setSize,
|
|
2982
2943
|
"aria-posinset": row.posInSet + 1,
|
|
@@ -3013,7 +2974,7 @@
|
|
|
3013
2974
|
key = hasGroups ? startRowIndex : rowIdx;
|
|
3014
2975
|
}
|
|
3015
2976
|
|
|
3016
|
-
rowElements.push( /*#__PURE__*/
|
|
2977
|
+
rowElements.push( /*#__PURE__*/o(RowRenderer, {
|
|
3017
2978
|
"aria-rowindex": headerRowsCount + (hasGroups ? startRowIndex : rowIdx) + 1,
|
|
3018
2979
|
"aria-selected": isSelectable ? isRowSelected : undefined,
|
|
3019
2980
|
rowIdx: rowIdx,
|
|
@@ -3056,7 +3017,7 @@
|
|
|
3056
3017
|
}
|
|
3057
3018
|
|
|
3058
3019
|
const isGroupRowFocused = selectedPosition.idx === -1 && selectedPosition.rowIdx !== -2;
|
|
3059
|
-
return /*#__PURE__*/
|
|
3020
|
+
return /*#__PURE__*/o("div", {
|
|
3060
3021
|
role: hasGroups ? 'treegrid' : 'grid',
|
|
3061
3022
|
"aria-label": ariaLabel,
|
|
3062
3023
|
"aria-labelledby": ariaLabelledBy,
|
|
@@ -3077,7 +3038,7 @@
|
|
|
3077
3038
|
onScroll: handleScroll,
|
|
3078
3039
|
onKeyDown: handleKeyDown,
|
|
3079
3040
|
"data-testid": testId,
|
|
3080
|
-
children: [hasGroups && /*#__PURE__*/
|
|
3041
|
+
children: [hasGroups && /*#__PURE__*/o("div", {
|
|
3081
3042
|
ref: rowRef,
|
|
3082
3043
|
tabIndex: isGroupRowFocused ? 0 : -1,
|
|
3083
3044
|
className: clsx(focusSinkClassname, isGroupRowFocused && [rowSelected, lastFrozenColumnIndex !== -1 && rowSelectedWithFrozenCell]),
|
|
@@ -3085,9 +3046,9 @@
|
|
|
3085
3046
|
gridRowStart: selectedPosition.rowIdx + 2
|
|
3086
3047
|
},
|
|
3087
3048
|
onKeyDown: handleKeyDown
|
|
3088
|
-
}), /*#__PURE__*/
|
|
3049
|
+
}), /*#__PURE__*/o(DataGridDefaultComponentsProvider, {
|
|
3089
3050
|
value: defaultGridComponents,
|
|
3090
|
-
children: [/*#__PURE__*/
|
|
3051
|
+
children: [/*#__PURE__*/o(HeaderRow$1, {
|
|
3091
3052
|
columns: getRowViewportColumns(-1),
|
|
3092
3053
|
onColumnResize: handleColumnResize,
|
|
3093
3054
|
allRowsSelected: allRowsSelected,
|
|
@@ -3099,8 +3060,8 @@
|
|
|
3099
3060
|
selectCell: selectHeaderCellLatest,
|
|
3100
3061
|
shouldFocusGrid: !selectedCellIsWithinSelectionBounds,
|
|
3101
3062
|
direction: direction
|
|
3102
|
-
}), rows.length === 0 && noRowsFallback ? noRowsFallback : /*#__PURE__*/
|
|
3103
|
-
children: [/*#__PURE__*/
|
|
3063
|
+
}), rows.length === 0 && noRowsFallback ? noRowsFallback : /*#__PURE__*/o(p$1, {
|
|
3064
|
+
children: [/*#__PURE__*/o(RowSelectionChangeProvider, {
|
|
3104
3065
|
value: selectRowLatest,
|
|
3105
3066
|
children: getViewportRows()
|
|
3106
3067
|
}), summaryRows == null ? void 0 : summaryRows.map((row, rowIdx) => {
|
|
@@ -3109,7 +3070,7 @@
|
|
|
3109
3070
|
const isSummaryRowSelected = selectedPosition.rowIdx === summaryRowIdx;
|
|
3110
3071
|
const top = clientHeight > totalRowHeight ? gridHeight - summaryRowHeight * (summaryRows.length - rowIdx) : undefined;
|
|
3111
3072
|
const bottom = top === undefined ? summaryRowHeight * (summaryRows.length - 1 - rowIdx) : undefined;
|
|
3112
|
-
return /*#__PURE__*/
|
|
3073
|
+
return /*#__PURE__*/o(SummaryRow$1, {
|
|
3113
3074
|
"aria-rowindex": headerRowsCount + rowsCount + rowIdx + 1,
|
|
3114
3075
|
rowIdx: rowIdx,
|
|
3115
3076
|
gridRowStart: gridRowStart,
|
|
@@ -3131,16 +3092,16 @@
|
|
|
3131
3092
|
return p1.idx === p2.idx && p1.rowIdx === p2.rowIdx;
|
|
3132
3093
|
}
|
|
3133
3094
|
|
|
3134
|
-
const DataGrid$1 = /*#__PURE__*/
|
|
3095
|
+
const DataGrid$1 = /*#__PURE__*/N(DataGrid);
|
|
3135
3096
|
|
|
3136
3097
|
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
3098
|
styleInject$1(css_248z$g,{"insertAt":"top"});
|
|
3138
3099
|
|
|
3139
3100
|
function useData(widget) {
|
|
3140
3101
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3141
|
-
var columns =
|
|
3102
|
+
var columns = T$1(function () { return widget.columns(); }, [widget, widget.dataChecksum()]);
|
|
3142
3103
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3143
|
-
var data =
|
|
3104
|
+
var data = T$1(function () { return widget.data(); }, [widget, widget.dataChecksum()]);
|
|
3144
3105
|
return [columns, data];
|
|
3145
3106
|
}
|
|
3146
3107
|
|
|
@@ -3169,12 +3130,12 @@
|
|
|
3169
3130
|
var columnTypes = table.columnTypes();
|
|
3170
3131
|
var columnPatterns = table.columnPatterns();
|
|
3171
3132
|
var columnFormats = table.columnFormats();
|
|
3172
|
-
var _c =
|
|
3173
|
-
var _d =
|
|
3174
|
-
var _e =
|
|
3175
|
-
var _f =
|
|
3133
|
+
var _c = y([]), listColumns = _c[0], setListColumns = _c[1];
|
|
3134
|
+
var _d = y(), sortColumn = _d[0], setSortColumn = _d[1];
|
|
3135
|
+
var _e = y([]), rows = _e[0], setRows = _e[1];
|
|
3136
|
+
var _f = y(new Set()), selectedRows = _f[0], setSelectedRows = _f[1];
|
|
3176
3137
|
// Columns ---
|
|
3177
|
-
|
|
3138
|
+
s(function () {
|
|
3178
3139
|
setListColumns(__spreadArray(__spreadArray([], multiSelect ? [SelectColumn] : [], true), columns.map(function (column) {
|
|
3179
3140
|
var _a;
|
|
3180
3141
|
var type = (_a = columnTypes[column]) !== null && _a !== void 0 ? _a : "string";
|
|
@@ -3206,24 +3167,24 @@
|
|
|
3206
3167
|
};
|
|
3207
3168
|
}), true));
|
|
3208
3169
|
}, [columnFormats, columnPatterns, columnTypes, columns, multiSelect]);
|
|
3209
|
-
var onSortColumnsChange =
|
|
3170
|
+
var onSortColumnsChange = q$1(function (sortColumns) {
|
|
3210
3171
|
var futureSortColumn = sortColumns.slice(-1)[0];
|
|
3211
3172
|
var sorted = futureSortColumn !== undefined;
|
|
3212
3173
|
var isSortedDescending = (futureSortColumn === null || futureSortColumn === void 0 ? void 0 : futureSortColumn.direction) === "DESC";
|
|
3213
3174
|
setSortColumn(futureSortColumn);
|
|
3214
3175
|
setRows(copyAndSort(rows, sorted ? futureSortColumn.columnKey : "key", sorted ? isSortedDescending : false));
|
|
3215
3176
|
}, [rows]);
|
|
3216
|
-
var rowKeyGetter =
|
|
3177
|
+
var rowKeyGetter = q$1(function (row) {
|
|
3217
3178
|
return row.key;
|
|
3218
3179
|
}, []);
|
|
3219
|
-
var onSelectedRowsChange =
|
|
3180
|
+
var onSelectedRowsChange = q$1(function (selectedRows) {
|
|
3220
3181
|
setSelectedRows(selectedRows);
|
|
3221
3182
|
}, []);
|
|
3222
|
-
var onRowClick =
|
|
3183
|
+
var onRowClick = q$1(function (row, column) {
|
|
3223
3184
|
table.onRowClickCallback(row, column.key);
|
|
3224
3185
|
}, [table]);
|
|
3225
3186
|
// Rows ---
|
|
3226
|
-
|
|
3187
|
+
s(function () {
|
|
3227
3188
|
var items = data.map(function (row, index) {
|
|
3228
3189
|
var retVal = {
|
|
3229
3190
|
key: index
|
|
@@ -3327,10 +3288,10 @@
|
|
|
3327
3288
|
_super.prototype.update.call(this, domNode, element);
|
|
3328
3289
|
this._div.style("width", this.width() + "px");
|
|
3329
3290
|
this._div.style("height", this.height() + "px");
|
|
3330
|
-
|
|
3291
|
+
Z(h$1(ReactTable, { table: this }), this._div.node());
|
|
3331
3292
|
};
|
|
3332
3293
|
Table.prototype.exit = function (domNode, element) {
|
|
3333
|
-
|
|
3294
|
+
cn(this._div.node());
|
|
3334
3295
|
this._div.remove();
|
|
3335
3296
|
_super.prototype.exit.call(this, domNode, element);
|
|
3336
3297
|
};
|