@pie-element/image-cloze-association 3.4.18-next.85 → 3.5.1-beta.587

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 (67) hide show
  1. package/CHANGELOG.md +489 -0
  2. package/configure/CHANGELOG.md +398 -0
  3. package/configure/lib/defaults.js +16 -0
  4. package/configure/lib/defaults.js.map +1 -1
  5. package/configure/lib/index.js +17 -3
  6. package/configure/lib/index.js.map +1 -1
  7. package/configure/lib/root.js +43 -13
  8. package/configure/lib/root.js.map +1 -1
  9. package/configure/package.json +4 -3
  10. package/configure/src/__tests__/index.test.js +12 -15
  11. package/configure/src/defaults.js +20 -4
  12. package/configure/src/index.js +23 -3
  13. package/configure/src/root.jsx +41 -25
  14. package/controller/CHANGELOG.md +63 -0
  15. package/controller/lib/index.js +9 -8
  16. package/controller/lib/index.js.map +1 -1
  17. package/controller/lib/utils.js +4 -4
  18. package/controller/lib/utils.js.map +1 -1
  19. package/controller/package.json +2 -2
  20. package/controller/src/__tests__/index.test.js +108 -62
  21. package/controller/src/index.js +40 -28
  22. package/controller/src/utils.js +10 -10
  23. package/docs/config-schema.json +160 -0
  24. package/docs/config-schema.json.md +127 -0
  25. package/docs/demo/config.js +2 -2
  26. package/docs/demo/generate.js +30 -25
  27. package/docs/demo/session.js +1 -1
  28. package/docs/pie-schema.json +378 -0
  29. package/docs/pie-schema.json.md +295 -0
  30. package/lib/constants.js.map +1 -1
  31. package/lib/evaluation-icon.js.map +1 -1
  32. package/lib/image-container.js +13 -6
  33. package/lib/image-container.js.map +1 -1
  34. package/lib/image-drop-target.js +7 -2
  35. package/lib/image-drop-target.js.map +1 -1
  36. package/lib/index.js +4 -1
  37. package/lib/index.js.map +1 -1
  38. package/lib/interactive-section.js +1 -1
  39. package/lib/interactive-section.js.map +1 -1
  40. package/lib/possible-response.js +17 -5
  41. package/lib/possible-response.js.map +1 -1
  42. package/lib/possible-responses.js.map +1 -1
  43. package/lib/root.js +140 -19
  44. package/lib/root.js.map +1 -1
  45. package/lib/utils-correctness.js +33 -5
  46. package/lib/utils-correctness.js.map +1 -1
  47. package/package.json +8 -5
  48. package/src/__tests__/__snapshots__/{image-container-test.jsx.snap → image-container.test.jsx.snap} +20 -0
  49. package/src/__tests__/__snapshots__/possible-response.test.jsx.snap +5 -0
  50. package/src/__tests__/__snapshots__/root.test.jsx.snap +50 -0
  51. package/src/__tests__/{image-container-test.jsx → image-container.test.jsx} +12 -5
  52. package/src/__tests__/{possible-response-test.jsx → possible-response.test.jsx} +5 -3
  53. package/src/__tests__/{root-test.jsx → root.test.jsx} +4 -3
  54. package/src/__tests__/utils.test.js +207 -0
  55. package/src/constants.js +3 -3
  56. package/src/evaluation-icon.jsx +8 -17
  57. package/src/image-container.jsx +14 -19
  58. package/src/image-drop-target.jsx +45 -38
  59. package/src/index.js +10 -18
  60. package/src/interactive-section.jsx +15 -22
  61. package/src/possible-response.jsx +43 -23
  62. package/src/possible-responses.jsx +17 -25
  63. package/src/root.jsx +174 -100
  64. package/src/utils-correctness.js +44 -14
  65. package/src/__tests__/__snapshots__/possible-response-test.jsx.snap +0 -13
  66. package/src/__tests__/__snapshots__/root-test.jsx.snap +0 -38
  67. package/src/__tests__/utils-test.js +0 -211
@@ -3,6 +3,404 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [4.4.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@4.3.0...@pie-element/image-cloze-association-configure@4.4.0) (2023-01-17)
7
+
8
+
9
+ ### Features
10
+
11
+ * update pie-libs ([6423903](https://github.com/pie-framework/pie-elements/commit/6423903898b041f56db2111de2e4aac4ee9f1fd3))
12
+
13
+
14
+
15
+
16
+
17
+ # [4.3.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@4.2.6...@pie-element/image-cloze-association-configure@4.3.0) (2023-01-05)
18
+
19
+
20
+ ### Features
21
+
22
+ * update pie-libs ([b174476](https://github.com/pie-framework/pie-elements/commit/b174476729119a0689f1f8adfc8c235246676cab))
23
+ * update pie-libs ([f72c3c8](https://github.com/pie-framework/pie-elements/commit/f72c3c8d8bc9bbf061bb81502317157a63c22972))
24
+ * update pie-libs ([8490729](https://github.com/pie-framework/pie-elements/commit/8490729a2389d36fd3968f0806119fde96577842))
25
+ * **image-cloze-association:** added configuration prop to hide the settings panel PD-1999 ([5d0739b](https://github.com/pie-framework/pie-elements/commit/5d0739b021caaedd757f6caccdbef7ea74451ded))
26
+
27
+
28
+
29
+
30
+
31
+ ## [4.2.6](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@4.2.5...@pie-element/image-cloze-association-configure@4.2.6) (2022-12-21)
32
+
33
+
34
+ ### Bug Fixes
35
+
36
+ * updated pie-libs ([8cb5b90](https://github.com/pie-framework/pie-elements/commit/8cb5b90d501ccbdf5ffd764e6555faa48b8f54d6))
37
+
38
+
39
+
40
+
41
+
42
+ ## [4.2.5](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@4.2.4...@pie-element/image-cloze-association-configure@4.2.5) (2022-12-20)
43
+
44
+
45
+ ### Bug Fixes
46
+
47
+ * updated pie-libs ([6549302](https://github.com/pie-framework/pie-elements/commit/65493026fbf356c5ab752ae6a14d961d4b256368))
48
+
49
+
50
+
51
+
52
+
53
+ ## [4.2.4](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@4.2.3...@pie-element/image-cloze-association-configure@4.2.4) (2022-12-07)
54
+
55
+
56
+ ### Bug Fixes
57
+
58
+ * update libs ([441f403](https://github.com/pie-framework/pie-elements/commit/441f403870b7bec0d61fab58b8d93dbe0ead4c32))
59
+ * update libs for PD-2030 PD-2031 ([3174022](https://github.com/pie-framework/pie-elements/commit/3174022d45603ed217bbe8804a142b07084636a5))
60
+ * updated lib PD-1715 ([42e788d](https://github.com/pie-framework/pie-elements/commit/42e788db0c792838994e55001952da7701251a8e))
61
+ * updated libs ([c20de3a](https://github.com/pie-framework/pie-elements/commit/c20de3a6ba4499a090c809e18e52588d2a585fa0))
62
+ * updated libs ([0eed79a](https://github.com/pie-framework/pie-elements/commit/0eed79a32c3b777c16c8cabf201513fc1d2726a0))
63
+ * updated libs ([343c9ec](https://github.com/pie-framework/pie-elements/commit/343c9ec3dccba7f781e90ae2bd195cac6f78f467))
64
+
65
+
66
+
67
+
68
+
69
+ ## [4.2.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@4.2.2...@pie-element/image-cloze-association-configure@4.2.3) (2022-11-15)
70
+
71
+ **Note:** Version bump only for package @pie-element/image-cloze-association-configure
72
+
73
+
74
+
75
+
76
+
77
+ ## [4.2.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@4.2.1...@pie-element/image-cloze-association-configure@4.2.2) (2022-11-11)
78
+
79
+
80
+ ### Bug Fixes
81
+
82
+ * **image-close-association:** add sanity checks for withRubric ([1d3c577](https://github.com/pie-framework/pie-elements/commit/1d3c577d04b0c9b13589c9fce901b673be27ad31))
83
+
84
+
85
+
86
+
87
+
88
+ ## [4.2.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@4.2.0...@pie-element/image-cloze-association-configure@4.2.1) (2022-10-31)
89
+
90
+ **Note:** Version bump only for package @pie-element/image-cloze-association-configure
91
+
92
+
93
+
94
+
95
+
96
+ # [4.2.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@4.1.9...@pie-element/image-cloze-association-configure@4.2.0) (2022-10-17)
97
+
98
+
99
+ ### Features
100
+
101
+ * enable spanish and special characters in author PD-2120 ([85fd3dd](https://github.com/pie-framework/pie-elements/commit/85fd3dd0fc10da1a2dfd5a842809c625790f8ba9))
102
+ * set withRubric to false in item default configurations. Set rubricEnabled to true if it's enabled for drawing-response and extended-text-entry ([a209057](https://github.com/pie-framework/pie-elements/commit/a209057f5a3fa5438efc8595453c89c11959a8f5))
103
+ * update libs ([7e174fb](https://github.com/pie-framework/pie-elements/commit/7e174fba75e7ea668900ad5c103751cefe33e2af))
104
+ * **image-cloze-association:** add pie-api config PD-23 ([cef5013](https://github.com/pie-framework/pie-elements/commit/cef50133f83f6dec1e3f0b993a24a35e86cfe159))
105
+ * **image-cloze-association:** add settings to enable rubric. Add withRubric prop to configuration and rubricEnabled prop to model PD-2101 ([e6d1ba7](https://github.com/pie-framework/pie-elements/commit/e6d1ba7c700f6a637006cb3b5befbc77bad9a3e1))
106
+ * **image-cloze-association:** add uploadSoundSupport property PD-23-updated ([d0d80dc](https://github.com/pie-framework/pie-elements/commit/d0d80dcf75586bdfc6d79585e4437aacc2734fea))
107
+
108
+
109
+
110
+
111
+
112
+ ## [4.1.9](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@4.1.8...@pie-element/image-cloze-association-configure@4.1.9) (2022-09-29)
113
+
114
+ **Note:** Version bump only for package @pie-element/image-cloze-association-configure
115
+
116
+
117
+
118
+
119
+
120
+ ## [4.1.8](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@4.1.7...@pie-element/image-cloze-association-configure@4.1.8) (2022-09-14)
121
+
122
+ **Note:** Version bump only for package @pie-element/image-cloze-association-configure
123
+
124
+
125
+
126
+
127
+
128
+ ## [4.1.7](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@4.1.6...@pie-element/image-cloze-association-configure@4.1.7) (2022-08-31)
129
+
130
+ **Note:** Version bump only for package @pie-element/image-cloze-association-configure
131
+
132
+
133
+
134
+
135
+
136
+ ## [4.1.6](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@4.1.5...@pie-element/image-cloze-association-configure@4.1.6) (2022-08-16)
137
+
138
+ **Note:** Version bump only for package @pie-element/image-cloze-association-configure
139
+
140
+
141
+
142
+
143
+
144
+ ## [4.1.5](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@4.1.4...@pie-element/image-cloze-association-configure@4.1.5) (2022-08-08)
145
+
146
+ **Note:** Version bump only for package @pie-element/image-cloze-association-configure
147
+
148
+
149
+
150
+
151
+
152
+ ## [4.1.4](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@4.1.3...@pie-element/image-cloze-association-configure@4.1.4) (2022-08-02)
153
+
154
+ **Note:** Version bump only for package @pie-element/image-cloze-association-configure
155
+
156
+
157
+
158
+
159
+
160
+ ## [4.1.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@4.1.2...@pie-element/image-cloze-association-configure@4.1.3) (2022-07-22)
161
+
162
+ **Note:** Version bump only for package @pie-element/image-cloze-association-configure
163
+
164
+
165
+
166
+
167
+
168
+ ## [4.1.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@4.1.1...@pie-element/image-cloze-association-configure@4.1.2) (2022-07-20)
169
+
170
+ **Note:** Version bump only for package @pie-element/image-cloze-association-configure
171
+
172
+
173
+
174
+
175
+
176
+ ## [4.1.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@4.1.0...@pie-element/image-cloze-association-configure@4.1.1) (2022-07-19)
177
+
178
+ **Note:** Version bump only for package @pie-element/image-cloze-association-configure
179
+
180
+
181
+
182
+
183
+
184
+ # [4.1.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@4.0.0...@pie-element/image-cloze-association-configure@4.1.0) (2022-06-28)
185
+
186
+
187
+ ### Features
188
+
189
+ * **image-cloze-association:** add maxImageWidth and maxImageHeight props PD-1801 ([f4132c8](https://github.com/pie-framework/pie-elements/commit/f4132c81475ad141fae5c38def311ac7e9729a42))
190
+
191
+
192
+
193
+
194
+
195
+ # [4.0.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@3.1.49...@pie-element/image-cloze-association-configure@4.0.0) (2022-06-28)
196
+
197
+
198
+ ### chore
199
+
200
+ * Merge master with develop. ([cdca48a](https://github.com/pie-framework/pie-elements/commit/cdca48abaa1d4179e4a961e13d171e14b7ed2444))
201
+
202
+
203
+ ### BREAKING CHANGES
204
+
205
+ * Image percent buttons were removed from toolbar.
206
+ New properties maxImageWidth and maxImageHeight were added.
207
+
208
+
209
+
210
+
211
+
212
+ ## [3.1.49](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@3.1.48...@pie-element/image-cloze-association-configure@3.1.49) (2022-06-13)
213
+
214
+ **Note:** Version bump only for package @pie-element/image-cloze-association-configure
215
+
216
+
217
+
218
+
219
+
220
+ ## [3.1.48](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@3.1.47...@pie-element/image-cloze-association-configure@3.1.48) (2022-05-30)
221
+
222
+ **Note:** Version bump only for package @pie-element/image-cloze-association-configure
223
+
224
+
225
+
226
+
227
+
228
+ ## [3.1.47](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@3.1.46...@pie-element/image-cloze-association-configure@3.1.47) (2022-05-16)
229
+
230
+ **Note:** Version bump only for package @pie-element/image-cloze-association-configure
231
+
232
+
233
+
234
+
235
+
236
+ ## [3.1.46](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@3.1.45...@pie-element/image-cloze-association-configure@3.1.46) (2022-05-09)
237
+
238
+ **Note:** Version bump only for package @pie-element/image-cloze-association-configure
239
+
240
+
241
+
242
+
243
+
244
+ ## [3.1.45](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@3.1.44...@pie-element/image-cloze-association-configure@3.1.45) (2022-05-03)
245
+
246
+ **Note:** Version bump only for package @pie-element/image-cloze-association-configure
247
+
248
+
249
+
250
+
251
+
252
+ ## [3.1.44](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@3.1.43...@pie-element/image-cloze-association-configure@3.1.44) (2022-04-12)
253
+
254
+ **Note:** Version bump only for package @pie-element/image-cloze-association-configure
255
+
256
+
257
+
258
+
259
+
260
+ ## [3.1.43](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@3.1.42...@pie-element/image-cloze-association-configure@3.1.43) (2022-03-28)
261
+
262
+ **Note:** Version bump only for package @pie-element/image-cloze-association-configure
263
+
264
+
265
+
266
+
267
+
268
+ ## [3.1.42](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@3.1.41...@pie-element/image-cloze-association-configure@3.1.42) (2022-03-22)
269
+
270
+ **Note:** Version bump only for package @pie-element/image-cloze-association-configure
271
+
272
+
273
+
274
+
275
+
276
+ ## [3.1.41](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@3.1.40...@pie-element/image-cloze-association-configure@3.1.41) (2022-03-08)
277
+
278
+ **Note:** Version bump only for package @pie-element/image-cloze-association-configure
279
+
280
+
281
+
282
+
283
+
284
+ ## [3.1.40](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@3.1.39...@pie-element/image-cloze-association-configure@3.1.40) (2022-03-08)
285
+
286
+ **Note:** Version bump only for package @pie-element/image-cloze-association-configure
287
+
288
+
289
+
290
+
291
+
292
+ ## [3.1.39](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@3.1.38...@pie-element/image-cloze-association-configure@3.1.39) (2022-02-21)
293
+
294
+ **Note:** Version bump only for package @pie-element/image-cloze-association-configure
295
+
296
+
297
+
298
+
299
+
300
+ ## [3.1.38](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@3.1.37...@pie-element/image-cloze-association-configure@3.1.38) (2022-02-04)
301
+
302
+ **Note:** Version bump only for package @pie-element/image-cloze-association-configure
303
+
304
+
305
+
306
+
307
+
308
+ ## [3.1.37](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@3.1.36...@pie-element/image-cloze-association-configure@3.1.37) (2022-01-24)
309
+
310
+ **Note:** Version bump only for package @pie-element/image-cloze-association-configure
311
+
312
+
313
+
314
+
315
+
316
+ ## [3.1.36](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@3.1.35...@pie-element/image-cloze-association-configure@3.1.36) (2022-01-10)
317
+
318
+ **Note:** Version bump only for package @pie-element/image-cloze-association-configure
319
+
320
+
321
+
322
+
323
+
324
+ ## [3.1.35](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@3.1.34...@pie-element/image-cloze-association-configure@3.1.35) (2021-12-23)
325
+
326
+ **Note:** Version bump only for package @pie-element/image-cloze-association-configure
327
+
328
+
329
+
330
+
331
+
332
+ ## [3.1.33](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@3.1.32...@pie-element/image-cloze-association-configure@3.1.33) (2021-12-13)
333
+
334
+ **Note:** Version bump only for package @pie-element/image-cloze-association-configure
335
+
336
+
337
+
338
+
339
+
340
+ ## [3.1.30](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@3.1.29...@pie-element/image-cloze-association-configure@3.1.30) (2021-11-29)
341
+
342
+ **Note:** Version bump only for package @pie-element/image-cloze-association-configure
343
+
344
+
345
+
346
+
347
+
348
+ ## [3.1.29](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@3.1.28...@pie-element/image-cloze-association-configure@3.1.29) (2021-10-04)
349
+
350
+ **Note:** Version bump only for package @pie-element/image-cloze-association-configure
351
+
352
+
353
+
354
+
355
+
356
+ ## [3.1.28](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@3.1.27...@pie-element/image-cloze-association-configure@3.1.28) (2021-09-20)
357
+
358
+
359
+ ### Bug Fixes
360
+
361
+ * pie-lib updates ([e521c2f](https://github.com/pie-framework/pie-elements/commit/e521c2f1a44aa7f3e14f82a1cee05ceb484ed0a6))
362
+ * Updated pie-lib versions ([2fe4c5d](https://github.com/pie-framework/pie-elements/commit/2fe4c5d0be2d40f5fdb34815855695a7f1087f56))
363
+ * Updated pie-lib versions ([1c23830](https://github.com/pie-framework/pie-elements/commit/1c23830fc75d1de5f7bb3bb16de3c665ae5fa350))
364
+
365
+
366
+
367
+
368
+
369
+ ## [3.1.27](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@3.1.26...@pie-element/image-cloze-association-configure@3.1.27) (2021-08-05)
370
+
371
+ **Note:** Version bump only for package @pie-element/image-cloze-association-configure
372
+
373
+
374
+
375
+
376
+
377
+ ## [3.1.26](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@3.1.24...@pie-element/image-cloze-association-configure@3.1.26) (2021-08-05)
378
+
379
+
380
+ ### Bug Fixes
381
+
382
+ * force bump ([5ea7295](https://github.com/pie-framework/pie-elements/commit/5ea7295e4755fbc492a76e7ec69e5fc35b196919))
383
+
384
+
385
+
386
+
387
+
388
+ ## [3.1.24](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@3.1.23...@pie-element/image-cloze-association-configure@3.1.24) (2021-06-29)
389
+
390
+ **Note:** Version bump only for package @pie-element/image-cloze-association-configure
391
+
392
+
393
+
394
+
395
+
396
+ ## [3.1.23](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@3.1.22...@pie-element/image-cloze-association-configure@3.1.23) (2021-04-07)
397
+
398
+ **Note:** Version bump only for package @pie-element/image-cloze-association-configure
399
+
400
+
401
+
402
+
403
+
6
404
  ## [3.1.22](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@3.1.19...@pie-element/image-cloze-association-configure@3.1.22) (2021-03-03)
7
405
 
8
406
  **Note:** Version bump only for package @pie-element/image-cloze-association-configure
@@ -11,9 +11,25 @@ var _default = {
11
11
  studentInstructionsEnabled: true
12
12
  },
13
13
  configuration: {
14
+ maxImageWidth: {
15
+ teacherInstructions: 300
16
+ },
17
+ maxImageHeight: {
18
+ teacherInstructions: 300
19
+ },
20
+ settingsPanelDisabled: false,
21
+ spellCheck: {
22
+ label: 'Spellcheck',
23
+ settings: false,
24
+ enabled: true
25
+ },
14
26
  teacherInstructions: {
15
27
  settings: true,
16
28
  label: 'Teacher Instructions'
29
+ },
30
+ withRubric: {
31
+ settings: false,
32
+ label: 'Add Rubric'
17
33
  }
18
34
  }
19
35
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/defaults.js"],"names":["model","rationaleEnabled","teacherInstructionsEnabled","studentInstructionsEnabled","configuration","teacherInstructions","settings","label"],"mappings":";;;;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,gBAAgB,EAAE,IADb;AAELC,IAAAA,0BAA0B,EAAE,IAFvB;AAGLC,IAAAA,0BAA0B,EAAE;AAHvB,GADM;AAMbC,EAAAA,aAAa,EAAE;AACbC,IAAAA,mBAAmB,EAAE;AACnBC,MAAAA,QAAQ,EAAE,IADS;AAEnBC,MAAAA,KAAK,EAAE;AAFY;AADR;AANF,C","sourcesContent":["export default {\n model: {\n rationaleEnabled: true,\n teacherInstructionsEnabled: true,\n studentInstructionsEnabled: true\n },\n configuration: {\n teacherInstructions: {\n settings: true,\n label: 'Teacher Instructions'\n }\n }\n};\n"],"file":"defaults.js"}
1
+ {"version":3,"sources":["../src/defaults.js"],"names":["model","rationaleEnabled","teacherInstructionsEnabled","studentInstructionsEnabled","configuration","maxImageWidth","teacherInstructions","maxImageHeight","settingsPanelDisabled","spellCheck","label","settings","enabled","withRubric"],"mappings":";;;;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,gBAAgB,EAAE,IADb;AAELC,IAAAA,0BAA0B,EAAE,IAFvB;AAGLC,IAAAA,0BAA0B,EAAE;AAHvB,GADM;AAMbC,EAAAA,aAAa,EAAE;AACbC,IAAAA,aAAa,EAAE;AACbC,MAAAA,mBAAmB,EAAE;AADR,KADF;AAIbC,IAAAA,cAAc,EAAE;AACdD,MAAAA,mBAAmB,EAAE;AADP,KAJH;AAObE,IAAAA,qBAAqB,EAAE,KAPV;AAQbC,IAAAA,UAAU,EAAE;AACVC,MAAAA,KAAK,EAAE,YADG;AAEVC,MAAAA,QAAQ,EAAE,KAFA;AAGVC,MAAAA,OAAO,EAAE;AAHC,KARC;AAabN,IAAAA,mBAAmB,EAAE;AACnBK,MAAAA,QAAQ,EAAE,IADS;AAEnBD,MAAAA,KAAK,EAAE;AAFY,KAbR;AAiBbG,IAAAA,UAAU,EAAE;AACVF,MAAAA,QAAQ,EAAE,KADA;AAEVD,MAAAA,KAAK,EAAE;AAFG;AAjBC;AANF,C","sourcesContent":["export default {\n model: {\n rationaleEnabled: true,\n teacherInstructionsEnabled: true,\n studentInstructionsEnabled: true,\n },\n configuration: {\n maxImageWidth: {\n teacherInstructions: 300,\n },\n maxImageHeight: {\n teacherInstructions: 300,\n },\n settingsPanelDisabled: false,\n spellCheck: {\n label: 'Spellcheck',\n settings: false,\n enabled: true,\n },\n teacherInstructions: {\n settings: true,\n label: 'Teacher Instructions',\n },\n withRubric: {\n settings: false,\n label: 'Add Rubric',\n },\n },\n};\n"],"file":"defaults.js"}
@@ -35,13 +35,13 @@ var _root = _interopRequireDefault(require("./root"));
35
35
 
36
36
  var _defaults = _interopRequireDefault(require("./defaults"));
37
37
 
38
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
38
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
39
39
 
40
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
40
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
41
41
 
42
42
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
43
43
 
44
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
44
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
45
45
 
46
46
  var log = (0, _debug["default"])('image-cloze-association:configure');
47
47
 
@@ -118,6 +118,16 @@ var ImageClozeAssociationConfigure = /*#__PURE__*/function (_HTMLElement) {
118
118
  value: function onDeleteImage(src, done) {
119
119
  this.dispatchEvent(new _pieConfigureEvents.DeleteImageEvent(src, done));
120
120
  }
121
+ }, {
122
+ key: "insertSound",
123
+ value: function insertSound(handler) {
124
+ this.dispatchEvent(new _pieConfigureEvents.InsertSoundEvent(handler));
125
+ }
126
+ }, {
127
+ key: "onDeleteSound",
128
+ value: function onDeleteSound(src, done) {
129
+ this.dispatchEvent(new _pieConfigureEvents.DeleteSoundEvent(src, done));
130
+ }
121
131
  }, {
122
132
  key: "_render",
123
133
  value: function _render() {
@@ -132,6 +142,10 @@ var ImageClozeAssociationConfigure = /*#__PURE__*/function (_HTMLElement) {
132
142
  imageSupport: {
133
143
  add: this.insertImage.bind(this),
134
144
  "delete": this.onDeleteImage.bind(this)
145
+ },
146
+ uploadSoundSupport: {
147
+ add: this.insertSound.bind(this),
148
+ "delete": this.onDeleteSound.bind(this)
135
149
  }
136
150
  });
137
151
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.js"],"names":["log","ImageClozeAssociationConfigure","_model","createDefaultModel","onModelChanged","bind","_configuration","sensibleDefaults","configuration","s","_render","c","_disableSidePanel","reset","resetValue","dispatchEvent","ModelUpdatedEvent","m","dispatchModelUpdated","config","handler","InsertImageEvent","src","done","DeleteImageEvent","element","React","createElement","Root","disableSidePanel","model","onConfigurationChanged","imageSupport","add","insertImage","onDeleteImage","ReactDOM","render","HTMLElement"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAEA;;AACA;;AACA;;AAEA;;AACA;;;;;;;;;;AAEA,IAAMA,GAAG,GAAG,uBAAM,mCAAN,CAAZ;;IAEqBC,8B;;;;;AAMnB,4CAAc;AAAA;;AAAA;AACZ;AACA,UAAKC,MAAL,GAAcD,8BAA8B,CAACE,kBAA/B,EAAd;AACA,UAAKC,cAAL,GAAsB,MAAKA,cAAL,CAAoBC,IAApB,gDAAtB;AACA,UAAKC,cAAL,GAAsBC,qBAAiBC,aAAvC;AAJY;AAKb;;;;SAED,aAAUC,CAAV,EAAa;AACX,WAAKP,MAAL,GAAcD,8BAA8B,CAACE,kBAA/B,CAAkDM,CAAlD,CAAd;;AACA,WAAKC,OAAL;AACD;;;SAED,aAAkBC,CAAlB,EAAqB;AACnB,WAAKL,cAAL,GAAsBK,CAAtB;;AACA,WAAKD,OAAL;AACD;;;SAED,aAAqBD,CAArB,EAAwB;AACtB,WAAKG,iBAAL,GAAyBH,CAAzB;;AACA,WAAKC,OAAL;AACD;;;WAED,8BAAqBG,KAArB,EAA4B;AAC1B,UAAMC,UAAU,GAAG,CAAC,CAACD,KAArB;AAEA,WAAKE,aAAL,CAAmB,IAAIC,qCAAJ,CAAsB,KAAKd,MAA3B,EAAmCY,UAAnC,CAAnB;AACD;;;WAED,wBAAeG,CAAf,EAAkBJ,KAAlB,EAAyB;AACvB,WAAKX,MAAL,GAAce,CAAd;AACA,WAAKC,oBAAL,CAA0BL,KAA1B;;AACA,WAAKH,OAAL;AACD;;;WAED,gCAAuBS,MAAvB,EAA+B;AAC7B,WAAKb,cAAL,GAAsBa,MAAtB;;AACA,WAAKT,OAAL;AACD;AAED;AACF;AACA;AACA;;;;WACE,qBAAYU,OAAZ,EAAqB;AACnB,WAAKL,aAAL,CAAmB,IAAIM,oCAAJ,CAAqBD,OAArB,CAAnB;AACD;;;WAED,uBAAcE,GAAd,EAAmBC,IAAnB,EAAyB;AACvB,WAAKR,aAAL,CAAmB,IAAIS,oCAAJ,CAAqBF,GAArB,EAA0BC,IAA1B,CAAnB;AACD;;;WAED,mBAAU;AACRvB,MAAAA,GAAG,CAAC,SAAD,CAAH;;AACA,UAAIyB,OAAO,gBAAGC,kBAAMC,aAAN,CAAoBC,gBAApB,EAA0B;AACtCC,QAAAA,gBAAgB,EAAE,KAAKjB,iBADe;AAEtCkB,QAAAA,KAAK,EAAE,KAAK5B,MAF0B;AAGtCM,QAAAA,aAAa,EAAE,KAAKF,cAHkB;AAItCF,QAAAA,cAAc,EAAE,KAAKA,cAAL,CAAoBC,IAApB,CAAyB,IAAzB,CAJsB;AAKtC0B,QAAAA,sBAAsB,EAAE,KAAKA,sBAAL,CAA4B1B,IAA5B,CAAiC,IAAjC,CALc;AAMtC2B,QAAAA,YAAY,EAAE;AACZC,UAAAA,GAAG,EAAE,KAAKC,WAAL,CAAiB7B,IAAjB,CAAsB,IAAtB,CADO;AAEZ,oBAAQ,KAAK8B,aAAL,CAAmB9B,IAAnB,CAAwB,IAAxB;AAFI;AANwB,OAA1B,CAAd;;AAWA+B,2BAASC,MAAT,CAAgBZ,OAAhB,EAAyB,IAAzB;AACD;;;kDAvEyDa,W;;;iCAAvCrC,8B,wBACS;AAAA,MAAC6B,KAAD,uEAAS,EAAT;AAAA,yCACvBvB,qBAAiBuB,KADM,GAEvBA,KAFuB;AAAA,C","sourcesContent":["import { DeleteImageEvent, InsertImageEvent, ModelUpdatedEvent } from '@pie-framework/pie-configure-events';\n\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport debug from 'debug';\n\nimport Root from './root';\nimport sensibleDefaults from './defaults';\n\nconst log = debug('image-cloze-association:configure');\n\nexport default class ImageClozeAssociationConfigure extends HTMLElement {\n static createDefaultModel = (model = {}) => ({\n ...sensibleDefaults.model,\n ...model,\n });\n\n constructor() {\n super();\n this._model = ImageClozeAssociationConfigure.createDefaultModel();\n this.onModelChanged = this.onModelChanged.bind(this);\n this._configuration = sensibleDefaults.configuration;\n }\n\n set model(s) {\n this._model = ImageClozeAssociationConfigure.createDefaultModel(s);\n this._render();\n }\n\n set configuration(c) {\n this._configuration = c;\n this._render();\n }\n\n set disableSidePanel(s) {\n this._disableSidePanel = s;\n this._render();\n }\n\n dispatchModelUpdated(reset) {\n const resetValue = !!reset;\n\n this.dispatchEvent(new ModelUpdatedEvent(this._model, resetValue));\n }\n\n onModelChanged(m, reset) {\n this._model = m;\n this.dispatchModelUpdated(reset);\n this._render();\n }\n\n onConfigurationChanged(config) {\n this._configuration = config;\n this._render();\n }\n\n /**\n *\n * @param {done, progress, file} handler\n */\n insertImage(handler) {\n this.dispatchEvent(new InsertImageEvent(handler));\n }\n\n onDeleteImage(src, done) {\n this.dispatchEvent(new DeleteImageEvent(src, done));\n }\n\n _render() {\n log('_render');\n let element = React.createElement(Root, {\n disableSidePanel: this._disableSidePanel,\n model: this._model,\n configuration: this._configuration,\n onModelChanged: this.onModelChanged.bind(this),\n onConfigurationChanged: this.onConfigurationChanged.bind(this),\n imageSupport: {\n add: this.insertImage.bind(this),\n delete: this.onDeleteImage.bind(this)\n }\n });\n ReactDOM.render(element, this);\n }\n}\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../src/index.js"],"names":["log","ImageClozeAssociationConfigure","_model","createDefaultModel","onModelChanged","bind","_configuration","sensibleDefaults","configuration","s","_render","c","_disableSidePanel","reset","resetValue","dispatchEvent","ModelUpdatedEvent","m","dispatchModelUpdated","config","handler","InsertImageEvent","src","done","DeleteImageEvent","InsertSoundEvent","DeleteSoundEvent","element","React","createElement","Root","disableSidePanel","model","onConfigurationChanged","imageSupport","add","insertImage","onDeleteImage","uploadSoundSupport","insertSound","onDeleteSound","ReactDOM","render","HTMLElement"],"mappings":"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","sourcesContent":["import {\n ModelUpdatedEvent,\n DeleteImageEvent,\n InsertImageEvent,\n InsertSoundEvent,\n DeleteSoundEvent,\n} from '@pie-framework/pie-configure-events';\n\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport debug from 'debug';\n\nimport Root from './root';\nimport sensibleDefaults from './defaults';\n\nconst log = debug('image-cloze-association:configure');\n\nexport default class ImageClozeAssociationConfigure extends HTMLElement {\n static createDefaultModel = (model = {}) => ({\n ...sensibleDefaults.model,\n ...model,\n });\n\n constructor() {\n super();\n this._model = ImageClozeAssociationConfigure.createDefaultModel();\n this.onModelChanged = this.onModelChanged.bind(this);\n this._configuration = sensibleDefaults.configuration;\n }\n\n set model(s) {\n this._model = ImageClozeAssociationConfigure.createDefaultModel(s);\n this._render();\n }\n\n set configuration(c) {\n this._configuration = c;\n this._render();\n }\n\n set disableSidePanel(s) {\n this._disableSidePanel = s;\n this._render();\n }\n\n dispatchModelUpdated(reset) {\n const resetValue = !!reset;\n\n this.dispatchEvent(new ModelUpdatedEvent(this._model, resetValue));\n }\n\n onModelChanged(m, reset) {\n this._model = m;\n this.dispatchModelUpdated(reset);\n this._render();\n }\n\n onConfigurationChanged(config) {\n this._configuration = config;\n this._render();\n }\n\n /**\n *\n * @param {done, progress, file} handler\n */\n insertImage(handler) {\n this.dispatchEvent(new InsertImageEvent(handler));\n }\n\n onDeleteImage(src, done) {\n this.dispatchEvent(new DeleteImageEvent(src, done));\n }\n\n insertSound(handler) {\n this.dispatchEvent(new InsertSoundEvent(handler));\n }\n\n onDeleteSound(src, done) {\n this.dispatchEvent(new DeleteSoundEvent(src, done));\n }\n\n _render() {\n log('_render');\n\n let element = React.createElement(Root, {\n disableSidePanel: this._disableSidePanel,\n model: this._model,\n configuration: this._configuration,\n onModelChanged: this.onModelChanged.bind(this),\n onConfigurationChanged: this.onConfigurationChanged.bind(this),\n imageSupport: {\n add: this.insertImage.bind(this),\n delete: this.onDeleteImage.bind(this),\n },\n uploadSoundSupport: {\n add: this.insertSound.bind(this),\n delete: this.onDeleteSound.bind(this),\n },\n });\n\n ReactDOM.render(element, this);\n }\n}\n"],"file":"index.js"}
@@ -25,19 +25,19 @@ var _react = _interopRequireDefault(require("react"));
25
25
 
26
26
  var _propTypes = _interopRequireDefault(require("prop-types"));
27
27
 
28
- var _styles = require("@material-ui/core/styles");
29
-
30
28
  var _configUi = require("@pie-lib/config-ui");
31
29
 
32
30
  var _editableHtml = _interopRequireDefault(require("@pie-lib/editable-html"));
33
31
 
34
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
32
+ var _styles = require("@material-ui/core/styles");
33
+
34
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
35
35
 
36
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
36
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
37
37
 
38
38
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
39
39
 
40
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
40
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
41
41
 
42
42
  var Panel = _configUi.settings.Panel,
43
43
  toggle = _configUi.settings.toggle;
@@ -74,13 +74,32 @@ var Root = /*#__PURE__*/function (_React$Component) {
74
74
  configuration = _this$props.configuration,
75
75
  onModelChanged = _this$props.onModelChanged,
76
76
  onConfigurationChanged = _this$props.onConfigurationChanged,
77
- imageSupport = _this$props.imageSupport;
77
+ imageSupport = _this$props.imageSupport,
78
+ uploadSoundSupport = _this$props.uploadSoundSupport;
78
79
 
79
80
  var _ref = configuration || {},
81
+ _ref$maxImageWidth = _ref.maxImageWidth,
82
+ maxImageWidth = _ref$maxImageWidth === void 0 ? {} : _ref$maxImageWidth,
83
+ _ref$maxImageHeight = _ref.maxImageHeight,
84
+ maxImageHeight = _ref$maxImageHeight === void 0 ? {} : _ref$maxImageHeight,
85
+ settingsPanelDisabled = _ref.settingsPanelDisabled,
86
+ _ref$spellCheck = _ref.spellCheck,
87
+ spellCheck = _ref$spellCheck === void 0 ? {} : _ref$spellCheck,
80
88
  _ref$teacherInstructi = _ref.teacherInstructions,
81
- teacherInstructions = _ref$teacherInstructi === void 0 ? {} : _ref$teacherInstructi;
82
-
89
+ teacherInstructions = _ref$teacherInstructi === void 0 ? {} : _ref$teacherInstructi,
90
+ _ref$withRubric = _ref.withRubric,
91
+ withRubric = _ref$withRubric === void 0 ? {} : _ref$withRubric;
92
+
93
+ var _ref2 = model || {},
94
+ spellCheckEnabled = _ref2.spellCheckEnabled;
95
+
96
+ var panelProperties = {
97
+ teacherInstructionsEnabled: teacherInstructions.settings && toggle(teacherInstructions.label),
98
+ spellCheckEnabled: spellCheck.settings && toggle(spellCheck.label),
99
+ rubricEnabled: (withRubric === null || withRubric === void 0 ? void 0 : withRubric.settings) && toggle(withRubric === null || withRubric === void 0 ? void 0 : withRubric.label)
100
+ };
83
101
  return /*#__PURE__*/_react["default"].createElement(_configUi.layout.ConfigLayout, {
102
+ hideSettings: settingsPanelDisabled,
84
103
  settings: /*#__PURE__*/_react["default"].createElement(Panel, {
85
104
  model: model,
86
105
  configuration: configuration,
@@ -91,9 +110,7 @@ var Root = /*#__PURE__*/function (_React$Component) {
91
110
  return onConfigurationChanged(config);
92
111
  },
93
112
  groups: {
94
- 'Properties': {
95
- teacherInstructionsEnabled: teacherInstructions.settings && toggle(teacherInstructions.label)
96
- }
113
+ Properties: panelProperties
97
114
  }
98
115
  })
99
116
  }, /*#__PURE__*/_react["default"].createElement("div", {
@@ -106,8 +123,17 @@ var Root = /*#__PURE__*/function (_React$Component) {
106
123
  markup: model.teacherInstructions || '',
107
124
  onChange: this.onTeacherInstructionsChanged,
108
125
  imageSupport: imageSupport,
109
- nonEmpty: false
110
- })), "Image cloze association"));
126
+ nonEmpty: false,
127
+ spellCheck: spellCheckEnabled,
128
+ maxImageWidth: maxImageWidth && maxImageWidth.teacherInstructions,
129
+ maxImageHeight: maxImageHeight && maxImageHeight.teacherInstructions,
130
+ uploadSoundSupport: uploadSoundSupport,
131
+ languageCharactersProps: [{
132
+ language: 'spanish'
133
+ }, {
134
+ language: 'special'
135
+ }]
136
+ })), /*#__PURE__*/_react["default"].createElement("div", null, "Image cloze association")));
111
137
  }
112
138
  }]);
113
139
  return Root;
@@ -140,6 +166,10 @@ Root.propTypes = {
140
166
  imageSupport: _propTypes["default"].shape({
141
167
  add: _propTypes["default"].func.isRequired,
142
168
  "delete": _propTypes["default"].func.isRequired
169
+ }),
170
+ uploadSoundSupport: _propTypes["default"].shape({
171
+ add: _propTypes["default"].func.isRequired,
172
+ "delete": _propTypes["default"].func.isRequired
143
173
  })
144
174
  };
145
175