ag-grid-react
Advanced tools
Comparing version 23.0.3 to 23.0.4-beta.0
@@ -1,2 +0,2 @@ | ||
// ag-grid-react v23.0.3 | ||
// ag-grid-react v23.0.2 | ||
import { Component } from "react"; | ||
@@ -3,0 +3,0 @@ import * as AgGrid from "ag-grid-community"; |
@@ -1,2 +0,2 @@ | ||
// ag-grid-react v23.0.3 | ||
// ag-grid-react v23.0.2 | ||
"use strict"; | ||
@@ -3,0 +3,0 @@ var __extends = (this && this.__extends) || (function () { |
@@ -1,2 +0,2 @@ | ||
// ag-grid-react v23.0.3 | ||
// ag-grid-react v23.0.2 | ||
import * as React from "react"; | ||
@@ -38,3 +38,3 @@ import { Component, ReactPortal } from "react"; | ||
mountReactPortal(portal: ReactPortal, reactComponent: ReactComponent, resolve: (value: any) => void): void; | ||
batchUpdate(callback?: any): any; | ||
batchUpdate(callback?: any): void; | ||
destroyPortal(portal: ReactPortal): void; | ||
@@ -41,0 +41,0 @@ private getStrategyTypeForProp; |
@@ -1,2 +0,2 @@ | ||
// ag-grid-react v23.0.3 | ||
// ag-grid-react v23.0.2 | ||
"use strict"; | ||
@@ -114,3 +114,4 @@ var __extends = (this && this.__extends) || (function () { | ||
if (this.hasPendingPortalUpdate) { | ||
return callback && callback(); | ||
return; | ||
// return callback && callback(); | ||
} | ||
@@ -117,0 +118,0 @@ setTimeout(function () { |
@@ -1,2 +0,2 @@ | ||
// ag-grid-react v23.0.3 | ||
// ag-grid-react v23.0.2 | ||
import { IComponent, WrapableInterface } from 'ag-grid-community'; | ||
@@ -3,0 +3,0 @@ export declare abstract class BaseReactComponent implements IComponent<any>, WrapableInterface { |
@@ -1,2 +0,2 @@ | ||
// ag-grid-react v23.0.3 | ||
// ag-grid-react v23.0.2 | ||
"use strict"; | ||
@@ -3,0 +3,0 @@ Object.defineProperty(exports, "__esModule", { value: true }); |
@@ -1,2 +0,2 @@ | ||
// ag-grid-react v23.0.3 | ||
// ag-grid-react v23.0.2 | ||
export declare enum ChangeDetectionStrategyType { | ||
@@ -3,0 +3,0 @@ IdentityCheck = "IdentityCheck", |
@@ -1,2 +0,2 @@ | ||
// ag-grid-react v23.0.3 | ||
// ag-grid-react v23.0.2 | ||
"use strict"; | ||
@@ -3,0 +3,0 @@ Object.defineProperty(exports, "__esModule", { value: true }); |
@@ -1,2 +0,2 @@ | ||
// ag-grid-react v23.0.3 | ||
// ag-grid-react v23.0.2 | ||
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 v23.0.3 | ||
// ag-grid-react v23.0.2 | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); |
@@ -1,2 +0,2 @@ | ||
// ag-grid-react v23.0.3 | ||
// ag-grid-react v23.0.2 | ||
export default function generateNewKey(): string; |
@@ -1,2 +0,2 @@ | ||
// ag-grid-react v23.0.3 | ||
// ag-grid-react v23.0.2 | ||
"use strict"; | ||
@@ -3,0 +3,0 @@ Object.defineProperty(exports, "__esModule", { value: true }); |
@@ -1,3 +0,3 @@ | ||
// ag-grid-react v23.0.3 | ||
// ag-grid-react v23.0.2 | ||
export { AgGridReact } from './agGridReact'; | ||
export { AgGridColumn } from './agGridColumn'; |
@@ -1,2 +0,2 @@ | ||
// ag-grid-react v23.0.3 | ||
// ag-grid-react v23.0.2 | ||
"use strict"; | ||
@@ -3,0 +3,0 @@ Object.defineProperty(exports, "__esModule", { value: true }); |
@@ -1,5 +0,5 @@ | ||
// ag-grid-react v23.0.3 | ||
// ag-grid-react v23.0.2 | ||
import { ComponentType, Promise } from 'ag-grid-community'; | ||
import { AgGridReact } from "./agGridReact"; | ||
import { BaseReactComponent } from "./baseReactComponent"; | ||
import { BaseReactComponent } from './baseReactComponent'; | ||
export declare class ReactComponent extends BaseReactComponent { | ||
@@ -16,2 +16,3 @@ static REACT_MEMO_TYPE: number | symbol; | ||
private staticMarkup; | ||
private staticRenderTime; | ||
constructor(reactComponent: any, parentComponent: AgGridReact, componentType: ComponentType); | ||
@@ -18,0 +19,0 @@ getFrameworkComponentInstance(): any; |
@@ -1,2 +0,2 @@ | ||
// ag-grid-react v23.0.3 | ||
// ag-grid-react v23.0.2 | ||
"use strict"; | ||
@@ -31,2 +31,3 @@ var __extends = (this && this.__extends) || (function () { | ||
_this.staticMarkup = null; | ||
_this.staticRenderTime = 0; | ||
_this.reactComponent = reactComponent; | ||
@@ -81,5 +82,17 @@ _this.componentType = componentType; | ||
if (_this.statelessComponent) { | ||
setTimeout(function () { | ||
_this.removeStaticMarkup(); | ||
}); | ||
// if a user supplies a time consuming renderer then it's sometimes possible both the static and | ||
// actual react component are visible at the same time | ||
// we check here if the rendering is "slow" (anything greater than 2ms) we'll use a listener to remove the | ||
// static markup, otherwise just the next tick | ||
if (_this.staticRenderTime >= 2) { | ||
console.log("XXXX slow renderer", _this.staticRenderTime); | ||
_this.eParentElement.addEventListener('DOMNodeInserted', function () { | ||
_this.removeStaticMarkup(); | ||
}, false); | ||
} | ||
else { | ||
setTimeout(function () { | ||
_this.removeStaticMarkup(); | ||
}); | ||
} | ||
} | ||
@@ -98,3 +111,3 @@ }); | ||
var parentContainerClasses = this.componentInstance.getReactContainerClasses(); | ||
parentContainerClasses.forEach(function (className) { return ag_grid_community_1.Utils.addCssClass(_this.eParentElement, className); }); | ||
parentContainerClasses.forEach(function (className) { return ag_grid_community_1._.addCssClass(_this.eParentElement, className); }); | ||
} | ||
@@ -104,3 +117,3 @@ }; | ||
var eParentElement = document.createElement(this.parentComponent.props.componentWrappingElement || 'div'); | ||
ag_grid_community_1.Utils.addCssClass(eParentElement, 'ag-react-container'); | ||
ag_grid_community_1._.addCssClass(eParentElement, 'ag-react-container'); | ||
// DEPRECATED - use componentInstance.getReactContainerStyle or componentInstance.getReactContainerClasses instead | ||
@@ -135,5 +148,15 @@ // so user can have access to the react container, to add css class or style | ||
} | ||
var originalConsoleError = console.error; | ||
var reactComponent = React.createElement(this.reactComponent, params); | ||
try { | ||
// if a user is using anything that uses useLayoutEffect (like material ui) then | ||
// Warning: useLayoutEffect does nothing on the s erver will be throw and we can't do anything to stop it | ||
// this is just a warning and has no effect on anything so just suppress it for this single operation | ||
var originalConsoleError_1 = console.error; | ||
console.error = function () { | ||
}; | ||
var start = Date.now(); | ||
var staticMarkup = server_1.renderToStaticMarkup(reactComponent); | ||
this.staticRenderTime = Date.now() - start; | ||
console.error = originalConsoleError_1; | ||
// if the render method returns null the result will be an empty string | ||
@@ -156,2 +179,5 @@ if (staticMarkup === "") { | ||
} | ||
finally { | ||
console.error = originalConsoleError; | ||
} | ||
}; | ||
@@ -158,0 +184,0 @@ ReactComponent.prototype.removeStaticMarkup = function () { |
@@ -1,2 +0,3 @@ | ||
// ag-grid-react v23.0.3 | ||
// ag-grid-react v23.0.2 | ||
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 v23.0.3 | ||
// ag-grid-react v23.0.2 | ||
"use strict"; | ||
@@ -11,1 +11,14 @@ Object.defineProperty(exports, "__esModule", { value: true }); | ||
}; | ||
/* | ||
* http://stackoverflow.com/a/13719799/2393347 | ||
*/ | ||
exports.assign = function (obj, prop, value) { | ||
if (typeof prop === "string") | ||
prop = prop.split("."); | ||
if (prop.length > 1) { | ||
var e = prop.shift(); | ||
exports.assign(obj[e] = Object.prototype.toString.call(obj[e]) === "[object Object]" ? obj[e] : {}, prop, value); | ||
} | ||
else | ||
obj[prop[0]] = value; | ||
}; |
{ | ||
"name": "ag-grid-react", | ||
"version": "23.0.3", | ||
"version": "23.0.4-beta.0", | ||
"description": "ag-Grid React Component", | ||
@@ -8,3 +8,3 @@ "main": "main.js", | ||
"scripts": { | ||
"build": "gulp", | ||
"build": "gulp && npm run hash", | ||
"umd": "rollup -c", | ||
@@ -15,3 +15,4 @@ "test:e2e": "gulp link-umd-e2e && npm run cypress", | ||
"cypress:open": "cypress open", | ||
"cypress": "cypress run --spec 'cypress/integration/**/*spec.js'" | ||
"cypress": "cypress run --spec 'cypress/integration/**/*spec.js'", | ||
"hash": "sh ../../scripts/hashDirectory.sh > .hash" | ||
}, | ||
@@ -18,0 +19,0 @@ "repository": { |
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
79698
27
1050
2