cx 23.4.4 → 23.5.0
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 +16 -4
- package/dist/data.js +2 -9
- package/dist/manifest.js +709 -709
- package/dist/widgets.js +33 -11
- package/package.json +1 -1
- package/src/charts/Legend.d.ts +13 -13
- package/src/charts/Legend.js +11 -5
- package/src/charts/PieChart.js +16 -18
- package/src/data/Binding.js +2 -12
- package/src/data/Binding.spec.js +48 -38
- package/src/data/createAccessorModelProxy.spec.tsx +6 -0
- package/src/ui/Restate.js +158 -158
- package/src/widgets/form/DateTimeField.d.ts +86 -83
- package/src/widgets/form/DateTimeField.js +572 -571
- package/src/widgets/grid/Grid.js +22 -11
package/dist/charts.js
CHANGED
|
@@ -902,7 +902,7 @@ PieSlice.prototype.legend = "legend";
|
|
|
902
902
|
PieSlice.prototype.active = true;
|
|
903
903
|
PieSlice.prototype.stack = "stack";
|
|
904
904
|
PieSlice.prototype.legendAction = "auto";
|
|
905
|
-
PieSlice.prototype.legendShape = "
|
|
905
|
+
PieSlice.prototype.legendShape = "circle";
|
|
906
906
|
PieSlice.prototype.hoverChannel = "default";
|
|
907
907
|
PieSlice.prototype.styled = true;
|
|
908
908
|
Widget.alias("pie-chart", PieChart);
|
|
@@ -1544,6 +1544,17 @@ var Legend = /*#__PURE__*/ (function (_HtmlElement) {
|
|
|
1544
1544
|
});
|
|
1545
1545
|
_HtmlElement.prototype.prepareData.call(this, context, instance);
|
|
1546
1546
|
};
|
|
1547
|
+
_proto.declareData = function declareData() {
|
|
1548
|
+
var _HtmlElement$prototyp;
|
|
1549
|
+
(_HtmlElement$prototyp = _HtmlElement.prototype.declareData).call.apply(
|
|
1550
|
+
_HtmlElement$prototyp,
|
|
1551
|
+
[this].concat(Array.prototype.slice.call(arguments), [
|
|
1552
|
+
{
|
|
1553
|
+
shape: undefined,
|
|
1554
|
+
},
|
|
1555
|
+
])
|
|
1556
|
+
);
|
|
1557
|
+
};
|
|
1547
1558
|
_proto.isValidHtmlAttribute = function isValidHtmlAttribute(attrName) {
|
|
1548
1559
|
switch (attrName) {
|
|
1549
1560
|
case "shapeSize":
|
|
@@ -1599,7 +1610,7 @@ var Legend = /*#__PURE__*/ (function (_HtmlElement) {
|
|
|
1599
1610
|
onClick: e.onClick,
|
|
1600
1611
|
onMouseMove: onMouseMove,
|
|
1601
1612
|
onMouseLeave: onMouseLeave,
|
|
1602
|
-
children: [_this.renderShape(e), e.name],
|
|
1613
|
+
children: [_this.renderShape(e, instance.data.shape), e.name],
|
|
1603
1614
|
},
|
|
1604
1615
|
i
|
|
1605
1616
|
);
|
|
@@ -1611,7 +1622,7 @@ var Legend = /*#__PURE__*/ (function (_HtmlElement) {
|
|
|
1611
1622
|
}
|
|
1612
1623
|
return [list, _HtmlElement.prototype.renderChildren.call(this, context, instance)];
|
|
1613
1624
|
};
|
|
1614
|
-
_proto.renderShape = function renderShape(entry) {
|
|
1625
|
+
_proto.renderShape = function renderShape(entry, legendEntriesShape) {
|
|
1615
1626
|
var _this$CSS$element;
|
|
1616
1627
|
var className = this.CSS.element(
|
|
1617
1628
|
this.baseClass,
|
|
@@ -1621,7 +1632,7 @@ var Legend = /*#__PURE__*/ (function (_HtmlElement) {
|
|
|
1621
1632
|
entry.colorIndex != null && (isUndefined(entry.active) || entry.active)),
|
|
1622
1633
|
_this$CSS$element)
|
|
1623
1634
|
);
|
|
1624
|
-
var shape = getShape(entry.shape || "square");
|
|
1635
|
+
var shape = getShape(legendEntriesShape || entry.shape || "square");
|
|
1625
1636
|
return /*#__PURE__*/ jsx("svg", {
|
|
1626
1637
|
className: this.CSS.element(this.baseClass, "svg"),
|
|
1627
1638
|
style: {
|
|
@@ -1642,6 +1653,7 @@ Legend.prototype.baseClass = "legend";
|
|
|
1642
1653
|
Legend.prototype.vertical = false;
|
|
1643
1654
|
Legend.prototype.memoize = false;
|
|
1644
1655
|
Legend.prototype.shapeSize = 18;
|
|
1656
|
+
Legend.prototype.shape = null;
|
|
1645
1657
|
Legend.prototype.svgSize = 20;
|
|
1646
1658
|
Widget.alias("legend", Legend);
|
|
1647
1659
|
Legend.Scope = /*#__PURE__*/ (function (_PureContainer) {
|
package/dist/data.js
CHANGED
|
@@ -57,15 +57,8 @@ var Binding = /*#__PURE__*/ (function () {
|
|
|
57
57
|
function Binding(path) {
|
|
58
58
|
this.path = path;
|
|
59
59
|
this.parts = path.split(".");
|
|
60
|
-
var body = "return
|
|
61
|
-
var
|
|
62
|
-
for (var i = 0; i < this.parts.length; i++) {
|
|
63
|
-
if (this.parts[i][0] >= "0" && this.parts[i][0] <= "9") selector += "[" + this.parts[i] + "]";
|
|
64
|
-
else selector += "." + this.parts[i];
|
|
65
|
-
if (i + 1 < this.parts.length) body += " && " + selector;
|
|
66
|
-
else body += " ? " + selector + " : undefined";
|
|
67
|
-
}
|
|
68
|
-
body += ")";
|
|
60
|
+
var body = "return x";
|
|
61
|
+
for (var i = 0; i < this.parts.length; i++) body += '?.["' + this.parts[i] + '"]';
|
|
69
62
|
this.value = new Function("x", body);
|
|
70
63
|
}
|
|
71
64
|
var _proto = Binding.prototype;
|