Comparing version 4.7.1 to 4.8.0
@@ -8,14 +8,4 @@ "use strict"; | ||
}); | ||
exports["default"] = void 0; | ||
exports.default = void 0; | ||
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2")); | ||
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); | ||
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); | ||
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits")); | ||
var _createSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/createSuper")); | ||
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); | ||
@@ -25,50 +15,45 @@ | ||
var MjBody = /*#__PURE__*/function (_BodyComponent) { | ||
(0, _inherits2["default"])(MjBody, _BodyComponent); | ||
class MjBody extends _mjmlCore.BodyComponent { | ||
getChildContext() { | ||
return { ...this.context, | ||
containerWidth: this.getAttribute('width') | ||
}; | ||
} | ||
var _super = (0, _createSuper2["default"])(MjBody); | ||
getStyles() { | ||
return { | ||
div: { | ||
'background-color': this.getAttribute('background-color') | ||
} | ||
}; | ||
} | ||
function MjBody() { | ||
(0, _classCallCheck2["default"])(this, MjBody); | ||
return _super.apply(this, arguments); | ||
render() { | ||
const { | ||
setBackgroundColor | ||
} = this.context; | ||
setBackgroundColor(this.getAttribute('background-color')); | ||
return ` | ||
<div | ||
${this.htmlAttributes({ | ||
class: this.getAttribute('css-class'), | ||
style: 'div' | ||
})} | ||
> | ||
${this.renderChildren()} | ||
</div> | ||
`; | ||
} | ||
(0, _createClass2["default"])(MjBody, [{ | ||
key: "getChildContext", | ||
value: function getChildContext() { | ||
return (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, this.context), {}, { | ||
containerWidth: this.getAttribute('width') | ||
}); | ||
} | ||
}, { | ||
key: "getStyles", | ||
value: function getStyles() { | ||
return { | ||
div: { | ||
'background-color': this.getAttribute('background-color') | ||
} | ||
}; | ||
} | ||
}, { | ||
key: "render", | ||
value: function render() { | ||
var setBackgroundColor = this.context.setBackgroundColor; | ||
setBackgroundColor(this.getAttribute('background-color')); | ||
return "\n <div\n ".concat(this.htmlAttributes({ | ||
"class": this.getAttribute('css-class'), | ||
style: 'div' | ||
}), "\n >\n ").concat(this.renderChildren(), "\n </div>\n "); | ||
} | ||
}]); | ||
return MjBody; | ||
}(_mjmlCore.BodyComponent); | ||
} | ||
exports["default"] = MjBody; | ||
(0, _defineProperty2["default"])(MjBody, "allowedAttributes", { | ||
exports.default = MjBody; | ||
(0, _defineProperty2.default)(MjBody, "componentName", 'mj-body'); | ||
(0, _defineProperty2.default)(MjBody, "allowedAttributes", { | ||
width: 'unit(px)', | ||
'background-color': 'color' | ||
}); | ||
(0, _defineProperty2["default"])(MjBody, "defaultAttributes", { | ||
(0, _defineProperty2.default)(MjBody, "defaultAttributes", { | ||
width: '600px' | ||
}); | ||
module.exports = exports.default; |
{ | ||
"name": "mjml-body", | ||
"description": "mjml-body", | ||
"version": "4.7.1", | ||
"version": "4.8.0", | ||
"main": "lib/index.js", | ||
@@ -26,3 +26,3 @@ "files": [ | ||
"lodash": "^4.17.15", | ||
"mjml-core": "4.7.1" | ||
"mjml-core": "4.8.0" | ||
}, | ||
@@ -33,3 +33,3 @@ "devDependencies": { | ||
}, | ||
"gitHead": "6bb3e08efb912765d5195d35dc19ce61cdd6306a" | ||
"gitHead": "6037a02810ea9a0cb62965ba81712fdf536b958b" | ||
} |
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
3976
47
+ Addedcliui@7.0.4(transitive)
+ Addedcommander@2.20.3(transitive)
+ Addeddetect-node@2.0.4(transitive)
+ Addedescalade@3.2.0(transitive)
+ Addedhtml-minifier@4.0.0(transitive)
+ Addedmjml-core@4.8.0(transitive)
+ Addedmjml-migrate@4.8.0(transitive)
+ Addedmjml-parser-xml@4.8.0(transitive)
+ Addedmjml-validator@4.8.0(transitive)
+ Addeduglify-js@3.19.3(transitive)
+ Addedy18n@5.0.8(transitive)
+ Addedyargs@16.2.0(transitive)
+ Addedyargs-parser@20.2.9(transitive)
- Removedcamelcase@5.3.1(transitive)
- Removedcliui@6.0.0(transitive)
- Removedcommander@2.17.12.19.0(transitive)
- Removeddecamelize@1.2.0(transitive)
- Removedfind-up@4.1.0(transitive)
- Removedhtml-minifier@3.5.21(transitive)
- Removedjs-tokens@4.0.0(transitive)
- Removedlocate-path@5.0.0(transitive)
- Removedloose-envify@1.4.0(transitive)
- Removedmjml-core@4.7.1(transitive)
- Removedmjml-migrate@4.7.1(transitive)
- Removedmjml-parser-xml@4.7.1(transitive)
- Removedmjml-validator@4.7.1(transitive)
- Removedp-limit@2.3.0(transitive)
- Removedp-locate@4.1.0(transitive)
- Removedp-try@2.2.0(transitive)
- Removedpath-exists@4.0.0(transitive)
- Removedrequire-main-filename@2.0.0(transitive)
- Removedset-blocking@2.0.0(transitive)
- Removeduglify-js@3.4.10(transitive)
- Removedwarning@3.0.0(transitive)
- Removedwhich-module@2.0.1(transitive)
- Removedwrap-ansi@6.2.0(transitive)
- Removedy18n@4.0.3(transitive)
- Removedyargs@15.4.1(transitive)
- Removedyargs-parser@18.1.3(transitive)
Updatedmjml-core@4.8.0