@pie-lib/charting 7.0.4-next.3 → 7.0.4-next.30

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 (272) hide show
  1. package/dist/_virtual/_rolldown/runtime.js +23 -0
  2. package/dist/actions-button.d.ts +26 -0
  3. package/dist/actions-button.js +84 -0
  4. package/dist/autosize-input.d.ts +10 -0
  5. package/dist/autosize-input.js +66 -0
  6. package/dist/axes.d.ts +84 -0
  7. package/dist/axes.js +376 -0
  8. package/dist/bars/bar.d.ts +47 -0
  9. package/dist/bars/bar.js +27 -0
  10. package/dist/bars/common/bars.d.ts +98 -0
  11. package/dist/bars/common/bars.js +174 -0
  12. package/dist/bars/common/correct-check-icon.d.ts +18 -0
  13. package/dist/bars/common/correct-check-icon.js +50 -0
  14. package/dist/bars/histogram.d.ts +47 -0
  15. package/dist/bars/histogram.js +28 -0
  16. package/dist/chart-setup.d.ts +29 -0
  17. package/dist/chart-setup.js +231 -0
  18. package/dist/chart-type.d.ts +32 -0
  19. package/dist/chart-type.js +68 -0
  20. package/dist/chart-types.d.ts +41 -0
  21. package/dist/chart-types.js +17 -0
  22. package/dist/chart.d.ts +88 -0
  23. package/dist/chart.js +250 -0
  24. package/dist/common/correctness-indicators.d.ts +70 -0
  25. package/dist/common/correctness-indicators.js +106 -0
  26. package/dist/common/drag-handle.d.ts +129 -0
  27. package/dist/common/drag-handle.js +120 -0
  28. package/dist/common/drag-icon.d.ts +23 -0
  29. package/dist/common/drag-icon.js +45 -0
  30. package/dist/common/styles.d.ts +23 -0
  31. package/dist/common/styles.js +17 -0
  32. package/dist/grid.d.ts +45 -0
  33. package/dist/grid.js +56 -0
  34. package/dist/index.d.ts +14 -0
  35. package/dist/index.js +6 -0
  36. package/dist/key-legend.d.ts +19 -0
  37. package/dist/key-legend.js +46 -0
  38. package/dist/line/common/drag-handle.d.ts +120 -0
  39. package/dist/line/common/drag-handle.js +92 -0
  40. package/dist/line/common/line.d.ts +96 -0
  41. package/dist/line/common/line.js +114 -0
  42. package/dist/line/line-cross.d.ts +47 -0
  43. package/dist/line/line-cross.js +133 -0
  44. package/dist/line/line-dot.d.ts +47 -0
  45. package/dist/line/line-dot.js +101 -0
  46. package/dist/mark-label.d.ts +55 -0
  47. package/dist/mark-label.js +138 -0
  48. package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/axis/Axis.js +101 -0
  49. package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/axis/AxisBottom.js +46 -0
  50. package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/axis/AxisLeft.js +47 -0
  51. package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/axis/AxisRenderer.js +63 -0
  52. package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/axis/Ticks.js +44 -0
  53. package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/constants/orientation.js +9 -0
  54. package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/createPoint.js +14 -0
  55. package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/getAxisRangePaddingConfig.js +21 -0
  56. package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/getLabelTransform.js +16 -0
  57. package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/getTickFormatter.js +8 -0
  58. package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/getTickPosition.js +15 -0
  59. package/dist/node_modules/.bun/@visx_grid@3.12.0_f4eacebf2041cd4f/node_modules/@visx/grid/esm/grids/GridColumns.js +79 -0
  60. package/dist/node_modules/.bun/@visx_grid@3.12.0_f4eacebf2041cd4f/node_modules/@visx/grid/esm/grids/GridRows.js +79 -0
  61. package/dist/node_modules/.bun/@visx_grid@3.12.0_f4eacebf2041cd4f/node_modules/@visx/grid/esm/utils/getScaleBandwidth.js +6 -0
  62. package/dist/node_modules/.bun/@visx_group@3.12.0_f4eacebf2041cd4f/node_modules/@visx/group/esm/Group.js +50 -0
  63. package/dist/node_modules/.bun/@visx_point@3.12.0/node_modules/@visx/point/esm/Point.js +18 -0
  64. package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/operators/align.js +6 -0
  65. package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/operators/base.js +6 -0
  66. package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/operators/clamp.js +6 -0
  67. package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/operators/constant.js +6 -0
  68. package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/operators/domain.js +6 -0
  69. package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/operators/exponent.js +6 -0
  70. package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/operators/interpolate.js +10 -0
  71. package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/operators/nice.js +37 -0
  72. package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/operators/padding.js +6 -0
  73. package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/operators/range.js +6 -0
  74. package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/operators/reverse.js +9 -0
  75. package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/operators/round.js +7 -0
  76. package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/operators/scaleOperator.js +58 -0
  77. package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/operators/unknown.js +6 -0
  78. package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/operators/zero.js +9 -0
  79. package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/scales/band.js +9 -0
  80. package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/scales/point.js +9 -0
  81. package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/utils/coerceNumber.js +10 -0
  82. package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/utils/createColorInterpolator.js +29 -0
  83. package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/utils/getTicks.js +9 -0
  84. package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/utils/isUtcScale.js +7 -0
  85. package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/utils/toString.js +6 -0
  86. package/dist/node_modules/.bun/@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/esm/shapes/Bar.js +29 -0
  87. package/dist/node_modules/.bun/@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/esm/shapes/Circle.js +29 -0
  88. package/dist/node_modules/.bun/@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/esm/shapes/Line.js +47 -0
  89. package/dist/node_modules/.bun/@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/esm/shapes/LinePath.js +50 -0
  90. package/dist/node_modules/.bun/@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/esm/util/D3ShapeFactories.js +9 -0
  91. package/dist/node_modules/.bun/@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/esm/util/setNumberOrNumberAccessor.js +6 -0
  92. package/dist/node_modules/.bun/@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/lib/shapes/Line.js +53 -0
  93. package/dist/node_modules/.bun/@visx_text@3.12.0_f4eacebf2041cd4f/node_modules/@visx/text/esm/Text.js +57 -0
  94. package/dist/node_modules/.bun/@visx_text@3.12.0_f4eacebf2041cd4f/node_modules/@visx/text/esm/hooks/useText.js +91 -0
  95. package/dist/node_modules/.bun/@visx_text@3.12.0_f4eacebf2041cd4f/node_modules/@visx/text/esm/util/getStringWidth.js +21 -0
  96. package/dist/node_modules/.bun/@visx_vendor@3.12.0/node_modules/@visx/vendor/esm/d3-interpolate.js +8 -0
  97. package/dist/node_modules/.bun/@visx_vendor@3.12.0/node_modules/@visx/vendor/esm/d3-scale.js +8 -0
  98. package/dist/node_modules/.bun/@visx_vendor@3.12.0/node_modules/@visx/vendor/esm/d3-time.js +8 -0
  99. package/dist/node_modules/.bun/balanced-match@0.4.2/node_modules/balanced-match/index.js +32 -0
  100. package/dist/node_modules/.bun/balanced-match@1.0.2/node_modules/balanced-match/index.js +33 -0
  101. package/dist/node_modules/.bun/classnames@2.5.1/node_modules/classnames/index.js +32 -0
  102. package/dist/node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.js +16 -0
  103. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_Hash.js +21 -0
  104. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_ListCache.js +21 -0
  105. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_Map.js +10 -0
  106. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_MapCache.js +21 -0
  107. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_Symbol.js +9 -0
  108. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_assocIndexOf.js +14 -0
  109. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_baseGetTag.js +15 -0
  110. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_baseIsNative.js +16 -0
  111. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_coreJsData.js +9 -0
  112. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_freeGlobal.js +8 -0
  113. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_getMapData.js +14 -0
  114. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_getNative.js +15 -0
  115. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_getRawTag.js +19 -0
  116. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_getValue.js +11 -0
  117. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_hashClear.js +13 -0
  118. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_hashDelete.js +12 -0
  119. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_hashGet.js +18 -0
  120. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_hashHas.js +14 -0
  121. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_hashSet.js +14 -0
  122. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_isKeyable.js +12 -0
  123. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_isMasked.js +16 -0
  124. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_listCacheClear.js +11 -0
  125. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_listCacheDelete.js +14 -0
  126. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_listCacheGet.js +14 -0
  127. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_listCacheHas.js +13 -0
  128. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_listCacheSet.js +14 -0
  129. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_mapCacheClear.js +19 -0
  130. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_mapCacheDelete.js +14 -0
  131. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_mapCacheGet.js +13 -0
  132. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_mapCacheHas.js +13 -0
  133. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_mapCacheSet.js +14 -0
  134. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_nativeCreate.js +9 -0
  135. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_objectToString.js +12 -0
  136. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_root.js +10 -0
  137. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_toSource.js +20 -0
  138. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/eq.js +11 -0
  139. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/isFunction.js +16 -0
  140. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/isObject.js +12 -0
  141. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/memoize.js +20 -0
  142. package/dist/node_modules/.bun/math-expression-evaluator@1.4.0/node_modules/math-expression-evaluator/src/formula_evaluator.js +37 -0
  143. package/dist/node_modules/.bun/math-expression-evaluator@1.4.0/node_modules/math-expression-evaluator/src/lexer.js +509 -0
  144. package/dist/node_modules/.bun/math-expression-evaluator@1.4.0/node_modules/math-expression-evaluator/src/math_function.js +108 -0
  145. package/dist/node_modules/.bun/math-expression-evaluator@1.4.0/node_modules/math-expression-evaluator/src/postfix.js +31 -0
  146. package/dist/node_modules/.bun/math-expression-evaluator@1.4.0/node_modules/math-expression-evaluator/src/postfix_evaluator.js +45 -0
  147. package/dist/node_modules/.bun/reduce-css-calc@1.3.0/node_modules/reduce-css-calc/index.js +49 -0
  148. package/dist/node_modules/.bun/reduce-function-call@1.0.3/node_modules/reduce-function-call/index.js +34 -0
  149. package/dist/plot/common/plot.d.ts +103 -0
  150. package/dist/plot/common/plot.js +227 -0
  151. package/dist/plot/dot.d.ts +47 -0
  152. package/dist/plot/dot.js +62 -0
  153. package/dist/plot/line.d.ts +47 -0
  154. package/dist/plot/line.js +84 -0
  155. package/dist/tool-menu.d.ts +31 -0
  156. package/dist/utils.d.ts +39 -0
  157. package/dist/utils.js +101 -0
  158. package/package.json +39 -28
  159. package/CHANGELOG.json +0 -17
  160. package/CHANGELOG.md +0 -1116
  161. package/LICENSE.md +0 -5
  162. package/lib/actions-button.js +0 -145
  163. package/lib/actions-button.js.map +0 -1
  164. package/lib/axes.js +0 -643
  165. package/lib/axes.js.map +0 -1
  166. package/lib/bars/bar.js +0 -58
  167. package/lib/bars/bar.js.map +0 -1
  168. package/lib/bars/common/bars.js +0 -277
  169. package/lib/bars/common/bars.js.map +0 -1
  170. package/lib/bars/common/correct-check-icon.js +0 -54
  171. package/lib/bars/common/correct-check-icon.js.map +0 -1
  172. package/lib/bars/histogram.js +0 -59
  173. package/lib/bars/histogram.js.map +0 -1
  174. package/lib/chart-setup.js +0 -382
  175. package/lib/chart-setup.js.map +0 -1
  176. package/lib/chart-type.js +0 -80
  177. package/lib/chart-type.js.map +0 -1
  178. package/lib/chart-types.js +0 -22
  179. package/lib/chart-types.js.map +0 -1
  180. package/lib/chart.js +0 -384
  181. package/lib/chart.js.map +0 -1
  182. package/lib/common/correctness-indicators.js +0 -156
  183. package/lib/common/correctness-indicators.js.map +0 -1
  184. package/lib/common/drag-handle.js +0 -160
  185. package/lib/common/drag-handle.js.map +0 -1
  186. package/lib/common/drag-icon.js +0 -52
  187. package/lib/common/drag-icon.js.map +0 -1
  188. package/lib/common/styles.js +0 -22
  189. package/lib/common/styles.js.map +0 -1
  190. package/lib/grid.js +0 -112
  191. package/lib/grid.js.map +0 -1
  192. package/lib/index.js +0 -42
  193. package/lib/index.js.map +0 -1
  194. package/lib/key-legend.js +0 -87
  195. package/lib/key-legend.js.map +0 -1
  196. package/lib/line/common/drag-handle.js +0 -146
  197. package/lib/line/common/drag-handle.js.map +0 -1
  198. package/lib/line/common/line.js +0 -214
  199. package/lib/line/common/line.js.map +0 -1
  200. package/lib/line/line-cross.js +0 -214
  201. package/lib/line/line-cross.js.map +0 -1
  202. package/lib/line/line-dot.js +0 -158
  203. package/lib/line/line-dot.js.map +0 -1
  204. package/lib/mark-label.js +0 -237
  205. package/lib/mark-label.js.map +0 -1
  206. package/lib/plot/common/plot.js +0 -349
  207. package/lib/plot/common/plot.js.map +0 -1
  208. package/lib/plot/dot.js +0 -110
  209. package/lib/plot/dot.js.map +0 -1
  210. package/lib/plot/line.js +0 -140
  211. package/lib/plot/line.js.map +0 -1
  212. package/lib/tool-menu.js +0 -106
  213. package/lib/tool-menu.js.map +0 -1
  214. package/lib/utils.js +0 -189
  215. package/lib/utils.js.map +0 -1
  216. package/src/__tests__/actions-button.test.jsx +0 -280
  217. package/src/__tests__/axes.test.jsx +0 -667
  218. package/src/__tests__/chart-setup.test.jsx +0 -532
  219. package/src/__tests__/chart-type.test.jsx +0 -23
  220. package/src/__tests__/chart.test.jsx +0 -86
  221. package/src/__tests__/grid.test.jsx +0 -37
  222. package/src/__tests__/key-legend.test.jsx +0 -223
  223. package/src/__tests__/mark-label.test.jsx +0 -33
  224. package/src/__tests__/tool-menu.test.jsx +0 -522
  225. package/src/__tests__/utils.js +0 -36
  226. package/src/__tests__/utils.test.js +0 -100
  227. package/src/actions-button.jsx +0 -115
  228. package/src/axes.jsx +0 -594
  229. package/src/bars/__tests__/bar.test.jsx +0 -45
  230. package/src/bars/__tests__/histogram.test.jsx +0 -45
  231. package/src/bars/__tests__/utils.js +0 -30
  232. package/src/bars/bar.js +0 -28
  233. package/src/bars/common/__tests__/bars.test.jsx +0 -68
  234. package/src/bars/common/__tests__/utils.js +0 -30
  235. package/src/bars/common/bars.jsx +0 -249
  236. package/src/bars/common/correct-check-icon.jsx +0 -25
  237. package/src/bars/histogram.js +0 -28
  238. package/src/chart-setup.jsx +0 -356
  239. package/src/chart-type.js +0 -59
  240. package/src/chart-types.js +0 -8
  241. package/src/chart.jsx +0 -357
  242. package/src/common/__tests__/correctness-indicators.test.jsx +0 -720
  243. package/src/common/__tests__/drag-handle.test.jsx +0 -58
  244. package/src/common/__tests__/utils.js +0 -30
  245. package/src/common/correctness-indicators.jsx +0 -128
  246. package/src/common/drag-handle.jsx +0 -125
  247. package/src/common/drag-icon.jsx +0 -36
  248. package/src/common/styles.js +0 -19
  249. package/src/grid.jsx +0 -80
  250. package/src/index.js +0 -7
  251. package/src/key-legend.jsx +0 -77
  252. package/src/line/__tests__/line-cross.test.jsx +0 -463
  253. package/src/line/__tests__/line-dot.test.jsx +0 -41
  254. package/src/line/__tests__/utils.js +0 -36
  255. package/src/line/common/__tests__/drag-handle.test.jsx +0 -62
  256. package/src/line/common/__tests__/line.test.jsx +0 -79
  257. package/src/line/common/__tests__/utils.js +0 -30
  258. package/src/line/common/drag-handle.jsx +0 -114
  259. package/src/line/common/line.jsx +0 -171
  260. package/src/line/line-cross.js +0 -144
  261. package/src/line/line-dot.js +0 -111
  262. package/src/mark-label.jsx +0 -238
  263. package/src/plot/__tests__/dot.test.jsx +0 -344
  264. package/src/plot/__tests__/line.test.jsx +0 -375
  265. package/src/plot/__tests__/utils.js +0 -30
  266. package/src/plot/common/__tests__/plot.test.jsx +0 -69
  267. package/src/plot/common/__tests__/utils.js +0 -30
  268. package/src/plot/common/plot.jsx +0 -358
  269. package/src/plot/dot.js +0 -74
  270. package/src/plot/line.js +0 -98
  271. package/src/tool-menu.jsx +0 -85
  272. package/src/utils.js +0 -201
@@ -0,0 +1,231 @@
1
+ import e from "./chart-type.js";
2
+ import { useEffect as t, useState as n } from "react";
3
+ import r from "prop-types";
4
+ import { styled as i } from "@mui/material/styles";
5
+ import { AlertDialog as a, NumberTextFieldCustom as o } from "@pie-lib/config-ui";
6
+ import { color as s } from "@pie-lib/render-ui";
7
+ import { jsx as c, jsxs as l } from "react/jsx-runtime";
8
+ import u from "@mui/material/Typography";
9
+ //#region src/chart-setup.tsx
10
+ var d = (e, t, n, r, i) => {
11
+ (e || []).forEach((e) => {
12
+ let t = Math.round(e.value * 10) % Math.round(n.step * 10) / 10;
13
+ (e.value > n.max || t !== 0) && (e.value = 0);
14
+ }), t && r({
15
+ ...i,
16
+ data: e
17
+ });
18
+ }, f = i("div")(() => ({ width: "450px" })), p = i("div")(({ theme: e }) => ({
19
+ display: "flex",
20
+ flexDirection: "column",
21
+ width: "100%",
22
+ marginTop: e.spacing(3)
23
+ })), m = i("div")(() => ({
24
+ display: "flex",
25
+ flexDirection: "column",
26
+ alignItems: "center"
27
+ })), h = i("div")(() => ({
28
+ display: "flex",
29
+ justifyContent: "space-around",
30
+ alignItems: "center"
31
+ })), g = i(o)(({ theme: e }) => ({
32
+ width: "130px",
33
+ margin: `${e.spacing(1)} ${e.spacing(.5)}`
34
+ })), _ = i(o)(({ theme: e }) => ({
35
+ width: "160px",
36
+ margin: `${e.spacing(1)} ${e.spacing(.5)}`
37
+ })), v = i("div")(({ theme: e }) => ({
38
+ display: "flex",
39
+ justifyContent: "space-between",
40
+ alignItems: "center",
41
+ margin: `${e.spacing(3)} 0`
42
+ })), y = i(u)(() => ({ color: s.disabled() })), b = (r) => {
43
+ let { model: i, onChange: o, chartDimensions: s, gridValues: b = {}, labelValues: x = {}, studentNewCategoryDefaultLabel: S = {}, availableChartTypes: C = {}, chartTypeLabel: w } = r, [T, E] = n({
44
+ open: !1,
45
+ title: "",
46
+ text: "",
47
+ onClose: null,
48
+ onConfirm: null
49
+ }), [D, O] = n(!1), [k, A] = n(""), [j, M] = n(0), { range: N = {}, correctAnswer: P, changeInteractiveEnabled: F, changeEditableEnabled: I } = i, L = i.graph, { showInConfigPanel: R, width: z, height: B } = s || {}, V = {
50
+ min: z?.min ? Math.max(50, z.min) : 50,
51
+ max: z?.max ? Math.min(700, z.max) : 700,
52
+ step: z?.step >= 1 ? Math.min(200, z.step) : 20
53
+ }, H = {
54
+ min: B?.min ? Math.max(400, B.min) : 400,
55
+ max: B?.max ? Math.min(700, B.max) : 700,
56
+ step: B?.step >= 1 ? Math.min(200, B.step) : 20
57
+ }, U = b && b.range ? { customValues: b.range } : {
58
+ min: 0,
59
+ max: 1e4
60
+ }, W = x && x.range ? { customValues: x.range } : {
61
+ min: 0,
62
+ max: 1e4
63
+ }, G = /* @__PURE__ */ l(h, { children: [/* @__PURE__ */ c(_, {
64
+ label: "Grid Interval",
65
+ value: N.step,
66
+ variant: "outlined",
67
+ onChange: (e, t) => $("step", t, e),
68
+ ...U
69
+ }), /* @__PURE__ */ c(_, {
70
+ label: "Label Interval",
71
+ value: N.labelStep,
72
+ variant: "outlined",
73
+ onChange: (e, t) => $("labelStep", t, e),
74
+ ...W
75
+ })] }), K = (e) => {
76
+ E((t) => ({
77
+ ...t,
78
+ open: e
79
+ })), O(e);
80
+ }, q = (e, t) => e.map((e) => (Object.prototype.hasOwnProperty.call(e, t) && (e[t] = t == "interactive"), e)), J = (e) => {
81
+ let { correctAnswer: t, data: n } = i;
82
+ F === !1 && q(n, "interactive"), I === !1 && q(n, "editable"), d(n, e, N, o, i), d(t.data, !1, N, o, i);
83
+ }, Y = () => {
84
+ let e = S?.label;
85
+ o({
86
+ ...i,
87
+ studentCategoryDefaultLabel: e
88
+ });
89
+ }, X = (e) => e.includes("Plot") ? {
90
+ min: 3,
91
+ max: 10
92
+ } : {
93
+ min: .05,
94
+ max: 1e4
95
+ }, Z = (e, t) => {
96
+ let n = {
97
+ ...L,
98
+ [e]: t
99
+ };
100
+ o({
101
+ ...i,
102
+ graph: n
103
+ });
104
+ }, Q = (e, t) => (e || []).find((e) => e.value > t.max || e.value - t.step * Math.floor(e.value / t.step) !== 0), $ = (e, t, n) => {
105
+ M(N[e]), A(e), N[e] = t, (e === "max" || e === "step") && (Q(i.data, N) || Q(i.correctAnswer.data, N)) && n?.target ? O(!0) : o({
106
+ ...i,
107
+ range: N
108
+ });
109
+ };
110
+ t(() => {
111
+ J(!0), Y();
112
+ }, []), t(() => {
113
+ D && E({
114
+ open: !0,
115
+ title: "Warning",
116
+ text: "This change will remove values defined for one or more categories",
117
+ onConfirm: () => {
118
+ J(), K(!1), o({
119
+ ...i,
120
+ range: N,
121
+ correctAnswer: P
122
+ });
123
+ },
124
+ onClose: () => {
125
+ N[k] = j, K(!1);
126
+ }
127
+ });
128
+ }, [D]);
129
+ let ee = N.step === 1 && N.labelStep === 1 && 3 <= N.max && N.max <= 10, te = () => {
130
+ X.min = 3, X.max = 10, N.max = 10, N.step = 1, N.labelStep = 1, o({
131
+ ...i,
132
+ range: N
133
+ });
134
+ }, ne = (e) => {
135
+ if (e.includes("Plot")) {
136
+ if (!ee) {
137
+ E({
138
+ open: !0,
139
+ title: "Warning",
140
+ text: "The selected chart type does not support the current chart configuration. Reset chart configuration?",
141
+ onConfirm: () => {
142
+ te(), J(), K(!1), o({
143
+ ...i,
144
+ range: N,
145
+ chartType: e
146
+ });
147
+ },
148
+ onClose: () => {
149
+ K(!1);
150
+ }
151
+ });
152
+ return;
153
+ }
154
+ X.min = 3, X.max = 10, o({
155
+ ...i,
156
+ chartType: e
157
+ });
158
+ return;
159
+ }
160
+ o({
161
+ ...i,
162
+ chartType: e
163
+ });
164
+ };
165
+ return /* @__PURE__ */ l(f, { children: [
166
+ /* @__PURE__ */ c(u, {
167
+ variant: "subtitle1",
168
+ children: "Configure Chart"
169
+ }),
170
+ /* @__PURE__ */ l(p, { children: [
171
+ /* @__PURE__ */ l(h, { children: [/* @__PURE__ */ c(e, {
172
+ value: i.chartType,
173
+ onChange: (e) => ne(e.target.value),
174
+ availableChartTypes: C,
175
+ chartTypeLabel: w
176
+ }), /* @__PURE__ */ c(_, {
177
+ label: "Max Value",
178
+ value: N.max,
179
+ min: X(i.chartType).min,
180
+ max: X(i.chartType).max,
181
+ variant: "outlined",
182
+ onChange: (e, t) => $("max", t, e)
183
+ })] }),
184
+ !i.chartType.includes("Plot") && G,
185
+ R && /* @__PURE__ */ l(v, { children: [
186
+ /* @__PURE__ */ c("div", { children: /* @__PURE__ */ c(u, { children: "Dimensions(px)" }) }),
187
+ /* @__PURE__ */ l(m, { children: [/* @__PURE__ */ c(g, {
188
+ label: "Width",
189
+ value: L.width,
190
+ min: V.min,
191
+ max: V.max,
192
+ step: V.step,
193
+ variant: "outlined",
194
+ onChange: (e, t) => Z("width", t)
195
+ }), /* @__PURE__ */ c(y, { children: "Min 50, Max 700" })] }),
196
+ /* @__PURE__ */ l(m, { children: [/* @__PURE__ */ c(g, {
197
+ label: "Height",
198
+ value: L.height,
199
+ min: H.min,
200
+ max: H.max,
201
+ step: H.step,
202
+ variant: "outlined",
203
+ onChange: (e, t) => Z("height", t)
204
+ }), /* @__PURE__ */ c(y, { children: "Min 400, Max 700" })] })
205
+ ] })
206
+ ] }),
207
+ /* @__PURE__ */ c(a, {
208
+ open: T.open,
209
+ title: T.title,
210
+ text: T.text,
211
+ onClose: T.onClose,
212
+ onConfirm: T.onConfirm
213
+ })
214
+ ] });
215
+ };
216
+ b.propTypes = {
217
+ chartDimensions: r.object,
218
+ domain: r.object,
219
+ gridValues: r.object,
220
+ labelValues: r.object,
221
+ model: r.object,
222
+ onChange: r.func,
223
+ range: r.object,
224
+ chartDimension: r.object,
225
+ size: r.object,
226
+ studentNewCategoryDefaultLabel: r.object,
227
+ availableChartTypes: r.object,
228
+ chartTypeLabel: r.string
229
+ };
230
+ //#endregion
231
+ export { b as default };
@@ -0,0 +1,32 @@
1
+ /**
2
+ * @synced-from pie-lib/packages/charting/src/chart-type.js
3
+ * @auto-generated
4
+ *
5
+ * This file is automatically synced from pie-elements and converted to TypeScript.
6
+ * Manual edits will be overwritten on next sync.
7
+ * To make changes, edit the upstream JavaScript file and run sync again.
8
+ */
9
+ import React from 'react';
10
+ import PropTypes from 'prop-types';
11
+ declare const ChartType: {
12
+ ({ onChange, value, availableChartTypes, chartTypeLabel }: {
13
+ onChange: any;
14
+ value: any;
15
+ availableChartTypes: any;
16
+ chartTypeLabel: any;
17
+ }): React.JSX.Element;
18
+ propTypes: {
19
+ onChange: PropTypes.Validator<(...args: any[]) => any>;
20
+ value: PropTypes.Validator<string>;
21
+ availableChartTypes: PropTypes.Requireable<PropTypes.InferProps<{
22
+ histogram: PropTypes.Requireable<string>;
23
+ bar: PropTypes.Requireable<string>;
24
+ lineDot: PropTypes.Requireable<string>;
25
+ lineCross: PropTypes.Requireable<string>;
26
+ dotPlot: PropTypes.Requireable<string>;
27
+ linePlot: PropTypes.Requireable<string>;
28
+ }>>;
29
+ chartTypeLabel: PropTypes.Requireable<string>;
30
+ };
31
+ };
32
+ export default ChartType;
@@ -0,0 +1,68 @@
1
+ import "react";
2
+ import e from "prop-types";
3
+ import { styled as t } from "@mui/material/styles";
4
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
5
+ import i from "@mui/material/MenuItem";
6
+ import a from "@mui/material/FormControl";
7
+ import o from "@mui/material/InputLabel";
8
+ import { Select as s } from "@mui/material";
9
+ //#region src/chart-type.tsx
10
+ var c = t("div")(() => ({ width: "160px" })), l = t(a)(() => ({ width: "160px" })), u = t(o)(() => ({ backgroundColor: "transparent" })), d = ({ onChange: e, value: t, availableChartTypes: a, chartTypeLabel: o }) => /* @__PURE__ */ n(c, { children: /* @__PURE__ */ r(l, {
11
+ variant: "outlined",
12
+ children: [/* @__PURE__ */ n(u, {
13
+ id: "type-helper-label",
14
+ children: o
15
+ }), /* @__PURE__ */ r(s, {
16
+ labelId: "type-helper-label",
17
+ id: "type-helper-label-select",
18
+ name: "chartType",
19
+ value: t,
20
+ onChange: e,
21
+ label: o,
22
+ MenuProps: { transitionDuration: {
23
+ enter: 225,
24
+ exit: 195
25
+ } },
26
+ children: [
27
+ a?.histogram && /* @__PURE__ */ n(i, {
28
+ value: "histogram",
29
+ children: a.histogram
30
+ }),
31
+ a?.bar && /* @__PURE__ */ n(i, {
32
+ value: "bar",
33
+ children: a.bar
34
+ }),
35
+ a?.lineDot && /* @__PURE__ */ n(i, {
36
+ value: "lineDot",
37
+ children: a.lineDot
38
+ }),
39
+ a?.lineCross && /* @__PURE__ */ n(i, {
40
+ value: "lineCross",
41
+ children: a.lineCross
42
+ }),
43
+ a?.dotPlot && /* @__PURE__ */ n(i, {
44
+ value: "dotPlot",
45
+ children: a.dotPlot
46
+ }),
47
+ a?.linePlot && /* @__PURE__ */ n(i, {
48
+ value: "linePlot",
49
+ children: a.linePlot
50
+ })
51
+ ]
52
+ })]
53
+ }) });
54
+ d.propTypes = {
55
+ onChange: e.func.isRequired,
56
+ value: e.string.isRequired,
57
+ availableChartTypes: e.shape({
58
+ histogram: e.string,
59
+ bar: e.string,
60
+ lineDot: e.string,
61
+ lineCross: e.string,
62
+ dotPlot: e.string,
63
+ linePlot: e.string
64
+ }),
65
+ chartTypeLabel: e.string
66
+ };
67
+ //#endregion
68
+ export { d as default };
@@ -0,0 +1,41 @@
1
+ /**
2
+ * @synced-from pie-lib/packages/charting/src/chart-types.js
3
+ * @auto-generated
4
+ *
5
+ * This file is automatically synced from pie-elements and converted to TypeScript.
6
+ * Manual edits will be overwritten on next sync.
7
+ * To make changes, edit the upstream JavaScript file and run sync again.
8
+ */
9
+ declare const _default: {
10
+ Bar: () => {
11
+ type: string;
12
+ Component: typeof import("./bars/bar.js").Bar;
13
+ name: string;
14
+ };
15
+ Histogram: () => {
16
+ type: string;
17
+ Component: typeof import("./bars/histogram.js").Histogram;
18
+ name: string;
19
+ };
20
+ LineDot: () => {
21
+ type: string;
22
+ Component: typeof import("./line/line-dot.js").LineDot;
23
+ name: string;
24
+ };
25
+ DotPlot: () => {
26
+ type: string;
27
+ Component: typeof import("./plot/dot.js").DotPlot;
28
+ name: string;
29
+ };
30
+ LinePlot: () => {
31
+ type: string;
32
+ Component: typeof import("./plot/line.js").LinePlot;
33
+ name: string;
34
+ };
35
+ LineCross: () => {
36
+ type: string;
37
+ Component: typeof import("./line/line-cross.js").LineCross;
38
+ name: string;
39
+ };
40
+ };
41
+ export default _default;
@@ -0,0 +1,17 @@
1
+ import e from "./bars/bar.js";
2
+ import t from "./bars/histogram.js";
3
+ import n from "./line/line-dot.js";
4
+ import r from "./line/line-cross.js";
5
+ import i from "./plot/dot.js";
6
+ import a from "./plot/line.js";
7
+ //#region src/chart-types.ts
8
+ var o = {
9
+ Bar: e,
10
+ Histogram: t,
11
+ LineDot: n,
12
+ DotPlot: i,
13
+ LinePlot: a,
14
+ LineCross: r
15
+ };
16
+ //#endregion
17
+ export { o as default };
@@ -0,0 +1,88 @@
1
+ /**
2
+ * @synced-from pie-lib/packages/charting/src/chart.jsx
3
+ * @auto-generated
4
+ *
5
+ * This file is automatically synced from pie-elements and converted to TypeScript.
6
+ * Manual edits will be overwritten on next sync.
7
+ * To make changes, edit the upstream JavaScript file and run sync again.
8
+ */
9
+ import React from 'react';
10
+ import PropTypes from 'prop-types';
11
+ export declare class Chart extends React.Component {
12
+ constructor(props: any);
13
+ static propTypes: {
14
+ className: PropTypes.Requireable<string>;
15
+ chartType: PropTypes.Validator<string>;
16
+ size: PropTypes.Requireable<PropTypes.InferProps<{
17
+ width: PropTypes.Requireable<number>;
18
+ height: PropTypes.Requireable<number>;
19
+ }>>;
20
+ domain: PropTypes.Requireable<PropTypes.InferProps<{
21
+ label: PropTypes.Requireable<string>;
22
+ min: PropTypes.Requireable<number>;
23
+ max: PropTypes.Requireable<number>;
24
+ axisLabel: PropTypes.Requireable<string>;
25
+ }>>;
26
+ data: PropTypes.Requireable<(PropTypes.InferProps<{
27
+ label: PropTypes.Requireable<string>;
28
+ value: PropTypes.Requireable<number>;
29
+ }> | null | undefined)[]>;
30
+ range: PropTypes.Requireable<PropTypes.InferProps<{
31
+ label: PropTypes.Requireable<string>;
32
+ min: PropTypes.Requireable<number>;
33
+ max: PropTypes.Requireable<number>;
34
+ step: PropTypes.Requireable<number>;
35
+ labelStep: PropTypes.Requireable<number>;
36
+ axisLabel: PropTypes.Requireable<string>;
37
+ }>>;
38
+ charts: PropTypes.Requireable<any[]>;
39
+ labelsPlaceholders: PropTypes.Requireable<object>;
40
+ title: PropTypes.Requireable<string>;
41
+ titlePlaceholder: PropTypes.Requireable<string>;
42
+ onDataChange: PropTypes.Requireable<(...args: any[]) => any>;
43
+ onChangeLabels: PropTypes.Requireable<(...args: any[]) => any>;
44
+ onChangeTitle: PropTypes.Requireable<(...args: any[]) => any>;
45
+ error: PropTypes.Requireable<any>;
46
+ addCategoryEnabled: PropTypes.Requireable<boolean>;
47
+ showPixelGuides: PropTypes.Requireable<boolean>;
48
+ categoryDefaultLabel: PropTypes.Requireable<string>;
49
+ categoryDefaults: PropTypes.Requireable<object>;
50
+ defineChart: PropTypes.Requireable<boolean>;
51
+ theme: PropTypes.Requireable<object>;
52
+ chartingOptions: PropTypes.Requireable<object>;
53
+ changeInteractiveEnabled: PropTypes.Requireable<boolean>;
54
+ changeEditableEnabled: PropTypes.Requireable<boolean>;
55
+ language: PropTypes.Requireable<string>;
56
+ mathMlOptions: PropTypes.Requireable<object>;
57
+ labelsCharactersLimit: PropTypes.Requireable<number>;
58
+ correctData: PropTypes.Requireable<(PropTypes.InferProps<{
59
+ label: PropTypes.Requireable<string>;
60
+ value: PropTypes.Requireable<number>;
61
+ }> | null | undefined)[]>;
62
+ };
63
+ static defaultProps: {
64
+ size: {
65
+ width: number;
66
+ height: number;
67
+ };
68
+ };
69
+ state: {
70
+ charts: {
71
+ type: string;
72
+ Component: typeof import("./bars/bar.jsx").Bar;
73
+ name: string;
74
+ }[];
75
+ autoFocus: boolean;
76
+ };
77
+ generateMaskId(): string;
78
+ handleAlertDialog: (open: any, callback: any) => void;
79
+ getChart: any;
80
+ changeData: any;
81
+ changeCategory: any;
82
+ addCategory: any;
83
+ deleteCategory: any;
84
+ getFilteredCategories: any;
85
+ resetAutoFocus: any;
86
+ render(): React.JSX.Element;
87
+ }
88
+ export default Chart;