@superset-ui/color
Advanced tools
Comparing version 0.4.0 to 0.5.0
@@ -1,4 +0,4 @@ | ||
import"core-js/modules/web.dom.iterable";import"core-js/modules/es6.array.iterator";function _inheritsLoose(a,b){a.prototype=Object.create(b.prototype),a.prototype.constructor=a,a.__proto__=b}import{scaleLinear}from"d3-scale";import ColorScheme from"./ColorScheme";function range(a){return Array(a).keys().concat()}var SequentialScheme=/*#__PURE__*/function(a){function b(b){var c=a.call(this,b)||this;var d=b.isDiverging;return c.isDiverging=void 0!==d&&d,c}_inheritsLoose(b,a);var c=b.prototype;return c.createLinearScale=function e(a){void 0===a&&(a=[0,1]);// Create matching domain | ||
function _inheritsLoose(a,b){a.prototype=Object.create(b.prototype),a.prototype.constructor=a,a.__proto__=b}import{scaleLinear}from"d3-scale";import ColorScheme from"./ColorScheme";function range(a){for(var b=[],c=0;c<a;c+=1)b.push(c);return b}var SequentialScheme=/*#__PURE__*/function(a){function b(b){var c=a.call(this,b)||this;var d=b.isDiverging;return c.isDiverging=void 0!==d&&d,c}_inheritsLoose(b,a);var c=b.prototype;return c.createLinearScale=function e(a){void 0===a&&(a=[0,1]);// Create matching domain | ||
// because D3 continuous scale uses piecewise mapping | ||
// between domain and range. | ||
var b=scaleLinear().range(a),c=this.colors.length-1,d=range(this.colors.length).map(function(a){return b(a/c)});return scaleLinear().domain(d).range(this.colors).clamp(!0)},c.getColors=function d(a){if(void 0===a&&(a=this.colors.length),a===this.colors.length)return this.colors;var b=this.createLinearScale(),c=a-1;return range(a).map(function(a){return b(a/c)})},b}(ColorScheme);export{SequentialScheme as default}; |
@@ -1,4 +0,4 @@ | ||
"use strict";exports.__esModule=!0,exports.default=void 0,require("core-js/modules/web.dom.iterable"),require("core-js/modules/es6.array.iterator");var _d3Scale=require("d3-scale"),_ColorScheme2=_interopRequireDefault(require("./ColorScheme"));function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}function _inheritsLoose(a,b){a.prototype=Object.create(b.prototype),a.prototype.constructor=a,a.__proto__=b}function range(a){return Array(a).keys().concat()}var SequentialScheme=/*#__PURE__*/function(a){function b(b){var c=a.call(this,b)||this;var d=b.isDiverging;return c.isDiverging=void 0!==d&&d,c}_inheritsLoose(b,a);var c=b.prototype;return c.createLinearScale=function e(a){void 0===a&&(a=[0,1]);// Create matching domain | ||
"use strict";exports.__esModule=!0,exports.default=void 0;var _d3Scale=require("d3-scale"),_ColorScheme2=_interopRequireDefault(require("./ColorScheme"));function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}function _inheritsLoose(a,b){a.prototype=Object.create(b.prototype),a.prototype.constructor=a,a.__proto__=b}function range(a){for(var b=[],c=0;c<a;c+=1)b.push(c);return b}var SequentialScheme=/*#__PURE__*/function(a){function b(b){var c=a.call(this,b)||this;var d=b.isDiverging;return c.isDiverging=void 0!==d&&d,c}_inheritsLoose(b,a);var c=b.prototype;return c.createLinearScale=function e(a){void 0===a&&(a=[0,1]);// Create matching domain | ||
// because D3 continuous scale uses piecewise mapping | ||
// between domain and range. | ||
var b=(0,_d3Scale.scaleLinear)().range(a),c=this.colors.length-1,d=range(this.colors.length).map(function(a){return b(a/c)});return(0,_d3Scale.scaleLinear)().domain(d).range(this.colors).clamp(!0)},c.getColors=function d(a){if(void 0===a&&(a=this.colors.length),a===this.colors.length)return this.colors;var b=this.createLinearScale(),c=a-1;return range(a).map(function(a){return b(a/c)})},b}(_ColorScheme2.default);exports.default=SequentialScheme; |
{ | ||
"name": "@superset-ui/color", | ||
"version": "0.4.0", | ||
"version": "0.5.0", | ||
"description": "Superset UI color", | ||
@@ -29,6 +29,6 @@ "sideEffects": false, | ||
"dependencies": { | ||
"@superset-ui/core": "^0.4.0", | ||
"@superset-ui/core": "^0.5.0", | ||
"d3-scale": "^2.1.2" | ||
}, | ||
"gitHead": "b191e7a815860107d7146e38549db2370ce0d1dc" | ||
"gitHead": "31eec0f496b66098ad887bd64fc13f3882bcdc71" | ||
} |
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
44975
37
+ Added@superset-ui/core@0.5.0(transitive)
- Removed@superset-ui/core@0.4.0(transitive)
Updated@superset-ui/core@^0.5.0