@pie-lib/charting 5.17.0-beta.0 → 5.18.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.
Files changed (102) hide show
  1. package/CHANGELOG.json +1 -581
  2. package/CHANGELOG.md +141 -43
  3. package/lib/actions-button.js +174 -0
  4. package/lib/actions-button.js.map +1 -0
  5. package/lib/axes.js +52 -81
  6. package/lib/axes.js.map +1 -0
  7. package/lib/bars/bar.js +1 -1
  8. package/lib/bars/bar.js.map +1 -0
  9. package/lib/bars/common/bars.js +11 -13
  10. package/lib/bars/common/bars.js.map +1 -0
  11. package/lib/bars/histogram.js +1 -1
  12. package/lib/bars/histogram.js.map +1 -0
  13. package/lib/chart-setup.js +3 -3
  14. package/lib/chart-setup.js.map +1 -0
  15. package/lib/chart-type.js +1 -1
  16. package/lib/chart-type.js.map +1 -0
  17. package/lib/chart-types.js +1 -1
  18. package/lib/chart-types.js.map +1 -0
  19. package/lib/chart.js +67 -58
  20. package/lib/chart.js.map +1 -0
  21. package/lib/common/drag-handle.js +4 -4
  22. package/lib/common/drag-handle.js.map +1 -0
  23. package/lib/common/drag-icon.js +1 -1
  24. package/lib/common/drag-icon.js.map +1 -0
  25. package/lib/common/styles.js +5 -5
  26. package/lib/common/styles.js.map +1 -0
  27. package/lib/grid.js +50 -13
  28. package/lib/grid.js.map +1 -0
  29. package/lib/index.js +9 -1
  30. package/lib/index.js.map +1 -0
  31. package/lib/key-legend.js +111 -0
  32. package/lib/key-legend.js.map +1 -0
  33. package/lib/line/common/drag-handle.js +5 -11
  34. package/lib/line/common/drag-handle.js.map +1 -0
  35. package/lib/line/common/line.js +4 -8
  36. package/lib/line/common/line.js.map +1 -0
  37. package/lib/line/line-cross.js +40 -5
  38. package/lib/line/line-cross.js.map +1 -0
  39. package/lib/line/line-dot.js +32 -7
  40. package/lib/line/line-dot.js.map +1 -0
  41. package/lib/mark-label.js +11 -6
  42. package/lib/mark-label.js.map +1 -0
  43. package/lib/plot/common/plot.js +10 -9
  44. package/lib/plot/common/plot.js.map +1 -0
  45. package/lib/plot/dot.js +1 -1
  46. package/lib/plot/dot.js.map +1 -0
  47. package/lib/plot/line.js +1 -1
  48. package/lib/plot/line.js.map +1 -0
  49. package/lib/shared/index.js +136 -0
  50. package/lib/tool-menu.js +10 -10
  51. package/lib/tool-menu.js.map +1 -0
  52. package/lib/utils.js +1 -1
  53. package/lib/utils.js.map +1 -0
  54. package/package.json +5 -5
  55. package/src/__tests__/__snapshots__/axes.test.jsx.snap +1 -0
  56. package/src/__tests__/__snapshots__/chart.test.jsx.snap +0 -18
  57. package/src/__tests__/__snapshots__/grid.test.jsx.snap +61 -17
  58. package/src/__tests__/axes.test.jsx +0 -5
  59. package/src/__tests__/chart.test.jsx +8 -0
  60. package/src/actions-button.jsx +109 -0
  61. package/src/axes.jsx +5 -31
  62. package/src/bars/common/bars.jsx +8 -10
  63. package/src/chart-setup.jsx +1 -1
  64. package/src/chart.jsx +31 -26
  65. package/src/common/drag-handle.jsx +3 -3
  66. package/src/common/styles.js +1 -1
  67. package/src/grid.jsx +38 -13
  68. package/src/index.js +2 -1
  69. package/src/key-legend.jsx +75 -0
  70. package/src/line/common/drag-handle.jsx +3 -9
  71. package/src/line/common/line.jsx +2 -6
  72. package/src/line/line-cross.js +29 -2
  73. package/src/line/line-dot.js +36 -19
  74. package/src/mark-label.jsx +7 -2
  75. package/src/plot/common/plot.jsx +8 -5
  76. package/src/tool-menu.jsx +1 -1
  77. package/lib/__tests__/axes.test.js +0 -181
  78. package/lib/__tests__/chart-setup.test.js +0 -58
  79. package/lib/__tests__/chart-type.test.js +0 -42
  80. package/lib/__tests__/chart.test.js +0 -108
  81. package/lib/__tests__/grid.test.js +0 -48
  82. package/lib/__tests__/mark-label.test.js +0 -57
  83. package/lib/__tests__/utils.js +0 -56
  84. package/lib/__tests__/utils.test.js +0 -197
  85. package/lib/bars/__tests__/bar.test.js +0 -62
  86. package/lib/bars/__tests__/histogram.test.js +0 -64
  87. package/lib/bars/__tests__/utils.js +0 -56
  88. package/lib/bars/common/__tests__/bars.test.js +0 -100
  89. package/lib/bars/common/__tests__/utils.js +0 -56
  90. package/lib/common/__tests__/drag-handle.test.js +0 -134
  91. package/lib/common/__tests__/utils.js +0 -56
  92. package/lib/line/__tests__/line-cross.test.js +0 -64
  93. package/lib/line/__tests__/line-dot.test.js +0 -64
  94. package/lib/line/__tests__/utils.js +0 -56
  95. package/lib/line/common/__tests__/drag-handle.test.js +0 -134
  96. package/lib/line/common/__tests__/line.test.js +0 -128
  97. package/lib/line/common/__tests__/utils.js +0 -56
  98. package/lib/plot/__tests__/dot.test.js +0 -64
  99. package/lib/plot/__tests__/line.test.js +0 -64
  100. package/lib/plot/__tests__/utils.js +0 -56
  101. package/lib/plot/common/__tests__/plot.test.js +0 -103
  102. package/lib/plot/common/__tests__/utils.js +0 -56
package/CHANGELOG.md CHANGED
@@ -3,7 +3,7 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
- # [5.17.0-beta.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.15.6...@pie-lib/charting@5.17.0-beta.0) (2025-07-15)
6
+ # [5.18.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.15.6...@pie-lib/charting@5.18.0) (2025-07-31)
7
7
 
8
8
  **Note:** Version bump only for package @pie-lib/charting
9
9
 
@@ -11,7 +11,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
11
11
 
12
12
 
13
13
 
14
- # [5.16.0-beta.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.15.6...@pie-lib/charting@5.16.0-beta.0) (2025-07-15)
14
+ # [5.17.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.15.6...@pie-lib/charting@5.17.0) (2025-07-31)
15
15
 
16
16
  **Note:** Version bump only for package @pie-lib/charting
17
17
 
@@ -19,111 +19,103 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
19
19
 
20
20
 
21
21
 
22
- ## [5.15.6](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.15.5...@pie-lib/charting@5.15.6) (2023-10-16)
22
+ # [5.16.0-beta.8](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.15.6...@pie-lib/charting@5.16.0-beta.8) (2025-07-25)
23
23
 
24
+ **Note:** Version bump only for package @pie-lib/charting
24
25
 
25
- ### Bug Fixes
26
26
 
27
- * **charting:** add sanity check for data PD-3223 ([f573866](https://github.com/pie-framework/pie-lib/commit/f57386626933cdb5b8b6a1c0f91b45b6ea1b9ca7))
28
- * **charting:** address overlap of drag handle with category labels in charts PD-3223 ([ebe212e](https://github.com/pie-framework/pie-lib/commit/ebe212ecd315d6445b1d676568482fa47b40ebdb))
29
- * **charting:** limit number of categories in Define Correct Response Chart to 20 ([0b0e8ab](https://github.com/pie-framework/pie-lib/commit/0b0e8ab339126e00703c1ae5218c714bbcdb6dbf))
30
- * **charting:** refine error message display to prevent overlapping with other elements and other messages PD-3121 ([f2de1ad](https://github.com/pie-framework/pie-lib/commit/f2de1adb4d19a44e403beb3d88cbb333e3c5adb9))
31
- * **charting:** use red boxes only and for all duplicated category names, reorder CSS selectors to resolve styling conflicts, only display the validation message a single time for duplicate categories and for empty labels PD-3121 ([7cae40b](https://github.com/pie-framework/pie-lib/commit/7cae40b48a1da661d7d7c97780098a07e5b1d336))
32
27
 
33
28
 
34
29
 
30
+ # [5.16.0-beta.7](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.15.6...@pie-lib/charting@5.16.0-beta.7) (2025-07-25)
35
31
 
32
+ **Note:** Version bump only for package @pie-lib/charting
36
33
 
37
- ## [5.15.5](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.15.4...@pie-lib/charting@5.15.5) (2023-09-28)
38
34
 
39
35
 
40
- ### Bug Fixes
41
36
 
42
- * **charting:** add drop shadow to evaluate bars PD-2790 ([328c730](https://github.com/pie-framework/pie-lib/commit/328c7308d026ca6e00575d47bdfaf1d9e4779d16))
43
37
 
38
+ # [5.16.0-beta.7](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.15.6...@pie-lib/charting@5.16.0-beta.7) (2025-07-25)
44
39
 
40
+ **Note:** Version bump only for package @pie-lib/charting
45
41
 
46
42
 
47
43
 
48
- ## [5.15.4](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.15.3...@pie-lib/charting@5.15.4) (2023-09-28)
49
44
 
50
45
 
51
- ### Bug Fixes
46
+ # [5.16.0-beta.6](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.15.6...@pie-lib/charting@5.16.0-beta.6) (2025-07-25)
52
47
 
53
- * **charting:** fix modal warnings ([34dbf3b](https://github.com/pie-framework/pie-lib/commit/34dbf3b04845773d23aa7c91a80fab57e1e78cd0))
54
- * **charting:** limit number of categories in Define Initial Chart Attributes to 20 PD-3128 ([b0da731](https://github.com/pie-framework/pie-lib/commit/b0da731a619c9d13a8b12e16a6e81dc924261396))
48
+ **Note:** Version bump only for package @pie-lib/charting
55
49
 
56
50
 
57
51
 
58
52
 
59
53
 
60
- ## [5.15.3](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.15.2...@pie-lib/charting@5.15.3) (2023-09-26)
54
+ # [5.16.0-beta.6](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.15.6...@pie-lib/charting@5.16.0-beta.6) (2025-07-25)
61
55
 
56
+ **Note:** Version bump only for package @pie-lib/charting
62
57
 
63
- ### Bug Fixes
64
58
 
65
- * **charting:** adjust icon for the drag handle PD-2790 ([fe670d7](https://github.com/pie-framework/pie-lib/commit/fe670d7a04f44da5c93dadbeec41b753ce50f9f6))
66
59
 
67
60
 
68
61
 
62
+ # [5.16.0-beta.5](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.15.6...@pie-lib/charting@5.16.0-beta.5) (2025-07-25)
69
63
 
64
+ **Note:** Version bump only for package @pie-lib/charting
70
65
 
71
- ## [5.15.2](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.15.1...@pie-lib/charting@5.15.2) (2023-09-25)
72
66
 
73
67
 
74
- ### Bug Fixes
75
68
 
76
- * add required packages for charting to work ([c7af164](https://github.com/pie-framework/pie-lib/commit/c7af16427245d0c0c5c041e296a1cfdf034b7b64))
77
69
 
70
+ # [5.16.0-beta.5](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.15.6...@pie-lib/charting@5.16.0-beta.5) (2025-07-25)
78
71
 
72
+ **Note:** Version bump only for package @pie-lib/charting
79
73
 
80
74
 
81
75
 
82
- ## [5.15.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.15.0...@pie-lib/charting@5.15.1) (2023-09-25)
83
76
 
84
77
 
85
- ### Bug Fixes
78
+ # [5.16.0-beta.4](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.15.6...@pie-lib/charting@5.16.0-beta.4) (2025-07-25)
86
79
 
87
- * **charting:** add @mui/icons-material to package json PD-2790 ([0262857](https://github.com/pie-framework/pie-lib/commit/026285728f998e3fe31ec43c77e99f2311f9ad22))
80
+ **Note:** Version bump only for package @pie-lib/charting
88
81
 
89
82
 
90
83
 
91
84
 
92
85
 
93
- # [5.15.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.14.3...@pie-lib/charting@5.15.0) (2023-09-25)
86
+ # [5.16.0-beta.3](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.15.6...@pie-lib/charting@5.16.0-beta.3) (2025-07-25)
94
87
 
88
+ **Note:** Version bump only for package @pie-lib/charting
95
89
 
96
- ### Bug Fixes
97
90
 
98
- * **charting:** set labelWidth to prevent outline from intersecting InputLabel for the ChartType menu PD-3166 ([ff9ca2b](https://github.com/pie-framework/pie-lib/commit/ff9ca2b9812d0afd209edccac2feecac396111cc))
99
91
 
100
92
 
101
- ### Features
102
93
 
103
- * **charting:** add hover effect for plot and bars PD-2790 ([af0d9ba](https://github.com/pie-framework/pie-lib/commit/af0d9bab03fa8146299bf0a1947dbe418e306f85))
104
- * **charting:** adjust y-coordinate in maskSize for better chart fitting after adding new design, tweaks in design PD-2790 ([0edf288](https://github.com/pie-framework/pie-lib/commit/0edf2880c8c8c0e0e51df080aa582d071f0f1e52))
105
- * **charting:** make style dynamic for drag icon PD-2790 ([aed8c81](https://github.com/pie-framework/pie-lib/commit/aed8c818cbc70910a7e31566c94dd731d068efa1))
106
- * **charting:** Replace drag-enabled horizontal bars with widget for author and gather mode PD-2790, refactor RawDragHandle component ([e0a369a](https://github.com/pie-framework/pie-lib/commit/e0a369ad2aaf9cf5d3aa3ac061c23316443b35fb))
94
+ # [5.16.0-beta.4](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.15.6...@pie-lib/charting@5.16.0-beta.4) (2025-07-23)
107
95
 
96
+ **Note:** Version bump only for package @pie-lib/charting
108
97
 
109
98
 
110
99
 
111
100
 
112
- ## [5.14.3](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.14.2...@pie-lib/charting@5.14.3) (2023-09-18)
113
101
 
102
+ # [5.16.0-beta.3](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.15.6...@pie-lib/charting@5.16.0-beta.3) (2025-07-23)
114
103
 
115
- ### Bug Fixes
104
+ **Note:** Version bump only for package @pie-lib/charting
116
105
 
117
- * **charting:** add tests for resetValues PD-3105 ([972a3cd](https://github.com/pie-framework/pie-lib/commit/972a3cd4b3787352ffe4073085cbd22f91895b43))
118
- * **charting:** wip PD-3105 ([9e21836](https://github.com/pie-framework/pie-lib/commit/9e21836ad8c89c7c839c6561db5edc0329a6a6af))
119
- * **charting:** wip PD-3105 ([f2f8234](https://github.com/pie-framework/pie-lib/commit/f2f82343a373ae1a8f669754a061963cbfdbeb08))
120
- * **charting:** wip PD-3105 revert push in develop ([6cce5e2](https://github.com/pie-framework/pie-lib/commit/6cce5e2d25d079c1c3eb195425dc2cf016fcd36e))
121
106
 
122
107
 
123
108
 
124
109
 
110
+ # [5.16.0-beta.3](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.15.6...@pie-lib/charting@5.16.0-beta.3) (2025-07-20)
111
+
112
+ **Note:** Version bump only for package @pie-lib/charting
113
+
114
+
125
115
 
126
- ## [5.14.2](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.14.1...@pie-lib/charting@5.14.2) (2023-08-07)
116
+
117
+
118
+ # [5.16.0-beta.2](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.15.6...@pie-lib/charting@5.16.0-beta.2) (2025-07-20)
127
119
 
128
120
  **Note:** Version bump only for package @pie-lib/charting
129
121
 
@@ -131,7 +123,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
131
123
 
132
124
 
133
125
 
134
- ## [5.14.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.14.0...@pie-lib/charting@5.14.1) (2023-06-24)
126
+ # [5.16.0-beta.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.15.6...@pie-lib/charting@5.16.0-beta.1) (2025-07-20)
135
127
 
136
128
  **Note:** Version bump only for package @pie-lib/charting
137
129
 
@@ -139,16 +131,122 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
139
131
 
140
132
 
141
133
 
142
- # [5.14.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.13.0...@pie-lib/charting@5.14.0) (2023-06-13)
134
+ # [5.16.0-beta.2](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.15.6...@pie-lib/charting@5.16.0-beta.2) (2025-07-20)
135
+
136
+ **Note:** Version bump only for package @pie-lib/charting
137
+
138
+
139
+
140
+
141
+
142
+ # [5.16.0-beta.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.15.6...@pie-lib/charting@5.16.0-beta.1) (2025-07-20)
143
+
144
+ **Note:** Version bump only for package @pie-lib/charting
145
+
146
+
147
+
148
+
149
+
150
+ # [5.16.0-beta.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.15.6...@pie-lib/charting@5.16.0-beta.1) (2025-07-20)
151
+
152
+ **Note:** Version bump only for package @pie-lib/charting
153
+
154
+
155
+
156
+
157
+
158
+ # [5.16.0-beta.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.15.6...@pie-lib/charting@5.16.0-beta.0) (2025-07-20)
159
+
160
+ **Note:** Version bump only for package @pie-lib/charting
161
+
162
+
163
+
164
+
165
+
166
+ # [5.17.0-beta.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.15.6...@pie-lib/charting@5.17.0-beta.0) (2025-07-15)
167
+
168
+ **Note:** Version bump only for package @pie-lib/charting
169
+
170
+ # [5.16.0-beta.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.15.6...@pie-lib/charting@5.16.0-beta.0) (2025-07-15)
171
+
172
+ **Note:** Version bump only for package @pie-lib/charting
173
+
174
+ ## [5.15.6](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.15.5...@pie-lib/charting@5.15.6) (2023-10-16)
143
175
 
176
+ ### Bug Fixes
177
+
178
+ - **charting:** add sanity check for data PD-3223 ([f573866](https://github.com/pie-framework/pie-lib/commit/f57386626933cdb5b8b6a1c0f91b45b6ea1b9ca7))
179
+ - **charting:** address overlap of drag handle with category labels in charts PD-3223 ([ebe212e](https://github.com/pie-framework/pie-lib/commit/ebe212ecd315d6445b1d676568482fa47b40ebdb))
180
+ - **charting:** limit number of categories in Define Correct Response Chart to 20 ([0b0e8ab](https://github.com/pie-framework/pie-lib/commit/0b0e8ab339126e00703c1ae5218c714bbcdb6dbf))
181
+ - **charting:** refine error message display to prevent overlapping with other elements and other messages PD-3121 ([f2de1ad](https://github.com/pie-framework/pie-lib/commit/f2de1adb4d19a44e403beb3d88cbb333e3c5adb9))
182
+ - **charting:** use red boxes only and for all duplicated category names, reorder CSS selectors to resolve styling conflicts, only display the validation message a single time for duplicate categories and for empty labels PD-3121 ([7cae40b](https://github.com/pie-framework/pie-lib/commit/7cae40b48a1da661d7d7c97780098a07e5b1d336))
183
+
184
+ ## [5.15.5](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.15.4...@pie-lib/charting@5.15.5) (2023-09-28)
185
+
186
+ ### Bug Fixes
187
+
188
+ - **charting:** add drop shadow to evaluate bars PD-2790 ([328c730](https://github.com/pie-framework/pie-lib/commit/328c7308d026ca6e00575d47bdfaf1d9e4779d16))
189
+
190
+ ## [5.15.4](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.15.3...@pie-lib/charting@5.15.4) (2023-09-28)
191
+
192
+ ### Bug Fixes
193
+
194
+ - **charting:** fix modal warnings ([34dbf3b](https://github.com/pie-framework/pie-lib/commit/34dbf3b04845773d23aa7c91a80fab57e1e78cd0))
195
+ - **charting:** limit number of categories in Define Initial Chart Attributes to 20 PD-3128 ([b0da731](https://github.com/pie-framework/pie-lib/commit/b0da731a619c9d13a8b12e16a6e81dc924261396))
196
+
197
+ ## [5.15.3](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.15.2...@pie-lib/charting@5.15.3) (2023-09-26)
198
+
199
+ ### Bug Fixes
200
+
201
+ - **charting:** adjust icon for the drag handle PD-2790 ([fe670d7](https://github.com/pie-framework/pie-lib/commit/fe670d7a04f44da5c93dadbeec41b753ce50f9f6))
202
+
203
+ ## [5.15.2](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.15.1...@pie-lib/charting@5.15.2) (2023-09-25)
204
+
205
+ ### Bug Fixes
206
+
207
+ - add required packages for charting to work ([c7af164](https://github.com/pie-framework/pie-lib/commit/c7af16427245d0c0c5c041e296a1cfdf034b7b64))
208
+
209
+ ## [5.15.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.15.0...@pie-lib/charting@5.15.1) (2023-09-25)
210
+
211
+ ### Bug Fixes
212
+
213
+ - **charting:** add @mui/icons-material to package json PD-2790 ([0262857](https://github.com/pie-framework/pie-lib/commit/026285728f998e3fe31ec43c77e99f2311f9ad22))
214
+
215
+ # [5.15.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.14.3...@pie-lib/charting@5.15.0) (2023-09-25)
216
+
217
+ ### Bug Fixes
218
+
219
+ - **charting:** set labelWidth to prevent outline from intersecting InputLabel for the ChartType menu PD-3166 ([ff9ca2b](https://github.com/pie-framework/pie-lib/commit/ff9ca2b9812d0afd209edccac2feecac396111cc))
144
220
 
145
221
  ### Features
146
222
 
147
- * **charting, translator:** add translator to charting. add missing text in translator ([2c722a2](https://github.com/pie-framework/pie-lib/commit/2c722a241deb1ad4b51aa22c6eba74a0ec8a5ec0))
223
+ - **charting:** add hover effect for plot and bars PD-2790 ([af0d9ba](https://github.com/pie-framework/pie-lib/commit/af0d9bab03fa8146299bf0a1947dbe418e306f85))
224
+ - **charting:** adjust y-coordinate in maskSize for better chart fitting after adding new design, tweaks in design PD-2790 ([0edf288](https://github.com/pie-framework/pie-lib/commit/0edf2880c8c8c0e0e51df080aa582d071f0f1e52))
225
+ - **charting:** make style dynamic for drag icon PD-2790 ([aed8c81](https://github.com/pie-framework/pie-lib/commit/aed8c818cbc70910a7e31566c94dd731d068efa1))
226
+ - **charting:** Replace drag-enabled horizontal bars with widget for author and gather mode PD-2790, refactor RawDragHandle component ([e0a369a](https://github.com/pie-framework/pie-lib/commit/e0a369ad2aaf9cf5d3aa3ac061c23316443b35fb))
227
+
228
+ ## [5.14.3](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.14.2...@pie-lib/charting@5.14.3) (2023-09-18)
229
+
230
+ ### Bug Fixes
231
+
232
+ - **charting:** add tests for resetValues PD-3105 ([972a3cd](https://github.com/pie-framework/pie-lib/commit/972a3cd4b3787352ffe4073085cbd22f91895b43))
233
+ - **charting:** wip PD-3105 ([9e21836](https://github.com/pie-framework/pie-lib/commit/9e21836ad8c89c7c839c6561db5edc0329a6a6af))
234
+ - **charting:** wip PD-3105 ([f2f8234](https://github.com/pie-framework/pie-lib/commit/f2f82343a373ae1a8f669754a061963cbfdbeb08))
235
+ - **charting:** wip PD-3105 revert push in develop ([6cce5e2](https://github.com/pie-framework/pie-lib/commit/6cce5e2d25d079c1c3eb195425dc2cf016fcd36e))
148
236
 
237
+ ## [5.14.2](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.14.1...@pie-lib/charting@5.14.2) (2023-08-07)
149
238
 
239
+ **Note:** Version bump only for package @pie-lib/charting
150
240
 
241
+ ## [5.14.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.14.0...@pie-lib/charting@5.14.1) (2023-06-24)
242
+
243
+ **Note:** Version bump only for package @pie-lib/charting
244
+
245
+ # [5.14.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.13.0...@pie-lib/charting@5.14.0) (2023-06-13)
246
+
247
+ ### Features
151
248
 
249
+ - **charting, translator:** add translator to charting. add missing text in translator ([2c722a2](https://github.com/pie-framework/pie-lib/commit/2c722a241deb1ad4b51aa22c6eba74a0ec8a5ec0))
152
250
 
153
251
  # [5.13.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/charting@5.12.0...@pie-lib/charting@5.13.0) (2023-06-12)
154
252
 
@@ -0,0 +1,174 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports["default"] = exports.ActionsButton = void 0;
9
+
10
+ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
11
+
12
+ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
13
+
14
+ var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
15
+
16
+ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
17
+
18
+ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
19
+
20
+ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
21
+
22
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
23
+
24
+ var _react = _interopRequireDefault(require("react"));
25
+
26
+ var _propTypes = _interopRequireDefault(require("prop-types"));
27
+
28
+ var _styles = require("@material-ui/core/styles");
29
+
30
+ var _Button = _interopRequireDefault(require("@material-ui/core/Button"));
31
+
32
+ var _Popover = _interopRequireDefault(require("@material-ui/core/Popover"));
33
+
34
+ var _Paper = _interopRequireDefault(require("@material-ui/core/Paper"));
35
+
36
+ var _index = require("./shared/index");
37
+
38
+ var _translator = _interopRequireDefault(require("@pie-lib/translator"));
39
+
40
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
41
+
42
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
43
+
44
+ var translator = _translator["default"].translator;
45
+
46
+ var ActionsButton = /*#__PURE__*/function (_React$Component) {
47
+ (0, _inherits2["default"])(ActionsButton, _React$Component);
48
+
49
+ var _super = _createSuper(ActionsButton);
50
+
51
+ function ActionsButton(props) {
52
+ var _this;
53
+
54
+ (0, _classCallCheck2["default"])(this, ActionsButton);
55
+ _this = _super.call(this, props);
56
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "handleActionsClick", function (event) {
57
+ _this.setState({
58
+ actionsAnchorEl: event.currentTarget
59
+ });
60
+ });
61
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "handleActionsClose", function () {
62
+ _this.setState({
63
+ actionsAnchorEl: null
64
+ });
65
+ });
66
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "handleAddCategory", function () {
67
+ var addCategory = _this.props.addCategory;
68
+ addCategory();
69
+
70
+ _this.handleActionsClose();
71
+ });
72
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "handleDeleteCategory", function (index) {
73
+ var deleteCategory = _this.props.deleteCategory;
74
+ deleteCategory(index);
75
+
76
+ _this.handleActionsClose();
77
+ });
78
+ _this.state = {
79
+ actionsAnchorEl: null
80
+ };
81
+ return _this;
82
+ }
83
+
84
+ (0, _createClass2["default"])(ActionsButton, [{
85
+ key: "render",
86
+ value: function render() {
87
+ var _this2 = this;
88
+
89
+ var _this$props = this.props,
90
+ classes = _this$props.classes,
91
+ categories = _this$props.categories,
92
+ language = _this$props.language;
93
+ return /*#__PURE__*/_react["default"].createElement("div", {
94
+ className: classes.actions
95
+ }, /*#__PURE__*/_react["default"].createElement("div", {
96
+ role: "button",
97
+ tabIndex: 0,
98
+ className: classes.trigger,
99
+ onClick: this.handleActionsClick
100
+ }, "Actions"), /*#__PURE__*/_react["default"].createElement(_Popover["default"], {
101
+ open: Boolean(this.state.actionsAnchorEl),
102
+ anchorEl: this.state.actionsAnchorEl,
103
+ onClose: this.handleActionsClose,
104
+ anchorOrigin: {
105
+ vertical: 'bottom',
106
+ horizontal: 'left'
107
+ },
108
+ transformOrigin: {
109
+ vertical: 'top',
110
+ horizontal: 'left'
111
+ }
112
+ }, /*#__PURE__*/_react["default"].createElement(_Paper["default"], {
113
+ className: classes.actionsPaper
114
+ }, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
115
+ onClick: function onClick() {
116
+ return _this2.handleAddCategory();
117
+ }
118
+ }, "+ ", translator.t('charting.add', {
119
+ lng: language
120
+ })), categories.length > 0 && categories.map(function (category, index) {
121
+ return category.deletable && !category.correctness && /*#__PURE__*/_react["default"].createElement(_Button["default"], {
122
+ key: index,
123
+ onClick: function onClick() {
124
+ return _this2.handleDeleteCategory(index);
125
+ }
126
+ }, "".concat(translator.t('charting.delete', {
127
+ lng: language
128
+ }), " <").concat(category.label || translator.t('charting.newLabel', {
129
+ lng: language
130
+ }), ">"));
131
+ }))));
132
+ }
133
+ }]);
134
+ return ActionsButton;
135
+ }(_react["default"].Component);
136
+
137
+ exports.ActionsButton = ActionsButton;
138
+ (0, _defineProperty2["default"])(ActionsButton, "propTypes", {
139
+ classes: _propTypes["default"].object.isRequired,
140
+ categories: _propTypes["default"].array,
141
+ addCategory: _propTypes["default"].func.isRequired,
142
+ deleteCategory: _propTypes["default"].func.isRequired,
143
+ language: _propTypes["default"].string.isRequired
144
+ });
145
+
146
+ var styles = function styles(theme) {
147
+ return {
148
+ actions: {
149
+ alignSelf: 'flex-end'
150
+ },
151
+ trigger: {
152
+ cursor: 'pointer',
153
+ fontSize: theme.typography.fontSize,
154
+ color: _index.color.tertiary()
155
+ },
156
+ actionsPaper: {
157
+ padding: theme.spacing.unit,
158
+ display: 'flex',
159
+ flexDirection: 'column',
160
+ gap: theme.spacing.unit,
161
+ '& button': {
162
+ textTransform: 'none',
163
+ fontSize: theme.typography.fontSize,
164
+ color: _index.color.text(),
165
+ justifyContent: 'flex-start'
166
+ }
167
+ }
168
+ };
169
+ };
170
+
171
+ var _default = (0, _styles.withStyles)(styles)(ActionsButton);
172
+
173
+ exports["default"] = _default;
174
+ //# sourceMappingURL=actions-button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/actions-button.jsx"],"names":["translator","Translator","ActionsButton","props","event","setState","actionsAnchorEl","currentTarget","addCategory","handleActionsClose","index","deleteCategory","state","classes","categories","language","actions","trigger","handleActionsClick","Boolean","vertical","horizontal","actionsPaper","handleAddCategory","t","lng","length","map","category","deletable","correctness","handleDeleteCategory","label","React","Component","PropTypes","object","isRequired","array","func","string","styles","theme","alignSelf","cursor","fontSize","typography","color","tertiary","padding","spacing","unit","display","flexDirection","gap","textTransform","text","justifyContent"],"mappings":"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","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/core/styles';\nimport Button from '@material-ui/core/Button';\nimport Popover from '@material-ui/core/Popover';\nimport Paper from '@material-ui/core/Paper';\n\nimport { color } from '../../render-ui/src/index';\nimport Translator from '@pie-lib/translator';\n\nconst { translator } = Translator;\n\nexport class ActionsButton extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n actionsAnchorEl: null,\n };\n }\n\n static propTypes = {\n classes: PropTypes.object.isRequired,\n categories: PropTypes.array,\n addCategory: PropTypes.func.isRequired,\n deleteCategory: PropTypes.func.isRequired,\n language: PropTypes.string.isRequired,\n };\n\n handleActionsClick = (event) => {\n this.setState({ actionsAnchorEl: event.currentTarget });\n };\n\n handleActionsClose = () => {\n this.setState({ actionsAnchorEl: null });\n };\n\n handleAddCategory = () => {\n const { addCategory } = this.props;\n addCategory();\n this.handleActionsClose();\n };\n\n handleDeleteCategory = (index) => {\n const { deleteCategory } = this.props;\n deleteCategory(index);\n this.handleActionsClose();\n };\n\n render() {\n const { classes, categories, language } = this.props;\n\n return (\n <div className={classes.actions}>\n <div role=\"button\" tabIndex={0} className={classes.trigger} onClick={this.handleActionsClick}>\n Actions\n </div>\n <Popover\n open={Boolean(this.state.actionsAnchorEl)}\n anchorEl={this.state.actionsAnchorEl}\n onClose={this.handleActionsClose}\n anchorOrigin={{ vertical: 'bottom', horizontal: 'left' }}\n transformOrigin={{ vertical: 'top', horizontal: 'left' }}\n >\n <Paper className={classes.actionsPaper}>\n <Button onClick={() => this.handleAddCategory()}>\n + {translator.t('charting.add', { lng: language })}\n </Button>\n {categories.length > 0 &&\n categories.map(\n (category, index) =>\n category.deletable &&\n !category.correctness && (\n <Button key={index} onClick={() => this.handleDeleteCategory(index)}>\n {`${translator.t('charting.delete', { lng: language })} <${category.label ||\n translator.t('charting.newLabel', { lng: language })}>`}\n </Button>\n ),\n )}\n </Paper>\n </Popover>\n </div>\n );\n }\n}\n\nconst styles = (theme) => ({\n actions: {\n alignSelf: 'flex-end',\n },\n trigger: {\n cursor: 'pointer',\n fontSize: theme.typography.fontSize,\n color: color.tertiary(),\n },\n actionsPaper: {\n padding: theme.spacing.unit,\n display: 'flex',\n flexDirection: 'column',\n gap: theme.spacing.unit,\n '& button': {\n textTransform: 'none',\n fontSize: theme.typography.fontSize,\n color: color.text(),\n justifyContent: 'flex-start',\n },\n },\n});\n\nexport default withStyles(styles)(ActionsButton);\n"],"file":"actions-button.js"}