Socket
Socket
Sign inDemoInstall

react-sane-contenteditable

Package Overview
Dependencies
7
Maintainers
4
Versions
23
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.3.3 to 1.3.4

example/.babelrc

28

lib/index.js

@@ -0,1 +1,13 @@

var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
import React, { Component } from "react";

@@ -36,8 +48,8 @@ import PropTypes from "prop-types";

var ContentEditable = function (_Component) {
babelHelpers.inherits(ContentEditable, _Component);
_inherits(ContentEditable, _Component);
function ContentEditable(props) {
babelHelpers.classCallCheck(this, ContentEditable);
_classCallCheck(this, ContentEditable);
var _this = babelHelpers.possibleConstructorReturn(this, (ContentEditable.__proto__ || Object.getPrototypeOf(ContentEditable)).call(this, props));
var _this = _possibleConstructorReturn(this, (ContentEditable.__proto__ || Object.getPrototypeOf(ContentEditable)).call(this, props));

@@ -112,3 +124,3 @@ _this._onChange = function (ev) {

babelHelpers.createClass(ContentEditable, [{
_createClass(ContentEditable, [{
key: "componentWillReceiveProps",

@@ -164,6 +176,5 @@ value: function componentWillReceiveProps(nextProps) {

styled = _props2.styled,
props = babelHelpers.objectWithoutProperties(_props2, ["tagName", "content", "editable", "styled"]);
props = _objectWithoutProperties(_props2, ["tagName", "content", "editable", "styled"]);
return React.createElement(Element, babelHelpers.extends({}, omit(props, Object.keys(propTypes)), styled ? {
return React.createElement(Element, _extends({}, omit(props, Object.keys(propTypes)), styled ? {
innerRef: function innerRef(c) {

@@ -179,3 +190,3 @@ _this2._element = c;

}, {
style: babelHelpers.extends({ whiteSpace: "pre-wrap" }, props.style),
style: _extends({ whiteSpace: "pre-wrap" }, props.style),
contentEditable: editable,

@@ -191,2 +202,3 @@ key: Date(),

}]);
return ContentEditable;

@@ -193,0 +205,0 @@ }(Component);

{
"name": "react-sane-contenteditable",
"version": "1.3.3",
"description": "React component with sane defaults to make any element contentEditable",
"version": "1.3.4",
"description":
"React component with sane defaults to make any element contentEditable",
"main": "lib/index.js",

@@ -11,6 +12,3 @@ "repository": {

"author": "Ashley Williams <hi@ashleyw.co.uk>",
"contributors": [
"Raphael Silva Cavalcanti",
"Jess Telford"
],
"contributors": ["Raphael Silva Cavalcanti", "Jess Telford"],
"license": "MIT",

@@ -47,3 +45,4 @@ "dependencies": {

"scripts": {
"build": "babel src/react-sane-contenteditable.js --out-file lib/index.js",
"build":
"./node_modules/.bin/babel src/react-sane-contenteditable.js --out-file lib/index.js",
"prepublish": "yarn build",

@@ -50,0 +49,0 @@ "demo": "./node_modules/rollup/bin/rollup --config example/rollup.config.js"

Sorry, the diff of this file is not supported yet

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