cx 24.7.2 → 24.7.3
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/dist/charts.js +10 -0
- package/dist/data.js +49 -19
- package/dist/manifest.js +774 -774
- package/dist/svg.js +6 -0
- package/package.json +1 -1
- package/src/charts/LegendEntry.d.ts +17 -3
- package/src/charts/LegendEntry.js +4 -0
- package/src/charts/Marker.d.ts +110 -96
- package/src/charts/Marker.js +307 -299
- package/src/data/ArrayElementView.js +37 -19
- package/src/data/ArrayElementView.spec.js +18 -0
- package/src/data/AugmentedViewBase.js +22 -14
- package/src/svg/Rectangle.d.ts +20 -7
- package/src/svg/Rectangle.js +7 -2
- package/src/ui/DataProxy.spec.js +26 -23
package/dist/charts.js
CHANGED
|
@@ -1816,6 +1816,8 @@ var LegendEntry = /*#__PURE__*/ (function (_HtmlElement) {
|
|
|
1816
1816
|
name: undefined,
|
|
1817
1817
|
active: true,
|
|
1818
1818
|
size: undefined,
|
|
1819
|
+
rx: undefined,
|
|
1820
|
+
ry: undefined,
|
|
1819
1821
|
},
|
|
1820
1822
|
]),
|
|
1821
1823
|
);
|
|
@@ -1890,6 +1892,8 @@ var LegendEntry = /*#__PURE__*/ (function (_HtmlElement) {
|
|
|
1890
1892
|
children: shape(this.svgSize / 2, this.svgSize / 2, entry.size, {
|
|
1891
1893
|
style: entry.style,
|
|
1892
1894
|
className: className,
|
|
1895
|
+
rx: entry.rx,
|
|
1896
|
+
ry: entry.ry,
|
|
1893
1897
|
}),
|
|
1894
1898
|
},
|
|
1895
1899
|
"svg",
|
|
@@ -2054,6 +2058,8 @@ var Marker = /*#__PURE__*/ (function (_BoundedObject) {
|
|
|
2054
2058
|
stack: undefined,
|
|
2055
2059
|
stackedX: undefined,
|
|
2056
2060
|
stackedY: undefined,
|
|
2061
|
+
rx: undefined,
|
|
2062
|
+
ry: undefined,
|
|
2057
2063
|
},
|
|
2058
2064
|
]),
|
|
2059
2065
|
);
|
|
@@ -2285,6 +2291,10 @@ var MarkerComponent = /*#__PURE__*/ (function (_VDOM$Component) {
|
|
|
2285
2291
|
widget.handleClick(e, instance);
|
|
2286
2292
|
},
|
|
2287
2293
|
};
|
|
2294
|
+
if (shape == "rect" || shape == "square" || shape == "bar" || shape == "column") {
|
|
2295
|
+
shapeProps.rx = data.rx;
|
|
2296
|
+
shapeProps.ry = data.ry;
|
|
2297
|
+
}
|
|
2288
2298
|
if (widget.tooltip) {
|
|
2289
2299
|
shapeProps.ref = function (c) {
|
|
2290
2300
|
_this3.el = c;
|
package/dist/data.js
CHANGED
|
@@ -1048,6 +1048,12 @@ var AugmentedViewBase = /*#__PURE__*/ (function (_View) {
|
|
|
1048
1048
|
_proto.isExtraKey = function isExtraKey(key) {
|
|
1049
1049
|
throw new Error("abstract");
|
|
1050
1050
|
};
|
|
1051
|
+
|
|
1052
|
+
// Stores which need to support nested aliases should override this method
|
|
1053
|
+
_proto.getExtraKeyBinding = function getExtraKeyBinding(key) {
|
|
1054
|
+
var binding = Binding.get(key);
|
|
1055
|
+
return this.isExtraKey(binding.parts[0]) ? Binding.get(binding.parts[0]) : null;
|
|
1056
|
+
};
|
|
1051
1057
|
_proto.setExtraKeyValue = function setExtraKeyValue(key, value) {
|
|
1052
1058
|
throw new Error("abstract");
|
|
1053
1059
|
};
|
|
@@ -1055,28 +1061,31 @@ var AugmentedViewBase = /*#__PURE__*/ (function (_View) {
|
|
|
1055
1061
|
throw new Error("abstract");
|
|
1056
1062
|
};
|
|
1057
1063
|
_proto.setItem = function setItem(path, value) {
|
|
1058
|
-
var
|
|
1059
|
-
if (
|
|
1060
|
-
var
|
|
1064
|
+
var extraKeyBinding = this.getExtraKeyBinding(path);
|
|
1065
|
+
if (extraKeyBinding) {
|
|
1066
|
+
var binding = Binding.get(path);
|
|
1061
1067
|
var newValue = value;
|
|
1062
|
-
if (binding.parts.length >
|
|
1068
|
+
if (binding.parts.length > extraKeyBinding.parts.length) {
|
|
1063
1069
|
var data = {};
|
|
1064
1070
|
this.embedAugmentData(data, this.store.getData());
|
|
1065
|
-
|
|
1071
|
+
var _binding = Binding.get(path);
|
|
1072
|
+
data = _binding.set(data, value);
|
|
1073
|
+
newValue = extraKeyBinding.value(data);
|
|
1066
1074
|
}
|
|
1067
|
-
return this.setExtraKeyValue(
|
|
1075
|
+
return this.setExtraKeyValue(extraKeyBinding.path, newValue);
|
|
1068
1076
|
}
|
|
1069
1077
|
return _View.prototype.setItem.call(this, path, value);
|
|
1070
1078
|
};
|
|
1071
1079
|
_proto.deleteItem = function deleteItem(path) {
|
|
1072
|
-
var
|
|
1073
|
-
if (
|
|
1074
|
-
|
|
1075
|
-
if (binding.parts.length == 1) return this.deleteExtraKeyValue(bindingRoot);
|
|
1080
|
+
var extraKeyBinding = this.getExtraKeyBinding(path);
|
|
1081
|
+
if (extraKeyBinding) {
|
|
1082
|
+
if (path == extraKeyBinding.path) return this.deleteExtraKeyValue(extraKeyBinding.path);
|
|
1076
1083
|
var data = {};
|
|
1077
1084
|
this.embedAugmentData(data, this.store.getData());
|
|
1078
|
-
var
|
|
1079
|
-
|
|
1085
|
+
var binding = Binding.get(path);
|
|
1086
|
+
data = binding["delete"](data);
|
|
1087
|
+
var newValue = extraKeyBinding.value(data);
|
|
1088
|
+
return this.setExtraKeyValue(extraKeyBinding.path, newValue);
|
|
1080
1089
|
}
|
|
1081
1090
|
return _View.prototype.deleteItem.call(this, path);
|
|
1082
1091
|
};
|
|
@@ -1958,13 +1967,24 @@ var StoreProxy = /*#__PURE__*/ (function (_View) {
|
|
|
1958
1967
|
})(View);
|
|
1959
1968
|
|
|
1960
1969
|
var ArrayElementView = /*#__PURE__*/ (function (_AugmentedViewBase) {
|
|
1961
|
-
function ArrayElementView() {
|
|
1962
|
-
|
|
1970
|
+
function ArrayElementView(config) {
|
|
1971
|
+
var _this;
|
|
1972
|
+
_this = _AugmentedViewBase.call(this, config) || this;
|
|
1973
|
+
_this.hasNestedAliases =
|
|
1974
|
+
_this.recordAlias.indexOf(".") >= 0 || _this.indexAlias.indexOf(".") >= 0 || _this.lengthAlias.indexOf(".") >= 0;
|
|
1975
|
+
_this.recordBinding = Binding.get(_this.recordAlias);
|
|
1976
|
+
if (_this.hasNestedAliases) {
|
|
1977
|
+
_this.indexBinding = Binding.get(_this.indexAlias);
|
|
1978
|
+
_this.lengthAlias = Binding.get(_this.lengthAlias);
|
|
1979
|
+
}
|
|
1980
|
+
return _this;
|
|
1963
1981
|
}
|
|
1964
1982
|
_inheritsLoose(ArrayElementView, _AugmentedViewBase);
|
|
1965
1983
|
var _proto = ArrayElementView.prototype;
|
|
1966
|
-
_proto.
|
|
1967
|
-
|
|
1984
|
+
_proto.getExtraKeyBinding = function getExtraKeyBinding(key) {
|
|
1985
|
+
if (!key.startsWith(this.recordAlias)) return null;
|
|
1986
|
+
if (key.length == this.recordAlias.length || key[this.recordAlias.length] == ".") return this.recordBinding;
|
|
1987
|
+
return null;
|
|
1968
1988
|
};
|
|
1969
1989
|
_proto.deleteExtraKeyValue = function deleteExtraKeyValue(key) {
|
|
1970
1990
|
if (key != this.recordAlias) throw new Error("Field " + key + " cannot be deleted.");
|
|
@@ -1983,9 +2003,19 @@ var ArrayElementView = /*#__PURE__*/ (function (_AugmentedViewBase) {
|
|
|
1983
2003
|
_proto.embedAugmentData = function embedAugmentData(result, parentStoreData) {
|
|
1984
2004
|
var array = this.arrayAccessor.get(parentStoreData);
|
|
1985
2005
|
if (!isArray(array)) return;
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
2006
|
+
if (!this.hasNestedAliases) {
|
|
2007
|
+
result[this.recordAlias] = array[this.itemIndex];
|
|
2008
|
+
result[this.indexAlias] = this.itemIndex;
|
|
2009
|
+
result[this.lengthAlias] = array.length;
|
|
2010
|
+
} else {
|
|
2011
|
+
var copy = result;
|
|
2012
|
+
copy = this.recordBinding.set(copy, array[this.itemIndex]);
|
|
2013
|
+
copy = this.indexBinding.set(copy, this.itemIndex);
|
|
2014
|
+
copy = this.lengthAlias.set(copy, array.length);
|
|
2015
|
+
result[this.recordBinding.parts[0]] = copy[this.recordBinding.parts[0]];
|
|
2016
|
+
result[this.indexBinding.parts[0]] = copy[this.indexBinding.parts[0]];
|
|
2017
|
+
result[this.lengthAlias.parts[0]] = copy[this.lengthAlias.parts[0]];
|
|
2018
|
+
}
|
|
1989
2019
|
};
|
|
1990
2020
|
_proto.setIndex = function setIndex(itemIndex) {
|
|
1991
2021
|
this.itemIndex = itemIndex;
|