@hpcc-js/dgrid2 2.3.2 → 2.3.4
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 +4 -4
- package/src/__package__.ts +2 -2
- package/types/__package__.d.ts +2 -2
- package/types-3.4/__package__.d.ts +2 -2
package/dist/index.es6.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { format, timeParse, timeFormat, publish, HTMLWidget } from '@hpcc-js/common';
|
|
2
2
|
|
|
3
3
|
var PKG_NAME = "@hpcc-js/dgrid2";
|
|
4
|
-
var PKG_VERSION = "2.3.
|
|
5
|
-
var BUILD_VERSION = "2.104.
|
|
4
|
+
var PKG_VERSION = "2.3.4";
|
|
5
|
+
var BUILD_VERSION = "2.104.8";
|
|
6
6
|
|
|
7
7
|
/******************************************************************************
|
|
8
8
|
Copyright (c) Microsoft Corporation.
|
|
@@ -67,54 +67,15 @@ 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
|
|
71
|
-
|
|
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});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}
|
|
73
|
-
|
|
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
|
-
|
|
76
|
-
function toVal(mix) {
|
|
77
|
-
var k, y, str='';
|
|
78
|
-
|
|
79
|
-
if (typeof mix === 'string' || typeof mix === 'number') {
|
|
80
|
-
str += mix;
|
|
81
|
-
} else if (typeof mix === 'object') {
|
|
82
|
-
if (Array.isArray(mix)) {
|
|
83
|
-
for (k=0; k < mix.length; k++) {
|
|
84
|
-
if (mix[k]) {
|
|
85
|
-
if (y = toVal(mix[k])) {
|
|
86
|
-
str && (str += ' ');
|
|
87
|
-
str += y;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
} else {
|
|
92
|
-
for (k in mix) {
|
|
93
|
-
if (mix[k]) {
|
|
94
|
-
str && (str += ' ');
|
|
95
|
-
str += k;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
return str;
|
|
102
|
-
}
|
|
70
|
+
var n,l$1,u$1,t,o$2,r$2,f$1={},e$1=[],c$1=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function s$1(n,l){for(var u in l)n[u]=l[u];return n}function a$1(n){var l=n.parentNode;l&&l.removeChild(n);}function h$1(l,u,i){var t,o,r,f={};for(r in u)"key"==r?t=u[r]:"ref"==r?o=u[r]:f[r]=u[r];if(arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):i),"function"==typeof l&&null!=l.defaultProps)for(r in l.defaultProps)void 0===f[r]&&(f[r]=l.defaultProps[r]);return v$1(l,f,t,o,null)}function v$1(n,i,t,o,r){var f={type:n,props:i,key:t,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==r?++u$1:r};return null==r&&null!=l$1.vnode&&l$1.vnode(f),f}function p$1(n){return n.children}function d$1(n,l){this.props=n,this.context=l;}function _$2(n,l){if(null==l)return n.__?_$2(n.__,n.__.__k.indexOf(n)+1):null;for(var u;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e)return u.__e;return "function"==typeof n.type?_$2(n):null}function k$1(n){var l,u;if(null!=(n=n.__)&&null!=n.__c){for(n.__e=n.__c.base=null,l=0;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e){n.__e=n.__c.base=u.__e;break}return k$1(n)}}function b(n){(!n.__d&&(n.__d=!0)&&t.push(n)&&!g$2.__r++||o$2!==l$1.debounceRendering)&&((o$2=l$1.debounceRendering)||setTimeout)(g$2);}function g$2(){for(var n;g$2.__r=t.length;)n=t.sort(function(n,l){return n.__v.__b-l.__v.__b}),t=[],n.some(function(n){var l,u,i,t,o,r;n.__d&&(o=(t=(l=n).__v).__e,(r=l.__P)&&(u=[],(i=s$1({},t)).__v=t.__v+1,j$2(r,t,i,l.__n,void 0!==r.ownerSVGElement,null!=t.__h?[o]:null,u,null==o?_$2(t):o,t.__h),z$2(u,t),t.__e!=o&&k$1(t)));});}function w$2(n,l,u,i,t,o,r,c,s,a){var h,y,d,k,b,g,w,x=i&&i.__k||e$1,C=x.length;for(u.__k=[],h=0;h<l.length;h++)if(null!=(k=u.__k[h]=null==(k=l[h])||"boolean"==typeof k?null:"string"==typeof k||"number"==typeof k||"bigint"==typeof k?v$1(null,k,null,null,k):Array.isArray(k)?v$1(p$1,{children:k},null,null,null):k.__b>0?v$1(k.type,k.props,k.key,k.ref?k.ref:null,k.__v):k)){if(k.__=u,k.__b=u.__b+1,null===(d=x[h])||d&&k.key==d.key&&k.type===d.type)x[h]=void 0;else for(y=0;y<C;y++){if((d=x[y])&&k.key==d.key&&k.type===d.type){x[y]=void 0;break}d=null;}j$2(n,k,d=d||f$1,t,o,r,c,s,a),b=k.__e,(y=k.ref)&&d.ref!=y&&(w||(w=[]),d.ref&&w.push(d.ref,null,k),w.push(y,k.__c||b,k)),null!=b?(null==g&&(g=b),"function"==typeof k.type&&k.__k===d.__k?k.__d=s=m$1(k,s,n):s=A$1(n,k,d,x,b,s),"function"==typeof u.type&&(u.__d=s)):s&&d.__e==s&&s.parentNode!=n&&(s=_$2(d));}for(u.__e=g,h=C;h--;)null!=x[h]&&("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;
|
|
103
71
|
|
|
104
|
-
function
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
str && (str += ' ');
|
|
110
|
-
str += x;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
return str;
|
|
115
|
-
}
|
|
72
|
+
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}
|
|
73
|
+
|
|
74
|
+
function g(n,t){for(var e in t)n[e]=t[e];return n}function C(n,t){for(var e in n)if("__source"!==e&&!(e in t))return !0;for(var r in t)if("__source"!==r&&n[r]!==t[r])return !0;return !1}function E(n){this.props=n;}function w(n,e){function r(n){var t=this.props.ref,r=t==n.ref;return !r&&t&&(t.call?t(null):t.current=null),e?!e(this.props,n)||!r:C(this.props,n)}function u(e){return this.shouldComponentUpdate=r,h$1(n,e)}return u.displayName="Memo("+(n.displayName||n.name)+")",u.prototype.isReactComponent=!0,u.__f=!0,u}(E.prototype=new d$1).isPureReactComponent=!0,E.prototype.shouldComponentUpdate=function(n,t){return C(this.props,n)||C(this.state,t)};var R=l$1.__b;l$1.__b=function(n){n.type&&n.type.__f&&n.ref&&(n.props.ref=n.ref,n.ref=null),R&&R(n);};var x="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function N(n){function t(t){var e=g({},t);return delete e.ref,n(e,t.ref||null)}return t.$$typeof=x,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(n.displayName||n.name)+")",t}var O=l$1.__e;l$1.__e=function(n,t,e,r){if(n.then)for(var u,o=t;o=o.__;)if((u=o.__c)&&u.__c)return null==t.__e&&(t.__e=e.__e,t.__k=e.__k),u.__c(n,t);O(n,t,e,r);};var T=l$1.unmount;function I(n,t,e){return n&&(n.__c&&n.__c.__H&&(n.__c.__H.__.forEach(function(n){"function"==typeof n.__c&&n.__c();}),n.__c.__H=null),null!=(n=g({},n)).__c&&(n.__c.__P===e&&(n.__c.__P=t),n.__c=null),n.__k=n.__k&&n.__k.map(function(n){return I(n,t,e)})),n}function L(n,t,e){return n&&(n.__v=null,n.__k=n.__k&&n.__k.map(function(n){return L(n,t,e)}),n.__c&&n.__c.__P===t&&(n.__e&&e.insertBefore(n.__e,n.__d),n.__c.__e=!0,n.__c.__P=e)),n}function U(){this.__u=0,this.t=null,this.__b=null;}function D(n){var t=n.__.__c;return t&&t.__a&&t.__a(n)}function M(){this.u=null,this.o=null;}l$1.unmount=function(n){var t=n.__c;t&&t.__R&&t.__R(),t&&!0===n.__h&&(n.type=null),T&&T(n);},(U.prototype=new d$1).__c=function(n,t){var e=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(e);var u=D(r.__v),o=!1,i=function(){o||(o=!0,e.__R=null,u?u(l):l());};e.__R=i;var l=function(){if(!--r.__u){if(r.state.__a){var n=r.state.__a;r.__v.__k[0]=L(n,n.__c.__P,n.__c.__O);}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate();}},c=!0===t.__h;r.__u++||c||r.setState({__a:r.__b=r.__v.__k[0]}),n.then(i,i);},U.prototype.componentWillUnmount=function(){this.t=[];},U.prototype.render=function(n,e){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),o=this.__v.__k[0].__c;this.__v.__k[0]=I(this.__b,r,o.__O=o.__P);}this.__b=null;}var i=e.__a&&h$1(p$1,null,n.fallback);return i&&(i.__h=null),[h$1(p$1,null,e.__a?null:n.children),i]};var V=function(n,t,e){if(++e[1]===e[0]&&n.o.delete(t),n.props.revealOrder&&("t"!==n.props.revealOrder[0]||!n.o.size))for(e=n.u;e;){for(;e.length>3;)e.pop()();if(e[1]<e[0])break;n.u=e=e[2];}};(M.prototype=new d$1).__a=function(n){var t=this,e=D(t.__v),r=t.o.get(n);return r[0]++,function(u){var o=function(){t.props.revealOrder?(r.push(u),V(t,n,r)):u();};e?e(o):o();}},M.prototype.render=function(n){this.u=null,this.o=new Map;var t=x$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)}
|
|
75
|
+
|
|
76
|
+
function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function clsx(){for(var e,t,f=0,n="";f<arguments.length;)(e=arguments[f++])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
|
|
116
77
|
|
|
117
|
-
var
|
|
78
|
+
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}
|
|
118
79
|
|
|
119
80
|
function styleInject$1(css, ref) {
|
|
120
81
|
if ( ref === void 0 ) ref = {};
|
|
@@ -183,7 +144,7 @@ const checkbox = "cdwjxv8700-beta12";
|
|
|
183
144
|
const checkboxClassname = `rdg-checkbox ${checkbox}`;
|
|
184
145
|
const checkboxLabelDisabled = "cca4mwn700-beta12";
|
|
185
146
|
const checkboxLabelDisabledClassname = `rdg-checkbox-label-disabled ${checkboxLabelDisabled}`;
|
|
186
|
-
const CheckboxFormatter = /*#__PURE__*/
|
|
147
|
+
const CheckboxFormatter = /*#__PURE__*/N(function CheckboxFormatter({
|
|
187
148
|
onChange,
|
|
188
149
|
...props
|
|
189
150
|
}, ref) {
|
|
@@ -191,24 +152,24 @@ const CheckboxFormatter = /*#__PURE__*/R(function CheckboxFormatter({
|
|
|
191
152
|
onChange(e.target.checked, e.nativeEvent.shiftKey);
|
|
192
153
|
}
|
|
193
154
|
|
|
194
|
-
return /*#__PURE__*/
|
|
155
|
+
return /*#__PURE__*/o("label", {
|
|
195
156
|
className: clsx(checkboxLabelClassname, props.disabled && checkboxLabelDisabledClassname),
|
|
196
|
-
children: [/*#__PURE__*/
|
|
157
|
+
children: [/*#__PURE__*/o("input", {
|
|
197
158
|
type: "checkbox",
|
|
198
159
|
ref: ref,
|
|
199
160
|
...props,
|
|
200
161
|
className: checkboxInputClassname,
|
|
201
162
|
onChange: handleChange
|
|
202
|
-
}), /*#__PURE__*/
|
|
163
|
+
}), /*#__PURE__*/o("div", {
|
|
203
164
|
className: checkboxClassname
|
|
204
165
|
})]
|
|
205
166
|
});
|
|
206
167
|
});
|
|
207
168
|
|
|
208
|
-
const useLayoutEffect = typeof window === 'undefined' ?
|
|
169
|
+
const useLayoutEffect = typeof window === 'undefined' ? s : _$1;
|
|
209
170
|
|
|
210
171
|
function useFocusRef(isSelected) {
|
|
211
|
-
const ref =
|
|
172
|
+
const ref = A(null);
|
|
212
173
|
useLayoutEffect(() => {
|
|
213
174
|
var _ref$current;
|
|
214
175
|
|
|
@@ -223,10 +184,10 @@ function useFocusRef(isSelected) {
|
|
|
223
184
|
};
|
|
224
185
|
}
|
|
225
186
|
|
|
226
|
-
const DataGridDefaultComponentsContext = /*#__PURE__*/B(undefined);
|
|
187
|
+
const DataGridDefaultComponentsContext = /*#__PURE__*/B$2(undefined);
|
|
227
188
|
const DataGridDefaultComponentsProvider = DataGridDefaultComponentsContext.Provider;
|
|
228
189
|
function useDefaultComponents() {
|
|
229
|
-
return
|
|
190
|
+
return x$1(DataGridDefaultComponentsContext);
|
|
230
191
|
}
|
|
231
192
|
|
|
232
193
|
function SelectCellFormatter({
|
|
@@ -242,7 +203,7 @@ function SelectCellFormatter({
|
|
|
242
203
|
tabIndex
|
|
243
204
|
} = useFocusRef(isCellSelected);
|
|
244
205
|
const Formatter = useDefaultComponents().checkboxFormatter;
|
|
245
|
-
return /*#__PURE__*/
|
|
206
|
+
return /*#__PURE__*/o(Formatter, {
|
|
246
207
|
"aria-label": ariaLabel,
|
|
247
208
|
"aria-labelledby": ariaLabelledBy,
|
|
248
209
|
ref: ref,
|
|
@@ -255,7 +216,7 @@ function SelectCellFormatter({
|
|
|
255
216
|
|
|
256
217
|
function ValueFormatter(props) {
|
|
257
218
|
try {
|
|
258
|
-
return /*#__PURE__*/
|
|
219
|
+
return /*#__PURE__*/o(p$1, {
|
|
259
220
|
children: props.row[props.column.key]
|
|
260
221
|
});
|
|
261
222
|
} catch {
|
|
@@ -290,31 +251,31 @@ function ToggleGroupFormatter({
|
|
|
290
251
|
}
|
|
291
252
|
|
|
292
253
|
const d = isExpanded ? 'M1 1 L 7 7 L 13 1' : 'M1 7 L 7 1 L 13 7';
|
|
293
|
-
return /*#__PURE__*/
|
|
254
|
+
return /*#__PURE__*/o("span", {
|
|
294
255
|
ref: ref,
|
|
295
256
|
className: groupCellContentClassname,
|
|
296
257
|
tabIndex: tabIndex,
|
|
297
258
|
onKeyDown: handleKeyDown,
|
|
298
|
-
children: [groupKey, /*#__PURE__*/
|
|
259
|
+
children: [groupKey, /*#__PURE__*/o("svg", {
|
|
299
260
|
viewBox: "0 0 14 8",
|
|
300
261
|
width: "14",
|
|
301
262
|
height: "8",
|
|
302
263
|
className: caretClassname,
|
|
303
264
|
"aria-hidden": true,
|
|
304
|
-
children: /*#__PURE__*/
|
|
265
|
+
children: /*#__PURE__*/o("path", {
|
|
305
266
|
d: d
|
|
306
267
|
})
|
|
307
268
|
})]
|
|
308
269
|
});
|
|
309
270
|
}
|
|
310
271
|
|
|
311
|
-
const RowSelectionContext = /*#__PURE__*/B(undefined);
|
|
272
|
+
const RowSelectionContext = /*#__PURE__*/B$2(undefined);
|
|
312
273
|
const RowSelectionProvider = RowSelectionContext.Provider;
|
|
313
|
-
const RowSelectionChangeContext = /*#__PURE__*/B(undefined);
|
|
274
|
+
const RowSelectionChangeContext = /*#__PURE__*/B$2(undefined);
|
|
314
275
|
const RowSelectionChangeProvider = RowSelectionChangeContext.Provider;
|
|
315
276
|
function useRowSelection() {
|
|
316
|
-
const rowSelectionContext =
|
|
317
|
-
const rowSelectionChangeContext =
|
|
277
|
+
const rowSelectionContext = x$1(RowSelectionContext);
|
|
278
|
+
const rowSelectionChangeContext = x$1(RowSelectionChangeContext);
|
|
318
279
|
|
|
319
280
|
if (rowSelectionContext === undefined || rowSelectionChangeContext === undefined) {
|
|
320
281
|
throw new Error('useRowSelection must be used within DataGrid cells');
|
|
@@ -327,7 +288,7 @@ const SELECT_COLUMN_KEY = 'select-row';
|
|
|
327
288
|
|
|
328
289
|
function SelectFormatter(props) {
|
|
329
290
|
const [isRowSelected, onRowSelectionChange] = useRowSelection();
|
|
330
|
-
return /*#__PURE__*/
|
|
291
|
+
return /*#__PURE__*/o(SelectCellFormatter, {
|
|
331
292
|
"aria-label": "Select",
|
|
332
293
|
isCellSelected: props.isCellSelected,
|
|
333
294
|
value: isRowSelected,
|
|
@@ -343,7 +304,7 @@ function SelectFormatter(props) {
|
|
|
343
304
|
|
|
344
305
|
function SelectGroupFormatter(props) {
|
|
345
306
|
const [isRowSelected, onRowSelectionChange] = useRowSelection();
|
|
346
|
-
return /*#__PURE__*/
|
|
307
|
+
return /*#__PURE__*/o(SelectCellFormatter, {
|
|
347
308
|
"aria-label": "Select Group",
|
|
348
309
|
isCellSelected: props.isCellSelected,
|
|
349
310
|
value: isRowSelected,
|
|
@@ -368,7 +329,7 @@ const SelectColumn = {
|
|
|
368
329
|
frozen: true,
|
|
369
330
|
|
|
370
331
|
headerRenderer(props) {
|
|
371
|
-
return /*#__PURE__*/
|
|
332
|
+
return /*#__PURE__*/o(SelectCellFormatter, {
|
|
372
333
|
"aria-label": "Select All",
|
|
373
334
|
isCellSelected: props.isCellSelected,
|
|
374
335
|
value: props.allRowsSelected,
|
|
@@ -638,7 +599,7 @@ function useCalculatedColumns({
|
|
|
638
599
|
colSpanColumns,
|
|
639
600
|
lastFrozenColumnIndex,
|
|
640
601
|
groupBy
|
|
641
|
-
} =
|
|
602
|
+
} = T$1(() => {
|
|
642
603
|
const groupBy = [];
|
|
643
604
|
let lastFrozenColumnIndex = -1;
|
|
644
605
|
const columns = rawColumns.map(rawColumn => {
|
|
@@ -727,7 +688,7 @@ function useCalculatedColumns({
|
|
|
727
688
|
layoutCssVars,
|
|
728
689
|
totalFrozenColumnWidth,
|
|
729
690
|
columnMetrics
|
|
730
|
-
} =
|
|
691
|
+
} = T$1(() => {
|
|
731
692
|
const columnMetrics = new Map();
|
|
732
693
|
let left = 0;
|
|
733
694
|
let totalFrozenColumnWidth = 0;
|
|
@@ -795,7 +756,7 @@ function useCalculatedColumns({
|
|
|
795
756
|
columnMetrics
|
|
796
757
|
};
|
|
797
758
|
}, [columnWidths, columns, viewportWidth, lastFrozenColumnIndex]);
|
|
798
|
-
const [colOverscanStartIdx, colOverscanEndIdx] =
|
|
759
|
+
const [colOverscanStartIdx, colOverscanEndIdx] = T$1(() => {
|
|
799
760
|
if (!enableVirtualization) {
|
|
800
761
|
return [0, columns.length - 1];
|
|
801
762
|
}
|
|
@@ -876,9 +837,9 @@ function getSpecifiedWidth({
|
|
|
876
837
|
}
|
|
877
838
|
|
|
878
839
|
function useGridDimensions() {
|
|
879
|
-
const gridRef =
|
|
880
|
-
const [inlineSize, setInlineSize] =
|
|
881
|
-
const [blockSize, setBlockSize] =
|
|
840
|
+
const gridRef = A(null);
|
|
841
|
+
const [inlineSize, setInlineSize] = y(1);
|
|
842
|
+
const [blockSize, setBlockSize] = y(1);
|
|
882
843
|
useLayoutEffect(() => {
|
|
883
844
|
const {
|
|
884
845
|
ResizeObserver
|
|
@@ -916,23 +877,23 @@ function handleDevicePixelRatio(size) {
|
|
|
916
877
|
}
|
|
917
878
|
|
|
918
879
|
function useLatestFunc(fn) {
|
|
919
|
-
const ref =
|
|
920
|
-
|
|
880
|
+
const ref = A(fn);
|
|
881
|
+
s(() => {
|
|
921
882
|
ref.current = fn;
|
|
922
883
|
});
|
|
923
|
-
return
|
|
884
|
+
return q$1((...args) => {
|
|
924
885
|
ref.current(...args);
|
|
925
886
|
}, []);
|
|
926
887
|
}
|
|
927
888
|
|
|
928
889
|
function useRovingCellRef(isSelected) {
|
|
929
|
-
const [isChildFocused, setIsChildFocused] =
|
|
890
|
+
const [isChildFocused, setIsChildFocused] = y(false);
|
|
930
891
|
|
|
931
892
|
if (isChildFocused && !isSelected) {
|
|
932
893
|
setIsChildFocused(false);
|
|
933
894
|
}
|
|
934
895
|
|
|
935
|
-
const ref =
|
|
896
|
+
const ref = q$1(cell => {
|
|
936
897
|
if (cell === null || cell.contains(document.activeElement)) return;
|
|
937
898
|
cell.focus({
|
|
938
899
|
preventScroll: true
|
|
@@ -965,7 +926,7 @@ function useViewportColumns({
|
|
|
965
926
|
rowOverscanEndIdx,
|
|
966
927
|
isGroupRow
|
|
967
928
|
}) {
|
|
968
|
-
const startIdx =
|
|
929
|
+
const startIdx = T$1(() => {
|
|
969
930
|
if (colOverscanStartIdx === 0) return 0;
|
|
970
931
|
let startIdx = colOverscanStartIdx;
|
|
971
932
|
|
|
@@ -1014,7 +975,7 @@ function useViewportColumns({
|
|
|
1014
975
|
|
|
1015
976
|
return startIdx;
|
|
1016
977
|
}, [rowOverscanStartIdx, rowOverscanEndIdx, rows, summaryRows, colOverscanStartIdx, lastFrozenColumnIndex, colSpanColumns, isGroupRow]);
|
|
1017
|
-
return
|
|
978
|
+
return T$1(() => {
|
|
1018
979
|
const viewportColumns = [];
|
|
1019
980
|
|
|
1020
981
|
for (let colIdx = 0; colIdx <= colOverscanEndIdx; colIdx++) {
|
|
@@ -1041,7 +1002,7 @@ function useViewportRows({
|
|
|
1041
1002
|
expandedGroupIds,
|
|
1042
1003
|
enableVirtualization
|
|
1043
1004
|
}) {
|
|
1044
|
-
const [groupedRows, rowsCount] =
|
|
1005
|
+
const [groupedRows, rowsCount] = T$1(() => {
|
|
1045
1006
|
if (groupBy.length === 0 || rowGrouper == null) return [undefined, rawRows.length];
|
|
1046
1007
|
|
|
1047
1008
|
const groupRows = (rows, [groupByKey, ...remainingGroupByKeys], startRowIndex) => {
|
|
@@ -1063,7 +1024,7 @@ function useViewportRows({
|
|
|
1063
1024
|
|
|
1064
1025
|
return groupRows(rawRows, groupBy, 0);
|
|
1065
1026
|
}, [groupBy, rowGrouper, rawRows]);
|
|
1066
|
-
const [rows, isGroupRow] =
|
|
1027
|
+
const [rows, isGroupRow] = T$1(() => {
|
|
1067
1028
|
const allGroupRows = new Set();
|
|
1068
1029
|
if (!groupedRows) return [rawRows, isGroupRow];
|
|
1069
1030
|
const flattenedRows = [];
|
|
@@ -1117,7 +1078,7 @@ function useViewportRows({
|
|
|
1117
1078
|
getRowTop,
|
|
1118
1079
|
getRowHeight,
|
|
1119
1080
|
findRowIdx
|
|
1120
|
-
} =
|
|
1081
|
+
} = T$1(() => {
|
|
1121
1082
|
if (typeof rowHeight === 'number') {
|
|
1122
1083
|
return {
|
|
1123
1084
|
totalRowHeight: rowHeight * rows.length,
|
|
@@ -1219,10 +1180,10 @@ function HeaderRenderer({
|
|
|
1219
1180
|
onSort,
|
|
1220
1181
|
isCellSelected
|
|
1221
1182
|
}) {
|
|
1222
|
-
if (!column.sortable) return /*#__PURE__*/
|
|
1183
|
+
if (!column.sortable) return /*#__PURE__*/o(p$1, {
|
|
1223
1184
|
children: column.name
|
|
1224
1185
|
});
|
|
1225
|
-
return /*#__PURE__*/
|
|
1186
|
+
return /*#__PURE__*/o(SortableHeaderCell, {
|
|
1226
1187
|
onSort: onSort,
|
|
1227
1188
|
sortDirection: sortDirection,
|
|
1228
1189
|
priority: priority,
|
|
@@ -1255,17 +1216,17 @@ function SortableHeaderCell({
|
|
|
1255
1216
|
onSort(event.ctrlKey || event.metaKey);
|
|
1256
1217
|
}
|
|
1257
1218
|
|
|
1258
|
-
return /*#__PURE__*/
|
|
1219
|
+
return /*#__PURE__*/o("span", {
|
|
1259
1220
|
ref: ref,
|
|
1260
1221
|
tabIndex: tabIndex,
|
|
1261
1222
|
className: headerSortCellClassname,
|
|
1262
1223
|
onClick: handleClick,
|
|
1263
1224
|
onKeyDown: handleKeyDown,
|
|
1264
|
-
children: [/*#__PURE__*/
|
|
1225
|
+
children: [/*#__PURE__*/o("span", {
|
|
1265
1226
|
className: headerSortNameClassname,
|
|
1266
1227
|
children: children
|
|
1267
|
-
}), /*#__PURE__*/
|
|
1268
|
-
children: [/*#__PURE__*/
|
|
1228
|
+
}), /*#__PURE__*/o("span", {
|
|
1229
|
+
children: [/*#__PURE__*/o(SortIcon, {
|
|
1269
1230
|
sortDirection: sortDirection
|
|
1270
1231
|
}), priority]
|
|
1271
1232
|
})]
|
|
@@ -1411,7 +1372,7 @@ function HeaderCell({
|
|
|
1411
1372
|
}
|
|
1412
1373
|
}
|
|
1413
1374
|
|
|
1414
|
-
return /*#__PURE__*/
|
|
1375
|
+
return /*#__PURE__*/o("div", {
|
|
1415
1376
|
role: "columnheader",
|
|
1416
1377
|
"aria-colindex": column.idx + 1,
|
|
1417
1378
|
"aria-selected": isCellSelected,
|
|
@@ -1428,7 +1389,7 @@ function HeaderCell({
|
|
|
1428
1389
|
onClick: onClick,
|
|
1429
1390
|
onDoubleClick: column.resizable ? onDoubleClick : undefined,
|
|
1430
1391
|
onPointerDown: column.resizable ? onPointerDown : undefined,
|
|
1431
|
-
children: /*#__PURE__*/
|
|
1392
|
+
children: /*#__PURE__*/o(HeaderRenderer$1, {
|
|
1432
1393
|
column: column,
|
|
1433
1394
|
sortDirection: sortDirection,
|
|
1434
1395
|
priority: priority,
|
|
@@ -1471,7 +1432,7 @@ function HeaderRow({
|
|
|
1471
1432
|
index += colSpan - 1;
|
|
1472
1433
|
}
|
|
1473
1434
|
|
|
1474
|
-
cells.push( /*#__PURE__*/
|
|
1435
|
+
cells.push( /*#__PURE__*/o(HeaderCell, {
|
|
1475
1436
|
column: column,
|
|
1476
1437
|
colSpan: colSpan,
|
|
1477
1438
|
isCellSelected: selectedCellIdx === column.idx,
|
|
@@ -1486,7 +1447,7 @@ function HeaderRow({
|
|
|
1486
1447
|
}, column.key));
|
|
1487
1448
|
}
|
|
1488
1449
|
|
|
1489
|
-
return /*#__PURE__*/
|
|
1450
|
+
return /*#__PURE__*/o("div", {
|
|
1490
1451
|
role: "row",
|
|
1491
1452
|
"aria-rowindex": 1,
|
|
1492
1453
|
className: clsx(headerRowClassname, selectedCellIdx === -1 && rowSelectedClassname),
|
|
@@ -1495,7 +1456,7 @@ function HeaderRow({
|
|
|
1495
1456
|
});
|
|
1496
1457
|
}
|
|
1497
1458
|
|
|
1498
|
-
const HeaderRow$1 = /*#__PURE__*/
|
|
1459
|
+
const HeaderRow$1 = /*#__PURE__*/w(HeaderRow);
|
|
1499
1460
|
|
|
1500
1461
|
var css_248z$7 = ".c1bmg16t700-beta12,.ccpfvsn700-beta12{background-color:#ccf}.c1bmg16t700-beta12.ccpfvsn700-beta12{background-color:#99f}";
|
|
1501
1462
|
styleInject$1(css_248z$7,{"insertAt":"top"});
|
|
@@ -1549,7 +1510,7 @@ function Cell({
|
|
|
1549
1510
|
onRowDoubleClick == null ? void 0 : onRowDoubleClick(row, column);
|
|
1550
1511
|
}
|
|
1551
1512
|
|
|
1552
|
-
return /*#__PURE__*/
|
|
1513
|
+
return /*#__PURE__*/o("div", {
|
|
1553
1514
|
role: "gridcell",
|
|
1554
1515
|
"aria-colindex": column.idx + 1,
|
|
1555
1516
|
"aria-selected": isCellSelected,
|
|
@@ -1564,8 +1525,8 @@ function Cell({
|
|
|
1564
1525
|
onContextMenu: handleContextMenu,
|
|
1565
1526
|
onFocus: onFocus,
|
|
1566
1527
|
...props,
|
|
1567
|
-
children: !column.rowGroup && /*#__PURE__*/
|
|
1568
|
-
children: [/*#__PURE__*/
|
|
1528
|
+
children: !column.rowGroup && /*#__PURE__*/o(p$1, {
|
|
1529
|
+
children: [/*#__PURE__*/o(column.formatter, {
|
|
1569
1530
|
column: column,
|
|
1570
1531
|
row: row,
|
|
1571
1532
|
isCellSelected: isCellSelected,
|
|
@@ -1575,7 +1536,7 @@ function Cell({
|
|
|
1575
1536
|
});
|
|
1576
1537
|
}
|
|
1577
1538
|
|
|
1578
|
-
const Cell$1 = /*#__PURE__*/
|
|
1539
|
+
const Cell$1 = /*#__PURE__*/w(Cell);
|
|
1579
1540
|
|
|
1580
1541
|
function Row({
|
|
1581
1542
|
className,
|
|
@@ -1631,7 +1592,7 @@ function Row({
|
|
|
1631
1592
|
if (isCellSelected && selectedCellEditor) {
|
|
1632
1593
|
cells.push(selectedCellEditor);
|
|
1633
1594
|
} else {
|
|
1634
|
-
cells.push( /*#__PURE__*/
|
|
1595
|
+
cells.push( /*#__PURE__*/o(Cell$1, {
|
|
1635
1596
|
column: column,
|
|
1636
1597
|
colSpan: colSpan,
|
|
1637
1598
|
row: row,
|
|
@@ -1647,9 +1608,9 @@ function Row({
|
|
|
1647
1608
|
}
|
|
1648
1609
|
}
|
|
1649
1610
|
|
|
1650
|
-
return /*#__PURE__*/
|
|
1611
|
+
return /*#__PURE__*/o(RowSelectionProvider, {
|
|
1651
1612
|
value: isRowSelected,
|
|
1652
|
-
children: /*#__PURE__*/
|
|
1613
|
+
children: /*#__PURE__*/o("div", {
|
|
1653
1614
|
role: "row",
|
|
1654
1615
|
ref: ref,
|
|
1655
1616
|
className: className,
|
|
@@ -1661,7 +1622,7 @@ function Row({
|
|
|
1661
1622
|
});
|
|
1662
1623
|
}
|
|
1663
1624
|
|
|
1664
|
-
const Row$1 = /*#__PURE__*/
|
|
1625
|
+
const Row$1 = /*#__PURE__*/w( /*#__PURE__*/N(Row));
|
|
1665
1626
|
|
|
1666
1627
|
function GroupCell({
|
|
1667
1628
|
id,
|
|
@@ -1685,7 +1646,7 @@ function GroupCell({
|
|
|
1685
1646
|
}
|
|
1686
1647
|
|
|
1687
1648
|
const isLevelMatching = column.rowGroup && groupColumnIndex === column.idx;
|
|
1688
|
-
return /*#__PURE__*/
|
|
1649
|
+
return /*#__PURE__*/o("div", {
|
|
1689
1650
|
role: "gridcell",
|
|
1690
1651
|
"aria-colindex": column.idx + 1,
|
|
1691
1652
|
"aria-selected": isCellSelected,
|
|
@@ -1697,7 +1658,7 @@ function GroupCell({
|
|
|
1697
1658
|
},
|
|
1698
1659
|
onClick: isLevelMatching ? toggleGroup : undefined,
|
|
1699
1660
|
onFocus: onFocus,
|
|
1700
|
-
children: (!column.rowGroup || groupColumnIndex === column.idx) && column.groupFormatter && /*#__PURE__*/
|
|
1661
|
+
children: (!column.rowGroup || groupColumnIndex === column.idx) && column.groupFormatter && /*#__PURE__*/o(column.groupFormatter, {
|
|
1701
1662
|
groupKey: groupKey,
|
|
1702
1663
|
childRows: childRows,
|
|
1703
1664
|
column: column,
|
|
@@ -1709,7 +1670,7 @@ function GroupCell({
|
|
|
1709
1670
|
}, column.key);
|
|
1710
1671
|
}
|
|
1711
1672
|
|
|
1712
|
-
const GroupCell$1 = /*#__PURE__*/
|
|
1673
|
+
const GroupCell$1 = /*#__PURE__*/w(GroupCell);
|
|
1713
1674
|
|
|
1714
1675
|
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
1676
|
styleInject$1(css_248z$6,{"insertAt":"top"});
|
|
@@ -1740,9 +1701,9 @@ function GroupedRow({
|
|
|
1740
1701
|
selectGroup(rowIdx);
|
|
1741
1702
|
}
|
|
1742
1703
|
|
|
1743
|
-
return /*#__PURE__*/
|
|
1704
|
+
return /*#__PURE__*/o(RowSelectionProvider, {
|
|
1744
1705
|
value: isRowSelected,
|
|
1745
|
-
children: /*#__PURE__*/
|
|
1706
|
+
children: /*#__PURE__*/o("div", {
|
|
1746
1707
|
role: "row",
|
|
1747
1708
|
"aria-level": level,
|
|
1748
1709
|
"aria-expanded": isExpanded,
|
|
@@ -1750,7 +1711,7 @@ function GroupedRow({
|
|
|
1750
1711
|
onClick: handleSelectGroup,
|
|
1751
1712
|
style: getRowStyle(gridRowStart, height),
|
|
1752
1713
|
...props,
|
|
1753
|
-
children: viewportColumns.map(column => /*#__PURE__*/
|
|
1714
|
+
children: viewportColumns.map(column => /*#__PURE__*/o(GroupCell$1, {
|
|
1754
1715
|
id: id,
|
|
1755
1716
|
groupKey: groupKey,
|
|
1756
1717
|
childRows: childRows,
|
|
@@ -1765,7 +1726,7 @@ function GroupedRow({
|
|
|
1765
1726
|
});
|
|
1766
1727
|
}
|
|
1767
1728
|
|
|
1768
|
-
const GroupRowRenderer = /*#__PURE__*/
|
|
1729
|
+
const GroupRowRenderer = /*#__PURE__*/w(GroupedRow);
|
|
1769
1730
|
|
|
1770
1731
|
var css_248z$5 = ".s1n3hxke700-beta12{inset-block-end:var(--rdg-summary-row-bottom);inset-block-start:var(--rdg-summary-row-top)}";
|
|
1771
1732
|
styleInject$1(css_248z$5,{"insertAt":"top"});
|
|
@@ -1794,7 +1755,7 @@ function SummaryCell({
|
|
|
1794
1755
|
selectCell(row, column);
|
|
1795
1756
|
}
|
|
1796
1757
|
|
|
1797
|
-
return /*#__PURE__*/
|
|
1758
|
+
return /*#__PURE__*/o("div", {
|
|
1798
1759
|
role: "gridcell",
|
|
1799
1760
|
"aria-colindex": column.idx + 1,
|
|
1800
1761
|
"aria-colspan": colSpan,
|
|
@@ -1805,7 +1766,7 @@ function SummaryCell({
|
|
|
1805
1766
|
style: getCellStyle(column, colSpan),
|
|
1806
1767
|
onClick: onClick,
|
|
1807
1768
|
onFocus: onFocus,
|
|
1808
|
-
children: SummaryFormatter && /*#__PURE__*/
|
|
1769
|
+
children: SummaryFormatter && /*#__PURE__*/o(SummaryFormatter, {
|
|
1809
1770
|
column: column,
|
|
1810
1771
|
row: row,
|
|
1811
1772
|
isCellSelected: isCellSelected
|
|
@@ -1813,7 +1774,7 @@ function SummaryCell({
|
|
|
1813
1774
|
});
|
|
1814
1775
|
}
|
|
1815
1776
|
|
|
1816
|
-
const SummaryCell$1 = /*#__PURE__*/
|
|
1777
|
+
const SummaryCell$1 = /*#__PURE__*/w(SummaryCell);
|
|
1817
1778
|
|
|
1818
1779
|
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
1780
|
styleInject$1(css_248z$4,{"insertAt":"top"});
|
|
@@ -1848,7 +1809,7 @@ function SummaryRow({
|
|
|
1848
1809
|
}
|
|
1849
1810
|
|
|
1850
1811
|
const isCellSelected = selectedCellIdx === column.idx;
|
|
1851
|
-
cells.push( /*#__PURE__*/
|
|
1812
|
+
cells.push( /*#__PURE__*/o(SummaryCell$1, {
|
|
1852
1813
|
column: column,
|
|
1853
1814
|
colSpan: colSpan,
|
|
1854
1815
|
row: row,
|
|
@@ -1857,7 +1818,7 @@ function SummaryRow({
|
|
|
1857
1818
|
}, column.key));
|
|
1858
1819
|
}
|
|
1859
1820
|
|
|
1860
|
-
return /*#__PURE__*/
|
|
1821
|
+
return /*#__PURE__*/o("div", {
|
|
1861
1822
|
role: "row",
|
|
1862
1823
|
"aria-rowindex": ariaRowIndex,
|
|
1863
1824
|
className: clsx(rowClassname, `rdg-row-${rowIdx % 2 === 0 ? 'even' : 'odd'}`, summaryRowClassname, rowIdx === 0 && summaryRowBorderClassname, selectedCellIdx === -1 && rowSelectedClassname),
|
|
@@ -1869,7 +1830,7 @@ function SummaryRow({
|
|
|
1869
1830
|
});
|
|
1870
1831
|
}
|
|
1871
1832
|
|
|
1872
|
-
const SummaryRow$1 = /*#__PURE__*/
|
|
1833
|
+
const SummaryRow$1 = /*#__PURE__*/w(SummaryRow);
|
|
1873
1834
|
|
|
1874
1835
|
var css_248z$3 = ".c1tngyp1700-beta12.rdg-cell{padding:0}";
|
|
1875
1836
|
styleInject$1(css_248z$3,{"insertAt":"top"});
|
|
@@ -1885,12 +1846,12 @@ function EditCell({
|
|
|
1885
1846
|
}) {
|
|
1886
1847
|
var _column$editorOptions, _column$editorOptions4, _column$editorOptions5;
|
|
1887
1848
|
|
|
1888
|
-
const frameRequestRef =
|
|
1849
|
+
const frameRequestRef = A();
|
|
1889
1850
|
const commitOnOutsideClick = ((_column$editorOptions = column.editorOptions) == null ? void 0 : _column$editorOptions.commitOnOutsideClick) !== false;
|
|
1890
1851
|
const commitOnOutsideMouseDown = useLatestFunc(() => {
|
|
1891
1852
|
onClose(true);
|
|
1892
1853
|
});
|
|
1893
|
-
|
|
1854
|
+
s(() => {
|
|
1894
1855
|
if (!commitOnOutsideClick) return;
|
|
1895
1856
|
|
|
1896
1857
|
function onWindowCaptureMouseDown() {
|
|
@@ -1943,7 +1904,7 @@ function EditCell({
|
|
|
1943
1904
|
cellClass
|
|
1944
1905
|
} = column;
|
|
1945
1906
|
const className = getCellClassname(column, 'rdg-editor-container', typeof cellClass === 'function' ? cellClass(row) : cellClass, !((_column$editorOptions4 = column.editorOptions) != null && _column$editorOptions4.renderFormatter) && cellEditing);
|
|
1946
|
-
return /*#__PURE__*/
|
|
1907
|
+
return /*#__PURE__*/o("div", {
|
|
1947
1908
|
role: "gridcell",
|
|
1948
1909
|
"aria-colindex": column.idx + 1,
|
|
1949
1910
|
"aria-colspan": colSpan,
|
|
@@ -1952,13 +1913,13 @@ function EditCell({
|
|
|
1952
1913
|
style: getCellStyle(column, colSpan),
|
|
1953
1914
|
onKeyDown: onKeyDown,
|
|
1954
1915
|
onMouseDownCapture: commitOnOutsideClick ? cancelFrameRequest : undefined,
|
|
1955
|
-
children: column.editor != null && /*#__PURE__*/
|
|
1956
|
-
children: [/*#__PURE__*/
|
|
1916
|
+
children: column.editor != null && /*#__PURE__*/o(p$1, {
|
|
1917
|
+
children: [/*#__PURE__*/o(column.editor, {
|
|
1957
1918
|
column: column,
|
|
1958
1919
|
row: row,
|
|
1959
1920
|
onRowChange: onRowChange,
|
|
1960
1921
|
onClose: onClose
|
|
1961
|
-
}), ((_column$editorOptions5 = column.editorOptions) == null ? void 0 : _column$editorOptions5.renderFormatter) && /*#__PURE__*/
|
|
1922
|
+
}), ((_column$editorOptions5 = column.editorOptions) == null ? void 0 : _column$editorOptions5.renderFormatter) && /*#__PURE__*/o(column.formatter, {
|
|
1962
1923
|
column: column,
|
|
1963
1924
|
row: row,
|
|
1964
1925
|
isCellSelected: true,
|
|
@@ -2055,7 +2016,7 @@ function DragHandle({
|
|
|
2055
2016
|
}
|
|
2056
2017
|
}
|
|
2057
2018
|
|
|
2058
|
-
return /*#__PURE__*/
|
|
2019
|
+
return /*#__PURE__*/o("div", {
|
|
2059
2020
|
className: cellDragHandleClassname,
|
|
2060
2021
|
onMouseDown: handleMouseDown,
|
|
2061
2022
|
onDoubleClick: handleDoubleClick
|
|
@@ -2070,13 +2031,13 @@ const arrowClassname = `rdg-sort-arrow ${arrow}`;
|
|
|
2070
2031
|
function SortIcon({
|
|
2071
2032
|
sortDirection
|
|
2072
2033
|
}) {
|
|
2073
|
-
return sortDirection !== undefined ? /*#__PURE__*/
|
|
2034
|
+
return sortDirection !== undefined ? /*#__PURE__*/o("svg", {
|
|
2074
2035
|
viewBox: "0 0 12 8",
|
|
2075
2036
|
width: "12",
|
|
2076
2037
|
height: "8",
|
|
2077
2038
|
className: arrowClassname,
|
|
2078
2039
|
"aria-hidden": true,
|
|
2079
|
-
children: /*#__PURE__*/
|
|
2040
|
+
children: /*#__PURE__*/o("path", {
|
|
2080
2041
|
d: sortDirection === 'ASC' ? 'M0 8 6 0 12 8' : 'M0 0 6 8 12 0'
|
|
2081
2042
|
})
|
|
2082
2043
|
}) : null;
|
|
@@ -2138,18 +2099,18 @@ function DataGrid({
|
|
|
2138
2099
|
const cellNavigationMode = rawCellNavigationMode != null ? rawCellNavigationMode : 'NONE';
|
|
2139
2100
|
(_enableVirtualization = enableVirtualization) != null ? _enableVirtualization : enableVirtualization = true;
|
|
2140
2101
|
(_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 =
|
|
2102
|
+
const [scrollTop, setScrollTop] = y(0);
|
|
2103
|
+
const [scrollLeft, setScrollLeft] = y(0);
|
|
2104
|
+
const [columnWidths, setColumnWidths] = y(() => new Map());
|
|
2105
|
+
const [selectedPosition, setSelectedPosition] = y(initialPosition);
|
|
2106
|
+
const [copiedCell, setCopiedCell] = y(null);
|
|
2107
|
+
const [isDragging, setDragging] = y(false);
|
|
2108
|
+
const [draggedOverRowIdx, setOverRowIdx] = y(undefined);
|
|
2109
|
+
const [autoResizeColumn, setAutoResizeColumn] = y(null);
|
|
2110
|
+
const prevSelectedPosition = A(selectedPosition);
|
|
2111
|
+
const latestDraggedOverRowIdx = A(draggedOverRowIdx);
|
|
2112
|
+
const lastSelectedRowIdx = A(-1);
|
|
2113
|
+
const rowRef = A(null);
|
|
2153
2114
|
const [gridRef, gridWidth, gridHeight] = useGridDimensions();
|
|
2154
2115
|
const headerRowsCount = 1;
|
|
2155
2116
|
const summaryRowsCount = (_summaryRows$length = summaryRows == null ? void 0 : summaryRows.length) != null ? _summaryRows$length : 0;
|
|
@@ -2159,11 +2120,11 @@ function DataGrid({
|
|
|
2159
2120
|
const isRtl = direction === 'rtl';
|
|
2160
2121
|
const leftKey = isRtl ? 'ArrowRight' : 'ArrowLeft';
|
|
2161
2122
|
const rightKey = isRtl ? 'ArrowLeft' : 'ArrowRight';
|
|
2162
|
-
const defaultGridComponents =
|
|
2123
|
+
const defaultGridComponents = T$1(() => ({
|
|
2163
2124
|
sortIcon,
|
|
2164
2125
|
checkboxFormatter
|
|
2165
2126
|
}), [sortIcon, checkboxFormatter]);
|
|
2166
|
-
const allRowsSelected =
|
|
2127
|
+
const allRowsSelected = T$1(() => {
|
|
2167
2128
|
const {
|
|
2168
2129
|
length
|
|
2169
2130
|
} = rawRows;
|
|
@@ -2287,7 +2248,7 @@ function DataGrid({
|
|
|
2287
2248
|
setAutoResizeColumn(null);
|
|
2288
2249
|
onColumnResize == null ? void 0 : onColumnResize(autoResizeColumn.idx, width);
|
|
2289
2250
|
}, [autoResizeColumn, gridRef, onColumnResize]);
|
|
2290
|
-
|
|
2251
|
+
F(ref, () => ({
|
|
2291
2252
|
element: gridRef.current,
|
|
2292
2253
|
|
|
2293
2254
|
scrollToColumn(idx) {
|
|
@@ -2309,7 +2270,7 @@ function DataGrid({
|
|
|
2309
2270
|
|
|
2310
2271
|
selectCell
|
|
2311
2272
|
}));
|
|
2312
|
-
const handleColumnResize =
|
|
2273
|
+
const handleColumnResize = q$1((column, width) => {
|
|
2313
2274
|
if (width === 'auto') {
|
|
2314
2275
|
setAutoResizeColumn(column);
|
|
2315
2276
|
return;
|
|
@@ -2322,7 +2283,7 @@ function DataGrid({
|
|
|
2322
2283
|
});
|
|
2323
2284
|
onColumnResize == null ? void 0 : onColumnResize(column.idx, width);
|
|
2324
2285
|
}, [onColumnResize]);
|
|
2325
|
-
const setDraggedOverRowIdx =
|
|
2286
|
+
const setDraggedOverRowIdx = q$1(rowIdx => {
|
|
2326
2287
|
setOverRowIdx(rowIdx);
|
|
2327
2288
|
latestDraggedOverRowIdx.current = rowIdx;
|
|
2328
2289
|
}, []);
|
|
@@ -2867,7 +2828,7 @@ function DataGrid({
|
|
|
2867
2828
|
return;
|
|
2868
2829
|
}
|
|
2869
2830
|
|
|
2870
|
-
return /*#__PURE__*/
|
|
2831
|
+
return /*#__PURE__*/o(DragHandle, {
|
|
2871
2832
|
rows: rawRows,
|
|
2872
2833
|
columns: columns,
|
|
2873
2834
|
selectedPosition: selectedPosition,
|
|
@@ -2918,7 +2879,7 @@ function DataGrid({
|
|
|
2918
2879
|
closeEditor();
|
|
2919
2880
|
}
|
|
2920
2881
|
|
|
2921
|
-
return /*#__PURE__*/
|
|
2882
|
+
return /*#__PURE__*/o(EditCell, {
|
|
2922
2883
|
column: column,
|
|
2923
2884
|
colSpan: colSpan,
|
|
2924
2885
|
row: row,
|
|
@@ -2972,7 +2933,7 @@ function DataGrid({
|
|
|
2972
2933
|
startRowIndex
|
|
2973
2934
|
} = row);
|
|
2974
2935
|
const isGroupRowSelected = isSelectable && row.childRows.every(cr => selectedRows.has(rowKeyGetter(cr)));
|
|
2975
|
-
rowElements.push( /*#__PURE__*/
|
|
2936
|
+
rowElements.push( /*#__PURE__*/o(GroupRowRenderer, {
|
|
2976
2937
|
"aria-level": row.level + 1,
|
|
2977
2938
|
"aria-setsize": row.setSize,
|
|
2978
2939
|
"aria-posinset": row.posInSet + 1,
|
|
@@ -3009,7 +2970,7 @@ function DataGrid({
|
|
|
3009
2970
|
key = hasGroups ? startRowIndex : rowIdx;
|
|
3010
2971
|
}
|
|
3011
2972
|
|
|
3012
|
-
rowElements.push( /*#__PURE__*/
|
|
2973
|
+
rowElements.push( /*#__PURE__*/o(RowRenderer, {
|
|
3013
2974
|
"aria-rowindex": headerRowsCount + (hasGroups ? startRowIndex : rowIdx) + 1,
|
|
3014
2975
|
"aria-selected": isSelectable ? isRowSelected : undefined,
|
|
3015
2976
|
rowIdx: rowIdx,
|
|
@@ -3052,7 +3013,7 @@ function DataGrid({
|
|
|
3052
3013
|
}
|
|
3053
3014
|
|
|
3054
3015
|
const isGroupRowFocused = selectedPosition.idx === -1 && selectedPosition.rowIdx !== -2;
|
|
3055
|
-
return /*#__PURE__*/
|
|
3016
|
+
return /*#__PURE__*/o("div", {
|
|
3056
3017
|
role: hasGroups ? 'treegrid' : 'grid',
|
|
3057
3018
|
"aria-label": ariaLabel,
|
|
3058
3019
|
"aria-labelledby": ariaLabelledBy,
|
|
@@ -3073,7 +3034,7 @@ function DataGrid({
|
|
|
3073
3034
|
onScroll: handleScroll,
|
|
3074
3035
|
onKeyDown: handleKeyDown,
|
|
3075
3036
|
"data-testid": testId,
|
|
3076
|
-
children: [hasGroups && /*#__PURE__*/
|
|
3037
|
+
children: [hasGroups && /*#__PURE__*/o("div", {
|
|
3077
3038
|
ref: rowRef,
|
|
3078
3039
|
tabIndex: isGroupRowFocused ? 0 : -1,
|
|
3079
3040
|
className: clsx(focusSinkClassname, isGroupRowFocused && [rowSelected, lastFrozenColumnIndex !== -1 && rowSelectedWithFrozenCell]),
|
|
@@ -3081,9 +3042,9 @@ function DataGrid({
|
|
|
3081
3042
|
gridRowStart: selectedPosition.rowIdx + 2
|
|
3082
3043
|
},
|
|
3083
3044
|
onKeyDown: handleKeyDown
|
|
3084
|
-
}), /*#__PURE__*/
|
|
3045
|
+
}), /*#__PURE__*/o(DataGridDefaultComponentsProvider, {
|
|
3085
3046
|
value: defaultGridComponents,
|
|
3086
|
-
children: [/*#__PURE__*/
|
|
3047
|
+
children: [/*#__PURE__*/o(HeaderRow$1, {
|
|
3087
3048
|
columns: getRowViewportColumns(-1),
|
|
3088
3049
|
onColumnResize: handleColumnResize,
|
|
3089
3050
|
allRowsSelected: allRowsSelected,
|
|
@@ -3095,8 +3056,8 @@ function DataGrid({
|
|
|
3095
3056
|
selectCell: selectHeaderCellLatest,
|
|
3096
3057
|
shouldFocusGrid: !selectedCellIsWithinSelectionBounds,
|
|
3097
3058
|
direction: direction
|
|
3098
|
-
}), rows.length === 0 && noRowsFallback ? noRowsFallback : /*#__PURE__*/
|
|
3099
|
-
children: [/*#__PURE__*/
|
|
3059
|
+
}), rows.length === 0 && noRowsFallback ? noRowsFallback : /*#__PURE__*/o(p$1, {
|
|
3060
|
+
children: [/*#__PURE__*/o(RowSelectionChangeProvider, {
|
|
3100
3061
|
value: selectRowLatest,
|
|
3101
3062
|
children: getViewportRows()
|
|
3102
3063
|
}), summaryRows == null ? void 0 : summaryRows.map((row, rowIdx) => {
|
|
@@ -3105,7 +3066,7 @@ function DataGrid({
|
|
|
3105
3066
|
const isSummaryRowSelected = selectedPosition.rowIdx === summaryRowIdx;
|
|
3106
3067
|
const top = clientHeight > totalRowHeight ? gridHeight - summaryRowHeight * (summaryRows.length - rowIdx) : undefined;
|
|
3107
3068
|
const bottom = top === undefined ? summaryRowHeight * (summaryRows.length - 1 - rowIdx) : undefined;
|
|
3108
|
-
return /*#__PURE__*/
|
|
3069
|
+
return /*#__PURE__*/o(SummaryRow$1, {
|
|
3109
3070
|
"aria-rowindex": headerRowsCount + rowsCount + rowIdx + 1,
|
|
3110
3071
|
rowIdx: rowIdx,
|
|
3111
3072
|
gridRowStart: gridRowStart,
|
|
@@ -3127,16 +3088,16 @@ function isSamePosition(p1, p2) {
|
|
|
3127
3088
|
return p1.idx === p2.idx && p1.rowIdx === p2.rowIdx;
|
|
3128
3089
|
}
|
|
3129
3090
|
|
|
3130
|
-
const DataGrid$1 = /*#__PURE__*/
|
|
3091
|
+
const DataGrid$1 = /*#__PURE__*/N(DataGrid);
|
|
3131
3092
|
|
|
3132
3093
|
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
3094
|
styleInject$1(css_248z$g,{"insertAt":"top"});
|
|
3134
3095
|
|
|
3135
3096
|
function useData(widget) {
|
|
3136
3097
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3137
|
-
var columns =
|
|
3098
|
+
var columns = T$1(function () { return widget.columns(); }, [widget, widget.dataChecksum()]);
|
|
3138
3099
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3139
|
-
var data =
|
|
3100
|
+
var data = T$1(function () { return widget.data(); }, [widget, widget.dataChecksum()]);
|
|
3140
3101
|
return [columns, data];
|
|
3141
3102
|
}
|
|
3142
3103
|
|
|
@@ -3165,12 +3126,12 @@ var ReactTable = function (_a) {
|
|
|
3165
3126
|
var columnTypes = table.columnTypes();
|
|
3166
3127
|
var columnPatterns = table.columnPatterns();
|
|
3167
3128
|
var columnFormats = table.columnFormats();
|
|
3168
|
-
var _c =
|
|
3169
|
-
var _d =
|
|
3170
|
-
var _e =
|
|
3171
|
-
var _f =
|
|
3129
|
+
var _c = y([]), listColumns = _c[0], setListColumns = _c[1];
|
|
3130
|
+
var _d = y(), sortColumn = _d[0], setSortColumn = _d[1];
|
|
3131
|
+
var _e = y([]), rows = _e[0], setRows = _e[1];
|
|
3132
|
+
var _f = y(new Set()), selectedRows = _f[0], setSelectedRows = _f[1];
|
|
3172
3133
|
// Columns ---
|
|
3173
|
-
|
|
3134
|
+
s(function () {
|
|
3174
3135
|
setListColumns(__spreadArray(__spreadArray([], multiSelect ? [SelectColumn] : [], true), columns.map(function (column) {
|
|
3175
3136
|
var _a;
|
|
3176
3137
|
var type = (_a = columnTypes[column]) !== null && _a !== void 0 ? _a : "string";
|
|
@@ -3202,24 +3163,24 @@ var ReactTable = function (_a) {
|
|
|
3202
3163
|
};
|
|
3203
3164
|
}), true));
|
|
3204
3165
|
}, [columnFormats, columnPatterns, columnTypes, columns, multiSelect]);
|
|
3205
|
-
var onSortColumnsChange =
|
|
3166
|
+
var onSortColumnsChange = q$1(function (sortColumns) {
|
|
3206
3167
|
var futureSortColumn = sortColumns.slice(-1)[0];
|
|
3207
3168
|
var sorted = futureSortColumn !== undefined;
|
|
3208
3169
|
var isSortedDescending = (futureSortColumn === null || futureSortColumn === void 0 ? void 0 : futureSortColumn.direction) === "DESC";
|
|
3209
3170
|
setSortColumn(futureSortColumn);
|
|
3210
3171
|
setRows(copyAndSort(rows, sorted ? futureSortColumn.columnKey : "key", sorted ? isSortedDescending : false));
|
|
3211
3172
|
}, [rows]);
|
|
3212
|
-
var rowKeyGetter =
|
|
3173
|
+
var rowKeyGetter = q$1(function (row) {
|
|
3213
3174
|
return row.key;
|
|
3214
3175
|
}, []);
|
|
3215
|
-
var onSelectedRowsChange =
|
|
3176
|
+
var onSelectedRowsChange = q$1(function (selectedRows) {
|
|
3216
3177
|
setSelectedRows(selectedRows);
|
|
3217
3178
|
}, []);
|
|
3218
|
-
var onRowClick =
|
|
3179
|
+
var onRowClick = q$1(function (row, column) {
|
|
3219
3180
|
table.onRowClickCallback(row, column.key);
|
|
3220
3181
|
}, [table]);
|
|
3221
3182
|
// Rows ---
|
|
3222
|
-
|
|
3183
|
+
s(function () {
|
|
3223
3184
|
var items = data.map(function (row, index) {
|
|
3224
3185
|
var retVal = {
|
|
3225
3186
|
key: index
|
|
@@ -3323,10 +3284,10 @@ var Table = /** @class */ (function (_super) {
|
|
|
3323
3284
|
_super.prototype.update.call(this, domNode, element);
|
|
3324
3285
|
this._div.style("width", this.width() + "px");
|
|
3325
3286
|
this._div.style("height", this.height() + "px");
|
|
3326
|
-
|
|
3287
|
+
Z(h$1(ReactTable, { table: this }), this._div.node());
|
|
3327
3288
|
};
|
|
3328
3289
|
Table.prototype.exit = function (domNode, element) {
|
|
3329
|
-
|
|
3290
|
+
cn(this._div.node());
|
|
3330
3291
|
this._div.remove();
|
|
3331
3292
|
_super.prototype.exit.call(this, domNode, element);
|
|
3332
3293
|
};
|