@superset-ui/color
Advanced tools
Comparing version 0.10.1 to 0.10.8
@@ -1,2 +0,2 @@ | ||
function _assertThisInitialized(a){if(void 0===a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _inheritsLoose(a,b){a.prototype=Object.create(b.prototype),a.prototype.constructor=a,a.__proto__=b}function _defineProperty(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}import{ExtensibleFunction}from"@superset-ui/core";import stringifyAndTrim from"./stringifyAndTrim";var CategoricalColorScale=/*#__PURE__*/function(a){/** | ||
function _extends(){return _extends=Object.assign||function(a){for(var b,c=1;c<arguments.length;c++)for(var d in b=arguments[c],b)Object.prototype.hasOwnProperty.call(b,d)&&(a[d]=b[d]);return a},_extends.apply(this,arguments)}function _assertThisInitialized(a){if(void 0===a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _inheritsLoose(a,b){a.prototype=Object.create(b.prototype),a.prototype.constructor=a,a.__proto__=b}function _defineProperty(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}import{ExtensibleFunction}from"@superset-ui/core";import stringifyAndTrim from"./stringifyAndTrim";var CategoricalColorScale=/*#__PURE__*/function(a){/** | ||
* Constructor | ||
@@ -10,2 +10,5 @@ * @param {*} colors an array of colors | ||
* @param {*} forcedColor forcedColor | ||
*/,c.setColor=function c(a,b){return this.forcedColors[stringifyAndTrim(a)]=b,this},b}(ExtensibleFunction);export{CategoricalColorScale as default}; | ||
*/,c.setColor=function c(a,b){return this.forcedColors[stringifyAndTrim(a)]=b,this}/** | ||
* Get a mapping of data values to colors | ||
* @returns an object where the key is the data value and the value is the hex color code | ||
*/,c.getColorMap=function d(){var a=this,b={},c=this.colors.length;return Object.keys(this.seen).forEach(function(d){b[d]=a.colors[a.seen[d]%c]}),_extends({},b,this.forcedColors,this.parentForcedColors)},b}(ExtensibleFunction);export{CategoricalColorScale as default}; |
@@ -24,2 +24,7 @@ import { ExtensibleFunction } from '@superset-ui/core'; | ||
setColor(value: string, forcedColor: string): this; | ||
/** | ||
* Get a mapping of data values to colors | ||
* @returns an object where the key is the data value and the value is the hex color code | ||
*/ | ||
getColorMap(): {}; | ||
} |
@@ -1,2 +0,2 @@ | ||
"use strict";exports.__esModule=!0,exports.default=void 0;var _core=require("@superset-ui/core"),_stringifyAndTrim=_interopRequireDefault(require("./stringifyAndTrim"));function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}function _assertThisInitialized(a){if(void 0===a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _inheritsLoose(a,b){a.prototype=Object.create(b.prototype),a.prototype.constructor=a,a.__proto__=b}function _defineProperty(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}var CategoricalColorScale=/*#__PURE__*/function(a){/** | ||
"use strict";exports.__esModule=!0,exports.default=void 0;var _core=require("@superset-ui/core"),_stringifyAndTrim=_interopRequireDefault(require("./stringifyAndTrim"));function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}function _extends(){return _extends=Object.assign||function(a){for(var b,c=1;c<arguments.length;c++)for(var d in b=arguments[c],b)Object.prototype.hasOwnProperty.call(b,d)&&(a[d]=b[d]);return a},_extends.apply(this,arguments)}function _assertThisInitialized(a){if(void 0===a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _inheritsLoose(a,b){a.prototype=Object.create(b.prototype),a.prototype.constructor=a,a.__proto__=b}function _defineProperty(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}var CategoricalColorScale=/*#__PURE__*/function(a){/** | ||
* Constructor | ||
@@ -10,2 +10,5 @@ * @param {*} colors an array of colors | ||
* @param {*} forcedColor forcedColor | ||
*/,c.setColor=function c(a,b){return this.forcedColors[(0,_stringifyAndTrim.default)(a)]=b,this},b}(_core.ExtensibleFunction);exports.default=CategoricalColorScale; | ||
*/,c.setColor=function c(a,b){return this.forcedColors[(0,_stringifyAndTrim.default)(a)]=b,this}/** | ||
* Get a mapping of data values to colors | ||
* @returns an object where the key is the data value and the value is the hex color code | ||
*/,c.getColorMap=function d(){var a=this,b={},c=this.colors.length;return Object.keys(this.seen).forEach(function(d){b[d]=a.colors[a.seen[d]%c]}),_extends({},b,this.forcedColors,this.parentForcedColors)},b}(_core.ExtensibleFunction);exports.default=CategoricalColorScale; |
{ | ||
"name": "@superset-ui/color", | ||
"version": "0.10.1", | ||
"version": "0.10.8", | ||
"description": "Superset UI color", | ||
@@ -35,3 +35,3 @@ "sideEffects": false, | ||
}, | ||
"gitHead": "f57b9956d8f591e356ed6fd650d67628f44b1379" | ||
"gitHead": "a3f1249980aa9fbb8570779f73794582ecc8deed" | ||
} |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
54179
216
1