@pie-element/categorize 13.1.0-next.19 → 13.1.1-next.1

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 (252) hide show
  1. package/dist/author/defaults.d.ts +223 -0
  2. package/dist/author/defaults.js +170 -0
  3. package/dist/author/design/builder.d.ts +10 -0
  4. package/dist/author/design/builder.js +24 -0
  5. package/dist/author/design/buttons.d.ts +28 -0
  6. package/dist/author/design/buttons.js +36 -0
  7. package/dist/author/design/categories/RowLabel.d.ts +23 -0
  8. package/dist/author/design/categories/RowLabel.js +47 -0
  9. package/dist/author/design/categories/alternateResponses.d.ts +31 -0
  10. package/dist/author/design/categories/alternateResponses.js +62 -0
  11. package/dist/author/design/categories/category.d.ts +44 -0
  12. package/dist/author/design/categories/category.js +98 -0
  13. package/dist/author/design/categories/choice-preview.d.ts +25 -0
  14. package/dist/author/design/categories/choice-preview.js +60 -0
  15. package/dist/author/design/categories/droppable-placeholder.d.ts +11 -0
  16. package/dist/author/design/categories/droppable-placeholder.js +71 -0
  17. package/dist/author/design/categories/index.d.ts +41 -0
  18. package/dist/author/design/categories/index.js +146 -0
  19. package/dist/author/design/choices/choice.d.ts +11 -0
  20. package/dist/author/design/choices/choice.js +129 -0
  21. package/dist/author/design/choices/config.d.ts +21 -0
  22. package/dist/author/design/choices/config.js +33 -0
  23. package/dist/author/design/choices/index.d.ts +41 -0
  24. package/dist/author/design/choices/index.js +110 -0
  25. package/dist/author/design/header.d.ts +24 -0
  26. package/dist/author/design/header.js +49 -0
  27. package/dist/author/design/index.d.ts +52 -0
  28. package/dist/author/design/index.js +417 -0
  29. package/dist/author/design/input-header.d.ts +39 -0
  30. package/dist/author/design/input-header.js +69 -0
  31. package/dist/author/design/utils.d.ts +9 -0
  32. package/dist/author/design/utils.js +7 -0
  33. package/dist/author/index.d.ts +51 -0
  34. package/dist/author/index.js +87 -0
  35. package/dist/author/main.d.ts +23 -0
  36. package/dist/author/main.js +30 -0
  37. package/dist/author/utils.d.ts +16 -0
  38. package/dist/author/utils.js +17 -0
  39. package/dist/controller/defaults.d.ts +34 -0
  40. package/dist/controller/defaults.js +29 -0
  41. package/dist/controller/index.d.ts +61 -0
  42. package/dist/controller/index.js +155 -0
  43. package/dist/controller/utils.d.ts +20 -0
  44. package/dist/controller/utils.js +35 -0
  45. package/dist/delivery/categorize/categories.d.ts +34 -0
  46. package/dist/delivery/categorize/categories.js +66 -0
  47. package/dist/delivery/categorize/category.d.ts +28 -0
  48. package/dist/delivery/categorize/category.js +48 -0
  49. package/dist/delivery/categorize/choice.d.ts +27 -0
  50. package/dist/delivery/categorize/choice.js +94 -0
  51. package/dist/delivery/categorize/choices.d.ts +39 -0
  52. package/dist/delivery/categorize/choices.js +51 -0
  53. package/dist/delivery/categorize/droppable-placeholder.d.ts +32 -0
  54. package/dist/delivery/categorize/droppable-placeholder.js +64 -0
  55. package/dist/delivery/categorize/grid-content.d.ts +25 -0
  56. package/dist/delivery/categorize/grid-content.js +39 -0
  57. package/dist/delivery/categorize/index.d.ts +57 -0
  58. package/dist/delivery/categorize/index.js +260 -0
  59. package/dist/delivery/index.d.ts +27 -0
  60. package/dist/delivery/index.js +152 -0
  61. package/dist/index.d.ts +1 -0
  62. package/dist/index.iife.d.ts +8 -0
  63. package/dist/index.iife.js +152 -0
  64. package/dist/index.js +2 -0
  65. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_DataView.js +6 -0
  66. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Hash.js +16 -0
  67. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_ListCache.js +16 -0
  68. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Map.js +6 -0
  69. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_MapCache.js +16 -0
  70. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Promise.js +6 -0
  71. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Set.js +6 -0
  72. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Stack.js +14 -0
  73. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Symbol.js +5 -0
  74. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Uint8Array.js +5 -0
  75. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_WeakMap.js +6 -0
  76. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayEach.js +7 -0
  77. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayFilter.js +10 -0
  78. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayLikeKeys.js +15 -0
  79. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayPush.js +7 -0
  80. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assignValue.js +10 -0
  81. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assocIndexOf.js +8 -0
  82. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssign.js +8 -0
  83. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignIn.js +8 -0
  84. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignValue.js +12 -0
  85. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseClone.js +57 -0
  86. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseCreate.js +14 -0
  87. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetAllKeys.js +9 -0
  88. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetTag.js +10 -0
  89. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsArguments.js +9 -0
  90. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsMap.js +9 -0
  91. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNative.js +11 -0
  92. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsSet.js +9 -0
  93. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsTypedArray.js +11 -0
  94. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeys.js +12 -0
  95. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeysIn.js +13 -0
  96. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTimes.js +7 -0
  97. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseUnary.js +8 -0
  98. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneArrayBuffer.js +8 -0
  99. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneBuffer.js +10 -0
  100. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneDataView.js +8 -0
  101. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneRegExp.js +8 -0
  102. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneSymbol.js +8 -0
  103. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneTypedArray.js +8 -0
  104. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyArray.js +8 -0
  105. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyObject.js +14 -0
  106. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbols.js +8 -0
  107. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbolsIn.js +8 -0
  108. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_coreJsData.js +5 -0
  109. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_defineProperty.js +10 -0
  110. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_freeGlobal.js +4 -0
  111. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeys.js +9 -0
  112. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeysIn.js +9 -0
  113. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getMapData.js +8 -0
  114. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getNative.js +9 -0
  115. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getPrototype.js +5 -0
  116. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getRawTag.js +14 -0
  117. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbols.js +10 -0
  118. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbolsIn.js +11 -0
  119. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getTag.js +23 -0
  120. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getValue.js +6 -0
  121. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashClear.js +7 -0
  122. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashDelete.js +7 -0
  123. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashGet.js +13 -0
  124. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashHas.js +9 -0
  125. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashSet.js +9 -0
  126. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneArray.js +8 -0
  127. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneByTag.js +33 -0
  128. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneObject.js +9 -0
  129. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIndex.js +8 -0
  130. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKeyable.js +7 -0
  131. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isMasked.js +11 -0
  132. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isPrototype.js +8 -0
  133. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheClear.js +6 -0
  134. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheDelete.js +9 -0
  135. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheGet.js +8 -0
  136. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheHas.js +7 -0
  137. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheSet.js +8 -0
  138. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheClear.js +13 -0
  139. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheDelete.js +8 -0
  140. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheGet.js +7 -0
  141. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheHas.js +7 -0
  142. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheSet.js +8 -0
  143. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeCreate.js +5 -0
  144. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeys.js +5 -0
  145. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeysIn.js +8 -0
  146. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nodeUtil.js +9 -0
  147. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_objectToString.js +7 -0
  148. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overArg.js +8 -0
  149. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_root.js +5 -0
  150. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackClear.js +7 -0
  151. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackDelete.js +7 -0
  152. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackGet.js +6 -0
  153. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackHas.js +6 -0
  154. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackSet.js +16 -0
  155. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toSource.js +15 -0
  156. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/cloneDeep.js +8 -0
  157. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/eq.js +6 -0
  158. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArguments.js +10 -0
  159. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArray.js +4 -0
  160. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLike.js +8 -0
  161. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isBuffer.js +6 -0
  162. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.js +21 -0
  163. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isFunction.js +11 -0
  164. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isLength.js +7 -0
  165. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isMap.js +7 -0
  166. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObject.js +7 -0
  167. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObjectLike.js +6 -0
  168. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSet.js +7 -0
  169. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isTypedArray.js +7 -0
  170. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keys.js +9 -0
  171. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keysIn.js +9 -0
  172. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubArray.js +6 -0
  173. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubFalse.js +6 -0
  174. package/package.json +53 -17
  175. package/CHANGELOG.json +0 -1637
  176. package/CHANGELOG.md +0 -2524
  177. package/LICENSE.md +0 -5
  178. package/README.md +0 -5
  179. package/configure/CHANGELOG.json +0 -1202
  180. package/configure/CHANGELOG.md +0 -2107
  181. package/configure/lib/defaults.js +0 -222
  182. package/configure/lib/defaults.js.map +0 -1
  183. package/configure/lib/design/builder.js +0 -55
  184. package/configure/lib/design/builder.js.map +0 -1
  185. package/configure/lib/design/buttons.js +0 -59
  186. package/configure/lib/design/buttons.js.map +0 -1
  187. package/configure/lib/design/categories/RowLabel.js +0 -66
  188. package/configure/lib/design/categories/RowLabel.js.map +0 -1
  189. package/configure/lib/design/categories/alternateResponses.js +0 -116
  190. package/configure/lib/design/categories/alternateResponses.js.map +0 -1
  191. package/configure/lib/design/categories/category.js +0 -153
  192. package/configure/lib/design/categories/category.js.map +0 -1
  193. package/configure/lib/design/categories/choice-preview.js +0 -79
  194. package/configure/lib/design/categories/choice-preview.js.map +0 -1
  195. package/configure/lib/design/categories/droppable-placeholder.js +0 -93
  196. package/configure/lib/design/categories/droppable-placeholder.js.map +0 -1
  197. package/configure/lib/design/categories/index.js +0 -256
  198. package/configure/lib/design/categories/index.js.map +0 -1
  199. package/configure/lib/design/choices/choice.js +0 -187
  200. package/configure/lib/design/choices/choice.js.map +0 -1
  201. package/configure/lib/design/choices/config.js +0 -58
  202. package/configure/lib/design/choices/config.js.map +0 -1
  203. package/configure/lib/design/choices/index.js +0 -197
  204. package/configure/lib/design/choices/index.js.map +0 -1
  205. package/configure/lib/design/header.js +0 -71
  206. package/configure/lib/design/header.js.map +0 -1
  207. package/configure/lib/design/index.js +0 -727
  208. package/configure/lib/design/index.js.map +0 -1
  209. package/configure/lib/design/input-header.js +0 -105
  210. package/configure/lib/design/input-header.js.map +0 -1
  211. package/configure/lib/design/utils.js +0 -12
  212. package/configure/lib/design/utils.js.map +0 -1
  213. package/configure/lib/index.js +0 -147
  214. package/configure/lib/index.js.map +0 -1
  215. package/configure/lib/main.js +0 -44
  216. package/configure/lib/main.js.map +0 -1
  217. package/configure/lib/utils.js +0 -43
  218. package/configure/lib/utils.js.map +0 -1
  219. package/configure/package.json +0 -32
  220. package/controller/CHANGELOG.json +0 -452
  221. package/controller/CHANGELOG.md +0 -1366
  222. package/controller/lib/defaults.js +0 -33
  223. package/controller/lib/defaults.js.map +0 -1
  224. package/controller/lib/index.js +0 -479
  225. package/controller/lib/index.js.map +0 -1
  226. package/controller/lib/utils.js +0 -69
  227. package/controller/lib/utils.js.map +0 -1
  228. package/controller/package.json +0 -18
  229. package/docs/config-schema.json +0 -2897
  230. package/docs/config-schema.json.md +0 -2138
  231. package/docs/demo/config.js +0 -8
  232. package/docs/demo/generate.js +0 -357
  233. package/docs/demo/index.html +0 -1
  234. package/docs/demo/session.js +0 -12
  235. package/docs/pie-schema.json +0 -1784
  236. package/docs/pie-schema.json.md +0 -1046
  237. package/lib/categorize/categories.js +0 -135
  238. package/lib/categorize/categories.js.map +0 -1
  239. package/lib/categorize/category.js +0 -67
  240. package/lib/categorize/category.js.map +0 -1
  241. package/lib/categorize/choice.js +0 -140
  242. package/lib/categorize/choice.js.map +0 -1
  243. package/lib/categorize/choices.js +0 -99
  244. package/lib/categorize/choices.js.map +0 -1
  245. package/lib/categorize/droppable-placeholder.js +0 -84
  246. package/lib/categorize/droppable-placeholder.js.map +0 -1
  247. package/lib/categorize/grid-content.js +0 -55
  248. package/lib/categorize/grid-content.js.map +0 -1
  249. package/lib/categorize/index.js +0 -450
  250. package/lib/categorize/index.js.map +0 -1
  251. package/lib/index.js +0 -316
  252. package/lib/index.js.map +0 -1
@@ -0,0 +1,23 @@
1
+ /**
2
+ * @synced-from pie-elements/packages/categorize/configure/src/main.jsx
3
+ * @auto-generated
4
+ *
5
+ * This file is automatically synced from pie-elements and converted to TypeScript.
6
+ * Manual edits will be overwritten on next sync.
7
+ * To make changes, edit the upstream JavaScript file and run sync again.
8
+ */
9
+ import React from 'react';
10
+ import PropTypes from 'prop-types';
11
+ export declare class Main extends React.Component {
12
+ static propTypes: {
13
+ configuration: PropTypes.Requireable<object>;
14
+ onConfigurationChanged: PropTypes.Requireable<(...args: any[]) => any>;
15
+ model: PropTypes.Validator<object>;
16
+ onModelChanged: PropTypes.Validator<(...args: any[]) => any>;
17
+ imageSupport: PropTypes.Requireable<object>;
18
+ uploadSoundSupport: PropTypes.Requireable<object>;
19
+ };
20
+ static defaultProps: {};
21
+ render(): React.JSX.Element;
22
+ }
23
+ export default Main;
@@ -0,0 +1,30 @@
1
+ import e from "./design/index.js";
2
+ import t from "react";
3
+ import n from "prop-types";
4
+ import { jsx as r } from "react/jsx-runtime";
5
+ //#region src/author/main.tsx
6
+ var i = class extends t.Component {
7
+ static propTypes = {
8
+ configuration: n.object,
9
+ onConfigurationChanged: n.func,
10
+ model: n.object.isRequired,
11
+ onModelChanged: n.func.isRequired,
12
+ imageSupport: n.object,
13
+ uploadSoundSupport: n.object
14
+ };
15
+ static defaultProps = {};
16
+ render() {
17
+ let { model: t, onModelChanged: n, configuration: i, onConfigurationChanged: a, imageSupport: o, uploadSoundSupport: s } = this.props;
18
+ return /* @__PURE__ */ r(e, {
19
+ imageSupport: o,
20
+ uploadSoundSupport: s,
21
+ title: "Design",
22
+ model: t,
23
+ configuration: i,
24
+ onChange: n,
25
+ onConfigurationChanged: a
26
+ });
27
+ }
28
+ };
29
+ //#endregion
30
+ export { i as default };
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @synced-from pie-elements/packages/categorize/configure/src/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 generateValidationMessage: (config: any) => string;
10
+ export declare const multiplePlacements: {
11
+ enabled: string;
12
+ disabled: string;
13
+ perChoice: string;
14
+ };
15
+ export declare const maxLength: (array: any) => any;
16
+ export declare const getMaxCategoryChoices: (model: any) => any;
@@ -0,0 +1,17 @@
1
+ //#region src/author/utils.ts
2
+ var e = (e) => {
3
+ let { minChoices: t, maxChoices: n, maxCategories: r } = e || {};
4
+ return t ||= 1, "Validation requirements:" + ("\nThe choices content should not be empty and should be unique.\nThere should be at least 1 " + (r ? `and at most ${r} ` : "") + "category" + (r ? "s" : "") + " defined." + (t ? `\nThere should be at least ${t} choices defined.` : "") + (n ? `\nNo more than ${n} choices should be defined.` : "") + "\nAt least one token should be assigned to at least one category.");
5
+ }, t = {
6
+ enabled: "Yes",
7
+ disabled: "No",
8
+ perChoice: "Set Per Choice"
9
+ }, n = (e) => (e || []).reduce((e, t) => Math.max(e, t.length), 0), r = (e) => {
10
+ let { correctResponse: t = [] } = e || {};
11
+ return t.reduce((e, t) => {
12
+ let r = t?.choices?.length || 0, i = t?.alternateResponses || [], a = Math.max(r, n(i));
13
+ return a > e ? a : e;
14
+ }, 0);
15
+ };
16
+ //#endregion
17
+ export { e as generateValidationMessage, r as getMaxCategoryChoices, t as multiplePlacements };
@@ -0,0 +1,34 @@
1
+ /**
2
+ * @synced-from pie-elements/packages/categorize/controller/src/defaults.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
+ declare const _default: {
10
+ allowMultiplePlacementsEnabled: string;
11
+ alternates: never[];
12
+ categories: never[];
13
+ categoriesPerRow: number;
14
+ choices: never[];
15
+ choicesLabel: string;
16
+ choicesPosition: string;
17
+ correctResponse: never[];
18
+ feedbackEnabled: boolean;
19
+ lockChoiceOrder: boolean;
20
+ maxAnswerChoices: number;
21
+ maxChoicesPerCategory: number;
22
+ partialScoring: boolean;
23
+ prompt: string;
24
+ promptEnabled: boolean;
25
+ rationale: string;
26
+ rationaleEnabled: boolean;
27
+ rowLabels: string[];
28
+ studentInstructionsEnabled: boolean;
29
+ teacherInstructions: string;
30
+ teacherInstructionsEnabled: boolean;
31
+ toolbarEditorPosition: string;
32
+ minRowHeight: string;
33
+ };
34
+ export default _default;
@@ -0,0 +1,29 @@
1
+ import { multiplePlacements as e } from "./utils.js";
2
+ //#region src/controller/defaults.ts
3
+ var t = {
4
+ allowMultiplePlacementsEnabled: e.enabled,
5
+ alternates: [],
6
+ categories: [],
7
+ categoriesPerRow: 2,
8
+ choices: [],
9
+ choicesLabel: "",
10
+ choicesPosition: "below",
11
+ correctResponse: [],
12
+ feedbackEnabled: !1,
13
+ lockChoiceOrder: !0,
14
+ maxAnswerChoices: 6,
15
+ maxChoicesPerCategory: 0,
16
+ partialScoring: !0,
17
+ prompt: "",
18
+ promptEnabled: !0,
19
+ rationale: "",
20
+ rationaleEnabled: !0,
21
+ rowLabels: [""],
22
+ studentInstructionsEnabled: !0,
23
+ teacherInstructions: "",
24
+ teacherInstructionsEnabled: !0,
25
+ toolbarEditorPosition: "bottom",
26
+ minRowHeight: "80px"
27
+ };
28
+ //#endregion
29
+ export { t as default };
@@ -0,0 +1,61 @@
1
+ /**
2
+ * @synced-from pie-elements/packages/categorize/controller/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
+ import { score } from '@pie-lib/categorize';
10
+ export { score };
11
+ export declare const getPartialScore: (correctResponse: any, builtCategories: any) => number;
12
+ export declare const getTotalScore: (question: any, session: any, env: any) => number;
13
+ export declare const getCorrectness: (question: any, session: any, env: any) => Promise<unknown>;
14
+ export declare const createDefaultModel: (model?: {}) => Promise<unknown>;
15
+ export declare const normalize: (question: any) => any;
16
+ /**
17
+ *
18
+ * @param {*} question
19
+ * @param {*} session
20
+ * @param {*} env
21
+ * @param {*} updateSession - optional - a function that will set the properties passed into it on the session.
22
+ */
23
+ export declare const model: (question: any, session: any, env: any, updateSession: any) => Promise<{
24
+ categories: any;
25
+ categoriesPerRow: any;
26
+ maxChoicesPerCategory: any;
27
+ correctness: unknown;
28
+ choices: any;
29
+ choicesLabel: any;
30
+ choicesPosition: any;
31
+ disabled: boolean;
32
+ feedback: string | undefined;
33
+ lockChoiceOrder: boolean;
34
+ prompt: any;
35
+ rowLabels: any;
36
+ note: any;
37
+ env: any;
38
+ showNote: any;
39
+ correctResponse: any;
40
+ language: any;
41
+ extraCSSRules: any;
42
+ fontSizeFactor: any;
43
+ minRowHeight: any;
44
+ autoplayAudioEnabled: any;
45
+ completeAudioEnabled: any;
46
+ customAudioButton: any;
47
+ possibleResponses: any[];
48
+ responseAreasToBeFilled: any;
49
+ hasUnplacedChoices: boolean;
50
+ }>;
51
+ /**
52
+ * Generates detailed trace log for scoring evaluation
53
+ * @param {Object} model - the question model
54
+ * @param {Object} session - the student session
55
+ * @param {Object} env - the environment
56
+ * @returns {Array} traceLog - array of trace messages
57
+ */
58
+ export declare const getLogTrace: (model: any, session: any, env: any) => string[];
59
+ export declare const outcome: (question: any, session: any, env: any) => Promise<unknown>;
60
+ export declare const createCorrectResponseSession: (question: any, env: any) => Promise<unknown>;
61
+ export declare const validate: (model?: {}, config?: {}) => {};
@@ -0,0 +1,155 @@
1
+ import e from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.js";
2
+ import { getCompleteResponseDetails as t, isAlternateDuplicated as n, isCorrectResponseDuplicated as r } from "./utils.js";
3
+ import i from "./defaults.js";
4
+ import { buildState as a, score as o } from "@pie-lib/categorize";
5
+ import s from "@pie-lib/translator";
6
+ import { getFeedbackForCorrectness as c } from "@pie-element/shared-feedback";
7
+ import { getShuffledChoices as l, lockChoices as u, partialScoring as d } from "@pie-element/shared-controller-utils";
8
+ //#region src/controller/index.ts
9
+ var { translator: f } = s, p = (e, t) => {
10
+ let { placements: n, score: r } = t.reduce((e, { choices: t = [] }) => ({
11
+ placements: e.placements + t.length,
12
+ score: e.score + t.filter((e) => e.correct).length
13
+ }), {
14
+ placements: 0,
15
+ score: 0
16
+ }), { maxScore: i } = e.reduce((e, { choices: t }) => ({ maxScore: e.maxScore + t.length }), { maxScore: 0 }), a = (r - (n > i ? n - i : 0)) / i;
17
+ return a < 0 ? 0 : parseFloat(a.toFixed(2));
18
+ }, m = (e) => e.map((e) => e.alternateResponses).filter((e) => e), h = (e, t, n) => {
19
+ if (!t || Object.keys(t).length === 0) return 0;
20
+ let { categories: r, choices: i } = e || {}, { correctResponse: o } = e || {}, { answers: s } = t || {};
21
+ s ||= [], o ||= [];
22
+ let { categories: c, correct: l } = a(r, i, s, o), u = m(o);
23
+ return d.enabled(e, n) && !u.length ? p(o, c) : +!!l;
24
+ }, g = (e, t, n) => new Promise((r) => {
25
+ if (n.mode === "evaluate") {
26
+ let i = h(e, t, n);
27
+ r(i === 1 ? "correct" : i === 0 ? "incorrect" : "partially-correct");
28
+ } else r(void 0);
29
+ }), _ = (e = {}) => new Promise((t) => {
30
+ t({
31
+ ...i,
32
+ ...e
33
+ });
34
+ }), v = (e) => ({
35
+ ...i,
36
+ ...e
37
+ }), y = async (e, n, r, i) => {
38
+ let a = v(e), o = await g(a, n, r), { mode: s, role: d } = r || {}, { categories: p, categoriesPerRow: h, choicesLabel: _, choicesPosition: y, correctResponse: b, feedback: x, feedbackEnabled: S, promptEnabled: C, prompt: w, rowLabels: T, rationaleEnabled: E, rationale: D, teacherInstructionsEnabled: O, teacherInstructions: k, language: A, maxChoicesPerCategory: j, extraCSSRules: M, minRowHeight: N, fontSizeFactor: P, autoplayAudioEnabled: F, completeAudioEnabled: I, customAudioButton: L } = a, { choices: R, note: z } = a, B, V = u(a, n, r), H = b.map((e) => {
39
+ let t = (e.choices || []).filter((e) => e !== "null");
40
+ return {
41
+ ...e,
42
+ choices: t
43
+ };
44
+ });
45
+ s === "evaluate" && S && (B = await c(o, x)), V || (R = await l(R, n, i, "id")), z ||= f.t("common:commonCorrectAnswerWithAlternates", { lng: A });
46
+ let U = m(H), { responseAreasToBeFilled: W, possibleResponses: G, hasUnplacedChoices: K } = t(H, a.allowAlternateEnabled ? U : [], a.choices), q = {
47
+ categories: p || [],
48
+ categoriesPerRow: h || 2,
49
+ maxChoicesPerCategory: j,
50
+ correctness: o,
51
+ choices: R || [],
52
+ choicesLabel: _ || "",
53
+ choicesPosition: y,
54
+ disabled: s !== "gather",
55
+ feedback: B,
56
+ lockChoiceOrder: V,
57
+ prompt: C ? w : null,
58
+ rowLabels: T,
59
+ note: z,
60
+ env: r,
61
+ showNote: U && U.length > 0,
62
+ correctResponse: s === "evaluate" ? H : void 0,
63
+ language: A,
64
+ extraCSSRules: M,
65
+ fontSizeFactor: P,
66
+ minRowHeight: N,
67
+ autoplayAudioEnabled: F,
68
+ completeAudioEnabled: I,
69
+ customAudioButton: L,
70
+ possibleResponses: G,
71
+ responseAreasToBeFilled: W,
72
+ hasUnplacedChoices: K
73
+ };
74
+ return d === "instructor" && (s === "view" || s === "evaluate") ? (q.rationale = E ? D : null, q.teacherInstructions = O ? k : null) : (q.rationale = null, q.teacherInstructions = null), q;
75
+ }, b = (e, t, n) => {
76
+ let r = [], { answers: i } = t || {}, { categories: o, choices: s, correctResponse: c } = e || {}, l = i.reduce((e, t) => e + (t.choices?.length || 0), 0), u = m(c).length > 0, f = d.enabled(e, n), p = (l > 0 ? a(o, s, i, c) : null)?.categories || [];
77
+ if (l > 0 ? (r.push(`Student placed ${l} choice(s) into categories.`), (o || []).forEach((e, t) => {
78
+ let n = e.id, i = p.find((e) => e.id === n), a = i && i.choices || [], o = (c || []).find((e) => e.category === n), s = o && o.choices || [];
79
+ if (s.length > 0) if (a.length === 0) r.push(`Category ${n}: student left empty (should contain ${s.length} choice(s)).`);
80
+ else {
81
+ let e = a.filter((e) => e.correct).length, t = a.length - e;
82
+ e > 0 && t === 0 ? r.push(`Category ${n}: student placed ${e} correct choice(s).`) : e === 0 && t > 0 ? r.push(`Category ${n}: student placed ${t} incorrect choice(s).`) : r.push(`Category ${n}: student placed ${e} correct and ${t} incorrect choice(s).`);
83
+ }
84
+ })) : r.push("Student did not place any choices into categories."), u && r.push("Alternate response combinations are accepted for this question."), u) r.push("Score calculated using all-or-nothing scoring (alternate responses disable partial scoring)."), r.push("Student must get all categories completely correct to receive full credit.");
85
+ else if (f) {
86
+ if (r.push("Score calculated using partial scoring."), r.push("Student receives credit for each correct placement, with deductions for incorrect placements beyond required amount."), l > 0) {
87
+ let e = p.reduce((e, t) => e + (t.choices || []).filter((e) => e.correct).length, 0), t = l - e, n = (c || []).reduce((e, t) => e + (t.choices || []).length, 0);
88
+ if (r.push(`Partial scoring calculation: ${e} correct placements, ${t} incorrect placements.`), l > n) {
89
+ let e = l - n;
90
+ r.push(`${e} extra placement(s) beyond required amount will be deducted from score.`);
91
+ }
92
+ }
93
+ } else r.push("Score calculated using all-or-nothing scoring."), r.push("Student must get all categories completely correct to receive full credit.");
94
+ let g = h(e, t, n);
95
+ return r.push(`Final score: ${g}.`), r;
96
+ }, x = (t, n, r) => r.mode === "evaluate" ? new Promise((i) => {
97
+ if (!n || e(n)) i({
98
+ score: 0,
99
+ empty: !0,
100
+ traceLog: ["Student did not place any choices into categories. Score is 0."]
101
+ });
102
+ else {
103
+ let e = b(t, n, r);
104
+ i({
105
+ score: h(t, n, r),
106
+ empty: !1,
107
+ traceLog: e
108
+ });
109
+ }
110
+ }) : Promise.reject(/* @__PURE__ */ Error("Can not call outcome when mode is not evaluate")), S = (e, t) => new Promise((n) => {
111
+ let { mode: r, role: i } = t || {};
112
+ if (r !== "evaluate" && i === "instructor") {
113
+ let { correctResponse: t } = e;
114
+ n({
115
+ answers: t,
116
+ id: 1
117
+ });
118
+ } else return n(null);
119
+ }), C = (e) => (e || "").replaceAll(/<[^>]*>/g, ""), w = (e) => (e || "").replace(/(<(?!img|iframe|source)([^>]+)>)/gi, ""), T = (t = {}, i = {}) => {
120
+ let { categories: a, choices: o, correctResponse: s, maxAnswerChoices: c } = t, { minChoices: l = 1, minCategories: u = 1, maxCategories: d = 12, maxLengthPerChoice: f = 300, maxLengthPerCategory: p = 150 } = i, m = [...o || []].reverse(), h = {}, g = {}, _ = {};
121
+ [
122
+ "teacherInstructions",
123
+ "prompt",
124
+ "rationale"
125
+ ].forEach((e) => {
126
+ i[e]?.required && !w(t[e]) && (h[e] = "This field is required.");
127
+ }), (a || []).forEach((e) => {
128
+ let { id: t, label: n } = e;
129
+ C(n).length > p && (_[t] = `Category labels should be no more than ${p} characters long.`);
130
+ }), (m || []).forEach((e, t) => {
131
+ let { id: n, content: r } = e;
132
+ C(r).length > f && (g[n] = `Tokens should be no more than ${f} characters long.`), w(r) ? m.slice(t + 1).some((e) => e.content === r) && (g[n] = "Tokens content should be unique.") : g[n] = "Tokens should not be empty.";
133
+ });
134
+ let v = (a || []).length, y = (o || []).length;
135
+ if (v > d ? h.categoriesError = `No more than ${d} categories should be defined.` : v < u && (h.categoriesError = `There should be at least ${u} category defined.`), y < l ? h.choicesError = `There should be at least ${l} choices defined.` : y > c && (h.choicesError = `No more than ${c} choices should be defined.`), y && v) {
136
+ let e = !1;
137
+ (s || []).forEach((t) => {
138
+ let { choices: n = [], alternateResponses: r = [] } = t;
139
+ n.length ? e = !0 : r.forEach((t) => {
140
+ (t || []).length && (e = !0);
141
+ });
142
+ });
143
+ let t = -1, i = "";
144
+ (s || []).forEach((e) => {
145
+ let { choices: a = [], alternateResponses: o = [], category: s } = e;
146
+ t === -1 && (t = r(a, o), t === -1 && (t = n(o)), i = s);
147
+ }), t > -1 && (h.duplicateAlternate = {
148
+ index: t,
149
+ category: i
150
+ }), e || (h.associationError = "At least one token should be assigned to at least one category.");
151
+ }
152
+ return e(g) || (h.choicesErrors = g), e(_) || (h.categoriesErrors = _), h;
153
+ };
154
+ //#endregion
155
+ export { S as createCorrectResponseSession, _ as createDefaultModel, g as getCorrectness, b as getLogTrace, p as getPartialScore, h as getTotalScore, y as model, v as normalize, x as outcome, o as score, T as validate };
@@ -0,0 +1,20 @@
1
+ /**
2
+ * @synced-from pie-elements/packages/categorize/controller/src/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 multiplePlacements: {
10
+ enabled: string;
11
+ disabled: string;
12
+ perChoice: string;
13
+ };
14
+ export declare const isCorrectResponseDuplicated: (choices: any, alternate: any) => any;
15
+ export declare const isAlternateDuplicated: (alternate: any) => number;
16
+ export declare const getCompleteResponseDetails: (correctResponse: any, alternates: any, allChoices: any) => {
17
+ responseAreasToBeFilled: any;
18
+ possibleResponses: any[];
19
+ hasUnplacedChoices: boolean;
20
+ };
@@ -0,0 +1,35 @@
1
+ //#region src/controller/utils.ts
2
+ var e = {
3
+ enabled: "Yes",
4
+ disabled: "No",
5
+ perChoice: "Set Per Choice"
6
+ }, t = (e, t) => {
7
+ if (e.length < 1 || t.length < 1) return -1;
8
+ let n = JSON.stringify(e.sort());
9
+ return t.reduce((e, t) => t.length > 0 ? [...e, JSON.stringify(t.sort())] : e, []).findIndex((e) => e.length && e === n);
10
+ }, n = (e) => {
11
+ if (e.length <= 1) return -1;
12
+ let t = /* @__PURE__ */ new Set(), n = e.reduce((e, t) => t.length > 0 ? [...e, JSON.stringify(t.sort())] : e, []);
13
+ for (let e = 0; e < n.length; e++) {
14
+ if (t.has(n[e]) && n[e]) return e;
15
+ t.add(n[e]);
16
+ }
17
+ return -1;
18
+ }, r = (e, t, n) => {
19
+ let r = e.map((e) => e.choices), i = [r.flat()], a = r.filter((e) => e.length).length;
20
+ if (t.length) {
21
+ let e = t[0]?.length || 0;
22
+ [...Array(e).keys()].forEach((e) => {
23
+ let n = t.map((t) => t[e]), r = n.filter((e) => e?.length).length;
24
+ i.push(n.flat()), r < a && (a = r);
25
+ });
26
+ }
27
+ let o = i.some((e) => !n.every((t) => e.includes(t?.id)));
28
+ return {
29
+ responseAreasToBeFilled: a,
30
+ possibleResponses: i,
31
+ hasUnplacedChoices: o
32
+ };
33
+ };
34
+ //#endregion
35
+ export { r as getCompleteResponseDetails, n as isAlternateDuplicated, t as isCorrectResponseDuplicated, e as multiplePlacements };
@@ -0,0 +1,34 @@
1
+ /**
2
+ * @synced-from pie-elements/packages/categorize/src/categorize/categories.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
+ import { CategoryType } from './category.js';
12
+ export { CategoryType };
13
+ export declare class Categories extends React.Component {
14
+ static propTypes: {
15
+ categories: PropTypes.Requireable<(PropTypes.InferProps<{
16
+ id: PropTypes.Validator<string>;
17
+ categoryId: PropTypes.Requireable<string>;
18
+ }> | null | undefined)[]>;
19
+ model: PropTypes.Requireable<PropTypes.InferProps<{
20
+ categoriesPerRow: PropTypes.Requireable<number>;
21
+ }>>;
22
+ disabled: PropTypes.Requireable<boolean>;
23
+ onDropChoice: PropTypes.Validator<(...args: any[]) => any>;
24
+ onRemoveChoice: PropTypes.Validator<(...args: any[]) => any>;
25
+ rowLabels: PropTypes.Requireable<any[]>;
26
+ };
27
+ static defaultProps: {
28
+ model: {
29
+ categoriesPerRow: number;
30
+ };
31
+ };
32
+ render(): React.JSX.Element;
33
+ }
34
+ export default Categories;
@@ -0,0 +1,66 @@
1
+ import e from "./grid-content.js";
2
+ import t, { CategoryType as n } from "./category.js";
3
+ import r from "react";
4
+ import { color as i } from "@pie-lib/render-ui";
5
+ import a from "prop-types";
6
+ import { styled as o } from "@mui/material/styles";
7
+ import { jsx as s, jsxs as c } from "react/jsx-runtime";
8
+ //#region src/delivery/categorize/categories.tsx
9
+ var l = class extends r.Component {
10
+ static propTypes = {
11
+ categories: a.arrayOf(a.shape(n)),
12
+ model: a.shape({ categoriesPerRow: a.number }),
13
+ disabled: a.bool,
14
+ onDropChoice: a.func.isRequired,
15
+ onRemoveChoice: a.func.isRequired,
16
+ rowLabels: a.array
17
+ };
18
+ static defaultProps = { model: { categoriesPerRow: 1 } };
19
+ render() {
20
+ let { categories: n, model: r, disabled: i, onDropChoice: a, onRemoveChoice: o, rowLabels: l } = this.props, { categoriesPerRow: p, minRowHeight: m } = r, h = [], g = n || [];
21
+ for (let e = 0; e < g.length; e += p) h.push(g.slice(e, e + p));
22
+ let _ = (e) => {
23
+ let t = !1;
24
+ return (e || []).forEach((e) => {
25
+ typeof e == "string" && e.trim() !== "" && e.trim() !== "<div></div>" && (t = !0);
26
+ }), t;
27
+ };
28
+ return /* @__PURE__ */ s(e, {
29
+ columns: p,
30
+ rows: Math.ceil(n.length / p) * 2,
31
+ extraStyle: { flex: 1 },
32
+ children: h.map((e, n) => {
33
+ let r = [];
34
+ return e.forEach((e, p) => {
35
+ r.push(/* @__PURE__ */ c("div", {
36
+ style: { display: "flex" },
37
+ children: [p === 0 && _(l) ? /* @__PURE__ */ s(d, { dangerouslySetInnerHTML: { __html: l[n] || "" } }, n) : null, /* @__PURE__ */ c(f, { children: [/* @__PURE__ */ s(u, { dangerouslySetInnerHTML: { __html: e.label } }, `category-label-${n}-${p}`), /* @__PURE__ */ s(t, {
38
+ minRowHeight: m,
39
+ onDropChoice: (t) => a(e.id, t),
40
+ onRemoveChoice: o,
41
+ disabled: i,
42
+ ...e
43
+ }, `category-element-${n}-${p}`)] })]
44
+ }));
45
+ }), r = r.concat(Array(p - e.length).fill(/* @__PURE__ */ s("div", {})).map((e, t) => /* @__PURE__ */ s("div", {}, `fill-space-final-${t}`))), r;
46
+ })
47
+ });
48
+ }
49
+ }, u = o("div")(({ theme: e }) => ({
50
+ color: i.text(),
51
+ backgroundColor: i.background(),
52
+ textAlign: "center",
53
+ paddingTop: e.spacing(1)
54
+ })), d = o("div")({
55
+ alignItems: "center",
56
+ display: "flex",
57
+ justifyContent: "center",
58
+ flex: .5,
59
+ marginRight: "12px"
60
+ }), f = o("div")({
61
+ display: "flex",
62
+ flex: "2",
63
+ flexDirection: "column"
64
+ });
65
+ //#endregion
66
+ export { l as default };
@@ -0,0 +1,28 @@
1
+ /**
2
+ * @synced-from pie-elements/packages/categorize/src/categorize/category.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 const CategoryType: {
12
+ id: PropTypes.Validator<string>;
13
+ categoryId: PropTypes.Requireable<string>;
14
+ };
15
+ export declare class Category extends React.Component {
16
+ static propTypes: {
17
+ className: PropTypes.Requireable<string>;
18
+ disabled: PropTypes.Requireable<boolean>;
19
+ onDropChoice: PropTypes.Requireable<(...args: any[]) => any>;
20
+ onRemoveChoice: PropTypes.Requireable<(...args: any[]) => any>;
21
+ minRowHeight: PropTypes.Requireable<string>;
22
+ id: PropTypes.Validator<string>;
23
+ categoryId: PropTypes.Requireable<string>;
24
+ };
25
+ static defaultProps: {};
26
+ render(): React.JSX.Element;
27
+ }
28
+ export default Category;
@@ -0,0 +1,48 @@
1
+ import e from "./choice.js";
2
+ import t from "./droppable-placeholder.js";
3
+ import n from "react";
4
+ import r from "prop-types";
5
+ import { styled as i } from "@mui/material/styles";
6
+ import { jsx as a } from "react/jsx-runtime";
7
+ //#region src/delivery/categorize/category.tsx
8
+ var o = {
9
+ id: r.string.isRequired,
10
+ categoryId: r.string
11
+ }, s = class extends n.Component {
12
+ static propTypes = {
13
+ ...o,
14
+ className: r.string,
15
+ disabled: r.bool,
16
+ onDropChoice: r.func,
17
+ onRemoveChoice: r.func,
18
+ minRowHeight: r.string
19
+ };
20
+ static defaultProps = {};
21
+ render() {
22
+ let { className: n, choices: r = [], disabled: i, onDropChoice: o, onRemoveChoice: s, id: l, correct: u, minRowHeight: d } = this.props;
23
+ return /* @__PURE__ */ a(c, {
24
+ className: n,
25
+ id: l,
26
+ children: /* @__PURE__ */ a(t, {
27
+ id: l,
28
+ onDropChoice: o,
29
+ disabled: i,
30
+ correct: u,
31
+ minRowHeight: d,
32
+ children: r.map((t, n) => /* @__PURE__ */ a(e, {
33
+ onRemoveChoice: s,
34
+ disabled: i,
35
+ choiceIndex: n,
36
+ categoryId: l,
37
+ ...t
38
+ }, n))
39
+ })
40
+ });
41
+ }
42
+ }, c = i("div")(({ theme: e }) => ({
43
+ display: "flex",
44
+ flexDirection: "column",
45
+ flex: 2
46
+ }));
47
+ //#endregion
48
+ export { o as CategoryType, s as default };
@@ -0,0 +1,27 @@
1
+ /**
2
+ * @synced-from pie-elements/packages/categorize/src/categorize/choice.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 const ChoiceType: {
12
+ content: PropTypes.Validator<string>;
13
+ id: PropTypes.Requireable<string>;
14
+ };
15
+ export declare class Layout extends React.Component {
16
+ static propTypes: {
17
+ disabled: PropTypes.Requireable<boolean>;
18
+ correct: PropTypes.Requireable<boolean>;
19
+ isDragging: PropTypes.Requireable<boolean>;
20
+ content: PropTypes.Validator<string>;
21
+ id: PropTypes.Requireable<string>;
22
+ };
23
+ static defaultProps: {};
24
+ render(): React.JSX.Element;
25
+ }
26
+ declare const _default: (props: any) => React.JSX.Element;
27
+ export default _default;