Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mjml-react

Package Overview
Dependencies
Maintainers
6
Versions
80
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mjml-react - npm Package Compare versions

Comparing version 2.0.4 to 2.0.5

6

dist/es/src/mjml-html-attribute.js

@@ -9,4 +9,4 @@ var _excluded = ["children"];

import React, { Component } from "react";
import { handleMjmlProps } from "./utils";
import React, { Component } from 'react';
import { handleMjmlProps } from './utils';
export var MjmlHtmlAttribute = /*#__PURE__*/function (_Component) {

@@ -26,3 +26,3 @@ _inheritsLoose(MjmlHtmlAttribute, _Component);

return /*#__PURE__*/React.createElement("mj-html-attribute", handleMjmlProps(rest), children);
return /*#__PURE__*/React.createElement('mj-html-attribute', handleMjmlProps(rest), children);
};

@@ -29,0 +29,0 @@

@@ -9,4 +9,4 @@ var _excluded = ["children"];

import React, { Component } from "react";
import { handleMjmlProps } from "./utils";
import React, { Component } from 'react';
import { handleMjmlProps } from './utils';
export var MjmlHtmlAttributes = /*#__PURE__*/function (_Component) {

@@ -26,3 +26,3 @@ _inheritsLoose(MjmlHtmlAttributes, _Component);

return /*#__PURE__*/React.createElement("mj-html-attributes", handleMjmlProps(rest), children);
return /*#__PURE__*/React.createElement('mj-html-attributes', handleMjmlProps(rest), children);
};

@@ -29,0 +29,0 @@

@@ -9,4 +9,4 @@ var _excluded = ["children"];

import React, { Component } from "react";
import { handleMjmlProps } from "./utils";
import React, { Component } from 'react';
import { handleMjmlProps } from './utils';
export var MjmlSelector = /*#__PURE__*/function (_Component) {

@@ -26,3 +26,3 @@ _inheritsLoose(MjmlSelector, _Component);

return /*#__PURE__*/React.createElement("mj-selector", handleMjmlProps(rest), children);
return /*#__PURE__*/React.createElement('mj-selector', handleMjmlProps(rest), children);
};

@@ -29,0 +29,0 @@

import React from 'react';
import { expect } from 'chai';
import { render, Mjml, MjmlHead, MjmlTitle, MjmlBody, MjmlRaw } from '../src';
import { render, Mjml, MjmlHead, MjmlTitle, MjmlBody, MjmlRaw, MjmlSection, MjmlHtmlAttribute, MjmlHtmlAttributes, MjmlSelector, MjmlColumn, MjmlText } from '../src';
describe('render()', function () {

@@ -34,2 +34,19 @@ it('should render the HTML', function () {

});
it('should render html attributes with custom selector', function () {
var email = /*#__PURE__*/React.createElement(Mjml, null, /*#__PURE__*/React.createElement(MjmlHead, null, /*#__PURE__*/React.createElement(MjmlHtmlAttributes, null, /*#__PURE__*/React.createElement(MjmlSelector, {
path: ".custom div"
}, /*#__PURE__*/React.createElement(MjmlHtmlAttribute, {
name: "data-id"
}, "42")))), /*#__PURE__*/React.createElement(MjmlBody, null, /*#__PURE__*/React.createElement(MjmlSection, null, /*#__PURE__*/React.createElement(MjmlColumn, null, /*#__PURE__*/React.createElement(MjmlText, {
"css-class": "custom"
}, "Hello World!")))));
var _render3 = render(email, {
validationLevel: 'soft',
minify: false
}),
html = _render3.html;
expect(html).contains('<div style="font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:13px;line-height:1;text-align:left;color:#000000;" data-id="42">Hello World!</div>');
});
});

@@ -36,3 +36,3 @@ "use strict";

return /*#__PURE__*/_react["default"].createElement("mj-html-attribute", (0, _utils.handleMjmlProps)(rest), children);
return /*#__PURE__*/_react["default"].createElement('mj-html-attribute', (0, _utils.handleMjmlProps)(rest), children);
};

@@ -39,0 +39,0 @@

@@ -36,3 +36,3 @@ "use strict";

return /*#__PURE__*/_react["default"].createElement("mj-html-attributes", (0, _utils.handleMjmlProps)(rest), children);
return /*#__PURE__*/_react["default"].createElement('mj-html-attributes', (0, _utils.handleMjmlProps)(rest), children);
};

@@ -39,0 +39,0 @@

@@ -36,3 +36,3 @@ "use strict";

return /*#__PURE__*/_react["default"].createElement("mj-selector", (0, _utils.handleMjmlProps)(rest), children);
return /*#__PURE__*/_react["default"].createElement('mj-selector', (0, _utils.handleMjmlProps)(rest), children);
};

@@ -39,0 +39,0 @@

@@ -42,2 +42,19 @@ "use strict";

});
it('should render html attributes with custom selector', function () {
var email = /*#__PURE__*/_react["default"].createElement(_src.Mjml, null, /*#__PURE__*/_react["default"].createElement(_src.MjmlHead, null, /*#__PURE__*/_react["default"].createElement(_src.MjmlHtmlAttributes, null, /*#__PURE__*/_react["default"].createElement(_src.MjmlSelector, {
path: ".custom div"
}, /*#__PURE__*/_react["default"].createElement(_src.MjmlHtmlAttribute, {
name: "data-id"
}, "42")))), /*#__PURE__*/_react["default"].createElement(_src.MjmlBody, null, /*#__PURE__*/_react["default"].createElement(_src.MjmlSection, null, /*#__PURE__*/_react["default"].createElement(_src.MjmlColumn, null, /*#__PURE__*/_react["default"].createElement(_src.MjmlText, {
"css-class": "custom"
}, "Hello World!")))));
var _render3 = (0, _src.render)(email, {
validationLevel: 'soft',
minify: false
}),
html = _render3.html;
(0, _chai.expect)(html).contains('<div style="font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:13px;line-height:1;text-align:left;color:#000000;" data-id="42">Hello World!</div>');
});
});

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

{"name":"mjml-react","version":"2.0.4","license":"MIT","author":{"name":"Mantas Miliukas","email":"mantasm@wix.com"},"homepage":"https://github.com/wix-incubator/mjml-react","bugs":"https://github.com/wix-incubator/mjml-react/issues","main":"dist/src/index.js","files":["extensions.js","utils.js","dist"],"publishConfig":{"registry":"https://registry.npmjs.org/","versionBumpStrategy":"patch"},"scripts":{"start":"yoshi start","pretest":"yoshi build","test":"yoshi test --mocha","posttest":"yoshi lint"},"devDependencies":{"babel-plugin-transform-runtime":"~6.23.0","chai":"~4.1.0","mjml":"^4.7.0","mjml2json":"^1.0.1","puppeteer":"^1.4.0","react":"^17.0.0","react-dom":"^17.0.0","@wix/yoshi":"^4.186.0"},"peerDependencies":{"mjml":"^4.7.0","react":"^17.0.0","react-dom":"^17.0.0"},"yoshi":{"hmr":"auto"},"module":"dist/es/src/index.js","dependencies":{"@babel/runtime":"^7.14.6","babel-runtime":"~6.25.0","color":"^3.1.3","react-reconciler":"^0.26.1"},"babel":{"plugins":["transform-runtime"],"presets":["wix"]},"eslintConfig":{"extends":"yoshi","rules":{"quote-props":0,"indent":["error",2,{"SwitchCase":1,"ignoredNodes":["JSXElement","JSXElement *"]}]}},"gitHead":"e72830ac6f7d53e3ca5fd3a3c494658dbdf3cc3b","repository":{"type":"git","url":"https://github.com/wix-incubator/mjml-react","directory":"."}}
{"name":"mjml-react","version":"2.0.5","license":"MIT","author":{"name":"Mantas Miliukas","email":"mantasm@wix.com"},"homepage":"https://github.com/wix-incubator/mjml-react","bugs":"https://github.com/wix-incubator/mjml-react/issues","main":"dist/src/index.js","files":["extensions.js","utils.js","dist"],"publishConfig":{"registry":"https://registry.npmjs.org/","versionBumpStrategy":"patch"},"scripts":{"start":"yoshi start","pretest":"yoshi build","test":"yoshi test --mocha","posttest":"yoshi lint"},"devDependencies":{"babel-plugin-transform-runtime":"~6.23.0","chai":"~4.1.0","mjml":"^4.7.0","mjml2json":"^1.0.1","puppeteer":"^1.4.0","react":"^17.0.0","react-dom":"^17.0.0","@wix/yoshi":"^4.186.0"},"peerDependencies":{"mjml":"^4.7.0","react":"^17.0.0","react-dom":"^17.0.0"},"yoshi":{"hmr":"auto"},"module":"dist/es/src/index.js","dependencies":{"@babel/runtime":"^7.14.6","babel-runtime":"~6.25.0","color":"^3.1.3","react-reconciler":"^0.26.1"},"babel":{"plugins":["transform-runtime"],"presets":["wix"]},"eslintConfig":{"extends":"yoshi","rules":{"quote-props":0,"indent":["error",2,{"SwitchCase":1,"ignoredNodes":["JSXElement","JSXElement *"]}]}},"gitHead":"2ca766304a38c64ec3639cac875b80c1e7123065","repository":{"type":"git","url":"https://github.com/wix-incubator/mjml-react","directory":"."}}
SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc