text: !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react"),require("prop-types"),require("ag-grid"),require("react-dom"),require("react-dom-factories")):"function"==typeof define&&define.amd?define(["exports","react","prop-types","ag-grid","react-dom","react-dom-factories"],e):e(t.AgGridReact={},t.React,t.PropTypes,t.agGrid,t.ReactDOM,t.ReactDOMFactories)}(this,function(t,e,n,r,o,i){"use strict";function a(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function r(){this.constructor=t}t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}function u(t,e,n,r){var o,i=arguments.length,a=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(a=(i<3?o(a):i>3?o(e,n,a):o(e,n))||a);return i>3&&a&&Object.defineProperty(e,n,a),a}function c(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}var p=function(t){function n(e,n){t.call(this,e,n),this.props=e,this.state=n}return a(n,t),n.prototype.render=function(){return null},n.mapChildColumnDefs=function(t){return e.Children.map(t.children,function(t){return n.toColDef(t.props)})},n.toColDef=function(t){var e=n.createColDefFromGridColumn(t);return n.hasChildColumns(t)&&(e.children=n.getChildColDefs(t.children)),e},n.hasChildColumns=function(t){return e.Children.count(t.children)>0},n.getChildColDefs=function(t){return e.Children.map(t,function(t){return n.createColDefFromGridColumn(t.props)})},n.createColDefFromGridColumn=function(t){var e={};return n.assign(e,t),delete e.children,e},n.assign=function(t,e){return[e].reduce(function(t,e){return Object.keys(e).forEach(function(n){t[n]=e[n]}),t},t)},n}(e.Component);function l(t,e){t.forEach(function(t){p[t]=e})}l(r.ColDefUtil.BOOLEAN_PROPERTIES,n.bool),l(r.ColDefUtil.STRING_PROPERTIES,n.string),l(r.ColDefUtil.OBJECT_PROPERTIES,n.object),l(r.ColDefUtil.ARRAY_PROPERTIES,n.array),l(r.ColDefUtil.NUMBER_PROPERTIES,n.number),l(r.ColDefUtil.FUNCTION_PROPERTIES,n.func);var s=function(){function t(t,e){this.reactComponent=t,this.parentComponent=e}return t.prototype.getFrameworkComponentInstance=function(){return this.componentRef},t.prototype.init=function(t){var n=this;return new r.Promise(function(i){n.eParentElement=document.createElement("div"),r.Utils.addCssClass(n.eParentElement,"ag-react-container"),t.reactContainer=n.eParentElement;var a=n,u=e.createElement(n.reactComponent,t);n.parentComponent?o.unstable_renderSubtreeIntoContainer(n.parentComponent,u,n.eParentElement,function(){a.componentRef=this,i(null)}):o.render(u,n.eParentElement,function(){a.componentRef=this,i(null)})})},t.prototype.getGui=function(){return this.eParentElement},t.prototype.destroy=function(){o.unmountComponentAtNode(this.eParentElement)},t}(),f=function(t){function e(e,n){t.call(this,e,n),this.props=e,this.state=n}return a(e,t),e.prototype.render=function(){var t=this;return i.div({style:this.createStyleForDiv(),ref:function(e){t.eGridDiv=e}})},e.prototype.createStyleForDiv=function(){var t={height:"100%"},e=this.props.containerStyle;return e&&Object.keys(e).forEach(function(n){t[n]=e[n]}),t},e.prototype.componentDidMount=function(){var t={seedBeanInstances:{agGridReact:this}},e=this.props.gridOptions||{};p.hasChildColumns(this.props)&&(e.columnDefs=p.mapChildColumnDefs(this.props)),this.gridOptions=r.ComponentUtil.copyAttributesToGridOptions(e,this.props),new r.Grid(this.eGridDiv,this.gridOptions,t),this.api=this.gridOptions.api,this.columnApi=this.gridOptions.columnApi},e.prototype.shouldComponentUpdate=function(){return!1},e.prototype.componentWillReceiveProps=function(t){var e=this,n=!!t.debug,o={};r.ComponentUtil.ALL_PROPERTIES.forEach(function(r){e.areEquivalent(e.props[r],t[r])||(n&&console.log("agGridReact: ["+r+"] property changed"),o[r]={previousValue:e.props[r],currentValue:t[r]})}),r.ComponentUtil.getEventCallbacks().forEach(function(r){e.props[r]!==t[r]&&(n&&console.log("agGridReact: ["+r+"] event callback changed"),o[r]={previousValue:e.props[r],currentValue:t[r]})}),r.ComponentUtil.processOnChange(o,this.gridOptions,this.api,this.columnApi)},e.prototype.componentWillUnmount=function(){this.api&&this.api.destroy()},e.unwrapStringOrNumber=function(t){return t instanceof Number||t instanceof String?t.valueOf():t},e.prototype.copy=function(t){return t?Array.isArray(t)?t.slice():"object"!=typeof t?t:[{},t].reduce(function(t,e){return Object.keys(e).forEach(function(n){t[n]=e[n]}),t},{}):t},e.prototype.areEquivalent=function(t,n){return e.areEquivalent(this.copy(t),this.copy(n))},e.areEquivalent=function(t,n){if(t=e.unwrapStringOrNumber(t),n=e.unwrapStringOrNumber(n),t===n)return!0;if(null===t||null===n||typeof t!=typeof n)return!1;if(t instanceof Date)return n instanceof Date&&t.valueOf()===n.valueOf();if("function"==typeof t)return t.toString()===n.toString();if("object"!=typeof t)return t==n;var r=void 0===t.areEquivPropertyTracking,o=void 0===n.areEquivPropertyTracking;try{var i=void 0;if(r)t.areEquivPropertyTracking=[];else if(t.areEquivPropertyTracking.some(function(t){return t===n}))return!0;if(o)n.areEquivPropertyTracking=[];else if(n.areEquivPropertyTracking.some(function(e){return e===t}))return!0;t.areEquivPropertyTracking.push(n),n.areEquivPropertyTracking.push(t);var a={};for(i in t)"areEquivPropertyTracking"!=i&&(a[i]=null);for(i in n)"areEquivPropertyTracking"!=i&&(a[i]=null);for(i in a)if(!this.areEquivalent(t[i],n[i]))return!1;return!0}finally{r&&delete t.areEquivPropertyTracking,o&&delete n.areEquivPropertyTracking}},e}(e.Component);function d(t,e){t.forEach(function(t){f[t]=e})}f.propTypes={gridOptions:n.object},d(r.ComponentUtil.getEventCallbacks(),n.func),d(r.ComponentUtil.BOOLEAN_PROPERTIES,n.bool),d(r.ComponentUtil.STRING_PROPERTIES,n.string),d(r.ComponentUtil.OBJECT_PROPERTIES,n.object),d(r.ComponentUtil.ARRAY_PROPERTIES,n.array),d(r.ComponentUtil.NUMBER_PROPERTIES,n.number),d(r.ComponentUtil.FUNCTION_PROPERTIES,n.func);var m=function(t){function e(){t.apply(this,arguments)}return a(e,t),e.prototype.createWrapper=function(t){var e=this,n=new(function(r){function o(){r.call(this,t,e.agGridReact)}return a(o,r),o.prototype.init=function(t){return r.prototype.init.call(this,t)},o.prototype.hasMethod=function(t){var e=n.getFrameworkComponentInstance();return null==e||null!=e[t]},o.prototype.callMethod=function(t,e){var r=this,o=this.getFrameworkComponentInstance();if(null!=o){var i=n.getFrameworkComponentInstance()[t];return null==i?null:i.apply(o,e)}setTimeout(function(){return r.callMethod(t,e)},100)},o.prototype.addMethod=function(t,e){n[t]=e},o}(s));return n},u([r.Autowired("agGridReact"),c("design:type",f)],e.prototype,"agGridReact",void 0),e=u([r.Bean("frameworkComponentWrapper"),c("design:paramtypes",[])],e)}(r.BaseComponentWrapper);r.Grid.setFrameworkBeans([m]),t.AgGridReact=f,t.AgGridColumn=p,Object.defineProperty(t,"__esModule",{value:!0})});
  