@pie-element/graphing-solution-set 7.0.1-next.20261004041321 → 7.0.1-next.20261004162038

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 (24) hide show
  1. package/dist/browser/{alert-dialog-BRxl71Pt.js → alert-dialog-DmGc5nmG.js} +9543 -9542
  2. package/dist/browser/alert-dialog-DmGc5nmG.js.map +1 -0
  3. package/dist/browser/author/index.js +42 -42
  4. package/dist/browser/author/index.js.map +1 -1
  5. package/dist/browser/{browser-BJmGuSsq.js → browser-bbrzkX59.js} +10 -14
  6. package/dist/browser/{browser-BJmGuSsq.js.map → browser-bbrzkX59.js.map} +1 -1
  7. package/dist/browser/controller/index.js +1 -1
  8. package/dist/browser/delivery/index.js +2 -2
  9. package/dist/browser/editor-runtime/{alert-dialog-Dgu-UHea.js → alert-dialog-DdsIXs-D.js} +6556 -6555
  10. package/dist/browser/editor-runtime/alert-dialog-DdsIXs-D.js.map +1 -0
  11. package/dist/browser/editor-runtime/author/index.js +42 -42
  12. package/dist/browser/editor-runtime/author/index.js.map +1 -1
  13. package/dist/browser/editor-runtime/{browser-CjhxtgBS.js → browser-d5JHIrvC.js} +10 -14
  14. package/dist/browser/editor-runtime/{browser-CjhxtgBS.js.map → browser-d5JHIrvC.js.map} +1 -1
  15. package/dist/browser/editor-runtime/controller/index.js +1 -1
  16. package/dist/browser/editor-runtime/delivery/index.js +2 -2
  17. package/dist/browser/editor-runtime/{mathjax-D2JHb_R_-DZC1o4OJ.js → mathjax-D2JHb_R_-CNSN6-xM.js} +2 -2
  18. package/dist/browser/editor-runtime/{mathjax-D2JHb_R_-DZC1o4OJ.js.map → mathjax-D2JHb_R_-CNSN6-xM.js.map} +1 -1
  19. package/dist/browser/{mathjax-D2JHb_R_-Cm3glFL1.js → mathjax-D2JHb_R_-CWwd1xT4.js} +2 -2
  20. package/dist/browser/{mathjax-D2JHb_R_-Cm3glFL1.js.map → mathjax-D2JHb_R_-CWwd1xT4.js.map} +1 -1
  21. package/dist/index.iife.js +74 -74
  22. package/package.json +6 -6
  23. package/dist/browser/alert-dialog-BRxl71Pt.js.map +0 -1
  24. package/dist/browser/editor-runtime/alert-dialog-Dgu-UHea.js.map +0 -1
@@ -1,5 +1,5 @@
1
- import { O as e, S as t, _ as n, o as r, r as i, s as a, t as o } from "../browser-CjhxtgBS.js";
2
- import { $ as s, A as c, B as l, D as u, E as d, F as f, G as p, H as m, I as h, J as g, K as _, L as v, M as y, O as b, P as x, Q as S, R as C, V as w, W as T, X as E, Y as D, Z as O, _ as k, a as A, b as ee, c as j, d as te, et as ne, f as re, g as ie, h as ae, i as M, k as N, l as oe, m as se, n as ce, nt as le, o as ue, p as de, q as fe, r as pe, s as me, t as he, tt as ge, u as P, v as F, x as _e, z as I } from "../alert-dialog-Dgu-UHea.js";
1
+ import { D as e, g as t, o as n, r, s as i, t as a, x as o } from "../browser-d5JHIrvC.js";
2
+ import { $ as s, A as c, B as l, D as u, E as d, F as f, G as p, H as m, I as h, J as g, K as _, L as v, M as y, O as b, P as x, Q as S, R as C, V as w, W as T, X as E, Y as D, Z as O, _ as k, a as A, b as ee, c as j, d as te, et as ne, f as re, g as ie, h as ae, i as M, k as N, l as oe, m as se, n as ce, nt as le, o as ue, p as de, q as fe, r as pe, s as me, t as he, tt as ge, u as P, v as F, x as _e, z as I } from "../alert-dialog-DdsIXs-D.js";
3
3
  import * as L from "react";
4
4
  import R, { Component as ve, createElement as ye } from "react";
5
5
  import { createRoot as be } from "react-dom/client";
@@ -650,7 +650,7 @@ var H = O("MuiSwitch", [
650
650
  }
651
651
  }), /*#__PURE__*/ z(C, { ...w })]
652
652
  });
653
- }), U = /* @__PURE__ */ e(o(), 1), W = /* @__PURE__ */ e(ge(), 1), at = _(Le)(() => ({ "& .MuiFormControlLabel-label": {
653
+ }), U = /* @__PURE__ */ e(a(), 1), W = /* @__PURE__ */ e(ge(), 1), at = _(Le)(() => ({ "& .MuiFormControlLabel-label": {
654
654
  left: "-5px",
655
655
  position: "relative"
656
656
  } })), ot = _(M)(() => ({ color: `${T.tertiary()} !important` })), st = ({ label: e, value: t, checked: n, onChange: r }) => /* @__PURE__ */ z(at, {
@@ -769,9 +769,9 @@ var pt = (0, U.default)("@pie-lib:config-ui:number-text-field"), mt = _(de)(({ t
769
769
  padding: "6px 0 7px"
770
770
  }
771
771
  })), ht = (e, t) => {
772
- if (!a(e) && !a(t)) return 0;
773
- if (!a(e) && a(t)) return t;
774
- if (a(e)) return e;
772
+ if (!i(e) && !i(t)) return 0;
773
+ if (!i(e) && i(t)) return t;
774
+ if (i(e)) return e;
775
775
  }, gt = class extends R.Component {
776
776
  static propTypes = {
777
777
  disabled: W.default.bool,
@@ -798,7 +798,7 @@ var pt = (0, U.default)("@pie-lib:config-ui:number-text-field"), mt = _(de)(({ t
798
798
  this.setState({ value: t });
799
799
  }
800
800
  clamp(e, t = this.props.min, n = this.props.max) {
801
- return a(e) ? (a(n) && (e = Math.min(e, n)), a(t) && (e = Math.max(e, t)), e) : ht(t, n);
801
+ return i(e) ? (i(n) && (e = Math.min(e, n)), i(t) && (e = Math.max(e, t)), e) : ht(t, n);
802
802
  }
803
803
  onBlur = (e) => {
804
804
  let t = e.target.value, n = parseFloat(t);
@@ -872,9 +872,9 @@ var pt = (0, U.default)("@pie-lib:config-ui:number-text-field"), mt = _(de)(({ t
872
872
  margin: 0
873
873
  }
874
874
  })), xt = _(ee)(() => ({ padding: "2px" })), St = (e, t) => {
875
- if (!a(e) && !a(t)) return 0;
876
- if (!a(e) && a(t)) return t;
877
- if (a(e)) return e;
875
+ if (!i(e) && !i(t)) return 0;
876
+ if (!i(e) && i(t)) return t;
877
+ if (i(e)) return e;
878
878
  }, K = class extends R.Component {
879
879
  static propTypes = {
880
880
  className: W.default.string,
@@ -919,7 +919,7 @@ var pt = (0, U.default)("@pie-lib:config-ui:number-text-field"), mt = _(de)(({ t
919
919
  }
920
920
  clamp(e, t = this.props.min, n = this.props.max) {
921
921
  let { customValues: r } = this.props;
922
- return (r || []).length > 0 ? e : a(e) ? (a(n) && (e = Math.min(e, n)), a(t) && (e = Math.max(e, t)), e) : St(t, n);
922
+ return (r || []).length > 0 ? e : i(e) ? (i(n) && (e = Math.min(e, n)), i(t) && (e = Math.max(e, t)), e) : St(t, n);
923
923
  }
924
924
  normalizeValueAndIndex = (e, t, n, r) => {
925
925
  let { type: i } = this.props, a = this.clamp(t, n, r), o = (e || []).findIndex((e) => e === a);
@@ -989,8 +989,8 @@ var pt = (0, U.default)("@pie-lib:config-ui:number-text-field"), mt = _(de)(({ t
989
989
  });
990
990
  }
991
991
  render() {
992
- let { className: e, label: t, disabled: n, error: r, min: i, max: o, customValues: s, inputClassName: c, disableUnderline: l, helperText: u, variant: d, textAlign: f, type: p = "number" } = this.props, { value: m } = this.state, h = e, g = !1, _ = !1;
993
- return s.length > 0 ? (g = m === s[0], _ = m === s[s.length - 1]) : a(i) && a(o) && (g = m === i, _ = m === o), /* @__PURE__ */ z(bt, {
992
+ let { className: e, label: t, disabled: n, error: r, min: a, max: o, customValues: s, inputClassName: c, disableUnderline: l, helperText: u, variant: d, textAlign: f, type: p = "number" } = this.props, { value: m } = this.state, h = e, g = !1, _ = !1;
993
+ return s.length > 0 ? (g = m === s[0], _ = m === s[s.length - 1]) : i(a) && i(o) && (g = m === a, _ = m === o), /* @__PURE__ */ z(bt, {
994
994
  variant: d,
995
995
  inputRef: (e) => this.inputRef = e,
996
996
  disabled: n,
@@ -1033,7 +1033,7 @@ var pt = (0, U.default)("@pie-lib:config-ui:number-text-field"), mt = _(de)(({ t
1033
1033
  },
1034
1034
  inputProps: {
1035
1035
  style: { textAlign: f },
1036
- min: i,
1036
+ min: a,
1037
1037
  max: o
1038
1038
  }
1039
1039
  });
@@ -1870,23 +1870,23 @@ var Xn = {
1870
1870
  fontSize: e.typography.fontSize,
1871
1871
  marginBottom: 0
1872
1872
  })), er = (e) => {
1873
- let { model: n, label: r, group: i, configuration: a, onChange: o } = e, s = (e, r, i) => {
1874
- let { isConfigProperty: s, ...c } = t(e, i || r), l = t(s ? a : n, r), u = {
1873
+ let { model: t, label: n, group: r, configuration: i, onChange: a } = e, s = (e, n, r) => {
1874
+ let { isConfigProperty: s, ...c } = o(e, r || n), l = o(s ? i : t, n), u = {
1875
1875
  ...c,
1876
- key: r,
1876
+ key: n,
1877
1877
  value: l
1878
1878
  }, d = Xn[u.type];
1879
1879
  return /* @__PURE__ */ z(d, {
1880
1880
  ...u,
1881
- onChange: (e) => o(r, e, s)
1882
- }, r);
1881
+ onChange: (e) => a(n, e, s)
1882
+ }, n);
1883
1883
  }, c = (e, t) => {
1884
1884
  let n = e[t];
1885
1885
  if (!n) return null;
1886
1886
  let { type: r, label: i, fields: a, choices: o } = n;
1887
1887
  return r === "numberFields" ? /* @__PURE__ */ B("div", { children: [/* @__PURE__ */ z($n, { children: i }), Object.keys(a).map((n) => s(e, `${t}.${n}`, `${t}.fields.${n}`))] }, `numberField-${i}`) : r === "checkboxes" ? /* @__PURE__ */ B("div", { children: [/* @__PURE__ */ z("p", { children: i }), Object.keys(o).map((n) => s(e, `${t}.${n}`, `${t}.choices.${n}`))] }, `checkbox-${i}`) : s(e, t);
1888
1888
  };
1889
- return /* @__PURE__ */ B(Zn, { children: [/* @__PURE__ */ z(Qn, { children: r }), Object.keys(i).map((e) => c(i, e))] });
1889
+ return /* @__PURE__ */ B(Zn, { children: [/* @__PURE__ */ z(Qn, { children: n }), Object.keys(r).map((e) => c(r, e))] });
1890
1890
  };
1891
1891
  er.propTypes = {
1892
1892
  model: W.default.object,
@@ -1908,10 +1908,10 @@ var tr = class extends R.Component {
1908
1908
  onChangeModel: () => {},
1909
1909
  onChangeConfiguration: () => {}
1910
1910
  };
1911
- change = (e, t, n = !1) => {
1911
+ change = (e, t, r = !1) => {
1912
1912
  In("[changeModel]", e, t);
1913
1913
  let { onChangeModel: i, onChangeConfiguration: a } = this.props, o = { ...this.props.model }, s = { ...this.props.configuration };
1914
- n ? (r(s, e, t), a(s, e)) : (r(o, e, t), i(o, e));
1914
+ r ? (n(s, e, t), a(s, e)) : (n(o, e, t), i(o, e));
1915
1915
  };
1916
1916
  render() {
1917
1917
  let { groups: e, model: t, configuration: n, modal: r } = this.props;
@@ -2514,16 +2514,16 @@ var Lr = [
2514
2514
  }, Br = (e, t, n = !1) => {
2515
2515
  let r = 10 * (e.max - e.min) / t, i = r * 10;
2516
2516
  return (n ? Rr : Lr).filter((e) => e >= r && e <= i);
2517
- }, Vr = (e) => zr[e] || [], Hr = (e, t, n, r) => {
2517
+ }, Vr = (e) => zr[e] || [], Hr = (e, t, n, i) => {
2518
2518
  let a = Br(e, t), o = Vr(e.step);
2519
- if (!i(n, a) && !a.includes(e.step)) {
2519
+ if (!r(n, a) && !a.includes(e.step)) {
2520
2520
  let n = Br(e, t, !0)[0] || 1;
2521
2521
  return e.step = n, o = Vr(n), o.includes(e.labelStep) || (e.labelStep = n), {
2522
2522
  gridValues: a,
2523
2523
  labelValues: o
2524
2524
  };
2525
2525
  }
2526
- return !i(r, o) && !o.includes(e.labelStep) && (e.labelStep = e.step), {
2526
+ return !r(i, o) && !o.includes(e.labelStep) && (e.labelStep = e.step), {
2527
2527
  gridValues: a,
2528
2528
  labelValues: o
2529
2529
  };
@@ -2824,9 +2824,9 @@ var Lr = [
2824
2824
  title: e
2825
2825
  });
2826
2826
  };
2827
- onConfigChange = (e, t) => {
2828
- let { model: r, onChange: a } = this.props, { defaultGridConfiguration: o = 0 } = r, { gridValues: s, labelValues: c, domain: l, range: u } = this.state, d = {
2829
- ...r,
2827
+ onConfigChange = (e, n) => {
2828
+ let { model: i, onChange: a } = this.props, { defaultGridConfiguration: o = 0 } = i, { gridValues: s, labelValues: c, domain: l, range: u } = this.state, d = {
2829
+ ...i,
2830
2830
  ...e
2831
2831
  }, { answers: f, domain: p, includeAxes: m = !0, graph: h, range: g, standardGrid: _ } = d, v = {
2832
2832
  domain: [],
@@ -2834,7 +2834,7 @@ var Lr = [
2834
2834
  }, y = {
2835
2835
  domain: [],
2836
2836
  range: []
2837
- }, b = t >= 0 ? t : o;
2837
+ }, b = n >= 0 ? n : o;
2838
2838
  if (m) {
2839
2839
  let e = Hr(p, h.width, s.domain, c.domain);
2840
2840
  v.domain = e.gridValues || [], y.domain = e.labelValues || [];
@@ -2844,14 +2844,14 @@ var Lr = [
2844
2844
  let e = Hr(g, h.height, s.range, c.range);
2845
2845
  v.range = e.gridValues || [], y.range = e.labelValues || [];
2846
2846
  }
2847
- let x = n(f);
2847
+ let x = t(f);
2848
2848
  x.correctAnswer.marks = f.correctAnswer.marks.filter((e) => e.type !== "polygon");
2849
2849
  let S = Wr(p, g, x);
2850
- if (!i(x, S)) {
2850
+ if (!r(x, S)) {
2851
2851
  this.setState({ dialog: {
2852
2852
  isOpened: !0,
2853
2853
  onClose: () => this.setState({ dialog: { isOpened: !1 } }, a({
2854
- ...r,
2854
+ ...i,
2855
2855
  domain: l,
2856
2856
  range: u
2857
2857
  })),
@@ -3001,17 +3001,17 @@ var Lr = [
3001
3001
  state = { dialog: { open: !1 } };
3002
3002
  handleAlertDialog = (e, t) => this.setState({ dialog: { open: e } }, t);
3003
3003
  changeMarks = (e) => {
3004
- let { model: t, onChange: n } = this.props, { gssLineData: i } = t;
3005
- i.selectedTool === "lineA" && e.length > 0 && (e[0].fill = i.lineA.lineType), i.selectedTool === "lineB" && e.length > 1 && (e[1].fill = i.lineB.lineType), e.length === 0 && (i.selectedTool = "lineA", r(t, "gssLineData", i)), r(t, "answers.correctAnswer.marks", e), n(t);
3004
+ let { model: t, onChange: r } = this.props, { gssLineData: i } = t;
3005
+ i.selectedTool === "lineA" && e.length > 0 && (e[0].fill = i.lineA.lineType), i.selectedTool === "lineB" && e.length > 1 && (e[1].fill = i.lineB.lineType), e.length === 0 && (i.selectedTool = "lineA", n(t, "gssLineData", i)), n(t, "answers.correctAnswer.marks", e), r(t);
3006
3006
  };
3007
3007
  onResetClick = () => {
3008
- let { model: e, onChange: t } = this.props, { gssLineData: n, answers: i } = e;
3008
+ let { model: e, onChange: t } = this.props, { gssLineData: r, answers: i } = e;
3009
3009
  this.setState({ dialog: {
3010
3010
  open: !0,
3011
3011
  title: "Warning",
3012
3012
  text: "This will remove all the elements added on the graph and reset graph to original state. Are you sure you want to continue?",
3013
3013
  onConfirm: () => {
3014
- i.correctAnswer.marks = [], n.selectedTool = "lineA", n.lineA.lineType = "Solid", n.lineB && (n.lineB.lineType = "Solid"), r(e, "answers", i), r(e, "gssLineData", n), t(e), this.handleAlertDialog(!1);
3014
+ i.correctAnswer.marks = [], r.selectedTool = "lineA", r.lineA.lineType = "Solid", r.lineB && (r.lineB.lineType = "Solid"), n(e, "answers", i), n(e, "gssLineData", r), t(e), this.handleAlertDialog(!1);
3015
3015
  },
3016
3016
  onClose: () => this.handleAlertDialog(!1)
3017
3017
  } });
@@ -3029,11 +3029,11 @@ var Lr = [
3029
3029
  } }) : this.changeLine(e, t);
3030
3030
  };
3031
3031
  changeLine = (e, t) => {
3032
- let { model: n, onChange: i } = this.props, { answers: a } = n, o = n.gssLineData;
3033
- a.correctAnswer.marks = a.correctAnswer.marks.filter((e) => e.type !== "polygon"), Number.parseInt(t) === 1 ? (delete o.lineB, a.correctAnswer.marks.length > 1 && a.correctAnswer.marks.pop(), o.numberOfLines = 1, o.selectedTool = "lineA") : (o.numberOfLines = 2, a.correctAnswer.marks.length > 0 && (o.selectedTool = "lineB"), o.lineB = { lineType: "Solid" }), r(n, "answers", a), r(n, "gssLineData", o), i(n);
3032
+ let { model: r, onChange: i } = this.props, { answers: a } = r, o = r.gssLineData;
3033
+ a.correctAnswer.marks = a.correctAnswer.marks.filter((e) => e.type !== "polygon"), Number.parseInt(t) === 1 ? (delete o.lineB, a.correctAnswer.marks.length > 1 && a.correctAnswer.marks.pop(), o.numberOfLines = 1, o.selectedTool = "lineA") : (o.numberOfLines = 2, a.correctAnswer.marks.length > 0 && (o.selectedTool = "lineB"), o.lineB = { lineType: "Solid" }), n(r, "answers", a), n(r, "gssLineData", o), i(r);
3034
3034
  };
3035
3035
  onSolutionSetSelected = (e) => {
3036
- let { model: t, onChange: n } = this.props, { answers: i, gssLineData: a } = t;
3036
+ let { model: t, onChange: r } = this.props, { answers: i, gssLineData: a } = t;
3037
3037
  for (let t of a.sections) if (oi(e, t)) {
3038
3038
  let e = {
3039
3039
  points: t,
@@ -3045,7 +3045,7 @@ var Lr = [
3045
3045
  i.correctAnswer.marks = i.correctAnswer.marks.filter((e) => e.type !== "polygon"), i.correctAnswer.marks.push(e);
3046
3046
  break;
3047
3047
  }
3048
- r(t, "answers", i), n(t);
3048
+ n(t, "answers", i), r(t);
3049
3049
  };
3050
3050
  onChangeGssLineData = (e, t) => {
3051
3051
  let { model: n } = this.props, { answers: r, domain: i, range: a } = n;
@@ -3079,7 +3079,7 @@ var Lr = [
3079
3079
  }
3080
3080
  };
3081
3081
  handleGssLineDataChange = (e, t) => {
3082
- let { model: n, onChange: i } = this.props;
3082
+ let { model: r, onChange: i } = this.props;
3083
3083
  t.correctAnswer.marks.length > 0 && t.correctAnswer.marks[0] && e.lineA && (t.correctAnswer.marks[0].fill = e.lineA.lineType), t.correctAnswer.marks.length > 1 && t.correctAnswer.marks[1] && e.lineB && (t.correctAnswer.marks[1].fill = e.lineB.lineType), (e.selectedTool === "lineB" && t.correctAnswer.marks.length === 0 || e.selectedTool === "lineB" && t.correctAnswer.marks[0].building) && (this.setState({ dialog: {
3084
3084
  open: !0,
3085
3085
  title: "Warning",
@@ -3090,7 +3090,7 @@ var Lr = [
3090
3090
  title: "Warning",
3091
3091
  text: "Please add Line B to the graph before switching to Line A",
3092
3092
  onConfirm: () => this.handleAlertDialog(!1)
3093
- } }), e.selectedTool = "lineB"), r(n, "gssLineData", e), r(n, "answers", t), i(n);
3093
+ } }), e.selectedTool = "lineB"), n(r, "gssLineData", e), n(r, "answers", t), i(r);
3094
3094
  };
3095
3095
  updateModel = (e) => {
3096
3096
  let { model: t, onChange: n } = this.props;