Socket
Socket
Sign inDemoInstall

@toast-ui/react-editor

Package Overview
Dependencies
11
Maintainers
2
Versions
36
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.1.2 to 2.2.0

6

dist/toastui-react-editor.js

@@ -0,1 +1,7 @@

/*!
* TOAST UI Editor : React Wrapper
* @version 2.2.0 | Tue Jun 16 2020
* @author NHN. FE Development Lab <dl_javascript@nhn.com>
* @license MIT
*/
module.exports=function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=3)}([function(t,e){t.exports=require("react")},function(t,e){t.exports=require("@toast-ui/editor")},function(t,e){t.exports=require("@toast-ui/editor/dist/toastui-editor-viewer")},function(t,e,r){"use strict";r.r(e),r.d(e,"Editor",(function(){return d})),r.d(e,"Viewer",(function(){return x}));var n=r(0),o=r.n(n),i=r(1),u=r.n(i);function c(t){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function f(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function p(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=h(t);if(e){var o=h(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return y(this,r)}}function y(t,e){return!e||"object"!==c(e)&&"function"!=typeof e?b(t):e}function b(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function h(t){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function v(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var d=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(c,t);var e,r,n,i=p(c);function c(){var t;a(this,c);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return v(b(t=i.call.apply(i,[this].concat(r))),"rootEl",o.a.createRef()),v(b(t),"editorInst",null),t}return e=c,(r=[{key:"getRootElement",value:function(){return this.rootEl.current}},{key:"getInstance",value:function(){return this.editorInst}},{key:"bindEventHandlers",value:function(t){var e=this;Object.keys(this.props).filter((function(t){return/^on[A-Z][a-zA-Z]+/.test(t)})).forEach((function(r){var n=r[2].toLowerCase()+r.slice(3);e.editorInst.off(n),e.editorInst.on(n,t[r])}))}},{key:"componentDidMount",value:function(){this.editorInst=new u.a(function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?f(Object(r),!0).forEach((function(e){v(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({el:this.rootEl.current},this.props)),this.bindEventHandlers(this.props)}},{key:"shouldComponentUpdate",value:function(t){var e=this.getInstance(),r=t.height,n=t.previewStyle;return this.props.height!==r&&e.height(r),this.props.previewStyle!==n&&e.changePreviewStyle(n),this.bindEventHandlers(t,this.props),!1}},{key:"render",value:function(){return o.a.createElement("div",{ref:this.rootEl})}}])&&l(e.prototype,r),n&&l(e,n),c}(o.a.Component),O=r(2),j=r.n(O);function m(t){return(m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function w(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function g(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function P(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function E(t,e){return(E=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function S(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=R(t);if(e){var o=R(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return _(this,r)}}function _(t,e){return!e||"object"!==m(e)&&"function"!=typeof e?k(t):e}function k(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function R(t){return(R=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function D(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var x=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&E(t,e)}(u,t);var e,r,n,i=S(u);function u(){var t;g(this,u);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return D(k(t=i.call.apply(i,[this].concat(r))),"rootEl",o.a.createRef()),D(k(t),"viewerInst",null),t}return e=u,(r=[{key:"getRootElement",value:function(){return this.rootEl.current}},{key:"getInstance",value:function(){return this.viewerInst}},{key:"bindEventHandlers",value:function(t){var e=this;Object.keys(this.props).filter((function(t){return/^on[A-Z][a-zA-Z]+/.test(t)})).forEach((function(r){var n=r[2].toLowerCase()+r.slice(3);e.viewerInst.off(n),e.viewerInst.on(n,t[r])}))}},{key:"componentDidMount",value:function(){this.viewerInst=new j.a(function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?w(Object(r),!0).forEach((function(e){D(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):w(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({el:this.rootEl.current},this.props)),this.bindEventHandlers(this.props)}},{key:"shouldComponentUpdate",value:function(t){return this.bindEventHandlers(t,this.props),!1}},{key:"render",value:function(){return o.a.createElement("div",{ref:this.rootEl})}}])&&P(e.prototype,r),n&&P(e,n),u}(o.a.Component)}]);

4

package.json
{
"name": "@toast-ui/react-editor",
"version": "2.1.2",
"version": "2.2.0",
"description": "TOAST UI Editor for React",

@@ -62,4 +62,4 @@ "main": "dist/toastui-react-editor.js",

"dependencies": {
"@toast-ui/editor": "^2.1.2"
"@toast-ui/editor": "^2.2.0"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc