@pie-element/categorize 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (238) hide show
  1. package/dist/author/defaults.d.ts +224 -0
  2. package/dist/author/defaults.d.ts.map +1 -0
  3. package/dist/author/defaults.js +170 -0
  4. package/dist/author/design/builder.d.ts +11 -0
  5. package/dist/author/design/builder.d.ts.map +1 -0
  6. package/dist/author/design/builder.js +24 -0
  7. package/dist/author/design/buttons.d.ts +29 -0
  8. package/dist/author/design/buttons.d.ts.map +1 -0
  9. package/dist/author/design/buttons.js +36 -0
  10. package/dist/author/design/categories/RowLabel.d.ts +24 -0
  11. package/dist/author/design/categories/RowLabel.d.ts.map +1 -0
  12. package/dist/author/design/categories/RowLabel.js +46 -0
  13. package/dist/author/design/categories/alternateResponses.d.ts +32 -0
  14. package/dist/author/design/categories/alternateResponses.d.ts.map +1 -0
  15. package/dist/author/design/categories/alternateResponses.js +62 -0
  16. package/dist/author/design/categories/category.d.ts +45 -0
  17. package/dist/author/design/categories/category.d.ts.map +1 -0
  18. package/dist/author/design/categories/category.js +102 -0
  19. package/dist/author/design/categories/choice-preview.d.ts +26 -0
  20. package/dist/author/design/categories/choice-preview.d.ts.map +1 -0
  21. package/dist/author/design/categories/choice-preview.js +60 -0
  22. package/dist/author/design/categories/droppable-placeholder.d.ts +11 -0
  23. package/dist/author/design/categories/droppable-placeholder.d.ts.map +1 -0
  24. package/dist/author/design/categories/droppable-placeholder.js +70 -0
  25. package/dist/author/design/categories/index.d.ts +42 -0
  26. package/dist/author/design/categories/index.d.ts.map +1 -0
  27. package/dist/author/design/categories/index.js +146 -0
  28. package/dist/author/design/choices/choice.d.ts +11 -0
  29. package/dist/author/design/choices/choice.d.ts.map +1 -0
  30. package/dist/author/design/choices/choice.js +129 -0
  31. package/dist/author/design/choices/config.d.ts +22 -0
  32. package/dist/author/design/choices/config.d.ts.map +1 -0
  33. package/dist/author/design/choices/config.js +33 -0
  34. package/dist/author/design/choices/index.d.ts +42 -0
  35. package/dist/author/design/choices/index.d.ts.map +1 -0
  36. package/dist/author/design/choices/index.js +110 -0
  37. package/dist/author/design/header.d.ts +25 -0
  38. package/dist/author/design/header.d.ts.map +1 -0
  39. package/dist/author/design/header.js +49 -0
  40. package/dist/author/design/index.d.ts +53 -0
  41. package/dist/author/design/index.d.ts.map +1 -0
  42. package/dist/author/design/index.js +410 -0
  43. package/dist/author/design/input-header.d.ts +40 -0
  44. package/dist/author/design/input-header.d.ts.map +1 -0
  45. package/dist/author/design/input-header.js +69 -0
  46. package/dist/author/design/utils.d.ts +10 -0
  47. package/dist/author/design/utils.d.ts.map +1 -0
  48. package/dist/author/design/utils.js +7 -0
  49. package/dist/author/index.d.ts +52 -0
  50. package/dist/author/index.d.ts.map +1 -0
  51. package/dist/author/index.js +87 -0
  52. package/dist/author/main.d.ts +24 -0
  53. package/dist/author/main.d.ts.map +1 -0
  54. package/dist/author/main.js +30 -0
  55. package/dist/author/utils.d.ts +17 -0
  56. package/dist/author/utils.d.ts.map +1 -0
  57. package/dist/author/utils.js +17 -0
  58. package/dist/controller/defaults.d.ts +35 -0
  59. package/dist/controller/defaults.d.ts.map +1 -0
  60. package/dist/controller/defaults.js +29 -0
  61. package/dist/controller/index.d.ts +62 -0
  62. package/dist/controller/index.d.ts.map +1 -0
  63. package/dist/controller/index.js +155 -0
  64. package/dist/controller/utils.d.ts +21 -0
  65. package/dist/controller/utils.d.ts.map +1 -0
  66. package/dist/controller/utils.js +35 -0
  67. package/dist/delivery/categorize/categories.d.ts +35 -0
  68. package/dist/delivery/categorize/categories.d.ts.map +1 -0
  69. package/dist/delivery/categorize/categories.js +66 -0
  70. package/dist/delivery/categorize/category.d.ts +29 -0
  71. package/dist/delivery/categorize/category.d.ts.map +1 -0
  72. package/dist/delivery/categorize/category.js +48 -0
  73. package/dist/delivery/categorize/choice.d.ts +28 -0
  74. package/dist/delivery/categorize/choice.d.ts.map +1 -0
  75. package/dist/delivery/categorize/choice.js +94 -0
  76. package/dist/delivery/categorize/choices.d.ts +40 -0
  77. package/dist/delivery/categorize/choices.d.ts.map +1 -0
  78. package/dist/delivery/categorize/choices.js +51 -0
  79. package/dist/delivery/categorize/droppable-placeholder.d.ts +33 -0
  80. package/dist/delivery/categorize/droppable-placeholder.d.ts.map +1 -0
  81. package/dist/delivery/categorize/droppable-placeholder.js +64 -0
  82. package/dist/delivery/categorize/grid-content.d.ts +26 -0
  83. package/dist/delivery/categorize/grid-content.d.ts.map +1 -0
  84. package/dist/delivery/categorize/grid-content.js +39 -0
  85. package/dist/delivery/categorize/index.d.ts +58 -0
  86. package/dist/delivery/categorize/index.d.ts.map +1 -0
  87. package/dist/delivery/categorize/index.js +260 -0
  88. package/dist/delivery/index.d.ts +28 -0
  89. package/dist/delivery/index.d.ts.map +1 -0
  90. package/dist/delivery/index.js +152 -0
  91. package/dist/index.d.ts +2 -0
  92. package/dist/index.d.ts.map +1 -0
  93. package/dist/index.iife.d.ts +9 -0
  94. package/dist/index.iife.d.ts.map +1 -0
  95. package/dist/index.iife.js +152 -0
  96. package/dist/index.js +2 -0
  97. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_DataView.js +6 -0
  98. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Hash.js +16 -0
  99. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_ListCache.js +16 -0
  100. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Map.js +6 -0
  101. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_MapCache.js +16 -0
  102. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Promise.js +6 -0
  103. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Set.js +6 -0
  104. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Stack.js +13 -0
  105. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Symbol.js +5 -0
  106. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Uint8Array.js +5 -0
  107. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_WeakMap.js +6 -0
  108. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arrayEach.js +7 -0
  109. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arrayFilter.js +10 -0
  110. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arrayLikeKeys.js +15 -0
  111. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arrayPush.js +7 -0
  112. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_assignValue.js +10 -0
  113. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_assocIndexOf.js +8 -0
  114. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseAssign.js +8 -0
  115. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseAssignIn.js +8 -0
  116. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseAssignValue.js +12 -0
  117. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseClone.js +57 -0
  118. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseCreate.js +14 -0
  119. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseGetAllKeys.js +9 -0
  120. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseGetTag.js +10 -0
  121. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsArguments.js +9 -0
  122. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsMap.js +9 -0
  123. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsNative.js +11 -0
  124. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsSet.js +9 -0
  125. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsTypedArray.js +11 -0
  126. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseKeys.js +12 -0
  127. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseKeysIn.js +13 -0
  128. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseTimes.js +7 -0
  129. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseUnary.js +8 -0
  130. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneArrayBuffer.js +8 -0
  131. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneBuffer.js +10 -0
  132. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneDataView.js +8 -0
  133. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneRegExp.js +8 -0
  134. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneSymbol.js +8 -0
  135. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneTypedArray.js +8 -0
  136. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_copyArray.js +8 -0
  137. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_copyObject.js +14 -0
  138. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_copySymbols.js +8 -0
  139. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_copySymbolsIn.js +8 -0
  140. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_coreJsData.js +5 -0
  141. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_defineProperty.js +10 -0
  142. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_freeGlobal.js +4 -0
  143. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getAllKeys.js +9 -0
  144. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getAllKeysIn.js +9 -0
  145. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getMapData.js +8 -0
  146. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getNative.js +9 -0
  147. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getPrototype.js +5 -0
  148. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getRawTag.js +14 -0
  149. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getSymbols.js +10 -0
  150. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getSymbolsIn.js +11 -0
  151. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getTag.js +23 -0
  152. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getValue.js +6 -0
  153. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_hashClear.js +7 -0
  154. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_hashDelete.js +7 -0
  155. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_hashGet.js +13 -0
  156. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_hashHas.js +9 -0
  157. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_hashSet.js +9 -0
  158. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_initCloneArray.js +8 -0
  159. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_initCloneByTag.js +33 -0
  160. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_initCloneObject.js +9 -0
  161. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isIndex.js +8 -0
  162. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isKeyable.js +7 -0
  163. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isMasked.js +11 -0
  164. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isPrototype.js +8 -0
  165. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_listCacheClear.js +6 -0
  166. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_listCacheDelete.js +9 -0
  167. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_listCacheGet.js +8 -0
  168. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_listCacheHas.js +7 -0
  169. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_listCacheSet.js +8 -0
  170. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheClear.js +13 -0
  171. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheDelete.js +8 -0
  172. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheGet.js +7 -0
  173. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheHas.js +7 -0
  174. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheSet.js +8 -0
  175. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_nativeCreate.js +5 -0
  176. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_nativeKeys.js +5 -0
  177. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_nativeKeysIn.js +8 -0
  178. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_nodeUtil.js +9 -0
  179. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_objectToString.js +7 -0
  180. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_overArg.js +8 -0
  181. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_root.js +5 -0
  182. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_stackClear.js +7 -0
  183. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_stackDelete.js +7 -0
  184. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_stackGet.js +6 -0
  185. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_stackHas.js +6 -0
  186. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_stackSet.js +16 -0
  187. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_toSource.js +15 -0
  188. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/cloneDeep.js +8 -0
  189. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/eq.js +6 -0
  190. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isArguments.js +10 -0
  191. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isArray.js +4 -0
  192. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isArrayLike.js +8 -0
  193. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isBuffer.js +6 -0
  194. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isEmpty.js +21 -0
  195. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isFunction.js +11 -0
  196. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isLength.js +7 -0
  197. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isMap.js +7 -0
  198. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isObject.js +7 -0
  199. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isObjectLike.js +6 -0
  200. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isSet.js +7 -0
  201. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isTypedArray.js +7 -0
  202. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/keys.js +9 -0
  203. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/keysIn.js +9 -0
  204. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/stubArray.js +6 -0
  205. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/stubFalse.js +6 -0
  206. package/package.json +74 -0
  207. package/src/author/defaults.ts +182 -0
  208. package/src/author/design/builder.ts +63 -0
  209. package/src/author/design/buttons.tsx +60 -0
  210. package/src/author/design/categories/RowLabel.tsx +91 -0
  211. package/src/author/design/categories/alternateResponses.tsx +127 -0
  212. package/src/author/design/categories/category.tsx +161 -0
  213. package/src/author/design/categories/choice-preview.tsx +112 -0
  214. package/src/author/design/categories/droppable-placeholder.tsx +114 -0
  215. package/src/author/design/categories/index.tsx +254 -0
  216. package/src/author/design/choices/choice.tsx +200 -0
  217. package/src/author/design/choices/config.tsx +58 -0
  218. package/src/author/design/choices/index.tsx +185 -0
  219. package/src/author/design/header.tsx +74 -0
  220. package/src/author/design/index.tsx +764 -0
  221. package/src/author/design/input-header.tsx +109 -0
  222. package/src/author/design/utils.ts +14 -0
  223. package/src/author/index.ts +171 -0
  224. package/src/author/main.tsx +45 -0
  225. package/src/author/utils.ts +46 -0
  226. package/src/controller/defaults.ts +37 -0
  227. package/src/controller/index.ts +469 -0
  228. package/src/controller/utils.ts +79 -0
  229. package/src/delivery/categorize/categories.tsx +139 -0
  230. package/src/delivery/categorize/category.tsx +78 -0
  231. package/src/delivery/categorize/choice.tsx +117 -0
  232. package/src/delivery/categorize/choices.tsx +95 -0
  233. package/src/delivery/categorize/droppable-placeholder.tsx +95 -0
  234. package/src/delivery/categorize/grid-content.tsx +53 -0
  235. package/src/delivery/categorize/index.tsx +515 -0
  236. package/src/delivery/index.ts +390 -0
  237. package/src/index.iife.ts +16 -0
  238. package/src/index.ts +1 -0
@@ -0,0 +1,410 @@
1
+ import { getPluginProps as e } from "./utils.js";
2
+ import t from "./categories/choice-preview.js";
3
+ import n from "./header.js";
4
+ import { getMaxCategoryChoices as r, multiplePlacements as i } from "../utils.js";
5
+ import a from "./categories/index.js";
6
+ import o from "./categories/alternateResponses.js";
7
+ import s from "./choices/choice.js";
8
+ import c from "./choices/index.js";
9
+ import { buildAlternateResponses as l, buildCategories as u } from "./builder.js";
10
+ import d from "react";
11
+ import { renderMath as f } from "@pie-element/shared-math-rendering-mathjax";
12
+ import p from "prop-types";
13
+ import { styled as m } from "@mui/material/styles";
14
+ import { DragOverlay as ee } from "@dnd-kit/core";
15
+ import { countInAnswer as h, ensureNoExtraChoicesInAlternate as g, ensureNoExtraChoicesInAnswer as _, moveChoiceToAlternate as v, moveChoiceToCategory as y, removeChoiceFromAlternate as b, removeChoiceFromCategory as x, verifyAllowMultiplePlacements as S } from "@pie-lib/categorize";
16
+ import { DragProvider as te, uid as C } from "@pie-lib/drag";
17
+ import { jsx as w, jsxs as T } from "react/jsx-runtime";
18
+ import E from "@pie-lib/translator";
19
+ import { AlertDialog as ne, FeedbackConfig as re, InputContainer as D, layout as ie, settings as O } from "@pie-lib/config-ui";
20
+ import k from "@pie-lib/editable-html-tip-tap";
21
+ //#region src/author/design/index.tsx
22
+ var { translator: ae } = E, { dropdown: A, Panel: oe, toggle: j, radio: M, numberField: N } = O, { Provider: se } = C, ce = class extends d.Component {
23
+ containerRef = d.createRef();
24
+ componentDidMount() {
25
+ this.containerRef.current && setTimeout(() => f(this.containerRef.current), 0);
26
+ }
27
+ render() {
28
+ return /* @__PURE__ */ w("div", {
29
+ ref: this.containerRef,
30
+ children: this.props.children
31
+ });
32
+ }
33
+ }, P = m(n)(({ theme: e }) => ({ marginBottom: e.spacing(2) })), F = m(D)(({ theme: e }) => ({
34
+ width: "100%",
35
+ paddingTop: e.spacing(2),
36
+ marginBottom: e.spacing(2)
37
+ })), I = m("div")(({ theme: e }) => ({
38
+ fontSize: e.typography.fontSize - 2,
39
+ color: e.palette.error.main,
40
+ paddingTop: e.spacing(1)
41
+ })), L = class extends d.Component {
42
+ static propTypes = {
43
+ configuration: p.object,
44
+ className: p.string,
45
+ onConfigurationChanged: p.func,
46
+ model: p.object.isRequired,
47
+ onChange: p.func.isRequired,
48
+ uid: p.string,
49
+ imageSupport: p.shape({
50
+ add: p.func.isRequired,
51
+ delete: p.func.isRequired
52
+ }),
53
+ uploadSoundSupport: p.shape({
54
+ add: p.func.isRequired,
55
+ delete: p.func.isRequired
56
+ })
57
+ };
58
+ constructor(e) {
59
+ super(e), this.uid = e.uid || C.generateId(), this.state = { activeDragItem: null };
60
+ }
61
+ updateModel = (e) => {
62
+ let { model: t, onChange: n } = this.props, r = {
63
+ ...t,
64
+ ...e
65
+ };
66
+ r.choices = r.choices.map((e) => ({
67
+ ...e,
68
+ categoryCount: this.checkAllowMultiplePlacements(r.allowMultiplePlacementsEnabled, e)
69
+ })), r.correctResponse = _(r.correctResponse || [], r.choices), r.correctResponse = g(r.correctResponse || [], r.choices), r.categories = r.categories.map((e) => ({
70
+ id: e.id,
71
+ label: e.label
72
+ })), r.choices = r.choices.map((e) => ({
73
+ id: e.id,
74
+ content: e.content,
75
+ categoryCount: e.categoryCount
76
+ })), r.maxChoicesPerCategory = r.allowMaxChoicesPerCategory ? r.maxChoicesPerCategory : 0, n(r);
77
+ };
78
+ changeRationale = (e) => {
79
+ let { model: t, onChange: n } = this.props;
80
+ n({
81
+ ...t,
82
+ rationale: e
83
+ });
84
+ };
85
+ changeTeacherInstructions = (e) => {
86
+ let { model: t, onChange: n } = this.props;
87
+ n({
88
+ ...t,
89
+ teacherInstructions: e
90
+ });
91
+ };
92
+ changeFeedback = (e) => {
93
+ this.updateModel({ feedback: e });
94
+ };
95
+ onAddAlternateResponse = () => {
96
+ let { model: { correctResponse: e } } = this.props;
97
+ this.updateModel({ correctResponse: (e || []).map((e) => ({
98
+ ...e,
99
+ alternateResponses: [...e.alternateResponses || [], []]
100
+ })) });
101
+ };
102
+ onPromptChanged = (e) => this.updateModel({ prompt: e });
103
+ onRemoveAlternateResponse = (e) => {
104
+ let { model: { correctResponse: t } } = this.props;
105
+ this.updateModel({ correctResponse: (t || []).map((t) => ({
106
+ ...t,
107
+ alternateResponses: (t.alternateResponses || []).filter((t, n) => n !== e)
108
+ })) });
109
+ };
110
+ countChoiceInCorrectResponse = (e) => {
111
+ let { model: t } = this.props;
112
+ return h(e.id, t.correctResponse);
113
+ };
114
+ checkAllowMultiplePlacements = (e, t) => e === i.enabled ? 0 : e === i.disabled ? 1 : t.categoryCount || 0;
115
+ isAlertModalOpened = () => {
116
+ let { model: e } = this.props, { maxChoicesPerCategory: t = 0 } = e || {}, n = r(e);
117
+ return t === 0 ? !1 : n > t;
118
+ };
119
+ onAlertModalCancel = () => {
120
+ let { model: e } = this.props, t = r(e);
121
+ this.updateModel({ maxChoicesPerCategory: t });
122
+ };
123
+ onDragStart = (e) => {
124
+ let { active: t } = e, n = t.data.current;
125
+ this.setState({ activeDragItem: n });
126
+ };
127
+ onDragEnd = ({ active: e, over: t }) => {
128
+ if (this.setState({ activeDragItem: null }), !e) return;
129
+ let { model: n } = this.props, { allowAlternateEnabled: r, categories: i = [], choices: a = [] } = n, o = e?.data?.current, s = t?.data?.current;
130
+ if (!o) return;
131
+ let c = o.choiceIndex || 0, l = s?.type, u = o.type === "choice-preview", d = o.type === "choice", f = o.choice?.id || (typeof o.id == "string" ? o.id.split("-")[0] : o.id);
132
+ if (u && (!s || l === "choice")) {
133
+ this.removeChoiceFromSource(o, c, {
134
+ allowAlternateEnabled: r,
135
+ categories: i,
136
+ choices: a
137
+ });
138
+ return;
139
+ }
140
+ if (u && l === "category") return this.moveChoice(f, o.categoryId, s.id, c);
141
+ if (d && l === "category") return this.addChoiceToCategory({ id: o.id }, s.id);
142
+ if (u && l === "category-alternate") return this.moveChoiceInAlternate(f, o.categoryId, s.id, c, s.alternateResponseIndex);
143
+ if (r && d && l === "category-alternate") return this.addChoiceToAlternateCategory({ id: o.id }, s.id, s.alternateResponseIndex);
144
+ };
145
+ removeChoiceFromSource = (e, t, { allowAlternateEnabled: n, categories: r, choices: i }) => {
146
+ if (e.alternateResponseIndex === void 0) {
147
+ this.deleteChoiceFromCategory(e.categoryId, e.choiceId, t);
148
+ return;
149
+ }
150
+ if (!n) return;
151
+ let a = r?.find((t) => t.id === e.categoryId), o = i?.find((t) => t.id === e.choiceId);
152
+ a && o && this.deleteChoiceFromAlternateCategory(a, o, t, e.alternateResponseIndex);
153
+ };
154
+ addChoiceToCategory = (e, t) => {
155
+ let { model: n } = this.props, { choices: i = [], correctResponse: a = [], maxChoicesPerCategory: o = 0 } = n || {}, s = (i || []).find((t) => t.id === e.id), c = y(e.id, void 0, t, 0, a);
156
+ s.categoryCount !== 0 && (c = S(e, t, c));
157
+ let l = r(n);
158
+ this.updateModel({
159
+ correctResponse: c,
160
+ maxChoicesPerCategory: o !== 0 && o < l ? o + 1 : o
161
+ });
162
+ };
163
+ deleteChoiceFromCategory = (e, t, n) => {
164
+ let { model: r } = this.props, i = x(t, e, n, r.correctResponse);
165
+ this.updateModel({ correctResponse: i });
166
+ };
167
+ moveChoice = (e, t, n, i) => {
168
+ let { model: a } = this.props, { choices: o, correctResponse: s = [], maxChoicesPerCategory: c = 0 } = a || {}, l = (o || []).find((t) => t.id === e);
169
+ if (n === t || !l) return;
170
+ l.categoryCount === 0 ? l.categoryCount === 0 && (s = y(l.id, void 0, n, 0, s)) : (s = y(l.id, t, n, i, s), s = S(l, n, s));
171
+ let u = r(a);
172
+ this.updateModel({
173
+ correctResponse: s,
174
+ maxChoicesPerCategory: c !== 0 && c < u ? c + 1 : c
175
+ });
176
+ };
177
+ addChoiceToAlternateCategory = (e, t, n) => {
178
+ let { model: i } = this.props, { correctResponse: a, choices: o, maxChoicesPerCategory: s = 0 } = i, c = o.find((t) => t.id === e.id);
179
+ a.forEach((r) => r.category === t ? (r.alternateResponses = r.alternateResponses || [], r.alternateResponses[n] === void 0 && (r.alternateResponses[n] = []), r.alternateResponses[n].push(e.id), c.categoryCount && c.categoryCount !== 0 && (r.alternateResponses[n] = r.alternateResponses[n].reduce((e, t) => (t === c.id ? e.findIndex((e) => e === c.id) === -1 && e.push(t) : e.push(t), e), [])), r) : (r.alternateResponses[n] && c.categoryCount !== 0 && (r.alternateResponses[n] = r.alternateResponses[n].filter((t) => t !== e.id)), r));
180
+ let l = r(i);
181
+ this.updateModel({
182
+ correctResponse: a,
183
+ maxChoicesPerCategory: s !== 0 && s < l ? s + 1 : s
184
+ });
185
+ };
186
+ moveChoiceInAlternate = (e, t, n, i, a) => {
187
+ let { model: o } = this.props, { choices: s, correctResponse: c = [], maxChoicesPerCategory: l = 0 } = o || {}, u = (s || []).find((t) => t.id === e);
188
+ c = v(e, t, n, i, c, a, u?.categoryCount);
189
+ let d = r(o);
190
+ this.updateModel({
191
+ correctResponse: c,
192
+ maxChoicesPerCategory: l !== 0 && l < d ? l + 1 : l
193
+ });
194
+ };
195
+ deleteChoiceFromAlternateCategory = (e, t, n, r) => {
196
+ let { model: i } = this.props, a = b(t.id, e.id, n, r, i.correctResponse);
197
+ this.updateModel({ correctResponse: a });
198
+ };
199
+ renderDragOverlay = () => {
200
+ let { activeDragItem: e } = this.state, { model: n, configuration: r } = this.props;
201
+ if (!e) return null;
202
+ if (e.type === "choice") {
203
+ let t = n.choices?.find((t) => t.id === e.id);
204
+ return t ? /* @__PURE__ */ w(s, {
205
+ choice: t,
206
+ configuration: r
207
+ }) : null;
208
+ } else if (e.type === "choice-preview" && e.alternateResponseIndex === void 0) {
209
+ let r = n.choices?.find((t) => t.id === e.id);
210
+ return r ? /* @__PURE__ */ w(t, { choice: r }) : null;
211
+ } else if (e.type === "choice-preview" && e.alternateResponseIndex !== void 0) {
212
+ let r = n.choices?.find((t) => t.id === e.id);
213
+ return r ? /* @__PURE__ */ w(t, {
214
+ choice: r,
215
+ alternateResponseIndex: e.alternateResponseIndex
216
+ }) : null;
217
+ }
218
+ return null;
219
+ };
220
+ render() {
221
+ let { configuration: t, imageSupport: n, model: r, uploadSoundSupport: s, onConfigurationChanged: f } = this.props, { allowAlternate: p = {}, allowMultiplePlacements: m = {}, baseInputConfiguration: h = {}, categoriesPerRow: g = {}, choicesPosition: _ = {}, contentDimensions: v = {}, feedback: y = {}, lockChoiceOrder: b = {}, maxImageHeight: x = {}, maxImageWidth: S = {}, maxPlacements: C = {}, minCategoriesPerRow: E = 1, partialScoring: D = {}, prompt: O = {}, rationale: L = {}, scoringType: R = {}, settingsPanelDisabled: le, spellCheck: z = {}, studentInstructions: B = {}, teacherInstructions: V = {}, withRubric: H = {}, mathMlOptions: U = {}, language: W = {}, languageChoices: G = {}, allowMaxAnswerChoices: K = {} } = t || {}, { allowAlternateEnabled: ue, allowMaxChoicesPerCategory: de, errors: fe, feedbackEnabled: pe, maxChoicesPerCategory: me, promptEnabled: he, rationaleEnabled: ge, spellCheckEnabled: q, teacherInstructionsEnabled: _e, toolbarEditorPosition: ve, extraCSSRules: ye } = r || {}, { prompt: J, rationale: Y, teacherInstructions: X } = fe || {}, Z = { position: ve === "top" ? "top" : "bottom" }, be = r.config || {};
222
+ be.choices = be.choices || {
223
+ label: "",
224
+ columns: 2
225
+ };
226
+ let xe = u(r.categories || [], r.choices || [], r.correctResponse || []), Se = l(r.categories || [], r.choices || [], r.correctResponse || []), Ce = r.choices.map((e) => (e.correctResponseCount = this.countChoiceInCorrectResponse(e), e.categoryCount = this.checkAllowMultiplePlacements(r.allowMultiplePlacementsEnabled, e), e)), Q = S && S.prompt, $ = x && x.prompt, we = {
227
+ partialScoring: D.settings && j(D.label),
228
+ lockChoiceOrder: b.settings && j(b.label),
229
+ categoriesPerRow: g.settings && N(g.label, {
230
+ label: g.label,
231
+ min: E,
232
+ max: 6
233
+ }),
234
+ choicesPosition: _.settings && M(_.label, [
235
+ "below",
236
+ "above",
237
+ "left",
238
+ "right"
239
+ ]),
240
+ allowMultiplePlacementsEnabled: m.settings && A(m.label, [
241
+ i.enabled,
242
+ i.disabled,
243
+ i.perChoice
244
+ ]),
245
+ maxAnswerChoices: K.settings && N(K.label, {
246
+ label: "",
247
+ min: Ce?.length || 0,
248
+ max: 30
249
+ }),
250
+ allowMaxChoicesPerCategory: C.settings && j(C.label),
251
+ maxChoicesPerCategory: de === !0 && N(C.label, {
252
+ label: "",
253
+ min: 0,
254
+ max: 30
255
+ }),
256
+ promptEnabled: O.settings && j(O.label),
257
+ feedbackEnabled: y.settings && j(y.label),
258
+ allowAlternateEnabled: p.settings && j(p.label),
259
+ "language.enabled": W.settings && j(W.label, !0),
260
+ language: W.settings && W.enabled && A(G.label, G.options)
261
+ }, Te = {
262
+ teacherInstructionsEnabled: V.settings && j(V.label),
263
+ studentInstructionsEnabled: B.settings && j(B.label),
264
+ rationaleEnabled: L.settings && j(L.label),
265
+ spellCheckEnabled: z.settings && j(z.label),
266
+ scoringType: R.settings && M(R.label, ["auto", "rubric"]),
267
+ rubricEnabled: H?.settings && j(H?.label)
268
+ }, Ee = this.isAlertModalOpened(), De = ae.t("translation:categorize:maxChoicesPerCategoryRestriction", {
269
+ lng: r.language,
270
+ maxChoicesPerCategory: me
271
+ });
272
+ return /* @__PURE__ */ w(te, {
273
+ onDragStart: this.onDragStart,
274
+ onDragEnd: this.onDragEnd,
275
+ children: /* @__PURE__ */ T(se, {
276
+ value: this.uid,
277
+ children: [/* @__PURE__ */ T(ie.ConfigLayout, {
278
+ extraCSSRules: ye,
279
+ dimensions: v,
280
+ hideSettings: le,
281
+ settings: /* @__PURE__ */ w(oe, {
282
+ model: r,
283
+ onChangeModel: this.updateModel,
284
+ configuration: t,
285
+ onChangeConfiguration: f,
286
+ groups: {
287
+ Settings: we,
288
+ Properties: Te
289
+ },
290
+ modal: /* @__PURE__ */ w(ne, {
291
+ title: "Warning",
292
+ text: De,
293
+ open: Ee,
294
+ onClose: this.onAlertModalCancel
295
+ })
296
+ }),
297
+ children: [
298
+ _e && /* @__PURE__ */ T(F, {
299
+ label: V.label,
300
+ children: [/* @__PURE__ */ w(k, {
301
+ markup: r.teacherInstructions || "",
302
+ onChange: this.changeTeacherInstructions,
303
+ imageSupport: n,
304
+ error: X,
305
+ nonEmpty: !1,
306
+ toolbarOpts: Z,
307
+ pluginProps: e(V?.inputConfiguration, h),
308
+ spellCheck: q,
309
+ maxImageWidth: S && S.teacherInstructions || Q,
310
+ maxImageHeight: x && x.teacherInstructions || $,
311
+ uploadSoundSupport: s,
312
+ languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
313
+ mathMlOptions: U
314
+ }), X && /* @__PURE__ */ w(I, { children: X })]
315
+ }),
316
+ he && /* @__PURE__ */ T(F, {
317
+ label: O.label,
318
+ children: [/* @__PURE__ */ w(k, {
319
+ markup: r.prompt || "",
320
+ onChange: this.onPromptChanged,
321
+ imageSupport: n,
322
+ error: J,
323
+ nonEmpty: !1,
324
+ disableUnderline: !0,
325
+ toolbarOpts: Z,
326
+ pluginProps: e(O?.inputConfiguration, h),
327
+ spellCheck: q,
328
+ maxImageWidth: S && S.prompt,
329
+ maxImageHeight: x && x.prompt,
330
+ uploadSoundSupport: s,
331
+ languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
332
+ mathMlOptions: U
333
+ }), J && /* @__PURE__ */ w(I, { children: J })]
334
+ }),
335
+ /* @__PURE__ */ w(a, {
336
+ imageSupport: n,
337
+ uploadSoundSupport: s,
338
+ model: r,
339
+ categories: xe || [],
340
+ onModelChanged: this.updateModel,
341
+ toolbarOpts: Z,
342
+ spellCheck: q,
343
+ configuration: t,
344
+ defaultImageMaxWidth: Q,
345
+ defaultImageMaxHeight: $,
346
+ mathMlOptions: U
347
+ }),
348
+ /* @__PURE__ */ w(c, {
349
+ imageSupport: n,
350
+ uploadSoundSupport: s,
351
+ choices: Ce,
352
+ model: r,
353
+ onModelChanged: this.updateModel,
354
+ toolbarOpts: Z,
355
+ spellCheck: q,
356
+ configuration: t,
357
+ defaultImageMaxWidth: Q,
358
+ defaultImageMaxHeight: $
359
+ }),
360
+ ue && /* @__PURE__ */ w(P, {
361
+ label: "Alternate Responses",
362
+ buttonLabel: "ADD AN ALTERNATE RESPONSE",
363
+ onAdd: this.onAddAlternateResponse
364
+ }),
365
+ ue && Se.map((e, i) => /* @__PURE__ */ T(d.Fragment, { children: [/* @__PURE__ */ w(P, {
366
+ variant: "subtitle1",
367
+ label: "Alternate Response",
368
+ buttonLabel: "REMOVE ALTERNATE RESPONSE",
369
+ onAdd: () => this.onRemoveAlternateResponse(i)
370
+ }), /* @__PURE__ */ w(o, {
371
+ altIndex: i,
372
+ imageSupport: n,
373
+ model: r,
374
+ configuration: t,
375
+ categories: e,
376
+ onModelChanged: this.updateModel,
377
+ uploadSoundSupport: s,
378
+ mathMlOptions: U
379
+ })] }, i)),
380
+ ge && /* @__PURE__ */ T(F, {
381
+ label: L.label,
382
+ children: [/* @__PURE__ */ w(k, {
383
+ markup: r.rationale || "",
384
+ onChange: this.changeRationale,
385
+ imageSupport: n,
386
+ error: Y,
387
+ nonEmpty: !1,
388
+ toolbarOpts: Z,
389
+ pluginProps: e(O?.inputConfiguration, h),
390
+ spellCheck: q,
391
+ maxImageWidth: S && S.rationale || Q,
392
+ maxImageHeight: x && x.rationale || $,
393
+ uploadSoundSupport: s,
394
+ languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
395
+ mathMlOptions: U
396
+ }), Y && /* @__PURE__ */ w(I, { children: Y })]
397
+ }),
398
+ pe && /* @__PURE__ */ w(re, {
399
+ feedback: r.feedback,
400
+ onChange: this.changeFeedback,
401
+ toolbarOpts: Z
402
+ })
403
+ ]
404
+ }), /* @__PURE__ */ w(ee, { children: /* @__PURE__ */ w(ce, { children: this.renderDragOverlay() }) })]
405
+ })
406
+ });
407
+ }
408
+ };
409
+ //#endregion
410
+ export { L as default };
@@ -0,0 +1,40 @@
1
+ /**
2
+ * @synced-from pie-elements/packages/categorize/configure/src/design/input-header.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 InputHeader extends React.Component {
12
+ static propTypes: {
13
+ configuration: PropTypes.Validator<object>;
14
+ deleteFocusedEl: PropTypes.Requireable<(...args: any[]) => any>;
15
+ disabled: PropTypes.Requireable<boolean>;
16
+ focusedEl: PropTypes.Requireable<number>;
17
+ index: PropTypes.Requireable<number>;
18
+ label: PropTypes.Requireable<string>;
19
+ maxImageWidth: PropTypes.Requireable<object>;
20
+ maxImageHeight: PropTypes.Requireable<object>;
21
+ onChange: PropTypes.Requireable<(...args: any[]) => any>;
22
+ onDelete: PropTypes.Requireable<(...args: any[]) => any>;
23
+ imageSupport: PropTypes.Requireable<PropTypes.InferProps<{
24
+ add: PropTypes.Validator<(...args: any[]) => any>;
25
+ delete: PropTypes.Validator<(...args: any[]) => any>;
26
+ }>>;
27
+ uploadSoundSupport: PropTypes.Requireable<PropTypes.InferProps<{
28
+ add: PropTypes.Validator<(...args: any[]) => any>;
29
+ delete: PropTypes.Validator<(...args: any[]) => any>;
30
+ }>>;
31
+ toolbarOpts: PropTypes.Requireable<object>;
32
+ error: PropTypes.Requireable<string>;
33
+ spellCheck: PropTypes.Requireable<boolean>;
34
+ };
35
+ static defaultProps: {};
36
+ constructor(props: any);
37
+ render(): React.JSX.Element;
38
+ }
39
+ export default InputHeader;
40
+ //# sourceMappingURL=input-header.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input-header.d.ts","sourceRoot":"","sources":["../../../src/author/design/input-header.tsx"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAGH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAS,MAAM,YAAY,CAAC;AAenC,qBAAa,WAAY,SAAQ,KAAK,CAAC,SAAS;IAC9C,MAAM,CAAC,SAAS;;;;;;;;;;;;;;;;;;;;;;MAsBd;IAEF,MAAM,CAAC,YAAY,KAAM;gBAEb,KAAK,KAAA;IAIjB,MAAM;CAgDP;AAED,eAAe,WAAW,CAAC"}
@@ -0,0 +1,69 @@
1
+ import { getPluginProps as e } from "./utils.js";
2
+ import t from "react";
3
+ import n from "prop-types";
4
+ import { styled as r } from "@mui/material/styles";
5
+ import { jsx as i } from "react/jsx-runtime";
6
+ import a from "@pie-lib/editable-html-tip-tap";
7
+ //#region src/author/design/input-header.tsx
8
+ var o = r(a)(({ theme: e }) => ({
9
+ flex: "1",
10
+ paddingBottom: e.spacing(1),
11
+ maxWidth: "100%"
12
+ })), s = r("div")({
13
+ display: "flex",
14
+ justifyContent: "space-between"
15
+ }), c = class extends t.Component {
16
+ static propTypes = {
17
+ configuration: n.object.isRequired,
18
+ deleteFocusedEl: n.func,
19
+ disabled: n.bool,
20
+ focusedEl: n.number,
21
+ index: n.number,
22
+ label: n.string,
23
+ maxImageWidth: n.object,
24
+ maxImageHeight: n.object,
25
+ onChange: n.func,
26
+ onDelete: n.func,
27
+ imageSupport: n.shape({
28
+ add: n.func.isRequired,
29
+ delete: n.func.isRequired
30
+ }),
31
+ uploadSoundSupport: n.shape({
32
+ add: n.func.isRequired,
33
+ delete: n.func.isRequired
34
+ }),
35
+ toolbarOpts: n.object,
36
+ error: n.string,
37
+ spellCheck: n.bool
38
+ };
39
+ static defaultProps = {};
40
+ constructor(e) {
41
+ super(e);
42
+ }
43
+ render() {
44
+ let { onChange: t, configuration: n, label: r, deleteFocusedEl: a, disabled: c, imageSupport: l, toolbarOpts: u, spellCheck: d, error: f, maxImageWidth: p, maxImageHeight: m, uploadSoundSupport: h, mathMlOptions: g = {}, focusedEl: _, index: v } = this.props, { headers: y, baseInputConfiguration: b } = n;
45
+ return /* @__PURE__ */ i(s, { children: /* @__PURE__ */ i(o, {
46
+ imageSupport: l,
47
+ disabled: c,
48
+ autoFocus: _ != null && _ === v,
49
+ autoWidthToolbar: !0,
50
+ label: "label",
51
+ markup: r,
52
+ onChange: t,
53
+ pluginProps: e(y?.inputConfiguration, b),
54
+ toolbarOpts: u,
55
+ spellCheck: d,
56
+ error: f,
57
+ maxImageWidth: p,
58
+ maxImageHeight: m,
59
+ uploadSoundSupport: h,
60
+ languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
61
+ onDone: () => {
62
+ a && a();
63
+ },
64
+ mathMlOptions: g
65
+ }) });
66
+ }
67
+ };
68
+ //#endregion
69
+ export { c as default };
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @synced-from pie-elements/packages/categorize/configure/src/design/utils.js
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
+ export declare const getPluginProps: (props?: {}, baseInputConfiguration?: {}) => {};
10
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/author/design/utils.ts"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAEH,eAAO,MAAM,cAAc,GAAI,UAAU,EAAE,2BAA2B,OAGpE,CAAC"}
@@ -0,0 +1,7 @@
1
+ //#region src/author/design/utils.ts
2
+ var e = (e = {}, t = {}) => ({
3
+ ...t,
4
+ ...e
5
+ });
6
+ //#endregion
7
+ export { e as getPluginProps };
@@ -0,0 +1,52 @@
1
+ /**
2
+ * @synced-from pie-elements/packages/categorize/configure/src/index.js
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
+ export default class CategorizeConfigure extends HTMLElement {
10
+ static createDefaultModel: (model?: {}) => {
11
+ allowAlternateEnabled: boolean;
12
+ allowMaxChoicesPerCategory: boolean;
13
+ allowMultiplePlacementsEnabled: string;
14
+ alternates: never[];
15
+ categories: never[];
16
+ categoriesPerRow: number;
17
+ choices: never[];
18
+ choicesLabel: string;
19
+ choicesPosition: string;
20
+ correctResponse: never[];
21
+ feedbackEnabled: boolean;
22
+ lockChoiceOrder: boolean;
23
+ maxAnswerChoices: number;
24
+ maxChoicesPerCategory: number;
25
+ partialScoring: boolean;
26
+ promptEnabled: boolean;
27
+ rationaleEnabled: boolean;
28
+ rowLabels: string[];
29
+ studentInstructionsEnabled: boolean;
30
+ teacherInstructionsEnabled: boolean;
31
+ toolbarEditorPosition: string;
32
+ minRowHeight: string;
33
+ };
34
+ static disableAlternateResponses: (m: any) => any;
35
+ constructor();
36
+ set model(m: any);
37
+ set configuration(c: any);
38
+ onModelChanged(m: any): void;
39
+ onConfigurationChanged(c: any): void;
40
+ connectedCallback(): void;
41
+ /**
42
+ *
43
+ * @param {done, progress, file} handler
44
+ */
45
+ insertImage(handler: any): void;
46
+ onDeleteImage(src: any, done: any): void;
47
+ insertSound(handler: any): void;
48
+ onDeleteSound(src: any, done: any): void;
49
+ render(): void;
50
+ disconnectedCallback(): void;
51
+ }
52
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/author/index.ts"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAiBH,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,WAAW;IAC1D,MAAM,CAAC,kBAAkB,GAAI,UAAU;;;;;;;;;;;;;;;;;;;;;;;MAGpC;IAIH,MAAM,CAAC,yBAAyB,GAAI,MAAC,SAYnC;;IASF,IAAI,KAAK,CAAC,CAAC,KAAA,EASV;IAED,IAAI,aAAa,CAAC,CAAC,KAAA,EAoClB;IAED,cAAc,CAAC,CAAC,KAAA;IAOhB,sBAAsB,CAAC,CAAC,KAAA;IAKxB,iBAAiB;IAIjB;;;OAGG;IACH,WAAW,CAAC,OAAO,KAAA;IAInB,aAAa,CAAC,GAAG,KAAA,EAAE,IAAI,KAAA;IAIvB,WAAW,CAAC,OAAO,KAAA;IAInB,aAAa,CAAC,GAAG,KAAA,EAAE,IAAI,KAAA;IAIvB,MAAM;IA0BN,oBAAoB;CAKrB"}