cx 24.3.1 → 24.3.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.css +5 -0
- package/dist/charts.js +130 -0
- package/dist/manifest.js +750 -746
- package/dist/util.js +4 -2
- package/dist/widgets.js +23 -9
- package/package.json +1 -1
- package/src/charts/Swimlanes.d.ts +41 -0
- package/src/charts/Swimlanes.js +112 -0
- package/src/charts/Swimlanes.scss +14 -0
- package/src/charts/axis/Axis.d.ts +96 -96
- package/src/charts/axis/Axis.js +252 -252
- package/src/charts/index.d.ts +24 -23
- package/src/charts/index.js +1 -0
- package/src/charts/index.scss +17 -17
- package/src/charts/variables.scss +19 -13
- package/src/data/StringTemplate.spec.js +105 -105
- package/src/ui/Controller.d.ts +182 -182
- package/src/ui/FocusManager.js +171 -171
- package/src/ui/Instance.d.ts +72 -72
- package/src/util/getParentFrameBoundingClientRect.js +6 -4
- package/src/widgets/form/Label.js +88 -88
- package/src/widgets/form/UploadButton.d.ts +34 -34
- package/src/widgets/grid/Grid.js +27 -15
- package/src/widgets/overlay/captureMouse.js +124 -124
package/dist/charts.css
CHANGED
package/dist/charts.js
CHANGED
|
@@ -2588,6 +2588,135 @@ Gridlines.prototype.anchors = "0 1 1 0";
|
|
|
2588
2588
|
Gridlines.prototype.baseClass = "gridlines";
|
|
2589
2589
|
BoundedObject.alias("gridlines", Gridlines);
|
|
2590
2590
|
|
|
2591
|
+
var Swimlanes = /*#__PURE__*/ (function (_BoundedObject) {
|
|
2592
|
+
_inheritsLoose(Swimlanes, _BoundedObject);
|
|
2593
|
+
function Swimlanes() {
|
|
2594
|
+
return _BoundedObject.apply(this, arguments) || this;
|
|
2595
|
+
}
|
|
2596
|
+
var _proto = Swimlanes.prototype;
|
|
2597
|
+
_proto.init = function init() {
|
|
2598
|
+
this.laneStyle = parseStyle(this.laneStyle);
|
|
2599
|
+
_BoundedObject.prototype.init.call(this);
|
|
2600
|
+
};
|
|
2601
|
+
_proto.declareData = function declareData() {
|
|
2602
|
+
var _BoundedObject$protot;
|
|
2603
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
2604
|
+
args[_key] = arguments[_key];
|
|
2605
|
+
}
|
|
2606
|
+
(_BoundedObject$protot = _BoundedObject.prototype.declareData).call.apply(
|
|
2607
|
+
_BoundedObject$protot,
|
|
2608
|
+
[this].concat(args, [
|
|
2609
|
+
{
|
|
2610
|
+
size: undefined,
|
|
2611
|
+
step: undefined,
|
|
2612
|
+
laneOffset: undefined,
|
|
2613
|
+
laneStyle: {
|
|
2614
|
+
structured: true,
|
|
2615
|
+
},
|
|
2616
|
+
},
|
|
2617
|
+
]),
|
|
2618
|
+
);
|
|
2619
|
+
};
|
|
2620
|
+
_proto.explore = function explore(context, instance) {
|
|
2621
|
+
_BoundedObject.prototype.explore.call(this, context, instance);
|
|
2622
|
+
instance.xAxis = context.axes[this.xAxis];
|
|
2623
|
+
instance.yAxis = context.axes[this.yAxis];
|
|
2624
|
+
};
|
|
2625
|
+
_proto.prepare = function prepare(context, instance) {
|
|
2626
|
+
_BoundedObject.prototype.prepare.call(this, context, instance);
|
|
2627
|
+
var xAxis = instance.xAxis,
|
|
2628
|
+
yAxis = instance.yAxis;
|
|
2629
|
+
if ((xAxis && xAxis.shouldUpdate) || (yAxis && yAxis.shouldUpdate)) instance.markShouldUpdate(context);
|
|
2630
|
+
};
|
|
2631
|
+
_proto.render = function render(context, instance, key) {
|
|
2632
|
+
var data = instance.data,
|
|
2633
|
+
xAxis = instance.xAxis,
|
|
2634
|
+
yAxis = instance.yAxis;
|
|
2635
|
+
var bounds = data.bounds;
|
|
2636
|
+
var CSS = this.CSS,
|
|
2637
|
+
baseClass = this.baseClass;
|
|
2638
|
+
var axis = this.vertical ? xAxis : yAxis;
|
|
2639
|
+
if (!axis) return null;
|
|
2640
|
+
var min, max, valueFunction;
|
|
2641
|
+
if (axis.scale) {
|
|
2642
|
+
min = axis.scale.min;
|
|
2643
|
+
max = axis.scale.max;
|
|
2644
|
+
var clamp = function clamp(value) {
|
|
2645
|
+
return [Math.max(min, Math.min(max, value)), 0];
|
|
2646
|
+
};
|
|
2647
|
+
valueFunction = function valueFunction(value, offset) {
|
|
2648
|
+
return clamp(value + offset);
|
|
2649
|
+
};
|
|
2650
|
+
} else if (axis.valueList) {
|
|
2651
|
+
min = 0;
|
|
2652
|
+
max = axis.valueList.length;
|
|
2653
|
+
valueFunction = function valueFunction(value, offset) {
|
|
2654
|
+
return [axis.valueList[value], offset];
|
|
2655
|
+
};
|
|
2656
|
+
}
|
|
2657
|
+
if (!(min < max)) return null;
|
|
2658
|
+
var rects = [];
|
|
2659
|
+
var at = Math.ceil(min / data.step) * data.step;
|
|
2660
|
+
var index = 0;
|
|
2661
|
+
var rectClass = CSS.element(baseClass, "lane");
|
|
2662
|
+
while (at - data.size / 2 < max) {
|
|
2663
|
+
var c1 = axis.map.apply(axis, valueFunction(at, -data.size / 2 + data.laneOffset));
|
|
2664
|
+
var c2 = axis.map.apply(axis, valueFunction(at, +data.size / 2 + data.laneOffset));
|
|
2665
|
+
if (this.vertical) {
|
|
2666
|
+
rects.push(
|
|
2667
|
+
/*#__PURE__*/ jsx(
|
|
2668
|
+
"rect",
|
|
2669
|
+
{
|
|
2670
|
+
y: bounds.t,
|
|
2671
|
+
x: Math.min(c1, c2),
|
|
2672
|
+
height: bounds.b - bounds.t,
|
|
2673
|
+
width: Math.abs(c1 - c2),
|
|
2674
|
+
className: rectClass,
|
|
2675
|
+
style: data.laneStyle,
|
|
2676
|
+
},
|
|
2677
|
+
index++,
|
|
2678
|
+
),
|
|
2679
|
+
);
|
|
2680
|
+
} else {
|
|
2681
|
+
rects.push(
|
|
2682
|
+
/*#__PURE__*/ jsx(
|
|
2683
|
+
"rect",
|
|
2684
|
+
{
|
|
2685
|
+
x: bounds.l,
|
|
2686
|
+
y: Math.min(c1, c2),
|
|
2687
|
+
width: bounds.r - bounds.l,
|
|
2688
|
+
height: Math.abs(c1 - c2),
|
|
2689
|
+
className: rectClass,
|
|
2690
|
+
style: data.laneStyle,
|
|
2691
|
+
},
|
|
2692
|
+
index++,
|
|
2693
|
+
),
|
|
2694
|
+
);
|
|
2695
|
+
}
|
|
2696
|
+
at += data.step;
|
|
2697
|
+
}
|
|
2698
|
+
return /*#__PURE__*/ jsx(
|
|
2699
|
+
"g",
|
|
2700
|
+
{
|
|
2701
|
+
className: data.classNames,
|
|
2702
|
+
children: rects,
|
|
2703
|
+
},
|
|
2704
|
+
key,
|
|
2705
|
+
);
|
|
2706
|
+
};
|
|
2707
|
+
return Swimlanes;
|
|
2708
|
+
})(BoundedObject);
|
|
2709
|
+
Swimlanes.prototype.xAxis = "x";
|
|
2710
|
+
Swimlanes.prototype.yAxis = "y";
|
|
2711
|
+
Swimlanes.prototype.anchors = "0 1 1 0";
|
|
2712
|
+
Swimlanes.prototype.baseClass = "swimlanes";
|
|
2713
|
+
Swimlanes.prototype.size = 0.5;
|
|
2714
|
+
Swimlanes.prototype.laneOffset = 0;
|
|
2715
|
+
Swimlanes.prototype.step = 1;
|
|
2716
|
+
Swimlanes.prototype.vertical = false;
|
|
2717
|
+
Swimlanes.prototype.styled = true;
|
|
2718
|
+
BoundedObject.alias("swimlanes", Swimlanes);
|
|
2719
|
+
|
|
2591
2720
|
var LineGraph = /*#__PURE__*/ (function (_Widget) {
|
|
2592
2721
|
_inheritsLoose(LineGraph, _Widget);
|
|
2593
2722
|
function LineGraph() {
|
|
@@ -4840,6 +4969,7 @@ export {
|
|
|
4840
4969
|
Range,
|
|
4841
4970
|
ScatterGraph,
|
|
4842
4971
|
SnapPointFinder,
|
|
4972
|
+
Swimlanes,
|
|
4843
4973
|
TimeAxis,
|
|
4844
4974
|
ValueAtFinder,
|
|
4845
4975
|
bar,
|