@hig/rich-text
Advanced tools
Comparing version 1.2.0 to 1.2.1
@@ -1,2 +0,2 @@ | ||
import React, { Component } from 'react'; | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
@@ -84,55 +84,31 @@ import { css, cx } from 'emotion'; | ||
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"); } } | ||
var RichText = function RichText(props) { | ||
return React.createElement( | ||
ThemeContext.Consumer, | ||
null, | ||
function (_ref) { | ||
var resolvedRoles = _ref.resolvedRoles; | ||
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; } | ||
var children = props.children, | ||
dangerouslySetInnerHTML = props.dangerouslySetInnerHTML, | ||
otherProps = _objectWithoutProperties(props, ["children", "dangerouslySetInnerHTML"]); | ||
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; } | ||
var className = otherProps.className; | ||
var RichText = function (_Component) { | ||
_inherits(RichText, _Component); | ||
function RichText() { | ||
_classCallCheck(this, RichText); | ||
return _possibleConstructorReturn(this, (RichText.__proto__ || Object.getPrototypeOf(RichText)).apply(this, arguments)); | ||
} | ||
_createClass(RichText, [{ | ||
key: "render", | ||
value: function render() { | ||
var _this2 = this; | ||
return React.createElement( | ||
ThemeContext.Consumer, | ||
null, | ||
function (_ref) { | ||
var resolvedRoles = _ref.resolvedRoles; | ||
var _props = _this2.props, | ||
children = _props.children, | ||
dangerouslySetInnerHTML = _props.dangerouslySetInnerHTML, | ||
otherProps = _objectWithoutProperties(_props, ["children", "dangerouslySetInnerHTML"]); | ||
var className = otherProps.className; | ||
var styles = stylesheet(_this2.props, resolvedRoles); | ||
return children ? React.createElement( | ||
"div", | ||
{ className: cx(css(styles.richText), className) }, | ||
children | ||
) : React.createElement("div", { | ||
className: cx(css(styles.richText), className), | ||
dangerouslySetInnerHTML: dangerouslySetInnerHTML // eslint-disable-line react/no-danger | ||
}); | ||
} | ||
); | ||
var styles = stylesheet(props, resolvedRoles); | ||
return children ? React.createElement( | ||
"div", | ||
{ className: cx(css(styles.richText), className) }, | ||
children | ||
) : React.createElement("div", { | ||
className: cx(css(styles.richText), className), | ||
dangerouslySetInnerHTML: dangerouslySetInnerHTML // eslint-disable-line react/no-danger | ||
}); | ||
} | ||
}]); | ||
); | ||
}; | ||
return RichText; | ||
}(Component); | ||
RichText.displayName = "RichText"; | ||
@@ -139,0 +115,0 @@ RichText.propTypes = { |
@@ -7,4 +7,3 @@ 'use strict'; | ||
var React = require('react'); | ||
var React__default = _interopDefault(React); | ||
var React = _interopDefault(require('react')); | ||
var PropTypes = _interopDefault(require('prop-types')); | ||
@@ -92,55 +91,31 @@ var emotion = require('emotion'); | ||
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"); } } | ||
var RichText = function RichText(props) { | ||
return React.createElement( | ||
ThemeContext.Consumer, | ||
null, | ||
function (_ref) { | ||
var resolvedRoles = _ref.resolvedRoles; | ||
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; } | ||
var children = props.children, | ||
dangerouslySetInnerHTML = props.dangerouslySetInnerHTML, | ||
otherProps = _objectWithoutProperties(props, ["children", "dangerouslySetInnerHTML"]); | ||
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; } | ||
var className = otherProps.className; | ||
var RichText = function (_Component) { | ||
_inherits(RichText, _Component); | ||
function RichText() { | ||
_classCallCheck(this, RichText); | ||
return _possibleConstructorReturn(this, (RichText.__proto__ || Object.getPrototypeOf(RichText)).apply(this, arguments)); | ||
} | ||
_createClass(RichText, [{ | ||
key: "render", | ||
value: function render() { | ||
var _this2 = this; | ||
return React__default.createElement( | ||
ThemeContext.Consumer, | ||
null, | ||
function (_ref) { | ||
var resolvedRoles = _ref.resolvedRoles; | ||
var _props = _this2.props, | ||
children = _props.children, | ||
dangerouslySetInnerHTML = _props.dangerouslySetInnerHTML, | ||
otherProps = _objectWithoutProperties(_props, ["children", "dangerouslySetInnerHTML"]); | ||
var className = otherProps.className; | ||
var styles = stylesheet(_this2.props, resolvedRoles); | ||
return children ? React__default.createElement( | ||
"div", | ||
{ className: emotion.cx(emotion.css(styles.richText), className) }, | ||
children | ||
) : React__default.createElement("div", { | ||
className: emotion.cx(emotion.css(styles.richText), className), | ||
dangerouslySetInnerHTML: dangerouslySetInnerHTML // eslint-disable-line react/no-danger | ||
}); | ||
} | ||
); | ||
var styles = stylesheet(props, resolvedRoles); | ||
return children ? React.createElement( | ||
"div", | ||
{ className: emotion.cx(emotion.css(styles.richText), className) }, | ||
children | ||
) : React.createElement("div", { | ||
className: emotion.cx(emotion.css(styles.richText), className), | ||
dangerouslySetInnerHTML: dangerouslySetInnerHTML // eslint-disable-line react/no-danger | ||
}); | ||
} | ||
}]); | ||
); | ||
}; | ||
return RichText; | ||
}(React.Component); | ||
RichText.displayName = "RichText"; | ||
@@ -147,0 +122,0 @@ RichText.propTypes = { |
@@ -0,1 +1,8 @@ | ||
# [@hig/rich-text-v1.2.1](https://github.com/Autodesk/hig/compare/@hig/rich-text@1.2.0...@hig/rich-text@1.2.1) (2022-01-12) | ||
### Bug Fixes | ||
* react v. in peerDependencies instead of dependencies ([4701332](https://github.com/Autodesk/hig/commit/4701332)) | ||
# [@hig/rich-text-v1.2.0](https://github.com/Autodesk/hig/compare/@hig/rich-text@1.1.1...@hig/rich-text@1.2.0) (2021-02-24) | ||
@@ -2,0 +9,0 @@ |
{ | ||
"name": "@hig/rich-text", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "HIG RichText", | ||
@@ -28,11 +28,11 @@ "author": "Autodesk Inc.", | ||
"@hig/jest-preset": "^0.1.0", | ||
"@hig/progress-bar": "^1.1.1", | ||
"@hig/progress-bar": "^1.1.2", | ||
"@hig/scripts": "^0.1.2", | ||
"@hig/semantic-release-config": "^0.1.0", | ||
"@hig/text-link": "^1.1.1" | ||
"@hig/text-link": "^1.2.1" | ||
}, | ||
"peerDependencies": { | ||
"@hig/theme-context": "^3.0.1", | ||
"@hig/theme-data": "^2.19.3", | ||
"react": "^15.4.1 || ^16.3.2" | ||
"@hig/theme-context": "^3.0.2", | ||
"@hig/theme-data": "^2.22.0", | ||
"react": "^17.0.0" | ||
}, | ||
@@ -39,0 +39,0 @@ "scripts": { |
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
16225
285