ag-grid-react
Advanced tools
Comparing version 25.0.1 to 25.1.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 u.toColDef(t.props)})},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),(P=e.ChangeDetectionStrategyType||(e.ChangeDetectionStrategyType={})).IdentityCheck="IdentityCheck",P.DeepValueCheck="DeepValueCheck",P.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 d(function(t,e){return t===e}),t[e.ChangeDetectionStrategyType.NoCheck]=new d(function(t,e){return!1}),t)}var d=(y.prototype.areEqual=function(t,e){return this.strategy(t,e)},y);function y(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;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,P=(n(E,v=function(){}),E.prototype.getGui=function(){return this.eParentElement},E.prototype.destroy=function(){return this.parentComponent.destroyPortal(this.portal)},E.prototype.createParentElement=function(t){var e=document.createElement(this.parentComponent.props.componentWrappingElement||"div");return a._.addCssClass(e,"ag-react-container"),t.reactContainer=e},E.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)}))},E.prototype.statelessComponentRendered=function(){return 0<this.eParentElement.childElementCount||0<this.eParentElement.childNodes.length},E.prototype.getFrameworkComponentInstance=function(){return this.componentInstance},E.prototype.isStatelessComponent=function(){return this.statelessComponent},E.prototype.getReactComponentName=function(){return this.reactComponent.name},E.prototype.getMemoType=function(){return this.hasSymbol()?Symbol.for("react.memo"):60115},E.prototype.hasSymbol=function(){return"function"==typeof Symbol&&Symbol.for},E.prototype.isStateless=function(t){return"function"==typeof t&&!(t.prototype&&t.prototype.isReactComponent)||"object"==typeof t&&t.$$typeof===this.getMemoType()},E.prototype.hasMethod=function(t){var e=this.getFrameworkComponentInstance();return!!e&&null!==e[t]||this.fallbackMethodAvailable(t)},E.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)})},E.prototype.addMethod=function(t,e){this[t]=e},E);function E(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,k=(n(T,O=P),T.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)})},T.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()}))})},T.prototype.fallbackMethodAvailable=function(t){return!1},T.prototype.fallbackMethod=function(t,e){},T.prototype.isSlowRenderer=function(){return this.staticRenderTime>=T.SLOW_RENDERERING_THRESHOLD},T.prototype.isNullValue=function(){return""===this.staticMarkup},T.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}}},T.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))},T.prototype.rendered=function(){return this.isNullValue()||!!this.staticMarkup||this.isStatelessComponent()&&this.statelessComponentRendered()||!(this.isStatelessComponent()||!this.getFrameworkComponentInstance())},T.SLOW_RENDERERING_THRESHOLD=3,T);function T(){var t=null!==O&&O.apply(this,arguments)||this;return t.staticMarkup=null,t.staticRenderTime=0,t}var b,D=(n(M,b=P),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,S())},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=b.call(this,t,e,n)||this;return n.oldPortal=null,n.key=S(),n}var N,I=(n(w,N=i.Component),w.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)},w.prototype.createStyleForDiv=function(){return p({height:"100%"},this.props.containerStyle||{})},w.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},w.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 "+w.MAX_COMPONENT_CREATION_TIME_IN_MS+"ms");window.setTimeout(function(){r.waitForInstance(t,e,n)})}},w.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()},w.prototype.updateReactPortal=function(e,t){this.portals=this.portals.filter(function(t){return t!==e}).concat(t),this.batchUpdate()},w.prototype.batchUpdate=function(){var t=this;this.hasPendingPortalUpdate||(setTimeout(function(){t.api&&t.forceUpdate(function(){t.hasPendingPortalUpdate=!1})}),this.hasPendingPortalUpdate=!0)},w.prototype.destroyPortal=function(e){this.portals=this.portals.filter(function(t){return t!==e}),this.batchUpdate()},w.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},w.prototype.isImmutableDataActive=function(){return this.props.deltaRowDataMode||this.props.immutableData||this.props.gridOptions&&(this.props.gridOptions.deltaRowDataMode||this.props.gridOptions.immutableData)},w.prototype.shouldComponentUpdate=function(t){return this.processPropsChanges(this.props,t),!1},w.prototype.componentDidUpdate=function(t){this.processPropsChanges(t,this.props)},w.prototype.processPropsChanges=function(t,e){var n=this,r={};this.extractGridPropertyChanges(t,e,r),this.extractDeclarativeColDefChanges(e,r),0<Object.keys(r).length&&window.setTimeout(function(){n.api&&a.ComponentUtil.processOnChange(r,n.gridOptions,n.api,n.columnApi)})},w.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:[]}))},w.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]})})},w.prototype.componentWillUnmount=function(){this.api&&(this.api.destroy(),this.api=null),this.destroyed=!0},w.prototype.isDisableStaticMarkup=function(){return this.props.disableStaticMarkup},w.prototype.isLegacyComponentRendering=function(){return this.props.legacyComponentRendering},w.defaultProps={legacyComponentRendering:!1,disableStaticMarkup:!1,maxComponentCreationTimeMs:w.MAX_COMPONENT_CREATION_TIME_IN_MS=1e3},w);function w(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}function _(t,e){t.forEach(function(t){I[t]=e})}I.propTypes={gridOptions:t.object},_(a.ComponentUtil.getEventCallbacks(),t.func),_(a.ComponentUtil.BOOLEAN_PROPERTIES,t.bool),_(a.ComponentUtil.STRING_PROPERTIES,t.string),_(a.ComponentUtil.OBJECT_PROPERTIES,t.object),_(a.ComponentUtil.ARRAY_PROPERTIES,t.array),_(a.ComponentUtil.NUMBER_PROPERTIES,t.number),_(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()?k: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,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})}); |
@@ -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 u.toColDef(t.props)})},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),(P=e.ChangeDetectionStrategyType||(e.ChangeDetectionStrategyType={})).IdentityCheck="IdentityCheck",P.DeepValueCheck="DeepValueCheck",P.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 d(function(t,e){return t===e}),t[e.ChangeDetectionStrategyType.NoCheck]=new d(function(t,e){return!1}),t)}var d=(y.prototype.areEqual=function(t,e){return this.strategy(t,e)},y);function y(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;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,P=(n(E,v=function(){}),E.prototype.getGui=function(){return this.eParentElement},E.prototype.destroy=function(){return this.parentComponent.destroyPortal(this.portal)},E.prototype.createParentElement=function(t){var e=document.createElement(this.parentComponent.props.componentWrappingElement||"div");return a._.addCssClass(e,"ag-react-container"),t.reactContainer=e},E.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)}))},E.prototype.statelessComponentRendered=function(){return 0<this.eParentElement.childElementCount||0<this.eParentElement.childNodes.length},E.prototype.getFrameworkComponentInstance=function(){return this.componentInstance},E.prototype.isStatelessComponent=function(){return this.statelessComponent},E.prototype.getReactComponentName=function(){return this.reactComponent.name},E.prototype.getMemoType=function(){return this.hasSymbol()?Symbol.for("react.memo"):60115},E.prototype.hasSymbol=function(){return"function"==typeof Symbol&&Symbol.for},E.prototype.isStateless=function(t){return"function"==typeof t&&!(t.prototype&&t.prototype.isReactComponent)||"object"==typeof t&&t.$$typeof===this.getMemoType()},E.prototype.hasMethod=function(t){var e=this.getFrameworkComponentInstance();return!!e&&null!==e[t]||this.fallbackMethodAvailable(t)},E.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)})},E.prototype.addMethod=function(t,e){this[t]=e},E);function E(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,k=(n(T,O=P),T.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)})},T.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()}))})},T.prototype.fallbackMethodAvailable=function(t){return!1},T.prototype.fallbackMethod=function(t,e){},T.prototype.isSlowRenderer=function(){return this.staticRenderTime>=T.SLOW_RENDERERING_THRESHOLD},T.prototype.isNullValue=function(){return""===this.staticMarkup},T.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}}},T.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))},T.prototype.rendered=function(){return this.isNullValue()||!!this.staticMarkup||this.isStatelessComponent()&&this.statelessComponentRendered()||!(this.isStatelessComponent()||!this.getFrameworkComponentInstance())},T.SLOW_RENDERERING_THRESHOLD=3,T);function T(){var t=null!==O&&O.apply(this,arguments)||this;return t.staticMarkup=null,t.staticRenderTime=0,t}var b,D=(n(M,b=P),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,S())},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=b.call(this,t,e,n)||this;return n.oldPortal=null,n.key=S(),n}var N,I=(n(w,N=i.Component),w.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)},w.prototype.createStyleForDiv=function(){return p({height:"100%"},this.props.containerStyle||{})},w.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},w.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 "+w.MAX_COMPONENT_CREATION_TIME_IN_MS+"ms");window.setTimeout(function(){r.waitForInstance(t,e,n)})}},w.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()},w.prototype.updateReactPortal=function(e,t){this.portals=this.portals.filter(function(t){return t!==e}).concat(t),this.batchUpdate()},w.prototype.batchUpdate=function(){var t=this;this.hasPendingPortalUpdate||(setTimeout(function(){t.api&&t.forceUpdate(function(){t.hasPendingPortalUpdate=!1})}),this.hasPendingPortalUpdate=!0)},w.prototype.destroyPortal=function(e){this.portals=this.portals.filter(function(t){return t!==e}),this.batchUpdate()},w.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},w.prototype.isImmutableDataActive=function(){return this.props.deltaRowDataMode||this.props.immutableData||this.props.gridOptions&&(this.props.gridOptions.deltaRowDataMode||this.props.gridOptions.immutableData)},w.prototype.shouldComponentUpdate=function(t){return this.processPropsChanges(this.props,t),!1},w.prototype.componentDidUpdate=function(t){this.processPropsChanges(t,this.props)},w.prototype.processPropsChanges=function(t,e){var n=this,r={};this.extractGridPropertyChanges(t,e,r),this.extractDeclarativeColDefChanges(e,r),0<Object.keys(r).length&&window.setTimeout(function(){n.api&&a.ComponentUtil.processOnChange(r,n.gridOptions,n.api,n.columnApi)})},w.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:[]}))},w.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]})})},w.prototype.componentWillUnmount=function(){this.api&&(this.api.destroy(),this.api=null),this.destroyed=!0},w.prototype.isDisableStaticMarkup=function(){return this.props.disableStaticMarkup},w.prototype.isLegacyComponentRendering=function(){return this.props.legacyComponentRendering},w.defaultProps={legacyComponentRendering:!1,disableStaticMarkup:!1,maxComponentCreationTimeMs:w.MAX_COMPONENT_CREATION_TIME_IN_MS=1e3},w);function w(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}function _(t,e){t.forEach(function(t){I[t]=e})}I.propTypes={gridOptions:t.object},_(a.ComponentUtil.getEventCallbacks(),t.func),_(a.ComponentUtil.BOOLEAN_PROPERTIES,t.bool),_(a.ComponentUtil.STRING_PROPERTIES,t.string),_(a.ComponentUtil.OBJECT_PROPERTIES,t.object),_(a.ComponentUtil.ARRAY_PROPERTIES,t.array),_(a.ComponentUtil.NUMBER_PROPERTIES,t.number),_(a.ComponentUtil.FUNCTION_PROPERTIES,t.func);var U,A=(n(q,U=a.BaseComponentWrapper),q.prototype.createWrapper=function(t,e){return new(this.agGridReact.isLegacyComponentRendering()?k:D)(t,this.agGridReact,e)},q);function q(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,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})}); |
@@ -1,2 +0,2 @@ | ||
// ag-grid-react v25.0.1 | ||
// ag-grid-react v25.1.0 | ||
import { Component } from "react"; | ||
@@ -3,0 +3,0 @@ import { ColDef, ColGroupDef } from "ag-grid-community"; |
@@ -1,2 +0,2 @@ | ||
// ag-grid-react v25.0.1 | ||
// ag-grid-react v25.1.0 | ||
"use strict"; | ||
@@ -43,3 +43,3 @@ var __extends = (this && this.__extends) || (function () { | ||
AgGridColumn.mapChildColumnDefs = function (children) { | ||
return React.Children.map(children, function (child) { return AgGridColumn.toColDef(child.props); }); | ||
return React.Children.map(children, function (child) { return !!child ? AgGridColumn.toColDef(child.props) : null; }); | ||
}; | ||
@@ -46,0 +46,0 @@ AgGridColumn.toColDef = function (columnProps) { |
@@ -1,2 +0,2 @@ | ||
// ag-grid-react v25.0.1 | ||
// ag-grid-react v25.1.0 | ||
import * as React from "react"; | ||
@@ -34,2 +34,3 @@ import { Component, ReactPortal } from "react"; | ||
protected eGridDiv: HTMLElement; | ||
readonly SYNCHRONOUS_CHANGE_PROPERTIES: string[]; | ||
constructor(props: any); | ||
@@ -63,2 +64,4 @@ render(): React.DetailedReactHTMLElement<{ | ||
isLegacyComponentRendering(): boolean; | ||
private processSynchronousChanges; | ||
private processAsynchronousChanges; | ||
} |
@@ -1,2 +0,2 @@ | ||
// ag-grid-react v25.0.1 | ||
// ag-grid-react v25.1.0 | ||
"use strict"; | ||
@@ -53,2 +53,3 @@ var __extends = (this && this.__extends) || (function () { | ||
_this.destroyed = false; | ||
_this.SYNCHRONOUS_CHANGE_PROPERTIES = ['context']; | ||
return _this; | ||
@@ -108,3 +109,3 @@ } | ||
} | ||
console.error("ag-Grid: React Component '" + reactComponent.getReactComponentName() + "' not created within " + AgGridReact.MAX_COMPONENT_CREATION_TIME_IN_MS + "ms"); | ||
console.error("AG Grid: React Component '" + reactComponent.getReactComponentName() + "' not created within " + AgGridReact.MAX_COMPONENT_CREATION_TIME_IN_MS + "ms"); | ||
return; | ||
@@ -128,3 +129,3 @@ } | ||
AgGridReact.prototype.updateReactPortal = function (oldPortal, newPortal) { | ||
this.portals = this.portals.filter(function (portal) { return portal !== oldPortal; }).concat(newPortal); | ||
this.portals[this.portals.indexOf(oldPortal)] = newPortal; | ||
this.batchUpdate(); | ||
@@ -168,3 +169,3 @@ }; | ||
this.processPropsChanges(this.props, nextProps); | ||
// we want full control of the dom, as ag-Grid doesn't use React internally, | ||
// we want full control of the dom, as AG Grid doesn't use React internally, | ||
// so for performance reasons we tell React we don't need render called after | ||
@@ -178,14 +179,7 @@ // property changes. | ||
AgGridReact.prototype.processPropsChanges = function (prevProps, nextProps) { | ||
var _this = this; | ||
var changes = {}; | ||
this.extractGridPropertyChanges(prevProps, nextProps, changes); | ||
this.extractDeclarativeColDefChanges(nextProps, changes); | ||
if (Object.keys(changes).length > 0) { | ||
window.setTimeout(function () { | ||
// destroyed? | ||
if (_this.api) { | ||
ag_grid_community_1.ComponentUtil.processOnChange(changes, _this.gridOptions, _this.api, _this.columnApi); | ||
} | ||
}); | ||
} | ||
this.processSynchronousChanges(changes); | ||
this.processAsynchronousChanges(changes); | ||
}; | ||
@@ -265,2 +259,29 @@ AgGridReact.prototype.extractDeclarativeColDefChanges = function (nextProps, changes) { | ||
}; | ||
AgGridReact.prototype.processSynchronousChanges = function (changes) { | ||
var asyncChanges = __assign({}, changes); | ||
if (Object.keys(asyncChanges).length > 0) { | ||
var synchronousChanges_1 = {}; | ||
this.SYNCHRONOUS_CHANGE_PROPERTIES.forEach(function (synchronousChangeProperty) { | ||
if (asyncChanges[synchronousChangeProperty]) { | ||
synchronousChanges_1[synchronousChangeProperty] = asyncChanges[synchronousChangeProperty]; | ||
delete asyncChanges.context; | ||
} | ||
}); | ||
if (Object.keys(synchronousChanges_1).length > 0 && !!this.api) { | ||
ag_grid_community_1.ComponentUtil.processOnChange({ context: asyncChanges.context }, this.gridOptions, this.api, this.columnApi); | ||
} | ||
} | ||
return asyncChanges; | ||
}; | ||
AgGridReact.prototype.processAsynchronousChanges = function (changes) { | ||
var _this = this; | ||
if (Object.keys(changes).length > 0) { | ||
window.setTimeout(function () { | ||
// destroyed? | ||
if (_this.api) { | ||
ag_grid_community_1.ComponentUtil.processOnChange(changes, _this.gridOptions, _this.api, _this.columnApi); | ||
} | ||
}); | ||
} | ||
}; | ||
AgGridReact.MAX_COMPONENT_CREATION_TIME_IN_MS = 1000; // a second should be more than enough to instantiate a component | ||
@@ -267,0 +288,0 @@ AgGridReact.defaultProps = { |
@@ -1,2 +0,2 @@ | ||
// ag-grid-react v25.0.1 | ||
// ag-grid-react v25.1.0 | ||
export declare enum ChangeDetectionStrategyType { | ||
@@ -3,0 +3,0 @@ IdentityCheck = "IdentityCheck", |
@@ -1,2 +0,2 @@ | ||
// ag-grid-react v25.0.1 | ||
// ag-grid-react v25.1.0 | ||
"use strict"; | ||
@@ -106,2 +106,5 @@ Object.defineProperty(exports, "__esModule", { value: true }); | ||
} | ||
if (Object.isFrozen(a) || Object.isFrozen(b)) { | ||
return a === b; | ||
} | ||
var newA = a.areEquivPropertyTracking === undefined, newB = b.areEquivPropertyTracking === undefined; | ||
@@ -108,0 +111,0 @@ try { |
@@ -1,2 +0,2 @@ | ||
// ag-grid-react v25.0.1 | ||
// ag-grid-react v25.1.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.0.1 | ||
// ag-grid-react v25.1.0 | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); |
@@ -1,2 +0,2 @@ | ||
// ag-grid-react v25.0.1 | ||
// ag-grid-react v25.1.0 | ||
export default function generateNewKey(): string; |
@@ -1,2 +0,2 @@ | ||
// ag-grid-react v25.0.1 | ||
// ag-grid-react v25.1.0 | ||
"use strict"; | ||
@@ -3,0 +3,0 @@ Object.defineProperty(exports, "__esModule", { value: true }); |
@@ -1,2 +0,2 @@ | ||
// ag-grid-react v25.0.1 | ||
// ag-grid-react v25.1.0 | ||
import { AgPromise } from 'ag-grid-community'; | ||
@@ -3,0 +3,0 @@ import { ReactComponent } from './reactComponent'; |
@@ -1,2 +0,2 @@ | ||
// ag-grid-react v25.0.1 | ||
// ag-grid-react v25.1.0 | ||
"use strict"; | ||
@@ -3,0 +3,0 @@ var __extends = (this && this.__extends) || (function () { |
@@ -1,4 +0,4 @@ | ||
// ag-grid-react v25.0.1 | ||
// ag-grid-react v25.1.0 | ||
export { AgGridReact } from './agGridReact'; | ||
export { AgGridColumn } from './agGridColumn'; | ||
export { ChangeDetectionStrategyType } from './changeDetectionService'; |
@@ -1,2 +0,2 @@ | ||
// ag-grid-react v25.0.1 | ||
// ag-grid-react v25.1.0 | ||
"use strict"; | ||
@@ -3,0 +3,0 @@ Object.defineProperty(exports, "__esModule", { value: true }); |
@@ -1,2 +0,2 @@ | ||
// ag-grid-react v25.0.1 | ||
// ag-grid-react v25.1.0 | ||
import { ComponentType, AgPromise } from 'ag-grid-community'; | ||
@@ -7,2 +7,3 @@ import { AgGridReact } from "./agGridReact"; | ||
private key; | ||
private portalKey; | ||
private oldPortal; | ||
@@ -9,0 +10,0 @@ private reactElement; |
@@ -1,2 +0,2 @@ | ||
// ag-grid-react v25.0.1 | ||
// ag-grid-react v25.1.0 | ||
"use strict"; | ||
@@ -40,2 +40,3 @@ var __extends = (this && this.__extends) || (function () { | ||
_this.key = keyGenerator_1.default(); | ||
_this.portalKey = keyGenerator_1.default(); | ||
return _this; | ||
@@ -60,3 +61,3 @@ } | ||
this.reactElement = react_1.createElement(this.reactComponent, __assign(__assign({}, params), { key: this.key })); | ||
this.portal = react_dom_1.createPortal(this.reactElement, this.eParentElement, keyGenerator_1.default() // fixed deltaRowModeRefreshCompRenderer | ||
this.portal = react_dom_1.createPortal(this.reactElement, this.eParentElement, this.portalKey // fixed deltaRowModeRefreshCompRenderer | ||
); | ||
@@ -63,0 +64,0 @@ }; |
@@ -1,2 +0,2 @@ | ||
// ag-grid-react v25.0.1 | ||
// ag-grid-react v25.1.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.0.1 | ||
// ag-grid-react v25.1.0 | ||
"use strict"; | ||
@@ -3,0 +3,0 @@ var __extends = (this && this.__extends) || (function () { |
@@ -1,3 +0,3 @@ | ||
// ag-grid-react v25.0.1 | ||
// ag-grid-react v25.1.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.0.1 | ||
// ag-grid-react v25.1.0 | ||
"use strict"; | ||
@@ -3,0 +3,0 @@ Object.defineProperty(exports, "__esModule", { value: true }); |
{ | ||
"name": "ag-grid-react", | ||
"version": "25.0.1", | ||
"version": "25.1.0", | ||
"description": "ag-Grid React Component", | ||
@@ -40,6 +40,6 @@ "main": "main.js", | ||
"devDependencies": { | ||
"ag-grid-community": "~25.0.0", | ||
"@ag-grid-community/react": "~25.0.0", | ||
"@ag-grid-community/client-side-row-model": "~25.0.0", | ||
"@ag-grid-community/core": "~25.0.0", | ||
"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", | ||
"@babel/core": "7.12.3", | ||
@@ -140,3 +140,3 @@ "@babel/plugin-proposal-throw-expressions": "^7.12.1", | ||
"peerDependencies": { | ||
"ag-grid-community": "~25.0.0", | ||
"ag-grid-community": "~25.1.0", | ||
"react": "^16.3.0 || ^17.0.0", | ||
@@ -143,0 +143,0 @@ "react-dom": "^16.3.0 || ^17.0.0" |
Sorry, the diff of this file is not supported yet
101948
1349