@trainline/react-skeletor
Advanced tools
Comparing version 0.1.7 to 0.1.8
@@ -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
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
17728
202
19
+ Addedreact@16.14.0(transitive)
- Removedreact@^15.5.4
- Removedasap@2.0.6(transitive)
- Removedcore-js@1.2.7(transitive)
- Removedcreate-react-class@15.7.0(transitive)
- Removedencoding@0.1.13(transitive)
- Removedfbjs@0.8.18(transitive)
- Removediconv-lite@0.6.3(transitive)
- Removedis-stream@1.1.0(transitive)
- Removedisomorphic-fetch@2.2.1(transitive)
- Removednode-fetch@1.7.3(transitive)
- Removedpromise@7.3.1(transitive)
- Removedreact@15.7.0(transitive)
- Removedsafer-buffer@2.1.2(transitive)
- Removedsetimmediate@1.0.5(transitive)
- Removedua-parser-js@0.7.39(transitive)
- Removedwhatwg-fetch@3.6.20(transitive)