Socket
Socket
Sign inDemoInstall

@trainline/react-skeletor

Package Overview
Dependencies
Maintainers
2
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@trainline/react-skeletor - npm Package Compare versions

Comparing version 0.1.7 to 0.1.8

16

lib/createSkeletonElement.js

@@ -17,4 +17,8 @@ "use strict";

var utils_1 = require("./utils");
var createStyle = function (styles) { return (styles.filter(Boolean).reduce(function (acc, next) { return (__assign({}, acc, next)); }, {})); };
var createClassName = function (classnames) { return (classnames.filter(Boolean).join(' ')); };
var createStyle = function (styles) {
return styles.filter(Boolean).reduce(function (acc, next) { return (__assign({}, acc, next)); }, {});
};
var createClassName = function (classnames) {
return classnames.filter(Boolean).join(' ');
};
var unwrapStyle = function (style) {

@@ -30,5 +34,6 @@ if (!style) {

exports.createSkeletonElement = function (type, pendingStyle) {
var ExportedComponent = function (// tslint:disable-line
props, _a // tslint:disable-line
) {
// tslint:disable-next-line:no-any
var ExportedComponent = function (
// tslint:disable-next-line:no-any
props, _a) {
var skeletor = _a.skeletor;

@@ -55,2 +60,3 @@ var isPending;

]);
newProps['aria-hidden'] = true;
}

@@ -57,0 +63,0 @@ // tslint:disable-next-line:no-any

@@ -12,2 +12,10 @@ "use strict";

})();
var __assign = (this && this.__assign) || Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -27,3 +35,3 @@ /*

) {
var ExportedComponent = (function (_super) {
var ExportedComponent = /** @class */ (function (_super) {
__extends(ExportedComponent, _super);

@@ -35,4 +43,4 @@ function ExportedComponent() {

isPending: predicate(_this.props),
styling: styling,
},
styling: styling
}
}); };

@@ -48,11 +56,9 @@ return _this;

var data = typeof dummyData === 'function' ? dummyData(props) : dummyData;
// TODO: fix with typescript 2.4
return React.createElement(WrappedComponent, Object.assign({}, props, data));
return React.createElement(WrappedComponent, __assign({}, props, data));
}
// TODO: fix with typescript 2.4
return React.createElement(WrappedComponent, props);
return React.createElement(WrappedComponent, __assign({}, props));
};
ExportedComponent.childContextTypes = utils_1.contextTypes;
return ExportedComponent;
}(React.Component));
ExportedComponent.childContextTypes = utils_1.contextTypes;
return ExportedComponent;

@@ -59,0 +65,0 @@ };

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

backgroundColor: color,
color: color,
color: color
}); };

@@ -9,0 +9,0 @@ exports.contextTypes = {

{
"name": "@trainline/react-skeletor",
"version": "0.1.7",
"version": "0.1.8",
"description": "Make your application look nice when its loading!",

@@ -18,3 +18,4 @@ "main": "lib/index.js",

"test": "jest --config test.config.json --no-cache",
"test:watch": "jest --config test.config.json --watch"
"test:watch": "jest --config test.config.json --watch",
"prettify": "prettier --write src/*.ts src/*.tsx src/**/*.ts src/**/*.tsx"
},

@@ -45,5 +46,7 @@ "files": [

"dependencies": {
"prop-types": "^15.5.10",
"react": "^15.5.4"
"prop-types": "^15.5.10"
},
"peerDependencies": {
"react": "^15.5.4 || ^16.0.0"
},
"devDependencies": {

@@ -53,7 +56,11 @@ "@types/enzyme": "^2.7.6",

"@types/prop-types": "^15.5.1",
"@types/react": "^16.0.7",
"@types/recompose": "^0.22.0",
"enzyme": "^2.8.2",
"jest": "^20.0.4",
"react-dom": "^15.5.4",
"react-test-renderer": "^15.5.4",
"enzyme": "^3.0.0",
"enzyme-adapter-react-16": "^1.0.0",
"jest": "^21.2.1",
"prettier": "^1.7.3",
"react": "^16.0.0",
"react-dom": "^16.0.0",
"react-test-renderer": "^16.0.0",
"recompose": "^0.23.4",

@@ -65,4 +72,4 @@ "ts-jest": "^20.0.4",

"tslint-react": "^3.0.0",
"typescript": "^2.3.3"
"typescript": "^2.5.3"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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