@pie-element/explicit-constructed-response 11.1.1-next.1 → 11.1.1-next.11
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/CHANGELOG.json +1102 -0
- package/CHANGELOG.md +2183 -0
- package/LICENSE.md +5 -0
- package/README.md +1 -0
- package/configure/CHANGELOG.json +652 -0
- package/configure/CHANGELOG.md +1924 -0
- package/configure/lib/alternateResponses.js +199 -0
- package/configure/lib/alternateResponses.js.map +1 -0
- package/configure/lib/alternateSection.js +329 -0
- package/configure/lib/alternateSection.js.map +1 -0
- package/configure/lib/defaults.js +184 -0
- package/configure/lib/defaults.js.map +1 -0
- package/configure/lib/ecr-toolbar.js +181 -0
- package/configure/lib/ecr-toolbar.js.map +1 -0
- package/configure/lib/index.js +161 -0
- package/configure/lib/index.js.map +1 -0
- package/configure/lib/main.js +501 -0
- package/configure/lib/main.js.map +1 -0
- package/configure/lib/markupUtils.js +70 -0
- package/configure/lib/markupUtils.js.map +1 -0
- package/configure/lib/utils.js +15 -0
- package/configure/lib/utils.js.map +1 -0
- package/configure/package.json +22 -0
- package/controller/CHANGELOG.json +517 -0
- package/controller/CHANGELOG.md +1340 -0
- package/controller/lib/defaults.js +23 -0
- package/controller/lib/defaults.js.map +1 -0
- package/controller/lib/index.js +368 -0
- package/controller/lib/index.js.map +1 -0
- package/controller/package.json +18 -0
- package/docs/config-schema.json +2629 -0
- package/docs/config-schema.json.md +1941 -0
- package/docs/demo/config.js +8 -0
- package/docs/demo/generate.js +20 -0
- package/docs/demo/index.html +1 -0
- package/docs/demo/session.js +10 -0
- package/docs/pie-schema.json +1130 -0
- package/docs/pie-schema.json.md +814 -0
- package/lib/index.js +91 -0
- package/lib/index.js.map +1 -0
- package/lib/main.js +205 -0
- package/lib/main.js.map +1 -0
- package/lib/print.js +71 -0
- package/lib/print.js.map +1 -0
- package/module/configure.js +1 -0
- package/module/controller.js +6534 -0
- package/module/demo.js +45 -0
- package/module/element.js +1 -0
- package/module/index.html +21 -0
- package/module/manifest.json +18 -0
- package/module/print-demo.js +83 -0
- package/module/print.html +18 -0
- package/module/print.js +1 -0
- package/package.json +24 -61
- package/dist/_virtual/_rolldown/runtime.js +0 -4
- package/dist/author/alternateResponses.d.ts +0 -34
- package/dist/author/alternateResponses.js +0 -116
- package/dist/author/alternateSection.d.ts +0 -58
- package/dist/author/alternateSection.js +0 -215
- package/dist/author/defaults.d.ts +0 -186
- package/dist/author/defaults.js +0 -128
- package/dist/author/ecr-toolbar.d.ts +0 -41
- package/dist/author/ecr-toolbar.js +0 -100
- package/dist/author/index.d.ts +0 -42
- package/dist/author/index.js +0 -94
- package/dist/author/main.d.ts +0 -38
- package/dist/author/main.js +0 -323
- package/dist/author/markupUtils.d.ts +0 -14
- package/dist/author/markupUtils.js +0 -13
- package/dist/author/utils.d.ts +0 -9
- package/dist/author/utils.js +0 -7
- package/dist/controller/defaults.d.ts +0 -25
- package/dist/controller/defaults.js +0 -19
- package/dist/controller/index.d.ts +0 -64
- package/dist/controller/index.js +0 -142
- package/dist/delivery/index.d.ts +0 -20
- package/dist/delivery/index.js +0 -66
- package/dist/delivery/main.d.ts +0 -48
- package/dist/delivery/main.js +0 -117
- package/dist/explicit-constructed-response.css +0 -2
- package/dist/index.d.ts +0 -1
- package/dist/index.iife.d.ts +0 -8
- package/dist/index.iife.js +0 -364
- package/dist/index.js +0 -2
- package/dist/node_modules/.bun/he@1.2.0/node_modules/he/he.js +0 -3993
- 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/_baseFindIndex.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseFlatten.js +0 -13
- 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/_basePick.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_basePickBy.js +0 -13
- 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/_baseSet.js +0 -22
- 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/_baseTrim.js +0 -8
- 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/_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/_createFind.js +0 -19
- 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/_flatRest.js +0 -9
- 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/_isFlattenable.js +0 -10
- 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/_trimmedEndIndex.js +0 -8
- 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/debounce.js +0 -50
- 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/find.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/findIndex.js +0 -13
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/flatten.js +0 -7
- 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/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/now.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/pick.js +0 -8
- 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/throttle.js +0 -15
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toFinite.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toInteger.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toNumber.js +0 -19
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toString.js +0 -7
- package/dist/print/index.d.ts +0 -15
- package/dist/print/index.js +0 -40
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @synced-from pie-elements/packages/explicit-constructed-response/controller/src/defaults.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
|
-
declare const _default: {
|
|
10
|
-
choices: {};
|
|
11
|
-
displayType: string;
|
|
12
|
-
markup: string;
|
|
13
|
-
maxLengthPerChoiceEnabled: boolean;
|
|
14
|
-
playerSpellCheckEnabled: boolean;
|
|
15
|
-
prompt: string;
|
|
16
|
-
promptEnabled: boolean;
|
|
17
|
-
rationale: string;
|
|
18
|
-
rationaleEnabled: boolean;
|
|
19
|
-
spellCheckEnabled: boolean;
|
|
20
|
-
studentInstructionsEnabled: boolean;
|
|
21
|
-
teacherInstructions: string;
|
|
22
|
-
teacherInstructionsEnabled: boolean;
|
|
23
|
-
toolbarEditorPosition: string;
|
|
24
|
-
};
|
|
25
|
-
export default _default;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
//#region src/controller/defaults.ts
|
|
2
|
-
var e = {
|
|
3
|
-
choices: {},
|
|
4
|
-
displayType: "block",
|
|
5
|
-
markup: "",
|
|
6
|
-
maxLengthPerChoiceEnabled: !0,
|
|
7
|
-
playerSpellCheckEnabled: !0,
|
|
8
|
-
prompt: "",
|
|
9
|
-
promptEnabled: !0,
|
|
10
|
-
rationale: "",
|
|
11
|
-
rationaleEnabled: !0,
|
|
12
|
-
spellCheckEnabled: !0,
|
|
13
|
-
studentInstructionsEnabled: !0,
|
|
14
|
-
teacherInstructions: "",
|
|
15
|
-
teacherInstructionsEnabled: !0,
|
|
16
|
-
toolbarEditorPosition: "bottom"
|
|
17
|
-
};
|
|
18
|
-
//#endregion
|
|
19
|
-
export { e as default };
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @synced-from pie-elements/packages/explicit-constructed-response/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 prepareChoice: (mode: any, defaultFeedback: any) => (choice: any) => {
|
|
10
|
-
label: any;
|
|
11
|
-
value: any;
|
|
12
|
-
};
|
|
13
|
-
export declare const normalize: (question: any) => any;
|
|
14
|
-
/**
|
|
15
|
-
*
|
|
16
|
-
* @param {*} question
|
|
17
|
-
* @param {*} session
|
|
18
|
-
* @param {*} env
|
|
19
|
-
*/
|
|
20
|
-
export declare function model(question: any, session: any, env: any): Promise<{
|
|
21
|
-
choices: any;
|
|
22
|
-
disabled: boolean;
|
|
23
|
-
displayType: any;
|
|
24
|
-
mode: any;
|
|
25
|
-
role: any;
|
|
26
|
-
feedback: any;
|
|
27
|
-
language: any;
|
|
28
|
-
markup: any;
|
|
29
|
-
maxLengthPerChoice: any;
|
|
30
|
-
maxLengthPerChoiceEnabled: any;
|
|
31
|
-
note: any;
|
|
32
|
-
playerSpellCheckEnabled: any;
|
|
33
|
-
prompt: any;
|
|
34
|
-
rationale: string;
|
|
35
|
-
responseCorrect: boolean | undefined;
|
|
36
|
-
showNote: boolean;
|
|
37
|
-
teacherInstructions: string;
|
|
38
|
-
responseAreaInputConfiguration: any;
|
|
39
|
-
extraCSSRules: any;
|
|
40
|
-
}>;
|
|
41
|
-
export declare const prepareVal: (html: any) => any;
|
|
42
|
-
export declare const getScore: (config: any, session: any) => number;
|
|
43
|
-
/**
|
|
44
|
-
* Generates detailed trace log for scoring evaluation
|
|
45
|
-
* @param {Object} model - the question model
|
|
46
|
-
* @param {Object} session - the student session
|
|
47
|
-
* @param {Object} env - the environment
|
|
48
|
-
* @returns {Array} traceLog - array of trace messages
|
|
49
|
-
*/
|
|
50
|
-
export declare const getLogTrace: (model: any, session: any, env: any) => string[];
|
|
51
|
-
/**
|
|
52
|
-
* The score is partial by default for checkbox mode, allOrNothing for radio mode.
|
|
53
|
-
* To disable partial scoring for checkbox mode you either set model.partialScoring = false or env.partialScoring =
|
|
54
|
-
* false. the value in `env` will override the value in `model`.
|
|
55
|
-
* @param {Object} model - the main model
|
|
56
|
-
* @param {boolean} model.partialScoring - is partial scoring enabled (if undefined set to to true)
|
|
57
|
-
* @param {*} session
|
|
58
|
-
* @param {Object} env
|
|
59
|
-
* @param {boolean} env.partialScoring - is partial scoring enabled (if undefined default to true) This overrides
|
|
60
|
-
* `model.partialScoring`.
|
|
61
|
-
*/
|
|
62
|
-
export declare function outcome(model: any, session: any, env?: {}): Promise<unknown>;
|
|
63
|
-
export declare const createCorrectResponseSession: (question: any, env: any) => Promise<unknown>;
|
|
64
|
-
export declare const validate: (model?: {}, config?: {}) => {};
|
package/dist/controller/index.js
DELETED
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
import e from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/find.js";
|
|
2
|
-
import t from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/map.js";
|
|
3
|
-
import n from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.js";
|
|
4
|
-
import r from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/reduce.js";
|
|
5
|
-
import { require_he as i } from "../node_modules/.bun/he@1.2.0/node_modules/he/he.js";
|
|
6
|
-
import a from "./defaults.js";
|
|
7
|
-
import o from "@pie-lib/translator";
|
|
8
|
-
import s from "debug";
|
|
9
|
-
import { partialScoring as c } from "@pie-element/shared-controller-utils";
|
|
10
|
-
//#region src/controller/index.ts
|
|
11
|
-
var l = i(), { translator: u } = o, d = s("explicit-constructed-response:controller"), f = (e, t) => (n) => {
|
|
12
|
-
let r = {
|
|
13
|
-
label: n.label,
|
|
14
|
-
value: n.value
|
|
15
|
-
};
|
|
16
|
-
if (e === "evaluate") {
|
|
17
|
-
r.correct = !0;
|
|
18
|
-
let e = n.feedback && n.feedback.type || "none";
|
|
19
|
-
e === "default" ? r.feedback = t.correct : e === "custom" && (r.feedback = n.feedback.value);
|
|
20
|
-
}
|
|
21
|
-
return r;
|
|
22
|
-
}, p = (e) => e ? "correct" : "incorrect", m = (e) => Math.abs(e) === Infinity ? 2 : e <= 2 ? e + 2 : e <= 4 ? e + 3 : e <= 6 ? e + 4 : e + 5, h = (e) => e ? e.replace(/</g, "<").replace(/>/g, ">").replace(/"/g, "\"").replace(/'|'/g, "'").replace(/&/g, "&") : "", g = (e) => ({
|
|
23
|
-
...a,
|
|
24
|
-
...e
|
|
25
|
-
});
|
|
26
|
-
async function _(i, o, s) {
|
|
27
|
-
i.choices && Object.keys(i.choices).forEach((e) => {
|
|
28
|
-
i.choices[e] = (i.choices[e] || []).map((e, t) => e.value ? e : (d("Choice does not contain \"value\" property, which is required.", e), {
|
|
29
|
-
value: `${t}`,
|
|
30
|
-
...e
|
|
31
|
-
}));
|
|
32
|
-
});
|
|
33
|
-
let c = g(i), l = Object.assign({
|
|
34
|
-
correct: "Correct",
|
|
35
|
-
incorrect: "Incorrect"
|
|
36
|
-
}, c.defaultFeedback), _ = f(s.mode, l), b = r(c.choices, (e, n, r) => (e[r] = t(n, _), e), {}), { value: x = {} } = o || {}, S = s.mode === "evaluate" ? r(c.choices, (t, r, i) => {
|
|
37
|
-
let a = x && x[i];
|
|
38
|
-
return t[i] = p(!n(a) && e(r, (e) => v(e.label) === v(a))), t;
|
|
39
|
-
}, {}) : {}, C = Object.values(b).some((e) => e?.length > 1), w = c.note || u.t("common:commonCorrectAnswerWithAlternates", { lng: c.language }), { maxLengthPerChoice: T = [], maxLengthPerChoiceEnabled: E } = c, D = !T.length;
|
|
40
|
-
Object.values(b).forEach((e, t) => {
|
|
41
|
-
let n = (e || []).map((e) => h(e.label || "").length), r = Math.max(...n);
|
|
42
|
-
(D || !T[t] || T[t] < r || T[t] > r + 10) && (T[t] = m(r));
|
|
43
|
-
});
|
|
44
|
-
let O = {
|
|
45
|
-
choices: b,
|
|
46
|
-
disabled: s.mode !== "gather",
|
|
47
|
-
displayType: c.displayType,
|
|
48
|
-
mode: s.mode,
|
|
49
|
-
role: s.role,
|
|
50
|
-
feedback: S,
|
|
51
|
-
language: c.language,
|
|
52
|
-
markup: c.markup,
|
|
53
|
-
maxLengthPerChoice: T,
|
|
54
|
-
maxLengthPerChoiceEnabled: E,
|
|
55
|
-
note: w,
|
|
56
|
-
playerSpellCheckEnabled: c.playerSpellCheckEnabled,
|
|
57
|
-
prompt: c.promptEnabled ? c.prompt : a.prompt,
|
|
58
|
-
rationale: a.rationale,
|
|
59
|
-
responseCorrect: s.mode === "evaluate" ? y(c, o) === 1 : void 0,
|
|
60
|
-
showNote: C,
|
|
61
|
-
teacherInstructions: a.teacherInstructions,
|
|
62
|
-
responseAreaInputConfiguration: c.responseAreaInputConfiguration,
|
|
63
|
-
extraCSSRules: c.extraCSSRules
|
|
64
|
-
};
|
|
65
|
-
return s.role === "instructor" && (s.mode === "view" || s.mode === "evaluate") && (O.rationale = c.rationaleEnabled ? c.rationale : a.rationale, O.teacherInstructions = c.teacherInstructionsEnabled ? c.teacherInstructions : a.teacherInstructions), O;
|
|
66
|
-
}
|
|
67
|
-
var v = (e) => w(C(e).trim()), y = (t, i) => {
|
|
68
|
-
let { value: a } = i || {};
|
|
69
|
-
if (!i || n(i) || !a) return 0;
|
|
70
|
-
let o = t.markup && t.markup.match(/\{\{(.+?)\}\}/g), s = o ? o.length : 0, c = r(t.choices, (t, r, i) => {
|
|
71
|
-
let o = a && a[i];
|
|
72
|
-
return n(o) || !e(r, (e) => v(e.label) === v(o)) ? t : t + 1;
|
|
73
|
-
}, 0), l = s ? (c / s).toFixed(2) : 0;
|
|
74
|
-
return parseFloat(l);
|
|
75
|
-
}, b = (e, t, r) => {
|
|
76
|
-
let i = [], { value: a } = t || {}, { choices: o, markup: s } = e || {}, l = s ? s.match(/\{\{(.+?)\}\}/g) : [], u = l ? l.length : 0;
|
|
77
|
-
if (i.push(`${u} response area(s) defined in this question.`), a && Object.keys(a).length > 0) {
|
|
78
|
-
let e = Object.entries(a).filter(([e, t]) => t && t.trim()).length;
|
|
79
|
-
i.push(`Student filled ${e} out of ${u} response area(s).`), Object.keys(o || {}).forEach((e) => {
|
|
80
|
-
let t = a && a[e] || "", r = o[e] || [], s = !n(t.trim()) && r.some((e) => v(e.label) === v(t));
|
|
81
|
-
t.trim() ? i.push(`Response area ${parseInt(e) + 1}: ${s ? "CORRECT" : "INCORRECT"}.`) : i.push(`Response area ${parseInt(e) + 1}: left empty.`);
|
|
82
|
-
});
|
|
83
|
-
} else i.push("Student did not fill any response areas.");
|
|
84
|
-
if (Object.values(o || {}).some((e) => e.length > 1) && i.push("Alternate answers are accepted for some response areas."), c.enabled(e, r)) {
|
|
85
|
-
if (i.push("Score calculated using partial scoring."), i.push("Student receives credit for each correctly filled response area."), a && Object.keys(a).length > 0) {
|
|
86
|
-
let e = 0;
|
|
87
|
-
Object.keys(o || {}).forEach((t) => {
|
|
88
|
-
let r = a && a[t] || "", i = o[t] || [];
|
|
89
|
-
!n(r.trim()) && i.some((e) => v(e.label) === v(r)) && e++;
|
|
90
|
-
}), i.push(`Partial scoring: ${e} correct out of ${u} response areas.`);
|
|
91
|
-
}
|
|
92
|
-
} else i.push("Score calculated using all-or-nothing scoring."), i.push("Student must fill all response areas correctly to receive full credit.");
|
|
93
|
-
let d = y(e, t);
|
|
94
|
-
return i.push(`Score: ${d}.`), i;
|
|
95
|
-
};
|
|
96
|
-
function x(e, t, r = {}) {
|
|
97
|
-
return new Promise((i) => {
|
|
98
|
-
if (!t || n(t)) i({
|
|
99
|
-
score: 0,
|
|
100
|
-
empty: !0,
|
|
101
|
-
traceLog: ["Student did not fill any response areas. Score: 0."]
|
|
102
|
-
});
|
|
103
|
-
else {
|
|
104
|
-
let n = b(e, t, r), a = c.enabled(e, r), o = y(e, t);
|
|
105
|
-
i({
|
|
106
|
-
score: a ? o : +(o === 1),
|
|
107
|
-
empty: !1,
|
|
108
|
-
traceLog: n
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
|
-
var S = (e, t) => new Promise((n) => {
|
|
114
|
-
if (t.mode !== "evaluate" && t.role === "instructor") {
|
|
115
|
-
let { choices: t } = e, r = {};
|
|
116
|
-
Object.keys(t).forEach((e, n) => {
|
|
117
|
-
r[n] = t[e][0].label;
|
|
118
|
-
}), n({
|
|
119
|
-
id: "1",
|
|
120
|
-
value: r
|
|
121
|
-
});
|
|
122
|
-
} else n(null);
|
|
123
|
-
}), C = (e) => typeof e == "string" ? typeof e.replaceAll == "function" ? e.replaceAll(/<[^>]*>/g, "") : e.replace(/<[^>]*>/g, "") : "", w = (e) => (0, l.decode)(e), T = (e) => (e || "").replace(/(<(?!img|iframe|source)([^>]+)>)/gi, ""), E = (e = {}, t = {}) => {
|
|
124
|
-
let { choices: r, markup: i } = e, { maxResponseAreas: a } = t, o = {}, s = {};
|
|
125
|
-
[
|
|
126
|
-
"teacherInstructions",
|
|
127
|
-
"prompt",
|
|
128
|
-
"rationale"
|
|
129
|
-
].forEach((n) => {
|
|
130
|
-
t[n]?.required && !T(e[n]) && (s[n] = "This field is required.");
|
|
131
|
-
}), Object.entries(r || {}).forEach(([e, t]) => {
|
|
132
|
-
let r = [...t || []].reverse(), i = {};
|
|
133
|
-
r.forEach((e, t) => {
|
|
134
|
-
let { value: n, label: a } = e;
|
|
135
|
-
a === "" || a === "<div></div>" ? i[n] = "Content should not be empty." : r.slice(t + 1).some((e) => e.label === a) && (i[n] = "Content should be unique.");
|
|
136
|
-
}), n(i) || (o[e] = i);
|
|
137
|
-
});
|
|
138
|
-
let c = (i.match(/\{\{(\d+)\}\}/g) || []).length;
|
|
139
|
-
return c > a ? s.responseAreas = `No more than ${a} response areas should be defined.` : c < 1 && (s.responseAreas = "There should be at least 1 response area defined."), n(o) || (s.choices = o), s;
|
|
140
|
-
};
|
|
141
|
-
//#endregion
|
|
142
|
-
export { S as createCorrectResponseSession, b as getLogTrace, y as getScore, _ as model, g as normalize, x as outcome, f as prepareChoice, v as prepareVal, E as validate };
|
package/dist/delivery/index.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @synced-from pie-elements/packages/explicit-constructed-response/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 InlineDropdown extends HTMLElement {
|
|
10
|
-
constructor();
|
|
11
|
-
setLangAttribute(): void;
|
|
12
|
-
set model(m: any);
|
|
13
|
-
set session(s: any);
|
|
14
|
-
get session(): any;
|
|
15
|
-
_render: any;
|
|
16
|
-
dispatchChangedEvent: any;
|
|
17
|
-
changeSession: any;
|
|
18
|
-
connectedCallback(): void;
|
|
19
|
-
disconnectedCallback(): void;
|
|
20
|
-
}
|
package/dist/delivery/index.js
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import e from "./main.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
|
-
setLangAttribute() {
|
|
12
|
-
let e = this._model && typeof this._model.language ? this._model.language : "", t = e ? e.slice(0, 2) : "en";
|
|
13
|
-
this.setAttribute("lang", t);
|
|
14
|
-
}
|
|
15
|
-
set model(e) {
|
|
16
|
-
this._model = e, this.dispatchEvent(new r(this.tagName.toLowerCase(), this.session && !!this.session.value, !!this._model)), this.setLangAttribute(), this._render();
|
|
17
|
-
}
|
|
18
|
-
set session(e) {
|
|
19
|
-
this._session = e, this._render();
|
|
20
|
-
}
|
|
21
|
-
get session() {
|
|
22
|
-
return this._session;
|
|
23
|
-
}
|
|
24
|
-
_render = () => {
|
|
25
|
-
if (this._model && this._session) {
|
|
26
|
-
let r = t.createElement(e, {
|
|
27
|
-
choices: this._model.choices,
|
|
28
|
-
disabled: this._model.disabled,
|
|
29
|
-
displayType: this._model.displayType,
|
|
30
|
-
feedback: this._model.feedback,
|
|
31
|
-
language: this._model.language,
|
|
32
|
-
markup: this._model.markup,
|
|
33
|
-
maxLengthPerChoice: this._model.maxLengthPerChoice,
|
|
34
|
-
maxLengthPerChoiceEnabled: this._model.maxLengthPerChoiceEnabled,
|
|
35
|
-
mode: this._model.mode,
|
|
36
|
-
note: this._model.note,
|
|
37
|
-
onChange: this.changeSession,
|
|
38
|
-
playerSpellCheckEnabled: this._model.playerSpellCheckEnabled,
|
|
39
|
-
prompt: this._model.prompt,
|
|
40
|
-
rationale: this._model.rationale,
|
|
41
|
-
role: this._model.role,
|
|
42
|
-
showNote: this._model.showNote,
|
|
43
|
-
teacherInstructions: this._model.teacherInstructions,
|
|
44
|
-
value: this._session.value,
|
|
45
|
-
responseAreaInputConfiguration: this._model.responseAreaInputConfiguration
|
|
46
|
-
});
|
|
47
|
-
this._root ||= n(this), this._root.render(r), queueMicrotask(() => {
|
|
48
|
-
a(this);
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
dispatchChangedEvent = () => {
|
|
53
|
-
this.dispatchEvent(new i(this.tagName.toLowerCase(), this.session && !!this.session.value));
|
|
54
|
-
};
|
|
55
|
-
changeSession = (e) => {
|
|
56
|
-
this.session.value = e, this.dispatchChangedEvent(), this._render();
|
|
57
|
-
};
|
|
58
|
-
connectedCallback() {
|
|
59
|
-
this.setAttribute("aria-label", "Fill in the Blank Question"), this.setAttribute("role", "region"), this._render();
|
|
60
|
-
}
|
|
61
|
-
disconnectedCallback() {
|
|
62
|
-
this._root && this._root.unmount();
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
//#endregion
|
|
66
|
-
export { o as default };
|
package/dist/delivery/main.d.ts
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @synced-from pie-elements/packages/explicit-constructed-response/src/main.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 Main extends React.Component {
|
|
12
|
-
static propTypes: {
|
|
13
|
-
alwaysShowCorrect: PropTypes.Requireable<boolean>;
|
|
14
|
-
animationsDisabled: PropTypes.Requireable<boolean>;
|
|
15
|
-
disabled: PropTypes.Requireable<boolean>;
|
|
16
|
-
displayType: PropTypes.Requireable<string>;
|
|
17
|
-
feedback: PropTypes.Requireable<object>;
|
|
18
|
-
language: PropTypes.Requireable<string>;
|
|
19
|
-
markup: PropTypes.Requireable<string>;
|
|
20
|
-
maxLengthPerChoice: PropTypes.Requireable<any[]>;
|
|
21
|
-
maxLengthPerChoiceEnabled: PropTypes.Requireable<boolean>;
|
|
22
|
-
mode: PropTypes.Requireable<string>;
|
|
23
|
-
note: PropTypes.Requireable<string>;
|
|
24
|
-
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
25
|
-
playerSpellCheckEnabled: PropTypes.Requireable<boolean>;
|
|
26
|
-
prompt: PropTypes.Requireable<string>;
|
|
27
|
-
rationale: PropTypes.Requireable<string>;
|
|
28
|
-
role: PropTypes.Requireable<string>;
|
|
29
|
-
showNote: PropTypes.Requireable<boolean>;
|
|
30
|
-
teacherInstructions: PropTypes.Requireable<string>;
|
|
31
|
-
value: PropTypes.Requireable<object>;
|
|
32
|
-
responseAreaInputConfiguration: PropTypes.Requireable<object>;
|
|
33
|
-
model: PropTypes.Validator<object>;
|
|
34
|
-
};
|
|
35
|
-
static defaultProps: {
|
|
36
|
-
value: {};
|
|
37
|
-
};
|
|
38
|
-
state: {
|
|
39
|
-
showCorrectAnswer: any;
|
|
40
|
-
};
|
|
41
|
-
getChangeSession: (maxLengthPerChoice: any) => any;
|
|
42
|
-
UNSAFE_componentWillReceiveProps(nextProps: any): void;
|
|
43
|
-
toggleShowCorrect: any;
|
|
44
|
-
changeSession: any;
|
|
45
|
-
onChange: any;
|
|
46
|
-
render(): React.JSX.Element;
|
|
47
|
-
}
|
|
48
|
-
export default Main;
|
package/dist/delivery/main.js
DELETED
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import e from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/debounce.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/isEqual.js";
|
|
4
|
-
import r from "react";
|
|
5
|
-
import i from "prop-types";
|
|
6
|
-
import a from "@pie-lib/correct-answer-toggle";
|
|
7
|
-
import { ConstructedResponse 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
|
-
import _ from "@pie-lib/translator";
|
|
13
|
-
//#region src/delivery/main.tsx
|
|
14
|
-
function v(e) {
|
|
15
|
-
return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
|
|
16
|
-
}
|
|
17
|
-
function y(e, t) {
|
|
18
|
-
return !e || v(e) ? e : v(e.default) ? e.default : t && v(e[t]) ? e[t] : t && v(e[t]?.default) ? e[t].default : e;
|
|
19
|
-
}
|
|
20
|
-
var b = y(u, "UiLayout") || y(T.UiLayout, "UiLayout"), x = y(l, "PreviewPrompt") || y(T.PreviewPrompt, "PreviewPrompt"), S = y(c, "Collapsible") || y(T.Collapsible, "Collapsible"), C = s, w = C.default, T = w && typeof w == "object" ? w : C, { translator: E } = _, D = g(b)(({ alwaysShowCorrect: e }) => ({
|
|
21
|
-
color: d.text(),
|
|
22
|
-
backgroundColor: d.background(),
|
|
23
|
-
...e && { "& *": { borderColor: `${d.text()} !important` } }
|
|
24
|
-
})), O = g("div")(({ theme: e }) => ({ marginBottom: e.spacing(2) })), k = g("div")(({ theme: e }) => ({ marginBottom: e.spacing(2) })), A = g("h2")({
|
|
25
|
-
position: "absolute",
|
|
26
|
-
left: "-10000px",
|
|
27
|
-
top: "auto",
|
|
28
|
-
width: "1px",
|
|
29
|
-
height: "1px",
|
|
30
|
-
overflow: "hidden"
|
|
31
|
-
}), j = class extends r.Component {
|
|
32
|
-
static propTypes = {
|
|
33
|
-
alwaysShowCorrect: i.bool,
|
|
34
|
-
animationsDisabled: i.bool,
|
|
35
|
-
disabled: i.bool,
|
|
36
|
-
displayType: i.string,
|
|
37
|
-
feedback: i.object,
|
|
38
|
-
language: i.string,
|
|
39
|
-
markup: i.string,
|
|
40
|
-
maxLengthPerChoice: i.array,
|
|
41
|
-
maxLengthPerChoiceEnabled: i.bool,
|
|
42
|
-
mode: i.string,
|
|
43
|
-
note: i.string,
|
|
44
|
-
onChange: i.func,
|
|
45
|
-
playerSpellCheckEnabled: i.bool,
|
|
46
|
-
prompt: i.string,
|
|
47
|
-
rationale: i.string,
|
|
48
|
-
role: i.string,
|
|
49
|
-
showNote: i.bool,
|
|
50
|
-
teacherInstructions: i.string,
|
|
51
|
-
value: i.object,
|
|
52
|
-
responseAreaInputConfiguration: i.object,
|
|
53
|
-
model: i.object.isRequired
|
|
54
|
-
};
|
|
55
|
-
static defaultProps = { value: {} };
|
|
56
|
-
state = { showCorrectAnswer: this.props.alwaysShowCorrect || !1 };
|
|
57
|
-
getChangeSession = (t) => t && t.every((e, t, n) => e === n[0] && e === 1) ? this.props.onChange : e(this.props.onChange, 200, { maxWait: 200 });
|
|
58
|
-
UNSAFE_componentWillReceiveProps(e) {
|
|
59
|
-
let { maxLengthPerChoice: r, language: i } = this.props, { note: a } = this.props;
|
|
60
|
-
t(e.feedback) && this.setState({ showCorrectAnswer: !1 }), e.alwaysShowCorrect && this.setState({ showCorrectAnswer: !0 }), r && !n(r, e.maxLengthPerChoice) && (this.changeSession = this.getChangeSession(e.maxLengthPerChoice)), a && i && i !== e.language && a === E.t("common:commonCorrectAnswerWithAlternates", { lng: i }) && (a = E.t("common:commonCorrectAnswerWithAlternates", { lng: e.language }));
|
|
61
|
-
}
|
|
62
|
-
toggleShowCorrect = () => {
|
|
63
|
-
this.setState({ showCorrectAnswer: !this.state.showCorrectAnswer });
|
|
64
|
-
};
|
|
65
|
-
changeSession = this.getChangeSession(this.props.maxLengthPerChoice);
|
|
66
|
-
onChange = (e) => {
|
|
67
|
-
this.changeSession(e);
|
|
68
|
-
};
|
|
69
|
-
render() {
|
|
70
|
-
let { showCorrectAnswer: e } = this.state, { alwaysShowCorrect: t, animationsDisabled: n, mode: r, displayType: i, role: s, language: c, maxLengthPerChoice: l, maxLengthPerChoiceEnabled: u, note: d, playerSpellCheckEnabled: g, prompt: _, rationale: v, showNote: y, teacherInstructions: b, responseAreaInputConfiguration: C, model: w, value: T } = this.props, { extraCSSRules: E } = w || {}, j = (e || r === "view" && s === "instructor") && y && d, M = /* @__PURE__ */ m(x, {
|
|
71
|
-
defaultClassName: "teacher-instructions",
|
|
72
|
-
prompt: b
|
|
73
|
-
}), N = /* @__PURE__ */ m(x, { prompt: v }), P = v && (p(v) || f(v)), F = b && (p(b) || f(b));
|
|
74
|
-
return /* @__PURE__ */ h(D, {
|
|
75
|
-
extraCSSRules: E,
|
|
76
|
-
alwaysShowCorrect: t,
|
|
77
|
-
style: { display: `${i}` },
|
|
78
|
-
children: [
|
|
79
|
-
r === "gather" && /* @__PURE__ */ m(A, { children: "Fill in the Blank Question" }),
|
|
80
|
-
F && /* @__PURE__ */ m(k, { children: n ? M : /* @__PURE__ */ m(S, {
|
|
81
|
-
labels: {
|
|
82
|
-
hidden: "Show Teacher Instructions",
|
|
83
|
-
visible: "Hide Teacher Instructions"
|
|
84
|
-
},
|
|
85
|
-
children: M
|
|
86
|
-
}) }),
|
|
87
|
-
_ && /* @__PURE__ */ m(x, { prompt: _ }),
|
|
88
|
-
!t && r === "evaluate" && /* @__PURE__ */ m(a, {
|
|
89
|
-
show: !0,
|
|
90
|
-
toggled: e,
|
|
91
|
-
onToggle: this.toggleShowCorrect,
|
|
92
|
-
language: c
|
|
93
|
-
}),
|
|
94
|
-
/* @__PURE__ */ m(o, {
|
|
95
|
-
...this.props,
|
|
96
|
-
onChange: this.onChange,
|
|
97
|
-
showCorrectAnswer: e,
|
|
98
|
-
value: T,
|
|
99
|
-
maxLength: l,
|
|
100
|
-
adjustedLimit: u,
|
|
101
|
-
spellCheck: g,
|
|
102
|
-
pluginProps: C
|
|
103
|
-
}),
|
|
104
|
-
j && /* @__PURE__ */ m(O, { dangerouslySetInnerHTML: { __html: d } }),
|
|
105
|
-
P && /* @__PURE__ */ m(k, { children: n ? N : /* @__PURE__ */ m(S, {
|
|
106
|
-
labels: {
|
|
107
|
-
hidden: "Show Rationale",
|
|
108
|
-
visible: "Hide Rationale"
|
|
109
|
-
},
|
|
110
|
-
children: N
|
|
111
|
-
}) })
|
|
112
|
-
]
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
|
-
};
|
|
116
|
-
//#endregion
|
|
117
|
-
export { j as default };
|