@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.
Files changed (233) hide show
  1. package/dist/author/defaults.d.ts +195 -0
  2. package/dist/author/defaults.d.ts.map +1 -0
  3. package/dist/author/defaults.js +130 -0
  4. package/dist/author/index.d.ts +44 -0
  5. package/dist/author/index.d.ts.map +1 -0
  6. package/dist/author/index.js +83 -0
  7. package/dist/author/inline-dropdown-toolbar.d.ts +48 -0
  8. package/dist/author/inline-dropdown-toolbar.d.ts.map +1 -0
  9. package/dist/author/inline-dropdown-toolbar.js +261 -0
  10. package/dist/author/main.d.ts +49 -0
  11. package/dist/author/main.d.ts.map +1 -0
  12. package/dist/author/main.js +375 -0
  13. package/dist/author/markupUtils.d.ts +13 -0
  14. package/dist/author/markupUtils.d.ts.map +1 -0
  15. package/dist/author/markupUtils.js +23 -0
  16. package/dist/author/response-area.d.ts +21 -0
  17. package/dist/author/response-area.d.ts.map +1 -0
  18. package/dist/author/response-area.js +32 -0
  19. package/dist/author/utils.d.ts +11 -0
  20. package/dist/author/utils.d.ts.map +1 -0
  21. package/dist/author/utils.js +10 -0
  22. package/dist/controller/defaults.d.ts +28 -0
  23. package/dist/controller/defaults.d.ts.map +1 -0
  24. package/dist/controller/defaults.js +21 -0
  25. package/dist/controller/index.d.ts +55 -0
  26. package/dist/controller/index.d.ts.map +1 -0
  27. package/dist/controller/index.js +126 -0
  28. package/dist/controller/utils.d.ts +13 -0
  29. package/dist/controller/utils.d.ts.map +1 -0
  30. package/dist/controller/utils.js +13 -0
  31. package/dist/delivery/index.d.ts +21 -0
  32. package/dist/delivery/index.d.ts.map +1 -0
  33. package/dist/delivery/index.js +60 -0
  34. package/dist/delivery/inline-dropdown.d.ts +39 -0
  35. package/dist/delivery/inline-dropdown.d.ts.map +1 -0
  36. package/dist/delivery/inline-dropdown.js +109 -0
  37. package/dist/index.d.ts +2 -0
  38. package/dist/index.d.ts.map +1 -0
  39. package/dist/index.iife.d.ts +9 -0
  40. package/dist/index.iife.d.ts.map +1 -0
  41. package/dist/index.iife.js +148 -0
  42. package/dist/index.js +2 -0
  43. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_DataView.js +6 -0
  44. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Hash.js +16 -0
  45. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_ListCache.js +16 -0
  46. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Map.js +6 -0
  47. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_MapCache.js +16 -0
  48. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Promise.js +6 -0
  49. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Set.js +6 -0
  50. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_SetCache.js +11 -0
  51. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Stack.js +13 -0
  52. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Symbol.js +5 -0
  53. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Uint8Array.js +5 -0
  54. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_WeakMap.js +6 -0
  55. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_apply.js +12 -0
  56. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arrayEach.js +7 -0
  57. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arrayFilter.js +10 -0
  58. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arrayLikeKeys.js +15 -0
  59. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arrayMap.js +7 -0
  60. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arrayPush.js +7 -0
  61. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arrayReduce.js +8 -0
  62. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arraySome.js +7 -0
  63. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_assignValue.js +10 -0
  64. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_assocIndexOf.js +8 -0
  65. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseAssign.js +8 -0
  66. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseAssignIn.js +8 -0
  67. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseAssignValue.js +12 -0
  68. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseClone.js +57 -0
  69. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseCreate.js +14 -0
  70. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseEach.js +6 -0
  71. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseExtremum.js +11 -0
  72. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseFor.js +5 -0
  73. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseForOwn.js +8 -0
  74. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseGet.js +10 -0
  75. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseGetAllKeys.js +9 -0
  76. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseGetTag.js +10 -0
  77. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseGt.js +6 -0
  78. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseHasIn.js +6 -0
  79. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsArguments.js +9 -0
  80. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsEqual.js +8 -0
  81. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsEqualDeep.js +30 -0
  82. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsMap.js +9 -0
  83. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsMatch.js +26 -0
  84. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsNative.js +11 -0
  85. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsSet.js +9 -0
  86. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsTypedArray.js +11 -0
  87. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIteratee.js +11 -0
  88. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseKeys.js +12 -0
  89. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseKeysIn.js +13 -0
  90. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseMap.js +11 -0
  91. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseMatches.js +12 -0
  92. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseMatchesProperty.js +17 -0
  93. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseProperty.js +8 -0
  94. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_basePropertyDeep.js +9 -0
  95. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_basePropertyOf.js +8 -0
  96. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseReduce.js +8 -0
  97. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseRest.js +9 -0
  98. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseSetToString.js +14 -0
  99. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseTimes.js +7 -0
  100. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseToString.js +15 -0
  101. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseUnary.js +8 -0
  102. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cacheHas.js +6 -0
  103. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_castFunction.js +7 -0
  104. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_castPath.js +10 -0
  105. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneArrayBuffer.js +8 -0
  106. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneBuffer.js +10 -0
  107. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneDataView.js +8 -0
  108. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneRegExp.js +8 -0
  109. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneSymbol.js +8 -0
  110. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneTypedArray.js +8 -0
  111. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_copyArray.js +8 -0
  112. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_copyObject.js +14 -0
  113. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_copySymbols.js +8 -0
  114. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_copySymbolsIn.js +8 -0
  115. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_coreJsData.js +5 -0
  116. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_createBaseEach.js +12 -0
  117. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_createBaseFor.js +12 -0
  118. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_defineProperty.js +10 -0
  119. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_equalArrays.js +35 -0
  120. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_equalByTag.js +35 -0
  121. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_equalObjects.js +32 -0
  122. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_escapeHtmlChar.js +11 -0
  123. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_freeGlobal.js +4 -0
  124. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getAllKeys.js +9 -0
  125. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getAllKeysIn.js +9 -0
  126. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getMapData.js +8 -0
  127. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getMatchData.js +16 -0
  128. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getNative.js +9 -0
  129. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getPrototype.js +5 -0
  130. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getRawTag.js +14 -0
  131. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getSymbols.js +10 -0
  132. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getSymbolsIn.js +11 -0
  133. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getTag.js +23 -0
  134. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getValue.js +6 -0
  135. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_hasPath.js +18 -0
  136. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_hashClear.js +7 -0
  137. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_hashDelete.js +7 -0
  138. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_hashGet.js +13 -0
  139. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_hashHas.js +9 -0
  140. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_hashSet.js +9 -0
  141. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_initCloneArray.js +8 -0
  142. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_initCloneByTag.js +33 -0
  143. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_initCloneObject.js +9 -0
  144. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isIndex.js +8 -0
  145. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isIterateeCall.js +12 -0
  146. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isKey.js +11 -0
  147. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isKeyable.js +7 -0
  148. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isMasked.js +11 -0
  149. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isPrototype.js +8 -0
  150. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isStrictComparable.js +7 -0
  151. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_listCacheClear.js +6 -0
  152. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_listCacheDelete.js +9 -0
  153. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_listCacheGet.js +8 -0
  154. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_listCacheHas.js +7 -0
  155. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_listCacheSet.js +8 -0
  156. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheClear.js +13 -0
  157. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheDelete.js +8 -0
  158. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheGet.js +7 -0
  159. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheHas.js +7 -0
  160. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheSet.js +8 -0
  161. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapToArray.js +9 -0
  162. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_matchesStrictComparable.js +8 -0
  163. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_memoizeCapped.js +11 -0
  164. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_nativeCreate.js +5 -0
  165. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_nativeKeys.js +5 -0
  166. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_nativeKeysIn.js +8 -0
  167. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_nodeUtil.js +9 -0
  168. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_objectToString.js +7 -0
  169. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_overArg.js +8 -0
  170. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_overRest.js +13 -0
  171. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_root.js +5 -0
  172. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_setCacheAdd.js +7 -0
  173. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_setCacheHas.js +6 -0
  174. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_setToArray.js +9 -0
  175. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_setToString.js +6 -0
  176. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_shortOut.js +14 -0
  177. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_stackClear.js +7 -0
  178. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_stackDelete.js +7 -0
  179. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_stackGet.js +6 -0
  180. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_stackHas.js +6 -0
  181. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_stackSet.js +16 -0
  182. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_stringToPath.js +10 -0
  183. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_toKey.js +10 -0
  184. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_toSource.js +15 -0
  185. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/cloneDeep.js +8 -0
  186. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/constant.js +8 -0
  187. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/defaults.js +16 -0
  188. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/eq.js +6 -0
  189. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/escape.js +9 -0
  190. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/forEach.js +10 -0
  191. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/get.js +8 -0
  192. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/hasIn.js +8 -0
  193. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/identity.js +6 -0
  194. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isArguments.js +10 -0
  195. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isArray.js +4 -0
  196. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isArrayLike.js +8 -0
  197. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isBuffer.js +6 -0
  198. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isEmpty.js +21 -0
  199. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isEqual.js +7 -0
  200. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isFunction.js +11 -0
  201. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isLength.js +7 -0
  202. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isMap.js +7 -0
  203. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isObject.js +7 -0
  204. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isObjectLike.js +6 -0
  205. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isSet.js +7 -0
  206. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isSymbol.js +9 -0
  207. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isTypedArray.js +7 -0
  208. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isUndefined.js +6 -0
  209. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/keys.js +9 -0
  210. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/keysIn.js +9 -0
  211. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/map.js +10 -0
  212. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/max.js +9 -0
  213. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/memoize.js +16 -0
  214. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/property.js +10 -0
  215. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/reduce.js +12 -0
  216. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/stubArray.js +6 -0
  217. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/stubFalse.js +6 -0
  218. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/toString.js +7 -0
  219. package/package.json +70 -0
  220. package/src/author/defaults.ts +141 -0
  221. package/src/author/index.ts +161 -0
  222. package/src/author/inline-dropdown-toolbar.tsx +454 -0
  223. package/src/author/main.tsx +609 -0
  224. package/src/author/markupUtils.tsx +68 -0
  225. package/src/author/response-area.tsx +55 -0
  226. package/src/author/utils.ts +32 -0
  227. package/src/controller/defaults.ts +28 -0
  228. package/src/controller/index.ts +340 -0
  229. package/src/controller/utils.ts +36 -0
  230. package/src/delivery/index.ts +100 -0
  231. package/src/delivery/inline-dropdown.tsx +209 -0
  232. package/src/index.iife.ts +16 -0
  233. package/src/index.ts +1 -0
@@ -0,0 +1,55 @@
1
+ // @ts-nocheck
2
+ /**
3
+ * @synced-from pie-elements/packages/inline-dropdown/configure/src/response-area.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 { styled } from '@mui/material/styles';
15
+ import EditableHtml from '@pie-lib/editable-html-tip-tap';
16
+ import { renderMath } from '@pie-element/shared-math-rendering-mathjax';
17
+
18
+ const ResponseArea: any = styled('div')(({ theme }) => ({
19
+ paddingBottom: theme.spacing(2.5),
20
+ }));
21
+
22
+ const ErrorText: any = styled('div')(({ theme }) => ({
23
+ fontSize: theme.typography.fontSize - 2,
24
+ color: theme.palette.error.main,
25
+ paddingTop: theme.spacing(1),
26
+ }));
27
+
28
+ class ResponseAreaComponent extends React.Component {
29
+ static propTypes = {
30
+ editableHtmlProps: PropTypes.object.isRequired,
31
+ responseAreasError: PropTypes.string,
32
+ responseAreaChoicesError: PropTypes.string,
33
+ };
34
+
35
+ componentDidMount() {
36
+ // eslint-disable-next-line react/no-find-dom-node
37
+ const domNode = ReactDOM.findDOMNode(this);
38
+
39
+ renderMath(domNode);
40
+ }
41
+
42
+ render() {
43
+ const { editableHtmlProps, responseAreasError, responseAreaChoicesError } = this.props;
44
+
45
+ return (
46
+ <ResponseArea>
47
+ <EditableHtml {...editableHtmlProps} />
48
+ {responseAreasError && <ErrorText>{responseAreasError}</ErrorText>}
49
+ {responseAreaChoicesError && <ErrorText>{responseAreaChoicesError}</ErrorText>}
50
+ </ResponseArea>
51
+ );
52
+ }
53
+ }
54
+
55
+ export default ResponseAreaComponent;
@@ -0,0 +1,32 @@
1
+ // @ts-nocheck
2
+ /**
3
+ * @synced-from pie-elements/packages/inline-dropdown/configure/src/utils.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 const generateValidationMessage = (config) => {
12
+ const { maxResponseAreas, maxResponseAreaChoices } = config;
13
+
14
+ const responseAreasMessage =
15
+ '\nThere should be at least 1 ' +
16
+ (maxResponseAreas ? `and at most ${maxResponseAreas} ` : '') +
17
+ 'response area' +
18
+ (maxResponseAreas ? 's' : '') +
19
+ ' defined.' +
20
+ (maxResponseAreaChoices
21
+ ? `\nThere should be at most ${maxResponseAreaChoices} choices defined per response area.`
22
+ : '');
23
+
24
+ const message = 'Validation requirements:' + responseAreasMessage;
25
+
26
+ return message;
27
+ };
28
+
29
+ export const getPluginProps = (props = {}, baseInputConfiguration = {}) => ({
30
+ ...baseInputConfiguration,
31
+ ...props,
32
+ });
@@ -0,0 +1,28 @@
1
+ // @ts-nocheck
2
+ /**
3
+ * @synced-from pie-elements/packages/inline-dropdown/controller/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
+ alternateResponse: {},
13
+ choiceRationaleEnabled: true,
14
+ choices: {},
15
+ disabled: false,
16
+ displayType: 'block',
17
+ markup: '',
18
+ mode: 'gather',
19
+ prompt: '',
20
+ promptEnabled: true,
21
+ rationale: '',
22
+ rationaleEnabled: true,
23
+ shuffle: true,
24
+ studentInstructionsEnabled: true,
25
+ teacherInstructions: '',
26
+ teacherInstructionsEnabled: true,
27
+ toolbarEditorPosition: 'bottom',
28
+ };
@@ -0,0 +1,340 @@
1
+ // @ts-nocheck
2
+ /**
3
+ * @synced-from pie-elements/packages/inline-dropdown/controller/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 { isEmpty, map, reduce } from 'lodash-es';
12
+ import { lockChoices, getShuffledChoices, partialScoring } from '@pie-element/shared-controller-utils';
13
+ import defaults from './defaults.js';
14
+
15
+ import { getAllCorrectResponses } from './utils.js';
16
+
17
+ const getFeedback = (correct) => {
18
+ if (correct) {
19
+ return 'correct';
20
+ }
21
+
22
+ return 'incorrect';
23
+ };
24
+
25
+ export const normalize = (question) => ({ ...defaults, ...question });
26
+
27
+ /**
28
+ *
29
+ * @param {*} question
30
+ * @param {*} session
31
+ * @param {*} env
32
+ * @param {*} updateSession - optional - a function that will set the properties passed into it on the session.
33
+ */
34
+ export async function model(question, session, env, updateSession) {
35
+ const normalizedQuestion = normalize(question);
36
+ const { value = {} } = session || {};
37
+ let choices = reduce(
38
+ normalizedQuestion.choices,
39
+ (obj, area, key) => {
40
+ obj[key] = map(area, (choice) => choice);
41
+
42
+ return obj;
43
+ },
44
+ {},
45
+ );
46
+
47
+ let feedback = {};
48
+
49
+ if (env.mode === 'evaluate') {
50
+ const allCorrectResponses = getAllCorrectResponses(normalizedQuestion);
51
+ const respAreaLength = Object.keys(allCorrectResponses).length;
52
+ let correctResponses = 0;
53
+
54
+ for (let i = 0; i < respAreaLength; i++) {
55
+ const result = reduce(
56
+ allCorrectResponses,
57
+ (obj, choices, key) => {
58
+ const answer = (value && value[key]) || '';
59
+ const correctChoice = choices[i] || '';
60
+ const isCorrect = answer && correctChoice && correctChoice === answer;
61
+
62
+ obj.feedback[key] = getFeedback(isCorrect);
63
+
64
+ if (isCorrect) {
65
+ obj.correctResponses += 1;
66
+ }
67
+
68
+ return obj;
69
+ },
70
+ { correctResponses: 0, feedback: {} },
71
+ );
72
+
73
+ if (result.correctResponses >= correctResponses) {
74
+ correctResponses = result.correctResponses;
75
+ feedback = result.feedback;
76
+ }
77
+
78
+ if (result.correctResponses === respAreaLength) {
79
+ break;
80
+ }
81
+ }
82
+ }
83
+
84
+ const lockChoiceOrder = lockChoices(normalizedQuestion, session, env);
85
+
86
+ if (!lockChoiceOrder) {
87
+ const shuffledValues = {};
88
+ const keys = Object.keys(choices);
89
+
90
+ const us = (part) => (id, element, update) => {
91
+ return new Promise((resolve) => {
92
+ shuffledValues[part] = update.shuffledValues;
93
+ resolve();
94
+ });
95
+ };
96
+
97
+ let i;
98
+
99
+ for (i = 0; i < keys.length; i++) {
100
+ const key = keys[i];
101
+ const storedValues = session?.shuffledValues?.[key];
102
+
103
+ choices[key] = await getShuffledChoices(
104
+ choices[key],
105
+ // the shuffledValues structure was updated to an object like { choice_key: [] }
106
+ // and we need to override shuffledValues if it's not an array
107
+ { shuffledValues: Array.isArray(storedValues) ? storedValues : [] },
108
+ us(key),
109
+ 'value',
110
+ );
111
+ }
112
+
113
+ if (!isEmpty(shuffledValues)) {
114
+ if (session && updateSession && typeof updateSession === 'function') {
115
+ updateSession(session.id, session.element, {
116
+ shuffledValues,
117
+ }).catch((e) => {
118
+ // eslint-disable-next-line no-console
119
+ console.error('update session failed', e);
120
+ });
121
+ }
122
+ }
123
+ }
124
+
125
+ let teacherInstructions = null;
126
+ let rationale = null;
127
+
128
+ const choicesWillNullRationales = (Object.keys(choices) || []).reduce((acc, currentValue) => {
129
+ acc[currentValue] = (choices[currentValue] || []).map((choice) => ({
130
+ ...choice,
131
+ rationale: null,
132
+ }));
133
+
134
+ return acc;
135
+ }, {});
136
+
137
+ if (env.role === 'instructor' && (env.mode === 'view' || env.mode === 'evaluate')) {
138
+ rationale = normalizedQuestion.rationaleEnabled ? normalizedQuestion.rationale : null;
139
+ teacherInstructions = normalizedQuestion.teacherInstructionsEnabled ? normalizedQuestion.teacherInstructions : null;
140
+
141
+ choices = normalizedQuestion.choiceRationaleEnabled ? normalizedQuestion.choices : choicesWillNullRationales;
142
+ } else {
143
+ rationale = null;
144
+ teacherInstructions = null;
145
+ choices = choicesWillNullRationales;
146
+ }
147
+
148
+ const out = {
149
+ disabled: env.mode !== 'gather',
150
+ mode: env.mode,
151
+ prompt: normalizedQuestion.promptEnabled ? normalizedQuestion.prompt : null,
152
+ displayType: normalizedQuestion.displayType,
153
+ markup: normalizedQuestion.markup,
154
+ choices,
155
+ feedback,
156
+
157
+ responseCorrect: env.mode === 'evaluate' ? getScore(normalizedQuestion, session) === 1 : undefined,
158
+ rationale,
159
+ teacherInstructions,
160
+ language: normalizedQuestion.language,
161
+ extraCSSRules: normalizedQuestion.extraCSSRules,
162
+ };
163
+
164
+ return out;
165
+ }
166
+
167
+ export const getScore = (config, session) => {
168
+ const { value = {} } = session || {};
169
+ const maxScore = config && config.choices ? Object.keys(config.choices).length : 0;
170
+ const allCorrectResponses = getAllCorrectResponses(config);
171
+ let correctCount = 0;
172
+
173
+ for (let i = 0; i < maxScore; i++) {
174
+ const result = reduce(
175
+ allCorrectResponses,
176
+ (total, choices, key) => {
177
+ const answer = (value && value[key]) || '';
178
+ const correctChoice = choices[i] || '';
179
+
180
+ if (correctChoice && answer && correctChoice === answer) {
181
+ return total;
182
+ }
183
+
184
+ return total - 1;
185
+ },
186
+ maxScore,
187
+ );
188
+
189
+ if (result > correctCount) {
190
+ correctCount = result;
191
+ }
192
+
193
+ if (result === maxScore) {
194
+ break;
195
+ }
196
+ }
197
+
198
+ const str = (correctCount / maxScore).toFixed(2);
199
+
200
+ return parseFloat(str);
201
+ };
202
+
203
+ /**
204
+ * Generates detailed trace log for scoring evaluation
205
+ * @param {Object} model - the question model
206
+ * @param {Object} session - the student session
207
+ * @param {Object} env - the environment
208
+ * @returns {Array} traceLog - array of trace messages
209
+ */
210
+ export const getLogTrace = (model, session, env) => {
211
+ const traceLog = [];
212
+ const { value = {} } = session || {};
213
+ const allCorrectResponses = getAllCorrectResponses(model);
214
+ const responseAreaKeys = Object.keys(allCorrectResponses);
215
+ const totalAreas = responseAreaKeys.length;
216
+
217
+ traceLog.push(`${totalAreas} dropdown response area(s) defined in this question.`);
218
+
219
+ if (value && Object.keys(value).length > 0) {
220
+ const selectedAreas = Object.entries(value).filter(([key, val]) => val && val.trim()).length;
221
+ traceLog.push(`Student selected options in ${selectedAreas} out of ${totalAreas} dropdown(s).`);
222
+
223
+ responseAreaKeys.forEach((areaKey) => {
224
+ const studentSelection = (value && value[areaKey]) || '';
225
+ const correctOptions = allCorrectResponses[areaKey] || [];
226
+
227
+ if (studentSelection.trim()) {
228
+ traceLog.push(`Dropdown ${parseInt(areaKey) + 1}: student selected '${studentSelection}' (correct options: [${correctOptions.map(opt => `'${opt}'`).join(', ')}]).`);
229
+ } else {
230
+ traceLog.push(`Dropdown ${parseInt(areaKey) + 1}: no selection made (correct options: [${correctOptions.map(opt => `'${opt}'`).join(', ')}]).`);
231
+ }
232
+ });
233
+ } else {
234
+ traceLog.push('Student did not make any selections in the dropdowns.');
235
+ }
236
+
237
+ const partialScoringEnabled = partialScoring.enabled(model, env);
238
+ traceLog.push(
239
+ `Scoring method: ${
240
+ partialScoringEnabled ? 'partial scoring' : 'all-or-nothing scoring'
241
+ }.`
242
+ );
243
+
244
+ const score = getScore(model, session);
245
+ traceLog.push(`Final score: ${score}.`);
246
+
247
+ return traceLog;
248
+ }
249
+
250
+ /**
251
+ *
252
+ * The score is partial by default for checkbox mode, allOrNothing for radio mode.
253
+ * To disable partial scoring for checkbox mode you either set model.partialScoring = false or env.partialScoring =
254
+ * false. the value in `env` will override the value in `model`.
255
+ * @param {Object} model - the main model
256
+ * @param {boolean} model.partialScoring - is partial scoring enabled (if undefined set to to true)
257
+ * @param {*} session
258
+ * @param {Object} env
259
+ * @param {boolean} env.partialScoring - is partial scoring enabled (if undefined default to true) This overrides
260
+ * `model.partialScoring`.
261
+ */
262
+ export function outcome(model, session, env = {}) {
263
+ return new Promise((resolve) => {
264
+ if (!session || isEmpty(session)) {
265
+ resolve({
266
+ score: 0,
267
+ empty: true,
268
+ traceLog: ['Student did not make any selections in the dropdowns. Score is 0.']
269
+ });
270
+ } else {
271
+ const traceLog = getLogTrace(model, session, env);
272
+ const score = getScore(model, session);
273
+ const partialScoringEnabled = partialScoring.enabled(model, env);
274
+
275
+ resolve({
276
+ score: partialScoringEnabled ? score : Math.floor(score),
277
+ empty: false,
278
+ traceLog
279
+ });
280
+ }
281
+ });
282
+ }
283
+
284
+ export const createCorrectResponseSession = (question, env) => {
285
+ return new Promise((resolve) => {
286
+ if (env.mode !== 'evaluate' && env.role === 'instructor') {
287
+ const { choices } = question;
288
+ const value = {};
289
+
290
+ if (choices) {
291
+ Object.keys(choices).forEach((key, i) => {
292
+ const correctChoices = choices[key] && choices[key].filter((c) => c.correct);
293
+
294
+ value[i] = correctChoices && correctChoices[0].value;
295
+ });
296
+ }
297
+
298
+ resolve({
299
+ id: '1',
300
+ value,
301
+ });
302
+ } else {
303
+ resolve(null);
304
+ }
305
+ });
306
+ };
307
+
308
+ // remove all html tags
309
+ const getInnerText = (html) => (html || '').replaceAll(/<[^>]*>/g, '');
310
+
311
+ // remove all html tags except img, iframe and source tag for audio
312
+ const getContent = (html) => (html || '').replace(/(<(?!img|iframe|source)([^>]+)>)/gi, '');
313
+
314
+ export const validate = (model = {}, config = {}) => {
315
+ const { markup, choices } = model;
316
+ const { maxResponseAreas, maxResponseAreaChoices } = config;
317
+ const errors = {};
318
+
319
+ ['teacherInstructions', 'prompt', 'rationale'].forEach((field) => {
320
+ if (config[field]?.required && !getContent(model[field])) {
321
+ errors[field] = 'This field is required.';
322
+ }
323
+ });
324
+
325
+ const nbOfResponseAreas = ((markup || '').match(/\{\{(\d+)\}\}/g) || []).length;
326
+
327
+ if (nbOfResponseAreas > maxResponseAreas) {
328
+ errors.responseAreasError = `No more than ${maxResponseAreas} response areas should be defined.`;
329
+ } else if (nbOfResponseAreas < 1) {
330
+ errors.responseAreasError = 'There should be defined at least 1 response area.';
331
+ }
332
+
333
+ (Object.keys(choices) || []).forEach((choiceKey) => {
334
+ if (choices[choiceKey] && choices[choiceKey].length > maxResponseAreaChoices) {
335
+ errors.responseAreaChoicesError = `No more than ${maxResponseAreaChoices} choices per response area should be defined.`;
336
+ }
337
+ });
338
+
339
+ return errors;
340
+ };
@@ -0,0 +1,36 @@
1
+ // @ts-nocheck
2
+ /**
3
+ * @synced-from pie-elements/packages/inline-dropdown/controller/src/utils.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 { forEach } from 'lodash-es';
12
+
13
+ export const getAllCorrectResponses = ({ choices, alternateResponse }) => {
14
+ alternateResponse = alternateResponse || {};
15
+ const correctAnswers = {};
16
+
17
+ forEach(choices, (respArea, key) => {
18
+ if (!correctAnswers[key]) {
19
+ correctAnswers[key] = [];
20
+ }
21
+
22
+ if (respArea) {
23
+ respArea.forEach((choice) => {
24
+ if (choice.correct) {
25
+ correctAnswers[key].push(choice.value);
26
+
27
+ if (alternateResponse[key]) {
28
+ correctAnswers[key] = [...correctAnswers[key], ...alternateResponse[key]];
29
+ }
30
+ }
31
+ });
32
+ }
33
+ });
34
+
35
+ return correctAnswers;
36
+ };
@@ -0,0 +1,100 @@
1
+ // @ts-nocheck
2
+ /**
3
+ * @synced-from pie-elements/packages/inline-dropdown/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 React from 'react';
12
+ import { createRoot } from 'react-dom/client';
13
+ import { ModelSetEvent, SessionChangedEvent } from '@pie-element/shared-player-events';
14
+ import { renderMath } from '@pie-element/shared-math-rendering-mathjax';
15
+ import InlineDropdown from './inline-dropdown.js';
16
+
17
+ export default class RootInlineDropdown extends HTMLElement {
18
+ constructor() {
19
+ super();
20
+ this._model = null;
21
+ this._session = null;
22
+ this._root = null;
23
+ }
24
+ set model(m) {
25
+ this._model = m;
26
+ this.dispatchEvent(
27
+ new ModelSetEvent(this.tagName.toLowerCase(), this.session && !!this.session.value, !!this._model),
28
+ );
29
+
30
+ this._render();
31
+ }
32
+
33
+ set session(s) {
34
+ this._session = s;
35
+ this._render();
36
+ }
37
+
38
+ get session() {
39
+ return this._session;
40
+ }
41
+
42
+ setLangAttribute() {
43
+ const language = this._model && typeof this._model.language ? this._model.language : '';
44
+ const lang = language ? language.slice(0, 2) : 'en';
45
+ this.setAttribute('lang', lang);
46
+ }
47
+
48
+ _render: any = () => {
49
+ if (this._model && this._session) {
50
+ let elem = React.createElement(InlineDropdown, {
51
+ model: this._model,
52
+ prompt: this._model.prompt,
53
+ rationale: this._model.rationale,
54
+ teacherInstructions: this._model.teacherInstructions,
55
+ disabled: this._model.disabled,
56
+ displayType: this._model.displayType,
57
+ markup: this._model.markup,
58
+ mode: this._model.mode,
59
+ choices: this._model.choices,
60
+ value: this._session.value,
61
+ feedback: this._model.feedback,
62
+ language: this._model.language,
63
+ onChange: this.changeSession,
64
+ });
65
+
66
+ this.setLangAttribute();
67
+
68
+ if (!this._root) {
69
+ this._root = createRoot(this);
70
+ }
71
+ this._root.render(elem);
72
+ queueMicrotask(() => {
73
+ renderMath(this);
74
+ });
75
+ }
76
+ };
77
+
78
+ dispatchChangedEvent: any = () => {
79
+ this.dispatchEvent(new SessionChangedEvent(this.tagName.toLowerCase(), this.session && !!this.session.value));
80
+ };
81
+
82
+ changeSession: any = (value) => {
83
+ this.session.value = value;
84
+ this.dispatchChangedEvent();
85
+ this._render();
86
+ };
87
+
88
+ connectedCallback() {
89
+ this.setAttribute('aria-label', 'Inline Dropdown Question');
90
+ this.setAttribute('role', 'region');
91
+
92
+ this._render();
93
+ }
94
+
95
+ disconnectedCallback() {
96
+ if (this._root) {
97
+ this._root.unmount();
98
+ }
99
+ }
100
+ }