@pie-element/inline-dropdown 10.1.1 → 10.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/defaults.d.ts +194 -0
- package/dist/author/defaults.js +130 -0
- package/dist/author/index.d.ts +43 -0
- package/dist/author/index.js +83 -0
- package/dist/author/inline-dropdown-toolbar.d.ts +48 -0
- package/dist/author/inline-dropdown-toolbar.js +269 -0
- package/dist/author/main.d.ts +49 -0
- package/dist/author/main.js +384 -0
- package/dist/author/markupUtils.d.ts +12 -0
- package/dist/author/markupUtils.js +23 -0
- package/dist/author/response-area.d.ts +20 -0
- package/dist/author/response-area.js +32 -0
- package/dist/author/utils.d.ts +10 -0
- package/dist/author/utils.js +10 -0
- package/dist/browser/Close-CMvmRhfL.js +9015 -0
- package/dist/browser/Close-CMvmRhfL.js.map +1 -0
- package/dist/browser/author/index.js +41184 -0
- package/dist/browser/author/index.js.map +1 -0
- package/dist/browser/controller/index.js +215 -0
- package/dist/browser/controller/index.js.map +1 -0
- package/dist/browser/delivery/index.js +2714 -0
- package/dist/browser/delivery/index.js.map +1 -0
- package/dist/browser/inline-dropdown.css +2 -0
- package/dist/browser/isEmpty-BAznrYT5.js +433 -0
- package/dist/browser/isEmpty-BAznrYT5.js.map +1 -0
- package/dist/browser/reduce-2sGcZtv4.js +446 -0
- package/dist/browser/reduce-2sGcZtv4.js.map +1 -0
- package/dist/controller/defaults.d.ts +27 -0
- package/dist/controller/defaults.js +21 -0
- package/dist/controller/index.d.ts +54 -0
- package/dist/controller/index.js +126 -0
- package/dist/controller/utils.d.ts +12 -0
- package/dist/controller/utils.js +13 -0
- package/dist/delivery/index.d.ts +20 -0
- package/dist/delivery/index.js +60 -0
- package/dist/delivery/inline-dropdown.d.ts +38 -0
- package/dist/delivery/inline-dropdown.js +109 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.iife.d.ts +8 -0
- package/dist/index.iife.js +148 -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/_arrayReduce.js +8 -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/_baseEach.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseExtremum.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseFor.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseForOwn.js +8 -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/_baseGt.js +6 -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/_baseIsMatch.js +26 -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/_baseIteratee.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/_baseMap.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMatches.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMatchesProperty.js +17 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseProperty.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_basePropertyDeep.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_basePropertyOf.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseReduce.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseRest.js +9 -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/_castFunction.js +7 -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/_createBaseEach.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createBaseFor.js +12 -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/_escapeHtmlChar.js +11 -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/_getMatchData.js +16 -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/_isIndex.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIterateeCall.js +12 -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/_isStrictComparable.js +7 -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/_matchesStrictComparable.js +8 -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/defaults.js +16 -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/escape.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/forEach.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/get.js +8 -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/isUndefined.js +6 -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/map.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/max.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/property.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/reduce.js +12 -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 +79 -18
- package/CHANGELOG.json +0 -1082
- package/CHANGELOG.md +0 -2185
- package/LICENSE.md +0 -5
- package/README.md +0 -1
- package/configure/CHANGELOG.json +0 -647
- package/configure/CHANGELOG.md +0 -1942
- package/configure/lib/defaults.js +0 -192
- package/configure/lib/defaults.js.map +0 -1
- package/configure/lib/index.js +0 -135
- package/configure/lib/index.js.map +0 -1
- package/configure/lib/inline-dropdown-toolbar.js +0 -457
- package/configure/lib/inline-dropdown-toolbar.js.map +0 -1
- package/configure/lib/main.js +0 -603
- package/configure/lib/main.js.map +0 -1
- package/configure/lib/markupUtils.js +0 -50
- package/configure/lib/markupUtils.js.map +0 -1
- package/configure/lib/response-area.js +0 -48
- package/configure/lib/response-area.js.map +0 -1
- package/configure/lib/utils.js +0 -22
- package/configure/lib/utils.js.map +0 -1
- package/configure/package.json +0 -24
- package/controller/CHANGELOG.json +0 -467
- package/controller/CHANGELOG.md +0 -1283
- package/controller/lib/defaults.js +0 -25
- package/controller/lib/defaults.js.map +0 -1
- package/controller/lib/index.js +0 -295
- package/controller/lib/index.js.map +0 -1
- package/controller/lib/utils.js +0 -32
- package/controller/lib/utils.js.map +0 -1
- package/controller/package.json +0 -16
- package/docs/config-schema.json +0 -2854
- package/docs/config-schema.json.md +0 -2106
- package/docs/demo/config.js +0 -8
- package/docs/demo/generate.js +0 -76
- package/docs/demo/index.html +0 -1
- package/docs/demo/session.js +0 -11
- package/docs/pie-schema.json +0 -1152
- package/docs/pie-schema.json.md +0 -814
- package/lib/index.js +0 -85
- package/lib/index.js.map +0 -1
- package/lib/inline-dropdown.js +0 -176
- package/lib/inline-dropdown.js.map +0 -1
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/inline-dropdown/controller/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 declare const normalize: (question: any) => any;
|
|
10
|
+
/**
|
|
11
|
+
*
|
|
12
|
+
* @param {*} question
|
|
13
|
+
* @param {*} session
|
|
14
|
+
* @param {*} env
|
|
15
|
+
* @param {*} updateSession - optional - a function that will set the properties passed into it on the session.
|
|
16
|
+
*/
|
|
17
|
+
export declare function model(question: any, session: any, env: any, updateSession: any): Promise<{
|
|
18
|
+
disabled: boolean;
|
|
19
|
+
mode: any;
|
|
20
|
+
prompt: any;
|
|
21
|
+
displayType: any;
|
|
22
|
+
markup: any;
|
|
23
|
+
choices: any;
|
|
24
|
+
feedback: {};
|
|
25
|
+
responseCorrect: boolean | undefined;
|
|
26
|
+
rationale: any;
|
|
27
|
+
teacherInstructions: any;
|
|
28
|
+
language: any;
|
|
29
|
+
extraCSSRules: any;
|
|
30
|
+
}>;
|
|
31
|
+
export declare const getScore: (config: any, session: any) => number;
|
|
32
|
+
/**
|
|
33
|
+
* Generates detailed trace log for scoring evaluation
|
|
34
|
+
* @param {Object} model - the question model
|
|
35
|
+
* @param {Object} session - the student session
|
|
36
|
+
* @param {Object} env - the environment
|
|
37
|
+
* @returns {Array} traceLog - array of trace messages
|
|
38
|
+
*/
|
|
39
|
+
export declare const getLogTrace: (model: any, session: any, env: any) => string[];
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* The score is partial by default for checkbox mode, allOrNothing for radio mode.
|
|
43
|
+
* To disable partial scoring for checkbox mode you either set model.partialScoring = false or env.partialScoring =
|
|
44
|
+
* false. the value in `env` will override the value in `model`.
|
|
45
|
+
* @param {Object} model - the main model
|
|
46
|
+
* @param {boolean} model.partialScoring - is partial scoring enabled (if undefined set to to true)
|
|
47
|
+
* @param {*} session
|
|
48
|
+
* @param {Object} env
|
|
49
|
+
* @param {boolean} env.partialScoring - is partial scoring enabled (if undefined default to true) This overrides
|
|
50
|
+
* `model.partialScoring`.
|
|
51
|
+
*/
|
|
52
|
+
export declare function outcome(model: any, session: any, env?: {}): Promise<unknown>;
|
|
53
|
+
export declare const createCorrectResponseSession: (question: any, env: any) => Promise<unknown>;
|
|
54
|
+
export declare const validate: (model?: {}, config?: {}) => {};
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import e from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/map.js";
|
|
2
|
+
import t from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.js";
|
|
3
|
+
import n from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/reduce.js";
|
|
4
|
+
import r from "./defaults.js";
|
|
5
|
+
import { getAllCorrectResponses as i } from "./utils.js";
|
|
6
|
+
import { getShuffledChoices as a, lockChoices as o, partialScoring as s } from "@pie-element/shared-controller-utils";
|
|
7
|
+
//#region src/controller/index.ts
|
|
8
|
+
var c = (e) => e ? "correct" : "incorrect", l = (e) => ({
|
|
9
|
+
...r,
|
|
10
|
+
...e
|
|
11
|
+
});
|
|
12
|
+
async function u(r, s, u, f) {
|
|
13
|
+
let p = l(r), { value: m = {} } = s || {}, h = n(p.choices, (t, n, r) => (t[r] = e(n, (e) => e), t), {}), g = {};
|
|
14
|
+
if (u.mode === "evaluate") {
|
|
15
|
+
let e = i(p), t = Object.keys(e).length, r = 0;
|
|
16
|
+
for (let i = 0; i < t; i++) {
|
|
17
|
+
let a = n(e, (e, t, n) => {
|
|
18
|
+
let r = m && m[n] || "", a = t[i] || "", o = r && a && a === r;
|
|
19
|
+
return e.feedback[n] = c(o), o && (e.correctResponses += 1), e;
|
|
20
|
+
}, {
|
|
21
|
+
correctResponses: 0,
|
|
22
|
+
feedback: {}
|
|
23
|
+
});
|
|
24
|
+
if (a.correctResponses >= r && (r = a.correctResponses, g = a.feedback), a.correctResponses === t) break;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
if (!o(p, s, u)) {
|
|
28
|
+
let e = {}, n = Object.keys(h), r = (t) => (n, r, i) => new Promise((n) => {
|
|
29
|
+
e[t] = i.shuffledValues, n();
|
|
30
|
+
}), i;
|
|
31
|
+
for (i = 0; i < n.length; i++) {
|
|
32
|
+
let e = n[i], t = s?.shuffledValues?.[e];
|
|
33
|
+
h[e] = await a(h[e], { shuffledValues: Array.isArray(t) ? t : [] }, r(e), "value");
|
|
34
|
+
}
|
|
35
|
+
t(e) || s && f && typeof f == "function" && f(s.id, s.element, { shuffledValues: e }).catch((e) => {
|
|
36
|
+
console.error("update session failed", e);
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
let _ = null, v = null, y = (Object.keys(h) || []).reduce((e, t) => (e[t] = (h[t] || []).map((e) => ({
|
|
40
|
+
...e,
|
|
41
|
+
rationale: null
|
|
42
|
+
})), e), {});
|
|
43
|
+
return u.role === "instructor" && (u.mode === "view" || u.mode === "evaluate") ? (v = p.rationaleEnabled ? p.rationale : null, _ = p.teacherInstructionsEnabled ? p.teacherInstructions : null, h = p.choiceRationaleEnabled ? p.choices : y) : (v = null, _ = null, h = y), {
|
|
44
|
+
disabled: u.mode !== "gather",
|
|
45
|
+
mode: u.mode,
|
|
46
|
+
prompt: p.promptEnabled ? p.prompt : null,
|
|
47
|
+
displayType: p.displayType,
|
|
48
|
+
markup: p.markup,
|
|
49
|
+
choices: h,
|
|
50
|
+
feedback: g,
|
|
51
|
+
responseCorrect: u.mode === "evaluate" ? d(p, s) === 1 : void 0,
|
|
52
|
+
rationale: v,
|
|
53
|
+
teacherInstructions: _,
|
|
54
|
+
language: p.language,
|
|
55
|
+
extraCSSRules: p.extraCSSRules
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
var d = (e, t) => {
|
|
59
|
+
let { value: r = {} } = t || {}, a = e && e.choices ? Object.keys(e.choices).length : 0, o = i(e), s = 0;
|
|
60
|
+
for (let e = 0; e < a; e++) {
|
|
61
|
+
let t = n(o, (t, n, i) => {
|
|
62
|
+
let a = r && r[i] || "", o = n[e] || "";
|
|
63
|
+
return o && a && o === a ? t : t - 1;
|
|
64
|
+
}, a);
|
|
65
|
+
if (t > s && (s = t), t === a) break;
|
|
66
|
+
}
|
|
67
|
+
let c = (s / a).toFixed(2);
|
|
68
|
+
return parseFloat(c);
|
|
69
|
+
}, f = (e, t, n) => {
|
|
70
|
+
let r = [], { value: a = {} } = t || {}, o = i(e), c = Object.keys(o), l = c.length;
|
|
71
|
+
if (r.push(`${l} dropdown response area(s) defined in this question.`), a && Object.keys(a).length > 0) {
|
|
72
|
+
let e = Object.entries(a).filter(([e, t]) => t && t.trim()).length;
|
|
73
|
+
r.push(`Student selected options in ${e} out of ${l} dropdown(s).`), c.forEach((e) => {
|
|
74
|
+
let t = a && a[e] || "", n = o[e] || [];
|
|
75
|
+
t.trim() ? r.push(`Dropdown ${parseInt(e) + 1}: student selected '${t}' (correct options: [${n.map((e) => `'${e}'`).join(", ")}]).`) : r.push(`Dropdown ${parseInt(e) + 1}: no selection made (correct options: [${n.map((e) => `'${e}'`).join(", ")}]).`);
|
|
76
|
+
});
|
|
77
|
+
} else r.push("Student did not make any selections in the dropdowns.");
|
|
78
|
+
let u = s.enabled(e, n);
|
|
79
|
+
r.push(`Scoring method: ${u ? "partial scoring" : "all-or-nothing scoring"}.`);
|
|
80
|
+
let f = d(e, t);
|
|
81
|
+
return r.push(`Final score: ${f}.`), r;
|
|
82
|
+
};
|
|
83
|
+
function p(e, n, r = {}) {
|
|
84
|
+
return new Promise((i) => {
|
|
85
|
+
if (!n || t(n)) i({
|
|
86
|
+
score: 0,
|
|
87
|
+
empty: !0,
|
|
88
|
+
traceLog: ["Student did not make any selections in the dropdowns. Score is 0."]
|
|
89
|
+
});
|
|
90
|
+
else {
|
|
91
|
+
let t = f(e, n, r), a = d(e, n);
|
|
92
|
+
i({
|
|
93
|
+
score: s.enabled(e, r) ? a : Math.floor(a),
|
|
94
|
+
empty: !1,
|
|
95
|
+
traceLog: t
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
var m = (e, t) => new Promise((n) => {
|
|
101
|
+
if (t.mode !== "evaluate" && t.role === "instructor") {
|
|
102
|
+
let { choices: t } = e, r = {};
|
|
103
|
+
t && Object.keys(t).forEach((e, n) => {
|
|
104
|
+
let i = t[e] && t[e].filter((e) => e.correct);
|
|
105
|
+
r[n] = i && i[0].value;
|
|
106
|
+
}), n({
|
|
107
|
+
id: "1",
|
|
108
|
+
value: r
|
|
109
|
+
});
|
|
110
|
+
} else n(null);
|
|
111
|
+
}), h = (e) => (e || "").replace(/(<(?!img|iframe|source)([^>]+)>)/gi, ""), g = (e = {}, t = {}) => {
|
|
112
|
+
let { markup: n, choices: r } = e, { maxResponseAreas: i, maxResponseAreaChoices: a } = t, o = {};
|
|
113
|
+
[
|
|
114
|
+
"teacherInstructions",
|
|
115
|
+
"prompt",
|
|
116
|
+
"rationale"
|
|
117
|
+
].forEach((n) => {
|
|
118
|
+
t[n]?.required && !h(e[n]) && (o[n] = "This field is required.");
|
|
119
|
+
});
|
|
120
|
+
let s = ((n || "").match(/\{\{(\d+)\}\}/g) || []).length;
|
|
121
|
+
return s > i ? o.responseAreasError = `No more than ${i} response areas should be defined.` : s < 1 && (o.responseAreasError = "There should be defined at least 1 response area."), (Object.keys(r) || []).forEach((e) => {
|
|
122
|
+
r[e] && r[e].length > a && (o.responseAreaChoicesError = `No more than ${a} choices per response area should be defined.`);
|
|
123
|
+
}), o;
|
|
124
|
+
};
|
|
125
|
+
//#endregion
|
|
126
|
+
export { m as createCorrectResponseSession, f as getLogTrace, d as getScore, u as model, l as normalize, p as outcome, g as validate };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/inline-dropdown/controller/src/utils.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 getAllCorrectResponses: ({ choices, alternateResponse }: {
|
|
10
|
+
choices: any;
|
|
11
|
+
alternateResponse: any;
|
|
12
|
+
}) => {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import e from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/forEach.js";
|
|
2
|
+
//#region src/controller/utils.ts
|
|
3
|
+
var t = ({ choices: t, alternateResponse: n }) => {
|
|
4
|
+
n ||= {};
|
|
5
|
+
let r = {};
|
|
6
|
+
return e(t, (e, t) => {
|
|
7
|
+
r[t] || (r[t] = []), e && e.forEach((e) => {
|
|
8
|
+
e.correct && (r[t].push(e.value), n[t] && (r[t] = [...r[t], ...n[t]]));
|
|
9
|
+
});
|
|
10
|
+
}), r;
|
|
11
|
+
};
|
|
12
|
+
//#endregion
|
|
13
|
+
export { t as getAllCorrectResponses };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/inline-dropdown/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 RootInlineDropdown extends HTMLElement {
|
|
10
|
+
constructor();
|
|
11
|
+
set model(m: any);
|
|
12
|
+
set session(s: any);
|
|
13
|
+
get session(): any;
|
|
14
|
+
setLangAttribute(): void;
|
|
15
|
+
_render: any;
|
|
16
|
+
dispatchChangedEvent: any;
|
|
17
|
+
changeSession: any;
|
|
18
|
+
connectedCallback(): void;
|
|
19
|
+
disconnectedCallback(): void;
|
|
20
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import e from "./inline-dropdown.js";
|
|
2
|
+
import t from "react";
|
|
3
|
+
import { createRoot as n } from "react-dom/client";
|
|
4
|
+
import { ModelSetEvent as r, SessionChangedEvent as i } from "@pie-element/shared-player-events";
|
|
5
|
+
import { renderMath as a } from "@pie-element/shared-math-rendering-mathjax";
|
|
6
|
+
//#region src/delivery/index.ts
|
|
7
|
+
var o = class extends HTMLElement {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(), this._model = null, this._session = null, this._root = null;
|
|
10
|
+
}
|
|
11
|
+
set model(e) {
|
|
12
|
+
this._model = e, this.dispatchEvent(new r(this.tagName.toLowerCase(), this.session && !!this.session.value, !!this._model)), this._render();
|
|
13
|
+
}
|
|
14
|
+
set session(e) {
|
|
15
|
+
this._session = e, this._render();
|
|
16
|
+
}
|
|
17
|
+
get session() {
|
|
18
|
+
return this._session;
|
|
19
|
+
}
|
|
20
|
+
setLangAttribute() {
|
|
21
|
+
let e = this._model && typeof this._model.language ? this._model.language : "", t = e ? e.slice(0, 2) : "en";
|
|
22
|
+
this.setAttribute("lang", t);
|
|
23
|
+
}
|
|
24
|
+
_render = () => {
|
|
25
|
+
if (this._model && this._session) {
|
|
26
|
+
let r = t.createElement(e, {
|
|
27
|
+
model: this._model,
|
|
28
|
+
prompt: this._model.prompt,
|
|
29
|
+
rationale: this._model.rationale,
|
|
30
|
+
teacherInstructions: this._model.teacherInstructions,
|
|
31
|
+
disabled: this._model.disabled,
|
|
32
|
+
displayType: this._model.displayType,
|
|
33
|
+
markup: this._model.markup,
|
|
34
|
+
mode: this._model.mode,
|
|
35
|
+
choices: this._model.choices,
|
|
36
|
+
value: this._session.value,
|
|
37
|
+
feedback: this._model.feedback,
|
|
38
|
+
language: this._model.language,
|
|
39
|
+
onChange: this.changeSession
|
|
40
|
+
});
|
|
41
|
+
this.setLangAttribute(), this._root ||= n(this), this._root.render(r), queueMicrotask(() => {
|
|
42
|
+
a(this);
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
dispatchChangedEvent = () => {
|
|
47
|
+
this.dispatchEvent(new i(this.tagName.toLowerCase(), this.session && !!this.session.value));
|
|
48
|
+
};
|
|
49
|
+
changeSession = (e) => {
|
|
50
|
+
this.session.value = e, this.dispatchChangedEvent(), this._render();
|
|
51
|
+
};
|
|
52
|
+
connectedCallback() {
|
|
53
|
+
this.setAttribute("aria-label", "Inline Dropdown Question"), this.setAttribute("role", "region"), this._render();
|
|
54
|
+
}
|
|
55
|
+
disconnectedCallback() {
|
|
56
|
+
this._root && this._root.unmount();
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
//#endregion
|
|
60
|
+
export { o as default };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/inline-dropdown/src/inline-dropdown.jsx
|
|
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
|
+
import React from 'react';
|
|
10
|
+
import PropTypes from 'prop-types';
|
|
11
|
+
export declare class InlineDropdown extends React.Component {
|
|
12
|
+
static propTypes: {
|
|
13
|
+
prompt: PropTypes.Requireable<string>;
|
|
14
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
15
|
+
markup: PropTypes.Requireable<string>;
|
|
16
|
+
mode: PropTypes.Requireable<string>;
|
|
17
|
+
displayType: PropTypes.Requireable<string>;
|
|
18
|
+
rationale: PropTypes.Requireable<string>;
|
|
19
|
+
teacherInstructions: PropTypes.Requireable<string>;
|
|
20
|
+
model: PropTypes.Validator<object>;
|
|
21
|
+
choices: PropTypes.Requireable<object>;
|
|
22
|
+
value: PropTypes.Requireable<object>;
|
|
23
|
+
feedback: PropTypes.Requireable<object>;
|
|
24
|
+
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
25
|
+
language: PropTypes.Requireable<string>;
|
|
26
|
+
};
|
|
27
|
+
static defaultProps: {
|
|
28
|
+
value: {};
|
|
29
|
+
};
|
|
30
|
+
state: {
|
|
31
|
+
showCorrectAnswer: boolean;
|
|
32
|
+
};
|
|
33
|
+
UNSAFE_componentWillReceiveProps(nextProps: any): void;
|
|
34
|
+
componentDidUpdate(): void;
|
|
35
|
+
toggleShowCorrect: any;
|
|
36
|
+
render(): React.JSX.Element;
|
|
37
|
+
}
|
|
38
|
+
export default InlineDropdown;
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import e from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.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 a from "@pie-lib/correct-answer-toggle";
|
|
7
|
+
import { InlineDropdown as o } from "@pie-lib/mask-markup";
|
|
8
|
+
import * as s from "@pie-lib/render-ui";
|
|
9
|
+
import { Collapsible as c, PreviewPrompt as l, UiLayout as u, color as d, hasMedia as f, hasText as p } from "@pie-lib/render-ui";
|
|
10
|
+
import { jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
11
|
+
import { styled as g } from "@mui/material/styles";
|
|
12
|
+
//#region src/delivery/inline-dropdown.tsx
|
|
13
|
+
function _(e) {
|
|
14
|
+
return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
|
|
15
|
+
}
|
|
16
|
+
function v(e, t) {
|
|
17
|
+
return !e || _(e) ? e : _(e.default) ? e.default : t && _(e[t]) ? e[t] : t && _(e[t]?.default) ? e[t].default : e;
|
|
18
|
+
}
|
|
19
|
+
var y = v(u, "UiLayout") || v(w.UiLayout, "UiLayout"), b = v(l, "PreviewPrompt") || v(w.PreviewPrompt, "PreviewPrompt"), x = v(c, "Collapsible") || v(w.Collapsible, "Collapsible"), S = s, C = S.default, w = C && typeof C == "object" ? C : S, T = g(y)({
|
|
20
|
+
color: d.text(),
|
|
21
|
+
backgroundColor: d.background()
|
|
22
|
+
}), E = g(x)(({ theme: e }) => ({ marginBottom: e.spacing(2) })), D = g("div")(({ theme: e }) => ({ "&:not(:last-child)": { marginBottom: e.spacing(2) } })), O = g("div")({
|
|
23
|
+
display: "flex",
|
|
24
|
+
whiteSpace: "break-spaces"
|
|
25
|
+
}), k = g("div")(({ correct: e }) => ({
|
|
26
|
+
display: "flex",
|
|
27
|
+
...e ? { color: d.correct() } : { color: d.incorrectWithIcon() }
|
|
28
|
+
})), A = g("h2")({
|
|
29
|
+
position: "absolute",
|
|
30
|
+
left: "-10000px",
|
|
31
|
+
top: "auto",
|
|
32
|
+
width: "1px",
|
|
33
|
+
height: "1px",
|
|
34
|
+
overflow: "hidden"
|
|
35
|
+
}), j = class extends t.Component {
|
|
36
|
+
static propTypes = {
|
|
37
|
+
prompt: i.string,
|
|
38
|
+
disabled: i.bool,
|
|
39
|
+
markup: i.string,
|
|
40
|
+
mode: i.string,
|
|
41
|
+
displayType: i.string,
|
|
42
|
+
rationale: i.string,
|
|
43
|
+
teacherInstructions: i.string,
|
|
44
|
+
model: i.object.isRequired,
|
|
45
|
+
choices: i.object,
|
|
46
|
+
value: i.object,
|
|
47
|
+
feedback: i.object,
|
|
48
|
+
onChange: i.func,
|
|
49
|
+
language: i.string
|
|
50
|
+
};
|
|
51
|
+
static defaultProps = { value: {} };
|
|
52
|
+
state = { showCorrectAnswer: !1 };
|
|
53
|
+
UNSAFE_componentWillReceiveProps(t) {
|
|
54
|
+
e(t.feedback) && this.setState({ showCorrectAnswer: !1 });
|
|
55
|
+
}
|
|
56
|
+
componentDidUpdate() {
|
|
57
|
+
n(r.findDOMNode(this));
|
|
58
|
+
}
|
|
59
|
+
toggleShowCorrect = () => {
|
|
60
|
+
this.setState({ showCorrectAnswer: !this.state.showCorrectAnswer });
|
|
61
|
+
};
|
|
62
|
+
render() {
|
|
63
|
+
let { showCorrectAnswer: e } = this.state, { prompt: t, mode: n, model: r, rationale: i, teacherInstructions: s, choices: c, displayType: l, language: u } = this.props, { extraCSSRules: d } = r || {}, g = n === "evaluate", _ = !1, v = i && (p(i) || f(i)), y = s && (p(s) || f(s)), S = (Object.keys(c) || []).map((e) => (c[e] || []).reduce((e, t) => (t.rationale && p(t.rationale) && (_ = !0, e.push(t)), e), []));
|
|
64
|
+
return /* @__PURE__ */ h(T, {
|
|
65
|
+
extraCSSRules: d,
|
|
66
|
+
style: { display: `${l}` },
|
|
67
|
+
children: [
|
|
68
|
+
n === "gather" && /* @__PURE__ */ m(A, { children: "Inline Dropdown Question" }),
|
|
69
|
+
y && /* @__PURE__ */ m(E, {
|
|
70
|
+
labels: {
|
|
71
|
+
hidden: "Show Teacher Instructions",
|
|
72
|
+
visible: "Hide Teacher Instructions"
|
|
73
|
+
},
|
|
74
|
+
children: /* @__PURE__ */ m(b, { prompt: s })
|
|
75
|
+
}),
|
|
76
|
+
t && /* @__PURE__ */ m(b, { prompt: t }),
|
|
77
|
+
/* @__PURE__ */ m(a, {
|
|
78
|
+
show: g,
|
|
79
|
+
toggled: e,
|
|
80
|
+
onToggle: this.toggleShowCorrect,
|
|
81
|
+
language: u
|
|
82
|
+
}),
|
|
83
|
+
/* @__PURE__ */ m(o, {
|
|
84
|
+
...this.props,
|
|
85
|
+
showCorrectAnswer: e
|
|
86
|
+
}),
|
|
87
|
+
_ && /* @__PURE__ */ m(E, {
|
|
88
|
+
labels: {
|
|
89
|
+
hidden: "Show Rationale for choices",
|
|
90
|
+
visible: "Hide Rationale for choices"
|
|
91
|
+
},
|
|
92
|
+
children: S.map((e, t) => /* @__PURE__ */ m(D, { children: e?.length > 0 && e.map((e) => /* @__PURE__ */ h(O, { children: [/* @__PURE__ */ m(k, {
|
|
93
|
+
correct: e.correct,
|
|
94
|
+
dangerouslySetInnerHTML: { __html: `${e.label}: ` }
|
|
95
|
+
}), /* @__PURE__ */ m(b, { prompt: e.rationale })] }, e.label)) }, t))
|
|
96
|
+
}),
|
|
97
|
+
v && /* @__PURE__ */ m(x, {
|
|
98
|
+
labels: {
|
|
99
|
+
hidden: "Show Rationale",
|
|
100
|
+
visible: "Hide Rationale"
|
|
101
|
+
},
|
|
102
|
+
children: /* @__PURE__ */ m(b, { prompt: i })
|
|
103
|
+
})
|
|
104
|
+
]
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
//#endregion
|
|
109
|
+
export { j as default };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './delivery/index.js';
|