@ag-grid-community/react
Version:
AG Grid React Component
2 lines (1 loc) • 43.8 kB
JavaScript
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("prop-types"),require("react-dom/server"),require("@ag-grid-community/core"),require("react-dom"),require("react")):"function"==typeof define&&define.amd?define(["exports","prop-types","react-dom/server","@ag-grid-community/core","react-dom","react"],t):t(e.AgGridReact={},e.PropTypes,e.ReactDOMServer,e.agGrid,e.ReactDOM,e.React)}(this,function(t,e,o,Ne,r,Ge){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e;var Fe="default"in Ge?Ge.default:Ge,a=function(e,t){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function n(e,t){function n(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var xe=function(){return(xe=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function z(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),o=0,t=0;t<n;t++)for(var a=arguments[t],i=0,s=a.length;i<s;i++,o++)r[o]=a[i];return r}var i,s=(n(u,i=Ge.Component),u.prototype.render=function(){return null},u.mapChildColumnDefs=function(e){return Fe.Children.map(e,function(e){return e?u.toColDef(e.props):null})},u.toColDef=function(e){var t=e.children,e=function(e,t){var n={};for(o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);return n}(e,["children"]);return u.hasChildColumns(t)&&(e.children=u.mapChildColumnDefs(t)),e},u.hasChildColumns=function(e){return 0<Fe.Children.count(e)},u);function u(e){var t=i.call(this,e)||this;return t.props=e,t}function c(e,t){e.forEach(function(e){s[e]=t})}c(Ne.ColDefUtil.BOOLEAN_PROPERTIES,e.bool),c(Ne.ColDefUtil.STRING_PROPERTIES,e.string),c(Ne.ColDefUtil.OBJECT_PROPERTIES,e.object),c(Ne.ColDefUtil.ARRAY_PROPERTIES,e.array),c(Ne.ColDefUtil.NUMBER_PROPERTIES,e.number),c(Ne.ColDefUtil.FUNCTION_PROPERTIES,e.func),(g=t.ChangeDetectionStrategyType||(t.ChangeDetectionStrategyType={})).IdentityCheck="IdentityCheck",g.DeepValueCheck="DeepValueCheck",g.NoCheck="NoCheck";var l=(p.prototype.areEqual=function(e,t){return this.strategy(e,t)},p);function p(e){this.strategy=e}var f=(m.prototype.areEqual=function(e,t){return m.areEquivalent(m.copy(e),m.copy(t))},m.unwrapStringOrNumber=function(e){return e instanceof Number||e instanceof String?e.valueOf():e},m.copy=function(e){if(!e)return e;if(Array.isArray(e)){for(var t=[],n=0;n<e.length;n++)t.push(this.copy(e[n]));return t}return"object"!=typeof e?e:[{},e].reduce(function(t,n){return Object.keys(n).forEach(function(e){t[e]=n[e]}),t},{})},m.isNaN=function(e){return Number.isNaN?Number.isNaN(e):"number"==typeof e&&isNaN(e)},m.areEquivalent=function(t,n){if(t=m.unwrapStringOrNumber(t),n=m.unwrapStringOrNumber(n),t===n)return!0;if(null===t||null===n||typeof t!=typeof n)return!1;if(m.isNaN(t)&&m.isNaN(n))return!0;if(t instanceof Date)return n instanceof Date&&t.valueOf()===n.valueOf();if("function"==typeof t)return!1;if("object"!=typeof t||t.$$typeof&&"Symbol(react.element)"===t.$$typeof.toString())return t==n;if(Object.isFrozen(t)||Object.isFrozen(n))return t===n;var e=void 0===t.areEquivPropertyTracking,r=void 0===n.areEquivPropertyTracking;try{var o=void 0;if(e)t.areEquivPropertyTracking=[];else if(t.areEquivPropertyTracking.some(function(e){return e===n}))return!0;if(r)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(o in t)"areEquivPropertyTracking"!=o&&(a[o]=null);for(o in n)"areEquivPropertyTracking"!=o&&(a[o]=null);for(o in a)if(!this.areEquivalent(t[o],n[o]))return!1;return!0}finally{e&&delete t.areEquivPropertyTracking,r&&delete n.areEquivPropertyTracking}},m);function m(){}var d=(h.prototype.getStrategy=function(e){return this.strategyMap[e]},h);function h(){var e;this.strategyMap=((e={})[t.ChangeDetectionStrategyType.DeepValueCheck]=new f,e[t.ChangeDetectionStrategyType.IdentityCheck]=new l(function(e,t){return e===t}),e[t.ChangeDetectionStrategyType.NoCheck]=new l(function(e,t){return!1}),e)}var C,g=(n(y,C=function(){}),y.prototype.getGui=function(){return this.eParentElement},y.prototype.destroy=function(){return this.parentComponent.destroyPortal(this.portal)},y.prototype.createParentElement=function(e){var t=document.createElement(this.parentComponent.props.componentWrappingElement||"div");return Ne._.addCssClass(t,"ag-react-container"),e.reactContainer=t},y.prototype.addParentContainerStyleAndClasses=function(){var t,n,r=this;this.componentInstance&&(this.componentInstance.getReactContainerStyle&&this.componentInstance.getReactContainerStyle()&&(t=this.eParentElement.style,n=this.componentInstance.getReactContainerStyle(),Object.keys(n).forEach(function(e){t[e]=n[e]})),this.componentInstance.getReactContainerClasses&&this.componentInstance.getReactContainerClasses()&&this.componentInstance.getReactContainerClasses().forEach(function(e){return Ne._.addCssClass(r.eParentElement,e)}))},y.prototype.statelessComponentRendered=function(){return 0<this.eParentElement.childElementCount||0<this.eParentElement.childNodes.length},y.prototype.getFrameworkComponentInstance=function(){return this.componentInstance},y.prototype.isStatelessComponent=function(){return this.statelessComponent},y.prototype.getReactComponentName=function(){return this.reactComponent.name},y.prototype.getMemoType=function(){return this.hasSymbol()?Symbol.for("react.memo"):60115},y.prototype.hasSymbol=function(){return"function"==typeof Symbol&&Symbol.for},y.prototype.isStateless=function(e){return"function"==typeof e&&!(e.prototype&&e.prototype.isReactComponent)||"object"==typeof e&&e.$$typeof===this.getMemoType()},y.prototype.hasMethod=function(e){var t=this.getFrameworkComponentInstance();return!!t&&null!==t[e]||this.fallbackMethodAvailable(e)},y.prototype.callMethod=function(e,t){var n=this,r=this.getFrameworkComponentInstance();if(this.isStatelessComponent())return this.fallbackMethod(e,t&&t[0]?t[0]:{});if(r){var o=r[e];return o?o.apply(r,t):this.fallbackMethodAvailable(e)?this.fallbackMethod(e,t&&t[0]?t[0]:{}):void 0}setTimeout(function(){return n.callMethod(e,t)})},y.prototype.addMethod=function(e,t){this[e]=t},y);function y(e,t,n){var r=C.call(this)||this;return r.portal=null,r.reactComponent=e,r.parentComponent=t,r.componentType=n,r.statelessComponent=r.isStateless(r.reactComponent),r}var v=0;function E(){return"agPortalKey_"+ ++v}var S,R=(n(w,S=g),w.prototype.init=function(t){var n=this;return this.eParentElement=this.createParentElement(t),this.renderStaticMarkup(t),new Ne.AgPromise(function(e){return n.createReactComponent(t,e)})},w.prototype.createReactComponent=function(e,t){var n=this;this.isStatelessComponent()||(e.ref=function(e){n.componentInstance=e,n.addParentContainerStyleAndClasses(),n.removeStaticMarkup()});e=Ge.createElement(this.reactComponent,e),e=r.createPortal(e,this.eParentElement,E());this.portal=e,this.parentComponent.mountReactPortal(e,this,function(e){t(e),n.isStatelessComponent()&&(n.isSlowRenderer()&&n.removeStaticMarkup(),setTimeout(function(){n.removeStaticMarkup()}))})},w.prototype.fallbackMethodAvailable=function(e){return!1},w.prototype.fallbackMethod=function(e,t){},w.prototype.isSlowRenderer=function(){return this.staticRenderTime>=w.SLOW_RENDERING_THRESHOLD},w.prototype.isNullValue=function(){return""===this.staticMarkup},w.prototype.renderStaticMarkup=function(e){if(!(this.parentComponent.isDisableStaticMarkup()||this.componentType.isCellRenderer&&!this.componentType.isCellRenderer())){var t=console.error,e=Ge.createElement(this.reactComponent,e);try{console.error=function(){};var n=Date.now(),r=o.renderToStaticMarkup(e);this.staticRenderTime=Date.now()-n,console.error=t,""===r?this.staticMarkup=r:r&&(this.staticMarkup=document.createElement("span"),this.staticMarkup.innerHTML=r,this.eParentElement.appendChild(this.staticMarkup))}catch(e){}finally{console.error=t}}},w.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))},w.prototype.rendered=function(){return this.isNullValue()||!!this.staticMarkup||this.isStatelessComponent()&&this.statelessComponentRendered()||!(this.isStatelessComponent()||!this.getFrameworkComponentInstance())},w.SLOW_RENDERING_THRESHOLD=3,w);function w(){var e=null!==S&&S.apply(this,arguments)||this;return e.staticMarkup=null,e.staticRenderTime=0,e}var O,b=(n(P,O=g),P.prototype.init=function(e){var t=this;return this.eParentElement=this.createParentElement(e),this.params=e,this.createOrUpdatePortal(e),new Ne.AgPromise(function(e){return t.createReactComponent(e)})},P.prototype.createOrUpdatePortal=function(e){var t=this;this.isStatelessComponent()||(e.ref=function(e){t.componentInstance=e,t.addParentContainerStyleAndClasses()}),this.reactElement=Ge.createElement(this.reactComponent,xe(xe({},e),{key:this.key})),this.portal=r.createPortal(this.reactElement,this.eParentElement,this.portalKey)},P.prototype.createReactComponent=function(t){this.parentComponent.mountReactPortal(this.portal,this,function(e){t(e)})},P.prototype.isNullValue=function(){return this.valueRenderedIsNull(this.params)},P.prototype.rendered=function(){return this.isStatelessComponent()&&this.statelessComponentRendered()||!(this.isStatelessComponent()||!this.getFrameworkComponentInstance())},P.prototype.valueRenderedIsNull=function(e){if(this.componentType.isCellRenderer&&!this.componentType.isCellRenderer())return!1;var t=console.error;try{return console.error=function(){},""===o.renderToStaticMarkup(Ge.createElement(this.reactComponent,e))}catch(e){}finally{console.error=t}return!1},P.prototype.refreshComponent=function(e){this.oldPortal=this.portal,this.createOrUpdatePortal(e),this.parentComponent.updateReactPortal(this.oldPortal,this.portal)},P.prototype.fallbackMethod=function(e,t){e=this[e+"Component"];if(e)return e.bind(this)(t)},P.prototype.fallbackMethodAvailable=function(e){return!!this[e+"Component"]},P);function P(e,t,n){n=O.call(this,e,t,n)||this;return n.oldPortal=null,n.key=E(),n.portalKey=E(),n}var D,T=(n(I,D=Ge.Component),I.prototype.render=function(){var t=this;return Fe.createElement("div",{style:this.createStyleForDiv(),className:this.props.className,ref:function(e){t.eGridDiv=e}},this.portals)},I.prototype.createStyleForDiv=function(){return xe({height:"100%"},this.props.containerStyle||{})},I.prototype.componentDidMount=function(){var e=this.props.modules||[],t={providedBeanInstances:{agGridReact:this,frameworkComponentWrapper:new A(this)},modules:e},n=this.props.gridOptions||{},e=this.props.children;s.hasChildColumns(e)&&(n.columnDefs=s.mapChildColumnDefs(e)),this.gridOptions=Ne.ComponentUtil.copyAttributesToGridOptions(n,this.props),new Ne.Grid(this.eGridDiv,this.gridOptions,t),this.api=this.gridOptions.api,this.columnApi=this.gridOptions.columnApi,this.props.setGridApi(this.api,this.columnApi)},I.prototype.waitForInstance=function(e,t,n){var r=this;if(void 0===n&&(n=Date.now()),this.destroyed)t(null);else if(e.rendered())t(e);else{if(Date.now()-n>=this.props.maxComponentCreationTimeMs&&!this.hasPendingPortalUpdate)return e.isNullValue()?void t(e):void console.error("AG Grid: React Component '"+e.getReactComponentName()+"' not created within "+I.MAX_COMPONENT_CREATION_TIME_IN_MS+"ms");window.setTimeout(function(){r.waitForInstance(e,t,n)})}},I.prototype.mountReactPortal=function(e,t,n){this.portals=z(this.portals,[e]),this.waitForInstance(t,n),this.batchUpdate()},I.prototype.updateReactPortal=function(e,t){this.portals[this.portals.indexOf(e)]=t,this.batchUpdate()},I.prototype.batchUpdate=function(){var e=this;this.hasPendingPortalUpdate||(setTimeout(function(){e.api&&e.forceUpdate(function(){e.hasPendingPortalUpdate=!1})}),this.hasPendingPortalUpdate=!0)},I.prototype.destroyPortal=function(t){this.portals=this.portals.filter(function(e){return e!==t}),this.batchUpdate()},I.prototype.getStrategyTypeForProp=function(e){if("rowData"===e){if(this.props.rowDataChangeDetectionStrategy)return this.props.rowDataChangeDetectionStrategy;if(this.isImmutableDataActive())return t.ChangeDetectionStrategyType.IdentityCheck}return t.ChangeDetectionStrategyType.DeepValueCheck},I.prototype.isImmutableDataActive=function(){return this.props.deltaRowDataMode||this.props.immutableData||this.props.gridOptions&&(this.props.gridOptions.deltaRowDataMode||this.props.gridOptions.immutableData)},I.prototype.shouldComponentUpdate=function(e){return this.processPropsChanges(this.props,e),!1},I.prototype.componentDidUpdate=function(e){this.processPropsChanges(e,this.props)},I.prototype.processPropsChanges=function(e,t){var n={};this.extractGridPropertyChanges(e,t,n),this.extractDeclarativeColDefChanges(t,n),this.processSynchronousChanges(n),this.processAsynchronousChanges(n)},I.prototype.extractDeclarativeColDefChanges=function(e,t){var n,r,o,a;this.props.gridOptions&&this.props.gridOptions.columnDefs||this.props.columnDefs||(n=!!e.debug,r="columnDefs",o=this.gridOptions.columnDefs,s.hasChildColumns(e.children)?(a=this.changeDetectionService.getStrategy(this.getStrategyTypeForProp(r)),e=s.mapChildColumnDefs(e.children),a.areEqual(o,e)||(n&&console.log("agGridReact: colDefs definitions changed"),t[r]={previousValue:o,currentValue:e})):o&&0<o.length&&(t[r]={previousValue:o,currentValue:[]}))},I.prototype.extractGridPropertyChanges=function(t,n,r){var o=this,a=!!n.debug;Object.keys(n).forEach(function(e){Ne._.includes(Ne.ComponentUtil.ALL_PROPERTIES,e)&&(o.changeDetectionService.getStrategy(o.getStrategyTypeForProp(e)).areEqual(t[e],n[e])||(a&&console.log("agGridReact: ["+e+"] property changed"),r[e]={previousValue:t[e],currentValue:n[e]}))}),Ne.ComponentUtil.getEventCallbacks().forEach(function(e){o.props[e]!==n[e]&&(a&&console.log("agGridReact: ["+e+"] event callback changed"),r[e]={previousValue:t[e],currentValue:n[e]})})},I.prototype.componentWillUnmount=function(){this.api&&(this.api.destroy(),this.api=null),this.destroyed=!0},I.prototype.isDisableStaticMarkup=function(){return!0===this.props.disableStaticMarkup},I.prototype.isLegacyComponentRendering=function(){return!0===this.props.legacyComponentRendering},I.prototype.processSynchronousChanges=function(e){var t,n=xe({},e);return 0<Object.keys(n).length&&(t={},this.SYNCHRONOUS_CHANGE_PROPERTIES.forEach(function(e){n[e]&&(t[e]=n[e],delete n[e])}),0<Object.keys(t).length&&this.api&&Ne.ComponentUtil.processOnChange(t,this.gridOptions,this.api,this.columnApi)),n},I.prototype.processAsynchronousChanges=function(e){var t=this;0<Object.keys(e).length&&window.setTimeout(function(){t.api&&Ne.ComponentUtil.processOnChange(e,t.gridOptions,t.api,t.columnApi)})},I.defaultProps={legacyComponentRendering:!1,disableStaticMarkup:!1,maxComponentCreationTimeMs:I.MAX_COMPONENT_CREATION_TIME_IN_MS=1e3},I);function I(e){var t=D.call(this,e)||this;return t.props=e,t.changeDetectionService=new d,t.api=null,t.portals=[],t.hasPendingPortalUpdate=!1,t.destroyed=!1,t.SYNCHRONOUS_CHANGE_PROPERTIES=["context"],t}function k(e,t){e.forEach(function(e){T[e]=t})}T.propTypes={gridOptions:e.object},k(Ne.ComponentUtil.getEventCallbacks(),e.func),k(Ne.ComponentUtil.BOOLEAN_PROPERTIES,e.bool),k(Ne.ComponentUtil.STRING_PROPERTIES,e.string),k(Ne.ComponentUtil.OBJECT_PROPERTIES,e.object),k(Ne.ComponentUtil.ARRAY_PROPERTIES,e.array),k(Ne.ComponentUtil.NUMBER_PROPERTIES,e.number),k(Ne.ComponentUtil.FUNCTION_PROPERTIES,e.func);var M,A=(n(N,M=Ne.BaseComponentWrapper),N.prototype.createWrapper=function(e,t){return new(this.agGridReact.isLegacyComponentRendering()?R:b)(e,this.agGridReact,t)},N);function N(e){var t=M.call(this)||this;return t.agGridReact=e,t}function Y(e,t,n,r,o){if(!(!e||e.componentFromFramework)){var a=Ue(t,r);if(a){r=a.getGui();return n.appendChild(r),o&&(o.current=a),function(){var e=a.getGui();e&&e.parentElement&&e.parentElement.removeChild(e),t.destroyBean(a),o&&(o.current=void 0)}}}}function B(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter(function(e){return null!=e&&""!==e}).join(" ")}var _e=Fe.createContext({}),Ue=function(e,t){e=t(e.getBean("userComponentFactory"));if(e)return e.resolveNow(null,function(e){return e})},Be=(G.prototype.setClass=function(e,t){if(!!this.classesMap[e]==t)return this;var n=new G;return n.classesMap=xe({},this.classesMap),n.classesMap[e]=t,n},G.prototype.toString=function(){var t=this;return Object.keys(this.classesMap).filter(function(e){return t.classesMap[e]}).join(" ")},G);function G(){this.classesMap={}}function je(e){return"function"==typeof e&&!(e.prototype&&e.prototype.isReactComponent)||"object"==typeof e&&e.$$typeof===("function"==typeof Symbol&&Symbol.for?Symbol.for("react.memo"):60115)}function F(n){var r=Ge.useContext(_e).context,o=Ge.useRef(null),e=Ge.useRef(null),a=Ge.useRef(null),i=Ge.useRef(null),s=Ge.useRef(null),t=Ge.useState(),u=t[0],c=t[1],l=Ge.useState(),p=l[0],f=l[1],m=Ge.useState(),d=m[0],h=m[1],C=Ge.useState(new Be),g=C[0],y=C[1],v=Ge.useState(new Be),E=v[0],S=v[1],R=Ge.useState(new Be),w=R[0],O=R[1],b=Ge.useState(new Be),P=b[0],D=b[1];return Ge.useEffect(function(){return Y(u,r,e.current,function(e){return e.createCellRenderer(u)})},[u]),Ge.useEffect(function(){var e={setInnerRenderer:function(e,t){c(e),h(t)},setChildCount:function(e){return f(e)},addOrRemoveCssClass:function(t,n){return y(function(e){return e.setClass(t,n)})},setContractedDisplayed:function(t){return O(function(e){return e.setClass("ag-hidden",!t)})},setExpandedDisplayed:function(t){return S(function(e){return e.setClass("ag-hidden",!t)})},setCheckboxVisible:function(t){D(function(e){return e.setClass("ag-invisible",!t)})}},t=r.createBean(new Ne.GroupCellRendererCtrl);return t.init(e,o.current,a.current,i.current,s.current,F,n),function(){r.destroyBean(t)}},[]),t=Ge.useMemo(function(){return"ag-cell-wrapper "+g.toString()},[g]),l=Ge.useMemo(function(){return"ag-group-expanded "+E.toString()},[E]),m=Ge.useMemo(function(){return"ag-group-contracted "+w.toString()},[w]),C=Ge.useMemo(function(){return"ag-group-checkbox "+P.toString()},[P]),v=u&&u.componentFromFramework,R=v?u.componentClass:void 0,b=null==u&&null!=d,Fe.createElement("span",{className:t,ref:o},Fe.createElement("span",{className:l,ref:i}),Fe.createElement("span",{className:m,ref:s}),Fe.createElement("span",{className:C,ref:a}),Fe.createElement("span",{className:"ag-group-value",ref:e},b&&Fe.createElement(Fe.Fragment,null,d),v&&Fe.createElement(R,xe({},u.params))),Fe.createElement("span",{className:"ag-group-child-count"},p))}var x,_=Ge.memo(F),U=Ge.forwardRef(function(n,e){var t=Ge.useContext(_e),r=t.ctrlsFactory,o=t.context,a=t.gridOptionsWrapper,i=t.resizeObserverService,s=t.clientSideRowModel,u=t.serverSideRowModel,c=Ge.useState(new Be),l=c[0],p=c[1],f=Ge.useState(new Be),m=f[0],d=f[1],h=Ge.useState(),t=h[0],C=h[1],c=Ge.useState(),f=c[0],g=c[1],y=Ge.useRef(),v=Ge.useRef(null),h=Ge.useMemo(function(){return l.toString()+" ag-details-row"},[l]),c=Ge.useMemo(function(){return m.toString()+" ag-details-grid"},[m]);e&&Ge.useImperativeHandle(e,function(){return{refresh:function(){return y.current.refresh()}}}),Ge.useEffect(function(){n.template&&console.warn("AG Grid: detailCellRendererParams.template is not supported by React UI - this only works with frameworks that work against String templates. To change the template, please provide your own React Detail Cell Renderer.")},[]),Ge.useEffect(function(){var e={addOrRemoveCssClass:function(t,n){return p(function(e){return e.setClass(t,n)})},addOrRemoveDetailGridCssClass:function(t,n){return d(function(e){return e.setClass(t,n)})},setDetailGrid:function(e){return C(e)},setRowData:function(e){return g(e)}},t=r.getInstance("detailCellRenderer");if(t)return o.createBean(t),t.init(e,n),y.current=t,a.isDetailRowAutoHeight()&&(i.observeResize(v.current,e=function(){var e=v.current.clientHeight;null!=e&&0<e&&setTimeout(function(){n.node.setRowHeight(e),s?s.onRowHeightChanged():u&&u.onRowHeightChanged()},0)}),e()),function(){o.destroyBean(t)}},[]);e=Ge.useCallback(function(e,t){y.current.registerDetailWithMaster(e,t)},[]);return Fe.createElement("div",{className:h,ref:v},t&&Fe.createElement(X,xe({className:c},t,{rowData:f,setGridApi:e})))}),j=(n(V,x=Ne.VanillaFrameworkOverrides),V.prototype.frameworkComponent=function(e){return this.frameworkComponents[e]},V);function V(){var e=null!==x&&x.apply(this,arguments)||this;return e.frameworkComponents={agGroupCellRenderer:_,agGroupRowRenderer:_,agDetailCellRenderer:U},e}function L(r,o){Ge.useEffect(function(){var e=o.current,t=e.parentElement;if(t){var n=document.createComment(r);return t.insertBefore(n,e),function(){t.removeChild(n)}}},[])}var e=Ge.forwardRef(function(e,t){var n=e.children,r=e.eFocusableElement,o=e.onTabKeyDown,a=e.gridCtrl,i=Ge.useContext(_e).context,s=Ge.useRef(null),u=Ge.useRef(null),c=Ge.useRef(),e=Ge.useState(),l=e[0],p=e[1];Ge.useImperativeHandle(t,function(){return{forceFocusOutOfContainer:function(){c.current.forceFocusOutOfContainer()}}}),Ge.useEffect(function(){var e=s.current,t=u.current,n=c.current=i.createBean(new Ne.TabGuardCtrl({comp:{setTabIndex:function(e){return p(null==e?void 0:parseInt(e,10))}},eTopGuard:e,eBottomGuard:t,eFocusableElement:r,onTabKeyDown:o,focusInnerElement:function(e){return a.focusInnerElement(e)}}));return function(){i.destroyBean(n)}},[]);t=function(e){return Fe.createElement("div",{className:"ag-tab-guard ag-tab-guard-"+e,role:"presentation",tabIndex:l,ref:"top"===e?s:u})};return Fe.createElement(Fe.Fragment,null,t("top"),n,t("bottom"))}),H=Ge.memo(e),Ve=Ge.memo(function(u){var e=Ge.useState(),t=e[0],c=e[1],e=Ge.useContext(_e),l=e.context,p=e.popupService,f=e.gridOptionsWrapper;return Ge.useEffect(function(){var e=u.editDetails,t=u.cellCtrl,n=u.eParentCell,r=e.compDetails,o=f.isStopEditingWhenCellsLoseFocus(),a=new Ne.PopupEditorWrapper(r.params),r=a.getGui();!u.jsChildComp||(i=u.jsChildComp.getGui())&&r.appendChild(i);var i={column:t.getColumn(),rowNode:t.getRowNode(),type:"popupCellEditor",eventSource:n,ePopup:r,keepWithinBounds:!0},i=("under"===e.popupPosition?p.positionPopupUnderComponent:p.positionPopupOverComponent).bind(p,i),i=p.addPopup({modal:o,eChild:r,closeOnEsc:!0,closedCallback:function(){t.onPopupEditorClosed()},anchorToElement:n,positionCallback:i}),s=i?i.hideFunc:void 0;return c(a),u.jsChildComp&&u.jsChildComp.afterGuiAttached&&u.jsChildComp.afterGuiAttached(),function(){null!=s&&s(),l.destroyBean(a)}},[]),Fe.createElement(Fe.Fragment,null,t&&u.wrappedContent&&r.createPortal(u.wrappedContent,t.getGui()))});(te=te=te||{})[te.ShowValue=0]="ShowValue",te[te.EditValue=1]="EditValue";var q,$=Ge.memo(function(e){var n,r,o,a,i,s,u,c,l=Ge.useContext(_e).context,p=e.cellCtrl,t=e.printLayout,f=e.editingRow,m=Ge.useState(),d=m[0],h=m[1],C=Ge.useState(),g=C[0],y=C[1],v=Ge.useState(new Be),E=v[0],S=v[1],R=Ge.useState(),w=R[0],O=R[1],b=Ge.useState("on"),P=b[0],D=b[1],T=Ge.useState(),I=T[0],k=T[1],M=Ge.useState(),A=M[0],N=M[1],G=Ge.useState(),F=G[0],x=G[1],_=Ge.useState(),U=_[0],B=_[1],j=Ge.useState(),V=j[0],L=j[1],H=Ge.useState(),q=H[0],W=H[1],K=Ge.useState(),z=K[0],Y=K[1],$=Ge.useState(),e=$[0],Z=$[1],m=Ge.useState(),C=m[0],J=m[1],v=Ge.useState(),X=v[0],Q=v[1],R=Ge.useState(),b=R[0],ee=R[1],T=Ge.useState(),M=T[0],te=T[1],G=Ge.useState(),_=G[0],ne=G[1],j=Ge.useState(!1),re=j[0],oe=j[1],H=Ge.useState(!1),ae=H[0],ie=H[1],K=Ge.useState(!1),se=K[0],ue=K[1],$=Ge.useState(!1),m=$[0],ce=$[1],v=Ge.useState(),R=v[0],le=v[1],pe=Ge.useRef(null),fe=Ge.useRef(null),me=Ge.useRef(),de=Ge.useRef(),T=Ge.useState(),he=T[0],Ce=T[1],G=Ge.useState(),ge=G[0],ye=G[1],ve=null!=d&&(re||se||ae||m),Ee=Ge.useCallback(function(e,t){var n,r,o,a,i;(de.current=t)&&(n=e,r=t,e=(o=p).getColumn(),!n&&r.isPopup&&r.isPopup()&&(a="AG Grid: Found an issue in column "+e.getColId()+". If using ReactUI, specify an editor is a popup using colDef.cellEditorPopup=true",Ne._.doOnce(function(){return console.warn(a)},"jsEditorComp-isPopup-"+o.getColumn().getColId())),n&&r.getPopupPosition&&null!=r.getPopupPosition()&&(i="AG Grid: AG Grid: Found an issue in column "+e.getColId()+". If using ReactUI, specify an editor popup position using colDef.cellEditorPopupPosition=[value]",Ne._.doOnce(function(){return console.warn(i)},"jsEditorComp-getPopupPosition-"+o.getColumn().getColId())),t.isCancelBeforeStart&&t.isCancelBeforeStart()&&setTimeout(function(){return p.stopEditing()},0))},[]),j=Ge.useCallback(function(e){return Ee(!0,e)},[]),H=Ge.useCallback(function(e){return Ee(!1,e)},[]);n=d,r=ve,o=ge,a=me,i=pe,K=Ge.useContext(_e),s=K.context,u=K.userComponentFactory,c=Ge.useCallback(function(){var e,t=a.current;t&&((e=t.getGui())&&e.parentElement&&e.parentElement.removeChild(e),s.destroyBean(t),a.current=void 0)},[]),Ge.useEffect(function(){var e=n&&n.compDetails&&!n.compDetails.componentFromFramework;if(null!=n&&e&&!(r&&null==o)){e=n.compDetails;if(a.current){var t=a.current,t=null!=t.refresh&&0==n.force&&t.refresh(e.params);if(!0===t||void 0===t)return;c()}t=u.createCellRenderer(e);!t||(e=t.resolveNow(null,function(e){return e}))&&(t=e.getGui(),(r?o:i.current).appendChild(t),a.current=e)}else c()},[n,r,o]),Ge.useEffect(function(){return c},[]),Ge.useEffect(function(){return p.setupAutoHeight(ge)},[ge]),Ge.useEffect(function(){if(g&&!g.compDetails.componentFromFramework){var t=g.compDetails,e=!0===g.popup,n=Ue(l,function(e){return e.createCellEditor(t)});if(n){var r=n.getGui();return Ee(e,n),e||(pe.current.appendChild(r),n.afterGuiAttached&&n.afterGuiAttached()),le(n),function(){l.destroyBean(n),Ee(e,void 0),le(void 0),r&&r.parentElement&&r.parentElement.removeChild(r)}}}},[g]),Ge.useEffect(function(){if(p&&l&&(J(he?"cell-"+p.getInstanceId():void 0),he)){var t=[],e=function(e){return e&&(he.insertAdjacentElement("afterbegin",e.getGui()),t.push(e)),e};return re&&e(p.createSelectionCheckbox()),se&&e(p.createDndSource()),ae&&e(p.createRowDragComp()),function(){l.destroyBeans(t)}}},[se,ae,re,he]);$=Ge.useCallback(function(e){return Ce(e)},[]),v=Ge.useCallback(function(e){return ye(e)},[]);Ge.useEffect(function(){p&&p.setComp({addOrRemoveCssClass:function(t,n){return S(function(e){return e.setClass(t,n)})},setUserStyles:function(e){return O(e)},setAriaSelected:function(e){return W(e)},setAriaExpanded:function(e){return Y(e)},getFocusableElement:function(){return pe.current},setLeft:function(e){return k(e)},setWidth:function(e){return N(e)},setAriaColIndex:function(e){return Z(e)},setHeight:function(e){return x(e)},setZIndex:function(e){return Q(e)},setTabIndex:function(e){return L(e)},setRole:function(e){return ee(e)},setColId:function(e){return te(e)},setTitle:function(e){return ne(e)},setUnselectable:function(e){return D(e||void 0)},setTransition:function(e){return B(e)},setIncludeSelection:function(e){return oe(e)},setIncludeRowDrag:function(e){return ie(e)},setIncludeDndSource:function(e){return ue(e)},setForceWrapper:function(e){return ce(e)},getCellEditor:function(){return de.current||null},getCellRenderer:function(){return fe.current||me.current},getParentOfValue:function(){return ge||pe.current},setRenderDetails:function(e,t,n){h({value:t,compDetails:e,force:n})},setEditDetails:function(e,t,n){e?(y({compDetails:e,popup:t,popupPosition:n}),t||h(void 0)):y(void 0)}},null,pe.current,t,f)},[]);var Se,Re,we,Oe,be,Pe,De,Te,Ie,ke,Me,Ae,T=Ge.useMemo(function(){return!!(d&&d.compDetails&&d.compDetails.componentFromFramework&&je(d.compDetails.componentClass))},[d]),G=Ge.useMemo(function(){var e=E.toString();return ve||(e+=" ag-cell-value"),e},[E,ve]),m=Ge.useMemo(function(){var e={left:I,width:A,height:F,transition:U,zIndex:X};return Ne._.assign(e,w),e},[I,A,F,U,X,w]),K=Ge.useMemo(function(){return p.getInstanceId()},[]);return Fe.createElement("div",{ref:pe,className:G,style:m,tabIndex:V,"aria-selected":q,"aria-colindex":e,role:b,"aria-expanded":z,"col-id":M,title:_,unselectable:P,"aria-describedby":C},null!=d&&(Re=K,we=fe,Oe=P,be=T,Pe=$,De=v,Te=(Se=d).compDetails,Ie=Se.value,ke=!Te,Me=Te&&Te.componentFromFramework,Ae=Te&&Te.componentClass,Se=function(){return Fe.createElement(Fe.Fragment,null,ke&&Fe.createElement(Fe.Fragment,null,Ie),Me&&!be&&Fe.createElement(Ae,xe({},Te.params,{ref:we})),Me&&be&&Fe.createElement(Ae,xe({},Te.params)))},Fe.createElement(Fe.Fragment,null,ve?Fe.createElement("div",{className:"ag-cell-wrapper",role:"presentation",ref:Pe},Fe.createElement("span",{role:"presentation",id:"cell-"+Re,className:"ag-cell-value",unselectable:Oe,ref:De},Se())):Se())),null!=g&&($=g,v=H,Pe=j,Re=pe.current,Oe=p,De=R,Se=$.compDetails,H=Se.componentClass,j=Se.componentFromFramework&&!$.popup,R=Se.componentFromFramework&&$.popup,Se=!Se.componentFromFramework&&$.popup,Fe.createElement(Fe.Fragment,null,j&&Fe.createElement(H,xe({},$.compDetails.params,{ref:v})),R&&Fe.createElement(Ve,{editDetails:$,cellCtrl:Oe,eParentCell:Re,wrappedContent:Fe.createElement(H,xe({},$.compDetails.params,{ref:Pe}))}),Se&&De&&Fe.createElement(Ve,{editDetails:$,cellCtrl:Oe,eParentCell:Re,jsChildComp:De}))))}),W=Ge.memo(function(e){var t=Ge.useContext(_e).context,n=e.rowCtrl,r=e.pinned,o=Ge.useState(),a=o[0],i=o[1],s=Ge.useState(n.getInitialRowTop()),u=s[0],c=s[1],l=Ge.useState(n.getInitialTransform()),p=l[0],f=l[1],m=Ge.useState(new Be),d=m[0],h=m[1],C=Ge.useState(),g=C[0],y=C[1],v=Ge.useState(),E=v[0],S=v[1],R=Ge.useState(),w=R[0],O=R[1],b=Ge.useState(),e=b[0],P=b[1],o=Ge.useState(),s=o[0],D=o[1],l=Ge.useState(),m=l[0],T=l[1],C=Ge.useState(),v=C[0],I=C[1],R=Ge.useState(),b=R[0],k=R[1],o=Ge.useState(),l=o[0],M=o[1],C=Ge.useState(),A=C[0],N=C[1],R=Ge.useState({list:[],instanceIdMap:new Map}),G=R[0],F=R[1],o=Ge.useState(),x=o[0],_=o[1],C=Ge.useState(!1),U=C[0],B=C[1],R=Ge.useState(),j=R[0],V=R[1],L=Ge.useRef(null),H=Ge.useRef();Ge.useEffect(function(){n.setComp({setDisplay:function(e){return V(e)},setDomOrder:function(e){return B(e)},setHeight:function(e){return i(e)},setTop:function(e){return c(e)},setTransform:function(e){return f(e)},addOrRemoveCssClass:function(t,n){return h(function(e){return e.setClass(t,n)})},setRowIndex:function(e){return y(e)},setAriaRowIndex:function(e){return T(e)},setAriaExpanded:function(e){return I(e)},setAriaLabel:function(e){return k(e)},setRowId:function(e){return S(e)},setRowBusinessKey:function(e){return P(e)},setTabIndex:function(e){return D(e)},setUserStyles:function(e){return N(e)},setAriaSelected:function(e){return M(e)},setRole:function(e){return O(e)},setCellCtrls:function(t){return F(function(e){return function(n,e,t){if(t){var r={list:e,instanceIdMap:new Map};return e.forEach(function(e){return r.instanceIdMap.set(e.getInstanceId(),e)}),r}var o=[],a=[],i=new Map,s=new Map;return e.forEach(function(e){return s.set(e.getInstanceId(),e)}),n.list.forEach(function(e){var t=e.getInstanceId();s.has(t)&&(o.push(e),i.set(t,e))}),e.forEach(function(e){var t=e.getInstanceId();n.instanceIdMap.has(t)||(a.push(e),i.set(t,e))}),{list:z(o,a),instanceIdMap:i}}(e,t,U)})},showFullWidth:function(e){return _(e)},getFullWidthCellRenderer:function(){return H.current}},L.current,r)},[]),Ge.useEffect(function(){return Y(x,t,L.current,function(e){return e.createFullWidthCellRenderer(x,n.getFullWidthCellRendererType())},H)},[x]);var q,W=Ge.useMemo(function(){var e={height:a,top:u,transform:p,display:j};return Ne._.assign(W,A),e},[a,u,p,A,j]),o=Ge.useMemo(function(){return d.toString()},[d]),C=x&&x.componentFromFramework,R=null!=G,K=Ge.useMemo(function(){return!!(x&&x.componentFromFramework&&je(x.componentClass))},[x]);return Fe.createElement("div",{ref:L,role:w,className:o,style:W,"row-index":g,"aria-rowindex":m,"aria-expanded":v,"aria-label":b,"aria-selected":l,"row-id":E,"row-business-key":e,tabIndex:s},R&&G.list.map(function(e){return Fe.createElement($,{cellCtrl:e,editingRow:n.isEditing(),printLayout:n.isPrintLayout(),key:e.getInstanceId()})}),C&&(q=x.componentClass,Fe.createElement(Fe.Fragment,null,K&&Fe.createElement(q,xe({},x.params)),!K&&Fe.createElement(q,xe({},x.params,{ref:H})))))}),K=Ge.memo(function(e){var r=Ge.useContext(_e).context,t=Ge.useState(""),n=t[0],o=t[1],a=Ge.useState([]),i=a[0],s=a[1],u=Ge.useState(!1),c=u[0],l=u[1],p=Ge.useState(""),f=p[0],m=p[1],d=e.name,h=Ge.useMemo(function(){return Ne.RowContainerCtrl.getPinned(d)},[d]),C=Ge.useRef(null),g=Ge.useRef(null),y=Ge.useRef(null),v=Ge.useMemo(function(){return Ne.RowContainerCtrl.getRowContainerCssClasses(d)},[d]),E=Ge.useMemo(function(){return B(v.wrapper)},[]),S=Ge.useMemo(function(){return B(v.viewport)},[]),R=Ge.useMemo(function(){return B(v.container)},[]),t=d===Ne.RowContainerName.CENTER,a=d===Ne.RowContainerName.TOP_CENTER||d===Ne.RowContainerName.BOTTOM_CENTER,u=!t&&!a;L(" AG Row Container "+d+" ",t?C:a?g:y),Ge.useEffect(function(){var e=[],t={setViewportHeight:o,setRowCtrls:function(n){s(function(e){if(c)return n;var t=e.filter(function(e){return 0<=n.indexOf(e)}),e=n.filter(function(e){return t.indexOf(e)<0});return z(t,e)})},setDomOrder:function(e){return l(e)},setContainerWidth:function(e){return m(e)}},n=r.createBean(new Ne.RowContainerCtrl(d));return e.push(n),n.setComp(t,y.current,g.current,C.current),function(){r.destroyBeans(e)}},[]);var p=Ge.useMemo(function(){return{height:n}},[n]),w=Ge.useMemo(function(){return{width:f}},[f]),e=function(){return Fe.createElement("div",{className:R,ref:y,role:"rowgroup",style:w,unselectable:"on"},i.map(function(e){return Fe.createElement(W,{rowCtrl:e,pinned:h,key:e.getInstanceId()})}))};return Fe.createElement(Fe.Fragment,null,t&&Fe.createElement("div",{className:E,ref:C,role:"presentation",unselectable:"on"},Fe.createElement("div",{className:S,ref:g,role:"presentation",style:p},e())),a&&Fe.createElement("div",{className:S,ref:g,role:"presentation",style:p},e()),u&&e())}),Z=Ge.memo(function(){var e=Ge.useContext(_e),o=e.context,a=e.agStackComponentsRegistry,i=e.resizeObserverService,t=Ge.useState(""),n=t[0],s=t[1],r=Ge.useState(0),u=r[0],c=r[1],l=Ge.useState(0),p=l[0],f=l[1],m=Ge.useState(0),d=m[0],h=m[1],C=Ge.useState(0),g=C[0],y=C[1],v=Ge.useState(""),E=v[0],S=v[1],e=Ge.useState(""),R=e[0],w=e[1],t=Ge.useState(null),O=t[0],b=t[1],r=Ge.useState(""),P=r[0],D=r[1],l=Ge.useState(null),T=l[0],I=l[1],m=Ge.useState(""),k=m[0],M=m[1],C=Ge.useState(null),A=C[0],N=C[1],G=Ge.useRef(null),F=Ge.useRef(null),x=Ge.useRef(null),_=Ge.useRef(null);L(" AG Grid Body ",G),L(" AG Pinned Top ",F),L(" AG Middle ",x),L(" AG Pinned Bottom ",_),Ge.useEffect(function(){var t=[],n=[];if(o){var e=function(e){e=a.getComponentClass(e),e=o.createBean(new e);return t.push(e),e},r=function(e,t){return e.insertBefore(t,e.firstChild)};r(G.current,e("AG-HEADER-ROOT").getGui()),r(G.current,document.createComment(" AG Header ")),G.current.appendChild(document.createComment(" AG Fake Horizontal Scroll ")),G.current.appendChild(e("AG-FAKE-HORIZONTAL-SCROLL").getGui()),G.current.appendChild(document.createComment(" AG Overlay Wrapper ")),G.current.appendChild(e("AG-OVERLAY-WRAPPER").getGui());r={setRowAnimationCssOnBodyViewport:s,setColumnCount:c,setRowCount:f,setTopHeight:h,setBottomHeight:y,setTopDisplay:S,setBottomDisplay:w,setColumnMovingCss:b,updateLayoutClasses:D,setAlwaysVerticalScrollClass:I,setPinnedTopBottomOverflowY:M,setCellSelectableCss:N,registerBodyViewportResizeListener:function(e){var t=i.observeResize(x.current,e);n.push(function(){return t()})}},e=o.createBean(new Ne.GridBodyCtrl);return t.push(e),e.setComp(r,G.current,x.current,F.current,_.current),function(){o.destroyBeans(t),n.forEach(function(e){return e()})}}},[]);function U(e){return Fe.createElement(K,{name:e,key:e+"-container"})}v=Ge.useMemo(function(){return B("ag-root","ag-unselectable",O,P)},[O,P]),e=Ge.useMemo(function(){return B("ag-body-viewport",n,P,T,A)},[n,P,T,A]),t=Ge.useMemo(function(){return B("ag-floating-top",A)},[A]),r=Ge.useMemo(function(){return B("ag-floating-bottom",A)},[A]),l=Ge.useMemo(function(){return{height:d,minHeight:d,display:E,overflowY:k}},[d,E,k]),m=Ge.useMemo(function(){return{height:g,minHeight:g,display:R,overflowY:k}},[g,R,k]),C=function(e){var t=e.section,n=e.children,r=e.className,o=e.style,e=e.unselectable;return Fe.createElement("div",{ref:t,className:r,role:"presentation",style:o,unselectable:e},n.map(U))};return Fe.createElement("div",{ref:G,className:v,role:"grid",unselectable:"on","aria-colcount":u,"aria-rowcount":p},C({section:F,className:t,style:l,unselectable:"on",children:[Ne.RowContainerName.TOP_LEFT,Ne.RowContainerName.TOP_CENTER,Ne.RowContainerName.TOP_RIGHT,Ne.RowContainerName.TOP_FULL_WITH]}),C({section:x,className:e,children:[Ne.RowContainerName.LEFT,Ne.RowContainerName.CENTER,Ne.RowContainerName.RIGHT,Ne.RowContainerName.FULL_WIDTH]}),C({section:_,className:r,style:m,unselectable:"on",children:[Ne.RowContainerName.BOTTOM_LEFT,Ne.RowContainerName.BOTTOM_CENTER,Ne.RowContainerName.BOTTOM_RIGHT,Ne.RowContainerName.BOTTOM_FULL_WITH]}))}),J=Ge.memo(function(e){var p=e.context,t=Ge.useState(""),n=t[0],r=t[1],o=Ge.useState(""),a=o[0],i=o[1],s=Ge.useState(""),u=s[0],c=s[1],l=Ge.useState(null),f=l[0],m=l[1],d=Ge.useState(null),h=d[0],C=d[1],g=Ge.useState(!1),e=g[0],y=g[1],t=Ge.useState(),v=t[0],E=t[1],S=Ge.useRef(null),R=Ge.useRef(null),w=Ge.useRef(),O=Ge.useRef(null),b=Ge.useRef(function(){}),o=Ge.useCallback(function(){},[]),P=Ge.useMemo(function(){return p.getBean("beans")},[]);L(" AG Grid ",R),Ge.useEffect(function(){var e=S.current=p.createBean(new Ne.GridCtrl);return function(){p.destroyBean(e),S.current=null}},[]),Ge.useEffect(function(){var e=S.current;b.current=e.focusInnerElement.bind(e),e.setComp({destroyGridUi:function(){},setRtlClass:r,addOrRemoveKeyboardFocusClass:function(e){return i(e?Ne.FocusService.AG_KEYBOARD_FOCUS:"")},forceFocusOutOfContainer:function(){w.current.forceFocusOutOfContainer()},updateLayoutClasses:c,getFocusableContainers:function(){var e=[],t=R.current.querySelector(".ag-root"),n=R.current.querySelector(".ag-side-bar");return t&&e.push(t),n&&e.push(n),e},setCursor:m,setUserSelect:C},R.current,R.current),y(!0)},[]),Ge.useEffect(function(){if(v){var e,t=S.current,n=[],r=P.agStackComponentsRegistry,o=r.getComponentClass("AG-GRID-HEADER-DROP-ZONES"),a=r.getComponentClass("AG-SIDE-BAR"),i=r.getComponentClass("AG-STATUS-BAR"),s=r.getComponentClass("AG-WATERMARK"),u=r.getComponentClass("AG-PAGINATION"),c=[],l=R.current,r=O.current;return t.showDropZones()&&o&&(e=(o=p.createBean(new o)).getGui(),l.insertAdjacentElement("afterbegin",e),c.push(e),n.push(o)),t.showSideBar()&&a&&(e=(a=p.createBean(new a)).getGui(),(r=r.querySelector(".ag-tab-guard-bottom"))&&(r.insertAdjacentElement("beforebegin",e),c.push(e)),n.push(a)),t.showStatusBar()&&i&&(e=(i=p.createBean(new i)).getGui(),l.insertAdjacentElement("beforeend",e),c.push(e),n.push(i)),u&&(e=(u=p.createBean(new u)).getGui(),l.insertAdjacentElement("beforeend",e),c.push(e),n.push(u)),t.showWatermark()&&s&&(e=(s=p.createBean(new s)).getGui(),l.insertAdjacentElement("beforeend",e),c.push(e),n.push(s)),function(){p.destroyBeans(n),c.forEach(function(e){e.parentElement&&e.parentElement.removeChild(e)})}}},[v]);s=Ge.useMemo(function(){return B("ag-root-wrapper",n,a,u)},[n,a,u]),l=Ge.useMemo(function(){return B("ag-root-wrapper-body","ag-focus-managed",u)},[u]),d=Ge.useMemo(function(){return{userSelect:null!=h?h:"",WebkitUserSelect:null!=h?h:"",cursor:null!=f?f:""}},[h,f]),g=O.current,t=Ge.useCallback(function(e){w.current=e,E(!0)},[]);return Fe.createElement("div",{ref:R,className:s,style:d},Fe.createElement("div",{className:l,ref:O},e&&g&&Fe.createElement(_e.Provider,{value:P},Fe.createElement(H,{ref:t,eFocusableElement:g,onTabKeyDown:o,gridCtrl:S.current},Fe.createElement(Z,null)))))}),X=(n(Q,q=Ge.Component),Q.prototype.render=function(){return Fe.createElement("div",{style:this.createStyleForDiv(),className:this.props.className,ref:this.eGui},this.state.context&&Fe.createElement(J,{context:this.state.context}))},Q.prototype.createStyleForDiv=function(){return xe({height:"100%"},this.props.containerStyle||{})},Q.prototype.componentDidMount=function(){var t=this,e={modules:this.props.modules||[],frameworkOverrides:new j};this.gridOptions=xe({},this.props.gridOptions);var n=this.props.children;s.hasChildColumns(n)&&(this.gridOptions.columnDefs=s.mapChildColumnDefs(n)),this.gridOptions=Ne.ComponentUtil.copyAttributesToGridOptions(this.gridOptions,this.props),(new Ne.GridCoreCreator).create(this.eGui.current,this.gridOptions,function(e){t.setState({context:e})},e),this.destroyFuncs.push(function(){return t.gridOptions.api.destroy()}),this.api=this.gridOptions.api,this.columnApi=this.gridOptions.columnApi,this.props.setGridApi(this.api,this.columnApi)},Q.prototype.componentWillUnmount=function(){this.destroyFuncs.forEach(function(e){return e()})},Q.prototype.componentDidUpdate=function(e){this.processPropsChanges(e,this.props)},Q.prototype.processPropsChanges=function(e,t){var n={};this.extractGridPropertyChanges(e,t,n),this.extractDeclarativeColDefChanges(t,n),this.processChanges(n)},Q.prototype.extractDeclarativeColDefChanges=function(e,t){var n,r,o,a;this.props.gridOptions&&this.props.gridOptions.columnDefs||this.props.columnDefs||(n=!!e.debug,r="columnDefs",o=this.gridOptions.columnDefs,s.hasChildColumns(e.children)?(a=this.changeDetectionService.getStrategy(this.getStrategyTypeForProp(r)),e=s.mapChildColumnDefs(e.children),a.areEqual(o,e)||(n&&console.log("agGridReact: colDefs definitions changed"),t[r]={previousValue:o,currentValue:e})):o&&0<o.length&&(t[r]={previousValue:o,currentValue:[]}))},Q.prototype.extractGridPropertyChanges=function(t,n,r){var o=this,a=!!n.debug;Object.keys(n).forEach(function(e){Ne._.includes(Ne.ComponentUtil.ALL_PROPERTIES,e)&&(o.changeDetectionService.getStrategy(o.getStrategyTypeForProp(e)).areEqual(t[e],n[e])||(a&&console.log("agGridReact: ["+e+"] property changed"),r[e]={previousValue:t[e],currentValue:n[e]}))}),Ne.ComponentUtil.getEventCallbacks().forEach(function(e){o.props[e]!==n[e]&&(a&&console.log("agGridReact: ["+e+"] event callback changed"),r[e]={previousValue:t[e],currentValue:n[e]})})},Q.prototype.processChanges=function(e){this.api&&Ne.ComponentUtil.processOnChange(e,this.gridOptions,this.api,this.columnApi)},Q.prototype.getStrategyTypeForProp=function(e){if("rowData"===e){if(this.props.rowDataChangeDetectionStrategy)return this.props.rowDataChangeDetectionStrategy;if(this.isImmutableDataActive())return t.ChangeDetectionStrategyType.IdentityCheck}return t.ChangeDetectionStrategyType.DeepValueCheck},Q.prototype.isImmutableDataActive=function(){return this.props.deltaRowDataMode||this.props.immutableData||this.props.gridOptions&&(this.props.gridOptions.deltaRowDataMode||this.props.gridOptions.immutableData)},Q);function Q(e){var t=q.call(this,e)||this;return t.props=e,t.destroyFuncs=[],t.changeDetectionService=new d,t.eGui=Fe.createRef(),t.state={context:void 0},t}var ee,te=(n(ne,ee=Ge.Component),ne.prototype.render=function(){return this.props.reactUi?Fe.createElement(X,xe({},this.props,{setGridApi:this.setGridApi})):Fe.createElement(T,xe({},this.props,{setGridApi:this.setGridApi}))},ne);function ne(){var n=null!==ee&&ee.apply(this,arguments)||this;return n.setGridApi=function(e,t){n.api=e,n.columnApi=t},n}t.AgGridReact=te,t.AgGridReactLegacy=T,t.AgGridReactFire=X,t.AgGridColumn=s,Object.defineProperty(t,"__esModule",{value:!0})});