@pie-element/charting 12.1.2-next.0 → 12.1.2-next.2
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.
- package/dist/author/correct-response.js +35 -36
- package/dist/author/utils.js +1 -1
- package/dist/browser/author/index.js +173 -173
- package/dist/browser/author/index.js.map +1 -1
- package/dist/browser/{chart-Dghjf6JQ.js → chart-C1GUG3cz.js} +13162 -17222
- package/dist/browser/chart-C1GUG3cz.js.map +1 -0
- package/dist/browser/controller/index.js +67 -106
- package/dist/browser/controller/index.js.map +1 -1
- package/dist/browser/delivery/index.js +89 -89
- package/dist/browser/delivery/index.js.map +1 -1
- package/dist/browser/dist-CA-Ok7CW.js +330 -0
- package/dist/browser/dist-CA-Ok7CW.js.map +1 -0
- package/dist/controller/index.js +13 -15
- package/dist/delivery/main.js +46 -46
- package/dist/index.iife.js +102 -104
- package/dist/runtime-support.d.ts +12 -0
- package/dist/runtime-support.js +12 -0
- package/package.json +13 -10
- package/dist/browser/_baseSet-Cse6EM9A.js +0 -1015
- package/dist/browser/_baseSet-Cse6EM9A.js.map +0 -1
- package/dist/browser/chart-Dghjf6JQ.js.map +0 -1
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_DataView.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Hash.js +0 -16
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_ListCache.js +0 -16
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Map.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_MapCache.js +0 -16
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Promise.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Set.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_SetCache.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Stack.js +0 -14
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Symbol.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Uint8Array.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_WeakMap.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_apply.js +0 -12
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayEach.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayFilter.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayLikeKeys.js +0 -15
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayMap.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayPush.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arraySome.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assignValue.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assocIndexOf.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssign.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignIn.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignValue.js +0 -12
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseClone.js +0 -57
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseCreate.js +0 -14
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseFlatten.js +0 -13
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGet.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetAllKeys.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetTag.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseHasIn.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsArguments.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqual.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqualDeep.js +0 -30
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsMap.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNative.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsSet.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsTypedArray.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeys.js +0 -12
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeysIn.js +0 -13
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_basePick.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_basePickBy.js +0 -13
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseSet.js +0 -22
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseSetToString.js +0 -14
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTimes.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseToString.js +0 -15
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseUnary.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cacheHas.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_castPath.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneArrayBuffer.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneBuffer.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneDataView.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneRegExp.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneSymbol.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneTypedArray.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyArray.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyObject.js +0 -14
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbols.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbolsIn.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_coreJsData.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_defineProperty.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalArrays.js +0 -35
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalByTag.js +0 -35
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalObjects.js +0 -32
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_flatRest.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_freeGlobal.js +0 -4
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeys.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeysIn.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getMapData.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getNative.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getPrototype.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getRawTag.js +0 -14
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbols.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbolsIn.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getTag.js +0 -23
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getValue.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hasPath.js +0 -18
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashClear.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashDelete.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashGet.js +0 -13
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashHas.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashSet.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneArray.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneByTag.js +0 -33
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneObject.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isFlattenable.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIndex.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKey.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKeyable.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isMasked.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isPrototype.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheClear.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheDelete.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheGet.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheHas.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheSet.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheClear.js +0 -13
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheDelete.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheGet.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheHas.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheSet.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapToArray.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_memoizeCapped.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeCreate.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeys.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeysIn.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nodeUtil.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_objectToString.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overArg.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overRest.js +0 -13
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_root.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheAdd.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheHas.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setToArray.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setToString.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_shortOut.js +0 -14
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackClear.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackDelete.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackGet.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackHas.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackSet.js +0 -16
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stringToPath.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toKey.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toSource.js +0 -15
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/cloneDeep.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/constant.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/eq.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/flatten.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/hasIn.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/identity.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArguments.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArray.js +0 -4
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLike.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isBuffer.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.js +0 -21
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEqual.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isFunction.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isLength.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isMap.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObject.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObjectLike.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSet.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSymbol.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isTypedArray.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keys.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keysIn.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/memoize.js +0 -16
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/pick.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubArray.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubFalse.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toString.js +0 -7
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { S as e, f as t, t as n, v as r } from "../dist-CA-Ok7CW.js";
|
|
2
|
+
import { D as i, O as a, S as o, T as s, a as c, c as l, d as u, f as d, i as f, k as p, l as m, m as h, o as g, p as _, r as v, s as y, t as b, x } from "../chart-C1GUG3cz.js";
|
|
3
3
|
import * as S from "react";
|
|
4
4
|
import C, { useEffect as ee, useState as w } from "react";
|
|
5
5
|
import { createRoot as T } from "react-dom/client";
|
|
6
6
|
import { jsx as E, jsxs as D } from "react/jsx-runtime";
|
|
7
7
|
//#region ../../lib-react/charting/dist/chart-type.js
|
|
8
|
-
var O = /* @__PURE__ */
|
|
8
|
+
var O = /* @__PURE__ */ e(p(), 1), k = a("div")(() => ({ width: "160px" })), A = a(x)(() => ({ width: "160px" })), j = a(o)(() => ({ backgroundColor: "transparent" })), M = ({ onChange: e, value: t, availableChartTypes: n, chartTypeLabel: r }) => /* @__PURE__ */ E(k, { children: /* @__PURE__ */ D(A, {
|
|
9
9
|
variant: "outlined",
|
|
10
10
|
children: [/* @__PURE__ */ E(j, {
|
|
11
11
|
id: "type-helper-label",
|
|
12
12
|
children: r
|
|
13
|
-
}), /* @__PURE__ */ D(
|
|
13
|
+
}), /* @__PURE__ */ D(_, {
|
|
14
14
|
labelId: "type-helper-label",
|
|
15
15
|
id: "type-helper-label-select",
|
|
16
16
|
name: "chartType",
|
|
@@ -72,38 +72,38 @@ var N = (e, t, n, r, i) => {
|
|
|
72
72
|
...i,
|
|
73
73
|
data: e
|
|
74
74
|
});
|
|
75
|
-
}, te =
|
|
75
|
+
}, te = a("div")(() => ({ width: "450px" })), ne = a("div")(({ theme: e }) => ({
|
|
76
76
|
display: "flex",
|
|
77
77
|
flexDirection: "column",
|
|
78
78
|
width: "100%",
|
|
79
79
|
marginTop: e.spacing(3)
|
|
80
|
-
})), P =
|
|
80
|
+
})), P = a("div")(() => ({
|
|
81
81
|
display: "flex",
|
|
82
82
|
flexDirection: "column",
|
|
83
83
|
alignItems: "center"
|
|
84
|
-
})),
|
|
84
|
+
})), re = a("div")(() => ({
|
|
85
85
|
display: "flex",
|
|
86
86
|
justifyContent: "space-around",
|
|
87
87
|
alignItems: "center"
|
|
88
|
-
})),
|
|
88
|
+
})), F = a(g)(({ theme: e }) => ({
|
|
89
89
|
width: "130px",
|
|
90
90
|
margin: `${e.spacing(1)} ${e.spacing(.5)}`
|
|
91
|
-
})),
|
|
91
|
+
})), I = a(g)(({ theme: e }) => ({
|
|
92
92
|
width: "160px",
|
|
93
93
|
margin: `${e.spacing(1)} ${e.spacing(.5)}`
|
|
94
|
-
})),
|
|
94
|
+
})), L = a("div")(({ theme: e }) => ({
|
|
95
95
|
display: "flex",
|
|
96
96
|
justifyContent: "space-between",
|
|
97
97
|
alignItems: "center",
|
|
98
98
|
margin: `${e.spacing(3)} 0`
|
|
99
|
-
})),
|
|
99
|
+
})), ie = a(h)(() => ({ color: i.disabled() })), R = (e) => {
|
|
100
100
|
let { model: t, onChange: n, chartDimensions: r, gridValues: i = {}, labelValues: a = {}, studentNewCategoryDefaultLabel: o = {}, availableChartTypes: s = {}, chartTypeLabel: c } = e, [l, u] = w({
|
|
101
101
|
open: !1,
|
|
102
102
|
title: "",
|
|
103
103
|
text: "",
|
|
104
104
|
onClose: null,
|
|
105
105
|
onConfirm: null
|
|
106
|
-
}), [d, f] = w(!1), [p, m] = w(""), [
|
|
106
|
+
}), [d, f] = w(!1), [p, m] = w(""), [g, _] = w(0), { range: v = {}, correctAnswer: b, changeInteractiveEnabled: x, changeEditableEnabled: S } = t, C = t.graph, { showInConfigPanel: T, width: O, height: k } = r || {}, A = {
|
|
107
107
|
min: O?.min ? Math.max(50, O.min) : 50,
|
|
108
108
|
max: O?.max ? Math.min(700, O.max) : 700,
|
|
109
109
|
step: O?.step >= 1 ? Math.min(200, O.step) : 20
|
|
@@ -111,45 +111,45 @@ var N = (e, t, n, r, i) => {
|
|
|
111
111
|
min: k?.min ? Math.max(400, k.min) : 400,
|
|
112
112
|
max: k?.max ? Math.min(700, k.max) : 700,
|
|
113
113
|
step: k?.step >= 1 ? Math.min(200, k.step) : 20
|
|
114
|
-
},
|
|
114
|
+
}, R = i && i.range ? { customValues: i.range } : {
|
|
115
115
|
min: 0,
|
|
116
116
|
max: 1e4
|
|
117
|
-
},
|
|
117
|
+
}, z = a && a.range ? { customValues: a.range } : {
|
|
118
118
|
min: 0,
|
|
119
119
|
max: 1e4
|
|
120
|
-
},
|
|
120
|
+
}, B = /* @__PURE__ */ D(re, { children: [/* @__PURE__ */ E(I, {
|
|
121
121
|
label: "Grid Interval",
|
|
122
122
|
value: v.step,
|
|
123
123
|
variant: "outlined",
|
|
124
|
-
onChange: (e, t) =>
|
|
125
|
-
...
|
|
126
|
-
}), /* @__PURE__ */ E(
|
|
124
|
+
onChange: (e, t) => J("step", t, e),
|
|
125
|
+
...R
|
|
126
|
+
}), /* @__PURE__ */ E(I, {
|
|
127
127
|
label: "Label Interval",
|
|
128
128
|
value: v.labelStep,
|
|
129
129
|
variant: "outlined",
|
|
130
|
-
onChange: (e, t) =>
|
|
131
|
-
...
|
|
132
|
-
})] }),
|
|
130
|
+
onChange: (e, t) => J("labelStep", t, e),
|
|
131
|
+
...z
|
|
132
|
+
})] }), V = (e) => {
|
|
133
133
|
u((t) => ({
|
|
134
134
|
...t,
|
|
135
135
|
open: e
|
|
136
136
|
})), f(e);
|
|
137
|
-
},
|
|
137
|
+
}, H = (e, t) => e.map((e) => (Object.prototype.hasOwnProperty.call(e, t) && (e[t] = t == "interactive"), e)), U = (e) => {
|
|
138
138
|
let { correctAnswer: r, data: i } = t;
|
|
139
|
-
x === !1 &&
|
|
140
|
-
},
|
|
139
|
+
x === !1 && H(i, "interactive"), S === !1 && H(i, "editable"), N(i, e, v, n, t), N(r.data, !1, v, n, t);
|
|
140
|
+
}, W = () => {
|
|
141
141
|
let e = o?.label;
|
|
142
142
|
n({
|
|
143
143
|
...t,
|
|
144
144
|
studentCategoryDefaultLabel: e
|
|
145
145
|
});
|
|
146
|
-
},
|
|
146
|
+
}, G = (e) => e.includes("Plot") ? {
|
|
147
147
|
min: 3,
|
|
148
148
|
max: 10
|
|
149
149
|
} : {
|
|
150
150
|
min: .05,
|
|
151
151
|
max: 1e4
|
|
152
|
-
},
|
|
152
|
+
}, K = (e, r) => {
|
|
153
153
|
let i = {
|
|
154
154
|
...C,
|
|
155
155
|
[e]: r
|
|
@@ -158,57 +158,57 @@ var N = (e, t, n, r, i) => {
|
|
|
158
158
|
...t,
|
|
159
159
|
graph: i
|
|
160
160
|
});
|
|
161
|
-
},
|
|
162
|
-
_(v[e]), m(e), v[e] = r, (e === "max" || e === "step") && (
|
|
161
|
+
}, q = (e, t) => (e || []).find((e) => e.value > t.max || e.value - t.step * Math.floor(e.value / t.step) !== 0), J = (e, r, i) => {
|
|
162
|
+
_(v[e]), m(e), v[e] = r, (e === "max" || e === "step") && (q(t.data, v) || q(t.correctAnswer.data, v)) && i?.target ? f(!0) : n({
|
|
163
163
|
...t,
|
|
164
164
|
range: v
|
|
165
165
|
});
|
|
166
166
|
};
|
|
167
167
|
ee(() => {
|
|
168
|
-
|
|
168
|
+
U(!0), W();
|
|
169
169
|
}, []), ee(() => {
|
|
170
170
|
d && u({
|
|
171
171
|
open: !0,
|
|
172
172
|
title: "Warning",
|
|
173
173
|
text: "This change will remove values defined for one or more categories",
|
|
174
174
|
onConfirm: () => {
|
|
175
|
-
|
|
175
|
+
U(), V(!1), n({
|
|
176
176
|
...t,
|
|
177
177
|
range: v,
|
|
178
|
-
correctAnswer:
|
|
178
|
+
correctAnswer: b
|
|
179
179
|
});
|
|
180
180
|
},
|
|
181
181
|
onClose: () => {
|
|
182
|
-
v[p] =
|
|
182
|
+
v[p] = g, V(!1);
|
|
183
183
|
}
|
|
184
184
|
});
|
|
185
185
|
}, [d]);
|
|
186
|
-
let
|
|
187
|
-
|
|
186
|
+
let Y = v.step === 1 && v.labelStep === 1 && 3 <= v.max && v.max <= 10, ae = () => {
|
|
187
|
+
G.min = 3, G.max = 10, v.max = 10, v.step = 1, v.labelStep = 1, n({
|
|
188
188
|
...t,
|
|
189
189
|
range: v
|
|
190
190
|
});
|
|
191
|
-
},
|
|
191
|
+
}, X = (e) => {
|
|
192
192
|
if (e.includes("Plot")) {
|
|
193
|
-
if (!
|
|
193
|
+
if (!Y) {
|
|
194
194
|
u({
|
|
195
195
|
open: !0,
|
|
196
196
|
title: "Warning",
|
|
197
197
|
text: "The selected chart type does not support the current chart configuration. Reset chart configuration?",
|
|
198
198
|
onConfirm: () => {
|
|
199
|
-
|
|
199
|
+
ae(), U(), V(!1), n({
|
|
200
200
|
...t,
|
|
201
201
|
range: v,
|
|
202
202
|
chartType: e
|
|
203
203
|
});
|
|
204
204
|
},
|
|
205
205
|
onClose: () => {
|
|
206
|
-
|
|
206
|
+
V(!1);
|
|
207
207
|
}
|
|
208
208
|
});
|
|
209
209
|
return;
|
|
210
210
|
}
|
|
211
|
-
|
|
211
|
+
G.min = 3, G.max = 10, n({
|
|
212
212
|
...t,
|
|
213
213
|
chartType: e
|
|
214
214
|
});
|
|
@@ -220,48 +220,48 @@ var N = (e, t, n, r, i) => {
|
|
|
220
220
|
});
|
|
221
221
|
};
|
|
222
222
|
return /* @__PURE__ */ D(te, { children: [
|
|
223
|
-
/* @__PURE__ */ E(
|
|
223
|
+
/* @__PURE__ */ E(h, {
|
|
224
224
|
variant: "subtitle1",
|
|
225
225
|
children: "Configure Chart"
|
|
226
226
|
}),
|
|
227
227
|
/* @__PURE__ */ D(ne, { children: [
|
|
228
|
-
/* @__PURE__ */ D(
|
|
228
|
+
/* @__PURE__ */ D(re, { children: [/* @__PURE__ */ E(M, {
|
|
229
229
|
value: t.chartType,
|
|
230
|
-
onChange: (e) =>
|
|
230
|
+
onChange: (e) => X(e.target.value),
|
|
231
231
|
availableChartTypes: s,
|
|
232
232
|
chartTypeLabel: c
|
|
233
|
-
}), /* @__PURE__ */ E(
|
|
233
|
+
}), /* @__PURE__ */ E(I, {
|
|
234
234
|
label: "Max Value",
|
|
235
235
|
value: v.max,
|
|
236
|
-
min:
|
|
237
|
-
max:
|
|
236
|
+
min: G(t.chartType).min,
|
|
237
|
+
max: G(t.chartType).max,
|
|
238
238
|
variant: "outlined",
|
|
239
|
-
onChange: (e, t) =>
|
|
239
|
+
onChange: (e, t) => J("max", t, e)
|
|
240
240
|
})] }),
|
|
241
|
-
!t.chartType.includes("Plot") &&
|
|
242
|
-
T && /* @__PURE__ */ D(
|
|
243
|
-
/* @__PURE__ */ E("div", { children: /* @__PURE__ */ E(
|
|
244
|
-
/* @__PURE__ */ D(P, { children: [/* @__PURE__ */ E(
|
|
241
|
+
!t.chartType.includes("Plot") && B,
|
|
242
|
+
T && /* @__PURE__ */ D(L, { children: [
|
|
243
|
+
/* @__PURE__ */ E("div", { children: /* @__PURE__ */ E(h, { children: "Dimensions(px)" }) }),
|
|
244
|
+
/* @__PURE__ */ D(P, { children: [/* @__PURE__ */ E(F, {
|
|
245
245
|
label: "Width",
|
|
246
246
|
value: C.width,
|
|
247
247
|
min: A.min,
|
|
248
248
|
max: A.max,
|
|
249
249
|
step: A.step,
|
|
250
250
|
variant: "outlined",
|
|
251
|
-
onChange: (e, t) =>
|
|
252
|
-
}), /* @__PURE__ */ E(
|
|
253
|
-
/* @__PURE__ */ D(P, { children: [/* @__PURE__ */ E(
|
|
251
|
+
onChange: (e, t) => K("width", t)
|
|
252
|
+
}), /* @__PURE__ */ E(ie, { children: "Min 50, Max 700" })] }),
|
|
253
|
+
/* @__PURE__ */ D(P, { children: [/* @__PURE__ */ E(F, {
|
|
254
254
|
label: "Height",
|
|
255
255
|
value: C.height,
|
|
256
256
|
min: j.min,
|
|
257
257
|
max: j.max,
|
|
258
258
|
step: j.step,
|
|
259
259
|
variant: "outlined",
|
|
260
|
-
onChange: (e, t) =>
|
|
261
|
-
}), /* @__PURE__ */ E(
|
|
260
|
+
onChange: (e, t) => K("height", t)
|
|
261
|
+
}), /* @__PURE__ */ E(ie, { children: "Min 400, Max 700" })] })
|
|
262
262
|
] })
|
|
263
263
|
] }),
|
|
264
|
-
/* @__PURE__ */ E(
|
|
264
|
+
/* @__PURE__ */ E(y, {
|
|
265
265
|
open: l.open,
|
|
266
266
|
title: l.title,
|
|
267
267
|
text: l.text,
|
|
@@ -270,7 +270,7 @@ var N = (e, t, n, r, i) => {
|
|
|
270
270
|
})
|
|
271
271
|
] });
|
|
272
272
|
};
|
|
273
|
-
|
|
273
|
+
R.propTypes = {
|
|
274
274
|
chartDimensions: O.default.object,
|
|
275
275
|
domain: O.default.object,
|
|
276
276
|
gridValues: O.default.object,
|
|
@@ -286,7 +286,7 @@ z.propTypes = {
|
|
|
286
286
|
};
|
|
287
287
|
//#endregion
|
|
288
288
|
//#region ../../shared/configure-events/dist/index.js
|
|
289
|
-
var
|
|
289
|
+
var z = class e extends CustomEvent {
|
|
290
290
|
static {
|
|
291
291
|
this.TYPE = "model.updated";
|
|
292
292
|
}
|
|
@@ -299,7 +299,7 @@ var B = class e extends CustomEvent {
|
|
|
299
299
|
}
|
|
300
300
|
}), this.update = t, this.reset = n;
|
|
301
301
|
}
|
|
302
|
-
},
|
|
302
|
+
}, B = class e extends CustomEvent {
|
|
303
303
|
static {
|
|
304
304
|
this.TYPE = "delete.image";
|
|
305
305
|
}
|
|
@@ -312,7 +312,7 @@ var B = class e extends CustomEvent {
|
|
|
312
312
|
}
|
|
313
313
|
}), this.src = t, this.done = n;
|
|
314
314
|
}
|
|
315
|
-
},
|
|
315
|
+
}, V = class e extends CustomEvent {
|
|
316
316
|
static {
|
|
317
317
|
this.TYPE = "insert.image";
|
|
318
318
|
}
|
|
@@ -322,7 +322,7 @@ var B = class e extends CustomEvent {
|
|
|
322
322
|
detail: t
|
|
323
323
|
}), this.handler = t;
|
|
324
324
|
}
|
|
325
|
-
},
|
|
325
|
+
}, H = class e extends CustomEvent {
|
|
326
326
|
static {
|
|
327
327
|
this.TYPE = "delete.sound";
|
|
328
328
|
}
|
|
@@ -335,7 +335,7 @@ var B = class e extends CustomEvent {
|
|
|
335
335
|
}
|
|
336
336
|
}), this.src = t, this.done = n;
|
|
337
337
|
}
|
|
338
|
-
},
|
|
338
|
+
}, U = class e extends CustomEvent {
|
|
339
339
|
static {
|
|
340
340
|
this.TYPE = "insert.sound";
|
|
341
341
|
}
|
|
@@ -345,11 +345,11 @@ var B = class e extends CustomEvent {
|
|
|
345
345
|
detail: t
|
|
346
346
|
}), this.handler = t;
|
|
347
347
|
}
|
|
348
|
-
},
|
|
348
|
+
}, W = /* @__PURE__ */ e(r(), 1), G = a("div")(({ theme: e }) => ({
|
|
349
349
|
marginBottom: e.spacing(2.5),
|
|
350
350
|
display: "flex",
|
|
351
351
|
flex: 1
|
|
352
|
-
})),
|
|
352
|
+
})), K = a("div")(({ theme: e }) => ({ marginBottom: e.spacing(1) })), q = a("div")({ flex: 1 }), J = a(l)({ color: `${i.tertiary()} !important` }), Y = (e, t) => {
|
|
353
353
|
if (!e) return t;
|
|
354
354
|
let n = [];
|
|
355
355
|
return (t || []).forEach((t, r) => {
|
|
@@ -361,7 +361,7 @@ var B = class e extends CustomEvent {
|
|
|
361
361
|
interactive: t.interactive
|
|
362
362
|
};
|
|
363
363
|
}), n;
|
|
364
|
-
},
|
|
364
|
+
}, ae = class extends S.Component {
|
|
365
365
|
static propTypes = {
|
|
366
366
|
model: O.default.object.isRequired,
|
|
367
367
|
onChange: O.default.func.isRequired,
|
|
@@ -381,7 +381,7 @@ var B = class e extends CustomEvent {
|
|
|
381
381
|
data: e
|
|
382
382
|
});
|
|
383
383
|
changeAddRemoveEnabled = (e) => {
|
|
384
|
-
let { model: t } = this.props, n =
|
|
384
|
+
let { model: t } = this.props, n = Y(t.correctAnswer.data, t.data);
|
|
385
385
|
e ? this.props.onChange({
|
|
386
386
|
...this.props.model,
|
|
387
387
|
addCategoryEnabled: e
|
|
@@ -410,13 +410,13 @@ var B = class e extends CustomEvent {
|
|
|
410
410
|
});
|
|
411
411
|
render() {
|
|
412
412
|
let { model: e, charts: t, labelsPlaceholders: n, titlePlaceholder: r, showPixelGuides: i, authorNewCategoryDefaults: a, chartingOptions: o, mathMlOptions: s = {}, labelsCharactersLimit: c } = this.props, { dialog: l } = this.state, { domain: u = {}, range: d = {} } = e || {};
|
|
413
|
-
return /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E(
|
|
414
|
-
/* @__PURE__ */ E(
|
|
413
|
+
return /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E(K, { children: "Define Initial Chart Attributes" }), /* @__PURE__ */ E(G, { children: /* @__PURE__ */ D(q, { children: [
|
|
414
|
+
/* @__PURE__ */ E(h, {
|
|
415
415
|
component: "div",
|
|
416
416
|
type: "body1",
|
|
417
417
|
children: /* @__PURE__ */ E("span", { children: "Use the tools below to set up the chart as it will initially appear to students." })
|
|
418
418
|
}),
|
|
419
|
-
/* @__PURE__ */ E(
|
|
419
|
+
/* @__PURE__ */ E(b, {
|
|
420
420
|
defineChart: !0,
|
|
421
421
|
chartingOptions: o,
|
|
422
422
|
showPixelGuides: i,
|
|
@@ -443,13 +443,13 @@ var B = class e extends CustomEvent {
|
|
|
443
443
|
mathMlOptions: s,
|
|
444
444
|
labelsCharactersLimit: c
|
|
445
445
|
}),
|
|
446
|
-
e.changeAddCategoryEnabled && /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E(
|
|
446
|
+
e.changeAddCategoryEnabled && /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E(J, {
|
|
447
447
|
checked: e.addCategoryEnabled,
|
|
448
448
|
onChange: (e) => {
|
|
449
449
|
this.changeAddRemoveEnabled(e.target.checked);
|
|
450
450
|
}
|
|
451
451
|
}), o?.addCategory?.authoringLabel] }),
|
|
452
|
-
/* @__PURE__ */ E(
|
|
452
|
+
/* @__PURE__ */ E(y, {
|
|
453
453
|
open: l.open,
|
|
454
454
|
title: l.title,
|
|
455
455
|
text: l.text,
|
|
@@ -458,20 +458,20 @@ var B = class e extends CustomEvent {
|
|
|
458
458
|
})
|
|
459
459
|
] }, "graph") })] });
|
|
460
460
|
}
|
|
461
|
-
},
|
|
461
|
+
}, X = a("div")(({ theme: e }) => ({
|
|
462
462
|
marginBottom: e.spacing(2.5),
|
|
463
463
|
display: "flex",
|
|
464
464
|
flex: 1
|
|
465
|
-
})),
|
|
465
|
+
})), oe = a("div")({ flex: 1 }), se = a("div")(({ theme: e }) => ({ border: `2px solid ${e.palette.error.main}` })), ce = a(h)(({ theme: e }) => ({
|
|
466
466
|
fontSize: e.typography.fontSize - 2,
|
|
467
467
|
color: e.palette.error.main,
|
|
468
468
|
paddingTop: e.spacing(1)
|
|
469
|
-
})),
|
|
469
|
+
})), le = a("div")(({ theme: e }) => ({ marginBottom: e.spacing(1) })), Z = (e, t) => e.map((e, n) => ({
|
|
470
470
|
...e,
|
|
471
471
|
editable: n < t.length ? t[n].editable : !0,
|
|
472
472
|
interactive: n < t.length ? t[n].interactive : !0,
|
|
473
473
|
deletable: n >= t.length
|
|
474
|
-
})),
|
|
474
|
+
})), ue = (e, t) => {
|
|
475
475
|
if (!e) return t;
|
|
476
476
|
let n = [...e], r = [];
|
|
477
477
|
if ((t || []).forEach((t, n) => {
|
|
@@ -484,25 +484,25 @@ var B = class e extends CustomEvent {
|
|
|
484
484
|
};
|
|
485
485
|
}), r.length < e.length) {
|
|
486
486
|
let i = (n || []).slice(r.length, e.length);
|
|
487
|
-
return
|
|
487
|
+
return Z((r || []).concat(i), t);
|
|
488
488
|
}
|
|
489
489
|
return r;
|
|
490
|
-
},
|
|
490
|
+
}, de = (e, t) => {
|
|
491
491
|
let n = t.length - 1, { editable: r, interactive: i, deletable: a, ...o } = t[t.length - 1];
|
|
492
|
-
return (e || []).splice(n, 0, o),
|
|
493
|
-
},
|
|
494
|
-
let
|
|
495
|
-
if (
|
|
496
|
-
if (
|
|
497
|
-
let e =
|
|
498
|
-
for (let t = 0; t <
|
|
492
|
+
return (e || []).splice(n, 0, o), Z([...e], t);
|
|
493
|
+
}, fe = (e, t, n) => ((e || []).splice(n, 1), Z([...e], t)), pe = (e, n, r) => {
|
|
494
|
+
let i = e && e.model && e.model.data || [], a = n && n.model && n.model.data || [], o = t(e && e.model && e.model.correctAnswer && e.model.correctAnswer.data || []), s = t(r ? r.categories : []), c = [];
|
|
495
|
+
if (i.length > a.length) return c = de(o, i), c;
|
|
496
|
+
if (i.length < a.length) {
|
|
497
|
+
let e = i.length;
|
|
498
|
+
for (let t = 0; t < i.length; t++) if (i[t].index !== t) {
|
|
499
499
|
e = t;
|
|
500
500
|
break;
|
|
501
501
|
}
|
|
502
|
-
return
|
|
502
|
+
return c = fe(s, i, e), c;
|
|
503
503
|
}
|
|
504
|
-
return
|
|
505
|
-
},
|
|
504
|
+
return c = ue(o, i), c;
|
|
505
|
+
}, me = class extends S.Component {
|
|
506
506
|
static propTypes = {
|
|
507
507
|
correctAnswerErrors: O.default.object,
|
|
508
508
|
studentNewCategoryDefaultLabel: O.default.string,
|
|
@@ -525,22 +525,22 @@ var B = class e extends CustomEvent {
|
|
|
525
525
|
});
|
|
526
526
|
};
|
|
527
527
|
componentDidMount() {
|
|
528
|
-
let e =
|
|
529
|
-
this.setState({ categories: e ||
|
|
528
|
+
let e = pe(this.props, this.props, null);
|
|
529
|
+
this.setState({ categories: e || ue(this.props.model.correctAnswer.data, this.props.model.data) });
|
|
530
530
|
}
|
|
531
531
|
componentDidUpdate(e, t) {
|
|
532
|
-
let r =
|
|
532
|
+
let r = pe(this.props, e, t);
|
|
533
533
|
r && !n(r, this.state.categories) && (this.changeData(r), this.setState({ categories: r }));
|
|
534
534
|
}
|
|
535
535
|
render() {
|
|
536
536
|
let { model: e, charts: t, error: n, studentNewCategoryDefaultLabel: r, correctAnswerErrors: i, mathMlOptions: a = {}, labelsPlaceholders: o = {} } = this.props, { categories: s } = this.state, { domain: c = {}, range: l = {} } = e || {}, { identicalError: u, categoriesError: d } = i || {};
|
|
537
|
-
return /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E(
|
|
538
|
-
/* @__PURE__ */ E(
|
|
537
|
+
return /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E(le, { children: "Define Correct Response" }), /* @__PURE__ */ E(X, { children: /* @__PURE__ */ D(oe, { children: [
|
|
538
|
+
/* @__PURE__ */ E(h, {
|
|
539
539
|
component: "div",
|
|
540
540
|
type: "body1",
|
|
541
541
|
children: /* @__PURE__ */ E("span", { children: "Use the tools below to define the correct answer." })
|
|
542
542
|
}),
|
|
543
|
-
E(u || d ?
|
|
543
|
+
E(u || d ? se : "div", { children: /* @__PURE__ */ E(b, {
|
|
544
544
|
chartType: e.chartType,
|
|
545
545
|
size: e.graph,
|
|
546
546
|
domain: c,
|
|
@@ -555,14 +555,14 @@ var B = class e extends CustomEvent {
|
|
|
555
555
|
mathMlOptions: a,
|
|
556
556
|
labelsPlaceholders: o
|
|
557
557
|
}) }, `correct-response-graph-${e.correctAnswer.name}`),
|
|
558
|
-
(u || d) && /* @__PURE__ */ E(
|
|
558
|
+
(u || d) && /* @__PURE__ */ E(ce, {
|
|
559
559
|
component: "div",
|
|
560
560
|
type: "body1",
|
|
561
561
|
children: /* @__PURE__ */ E("span", { children: u || d })
|
|
562
562
|
})
|
|
563
563
|
] }, "graph") })] });
|
|
564
564
|
}
|
|
565
|
-
},
|
|
565
|
+
}, he = [
|
|
566
566
|
.01,
|
|
567
567
|
.02,
|
|
568
568
|
.04,
|
|
@@ -589,7 +589,7 @@ var B = class e extends CustomEvent {
|
|
|
589
589
|
100,
|
|
590
590
|
500,
|
|
591
591
|
1e3
|
|
592
|
-
],
|
|
592
|
+
], ge = [
|
|
593
593
|
.01,
|
|
594
594
|
.02,
|
|
595
595
|
.05,
|
|
@@ -606,7 +606,7 @@ var B = class e extends CustomEvent {
|
|
|
606
606
|
100,
|
|
607
607
|
500,
|
|
608
608
|
1e3
|
|
609
|
-
],
|
|
609
|
+
], _e = {
|
|
610
610
|
.01: [
|
|
611
611
|
0,
|
|
612
612
|
.01,
|
|
@@ -785,14 +785,14 @@ var B = class e extends CustomEvent {
|
|
|
785
785
|
4e3,
|
|
786
786
|
5e3
|
|
787
787
|
]
|
|
788
|
-
},
|
|
789
|
-
let r = 10 * (e.max - e.min) / t, i = r * 10, a = n && !
|
|
790
|
-
return (!n || a ?
|
|
791
|
-
},
|
|
792
|
-
let a =
|
|
788
|
+
}, ve = (e, t, n = !1) => {
|
|
789
|
+
let r = 10 * (e.max - e.min) / t, i = r * 10, a = n && !ge.includes(e.step) && he.includes(e.step);
|
|
790
|
+
return (!n || a ? he : ge).filter((e) => e >= r && e <= i);
|
|
791
|
+
}, ye = (e) => _e[e] || [], be = (e, t, r, i) => {
|
|
792
|
+
let a = ve(e, t), o = ye(e.step || 1);
|
|
793
793
|
if (!n(r, a) && !a.includes(e.step)) {
|
|
794
|
-
let n =
|
|
795
|
-
return e.step = n, o =
|
|
794
|
+
let n = ve(e, t, !0)[0] || 1;
|
|
795
|
+
return e.step = n, o = ye(n), o.includes(e.labelStep) || (e.labelStep = n), {
|
|
796
796
|
gridValues: a,
|
|
797
797
|
labelValues: o
|
|
798
798
|
};
|
|
@@ -801,21 +801,21 @@ var B = class e extends CustomEvent {
|
|
|
801
801
|
gridValues: a,
|
|
802
802
|
labelValues: o
|
|
803
803
|
};
|
|
804
|
-
},
|
|
804
|
+
}, xe = (0, W.default)("@pie-element:graphing:configure"), { Panel: Se, toggle: Q, radio: Ce, dropdown: we, textField: Te } = f, Ee = a(v)(({ theme: e }) => ({
|
|
805
805
|
width: "100%",
|
|
806
806
|
paddingTop: e.spacing(2),
|
|
807
807
|
marginBottom: e.spacing(2)
|
|
808
|
-
})),
|
|
808
|
+
})), De = a(h)(({ theme: e }) => ({ marginBottom: e.spacing(2.5) })), $ = a("div")(({ theme: e }) => ({
|
|
809
809
|
fontSize: e.typography.fontSize - 2,
|
|
810
810
|
color: e.palette.error.main,
|
|
811
811
|
paddingTop: e.spacing(1)
|
|
812
812
|
})), Oe = [
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
813
|
+
m.Bar(),
|
|
814
|
+
m.Histogram(),
|
|
815
|
+
m.LineDot(),
|
|
816
|
+
m.LineCross(),
|
|
817
|
+
m.DotPlot(),
|
|
818
|
+
m.LinePlot()
|
|
819
819
|
], ke = class extends C.Component {
|
|
820
820
|
static propTypes = {
|
|
821
821
|
onModelChanged: O.default.func,
|
|
@@ -828,7 +828,7 @@ var B = class e extends CustomEvent {
|
|
|
828
828
|
};
|
|
829
829
|
constructor(e) {
|
|
830
830
|
super(e);
|
|
831
|
-
let { range: t = {}, graph: n } = e.model || {}, r = { range:
|
|
831
|
+
let { range: t = {}, graph: n } = e.model || {}, r = { range: ve(t, n.height, !0) }, i = { range: ye(t.step || 1) };
|
|
832
832
|
this.state = {
|
|
833
833
|
gridValues: r,
|
|
834
834
|
labelValues: i
|
|
@@ -854,7 +854,7 @@ var B = class e extends CustomEvent {
|
|
|
854
854
|
let { model: t, onModelChanged: n } = this.props, { gridValues: r, labelValues: i } = this.state, a = {
|
|
855
855
|
...t,
|
|
856
856
|
...e
|
|
857
|
-
}, { graph: o, range: s } = a, c = {}, l = {}, u =
|
|
857
|
+
}, { graph: o, range: s } = a, c = {}, l = {}, u = be(s, o.height, r.range, i.range);
|
|
858
858
|
c.range = u.gridValues, l.range = u.labelValues, this.setState({
|
|
859
859
|
gridValues: c,
|
|
860
860
|
labelValues: l
|
|
@@ -862,23 +862,23 @@ var B = class e extends CustomEvent {
|
|
|
862
862
|
};
|
|
863
863
|
render() {
|
|
864
864
|
let { configuration: e, imageSupport: t, model: n, onConfigurationChanged: r, onModelChanged: i, uploadSoundSupport: a } = this.props;
|
|
865
|
-
|
|
866
|
-
let { graph: o } = n, { baseInputConfiguration: s = {}, contentDimensions: l = {}, chartDimensions: d = {}, authorNewCategoryDefaults: f = {}, labelsPlaceholders: p = {}, instruction: m = {}, maxImageWidth: h = {}, maxImageHeight: g = {}, prompt: _ = {}, rationale: v = {}, scoringType: y = {}, settingsPanelDisabled: b, spellCheck: x = {}, studentInstructions: S = {}, teacherInstructions: C = {}, titlePlaceholder: ee = {}, withRubric: w = {}, chartingOptions: T = {}, availableChartTypes: O = {}, mathMlOptions: k = {}, chartTypeLabel: A, language: j = {}, languageChoices: M = {}, labelsCharactersLimit: N } = e || {}, { errors: te, extraCSSRules: ne, promptEnabled: P, rationaleEnabled:
|
|
867
|
-
changeInteractiveEnabled: T.changeInteractive?.settings &&
|
|
868
|
-
changeEditableEnabled: T.changeEditable?.settings &&
|
|
869
|
-
changeAddCategoryEnabled: T.addCategory?.settings &&
|
|
870
|
-
},
|
|
871
|
-
teacherInstructionsEnabled: C.settings &&
|
|
872
|
-
studentInstructionsEnabled: S.settings &&
|
|
873
|
-
rationaleEnabled: v.settings &&
|
|
874
|
-
spellCheckEnabled: x.settings &&
|
|
875
|
-
promptEnabled: _.settings &&
|
|
876
|
-
scoringType: y.settings &&
|
|
877
|
-
rubricEnabled: w?.settings &&
|
|
878
|
-
"language.enabled": j.settings &&
|
|
879
|
-
language: j.settings && j.enabled &&
|
|
880
|
-
instruction: m.settings &&
|
|
881
|
-
},
|
|
865
|
+
xe("[render] model", n);
|
|
866
|
+
let { graph: o } = n, { baseInputConfiguration: s = {}, contentDimensions: l = {}, chartDimensions: d = {}, authorNewCategoryDefaults: f = {}, labelsPlaceholders: p = {}, instruction: m = {}, maxImageWidth: h = {}, maxImageHeight: g = {}, prompt: _ = {}, rationale: v = {}, scoringType: y = {}, settingsPanelDisabled: b, spellCheck: x = {}, studentInstructions: S = {}, teacherInstructions: C = {}, titlePlaceholder: ee = {}, withRubric: w = {}, chartingOptions: T = {}, availableChartTypes: O = {}, mathMlOptions: k = {}, chartTypeLabel: A, language: j = {}, languageChoices: M = {}, labelsCharactersLimit: N } = e || {}, { errors: te, extraCSSRules: ne, promptEnabled: P, rationaleEnabled: re, spellCheckEnabled: F, teacherInstructionsEnabled: I, studentNewCategoryDefaultLabel: L } = n || {}, { categoryErrors: ie, correctAnswerErrors: z, prompt: B, rationale: V, teacherInstructions: H } = te || {}, { gridValues: U, labelValues: W } = this.state, G = d.showInConfigPanel || !0, K = h && h.prompt, q = g && g.prompt, J = {
|
|
867
|
+
changeInteractiveEnabled: T.changeInteractive?.settings && Q(T.changeInteractive.settingsLabel),
|
|
868
|
+
changeEditableEnabled: T.changeEditable?.settings && Q(T.changeEditable.settingsLabel),
|
|
869
|
+
changeAddCategoryEnabled: T.addCategory?.settings && Q(T.addCategory.settingsLabel)
|
|
870
|
+
}, Y = {
|
|
871
|
+
teacherInstructionsEnabled: C.settings && Q(C.label),
|
|
872
|
+
studentInstructionsEnabled: S.settings && Q(S.label),
|
|
873
|
+
rationaleEnabled: v.settings && Q(v.label),
|
|
874
|
+
spellCheckEnabled: x.settings && Q(x.label),
|
|
875
|
+
promptEnabled: _.settings && Q(_.label),
|
|
876
|
+
scoringType: y.settings && Ce(y.label, ["all or nothing", "partial scoring"]),
|
|
877
|
+
rubricEnabled: w?.settings && Q(w?.label),
|
|
878
|
+
"language.enabled": j.settings && Q(j.label, !0),
|
|
879
|
+
language: j.settings && j.enabled && we(M.label, M.options),
|
|
880
|
+
instruction: m.settings && Te(m.label)
|
|
881
|
+
}, X = (e = {}) => ({
|
|
882
882
|
...s,
|
|
883
883
|
...e
|
|
884
884
|
});
|
|
@@ -886,106 +886,106 @@ var B = class e extends CustomEvent {
|
|
|
886
886
|
extraCSSRules: ne,
|
|
887
887
|
dimensions: l,
|
|
888
888
|
hideSettings: b,
|
|
889
|
-
settings: /* @__PURE__ */ E(
|
|
889
|
+
settings: /* @__PURE__ */ E(Se, {
|
|
890
890
|
model: n,
|
|
891
891
|
configuration: e,
|
|
892
892
|
onChangeModel: i,
|
|
893
893
|
onChangeConfiguration: r,
|
|
894
894
|
groups: {
|
|
895
|
-
Settings:
|
|
896
|
-
Properties:
|
|
895
|
+
Settings: J,
|
|
896
|
+
Properties: Y
|
|
897
897
|
}
|
|
898
898
|
}),
|
|
899
899
|
children: [
|
|
900
|
-
/* @__PURE__ */ E(
|
|
900
|
+
/* @__PURE__ */ E(De, {
|
|
901
901
|
component: "div",
|
|
902
902
|
type: "body1",
|
|
903
903
|
children: m?.label || ""
|
|
904
904
|
}),
|
|
905
|
-
|
|
905
|
+
I && /* @__PURE__ */ D(Ee, {
|
|
906
906
|
label: C.label,
|
|
907
907
|
children: [/* @__PURE__ */ E(u, {
|
|
908
908
|
markup: n.teacherInstructions || "",
|
|
909
909
|
onChange: this.onTeacherInstructionsChange,
|
|
910
910
|
imageSupport: t,
|
|
911
911
|
nonEmpty: !1,
|
|
912
|
-
error:
|
|
913
|
-
spellCheck:
|
|
914
|
-
pluginProps:
|
|
915
|
-
maxImageWidth: h && h.teacherInstructions ||
|
|
916
|
-
maxImageHeight: g && g.teacherInstructions ||
|
|
912
|
+
error: H,
|
|
913
|
+
spellCheck: F,
|
|
914
|
+
pluginProps: X(C?.inputConfiguration),
|
|
915
|
+
maxImageWidth: h && h.teacherInstructions || K,
|
|
916
|
+
maxImageHeight: g && g.teacherInstructions || q,
|
|
917
917
|
uploadSoundSupport: a,
|
|
918
918
|
languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
|
|
919
919
|
mathMlOptions: k
|
|
920
|
-
}),
|
|
920
|
+
}), H && /* @__PURE__ */ E($, { children: H })]
|
|
921
921
|
}),
|
|
922
|
-
P && /* @__PURE__ */ D(
|
|
922
|
+
P && /* @__PURE__ */ D(Ee, {
|
|
923
923
|
label: _.label,
|
|
924
924
|
children: [/* @__PURE__ */ E(u, {
|
|
925
925
|
markup: n.prompt,
|
|
926
926
|
onChange: this.onPromptChange,
|
|
927
927
|
imageSupport: t,
|
|
928
928
|
nonEmpty: !1,
|
|
929
|
-
error:
|
|
930
|
-
spellCheck:
|
|
929
|
+
error: B,
|
|
930
|
+
spellCheck: F,
|
|
931
931
|
disableUnderline: !0,
|
|
932
|
-
pluginProps:
|
|
933
|
-
maxImageWidth:
|
|
934
|
-
maxImageHeight:
|
|
932
|
+
pluginProps: X(_?.inputConfiguration),
|
|
933
|
+
maxImageWidth: K,
|
|
934
|
+
maxImageHeight: q,
|
|
935
935
|
uploadSoundSupport: a,
|
|
936
936
|
languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
|
|
937
937
|
mathMlOptions: k
|
|
938
|
-
}),
|
|
938
|
+
}), B && /* @__PURE__ */ E($, { children: B })]
|
|
939
939
|
}),
|
|
940
|
-
/* @__PURE__ */ E(
|
|
940
|
+
/* @__PURE__ */ E(R, {
|
|
941
941
|
model: n,
|
|
942
942
|
onChange: this.onConfigChange,
|
|
943
|
-
gridValues:
|
|
944
|
-
labelValues:
|
|
943
|
+
gridValues: U,
|
|
944
|
+
labelValues: W,
|
|
945
945
|
chartDimensions: d,
|
|
946
946
|
charts: Oe,
|
|
947
|
-
studentNewCategoryDefaultLabel:
|
|
947
|
+
studentNewCategoryDefaultLabel: L,
|
|
948
948
|
availableChartTypes: O,
|
|
949
949
|
chartTypeLabel: A
|
|
950
950
|
}),
|
|
951
|
-
/* @__PURE__ */ E(
|
|
951
|
+
/* @__PURE__ */ E(ae, {
|
|
952
952
|
model: n,
|
|
953
953
|
onChange: i,
|
|
954
954
|
charts: Oe,
|
|
955
955
|
labelsPlaceholders: p,
|
|
956
956
|
titlePlaceholder: ee,
|
|
957
|
-
showPixelGuides:
|
|
957
|
+
showPixelGuides: G,
|
|
958
958
|
authorNewCategoryDefaults: f,
|
|
959
959
|
chartingOptions: T,
|
|
960
960
|
mathMlOptions: k,
|
|
961
961
|
labelsCharactersLimit: N
|
|
962
962
|
}),
|
|
963
|
-
/* @__PURE__ */ E(
|
|
963
|
+
/* @__PURE__ */ E(me, {
|
|
964
964
|
config: o,
|
|
965
965
|
model: n,
|
|
966
966
|
onChange: i,
|
|
967
967
|
charts: Oe,
|
|
968
|
-
error:
|
|
969
|
-
correctAnswerErrors:
|
|
970
|
-
studentNewCategoryDefaultLabel:
|
|
968
|
+
error: ie,
|
|
969
|
+
correctAnswerErrors: z,
|
|
970
|
+
studentNewCategoryDefaultLabel: L,
|
|
971
971
|
mathMlOptions: k,
|
|
972
972
|
labelsPlaceholders: p
|
|
973
973
|
}),
|
|
974
|
-
|
|
974
|
+
re && /* @__PURE__ */ D(Ee, {
|
|
975
975
|
label: v.label || "Rationale",
|
|
976
976
|
children: [/* @__PURE__ */ E(u, {
|
|
977
977
|
markup: n.rationale || "",
|
|
978
978
|
onChange: this.onRationaleChange,
|
|
979
979
|
imageSupport: t,
|
|
980
|
-
error:
|
|
981
|
-
spellCheck:
|
|
982
|
-
pluginProps:
|
|
983
|
-
maxImageWidth: h && h.rationale ||
|
|
984
|
-
maxImageHeight: g && g.rationale ||
|
|
980
|
+
error: V,
|
|
981
|
+
spellCheck: F,
|
|
982
|
+
pluginProps: X(v?.inputConfiguration),
|
|
983
|
+
maxImageWidth: h && h.rationale || K,
|
|
984
|
+
maxImageHeight: g && g.rationale || q,
|
|
985
985
|
uploadSoundSupport: a,
|
|
986
986
|
languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
|
|
987
987
|
mathMlOptions: k
|
|
988
|
-
}),
|
|
988
|
+
}), V && /* @__PURE__ */ E($, { children: V })]
|
|
989
989
|
})
|
|
990
990
|
]
|
|
991
991
|
});
|
|
@@ -1172,7 +1172,7 @@ var B = class e extends CustomEvent {
|
|
|
1172
1172
|
}
|
|
1173
1173
|
}
|
|
1174
1174
|
}
|
|
1175
|
-
}, je = (0,
|
|
1175
|
+
}, je = (0, W.default)("pie-elements:graphing:configure"), Me = class e extends HTMLElement {
|
|
1176
1176
|
static createDefaultModel = (e = {}) => ({
|
|
1177
1177
|
...Ae.model,
|
|
1178
1178
|
...e
|
|
@@ -1194,22 +1194,22 @@ var B = class e extends CustomEvent {
|
|
|
1194
1194
|
})) : delete this._model.language, this._render();
|
|
1195
1195
|
}
|
|
1196
1196
|
onModelChanged(e) {
|
|
1197
|
-
this._model = e, this._render(), je("[onModelChanged]: ", this._model), this.dispatchEvent(new
|
|
1197
|
+
this._model = e, this._render(), je("[onModelChanged]: ", this._model), this.dispatchEvent(new z(this._model));
|
|
1198
1198
|
}
|
|
1199
1199
|
onConfigurationChanged(e) {
|
|
1200
1200
|
this._configuration = e, this._render();
|
|
1201
1201
|
}
|
|
1202
1202
|
insertImage(e) {
|
|
1203
|
-
this.dispatchEvent(new
|
|
1203
|
+
this.dispatchEvent(new V(e));
|
|
1204
1204
|
}
|
|
1205
1205
|
onDeleteImage(e, t) {
|
|
1206
|
-
this.dispatchEvent(new
|
|
1206
|
+
this.dispatchEvent(new B(e, t));
|
|
1207
1207
|
}
|
|
1208
1208
|
insertSound(e) {
|
|
1209
|
-
this.dispatchEvent(new
|
|
1209
|
+
this.dispatchEvent(new U(e));
|
|
1210
1210
|
}
|
|
1211
1211
|
onDeleteSound(e, t) {
|
|
1212
|
-
this.dispatchEvent(new
|
|
1212
|
+
this.dispatchEvent(new H(e, t));
|
|
1213
1213
|
}
|
|
1214
1214
|
_render() {
|
|
1215
1215
|
if (this._model) {
|
|
@@ -1228,7 +1228,7 @@ var B = class e extends CustomEvent {
|
|
|
1228
1228
|
}
|
|
1229
1229
|
});
|
|
1230
1230
|
this._root ||= T(this), this._root.render(e), queueMicrotask(() => {
|
|
1231
|
-
|
|
1231
|
+
s(this);
|
|
1232
1232
|
});
|
|
1233
1233
|
}
|
|
1234
1234
|
}
|