react-data-matrix 0.4.0 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- (function(m,g){typeof exports=="object"&&typeof module<"u"?g(require("react")):typeof define=="function"&&define.amd?define(["react"],g):(m=typeof globalThis<"u"?globalThis:m||self,g(m.React))})(this,function(m){"use strict";var g={};/**
1
+ (function(F,D){typeof exports=="object"&&typeof module<"u"?module.exports=D(require("react")):typeof define=="function"&&define.amd?define(["react"],D):(F=typeof globalThis<"u"?globalThis:F||self,F["React Data Matrix"]=D(F.React))})(this,function(F){"use strict";var D={exports:{}},K={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.min.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var X;function Oe(){if(X)return g;X=1;var V=m,j=Symbol.for("react.element"),M=Symbol.for("react.fragment"),T=Object.prototype.hasOwnProperty,F=V.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,A={key:!0,ref:!0,__self:!0,__source:!0};function x(y,l,O){var v,h={},_=null,I=null;O!==void 0&&(_=""+O),l.key!==void 0&&(_=""+l.key),l.ref!==void 0&&(I=l.ref);for(v in l)T.call(l,v)&&!A.hasOwnProperty(v)&&(h[v]=l[v]);if(y&&y.defaultProps)for(v in l=y.defaultProps,l)h[v]===void 0&&(h[v]=l[v]);return{$$typeof:j,type:y,key:_,ref:I,props:h,_owner:F.current}}return g.Fragment=M,g.jsx=x,g.jsxs=x,g}var w={};/**
9
+ */var ve;function ze(){if(ve)return K;ve=1;var n=F,s=Symbol.for("react.element"),b=Symbol.for("react.fragment"),d=Object.prototype.hasOwnProperty,y=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,x={key:!0,ref:!0,__self:!0,__source:!0};function T(f,v,E){var h,g={},w=null,C=null;E!==void 0&&(w=""+E),v.key!==void 0&&(w=""+v.key),v.ref!==void 0&&(C=v.ref);for(h in v)d.call(v,h)&&!x.hasOwnProperty(h)&&(g[h]=v[h]);if(f&&f.defaultProps)for(h in v=f.defaultProps,v)g[h]===void 0&&(g[h]=v[h]);return{$$typeof:s,type:f,key:w,ref:C,props:g,_owner:y.current}}return K.Fragment=b,K.jsx=T,K.jsxs=T,K}var X={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,14 +14,15 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var Z;function Ce(){return Z||(Z=1,process.env.NODE_ENV!=="production"&&function(){var V=m,j=Symbol.for("react.element"),M=Symbol.for("react.portal"),T=Symbol.for("react.fragment"),F=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),x=Symbol.for("react.provider"),y=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),v=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),I=Symbol.for("react.offscreen"),Q=Symbol.iterator,Pe="@@iterator";function Se(e){if(e===null||typeof e!="object")return null;var r=Q&&e[Q]||e[Pe];return typeof r=="function"?r:null}var C=V.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function c(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];we("error",e,t)}}function we(e,r,t){{var n=C.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,ee;ee=Symbol.for("react.module.reference");function Ae(e){return!!(typeof e=="string"||typeof e=="function"||e===T||e===A||Fe||e===F||e===O||e===v||De||e===I||je||xe||ke||typeof e=="object"&&e!==null&&(e.$$typeof===_||e.$$typeof===h||e.$$typeof===x||e.$$typeof===y||e.$$typeof===l||e.$$typeof===ee||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 re(e){return e.displayName||"Context"}function b(e){if(e==null)return null;if(typeof e.tag=="number"&&c("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 T:return"Fragment";case M:return"Portal";case A:return"Profiler";case F:return"StrictMode";case O:return"Suspense";case v:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case y:var r=e;return re(r)+".Consumer";case x:var t=e;return re(t._context)+".Provider";case l:return Ie(e,e.render,"ForwardRef");case h:var n=e.displayName||null;return n!==null?n:b(e.type)||"Memo";case _:{var o=e,u=o._payload,i=o._init;try{return b(i(u))}catch{return null}}}return null}var R=Object.assign,k=0,te,ne,ae,ie,oe,ue,fe;function se(){}se.__reactDisabledLog=!0;function We(){{if(k===0){te=console.log,ne=console.info,ae=console.warn,ie=console.error,oe=console.group,ue=console.groupCollapsed,fe=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})}k++}}function Ye(){{if(k--,k===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:R({},e,{value:te}),info:R({},e,{value:ne}),warn:R({},e,{value:ae}),error:R({},e,{value:ie}),group:R({},e,{value:oe}),groupCollapsed:R({},e,{value:ue}),groupEnd:R({},e,{value:fe})})}k<0&&c("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var U=C.ReactCurrentDispatcher,B;function W(e,r,t){{if(B===void 0)try{throw Error()}catch(o){var n=o.stack.trim().match(/\n( *(at )?)/);B=n&&n[1]||""}return`
18
- `+B+e}}var q=!1,Y;{var $e=typeof WeakMap=="function"?WeakMap:Map;Y=new $e}function le(e,r){if(!e||q)return"";{var t=Y.get(e);if(t!==void 0)return t}var n;q=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var u;u=U.current,U.current=null,We();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(E){n=E}Reflect.construct(e,[],i)}else{try{i.call()}catch(E){n=E}e.call(i.prototype)}}else{try{throw Error()}catch(E){n=E}e()}}catch(E){if(E&&n&&typeof E.stack=="string"){for(var a=E.stack.split(`
19
- `),d=n.stack.split(`
20
- `),f=a.length-1,s=d.length-1;f>=1&&s>=0&&a[f]!==d[s];)s--;for(;f>=1&&s>=0;f--,s--)if(a[f]!==d[s]){if(f!==1||s!==1)do if(f--,s--,s<0||a[f]!==d[s]){var p=`
21
- `+a[f].replace(" at new "," at ");return e.displayName&&p.includes("<anonymous>")&&(p=p.replace("<anonymous>",e.displayName)),typeof e=="function"&&Y.set(e,p),p}while(f>=1&&s>=0);break}}}finally{q=!1,U.current=u,Ye(),Error.prepareStackTrace=o}var S=e?e.displayName||e.name:"",Te=S?W(S):"";return typeof e=="function"&&Y.set(e,Te),Te}function Le(e,r,t){return le(e,!1)}function Ne(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function $(e,r,t){if(e==null)return"";if(typeof e=="function")return le(e,Ne(e));if(typeof e=="string")return W(e);switch(e){case O:return W("Suspense");case v:return W("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case l:return Le(e.render);case h:return $(e.type,r,t);case _:{var n=e,o=n._payload,u=n._init;try{return $(u(o),r,t)}catch{}}}return""}var L=Object.prototype.hasOwnProperty,ce={},de=C.ReactDebugCurrentFrame;function N(e){if(e){var r=e._owner,t=$(e.type,e._source,r?r.type:null);de.setExtraStackFrame(t)}else de.setExtraStackFrame(null)}function Ve(e,r,t,n,o){{var u=Function.call.bind(L);for(var i in e)if(u(e,i)){var a=void 0;try{if(typeof e[i]!="function"){var d=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 d.name="Invariant Violation",d}a=e[i](r,i,n,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(f){a=f}a&&!(a instanceof Error)&&(N(o),c("%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),N(null)),a instanceof Error&&!(a.message in ce)&&(ce[a.message]=!0,N(o),c("Failed %s type: %s",t,a.message),N(null))}}}var Me=Array.isArray;function J(e){return Me(e)}function Ue(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function Be(e){try{return ve(e),!1}catch{return!0}}function ve(e){return""+e}function pe(e){if(Be(e))return c("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ue(e)),ve(e)}var D=C.ReactCurrentOwner,qe={key:!0,ref:!0,__self:!0,__source:!0},ge,he,G;G={};function Je(e){if(L.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function Ge(e){if(L.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function ze(e,r){if(typeof e.ref=="string"&&D.current&&r&&D.current.stateNode!==r){var t=b(D.current.type);G[t]||(c('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',b(D.current.type),e.ref),G[t]=!0)}}function Ke(e,r){{var t=function(){ge||(ge=!0,c("%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 He(e,r){{var t=function(){he||(he=!0,c("%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 Xe=function(e,r,t,n,o,u,i){var a={$$typeof:j,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,d=null;t!==void 0&&(pe(t),a=""+t),Ge(r)&&(pe(r.key),a=""+r.key),Je(r)&&(d=r.ref,ze(r,o));for(u in r)L.call(r,u)&&!qe.hasOwnProperty(u)&&(i[u]=r[u]);if(e&&e.defaultProps){var f=e.defaultProps;for(u in f)i[u]===void 0&&(i[u]=f[u])}if(a||d){var s=typeof e=="function"?e.displayName||e.name||"Unknown":e;a&&Ke(i,s),d&&He(i,s)}return Xe(e,a,d,o,n,D.current,i)}}var z=C.ReactCurrentOwner,be=C.ReactDebugCurrentFrame;function P(e){if(e){var r=e._owner,t=$(e.type,e._source,r?r.type:null);be.setExtraStackFrame(t)}else be.setExtraStackFrame(null)}var K;K=!1;function H(e){return typeof e=="object"&&e!==null&&e.$$typeof===j}function Ee(){{if(z.current){var e=b(z.current.type);if(e)return`
17
+ */var pe;function Ve(){return pe||(pe=1,process.env.NODE_ENV!=="production"&&function(){var n=F,s=Symbol.for("react.element"),b=Symbol.for("react.portal"),d=Symbol.for("react.fragment"),y=Symbol.for("react.strict_mode"),x=Symbol.for("react.profiler"),T=Symbol.for("react.provider"),f=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),E=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),g=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),C=Symbol.for("react.offscreen"),A=Symbol.iterator,O="@@iterator";function W(e){if(e===null||typeof e!="object")return null;var r=A&&e[A]||e[O];return typeof r=="function"?r:null}var $=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function _(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),a=1;a<r;a++)t[a-1]=arguments[a];Y("error",e,t)}}function Y(e,r,t){{var a=$.ReactDebugCurrentFrame,l=a.getStackAddendum();l!==""&&(r+="%s",t=t.concat([l]));var u=t.map(function(o){return String(o)});u.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,u)}}var P=!1,U=!1,B=!1,I=!1,z=!1,M;M=Symbol.for("react.module.reference");function V(e){return!!(typeof e=="string"||typeof e=="function"||e===d||e===x||z||e===y||e===E||e===h||I||e===C||P||U||B||typeof e=="object"&&e!==null&&(e.$$typeof===w||e.$$typeof===g||e.$$typeof===T||e.$$typeof===f||e.$$typeof===v||e.$$typeof===M||e.getModuleId!==void 0))}function q(e,r,t){var a=e.displayName;if(a)return a;var l=r.displayName||r.name||"";return l!==""?t+"("+l+")":t}function H(e){return e.displayName||"Context"}function S(e){if(e==null)return null;if(typeof e.tag=="number"&&_("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 d:return"Fragment";case b:return"Portal";case x:return"Profiler";case y:return"StrictMode";case E:return"Suspense";case h:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case f:var r=e;return H(r)+".Consumer";case T:var t=e;return H(t._context)+".Provider";case v:return q(e,e.render,"ForwardRef");case g:var a=e.displayName||null;return a!==null?a:S(e.type)||"Memo";case w:{var l=e,u=l._payload,o=l._init;try{return S(o(u))}catch{return null}}}return null}var L=Object.assign,Z=0,xe,Ee,Te,we,je,Ce,$e;function Pe(){}Pe.__reactDisabledLog=!0;function Xe(){{if(Z===0){xe=console.log,Ee=console.info,Te=console.warn,we=console.error,je=console.group,Ce=console.groupCollapsed,$e=console.groupEnd;var e={configurable:!0,enumerable:!0,value:Pe,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}Z++}}function Ze(){{if(Z--,Z===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:L({},e,{value:xe}),info:L({},e,{value:Ee}),warn:L({},e,{value:Te}),error:L({},e,{value:we}),group:L({},e,{value:je}),groupCollapsed:L({},e,{value:Ce}),groupEnd:L({},e,{value:$e})})}Z<0&&_("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ie=$.ReactCurrentDispatcher,oe;function ee(e,r,t){{if(oe===void 0)try{throw Error()}catch(l){var a=l.stack.trim().match(/\n( *(at )?)/);oe=a&&a[1]||""}return`
18
+ `+oe+e}}var se=!1,re;{var Qe=typeof WeakMap=="function"?WeakMap:Map;re=new Qe}function Oe(e,r){if(!e||se)return"";{var t=re.get(e);if(t!==void 0)return t}var a;se=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var u;u=ie.current,ie.current=null,Xe();try{if(r){var o=function(){throw Error()};if(Object.defineProperty(o.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(o,[])}catch(k){a=k}Reflect.construct(e,[],o)}else{try{o.call()}catch(k){a=k}e.call(o.prototype)}}else{try{throw Error()}catch(k){a=k}e()}}catch(k){if(k&&a&&typeof k.stack=="string"){for(var i=k.stack.split(`
19
+ `),R=a.stack.split(`
20
+ `),p=i.length-1,m=R.length-1;p>=1&&m>=0&&i[p]!==R[m];)m--;for(;p>=1&&m>=0;p--,m--)if(i[p]!==R[m]){if(p!==1||m!==1)do if(p--,m--,m<0||i[p]!==R[m]){var j=`
21
+ `+i[p].replace(" at new "," at ");return e.displayName&&j.includes("<anonymous>")&&(j=j.replace("<anonymous>",e.displayName)),typeof e=="function"&&re.set(e,j),j}while(p>=1&&m>=0);break}}}finally{se=!1,ie.current=u,Ze(),Error.prepareStackTrace=l}var G=e?e.displayName||e.name:"",Ie=G?ee(G):"";return typeof e=="function"&&re.set(e,Ie),Ie}function er(e,r,t){return Oe(e,!1)}function rr(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function te(e,r,t){if(e==null)return"";if(typeof e=="function")return Oe(e,rr(e));if(typeof e=="string")return ee(e);switch(e){case E:return ee("Suspense");case h:return ee("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case v:return er(e.render);case g:return te(e.type,r,t);case w:{var a=e,l=a._payload,u=a._init;try{return te(u(l),r,t)}catch{}}}return""}var ne=Object.prototype.hasOwnProperty,Se={},ke=$.ReactDebugCurrentFrame;function ae(e){if(e){var r=e._owner,t=te(e.type,e._source,r?r.type:null);ke.setExtraStackFrame(t)}else ke.setExtraStackFrame(null)}function tr(e,r,t,a,l){{var u=Function.call.bind(ne);for(var o in e)if(u(e,o)){var i=void 0;try{if(typeof e[o]!="function"){var R=Error((a||"React class")+": "+t+" type `"+o+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[o]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw R.name="Invariant Violation",R}i=e[o](r,o,a,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(p){i=p}i&&!(i instanceof Error)&&(ae(l),_("%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).",a||"React class",t,o,typeof i),ae(null)),i instanceof Error&&!(i.message in Se)&&(Se[i.message]=!0,ae(l),_("Failed %s type: %s",t,i.message),ae(null))}}}var nr=Array.isArray;function le(e){return nr(e)}function ar(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function ir(e){try{return Ae(e),!1}catch{return!0}}function Ae(e){return""+e}function Fe(e){if(ir(e))return _("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",ar(e)),Ae(e)}var Q=$.ReactCurrentOwner,or={key:!0,ref:!0,__self:!0,__source:!0},De,We,ue;ue={};function sr(e){if(ne.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function lr(e){if(ne.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function ur(e,r){if(typeof e.ref=="string"&&Q.current&&r&&Q.current.stateNode!==r){var t=S(Q.current.type);ue[t]||(_('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',S(Q.current.type),e.ref),ue[t]=!0)}}function cr(e,r){{var t=function(){De||(De=!0,_("%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 fr(e,r){{var t=function(){We||(We=!0,_("%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 dr=function(e,r,t,a,l,u,o){var i={$$typeof:s,type:e,key:r,ref:t,props:o,_owner:u};return i._store={},Object.defineProperty(i._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(i,"_self",{configurable:!1,enumerable:!1,writable:!1,value:a}),Object.defineProperty(i,"_source",{configurable:!1,enumerable:!1,writable:!1,value:l}),Object.freeze&&(Object.freeze(i.props),Object.freeze(i)),i};function vr(e,r,t,a,l){{var u,o={},i=null,R=null;t!==void 0&&(Fe(t),i=""+t),lr(r)&&(Fe(r.key),i=""+r.key),sr(r)&&(R=r.ref,ur(r,l));for(u in r)ne.call(r,u)&&!or.hasOwnProperty(u)&&(o[u]=r[u]);if(e&&e.defaultProps){var p=e.defaultProps;for(u in p)o[u]===void 0&&(o[u]=p[u])}if(i||R){var m=typeof e=="function"?e.displayName||e.name||"Unknown":e;i&&cr(o,m),R&&fr(o,m)}return dr(e,i,R,l,a,Q.current,o)}}var ce=$.ReactCurrentOwner,Ye=$.ReactDebugCurrentFrame;function J(e){if(e){var r=e._owner,t=te(e.type,e._source,r?r.type:null);Ye.setExtraStackFrame(t)}else Ye.setExtraStackFrame(null)}var fe;fe=!1;function de(e){return typeof e=="object"&&e!==null&&e.$$typeof===s}function Me(){{if(ce.current){var e=S(ce.current.type);if(e)return`
22
22
 
23
- Check the render method of \``+e+"`."}return""}}function Qe(e){{if(e!==void 0){var r=e.fileName.replace(/^.*[\\\/]/,""),t=e.lineNumber;return`
23
+ Check the render method of \``+e+"`."}return""}}function pr(e){{if(e!==void 0){var r=e.fileName.replace(/^.*[\\\/]/,""),t=e.lineNumber;return`
24
24
 
25
- Check your code at `+r+":"+t+"."}return""}}var ye={};function er(e){{var r=Ee();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
25
+ Check your code at `+r+":"+t+"."}return""}}var Le={};function hr(e){{var r=Me();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
26
26
 
27
- 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(ye[t])return;ye[t]=!0;var n="";e&&e._owner&&e._owner!==z.current&&(n=" It was passed a child from "+b(e._owner.type)+"."),P(e),c('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),P(null)}}function Re(e,r){{if(typeof e!="object")return;if(J(e))for(var t=0;t<e.length;t++){var n=e[t];H(n)&&_e(n,r)}else if(H(e))e._store&&(e._store.validated=!0);else if(e){var o=Se(e);if(typeof o=="function"&&o!==e.entries)for(var u=o.call(e),i;!(i=u.next()).done;)H(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===h))t=r.propTypes;else return;if(t){var n=b(r);Ve(t,e.props,"prop",n,e)}else if(r.PropTypes!==void 0&&!K){K=!0;var o=b(r);c("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",o||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&c("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"){P(e),c("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),P(null);break}}e.ref!==null&&(P(e),c("Invalid attribute `ref` supplied to `React.Fragment`."),P(null))}}function me(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 d=Qe(o);d?a+=d:a+=Ee();var f;e===null?f="null":J(e)?f="array":e!==void 0&&e.$$typeof===j?(f="<"+(b(e.type)||"Unknown")+" />",a=" Did you accidentally export a JSX literal instead of a component?"):f=typeof e,c("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",f,a)}var s=Ze(e,r,t,o,u);if(s==null)return s;if(i){var p=r.children;if(p!==void 0)if(n)if(J(p)){for(var S=0;S<p.length;S++)Re(p[S],e);Object.freeze&&Object.freeze(p)}else c("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 Re(p,e)}return e===T?tr(s):rr(s),s}}function nr(e,r,t){return me(e,r,t,!0)}function ar(e,r,t){return me(e,r,t,!1)}var ir=ar,or=nr;w.Fragment=T,w.jsx=ir,w.jsxs=or}()),w}process.env.NODE_ENV==="production"?Oe():Ce()});
27
+ Check the top-level render call using <`+t+">.")}return r}}function Ne(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=hr(r);if(Le[t])return;Le[t]=!0;var a="";e&&e._owner&&e._owner!==ce.current&&(a=" It was passed a child from "+S(e._owner.type)+"."),J(e),_('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,a),J(null)}}function Ue(e,r){{if(typeof e!="object")return;if(le(e))for(var t=0;t<e.length;t++){var a=e[t];de(a)&&Ne(a,r)}else if(de(e))e._store&&(e._store.validated=!0);else if(e){var l=W(e);if(typeof l=="function"&&l!==e.entries)for(var u=l.call(e),o;!(o=u.next()).done;)de(o.value)&&Ne(o.value,r)}}}function mr(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===v||r.$$typeof===g))t=r.propTypes;else return;if(t){var a=S(r);tr(t,e.props,"prop",a,e)}else if(r.PropTypes!==void 0&&!fe){fe=!0;var l=S(r);_("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",l||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&_("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function _r(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var a=r[t];if(a!=="children"&&a!=="key"){J(e),_("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",a),J(null);break}}e.ref!==null&&(J(e),_("Invalid attribute `ref` supplied to `React.Fragment`."),J(null))}}function Be(e,r,t,a,l,u){{var o=V(e);if(!o){var i="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(i+=" 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 R=pr(l);R?i+=R:i+=Me();var p;e===null?p="null":le(e)?p="array":e!==void 0&&e.$$typeof===s?(p="<"+(S(e.type)||"Unknown")+" />",i=" Did you accidentally export a JSX literal instead of a component?"):p=typeof e,_("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",p,i)}var m=vr(e,r,t,l,u);if(m==null)return m;if(o){var j=r.children;if(j!==void 0)if(a)if(le(j)){for(var G=0;G<j.length;G++)Ue(j[G],e);Object.freeze&&Object.freeze(j)}else _("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 Ue(j,e)}return e===d?_r(m):mr(m),m}}function br(e,r,t){return Be(e,r,t,!0)}function yr(e,r,t){return Be(e,r,t,!1)}var gr=yr,Rr=br;X.Fragment=d,X.jsx=gr,X.jsxs=Rr}()),X}process.env.NODE_ENV==="production"?D.exports=ze():D.exports=Ve();var c=D.exports;const N=n=>n||{},qe=(n,s)=>n?{top:"50%",left:"50%",height:"100%",textAlign:"center",position:"absolute",transform:"translate(-50%, -50%)",...s}:{...N(n)},He=n=>n?{border:"1px solid black"}:{},Je=(n,s)=>n?{width:"70rem",...s}:{...N(n)},he=(n,s)=>n?{borderWidth:"0",padding:"1rem 0 1rem 0",...s}:{...N(n)},me=(n,s)=>n?{borderColor:"black",borderStyle:"solid",padding:"10rem 0 0 0",borderWidth:"0 0 0 10px",...s}:{...N(n)},_e=(n,s)=>n?{padding:`0 ${.5}rem 0 ${.5}rem`,backgroundColor:"light-grey",border:"1px solid black",...s}:{...N(n)},be=(n,s)=>n?{fontSize:`${.9}em`,fontWeight:"normal",...s}:{...N(n)},ye=(n,s)=>{const b=new Map(Array.from(n,d=>[d[s],[]]));return n.forEach(d=>{const y=d[s];if(y!==void 0){const x=b.get(y);x&&x.push(d)}}),Array.from(b.values())},ge=n=>n.toUpperCase(),Ge=({data:n,hasInlineStyles:s=!0,headerPrimaryUpper:b=!0,thRowStyles:d={},thTitleStyles:y={},thSubTitleStyles:x={},thPrimaryTitleStyles:T={},customHeaderRowIdValue:f="",customDynamicHeaderTitleIdValue:v="",customDynamicSubHeaderTitleIdValue:E=""})=>{const h=me(s,d),g=_e(s,y),w=be(s,x),C=he(s,T),A=b?n==null?void 0:n.primary_header_title:ge(n==null?void 0:n.primary_header_title);return c.jsxs("thead",{children:[c.jsxs("tr",{id:"react-matrix-blank-headers-primary-title-row",children:[c.jsx("th",{headers:"blank",colSpan:4}),c.jsx("th",{style:C,id:"react-matrix-header-primary-title",children:A}),c.jsx("th",{headers:"blank",colSpan:2})]}),c.jsxs("tr",{style:h,id:`react-matrix-dynamic-headers-row-${f}`,children:[c.jsx("th",{headers:"blank",colSpan:2}),n.matrix_details.slice(0,n.matrix_size).map((O,W)=>c.jsxs("th",{scope:"col",style:g,id:`react-matrix-dynamic-column-header-title${v?`-${v}`:""}`,children:[O.header_title,c.jsx("div",{style:w,id:`react-matrix-dynamic-column-header-sub-title${E?`-${E}`:""}`,children:O.header_sub_title})]},`${O.id}-${W}`))]})]})},Ke=({data:n,tdStyles:s={},hasInlineStyles:b=!0,customTableDataDynamicIdValue:d=""})=>{const y=f=>{alert(`${f==null?void 0:f.description}, ${f==null?void 0:f.score_value}
28
+ ${f==null?void 0:f.response}`)},T=b?{cursor:"pointer",textAlign:"center",borderColor:"black",borderStyle:"solid",borderWidth:"1px",backgroundColor:n==null?void 0:n.colour,...s}:{...s||{}};return c.jsx(c.Fragment,{children:c.jsxs("td",{style:T,onClick:()=>y(n),id:`react-matrix-dynamic-table-data${d?`-${d}`:""}`,children:[`${n==null?void 0:n.description}`,c.jsx("br",{}),`(${n==null?void 0:n.score_value})`]})})},Re=({data:n,rowPrimaryUpper:s=!0,hasInlineStyles:b=!0,reverseMatrixValues:d=!0,trRowStyles:y={},trTitleStyles:x={},trSubTitleStyles:T={},trPrimaryTitleStyles:f={},tdStyles:v={},customRowDynamicIdValue:E="",customRowHeaderDynamicIdValue:h="",customTableDataDynamicIdValue:g=""})=>{const w=d?ye(n.matrix_values,"likelihood_descriptor").reverse().slice(0,n.matrix_size):ye(n.matrix_values,"likelihood_descriptor").slice(0,n.matrix_size),C=me(b,y),A=_e(b,x),O=be(b,T),W=he(b,f),$=s?ge(n.primary_row_header_title):n.primary_row_header_title;return c.jsxs("tbody",{children:[c.jsx("tr",{id:"react-matrix-row-primary-title",children:c.jsx("th",{scope:"row",rowSpan:6,style:W,children:$})}),w.map((_,Y)=>{var U,B,I,z,M,V;const P=d?n.matrix_size-(Y+1):Y;return c.jsxs("tr",{style:C,id:`react-matrix-dynamic-rows-${(U=n.matrix_details[P])==null?void 0:U.row_header_title}-${(B=n.matrix_details[P])==null?void 0:B.row_header_sub_title}${E?`-${E}`:""}`,children:[c.jsxs("th",{scope:"row",style:A,id:`react-matrix-dynamic-rows-${(I=n.matrix_details[P])==null?void 0:I.row_header_title}-${(z=n.matrix_details[P])==null?void 0:z.row_header_sub_title}${h?`-${h}`:""}`,children:[(M=n.matrix_details[P])==null?void 0:M.row_header_title,c.jsx("div",{style:O,children:(V=n.matrix_details[P])==null?void 0:V.row_header_sub_title})]}),_.slice(0,n.matrix_size).map((q,H)=>c.jsx(Ke,{data:q,tdStyles:v,hasInlineStyles:b,customTableDataDynamicIdValue:g},`${q.id}-${H}`))]},`row-${Y}`)})]})};return Re.defaultProps={},({data:n,tableStyles:s,hasTableBorder:b,hasInlineStyles:d,hasContainerStyles:y,tableContainerStyles:x,tableStyles:T={},hasInlineStyles:f=!0,headerPrimaryUpper:v=!0,thRowStyles:E={},thTitleStyles:h={},thSubTitleStyles:g={},thPrimaryTitleStyles:w={},customHeaderRowIdValue:C="",customDynamicHeaderTitleIdValue:A="",customDynamicSubHeaderTitleIdValue:O="",rowPrimaryUpper:W=!0,reverseMatrixValues:$=!0,trRowStyles:_={},trTitleStyles:Y={},trSubTitleStyles:P={},trPrimaryTitleStyles:U={},tdStyles:B={},customRowDynamicIdValue:I="",customRowHeaderDynamicIdValue:z="",customTableDataDynamicIdValue:M=""})=>{const V=He(!!(d&&b)),q=Je(!!(d&&s),T),H=qe(!!(d&&y),x??{});return c.jsxs("div",{style:H,children:[c.jsx("h1",{children:n.matrix_name}),c.jsx("h4",{children:n.matrix_description}),c.jsxs("table",{id:"matrix-table",style:{...q,...V},children:[c.jsx(Ge,{data:n,hasInlineStyles:f,headerPrimaryUpper:v,thRowStyles:E,thTitleStyles:h,thSubTitleStyles:g,thPrimaryTitleStyles:w,customHeaderRowIdValue:C,customDynamicHeaderTitleIdValue:A,customDynamicSubHeaderTitleIdValue:O}),c.jsx(Re,{data:n,rowPrimaryUpper:W,hasInlineStyles:f,reverseMatrixValues:$,trRowStyles:_,trTitleStyles:Y,trSubTitleStyles:P,trPrimaryTitleStyles:U,tdStyles:B,customRowDynamicIdValue:I,customRowHeaderDynamicIdValue:z,customTableDataDynamicIdValue:M})]})]})}});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-data-matrix",
3
- "version": "0.4.0",
3
+ "version": "0.4.2",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "homepage": "https://bronz3beard.github.io/react-matrix",