@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,6 @@
|
|
|
1
|
+
import e from "./_root.js";
|
|
2
|
+
import t from "./stubFalse.js";
|
|
3
|
+
//#region ../../../node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isBuffer.js
|
|
4
|
+
var n = typeof exports == "object" && exports && !exports.nodeType && exports, r = n && typeof module == "object" && module && !module.nodeType && module, i = r && r.exports === n ? e.Buffer : void 0, a = (i ? i.isBuffer : void 0) || t;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { a as default };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import e from "./isArray.js";
|
|
2
|
+
import t from "./isArrayLike.js";
|
|
3
|
+
import n from "./_isPrototype.js";
|
|
4
|
+
import r from "./isArguments.js";
|
|
5
|
+
import i from "./isBuffer.js";
|
|
6
|
+
import a from "./isTypedArray.js";
|
|
7
|
+
import o from "./_baseKeys.js";
|
|
8
|
+
import s from "./_getTag.js";
|
|
9
|
+
//#region ../../../node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isEmpty.js
|
|
10
|
+
var c = "[object Map]", l = "[object Set]", u = Object.prototype.hasOwnProperty;
|
|
11
|
+
function d(d) {
|
|
12
|
+
if (d == null) return !0;
|
|
13
|
+
if (t(d) && (e(d) || typeof d == "string" || typeof d.splice == "function" || i(d) || a(d) || r(d))) return !d.length;
|
|
14
|
+
var f = s(d);
|
|
15
|
+
if (f == c || f == l) return !d.size;
|
|
16
|
+
if (n(d)) return !o(d).length;
|
|
17
|
+
for (var p in d) if (u.call(d, p)) return !1;
|
|
18
|
+
return !0;
|
|
19
|
+
}
|
|
20
|
+
//#endregion
|
|
21
|
+
export { d as default };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import e from "./_baseGetTag.js";
|
|
2
|
+
import t from "./isObject.js";
|
|
3
|
+
//#region ../../../node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isFunction.js
|
|
4
|
+
var n = "[object AsyncFunction]", r = "[object Function]", i = "[object GeneratorFunction]", a = "[object Proxy]";
|
|
5
|
+
function o(o) {
|
|
6
|
+
if (!t(o)) return !1;
|
|
7
|
+
var s = e(o);
|
|
8
|
+
return s == r || s == i || s == n || s == a;
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
11
|
+
export { o as default };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import e from "./_baseUnary.js";
|
|
2
|
+
import t from "./_nodeUtil.js";
|
|
3
|
+
import n from "./_baseIsMap.js";
|
|
4
|
+
//#region ../../../node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isMap.js
|
|
5
|
+
var r = t && t.isMap, i = r ? e(r) : n;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { i as default };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import e from "./_baseUnary.js";
|
|
2
|
+
import t from "./_nodeUtil.js";
|
|
3
|
+
import n from "./_baseIsSet.js";
|
|
4
|
+
//#region ../../../node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isSet.js
|
|
5
|
+
var r = t && t.isSet, i = r ? e(r) : n;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { i as default };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import e from "./_baseGetTag.js";
|
|
2
|
+
import t from "./isObjectLike.js";
|
|
3
|
+
//#region ../../../node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isSymbol.js
|
|
4
|
+
var n = "[object Symbol]";
|
|
5
|
+
function r(r) {
|
|
6
|
+
return typeof r == "symbol" || t(r) && e(r) == n;
|
|
7
|
+
}
|
|
8
|
+
//#endregion
|
|
9
|
+
export { r as default };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import e from "./_baseIsTypedArray.js";
|
|
2
|
+
import t from "./_baseUnary.js";
|
|
3
|
+
import n from "./_nodeUtil.js";
|
|
4
|
+
//#region ../../../node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isTypedArray.js
|
|
5
|
+
var r = n && n.isTypedArray, i = r ? t(r) : e;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { i as default };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import e from "./isArrayLike.js";
|
|
2
|
+
import t from "./_arrayLikeKeys.js";
|
|
3
|
+
import n from "./_baseKeys.js";
|
|
4
|
+
//#region ../../../node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/keys.js
|
|
5
|
+
function r(r) {
|
|
6
|
+
return e(r) ? t(r) : n(r);
|
|
7
|
+
}
|
|
8
|
+
//#endregion
|
|
9
|
+
export { r as default };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import e from "./isArrayLike.js";
|
|
2
|
+
import t from "./_arrayLikeKeys.js";
|
|
3
|
+
import n from "./_baseKeysIn.js";
|
|
4
|
+
//#region ../../../node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/keysIn.js
|
|
5
|
+
function r(r) {
|
|
6
|
+
return e(r) ? t(r, !0) : n(r);
|
|
7
|
+
}
|
|
8
|
+
//#endregion
|
|
9
|
+
export { r as default };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import e from "./_arrayMap.js";
|
|
2
|
+
import t from "./isArray.js";
|
|
3
|
+
import n from "./_baseIteratee.js";
|
|
4
|
+
import r from "./_baseMap.js";
|
|
5
|
+
//#region ../../../node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/map.js
|
|
6
|
+
function i(i, a) {
|
|
7
|
+
return (t(i) ? e : r)(i, n(a, 3));
|
|
8
|
+
}
|
|
9
|
+
//#endregion
|
|
10
|
+
export { i as default };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import e from "./identity.js";
|
|
2
|
+
import t from "./_baseGt.js";
|
|
3
|
+
import n from "./_baseExtremum.js";
|
|
4
|
+
//#region ../../../node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/max.js
|
|
5
|
+
function r(r) {
|
|
6
|
+
return r && r.length ? n(r, e, t) : void 0;
|
|
7
|
+
}
|
|
8
|
+
//#endregion
|
|
9
|
+
export { r as default };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import e from "./_MapCache.js";
|
|
2
|
+
//#region ../../../node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/memoize.js
|
|
3
|
+
var t = "Expected a function";
|
|
4
|
+
function n(r, i) {
|
|
5
|
+
if (typeof r != "function" || i != null && typeof i != "function") throw TypeError(t);
|
|
6
|
+
var a = function() {
|
|
7
|
+
var e = arguments, t = i ? i.apply(this, e) : e[0], n = a.cache;
|
|
8
|
+
if (n.has(t)) return n.get(t);
|
|
9
|
+
var o = r.apply(this, e);
|
|
10
|
+
return a.cache = n.set(t, o) || n, o;
|
|
11
|
+
};
|
|
12
|
+
return a.cache = new (n.Cache || e)(), a;
|
|
13
|
+
}
|
|
14
|
+
n.Cache = e;
|
|
15
|
+
//#endregion
|
|
16
|
+
export { n as default };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import e from "./_isKey.js";
|
|
2
|
+
import t from "./_toKey.js";
|
|
3
|
+
import n from "./_baseProperty.js";
|
|
4
|
+
import r from "./_basePropertyDeep.js";
|
|
5
|
+
//#region ../../../node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/property.js
|
|
6
|
+
function i(i) {
|
|
7
|
+
return e(i) ? n(t(i)) : r(i);
|
|
8
|
+
}
|
|
9
|
+
//#endregion
|
|
10
|
+
export { i as default };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import e from "./isArray.js";
|
|
2
|
+
import t from "./_arrayReduce.js";
|
|
3
|
+
import n from "./_baseIteratee.js";
|
|
4
|
+
import r from "./_baseEach.js";
|
|
5
|
+
import i from "./_baseReduce.js";
|
|
6
|
+
//#region ../../../node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/reduce.js
|
|
7
|
+
function a(a, o, s) {
|
|
8
|
+
var c = e(a) ? t : i, l = arguments.length < 3;
|
|
9
|
+
return c(a, n(o, 4), s, l, r);
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
12
|
+
export { a as default };
|
package/package.json
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@pie-element/inline-dropdown",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "",
|
|
5
|
+
"dependencies": {
|
|
6
|
+
"@emotion/react": "^11.14.0",
|
|
7
|
+
"@emotion/style": "^0.8.0",
|
|
8
|
+
"@mui/icons-material": "^7.3.4",
|
|
9
|
+
"@mui/material": "^7.3.4",
|
|
10
|
+
"@pie-lib/correct-answer-toggle": "0.1.0",
|
|
11
|
+
"@pie-lib/mask-markup": "0.1.0",
|
|
12
|
+
"@pie-lib/render-ui": "0.1.0",
|
|
13
|
+
"lodash-es": "^4.17.23",
|
|
14
|
+
"prop-types": "^15.8.1",
|
|
15
|
+
"@pie-element/shared-configure-events": "0.1.0",
|
|
16
|
+
"@pie-lib/editable-html-tip-tap": "0.1.0",
|
|
17
|
+
"@pie-element/shared-math-rendering-mathjax": "0.1.0",
|
|
18
|
+
"@pie-lib/config-ui": "0.1.0",
|
|
19
|
+
"@pie-element/shared-controller-utils": "0.1.0",
|
|
20
|
+
"@pie-element/shared-player-events": "0.1.0",
|
|
21
|
+
"debug": "^4.1.1"
|
|
22
|
+
},
|
|
23
|
+
"peerDependencies": {
|
|
24
|
+
"react": "^18.0.0",
|
|
25
|
+
"react-dom": "^18.0.0"
|
|
26
|
+
},
|
|
27
|
+
"exports": {
|
|
28
|
+
".": {
|
|
29
|
+
"development": "./src/index.ts",
|
|
30
|
+
"types": "./dist/index.d.ts",
|
|
31
|
+
"default": "./dist/index.js"
|
|
32
|
+
},
|
|
33
|
+
"./delivery": {
|
|
34
|
+
"development": "./src/delivery/index.ts",
|
|
35
|
+
"types": "./dist/delivery/index.d.ts",
|
|
36
|
+
"default": "./dist/delivery/index.js"
|
|
37
|
+
},
|
|
38
|
+
"./author": {
|
|
39
|
+
"development": "./src/author/index.ts",
|
|
40
|
+
"types": "./dist/author/index.d.ts",
|
|
41
|
+
"default": "./dist/author/index.js"
|
|
42
|
+
},
|
|
43
|
+
"./controller": {
|
|
44
|
+
"development": "./src/controller/index.ts",
|
|
45
|
+
"types": "./dist/controller/index.d.ts",
|
|
46
|
+
"default": "./dist/controller/index.js"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"type": "module",
|
|
50
|
+
"main": "./dist/index.js",
|
|
51
|
+
"types": "./dist/index.d.ts",
|
|
52
|
+
"files": [
|
|
53
|
+
"dist",
|
|
54
|
+
"src"
|
|
55
|
+
],
|
|
56
|
+
"sideEffects": false,
|
|
57
|
+
"devDependencies": {
|
|
58
|
+
"vite": "^8.0.1",
|
|
59
|
+
"typescript": "^5.9.3",
|
|
60
|
+
"@vitejs/plugin-react": "^6.0.1",
|
|
61
|
+
"@types/react": "^18.2.0",
|
|
62
|
+
"@types/react-dom": "^18.2.0"
|
|
63
|
+
},
|
|
64
|
+
"scripts": {
|
|
65
|
+
"build": "bun x vite build && bun x vite build --config vite.config.iife.ts && bun x tsc --emitDeclarationOnly",
|
|
66
|
+
"dev": "bun x vite",
|
|
67
|
+
"demo": "bun x vite --mode demo",
|
|
68
|
+
"test": "bun x vitest run"
|
|
69
|
+
}
|
|
70
|
+
}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
/**
|
|
3
|
+
* @synced-from pie-elements/packages/inline-dropdown/configure/src/defaults.js
|
|
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
|
+
export default {
|
|
12
|
+
model: {
|
|
13
|
+
alternateResponse: {},
|
|
14
|
+
choiceRationaleEnabled: true,
|
|
15
|
+
choices: {},
|
|
16
|
+
disabled: false,
|
|
17
|
+
displayType: 'block',
|
|
18
|
+
markup: '',
|
|
19
|
+
mode: 'gather',
|
|
20
|
+
prompt: '',
|
|
21
|
+
promptEnabled: true,
|
|
22
|
+
rationale: '',
|
|
23
|
+
rationaleEnabled: true,
|
|
24
|
+
shuffle: true,
|
|
25
|
+
studentInstructionsEnabled: true,
|
|
26
|
+
teacherInstructions: '',
|
|
27
|
+
teacherInstructionsEnabled: true,
|
|
28
|
+
toolbarEditorPosition: 'bottom',
|
|
29
|
+
},
|
|
30
|
+
configuration: {
|
|
31
|
+
baseInputConfiguration: {
|
|
32
|
+
audio: { disabled: false },
|
|
33
|
+
video: { disabled: false },
|
|
34
|
+
image: { disabled: false },
|
|
35
|
+
h3: { disabled: true },
|
|
36
|
+
blockquote: { disabled: true },
|
|
37
|
+
textAlign: { disabled: true },
|
|
38
|
+
showParagraphs: { disabled: false },
|
|
39
|
+
separateParagraphs: { disabled: true },
|
|
40
|
+
},
|
|
41
|
+
prompt: {
|
|
42
|
+
settings: true,
|
|
43
|
+
label: 'Prompt',
|
|
44
|
+
required: false,
|
|
45
|
+
inputConfiguration: {
|
|
46
|
+
audio: { disabled: false },
|
|
47
|
+
video: { disabled: false },
|
|
48
|
+
image: { disabled: false },
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
responseAreaInputConfiguration: {
|
|
52
|
+
inputConfiguration: {
|
|
53
|
+
audio: { disabled: true },
|
|
54
|
+
video: { disabled: true },
|
|
55
|
+
image: { disabled: true },
|
|
56
|
+
table: { disabled: true },
|
|
57
|
+
ul_list: { disabled: true },
|
|
58
|
+
ol_list: { disabled: true },
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
settingsPanelDisabled: false,
|
|
62
|
+
spellCheck: {
|
|
63
|
+
label: 'Spellcheck',
|
|
64
|
+
settings: false,
|
|
65
|
+
enabled: true,
|
|
66
|
+
},
|
|
67
|
+
lockChoiceOrder: {
|
|
68
|
+
settings: true,
|
|
69
|
+
label: 'Lock Choice Order',
|
|
70
|
+
},
|
|
71
|
+
partialScoring: {
|
|
72
|
+
settings: false,
|
|
73
|
+
label: 'Allow Partial Scoring',
|
|
74
|
+
},
|
|
75
|
+
rationale: {
|
|
76
|
+
settings: true,
|
|
77
|
+
label: 'Rationale',
|
|
78
|
+
required: false,
|
|
79
|
+
inputConfiguration: {
|
|
80
|
+
audio: { disabled: false },
|
|
81
|
+
video: { disabled: false },
|
|
82
|
+
image: { disabled: false },
|
|
83
|
+
textAlign: { disabled: true },
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
teacherInstructions: {
|
|
87
|
+
settings: true,
|
|
88
|
+
label: 'Teacher Instructions',
|
|
89
|
+
required: false,
|
|
90
|
+
inputConfiguration: {
|
|
91
|
+
audio: { disabled: false },
|
|
92
|
+
video: { disabled: false },
|
|
93
|
+
image: { disabled: false },
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
template: {
|
|
97
|
+
inputConfiguration: {
|
|
98
|
+
audio: { disabled: false },
|
|
99
|
+
video: { disabled: false },
|
|
100
|
+
image: { disabled: false },
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
choiceRationale: {
|
|
104
|
+
settings: true,
|
|
105
|
+
label: 'Choice Rationale',
|
|
106
|
+
},
|
|
107
|
+
toolbarEditorPosition: {
|
|
108
|
+
settings: false,
|
|
109
|
+
label: 'Toolbar Editor Position',
|
|
110
|
+
},
|
|
111
|
+
maxResponseAreas: 10,
|
|
112
|
+
maxResponseAreaChoices: 10,
|
|
113
|
+
maxImageWidth: {
|
|
114
|
+
teacherInstructions: 300,
|
|
115
|
+
prompt: 300,
|
|
116
|
+
rationale: 300,
|
|
117
|
+
},
|
|
118
|
+
maxImageHeight: {
|
|
119
|
+
teacherInstructions: 300,
|
|
120
|
+
prompt: 300,
|
|
121
|
+
rationale: 300,
|
|
122
|
+
},
|
|
123
|
+
withRubric: {
|
|
124
|
+
settings: false,
|
|
125
|
+
label: 'Add Rubric',
|
|
126
|
+
},
|
|
127
|
+
mathMlOptions: {
|
|
128
|
+
mmlOutput: false,
|
|
129
|
+
mmlEditing: false,
|
|
130
|
+
},
|
|
131
|
+
language: {
|
|
132
|
+
settings: false,
|
|
133
|
+
label: 'Specify Language',
|
|
134
|
+
enabled: false,
|
|
135
|
+
},
|
|
136
|
+
languageChoices: {
|
|
137
|
+
label: 'Language Choices',
|
|
138
|
+
options: [],
|
|
139
|
+
},
|
|
140
|
+
},
|
|
141
|
+
};
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
/**
|
|
3
|
+
* @synced-from pie-elements/packages/inline-dropdown/configure/src/index.js
|
|
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 {
|
|
12
|
+
ModelUpdatedEvent,
|
|
13
|
+
DeleteImageEvent,
|
|
14
|
+
InsertImageEvent,
|
|
15
|
+
InsertSoundEvent,
|
|
16
|
+
DeleteSoundEvent,
|
|
17
|
+
} from '@pie-element/shared-configure-events';
|
|
18
|
+
|
|
19
|
+
import React from 'react';
|
|
20
|
+
import { createRoot } from 'react-dom/client';
|
|
21
|
+
import Main from './main.js';
|
|
22
|
+
import debug from 'debug';
|
|
23
|
+
import { defaults } from 'lodash-es';
|
|
24
|
+
|
|
25
|
+
import sensibleDefaults from './defaults.js';
|
|
26
|
+
import { processMarkup, createSlateMarkup } from './markupUtils.js';
|
|
27
|
+
|
|
28
|
+
const log = debug('multiple-choice:configure');
|
|
29
|
+
|
|
30
|
+
export default class InlineDropdown extends HTMLElement {
|
|
31
|
+
static prepareModel = (model = {}) => {
|
|
32
|
+
const currModal = {
|
|
33
|
+
...sensibleDefaults.model,
|
|
34
|
+
...model,
|
|
35
|
+
};
|
|
36
|
+
const slateMarkup = model.slateMarkup || createSlateMarkup(currModal.markup, currModal.choices);
|
|
37
|
+
const markup = processMarkup(slateMarkup);
|
|
38
|
+
|
|
39
|
+
return {
|
|
40
|
+
...currModal,
|
|
41
|
+
slateMarkup,
|
|
42
|
+
markup,
|
|
43
|
+
/*...processedMarkup,*/
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
constructor() {
|
|
48
|
+
super();
|
|
49
|
+
this._root = null;
|
|
50
|
+
this._model = InlineDropdown.prepareModel();
|
|
51
|
+
this._configuration = sensibleDefaults.configuration;
|
|
52
|
+
this.onModelChanged = this.onModelChanged.bind(this);
|
|
53
|
+
this.onConfigurationChanged = this.onConfigurationChanged.bind(this);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
set model(s) {
|
|
57
|
+
this._model = InlineDropdown.prepareModel(s);
|
|
58
|
+
this._render();
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
set configuration(c) {
|
|
62
|
+
this._configuration = defaults(c, sensibleDefaults.configuration);
|
|
63
|
+
|
|
64
|
+
// if language:enabled is true, then the corresponding default item model should include a language value;
|
|
65
|
+
// if it is false, then the language field should be omitted from the item model.
|
|
66
|
+
// if a default item model includes a language value (e.g., en_US) and the corresponding authoring view settings have language:settings = true,
|
|
67
|
+
// then (a) language:enabled should also be true, and (b) that default language value should be represented in languageChoices[] (as a key).
|
|
68
|
+
if (c.language?.enabled) {
|
|
69
|
+
if (c.languageChoices?.options?.length) {
|
|
70
|
+
this._model.language = c.languageChoices.options[0].value;
|
|
71
|
+
}
|
|
72
|
+
} else if (c.language.settings && this._model.language) {
|
|
73
|
+
this._configuration.language.enabled = true;
|
|
74
|
+
|
|
75
|
+
if (!this._configuration.languageChoices.options || !this._configuration.languageChoices.options.length) {
|
|
76
|
+
this._configuration.languageChoices.options = [];
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// check if the language is already included in the languageChoices.options array
|
|
80
|
+
// and if not, then add it.
|
|
81
|
+
if (!this._configuration.languageChoices.options.find(option => option.value === this._model.language)) {
|
|
82
|
+
this._configuration.languageChoices.options.push({
|
|
83
|
+
value: this._model.language,
|
|
84
|
+
label: this._model.language,
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
} else {
|
|
88
|
+
delete this._model.language;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
this._render();
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
set disableSidePanel(s) {
|
|
95
|
+
this._disableSidePanel = s;
|
|
96
|
+
this._render();
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
dispatchModelUpdated(reset) {
|
|
100
|
+
const resetValue = !!reset;
|
|
101
|
+
|
|
102
|
+
this.dispatchEvent(new ModelUpdatedEvent(this._model, resetValue));
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
onModelChanged(m, reset) {
|
|
106
|
+
this._model = InlineDropdown.prepareModel(m);
|
|
107
|
+
this._render();
|
|
108
|
+
this.dispatchModelUpdated(reset);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
onConfigurationChanged(c) {
|
|
112
|
+
this._configuration = c;
|
|
113
|
+
this._render();
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/** @param {done, progress, file} handler */
|
|
117
|
+
insertImage(handler) {
|
|
118
|
+
this.dispatchEvent(new InsertImageEvent(handler));
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
onDeleteImage(src, done) {
|
|
122
|
+
this.dispatchEvent(new DeleteImageEvent(src, done));
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
insertSound(handler) {
|
|
126
|
+
this.dispatchEvent(new InsertSoundEvent(handler));
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
onDeleteSound(src, done) {
|
|
130
|
+
this.dispatchEvent(new DeleteSoundEvent(src, done));
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
_render() {
|
|
134
|
+
log('_render');
|
|
135
|
+
let element = React.createElement(Main, {
|
|
136
|
+
model: this._model,
|
|
137
|
+
configuration: this._configuration,
|
|
138
|
+
onModelChanged: this.onModelChanged,
|
|
139
|
+
onConfigurationChanged: this.onConfigurationChanged,
|
|
140
|
+
disableSidePanel: this._disableSidePanel,
|
|
141
|
+
imageSupport: {
|
|
142
|
+
add: this.insertImage.bind(this),
|
|
143
|
+
delete: this.onDeleteImage.bind(this),
|
|
144
|
+
},
|
|
145
|
+
uploadSoundSupport: {
|
|
146
|
+
add: this.insertSound.bind(this),
|
|
147
|
+
delete: this.onDeleteSound.bind(this),
|
|
148
|
+
},
|
|
149
|
+
});
|
|
150
|
+
if (!this._root) {
|
|
151
|
+
this._root = createRoot(this);
|
|
152
|
+
}
|
|
153
|
+
this._root.render(element);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
disconnectedCallback() {
|
|
157
|
+
if (this._root) {
|
|
158
|
+
this._root.unmount();
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|