@pie-element/select-text 13.1.1-next.1 → 13.1.1-next.29

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 (178) hide show
  1. package/CHANGELOG.json +1422 -0
  2. package/CHANGELOG.md +2278 -0
  3. package/LICENSE.md +5 -0
  4. package/README.md +5 -0
  5. package/configure/CHANGELOG.json +1032 -0
  6. package/configure/CHANGELOG.md +2013 -0
  7. package/configure/lib/defaultConfiguration.js +177 -0
  8. package/configure/lib/defaultConfiguration.js.map +1 -0
  9. package/configure/lib/design.js +406 -0
  10. package/configure/lib/design.js.map +1 -0
  11. package/configure/lib/index.js +128 -0
  12. package/configure/lib/index.js.map +1 -0
  13. package/configure/lib/utils.js +92 -0
  14. package/configure/lib/utils.js.map +1 -0
  15. package/configure/package.json +25 -0
  16. package/controller/CHANGELOG.json +442 -0
  17. package/controller/CHANGELOG.md +1464 -0
  18. package/controller/lib/defaults.js +25 -0
  19. package/controller/lib/defaults.js.map +1 -0
  20. package/controller/lib/index.js +258 -0
  21. package/controller/lib/index.js.map +1 -0
  22. package/controller/package.json +16 -0
  23. package/docs/config-schema.json +2135 -0
  24. package/docs/config-schema.json.md +1579 -0
  25. package/docs/demo/config.js +8 -0
  26. package/docs/demo/generate.js +823 -0
  27. package/docs/demo/index.html +1 -0
  28. package/docs/demo/session.js +24 -0
  29. package/docs/pie-schema.json +1248 -0
  30. package/docs/pie-schema.json.md +711 -0
  31. package/lib/index.js +103 -0
  32. package/lib/index.js.map +1 -0
  33. package/lib/main.js +191 -0
  34. package/lib/main.js.map +1 -0
  35. package/lib/print.js +87 -0
  36. package/lib/print.js.map +1 -0
  37. package/lib/utils.js +80 -0
  38. package/lib/utils.js.map +1 -0
  39. package/package.json +21 -60
  40. package/dist/author/defaultConfiguration.d.ts +0 -179
  41. package/dist/author/defaultConfiguration.js +0 -141
  42. package/dist/author/design.d.ts +0 -38
  43. package/dist/author/design.js +0 -264
  44. package/dist/author/index.d.ts +0 -27
  45. package/dist/author/index.js +0 -74
  46. package/dist/author/utils.d.ts +0 -10
  47. package/dist/author/utils.js +0 -50
  48. package/dist/controller/defaults.d.ts +0 -27
  49. package/dist/controller/defaults.js +0 -21
  50. package/dist/controller/index.d.ts +0 -25
  51. package/dist/controller/index.js +0 -121
  52. package/dist/delivery/index.d.ts +0 -19
  53. package/dist/delivery/index.js +0 -60
  54. package/dist/delivery/main.d.ts +0 -34
  55. package/dist/delivery/main.js +0 -136
  56. package/dist/delivery/utils.d.ts +0 -10
  57. package/dist/delivery/utils.js +0 -47
  58. package/dist/index.d.ts +0 -1
  59. package/dist/index.iife.d.ts +0 -8
  60. package/dist/index.iife.js +0 -167
  61. package/dist/index.js +0 -2
  62. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_DataView.js +0 -6
  63. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Hash.js +0 -16
  64. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_ListCache.js +0 -16
  65. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Map.js +0 -6
  66. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_MapCache.js +0 -16
  67. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Promise.js +0 -6
  68. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Set.js +0 -6
  69. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Stack.js +0 -14
  70. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Symbol.js +0 -5
  71. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Uint8Array.js +0 -5
  72. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_WeakMap.js +0 -6
  73. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayEach.js +0 -7
  74. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayFilter.js +0 -10
  75. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayLikeKeys.js +0 -15
  76. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayPush.js +0 -7
  77. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assignValue.js +0 -10
  78. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assocIndexOf.js +0 -8
  79. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssign.js +0 -8
  80. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignIn.js +0 -8
  81. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignValue.js +0 -12
  82. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseClone.js +0 -57
  83. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseCreate.js +0 -14
  84. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetAllKeys.js +0 -9
  85. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetTag.js +0 -10
  86. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsArguments.js +0 -9
  87. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsMap.js +0 -9
  88. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNative.js +0 -11
  89. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsSet.js +0 -9
  90. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsTypedArray.js +0 -11
  91. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeys.js +0 -12
  92. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeysIn.js +0 -13
  93. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTimes.js +0 -7
  94. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTrim.js +0 -8
  95. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseUnary.js +0 -8
  96. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneArrayBuffer.js +0 -8
  97. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneBuffer.js +0 -10
  98. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneDataView.js +0 -8
  99. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneRegExp.js +0 -8
  100. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneSymbol.js +0 -8
  101. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneTypedArray.js +0 -8
  102. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyArray.js +0 -8
  103. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyObject.js +0 -14
  104. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbols.js +0 -8
  105. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbolsIn.js +0 -8
  106. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_coreJsData.js +0 -5
  107. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_defineProperty.js +0 -10
  108. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_freeGlobal.js +0 -4
  109. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeys.js +0 -9
  110. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeysIn.js +0 -9
  111. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getMapData.js +0 -8
  112. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getNative.js +0 -9
  113. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getPrototype.js +0 -5
  114. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getRawTag.js +0 -14
  115. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbols.js +0 -10
  116. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbolsIn.js +0 -11
  117. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getTag.js +0 -23
  118. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getValue.js +0 -6
  119. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashClear.js +0 -7
  120. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashDelete.js +0 -7
  121. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashGet.js +0 -13
  122. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashHas.js +0 -9
  123. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashSet.js +0 -9
  124. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneArray.js +0 -8
  125. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneByTag.js +0 -33
  126. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneObject.js +0 -9
  127. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIndex.js +0 -8
  128. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKeyable.js +0 -7
  129. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isMasked.js +0 -11
  130. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isPrototype.js +0 -8
  131. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheClear.js +0 -6
  132. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheDelete.js +0 -9
  133. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheGet.js +0 -8
  134. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheHas.js +0 -7
  135. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheSet.js +0 -8
  136. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheClear.js +0 -13
  137. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheDelete.js +0 -8
  138. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheGet.js +0 -7
  139. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheHas.js +0 -7
  140. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheSet.js +0 -8
  141. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeCreate.js +0 -5
  142. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeys.js +0 -5
  143. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeysIn.js +0 -8
  144. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nodeUtil.js +0 -9
  145. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_objectToString.js +0 -7
  146. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overArg.js +0 -8
  147. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_root.js +0 -5
  148. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackClear.js +0 -7
  149. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackDelete.js +0 -7
  150. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackGet.js +0 -6
  151. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackHas.js +0 -6
  152. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackSet.js +0 -16
  153. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toSource.js +0 -15
  154. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_trimmedEndIndex.js +0 -8
  155. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/cloneDeep.js +0 -8
  156. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/debounce.js +0 -50
  157. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/eq.js +0 -6
  158. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArguments.js +0 -10
  159. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArray.js +0 -4
  160. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLike.js +0 -8
  161. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isBuffer.js +0 -6
  162. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.js +0 -21
  163. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isFunction.js +0 -11
  164. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isLength.js +0 -7
  165. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isMap.js +0 -7
  166. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObject.js +0 -7
  167. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObjectLike.js +0 -6
  168. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSet.js +0 -7
  169. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSymbol.js +0 -9
  170. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isTypedArray.js +0 -7
  171. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keys.js +0 -9
  172. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keysIn.js +0 -9
  173. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/now.js +0 -7
  174. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubArray.js +0 -6
  175. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubFalse.js +0 -6
  176. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toNumber.js +0 -19
  177. package/dist/print/index.d.ts +0 -15
  178. package/dist/print/index.js +0 -41
@@ -1,179 +0,0 @@
1
- /**
2
- * @synced-from pie-elements/packages/select-text/configure/src/defaultConfiguration.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
- model: {
11
- feedbackEnabled: boolean;
12
- highlightChoices: boolean;
13
- maxSelections: number;
14
- mode: string;
15
- partialScoring: boolean;
16
- prompt: string;
17
- promptEnabled: boolean;
18
- rationale: string;
19
- rationaleEnabled: boolean;
20
- scoringType: string;
21
- studentInstructionsEnabled: boolean;
22
- teacherInstructions: string;
23
- teacherInstructionsEnabled: boolean;
24
- text: string;
25
- tokens: never[];
26
- toolbarEditorPosition: string;
27
- };
28
- configuration: {
29
- baseInputConfiguration: {
30
- h3: {
31
- disabled: boolean;
32
- };
33
- audio: {
34
- disabled: boolean;
35
- };
36
- video: {
37
- disabled: boolean;
38
- };
39
- image: {
40
- disabled: boolean;
41
- };
42
- textAlign: {
43
- disabled: boolean;
44
- };
45
- showParagraphs: {
46
- disabled: boolean;
47
- };
48
- separateParagraphs: {
49
- disabled: boolean;
50
- };
51
- };
52
- selectionCount: {
53
- settings: boolean;
54
- label: string;
55
- };
56
- correctAnswer: {
57
- settings: boolean;
58
- label: string;
59
- };
60
- selections: {
61
- settings: boolean;
62
- label: string;
63
- };
64
- highlightChoices: {
65
- settings: boolean;
66
- label: string;
67
- };
68
- rationale: {
69
- settings: boolean;
70
- label: string;
71
- inputConfiguration: {
72
- audio: {
73
- disabled: boolean;
74
- };
75
- video: {
76
- disabled: boolean;
77
- };
78
- image: {
79
- disabled: boolean;
80
- };
81
- };
82
- required: boolean;
83
- };
84
- scoringType: {
85
- settings: boolean;
86
- label: string;
87
- };
88
- studentInstructions: {
89
- settings: boolean;
90
- label: string;
91
- };
92
- teacherInstructions: {
93
- settings: boolean;
94
- label: string;
95
- inputConfiguration: {
96
- audio: {
97
- disabled: boolean;
98
- };
99
- video: {
100
- disabled: boolean;
101
- };
102
- image: {
103
- disabled: boolean;
104
- };
105
- };
106
- required: boolean;
107
- };
108
- prompt: {
109
- label: string;
110
- settings: boolean;
111
- inputConfiguration: {
112
- audio: {
113
- disabled: boolean;
114
- };
115
- video: {
116
- disabled: boolean;
117
- };
118
- image: {
119
- disabled: boolean;
120
- };
121
- };
122
- required: boolean;
123
- };
124
- text: {
125
- settings: boolean;
126
- label: string;
127
- };
128
- tokens: {
129
- settings: boolean;
130
- label: string;
131
- };
132
- feedback: {
133
- settings: boolean;
134
- label: string;
135
- };
136
- spellCheck: {
137
- label: string;
138
- settings: boolean;
139
- enabled: boolean;
140
- };
141
- partialScoring: {
142
- settings: boolean;
143
- label: string;
144
- };
145
- mode: {
146
- settings: boolean;
147
- label: string;
148
- };
149
- minTokens: number;
150
- maxImageWidth: {
151
- teacherInstructions: number;
152
- prompt: number;
153
- rationale: number;
154
- };
155
- maxImageHeight: {
156
- teacherInstructions: number;
157
- prompt: number;
158
- rationale: number;
159
- };
160
- withRubric: {
161
- settings: boolean;
162
- label: string;
163
- };
164
- mathMlOptions: {
165
- mmlOutput: boolean;
166
- mmlEditing: boolean;
167
- };
168
- language: {
169
- settings: boolean;
170
- label: string;
171
- enabled: boolean;
172
- };
173
- languageChoices: {
174
- label: string;
175
- options: never[];
176
- };
177
- };
178
- };
179
- export default _default;
@@ -1,141 +0,0 @@
1
- //#region src/author/defaultConfiguration.ts
2
- var e = {
3
- model: {
4
- feedbackEnabled: !1,
5
- highlightChoices: !1,
6
- maxSelections: 0,
7
- mode: "sentence",
8
- partialScoring: !1,
9
- prompt: "",
10
- promptEnabled: !0,
11
- rationale: "",
12
- rationaleEnabled: !0,
13
- scoringType: "auto",
14
- studentInstructionsEnabled: !0,
15
- teacherInstructions: "",
16
- teacherInstructionsEnabled: !0,
17
- text: "",
18
- tokens: [],
19
- toolbarEditorPosition: "bottom"
20
- },
21
- configuration: {
22
- baseInputConfiguration: {
23
- h3: { disabled: !0 },
24
- audio: { disabled: !1 },
25
- video: { disabled: !1 },
26
- image: { disabled: !1 },
27
- textAlign: { disabled: !0 },
28
- showParagraphs: { disabled: !1 },
29
- separateParagraphs: { disabled: !0 }
30
- },
31
- selectionCount: {
32
- settings: !0,
33
- label: "Selection count"
34
- },
35
- correctAnswer: {
36
- settings: !0,
37
- label: "Correct Answers"
38
- },
39
- selections: {
40
- settings: !0,
41
- label: "Selections Available"
42
- },
43
- highlightChoices: {
44
- settings: !0,
45
- label: "Highlight choices"
46
- },
47
- rationale: {
48
- settings: !0,
49
- label: "Rationale",
50
- inputConfiguration: {
51
- audio: { disabled: !1 },
52
- video: { disabled: !1 },
53
- image: { disabled: !1 }
54
- },
55
- required: !1
56
- },
57
- scoringType: {
58
- settings: !1,
59
- label: "Scoring Type"
60
- },
61
- studentInstructions: {
62
- settings: !1,
63
- label: "Student Instructions"
64
- },
65
- teacherInstructions: {
66
- settings: !0,
67
- label: "Teacher Instructions",
68
- inputConfiguration: {
69
- audio: { disabled: !1 },
70
- video: { disabled: !1 },
71
- image: { disabled: !1 }
72
- },
73
- required: !1
74
- },
75
- prompt: {
76
- label: "Prompt",
77
- settings: !0,
78
- inputConfiguration: {
79
- audio: { disabled: !1 },
80
- video: { disabled: !1 },
81
- image: { disabled: !1 }
82
- },
83
- required: !1
84
- },
85
- text: {
86
- settings: !0,
87
- label: "Content"
88
- },
89
- tokens: {
90
- settings: !0,
91
- label: "Tokens"
92
- },
93
- feedback: {
94
- settings: !0,
95
- label: "Feedback"
96
- },
97
- spellCheck: {
98
- label: "Spellcheck",
99
- settings: !1,
100
- enabled: !0
101
- },
102
- partialScoring: {
103
- settings: !1,
104
- label: "Allow Partial Scoring"
105
- },
106
- mode: {
107
- settings: !0,
108
- label: "Mode"
109
- },
110
- minTokens: 2,
111
- maxImageWidth: {
112
- teacherInstructions: 300,
113
- prompt: 300,
114
- rationale: 300
115
- },
116
- maxImageHeight: {
117
- teacherInstructions: 300,
118
- prompt: 300,
119
- rationale: 300
120
- },
121
- withRubric: {
122
- settings: !1,
123
- label: "Add Rubric"
124
- },
125
- mathMlOptions: {
126
- mmlOutput: !1,
127
- mmlEditing: !1
128
- },
129
- language: {
130
- settings: !1,
131
- label: "Specify Language",
132
- enabled: !1
133
- },
134
- languageChoices: {
135
- label: "Language Choices",
136
- options: []
137
- }
138
- }
139
- };
140
- //#endregion
141
- export { e as default };
@@ -1,38 +0,0 @@
1
- /**
2
- * @synced-from pie-elements/packages/select-text/configure/src/design.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 Design extends React.Component {
12
- static propTypes: {
13
- model: PropTypes.Validator<object>;
14
- configuration: PropTypes.Validator<object>;
15
- onModelChanged: PropTypes.Validator<(...args: any[]) => any>;
16
- onConfigurationChanged: PropTypes.Validator<(...args: any[]) => any>;
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<object>;
22
- };
23
- static defaultProps: {};
24
- constructor(props: any);
25
- UNSAFE_componentWillReceiveProps(nProps: any): void;
26
- updateText: any;
27
- changeText: (event: any) => any;
28
- changeTokens: any;
29
- changeMaxSelections: any;
30
- apply: any;
31
- changeFeedback: any;
32
- changePartialScoring: any;
33
- onPromptChanged: any;
34
- onTeacherInstructionsChanged: any;
35
- onRationaleChanged: any;
36
- render(): React.JSX.Element;
37
- }
38
- export default Design;
@@ -1,264 +0,0 @@
1
- import e from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/cloneDeep.js";
2
- import t from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/debounce.js";
3
- import { generateValidationMessage as n } from "./utils.js";
4
- import r from "react";
5
- import i from "prop-types";
6
- import { Tokenizer as a } from "@pie-lib/text-select";
7
- import { jsx as o, jsxs as s } from "react/jsx-runtime";
8
- import { styled as c } from "@mui/material/styles";
9
- import l from "debug";
10
- import u from "@mui/material/TextField";
11
- import { FeedbackConfig as ee, InputContainer as d, NumberTextField as f, layout as p, settings as m } from "@pie-lib/config-ui";
12
- import h from "@mui/material/Chip";
13
- import te from "@mui/icons-material/Info";
14
- import g from "@pie-lib/editable-html-tip-tap";
15
- import _ from "@mui/material/Tooltip";
16
- //#region src/author/design.tsx
17
- var { Panel: ne, toggle: v, radio: y, dropdown: re } = m, b = c(d)(({ theme: e }) => ({
18
- width: "100%",
19
- paddingTop: e.spacing(2),
20
- marginBottom: e.spacing(2)
21
- })), x = c(g)({ width: "100%" }), S = c("div")(({ theme: e }) => ({
22
- fontSize: e.typography.fontSize - 2,
23
- color: e.palette.error.main,
24
- paddingTop: e.spacing(1)
25
- })), ie = c(u)({ width: "100%" }), ae = c(d)(({ theme: e }) => ({
26
- paddingRight: 0,
27
- marginRight: 0,
28
- position: "relative",
29
- "&:after": {
30
- position: "absolute",
31
- bottom: 0,
32
- left: 0,
33
- right: 0,
34
- height: "1px",
35
- content: "\"\"",
36
- backgroundColor: e.palette.primary.main
37
- },
38
- marginBottom: e.spacing(1)
39
- })), C = c(_)(({ theme: e }) => ({ "& .MuiTooltip-tooltip": {
40
- fontSize: e.typography.fontSize - 2,
41
- whiteSpace: "pre",
42
- maxWidth: "500px"
43
- } })), oe = c(a)(({ theme: e }) => ({ marginTop: e.spacing(2) })), w = c(h)(({ theme: e }) => ({
44
- marginTop: e.spacing(.5),
45
- marginRight: e.spacing(2)
46
- })), se = c("div")(({ theme: e }) => ({
47
- display: "flex",
48
- alignItems: "center",
49
- flexWrap: "wrap",
50
- marginBottom: e.spacing(2.5)
51
- })), ce = c(f)(({ theme: e }) => ({
52
- width: "180px",
53
- margin: `${e.spacing(.5)} auto 0`
54
- })), le = l("@pie-element:select-text:configure"), T = class extends r.Component {
55
- static propTypes = {
56
- model: i.object.isRequired,
57
- configuration: i.object.isRequired,
58
- onModelChanged: i.func.isRequired,
59
- onConfigurationChanged: i.func.isRequired,
60
- imageSupport: i.shape({
61
- add: i.func.isRequired,
62
- delete: i.func.isRequired
63
- }),
64
- uploadSoundSupport: i.object
65
- };
66
- static defaultProps = {};
67
- constructor(e) {
68
- super(e);
69
- let { model: t } = this.props;
70
- this.state = { text: t && t.text || "" };
71
- }
72
- UNSAFE_componentWillReceiveProps(e) {
73
- let { model: t } = e;
74
- t && t.text && this.setState({ text: t.text });
75
- }
76
- updateText = t((e) => {
77
- this.apply((t) => {
78
- t.text = e, t.tokens = [];
79
- });
80
- }, 200);
81
- changeText = (e) => this.updateText(e.target.value);
82
- changeTokens = (e, t) => {
83
- this.apply((n) => {
84
- n.tokens = e, n.mode = t;
85
- let r = e.filter((e) => e.correct).length, i = isFinite(n.maxSelections) ? n.maxSelections : 0;
86
- n.maxSelections = Math.max(i, r);
87
- });
88
- };
89
- changeMaxSelections = (e, t) => {
90
- this.apply((e) => e.maxSelections = t);
91
- };
92
- apply = (t) => {
93
- let { onModelChanged: n, model: r } = this.props, i = e(r);
94
- t(i), n(i);
95
- };
96
- changeFeedback = (e) => {
97
- this.apply((t) => t.feedback = e);
98
- };
99
- changePartialScoring = (t) => {
100
- let { onModelChanged: n, model: r } = this.props, i = e(r);
101
- i.partialScoring = t, n(i);
102
- };
103
- onPromptChanged = (t) => {
104
- let { onModelChanged: n, model: r } = this.props, i = e(r);
105
- i.prompt = t, n(i);
106
- };
107
- onTeacherInstructionsChanged = (t) => {
108
- let { onModelChanged: n, model: r } = this.props, i = e(r);
109
- i.teacherInstructions = t, n(i);
110
- };
111
- onRationaleChanged = (e) => {
112
- let { onModelChanged: t, model: n } = this.props;
113
- t({
114
- ...n,
115
- rationale: e
116
- });
117
- };
118
- render() {
119
- let { text: e } = this.state, { configuration: t, imageSupport: r, model: i, onConfigurationChanged: a, onModelChanged: c, uploadSoundSupport: l } = this.props, { baseInputConfiguration: u = {}, correctAnswer: d = {}, contentDimensions: f = {}, feedback: m = {}, highlightChoices: h = {}, mode: g = {}, partialScoring: _ = {}, prompt: T = {}, rationale: E = {}, selectionCount: D = {}, selections: O = {}, settingsPanelDisabled: ue, scoringType: k = {}, spellCheck: A = {}, studentInstructions: j = {}, teacherInstructions: M = {}, text: N = {}, tokens: P = {}, maxImageWidth: F = {}, maxImageHeight: I = {}, withRubric: L = {}, mathMlOptions: R = {}, language: z = {}, languageChoices: B = {} } = t || {}, { errors: V, extraCSSRules: H, feedbackEnabled: de, promptEnabled: fe, rationaleEnabled: pe, spellCheckEnabled: U, teacherInstructionsEnabled: me, toolbarEditorPosition: he } = i || {}, { prompt: W, rationale: G, selectionsError: K, teacherInstructions: q, tokensError: J } = V || {}, ge = n(t), Y = F && F.prompt, X = I && I.prompt, { tokens: Z } = i;
120
- Z ||= [];
121
- let Q = { position: he === "top" ? "top" : "bottom" };
122
- le("[render] maxSelections:", i.maxSelections);
123
- let _e = {
124
- partialScoring: _.settings && v(_.label),
125
- highlightChoices: h.settings && v(h.label),
126
- feedbackEnabled: m.settings && v(m.label),
127
- "language.enabled": z.settings && v(z.label, !0),
128
- language: z.settings && z.enabled && re(B.label, B.options)
129
- }, ve = {
130
- teacherInstructionsEnabled: M.settings && v(M.label),
131
- studentInstructionsEnabled: j.settings && v(j.label),
132
- promptEnabled: T.settings && v(T.label),
133
- rationaleEnabled: E.settings && v(E.label),
134
- spellCheckEnabled: A.settings && v(A.label),
135
- scoringType: k.settings && y(k.label, ["auto", "rubric"]),
136
- rubricEnabled: L?.settings && v(L?.label)
137
- }, $ = (e = {}) => ({
138
- ...u,
139
- ...e
140
- });
141
- return /* @__PURE__ */ s(p.ConfigLayout, {
142
- extraCSSRules: H,
143
- dimensions: f,
144
- hideSettings: ue,
145
- settings: /* @__PURE__ */ o(ne, {
146
- model: i,
147
- configuration: t,
148
- onChangeModel: (e) => c(e),
149
- onChangeConfiguration: a,
150
- groups: {
151
- Settings: _e,
152
- Properties: ve
153
- }
154
- }),
155
- children: [
156
- me && /* @__PURE__ */ s(b, {
157
- label: M.label,
158
- children: [/* @__PURE__ */ o(x, {
159
- markup: i.teacherInstructions || "",
160
- onChange: this.onTeacherInstructionsChanged,
161
- imageSupport: r,
162
- nonEmpty: !1,
163
- error: q,
164
- toolbarOpts: Q,
165
- pluginProps: $(t?.teacherInstructions?.inputConfiguration),
166
- spellCheck: U,
167
- maxImageWidth: F && F.teacherInstructions || Y,
168
- maxImageHeight: I && I.teacherInstructions || X,
169
- uploadSoundSupport: l,
170
- languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
171
- mathMlOptions: R
172
- }), q && /* @__PURE__ */ o(S, { children: q })]
173
- }),
174
- fe && /* @__PURE__ */ s(b, {
175
- label: T.label || "",
176
- children: [/* @__PURE__ */ o(x, {
177
- markup: i.prompt,
178
- onChange: this.onPromptChanged,
179
- imageSupport: r,
180
- error: W,
181
- toolbarOpts: Q,
182
- pluginProps: $(t?.prompt?.inputConfiguration),
183
- spellCheck: U,
184
- maxImageWidth: Y,
185
- maxImageHeight: X,
186
- uploadSoundSupport: l,
187
- languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
188
- mathMlOptions: R
189
- }), W && /* @__PURE__ */ o(S, { children: W })]
190
- }),
191
- N.settings && /* @__PURE__ */ o(b, {
192
- label: N.label || "",
193
- children: /* @__PURE__ */ o(ie, {
194
- variant: "standard",
195
- multiline: !0,
196
- defaultValue: e,
197
- onChange: this.changeText,
198
- spellCheck: U
199
- })
200
- }),
201
- P.settings && /* @__PURE__ */ s(ae, {
202
- label: P.label || "",
203
- children: [/* @__PURE__ */ o(C, {
204
- disableFocusListener: !0,
205
- disableTouchListener: !0,
206
- placement: "right",
207
- title: ge,
208
- children: /* @__PURE__ */ o(te, {
209
- fontSize: "small",
210
- color: "primary",
211
- style: {
212
- position: "absolute",
213
- left: "48px",
214
- top: "-3px"
215
- }
216
- })
217
- }), /* @__PURE__ */ o(oe, {
218
- text: i.text,
219
- tokens: Z,
220
- onChange: this.changeTokens
221
- })]
222
- }),
223
- J && /* @__PURE__ */ o(S, { children: J }),
224
- K && /* @__PURE__ */ o(S, { children: K }),
225
- /* @__PURE__ */ s(se, { children: [
226
- g.settings && /* @__PURE__ */ o(w, { label: `${g.label}: ${i.mode ? i.mode : "None"}` }),
227
- O.settings && /* @__PURE__ */ o(w, { label: `${O.label}: ${Z.length}` }),
228
- d.settings && /* @__PURE__ */ o(w, { label: `${d.label}: ${Z.filter((e) => e.correct).length}` }),
229
- D.settings && /* @__PURE__ */ o(ce, {
230
- min: Z.filter((e) => e.correct).length || 0,
231
- label: `${D.label} (0:any)`,
232
- max: Z.length,
233
- value: i.maxSelections,
234
- onChange: this.changeMaxSelections
235
- })
236
- ] }),
237
- pe && /* @__PURE__ */ s(b, {
238
- label: E.label || "",
239
- children: [/* @__PURE__ */ o(x, {
240
- markup: i.rationale || "",
241
- onChange: this.onRationaleChanged,
242
- imageSupport: r,
243
- error: G,
244
- toolbarOpts: Q,
245
- pluginProps: $(t?.rationale?.inputConfiguration),
246
- spellCheck: U,
247
- maxImageWidth: F && F.rationale || Y,
248
- maxImageHeight: I && I.rationale || X,
249
- uploadSoundSupport: l,
250
- languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
251
- mathMlOptions: R
252
- }), G && /* @__PURE__ */ o(S, { children: G })]
253
- }),
254
- de && /* @__PURE__ */ o(ee, {
255
- feedback: i.feedback,
256
- onChange: this.changeFeedback,
257
- toolbarOpts: Q
258
- })
259
- ]
260
- });
261
- }
262
- };
263
- //#endregion
264
- export { T as default };
@@ -1,27 +0,0 @@
1
- /**
2
- * @synced-from pie-elements/packages/select-text/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 SelectTextConfigure extends HTMLElement {
10
- static createDefaultModel: (model?: {}) => any;
11
- constructor();
12
- set model(m: any);
13
- set configuration(c: any);
14
- connectedCallback(): void;
15
- modelChanged(m: any): void;
16
- onConfigurationChanged(c: any): void;
17
- /**
18
- *
19
- * @param {done, progress, file} handler
20
- */
21
- insertImage(handler: any): void;
22
- onDeleteImage(src: any, done: any): void;
23
- insertSound(handler: any): void;
24
- onDeleteSound(src: any, done: any): void;
25
- render(): void;
26
- disconnectedCallback(): void;
27
- }