@edsdk/n1ed-react
Advanced tools
Comparing version 1.0.11 to 1.0.12
import * as React from "react"; | ||
import { IAllProps } from "@tinymce/tinymce-react"; | ||
interface N1EDState { | ||
loaded: boolean; | ||
} | ||
export declare class N1ED extends React.Component<IAllProps> { | ||
state: N1EDState; | ||
setState(state: Partial<N1EDState>, callback?: () => void): void; | ||
static loaded: boolean; | ||
componentWillMount(): void; | ||
@@ -15,2 +11,1 @@ render(): JSX.Element; | ||
} | ||
export {}; |
@@ -32,13 +32,8 @@ "use strict"; | ||
function N1ED() { | ||
var _this = _super !== null && _super.apply(this, arguments) || this; | ||
_this.state = { | ||
loaded: false | ||
}; | ||
return _this; | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
N1ED.prototype.setState = function (state, callback) { | ||
_super.prototype.setState.call(this, state, callback); | ||
}; | ||
N1ED.prototype.componentWillMount = function () { | ||
var _this = this; | ||
if (N1ED.loaded) | ||
return; | ||
var apiKey = "REACDFLT"; | ||
@@ -57,5 +52,4 @@ var passedApiKey = this.props.apiKey; | ||
_this.waitForTinyMCELoaded(function () { | ||
_this.setState({ | ||
loaded: true | ||
}); | ||
N1ED.loaded = true; | ||
_this.forceUpdate(); | ||
}); | ||
@@ -65,3 +59,3 @@ }); | ||
N1ED.prototype.render = function () { | ||
if (this.state.loaded) { | ||
if (N1ED.loaded) { | ||
var config = JSON.parse(JSON.stringify(window.n1edConfig)); | ||
@@ -143,4 +137,6 @@ config["integration"] = "react"; | ||
}; | ||
// Do not store in state, because this is global flag was script loaded on the page or not | ||
N1ED.loaded = false; | ||
return N1ED; | ||
}(React.Component)); | ||
exports.N1ED = N1ED; |
import * as React from "react"; | ||
import { IAllProps } from "@tinymce/tinymce-react"; | ||
interface N1EDState { | ||
loaded: boolean; | ||
} | ||
export declare class N1ED extends React.Component<IAllProps> { | ||
state: N1EDState; | ||
setState(state: Partial<N1EDState>, callback?: () => void): void; | ||
static loaded: boolean; | ||
componentWillMount(): void; | ||
@@ -15,2 +11,1 @@ render(): JSX.Element; | ||
} | ||
export {}; |
@@ -30,13 +30,8 @@ var __extends = (this && this.__extends) || (function () { | ||
function N1ED() { | ||
var _this = _super !== null && _super.apply(this, arguments) || this; | ||
_this.state = { | ||
loaded: false | ||
}; | ||
return _this; | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
N1ED.prototype.setState = function (state, callback) { | ||
_super.prototype.setState.call(this, state, callback); | ||
}; | ||
N1ED.prototype.componentWillMount = function () { | ||
var _this = this; | ||
if (N1ED.loaded) | ||
return; | ||
var apiKey = "REACDFLT"; | ||
@@ -55,5 +50,4 @@ var passedApiKey = this.props.apiKey; | ||
_this.waitForTinyMCELoaded(function () { | ||
_this.setState({ | ||
loaded: true | ||
}); | ||
N1ED.loaded = true; | ||
_this.forceUpdate(); | ||
}); | ||
@@ -63,3 +57,3 @@ }); | ||
N1ED.prototype.render = function () { | ||
if (this.state.loaded) { | ||
if (N1ED.loaded) { | ||
var config = JSON.parse(JSON.stringify(window.n1edConfig)); | ||
@@ -141,4 +135,6 @@ config["integration"] = "react"; | ||
}; | ||
// Do not store in state, because this is global flag was script loaded on the page or not | ||
N1ED.loaded = false; | ||
return N1ED; | ||
}(React.Component)); | ||
export { N1ED }; |
{ | ||
"name": "@edsdk/n1ed-react", | ||
"version": "1.0.11", | ||
"version": "1.0.12", | ||
"description": "React integration for N1ED editor", | ||
@@ -5,0 +5,0 @@ "repository": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
22820
304