@pie-element/match 12.1.1-next.1 → 12.1.1-next.11

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 (213) hide show
  1. package/CHANGELOG.json +1462 -0
  2. package/CHANGELOG.md +2327 -0
  3. package/LICENSE.md +5 -0
  4. package/README.md +1 -0
  5. package/configure/CHANGELOG.json +892 -0
  6. package/configure/CHANGELOG.md +2030 -0
  7. package/configure/lib/add-row.js +40 -0
  8. package/configure/lib/add-row.js.map +1 -0
  9. package/configure/lib/answer-config-block.js +288 -0
  10. package/configure/lib/answer-config-block.js.map +1 -0
  11. package/configure/lib/common.js +31 -0
  12. package/configure/lib/common.js.map +1 -0
  13. package/configure/lib/configure.js +410 -0
  14. package/configure/lib/configure.js.map +1 -0
  15. package/configure/lib/defaults.js +201 -0
  16. package/configure/lib/defaults.js.map +1 -0
  17. package/configure/lib/general-config-block.js +144 -0
  18. package/configure/lib/general-config-block.js.map +1 -0
  19. package/configure/lib/index.js +152 -0
  20. package/configure/lib/index.js.map +1 -0
  21. package/configure/lib/row.js +321 -0
  22. package/configure/lib/row.js.map +1 -0
  23. package/configure/lib/utils.js +12 -0
  24. package/configure/lib/utils.js.map +1 -0
  25. package/configure/package.json +29 -0
  26. package/configure/utils.js +19 -0
  27. package/controller/CHANGELOG.json +502 -0
  28. package/controller/CHANGELOG.md +1359 -0
  29. package/controller/lib/defaults.js +25 -0
  30. package/controller/lib/defaults.js.map +1 -0
  31. package/controller/lib/index.js +424 -0
  32. package/controller/lib/index.js.map +1 -0
  33. package/controller/package.json +24 -0
  34. package/docs/config-schema.json +2929 -0
  35. package/docs/config-schema.json.md +2162 -0
  36. package/docs/demo/config.js +8 -0
  37. package/docs/demo/generate.js +49 -0
  38. package/docs/demo/index.html +1 -0
  39. package/docs/demo/session.js +11 -0
  40. package/docs/pie-schema.json +1530 -0
  41. package/docs/pie-schema.json.md +907 -0
  42. package/lib/answer-grid.js +166 -0
  43. package/lib/answer-grid.js.map +1 -0
  44. package/lib/index.js +85 -0
  45. package/lib/index.js.map +1 -0
  46. package/lib/main.js +163 -0
  47. package/lib/main.js.map +1 -0
  48. package/package.json +21 -60
  49. package/dist/author/add-row.d.ts +0 -17
  50. package/dist/author/add-row.js +0 -24
  51. package/dist/author/answer-config-block.d.ts +0 -36
  52. package/dist/author/answer-config-block.js +0 -176
  53. package/dist/author/common.d.ts +0 -22
  54. package/dist/author/configure.d.ts +0 -48
  55. package/dist/author/configure.js +0 -259
  56. package/dist/author/defaults.d.ts +0 -203
  57. package/dist/author/defaults.js +0 -151
  58. package/dist/author/general-config-block.d.ts +0 -22
  59. package/dist/author/general-config-block.js +0 -93
  60. package/dist/author/index.d.ts +0 -44
  61. package/dist/author/index.js +0 -78
  62. package/dist/author/row.d.ts +0 -51
  63. package/dist/author/row.js +0 -204
  64. package/dist/author/utils.d.ts +0 -10
  65. package/dist/author/utils.js +0 -10
  66. package/dist/controller/defaults.d.ts +0 -27
  67. package/dist/controller/defaults.js +0 -25
  68. package/dist/controller/index.d.ts +0 -29
  69. package/dist/controller/index.js +0 -156
  70. package/dist/delivery/answer-grid.d.ts +0 -28
  71. package/dist/delivery/answer-grid.js +0 -99
  72. package/dist/delivery/index.d.ts +0 -21
  73. package/dist/delivery/index.js +0 -51
  74. package/dist/delivery/main.d.ts +0 -26
  75. package/dist/delivery/main.js +0 -112
  76. package/dist/index.d.ts +0 -1
  77. package/dist/index.iife.d.ts +0 -8
  78. package/dist/index.iife.js +0 -148
  79. package/dist/index.js +0 -2
  80. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_DataView.js +0 -6
  81. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Hash.js +0 -16
  82. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_ListCache.js +0 -16
  83. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Map.js +0 -6
  84. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_MapCache.js +0 -16
  85. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Promise.js +0 -6
  86. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Set.js +0 -6
  87. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_SetCache.js +0 -11
  88. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Stack.js +0 -14
  89. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Symbol.js +0 -5
  90. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Uint8Array.js +0 -5
  91. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_WeakMap.js +0 -6
  92. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayEach.js +0 -7
  93. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayFilter.js +0 -10
  94. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayLikeKeys.js +0 -15
  95. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayMap.js +0 -7
  96. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayPush.js +0 -7
  97. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arraySome.js +0 -7
  98. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assignValue.js +0 -10
  99. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assocIndexOf.js +0 -8
  100. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssign.js +0 -8
  101. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignIn.js +0 -8
  102. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignValue.js +0 -12
  103. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseClone.js +0 -57
  104. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseCreate.js +0 -14
  105. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetAllKeys.js +0 -9
  106. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetTag.js +0 -10
  107. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsArguments.js +0 -9
  108. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqual.js +0 -8
  109. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqualDeep.js +0 -30
  110. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsMap.js +0 -9
  111. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNative.js +0 -11
  112. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsSet.js +0 -9
  113. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsTypedArray.js +0 -11
  114. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeys.js +0 -12
  115. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeysIn.js +0 -13
  116. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseSet.js +0 -22
  117. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTimes.js +0 -7
  118. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseToString.js +0 -15
  119. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseUnary.js +0 -8
  120. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cacheHas.js +0 -6
  121. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_castPath.js +0 -10
  122. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneArrayBuffer.js +0 -8
  123. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneBuffer.js +0 -10
  124. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneDataView.js +0 -8
  125. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneRegExp.js +0 -8
  126. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneSymbol.js +0 -8
  127. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneTypedArray.js +0 -8
  128. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyArray.js +0 -8
  129. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyObject.js +0 -14
  130. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbols.js +0 -8
  131. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbolsIn.js +0 -8
  132. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_coreJsData.js +0 -5
  133. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_defineProperty.js +0 -10
  134. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalArrays.js +0 -35
  135. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalByTag.js +0 -35
  136. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalObjects.js +0 -32
  137. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_freeGlobal.js +0 -4
  138. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeys.js +0 -9
  139. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeysIn.js +0 -9
  140. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getMapData.js +0 -8
  141. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getNative.js +0 -9
  142. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getPrototype.js +0 -5
  143. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getRawTag.js +0 -14
  144. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbols.js +0 -10
  145. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbolsIn.js +0 -11
  146. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getTag.js +0 -23
  147. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getValue.js +0 -6
  148. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashClear.js +0 -7
  149. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashDelete.js +0 -7
  150. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashGet.js +0 -13
  151. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashHas.js +0 -9
  152. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashSet.js +0 -9
  153. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneArray.js +0 -8
  154. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneByTag.js +0 -33
  155. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneObject.js +0 -9
  156. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIndex.js +0 -8
  157. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKey.js +0 -11
  158. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKeyable.js +0 -7
  159. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isMasked.js +0 -11
  160. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isPrototype.js +0 -8
  161. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheClear.js +0 -6
  162. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheDelete.js +0 -9
  163. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheGet.js +0 -8
  164. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheHas.js +0 -7
  165. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheSet.js +0 -8
  166. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheClear.js +0 -13
  167. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheDelete.js +0 -8
  168. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheGet.js +0 -7
  169. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheHas.js +0 -7
  170. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheSet.js +0 -8
  171. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapToArray.js +0 -9
  172. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_memoizeCapped.js +0 -11
  173. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeCreate.js +0 -5
  174. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeys.js +0 -5
  175. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeysIn.js +0 -8
  176. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nodeUtil.js +0 -9
  177. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_objectToString.js +0 -7
  178. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overArg.js +0 -8
  179. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_root.js +0 -5
  180. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheAdd.js +0 -7
  181. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheHas.js +0 -6
  182. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setToArray.js +0 -9
  183. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackClear.js +0 -7
  184. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackDelete.js +0 -7
  185. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackGet.js +0 -6
  186. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackHas.js +0 -6
  187. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackSet.js +0 -16
  188. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stringToPath.js +0 -10
  189. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toKey.js +0 -10
  190. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toSource.js +0 -15
  191. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/cloneDeep.js +0 -8
  192. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/eq.js +0 -6
  193. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArguments.js +0 -10
  194. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArray.js +0 -4
  195. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLike.js +0 -8
  196. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isBuffer.js +0 -6
  197. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.js +0 -21
  198. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEqual.js +0 -7
  199. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isFunction.js +0 -11
  200. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isLength.js +0 -7
  201. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isMap.js +0 -7
  202. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObject.js +0 -7
  203. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObjectLike.js +0 -6
  204. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSet.js +0 -7
  205. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSymbol.js +0 -9
  206. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isTypedArray.js +0 -7
  207. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keys.js +0 -9
  208. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keysIn.js +0 -9
  209. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/memoize.js +0 -16
  210. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/set.js +0 -7
  211. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubArray.js +0 -6
  212. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubFalse.js +0 -6
  213. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toString.js +0 -7
@@ -1,36 +0,0 @@
1
- /**
2
- * @synced-from pie-elements/packages/match/configure/src/answer-config-block.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 * as React from 'react';
10
- import PropTypes from 'prop-types';
11
- declare class AnswerConfigBlock extends React.Component {
12
- static propTypes: {
13
- model: PropTypes.Validator<object>;
14
- configuration: PropTypes.Validator<object>;
15
- onChange: PropTypes.Validator<(...args: any[]) => any>;
16
- onDeleteRow: PropTypes.Validator<(...args: any[]) => any>;
17
- onAddRow: PropTypes.Validator<(...args: any[]) => any>;
18
- imageSupport: PropTypes.Requireable<PropTypes.InferProps<{
19
- add: PropTypes.Validator<(...args: any[]) => any>;
20
- delete: PropTypes.Validator<(...args: any[]) => any>;
21
- }>>;
22
- uploadSoundSupport: PropTypes.Requireable<PropTypes.InferProps<{
23
- add: PropTypes.Validator<(...args: any[]) => any>;
24
- delete: PropTypes.Validator<(...args: any[]) => any>;
25
- }>>;
26
- toolbarOpts: PropTypes.Requireable<object>;
27
- spellCheck: PropTypes.Requireable<boolean>;
28
- };
29
- moveRow: any;
30
- onChange: (name: any, isBoolean: any) => ({ target }: {
31
- target: any;
32
- }) => void;
33
- onHeaderChange: (headerIndex: any) => (value: any) => void;
34
- render(): React.JSX.Element;
35
- }
36
- export default AnswerConfigBlock;
@@ -1,176 +0,0 @@
1
- import e from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/set.js";
2
- import { getPluginProps as t } from "./utils.js";
3
- import n from "./add-row.js";
4
- import r from "./row.js";
5
- import * as i from "react";
6
- import a from "prop-types";
7
- import { jsx as o, jsxs as s } from "react/jsx-runtime";
8
- import c from "@mui/material/Typography";
9
- import { styled as l } from "@mui/material/styles";
10
- import u from "debug";
11
- import d, { DEFAULT_PLUGINS as f } from "@pie-lib/editable-html-tip-tap";
12
- import p from "classnames";
13
- import { DragProvider as m } from "@pie-lib/drag";
14
- //#region src/author/answer-config-block.tsx
15
- var h = u("pie-elements:match:configure"), g = l("div")(({ theme: e }) => ({
16
- marginBottom: e.spacing(2.5),
17
- display: "flex",
18
- flexDirection: "column"
19
- })), _ = l("div")(({ theme: e }) => ({
20
- display: "flex",
21
- alignItems: "center",
22
- flex: 1,
23
- width: "100%",
24
- borderBottom: `2px solid ${e.palette.grey.A100}`,
25
- paddingBottom: e.spacing(2),
26
- marginTop: e.spacing(2),
27
- marginBottom: e.spacing(1)
28
- })), v = l("div")(({ theme: e }) => ({
29
- flex: 1,
30
- display: "flex",
31
- justifyContent: "center",
32
- alignItems: "center",
33
- flexDirection: "column",
34
- "&> div": {
35
- width: "120px",
36
- padding: `0 ${e.spacing(1)}`,
37
- textAlign: "center"
38
- }
39
- })), y = l("div")(({ theme: e }) => ({
40
- flex: .5,
41
- minWidth: "45px",
42
- padding: `0 ${e.spacing(1)}`
43
- })), b = l("div")({
44
- display: "flex",
45
- flexDirection: "column"
46
- }), x = l("div")(({ theme: e }) => ({
47
- fontSize: e.typography.fontSize - 2,
48
- color: e.palette.error.main,
49
- paddingTop: `${e.spacing(1)} !important`,
50
- width: "fit-content !important"
51
- })), S = l("div")(({ theme: e }) => ({
52
- fontSize: e.typography.fontSize - 2,
53
- color: e.palette.error.main,
54
- paddingBottom: e.spacing(1)
55
- })), C = l("div")(({ theme: e }) => ({
56
- "& .marginBottom": { marginBottom: e.typography.fontSize - 2 + e.spacing(1) },
57
- "& .headerInput": { "& > div": { fontWeight: "bold" } }
58
- })), w = class extends i.Component {
59
- static propTypes = {
60
- model: a.object.isRequired,
61
- configuration: a.object.isRequired,
62
- onChange: a.func.isRequired,
63
- onDeleteRow: a.func.isRequired,
64
- onAddRow: a.func.isRequired,
65
- imageSupport: a.shape({
66
- add: a.func.isRequired,
67
- delete: a.func.isRequired
68
- }),
69
- uploadSoundSupport: a.shape({
70
- add: a.func.isRequired,
71
- delete: a.func.isRequired
72
- }),
73
- toolbarOpts: a.object,
74
- spellCheck: a.bool
75
- };
76
- moveRow = (e) => {
77
- let { active: t, over: n } = e;
78
- if (!n || !t) return;
79
- let r = t.data.current, i = n.data.current;
80
- if (r?.type === "row" && i?.type === "row") {
81
- let e = r.index, t = i.index, { model: n, onChange: a } = this.props, o = { ...n }, s = o.rows || [];
82
- h("[moveRow]: ", e, t);
83
- let { movedRow: c, remainingRows: l } = s.reduce((t, n, r) => (r === e ? t.movedRow = n : t.remainingRows.push(n), t), {
84
- movedRow: null,
85
- remainingRows: []
86
- }), u = [
87
- ...l.slice(0, t),
88
- c,
89
- ...l.slice(t)
90
- ];
91
- h("update: ", u), o.rows = u, a(o);
92
- }
93
- };
94
- onChange = (t, n) => ({ target: r }) => {
95
- let { model: i, onChange: a } = this.props, o;
96
- o = n ? r.checked : r.value, e(i, t, o), a(i, t);
97
- };
98
- onHeaderChange = (e) => (t) => {
99
- let { model: n, onChange: r } = this.props, i = { ...n };
100
- if (e === 0) {
101
- i.headers[e] = t, r(i);
102
- return;
103
- }
104
- i.headers[e] = t, r(i);
105
- };
106
- render() {
107
- let { model: e, onAddRow: i, imageSupport: a, configuration: l, toolbarOpts: u, spellCheck: h, uploadSoundSupport: w } = this.props, { baseInputConfiguration: T = {}, headers: E = {}, rows: D = {}, maxImageWidth: O = {}, maxImageHeight: k = {}, mathMlOptions: A = {}, minQuestions: j } = l || {}, { errors: M } = e || {}, { correctResponseError: N, rowsErrors: P, columnsErrors: F, noOfRowsError: I, columnsLengthError: L } = M || {}, R = (f || []).filter((e) => e !== "table" && e !== "bulleted-list" && e !== "numbered-list"), z = O && O.prompt, B = k && k.prompt;
108
- return /* @__PURE__ */ o(C, { children: /* @__PURE__ */ o(m, {
109
- onDragEnd: this.moveRow,
110
- children: /* @__PURE__ */ s(g, { children: [/* @__PURE__ */ o(c, {
111
- type: "body1",
112
- component: "div",
113
- children: "Click on the labels to edit or remove. Set the correct answers by clicking each correct answer per row."
114
- }), /* @__PURE__ */ s(b, {
115
- style: l.width ? {
116
- width: l.width,
117
- overflow: "scroll"
118
- } : {},
119
- children: [
120
- /* @__PURE__ */ s(_, { children: [E.settings && (e.headers || []).map((e, n) => /* @__PURE__ */ s(v, {
121
- className: p({ questionText: n === 0 }),
122
- sx: n === 0 ? {
123
- flex: 2,
124
- display: "flex",
125
- justifyContent: "flex-start",
126
- marginRight: 1,
127
- "&> div": {
128
- width: "100%",
129
- padding: 0,
130
- maxWidth: "unset",
131
- textAlign: "left",
132
- minWidth: "200px"
133
- }
134
- } : {},
135
- children: [/* @__PURE__ */ o(d, {
136
- onChange: this.onHeaderChange(n),
137
- markup: e,
138
- className: F && !F[n] ? "marginBottom" : "headerInput",
139
- label: "column label",
140
- activePlugins: R,
141
- pluginProps: t(E?.inputConfiguration, T),
142
- autoWidthToolbar: !0,
143
- spellCheck: h,
144
- uploadSoundSupport: w,
145
- languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
146
- error: F && F[n]
147
- }), F && F[n] && /* @__PURE__ */ o(x, { children: F[n] })]
148
- }, n)), /* @__PURE__ */ o(y, {})] }),
149
- e.rows.map((n, i) => /* @__PURE__ */ o(r, {
150
- model: e,
151
- row: n,
152
- idx: i,
153
- onDeleteRow: this.props.onDeleteRow,
154
- onChange: this.props.onChange,
155
- imageSupport: a,
156
- toolbarOpts: u,
157
- spellCheck: h,
158
- error: P?.[n.id],
159
- maxImageWidth: O && O.rowTitles || z,
160
- maxImageHeight: k && k.rowTitles || B,
161
- uploadSoundSupport: w,
162
- mathMlOptions: A,
163
- minQuestions: j,
164
- inputConfiguration: t(D?.inputConfiguration, T)
165
- }, i)),
166
- N && /* @__PURE__ */ o(S, { children: N }),
167
- I && /* @__PURE__ */ o(S, { children: I }),
168
- L && /* @__PURE__ */ o(S, { children: L }),
169
- /* @__PURE__ */ o(n, { onAddClick: i })
170
- ]
171
- })] })
172
- }) });
173
- }
174
- };
175
- //#endregion
176
- export { w as default };
@@ -1,22 +0,0 @@
1
- /**
2
- * @synced-from pie-elements/packages/match/configure/src/common.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 * as React from 'react';
10
- import PropTypes from 'prop-types';
11
- export declare const InfoDialog: {
12
- ({ title, open, onOk }: {
13
- title: any;
14
- open: any;
15
- onOk: any;
16
- }): React.JSX.Element;
17
- propTypes: {
18
- title: PropTypes.Requireable<string>;
19
- open: PropTypes.Requireable<boolean>;
20
- onOk: PropTypes.Requireable<(...args: any[]) => any>;
21
- };
22
- };
@@ -1,48 +0,0 @@
1
- /**
2
- * @synced-from pie-elements/packages/match/configure/src/configure.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
- declare class Configure extends React.Component {
12
- static propTypes: {
13
- onModelChanged: PropTypes.Requireable<(...args: any[]) => any>;
14
- onConfigurationChanged: PropTypes.Requireable<(...args: any[]) => any>;
15
- model: PropTypes.Validator<object>;
16
- configuration: PropTypes.Validator<object>;
17
- imageSupport: PropTypes.Requireable<PropTypes.InferProps<{
18
- add: PropTypes.Validator<(...args: any[]) => any>;
19
- delete: PropTypes.Validator<(...args: any[]) => any>;
20
- }>>;
21
- uploadSoundSupport: PropTypes.Requireable<PropTypes.InferProps<{
22
- add: PropTypes.Validator<(...args: any[]) => any>;
23
- delete: PropTypes.Validator<(...args: any[]) => any>;
24
- }>>;
25
- };
26
- static defaultProps: {};
27
- constructor(props: any);
28
- componentDidMount(): void;
29
- validateRowsID(rows: any): {
30
- updatedRows: any;
31
- wasChanged: boolean;
32
- };
33
- onTabChange: any;
34
- onChangeTabIndex: any;
35
- onChange: any;
36
- onFeedbackChange: any;
37
- onDeleteRow: any;
38
- onAddRow: any;
39
- onLayoutChange: any;
40
- onResponseTypeChange: any;
41
- onPartialScoringChange: any;
42
- onPromptChanged: any;
43
- onTeacherInstructionsChanged: any;
44
- onRationaleChanged: any;
45
- render(): React.JSX.Element;
46
- }
47
- export declare const Config: typeof Configure;
48
- export default Configure;
@@ -1,259 +0,0 @@
1
- import { getPluginProps as e } from "./utils.js";
2
- import t from "./general-config-block.js";
3
- import n from "./answer-config-block.js";
4
- import r from "react";
5
- import i from "prop-types";
6
- import { jsx as a, jsxs as o } from "react/jsx-runtime";
7
- import { styled as s } from "@mui/material/styles";
8
- import c from "debug";
9
- import { AlertDialog as l, FeedbackConfig as ee, InputContainer as u, layout as d, settings as f } from "@pie-lib/config-ui";
10
- import p from "@pie-lib/editable-html-tip-tap";
11
- //#region src/author/configure.tsx
12
- var te = c("@pie-element:match:configure"), { Panel: m, toggle: h, radio: g, dropdown: _ } = f, v = s("div")(() => ({ "& .promptHolder": { width: "100%" } })), y = s("div")(({ theme: e }) => ({
13
- width: "100%",
14
- paddingTop: e.spacing(2),
15
- marginBottom: e.spacing(2)
16
- })), b = s("div")(({ theme: e }) => ({
17
- fontSize: e.typography.fontSize - 2,
18
- color: e.palette.error.main,
19
- paddingTop: e.spacing(1)
20
- })), x = class extends r.Component {
21
- static propTypes = {
22
- onModelChanged: i.func,
23
- onConfigurationChanged: i.func,
24
- model: i.object.isRequired,
25
- configuration: i.object.isRequired,
26
- imageSupport: i.shape({
27
- add: i.func.isRequired,
28
- delete: i.func.isRequired
29
- }),
30
- uploadSoundSupport: i.shape({
31
- add: i.func.isRequired,
32
- delete: i.func.isRequired
33
- })
34
- };
35
- static defaultProps = {};
36
- constructor(e) {
37
- super(e);
38
- let t = 0;
39
- e.model.rows && e.model.rows.length > 0 && (t = Math.max(...e.model.rows.map((e) => e.id))), this.rowIdCounter = t + 1, this.state = {
40
- activeTab: 0,
41
- dialog: {
42
- open: !1,
43
- text: ""
44
- }
45
- };
46
- }
47
- componentDidMount() {
48
- let { updatedRows: e, wasChanged: t } = this.validateRowsID(this.props.model.rows);
49
- if (t) {
50
- let t = {
51
- ...this.props.model,
52
- rows: e
53
- };
54
- this.props.onModelChanged(t);
55
- }
56
- }
57
- validateRowsID(e) {
58
- let t = !1;
59
- return {
60
- updatedRows: (e || []).map((e, n) => e.id === n + 1 ? e : (t = !0, {
61
- ...e,
62
- id: n + 1
63
- })),
64
- wasChanged: t
65
- };
66
- }
67
- onTabChange = (e, t) => {
68
- this.setState({ activeTab: t });
69
- };
70
- onChangeTabIndex = (e) => {
71
- this.setState({ activeTab: e });
72
- };
73
- onChange = (e) => {
74
- this.props.onModelChanged(e);
75
- };
76
- onFeedbackChange = (e) => {
77
- let { model: t, onModelChanged: n } = this.props;
78
- t.feedback = e, n(t);
79
- };
80
- onDeleteRow = (e) => {
81
- let { model: t } = this.props, n = { ...t };
82
- n.rows.splice(e, 1), this.onChange(n);
83
- };
84
- onAddRow = () => {
85
- let { model: e, configuration: t } = this.props, n = { ...e }, { maxQuestions: r } = t || {};
86
- if (r && (n.rows || []).length >= r) {
87
- this.setState({ dialog: {
88
- open: !0,
89
- text: `There can be maximum ${r} question row` + (r > 1 ? "s" : "") + "."
90
- } });
91
- return;
92
- }
93
- n.rows = n.rows.concat({
94
- id: this.rowIdCounter + 1,
95
- title: `Question Text ${(n.rows || []).length + 1}`,
96
- values: Array(e.layout - 1).fill(!1)
97
- }), this.rowIdCounter += 1, this.onChange(n);
98
- };
99
- onLayoutChange = (e) => {
100
- let { model: t } = this.props, n = t.layout, r = { ...t };
101
- if (e > n) {
102
- for (let t = 0; t < e - n; t++) r.headers.push(`Column ${r.headers.length + 1}`);
103
- r.rows.forEach((t) => {
104
- for (let r = 0; r < e - n; r++) t.values.push(!1);
105
- });
106
- } else e < n && (r.headers.splice(e), r.rows.forEach((t) => {
107
- t.values.splice(e - 1);
108
- }));
109
- r.layout = e, this.onChange(r);
110
- };
111
- onResponseTypeChange = (e) => {
112
- let { model: t } = this.props, n = { ...t };
113
- e === "radio" && n.rows.forEach((e) => {
114
- e.values.reduce((e, t) => t === !0 ? e + 1 : e) > 1 && (e.values = Array(t.layout - 1).fill(!1));
115
- }), n.choiceMode = e, this.onChange(n);
116
- };
117
- onPartialScoringChange = (e) => {
118
- this.props.model.partialScoring = e, this.props.onModelChanged(this.props.model);
119
- };
120
- onPromptChanged = (e) => {
121
- this.props.onModelChanged({
122
- ...this.props.model,
123
- prompt: e
124
- });
125
- };
126
- onTeacherInstructionsChanged = (e) => {
127
- this.props.onModelChanged({
128
- ...this.props.model,
129
- teacherInstructions: e
130
- });
131
- };
132
- onRationaleChanged = (e) => {
133
- this.props.onModelChanged({
134
- ...this.props.model,
135
- rationale: e
136
- });
137
- };
138
- render() {
139
- let { model: r, imageSupport: i, onModelChanged: s, configuration: c, onConfigurationChanged: f, uploadSoundSupport: x } = this.props, { baseInputConfiguration: S = {}, contentDimensions: C = {}, feedback: w = {}, lockChoiceOrder: T = {}, maxImageWidth: E = {}, maxImageHeight: D = {}, partialScoring: O = {}, prompt: k = {}, rationale: A = {}, settingsPanelDisabled: j, scoringType: M = {}, spellCheck: N = {}, studentInstructions: P = {}, teacherInstructions: F = {}, withRubric: I = {}, language: L = {}, languageChoices: R = {} } = c || {}, { errors: z, extraCSSRules: B, feedbackEnabled: V, promptEnabled: H, rationaleEnabled: U, spellCheckEnabled: W, teacherInstructionsEnabled: G, toolbarEditorPosition: K } = r || {}, { prompt: q, rationale: J, teacherInstructions: Y } = z || {}, { dialog: X } = this.state, Z = { position: K === "top" ? "top" : "bottom" }, Q = E && E.prompt, $ = D && D.prompt, ne = {
140
- partialScoring: O.settings && h(O.label),
141
- lockChoiceOrder: T.settings && h(T.label),
142
- feedbackEnabled: w.settings && h(w.label),
143
- "language.enabled": L.settings && h(L.label, !0),
144
- language: L.settings && L.enabled && _(R.label, R.options)
145
- }, re = {
146
- teacherInstructionsEnabled: F.settings && h(F.label),
147
- studentInstructionsEnabled: P.settings && h(P.label),
148
- promptEnabled: k.settings && h(k.label),
149
- rationaleEnabled: A.settings && h(A.label),
150
- spellCheckEnabled: N.settings && h(N.label),
151
- scoringType: M.settings && g(M.label, ["auto", "rubric"]),
152
- rubricEnabled: I?.settings && h(I?.label)
153
- };
154
- return te("[render] model", r), /* @__PURE__ */ a(v, { children: /* @__PURE__ */ o(d.ConfigLayout, {
155
- extraCSSRules: B,
156
- dimensions: C,
157
- hideSettings: j,
158
- settings: /* @__PURE__ */ a(m, {
159
- model: r,
160
- configuration: c,
161
- onChangeModel: (e) => s(e),
162
- onChangeConfiguration: (e) => f(e),
163
- groups: {
164
- Settings: ne,
165
- Properties: re
166
- }
167
- }),
168
- children: [
169
- G && /* @__PURE__ */ a(u, {
170
- label: F.label,
171
- className: "promptHolder",
172
- children: /* @__PURE__ */ o(y, { children: [/* @__PURE__ */ a(p, {
173
- className: "prompt",
174
- markup: r.teacherInstructions || "",
175
- onChange: this.onTeacherInstructionsChanged,
176
- imageSupport: i,
177
- error: Y,
178
- nonEmpty: !1,
179
- toolbarOpts: Z,
180
- pluginProps: e(F?.inputConfiguration, S),
181
- spellCheck: W,
182
- maxImageWidth: E && E.teacherInstructions || Q,
183
- maxImageHeight: D && D.teacherInstructions || $,
184
- uploadSoundSupport: x,
185
- languageCharactersProps: [{ language: "spanish" }, { language: "special" }]
186
- }), Y && /* @__PURE__ */ a(b, { children: Y })] })
187
- }),
188
- H && /* @__PURE__ */ a(u, {
189
- label: k.label,
190
- className: "promptHolder",
191
- children: /* @__PURE__ */ o(y, { children: [/* @__PURE__ */ a(p, {
192
- className: "prompt",
193
- markup: r.prompt,
194
- onChange: this.onPromptChanged,
195
- imageSupport: i,
196
- error: q,
197
- nonEmpty: !1,
198
- disableUnderline: !0,
199
- toolbarOpts: Z,
200
- pluginProps: e(k?.inputConfiguration, S),
201
- spellCheck: W,
202
- maxImageWidth: E && E.prompt,
203
- maxImageHeight: D && D.prompt,
204
- uploadSoundSupport: x,
205
- languageCharactersProps: [{ language: "spanish" }, { language: "special" }]
206
- }), q && /* @__PURE__ */ a(b, { children: q })] })
207
- }),
208
- /* @__PURE__ */ a(t, {
209
- model: r,
210
- configuration: c,
211
- onResponseTypeChange: this.onResponseTypeChange,
212
- onLayoutChange: this.onLayoutChange
213
- }),
214
- /* @__PURE__ */ a(n, {
215
- model: r,
216
- configuration: c,
217
- imageSupport: i,
218
- onChange: this.onChange,
219
- onAddRow: this.onAddRow,
220
- onDeleteRow: this.onDeleteRow,
221
- toolbarOpts: Z,
222
- spellCheck: W,
223
- uploadSoundSupport: x
224
- }),
225
- U && /* @__PURE__ */ a(u, {
226
- label: A.label,
227
- className: "promptHolder",
228
- children: /* @__PURE__ */ o(y, { children: [/* @__PURE__ */ a(p, {
229
- className: "prompt",
230
- markup: r.rationale || "",
231
- onChange: this.onRationaleChanged,
232
- imageSupport: i,
233
- error: J,
234
- toolbarOpts: Z,
235
- pluginProps: e(A?.inputConfiguration, S),
236
- spellCheck: W,
237
- maxImageWidth: E && E.rationale || Q,
238
- maxImageHeight: D && D.rationale || $,
239
- uploadSoundSupport: x,
240
- languageCharactersProps: [{ language: "spanish" }, { language: "special" }]
241
- }), J && /* @__PURE__ */ a(b, { children: J })] })
242
- }),
243
- V && /* @__PURE__ */ a(ee, {
244
- feedback: r.feedback,
245
- onChange: this.onFeedbackChange,
246
- toolbarOpts: Z
247
- }),
248
- /* @__PURE__ */ a(l, {
249
- open: X.open,
250
- title: "Warning",
251
- text: X.text,
252
- onConfirm: () => this.setState({ dialog: { open: !1 } })
253
- })
254
- ]
255
- }) });
256
- }
257
- };
258
- //#endregion
259
- export { x as default };