@pie-element/math-templated 0.1.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/dist/author/defaults.d.ts +174 -0
- package/dist/author/defaults.d.ts.map +1 -0
- package/dist/author/defaults.js +123 -0
- package/dist/author/design.d.ts +36 -0
- package/dist/author/design.d.ts.map +1 -0
- package/dist/author/design.js +494 -0
- package/dist/author/index.d.ts +43 -0
- package/dist/author/index.d.ts.map +1 -0
- package/dist/author/index.js +98 -0
- package/dist/author/markupUtils.d.ts +12 -0
- package/dist/author/markupUtils.d.ts.map +1 -0
- package/dist/author/markupUtils.js +10 -0
- package/dist/author/response.d.ts +42 -0
- package/dist/author/response.d.ts.map +1 -0
- package/dist/author/response.js +342 -0
- package/dist/author/utils.d.ts +10 -0
- package/dist/author/utils.d.ts.map +1 -0
- package/dist/author/utils.js +7 -0
- package/dist/controller/defaults.d.ts +30 -0
- package/dist/controller/defaults.d.ts.map +1 -0
- package/dist/controller/defaults.js +23 -0
- package/dist/controller/index.d.ts +38 -0
- package/dist/controller/index.d.ts.map +1 -0
- package/dist/controller/index.js +125 -0
- package/dist/delivery/index.d.ts +21 -0
- package/dist/delivery/index.d.ts.map +1 -0
- package/dist/delivery/index.js +51 -0
- package/dist/delivery/main.d.ts +40 -0
- package/dist/delivery/main.d.ts.map +1 -0
- package/dist/delivery/main.js +538 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.iife.d.ts +9 -0
- package/dist/index.iife.d.ts.map +1 -0
- package/dist/index.iife.js +224 -0
- package/dist/index.js +2 -0
- package/dist/math-templated.css +2 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_DataView.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Hash.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_ListCache.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Map.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_MapCache.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Promise.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Set.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_SetCache.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Stack.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Symbol.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Uint8Array.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_WeakMap.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_apply.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arrayEach.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arrayFilter.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arrayLikeKeys.js +15 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arrayMap.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arrayPush.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arraySome.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_assignValue.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_assocIndexOf.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseAssign.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseAssignIn.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseAssignValue.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseClone.js +57 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseCreate.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseFlatten.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseGet.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseGetAllKeys.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseGetTag.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseHasIn.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsArguments.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsEqual.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsEqualDeep.js +30 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsMap.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsNative.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsSet.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsTypedArray.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseKeys.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseKeysIn.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_basePick.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_basePickBy.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseRest.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseSet.js +22 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseSetToString.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseTimes.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseToString.js +15 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseTrim.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseUnary.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cacheHas.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_castPath.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneArrayBuffer.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneBuffer.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneDataView.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneRegExp.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneSymbol.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneTypedArray.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_copyArray.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_copyObject.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_copySymbols.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_copySymbolsIn.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_coreJsData.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_defineProperty.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_equalArrays.js +35 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_equalByTag.js +35 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_equalObjects.js +32 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_flatRest.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_freeGlobal.js +4 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getAllKeys.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getAllKeysIn.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getMapData.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getNative.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getPrototype.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getRawTag.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getSymbols.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getSymbolsIn.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getTag.js +23 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getValue.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_hasPath.js +18 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_hashClear.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_hashDelete.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_hashGet.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_hashHas.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_hashSet.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_initCloneArray.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_initCloneByTag.js +33 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_initCloneObject.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isFlattenable.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isIndex.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isIterateeCall.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isKey.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isKeyable.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isMasked.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isPrototype.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_listCacheClear.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_listCacheDelete.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_listCacheGet.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_listCacheHas.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_listCacheSet.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheClear.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheDelete.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheGet.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheHas.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheSet.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapToArray.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_memoizeCapped.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_nativeCreate.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_nativeKeys.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_nativeKeysIn.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_nodeUtil.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_objectToString.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_overArg.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_overRest.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_root.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_setCacheAdd.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_setCacheHas.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_setToArray.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_setToString.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_shortOut.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_stackClear.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_stackDelete.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_stackGet.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_stackHas.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_stackSet.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_stringToPath.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_toKey.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_toSource.js +15 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_trimmedEndIndex.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/cloneDeep.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/constant.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/debounce.js +50 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/defaults.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/eq.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/flatten.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/hasIn.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/identity.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isArguments.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isArray.js +4 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isArrayLike.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isBuffer.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isEmpty.js +21 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isEqual.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isFunction.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isLength.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isMap.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isObject.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isObjectLike.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isSet.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isSymbol.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isTypedArray.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/keys.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/keysIn.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/memoize.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/now.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/pick.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/stubArray.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/stubFalse.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/throttle.js +15 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/toNumber.js +19 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/toString.js +7 -0
- package/dist/print/index.d.ts +16 -0
- package/dist/print/index.d.ts.map +1 -0
- package/dist/print/index.js +47 -0
- package/package.json +80 -0
- package/src/author/defaults.ts +133 -0
- package/src/author/design.tsx +526 -0
- package/src/author/index.ts +195 -0
- package/src/author/markupUtils.tsx +55 -0
- package/src/author/response.tsx +397 -0
- package/src/author/utils.ts +24 -0
- package/src/controller/defaults.ts +31 -0
- package/src/controller/index.ts +294 -0
- package/src/delivery/index.ts +94 -0
- package/src/delivery/main.tsx +800 -0
- package/src/index.iife.ts +16 -0
- package/src/index.ts +1 -0
- package/src/print/index.tsx +99 -0
|
@@ -0,0 +1,494 @@
|
|
|
1
|
+
import e from "../node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/cloneDeep.js";
|
|
2
|
+
import t from "../node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/pick.js";
|
|
3
|
+
import n from "../node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/throttle.js";
|
|
4
|
+
import r from "./response.js";
|
|
5
|
+
import { createSlateMarkup as i, processMarkup as a } from "./markupUtils.js";
|
|
6
|
+
import { generateValidationMessage as o } from "./utils.js";
|
|
7
|
+
import s from "react";
|
|
8
|
+
import c from "prop-types";
|
|
9
|
+
import { styled as l } from "@mui/material/styles";
|
|
10
|
+
import u from "@mui/material/Tooltip";
|
|
11
|
+
import { jsxDEV as d } from "react/jsx-dev-runtime";
|
|
12
|
+
import f from "@mui/material/Typography";
|
|
13
|
+
import p from "@mui/material/Select";
|
|
14
|
+
import m from "@mui/material/MenuItem";
|
|
15
|
+
import ee from "@mui/icons-material/Info";
|
|
16
|
+
import { InputContainer as h, layout as te, settings as g } from "@pie-lib/config-ui";
|
|
17
|
+
import _, { ALL_PLUGINS as ne } from "@pie-lib/editable-html-tip-tap";
|
|
18
|
+
//#region src/author/design.tsx
|
|
19
|
+
var v = "/Users/eelco.hillenius/dev/prj/pie/pie-elements-ng/packages/elements-react/math-templated/src/author/design.tsx", { dropdown: y } = g, { Panel: re, toggle: b } = g, x = l(h)(({ theme: e }) => ({
|
|
20
|
+
width: "100%",
|
|
21
|
+
paddingTop: e.spacing(2),
|
|
22
|
+
marginBottom: e.spacing(2)
|
|
23
|
+
})), S = l(_)({ width: "100%" }), C = l("div")(({ theme: e }) => ({
|
|
24
|
+
color: e.palette.error.main,
|
|
25
|
+
fontSize: "0.75rem",
|
|
26
|
+
marginTop: e.spacing(1)
|
|
27
|
+
})), ie = l("div")(({ theme: e }) => ({
|
|
28
|
+
color: e.palette.error.main,
|
|
29
|
+
fontSize: "0.75rem",
|
|
30
|
+
marginBottom: e.spacing(1)
|
|
31
|
+
})), ae = l(_)(({ theme: e }) => ({
|
|
32
|
+
width: "100%",
|
|
33
|
+
marginTop: e.spacing(2),
|
|
34
|
+
marginBottom: e.spacing(3)
|
|
35
|
+
})), oe = l(h)(({ theme: e }) => ({
|
|
36
|
+
width: "100%",
|
|
37
|
+
marginTop: e.spacing(2),
|
|
38
|
+
"& > *:not(label)": { marginTop: e.spacing(1) },
|
|
39
|
+
marginBottom: e.spacing(2)
|
|
40
|
+
})), se = l(p)({ width: "100%" }), w = l(f)(({ theme: e }) => ({
|
|
41
|
+
fontSize: e.typography.fontSize * 1.25,
|
|
42
|
+
fontWeight: "bold"
|
|
43
|
+
})), T = l("div")({
|
|
44
|
+
display: "flex",
|
|
45
|
+
alignItems: "center",
|
|
46
|
+
gap: "8px"
|
|
47
|
+
}), E = l(u)(({ theme: e }) => ({ "& .MuiTooltip-tooltip": {
|
|
48
|
+
fontSize: e.typography.fontSize - 2,
|
|
49
|
+
whiteSpace: "pre",
|
|
50
|
+
maxWidth: "500px"
|
|
51
|
+
} })), D = (e) => {
|
|
52
|
+
let t = document.createElement("div");
|
|
53
|
+
return t.innerHTML = e.trim(), t;
|
|
54
|
+
}, O = class extends s.Component {
|
|
55
|
+
static propTypes = {
|
|
56
|
+
model: c.object.isRequired,
|
|
57
|
+
configuration: c.object.isRequired,
|
|
58
|
+
onModelChanged: c.func.isRequired,
|
|
59
|
+
onConfigurationChanged: c.func.isRequired,
|
|
60
|
+
imageSupport: c.shape({
|
|
61
|
+
add: c.func.isRequired,
|
|
62
|
+
delete: c.func.isRequired
|
|
63
|
+
}),
|
|
64
|
+
uploadSoundSupport: c.object
|
|
65
|
+
};
|
|
66
|
+
state = {};
|
|
67
|
+
componentDidMount() {
|
|
68
|
+
let { model: { slateMarkup: e } } = this.props;
|
|
69
|
+
this.setState({ markup: e });
|
|
70
|
+
}
|
|
71
|
+
handleChange = (t, n) => {
|
|
72
|
+
let { onModelChanged: r, model: i } = this.props, a = e(i);
|
|
73
|
+
a[t] = n, r(a);
|
|
74
|
+
};
|
|
75
|
+
onResponseChange = (e, t) => {
|
|
76
|
+
let { model: n, onModelChanged: r } = this.props, i = { ...n };
|
|
77
|
+
i.responses[t] = e, r(i);
|
|
78
|
+
};
|
|
79
|
+
onResponseDone = () => {
|
|
80
|
+
let { model: e, onModelChanged: t } = this.props;
|
|
81
|
+
t({
|
|
82
|
+
...e,
|
|
83
|
+
slateMarkup: i(e.markup, e.responses)
|
|
84
|
+
});
|
|
85
|
+
};
|
|
86
|
+
onChangeResponse = (e, t) => {
|
|
87
|
+
let { model: n, onModelChanged: r } = this.props, { responses: i } = n;
|
|
88
|
+
i[e] ? i[e][0].answer = t || "" : i[e] = [{
|
|
89
|
+
answer: t || "",
|
|
90
|
+
id: "response" + e,
|
|
91
|
+
allowSpaces: !0
|
|
92
|
+
}], r({
|
|
93
|
+
...n,
|
|
94
|
+
responses: i
|
|
95
|
+
});
|
|
96
|
+
};
|
|
97
|
+
onResponsesChanged = (e) => {
|
|
98
|
+
this.props.onModelChanged({
|
|
99
|
+
...this.props.model,
|
|
100
|
+
responses: e
|
|
101
|
+
});
|
|
102
|
+
};
|
|
103
|
+
onChange = (e) => {
|
|
104
|
+
let { model: { responses: t, validationDefault: n, allowTrailingZerosDefault: r, ignoreOrderDefault: i }, onModelChanged: o } = this.props, s = {}, c = D(e);
|
|
105
|
+
c.querySelectorAll("[data-type=\"math_templated\"]").forEach((e, a) => {
|
|
106
|
+
let { value: o, index: c } = e.dataset;
|
|
107
|
+
o || (e.dataset.value = ""), s[a] = t[c] || {
|
|
108
|
+
allowSpaces: !0,
|
|
109
|
+
validation: n || "symbolic",
|
|
110
|
+
allowTrailingZeros: r || !1,
|
|
111
|
+
ignoreOrder: i || !1,
|
|
112
|
+
answer: "",
|
|
113
|
+
alternates: {}
|
|
114
|
+
}, e.dataset.index = a.toString();
|
|
115
|
+
});
|
|
116
|
+
let l = a(e);
|
|
117
|
+
this.setState({ cachedResponses: void 0 }, () => o({
|
|
118
|
+
...this.props.model,
|
|
119
|
+
slateMarkup: c.innerHTML,
|
|
120
|
+
responses: s,
|
|
121
|
+
markup: l
|
|
122
|
+
}));
|
|
123
|
+
};
|
|
124
|
+
onHandleAreaChange = n((n) => {
|
|
125
|
+
let { model: { responses: r }, onModelChanged: i } = this.props, { cachedResponses: a } = this.state;
|
|
126
|
+
if (!n) return;
|
|
127
|
+
let o = r ? e(r) : {}, s = a ? e(a) : {};
|
|
128
|
+
n.forEach((e) => {
|
|
129
|
+
let n = e.data.get("index");
|
|
130
|
+
!o[n] && s[n] ? (Object.assign(o, t(s, n)), Object.prototype.hasOwnProperty.call(s, n) && delete s[n]) : (Object.assign(s, t(o, n)), Object.prototype.hasOwnProperty.call(o, n) && delete o[n]);
|
|
131
|
+
}), this.setState({ cachedResponses: s }, () => i({
|
|
132
|
+
...this.props.model,
|
|
133
|
+
responses: o
|
|
134
|
+
}));
|
|
135
|
+
}, 500, {
|
|
136
|
+
trailing: !1,
|
|
137
|
+
leading: !0
|
|
138
|
+
});
|
|
139
|
+
onBlur = (e) => {
|
|
140
|
+
let { relatedTarget: t, currentTarget: n } = e || {};
|
|
141
|
+
function r(e, t = 0) {
|
|
142
|
+
if (!e || t >= 16) return null;
|
|
143
|
+
let n = e.offsetParent;
|
|
144
|
+
return n ? n.getAttribute("role") === "tooltip" ? n : r(n, t + 1) : null;
|
|
145
|
+
}
|
|
146
|
+
function i(e, t = 0) {
|
|
147
|
+
if (!e || t >= 4) return null;
|
|
148
|
+
let n = e?.children?.[0];
|
|
149
|
+
return n ? n.attributes && n.attributes["data-keypad"] ? n : i(n, t + 1) : null;
|
|
150
|
+
}
|
|
151
|
+
let a = r(t), o = a ? i(a) : null;
|
|
152
|
+
(!t || !n || !o?.attributes["data-keypad"]) && this.setState({ activeAnswerBlock: "" });
|
|
153
|
+
};
|
|
154
|
+
render() {
|
|
155
|
+
let { configuration: e, imageSupport: t, model: n, onConfigurationChanged: i, onModelChanged: a, uploadSoundSupport: s } = this.props, { baseInputConfiguration: c = {}, contentDimensions: l = {}, prompt: u = {}, rationale: f = {}, settingsPanelDisabled: p, teacherInstructions: h = {}, language: g = {}, languageChoices: _ = {}, spellCheck: D = {}, playerSpellCheck: O = {}, maxImageWidth: k = {}, maxImageHeight: A = {}, mathMlOptions: j = {}, template: ce = {}, editSource: M = {}, ignoreOrder: le = {}, allowTrailingZeros: ue = {}, partialScoring: N = {}, maxResponseAreas: P } = e || {}, { errors: F, extraCSSRules: I, promptEnabled: L, rationaleEnabled: R, spellCheckEnabled: z, teacherInstructionsEnabled: B, toolbarEditorPosition: V, responses: H, equationEditor: U } = n || {}, { prompt: W, rationale: G, responseAreas: K, teacherInstructions: q, responses: J = {} } = F || {}, Y = o(e), de = {
|
|
156
|
+
"language.enabled": g.settings && b(g.label, !0),
|
|
157
|
+
language: g.settings && g.enabled && y(_.label, _.options)
|
|
158
|
+
}, fe = {
|
|
159
|
+
teacherInstructionsEnabled: h.settings && b(h.label),
|
|
160
|
+
rationaleEnabled: f.settings && b(f.label),
|
|
161
|
+
promptEnabled: u.settings && b(u.label),
|
|
162
|
+
spellCheckEnabled: D.settings && b(D.label),
|
|
163
|
+
playerSpellCheckEnabled: O.settings && b(O.label),
|
|
164
|
+
"editSource.enabled": M?.settings && b(M.label, !0),
|
|
165
|
+
partialScoring: N.settings && b(N.label)
|
|
166
|
+
}, X = k && k.prompt, Z = A && A.prompt, Q = { position: V === "top" ? "top" : "bottom" }, $ = (e = {}, t = {}) => ({
|
|
167
|
+
...t,
|
|
168
|
+
...e
|
|
169
|
+
});
|
|
170
|
+
return /* @__PURE__ */ d(te.ConfigLayout, {
|
|
171
|
+
extraCSSRules: I,
|
|
172
|
+
dimensions: l,
|
|
173
|
+
hideSettings: p,
|
|
174
|
+
settings: /* @__PURE__ */ d(re, {
|
|
175
|
+
model: n,
|
|
176
|
+
configuration: e,
|
|
177
|
+
onChangeModel: (e) => a(e),
|
|
178
|
+
onChangeConfiguration: i,
|
|
179
|
+
groups: {
|
|
180
|
+
Settings: de,
|
|
181
|
+
Properties: fe
|
|
182
|
+
}
|
|
183
|
+
}, void 0, !1, {
|
|
184
|
+
fileName: v,
|
|
185
|
+
lineNumber: 364,
|
|
186
|
+
columnNumber: 11
|
|
187
|
+
}, this),
|
|
188
|
+
children: [
|
|
189
|
+
B && /* @__PURE__ */ d(x, {
|
|
190
|
+
label: h.label,
|
|
191
|
+
children: [/* @__PURE__ */ d(S, {
|
|
192
|
+
markup: n.teacherInstructions || "",
|
|
193
|
+
onChange: (e) => this.handleChange("teacherInstructions", e),
|
|
194
|
+
imageSupport: t,
|
|
195
|
+
nonEmpty: !1,
|
|
196
|
+
error: q,
|
|
197
|
+
toolbarOpts: Q,
|
|
198
|
+
pluginProps: $(h?.inputConfiguration, c),
|
|
199
|
+
spellCheck: z,
|
|
200
|
+
maxImageWidth: k && k.teacherInstructions || X,
|
|
201
|
+
maxImageHeight: A && A.teacherInstructions || Z,
|
|
202
|
+
uploadSoundSupport: s,
|
|
203
|
+
languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
|
|
204
|
+
mathMlOptions: j
|
|
205
|
+
}, void 0, !1, {
|
|
206
|
+
fileName: v,
|
|
207
|
+
lineNumber: 378,
|
|
208
|
+
columnNumber: 13
|
|
209
|
+
}, this), q && /* @__PURE__ */ d(C, { children: q }, void 0, !1, {
|
|
210
|
+
fileName: v,
|
|
211
|
+
lineNumber: 393,
|
|
212
|
+
columnNumber: 42
|
|
213
|
+
}, this)]
|
|
214
|
+
}, void 0, !0, {
|
|
215
|
+
fileName: v,
|
|
216
|
+
lineNumber: 377,
|
|
217
|
+
columnNumber: 11
|
|
218
|
+
}, this),
|
|
219
|
+
L && /* @__PURE__ */ d(x, {
|
|
220
|
+
label: u.label,
|
|
221
|
+
children: [/* @__PURE__ */ d(S, {
|
|
222
|
+
markup: n.prompt,
|
|
223
|
+
onChange: (e) => this.handleChange("prompt", e),
|
|
224
|
+
imageSupport: t,
|
|
225
|
+
nonEmpty: !1,
|
|
226
|
+
disableUnderline: !0,
|
|
227
|
+
error: W,
|
|
228
|
+
toolbarOpts: Q,
|
|
229
|
+
pluginProps: $(h?.inputConfiguration, c),
|
|
230
|
+
spellCheck: z,
|
|
231
|
+
maxImageWidth: X,
|
|
232
|
+
maxImageHeight: Z,
|
|
233
|
+
uploadSoundSupport: s,
|
|
234
|
+
languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
|
|
235
|
+
mathMlOptions: j
|
|
236
|
+
}, void 0, !1, {
|
|
237
|
+
fileName: v,
|
|
238
|
+
lineNumber: 399,
|
|
239
|
+
columnNumber: 13
|
|
240
|
+
}, this), W && /* @__PURE__ */ d(C, { children: W }, void 0, !1, {
|
|
241
|
+
fileName: v,
|
|
242
|
+
lineNumber: 415,
|
|
243
|
+
columnNumber: 29
|
|
244
|
+
}, this)]
|
|
245
|
+
}, void 0, !0, {
|
|
246
|
+
fileName: v,
|
|
247
|
+
lineNumber: 398,
|
|
248
|
+
columnNumber: 11
|
|
249
|
+
}, this),
|
|
250
|
+
/* @__PURE__ */ d(T, { children: [/* @__PURE__ */ d(w, {
|
|
251
|
+
component: "div",
|
|
252
|
+
children: "Response Template"
|
|
253
|
+
}, void 0, !1, {
|
|
254
|
+
fileName: v,
|
|
255
|
+
lineNumber: 419,
|
|
256
|
+
columnNumber: 11
|
|
257
|
+
}, this), /* @__PURE__ */ d(E, {
|
|
258
|
+
disableFocusListener: !0,
|
|
259
|
+
disableTouchListener: !0,
|
|
260
|
+
placement: "right",
|
|
261
|
+
title: Y,
|
|
262
|
+
children: /* @__PURE__ */ d(ee, {
|
|
263
|
+
fontSize: "small",
|
|
264
|
+
color: "primary"
|
|
265
|
+
}, void 0, !1, {
|
|
266
|
+
fileName: v,
|
|
267
|
+
lineNumber: 421,
|
|
268
|
+
columnNumber: 13
|
|
269
|
+
}, this)
|
|
270
|
+
}, void 0, !1, {
|
|
271
|
+
fileName: v,
|
|
272
|
+
lineNumber: 420,
|
|
273
|
+
columnNumber: 11
|
|
274
|
+
}, this)] }, void 0, !0, {
|
|
275
|
+
fileName: v,
|
|
276
|
+
lineNumber: 418,
|
|
277
|
+
columnNumber: 9
|
|
278
|
+
}, this),
|
|
279
|
+
/* @__PURE__ */ d(ae, {
|
|
280
|
+
activePlugins: ne,
|
|
281
|
+
toolbarOpts: { position: "top" },
|
|
282
|
+
spellCheck: z,
|
|
283
|
+
pluginProps: $(ce?.inputConfiguration, c),
|
|
284
|
+
responseAreaProps: {
|
|
285
|
+
type: "math-templated",
|
|
286
|
+
respAreaToolbar: null,
|
|
287
|
+
error: () => J,
|
|
288
|
+
onHandleAreaChange: this.onHandleAreaChange,
|
|
289
|
+
maxResponseAreas: P
|
|
290
|
+
},
|
|
291
|
+
markup: n.slateMarkup,
|
|
292
|
+
onChange: this.onChange,
|
|
293
|
+
imageSupport: t,
|
|
294
|
+
disableImageAlignmentButtons: !0,
|
|
295
|
+
onBlur: this.onBlur,
|
|
296
|
+
disabled: !1,
|
|
297
|
+
highlightShape: !1,
|
|
298
|
+
error: K,
|
|
299
|
+
uploadSoundSupport: s,
|
|
300
|
+
languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
|
|
301
|
+
mathMlOptions: j
|
|
302
|
+
}, void 0, !1, {
|
|
303
|
+
fileName: v,
|
|
304
|
+
lineNumber: 424,
|
|
305
|
+
columnNumber: 9
|
|
306
|
+
}, this),
|
|
307
|
+
K && /* @__PURE__ */ d(ie, { children: K }, void 0, !1, {
|
|
308
|
+
fileName: v,
|
|
309
|
+
lineNumber: 448,
|
|
310
|
+
columnNumber: 32
|
|
311
|
+
}, this),
|
|
312
|
+
/* @__PURE__ */ d(w, { children: "Define Response" }, void 0, !1, {
|
|
313
|
+
fileName: v,
|
|
314
|
+
lineNumber: 450,
|
|
315
|
+
columnNumber: 9
|
|
316
|
+
}, this),
|
|
317
|
+
/* @__PURE__ */ d(oe, {
|
|
318
|
+
label: "Response Template Equation Editor",
|
|
319
|
+
children: /* @__PURE__ */ d(se, {
|
|
320
|
+
MenuProps: { transitionDuration: {
|
|
321
|
+
enter: 225,
|
|
322
|
+
exit: 195
|
|
323
|
+
} },
|
|
324
|
+
onChange: (e) => this.handleChange("equationEditor", e.target.value),
|
|
325
|
+
value: U,
|
|
326
|
+
children: [
|
|
327
|
+
/* @__PURE__ */ d(m, {
|
|
328
|
+
value: "non-negative-integers",
|
|
329
|
+
children: "Numeric - Non-Negative Integers"
|
|
330
|
+
}, void 0, !1, {
|
|
331
|
+
fileName: v,
|
|
332
|
+
lineNumber: 458,
|
|
333
|
+
columnNumber: 13
|
|
334
|
+
}, this),
|
|
335
|
+
/* @__PURE__ */ d(m, {
|
|
336
|
+
value: "integers",
|
|
337
|
+
children: "Numeric - Integers"
|
|
338
|
+
}, void 0, !1, {
|
|
339
|
+
fileName: v,
|
|
340
|
+
lineNumber: 459,
|
|
341
|
+
columnNumber: 13
|
|
342
|
+
}, this),
|
|
343
|
+
/* @__PURE__ */ d(m, {
|
|
344
|
+
value: "decimals",
|
|
345
|
+
children: "Numeric - Decimals"
|
|
346
|
+
}, void 0, !1, {
|
|
347
|
+
fileName: v,
|
|
348
|
+
lineNumber: 460,
|
|
349
|
+
columnNumber: 13
|
|
350
|
+
}, this),
|
|
351
|
+
/* @__PURE__ */ d(m, {
|
|
352
|
+
value: "fractions",
|
|
353
|
+
children: "Numeric - Fractions"
|
|
354
|
+
}, void 0, !1, {
|
|
355
|
+
fileName: v,
|
|
356
|
+
lineNumber: 461,
|
|
357
|
+
columnNumber: 13
|
|
358
|
+
}, this),
|
|
359
|
+
/* @__PURE__ */ d(m, {
|
|
360
|
+
value: 1,
|
|
361
|
+
children: "Grade 1 - 2"
|
|
362
|
+
}, void 0, !1, {
|
|
363
|
+
fileName: v,
|
|
364
|
+
lineNumber: 462,
|
|
365
|
+
columnNumber: 13
|
|
366
|
+
}, this),
|
|
367
|
+
/* @__PURE__ */ d(m, {
|
|
368
|
+
value: 3,
|
|
369
|
+
children: "Grade 3 - 5"
|
|
370
|
+
}, void 0, !1, {
|
|
371
|
+
fileName: v,
|
|
372
|
+
lineNumber: 463,
|
|
373
|
+
columnNumber: 13
|
|
374
|
+
}, this),
|
|
375
|
+
/* @__PURE__ */ d(m, {
|
|
376
|
+
value: 6,
|
|
377
|
+
children: "Grade 6 - 7"
|
|
378
|
+
}, void 0, !1, {
|
|
379
|
+
fileName: v,
|
|
380
|
+
lineNumber: 464,
|
|
381
|
+
columnNumber: 13
|
|
382
|
+
}, this),
|
|
383
|
+
/* @__PURE__ */ d(m, {
|
|
384
|
+
value: 8,
|
|
385
|
+
children: "Grade 8 - HS"
|
|
386
|
+
}, void 0, !1, {
|
|
387
|
+
fileName: v,
|
|
388
|
+
lineNumber: 465,
|
|
389
|
+
columnNumber: 13
|
|
390
|
+
}, this),
|
|
391
|
+
/* @__PURE__ */ d(m, {
|
|
392
|
+
value: "geometry",
|
|
393
|
+
children: "Geometry"
|
|
394
|
+
}, void 0, !1, {
|
|
395
|
+
fileName: v,
|
|
396
|
+
lineNumber: 466,
|
|
397
|
+
columnNumber: 13
|
|
398
|
+
}, this),
|
|
399
|
+
/* @__PURE__ */ d(m, {
|
|
400
|
+
value: "advanced-algebra",
|
|
401
|
+
children: "Advanced Algebra"
|
|
402
|
+
}, void 0, !1, {
|
|
403
|
+
fileName: v,
|
|
404
|
+
lineNumber: 467,
|
|
405
|
+
columnNumber: 13
|
|
406
|
+
}, this),
|
|
407
|
+
/* @__PURE__ */ d(m, {
|
|
408
|
+
value: "statistics",
|
|
409
|
+
children: "Statistics"
|
|
410
|
+
}, void 0, !1, {
|
|
411
|
+
fileName: v,
|
|
412
|
+
lineNumber: 468,
|
|
413
|
+
columnNumber: 13
|
|
414
|
+
}, this),
|
|
415
|
+
/* @__PURE__ */ d(m, {
|
|
416
|
+
value: "item-authoring",
|
|
417
|
+
children: "Item Authoring"
|
|
418
|
+
}, void 0, !1, {
|
|
419
|
+
fileName: v,
|
|
420
|
+
lineNumber: 469,
|
|
421
|
+
columnNumber: 13
|
|
422
|
+
}, this)
|
|
423
|
+
]
|
|
424
|
+
}, void 0, !0, {
|
|
425
|
+
fileName: v,
|
|
426
|
+
lineNumber: 453,
|
|
427
|
+
columnNumber: 11
|
|
428
|
+
}, this)
|
|
429
|
+
}, void 0, !1, {
|
|
430
|
+
fileName: v,
|
|
431
|
+
lineNumber: 452,
|
|
432
|
+
columnNumber: 9
|
|
433
|
+
}, this),
|
|
434
|
+
Object.keys(H || {}).map((e, t) => {
|
|
435
|
+
let n = H[t];
|
|
436
|
+
return n ? /* @__PURE__ */ d(r, {
|
|
437
|
+
responseKey: t,
|
|
438
|
+
mode: U,
|
|
439
|
+
response: n,
|
|
440
|
+
onResponseChange: this.onResponseChange,
|
|
441
|
+
onResponseDone: this.onResponseDone,
|
|
442
|
+
index: t,
|
|
443
|
+
cIgnoreOrder: le,
|
|
444
|
+
cAllowTrailingZeros: ue,
|
|
445
|
+
error: J && J[t]
|
|
446
|
+
}, t, !1, {
|
|
447
|
+
fileName: v,
|
|
448
|
+
lineNumber: 478,
|
|
449
|
+
columnNumber: 15
|
|
450
|
+
}, this) : null;
|
|
451
|
+
}),
|
|
452
|
+
R && /* @__PURE__ */ d(x, {
|
|
453
|
+
label: f.label,
|
|
454
|
+
children: [/* @__PURE__ */ d(S, {
|
|
455
|
+
markup: n.rationale || "",
|
|
456
|
+
onChange: (e) => this.handleChange("rationale", e),
|
|
457
|
+
imageSupport: t,
|
|
458
|
+
nonEmpty: !1,
|
|
459
|
+
error: G,
|
|
460
|
+
toolbarOpts: Q,
|
|
461
|
+
pluginProps: $(f?.inputConfiguration, {
|
|
462
|
+
...c,
|
|
463
|
+
math: { controlledKeypadMode: !1 }
|
|
464
|
+
}),
|
|
465
|
+
spellCheck: z,
|
|
466
|
+
maxImageWidth: k && k.rationale || X,
|
|
467
|
+
maxImageHeight: A && A.rationale || Z,
|
|
468
|
+
uploadSoundSupport: s,
|
|
469
|
+
languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
|
|
470
|
+
mathMlOptions: j
|
|
471
|
+
}, void 0, !1, {
|
|
472
|
+
fileName: v,
|
|
473
|
+
lineNumber: 498,
|
|
474
|
+
columnNumber: 13
|
|
475
|
+
}, this), G && /* @__PURE__ */ d(C, { children: G }, void 0, !1, {
|
|
476
|
+
fileName: v,
|
|
477
|
+
lineNumber: 518,
|
|
478
|
+
columnNumber: 32
|
|
479
|
+
}, this)]
|
|
480
|
+
}, void 0, !0, {
|
|
481
|
+
fileName: v,
|
|
482
|
+
lineNumber: 497,
|
|
483
|
+
columnNumber: 11
|
|
484
|
+
}, this)
|
|
485
|
+
]
|
|
486
|
+
}, void 0, !0, {
|
|
487
|
+
fileName: v,
|
|
488
|
+
lineNumber: 359,
|
|
489
|
+
columnNumber: 7
|
|
490
|
+
}, this);
|
|
491
|
+
}
|
|
492
|
+
};
|
|
493
|
+
//#endregion
|
|
494
|
+
export { O as default };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/math-templated/configure/src/index.js
|
|
3
|
+
* @auto-generated
|
|
4
|
+
*
|
|
5
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
+
* Manual edits will be overwritten on next sync.
|
|
7
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
+
*/
|
|
9
|
+
export default class MathTemplateConfigure extends HTMLElement {
|
|
10
|
+
static prepareModel: (model?: {}) => {
|
|
11
|
+
slateMarkup: any;
|
|
12
|
+
markup: string;
|
|
13
|
+
responses: {};
|
|
14
|
+
allowTrailingZerosDefault: boolean;
|
|
15
|
+
equationEditor: string;
|
|
16
|
+
ignoreOrderDefault: boolean;
|
|
17
|
+
playerSpellCheckEnabled: boolean;
|
|
18
|
+
prompt: string;
|
|
19
|
+
promptEnabled: boolean;
|
|
20
|
+
rationale: string;
|
|
21
|
+
rationaleEnabled: boolean;
|
|
22
|
+
spellCheckEnabled: boolean;
|
|
23
|
+
teacherInstructions: string;
|
|
24
|
+
teacherInstructionsEnabled: boolean;
|
|
25
|
+
toolbarEditorPosition: string;
|
|
26
|
+
validationDefault: string;
|
|
27
|
+
};
|
|
28
|
+
constructor();
|
|
29
|
+
set model(s: any);
|
|
30
|
+
set configuration(c: any);
|
|
31
|
+
set disableSidePanel(s: any);
|
|
32
|
+
dispatchModelUpdated(reset: any): void;
|
|
33
|
+
onModelChanged(m: any, reset: any): void;
|
|
34
|
+
onConfigurationChanged(c: any): void;
|
|
35
|
+
/** @param {done, progress, file} handler */
|
|
36
|
+
insertImage(handler: any): void;
|
|
37
|
+
onDeleteImage(src: any, done: any): void;
|
|
38
|
+
insertSound(handler: any): void;
|
|
39
|
+
onDeleteSound(src: any, done: any): void;
|
|
40
|
+
_render(): void;
|
|
41
|
+
disconnectedCallback(): void;
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/author/index.ts"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAqBH,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,WAAW;IAC5D,MAAM,CAAC,YAAY,GAAI,UAAU;;;;;;;;;;;;;;;;;MA8C/B;;IAWF,IAAI,KAAK,CAAC,CAAC,KAAA,EAGV;IAED,IAAI,aAAa,CAAC,CAAC,KAAA,EA+BlB;IAED,IAAI,gBAAgB,CAAC,CAAC,KAAA,EAGrB;IAED,oBAAoB,CAAC,KAAK,KAAA;IAM1B,cAAc,CAAC,CAAC,KAAA,EAAE,KAAK,KAAA;IAMvB,sBAAsB,CAAC,CAAC,KAAA;IAKxB,4CAA4C;IAC5C,WAAW,CAAC,OAAO,KAAA;IAInB,aAAa,CAAC,GAAG,KAAA,EAAE,IAAI,KAAA;IAIvB,WAAW,CAAC,OAAO,KAAA;IAInB,aAAa,CAAC,GAAG,KAAA,EAAE,IAAI,KAAA;IAIvB,OAAO;IAyBP,oBAAoB;CAKrB"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import e from "../node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isArray.js";
|
|
2
|
+
import t from "../node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/defaults.js";
|
|
3
|
+
import { createSlateMarkup as n, processMarkup as r } from "./markupUtils.js";
|
|
4
|
+
import i from "./design.js";
|
|
5
|
+
import a from "./defaults.js";
|
|
6
|
+
import o from "react";
|
|
7
|
+
import { createRoot as s } from "react-dom/client";
|
|
8
|
+
import c from "debug";
|
|
9
|
+
import { DeleteImageEvent as l, DeleteSoundEvent as u, InsertImageEvent as d, InsertSoundEvent as f, ModelUpdatedEvent as p } from "@pie-element/shared-configure-events";
|
|
10
|
+
//#region src/author/index.ts
|
|
11
|
+
var m = c("math-templated:configure"), h = class c extends HTMLElement {
|
|
12
|
+
static prepareModel = (t = {}) => {
|
|
13
|
+
let { validationDefault: i, allowTrailingZerosDefault: o, ignoreOrderDefault: s, responses: c = {} } = t, l = Object.keys(c).reduce((e, t) => {
|
|
14
|
+
let n = c[t];
|
|
15
|
+
return e[t] = {
|
|
16
|
+
...n,
|
|
17
|
+
validation: n.validation || i,
|
|
18
|
+
allowTrailingZeros: n.allowTrailingZeros || o,
|
|
19
|
+
ignoreOrder: n.ignoreOrder || s
|
|
20
|
+
}, e;
|
|
21
|
+
}, {}), u = {
|
|
22
|
+
...a.model,
|
|
23
|
+
...t,
|
|
24
|
+
responses: l
|
|
25
|
+
}, d = u.slateMarkup || n(u.markup, u.responses), f = r(d);
|
|
26
|
+
return u.responses && Object.keys(u.responses).forEach((t) => {
|
|
27
|
+
e(u.responses[t]) && (u.responses[t] = (u.responses[t] || []).map((e, t) => e.answer ? e : (m("Choice does not contain \"answer\" property, which is required.", e), {
|
|
28
|
+
answer: `${t}`,
|
|
29
|
+
...e
|
|
30
|
+
})));
|
|
31
|
+
}), {
|
|
32
|
+
...u,
|
|
33
|
+
slateMarkup: d,
|
|
34
|
+
markup: f
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
constructor() {
|
|
38
|
+
super(), this._root = null, this._model = c.prepareModel(), this._configuration = a.configuration, this.onModelChanged = this.onModelChanged.bind(this), this.onConfigurationChanged = this.onConfigurationChanged.bind(this);
|
|
39
|
+
}
|
|
40
|
+
set model(e) {
|
|
41
|
+
this._model = c.prepareModel(e), this._render();
|
|
42
|
+
}
|
|
43
|
+
set configuration(e) {
|
|
44
|
+
this._configuration = t(e, a.configuration), e.language?.enabled ? e.languageChoices?.options?.length && (this._model.language = e.languageChoices.options[0].value) : e.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({
|
|
45
|
+
value: this._model.language,
|
|
46
|
+
label: this._model.language
|
|
47
|
+
})) : delete this._model.language, this._render();
|
|
48
|
+
}
|
|
49
|
+
set disableSidePanel(e) {
|
|
50
|
+
this._disableSidePanel = e, this._render();
|
|
51
|
+
}
|
|
52
|
+
dispatchModelUpdated(e) {
|
|
53
|
+
let t = !!e;
|
|
54
|
+
this.dispatchEvent(new p(this._model, t));
|
|
55
|
+
}
|
|
56
|
+
onModelChanged(e, t) {
|
|
57
|
+
this._model = c.prepareModel(e), this._render(), this.dispatchModelUpdated(t);
|
|
58
|
+
}
|
|
59
|
+
onConfigurationChanged(e) {
|
|
60
|
+
this._configuration = e, this._render();
|
|
61
|
+
}
|
|
62
|
+
insertImage(e) {
|
|
63
|
+
this.dispatchEvent(new d(e));
|
|
64
|
+
}
|
|
65
|
+
onDeleteImage(e, t) {
|
|
66
|
+
this.dispatchEvent(new l(e, t));
|
|
67
|
+
}
|
|
68
|
+
insertSound(e) {
|
|
69
|
+
this.dispatchEvent(new f(e));
|
|
70
|
+
}
|
|
71
|
+
onDeleteSound(e, t) {
|
|
72
|
+
this.dispatchEvent(new u(e, t));
|
|
73
|
+
}
|
|
74
|
+
_render() {
|
|
75
|
+
m("_render");
|
|
76
|
+
let e = o.createElement(i, {
|
|
77
|
+
model: this._model,
|
|
78
|
+
configuration: this._configuration,
|
|
79
|
+
onModelChanged: this.onModelChanged,
|
|
80
|
+
onConfigurationChanged: this.onConfigurationChanged,
|
|
81
|
+
disableSidePanel: this._disableSidePanel,
|
|
82
|
+
imageSupport: {
|
|
83
|
+
add: this.insertImage.bind(this),
|
|
84
|
+
delete: this.onDeleteImage.bind(this)
|
|
85
|
+
},
|
|
86
|
+
uploadSoundSupport: {
|
|
87
|
+
add: this.insertSound.bind(this),
|
|
88
|
+
delete: this.onDeleteSound.bind(this)
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
this._root ||= s(this), this._root.render(e);
|
|
92
|
+
}
|
|
93
|
+
disconnectedCallback() {
|
|
94
|
+
this._root && this._root.unmount();
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
//#endregion
|
|
98
|
+
export { h as default };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/math-templated/configure/src/markupUtils.js
|
|
3
|
+
* @auto-generated
|
|
4
|
+
*
|
|
5
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
+
* Manual edits will be overwritten on next sync.
|
|
7
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
+
*/
|
|
9
|
+
export declare const removeUnwantedCharacters: (markup: any) => any;
|
|
10
|
+
export declare const processMarkup: (markup: any) => string;
|
|
11
|
+
export declare const createSlateMarkup: (markup: any, responses: any) => any;
|
|
12
|
+
//# sourceMappingURL=markupUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"markupUtils.d.ts","sourceRoot":"","sources":["../../src/author/markupUtils.tsx"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAYH,eAAO,MAAM,wBAAwB,GAAI,WAAM,QACoC,CAAC;AAUpF,eAAO,MAAM,aAAa,GAAI,WAAM,WAQnC,CAAC;AAIF,eAAO,MAAM,iBAAiB,GAAI,WAAM,EAAE,cAAS,QAWlD,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
//#region src/author/markupUtils.tsx
|
|
2
|
+
var e = "imes|riangle|an|heta|herefore", t = "throot|parallel|cong|approx|eq|e|sim", n = RegExp(`(\\t(?!${e}))|(\\n(?!${t}))|(\\\\t(?!${e}))|(\\\\n(?!${t}))`, "g"), r = (e) => e.replace(n, "").replace(/\\"/g, "\"").replace(/\\\//g, "/"), i = (e = "") => {
|
|
3
|
+
let t = document.createElement("div");
|
|
4
|
+
return t.innerHTML = e.trim(), t;
|
|
5
|
+
}, a = (e) => {
|
|
6
|
+
let t = i(r(e || "") || "");
|
|
7
|
+
return t.querySelectorAll("[data-type=\"math_templated\"]").forEach((e) => e.replaceWith(`{{${e.dataset.index}}}`)), t.innerHTML;
|
|
8
|
+
}, o = /\{\{(\d+)\}\}/g, s = (e, t) => e ? r(e).replace(o, (e, n) => `<span data-type="math_templated" data-index="${n}" data-value="${t[n]?.answer || ""}"></span>`) : "";
|
|
9
|
+
//#endregion
|
|
10
|
+
export { s as createSlateMarkup, a as processMarkup };
|