@pie-element/charting 12.1.1-next.11 → 12.1.2-next.0
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/configure.js +2 -0
- package/controller.js +1 -0
- package/dist/author/charting-config.d.ts +30 -0
- package/dist/author/charting-config.js +126 -0
- package/dist/author/configure.d.ts +29 -0
- package/dist/author/configure.js +205 -0
- package/dist/author/correct-response.d.ts +27 -0
- package/dist/author/correct-response.js +116 -0
- package/dist/author/defaults.d.ts +229 -0
- package/dist/author/defaults.js +186 -0
- package/dist/author/index.d.ts +51 -0
- package/dist/author/index.js +74 -0
- package/dist/author/utils.d.ts +42 -0
- package/dist/author/utils.js +244 -0
- package/dist/browser/_baseSet-Cse6EM9A.js +1015 -0
- package/dist/browser/_baseSet-Cse6EM9A.js.map +1 -0
- package/dist/browser/author/index.js +1242 -0
- package/dist/browser/author/index.js.map +1 -0
- package/dist/browser/chart-Dghjf6JQ.js +62980 -0
- package/dist/browser/chart-Dghjf6JQ.js.map +1 -0
- package/dist/browser/charting.css +2 -0
- package/dist/browser/controller/index.js +233 -0
- package/dist/browser/controller/index.js.map +1 -0
- package/dist/browser/delivery/index.js +517 -0
- package/dist/browser/delivery/index.js.map +1 -0
- package/dist/charting.css +2 -0
- package/dist/controller/defaults.d.ts +44 -0
- package/dist/controller/defaults.js +33 -0
- package/dist/controller/index.d.ts +28 -0
- package/dist/controller/index.js +155 -0
- package/dist/delivery/index.d.ts +21 -0
- package/dist/delivery/index.js +46 -0
- package/dist/delivery/main.d.ts +23 -0
- package/dist/delivery/main.js +128 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.iife.d.ts +8 -0
- package/dist/index.iife.js +397 -0
- package/dist/index.js +2 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_DataView.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Hash.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_ListCache.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Map.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_MapCache.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Promise.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Set.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_SetCache.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Stack.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Symbol.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Uint8Array.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_WeakMap.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_apply.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayEach.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayFilter.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayLikeKeys.js +15 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayMap.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayPush.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arraySome.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assignValue.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assocIndexOf.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssign.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignIn.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignValue.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseClone.js +57 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseCreate.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseFlatten.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGet.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetAllKeys.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetTag.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseHasIn.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsArguments.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqual.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqualDeep.js +30 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsMap.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNative.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsSet.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsTypedArray.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeys.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeysIn.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_basePick.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_basePickBy.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseSet.js +22 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseSetToString.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTimes.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseToString.js +15 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseUnary.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cacheHas.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_castPath.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneArrayBuffer.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneBuffer.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneDataView.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneRegExp.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneSymbol.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneTypedArray.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyArray.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyObject.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbols.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbolsIn.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_coreJsData.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_defineProperty.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalArrays.js +35 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalByTag.js +35 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalObjects.js +32 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_flatRest.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_freeGlobal.js +4 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeys.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeysIn.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getMapData.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getNative.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getPrototype.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getRawTag.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbols.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbolsIn.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getTag.js +23 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getValue.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hasPath.js +18 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashClear.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashDelete.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashGet.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashHas.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashSet.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneArray.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneByTag.js +33 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneObject.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isFlattenable.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIndex.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKey.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKeyable.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isMasked.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isPrototype.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheClear.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheDelete.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheGet.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheHas.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheSet.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheClear.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheDelete.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheGet.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheHas.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheSet.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapToArray.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_memoizeCapped.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeCreate.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeys.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeysIn.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nodeUtil.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_objectToString.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overArg.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overRest.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_root.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheAdd.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheHas.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setToArray.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setToString.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_shortOut.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackClear.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackDelete.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackGet.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackHas.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackSet.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stringToPath.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toKey.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toSource.js +15 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/cloneDeep.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/constant.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/eq.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/flatten.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/hasIn.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/identity.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArguments.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArray.js +4 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLike.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isBuffer.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.js +21 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEqual.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isFunction.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isLength.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isMap.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObject.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObjectLike.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSet.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSymbol.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isTypedArray.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keys.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keysIn.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/memoize.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/pick.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubArray.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubFalse.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toString.js +7 -0
- package/package.json +81 -20
- package/CHANGELOG.json +0 -487
- package/CHANGELOG.md +0 -1991
- package/LICENSE.md +0 -5
- package/README.md +0 -1
- package/configure/CHANGELOG.json +0 -292
- package/configure/CHANGELOG.md +0 -1758
- package/configure/lib/charting-config.js +0 -192
- package/configure/lib/charting-config.js.map +0 -1
- package/configure/lib/configure.js +0 -312
- package/configure/lib/configure.js.map +0 -1
- package/configure/lib/correct-response.js +0 -244
- package/configure/lib/correct-response.js.map +0 -1
- package/configure/lib/defaults.js +0 -233
- package/configure/lib/defaults.js.map +0 -1
- package/configure/lib/index.js +0 -120
- package/configure/lib/index.js.map +0 -1
- package/configure/lib/utils.js +0 -80
- package/configure/lib/utils.js.map +0 -1
- package/configure/package.json +0 -29
- package/controller/CHANGELOG.json +0 -262
- package/controller/CHANGELOG.md +0 -1208
- package/controller/lib/defaults.js +0 -42
- package/controller/lib/defaults.js.map +0 -1
- package/controller/lib/index.js +0 -434
- package/controller/lib/index.js.map +0 -1
- package/controller/package.json +0 -24
- package/docs/config-schema.json +0 -2440
- package/docs/config-schema.json.md +0 -1802
- package/docs/demo/config.js +0 -8
- package/docs/demo/generate.js +0 -63
- package/docs/demo/index.html +0 -1
- package/docs/demo/session.js +0 -26
- package/docs/pie-schema.json +0 -1731
- package/docs/pie-schema.json.md +0 -945
- package/lib/index.js +0 -78
- package/lib/index.js.map +0 -1
- package/lib/main.js +0 -167
- package/lib/main.js.map +0 -1
|
@@ -0,0 +1,1242 @@
|
|
|
1
|
+
import { G as e, Y as t, n } from "../_baseSet-Cse6EM9A.js";
|
|
2
|
+
import { A as r, C as i, E as a, O as o, S as s, a as c, c as l, d as u, f as d, g as f, i as p, k as m, l as h, m as g, o as _, p as v, r as y, s as b, t as x } from "../chart-Dghjf6JQ.js";
|
|
3
|
+
import * as S from "react";
|
|
4
|
+
import C, { useEffect as ee, useState as w } from "react";
|
|
5
|
+
import { createRoot as T } from "react-dom/client";
|
|
6
|
+
import { jsx as E, jsxs as D } from "react/jsx-runtime";
|
|
7
|
+
//#region ../../lib-react/charting/dist/chart-type.js
|
|
8
|
+
var O = /* @__PURE__ */ t(r(), 1), k = m("div")(() => ({ width: "160px" })), A = m(s)(() => ({ width: "160px" })), j = m(i)(() => ({ backgroundColor: "transparent" })), M = ({ onChange: e, value: t, availableChartTypes: n, chartTypeLabel: r }) => /* @__PURE__ */ E(k, { children: /* @__PURE__ */ D(A, {
|
|
9
|
+
variant: "outlined",
|
|
10
|
+
children: [/* @__PURE__ */ E(j, {
|
|
11
|
+
id: "type-helper-label",
|
|
12
|
+
children: r
|
|
13
|
+
}), /* @__PURE__ */ D(v, {
|
|
14
|
+
labelId: "type-helper-label",
|
|
15
|
+
id: "type-helper-label-select",
|
|
16
|
+
name: "chartType",
|
|
17
|
+
value: t,
|
|
18
|
+
onChange: e,
|
|
19
|
+
label: r,
|
|
20
|
+
MenuProps: { transitionDuration: {
|
|
21
|
+
enter: 225,
|
|
22
|
+
exit: 195
|
|
23
|
+
} },
|
|
24
|
+
children: [
|
|
25
|
+
n?.histogram && /* @__PURE__ */ E(d, {
|
|
26
|
+
value: "histogram",
|
|
27
|
+
children: n.histogram
|
|
28
|
+
}),
|
|
29
|
+
n?.bar && /* @__PURE__ */ E(d, {
|
|
30
|
+
value: "bar",
|
|
31
|
+
children: n.bar
|
|
32
|
+
}),
|
|
33
|
+
n?.lineDot && /* @__PURE__ */ E(d, {
|
|
34
|
+
value: "lineDot",
|
|
35
|
+
children: n.lineDot
|
|
36
|
+
}),
|
|
37
|
+
n?.lineCross && /* @__PURE__ */ E(d, {
|
|
38
|
+
value: "lineCross",
|
|
39
|
+
children: n.lineCross
|
|
40
|
+
}),
|
|
41
|
+
n?.dotPlot && /* @__PURE__ */ E(d, {
|
|
42
|
+
value: "dotPlot",
|
|
43
|
+
children: n.dotPlot
|
|
44
|
+
}),
|
|
45
|
+
n?.linePlot && /* @__PURE__ */ E(d, {
|
|
46
|
+
value: "linePlot",
|
|
47
|
+
children: n.linePlot
|
|
48
|
+
})
|
|
49
|
+
]
|
|
50
|
+
})]
|
|
51
|
+
}) });
|
|
52
|
+
M.propTypes = {
|
|
53
|
+
onChange: O.default.func.isRequired,
|
|
54
|
+
value: O.default.string.isRequired,
|
|
55
|
+
availableChartTypes: O.default.shape({
|
|
56
|
+
histogram: O.default.string,
|
|
57
|
+
bar: O.default.string,
|
|
58
|
+
lineDot: O.default.string,
|
|
59
|
+
lineCross: O.default.string,
|
|
60
|
+
dotPlot: O.default.string,
|
|
61
|
+
linePlot: O.default.string
|
|
62
|
+
}),
|
|
63
|
+
chartTypeLabel: O.default.string
|
|
64
|
+
};
|
|
65
|
+
//#endregion
|
|
66
|
+
//#region ../../lib-react/charting/dist/chart-setup.js
|
|
67
|
+
var N = (e, t, n, r, i) => {
|
|
68
|
+
(e || []).forEach((e) => {
|
|
69
|
+
let t = Math.round(e.value * 10) % Math.round(n.step * 10) / 10;
|
|
70
|
+
(e.value > n.max || t !== 0) && (e.value = 0);
|
|
71
|
+
}), t && r({
|
|
72
|
+
...i,
|
|
73
|
+
data: e
|
|
74
|
+
});
|
|
75
|
+
}, te = m("div")(() => ({ width: "450px" })), ne = m("div")(({ theme: e }) => ({
|
|
76
|
+
display: "flex",
|
|
77
|
+
flexDirection: "column",
|
|
78
|
+
width: "100%",
|
|
79
|
+
marginTop: e.spacing(3)
|
|
80
|
+
})), P = m("div")(() => ({
|
|
81
|
+
display: "flex",
|
|
82
|
+
flexDirection: "column",
|
|
83
|
+
alignItems: "center"
|
|
84
|
+
})), F = m("div")(() => ({
|
|
85
|
+
display: "flex",
|
|
86
|
+
justifyContent: "space-around",
|
|
87
|
+
alignItems: "center"
|
|
88
|
+
})), I = m(_)(({ theme: e }) => ({
|
|
89
|
+
width: "130px",
|
|
90
|
+
margin: `${e.spacing(1)} ${e.spacing(.5)}`
|
|
91
|
+
})), L = m(_)(({ theme: e }) => ({
|
|
92
|
+
width: "160px",
|
|
93
|
+
margin: `${e.spacing(1)} ${e.spacing(.5)}`
|
|
94
|
+
})), R = m("div")(({ theme: e }) => ({
|
|
95
|
+
display: "flex",
|
|
96
|
+
justifyContent: "space-between",
|
|
97
|
+
alignItems: "center",
|
|
98
|
+
margin: `${e.spacing(3)} 0`
|
|
99
|
+
})), re = m(g)(() => ({ color: o.disabled() })), z = (e) => {
|
|
100
|
+
let { model: t, onChange: n, chartDimensions: r, gridValues: i = {}, labelValues: a = {}, studentNewCategoryDefaultLabel: o = {}, availableChartTypes: s = {}, chartTypeLabel: c } = e, [l, u] = w({
|
|
101
|
+
open: !1,
|
|
102
|
+
title: "",
|
|
103
|
+
text: "",
|
|
104
|
+
onClose: null,
|
|
105
|
+
onConfirm: null
|
|
106
|
+
}), [d, f] = w(!1), [p, m] = w(""), [h, _] = w(0), { range: v = {}, correctAnswer: y, changeInteractiveEnabled: x, changeEditableEnabled: S } = t, C = t.graph, { showInConfigPanel: T, width: O, height: k } = r || {}, A = {
|
|
107
|
+
min: O?.min ? Math.max(50, O.min) : 50,
|
|
108
|
+
max: O?.max ? Math.min(700, O.max) : 700,
|
|
109
|
+
step: O?.step >= 1 ? Math.min(200, O.step) : 20
|
|
110
|
+
}, j = {
|
|
111
|
+
min: k?.min ? Math.max(400, k.min) : 400,
|
|
112
|
+
max: k?.max ? Math.min(700, k.max) : 700,
|
|
113
|
+
step: k?.step >= 1 ? Math.min(200, k.step) : 20
|
|
114
|
+
}, z = i && i.range ? { customValues: i.range } : {
|
|
115
|
+
min: 0,
|
|
116
|
+
max: 1e4
|
|
117
|
+
}, B = a && a.range ? { customValues: a.range } : {
|
|
118
|
+
min: 0,
|
|
119
|
+
max: 1e4
|
|
120
|
+
}, V = /* @__PURE__ */ D(F, { children: [/* @__PURE__ */ E(L, {
|
|
121
|
+
label: "Grid Interval",
|
|
122
|
+
value: v.step,
|
|
123
|
+
variant: "outlined",
|
|
124
|
+
onChange: (e, t) => Y("step", t, e),
|
|
125
|
+
...z
|
|
126
|
+
}), /* @__PURE__ */ E(L, {
|
|
127
|
+
label: "Label Interval",
|
|
128
|
+
value: v.labelStep,
|
|
129
|
+
variant: "outlined",
|
|
130
|
+
onChange: (e, t) => Y("labelStep", t, e),
|
|
131
|
+
...B
|
|
132
|
+
})] }), H = (e) => {
|
|
133
|
+
u((t) => ({
|
|
134
|
+
...t,
|
|
135
|
+
open: e
|
|
136
|
+
})), f(e);
|
|
137
|
+
}, U = (e, t) => e.map((e) => (Object.prototype.hasOwnProperty.call(e, t) && (e[t] = t == "interactive"), e)), W = (e) => {
|
|
138
|
+
let { correctAnswer: r, data: i } = t;
|
|
139
|
+
x === !1 && U(i, "interactive"), S === !1 && U(i, "editable"), N(i, e, v, n, t), N(r.data, !1, v, n, t);
|
|
140
|
+
}, G = () => {
|
|
141
|
+
let e = o?.label;
|
|
142
|
+
n({
|
|
143
|
+
...t,
|
|
144
|
+
studentCategoryDefaultLabel: e
|
|
145
|
+
});
|
|
146
|
+
}, K = (e) => e.includes("Plot") ? {
|
|
147
|
+
min: 3,
|
|
148
|
+
max: 10
|
|
149
|
+
} : {
|
|
150
|
+
min: .05,
|
|
151
|
+
max: 1e4
|
|
152
|
+
}, q = (e, r) => {
|
|
153
|
+
let i = {
|
|
154
|
+
...C,
|
|
155
|
+
[e]: r
|
|
156
|
+
};
|
|
157
|
+
n({
|
|
158
|
+
...t,
|
|
159
|
+
graph: i
|
|
160
|
+
});
|
|
161
|
+
}, J = (e, t) => (e || []).find((e) => e.value > t.max || e.value - t.step * Math.floor(e.value / t.step) !== 0), Y = (e, r, i) => {
|
|
162
|
+
_(v[e]), m(e), v[e] = r, (e === "max" || e === "step") && (J(t.data, v) || J(t.correctAnswer.data, v)) && i?.target ? f(!0) : n({
|
|
163
|
+
...t,
|
|
164
|
+
range: v
|
|
165
|
+
});
|
|
166
|
+
};
|
|
167
|
+
ee(() => {
|
|
168
|
+
W(!0), G();
|
|
169
|
+
}, []), ee(() => {
|
|
170
|
+
d && u({
|
|
171
|
+
open: !0,
|
|
172
|
+
title: "Warning",
|
|
173
|
+
text: "This change will remove values defined for one or more categories",
|
|
174
|
+
onConfirm: () => {
|
|
175
|
+
W(), H(!1), n({
|
|
176
|
+
...t,
|
|
177
|
+
range: v,
|
|
178
|
+
correctAnswer: y
|
|
179
|
+
});
|
|
180
|
+
},
|
|
181
|
+
onClose: () => {
|
|
182
|
+
v[p] = h, H(!1);
|
|
183
|
+
}
|
|
184
|
+
});
|
|
185
|
+
}, [d]);
|
|
186
|
+
let X = v.step === 1 && v.labelStep === 1 && 3 <= v.max && v.max <= 10, ie = () => {
|
|
187
|
+
K.min = 3, K.max = 10, v.max = 10, v.step = 1, v.labelStep = 1, n({
|
|
188
|
+
...t,
|
|
189
|
+
range: v
|
|
190
|
+
});
|
|
191
|
+
}, Z = (e) => {
|
|
192
|
+
if (e.includes("Plot")) {
|
|
193
|
+
if (!X) {
|
|
194
|
+
u({
|
|
195
|
+
open: !0,
|
|
196
|
+
title: "Warning",
|
|
197
|
+
text: "The selected chart type does not support the current chart configuration. Reset chart configuration?",
|
|
198
|
+
onConfirm: () => {
|
|
199
|
+
ie(), W(), H(!1), n({
|
|
200
|
+
...t,
|
|
201
|
+
range: v,
|
|
202
|
+
chartType: e
|
|
203
|
+
});
|
|
204
|
+
},
|
|
205
|
+
onClose: () => {
|
|
206
|
+
H(!1);
|
|
207
|
+
}
|
|
208
|
+
});
|
|
209
|
+
return;
|
|
210
|
+
}
|
|
211
|
+
K.min = 3, K.max = 10, n({
|
|
212
|
+
...t,
|
|
213
|
+
chartType: e
|
|
214
|
+
});
|
|
215
|
+
return;
|
|
216
|
+
}
|
|
217
|
+
n({
|
|
218
|
+
...t,
|
|
219
|
+
chartType: e
|
|
220
|
+
});
|
|
221
|
+
};
|
|
222
|
+
return /* @__PURE__ */ D(te, { children: [
|
|
223
|
+
/* @__PURE__ */ E(g, {
|
|
224
|
+
variant: "subtitle1",
|
|
225
|
+
children: "Configure Chart"
|
|
226
|
+
}),
|
|
227
|
+
/* @__PURE__ */ D(ne, { children: [
|
|
228
|
+
/* @__PURE__ */ D(F, { children: [/* @__PURE__ */ E(M, {
|
|
229
|
+
value: t.chartType,
|
|
230
|
+
onChange: (e) => Z(e.target.value),
|
|
231
|
+
availableChartTypes: s,
|
|
232
|
+
chartTypeLabel: c
|
|
233
|
+
}), /* @__PURE__ */ E(L, {
|
|
234
|
+
label: "Max Value",
|
|
235
|
+
value: v.max,
|
|
236
|
+
min: K(t.chartType).min,
|
|
237
|
+
max: K(t.chartType).max,
|
|
238
|
+
variant: "outlined",
|
|
239
|
+
onChange: (e, t) => Y("max", t, e)
|
|
240
|
+
})] }),
|
|
241
|
+
!t.chartType.includes("Plot") && V,
|
|
242
|
+
T && /* @__PURE__ */ D(R, { children: [
|
|
243
|
+
/* @__PURE__ */ E("div", { children: /* @__PURE__ */ E(g, { children: "Dimensions(px)" }) }),
|
|
244
|
+
/* @__PURE__ */ D(P, { children: [/* @__PURE__ */ E(I, {
|
|
245
|
+
label: "Width",
|
|
246
|
+
value: C.width,
|
|
247
|
+
min: A.min,
|
|
248
|
+
max: A.max,
|
|
249
|
+
step: A.step,
|
|
250
|
+
variant: "outlined",
|
|
251
|
+
onChange: (e, t) => q("width", t)
|
|
252
|
+
}), /* @__PURE__ */ E(re, { children: "Min 50, Max 700" })] }),
|
|
253
|
+
/* @__PURE__ */ D(P, { children: [/* @__PURE__ */ E(I, {
|
|
254
|
+
label: "Height",
|
|
255
|
+
value: C.height,
|
|
256
|
+
min: j.min,
|
|
257
|
+
max: j.max,
|
|
258
|
+
step: j.step,
|
|
259
|
+
variant: "outlined",
|
|
260
|
+
onChange: (e, t) => q("height", t)
|
|
261
|
+
}), /* @__PURE__ */ E(re, { children: "Min 400, Max 700" })] })
|
|
262
|
+
] })
|
|
263
|
+
] }),
|
|
264
|
+
/* @__PURE__ */ E(b, {
|
|
265
|
+
open: l.open,
|
|
266
|
+
title: l.title,
|
|
267
|
+
text: l.text,
|
|
268
|
+
onClose: l.onClose,
|
|
269
|
+
onConfirm: l.onConfirm
|
|
270
|
+
})
|
|
271
|
+
] });
|
|
272
|
+
};
|
|
273
|
+
z.propTypes = {
|
|
274
|
+
chartDimensions: O.default.object,
|
|
275
|
+
domain: O.default.object,
|
|
276
|
+
gridValues: O.default.object,
|
|
277
|
+
labelValues: O.default.object,
|
|
278
|
+
model: O.default.object,
|
|
279
|
+
onChange: O.default.func,
|
|
280
|
+
range: O.default.object,
|
|
281
|
+
chartDimension: O.default.object,
|
|
282
|
+
size: O.default.object,
|
|
283
|
+
studentNewCategoryDefaultLabel: O.default.object,
|
|
284
|
+
availableChartTypes: O.default.object,
|
|
285
|
+
chartTypeLabel: O.default.string
|
|
286
|
+
};
|
|
287
|
+
//#endregion
|
|
288
|
+
//#region ../../shared/configure-events/dist/index.js
|
|
289
|
+
var B = class e extends CustomEvent {
|
|
290
|
+
static {
|
|
291
|
+
this.TYPE = "model.updated";
|
|
292
|
+
}
|
|
293
|
+
constructor(t, n = !1) {
|
|
294
|
+
super(e.TYPE, {
|
|
295
|
+
bubbles: !0,
|
|
296
|
+
detail: {
|
|
297
|
+
update: t,
|
|
298
|
+
reset: n
|
|
299
|
+
}
|
|
300
|
+
}), this.update = t, this.reset = n;
|
|
301
|
+
}
|
|
302
|
+
}, V = class e extends CustomEvent {
|
|
303
|
+
static {
|
|
304
|
+
this.TYPE = "delete.image";
|
|
305
|
+
}
|
|
306
|
+
constructor(t, n) {
|
|
307
|
+
super(e.TYPE, {
|
|
308
|
+
bubbles: !0,
|
|
309
|
+
detail: {
|
|
310
|
+
src: t,
|
|
311
|
+
done: n
|
|
312
|
+
}
|
|
313
|
+
}), this.src = t, this.done = n;
|
|
314
|
+
}
|
|
315
|
+
}, H = class e extends CustomEvent {
|
|
316
|
+
static {
|
|
317
|
+
this.TYPE = "insert.image";
|
|
318
|
+
}
|
|
319
|
+
constructor(t) {
|
|
320
|
+
super(e.TYPE, {
|
|
321
|
+
bubbles: !0,
|
|
322
|
+
detail: t
|
|
323
|
+
}), this.handler = t;
|
|
324
|
+
}
|
|
325
|
+
}, U = class e extends CustomEvent {
|
|
326
|
+
static {
|
|
327
|
+
this.TYPE = "delete.sound";
|
|
328
|
+
}
|
|
329
|
+
constructor(t, n) {
|
|
330
|
+
super(e.TYPE, {
|
|
331
|
+
bubbles: !0,
|
|
332
|
+
detail: {
|
|
333
|
+
src: t,
|
|
334
|
+
done: n
|
|
335
|
+
}
|
|
336
|
+
}), this.src = t, this.done = n;
|
|
337
|
+
}
|
|
338
|
+
}, W = class e extends CustomEvent {
|
|
339
|
+
static {
|
|
340
|
+
this.TYPE = "insert.sound";
|
|
341
|
+
}
|
|
342
|
+
constructor(t) {
|
|
343
|
+
super(e.TYPE, {
|
|
344
|
+
bubbles: !0,
|
|
345
|
+
detail: t
|
|
346
|
+
}), this.handler = t;
|
|
347
|
+
}
|
|
348
|
+
}, G = /* @__PURE__ */ t(e(), 1), K = m("div")(({ theme: e }) => ({
|
|
349
|
+
marginBottom: e.spacing(2.5),
|
|
350
|
+
display: "flex",
|
|
351
|
+
flex: 1
|
|
352
|
+
})), q = m("div")(({ theme: e }) => ({ marginBottom: e.spacing(1) })), J = m("div")({ flex: 1 }), Y = m(l)({ color: `${o.tertiary()} !important` }), X = (e, t) => {
|
|
353
|
+
if (!e) return t;
|
|
354
|
+
let n = [];
|
|
355
|
+
return (t || []).forEach((t, r) => {
|
|
356
|
+
let { editable: i, interactive: a } = t;
|
|
357
|
+
n[r] = {
|
|
358
|
+
label: i && e[r]?.label ? e[r].label : t.label,
|
|
359
|
+
value: a && e[r]?.value ? e[r].value : t.value,
|
|
360
|
+
editable: t.editable,
|
|
361
|
+
interactive: t.interactive
|
|
362
|
+
};
|
|
363
|
+
}), n;
|
|
364
|
+
}, ie = class extends S.Component {
|
|
365
|
+
static propTypes = {
|
|
366
|
+
model: O.default.object.isRequired,
|
|
367
|
+
onChange: O.default.func.isRequired,
|
|
368
|
+
charts: O.default.array,
|
|
369
|
+
labelsPlaceholders: O.default.object,
|
|
370
|
+
titlePlaceholder: O.default.object,
|
|
371
|
+
showPixelGuides: O.default.bool,
|
|
372
|
+
authorNewCategoryDefaults: O.default.object,
|
|
373
|
+
chartingOptions: O.default.object
|
|
374
|
+
};
|
|
375
|
+
constructor(e) {
|
|
376
|
+
super(e), this.state = { dialog: { open: !1 } };
|
|
377
|
+
}
|
|
378
|
+
handleAlertDialog = (e, t) => this.setState({ dialog: { open: e } }, t);
|
|
379
|
+
changeData = (e) => this.props.onChange({
|
|
380
|
+
...this.props.model,
|
|
381
|
+
data: e
|
|
382
|
+
});
|
|
383
|
+
changeAddRemoveEnabled = (e) => {
|
|
384
|
+
let { model: t } = this.props, n = X(t.correctAnswer.data, t.data);
|
|
385
|
+
e ? this.props.onChange({
|
|
386
|
+
...this.props.model,
|
|
387
|
+
addCategoryEnabled: e
|
|
388
|
+
}) : this.setState({ dialog: {
|
|
389
|
+
open: !0,
|
|
390
|
+
title: "Warning",
|
|
391
|
+
text: "This change will remove any correct answer categories that are not part of the initial item configuration.",
|
|
392
|
+
onConfirm: () => this.handleAlertDialog(!1, this.props.onChange({
|
|
393
|
+
...this.props.model,
|
|
394
|
+
addCategoryEnabled: e,
|
|
395
|
+
correctAnswer: { data: n }
|
|
396
|
+
})),
|
|
397
|
+
onClose: () => this.handleAlertDialog(!1)
|
|
398
|
+
} });
|
|
399
|
+
};
|
|
400
|
+
changeTitle = (e) => this.props.onChange({
|
|
401
|
+
...this.props.model,
|
|
402
|
+
title: e
|
|
403
|
+
});
|
|
404
|
+
changeLabel = (e, t) => this.props.onChange({
|
|
405
|
+
...this.props.model,
|
|
406
|
+
[e]: {
|
|
407
|
+
...this.props.model[e],
|
|
408
|
+
label: t
|
|
409
|
+
}
|
|
410
|
+
});
|
|
411
|
+
render() {
|
|
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(q, { children: "Define Initial Chart Attributes" }), /* @__PURE__ */ E(K, { children: /* @__PURE__ */ D(J, { children: [
|
|
414
|
+
/* @__PURE__ */ E(g, {
|
|
415
|
+
component: "div",
|
|
416
|
+
type: "body1",
|
|
417
|
+
children: /* @__PURE__ */ E("span", { children: "Use the tools below to set up the chart as it will initially appear to students." })
|
|
418
|
+
}),
|
|
419
|
+
/* @__PURE__ */ E(x, {
|
|
420
|
+
defineChart: !0,
|
|
421
|
+
chartingOptions: o,
|
|
422
|
+
showPixelGuides: i,
|
|
423
|
+
chartType: e.chartType,
|
|
424
|
+
size: e.graph,
|
|
425
|
+
domain: u,
|
|
426
|
+
range: d,
|
|
427
|
+
charts: t,
|
|
428
|
+
data: e.data.map((e, t) => ({
|
|
429
|
+
...e,
|
|
430
|
+
index: t
|
|
431
|
+
})),
|
|
432
|
+
title: e.title,
|
|
433
|
+
onDataChange: this.changeData,
|
|
434
|
+
onChangeTitle: this.changeTitle,
|
|
435
|
+
onChangeLabels: this.changeLabel,
|
|
436
|
+
addCategoryEnabled: !0,
|
|
437
|
+
changeInteractiveEnabled: e.changeInteractiveEnabled,
|
|
438
|
+
changeEditableEnabled: e.changeEditableEnabled,
|
|
439
|
+
categoryDefaultLabel: a?.label,
|
|
440
|
+
categoryDefaults: a,
|
|
441
|
+
labelsPlaceholders: n,
|
|
442
|
+
titlePlaceholder: r?.label,
|
|
443
|
+
mathMlOptions: s,
|
|
444
|
+
labelsCharactersLimit: c
|
|
445
|
+
}),
|
|
446
|
+
e.changeAddCategoryEnabled && /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E(Y, {
|
|
447
|
+
checked: e.addCategoryEnabled,
|
|
448
|
+
onChange: (e) => {
|
|
449
|
+
this.changeAddRemoveEnabled(e.target.checked);
|
|
450
|
+
}
|
|
451
|
+
}), o?.addCategory?.authoringLabel] }),
|
|
452
|
+
/* @__PURE__ */ E(b, {
|
|
453
|
+
open: l.open,
|
|
454
|
+
title: l.title,
|
|
455
|
+
text: l.text,
|
|
456
|
+
onClose: l.onClose,
|
|
457
|
+
onConfirm: l.onConfirm
|
|
458
|
+
})
|
|
459
|
+
] }, "graph") })] });
|
|
460
|
+
}
|
|
461
|
+
}, Z = m("div")(({ theme: e }) => ({
|
|
462
|
+
marginBottom: e.spacing(2.5),
|
|
463
|
+
display: "flex",
|
|
464
|
+
flex: 1
|
|
465
|
+
})), ae = m("div")({ flex: 1 }), oe = m("div")(({ theme: e }) => ({ border: `2px solid ${e.palette.error.main}` })), se = m(g)(({ theme: e }) => ({
|
|
466
|
+
fontSize: e.typography.fontSize - 2,
|
|
467
|
+
color: e.palette.error.main,
|
|
468
|
+
paddingTop: e.spacing(1)
|
|
469
|
+
})), ce = m("div")(({ theme: e }) => ({ marginBottom: e.spacing(1) })), Q = (e, t) => e.map((e, n) => ({
|
|
470
|
+
...e,
|
|
471
|
+
editable: n < t.length ? t[n].editable : !0,
|
|
472
|
+
interactive: n < t.length ? t[n].interactive : !0,
|
|
473
|
+
deletable: n >= t.length
|
|
474
|
+
})), le = (e, t) => {
|
|
475
|
+
if (!e) return t;
|
|
476
|
+
let n = [...e], r = [];
|
|
477
|
+
if ((t || []).forEach((t, n) => {
|
|
478
|
+
let i = t.editable, a = t.interactive;
|
|
479
|
+
r[n] = {
|
|
480
|
+
label: i && e[n]?.label ? e[n].label : t.label,
|
|
481
|
+
value: a && e[n]?.value || a && e[n]?.value == 0 ? e[n].value : t.value,
|
|
482
|
+
editable: t.editable,
|
|
483
|
+
interactive: t.interactive
|
|
484
|
+
};
|
|
485
|
+
}), r.length < e.length) {
|
|
486
|
+
let i = (n || []).slice(r.length, e.length);
|
|
487
|
+
return Q((r || []).concat(i), t);
|
|
488
|
+
}
|
|
489
|
+
return r;
|
|
490
|
+
}, ue = (e, t) => {
|
|
491
|
+
let n = t.length - 1, { editable: r, interactive: i, deletable: a, ...o } = t[t.length - 1];
|
|
492
|
+
return (e || []).splice(n, 0, o), Q([...e], t);
|
|
493
|
+
}, de = (e, t, n) => ((e || []).splice(n, 1), Q([...e], t)), fe = (e, t, n) => {
|
|
494
|
+
let r = e && e.model && e.model.data || [], i = t && t.model && t.model.data || [], a = f(e && e.model && e.model.correctAnswer && e.model.correctAnswer.data || []), o = f(n ? n.categories : []), s = [];
|
|
495
|
+
if (r.length > i.length) return s = ue(a, r), s;
|
|
496
|
+
if (r.length < i.length) {
|
|
497
|
+
let e = r.length;
|
|
498
|
+
for (let t = 0; t < r.length; t++) if (r[t].index !== t) {
|
|
499
|
+
e = t;
|
|
500
|
+
break;
|
|
501
|
+
}
|
|
502
|
+
return s = de(o, r, e), s;
|
|
503
|
+
}
|
|
504
|
+
return s = le(a, r), s;
|
|
505
|
+
}, pe = class extends S.Component {
|
|
506
|
+
static propTypes = {
|
|
507
|
+
correctAnswerErrors: O.default.object,
|
|
508
|
+
studentNewCategoryDefaultLabel: O.default.string,
|
|
509
|
+
model: O.default.object.isRequired,
|
|
510
|
+
onChange: O.default.func.isRequired,
|
|
511
|
+
charts: O.default.array,
|
|
512
|
+
error: O.default.string
|
|
513
|
+
};
|
|
514
|
+
constructor(e) {
|
|
515
|
+
super(e), this.state = { categories: [] };
|
|
516
|
+
}
|
|
517
|
+
changeData = (e) => {
|
|
518
|
+
let { model: t, onChange: n } = this.props, { correctAnswer: r } = t || {};
|
|
519
|
+
n({
|
|
520
|
+
...t,
|
|
521
|
+
correctAnswer: {
|
|
522
|
+
...r,
|
|
523
|
+
data: e.map(({ interactive: e, editable: t, index: n, ...r }) => r)
|
|
524
|
+
}
|
|
525
|
+
});
|
|
526
|
+
};
|
|
527
|
+
componentDidMount() {
|
|
528
|
+
let e = fe(this.props, this.props, null);
|
|
529
|
+
this.setState({ categories: e || le(this.props.model.correctAnswer.data, this.props.model.data) });
|
|
530
|
+
}
|
|
531
|
+
componentDidUpdate(e, t) {
|
|
532
|
+
let r = fe(this.props, e, t);
|
|
533
|
+
r && !n(r, this.state.categories) && (this.changeData(r), this.setState({ categories: r }));
|
|
534
|
+
}
|
|
535
|
+
render() {
|
|
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(ce, { children: "Define Correct Response" }), /* @__PURE__ */ E(Z, { children: /* @__PURE__ */ D(ae, { children: [
|
|
538
|
+
/* @__PURE__ */ E(g, {
|
|
539
|
+
component: "div",
|
|
540
|
+
type: "body1",
|
|
541
|
+
children: /* @__PURE__ */ E("span", { children: "Use the tools below to define the correct answer." })
|
|
542
|
+
}),
|
|
543
|
+
E(u || d ? oe : "div", { children: /* @__PURE__ */ E(x, {
|
|
544
|
+
chartType: e.chartType,
|
|
545
|
+
size: e.graph,
|
|
546
|
+
domain: c,
|
|
547
|
+
range: l,
|
|
548
|
+
charts: t,
|
|
549
|
+
data: s,
|
|
550
|
+
title: e.title,
|
|
551
|
+
onDataChange: this.changeData,
|
|
552
|
+
addCategoryEnabled: e.addCategoryEnabled,
|
|
553
|
+
categoryDefaultLabel: r,
|
|
554
|
+
error: n,
|
|
555
|
+
mathMlOptions: a,
|
|
556
|
+
labelsPlaceholders: o
|
|
557
|
+
}) }, `correct-response-graph-${e.correctAnswer.name}`),
|
|
558
|
+
(u || d) && /* @__PURE__ */ E(se, {
|
|
559
|
+
component: "div",
|
|
560
|
+
type: "body1",
|
|
561
|
+
children: /* @__PURE__ */ E("span", { children: u || d })
|
|
562
|
+
})
|
|
563
|
+
] }, "graph") })] });
|
|
564
|
+
}
|
|
565
|
+
}, me = [
|
|
566
|
+
.01,
|
|
567
|
+
.02,
|
|
568
|
+
.04,
|
|
569
|
+
.05,
|
|
570
|
+
.0625,
|
|
571
|
+
.1,
|
|
572
|
+
.125,
|
|
573
|
+
.2,
|
|
574
|
+
.25,
|
|
575
|
+
.5,
|
|
576
|
+
1,
|
|
577
|
+
2,
|
|
578
|
+
3,
|
|
579
|
+
4,
|
|
580
|
+
5,
|
|
581
|
+
8,
|
|
582
|
+
10,
|
|
583
|
+
12,
|
|
584
|
+
15,
|
|
585
|
+
20,
|
|
586
|
+
40,
|
|
587
|
+
50,
|
|
588
|
+
64,
|
|
589
|
+
100,
|
|
590
|
+
500,
|
|
591
|
+
1e3
|
|
592
|
+
], he = [
|
|
593
|
+
.01,
|
|
594
|
+
.02,
|
|
595
|
+
.05,
|
|
596
|
+
.1,
|
|
597
|
+
.2,
|
|
598
|
+
.25,
|
|
599
|
+
.5,
|
|
600
|
+
1,
|
|
601
|
+
2,
|
|
602
|
+
5,
|
|
603
|
+
10,
|
|
604
|
+
20,
|
|
605
|
+
50,
|
|
606
|
+
100,
|
|
607
|
+
500,
|
|
608
|
+
1e3
|
|
609
|
+
], ge = {
|
|
610
|
+
.01: [
|
|
611
|
+
0,
|
|
612
|
+
.01,
|
|
613
|
+
.02,
|
|
614
|
+
.04,
|
|
615
|
+
.05,
|
|
616
|
+
.1
|
|
617
|
+
],
|
|
618
|
+
.02: [
|
|
619
|
+
0,
|
|
620
|
+
.02,
|
|
621
|
+
.04,
|
|
622
|
+
.1
|
|
623
|
+
],
|
|
624
|
+
.04: [
|
|
625
|
+
0,
|
|
626
|
+
.04,
|
|
627
|
+
.08,
|
|
628
|
+
.16,
|
|
629
|
+
.2
|
|
630
|
+
],
|
|
631
|
+
.05: [
|
|
632
|
+
0,
|
|
633
|
+
.05,
|
|
634
|
+
.1,
|
|
635
|
+
.2,
|
|
636
|
+
.25
|
|
637
|
+
],
|
|
638
|
+
.0625: [
|
|
639
|
+
0,
|
|
640
|
+
.0625,
|
|
641
|
+
.125,
|
|
642
|
+
.25,
|
|
643
|
+
.5
|
|
644
|
+
],
|
|
645
|
+
.1: [
|
|
646
|
+
0,
|
|
647
|
+
.1,
|
|
648
|
+
.2,
|
|
649
|
+
.4,
|
|
650
|
+
.5,
|
|
651
|
+
1
|
|
652
|
+
],
|
|
653
|
+
.125: [
|
|
654
|
+
0,
|
|
655
|
+
.125,
|
|
656
|
+
.25,
|
|
657
|
+
.5,
|
|
658
|
+
1
|
|
659
|
+
],
|
|
660
|
+
.2: [
|
|
661
|
+
0,
|
|
662
|
+
.2,
|
|
663
|
+
.5,
|
|
664
|
+
.1
|
|
665
|
+
],
|
|
666
|
+
.25: [
|
|
667
|
+
0,
|
|
668
|
+
.25,
|
|
669
|
+
.5,
|
|
670
|
+
1,
|
|
671
|
+
2
|
|
672
|
+
],
|
|
673
|
+
.5: [
|
|
674
|
+
0,
|
|
675
|
+
.5,
|
|
676
|
+
1,
|
|
677
|
+
2
|
|
678
|
+
],
|
|
679
|
+
1: [
|
|
680
|
+
0,
|
|
681
|
+
1,
|
|
682
|
+
2,
|
|
683
|
+
4,
|
|
684
|
+
5,
|
|
685
|
+
10
|
|
686
|
+
],
|
|
687
|
+
2: [
|
|
688
|
+
0,
|
|
689
|
+
2,
|
|
690
|
+
4,
|
|
691
|
+
8,
|
|
692
|
+
10
|
|
693
|
+
],
|
|
694
|
+
3: [
|
|
695
|
+
0,
|
|
696
|
+
3,
|
|
697
|
+
6,
|
|
698
|
+
12,
|
|
699
|
+
15
|
|
700
|
+
],
|
|
701
|
+
4: [
|
|
702
|
+
0,
|
|
703
|
+
4,
|
|
704
|
+
8,
|
|
705
|
+
16,
|
|
706
|
+
20
|
|
707
|
+
],
|
|
708
|
+
5: [
|
|
709
|
+
0,
|
|
710
|
+
5,
|
|
711
|
+
10,
|
|
712
|
+
20,
|
|
713
|
+
25
|
|
714
|
+
],
|
|
715
|
+
8: [
|
|
716
|
+
0,
|
|
717
|
+
8,
|
|
718
|
+
16,
|
|
719
|
+
32,
|
|
720
|
+
40,
|
|
721
|
+
64
|
|
722
|
+
],
|
|
723
|
+
10: [
|
|
724
|
+
0,
|
|
725
|
+
10,
|
|
726
|
+
20,
|
|
727
|
+
40,
|
|
728
|
+
50,
|
|
729
|
+
100
|
|
730
|
+
],
|
|
731
|
+
12: [
|
|
732
|
+
0,
|
|
733
|
+
12,
|
|
734
|
+
24
|
|
735
|
+
],
|
|
736
|
+
15: [
|
|
737
|
+
0,
|
|
738
|
+
15,
|
|
739
|
+
30,
|
|
740
|
+
60
|
|
741
|
+
],
|
|
742
|
+
20: [
|
|
743
|
+
0,
|
|
744
|
+
20,
|
|
745
|
+
40,
|
|
746
|
+
80,
|
|
747
|
+
100
|
|
748
|
+
],
|
|
749
|
+
40: [
|
|
750
|
+
0,
|
|
751
|
+
40,
|
|
752
|
+
80,
|
|
753
|
+
160,
|
|
754
|
+
200
|
|
755
|
+
],
|
|
756
|
+
50: [
|
|
757
|
+
0,
|
|
758
|
+
50,
|
|
759
|
+
100,
|
|
760
|
+
200,
|
|
761
|
+
250
|
|
762
|
+
],
|
|
763
|
+
64: [
|
|
764
|
+
0,
|
|
765
|
+
64,
|
|
766
|
+
128
|
|
767
|
+
],
|
|
768
|
+
100: [
|
|
769
|
+
0,
|
|
770
|
+
100,
|
|
771
|
+
200,
|
|
772
|
+
400,
|
|
773
|
+
500
|
|
774
|
+
],
|
|
775
|
+
500: [
|
|
776
|
+
0,
|
|
777
|
+
500,
|
|
778
|
+
1e3,
|
|
779
|
+
2500
|
|
780
|
+
],
|
|
781
|
+
1e3: [
|
|
782
|
+
0,
|
|
783
|
+
1e3,
|
|
784
|
+
2e3,
|
|
785
|
+
4e3,
|
|
786
|
+
5e3
|
|
787
|
+
]
|
|
788
|
+
}, _e = (e, t, n = !1) => {
|
|
789
|
+
let r = 10 * (e.max - e.min) / t, i = r * 10, a = n && !he.includes(e.step) && me.includes(e.step);
|
|
790
|
+
return (!n || a ? me : he).filter((e) => e >= r && e <= i);
|
|
791
|
+
}, ve = (e) => ge[e] || [], ye = (e, t, r, i) => {
|
|
792
|
+
let a = _e(e, t), o = ve(e.step || 1);
|
|
793
|
+
if (!n(r, a) && !a.includes(e.step)) {
|
|
794
|
+
let n = _e(e, t, !0)[0] || 1;
|
|
795
|
+
return e.step = n, o = ve(n), o.includes(e.labelStep) || (e.labelStep = n), {
|
|
796
|
+
gridValues: a,
|
|
797
|
+
labelValues: o
|
|
798
|
+
};
|
|
799
|
+
}
|
|
800
|
+
return !n(i, o) && !o.includes(e.labelStep) && (e.labelStep = e.step), {
|
|
801
|
+
gridValues: a,
|
|
802
|
+
labelValues: o
|
|
803
|
+
};
|
|
804
|
+
}, be = (0, G.default)("@pie-element:graphing:configure"), { Panel: xe, toggle: $, radio: Se, dropdown: Ce, textField: we } = p, Te = m(y)(({ theme: e }) => ({
|
|
805
|
+
width: "100%",
|
|
806
|
+
paddingTop: e.spacing(2),
|
|
807
|
+
marginBottom: e.spacing(2)
|
|
808
|
+
})), Ee = m(g)(({ theme: e }) => ({ marginBottom: e.spacing(2.5) })), De = m("div")(({ theme: e }) => ({
|
|
809
|
+
fontSize: e.typography.fontSize - 2,
|
|
810
|
+
color: e.palette.error.main,
|
|
811
|
+
paddingTop: e.spacing(1)
|
|
812
|
+
})), Oe = [
|
|
813
|
+
h.Bar(),
|
|
814
|
+
h.Histogram(),
|
|
815
|
+
h.LineDot(),
|
|
816
|
+
h.LineCross(),
|
|
817
|
+
h.DotPlot(),
|
|
818
|
+
h.LinePlot()
|
|
819
|
+
], ke = class extends C.Component {
|
|
820
|
+
static propTypes = {
|
|
821
|
+
onModelChanged: O.default.func,
|
|
822
|
+
onConfigurationChanged: O.default.func,
|
|
823
|
+
imageSupport: O.default.object,
|
|
824
|
+
uploadSoundSupport: O.default.object,
|
|
825
|
+
model: O.default.object.isRequired,
|
|
826
|
+
configuration: O.default.object.isRequired,
|
|
827
|
+
chartingOptions: O.default.object
|
|
828
|
+
};
|
|
829
|
+
constructor(e) {
|
|
830
|
+
super(e);
|
|
831
|
+
let { range: t = {}, graph: n } = e.model || {}, r = { range: _e(t, n.height, !0) }, i = { range: ve(t.step || 1) };
|
|
832
|
+
this.state = {
|
|
833
|
+
gridValues: r,
|
|
834
|
+
labelValues: i
|
|
835
|
+
};
|
|
836
|
+
}
|
|
837
|
+
onRationaleChange = (e) => this.props.onModelChanged({
|
|
838
|
+
...this.props.model,
|
|
839
|
+
rationale: e
|
|
840
|
+
});
|
|
841
|
+
onPromptChange = (e) => this.props.onModelChanged({
|
|
842
|
+
...this.props.model,
|
|
843
|
+
prompt: e
|
|
844
|
+
});
|
|
845
|
+
onTeacherInstructionsChange = (e) => this.props.onModelChanged({
|
|
846
|
+
...this.props.model,
|
|
847
|
+
teacherInstructions: e
|
|
848
|
+
});
|
|
849
|
+
onChartTypeChange = (e) => this.props.onModelChanged({
|
|
850
|
+
...this.props.model,
|
|
851
|
+
chartType: e
|
|
852
|
+
});
|
|
853
|
+
onConfigChange = (e) => {
|
|
854
|
+
let { model: t, onModelChanged: n } = this.props, { gridValues: r, labelValues: i } = this.state, a = {
|
|
855
|
+
...t,
|
|
856
|
+
...e
|
|
857
|
+
}, { graph: o, range: s } = a, c = {}, l = {}, u = ye(s, o.height, r.range, i.range);
|
|
858
|
+
c.range = u.gridValues, l.range = u.labelValues, this.setState({
|
|
859
|
+
gridValues: c,
|
|
860
|
+
labelValues: l
|
|
861
|
+
}), n(a);
|
|
862
|
+
};
|
|
863
|
+
render() {
|
|
864
|
+
let { configuration: e, imageSupport: t, model: n, onConfigurationChanged: r, onModelChanged: i, uploadSoundSupport: a } = this.props;
|
|
865
|
+
be("[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: F, spellCheckEnabled: I, teacherInstructionsEnabled: L, studentNewCategoryDefaultLabel: R } = n || {}, { categoryErrors: re, correctAnswerErrors: B, prompt: V, rationale: H, teacherInstructions: U } = te || {}, { gridValues: W, labelValues: G } = this.state, K = d.showInConfigPanel || !0, q = h && h.prompt, J = g && g.prompt, Y = {
|
|
867
|
+
changeInteractiveEnabled: T.changeInteractive?.settings && $(T.changeInteractive.settingsLabel),
|
|
868
|
+
changeEditableEnabled: T.changeEditable?.settings && $(T.changeEditable.settingsLabel),
|
|
869
|
+
changeAddCategoryEnabled: T.addCategory?.settings && $(T.addCategory.settingsLabel)
|
|
870
|
+
}, X = {
|
|
871
|
+
teacherInstructionsEnabled: C.settings && $(C.label),
|
|
872
|
+
studentInstructionsEnabled: S.settings && $(S.label),
|
|
873
|
+
rationaleEnabled: v.settings && $(v.label),
|
|
874
|
+
spellCheckEnabled: x.settings && $(x.label),
|
|
875
|
+
promptEnabled: _.settings && $(_.label),
|
|
876
|
+
scoringType: y.settings && Se(y.label, ["all or nothing", "partial scoring"]),
|
|
877
|
+
rubricEnabled: w?.settings && $(w?.label),
|
|
878
|
+
"language.enabled": j.settings && $(j.label, !0),
|
|
879
|
+
language: j.settings && j.enabled && Ce(M.label, M.options),
|
|
880
|
+
instruction: m.settings && we(m.label)
|
|
881
|
+
}, Z = (e = {}) => ({
|
|
882
|
+
...s,
|
|
883
|
+
...e
|
|
884
|
+
});
|
|
885
|
+
return /* @__PURE__ */ D(c.ConfigLayout, {
|
|
886
|
+
extraCSSRules: ne,
|
|
887
|
+
dimensions: l,
|
|
888
|
+
hideSettings: b,
|
|
889
|
+
settings: /* @__PURE__ */ E(xe, {
|
|
890
|
+
model: n,
|
|
891
|
+
configuration: e,
|
|
892
|
+
onChangeModel: i,
|
|
893
|
+
onChangeConfiguration: r,
|
|
894
|
+
groups: {
|
|
895
|
+
Settings: Y,
|
|
896
|
+
Properties: X
|
|
897
|
+
}
|
|
898
|
+
}),
|
|
899
|
+
children: [
|
|
900
|
+
/* @__PURE__ */ E(Ee, {
|
|
901
|
+
component: "div",
|
|
902
|
+
type: "body1",
|
|
903
|
+
children: m?.label || ""
|
|
904
|
+
}),
|
|
905
|
+
L && /* @__PURE__ */ D(Te, {
|
|
906
|
+
label: C.label,
|
|
907
|
+
children: [/* @__PURE__ */ E(u, {
|
|
908
|
+
markup: n.teacherInstructions || "",
|
|
909
|
+
onChange: this.onTeacherInstructionsChange,
|
|
910
|
+
imageSupport: t,
|
|
911
|
+
nonEmpty: !1,
|
|
912
|
+
error: U,
|
|
913
|
+
spellCheck: I,
|
|
914
|
+
pluginProps: Z(C?.inputConfiguration),
|
|
915
|
+
maxImageWidth: h && h.teacherInstructions || q,
|
|
916
|
+
maxImageHeight: g && g.teacherInstructions || J,
|
|
917
|
+
uploadSoundSupport: a,
|
|
918
|
+
languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
|
|
919
|
+
mathMlOptions: k
|
|
920
|
+
}), U && /* @__PURE__ */ E(De, { children: U })]
|
|
921
|
+
}),
|
|
922
|
+
P && /* @__PURE__ */ D(Te, {
|
|
923
|
+
label: _.label,
|
|
924
|
+
children: [/* @__PURE__ */ E(u, {
|
|
925
|
+
markup: n.prompt,
|
|
926
|
+
onChange: this.onPromptChange,
|
|
927
|
+
imageSupport: t,
|
|
928
|
+
nonEmpty: !1,
|
|
929
|
+
error: V,
|
|
930
|
+
spellCheck: I,
|
|
931
|
+
disableUnderline: !0,
|
|
932
|
+
pluginProps: Z(_?.inputConfiguration),
|
|
933
|
+
maxImageWidth: q,
|
|
934
|
+
maxImageHeight: J,
|
|
935
|
+
uploadSoundSupport: a,
|
|
936
|
+
languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
|
|
937
|
+
mathMlOptions: k
|
|
938
|
+
}), V && /* @__PURE__ */ E(De, { children: V })]
|
|
939
|
+
}),
|
|
940
|
+
/* @__PURE__ */ E(z, {
|
|
941
|
+
model: n,
|
|
942
|
+
onChange: this.onConfigChange,
|
|
943
|
+
gridValues: W,
|
|
944
|
+
labelValues: G,
|
|
945
|
+
chartDimensions: d,
|
|
946
|
+
charts: Oe,
|
|
947
|
+
studentNewCategoryDefaultLabel: R,
|
|
948
|
+
availableChartTypes: O,
|
|
949
|
+
chartTypeLabel: A
|
|
950
|
+
}),
|
|
951
|
+
/* @__PURE__ */ E(ie, {
|
|
952
|
+
model: n,
|
|
953
|
+
onChange: i,
|
|
954
|
+
charts: Oe,
|
|
955
|
+
labelsPlaceholders: p,
|
|
956
|
+
titlePlaceholder: ee,
|
|
957
|
+
showPixelGuides: K,
|
|
958
|
+
authorNewCategoryDefaults: f,
|
|
959
|
+
chartingOptions: T,
|
|
960
|
+
mathMlOptions: k,
|
|
961
|
+
labelsCharactersLimit: N
|
|
962
|
+
}),
|
|
963
|
+
/* @__PURE__ */ E(pe, {
|
|
964
|
+
config: o,
|
|
965
|
+
model: n,
|
|
966
|
+
onChange: i,
|
|
967
|
+
charts: Oe,
|
|
968
|
+
error: re,
|
|
969
|
+
correctAnswerErrors: B,
|
|
970
|
+
studentNewCategoryDefaultLabel: R,
|
|
971
|
+
mathMlOptions: k,
|
|
972
|
+
labelsPlaceholders: p
|
|
973
|
+
}),
|
|
974
|
+
F && /* @__PURE__ */ D(Te, {
|
|
975
|
+
label: v.label || "Rationale",
|
|
976
|
+
children: [/* @__PURE__ */ E(u, {
|
|
977
|
+
markup: n.rationale || "",
|
|
978
|
+
onChange: this.onRationaleChange,
|
|
979
|
+
imageSupport: t,
|
|
980
|
+
error: H,
|
|
981
|
+
spellCheck: I,
|
|
982
|
+
pluginProps: Z(v?.inputConfiguration),
|
|
983
|
+
maxImageWidth: h && h.rationale || q,
|
|
984
|
+
maxImageHeight: g && g.rationale || J,
|
|
985
|
+
uploadSoundSupport: a,
|
|
986
|
+
languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
|
|
987
|
+
mathMlOptions: k
|
|
988
|
+
}), H && /* @__PURE__ */ E(De, { children: H })]
|
|
989
|
+
})
|
|
990
|
+
]
|
|
991
|
+
});
|
|
992
|
+
}
|
|
993
|
+
}, Ae = {
|
|
994
|
+
model: {
|
|
995
|
+
addCategoryEnabled: !0,
|
|
996
|
+
changeAddCategoryEnabled: !1,
|
|
997
|
+
changeEditableEnabled: !1,
|
|
998
|
+
changeInteractiveEnabled: !1,
|
|
999
|
+
chartType: "lineCross",
|
|
1000
|
+
correctAnswer: {},
|
|
1001
|
+
data: [],
|
|
1002
|
+
domain: {},
|
|
1003
|
+
graph: {
|
|
1004
|
+
width: 480,
|
|
1005
|
+
height: 480
|
|
1006
|
+
},
|
|
1007
|
+
prompt: "",
|
|
1008
|
+
promptEnabled: !0,
|
|
1009
|
+
range: {
|
|
1010
|
+
label: "",
|
|
1011
|
+
max: 1,
|
|
1012
|
+
min: 0,
|
|
1013
|
+
labelStep: 1
|
|
1014
|
+
},
|
|
1015
|
+
rationale: "",
|
|
1016
|
+
rationaleEnabled: !0,
|
|
1017
|
+
scoringType: "all or nothing",
|
|
1018
|
+
studentInstructionsEnabled: !0,
|
|
1019
|
+
studentNewCategoryDefaultLabel: "New Category",
|
|
1020
|
+
teacherInstructions: "",
|
|
1021
|
+
teacherInstructionsEnabled: !0,
|
|
1022
|
+
title: ""
|
|
1023
|
+
},
|
|
1024
|
+
configuration: {
|
|
1025
|
+
baseInputConfiguration: {
|
|
1026
|
+
h3: { disabled: !0 },
|
|
1027
|
+
audio: { disabled: !1 },
|
|
1028
|
+
video: { disabled: !1 },
|
|
1029
|
+
image: { disabled: !1 },
|
|
1030
|
+
textAlign: { disabled: !0 },
|
|
1031
|
+
showParagraphs: { disabled: !1 },
|
|
1032
|
+
separateParagraphs: { disabled: !0 }
|
|
1033
|
+
},
|
|
1034
|
+
spellCheck: {
|
|
1035
|
+
label: "Spellcheck",
|
|
1036
|
+
settings: !1,
|
|
1037
|
+
enabled: !0
|
|
1038
|
+
},
|
|
1039
|
+
chartDimensions: {
|
|
1040
|
+
settings: !1,
|
|
1041
|
+
label: "Chart Dimensions",
|
|
1042
|
+
showInConfigPanel: !0,
|
|
1043
|
+
width: {
|
|
1044
|
+
min: 50,
|
|
1045
|
+
max: 700,
|
|
1046
|
+
step: 20
|
|
1047
|
+
},
|
|
1048
|
+
height: {
|
|
1049
|
+
min: 400,
|
|
1050
|
+
max: 700,
|
|
1051
|
+
step: 20
|
|
1052
|
+
}
|
|
1053
|
+
},
|
|
1054
|
+
authorNewCategoryDefaults: {
|
|
1055
|
+
settings: !1,
|
|
1056
|
+
label: "Category",
|
|
1057
|
+
interactive: !0,
|
|
1058
|
+
editable: !1
|
|
1059
|
+
},
|
|
1060
|
+
availableChartTypes: {
|
|
1061
|
+
bar: "Bar Chart",
|
|
1062
|
+
histogram: "Histogram",
|
|
1063
|
+
lineDot: "Line Chart ●",
|
|
1064
|
+
lineCross: "Line Chart x",
|
|
1065
|
+
dotPlot: "Dot/Line Plot ⬤",
|
|
1066
|
+
linePlot: "Dot/Line Plot X"
|
|
1067
|
+
},
|
|
1068
|
+
chartTypeLabel: "ChartType",
|
|
1069
|
+
studentNewCategoryDefaultLabel: {
|
|
1070
|
+
settings: !1,
|
|
1071
|
+
label: "Category"
|
|
1072
|
+
},
|
|
1073
|
+
prompt: {
|
|
1074
|
+
settings: !0,
|
|
1075
|
+
label: "Item Stem",
|
|
1076
|
+
required: !1,
|
|
1077
|
+
inputConfiguration: {
|
|
1078
|
+
audio: { disabled: !1 },
|
|
1079
|
+
video: { disabled: !1 },
|
|
1080
|
+
image: { disabled: !1 }
|
|
1081
|
+
}
|
|
1082
|
+
},
|
|
1083
|
+
rationale: {
|
|
1084
|
+
settings: !0,
|
|
1085
|
+
label: "Rationale",
|
|
1086
|
+
required: !1,
|
|
1087
|
+
inputConfiguration: {
|
|
1088
|
+
audio: { disabled: !1 },
|
|
1089
|
+
video: { disabled: !1 },
|
|
1090
|
+
image: { disabled: !1 }
|
|
1091
|
+
}
|
|
1092
|
+
},
|
|
1093
|
+
scoringType: {
|
|
1094
|
+
settings: !1,
|
|
1095
|
+
label: "Scoring Type"
|
|
1096
|
+
},
|
|
1097
|
+
settingsPanelDisabled: !1,
|
|
1098
|
+
studentInstructions: {
|
|
1099
|
+
settings: !1,
|
|
1100
|
+
label: "Student Instructions"
|
|
1101
|
+
},
|
|
1102
|
+
teacherInstructions: {
|
|
1103
|
+
settings: !0,
|
|
1104
|
+
label: "Teacher Instructions",
|
|
1105
|
+
required: !1,
|
|
1106
|
+
inputConfiguration: {
|
|
1107
|
+
audio: { disabled: !1 },
|
|
1108
|
+
video: { disabled: !1 },
|
|
1109
|
+
image: { disabled: !1 }
|
|
1110
|
+
}
|
|
1111
|
+
},
|
|
1112
|
+
title: {
|
|
1113
|
+
settings: !1,
|
|
1114
|
+
label: "Chart Title"
|
|
1115
|
+
},
|
|
1116
|
+
instruction: {
|
|
1117
|
+
settings: !1,
|
|
1118
|
+
label: "This item type provides various types of interactive charts. Depending upon how an item is configured,\n students can change the heights of bars (or other similar chart elements) created by the author; relabel bars\n created by the author; and/or add new bars, label them, and set their heights."
|
|
1119
|
+
},
|
|
1120
|
+
titlePlaceholder: {
|
|
1121
|
+
settings: !1,
|
|
1122
|
+
label: "Click here to add a title"
|
|
1123
|
+
},
|
|
1124
|
+
labelsPlaceholders: {
|
|
1125
|
+
left: "Click here to add a label for this axis",
|
|
1126
|
+
right: "",
|
|
1127
|
+
top: "",
|
|
1128
|
+
bottom: "Click here to add a label for this axis"
|
|
1129
|
+
},
|
|
1130
|
+
maxImageWidth: {
|
|
1131
|
+
teacherInstructions: 300,
|
|
1132
|
+
prompt: 300,
|
|
1133
|
+
rationale: 300
|
|
1134
|
+
},
|
|
1135
|
+
maxImageHeight: {
|
|
1136
|
+
teacherInstructions: 300,
|
|
1137
|
+
prompt: 300,
|
|
1138
|
+
rationale: 300
|
|
1139
|
+
},
|
|
1140
|
+
withRubric: {
|
|
1141
|
+
settings: !1,
|
|
1142
|
+
label: "Add Rubric"
|
|
1143
|
+
},
|
|
1144
|
+
language: {
|
|
1145
|
+
settings: !1,
|
|
1146
|
+
label: "Specify Language",
|
|
1147
|
+
enabled: !1
|
|
1148
|
+
},
|
|
1149
|
+
languageChoices: {
|
|
1150
|
+
label: "Language Choices",
|
|
1151
|
+
options: []
|
|
1152
|
+
},
|
|
1153
|
+
chartingOptions: {
|
|
1154
|
+
changeInteractive: {
|
|
1155
|
+
settings: !1,
|
|
1156
|
+
authoringLabel: "Student can set value",
|
|
1157
|
+
settingsLabel: "Allow non-interactive categories"
|
|
1158
|
+
},
|
|
1159
|
+
changeEditable: {
|
|
1160
|
+
settings: !1,
|
|
1161
|
+
authoringLabel: "Student can edit name",
|
|
1162
|
+
settingsLabel: "Allow editable category names"
|
|
1163
|
+
},
|
|
1164
|
+
addCategory: {
|
|
1165
|
+
settings: !1,
|
|
1166
|
+
authoringLabel: "Student can add categories",
|
|
1167
|
+
settingsLabel: "Allow changes to whether students can add categories"
|
|
1168
|
+
},
|
|
1169
|
+
mathMlOptions: {
|
|
1170
|
+
mmlOutput: !1,
|
|
1171
|
+
mmlEditing: !1
|
|
1172
|
+
}
|
|
1173
|
+
}
|
|
1174
|
+
}
|
|
1175
|
+
}, je = (0, G.default)("pie-elements:graphing:configure"), Me = class e extends HTMLElement {
|
|
1176
|
+
static createDefaultModel = (e = {}) => ({
|
|
1177
|
+
...Ae.model,
|
|
1178
|
+
...e
|
|
1179
|
+
});
|
|
1180
|
+
constructor() {
|
|
1181
|
+
super(), this._root = null, this._model = e.createDefaultModel(), this._configuration = Ae.configuration;
|
|
1182
|
+
}
|
|
1183
|
+
set model(t) {
|
|
1184
|
+
this._model = e.createDefaultModel(t), this._render();
|
|
1185
|
+
}
|
|
1186
|
+
set configuration(e) {
|
|
1187
|
+
let t = {
|
|
1188
|
+
...Ae.configuration,
|
|
1189
|
+
...e
|
|
1190
|
+
};
|
|
1191
|
+
this._configuration = t, t?.language?.enabled ? t?.languageChoices?.options?.length && (this._model.language = t?.languageChoices.options[0].value) : t.language.settings && this._model.language ? (this._configuration.language.enabled = !0, (!this._configuration.languageChoices.options || !this._configuration.languageChoices.options.length) && (this._configuration.languageChoices.options = []), this._configuration.languageChoices.options.find((e) => e.value === this._model.language) || this._configuration.languageChoices.options.push({
|
|
1192
|
+
value: this._model.language,
|
|
1193
|
+
label: this._model.language
|
|
1194
|
+
})) : delete this._model.language, this._render();
|
|
1195
|
+
}
|
|
1196
|
+
onModelChanged(e) {
|
|
1197
|
+
this._model = e, this._render(), je("[onModelChanged]: ", this._model), this.dispatchEvent(new B(this._model));
|
|
1198
|
+
}
|
|
1199
|
+
onConfigurationChanged(e) {
|
|
1200
|
+
this._configuration = e, this._render();
|
|
1201
|
+
}
|
|
1202
|
+
insertImage(e) {
|
|
1203
|
+
this.dispatchEvent(new H(e));
|
|
1204
|
+
}
|
|
1205
|
+
onDeleteImage(e, t) {
|
|
1206
|
+
this.dispatchEvent(new V(e, t));
|
|
1207
|
+
}
|
|
1208
|
+
insertSound(e) {
|
|
1209
|
+
this.dispatchEvent(new W(e));
|
|
1210
|
+
}
|
|
1211
|
+
onDeleteSound(e, t) {
|
|
1212
|
+
this.dispatchEvent(new U(e, t));
|
|
1213
|
+
}
|
|
1214
|
+
_render() {
|
|
1215
|
+
if (this._model) {
|
|
1216
|
+
let e = C.createElement(ke, {
|
|
1217
|
+
onModelChanged: this.onModelChanged.bind(this),
|
|
1218
|
+
onConfigurationChanged: this.onConfigurationChanged.bind(this),
|
|
1219
|
+
model: this._model,
|
|
1220
|
+
configuration: this._configuration,
|
|
1221
|
+
imageSupport: {
|
|
1222
|
+
add: this.insertImage.bind(this),
|
|
1223
|
+
delete: this.onDeleteImage.bind(this)
|
|
1224
|
+
},
|
|
1225
|
+
uploadSoundSupport: {
|
|
1226
|
+
add: this.insertSound.bind(this),
|
|
1227
|
+
delete: this.onDeleteSound.bind(this)
|
|
1228
|
+
}
|
|
1229
|
+
});
|
|
1230
|
+
this._root ||= T(this), this._root.render(e), queueMicrotask(() => {
|
|
1231
|
+
a(this);
|
|
1232
|
+
});
|
|
1233
|
+
}
|
|
1234
|
+
}
|
|
1235
|
+
disconnectedCallback() {
|
|
1236
|
+
this._root && this._root.unmount();
|
|
1237
|
+
}
|
|
1238
|
+
};
|
|
1239
|
+
//#endregion
|
|
1240
|
+
export { Me as default };
|
|
1241
|
+
|
|
1242
|
+
//# sourceMappingURL=index.js.map
|