ag-grid-react
Advanced tools
Comparing version 25.1.0 to 25.2.0
@@ -1,1 +0,1 @@ | ||
define(["exports","prop-types","react","react-dom","agGrid","react-dom/server"],function(e,t,i,r,a,s){"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=function(){return(p=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};var c,l=(n(u,c=i.Component),u.prototype.render=function(){return null},u.mapChildColumnDefs=function(t){return i.Children.map(t,function(t){return t?u.toColDef(t.props):null})},u.toColDef=function(t){var e=t.children,t=function(t,e){var n={};for(o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(t);r<o.length;r++)e.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(t,o[r])&&(n[o[r]]=t[o[r]]);return n}(t,["children"]);return u.hasChildColumns(e)&&(t.children=u.mapChildColumnDefs(e)),t},u.hasChildColumns=function(t){return 0<i.Children.count(t)},u);function u(t){var e=c.call(this,t)||this;return e.props=t,e}function h(t,e){t.forEach(function(t){l[t]=e})}h(a.ColDefUtil.BOOLEAN_PROPERTIES,t.bool),h(a.ColDefUtil.STRING_PROPERTIES,t.string),h(a.ColDefUtil.OBJECT_PROPERTIES,t.object),h(a.ColDefUtil.ARRAY_PROPERTIES,t.array),h(a.ColDefUtil.NUMBER_PROPERTIES,t.number),h(a.ColDefUtil.FUNCTION_PROPERTIES,t.func),(E=e.ChangeDetectionStrategyType||(e.ChangeDetectionStrategyType={})).IdentityCheck="IdentityCheck",E.DeepValueCheck="DeepValueCheck",E.NoCheck="NoCheck";var f=(m.prototype.getStrategy=function(t){return this.strategyMap[t]},m);function m(){var t;this.strategyMap=((t={})[e.ChangeDetectionStrategyType.DeepValueCheck]=new C,t[e.ChangeDetectionStrategyType.IdentityCheck]=new y(function(t,e){return t===e}),t[e.ChangeDetectionStrategyType.NoCheck]=new y(function(t,e){return!1}),t)}var y=(d.prototype.areEqual=function(t,e){return this.strategy(t,e)},d);function d(t){this.strategy=t}var C=(g.prototype.areEqual=function(t,e){return g.areEquivalent(g.copy(t),g.copy(e))},g.unwrapStringOrNumber=function(t){return t instanceof Number||t instanceof String?t.valueOf():t},g.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},{})},g.isNaN=function(t){return Number.isNaN?Number.isNaN(t):"number"==typeof t&&isNaN(t)},g.areEquivalent=function(e,n){if(e=g.unwrapStringOrNumber(e),n=g.unwrapStringOrNumber(n),e===n)return!0;if(null===e||null===n||typeof e!=typeof n)return!1;if(g.isNaN(e)&&g.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||e.$$typeof&&"Symbol(react.element)"===e.$$typeof.toString())return e==n;if(Object.isFrozen(e)||Object.isFrozen(n))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}},g);function g(){}var v,E=(n(P,v=function(){}),P.prototype.getGui=function(){return this.eParentElement},P.prototype.destroy=function(){return this.parentComponent.destroyPortal(this.portal)},P.prototype.createParentElement=function(t){var e=document.createElement(this.parentComponent.props.componentWrappingElement||"div");return a._.addCssClass(e,"ag-react-container"),t.reactContainer=e},P.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 a._.addCssClass(r.eParentElement,t)}))},P.prototype.statelessComponentRendered=function(){return 0<this.eParentElement.childElementCount||0<this.eParentElement.childNodes.length},P.prototype.getFrameworkComponentInstance=function(){return this.componentInstance},P.prototype.isStatelessComponent=function(){return this.statelessComponent},P.prototype.getReactComponentName=function(){return this.reactComponent.name},P.prototype.getMemoType=function(){return this.hasSymbol()?Symbol.for("react.memo"):60115},P.prototype.hasSymbol=function(){return"function"==typeof Symbol&&Symbol.for},P.prototype.isStateless=function(t){return"function"==typeof t&&!(t.prototype&&t.prototype.isReactComponent)||"object"==typeof t&&t.$$typeof===this.getMemoType()},P.prototype.hasMethod=function(t){var e=this.getFrameworkComponentInstance();return!!e&&null!==e[t]||this.fallbackMethodAvailable(t)},P.prototype.callMethod=function(t,e){var n=this,r=this.getFrameworkComponentInstance();if(this.isStatelessComponent())return this.fallbackMethod(t,e&&e[0]?e[0]:{});if(r){var o=r[t];return o?o.apply(r,e):this.fallbackMethodAvailable(t)?this.fallbackMethod(t,e&&e[0]?e[0]:{}):void 0}setTimeout(function(){return n.callMethod(t,e)})},P.prototype.addMethod=function(t,e){this[t]=e},P);function P(t,e,n){var r=v.call(this)||this;return r.portal=null,r.reactComponent=t,r.parentComponent=e,r.componentType=n,r.statelessComponent=r.isStateless(r.reactComponent),r}var R=0;function S(){return"agPortalKey_"+ ++R}var O,b=(n(k,O=E),k.prototype.init=function(e){var n=this;return this.eParentElement=this.createParentElement(e),this.renderStaticMarkup(e),new a.AgPromise(function(t){return n.createReactComponent(e,t)})},k.prototype.createReactComponent=function(t,e){var n=this;this.isStatelessComponent()||(t.ref=function(t){n.componentInstance=t,n.addParentContainerStyleAndClasses(),n.removeStaticMarkup()});t=i.createElement(this.reactComponent,t),t=r.createPortal(t,this.eParentElement,S());this.portal=t,this.parentComponent.mountReactPortal(t,this,function(t){e(t),n.isStatelessComponent()&&(n.isSlowRenderer()&&n.removeStaticMarkup(),setTimeout(function(){n.removeStaticMarkup()}))})},k.prototype.fallbackMethodAvailable=function(t){return!1},k.prototype.fallbackMethod=function(t,e){},k.prototype.isSlowRenderer=function(){return this.staticRenderTime>=k.SLOW_RENDERERING_THRESHOLD},k.prototype.isNullValue=function(){return""===this.staticMarkup},k.prototype.renderStaticMarkup=function(t){if(!(this.parentComponent.isDisableStaticMarkup()||this.componentType.isCellRenderer&&!this.componentType.isCellRenderer())){var e=console.error,n=i.createElement(this.reactComponent,t);try{console.error=function(){};var r=Date.now(),o=s.renderToStaticMarkup(n);this.staticRenderTime=Date.now()-r,console.error=e,""===o?this.staticMarkup=o:o&&(this.staticMarkup=document.createElement("span"),this.staticMarkup.innerHTML=o,this.eParentElement.appendChild(this.staticMarkup))}catch(t){}finally{console.error=e}}},k.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))},k.prototype.rendered=function(){return this.isNullValue()||!!this.staticMarkup||this.isStatelessComponent()&&this.statelessComponentRendered()||!(this.isStatelessComponent()||!this.getFrameworkComponentInstance())},k.SLOW_RENDERERING_THRESHOLD=3,k);function k(){var t=null!==O&&O.apply(this,arguments)||this;return t.staticMarkup=null,t.staticRenderTime=0,t}var T,D=(n(N,T=E),N.prototype.init=function(t){var e=this;return this.eParentElement=this.createParentElement(t),this.params=t,this.createOrUpdatePortal(t),new a.AgPromise(function(t){return e.createReactComponent(t)})},N.prototype.createOrUpdatePortal=function(t){var e=this;this.isStatelessComponent()||(t.ref=function(t){e.componentInstance=t,e.addParentContainerStyleAndClasses()}),this.reactElement=i.createElement(this.reactComponent,p(p({},t),{key:this.key})),this.portal=r.createPortal(this.reactElement,this.eParentElement,this.portalKey)},N.prototype.createReactComponent=function(e){this.parentComponent.mountReactPortal(this.portal,this,function(t){e(t)})},N.prototype.isNullValue=function(){return this.valueRenderedIsNull(this.params)},N.prototype.rendered=function(){return this.isStatelessComponent()&&this.statelessComponentRendered()||!(this.isStatelessComponent()||!this.getFrameworkComponentInstance())},N.prototype.valueRenderedIsNull=function(t){if(this.componentType.isCellRenderer&&!this.componentType.isCellRenderer())return!1;var e=console.error;try{return console.error=function(){},""===s.renderToStaticMarkup(i.createElement(this.reactComponent,t))}catch(t){}finally{console.error=e}return!1},N.prototype.refreshComponent=function(t){this.oldPortal=this.portal,this.createOrUpdatePortal(t),this.parentComponent.updateReactPortal(this.oldPortal,this.portal)},N.prototype.fallbackMethod=function(t,e){t=this[t+"Component"];if(t)return t.bind(this)(e)},N.prototype.fallbackMethodAvailable=function(t){return!!this[t+"Component"]},N);function N(t,e,n){n=T.call(this,t,e,n)||this;return n.oldPortal=null,n.key=S(),n.portalKey=S(),n}var M,I=(n(_,M=i.Component),_.prototype.render=function(){var e=this;return i.createElement("div",{style:this.createStyleForDiv(),className:this.props.className,ref:function(t){e.eGridDiv=t}},this.portals)},_.prototype.createStyleForDiv=function(){return p({height:"100%"},this.props.containerStyle||{})},_.prototype.componentDidMount=function(){var t=this.props.modules||[],e={providedBeanInstances:{agGridReact:this,frameworkComponentWrapper:new A(this)},modules:t},n=this.props.gridOptions||{},t=this.props.children;l.hasChildColumns(t)&&(n.columnDefs=l.mapChildColumnDefs(t)),this.gridOptions=a.ComponentUtil.copyAttributesToGridOptions(n,this.props),new a.Grid(this.eGridDiv,this.gridOptions,e),this.api=this.gridOptions.api,this.columnApi=this.gridOptions.columnApi},_.prototype.waitForInstance=function(t,e,n){var r=this;if(void 0===n&&(n=Date.now()),this.destroyed)e(null);else if(t.rendered())e(t);else{if(Date.now()-n>=this.props.maxComponentCreationTimeMs&&!this.hasPendingPortalUpdate)return t.isNullValue()?void e(t):void console.error("AG Grid: React Component '"+t.getReactComponentName()+"' not created within "+_.MAX_COMPONENT_CREATION_TIME_IN_MS+"ms");window.setTimeout(function(){r.waitForInstance(t,e,n)})}},_.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;for(var r=Array(t),o=0,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.waitForInstance(e,n),this.batchUpdate()},_.prototype.updateReactPortal=function(t,e){this.portals[this.portals.indexOf(t)]=e,this.batchUpdate()},_.prototype.batchUpdate=function(){var t=this;this.hasPendingPortalUpdate||(setTimeout(function(){t.api&&t.forceUpdate(function(){t.hasPendingPortalUpdate=!1})}),this.hasPendingPortalUpdate=!0)},_.prototype.destroyPortal=function(e){this.portals=this.portals.filter(function(t){return t!==e}),this.batchUpdate()},_.prototype.getStrategyTypeForProp=function(t){if("rowData"===t){if(this.props.rowDataChangeDetectionStrategy)return this.props.rowDataChangeDetectionStrategy;if(this.isImmutableDataActive())return e.ChangeDetectionStrategyType.IdentityCheck}return e.ChangeDetectionStrategyType.DeepValueCheck},_.prototype.isImmutableDataActive=function(){return this.props.deltaRowDataMode||this.props.immutableData||this.props.gridOptions&&(this.props.gridOptions.deltaRowDataMode||this.props.gridOptions.immutableData)},_.prototype.shouldComponentUpdate=function(t){return this.processPropsChanges(this.props,t),!1},_.prototype.componentDidUpdate=function(t){this.processPropsChanges(t,this.props)},_.prototype.processPropsChanges=function(t,e){var n={};this.extractGridPropertyChanges(t,e,n),this.extractDeclarativeColDefChanges(e,n),this.processSynchronousChanges(n),this.processAsynchronousChanges(n)},_.prototype.extractDeclarativeColDefChanges=function(t,e){var n,r,o,i;this.props.gridOptions&&this.props.gridOptions.columnDefs||this.props.columnDefs||(n=!!t.debug,r="columnDefs",o=this.gridOptions.columnDefs,l.hasChildColumns(t.children)?(i=this.changeDetectionService.getStrategy(this.getStrategyTypeForProp(r)),t=l.mapChildColumnDefs(t.children),i.areEqual(o,t)||(n&&console.log("agGridReact: colDefs definitions changed"),e[r]={previousValue:o,currentValue:t})):o&&0<o.length&&(e[r]={previousValue:o,currentValue:[]}))},_.prototype.extractGridPropertyChanges=function(e,n,r){var o=this,i=!!n.debug;Object.keys(n).forEach(function(t){a._.includes(a.ComponentUtil.ALL_PROPERTIES,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]}))}),a.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]})})},_.prototype.componentWillUnmount=function(){this.api&&(this.api.destroy(),this.api=null),this.destroyed=!0},_.prototype.isDisableStaticMarkup=function(){return this.props.disableStaticMarkup},_.prototype.isLegacyComponentRendering=function(){return this.props.legacyComponentRendering},_.prototype.processSynchronousChanges=function(t){var e,n=p({},t);return 0<Object.keys(n).length&&(e={},this.SYNCHRONOUS_CHANGE_PROPERTIES.forEach(function(t){n[t]&&(e[t]=n[t],delete n.context)}),0<Object.keys(e).length&&this.api&&a.ComponentUtil.processOnChange({context:n.context},this.gridOptions,this.api,this.columnApi)),n},_.prototype.processAsynchronousChanges=function(t){var e=this;0<Object.keys(t).length&&window.setTimeout(function(){e.api&&a.ComponentUtil.processOnChange(t,e.gridOptions,e.api,e.columnApi)})},_.defaultProps={legacyComponentRendering:!1,disableStaticMarkup:!1,maxComponentCreationTimeMs:_.MAX_COMPONENT_CREATION_TIME_IN_MS=1e3},_);function _(t){var e=M.call(this,t)||this;return e.props=t,e.changeDetectionService=new f,e.api=null,e.portals=[],e.hasPendingPortalUpdate=!1,e.destroyed=!1,e.SYNCHRONOUS_CHANGE_PROPERTIES=["context"],e}function w(t,e){t.forEach(function(t){I[t]=e})}I.propTypes={gridOptions:t.object},w(a.ComponentUtil.getEventCallbacks(),t.func),w(a.ComponentUtil.BOOLEAN_PROPERTIES,t.bool),w(a.ComponentUtil.STRING_PROPERTIES,t.string),w(a.ComponentUtil.OBJECT_PROPERTIES,t.object),w(a.ComponentUtil.ARRAY_PROPERTIES,t.array),w(a.ComponentUtil.NUMBER_PROPERTIES,t.number),w(a.ComponentUtil.FUNCTION_PROPERTIES,t.func);var U,A=(n(G,U=a.BaseComponentWrapper),G.prototype.createWrapper=function(t,e){return new(this.agGridReact.isLegacyComponentRendering()?b:D)(t,this.agGridReact,e)},G);function G(t){var e=U.call(this)||this;return e.agGridReact=t,e}e.AgGridReact=I,e.AgGridColumn=l,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
define(["exports","prop-types","react","react-dom","agGrid","react-dom/server"],function(e,t,o,r,a,i){"use strict";var s=function(t,e){return(s=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}s(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var p=function(){return(p=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};var c,l=(n(u,c=o.Component),u.prototype.render=function(){return null},u.mapChildColumnDefs=function(t){return o.Children.map(t,function(t){return t?u.toColDef(t.props):null})},u.toColDef=function(t){var e=t.children,t=function(t,e){var n={};for(o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(t);r<o.length;r++)e.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(t,o[r])&&(n[o[r]]=t[o[r]]);return n}(t,["children"]);return u.hasChildColumns(e)&&(t.children=u.mapChildColumnDefs(e)),t},u.hasChildColumns=function(t){return 0<o.Children.count(t)},u);function u(t){var e=c.call(this,t)||this;return e.props=t,e}function h(t,e){t.forEach(function(t){l[t]=e})}h(a.ColDefUtil.BOOLEAN_PROPERTIES,t.bool),h(a.ColDefUtil.STRING_PROPERTIES,t.string),h(a.ColDefUtil.OBJECT_PROPERTIES,t.object),h(a.ColDefUtil.ARRAY_PROPERTIES,t.array),h(a.ColDefUtil.NUMBER_PROPERTIES,t.number),h(a.ColDefUtil.FUNCTION_PROPERTIES,t.func),(E=e.ChangeDetectionStrategyType||(e.ChangeDetectionStrategyType={})).IdentityCheck="IdentityCheck",E.DeepValueCheck="DeepValueCheck",E.NoCheck="NoCheck";var f=(m.prototype.getStrategy=function(t){return this.strategyMap[t]},m);function m(){var t;this.strategyMap=((t={})[e.ChangeDetectionStrategyType.DeepValueCheck]=new C,t[e.ChangeDetectionStrategyType.IdentityCheck]=new y(function(t,e){return t===e}),t[e.ChangeDetectionStrategyType.NoCheck]=new y(function(t,e){return!1}),t)}var y=(d.prototype.areEqual=function(t,e){return this.strategy(t,e)},d);function d(t){this.strategy=t}var C=(g.prototype.areEqual=function(t,e){return g.areEquivalent(g.copy(t),g.copy(e))},g.unwrapStringOrNumber=function(t){return t instanceof Number||t instanceof String?t.valueOf():t},g.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},{})},g.isNaN=function(t){return Number.isNaN?Number.isNaN(t):"number"==typeof t&&isNaN(t)},g.areEquivalent=function(e,n){if(e=g.unwrapStringOrNumber(e),n=g.unwrapStringOrNumber(n),e===n)return!0;if(null===e||null===n||typeof e!=typeof n)return!1;if(g.isNaN(e)&&g.isNaN(n))return!0;if(e instanceof Date)return n instanceof Date&&e.valueOf()===n.valueOf();if("function"==typeof e)return!1;if("object"!=typeof e||e.$$typeof&&"Symbol(react.element)"===e.$$typeof.toString())return e==n;if(Object.isFrozen(e)||Object.isFrozen(n))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}},g);function g(){}var v,E=(n(P,v=function(){}),P.prototype.getGui=function(){return this.eParentElement},P.prototype.destroy=function(){return this.parentComponent.destroyPortal(this.portal)},P.prototype.createParentElement=function(t){var e=document.createElement(this.parentComponent.props.componentWrappingElement||"div");return a._.addCssClass(e,"ag-react-container"),t.reactContainer=e},P.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 a._.addCssClass(r.eParentElement,t)}))},P.prototype.statelessComponentRendered=function(){return 0<this.eParentElement.childElementCount||0<this.eParentElement.childNodes.length},P.prototype.getFrameworkComponentInstance=function(){return this.componentInstance},P.prototype.isStatelessComponent=function(){return this.statelessComponent},P.prototype.getReactComponentName=function(){return this.reactComponent.name},P.prototype.getMemoType=function(){return this.hasSymbol()?Symbol.for("react.memo"):60115},P.prototype.hasSymbol=function(){return"function"==typeof Symbol&&Symbol.for},P.prototype.isStateless=function(t){return"function"==typeof t&&!(t.prototype&&t.prototype.isReactComponent)||"object"==typeof t&&t.$$typeof===this.getMemoType()},P.prototype.hasMethod=function(t){var e=this.getFrameworkComponentInstance();return!!e&&null!==e[t]||this.fallbackMethodAvailable(t)},P.prototype.callMethod=function(t,e){var n=this,r=this.getFrameworkComponentInstance();if(this.isStatelessComponent())return this.fallbackMethod(t,e&&e[0]?e[0]:{});if(r){var o=r[t];return o?o.apply(r,e):this.fallbackMethodAvailable(t)?this.fallbackMethod(t,e&&e[0]?e[0]:{}):void 0}setTimeout(function(){return n.callMethod(t,e)})},P.prototype.addMethod=function(t,e){this[t]=e},P);function P(t,e,n){var r=v.call(this)||this;return r.portal=null,r.reactComponent=t,r.parentComponent=e,r.componentType=n,r.statelessComponent=r.isStateless(r.reactComponent),r}var R=0;function S(){return"agPortalKey_"+ ++R}var O,b=(n(k,O=E),k.prototype.init=function(e){var n=this;return this.eParentElement=this.createParentElement(e),this.renderStaticMarkup(e),new a.AgPromise(function(t){return n.createReactComponent(e,t)})},k.prototype.createReactComponent=function(t,e){var n=this;this.isStatelessComponent()||(t.ref=function(t){n.componentInstance=t,n.addParentContainerStyleAndClasses(),n.removeStaticMarkup()});t=o.createElement(this.reactComponent,t),t=r.createPortal(t,this.eParentElement,S());this.portal=t,this.parentComponent.mountReactPortal(t,this,function(t){e(t),n.isStatelessComponent()&&(n.isSlowRenderer()&&n.removeStaticMarkup(),setTimeout(function(){n.removeStaticMarkup()}))})},k.prototype.fallbackMethodAvailable=function(t){return!1},k.prototype.fallbackMethod=function(t,e){},k.prototype.isSlowRenderer=function(){return this.staticRenderTime>=k.SLOW_RENDERERING_THRESHOLD},k.prototype.isNullValue=function(){return""===this.staticMarkup},k.prototype.renderStaticMarkup=function(t){if(!(this.parentComponent.isDisableStaticMarkup()||this.componentType.isCellRenderer&&!this.componentType.isCellRenderer())){var e=console.error,t=o.createElement(this.reactComponent,t);try{console.error=function(){};var n=Date.now(),r=i.renderToStaticMarkup(t);this.staticRenderTime=Date.now()-n,console.error=e,""===r?this.staticMarkup=r:r&&(this.staticMarkup=document.createElement("span"),this.staticMarkup.innerHTML=r,this.eParentElement.appendChild(this.staticMarkup))}catch(t){}finally{console.error=e}}},k.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))},k.prototype.rendered=function(){return this.isNullValue()||!!this.staticMarkup||this.isStatelessComponent()&&this.statelessComponentRendered()||!(this.isStatelessComponent()||!this.getFrameworkComponentInstance())},k.SLOW_RENDERERING_THRESHOLD=3,k);function k(){var t=null!==O&&O.apply(this,arguments)||this;return t.staticMarkup=null,t.staticRenderTime=0,t}var T,D=(n(N,T=E),N.prototype.init=function(t){var e=this;return this.eParentElement=this.createParentElement(t),this.params=t,this.createOrUpdatePortal(t),new a.AgPromise(function(t){return e.createReactComponent(t)})},N.prototype.createOrUpdatePortal=function(t){var e=this;this.isStatelessComponent()||(t.ref=function(t){e.componentInstance=t,e.addParentContainerStyleAndClasses()}),this.reactElement=o.createElement(this.reactComponent,p(p({},t),{key:this.key})),this.portal=r.createPortal(this.reactElement,this.eParentElement,this.portalKey)},N.prototype.createReactComponent=function(e){this.parentComponent.mountReactPortal(this.portal,this,function(t){e(t)})},N.prototype.isNullValue=function(){return this.valueRenderedIsNull(this.params)},N.prototype.rendered=function(){return this.isStatelessComponent()&&this.statelessComponentRendered()||!(this.isStatelessComponent()||!this.getFrameworkComponentInstance())},N.prototype.valueRenderedIsNull=function(t){if(this.componentType.isCellRenderer&&!this.componentType.isCellRenderer())return!1;var e=console.error;try{return console.error=function(){},""===i.renderToStaticMarkup(o.createElement(this.reactComponent,t))}catch(t){}finally{console.error=e}return!1},N.prototype.refreshComponent=function(t){this.oldPortal=this.portal,this.createOrUpdatePortal(t),this.parentComponent.updateReactPortal(this.oldPortal,this.portal)},N.prototype.fallbackMethod=function(t,e){t=this[t+"Component"];if(t)return t.bind(this)(e)},N.prototype.fallbackMethodAvailable=function(t){return!!this[t+"Component"]},N);function N(t,e,n){n=T.call(this,t,e,n)||this;return n.oldPortal=null,n.key=S(),n.portalKey=S(),n}var M,I=(n(_,M=o.Component),_.prototype.render=function(){var e=this;return o.createElement("div",{style:this.createStyleForDiv(),className:this.props.className,ref:function(t){e.eGridDiv=t}},this.portals)},_.prototype.createStyleForDiv=function(){return p({height:"100%"},this.props.containerStyle||{})},_.prototype.componentDidMount=function(){var t=this.props.modules||[],e={providedBeanInstances:{agGridReact:this,frameworkComponentWrapper:new A(this)},modules:t},n=this.props.gridOptions||{},t=this.props.children;l.hasChildColumns(t)&&(n.columnDefs=l.mapChildColumnDefs(t)),this.gridOptions=a.ComponentUtil.copyAttributesToGridOptions(n,this.props),new a.Grid(this.eGridDiv,this.gridOptions,e),this.api=this.gridOptions.api,this.columnApi=this.gridOptions.columnApi},_.prototype.waitForInstance=function(t,e,n){var r=this;if(void 0===n&&(n=Date.now()),this.destroyed)e(null);else if(t.rendered())e(t);else{if(Date.now()-n>=this.props.maxComponentCreationTimeMs&&!this.hasPendingPortalUpdate)return t.isNullValue()?void e(t):void console.error("AG Grid: React Component '"+t.getReactComponentName()+"' not created within "+_.MAX_COMPONENT_CREATION_TIME_IN_MS+"ms");window.setTimeout(function(){r.waitForInstance(t,e,n)})}},_.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;for(var r=Array(t),o=0,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.waitForInstance(e,n),this.batchUpdate()},_.prototype.updateReactPortal=function(t,e){this.portals[this.portals.indexOf(t)]=e,this.batchUpdate()},_.prototype.batchUpdate=function(){var t=this;this.hasPendingPortalUpdate||(setTimeout(function(){t.api&&t.forceUpdate(function(){t.hasPendingPortalUpdate=!1})}),this.hasPendingPortalUpdate=!0)},_.prototype.destroyPortal=function(e){this.portals=this.portals.filter(function(t){return t!==e}),this.batchUpdate()},_.prototype.getStrategyTypeForProp=function(t){if("rowData"===t){if(this.props.rowDataChangeDetectionStrategy)return this.props.rowDataChangeDetectionStrategy;if(this.isImmutableDataActive())return e.ChangeDetectionStrategyType.IdentityCheck}return e.ChangeDetectionStrategyType.DeepValueCheck},_.prototype.isImmutableDataActive=function(){return this.props.deltaRowDataMode||this.props.immutableData||this.props.gridOptions&&(this.props.gridOptions.deltaRowDataMode||this.props.gridOptions.immutableData)},_.prototype.shouldComponentUpdate=function(t){return this.processPropsChanges(this.props,t),!1},_.prototype.componentDidUpdate=function(t){this.processPropsChanges(t,this.props)},_.prototype.processPropsChanges=function(t,e){var n={};this.extractGridPropertyChanges(t,e,n),this.extractDeclarativeColDefChanges(e,n),this.processSynchronousChanges(n),this.processAsynchronousChanges(n)},_.prototype.extractDeclarativeColDefChanges=function(t,e){var n,r,o,i;this.props.gridOptions&&this.props.gridOptions.columnDefs||this.props.columnDefs||(n=!!t.debug,r="columnDefs",o=this.gridOptions.columnDefs,l.hasChildColumns(t.children)?(i=this.changeDetectionService.getStrategy(this.getStrategyTypeForProp(r)),t=l.mapChildColumnDefs(t.children),i.areEqual(o,t)||(n&&console.log("agGridReact: colDefs definitions changed"),e[r]={previousValue:o,currentValue:t})):o&&0<o.length&&(e[r]={previousValue:o,currentValue:[]}))},_.prototype.extractGridPropertyChanges=function(e,n,r){var o=this,i=!!n.debug;Object.keys(n).forEach(function(t){a._.includes(a.ComponentUtil.ALL_PROPERTIES,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]}))}),a.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]})})},_.prototype.componentWillUnmount=function(){this.api&&(this.api.destroy(),this.api=null),this.destroyed=!0},_.prototype.isDisableStaticMarkup=function(){return this.props.disableStaticMarkup},_.prototype.isLegacyComponentRendering=function(){return this.props.legacyComponentRendering},_.prototype.processSynchronousChanges=function(t){var e,n=p({},t);return 0<Object.keys(n).length&&(e={},this.SYNCHRONOUS_CHANGE_PROPERTIES.forEach(function(t){n[t]&&(e[t]=n[t],delete n.context)}),0<Object.keys(e).length&&this.api&&a.ComponentUtil.processOnChange(e,this.gridOptions,this.api,this.columnApi)),n},_.prototype.processAsynchronousChanges=function(t){var e=this;0<Object.keys(t).length&&window.setTimeout(function(){e.api&&a.ComponentUtil.processOnChange(t,e.gridOptions,e.api,e.columnApi)})},_.defaultProps={legacyComponentRendering:!1,disableStaticMarkup:!1,maxComponentCreationTimeMs:_.MAX_COMPONENT_CREATION_TIME_IN_MS=1e3},_);function _(t){var e=M.call(this,t)||this;return e.props=t,e.changeDetectionService=new f,e.api=null,e.portals=[],e.hasPendingPortalUpdate=!1,e.destroyed=!1,e.SYNCHRONOUS_CHANGE_PROPERTIES=["context"],e}function w(t,e){t.forEach(function(t){I[t]=e})}I.propTypes={gridOptions:t.object},w(a.ComponentUtil.getEventCallbacks(),t.func),w(a.ComponentUtil.BOOLEAN_PROPERTIES,t.bool),w(a.ComponentUtil.STRING_PROPERTIES,t.string),w(a.ComponentUtil.OBJECT_PROPERTIES,t.object),w(a.ComponentUtil.ARRAY_PROPERTIES,t.array),w(a.ComponentUtil.NUMBER_PROPERTIES,t.number),w(a.ComponentUtil.FUNCTION_PROPERTIES,t.func);var U,A=(n(G,U=a.BaseComponentWrapper),G.prototype.createWrapper=function(t,e){return new(this.agGridReact.isLegacyComponentRendering()?b:D)(t,this.agGridReact,e)},G);function G(t){var e=U.call(this)||this;return e.agGridReact=t,e}e.AgGridReact=I,e.AgGridColumn=l,Object.defineProperty(e,"__esModule",{value:!0})}); |
@@ -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(e,t,i,r,a,s){"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=function(){return(p=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};var c,l=(n(u,c=i.Component),u.prototype.render=function(){return null},u.mapChildColumnDefs=function(t){return i.Children.map(t,function(t){return t?u.toColDef(t.props):null})},u.toColDef=function(t){var e=t.children,t=function(t,e){var n={};for(o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(t);r<o.length;r++)e.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(t,o[r])&&(n[o[r]]=t[o[r]]);return n}(t,["children"]);return u.hasChildColumns(e)&&(t.children=u.mapChildColumnDefs(e)),t},u.hasChildColumns=function(t){return 0<i.Children.count(t)},u);function u(t){var e=c.call(this,t)||this;return e.props=t,e}function h(t,e){t.forEach(function(t){l[t]=e})}h(a.ColDefUtil.BOOLEAN_PROPERTIES,t.bool),h(a.ColDefUtil.STRING_PROPERTIES,t.string),h(a.ColDefUtil.OBJECT_PROPERTIES,t.object),h(a.ColDefUtil.ARRAY_PROPERTIES,t.array),h(a.ColDefUtil.NUMBER_PROPERTIES,t.number),h(a.ColDefUtil.FUNCTION_PROPERTIES,t.func),(E=e.ChangeDetectionStrategyType||(e.ChangeDetectionStrategyType={})).IdentityCheck="IdentityCheck",E.DeepValueCheck="DeepValueCheck",E.NoCheck="NoCheck";var f=(m.prototype.getStrategy=function(t){return this.strategyMap[t]},m);function m(){var t;this.strategyMap=((t={})[e.ChangeDetectionStrategyType.DeepValueCheck]=new C,t[e.ChangeDetectionStrategyType.IdentityCheck]=new y(function(t,e){return t===e}),t[e.ChangeDetectionStrategyType.NoCheck]=new y(function(t,e){return!1}),t)}var y=(d.prototype.areEqual=function(t,e){return this.strategy(t,e)},d);function d(t){this.strategy=t}var C=(g.prototype.areEqual=function(t,e){return g.areEquivalent(g.copy(t),g.copy(e))},g.unwrapStringOrNumber=function(t){return t instanceof Number||t instanceof String?t.valueOf():t},g.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},{})},g.isNaN=function(t){return Number.isNaN?Number.isNaN(t):"number"==typeof t&&isNaN(t)},g.areEquivalent=function(e,n){if(e=g.unwrapStringOrNumber(e),n=g.unwrapStringOrNumber(n),e===n)return!0;if(null===e||null===n||typeof e!=typeof n)return!1;if(g.isNaN(e)&&g.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||e.$$typeof&&"Symbol(react.element)"===e.$$typeof.toString())return e==n;if(Object.isFrozen(e)||Object.isFrozen(n))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}},g);function g(){}var v,E=(n(P,v=function(){}),P.prototype.getGui=function(){return this.eParentElement},P.prototype.destroy=function(){return this.parentComponent.destroyPortal(this.portal)},P.prototype.createParentElement=function(t){var e=document.createElement(this.parentComponent.props.componentWrappingElement||"div");return a._.addCssClass(e,"ag-react-container"),t.reactContainer=e},P.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 a._.addCssClass(r.eParentElement,t)}))},P.prototype.statelessComponentRendered=function(){return 0<this.eParentElement.childElementCount||0<this.eParentElement.childNodes.length},P.prototype.getFrameworkComponentInstance=function(){return this.componentInstance},P.prototype.isStatelessComponent=function(){return this.statelessComponent},P.prototype.getReactComponentName=function(){return this.reactComponent.name},P.prototype.getMemoType=function(){return this.hasSymbol()?Symbol.for("react.memo"):60115},P.prototype.hasSymbol=function(){return"function"==typeof Symbol&&Symbol.for},P.prototype.isStateless=function(t){return"function"==typeof t&&!(t.prototype&&t.prototype.isReactComponent)||"object"==typeof t&&t.$$typeof===this.getMemoType()},P.prototype.hasMethod=function(t){var e=this.getFrameworkComponentInstance();return!!e&&null!==e[t]||this.fallbackMethodAvailable(t)},P.prototype.callMethod=function(t,e){var n=this,r=this.getFrameworkComponentInstance();if(this.isStatelessComponent())return this.fallbackMethod(t,e&&e[0]?e[0]:{});if(r){var o=r[t];return o?o.apply(r,e):this.fallbackMethodAvailable(t)?this.fallbackMethod(t,e&&e[0]?e[0]:{}):void 0}setTimeout(function(){return n.callMethod(t,e)})},P.prototype.addMethod=function(t,e){this[t]=e},P);function P(t,e,n){var r=v.call(this)||this;return r.portal=null,r.reactComponent=t,r.parentComponent=e,r.componentType=n,r.statelessComponent=r.isStateless(r.reactComponent),r}var R=0;function S(){return"agPortalKey_"+ ++R}var O,b=(n(k,O=E),k.prototype.init=function(e){var n=this;return this.eParentElement=this.createParentElement(e),this.renderStaticMarkup(e),new a.AgPromise(function(t){return n.createReactComponent(e,t)})},k.prototype.createReactComponent=function(t,e){var n=this;this.isStatelessComponent()||(t.ref=function(t){n.componentInstance=t,n.addParentContainerStyleAndClasses(),n.removeStaticMarkup()});t=i.createElement(this.reactComponent,t),t=r.createPortal(t,this.eParentElement,S());this.portal=t,this.parentComponent.mountReactPortal(t,this,function(t){e(t),n.isStatelessComponent()&&(n.isSlowRenderer()&&n.removeStaticMarkup(),setTimeout(function(){n.removeStaticMarkup()}))})},k.prototype.fallbackMethodAvailable=function(t){return!1},k.prototype.fallbackMethod=function(t,e){},k.prototype.isSlowRenderer=function(){return this.staticRenderTime>=k.SLOW_RENDERERING_THRESHOLD},k.prototype.isNullValue=function(){return""===this.staticMarkup},k.prototype.renderStaticMarkup=function(t){if(!(this.parentComponent.isDisableStaticMarkup()||this.componentType.isCellRenderer&&!this.componentType.isCellRenderer())){var e=console.error,n=i.createElement(this.reactComponent,t);try{console.error=function(){};var r=Date.now(),o=s.renderToStaticMarkup(n);this.staticRenderTime=Date.now()-r,console.error=e,""===o?this.staticMarkup=o:o&&(this.staticMarkup=document.createElement("span"),this.staticMarkup.innerHTML=o,this.eParentElement.appendChild(this.staticMarkup))}catch(t){}finally{console.error=e}}},k.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))},k.prototype.rendered=function(){return this.isNullValue()||!!this.staticMarkup||this.isStatelessComponent()&&this.statelessComponentRendered()||!(this.isStatelessComponent()||!this.getFrameworkComponentInstance())},k.SLOW_RENDERERING_THRESHOLD=3,k);function k(){var t=null!==O&&O.apply(this,arguments)||this;return t.staticMarkup=null,t.staticRenderTime=0,t}var T,D=(n(M,T=E),M.prototype.init=function(t){var e=this;return this.eParentElement=this.createParentElement(t),this.params=t,this.createOrUpdatePortal(t),new a.AgPromise(function(t){return e.createReactComponent(t)})},M.prototype.createOrUpdatePortal=function(t){var e=this;this.isStatelessComponent()||(t.ref=function(t){e.componentInstance=t,e.addParentContainerStyleAndClasses()}),this.reactElement=i.createElement(this.reactComponent,p(p({},t),{key:this.key})),this.portal=r.createPortal(this.reactElement,this.eParentElement,this.portalKey)},M.prototype.createReactComponent=function(e){this.parentComponent.mountReactPortal(this.portal,this,function(t){e(t)})},M.prototype.isNullValue=function(){return this.valueRenderedIsNull(this.params)},M.prototype.rendered=function(){return this.isStatelessComponent()&&this.statelessComponentRendered()||!(this.isStatelessComponent()||!this.getFrameworkComponentInstance())},M.prototype.valueRenderedIsNull=function(t){if(this.componentType.isCellRenderer&&!this.componentType.isCellRenderer())return!1;var e=console.error;try{return console.error=function(){},""===s.renderToStaticMarkup(i.createElement(this.reactComponent,t))}catch(t){}finally{console.error=e}return!1},M.prototype.refreshComponent=function(t){this.oldPortal=this.portal,this.createOrUpdatePortal(t),this.parentComponent.updateReactPortal(this.oldPortal,this.portal)},M.prototype.fallbackMethod=function(t,e){t=this[t+"Component"];if(t)return t.bind(this)(e)},M.prototype.fallbackMethodAvailable=function(t){return!!this[t+"Component"]},M);function M(t,e,n){n=T.call(this,t,e,n)||this;return n.oldPortal=null,n.key=S(),n.portalKey=S(),n}var N,I=(n(_,N=i.Component),_.prototype.render=function(){var e=this;return i.createElement("div",{style:this.createStyleForDiv(),className:this.props.className,ref:function(t){e.eGridDiv=t}},this.portals)},_.prototype.createStyleForDiv=function(){return p({height:"100%"},this.props.containerStyle||{})},_.prototype.componentDidMount=function(){var t=this.props.modules||[],e={providedBeanInstances:{agGridReact:this,frameworkComponentWrapper:new A(this)},modules:t},n=this.props.gridOptions||{},t=this.props.children;l.hasChildColumns(t)&&(n.columnDefs=l.mapChildColumnDefs(t)),this.gridOptions=a.ComponentUtil.copyAttributesToGridOptions(n,this.props),new a.Grid(this.eGridDiv,this.gridOptions,e),this.api=this.gridOptions.api,this.columnApi=this.gridOptions.columnApi},_.prototype.waitForInstance=function(t,e,n){var r=this;if(void 0===n&&(n=Date.now()),this.destroyed)e(null);else if(t.rendered())e(t);else{if(Date.now()-n>=this.props.maxComponentCreationTimeMs&&!this.hasPendingPortalUpdate)return t.isNullValue()?void e(t):void console.error("AG Grid: React Component '"+t.getReactComponentName()+"' not created within "+_.MAX_COMPONENT_CREATION_TIME_IN_MS+"ms");window.setTimeout(function(){r.waitForInstance(t,e,n)})}},_.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;for(var r=Array(t),o=0,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.waitForInstance(e,n),this.batchUpdate()},_.prototype.updateReactPortal=function(t,e){this.portals[this.portals.indexOf(t)]=e,this.batchUpdate()},_.prototype.batchUpdate=function(){var t=this;this.hasPendingPortalUpdate||(setTimeout(function(){t.api&&t.forceUpdate(function(){t.hasPendingPortalUpdate=!1})}),this.hasPendingPortalUpdate=!0)},_.prototype.destroyPortal=function(e){this.portals=this.portals.filter(function(t){return t!==e}),this.batchUpdate()},_.prototype.getStrategyTypeForProp=function(t){if("rowData"===t){if(this.props.rowDataChangeDetectionStrategy)return this.props.rowDataChangeDetectionStrategy;if(this.isImmutableDataActive())return e.ChangeDetectionStrategyType.IdentityCheck}return e.ChangeDetectionStrategyType.DeepValueCheck},_.prototype.isImmutableDataActive=function(){return this.props.deltaRowDataMode||this.props.immutableData||this.props.gridOptions&&(this.props.gridOptions.deltaRowDataMode||this.props.gridOptions.immutableData)},_.prototype.shouldComponentUpdate=function(t){return this.processPropsChanges(this.props,t),!1},_.prototype.componentDidUpdate=function(t){this.processPropsChanges(t,this.props)},_.prototype.processPropsChanges=function(t,e){var n={};this.extractGridPropertyChanges(t,e,n),this.extractDeclarativeColDefChanges(e,n),this.processSynchronousChanges(n),this.processAsynchronousChanges(n)},_.prototype.extractDeclarativeColDefChanges=function(t,e){var n,r,o,i;this.props.gridOptions&&this.props.gridOptions.columnDefs||this.props.columnDefs||(n=!!t.debug,r="columnDefs",o=this.gridOptions.columnDefs,l.hasChildColumns(t.children)?(i=this.changeDetectionService.getStrategy(this.getStrategyTypeForProp(r)),t=l.mapChildColumnDefs(t.children),i.areEqual(o,t)||(n&&console.log("agGridReact: colDefs definitions changed"),e[r]={previousValue:o,currentValue:t})):o&&0<o.length&&(e[r]={previousValue:o,currentValue:[]}))},_.prototype.extractGridPropertyChanges=function(e,n,r){var o=this,i=!!n.debug;Object.keys(n).forEach(function(t){a._.includes(a.ComponentUtil.ALL_PROPERTIES,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]}))}),a.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]})})},_.prototype.componentWillUnmount=function(){this.api&&(this.api.destroy(),this.api=null),this.destroyed=!0},_.prototype.isDisableStaticMarkup=function(){return this.props.disableStaticMarkup},_.prototype.isLegacyComponentRendering=function(){return this.props.legacyComponentRendering},_.prototype.processSynchronousChanges=function(t){var e,n=p({},t);return 0<Object.keys(n).length&&(e={},this.SYNCHRONOUS_CHANGE_PROPERTIES.forEach(function(t){n[t]&&(e[t]=n[t],delete n.context)}),0<Object.keys(e).length&&this.api&&a.ComponentUtil.processOnChange({context:n.context},this.gridOptions,this.api,this.columnApi)),n},_.prototype.processAsynchronousChanges=function(t){var e=this;0<Object.keys(t).length&&window.setTimeout(function(){e.api&&a.ComponentUtil.processOnChange(t,e.gridOptions,e.api,e.columnApi)})},_.defaultProps={legacyComponentRendering:!1,disableStaticMarkup:!1,maxComponentCreationTimeMs:_.MAX_COMPONENT_CREATION_TIME_IN_MS=1e3},_);function _(t){var e=N.call(this,t)||this;return e.props=t,e.changeDetectionService=new f,e.api=null,e.portals=[],e.hasPendingPortalUpdate=!1,e.destroyed=!1,e.SYNCHRONOUS_CHANGE_PROPERTIES=["context"],e}function w(t,e){t.forEach(function(t){I[t]=e})}I.propTypes={gridOptions:t.object},w(a.ComponentUtil.getEventCallbacks(),t.func),w(a.ComponentUtil.BOOLEAN_PROPERTIES,t.bool),w(a.ComponentUtil.STRING_PROPERTIES,t.string),w(a.ComponentUtil.OBJECT_PROPERTIES,t.object),w(a.ComponentUtil.ARRAY_PROPERTIES,t.array),w(a.ComponentUtil.NUMBER_PROPERTIES,t.number),w(a.ComponentUtil.FUNCTION_PROPERTIES,t.func);var U,A=(n(G,U=a.BaseComponentWrapper),G.prototype.createWrapper=function(t,e){return new(this.agGridReact.isLegacyComponentRendering()?b:D)(t,this.agGridReact,e)},G);function G(t){var e=U.call(this)||this;return e.agGridReact=t,e}e.AgGridReact=I,e.AgGridColumn=l,Object.defineProperty(e,"__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(e,t,o,r,a,i){"use strict";var s=function(t,e){return(s=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}s(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var p=function(){return(p=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};var c,l=(n(u,c=o.Component),u.prototype.render=function(){return null},u.mapChildColumnDefs=function(t){return o.Children.map(t,function(t){return t?u.toColDef(t.props):null})},u.toColDef=function(t){var e=t.children,t=function(t,e){var n={};for(o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(t);r<o.length;r++)e.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(t,o[r])&&(n[o[r]]=t[o[r]]);return n}(t,["children"]);return u.hasChildColumns(e)&&(t.children=u.mapChildColumnDefs(e)),t},u.hasChildColumns=function(t){return 0<o.Children.count(t)},u);function u(t){var e=c.call(this,t)||this;return e.props=t,e}function h(t,e){t.forEach(function(t){l[t]=e})}h(a.ColDefUtil.BOOLEAN_PROPERTIES,t.bool),h(a.ColDefUtil.STRING_PROPERTIES,t.string),h(a.ColDefUtil.OBJECT_PROPERTIES,t.object),h(a.ColDefUtil.ARRAY_PROPERTIES,t.array),h(a.ColDefUtil.NUMBER_PROPERTIES,t.number),h(a.ColDefUtil.FUNCTION_PROPERTIES,t.func),(E=e.ChangeDetectionStrategyType||(e.ChangeDetectionStrategyType={})).IdentityCheck="IdentityCheck",E.DeepValueCheck="DeepValueCheck",E.NoCheck="NoCheck";var f=(m.prototype.getStrategy=function(t){return this.strategyMap[t]},m);function m(){var t;this.strategyMap=((t={})[e.ChangeDetectionStrategyType.DeepValueCheck]=new C,t[e.ChangeDetectionStrategyType.IdentityCheck]=new y(function(t,e){return t===e}),t[e.ChangeDetectionStrategyType.NoCheck]=new y(function(t,e){return!1}),t)}var y=(d.prototype.areEqual=function(t,e){return this.strategy(t,e)},d);function d(t){this.strategy=t}var C=(g.prototype.areEqual=function(t,e){return g.areEquivalent(g.copy(t),g.copy(e))},g.unwrapStringOrNumber=function(t){return t instanceof Number||t instanceof String?t.valueOf():t},g.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},{})},g.isNaN=function(t){return Number.isNaN?Number.isNaN(t):"number"==typeof t&&isNaN(t)},g.areEquivalent=function(e,n){if(e=g.unwrapStringOrNumber(e),n=g.unwrapStringOrNumber(n),e===n)return!0;if(null===e||null===n||typeof e!=typeof n)return!1;if(g.isNaN(e)&&g.isNaN(n))return!0;if(e instanceof Date)return n instanceof Date&&e.valueOf()===n.valueOf();if("function"==typeof e)return!1;if("object"!=typeof e||e.$$typeof&&"Symbol(react.element)"===e.$$typeof.toString())return e==n;if(Object.isFrozen(e)||Object.isFrozen(n))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}},g);function g(){}var v,E=(n(P,v=function(){}),P.prototype.getGui=function(){return this.eParentElement},P.prototype.destroy=function(){return this.parentComponent.destroyPortal(this.portal)},P.prototype.createParentElement=function(t){var e=document.createElement(this.parentComponent.props.componentWrappingElement||"div");return a._.addCssClass(e,"ag-react-container"),t.reactContainer=e},P.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 a._.addCssClass(r.eParentElement,t)}))},P.prototype.statelessComponentRendered=function(){return 0<this.eParentElement.childElementCount||0<this.eParentElement.childNodes.length},P.prototype.getFrameworkComponentInstance=function(){return this.componentInstance},P.prototype.isStatelessComponent=function(){return this.statelessComponent},P.prototype.getReactComponentName=function(){return this.reactComponent.name},P.prototype.getMemoType=function(){return this.hasSymbol()?Symbol.for("react.memo"):60115},P.prototype.hasSymbol=function(){return"function"==typeof Symbol&&Symbol.for},P.prototype.isStateless=function(t){return"function"==typeof t&&!(t.prototype&&t.prototype.isReactComponent)||"object"==typeof t&&t.$$typeof===this.getMemoType()},P.prototype.hasMethod=function(t){var e=this.getFrameworkComponentInstance();return!!e&&null!==e[t]||this.fallbackMethodAvailable(t)},P.prototype.callMethod=function(t,e){var n=this,r=this.getFrameworkComponentInstance();if(this.isStatelessComponent())return this.fallbackMethod(t,e&&e[0]?e[0]:{});if(r){var o=r[t];return o?o.apply(r,e):this.fallbackMethodAvailable(t)?this.fallbackMethod(t,e&&e[0]?e[0]:{}):void 0}setTimeout(function(){return n.callMethod(t,e)})},P.prototype.addMethod=function(t,e){this[t]=e},P);function P(t,e,n){var r=v.call(this)||this;return r.portal=null,r.reactComponent=t,r.parentComponent=e,r.componentType=n,r.statelessComponent=r.isStateless(r.reactComponent),r}var R=0;function S(){return"agPortalKey_"+ ++R}var O,b=(n(k,O=E),k.prototype.init=function(e){var n=this;return this.eParentElement=this.createParentElement(e),this.renderStaticMarkup(e),new a.AgPromise(function(t){return n.createReactComponent(e,t)})},k.prototype.createReactComponent=function(t,e){var n=this;this.isStatelessComponent()||(t.ref=function(t){n.componentInstance=t,n.addParentContainerStyleAndClasses(),n.removeStaticMarkup()});t=o.createElement(this.reactComponent,t),t=r.createPortal(t,this.eParentElement,S());this.portal=t,this.parentComponent.mountReactPortal(t,this,function(t){e(t),n.isStatelessComponent()&&(n.isSlowRenderer()&&n.removeStaticMarkup(),setTimeout(function(){n.removeStaticMarkup()}))})},k.prototype.fallbackMethodAvailable=function(t){return!1},k.prototype.fallbackMethod=function(t,e){},k.prototype.isSlowRenderer=function(){return this.staticRenderTime>=k.SLOW_RENDERERING_THRESHOLD},k.prototype.isNullValue=function(){return""===this.staticMarkup},k.prototype.renderStaticMarkup=function(t){if(!(this.parentComponent.isDisableStaticMarkup()||this.componentType.isCellRenderer&&!this.componentType.isCellRenderer())){var e=console.error,t=o.createElement(this.reactComponent,t);try{console.error=function(){};var n=Date.now(),r=i.renderToStaticMarkup(t);this.staticRenderTime=Date.now()-n,console.error=e,""===r?this.staticMarkup=r:r&&(this.staticMarkup=document.createElement("span"),this.staticMarkup.innerHTML=r,this.eParentElement.appendChild(this.staticMarkup))}catch(t){}finally{console.error=e}}},k.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))},k.prototype.rendered=function(){return this.isNullValue()||!!this.staticMarkup||this.isStatelessComponent()&&this.statelessComponentRendered()||!(this.isStatelessComponent()||!this.getFrameworkComponentInstance())},k.SLOW_RENDERERING_THRESHOLD=3,k);function k(){var t=null!==O&&O.apply(this,arguments)||this;return t.staticMarkup=null,t.staticRenderTime=0,t}var T,D=(n(M,T=E),M.prototype.init=function(t){var e=this;return this.eParentElement=this.createParentElement(t),this.params=t,this.createOrUpdatePortal(t),new a.AgPromise(function(t){return e.createReactComponent(t)})},M.prototype.createOrUpdatePortal=function(t){var e=this;this.isStatelessComponent()||(t.ref=function(t){e.componentInstance=t,e.addParentContainerStyleAndClasses()}),this.reactElement=o.createElement(this.reactComponent,p(p({},t),{key:this.key})),this.portal=r.createPortal(this.reactElement,this.eParentElement,this.portalKey)},M.prototype.createReactComponent=function(e){this.parentComponent.mountReactPortal(this.portal,this,function(t){e(t)})},M.prototype.isNullValue=function(){return this.valueRenderedIsNull(this.params)},M.prototype.rendered=function(){return this.isStatelessComponent()&&this.statelessComponentRendered()||!(this.isStatelessComponent()||!this.getFrameworkComponentInstance())},M.prototype.valueRenderedIsNull=function(t){if(this.componentType.isCellRenderer&&!this.componentType.isCellRenderer())return!1;var e=console.error;try{return console.error=function(){},""===i.renderToStaticMarkup(o.createElement(this.reactComponent,t))}catch(t){}finally{console.error=e}return!1},M.prototype.refreshComponent=function(t){this.oldPortal=this.portal,this.createOrUpdatePortal(t),this.parentComponent.updateReactPortal(this.oldPortal,this.portal)},M.prototype.fallbackMethod=function(t,e){t=this[t+"Component"];if(t)return t.bind(this)(e)},M.prototype.fallbackMethodAvailable=function(t){return!!this[t+"Component"]},M);function M(t,e,n){n=T.call(this,t,e,n)||this;return n.oldPortal=null,n.key=S(),n.portalKey=S(),n}var N,I=(n(_,N=o.Component),_.prototype.render=function(){var e=this;return o.createElement("div",{style:this.createStyleForDiv(),className:this.props.className,ref:function(t){e.eGridDiv=t}},this.portals)},_.prototype.createStyleForDiv=function(){return p({height:"100%"},this.props.containerStyle||{})},_.prototype.componentDidMount=function(){var t=this.props.modules||[],e={providedBeanInstances:{agGridReact:this,frameworkComponentWrapper:new A(this)},modules:t},n=this.props.gridOptions||{},t=this.props.children;l.hasChildColumns(t)&&(n.columnDefs=l.mapChildColumnDefs(t)),this.gridOptions=a.ComponentUtil.copyAttributesToGridOptions(n,this.props),new a.Grid(this.eGridDiv,this.gridOptions,e),this.api=this.gridOptions.api,this.columnApi=this.gridOptions.columnApi},_.prototype.waitForInstance=function(t,e,n){var r=this;if(void 0===n&&(n=Date.now()),this.destroyed)e(null);else if(t.rendered())e(t);else{if(Date.now()-n>=this.props.maxComponentCreationTimeMs&&!this.hasPendingPortalUpdate)return t.isNullValue()?void e(t):void console.error("AG Grid: React Component '"+t.getReactComponentName()+"' not created within "+_.MAX_COMPONENT_CREATION_TIME_IN_MS+"ms");window.setTimeout(function(){r.waitForInstance(t,e,n)})}},_.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;for(var r=Array(t),o=0,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.waitForInstance(e,n),this.batchUpdate()},_.prototype.updateReactPortal=function(t,e){this.portals[this.portals.indexOf(t)]=e,this.batchUpdate()},_.prototype.batchUpdate=function(){var t=this;this.hasPendingPortalUpdate||(setTimeout(function(){t.api&&t.forceUpdate(function(){t.hasPendingPortalUpdate=!1})}),this.hasPendingPortalUpdate=!0)},_.prototype.destroyPortal=function(e){this.portals=this.portals.filter(function(t){return t!==e}),this.batchUpdate()},_.prototype.getStrategyTypeForProp=function(t){if("rowData"===t){if(this.props.rowDataChangeDetectionStrategy)return this.props.rowDataChangeDetectionStrategy;if(this.isImmutableDataActive())return e.ChangeDetectionStrategyType.IdentityCheck}return e.ChangeDetectionStrategyType.DeepValueCheck},_.prototype.isImmutableDataActive=function(){return this.props.deltaRowDataMode||this.props.immutableData||this.props.gridOptions&&(this.props.gridOptions.deltaRowDataMode||this.props.gridOptions.immutableData)},_.prototype.shouldComponentUpdate=function(t){return this.processPropsChanges(this.props,t),!1},_.prototype.componentDidUpdate=function(t){this.processPropsChanges(t,this.props)},_.prototype.processPropsChanges=function(t,e){var n={};this.extractGridPropertyChanges(t,e,n),this.extractDeclarativeColDefChanges(e,n),this.processSynchronousChanges(n),this.processAsynchronousChanges(n)},_.prototype.extractDeclarativeColDefChanges=function(t,e){var n,r,o,i;this.props.gridOptions&&this.props.gridOptions.columnDefs||this.props.columnDefs||(n=!!t.debug,r="columnDefs",o=this.gridOptions.columnDefs,l.hasChildColumns(t.children)?(i=this.changeDetectionService.getStrategy(this.getStrategyTypeForProp(r)),t=l.mapChildColumnDefs(t.children),i.areEqual(o,t)||(n&&console.log("agGridReact: colDefs definitions changed"),e[r]={previousValue:o,currentValue:t})):o&&0<o.length&&(e[r]={previousValue:o,currentValue:[]}))},_.prototype.extractGridPropertyChanges=function(e,n,r){var o=this,i=!!n.debug;Object.keys(n).forEach(function(t){a._.includes(a.ComponentUtil.ALL_PROPERTIES,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]}))}),a.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]})})},_.prototype.componentWillUnmount=function(){this.api&&(this.api.destroy(),this.api=null),this.destroyed=!0},_.prototype.isDisableStaticMarkup=function(){return this.props.disableStaticMarkup},_.prototype.isLegacyComponentRendering=function(){return this.props.legacyComponentRendering},_.prototype.processSynchronousChanges=function(t){var e,n=p({},t);return 0<Object.keys(n).length&&(e={},this.SYNCHRONOUS_CHANGE_PROPERTIES.forEach(function(t){n[t]&&(e[t]=n[t],delete n.context)}),0<Object.keys(e).length&&this.api&&a.ComponentUtil.processOnChange(e,this.gridOptions,this.api,this.columnApi)),n},_.prototype.processAsynchronousChanges=function(t){var e=this;0<Object.keys(t).length&&window.setTimeout(function(){e.api&&a.ComponentUtil.processOnChange(t,e.gridOptions,e.api,e.columnApi)})},_.defaultProps={legacyComponentRendering:!1,disableStaticMarkup:!1,maxComponentCreationTimeMs:_.MAX_COMPONENT_CREATION_TIME_IN_MS=1e3},_);function _(t){var e=N.call(this,t)||this;return e.props=t,e.changeDetectionService=new f,e.api=null,e.portals=[],e.hasPendingPortalUpdate=!1,e.destroyed=!1,e.SYNCHRONOUS_CHANGE_PROPERTIES=["context"],e}function w(t,e){t.forEach(function(t){I[t]=e})}I.propTypes={gridOptions:t.object},w(a.ComponentUtil.getEventCallbacks(),t.func),w(a.ComponentUtil.BOOLEAN_PROPERTIES,t.bool),w(a.ComponentUtil.STRING_PROPERTIES,t.string),w(a.ComponentUtil.OBJECT_PROPERTIES,t.object),w(a.ComponentUtil.ARRAY_PROPERTIES,t.array),w(a.ComponentUtil.NUMBER_PROPERTIES,t.number),w(a.ComponentUtil.FUNCTION_PROPERTIES,t.func);var U,A=(n(G,U=a.BaseComponentWrapper),G.prototype.createWrapper=function(t,e){return new(this.agGridReact.isLegacyComponentRendering()?b:D)(t,this.agGridReact,e)},G);function G(t){var e=U.call(this)||this;return e.agGridReact=t,e}e.AgGridReact=I,e.AgGridColumn=l,Object.defineProperty(e,"__esModule",{value:!0})}); |
@@ -19,5 +19,5 @@ # Contributing to ag-grid-react | ||
If you're using the Enterprise version of ag-Grid (ag-grid-enterprise), then the [Members Forum](https://ag-grid.com/forum/forumdisplay.php?fid=5) is the best place to ask - you'll get a much quicker response there. Please contact accounts@ag-grid.com for access. | ||
If you're using the Enterprise version of AG Grid (ag-grid-enterprise), then the [Members Forum](https://ag-grid.com/forum/forumdisplay.php?fid=5) is the best place to ask - you'll get a much quicker response there. Please contact accounts@ag-grid.com for access. | ||
To save your and our time we will be systematically closing all the issues that are requests for general support (for ag-Grid Free) and redirecting people to StackOverflow. | ||
To save your and our time we will be systematically closing all the issues that are requests for general support (for AG Grid Community) and redirecting people to StackOverflow. | ||
@@ -24,0 +24,0 @@ ## <a name="issue"></a> Found a Bug? |
@@ -1,2 +0,2 @@ | ||
// ag-grid-react v25.1.0 | ||
// ag-grid-react v25.2.0 | ||
import { Component } from "react"; | ||
@@ -3,0 +3,0 @@ import { ColDef, ColGroupDef } from "ag-grid-community"; |
@@ -1,2 +0,2 @@ | ||
// ag-grid-react v25.1.0 | ||
// ag-grid-react v25.2.0 | ||
"use strict"; | ||
@@ -3,0 +3,0 @@ var __extends = (this && this.__extends) || (function () { |
@@ -1,2 +0,2 @@ | ||
// ag-grid-react v25.1.0 | ||
// ag-grid-react v25.2.0 | ||
import * as React from "react"; | ||
@@ -3,0 +3,0 @@ import { Component, ReactPortal } from "react"; |
@@ -1,2 +0,2 @@ | ||
// ag-grid-react v25.1.0 | ||
// ag-grid-react v25.2.0 | ||
"use strict"; | ||
@@ -265,3 +265,3 @@ var __extends = (this && this.__extends) || (function () { | ||
if (Object.keys(synchronousChanges_1).length > 0 && !!this.api) { | ||
ag_grid_community_1.ComponentUtil.processOnChange({ context: asyncChanges.context }, this.gridOptions, this.api, this.columnApi); | ||
ag_grid_community_1.ComponentUtil.processOnChange(synchronousChanges_1, this.gridOptions, this.api, this.columnApi); | ||
} | ||
@@ -268,0 +268,0 @@ } |
@@ -1,2 +0,2 @@ | ||
// ag-grid-react v25.1.0 | ||
// ag-grid-react v25.2.0 | ||
export declare enum ChangeDetectionStrategyType { | ||
@@ -3,0 +3,0 @@ IdentityCheck = "IdentityCheck", |
@@ -1,2 +0,2 @@ | ||
// ag-grid-react v25.1.0 | ||
// ag-grid-react v25.2.0 | ||
"use strict"; | ||
@@ -100,3 +100,4 @@ Object.defineProperty(exports, "__esModule", { value: true }); | ||
if (typeof a === "function") { | ||
return a.toString() === b.toString(); | ||
// false to allow for callbacks to be reactive... | ||
return false; | ||
} | ||
@@ -103,0 +104,0 @@ if (typeof a !== "object" || |
@@ -1,2 +0,2 @@ | ||
// ag-grid-react v25.1.0 | ||
// ag-grid-react v25.2.0 | ||
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 v25.1.0 | ||
// ag-grid-react v25.2.0 | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); |
@@ -1,2 +0,2 @@ | ||
// ag-grid-react v25.1.0 | ||
// ag-grid-react v25.2.0 | ||
export default function generateNewKey(): string; |
@@ -1,2 +0,2 @@ | ||
// ag-grid-react v25.1.0 | ||
// ag-grid-react v25.2.0 | ||
"use strict"; | ||
@@ -3,0 +3,0 @@ Object.defineProperty(exports, "__esModule", { value: true }); |
@@ -1,2 +0,2 @@ | ||
// ag-grid-react v25.1.0 | ||
// ag-grid-react v25.2.0 | ||
import { AgPromise } from 'ag-grid-community'; | ||
@@ -3,0 +3,0 @@ import { ReactComponent } from './reactComponent'; |
@@ -1,2 +0,2 @@ | ||
// ag-grid-react v25.1.0 | ||
// ag-grid-react v25.2.0 | ||
"use strict"; | ||
@@ -3,0 +3,0 @@ var __extends = (this && this.__extends) || (function () { |
@@ -1,4 +0,4 @@ | ||
// ag-grid-react v25.1.0 | ||
// ag-grid-react v25.2.0 | ||
export { AgGridReact } from './agGridReact'; | ||
export { AgGridColumn } from './agGridColumn'; | ||
export { ChangeDetectionStrategyType } from './changeDetectionService'; |
@@ -1,2 +0,2 @@ | ||
// ag-grid-react v25.1.0 | ||
// ag-grid-react v25.2.0 | ||
"use strict"; | ||
@@ -8,3 +8,4 @@ Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.AgGridColumn = agGridColumn_1.AgGridColumn; | ||
// export {AgGridReactNext} from './next/agGridReactNext'; | ||
var changeDetectionService_1 = require("./changeDetectionService"); | ||
exports.ChangeDetectionStrategyType = changeDetectionService_1.ChangeDetectionStrategyType; |
@@ -1,2 +0,2 @@ | ||
// ag-grid-react v25.1.0 | ||
// ag-grid-react v25.2.0 | ||
import { ComponentType, AgPromise } from 'ag-grid-community'; | ||
@@ -3,0 +3,0 @@ import { AgGridReact } from "./agGridReact"; |
@@ -1,2 +0,2 @@ | ||
// ag-grid-react v25.1.0 | ||
// ag-grid-react v25.2.0 | ||
"use strict"; | ||
@@ -3,0 +3,0 @@ var __extends = (this && this.__extends) || (function () { |
@@ -1,2 +0,2 @@ | ||
// ag-grid-react v25.1.0 | ||
// ag-grid-react v25.2.0 | ||
import { ComponentType, IComponent, WrapableInterface } from 'ag-grid-community'; | ||
@@ -3,0 +3,0 @@ import { AgGridReact } from "./agGridReact"; |
@@ -1,2 +0,2 @@ | ||
// ag-grid-react v25.1.0 | ||
// ag-grid-react v25.2.0 | ||
"use strict"; | ||
@@ -3,0 +3,0 @@ var __extends = (this && this.__extends) || (function () { |
@@ -1,3 +0,3 @@ | ||
// ag-grid-react v25.1.0 | ||
// ag-grid-react v25.2.0 | ||
export declare const assignProperties: (to: {}, from: {}) => void; | ||
export declare const assign: (obj: any, prop: any, value: any) => void; |
@@ -1,2 +0,2 @@ | ||
// ag-grid-react v25.1.0 | ||
// ag-grid-react v25.2.0 | ||
"use strict"; | ||
@@ -3,0 +3,0 @@ Object.defineProperty(exports, "__esModule", { value: true }); |
{ | ||
"name": "ag-grid-react", | ||
"version": "25.1.0", | ||
"description": "ag-Grid React Component", | ||
"version": "25.2.0", | ||
"description": "AG Grid React Component", | ||
"main": "main.js", | ||
@@ -40,6 +40,6 @@ "typings": "./main.d.ts", | ||
"devDependencies": { | ||
"ag-grid-community": "~25.1.0", | ||
"@ag-grid-community/react": "~25.1.0", | ||
"@ag-grid-community/client-side-row-model": "~25.1.0", | ||
"@ag-grid-community/core": "~25.1.0", | ||
"ag-grid-community": "~25.2.0", | ||
"@ag-grid-community/react": "~25.2.0", | ||
"@ag-grid-community/client-side-row-model": "~25.2.0", | ||
"@ag-grid-community/core": "~25.2.0", | ||
"@babel/core": "7.12.3", | ||
@@ -54,4 +54,4 @@ "@babel/plugin-proposal-throw-expressions": "^7.12.1", | ||
"@types/node": "^12.0.0", | ||
"@types/react": "17.0.0", | ||
"@types/react-dom": "17.0.0", | ||
"@types/react": "17.0.4", | ||
"@types/react-dom": "17.0.3", | ||
"@typescript-eslint/eslint-plugin": "^4.5.0", | ||
@@ -141,3 +141,3 @@ "@typescript-eslint/parser": "^4.5.0", | ||
"peerDependencies": { | ||
"ag-grid-community": "~25.1.0", | ||
"ag-grid-community": "~25.2.0", | ||
"react": "^16.3.0 || ^17.0.0", | ||
@@ -223,2 +223,2 @@ "react-dom": "^16.3.0 || ^17.0.0" | ||
} | ||
} | ||
} |
 | ||
 | ||
[](https://cdnjs.com/libraries/ag-grid) | ||
[](https://www.npmjs.com/package/ag-grid) | ||
[](https://www.npmjs.com/package/ag-grid) | ||
[](https://cdnjs.com/libraries/ag-grid) [](https://www.npmjs.com/package/ag-grid-react) [](https://bundlephobia.com/result?p=ag-grid-react) [](https://github.com/ag-grid/ag-grid) [](https://twitter.com/ag_grid) | ||
ag-Grid React Component | ||
AG Grid React Component | ||
------ | ||
ag-Grid is a fully-featured and highly customizable JavaScript data grid. | ||
AG Grid is a fully-featured and highly customizable JavaScript data grid. | ||
It delivers [outstanding performance](https://www.ag-grid.com/example.php?utm_source=ag-grid-react-readme&utm_medium=repository&utm_campaign=github#/performance/1), has no 3rd party dependencies and integrates smoothly with React as React Component. Here's how our grid looks like with multiple filters and grouping enabled: | ||
 | ||
 | ||
@@ -27,3 +25,3 @@ | ||
Here are some of the features that make ag-Grid stand out: | ||
Here are some of the features that make AG Grid stand out: | ||
@@ -127,3 +125,3 @@ * Grouping / Aggregation* | ||
------------ | ||
ag-Grid is developed by a team of co-located developers in London. If you want to join the team check out our [jobs listing](https://www.ag-grid.com/ag-grid-jobs-board?utm_source=ag-grid-react-readme&utm_medium=repository&utm_campaign=github) or send your application to info@ag-grid.com. | ||
AG Grid is developed by a team of co-located developers in London. If you want to join the team check out our [jobs listing](https://www.ag-grid.com/ag-grid-jobs-board?utm_source=ag-grid-react-readme&utm_medium=repository&utm_campaign=github) or send your application to info@ag-grid.com. | ||
@@ -130,0 +128,0 @@ License |
Sorry, the diff of this file is not supported yet
103060
32
1372
129