@pie-element/inline-dropdown 10.1.1 → 10.1.2-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (262) hide show
  1. package/configure.js +2 -0
  2. package/controller.js +1 -0
  3. package/dist/author/defaults.d.ts +194 -0
  4. package/dist/author/defaults.js +130 -0
  5. package/dist/author/index.d.ts +43 -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.js +269 -0
  9. package/dist/author/main.d.ts +49 -0
  10. package/dist/author/main.js +384 -0
  11. package/dist/author/markupUtils.d.ts +12 -0
  12. package/dist/author/markupUtils.js +23 -0
  13. package/dist/author/response-area.d.ts +20 -0
  14. package/dist/author/response-area.js +32 -0
  15. package/dist/author/utils.d.ts +10 -0
  16. package/dist/author/utils.js +10 -0
  17. package/dist/browser/Close-CMvmRhfL.js +9015 -0
  18. package/dist/browser/Close-CMvmRhfL.js.map +1 -0
  19. package/dist/browser/author/index.js +41184 -0
  20. package/dist/browser/author/index.js.map +1 -0
  21. package/dist/browser/controller/index.js +215 -0
  22. package/dist/browser/controller/index.js.map +1 -0
  23. package/dist/browser/delivery/index.js +2714 -0
  24. package/dist/browser/delivery/index.js.map +1 -0
  25. package/dist/browser/inline-dropdown.css +2 -0
  26. package/dist/browser/isEmpty-BAznrYT5.js +433 -0
  27. package/dist/browser/isEmpty-BAznrYT5.js.map +1 -0
  28. package/dist/browser/reduce-2sGcZtv4.js +446 -0
  29. package/dist/browser/reduce-2sGcZtv4.js.map +1 -0
  30. package/dist/controller/defaults.d.ts +27 -0
  31. package/dist/controller/defaults.js +21 -0
  32. package/dist/controller/index.d.ts +54 -0
  33. package/dist/controller/index.js +126 -0
  34. package/dist/controller/utils.d.ts +12 -0
  35. package/dist/controller/utils.js +13 -0
  36. package/dist/delivery/index.d.ts +20 -0
  37. package/dist/delivery/index.js +60 -0
  38. package/dist/delivery/inline-dropdown.d.ts +38 -0
  39. package/dist/delivery/inline-dropdown.js +109 -0
  40. package/dist/index.d.ts +1 -0
  41. package/dist/index.iife.d.ts +8 -0
  42. package/dist/index.iife.js +148 -0
  43. package/dist/index.js +2 -0
  44. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_DataView.js +6 -0
  45. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Hash.js +16 -0
  46. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_ListCache.js +16 -0
  47. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Map.js +6 -0
  48. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_MapCache.js +16 -0
  49. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Promise.js +6 -0
  50. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Set.js +6 -0
  51. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_SetCache.js +11 -0
  52. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Stack.js +14 -0
  53. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Symbol.js +5 -0
  54. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Uint8Array.js +5 -0
  55. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_WeakMap.js +6 -0
  56. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_apply.js +12 -0
  57. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayEach.js +7 -0
  58. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayFilter.js +10 -0
  59. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayLikeKeys.js +15 -0
  60. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayMap.js +7 -0
  61. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayPush.js +7 -0
  62. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayReduce.js +8 -0
  63. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arraySome.js +7 -0
  64. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assignValue.js +10 -0
  65. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assocIndexOf.js +8 -0
  66. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssign.js +8 -0
  67. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignIn.js +8 -0
  68. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignValue.js +12 -0
  69. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseClone.js +57 -0
  70. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseCreate.js +14 -0
  71. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseEach.js +6 -0
  72. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseExtremum.js +11 -0
  73. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseFor.js +5 -0
  74. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseForOwn.js +8 -0
  75. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGet.js +10 -0
  76. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetAllKeys.js +9 -0
  77. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetTag.js +10 -0
  78. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGt.js +6 -0
  79. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseHasIn.js +6 -0
  80. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsArguments.js +9 -0
  81. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqual.js +8 -0
  82. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqualDeep.js +30 -0
  83. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsMap.js +9 -0
  84. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsMatch.js +26 -0
  85. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNative.js +11 -0
  86. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsSet.js +9 -0
  87. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsTypedArray.js +11 -0
  88. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIteratee.js +11 -0
  89. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeys.js +12 -0
  90. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeysIn.js +13 -0
  91. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMap.js +11 -0
  92. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMatches.js +12 -0
  93. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMatchesProperty.js +17 -0
  94. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseProperty.js +8 -0
  95. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_basePropertyDeep.js +9 -0
  96. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_basePropertyOf.js +8 -0
  97. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseReduce.js +8 -0
  98. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseRest.js +9 -0
  99. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseSetToString.js +14 -0
  100. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTimes.js +7 -0
  101. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseToString.js +15 -0
  102. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseUnary.js +8 -0
  103. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cacheHas.js +6 -0
  104. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_castFunction.js +7 -0
  105. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_castPath.js +10 -0
  106. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneArrayBuffer.js +8 -0
  107. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneBuffer.js +10 -0
  108. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneDataView.js +8 -0
  109. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneRegExp.js +8 -0
  110. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneSymbol.js +8 -0
  111. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneTypedArray.js +8 -0
  112. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyArray.js +8 -0
  113. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyObject.js +14 -0
  114. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbols.js +8 -0
  115. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbolsIn.js +8 -0
  116. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_coreJsData.js +5 -0
  117. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createBaseEach.js +12 -0
  118. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createBaseFor.js +12 -0
  119. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_defineProperty.js +10 -0
  120. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalArrays.js +35 -0
  121. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalByTag.js +35 -0
  122. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalObjects.js +32 -0
  123. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_escapeHtmlChar.js +11 -0
  124. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_freeGlobal.js +4 -0
  125. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeys.js +9 -0
  126. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeysIn.js +9 -0
  127. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getMapData.js +8 -0
  128. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getMatchData.js +16 -0
  129. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getNative.js +9 -0
  130. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getPrototype.js +5 -0
  131. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getRawTag.js +14 -0
  132. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbols.js +10 -0
  133. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbolsIn.js +11 -0
  134. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getTag.js +23 -0
  135. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getValue.js +6 -0
  136. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hasPath.js +18 -0
  137. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashClear.js +7 -0
  138. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashDelete.js +7 -0
  139. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashGet.js +13 -0
  140. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashHas.js +9 -0
  141. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashSet.js +9 -0
  142. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneArray.js +8 -0
  143. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneByTag.js +33 -0
  144. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneObject.js +9 -0
  145. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIndex.js +8 -0
  146. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIterateeCall.js +12 -0
  147. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKey.js +11 -0
  148. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKeyable.js +7 -0
  149. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isMasked.js +11 -0
  150. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isPrototype.js +8 -0
  151. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isStrictComparable.js +7 -0
  152. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheClear.js +6 -0
  153. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheDelete.js +9 -0
  154. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheGet.js +8 -0
  155. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheHas.js +7 -0
  156. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheSet.js +8 -0
  157. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheClear.js +13 -0
  158. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheDelete.js +8 -0
  159. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheGet.js +7 -0
  160. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheHas.js +7 -0
  161. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheSet.js +8 -0
  162. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapToArray.js +9 -0
  163. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_matchesStrictComparable.js +8 -0
  164. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_memoizeCapped.js +11 -0
  165. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeCreate.js +5 -0
  166. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeys.js +5 -0
  167. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeysIn.js +8 -0
  168. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nodeUtil.js +9 -0
  169. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_objectToString.js +7 -0
  170. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overArg.js +8 -0
  171. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overRest.js +13 -0
  172. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_root.js +5 -0
  173. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheAdd.js +7 -0
  174. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheHas.js +6 -0
  175. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setToArray.js +9 -0
  176. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setToString.js +6 -0
  177. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_shortOut.js +14 -0
  178. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackClear.js +7 -0
  179. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackDelete.js +7 -0
  180. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackGet.js +6 -0
  181. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackHas.js +6 -0
  182. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackSet.js +16 -0
  183. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stringToPath.js +10 -0
  184. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toKey.js +10 -0
  185. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toSource.js +15 -0
  186. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/cloneDeep.js +8 -0
  187. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/constant.js +8 -0
  188. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/defaults.js +16 -0
  189. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/eq.js +6 -0
  190. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/escape.js +9 -0
  191. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/forEach.js +10 -0
  192. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/get.js +8 -0
  193. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/hasIn.js +8 -0
  194. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/identity.js +6 -0
  195. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArguments.js +10 -0
  196. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArray.js +4 -0
  197. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLike.js +8 -0
  198. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isBuffer.js +6 -0
  199. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.js +21 -0
  200. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEqual.js +7 -0
  201. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isFunction.js +11 -0
  202. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isLength.js +7 -0
  203. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isMap.js +7 -0
  204. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObject.js +7 -0
  205. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObjectLike.js +6 -0
  206. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSet.js +7 -0
  207. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSymbol.js +9 -0
  208. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isTypedArray.js +7 -0
  209. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isUndefined.js +6 -0
  210. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keys.js +9 -0
  211. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keysIn.js +9 -0
  212. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/map.js +10 -0
  213. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/max.js +9 -0
  214. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/memoize.js +16 -0
  215. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/property.js +10 -0
  216. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/reduce.js +12 -0
  217. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubArray.js +6 -0
  218. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubFalse.js +6 -0
  219. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toString.js +7 -0
  220. package/package.json +79 -18
  221. package/CHANGELOG.json +0 -1082
  222. package/CHANGELOG.md +0 -2185
  223. package/LICENSE.md +0 -5
  224. package/README.md +0 -1
  225. package/configure/CHANGELOG.json +0 -647
  226. package/configure/CHANGELOG.md +0 -1942
  227. package/configure/lib/defaults.js +0 -192
  228. package/configure/lib/defaults.js.map +0 -1
  229. package/configure/lib/index.js +0 -135
  230. package/configure/lib/index.js.map +0 -1
  231. package/configure/lib/inline-dropdown-toolbar.js +0 -457
  232. package/configure/lib/inline-dropdown-toolbar.js.map +0 -1
  233. package/configure/lib/main.js +0 -603
  234. package/configure/lib/main.js.map +0 -1
  235. package/configure/lib/markupUtils.js +0 -50
  236. package/configure/lib/markupUtils.js.map +0 -1
  237. package/configure/lib/response-area.js +0 -48
  238. package/configure/lib/response-area.js.map +0 -1
  239. package/configure/lib/utils.js +0 -22
  240. package/configure/lib/utils.js.map +0 -1
  241. package/configure/package.json +0 -24
  242. package/controller/CHANGELOG.json +0 -467
  243. package/controller/CHANGELOG.md +0 -1283
  244. package/controller/lib/defaults.js +0 -25
  245. package/controller/lib/defaults.js.map +0 -1
  246. package/controller/lib/index.js +0 -295
  247. package/controller/lib/index.js.map +0 -1
  248. package/controller/lib/utils.js +0 -32
  249. package/controller/lib/utils.js.map +0 -1
  250. package/controller/package.json +0 -16
  251. package/docs/config-schema.json +0 -2854
  252. package/docs/config-schema.json.md +0 -2106
  253. package/docs/demo/config.js +0 -8
  254. package/docs/demo/generate.js +0 -76
  255. package/docs/demo/index.html +0 -1
  256. package/docs/demo/session.js +0 -11
  257. package/docs/pie-schema.json +0 -1152
  258. package/docs/pie-schema.json.md +0 -814
  259. package/lib/index.js +0 -85
  260. package/lib/index.js.map +0 -1
  261. package/lib/inline-dropdown.js +0 -176
  262. package/lib/inline-dropdown.js.map +0 -1
@@ -0,0 +1,269 @@
1
+ import e from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.js";
2
+ import t from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEqual.js";
3
+ import { getPluginProps as n } from "./utils.js";
4
+ import r from "react";
5
+ import { renderMath as i } from "@pie-element/shared-math-rendering-mathjax";
6
+ import a from "react-dom";
7
+ import o from "prop-types";
8
+ import { color as s } from "@pie-lib/render-ui";
9
+ import { jsx as c, jsxs as l } from "react/jsx-runtime";
10
+ import { styled as u } from "@mui/material/styles";
11
+ import d from "@pie-lib/editable-html-tip-tap";
12
+ import f from "@mui/icons-material/Add";
13
+ import p from "@mui/icons-material/Check";
14
+ import m from "@mui/icons-material/Close";
15
+ import h from "@mui/icons-material/Edit";
16
+ import g from "@mui/material/IconButton";
17
+ //#region src/author/inline-dropdown-toolbar.tsx
18
+ var _ = u("div")(({ theme: e }) => ({
19
+ display: "flex",
20
+ alignItems: "flex-start",
21
+ position: "relative",
22
+ background: e.palette.common.white,
23
+ borderBottom: `1px solid ${e.palette.grey[400]}`,
24
+ "&:last-child": { borderRadius: "0 0 4px 4px" }
25
+ })), v = u("div")(({ theme: e }) => ({
26
+ display: "flex",
27
+ justifyContent: "center",
28
+ color: e.palette.common.white,
29
+ fontSize: e.typography.fontSize,
30
+ fontStyle: "normal",
31
+ position: "absolute",
32
+ transform: "translate(0, -50%)",
33
+ backgroundColor: s.correct(),
34
+ borderRadius: "50%",
35
+ top: e.spacing(2),
36
+ left: e.spacing(1),
37
+ zIndex: 3
38
+ })), y = u("div")(({ theme: e, correct: t }) => ({
39
+ flex: 1,
40
+ padding: e.spacing(.75),
41
+ paddingLeft: e.spacing(3.5),
42
+ ...t && { background: s.correctSecondary() },
43
+ "& p": { margin: 0 }
44
+ })), b = u("div")(({ theme: e }) => ({
45
+ margin: e.spacing(.5),
46
+ display: "flex"
47
+ })), x = u(g)(({ theme: e }) => ({
48
+ fontSize: e.typography.fontSize,
49
+ padding: e.spacing(.5),
50
+ color: e.palette.common.black
51
+ })), S = class extends r.Component {
52
+ static propTypes = {
53
+ correct: o.bool.isRequired,
54
+ onClick: o.func.isRequired,
55
+ onRemoveChoice: o.func.isRequired,
56
+ onEditChoice: o.func.isRequired,
57
+ value: o.string.isRequired
58
+ };
59
+ onRemoveClick = (e) => {
60
+ let { onRemoveChoice: t } = this.props;
61
+ e.preventDefault(), e.stopPropagation(), t();
62
+ };
63
+ onEditClick = (e) => {
64
+ let { onEditChoice: t } = this.props;
65
+ e.preventDefault(), e.stopPropagation(), t();
66
+ };
67
+ render() {
68
+ let { correct: e, onClick: t, value: n } = this.props;
69
+ return /* @__PURE__ */ l(_, { children: [
70
+ e && /* @__PURE__ */ c(v, {
71
+ onClick: t,
72
+ children: /* @__PURE__ */ c(p, { fontSize: "inherit" })
73
+ }),
74
+ /* @__PURE__ */ c(y, {
75
+ correct: e,
76
+ onClick: t,
77
+ dangerouslySetInnerHTML: { __html: n }
78
+ }),
79
+ /* @__PURE__ */ l(b, { children: [/* @__PURE__ */ c(x, {
80
+ onClick: this.onEditClick,
81
+ size: "small",
82
+ "aria-label": "Edit",
83
+ children: /* @__PURE__ */ c(h, { fontSize: "inherit" })
84
+ }), /* @__PURE__ */ c(x, {
85
+ onClick: this.onRemoveClick,
86
+ size: "small",
87
+ "aria-label": "Remove",
88
+ children: /* @__PURE__ */ c(m, { fontSize: "inherit" })
89
+ })] })
90
+ ] });
91
+ }
92
+ }, C = (e) => {
93
+ let t = document.createElement("div");
94
+ return t.innerHTML = (e || "").trim(), t;
95
+ }, w = u("div")(({ theme: e }) => ({
96
+ boxShadow: e.shadows[2],
97
+ borderRadius: "4px",
98
+ width: "400px"
99
+ })), T = u(d)(({ theme: e }) => ({
100
+ borderRadius: "4px",
101
+ backgroundColor: e.palette.common.white,
102
+ "& [data-slate-editor=\"true\"]": { minHeight: "initial !important" }
103
+ })), E = u(g)(({ theme: e }) => ({
104
+ fontSize: e.typography.fontSize + 2,
105
+ padding: e.spacing(.5),
106
+ color: e.palette.common.black,
107
+ position: "absolute",
108
+ top: "50%",
109
+ right: e.spacing(2),
110
+ transform: "translate(0, -50%)"
111
+ })), D = u("div")({
112
+ display: "flex",
113
+ flexDirection: "column",
114
+ "& > div:last-child": { border: "none" }
115
+ }), O = u("div")(({ theme: e }) => ({
116
+ padding: e.spacing(.5),
117
+ position: "relative"
118
+ })), k = class extends r.Component {
119
+ static propTypes = {
120
+ node: o.object,
121
+ pos: o.number,
122
+ uploadSoundSupport: o.object,
123
+ onDone: o.func,
124
+ choices: o.array,
125
+ onAddChoice: o.func.isRequired,
126
+ editorCallback: o.func,
127
+ onRemoveChoice: o.func.isRequired,
128
+ onSelectChoice: o.func.isRequired,
129
+ onToolbarDone: o.func.isRequired,
130
+ editor: o.object,
131
+ spellCheck: o.bool
132
+ };
133
+ clickedInside = !1;
134
+ preventDone = !1;
135
+ state = {
136
+ respAreaMarkup: "",
137
+ editedChoiceIndex: -1
138
+ };
139
+ componentDidMount() {
140
+ let { editor: e } = this.props, t = e.view.nodeDOM(e.state.selection.from);
141
+ if (t?.nodeType === 1) {
142
+ let e = t.getBoundingClientRect(), n = t.closest(".tiptap").getBoundingClientRect(), r = e.top - e.height, i = e.left - n.left;
143
+ this.setState({ toolbarStyle: {
144
+ position: "absolute",
145
+ top: `${r + e.height + 40}px`,
146
+ left: `${i + 25}px`
147
+ } });
148
+ }
149
+ }
150
+ componentDidUpdate() {
151
+ i(a.findDOMNode(this));
152
+ }
153
+ componentWillUnmount() {
154
+ this.commitPendingEdit();
155
+ }
156
+ commitPendingEdit = () => {
157
+ let { editedChoiceIndex: e } = this.state;
158
+ e < 0 || !this.editorRef?.getHTML || (this.preventDone = !1, this.onDone(this.editorRef.getHTML() || ""));
159
+ };
160
+ onRespAreaChange = (e) => {
161
+ this.setState({ respAreaMarkup: e });
162
+ };
163
+ onAddChoice = () => {
164
+ let { editor: e } = this.props, { tr: t } = e.state;
165
+ t.isDone = !0, e.view.dispatch(t);
166
+ };
167
+ onDone = (t) => {
168
+ let { choices: n, node: r, editor: i, onAddChoice: a, onToolbarDone: o } = this.props, { editedChoiceIndex: s } = this.state, c = C(t).textContent.trim();
169
+ s >= 0 && n?.[s]?.correct && i.commands.updateAttributes("inline_dropdown", { value: t }), e(c) || (a(r.attrs.index, t, s), i.commands.refreshResponseArea()), this.setState({ editedChoiceIndex: -1 });
170
+ };
171
+ onSelectChoice = (e, t) => {
172
+ let { node: n, editor: r, onToolbarDone: i, onSelectChoice: a } = this.props;
173
+ r.commands.updateAttributes("inline_dropdown", { value: e }), a(t), r.commands.refreshResponseArea();
174
+ };
175
+ onRemoveChoice = (e, n) => {
176
+ let { node: r, editor: i, onToolbarDone: a, onRemoveChoice: o } = this.props;
177
+ t(e, r.attrs.value) && i.commands.updateAttributes("inline_dropdown", { value: null }), o(n), i.commands.refreshResponseArea();
178
+ };
179
+ onEditChoice = (e, t) => {
180
+ let { editedChoiceIndex: n } = this.state;
181
+ if (this.clickedInside = !0, this.preventDone = !0, n >= 0) {
182
+ let e = this.editorRef.getHTML() || "";
183
+ this.onDone(e);
184
+ }
185
+ this.onRespAreaChange(e), this.setState({ editedChoiceIndex: t });
186
+ };
187
+ onKeyDown = (e) => {
188
+ if (e.key === "Enter") {
189
+ let e = this.editorRef.getHTML() || "";
190
+ return this.onDone(e), this.preventDone = !0, !0;
191
+ }
192
+ return !1;
193
+ };
194
+ onBlur = () => {
195
+ if (this.clickedInside) {
196
+ this.clickedInside = !1;
197
+ return;
198
+ }
199
+ let { editedChoiceIndex: e } = this.state;
200
+ if (e >= 0) {
201
+ this.commitPendingEdit();
202
+ return;
203
+ }
204
+ this.onAddChoice();
205
+ };
206
+ onClickInside = () => {
207
+ this.clickedInside = !0;
208
+ };
209
+ render() {
210
+ let { choices: e, spellCheck: t, uploadSoundSupport: r, mathMlOptions: i = {}, baseInputConfiguration: a = {}, responseAreaInputConfiguration: o = {} } = this.props, { respAreaMarkup: s, toolbarStyle: u } = this.state;
211
+ return u ? /* @__PURE__ */ l(w, {
212
+ "data-inline-dropdown-toolbar": "",
213
+ style: {
214
+ ...u,
215
+ backgroundColor: "#E0E1E6",
216
+ zIndex: 1
217
+ },
218
+ onMouseDown: this.onClickInside,
219
+ children: [/* @__PURE__ */ l(O, { children: [/* @__PURE__ */ c(T, {
220
+ editorRef: (e) => {
221
+ e && (this.editorRef = e, this.props.editorCallback?.(e));
222
+ },
223
+ autoFocus: !0,
224
+ autoSave: !0,
225
+ toolbarOpts: {
226
+ position: "top",
227
+ alwaysVisible: !1,
228
+ showDone: !1,
229
+ doneOn: "blur"
230
+ },
231
+ markup: s,
232
+ onKeyDown: this.onKeyDown,
233
+ languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
234
+ onChange: (e) => {
235
+ this.preventDone || this.onRespAreaChange(e);
236
+ },
237
+ onDone: (e) => {
238
+ if (this.preventDone) {
239
+ this.preventDone = !1;
240
+ return;
241
+ }
242
+ this.onDone(e);
243
+ },
244
+ onBlur: (e) => {
245
+ let t = !!(e.relatedTarget && e.relatedTarget.closest(".insert-character-dialog")), n = !!(e.relatedTarget && e.relatedTarget.closest("[aria-label=\"Done\"]"));
246
+ e.relatedTarget && (this.preventDone = t || n, (t || n) && (this.clickedInside = !0)), this.onBlur();
247
+ },
248
+ placeholder: "Add Choice",
249
+ pluginProps: n(o?.inputConfiguration, a),
250
+ spellCheck: t,
251
+ uploadSoundSupport: r,
252
+ mathMlOptions: i
253
+ }), /* @__PURE__ */ c(E, {
254
+ onClick: () => this.onAddChoice(),
255
+ size: "small",
256
+ "aria-label": "Add",
257
+ children: /* @__PURE__ */ c(f, { fontSize: "inherit" })
258
+ })] }), e && /* @__PURE__ */ c(D, { children: e.map(({ label: e, correct: t }, n) => /* @__PURE__ */ c(S, {
259
+ onClick: () => this.onSelectChoice(e, n),
260
+ onRemoveChoice: () => this.onRemoveChoice(e, n),
261
+ onEditChoice: () => this.onEditChoice(e, n),
262
+ value: e,
263
+ correct: t
264
+ }, n)) })]
265
+ }) : null;
266
+ }
267
+ };
268
+ //#endregion
269
+ export { k as default };
@@ -0,0 +1,49 @@
1
+ /**
2
+ * @synced-from pie-elements/packages/inline-dropdown/configure/src/main.jsx
3
+ * @auto-generated
4
+ *
5
+ * This file is automatically synced from pie-elements and converted to TypeScript.
6
+ * Manual edits will be overwritten on next sync.
7
+ * To make changes, edit the upstream JavaScript file and run sync again.
8
+ */
9
+ import React from 'react';
10
+ import PropTypes from 'prop-types';
11
+ export declare class Main extends React.Component {
12
+ static propTypes: {
13
+ configuration: PropTypes.Validator<object>;
14
+ model: PropTypes.Validator<object>;
15
+ disableSidePanel: PropTypes.Requireable<boolean>;
16
+ onModelChanged: PropTypes.Validator<(...args: any[]) => any>;
17
+ onConfigurationChanged: PropTypes.Validator<(...args: any[]) => any>;
18
+ imageSupport: PropTypes.Requireable<PropTypes.InferProps<{
19
+ add: PropTypes.Validator<(...args: any[]) => any>;
20
+ delete: PropTypes.Validator<(...args: any[]) => any>;
21
+ }>>;
22
+ uploadSoundSupport: PropTypes.Requireable<PropTypes.InferProps<{
23
+ add: PropTypes.Validator<(...args: any[]) => any>;
24
+ delete: PropTypes.Validator<(...args: any[]) => any>;
25
+ }>>;
26
+ };
27
+ state: {
28
+ warning: {
29
+ open: boolean;
30
+ };
31
+ };
32
+ componentDidMount(): void;
33
+ UNSAFE_componentWillReceiveProps(nProps: any): void;
34
+ componentDidUpdate(): void;
35
+ onModelChange: any;
36
+ onPromptChanged: any;
37
+ onRationaleChanged: any;
38
+ onChoiceRationaleChanged: any;
39
+ onTeacherInstructionsChanged: any;
40
+ onMarkupChanged: any;
41
+ onCheck: any;
42
+ validateResponseAreaClose: any;
43
+ onChange: any;
44
+ onAddChoice: any;
45
+ onRemoveChoice: any;
46
+ onSelectChoice: any;
47
+ render(): React.JSX.Element;
48
+ }
49
+ export default Main;
@@ -0,0 +1,384 @@
1
+ import e from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/cloneDeep.js";
2
+ import t from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.js";
3
+ import n from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEqual.js";
4
+ import r from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isUndefined.js";
5
+ import i from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/max.js";
6
+ import a from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/reduce.js";
7
+ import { generateValidationMessage as o } from "./utils.js";
8
+ import s from "./inline-dropdown-toolbar.js";
9
+ import c from "./response-area.js";
10
+ import l from "react";
11
+ import { renderMath as u } from "@pie-element/shared-math-rendering-mathjax";
12
+ import d from "react-dom";
13
+ import f from "prop-types";
14
+ import { color as p } from "@pie-lib/render-ui";
15
+ import { jsx as m, jsxs as h } from "react/jsx-runtime";
16
+ import { styled as g } from "@mui/material/styles";
17
+ import _, { ALL_PLUGINS as v, deleteInlineDropdownByIndex as y } from "@pie-lib/editable-html-tip-tap";
18
+ import { AlertDialog as ee, InputContainer as b, layout as te, settings as x } from "@pie-lib/config-ui";
19
+ import S from "@mui/material/Tooltip";
20
+ import C from "@mui/material/Typography";
21
+ import w from "@mui/material/Accordion";
22
+ import ne from "@mui/material/AccordionSummary";
23
+ import T from "@mui/material/AccordionDetails";
24
+ import E from "@mui/icons-material/ExpandMore";
25
+ import re from "@mui/icons-material/Info";
26
+ //#region src/author/main.tsx
27
+ var { toggle: D, Panel: ie, dropdown: ae } = x, O = g(b)(({ theme: e }) => ({
28
+ width: "100%",
29
+ paddingTop: e.spacing(2),
30
+ marginBottom: e.spacing(2)
31
+ })), oe = g(b)(({ theme: e }) => ({
32
+ width: "100%",
33
+ paddingTop: e.spacing(.5),
34
+ marginBottom: e.spacing(2)
35
+ })), k = g(C)(({ theme: e }) => ({
36
+ fontSize: e.typography.fontSize + 2,
37
+ marginRight: e.spacing(1)
38
+ })), se = g("span")(({ theme: e }) => ({
39
+ display: "flex",
40
+ alignItems: "center",
41
+ whiteSpace: "break-spaces",
42
+ color: p.disabled(),
43
+ padding: 0,
44
+ fontSize: e.typography.fontSize - 2,
45
+ lineHeight: 1
46
+ })), A = g("div")(({ theme: e }) => ({ marginBottom: e.spacing(2.5) })), j = g(T)({
47
+ display: "block",
48
+ paddingTop: 0,
49
+ paddingBottom: 0
50
+ }), M = g("div")(({ theme: e }) => ({
51
+ display: "flex",
52
+ alignItems: "center",
53
+ marginBottom: e.spacing(1)
54
+ })), N = g(S)(({ theme: e }) => ({ "& .MuiTooltip-tooltip": {
55
+ fontSize: e.typography.fontSize - 2,
56
+ whiteSpace: "pre",
57
+ maxWidth: "500px"
58
+ } })), P = g("div")(({ theme: e }) => ({
59
+ fontSize: e.typography.fontSize - 2,
60
+ color: e.palette.error.main,
61
+ paddingTop: e.spacing(1)
62
+ })), F = (e) => {
63
+ let t = document.createElement("div");
64
+ return t.innerHTML = (e || "").trim(), t;
65
+ }, I = class extends l.Component {
66
+ static propTypes = {
67
+ configuration: f.object.isRequired,
68
+ model: f.object.isRequired,
69
+ disableSidePanel: f.bool,
70
+ onModelChanged: f.func.isRequired,
71
+ onConfigurationChanged: f.func.isRequired,
72
+ imageSupport: f.shape({
73
+ add: f.func.isRequired,
74
+ delete: f.func.isRequired
75
+ }),
76
+ uploadSoundSupport: f.shape({
77
+ add: f.func.isRequired,
78
+ delete: f.func.isRequired
79
+ })
80
+ };
81
+ state = { warning: { open: !1 } };
82
+ componentDidMount() {
83
+ let { model: { choices: t } } = this.props;
84
+ this.setState({ respAreaChoices: e(t) });
85
+ }
86
+ UNSAFE_componentWillReceiveProps(r) {
87
+ let i = {};
88
+ (!n(r.model.choices, this.props.model.choices) || !n(r.model.choices, this.state.respAreaChoices)) && (i.respAreaChoices = e(r.model.choices)), t(i) || this.setState(i);
89
+ }
90
+ componentDidUpdate() {
91
+ u(d.findDOMNode(this));
92
+ }
93
+ onModelChange = (e) => {
94
+ this.props.onModelChanged({
95
+ ...this.props.model,
96
+ ...e
97
+ });
98
+ };
99
+ onPromptChanged = (e) => {
100
+ this.onModelChange({ prompt: e });
101
+ };
102
+ onRationaleChanged = (e) => {
103
+ this.onModelChange({ rationale: e });
104
+ };
105
+ onChoiceRationaleChanged = (e, t) => {
106
+ let { model: n } = this.props, r = n.choices && n.choices[e] && n.choices[e].findIndex((e) => e.label === t.label && e.value === t.value);
107
+ n.choices[e] && n.choices[e].splice(r, 1, t), this.onModelChange(n);
108
+ };
109
+ onTeacherInstructionsChanged = (e) => {
110
+ this.onModelChange({ teacherInstructions: e });
111
+ };
112
+ onMarkupChanged = (e) => {
113
+ this.onModelChange({ slateMarkup: e });
114
+ };
115
+ onCheck = (e, t) => {
116
+ this.setState({ warning: {
117
+ open: !0,
118
+ text: "Response areas with under 2 options or with no correct answers will be discarded.",
119
+ onClose: () => {
120
+ this.setState({ warning: { open: !1 } }, t);
121
+ },
122
+ onConfirm: () => {
123
+ this.setState({ warning: { open: !1 } }, e);
124
+ }
125
+ } });
126
+ };
127
+ validateResponseAreaClose = (e, t, n, r, i) => {
128
+ let { respAreaChoices: a } = this.state, o = e.attrs.index, s = a[o] || [];
129
+ if (!(s.length < 2 || !s.find((e) => e.correct))) {
130
+ r();
131
+ return;
132
+ }
133
+ n._holdInlineDropdownToolbarIndex = o, this.onCheck(() => {
134
+ delete n._holdInlineDropdownToolbarIndex, y(n, o, t), r();
135
+ }, i);
136
+ };
137
+ onChange = (t) => {
138
+ let { respAreaChoices: n } = this.state, i = F(t), o = i.querySelectorAll("[data-type=\"inline_dropdown\"]"), s = {};
139
+ o.forEach((e) => {
140
+ s[e.dataset.index] = e.dataset.value || "";
141
+ });
142
+ let c = a(n, (e, t, i) => (r(s[i]) || (e[i] = n[i]), e), {}), l = {};
143
+ o.forEach((e, t) => {
144
+ let n = c[e.dataset.index];
145
+ n && (l[t] = n), e.dataset.index = t;
146
+ }), this.onModelChange({
147
+ choices: e(l),
148
+ slateMarkup: i.innerHTML
149
+ });
150
+ };
151
+ onAddChoice = (t, n, r) => {
152
+ let { respAreaChoices: a } = this.state, { maxResponseAreaChoices: o } = this.props.configuration, s = (e) => this.setState({ warning: {
153
+ open: !0,
154
+ text: e,
155
+ onClose: void 0,
156
+ onConfirm: () => {
157
+ this.setState({ warning: { open: !1 } });
158
+ }
159
+ } });
160
+ if (a[t] && a[t].length >= o) {
161
+ s(`There are only ${o} answers allowed per choice.`);
162
+ return;
163
+ }
164
+ if (a[t] || (a[t] = []), (a[t] || []).find((e, t) => e.label === n && t !== r)) {
165
+ s("Duplicate answers are not allowed.");
166
+ return;
167
+ }
168
+ if (r >= 0 && a[t]?.[r]) a[t][r].label = n;
169
+ else {
170
+ let e = a[t] && i(a[t].map((e) => parseInt(e.value)).filter((e) => !isNaN(e))) || 0;
171
+ a[t].push({
172
+ label: n,
173
+ value: `${e + 1}`,
174
+ correct: !1
175
+ });
176
+ }
177
+ this.onModelChange({ choices: e(a) });
178
+ };
179
+ onRemoveChoice = (t, n) => {
180
+ let { respAreaChoices: r } = this.state;
181
+ r[t].splice(n, 1), this.onModelChange({ choices: e(r) });
182
+ };
183
+ onSelectChoice = (t, n) => {
184
+ let { respAreaChoices: r } = this.state;
185
+ r[t] = r[t].map((e, t) => ({
186
+ ...e,
187
+ correct: t === n
188
+ })), this.onModelChange({ choices: e(r) });
189
+ };
190
+ render() {
191
+ let { warning: e } = this.state, { model: t, configuration: n, onConfigurationChanged: r, imageSupport: i, uploadSoundSupport: a } = this.props, { baseInputConfiguration: u = {}, choiceRationale: d = {}, contentDimensions: f = {}, lockChoiceOrder: p = {}, maxResponseAreas: g, maxImageWidth: y = {}, maxImageHeight: b = {}, partialScoring: x = {}, prompt: S = {}, rationale: C = {}, settingsPanelDisabled: T, spellCheck: F = {}, teacherInstructions: I = {}, template: ce = {}, withRubric: L = {}, mathMlOptions: R = {}, language: z = {}, languageChoices: B = {}, responseAreaInputConfiguration: V = {} } = n || {}, { choiceRationaleEnabled: H, choices: U, errors: W, extraCSSRules: le, promptEnabled: ue, rationaleEnabled: de, spellCheckEnabled: G, teacherInstructionsEnabled: fe, toolbarEditorPosition: pe } = t || {}, { prompt: K, rationale: q, responseAreasError: J, responseAreaChoicesError: me, teacherInstructions: Y } = W || {}, X = y && y.prompt, Z = b && b.prompt, he = () => (Object.keys(U) || []).map((e, t) => /* @__PURE__ */ m(A, { children: /* @__PURE__ */ h(w, {
192
+ slotProps: { transition: { timeout: {
193
+ enter: 225,
194
+ exit: 195
195
+ } } },
196
+ children: [/* @__PURE__ */ m(ne, {
197
+ expandIcon: /* @__PURE__ */ m(E, {}),
198
+ children: /* @__PURE__ */ m(k, {
199
+ component: "div",
200
+ children: `Rationale for response area #${t + 1}`
201
+ })
202
+ }), /* @__PURE__ */ m(j, { children: (U[e] || []).map((t) => /* @__PURE__ */ h(l.Fragment, { children: [/* @__PURE__ */ m(se, { dangerouslySetInnerHTML: { __html: `${C.label} for ${t.label} (${t.correct ? "correct" : "incorrect"})` } }), /* @__PURE__ */ m(oe, { children: /* @__PURE__ */ m(_, {
203
+ markup: t.rationale || "",
204
+ spellCheck: G,
205
+ pluginProps: $(C?.inputConfiguration),
206
+ onChange: (n) => this.onChoiceRationaleChanged(e, {
207
+ ...t,
208
+ rationale: n
209
+ }),
210
+ imageSupport: i,
211
+ maxImageWidth: y && y.rationale || X,
212
+ maxImageHeight: b && b.rationale || Z,
213
+ uploadSoundSupport: a,
214
+ mathMlOptions: R
215
+ }) })] }, t.label)) })]
216
+ }) }, e)), Q = { position: pe === "top" ? "top" : "bottom" }, ge = o(n), _e = {
217
+ partialScoring: x.settings && D(x.label),
218
+ lockChoiceOrder: p.settings && D(p.label),
219
+ "language.enabled": z.settings && D(z.label, !0),
220
+ language: z.settings && z.enabled && ae(B.label, B.options)
221
+ }, ve = {
222
+ teacherInstructionsEnabled: I.settings && D(I.label),
223
+ rationaleEnabled: C.settings && D(C.label),
224
+ choiceRationaleEnabled: d.settings && D(d.label),
225
+ promptEnabled: S.settings && D(S.label),
226
+ spellCheckEnabled: F.settings && D(F.label),
227
+ rubricEnabled: L?.settings && D(L?.label)
228
+ }, $ = (e = {}) => ({
229
+ ...u,
230
+ ...e
231
+ });
232
+ return /* @__PURE__ */ h(te.ConfigLayout, {
233
+ extraCSSRules: {
234
+ names: ["red", "blue"],
235
+ rules: "\n .red {\n color: red !important;\n }\n\n .blue {\n color: blue !important;\n }\n "
236
+ },
237
+ dimensions: f,
238
+ hideSettings: T,
239
+ settings: /* @__PURE__ */ m(ie, {
240
+ model: t,
241
+ configuration: n,
242
+ onChangeModel: (e) => this.onModelChange(e),
243
+ onChangeConfiguration: (e) => r(e, !0),
244
+ groups: {
245
+ Settings: _e,
246
+ Properties: ve
247
+ }
248
+ }),
249
+ children: [
250
+ fe && /* @__PURE__ */ h(O, {
251
+ label: I.label,
252
+ children: [/* @__PURE__ */ m(_, {
253
+ markup: t.teacherInstructions || "",
254
+ onChange: this.onTeacherInstructionsChanged,
255
+ imageSupport: i,
256
+ nonEmpty: !1,
257
+ error: Y,
258
+ toolbarOpts: Q,
259
+ pluginProps: $(I?.inputConfiguration),
260
+ spellCheck: G,
261
+ maxImageWidth: y && y.teacherInstructions || X,
262
+ maxImageHeight: b && b.teacherInstructions || Z,
263
+ uploadSoundSupport: a,
264
+ languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
265
+ mathMlOptions: R
266
+ }), Y && /* @__PURE__ */ m(P, { children: Y })]
267
+ }),
268
+ ue && /* @__PURE__ */ h(O, {
269
+ label: S.label,
270
+ children: [/* @__PURE__ */ m(_, {
271
+ markup: t.prompt,
272
+ onChange: this.onPromptChanged,
273
+ imageSupport: i,
274
+ nonEmpty: !1,
275
+ disableUnderline: !0,
276
+ error: K,
277
+ toolbarOpts: Q,
278
+ pluginProps: $(S?.inputConfiguration),
279
+ spellCheck: G,
280
+ maxImageWidth: X,
281
+ maxImageHeight: Z,
282
+ uploadSoundSupport: a,
283
+ languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
284
+ mathMlOptions: R
285
+ }), K && /* @__PURE__ */ m(P, { children: K })]
286
+ }),
287
+ /* @__PURE__ */ h(M, { children: [/* @__PURE__ */ m(k, {
288
+ component: "div",
289
+ children: "Define Template, Choices, and Correct Responses"
290
+ }), /* @__PURE__ */ m(N, {
291
+ disableFocusListener: !0,
292
+ disableTouchListener: !0,
293
+ placement: "right",
294
+ title: ge,
295
+ children: /* @__PURE__ */ m(re, {
296
+ fontSize: "small",
297
+ color: "primary"
298
+ })
299
+ })] }),
300
+ /* @__PURE__ */ m(c, {
301
+ responseAreasError: J,
302
+ responseAreaChoicesError: me,
303
+ editableHtmlProps: {
304
+ pluginProps: $(ce?.inputConfiguration),
305
+ activePlugins: v,
306
+ toolbarOpts: { position: "top" },
307
+ extraCSSRules: {
308
+ names: ["red", "blue"],
309
+ rules: "\n .red {\n color: red !important;\n }\n\n .blue {\n color: blue !important;\n }\n "
310
+ },
311
+ responseAreaProps: {
312
+ type: "inline-dropdown",
313
+ options: { duplicates: !0 },
314
+ maxResponseAreas: g,
315
+ onToolbarCloseRequest: ([e, t], n, r, i) => {
316
+ this.validateResponseAreaClose(e, t, n, r, i);
317
+ },
318
+ respAreaToolbar: (e, t, n) => {
319
+ let [r, i] = e, { respAreaChoices: o } = this.state;
320
+ return (e) => /* @__PURE__ */ m(s, {
321
+ ...e,
322
+ onAddChoice: this.onAddChoice,
323
+ onRemoveChoice: (e) => this.onRemoveChoice(r.attrs.index, e),
324
+ onSelectChoice: (e) => this.onSelectChoice(r.attrs.index, e),
325
+ node: r,
326
+ pos: i,
327
+ editor: t,
328
+ onToolbarDone: n,
329
+ choices: o[r.attrs.index],
330
+ spellCheck: G,
331
+ uploadSoundSupport: a,
332
+ mathMlOptions: R,
333
+ baseInputConfiguration: u,
334
+ responseAreaInputConfiguration: V
335
+ });
336
+ }
337
+ },
338
+ spellCheck: G,
339
+ markup: t.slateMarkup || "",
340
+ onChange: this.onChange,
341
+ imageSupport: i,
342
+ disableImageAlignmentButtons: !0,
343
+ disabled: !1,
344
+ highlightShape: !1,
345
+ error: J,
346
+ uploadSoundSupport: a,
347
+ languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
348
+ mathMlOptions: R
349
+ }
350
+ }),
351
+ H && he(),
352
+ de && /* @__PURE__ */ h(O, {
353
+ label: C.label,
354
+ children: [/* @__PURE__ */ m(_, {
355
+ markup: t.rationale || "",
356
+ onChange: this.onRationaleChanged,
357
+ imageSupport: i,
358
+ error: q,
359
+ toolbarOpts: Q,
360
+ pluginProps: $(C?.inputConfiguration),
361
+ spellCheck: G,
362
+ maxImageWidth: y && y.rationale || X,
363
+ maxImageHeight: b && b.rationale || Z,
364
+ uploadSoundSupport: a,
365
+ languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
366
+ mathMlOptions: R
367
+ }), q && /* @__PURE__ */ m(P, { children: q })]
368
+ }),
369
+ /* @__PURE__ */ m(ee, {
370
+ open: e.open,
371
+ title: "Warning",
372
+ text: e.text,
373
+ onClose: e.onClose,
374
+ onConfirm: e.onConfirm,
375
+ disableAutoFocus: !0,
376
+ disableEnforceFocus: !0,
377
+ disableRestoreFocus: !0
378
+ })
379
+ ]
380
+ });
381
+ }
382
+ };
383
+ //#endregion
384
+ export { I as default };