@visactor/vchart 2.0.23-alpha.8 → 2.0.23-alpha.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/es5/index.js +1 -1
- package/build/index.es.js +19 -15
- package/build/index.js +19 -15
- package/build/index.min.js +2 -2
- package/build/tsconfig.tsbuildinfo +1 -1
- package/cjs/core/index.d.ts +1 -1
- package/cjs/core/index.js +1 -1
- package/cjs/core/index.js.map +1 -1
- package/cjs/core/vchart.js +3 -1
- package/cjs/core/vchart.js.map +1 -1
- package/cjs/series/treemap/interface.d.ts +1 -1
- package/cjs/series/treemap/interface.js.map +1 -1
- package/cjs/typings/spec/common.d.ts +4 -2
- package/cjs/typings/spec/common.js.map +1 -1
- package/cjs/util/spec/transform.d.ts +5 -2
- package/cjs/util/spec/transform.js +7 -11
- package/cjs/util/spec/transform.js.map +1 -1
- package/esm/core/index.d.ts +1 -1
- package/esm/core/index.js +1 -1
- package/esm/core/index.js.map +1 -1
- package/esm/core/vchart.js +2 -1
- package/esm/core/vchart.js.map +1 -1
- package/esm/series/treemap/interface.d.ts +1 -1
- package/esm/series/treemap/interface.js.map +1 -1
- package/esm/typings/spec/common.d.ts +4 -2
- package/esm/typings/spec/common.js.map +1 -1
- package/esm/util/spec/transform.d.ts +5 -2
- package/esm/util/spec/transform.js +7 -11
- package/esm/util/spec/transform.js.map +1 -1
- package/package.json +5 -5
package/build/index.es.js
CHANGED
|
@@ -53660,27 +53660,27 @@ function specTransform(spec, special = {
|
|
|
53660
53660
|
}
|
|
53661
53661
|
return spec;
|
|
53662
53662
|
}
|
|
53663
|
-
function functionTransform(
|
|
53664
|
-
|
|
53665
|
-
|
|
53663
|
+
function functionTransform(value, registry) {
|
|
53664
|
+
var _a;
|
|
53665
|
+
if (!value) {
|
|
53666
|
+
return value;
|
|
53666
53667
|
}
|
|
53667
|
-
if (
|
|
53668
|
+
if (isString$1(value)) {
|
|
53669
|
+
return (_a = registry.getFunction(value)) !== null && _a !== void 0 ? _a : value;
|
|
53670
|
+
}
|
|
53671
|
+
if (isPlainObject$1(value)) {
|
|
53668
53672
|
const result = {};
|
|
53669
|
-
for (const key in
|
|
53670
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
53671
|
-
|
|
53672
|
-
result[key] = VChart.getFunction(spec[key]);
|
|
53673
|
-
continue;
|
|
53674
|
-
}
|
|
53675
|
-
result[key] = functionTransform(spec[key], VChart);
|
|
53673
|
+
for (const key in value) {
|
|
53674
|
+
if (Object.prototype.hasOwnProperty.call(value, key)) {
|
|
53675
|
+
result[key] = functionTransform(value[key], registry);
|
|
53676
53676
|
}
|
|
53677
53677
|
}
|
|
53678
53678
|
return result;
|
|
53679
53679
|
}
|
|
53680
|
-
if (isArray$1(
|
|
53681
|
-
return
|
|
53680
|
+
if (isArray$1(value)) {
|
|
53681
|
+
return value.map(item => functionTransform(item, registry));
|
|
53682
53682
|
}
|
|
53683
|
-
return
|
|
53683
|
+
return value;
|
|
53684
53684
|
}
|
|
53685
53685
|
function transformFunctionAttribute(att, ...args) {
|
|
53686
53686
|
if (isFunction$1(att)) {
|
|
@@ -60893,6 +60893,7 @@ class VChart {
|
|
|
60893
60893
|
}
|
|
60894
60894
|
let theme = this._currentTheme;
|
|
60895
60895
|
keys.forEach((key, index) => {
|
|
60896
|
+
var _a;
|
|
60896
60897
|
if (index === 1 && (keys[0] === 'series' || keys[0] === 'component')) {
|
|
60897
60898
|
const buildInTheme = keys[0] === 'series' ? Factory.getSeriesBuiltInTheme(key) : Factory.getComponentBuiltInTheme(key);
|
|
60898
60899
|
theme = theme ? mergeSpec({}, buildInTheme, theme[key]) : buildInTheme;
|
|
@@ -60904,6 +60905,9 @@ class VChart {
|
|
|
60904
60905
|
theme = preprocessTheme({
|
|
60905
60906
|
[key]: theme
|
|
60906
60907
|
}, this._currentTheme.colorScheme, this._currentTheme.token)[key];
|
|
60908
|
+
if ((_a = this.getFunctionList()) === null || _a === void 0 ? void 0 : _a.length) {
|
|
60909
|
+
theme = functionTransform(theme, this);
|
|
60910
|
+
}
|
|
60907
60911
|
}
|
|
60908
60912
|
});
|
|
60909
60913
|
this._cachedProcessedTheme[cacheKey] = theme;
|
|
@@ -62208,7 +62212,7 @@ const lookup = (data, opt) => {
|
|
|
62208
62212
|
});
|
|
62209
62213
|
};
|
|
62210
62214
|
|
|
62211
|
-
const version = "2.0.
|
|
62215
|
+
const version = "2.0.23-alpha.8";
|
|
62212
62216
|
|
|
62213
62217
|
const addVChartProperty = (data, op) => {
|
|
62214
62218
|
const context = op.beforeCall();
|
package/build/index.js
CHANGED
|
@@ -53666,27 +53666,27 @@
|
|
|
53666
53666
|
}
|
|
53667
53667
|
return spec;
|
|
53668
53668
|
}
|
|
53669
|
-
function functionTransform(
|
|
53670
|
-
|
|
53671
|
-
|
|
53669
|
+
function functionTransform(value, registry) {
|
|
53670
|
+
var _a;
|
|
53671
|
+
if (!value) {
|
|
53672
|
+
return value;
|
|
53672
53673
|
}
|
|
53673
|
-
if (
|
|
53674
|
+
if (isString$1(value)) {
|
|
53675
|
+
return (_a = registry.getFunction(value)) !== null && _a !== void 0 ? _a : value;
|
|
53676
|
+
}
|
|
53677
|
+
if (isPlainObject$1(value)) {
|
|
53674
53678
|
const result = {};
|
|
53675
|
-
for (const key in
|
|
53676
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
53677
|
-
|
|
53678
|
-
result[key] = VChart.getFunction(spec[key]);
|
|
53679
|
-
continue;
|
|
53680
|
-
}
|
|
53681
|
-
result[key] = functionTransform(spec[key], VChart);
|
|
53679
|
+
for (const key in value) {
|
|
53680
|
+
if (Object.prototype.hasOwnProperty.call(value, key)) {
|
|
53681
|
+
result[key] = functionTransform(value[key], registry);
|
|
53682
53682
|
}
|
|
53683
53683
|
}
|
|
53684
53684
|
return result;
|
|
53685
53685
|
}
|
|
53686
|
-
if (isArray$1(
|
|
53687
|
-
return
|
|
53686
|
+
if (isArray$1(value)) {
|
|
53687
|
+
return value.map(item => functionTransform(item, registry));
|
|
53688
53688
|
}
|
|
53689
|
-
return
|
|
53689
|
+
return value;
|
|
53690
53690
|
}
|
|
53691
53691
|
function transformFunctionAttribute(att, ...args) {
|
|
53692
53692
|
if (isFunction$1(att)) {
|
|
@@ -60899,6 +60899,7 @@
|
|
|
60899
60899
|
}
|
|
60900
60900
|
let theme = this._currentTheme;
|
|
60901
60901
|
keys.forEach((key, index) => {
|
|
60902
|
+
var _a;
|
|
60902
60903
|
if (index === 1 && (keys[0] === 'series' || keys[0] === 'component')) {
|
|
60903
60904
|
const buildInTheme = keys[0] === 'series' ? Factory.getSeriesBuiltInTheme(key) : Factory.getComponentBuiltInTheme(key);
|
|
60904
60905
|
theme = theme ? mergeSpec({}, buildInTheme, theme[key]) : buildInTheme;
|
|
@@ -60910,6 +60911,9 @@
|
|
|
60910
60911
|
theme = preprocessTheme({
|
|
60911
60912
|
[key]: theme
|
|
60912
60913
|
}, this._currentTheme.colorScheme, this._currentTheme.token)[key];
|
|
60914
|
+
if ((_a = this.getFunctionList()) === null || _a === void 0 ? void 0 : _a.length) {
|
|
60915
|
+
theme = functionTransform(theme, this);
|
|
60916
|
+
}
|
|
60913
60917
|
}
|
|
60914
60918
|
});
|
|
60915
60919
|
this._cachedProcessedTheme[cacheKey] = theme;
|
|
@@ -62214,7 +62218,7 @@
|
|
|
62214
62218
|
});
|
|
62215
62219
|
};
|
|
62216
62220
|
|
|
62217
|
-
const version = "2.0.
|
|
62221
|
+
const version = "2.0.23-alpha.8";
|
|
62218
62222
|
|
|
62219
62223
|
const addVChartProperty = (data, op) => {
|
|
62220
62224
|
const context = op.beforeCall();
|