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

@superset-ui/color

Package Overview
Dependencies
Maintainers
8
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@superset-ui/color - npm Package Compare versions

Comparing version 0.10.1 to 0.10.8

7

esm/CategoricalColorScale.js

@@ -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"
}
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