ag-grid-react
Advanced tools
Comparing version 25.0.0 to 25.0.1-beta
@@ -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),(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;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,k=(n(T,O=E),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=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,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(_,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>=_.MAX_COMPONENT_CREATION_TIME_IN_MS)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(e,t){this.portals=this.portals.filter(function(t){return t!==e}).concat(t),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,r={};this.extractGridPropertyChanges(t,e,r),this.extractDeclarativeColDefChanges(e,r),0<Object.keys(r).length&&window.setTimeout(function(){return a.ComponentUtil.processOnChange(r,n.gridOptions,n.api,n.columnApi)})},_.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},_.defaultProps={legacyComponentRendering:!1,disableStaticMarkup:!1},_.MAX_COMPONENT_CREATION_TIME_IN_MS=500,_);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}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()?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 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(){return 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})}); |
@@ -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,u=(n(l,c=i.Component),l.prototype.render=function(){return null},l.mapChildColumnDefs=function(t){return i.Children.map(t,function(t){return l.toColDef(t.props)})},l.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 l.hasChildColumns(e)&&(t.children=l.mapChildColumnDefs(e)),t},l.hasChildColumns=function(t){return 0<i.Children.count(t)},l);function l(t){var e=c.call(this,t)||this;return e.props=t,e}function h(t,e){t.forEach(function(t){u[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 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,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,T=(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 b,D=(n(M,b=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,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(_,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;u.hasChildColumns(t)&&(n.columnDefs=u.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>=_.MAX_COMPONENT_CREATION_TIME_IN_MS)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(e,t){this.portals=this.portals.filter(function(t){return t!==e}).concat(t),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,r={};this.extractGridPropertyChanges(t,e,r),this.extractDeclarativeColDefChanges(e,r),0<Object.keys(r).length&&window.setTimeout(function(){return a.ComponentUtil.processOnChange(r,n.gridOptions,n.api,n.columnApi)})},_.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,u.hasChildColumns(t.children)?(i=this.changeDetectionService.getStrategy(this.getStrategyTypeForProp(r)),t=u.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},_.defaultProps={legacyComponentRendering:!1,disableStaticMarkup:!1},_.MAX_COMPONENT_CREATION_TIME_IN_MS=500,_);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}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(q,U=a.BaseComponentWrapper),q.prototype.createWrapper=function(t,e){return new(this.agGridReact.isLegacyComponentRendering()?T: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=u,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 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(){return 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})}); |
@@ -1,2 +0,2 @@ | ||
// ag-grid-react v25.0.0 | ||
// ag-grid-react v25.0.1-beta | ||
import { Component } from "react"; | ||
@@ -3,0 +3,0 @@ import { ColDef, ColGroupDef } from "ag-grid-community"; |
@@ -1,2 +0,2 @@ | ||
// ag-grid-react v25.0.0 | ||
// ag-grid-react v25.0.1-beta | ||
"use strict"; | ||
@@ -3,0 +3,0 @@ var __extends = (this && this.__extends) || (function () { |
@@ -1,2 +0,2 @@ | ||
// ag-grid-react v25.0.0 | ||
// ag-grid-react v25.0.1-beta | ||
import * as React from "react"; | ||
@@ -13,2 +13,3 @@ import { Component, ReactPortal } from "react"; | ||
disableStaticMarkup?: boolean; | ||
maxComponentCreationTimeMs?: number; | ||
legacyComponentRendering?: boolean; | ||
@@ -19,2 +20,3 @@ containerStyle?: any; | ||
props: any; | ||
private static MAX_COMPONENT_CREATION_TIME_IN_MS; | ||
static propTypes: any; | ||
@@ -24,2 +26,3 @@ static defaultProps: { | ||
disableStaticMarkup: boolean; | ||
maxComponentCreationTimeMs: number; | ||
}; | ||
@@ -34,3 +37,2 @@ gridOptions: GridOptions; | ||
protected eGridDiv: HTMLElement; | ||
private static MAX_COMPONENT_CREATION_TIME_IN_MS; | ||
constructor(props: any); | ||
@@ -37,0 +39,0 @@ render(): React.DetailedReactHTMLElement<{ |
@@ -1,2 +0,2 @@ | ||
// ag-grid-react v25.0.0 | ||
// ag-grid-react v25.0.1-beta | ||
"use strict"; | ||
@@ -100,3 +100,3 @@ var __extends = (this && this.__extends) || (function () { | ||
else { | ||
if (Date.now() - startTime >= AgGridReact.MAX_COMPONENT_CREATION_TIME_IN_MS) { | ||
if (Date.now() - startTime >= this.props.maxComponentCreationTimeMs && !this.hasPendingPortalUpdate) { | ||
// last check - we check if this is a null value being rendered - we do this last as using SSR to check the value | ||
@@ -256,7 +256,8 @@ // can mess up contexts | ||
}; | ||
AgGridReact.MAX_COMPONENT_CREATION_TIME_IN_MS = 1000; // a second should be more than enough to instantiate a component | ||
AgGridReact.defaultProps = { | ||
legacyComponentRendering: false, | ||
disableStaticMarkup: false | ||
disableStaticMarkup: false, | ||
maxComponentCreationTimeMs: AgGridReact.MAX_COMPONENT_CREATION_TIME_IN_MS | ||
}; | ||
AgGridReact.MAX_COMPONENT_CREATION_TIME_IN_MS = 500; // half a second should be more than enough to instantiate a component | ||
return AgGridReact; | ||
@@ -263,0 +264,0 @@ }(react_1.Component)); |
@@ -1,2 +0,2 @@ | ||
// ag-grid-react v25.0.0 | ||
// ag-grid-react v25.0.1-beta | ||
export declare enum ChangeDetectionStrategyType { | ||
@@ -3,0 +3,0 @@ IdentityCheck = "IdentityCheck", |
@@ -1,2 +0,2 @@ | ||
// ag-grid-react v25.0.0 | ||
// ag-grid-react v25.0.1-beta | ||
"use strict"; | ||
@@ -3,0 +3,0 @@ Object.defineProperty(exports, "__esModule", { value: true }); |
@@ -1,2 +0,2 @@ | ||
// ag-grid-react v25.0.0 | ||
// ag-grid-react v25.0.1-beta | ||
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.0 | ||
// ag-grid-react v25.0.1-beta | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); |
@@ -1,2 +0,2 @@ | ||
// ag-grid-react v25.0.0 | ||
// ag-grid-react v25.0.1-beta | ||
export default function generateNewKey(): string; |
@@ -1,2 +0,2 @@ | ||
// ag-grid-react v25.0.0 | ||
// ag-grid-react v25.0.1-beta | ||
"use strict"; | ||
@@ -3,0 +3,0 @@ Object.defineProperty(exports, "__esModule", { value: true }); |
@@ -1,2 +0,2 @@ | ||
// ag-grid-react v25.0.0 | ||
// ag-grid-react v25.0.1-beta | ||
import { AgPromise } from 'ag-grid-community'; | ||
@@ -3,0 +3,0 @@ import { ReactComponent } from './reactComponent'; |
@@ -1,2 +0,2 @@ | ||
// ag-grid-react v25.0.0 | ||
// ag-grid-react v25.0.1-beta | ||
"use strict"; | ||
@@ -3,0 +3,0 @@ var __extends = (this && this.__extends) || (function () { |
@@ -1,4 +0,4 @@ | ||
// ag-grid-react v25.0.0 | ||
// ag-grid-react v25.0.1-beta | ||
export { AgGridReact } from './agGridReact'; | ||
export { AgGridColumn } from './agGridColumn'; | ||
export { ChangeDetectionStrategyType } from './changeDetectionService'; |
@@ -1,2 +0,2 @@ | ||
// ag-grid-react v25.0.0 | ||
// ag-grid-react v25.0.1-beta | ||
"use strict"; | ||
@@ -3,0 +3,0 @@ Object.defineProperty(exports, "__esModule", { value: true }); |
@@ -1,2 +0,2 @@ | ||
// ag-grid-react v25.0.0 | ||
// ag-grid-react v25.0.1-beta | ||
import { ComponentType, AgPromise } from 'ag-grid-community'; | ||
@@ -3,0 +3,0 @@ import { AgGridReact } from "./agGridReact"; |
@@ -1,2 +0,2 @@ | ||
// ag-grid-react v25.0.0 | ||
// ag-grid-react v25.0.1-beta | ||
"use strict"; | ||
@@ -3,0 +3,0 @@ var __extends = (this && this.__extends) || (function () { |
@@ -1,2 +0,2 @@ | ||
// ag-grid-react v25.0.0 | ||
// ag-grid-react v25.0.1-beta | ||
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.0 | ||
// ag-grid-react v25.0.1-beta | ||
"use strict"; | ||
@@ -3,0 +3,0 @@ var __extends = (this && this.__extends) || (function () { |
@@ -1,3 +0,3 @@ | ||
// ag-grid-react v25.0.0 | ||
// ag-grid-react v25.0.1-beta | ||
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.0 | ||
// ag-grid-react v25.0.1-beta | ||
"use strict"; | ||
@@ -3,0 +3,0 @@ Object.defineProperty(exports, "__esModule", { value: true }); |
{ | ||
"name": "ag-grid-react", | ||
"version": "25.0.0", | ||
"version": "25.0.1-beta", | ||
"description": "ag-Grid React Component", | ||
@@ -220,2 +220,2 @@ "main": "main.js", | ||
} | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
99476
1311
2