@pie-lib/charting 8.0.10 → 8.0.11-next.20261202142832

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 (32) hide show
  1. package/dist/_virtual/_rolldown/runtime.js +6 -6
  2. package/dist/actions-button.js +42 -42
  3. package/dist/axes.js +166 -166
  4. package/dist/bars/bar.js +12 -12
  5. package/dist/bars/common/bars.js +59 -59
  6. package/dist/bars/histogram.js +12 -12
  7. package/dist/chart-setup.js +62 -62
  8. package/dist/chart-type.js +38 -38
  9. package/dist/chart.js +110 -110
  10. package/dist/common/correctness-indicators.js +22 -22
  11. package/dist/common/drag-handle.js +33 -33
  12. package/dist/common/drag-icon.js +11 -11
  13. package/dist/common/mark-slider.js +14 -14
  14. package/dist/grid.js +17 -17
  15. package/dist/i18n/index.js +4 -4
  16. package/dist/key-legend.js +28 -28
  17. package/dist/line/common/drag-handle.js +34 -34
  18. package/dist/line/common/line.js +56 -56
  19. package/dist/line/line-cross.js +61 -61
  20. package/dist/line/line-dot.js +48 -48
  21. package/dist/mark-label.js +45 -45
  22. package/dist/node_modules/.bun/@visx_text@4.0.0_d84c32d47042070f/node_modules/@visx/text/esm/hooks/useText.js +11 -11
  23. package/dist/node_modules/.bun/@visx_vendor@4.0.0/node_modules/@visx/vendor/esm/d3-interpolate.js +1 -1
  24. package/dist/node_modules/.bun/@visx_vendor@4.0.0/node_modules/@visx/vendor/esm/d3-scale.js +1 -1
  25. package/dist/node_modules/.bun/@visx_vendor@4.0.0/node_modules/@visx/vendor/esm/d3-shape.js +1 -1
  26. package/dist/node_modules/.bun/@visx_vendor@4.0.0/node_modules/@visx/vendor/esm/d3-time.js +1 -1
  27. package/dist/node_modules/.bun/classnames@2.5.1/node_modules/classnames/index.js +12 -11
  28. package/dist/node_modules/.bun/math-expression-evaluator@1.4.0/node_modules/math-expression-evaluator/src/postfix_evaluator.js +1 -1
  29. package/dist/plot/common/plot.js +116 -116
  30. package/dist/plot/dot.js +33 -33
  31. package/dist/plot/line.js +44 -44
  32. package/package.json +8 -8
@@ -1,19 +1,19 @@
1
- import e from "../../node_modules/.bun/@visx_group@4.0.0_d84c32d47042070f/node_modules/@visx/group/esm/Group.js";
2
- import t from "../../node_modules/.bun/@visx_shape@4.0.0_d84c32d47042070f/node_modules/@visx/shape/esm/shapes/Bar.js";
3
- import { bandKey as n } from "../../utils.js";
4
- import { D as r, DragHandle as i } from "../../common/drag-handle.js";
5
- import { DragHover as a } from "../../common/drag-hover.js";
6
- import { MarkSlider as o } from "../../common/mark-slider.js";
7
- import { CorrectCheckIcon as s } from "./correct-check-icon.js";
8
- import c from "react";
9
- import l from "prop-types";
10
- import { styled as u } from "@mui/material/styles";
11
- import d from "debug";
12
- import { types as f } from "@pie-lib/plot";
13
- import { color as p } from "@pie-lib/render-ui";
1
+ import e from "react";
2
+ import t from "prop-types";
3
+ import n from "../../node_modules/.bun/@visx_group@4.0.0_d84c32d47042070f/node_modules/@visx/group/esm/Group.js";
4
+ import r from "../../node_modules/.bun/@visx_shape@4.0.0_d84c32d47042070f/node_modules/@visx/shape/esm/shapes/Bar.js";
5
+ import { styled as i } from "@mui/material/styles";
6
+ import a from "debug";
7
+ import { color as o } from "@pie-lib/render-ui";
8
+ import { types as s } from "@pie-lib/plot";
9
+ import { bandKey as c } from "../../utils.js";
10
+ import { D as l, DragHandle as u } from "../../common/drag-handle.js";
11
+ import { DragHover as d } from "../../common/drag-hover.js";
12
+ import { MarkSlider as f } from "../../common/mark-slider.js";
13
+ import { CorrectCheckIcon as p } from "./correct-check-icon.js";
14
14
  import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
15
15
  // src/bars/common/bars.tsx
16
- var _ = d("pie-lib:chart:bars"), v = [
16
+ var _ = a("pie-lib:chart:bars"), v = [
17
17
  "#006699",
18
18
  "#F59B00",
19
19
  "#08916D",
@@ -39,30 +39,30 @@ var _ = d("pie-lib:chart:bars"), v = [
39
39
  "#167A7A",
40
40
  "#91862D",
41
41
  "#894A65"
42
- ], b = (e, t, n, r, i) => e && t && i ? r[n % r.length] : e && i ? p.visualElementsColors.ROLLOVER_FILL_BAR_COLOR : t || null, x = u(t)(() => ({ fill: p.defaults.TERTIARY })), S = 10, C = class extends c.Component {
42
+ ], b = (e, t, n, r, i) => e && t && i ? r[n % r.length] : e && i ? o.visualElementsColors.ROLLOVER_FILL_BAR_COLOR : t || null, x = i(r)(() => ({ fill: o.defaults.TERTIARY })), S = 10, C = class extends e.Component {
43
43
  static propTypes = {
44
- barColor: l.string,
45
- onChangeCategory: l.func,
46
- value: l.number,
47
- label: l.string,
48
- xBand: l.func,
49
- index: l.number.isRequired,
50
- graphProps: f.GraphPropsType.isRequired,
51
- interactive: l.bool,
52
- disabled: l.bool,
53
- correctness: l.shape({
54
- value: l.string,
55
- label: l.string
44
+ barColor: t.string,
45
+ onChangeCategory: t.func,
46
+ value: t.number,
47
+ label: t.string,
48
+ xBand: t.func,
49
+ index: t.number.isRequired,
50
+ graphProps: s.GraphPropsType.isRequired,
51
+ interactive: t.bool,
52
+ disabled: t.bool,
53
+ correctness: t.shape({
54
+ value: t.string,
55
+ label: t.string
56
56
  }),
57
- correctData: l.array,
58
- defineChart: l.bool,
59
- language: l.string
57
+ correctData: t.array,
58
+ defineChart: t.bool,
59
+ language: t.string
60
60
  };
61
61
  constructor(e) {
62
62
  super(e), this.state = {
63
63
  dragValue: void 0,
64
64
  isHovered: !1
65
- }, this.hover = new a((e) => this.setState({ isHovered: e })), this.mouseX = 0, this.mouseY = 0;
65
+ }, this.hover = new d((e) => this.setState({ isHovered: e })), this.mouseX = 0, this.mouseY = 0;
66
66
  }
67
67
  componentDidMount() {
68
68
  this.hover.attach(), window.addEventListener("mousemove", this.handleMouseMove);
@@ -99,16 +99,16 @@ var _ = d("pie-lib:chart:bars"), v = [
99
99
  _("[dragValue] next:", t), this.setDragValue(t);
100
100
  };
101
101
  render() {
102
- let { graphProps: e, value: t, label: a, xBand: c, index: l, interactive: u, disabled: d, correctness: f, barColor: _, defineChart: v, correctData: C, language: w } = this.props, { scale: T, range: E } = e, { dragValue: D, isHovered: O } = this.state, k = b(O, _, l, y, u && !f), A = Number.isFinite(D) ? D : t, j = c.bandwidth(), M = T.y(E.max - A), N = c(n({ label: a }, l)), P = E.max - A, F = E.max - P, I = C ? C.find((e) => e.label === a) : null, L = u ? r : i, R = !!_;
103
- return /* @__PURE__ */ g(o, {
102
+ let { graphProps: e, value: t, label: n, xBand: r, index: i, interactive: a, disabled: s, correctness: d, barColor: _, defineChart: v, correctData: C, language: w } = this.props, { scale: T, range: E } = e, { dragValue: D, isHovered: O } = this.state, k = b(O, _, i, y, a && !d), A = Number.isFinite(D) ? D : t, j = r.bandwidth(), M = T.y(E.max - A), N = r(c({ label: n }, i)), P = E.max - A, F = E.max - P, I = C ? C.find((e) => e.label === n) : null, L = a ? l : u, R = !!_;
103
+ return /* @__PURE__ */ g(f, {
104
104
  ref: (e) => this.gRef = e,
105
105
  onMouseEnter: this.handleMouseEnter,
106
106
  onMouseLeave: this.handleMouseLeave,
107
107
  onTouchStart: this.handleMouseEnter,
108
108
  onTouchEnd: this.handleMouseLeave,
109
- enabled: u && !d,
110
- label: a,
111
- index: l,
109
+ enabled: a && !s,
110
+ label: n,
111
+ index: i,
112
112
  value: A,
113
113
  graphProps: e,
114
114
  language: w,
@@ -127,13 +127,13 @@ var _ = d("pie-lib:chart:bars"), v = [
127
127
  height: M,
128
128
  style: { fill: k }
129
129
  }),
130
- f && f.value === "incorrect" && (() => {
130
+ d && d.value === "incorrect" && (() => {
131
131
  let e = parseFloat(I && I.value);
132
132
  if (isNaN(e)) return null;
133
- let t = T.y(E.max - e), n = M, r = Math.abs(t - n), i = T.y(e), a = t > n ? p.borderGray() : p.defaults.WHITE, o = t > n ? i : i - r;
133
+ let t = T.y(E.max - e), n = M, r = Math.abs(t - n), i = T.y(e), a = t > n ? o.borderGray() : o.defaults.WHITE, s = t > n ? i : i - r;
134
134
  return /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h(x, {
135
135
  x: N + 2,
136
- y: o,
136
+ y: s,
137
137
  width: j - 4,
138
138
  height: r,
139
139
  style: {
@@ -147,55 +147,55 @@ var _ = d("pie-lib:chart:bars"), v = [
147
147
  y: i - 12,
148
148
  width: 24,
149
149
  height: 24,
150
- children: /* @__PURE__ */ h(s, { dashColor: a })
150
+ children: /* @__PURE__ */ h(p, { dashColor: a })
151
151
  })] });
152
152
  })(),
153
153
  /* @__PURE__ */ h(L, {
154
154
  x: N,
155
155
  y: A,
156
156
  defineChart: v,
157
- interactive: u,
158
- disabled: d,
157
+ interactive: a,
158
+ disabled: s,
159
159
  width: j,
160
160
  onDragStart: this.dragStart,
161
161
  onDrag: (e) => this.dragValue(t, e),
162
162
  onDragStop: this.dragStop,
163
163
  graphProps: e,
164
- correctness: f,
164
+ correctness: d,
165
165
  isHovered: O,
166
166
  color: k
167
167
  })
168
168
  ]
169
169
  });
170
170
  }
171
- }, w = C, T = class extends c.Component {
171
+ }, w = C, T = class extends e.Component {
172
172
  static propTypes = {
173
- data: l.array,
174
- correctData: l.array,
175
- onChangeCategory: l.func,
176
- defineChart: l.bool,
177
- xBand: l.func,
178
- graphProps: f.GraphPropsType.isRequired,
179
- histogram: l.bool,
180
- language: l.string
173
+ data: t.array,
174
+ correctData: t.array,
175
+ onChangeCategory: t.func,
176
+ defineChart: t.bool,
177
+ xBand: t.func,
178
+ graphProps: s.GraphPropsType.isRequired,
179
+ histogram: t.bool,
180
+ language: t.string
181
181
  };
182
182
  render() {
183
- let { data: t, graphProps: n, xBand: r, onChangeCategory: i, defineChart: a, histogram: o, correctData: s, disabled: c, language: l } = this.props;
184
- return /* @__PURE__ */ h(e, { children: (t || []).map((e, t) => /* @__PURE__ */ h(w, {
183
+ let { data: e, graphProps: t, xBand: r, onChangeCategory: i, defineChart: a, histogram: o, correctData: s, disabled: c, language: l } = this.props;
184
+ return /* @__PURE__ */ h(n, { children: (e || []).map((e, n) => /* @__PURE__ */ h(w, {
185
185
  value: e.value,
186
186
  interactive: a || e.interactive,
187
187
  defineChart: a,
188
188
  disabled: c,
189
189
  label: e.label,
190
190
  xBand: r,
191
- index: t,
192
- onChangeCategory: (e) => i(t, e),
193
- graphProps: n,
191
+ index: n,
192
+ onChangeCategory: (e) => i(n, e),
193
+ graphProps: t,
194
194
  correctness: e.correctness,
195
195
  correctData: s,
196
196
  language: l,
197
- barColor: o && (v[t] ? v[t] : v[t % v.length])
198
- }, `bar-${e.label}-${t}`)) });
197
+ barColor: o && (v[n] ? v[n] : v[n % v.length])
198
+ }, `bar-${e.label}-${n}`)) });
199
199
  }
200
200
  };
201
201
  export { T as Bars, T as default, C as RawBar };
@@ -1,20 +1,20 @@
1
- import { dataToXBand as e } from "../utils.js";
2
- import { Bars as t } from "./common/bars.js";
3
- import n from "react";
4
- import r from "prop-types";
5
- import { types as i } from "@pie-lib/plot";
1
+ import e from "react";
2
+ import t from "prop-types";
3
+ import { types as n } from "@pie-lib/plot";
4
+ import { dataToXBand as r } from "../utils.js";
5
+ import { Bars as i } from "./common/bars.js";
6
6
  import { jsx as a } from "react/jsx-runtime";
7
7
  // src/bars/histogram.tsx
8
- var o = class extends n.Component {
8
+ var o = class extends e.Component {
9
9
  static propTypes = {
10
- data: r.array,
11
- onChange: r.func,
12
- graphProps: i.GraphPropsType.isRequired
10
+ data: t.array,
11
+ onChange: t.func,
12
+ graphProps: n.GraphPropsType.isRequired
13
13
  };
14
14
  render() {
15
- let n = this.props, { data: r, graphProps: i } = n, { scale: o = {}, size: s = {} } = i || {}, c = e(o.x, r, s.width, "histogram");
16
- return /* @__PURE__ */ a(t, {
17
- ...n,
15
+ let e = this.props, { data: t, graphProps: n } = e, { scale: o = {}, size: s = {} } = n || {}, c = r(o.x, t, s.width, "histogram");
16
+ return /* @__PURE__ */ a(i, {
17
+ ...e,
18
18
  xBand: c,
19
19
  histogram: !0
20
20
  });
@@ -1,11 +1,11 @@
1
- import e from "./chart-type.js";
2
- import { useEffect as t, useState as n } from "react";
3
- import r from "prop-types";
1
+ import { useEffect as e, useState as t } from "react";
2
+ import n from "prop-types";
3
+ import { color as r } from "@pie-lib/render-ui";
4
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";
5
+ import a from "@mui/material/Typography";
6
+ import o from "./chart-type.js";
7
+ import { AlertDialog as s, NumberTextFieldCustom as c } from "@pie-lib/config-ui";
8
+ import { jsx as l, jsxs as u } from "react/jsx-runtime";
9
9
  // src/chart-setup.tsx
10
10
  var d = (e, t, n, r, i) => {
11
11
  (e || []).forEach((e) => {
@@ -28,10 +28,10 @@ var d = (e, t, n, r, i) => {
28
28
  display: "flex",
29
29
  justifyContent: "space-around",
30
30
  alignItems: "center"
31
- })), g = i(o)(({ theme: e }) => ({
31
+ })), g = i(c)(({ theme: e }) => ({
32
32
  width: "130px",
33
33
  margin: `${e.spacing(1)} ${e.spacing(.5)}`
34
- })), _ = i(o)(({ theme: e }) => ({
34
+ })), _ = i(c)(({ theme: e }) => ({
35
35
  width: "160px",
36
36
  margin: `${e.spacing(1)} ${e.spacing(.5)}`
37
37
  })), v = i("div")(({ theme: e }) => ({
@@ -39,14 +39,14 @@ var d = (e, t, n, r, i) => {
39
39
  justifyContent: "space-between",
40
40
  alignItems: "center",
41
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({
42
+ })), y = i(a)(() => ({ color: r.disabled() })), b = (n) => {
43
+ let { model: r, onChange: i, chartDimensions: c, gridValues: b = {}, labelValues: x = {}, studentNewCategoryDefaultLabel: S = {}, availableChartTypes: C = {}, chartTypeLabel: w } = n, [T, E] = t({
44
44
  open: !1,
45
45
  title: "",
46
46
  text: "",
47
47
  onClose: null,
48
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 = {
49
+ }), [D, O] = t(!1), [k, A] = t(""), [j, M] = t(0), { range: N = {}, correctAnswer: P, changeInteractiveEnabled: F, changeEditableEnabled: I } = r, L = r.graph, { showInConfigPanel: R, width: z, height: B } = c || {}, V = {
50
50
  min: z?.min ? Math.max(50, z.min) : 50,
51
51
  max: z?.max ? Math.min(700, z.max) : 700,
52
52
  step: z?.step >= 1 ? Math.min(200, z.step) : 20
@@ -60,13 +60,13 @@ var d = (e, t, n, r, i) => {
60
60
  }, W = x && x.range ? { customValues: x.range } : {
61
61
  min: 0,
62
62
  max: 1e4
63
- }, G = /* @__PURE__ */ l(h, { children: [/* @__PURE__ */ c(_, {
63
+ }, G = /* @__PURE__ */ u(h, { children: [/* @__PURE__ */ l(_, {
64
64
  label: "Grid Interval",
65
65
  value: N.step,
66
66
  variant: "outlined",
67
67
  onChange: (e, t) => $("step", t, e),
68
68
  ...U
69
- }), /* @__PURE__ */ c(_, {
69
+ }), /* @__PURE__ */ l(_, {
70
70
  label: "Label Interval",
71
71
  value: N.labelStep,
72
72
  variant: "outlined",
@@ -78,12 +78,12 @@ var d = (e, t, n, r, i) => {
78
78
  open: e
79
79
  })), O(e);
80
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);
81
+ let { correctAnswer: t, data: n } = r;
82
+ F === !1 && q(n, "interactive"), I === !1 && q(n, "editable"), d(n, e, N, i, r), d(t.data, !1, N, i, r);
83
83
  }, Y = () => {
84
84
  let e = S?.label;
85
- o({
86
- ...i,
85
+ i({
86
+ ...r,
87
87
  studentCategoryDefaultLabel: e
88
88
  });
89
89
  }, X = (e) => e.includes("Plot") ? {
@@ -97,26 +97,26 @@ var d = (e, t, n, r, i) => {
97
97
  ...L,
98
98
  [e]: t
99
99
  };
100
- o({
101
- ...i,
100
+ i({
101
+ ...r,
102
102
  graph: n
103
103
  });
104
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,
105
+ M(N[e]), A(e), N[e] = t, (e === "max" || e === "step") && (Q(r.data, N) || Q(r.correctAnswer.data, N)) && n?.target ? O(!0) : i({
106
+ ...r,
107
107
  range: N
108
108
  });
109
109
  };
110
- t(() => {
110
+ e(() => {
111
111
  J(!0), Y();
112
- }, []), t(() => {
112
+ }, []), e(() => {
113
113
  D && E({
114
114
  open: !0,
115
115
  title: "Warning",
116
116
  text: "This change will remove values defined for one or more categories",
117
117
  onConfirm: () => {
118
- J(), K(!1), o({
119
- ...i,
118
+ J(), K(!1), i({
119
+ ...r,
120
120
  range: N,
121
121
  correctAnswer: P
122
122
  });
@@ -127,8 +127,8 @@ var d = (e, t, n, r, i) => {
127
127
  });
128
128
  }, [D]);
129
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,
130
+ X.min = 3, X.max = 10, N.max = 10, N.step = 1, N.labelStep = 1, i({
131
+ ...r,
132
132
  range: N
133
133
  });
134
134
  }, ne = (e) => {
@@ -139,8 +139,8 @@ var d = (e, t, n, r, i) => {
139
139
  title: "Warning",
140
140
  text: "The selected chart type does not support the current chart configuration. Reset chart configuration?",
141
141
  onConfirm: () => {
142
- te(), J(), K(!1), o({
143
- ...i,
142
+ te(), J(), K(!1), i({
143
+ ...r,
144
144
  range: N,
145
145
  chartType: e
146
146
  });
@@ -151,38 +151,38 @@ var d = (e, t, n, r, i) => {
151
151
  });
152
152
  return;
153
153
  }
154
- X.min = 3, X.max = 10, o({
155
- ...i,
154
+ X.min = 3, X.max = 10, i({
155
+ ...r,
156
156
  chartType: e
157
157
  });
158
- } else o({
159
- ...i,
158
+ } else i({
159
+ ...r,
160
160
  chartType: e
161
161
  });
162
162
  };
163
- return /* @__PURE__ */ l(f, { children: [
164
- /* @__PURE__ */ c(u, {
163
+ return /* @__PURE__ */ u(f, { children: [
164
+ /* @__PURE__ */ l(a, {
165
165
  variant: "subtitle1",
166
166
  children: "Configure Chart"
167
167
  }),
168
- /* @__PURE__ */ l(p, { children: [
169
- /* @__PURE__ */ l(h, { children: [/* @__PURE__ */ c(e, {
170
- value: i.chartType,
168
+ /* @__PURE__ */ u(p, { children: [
169
+ /* @__PURE__ */ u(h, { children: [/* @__PURE__ */ l(o, {
170
+ value: r.chartType,
171
171
  onChange: (e) => ne(e.target.value),
172
172
  availableChartTypes: C,
173
173
  chartTypeLabel: w
174
- }), /* @__PURE__ */ c(_, {
174
+ }), /* @__PURE__ */ l(_, {
175
175
  label: "Max Value",
176
176
  value: N.max,
177
- min: X(i.chartType).min,
178
- max: X(i.chartType).max,
177
+ min: X(r.chartType).min,
178
+ max: X(r.chartType).max,
179
179
  variant: "outlined",
180
180
  onChange: (e, t) => $("max", t, e)
181
181
  })] }),
182
- !i.chartType.includes("Plot") && G,
183
- R && /* @__PURE__ */ l(v, { children: [
184
- /* @__PURE__ */ c("div", { children: /* @__PURE__ */ c(u, { children: "Dimensions(px)" }) }),
185
- /* @__PURE__ */ l(m, { children: [/* @__PURE__ */ c(g, {
182
+ !r.chartType.includes("Plot") && G,
183
+ R && /* @__PURE__ */ u(v, { children: [
184
+ /* @__PURE__ */ l("div", { children: /* @__PURE__ */ l(a, { children: "Dimensions(px)" }) }),
185
+ /* @__PURE__ */ u(m, { children: [/* @__PURE__ */ l(g, {
186
186
  label: "Width",
187
187
  value: L.width,
188
188
  min: V.min,
@@ -190,8 +190,8 @@ var d = (e, t, n, r, i) => {
190
190
  step: V.step,
191
191
  variant: "outlined",
192
192
  onChange: (e, t) => Z("width", t)
193
- }), /* @__PURE__ */ c(y, { children: "Min 50, Max 700" })] }),
194
- /* @__PURE__ */ l(m, { children: [/* @__PURE__ */ c(g, {
193
+ }), /* @__PURE__ */ l(y, { children: "Min 50, Max 700" })] }),
194
+ /* @__PURE__ */ u(m, { children: [/* @__PURE__ */ l(g, {
195
195
  label: "Height",
196
196
  value: L.height,
197
197
  min: H.min,
@@ -199,10 +199,10 @@ var d = (e, t, n, r, i) => {
199
199
  step: H.step,
200
200
  variant: "outlined",
201
201
  onChange: (e, t) => Z("height", t)
202
- }), /* @__PURE__ */ c(y, { children: "Min 400, Max 700" })] })
202
+ }), /* @__PURE__ */ l(y, { children: "Min 400, Max 700" })] })
203
203
  ] })
204
204
  ] }),
205
- /* @__PURE__ */ c(a, {
205
+ /* @__PURE__ */ l(s, {
206
206
  open: T.open,
207
207
  title: T.title,
208
208
  text: T.text,
@@ -212,17 +212,17 @@ var d = (e, t, n, r, i) => {
212
212
  ] });
213
213
  };
214
214
  b.propTypes = {
215
- chartDimensions: r.object,
216
- domain: r.object,
217
- gridValues: r.object,
218
- labelValues: r.object,
219
- model: r.object,
220
- onChange: r.func,
221
- range: r.object,
222
- chartDimension: r.object,
223
- size: r.object,
224
- studentNewCategoryDefaultLabel: r.object,
225
- availableChartTypes: r.object,
226
- chartTypeLabel: r.string
215
+ chartDimensions: n.object,
216
+ domain: n.object,
217
+ gridValues: n.object,
218
+ labelValues: n.object,
219
+ model: n.object,
220
+ onChange: n.func,
221
+ range: n.object,
222
+ chartDimension: n.object,
223
+ size: n.object,
224
+ studentNewCategoryDefaultLabel: n.object,
225
+ availableChartTypes: n.object,
226
+ chartTypeLabel: n.string
227
227
  };
228
228
  export { b as default, d as resetValues };
@@ -1,71 +1,71 @@
1
1
  import "react";
2
- import e from "prop-types";
3
- import { styled as t } from "@mui/material/styles";
4
- import { useUniqueId as n } from "@pie-lib/render-ui";
5
- import { jsx as r, jsxs as i } from "react/jsx-runtime";
6
- import a from "@mui/material/MenuItem";
7
- import o from "@mui/material/FormControl";
8
- import s from "@mui/material/InputLabel";
9
- import { Select as c } from "@mui/material";
2
+ import { styled as e } from "@mui/material/styles";
3
+ import t from "@mui/material/MenuItem";
4
+ import n from "@mui/material/FormControl";
5
+ import r from "@mui/material/InputLabel";
6
+ import { Select as i } from "@mui/material";
7
+ import a from "prop-types";
8
+ import { useUniqueId as o } from "@pie-lib/render-ui";
9
+ import { jsx as s, jsxs as c } from "react/jsx-runtime";
10
10
  // src/chart-type.tsx
11
- var l = t("div")(() => ({ width: "160px" })), u = t(o)(() => ({ width: "160px" })), d = t(s)(() => ({ backgroundColor: "transparent" })), f = ({ onChange: e, value: t, availableChartTypes: o, chartTypeLabel: s }) => {
12
- let f = n("chart-type-label");
13
- return /* @__PURE__ */ r(l, { children: /* @__PURE__ */ i(u, {
11
+ var l = e("div")(() => ({ width: "160px" })), u = e(n)(() => ({ width: "160px" })), d = e(r)(() => ({ backgroundColor: "transparent" })), f = ({ onChange: e, value: n, availableChartTypes: r, chartTypeLabel: a }) => {
12
+ let f = o("chart-type-label");
13
+ return /* @__PURE__ */ s(l, { children: /* @__PURE__ */ c(u, {
14
14
  variant: "outlined",
15
- children: [/* @__PURE__ */ r(d, {
15
+ children: [/* @__PURE__ */ s(d, {
16
16
  id: f,
17
- children: s
18
- }), /* @__PURE__ */ i(c, {
17
+ children: a
18
+ }), /* @__PURE__ */ c(i, {
19
19
  labelId: f,
20
20
  id: `${f}-select`,
21
21
  name: "chartType",
22
- value: t,
22
+ value: n,
23
23
  onChange: e,
24
- label: s,
24
+ label: a,
25
25
  MenuProps: { transitionDuration: {
26
26
  enter: 225,
27
27
  exit: 195
28
28
  } },
29
29
  children: [
30
- o?.histogram && /* @__PURE__ */ r(a, {
30
+ r?.histogram && /* @__PURE__ */ s(t, {
31
31
  value: "histogram",
32
- children: o.histogram
32
+ children: r.histogram
33
33
  }),
34
- o?.bar && /* @__PURE__ */ r(a, {
34
+ r?.bar && /* @__PURE__ */ s(t, {
35
35
  value: "bar",
36
- children: o.bar
36
+ children: r.bar
37
37
  }),
38
- o?.lineDot && /* @__PURE__ */ r(a, {
38
+ r?.lineDot && /* @__PURE__ */ s(t, {
39
39
  value: "lineDot",
40
- children: o.lineDot
40
+ children: r.lineDot
41
41
  }),
42
- o?.lineCross && /* @__PURE__ */ r(a, {
42
+ r?.lineCross && /* @__PURE__ */ s(t, {
43
43
  value: "lineCross",
44
- children: o.lineCross
44
+ children: r.lineCross
45
45
  }),
46
- o?.dotPlot && /* @__PURE__ */ r(a, {
46
+ r?.dotPlot && /* @__PURE__ */ s(t, {
47
47
  value: "dotPlot",
48
- children: o.dotPlot
48
+ children: r.dotPlot
49
49
  }),
50
- o?.linePlot && /* @__PURE__ */ r(a, {
50
+ r?.linePlot && /* @__PURE__ */ s(t, {
51
51
  value: "linePlot",
52
- children: o.linePlot
52
+ children: r.linePlot
53
53
  })
54
54
  ]
55
55
  })]
56
56
  }) });
57
57
  };
58
58
  f.propTypes = {
59
- onChange: e.func.isRequired,
60
- value: e.string.isRequired,
61
- availableChartTypes: e.shape({
62
- histogram: e.string,
63
- bar: e.string,
64
- lineDot: e.string,
65
- lineCross: e.string,
66
- dotPlot: e.string,
67
- linePlot: e.string
59
+ onChange: a.func.isRequired,
60
+ value: a.string.isRequired,
61
+ availableChartTypes: a.shape({
62
+ histogram: a.string,
63
+ bar: a.string,
64
+ lineDot: a.string,
65
+ lineCross: a.string,
66
+ dotPlot: a.string,
67
+ linePlot: a.string
68
68
  }),
69
- chartTypeLabel: e.string
69
+ chartTypeLabel: a.string
70
70
  };
71
71
  export { f as default };