gridjs-react
Advanced tools
Comparing version 5.1.0 to 5.1.1
import * as React from 'react'; | ||
import { createRef, Component } from 'react'; | ||
import { Grid as Grid$1, h, createRef as createRef$1, Component as Component$1 } from 'gridjs'; | ||
import require$$0 from 'react-dom'; | ||
import ReactDOM from 'react-dom'; | ||
/****************************************************************************** | ||
/*! ***************************************************************************** | ||
Copyright (c) Microsoft Corporation. | ||
@@ -62,20 +62,2 @@ | ||
var createRoot; | ||
var m = require$$0; | ||
if (process.env.NODE_ENV === 'production') { | ||
createRoot = m.createRoot; | ||
m.hydrateRoot; | ||
} else { | ||
var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; | ||
createRoot = function(c, o) { | ||
i.usingClientEntryPoint = true; | ||
try { | ||
return m.createRoot(c, o); | ||
} finally { | ||
i.usingClientEntryPoint = false; | ||
} | ||
}; | ||
} | ||
var ReactWrapper = /** @class */ (function (_super) { | ||
@@ -89,4 +71,3 @@ __extends(ReactWrapper, _super); | ||
ReactWrapper.prototype.componentDidMount = function () { | ||
var root = createRoot(this.ref.current); | ||
root.render(this.props.element); | ||
ReactDOM.render(this.props.element, this.ref.current); | ||
}; | ||
@@ -93,0 +74,0 @@ ReactWrapper.prototype.render = function () { |
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('gridjs'), require('react-dom')) : | ||
typeof define === 'function' && define.amd ? define(['exports', 'react', 'gridjs', 'react-dom'], factory) : | ||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.gridjs = {}, global.React, global.gridjs, global.require$$0)); | ||
})(this, (function (exports, React, gridjs, require$$0) { 'use strict'; | ||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.gridjs = {}, global.React, global.gridjs, global.ReactDOM)); | ||
}(this, (function (exports, React, gridjs, ReactDOM) { 'use strict'; | ||
@@ -18,3 +18,5 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } | ||
enumerable: true, | ||
get: function () { return e[k]; } | ||
get: function () { | ||
return e[k]; | ||
} | ||
}); | ||
@@ -24,3 +26,3 @@ } | ||
} | ||
n["default"] = e; | ||
n['default'] = e; | ||
return Object.freeze(n); | ||
@@ -30,5 +32,5 @@ } | ||
var React__namespace = /*#__PURE__*/_interopNamespace(React); | ||
var require$$0__default = /*#__PURE__*/_interopDefaultLegacy(require$$0); | ||
var ReactDOM__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOM); | ||
/****************************************************************************** | ||
/*! ***************************************************************************** | ||
Copyright (c) Microsoft Corporation. | ||
@@ -89,20 +91,2 @@ | ||
var createRoot; | ||
var m = require$$0__default["default"]; | ||
if (process.env.NODE_ENV === 'production') { | ||
createRoot = m.createRoot; | ||
m.hydrateRoot; | ||
} else { | ||
var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; | ||
createRoot = function(c, o) { | ||
i.usingClientEntryPoint = true; | ||
try { | ||
return m.createRoot(c, o); | ||
} finally { | ||
i.usingClientEntryPoint = false; | ||
} | ||
}; | ||
} | ||
var ReactWrapper = /** @class */ (function (_super) { | ||
@@ -116,4 +100,3 @@ __extends(ReactWrapper, _super); | ||
ReactWrapper.prototype.componentDidMount = function () { | ||
var root = createRoot(this.ref.current); | ||
root.render(this.props.element); | ||
ReactDOM__default['default'].render(this.props.element, this.ref.current); | ||
}; | ||
@@ -141,3 +124,3 @@ ReactWrapper.prototype.render = function () { | ||
})); | ||
}))); | ||
//# sourceMappingURL=gridjs.development.js.map |
@@ -1,2 +0,16 @@ | ||
import*as t from"react";import{createRef as r,Component as n}from"react";import{Grid as e,h as o,createRef as i,Component as p}from"gridjs";import c from"react-dom";var a=function(t,r){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])},a(t,r)};function u(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}a(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}var s,f=function(n){function o(t){var o=n.call(this,t)||this;return o.wrapper=r(),o.instance=null,o.instance=new e(t||{}),o}return u(o,n),o.prototype.getInstance=function(){return this.instance},o.prototype.componentDidMount=function(){this.instance.render(this.wrapper.current)},o.prototype.componentDidUpdate=function(){this.instance.updateConfig(this.props).forceRender()},o.prototype.render=function(){return t.createElement("div",{ref:this.wrapper})},o}(n),l=c;if("production"===process.env.NODE_ENV)s=l.createRoot,l.hydrateRoot;else{var y=l.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;s=function(t,r){y.usingClientEntryPoint=!0;try{return l.createRoot(t,r)}finally{y.usingClientEntryPoint=!1}}}var _=function(t){function r(){var r=null!==t&&t.apply(this,arguments)||this;return r.ref=i(),r}return u(r,t),r.prototype.componentDidMount=function(){s(this.ref.current).render(this.props.element)},r.prototype.render=function(){return o(this.props.parent,{ref:this.ref})},r.defaultProps={parent:"div"},r}(p);function d(t,r){return o(_,{element:t,parent:r})}export{f as Grid,_ as ReactWrapper,d as _}; | ||
import*as t from"react";import{createRef as r,Component as n}from"react";import{Grid as e,h as o,createRef as p,Component as i}from"gridjs";import c from"react-dom"; | ||
/*! ***************************************************************************** | ||
Copyright (c) Microsoft Corporation. | ||
Permission to use, copy, modify, and/or distribute this software for any | ||
purpose with or without fee is hereby granted. | ||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH | ||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY | ||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, | ||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM | ||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR | ||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR | ||
PERFORMANCE OF THIS SOFTWARE. | ||
***************************************************************************** */var u=function(t,r){return(u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])})(t,r)};function a(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}u(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}var s=function(n){function o(t){var o=n.call(this,t)||this;return o.wrapper=r(),o.instance=null,o.instance=new e(t||{}),o}return a(o,n),o.prototype.getInstance=function(){return this.instance},o.prototype.componentDidMount=function(){this.instance.render(this.wrapper.current)},o.prototype.componentDidUpdate=function(){this.instance.updateConfig(this.props).forceRender()},o.prototype.render=function(){return t.createElement("div",{ref:this.wrapper})},o}(n),f=function(t){function r(){var r=null!==t&&t.apply(this,arguments)||this;return r.ref=p(),r}return a(r,t),r.prototype.componentDidMount=function(){c.render(this.props.element,this.ref.current)},r.prototype.render=function(){return o(this.props.parent,{ref:this.ref})},r.defaultProps={parent:"div"},r}(i);function l(t,r){return o(f,{element:t,parent:r})}export{s as Grid,f as ReactWrapper,l as _}; | ||
//# sourceMappingURL=gridjs.production.es.min.js.map |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("gridjs"),require("react-dom")):"function"==typeof define&&define.amd?define(["exports","react","gridjs","react-dom"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).gridjs={},e.React,e.gridjs,e.require$$0)}(this,(function(e,t,r,n){"use strict";function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function i(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var u=i(t),c=o(n),p=function(e,t){return p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},p(e,t)};function f(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}p(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var a,s=function(e){function n(n){var o=e.call(this,n)||this;return o.wrapper=t.createRef(),o.instance=null,o.instance=new r.Grid(n||{}),o}return f(n,e),n.prototype.getInstance=function(){return this.instance},n.prototype.componentDidMount=function(){this.instance.render(this.wrapper.current)},n.prototype.componentDidUpdate=function(){this.instance.updateConfig(this.props).forceRender()},n.prototype.render=function(){return u.createElement("div",{ref:this.wrapper})},n}(t.Component),l=c.default;if("production"===process.env.NODE_ENV)a=l.createRoot,l.hydrateRoot;else{var d=l.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;a=function(e,t){d.usingClientEntryPoint=!0;try{return l.createRoot(e,t)}finally{d.usingClientEntryPoint=!1}}}var y=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.ref=r.createRef(),t}return f(t,e),t.prototype.componentDidMount=function(){a(this.ref.current).render(this.props.element)},t.prototype.render=function(){return r.h(this.props.parent,{ref:this.ref})},t.defaultProps={parent:"div"},t}(r.Component);e.Grid=s,e.ReactWrapper=y,e._=function(e,t){return r.h(y,{element:e,parent:t})},Object.defineProperty(e,"__esModule",{value:!0})})); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("gridjs"),require("react-dom")):"function"==typeof define&&define.amd?define(["exports","react","gridjs","react-dom"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).gridjs={},e.React,e.gridjs,e.ReactDOM)}(this,(function(e,t,r,n){"use strict";function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function i(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var c=i(t),u=o(n),p=function(e,t){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function f(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}p(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var a=function(e){function n(n){var o=e.call(this,n)||this;return o.wrapper=t.createRef(),o.instance=null,o.instance=new r.Grid(n||{}),o}return f(n,e),n.prototype.getInstance=function(){return this.instance},n.prototype.componentDidMount=function(){this.instance.render(this.wrapper.current)},n.prototype.componentDidUpdate=function(){this.instance.updateConfig(this.props).forceRender()},n.prototype.render=function(){return c.createElement("div",{ref:this.wrapper})},n}(t.Component),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.ref=r.createRef(),t}return f(t,e),t.prototype.componentDidMount=function(){u.default.render(this.props.element,this.ref.current)},t.prototype.render=function(){return r.h(this.props.parent,{ref:this.ref})},t.defaultProps={parent:"div"},t}(r.Component);e.Grid=a,e.ReactWrapper=s,e._=function(e,t){return r.h(s,{element:e,parent:t})},Object.defineProperty(e,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=gridjs.production.min.js.map |
{ | ||
"name": "gridjs-react", | ||
"version": "5.1.0", | ||
"version": "5.1.1", | ||
"description": "React component for Grid.js", | ||
@@ -25,3 +25,3 @@ "main": "dist/gridjs.production.min.js", | ||
"gridjs": "^5.1.0", | ||
"react": ">=18.x" | ||
"react": ">=17.x" | ||
}, | ||
@@ -40,4 +40,4 @@ "scripts": { | ||
"@testing-library/jest-dom": "^5.16.5", | ||
"@testing-library/react": "^13.3.0", | ||
"@types/jest": "^28.1.7", | ||
"@testing-library/react": "^12.1.5", | ||
"@types/jest": "^27.5.2", | ||
"@types/react": "^18.0.17", | ||
@@ -51,8 +51,8 @@ "@types/react-dom": "^18.0.6", | ||
"gridjs": "^5.1.0", | ||
"jest": "^28.1.3", | ||
"jest": "^27.5.1", | ||
"jsdom": "^20.0.0", | ||
"jsdom-global": "^3.0.2", | ||
"prettier": "^2.7.1", | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0", | ||
"react": "^17.0.2", | ||
"react-dom": "^17.0.2", | ||
"rimraf": "~3.0.2", | ||
@@ -64,3 +64,3 @@ "rollup": "^2.78.1", | ||
"source-map-loader": "^4.0.0", | ||
"ts-jest": "^28.0.8", | ||
"ts-jest": "^27.1.5", | ||
"ts-loader": "^9.3.1", | ||
@@ -67,0 +67,0 @@ "tslib": "^2.4.0", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
1
79441
12
219