@pie-element/multiple-choice 13.1.1-next.0 → 13.2.0-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/CHANGELOG.json +1972 -0
- package/CHANGELOG.md +2696 -0
- package/LICENSE.md +5 -0
- package/PRINT.md +35 -0
- package/README.md +56 -0
- package/choice.png +0 -0
- package/configure/CHANGELOG.json +1387 -0
- package/configure/CHANGELOG.md +2046 -0
- package/{src/author/defaults.ts → configure/lib/defaults.js} +90 -55
- package/configure/lib/defaults.js.map +1 -0
- package/{src/author/index.ts → configure/lib/index.js} +51 -98
- package/configure/lib/index.js.map +1 -0
- package/configure/lib/main.js +477 -0
- package/configure/lib/main.js.map +1 -0
- package/configure/lib/utils.js +18 -0
- package/configure/lib/utils.js.map +1 -0
- package/configure/package.json +22 -0
- package/controller/CHANGELOG.json +527 -0
- package/controller/CHANGELOG.md +1388 -0
- package/{src/controller/defaults.ts → controller/lib/defaults.js} +8 -11
- package/controller/lib/defaults.js.map +1 -0
- package/{src/controller/index.ts → controller/lib/index.js} +109 -123
- package/controller/lib/index.js.map +1 -0
- package/controller/lib/utils.js +15 -0
- package/controller/lib/utils.js.map +1 -0
- package/controller/package.json +15 -0
- package/docs/config-schema.json +2993 -0
- package/docs/config-schema.json.md +2217 -0
- package/docs/demo/config.js +8 -0
- package/docs/demo/generate.js +61 -0
- package/docs/demo/index.html +1 -0
- package/docs/demo/session.js +7 -0
- package/docs/pie-schema.json +1332 -0
- package/docs/pie-schema.json.md +1015 -0
- package/lib/choice-input.js +380 -0
- package/lib/choice-input.js.map +1 -0
- package/lib/choice.js +197 -0
- package/lib/choice.js.map +1 -0
- package/lib/feedback-tick.js +134 -0
- package/lib/feedback-tick.js.map +1 -0
- package/{src/delivery/index.ts → lib/index.js} +129 -211
- package/lib/index.js.map +1 -0
- package/lib/main.js +63 -0
- package/lib/main.js.map +1 -0
- package/lib/multiple-choice.js +412 -0
- package/lib/multiple-choice.js.map +1 -0
- package/lib/print.js +94 -0
- package/lib/print.js.map +1 -0
- package/{src/delivery/session-updater.ts → lib/session-updater.js} +13 -17
- package/lib/session-updater.js.map +1 -0
- package/module/configure.js +1 -0
- package/module/controller.js +3045 -0
- package/module/demo.js +86 -0
- package/module/element.js +1 -0
- package/module/index.html +21 -0
- package/module/manifest.json +10 -0
- package/module/print-demo.js +124 -0
- package/module/print.html +18 -0
- package/module/print.js +1 -0
- package/package.json +26 -58
- package/dist/author/defaults.d.ts +0 -206
- package/dist/author/defaults.d.ts.map +0 -1
- package/dist/author/defaults.js +0 -151
- package/dist/author/index.d.ts +0 -27
- package/dist/author/index.d.ts.map +0 -1
- package/dist/author/index.js +0 -116
- package/dist/author/main.d.ts +0 -35
- package/dist/author/main.d.ts.map +0 -1
- package/dist/author/main.js +0 -290
- package/dist/author/utils.d.ts +0 -10
- package/dist/author/utils.d.ts.map +0 -1
- package/dist/author/utils.js +0 -7
- package/dist/controller/defaults.d.ts +0 -36
- package/dist/controller/defaults.d.ts.map +0 -1
- package/dist/controller/defaults.js +0 -29
- package/dist/controller/index.d.ts +0 -66
- package/dist/controller/index.d.ts.map +0 -1
- package/dist/controller/index.js +0 -124
- package/dist/controller/utils.d.ts +0 -11
- package/dist/controller/utils.d.ts.map +0 -1
- package/dist/controller/utils.js +0 -8
- package/dist/delivery/choice-input.d.ts +0 -45
- package/dist/delivery/choice-input.d.ts.map +0 -1
- package/dist/delivery/choice-input.js +0 -274
- package/dist/delivery/choice.d.ts +0 -21
- package/dist/delivery/choice.d.ts.map +0 -1
- package/dist/delivery/choice.js +0 -109
- package/dist/delivery/feedback-tick.d.ts +0 -21
- package/dist/delivery/feedback-tick.d.ts.map +0 -1
- package/dist/delivery/feedback-tick.js +0 -104
- package/dist/delivery/index.d.ts +0 -38
- package/dist/delivery/index.d.ts.map +0 -1
- package/dist/delivery/index.js +0 -217
- package/dist/delivery/main.d.ts +0 -32
- package/dist/delivery/main.d.ts.map +0 -1
- package/dist/delivery/main.js +0 -51
- package/dist/delivery/multiple-choice.d.ts +0 -63
- package/dist/delivery/multiple-choice.d.ts.map +0 -1
- package/dist/delivery/multiple-choice.js +0 -252
- package/dist/delivery/session-updater.d.ts +0 -11
- package/dist/delivery/session-updater.d.ts.map +0 -1
- package/dist/delivery/session-updater.js +0 -9
- package/dist/index.d.ts +0 -2
- package/dist/index.d.ts.map +0 -1
- package/dist/index.iife.d.ts +0 -9
- package/dist/index.iife.d.ts.map +0 -1
- package/dist/index.iife.js +0 -148
- package/dist/index.js +0 -2
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_DataView.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Hash.js +0 -16
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_ListCache.js +0 -16
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Map.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_MapCache.js +0 -16
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Promise.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Set.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_SetCache.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Stack.js +0 -13
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Symbol.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Uint8Array.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_WeakMap.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_apply.js +0 -12
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arrayEach.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arrayFilter.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arrayLikeKeys.js +0 -15
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arrayPush.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arraySome.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_assignMergeValue.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_assignValue.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_assocIndexOf.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseAssign.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseAssignIn.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseAssignValue.js +0 -12
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseClone.js +0 -57
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseCreate.js +0 -14
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseFor.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseGetAllKeys.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseGetTag.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsArguments.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsEqual.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsEqualDeep.js +0 -30
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsMap.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsNative.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsSet.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsTypedArray.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseKeys.js +0 -12
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseKeysIn.js +0 -13
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseMerge.js +0 -19
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseMergeDeep.js +0 -31
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseRest.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseSetToString.js +0 -14
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseTimes.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseTrim.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseUnary.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cacheHas.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneArrayBuffer.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneBuffer.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneDataView.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneRegExp.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneSymbol.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneTypedArray.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_copyArray.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_copyObject.js +0 -14
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_copySymbols.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_copySymbolsIn.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_coreJsData.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_createAssigner.js +0 -15
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_createBaseFor.js +0 -12
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_defineProperty.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_equalArrays.js +0 -35
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_equalByTag.js +0 -35
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_equalObjects.js +0 -32
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_freeGlobal.js +0 -4
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getAllKeys.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getAllKeysIn.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getMapData.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getNative.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getPrototype.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getRawTag.js +0 -14
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getSymbols.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getSymbolsIn.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getTag.js +0 -23
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getValue.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_hashClear.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_hashDelete.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_hashGet.js +0 -13
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_hashHas.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_hashSet.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_initCloneArray.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_initCloneByTag.js +0 -33
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_initCloneObject.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isIndex.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isIterateeCall.js +0 -12
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isKeyable.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isMasked.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isPrototype.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_listCacheClear.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_listCacheDelete.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_listCacheGet.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_listCacheHas.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_listCacheSet.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheClear.js +0 -13
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheDelete.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheGet.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheHas.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheSet.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapToArray.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_nativeCreate.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_nativeKeys.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_nativeKeysIn.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_nodeUtil.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_objectToString.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_overArg.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_overRest.js +0 -13
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_root.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_safeGet.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_setCacheAdd.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_setCacheHas.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_setToArray.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_setToString.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_shortOut.js +0 -14
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_stackClear.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_stackDelete.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_stackGet.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_stackHas.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_stackSet.js +0 -16
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_toSource.js +0 -15
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_trimmedEndIndex.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/cloneDeep.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/constant.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/debounce.js +0 -50
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/defaults.js +0 -16
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/eq.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/identity.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isArguments.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isArray.js +0 -4
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isArrayLike.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isArrayLikeObject.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isBuffer.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isEmpty.js +0 -21
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isEqual.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isFunction.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isLength.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isMap.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isObject.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isObjectLike.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isPlainObject.js +0 -14
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isSet.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isSymbol.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isTypedArray.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/keys.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/keysIn.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/merge.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/now.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/stubArray.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/stubFalse.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/toNumber.js +0 -19
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/toPlainObject.js +0 -8
- package/dist/print/index.d.ts +0 -16
- package/dist/print/index.d.ts.map +0 -1
- package/dist/print/index.js +0 -44
- package/src/author/main.tsx +0 -509
- package/src/author/utils.ts +0 -25
- package/src/controller/utils.ts +0 -22
- package/src/delivery/choice-input.tsx +0 -413
- package/src/delivery/choice.tsx +0 -203
- package/src/delivery/feedback-tick.tsx +0 -156
- package/src/delivery/main.tsx +0 -85
- package/src/delivery/multiple-choice.tsx +0 -485
- package/src/index.iife.ts +0 -16
- package/src/index.ts +0 -1
- package/src/print/index.tsx +0 -112
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import PrintElement from './print.js';
|
|
2
|
+
|
|
3
|
+
var generate = {};
|
|
4
|
+
|
|
5
|
+
generate.model = (id, element) => ({
|
|
6
|
+
id,
|
|
7
|
+
element,
|
|
8
|
+
choiceMode: 'checkbox',
|
|
9
|
+
choicePrefix: 'numbers',
|
|
10
|
+
choices: [
|
|
11
|
+
{
|
|
12
|
+
correct: true,
|
|
13
|
+
value: 'sweden',
|
|
14
|
+
label: 'Sweden',
|
|
15
|
+
feedback: {
|
|
16
|
+
type: 'none',
|
|
17
|
+
value: '',
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
value: 'iceland',
|
|
22
|
+
label: 'Iceland',
|
|
23
|
+
feedback: {
|
|
24
|
+
type: 'none',
|
|
25
|
+
value: '',
|
|
26
|
+
},
|
|
27
|
+
rationale: 'Rationale for Iceland',
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
value: 'norway',
|
|
31
|
+
label: 'Norway',
|
|
32
|
+
feedback: {
|
|
33
|
+
type: 'none',
|
|
34
|
+
value: '',
|
|
35
|
+
},
|
|
36
|
+
rationale: 'Rationale for Norway',
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
correct: true,
|
|
40
|
+
value: 'finland',
|
|
41
|
+
label: 'Finland',
|
|
42
|
+
feedback: {
|
|
43
|
+
type: 'none',
|
|
44
|
+
value: '',
|
|
45
|
+
},
|
|
46
|
+
rationale: 'Rationale for Finland',
|
|
47
|
+
},
|
|
48
|
+
],
|
|
49
|
+
extraCSSRules: {
|
|
50
|
+
names: ['red', 'blue'],
|
|
51
|
+
rules: `
|
|
52
|
+
.red {
|
|
53
|
+
color: red !important;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.blue {
|
|
57
|
+
color: blue !important;
|
|
58
|
+
}
|
|
59
|
+
`,
|
|
60
|
+
},
|
|
61
|
+
prompt: '',
|
|
62
|
+
promptEnabled: true,
|
|
63
|
+
toolbarEditorPosition: 'bottom',
|
|
64
|
+
rubricEnabled: false,
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
const { model } = generate;
|
|
68
|
+
|
|
69
|
+
var config = {
|
|
70
|
+
elements: {
|
|
71
|
+
'multiple-choice': '../..',
|
|
72
|
+
},
|
|
73
|
+
models: [model('1', 'multiple-choice')],
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
// new init - just shows off print!
|
|
77
|
+
|
|
78
|
+
const init = async () => {
|
|
79
|
+
console.log('define the element...');
|
|
80
|
+
await Promise.all(
|
|
81
|
+
config.models.map(async (m) => {
|
|
82
|
+
try {
|
|
83
|
+
const printTag = `${m.element}-print`;
|
|
84
|
+
if (customElements.get(printTag)) {
|
|
85
|
+
return true;
|
|
86
|
+
} else {
|
|
87
|
+
customElements.define(printTag, PrintElement);
|
|
88
|
+
await customElements.whenDefined(printTag);
|
|
89
|
+
return true;
|
|
90
|
+
}
|
|
91
|
+
} catch (e) {
|
|
92
|
+
return false;
|
|
93
|
+
}
|
|
94
|
+
})
|
|
95
|
+
);
|
|
96
|
+
|
|
97
|
+
console.log('now apply the model...');
|
|
98
|
+
config.models.forEach((m) => {
|
|
99
|
+
const printTag = `${m.element}-print`;
|
|
100
|
+
const h3s = document.createElement('h3');
|
|
101
|
+
h3s.textContent = 'student mode';
|
|
102
|
+
document.body.appendChild(h3s);
|
|
103
|
+
const de = document.createElement(printTag);
|
|
104
|
+
document.body.appendChild(de);
|
|
105
|
+
de.options = {};
|
|
106
|
+
de.model = m;
|
|
107
|
+
|
|
108
|
+
const h3 = document.createElement('h3');
|
|
109
|
+
h3.textContent = 'instructor mode';
|
|
110
|
+
document.body.appendChild(h3);
|
|
111
|
+
const instr = document.createElement(printTag);
|
|
112
|
+
document.body.appendChild(instr);
|
|
113
|
+
instr.options = { mode: 'instructor' };
|
|
114
|
+
instr.model = JSON.parse(JSON.stringify(m));
|
|
115
|
+
});
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
init()
|
|
119
|
+
.then(() => {
|
|
120
|
+
console.log('ready');
|
|
121
|
+
})
|
|
122
|
+
.catch((e) => {
|
|
123
|
+
console.error(e);
|
|
124
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
|
|
2
|
+
<!doctype html>
|
|
3
|
+
<html>
|
|
4
|
+
<head>
|
|
5
|
+
<title>@pie-element/multiple-choice@13.2.0-next.0</title>
|
|
6
|
+
<link
|
|
7
|
+
href="https://fonts.googleapis.com/css?family=Roboto&display=swap"
|
|
8
|
+
rel="stylesheet"
|
|
9
|
+
/>
|
|
10
|
+
<style>
|
|
11
|
+
html, body {
|
|
12
|
+
font-family: 'Roboto', sans-serif;
|
|
13
|
+
}
|
|
14
|
+
</style>
|
|
15
|
+
<script type="module" src="./print-demo.js"></script>
|
|
16
|
+
</head>
|
|
17
|
+
<body></body>
|
|
18
|
+
</html>
|