@pie-element/inline-dropdown 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 +195 -0
- package/dist/author/defaults.d.ts.map +1 -0
- package/dist/author/defaults.js +130 -0
- package/dist/author/index.d.ts +44 -0
- package/dist/author/index.d.ts.map +1 -0
- package/dist/author/index.js +83 -0
- package/dist/author/inline-dropdown-toolbar.d.ts +48 -0
- package/dist/author/inline-dropdown-toolbar.d.ts.map +1 -0
- package/dist/author/inline-dropdown-toolbar.js +261 -0
- package/dist/author/main.d.ts +49 -0
- package/dist/author/main.d.ts.map +1 -0
- package/dist/author/main.js +375 -0
- package/dist/author/markupUtils.d.ts +13 -0
- package/dist/author/markupUtils.d.ts.map +1 -0
- package/dist/author/markupUtils.js +23 -0
- package/dist/author/response-area.d.ts +21 -0
- package/dist/author/response-area.d.ts.map +1 -0
- package/dist/author/response-area.js +32 -0
- package/dist/author/utils.d.ts +11 -0
- package/dist/author/utils.d.ts.map +1 -0
- package/dist/author/utils.js +10 -0
- package/dist/controller/defaults.d.ts +28 -0
- package/dist/controller/defaults.d.ts.map +1 -0
- package/dist/controller/defaults.js +21 -0
- package/dist/controller/index.d.ts +55 -0
- package/dist/controller/index.d.ts.map +1 -0
- package/dist/controller/index.js +126 -0
- package/dist/controller/utils.d.ts +13 -0
- package/dist/controller/utils.d.ts.map +1 -0
- package/dist/controller/utils.js +13 -0
- package/dist/delivery/index.d.ts +21 -0
- package/dist/delivery/index.d.ts.map +1 -0
- package/dist/delivery/index.js +60 -0
- package/dist/delivery/inline-dropdown.d.ts +39 -0
- package/dist/delivery/inline-dropdown.d.ts.map +1 -0
- package/dist/delivery/inline-dropdown.js +109 -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 +148 -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/_apply.js +12 -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/_arrayReduce.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/_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/_baseExtremum.js +11 -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/_baseGt.js +6 -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/_basePropertyOf.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseReduce.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseRest.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseSetToString.js +14 -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/_cacheHas.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_castFunction.js +7 -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/_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/_escapeHtmlChar.js +11 -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/_isIndex.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isIterateeCall.js +12 -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/_overRest.js +13 -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/_setToString.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_shortOut.js +14 -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/constant.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/defaults.js +16 -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/escape.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/forEach.js +10 -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/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/isEqual.js +7 -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/isUndefined.js +6 -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/max.js +9 -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/reduce.js +12 -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/package.json +70 -0
- package/src/author/defaults.ts +141 -0
- package/src/author/index.ts +161 -0
- package/src/author/inline-dropdown-toolbar.tsx +454 -0
- package/src/author/main.tsx +609 -0
- package/src/author/markupUtils.tsx +68 -0
- package/src/author/response-area.tsx +55 -0
- package/src/author/utils.ts +32 -0
- package/src/controller/defaults.ts +28 -0
- package/src/controller/index.ts +340 -0
- package/src/controller/utils.ts +36 -0
- package/src/delivery/index.ts +100 -0
- package/src/delivery/inline-dropdown.tsx +209 -0
- package/src/index.iife.ts +16 -0
- package/src/index.ts +1 -0
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
/**
|
|
3
|
+
* @synced-from pie-elements/packages/inline-dropdown/src/inline-dropdown.jsx
|
|
4
|
+
* @auto-generated
|
|
5
|
+
*
|
|
6
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
7
|
+
* Manual edits will be overwritten on next sync.
|
|
8
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import React from 'react';
|
|
12
|
+
import ReactDOM from 'react-dom';
|
|
13
|
+
import PropTypes from 'prop-types';
|
|
14
|
+
import { isEmpty } from 'lodash-es';
|
|
15
|
+
import CorrectAnswerToggle from '@pie-lib/correct-answer-toggle';
|
|
16
|
+
import { InlineDropdown as DropDown } from '@pie-lib/mask-markup';
|
|
17
|
+
import { color, Collapsible as CollapsibleImport, hasText, hasMedia, PreviewPrompt as PreviewPromptImport, UiLayout as UiLayoutImport } from '@pie-lib/render-ui';
|
|
18
|
+
|
|
19
|
+
function isRenderableReactInteropType(value: any) {
|
|
20
|
+
return (
|
|
21
|
+
typeof value === 'function' ||
|
|
22
|
+
(typeof value === 'object' && value !== null && typeof value.$$typeof === 'symbol')
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function unwrapReactInteropSymbol(maybeSymbol: any, namedExport?: string) {
|
|
27
|
+
if (!maybeSymbol) return maybeSymbol;
|
|
28
|
+
if (isRenderableReactInteropType(maybeSymbol)) return maybeSymbol;
|
|
29
|
+
if (isRenderableReactInteropType(maybeSymbol.default)) return maybeSymbol.default;
|
|
30
|
+
if (namedExport && isRenderableReactInteropType(maybeSymbol[namedExport])) {
|
|
31
|
+
return maybeSymbol[namedExport];
|
|
32
|
+
}
|
|
33
|
+
if (namedExport && isRenderableReactInteropType(maybeSymbol[namedExport]?.default)) {
|
|
34
|
+
return maybeSymbol[namedExport].default;
|
|
35
|
+
}
|
|
36
|
+
return maybeSymbol;
|
|
37
|
+
}
|
|
38
|
+
const UiLayout = unwrapReactInteropSymbol(UiLayoutImport, 'UiLayout') || unwrapReactInteropSymbol(renderUi.UiLayout, 'UiLayout');
|
|
39
|
+
const PreviewPrompt = unwrapReactInteropSymbol(PreviewPromptImport, 'PreviewPrompt') || unwrapReactInteropSymbol(renderUi.PreviewPrompt, 'PreviewPrompt');
|
|
40
|
+
const Collapsible = unwrapReactInteropSymbol(CollapsibleImport, 'Collapsible') || unwrapReactInteropSymbol(renderUi.Collapsible, 'Collapsible');
|
|
41
|
+
import * as RenderUiNamespace from '@pie-lib/render-ui';
|
|
42
|
+
const renderUiNamespaceAny = RenderUiNamespace as any;
|
|
43
|
+
const renderUiDefaultMaybe = renderUiNamespaceAny['default'];
|
|
44
|
+
const renderUi =
|
|
45
|
+
renderUiDefaultMaybe && typeof renderUiDefaultMaybe === 'object'
|
|
46
|
+
? renderUiDefaultMaybe
|
|
47
|
+
: renderUiNamespaceAny;
|
|
48
|
+
import { renderMath } from '@pie-element/shared-math-rendering-mathjax';
|
|
49
|
+
import { styled } from '@mui/material/styles';
|
|
50
|
+
|
|
51
|
+
const StyledUiLayout: any = styled(UiLayout)({
|
|
52
|
+
color: color.text(),
|
|
53
|
+
backgroundColor: color.background(),
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
const StyledCollapsible: any = styled(Collapsible)(({ theme }) => ({
|
|
57
|
+
marginBottom: theme.spacing(2),
|
|
58
|
+
}));
|
|
59
|
+
|
|
60
|
+
const ChoiceRationaleWrapper: any = styled('div')(({ theme }) => ({
|
|
61
|
+
'&:not(:last-child)': {
|
|
62
|
+
marginBottom: theme.spacing(2),
|
|
63
|
+
},
|
|
64
|
+
}));
|
|
65
|
+
|
|
66
|
+
const ChoiceRationale: any = styled('div')({
|
|
67
|
+
display: 'flex',
|
|
68
|
+
whiteSpace: 'break-spaces',
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
const ChoiceRationaleLabel: any = styled('div')(({ correct }) => ({
|
|
72
|
+
display: 'flex',
|
|
73
|
+
...(correct
|
|
74
|
+
? {
|
|
75
|
+
color: color.correct(),
|
|
76
|
+
}
|
|
77
|
+
: {
|
|
78
|
+
color: color.incorrectWithIcon(),
|
|
79
|
+
}),
|
|
80
|
+
}));
|
|
81
|
+
|
|
82
|
+
const SrOnly: any = styled('h2')({
|
|
83
|
+
position: 'absolute',
|
|
84
|
+
left: '-10000px',
|
|
85
|
+
top: 'auto',
|
|
86
|
+
width: '1px',
|
|
87
|
+
height: '1px',
|
|
88
|
+
overflow: 'hidden',
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
export class InlineDropdown extends React.Component {
|
|
92
|
+
static propTypes = {
|
|
93
|
+
prompt: PropTypes.string,
|
|
94
|
+
disabled: PropTypes.bool,
|
|
95
|
+
markup: PropTypes.string,
|
|
96
|
+
mode: PropTypes.string,
|
|
97
|
+
displayType: PropTypes.string,
|
|
98
|
+
rationale: PropTypes.string,
|
|
99
|
+
teacherInstructions: PropTypes.string,
|
|
100
|
+
model: PropTypes.object.isRequired,
|
|
101
|
+
choices: PropTypes.object,
|
|
102
|
+
value: PropTypes.object,
|
|
103
|
+
feedback: PropTypes.object,
|
|
104
|
+
onChange: PropTypes.func,
|
|
105
|
+
language: PropTypes.string,
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
static defaultProps = {
|
|
109
|
+
value: {},
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
state = {
|
|
113
|
+
showCorrectAnswer: false,
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
117
|
+
if (isEmpty(nextProps.feedback)) {
|
|
118
|
+
this.setState({ showCorrectAnswer: false });
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
componentDidUpdate() {
|
|
123
|
+
// eslint-disable-next-line
|
|
124
|
+
const domNode = ReactDOM.findDOMNode(this);
|
|
125
|
+
|
|
126
|
+
renderMath(domNode);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
toggleShowCorrect: any = () => {
|
|
130
|
+
this.setState({ showCorrectAnswer: !this.state.showCorrectAnswer });
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
render() {
|
|
134
|
+
const { showCorrectAnswer } = this.state;
|
|
135
|
+
const { prompt, mode, model, rationale, teacherInstructions, choices, displayType, language } = this.props;
|
|
136
|
+
const { extraCSSRules } = model || {};
|
|
137
|
+
const showCorrectAnswerToggle = mode === 'evaluate';
|
|
138
|
+
let choiceRationalesHaveText = false;
|
|
139
|
+
const showRationale = rationale && (hasText(rationale) || hasMedia(rationale));
|
|
140
|
+
const showTeacherInstructions =
|
|
141
|
+
teacherInstructions && (hasText(teacherInstructions) || hasMedia(teacherInstructions));
|
|
142
|
+
|
|
143
|
+
const choiceRationales = (Object.keys(choices) || []).map((key) =>
|
|
144
|
+
(choices[key] || []).reduce((acc, currentValue) => {
|
|
145
|
+
if (currentValue.rationale && hasText(currentValue.rationale)) {
|
|
146
|
+
choiceRationalesHaveText = true;
|
|
147
|
+
|
|
148
|
+
acc.push(currentValue);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
return acc;
|
|
152
|
+
}, []),
|
|
153
|
+
);
|
|
154
|
+
|
|
155
|
+
return (
|
|
156
|
+
<StyledUiLayout extraCSSRules={extraCSSRules} style={{ display: `${displayType}` }}>
|
|
157
|
+
{mode === 'gather' && <SrOnly>Inline Dropdown Question</SrOnly>}
|
|
158
|
+
|
|
159
|
+
{showTeacherInstructions && (
|
|
160
|
+
<StyledCollapsible
|
|
161
|
+
labels={{ hidden: 'Show Teacher Instructions', visible: 'Hide Teacher Instructions' }}
|
|
162
|
+
>
|
|
163
|
+
<PreviewPrompt prompt={teacherInstructions} />
|
|
164
|
+
</StyledCollapsible>
|
|
165
|
+
)}
|
|
166
|
+
|
|
167
|
+
{prompt && <PreviewPrompt prompt={prompt} />}
|
|
168
|
+
|
|
169
|
+
<CorrectAnswerToggle
|
|
170
|
+
show={showCorrectAnswerToggle}
|
|
171
|
+
toggled={showCorrectAnswer}
|
|
172
|
+
onToggle={this.toggleShowCorrect}
|
|
173
|
+
language={language}
|
|
174
|
+
/>
|
|
175
|
+
|
|
176
|
+
<DropDown {...this.props} showCorrectAnswer={showCorrectAnswer} />
|
|
177
|
+
|
|
178
|
+
{choiceRationalesHaveText && (
|
|
179
|
+
<StyledCollapsible
|
|
180
|
+
labels={{ hidden: 'Show Rationale for choices', visible: 'Hide Rationale for choices' }}
|
|
181
|
+
>
|
|
182
|
+
{choiceRationales.map((choices, index) => (
|
|
183
|
+
<ChoiceRationaleWrapper key={index}>
|
|
184
|
+
{choices?.length > 0 &&
|
|
185
|
+
choices.map((choice) => (
|
|
186
|
+
<ChoiceRationale key={choice.label}>
|
|
187
|
+
<ChoiceRationaleLabel
|
|
188
|
+
correct={choice.correct}
|
|
189
|
+
dangerouslySetInnerHTML={{ __html: `${choice.label}: ` }}
|
|
190
|
+
/>
|
|
191
|
+
<PreviewPrompt prompt={choice.rationale} />
|
|
192
|
+
</ChoiceRationale>
|
|
193
|
+
))}
|
|
194
|
+
</ChoiceRationaleWrapper>
|
|
195
|
+
))}
|
|
196
|
+
</StyledCollapsible>
|
|
197
|
+
)}
|
|
198
|
+
|
|
199
|
+
{showRationale && (
|
|
200
|
+
<Collapsible labels={{ hidden: 'Show Rationale', visible: 'Hide Rationale' }}>
|
|
201
|
+
<PreviewPrompt prompt={rationale} />
|
|
202
|
+
</Collapsible>
|
|
203
|
+
)}
|
|
204
|
+
</StyledUiLayout>
|
|
205
|
+
);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
export default InlineDropdown;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IIFE entry point for inline-dropdown 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
|
+
|
|
8
|
+
import Element from './index.js';
|
|
9
|
+
|
|
10
|
+
// Auto-register the custom element for IIFE mode
|
|
11
|
+
if (typeof window !== 'undefined' && !customElements.get('inline-dropdown-element')) {
|
|
12
|
+
customElements.define('inline-dropdown-element', Element);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
// Export for IIFE global
|
|
16
|
+
export default Element;
|
package/src/index.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './delivery/index.js';
|