@pie-lib/charting 8.0.1-next.20261004181842 → 8.0.1-next.20261004202944

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.
@@ -0,0 +1 @@
1
+ export {};
@@ -1,8 +1,8 @@
1
1
  import e from "react";
2
2
  import t from "prop-types";
3
3
  import { styled as n } from "@mui/material/styles";
4
- import { jsx as r, jsxs as i } from "react/jsx-runtime";
5
- import { color as a } from "@pie-lib/render-ui";
4
+ import { color as r } from "@pie-lib/render-ui";
5
+ import { jsx as i, jsxs as a } from "react/jsx-runtime";
6
6
  import o from "@pie-lib/translator";
7
7
  import s from "@mui/material/Button";
8
8
  import c from "@mui/material/Popover";
@@ -11,7 +11,7 @@ import l from "@mui/material/Paper";
11
11
  var { translator: u } = o, d = n("div")(() => ({ alignSelf: "flex-end" })), f = n("div")(({ theme: e }) => ({
12
12
  cursor: "pointer",
13
13
  fontSize: e.typography.fontSize,
14
- color: a.tertiary(),
14
+ color: r.tertiary(),
15
15
  padding: e.spacing(1)
16
16
  })), p = n(l)(({ theme: e }) => ({
17
17
  padding: e.spacing(1),
@@ -21,7 +21,7 @@ var { translator: u } = o, d = n("div")(() => ({ alignSelf: "flex-end" })), f =
21
21
  "& button": {
22
22
  textTransform: "none",
23
23
  fontSize: e.typography.fontSize,
24
- color: a.text(),
24
+ color: r.text(),
25
25
  justifyContent: "flex-start"
26
26
  }
27
27
  })), m = class extends e.Component {
@@ -53,12 +53,12 @@ var { translator: u } = o, d = n("div")(() => ({ alignSelf: "flex-end" })), f =
53
53
  };
54
54
  render() {
55
55
  let { categories: e, language: t } = this.props, { actionsAnchorEl: n } = this.state;
56
- return /* @__PURE__ */ i(d, { children: [/* @__PURE__ */ r(f, {
56
+ return /* @__PURE__ */ a(d, { children: [/* @__PURE__ */ i(f, {
57
57
  role: "button",
58
58
  tabIndex: 0,
59
59
  onClick: this.handleActionsClick,
60
60
  children: "Actions"
61
- }), /* @__PURE__ */ r(c, {
61
+ }), /* @__PURE__ */ i(c, {
62
62
  open: !!n,
63
63
  anchorEl: n,
64
64
  onClose: this.handleActionsClose,
@@ -70,10 +70,10 @@ var { translator: u } = o, d = n("div")(() => ({ alignSelf: "flex-end" })), f =
70
70
  vertical: "top",
71
71
  horizontal: "left"
72
72
  },
73
- children: /* @__PURE__ */ i(p, { children: [/* @__PURE__ */ i(s, {
73
+ children: /* @__PURE__ */ a(p, { children: [/* @__PURE__ */ a(s, {
74
74
  onClick: () => this.handleAddCategory(),
75
75
  children: ["+ ", u.t("charting.add", { lng: t })]
76
- }), e.length > 0 && e.map((e, n) => e.deletable && !e.correctness && /* @__PURE__ */ r(s, {
76
+ }), e.length > 0 && e.map((e, n) => e.deletable && !e.correctness && /* @__PURE__ */ i(s, {
77
77
  onClick: () => this.handleDeleteCategory(n),
78
78
  children: `${u.t("charting.delete", { lng: t })} <${e.label || u.t("charting.newLabel", { lng: t })}>`
79
79
  }, n))] })
package/dist/axes.js CHANGED
@@ -8,8 +8,8 @@ import c from "prop-types";
8
8
  import { styled as l } from "@mui/material/styles";
9
9
  import { types as u } from "@pie-lib/plot";
10
10
  import { AlertDialog as d } from "@pie-lib/config-ui";
11
- import { jsx as f, jsxs as p } from "react/jsx-runtime";
12
- import { color as m } from "@pie-lib/render-ui";
11
+ import { color as f } from "@pie-lib/render-ui";
12
+ import { jsx as p, jsxs as m } from "react/jsx-runtime";
13
13
  import h from "@mui/material/Checkbox";
14
14
  import { renderMath as g } from "@pie-element/shared-math-rendering-mathjax";
15
15
  import _ from "@pie-lib/translator";
@@ -29,15 +29,15 @@ function S(e) {
29
29
  var C = l("text")(({ theme: e }) => ({
30
30
  fontSize: e.typography.fontSize - 2,
31
31
  fill: e.palette.error.main
32
- })), w = l(h)(() => ({ color: `${m.tertiary()} !important` })), T = l("g")(({ theme: e }) => ({
32
+ })), w = l(h)(() => ({ color: `${f.tertiary()} !important` })), T = l("g")(({ theme: e }) => ({
33
33
  "& .vx-axis-line": {
34
- stroke: m.visualElementsColors.AXIS_LINE_COLOR,
34
+ stroke: f.visualElementsColors.AXIS_LINE_COLOR,
35
35
  strokeWidth: 2
36
36
  },
37
37
  "& .vx-axis-tick": {
38
- fill: m.visualElementsColors.AXIS_TICK_COLOR,
38
+ fill: f.visualElementsColors.AXIS_TICK_COLOR,
39
39
  "& line": {
40
- stroke: m.visualElementsColors.AXIS_TICK_COLOR,
40
+ stroke: f.visualElementsColors.AXIS_TICK_COLOR,
41
41
  strokeWidth: 2
42
42
  },
43
43
  fontFamily: e.typography.body1?.fontFamily,
@@ -46,14 +46,14 @@ var C = l("text")(({ theme: e }) => ({
46
46
  }
47
47
  })), E = (e) => ({
48
48
  borderRadius: e.spacing(2),
49
- color: m.defaults.WHITE,
49
+ color: f.defaults.WHITE,
50
50
  fontSize: "16px",
51
51
  width: "16px",
52
52
  height: "16px",
53
53
  padding: "2px",
54
- border: `1px solid ${m.defaults.WHITE}`,
54
+ border: `1px solid ${f.defaults.WHITE}`,
55
55
  boxSizing: "unset"
56
- }), D = { backgroundColor: m.incorrectWithIcon() }, O = { backgroundColor: m.correct() }, k = class extends s.Component {
56
+ }), D = { backgroundColor: f.incorrectWithIcon() }, O = { backgroundColor: f.correct() }, k = class extends s.Component {
57
57
  static propTypes = {
58
58
  defineChart: c.bool,
59
59
  error: c.any
@@ -113,15 +113,15 @@ var C = l("text")(({ theme: e }) => ({
113
113
  return n;
114
114
  };
115
115
  render() {
116
- let { categories: e, xBand: t, bandWidth: i, barWidth: a, rotate: s, top: c, graphProps: l, defineChart: u, chartingOptions: m, x: h, y: g, formattedValue: _, changeInteractiveEnabled: y, changeEditableEnabled: b, error: x, autoFocus: S, hiddenLabelRef: T, showCorrectness: k, language: A } = this.props;
116
+ let { categories: e, xBand: t, bandWidth: i, barWidth: a, rotate: s, top: c, graphProps: l, defineChart: u, chartingOptions: f, x: h, y: g, formattedValue: _, changeInteractiveEnabled: y, changeEditableEnabled: b, error: x, autoFocus: S, hiddenLabelRef: T, showCorrectness: k, language: A } = this.props;
117
117
  if (!_) return null;
118
118
  let j = {
119
119
  correctnessIcon: E,
120
120
  incorrectIcon: D,
121
121
  correctIcon: O
122
- }, { dialog: M } = this.state, { changeEditable: N, changeInteractive: P } = m || {}, F = parseInt(_.split("-")[0], 10), I = e[F], { editable: L, interactive: R, label: z, correctness: B } = I || {}, V = t(r({ label: z }, F)), H = (e || []).reduce((e, t) => (e && e.label ? e.label.length : 0) > (t && t.label ? t.label.length : 0) ? e : t, { label: "" }), U = x ? [...new Set(Object.values(x))].join(" ") : "";
123
- return /* @__PURE__ */ p("g", { children: [
124
- /* @__PURE__ */ p("foreignObject", {
122
+ }, { dialog: M } = this.state, { changeEditable: N, changeInteractive: P } = f || {}, F = parseInt(_.split("-")[0], 10), I = e[F], { editable: L, interactive: R, label: z, correctness: B } = I || {}, V = t(r({ label: z }, F)), H = (e || []).reduce((e, t) => (e && e.label ? e.label.length : 0) > (t && t.label ? t.label.length : 0) ? e : t, { label: "" }), U = x ? [...new Set(Object.values(x))].join(" ") : "";
123
+ return /* @__PURE__ */ m("g", { children: [
124
+ /* @__PURE__ */ m("foreignObject", {
125
125
  x: i ? V : h - a / 2,
126
126
  y: 18,
127
127
  width: a,
@@ -130,14 +130,14 @@ var C = l("text")(({ theme: e }) => ({
130
130
  pointerEvents: "none",
131
131
  overflow: "visible"
132
132
  },
133
- children: [F === 0 && /* @__PURE__ */ f(o, {
133
+ children: [F === 0 && /* @__PURE__ */ p(o, {
134
134
  isHiddenLabel: !0,
135
135
  inputRef: T,
136
136
  disabled: !0,
137
137
  mark: H,
138
138
  graphProps: l,
139
139
  barWidth: a
140
- }), /* @__PURE__ */ f(o, {
140
+ }), /* @__PURE__ */ p(o, {
141
141
  autoFocus: u && S,
142
142
  inputRef: (e) => this.input = e,
143
143
  disabled: !u && !L,
@@ -153,23 +153,23 @@ var C = l("text")(({ theme: e }) => ({
153
153
  index: F + 1
154
154
  }),
155
155
  limitCharacters: !0,
156
- correctnessIndicator: k && B && /* @__PURE__ */ f(n, {
156
+ correctnessIndicator: k && B && /* @__PURE__ */ p(n, {
157
157
  correctness: B,
158
158
  interactive: R,
159
159
  classes: j
160
160
  })
161
161
  })]
162
162
  }),
163
- x && F === 0 && /* @__PURE__ */ f(C, {
163
+ x && F === 0 && /* @__PURE__ */ p(C, {
164
164
  y: g + 23,
165
165
  height: 6,
166
166
  textAnchor: "start",
167
167
  children: U
168
168
  }),
169
- u && F === 0 && /* @__PURE__ */ p("svg", {
169
+ u && F === 0 && /* @__PURE__ */ m("svg", {
170
170
  x: -55,
171
171
  style: { overflow: "visible" },
172
- children: [y && /* @__PURE__ */ f("text", {
172
+ children: [y && /* @__PURE__ */ p("text", {
173
173
  y: g + 90 + c,
174
174
  width: a,
175
175
  height: 4,
@@ -180,12 +180,12 @@ var C = l("text")(({ theme: e }) => ({
180
180
  maxWidth: a,
181
181
  display: "inline-block"
182
182
  },
183
- children: this.splitText(P?.authoringLabel, 20).map((e, t) => /* @__PURE__ */ f("tspan", {
183
+ children: this.splitText(P?.authoringLabel, 20).map((e, t) => /* @__PURE__ */ p("tspan", {
184
184
  x: "0",
185
185
  dy: `${t > 0 ? "1.2em" : ".6em"}`,
186
186
  children: e
187
187
  }, t))
188
- }), b && /* @__PURE__ */ f("text", {
188
+ }), b && /* @__PURE__ */ p("text", {
189
189
  y: g + 145 + c,
190
190
  width: a,
191
191
  height: 4,
@@ -196,14 +196,14 @@ var C = l("text")(({ theme: e }) => ({
196
196
  maxWidth: a,
197
197
  display: "inline-block"
198
198
  },
199
- children: this.splitText(N?.authoringLabel, 20).map((e, t) => /* @__PURE__ */ f("tspan", {
199
+ children: this.splitText(N?.authoringLabel, 20).map((e, t) => /* @__PURE__ */ p("tspan", {
200
200
  x: "0",
201
201
  dy: `${t > 0 ? "1.2em" : ".6em"}`,
202
202
  children: e
203
203
  }, t))
204
204
  })]
205
205
  }),
206
- u && y && /* @__PURE__ */ f("foreignObject", {
206
+ u && y && /* @__PURE__ */ p("foreignObject", {
207
207
  x: h - 24,
208
208
  y: g + 80 + c,
209
209
  width: a,
@@ -212,13 +212,13 @@ var C = l("text")(({ theme: e }) => ({
212
212
  pointerEvents: "visible",
213
213
  overflow: "visible"
214
214
  },
215
- children: /* @__PURE__ */ f(w, {
215
+ children: /* @__PURE__ */ p(w, {
216
216
  style: { position: "fixed" },
217
217
  checked: R,
218
218
  onChange: (e) => this.changeInteractive(F, e.target.checked)
219
219
  })
220
220
  }),
221
- u && b && /* @__PURE__ */ f("foreignObject", {
221
+ u && b && /* @__PURE__ */ p("foreignObject", {
222
222
  x: h - 24,
223
223
  y: g + 130 + c,
224
224
  width: a,
@@ -227,13 +227,13 @@ var C = l("text")(({ theme: e }) => ({
227
227
  pointerEvents: "visible",
228
228
  overflow: "visible"
229
229
  },
230
- children: /* @__PURE__ */ f(w, {
230
+ children: /* @__PURE__ */ p(w, {
231
231
  style: { position: "fixed" },
232
232
  checked: L,
233
233
  onChange: (e) => this.changeEditable(F, e.target.checked)
234
234
  })
235
235
  }),
236
- /* @__PURE__ */ f("foreignObject", {
236
+ /* @__PURE__ */ p("foreignObject", {
237
237
  x: h - 24,
238
238
  y: g + 100 + c,
239
239
  width: a,
@@ -242,7 +242,7 @@ var C = l("text")(({ theme: e }) => ({
242
242
  pointerEvents: "visible",
243
243
  overflow: "visible"
244
244
  },
245
- children: /* @__PURE__ */ f(d, {
245
+ children: /* @__PURE__ */ p(d, {
246
246
  open: M.open,
247
247
  title: M.title,
248
248
  text: M.text,
@@ -332,11 +332,11 @@ var A = class extends s.Component {
332
332
  e.categories !== this.props.categories && (this._updateTimer && clearTimeout(this._updateTimer), this._updateTimer = setTimeout(() => this.measureHiddenLabel(), 50));
333
333
  }
334
334
  render() {
335
- let { graphProps: n, xBand: r, leftAxis: o, onChange: s, onChangeCategory: c, categories: l = [], top: u, defineChart: d, chartingOptions: m, changeInteractiveEnabled: h, changeEditableEnabled: g, theme: _, autoFocus: v, onAutoFocusUsed: y, error: b, showCorrectness: x, language: S } = this.props, { scale: C = {}, range: w = {}, domain: E = {}, size: D = {} } = n || {}, { height: O, width: A } = this.state, j = r && typeof r.rangeRound == "function" && r.rangeRound([0, D.width]), M = r && typeof r.bandwidth == "function" && r.bandwidth(), N = M || C.x && C.x(E.max) / l.length, P = a({
335
+ let { graphProps: n, xBand: r, leftAxis: o, onChange: s, onChangeCategory: c, categories: l = [], top: u, defineChart: d, chartingOptions: f, changeInteractiveEnabled: h, changeEditableEnabled: g, theme: _, autoFocus: v, onAutoFocusUsed: y, error: b, showCorrectness: x, language: S } = this.props, { scale: C = {}, range: w = {}, domain: E = {}, size: D = {} } = n || {}, { height: O, width: A } = this.state, j = r && typeof r.rangeRound == "function" && r.rangeRound([0, D.width]), M = r && typeof r.bandwidth == "function" && r.bandwidth(), N = M || C.x && C.x(E.max) / l.length, P = a({
336
336
  ...w,
337
337
  step: w.labelStep
338
338
  }), F = i(_ && _.typography ? _.typography.fontSize : 14, O), I = A > N ? 25 : 0;
339
- return /* @__PURE__ */ p(T, { children: [o && /* @__PURE__ */ f(e, {
339
+ return /* @__PURE__ */ m(T, { children: [o && /* @__PURE__ */ p(e, {
340
340
  scale: C.y,
341
341
  tickLength: 10,
342
342
  tickFormat: (e) => e,
@@ -345,13 +345,13 @@ var A = class extends s.Component {
345
345
  dy: 4,
346
346
  dx: -10 - (e.toLocaleString().length || 1) * 5
347
347
  })
348
- }), /* @__PURE__ */ f(t, {
348
+ }), /* @__PURE__ */ p(t, {
349
349
  scale: j,
350
350
  labelProps: { y: 60 + u },
351
351
  top: C.y && C.y(w.min),
352
352
  textLabelProps: () => ({ textAnchor: "middle" }),
353
353
  tickFormat: (e) => e,
354
- tickComponent: (e) => /* @__PURE__ */ f(k, {
354
+ tickComponent: (e) => /* @__PURE__ */ p(k, {
355
355
  hiddenLabelRef: this.setHiddenLabelRef,
356
356
  categories: l,
357
357
  xBand: r,
@@ -360,7 +360,7 @@ var A = class extends s.Component {
360
360
  rotate: F || I,
361
361
  top: u,
362
362
  defineChart: d,
363
- chartingOptions: m,
363
+ chartingOptions: f,
364
364
  autoFocus: v,
365
365
  onAutoFocusUsed: y,
366
366
  error: b,
@@ -8,8 +8,8 @@ import s from "prop-types";
8
8
  import { styled as c } from "@mui/material/styles";
9
9
  import l from "debug";
10
10
  import { types as u } from "@pie-lib/plot";
11
- import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
12
- import { color as m } from "@pie-lib/render-ui";
11
+ import { color as d } from "@pie-lib/render-ui";
12
+ import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
13
13
  //#region src/bars/common/bars.tsx
14
14
  var h = l("pie-lib:chart:bars"), g = [
15
15
  "#006699",
@@ -37,7 +37,7 @@ var h = l("pie-lib:chart:bars"), g = [
37
37
  "#167A7A",
38
38
  "#91862D",
39
39
  "#894A65"
40
- ], v = (e, t, n, r, i) => e && t && i ? r[n % r.length] : e && i ? m.visualElementsColors.ROLLOVER_FILL_BAR_COLOR : t || null, y = c(t)(() => ({ fill: m.defaults.TERTIARY })), b = class extends o.Component {
40
+ ], v = (e, t, n, r, i) => e && t && i ? r[n % r.length] : e && i ? d.visualElementsColors.ROLLOVER_FILL_BAR_COLOR : t || null, y = c(t)(() => ({ fill: d.defaults.TERTIARY })), b = class extends o.Component {
41
41
  static propTypes = {
42
42
  barColor: s.string,
43
43
  onChangeCategory: s.func,
@@ -90,14 +90,14 @@ var h = l("pie-lib:chart:bars"), g = [
90
90
  };
91
91
  render() {
92
92
  let { graphProps: e, value: t, label: o, xBand: s, index: c, interactive: l, correctness: u, barColor: h, defineChart: g, correctData: b } = this.props, { scale: x, range: S } = e, { dragValue: C, isHovered: w } = this.state, T = v(w, h, c, _, l && !u), E = Number.isFinite(C) ? C : t, D = s.bandwidth(), O = x.y(S.max - E), k = s(n({ label: o }, c)), A = S.max - E, j = S.max - A, M = b ? b.find((e) => e.label === o) : null, N = l ? r : i, P = !!h;
93
- return /* @__PURE__ */ p("g", {
93
+ return /* @__PURE__ */ m("g", {
94
94
  ref: (e) => this.gRef = e,
95
95
  onMouseEnter: this.handleMouseEnter,
96
96
  onMouseLeave: this.handleMouseLeave,
97
97
  onTouchStart: this.handleMouseEnter,
98
98
  onTouchEnd: this.handleMouseLeave,
99
99
  children: [
100
- /* @__PURE__ */ f(y, {
100
+ /* @__PURE__ */ p(y, {
101
101
  x: k,
102
102
  y: x.y(j),
103
103
  width: D,
@@ -107,8 +107,8 @@ var h = l("pie-lib:chart:bars"), g = [
107
107
  u && u.value === "incorrect" && (() => {
108
108
  let e = parseFloat(M && M.value);
109
109
  if (isNaN(e)) return null;
110
- let t = x.y(S.max - e), n = O, r = Math.abs(t - n), i = x.y(e), o = t > n ? m.borderGray() : m.defaults.WHITE, s = t > n ? i : i - r;
111
- return /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f(y, {
110
+ let t = x.y(S.max - e), n = O, r = Math.abs(t - n), i = x.y(e), o = t > n ? d.borderGray() : d.defaults.WHITE, s = t > n ? i : i - r;
111
+ return /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(y, {
112
112
  x: k + 2,
113
113
  y: s,
114
114
  width: D - 4,
@@ -119,15 +119,15 @@ var h = l("pie-lib:chart:bars"), g = [
119
119
  strokeDasharray: "5,2",
120
120
  fill: "none"
121
121
  }
122
- }), /* @__PURE__ */ f("foreignObject", {
122
+ }), /* @__PURE__ */ p("foreignObject", {
123
123
  x: k + D - (P ? 24 : 14),
124
124
  y: i - 12,
125
125
  width: 24,
126
126
  height: 24,
127
- children: /* @__PURE__ */ f(a, { dashColor: o })
127
+ children: /* @__PURE__ */ p(a, { dashColor: o })
128
128
  })] });
129
129
  })(),
130
- /* @__PURE__ */ f(N, {
130
+ /* @__PURE__ */ p(N, {
131
131
  x: k,
132
132
  y: E,
133
133
  defineChart: g,
@@ -155,7 +155,7 @@ var h = l("pie-lib:chart:bars"), g = [
155
155
  };
156
156
  render() {
157
157
  let { data: t, graphProps: n, xBand: r, onChangeCategory: i, defineChart: a, histogram: o, correctData: s } = this.props;
158
- return /* @__PURE__ */ f(e, { children: (t || []).map((e, t) => /* @__PURE__ */ f(x, {
158
+ return /* @__PURE__ */ p(e, { children: (t || []).map((e, t) => /* @__PURE__ */ p(x, {
159
159
  value: e.value,
160
160
  interactive: a || e.interactive,
161
161
  defineChart: a,
@@ -1,50 +1,54 @@
1
1
  import "react";
2
2
  import e from "prop-types";
3
- import { jsx as t, jsxs as n } from "react/jsx-runtime";
3
+ import { useUniqueId as t } from "@pie-lib/render-ui";
4
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
4
5
  //#region src/bars/common/correct-check-icon.tsx
5
- var r = ({ dashColor: e }) => /* @__PURE__ */ n("svg", {
6
- width: "24",
7
- height: "24",
8
- viewBox: "0 0 24 24",
9
- fill: "none",
10
- xmlns: "http://www.w3.org/2000/svg",
11
- children: [
12
- /* @__PURE__ */ t("circle", {
13
- cx: "12",
14
- cy: "12",
15
- r: "11",
16
- fill: "white",
17
- stroke: e || "#7E8494",
18
- strokeWidth: "2",
19
- strokeDasharray: "5 5"
20
- }),
21
- /* @__PURE__ */ n("mask", {
22
- id: "path-2-outside-1_3089_3799",
23
- maskUnits: "userSpaceOnUse",
24
- x: "2",
25
- y: "3",
26
- width: "19",
27
- height: "18",
28
- fill: "black",
29
- children: [/* @__PURE__ */ t("rect", {
6
+ var i = ({ dashColor: e }) => {
7
+ let i = t("correct-check-mask");
8
+ return /* @__PURE__ */ r("svg", {
9
+ width: "24",
10
+ height: "24",
11
+ viewBox: "0 0 24 24",
12
+ fill: "none",
13
+ xmlns: "http://www.w3.org/2000/svg",
14
+ children: [
15
+ /* @__PURE__ */ n("circle", {
16
+ cx: "12",
17
+ cy: "12",
18
+ r: "11",
30
19
  fill: "white",
20
+ stroke: e || "#7E8494",
21
+ strokeWidth: "2",
22
+ strokeDasharray: "5 5"
23
+ }),
24
+ /* @__PURE__ */ r("mask", {
25
+ id: i,
26
+ maskUnits: "userSpaceOnUse",
31
27
  x: "2",
32
28
  y: "3",
33
29
  width: "19",
34
- height: "18"
35
- }), /* @__PURE__ */ t("path", { d: "M12 20C9.125 20 6.5 18.5 5.0625 16C3.625 13.5312 3.625 10.5 5.0625 8C6.5 5.53125 9.125 4 12 4C14.8438 4 17.4688 5.53125 18.9062 8C20.3438 10.5 20.3438 13.5312 18.9062 16C17.4688 18.5 14.8438 20 12 20ZM15.5312 10.5312H15.5C15.8125 10.25 15.8125 9.78125 15.5 9.46875C15.2188 9.1875 14.75 9.1875 14.4688 9.46875L11 12.9688L9.53125 11.5C9.21875 11.1875 8.75 11.1875 8.46875 11.5C8.15625 11.7812 8.15625 12.25 8.46875 12.5312L10.4688 14.5312C10.75 14.8438 11.2188 14.8438 11.5312 14.5312L15.5312 10.5312Z" })]
36
- }),
37
- /* @__PURE__ */ t("path", {
38
- d: "M12 20C9.125 20 6.5 18.5 5.0625 16C3.625 13.5312 3.625 10.5 5.0625 8C6.5 5.53125 9.125 4 12 4C14.8438 4 17.4688 5.53125 18.9062 8C20.3438 10.5 20.3438 13.5312 18.9062 16C17.4688 18.5 14.8438 20 12 20ZM15.5312 10.5312H15.5C15.8125 10.25 15.8125 9.78125 15.5 9.46875C15.2188 9.1875 14.75 9.1875 14.4688 9.46875L11 12.9688L9.53125 11.5C9.21875 11.1875 8.75 11.1875 8.46875 11.5C8.15625 11.7812 8.15625 12.25 8.46875 12.5312L10.4688 14.5312C10.75 14.8438 11.2188 14.8438 11.5312 14.5312L15.5312 10.5312Z",
39
- fill: "#0EA449"
40
- }),
41
- /* @__PURE__ */ t("path", {
42
- d: "M5.0625 16L5.92942 15.5015L5.92668 15.4968L5.0625 16ZM5.0625 8L4.19831 7.4968L4.19559 7.50153L5.0625 8ZM18.9062 8L19.7732 7.50152L19.7704 7.49681L18.9062 8ZM18.9062 16L18.0421 15.4968L18.0393 15.5015L18.9062 16ZM15.5312 10.5312L16.2384 11.2384L17.9455 9.53125H15.5312V10.5312ZM15.5 10.5312L14.831 9.78796L12.894 11.5312H15.5V10.5312ZM14.4688 9.46875L13.7616 8.76164L13.7585 8.76482L14.4688 9.46875ZM11 12.9688L10.2929 13.6759L11.0032 14.3861L11.7103 13.6727L11 12.9688ZM8.46875 11.5L9.13771 12.2433L9.17684 12.2081L9.21204 12.169L8.46875 11.5ZM8.46875 12.5312L9.17586 11.8241L9.15726 11.8055L9.13771 11.788L8.46875 12.5312ZM10.4688 14.5312L11.212 13.8623L11.1945 13.8427L11.1759 13.8241L10.4688 14.5312ZM12 20V19C9.479 19 7.18657 17.6879 5.92941 15.5015L5.0625 16L4.19559 16.4985C5.81343 19.3121 8.771 21 12 21V20ZM5.0625 16L5.92668 15.4968C4.6714 13.341 4.66824 10.6918 5.92941 8.49847L5.0625 8L4.19559 7.50153C2.58176 10.3082 2.5786 13.7215 4.19832 16.5032L5.0625 16ZM5.0625 8L5.92668 8.50319C7.18712 6.33851 9.48502 5 12 5V4V3C8.76498 3 5.81288 4.72399 4.19832 7.49681L5.0625 8ZM12 4V5C14.4816 5 16.7805 6.33661 18.0421 8.50319L18.9062 8L19.7704 7.49681C18.157 4.72589 15.2059 3 12 3V4ZM18.9062 8L18.0393 8.49847C19.3005 10.6918 19.2973 13.341 18.0421 15.4968L18.9062 16L19.7704 16.5032C21.3902 13.7215 21.387 10.3082 19.7732 7.50153L18.9062 8ZM18.9062 16L18.0393 15.5015C16.7811 17.6898 14.4876 19 12 19V20V21C15.1999 21 18.1564 19.3102 19.7732 16.4985L18.9062 16ZM15.5312 10.5312V9.53125H15.5V10.5312V11.5312H15.5312V10.5312ZM15.5 10.5312L16.169 11.2745C16.9447 10.5764 16.8883 9.44281 16.2071 8.76164L15.5 9.46875L14.7929 10.1759C14.7696 10.1525 14.7344 10.0966 14.7344 10.0117C14.7344 9.92377 14.7735 9.83972 14.831 9.78796L15.5 10.5312ZM15.5 9.46875L16.2071 8.76164C15.5353 8.08987 14.4334 8.08987 13.7616 8.76164L14.4688 9.46875L15.1759 10.1759C15.1167 10.235 15.0442 10.2578 14.9844 10.2578C14.9245 10.2578 14.8521 10.235 14.7929 10.1759L15.5 9.46875ZM14.4688 9.46875L13.7585 8.76482L10.2897 12.2648L11 12.9688L11.7103 13.6727L15.179 10.1727L14.4688 9.46875ZM11 12.9688L11.7071 12.2616L10.2384 10.7929L9.53125 11.5L8.82414 12.2071L10.2929 13.6759L11 12.9688ZM9.53125 11.5L10.2384 10.7929C9.55719 10.1117 8.42362 10.0553 7.72546 10.831L8.46875 11.5L9.21204 12.169C9.16028 12.2265 9.07623 12.2656 8.98828 12.2656C8.90344 12.2656 8.84748 12.2304 8.82414 12.2071L9.53125 11.5ZM8.46875 11.5L7.79979 10.7567C7.04591 11.4352 7.04591 12.5961 7.79979 13.2745L8.46875 12.5312L9.13771 11.788C9.19301 11.8377 9.23438 11.9208 9.23438 12.0156C9.23438 12.1105 9.19301 12.1935 9.13771 12.2433L8.46875 11.5ZM8.46875 12.5312L7.76164 13.2384L9.76164 15.2384L10.4688 14.5312L11.1759 13.8241L9.17586 11.8241L8.46875 12.5312ZM10.4688 14.5312L9.72546 15.2002C10.4236 15.976 11.5572 15.9195 12.2384 15.2384L11.5312 14.5312L10.8241 13.8241C10.8475 13.8008 10.9034 13.7656 10.9883 13.7656C11.0762 13.7656 11.1603 13.8048 11.212 13.8623L10.4688 14.5312ZM11.5312 14.5312L12.2384 15.2384L16.2384 11.2384L15.5312 10.5312L14.8241 9.82414L10.8241 13.8241L11.5312 14.5312Z",
43
- fill: "white",
44
- mask: "url(#path-2-outside-1_3089_3799)"
45
- })
46
- ]
47
- });
48
- r.propTypes = { dashColor: e.string };
30
+ height: "18",
31
+ fill: "black",
32
+ children: [/* @__PURE__ */ n("rect", {
33
+ fill: "white",
34
+ x: "2",
35
+ y: "3",
36
+ width: "19",
37
+ height: "18"
38
+ }), /* @__PURE__ */ n("path", { d: "M12 20C9.125 20 6.5 18.5 5.0625 16C3.625 13.5312 3.625 10.5 5.0625 8C6.5 5.53125 9.125 4 12 4C14.8438 4 17.4688 5.53125 18.9062 8C20.3438 10.5 20.3438 13.5312 18.9062 16C17.4688 18.5 14.8438 20 12 20ZM15.5312 10.5312H15.5C15.8125 10.25 15.8125 9.78125 15.5 9.46875C15.2188 9.1875 14.75 9.1875 14.4688 9.46875L11 12.9688L9.53125 11.5C9.21875 11.1875 8.75 11.1875 8.46875 11.5C8.15625 11.7812 8.15625 12.25 8.46875 12.5312L10.4688 14.5312C10.75 14.8438 11.2188 14.8438 11.5312 14.5312L15.5312 10.5312Z" })]
39
+ }),
40
+ /* @__PURE__ */ n("path", {
41
+ d: "M12 20C9.125 20 6.5 18.5 5.0625 16C3.625 13.5312 3.625 10.5 5.0625 8C6.5 5.53125 9.125 4 12 4C14.8438 4 17.4688 5.53125 18.9062 8C20.3438 10.5 20.3438 13.5312 18.9062 16C17.4688 18.5 14.8438 20 12 20ZM15.5312 10.5312H15.5C15.8125 10.25 15.8125 9.78125 15.5 9.46875C15.2188 9.1875 14.75 9.1875 14.4688 9.46875L11 12.9688L9.53125 11.5C9.21875 11.1875 8.75 11.1875 8.46875 11.5C8.15625 11.7812 8.15625 12.25 8.46875 12.5312L10.4688 14.5312C10.75 14.8438 11.2188 14.8438 11.5312 14.5312L15.5312 10.5312Z",
42
+ fill: "#0EA449"
43
+ }),
44
+ /* @__PURE__ */ n("path", {
45
+ d: "M5.0625 16L5.92942 15.5015L5.92668 15.4968L5.0625 16ZM5.0625 8L4.19831 7.4968L4.19559 7.50153L5.0625 8ZM18.9062 8L19.7732 7.50152L19.7704 7.49681L18.9062 8ZM18.9062 16L18.0421 15.4968L18.0393 15.5015L18.9062 16ZM15.5312 10.5312L16.2384 11.2384L17.9455 9.53125H15.5312V10.5312ZM15.5 10.5312L14.831 9.78796L12.894 11.5312H15.5V10.5312ZM14.4688 9.46875L13.7616 8.76164L13.7585 8.76482L14.4688 9.46875ZM11 12.9688L10.2929 13.6759L11.0032 14.3861L11.7103 13.6727L11 12.9688ZM8.46875 11.5L9.13771 12.2433L9.17684 12.2081L9.21204 12.169L8.46875 11.5ZM8.46875 12.5312L9.17586 11.8241L9.15726 11.8055L9.13771 11.788L8.46875 12.5312ZM10.4688 14.5312L11.212 13.8623L11.1945 13.8427L11.1759 13.8241L10.4688 14.5312ZM12 20V19C9.479 19 7.18657 17.6879 5.92941 15.5015L5.0625 16L4.19559 16.4985C5.81343 19.3121 8.771 21 12 21V20ZM5.0625 16L5.92668 15.4968C4.6714 13.341 4.66824 10.6918 5.92941 8.49847L5.0625 8L4.19559 7.50153C2.58176 10.3082 2.5786 13.7215 4.19832 16.5032L5.0625 16ZM5.0625 8L5.92668 8.50319C7.18712 6.33851 9.48502 5 12 5V4V3C8.76498 3 5.81288 4.72399 4.19832 7.49681L5.0625 8ZM12 4V5C14.4816 5 16.7805 6.33661 18.0421 8.50319L18.9062 8L19.7704 7.49681C18.157 4.72589 15.2059 3 12 3V4ZM18.9062 8L18.0393 8.49847C19.3005 10.6918 19.2973 13.341 18.0421 15.4968L18.9062 16L19.7704 16.5032C21.3902 13.7215 21.387 10.3082 19.7732 7.50153L18.9062 8ZM18.9062 16L18.0393 15.5015C16.7811 17.6898 14.4876 19 12 19V20V21C15.1999 21 18.1564 19.3102 19.7732 16.4985L18.9062 16ZM15.5312 10.5312V9.53125H15.5V10.5312V11.5312H15.5312V10.5312ZM15.5 10.5312L16.169 11.2745C16.9447 10.5764 16.8883 9.44281 16.2071 8.76164L15.5 9.46875L14.7929 10.1759C14.7696 10.1525 14.7344 10.0966 14.7344 10.0117C14.7344 9.92377 14.7735 9.83972 14.831 9.78796L15.5 10.5312ZM15.5 9.46875L16.2071 8.76164C15.5353 8.08987 14.4334 8.08987 13.7616 8.76164L14.4688 9.46875L15.1759 10.1759C15.1167 10.235 15.0442 10.2578 14.9844 10.2578C14.9245 10.2578 14.8521 10.235 14.7929 10.1759L15.5 9.46875ZM14.4688 9.46875L13.7585 8.76482L10.2897 12.2648L11 12.9688L11.7103 13.6727L15.179 10.1727L14.4688 9.46875ZM11 12.9688L11.7071 12.2616L10.2384 10.7929L9.53125 11.5L8.82414 12.2071L10.2929 13.6759L11 12.9688ZM9.53125 11.5L10.2384 10.7929C9.55719 10.1117 8.42362 10.0553 7.72546 10.831L8.46875 11.5L9.21204 12.169C9.16028 12.2265 9.07623 12.2656 8.98828 12.2656C8.90344 12.2656 8.84748 12.2304 8.82414 12.2071L9.53125 11.5ZM8.46875 11.5L7.79979 10.7567C7.04591 11.4352 7.04591 12.5961 7.79979 13.2745L8.46875 12.5312L9.13771 11.788C9.19301 11.8377 9.23438 11.9208 9.23438 12.0156C9.23438 12.1105 9.19301 12.1935 9.13771 12.2433L8.46875 11.5ZM8.46875 12.5312L7.76164 13.2384L9.76164 15.2384L10.4688 14.5312L11.1759 13.8241L9.17586 11.8241L8.46875 12.5312ZM10.4688 14.5312L9.72546 15.2002C10.4236 15.976 11.5572 15.9195 12.2384 15.2384L11.5312 14.5312L10.8241 13.8241C10.8475 13.8008 10.9034 13.7656 10.9883 13.7656C11.0762 13.7656 11.1603 13.8048 11.212 13.8623L10.4688 14.5312ZM11.5312 14.5312L12.2384 15.2384L16.2384 11.2384L15.5312 10.5312L14.8241 9.82414L10.8241 13.8241L11.5312 14.5312Z",
46
+ fill: "white",
47
+ mask: `url(#${i})`
48
+ })
49
+ ]
50
+ });
51
+ };
52
+ i.propTypes = { dashColor: e.string };
49
53
  //#endregion
50
- export { r as CorrectCheckIcon };
54
+ export { i as CorrectCheckIcon };
@@ -3,8 +3,8 @@ import { useEffect as t, useState as n } from "react";
3
3
  import r from "prop-types";
4
4
  import { styled as i } from "@mui/material/styles";
5
5
  import { AlertDialog as a, NumberTextFieldCustom as o } from "@pie-lib/config-ui";
6
- import { jsx as s, jsxs as c } from "react/jsx-runtime";
7
- import { color as l } from "@pie-lib/render-ui";
6
+ import { color as s } from "@pie-lib/render-ui";
7
+ import { jsx as c, jsxs as l } from "react/jsx-runtime";
8
8
  import u from "@mui/material/Typography";
9
9
  //#region src/chart-setup.tsx
10
10
  var d = (e, t, n, r, i) => {
@@ -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: l.disabled() })), b = (r) => {
43
- let { model: i, onChange: o, chartDimensions: l, gridValues: b = {}, labelValues: x = {}, studentNewCategoryDefaultLabel: S = {}, availableChartTypes: C = {}, chartTypeLabel: w } = r, [T, E] = n({
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
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 } = l || {}, V = {
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
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__ */ c(h, { children: [/* @__PURE__ */ s(_, {
63
+ }, G = /* @__PURE__ */ l(h, { children: [/* @__PURE__ */ c(_, {
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__ */ s(_, {
69
+ }), /* @__PURE__ */ c(_, {
70
70
  label: "Label Interval",
71
71
  value: N.labelStep,
72
72
  variant: "outlined",
@@ -162,18 +162,18 @@ var d = (e, t, n, r, i) => {
162
162
  chartType: e
163
163
  });
164
164
  };
165
- return /* @__PURE__ */ c(f, { children: [
166
- /* @__PURE__ */ s(u, {
165
+ return /* @__PURE__ */ l(f, { children: [
166
+ /* @__PURE__ */ c(u, {
167
167
  variant: "subtitle1",
168
168
  children: "Configure Chart"
169
169
  }),
170
- /* @__PURE__ */ c(p, { children: [
171
- /* @__PURE__ */ c(h, { children: [/* @__PURE__ */ s(e, {
170
+ /* @__PURE__ */ l(p, { children: [
171
+ /* @__PURE__ */ l(h, { children: [/* @__PURE__ */ c(e, {
172
172
  value: i.chartType,
173
173
  onChange: (e) => ne(e.target.value),
174
174
  availableChartTypes: C,
175
175
  chartTypeLabel: w
176
- }), /* @__PURE__ */ s(_, {
176
+ }), /* @__PURE__ */ c(_, {
177
177
  label: "Max Value",
178
178
  value: N.max,
179
179
  min: X(i.chartType).min,
@@ -182,9 +182,9 @@ var d = (e, t, n, r, i) => {
182
182
  onChange: (e, t) => $("max", t, e)
183
183
  })] }),
184
184
  !i.chartType.includes("Plot") && G,
185
- R && /* @__PURE__ */ c(v, { children: [
186
- /* @__PURE__ */ s("div", { children: /* @__PURE__ */ s(u, { children: "Dimensions(px)" }) }),
187
- /* @__PURE__ */ c(m, { children: [/* @__PURE__ */ s(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
188
  label: "Width",
189
189
  value: L.width,
190
190
  min: V.min,
@@ -192,8 +192,8 @@ var d = (e, t, n, r, i) => {
192
192
  step: V.step,
193
193
  variant: "outlined",
194
194
  onChange: (e, t) => Z("width", t)
195
- }), /* @__PURE__ */ s(y, { children: "Min 50, Max 700" })] }),
196
- /* @__PURE__ */ c(m, { children: [/* @__PURE__ */ s(g, {
195
+ }), /* @__PURE__ */ c(y, { children: "Min 50, Max 700" })] }),
196
+ /* @__PURE__ */ l(m, { children: [/* @__PURE__ */ c(g, {
197
197
  label: "Height",
198
198
  value: L.height,
199
199
  min: H.min,
@@ -201,10 +201,10 @@ var d = (e, t, n, r, i) => {
201
201
  step: H.step,
202
202
  variant: "outlined",
203
203
  onChange: (e, t) => Z("height", t)
204
- }), /* @__PURE__ */ s(y, { children: "Min 400, Max 700" })] })
204
+ }), /* @__PURE__ */ c(y, { children: "Min 400, Max 700" })] })
205
205
  ] })
206
206
  ] }),
207
- /* @__PURE__ */ s(a, {
207
+ /* @__PURE__ */ c(a, {
208
208
  open: T.open,
209
209
  title: T.title,
210
210
  text: T.text,