@pie-element/inline-dropdown 10.1.1-next.1 → 10.1.1-next.101

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 (247) hide show
  1. package/CHANGELOG.json +1082 -0
  2. package/CHANGELOG.md +2181 -0
  3. package/LICENSE.md +5 -0
  4. package/README.md +1 -0
  5. package/configure/CHANGELOG.json +647 -0
  6. package/configure/CHANGELOG.md +1938 -0
  7. package/configure/lib/defaults.js +192 -0
  8. package/configure/lib/defaults.js.map +1 -0
  9. package/configure/lib/index.js +139 -0
  10. package/configure/lib/index.js.map +1 -0
  11. package/configure/lib/inline-dropdown-toolbar.js +462 -0
  12. package/configure/lib/inline-dropdown-toolbar.js.map +1 -0
  13. package/configure/lib/main.js +612 -0
  14. package/configure/lib/main.js.map +1 -0
  15. package/configure/lib/markupUtils.js +50 -0
  16. package/configure/lib/markupUtils.js.map +1 -0
  17. package/configure/lib/response-area.js +48 -0
  18. package/configure/lib/response-area.js.map +1 -0
  19. package/configure/lib/utils.js +22 -0
  20. package/configure/lib/utils.js.map +1 -0
  21. package/configure/package.json +24 -0
  22. package/controller/CHANGELOG.json +467 -0
  23. package/controller/CHANGELOG.md +1279 -0
  24. package/controller/lib/defaults.js +25 -0
  25. package/controller/lib/defaults.js.map +1 -0
  26. package/controller/lib/index.js +295 -0
  27. package/controller/lib/index.js.map +1 -0
  28. package/controller/lib/utils.js +32 -0
  29. package/controller/lib/utils.js.map +1 -0
  30. package/controller/package.json +16 -0
  31. package/docs/config-schema.json +2854 -0
  32. package/docs/config-schema.json.md +2106 -0
  33. package/docs/demo/config.js +8 -0
  34. package/docs/demo/generate.js +76 -0
  35. package/docs/demo/index.html +1 -0
  36. package/docs/demo/session.js +11 -0
  37. package/docs/pie-schema.json +1152 -0
  38. package/docs/pie-schema.json.md +814 -0
  39. package/lib/index.js +86 -0
  40. package/lib/index.js.map +1 -0
  41. package/lib/inline-dropdown.js +176 -0
  42. package/lib/inline-dropdown.js.map +1 -0
  43. package/package.json +20 -57
  44. package/dist/author/defaults.d.ts +0 -194
  45. package/dist/author/defaults.js +0 -130
  46. package/dist/author/index.d.ts +0 -43
  47. package/dist/author/index.js +0 -83
  48. package/dist/author/inline-dropdown-toolbar.d.ts +0 -47
  49. package/dist/author/inline-dropdown-toolbar.js +0 -262
  50. package/dist/author/main.d.ts +0 -48
  51. package/dist/author/main.js +0 -375
  52. package/dist/author/markupUtils.d.ts +0 -12
  53. package/dist/author/markupUtils.js +0 -23
  54. package/dist/author/response-area.d.ts +0 -20
  55. package/dist/author/response-area.js +0 -32
  56. package/dist/author/utils.d.ts +0 -10
  57. package/dist/author/utils.js +0 -10
  58. package/dist/controller/defaults.d.ts +0 -27
  59. package/dist/controller/defaults.js +0 -21
  60. package/dist/controller/index.d.ts +0 -54
  61. package/dist/controller/index.js +0 -126
  62. package/dist/controller/utils.d.ts +0 -12
  63. package/dist/controller/utils.js +0 -13
  64. package/dist/delivery/index.d.ts +0 -20
  65. package/dist/delivery/index.js +0 -60
  66. package/dist/delivery/inline-dropdown.d.ts +0 -38
  67. package/dist/delivery/inline-dropdown.js +0 -109
  68. package/dist/index.d.ts +0 -1
  69. package/dist/index.iife.d.ts +0 -8
  70. package/dist/index.iife.js +0 -148
  71. package/dist/index.js +0 -2
  72. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_DataView.js +0 -6
  73. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Hash.js +0 -16
  74. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_ListCache.js +0 -16
  75. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Map.js +0 -6
  76. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_MapCache.js +0 -16
  77. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Promise.js +0 -6
  78. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Set.js +0 -6
  79. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_SetCache.js +0 -11
  80. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Stack.js +0 -14
  81. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Symbol.js +0 -5
  82. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Uint8Array.js +0 -5
  83. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_WeakMap.js +0 -6
  84. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_apply.js +0 -12
  85. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayEach.js +0 -7
  86. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayFilter.js +0 -10
  87. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayLikeKeys.js +0 -15
  88. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayMap.js +0 -7
  89. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayPush.js +0 -7
  90. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayReduce.js +0 -8
  91. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arraySome.js +0 -7
  92. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assignValue.js +0 -10
  93. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assocIndexOf.js +0 -8
  94. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssign.js +0 -8
  95. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignIn.js +0 -8
  96. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignValue.js +0 -12
  97. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseClone.js +0 -57
  98. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseCreate.js +0 -14
  99. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseEach.js +0 -6
  100. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseExtremum.js +0 -11
  101. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseFor.js +0 -5
  102. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseForOwn.js +0 -8
  103. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGet.js +0 -10
  104. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetAllKeys.js +0 -9
  105. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetTag.js +0 -10
  106. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGt.js +0 -6
  107. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseHasIn.js +0 -6
  108. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsArguments.js +0 -9
  109. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqual.js +0 -8
  110. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqualDeep.js +0 -30
  111. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsMap.js +0 -9
  112. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsMatch.js +0 -26
  113. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNative.js +0 -11
  114. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsSet.js +0 -9
  115. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsTypedArray.js +0 -11
  116. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIteratee.js +0 -11
  117. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeys.js +0 -12
  118. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeysIn.js +0 -13
  119. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMap.js +0 -11
  120. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMatches.js +0 -12
  121. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMatchesProperty.js +0 -17
  122. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseProperty.js +0 -8
  123. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_basePropertyDeep.js +0 -9
  124. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_basePropertyOf.js +0 -8
  125. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseReduce.js +0 -8
  126. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseRest.js +0 -9
  127. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseSetToString.js +0 -14
  128. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTimes.js +0 -7
  129. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseToString.js +0 -15
  130. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseUnary.js +0 -8
  131. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cacheHas.js +0 -6
  132. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_castFunction.js +0 -7
  133. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_castPath.js +0 -10
  134. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneArrayBuffer.js +0 -8
  135. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneBuffer.js +0 -10
  136. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneDataView.js +0 -8
  137. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneRegExp.js +0 -8
  138. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneSymbol.js +0 -8
  139. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneTypedArray.js +0 -8
  140. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyArray.js +0 -8
  141. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyObject.js +0 -14
  142. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbols.js +0 -8
  143. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbolsIn.js +0 -8
  144. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_coreJsData.js +0 -5
  145. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createBaseEach.js +0 -12
  146. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createBaseFor.js +0 -12
  147. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_defineProperty.js +0 -10
  148. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalArrays.js +0 -35
  149. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalByTag.js +0 -35
  150. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalObjects.js +0 -32
  151. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_escapeHtmlChar.js +0 -11
  152. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_freeGlobal.js +0 -4
  153. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeys.js +0 -9
  154. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeysIn.js +0 -9
  155. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getMapData.js +0 -8
  156. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getMatchData.js +0 -16
  157. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getNative.js +0 -9
  158. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getPrototype.js +0 -5
  159. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getRawTag.js +0 -14
  160. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbols.js +0 -10
  161. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbolsIn.js +0 -11
  162. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getTag.js +0 -23
  163. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getValue.js +0 -6
  164. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hasPath.js +0 -18
  165. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashClear.js +0 -7
  166. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashDelete.js +0 -7
  167. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashGet.js +0 -13
  168. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashHas.js +0 -9
  169. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashSet.js +0 -9
  170. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneArray.js +0 -8
  171. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneByTag.js +0 -33
  172. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneObject.js +0 -9
  173. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIndex.js +0 -8
  174. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIterateeCall.js +0 -12
  175. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKey.js +0 -11
  176. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKeyable.js +0 -7
  177. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isMasked.js +0 -11
  178. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isPrototype.js +0 -8
  179. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isStrictComparable.js +0 -7
  180. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheClear.js +0 -6
  181. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheDelete.js +0 -9
  182. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheGet.js +0 -8
  183. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheHas.js +0 -7
  184. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheSet.js +0 -8
  185. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheClear.js +0 -13
  186. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheDelete.js +0 -8
  187. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheGet.js +0 -7
  188. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheHas.js +0 -7
  189. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheSet.js +0 -8
  190. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapToArray.js +0 -9
  191. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_matchesStrictComparable.js +0 -8
  192. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_memoizeCapped.js +0 -11
  193. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeCreate.js +0 -5
  194. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeys.js +0 -5
  195. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeysIn.js +0 -8
  196. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nodeUtil.js +0 -9
  197. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_objectToString.js +0 -7
  198. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overArg.js +0 -8
  199. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overRest.js +0 -13
  200. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_root.js +0 -5
  201. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheAdd.js +0 -7
  202. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheHas.js +0 -6
  203. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setToArray.js +0 -9
  204. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setToString.js +0 -6
  205. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_shortOut.js +0 -14
  206. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackClear.js +0 -7
  207. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackDelete.js +0 -7
  208. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackGet.js +0 -6
  209. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackHas.js +0 -6
  210. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackSet.js +0 -16
  211. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stringToPath.js +0 -10
  212. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toKey.js +0 -10
  213. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toSource.js +0 -15
  214. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/cloneDeep.js +0 -8
  215. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/constant.js +0 -8
  216. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/defaults.js +0 -16
  217. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/eq.js +0 -6
  218. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/escape.js +0 -9
  219. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/forEach.js +0 -10
  220. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/get.js +0 -8
  221. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/hasIn.js +0 -8
  222. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/identity.js +0 -6
  223. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArguments.js +0 -10
  224. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArray.js +0 -4
  225. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLike.js +0 -8
  226. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isBuffer.js +0 -6
  227. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.js +0 -21
  228. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEqual.js +0 -7
  229. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isFunction.js +0 -11
  230. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isLength.js +0 -7
  231. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isMap.js +0 -7
  232. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObject.js +0 -7
  233. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObjectLike.js +0 -6
  234. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSet.js +0 -7
  235. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSymbol.js +0 -9
  236. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isTypedArray.js +0 -7
  237. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isUndefined.js +0 -6
  238. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keys.js +0 -9
  239. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keysIn.js +0 -9
  240. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/map.js +0 -10
  241. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/max.js +0 -9
  242. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/memoize.js +0 -16
  243. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/property.js +0 -10
  244. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/reduce.js +0 -12
  245. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubArray.js +0 -6
  246. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubFalse.js +0 -6
  247. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toString.js +0 -7
@@ -0,0 +1,612 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = exports.Main = void 0;
8
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
10
+ var _react = _interopRequireDefault(require("react"));
11
+ var _reactDom = _interopRequireDefault(require("react-dom"));
12
+ var _propTypes = _interopRequireDefault(require("prop-types"));
13
+ var _editableHtmlTipTap = _interopRequireWildcard(require("@pie-lib/editable-html-tip-tap"));
14
+ var _configUi = require("@pie-lib/config-ui");
15
+ var _mathRendering = require("@pie-lib/math-rendering");
16
+ var _renderUi = require("@pie-lib/render-ui");
17
+ var _lodashEs = require("lodash-es");
18
+ var _styles = require("@mui/material/styles");
19
+ var _Tooltip = _interopRequireDefault(require("@mui/material/Tooltip"));
20
+ var _Typography = _interopRequireDefault(require("@mui/material/Typography"));
21
+ var _Accordion = _interopRequireDefault(require("@mui/material/Accordion"));
22
+ var _AccordionSummary = _interopRequireDefault(require("@mui/material/AccordionSummary"));
23
+ var _AccordionDetails = _interopRequireDefault(require("@mui/material/AccordionDetails"));
24
+ var _ExpandMore = _interopRequireDefault(require("@mui/icons-material/ExpandMore"));
25
+ var _Info = _interopRequireDefault(require("@mui/icons-material/Info"));
26
+ var _inlineDropdownToolbar = _interopRequireDefault(require("./inline-dropdown-toolbar"));
27
+ var _utils = require("./utils");
28
+ var _responseArea = _interopRequireDefault(require("./response-area"));
29
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
30
+ const {
31
+ toggle,
32
+ Panel,
33
+ dropdown
34
+ } = _configUi.settings;
35
+ const PromptHolder = (0, _styles.styled)(_configUi.InputContainer)(({
36
+ theme
37
+ }) => ({
38
+ width: '100%',
39
+ paddingTop: theme.spacing(2),
40
+ marginBottom: theme.spacing(2)
41
+ }));
42
+ const ChoiceRationaleHolder = (0, _styles.styled)(_configUi.InputContainer)(({
43
+ theme
44
+ }) => ({
45
+ width: '100%',
46
+ paddingTop: theme.spacing(0.5),
47
+ marginBottom: theme.spacing(2)
48
+ }));
49
+ const StyledTypography = (0, _styles.styled)(_Typography.default)(({
50
+ theme
51
+ }) => ({
52
+ fontSize: theme.typography.fontSize + 2,
53
+ marginRight: theme.spacing(1)
54
+ }));
55
+ const RationaleLabel = (0, _styles.styled)('span')(({
56
+ theme
57
+ }) => ({
58
+ display: 'flex',
59
+ alignItems: 'center',
60
+ whiteSpace: 'break-spaces',
61
+ color: _renderUi.color.disabled(),
62
+ padding: 0,
63
+ fontSize: theme.typography.fontSize - 2,
64
+ lineHeight: 1
65
+ }));
66
+ const RationaleChoices = (0, _styles.styled)('div')(({
67
+ theme
68
+ }) => ({
69
+ marginBottom: theme.spacing(2.5)
70
+ }));
71
+ const StyledAccordionDetails = (0, _styles.styled)(_AccordionDetails.default)({
72
+ display: 'block',
73
+ paddingTop: 0,
74
+ paddingBottom: 0
75
+ });
76
+ const FlexContainer = (0, _styles.styled)('div')(({
77
+ theme
78
+ }) => ({
79
+ display: 'flex',
80
+ alignItems: 'center',
81
+ marginBottom: theme.spacing(1)
82
+ }));
83
+ const StyledTooltip = (0, _styles.styled)(_Tooltip.default)(({
84
+ theme
85
+ }) => ({
86
+ '& .MuiTooltip-tooltip': {
87
+ fontSize: theme.typography.fontSize - 2,
88
+ whiteSpace: 'pre',
89
+ maxWidth: '500px'
90
+ }
91
+ }));
92
+ const ErrorText = (0, _styles.styled)('div')(({
93
+ theme
94
+ }) => ({
95
+ fontSize: theme.typography.fontSize - 2,
96
+ color: theme.palette.error.main,
97
+ paddingTop: theme.spacing(1)
98
+ }));
99
+ const createElementFromHTML = htmlString => {
100
+ const div = document.createElement('div');
101
+ div.innerHTML = (htmlString || '').trim();
102
+ return div;
103
+ };
104
+ class Main extends _react.default.Component {
105
+ constructor(...args) {
106
+ super(...args);
107
+ (0, _defineProperty2.default)(this, "state", {
108
+ warning: {
109
+ open: false
110
+ }
111
+ });
112
+ (0, _defineProperty2.default)(this, "onModelChange", newVal => {
113
+ this.props.onModelChanged({
114
+ ...this.props.model,
115
+ ...newVal
116
+ });
117
+ });
118
+ (0, _defineProperty2.default)(this, "onPromptChanged", prompt => {
119
+ this.onModelChange({
120
+ prompt
121
+ });
122
+ });
123
+ (0, _defineProperty2.default)(this, "onRationaleChanged", rationale => {
124
+ this.onModelChange({
125
+ rationale
126
+ });
127
+ });
128
+ (0, _defineProperty2.default)(this, "onChoiceRationaleChanged", (index, choice) => {
129
+ const {
130
+ model
131
+ } = this.props;
132
+ const indexOfChoice = model.choices && model.choices[index] && model.choices[index].findIndex(elem => elem.label === choice.label && elem.value === choice.value);
133
+ model.choices[index] && model.choices[index].splice(indexOfChoice, 1, choice);
134
+ this.onModelChange(model);
135
+ });
136
+ (0, _defineProperty2.default)(this, "onTeacherInstructionsChanged", teacherInstructions => {
137
+ this.onModelChange({
138
+ teacherInstructions
139
+ });
140
+ });
141
+ (0, _defineProperty2.default)(this, "onMarkupChanged", slateMarkup => {
142
+ this.onModelChange({
143
+ slateMarkup
144
+ });
145
+ });
146
+ (0, _defineProperty2.default)(this, "onCheck", (confirmCallback, cancelCallback) => {
147
+ this.setState({
148
+ warning: {
149
+ open: true,
150
+ text: 'Response areas with under 2 options or with no correct answers will be discarded.',
151
+ onClose: () => {
152
+ this.setState({
153
+ warning: {
154
+ open: false
155
+ }
156
+ }, cancelCallback);
157
+ },
158
+ onConfirm: () => {
159
+ this.setState({
160
+ warning: {
161
+ open: false
162
+ }
163
+ }, confirmCallback);
164
+ }
165
+ }
166
+ });
167
+ });
168
+ (0, _defineProperty2.default)(this, "validateResponseAreaClose", (node, pos, editor, closeToolbar, onCancel) => {
169
+ const {
170
+ respAreaChoices
171
+ } = this.state;
172
+ const index = node.attrs.index;
173
+ const currentChoices = respAreaChoices[index] || [];
174
+ const shouldWarn = currentChoices.length < 2 || !currentChoices.find(c => c.correct);
175
+ if (!shouldWarn) {
176
+ closeToolbar();
177
+ return;
178
+ }
179
+ editor._holdInlineDropdownToolbarIndex = index;
180
+ this.onCheck(() => {
181
+ delete editor._holdInlineDropdownToolbarIndex;
182
+ (0, _editableHtmlTipTap.deleteInlineDropdownByIndex)(editor, index, pos);
183
+ closeToolbar();
184
+ }, onCancel);
185
+ });
186
+ (0, _defineProperty2.default)(this, "onChange", markup => {
187
+ const {
188
+ respAreaChoices
189
+ } = this.state;
190
+ const domMarkup = createElementFromHTML(markup);
191
+ const allRespAreas = domMarkup.querySelectorAll('[data-type="inline_dropdown"]');
192
+ const allChoices = {};
193
+ allRespAreas.forEach(el => {
194
+ allChoices[el.dataset.index] = el.dataset.value || '';
195
+ });
196
+ const existingRespAreaChoices = (0, _lodashEs.reduce)(respAreaChoices, (obj, choices, key) => {
197
+ if (!(0, _lodashEs.isUndefined)(allChoices[key])) {
198
+ obj[key] = respAreaChoices[key];
199
+ }
200
+ return obj;
201
+ }, {});
202
+ const newRespAreaChoices = {};
203
+ allRespAreas.forEach((el, index) => {
204
+ const choices = existingRespAreaChoices[el.dataset.index];
205
+ if (choices) {
206
+ newRespAreaChoices[index] = choices;
207
+ }
208
+ el.dataset.index = index;
209
+ });
210
+ this.onModelChange({
211
+ choices: (0, _lodashEs.cloneDeep)(newRespAreaChoices),
212
+ slateMarkup: domMarkup.innerHTML
213
+ });
214
+ });
215
+ (0, _defineProperty2.default)(this, "onAddChoice", (index, label, choiceIndex) => {
216
+ const {
217
+ respAreaChoices
218
+ } = this.state;
219
+ const {
220
+ maxResponseAreaChoices
221
+ } = this.props.configuration;
222
+ const showWarning = message => this.setState({
223
+ warning: {
224
+ open: true,
225
+ text: message,
226
+ onClose: undefined,
227
+ onConfirm: () => {
228
+ this.setState({
229
+ warning: {
230
+ open: false
231
+ }
232
+ });
233
+ }
234
+ }
235
+ });
236
+ if (respAreaChoices[index] && respAreaChoices[index].length >= maxResponseAreaChoices) {
237
+ showWarning(`There are only ${maxResponseAreaChoices} answers allowed per choice.`);
238
+ return;
239
+ }
240
+ if (!respAreaChoices[index]) {
241
+ respAreaChoices[index] = [];
242
+ }
243
+
244
+ // check for duplicate answer, but exclude the one that is currently edited
245
+ if ((respAreaChoices[index] || []).find((r, idx) => r.label === label && idx !== choiceIndex)) {
246
+ showWarning('Duplicate answers are not allowed.');
247
+ return;
248
+ }
249
+ if (choiceIndex >= 0 && respAreaChoices[index]?.[choiceIndex]) {
250
+ // we need to update the choice label with the new value
251
+ respAreaChoices[index][choiceIndex].label = label;
252
+ } else {
253
+ // add a new choice
254
+ const value = respAreaChoices[index] && (0, _lodashEs.max)(respAreaChoices[index].map(c => parseInt(c.value)).filter(val => !isNaN(val))) || 0;
255
+ respAreaChoices[index].push({
256
+ label,
257
+ value: `${value + 1}`,
258
+ correct: false
259
+ });
260
+ }
261
+ this.onModelChange({
262
+ choices: (0, _lodashEs.cloneDeep)(respAreaChoices)
263
+ });
264
+ });
265
+ (0, _defineProperty2.default)(this, "onRemoveChoice", (respIndex, index) => {
266
+ const {
267
+ respAreaChoices
268
+ } = this.state;
269
+ respAreaChoices[respIndex].splice(index, 1);
270
+ this.onModelChange({
271
+ choices: (0, _lodashEs.cloneDeep)(respAreaChoices)
272
+ });
273
+ });
274
+ (0, _defineProperty2.default)(this, "onSelectChoice", (respIndex, selectedIndex) => {
275
+ const {
276
+ respAreaChoices
277
+ } = this.state;
278
+ respAreaChoices[respIndex] = respAreaChoices[respIndex].map((choice, index) => ({
279
+ ...choice,
280
+ correct: index === selectedIndex
281
+ }));
282
+ this.onModelChange({
283
+ choices: (0, _lodashEs.cloneDeep)(respAreaChoices)
284
+ });
285
+ });
286
+ }
287
+ componentDidMount() {
288
+ const {
289
+ model: {
290
+ choices
291
+ }
292
+ } = this.props;
293
+ this.setState({
294
+ respAreaChoices: (0, _lodashEs.cloneDeep)(choices)
295
+ });
296
+ }
297
+ UNSAFE_componentWillReceiveProps(nProps) {
298
+ const newState = {};
299
+ if (!(0, _lodashEs.isEqual)(nProps.model.choices, this.props.model.choices) || !(0, _lodashEs.isEqual)(nProps.model.choices, this.state.respAreaChoices)) {
300
+ newState.respAreaChoices = (0, _lodashEs.cloneDeep)(nProps.model.choices);
301
+ }
302
+ if (!(0, _lodashEs.isEmpty)(newState)) {
303
+ this.setState(newState);
304
+ }
305
+ }
306
+ componentDidUpdate() {
307
+ //eslint-disable-next-line
308
+ const domNode = _reactDom.default.findDOMNode(this);
309
+ (0, _mathRendering.renderMath)(domNode);
310
+ }
311
+ render() {
312
+ const {
313
+ warning
314
+ } = this.state;
315
+ const {
316
+ model,
317
+ configuration,
318
+ onConfigurationChanged,
319
+ imageSupport,
320
+ uploadSoundSupport
321
+ } = this.props;
322
+ const {
323
+ baseInputConfiguration = {},
324
+ choiceRationale = {},
325
+ contentDimensions = {},
326
+ lockChoiceOrder = {},
327
+ maxResponseAreas,
328
+ maxImageWidth = {},
329
+ maxImageHeight = {},
330
+ partialScoring = {},
331
+ prompt = {},
332
+ rationale = {},
333
+ settingsPanelDisabled,
334
+ spellCheck = {},
335
+ teacherInstructions = {},
336
+ template = {},
337
+ withRubric = {},
338
+ mathMlOptions = {},
339
+ language = {},
340
+ languageChoices = {},
341
+ responseAreaInputConfiguration = {}
342
+ } = configuration || {};
343
+ const {
344
+ choiceRationaleEnabled,
345
+ choices,
346
+ errors,
347
+ extraCSSRules,
348
+ promptEnabled,
349
+ rationaleEnabled,
350
+ spellCheckEnabled,
351
+ teacherInstructionsEnabled,
352
+ toolbarEditorPosition
353
+ } = model || {};
354
+ const {
355
+ prompt: promptError,
356
+ rationale: rationaleError,
357
+ responseAreasError,
358
+ responseAreaChoicesError,
359
+ teacherInstructions: teacherInstructionsError
360
+ } = errors || {};
361
+ const defaultImageMaxWidth = maxImageWidth && maxImageWidth.prompt;
362
+ const defaultImageMaxHeight = maxImageHeight && maxImageHeight.prompt;
363
+ const renderChoiceRationale = () => (Object.keys(choices) || []).map((key, index) => /*#__PURE__*/_react.default.createElement(RationaleChoices, {
364
+ key: key
365
+ }, /*#__PURE__*/_react.default.createElement(_Accordion.default, {
366
+ slotProps: {
367
+ transition: {
368
+ timeout: {
369
+ enter: 225,
370
+ exit: 195
371
+ }
372
+ }
373
+ }
374
+ }, /*#__PURE__*/_react.default.createElement(_AccordionSummary.default, {
375
+ expandIcon: /*#__PURE__*/_react.default.createElement(_ExpandMore.default, null)
376
+ }, /*#__PURE__*/_react.default.createElement(StyledTypography, {
377
+ component: 'div'
378
+ }, `Rationale for response area #${index + 1}`)), /*#__PURE__*/_react.default.createElement(StyledAccordionDetails, null, (choices[key] || []).map(choice => /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
379
+ key: choice.label
380
+ }, /*#__PURE__*/_react.default.createElement(RationaleLabel, {
381
+ dangerouslySetInnerHTML: {
382
+ __html: `${rationale.label} for ${choice.label} (${choice.correct ? 'correct' : 'incorrect'})`
383
+ }
384
+ }), /*#__PURE__*/_react.default.createElement(ChoiceRationaleHolder, null, /*#__PURE__*/_react.default.createElement(_editableHtmlTipTap.default, {
385
+ markup: choice.rationale || '',
386
+ spellCheck: spellCheckEnabled,
387
+ pluginProps: getPluginProps(rationale?.inputConfiguration),
388
+ onChange: c => this.onChoiceRationaleChanged(key, {
389
+ ...choice,
390
+ rationale: c
391
+ }),
392
+ imageSupport: imageSupport,
393
+ maxImageWidth: maxImageWidth && maxImageWidth.rationale || defaultImageMaxWidth,
394
+ maxImageHeight: maxImageHeight && maxImageHeight.rationale || defaultImageMaxHeight,
395
+ uploadSoundSupport: uploadSoundSupport,
396
+ mathMlOptions: mathMlOptions
397
+ }))))))));
398
+ const toolbarOpts = {
399
+ position: toolbarEditorPosition === 'top' ? 'top' : 'bottom'
400
+ };
401
+ const validationMessage = (0, _utils.generateValidationMessage)(configuration);
402
+ const panelSettings = {
403
+ partialScoring: partialScoring.settings && toggle(partialScoring.label),
404
+ lockChoiceOrder: lockChoiceOrder.settings && toggle(lockChoiceOrder.label),
405
+ 'language.enabled': language.settings && toggle(language.label, true),
406
+ language: language.settings && language.enabled && dropdown(languageChoices.label, languageChoices.options)
407
+ };
408
+ const panelProperties = {
409
+ teacherInstructionsEnabled: teacherInstructions.settings && toggle(teacherInstructions.label),
410
+ rationaleEnabled: rationale.settings && toggle(rationale.label),
411
+ choiceRationaleEnabled: choiceRationale.settings && toggle(choiceRationale.label),
412
+ promptEnabled: prompt.settings && toggle(prompt.label),
413
+ spellCheckEnabled: spellCheck.settings && toggle(spellCheck.label),
414
+ rubricEnabled: withRubric?.settings && toggle(withRubric?.label)
415
+ };
416
+ const getPluginProps = (props = {}) => ({
417
+ ...baseInputConfiguration,
418
+ ...props
419
+ });
420
+ return /*#__PURE__*/_react.default.createElement(_configUi.layout.ConfigLayout, {
421
+ extraCSSRules: {
422
+ names: ['red', 'blue'],
423
+ rules: `
424
+ .red {
425
+ color: red !important;
426
+ }
427
+
428
+ .blue {
429
+ color: blue !important;
430
+ }
431
+ `
432
+ },
433
+ dimensions: contentDimensions,
434
+ hideSettings: settingsPanelDisabled,
435
+ settings: /*#__PURE__*/_react.default.createElement(Panel, {
436
+ model: model,
437
+ configuration: configuration,
438
+ onChangeModel: model => this.onModelChange(model),
439
+ onChangeConfiguration: configuration => onConfigurationChanged(configuration, true),
440
+ groups: {
441
+ Settings: panelSettings,
442
+ Properties: panelProperties
443
+ }
444
+ })
445
+ }, teacherInstructionsEnabled && /*#__PURE__*/_react.default.createElement(PromptHolder, {
446
+ label: teacherInstructions.label
447
+ }, /*#__PURE__*/_react.default.createElement(_editableHtmlTipTap.default, {
448
+ markup: model.teacherInstructions || '',
449
+ onChange: this.onTeacherInstructionsChanged,
450
+ imageSupport: imageSupport,
451
+ nonEmpty: false,
452
+ error: teacherInstructionsError,
453
+ toolbarOpts: toolbarOpts,
454
+ pluginProps: getPluginProps(teacherInstructions?.inputConfiguration),
455
+ spellCheck: spellCheckEnabled,
456
+ maxImageWidth: maxImageWidth && maxImageWidth.teacherInstructions || defaultImageMaxWidth,
457
+ maxImageHeight: maxImageHeight && maxImageHeight.teacherInstructions || defaultImageMaxHeight,
458
+ uploadSoundSupport: uploadSoundSupport,
459
+ languageCharactersProps: [{
460
+ language: 'spanish'
461
+ }, {
462
+ language: 'special'
463
+ }],
464
+ mathMlOptions: mathMlOptions
465
+ }), teacherInstructionsError && /*#__PURE__*/_react.default.createElement(ErrorText, null, teacherInstructionsError)), promptEnabled && /*#__PURE__*/_react.default.createElement(PromptHolder, {
466
+ label: prompt.label
467
+ }, /*#__PURE__*/_react.default.createElement(_editableHtmlTipTap.default, {
468
+ markup: model.prompt,
469
+ onChange: this.onPromptChanged,
470
+ imageSupport: imageSupport,
471
+ nonEmpty: false,
472
+ disableUnderline: true,
473
+ error: promptError,
474
+ toolbarOpts: toolbarOpts,
475
+ pluginProps: getPluginProps(prompt?.inputConfiguration),
476
+ spellCheck: spellCheckEnabled,
477
+ maxImageWidth: defaultImageMaxWidth,
478
+ maxImageHeight: defaultImageMaxHeight,
479
+ uploadSoundSupport: uploadSoundSupport,
480
+ languageCharactersProps: [{
481
+ language: 'spanish'
482
+ }, {
483
+ language: 'special'
484
+ }],
485
+ mathMlOptions: mathMlOptions
486
+ }), promptError && /*#__PURE__*/_react.default.createElement(ErrorText, null, promptError)), /*#__PURE__*/_react.default.createElement(FlexContainer, null, /*#__PURE__*/_react.default.createElement(StyledTypography, {
487
+ component: 'div'
488
+ }, "Define Template, Choices, and Correct Responses"), /*#__PURE__*/_react.default.createElement(StyledTooltip, {
489
+ disableFocusListener: true,
490
+ disableTouchListener: true,
491
+ placement: 'right',
492
+ title: validationMessage
493
+ }, /*#__PURE__*/_react.default.createElement(_Info.default, {
494
+ fontSize: 'small',
495
+ color: 'primary'
496
+ }))), /*#__PURE__*/_react.default.createElement(_responseArea.default, {
497
+ responseAreasError: responseAreasError,
498
+ responseAreaChoicesError: responseAreaChoicesError,
499
+ editableHtmlProps: {
500
+ pluginProps: getPluginProps(template?.inputConfiguration),
501
+ activePlugins: _editableHtmlTipTap.ALL_PLUGINS,
502
+ toolbarOpts: {
503
+ position: 'top'
504
+ },
505
+ extraCSSRules: {
506
+ names: ['red', 'blue'],
507
+ rules: `
508
+ .red {
509
+ color: red !important;
510
+ }
511
+
512
+ .blue {
513
+ color: blue !important;
514
+ }
515
+ `
516
+ },
517
+ responseAreaProps: {
518
+ type: 'inline-dropdown',
519
+ options: {
520
+ duplicates: true
521
+ },
522
+ maxResponseAreas: maxResponseAreas,
523
+ onToolbarCloseRequest: ([node, pos], editor, closeToolbar, onCancel) => {
524
+ this.validateResponseAreaClose(node, pos, editor, closeToolbar, onCancel);
525
+ },
526
+ respAreaToolbar: (nodeInfo, editor, closeToolbar) => {
527
+ const [node, pos] = nodeInfo;
528
+ const {
529
+ respAreaChoices
530
+ } = this.state;
531
+ return props => /*#__PURE__*/_react.default.createElement(_inlineDropdownToolbar.default, (0, _extends2.default)({}, props, {
532
+ onAddChoice: this.onAddChoice,
533
+ onRemoveChoice: index => this.onRemoveChoice(node.attrs.index, index),
534
+ onSelectChoice: index => this.onSelectChoice(node.attrs.index, index),
535
+ node: node,
536
+ pos: pos,
537
+ editor: editor,
538
+ onToolbarDone: closeToolbar,
539
+ choices: respAreaChoices[node.attrs.index],
540
+ spellCheck: spellCheckEnabled,
541
+ uploadSoundSupport: uploadSoundSupport,
542
+ mathMlOptions: mathMlOptions,
543
+ baseInputConfiguration: baseInputConfiguration,
544
+ responseAreaInputConfiguration: responseAreaInputConfiguration
545
+ }));
546
+ }
547
+ },
548
+ spellCheck: spellCheckEnabled,
549
+ markup: model.slateMarkup || '',
550
+ onChange: this.onChange,
551
+ imageSupport: imageSupport,
552
+ disableImageAlignmentButtons: true,
553
+ disabled: false,
554
+ highlightShape: false,
555
+ error: responseAreasError,
556
+ uploadSoundSupport: uploadSoundSupport,
557
+ languageCharactersProps: [{
558
+ language: 'spanish'
559
+ }, {
560
+ language: 'special'
561
+ }],
562
+ mathMlOptions: mathMlOptions
563
+ }
564
+ }), choiceRationaleEnabled && renderChoiceRationale(), rationaleEnabled && /*#__PURE__*/_react.default.createElement(PromptHolder, {
565
+ label: rationale.label
566
+ }, /*#__PURE__*/_react.default.createElement(_editableHtmlTipTap.default, {
567
+ markup: model.rationale || '',
568
+ onChange: this.onRationaleChanged,
569
+ imageSupport: imageSupport,
570
+ error: rationaleError,
571
+ toolbarOpts: toolbarOpts,
572
+ pluginProps: getPluginProps(rationale?.inputConfiguration),
573
+ spellCheck: spellCheckEnabled,
574
+ maxImageWidth: maxImageWidth && maxImageWidth.rationale || defaultImageMaxWidth,
575
+ maxImageHeight: maxImageHeight && maxImageHeight.rationale || defaultImageMaxHeight,
576
+ uploadSoundSupport: uploadSoundSupport,
577
+ languageCharactersProps: [{
578
+ language: 'spanish'
579
+ }, {
580
+ language: 'special'
581
+ }],
582
+ mathMlOptions: mathMlOptions
583
+ }), rationaleError && /*#__PURE__*/_react.default.createElement(ErrorText, null, rationaleError)), /*#__PURE__*/_react.default.createElement(_configUi.AlertDialog, {
584
+ open: warning.open,
585
+ title: "Warning",
586
+ text: warning.text,
587
+ onClose: warning.onClose,
588
+ onConfirm: warning.onConfirm,
589
+ disableAutoFocus: true,
590
+ disableEnforceFocus: true,
591
+ disableRestoreFocus: true
592
+ }));
593
+ }
594
+ }
595
+ exports.Main = Main;
596
+ (0, _defineProperty2.default)(Main, "propTypes", {
597
+ configuration: _propTypes.default.object.isRequired,
598
+ model: _propTypes.default.object.isRequired,
599
+ disableSidePanel: _propTypes.default.bool,
600
+ onModelChanged: _propTypes.default.func.isRequired,
601
+ onConfigurationChanged: _propTypes.default.func.isRequired,
602
+ imageSupport: _propTypes.default.shape({
603
+ add: _propTypes.default.func.isRequired,
604
+ delete: _propTypes.default.func.isRequired
605
+ }),
606
+ uploadSoundSupport: _propTypes.default.shape({
607
+ add: _propTypes.default.func.isRequired,
608
+ delete: _propTypes.default.func.isRequired
609
+ })
610
+ });
611
+ var _default = exports.default = Main;
612
+ //# sourceMappingURL=main.js.map