@tinymce/tinymce-react
Advanced tools
Comparing version 4.3.3-feature.20240321210215708.sha0c08f3b to 4.3.3-feature.20240321220526999.sha8f8ffa1
@@ -8,9 +8,4 @@ import * as React from 'react'; | ||
export type Version = `${'4' | '5' | '6' | '7'}${'' | '-dev' | '-testing' | `.${number}` | `.${number}.${number}`}`; | ||
export interface CloudHostedProps { | ||
export interface IProps { | ||
apiKey: string; | ||
} | ||
export interface HybridOrSelfHostedProps { | ||
licenseKey: string; | ||
} | ||
export interface IProps { | ||
id: string; | ||
@@ -35,4 +30,6 @@ inline: boolean; | ||
}; | ||
licenseKey: string; | ||
} | ||
export type IAllProps = (CloudHostedProps | HybridOrSelfHostedProps) & Partial<IProps & IEvents>; | ||
export interface IAllProps extends Partial<IProps>, Partial<IEvents> { | ||
} | ||
/** | ||
@@ -52,3 +49,3 @@ * @see {@link https://www.tiny.cloud/docs/tinymce/7/react-ref/} for the TinyMCE React Technical Reference | ||
private valueCursor; | ||
constructor(props: IAllProps); | ||
constructor(props: Partial<IAllProps>); | ||
private get view(); | ||
@@ -55,0 +52,0 @@ componentDidUpdate(prevProps: Partial<IAllProps>): void; |
@@ -132,3 +132,3 @@ "use strict"; | ||
} | ||
var finalInit = __assign(__assign(__assign(__assign({}, _this.props.init), { selector: undefined, target: target, readonly: _this.props.disabled, inline: _this.inline, plugins: (0, Utils_1.mergePlugins)((_a = _this.props.init) === null || _a === void 0 ? void 0 : _a.plugins, _this.props.plugins), toolbar: (_b = _this.props.toolbar) !== null && _b !== void 0 ? _b : (_c = _this.props.init) === null || _c === void 0 ? void 0 : _c.toolbar }), ('licenseKey' in _this.props && _this.props.licenseKey ? { license_key: _this.props.licenseKey } : {})), { setup: function (editor) { | ||
var finalInit = __assign(__assign(__assign(__assign({}, _this.props.init), { selector: undefined, target: target, readonly: _this.props.disabled, inline: _this.inline, plugins: (0, Utils_1.mergePlugins)((_a = _this.props.init) === null || _a === void 0 ? void 0 : _a.plugins, _this.props.plugins), toolbar: (_b = _this.props.toolbar) !== null && _b !== void 0 ? _b : (_c = _this.props.init) === null || _c === void 0 ? void 0 : _c.toolbar }), (_this.props.licenseKey ? { license_key: _this.props.licenseKey } : {})), { setup: function (editor) { | ||
_this.editor = editor; | ||
@@ -254,3 +254,3 @@ _this.bindHandlers({}); | ||
} | ||
else if ('tinymceScriptSrc' in this.props && Array.isArray(this.props.tinymceScriptSrc) && this.props.tinymceScriptSrc.length === 0) { | ||
else if (Array.isArray(this.props.tinymceScriptSrc) && this.props.tinymceScriptSrc.length === 0) { | ||
(_b = (_a = this.props).onScriptsLoadError) === null || _b === void 0 ? void 0 : _b.call(_a, new Error('No `tinymce` global is present but the `tinymceScriptSrc` prop was an empty array.')); | ||
@@ -320,3 +320,3 @@ } | ||
var defer = (_b = this.props.scriptLoading) === null || _b === void 0 ? void 0 : _b.defer; | ||
if ('tinymceScriptSrc' in this.props && this.props.tinymceScriptSrc !== undefined) { | ||
if (this.props.tinymceScriptSrc !== undefined) { | ||
if (typeof this.props.tinymceScriptSrc === 'string') { | ||
@@ -339,3 +339,3 @@ return [{ src: this.props.tinymceScriptSrc, async: async, defer: defer }]; | ||
var channel = this.props.cloudChannel; // `cloudChannel` is in `defaultProps`, so it's always defined. | ||
var apiKey = 'apiKey' in this.props && this.props.apiKey ? this.props.apiKey : 'no-api-key'; | ||
var apiKey = this.props.apiKey ? this.props.apiKey : 'no-api-key'; | ||
var cloudTinyJs = "https://cdn.tiny.cloud/1/".concat(apiKey, "/tinymce/").concat(channel, "/tinymce.min.js"); | ||
@@ -342,0 +342,0 @@ return [{ src: cloudTinyJs, async: async, defer: defer }]; |
import * as PropTypes from 'prop-types'; | ||
import { IEvents } from '../Events'; | ||
import { HybridOrSelfHostedProps, IProps, CloudHostedProps } from './Editor'; | ||
import { IProps } from './Editor'; | ||
export type CopyProps<T> = { | ||
@@ -8,5 +8,5 @@ [P in keyof T]: PropTypes.Requireable<unknown>; | ||
export type IEventPropTypes = CopyProps<IEvents>; | ||
export interface IEditorPropTypes extends IEventPropTypes, CopyProps<IProps & CloudHostedProps & HybridOrSelfHostedProps> { | ||
export interface IEditorPropTypes extends IEventPropTypes, CopyProps<IProps> { | ||
} | ||
export declare const eventPropTypes: IEventPropTypes; | ||
export declare const EditorPropTypes: IEditorPropTypes; |
@@ -8,9 +8,4 @@ import * as React from 'react'; | ||
export type Version = `${'4' | '5' | '6' | '7'}${'' | '-dev' | '-testing' | `.${number}` | `.${number}.${number}`}`; | ||
export interface CloudHostedProps { | ||
export interface IProps { | ||
apiKey: string; | ||
} | ||
export interface HybridOrSelfHostedProps { | ||
licenseKey: string; | ||
} | ||
export interface IProps { | ||
id: string; | ||
@@ -35,4 +30,6 @@ inline: boolean; | ||
}; | ||
licenseKey: string; | ||
} | ||
export type IAllProps = (CloudHostedProps | HybridOrSelfHostedProps) & Partial<IProps & IEvents>; | ||
export interface IAllProps extends Partial<IProps>, Partial<IEvents> { | ||
} | ||
/** | ||
@@ -52,3 +49,3 @@ * @see {@link https://www.tiny.cloud/docs/tinymce/7/react-ref/} for the TinyMCE React Technical Reference | ||
private valueCursor; | ||
constructor(props: IAllProps); | ||
constructor(props: Partial<IAllProps>); | ||
private get view(); | ||
@@ -55,0 +52,0 @@ componentDidUpdate(prevProps: Partial<IAllProps>): void; |
@@ -129,3 +129,3 @@ var __extends = (this && this.__extends) || (function () { | ||
} | ||
var finalInit = __assign(__assign(__assign(__assign({}, _this.props.init), { selector: undefined, target: target, readonly: _this.props.disabled, inline: _this.inline, plugins: mergePlugins((_a = _this.props.init) === null || _a === void 0 ? void 0 : _a.plugins, _this.props.plugins), toolbar: (_b = _this.props.toolbar) !== null && _b !== void 0 ? _b : (_c = _this.props.init) === null || _c === void 0 ? void 0 : _c.toolbar }), ('licenseKey' in _this.props && _this.props.licenseKey ? { license_key: _this.props.licenseKey } : {})), { setup: function (editor) { | ||
var finalInit = __assign(__assign(__assign(__assign({}, _this.props.init), { selector: undefined, target: target, readonly: _this.props.disabled, inline: _this.inline, plugins: mergePlugins((_a = _this.props.init) === null || _a === void 0 ? void 0 : _a.plugins, _this.props.plugins), toolbar: (_b = _this.props.toolbar) !== null && _b !== void 0 ? _b : (_c = _this.props.init) === null || _c === void 0 ? void 0 : _c.toolbar }), (_this.props.licenseKey ? { license_key: _this.props.licenseKey } : {})), { setup: function (editor) { | ||
_this.editor = editor; | ||
@@ -251,3 +251,3 @@ _this.bindHandlers({}); | ||
} | ||
else if ('tinymceScriptSrc' in this.props && Array.isArray(this.props.tinymceScriptSrc) && this.props.tinymceScriptSrc.length === 0) { | ||
else if (Array.isArray(this.props.tinymceScriptSrc) && this.props.tinymceScriptSrc.length === 0) { | ||
(_b = (_a = this.props).onScriptsLoadError) === null || _b === void 0 ? void 0 : _b.call(_a, new Error('No `tinymce` global is present but the `tinymceScriptSrc` prop was an empty array.')); | ||
@@ -317,3 +317,3 @@ } | ||
var defer = (_b = this.props.scriptLoading) === null || _b === void 0 ? void 0 : _b.defer; | ||
if ('tinymceScriptSrc' in this.props && this.props.tinymceScriptSrc !== undefined) { | ||
if (this.props.tinymceScriptSrc !== undefined) { | ||
if (typeof this.props.tinymceScriptSrc === 'string') { | ||
@@ -336,3 +336,3 @@ return [{ src: this.props.tinymceScriptSrc, async: async, defer: defer }]; | ||
var channel = this.props.cloudChannel; // `cloudChannel` is in `defaultProps`, so it's always defined. | ||
var apiKey = 'apiKey' in this.props && this.props.apiKey ? this.props.apiKey : 'no-api-key'; | ||
var apiKey = this.props.apiKey ? this.props.apiKey : 'no-api-key'; | ||
var cloudTinyJs = "https://cdn.tiny.cloud/1/".concat(apiKey, "/tinymce/").concat(channel, "/tinymce.min.js"); | ||
@@ -339,0 +339,0 @@ return [{ src: cloudTinyJs, async: async, defer: defer }]; |
import * as PropTypes from 'prop-types'; | ||
import { IEvents } from '../Events'; | ||
import { HybridOrSelfHostedProps, IProps, CloudHostedProps } from './Editor'; | ||
import { IProps } from './Editor'; | ||
export type CopyProps<T> = { | ||
@@ -8,5 +8,5 @@ [P in keyof T]: PropTypes.Requireable<unknown>; | ||
export type IEventPropTypes = CopyProps<IEvents>; | ||
export interface IEditorPropTypes extends IEventPropTypes, CopyProps<IProps & CloudHostedProps & HybridOrSelfHostedProps> { | ||
export interface IEditorPropTypes extends IEventPropTypes, CopyProps<IProps> { | ||
} | ||
export declare const eventPropTypes: IEventPropTypes; | ||
export declare const EditorPropTypes: IEditorPropTypes; |
@@ -73,4 +73,4 @@ { | ||
}, | ||
"version": "4.3.3-feature.20240321210215708.sha0c08f3b", | ||
"version": "4.3.3-feature.20240321220526999.sha8f8ffa1", | ||
"name": "@tinymce/tinymce-react" | ||
} |
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
99135
1828