@pie-element/inline-dropdown 11.0.3-esm.0 → 11.0.3-next.20261007064237

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 (277) hide show
  1. package/author.js +2 -0
  2. package/configure.js +2 -0
  3. package/controller.js +1 -0
  4. package/dist/author/defaults.d.ts +186 -0
  5. package/dist/author/defaults.js +130 -0
  6. package/dist/author/index.d.ts +36 -0
  7. package/dist/author/index.js +86 -0
  8. package/dist/author/inline-dropdown-toolbar.d.ts +41 -0
  9. package/dist/author/inline-dropdown-toolbar.js +266 -0
  10. package/dist/author/main.d.ts +41 -0
  11. package/dist/author/main.js +379 -0
  12. package/dist/author/markupUtils.d.ts +4 -0
  13. package/dist/author/markupUtils.js +23 -0
  14. package/dist/author/response-area.d.ts +12 -0
  15. package/dist/author/response-area.js +32 -0
  16. package/dist/author/utils.d.ts +2 -0
  17. package/dist/author/utils.js +10 -0
  18. package/dist/browser/Close-1Ds5fKBW.js +12389 -0
  19. package/dist/browser/Close-1Ds5fKBW.js.map +1 -0
  20. package/dist/browser/PUA-tLuTiQ7---_oZ5q_A.js +4370 -0
  21. package/dist/browser/PUA-tLuTiQ7---_oZ5q_A.js.map +1 -0
  22. package/dist/browser/accents-BTUYmhn9-BvG-5D5U.js +1508 -0
  23. package/dist/browser/accents-BTUYmhn9-BvG-5D5U.js.map +1 -0
  24. package/dist/browser/accents-b-i-CngHZsLL-D9VyhQb6.js +2847 -0
  25. package/dist/browser/accents-b-i-CngHZsLL-D9VyhQb6.js.map +1 -0
  26. package/dist/browser/arabic-BzEHMVZD-Dynlj189.js +785 -0
  27. package/dist/browser/arabic-BzEHMVZD-Dynlj189.js.map +1 -0
  28. package/dist/browser/arrows-VjxlU-jv-DSm4SIYN.js +2655 -0
  29. package/dist/browser/arrows-VjxlU-jv-DSm4SIYN.js.map +1 -0
  30. package/dist/browser/assets/Symbola-4c507403.woff2 +0 -0
  31. package/dist/browser/author/index.js +36579 -0
  32. package/dist/browser/author/index.js.map +1 -0
  33. package/dist/browser/braille-BeWC_Ruq-T-5kTNil.js +1287 -0
  34. package/dist/browser/braille-BeWC_Ruq-T-5kTNil.js.map +1 -0
  35. package/dist/browser/braille-d-Dk6J96GO--ZdfI9kr.js +1287 -0
  36. package/dist/browser/braille-d-Dk6J96GO--ZdfI9kr.js.map +1 -0
  37. package/dist/browser/calligraphic-Cew9cU3x-qfCrrm3u.js +323 -0
  38. package/dist/browser/calligraphic-Cew9cU3x-qfCrrm3u.js.map +1 -0
  39. package/dist/browser/cherokee-Cny3FYho-CbTYre7_.js +2029 -0
  40. package/dist/browser/cherokee-Cny3FYho-CbTYre7_.js.map +1 -0
  41. package/dist/browser/chtml-CbqemTOM-x0_YISTK.js +20329 -0
  42. package/dist/browser/chtml-CbqemTOM-x0_YISTK.js.map +1 -0
  43. package/dist/browser/controller/index.js +196 -0
  44. package/dist/browser/controller/index.js.map +1 -0
  45. package/dist/browser/cyrillic-CfCDulXU-EvNL2rHi.js +5617 -0
  46. package/dist/browser/cyrillic-CfCDulXU-EvNL2rHi.js.map +1 -0
  47. package/dist/browser/cyrillic-ss-lU7bNGG9-jdxJx-EF.js +5606 -0
  48. package/dist/browser/cyrillic-ss-lU7bNGG9-jdxJx-EF.js.map +1 -0
  49. package/dist/browser/delivery/index.js +1307 -0
  50. package/dist/browser/delivery/index.js.map +1 -0
  51. package/dist/browser/devanagari-CDIz2h-r-FGcUsKu2.js +692 -0
  52. package/dist/browser/devanagari-CDIz2h-r-FGcUsKu2.js.map +1 -0
  53. package/dist/browser/dist-FMIRkZir.js +753 -0
  54. package/dist/browser/dist-FMIRkZir.js.map +1 -0
  55. package/dist/browser/double-struck-BpJEQk8y-CLqFtvAN.js +438 -0
  56. package/dist/browser/double-struck-BpJEQk8y-CLqFtvAN.js.map +1 -0
  57. package/dist/browser/editor-runtime/Close-BeMUhd2I.js +12389 -0
  58. package/dist/browser/editor-runtime/Close-BeMUhd2I.js.map +1 -0
  59. package/dist/browser/editor-runtime/PUA-tLuTiQ7---_oZ5q_A.js +4370 -0
  60. package/dist/browser/editor-runtime/PUA-tLuTiQ7---_oZ5q_A.js.map +1 -0
  61. package/dist/browser/editor-runtime/accents-BTUYmhn9-BvG-5D5U.js +1508 -0
  62. package/dist/browser/editor-runtime/accents-BTUYmhn9-BvG-5D5U.js.map +1 -0
  63. package/dist/browser/editor-runtime/accents-b-i-CngHZsLL-D9VyhQb6.js +2847 -0
  64. package/dist/browser/editor-runtime/accents-b-i-CngHZsLL-D9VyhQb6.js.map +1 -0
  65. package/dist/browser/editor-runtime/arabic-BzEHMVZD-Dynlj189.js +785 -0
  66. package/dist/browser/editor-runtime/arabic-BzEHMVZD-Dynlj189.js.map +1 -0
  67. package/dist/browser/editor-runtime/arrows-VjxlU-jv-DSm4SIYN.js +2655 -0
  68. package/dist/browser/editor-runtime/arrows-VjxlU-jv-DSm4SIYN.js.map +1 -0
  69. package/dist/browser/editor-runtime/assets/Symbola-4c507403.woff2 +0 -0
  70. package/dist/browser/editor-runtime/author/index.js +19991 -0
  71. package/dist/browser/editor-runtime/author/index.js.map +1 -0
  72. package/dist/browser/editor-runtime/braille-BeWC_Ruq-T-5kTNil.js +1287 -0
  73. package/dist/browser/editor-runtime/braille-BeWC_Ruq-T-5kTNil.js.map +1 -0
  74. package/dist/browser/editor-runtime/braille-d-Dk6J96GO--ZdfI9kr.js +1287 -0
  75. package/dist/browser/editor-runtime/braille-d-Dk6J96GO--ZdfI9kr.js.map +1 -0
  76. package/dist/browser/editor-runtime/calligraphic-Cew9cU3x-qfCrrm3u.js +323 -0
  77. package/dist/browser/editor-runtime/calligraphic-Cew9cU3x-qfCrrm3u.js.map +1 -0
  78. package/dist/browser/editor-runtime/cherokee-Cny3FYho-CbTYre7_.js +2029 -0
  79. package/dist/browser/editor-runtime/cherokee-Cny3FYho-CbTYre7_.js.map +1 -0
  80. package/dist/browser/editor-runtime/chtml-CbqemTOM-x0_YISTK.js +20329 -0
  81. package/dist/browser/editor-runtime/chtml-CbqemTOM-x0_YISTK.js.map +1 -0
  82. package/dist/browser/editor-runtime/controller/index.js +196 -0
  83. package/dist/browser/editor-runtime/controller/index.js.map +1 -0
  84. package/dist/browser/editor-runtime/cyrillic-CfCDulXU-EvNL2rHi.js +5617 -0
  85. package/dist/browser/editor-runtime/cyrillic-CfCDulXU-EvNL2rHi.js.map +1 -0
  86. package/dist/browser/editor-runtime/cyrillic-ss-lU7bNGG9-jdxJx-EF.js +5606 -0
  87. package/dist/browser/editor-runtime/cyrillic-ss-lU7bNGG9-jdxJx-EF.js.map +1 -0
  88. package/dist/browser/editor-runtime/delivery/index.js +1307 -0
  89. package/dist/browser/editor-runtime/delivery/index.js.map +1 -0
  90. package/dist/browser/editor-runtime/devanagari-CDIz2h-r-FGcUsKu2.js +692 -0
  91. package/dist/browser/editor-runtime/devanagari-CDIz2h-r-FGcUsKu2.js.map +1 -0
  92. package/dist/browser/editor-runtime/dist-FMIRkZir.js +753 -0
  93. package/dist/browser/editor-runtime/dist-FMIRkZir.js.map +1 -0
  94. package/dist/browser/editor-runtime/double-struck-BpJEQk8y-CLqFtvAN.js +438 -0
  95. package/dist/browser/editor-runtime/double-struck-BpJEQk8y-CLqFtvAN.js.map +1 -0
  96. package/dist/browser/editor-runtime/fraktur-rLEq9DEH-BU0iR4xw.js +694 -0
  97. package/dist/browser/editor-runtime/fraktur-rLEq9DEH-BU0iR4xw.js.map +1 -0
  98. package/dist/browser/editor-runtime/greek-BlraJTyL-DAfjxxNh.js +9335 -0
  99. package/dist/browser/editor-runtime/greek-BlraJTyL-DAfjxxNh.js.map +1 -0
  100. package/dist/browser/editor-runtime/greek-ss-D-EN2PK0-CcyaecGS.js +6767 -0
  101. package/dist/browser/editor-runtime/greek-ss-D-EN2PK0-CcyaecGS.js.map +1 -0
  102. package/dist/browser/editor-runtime/hebrew-GiQZeybp-DqJrAkkB.js +3218 -0
  103. package/dist/browser/editor-runtime/hebrew-GiQZeybp-DqJrAkkB.js.map +1 -0
  104. package/dist/browser/editor-runtime/latin-b-BhEnC7R2-CQAVv0CI.js +3134 -0
  105. package/dist/browser/editor-runtime/latin-b-BhEnC7R2-CQAVv0CI.js.map +1 -0
  106. package/dist/browser/editor-runtime/latin-bi-DqiIKv3U-DM22wSUP.js +3637 -0
  107. package/dist/browser/editor-runtime/latin-bi-DqiIKv3U-DM22wSUP.js.map +1 -0
  108. package/dist/browser/editor-runtime/latin-i-B1xtwaE1-uBpJAGjo.js +3634 -0
  109. package/dist/browser/editor-runtime/latin-i-B1xtwaE1-uBpJAGjo.js.map +1 -0
  110. package/dist/browser/editor-runtime/latin-xfWFlLkD-CKElfDKc.js +3266 -0
  111. package/dist/browser/editor-runtime/latin-xfWFlLkD-CKElfDKc.js.map +1 -0
  112. package/dist/browser/editor-runtime/marrows-DD1NgMQi-BIBP-NrK.js +761 -0
  113. package/dist/browser/editor-runtime/marrows-DD1NgMQi-BIBP-NrK.js.map +1 -0
  114. package/dist/browser/editor-runtime/math-DpWn1mbG-B7Krt7Jk.js +2034 -0
  115. package/dist/browser/editor-runtime/math-DpWn1mbG-B7Krt7Jk.js.map +1 -0
  116. package/dist/browser/editor-runtime/mathjax-BKrHE4xs-olIoaCQN.js +36692 -0
  117. package/dist/browser/editor-runtime/mathjax-BKrHE4xs-olIoaCQN.js.map +1 -0
  118. package/dist/browser/editor-runtime/monospace-D116QD2a-C40p3Rv8.js +1112 -0
  119. package/dist/browser/editor-runtime/monospace-D116QD2a-C40p3Rv8.js.map +1 -0
  120. package/dist/browser/editor-runtime/monospace-ex-DcXpouKS-DkaktwPJ.js +6014 -0
  121. package/dist/browser/editor-runtime/monospace-ex-DcXpouKS-DkaktwPJ.js.map +1 -0
  122. package/dist/browser/editor-runtime/monospace-l-Ct5wkMDs-CuE7t5pv.js +3114 -0
  123. package/dist/browser/editor-runtime/monospace-l-Ct5wkMDs-CuE7t5pv.js.map +1 -0
  124. package/dist/browser/editor-runtime/mshapes-DCp86WSX-DX0WfJid.js +524 -0
  125. package/dist/browser/editor-runtime/mshapes-DCp86WSX-DX0WfJid.js.map +1 -0
  126. package/dist/browser/editor-runtime/phonetics-BwOCw2Y9-lJWnARqt.js +2496 -0
  127. package/dist/browser/editor-runtime/phonetics-BwOCw2Y9-lJWnARqt.js.map +1 -0
  128. package/dist/browser/editor-runtime/phonetics-ss-CRtMn02f-Cr32SJLL.js +2984 -0
  129. package/dist/browser/editor-runtime/phonetics-ss-CRtMn02f-Cr32SJLL.js.map +1 -0
  130. package/dist/browser/editor-runtime/sans-serif-BYPZKlE9-DftjSdim.js +5246 -0
  131. package/dist/browser/editor-runtime/sans-serif-BYPZKlE9-DftjSdim.js.map +1 -0
  132. package/dist/browser/editor-runtime/sans-serif-b-B0kRKiC--BsRQiyQP.js +3176 -0
  133. package/dist/browser/editor-runtime/sans-serif-b-B0kRKiC--BsRQiyQP.js.map +1 -0
  134. package/dist/browser/editor-runtime/sans-serif-bi-DXWul6mu-D4NuD72A.js +3688 -0
  135. package/dist/browser/editor-runtime/sans-serif-bi-DXWul6mu-D4NuD72A.js.map +1 -0
  136. package/dist/browser/editor-runtime/sans-serif-ex-Boux1kMP-BrL4RNcD.js +10033 -0
  137. package/dist/browser/editor-runtime/sans-serif-ex-Boux1kMP-BrL4RNcD.js.map +1 -0
  138. package/dist/browser/editor-runtime/sans-serif-i-676RFaSO-BCRikTTw.js +3635 -0
  139. package/dist/browser/editor-runtime/sans-serif-i-676RFaSO-BCRikTTw.js.map +1 -0
  140. package/dist/browser/editor-runtime/sans-serif-r-DrN9xdZt-CN8omxfu.js +3159 -0
  141. package/dist/browser/editor-runtime/sans-serif-r-DrN9xdZt-CN8omxfu.js.map +1 -0
  142. package/dist/browser/editor-runtime/script-0ohehnXc-4G2PiBkk.js +649 -0
  143. package/dist/browser/editor-runtime/script-0ohehnXc-4G2PiBkk.js.map +1 -0
  144. package/dist/browser/editor-runtime/shapes-BG47NodJ-D3eH0HjT.js +1932 -0
  145. package/dist/browser/editor-runtime/shapes-BG47NodJ-D3eH0HjT.js.map +1 -0
  146. package/dist/browser/editor-runtime/speech-worker-CP5P4gRS-OkQyXQak.js +157 -0
  147. package/dist/browser/editor-runtime/speech-worker-CP5P4gRS-OkQyXQak.js.map +1 -0
  148. package/dist/browser/editor-runtime/symbols-BqnUxf_t-DJHA_nO7.js +1833 -0
  149. package/dist/browser/editor-runtime/symbols-BqnUxf_t-DJHA_nO7.js.map +1 -0
  150. package/dist/browser/editor-runtime/symbols-b-i-eg9k5hmF-Bn-dxZT_.js +1153 -0
  151. package/dist/browser/editor-runtime/symbols-b-i-eg9k5hmF-Bn-dxZT_.js.map +1 -0
  152. package/dist/browser/editor-runtime/variants-2LRNhOUP-BlL4NIVJ.js +231 -0
  153. package/dist/browser/editor-runtime/variants-2LRNhOUP-BlL4NIVJ.js.map +1 -0
  154. package/dist/browser/fraktur-rLEq9DEH-BU0iR4xw.js +694 -0
  155. package/dist/browser/fraktur-rLEq9DEH-BU0iR4xw.js.map +1 -0
  156. package/dist/browser/greek-BlraJTyL-DAfjxxNh.js +9335 -0
  157. package/dist/browser/greek-BlraJTyL-DAfjxxNh.js.map +1 -0
  158. package/dist/browser/greek-ss-D-EN2PK0-CcyaecGS.js +6767 -0
  159. package/dist/browser/greek-ss-D-EN2PK0-CcyaecGS.js.map +1 -0
  160. package/dist/browser/hebrew-GiQZeybp-DqJrAkkB.js +3218 -0
  161. package/dist/browser/hebrew-GiQZeybp-DqJrAkkB.js.map +1 -0
  162. package/dist/browser/latin-b-BhEnC7R2-CQAVv0CI.js +3134 -0
  163. package/dist/browser/latin-b-BhEnC7R2-CQAVv0CI.js.map +1 -0
  164. package/dist/browser/latin-bi-DqiIKv3U-DM22wSUP.js +3637 -0
  165. package/dist/browser/latin-bi-DqiIKv3U-DM22wSUP.js.map +1 -0
  166. package/dist/browser/latin-i-B1xtwaE1-uBpJAGjo.js +3634 -0
  167. package/dist/browser/latin-i-B1xtwaE1-uBpJAGjo.js.map +1 -0
  168. package/dist/browser/latin-xfWFlLkD-CKElfDKc.js +3266 -0
  169. package/dist/browser/latin-xfWFlLkD-CKElfDKc.js.map +1 -0
  170. package/dist/browser/marrows-DD1NgMQi-BIBP-NrK.js +761 -0
  171. package/dist/browser/marrows-DD1NgMQi-BIBP-NrK.js.map +1 -0
  172. package/dist/browser/math-DpWn1mbG-B7Krt7Jk.js +2034 -0
  173. package/dist/browser/math-DpWn1mbG-B7Krt7Jk.js.map +1 -0
  174. package/dist/browser/mathjax-BKrHE4xs-DMJdB93L.js +36692 -0
  175. package/dist/browser/mathjax-BKrHE4xs-DMJdB93L.js.map +1 -0
  176. package/dist/browser/monospace-D116QD2a-C40p3Rv8.js +1112 -0
  177. package/dist/browser/monospace-D116QD2a-C40p3Rv8.js.map +1 -0
  178. package/dist/browser/monospace-ex-DcXpouKS-DkaktwPJ.js +6014 -0
  179. package/dist/browser/monospace-ex-DcXpouKS-DkaktwPJ.js.map +1 -0
  180. package/dist/browser/monospace-l-Ct5wkMDs-CuE7t5pv.js +3114 -0
  181. package/dist/browser/monospace-l-Ct5wkMDs-CuE7t5pv.js.map +1 -0
  182. package/dist/browser/mshapes-DCp86WSX-DX0WfJid.js +524 -0
  183. package/dist/browser/mshapes-DCp86WSX-DX0WfJid.js.map +1 -0
  184. package/dist/browser/phonetics-BwOCw2Y9-lJWnARqt.js +2496 -0
  185. package/dist/browser/phonetics-BwOCw2Y9-lJWnARqt.js.map +1 -0
  186. package/dist/browser/phonetics-ss-CRtMn02f-Cr32SJLL.js +2984 -0
  187. package/dist/browser/phonetics-ss-CRtMn02f-Cr32SJLL.js.map +1 -0
  188. package/dist/browser/sans-serif-BYPZKlE9-DftjSdim.js +5246 -0
  189. package/dist/browser/sans-serif-BYPZKlE9-DftjSdim.js.map +1 -0
  190. package/dist/browser/sans-serif-b-B0kRKiC--BsRQiyQP.js +3176 -0
  191. package/dist/browser/sans-serif-b-B0kRKiC--BsRQiyQP.js.map +1 -0
  192. package/dist/browser/sans-serif-bi-DXWul6mu-D4NuD72A.js +3688 -0
  193. package/dist/browser/sans-serif-bi-DXWul6mu-D4NuD72A.js.map +1 -0
  194. package/dist/browser/sans-serif-ex-Boux1kMP-BrL4RNcD.js +10033 -0
  195. package/dist/browser/sans-serif-ex-Boux1kMP-BrL4RNcD.js.map +1 -0
  196. package/dist/browser/sans-serif-i-676RFaSO-BCRikTTw.js +3635 -0
  197. package/dist/browser/sans-serif-i-676RFaSO-BCRikTTw.js.map +1 -0
  198. package/dist/browser/sans-serif-r-DrN9xdZt-CN8omxfu.js +3159 -0
  199. package/dist/browser/sans-serif-r-DrN9xdZt-CN8omxfu.js.map +1 -0
  200. package/dist/browser/script-0ohehnXc-4G2PiBkk.js +649 -0
  201. package/dist/browser/script-0ohehnXc-4G2PiBkk.js.map +1 -0
  202. package/dist/browser/shapes-BG47NodJ-D3eH0HjT.js +1932 -0
  203. package/dist/browser/shapes-BG47NodJ-D3eH0HjT.js.map +1 -0
  204. package/dist/browser/speech-worker-CP5P4gRS-G4rtBs8u.js +157 -0
  205. package/dist/browser/speech-worker-CP5P4gRS-G4rtBs8u.js.map +1 -0
  206. package/dist/browser/symbols-BqnUxf_t-DJHA_nO7.js +1833 -0
  207. package/dist/browser/symbols-BqnUxf_t-DJHA_nO7.js.map +1 -0
  208. package/dist/browser/symbols-b-i-eg9k5hmF-Bn-dxZT_.js +1153 -0
  209. package/dist/browser/symbols-b-i-eg9k5hmF-Bn-dxZT_.js.map +1 -0
  210. package/dist/browser/variants-2LRNhOUP-BlL4NIVJ.js +231 -0
  211. package/dist/browser/variants-2LRNhOUP-BlL4NIVJ.js.map +1 -0
  212. package/dist/controller/defaults.d.ts +19 -0
  213. package/dist/controller/defaults.js +21 -0
  214. package/dist/controller/index.d.ts +46 -0
  215. package/dist/controller/index.js +124 -0
  216. package/dist/controller/utils.d.ts +4 -0
  217. package/dist/controller/utils.js +13 -0
  218. package/dist/delivery/__tests__/inline-dropdown-language.test.d.ts +1 -0
  219. package/dist/delivery/index.d.ts +14 -0
  220. package/dist/delivery/index.js +64 -0
  221. package/dist/delivery/inline-dropdown.d.ts +30 -0
  222. package/dist/delivery/inline-dropdown.js +111 -0
  223. package/dist/index.d.ts +1 -0
  224. package/dist/index.iife.d.ts +6 -0
  225. package/dist/index.iife.js +185 -0
  226. package/dist/index.js +2 -0
  227. package/dist/runtime-support.d.ts +12 -0
  228. package/dist/runtime-support.js +12 -0
  229. package/package.json +92 -32
  230. package/CHANGELOG.json +0 -1082
  231. package/CHANGELOG.md +0 -3440
  232. package/LICENSE.md +0 -5
  233. package/README.md +0 -1
  234. package/configure/CHANGELOG.json +0 -647
  235. package/configure/CHANGELOG.md +0 -3066
  236. package/configure/lib/defaults.js +0 -190
  237. package/configure/lib/defaults.js.map +0 -1
  238. package/configure/lib/index.js +0 -209
  239. package/configure/lib/index.js.map +0 -1
  240. package/configure/lib/inline-dropdown-toolbar.js +0 -573
  241. package/configure/lib/inline-dropdown-toolbar.js.map +0 -1
  242. package/configure/lib/main.js +0 -753
  243. package/configure/lib/main.js.map +0 -1
  244. package/configure/lib/markupUtils.js +0 -70
  245. package/configure/lib/markupUtils.js.map +0 -1
  246. package/configure/lib/response-area.js +0 -99
  247. package/configure/lib/response-area.js.map +0 -1
  248. package/configure/lib/utils.js +0 -33
  249. package/configure/lib/utils.js.map +0 -1
  250. package/configure/package.json +0 -22
  251. package/controller/CHANGELOG.json +0 -467
  252. package/controller/CHANGELOG.md +0 -2114
  253. package/controller/lib/defaults.js +0 -26
  254. package/controller/lib/defaults.js.map +0 -1
  255. package/controller/lib/index.js +0 -360
  256. package/controller/lib/index.js.map +0 -1
  257. package/controller/lib/utils.js +0 -40
  258. package/controller/lib/utils.js.map +0 -1
  259. package/controller/package.json +0 -16
  260. package/docs/config-schema.json +0 -2854
  261. package/docs/config-schema.json.md +0 -2106
  262. package/docs/demo/config.js +0 -8
  263. package/docs/demo/generate.js +0 -76
  264. package/docs/demo/index.html +0 -1
  265. package/docs/demo/session.js +0 -11
  266. package/docs/pie-schema.json +0 -1152
  267. package/docs/pie-schema.json.md +0 -814
  268. package/esm/configure.js +0 -1973
  269. package/esm/configure.js.map +0 -1
  270. package/esm/controller.js +0 -304
  271. package/esm/controller.js.map +0 -1
  272. package/esm/element.js +0 -278
  273. package/esm/element.js.map +0 -1
  274. package/lib/index.js +0 -130
  275. package/lib/index.js.map +0 -1
  276. package/lib/inline-dropdown.js +0 -248
  277. package/lib/inline-dropdown.js.map +0 -1
@@ -0,0 +1,266 @@
1
+ import { getPluginProps as e } from "./utils.js";
2
+ import t from "react";
3
+ import { renderMath as n } from "@pie-element/shared-math-rendering-mathjax";
4
+ import r from "react-dom";
5
+ import i from "prop-types";
6
+ import { isEmpty as a, isEqual as o } from "@pie-element/shared-lodash";
7
+ import { color as s } from "@pie-lib/render-ui";
8
+ import { jsx as c, jsxs as l } from "react/jsx-runtime";
9
+ import { styled as u } from "@mui/material/styles";
10
+ import d from "@pie-lib/editable-html-tip-tap";
11
+ import f from "@mui/icons-material/Add";
12
+ import p from "@mui/icons-material/Check";
13
+ import m from "@mui/icons-material/Close";
14
+ import h from "@mui/icons-material/Edit";
15
+ import g from "@mui/material/IconButton";
16
+ //#region src/author/inline-dropdown-toolbar.tsx
17
+ var _ = u("div")(() => ({
18
+ display: "flex",
19
+ alignItems: "flex-start",
20
+ position: "relative",
21
+ background: s.white(),
22
+ borderBottom: `1px solid ${s.border()}`,
23
+ "&:last-child": { borderRadius: "0 0 4px 4px" }
24
+ })), v = u("div")(({ theme: e }) => ({
25
+ display: "flex",
26
+ justifyContent: "center",
27
+ color: e.palette.common.white,
28
+ fontSize: e.typography.fontSize,
29
+ fontStyle: "normal",
30
+ position: "absolute",
31
+ transform: "translate(0, -50%)",
32
+ backgroundColor: s.correct(),
33
+ borderRadius: "50%",
34
+ top: e.spacing(2),
35
+ left: e.spacing(1),
36
+ zIndex: 3
37
+ })), y = u("div")(({ theme: e, correct: t }) => ({
38
+ flex: 1,
39
+ padding: e.spacing(.75),
40
+ paddingLeft: e.spacing(3.5),
41
+ ...t && { background: s.correctSecondary() },
42
+ "& p": { margin: 0 }
43
+ })), b = u("div")(({ theme: e }) => ({
44
+ margin: e.spacing(.5),
45
+ display: "flex"
46
+ })), x = u(g)(({ theme: e }) => ({
47
+ fontSize: e.typography.fontSize,
48
+ padding: e.spacing(.5),
49
+ color: e.palette.common.black
50
+ })), S = class extends t.Component {
51
+ static propTypes = {
52
+ correct: i.bool.isRequired,
53
+ onClick: i.func.isRequired,
54
+ onRemoveChoice: i.func.isRequired,
55
+ onEditChoice: i.func.isRequired,
56
+ value: i.string.isRequired
57
+ };
58
+ onRemoveClick = (e) => {
59
+ let { onRemoveChoice: t } = this.props;
60
+ e.preventDefault(), e.stopPropagation(), t();
61
+ };
62
+ onEditClick = (e) => {
63
+ let { onEditChoice: t } = this.props;
64
+ e.preventDefault(), e.stopPropagation(), t();
65
+ };
66
+ render() {
67
+ let { correct: e, onClick: t, value: n } = this.props;
68
+ return /* @__PURE__ */ l(_, { children: [
69
+ e && /* @__PURE__ */ c(v, {
70
+ onClick: t,
71
+ children: /* @__PURE__ */ c(p, { fontSize: "inherit" })
72
+ }),
73
+ /* @__PURE__ */ c(y, {
74
+ correct: e,
75
+ onClick: t,
76
+ dangerouslySetInnerHTML: { __html: n }
77
+ }),
78
+ /* @__PURE__ */ l(b, { children: [/* @__PURE__ */ c(x, {
79
+ onClick: this.onEditClick,
80
+ size: "small",
81
+ "aria-label": "Edit",
82
+ children: /* @__PURE__ */ c(h, { fontSize: "inherit" })
83
+ }), /* @__PURE__ */ c(x, {
84
+ onClick: this.onRemoveClick,
85
+ size: "small",
86
+ "aria-label": "Remove",
87
+ children: /* @__PURE__ */ c(m, { fontSize: "inherit" })
88
+ })] })
89
+ ] });
90
+ }
91
+ }, C = (e) => {
92
+ let t = document.createElement("div");
93
+ return t.innerHTML = (e || "").trim(), t;
94
+ }, w = u("div")(({ theme: e }) => ({
95
+ boxShadow: e.shadows[2],
96
+ borderRadius: "4px",
97
+ width: "400px"
98
+ })), T = u(d)(({ theme: e }) => ({
99
+ borderRadius: "4px",
100
+ backgroundColor: e.palette.common.white,
101
+ "& [data-slate-editor=\"true\"]": { minHeight: "initial !important" }
102
+ })), E = u(g)(({ theme: e }) => ({
103
+ fontSize: e.typography.fontSize + 2,
104
+ padding: e.spacing(.5),
105
+ color: e.palette.common.black,
106
+ position: "absolute",
107
+ top: "50%",
108
+ right: e.spacing(2),
109
+ transform: "translate(0, -50%)"
110
+ })), D = u("div")({
111
+ display: "flex",
112
+ flexDirection: "column",
113
+ "& > div:last-child": { border: "none" }
114
+ }), O = u("div")(({ theme: e }) => ({
115
+ padding: e.spacing(.5),
116
+ position: "relative"
117
+ })), k = class extends t.Component {
118
+ static propTypes = {
119
+ node: i.object,
120
+ pos: i.number,
121
+ uploadSoundSupport: i.object,
122
+ onDone: i.func,
123
+ choices: i.array,
124
+ onAddChoice: i.func.isRequired,
125
+ editorCallback: i.func,
126
+ onRemoveChoice: i.func.isRequired,
127
+ onSelectChoice: i.func.isRequired,
128
+ onToolbarDone: i.func.isRequired,
129
+ editor: i.object,
130
+ spellCheck: i.bool
131
+ };
132
+ clickedInside = !1;
133
+ preventDone = !1;
134
+ state = {
135
+ respAreaMarkup: "",
136
+ editedChoiceIndex: -1
137
+ };
138
+ componentDidMount() {
139
+ let { editor: e } = this.props, t = e.view.nodeDOM(e.state.selection.from);
140
+ if (t?.nodeType === 1) {
141
+ let e = t.getBoundingClientRect(), n = t.closest(".tiptap").getBoundingClientRect(), r = e.top - n.top, i = e.left - n.left;
142
+ this.setState({ toolbarStyle: {
143
+ position: "absolute",
144
+ top: `${r + e.height + 25}px`,
145
+ left: `${i}px`
146
+ } });
147
+ }
148
+ }
149
+ componentDidUpdate() {
150
+ n(r.findDOMNode(this));
151
+ }
152
+ componentWillUnmount() {
153
+ this.commitPendingEdit();
154
+ }
155
+ commitPendingEdit = () => {
156
+ let { editedChoiceIndex: e } = this.state;
157
+ e < 0 || !this.editorRef?.getHTML || (this.preventDone = !1, this.onDone(this.editorRef.getHTML() || ""));
158
+ };
159
+ onRespAreaChange = (e) => {
160
+ this.setState({ respAreaMarkup: e });
161
+ };
162
+ onAddChoice = () => {
163
+ let { editor: e } = this.props, { tr: t } = e.state;
164
+ t.isDone = !0, e.view.dispatch(t);
165
+ };
166
+ onDone = (e) => {
167
+ let { choices: t, node: n, editor: r, onAddChoice: i, onToolbarDone: o } = this.props, { editedChoiceIndex: s } = this.state, c = C(e).textContent.trim();
168
+ s >= 0 && t?.[s]?.correct && r.commands.updateAttributes("inline_dropdown", { value: e }), a(c) || (i(n.attrs.index, e, s), r.commands.refreshResponseArea()), this.setState({ editedChoiceIndex: -1 });
169
+ };
170
+ onSelectChoice = (e, t) => {
171
+ let { node: n, editor: r, onToolbarDone: i, onSelectChoice: a } = this.props;
172
+ r.commands.updateAttributes("inline_dropdown", { value: e }), a(t), r.commands.refreshResponseArea();
173
+ };
174
+ onRemoveChoice = (e, t) => {
175
+ let { node: n, editor: r, onToolbarDone: i, onRemoveChoice: a } = this.props;
176
+ o(e, n.attrs.value) && r.commands.updateAttributes("inline_dropdown", { value: null }), a(t), r.commands.refreshResponseArea();
177
+ };
178
+ onEditChoice = (e, t) => {
179
+ let { editedChoiceIndex: n } = this.state;
180
+ if (this.clickedInside = !0, this.preventDone = !0, n >= 0) {
181
+ let e = this.editorRef.getHTML() || "";
182
+ this.onDone(e);
183
+ }
184
+ this.onRespAreaChange(e), this.setState({ editedChoiceIndex: t });
185
+ };
186
+ finishEditing = () => {
187
+ let e = this.editorRef.getHTML() || "";
188
+ this.onDone(e), this.preventDone = !0;
189
+ };
190
+ onKeyDown = (e) => e.key === "Enter" ? (this.finishEditing(), !0) : !1;
191
+ onBlur = () => {
192
+ if (this.clickedInside) {
193
+ this.clickedInside = !1;
194
+ return;
195
+ }
196
+ let { editedChoiceIndex: e } = this.state;
197
+ if (e >= 0) {
198
+ this.commitPendingEdit();
199
+ return;
200
+ }
201
+ this.onAddChoice();
202
+ };
203
+ onClickInside = () => {
204
+ this.clickedInside = !0;
205
+ };
206
+ render() {
207
+ let { choices: t, spellCheck: n, uploadSoundSupport: r, mathMlOptions: i = {}, baseInputConfiguration: a = {}, responseAreaInputConfiguration: o = {} } = this.props, { respAreaMarkup: u, toolbarStyle: d, editedChoiceIndex: m } = this.state;
208
+ return d ? /* @__PURE__ */ l(w, {
209
+ "data-inline-dropdown-toolbar": "",
210
+ style: {
211
+ ...d,
212
+ backgroundColor: s.dropdownBackground(),
213
+ zIndex: 999
214
+ },
215
+ onMouseDown: this.onClickInside,
216
+ children: [/* @__PURE__ */ l(O, { children: [/* @__PURE__ */ c(T, {
217
+ editorRef: (e) => {
218
+ e && (this.editorRef = e, this.props.editorCallback?.(e));
219
+ },
220
+ autoFocus: !0,
221
+ autoSave: !0,
222
+ toolbarOpts: {
223
+ position: "top",
224
+ alwaysVisible: !1,
225
+ showDone: !1,
226
+ doneOn: "blur"
227
+ },
228
+ markup: u,
229
+ onKeyDown: this.onKeyDown,
230
+ languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
231
+ onChange: (e) => {
232
+ this.preventDone || this.onRespAreaChange(e);
233
+ },
234
+ onDone: (e) => {
235
+ if (this.preventDone) {
236
+ this.preventDone = !1;
237
+ return;
238
+ }
239
+ this.onDone(e);
240
+ },
241
+ onBlur: (e) => {
242
+ let t = !!(e.relatedTarget && e.relatedTarget.closest(".insert-character-dialog")), n = !!(e.relatedTarget && e.relatedTarget.closest("[aria-label=\"Done\"]"));
243
+ e.relatedTarget && (this.preventDone = t || n, (t || n) && (this.clickedInside = !0)), this.onBlur();
244
+ },
245
+ placeholder: "Add Choice",
246
+ pluginProps: e(o?.inputConfiguration, a),
247
+ spellCheck: n,
248
+ uploadSoundSupport: r,
249
+ mathMlOptions: i
250
+ }), /* @__PURE__ */ c(E, {
251
+ onClick: () => m >= 0 ? this.finishEditing() : this.onAddChoice(),
252
+ size: "small",
253
+ "aria-label": "Add",
254
+ children: c(m >= 0 ? p : f, { fontSize: "inherit" })
255
+ })] }), t && /* @__PURE__ */ c(D, { children: t.map(({ label: e, correct: t }, n) => /* @__PURE__ */ c(S, {
256
+ onClick: () => this.onSelectChoice(e, n),
257
+ onRemoveChoice: () => this.onRemoveChoice(e, n),
258
+ onEditChoice: () => this.onEditChoice(e, n),
259
+ value: e,
260
+ correct: t
261
+ }, n)) })]
262
+ }) : null;
263
+ }
264
+ };
265
+ //#endregion
266
+ export { k as default };
@@ -0,0 +1,41 @@
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ export declare class Main extends React.Component {
4
+ static propTypes: {
5
+ configuration: PropTypes.Validator<object>;
6
+ model: PropTypes.Validator<object>;
7
+ disableSidePanel: PropTypes.Requireable<boolean>;
8
+ onModelChanged: PropTypes.Validator<(...args: any[]) => any>;
9
+ onConfigurationChanged: PropTypes.Validator<(...args: any[]) => any>;
10
+ imageSupport: PropTypes.Requireable<PropTypes.InferProps<{
11
+ add: PropTypes.Validator<(...args: any[]) => any>;
12
+ delete: PropTypes.Validator<(...args: any[]) => any>;
13
+ }>>;
14
+ uploadSoundSupport: PropTypes.Requireable<PropTypes.InferProps<{
15
+ add: PropTypes.Validator<(...args: any[]) => any>;
16
+ delete: PropTypes.Validator<(...args: any[]) => any>;
17
+ }>>;
18
+ };
19
+ state: {
20
+ warning: {
21
+ open: boolean;
22
+ };
23
+ };
24
+ componentDidMount(): void;
25
+ UNSAFE_componentWillReceiveProps(nProps: any): void;
26
+ componentDidUpdate(): void;
27
+ onModelChange: any;
28
+ onPromptChanged: any;
29
+ onRationaleChanged: any;
30
+ onChoiceRationaleChanged: any;
31
+ onTeacherInstructionsChanged: any;
32
+ onMarkupChanged: any;
33
+ onCheck: any;
34
+ validateResponseAreaClose: any;
35
+ onChange: any;
36
+ onAddChoice: any;
37
+ onRemoveChoice: any;
38
+ onSelectChoice: any;
39
+ render(): React.JSX.Element;
40
+ }
41
+ export default Main;
@@ -0,0 +1,379 @@
1
+ import { generateValidationMessage as e } from "./utils.js";
2
+ import t from "./inline-dropdown-toolbar.js";
3
+ import n from "./response-area.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 { cloneDeep as s, isEmpty as c, isEqual as l, isUndefined as u, max as d, reduce as f } from "@pie-element/shared-lodash";
9
+ import { color as p } from "@pie-lib/render-ui";
10
+ import { jsx as m, jsxs as h } from "react/jsx-runtime";
11
+ import { styled as g } from "@mui/material/styles";
12
+ import _, { ALL_PLUGINS as v, deleteInlineDropdownByIndex as y } from "@pie-lib/editable-html-tip-tap";
13
+ import { AlertDialog as ee, InputContainer as b, layout as te, settings as x } from "@pie-lib/config-ui";
14
+ import S from "@mui/material/Tooltip";
15
+ import C from "@mui/material/Typography";
16
+ import w from "@mui/material/Accordion";
17
+ import ne from "@mui/material/AccordionSummary";
18
+ import T from "@mui/material/AccordionDetails";
19
+ import E from "@mui/icons-material/ExpandMore";
20
+ import re from "@mui/icons-material/Info";
21
+ //#region src/author/main.tsx
22
+ var { toggle: D, Panel: ie, dropdown: ae } = x, O = g(b)(({ theme: e }) => ({
23
+ width: "100%",
24
+ paddingTop: e.spacing(2),
25
+ marginBottom: e.spacing(2)
26
+ })), oe = g(b)(({ theme: e }) => ({
27
+ width: "100%",
28
+ paddingTop: e.spacing(.5),
29
+ marginBottom: e.spacing(2)
30
+ })), k = g(C)(({ theme: e }) => ({
31
+ fontSize: e.typography.fontSize + 2,
32
+ marginRight: e.spacing(1)
33
+ })), se = g("span")(({ theme: e }) => ({
34
+ display: "flex",
35
+ alignItems: "center",
36
+ whiteSpace: "break-spaces",
37
+ color: p.disabled(),
38
+ padding: 0,
39
+ fontSize: e.typography.fontSize - 2,
40
+ lineHeight: 1
41
+ })), A = g("div")(({ theme: e }) => ({ marginBottom: e.spacing(2.5) })), j = g(T)({
42
+ display: "block",
43
+ paddingTop: 0,
44
+ paddingBottom: 0
45
+ }), M = g("div")(({ theme: e }) => ({
46
+ display: "flex",
47
+ alignItems: "center",
48
+ marginBottom: e.spacing(1)
49
+ })), N = g(S)(({ theme: e }) => ({ "& .MuiTooltip-tooltip": {
50
+ fontSize: e.typography.fontSize - 2,
51
+ whiteSpace: "pre",
52
+ maxWidth: "500px"
53
+ } })), P = g("div")(({ theme: e }) => ({
54
+ fontSize: e.typography.fontSize - 2,
55
+ color: e.palette.error.main,
56
+ paddingTop: e.spacing(1)
57
+ })), F = (e) => {
58
+ let t = document.createElement("div");
59
+ return t.innerHTML = (e || "").trim(), t;
60
+ }, I = class extends r.Component {
61
+ static propTypes = {
62
+ configuration: o.object.isRequired,
63
+ model: o.object.isRequired,
64
+ disableSidePanel: o.bool,
65
+ onModelChanged: o.func.isRequired,
66
+ onConfigurationChanged: o.func.isRequired,
67
+ imageSupport: o.shape({
68
+ add: o.func.isRequired,
69
+ delete: o.func.isRequired
70
+ }),
71
+ uploadSoundSupport: o.shape({
72
+ add: o.func.isRequired,
73
+ delete: o.func.isRequired
74
+ })
75
+ };
76
+ state = { warning: { open: !1 } };
77
+ componentDidMount() {
78
+ let { model: { choices: e } } = this.props;
79
+ this.setState({ respAreaChoices: s(e) });
80
+ }
81
+ UNSAFE_componentWillReceiveProps(e) {
82
+ let t = {};
83
+ (!l(e.model.choices, this.props.model.choices) || !l(e.model.choices, this.state.respAreaChoices)) && (t.respAreaChoices = s(e.model.choices)), c(t) || this.setState(t);
84
+ }
85
+ componentDidUpdate() {
86
+ i(a.findDOMNode(this));
87
+ }
88
+ onModelChange = (e) => {
89
+ this.props.onModelChanged({
90
+ ...this.props.model,
91
+ ...e
92
+ });
93
+ };
94
+ onPromptChanged = (e) => {
95
+ this.onModelChange({ prompt: e });
96
+ };
97
+ onRationaleChanged = (e) => {
98
+ this.onModelChange({ rationale: e });
99
+ };
100
+ onChoiceRationaleChanged = (e, t) => {
101
+ let { model: n } = this.props, r = n.choices && n.choices[e] && n.choices[e].findIndex((e) => e.label === t.label && e.value === t.value);
102
+ n.choices[e] && n.choices[e].splice(r, 1, t), this.onModelChange(n);
103
+ };
104
+ onTeacherInstructionsChanged = (e) => {
105
+ this.onModelChange({ teacherInstructions: e });
106
+ };
107
+ onMarkupChanged = (e) => {
108
+ this.onModelChange({ slateMarkup: e });
109
+ };
110
+ onCheck = (e, t) => {
111
+ this.setState({ warning: {
112
+ open: !0,
113
+ text: "Response areas with under 2 options or with no correct answers will be discarded.",
114
+ onClose: () => {
115
+ this.setState({ warning: { open: !1 } }, t);
116
+ },
117
+ onConfirm: () => {
118
+ this.setState({ warning: { open: !1 } }, e);
119
+ }
120
+ } });
121
+ };
122
+ validateResponseAreaClose = (e, t, n, r, i) => {
123
+ let { respAreaChoices: a } = this.state, o = e.attrs.index, s = a[o] || [];
124
+ if (!(s.length < 2 || !s.find((e) => e.correct))) {
125
+ r();
126
+ return;
127
+ }
128
+ n._holdInlineDropdownToolbarIndex = o, this.onCheck(() => {
129
+ delete n._holdInlineDropdownToolbarIndex, y(n, o, t), r();
130
+ }, i);
131
+ };
132
+ onChange = (e) => {
133
+ let { respAreaChoices: t } = this.state, n = F(e), r = n.querySelectorAll("[data-type=\"inline_dropdown\"]"), i = {};
134
+ r.forEach((e) => {
135
+ i[e.dataset.index] = e.dataset.value || "";
136
+ });
137
+ let a = f(t, (e, n, r) => (u(i[r]) || (e[r] = t[r]), e), {}), o = {};
138
+ r.forEach((e, t) => {
139
+ let n = a[e.dataset.index];
140
+ n && (o[t] = n), e.dataset.index = t;
141
+ }), this.onModelChange({
142
+ choices: s(o),
143
+ slateMarkup: n.innerHTML
144
+ });
145
+ };
146
+ onAddChoice = (e, t, n) => {
147
+ let { respAreaChoices: r } = this.state, { maxResponseAreaChoices: i } = this.props.configuration, a = (e) => this.setState({ warning: {
148
+ open: !0,
149
+ text: e,
150
+ onClose: void 0,
151
+ onConfirm: () => {
152
+ this.setState({ warning: { open: !1 } });
153
+ }
154
+ } });
155
+ if (r[e] && r[e].length >= i) {
156
+ a(`There are only ${i} answers allowed per choice.`);
157
+ return;
158
+ }
159
+ if (r[e] || (r[e] = []), (r[e] || []).find((e, r) => e.label === t && r !== n)) {
160
+ a("Duplicate answers are not allowed.");
161
+ return;
162
+ }
163
+ if (n >= 0 && r[e]?.[n]) r[e][n].label = t;
164
+ else {
165
+ let n = r[e] && d(r[e].map((e) => parseInt(e.value)).filter((e) => !isNaN(e))) || 0;
166
+ r[e].push({
167
+ label: t,
168
+ value: `${n + 1}`,
169
+ correct: !1
170
+ });
171
+ }
172
+ this.onModelChange({ choices: s(r) });
173
+ };
174
+ onRemoveChoice = (e, t) => {
175
+ let { respAreaChoices: n } = this.state;
176
+ n[e].splice(t, 1), this.onModelChange({ choices: s(n) });
177
+ };
178
+ onSelectChoice = (e, t) => {
179
+ let { respAreaChoices: n } = this.state;
180
+ n[e] = n[e].map((e, n) => ({
181
+ ...e,
182
+ correct: n === t
183
+ })), this.onModelChange({ choices: s(n) });
184
+ };
185
+ render() {
186
+ let { warning: i } = this.state, { model: a, configuration: o, onConfigurationChanged: s, imageSupport: c, uploadSoundSupport: l } = 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 = {} } = o || {}, { choiceRationaleEnabled: H, choices: U, errors: W, extraCSSRules: le, promptEnabled: ue, rationaleEnabled: de, spellCheckEnabled: G, teacherInstructionsEnabled: fe, toolbarEditorPosition: pe } = a || {}, { 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, {
187
+ slotProps: { transition: { timeout: {
188
+ enter: 225,
189
+ exit: 195
190
+ } } },
191
+ children: [/* @__PURE__ */ m(ne, {
192
+ expandIcon: /* @__PURE__ */ m(E, {}),
193
+ children: /* @__PURE__ */ m(k, {
194
+ component: "div",
195
+ children: `Rationale for response area #${t + 1}`
196
+ })
197
+ }), /* @__PURE__ */ m(j, { children: (U[e] || []).map((t) => /* @__PURE__ */ h(r.Fragment, { children: [/* @__PURE__ */ m(se, { dangerouslySetInnerHTML: { __html: `${C.label} for ${t.label} (${t.correct ? "correct" : "incorrect"})` } }), /* @__PURE__ */ m(oe, { children: /* @__PURE__ */ m(_, {
198
+ markup: t.rationale || "",
199
+ spellCheck: G,
200
+ pluginProps: $(C?.inputConfiguration),
201
+ onChange: (n) => this.onChoiceRationaleChanged(e, {
202
+ ...t,
203
+ rationale: n
204
+ }),
205
+ imageSupport: c,
206
+ maxImageWidth: y && y.rationale || X,
207
+ maxImageHeight: b && b.rationale || Z,
208
+ uploadSoundSupport: l,
209
+ mathMlOptions: R
210
+ }) })] }, t.label)) })]
211
+ }) }, e)), Q = { position: pe === "top" ? "top" : "bottom" }, ge = e(o), _e = {
212
+ partialScoring: x.settings && D(x.label),
213
+ lockChoiceOrder: p.settings && D(p.label),
214
+ "language.enabled": z.settings && D(z.label, !0),
215
+ language: z.settings && z.enabled && ae(B.label, B.options)
216
+ }, ve = {
217
+ teacherInstructionsEnabled: I.settings && D(I.label),
218
+ rationaleEnabled: C.settings && D(C.label),
219
+ choiceRationaleEnabled: d.settings && D(d.label),
220
+ promptEnabled: S.settings && D(S.label),
221
+ spellCheckEnabled: F.settings && D(F.label),
222
+ rubricEnabled: L?.settings && D(L?.label)
223
+ }, $ = (e = {}) => ({
224
+ ...u,
225
+ ...e
226
+ });
227
+ return /* @__PURE__ */ h(te.ConfigLayout, {
228
+ extraCSSRules: {
229
+ names: ["red", "blue"],
230
+ rules: "\n .red {\n color: red !important;\n }\n\n .blue {\n color: blue !important;\n }\n "
231
+ },
232
+ dimensions: f,
233
+ hideSettings: T,
234
+ settings: /* @__PURE__ */ m(ie, {
235
+ model: a,
236
+ configuration: o,
237
+ onChangeModel: (e) => this.onModelChange(e),
238
+ onChangeConfiguration: (e) => s(e, !0),
239
+ groups: {
240
+ Settings: _e,
241
+ Properties: ve
242
+ }
243
+ }),
244
+ children: [
245
+ fe && /* @__PURE__ */ h(O, {
246
+ label: I.label,
247
+ children: [/* @__PURE__ */ m(_, {
248
+ markup: a.teacherInstructions || "",
249
+ onChange: this.onTeacherInstructionsChanged,
250
+ imageSupport: c,
251
+ nonEmpty: !1,
252
+ error: Y,
253
+ toolbarOpts: Q,
254
+ pluginProps: $(I?.inputConfiguration),
255
+ spellCheck: G,
256
+ maxImageWidth: y && y.teacherInstructions || X,
257
+ maxImageHeight: b && b.teacherInstructions || Z,
258
+ uploadSoundSupport: l,
259
+ languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
260
+ mathMlOptions: R
261
+ }), Y && /* @__PURE__ */ m(P, { children: Y })]
262
+ }),
263
+ ue && /* @__PURE__ */ h(O, {
264
+ label: S.label,
265
+ children: [/* @__PURE__ */ m(_, {
266
+ markup: a.prompt,
267
+ onChange: this.onPromptChanged,
268
+ imageSupport: c,
269
+ nonEmpty: !1,
270
+ disableUnderline: !0,
271
+ error: K,
272
+ toolbarOpts: Q,
273
+ pluginProps: $(S?.inputConfiguration),
274
+ spellCheck: G,
275
+ maxImageWidth: X,
276
+ maxImageHeight: Z,
277
+ uploadSoundSupport: l,
278
+ languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
279
+ mathMlOptions: R
280
+ }), K && /* @__PURE__ */ m(P, { children: K })]
281
+ }),
282
+ /* @__PURE__ */ h(M, { children: [/* @__PURE__ */ m(k, {
283
+ component: "div",
284
+ children: "Define Template, Choices, and Correct Responses"
285
+ }), /* @__PURE__ */ m(N, {
286
+ disableFocusListener: !0,
287
+ disableTouchListener: !0,
288
+ placement: "right",
289
+ title: ge,
290
+ children: /* @__PURE__ */ m(re, {
291
+ fontSize: "small",
292
+ color: "primary"
293
+ })
294
+ })] }),
295
+ /* @__PURE__ */ m(n, {
296
+ responseAreasError: J,
297
+ responseAreaChoicesError: me,
298
+ editableHtmlProps: {
299
+ pluginProps: $(ce?.inputConfiguration),
300
+ activePlugins: v,
301
+ toolbarOpts: { position: "top" },
302
+ extraCSSRules: {
303
+ names: ["red", "blue"],
304
+ rules: "\n .red {\n color: red !important;\n }\n\n .blue {\n color: blue !important;\n }\n "
305
+ },
306
+ responseAreaProps: {
307
+ type: "inline-dropdown",
308
+ options: { duplicates: !0 },
309
+ maxResponseAreas: g,
310
+ onToolbarCloseRequest: ([e, t], n, r, i) => {
311
+ this.validateResponseAreaClose(e, t, n, r, i);
312
+ },
313
+ respAreaToolbar: (e, n, r) => {
314
+ let [i, a] = e, { respAreaChoices: o } = this.state;
315
+ return (e) => /* @__PURE__ */ m(t, {
316
+ ...e,
317
+ onAddChoice: this.onAddChoice,
318
+ onRemoveChoice: (e) => this.onRemoveChoice(i.attrs.index, e),
319
+ onSelectChoice: (e) => this.onSelectChoice(i.attrs.index, e),
320
+ node: i,
321
+ pos: a,
322
+ editor: n,
323
+ onToolbarDone: r,
324
+ choices: o[i.attrs.index],
325
+ spellCheck: G,
326
+ uploadSoundSupport: l,
327
+ mathMlOptions: R,
328
+ baseInputConfiguration: u,
329
+ responseAreaInputConfiguration: V
330
+ });
331
+ }
332
+ },
333
+ spellCheck: G,
334
+ markup: a.slateMarkup || "",
335
+ onChange: this.onChange,
336
+ imageSupport: c,
337
+ disableImageAlignmentButtons: !0,
338
+ disabled: !1,
339
+ highlightShape: !1,
340
+ error: J,
341
+ uploadSoundSupport: l,
342
+ languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
343
+ mathMlOptions: R
344
+ }
345
+ }),
346
+ H && he(),
347
+ de && /* @__PURE__ */ h(O, {
348
+ label: C.label,
349
+ children: [/* @__PURE__ */ m(_, {
350
+ markup: a.rationale || "",
351
+ onChange: this.onRationaleChanged,
352
+ imageSupport: c,
353
+ error: q,
354
+ toolbarOpts: Q,
355
+ pluginProps: $(C?.inputConfiguration),
356
+ spellCheck: G,
357
+ maxImageWidth: y && y.rationale || X,
358
+ maxImageHeight: b && b.rationale || Z,
359
+ uploadSoundSupport: l,
360
+ languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
361
+ mathMlOptions: R
362
+ }), q && /* @__PURE__ */ m(P, { children: q })]
363
+ }),
364
+ /* @__PURE__ */ m(ee, {
365
+ open: i.open,
366
+ title: "Warning",
367
+ text: i.text,
368
+ onClose: i.onClose,
369
+ onConfirm: i.onConfirm,
370
+ disableAutoFocus: !0,
371
+ disableEnforceFocus: !0,
372
+ disableRestoreFocus: !0
373
+ })
374
+ ]
375
+ });
376
+ }
377
+ };
378
+ //#endregion
379
+ export { I as Main, I as default };
@@ -0,0 +1,4 @@
1
+ export declare const removeUnwantedCharacters: (markup: any) => any;
2
+ export declare const createElementFromHTML: (htmlString: any) => HTMLDivElement;
3
+ export declare const processMarkup: (markup: any) => string;
4
+ export declare const createSlateMarkup: (markup: any, choices: any) => any;