@pie-element/image-cloze-association 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 +89 -0
- package/dist/author/defaults.d.ts.map +1 -0
- package/dist/author/defaults.js +58 -0
- package/dist/author/index.d.ts +35 -0
- package/dist/author/index.d.ts.map +1 -0
- package/dist/author/index.js +71 -0
- package/dist/author/root.d.ts +15 -0
- package/dist/author/root.d.ts.map +1 -0
- package/dist/author/root.js +80 -0
- package/dist/controller/defaults.d.ts +17 -0
- package/dist/controller/defaults.d.ts.map +1 -0
- package/dist/controller/defaults.js +10 -0
- package/dist/controller/index.d.ts +24 -0
- package/dist/controller/index.d.ts.map +1 -0
- package/dist/controller/index.js +124 -0
- package/dist/controller/utils.d.ts +15 -0
- package/dist/controller/utils.d.ts.map +1 -0
- package/dist/controller/utils.js +36 -0
- package/dist/delivery/constants.d.ts +15 -0
- package/dist/delivery/constants.d.ts.map +1 -0
- package/dist/delivery/evaluation-icon.d.ts +29 -0
- package/dist/delivery/evaluation-icon.d.ts.map +1 -0
- package/dist/delivery/evaluation-icon.js +38 -0
- package/dist/delivery/image-container.d.ts +14 -0
- package/dist/delivery/image-container.d.ts.map +1 -0
- package/dist/delivery/image-container.js +61 -0
- package/dist/delivery/image-drop-target.d.ts +46 -0
- package/dist/delivery/image-drop-target.d.ts.map +1 -0
- package/dist/delivery/image-drop-target.js +90 -0
- package/dist/delivery/index.d.ts +21 -0
- package/dist/delivery/index.d.ts.map +1 -0
- package/dist/delivery/index.js +110 -0
- package/dist/delivery/interactive-section.d.ts +16 -0
- package/dist/delivery/interactive-section.d.ts.map +1 -0
- package/dist/delivery/interactive-section.js +72 -0
- package/dist/delivery/possible-response.d.ts +35 -0
- package/dist/delivery/possible-response.d.ts.map +1 -0
- package/dist/delivery/possible-response.js +100 -0
- package/dist/delivery/possible-responses.d.ts +32 -0
- package/dist/delivery/possible-responses.d.ts.map +1 -0
- package/dist/delivery/possible-responses.js +41 -0
- package/dist/delivery/root.d.ts +22 -0
- package/dist/delivery/root.d.ts.map +1 -0
- package/dist/delivery/root.js +279 -0
- package/dist/delivery/static-html-span.d.ts +15 -0
- package/dist/delivery/static-html-span.d.ts.map +1 -0
- package/dist/delivery/static-html-span.js +22 -0
- package/dist/delivery/utils-correctness.d.ts +11 -0
- package/dist/delivery/utils-correctness.d.ts.map +1 -0
- package/dist/delivery/utils-correctness.js +43 -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 +160 -0
- package/dist/index.js +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/_arrayAggregator.js +10 -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/_arrayShuffle.js +8 -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/_baseAggregator.js +9 -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/_baseEach.js +6 -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/_baseFor.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseForOwn.js +8 -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/_baseIsMatch.js +26 -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/_baseIteratee.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/_baseMap.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseMatches.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseMatchesProperty.js +17 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseProperty.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_basePropertyDeep.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseRandom.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseShuffle.js +8 -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/_baseUnary.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseValues.js +9 -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/_createAggregator.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_createBaseEach.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_createBaseFor.js +12 -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/_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/_getMatchData.js +16 -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/_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/_isStrictComparable.js +7 -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/_matchesStrictComparable.js +8 -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/_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/_shuffleSelf.js +12 -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/cloneDeep.js +8 -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/flatMap.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/get.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/groupBy.js +8 -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/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/map.js +10 -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/property.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/shuffle.js +9 -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/toString.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/values.js +8 -0
- package/package.json +75 -0
- package/src/author/defaults.ts +69 -0
- package/src/author/index.ts +124 -0
- package/src/author/root.tsx +126 -0
- package/src/controller/defaults.ts +17 -0
- package/src/controller/index.ts +332 -0
- package/src/controller/utils.ts +82 -0
- package/src/delivery/constants.ts +15 -0
- package/src/delivery/evaluation-icon.tsx +64 -0
- package/src/delivery/image-container.tsx +100 -0
- package/src/delivery/image-drop-target.tsx +150 -0
- package/src/delivery/index.ts +283 -0
- package/src/delivery/interactive-section.tsx +104 -0
- package/src/delivery/possible-response.tsx +162 -0
- package/src/delivery/possible-responses.tsx +62 -0
- package/src/delivery/root.tsx +530 -0
- package/src/delivery/static-html-span.tsx +40 -0
- package/src/delivery/utils-correctness.ts +105 -0
- package/src/index.iife.ts +16 -0
- package/src/index.ts +1 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import e from "./possible-response.js";
|
|
2
|
+
import "react";
|
|
3
|
+
import { color as t } from "@pie-lib/render-ui";
|
|
4
|
+
import n from "prop-types";
|
|
5
|
+
import { ICADroppablePlaceholder as r } from "@pie-lib/drag";
|
|
6
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
7
|
+
import { styled as a } from "@mui/material/styles";
|
|
8
|
+
//#region src/delivery/possible-responses.tsx
|
|
9
|
+
var o = a("div")(({ theme: e }) => ({
|
|
10
|
+
backgroundColor: t.background(),
|
|
11
|
+
padding: e.spacing(2),
|
|
12
|
+
display: "flex",
|
|
13
|
+
alignItems: "center",
|
|
14
|
+
width: "fit-content"
|
|
15
|
+
})), s = ({ canDrag: t, data: n, onDragBegin: a, answerChoiceTransparency: s, customStyle: c, isVertical: l, minHeight: u }) => /* @__PURE__ */ i(o, {
|
|
16
|
+
style: c,
|
|
17
|
+
children: /* @__PURE__ */ i(r, {
|
|
18
|
+
id: "ica-board",
|
|
19
|
+
disabled: !t,
|
|
20
|
+
isVerticalPool: l,
|
|
21
|
+
minHeight: u,
|
|
22
|
+
children: (n || []).map((n) => /* @__PURE__ */ i(e, {
|
|
23
|
+
canDrag: t,
|
|
24
|
+
data: n,
|
|
25
|
+
onDragBegin: a,
|
|
26
|
+
answerChoiceTransparency: s,
|
|
27
|
+
containerStyle: { margin: "4px" }
|
|
28
|
+
}, n.id))
|
|
29
|
+
})
|
|
30
|
+
});
|
|
31
|
+
s.propTypes = {
|
|
32
|
+
canDrag: n.bool.isRequired,
|
|
33
|
+
data: n.array.isRequired,
|
|
34
|
+
onDragBegin: n.func.isRequired,
|
|
35
|
+
answerChoiceTransparency: n.bool,
|
|
36
|
+
customStyle: n.object,
|
|
37
|
+
isVertical: n.bool,
|
|
38
|
+
minHeight: n.number
|
|
39
|
+
};
|
|
40
|
+
//#endregion
|
|
41
|
+
export { s as default };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/image-cloze-association/src/root.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
|
+
export declare class ImageClozeAssociationComponent extends React.Component {
|
|
11
|
+
constructor(props: any);
|
|
12
|
+
onDragStart: any;
|
|
13
|
+
onDragEnd: any;
|
|
14
|
+
renderDragOverlay: any;
|
|
15
|
+
filterPossibleAnswers: (possibleResponses: any, answer: any) => any;
|
|
16
|
+
handleOnAnswerSelect: any;
|
|
17
|
+
handleOnAnswerRemove: any;
|
|
18
|
+
toggleCorrect: (showCorrect: any) => void;
|
|
19
|
+
render(): React.JSX.Element;
|
|
20
|
+
}
|
|
21
|
+
export default ImageClozeAssociationComponent;
|
|
22
|
+
//# sourceMappingURL=root.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"root.d.ts","sourceRoot":"","sources":["../../src/delivery/root.tsx"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAqE1B,qBAAa,8BAA+B,SAAQ,KAAK,CAAC,SAAS;gBACrD,KAAK,KAAA;IAyCjB,WAAW,EAAE,GAAG,CASd;IAEF,SAAS,EAAE,GAAG,CAsCZ;IAEF,iBAAiB,EAAE,GAAG,CAuBpB;IAEF,qBAAqB,GAAI,sBAAiB,EAAE,WAAM,SACwB;IAE1E,oBAAoB,EAAE,GAAG,CAgFvB;IAEF,oBAAoB,EAAE,GAAG,CAyBvB;IAEF,aAAa,GAAI,gBAAW,UAAoC;IAEhE,MAAM;CA2KP;AA+CD,eAAe,8BAA8B,CAAC"}
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
import e from "../node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/flatMap.js";
|
|
2
|
+
import t from "../node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/groupBy.js";
|
|
3
|
+
import n from "./possible-response.js";
|
|
4
|
+
import r from "./image-container.js";
|
|
5
|
+
import i from "./interactive-section.js";
|
|
6
|
+
import a from "./possible-responses.js";
|
|
7
|
+
import { getAnswersCorrectness as o, getUnansweredAnswers as s } from "./utils-correctness.js";
|
|
8
|
+
import c from "react";
|
|
9
|
+
import * as l from "@pie-lib/render-ui";
|
|
10
|
+
import { Collapsible as u, PreviewPrompt as d, UiLayout as f, color as p, hasMedia as m, hasText as h } from "@pie-lib/render-ui";
|
|
11
|
+
import g from "prop-types";
|
|
12
|
+
import { DragOverlay as _ } from "@dnd-kit/core";
|
|
13
|
+
import { DragProvider as v } from "@pie-lib/drag";
|
|
14
|
+
import { CSSTransition as y, TransitionGroup as b } from "react-transition-group";
|
|
15
|
+
import { jsx as x, jsxs as S } from "react/jsx-runtime";
|
|
16
|
+
import { styled as C } from "@mui/material/styles";
|
|
17
|
+
import w from "@mui/icons-material/NotInterested";
|
|
18
|
+
import T from "@pie-lib/correct-answer-toggle";
|
|
19
|
+
import E from "@pie-lib/translator";
|
|
20
|
+
//#region src/delivery/root.tsx
|
|
21
|
+
function D(e) {
|
|
22
|
+
return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
|
|
23
|
+
}
|
|
24
|
+
function O(e, t) {
|
|
25
|
+
return !e || D(e) ? e : D(e.default) ? e.default : t && D(e[t]) ? e[t] : t && D(e[t]?.default) ? e[t].default : e;
|
|
26
|
+
}
|
|
27
|
+
var k = O(f, "UiLayout") || O(P.UiLayout, "UiLayout"), A = O(d, "PreviewPrompt") || O(P.PreviewPrompt, "PreviewPrompt"), j = O(u, "Collapsible") || O(P.Collapsible, "Collapsible"), M = l, N = M.default, P = N && typeof N == "object" ? N : M, { translator: F } = E, I = () => Math.random().toString(36).substring(2) + (/* @__PURE__ */ new Date()).getTime().toString(36), L = C(k)({
|
|
28
|
+
color: p.text(),
|
|
29
|
+
backgroundColor: p.background(),
|
|
30
|
+
position: "relative",
|
|
31
|
+
"& img": {
|
|
32
|
+
maxWidth: "100%",
|
|
33
|
+
height: "auto"
|
|
34
|
+
}
|
|
35
|
+
}), R = C(j)(({ theme: e }) => ({ marginBottom: e.spacing(2) })), z = C(j)(({ theme: e }) => ({ marginTop: e.spacing(2) })), B = class extends c.Component {
|
|
36
|
+
constructor(n) {
|
|
37
|
+
super(n);
|
|
38
|
+
let { model: { possibleResponses: r, responseContainers: i, duplicateResponses: a, maxResponsePerZone: o }, session: s } = n, { answers: c } = s || {}, l = (r || []).map((e, t) => ({
|
|
39
|
+
value: e,
|
|
40
|
+
id: `${t}`
|
|
41
|
+
}));
|
|
42
|
+
c = e(t(c || [], "containerIndex"), (e) => e.slice(-(o || 1))).map((e, t) => ({
|
|
43
|
+
...e,
|
|
44
|
+
id: `${t}`
|
|
45
|
+
})).filter((e) => e.containerIndex < i.length);
|
|
46
|
+
let u = l.filter((e) => !c.find((t) => t.value === e.value));
|
|
47
|
+
this.state = {
|
|
48
|
+
answers: c || [],
|
|
49
|
+
draggingElement: {
|
|
50
|
+
id: "",
|
|
51
|
+
value: ""
|
|
52
|
+
},
|
|
53
|
+
possibleResponses: a ? l : u,
|
|
54
|
+
responseContainers: (i || []).map((e, t) => ({
|
|
55
|
+
index: t,
|
|
56
|
+
...e,
|
|
57
|
+
id: `${t}`
|
|
58
|
+
})),
|
|
59
|
+
maxResponsePerZone: o || 1,
|
|
60
|
+
showCorrect: !1,
|
|
61
|
+
isValidDrop: !1
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
onDragStart = (e) => {
|
|
65
|
+
let { active: t } = e;
|
|
66
|
+
t?.data?.current && this.setState({
|
|
67
|
+
draggingElement: t.data.current,
|
|
68
|
+
isValidDrop: !1
|
|
69
|
+
});
|
|
70
|
+
};
|
|
71
|
+
onDragEnd = (e) => {
|
|
72
|
+
let { active: t, over: n } = e, { model: r } = this.props, { duplicateResponses: i } = r || {}, a = t?.data?.current, o = n?.data?.current, s = n && t && a && o && o.containerIndex !== void 0 && i;
|
|
73
|
+
if (this.setState({
|
|
74
|
+
draggingElement: {
|
|
75
|
+
id: "",
|
|
76
|
+
value: ""
|
|
77
|
+
},
|
|
78
|
+
isValidDrop: s
|
|
79
|
+
}), !(!n || !t) && a) {
|
|
80
|
+
if (n.id === "ica-board") {
|
|
81
|
+
this.handleOnAnswerRemove(a);
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
o && this.handleOnAnswerSelect(a, o.containerIndex);
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
renderDragOverlay = () => {
|
|
88
|
+
let { draggingElement: e } = this.state, { model: t } = this.props;
|
|
89
|
+
if (!e.id) return null;
|
|
90
|
+
let r = /<img[^>]+src="([^">]+)"/.test(e.value);
|
|
91
|
+
return /* @__PURE__ */ x(n, {
|
|
92
|
+
canDrag: !1,
|
|
93
|
+
data: e,
|
|
94
|
+
onDragBegin: () => {},
|
|
95
|
+
isOverlay: !0,
|
|
96
|
+
containerStyle: {
|
|
97
|
+
...t.answerChoiceTransparency ? { opacity: "0.8" } : {},
|
|
98
|
+
...r ? {} : {
|
|
99
|
+
padding: "0 10px",
|
|
100
|
+
margin: "4px 6px !important"
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}, e.id);
|
|
104
|
+
};
|
|
105
|
+
filterPossibleAnswers = (e, t) => e.filter((e) => e.value !== t.value);
|
|
106
|
+
handleOnAnswerSelect = (e, t) => {
|
|
107
|
+
let { model: { duplicateResponses: n }, updateAnswer: r } = this.props, { answers: i, maxResponsePerZone: a } = this.state, { possibleResponses: o } = this.state, s, c = [], l = [];
|
|
108
|
+
if (i.forEach((e) => {
|
|
109
|
+
e.containerIndex === t ? c.push(e) : l.push(e);
|
|
110
|
+
}), a === c.length) {
|
|
111
|
+
let r = c[0];
|
|
112
|
+
if (a === 1) c.shift();
|
|
113
|
+
else {
|
|
114
|
+
this.setState({ maxResponsePerZoneWarning: !0 });
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
n || (o = Array.isArray(o) ? o : [], o.push({
|
|
118
|
+
...r,
|
|
119
|
+
containerIndex: void 0,
|
|
120
|
+
id: r.id || I()
|
|
121
|
+
})), s = [
|
|
122
|
+
...c,
|
|
123
|
+
...l.filter((t) => n ? !0 : t.value !== e.value),
|
|
124
|
+
{
|
|
125
|
+
...e,
|
|
126
|
+
containerIndex: t,
|
|
127
|
+
...n ? { id: I() } : {}
|
|
128
|
+
}
|
|
129
|
+
];
|
|
130
|
+
} else s = [...i.filter((t) => n ? t.id !== e.id : t.value !== e.value), {
|
|
131
|
+
...e,
|
|
132
|
+
containerIndex: t,
|
|
133
|
+
...n ? { id: I() } : {}
|
|
134
|
+
}];
|
|
135
|
+
this.setState({
|
|
136
|
+
maxResponsePerZoneWarning: !1,
|
|
137
|
+
answers: s,
|
|
138
|
+
possibleResponses: n ? o : this.filterPossibleAnswers(o, e)
|
|
139
|
+
}), r(s);
|
|
140
|
+
};
|
|
141
|
+
handleOnAnswerRemove = (e) => {
|
|
142
|
+
let { model: { duplicateResponses: t }, updateAnswer: n } = this.props, { answers: r, possibleResponses: i } = this.state, a = r.filter((t) => t.id !== e.id), o = e.containerIndex === void 0;
|
|
143
|
+
this.setState({
|
|
144
|
+
maxResponsePerZoneWarning: !1,
|
|
145
|
+
answers: a,
|
|
146
|
+
possibleResponses: t || o ? i : [...i, {
|
|
147
|
+
...e,
|
|
148
|
+
containerIndex: void 0
|
|
149
|
+
}]
|
|
150
|
+
}), n(a);
|
|
151
|
+
};
|
|
152
|
+
toggleCorrect = (e) => this.setState({ showCorrect: e });
|
|
153
|
+
render() {
|
|
154
|
+
let { model: { disabled: e, duplicateResponses: t, extraCSSRules: n, image: l, responseAreaFill: u, stimulus: d, responseCorrect: f, validation: p, teacherInstructions: g, prompt: y, autoplayAudioEnabled: b, showDashedBorder: C, mode: w, rationale: E, language: D, uiStyle: O = {}, answerChoiceTransparency: k, responseContainerPadding: j, imageDropTargetPadding: M, fontSizeFactor: N, customAudioButton: P } } = this.props, { answers: I, draggingElement: B, possibleResponses: V, responseContainers: H, maxResponsePerZone: W, maxResponsePerZoneWarning: G, showCorrect: K, isValidDrop: q } = this.state, J = w === "evaluate" && !f, { possibilityListPosition: Y = "bottom" } = O || {}, X = Y === "left" || Y === "right", { validResponse: Z } = p || {}, Q = [], ee = E && (h(E) || m(E)), te = g && (h(g) || m(g));
|
|
155
|
+
Z && (Z.value || []).forEach((e, t) => {
|
|
156
|
+
(e.images || []).forEach((e) => {
|
|
157
|
+
Q.push({
|
|
158
|
+
value: e,
|
|
159
|
+
containerIndex: t,
|
|
160
|
+
isCorrect: !0
|
|
161
|
+
});
|
|
162
|
+
});
|
|
163
|
+
});
|
|
164
|
+
let ne = F.t("imageClozeAssociation.reachedLimit_other", {
|
|
165
|
+
lng: D,
|
|
166
|
+
count: W
|
|
167
|
+
}), $ = f === void 0 ? I : o(I, p, t);
|
|
168
|
+
f === !1 && W === 1 && ($ = [...$, ...s($, p)]);
|
|
169
|
+
let re = {
|
|
170
|
+
draggingElement: B,
|
|
171
|
+
duplicateResponses: t,
|
|
172
|
+
image: l,
|
|
173
|
+
onAnswerSelect: this.handleOnAnswerSelect,
|
|
174
|
+
onDragAnswerBegin: this.onDragStart,
|
|
175
|
+
onDragAnswerEnd: this.onDragEnd,
|
|
176
|
+
responseContainers: H,
|
|
177
|
+
showDashedBorder: C,
|
|
178
|
+
responseAreaFill: u,
|
|
179
|
+
responseContainerPadding: j,
|
|
180
|
+
imageDropTargetPadding: M,
|
|
181
|
+
maxResponsePerZone: W
|
|
182
|
+
};
|
|
183
|
+
return /* @__PURE__ */ S(v, {
|
|
184
|
+
onDragStart: this.onDragStart,
|
|
185
|
+
onDragEnd: this.onDragEnd,
|
|
186
|
+
children: [/* @__PURE__ */ S(L, {
|
|
187
|
+
extraCSSRules: n,
|
|
188
|
+
id: "main-container",
|
|
189
|
+
fontSizeFactor: N,
|
|
190
|
+
children: [
|
|
191
|
+
te && /* @__PURE__ */ x(R, {
|
|
192
|
+
labels: {
|
|
193
|
+
hidden: "Show Teacher Instructions",
|
|
194
|
+
visible: "Hide Teacher Instructions"
|
|
195
|
+
},
|
|
196
|
+
children: /* @__PURE__ */ x(A, { prompt: g })
|
|
197
|
+
}),
|
|
198
|
+
/* @__PURE__ */ x(A, {
|
|
199
|
+
className: "prompt",
|
|
200
|
+
prompt: y,
|
|
201
|
+
autoplayAudioEnabled: b,
|
|
202
|
+
customAudioButton: P
|
|
203
|
+
}),
|
|
204
|
+
/* @__PURE__ */ x(A, { prompt: d }),
|
|
205
|
+
/* @__PURE__ */ x(T, {
|
|
206
|
+
show: J,
|
|
207
|
+
toggled: K,
|
|
208
|
+
onToggle: this.toggleCorrect,
|
|
209
|
+
language: D
|
|
210
|
+
}),
|
|
211
|
+
/* @__PURE__ */ S(i, {
|
|
212
|
+
responseCorrect: K && J ? !0 : f,
|
|
213
|
+
uiStyle: O,
|
|
214
|
+
children: [/* @__PURE__ */ x(r, {
|
|
215
|
+
...re,
|
|
216
|
+
canDrag: K && J ? !1 : !e,
|
|
217
|
+
answers: K && J ? Q : $,
|
|
218
|
+
answerChoiceTransparency: K && J ? void 0 : k
|
|
219
|
+
}), K && J ? null : /* @__PURE__ */ S(c.Fragment, { children: [G && /* @__PURE__ */ x(U, { message: ne }), /* @__PURE__ */ x(a, {
|
|
220
|
+
canDrag: !e,
|
|
221
|
+
data: V,
|
|
222
|
+
onAnswerRemove: this.handleOnAnswerRemove,
|
|
223
|
+
onDragBegin: this.onDragStart,
|
|
224
|
+
answerChoiceTransparency: k,
|
|
225
|
+
customStyle: { minWidth: X ? "130px" : l?.width || "fit-content" },
|
|
226
|
+
isVertical: X,
|
|
227
|
+
minHeight: X ? l?.height : void 0
|
|
228
|
+
})] })]
|
|
229
|
+
}),
|
|
230
|
+
ee && /* @__PURE__ */ x(z, {
|
|
231
|
+
labels: {
|
|
232
|
+
hidden: "Show Rationale",
|
|
233
|
+
visible: "Hide Rationale"
|
|
234
|
+
},
|
|
235
|
+
children: /* @__PURE__ */ x(A, { prompt: E })
|
|
236
|
+
})
|
|
237
|
+
]
|
|
238
|
+
}), /* @__PURE__ */ x(_, {
|
|
239
|
+
dropAnimation: q ? null : void 0,
|
|
240
|
+
children: this.renderDragOverlay()
|
|
241
|
+
})]
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
}, V = C("div")(({ theme: e }) => ({
|
|
245
|
+
margin: `0 ${e.spacing(2)}`,
|
|
246
|
+
backgroundColor: "#dddddd",
|
|
247
|
+
padding: e.spacing(1),
|
|
248
|
+
display: "flex",
|
|
249
|
+
alignItems: "center",
|
|
250
|
+
"& svg": { height: "30px" },
|
|
251
|
+
"& h1": {
|
|
252
|
+
padding: "0px",
|
|
253
|
+
margin: "0px"
|
|
254
|
+
}
|
|
255
|
+
})), H = C("span")(({ theme: e }) => ({
|
|
256
|
+
paddingLeft: e.spacing(.5),
|
|
257
|
+
userSelect: "none"
|
|
258
|
+
})), U = ({ message: e }) => {
|
|
259
|
+
let t = c.useRef(null);
|
|
260
|
+
return /* @__PURE__ */ x(b, { children: /* @__PURE__ */ x(y, {
|
|
261
|
+
classNames: "fb",
|
|
262
|
+
timeout: 300,
|
|
263
|
+
nodeRef: t,
|
|
264
|
+
children: /* @__PURE__ */ S(V, {
|
|
265
|
+
ref: t,
|
|
266
|
+
children: [/* @__PURE__ */ x(w, {
|
|
267
|
+
color: "secondary",
|
|
268
|
+
fontSize: "small"
|
|
269
|
+
}), /* @__PURE__ */ x(H, { dangerouslySetInnerHTML: { __html: e } })]
|
|
270
|
+
}, "panel")
|
|
271
|
+
}, "fb") });
|
|
272
|
+
};
|
|
273
|
+
U.propTypes = { message: g.string }, B.propTypes = {
|
|
274
|
+
model: g.object.isRequired,
|
|
275
|
+
session: g.object,
|
|
276
|
+
updateAnswer: g.func.isRequired
|
|
277
|
+
};
|
|
278
|
+
//#endregion
|
|
279
|
+
export { B as default };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/image-cloze-association/src/static-html-span.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
|
+
declare class StaticHTMLSpan extends React.PureComponent {
|
|
11
|
+
shouldComponentUpdate(): boolean;
|
|
12
|
+
render(): React.JSX.Element;
|
|
13
|
+
}
|
|
14
|
+
export default StaticHTMLSpan;
|
|
15
|
+
//# sourceMappingURL=static-html-span.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"static-html-span.d.ts","sourceRoot":"","sources":["../../src/delivery/static-html-span.tsx"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,cAAM,cAAe,SAAQ,KAAK,CAAC,aAAa;IAC9C,qBAAqB;IAIrB,MAAM;CAUP;AAWD,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import e from "react";
|
|
2
|
+
import t from "prop-types";
|
|
3
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
+
//#region src/delivery/static-html-span.tsx
|
|
5
|
+
var r = class extends e.PureComponent {
|
|
6
|
+
shouldComponentUpdate() {
|
|
7
|
+
return !1;
|
|
8
|
+
}
|
|
9
|
+
render() {
|
|
10
|
+
let { html: e, className: t } = this.props;
|
|
11
|
+
return /* @__PURE__ */ n("span", {
|
|
12
|
+
className: t,
|
|
13
|
+
dangerouslySetInnerHTML: { __html: e }
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
r.propTypes = {
|
|
18
|
+
html: t.string.isRequired,
|
|
19
|
+
className: t.string
|
|
20
|
+
}, r.defaultProps = { className: "" };
|
|
21
|
+
//#endregion
|
|
22
|
+
export { r as default };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/image-cloze-association/src/utils-correctness.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 getUnansweredAnswers: (answers: any, validation: any) => any;
|
|
10
|
+
export declare const getAnswersCorrectness: (answers: any, validation: any) => any;
|
|
11
|
+
//# sourceMappingURL=utils-correctness.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils-correctness.d.ts","sourceRoot":"","sources":["../../src/delivery/utils-correctness.ts"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAgDH,eAAO,MAAM,oBAAoB,GAAI,YAAO,EAAE,eAAU,QAuBvD,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAI,YAAO,EAAE,eAAU,QAuBxD,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { camelizeKeys as e } from "humps";
|
|
2
|
+
//#region src/delivery/utils-correctness.ts
|
|
3
|
+
var t = (e, t) => (e || []).map((e) => ({
|
|
4
|
+
...e,
|
|
5
|
+
isCorrect: (t[e.containerIndex] && t[e.containerIndex].images || []).includes(e.value)
|
|
6
|
+
})), n = (e, t) => (t[e.containerIndex].images || []).filter((t) => t === e.value), r = (e, t) => {
|
|
7
|
+
let r = e;
|
|
8
|
+
return e.forEach((i) => {
|
|
9
|
+
let a = e.filter((e) => e.value === i.value && e.containerIndex === i.containerIndex);
|
|
10
|
+
a.length > 1 && (a.shift(), a.forEach((e, i) => {
|
|
11
|
+
r = (r || []).map((r) => {
|
|
12
|
+
if (r.id === e.id) {
|
|
13
|
+
let e = n(r, t);
|
|
14
|
+
return {
|
|
15
|
+
...r,
|
|
16
|
+
isCorrect: e.length > i + 1
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
return r;
|
|
20
|
+
});
|
|
21
|
+
}));
|
|
22
|
+
}), r;
|
|
23
|
+
}, i = (t, n) => {
|
|
24
|
+
let { validResponse: { value: r } = {} } = e(n);
|
|
25
|
+
return (r || []).reduce((e, n, r) => {
|
|
26
|
+
let i = !!t.find((e) => e.containerIndex === r);
|
|
27
|
+
return n.images = n.images || [], i ? e : [...e, {
|
|
28
|
+
id: `unanswered-${r}`,
|
|
29
|
+
value: n.images[0] || "",
|
|
30
|
+
containerIndex: r,
|
|
31
|
+
isCorrect: n.images.length ? !1 : void 0,
|
|
32
|
+
hidden: !0
|
|
33
|
+
}];
|
|
34
|
+
}, []);
|
|
35
|
+
}, a = (n, i) => {
|
|
36
|
+
let { validResponse: { value: a }, altResponses: o } = e(i), s = r(t(n, a), a);
|
|
37
|
+
return s.filter((e) => e.isCorrect).length < s.length && o && o.length ? (o || []).map((e) => {
|
|
38
|
+
let i = e.value;
|
|
39
|
+
return r(t(n, i), i);
|
|
40
|
+
}).sort((e, t) => t.filter((e) => e.isCorrect).length - e.filter((e) => e.isCorrect).length)[0] : s;
|
|
41
|
+
};
|
|
42
|
+
//#endregion
|
|
43
|
+
export { a as getAnswersCorrectness, i as getUnansweredAnswers };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IIFE entry point for image-cloze-association element
|
|
3
|
+
* This file is only used for IIFE builds and includes auto-registration
|
|
4
|
+
*
|
|
5
|
+
* @sync-generated - Auto-generated during sync from pie-elements
|
|
6
|
+
*/
|
|
7
|
+
import Element from './index.js';
|
|
8
|
+
export default Element;
|
|
9
|
+
//# sourceMappingURL=index.iife.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.iife.d.ts","sourceRoot":"","sources":["../src/index.iife.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,OAAO,MAAM,YAAY,CAAC;AAQjC,eAAe,OAAO,CAAC"}
|