@sci-grid/react 1.0.1 → 1.0.5
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.cjs +1 -30
- package/dist/index.js +32 -654
- package/dist/react/src/index.d.ts +2 -1
- package/package.json +13 -2
- package/CHANGELOG.md +0 -8
- package/src/index.test.tsx +0 -36
- package/src/index.tsx +0 -68
- package/src/test-setup.ts +0 -9
- package/tsconfig.json +0 -10
- package/vite.config.ts +0 -26
package/dist/index.cjs
CHANGED
|
@@ -1,30 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
2
|
-
* @license React
|
|
3
|
-
* react-jsx-runtime.production.min.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var Oe;function lr(){if(Oe)return $;Oe=1;var O=C,E=Symbol.for("react.element"),F=Symbol.for("react.fragment"),_=Object.prototype.hasOwnProperty,h=O.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,m={key:!0,ref:!0,__self:!0,__source:!0};function R(c,l,j){var g,b={},P=null,Y=null;j!==void 0&&(P=""+j),l.key!==void 0&&(P=""+l.key),l.ref!==void 0&&(Y=l.ref);for(g in l)_.call(l,g)&&!m.hasOwnProperty(g)&&(b[g]=l[g]);if(c&&c.defaultProps)for(g in l=c.defaultProps,l)b[g]===void 0&&(b[g]=l[g]);return{$$typeof:E,type:c,key:P,ref:Y,props:b,_owner:h.current}}return $.Fragment=F,$.jsx=R,$.jsxs=R,$}var W={};/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react-jsx-runtime.development.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var Pe;function cr(){return Pe||(Pe=1,process.env.NODE_ENV!=="production"&&function(){var O=C,E=Symbol.for("react.element"),F=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),h=Symbol.for("react.strict_mode"),m=Symbol.for("react.profiler"),R=Symbol.for("react.provider"),c=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),j=Symbol.for("react.suspense"),g=Symbol.for("react.suspense_list"),b=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),Y=Symbol.for("react.offscreen"),Z=Symbol.iterator,Se="@@iterator";function we(e){if(e===null||typeof e!="object")return null;var r=Z&&e[Z]||e[Se];return typeof r=="function"?r:null}var x=O.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function d(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];Ce("error",e,t)}}function Ce(e,r,t){{var n=x.ReactDebugCurrentFrame,o=n.getStackAddendum();o!==""&&(r+="%s",t=t.concat([o]));var u=t.map(function(i){return String(i)});u.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,u)}}var je=!1,xe=!1,ke=!1,De=!1,Fe=!1,Q;Q=Symbol.for("react.module.reference");function Ae(e){return!!(typeof e=="string"||typeof e=="function"||e===_||e===m||Fe||e===h||e===j||e===g||De||e===Y||je||xe||ke||typeof e=="object"&&e!==null&&(e.$$typeof===P||e.$$typeof===b||e.$$typeof===R||e.$$typeof===c||e.$$typeof===l||e.$$typeof===Q||e.getModuleId!==void 0))}function Ie(e,r,t){var n=e.displayName;if(n)return n;var o=r.displayName||r.name||"";return o!==""?t+"("+o+")":t}function ee(e){return e.displayName||"Context"}function T(e){if(e==null)return null;if(typeof e.tag=="number"&&d("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case _:return"Fragment";case F:return"Portal";case m:return"Profiler";case h:return"StrictMode";case j:return"Suspense";case g:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case c:var r=e;return ee(r)+".Consumer";case R:var t=e;return ee(t._context)+".Provider";case l:return Ie(e,e.render,"ForwardRef");case b:var n=e.displayName||null;return n!==null?n:T(e.type)||"Memo";case P:{var o=e,u=o._payload,i=o._init;try{return T(i(u))}catch{return null}}}return null}var S=Object.assign,A=0,re,te,ne,ae,ie,oe,ue;function se(){}se.__reactDisabledLog=!0;function $e(){{if(A===0){re=console.log,te=console.info,ne=console.warn,ae=console.error,ie=console.group,oe=console.groupCollapsed,ue=console.groupEnd;var e={configurable:!0,enumerable:!0,value:se,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}A++}}function We(){{if(A--,A===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:S({},e,{value:re}),info:S({},e,{value:te}),warn:S({},e,{value:ne}),error:S({},e,{value:ae}),group:S({},e,{value:ie}),groupCollapsed:S({},e,{value:oe}),groupEnd:S({},e,{value:ue})})}A<0&&d("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var N=x.ReactCurrentDispatcher,q;function L(e,r,t){{if(q===void 0)try{throw Error()}catch(o){var n=o.stack.trim().match(/\n( *(at )?)/);q=n&&n[1]||""}return`
|
|
18
|
-
`+q+e}}var B=!1,M;{var Ye=typeof WeakMap=="function"?WeakMap:Map;M=new Ye}function fe(e,r){if(!e||B)return"";{var t=M.get(e);if(t!==void 0)return t}var n;B=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var u;u=N.current,N.current=null,$e();try{if(r){var i=function(){throw Error()};if(Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(i,[])}catch(p){n=p}Reflect.construct(e,[],i)}else{try{i.call()}catch(p){n=p}e.call(i.prototype)}}else{try{throw Error()}catch(p){n=p}e()}}catch(p){if(p&&n&&typeof p.stack=="string"){for(var a=p.stack.split(`
|
|
19
|
-
`),v=n.stack.split(`
|
|
20
|
-
`),s=a.length-1,f=v.length-1;s>=1&&f>=0&&a[s]!==v[f];)f--;for(;s>=1&&f>=0;s--,f--)if(a[s]!==v[f]){if(s!==1||f!==1)do if(s--,f--,f<0||a[s]!==v[f]){var y=`
|
|
21
|
-
`+a[s].replace(" at new "," at ");return e.displayName&&y.includes("<anonymous>")&&(y=y.replace("<anonymous>",e.displayName)),typeof e=="function"&&M.set(e,y),y}while(s>=1&&f>=0);break}}}finally{B=!1,N.current=u,We(),Error.prepareStackTrace=o}var D=e?e.displayName||e.name:"",w=D?L(D):"";return typeof e=="function"&&M.set(e,w),w}function Le(e,r,t){return fe(e,!1)}function Me(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function V(e,r,t){if(e==null)return"";if(typeof e=="function")return fe(e,Me(e));if(typeof e=="string")return L(e);switch(e){case j:return L("Suspense");case g:return L("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case l:return Le(e.render);case b:return V(e.type,r,t);case P:{var n=e,o=n._payload,u=n._init;try{return V(u(o),r,t)}catch{}}}return""}var I=Object.prototype.hasOwnProperty,le={},ce=x.ReactDebugCurrentFrame;function U(e){if(e){var r=e._owner,t=V(e.type,e._source,r?r.type:null);ce.setExtraStackFrame(t)}else ce.setExtraStackFrame(null)}function Ve(e,r,t,n,o){{var u=Function.call.bind(I);for(var i in e)if(u(e,i)){var a=void 0;try{if(typeof e[i]!="function"){var v=Error((n||"React class")+": "+t+" type `"+i+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[i]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw v.name="Invariant Violation",v}a=e[i](r,i,n,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(s){a=s}a&&!(a instanceof Error)&&(U(o),d("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",n||"React class",t,i,typeof a),U(null)),a instanceof Error&&!(a.message in le)&&(le[a.message]=!0,U(o),d("Failed %s type: %s",t,a.message),U(null))}}}var Ue=Array.isArray;function G(e){return Ue(e)}function Ne(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function qe(e){try{return de(e),!1}catch{return!0}}function de(e){return""+e}function ve(e){if(qe(e))return d("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ne(e)),de(e)}var pe=x.ReactCurrentOwner,Be={key:!0,ref:!0,__self:!0,__source:!0},ge,ye;function Ge(e){if(I.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function Je(e){if(I.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function Ke(e,r){typeof e.ref=="string"&&pe.current}function ze(e,r){{var t=function(){ge||(ge=!0,d("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function Xe(e,r){{var t=function(){ye||(ye=!0,d("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var He=function(e,r,t,n,o,u,i){var a={$$typeof:E,type:e,key:r,ref:t,props:i,_owner:u};return a._store={},Object.defineProperty(a._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(a,"_self",{configurable:!1,enumerable:!1,writable:!1,value:n}),Object.defineProperty(a,"_source",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.freeze&&(Object.freeze(a.props),Object.freeze(a)),a};function Ze(e,r,t,n,o){{var u,i={},a=null,v=null;t!==void 0&&(ve(t),a=""+t),Je(r)&&(ve(r.key),a=""+r.key),Ge(r)&&(v=r.ref,Ke(r,o));for(u in r)I.call(r,u)&&!Be.hasOwnProperty(u)&&(i[u]=r[u]);if(e&&e.defaultProps){var s=e.defaultProps;for(u in s)i[u]===void 0&&(i[u]=s[u])}if(a||v){var f=typeof e=="function"?e.displayName||e.name||"Unknown":e;a&&ze(i,f),v&&Xe(i,f)}return He(e,a,v,o,n,pe.current,i)}}var J=x.ReactCurrentOwner,Ee=x.ReactDebugCurrentFrame;function k(e){if(e){var r=e._owner,t=V(e.type,e._source,r?r.type:null);Ee.setExtraStackFrame(t)}else Ee.setExtraStackFrame(null)}var K;K=!1;function z(e){return typeof e=="object"&&e!==null&&e.$$typeof===E}function Re(){{if(J.current){var e=T(J.current.type);if(e)return`
|
|
22
|
-
|
|
23
|
-
Check the render method of \``+e+"`."}return""}}function Qe(e){return""}var be={};function er(e){{var r=Re();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
|
|
24
|
-
|
|
25
|
-
Check the top-level render call using <`+t+">.")}return r}}function _e(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=er(r);if(be[t])return;be[t]=!0;var n="";e&&e._owner&&e._owner!==J.current&&(n=" It was passed a child from "+T(e._owner.type)+"."),k(e),d('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,n),k(null)}}function he(e,r){{if(typeof e!="object")return;if(G(e))for(var t=0;t<e.length;t++){var n=e[t];z(n)&&_e(n,r)}else if(z(e))e._store&&(e._store.validated=!0);else if(e){var o=we(e);if(typeof o=="function"&&o!==e.entries)for(var u=o.call(e),i;!(i=u.next()).done;)z(i.value)&&_e(i.value,r)}}}function rr(e){{var r=e.type;if(r==null||typeof r=="string")return;var t;if(typeof r=="function")t=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===l||r.$$typeof===b))t=r.propTypes;else return;if(t){var n=T(r);Ve(t,e.props,"prop",n,e)}else if(r.PropTypes!==void 0&&!K){K=!0;var o=T(r);d("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",o||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&d("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function tr(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var n=r[t];if(n!=="children"&&n!=="key"){k(e),d("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),k(null);break}}e.ref!==null&&(k(e),d("Invalid attribute `ref` supplied to `React.Fragment`."),k(null))}}var me={};function Te(e,r,t,n,o,u){{var i=Ae(e);if(!i){var a="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(a+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var v=Qe();v?a+=v:a+=Re();var s;e===null?s="null":G(e)?s="array":e!==void 0&&e.$$typeof===E?(s="<"+(T(e.type)||"Unknown")+" />",a=" Did you accidentally export a JSX literal instead of a component?"):s=typeof e,d("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",s,a)}var f=Ze(e,r,t,o,u);if(f==null)return f;if(i){var y=r.children;if(y!==void 0)if(n)if(G(y)){for(var D=0;D<y.length;D++)he(y[D],e);Object.freeze&&Object.freeze(y)}else d("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else he(y,e)}if(I.call(r,"key")){var w=T(e),p=Object.keys(r).filter(function(sr){return sr!=="key"}),X=p.length>0?"{key: someKey, "+p.join(": ..., ")+": ...}":"{key: someKey}";if(!me[w+X]){var ur=p.length>0?"{"+p.join(": ..., ")+": ...}":"{}";d(`A props object containing a "key" prop is being spread into JSX:
|
|
26
|
-
let props = %s;
|
|
27
|
-
<%s {...props} />
|
|
28
|
-
React keys must be passed directly to JSX without using spread:
|
|
29
|
-
let props = %s;
|
|
30
|
-
<%s key={someKey} {...props} />`,X,w,ur,w),me[w+X]=!0}}return e===_?tr(f):rr(f),f}}function nr(e,r,t){return Te(e,r,t,!0)}function ar(e,r,t){return Te(e,r,t,!1)}var ir=ar,or=nr;W.Fragment=_,W.jsx=ir,W.jsxs=or}()),W}process.env.NODE_ENV==="production"?H.exports=lr():H.exports=cr();var dr=H.exports;const vr=({provider:O,config:E={},className:F,style:_,onSort:h,onSelectionChange:m})=>{const R=C.useRef(null),c=C.useRef(null);return C.useEffect(()=>(R.current&&(c.current=new fr.SciGrid(R.current,O,{...E,onSort:h,onSelectionChange:m})),()=>{var l;(l=c.current)==null||l.destroy(),c.current=null}),[]),C.useEffect(()=>{c.current&&c.current.updateProvider(O)},[O]),C.useEffect(()=>{c.current&&c.current.updateConfig({...E,onSort:h,onSelectionChange:m})},[E,h,m]),dr.jsx("div",{ref:R,className:F,style:{width:"100%",height:"100%",..._}})};exports.SciGridReact=vr;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const R=require("react/jsx-runtime"),r=require("react"),a=require("@sci-grid/core"),y=({provider:t,config:u={},className:d,style:l,onSort:c,onSelectionChange:i,onContextMenu:s})=>{const f=r.useRef(null),e=r.useRef(null);return r.useEffect(()=>(f.current&&(e.current=new a.SciGrid(f.current,t,{...u,onSort:c,onSelectionChange:i,onContextMenu:s})),()=>{var n;(n=e.current)==null||n.destroy(),e.current=null}),[]),r.useEffect(()=>{e.current&&e.current.updateProvider(t)},[t]),r.useEffect(()=>{e.current&&e.current.updateConfig({...u,onSort:c,onSelectionChange:i,onContextMenu:s})},[u,c,i,s]),R.jsx("div",{ref:f,className:d,style:{width:"100%",height:"100%",...l}})};exports.SciGridReact=y;
|
package/dist/index.js
CHANGED
|
@@ -1,664 +1,42 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
*/
|
|
13
|
-
var Pe;
|
|
14
|
-
function dr() {
|
|
15
|
-
if (Pe) return I;
|
|
16
|
-
Pe = 1;
|
|
17
|
-
var O = Se, E = Symbol.for("react.element"), D = Symbol.for("react.fragment"), b = Object.prototype.hasOwnProperty, h = O.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, m = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
18
|
-
function R(c, l, C) {
|
|
19
|
-
var g, _ = {}, P = null, W = null;
|
|
20
|
-
C !== void 0 && (P = "" + C), l.key !== void 0 && (P = "" + l.key), l.ref !== void 0 && (W = l.ref);
|
|
21
|
-
for (g in l) b.call(l, g) && !m.hasOwnProperty(g) && (_[g] = l[g]);
|
|
22
|
-
if (c && c.defaultProps) for (g in l = c.defaultProps, l) _[g] === void 0 && (_[g] = l[g]);
|
|
23
|
-
return { $$typeof: E, type: c, key: P, ref: W, props: _, _owner: h.current };
|
|
24
|
-
}
|
|
25
|
-
return I.Fragment = D, I.jsx = R, I.jsxs = R, I;
|
|
26
|
-
}
|
|
27
|
-
var $ = {};
|
|
28
|
-
/**
|
|
29
|
-
* @license React
|
|
30
|
-
* react-jsx-runtime.development.js
|
|
31
|
-
*
|
|
32
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
33
|
-
*
|
|
34
|
-
* This source code is licensed under the MIT license found in the
|
|
35
|
-
* LICENSE file in the root directory of this source tree.
|
|
36
|
-
*/
|
|
37
|
-
var we;
|
|
38
|
-
function vr() {
|
|
39
|
-
return we || (we = 1, process.env.NODE_ENV !== "production" && function() {
|
|
40
|
-
var O = Se, E = Symbol.for("react.element"), D = Symbol.for("react.portal"), b = Symbol.for("react.fragment"), h = Symbol.for("react.strict_mode"), m = Symbol.for("react.profiler"), R = Symbol.for("react.provider"), c = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), C = Symbol.for("react.suspense"), g = Symbol.for("react.suspense_list"), _ = Symbol.for("react.memo"), P = Symbol.for("react.lazy"), W = Symbol.for("react.offscreen"), Z = Symbol.iterator, Ce = "@@iterator";
|
|
41
|
-
function je(e) {
|
|
42
|
-
if (e === null || typeof e != "object")
|
|
43
|
-
return null;
|
|
44
|
-
var r = Z && e[Z] || e[Ce];
|
|
45
|
-
return typeof r == "function" ? r : null;
|
|
46
|
-
}
|
|
47
|
-
var j = O.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
48
|
-
function d(e) {
|
|
49
|
-
{
|
|
50
|
-
for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), n = 1; n < r; n++)
|
|
51
|
-
t[n - 1] = arguments[n];
|
|
52
|
-
xe("error", e, t);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
function xe(e, r, t) {
|
|
56
|
-
{
|
|
57
|
-
var n = j.ReactDebugCurrentFrame, o = n.getStackAddendum();
|
|
58
|
-
o !== "" && (r += "%s", t = t.concat([o]));
|
|
59
|
-
var u = t.map(function(i) {
|
|
60
|
-
return String(i);
|
|
61
|
-
});
|
|
62
|
-
u.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, u);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
var ke = !1, De = !1, Fe = !1, Ae = !1, Ie = !1, Q;
|
|
66
|
-
Q = Symbol.for("react.module.reference");
|
|
67
|
-
function $e(e) {
|
|
68
|
-
return !!(typeof e == "string" || typeof e == "function" || e === b || e === m || Ie || e === h || e === C || e === g || Ae || e === W || ke || De || Fe || typeof e == "object" && e !== null && (e.$$typeof === P || e.$$typeof === _ || e.$$typeof === R || e.$$typeof === c || e.$$typeof === l || // This needs to include all possible module reference object
|
|
69
|
-
// types supported by any Flight configuration anywhere since
|
|
70
|
-
// we don't know which Flight build this will end up being used
|
|
71
|
-
// with.
|
|
72
|
-
e.$$typeof === Q || e.getModuleId !== void 0));
|
|
73
|
-
}
|
|
74
|
-
function We(e, r, t) {
|
|
75
|
-
var n = e.displayName;
|
|
76
|
-
if (n)
|
|
77
|
-
return n;
|
|
78
|
-
var o = r.displayName || r.name || "";
|
|
79
|
-
return o !== "" ? t + "(" + o + ")" : t;
|
|
80
|
-
}
|
|
81
|
-
function ee(e) {
|
|
82
|
-
return e.displayName || "Context";
|
|
83
|
-
}
|
|
84
|
-
function T(e) {
|
|
85
|
-
if (e == null)
|
|
86
|
-
return null;
|
|
87
|
-
if (typeof e.tag == "number" && d("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
88
|
-
return e.displayName || e.name || null;
|
|
89
|
-
if (typeof e == "string")
|
|
90
|
-
return e;
|
|
91
|
-
switch (e) {
|
|
92
|
-
case b:
|
|
93
|
-
return "Fragment";
|
|
94
|
-
case D:
|
|
95
|
-
return "Portal";
|
|
96
|
-
case m:
|
|
97
|
-
return "Profiler";
|
|
98
|
-
case h:
|
|
99
|
-
return "StrictMode";
|
|
100
|
-
case C:
|
|
101
|
-
return "Suspense";
|
|
102
|
-
case g:
|
|
103
|
-
return "SuspenseList";
|
|
104
|
-
}
|
|
105
|
-
if (typeof e == "object")
|
|
106
|
-
switch (e.$$typeof) {
|
|
107
|
-
case c:
|
|
108
|
-
var r = e;
|
|
109
|
-
return ee(r) + ".Consumer";
|
|
110
|
-
case R:
|
|
111
|
-
var t = e;
|
|
112
|
-
return ee(t._context) + ".Provider";
|
|
113
|
-
case l:
|
|
114
|
-
return We(e, e.render, "ForwardRef");
|
|
115
|
-
case _:
|
|
116
|
-
var n = e.displayName || null;
|
|
117
|
-
return n !== null ? n : T(e.type) || "Memo";
|
|
118
|
-
case P: {
|
|
119
|
-
var o = e, u = o._payload, i = o._init;
|
|
120
|
-
try {
|
|
121
|
-
return T(i(u));
|
|
122
|
-
} catch {
|
|
123
|
-
return null;
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
return null;
|
|
128
|
-
}
|
|
129
|
-
var w = Object.assign, F = 0, re, te, ne, ae, ie, oe, ue;
|
|
130
|
-
function se() {
|
|
131
|
-
}
|
|
132
|
-
se.__reactDisabledLog = !0;
|
|
133
|
-
function Ye() {
|
|
134
|
-
{
|
|
135
|
-
if (F === 0) {
|
|
136
|
-
re = console.log, te = console.info, ne = console.warn, ae = console.error, ie = console.group, oe = console.groupCollapsed, ue = console.groupEnd;
|
|
137
|
-
var e = {
|
|
138
|
-
configurable: !0,
|
|
139
|
-
enumerable: !0,
|
|
140
|
-
value: se,
|
|
141
|
-
writable: !0
|
|
142
|
-
};
|
|
143
|
-
Object.defineProperties(console, {
|
|
144
|
-
info: e,
|
|
145
|
-
log: e,
|
|
146
|
-
warn: e,
|
|
147
|
-
error: e,
|
|
148
|
-
group: e,
|
|
149
|
-
groupCollapsed: e,
|
|
150
|
-
groupEnd: e
|
|
151
|
-
});
|
|
152
|
-
}
|
|
153
|
-
F++;
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
function Le() {
|
|
157
|
-
{
|
|
158
|
-
if (F--, F === 0) {
|
|
159
|
-
var e = {
|
|
160
|
-
configurable: !0,
|
|
161
|
-
enumerable: !0,
|
|
162
|
-
writable: !0
|
|
163
|
-
};
|
|
164
|
-
Object.defineProperties(console, {
|
|
165
|
-
log: w({}, e, {
|
|
166
|
-
value: re
|
|
167
|
-
}),
|
|
168
|
-
info: w({}, e, {
|
|
169
|
-
value: te
|
|
170
|
-
}),
|
|
171
|
-
warn: w({}, e, {
|
|
172
|
-
value: ne
|
|
173
|
-
}),
|
|
174
|
-
error: w({}, e, {
|
|
175
|
-
value: ae
|
|
176
|
-
}),
|
|
177
|
-
group: w({}, e, {
|
|
178
|
-
value: ie
|
|
179
|
-
}),
|
|
180
|
-
groupCollapsed: w({}, e, {
|
|
181
|
-
value: oe
|
|
182
|
-
}),
|
|
183
|
-
groupEnd: w({}, e, {
|
|
184
|
-
value: ue
|
|
185
|
-
})
|
|
186
|
-
});
|
|
187
|
-
}
|
|
188
|
-
F < 0 && d("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
var U = j.ReactCurrentDispatcher, N;
|
|
192
|
-
function Y(e, r, t) {
|
|
193
|
-
{
|
|
194
|
-
if (N === void 0)
|
|
195
|
-
try {
|
|
196
|
-
throw Error();
|
|
197
|
-
} catch (o) {
|
|
198
|
-
var n = o.stack.trim().match(/\n( *(at )?)/);
|
|
199
|
-
N = n && n[1] || "";
|
|
200
|
-
}
|
|
201
|
-
return `
|
|
202
|
-
` + N + e;
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
var B = !1, L;
|
|
206
|
-
{
|
|
207
|
-
var Ve = typeof WeakMap == "function" ? WeakMap : Map;
|
|
208
|
-
L = new Ve();
|
|
209
|
-
}
|
|
210
|
-
function fe(e, r) {
|
|
211
|
-
if (!e || B)
|
|
212
|
-
return "";
|
|
213
|
-
{
|
|
214
|
-
var t = L.get(e);
|
|
215
|
-
if (t !== void 0)
|
|
216
|
-
return t;
|
|
217
|
-
}
|
|
218
|
-
var n;
|
|
219
|
-
B = !0;
|
|
220
|
-
var o = Error.prepareStackTrace;
|
|
221
|
-
Error.prepareStackTrace = void 0;
|
|
222
|
-
var u;
|
|
223
|
-
u = U.current, U.current = null, Ye();
|
|
224
|
-
try {
|
|
225
|
-
if (r) {
|
|
226
|
-
var i = function() {
|
|
227
|
-
throw Error();
|
|
228
|
-
};
|
|
229
|
-
if (Object.defineProperty(i.prototype, "props", {
|
|
230
|
-
set: function() {
|
|
231
|
-
throw Error();
|
|
232
|
-
}
|
|
233
|
-
}), typeof Reflect == "object" && Reflect.construct) {
|
|
234
|
-
try {
|
|
235
|
-
Reflect.construct(i, []);
|
|
236
|
-
} catch (p) {
|
|
237
|
-
n = p;
|
|
238
|
-
}
|
|
239
|
-
Reflect.construct(e, [], i);
|
|
240
|
-
} else {
|
|
241
|
-
try {
|
|
242
|
-
i.call();
|
|
243
|
-
} catch (p) {
|
|
244
|
-
n = p;
|
|
245
|
-
}
|
|
246
|
-
e.call(i.prototype);
|
|
247
|
-
}
|
|
248
|
-
} else {
|
|
249
|
-
try {
|
|
250
|
-
throw Error();
|
|
251
|
-
} catch (p) {
|
|
252
|
-
n = p;
|
|
253
|
-
}
|
|
254
|
-
e();
|
|
255
|
-
}
|
|
256
|
-
} catch (p) {
|
|
257
|
-
if (p && n && typeof p.stack == "string") {
|
|
258
|
-
for (var a = p.stack.split(`
|
|
259
|
-
`), v = n.stack.split(`
|
|
260
|
-
`), s = a.length - 1, f = v.length - 1; s >= 1 && f >= 0 && a[s] !== v[f]; )
|
|
261
|
-
f--;
|
|
262
|
-
for (; s >= 1 && f >= 0; s--, f--)
|
|
263
|
-
if (a[s] !== v[f]) {
|
|
264
|
-
if (s !== 1 || f !== 1)
|
|
265
|
-
do
|
|
266
|
-
if (s--, f--, f < 0 || a[s] !== v[f]) {
|
|
267
|
-
var y = `
|
|
268
|
-
` + a[s].replace(" at new ", " at ");
|
|
269
|
-
return e.displayName && y.includes("<anonymous>") && (y = y.replace("<anonymous>", e.displayName)), typeof e == "function" && L.set(e, y), y;
|
|
270
|
-
}
|
|
271
|
-
while (s >= 1 && f >= 0);
|
|
272
|
-
break;
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
} finally {
|
|
276
|
-
B = !1, U.current = u, Le(), Error.prepareStackTrace = o;
|
|
277
|
-
}
|
|
278
|
-
var k = e ? e.displayName || e.name : "", S = k ? Y(k) : "";
|
|
279
|
-
return typeof e == "function" && L.set(e, S), S;
|
|
280
|
-
}
|
|
281
|
-
function Me(e, r, t) {
|
|
282
|
-
return fe(e, !1);
|
|
283
|
-
}
|
|
284
|
-
function Ue(e) {
|
|
285
|
-
var r = e.prototype;
|
|
286
|
-
return !!(r && r.isReactComponent);
|
|
287
|
-
}
|
|
288
|
-
function V(e, r, t) {
|
|
289
|
-
if (e == null)
|
|
290
|
-
return "";
|
|
291
|
-
if (typeof e == "function")
|
|
292
|
-
return fe(e, Ue(e));
|
|
293
|
-
if (typeof e == "string")
|
|
294
|
-
return Y(e);
|
|
295
|
-
switch (e) {
|
|
296
|
-
case C:
|
|
297
|
-
return Y("Suspense");
|
|
298
|
-
case g:
|
|
299
|
-
return Y("SuspenseList");
|
|
300
|
-
}
|
|
301
|
-
if (typeof e == "object")
|
|
302
|
-
switch (e.$$typeof) {
|
|
303
|
-
case l:
|
|
304
|
-
return Me(e.render);
|
|
305
|
-
case _:
|
|
306
|
-
return V(e.type, r, t);
|
|
307
|
-
case P: {
|
|
308
|
-
var n = e, o = n._payload, u = n._init;
|
|
309
|
-
try {
|
|
310
|
-
return V(u(o), r, t);
|
|
311
|
-
} catch {
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
return "";
|
|
316
|
-
}
|
|
317
|
-
var A = Object.prototype.hasOwnProperty, le = {}, ce = j.ReactDebugCurrentFrame;
|
|
318
|
-
function M(e) {
|
|
319
|
-
if (e) {
|
|
320
|
-
var r = e._owner, t = V(e.type, e._source, r ? r.type : null);
|
|
321
|
-
ce.setExtraStackFrame(t);
|
|
322
|
-
} else
|
|
323
|
-
ce.setExtraStackFrame(null);
|
|
324
|
-
}
|
|
325
|
-
function Ne(e, r, t, n, o) {
|
|
326
|
-
{
|
|
327
|
-
var u = Function.call.bind(A);
|
|
328
|
-
for (var i in e)
|
|
329
|
-
if (u(e, i)) {
|
|
330
|
-
var a = void 0;
|
|
331
|
-
try {
|
|
332
|
-
if (typeof e[i] != "function") {
|
|
333
|
-
var v = Error((n || "React class") + ": " + t + " type `" + i + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[i] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
334
|
-
throw v.name = "Invariant Violation", v;
|
|
335
|
-
}
|
|
336
|
-
a = e[i](r, i, n, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
337
|
-
} catch (s) {
|
|
338
|
-
a = s;
|
|
339
|
-
}
|
|
340
|
-
a && !(a instanceof Error) && (M(o), d("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", n || "React class", t, i, typeof a), M(null)), a instanceof Error && !(a.message in le) && (le[a.message] = !0, M(o), d("Failed %s type: %s", t, a.message), M(null));
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
var Be = Array.isArray;
|
|
345
|
-
function J(e) {
|
|
346
|
-
return Be(e);
|
|
347
|
-
}
|
|
348
|
-
function Je(e) {
|
|
349
|
-
{
|
|
350
|
-
var r = typeof Symbol == "function" && Symbol.toStringTag, t = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
351
|
-
return t;
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
function qe(e) {
|
|
355
|
-
try {
|
|
356
|
-
return de(e), !1;
|
|
357
|
-
} catch {
|
|
358
|
-
return !0;
|
|
359
|
-
}
|
|
360
|
-
}
|
|
361
|
-
function de(e) {
|
|
362
|
-
return "" + e;
|
|
363
|
-
}
|
|
364
|
-
function ve(e) {
|
|
365
|
-
if (qe(e))
|
|
366
|
-
return d("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Je(e)), de(e);
|
|
367
|
-
}
|
|
368
|
-
var pe = j.ReactCurrentOwner, Ge = {
|
|
369
|
-
key: !0,
|
|
370
|
-
ref: !0,
|
|
371
|
-
__self: !0,
|
|
372
|
-
__source: !0
|
|
373
|
-
}, ge, ye;
|
|
374
|
-
function Ke(e) {
|
|
375
|
-
if (A.call(e, "ref")) {
|
|
376
|
-
var r = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
377
|
-
if (r && r.isReactWarning)
|
|
378
|
-
return !1;
|
|
379
|
-
}
|
|
380
|
-
return e.ref !== void 0;
|
|
381
|
-
}
|
|
382
|
-
function ze(e) {
|
|
383
|
-
if (A.call(e, "key")) {
|
|
384
|
-
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
385
|
-
if (r && r.isReactWarning)
|
|
386
|
-
return !1;
|
|
387
|
-
}
|
|
388
|
-
return e.key !== void 0;
|
|
389
|
-
}
|
|
390
|
-
function Xe(e, r) {
|
|
391
|
-
typeof e.ref == "string" && pe.current;
|
|
392
|
-
}
|
|
393
|
-
function He(e, r) {
|
|
394
|
-
{
|
|
395
|
-
var t = function() {
|
|
396
|
-
ge || (ge = !0, d("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
|
|
397
|
-
};
|
|
398
|
-
t.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
399
|
-
get: t,
|
|
400
|
-
configurable: !0
|
|
401
|
-
});
|
|
402
|
-
}
|
|
403
|
-
}
|
|
404
|
-
function Ze(e, r) {
|
|
405
|
-
{
|
|
406
|
-
var t = function() {
|
|
407
|
-
ye || (ye = !0, d("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
|
|
408
|
-
};
|
|
409
|
-
t.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
410
|
-
get: t,
|
|
411
|
-
configurable: !0
|
|
412
|
-
});
|
|
413
|
-
}
|
|
414
|
-
}
|
|
415
|
-
var Qe = function(e, r, t, n, o, u, i) {
|
|
416
|
-
var a = {
|
|
417
|
-
// This tag allows us to uniquely identify this as a React Element
|
|
418
|
-
$$typeof: E,
|
|
419
|
-
// Built-in properties that belong on the element
|
|
420
|
-
type: e,
|
|
421
|
-
key: r,
|
|
422
|
-
ref: t,
|
|
423
|
-
props: i,
|
|
424
|
-
// Record the component responsible for creating this element.
|
|
425
|
-
_owner: u
|
|
426
|
-
};
|
|
427
|
-
return a._store = {}, Object.defineProperty(a._store, "validated", {
|
|
428
|
-
configurable: !1,
|
|
429
|
-
enumerable: !1,
|
|
430
|
-
writable: !0,
|
|
431
|
-
value: !1
|
|
432
|
-
}), Object.defineProperty(a, "_self", {
|
|
433
|
-
configurable: !1,
|
|
434
|
-
enumerable: !1,
|
|
435
|
-
writable: !1,
|
|
436
|
-
value: n
|
|
437
|
-
}), Object.defineProperty(a, "_source", {
|
|
438
|
-
configurable: !1,
|
|
439
|
-
enumerable: !1,
|
|
440
|
-
writable: !1,
|
|
441
|
-
value: o
|
|
442
|
-
}), Object.freeze && (Object.freeze(a.props), Object.freeze(a)), a;
|
|
443
|
-
};
|
|
444
|
-
function er(e, r, t, n, o) {
|
|
445
|
-
{
|
|
446
|
-
var u, i = {}, a = null, v = null;
|
|
447
|
-
t !== void 0 && (ve(t), a = "" + t), ze(r) && (ve(r.key), a = "" + r.key), Ke(r) && (v = r.ref, Xe(r, o));
|
|
448
|
-
for (u in r)
|
|
449
|
-
A.call(r, u) && !Ge.hasOwnProperty(u) && (i[u] = r[u]);
|
|
450
|
-
if (e && e.defaultProps) {
|
|
451
|
-
var s = e.defaultProps;
|
|
452
|
-
for (u in s)
|
|
453
|
-
i[u] === void 0 && (i[u] = s[u]);
|
|
454
|
-
}
|
|
455
|
-
if (a || v) {
|
|
456
|
-
var f = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
457
|
-
a && He(i, f), v && Ze(i, f);
|
|
458
|
-
}
|
|
459
|
-
return Qe(e, a, v, o, n, pe.current, i);
|
|
460
|
-
}
|
|
461
|
-
}
|
|
462
|
-
var q = j.ReactCurrentOwner, Ee = j.ReactDebugCurrentFrame;
|
|
463
|
-
function x(e) {
|
|
464
|
-
if (e) {
|
|
465
|
-
var r = e._owner, t = V(e.type, e._source, r ? r.type : null);
|
|
466
|
-
Ee.setExtraStackFrame(t);
|
|
467
|
-
} else
|
|
468
|
-
Ee.setExtraStackFrame(null);
|
|
469
|
-
}
|
|
470
|
-
var G;
|
|
471
|
-
G = !1;
|
|
472
|
-
function K(e) {
|
|
473
|
-
return typeof e == "object" && e !== null && e.$$typeof === E;
|
|
474
|
-
}
|
|
475
|
-
function Re() {
|
|
476
|
-
{
|
|
477
|
-
if (q.current) {
|
|
478
|
-
var e = T(q.current.type);
|
|
479
|
-
if (e)
|
|
480
|
-
return `
|
|
481
|
-
|
|
482
|
-
Check the render method of \`` + e + "`.";
|
|
483
|
-
}
|
|
484
|
-
return "";
|
|
485
|
-
}
|
|
486
|
-
}
|
|
487
|
-
function rr(e) {
|
|
488
|
-
return "";
|
|
489
|
-
}
|
|
490
|
-
var _e = {};
|
|
491
|
-
function tr(e) {
|
|
492
|
-
{
|
|
493
|
-
var r = Re();
|
|
494
|
-
if (!r) {
|
|
495
|
-
var t = typeof e == "string" ? e : e.displayName || e.name;
|
|
496
|
-
t && (r = `
|
|
497
|
-
|
|
498
|
-
Check the top-level render call using <` + t + ">.");
|
|
499
|
-
}
|
|
500
|
-
return r;
|
|
501
|
-
}
|
|
502
|
-
}
|
|
503
|
-
function be(e, r) {
|
|
504
|
-
{
|
|
505
|
-
if (!e._store || e._store.validated || e.key != null)
|
|
506
|
-
return;
|
|
507
|
-
e._store.validated = !0;
|
|
508
|
-
var t = tr(r);
|
|
509
|
-
if (_e[t])
|
|
510
|
-
return;
|
|
511
|
-
_e[t] = !0;
|
|
512
|
-
var n = "";
|
|
513
|
-
e && e._owner && e._owner !== q.current && (n = " It was passed a child from " + T(e._owner.type) + "."), x(e), d('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, n), x(null);
|
|
514
|
-
}
|
|
515
|
-
}
|
|
516
|
-
function he(e, r) {
|
|
517
|
-
{
|
|
518
|
-
if (typeof e != "object")
|
|
519
|
-
return;
|
|
520
|
-
if (J(e))
|
|
521
|
-
for (var t = 0; t < e.length; t++) {
|
|
522
|
-
var n = e[t];
|
|
523
|
-
K(n) && be(n, r);
|
|
524
|
-
}
|
|
525
|
-
else if (K(e))
|
|
526
|
-
e._store && (e._store.validated = !0);
|
|
527
|
-
else if (e) {
|
|
528
|
-
var o = je(e);
|
|
529
|
-
if (typeof o == "function" && o !== e.entries)
|
|
530
|
-
for (var u = o.call(e), i; !(i = u.next()).done; )
|
|
531
|
-
K(i.value) && be(i.value, r);
|
|
532
|
-
}
|
|
533
|
-
}
|
|
534
|
-
}
|
|
535
|
-
function nr(e) {
|
|
536
|
-
{
|
|
537
|
-
var r = e.type;
|
|
538
|
-
if (r == null || typeof r == "string")
|
|
539
|
-
return;
|
|
540
|
-
var t;
|
|
541
|
-
if (typeof r == "function")
|
|
542
|
-
t = r.propTypes;
|
|
543
|
-
else if (typeof r == "object" && (r.$$typeof === l || // Note: Memo only checks outer props here.
|
|
544
|
-
// Inner props are checked in the reconciler.
|
|
545
|
-
r.$$typeof === _))
|
|
546
|
-
t = r.propTypes;
|
|
547
|
-
else
|
|
548
|
-
return;
|
|
549
|
-
if (t) {
|
|
550
|
-
var n = T(r);
|
|
551
|
-
Ne(t, e.props, "prop", n, e);
|
|
552
|
-
} else if (r.PropTypes !== void 0 && !G) {
|
|
553
|
-
G = !0;
|
|
554
|
-
var o = T(r);
|
|
555
|
-
d("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", o || "Unknown");
|
|
556
|
-
}
|
|
557
|
-
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && d("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
558
|
-
}
|
|
559
|
-
}
|
|
560
|
-
function ar(e) {
|
|
561
|
-
{
|
|
562
|
-
for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
|
|
563
|
-
var n = r[t];
|
|
564
|
-
if (n !== "children" && n !== "key") {
|
|
565
|
-
x(e), d("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), x(null);
|
|
566
|
-
break;
|
|
567
|
-
}
|
|
568
|
-
}
|
|
569
|
-
e.ref !== null && (x(e), d("Invalid attribute `ref` supplied to `React.Fragment`."), x(null));
|
|
570
|
-
}
|
|
571
|
-
}
|
|
572
|
-
var me = {};
|
|
573
|
-
function Te(e, r, t, n, o, u) {
|
|
574
|
-
{
|
|
575
|
-
var i = $e(e);
|
|
576
|
-
if (!i) {
|
|
577
|
-
var a = "";
|
|
578
|
-
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (a += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
579
|
-
var v = rr();
|
|
580
|
-
v ? a += v : a += Re();
|
|
581
|
-
var s;
|
|
582
|
-
e === null ? s = "null" : J(e) ? s = "array" : e !== void 0 && e.$$typeof === E ? (s = "<" + (T(e.type) || "Unknown") + " />", a = " Did you accidentally export a JSX literal instead of a component?") : s = typeof e, d("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", s, a);
|
|
583
|
-
}
|
|
584
|
-
var f = er(e, r, t, o, u);
|
|
585
|
-
if (f == null)
|
|
586
|
-
return f;
|
|
587
|
-
if (i) {
|
|
588
|
-
var y = r.children;
|
|
589
|
-
if (y !== void 0)
|
|
590
|
-
if (n)
|
|
591
|
-
if (J(y)) {
|
|
592
|
-
for (var k = 0; k < y.length; k++)
|
|
593
|
-
he(y[k], e);
|
|
594
|
-
Object.freeze && Object.freeze(y);
|
|
595
|
-
} else
|
|
596
|
-
d("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
597
|
-
else
|
|
598
|
-
he(y, e);
|
|
599
|
-
}
|
|
600
|
-
if (A.call(r, "key")) {
|
|
601
|
-
var S = T(e), p = Object.keys(r).filter(function(lr) {
|
|
602
|
-
return lr !== "key";
|
|
603
|
-
}), z = p.length > 0 ? "{key: someKey, " + p.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
604
|
-
if (!me[S + z]) {
|
|
605
|
-
var fr = p.length > 0 ? "{" + p.join(": ..., ") + ": ...}" : "{}";
|
|
606
|
-
d(`A props object containing a "key" prop is being spread into JSX:
|
|
607
|
-
let props = %s;
|
|
608
|
-
<%s {...props} />
|
|
609
|
-
React keys must be passed directly to JSX without using spread:
|
|
610
|
-
let props = %s;
|
|
611
|
-
<%s key={someKey} {...props} />`, z, S, fr, S), me[S + z] = !0;
|
|
612
|
-
}
|
|
613
|
-
}
|
|
614
|
-
return e === b ? ar(f) : nr(f), f;
|
|
615
|
-
}
|
|
616
|
-
}
|
|
617
|
-
function ir(e, r, t) {
|
|
618
|
-
return Te(e, r, t, !0);
|
|
619
|
-
}
|
|
620
|
-
function or(e, r, t) {
|
|
621
|
-
return Te(e, r, t, !1);
|
|
622
|
-
}
|
|
623
|
-
var ur = or, sr = ir;
|
|
624
|
-
$.Fragment = b, $.jsx = ur, $.jsxs = sr;
|
|
625
|
-
}()), $;
|
|
626
|
-
}
|
|
627
|
-
process.env.NODE_ENV === "production" ? H.exports = dr() : H.exports = vr();
|
|
628
|
-
var pr = H.exports;
|
|
629
|
-
const Er = ({
|
|
630
|
-
provider: O,
|
|
631
|
-
config: E = {},
|
|
632
|
-
className: D,
|
|
633
|
-
style: b,
|
|
634
|
-
onSort: h,
|
|
635
|
-
onSelectionChange: m
|
|
1
|
+
import { jsx as p } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as m, useEffect as s } from "react";
|
|
3
|
+
import { SciGrid as R } from "@sci-grid/core";
|
|
4
|
+
const G = ({
|
|
5
|
+
provider: t,
|
|
6
|
+
config: e = {},
|
|
7
|
+
className: l,
|
|
8
|
+
style: n,
|
|
9
|
+
onSort: u,
|
|
10
|
+
onSelectionChange: c,
|
|
11
|
+
onContextMenu: f
|
|
636
12
|
}) => {
|
|
637
|
-
const
|
|
638
|
-
return
|
|
639
|
-
...
|
|
640
|
-
onSort:
|
|
641
|
-
onSelectionChange:
|
|
13
|
+
const i = m(null), r = m(null);
|
|
14
|
+
return s(() => (i.current && (r.current = new R(i.current, t, {
|
|
15
|
+
...e,
|
|
16
|
+
onSort: u,
|
|
17
|
+
onSelectionChange: c,
|
|
18
|
+
onContextMenu: f
|
|
642
19
|
})), () => {
|
|
643
|
-
var
|
|
644
|
-
(
|
|
645
|
-
}), []),
|
|
646
|
-
|
|
647
|
-
}, [
|
|
648
|
-
|
|
649
|
-
...
|
|
650
|
-
onSort:
|
|
651
|
-
onSelectionChange:
|
|
20
|
+
var d;
|
|
21
|
+
(d = r.current) == null || d.destroy(), r.current = null;
|
|
22
|
+
}), []), s(() => {
|
|
23
|
+
r.current && r.current.updateProvider(t);
|
|
24
|
+
}, [t]), s(() => {
|
|
25
|
+
r.current && r.current.updateConfig({
|
|
26
|
+
...e,
|
|
27
|
+
onSort: u,
|
|
28
|
+
onSelectionChange: c,
|
|
29
|
+
onContextMenu: f
|
|
652
30
|
});
|
|
653
|
-
}, [
|
|
31
|
+
}, [e, u, c, f]), /* @__PURE__ */ p(
|
|
654
32
|
"div",
|
|
655
33
|
{
|
|
656
|
-
ref:
|
|
657
|
-
className:
|
|
658
|
-
style: { width: "100%", height: "100%", ...
|
|
34
|
+
ref: i,
|
|
35
|
+
className: l,
|
|
36
|
+
style: { width: "100%", height: "100%", ...n }
|
|
659
37
|
}
|
|
660
38
|
);
|
|
661
39
|
};
|
|
662
40
|
export {
|
|
663
|
-
|
|
41
|
+
G as SciGridReact
|
|
664
42
|
};
|
|
@@ -7,10 +7,11 @@ interface SciGridReactProps {
|
|
|
7
7
|
style?: CSSProperties;
|
|
8
8
|
onSort?: (col: number, order: 'asc' | 'desc' | null) => void;
|
|
9
9
|
onSelectionChange?: (info: any) => void;
|
|
10
|
+
onContextMenu?: (row: number, col: number, e: MouseEvent) => void;
|
|
10
11
|
}
|
|
11
12
|
/**
|
|
12
13
|
* SciGrid React Adapter
|
|
13
14
|
* High-performance data grid component for React applications.
|
|
14
15
|
*/
|
|
15
|
-
export declare const SciGridReact: ({ provider, config, className, style, onSort, onSelectionChange }: SciGridReactProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare const SciGridReact: ({ provider, config, className, style, onSort, onSelectionChange, onContextMenu }: SciGridReactProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
17
|
export {};
|
package/package.json
CHANGED
|
@@ -1,14 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sci-grid/react",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist",
|
|
10
|
+
"README.md"
|
|
11
|
+
],
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"types": "./dist/index.d.ts",
|
|
15
|
+
"import": "./dist/index.js",
|
|
16
|
+
"require": "./dist/index.cjs"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
8
19
|
"peerDependencies": {
|
|
9
20
|
"react": ">=18.0.0",
|
|
10
21
|
"react-dom": ">=18.0.0",
|
|
11
|
-
"@sci-grid/core": "1.0.
|
|
22
|
+
"@sci-grid/core": "1.0.5"
|
|
12
23
|
},
|
|
13
24
|
"devDependencies": {
|
|
14
25
|
"react": "^18.3.1",
|
package/CHANGELOG.md
DELETED
package/src/index.test.tsx
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect } from 'vitest';
|
|
2
|
-
import { render } from '@testing-library/react';
|
|
3
|
-
import { SciGridReact } from './index.js';
|
|
4
|
-
|
|
5
|
-
describe('SciGrid React Adapter', () => {
|
|
6
|
-
const mockProvider = {
|
|
7
|
-
getRowCount: () => 10,
|
|
8
|
-
getColumnCount: () => 5,
|
|
9
|
-
getCellData: (r: number, c: number) => `Data ${r},${c}`,
|
|
10
|
-
getHeader: (c: number) => ({ name: `Col ${c}` })
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
it('should update the underlying grid when provider changes', () => {
|
|
14
|
-
const { rerender } = render(<SciGridReact provider={mockProvider} />);
|
|
15
|
-
|
|
16
|
-
const newProvider = { ...mockProvider, getRowCount: () => 100 };
|
|
17
|
-
|
|
18
|
-
// We can't easily access the internal gridRef,
|
|
19
|
-
// but we can check if it still renders a canvas after update
|
|
20
|
-
rerender(<SciGridReact provider={newProvider} />);
|
|
21
|
-
expect(document.querySelector('canvas')).toBeDefined();
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
it('should respect custom styling and class names', () => {
|
|
25
|
-
const { container } = render(
|
|
26
|
-
<SciGridReact
|
|
27
|
-
provider={mockProvider}
|
|
28
|
-
className="custom-grid"
|
|
29
|
-
style={{ opacity: 0.5 }}
|
|
30
|
-
/>
|
|
31
|
-
);
|
|
32
|
-
const el = container.firstChild as HTMLElement;
|
|
33
|
-
expect(el.classList.contains('custom-grid')).toBe(true);
|
|
34
|
-
expect(el.style.opacity).toBe('0.5');
|
|
35
|
-
});
|
|
36
|
-
});
|
package/src/index.tsx
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { useRef, useEffect, type CSSProperties } from 'react';
|
|
2
|
-
import { SciGrid } from '@sci-grid/core';
|
|
3
|
-
import type { GridConfig, IDataGridProvider } from '@sci-grid/core';
|
|
4
|
-
|
|
5
|
-
interface SciGridReactProps {
|
|
6
|
-
provider: IDataGridProvider;
|
|
7
|
-
config?: Partial<GridConfig>;
|
|
8
|
-
className?: string;
|
|
9
|
-
style?: CSSProperties;
|
|
10
|
-
onSort?: (col: number, order: 'asc' | 'desc' | null) => void;
|
|
11
|
-
onSelectionChange?: (info: any) => void;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* SciGrid React Adapter
|
|
16
|
-
* High-performance data grid component for React applications.
|
|
17
|
-
*/
|
|
18
|
-
export const SciGridReact = ({
|
|
19
|
-
provider,
|
|
20
|
-
config = {},
|
|
21
|
-
className,
|
|
22
|
-
style,
|
|
23
|
-
onSort,
|
|
24
|
-
onSelectionChange
|
|
25
|
-
}: SciGridReactProps) => {
|
|
26
|
-
const containerRef = useRef<HTMLDivElement>(null);
|
|
27
|
-
const gridRef = useRef<SciGrid | null>(null);
|
|
28
|
-
|
|
29
|
-
useEffect(() => {
|
|
30
|
-
if (containerRef.current) {
|
|
31
|
-
gridRef.current = new SciGrid(containerRef.current, provider, {
|
|
32
|
-
...config,
|
|
33
|
-
onSort,
|
|
34
|
-
onSelectionChange
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
return () => {
|
|
38
|
-
gridRef.current?.destroy();
|
|
39
|
-
gridRef.current = null;
|
|
40
|
-
};
|
|
41
|
-
}, []); // Only on mount
|
|
42
|
-
|
|
43
|
-
// Handle provider updates
|
|
44
|
-
useEffect(() => {
|
|
45
|
-
if (gridRef.current) {
|
|
46
|
-
gridRef.current.updateProvider(provider);
|
|
47
|
-
}
|
|
48
|
-
}, [provider]);
|
|
49
|
-
|
|
50
|
-
// Handle config & callback updates
|
|
51
|
-
useEffect(() => {
|
|
52
|
-
if (gridRef.current) {
|
|
53
|
-
gridRef.current.updateConfig({
|
|
54
|
-
...config,
|
|
55
|
-
onSort,
|
|
56
|
-
onSelectionChange
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
}, [config, onSort, onSelectionChange]);
|
|
60
|
-
|
|
61
|
-
return (
|
|
62
|
-
<div
|
|
63
|
-
ref={containerRef}
|
|
64
|
-
className={className}
|
|
65
|
-
style={{ width: '100%', height: '100%', ...style }}
|
|
66
|
-
/>
|
|
67
|
-
);
|
|
68
|
-
};
|
package/src/test-setup.ts
DELETED
package/tsconfig.json
DELETED
package/vite.config.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from 'vite';
|
|
2
|
-
import react from '@vitejs/plugin-react';
|
|
3
|
-
import dts from 'vite-plugin-dts';
|
|
4
|
-
import { resolve } from 'path';
|
|
5
|
-
|
|
6
|
-
export default defineConfig({
|
|
7
|
-
plugins: [react(), dts()],
|
|
8
|
-
build: {
|
|
9
|
-
lib: {
|
|
10
|
-
entry: resolve(__dirname, 'src/index.tsx'),
|
|
11
|
-
name: 'SciGridReact',
|
|
12
|
-
fileName: 'index',
|
|
13
|
-
formats: ['es', 'cjs']
|
|
14
|
-
},
|
|
15
|
-
rollupOptions: {
|
|
16
|
-
external: ['react', 'react-dom', '@sci-grid/core'],
|
|
17
|
-
output: {
|
|
18
|
-
globals: {
|
|
19
|
-
react: 'React',
|
|
20
|
-
'react-dom': 'ReactDOM',
|
|
21
|
-
'@sci-grid/core': 'SciGrid'
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
});
|