@superset-ui/color
Advanced tools
Comparing version 0.12.12 to 0.12.13
@@ -20,3 +20,3 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
getScale(schemeId) { | ||
var _ref, _ref2; | ||
var _ref, _scheme$colors; | ||
@@ -31,3 +31,3 @@ const id = (_ref = schemeId != null ? schemeId : getCategoricalSchemeRegistry().getDefaultKey()) != null ? _ref : ''; | ||
const scheme = getCategoricalSchemeRegistry().get(id); | ||
const newScale = new CategoricalColorScale((_ref2 = scheme == null ? void 0 : scheme.colors) != null ? _ref2 : [], this.forcedItems); | ||
const newScale = new CategoricalColorScale((_scheme$colors = scheme == null ? void 0 : scheme.colors) != null ? _scheme$colors : [], this.forcedItems); | ||
this.scales[id] = newScale; | ||
@@ -53,7 +53,3 @@ return newScale; | ||
export const DEFAULT_NAMESPACE = 'GLOBAL'; | ||
export function getNamespace(name) { | ||
if (name === void 0) { | ||
name = DEFAULT_NAMESPACE; | ||
} | ||
export function getNamespace(name = DEFAULT_NAMESPACE) { | ||
const instance = namespaces[name]; | ||
@@ -60,0 +56,0 @@ |
@@ -28,7 +28,3 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
createLinearScale(extent) { | ||
if (extent === void 0) { | ||
extent = [0, 1]; | ||
} | ||
createLinearScale(extent = [0, 1]) { | ||
// Create matching domain | ||
@@ -43,7 +39,3 @@ // because D3 continuous scale uses piecewise mapping | ||
getColors(numColors) { | ||
if (numColors === void 0) { | ||
numColors = this.colors.length; | ||
} | ||
getColors(numColors = this.colors.length) { | ||
if (numColors === this.colors.length) { | ||
@@ -50,0 +42,0 @@ return this.colors; |
@@ -33,3 +33,3 @@ "use strict"; | ||
getScale(schemeId) { | ||
var _ref, _ref2; | ||
var _ref, _scheme$colors; | ||
@@ -44,3 +44,3 @@ const id = (_ref = schemeId != null ? schemeId : (0, _CategoricalSchemeRegistrySingleton.default)().getDefaultKey()) != null ? _ref : ''; | ||
const scheme = (0, _CategoricalSchemeRegistrySingleton.default)().get(id); | ||
const newScale = new _CategoricalColorScale.default((_ref2 = scheme == null ? void 0 : scheme.colors) != null ? _ref2 : [], this.forcedItems); | ||
const newScale = new _CategoricalColorScale.default((_scheme$colors = scheme == null ? void 0 : scheme.colors) != null ? _scheme$colors : [], this.forcedItems); | ||
this.scales[id] = newScale; | ||
@@ -70,7 +70,3 @@ return newScale; | ||
function getNamespace(name) { | ||
if (name === void 0) { | ||
name = DEFAULT_NAMESPACE; | ||
} | ||
function getNamespace(name = DEFAULT_NAMESPACE) { | ||
const instance = namespaces[name]; | ||
@@ -77,0 +73,0 @@ |
@@ -36,7 +36,3 @@ "use strict"; | ||
createLinearScale(extent) { | ||
if (extent === void 0) { | ||
extent = [0, 1]; | ||
} | ||
createLinearScale(extent = [0, 1]) { | ||
// Create matching domain | ||
@@ -51,7 +47,3 @@ // because D3 continuous scale uses piecewise mapping | ||
getColors(numColors) { | ||
if (numColors === void 0) { | ||
numColors = this.colors.length; | ||
} | ||
getColors(numColors = this.colors.length) { | ||
if (numColors === this.colors.length) { | ||
@@ -58,0 +50,0 @@ return this.colors; |
{ | ||
"name": "@superset-ui/color", | ||
"version": "0.12.12", | ||
"version": "0.12.13", | ||
"description": "Superset UI color", | ||
@@ -35,3 +35,3 @@ "sideEffects": false, | ||
}, | ||
"gitHead": "6854fd7cfbfde1df2702c2579a71989eefccd721" | ||
"gitHead": "308f2abebca860cdabd1b3138b4237c81ef3296d" | ||
} |
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
65401
1138