cx 24.7.1 → 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.
Files changed (41) hide show
  1. package/dist/charts.js +10 -0
  2. package/dist/data.js +49 -19
  3. package/dist/manifest.js +731 -731
  4. package/dist/svg.js +6 -0
  5. package/dist/ui.js +3 -3
  6. package/package.json +1 -1
  7. package/src/charts/Legend.js +151 -151
  8. package/src/charts/LegendEntry.d.ts +17 -3
  9. package/src/charts/LegendEntry.js +4 -0
  10. package/src/charts/Marker.d.ts +14 -0
  11. package/src/charts/Marker.js +8 -0
  12. package/src/charts/PieLabel.js +71 -71
  13. package/src/charts/axis/Axis.d.ts +96 -96
  14. package/src/charts/axis/NumericAxis.js +347 -347
  15. package/src/charts/axis/Stack.js +55 -55
  16. package/src/data/ArrayElementView.js +37 -19
  17. package/src/data/ArrayElementView.spec.js +18 -0
  18. package/src/data/AugmentedViewBase.js +22 -14
  19. package/src/data/Binding.spec.js +69 -69
  20. package/src/data/StringTemplate.spec.js +105 -105
  21. package/src/data/getAccessor.spec.js +11 -11
  22. package/src/svg/Rectangle.d.ts +20 -7
  23. package/src/svg/Rectangle.js +7 -2
  24. package/src/svg/Text.d.ts +40 -40
  25. package/src/ui/Controller.d.ts +182 -182
  26. package/src/ui/Culture.js +129 -129
  27. package/src/ui/Cx.js +313 -313
  28. package/src/ui/DataProxy.spec.js +26 -23
  29. package/src/ui/FocusManager.js +171 -171
  30. package/src/ui/Instance.d.ts +72 -72
  31. package/src/ui/VDOM.d.ts +12 -12
  32. package/src/ui/app/startAppLoop.js +58 -58
  33. package/src/ui/index.d.ts +42 -42
  34. package/src/util/Console.d.ts +4 -4
  35. package/src/widgets/drag-drop/DropZone.js +214 -214
  36. package/src/widgets/form/TextField.js +289 -289
  37. package/src/widgets/form/UploadButton.d.ts +34 -34
  38. package/src/widgets/grid/variables.scss +88 -88
  39. package/src/widgets/overlay/Dropdown.js +612 -612
  40. package/src/widgets/overlay/Window.js +196 -196
  41. package/src/widgets/overlay/variables.scss +83 -83
@@ -1,96 +1,96 @@
1
- import { Instance } from "./../../ui/Instance.d";
2
- import * as Cx from "../../core";
3
- import { BoundedObject, BoundedObjectProps } from "../../svg/BoundedObject";
4
-
5
- export interface AxisProps extends BoundedObjectProps {
6
- /** Set to `true` for vertical axes. */
7
- vertical?: boolean;
8
-
9
- /** Used as a secondary axis. Displayed at the top/right. */
10
- secondary?: boolean;
11
-
12
- /** When set to `true`, the values are displayed in descending order. */
13
- inverted?: Cx.BooleanProp;
14
-
15
- /** When set to `true`, rendering of visual elements of the axis, such as ticks and labels, is skipped, but their function is preserved. */
16
- hidden?: boolean;
17
-
18
- tickSize?: number;
19
- minTickDistance?: number;
20
- minLabelDistanceVertical?: number;
21
- minLabelDistanceHorizontal?: number;
22
-
23
- /** Distance between labels and the axis. */
24
- labelOffset?: number | string;
25
-
26
- /** Label rotation angle in degrees. */
27
- labelRotation?: Cx.Prop<number | string>;
28
-
29
- /** Label text-anchor value. Allowed values are start, end and middle. Default value is set based on the value of vertical and secondary flags. */
30
- labelAnchor?: "start" | "end" | "middle" | "auto";
31
-
32
- /** Horizontal text offset. */
33
- labelDx?: number | string;
34
-
35
- /** Vertical text offset which can be used for vertical alignment. */
36
- labelDy?: number | string;
37
-
38
- /** Set to `true` to break long labels into multiple lines. Default value is `false`. Text is split at space characters. See also `labelMaxLineLength` and `labelLineCountDyFactor`. */
39
- labelWrap?: boolean;
40
-
41
- /**
42
- * Used for vertical adjustment of multi-line labels. Default value is `auto` which means
43
- * that value is initialized based on axis configuration. Value `0` means that label will grow towards
44
- * the bottom of the screen. Value `-1` will make labels to grow towards the top of the screen.
45
- * `-0.5` will make labels vertically centered.
46
- */
47
- labelLineCountDyFactor?: number | string;
48
-
49
- /**
50
- * Used for vertical adjustment of multi-line labels. Default value is 1 which means
51
- * that labels are stacked without any space between them. Value of 1.4 will add 40% of the label height as a space between labels.
52
- */
53
- labelLineHeight?: number | string;
54
-
55
- /** If `labelWrap` is on, this number is used as a measure to split labels into multiple lines. Default value is `10`. */
56
- labelMaxLineLength?: number;
57
-
58
- /** Set to true to hide the axis labels. */
59
- hideLabels?: boolean;
60
-
61
- /** Set to true to hide the axis line. */
62
- hideLine?: boolean;
63
-
64
- /** Set to true to hide the axis ticks. */
65
- hideTicks?: boolean;
66
-
67
- /** Additional CSS style to be applied to the axis line. */
68
- lineStyle?: Cx.StyleProp;
69
-
70
- /** Additional CSS style to be applied to the axis ticks. */
71
- tickStyle?: Cx.StyleProp;
72
-
73
- /** Additional CSS style to be applied to the axis labels. */
74
- labelStyle?: Cx.StyleProp;
75
-
76
- /** Additional CSS class to be applied to the axis line. */
77
- lineClass?: Cx.ClassProp;
78
-
79
- /** Additional CSS class to be applied to the axis ticks. */
80
- tickClass?: Cx.ClassProp;
81
-
82
- /** Additional CSS class to be applied to the axis labels. */
83
- labelClass?: Cx.ClassProp;
84
-
85
- onMeasured?: (info: any, instance: Instance) => void;
86
-
87
- /** A function used to create a formatter function for axis labels. See Complex Labels example in the CxJS documentation for more info. */
88
- onCreateLabelFormatter?:
89
- | string
90
- | ((
91
- context: any,
92
- instance: Instance
93
- ) => (formattedValue: string, value: any) => { text: string; style?: any; className?: string }[]);
94
- }
95
-
96
- export class Axis extends BoundedObject {}
1
+ import { Instance } from "./../../ui/Instance.d";
2
+ import * as Cx from "../../core";
3
+ import { BoundedObject, BoundedObjectProps } from "../../svg/BoundedObject";
4
+
5
+ export interface AxisProps extends BoundedObjectProps {
6
+ /** Set to `true` for vertical axes. */
7
+ vertical?: boolean;
8
+
9
+ /** Used as a secondary axis. Displayed at the top/right. */
10
+ secondary?: boolean;
11
+
12
+ /** When set to `true`, the values are displayed in descending order. */
13
+ inverted?: Cx.BooleanProp;
14
+
15
+ /** When set to `true`, rendering of visual elements of the axis, such as ticks and labels, is skipped, but their function is preserved. */
16
+ hidden?: boolean;
17
+
18
+ tickSize?: number;
19
+ minTickDistance?: number;
20
+ minLabelDistanceVertical?: number;
21
+ minLabelDistanceHorizontal?: number;
22
+
23
+ /** Distance between labels and the axis. */
24
+ labelOffset?: number | string;
25
+
26
+ /** Label rotation angle in degrees. */
27
+ labelRotation?: Cx.Prop<number | string>;
28
+
29
+ /** Label text-anchor value. Allowed values are start, end and middle. Default value is set based on the value of vertical and secondary flags. */
30
+ labelAnchor?: "start" | "end" | "middle" | "auto";
31
+
32
+ /** Horizontal text offset. */
33
+ labelDx?: number | string;
34
+
35
+ /** Vertical text offset which can be used for vertical alignment. */
36
+ labelDy?: number | string;
37
+
38
+ /** Set to `true` to break long labels into multiple lines. Default value is `false`. Text is split at space characters. See also `labelMaxLineLength` and `labelLineCountDyFactor`. */
39
+ labelWrap?: boolean;
40
+
41
+ /**
42
+ * Used for vertical adjustment of multi-line labels. Default value is `auto` which means
43
+ * that value is initialized based on axis configuration. Value `0` means that label will grow towards
44
+ * the bottom of the screen. Value `-1` will make labels to grow towards the top of the screen.
45
+ * `-0.5` will make labels vertically centered.
46
+ */
47
+ labelLineCountDyFactor?: number | string;
48
+
49
+ /**
50
+ * Used for vertical adjustment of multi-line labels. Default value is 1 which means
51
+ * that labels are stacked without any space between them. Value of 1.4 will add 40% of the label height as a space between labels.
52
+ */
53
+ labelLineHeight?: number | string;
54
+
55
+ /** If `labelWrap` is on, this number is used as a measure to split labels into multiple lines. Default value is `10`. */
56
+ labelMaxLineLength?: number;
57
+
58
+ /** Set to true to hide the axis labels. */
59
+ hideLabels?: boolean;
60
+
61
+ /** Set to true to hide the axis line. */
62
+ hideLine?: boolean;
63
+
64
+ /** Set to true to hide the axis ticks. */
65
+ hideTicks?: boolean;
66
+
67
+ /** Additional CSS style to be applied to the axis line. */
68
+ lineStyle?: Cx.StyleProp;
69
+
70
+ /** Additional CSS style to be applied to the axis ticks. */
71
+ tickStyle?: Cx.StyleProp;
72
+
73
+ /** Additional CSS style to be applied to the axis labels. */
74
+ labelStyle?: Cx.StyleProp;
75
+
76
+ /** Additional CSS class to be applied to the axis line. */
77
+ lineClass?: Cx.ClassProp;
78
+
79
+ /** Additional CSS class to be applied to the axis ticks. */
80
+ tickClass?: Cx.ClassProp;
81
+
82
+ /** Additional CSS class to be applied to the axis labels. */
83
+ labelClass?: Cx.ClassProp;
84
+
85
+ onMeasured?: (info: any, instance: Instance) => void;
86
+
87
+ /** A function used to create a formatter function for axis labels. See Complex Labels example in the CxJS documentation for more info. */
88
+ onCreateLabelFormatter?:
89
+ | string
90
+ | ((
91
+ context: any,
92
+ instance: Instance
93
+ ) => (formattedValue: string, value: any) => { text: string; style?: any; className?: string }[]);
94
+ }
95
+
96
+ export class Axis extends BoundedObject {}