New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ag-grid-react

Package Overview
Dependencies
Maintainers
4
Versions
147
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ag-grid-react - npm Package Compare versions

Comparing version 23.0.2 to 23.0.3

2

lib/agGridColumn.d.ts

@@ -1,2 +0,2 @@

// ag-grid-react v23.0.2
// ag-grid-react v23.0.3
import { Component } from "react";

@@ -3,0 +3,0 @@ import * as AgGrid from "ag-grid-community";

@@ -1,2 +0,2 @@

// ag-grid-react v23.0.2
// ag-grid-react v23.0.3
"use strict";

@@ -3,0 +3,0 @@ var __extends = (this && this.__extends) || (function () {

@@ -1,2 +0,2 @@

// ag-grid-react v23.0.2
// ag-grid-react v23.0.3
import * as React from "react";

@@ -3,0 +3,0 @@ import { Component, ReactPortal } from "react";

@@ -1,2 +0,2 @@

// ag-grid-react v23.0.2
// ag-grid-react v23.0.3
"use strict";

@@ -3,0 +3,0 @@ var __extends = (this && this.__extends) || (function () {

@@ -1,2 +0,2 @@

// ag-grid-react v23.0.2
// ag-grid-react v23.0.3
import { IComponent, WrapableInterface } from 'ag-grid-community';

@@ -3,0 +3,0 @@ export declare abstract class BaseReactComponent implements IComponent<any>, WrapableInterface {

@@ -1,2 +0,2 @@

// ag-grid-react v23.0.2
// ag-grid-react v23.0.3
"use strict";

@@ -3,0 +3,0 @@ Object.defineProperty(exports, "__esModule", { value: true });

@@ -1,2 +0,2 @@

// ag-grid-react v23.0.2
// ag-grid-react v23.0.3
export declare enum ChangeDetectionStrategyType {

@@ -3,0 +3,0 @@ IdentityCheck = "IdentityCheck",

@@ -1,2 +0,2 @@

// ag-grid-react v23.0.2
// ag-grid-react v23.0.3
"use strict";

@@ -3,0 +3,0 @@ Object.defineProperty(exports, "__esModule", { value: true });

@@ -1,2 +0,2 @@

// ag-grid-react v23.0.2
// ag-grid-react v23.0.3
import { ICellEditor, ICellEditorParams, ICellRenderer, ICellRendererParams, IDate, IDateParams, IFilter, IFilterParams, IHeader, IHeaderGroup, IHeaderGroupParams, IHeaderParams, ILoadingCellRendererParams, ILoadingOverlayParams, INoRowsOverlayParams, IStatusPanel, IToolPanel, IToolPanelParams, IAfterGuiAttachedParams, IStatusPanelParams } from 'ag-grid-community';

@@ -3,0 +3,0 @@ export interface AgReactFrameworkComponent<T> {

@@ -1,3 +0,3 @@

// ag-grid-react v23.0.2
// ag-grid-react v23.0.3
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

@@ -1,2 +0,2 @@

// ag-grid-react v23.0.2
// ag-grid-react v23.0.3
export default function generateNewKey(): string;

@@ -1,2 +0,2 @@

// ag-grid-react v23.0.2
// ag-grid-react v23.0.3
"use strict";

@@ -3,0 +3,0 @@ Object.defineProperty(exports, "__esModule", { value: true });

@@ -1,3 +0,3 @@

// ag-grid-react v23.0.2
// ag-grid-react v23.0.3
export { AgGridReact } from './agGridReact';
export { AgGridColumn } from './agGridColumn';

@@ -1,2 +0,2 @@

// ag-grid-react v23.0.2
// ag-grid-react v23.0.3
"use strict";

@@ -3,0 +3,0 @@ Object.defineProperty(exports, "__esModule", { value: true });

@@ -1,2 +0,2 @@

// ag-grid-react v23.0.2
// ag-grid-react v23.0.3
import { ComponentType, Promise } from 'ag-grid-community';

@@ -3,0 +3,0 @@ import { AgGridReact } from "./agGridReact";

@@ -1,2 +0,2 @@

// ag-grid-react v23.0.2
// ag-grid-react v23.0.3
"use strict";

@@ -156,5 +156,13 @@ var __extends = (this && this.__extends) || (function () {

}
if (this.staticMarkup && this.staticMarkup.remove) {
this.staticMarkup.remove();
this.staticMarkup = null;
if (this.staticMarkup) {
if (this.staticMarkup.remove) {
// everyone else in the world
this.staticMarkup.remove();
this.staticMarkup = null;
}
else if (this.eParentElement.removeChild) {
// ie11...
this.eParentElement.removeChild(this.staticMarkup);
this.staticMarkup = null;
}
}

@@ -161,0 +169,0 @@ };

@@ -1,2 +0,2 @@

// ag-grid-react v23.0.2
// ag-grid-react v23.0.3
export declare const assignProperties: (to: {}, from: {}) => void;

@@ -1,2 +0,2 @@

// ag-grid-react v23.0.2
// ag-grid-react v23.0.3
"use strict";

@@ -3,0 +3,0 @@ Object.defineProperty(exports, "__esModule", { value: true });

{
"name": "ag-grid-react",
"version": "23.0.2",
"version": "23.0.3",
"description": "ag-Grid React Component",

@@ -132,2 +132,2 @@ "main": "main.js",

}
}
}

@@ -1,1 +0,1 @@

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("prop-types"),require("react"),require("react-dom"),require("ag-grid-community"),require("react-dom/server")):"function"==typeof define&&define.amd?define(["exports","prop-types","react","react-dom","ag-grid-community","react-dom/server"],e):e(t.AgGridReact={},t.PropTypes,t.React,t.ReactDOM,t.agGrid,t.ReactDOMServer)}(this,function(t,e,i,a,s,r){"use strict";var o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function n(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var p,c=(n(u,p=i.Component),u.prototype.render=function(){return null},u.mapChildColumnDefs=function(t){return i.Children.map(t.children,function(t){return u.toColDef(t.props)})},u.toColDef=function(t){var e=u.createColDefFromGridColumn(t);return u.hasChildColumns(t)&&(e.children=u.getChildColDefs(t.children)),e},u.hasChildColumns=function(t){return 0<i.Children.count(t.children)},u.getChildColDefs=function(t){return i.Children.map(t,function(t){return u.createColDefFromGridColumn(t.props)})},u.createColDefFromGridColumn=function(t){var e={};return u.assign(e,t),delete e.children,e},u.assign=function(t,e){return[e].reduce(function(e,n){return Object.keys(n).forEach(function(t){e[t]=n[t]}),e},t)},u);function u(t,e){var n=p.call(this,t,e)||this;return n.props=t,n.state=e,n}function l(t,e){t.forEach(function(t){c[t]=e})}l(s.ColDefUtil.BOOLEAN_PROPERTIES,e.bool),l(s.ColDefUtil.STRING_PROPERTIES,e.string),l(s.ColDefUtil.OBJECT_PROPERTIES,e.object),l(s.ColDefUtil.ARRAY_PROPERTIES,e.array),l(s.ColDefUtil.NUMBER_PROPERTIES,e.number),l(s.ColDefUtil.FUNCTION_PROPERTIES,e.func);var h=(f.prototype.hasMethod=function(t){var e=this.getFrameworkComponentInstance();return null!=e&&null!=e[t]},f.prototype.callMethod=function(t,e){var n=this,r=this.getFrameworkComponentInstance();if(null!=r){var o=this.getFrameworkComponentInstance()[t];if(null==o)return;return o.apply(r,e)}window.setTimeout(function(){return n.callMethod(t,e)},100)},f.prototype.addMethod=function(t,e){this[t]=e},f);function f(){}var m=0;var d,C,y,g=(n(v,d=h),v.prototype.getFrameworkComponentInstance=function(){return this.componentInstance},v.prototype.isStatelessComponent=function(){return this.statelessComponent},v.prototype.getReactComponentName=function(){return this.reactComponent.name},v.prototype.init=function(e){var n=this;return this.eParentElement=this.createParentElement(e),this.renderStaticMarkup(e),new s.Promise(function(t){n.createReactComponent(e,t)})},v.prototype.getGui=function(){return this.eParentElement},v.prototype.destroy=function(){return this.parentComponent.destroyPortal(this.portal)},v.prototype.createReactComponent=function(t,e){var n=this;this.statelessComponent||(t.ref=function(t){n.componentInstance=t,n.addParentContainerStyleAndClasses(),n.removeStaticMarkup()});var r=i.createElement(this.reactComponent,t),o=a.createPortal(r,this.eParentElement,"agPortalKey_"+ ++m);this.portal=o,this.parentComponent.mountReactPortal(o,this,function(t){e(t),n.statelessComponent&&setTimeout(function(){n.removeStaticMarkup()})})},v.prototype.addParentContainerStyleAndClasses=function(){var e,n,r=this;this.componentInstance&&(this.componentInstance.getReactContainerStyle&&this.componentInstance.getReactContainerStyle()&&(e=this.eParentElement.style,n=this.componentInstance.getReactContainerStyle(),Object.keys(n).forEach(function(t){e[t]=n[t]})),this.componentInstance.getReactContainerClasses&&this.componentInstance.getReactContainerClasses()&&this.componentInstance.getReactContainerClasses().forEach(function(t){return s.Utils.addCssClass(r.eParentElement,t)}))},v.prototype.createParentElement=function(t){var e=document.createElement(this.parentComponent.props.componentWrappingElement||"div");return s.Utils.addCssClass(e,"ag-react-container"),t.reactContainer=e},v.prototype.statelessComponentRendered=function(){return 0<this.eParentElement.childElementCount||0<this.eParentElement.childNodes.length},v.hasSymbol=function(){return"function"==typeof Symbol&&Symbol.for},v.isStateless=function(t){return"function"==typeof t&&!(t.prototype&&t.prototype.isReactComponent)||"object"==typeof t&&t.$$typeof===v.REACT_MEMO_TYPE},v.prototype.isNullRender=function(){return""===this.staticMarkup},v.prototype.renderStaticMarkup=function(t){if(!this.parentComponent.isDisableStaticMarkup()&&this.componentType.isCellRenderer()){var e=i.createElement(this.reactComponent,t);try{var n=r.renderToStaticMarkup(e);""===n?this.staticMarkup=n:n&&(this.staticMarkup=document.createElement("span"),this.staticMarkup.innerHTML=n,this.eParentElement.appendChild(this.staticMarkup))}catch(t){}}},v.prototype.removeStaticMarkup=function(){!this.parentComponent.isDisableStaticMarkup()&&this.componentType.isCellRenderer()&&this.staticMarkup&&this.staticMarkup.remove&&(this.staticMarkup.remove(),this.staticMarkup=null)},v.prototype.rendered=function(){return this.isNullRender()||this.staticMarkup||this.isStatelessComponent()&&this.statelessComponentRendered()||!this.isStatelessComponent()&&this.getFrameworkComponentInstance()},v.REACT_MEMO_TYPE=v.hasSymbol()?Symbol.for("react.memo"):60115,v);function v(t,e,n){var r=d.call(this)||this;return r.portal=null,r.componentWrappingElement="div",r.staticMarkup=null,r.reactComponent=t,r.componentType=n,r.parentComponent=e,r.statelessComponent=v.isStateless(r.reactComponent),r}(y=C=C||{}).IdentityCheck="IdentityCheck",y.DeepValueCheck="DeepValueCheck",y.NoCheck="NoCheck";var E=(P.prototype.getStrategy=function(t){return this.strategyMap[t]},P);function P(){var t;this.strategyMap=((t={})[C.DeepValueCheck]=new k,t[C.IdentityCheck]=new R(function(t,e){return t===e}),t[C.NoCheck]=new R(function(t,e){return!0}),t)}var R=(O.prototype.areEqual=function(t,e){return this.strategy(t,e)},O);function O(t){this.strategy=t}var k=(S.prototype.areEqual=function(t,e){return S.areEquivalent(S.copy(t),S.copy(e))},S.unwrapStringOrNumber=function(t){return t instanceof Number||t instanceof String?t.valueOf():t},S.copy=function(t){if(!t)return t;if(Array.isArray(t)){for(var e=[],n=0;n<t.length;n++)e.push(this.copy(t[n]));return e}return"object"!=typeof t?t:[{},t].reduce(function(e,n){return Object.keys(n).forEach(function(t){e[t]=n[t]}),e},{})},S.isNaN=function(t){return Number.isNaN?Number.isNaN(t):"number"==typeof t&&isNaN(t)},S.areEquivalent=function(e,n){if(e=S.unwrapStringOrNumber(e),n=S.unwrapStringOrNumber(n),e===n)return!0;if(null===e||null===n||typeof e!=typeof n)return!1;if(S.isNaN(e)&&S.isNaN(n))return!0;if(e instanceof Date)return n instanceof Date&&e.valueOf()===n.valueOf();if("function"==typeof e)return e.toString()===n.toString();if("object"!=typeof e)return e==n;var t=void 0===e.areEquivPropertyTracking,r=void 0===n.areEquivPropertyTracking;try{var o=void 0;if(t)e.areEquivPropertyTracking=[];else if(e.areEquivPropertyTracking.some(function(t){return t===n}))return!0;if(r)n.areEquivPropertyTracking=[];else if(n.areEquivPropertyTracking.some(function(t){return t===e}))return!0;e.areEquivPropertyTracking.push(n),n.areEquivPropertyTracking.push(e);var i={};for(o in e)"areEquivPropertyTracking"!=o&&(i[o]=null);for(o in n)"areEquivPropertyTracking"!=o&&(i[o]=null);for(o in i)if(!this.areEquivalent(e[o],n[o]))return!1;return!0}finally{t&&delete e.areEquivPropertyTracking,r&&delete n.areEquivPropertyTracking}},S);function S(){}var T,D=(n(M,T=i.Component),M.prototype.render=function(){var e=this;return i.createElement("div",{style:this.createStyleForDiv(),ref:function(t){e.eGridDiv=t}},this.portals)},M.prototype.createStyleForDiv=function(){var e={height:"100%"},n=this.props.containerStyle;return n&&Object.keys(n).forEach(function(t){e[t]=n[t]}),e},M.prototype.componentDidMount=function(){var t=this.props.modules||[],e={providedBeanInstances:{agGridReact:this,frameworkComponentWrapper:new N(this)},modules:t},n=this.props.gridOptions||{};c.hasChildColumns(this.props)&&(n.columnDefs=c.mapChildColumnDefs(this.props)),this.gridOptions=s.ComponentUtil.copyAttributesToGridOptions(n,this.props),new s.Grid(this.eGridDiv,this.gridOptions,e),this.api=this.gridOptions.api,this.columnApi=this.gridOptions.columnApi},M.prototype.waitForInstance=function(t,e,n){var r=this;if(void 0===n&&(n=0),this.destroyed)e(null);else if(t.rendered())e(null);else{if(M.MAX_COMPONENT_CREATION_TIME<=n)return void console.error("ag-Grid: React Component '"+t.getReactComponentName()+"' not created within "+M.MAX_COMPONENT_CREATION_TIME+"ms");window.setTimeout(function(){return r.waitForInstance(t,e,n+5)},5)}},M.prototype.mountReactPortal=function(t,e,n){this.portals=function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),o=0;for(e=0;e<n;e++)for(var i=arguments[e],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r}(this.portals,[t]),this.batchUpdate(this.waitForInstance(e,n))},M.prototype.batchUpdate=function(t){var e=this;if(this.hasPendingPortalUpdate)return t&&t();setTimeout(function(){e.api&&e.forceUpdate(function(){t&&t(),e.hasPendingPortalUpdate=!1})}),this.hasPendingPortalUpdate=!0},M.prototype.destroyPortal=function(e){this.portals=this.portals.filter(function(t){return t!==e}),this.batchUpdate()},M.prototype.getStrategyTypeForProp=function(t){if("rowData"===t){if(this.props.rowDataChangeDetectionStrategy)return this.props.rowDataChangeDetectionStrategy;if(this.props.deltaRowDataMode)return C.IdentityCheck}return C.DeepValueCheck},M.prototype.shouldComponentUpdate=function(t){return this.processPropsChanges(this.props,t),!1},M.prototype.componentDidUpdate=function(t){this.processPropsChanges(t,this.props)},M.prototype.processPropsChanges=function(t,e){var n={};this.extractGridPropertyChanges(t,e,n),this.extractDeclarativeColDefChanges(e,n),0<Object.keys(n).length&&s.ComponentUtil.processOnChange(n,this.gridOptions,this.api,this.columnApi)},M.prototype.extractDeclarativeColDefChanges=function(t,e){var n=!!t.debug;if(c.hasChildColumns(t)){var r=this.changeDetectionService.getStrategy(C.DeepValueCheck),o=this.gridOptions.columnDefs,i=c.mapChildColumnDefs(t);r.areEqual(o,i)||(n&&console.log("agGridReact: colDefs definitions changed"),e.columnDefs={previousValue:this.gridOptions.columnDefs,currentValue:c.mapChildColumnDefs(t)})}},M.prototype.extractGridPropertyChanges=function(e,n,r){var o=this,i=!!n.debug;Object.keys(n).forEach(function(t){-1!==s.ComponentUtil.ALL_PROPERTIES.indexOf(t)&&(o.changeDetectionService.getStrategy(o.getStrategyTypeForProp(t)).areEqual(e[t],n[t])||(i&&console.log("agGridReact: ["+t+"] property changed"),r[t]={previousValue:e[t],currentValue:n[t]}))}),s.ComponentUtil.getEventCallbacks().forEach(function(t){o.props[t]!==n[t]&&(i&&console.log("agGridReact: ["+t+"] event callback changed"),r[t]={previousValue:e[t],currentValue:n[t]})})},M.prototype.componentWillUnmount=function(){this.api&&(this.api.destroy(),this.api=null),this.destroyed=!0},M.prototype.isDisableStaticMarkup=function(){return!!this.props.disableStaticMarkup},M.MAX_COMPONENT_CREATION_TIME=1e3,M);function M(t,e){var n=T.call(this,t,e)||this;return n.props=t,n.state=e,n.changeDetectionService=new E,n.api=null,n.portals=[],n.hasPendingPortalUpdate=!1,n.destroyed=!1,n}function b(t,e){t.forEach(function(t){D[t]=e})}D.propTypes={gridOptions:e.object},b(s.ComponentUtil.getEventCallbacks(),e.func),b(s.ComponentUtil.BOOLEAN_PROPERTIES,e.bool),b(s.ComponentUtil.STRING_PROPERTIES,e.string),b(s.ComponentUtil.OBJECT_PROPERTIES,e.object),b(s.ComponentUtil.ARRAY_PROPERTIES,e.array),b(s.ComponentUtil.NUMBER_PROPERTIES,e.number),b(s.ComponentUtil.FUNCTION_PROPERTIES,e.func);var I,N=(n(_,I=s.BaseComponentWrapper),_.prototype.createWrapper=function(t,e){return new g(t,this.agGridReact,e)},_);function _(t){var e=I.call(this)||this;return e.agGridReact=t,e}t.AgGridReact=D,t.AgGridColumn=c,Object.defineProperty(t,"__esModule",{value:!0})});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("prop-types"),require("react"),require("react-dom"),require("ag-grid-community"),require("react-dom/server")):"function"==typeof define&&define.amd?define(["exports","prop-types","react","react-dom","ag-grid-community","react-dom/server"],e):e(t.AgGridReact={},t.PropTypes,t.React,t.ReactDOM,t.agGrid,t.ReactDOMServer)}(this,function(t,e,i,a,s,r){"use strict";var o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function n(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var p,c=(n(u,p=i.Component),u.prototype.render=function(){return null},u.mapChildColumnDefs=function(t){return i.Children.map(t.children,function(t){return u.toColDef(t.props)})},u.toColDef=function(t){var e=u.createColDefFromGridColumn(t);return u.hasChildColumns(t)&&(e.children=u.getChildColDefs(t.children)),e},u.hasChildColumns=function(t){return 0<i.Children.count(t.children)},u.getChildColDefs=function(t){return i.Children.map(t,function(t){return u.createColDefFromGridColumn(t.props)})},u.createColDefFromGridColumn=function(t){var e={};return u.assign(e,t),delete e.children,e},u.assign=function(t,e){return[e].reduce(function(e,n){return Object.keys(n).forEach(function(t){e[t]=n[t]}),e},t)},u);function u(t,e){var n=p.call(this,t,e)||this;return n.props=t,n.state=e,n}function l(t,e){t.forEach(function(t){c[t]=e})}l(s.ColDefUtil.BOOLEAN_PROPERTIES,e.bool),l(s.ColDefUtil.STRING_PROPERTIES,e.string),l(s.ColDefUtil.OBJECT_PROPERTIES,e.object),l(s.ColDefUtil.ARRAY_PROPERTIES,e.array),l(s.ColDefUtil.NUMBER_PROPERTIES,e.number),l(s.ColDefUtil.FUNCTION_PROPERTIES,e.func);var h=(f.prototype.hasMethod=function(t){var e=this.getFrameworkComponentInstance();return null!=e&&null!=e[t]},f.prototype.callMethod=function(t,e){var n=this,r=this.getFrameworkComponentInstance();if(null!=r){var o=this.getFrameworkComponentInstance()[t];if(null==o)return;return o.apply(r,e)}window.setTimeout(function(){return n.callMethod(t,e)},100)},f.prototype.addMethod=function(t,e){this[t]=e},f);function f(){}var m=0;var d,C,y,g=(n(v,d=h),v.prototype.getFrameworkComponentInstance=function(){return this.componentInstance},v.prototype.isStatelessComponent=function(){return this.statelessComponent},v.prototype.getReactComponentName=function(){return this.reactComponent.name},v.prototype.init=function(e){var n=this;return this.eParentElement=this.createParentElement(e),this.renderStaticMarkup(e),new s.Promise(function(t){n.createReactComponent(e,t)})},v.prototype.getGui=function(){return this.eParentElement},v.prototype.destroy=function(){return this.parentComponent.destroyPortal(this.portal)},v.prototype.createReactComponent=function(t,e){var n=this;this.statelessComponent||(t.ref=function(t){n.componentInstance=t,n.addParentContainerStyleAndClasses(),n.removeStaticMarkup()});var r=i.createElement(this.reactComponent,t),o=a.createPortal(r,this.eParentElement,"agPortalKey_"+ ++m);this.portal=o,this.parentComponent.mountReactPortal(o,this,function(t){e(t),n.statelessComponent&&setTimeout(function(){n.removeStaticMarkup()})})},v.prototype.addParentContainerStyleAndClasses=function(){var e,n,r=this;this.componentInstance&&(this.componentInstance.getReactContainerStyle&&this.componentInstance.getReactContainerStyle()&&(e=this.eParentElement.style,n=this.componentInstance.getReactContainerStyle(),Object.keys(n).forEach(function(t){e[t]=n[t]})),this.componentInstance.getReactContainerClasses&&this.componentInstance.getReactContainerClasses()&&this.componentInstance.getReactContainerClasses().forEach(function(t){return s.Utils.addCssClass(r.eParentElement,t)}))},v.prototype.createParentElement=function(t){var e=document.createElement(this.parentComponent.props.componentWrappingElement||"div");return s.Utils.addCssClass(e,"ag-react-container"),t.reactContainer=e},v.prototype.statelessComponentRendered=function(){return 0<this.eParentElement.childElementCount||0<this.eParentElement.childNodes.length},v.hasSymbol=function(){return"function"==typeof Symbol&&Symbol.for},v.isStateless=function(t){return"function"==typeof t&&!(t.prototype&&t.prototype.isReactComponent)||"object"==typeof t&&t.$$typeof===v.REACT_MEMO_TYPE},v.prototype.isNullRender=function(){return""===this.staticMarkup},v.prototype.renderStaticMarkup=function(t){if(!this.parentComponent.isDisableStaticMarkup()&&this.componentType.isCellRenderer()){var e=i.createElement(this.reactComponent,t);try{var n=r.renderToStaticMarkup(e);""===n?this.staticMarkup=n:n&&(this.staticMarkup=document.createElement("span"),this.staticMarkup.innerHTML=n,this.eParentElement.appendChild(this.staticMarkup))}catch(t){}}},v.prototype.removeStaticMarkup=function(){!this.parentComponent.isDisableStaticMarkup()&&this.componentType.isCellRenderer()&&this.staticMarkup&&(this.staticMarkup.remove?(this.staticMarkup.remove(),this.staticMarkup=null):this.eParentElement.removeChild&&(this.eParentElement.removeChild(this.staticMarkup),this.staticMarkup=null))},v.prototype.rendered=function(){return this.isNullRender()||this.staticMarkup||this.isStatelessComponent()&&this.statelessComponentRendered()||!this.isStatelessComponent()&&this.getFrameworkComponentInstance()},v.REACT_MEMO_TYPE=v.hasSymbol()?Symbol.for("react.memo"):60115,v);function v(t,e,n){var r=d.call(this)||this;return r.portal=null,r.componentWrappingElement="div",r.staticMarkup=null,r.reactComponent=t,r.componentType=n,r.parentComponent=e,r.statelessComponent=v.isStateless(r.reactComponent),r}(y=C=C||{}).IdentityCheck="IdentityCheck",y.DeepValueCheck="DeepValueCheck",y.NoCheck="NoCheck";var E=(P.prototype.getStrategy=function(t){return this.strategyMap[t]},P);function P(){var t;this.strategyMap=((t={})[C.DeepValueCheck]=new k,t[C.IdentityCheck]=new R(function(t,e){return t===e}),t[C.NoCheck]=new R(function(t,e){return!0}),t)}var R=(O.prototype.areEqual=function(t,e){return this.strategy(t,e)},O);function O(t){this.strategy=t}var k=(S.prototype.areEqual=function(t,e){return S.areEquivalent(S.copy(t),S.copy(e))},S.unwrapStringOrNumber=function(t){return t instanceof Number||t instanceof String?t.valueOf():t},S.copy=function(t){if(!t)return t;if(Array.isArray(t)){for(var e=[],n=0;n<t.length;n++)e.push(this.copy(t[n]));return e}return"object"!=typeof t?t:[{},t].reduce(function(e,n){return Object.keys(n).forEach(function(t){e[t]=n[t]}),e},{})},S.isNaN=function(t){return Number.isNaN?Number.isNaN(t):"number"==typeof t&&isNaN(t)},S.areEquivalent=function(e,n){if(e=S.unwrapStringOrNumber(e),n=S.unwrapStringOrNumber(n),e===n)return!0;if(null===e||null===n||typeof e!=typeof n)return!1;if(S.isNaN(e)&&S.isNaN(n))return!0;if(e instanceof Date)return n instanceof Date&&e.valueOf()===n.valueOf();if("function"==typeof e)return e.toString()===n.toString();if("object"!=typeof e)return e==n;var t=void 0===e.areEquivPropertyTracking,r=void 0===n.areEquivPropertyTracking;try{var o=void 0;if(t)e.areEquivPropertyTracking=[];else if(e.areEquivPropertyTracking.some(function(t){return t===n}))return!0;if(r)n.areEquivPropertyTracking=[];else if(n.areEquivPropertyTracking.some(function(t){return t===e}))return!0;e.areEquivPropertyTracking.push(n),n.areEquivPropertyTracking.push(e);var i={};for(o in e)"areEquivPropertyTracking"!=o&&(i[o]=null);for(o in n)"areEquivPropertyTracking"!=o&&(i[o]=null);for(o in i)if(!this.areEquivalent(e[o],n[o]))return!1;return!0}finally{t&&delete e.areEquivPropertyTracking,r&&delete n.areEquivPropertyTracking}},S);function S(){}var T,D=(n(M,T=i.Component),M.prototype.render=function(){var e=this;return i.createElement("div",{style:this.createStyleForDiv(),ref:function(t){e.eGridDiv=t}},this.portals)},M.prototype.createStyleForDiv=function(){var e={height:"100%"},n=this.props.containerStyle;return n&&Object.keys(n).forEach(function(t){e[t]=n[t]}),e},M.prototype.componentDidMount=function(){var t=this.props.modules||[],e={providedBeanInstances:{agGridReact:this,frameworkComponentWrapper:new N(this)},modules:t},n=this.props.gridOptions||{};c.hasChildColumns(this.props)&&(n.columnDefs=c.mapChildColumnDefs(this.props)),this.gridOptions=s.ComponentUtil.copyAttributesToGridOptions(n,this.props),new s.Grid(this.eGridDiv,this.gridOptions,e),this.api=this.gridOptions.api,this.columnApi=this.gridOptions.columnApi},M.prototype.waitForInstance=function(t,e,n){var r=this;if(void 0===n&&(n=0),this.destroyed)e(null);else if(t.rendered())e(null);else{if(M.MAX_COMPONENT_CREATION_TIME<=n)return void console.error("ag-Grid: React Component '"+t.getReactComponentName()+"' not created within "+M.MAX_COMPONENT_CREATION_TIME+"ms");window.setTimeout(function(){return r.waitForInstance(t,e,n+5)},5)}},M.prototype.mountReactPortal=function(t,e,n){this.portals=function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),o=0;for(e=0;e<n;e++)for(var i=arguments[e],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r}(this.portals,[t]),this.batchUpdate(this.waitForInstance(e,n))},M.prototype.batchUpdate=function(t){var e=this;if(this.hasPendingPortalUpdate)return t&&t();setTimeout(function(){e.api&&e.forceUpdate(function(){t&&t(),e.hasPendingPortalUpdate=!1})}),this.hasPendingPortalUpdate=!0},M.prototype.destroyPortal=function(e){this.portals=this.portals.filter(function(t){return t!==e}),this.batchUpdate()},M.prototype.getStrategyTypeForProp=function(t){if("rowData"===t){if(this.props.rowDataChangeDetectionStrategy)return this.props.rowDataChangeDetectionStrategy;if(this.props.deltaRowDataMode)return C.IdentityCheck}return C.DeepValueCheck},M.prototype.shouldComponentUpdate=function(t){return this.processPropsChanges(this.props,t),!1},M.prototype.componentDidUpdate=function(t){this.processPropsChanges(t,this.props)},M.prototype.processPropsChanges=function(t,e){var n={};this.extractGridPropertyChanges(t,e,n),this.extractDeclarativeColDefChanges(e,n),0<Object.keys(n).length&&s.ComponentUtil.processOnChange(n,this.gridOptions,this.api,this.columnApi)},M.prototype.extractDeclarativeColDefChanges=function(t,e){var n=!!t.debug;if(c.hasChildColumns(t)){var r=this.changeDetectionService.getStrategy(C.DeepValueCheck),o=this.gridOptions.columnDefs,i=c.mapChildColumnDefs(t);r.areEqual(o,i)||(n&&console.log("agGridReact: colDefs definitions changed"),e.columnDefs={previousValue:this.gridOptions.columnDefs,currentValue:c.mapChildColumnDefs(t)})}},M.prototype.extractGridPropertyChanges=function(e,n,r){var o=this,i=!!n.debug;Object.keys(n).forEach(function(t){-1!==s.ComponentUtil.ALL_PROPERTIES.indexOf(t)&&(o.changeDetectionService.getStrategy(o.getStrategyTypeForProp(t)).areEqual(e[t],n[t])||(i&&console.log("agGridReact: ["+t+"] property changed"),r[t]={previousValue:e[t],currentValue:n[t]}))}),s.ComponentUtil.getEventCallbacks().forEach(function(t){o.props[t]!==n[t]&&(i&&console.log("agGridReact: ["+t+"] event callback changed"),r[t]={previousValue:e[t],currentValue:n[t]})})},M.prototype.componentWillUnmount=function(){this.api&&(this.api.destroy(),this.api=null),this.destroyed=!0},M.prototype.isDisableStaticMarkup=function(){return!!this.props.disableStaticMarkup},M.MAX_COMPONENT_CREATION_TIME=1e3,M);function M(t,e){var n=T.call(this,t,e)||this;return n.props=t,n.state=e,n.changeDetectionService=new E,n.api=null,n.portals=[],n.hasPendingPortalUpdate=!1,n.destroyed=!1,n}function b(t,e){t.forEach(function(t){D[t]=e})}D.propTypes={gridOptions:e.object},b(s.ComponentUtil.getEventCallbacks(),e.func),b(s.ComponentUtil.BOOLEAN_PROPERTIES,e.bool),b(s.ComponentUtil.STRING_PROPERTIES,e.string),b(s.ComponentUtil.OBJECT_PROPERTIES,e.object),b(s.ComponentUtil.ARRAY_PROPERTIES,e.array),b(s.ComponentUtil.NUMBER_PROPERTIES,e.number),b(s.ComponentUtil.FUNCTION_PROPERTIES,e.func);var I,N=(n(_,I=s.BaseComponentWrapper),_.prototype.createWrapper=function(t,e){return new g(t,this.agGridReact,e)},_);function _(t){var e=I.call(this)||this;return e.agGridReact=t,e}t.AgGridReact=D,t.AgGridColumn=c,Object.defineProperty(t,"__esModule",{value:!0})});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc