@pie-element/inline-dropdown 10.1.2-next.0 → 10.1.2-next.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/author/index.js +15 -15
- package/dist/author/inline-dropdown-toolbar.js +36 -37
- package/dist/author/main.js +92 -97
- package/dist/author/markupUtils.js +1 -1
- package/dist/browser/{Close-CMvmRhfL.js → Close-ihSzAQyP.js} +2159 -2143
- package/dist/browser/Close-ihSzAQyP.js.map +1 -0
- package/dist/browser/author/index.js +6136 -6742
- package/dist/browser/author/index.js.map +1 -1
- package/dist/browser/controller/index.js +78 -97
- package/dist/browser/controller/index.js.map +1 -1
- package/dist/browser/delivery/index.js +19 -19
- package/dist/browser/delivery/index.js.map +1 -1
- package/dist/browser/dist-CAsDMEWi.js +133 -0
- package/dist/browser/dist-CAsDMEWi.js.map +1 -0
- package/dist/controller/index.d.ts +1 -1
- package/dist/controller/index.js +36 -38
- package/dist/controller/utils.js +1 -1
- package/dist/delivery/inline-dropdown.js +22 -22
- package/dist/index.iife.js +34 -34
- package/dist/runtime-support.d.ts +12 -0
- package/dist/runtime-support.js +12 -0
- package/package.json +13 -10
- package/dist/browser/Close-CMvmRhfL.js.map +0 -1
- package/dist/browser/isEmpty-BAznrYT5.js +0 -433
- package/dist/browser/isEmpty-BAznrYT5.js.map +0 -1
- package/dist/browser/reduce-2sGcZtv4.js +0 -446
- package/dist/browser/reduce-2sGcZtv4.js.map +0 -1
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_DataView.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Hash.js +0 -16
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_ListCache.js +0 -16
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Map.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_MapCache.js +0 -16
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Promise.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Set.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_SetCache.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Stack.js +0 -14
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Symbol.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Uint8Array.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_WeakMap.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_apply.js +0 -12
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayEach.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayFilter.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayLikeKeys.js +0 -15
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayMap.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayPush.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayReduce.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arraySome.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assignValue.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assocIndexOf.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssign.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignIn.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignValue.js +0 -12
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseClone.js +0 -57
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseCreate.js +0 -14
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseEach.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseExtremum.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseFor.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseForOwn.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGet.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetAllKeys.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetTag.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGt.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseHasIn.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsArguments.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqual.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqualDeep.js +0 -30
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsMap.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsMatch.js +0 -26
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNative.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsSet.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsTypedArray.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIteratee.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeys.js +0 -12
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeysIn.js +0 -13
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMap.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMatches.js +0 -12
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMatchesProperty.js +0 -17
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseProperty.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_basePropertyDeep.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_basePropertyOf.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseReduce.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseRest.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseSetToString.js +0 -14
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTimes.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseToString.js +0 -15
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseUnary.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cacheHas.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_castFunction.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_castPath.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneArrayBuffer.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneBuffer.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneDataView.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneRegExp.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneSymbol.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneTypedArray.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyArray.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyObject.js +0 -14
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbols.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbolsIn.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_coreJsData.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createBaseEach.js +0 -12
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createBaseFor.js +0 -12
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_defineProperty.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalArrays.js +0 -35
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalByTag.js +0 -35
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalObjects.js +0 -32
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_escapeHtmlChar.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_freeGlobal.js +0 -4
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeys.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeysIn.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getMapData.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getMatchData.js +0 -16
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getNative.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getPrototype.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getRawTag.js +0 -14
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbols.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbolsIn.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getTag.js +0 -23
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getValue.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hasPath.js +0 -18
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashClear.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashDelete.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashGet.js +0 -13
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashHas.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashSet.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneArray.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneByTag.js +0 -33
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneObject.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIndex.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIterateeCall.js +0 -12
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKey.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKeyable.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isMasked.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isPrototype.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isStrictComparable.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheClear.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheDelete.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheGet.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheHas.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheSet.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheClear.js +0 -13
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheDelete.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheGet.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheHas.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheSet.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapToArray.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_matchesStrictComparable.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_memoizeCapped.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeCreate.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeys.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeysIn.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nodeUtil.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_objectToString.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overArg.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overRest.js +0 -13
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_root.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheAdd.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheHas.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setToArray.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setToString.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_shortOut.js +0 -14
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackClear.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackDelete.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackGet.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackHas.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackSet.js +0 -16
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stringToPath.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toKey.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toSource.js +0 -15
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/cloneDeep.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/constant.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/defaults.js +0 -16
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/eq.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/escape.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/forEach.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/get.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/hasIn.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/identity.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArguments.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArray.js +0 -4
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLike.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isBuffer.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.js +0 -21
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEqual.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isFunction.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isLength.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isMap.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObject.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObjectLike.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSet.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSymbol.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isTypedArray.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isUndefined.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keys.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keysIn.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/map.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/max.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/memoize.js +0 -16
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/property.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/reduce.js +0 -12
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubArray.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubFalse.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toString.js +0 -7
package/dist/author/index.js
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import e from "
|
|
2
|
-
import t from "./
|
|
3
|
-
import n from "./
|
|
4
|
-
import
|
|
5
|
-
import a from "react";
|
|
6
|
-
import {
|
|
1
|
+
import e from "./main.js";
|
|
2
|
+
import t from "./defaults.js";
|
|
3
|
+
import { createSlateMarkup as n, processMarkup as r } from "./markupUtils.js";
|
|
4
|
+
import i from "react";
|
|
5
|
+
import { createRoot as a } from "react-dom/client";
|
|
6
|
+
import { defaults as o } from "@pie-element/shared-lodash";
|
|
7
7
|
import { DeleteImageEvent as s, DeleteSoundEvent as c, InsertImageEvent as l, InsertSoundEvent as u, ModelUpdatedEvent as d } from "@pie-element/shared-configure-events";
|
|
8
8
|
import f from "debug";
|
|
9
9
|
//#region src/author/index.ts
|
|
10
10
|
var p = f("multiple-choice:configure"), m = class f extends HTMLElement {
|
|
11
11
|
static prepareModel = (e = {}) => {
|
|
12
|
-
let
|
|
13
|
-
...
|
|
12
|
+
let i = {
|
|
13
|
+
...t.model,
|
|
14
14
|
...e
|
|
15
|
-
}, a = e.slateMarkup ||
|
|
15
|
+
}, a = e.slateMarkup || n(i.markup, i.choices), o = r(a);
|
|
16
16
|
return {
|
|
17
|
-
...
|
|
17
|
+
...i,
|
|
18
18
|
slateMarkup: a,
|
|
19
19
|
markup: o
|
|
20
20
|
};
|
|
21
21
|
};
|
|
22
22
|
constructor() {
|
|
23
|
-
super(), this._root = null, this._model = f.prepareModel(), this._configuration =
|
|
23
|
+
super(), this._root = null, this._model = f.prepareModel(), this._configuration = t.configuration, this.onModelChanged = this.onModelChanged.bind(this), this.onConfigurationChanged = this.onConfigurationChanged.bind(this);
|
|
24
24
|
}
|
|
25
25
|
set model(e) {
|
|
26
26
|
this._model = f.prepareModel(e), this._render();
|
|
27
27
|
}
|
|
28
|
-
set configuration(
|
|
29
|
-
this._configuration = e
|
|
28
|
+
set configuration(e) {
|
|
29
|
+
this._configuration = o(e, t.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({
|
|
30
30
|
value: this._model.language,
|
|
31
31
|
label: this._model.language
|
|
32
32
|
})) : delete this._model.language, this._render();
|
|
@@ -58,7 +58,7 @@ var p = f("multiple-choice:configure"), m = class f extends HTMLElement {
|
|
|
58
58
|
}
|
|
59
59
|
_render() {
|
|
60
60
|
p("_render");
|
|
61
|
-
let
|
|
61
|
+
let t = i.createElement(e, {
|
|
62
62
|
model: this._model,
|
|
63
63
|
configuration: this._configuration,
|
|
64
64
|
onModelChanged: this.onModelChanged,
|
|
@@ -73,7 +73,7 @@ var p = f("multiple-choice:configure"), m = class f extends HTMLElement {
|
|
|
73
73
|
delete: this.onDeleteSound.bind(this)
|
|
74
74
|
}
|
|
75
75
|
});
|
|
76
|
-
this._root ||=
|
|
76
|
+
this._root ||= a(this), this._root.render(t);
|
|
77
77
|
}
|
|
78
78
|
disconnectedCallback() {
|
|
79
79
|
this._root && this._root.unmount();
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import e from "
|
|
2
|
-
import t from "
|
|
3
|
-
import {
|
|
4
|
-
import r from "react";
|
|
5
|
-
import
|
|
6
|
-
import a from "
|
|
7
|
-
import o from "prop-types";
|
|
1
|
+
import { getPluginProps as e } from "./utils.js";
|
|
2
|
+
import t from "react";
|
|
3
|
+
import { renderMath as n } from "@pie-element/shared-math-rendering-mathjax";
|
|
4
|
+
import r from "react-dom";
|
|
5
|
+
import i from "prop-types";
|
|
6
|
+
import { isEmpty as a, isEqual as o } from "@pie-element/shared-lodash";
|
|
8
7
|
import { color as s } from "@pie-lib/render-ui";
|
|
9
8
|
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
10
9
|
import { styled as u } from "@mui/material/styles";
|
|
@@ -48,13 +47,13 @@ var _ = u("div")(({ theme: e }) => ({
|
|
|
48
47
|
fontSize: e.typography.fontSize,
|
|
49
48
|
padding: e.spacing(.5),
|
|
50
49
|
color: e.palette.common.black
|
|
51
|
-
})), S = class extends
|
|
50
|
+
})), S = class extends t.Component {
|
|
52
51
|
static propTypes = {
|
|
53
|
-
correct:
|
|
54
|
-
onClick:
|
|
55
|
-
onRemoveChoice:
|
|
56
|
-
onEditChoice:
|
|
57
|
-
value:
|
|
52
|
+
correct: i.bool.isRequired,
|
|
53
|
+
onClick: i.func.isRequired,
|
|
54
|
+
onRemoveChoice: i.func.isRequired,
|
|
55
|
+
onEditChoice: i.func.isRequired,
|
|
56
|
+
value: i.string.isRequired
|
|
58
57
|
};
|
|
59
58
|
onRemoveClick = (e) => {
|
|
60
59
|
let { onRemoveChoice: t } = this.props;
|
|
@@ -115,20 +114,20 @@ var _ = u("div")(({ theme: e }) => ({
|
|
|
115
114
|
}), O = u("div")(({ theme: e }) => ({
|
|
116
115
|
padding: e.spacing(.5),
|
|
117
116
|
position: "relative"
|
|
118
|
-
})), k = class extends
|
|
117
|
+
})), k = class extends t.Component {
|
|
119
118
|
static propTypes = {
|
|
120
|
-
node:
|
|
121
|
-
pos:
|
|
122
|
-
uploadSoundSupport:
|
|
123
|
-
onDone:
|
|
124
|
-
choices:
|
|
125
|
-
onAddChoice:
|
|
126
|
-
editorCallback:
|
|
127
|
-
onRemoveChoice:
|
|
128
|
-
onSelectChoice:
|
|
129
|
-
onToolbarDone:
|
|
130
|
-
editor:
|
|
131
|
-
spellCheck:
|
|
119
|
+
node: i.object,
|
|
120
|
+
pos: i.number,
|
|
121
|
+
uploadSoundSupport: i.object,
|
|
122
|
+
onDone: i.func,
|
|
123
|
+
choices: i.array,
|
|
124
|
+
onAddChoice: i.func.isRequired,
|
|
125
|
+
editorCallback: i.func,
|
|
126
|
+
onRemoveChoice: i.func.isRequired,
|
|
127
|
+
onSelectChoice: i.func.isRequired,
|
|
128
|
+
onToolbarDone: i.func.isRequired,
|
|
129
|
+
editor: i.object,
|
|
130
|
+
spellCheck: i.bool
|
|
132
131
|
};
|
|
133
132
|
clickedInside = !1;
|
|
134
133
|
preventDone = !1;
|
|
@@ -148,7 +147,7 @@ var _ = u("div")(({ theme: e }) => ({
|
|
|
148
147
|
}
|
|
149
148
|
}
|
|
150
149
|
componentDidUpdate() {
|
|
151
|
-
|
|
150
|
+
n(r.findDOMNode(this));
|
|
152
151
|
}
|
|
153
152
|
componentWillUnmount() {
|
|
154
153
|
this.commitPendingEdit();
|
|
@@ -164,17 +163,17 @@ var _ = u("div")(({ theme: e }) => ({
|
|
|
164
163
|
let { editor: e } = this.props, { tr: t } = e.state;
|
|
165
164
|
t.isDone = !0, e.view.dispatch(t);
|
|
166
165
|
};
|
|
167
|
-
onDone = (
|
|
168
|
-
let { choices:
|
|
169
|
-
s >= 0 &&
|
|
166
|
+
onDone = (e) => {
|
|
167
|
+
let { choices: t, node: n, editor: r, onAddChoice: i, onToolbarDone: o } = this.props, { editedChoiceIndex: s } = this.state, c = C(e).textContent.trim();
|
|
168
|
+
s >= 0 && t?.[s]?.correct && r.commands.updateAttributes("inline_dropdown", { value: e }), a(c) || (i(n.attrs.index, e, s), r.commands.refreshResponseArea()), this.setState({ editedChoiceIndex: -1 });
|
|
170
169
|
};
|
|
171
170
|
onSelectChoice = (e, t) => {
|
|
172
171
|
let { node: n, editor: r, onToolbarDone: i, onSelectChoice: a } = this.props;
|
|
173
172
|
r.commands.updateAttributes("inline_dropdown", { value: e }), a(t), r.commands.refreshResponseArea();
|
|
174
173
|
};
|
|
175
|
-
onRemoveChoice = (e,
|
|
176
|
-
let { node:
|
|
177
|
-
|
|
174
|
+
onRemoveChoice = (e, t) => {
|
|
175
|
+
let { node: n, editor: r, onToolbarDone: i, onRemoveChoice: a } = this.props;
|
|
176
|
+
o(e, n.attrs.value) && r.commands.updateAttributes("inline_dropdown", { value: null }), a(t), r.commands.refreshResponseArea();
|
|
178
177
|
};
|
|
179
178
|
onEditChoice = (e, t) => {
|
|
180
179
|
let { editedChoiceIndex: n } = this.state;
|
|
@@ -207,7 +206,7 @@ var _ = u("div")(({ theme: e }) => ({
|
|
|
207
206
|
this.clickedInside = !0;
|
|
208
207
|
};
|
|
209
208
|
render() {
|
|
210
|
-
let { choices:
|
|
209
|
+
let { choices: t, spellCheck: n, uploadSoundSupport: r, mathMlOptions: i = {}, baseInputConfiguration: a = {}, responseAreaInputConfiguration: o = {} } = this.props, { respAreaMarkup: s, toolbarStyle: u } = this.state;
|
|
211
210
|
return u ? /* @__PURE__ */ l(w, {
|
|
212
211
|
"data-inline-dropdown-toolbar": "",
|
|
213
212
|
style: {
|
|
@@ -246,8 +245,8 @@ var _ = u("div")(({ theme: e }) => ({
|
|
|
246
245
|
e.relatedTarget && (this.preventDone = t || n, (t || n) && (this.clickedInside = !0)), this.onBlur();
|
|
247
246
|
},
|
|
248
247
|
placeholder: "Add Choice",
|
|
249
|
-
pluginProps:
|
|
250
|
-
spellCheck:
|
|
248
|
+
pluginProps: e(o?.inputConfiguration, a),
|
|
249
|
+
spellCheck: n,
|
|
251
250
|
uploadSoundSupport: r,
|
|
252
251
|
mathMlOptions: i
|
|
253
252
|
}), /* @__PURE__ */ c(E, {
|
|
@@ -255,7 +254,7 @@ var _ = u("div")(({ theme: e }) => ({
|
|
|
255
254
|
size: "small",
|
|
256
255
|
"aria-label": "Add",
|
|
257
256
|
children: /* @__PURE__ */ c(f, { fontSize: "inherit" })
|
|
258
|
-
})] }),
|
|
257
|
+
})] }), t && /* @__PURE__ */ c(D, { children: t.map(({ label: e, correct: t }, n) => /* @__PURE__ */ c(S, {
|
|
259
258
|
onClick: () => this.onSelectChoice(e, n),
|
|
260
259
|
onRemoveChoice: () => this.onRemoveChoice(e, n),
|
|
261
260
|
onEditChoice: () => this.onEditChoice(e, n),
|
package/dist/author/main.js
CHANGED
|
@@ -1,16 +1,11 @@
|
|
|
1
|
-
import e from "
|
|
2
|
-
import t from "
|
|
3
|
-
import n from "
|
|
4
|
-
import r from "
|
|
5
|
-
import i from "
|
|
6
|
-
import a from "
|
|
7
|
-
import
|
|
8
|
-
import s from "
|
|
9
|
-
import c from "./response-area.js";
|
|
10
|
-
import l from "react";
|
|
11
|
-
import { renderMath as u } from "@pie-element/shared-math-rendering-mathjax";
|
|
12
|
-
import d from "react-dom";
|
|
13
|
-
import f from "prop-types";
|
|
1
|
+
import { generateValidationMessage as e } from "./utils.js";
|
|
2
|
+
import t from "./inline-dropdown-toolbar.js";
|
|
3
|
+
import n from "./response-area.js";
|
|
4
|
+
import r from "react";
|
|
5
|
+
import { renderMath as i } from "@pie-element/shared-math-rendering-mathjax";
|
|
6
|
+
import a from "react-dom";
|
|
7
|
+
import o from "prop-types";
|
|
8
|
+
import { cloneDeep as s, isEmpty as c, isEqual as l, isUndefined as u, max as d, reduce as f } from "@pie-element/shared-lodash";
|
|
14
9
|
import { color as p } from "@pie-lib/render-ui";
|
|
15
10
|
import { jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
16
11
|
import { styled as g } from "@mui/material/styles";
|
|
@@ -62,33 +57,33 @@ var { toggle: D, Panel: ie, dropdown: ae } = x, O = g(b)(({ theme: e }) => ({
|
|
|
62
57
|
})), F = (e) => {
|
|
63
58
|
let t = document.createElement("div");
|
|
64
59
|
return t.innerHTML = (e || "").trim(), t;
|
|
65
|
-
}, I = class extends
|
|
60
|
+
}, I = class extends r.Component {
|
|
66
61
|
static propTypes = {
|
|
67
|
-
configuration:
|
|
68
|
-
model:
|
|
69
|
-
disableSidePanel:
|
|
70
|
-
onModelChanged:
|
|
71
|
-
onConfigurationChanged:
|
|
72
|
-
imageSupport:
|
|
73
|
-
add:
|
|
74
|
-
delete:
|
|
62
|
+
configuration: o.object.isRequired,
|
|
63
|
+
model: o.object.isRequired,
|
|
64
|
+
disableSidePanel: o.bool,
|
|
65
|
+
onModelChanged: o.func.isRequired,
|
|
66
|
+
onConfigurationChanged: o.func.isRequired,
|
|
67
|
+
imageSupport: o.shape({
|
|
68
|
+
add: o.func.isRequired,
|
|
69
|
+
delete: o.func.isRequired
|
|
75
70
|
}),
|
|
76
|
-
uploadSoundSupport:
|
|
77
|
-
add:
|
|
78
|
-
delete:
|
|
71
|
+
uploadSoundSupport: o.shape({
|
|
72
|
+
add: o.func.isRequired,
|
|
73
|
+
delete: o.func.isRequired
|
|
79
74
|
})
|
|
80
75
|
};
|
|
81
76
|
state = { warning: { open: !1 } };
|
|
82
77
|
componentDidMount() {
|
|
83
|
-
let { model: { choices:
|
|
84
|
-
this.setState({ respAreaChoices: e
|
|
78
|
+
let { model: { choices: e } } = this.props;
|
|
79
|
+
this.setState({ respAreaChoices: s(e) });
|
|
85
80
|
}
|
|
86
|
-
UNSAFE_componentWillReceiveProps(
|
|
87
|
-
let
|
|
88
|
-
(!
|
|
81
|
+
UNSAFE_componentWillReceiveProps(e) {
|
|
82
|
+
let t = {};
|
|
83
|
+
(!l(e.model.choices, this.props.model.choices) || !l(e.model.choices, this.state.respAreaChoices)) && (t.respAreaChoices = s(e.model.choices)), c(t) || this.setState(t);
|
|
89
84
|
}
|
|
90
85
|
componentDidUpdate() {
|
|
91
|
-
|
|
86
|
+
i(a.findDOMNode(this));
|
|
92
87
|
}
|
|
93
88
|
onModelChange = (e) => {
|
|
94
89
|
this.props.onModelChanged({
|
|
@@ -134,22 +129,22 @@ var { toggle: D, Panel: ie, dropdown: ae } = x, O = g(b)(({ theme: e }) => ({
|
|
|
134
129
|
delete n._holdInlineDropdownToolbarIndex, y(n, o, t), r();
|
|
135
130
|
}, i);
|
|
136
131
|
};
|
|
137
|
-
onChange = (
|
|
138
|
-
let { respAreaChoices:
|
|
139
|
-
|
|
140
|
-
|
|
132
|
+
onChange = (e) => {
|
|
133
|
+
let { respAreaChoices: t } = this.state, n = F(e), r = n.querySelectorAll("[data-type=\"inline_dropdown\"]"), i = {};
|
|
134
|
+
r.forEach((e) => {
|
|
135
|
+
i[e.dataset.index] = e.dataset.value || "";
|
|
141
136
|
});
|
|
142
|
-
let
|
|
143
|
-
|
|
144
|
-
let n =
|
|
145
|
-
n && (
|
|
137
|
+
let a = f(t, (e, n, r) => (u(i[r]) || (e[r] = t[r]), e), {}), o = {};
|
|
138
|
+
r.forEach((e, t) => {
|
|
139
|
+
let n = a[e.dataset.index];
|
|
140
|
+
n && (o[t] = n), e.dataset.index = t;
|
|
146
141
|
}), this.onModelChange({
|
|
147
|
-
choices:
|
|
148
|
-
slateMarkup:
|
|
142
|
+
choices: s(o),
|
|
143
|
+
slateMarkup: n.innerHTML
|
|
149
144
|
});
|
|
150
145
|
};
|
|
151
|
-
onAddChoice = (t, n
|
|
152
|
-
let { respAreaChoices:
|
|
146
|
+
onAddChoice = (e, t, n) => {
|
|
147
|
+
let { respAreaChoices: r } = this.state, { maxResponseAreaChoices: i } = this.props.configuration, a = (e) => this.setState({ warning: {
|
|
153
148
|
open: !0,
|
|
154
149
|
text: e,
|
|
155
150
|
onClose: void 0,
|
|
@@ -157,38 +152,38 @@ var { toggle: D, Panel: ie, dropdown: ae } = x, O = g(b)(({ theme: e }) => ({
|
|
|
157
152
|
this.setState({ warning: { open: !1 } });
|
|
158
153
|
}
|
|
159
154
|
} });
|
|
160
|
-
if (
|
|
161
|
-
|
|
155
|
+
if (r[e] && r[e].length >= i) {
|
|
156
|
+
a(`There are only ${i} answers allowed per choice.`);
|
|
162
157
|
return;
|
|
163
158
|
}
|
|
164
|
-
if (
|
|
165
|
-
|
|
159
|
+
if (r[e] || (r[e] = []), (r[e] || []).find((e, r) => e.label === t && r !== n)) {
|
|
160
|
+
a("Duplicate answers are not allowed.");
|
|
166
161
|
return;
|
|
167
162
|
}
|
|
168
|
-
if (
|
|
163
|
+
if (n >= 0 && r[e]?.[n]) r[e][n].label = t;
|
|
169
164
|
else {
|
|
170
|
-
let
|
|
171
|
-
|
|
172
|
-
label:
|
|
173
|
-
value: `${
|
|
165
|
+
let n = r[e] && d(r[e].map((e) => parseInt(e.value)).filter((e) => !isNaN(e))) || 0;
|
|
166
|
+
r[e].push({
|
|
167
|
+
label: t,
|
|
168
|
+
value: `${n + 1}`,
|
|
174
169
|
correct: !1
|
|
175
170
|
});
|
|
176
171
|
}
|
|
177
|
-
this.onModelChange({ choices:
|
|
172
|
+
this.onModelChange({ choices: s(r) });
|
|
178
173
|
};
|
|
179
|
-
onRemoveChoice = (
|
|
180
|
-
let { respAreaChoices:
|
|
181
|
-
|
|
174
|
+
onRemoveChoice = (e, t) => {
|
|
175
|
+
let { respAreaChoices: n } = this.state;
|
|
176
|
+
n[e].splice(t, 1), this.onModelChange({ choices: s(n) });
|
|
182
177
|
};
|
|
183
|
-
onSelectChoice = (
|
|
184
|
-
let { respAreaChoices:
|
|
185
|
-
|
|
178
|
+
onSelectChoice = (e, t) => {
|
|
179
|
+
let { respAreaChoices: n } = this.state;
|
|
180
|
+
n[e] = n[e].map((e, n) => ({
|
|
186
181
|
...e,
|
|
187
|
-
correct:
|
|
188
|
-
})), this.onModelChange({ choices:
|
|
182
|
+
correct: n === t
|
|
183
|
+
})), this.onModelChange({ choices: s(n) });
|
|
189
184
|
};
|
|
190
185
|
render() {
|
|
191
|
-
let { warning:
|
|
186
|
+
let { warning: i } = this.state, { model: a, configuration: o, onConfigurationChanged: s, imageSupport: c, uploadSoundSupport: l } = this.props, { baseInputConfiguration: u = {}, choiceRationale: d = {}, contentDimensions: f = {}, lockChoiceOrder: p = {}, maxResponseAreas: g, maxImageWidth: y = {}, maxImageHeight: b = {}, partialScoring: x = {}, prompt: S = {}, rationale: C = {}, settingsPanelDisabled: T, spellCheck: F = {}, teacherInstructions: I = {}, template: ce = {}, withRubric: L = {}, mathMlOptions: R = {}, language: z = {}, languageChoices: B = {}, responseAreaInputConfiguration: V = {} } = o || {}, { choiceRationaleEnabled: H, choices: U, errors: W, extraCSSRules: le, promptEnabled: ue, rationaleEnabled: de, spellCheckEnabled: G, teacherInstructionsEnabled: fe, toolbarEditorPosition: pe } = a || {}, { prompt: K, rationale: q, responseAreasError: J, responseAreaChoicesError: me, teacherInstructions: Y } = W || {}, X = y && y.prompt, Z = b && b.prompt, he = () => (Object.keys(U) || []).map((e, t) => /* @__PURE__ */ m(A, { children: /* @__PURE__ */ h(w, {
|
|
192
187
|
slotProps: { transition: { timeout: {
|
|
193
188
|
enter: 225,
|
|
194
189
|
exit: 195
|
|
@@ -199,7 +194,7 @@ var { toggle: D, Panel: ie, dropdown: ae } = x, O = g(b)(({ theme: e }) => ({
|
|
|
199
194
|
component: "div",
|
|
200
195
|
children: `Rationale for response area #${t + 1}`
|
|
201
196
|
})
|
|
202
|
-
}), /* @__PURE__ */ m(j, { children: (U[e] || []).map((t) => /* @__PURE__ */ h(
|
|
197
|
+
}), /* @__PURE__ */ m(j, { children: (U[e] || []).map((t) => /* @__PURE__ */ h(r.Fragment, { children: [/* @__PURE__ */ m(se, { dangerouslySetInnerHTML: { __html: `${C.label} for ${t.label} (${t.correct ? "correct" : "incorrect"})` } }), /* @__PURE__ */ m(oe, { children: /* @__PURE__ */ m(_, {
|
|
203
198
|
markup: t.rationale || "",
|
|
204
199
|
spellCheck: G,
|
|
205
200
|
pluginProps: $(C?.inputConfiguration),
|
|
@@ -207,13 +202,13 @@ var { toggle: D, Panel: ie, dropdown: ae } = x, O = g(b)(({ theme: e }) => ({
|
|
|
207
202
|
...t,
|
|
208
203
|
rationale: n
|
|
209
204
|
}),
|
|
210
|
-
imageSupport:
|
|
205
|
+
imageSupport: c,
|
|
211
206
|
maxImageWidth: y && y.rationale || X,
|
|
212
207
|
maxImageHeight: b && b.rationale || Z,
|
|
213
|
-
uploadSoundSupport:
|
|
208
|
+
uploadSoundSupport: l,
|
|
214
209
|
mathMlOptions: R
|
|
215
210
|
}) })] }, t.label)) })]
|
|
216
|
-
}) }, e)), Q = { position: pe === "top" ? "top" : "bottom" }, ge = o
|
|
211
|
+
}) }, e)), Q = { position: pe === "top" ? "top" : "bottom" }, ge = e(o), _e = {
|
|
217
212
|
partialScoring: x.settings && D(x.label),
|
|
218
213
|
lockChoiceOrder: p.settings && D(p.label),
|
|
219
214
|
"language.enabled": z.settings && D(z.label, !0),
|
|
@@ -237,10 +232,10 @@ var { toggle: D, Panel: ie, dropdown: ae } = x, O = g(b)(({ theme: e }) => ({
|
|
|
237
232
|
dimensions: f,
|
|
238
233
|
hideSettings: T,
|
|
239
234
|
settings: /* @__PURE__ */ m(ie, {
|
|
240
|
-
model:
|
|
241
|
-
configuration:
|
|
235
|
+
model: a,
|
|
236
|
+
configuration: o,
|
|
242
237
|
onChangeModel: (e) => this.onModelChange(e),
|
|
243
|
-
onChangeConfiguration: (e) =>
|
|
238
|
+
onChangeConfiguration: (e) => s(e, !0),
|
|
244
239
|
groups: {
|
|
245
240
|
Settings: _e,
|
|
246
241
|
Properties: ve
|
|
@@ -250,9 +245,9 @@ var { toggle: D, Panel: ie, dropdown: ae } = x, O = g(b)(({ theme: e }) => ({
|
|
|
250
245
|
fe && /* @__PURE__ */ h(O, {
|
|
251
246
|
label: I.label,
|
|
252
247
|
children: [/* @__PURE__ */ m(_, {
|
|
253
|
-
markup:
|
|
248
|
+
markup: a.teacherInstructions || "",
|
|
254
249
|
onChange: this.onTeacherInstructionsChanged,
|
|
255
|
-
imageSupport:
|
|
250
|
+
imageSupport: c,
|
|
256
251
|
nonEmpty: !1,
|
|
257
252
|
error: Y,
|
|
258
253
|
toolbarOpts: Q,
|
|
@@ -260,7 +255,7 @@ var { toggle: D, Panel: ie, dropdown: ae } = x, O = g(b)(({ theme: e }) => ({
|
|
|
260
255
|
spellCheck: G,
|
|
261
256
|
maxImageWidth: y && y.teacherInstructions || X,
|
|
262
257
|
maxImageHeight: b && b.teacherInstructions || Z,
|
|
263
|
-
uploadSoundSupport:
|
|
258
|
+
uploadSoundSupport: l,
|
|
264
259
|
languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
|
|
265
260
|
mathMlOptions: R
|
|
266
261
|
}), Y && /* @__PURE__ */ m(P, { children: Y })]
|
|
@@ -268,9 +263,9 @@ var { toggle: D, Panel: ie, dropdown: ae } = x, O = g(b)(({ theme: e }) => ({
|
|
|
268
263
|
ue && /* @__PURE__ */ h(O, {
|
|
269
264
|
label: S.label,
|
|
270
265
|
children: [/* @__PURE__ */ m(_, {
|
|
271
|
-
markup:
|
|
266
|
+
markup: a.prompt,
|
|
272
267
|
onChange: this.onPromptChanged,
|
|
273
|
-
imageSupport:
|
|
268
|
+
imageSupport: c,
|
|
274
269
|
nonEmpty: !1,
|
|
275
270
|
disableUnderline: !0,
|
|
276
271
|
error: K,
|
|
@@ -279,7 +274,7 @@ var { toggle: D, Panel: ie, dropdown: ae } = x, O = g(b)(({ theme: e }) => ({
|
|
|
279
274
|
spellCheck: G,
|
|
280
275
|
maxImageWidth: X,
|
|
281
276
|
maxImageHeight: Z,
|
|
282
|
-
uploadSoundSupport:
|
|
277
|
+
uploadSoundSupport: l,
|
|
283
278
|
languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
|
|
284
279
|
mathMlOptions: R
|
|
285
280
|
}), K && /* @__PURE__ */ m(P, { children: K })]
|
|
@@ -297,7 +292,7 @@ var { toggle: D, Panel: ie, dropdown: ae } = x, O = g(b)(({ theme: e }) => ({
|
|
|
297
292
|
color: "primary"
|
|
298
293
|
})
|
|
299
294
|
})] }),
|
|
300
|
-
/* @__PURE__ */ m(
|
|
295
|
+
/* @__PURE__ */ m(n, {
|
|
301
296
|
responseAreasError: J,
|
|
302
297
|
responseAreaChoicesError: me,
|
|
303
298
|
editableHtmlProps: {
|
|
@@ -315,20 +310,20 @@ var { toggle: D, Panel: ie, dropdown: ae } = x, O = g(b)(({ theme: e }) => ({
|
|
|
315
310
|
onToolbarCloseRequest: ([e, t], n, r, i) => {
|
|
316
311
|
this.validateResponseAreaClose(e, t, n, r, i);
|
|
317
312
|
},
|
|
318
|
-
respAreaToolbar: (e,
|
|
319
|
-
let [
|
|
320
|
-
return (e) => /* @__PURE__ */ m(
|
|
313
|
+
respAreaToolbar: (e, n, r) => {
|
|
314
|
+
let [i, a] = e, { respAreaChoices: o } = this.state;
|
|
315
|
+
return (e) => /* @__PURE__ */ m(t, {
|
|
321
316
|
...e,
|
|
322
317
|
onAddChoice: this.onAddChoice,
|
|
323
|
-
onRemoveChoice: (e) => this.onRemoveChoice(
|
|
324
|
-
onSelectChoice: (e) => this.onSelectChoice(
|
|
325
|
-
node:
|
|
326
|
-
pos:
|
|
327
|
-
editor:
|
|
328
|
-
onToolbarDone:
|
|
329
|
-
choices: o[
|
|
318
|
+
onRemoveChoice: (e) => this.onRemoveChoice(i.attrs.index, e),
|
|
319
|
+
onSelectChoice: (e) => this.onSelectChoice(i.attrs.index, e),
|
|
320
|
+
node: i,
|
|
321
|
+
pos: a,
|
|
322
|
+
editor: n,
|
|
323
|
+
onToolbarDone: r,
|
|
324
|
+
choices: o[i.attrs.index],
|
|
330
325
|
spellCheck: G,
|
|
331
|
-
uploadSoundSupport:
|
|
326
|
+
uploadSoundSupport: l,
|
|
332
327
|
mathMlOptions: R,
|
|
333
328
|
baseInputConfiguration: u,
|
|
334
329
|
responseAreaInputConfiguration: V
|
|
@@ -336,14 +331,14 @@ var { toggle: D, Panel: ie, dropdown: ae } = x, O = g(b)(({ theme: e }) => ({
|
|
|
336
331
|
}
|
|
337
332
|
},
|
|
338
333
|
spellCheck: G,
|
|
339
|
-
markup:
|
|
334
|
+
markup: a.slateMarkup || "",
|
|
340
335
|
onChange: this.onChange,
|
|
341
|
-
imageSupport:
|
|
336
|
+
imageSupport: c,
|
|
342
337
|
disableImageAlignmentButtons: !0,
|
|
343
338
|
disabled: !1,
|
|
344
339
|
highlightShape: !1,
|
|
345
340
|
error: J,
|
|
346
|
-
uploadSoundSupport:
|
|
341
|
+
uploadSoundSupport: l,
|
|
347
342
|
languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
|
|
348
343
|
mathMlOptions: R
|
|
349
344
|
}
|
|
@@ -352,26 +347,26 @@ var { toggle: D, Panel: ie, dropdown: ae } = x, O = g(b)(({ theme: e }) => ({
|
|
|
352
347
|
de && /* @__PURE__ */ h(O, {
|
|
353
348
|
label: C.label,
|
|
354
349
|
children: [/* @__PURE__ */ m(_, {
|
|
355
|
-
markup:
|
|
350
|
+
markup: a.rationale || "",
|
|
356
351
|
onChange: this.onRationaleChanged,
|
|
357
|
-
imageSupport:
|
|
352
|
+
imageSupport: c,
|
|
358
353
|
error: q,
|
|
359
354
|
toolbarOpts: Q,
|
|
360
355
|
pluginProps: $(C?.inputConfiguration),
|
|
361
356
|
spellCheck: G,
|
|
362
357
|
maxImageWidth: y && y.rationale || X,
|
|
363
358
|
maxImageHeight: b && b.rationale || Z,
|
|
364
|
-
uploadSoundSupport:
|
|
359
|
+
uploadSoundSupport: l,
|
|
365
360
|
languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
|
|
366
361
|
mathMlOptions: R
|
|
367
362
|
}), q && /* @__PURE__ */ m(P, { children: q })]
|
|
368
363
|
}),
|
|
369
364
|
/* @__PURE__ */ m(ee, {
|
|
370
|
-
open:
|
|
365
|
+
open: i.open,
|
|
371
366
|
title: "Warning",
|
|
372
|
-
text:
|
|
373
|
-
onClose:
|
|
374
|
-
onConfirm:
|
|
367
|
+
text: i.text,
|
|
368
|
+
onClose: i.onClose,
|
|
369
|
+
onConfirm: i.onConfirm,
|
|
375
370
|
disableAutoFocus: !0,
|
|
376
371
|
disableEnforceFocus: !0,
|
|
377
372
|
disableRestoreFocus: !0
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import e from "
|
|
1
|
+
import { escape as e } from "@pie-element/shared-lodash";
|
|
2
2
|
//#region src/author/markupUtils.tsx
|
|
3
3
|
var t = "imes|riangle|an|heta|herefore", n = "throot|parallel|cong|approx|eq|e|sim", r = RegExp(`(\\t(?!${t}))|(\\n(?!${n}))|(\\\\t(?!${t}))|(\\\\n(?!${n}))`, "g"), i = (e) => e.replace(r, "").replace(/\\"/g, "\"").replace(/\\\//g, "/"), a = (e) => {
|
|
4
4
|
let t = document.createElement("div");
|