cx 24.10.0 → 24.10.2
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 +9 -1
- package/dist/manifest.js +522 -522
- package/dist/util.js +7 -0
- package/dist/widgets.css +19 -16
- package/package.json +1 -1
- package/src/charts/Legend.js +1 -1
- package/src/charts/LegendEntry.js +9 -1
- package/src/charts/PieChart.d.ts +92 -89
- package/src/charts/PieChart.js +529 -527
- package/src/util/Format.js +269 -261
- package/src/widgets/grid/Grid.scss +637 -680
- package/src/widgets/grid/variables.scss +133 -88
package/dist/util.js
CHANGED
|
@@ -255,6 +255,12 @@ var formatFactory = {
|
|
|
255
255
|
return s.padStart(length, "0");
|
|
256
256
|
};
|
|
257
257
|
},
|
|
258
|
+
leftPad: function leftPad(part0, length, _char) {
|
|
259
|
+
return function (value) {
|
|
260
|
+
var s = String(value);
|
|
261
|
+
return s.padStart(length, _char != null ? _char : " ");
|
|
262
|
+
};
|
|
263
|
+
},
|
|
258
264
|
capitalize: function capitalize$1() {
|
|
259
265
|
return function (value) {
|
|
260
266
|
var s = String(value);
|
|
@@ -279,6 +285,7 @@ formatFactory.d = formatFactory.date;
|
|
|
279
285
|
formatFactory.t = formatFactory.time;
|
|
280
286
|
formatFactory.dt = formatFactory.datetime;
|
|
281
287
|
formatFactory.zeropad = formatFactory.zeroPad;
|
|
288
|
+
formatFactory.leftpad = formatFactory.leftPad;
|
|
282
289
|
formatFactory.capitalize = formatFactory.capitalize;
|
|
283
290
|
formatFactory.titlecase = formatFactory.titleCase;
|
|
284
291
|
function buildFormatter(format) {
|
package/dist/widgets.css
CHANGED
|
@@ -4899,54 +4899,57 @@ th.cxe-calendar-display {
|
|
|
4899
4899
|
.cxe-grid-group-caption:not(:first-child) td {
|
|
4900
4900
|
padding-top: 15px;
|
|
4901
4901
|
}
|
|
4902
|
+
|
|
4903
|
+
.cxe-grid-group-caption.cxs-level-1 {
|
|
4904
|
+
font-weight: bold;
|
|
4905
|
+
font-size: 115%;
|
|
4906
|
+
}
|
|
4907
|
+
|
|
4902
4908
|
.cxe-grid-group-caption.cxs-level-2 {
|
|
4909
|
+
font-weight: bold;
|
|
4903
4910
|
font-size: 130%;
|
|
4904
|
-
}
|
|
4905
|
-
.cxe-grid-group-caption.cxs-level-2 td {
|
|
4906
4911
|
border-bottom: 1px solid grey;
|
|
4907
4912
|
}
|
|
4913
|
+
|
|
4908
4914
|
.cxe-grid-group-caption.cxs-level-3 {
|
|
4915
|
+
font-weight: bold;
|
|
4909
4916
|
font-size: 145%;
|
|
4910
|
-
}
|
|
4911
|
-
.cxe-grid-group-caption.cxs-level-3 td {
|
|
4912
4917
|
border-bottom: 1px solid grey;
|
|
4913
4918
|
}
|
|
4919
|
+
|
|
4914
4920
|
.cxe-grid-group-caption.cxs-level-4 {
|
|
4921
|
+
font-weight: bold;
|
|
4915
4922
|
font-size: 160%;
|
|
4916
|
-
}
|
|
4917
|
-
.cxe-grid-group-caption.cxs-level-4 td {
|
|
4918
4923
|
border-bottom: 1px solid grey;
|
|
4919
4924
|
}
|
|
4920
4925
|
|
|
4921
|
-
.cxe-grid-group-footer {
|
|
4922
|
-
font-weight: bold;
|
|
4923
|
-
}
|
|
4924
4926
|
.cxe-grid-group-footer td {
|
|
4925
|
-
border-top: 1px solid #bfbfbf;
|
|
4926
4927
|
box-sizing: border-box;
|
|
4927
4928
|
}
|
|
4928
4929
|
.cxe-grid-group-footer td.cxs-pad {
|
|
4929
4930
|
padding: 5px;
|
|
4930
4931
|
}
|
|
4932
|
+
|
|
4933
|
+
.cxe-grid-group-footer.cxs-level-1 {
|
|
4934
|
+
font-weight: bold;
|
|
4935
|
+
border-top: 1px solid #bfbfbf;
|
|
4936
|
+
}
|
|
4937
|
+
|
|
4931
4938
|
.cxe-grid-group-footer.cxs-level-2 {
|
|
4932
4939
|
font-weight: bold;
|
|
4933
4940
|
font-size: 110%;
|
|
4934
|
-
}
|
|
4935
|
-
.cxe-grid-group-footer.cxs-level-2 td {
|
|
4936
4941
|
border-top: 1px solid grey;
|
|
4937
4942
|
}
|
|
4943
|
+
|
|
4938
4944
|
.cxe-grid-group-footer.cxs-level-3 {
|
|
4939
4945
|
font-weight: bold;
|
|
4940
4946
|
font-size: 120%;
|
|
4941
|
-
}
|
|
4942
|
-
.cxe-grid-group-footer.cxs-level-3 td {
|
|
4943
4947
|
border-top: 1px solid grey;
|
|
4944
4948
|
}
|
|
4949
|
+
|
|
4945
4950
|
.cxe-grid-group-footer.cxs-level-4 {
|
|
4946
4951
|
font-weight: bold;
|
|
4947
4952
|
font-size: 130%;
|
|
4948
|
-
}
|
|
4949
|
-
.cxe-grid-group-footer.cxs-level-4 td {
|
|
4950
4953
|
border-top: 1px solid grey;
|
|
4951
4954
|
}
|
|
4952
4955
|
|
package/package.json
CHANGED
package/src/charts/Legend.js
CHANGED
|
@@ -69,7 +69,15 @@ export class LegendEntry extends Container {
|
|
|
69
69
|
let { data } = instance;
|
|
70
70
|
let content = !isUndefined(this.text) ? data.text : this.renderChildren(context, instance);
|
|
71
71
|
return (
|
|
72
|
-
<div
|
|
72
|
+
<div
|
|
73
|
+
key={key}
|
|
74
|
+
className={data.classNames}
|
|
75
|
+
style={data.style}
|
|
76
|
+
onMouseDown={stopPropagation}
|
|
77
|
+
onClick={(e) => {
|
|
78
|
+
this.handleClick(e, instance);
|
|
79
|
+
}}
|
|
80
|
+
>
|
|
73
81
|
{this.renderShape(instance)}
|
|
74
82
|
{content != null && <div>{content}</div>}
|
|
75
83
|
</div>
|
package/src/charts/PieChart.d.ts
CHANGED
|
@@ -1,89 +1,92 @@
|
|
|
1
|
-
import * as Cx from "../core";
|
|
2
|
-
import { BoundedObject, BoundedObjectProps } from "../svg/BoundedObject";
|
|
3
|
-
import { PropertySelection, KeySelection } from "../ui/selection";
|
|
4
|
-
|
|
5
|
-
interface PieChartProps extends BoundedObjectProps {
|
|
6
|
-
/** Angle in degrees. Default is `360` which represents the full circle. */
|
|
7
|
-
angle?: Cx.NumberProp;
|
|
8
|
-
|
|
9
|
-
/** Start angle in degrees. Indicates the starting point of the first stack. Default is `0`. */
|
|
10
|
-
startAngle?: Cx.NumberProp;
|
|
11
|
-
|
|
12
|
-
/** When set to `true`, stacks are rendered in clock wise direction. */
|
|
13
|
-
clockwise?: Cx.BooleanProp;
|
|
14
|
-
|
|
15
|
-
/** Gap between slices in pixels. Default is `0` which means there is no gap. */
|
|
16
|
-
gap?: Cx.NumberProp;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export class PieChart extends Cx.Widget<PieChartProps> {}
|
|
20
|
-
|
|
21
|
-
interface PieSliceProps extends Cx.StyledContainerProps {
|
|
22
|
-
/** Used to indicate whether an item is active or not. Inactive items are shown only in the legend. */
|
|
23
|
-
active?: Cx.BooleanProp;
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Inner pie radius in percents of the maximum available radius.
|
|
27
|
-
* If `percentageRadius` flag is set to false, then the value represents the radius in pixels. Default is 0.
|
|
28
|
-
*/
|
|
29
|
-
r0?: Cx.NumberProp;
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Outer pie radius in percents of the maximum available radius.
|
|
33
|
-
* If `percentageRadius` flag is set to false, then the value represents the radius in pixels. Default is 50.
|
|
34
|
-
*/
|
|
35
|
-
r?: Cx.NumberProp;
|
|
36
|
-
|
|
37
|
-
/** Index of a color from the standard palette of colors. 0-15. */
|
|
38
|
-
colorIndex?: Cx.NumberProp;
|
|
39
|
-
|
|
40
|
-
/** Used to automatically assign a color based on the `name` and the contextual `ColorMap` widget. */
|
|
41
|
-
colorMap?: Cx.StringProp;
|
|
42
|
-
|
|
43
|
-
/** Name used to resolve the color. If not provided, `name` is used instead. */
|
|
44
|
-
colorName?: Cx.StringProp;
|
|
45
|
-
|
|
46
|
-
/** Value in pixels to be used to explode the pie. */
|
|
47
|
-
offset?: Cx.NumberProp;
|
|
48
|
-
|
|
49
|
-
value?: Cx.NumberProp;
|
|
50
|
-
disabled?: Cx.BooleanProp;
|
|
51
|
-
innerPointRadius?: Cx.NumberProp;
|
|
52
|
-
outerPointRadius?: Cx.NumberProp;
|
|
53
|
-
|
|
54
|
-
/** Name of the item as it will appear in the legend. */
|
|
55
|
-
name?: Cx.StringProp;
|
|
56
|
-
|
|
57
|
-
/** Multi-level pie charts consist of multiple stacks. Assign a unique name to each level. Default is `stack`. */
|
|
58
|
-
stack?: Cx.StringProp;
|
|
59
|
-
|
|
60
|
-
/** Name of the legend to be used. Default is `legend`. */
|
|
61
|
-
legend?: Cx.StringProp;
|
|
62
|
-
|
|
63
|
-
percentageRaidus?: boolean;
|
|
64
|
-
|
|
65
|
-
/** Base CSS class to be applied to the element. Defaults to `pieslice`. */
|
|
66
|
-
baseClass?: string;
|
|
67
|
-
|
|
68
|
-
legendAction?: string;
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
/** A value used to
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
/** Border radius of the slice. Default is 0. */
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
1
|
+
import * as Cx from "../core";
|
|
2
|
+
import { BoundedObject, BoundedObjectProps } from "../svg/BoundedObject";
|
|
3
|
+
import { PropertySelection, KeySelection } from "../ui/selection";
|
|
4
|
+
|
|
5
|
+
interface PieChartProps extends BoundedObjectProps {
|
|
6
|
+
/** Angle in degrees. Default is `360` which represents the full circle. */
|
|
7
|
+
angle?: Cx.NumberProp;
|
|
8
|
+
|
|
9
|
+
/** Start angle in degrees. Indicates the starting point of the first stack. Default is `0`. */
|
|
10
|
+
startAngle?: Cx.NumberProp;
|
|
11
|
+
|
|
12
|
+
/** When set to `true`, stacks are rendered in clock wise direction. */
|
|
13
|
+
clockwise?: Cx.BooleanProp;
|
|
14
|
+
|
|
15
|
+
/** Gap between slices in pixels. Default is `0` which means there is no gap. */
|
|
16
|
+
gap?: Cx.NumberProp;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export class PieChart extends Cx.Widget<PieChartProps> {}
|
|
20
|
+
|
|
21
|
+
interface PieSliceProps extends Cx.StyledContainerProps {
|
|
22
|
+
/** Used to indicate whether an item is active or not. Inactive items are shown only in the legend. */
|
|
23
|
+
active?: Cx.BooleanProp;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Inner pie radius in percents of the maximum available radius.
|
|
27
|
+
* If `percentageRadius` flag is set to false, then the value represents the radius in pixels. Default is 0.
|
|
28
|
+
*/
|
|
29
|
+
r0?: Cx.NumberProp;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Outer pie radius in percents of the maximum available radius.
|
|
33
|
+
* If `percentageRadius` flag is set to false, then the value represents the radius in pixels. Default is 50.
|
|
34
|
+
*/
|
|
35
|
+
r?: Cx.NumberProp;
|
|
36
|
+
|
|
37
|
+
/** Index of a color from the standard palette of colors. 0-15. */
|
|
38
|
+
colorIndex?: Cx.NumberProp;
|
|
39
|
+
|
|
40
|
+
/** Used to automatically assign a color based on the `name` and the contextual `ColorMap` widget. */
|
|
41
|
+
colorMap?: Cx.StringProp;
|
|
42
|
+
|
|
43
|
+
/** Name used to resolve the color. If not provided, `name` is used instead. */
|
|
44
|
+
colorName?: Cx.StringProp;
|
|
45
|
+
|
|
46
|
+
/** Value in pixels to be used to explode the pie. */
|
|
47
|
+
offset?: Cx.NumberProp;
|
|
48
|
+
|
|
49
|
+
value?: Cx.NumberProp;
|
|
50
|
+
disabled?: Cx.BooleanProp;
|
|
51
|
+
innerPointRadius?: Cx.NumberProp;
|
|
52
|
+
outerPointRadius?: Cx.NumberProp;
|
|
53
|
+
|
|
54
|
+
/** Name of the item as it will appear in the legend. */
|
|
55
|
+
name?: Cx.StringProp;
|
|
56
|
+
|
|
57
|
+
/** Multi-level pie charts consist of multiple stacks. Assign a unique name to each level. Default is `stack`. */
|
|
58
|
+
stack?: Cx.StringProp;
|
|
59
|
+
|
|
60
|
+
/** Name of the legend to be used. Default is `legend`. */
|
|
61
|
+
legend?: Cx.StringProp;
|
|
62
|
+
|
|
63
|
+
percentageRaidus?: boolean;
|
|
64
|
+
|
|
65
|
+
/** Base CSS class to be applied to the element. Defaults to `pieslice`. */
|
|
66
|
+
baseClass?: string;
|
|
67
|
+
|
|
68
|
+
legendAction?: string;
|
|
69
|
+
|
|
70
|
+
/** Text to be displayed in the legend. The default is copying the `name` value. */
|
|
71
|
+
legendDisplayText?: Cx.StringProp;
|
|
72
|
+
|
|
73
|
+
/** Tooltip configuration. For more info see Tooltips. */
|
|
74
|
+
tooltip?: Cx.StringProp | Cx.StructuredProp;
|
|
75
|
+
|
|
76
|
+
/** Selection configuration. */
|
|
77
|
+
selection?: { type: typeof PropertySelection | typeof KeySelection; [prop: string]: any };
|
|
78
|
+
|
|
79
|
+
/** A value used to identify the group of components participating in hover effect synchronization. */
|
|
80
|
+
hoverChannel?: string;
|
|
81
|
+
|
|
82
|
+
/** A value used to uniquely identify the record within the hover sync group. */
|
|
83
|
+
hoverId?: Cx.StringProp;
|
|
84
|
+
|
|
85
|
+
/** Border radius of the slice. Default is 0. */
|
|
86
|
+
borderRadius?: Cx.NumberProp;
|
|
87
|
+
|
|
88
|
+
/** Border radius of the slice. Default is 0. */
|
|
89
|
+
br?: Cx.NumberProp;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export class PieSlice extends Cx.Widget<PieSliceProps> {}
|